!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Sweetalert2=e()}(this,function(){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;nt.clientHeight)}function it(t){var e=window.getComputedStyle(t),n=parseFloat(e.getPropertyValue("animation-duration")||"0"),o=parseFloat(e.getPropertyValue("transition-duration")||"0");return 0\n
\n
    \n
    \n
    \n
    \n
    \n
    \n \n

    \n \n
    \n
    \n
    \n \n \n
    \n \n \n
    \n \n
    \n \n \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n
    \n \n').replace(/(^|\n)\s*/g,""),gt=function(t){var e,n=!!(e=K())&&(e.parentNode.removeChild(e),pt([document.documentElement,document.body],[z["no-backdrop"],z["toast-shown"],z["has-column"]]),!0);if(at())v("SweetAlert2 requires document to initialize");else{var o=document.createElement("div");o.className=z.container,n&&dt(o,z["no-transition"]),V(o,ht);var i,r,a,c,s,u,l,d,p,f,m,h,g="string"==typeof(i=t.target)?document.querySelector(i):i;g.appendChild(o),r=t,(a=Y()).setAttribute("role",r.toast?"alert":"dialog"),a.setAttribute("aria-live",r.toast?"polite":"assertive"),r.toast||a.setAttribute("aria-modal","true"),c=g,"rtl"===window.getComputedStyle(c).direction&&dt(K(),z.rtl),s=x(),u=ft(s,z.input),l=ft(s,z.file),d=s.querySelector(".".concat(z.range," input")),p=s.querySelector(".".concat(z.range," output")),f=ft(s,z.select),m=s.querySelector(".".concat(z.checkbox," input")),h=ft(s,z.textarea),u.oninput=ct,l.onchange=ct,f.onchange=ct,m.onchange=ct,h.oninput=ct,d.oninput=function(t){ct(t),p.value=d.value},d.onchange=function(t){ct(t),d.nextSibling.value=d.value}}},vt=function(t,e){t.jquery?bt(e,t):V(e,t.toString())},bt=function(t,e){if(t.textContent="",0 in e)for(var n=0;n in e;n++)t.appendChild(e[n].cloneNode(!0));else t.appendChild(e.cloneNode(!0))},yt=function(){if(at())return!1;var t=document.createElement("div"),e={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&void 0!==t.style[n])return e[n];return!1}();function wt(t,e,n){var o;nt(t,n["show".concat((o=e).charAt(0).toUpperCase()+o.slice(1),"Button")],"inline-block"),V(t,n["".concat(e,"ButtonText")]),t.setAttribute("aria-label",n["".concat(e,"ButtonAriaLabel")]),t.className=z[e],H(t,n,"".concat(e,"Button")),dt(t,n["".concat(e,"ButtonClass")])}function Ct(t,e){var n=K();if(n){var o,i,r,a;o=n,"string"==typeof(i=e.backdrop)?o.style.background=i:i||dt([document.documentElement,document.body],z["no-backdrop"]),!e.backdrop&&e.allowOutsideClick&&N('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),r=n,(a=e.position)in z?dt(r,z[a]):(N('The "position" parameter is not valid, defaulting to "center"'),dt(r,z.center)),function(t,e){if(e&&"string"==typeof e){var n="grow-".concat(e);n in z&&dt(t,z[n])}}(n,e.grow),H(n,e,"container");var c=document.body.getAttribute("data-swal2-queue-step");c&&(n.setAttribute("data-queue-step",c),document.body.removeAttribute("data-swal2-queue-step"))}}function kt(t,e){t.placeholder&&!e.inputPlaceholder||(t.placeholder=e.inputPlaceholder)}var xt={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap},Pt=["input","file","range","select","radio","checkbox","textarea"],At=function(t){if(!Ot[t.input])return v('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(t.input,'"'));var e=Et(t.input),n=Ot[t.input](e,t);tt(n),setTimeout(function(){J(n)})},Bt=function(t,e){var n=$(x(),t);if(n)for(var o in!function(t){for(var e=0;e=s.progressSteps.length&&N("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),s.progressSteps.forEach(function(t,e){var n,o,i,r,a=(n=t,o=document.createElement("li"),dt(o,z["progress-step"]),V(o,n),o);if(u.appendChild(a),e===l&&dt(a,z["active-progress-step"]),e!==s.progressSteps.length-1){var c=(i=t,r=document.createElement("li"),dt(r,z["progress-step-line"]),i.progressStepsDistance&&(r.style.width=i.progressStepsDistance),r);u.appendChild(c)}})}function It(t,e){var n,o,i,r,a=T();H(a,e,"header"),qt(0,e),function(t,e){var n=xt.innerParams.get(t);if(n&&e.icon===n.icon&&C())H(C(),e,"icon");else if(Vt(),e.icon)if(-1!==Object.keys(W).indexOf(e.icon)){var o=w(".".concat(z.icon,".").concat(W[e.icon]));tt(o),Ht(o,e),Rt(),H(o,e,"icon"),dt(o,e.showClass.icon)}else v('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(e.icon,'"'))}(t,e),function(t){var e=P();if(!t.imageUrl)return et(e);tt(e),e.setAttribute("src",t.imageUrl),e.setAttribute("alt",t.imageAlt),G(e,"width",t.imageWidth),G(e,"height",t.imageHeight),e.className=z.image,H(e,t,"image")}(e),n=e,o=k(),nt(o,n.title||n.titleText),n.title&&st(n.title,o),n.titleText&&(o.innerText=n.titleText),H(o,n,"title"),i=e,r=I(),V(r,i.closeButtonHtml),H(r,i,"closeButton"),nt(r,i.showCloseButton),r.setAttribute("aria-label",i.closeButtonAriaLabel)}function jt(t,e){var n,o,i,r;n=e,o=Y(),G(o,"width",n.width),G(o,"padding",n.padding),n.background&&(o.style.background=n.background),Ut(o,n),Ct(0,e),It(t,e),Tt(t,e),ut(0,e),i=e,r=L(),nt(r,i.footer),i.footer&&st(i.footer,r),H(r,i,"footer"),"function"==typeof e.onRender&&e.onRender(Y())}function Mt(){return S()&&S().click()}var Vt=function(){for(var t=n(),e=0;e\n \n
    \n
    \n ');else if("error"===e.icon)V(t,'\n \n \n \n \n ');else{V(t,Dt({question:"?",warning:"!",info:"i"}[e.icon]))}},Dt=function(t){return'
    ').concat(t,"
    ")},Nt=[],Ut=function(t,e){t.className="".concat(z.popup," ").concat(mt(t)?e.showClass.popup:""),e.toast?(dt([document.documentElement,document.body],z["toast-shown"]),dt(t,z.toast)):dt(t,z.modal),H(t,e,"popup"),"string"==typeof e.customClass&&dt(t,e.customClass),e.icon&&dt(t,z["icon-".concat(e.icon)])};function _t(){var t=Y();t||nn.fire(),t=Y();var e=O(),n=S();tt(e),tt(n,"inline-block"),dt([t,e],z.loading),n.disabled=!0,t.setAttribute("data-loading",!0),t.setAttribute("aria-busy",!0),t.focus()}function Ft(){return new Promise(function(t){var e=window.scrollX,n=window.scrollY;Zt.restoreFocusTimeout=setTimeout(function(){Zt.previousActiveElement&&Zt.previousActiveElement.focus?(Zt.previousActiveElement.focus(),Zt.previousActiveElement=null):document.body&&document.body.focus(),t()},100),void 0!==e&&void 0!==n&&window.scrollTo(e,n)})}function zt(){if(Zt.timeout)return function(){var t=q(),e=parseInt(window.getComputedStyle(t).width);t.style.removeProperty("transition"),t.style.width="100%";var n=parseInt(window.getComputedStyle(t).width),o=parseInt(e/n*100);t.style.removeProperty("transition"),t.style.width="".concat(o,"%")}(),Zt.timeout.stop()}function Wt(){if(Zt.timeout){var t=Zt.timeout.start();return rt(t),t}}function Kt(t){return Object.prototype.hasOwnProperty.call(Qt,t)}function Yt(t){return Jt[t]}var Zt={},Qt={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconHtml:void 0,toast:!1,animation:!0,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:void 0,target:"body",backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showCancelButton:!1,preConfirm:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusCancel:!1,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",showLoaderOnConfirm:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,onBeforeOpen:void 0,onOpen:void 0,onRender:void 0,onClose:void 0,onAfterClose:void 0,onDestroy:void 0,scrollbarPadding:!0},$t=["title","titleText","text","html","icon","hideClass","customClass","allowOutsideClick","allowEscapeKey","showConfirmButton","showCancelButton","confirmButtonText","confirmButtonAriaLabel","confirmButtonColor","cancelButtonText","cancelButtonAriaLabel","cancelButtonColor","buttonsStyling","reverseButtons","imageUrl","imageWidth","imageHeight","imageAlt","progressSteps","currentProgressStep"],Jt={animation:'showClass" and "hideClass'},Xt=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusCancel","heightAuto","keydownListenerCapture"],Gt=Object.freeze({isValidParameter:Kt,isUpdatableParameter:function(t){return-1!==$t.indexOf(t)},isDeprecatedParameter:Yt,argsToParams:function(o){var i={};return"object"!==r(o[0])||y(o[0])?["title","html","icon"].forEach(function(t,e){var n=o[e];"string"==typeof n||y(n)?i[t]=n:void 0!==n&&v("Unexpected type of ".concat(t,'! Expected "string" or "Element", got ').concat(r(n)))}):s(i,o[0]),i},isVisible:function(){return mt(Y())},clickConfirm:Mt,clickCancel:function(){return E()&&E().click()},getContainer:K,getPopup:Y,getTitle:k,getContent:x,getHtmlContainer:function(){return e(z["html-container"])},getImage:P,getIcon:C,getIcons:n,getCloseButton:I,getActions:O,getConfirmButton:S,getCancelButton:E,getHeader:T,getFooter:L,getTimerProgressBar:q,getFocusableElements:j,getValidationMessage:B,isLoading:function(){return Y().hasAttribute("data-loading")},fire:function(){for(var t=arguments.length,e=new Array(t),n=0;nwindow.innerHeight&&(Q.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(Q.previousBodyPadding+function(){var t=document.createElement("div");t.className=z["scrollbar-measure"],document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e}(),"px"))}function ne(){return!!window.MSInputMethodContext&&!!document.documentMode}function oe(){var t=K(),e=Y();t.style.removeProperty("align-items"),e.offsetTop<0&&(t.style.alignItems="flex-start")}var ie=function(){var e,t=K();t.ontouchstart=function(t){e=re(t.target)},t.ontouchmove=function(t){e&&(t.preventDefault(),t.stopPropagation())}},re=function(t){var e=K();return t===e||!(ot(e)||"INPUT"===t.tagName||ot(x())&&x().contains(t))},ae={swalPromiseResolve:new WeakMap};function ce(t,e,n,o){n?le(t,o):(Ft().then(function(){return le(t,o)}),Zt.keydownTarget.removeEventListener("keydown",Zt.keydownHandler,{capture:Zt.keydownListenerCapture}),Zt.keydownHandlerAdded=!1),e.parentNode&&!document.body.getAttribute("data-swal2-queue-step")&&e.parentNode.removeChild(e),M()&&(null!==Q.previousBodyPadding&&(document.body.style.paddingRight="".concat(Q.previousBodyPadding,"px"),Q.previousBodyPadding=null),function(){if(R(document.body,z.iosfix)){var t=parseInt(document.body.style.top,10);pt(document.body,z.iosfix),document.body.style.top="",document.body.scrollTop=-1*t}}(),"undefined"!=typeof window&&ne()&&window.removeEventListener("resize",oe),h(document.body.children).forEach(function(t){t.hasAttribute("data-previous-aria-hidden")?(t.setAttribute("aria-hidden",t.getAttribute("data-previous-aria-hidden")),t.removeAttribute("data-previous-aria-hidden")):t.removeAttribute("aria-hidden")})),pt([document.documentElement,document.body],[z.shown,z["height-auto"],z["no-backdrop"],z["toast-shown"],z["toast-column"]])}function se(t){var e=Y();if(e){var n=xt.innerParams.get(this);if(n&&!R(e,n.hideClass.popup)){var o=ae.swalPromiseResolve.get(this);pt(e,n.showClass.popup),dt(e,n.hideClass.popup);var i=K();pt(i,n.showClass.backdrop),dt(i,n.hideClass.backdrop),function(t,e,n){var o=K(),i=yt&&it(e),r=n.onClose,a=n.onAfterClose;if(r!==null&&typeof r==="function"){r(e)}if(i){ue(t,e,o,a)}else{ce(t,o,Z(),a)}}(this,e,n),o(t||{})}}}var ue=function(t,e,n,o){Zt.swalCloseEventFinishedCallback=ce.bind(null,t,n,Z(),o),e.addEventListener(yt,function(t){t.target===e&&(Zt.swalCloseEventFinishedCallback(),delete Zt.swalCloseEventFinishedCallback)})},le=function(t,e){setTimeout(function(){"function"==typeof e&&e(),t._destroy()})};function de(t,e,n){var o=xt.domCache.get(t);e.forEach(function(t){o[t].disabled=n})}function pe(t,e){if(!t)return!1;if("radio"===t.type)for(var n=t.parentNode.parentNode.querySelectorAll("input"),o=0;o")),gt(t)}function ge(t){var e=K(),n=Y();"function"==typeof t.onBeforeOpen&&t.onBeforeOpen(n),Se(e,n,t),Ae(e,n),M()&&Be(e,t.scrollbarPadding),Z()||Zt.previousActiveElement||(Zt.previousActiveElement=document.activeElement),"function"==typeof t.onOpen&&setTimeout(function(){return t.onOpen(n)}),pt(e,z["no-transition"])}function ve(t){var e=Y();if(t.target===e){var n=K();e.removeEventListener(yt,ve),n.style.overflowY="auto"}}function be(t,e){"select"===e.input||"radio"===e.input?Le(t,e):-1!==["text","email","number","tel","textarea"].indexOf(e.input)&&b(e.inputValue)&&qe(t,e)}function ye(t,e){t.disableButtons(),e.input?Me(t,e):Ve(t,e,!0)}function we(t,e){t.disableButtons(),e(F.cancel)}function Ce(t,e){t.closePopup({value:e})}function ke(e,t,n,o){t.keydownTarget&&t.keydownHandlerAdded&&(t.keydownTarget.removeEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!1),n.toast||(t.keydownHandler=function(t){return De(e,t,o)},t.keydownTarget=n.keydownListenerCapture?window:Y(),t.keydownListenerCapture=n.keydownListenerCapture,t.keydownTarget.addEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!0)}function xe(t,e,n){var o=j(),i=0;if(i