!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 lt(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
    \n \n').replace(/(^|\n)\s*/g,""),kt=function(t){var e,n,o,i,r,a,s,c,u,l,d,p,f,m,h,g=!!(e=C())&&(e.parentNode.removeChild(e),yt([document.documentElement,document.body],[J["no-backdrop"],J["toast-shown"],J["has-column"]]),!0);pt()?Y("SweetAlert2 requires document to initialize"):((n=document.createElement("div")).className=J.container,g&&vt(n,J["no-transition"]),_(n,Ct),(o="string"==typeof(i=t.target)?document.querySelector(i):i).appendChild(n),r=t,(a=x()).setAttribute("role",r.toast?"alert":"dialog"),a.setAttribute("aria-live",r.toast?"polite":"assertive"),r.toast||a.setAttribute("aria-modal","true"),s=o,"rtl"===window.getComputedStyle(s).direction&&vt(C(),J.rtl),c=P(),u=bt(c,J.input),l=bt(c,J.file),d=c.querySelector(".".concat(J.range," input")),p=c.querySelector(".".concat(J.range," output")),f=bt(c,J.select),m=c.querySelector(".".concat(J.checkbox," input")),h=bt(c,J.textarea),u.oninput=ft,l.onchange=ft,f.onchange=ft,m.onchange=ft,h.oninput=ft,d.oninput=function(t){ft(t),p.value=d.value},d.onchange=function(t){ft(t),d.nextSibling.value=d.value})},xt=function(t,e){t.jquery?Bt(e,t):_(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))},At=function(){if(pt())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 Pt(t,e,n){var o;ct(t,n["show".concat((o=e).charAt(0).toUpperCase()+o.slice(1),"Button")],"inline-block"),_(t,n["".concat(e,"ButtonText")]),t.setAttribute("aria-label",n["".concat(e,"ButtonAriaLabel")]),t.className=J[e],z(t,n,"".concat(e,"Button")),vt(t,n["".concat(e,"ButtonClass")])}function Et(t,e){var n,o,i,r,a,s,c,u,l=C();l&&(n=l,"string"==typeof(o=e.backdrop)?n.style.background=o:o||vt([document.documentElement,document.body],J["no-backdrop"]),!e.backdrop&&e.allowOutsideClick&&K('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),i=l,(r=e.position)in J?vt(i,J[r]):(K('The "position" parameter is not valid, defaulting to "center"'),vt(i,J.center)),a=l,!(s=e.grow)||"string"!=typeof s||(c="grow-".concat(s))in J&&vt(a,J[c]),z(l,e,"container"),(u=document.body.getAttribute("data-swal2-queue-step"))&&(l.setAttribute("data-queue-step",u),document.body.removeAttribute("data-swal2-queue-step")))}function St(t,e){t.placeholder&&!e.inputPlaceholder||(t.placeholder=e.inputPlaceholder)}function Ot(t,e,n){var o,i;n.inputLabel&&(t.id=J.input,o=document.createElement("label"),i=J["input-label"],o.setAttribute("for",t.id),o.className=i,o.innerText=n.inputLabel,e.insertAdjacentElement("beforebegin",o))}var Tt={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap},Lt=["input","file","range","select","radio","checkbox","textarea"],Dt=function(t){if(!Mt[t.input])return Y('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(t.input,'"'));var e=It(t.input),n=Mt[t.input](e,t);rt(n),setTimeout(function(){nt(n)})},qt=function(t,e){var n=et(P(),t);if(n)for(var o in!function(t){for(var e=0;e=c.progressSteps.length&&K("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),c.progressSteps.forEach(function(t,e){var n,o,i,r,a,s=(n=t,o=document.createElement("li"),vt(o,J["progress-step"]),_(o,n),o);u.appendChild(s),e===l&&vt(s,J["active-progress-step"]),e!==c.progressSteps.length-1&&(r=c,a=document.createElement("li"),vt(a,J["progress-step-line"]),r.progressStepsDistance&&(a.style.width=r.progressStepsDistance),i=a,u.appendChild(i))})}function Nt(t,e){var n,o,i,r,a,s,c,u,l=I();z(l,e,"header"),Ht(0,e),n=t,o=e,(r=Tt.innerParams.get(n))&&o.icon===r.icon&&B()?zt(B(),o):(Ft(),o.icon&&(-1!==Object.keys(X).indexOf(o.icon)?(i=k(".".concat(J.icon,".").concat(X[o.icon])),rt(i),Kt(i,o),zt(i,o),vt(i,o.showClass.icon)):Y('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(o.icon,'"')))),function(t){var e=E();if(!t.imageUrl)return at(e);rt(e,""),e.setAttribute("src",t.imageUrl),e.setAttribute("alt",t.imageAlt),it(e,"width",t.imageWidth),it(e,"height",t.imageHeight),e.className=J.image,z(e,t,"image")}(e),a=e,s=A(),ct(s,a.title||a.titleText),a.title&&mt(a.title,s),a.titleText&&(s.innerText=a.titleText),z(s,a,"title"),c=e,u=R(),_(u,c.closeButtonHtml),z(u,c,"closeButton"),ct(u,c.showCloseButton),u.setAttribute("aria-label",c.closeButtonAriaLabel)}function Ut(t,e){var n,o,i,r;n=e,o=x(),it(o,"width",n.width),it(o,"padding",n.padding),n.background&&(o.style.background=n.background),$t(o,n),Et(0,e),Nt(t,e),Vt(t,e),ht(0,e),i=e,r=M(),ct(r,i.footer),i.footer&&mt(i.footer,r),z(r,i,"footer"),"function"==typeof e.didRender?e.didRender(x()):"function"==typeof e.onRender&&e.onRender(x())}function _t(){return T()&&T().click()}var Ft=function(){for(var t=n(),e=0;e\n \n
    \n
    \n '):"error"===e.icon?_(t,'\n \n \n \n \n '):_(t,Zt({question:"?",warning:"!",info:"i"}[e.icon]))},Yt=function(t,e){if(e.iconColor){t.style.color=e.iconColor,t.style.borderColor=e.iconColor;for(var n=0,o=[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"];n').concat(t,"")},Qt=[],$t=function(t,e){t.className="".concat(J.popup," ").concat(wt(t)?e.showClass.popup:""),e.toast?(vt([document.documentElement,document.body],J["toast-shown"]),vt(t,J.toast)):vt(t,J.modal),z(t,e,"popup"),"string"==typeof e.customClass&&vt(t,e.customClass),e.icon&&vt(t,J["icon-".concat(e.icon)])};function Jt(){var t=x();t||wn.fire(),t=x();var e=j(),n=T(),o=D();rt(e),at(n),vt([t,e],J.loading),rt(o),t.setAttribute("data-loading",!0),t.setAttribute("aria-busy",!0),t.focus()}function Xt(){return new Promise(function(t){var e=window.scrollX,n=window.scrollY;ie.restoreFocusTimeout=setTimeout(function(){ie.previousActiveElement&&ie.previousActiveElement.focus?(ie.previousActiveElement.focus(),ie.previousActiveElement=null):document.body&&document.body.focus(),t()},100),void 0!==e&&void 0!==n&&window.scrollTo(e,n)})}function Gt(){if(ie.timeout)return function(){var t=V(),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,"%")}(),ie.timeout.stop()}function te(){if(ie.timeout){var t=ie.timeout.start();return dt(t),t}}function ee(t){return Object.prototype.hasOwnProperty.call(re,t)}function ne(t){return se[t]}function oe(t){for(var e in t)ee(i=e)||K('Unknown parameter "'.concat(i,'"')),t.toast&&(o=e,-1!==ce.indexOf(o)&&K('The parameter "'.concat(o,'" is incompatible with toasts'))),ne(n=e)&&g(n,ne(n));var n,o,i}var ie={},re={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor: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,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",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:"",inputLabel:"",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,willOpen:void 0,didOpen:void 0,onRender:void 0,didRender:void 0,onClose:void 0,onAfterClose:void 0,willClose:void 0,didClose:void 0,onDestroy:void 0,didDestroy:void 0,scrollbarPadding:!0},ae=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","imageAlt","imageHeight","imageUrl","imageWidth","onAfterClose","onClose","onDestroy","progressSteps","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],se={animation:'showClass" and "hideClass',onBeforeOpen:"willOpen",onOpen:"didOpen",onRender:"didRender",onClose:"willClose",onAfterClose:"didClose",onDestroy:"didDestroy"},ce=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","heightAuto","keydownListenerCapture"],ue=Object.freeze({isValidParameter:ee,isUpdatableParameter:function(t){return-1!==ae.indexOf(t)},isDeprecatedParameter:ne,argsToParams:function(o){var i={};return"object"!==r(o[0])||w(o[0])?["title","html","icon"].forEach(function(t,e){var n=o[e];"string"==typeof n||w(n)?i[t]=n:void 0!==n&&Y("Unexpected type of ".concat(t,'! Expected "string" or "Element", got ').concat(r(n)))}):c(i,o[0]),i},isVisible:function(){return wt(x())},clickConfirm:_t,clickDeny:function(){return L()&&L().click()},clickCancel:function(){return q()&&q().click()},getContainer:C,getPopup:x,getTitle:A,getContent:P,getHtmlContainer:function(){return e(J["html-container"])},getImage:E,getIcon:B,getIcons:n,getInputLabel:function(){return e(J["input-label"])},getCloseButton:R,getActions:j,getConfirmButton:T,getDenyButton:L,getCancelButton:q,getHeader:I,getFooter:M,getTimerProgressBar:V,getFocusableElements:H,getValidationMessage:O,isLoading:U,fire:function(){for(var t=arguments.length,e=new Array(t),n=0;nwindow.innerHeight&&(tt.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(tt.previousBodyPadding+function(){var t=document.createElement("div");t.className=J["scrollbar-measure"],document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e}(),"px"))}function pe(){return!!window.MSInputMethodContext&&!!document.documentMode}function fe(){var t=C(),e=x();t.style.removeProperty("align-items"),e.offsetTop<0&&(t.style.alignItems="flex-start")}var me=function(){navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i)||x().scrollHeight>window.innerHeight-44&&(C().style.paddingBottom="".concat(44,"px"))},he=function(){var e,t=C();t.ontouchstart=function(t){e=ge(t)},t.ontouchmove=function(t){e&&(t.preventDefault(),t.stopPropagation())}},ge=function(t){var e=t.target,n=C();return(!t.touches||!t.touches.length||"stylus"!==t.touches[0].touchType)&&(e===n||!(ut(n)||"INPUT"===e.tagName||ut(P())&&P().contains(e)))},ve={swalPromiseResolve:new WeakMap};function ye(t,e,n,o){var i;n?ke(t,o):(Xt().then(function(){return ke(t,o)}),ie.keydownTarget.removeEventListener("keydown",ie.keydownHandler,{capture:ie.keydownListenerCapture}),ie.keydownHandlerAdded=!1),e.parentNode&&!document.body.getAttribute("data-swal2-queue-step")&&e.parentNode.removeChild(e),N()&&(null!==tt.previousBodyPadding&&(document.body.style.paddingRight="".concat(tt.previousBodyPadding,"px"),tt.previousBodyPadding=null),F(document.body,J.iosfix)&&(i=parseInt(document.body.style.top,10),yt(document.body,J.iosfix),document.body.style.top="",document.body.scrollTop=-1*i),"undefined"!=typeof window&&pe()&&window.removeEventListener("resize",fe),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")})),yt([document.documentElement,document.body],[J.shown,J["height-auto"],J["no-backdrop"],J["toast-shown"],J["toast-column"]])}function be(t){var e,n,o,i=x();i&&(t=function(t){return void 0!==t?c({isConfirmed:!1,isDenied:!1,isDismissed:!1},t):{isConfirmed:!1,isDenied:!1,isDismissed:!0}}(t),(e=Tt.innerParams.get(this))&&!F(i,e.hideClass.popup)&&(n=ve.swalPromiseResolve.get(this),yt(i,e.showClass.popup),vt(i,e.hideClass.popup),o=C(),yt(o,e.showClass.backdrop),vt(o,e.hideClass.backdrop),function(t,e,n){var o=C(),i=At&<(e),r=n.onClose,a=n.onAfterClose,s=n.willClose,c=n.didClose;if(we(e,s,r),i){Ce(t,e,o,c||a)}else{ye(t,o,G(),c||a)}}(this,i,e),n(t)))}var we=function(t,e,n){null!==e&&"function"==typeof e?e(t):null!==n&&"function"==typeof n&&n(t)},Ce=function(t,e,n,o){ie.swalCloseEventFinishedCallback=ye.bind(null,t,n,G(),o),e.addEventListener(At,function(t){t.target===e&&(ie.swalCloseEventFinishedCallback(),delete ie.swalCloseEventFinishedCallback)})},ke=function(t,e){setTimeout(function(){"function"==typeof e&&e(),t._destroy()})};function xe(t,e,n){var o=Tt.domCache.get(t);e.forEach(function(t){o[t].disabled=n})}function Be(t,e){if(!t)return!1;if("radio"===t.type)for(var n=t.parentNode.parentNode.querySelectorAll("input"),o=0;o")),kt(t)}function Se(t){var e=C(),n=x();"function"==typeof t.willOpen?t.willOpen(n):"function"==typeof t.onBeforeOpen&&t.onBeforeOpen(n);var o=window.getComputedStyle(document.body).overflowY;Ue(e,n,t),setTimeout(function(){He(e,n)},10),N()&&(Ne(e,t.scrollbarPadding,o),h(document.body.children).forEach(function(t){t===C()||function(t,e){if("function"==typeof t.contains)return t.contains(e)}(t,C())||(t.hasAttribute("aria-hidden")&&t.setAttribute("data-previous-aria-hidden",t.getAttribute("aria-hidden")),t.setAttribute("aria-hidden","true"))})),G()||ie.previousActiveElement||(ie.previousActiveElement=document.activeElement),Re(n,t),yt(e,J["no-transition"])}function Oe(t){var e,n=x();t.target===n&&(e=C(),n.removeEventListener(At,Oe),e.style.overflowY="auto")}function Te(t,e){"select"===e.input||"radio"===e.input?We(t,e):-1!==["text","email","number","tel","textarea"].indexOf(e.input)&&(v(e.inputValue)||b(e.inputValue))&&Ke(t,e)}function Le(t,e){t.disableButtons(),e.input?Qe(t,e):Je(t,e,!0)}function De(t){t.disableButtons(),$e(t)}function qe(t,e){t.disableButtons(),e($.cancel)}function je(t,e){t.closePopup({isConfirmed:!0,value:e})}function Ie(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 en(e,t,o)},t.keydownTarget=n.keydownListenerCapture?window:x(),t.keydownListenerCapture=n.keydownListenerCapture,t.keydownTarget.addEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!0)}function Me(t,e,n){var o=H(),i=0;if(i