(function (root, factory){
if(typeof module==="object"&&module.exports){
module.exports=factory();
}else{
root.Toastify=factory();
}})(this, function (global){
const DEFAULT_OPTIONS={
oldestFirst: true,
text: "Toastify is awesome!",
node: undefined,
duration: 3000,
selector: undefined,
callback: function (){
},
destination: undefined,
newWindow: false,
close: false,
gravity: "toastify-top",
positionLeft: false,
position: '',
backgroundColor: '',
avatar: "",
className: "",
stopOnFocus: true,
onClick: function (){
},
offset: {x: 0, y: 0},
escapeMarkup: true,
ariaLive: 'polite',
style: {background: ''},
slideFrom: '',
type: ''
};
class Toastify {
constructor(options={}){
this.options={};
this.toastElement=null;
this.version="1.12.0";
this.options.text=options.text||DEFAULT_OPTIONS.text;
this.options.node=options.node||DEFAULT_OPTIONS.node;
this.options.duration=options.duration===0 ? 0:options.duration||DEFAULT_OPTIONS.duration;
this.options.selector=options.selector||DEFAULT_OPTIONS.selector;
this.options.callback=options.callback||DEFAULT_OPTIONS.callback;
this.options.destination=options.destination||DEFAULT_OPTIONS.destination;
this.options.newWindow=options.newWindow||DEFAULT_OPTIONS.newWindow;
this.options.close=options.close||DEFAULT_OPTIONS.close;
this.options.gravity=options.gravity==="bottom" ? "toastify-bottom":DEFAULT_OPTIONS.gravity;
this.options.positionLeft=options.positionLeft||DEFAULT_OPTIONS.positionLeft;
this.options.position=options.position||DEFAULT_OPTIONS.position;
this.options.backgroundColor=options.backgroundColor||DEFAULT_OPTIONS.backgroundColor;
this.options.avatar=options.avatar||DEFAULT_OPTIONS.avatar;
this.options.className=options.className||DEFAULT_OPTIONS.className;
this.options.stopOnFocus=options.stopOnFocus===undefined ? DEFAULT_OPTIONS.stopOnFocus:options.stopOnFocus;
this.options.onClick=options.onClick||DEFAULT_OPTIONS.onClick;
this.options.offset=options.offset||DEFAULT_OPTIONS.offset;
this.options.escapeMarkup=options.escapeMarkup!==undefined ? options.escapeMarkup:DEFAULT_OPTIONS.escapeMarkup;
this.options.ariaLive=options.ariaLive||DEFAULT_OPTIONS.ariaLive;
this.options.style=options.style||Object.assign({}, DEFAULT_OPTIONS.style);
this.options.slideFrom=options.slideFrom||DEFAULT_OPTIONS.slideFrom;
this.options.type=options.type||null;
if(options.backgroundColor){
this.options.style.background=options.backgroundColor;
}}
buildToast(){
if(!this.options){
throw "Toastify is not initialized";
}
const divElement=document.createElement("div");
divElement.className="toastify " + this.options.className;
if(!!this.options.position){
divElement.className +=" toastify-" + this.options.position;
}else{
if(this.options.positionLeft===true){
divElement.className +=" toastify-left";
console.warn('Property `positionLeft` will be depreciated in further versions. Please use `position` instead.');
}else{
divElement.className +=" toastify-right";
}}
divElement.className +=" " + this.options.gravity;
if(this.options.backgroundColor){
console.warn('DEPRECATION NOTICE: "backgroundColor" is being deprecated. Please use the "style.background" property.');
}
for (const property in this.options.style){
divElement.style[property]=this.options.style[property];
}
if(this.options.ariaLive){
divElement.setAttribute('aria-live', this.options.ariaLive);
}
if(this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE){
divElement.appendChild(this.options.node);
}else{
if(this.options.escapeMarkup){
divElement.innerText=this.options.text;
}else{
divElement.innerHTML=this.options.text;
}
const successIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path fill="green" d="M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"></path></svg>';
const errorIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path fill="currentColor" d="M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"></path></svg>';
const infoIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path fill="currentColor" d="M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.992 12.992 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"></path></svg>';
const warningIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path fill="currentColor" d="M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"></path></svg>';
if(this.options.type){
const icon=document.createElement('div');
icon.classList.add('toastify-icon');
if(this.options.type==='success'){
icon.innerHTML=successIcon.trim();
icon.classList.add('success');
}else if(this.options.type==='error'){
icon.innerHTML=errorIcon.trim();
icon.classList.add('error');
}else if(this.options.type==='info'){
icon.innerHTML=infoIcon.trim();
icon.classList.add('info');
}else if(this.options.type==='warning'){
icon.innerHTML=warningIcon.trim();
icon.classList.add('warning');
}
divElement.classList.add('has-toastify-icon');
if(this.options.position==="left"||this.options.positionLeft===true){
divElement.appendChild(icon);
}else{
divElement.insertAdjacentElement("afterbegin", icon);
}}
if(this.options.avatar!==""&&!this.options.type){
const avatarElement=document.createElement("img");
avatarElement.src=this.options.avatar;
avatarElement.className="toastify-avatar";
if(this.options.position=="left"||this.options.positionLeft===true){
divElement.appendChild(avatarElement);
}else{
divElement.insertAdjacentElement("afterbegin", avatarElement);
}}
}
if(this.options.close===true){
const closeElement=document.createElement("button");
closeElement.type="button";
closeElement.setAttribute("aria-label", "Close");
closeElement.className="toast-close";
closeElement.innerHTML="&#10006;";
closeElement.addEventListener("click",
(event)=> {
event.stopPropagation();
this.removeElement(this.toastElement);
window.clearTimeout(this.toastElement.timeOutValue);
}
);
const width=window.innerWidth > 0 ? window.innerWidth:screen.width;
if((this.options.position=="left"||this.options.positionLeft===true)&&width > 360){
divElement.insertAdjacentElement("afterbegin", closeElement);
}else{
divElement.appendChild(closeElement);
}}
if(this.options.stopOnFocus&&this.options.duration > 0){
divElement.addEventListener("mouseover",
()=> {
window.clearTimeout(divElement.timeOutValue);
}
);
divElement.addEventListener("mouseleave",
()=> {
divElement.timeOutValue=window.setTimeout(()=> {
this.removeElement(divElement);
},
this.options.duration
);
}
);
}
if(typeof this.options.destination!=="undefined"){
divElement.addEventListener("click",
(event)=> {
event.stopPropagation();
if(this.options.newWindow===true){
window.open(this.options.destination, "_blank");
}else{
window.location=this.options.destination;
}}
);
}
if(typeof this.options.onClick==="function"&&typeof this.options.destination==="undefined"){
divElement.addEventListener("click",
(event)=> {
event.stopPropagation();
this.options.onClick();
}
);
}
if(typeof this.options.offset==="object"){
const x=Toastify.getAxisOffsetAValue("x", this.options);
const y=Toastify.getAxisOffsetAValue("y", this.options);
const xOffset=this.options.position=="left" ? x:"-" + x;
const yOffset=this.options.gravity=="toastify-top" ? y:"-" + y;
divElement.style.transform="translate(" + xOffset + "," + yOffset + ")";
}
return divElement;
}
getSlidePosition(){
if(!this.options.slideFrom) return null;
const width=window.innerWidth;
const height=window.innerHeight;
switch (this.options.slideFrom.toLowerCase()){
case 'left':
return {transform: `translateX(-${width}px)`};
case 'right':
return {transform: `translateX(${width}px)`};
case 'top':
return {transform: `translateY(-${height}px)`};
case 'bottom':
return {transform: `translateY(${height}px)`};
default:
return null;
}}
getFinalPosition(){
let transform="";
if(typeof this.options.offset==="object"){
const x=Toastify.getAxisOffsetAValue("x", this.options);
const y=Toastify.getAxisOffsetAValue("y", this.options);
const xOffset=this.options.position=="left" ? x:"-" + x;
const yOffset=this.options.gravity=="toastify-top" ? y:"-" + y;
transform=`translate(${xOffset}, ${yOffset})`;
}
return {transform};}
showToast(){
this.toastElement=this.buildToast();
const initialPosition=this.getSlidePosition();
if(initialPosition){
Object.assign(this.toastElement.style, initialPosition);
}
let rootElement;
if(typeof this.options.selector==="string"){
rootElement=document.getElementById(this.options.selector);
}else if(this.options.selector instanceof HTMLElement||(typeof ShadowRoot!=='undefined'&&this.options.selector instanceof ShadowRoot)){
rootElement=this.options.selector;
}else{
rootElement=document.body;
}
if(!rootElement){
throw "Root element is not defined";
}
const elementToInsert=DEFAULT_OPTIONS.oldestFirst ? rootElement.firstChild:rootElement.lastChild;
rootElement.insertBefore(this.toastElement, elementToInsert);
void this.toastElement.offsetWidth;
if(!this.options.slideFrom){
this.toastElement.className +=" on";
}
if(initialPosition){
this.toastElement.style.transition="transform 0.4s cubic-bezier(0.215, 0.61, 0.355, 1), opacity 0.4s cubic-bezier(0.215, 0.61, 0.355, 1)";
setTimeout(()=> {
const finalPosition=this.getFinalPosition();
Object.assign(this.toastElement.style, finalPosition);
this.toastElement.className +=" on";
}, 20);
}
Toastify.reposition();
if(this.options.duration > 0){
this.toastElement.timeOutValue=window.setTimeout(()=> {
this.removeElement(this.toastElement);
},
this.options.duration
);
}
return this;
}
hideToast(){
if(this.toastElement.timeOutValue){
clearTimeout(this.toastElement.timeOutValue);
}
this.removeElement(this.toastElement);
}
removeElement(toastElement){
if(this.options.slideFrom){
const width=window.innerWidth;
const height=window.innerHeight;
toastElement.style.transition="transform 0.4s cubic-bezier(0.215, 0.61, 0.355, 1), opacity 0.4s cubic-bezier(0.215, 0.61, 0.355, 1)";
switch (this.options.slideFrom.toLowerCase()){
case 'left':
toastElement.style.transform=`translateX(-${width}px)`;
break;
case 'right':
toastElement.style.transform=`translateX(${width}px)`;
break;
case 'top':
toastElement.style.transform=`translateY(-${height}px)`;
break;
case 'bottom':
toastElement.style.transform=`translateY(${height}px)`;
break;
}
toastElement.style.opacity='0';
}else{
toastElement.className=toastElement.className.replace(" on", "");
}
window.setTimeout(()=> {
if(this.options.node&&this.options.node.parentNode){
this.options.node.parentNode.removeChild(this.options.node);
}
if(toastElement.parentNode){
toastElement.parentNode.removeChild(toastElement);
}
this.options.callback.call(toastElement);
Toastify.reposition();
},
400
);
}
static getAxisOffsetAValue(axis, options){
if(options.offset[axis]){
if(isNaN(options.offset[axis])){
return options.offset[axis];
}else{
return options.offset[axis] + 'px';
}}
return '0px';
}
static containsClass(elem, yourClass){
if(!elem||typeof yourClass!=="string"){
return false;
}else if(elem.className &&
elem.className
.trim()
.split(/\s+/gi)
.indexOf(yourClass) > -1
){
return true;
}else{
return false;
}}
static reposition(){
const topLeftOffsetSize={
top: 15,
bottom: 15,
};
const topRightOffsetSize={
top: 15,
bottom: 15,
};
const offsetSize={
top: 15,
bottom: 15,
};
const allToasts=Array.from(document.getElementsByClassName("toastify"));
if(Toastify.defaults.oldestFirst){
allToasts.reverse();
}
let classUsed;
for (let i=0; i < allToasts.length; i++){
if(Toastify.containsClass(allToasts[i], "toastify-top")===true){
classUsed="toastify-top";
}else{
classUsed="toastify-bottom";
}
const height=allToasts[i].offsetHeight;
classUsed=classUsed.substr(9, classUsed.length - 1);
const offset=15;
const width=window.innerWidth > 0 ? window.innerWidth:screen.width;
if(width <=360){
allToasts[i].style[classUsed]=offsetSize[classUsed] + "px";
offsetSize[classUsed] +=height + offset;
}else{
if(Toastify.containsClass(allToasts[i], "toastify-left")===true){
allToasts[i].style[classUsed]=topLeftOffsetSize[classUsed] + "px";
topLeftOffsetSize[classUsed] +=height + offset;
}else{
allToasts[i].style[classUsed]=topRightOffsetSize[classUsed] + "px";
topRightOffsetSize[classUsed] +=height + offset;
}}
}
return this;
}}
Toastify.defaults=DEFAULT_OPTIONS;
return Toastify;
});
(()=>{"use strict";var e,r,a,n={},c={};function __webpack_require__(e){var r=c[e];if(void 0!==r)return r.exports;var a=c[e]={exports:{}};return n[e](a,a.exports,__webpack_require__),a.exports}__webpack_require__.m=n,e=[],__webpack_require__.O=(r,a,n,c)=>{if(!a){var b=1/0;for(o=0;o<e.length;o++){for(var[a,n,c]=e[o],i=!0,t=0;t<a.length;t++)(!1&c||b>=c)&&Object.keys(__webpack_require__.O).every(e=>__webpack_require__.O[e](a[t]))?a.splice(t--,1):(i=!1,c<b&&(b=c));if(i){e.splice(o--,1);var _=n();void 0!==_&&(r=_)}}return r}c=c||0;for(var o=e.length;o>0&&e[o-1][2]>c;o--)e[o]=e[o-1];e[o]=[a,n,c]},__webpack_require__.f={},__webpack_require__.e=e=>Promise.all(Object.keys(__webpack_require__.f).reduce((r,a)=>(__webpack_require__.f[a](e,r),r),[])),__webpack_require__.u=e=>635===e?"code-highlight.38ec4828db8d33cccbe9.bundle.min.js":519===e?"video-playlist.d48e1a11007fe8c248f8.bundle.min.js":375===e?"paypal-button.5c63e4c8f36fb06aff31.bundle.min.js":786===e?"86c7dbc8d8e46f0e7ee5.bundle.min.js":857===e?"stripe-button.b7e32b5d713d60752c7e.bundle.min.js":581===e?"progress-tracker.7b160888e308c5f64701.bundle.min.js":961===e?"animated-headline.bc08854fb1e1a80434b2.bundle.min.js":692===e?"media-carousel.87c2cf115553a2c4f709.bundle.min.js":897===e?"carousel.e2af910b095554625156.bundle.min.js":416===e?"countdown.05b148ca20af32fc8e9f.bundle.min.js":292===e?"hotspot.737497535441dc0bc037.bundle.min.js":325===e?"form.cfd61a9174be80f835c6.bundle.min.js":543===e?"gallery.cca2358f59857ce6f62f.bundle.min.js":970===e?"lottie.5ea185196aba9f2de4f4.bundle.min.js":334===e?"nav-menu.3afa8f5eb1fef7c22561.bundle.min.js":887===e?"popup.61d4fcab8891b2e07802.bundle.min.js":535===e?"load-more.7c4417f8a727b79f546f.bundle.min.js":396===e?"posts.844727d8428792223d2f.bundle.min.js":726===e?"portfolio.3d0e387cc28c07bae511.bundle.min.js":316===e?"share-buttons.b99b5ff11c944a3a8ea9.bundle.min.js":829===e?"slides.8e9b74f1b31471377df8.bundle.min.js":158===e?"social.de5cec83bf689b2f1f01.bundle.min.js":404===e?"table-of-contents.86ee3e0cc8c1fff9aab4.bundle.min.js":345===e?"archive-posts.0b71f7023819e3872142.bundle.min.js":798===e?"search-form.9abeafeecde90cf7e0f4.bundle.min.js":6===e?"woocommerce-menu-cart.33fbf47b819947e7a2a7.bundle.min.js":80===e?"woocommerce-purchase-summary.118e54b95a68f0ad8c09.bundle.min.js":354===e?"woocommerce-checkout-page.8391e03a51a57a42528a.bundle.min.js":4===e?"woocommerce-cart.9131ef5e40333f8066dd.bundle.min.js":662===e?"woocommerce-my-account.ab469f426496c628ac6c.bundle.min.js":621===e?"woocommerce-notices.181b8701c45ec5374829.bundle.min.js":787===e?"product-add-to-cart.a4f88a0c19e95b3912b6.bundle.min.js":993===e?"loop.1594a1df76e87a11eda2.bundle.min.js":932===e?"loop-carousel.881847b13e8fe1f8bfc2.bundle.min.js":550===e?"ajax-pagination.505018eb312c83998279.bundle.min.js":727===e?"mega-menu.857df1cf3198ae47b617.bundle.min.js":87===e?"mega-menu-stretch-content.7ed04741ba7d5a80c556.bundle.min.js":912===e?"menu-title-keyboard-handler.b3891112675eb0b0c4d5.bundle.min.js":33===e?"nested-carousel.659b0373371215e60dab.bundle.min.js":225===e?"taxonomy-filter.6526351a1205655def47.bundle.min.js":579===e?"off-canvas.82d118980fb5aa03c82b.bundle.min.js":1===e?"contact-buttons.e1605c5cfaccbff3c14b.bundle.min.js":61===e?"contact-buttons-var-10.11bf4233106e1245bd61.bundle.min.js":249===e?"floating-bars-var-2.5287acd8570f1ce2dde3.bundle.min.js":440===e?"floating-bars-var-3.e9e9c0ea3c6fb0e51c58.bundle.min.js":187===e?"search.3ec7310139d97dd4cece.bundle.min.js":void 0,__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r={},a="elementor-pro:",__webpack_require__.l=(e,n,c,b)=>{if(r[e])r[e].push(n);else{var i,t;if(void 0!==c)for(var _=document.getElementsByTagName("script"),o=0;o<_.length;o++){var d=_[o];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==a+c){i=d;break}}i||(t=!0,(i=document.createElement("script")).charset="utf-8",__webpack_require__.nc&&i.setAttribute("nonce",__webpack_require__.nc),i.setAttribute("data-webpack",a+c),i.src=e),r[e]=[n];var onScriptComplete=(a,n)=>{i.onerror=i.onload=null,clearTimeout(u);var c=r[e];if(delete r[e],i.parentNode&&i.parentNode.removeChild(i),c&&c.forEach(e=>e(n)),a)return a(n)},u=setTimeout(onScriptComplete.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=onScriptComplete.bind(null,i.onerror),i.onload=onScriptComplete.bind(null,i.onload),t&&document.head.appendChild(i)}},(()=>{var e;__webpack_require__.g.importScripts&&(e=__webpack_require__.g.location+"");var r=__webpack_require__.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var a=r.getElementsByTagName("script");if(a.length)for(var n=a.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=a[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),__webpack_require__.p=e})(),(()=>{var e={978:0};__webpack_require__.f.j=(r,a)=>{var n=__webpack_require__.o(e,r)?e[r]:void 0;if(0!==n)if(n)a.push(n[2]);else if(978!=r){var c=new Promise((a,c)=>n=e[r]=[a,c]);a.push(n[2]=c);var b=__webpack_require__.p+__webpack_require__.u(r),i=new Error;__webpack_require__.l(b,a=>{if(__webpack_require__.o(e,r)&&(0!==(n=e[r])&&(e[r]=void 0),n)){var c=a&&("load"===a.type?"missing":a.type),b=a&&a.target&&a.target.src;i.message="Loading chunk "+r+" failed.\n("+c+": "+b+")",i.name="ChunkLoadError",i.type=c,i.request=b,n[1](i)}},"chunk-"+r,r)}else e[r]=0},__webpack_require__.O.j=r=>0===e[r];var webpackJsonpCallback=(r,a)=>{var n,c,[b,i,t]=a,_=0;if(b.some(r=>0!==e[r])){for(n in i)__webpack_require__.o(i,n)&&(__webpack_require__.m[n]=i[n]);if(t)var o=t(__webpack_require__)}for(r&&r(a);_<b.length;_++)c=b[_],__webpack_require__.o(e,c)&&e[c]&&e[c][0](),e[c]=0;return __webpack_require__.O(o)},r=self.webpackChunkelementor_pro=self.webpackChunkelementor_pro||[];r.forEach(webpackJsonpCallback.bind(null,0)),r.push=webpackJsonpCallback.bind(null,r.push.bind(r))})()})();