wp-plugin-cloudflare-cache/assets/js/sweetalert2.min.js

1 line
40 KiB
JavaScript

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Sweetalert2=t()}(this,(function(){"use strict";const e={},t=t=>new Promise((n=>{if(!t)return n();const o=window.scrollX,i=window.scrollY;e.restoreFocusTimeout=setTimeout((()=>{e.previousActiveElement instanceof HTMLElement?(e.previousActiveElement.focus(),e.previousActiveElement=null):document.body&&document.body.focus(),n()}),100),window.scrollTo(o,i)}));var n={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const o="swal2-",i=["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","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","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"].reduce(((e,t)=>(e[t]=o+t,e)),{}),s=["success","warning","info","question","error"].reduce(((e,t)=>(e[t]=o+t,e)),{}),r=e=>e.charAt(0).toUpperCase()+e.slice(1),a=[],l=(e,t)=>{var n;n=`"${e}" is deprecated and will be removed in the next major release. Please use "${t}" instead.`,a.includes(n)||a.push(n)},c=e=>"function"==typeof e?e():e,u=e=>e&&"function"==typeof e.toPromise,d=e=>u(e)?e.toPromise():Promise.resolve(e),p=e=>e&&Promise.resolve(e)===e,m=()=>document.body.querySelector(`.${i.container}`),g=e=>{const t=m();return t?t.querySelector(e):null},h=e=>g(`.${e}`),f=()=>h(i.popup),b=()=>h(i.icon),y=()=>h(i.title),w=()=>h(i["html-container"]),v=()=>h(i.image),C=()=>h(i["progress-steps"]),A=()=>h(i["validation-message"]),k=()=>g(`.${i.actions} .${i.confirm}`),B=()=>g(`.${i.actions} .${i.cancel}`),P=()=>g(`.${i.actions} .${i.deny}`),E=()=>g(`.${i.loader}`),x=()=>h(i.actions),T=()=>h(i.footer),$=()=>h(i["timer-progress-bar"]),L=()=>h(i.close),S=()=>{const e=f();if(!e)return[];const t=e.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'),n=Array.from(t).sort(((e,t)=>{const n=parseInt(e.getAttribute("tabindex")||"0"),o=parseInt(t.getAttribute("tabindex")||"0");return n>o?1:n<o?-1:0})),o=e.querySelectorAll('\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex="0"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n'),i=Array.from(o).filter((e=>"-1"!==e.getAttribute("tabindex")));return[...new Set(n.concat(i))].filter((e=>Y(e)))},O=()=>H(document.body,i.shown)&&!H(document.body,i["toast-shown"])&&!H(document.body,i["no-backdrop"]),M=()=>{const e=f();return!!e&&H(e,i.toast)},j=(e,t)=>{if(e.textContent="",t){const n=(new DOMParser).parseFromString(t,"text/html"),o=n.querySelector("head");o&&Array.from(o.childNodes).forEach((t=>{e.appendChild(t)}));const i=n.querySelector("body");i&&Array.from(i.childNodes).forEach((t=>{t instanceof HTMLVideoElement||t instanceof HTMLAudioElement?e.appendChild(t.cloneNode(!0)):e.appendChild(t)}))}},H=(e,t)=>{if(!t)return!1;const n=t.split(/\s+/);for(let t=0;t<n.length;t++)if(!e.classList.contains(n[t]))return!1;return!0},I=(e,t,n)=>{if(((e,t)=>{Array.from(e.classList).forEach((n=>{Object.values(i).includes(n)||Object.values(s).includes(n)||Object.values(t.showClass||{}).includes(n)||e.classList.remove(n)}))})(e,t),t.customClass&&t.customClass[n]){if("string"!=typeof t.customClass[n]&&!t.customClass[n].forEach)return void t.customClass[n];N(e,t.customClass[n])}},D=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return e.querySelector(`.${i.popup} > .${i[t]}`);case"checkbox":return e.querySelector(`.${i.popup} > .${i.checkbox} input`);case"radio":return e.querySelector(`.${i.popup} > .${i.radio} input:checked`)||e.querySelector(`.${i.popup} > .${i.radio} input:first-child`);case"range":return e.querySelector(`.${i.popup} > .${i.range} input`);default:return e.querySelector(`.${i.popup} > .${i.input}`)}},V=e=>{if(e.focus(),"file"!==e.type){const t=e.value;e.value="",e.value=t}},q=(e,t,n)=>{e&&t&&("string"==typeof t&&(t=t.split(/\s+/).filter(Boolean)),t.forEach((t=>{Array.isArray(e)?e.forEach((e=>{n?e.classList.add(t):e.classList.remove(t)})):n?e.classList.add(t):e.classList.remove(t)})))},N=(e,t)=>{q(e,t,!0)},F=(e,t)=>{q(e,t,!1)},_=(e,t)=>{const n=Array.from(e.children);for(let e=0;e<n.length;e++){const o=n[e];if(o instanceof HTMLElement&&H(o,t))return o}},R=(e,t,n)=>{n===`${parseInt(n)}`&&(n=parseInt(n)),n||0===parseInt(n)?e.style[t]="number"==typeof n?`${n}px`:n:e.style.removeProperty(t)},W=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"flex";e&&(e.style.display=t)},z=e=>{e&&(e.style.display="none")},K=(e,t,n,o)=>{const i=e.querySelector(t);i&&(i.style[n]=o)},U=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"flex";t?W(e,n):z(e)},Y=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),Z=e=>!!(e.scrollHeight>e.clientHeight),X=e=>{const t=window.getComputedStyle(e),n=parseFloat(t.getPropertyValue("animation-duration")||"0"),o=parseFloat(t.getPropertyValue("transition-duration")||"0");return n>0||o>0},G=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=$();Y(n)&&(t&&(n.style.transition="none",n.style.width="100%"),setTimeout((()=>{n.style.transition=`width ${e/1e3}s linear`,n.style.width="0%"}),10))},J=()=>"undefined"==typeof window||"undefined"==typeof document,Q=`\n <div aria-labelledby="${i.title}" aria-describedby="${i["html-container"]}" class="${i.popup}" tabindex="-1">\n <button type="button" class="${i.close}"></button>\n <ul class="${i["progress-steps"]}"></ul>\n <div class="${i.icon}"></div>\n <img class="${i.image}" />\n <h2 class="${i.title}" id="${i.title}"></h2>\n <div class="${i["html-container"]}" id="${i["html-container"]}"></div>\n <input class="${i.input}" id="${i.input}" />\n <input type="file" class="${i.file}" />\n <div class="${i.range}">\n <input type="range" />\n <output></output>\n </div>\n <select class="${i.select}" id="${i.select}"></select>\n <div class="${i.radio}"></div>\n <label class="${i.checkbox}">\n <input type="checkbox" id="${i.checkbox}" />\n <span class="${i.label}"></span>\n </label>\n <textarea class="${i.textarea}" id="${i.textarea}"></textarea>\n <div class="${i["validation-message"]}" id="${i["validation-message"]}"></div>\n <div class="${i.actions}">\n <div class="${i.loader}"></div>\n <button type="button" class="${i.confirm}"></button>\n <button type="button" class="${i.deny}"></button>\n <button type="button" class="${i.cancel}"></button>\n </div>\n <div class="${i.footer}"></div>\n <div class="${i["timer-progress-bar-container"]}">\n <div class="${i["timer-progress-bar"]}"></div>\n </div>\n </div>\n`.replace(/(^|\n)\s*/g,""),ee=()=>{e.currentInstance.resetValidationMessage()},te=e=>{const t=(()=>{const e=m();return!!e&&(e.remove(),F([document.documentElement,document.body],[i["no-backdrop"],i["toast-shown"],i["has-column"]]),!0)})();if(J())return;const n=document.createElement("div");n.className=i.container,t&&N(n,i["no-transition"]),j(n,Q);const o="string"==typeof(s=e.target)?document.querySelector(s):s;var s;o.appendChild(n),(e=>{const t=f();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")})(e),(e=>{"rtl"===window.getComputedStyle(e).direction&&N(m(),i.rtl)})(o),(()=>{const e=f(),t=_(e,i.input),n=_(e,i.file),o=e.querySelector(`.${i.range} input`),s=e.querySelector(`.${i.range} output`),r=_(e,i.select),a=e.querySelector(`.${i.checkbox} input`),l=_(e,i.textarea);t.oninput=ee,n.onchange=ee,r.onchange=ee,a.onchange=ee,l.oninput=ee,o.oninput=()=>{ee(),s.value=o.value},o.onchange=()=>{ee(),s.value=o.value}})()},ne=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?oe(e,t):e&&j(t,e)},oe=(e,t)=>{e.jquery?ie(t,e):j(t,e.toString())},ie=(e,t)=>{if(e.textContent="",0 in t)for(let n=0;n in t;n++)e.appendChild(t[n].cloneNode(!0));else e.appendChild(t.cloneNode(!0))},se=(()=>{if(J())return!1;const e=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",animation:"animationend"};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&void 0!==e.style[n])return t[n];return!1})(),re=(e,t)=>{const n=x(),o=E();n&&o&&(t.showConfirmButton||t.showDenyButton||t.showCancelButton?W(n):z(n),I(n,t,"actions"),function(e,t,n){const o=k(),s=P(),r=B();if(!o||!s||!r)return;ae(o,"confirm",n),ae(s,"deny",n),ae(r,"cancel",n),function(e,t,n,o){if(!o.buttonsStyling)return void F([e,t,n],i.styled);N([e,t,n],i.styled),o.confirmButtonColor&&(e.style.backgroundColor=o.confirmButtonColor,N(e,i["default-outline"]));o.denyButtonColor&&(t.style.backgroundColor=o.denyButtonColor,N(t,i["default-outline"]));o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor,N(n,i["default-outline"]))}(o,s,r,n),n.reverseButtons&&(n.toast?(e.insertBefore(r,o),e.insertBefore(s,o)):(e.insertBefore(r,t),e.insertBefore(s,t),e.insertBefore(o,t)))}(n,o,t),j(o,t.loaderHtml||""),I(o,t,"loader"))};function ae(e,t,n){const o=r(t);U(e,n[`show${o}Button`],"inline-block"),j(e,n[`${t}ButtonText`]||""),e.setAttribute("aria-label",n[`${t}ButtonAriaLabel`]||""),e.className=i[t],I(e,n,`${t}Button`)}const le=(e,t)=>{const n=m();n&&(!function(e,t){"string"==typeof t?e.style.background=t:t||N([document.documentElement,document.body],i["no-backdrop"])}(n,t.backdrop),function(e,t){if(!t)return;N(e,t in i?i[t]:i.center)}(n,t.position),function(e,t){if(!t)return;N(e,i[`grow-${t}`])}(n,t.grow),I(n,t,"container"))};const ce=["input","file","range","select","radio","checkbox","textarea"],ue=e=>{if(!be[e.input])return void e.input;const t=he(e.input),n=be[e.input](t,e);W(t),e.inputAutoFocus&&setTimeout((()=>{V(n)}))},de=(e,t)=>{const n=D(f(),e);if(n){(e=>{for(let t=0;t<e.attributes.length;t++){const n=e.attributes[t].name;["id","type","value","style"].includes(n)||e.removeAttribute(n)}})(n);for(const e in t)n.setAttribute(e,t[e])}},pe=e=>{const t=he(e.input);"object"==typeof e.customClass&&N(t,e.customClass.input)},me=(e,t)=>{e.placeholder&&!t.inputPlaceholder||(e.placeholder=t.inputPlaceholder)},ge=(e,t,n)=>{if(n.inputLabel){const o=document.createElement("label"),s=i["input-label"];o.setAttribute("for",e.id),o.className=s,"object"==typeof n.customClass&&N(o,n.customClass.inputLabel),o.innerText=n.inputLabel,t.insertAdjacentElement("beforebegin",o)}},he=e=>_(f(),i[e]||i.input),fe=(e,t)=>{["string","number"].includes(typeof t)?e.value=`${t}`:p(t)},be={};be.text=be.email=be.password=be.number=be.tel=be.url=(e,t)=>(fe(e,t.inputValue),ge(e,e,t),me(e,t),e.type=t.input,e),be.file=(e,t)=>(ge(e,e,t),me(e,t),e),be.range=(e,t)=>{const n=e.querySelector("input"),o=e.querySelector("output");return fe(n,t.inputValue),n.type=t.input,fe(o,t.inputValue),ge(n,e,t),e},be.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const n=document.createElement("option");j(n,t.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return ge(e,e,t),e},be.radio=e=>(e.textContent="",e),be.checkbox=(e,t)=>{const n=D(f(),"checkbox");n.value="1",n.checked=Boolean(t.inputValue);const o=e.querySelector("span");return j(o,t.inputPlaceholder),n},be.textarea=(e,t)=>{fe(e,t.inputValue),me(e,t),ge(e,e,t);return setTimeout((()=>{if("MutationObserver"in window){const n=parseInt(window.getComputedStyle(f()).width);new MutationObserver((()=>{if(!document.body.contains(e))return;const o=e.offsetWidth+(i=e,parseInt(window.getComputedStyle(i).marginLeft)+parseInt(window.getComputedStyle(i).marginRight));var i;o>n?f().style.width=`${o}px`:R(f(),"width",t.width)})).observe(e,{attributes:!0,attributeFilter:["style"]})}})),e};const ye=(e,t)=>{const o=w();o&&(I(o,t,"htmlContainer"),t.html?(ne(t.html,o),W(o,"block")):t.text?(o.textContent=t.text,W(o,"block")):z(o),((e,t)=>{const o=f(),s=n.innerParams.get(e),r=!s||t.input!==s.input;ce.forEach((e=>{const n=_(o,i[e]);de(e,t.inputAttributes),n.className=i[e],r&&z(n)})),t.input&&(r&&ue(t),pe(t))})(e,t))},we=(e,t)=>{for(const[n,o]of Object.entries(s))t.icon!==n&&F(e,o);N(e,t.icon&&s[t.icon]),Ae(e,t),ve(),I(e,t,"icon")},ve=()=>{const e=f();if(!e)return;const t=window.getComputedStyle(e).getPropertyValue("background-color"),n=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e<n.length;e++)n[e].style.backgroundColor=t},Ce=(e,t)=>{if(!t.icon&&!t.iconHtml)return;let n=e.innerHTML,o="";if(t.iconHtml)o=ke(t.iconHtml);else if("success"===t.icon)o='\n <div class="swal2-success-circular-line-left"></div>\n <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>\n <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>\n <div class="swal2-success-circular-line-right"></div>\n',n=n.replace(/ style=".*?"/g,"");else if("error"===t.icon)o='\n <span class="swal2-x-mark">\n <span class="swal2-x-mark-line-left"></span>\n <span class="swal2-x-mark-line-right"></span>\n </span>\n';else if(t.icon){o=ke({question:"?",warning:"!",info:"i"}[t.icon])}n.trim()!==o.trim()&&j(e,o)},Ae=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])K(e,n,"backgroundColor",t.iconColor);K(e,".swal2-success-ring","borderColor",t.iconColor)}},ke=e=>`<div class="${i["icon-content"]}">${e}</div>`,Be=(e,t)=>{const n=t.showClass||{};e.className=`${i.popup} ${Y(e)?n.popup:""}`,t.toast?(N([document.documentElement,document.body],i["toast-shown"]),N(e,i.toast)):N(e,i.modal),I(e,t,"popup"),"string"==typeof t.customClass&&N(e,t.customClass),t.icon&&N(e,i[`icon-${t.icon}`])},Pe=e=>{const t=document.createElement("li");return N(t,i["progress-step"]),j(t,e),t},Ee=e=>{const t=document.createElement("li");return N(t,i["progress-step-line"]),e.progressStepsDistance&&R(t,"width",e.progressStepsDistance),t},xe=(e,t)=>{((e,t)=>{const n=m(),o=f();if(n&&o){if(t.toast){R(n,"width",t.width),o.style.width="100%";const e=E();e&&o.insertBefore(e,b())}else R(o,"width",t.width);R(o,"padding",t.padding),t.color&&(o.style.color=t.color),t.background&&(o.style.background=t.background),z(A()),Be(o,t)}})(0,t),le(0,t),((e,t)=>{const n=C();if(!n)return;const{progressSteps:o,currentProgressStep:s}=t;o&&0!==o.length&&void 0!==s?(W(n),n.textContent="",o.length,o.forEach(((e,r)=>{const a=Pe(e);if(n.appendChild(a),r===s&&N(a,i["active-progress-step"]),r!==o.length-1){const e=Ee(t);n.appendChild(e)}}))):z(n)})(0,t),((e,t)=>{const o=n.innerParams.get(e),i=b();if(i){if(o&&t.icon===o.icon)return Ce(i,t),void we(i,t);if(t.icon||t.iconHtml){if(t.icon&&-1===Object.keys(s).indexOf(t.icon))return t.icon,void z(i);W(i),Ce(i,t),we(i,t),N(i,t.showClass&&t.showClass.icon)}else z(i)}})(e,t),((e,t)=>{const n=v();n&&(t.imageUrl?(W(n,""),n.setAttribute("src",t.imageUrl),n.setAttribute("alt",t.imageAlt||""),R(n,"width",t.imageWidth),R(n,"height",t.imageHeight),n.className=i.image,I(n,t,"image")):z(n))})(0,t),((e,t)=>{const n=y();n&&(U(n,t.title||t.titleText,"block"),t.title&&ne(t.title,n),t.titleText&&(n.innerText=t.titleText),I(n,t,"title"))})(0,t),((e,t)=>{const n=L();n&&(j(n,t.closeButtonHtml||""),I(n,t,"closeButton"),U(n,t.showCloseButton),n.setAttribute("aria-label",t.closeButtonAriaLabel||""))})(0,t),ye(e,t),re(0,t),((e,t)=>{const n=T();n&&(U(n,t.footer),t.footer&&ne(t.footer,n),I(n,t,"footer"))})(0,t);const o=f();"function"==typeof t.didRender&&o&&t.didRender(o)},Te=()=>k()&&k().click(),$e=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),Le=e=>{e.keydownTarget&&e.keydownHandlerAdded&&(e.keydownTarget.removeEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!1)},Se=(e,t)=>{const n=S();if(n.length)return(e+=t)===n.length?e=0:-1===e&&(e=n.length-1),void n[e].focus();f().focus()},Oe=["ArrowRight","ArrowDown"],Me=["ArrowLeft","ArrowUp"],je=(e,t,o)=>{const i=n.innerParams.get(e);i&&(t.isComposing||229===t.keyCode||(i.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?He(e,t,i):"Tab"===t.key?Ie(t):[...Oe,...Me].includes(t.key)?De(t.key):"Escape"===t.key&&Ve(t,i,o)))},He=(e,t,n)=>{if(c(n.allowEnterKey)&&t.target&&e.getInput()&&t.target instanceof HTMLElement&&t.target.outerHTML===e.getInput().outerHTML){if(["textarea","file"].includes(n.input))return;Te(),t.preventDefault()}},Ie=e=>{const t=e.target,n=S();let o=-1;for(let e=0;e<n.length;e++)if(t===n[e]){o=e;break}e.shiftKey?Se(o,-1):Se(o,1),e.stopPropagation(),e.preventDefault()},De=e=>{const t=[k(),P(),B()];if(document.activeElement instanceof HTMLElement&&!t.includes(document.activeElement))return;const n=Oe.includes(e)?"nextElementSibling":"previousElementSibling";let o=document.activeElement;for(let e=0;e<x().children.length;e++){if(o=o[n],!o)return;if(o instanceof HTMLButtonElement&&Y(o))break}o instanceof HTMLButtonElement&&o.focus()},Ve=(e,t,n)=>{c(t.allowEscapeKey)&&(e.preventDefault(),n($e.esc))};var qe={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const Ne=()=>{Array.from(document.body.children).forEach((e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")||""),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")}))},Fe="undefined"!=typeof window&&!!window.GestureEvent,_e=()=>{const e=m();let t;e.ontouchstart=e=>{t=Re(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},Re=e=>{const t=e.target,n=m();return!We(e)&&!ze(e)&&(t===n||!Z(n)&&t instanceof HTMLElement&&"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&(!Z(w())||!w().contains(t)))},We=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,ze=e=>e.touches&&e.touches.length>1;let Ke=null;const Ue=()=>{null===Ke&&document.body.scrollHeight>window.innerHeight&&(Ke=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${Ke+(()=>{const e=document.createElement("div");e.className=i["scrollbar-measure"],document.body.appendChild(e);const t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})()}px`)};function Ye(n,o,s,r){M()?nt(n,r):(t(s).then((()=>nt(n,r))),Le(e)),Fe?(o.setAttribute("style","display:none !important"),o.removeAttribute("class"),o.innerHTML=""):o.remove(),O()&&(null!==Ke&&(document.body.style.paddingRight=`${Ke}px`,Ke=null),(()=>{if(H(document.body,i.iosfix)){const e=parseInt(document.body.style.top,10);F(document.body,i.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}})(),Ne()),F([document.documentElement,document.body],[i.shown,i["height-auto"],i["no-backdrop"],i["toast-shown"]])}function Ze(e){e=Qe(e);const t=qe.swalPromiseResolve.get(this),n=Xe(this);this.isAwaitingPromise?e.isDismissed||(Je(this),t(e)):n&&t(e)}const Xe=e=>{const t=f();if(!t)return!1;const o=n.innerParams.get(e);if(!o||H(t,o.hideClass.popup))return!1;F(t,o.showClass.popup),N(t,o.hideClass.popup);const i=m();return F(i,o.showClass.backdrop),N(i,o.hideClass.backdrop),et(e,t,o),!0};function Ge(e){const t=qe.swalPromiseReject.get(this);Je(this),t&&t(e)}const Je=e=>{e.isAwaitingPromise&&(delete e.isAwaitingPromise,n.innerParams.get(e)||e._destroy())},Qe=e=>void 0===e?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},e),et=(e,t,n)=>{const o=m(),i=se&&X(t);"function"==typeof n.willClose&&n.willClose(t),i?tt(e,t,o,n.returnFocus,n.didClose):Ye(e,o,n.returnFocus,n.didClose)},tt=(t,n,o,i,s)=>{e.swalCloseEventFinishedCallback=Ye.bind(null,t,o,i,s),n.addEventListener(se,(function(t){t.target===n&&(e.swalCloseEventFinishedCallback(),delete e.swalCloseEventFinishedCallback)}))},nt=(e,t)=>{setTimeout((()=>{"function"==typeof t&&t.bind(e.params)(),e._destroy&&e._destroy()}))},ot=e=>{let t=f();t||new Hn,t=f();const n=E();M()?z(b()):it(t,e),W(n),t.setAttribute("data-loading","true"),t.setAttribute("aria-busy","true"),t.focus()},it=(e,t)=>{const n=x(),o=E();!t&&Y(k())&&(t=k()),W(n),t&&(z(t),o.setAttribute("data-button-to-replace",t.className)),o.parentNode.insertBefore(o,t),N([e,n],i.loading)},st=e=>e.checked?1:0,rt=e=>e.checked?e.value:null,at=e=>e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,lt=(e,t)=>{const n=f(),o=e=>{ut[t.input](n,dt(e),t)};u(t.inputOptions)||p(t.inputOptions)?(ot(k()),d(t.inputOptions).then((t=>{e.hideLoading(),o(t)}))):"object"==typeof t.inputOptions?o(t.inputOptions):t.inputOptions},ct=(e,t)=>{const n=e.getInput();z(n),d(t.inputValue).then((o=>{n.value="number"===t.input?`${parseFloat(o)||0}`:`${o}`,W(n),n.focus(),e.hideLoading()})).catch((t=>{n.value="",W(n),n.focus(),e.hideLoading()}))},ut={select:(e,t,n)=>{const o=_(e,i.select),s=(e,t,o)=>{const i=document.createElement("option");i.value=o,j(i,t),i.selected=pt(o,n.inputValue),e.appendChild(i)};t.forEach((e=>{const t=e[0],n=e[1];if(Array.isArray(n)){const e=document.createElement("optgroup");e.label=t,e.disabled=!1,o.appendChild(e),n.forEach((t=>s(e,t[1],t[0])))}else s(o,n,t)})),o.focus()},radio:(e,t,n)=>{const o=_(e,i.radio);t.forEach((e=>{const t=e[0],s=e[1],r=document.createElement("input"),a=document.createElement("label");r.type="radio",r.name=i.radio,r.value=t,pt(t,n.inputValue)&&(r.checked=!0);const l=document.createElement("span");j(l,s),l.className=i.label,a.appendChild(r),a.appendChild(l),o.appendChild(a)}));const s=o.querySelectorAll("input");s.length&&s[0].focus()}},dt=e=>{const t=[];return"undefined"!=typeof Map&&e instanceof Map?e.forEach(((e,n)=>{let o=e;"object"==typeof o&&(o=dt(o)),t.push([n,o])})):Object.keys(e).forEach((n=>{let o=e[n];"object"==typeof o&&(o=dt(o)),t.push([n,o])})),t},pt=(e,t)=>t&&t.toString()===e.toString(),mt=(e,t)=>{const o=n.innerParams.get(e);if(!o.input)return void r(t);const i=((e,t)=>{const n=e.getInput();if(!n)return null;switch(t.input){case"checkbox":return st(n);case"radio":return rt(n);case"file":return at(n);default:return t.inputAutoTrim?n.value.trim():n.value}})(e,o);o.inputValidator?gt(e,i,t):e.getInput().checkValidity()?"deny"===t?ht(e,i):yt(e,i):(e.enableButtons(),e.showValidationMessage(o.validationMessage))},gt=(e,t,o)=>{const i=n.innerParams.get(e);e.disableInput();Promise.resolve().then((()=>d(i.inputValidator(t,i.validationMessage)))).then((n=>{e.enableButtons(),e.enableInput(),n?e.showValidationMessage(n):"deny"===o?ht(e,t):yt(e,t)}))},ht=(e,t)=>{const o=n.innerParams.get(e||void 0);if(o.showLoaderOnDeny&&ot(P()),o.preDeny){e.isAwaitingPromise=!0;Promise.resolve().then((()=>d(o.preDeny(t,o.validationMessage)))).then((n=>{!1===n?(e.hideLoading(),Je(e)):e.close({isDenied:!0,value:void 0===n?t:n})})).catch((t=>bt(e||void 0,t)))}else e.close({isDenied:!0,value:t})},ft=(e,t)=>{e.close({isConfirmed:!0,value:t})},bt=(e,t)=>{e.rejectPromise(t)},yt=(e,t)=>{const o=n.innerParams.get(e||void 0);if(o.showLoaderOnConfirm&&ot(),o.preConfirm){e.resetValidationMessage(),e.isAwaitingPromise=!0;Promise.resolve().then((()=>d(o.preConfirm(t,o.validationMessage)))).then((n=>{Y(A())||!1===n?(e.hideLoading(),Je(e)):ft(e,void 0===n?t:n)})).catch((t=>bt(e||void 0,t)))}else ft(e,t)};function wt(){const e=n.innerParams.get(this);if(!e)return;const t=n.domCache.get(this);z(t.loader),M()?e.icon&&W(b()):vt(t),F([t.popup,t.actions],i.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}const vt=e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));t.length?W(t[0],"inline-block"):Y(k())||Y(P())||Y(B())||z(e.actions)};function Ct(){const e=n.innerParams.get(this),t=n.domCache.get(this);return t?D(t.popup,e.input):null}function At(e,t,o){const i=n.domCache.get(e);t.forEach((e=>{i[e].disabled=o}))}function kt(e,t){if(e)if("radio"===e.type){const n=e.parentNode.parentNode.querySelectorAll("input");for(let e=0;e<n.length;e++)n[e].disabled=t}else e.disabled=t}function Bt(){At(this,["confirmButton","denyButton","cancelButton"],!1)}function Pt(){At(this,["confirmButton","denyButton","cancelButton"],!0)}function Et(){kt(this.getInput(),!1)}function xt(){kt(this.getInput(),!0)}function Tt(e){const t=n.domCache.get(this),o=n.innerParams.get(this);j(t.validationMessage,e),t.validationMessage.className=i["validation-message"],o.customClass&&o.customClass.validationMessage&&N(t.validationMessage,o.customClass.validationMessage),W(t.validationMessage);const s=this.getInput();s&&(s.setAttribute("aria-invalid",!0),s.setAttribute("aria-describedby",i["validation-message"]),V(s),N(s,i.inputerror))}function $t(){const e=n.domCache.get(this);e.validationMessage&&z(e.validationMessage);const t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"),F(t,i.inputerror))}const Lt={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,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:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny: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,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"&times;",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!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:{},inputAutoFocus:!0,inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},St=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],Ot={},Mt=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],jt=e=>Object.prototype.hasOwnProperty.call(Lt,e),Ht=e=>-1!==St.indexOf(e),It=e=>Ot[e],Dt=e=>{jt(e)},Vt=e=>{Mt.includes(e)},qt=e=>{const t=It(e);t&&l(e,t)};function Nt(e){const t=f(),o=n.innerParams.get(this);if(!t||H(t,o.hideClass.popup))return;const i=Ft(e),s=Object.assign({},o,i);xe(this,s),n.innerParams.set(this,s),Object.defineProperties(this,{params:{value:Object.assign({},this.params,e),writable:!1,enumerable:!0}})}const Ft=e=>{const t={};return Object.keys(e).forEach((n=>{Ht(n)&&(t[n]=e[n])})),t};function _t(){const t=n.domCache.get(this),o=n.innerParams.get(this);o?(t.popup&&e.swalCloseEventFinishedCallback&&(e.swalCloseEventFinishedCallback(),delete e.swalCloseEventFinishedCallback),"function"==typeof o.didDestroy&&o.didDestroy(),Rt(this)):Wt(this)}const Rt=t=>{Wt(t),delete t.params,delete e.keydownHandler,delete e.keydownTarget,delete e.currentInstance},Wt=e=>{e.isAwaitingPromise?(zt(n,e),e.isAwaitingPromise=!0):(zt(qe,e),zt(n,e),delete e.isAwaitingPromise,delete e.disableButtons,delete e.enableButtons,delete e.getInput,delete e.disableInput,delete e.enableInput,delete e.hideLoading,delete e.disableLoading,delete e.showValidationMessage,delete e.resetValidationMessage,delete e.close,delete e.closePopup,delete e.closeModal,delete e.closeToast,delete e.rejectPromise,delete e.update,delete e._destroy)},zt=(e,t)=>{for(const n in e)e[n].delete(t)};var Kt=Object.freeze({__proto__:null,_destroy:_t,close:Ze,closeModal:Ze,closePopup:Ze,closeToast:Ze,disableButtons:Pt,disableInput:xt,disableLoading:wt,enableButtons:Bt,enableInput:Et,getInput:Ct,handleAwaitingPromise:Je,hideLoading:wt,rejectPromise:Ge,resetValidationMessage:$t,showValidationMessage:Tt,update:Nt});const Ut=(e,t,o)=>{t.popup.onclick=()=>{const t=n.innerParams.get(e);t&&(Yt(t)||t.timer||t.input)||o($e.close)}},Yt=e=>e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton;let Zt=!1;const Xt=e=>{e.popup.onmousedown=()=>{e.container.onmouseup=function(t){e.container.onmouseup=void 0,t.target===e.container&&(Zt=!0)}}},Gt=e=>{e.container.onmousedown=()=>{e.popup.onmouseup=function(t){e.popup.onmouseup=void 0,(t.target===e.popup||e.popup.contains(t.target))&&(Zt=!0)}}},Jt=(e,t,o)=>{t.container.onclick=i=>{const s=n.innerParams.get(e);Zt?Zt=!1:i.target===t.container&&c(s.allowOutsideClick)&&o($e.backdrop)}},Qt=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e);const en=()=>{if(e.timeout)return(()=>{const e=$(),t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";const n=t/parseInt(window.getComputedStyle(e).width)*100;e.style.width=`${n}%`})(),e.timeout.stop()},tn=()=>{if(e.timeout){const t=e.timeout.start();return G(t),t}};let nn=!1;const on={};const sn=e=>{for(let t=e.target;t&&t!==document;t=t.parentNode)for(const e in on){const n=t.getAttribute(e);if(n)return void on[e].fire({template:n})}};var rn=Object.freeze({__proto__:null,argsToParams:e=>{const t={};return"object"!=typeof e[0]||Qt(e[0])?["title","html","icon"].forEach(((n,o)=>{const i=e[o];("string"==typeof i||Qt(i))&&(t[n]=i)})):Object.assign(t,e[0]),t},bindClickHandler:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"data-swal-template";on[e]=this,nn||(document.body.addEventListener("click",sn),nn=!0)},clickCancel:()=>B()&&B().click(),clickConfirm:Te,clickDeny:()=>P()&&P().click(),enableLoading:ot,fire:function(){const e=this;for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return new e(...n)},getActions:x,getCancelButton:B,getCloseButton:L,getConfirmButton:k,getContainer:m,getDenyButton:P,getFocusableElements:S,getFooter:T,getHtmlContainer:w,getIcon:b,getIconContent:()=>h(i["icon-content"]),getImage:v,getInputLabel:()=>h(i["input-label"]),getLoader:E,getPopup:f,getProgressSteps:C,getTimerLeft:()=>e.timeout&&e.timeout.getTimerLeft(),getTimerProgressBar:$,getTitle:y,getValidationMessage:A,increaseTimer:t=>{if(e.timeout){const n=e.timeout.increase(t);return G(n,!0),n}},isDeprecatedParameter:It,isLoading:()=>{const e=f();return!!e&&e.hasAttribute("data-loading")},isTimerRunning:()=>!(!e.timeout||!e.timeout.isRunning()),isUpdatableParameter:Ht,isValidParameter:jt,isVisible:()=>Y(f()),mixin:function(e){return class extends(this){_main(t,n){return super._main(t,Object.assign({},e,n))}}},resumeTimer:tn,showLoading:ot,stopTimer:en,toggleTimer:()=>{const t=e.timeout;return t&&(t.running?en():tn())}});class an{constructor(e,t){this.callback=e,this.remaining=t,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.started&&this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=(new Date).getTime()-this.started.getTime()),this.remaining}increase(e){const t=this.running;return t&&this.stop(),this.remaining+=e,t&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const ln=["swal-title","swal-html","swal-footer"],cn=e=>{const t={};return Array.from(e.querySelectorAll("swal-param")).forEach((e=>{bn(e,["name","value"]);const n=e.getAttribute("name"),o=e.getAttribute("value");t[n]="boolean"==typeof Lt[n]?"false"!==o:"object"==typeof Lt[n]?JSON.parse(o):o})),t},un=e=>{const t={};return Array.from(e.querySelectorAll("swal-function-param")).forEach((e=>{const n=e.getAttribute("name"),o=e.getAttribute("value");t[n]=new Function(`return ${o}`)()})),t},dn=e=>{const t={};return Array.from(e.querySelectorAll("swal-button")).forEach((e=>{bn(e,["type","color","aria-label"]);const n=e.getAttribute("type");t[`${n}ButtonText`]=e.innerHTML,t[`show${r(n)}Button`]=!0,e.hasAttribute("color")&&(t[`${n}ButtonColor`]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(t[`${n}ButtonAriaLabel`]=e.getAttribute("aria-label"))})),t},pn=e=>{const t={},n=e.querySelector("swal-image");return n&&(bn(n,["src","width","height","alt"]),n.hasAttribute("src")&&(t.imageUrl=n.getAttribute("src")),n.hasAttribute("width")&&(t.imageWidth=n.getAttribute("width")),n.hasAttribute("height")&&(t.imageHeight=n.getAttribute("height")),n.hasAttribute("alt")&&(t.imageAlt=n.getAttribute("alt"))),t},mn=e=>{const t={},n=e.querySelector("swal-icon");return n&&(bn(n,["type","color"]),n.hasAttribute("type")&&(t.icon=n.getAttribute("type")),n.hasAttribute("color")&&(t.iconColor=n.getAttribute("color")),t.iconHtml=n.innerHTML),t},gn=e=>{const t={},n=e.querySelector("swal-input");n&&(bn(n,["type","label","placeholder","value"]),t.input=n.getAttribute("type")||"text",n.hasAttribute("label")&&(t.inputLabel=n.getAttribute("label")),n.hasAttribute("placeholder")&&(t.inputPlaceholder=n.getAttribute("placeholder")),n.hasAttribute("value")&&(t.inputValue=n.getAttribute("value")));const o=Array.from(e.querySelectorAll("swal-input-option"));return o.length&&(t.inputOptions={},o.forEach((e=>{bn(e,["value"]);const n=e.getAttribute("value"),o=e.innerHTML;t.inputOptions[n]=o}))),t},hn=(e,t)=>{const n={};for(const o in t){const i=t[o],s=e.querySelector(i);s&&(bn(s,[]),n[i.replace(/^swal-/,"")]=s.innerHTML.trim())}return n},fn=e=>{const t=ln.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(e.children).forEach((e=>{const n=e.tagName.toLowerCase();t.includes(n)}))},bn=(e,t)=>{Array.from(e.attributes).forEach((n=>{-1===t.indexOf(n.name)&&(n.name,e.tagName.toLowerCase(),t.length&&t.join(", "))}))},yn=t=>{const n=m(),o=f();"function"==typeof t.willOpen&&t.willOpen(o);const s=window.getComputedStyle(document.body).overflowY;An(n,o,t),setTimeout((()=>{vn(n,o)}),10),O()&&(Cn(n,t.scrollbarPadding,s),Array.from(document.body.children).forEach((e=>{e===m()||e.contains(m())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")||""),e.setAttribute("aria-hidden","true"))}))),M()||e.previousActiveElement||(e.previousActiveElement=document.activeElement),"function"==typeof t.didOpen&&setTimeout((()=>t.didOpen(o))),F(n,i["no-transition"])},wn=e=>{const t=f();if(e.target!==t)return;const n=m();t.removeEventListener(se,wn),n.style.overflowY="auto"},vn=(e,t)=>{se&&X(t)?(e.style.overflowY="hidden",t.addEventListener(se,wn)):e.style.overflowY="auto"},Cn=(e,t,n)=>{(()=>{if(Fe&&!H(document.body,i.iosfix)){const e=document.body.scrollTop;document.body.style.top=-1*e+"px",N(document.body,i.iosfix),_e()}})(),t&&"hidden"!==n&&Ue(),setTimeout((()=>{e.scrollTop=0}))},An=(e,t,n)=>{N(e,n.showClass.backdrop),t.style.setProperty("opacity","0","important"),W(t,"grid"),setTimeout((()=>{N(t,n.showClass.popup),t.style.removeProperty("opacity")}),10),N([document.documentElement,document.body],i.shown),n.heightAuto&&n.backdrop&&!n.toast&&N([document.documentElement,document.body],i["height-auto"])};var kn=(e,t)=>/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),Bn=(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL");function Pn(e){!function(e){e.inputValidator||("email"===e.input&&(e.inputValidator=kn),"url"===e.input&&(e.inputValidator=Bn))}(e),e.showLoaderOnConfirm&&e.preConfirm,function(e){(!e.target||"string"==typeof e.target&&!document.querySelector(e.target)||"string"!=typeof e.target&&!e.target.appendChild)&&(e.target="body")}(e),"string"==typeof e.title&&(e.title=e.title.split("\n").join("<br />")),te(e)}let En;class xn{constructor(){if("undefined"==typeof window)return;En=this;for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];const i=Object.freeze(this.constructor.argsToParams(t));this.params=i,this.isAwaitingPromise=!1;const s=En._main(En.params);n.promise.set(this,s)}_main(t){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(e=>{!1===e.backdrop&&e.allowOutsideClick;for(const t in e)Dt(t),e.toast&&Vt(t),qt(t)})(Object.assign({},o,t)),e.currentInstance&&(e.currentInstance._destroy(),O()&&Ne()),e.currentInstance=En;const i=$n(t,o);Pn(i),Object.freeze(i),e.timeout&&(e.timeout.stop(),delete e.timeout),clearTimeout(e.restoreFocusTimeout);const s=Ln(En);return xe(En,i),n.innerParams.set(En,i),Tn(En,s,i)}then(e){return n.promise.get(this).then(e)}finally(e){return n.promise.get(this).finally(e)}}const Tn=(t,o,i)=>new Promise(((s,r)=>{const a=e=>{t.close({isDismissed:!0,dismiss:e})};qe.swalPromiseResolve.set(t,s),qe.swalPromiseReject.set(t,r),o.confirmButton.onclick=()=>{(e=>{const t=n.innerParams.get(e);e.disableButtons(),t.input?mt(e,"confirm"):yt(e,!0)})(t)},o.denyButton.onclick=()=>{(e=>{const t=n.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?mt(e,"deny"):ht(e,!1)})(t)},o.cancelButton.onclick=()=>{((e,t)=>{e.disableButtons(),t($e.cancel)})(t,a)},o.closeButton.onclick=()=>{a($e.close)},((e,t,o)=>{n.innerParams.get(e).toast?Ut(e,t,o):(Xt(t),Gt(t),Jt(e,t,o))})(t,o,a),((e,t,n,o)=>{Le(t),n.toast||(t.keydownHandler=t=>je(e,t,o),t.keydownTarget=n.keydownListenerCapture?window:f(),t.keydownListenerCapture=n.keydownListenerCapture,t.keydownTarget.addEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!0)})(t,e,i,a),((e,t)=>{"select"===t.input||"radio"===t.input?lt(e,t):["text","email","number","tel","textarea"].includes(t.input)&&(u(t.inputValue)||p(t.inputValue))&&(ot(k()),ct(e,t))})(t,i),yn(i),Sn(e,i,a),On(o,i),setTimeout((()=>{o.container.scrollTop=0}))})),$n=(e,t)=>{const n=(e=>{const t="string"==typeof e.template?document.querySelector(e.template):e.template;if(!t)return{};const n=t.content;return fn(n),Object.assign(cn(n),un(n),dn(n),pn(n),mn(n),gn(n),hn(n,ln))})(e),o=Object.assign({},Lt,t,n,e);return o.showClass=Object.assign({},Lt.showClass,o.showClass),o.hideClass=Object.assign({},Lt.hideClass,o.hideClass),o},Ln=e=>{const t={popup:f(),container:m(),actions:x(),confirmButton:k(),denyButton:P(),cancelButton:B(),loader:E(),closeButton:L(),validationMessage:A(),progressSteps:C()};return n.domCache.set(e,t),t},Sn=(e,t,n)=>{const o=$();z(o),t.timer&&(e.timeout=new an((()=>{n("timer"),delete e.timeout}),t.timer),t.timerProgressBar&&(W(o),I(o,t,"timerProgressBar"),setTimeout((()=>{e.timeout&&e.timeout.running&&G(t.timer)}))))},On=(e,t)=>{t.toast||(c(t.allowEnterKey)?Mn(e,t)||Se(-1,1):jn())},Mn=(e,t)=>t.focusDeny&&Y(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&Y(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!Y(e.confirmButton))&&(e.confirmButton.focus(),!0),jn=()=>{document.activeElement instanceof HTMLElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};xn.prototype.disableButtons=Pt,xn.prototype.enableButtons=Bt,xn.prototype.getInput=Ct,xn.prototype.disableInput=xt,xn.prototype.enableInput=Et,xn.prototype.hideLoading=wt,xn.prototype.disableLoading=wt,xn.prototype.showValidationMessage=Tt,xn.prototype.resetValidationMessage=$t,xn.prototype.close=Ze,xn.prototype.closePopup=Ze,xn.prototype.closeModal=Ze,xn.prototype.closeToast=Ze,xn.prototype.rejectPromise=Ge,xn.prototype.update=Nt,xn.prototype._destroy=_t,Object.assign(xn,rn),Object.keys(Kt).forEach((e=>{xn[e]=function(){return En&&En[e]?En[e](...arguments):null}})),xn.DismissReason=$e,xn.version="11.7.20";const Hn=xn;return Hn.default=Hn,Hn})),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2);