!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Sweetalert2=t()}(this,function(){"use strict";var e={title:"",titleText:"",text:"",html:"",footer:"",type:null,toast:!1,customClass:"",target:"body",backdrop:!0,animation:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,showConfirmButton:!0,showCancelButton:!1,preConfirm:null,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:null,confirmButtonClass:null,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:null,cancelButtonClass:null,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusCancel:!1,showCloseButton:!1,closeButtonAriaLabel:"Close this dialog",showLoaderOnConfirm:!1,imageUrl:null,imageWidth:null,imageHeight:null,imageAlt:"",imageClass:null,timer:null,width:null,padding:null,background:null,input:null,inputPlaceholder:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputClass:null,inputAttributes:{},inputValidator:null,grow:!1,position:"center",progressSteps:[],currentProgressStep:null,progressStepsDistance:null,onBeforeOpen:null,onOpen:null,onClose:null,useRejections:!1,expectRejections:!1},t=["useRejections","expectRejections"],n=function(e){var t={};for(var n in e)t[e[n]]="swal2-"+e[n];return t},o=n(["container","shown","iosfix","popup","modal","no-backdrop","toast","toast-shown","fade","show","hide","noanimation","close","title","header","content","actions","confirm","cancel","footer","icon","image","input","has-input","file","range","select","radio","checkbox","textarea","inputerror","validationerror","progresssteps","activeprogressstep","progresscircle","progressline","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen"]),i=n(["success","warning","info","question","error"]),r="SweetAlert2:",a=function(e){console.warn(r+" "+e)},s=function(e){console.error(r+" "+e)},l=[],u=function(e){-1===l.indexOf(e)&&(l.push(e),a(e))},c=function(e){return"function"==typeof e?e():e},d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p=Object.assign||function(e){for(var t=1;t\n
\n \n
\n \n
\n
?
\n
!
\n
i
\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,""),h=function(){return document.body.querySelector("."+o.container)},y=function(){return h()?h().querySelector("."+o.popup):null},w=function(e){return h()?h().querySelector("."+e):null},C=function(){return w(o.title)},x=function(){return w(o.content)},k=function(){return w(o.image)},A=function(){return w(o.progresssteps)},S=function(){return w(o.validationerror)},B=function(){return w(o.confirm)},P=function(){return w(o.cancel)},E=function(){return w(o.actions)},L=function(){return w(o.footer)},T=function(){return w(o.close)},V=function(){var e=Array.prototype.slice.call(y().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort(function(e,t){return(e=parseInt(e.getAttribute("tabindex")))>(t=parseInt(t.getAttribute("tabindex")))?1:e")),"string"==typeof e.backdrop?h().style.background=e.backdrop:e.backdrop||D([document.documentElement,document.body],o["no-backdrop"]),e.html?O(e.html,f):e.text?(f.textContent=e.text,I(f)):U(f),e.position in o?D(d,o[e.position]):(a('The "position" parameter is not valid, defaulting to "center"'),D(d,o.center)),e.grow&&"string"==typeof e.grow){var V="grow-"+e.grow;V in o&&D(d,o[V])}"function"==typeof e.animation&&(e.animation=e.animation.call()),e.showCloseButton?(w.setAttribute("aria-label",e.closeButtonAriaLabel),I(w)):U(w),t.className=o.popup,e.toast?(D([document.documentElement,document.body],o["toast-shown"]),D(t,o.toast)):D(t,o.modal),e.customClass&&D(t,e.customClass);var q=A(),j=parseInt(null===e.currentProgressStep?X.getQueueStep():e.currentProgressStep,10);e.progressSteps&&e.progressSteps.length?(I(q),function(e){for(;e.firstChild;)e.removeChild(e.firstChild)}(q),j>=e.progressSteps.length&&a("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),e.progressSteps.forEach(function(t,n){var i=document.createElement("li");if(D(i,o.progresscircle),i.innerHTML=t,n===j&&D(i,o.activeprogressstep),q.appendChild(i),n!==e.progressSteps.length-1){var r=document.createElement("li");D(r,o.progressline),e.progressStepsDistance&&(r.style.width=e.progressStepsDistance),q.appendChild(r)}})):U(q);for(var R=y().querySelectorAll("."+o.icon),N=0;Nwindow.innerHeight&&(m.previousBodyPadding=document.body.style.paddingRight,document.body.style.paddingRight=function(){if("ontouchstart"in window||navigator.msMaxTouchPoints)return 0;var e=document.createElement("div");e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}()+"px")},J=function(){if(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&!j(document.body,o.iosfix)){var e=document.body.scrollTop;document.body.style.top=-1*e+"px",D(document.body,o.iosfix)}},X=function e(){for(var t=arguments.length,n=Array(t),i=0;i