diff --git a/build/bundle.js b/build/bundle.js index 8529dc3..fdcc704 100644 --- a/build/bundle.js +++ b/build/bundle.js @@ -1,2 +1,2 @@ -var app=function(){"use strict";function e(){}function t(e){return e()}function n(){return Object.create(null)}function o(e){e.forEach(t)}function s(e){return"function"==typeof e}function a(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}let r,i;function l(t,...n){if(null==t)return e;const o=t.subscribe(...n);return o.unsubscribe?()=>o.unsubscribe():o}function c(e){let t;return l(e,(e=>t=e))(),t}function u(e,t,n){e.$$.on_destroy.push(l(t,n))}function d(e,t,n,o){if(e){const s=p(e,t,n,o);return e[0](s)}}function p(e,t,n,o){return e[1]&&o?function(e,t){for(const n in t)e[n]=t[n];return e}(n.ctx.slice(),e[1](o(t))):n.ctx}function m(e,t,n,o){if(e[2]&&o){const s=e[2](o(n));if(void 0===t.dirty)return s;if("object"==typeof s){const e=[],n=Math.max(t.dirty.length,s.length);for(let o=0;o32){const t=[],n=e.ctx.length/32;for(let e=0;ee.removeEventListener(t,n,o)}function P(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function B(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function S(e,t){e.value=null==t?"":t}function E(e,t,n,o){null===n?e.style.removeProperty(t):e.style.setProperty(t,n,o?"important":"")}function T(e,t,n){e.classList[n?"add":"remove"](t)}function j(e){i=e}function O(){if(!i)throw new Error("Function called outside component initialization");return i}function z(e){O().$$.on_mount.push(e)}function L(){const e=O();return(t,n)=>{const o=e.$$.callbacks[t];if(o){const s=function(e,t,n=!1){const o=document.createEvent("CustomEvent");return o.initCustomEvent(e,n,!1,t),o}(t,n);o.slice().forEach((t=>{t.call(e,s)}))}}}function M(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e.call(this,t)))}const q=[],I=[],D=[],N=[],H=Promise.resolve();let V=!1;function R(e){D.push(e)}function _(e){N.push(e)}const U=new Set;let Y=0;function F(){const e=i;do{for(;Y{W.delete(e),o&&(n&&e.d(1),o())})),e.o(t)}}function ee(e,t,n){const o=e.$$.props[t];void 0!==o&&(e.$$.bound[o]=n,n(e.$$.ctx[o]))}function te(e){e&&e.c()}function ne(e,n,a,r){const{fragment:i,on_mount:l,on_destroy:c,after_update:u}=e.$$;i&&i.m(n,a),r||R((()=>{const n=l.map(t).filter(s);c?c.push(...n):o(n),e.$$.on_mount=[]})),u.forEach(R)}function oe(e,t){const n=e.$$;null!==n.fragment&&(o(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function se(e,t){-1===e.$$.dirty[0]&&(q.push(e),V||(V=!0,H.then(F)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const s=o.length?o[0]:n;return m.ctx&&l(m.ctx[e],m.ctx[e]=s)&&(!m.skip_bound&&m.bound[e]&&m.bound[e](s),f&&se(t,e)),n})):[],m.update(),f=!0,o(m.before_update),m.fragment=!!r&&r(m.ctx),s.target){if(s.hydrate){const e=function(e){return Array.from(e.childNodes)}(s.target);m.fragment&&m.fragment.l(e),e.forEach(b)}else m.fragment&&m.fragment.c();s.intro&&G(t.$$.fragment),ne(t,s.target,s.anchor,s.customElement),F()}j(p)}class re{$destroy(){oe(this,1),this.$destroy=e}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}var ie="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var le=function(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}((function(e,t){e.exports=function(){const e="SweetAlert2:",t=e=>{const t=[];for(let n=0;ne.charAt(0).toUpperCase()+e.slice(1),o=e=>Array.prototype.slice.call(e),s=t=>{console.warn("".concat(e," ").concat("object"==typeof t?t.join(" "):t))},a=t=>{console.error("".concat(e," ").concat(t))},r=[],i=e=>{r.includes(e)||(r.push(e),s(e))},l=(e,t)=>{i('"'.concat(e,'" is deprecated and will be removed in the next major release. Please use "').concat(t,'" instead.'))},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={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:"×",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:{},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},f=["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"],h={},w=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],g=e=>Object.prototype.hasOwnProperty.call(m,e),b=e=>-1!==f.indexOf(e),y=e=>h[e],v=e=>{g(e)||s('Unknown parameter "'.concat(e,'"'))},$=e=>{w.includes(e)&&s('The parameter "'.concat(e,'" is incompatible with toasts'))},x=e=>{y(e)&&l(e,y(e))},k=e=>{!e.backdrop&&e.allowOutsideClick&&s('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const t in e)v(t),e.toast&&$(t),x(t)},C="swal2-",A=e=>{const t={};for(const n in e)t[e[n]]=C+e[n];return t},P=A(["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"]),B=A(["success","warning","info","question","error"]),S=()=>document.body.querySelector(".".concat(P.container)),E=e=>{const t=S();return t?t.querySelector(e):null},T=e=>E(".".concat(e)),j=()=>T(P.popup),O=()=>T(P.icon),z=()=>T(P.title),L=()=>T(P["html-container"]),M=()=>T(P.image),q=()=>T(P["progress-steps"]),I=()=>T(P["validation-message"]),D=()=>E(".".concat(P.actions," .").concat(P.confirm)),N=()=>E(".".concat(P.actions," .").concat(P.deny)),H=()=>T(P["input-label"]),V=()=>E(".".concat(P.loader)),R=()=>E(".".concat(P.actions," .").concat(P.cancel)),_=()=>T(P.actions),U=()=>T(P.footer),Y=()=>T(P["timer-progress-bar"]),F=()=>T(P.close),Z='\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',W=()=>{const e=o(j().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort(((e,t)=>{const n=parseInt(e.getAttribute("tabindex")),o=parseInt(t.getAttribute("tabindex"));return n>o?1:n"-1"!==e.getAttribute("tabindex")));return t(e.concat(n)).filter((e=>fe(e)))},K=()=>ee(document.body,P.shown)&&!ee(document.body,P["toast-shown"])&&!ee(document.body,P["no-backdrop"]),X=()=>j()&&ee(j(),P.toast),J=()=>j().hasAttribute("data-loading"),G={previousBodyPadding:null},Q=(e,t)=>{if(e.textContent="",t){const n=(new DOMParser).parseFromString(t,"text/html");o(n.querySelector("head").childNodes).forEach((t=>{e.appendChild(t)})),o(n.querySelector("body").childNodes).forEach((t=>{e.appendChild(t)}))}},ee=(e,t)=>{if(!t)return!1;const n=t.split(/\s+/);for(let t=0;t{o(e.classList).forEach((n=>{Object.values(P).includes(n)||Object.values(B).includes(n)||Object.values(t.showClass).includes(n)||e.classList.remove(n)}))},ne=(e,t,n)=>{if(te(e,t),t.customClass&&t.customClass[n]){if("string"!=typeof t.customClass[n]&&!t.customClass[n].forEach)return s("Invalid type of customClass.".concat(n,'! Expected string or iterable object, got "').concat(typeof t.customClass[n],'"'));re(e,t.customClass[n])}},oe=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return e.querySelector(".".concat(P.popup," > .").concat(P[t]));case"checkbox":return e.querySelector(".".concat(P.popup," > .").concat(P.checkbox," input"));case"radio":return e.querySelector(".".concat(P.popup," > .").concat(P.radio," input:checked"))||e.querySelector(".".concat(P.popup," > .").concat(P.radio," input:first-child"));case"range":return e.querySelector(".".concat(P.popup," > .").concat(P.range," input"));default:return e.querySelector(".".concat(P.popup," > .").concat(P.input))}},se=e=>{if(e.focus(),"file"!==e.type){const t=e.value;e.value="",e.value=t}},ae=(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)})))},re=(e,t)=>{ae(e,t,!0)},ie=(e,t)=>{ae(e,t,!1)},le=(e,t)=>{const n=o(e.childNodes);for(let e=0;e{n==="".concat(parseInt(n))&&(n=parseInt(n)),n||0===parseInt(n)?e.style[t]="number"==typeof n?"".concat(n,"px"):n:e.style.removeProperty(t)},ue=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"flex";e.style.display=t},de=e=>{e.style.display="none"},pe=(e,t,n,o)=>{const s=e.querySelector(t);s&&(s.style[n]=o)},me=(e,t,n)=>{t?ue(e,n):de(e)},fe=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),he=()=>!fe(D())&&!fe(N())&&!fe(R()),we=e=>!!(e.scrollHeight>e.clientHeight),ge=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},be=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=Y();fe(n)&&(t&&(n.style.transition="none",n.style.width="100%"),setTimeout((()=>{n.style.transition="width ".concat(e/1e3,"s linear"),n.style.width="0%"}),10))},ye=()=>{const e=Y(),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.removeProperty("transition"),e.style.width="".concat(n,"%")},ve=()=>"undefined"==typeof window||"undefined"==typeof document,$e=100,xe={},ke=()=>{xe.previousActiveElement&&xe.previousActiveElement.focus?(xe.previousActiveElement.focus(),xe.previousActiveElement=null):document.body&&document.body.focus()},Ce=e=>new Promise((t=>{if(!e)return t();const n=window.scrollX,o=window.scrollY;xe.restoreFocusTimeout=setTimeout((()=>{ke(),t()}),$e),window.scrollTo(n,o)})),Ae='\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,""),Pe=()=>{const e=S();return!!e&&(e.remove(),ie([document.documentElement,document.body],[P["no-backdrop"],P["toast-shown"],P["has-column"]]),!0)},Be=()=>{xe.currentInstance.resetValidationMessage()},Se=()=>{const e=j(),t=le(e,P.input),n=le(e,P.file),o=e.querySelector(".".concat(P.range," input")),s=e.querySelector(".".concat(P.range," output")),a=le(e,P.select),r=e.querySelector(".".concat(P.checkbox," input")),i=le(e,P.textarea);t.oninput=Be,n.onchange=Be,a.onchange=Be,r.onchange=Be,i.oninput=Be,o.oninput=()=>{Be(),s.value=o.value},o.onchange=()=>{Be(),o.nextSibling.value=o.value}},Ee=e=>"string"==typeof e?document.querySelector(e):e,Te=e=>{const t=j();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")},je=e=>{"rtl"===window.getComputedStyle(e).direction&&re(S(),P.rtl)},Oe=e=>{const t=Pe();if(ve())return void a("SweetAlert2 requires document to initialize");const n=document.createElement("div");n.className=P.container,t&&re(n,P["no-transition"]),Q(n,Ae);const o=Ee(e.target);o.appendChild(n),Te(e),je(o),Se()},ze=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?Le(e,t):e&&Q(t,e)},Le=(e,t)=>{e.jquery?Me(t,e):Q(t,e.toString())},Me=(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))},qe=(()=>{if(ve())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})(),Ie=()=>{const e=document.createElement("div");e.className=P["scrollbar-measure"],document.body.appendChild(e);const t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t},De=(e,t)=>{const n=_(),o=V();t.showConfirmButton||t.showDenyButton||t.showCancelButton?ue(n):de(n),ne(n,t,"actions"),Ne(n,o,t),Q(o,t.loaderHtml),ne(o,t,"loader")};function Ne(e,t,n){const o=D(),s=N(),a=R();Ve(o,"confirm",n),Ve(s,"deny",n),Ve(a,"cancel",n),He(o,s,a,n),n.reverseButtons&&(n.toast?(e.insertBefore(a,o),e.insertBefore(s,o)):(e.insertBefore(a,t),e.insertBefore(s,t),e.insertBefore(o,t)))}function He(e,t,n,o){if(!o.buttonsStyling)return ie([e,t,n],P.styled);re([e,t,n],P.styled),o.confirmButtonColor&&(e.style.backgroundColor=o.confirmButtonColor,re(e,P["default-outline"])),o.denyButtonColor&&(t.style.backgroundColor=o.denyButtonColor,re(t,P["default-outline"])),o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor,re(n,P["default-outline"]))}function Ve(e,t,o){me(e,o["show".concat(n(t),"Button")],"inline-block"),Q(e,o["".concat(t,"ButtonText")]),e.setAttribute("aria-label",o["".concat(t,"ButtonAriaLabel")]),e.className=P[t],ne(e,o,"".concat(t,"Button")),re(e,o["".concat(t,"ButtonClass")])}function Re(e,t){"string"==typeof t?e.style.background=t:t||re([document.documentElement,document.body],P["no-backdrop"])}function _e(e,t){t in P?re(e,P[t]):(s('The "position" parameter is not valid, defaulting to "center"'),re(e,P.center))}function Ue(e,t){if(t&&"string"==typeof t){const n="grow-".concat(t);n in P&&re(e,P[n])}}const Ye=(e,t)=>{const n=S();n&&(Re(n,t.backdrop),_e(n,t.position),Ue(n,t.grow),ne(n,t,"container"))};var Fe={awaitingPromise:new WeakMap,promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const Ze=["input","file","range","select","radio","checkbox","textarea"],We=(e,t)=>{const n=j(),o=Fe.innerParams.get(e),s=!o||t.input!==o.input;Ze.forEach((e=>{const o=P[e],a=le(n,o);Je(e,t.inputAttributes),a.className=o,s&&de(a)})),t.input&&(s&&Ke(t),Ge(t))},Ke=e=>{if(!nt[e.input])return a('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(e.input,'"'));const t=tt(e.input),n=nt[e.input](t,e);ue(n),setTimeout((()=>{se(n)}))},Xe=e=>{for(let t=0;t{const n=oe(j(),e);if(n){Xe(n);for(const e in t)n.setAttribute(e,t[e])}},Ge=e=>{const t=tt(e.input);e.customClass&&re(t,e.customClass.input)},Qe=(e,t)=>{e.placeholder&&!t.inputPlaceholder||(e.placeholder=t.inputPlaceholder)},et=(e,t,n)=>{if(n.inputLabel){e.id=P.input;const o=document.createElement("label"),s=P["input-label"];o.setAttribute("for",e.id),o.className=s,re(o,n.customClass.inputLabel),o.innerText=n.inputLabel,t.insertAdjacentElement("beforebegin",o)}},tt=e=>{const t=P[e]?P[e]:P.input;return le(j(),t)},nt={};nt.text=nt.email=nt.password=nt.number=nt.tel=nt.url=(e,t)=>("string"==typeof t.inputValue||"number"==typeof t.inputValue?e.value=t.inputValue:p(t.inputValue)||s('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(typeof t.inputValue,'"')),et(e,e,t),Qe(e,t),e.type=t.input,e),nt.file=(e,t)=>(et(e,e,t),Qe(e,t),e),nt.range=(e,t)=>{const n=e.querySelector("input"),o=e.querySelector("output");return n.value=t.inputValue,n.type=t.input,o.value=t.inputValue,et(n,e,t),e},nt.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const n=document.createElement("option");Q(n,t.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return et(e,e,t),e},nt.radio=e=>(e.textContent="",e),nt.checkbox=(e,t)=>{const n=oe(j(),"checkbox");n.value="1",n.id=P.checkbox,n.checked=Boolean(t.inputValue);const o=e.querySelector("span");return Q(o,t.inputPlaceholder),e},nt.textarea=(e,t)=>{e.value=t.inputValue,Qe(e,t),et(e,e,t);const n=e=>parseInt(window.getComputedStyle(e).marginLeft)+parseInt(window.getComputedStyle(e).marginRight);return setTimeout((()=>{if("MutationObserver"in window){const t=parseInt(window.getComputedStyle(j()).width);new MutationObserver((()=>{const o=e.offsetWidth+n(e);j().style.width=o>t?"".concat(o,"px"):null})).observe(e,{attributes:!0,attributeFilter:["style"]})}})),e};const ot=(e,t)=>{const n=L();ne(n,t,"htmlContainer"),t.html?(ze(t.html,n),ue(n,"block")):t.text?(n.textContent=t.text,ue(n,"block")):de(n),We(e,t)},st=(e,t)=>{const n=U();me(n,t.footer),t.footer&&ze(t.footer,n),ne(n,t,"footer")},at=(e,t)=>{const n=F();Q(n,t.closeButtonHtml),ne(n,t,"closeButton"),me(n,t.showCloseButton),n.setAttribute("aria-label",t.closeButtonAriaLabel)},rt=(e,t)=>{const n=Fe.innerParams.get(e),o=O();return n&&t.icon===n.icon?(dt(o,t),void it(o,t)):t.icon||t.iconHtml?t.icon&&-1===Object.keys(B).indexOf(t.icon)?(a('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(t.icon,'"')),de(o)):(ue(o),dt(o,t),it(o,t),void re(o,t.showClass.icon)):de(o)},it=(e,t)=>{for(const n in B)t.icon!==n&&ie(e,B[n]);re(e,B[t.icon]),pt(e,t),lt(),ne(e,t,"icon")},lt=()=>{const e=j(),t=window.getComputedStyle(e).getPropertyValue("background-color"),n=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e\n \n
    \n
    \n',ut='\n \n \n \n \n',dt=(e,t)=>{e.textContent="",t.iconHtml?Q(e,mt(t.iconHtml)):"success"===t.icon?Q(e,ct):"error"===t.icon?Q(e,ut):Q(e,mt({question:"?",warning:"!",info:"i"}[t.icon]))},pt=(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"])pe(e,n,"backgroundColor",t.iconColor);pe(e,".swal2-success-ring","borderColor",t.iconColor)}},mt=e=>'
    ').concat(e,"
    "),ft=(e,t)=>{const n=M();if(!t.imageUrl)return de(n);ue(n,""),n.setAttribute("src",t.imageUrl),n.setAttribute("alt",t.imageAlt),ce(n,"width",t.imageWidth),ce(n,"height",t.imageHeight),n.className=P.image,ne(n,t,"image")},ht=e=>{const t=document.createElement("li");return re(t,P["progress-step"]),Q(t,e),t},wt=e=>{const t=document.createElement("li");return re(t,P["progress-step-line"]),e.progressStepsDistance&&(t.style.width=e.progressStepsDistance),t},gt=(e,t)=>{const n=q();if(!t.progressSteps||0===t.progressSteps.length)return de(n);ue(n),n.textContent="",t.currentProgressStep>=t.progressSteps.length&&s("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),t.progressSteps.forEach(((e,o)=>{const s=ht(e);if(n.appendChild(s),o===t.currentProgressStep&&re(s,P["active-progress-step"]),o!==t.progressSteps.length-1){const e=wt(t);n.appendChild(e)}}))},bt=(e,t)=>{const n=z();me(n,t.title||t.titleText,"block"),t.title&&ze(t.title,n),t.titleText&&(n.innerText=t.titleText),ne(n,t,"title")},yt=(e,t)=>{const n=S(),o=j();t.toast?(ce(n,"width",t.width),o.style.width="100%",o.insertBefore(V(),O())):ce(o,"width",t.width),ce(o,"padding",t.padding),t.color&&(o.style.color=t.color),t.background&&(o.style.background=t.background),de(I()),vt(o,t)},vt=(e,t)=>{e.className="".concat(P.popup," ").concat(fe(e)?t.showClass.popup:""),t.toast?(re([document.documentElement,document.body],P["toast-shown"]),re(e,P.toast)):re(e,P.modal),ne(e,t,"popup"),"string"==typeof t.customClass&&re(e,t.customClass),t.icon&&re(e,P["icon-".concat(t.icon)])},$t=(e,t)=>{yt(e,t),Ye(e,t),gt(e,t),rt(e,t),ft(e,t),bt(e,t),at(e,t),ot(e,t),De(e,t),st(e,t),"function"==typeof t.didRender&&t.didRender(j())},xt=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),kt=()=>{o(document.body.children).forEach((e=>{e===S()||e.contains(S())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))}))},Ct=()=>{o(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")}))},At=["swal-title","swal-html","swal-footer"],Pt=e=>{const t="string"==typeof e.template?document.querySelector(e.template):e.template;if(!t)return{};const n=t.content;return zt(n),Object.assign(Bt(n),St(n),Et(n),Tt(n),jt(n),Ot(n,At))},Bt=e=>{const t={};return o(e.querySelectorAll("swal-param")).forEach((e=>{Lt(e,["name","value"]);const n=e.getAttribute("name"),o=e.getAttribute("value");"boolean"==typeof m[n]&&"false"===o&&(t[n]=!1),"object"==typeof m[n]&&(t[n]=JSON.parse(o))})),t},St=e=>{const t={};return o(e.querySelectorAll("swal-button")).forEach((e=>{Lt(e,["type","color","aria-label"]);const o=e.getAttribute("type");t["".concat(o,"ButtonText")]=e.innerHTML,t["show".concat(n(o),"Button")]=!0,e.hasAttribute("color")&&(t["".concat(o,"ButtonColor")]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(t["".concat(o,"ButtonAriaLabel")]=e.getAttribute("aria-label"))})),t},Et=e=>{const t={},n=e.querySelector("swal-image");return n&&(Lt(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},Tt=e=>{const t={},n=e.querySelector("swal-icon");return n&&(Lt(n,["type","color"]),n.hasAttribute("type")&&(t.icon=n.getAttribute("type")),n.hasAttribute("color")&&(t.iconColor=n.getAttribute("color")),t.iconHtml=n.innerHTML),t},jt=e=>{const t={},n=e.querySelector("swal-input");n&&(Lt(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 s=e.querySelectorAll("swal-input-option");return s.length&&(t.inputOptions={},o(s).forEach((e=>{Lt(e,["value"]);const n=e.getAttribute("value"),o=e.innerHTML;t.inputOptions[n]=o}))),t},Ot=(e,t)=>{const n={};for(const o in t){const s=t[o],a=e.querySelector(s);a&&(Lt(a,[]),n[s.replace(/^swal-/,"")]=a.innerHTML.trim())}return n},zt=e=>{const t=At.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);o(e.children).forEach((e=>{const n=e.tagName.toLowerCase();-1===t.indexOf(n)&&s("Unrecognized element <".concat(n,">"))}))},Lt=(e,t)=>{o(e.attributes).forEach((n=>{-1===t.indexOf(n.name)&&s(['Unrecognized attribute "'.concat(n.name,'" on <').concat(e.tagName.toLowerCase(),">."),"".concat(t.length?"Allowed attributes are: ".concat(t.join(", ")):"To set the value, use HTML within the element.")])}))};var Mt={email:(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"),url:(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 qt(e){e.inputValidator||Object.keys(Mt).forEach((t=>{e.input===t&&(e.inputValidator=Mt[t])}))}function It(e){(!e.target||"string"==typeof e.target&&!document.querySelector(e.target)||"string"!=typeof e.target&&!e.target.appendChild)&&(s('Target parameter is not valid, defaulting to "body"'),e.target="body")}function Dt(e){qt(e),e.showLoaderOnConfirm&&!e.preConfirm&&s("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),It(e),"string"==typeof e.title&&(e.title=e.title.split("\n").join("
    ")),Oe(e)}class Nt{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.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 Ht=()=>{null===G.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(G.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(G.previousBodyPadding+Ie(),"px"))},Vt=()=>{null!==G.previousBodyPadding&&(document.body.style.paddingRight="".concat(G.previousBodyPadding,"px"),G.previousBodyPadding=null)},Rt=()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)&&!ee(document.body,P.iosfix)){const e=document.body.scrollTop;document.body.style.top="".concat(-1*e,"px"),re(document.body,P.iosfix),Ut(),_t()}},_t=()=>{const e=navigator.userAgent,t=!!e.match(/iPad/i)||!!e.match(/iPhone/i),n=!!e.match(/WebKit/i);if(t&&n&&!e.match(/CriOS/i)){const e=44;j().scrollHeight>window.innerHeight-e&&(S().style.paddingBottom="".concat(e,"px"))}},Ut=()=>{const e=S();let t;e.ontouchstart=e=>{t=Yt(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},Yt=e=>{const t=e.target,n=S();return!(Ft(e)||Zt(e)||t!==n&&(we(n)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||we(L())&&L().contains(t)))},Ft=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,Zt=e=>e.touches&&e.touches.length>1,Wt=()=>{if(ee(document.body,P.iosfix)){const e=parseInt(document.body.style.top,10);ie(document.body,P.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}},Kt=10,Xt=e=>{const t=S(),n=j();"function"==typeof e.willOpen&&e.willOpen(n);const o=window.getComputedStyle(document.body).overflowY;en(t,n,e),setTimeout((()=>{Gt(t,n)}),Kt),K()&&(Qt(t,e.scrollbarPadding,o),kt()),X()||xe.previousActiveElement||(xe.previousActiveElement=document.activeElement),"function"==typeof e.didOpen&&setTimeout((()=>e.didOpen(n))),ie(t,P["no-transition"])},Jt=e=>{const t=j();if(e.target!==t)return;const n=S();t.removeEventListener(qe,Jt),n.style.overflowY="auto"},Gt=(e,t)=>{qe&&ge(t)?(e.style.overflowY="hidden",t.addEventListener(qe,Jt)):e.style.overflowY="auto"},Qt=(e,t,n)=>{Rt(),t&&"hidden"!==n&&Ht(),setTimeout((()=>{e.scrollTop=0}))},en=(e,t,n)=>{re(e,n.showClass.backdrop),t.style.setProperty("opacity","0","important"),ue(t,"grid"),setTimeout((()=>{re(t,n.showClass.popup),t.style.removeProperty("opacity")}),Kt),re([document.documentElement,document.body],P.shown),n.heightAuto&&n.backdrop&&!n.toast&&re([document.documentElement,document.body],P["height-auto"])},tn=e=>{let t=j();t||new Zo,t=j();const n=V();X()?de(O()):nn(t,e),ue(n),t.setAttribute("data-loading",!0),t.setAttribute("aria-busy",!0),t.focus()},nn=(e,t)=>{const n=_(),o=V();!t&&fe(D())&&(t=D()),ue(n),t&&(de(t),o.setAttribute("data-button-to-replace",t.className)),o.parentNode.insertBefore(o,t),re([e,n],P.loading)},on=(e,t)=>{"select"===t.input||"radio"===t.input?cn(e,t):["text","email","number","tel","textarea"].includes(t.input)&&(u(t.inputValue)||p(t.inputValue))&&(tn(D()),un(e,t))},sn=(e,t)=>{const n=e.getInput();if(!n)return null;switch(t.input){case"checkbox":return an(n);case"radio":return rn(n);case"file":return ln(n);default:return t.inputAutoTrim?n.value.trim():n.value}},an=e=>e.checked?1:0,rn=e=>e.checked?e.value:null,ln=e=>e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,cn=(e,t)=>{const n=j(),o=e=>dn[t.input](n,pn(e),t);u(t.inputOptions)||p(t.inputOptions)?(tn(D()),d(t.inputOptions).then((t=>{e.hideLoading(),o(t)}))):"object"==typeof t.inputOptions?o(t.inputOptions):a("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof t.inputOptions))},un=(e,t)=>{const n=e.getInput();de(n),d(t.inputValue).then((o=>{n.value="number"===t.input?parseFloat(o)||0:"".concat(o),ue(n),n.focus(),e.hideLoading()})).catch((t=>{a("Error in inputValue promise: ".concat(t)),n.value="",ue(n),n.focus(),e.hideLoading()}))},dn={select:(e,t,n)=>{const o=le(e,P.select),s=(e,t,o)=>{const s=document.createElement("option");s.value=o,Q(s,t),s.selected=mn(o,n.inputValue),e.appendChild(s)};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=le(e,P.radio);t.forEach((e=>{const t=e[0],s=e[1],a=document.createElement("input"),r=document.createElement("label");a.type="radio",a.name=P.radio,a.value=t,mn(t,n.inputValue)&&(a.checked=!0);const i=document.createElement("span");Q(i,s),i.className=P.label,r.appendChild(a),r.appendChild(i),o.appendChild(r)}));const s=o.querySelectorAll("input");s.length&&s[0].focus()}},pn=e=>{const t=[];return"undefined"!=typeof Map&&e instanceof Map?e.forEach(((e,n)=>{let o=e;"object"==typeof o&&(o=pn(o)),t.push([n,o])})):Object.keys(e).forEach((n=>{let o=e[n];"object"==typeof o&&(o=pn(o)),t.push([n,o])})),t},mn=(e,t)=>t&&t.toString()===e.toString();function fn(){const e=Fe.innerParams.get(this);if(!e)return;const t=Fe.domCache.get(this);de(t.loader),X()?e.icon&&ue(O()):hn(t),ie([t.popup,t.actions],P.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}const hn=e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));t.length?ue(t[0],"inline-block"):he()&&de(e.actions)};function wn(e){const t=Fe.innerParams.get(e||this),n=Fe.domCache.get(e||this);return n?oe(n.popup,t.input):null}var gn={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const bn=()=>fe(j()),yn=()=>D()&&D().click(),vn=()=>N()&&N().click(),$n=()=>R()&&R().click(),xn=e=>{e.keydownTarget&&e.keydownHandlerAdded&&(e.keydownTarget.removeEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!1)},kn=(e,t,n,o)=>{xn(t),n.toast||(t.keydownHandler=t=>Bn(e,t,o),t.keydownTarget=n.keydownListenerCapture?window:j(),t.keydownListenerCapture=n.keydownListenerCapture,t.keydownTarget.addEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!0)},Cn=(e,t,n)=>{const o=W();if(o.length)return(t+=n)===o.length?t=0:-1===t&&(t=o.length-1),o[t].focus();j().focus()},An=["ArrowRight","ArrowDown"],Pn=["ArrowLeft","ArrowUp"],Bn=(e,t,n)=>{const o=Fe.innerParams.get(e);o&&(t.isComposing||229===t.keyCode||(o.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?Sn(e,t,o):"Tab"===t.key?En(t,o):[...An,...Pn].includes(t.key)?Tn(t.key):"Escape"===t.key&&jn(t,o,n)))},Sn=(e,t,n)=>{if(c(n.allowEnterKey)&&t.target&&e.getInput()&&t.target.outerHTML===e.getInput().outerHTML){if(["textarea","file"].includes(n.input))return;yn(),t.preventDefault()}},En=(e,t)=>{const n=e.target,o=W();let s=-1;for(let e=0;e{if(![D(),N(),R()].includes(document.activeElement))return;const t=An.includes(e)?"nextElementSibling":"previousElementSibling";let n=document.activeElement;for(let e=0;e<_().children.length;e++){if(n=n[t],!n)return;if(fe(n)&&n instanceof HTMLButtonElement)break}n instanceof HTMLButtonElement&&n.focus()},jn=(e,t,n)=>{c(t.allowEscapeKey)&&(e.preventDefault(),n(xt.esc))};function On(e,t,n,o){X()?Rn(e,o):(Ce(n).then((()=>Rn(e,o))),xn(xe)),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),K()&&(Vt(),Wt(),Ct()),zn()}function zn(){ie([document.documentElement,document.body],[P.shown,P["height-auto"],P["no-backdrop"],P["toast-shown"]])}function Ln(e){e=Nn(e);const t=gn.swalPromiseResolve.get(this),n=qn(this);this.isAwaitingPromise()?e.isDismissed||(Dn(this),t(e)):n&&t(e)}function Mn(){return!!Fe.awaitingPromise.get(this)}const qn=e=>{const t=j();if(!t)return!1;const n=Fe.innerParams.get(e);if(!n||ee(t,n.hideClass.popup))return!1;ie(t,n.showClass.popup),re(t,n.hideClass.popup);const o=S();return ie(o,n.showClass.backdrop),re(o,n.hideClass.backdrop),Hn(e,t,n),!0};function In(e){const t=gn.swalPromiseReject.get(this);Dn(this),t&&t(e)}const Dn=e=>{e.isAwaitingPromise()&&(Fe.awaitingPromise.delete(e),Fe.innerParams.get(e)||e._destroy())},Nn=e=>void 0===e?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},e),Hn=(e,t,n)=>{const o=S(),s=qe&&ge(t);"function"==typeof n.willClose&&n.willClose(t),s?Vn(e,t,o,n.returnFocus,n.didClose):On(e,o,n.returnFocus,n.didClose)},Vn=(e,t,n,o,s)=>{xe.swalCloseEventFinishedCallback=On.bind(null,e,n,o,s),t.addEventListener(qe,(function(e){e.target===t&&(xe.swalCloseEventFinishedCallback(),delete xe.swalCloseEventFinishedCallback)}))},Rn=(e,t)=>{setTimeout((()=>{"function"==typeof t&&t.bind(e.params)(),e._destroy()}))};function _n(e,t,n){const o=Fe.domCache.get(e);t.forEach((e=>{o[e].disabled=n}))}function Un(e,t){if(!e)return!1;if("radio"===e.type){const n=e.parentNode.parentNode.querySelectorAll("input");for(let e=0;e{const t={};return Object.keys(e).forEach((n=>{b(n)?t[n]=e[n]:s('Invalid parameter to update: "'.concat(n,'". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md'))})),t};function eo(){const e=Fe.domCache.get(this),t=Fe.innerParams.get(this);t?(e.popup&&xe.swalCloseEventFinishedCallback&&(xe.swalCloseEventFinishedCallback(),delete xe.swalCloseEventFinishedCallback),xe.deferDisposalTimer&&(clearTimeout(xe.deferDisposalTimer),delete xe.deferDisposalTimer),"function"==typeof t.didDestroy&&t.didDestroy(),to(this)):no(this)}const to=e=>{no(e),delete e.params,delete xe.keydownHandler,delete xe.keydownTarget,delete xe.currentInstance},no=e=>{e.isAwaitingPromise()?(oo(Fe,e),Fe.awaitingPromise.set(e,!0)):(oo(gn,e),oo(Fe,e))},oo=(e,t)=>{for(const n in e)e[n].delete(t)};var so=Object.freeze({hideLoading:fn,disableLoading:fn,getInput:wn,close:Ln,isAwaitingPromise:Mn,rejectPromise:In,handleAwaitingPromise:Dn,closePopup:Ln,closeModal:Ln,closeToast:Ln,enableButtons:Yn,disableButtons:Fn,enableInput:Zn,disableInput:Wn,showValidationMessage:Kn,resetValidationMessage:Xn,getProgressSteps:Jn,update:Gn,_destroy:eo});const ao=e=>{const t=Fe.innerParams.get(e);e.disableButtons(),t.input?lo(e,"confirm"):fo(e,!0)},ro=e=>{const t=Fe.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?lo(e,"deny"):uo(e,!1)},io=(e,t)=>{e.disableButtons(),t(xt.cancel)},lo=(e,t)=>{const o=Fe.innerParams.get(e);if(!o.input)return a('The "input" parameter is needed to be set when using returnInputValueOn'.concat(n(t)));const s=sn(e,o);o.inputValidator?co(e,s,t):e.getInput().checkValidity()?"deny"===t?uo(e,s):fo(e,s):(e.enableButtons(),e.showValidationMessage(o.validationMessage))},co=(e,t,n)=>{const o=Fe.innerParams.get(e);e.disableInput(),Promise.resolve().then((()=>d(o.inputValidator(t,o.validationMessage)))).then((o=>{e.enableButtons(),e.enableInput(),o?e.showValidationMessage(o):"deny"===n?uo(e,t):fo(e,t)}))},uo=(e,t)=>{const n=Fe.innerParams.get(e||void 0);n.showLoaderOnDeny&&tn(N()),n.preDeny?(Fe.awaitingPromise.set(e||void 0,!0),Promise.resolve().then((()=>d(n.preDeny(t,n.validationMessage)))).then((n=>{!1===n?(e.hideLoading(),Dn(e)):e.closePopup({isDenied:!0,value:void 0===n?t:n})})).catch((t=>mo(e||void 0,t)))):e.closePopup({isDenied:!0,value:t})},po=(e,t)=>{e.closePopup({isConfirmed:!0,value:t})},mo=(e,t)=>{e.rejectPromise(t)},fo=(e,t)=>{const n=Fe.innerParams.get(e||void 0);n.showLoaderOnConfirm&&tn(),n.preConfirm?(e.resetValidationMessage(),Fe.awaitingPromise.set(e||void 0,!0),Promise.resolve().then((()=>d(n.preConfirm(t,n.validationMessage)))).then((n=>{fe(I())||!1===n?(e.hideLoading(),Dn(e)):po(e,void 0===n?t:n)})).catch((t=>mo(e||void 0,t)))):po(e,t)},ho=(e,t,n)=>{Fe.innerParams.get(e).toast?wo(e,t,n):(yo(t),vo(t),$o(e,t,n))},wo=(e,t,n)=>{t.popup.onclick=()=>{const t=Fe.innerParams.get(e);t&&(go(t)||t.timer||t.input)||n(xt.close)}},go=e=>e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton;let bo=!1;const yo=e=>{e.popup.onmousedown=()=>{e.container.onmouseup=function(t){e.container.onmouseup=void 0,t.target===e.container&&(bo=!0)}}},vo=e=>{e.container.onmousedown=()=>{e.popup.onmouseup=function(t){e.popup.onmouseup=void 0,(t.target===e.popup||e.popup.contains(t.target))&&(bo=!0)}}},$o=(e,t,n)=>{t.container.onclick=o=>{const s=Fe.innerParams.get(e);bo?bo=!1:o.target===t.container&&c(s.allowOutsideClick)&&n(xt.backdrop)}},xo=e=>"object"==typeof e&&e.jquery,ko=e=>e instanceof Element||xo(e),Co=e=>{const t={};return"object"!=typeof e[0]||ko(e[0])?["title","html","icon"].forEach(((n,o)=>{const s=e[o];"string"==typeof s||ko(s)?t[n]=s:void 0!==s&&a("Unexpected type of ".concat(n,'! Expected "string" or "Element", got ').concat(typeof s))})):Object.assign(t,e[0]),t};function Ao(){const e=this;for(var t=arguments.length,n=new Array(t),o=0;oxe.timeout&&xe.timeout.getTimerLeft(),So=()=>{if(xe.timeout)return ye(),xe.timeout.stop()},Eo=()=>{if(xe.timeout){const e=xe.timeout.start();return be(e),e}},To=()=>{const e=xe.timeout;return e&&(e.running?So():Eo())},jo=e=>{if(xe.timeout){const t=xe.timeout.increase(e);return be(t,!0),t}},Oo=()=>xe.timeout&&xe.timeout.isRunning();let zo=!1;const Lo={};function Mo(){Lo[arguments.length>0&&void 0!==arguments[0]?arguments[0]:"data-swal-template"]=this,zo||(document.body.addEventListener("click",qo),zo=!0)}const qo=e=>{for(let t=e.target;t&&t!==document;t=t.parentNode)for(const e in Lo){const n=t.getAttribute(e);if(n)return void Lo[e].fire({template:n})}};var Io=Object.freeze({isValidParameter:g,isUpdatableParameter:b,isDeprecatedParameter:y,argsToParams:Co,isVisible:bn,clickConfirm:yn,clickDeny:vn,clickCancel:$n,getContainer:S,getPopup:j,getTitle:z,getHtmlContainer:L,getImage:M,getIcon:O,getInputLabel:H,getCloseButton:F,getActions:_,getConfirmButton:D,getDenyButton:N,getCancelButton:R,getLoader:V,getFooter:U,getTimerProgressBar:Y,getFocusableElements:W,getValidationMessage:I,isLoading:J,fire:Ao,mixin:Po,showLoading:tn,enableLoading:tn,getTimerLeft:Bo,stopTimer:So,resumeTimer:Eo,toggleTimer:To,increaseTimer:jo,isTimerRunning:Oo,bindClickHandler:Mo});let Do;class No{constructor(){if("undefined"==typeof window)return;Do=this;for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:{};k(Object.assign({},t,e)),xe.currentInstance&&(xe.currentInstance._destroy(),K()&&Ct()),xe.currentInstance=this;const n=Vo(e,t);Dt(n),Object.freeze(n),xe.timeout&&(xe.timeout.stop(),delete xe.timeout),clearTimeout(xe.restoreFocusTimeout);const o=Ro(this);return $t(this,n),Fe.innerParams.set(this,n),Ho(this,o,n)}then(e){return Fe.promise.get(this).then(e)}finally(e){return Fe.promise.get(this).finally(e)}}const Ho=(e,t,n)=>new Promise(((o,s)=>{const a=t=>{e.closePopup({isDismissed:!0,dismiss:t})};gn.swalPromiseResolve.set(e,o),gn.swalPromiseReject.set(e,s),t.confirmButton.onclick=()=>ao(e),t.denyButton.onclick=()=>ro(e),t.cancelButton.onclick=()=>io(e,a),t.closeButton.onclick=()=>a(xt.close),ho(e,t,a),kn(e,xe,n,a),on(e,n),Xt(n),_o(xe,n,a),Uo(t,n),setTimeout((()=>{t.container.scrollTop=0}))})),Vo=(e,t)=>{const n=Pt(e),o=Object.assign({},m,t,n,e);return o.showClass=Object.assign({},m.showClass,o.showClass),o.hideClass=Object.assign({},m.hideClass,o.hideClass),o},Ro=e=>{const t={popup:j(),container:S(),actions:_(),confirmButton:D(),denyButton:N(),cancelButton:R(),loader:V(),closeButton:F(),validationMessage:I(),progressSteps:q()};return Fe.domCache.set(e,t),t},_o=(e,t,n)=>{const o=Y();de(o),t.timer&&(e.timeout=new Nt((()=>{n("timer"),delete e.timeout}),t.timer),t.timerProgressBar&&(ue(o),ne(o,t,"timerProgressBar"),setTimeout((()=>{e.timeout&&e.timeout.running&&be(t.timer)}))))},Uo=(e,t)=>{if(!t.toast)return c(t.allowEnterKey)?void(Yo(e,t)||Cn(t,-1,1)):Fo()},Yo=(e,t)=>t.focusDeny&&fe(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&fe(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!fe(e.confirmButton)||(e.confirmButton.focus(),0)),Fo=()=>{document.activeElement instanceof HTMLElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};Object.assign(No.prototype,so),Object.assign(No,Io),Object.keys(so).forEach((e=>{No[e]=function(){if(Do)return Do[e](...arguments)}})),No.DismissReason=xt,No.version="11.4.8";const Zo=No;return Zo.default=Zo,Zo}(),void 0!==ie&&ie.Sweetalert2&&(ie.swal=ie.sweetAlert=ie.Swal=ie.SweetAlert=ie.Sweetalert2),"undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,'.swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4!important;grid-row:1/4!important;grid-template-columns:1fr 99fr 1fr;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto);grid-template-rows:minmax(min-content,auto) minmax(min-content,auto) minmax(min-content,auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-bottom-start,.swal2-container.swal2-center-start,.swal2-container.swal2-top-start{grid-template-columns:minmax(0,1fr) auto auto}.swal2-container.swal2-bottom,.swal2-container.swal2-center,.swal2-container.swal2-top{grid-template-columns:auto minmax(0,1fr) auto}.swal2-container.swal2-bottom-end,.swal2-container.swal2-center-end,.swal2-container.swal2-top-end{grid-template-columns:auto auto minmax(0,1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-left>.swal2-popup,.swal2-container.swal2-center-start>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-left>.swal2-popup,.swal2-container.swal2-bottom-start>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-fullscreen>.swal2-popup,.swal2-container.swal2-grow-row>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none!important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0,100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px transparent;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(112,102,224,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(220,55,65,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,120,129,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:0}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto!important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:inherit;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em 2em 3px}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px transparent;color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 3px;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-warning.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-warning.swal2-icon-show .swal2-icon-content{-webkit-animation:swal2-animate-i-mark .5s;animation:swal2-animate-i-mark .5s}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-info.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-info.swal2-icon-show .swal2-icon-content{-webkit-animation:swal2-animate-i-mark .8s;animation:swal2-animate-i-mark .8s}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-question.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-question.swal2-icon-show .swal2-icon-content{-webkit-animation:swal2-animate-question-mark .8s;animation:swal2-animate-question-mark .8s}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@-webkit-keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@-webkit-keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{background-color:transparent!important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:transparent;pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}')}));const ce=[];function ue(t,n=e){let o;const s=new Set;function r(e){if(a(t,e)&&(t=e,o)){const e=!ce.length;for(const e of s)e[1](),ce.push(e,t);if(e){for(let e=0;e{s.delete(l),0===s.size&&(o(),o=null)}}}}function de(t,n,a){const r=!Array.isArray(t),i=r?[t]:t,c=n.length<2;return u=t=>{let a=!1;const u=[];let d=0,p=e;const m=()=>{if(d)return;p();const o=n(r?u[0]:u,t);c?t(o):p=s(o)?o:e},f=i.map(((e,t)=>l(e,(e=>{u[t]=e,d&=~(1<{d|=1<{const o=n?localStorage.getItem(e):null;if(o&&t(JSON.parse(o)),n){const n=n=>{n.key===e&&t(n.newValue?JSON.parse(n.newValue):null)};return window.addEventListener("storage",n),()=>window.removeEventListener("storage",n)}})),{subscribe:a,set:r}=s;pe[e]={set(t){o(e,t),r(t)},update(t){const n=t(c(s));o(e,n),r(n)},subscribe:a}}return pe[e]}const fe={Peer:window.Peer},he=0,we=1,ge=2,be=3,ye=new URLSearchParams(location.search).get("game"),ve=null===ye,$e=window.navigator.userAgent.includes("Android"),xe="no-self-decode",ke="ABCDEFGHIJKLMNOPQRSTUVWXYZ",Ce="dontshow",Ae=["Congratulations!","Let's gooo","I knew you could do it","What a speedy boi","Sheeesh","Are you sonic, cause you're fast","Are you going to MIT, cause you're fast","You almost finished as fast as an MIT boy","Zoom zoom","Vroom vroom","You just broke the sound barrier","Are you 30k mph, cause you're faster than escape velocity","Too smart, too fast","ZHOOOOOM","Haha cryptogram go brrr","I'm proud of you","Most speedy cryptonerd","I *c* you","Deja vu, although I've never seen such speed before","You spend too much time on these puzzles, touch grass","Did f appear 1 time, cause you were as fast as f1 cars","You were faster than a Princeton waitlist student responding to a phone ring","Quite e-e-e-legaaant","Omae wa mou, SOLVEDERU","Speedy and steady wins the race","You're almost as fast as C","Are you JIT compiled, cause that was a massive speedup","That took you so little time, spacetime became just space","You going so fast, you escaped a black hole","You went so fast, you look red from here and blue over there"],Pe=ue([{id:"",name:"",progress:null,solved:!1}].slice(1)),Be=ue(""),Se=ue(null),Ee=me("name",`person-${Math.floor(1e4*Math.random())}`),Te=me("patristocrat",!1),je=me("hint",!1),Oe=ue(null),ze=ue(null),Le=ue(!1),Me=me("has-launched",!0),qe=ue(!1),Ie=ue(null),De=new Map,Ne=new Map,He=de([Be,Ee,ze,Le],(([e,t,n,o])=>({id:e,name:t,progress:n,solved:o}))),Ve=de(Se,(e=>e?.start??Date.now())),Re=de([Pe,Ve],(([e,t])=>new Map(e.map((e=>[e.id,e.solved?c(Re).get(e.id)??Date.now()-t:Date.now()-t]))))),_e=e=>`${Math.floor(e)}`.padStart(2,"0"),Ue=e=>{const t=_e(e/6e4/60),n=_e(e/6e4%60),o=_e(e%6e4/1e3);return"00"!==t?`${t}:${n}:${o}`.replace(/^0+/g,""):"00"!==n?`${n}:${o}`.replace(/^0+/g,""):`00:${o}`},Ye=new fe.Peer,Fe=[(e,t)=>{Pe.update((n=>[...n,{id:e,name:t.name,progress:null,solved:!1}]))},(e,t)=>{Se.set(t.problem)},(e,t)=>{ve&&Pe.update((n=>n.map((n=>n.id!==e?n:{...n,name:t.name,progress:t.progress,solved:t.solved}))))},(e,t)=>{if(ve)return;const n=c(Be);Pe.set(t.users.filter((e=>e.id!==n)))}],Ze=e=>new Promise((t=>{e.on("open",(()=>{var n;e.peer===ye&&Oe.set(e),De.set(e.peer,e),e.on("data",(n=e.peer,e=>{Fe[e.type]&&Fe[e.type](n,e)})),e.on("close",(e=>()=>{Pe.update((t=>t.filter((t=>t.id!==e)))),De.delete(e)})(e.peer)),setTimeout((()=>{(e=>{e?.send({type:he,name:c(Ee)})})(e)}),100),t(e)}))})),We=e=>De.forEach((t=>t.send(e)));Ye.on("open",(e=>{var t;Be.set(e),ve||null===ye||(t=ye,new Promise((e=>{const n=Be.subscribe((o=>{if(""===o)return;const s=Ye.connect(t);setTimeout((()=>n())),Ze(s).then(e)}))})))})),Ye.on("connection",Ze),Ye.on("error",(e=>{le.fire({title:"Connection error",text:`${e}`,icon:"error",confirmButtonColor:"var(--red)"})}));const Ke=[Pe.subscribe((e=>{ve&&We({type:be,users:[...e.map((e=>({...e,conn:null}))),c(He)]})})),He.subscribe((e=>{ve?We({type:be,users:[...c(Pe).map((e=>({...e,conn:null}))),e]}):c(Oe)?.send({type:ge,name:e.name,progress:e.progress,solved:e.solved})})),Se.subscribe((e=>{null!==e&&(ze.set(null),Le.set(!1),ve&&(Pe.update((e=>e.map((e=>({...e,progress:null,solved:!1}))))),We({type:we,problem:e})))}))];function Xe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Je(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:0,o=Math.random()*(t-e)+e;return Math.floor(o*Math.pow(10,n))/Math.pow(10,n)}function tt(e){return e[et(0,e.length)]}window.$cryptoduel$subscriptions&&window.$cryptoduel$subscriptions.forEach((e=>e())),window.$cryptoduel$subscriptions=Ke;var nt=["#fcf403","#62fc03","#f4fc03","#03e7fc","#03fca5","#a503fc","#fc03ad","#fc03c2"];function ot(e){return Math.log(e)/Math.log(1920)}var st=function(){function e(t){Xe(this,e);var n=t.initialPosition,o=t.direction,s=t.confettiRadius,a=t.confettiColors,r=t.emojis,i=t.emojiSize,l=t.canvasWidth,c=et(.9,1.7,3)*ot(l);this.confettiSpeed={x:c,y:c},this.finalConfettiSpeedX=et(.2,.6,3),this.rotationSpeed=r.length?.01:et(.03,.07,3)*ot(l),this.dragForceCoefficient=et(5e-4,9e-4,6),this.radius={x:s,y:s},this.initialRadius=s,this.rotationAngle="left"===o?et(0,.2,3):et(-.2,0,3),this.emojiSize=i,this.emojiRotationAngle=et(0,2*Math.PI),this.radiusYUpdateDirection="down";var u="left"===o?et(82,15)*Math.PI/180:et(-15,-82)*Math.PI/180;this.absCos=Math.abs(Math.cos(u)),this.absSin=Math.abs(Math.sin(u));var d=et(-150,0),p={x:n.x+("left"===o?-d:d)*this.absCos,y:n.y-d*this.absSin};this.currentPosition=Object.assign({},p),this.initialPosition=Object.assign({},p),this.color=r.length?null:tt(a),this.emoji=r.length?tt(r):null,this.createdAt=(new Date).getTime(),this.direction=o}return Ge(e,[{key:"draw",value:function(e){var t=this.currentPosition,n=this.radius,o=this.color,s=this.emoji,a=this.rotationAngle,r=this.emojiRotationAngle,i=this.emojiSize,l=window.devicePixelRatio;o?(e.fillStyle=o,e.beginPath(),e.ellipse(t.x*l,t.y*l,n.x*l,n.y*l,a,0,2*Math.PI),e.fill()):s&&(e.font="".concat(i,"px serif"),e.save(),e.translate(l*t.x,l*t.y),e.rotate(r),e.textAlign="center",e.fillText(s,0,0),e.restore())}},{key:"updatePosition",value:function(e,t){var n=this.confettiSpeed,o=this.dragForceCoefficient,s=this.finalConfettiSpeedX,a=this.radiusYUpdateDirection,r=this.rotationSpeed,i=this.createdAt,l=this.direction,c=t-i;n.x>s&&(this.confettiSpeed.x-=o*e),this.currentPosition.x+=n.x*("left"===l?-this.absCos:this.absCos)*e,this.currentPosition.y=this.initialPosition.y-n.y*this.absSin*c+.00125*Math.pow(c,2)/2,this.rotationSpeed-=this.emoji?1e-4:1e-5*e,this.rotationSpeed<0&&(this.rotationSpeed=0),this.emoji?this.emojiRotationAngle+=this.rotationSpeed*e%(2*Math.PI):"down"===a?(this.radius.y-=e*r,this.radius.y<=0&&(this.radius.y=0,this.radiusYUpdateDirection="up")):(this.radius.y+=e*r,this.radius.y>=this.initialRadius&&(this.radius.y=this.initialRadius,this.radiusYUpdateDirection="down"))}},{key:"getIsVisibleOnCanvas",value:function(e){return this.currentPosition.y0&&void 0!==arguments[0]?arguments[0]:{};Xe(this,e),this.activeConfettiBatches=[],this.canvas=t.canvas||at(),this.canvasContext=this.canvas.getContext("2d"),this.requestAnimationFrameRequested=!1,this.lastUpdated=(new Date).getTime(),this.iterationIndex=0,this.loop=this.loop.bind(this),requestAnimationFrame(this.loop)}return Ge(e,[{key:"loop",value:function(){var e,t,n,o,s;this.requestAnimationFrameRequested=!1,e=this.canvas,t=window.devicePixelRatio,n=getComputedStyle(e),o=Qe(n.getPropertyValue("width")),s=Qe(n.getPropertyValue("height")),e.setAttribute("width",(o*t).toString()),e.setAttribute("height",(s*t).toString());var a=(new Date).getTime(),r=a-this.lastUpdated,i=this.canvas.offsetHeight,l=this.iterationIndex%10==0;this.activeConfettiBatches=this.activeConfettiBatches.filter((function(e){return e.processShapes({timeDelta:r,currentTime:a},i,l),!l||!e.complete()})),this.iterationIndex++,this.queueAnimationFrameIfNeeded(a)}},{key:"queueAnimationFrameIfNeeded",value:function(e){this.requestAnimationFrameRequested||this.activeConfettiBatches.length<1||(this.requestAnimationFrameRequested=!0,this.lastUpdated=e||(new Date).getTime(),requestAnimationFrame(this.loop))}},{key:"addConfetti",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=rt(e),n=t.confettiRadius,o=t.confettiNumber,s=t.confettiColors,a=t.emojis,r=t.emojiSize,i=this.canvas.getBoundingClientRect(),l=i.width,c=i.height,u=5*c/7,d={x:0,y:u},p={x:l,y:u},m=new it(this.canvasContext),f=0;f{return(e=Ae)[Math.floor(Math.random()*e.length)];var e};let ut;setTimeout((()=>{ut=new lt({canvas:document.querySelector("#confetti")})}),10),window.$cryptoduel$confetti=ut;let dt=0;const pt=e=>e.map((e=>[Math.random(),e])).sort(((e,t)=>e[0]-t[0])).map((e=>e[1])),mt=()=>{const e=pt([...Array(26).keys()]);return e.some(((e,t)=>e===t))?mt():e.map((e=>ke[e]))},ft=e=>{const t=e.text.toUpperCase(),n=mt(),o=[...t].map((e=>n[ke.indexOf(e)]??e)).join("");return{...e,plaintext:t,ciphertext:o,start:Date.now(),hint:wt(t)[0]}},ht=e=>{const t=[...e].filter((e=>ke.includes(e))).join("");return[...Array(t.length).keys()].filter((e=>e%5==0)).map((e=>t.slice(e,e+5))).join(" ")},wt=e=>[...e.split(/\s+/g)],gt=e=>e.replace(/[^\x00-\x7F]+/g,""),bt={ogchar:"",dispatch:(e,t={})=>{},disabled:!1},yt=(e,t={})=>{let n={...t,replaceableElementDefaultOptions:bt};const{dispatch:o}=n,s=()=>{e.style.setProperty("pointer-events",n.disabled?"none":"auto")};s();const a=e=>{n.disabled||("Tab"!==e.key&&e.preventDefault(),n.ogchar!==e.key.toUpperCase()?o("replace",{from:n.ogchar,to:e.key.toUpperCase()}):o("error",{id:xe,msg:"Letters cannot decode to themselves"}))};return e.addEventListener("keydown",a),{update(e){n={...n,...e},s()},destroy(){e.removeEventListener("keydown",a)}}};function vt(t){let n,a,r,i;return{c(){n=v("input"),P(n,"class","decrypted-letter-input svelte-pa8gn1"),P(n,"type","text"),P(n,"maxlength",1),n.disabled=t[1]},m(o,l){var c;g(o,n,l),S(n,t[5]),r||(i=[A(n,"input",t[11]),A(n,"focus",t[7]),A(n,"blur",t[8]),(c=a=yt.call(null,n,{ogchar:t[2],disabled:t[1],dispatch:t[9]}),c&&s(c.destroy)?c.destroy:e)],r=!0)},p(e,t){2&t&&(n.disabled=e[1]),32&t&&n.value!==e[5]&&S(n,e[5]),a&&s(a.update)&&6&t&&a.update.call(null,{ogchar:e[2],disabled:e[1],dispatch:e[9]})},d(e){e&&b(n),r=!1,o(i)}}}function $t(e){let t,n,s,a,r;return{c(){t=v("div"),n=x(e[5]),P(t,"class","decrypted-letter-input svelte-pa8gn1"),P(t,"tabindex",s=e[1]?-1:0)},m(o,s){g(o,t,s),w(t,n),a||(r=[A(t,"focus",e[7]),A(t,"blur",e[8])],a=!0)},p(e,o){32&o&&B(n,e[5]),2&o&&s!==(s=e[1]?-1:0)&&P(t,"tabindex",s)},d(e){e&&b(t),a=!1,o(r)}}}function xt(e){let t;let n=($e?$t:vt)(e);return{c(){t=v(e[4]),n.c(),P(t,"class","decrypted-letter svelte-pa8gn1"),T(t,"empty",""===e[0]),T(t,"focussed-char",e[6]===e[2]),T(t,"non-alphabetic",null===e[0]),T(t,"enable-underline",!e[3]),T(t,"disabled",e[1])},m(e,o){g(e,t,o),n.m(t,null)},p(e,o){n.p(e,o),1&o&&T(t,"empty",""===e[0]),68&o&&T(t,"focussed-char",e[6]===e[2]),1&o&&T(t,"non-alphabetic",null===e[0]),8&o&&T(t,"enable-underline",!e[3]),2&o&&T(t,"disabled",e[1])},d(e){e&&b(t),n.d()}}}function kt(t){let n,o=t[4],s=t[4]&&xt(t);return{c(){s&&s.c(),n=C()},m(e,t){s&&s.m(e,t),g(e,n,t)},p(e,[t]){e[4]?o?a(o,e[4])?(s.d(1),s=xt(e),s.c(),s.m(n.parentNode,n)):s.p(e,t):(s=xt(e),s.c(),s.m(n.parentNode,n)):o&&(s.d(1),s=null),o=e[4]},i:e,o:e,d(e){e&&b(n),s&&s.d(e)}}}const Ct=new Set;function At(e,t,n){let o,s;u(e,Ie,(e=>n(6,s=e)));let{replacement:a=""}=t,{disabled:r=!1}=t,{ogchar:i=""}=t,{disableUnderline:l=!1}=t,{tag:c="div"}=t,d=!1;const p=L();return z((()=>(e=>{const t=dt++;return Ne.set(dt,e),()=>Ne.delete(t)})((e=>{d&&(i!==e||""===i?p("replace",{from:i,to:e}):p("error",{id:xe,msg:"Letters cannot decode to themselves"}))})))),e.$$set=e=>{"replacement"in e&&n(0,a=e.replacement),"disabled"in e&&n(1,r=e.disabled),"ogchar"in e&&n(2,i=e.ogchar),"disableUnderline"in e&&n(3,l=e.disableUnderline),"tag"in e&&n(4,c=e.tag)},e.$$.update=()=>{1&e.$$.dirty&&n(5,o=a),33&e.$$.dirty&&o!==a&&n(5,o=a),1026&e.$$.dirty&&d&&r&&n(10,d=!1),1024&e.$$.dirty&&d&&$e&&qe.set(!0),1024&e.$$.dirty&&!d&&$e&&qe.set(!1)},[a,r,i,l,c,o,s,()=>{Ct.add(i),Ie.set(i),n(10,d=!0)},()=>{Ct.delete(i),Ie.set(1===Ct.size?[...Ct][0]:null),n(10,d=!1)},p,d,function(){o=this.value,n(5,o),n(0,a)}]}class Pt extends re{constructor(e){super(),ae(this,e,At,kt,a,{replacement:0,disabled:1,ogchar:2,disableUnderline:3,tag:4})}}function Bt(e,t,n){const o=e.slice();o[8]=t[n],o[11]=n;const s=o[4][o[11]];o[2]=s;const a=""!==o[2]&&o[3].has(o[2]);return o[9]=a,o}function St(e){let t,n,o,s,a,r,i,l=e[8]+"";return a=new Pt({props:{replacement:e[2],disabled:e[1],ogchar:e[0][e[11]]}}),a.$on("error",e[5]),a.$on("replace",e[6]),{c(){t=v("div"),n=v("div"),o=x(l),s=k(),te(a.$$.fragment),r=k(),P(n,"class","cipher-letter svelte-p18iy7"),P(t,"class","plain-encrypt-pair svelte-p18iy7"),T(t,"duplicate",e[9])},m(e,l){g(e,t,l),w(t,n),w(n,o),w(t,s),ne(a,t,null),w(t,r),i=!0},p(e,n){(!i||1&n)&&l!==(l=e[8]+"")&&B(o,l);const s={};16&n&&(s.replacement=e[2]),2&n&&(s.disabled=e[1]),1&n&&(s.ogchar=e[0][e[11]]),a.$set(s),24&n&&T(t,"duplicate",e[9])},i(e){i||(G(a.$$.fragment,e),i=!0)},o(e){Q(a.$$.fragment,e),i=!1},d(e){e&&b(t),oe(a)}}}function Et(e){let t,n,o=e[0],s=[];for(let t=0;tQ(s[e],1,1,(()=>{s[e]=null}));return{c(){t=v("div");for(let e=0;e{"word"in e&&n(0,a=e.word),"replacement"in e&&n(2,r=e.replacement),"disabled"in e&&n(1,i=e.disabled)},e.$$.update=()=>{5&e.$$.dirty&&n(4,o=((e,t)=>[...e].map((e=>{const n=ke.indexOf(e);return-1===n?null:t[n]})))(a,r)),4&e.$$.dirty&&n(3,s=(e=>{const t=new Set,n=new Set;for(const o of e)n.has(o)&&t.add(o),n.add(o);return t})(r))},[a,i,r,s,o,function(t){M.call(this,e,t)},function(t){M.call(this,e,t)}]}class jt extends re{constructor(e){super(),ae(this,e,Tt,Et,a,{word:0,replacement:2,disabled:1})}}function Ot(e,t,n){const o=e.slice();o[6]=t[n],o[10]=n;const s=`replacement-${o[10]}`;o[7]=s;const a=o[2].has(o[6]);return o[8]=a,o}function zt(e){let t,n,o,s,a,r,i,l,c,u,d,p=e[6]+"",m=(e[8]?e[2].get(e[6]):0)+"";return c=new Pt({props:{tag:"td",replacement:e[0][e[10]],disabled:e[1]||!e[8],ogchar:e[6],disableUnderline:!0}}),c.$on("error",e[4]),c.$on("replace",e[5]),{c(){t=v("tr"),n=v("td"),o=x(p),a=k(),r=v("td"),i=x(m),l=k(),te(c.$$.fragment),u=k(),P(n,"id",s=e[7]),P(t,"class","svelte-e1zesz"),T(t,"no-occurence",!e[8])},m(e,s){g(e,t,s),w(t,n),w(n,o),w(t,a),w(t,r),w(r,i),w(t,l),ne(c,t,null),w(t,u),d=!0},p(e,n){(!d||4&n)&&m!==(m=(e[8]?e[2].get(e[6]):0)+"")&&B(i,m);const o={};1&n&&(o.replacement=e[0][e[10]]),6&n&&(o.disabled=e[1]||!e[8]),c.$set(o),4&n&&T(t,"no-occurence",!e[8])},i(e){d||(G(c.$$.fragment,e),d=!0)},o(e){Q(c.$$.fragment,e),d=!1},d(e){e&&b(t),oe(c)}}}function Lt(e){let t,n,o,s,a,r,i,l,c,u,d,p,m=ke,f=[];for(let t=0;tQ(f[e],1,1,(()=>{f[e]=null}));return{c(){t=v("table"),n=v("tr"),o=v("td"),s=x("-"),a=k(),r=v("td"),i=x("#"),l=k(),c=v("td"),u=x("🠗"),d=k();for(let e=0;e{"replacement"in e&&n(0,s=e.replacement),"quote"in e&&n(3,a=e.quote),"disabled"in e&&n(1,r=e.disabled)},e.$$.update=()=>{8&e.$$.dirty&&n(2,o=(e=>{const t=new Map;for(const n of e)t.set(n,(t.has(n)?t.get(n):0)+1);return t})(a))},[s,r,o,a,function(t){M.call(this,e,t)},function(t){M.call(this,e,t)}]}class qt extends re{constructor(e){super(),ae(this,e,Mt,Lt,a,{replacement:0,quote:3,disabled:1})}}function It(e,t,n){const o=e.slice();return o[11]=t[n],o}function Dt(e){let t,n,o,s,a,r,i,l,c,u=e[0].author+"",d=e[0].hint&&Nt(e),p=e[3],m=[];for(let t=0;tQ(m[e],1,1,(()=>{m[e]=null}));return l=new qt({props:{replacement:e[1],quote:e[0].ciphertext,disabled:e[2]}}),l.$on("replace",e[4]),l.$on("error",e[6]),{c(){t=v("p"),n=x("Solve this quote by "),o=x(u),s=k(),d&&d.c(),a=k(),r=v("div");for(let e=0;e{o=null})),J())},i(e){n||(G(o),n=!0)},o(e){Q(o),n=!1},d(e){o&&o.d(e),e&&b(t)}}}function Rt(e,t,n){let o,s,{problem:a=null}=t;const r=L();let i=Array(26).fill("");const l=(e,t)=>[...t].map((t=>ke.includes(t)&&""!==e[ke.indexOf(t)]));return e.$$set=e=>{"problem"in e&&n(0,a=e.problem)},e.$$.update=()=>{1&e.$$.dirty&&n(1,i=Array(26).fill("")),1&e.$$.dirty&&n(3,o=wt(a?.ciphertext??"")),3&e.$$.dirty&&n(2,s=((e,t)=>!!t&&[...t.ciphertext].every(((n,o)=>!ke.includes(n)||t.plaintext[o]===e[ke.indexOf(n)])))(i,a)),4&e.$$.dirty&&s&&r("solved"),3&e.$$.dirty&&r("progress",{progress:l(i,a?.ciphertext??"")}),e.$$.dirty},[a,i,s,o,e=>(({from:e,to:t})=>{if((1!==t.length||!/[a-zA-Z]/.test(t))&&"BACKSPACE"!==t)return;const o=[...i];o[ke.indexOf(e)]="BACKSPACE"===t?"":t,n(1,i=o)})(e.detail),function(t){M.call(this,e,t)},function(t){M.call(this,e,t)}]}class _t extends re{constructor(e){super(),ae(this,e,Rt,Vt,a,{problem:0})}}function Ut(t){let n,o,s,a,r,i,l,c;return{c(){n=v("div"),o=v("label"),s=x(t[2]),a=k(),r=v("input"),P(o,"for","username"),P(r,"type","text"),P(r,"id","username"),P(r,"name","username"),r.disabled=i=null!==t[3],P(n,"class","name-chooser svelte-1mwrz3m")},m(e,i){g(e,n,i),w(n,o),w(o,s),w(n,a),w(n,r),S(r,t[4]),l||(c=A(r,"input",t[5]),l=!0)},p(e,[t]){4&t&&B(s,e[2]),8&t&&i!==(i=null!==e[3])&&(r.disabled=i),16&t&&r.value!==e[4]&&S(r,e[4])},i:e,o:e,d(e){e&&b(n),l=!1,c()}}}function Yt(t,n,o){let s,a,r=e,i=()=>(r(),r=l(d,(e=>o(3,s=e))),d),c=e,u=()=>(c(),c=l(p,(e=>o(4,a=e))),p);t.$$.on_destroy.push((()=>r())),t.$$.on_destroy.push((()=>c()));let{gameProblem:d=Se}=n;i();let{name:p=Ee}=n;u();let{label:m="Username"}=n;return t.$$set=e=>{"gameProblem"in e&&i(o(0,d=e.gameProblem)),"name"in e&&u(o(1,p=e.name)),"label"in e&&o(2,m=e.label)},[d,p,m,s,a,function(){a=this.value,p.set(a)}]}class Ft extends re{constructor(e){super(),ae(this,e,Yt,Ut,a,{gameProblem:0,name:1,label:2})}}function Zt(t){let n;return{c(){n=v("p"),n.textContent="Acquiring join link...",P(n,"class","waiting")},m(e,t){g(e,n,t)},p:e,d(e){e&&b(n)}}}function Wt(e){let t,n,o;let s=function(e,t){return e[4]?Xt:Kt}(e),a=s(e);return{c(){a.c(),t=k(),n=v("a"),o=x(e[3]),P(n,"href",e[3])},m(e,s){a.m(e,s),g(e,t,s),g(e,n,s),w(n,o)},p(e,t){a.p(e,t),8&t&&B(o,e[3]),8&t&&P(n,"href",e[3])},d(e){a.d(e),e&&b(t),e&&b(n)}}}function Kt(e){let t,n,o,s,a=e[2]?"Join Link (copied)":"Copy Join Link";return{c(){t=v("button"),n=x(a),P(t,"class","join-link svelte-16gx6dp")},m(a,r){g(a,t,r),w(t,n),o||(s=A(t,"click",e[5]),o=!0)},p(e,t){4&t&&a!==(a=e[2]?"Join Link (copied)":"Copy Join Link")&&B(n,a)},d(e){e&&b(t),o=!1,s()}}}function Xt(t){let n,o,s;return{c(){n=v("button"),n.textContent="Share Link",P(n,"class","join-link svelte-16gx6dp")},m(e,a){g(e,n,a),o||(s=A(n,"click",t[6]),o=!0)},p:e,d(e){e&&b(n),o=!1,s()}}}function Jt(t){let n;function o(e,t){return""!==e[1]?Wt:Zt}let s=o(t),a=s(t);return{c(){n=v("div"),a.c(),P(n,"class","join-links svelte-16gx6dp")},m(e,t){g(e,n,t),a.m(n,null)},p(e,[t]){s===(s=o(e))&&a?a.p(e,t):(a.d(1),a=s(e),a&&(a.c(),a.m(n,null)))},i:e,o:e,d(e){e&&b(n),a.d()}}}function Gt(t,n,o){let s,a,r=e,i=()=>(r(),r=l(c,(e=>o(1,a=e))),c);t.$$.on_destroy.push((()=>r()));let{id:c=Be}=n;i();let u=!1,d="share"in navigator;return t.$$set=e=>{"id"in e&&i(o(0,c=e.id))},t.$$.update=()=>{2&t.$$.dirty&&o(3,s=(e=>ve?`${window.location.href}?game=${encodeURIComponent(e)}`:window.location.href)(a))},[c,a,u,s,d,()=>{navigator.clipboard.writeText(s),o(2,u=!0)},()=>{navigator.share({title:"Cryptoduel",text:"Join my cryptoduel game!",url:s}),o(2,u=!0)}]}class Qt extends re{constructor(e){super(),ae(this,e,Gt,Jt,a,{id:0})}}const en=(e,t)=>Math.floor(e/Math.pow(10,t)%10),tn=(e,t)=>!(en(e,t)%2),nn=(e,t,n)=>{let o=e%t;return n&&en(e,n)%2==0?-o:o},on=(e,t,n)=>t[e%n],sn={colors:["#92A1C6","#146A7C","#F0AB3D","#C271B4","#C20D90"],name:"Clara Barton",square:!1,size:40};function an(t){let n;return{c(){n=$("path"),P(n,"d","M13,"+(19+t[2].mouthSpread)+" a1,0.75 0 0,0 10,0"),P(n,"fill",t[2].faceColor)},m(e,t){g(e,n,t)},p:e,d(e){e&&b(n)}}}function rn(t){let n;return{c(){n=$("path"),P(n,"d","M15 "+(19+t[2].mouthSpread)+"c2 1 4 1 6 0"),P(n,"stroke",t[2].faceColor),P(n,"fill","none"),P(n,"stroke-linecap","round")},m(e,t){g(e,n,t)},p:e,d(e){e&&b(n)}}}function ln(t){let n,o,s,a,r,i,l,c,u,d;let p=function(e,t){return e[2].isMouthOpen?rn:an}(t),m=p(t);return{c(){n=$("svg"),o=$("mask"),s=$("rect"),r=$("g"),i=$("rect"),l=$("rect"),c=$("g"),m.c(),u=$("rect"),d=$("rect"),P(s,"width",cn),P(s,"height",cn),P(s,"rx",a=t[1]?void 0:2*cn),P(s,"fill","white"),P(o,"id","mask__beam"),P(o,"maskUnits","userSpaceOnUse"),P(o,"x",0),P(o,"y",0),P(o,"width",cn),P(o,"height",cn),P(i,"width",cn),P(i,"height",cn),P(i,"fill",t[2].backgroundColor),P(l,"x","0"),P(l,"y","0"),P(l,"width",cn),P(l,"height",cn),P(l,"transform","translate("+t[2].wrapperTranslateX+" "+t[2].wrapperTranslateY+") rotate("+t[2].wrapperRotate+" "+cn/2+" "+cn/2+") scale("+t[2].wrapperScale+")"),P(l,"fill",t[2].wrapperColor),P(l,"rx",t[2].isCircle?cn:cn/6),P(u,"x",14-t[2].eyeSpread),P(u,"y",14),P(u,"width",1.5),P(u,"height",2),P(u,"rx",1),P(u,"stroke","none"),P(u,"fill",t[2].faceColor),P(d,"x",20+t[2].eyeSpread),P(d,"y",14),P(d,"width",1.5),P(d,"height",2),P(d,"rx",1),P(d,"stroke","none"),P(d,"fill",t[2].faceColor),P(c,"transform","translate("+t[2].faceTranslateX+" "+t[2].faceTranslateY+") rotate("+t[2].faceRotate+" "+cn/2+" "+cn/2+")"),P(r,"mask","url(#mask__beam)"),P(n,"viewBox","0 0 "+cn+" "+cn),P(n,"fill","none"),P(n,"xmlns","http://www.w3.org/2000/svg"),P(n,"width",t[0]),P(n,"height",t[0]),P(n,"data-testid","avatar-beam")},m(e,t){g(e,n,t),w(n,o),w(o,s),w(n,r),w(r,i),w(r,l),w(r,c),m.m(c,null),w(c,u),w(c,d)},p(e,[t]){2&t&&a!==(a=e[1]?void 0:2*cn)&&P(s,"rx",a),m.p(e,t),1&t&&P(n,"width",e[0]),1&t&&P(n,"height",e[0])},i:e,o:e,d(e){e&&b(n),m.d()}}}const cn=36;function un(e,t,n){let{size:o=sn.size}=t,{name:s=sn.name}=t,{square:a=sn.square}=t,{colors:r=sn.colors}=t;const i=function(e,t){const n=(e=>{const t=Array.from(e);let n=0;return t.forEach((e=>n+=e.charCodeAt(0))),n})(e),o=t&&t.length,s=on(n,t,o),a=nn(n,10,1),r=a<5?a+cn/9:a,i=nn(n,10,2),l=i<5?i+cn/9:i;var c;return{wrapperColor:s,faceColor:(c=s,"#"===c.slice(0,1)&&(c=c.slice(1)),(299*parseInt(c.substr(0,2),16)+587*parseInt(c.substr(2,2),16)+114*parseInt(c.substr(4,2),16))/1e3>=128?"black":"white"),backgroundColor:on(n+13,t,o),wrapperTranslateX:r,wrapperTranslateY:l,wrapperRotate:nn(n,360),wrapperScale:1+nn(n,cn/12)/10,isMouthOpen:tn(n,2),isCircle:tn(n,1),eyeSpread:nn(n,5),mouthSpread:nn(n,3),faceRotate:nn(n,10,3),faceTranslateX:r>cn/6?r/2:nn(n,8,1),faceTranslateY:l>cn/6?l/2:nn(n,7,2)}}(s,r);return e.$$set=e=>{"size"in e&&n(0,o=e.size),"name"in e&&n(3,s=e.name),"square"in e&&n(1,a=e.square),"colors"in e&&n(4,r=e.colors)},[o,a,i,s,r]}var dn=class extends re{constructor(e){super(),ae(this,e,un,ln,a,{size:0,name:3,square:1,colors:4})}};function pn(e){let t,n,o;return n=new dn({props:{size:e[1],name:e[0],colors:["#92A1C6","#146A7C","#F0AB3D","#C271B4","#C20D90"]}}),{c(){t=v("div"),te(n.$$.fragment),P(t,"class","user-bubble svelte-16dwoac"),P(t,"title",e[0]),E(t,"--size",e[1]+"px")},m(e,s){g(e,t,s),ne(n,t,null),o=!0},p(e,[s]){const a={};2&s&&(a.size=e[1]),1&s&&(a.name=e[0]),n.$set(a),(!o||1&s)&&P(t,"title",e[0]),(!o||2&s)&&E(t,"--size",e[1]+"px")},i(e){o||(G(n.$$.fragment,e),o=!0)},o(e){Q(n.$$.fragment,e),o=!1},d(e){e&&b(t),oe(n)}}}function mn(e,t,n){let{name:o=""}=t,{size:s=16}=t;return e.$$set=e=>{"name"in e&&n(0,o=e.name),"size"in e&&n(1,s=e.size)},[o,s]}class fn extends re{constructor(e){super(),ae(this,e,mn,pn,a,{name:0,size:1})}}function hn(e,t,n){const o=e.slice();return o[7]=t[n],o}function wn(e,t,n){const o=e.slice();return o[10]=t[n],o}function gn(e){let t;return{c(){t=v("div"),P(t,"class","progress-item svelte-wvako2"),T(t,"has-done",e[10])},m(e,n){g(e,t,n)},p(e,n){24&n&&T(t,"has-done",e[10])},d(e){e&&b(t)}}}function bn(e){let t,n,o,s,a,r;n=new fn({props:{name:e[7].name}});let i=e[7].progress??e[3],l=[];for(let t=0;tQ(s[e],1,1,(()=>{s[e]=null}));return{c(){t=v("div");for(let e=0;e(c(),c=l(w,(e=>o(6,a=e))),w),d=e,p=()=>(d(),d=l(h,(e=>o(4,r=e))),h),m=e,f=()=>(m(),m=l(g,(e=>o(5,i=e))),g);t.$$.on_destroy.push((()=>c())),t.$$.on_destroy.push((()=>d())),t.$$.on_destroy.push((()=>m()));let{users:h=Pe}=n;p();let{gameProblem:w=Se}=n;u();let{timeTakenByOpponents:g=Re}=n;return f(),t.$$set=e=>{"users"in e&&p(o(0,h=e.users)),"gameProblem"in e&&u(o(1,w=e.gameProblem)),"timeTakenByOpponents"in e&&f(o(2,g=e.timeTakenByOpponents))},t.$$.update=()=>{var e;64&t.$$.dirty&&o(3,s=null===(e=a)?[]:[...e.ciphertext].map((e=>!1)))},[h,w,g,s,r,i,a]}class $n extends re{constructor(e){super(),ae(this,e,vn,yn,a,{users:0,gameProblem:1,timeTakenByOpponents:2})}}function xn(e,t,n){const o=e.slice();return o[2]=t[n],o}function kn(t){let n;return{c(){n=v("span"),n.textContent="waiting for some cool cryptographers"},m(e,t){g(e,n,t)},p:e,d(e){e&&b(n)}}}function Cn(e){let t,n;return t=new fn({props:{name:e[2].name}}),{c(){te(t.$$.fragment)},m(e,o){ne(t,e,o),n=!0},p(e,n){const o={};2&n&&(o.name=e[2].name),t.$set(o)},i(e){n||(G(t.$$.fragment,e),n=!0)},o(e){Q(t.$$.fragment,e),n=!1},d(e){oe(t,e)}}}function An(e){let t,n,o=e[1],s=[];for(let t=0;tQ(s[e],1,1,(()=>{s[e]=null}));let r=null;return o.length||(r=kn()),{c(){t=v("div");for(let e=0;e(a(),a=l(i,(e=>o(1,s=e))),i);t.$$.on_destroy.push((()=>a()));let{users:i=Pe}=n;return r(),t.$$set=e=>{"users"in e&&r(o(0,i=e.users))},[i,s]}class Bn extends re{constructor(e){super(),ae(this,e,Pn,An,a,{users:0})}}function Sn(e){let t,n,s,a;const r=e[6].default,i=d(r,e,e[5],null),l=i||function(e){let t;return{c(){t=x("Play")},m(e,n){g(e,t,n)},d(e){e&&b(t)}}}();return{c(){t=v("button"),l&&l.c(),P(t,"tabindex","0"),P(t,"class","play-button svelte-1n9p51n"),T(t,"exiting",e[0]),T(t,"starting-exit",e[1])},m(o,r){g(o,t,r),l&&l.m(t,null),n=!0,s||(a=[A(t,"click",e[3]),A(t,"touchstart",e[3],{passive:!0}),A(t,"focus",e[7]),A(t,"blur",e[8])],s=!0)},p(e,[o]){i&&i.p&&(!n||32&o)&&f(i,r,e,e[5],n?m(r,e[5],o,null):h(e[5]),null),1&o&&T(t,"exiting",e[0]),2&o&&T(t,"starting-exit",e[1])},i(e){n||(G(l,e),n=!0)},o(e){Q(l,e),n=!1},d(e){e&&b(t),l&&l.d(e),s=!1,o(a)}}}function En(e,t,n){let{$$slots:o={},$$scope:s}=t,{exiting:a=!1}=t,{startingExit:r=!1}=t,{handleExtensionWait:i=200}=t;const l=ue(!1);let c=!1,u=-1;const d=(e=!1)=>{clearTimeout(u),l.set(!1),u=setTimeout((()=>{l.set(c||e)}),i)};return e.$$set=e=>{"exiting"in e&&n(0,a=e.exiting),"startingExit"in e&&n(1,r=e.startingExit),"handleExtensionWait"in e&&n(4,i=e.handleExtensionWait),"$$scope"in e&&n(5,s=e.$$scope)},e.$$.update=()=>{4&e.$$.dirty&&c&&d()},[a,r,c,()=>{n(1,r=!0),c||d(!0);const e=l.subscribe((t=>{t&&(n(0,a=!0),setTimeout((()=>Me.set(!1)),500),setTimeout((()=>e())))}))},i,s,o,()=>n(2,c=!0),()=>n(2,c=!1)]}class Tn extends re{constructor(e){super(),ae(this,e,En,Sn,a,{exiting:0,startingExit:1,handleExtensionWait:4})}}function jn(e){let t;return{c(){t=v("p"),t.textContent="The table given shows the amount of times each character appears in the\n quote as well as the replacement for each character. You may either enter\n replacment characters into the table or under each character of the quote."},m(e,n){g(e,t,n)},d(e){e&&b(t)}}}function On(t){let n,o,s,a,r,i=t[0]&&jn();return{c(){n=v("p"),n.textContent="An aristocrat cryptogram is a quote encrypted by substituting each letter with\n another letter. A patristocrat cryptogram is an aristocrat with all whitespace\n and punctuation removed.",o=k(),s=v("p"),s.textContent="In cryptoduel, you compete with friends to see who can decrypt the quote the\n fastest!",a=k(),i&&i.c(),r=C()},m(e,t){g(e,n,t),g(e,o,t),g(e,s,t),g(e,a,t),i&&i.m(e,t),g(e,r,t)},p(e,[t]){e[0]?i||(i=jn(),i.c(),i.m(r.parentNode,r)):i&&(i.d(1),i=null)},i:e,o:e,d(e){e&&b(n),e&&b(o),e&&b(s),e&&b(a),i&&i.d(e),e&&b(r)}}}function zn(e,t,n){let{verbose:o=!1}=t;return e.$$set=e=>{"verbose"in e&&n(0,o=e.verbose)},[o]}class Ln extends re{constructor(e){super(),ae(this,e,zn,On,a,{verbose:0})}}function Mn(e){let t;return{c(){t=x("Play")},m(e,n){g(e,t,n)},d(e){e&&b(t)}}}function qn(e){let t,n,o,s,a,i,l,c,u,d,p,m,f;function h(t){e[1](t)}l=new Ln({}),u=new Ft({props:{label:"Choose your cryptographer alias"}});let y={$$slots:{default:[Mn]},$$scope:{ctx:e}};return void 0!==e[0]&&(y.exiting=e[0]),p=new Tn({props:y}),I.push((()=>ee(p,"exiting",h))),{c(){var m,f;t=v("div"),n=v("h1"),n.innerHTML='Welcome to Cryptoduel',o=k(),s=v("img"),i=k(),te(l.$$.fragment),c=k(),te(u.$$.fragment),d=k(),te(p.$$.fragment),P(n,"class","svelte-4jfqlb"),P(s,"alt","cryptogram logo"),m=s.src,f=a="./cryptoduel-logo.svg",r||(r=document.createElement("a")),r.href=f,m!==r.href&&P(s,"src","./cryptoduel-logo.svg"),P(s,"width","200"),P(t,"class","container svelte-4jfqlb"),T(t,"exiting",e[0])},m(e,a){g(e,t,a),w(t,n),w(t,o),w(t,s),w(t,i),ne(l,t,null),w(t,c),ne(u,t,null),w(t,d),ne(p,t,null),f=!0},p(e,[n]){const o={};4&n&&(o.$$scope={dirty:n,ctx:e}),!m&&1&n&&(m=!0,o.exiting=e[0],_((()=>m=!1))),p.$set(o),1&n&&T(t,"exiting",e[0])},i(e){f||(G(l.$$.fragment,e),G(u.$$.fragment,e),G(p.$$.fragment,e),f=!0)},o(e){Q(l.$$.fragment,e),Q(u.$$.fragment,e),Q(p.$$.fragment,e),f=!1},d(e){e&&b(t),oe(l),oe(u),oe(p)}}}function In(e,t,n){let o=!1;return z((()=>Ee.update((e=>e)))),[o,function(e){o=e,n(0,o)}]}class Dn extends re{constructor(e){super(),ae(this,e,In,qn,a,{})}}function Nn(t){let n,o,s,a,r,i,l;return{c(){n=v("div"),o=v("input"),s=k(),a=v("label"),r=x(t[2]),P(o,"id",t[1]),P(o,"class","moe-component svelte-14usdwm"),o.disabled=t[3],P(o,"type","checkbox"),P(o,"name",t[1]),P(a,"for",t[1]),P(n,"class","checkbox-option svelte-14usdwm")},m(e,c){g(e,n,c),w(n,o),o.checked=t[0],w(n,s),w(n,a),w(a,r),i||(l=A(o,"change",t[4]),i=!0)},p(e,[t]){2&t&&P(o,"id",e[1]),8&t&&(o.disabled=e[3]),2&t&&P(o,"name",e[1]),1&t&&(o.checked=e[0]),4&t&&B(r,e[2]),2&t&&P(a,"for",e[1])},i:e,o:e,d(e){e&&b(n),i=!1,l()}}}function Hn(e,t,n){let{checked:o=!1}=t,{id:s=""}=t,{label:a=""}=t,{disabled:r=!1}=t;return e.$$set=e=>{"checked"in e&&n(0,o=e.checked),"id"in e&&n(1,s=e.id),"label"in e&&n(2,a=e.label),"disabled"in e&&n(3,r=e.disabled)},[o,s,a,r,function(){o=this.checked,n(0,o)}]}class Vn extends re{constructor(e){super(),ae(this,e,Hn,Nn,a,{checked:0,id:1,label:2,disabled:3})}}function Rn(e){let t,n,o,s,a,r,i,l,c,u,p;const y=e[9].default,$=d(y,e,e[8],null);return{c(){t=v("div"),n=v("div"),o=v("span"),s=k(),a=v("span"),r=x(e[0]),i=k(),l=v("div"),$&&$.c(),P(o,"class","dropdown-arrow svelte-1k4amws"),P(a,"class","title-text"),P(n,"class","panel-title svelte-1k4amws"),P(l,"class","panel-content svelte-1k4amws"),P(t,"class","panel svelte-1k4amws"),P(t,"style",e[3]),T(t,"expanded",e[2]),T(t,"dense",e[1])},m(d,m){g(d,t,m),w(t,n),w(n,o),w(n,s),w(n,a),w(a,r),w(t,i),w(t,l),$&&$.m(l,null),c=!0,u||(p=A(n,"click",e[10]),u=!0)},p(e,[n]){(!c||1&n)&&B(r,e[0]),$&&$.p&&(!c||256&n)&&f($,y,e,e[8],c?m(y,e[8],n,null):h(e[8]),null),(!c||8&n)&&P(t,"style",e[3]),4&n&&T(t,"expanded",e[2]),2&n&&T(t,"dense",e[1])},i(e){c||(G($,e),c=!0)},o(e){Q($,e),c=!1},d(e){e&&b(t),$&&$.d(e),u=!1,p()}}}function _n(e,t,n){let o,s,{$$slots:a={},$$scope:r}=t,{style:i=""}=t,{flyInMs:l=300}=t,{title:c=""}=t,{closed:d=!1}=t,{dense:p=!1}=t;const m=me(`panel-${c}`,!d);u(e,m,(e=>n(2,s=e)));return e.$$set=e=>{"style"in e&&n(6,i=e.style),"flyInMs"in e&&n(7,l=e.flyInMs),"title"in e&&n(0,c=e.title),"closed"in e&&n(5,d=e.closed),"dense"in e&&n(1,p=e.dense),"$$scope"in e&&n(8,r=e.$$scope)},e.$$.update=()=>{4&e.$$.dirty&&n(5,d=!s),192&e.$$.dirty&&n(3,o=`${i} --fly-in-duration: ${l}ms`)},[c,p,s,o,m,d,i,l,r,a,()=>m.update((e=>!e))]}class Un extends re{constructor(e){super(),ae(this,e,_n,Rn,a,{style:6,flyInMs:7,title:0,closed:5,dense:1})}}function Yn(e){let t,n;return t=new Qt({}),{c(){te(t.$$.fragment)},m(e,o){ne(t,e,o),n=!0},i(e){n||(G(t.$$.fragment,e),n=!0)},o(e){Q(t.$$.fragment,e),n=!1},d(e){oe(t,e)}}}function Fn(e){let t,n,o,s,a,r,i,l,c;function u(t){e[7](t)}n=new Ft({});let d={id:"patristocrat-option",label:"Patristocrat",disabled:null!==e[3]};function p(t){e[8](t)}void 0!==e[2]&&(d.checked=e[2]),s=new Vn({props:d}),I.push((()=>ee(s,"checked",u)));let m={id:"hint-option",label:"Hint",disabled:null!==e[3]};return void 0!==e[1]&&(m.checked=e[1]),i=new Vn({props:m}),I.push((()=>ee(i,"checked",p))),{c(){t=v("div"),te(n.$$.fragment),o=k(),te(s.$$.fragment),r=k(),te(i.$$.fragment),P(t,"class","row svelte-lfiz6y")},m(e,a){g(e,t,a),ne(n,t,null),w(t,o),ne(s,t,null),w(t,r),ne(i,t,null),c=!0},p(e,t){const n={};8&t&&(n.disabled=null!==e[3]),!a&&4&t&&(a=!0,n.checked=e[2],_((()=>a=!1))),s.$set(n);const o={};8&t&&(o.disabled=null!==e[3]),!l&&2&t&&(l=!0,o.checked=e[1],_((()=>l=!1))),i.$set(o)},i(e){c||(G(n.$$.fragment,e),G(s.$$.fragment,e),G(i.$$.fragment,e),c=!0)},o(e){Q(n.$$.fragment,e),Q(s.$$.fragment,e),Q(i.$$.fragment,e),c=!1},d(e){e&&b(t),oe(n),oe(s),oe(i)}}}function Zn(t){let n,o;return n=new Ln({props:{verbose:!0}}),{c(){te(n.$$.fragment)},m(e,t){ne(n,e,t),o=!0},p:e,i(e){o||(G(n.$$.fragment,e),o=!0)},o(e){Q(n.$$.fragment,e),o=!1},d(e){oe(n,e)}}}function Wn(e){let t,n;return t=new Un({props:{title:"Lobby",$$slots:{default:[Xn]},$$scope:{ctx:e}}}),{c(){te(t.$$.fragment)},m(e,o){ne(t,e,o),n=!0},p(e,n){const o={};16384&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(G(t.$$.fragment,e),n=!0)},o(e){Q(t.$$.fragment,e),n=!1},d(e){oe(t,e)}}}function Kn(e){let t,n;return t=new Un({props:{title:"Connecting...",$$slots:{default:[Jn]},$$scope:{ctx:e}}}),{c(){te(t.$$.fragment)},m(e,o){ne(t,e,o),n=!0},p(e,n){const o={};16384&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(G(t.$$.fragment,e),n=!0)},o(e){Q(t.$$.fragment,e),n=!1},d(e){oe(t,e)}}}function Xn(e){let t,n;return t=new Bn({}),{c(){te(t.$$.fragment)},m(e,o){ne(t,e,o),n=!0},i(e){n||(G(t.$$.fragment,e),n=!0)},o(e){Q(t.$$.fragment,e),n=!1},d(e){oe(t,e)}}}function Jn(t){let n,o,s=(ye??"")+"";return{c(){n=x("Connecting to "),o=x(s)},m(e,t){g(e,n,t),g(e,o,t)},p:e,d(e){e&&b(n),e&&b(o)}}}function Gn(e){let t,n;return t=new Un({props:{title:"Progress",$$slots:{default:[Qn]},$$scope:{ctx:e}}}),{c(){te(t.$$.fragment)},m(e,o){ne(t,e,o),n=!0},i(e){n||(G(t.$$.fragment,e),n=!0)},o(e){Q(t.$$.fragment,e),n=!1},d(e){oe(t,e)}}}function Qn(e){let t,n;return t=new $n({}),{c(){te(t.$$.fragment)},m(e,o){ne(t,e,o),n=!0},i(e){n||(G(t.$$.fragment,e),n=!0)},o(e){Q(t.$$.fragment,e),n=!1},d(e){oe(t,e)}}}function eo(e){let t,n;return t=new Un({props:{title:"Game",$$slots:{default:[no]},$$scope:{ctx:e}}}),{c(){te(t.$$.fragment)},m(e,o){ne(t,e,o),n=!0},p(e,n){const o={};16392&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(G(t.$$.fragment,e),n=!0)},o(e){Q(t.$$.fragment,e),n=!1},d(e){oe(t,e)}}}function to(e){let t,n;return t=new _t({props:{problem:e[3]}}),t.$on("progress",e[9]),t.$on("solved",e[10]),t.$on("error",e[11]),{c(){te(t.$$.fragment)},m(e,o){ne(t,e,o),n=!0},p(e,n){const o={};8&n&&(o.problem=e[3]),t.$set(o)},i(e){n||(G(t.$$.fragment,e),n=!0)},o(e){Q(t.$$.fragment,e),n=!1},d(e){oe(t,e)}}}function no(t){let n,o,s,a=t[3]&&to(t),r=ve&&function(t){let n,o,s;return{c(){n=v("button"),n.textContent="New Problem"},m(e,a){g(e,n,a),o||(s=A(n,"click",t[5]),o=!0)},p:e,d(e){e&&b(n),o=!1,s()}}}(t);return{c(){a&&a.c(),n=k(),r&&r.c(),o=C()},m(e,t){a&&a.m(e,t),g(e,n,t),r&&r.m(e,t),g(e,o,t),s=!0},p(e,t){e[3]?a?(a.p(e,t),8&t&&G(a,1)):(a=to(e),a.c(),G(a,1),a.m(n.parentNode,n)):a&&(X(),Q(a,1,1,(()=>{a=null})),J()),ve&&r.p(e,t)},i(e){s||(G(a),s=!0)},o(e){Q(a),s=!1},d(e){a&&a.d(e),e&&b(n),r&&r.d(e),e&&b(o)}}}function oo(e){let t,n,o,s,a,r,i,l,c,u,d,p,m;o=new Un({props:{title:"Join Info",$$slots:{default:[Yn]},$$scope:{ctx:e}}}),a=new Un({props:{title:"Settings",$$slots:{default:[Fn]},$$scope:{ctx:e}}}),i=new Un({props:{title:"Help",dense:!0,closed:!0,$$slots:{default:[Zn]},$$scope:{ctx:e}}});const f=[Kn,Wn],h=[];function y(e,t){return e[0]?0:e[4].length>0?1:-1}~(c=y(e))&&(u=h[c]=f[c](e));let $=e[4].length>0&&e[3]&&Gn(e),x=(e[3]||ve)&&eo(e);return{c(){t=v("div"),n=v("div"),te(o.$$.fragment),s=k(),te(a.$$.fragment),r=k(),te(i.$$.fragment),l=k(),u&&u.c(),d=k(),$&&$.c(),p=k(),x&&x.c(),P(n,"class","row svelte-lfiz6y"),P(t,"class","game svelte-lfiz6y")},m(e,u){g(e,t,u),w(t,n),ne(o,n,null),w(n,s),ne(a,n,null),w(t,r),ne(i,t,null),w(t,l),~c&&h[c].m(t,null),w(t,d),$&&$.m(t,null),w(t,p),x&&x.m(t,null),m=!0},p(e,[n]){const s={};16384&n&&(s.$$scope={dirty:n,ctx:e}),o.$set(s);const r={};16398&n&&(r.$$scope={dirty:n,ctx:e}),a.$set(r);const l={};16384&n&&(l.$$scope={dirty:n,ctx:e}),i.$set(l);let m=c;c=y(e),c===m?~c&&h[c].p(e,n):(u&&(X(),Q(h[m],1,1,(()=>{h[m]=null})),J()),~c?(u=h[c],u?u.p(e,n):(u=h[c]=f[c](e),u.c()),G(u,1),u.m(t,d)):u=null),e[4].length>0&&e[3]?$?24&n&&G($,1):($=Gn(e),$.c(),G($,1),$.m(t,p)):$&&(X(),Q($,1,1,(()=>{$=null})),J()),e[3]||ve?x?(x.p(e,n),8&n&&G(x,1)):(x=eo(e),x.c(),G(x,1),x.m(t,null)):x&&(X(),Q(x,1,1,(()=>{x=null})),J())},i(e){m||(G(o.$$.fragment,e),G(a.$$.fragment,e),G(i.$$.fragment,e),G(u),G($),G(x),m=!0)},o(e){Q(o.$$.fragment,e),Q(a.$$.fragment,e),Q(i.$$.fragment,e),Q(u),Q($),Q(x),m=!1},d(e){e&&b(t),oe(o),oe(a),oe(i),~c&&h[c].d(),$&&$.d(),x&&x.d()}}}function so(e,t,n){let o,s,a,r,i,l;u(e,Oe,(e=>n(6,s=e))),u(e,je,(e=>n(1,a=e))),u(e,Te,(e=>n(2,r=e))),u(e,Se,(e=>n(3,i=e))),u(e,Pe,(e=>n(4,l=e)));const c=(()=>{let e=0;const t=fetch(`./quotes/${Math.floor(9*Math.random())}.json`).then((e=>e.json())).then(pt);return async()=>{const n=await t,o=n[e++%n.length];return{author:o.quoteAuthor,text:gt(o.quoteText)}}})(),d=e=>{const t=r?(e=>({...e,plaintext:ht(e.plaintext),ciphertext:ht(e.ciphertext)}))(ft(e)):ft(e);return a?t:{...t,hint:void 0}};return e.$$.update=()=>{64&e.$$.dirty&&n(0,o=!ve&&null===s)},[o,a,r,i,l,()=>{c().then((e=>Se.set(d(e))))},s,function(e){r=e,Te.set(r)},function(e){a=e,je.set(a)},e=>ze.set(e.detail.progress),()=>Le.set(!0),function(t){M.call(this,e,t)}]}class ao extends re{constructor(e){super(),ae(this,e,so,oo,a,{})}}function ro(e,t,n){const o=e.slice();return o[7]=t[n],o}function io(e,t,n){const o=e.slice();return o[10]=t[n],o}function lo(e){let t,n,s,a,r=e[10]+"";return{c(){t=v("div"),n=x(r),P(t,"class","key svelte-1rbs4qt"),T(t,"active",e[1].get(e[10]))},m(o,r){g(o,t,r),w(t,n),s||(a=[A(t,"touchstart",e[3](e[10])),A(t,"touchend",e[4](e[10]))],s=!0)},p(n,o){e=n,6&o&&T(t,"active",e[1].get(e[10]))},d(e){e&&b(t),s=!1,o(a)}}}function co(e){let t,n=e[7],o=[];for(let t=0;tn(0,o=e)));const s=["QWERTYUIOP","ASDFGHJKL","ZXCVBNM"];let a=new Map,r=!1;return z((()=>{n(5,r=!0)})),e.$$.update=()=>{33&e.$$.dirty&&(o?window.scrollBy({top:169.6,behavior:"smooth"}):r&&window.scrollBy({top:-169.6,behavior:"smooth"}))},[o,a,s,e=>t=>{t.preventDefault(),Ne.forEach((t=>t(e))),a.set(e,!0),n(1,a)},e=>()=>{a.set(e,!1),n(1,a)},r]}class mo extends re{constructor(e){super(),ae(this,e,po,uo,a,{})}}function fo(t){let n,o;return n=new ao({}),n.$on("error",t[4]),{c(){te(n.$$.fragment)},m(e,t){ne(n,e,t),o=!0},p:e,i(e){o||(G(n.$$.fragment,e),o=!0)},o(e){Q(n.$$.fragment,e),o=!1},d(e){oe(n,e)}}}function ho(t){let n,o;return n=new Dn({}),{c(){te(n.$$.fragment)},m(e,t){ne(n,e,t),o=!0},p:e,i(e){o||(G(n.$$.fragment,e),o=!0)},o(e){Q(n.$$.fragment,e),o=!1},d(e){oe(n,e)}}}function wo(e){let t,n,o,s,a,r,i,l,c,u;o=new mo({});const d=[ho,fo],p=[];function m(e,t){return e[0]?0:1}return r=m(e),i=p[r]=d[r](e),{c(){t=v("canvas"),n=k(),te(o.$$.fragment),s=k(),a=v("main"),i.c(),l=k(),c=v("div"),P(t,"id","confetti"),P(t,"class","svelte-sols6w"),P(c,"class","keyboard-spacer svelte-sols6w"),T(c,"display",e[1]),P(a,"class","svelte-sols6w")},m(e,i){g(e,t,i),g(e,n,i),ne(o,e,i),g(e,s,i),g(e,a,i),p[r].m(a,null),w(a,l),w(a,c),u=!0},p(e,[t]){let n=r;r=m(e),r===n?p[r].p(e,t):(X(),Q(p[n],1,1,(()=>{p[n]=null})),J(),i=p[r],i?i.p(e,t):(i=p[r]=d[r](e),i.c()),G(i,1),i.m(a,l)),2&t&&T(c,"display",e[1])},i(e){u||(G(o.$$.fragment,e),G(i),u=!0)},o(e){Q(o.$$.fragment,e),Q(i),u=!1},d(e){e&&b(t),e&&b(n),oe(o,e),e&&b(s),e&&b(a),p[r].d()}}}function go(e,t,n){let o,s,a,r;u(e,Le,(e=>n(2,o=e))),u(e,Pe,(e=>n(3,s=e))),u(e,Me,(e=>n(0,a=e))),u(e,qe,(e=>n(1,r=e)));return e.$$.update=()=>{var t;e.$$.dirty,4&e.$$.dirty&&o&&(le.fire({title:ct(),text:(t=Date.now()-c(Ve),`You solved the quote in ${Ue(t)}!`),icon:"success",confirmButtonColor:"var(--primary-color)"}),ut.addConfetti())},[a,r,o,s,e=>(e=>{const t=(e=>`show-err-${e.id}`)(e);localStorage.getItem(t)!==Ce&&le.fire({title:`Error (${e.id})`,text:e.msg,icon:"error",showDenyButton:!0,denyButtonText:"Don't show this error message again",confirmButtonColor:"var(--primary-color)",denyButtonColor:"var(--red)"}).then((e=>{e.isDenied&&localStorage.setItem(t,Ce)}))})(e.detail)]}const bo=new class extends re{constructor(e){super(),ae(this,e,go,wo,a,{})}}({target:document.body,props:{name:"world"}});return"undefined"!=typeof module&&module.hot&&("undefined"!=typeof module&&module.hot.dispose((()=>{bo.$destroy()})),"undefined"!=typeof module&&module.hot.accept()),bo}(); +var app=function(){"use strict";function e(){}function t(e){return e()}function n(){return Object.create(null)}function o(e){e.forEach(t)}function s(e){return"function"==typeof e}function a(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}let r,i;function l(t,...n){if(null==t)return e;const o=t.subscribe(...n);return o.unsubscribe?()=>o.unsubscribe():o}function c(e){let t;return l(e,(e=>t=e))(),t}function u(e,t,n){e.$$.on_destroy.push(l(t,n))}function d(e,t,n,o){if(e){const s=p(e,t,n,o);return e[0](s)}}function p(e,t,n,o){return e[1]&&o?function(e,t){for(const n in t)e[n]=t[n];return e}(n.ctx.slice(),e[1](o(t))):n.ctx}function m(e,t,n,o){if(e[2]&&o){const s=e[2](o(n));if(void 0===t.dirty)return s;if("object"==typeof s){const e=[],n=Math.max(t.dirty.length,s.length);for(let o=0;o32){const t=[],n=e.ctx.length/32;for(let e=0;ee.removeEventListener(t,n,o)}function P(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function B(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function S(e,t){e.value=null==t?"":t}function E(e,t,n,o){null===n?e.style.removeProperty(t):e.style.setProperty(t,n,o?"important":"")}function T(e,t,n){e.classList[n?"add":"remove"](t)}function j(e){i=e}function O(){if(!i)throw new Error("Function called outside component initialization");return i}function z(e){O().$$.on_mount.push(e)}function L(){const e=O();return(t,n)=>{const o=e.$$.callbacks[t];if(o){const s=function(e,t,n=!1){const o=document.createEvent("CustomEvent");return o.initCustomEvent(e,n,!1,t),o}(t,n);o.slice().forEach((t=>{t.call(e,s)}))}}}function M(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e.call(this,t)))}const q=[],I=[],D=[],N=[],H=Promise.resolve();let V=!1;function R(e){D.push(e)}function _(e){N.push(e)}const U=new Set;let Y=0;function F(){const e=i;do{for(;Y{W.delete(e),o&&(n&&e.d(1),o())})),e.o(t)}}function ee(e,t,n){const o=e.$$.props[t];void 0!==o&&(e.$$.bound[o]=n,n(e.$$.ctx[o]))}function te(e){e&&e.c()}function ne(e,n,a,r){const{fragment:i,on_mount:l,on_destroy:c,after_update:u}=e.$$;i&&i.m(n,a),r||R((()=>{const n=l.map(t).filter(s);c?c.push(...n):o(n),e.$$.on_mount=[]})),u.forEach(R)}function oe(e,t){const n=e.$$;null!==n.fragment&&(o(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function se(e,t){-1===e.$$.dirty[0]&&(q.push(e),V||(V=!0,H.then(F)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const s=o.length?o[0]:n;return m.ctx&&l(m.ctx[e],m.ctx[e]=s)&&(!m.skip_bound&&m.bound[e]&&m.bound[e](s),f&&se(t,e)),n})):[],m.update(),f=!0,o(m.before_update),m.fragment=!!r&&r(m.ctx),s.target){if(s.hydrate){const e=function(e){return Array.from(e.childNodes)}(s.target);m.fragment&&m.fragment.l(e),e.forEach(b)}else m.fragment&&m.fragment.c();s.intro&&G(t.$$.fragment),ne(t,s.target,s.anchor,s.customElement),F()}j(p)}class re{$destroy(){oe(this,1),this.$destroy=e}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}var ie="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var le=function(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}((function(e,t){e.exports=function(){const e="SweetAlert2:",t=e=>{const t=[];for(let n=0;ne.charAt(0).toUpperCase()+e.slice(1),o=e=>Array.prototype.slice.call(e),s=t=>{console.warn("".concat(e," ").concat("object"==typeof t?t.join(" "):t))},a=t=>{console.error("".concat(e," ").concat(t))},r=[],i=e=>{r.includes(e)||(r.push(e),s(e))},l=(e,t)=>{i('"'.concat(e,'" is deprecated and will be removed in the next major release. Please use "').concat(t,'" instead.'))},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={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:"×",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:{},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},f=["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"],h={},w=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],g=e=>Object.prototype.hasOwnProperty.call(m,e),b=e=>-1!==f.indexOf(e),y=e=>h[e],v=e=>{g(e)||s('Unknown parameter "'.concat(e,'"'))},$=e=>{w.includes(e)&&s('The parameter "'.concat(e,'" is incompatible with toasts'))},x=e=>{y(e)&&l(e,y(e))},k=e=>{!e.backdrop&&e.allowOutsideClick&&s('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const t in e)v(t),e.toast&&$(t),x(t)},C="swal2-",A=e=>{const t={};for(const n in e)t[e[n]]=C+e[n];return t},P=A(["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"]),B=A(["success","warning","info","question","error"]),S=()=>document.body.querySelector(".".concat(P.container)),E=e=>{const t=S();return t?t.querySelector(e):null},T=e=>E(".".concat(e)),j=()=>T(P.popup),O=()=>T(P.icon),z=()=>T(P.title),L=()=>T(P["html-container"]),M=()=>T(P.image),q=()=>T(P["progress-steps"]),I=()=>T(P["validation-message"]),D=()=>E(".".concat(P.actions," .").concat(P.confirm)),N=()=>E(".".concat(P.actions," .").concat(P.deny)),H=()=>T(P["input-label"]),V=()=>E(".".concat(P.loader)),R=()=>E(".".concat(P.actions," .").concat(P.cancel)),_=()=>T(P.actions),U=()=>T(P.footer),Y=()=>T(P["timer-progress-bar"]),F=()=>T(P.close),Z='\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',W=()=>{const e=o(j().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort(((e,t)=>{const n=parseInt(e.getAttribute("tabindex")),o=parseInt(t.getAttribute("tabindex"));return n>o?1:n"-1"!==e.getAttribute("tabindex")));return t(e.concat(n)).filter((e=>fe(e)))},K=()=>ee(document.body,P.shown)&&!ee(document.body,P["toast-shown"])&&!ee(document.body,P["no-backdrop"]),X=()=>j()&&ee(j(),P.toast),J=()=>j().hasAttribute("data-loading"),G={previousBodyPadding:null},Q=(e,t)=>{if(e.textContent="",t){const n=(new DOMParser).parseFromString(t,"text/html");o(n.querySelector("head").childNodes).forEach((t=>{e.appendChild(t)})),o(n.querySelector("body").childNodes).forEach((t=>{e.appendChild(t)}))}},ee=(e,t)=>{if(!t)return!1;const n=t.split(/\s+/);for(let t=0;t{o(e.classList).forEach((n=>{Object.values(P).includes(n)||Object.values(B).includes(n)||Object.values(t.showClass).includes(n)||e.classList.remove(n)}))},ne=(e,t,n)=>{if(te(e,t),t.customClass&&t.customClass[n]){if("string"!=typeof t.customClass[n]&&!t.customClass[n].forEach)return s("Invalid type of customClass.".concat(n,'! Expected string or iterable object, got "').concat(typeof t.customClass[n],'"'));re(e,t.customClass[n])}},oe=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return e.querySelector(".".concat(P.popup," > .").concat(P[t]));case"checkbox":return e.querySelector(".".concat(P.popup," > .").concat(P.checkbox," input"));case"radio":return e.querySelector(".".concat(P.popup," > .").concat(P.radio," input:checked"))||e.querySelector(".".concat(P.popup," > .").concat(P.radio," input:first-child"));case"range":return e.querySelector(".".concat(P.popup," > .").concat(P.range," input"));default:return e.querySelector(".".concat(P.popup," > .").concat(P.input))}},se=e=>{if(e.focus(),"file"!==e.type){const t=e.value;e.value="",e.value=t}},ae=(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)})))},re=(e,t)=>{ae(e,t,!0)},ie=(e,t)=>{ae(e,t,!1)},le=(e,t)=>{const n=o(e.childNodes);for(let e=0;e{n==="".concat(parseInt(n))&&(n=parseInt(n)),n||0===parseInt(n)?e.style[t]="number"==typeof n?"".concat(n,"px"):n:e.style.removeProperty(t)},ue=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"flex";e.style.display=t},de=e=>{e.style.display="none"},pe=(e,t,n,o)=>{const s=e.querySelector(t);s&&(s.style[n]=o)},me=(e,t,n)=>{t?ue(e,n):de(e)},fe=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),he=()=>!fe(D())&&!fe(N())&&!fe(R()),we=e=>!!(e.scrollHeight>e.clientHeight),ge=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},be=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=Y();fe(n)&&(t&&(n.style.transition="none",n.style.width="100%"),setTimeout((()=>{n.style.transition="width ".concat(e/1e3,"s linear"),n.style.width="0%"}),10))},ye=()=>{const e=Y(),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.removeProperty("transition"),e.style.width="".concat(n,"%")},ve=()=>"undefined"==typeof window||"undefined"==typeof document,$e=100,xe={},ke=()=>{xe.previousActiveElement&&xe.previousActiveElement.focus?(xe.previousActiveElement.focus(),xe.previousActiveElement=null):document.body&&document.body.focus()},Ce=e=>new Promise((t=>{if(!e)return t();const n=window.scrollX,o=window.scrollY;xe.restoreFocusTimeout=setTimeout((()=>{ke(),t()}),$e),window.scrollTo(n,o)})),Ae='\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,""),Pe=()=>{const e=S();return!!e&&(e.remove(),ie([document.documentElement,document.body],[P["no-backdrop"],P["toast-shown"],P["has-column"]]),!0)},Be=()=>{xe.currentInstance.resetValidationMessage()},Se=()=>{const e=j(),t=le(e,P.input),n=le(e,P.file),o=e.querySelector(".".concat(P.range," input")),s=e.querySelector(".".concat(P.range," output")),a=le(e,P.select),r=e.querySelector(".".concat(P.checkbox," input")),i=le(e,P.textarea);t.oninput=Be,n.onchange=Be,a.onchange=Be,r.onchange=Be,i.oninput=Be,o.oninput=()=>{Be(),s.value=o.value},o.onchange=()=>{Be(),o.nextSibling.value=o.value}},Ee=e=>"string"==typeof e?document.querySelector(e):e,Te=e=>{const t=j();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")},je=e=>{"rtl"===window.getComputedStyle(e).direction&&re(S(),P.rtl)},Oe=e=>{const t=Pe();if(ve())return void a("SweetAlert2 requires document to initialize");const n=document.createElement("div");n.className=P.container,t&&re(n,P["no-transition"]),Q(n,Ae);const o=Ee(e.target);o.appendChild(n),Te(e),je(o),Se()},ze=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?Le(e,t):e&&Q(t,e)},Le=(e,t)=>{e.jquery?Me(t,e):Q(t,e.toString())},Me=(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))},qe=(()=>{if(ve())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})(),Ie=()=>{const e=document.createElement("div");e.className=P["scrollbar-measure"],document.body.appendChild(e);const t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t},De=(e,t)=>{const n=_(),o=V();t.showConfirmButton||t.showDenyButton||t.showCancelButton?ue(n):de(n),ne(n,t,"actions"),Ne(n,o,t),Q(o,t.loaderHtml),ne(o,t,"loader")};function Ne(e,t,n){const o=D(),s=N(),a=R();Ve(o,"confirm",n),Ve(s,"deny",n),Ve(a,"cancel",n),He(o,s,a,n),n.reverseButtons&&(n.toast?(e.insertBefore(a,o),e.insertBefore(s,o)):(e.insertBefore(a,t),e.insertBefore(s,t),e.insertBefore(o,t)))}function He(e,t,n,o){if(!o.buttonsStyling)return ie([e,t,n],P.styled);re([e,t,n],P.styled),o.confirmButtonColor&&(e.style.backgroundColor=o.confirmButtonColor,re(e,P["default-outline"])),o.denyButtonColor&&(t.style.backgroundColor=o.denyButtonColor,re(t,P["default-outline"])),o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor,re(n,P["default-outline"]))}function Ve(e,t,o){me(e,o["show".concat(n(t),"Button")],"inline-block"),Q(e,o["".concat(t,"ButtonText")]),e.setAttribute("aria-label",o["".concat(t,"ButtonAriaLabel")]),e.className=P[t],ne(e,o,"".concat(t,"Button")),re(e,o["".concat(t,"ButtonClass")])}function Re(e,t){"string"==typeof t?e.style.background=t:t||re([document.documentElement,document.body],P["no-backdrop"])}function _e(e,t){t in P?re(e,P[t]):(s('The "position" parameter is not valid, defaulting to "center"'),re(e,P.center))}function Ue(e,t){if(t&&"string"==typeof t){const n="grow-".concat(t);n in P&&re(e,P[n])}}const Ye=(e,t)=>{const n=S();n&&(Re(n,t.backdrop),_e(n,t.position),Ue(n,t.grow),ne(n,t,"container"))};var Fe={awaitingPromise:new WeakMap,promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const Ze=["input","file","range","select","radio","checkbox","textarea"],We=(e,t)=>{const n=j(),o=Fe.innerParams.get(e),s=!o||t.input!==o.input;Ze.forEach((e=>{const o=P[e],a=le(n,o);Je(e,t.inputAttributes),a.className=o,s&&de(a)})),t.input&&(s&&Ke(t),Ge(t))},Ke=e=>{if(!nt[e.input])return a('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(e.input,'"'));const t=tt(e.input),n=nt[e.input](t,e);ue(n),setTimeout((()=>{se(n)}))},Xe=e=>{for(let t=0;t{const n=oe(j(),e);if(n){Xe(n);for(const e in t)n.setAttribute(e,t[e])}},Ge=e=>{const t=tt(e.input);e.customClass&&re(t,e.customClass.input)},Qe=(e,t)=>{e.placeholder&&!t.inputPlaceholder||(e.placeholder=t.inputPlaceholder)},et=(e,t,n)=>{if(n.inputLabel){e.id=P.input;const o=document.createElement("label"),s=P["input-label"];o.setAttribute("for",e.id),o.className=s,re(o,n.customClass.inputLabel),o.innerText=n.inputLabel,t.insertAdjacentElement("beforebegin",o)}},tt=e=>{const t=P[e]?P[e]:P.input;return le(j(),t)},nt={};nt.text=nt.email=nt.password=nt.number=nt.tel=nt.url=(e,t)=>("string"==typeof t.inputValue||"number"==typeof t.inputValue?e.value=t.inputValue:p(t.inputValue)||s('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(typeof t.inputValue,'"')),et(e,e,t),Qe(e,t),e.type=t.input,e),nt.file=(e,t)=>(et(e,e,t),Qe(e,t),e),nt.range=(e,t)=>{const n=e.querySelector("input"),o=e.querySelector("output");return n.value=t.inputValue,n.type=t.input,o.value=t.inputValue,et(n,e,t),e},nt.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const n=document.createElement("option");Q(n,t.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return et(e,e,t),e},nt.radio=e=>(e.textContent="",e),nt.checkbox=(e,t)=>{const n=oe(j(),"checkbox");n.value="1",n.id=P.checkbox,n.checked=Boolean(t.inputValue);const o=e.querySelector("span");return Q(o,t.inputPlaceholder),e},nt.textarea=(e,t)=>{e.value=t.inputValue,Qe(e,t),et(e,e,t);const n=e=>parseInt(window.getComputedStyle(e).marginLeft)+parseInt(window.getComputedStyle(e).marginRight);return setTimeout((()=>{if("MutationObserver"in window){const t=parseInt(window.getComputedStyle(j()).width);new MutationObserver((()=>{const o=e.offsetWidth+n(e);j().style.width=o>t?"".concat(o,"px"):null})).observe(e,{attributes:!0,attributeFilter:["style"]})}})),e};const ot=(e,t)=>{const n=L();ne(n,t,"htmlContainer"),t.html?(ze(t.html,n),ue(n,"block")):t.text?(n.textContent=t.text,ue(n,"block")):de(n),We(e,t)},st=(e,t)=>{const n=U();me(n,t.footer),t.footer&&ze(t.footer,n),ne(n,t,"footer")},at=(e,t)=>{const n=F();Q(n,t.closeButtonHtml),ne(n,t,"closeButton"),me(n,t.showCloseButton),n.setAttribute("aria-label",t.closeButtonAriaLabel)},rt=(e,t)=>{const n=Fe.innerParams.get(e),o=O();return n&&t.icon===n.icon?(dt(o,t),void it(o,t)):t.icon||t.iconHtml?t.icon&&-1===Object.keys(B).indexOf(t.icon)?(a('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(t.icon,'"')),de(o)):(ue(o),dt(o,t),it(o,t),void re(o,t.showClass.icon)):de(o)},it=(e,t)=>{for(const n in B)t.icon!==n&&ie(e,B[n]);re(e,B[t.icon]),pt(e,t),lt(),ne(e,t,"icon")},lt=()=>{const e=j(),t=window.getComputedStyle(e).getPropertyValue("background-color"),n=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e\n \n
      \n
      \n',ut='\n \n \n \n \n',dt=(e,t)=>{e.textContent="",t.iconHtml?Q(e,mt(t.iconHtml)):"success"===t.icon?Q(e,ct):"error"===t.icon?Q(e,ut):Q(e,mt({question:"?",warning:"!",info:"i"}[t.icon]))},pt=(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"])pe(e,n,"backgroundColor",t.iconColor);pe(e,".swal2-success-ring","borderColor",t.iconColor)}},mt=e=>'
      ').concat(e,"
      "),ft=(e,t)=>{const n=M();if(!t.imageUrl)return de(n);ue(n,""),n.setAttribute("src",t.imageUrl),n.setAttribute("alt",t.imageAlt),ce(n,"width",t.imageWidth),ce(n,"height",t.imageHeight),n.className=P.image,ne(n,t,"image")},ht=e=>{const t=document.createElement("li");return re(t,P["progress-step"]),Q(t,e),t},wt=e=>{const t=document.createElement("li");return re(t,P["progress-step-line"]),e.progressStepsDistance&&(t.style.width=e.progressStepsDistance),t},gt=(e,t)=>{const n=q();if(!t.progressSteps||0===t.progressSteps.length)return de(n);ue(n),n.textContent="",t.currentProgressStep>=t.progressSteps.length&&s("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),t.progressSteps.forEach(((e,o)=>{const s=ht(e);if(n.appendChild(s),o===t.currentProgressStep&&re(s,P["active-progress-step"]),o!==t.progressSteps.length-1){const e=wt(t);n.appendChild(e)}}))},bt=(e,t)=>{const n=z();me(n,t.title||t.titleText,"block"),t.title&&ze(t.title,n),t.titleText&&(n.innerText=t.titleText),ne(n,t,"title")},yt=(e,t)=>{const n=S(),o=j();t.toast?(ce(n,"width",t.width),o.style.width="100%",o.insertBefore(V(),O())):ce(o,"width",t.width),ce(o,"padding",t.padding),t.color&&(o.style.color=t.color),t.background&&(o.style.background=t.background),de(I()),vt(o,t)},vt=(e,t)=>{e.className="".concat(P.popup," ").concat(fe(e)?t.showClass.popup:""),t.toast?(re([document.documentElement,document.body],P["toast-shown"]),re(e,P.toast)):re(e,P.modal),ne(e,t,"popup"),"string"==typeof t.customClass&&re(e,t.customClass),t.icon&&re(e,P["icon-".concat(t.icon)])},$t=(e,t)=>{yt(e,t),Ye(e,t),gt(e,t),rt(e,t),ft(e,t),bt(e,t),at(e,t),ot(e,t),De(e,t),st(e,t),"function"==typeof t.didRender&&t.didRender(j())},xt=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),kt=()=>{o(document.body.children).forEach((e=>{e===S()||e.contains(S())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))}))},Ct=()=>{o(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")}))},At=["swal-title","swal-html","swal-footer"],Pt=e=>{const t="string"==typeof e.template?document.querySelector(e.template):e.template;if(!t)return{};const n=t.content;return zt(n),Object.assign(Bt(n),St(n),Et(n),Tt(n),jt(n),Ot(n,At))},Bt=e=>{const t={};return o(e.querySelectorAll("swal-param")).forEach((e=>{Lt(e,["name","value"]);const n=e.getAttribute("name"),o=e.getAttribute("value");"boolean"==typeof m[n]&&"false"===o&&(t[n]=!1),"object"==typeof m[n]&&(t[n]=JSON.parse(o))})),t},St=e=>{const t={};return o(e.querySelectorAll("swal-button")).forEach((e=>{Lt(e,["type","color","aria-label"]);const o=e.getAttribute("type");t["".concat(o,"ButtonText")]=e.innerHTML,t["show".concat(n(o),"Button")]=!0,e.hasAttribute("color")&&(t["".concat(o,"ButtonColor")]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(t["".concat(o,"ButtonAriaLabel")]=e.getAttribute("aria-label"))})),t},Et=e=>{const t={},n=e.querySelector("swal-image");return n&&(Lt(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},Tt=e=>{const t={},n=e.querySelector("swal-icon");return n&&(Lt(n,["type","color"]),n.hasAttribute("type")&&(t.icon=n.getAttribute("type")),n.hasAttribute("color")&&(t.iconColor=n.getAttribute("color")),t.iconHtml=n.innerHTML),t},jt=e=>{const t={},n=e.querySelector("swal-input");n&&(Lt(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 s=e.querySelectorAll("swal-input-option");return s.length&&(t.inputOptions={},o(s).forEach((e=>{Lt(e,["value"]);const n=e.getAttribute("value"),o=e.innerHTML;t.inputOptions[n]=o}))),t},Ot=(e,t)=>{const n={};for(const o in t){const s=t[o],a=e.querySelector(s);a&&(Lt(a,[]),n[s.replace(/^swal-/,"")]=a.innerHTML.trim())}return n},zt=e=>{const t=At.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);o(e.children).forEach((e=>{const n=e.tagName.toLowerCase();-1===t.indexOf(n)&&s("Unrecognized element <".concat(n,">"))}))},Lt=(e,t)=>{o(e.attributes).forEach((n=>{-1===t.indexOf(n.name)&&s(['Unrecognized attribute "'.concat(n.name,'" on <').concat(e.tagName.toLowerCase(),">."),"".concat(t.length?"Allowed attributes are: ".concat(t.join(", ")):"To set the value, use HTML within the element.")])}))};var Mt={email:(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"),url:(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 qt(e){e.inputValidator||Object.keys(Mt).forEach((t=>{e.input===t&&(e.inputValidator=Mt[t])}))}function It(e){(!e.target||"string"==typeof e.target&&!document.querySelector(e.target)||"string"!=typeof e.target&&!e.target.appendChild)&&(s('Target parameter is not valid, defaulting to "body"'),e.target="body")}function Dt(e){qt(e),e.showLoaderOnConfirm&&!e.preConfirm&&s("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),It(e),"string"==typeof e.title&&(e.title=e.title.split("\n").join("
      ")),Oe(e)}class Nt{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.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 Ht=()=>{null===G.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(G.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(G.previousBodyPadding+Ie(),"px"))},Vt=()=>{null!==G.previousBodyPadding&&(document.body.style.paddingRight="".concat(G.previousBodyPadding,"px"),G.previousBodyPadding=null)},Rt=()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)&&!ee(document.body,P.iosfix)){const e=document.body.scrollTop;document.body.style.top="".concat(-1*e,"px"),re(document.body,P.iosfix),Ut(),_t()}},_t=()=>{const e=navigator.userAgent,t=!!e.match(/iPad/i)||!!e.match(/iPhone/i),n=!!e.match(/WebKit/i);if(t&&n&&!e.match(/CriOS/i)){const e=44;j().scrollHeight>window.innerHeight-e&&(S().style.paddingBottom="".concat(e,"px"))}},Ut=()=>{const e=S();let t;e.ontouchstart=e=>{t=Yt(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},Yt=e=>{const t=e.target,n=S();return!(Ft(e)||Zt(e)||t!==n&&(we(n)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||we(L())&&L().contains(t)))},Ft=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,Zt=e=>e.touches&&e.touches.length>1,Wt=()=>{if(ee(document.body,P.iosfix)){const e=parseInt(document.body.style.top,10);ie(document.body,P.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}},Kt=10,Xt=e=>{const t=S(),n=j();"function"==typeof e.willOpen&&e.willOpen(n);const o=window.getComputedStyle(document.body).overflowY;en(t,n,e),setTimeout((()=>{Gt(t,n)}),Kt),K()&&(Qt(t,e.scrollbarPadding,o),kt()),X()||xe.previousActiveElement||(xe.previousActiveElement=document.activeElement),"function"==typeof e.didOpen&&setTimeout((()=>e.didOpen(n))),ie(t,P["no-transition"])},Jt=e=>{const t=j();if(e.target!==t)return;const n=S();t.removeEventListener(qe,Jt),n.style.overflowY="auto"},Gt=(e,t)=>{qe&&ge(t)?(e.style.overflowY="hidden",t.addEventListener(qe,Jt)):e.style.overflowY="auto"},Qt=(e,t,n)=>{Rt(),t&&"hidden"!==n&&Ht(),setTimeout((()=>{e.scrollTop=0}))},en=(e,t,n)=>{re(e,n.showClass.backdrop),t.style.setProperty("opacity","0","important"),ue(t,"grid"),setTimeout((()=>{re(t,n.showClass.popup),t.style.removeProperty("opacity")}),Kt),re([document.documentElement,document.body],P.shown),n.heightAuto&&n.backdrop&&!n.toast&&re([document.documentElement,document.body],P["height-auto"])},tn=e=>{let t=j();t||new Zo,t=j();const n=V();X()?de(O()):nn(t,e),ue(n),t.setAttribute("data-loading",!0),t.setAttribute("aria-busy",!0),t.focus()},nn=(e,t)=>{const n=_(),o=V();!t&&fe(D())&&(t=D()),ue(n),t&&(de(t),o.setAttribute("data-button-to-replace",t.className)),o.parentNode.insertBefore(o,t),re([e,n],P.loading)},on=(e,t)=>{"select"===t.input||"radio"===t.input?cn(e,t):["text","email","number","tel","textarea"].includes(t.input)&&(u(t.inputValue)||p(t.inputValue))&&(tn(D()),un(e,t))},sn=(e,t)=>{const n=e.getInput();if(!n)return null;switch(t.input){case"checkbox":return an(n);case"radio":return rn(n);case"file":return ln(n);default:return t.inputAutoTrim?n.value.trim():n.value}},an=e=>e.checked?1:0,rn=e=>e.checked?e.value:null,ln=e=>e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,cn=(e,t)=>{const n=j(),o=e=>dn[t.input](n,pn(e),t);u(t.inputOptions)||p(t.inputOptions)?(tn(D()),d(t.inputOptions).then((t=>{e.hideLoading(),o(t)}))):"object"==typeof t.inputOptions?o(t.inputOptions):a("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof t.inputOptions))},un=(e,t)=>{const n=e.getInput();de(n),d(t.inputValue).then((o=>{n.value="number"===t.input?parseFloat(o)||0:"".concat(o),ue(n),n.focus(),e.hideLoading()})).catch((t=>{a("Error in inputValue promise: ".concat(t)),n.value="",ue(n),n.focus(),e.hideLoading()}))},dn={select:(e,t,n)=>{const o=le(e,P.select),s=(e,t,o)=>{const s=document.createElement("option");s.value=o,Q(s,t),s.selected=mn(o,n.inputValue),e.appendChild(s)};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=le(e,P.radio);t.forEach((e=>{const t=e[0],s=e[1],a=document.createElement("input"),r=document.createElement("label");a.type="radio",a.name=P.radio,a.value=t,mn(t,n.inputValue)&&(a.checked=!0);const i=document.createElement("span");Q(i,s),i.className=P.label,r.appendChild(a),r.appendChild(i),o.appendChild(r)}));const s=o.querySelectorAll("input");s.length&&s[0].focus()}},pn=e=>{const t=[];return"undefined"!=typeof Map&&e instanceof Map?e.forEach(((e,n)=>{let o=e;"object"==typeof o&&(o=pn(o)),t.push([n,o])})):Object.keys(e).forEach((n=>{let o=e[n];"object"==typeof o&&(o=pn(o)),t.push([n,o])})),t},mn=(e,t)=>t&&t.toString()===e.toString();function fn(){const e=Fe.innerParams.get(this);if(!e)return;const t=Fe.domCache.get(this);de(t.loader),X()?e.icon&&ue(O()):hn(t),ie([t.popup,t.actions],P.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}const hn=e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));t.length?ue(t[0],"inline-block"):he()&&de(e.actions)};function wn(e){const t=Fe.innerParams.get(e||this),n=Fe.domCache.get(e||this);return n?oe(n.popup,t.input):null}var gn={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const bn=()=>fe(j()),yn=()=>D()&&D().click(),vn=()=>N()&&N().click(),$n=()=>R()&&R().click(),xn=e=>{e.keydownTarget&&e.keydownHandlerAdded&&(e.keydownTarget.removeEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!1)},kn=(e,t,n,o)=>{xn(t),n.toast||(t.keydownHandler=t=>Bn(e,t,o),t.keydownTarget=n.keydownListenerCapture?window:j(),t.keydownListenerCapture=n.keydownListenerCapture,t.keydownTarget.addEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!0)},Cn=(e,t,n)=>{const o=W();if(o.length)return(t+=n)===o.length?t=0:-1===t&&(t=o.length-1),o[t].focus();j().focus()},An=["ArrowRight","ArrowDown"],Pn=["ArrowLeft","ArrowUp"],Bn=(e,t,n)=>{const o=Fe.innerParams.get(e);o&&(t.isComposing||229===t.keyCode||(o.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?Sn(e,t,o):"Tab"===t.key?En(t,o):[...An,...Pn].includes(t.key)?Tn(t.key):"Escape"===t.key&&jn(t,o,n)))},Sn=(e,t,n)=>{if(c(n.allowEnterKey)&&t.target&&e.getInput()&&t.target.outerHTML===e.getInput().outerHTML){if(["textarea","file"].includes(n.input))return;yn(),t.preventDefault()}},En=(e,t)=>{const n=e.target,o=W();let s=-1;for(let e=0;e{if(![D(),N(),R()].includes(document.activeElement))return;const t=An.includes(e)?"nextElementSibling":"previousElementSibling";let n=document.activeElement;for(let e=0;e<_().children.length;e++){if(n=n[t],!n)return;if(fe(n)&&n instanceof HTMLButtonElement)break}n instanceof HTMLButtonElement&&n.focus()},jn=(e,t,n)=>{c(t.allowEscapeKey)&&(e.preventDefault(),n(xt.esc))};function On(e,t,n,o){X()?Rn(e,o):(Ce(n).then((()=>Rn(e,o))),xn(xe)),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),K()&&(Vt(),Wt(),Ct()),zn()}function zn(){ie([document.documentElement,document.body],[P.shown,P["height-auto"],P["no-backdrop"],P["toast-shown"]])}function Ln(e){e=Nn(e);const t=gn.swalPromiseResolve.get(this),n=qn(this);this.isAwaitingPromise()?e.isDismissed||(Dn(this),t(e)):n&&t(e)}function Mn(){return!!Fe.awaitingPromise.get(this)}const qn=e=>{const t=j();if(!t)return!1;const n=Fe.innerParams.get(e);if(!n||ee(t,n.hideClass.popup))return!1;ie(t,n.showClass.popup),re(t,n.hideClass.popup);const o=S();return ie(o,n.showClass.backdrop),re(o,n.hideClass.backdrop),Hn(e,t,n),!0};function In(e){const t=gn.swalPromiseReject.get(this);Dn(this),t&&t(e)}const Dn=e=>{e.isAwaitingPromise()&&(Fe.awaitingPromise.delete(e),Fe.innerParams.get(e)||e._destroy())},Nn=e=>void 0===e?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},e),Hn=(e,t,n)=>{const o=S(),s=qe&&ge(t);"function"==typeof n.willClose&&n.willClose(t),s?Vn(e,t,o,n.returnFocus,n.didClose):On(e,o,n.returnFocus,n.didClose)},Vn=(e,t,n,o,s)=>{xe.swalCloseEventFinishedCallback=On.bind(null,e,n,o,s),t.addEventListener(qe,(function(e){e.target===t&&(xe.swalCloseEventFinishedCallback(),delete xe.swalCloseEventFinishedCallback)}))},Rn=(e,t)=>{setTimeout((()=>{"function"==typeof t&&t.bind(e.params)(),e._destroy()}))};function _n(e,t,n){const o=Fe.domCache.get(e);t.forEach((e=>{o[e].disabled=n}))}function Un(e,t){if(!e)return!1;if("radio"===e.type){const n=e.parentNode.parentNode.querySelectorAll("input");for(let e=0;e{const t={};return Object.keys(e).forEach((n=>{b(n)?t[n]=e[n]:s('Invalid parameter to update: "'.concat(n,'". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md'))})),t};function eo(){const e=Fe.domCache.get(this),t=Fe.innerParams.get(this);t?(e.popup&&xe.swalCloseEventFinishedCallback&&(xe.swalCloseEventFinishedCallback(),delete xe.swalCloseEventFinishedCallback),xe.deferDisposalTimer&&(clearTimeout(xe.deferDisposalTimer),delete xe.deferDisposalTimer),"function"==typeof t.didDestroy&&t.didDestroy(),to(this)):no(this)}const to=e=>{no(e),delete e.params,delete xe.keydownHandler,delete xe.keydownTarget,delete xe.currentInstance},no=e=>{e.isAwaitingPromise()?(oo(Fe,e),Fe.awaitingPromise.set(e,!0)):(oo(gn,e),oo(Fe,e))},oo=(e,t)=>{for(const n in e)e[n].delete(t)};var so=Object.freeze({hideLoading:fn,disableLoading:fn,getInput:wn,close:Ln,isAwaitingPromise:Mn,rejectPromise:In,handleAwaitingPromise:Dn,closePopup:Ln,closeModal:Ln,closeToast:Ln,enableButtons:Yn,disableButtons:Fn,enableInput:Zn,disableInput:Wn,showValidationMessage:Kn,resetValidationMessage:Xn,getProgressSteps:Jn,update:Gn,_destroy:eo});const ao=e=>{const t=Fe.innerParams.get(e);e.disableButtons(),t.input?lo(e,"confirm"):fo(e,!0)},ro=e=>{const t=Fe.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?lo(e,"deny"):uo(e,!1)},io=(e,t)=>{e.disableButtons(),t(xt.cancel)},lo=(e,t)=>{const o=Fe.innerParams.get(e);if(!o.input)return a('The "input" parameter is needed to be set when using returnInputValueOn'.concat(n(t)));const s=sn(e,o);o.inputValidator?co(e,s,t):e.getInput().checkValidity()?"deny"===t?uo(e,s):fo(e,s):(e.enableButtons(),e.showValidationMessage(o.validationMessage))},co=(e,t,n)=>{const o=Fe.innerParams.get(e);e.disableInput(),Promise.resolve().then((()=>d(o.inputValidator(t,o.validationMessage)))).then((o=>{e.enableButtons(),e.enableInput(),o?e.showValidationMessage(o):"deny"===n?uo(e,t):fo(e,t)}))},uo=(e,t)=>{const n=Fe.innerParams.get(e||void 0);n.showLoaderOnDeny&&tn(N()),n.preDeny?(Fe.awaitingPromise.set(e||void 0,!0),Promise.resolve().then((()=>d(n.preDeny(t,n.validationMessage)))).then((n=>{!1===n?(e.hideLoading(),Dn(e)):e.closePopup({isDenied:!0,value:void 0===n?t:n})})).catch((t=>mo(e||void 0,t)))):e.closePopup({isDenied:!0,value:t})},po=(e,t)=>{e.closePopup({isConfirmed:!0,value:t})},mo=(e,t)=>{e.rejectPromise(t)},fo=(e,t)=>{const n=Fe.innerParams.get(e||void 0);n.showLoaderOnConfirm&&tn(),n.preConfirm?(e.resetValidationMessage(),Fe.awaitingPromise.set(e||void 0,!0),Promise.resolve().then((()=>d(n.preConfirm(t,n.validationMessage)))).then((n=>{fe(I())||!1===n?(e.hideLoading(),Dn(e)):po(e,void 0===n?t:n)})).catch((t=>mo(e||void 0,t)))):po(e,t)},ho=(e,t,n)=>{Fe.innerParams.get(e).toast?wo(e,t,n):(yo(t),vo(t),$o(e,t,n))},wo=(e,t,n)=>{t.popup.onclick=()=>{const t=Fe.innerParams.get(e);t&&(go(t)||t.timer||t.input)||n(xt.close)}},go=e=>e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton;let bo=!1;const yo=e=>{e.popup.onmousedown=()=>{e.container.onmouseup=function(t){e.container.onmouseup=void 0,t.target===e.container&&(bo=!0)}}},vo=e=>{e.container.onmousedown=()=>{e.popup.onmouseup=function(t){e.popup.onmouseup=void 0,(t.target===e.popup||e.popup.contains(t.target))&&(bo=!0)}}},$o=(e,t,n)=>{t.container.onclick=o=>{const s=Fe.innerParams.get(e);bo?bo=!1:o.target===t.container&&c(s.allowOutsideClick)&&n(xt.backdrop)}},xo=e=>"object"==typeof e&&e.jquery,ko=e=>e instanceof Element||xo(e),Co=e=>{const t={};return"object"!=typeof e[0]||ko(e[0])?["title","html","icon"].forEach(((n,o)=>{const s=e[o];"string"==typeof s||ko(s)?t[n]=s:void 0!==s&&a("Unexpected type of ".concat(n,'! Expected "string" or "Element", got ').concat(typeof s))})):Object.assign(t,e[0]),t};function Ao(){const e=this;for(var t=arguments.length,n=new Array(t),o=0;oxe.timeout&&xe.timeout.getTimerLeft(),So=()=>{if(xe.timeout)return ye(),xe.timeout.stop()},Eo=()=>{if(xe.timeout){const e=xe.timeout.start();return be(e),e}},To=()=>{const e=xe.timeout;return e&&(e.running?So():Eo())},jo=e=>{if(xe.timeout){const t=xe.timeout.increase(e);return be(t,!0),t}},Oo=()=>xe.timeout&&xe.timeout.isRunning();let zo=!1;const Lo={};function Mo(){Lo[arguments.length>0&&void 0!==arguments[0]?arguments[0]:"data-swal-template"]=this,zo||(document.body.addEventListener("click",qo),zo=!0)}const qo=e=>{for(let t=e.target;t&&t!==document;t=t.parentNode)for(const e in Lo){const n=t.getAttribute(e);if(n)return void Lo[e].fire({template:n})}};var Io=Object.freeze({isValidParameter:g,isUpdatableParameter:b,isDeprecatedParameter:y,argsToParams:Co,isVisible:bn,clickConfirm:yn,clickDeny:vn,clickCancel:$n,getContainer:S,getPopup:j,getTitle:z,getHtmlContainer:L,getImage:M,getIcon:O,getInputLabel:H,getCloseButton:F,getActions:_,getConfirmButton:D,getDenyButton:N,getCancelButton:R,getLoader:V,getFooter:U,getTimerProgressBar:Y,getFocusableElements:W,getValidationMessage:I,isLoading:J,fire:Ao,mixin:Po,showLoading:tn,enableLoading:tn,getTimerLeft:Bo,stopTimer:So,resumeTimer:Eo,toggleTimer:To,increaseTimer:jo,isTimerRunning:Oo,bindClickHandler:Mo});let Do;class No{constructor(){if("undefined"==typeof window)return;Do=this;for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:{};k(Object.assign({},t,e)),xe.currentInstance&&(xe.currentInstance._destroy(),K()&&Ct()),xe.currentInstance=this;const n=Vo(e,t);Dt(n),Object.freeze(n),xe.timeout&&(xe.timeout.stop(),delete xe.timeout),clearTimeout(xe.restoreFocusTimeout);const o=Ro(this);return $t(this,n),Fe.innerParams.set(this,n),Ho(this,o,n)}then(e){return Fe.promise.get(this).then(e)}finally(e){return Fe.promise.get(this).finally(e)}}const Ho=(e,t,n)=>new Promise(((o,s)=>{const a=t=>{e.closePopup({isDismissed:!0,dismiss:t})};gn.swalPromiseResolve.set(e,o),gn.swalPromiseReject.set(e,s),t.confirmButton.onclick=()=>ao(e),t.denyButton.onclick=()=>ro(e),t.cancelButton.onclick=()=>io(e,a),t.closeButton.onclick=()=>a(xt.close),ho(e,t,a),kn(e,xe,n,a),on(e,n),Xt(n),_o(xe,n,a),Uo(t,n),setTimeout((()=>{t.container.scrollTop=0}))})),Vo=(e,t)=>{const n=Pt(e),o=Object.assign({},m,t,n,e);return o.showClass=Object.assign({},m.showClass,o.showClass),o.hideClass=Object.assign({},m.hideClass,o.hideClass),o},Ro=e=>{const t={popup:j(),container:S(),actions:_(),confirmButton:D(),denyButton:N(),cancelButton:R(),loader:V(),closeButton:F(),validationMessage:I(),progressSteps:q()};return Fe.domCache.set(e,t),t},_o=(e,t,n)=>{const o=Y();de(o),t.timer&&(e.timeout=new Nt((()=>{n("timer"),delete e.timeout}),t.timer),t.timerProgressBar&&(ue(o),ne(o,t,"timerProgressBar"),setTimeout((()=>{e.timeout&&e.timeout.running&&be(t.timer)}))))},Uo=(e,t)=>{if(!t.toast)return c(t.allowEnterKey)?void(Yo(e,t)||Cn(t,-1,1)):Fo()},Yo=(e,t)=>t.focusDeny&&fe(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&fe(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!fe(e.confirmButton)||(e.confirmButton.focus(),0)),Fo=()=>{document.activeElement instanceof HTMLElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};Object.assign(No.prototype,so),Object.assign(No,Io),Object.keys(so).forEach((e=>{No[e]=function(){if(Do)return Do[e](...arguments)}})),No.DismissReason=xt,No.version="11.4.8";const Zo=No;return Zo.default=Zo,Zo}(),void 0!==ie&&ie.Sweetalert2&&(ie.swal=ie.sweetAlert=ie.Swal=ie.SweetAlert=ie.Sweetalert2),"undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,'.swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4!important;grid-row:1/4!important;grid-template-columns:1fr 99fr 1fr;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto);grid-template-rows:minmax(min-content,auto) minmax(min-content,auto) minmax(min-content,auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-bottom-start,.swal2-container.swal2-center-start,.swal2-container.swal2-top-start{grid-template-columns:minmax(0,1fr) auto auto}.swal2-container.swal2-bottom,.swal2-container.swal2-center,.swal2-container.swal2-top{grid-template-columns:auto minmax(0,1fr) auto}.swal2-container.swal2-bottom-end,.swal2-container.swal2-center-end,.swal2-container.swal2-top-end{grid-template-columns:auto auto minmax(0,1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-left>.swal2-popup,.swal2-container.swal2-center-start>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-left>.swal2-popup,.swal2-container.swal2-bottom-start>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-fullscreen>.swal2-popup,.swal2-container.swal2-grow-row>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none!important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0,100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px transparent;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(112,102,224,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(220,55,65,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,120,129,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:0}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto!important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:inherit;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em 2em 3px}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px transparent;color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 3px;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-warning.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-warning.swal2-icon-show .swal2-icon-content{-webkit-animation:swal2-animate-i-mark .5s;animation:swal2-animate-i-mark .5s}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-info.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-info.swal2-icon-show .swal2-icon-content{-webkit-animation:swal2-animate-i-mark .8s;animation:swal2-animate-i-mark .8s}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-question.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-question.swal2-icon-show .swal2-icon-content{-webkit-animation:swal2-animate-question-mark .8s;animation:swal2-animate-question-mark .8s}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@-webkit-keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@-webkit-keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{background-color:transparent!important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:transparent;pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}')}));const ce=[];function ue(t,n=e){let o;const s=new Set;function r(e){if(a(t,e)&&(t=e,o)){const e=!ce.length;for(const e of s)e[1](),ce.push(e,t);if(e){for(let e=0;e{s.delete(l),0===s.size&&(o(),o=null)}}}}function de(t,n,a){const r=!Array.isArray(t),i=r?[t]:t,c=n.length<2;return u=t=>{let a=!1;const u=[];let d=0,p=e;const m=()=>{if(d)return;p();const o=n(r?u[0]:u,t);c?t(o):p=s(o)?o:e},f=i.map(((e,t)=>l(e,(e=>{u[t]=e,d&=~(1<{d|=1<{const o=n?localStorage.getItem(e):null;if(o&&t(JSON.parse(o)),n){const n=n=>{n.key===e&&t(n.newValue?JSON.parse(n.newValue):null)};return window.addEventListener("storage",n),()=>window.removeEventListener("storage",n)}})),{subscribe:a,set:r}=s;pe[e]={set(t){o(e,t),r(t)},update(t){const n=t(c(s));o(e,n),r(n)},subscribe:a}}return pe[e]}const fe={Peer:window.Peer},he=0,we=1,ge=2,be=3,ye=new URLSearchParams(location.search).get("game"),ve=null===ye,$e=window.navigator.userAgent.includes("Android"),xe="no-self-decode",ke="ABCDEFGHIJKLMNOPQRSTUVWXYZ",Ce="dontshow",Ae=["Congratulations!","Let's gooo","I knew you could do it","What a speedy boi","Sheeesh","Are you sonic, cause you're fast","Are you going to MIT, cause you're fast","You almost finished as fast as an MIT boy","Zoom zoom","Vroom vroom","You just broke the sound barrier","Are you 30k mph, cause you're faster than escape velocity","Too smart, too fast","ZHOOOOOM","Haha cryptogram go brrr","I'm proud of you","Most speedy cryptonerd","I *c* you","Deja vu, although I've never seen such speed before","You spend too much time on these puzzles, touch grass","Did f appear 1 time, cause you were as fast as f1 cars","You were faster than a Princeton waitlist student responding to a phone ring","Quite e-e-e-legaaant","Omae wa mou, SOLVEDERU","Speedy and steady wins the race","You're almost as fast as C","Are you JIT compiled, cause that was a massive speedup","That took you so little time, spacetime became just space","You going so fast, you escaped a black hole","You went so fast, you look red from here and blue over there"],Pe=ue([{id:"",name:"",progress:null,solved:!1}].slice(1)),Be=ue(""),Se=ue(null),Ee=me("name",`person-${Math.floor(1e4*Math.random())}`),Te=me("patristocrat",!1),je=me("hint",!1),Oe=ue(null),ze=ue(null),Le=ue(!1),Me=me("has-launched",!0),qe=ue(!1),Ie=ue(null),De=new Map,Ne=new Map,He=de([Be,Ee,ze,Le],(([e,t,n,o])=>({id:e,name:t,progress:n,solved:o}))),Ve=de(Se,(e=>e?.start??Date.now())),Re=de([Pe,Ve],(([e,t])=>new Map(e.map((e=>[e.id,e.solved?c(Re)?.get(e.id)??Date.now()-t:Date.now()-t]))))),_e=e=>`${Math.floor(e)}`.padStart(2,"0"),Ue=e=>{const t=_e(e/6e4/60),n=_e(e/6e4%60),o=_e(e%6e4/1e3);return"00"!==t?`${t}:${n}:${o}`.replace(/^0+/g,""):"00"!==n?`${n}:${o}`.replace(/^0+/g,""):`00:${o}`},Ye=new fe.Peer,Fe=[(e,t)=>{Pe.update((n=>[...n,{id:e,name:t.name,progress:null,solved:!1}]));const n=c(Se);De.has(e)&&null!==n&&De.get(e)?.send({type:we,problem:n})},(e,t)=>{Se.set(t.problem)},(e,t)=>{ve&&Pe.update((n=>n.map((n=>n.id!==e?n:{...n,name:t.name,progress:t.progress,solved:t.solved}))))},(e,t)=>{if(ve)return;const n=c(Be);Pe.set(t.users.filter((e=>e.id!==n)))}],Ze=e=>new Promise((t=>{e.on("open",(()=>{var n;e.peer===ye&&Oe.set(e),De.set(e.peer,e),e.on("data",(n=e.peer,e=>{Fe[e.type]&&Fe[e.type](n,e)})),e.on("close",(e=>()=>{Pe.update((t=>t.filter((t=>t.id!==e)))),De.delete(e)})(e.peer)),setTimeout((()=>{(e=>{e?.send({type:he,name:c(Ee)})})(e)}),100),t(e)}))})),We=e=>De.forEach((t=>t.send(e)));Ye.on("open",(e=>{var t;Be.set(e),ve||null===ye||(t=ye,new Promise((e=>{const n=Be.subscribe((o=>{if(""===o)return;const s=Ye.connect(t);setTimeout((()=>n())),Ze(s).then(e)}))})))})),Ye.on("connection",Ze),Ye.on("error",(e=>{le.fire({title:"Connection error",text:`${e}`,icon:"error",confirmButtonColor:"var(--red)"})}));const Ke=[Pe.subscribe((e=>{ve&&We({type:be,users:[...e.map((e=>({...e,conn:null}))),c(He)]})})),He.subscribe((e=>{ve?We({type:be,users:[...c(Pe).map((e=>({...e,conn:null}))),e]}):c(Oe)?.send({type:ge,name:e.name,progress:e.progress,solved:e.solved})})),Se.subscribe((e=>{null!==e&&(ze.set(null),Le.set(!1),ve&&(Pe.update((e=>e.map((e=>({...e,progress:null,solved:!1}))))),We({type:we,problem:e})))}))];function Xe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Je(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:0,o=Math.random()*(t-e)+e;return Math.floor(o*Math.pow(10,n))/Math.pow(10,n)}function tt(e){return e[et(0,e.length)]}window.$cryptoduel$subscriptions&&window.$cryptoduel$subscriptions.forEach((e=>e())),window.$cryptoduel$subscriptions=Ke;var nt=["#fcf403","#62fc03","#f4fc03","#03e7fc","#03fca5","#a503fc","#fc03ad","#fc03c2"];function ot(e){return Math.log(e)/Math.log(1920)}var st=function(){function e(t){Xe(this,e);var n=t.initialPosition,o=t.direction,s=t.confettiRadius,a=t.confettiColors,r=t.emojis,i=t.emojiSize,l=t.canvasWidth,c=et(.9,1.7,3)*ot(l);this.confettiSpeed={x:c,y:c},this.finalConfettiSpeedX=et(.2,.6,3),this.rotationSpeed=r.length?.01:et(.03,.07,3)*ot(l),this.dragForceCoefficient=et(5e-4,9e-4,6),this.radius={x:s,y:s},this.initialRadius=s,this.rotationAngle="left"===o?et(0,.2,3):et(-.2,0,3),this.emojiSize=i,this.emojiRotationAngle=et(0,2*Math.PI),this.radiusYUpdateDirection="down";var u="left"===o?et(82,15)*Math.PI/180:et(-15,-82)*Math.PI/180;this.absCos=Math.abs(Math.cos(u)),this.absSin=Math.abs(Math.sin(u));var d=et(-150,0),p={x:n.x+("left"===o?-d:d)*this.absCos,y:n.y-d*this.absSin};this.currentPosition=Object.assign({},p),this.initialPosition=Object.assign({},p),this.color=r.length?null:tt(a),this.emoji=r.length?tt(r):null,this.createdAt=(new Date).getTime(),this.direction=o}return Ge(e,[{key:"draw",value:function(e){var t=this.currentPosition,n=this.radius,o=this.color,s=this.emoji,a=this.rotationAngle,r=this.emojiRotationAngle,i=this.emojiSize,l=window.devicePixelRatio;o?(e.fillStyle=o,e.beginPath(),e.ellipse(t.x*l,t.y*l,n.x*l,n.y*l,a,0,2*Math.PI),e.fill()):s&&(e.font="".concat(i,"px serif"),e.save(),e.translate(l*t.x,l*t.y),e.rotate(r),e.textAlign="center",e.fillText(s,0,0),e.restore())}},{key:"updatePosition",value:function(e,t){var n=this.confettiSpeed,o=this.dragForceCoefficient,s=this.finalConfettiSpeedX,a=this.radiusYUpdateDirection,r=this.rotationSpeed,i=this.createdAt,l=this.direction,c=t-i;n.x>s&&(this.confettiSpeed.x-=o*e),this.currentPosition.x+=n.x*("left"===l?-this.absCos:this.absCos)*e,this.currentPosition.y=this.initialPosition.y-n.y*this.absSin*c+.00125*Math.pow(c,2)/2,this.rotationSpeed-=this.emoji?1e-4:1e-5*e,this.rotationSpeed<0&&(this.rotationSpeed=0),this.emoji?this.emojiRotationAngle+=this.rotationSpeed*e%(2*Math.PI):"down"===a?(this.radius.y-=e*r,this.radius.y<=0&&(this.radius.y=0,this.radiusYUpdateDirection="up")):(this.radius.y+=e*r,this.radius.y>=this.initialRadius&&(this.radius.y=this.initialRadius,this.radiusYUpdateDirection="down"))}},{key:"getIsVisibleOnCanvas",value:function(e){return this.currentPosition.y0&&void 0!==arguments[0]?arguments[0]:{};Xe(this,e),this.activeConfettiBatches=[],this.canvas=t.canvas||at(),this.canvasContext=this.canvas.getContext("2d"),this.requestAnimationFrameRequested=!1,this.lastUpdated=(new Date).getTime(),this.iterationIndex=0,this.loop=this.loop.bind(this),requestAnimationFrame(this.loop)}return Ge(e,[{key:"loop",value:function(){var e,t,n,o,s;this.requestAnimationFrameRequested=!1,e=this.canvas,t=window.devicePixelRatio,n=getComputedStyle(e),o=Qe(n.getPropertyValue("width")),s=Qe(n.getPropertyValue("height")),e.setAttribute("width",(o*t).toString()),e.setAttribute("height",(s*t).toString());var a=(new Date).getTime(),r=a-this.lastUpdated,i=this.canvas.offsetHeight,l=this.iterationIndex%10==0;this.activeConfettiBatches=this.activeConfettiBatches.filter((function(e){return e.processShapes({timeDelta:r,currentTime:a},i,l),!l||!e.complete()})),this.iterationIndex++,this.queueAnimationFrameIfNeeded(a)}},{key:"queueAnimationFrameIfNeeded",value:function(e){this.requestAnimationFrameRequested||this.activeConfettiBatches.length<1||(this.requestAnimationFrameRequested=!0,this.lastUpdated=e||(new Date).getTime(),requestAnimationFrame(this.loop))}},{key:"addConfetti",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=rt(e),n=t.confettiRadius,o=t.confettiNumber,s=t.confettiColors,a=t.emojis,r=t.emojiSize,i=this.canvas.getBoundingClientRect(),l=i.width,c=i.height,u=5*c/7,d={x:0,y:u},p={x:l,y:u},m=new it(this.canvasContext),f=0;f{return(e=Ae)[Math.floor(Math.random()*e.length)];var e};let ut;setTimeout((()=>{ut=new lt({canvas:document.querySelector("#confetti")})}),10),window.$cryptoduel$confetti=ut;let dt=0;const pt=e=>e.map((e=>[Math.random(),e])).sort(((e,t)=>e[0]-t[0])).map((e=>e[1])),mt=()=>{const e=pt([...Array(26).keys()]);return e.some(((e,t)=>e===t))?mt():e.map((e=>ke[e]))},ft=e=>{const t=e.text.toUpperCase(),n=mt(),o=[...t].map((e=>n[ke.indexOf(e)]??e)).join("");return{...e,plaintext:t,ciphertext:o,start:Date.now(),hint:wt(t)[0]}},ht=e=>{const t=[...e].filter((e=>ke.includes(e))).join("");return[...Array(t.length).keys()].filter((e=>e%5==0)).map((e=>t.slice(e,e+5))).join(" ")},wt=e=>[...e.split(/\s+/g)],gt=e=>e.replace(/[^\x00-\x7F]+/g,""),bt={ogchar:"",dispatch:(e,t={})=>{},disabled:!1},yt=(e,t={})=>{let n={...t,replaceableElementDefaultOptions:bt};const{dispatch:o}=n,s=()=>{e.style.setProperty("pointer-events",n.disabled?"none":"auto")};s();const a=e=>{n.disabled||("Tab"!==e.key&&e.preventDefault(),n.ogchar!==e.key.toUpperCase()?o("replace",{from:n.ogchar,to:e.key.toUpperCase()}):o("error",{id:xe,msg:"Letters cannot decode to themselves"}))};return e.addEventListener("keydown",a),{update(e){n={...n,...e},s()},destroy(){e.removeEventListener("keydown",a)}}};function vt(t){let n,a,r,i;return{c(){n=v("input"),P(n,"class","decrypted-letter-input svelte-pa8gn1"),P(n,"type","text"),P(n,"maxlength",1),n.disabled=t[1]},m(o,l){var c;g(o,n,l),S(n,t[5]),r||(i=[A(n,"input",t[11]),A(n,"focus",t[7]),A(n,"blur",t[8]),(c=a=yt.call(null,n,{ogchar:t[2],disabled:t[1],dispatch:t[9]}),c&&s(c.destroy)?c.destroy:e)],r=!0)},p(e,t){2&t&&(n.disabled=e[1]),32&t&&n.value!==e[5]&&S(n,e[5]),a&&s(a.update)&&6&t&&a.update.call(null,{ogchar:e[2],disabled:e[1],dispatch:e[9]})},d(e){e&&b(n),r=!1,o(i)}}}function $t(e){let t,n,s,a,r;return{c(){t=v("div"),n=x(e[5]),P(t,"class","decrypted-letter-input svelte-pa8gn1"),P(t,"tabindex",s=e[1]?-1:0)},m(o,s){g(o,t,s),w(t,n),a||(r=[A(t,"focus",e[7]),A(t,"blur",e[8])],a=!0)},p(e,o){32&o&&B(n,e[5]),2&o&&s!==(s=e[1]?-1:0)&&P(t,"tabindex",s)},d(e){e&&b(t),a=!1,o(r)}}}function xt(e){let t;let n=($e?$t:vt)(e);return{c(){t=v(e[4]),n.c(),P(t,"class","decrypted-letter svelte-pa8gn1"),T(t,"empty",""===e[0]),T(t,"focussed-char",e[6]===e[2]),T(t,"non-alphabetic",null===e[0]),T(t,"enable-underline",!e[3]),T(t,"disabled",e[1])},m(e,o){g(e,t,o),n.m(t,null)},p(e,o){n.p(e,o),1&o&&T(t,"empty",""===e[0]),68&o&&T(t,"focussed-char",e[6]===e[2]),1&o&&T(t,"non-alphabetic",null===e[0]),8&o&&T(t,"enable-underline",!e[3]),2&o&&T(t,"disabled",e[1])},d(e){e&&b(t),n.d()}}}function kt(t){let n,o=t[4],s=t[4]&&xt(t);return{c(){s&&s.c(),n=C()},m(e,t){s&&s.m(e,t),g(e,n,t)},p(e,[t]){e[4]?o?a(o,e[4])?(s.d(1),s=xt(e),s.c(),s.m(n.parentNode,n)):s.p(e,t):(s=xt(e),s.c(),s.m(n.parentNode,n)):o&&(s.d(1),s=null),o=e[4]},i:e,o:e,d(e){e&&b(n),s&&s.d(e)}}}const Ct=new Set;function At(e,t,n){let o,s;u(e,Ie,(e=>n(6,s=e)));let{replacement:a=""}=t,{disabled:r=!1}=t,{ogchar:i=""}=t,{disableUnderline:l=!1}=t,{tag:c="div"}=t,d=!1;const p=L();return z((()=>(e=>{const t=dt++;return Ne.set(dt,e),()=>Ne.delete(t)})((e=>{d&&(i!==e||""===i?p("replace",{from:i,to:e}):p("error",{id:xe,msg:"Letters cannot decode to themselves"}))})))),e.$$set=e=>{"replacement"in e&&n(0,a=e.replacement),"disabled"in e&&n(1,r=e.disabled),"ogchar"in e&&n(2,i=e.ogchar),"disableUnderline"in e&&n(3,l=e.disableUnderline),"tag"in e&&n(4,c=e.tag)},e.$$.update=()=>{1&e.$$.dirty&&n(5,o=a),33&e.$$.dirty&&o!==a&&n(5,o=a),1026&e.$$.dirty&&d&&r&&n(10,d=!1),1024&e.$$.dirty&&d&&$e&&qe.set(!0),1024&e.$$.dirty&&!d&&$e&&qe.set(!1)},[a,r,i,l,c,o,s,()=>{Ct.add(i),Ie.set(i),n(10,d=!0)},()=>{Ct.delete(i),Ie.set(1===Ct.size?[...Ct][0]:null),n(10,d=!1)},p,d,function(){o=this.value,n(5,o),n(0,a)}]}class Pt extends re{constructor(e){super(),ae(this,e,At,kt,a,{replacement:0,disabled:1,ogchar:2,disableUnderline:3,tag:4})}}function Bt(e,t,n){const o=e.slice();o[8]=t[n],o[11]=n;const s=o[4][o[11]];o[2]=s;const a=""!==o[2]&&o[3].has(o[2]);return o[9]=a,o}function St(e){let t,n,o,s,a,r,i,l=e[8]+"";return a=new Pt({props:{replacement:e[2],disabled:e[1],ogchar:e[0][e[11]]}}),a.$on("error",e[5]),a.$on("replace",e[6]),{c(){t=v("div"),n=v("div"),o=x(l),s=k(),te(a.$$.fragment),r=k(),P(n,"class","cipher-letter svelte-p18iy7"),P(t,"class","plain-encrypt-pair svelte-p18iy7"),T(t,"duplicate",e[9])},m(e,l){g(e,t,l),w(t,n),w(n,o),w(t,s),ne(a,t,null),w(t,r),i=!0},p(e,n){(!i||1&n)&&l!==(l=e[8]+"")&&B(o,l);const s={};16&n&&(s.replacement=e[2]),2&n&&(s.disabled=e[1]),1&n&&(s.ogchar=e[0][e[11]]),a.$set(s),24&n&&T(t,"duplicate",e[9])},i(e){i||(G(a.$$.fragment,e),i=!0)},o(e){Q(a.$$.fragment,e),i=!1},d(e){e&&b(t),oe(a)}}}function Et(e){let t,n,o=e[0],s=[];for(let t=0;tQ(s[e],1,1,(()=>{s[e]=null}));return{c(){t=v("div");for(let e=0;e{"word"in e&&n(0,a=e.word),"replacement"in e&&n(2,r=e.replacement),"disabled"in e&&n(1,i=e.disabled)},e.$$.update=()=>{5&e.$$.dirty&&n(4,o=((e,t)=>[...e].map((e=>{const n=ke.indexOf(e);return-1===n?null:t[n]})))(a,r)),4&e.$$.dirty&&n(3,s=(e=>{const t=new Set,n=new Set;for(const o of e)n.has(o)&&t.add(o),n.add(o);return t})(r))},[a,i,r,s,o,function(t){M.call(this,e,t)},function(t){M.call(this,e,t)}]}class jt extends re{constructor(e){super(),ae(this,e,Tt,Et,a,{word:0,replacement:2,disabled:1})}}function Ot(e,t,n){const o=e.slice();o[6]=t[n],o[10]=n;const s=`replacement-${o[10]}`;o[7]=s;const a=o[2].has(o[6]);return o[8]=a,o}function zt(e){let t,n,o,s,a,r,i,l,c,u,d,p=e[6]+"",m=(e[8]?e[2].get(e[6]):0)+"";return c=new Pt({props:{tag:"td",replacement:e[0][e[10]],disabled:e[1]||!e[8],ogchar:e[6],disableUnderline:!0}}),c.$on("error",e[4]),c.$on("replace",e[5]),{c(){t=v("tr"),n=v("td"),o=x(p),a=k(),r=v("td"),i=x(m),l=k(),te(c.$$.fragment),u=k(),P(n,"id",s=e[7]),P(t,"class","svelte-e1zesz"),T(t,"no-occurence",!e[8])},m(e,s){g(e,t,s),w(t,n),w(n,o),w(t,a),w(t,r),w(r,i),w(t,l),ne(c,t,null),w(t,u),d=!0},p(e,n){(!d||4&n)&&m!==(m=(e[8]?e[2].get(e[6]):0)+"")&&B(i,m);const o={};1&n&&(o.replacement=e[0][e[10]]),6&n&&(o.disabled=e[1]||!e[8]),c.$set(o),4&n&&T(t,"no-occurence",!e[8])},i(e){d||(G(c.$$.fragment,e),d=!0)},o(e){Q(c.$$.fragment,e),d=!1},d(e){e&&b(t),oe(c)}}}function Lt(e){let t,n,o,s,a,r,i,l,c,u,d,p,m=ke,f=[];for(let t=0;tQ(f[e],1,1,(()=>{f[e]=null}));return{c(){t=v("table"),n=v("tr"),o=v("td"),s=x("-"),a=k(),r=v("td"),i=x("#"),l=k(),c=v("td"),u=x("🠗"),d=k();for(let e=0;e{"replacement"in e&&n(0,s=e.replacement),"quote"in e&&n(3,a=e.quote),"disabled"in e&&n(1,r=e.disabled)},e.$$.update=()=>{8&e.$$.dirty&&n(2,o=(e=>{const t=new Map;for(const n of e)t.set(n,(t.has(n)?t.get(n):0)+1);return t})(a))},[s,r,o,a,function(t){M.call(this,e,t)},function(t){M.call(this,e,t)}]}class qt extends re{constructor(e){super(),ae(this,e,Mt,Lt,a,{replacement:0,quote:3,disabled:1})}}function It(e,t,n){const o=e.slice();return o[11]=t[n],o}function Dt(e){let t,n,o,s,a,r,i,l,c,u=e[0].author+"",d=e[0].hint&&Nt(e),p=e[3],m=[];for(let t=0;tQ(m[e],1,1,(()=>{m[e]=null}));return l=new qt({props:{replacement:e[1],quote:e[0].ciphertext,disabled:e[2]}}),l.$on("replace",e[4]),l.$on("error",e[6]),{c(){t=v("p"),n=x("Solve this quote by "),o=x(u),s=k(),d&&d.c(),a=k(),r=v("div");for(let e=0;e{o=null})),J())},i(e){n||(G(o),n=!0)},o(e){Q(o),n=!1},d(e){o&&o.d(e),e&&b(t)}}}function Rt(e,t,n){let o,s,{problem:a=null}=t;const r=L();let i=Array(26).fill("");const l=(e,t)=>[...t].map((t=>ke.includes(t)&&""!==e[ke.indexOf(t)]));return e.$$set=e=>{"problem"in e&&n(0,a=e.problem)},e.$$.update=()=>{1&e.$$.dirty&&n(1,i=Array(26).fill("")),1&e.$$.dirty&&n(3,o=wt(a?.ciphertext??"")),3&e.$$.dirty&&n(2,s=((e,t)=>!!t&&[...t.ciphertext].every(((n,o)=>!ke.includes(n)||t.plaintext[o]===e[ke.indexOf(n)])))(i,a)),4&e.$$.dirty&&s&&r("solved"),3&e.$$.dirty&&r("progress",{progress:l(i,a?.ciphertext??"")}),e.$$.dirty},[a,i,s,o,e=>(({from:e,to:t})=>{if((1!==t.length||!/[a-zA-Z]/.test(t))&&"BACKSPACE"!==t)return;const o=[...i];o[ke.indexOf(e)]="BACKSPACE"===t?"":t,n(1,i=o)})(e.detail),function(t){M.call(this,e,t)},function(t){M.call(this,e,t)}]}class _t extends re{constructor(e){super(),ae(this,e,Rt,Vt,a,{problem:0})}}function Ut(t){let n,o,s,a,r,i,l,c;return{c(){n=v("div"),o=v("label"),s=x(t[2]),a=k(),r=v("input"),P(o,"for","username"),P(r,"type","text"),P(r,"id","username"),P(r,"name","username"),r.disabled=i=null!==t[3],P(n,"class","name-chooser svelte-1mwrz3m")},m(e,i){g(e,n,i),w(n,o),w(o,s),w(n,a),w(n,r),S(r,t[4]),l||(c=A(r,"input",t[5]),l=!0)},p(e,[t]){4&t&&B(s,e[2]),8&t&&i!==(i=null!==e[3])&&(r.disabled=i),16&t&&r.value!==e[4]&&S(r,e[4])},i:e,o:e,d(e){e&&b(n),l=!1,c()}}}function Yt(t,n,o){let s,a,r=e,i=()=>(r(),r=l(d,(e=>o(3,s=e))),d),c=e,u=()=>(c(),c=l(p,(e=>o(4,a=e))),p);t.$$.on_destroy.push((()=>r())),t.$$.on_destroy.push((()=>c()));let{gameProblem:d=Se}=n;i();let{name:p=Ee}=n;u();let{label:m="Username"}=n;return t.$$set=e=>{"gameProblem"in e&&i(o(0,d=e.gameProblem)),"name"in e&&u(o(1,p=e.name)),"label"in e&&o(2,m=e.label)},[d,p,m,s,a,function(){a=this.value,p.set(a)}]}class Ft extends re{constructor(e){super(),ae(this,e,Yt,Ut,a,{gameProblem:0,name:1,label:2})}}function Zt(t){let n;return{c(){n=v("p"),n.textContent="Acquiring join link...",P(n,"class","waiting")},m(e,t){g(e,n,t)},p:e,d(e){e&&b(n)}}}function Wt(e){let t,n,o;let s=function(e,t){return e[4]?Xt:Kt}(e),a=s(e);return{c(){a.c(),t=k(),n=v("a"),o=x(e[3]),P(n,"href",e[3])},m(e,s){a.m(e,s),g(e,t,s),g(e,n,s),w(n,o)},p(e,t){a.p(e,t),8&t&&B(o,e[3]),8&t&&P(n,"href",e[3])},d(e){a.d(e),e&&b(t),e&&b(n)}}}function Kt(e){let t,n,o,s,a=e[2]?"Join Link (copied)":"Copy Join Link";return{c(){t=v("button"),n=x(a),P(t,"class","join-link svelte-16gx6dp")},m(a,r){g(a,t,r),w(t,n),o||(s=A(t,"click",e[5]),o=!0)},p(e,t){4&t&&a!==(a=e[2]?"Join Link (copied)":"Copy Join Link")&&B(n,a)},d(e){e&&b(t),o=!1,s()}}}function Xt(t){let n,o,s;return{c(){n=v("button"),n.textContent="Share Link",P(n,"class","join-link svelte-16gx6dp")},m(e,a){g(e,n,a),o||(s=A(n,"click",t[6]),o=!0)},p:e,d(e){e&&b(n),o=!1,s()}}}function Jt(t){let n;function o(e,t){return""!==e[1]?Wt:Zt}let s=o(t),a=s(t);return{c(){n=v("div"),a.c(),P(n,"class","join-links svelte-16gx6dp")},m(e,t){g(e,n,t),a.m(n,null)},p(e,[t]){s===(s=o(e))&&a?a.p(e,t):(a.d(1),a=s(e),a&&(a.c(),a.m(n,null)))},i:e,o:e,d(e){e&&b(n),a.d()}}}function Gt(t,n,o){let s,a,r=e,i=()=>(r(),r=l(c,(e=>o(1,a=e))),c);t.$$.on_destroy.push((()=>r()));let{id:c=Be}=n;i();let u=!1,d="share"in navigator;return t.$$set=e=>{"id"in e&&i(o(0,c=e.id))},t.$$.update=()=>{2&t.$$.dirty&&o(3,s=(e=>ve?`${window.location.href}?game=${encodeURIComponent(e)}`:window.location.href)(a))},[c,a,u,s,d,()=>{navigator.clipboard.writeText(s),o(2,u=!0)},()=>{navigator.share({title:"Cryptoduel",text:"Join my cryptoduel game!",url:s}),o(2,u=!0)}]}class Qt extends re{constructor(e){super(),ae(this,e,Gt,Jt,a,{id:0})}}const en=(e,t)=>Math.floor(e/Math.pow(10,t)%10),tn=(e,t)=>!(en(e,t)%2),nn=(e,t,n)=>{let o=e%t;return n&&en(e,n)%2==0?-o:o},on=(e,t,n)=>t[e%n],sn={colors:["#92A1C6","#146A7C","#F0AB3D","#C271B4","#C20D90"],name:"Clara Barton",square:!1,size:40};function an(t){let n;return{c(){n=$("path"),P(n,"d","M13,"+(19+t[2].mouthSpread)+" a1,0.75 0 0,0 10,0"),P(n,"fill",t[2].faceColor)},m(e,t){g(e,n,t)},p:e,d(e){e&&b(n)}}}function rn(t){let n;return{c(){n=$("path"),P(n,"d","M15 "+(19+t[2].mouthSpread)+"c2 1 4 1 6 0"),P(n,"stroke",t[2].faceColor),P(n,"fill","none"),P(n,"stroke-linecap","round")},m(e,t){g(e,n,t)},p:e,d(e){e&&b(n)}}}function ln(t){let n,o,s,a,r,i,l,c,u,d;let p=function(e,t){return e[2].isMouthOpen?rn:an}(t),m=p(t);return{c(){n=$("svg"),o=$("mask"),s=$("rect"),r=$("g"),i=$("rect"),l=$("rect"),c=$("g"),m.c(),u=$("rect"),d=$("rect"),P(s,"width",cn),P(s,"height",cn),P(s,"rx",a=t[1]?void 0:2*cn),P(s,"fill","white"),P(o,"id","mask__beam"),P(o,"maskUnits","userSpaceOnUse"),P(o,"x",0),P(o,"y",0),P(o,"width",cn),P(o,"height",cn),P(i,"width",cn),P(i,"height",cn),P(i,"fill",t[2].backgroundColor),P(l,"x","0"),P(l,"y","0"),P(l,"width",cn),P(l,"height",cn),P(l,"transform","translate("+t[2].wrapperTranslateX+" "+t[2].wrapperTranslateY+") rotate("+t[2].wrapperRotate+" "+cn/2+" "+cn/2+") scale("+t[2].wrapperScale+")"),P(l,"fill",t[2].wrapperColor),P(l,"rx",t[2].isCircle?cn:cn/6),P(u,"x",14-t[2].eyeSpread),P(u,"y",14),P(u,"width",1.5),P(u,"height",2),P(u,"rx",1),P(u,"stroke","none"),P(u,"fill",t[2].faceColor),P(d,"x",20+t[2].eyeSpread),P(d,"y",14),P(d,"width",1.5),P(d,"height",2),P(d,"rx",1),P(d,"stroke","none"),P(d,"fill",t[2].faceColor),P(c,"transform","translate("+t[2].faceTranslateX+" "+t[2].faceTranslateY+") rotate("+t[2].faceRotate+" "+cn/2+" "+cn/2+")"),P(r,"mask","url(#mask__beam)"),P(n,"viewBox","0 0 "+cn+" "+cn),P(n,"fill","none"),P(n,"xmlns","http://www.w3.org/2000/svg"),P(n,"width",t[0]),P(n,"height",t[0]),P(n,"data-testid","avatar-beam")},m(e,t){g(e,n,t),w(n,o),w(o,s),w(n,r),w(r,i),w(r,l),w(r,c),m.m(c,null),w(c,u),w(c,d)},p(e,[t]){2&t&&a!==(a=e[1]?void 0:2*cn)&&P(s,"rx",a),m.p(e,t),1&t&&P(n,"width",e[0]),1&t&&P(n,"height",e[0])},i:e,o:e,d(e){e&&b(n),m.d()}}}const cn=36;function un(e,t,n){let{size:o=sn.size}=t,{name:s=sn.name}=t,{square:a=sn.square}=t,{colors:r=sn.colors}=t;const i=function(e,t){const n=(e=>{const t=Array.from(e);let n=0;return t.forEach((e=>n+=e.charCodeAt(0))),n})(e),o=t&&t.length,s=on(n,t,o),a=nn(n,10,1),r=a<5?a+cn/9:a,i=nn(n,10,2),l=i<5?i+cn/9:i;var c;return{wrapperColor:s,faceColor:(c=s,"#"===c.slice(0,1)&&(c=c.slice(1)),(299*parseInt(c.substr(0,2),16)+587*parseInt(c.substr(2,2),16)+114*parseInt(c.substr(4,2),16))/1e3>=128?"black":"white"),backgroundColor:on(n+13,t,o),wrapperTranslateX:r,wrapperTranslateY:l,wrapperRotate:nn(n,360),wrapperScale:1+nn(n,cn/12)/10,isMouthOpen:tn(n,2),isCircle:tn(n,1),eyeSpread:nn(n,5),mouthSpread:nn(n,3),faceRotate:nn(n,10,3),faceTranslateX:r>cn/6?r/2:nn(n,8,1),faceTranslateY:l>cn/6?l/2:nn(n,7,2)}}(s,r);return e.$$set=e=>{"size"in e&&n(0,o=e.size),"name"in e&&n(3,s=e.name),"square"in e&&n(1,a=e.square),"colors"in e&&n(4,r=e.colors)},[o,a,i,s,r]}var dn=class extends re{constructor(e){super(),ae(this,e,un,ln,a,{size:0,name:3,square:1,colors:4})}};function pn(e){let t,n,o;return n=new dn({props:{size:e[1],name:e[0],colors:["#92A1C6","#146A7C","#F0AB3D","#C271B4","#C20D90"]}}),{c(){t=v("div"),te(n.$$.fragment),P(t,"class","user-bubble svelte-16dwoac"),P(t,"title",e[0]),E(t,"--size",e[1]+"px")},m(e,s){g(e,t,s),ne(n,t,null),o=!0},p(e,[s]){const a={};2&s&&(a.size=e[1]),1&s&&(a.name=e[0]),n.$set(a),(!o||1&s)&&P(t,"title",e[0]),(!o||2&s)&&E(t,"--size",e[1]+"px")},i(e){o||(G(n.$$.fragment,e),o=!0)},o(e){Q(n.$$.fragment,e),o=!1},d(e){e&&b(t),oe(n)}}}function mn(e,t,n){let{name:o=""}=t,{size:s=16}=t;return e.$$set=e=>{"name"in e&&n(0,o=e.name),"size"in e&&n(1,s=e.size)},[o,s]}class fn extends re{constructor(e){super(),ae(this,e,mn,pn,a,{name:0,size:1})}}function hn(e,t,n){const o=e.slice();return o[7]=t[n],o}function wn(e,t,n){const o=e.slice();return o[10]=t[n],o}function gn(e){let t;return{c(){t=v("div"),P(t,"class","progress-item svelte-wvako2"),T(t,"has-done",e[10])},m(e,n){g(e,t,n)},p(e,n){24&n&&T(t,"has-done",e[10])},d(e){e&&b(t)}}}function bn(e){let t,n,o,s,a,r;n=new fn({props:{name:e[7].name}});let i=e[7].progress??e[3],l=[];for(let t=0;tQ(s[e],1,1,(()=>{s[e]=null}));return{c(){t=v("div");for(let e=0;e(c(),c=l(w,(e=>o(6,a=e))),w),d=e,p=()=>(d(),d=l(h,(e=>o(4,r=e))),h),m=e,f=()=>(m(),m=l(g,(e=>o(5,i=e))),g);t.$$.on_destroy.push((()=>c())),t.$$.on_destroy.push((()=>d())),t.$$.on_destroy.push((()=>m()));let{users:h=Pe}=n;p();let{gameProblem:w=Se}=n;u();let{timeTakenByOpponents:g=Re}=n;return f(),t.$$set=e=>{"users"in e&&p(o(0,h=e.users)),"gameProblem"in e&&u(o(1,w=e.gameProblem)),"timeTakenByOpponents"in e&&f(o(2,g=e.timeTakenByOpponents))},t.$$.update=()=>{var e;64&t.$$.dirty&&o(3,s=null===(e=a)?[]:[...e.ciphertext].map((e=>!1)))},[h,w,g,s,r,i,a]}class $n extends re{constructor(e){super(),ae(this,e,vn,yn,a,{users:0,gameProblem:1,timeTakenByOpponents:2})}}function xn(e,t,n){const o=e.slice();return o[2]=t[n],o}function kn(t){let n;return{c(){n=v("span"),n.textContent="waiting for some cool cryptographers"},m(e,t){g(e,n,t)},p:e,d(e){e&&b(n)}}}function Cn(e){let t,n;return t=new fn({props:{name:e[2].name}}),{c(){te(t.$$.fragment)},m(e,o){ne(t,e,o),n=!0},p(e,n){const o={};2&n&&(o.name=e[2].name),t.$set(o)},i(e){n||(G(t.$$.fragment,e),n=!0)},o(e){Q(t.$$.fragment,e),n=!1},d(e){oe(t,e)}}}function An(e){let t,n,o=e[1],s=[];for(let t=0;tQ(s[e],1,1,(()=>{s[e]=null}));let r=null;return o.length||(r=kn()),{c(){t=v("div");for(let e=0;e(a(),a=l(i,(e=>o(1,s=e))),i);t.$$.on_destroy.push((()=>a()));let{users:i=Pe}=n;return r(),t.$$set=e=>{"users"in e&&r(o(0,i=e.users))},[i,s]}class Bn extends re{constructor(e){super(),ae(this,e,Pn,An,a,{users:0})}}function Sn(e){let t,n,s,a;const r=e[6].default,i=d(r,e,e[5],null),l=i||function(e){let t;return{c(){t=x("Play")},m(e,n){g(e,t,n)},d(e){e&&b(t)}}}();return{c(){t=v("button"),l&&l.c(),P(t,"tabindex","0"),P(t,"class","play-button svelte-1n9p51n"),T(t,"exiting",e[0]),T(t,"starting-exit",e[1])},m(o,r){g(o,t,r),l&&l.m(t,null),n=!0,s||(a=[A(t,"click",e[3]),A(t,"touchstart",e[3],{passive:!0}),A(t,"focus",e[7]),A(t,"blur",e[8])],s=!0)},p(e,[o]){i&&i.p&&(!n||32&o)&&f(i,r,e,e[5],n?m(r,e[5],o,null):h(e[5]),null),1&o&&T(t,"exiting",e[0]),2&o&&T(t,"starting-exit",e[1])},i(e){n||(G(l,e),n=!0)},o(e){Q(l,e),n=!1},d(e){e&&b(t),l&&l.d(e),s=!1,o(a)}}}function En(e,t,n){let{$$slots:o={},$$scope:s}=t,{exiting:a=!1}=t,{startingExit:r=!1}=t,{handleExtensionWait:i=200}=t;const l=ue(!1);let c=!1,u=-1;const d=(e=!1)=>{clearTimeout(u),l.set(!1),u=setTimeout((()=>{l.set(c||e)}),i)};return e.$$set=e=>{"exiting"in e&&n(0,a=e.exiting),"startingExit"in e&&n(1,r=e.startingExit),"handleExtensionWait"in e&&n(4,i=e.handleExtensionWait),"$$scope"in e&&n(5,s=e.$$scope)},e.$$.update=()=>{4&e.$$.dirty&&c&&d()},[a,r,c,()=>{n(1,r=!0),c||d(!0);const e=l.subscribe((t=>{t&&(n(0,a=!0),setTimeout((()=>Me.set(!1)),500),setTimeout((()=>e())))}))},i,s,o,()=>n(2,c=!0),()=>n(2,c=!1)]}class Tn extends re{constructor(e){super(),ae(this,e,En,Sn,a,{exiting:0,startingExit:1,handleExtensionWait:4})}}function jn(e){let t;return{c(){t=v("p"),t.textContent="The table given shows the amount of times each character appears in the\n quote as well as the replacement for each character. You may either enter\n replacment characters into the table or under each character of the quote."},m(e,n){g(e,t,n)},d(e){e&&b(t)}}}function On(t){let n,o,s,a,r,i=t[0]&&jn();return{c(){n=v("p"),n.textContent="An aristocrat cryptogram is a quote encrypted by substituting each letter with\n another letter. A patristocrat cryptogram is an aristocrat with all whitespace\n and punctuation removed.",o=k(),s=v("p"),s.textContent="In cryptoduel, you compete with friends to see who can decrypt the quote the\n fastest!",a=k(),i&&i.c(),r=C()},m(e,t){g(e,n,t),g(e,o,t),g(e,s,t),g(e,a,t),i&&i.m(e,t),g(e,r,t)},p(e,[t]){e[0]?i||(i=jn(),i.c(),i.m(r.parentNode,r)):i&&(i.d(1),i=null)},i:e,o:e,d(e){e&&b(n),e&&b(o),e&&b(s),e&&b(a),i&&i.d(e),e&&b(r)}}}function zn(e,t,n){let{verbose:o=!1}=t;return e.$$set=e=>{"verbose"in e&&n(0,o=e.verbose)},[o]}class Ln extends re{constructor(e){super(),ae(this,e,zn,On,a,{verbose:0})}}function Mn(e){let t;return{c(){t=x("Play")},m(e,n){g(e,t,n)},d(e){e&&b(t)}}}function qn(e){let t,n,o,s,a,i,l,c,u,d,p,m,f;function h(t){e[1](t)}l=new Ln({}),u=new Ft({props:{label:"Choose your cryptographer alias"}});let y={$$slots:{default:[Mn]},$$scope:{ctx:e}};return void 0!==e[0]&&(y.exiting=e[0]),p=new Tn({props:y}),I.push((()=>ee(p,"exiting",h))),{c(){var m,f;t=v("div"),n=v("h1"),n.innerHTML='Welcome to Cryptoduel',o=k(),s=v("img"),i=k(),te(l.$$.fragment),c=k(),te(u.$$.fragment),d=k(),te(p.$$.fragment),P(n,"class","svelte-4jfqlb"),P(s,"alt","cryptogram logo"),m=s.src,f=a="./cryptoduel-logo.svg",r||(r=document.createElement("a")),r.href=f,m!==r.href&&P(s,"src","./cryptoduel-logo.svg"),P(s,"width","200"),P(t,"class","container svelte-4jfqlb"),T(t,"exiting",e[0])},m(e,a){g(e,t,a),w(t,n),w(t,o),w(t,s),w(t,i),ne(l,t,null),w(t,c),ne(u,t,null),w(t,d),ne(p,t,null),f=!0},p(e,[n]){const o={};4&n&&(o.$$scope={dirty:n,ctx:e}),!m&&1&n&&(m=!0,o.exiting=e[0],_((()=>m=!1))),p.$set(o),1&n&&T(t,"exiting",e[0])},i(e){f||(G(l.$$.fragment,e),G(u.$$.fragment,e),G(p.$$.fragment,e),f=!0)},o(e){Q(l.$$.fragment,e),Q(u.$$.fragment,e),Q(p.$$.fragment,e),f=!1},d(e){e&&b(t),oe(l),oe(u),oe(p)}}}function In(e,t,n){let o=!1;return z((()=>Ee.update((e=>e)))),[o,function(e){o=e,n(0,o)}]}class Dn extends re{constructor(e){super(),ae(this,e,In,qn,a,{})}}function Nn(t){let n,o,s,a,r,i,l;return{c(){n=v("div"),o=v("input"),s=k(),a=v("label"),r=x(t[2]),P(o,"id",t[1]),P(o,"class","moe-component svelte-14usdwm"),o.disabled=t[3],P(o,"type","checkbox"),P(o,"name",t[1]),P(a,"for",t[1]),P(n,"class","checkbox-option svelte-14usdwm")},m(e,c){g(e,n,c),w(n,o),o.checked=t[0],w(n,s),w(n,a),w(a,r),i||(l=A(o,"change",t[4]),i=!0)},p(e,[t]){2&t&&P(o,"id",e[1]),8&t&&(o.disabled=e[3]),2&t&&P(o,"name",e[1]),1&t&&(o.checked=e[0]),4&t&&B(r,e[2]),2&t&&P(a,"for",e[1])},i:e,o:e,d(e){e&&b(n),i=!1,l()}}}function Hn(e,t,n){let{checked:o=!1}=t,{id:s=""}=t,{label:a=""}=t,{disabled:r=!1}=t;return e.$$set=e=>{"checked"in e&&n(0,o=e.checked),"id"in e&&n(1,s=e.id),"label"in e&&n(2,a=e.label),"disabled"in e&&n(3,r=e.disabled)},[o,s,a,r,function(){o=this.checked,n(0,o)}]}class Vn extends re{constructor(e){super(),ae(this,e,Hn,Nn,a,{checked:0,id:1,label:2,disabled:3})}}function Rn(e){let t,n,o,s,a,r,i,l,c,u,p;const y=e[9].default,$=d(y,e,e[8],null);return{c(){t=v("div"),n=v("div"),o=v("span"),s=k(),a=v("span"),r=x(e[0]),i=k(),l=v("div"),$&&$.c(),P(o,"class","dropdown-arrow svelte-1k4amws"),P(a,"class","title-text"),P(n,"class","panel-title svelte-1k4amws"),P(l,"class","panel-content svelte-1k4amws"),P(t,"class","panel svelte-1k4amws"),P(t,"style",e[3]),T(t,"expanded",e[2]),T(t,"dense",e[1])},m(d,m){g(d,t,m),w(t,n),w(n,o),w(n,s),w(n,a),w(a,r),w(t,i),w(t,l),$&&$.m(l,null),c=!0,u||(p=A(n,"click",e[10]),u=!0)},p(e,[n]){(!c||1&n)&&B(r,e[0]),$&&$.p&&(!c||256&n)&&f($,y,e,e[8],c?m(y,e[8],n,null):h(e[8]),null),(!c||8&n)&&P(t,"style",e[3]),4&n&&T(t,"expanded",e[2]),2&n&&T(t,"dense",e[1])},i(e){c||(G($,e),c=!0)},o(e){Q($,e),c=!1},d(e){e&&b(t),$&&$.d(e),u=!1,p()}}}function _n(e,t,n){let o,s,{$$slots:a={},$$scope:r}=t,{style:i=""}=t,{flyInMs:l=300}=t,{title:c=""}=t,{closed:d=!1}=t,{dense:p=!1}=t;const m=me(`panel-${c}`,!d);u(e,m,(e=>n(2,s=e)));return e.$$set=e=>{"style"in e&&n(6,i=e.style),"flyInMs"in e&&n(7,l=e.flyInMs),"title"in e&&n(0,c=e.title),"closed"in e&&n(5,d=e.closed),"dense"in e&&n(1,p=e.dense),"$$scope"in e&&n(8,r=e.$$scope)},e.$$.update=()=>{4&e.$$.dirty&&n(5,d=!s),192&e.$$.dirty&&n(3,o=`${i} --fly-in-duration: ${l}ms`)},[c,p,s,o,m,d,i,l,r,a,()=>m.update((e=>!e))]}class Un extends re{constructor(e){super(),ae(this,e,_n,Rn,a,{style:6,flyInMs:7,title:0,closed:5,dense:1})}}function Yn(e){let t,n;return t=new Qt({}),{c(){te(t.$$.fragment)},m(e,o){ne(t,e,o),n=!0},i(e){n||(G(t.$$.fragment,e),n=!0)},o(e){Q(t.$$.fragment,e),n=!1},d(e){oe(t,e)}}}function Fn(e){let t,n,o,s,a,r,i,l,c;function u(t){e[7](t)}n=new Ft({});let d={id:"patristocrat-option",label:"Patristocrat",disabled:null!==e[3]};function p(t){e[8](t)}void 0!==e[2]&&(d.checked=e[2]),s=new Vn({props:d}),I.push((()=>ee(s,"checked",u)));let m={id:"hint-option",label:"Hint",disabled:null!==e[3]};return void 0!==e[1]&&(m.checked=e[1]),i=new Vn({props:m}),I.push((()=>ee(i,"checked",p))),{c(){t=v("div"),te(n.$$.fragment),o=k(),te(s.$$.fragment),r=k(),te(i.$$.fragment),P(t,"class","row svelte-lfiz6y")},m(e,a){g(e,t,a),ne(n,t,null),w(t,o),ne(s,t,null),w(t,r),ne(i,t,null),c=!0},p(e,t){const n={};8&t&&(n.disabled=null!==e[3]),!a&&4&t&&(a=!0,n.checked=e[2],_((()=>a=!1))),s.$set(n);const o={};8&t&&(o.disabled=null!==e[3]),!l&&2&t&&(l=!0,o.checked=e[1],_((()=>l=!1))),i.$set(o)},i(e){c||(G(n.$$.fragment,e),G(s.$$.fragment,e),G(i.$$.fragment,e),c=!0)},o(e){Q(n.$$.fragment,e),Q(s.$$.fragment,e),Q(i.$$.fragment,e),c=!1},d(e){e&&b(t),oe(n),oe(s),oe(i)}}}function Zn(t){let n,o;return n=new Ln({props:{verbose:!0}}),{c(){te(n.$$.fragment)},m(e,t){ne(n,e,t),o=!0},p:e,i(e){o||(G(n.$$.fragment,e),o=!0)},o(e){Q(n.$$.fragment,e),o=!1},d(e){oe(n,e)}}}function Wn(e){let t,n;return t=new Un({props:{title:"Lobby",$$slots:{default:[Xn]},$$scope:{ctx:e}}}),{c(){te(t.$$.fragment)},m(e,o){ne(t,e,o),n=!0},p(e,n){const o={};16384&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(G(t.$$.fragment,e),n=!0)},o(e){Q(t.$$.fragment,e),n=!1},d(e){oe(t,e)}}}function Kn(e){let t,n;return t=new Un({props:{title:"Connecting...",$$slots:{default:[Jn]},$$scope:{ctx:e}}}),{c(){te(t.$$.fragment)},m(e,o){ne(t,e,o),n=!0},p(e,n){const o={};16384&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(G(t.$$.fragment,e),n=!0)},o(e){Q(t.$$.fragment,e),n=!1},d(e){oe(t,e)}}}function Xn(e){let t,n;return t=new Bn({}),{c(){te(t.$$.fragment)},m(e,o){ne(t,e,o),n=!0},i(e){n||(G(t.$$.fragment,e),n=!0)},o(e){Q(t.$$.fragment,e),n=!1},d(e){oe(t,e)}}}function Jn(t){let n,o,s=(ye??"")+"";return{c(){n=x("Connecting to "),o=x(s)},m(e,t){g(e,n,t),g(e,o,t)},p:e,d(e){e&&b(n),e&&b(o)}}}function Gn(e){let t,n;return t=new Un({props:{title:"Progress",$$slots:{default:[Qn]},$$scope:{ctx:e}}}),{c(){te(t.$$.fragment)},m(e,o){ne(t,e,o),n=!0},i(e){n||(G(t.$$.fragment,e),n=!0)},o(e){Q(t.$$.fragment,e),n=!1},d(e){oe(t,e)}}}function Qn(e){let t,n;return t=new $n({}),{c(){te(t.$$.fragment)},m(e,o){ne(t,e,o),n=!0},i(e){n||(G(t.$$.fragment,e),n=!0)},o(e){Q(t.$$.fragment,e),n=!1},d(e){oe(t,e)}}}function eo(e){let t,n;return t=new Un({props:{title:"Game",$$slots:{default:[no]},$$scope:{ctx:e}}}),{c(){te(t.$$.fragment)},m(e,o){ne(t,e,o),n=!0},p(e,n){const o={};16392&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(G(t.$$.fragment,e),n=!0)},o(e){Q(t.$$.fragment,e),n=!1},d(e){oe(t,e)}}}function to(e){let t,n;return t=new _t({props:{problem:e[3]}}),t.$on("progress",e[9]),t.$on("solved",e[10]),t.$on("error",e[11]),{c(){te(t.$$.fragment)},m(e,o){ne(t,e,o),n=!0},p(e,n){const o={};8&n&&(o.problem=e[3]),t.$set(o)},i(e){n||(G(t.$$.fragment,e),n=!0)},o(e){Q(t.$$.fragment,e),n=!1},d(e){oe(t,e)}}}function no(t){let n,o,s,a=t[3]&&to(t),r=ve&&function(t){let n,o,s;return{c(){n=v("button"),n.textContent="New Problem"},m(e,a){g(e,n,a),o||(s=A(n,"click",t[5]),o=!0)},p:e,d(e){e&&b(n),o=!1,s()}}}(t);return{c(){a&&a.c(),n=k(),r&&r.c(),o=C()},m(e,t){a&&a.m(e,t),g(e,n,t),r&&r.m(e,t),g(e,o,t),s=!0},p(e,t){e[3]?a?(a.p(e,t),8&t&&G(a,1)):(a=to(e),a.c(),G(a,1),a.m(n.parentNode,n)):a&&(X(),Q(a,1,1,(()=>{a=null})),J()),ve&&r.p(e,t)},i(e){s||(G(a),s=!0)},o(e){Q(a),s=!1},d(e){a&&a.d(e),e&&b(n),r&&r.d(e),e&&b(o)}}}function oo(e){let t,n,o,s,a,r,i,l,c,u,d,p,m;o=new Un({props:{title:"Join Info",$$slots:{default:[Yn]},$$scope:{ctx:e}}}),a=new Un({props:{title:"Settings",$$slots:{default:[Fn]},$$scope:{ctx:e}}}),i=new Un({props:{title:"Help",dense:!0,closed:!0,$$slots:{default:[Zn]},$$scope:{ctx:e}}});const f=[Kn,Wn],h=[];function y(e,t){return e[0]?0:e[4].length>0?1:-1}~(c=y(e))&&(u=h[c]=f[c](e));let $=e[4].length>0&&e[3]&&Gn(e),x=(e[3]||ve)&&eo(e);return{c(){t=v("div"),n=v("div"),te(o.$$.fragment),s=k(),te(a.$$.fragment),r=k(),te(i.$$.fragment),l=k(),u&&u.c(),d=k(),$&&$.c(),p=k(),x&&x.c(),P(n,"class","row svelte-lfiz6y"),P(t,"class","game svelte-lfiz6y")},m(e,u){g(e,t,u),w(t,n),ne(o,n,null),w(n,s),ne(a,n,null),w(t,r),ne(i,t,null),w(t,l),~c&&h[c].m(t,null),w(t,d),$&&$.m(t,null),w(t,p),x&&x.m(t,null),m=!0},p(e,[n]){const s={};16384&n&&(s.$$scope={dirty:n,ctx:e}),o.$set(s);const r={};16398&n&&(r.$$scope={dirty:n,ctx:e}),a.$set(r);const l={};16384&n&&(l.$$scope={dirty:n,ctx:e}),i.$set(l);let m=c;c=y(e),c===m?~c&&h[c].p(e,n):(u&&(X(),Q(h[m],1,1,(()=>{h[m]=null})),J()),~c?(u=h[c],u?u.p(e,n):(u=h[c]=f[c](e),u.c()),G(u,1),u.m(t,d)):u=null),e[4].length>0&&e[3]?$?24&n&&G($,1):($=Gn(e),$.c(),G($,1),$.m(t,p)):$&&(X(),Q($,1,1,(()=>{$=null})),J()),e[3]||ve?x?(x.p(e,n),8&n&&G(x,1)):(x=eo(e),x.c(),G(x,1),x.m(t,null)):x&&(X(),Q(x,1,1,(()=>{x=null})),J())},i(e){m||(G(o.$$.fragment,e),G(a.$$.fragment,e),G(i.$$.fragment,e),G(u),G($),G(x),m=!0)},o(e){Q(o.$$.fragment,e),Q(a.$$.fragment,e),Q(i.$$.fragment,e),Q(u),Q($),Q(x),m=!1},d(e){e&&b(t),oe(o),oe(a),oe(i),~c&&h[c].d(),$&&$.d(),x&&x.d()}}}function so(e,t,n){let o,s,a,r,i,l;u(e,Oe,(e=>n(6,s=e))),u(e,je,(e=>n(1,a=e))),u(e,Te,(e=>n(2,r=e))),u(e,Se,(e=>n(3,i=e))),u(e,Pe,(e=>n(4,l=e)));const c=(()=>{let e=0;const t=fetch(`./quotes/${Math.floor(9*Math.random())}.json`).then((e=>e.json())).then(pt);return async()=>{const n=await t,o=n[e++%n.length];return{author:o.quoteAuthor,text:gt(o.quoteText)}}})(),d=e=>{const t=r?(e=>({...e,plaintext:ht(e.plaintext),ciphertext:ht(e.ciphertext)}))(ft(e)):ft(e);return a?t:{...t,hint:void 0}};return e.$$.update=()=>{64&e.$$.dirty&&n(0,o=!ve&&null===s)},[o,a,r,i,l,()=>{c().then((e=>Se.set(d(e))))},s,function(e){r=e,Te.set(r)},function(e){a=e,je.set(a)},e=>ze.set(e.detail.progress),()=>Le.set(!0),function(t){M.call(this,e,t)}]}class ao extends re{constructor(e){super(),ae(this,e,so,oo,a,{})}}function ro(e,t,n){const o=e.slice();return o[7]=t[n],o}function io(e,t,n){const o=e.slice();return o[10]=t[n],o}function lo(e){let t,n,s,a,r=e[10]+"";return{c(){t=v("div"),n=x(r),P(t,"class","key svelte-1rbs4qt"),T(t,"active",e[1].get(e[10]))},m(o,r){g(o,t,r),w(t,n),s||(a=[A(t,"touchstart",e[3](e[10])),A(t,"touchend",e[4](e[10]))],s=!0)},p(n,o){e=n,6&o&&T(t,"active",e[1].get(e[10]))},d(e){e&&b(t),s=!1,o(a)}}}function co(e){let t,n=e[7],o=[];for(let t=0;tn(0,o=e)));const s=["QWERTYUIOP","ASDFGHJKL","ZXCVBNM"];let a=new Map,r=!1;return z((()=>{n(5,r=!0)})),e.$$.update=()=>{33&e.$$.dirty&&(o?window.scrollBy({top:169.6,behavior:"smooth"}):r&&window.scrollBy({top:-169.6,behavior:"smooth"}))},[o,a,s,e=>t=>{t.preventDefault(),Ne.forEach((t=>t(e))),a.set(e,!0),n(1,a)},e=>()=>{a.set(e,!1),n(1,a)},r]}class mo extends re{constructor(e){super(),ae(this,e,po,uo,a,{})}}function fo(t){let n,o;return n=new ao({}),n.$on("error",t[4]),{c(){te(n.$$.fragment)},m(e,t){ne(n,e,t),o=!0},p:e,i(e){o||(G(n.$$.fragment,e),o=!0)},o(e){Q(n.$$.fragment,e),o=!1},d(e){oe(n,e)}}}function ho(t){let n,o;return n=new Dn({}),{c(){te(n.$$.fragment)},m(e,t){ne(n,e,t),o=!0},p:e,i(e){o||(G(n.$$.fragment,e),o=!0)},o(e){Q(n.$$.fragment,e),o=!1},d(e){oe(n,e)}}}function wo(e){let t,n,o,s,a,r,i,l,c,u;o=new mo({});const d=[ho,fo],p=[];function m(e,t){return e[0]?0:1}return r=m(e),i=p[r]=d[r](e),{c(){t=v("canvas"),n=k(),te(o.$$.fragment),s=k(),a=v("main"),i.c(),l=k(),c=v("div"),P(t,"id","confetti"),P(t,"class","svelte-sols6w"),P(c,"class","keyboard-spacer svelte-sols6w"),T(c,"display",e[1]),P(a,"class","svelte-sols6w")},m(e,i){g(e,t,i),g(e,n,i),ne(o,e,i),g(e,s,i),g(e,a,i),p[r].m(a,null),w(a,l),w(a,c),u=!0},p(e,[t]){let n=r;r=m(e),r===n?p[r].p(e,t):(X(),Q(p[n],1,1,(()=>{p[n]=null})),J(),i=p[r],i?i.p(e,t):(i=p[r]=d[r](e),i.c()),G(i,1),i.m(a,l)),2&t&&T(c,"display",e[1])},i(e){u||(G(o.$$.fragment,e),G(i),u=!0)},o(e){Q(o.$$.fragment,e),Q(i),u=!1},d(e){e&&b(t),e&&b(n),oe(o,e),e&&b(s),e&&b(a),p[r].d()}}}function go(e,t,n){let o,s,a,r;u(e,Le,(e=>n(2,o=e))),u(e,Pe,(e=>n(3,s=e))),u(e,Me,(e=>n(0,a=e))),u(e,qe,(e=>n(1,r=e)));return e.$$.update=()=>{var t;e.$$.dirty,4&e.$$.dirty&&o&&(le.fire({title:ct(),text:(t=Date.now()-c(Ve),`You solved the quote in ${Ue(t)}!`),icon:"success",confirmButtonColor:"var(--primary-color)"}),ut.addConfetti())},[a,r,o,s,e=>(e=>{const t=(e=>`show-err-${e.id}`)(e);localStorage.getItem(t)!==Ce&&le.fire({title:`Error (${e.id})`,text:e.msg,icon:"error",showDenyButton:!0,denyButtonText:"Don't show this error message again",confirmButtonColor:"var(--primary-color)",denyButtonColor:"var(--red)"}).then((e=>{e.isDenied&&localStorage.setItem(t,Ce)}))})(e.detail)]}const bo=new class extends re{constructor(e){super(),ae(this,e,go,wo,a,{})}}({target:document.body,props:{name:"world"}});return"undefined"!=typeof module&&module.hot&&("undefined"!=typeof module&&module.hot.dispose((()=>{bo.$destroy()})),"undefined"!=typeof module&&module.hot.accept()),bo}(); //# sourceMappingURL=bundle.js.map diff --git a/build/bundle.js.map b/build/bundle.js.map index 29c166b..4af91ec 100644 --- a/build/bundle.js.map +++ b/build/bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"bundle.js","sources":["../../node_modules/svelte/internal/index.mjs","../../node_modules/sweetalert2/dist/sweetalert2.all.js","../../node_modules/svelte/store/index.mjs","../../node_modules/svelte-local-storage-store/dist/index.mjs","../../src/js/constants.js","../../src/js/store.js","../../src/js/utils.js","../../src/js/networking.js","../../node_modules/js-confetti/dist/es/index.js","../../src/js/cryptoduelutils.js","../../src/js/actions.js","../../src/js/quotes.js","../../src/js/use.js","../../src/components/ReplacementCharacter.svelte","../../src/components/Word.svelte","../../src/components/ReplacementTable.svelte","../../src/components/CryptogramSolver.svelte","../../src/components/NameChooser.svelte","../../src/components/JoinLink.svelte","../../node_modules/svelte-boring-avatars/dist/lib/utils.js","../../node_modules/svelte-boring-avatars/dist/lib/components/CONSTANTS.js","../../node_modules/svelte-boring-avatars/dist/lib/components/AvatarBeam.svelte","../../src/components/UserBubble.svelte","../../src/components/OpponentProgress.svelte","../../src/components/Lobby.svelte","../../src/components/BulletButton.svelte","../../src/components/HelpInfo.svelte","../../src/components/FirstLaunchPrompt.svelte","../../src/components/Checkbox.svelte","../../src/components/Panel.svelte","../../src/components/Game.svelte","../../src/js/meta.js","../../src/components/Keyboard.svelte","../../src/views/index/App.svelte","../../src/views/index/index.js"],"sourcesContent":["function noop() { }\nconst identity = x => x;\nfunction assign(tar, src) {\n // @ts-ignore\n for (const k in src)\n tar[k] = src[k];\n return tar;\n}\nfunction is_promise(value) {\n return value && typeof value === 'object' && typeof value.then === 'function';\n}\nfunction add_location(element, file, line, column, char) {\n element.__svelte_meta = {\n loc: { file, line, column, char }\n };\n}\nfunction run(fn) {\n return fn();\n}\nfunction blank_object() {\n return Object.create(null);\n}\nfunction run_all(fns) {\n fns.forEach(run);\n}\nfunction is_function(thing) {\n return typeof thing === 'function';\n}\nfunction safe_not_equal(a, b) {\n return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');\n}\nlet src_url_equal_anchor;\nfunction src_url_equal(element_src, url) {\n if (!src_url_equal_anchor) {\n src_url_equal_anchor = document.createElement('a');\n }\n src_url_equal_anchor.href = url;\n return element_src === src_url_equal_anchor.href;\n}\nfunction not_equal(a, b) {\n return a != a ? b == b : a !== b;\n}\nfunction is_empty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction validate_store(store, name) {\n if (store != null && typeof store.subscribe !== 'function') {\n throw new Error(`'${name}' is not a store with a 'subscribe' method`);\n }\n}\nfunction subscribe(store, ...callbacks) {\n if (store == null) {\n return noop;\n }\n const unsub = store.subscribe(...callbacks);\n return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\nfunction get_store_value(store) {\n let value;\n subscribe(store, _ => value = _)();\n return value;\n}\nfunction component_subscribe(component, store, callback) {\n component.$$.on_destroy.push(subscribe(store, callback));\n}\nfunction create_slot(definition, ctx, $$scope, fn) {\n if (definition) {\n const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n return definition[0](slot_ctx);\n }\n}\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n return definition[1] && fn\n ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))\n : $$scope.ctx;\n}\nfunction get_slot_changes(definition, $$scope, dirty, fn) {\n if (definition[2] && fn) {\n const lets = definition[2](fn(dirty));\n if ($$scope.dirty === undefined) {\n return lets;\n }\n if (typeof lets === 'object') {\n const merged = [];\n const len = Math.max($$scope.dirty.length, lets.length);\n for (let i = 0; i < len; i += 1) {\n merged[i] = $$scope.dirty[i] | lets[i];\n }\n return merged;\n }\n return $$scope.dirty | lets;\n }\n return $$scope.dirty;\n}\nfunction update_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn) {\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\n}\nfunction update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n update_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn);\n}\nfunction get_all_dirty_from_scope($$scope) {\n if ($$scope.ctx.length > 32) {\n const dirty = [];\n const length = $$scope.ctx.length / 32;\n for (let i = 0; i < length; i++) {\n dirty[i] = -1;\n }\n return dirty;\n }\n return -1;\n}\nfunction exclude_internal_props(props) {\n const result = {};\n for (const k in props)\n if (k[0] !== '$')\n result[k] = props[k];\n return result;\n}\nfunction compute_rest_props(props, keys) {\n const rest = {};\n keys = new Set(keys);\n for (const k in props)\n if (!keys.has(k) && k[0] !== '$')\n rest[k] = props[k];\n return rest;\n}\nfunction compute_slots(slots) {\n const result = {};\n for (const key in slots) {\n result[key] = true;\n }\n return result;\n}\nfunction once(fn) {\n let ran = false;\n return function (...args) {\n if (ran)\n return;\n ran = true;\n fn.call(this, ...args);\n };\n}\nfunction null_to_empty(value) {\n return value == null ? '' : value;\n}\nfunction set_store_value(store, ret, value) {\n store.set(value);\n return ret;\n}\nconst has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\nfunction action_destroyer(action_result) {\n return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\n\nconst is_client = typeof window !== 'undefined';\nlet now = is_client\n ? () => window.performance.now()\n : () => Date.now();\nlet raf = is_client ? cb => requestAnimationFrame(cb) : noop;\n// used internally for testing\nfunction set_now(fn) {\n now = fn;\n}\nfunction set_raf(fn) {\n raf = fn;\n}\n\nconst tasks = new Set();\nfunction run_tasks(now) {\n tasks.forEach(task => {\n if (!task.c(now)) {\n tasks.delete(task);\n task.f();\n }\n });\n if (tasks.size !== 0)\n raf(run_tasks);\n}\n/**\n * For testing purposes only!\n */\nfunction clear_loops() {\n tasks.clear();\n}\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n */\nfunction loop(callback) {\n let task;\n if (tasks.size === 0)\n raf(run_tasks);\n return {\n promise: new Promise(fulfill => {\n tasks.add(task = { c: callback, f: fulfill });\n }),\n abort() {\n tasks.delete(task);\n }\n };\n}\n\n// Track which nodes are claimed during hydration. Unclaimed nodes can then be removed from the DOM\n// at the end of hydration without touching the remaining nodes.\nlet is_hydrating = false;\nfunction start_hydrating() {\n is_hydrating = true;\n}\nfunction end_hydrating() {\n is_hydrating = false;\n}\nfunction upper_bound(low, high, key, value) {\n // Return first index of value larger than input value in the range [low, high)\n while (low < high) {\n const mid = low + ((high - low) >> 1);\n if (key(mid) <= value) {\n low = mid + 1;\n }\n else {\n high = mid;\n }\n }\n return low;\n}\nfunction init_hydrate(target) {\n if (target.hydrate_init)\n return;\n target.hydrate_init = true;\n // We know that all children have claim_order values since the unclaimed have been detached if target is not \n let children = target.childNodes;\n // If target is , there may be children without claim_order\n if (target.nodeName === 'HEAD') {\n const myChildren = [];\n for (let i = 0; i < children.length; i++) {\n const node = children[i];\n if (node.claim_order !== undefined) {\n myChildren.push(node);\n }\n }\n children = myChildren;\n }\n /*\n * Reorder claimed children optimally.\n * We can reorder claimed children optimally by finding the longest subsequence of\n * nodes that are already claimed in order and only moving the rest. The longest\n * subsequence subsequence of nodes that are claimed in order can be found by\n * computing the longest increasing subsequence of .claim_order values.\n *\n * This algorithm is optimal in generating the least amount of reorder operations\n * possible.\n *\n * Proof:\n * We know that, given a set of reordering operations, the nodes that do not move\n * always form an increasing subsequence, since they do not move among each other\n * meaning that they must be already ordered among each other. Thus, the maximal\n * set of nodes that do not move form a longest increasing subsequence.\n */\n // Compute longest increasing subsequence\n // m: subsequence length j => index k of smallest value that ends an increasing subsequence of length j\n const m = new Int32Array(children.length + 1);\n // Predecessor indices + 1\n const p = new Int32Array(children.length);\n m[0] = -1;\n let longest = 0;\n for (let i = 0; i < children.length; i++) {\n const current = children[i].claim_order;\n // Find the largest subsequence length such that it ends in a value less than our current value\n // upper_bound returns first greater value, so we subtract one\n // with fast path for when we are on the current longest subsequence\n const seqLen = ((longest > 0 && children[m[longest]].claim_order <= current) ? longest + 1 : upper_bound(1, longest, idx => children[m[idx]].claim_order, current)) - 1;\n p[i] = m[seqLen] + 1;\n const newLen = seqLen + 1;\n // We can guarantee that current is the smallest value. Otherwise, we would have generated a longer sequence.\n m[newLen] = i;\n longest = Math.max(newLen, longest);\n }\n // The longest increasing subsequence of nodes (initially reversed)\n const lis = [];\n // The rest of the nodes, nodes that will be moved\n const toMove = [];\n let last = children.length - 1;\n for (let cur = m[longest] + 1; cur != 0; cur = p[cur - 1]) {\n lis.push(children[cur - 1]);\n for (; last >= cur; last--) {\n toMove.push(children[last]);\n }\n last--;\n }\n for (; last >= 0; last--) {\n toMove.push(children[last]);\n }\n lis.reverse();\n // We sort the nodes being moved to guarantee that their insertion order matches the claim order\n toMove.sort((a, b) => a.claim_order - b.claim_order);\n // Finally, we move the nodes\n for (let i = 0, j = 0; i < toMove.length; i++) {\n while (j < lis.length && toMove[i].claim_order >= lis[j].claim_order) {\n j++;\n }\n const anchor = j < lis.length ? lis[j] : null;\n target.insertBefore(toMove[i], anchor);\n }\n}\nfunction append(target, node) {\n target.appendChild(node);\n}\nfunction append_styles(target, style_sheet_id, styles) {\n const append_styles_to = get_root_for_style(target);\n if (!append_styles_to.getElementById(style_sheet_id)) {\n const style = element('style');\n style.id = style_sheet_id;\n style.textContent = styles;\n append_stylesheet(append_styles_to, style);\n }\n}\nfunction get_root_for_style(node) {\n if (!node)\n return document;\n const root = node.getRootNode ? node.getRootNode() : node.ownerDocument;\n if (root && root.host) {\n return root;\n }\n return node.ownerDocument;\n}\nfunction append_empty_stylesheet(node) {\n const style_element = element('style');\n append_stylesheet(get_root_for_style(node), style_element);\n return style_element.sheet;\n}\nfunction append_stylesheet(node, style) {\n append(node.head || node, style);\n}\nfunction append_hydration(target, node) {\n if (is_hydrating) {\n init_hydrate(target);\n if ((target.actual_end_child === undefined) || ((target.actual_end_child !== null) && (target.actual_end_child.parentElement !== target))) {\n target.actual_end_child = target.firstChild;\n }\n // Skip nodes of undefined ordering\n while ((target.actual_end_child !== null) && (target.actual_end_child.claim_order === undefined)) {\n target.actual_end_child = target.actual_end_child.nextSibling;\n }\n if (node !== target.actual_end_child) {\n // We only insert if the ordering of this node should be modified or the parent node is not target\n if (node.claim_order !== undefined || node.parentNode !== target) {\n target.insertBefore(node, target.actual_end_child);\n }\n }\n else {\n target.actual_end_child = node.nextSibling;\n }\n }\n else if (node.parentNode !== target || node.nextSibling !== null) {\n target.appendChild(node);\n }\n}\nfunction insert(target, node, anchor) {\n target.insertBefore(node, anchor || null);\n}\nfunction insert_hydration(target, node, anchor) {\n if (is_hydrating && !anchor) {\n append_hydration(target, node);\n }\n else if (node.parentNode !== target || node.nextSibling != anchor) {\n target.insertBefore(node, anchor || null);\n }\n}\nfunction detach(node) {\n node.parentNode.removeChild(node);\n}\nfunction destroy_each(iterations, detaching) {\n for (let i = 0; i < iterations.length; i += 1) {\n if (iterations[i])\n iterations[i].d(detaching);\n }\n}\nfunction element(name) {\n return document.createElement(name);\n}\nfunction element_is(name, is) {\n return document.createElement(name, { is });\n}\nfunction object_without_properties(obj, exclude) {\n const target = {};\n for (const k in obj) {\n if (has_prop(obj, k)\n // @ts-ignore\n && exclude.indexOf(k) === -1) {\n // @ts-ignore\n target[k] = obj[k];\n }\n }\n return target;\n}\nfunction svg_element(name) {\n return document.createElementNS('http://www.w3.org/2000/svg', name);\n}\nfunction text(data) {\n return document.createTextNode(data);\n}\nfunction space() {\n return text(' ');\n}\nfunction empty() {\n return text('');\n}\nfunction listen(node, event, handler, options) {\n node.addEventListener(event, handler, options);\n return () => node.removeEventListener(event, handler, options);\n}\nfunction prevent_default(fn) {\n return function (event) {\n event.preventDefault();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction stop_propagation(fn) {\n return function (event) {\n event.stopPropagation();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction self(fn) {\n return function (event) {\n // @ts-ignore\n if (event.target === this)\n fn.call(this, event);\n };\n}\nfunction trusted(fn) {\n return function (event) {\n // @ts-ignore\n if (event.isTrusted)\n fn.call(this, event);\n };\n}\nfunction attr(node, attribute, value) {\n if (value == null)\n node.removeAttribute(attribute);\n else if (node.getAttribute(attribute) !== value)\n node.setAttribute(attribute, value);\n}\nfunction set_attributes(node, attributes) {\n // @ts-ignore\n const descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n for (const key in attributes) {\n if (attributes[key] == null) {\n node.removeAttribute(key);\n }\n else if (key === 'style') {\n node.style.cssText = attributes[key];\n }\n else if (key === '__value') {\n node.value = node[key] = attributes[key];\n }\n else if (descriptors[key] && descriptors[key].set) {\n node[key] = attributes[key];\n }\n else {\n attr(node, key, attributes[key]);\n }\n }\n}\nfunction set_svg_attributes(node, attributes) {\n for (const key in attributes) {\n attr(node, key, attributes[key]);\n }\n}\nfunction set_custom_element_data(node, prop, value) {\n if (prop in node) {\n node[prop] = typeof node[prop] === 'boolean' && value === '' ? true : value;\n }\n else {\n attr(node, prop, value);\n }\n}\nfunction xlink_attr(node, attribute, value) {\n node.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\nfunction get_binding_group_value(group, __value, checked) {\n const value = new Set();\n for (let i = 0; i < group.length; i += 1) {\n if (group[i].checked)\n value.add(group[i].__value);\n }\n if (!checked) {\n value.delete(__value);\n }\n return Array.from(value);\n}\nfunction to_number(value) {\n return value === '' ? null : +value;\n}\nfunction time_ranges_to_array(ranges) {\n const array = [];\n for (let i = 0; i < ranges.length; i += 1) {\n array.push({ start: ranges.start(i), end: ranges.end(i) });\n }\n return array;\n}\nfunction children(element) {\n return Array.from(element.childNodes);\n}\nfunction init_claim_info(nodes) {\n if (nodes.claim_info === undefined) {\n nodes.claim_info = { last_index: 0, total_claimed: 0 };\n }\n}\nfunction claim_node(nodes, predicate, processNode, createNode, dontUpdateLastIndex = false) {\n // Try to find nodes in an order such that we lengthen the longest increasing subsequence\n init_claim_info(nodes);\n const resultNode = (() => {\n // We first try to find an element after the previous one\n for (let i = nodes.claim_info.last_index; i < nodes.length; i++) {\n const node = nodes[i];\n if (predicate(node)) {\n const replacement = processNode(node);\n if (replacement === undefined) {\n nodes.splice(i, 1);\n }\n else {\n nodes[i] = replacement;\n }\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n return node;\n }\n }\n // Otherwise, we try to find one before\n // We iterate in reverse so that we don't go too far back\n for (let i = nodes.claim_info.last_index - 1; i >= 0; i--) {\n const node = nodes[i];\n if (predicate(node)) {\n const replacement = processNode(node);\n if (replacement === undefined) {\n nodes.splice(i, 1);\n }\n else {\n nodes[i] = replacement;\n }\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n else if (replacement === undefined) {\n // Since we spliced before the last_index, we decrease it\n nodes.claim_info.last_index--;\n }\n return node;\n }\n }\n // If we can't find any matching node, we create a new one\n return createNode();\n })();\n resultNode.claim_order = nodes.claim_info.total_claimed;\n nodes.claim_info.total_claimed += 1;\n return resultNode;\n}\nfunction claim_element_base(nodes, name, attributes, create_element) {\n return claim_node(nodes, (node) => node.nodeName === name, (node) => {\n const remove = [];\n for (let j = 0; j < node.attributes.length; j++) {\n const attribute = node.attributes[j];\n if (!attributes[attribute.name]) {\n remove.push(attribute.name);\n }\n }\n remove.forEach(v => node.removeAttribute(v));\n return undefined;\n }, () => create_element(name));\n}\nfunction claim_element(nodes, name, attributes) {\n return claim_element_base(nodes, name, attributes, element);\n}\nfunction claim_svg_element(nodes, name, attributes) {\n return claim_element_base(nodes, name, attributes, svg_element);\n}\nfunction claim_text(nodes, data) {\n return claim_node(nodes, (node) => node.nodeType === 3, (node) => {\n const dataStr = '' + data;\n if (node.data.startsWith(dataStr)) {\n if (node.data.length !== dataStr.length) {\n return node.splitText(dataStr.length);\n }\n }\n else {\n node.data = dataStr;\n }\n }, () => text(data), true // Text nodes should not update last index since it is likely not worth it to eliminate an increasing subsequence of actual elements\n );\n}\nfunction claim_space(nodes) {\n return claim_text(nodes, ' ');\n}\nfunction find_comment(nodes, text, start) {\n for (let i = start; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeType === 8 /* comment node */ && node.textContent.trim() === text) {\n return i;\n }\n }\n return nodes.length;\n}\nfunction claim_html_tag(nodes) {\n // find html opening tag\n const start_index = find_comment(nodes, 'HTML_TAG_START', 0);\n const end_index = find_comment(nodes, 'HTML_TAG_END', start_index);\n if (start_index === end_index) {\n return new HtmlTagHydration();\n }\n init_claim_info(nodes);\n const html_tag_nodes = nodes.splice(start_index, end_index - start_index + 1);\n detach(html_tag_nodes[0]);\n detach(html_tag_nodes[html_tag_nodes.length - 1]);\n const claimed_nodes = html_tag_nodes.slice(1, html_tag_nodes.length - 1);\n for (const n of claimed_nodes) {\n n.claim_order = nodes.claim_info.total_claimed;\n nodes.claim_info.total_claimed += 1;\n }\n return new HtmlTagHydration(claimed_nodes);\n}\nfunction set_data(text, data) {\n data = '' + data;\n if (text.wholeText !== data)\n text.data = data;\n}\nfunction set_input_value(input, value) {\n input.value = value == null ? '' : value;\n}\nfunction set_input_type(input, type) {\n try {\n input.type = type;\n }\n catch (e) {\n // do nothing\n }\n}\nfunction set_style(node, key, value, important) {\n if (value === null) {\n node.style.removeProperty(key);\n }\n else {\n node.style.setProperty(key, value, important ? 'important' : '');\n }\n}\nfunction select_option(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n if (option.__value === value) {\n option.selected = true;\n return;\n }\n }\n select.selectedIndex = -1; // no option should be selected\n}\nfunction select_options(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n option.selected = ~value.indexOf(option.__value);\n }\n}\nfunction select_value(select) {\n const selected_option = select.querySelector(':checked') || select.options[0];\n return selected_option && selected_option.__value;\n}\nfunction select_multiple_value(select) {\n return [].map.call(select.querySelectorAll(':checked'), option => option.__value);\n}\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\nlet crossorigin;\nfunction is_crossorigin() {\n if (crossorigin === undefined) {\n crossorigin = false;\n try {\n if (typeof window !== 'undefined' && window.parent) {\n void window.parent.document;\n }\n }\n catch (error) {\n crossorigin = true;\n }\n }\n return crossorigin;\n}\nfunction add_resize_listener(node, fn) {\n const computed_style = getComputedStyle(node);\n if (computed_style.position === 'static') {\n node.style.position = 'relative';\n }\n const iframe = element('iframe');\n iframe.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' +\n 'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;');\n iframe.setAttribute('aria-hidden', 'true');\n iframe.tabIndex = -1;\n const crossorigin = is_crossorigin();\n let unsubscribe;\n if (crossorigin) {\n iframe.src = \"data:text/html,\";\n unsubscribe = listen(window, 'message', (event) => {\n if (event.source === iframe.contentWindow)\n fn();\n });\n }\n else {\n iframe.src = 'about:blank';\n iframe.onload = () => {\n unsubscribe = listen(iframe.contentWindow, 'resize', fn);\n };\n }\n append(node, iframe);\n return () => {\n if (crossorigin) {\n unsubscribe();\n }\n else if (unsubscribe && iframe.contentWindow) {\n unsubscribe();\n }\n detach(iframe);\n };\n}\nfunction toggle_class(element, name, toggle) {\n element.classList[toggle ? 'add' : 'remove'](name);\n}\nfunction custom_event(type, detail, bubbles = false) {\n const e = document.createEvent('CustomEvent');\n e.initCustomEvent(type, bubbles, false, detail);\n return e;\n}\nfunction query_selector_all(selector, parent = document.body) {\n return Array.from(parent.querySelectorAll(selector));\n}\nclass HtmlTag {\n constructor() {\n this.e = this.n = null;\n }\n c(html) {\n this.h(html);\n }\n m(html, target, anchor = null) {\n if (!this.e) {\n this.e = element(target.nodeName);\n this.t = target;\n this.c(html);\n }\n this.i(anchor);\n }\n h(html) {\n this.e.innerHTML = html;\n this.n = Array.from(this.e.childNodes);\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert(this.t, this.n[i], anchor);\n }\n }\n p(html) {\n this.d();\n this.h(html);\n this.i(this.a);\n }\n d() {\n this.n.forEach(detach);\n }\n}\nclass HtmlTagHydration extends HtmlTag {\n constructor(claimed_nodes) {\n super();\n this.e = this.n = null;\n this.l = claimed_nodes;\n }\n c(html) {\n if (this.l) {\n this.n = this.l;\n }\n else {\n super.c(html);\n }\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert_hydration(this.t, this.n[i], anchor);\n }\n }\n}\nfunction attribute_to_object(attributes) {\n const result = {};\n for (const attribute of attributes) {\n result[attribute.name] = attribute.value;\n }\n return result;\n}\nfunction get_custom_elements_slots(element) {\n const result = {};\n element.childNodes.forEach((node) => {\n result[node.slot || 'default'] = true;\n });\n return result;\n}\n\n// we need to store the information for multiple documents because a Svelte application could also contain iframes\n// https://github.com/sveltejs/svelte/issues/3624\nconst managed_styles = new Map();\nlet active = 0;\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\nfunction hash(str) {\n let hash = 5381;\n let i = str.length;\n while (i--)\n hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n return hash >>> 0;\n}\nfunction create_style_information(doc, node) {\n const info = { stylesheet: append_empty_stylesheet(node), rules: {} };\n managed_styles.set(doc, info);\n return info;\n}\nfunction create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {\n const step = 16.666 / duration;\n let keyframes = '{\\n';\n for (let p = 0; p <= 1; p += step) {\n const t = a + (b - a) * ease(p);\n keyframes += p * 100 + `%{${fn(t, 1 - t)}}\\n`;\n }\n const rule = keyframes + `100% {${fn(b, 1 - b)}}\\n}`;\n const name = `__svelte_${hash(rule)}_${uid}`;\n const doc = get_root_for_style(node);\n const { stylesheet, rules } = managed_styles.get(doc) || create_style_information(doc, node);\n if (!rules[name]) {\n rules[name] = true;\n stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);\n }\n const animation = node.style.animation || '';\n node.style.animation = `${animation ? `${animation}, ` : ''}${name} ${duration}ms linear ${delay}ms 1 both`;\n active += 1;\n return name;\n}\nfunction delete_rule(node, name) {\n const previous = (node.style.animation || '').split(', ');\n const next = previous.filter(name\n ? anim => anim.indexOf(name) < 0 // remove specific animation\n : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n );\n const deleted = previous.length - next.length;\n if (deleted) {\n node.style.animation = next.join(', ');\n active -= deleted;\n if (!active)\n clear_rules();\n }\n}\nfunction clear_rules() {\n raf(() => {\n if (active)\n return;\n managed_styles.forEach(info => {\n const { stylesheet } = info;\n let i = stylesheet.cssRules.length;\n while (i--)\n stylesheet.deleteRule(i);\n info.rules = {};\n });\n managed_styles.clear();\n });\n}\n\nfunction create_animation(node, from, fn, params) {\n if (!from)\n return noop;\n const to = node.getBoundingClientRect();\n if (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom)\n return noop;\n const { delay = 0, duration = 300, easing = identity, \n // @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation?\n start: start_time = now() + delay, \n // @ts-ignore todo:\n end = start_time + duration, tick = noop, css } = fn(node, { from, to }, params);\n let running = true;\n let started = false;\n let name;\n function start() {\n if (css) {\n name = create_rule(node, 0, 1, duration, delay, easing, css);\n }\n if (!delay) {\n started = true;\n }\n }\n function stop() {\n if (css)\n delete_rule(node, name);\n running = false;\n }\n loop(now => {\n if (!started && now >= start_time) {\n started = true;\n }\n if (started && now >= end) {\n tick(1, 0);\n stop();\n }\n if (!running) {\n return false;\n }\n if (started) {\n const p = now - start_time;\n const t = 0 + 1 * easing(p / duration);\n tick(t, 1 - t);\n }\n return true;\n });\n start();\n tick(0, 1);\n return stop;\n}\nfunction fix_position(node) {\n const style = getComputedStyle(node);\n if (style.position !== 'absolute' && style.position !== 'fixed') {\n const { width, height } = style;\n const a = node.getBoundingClientRect();\n node.style.position = 'absolute';\n node.style.width = width;\n node.style.height = height;\n add_transform(node, a);\n }\n}\nfunction add_transform(node, a) {\n const b = node.getBoundingClientRect();\n if (a.left !== b.left || a.top !== b.top) {\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n node.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;\n }\n}\n\nlet current_component;\nfunction set_current_component(component) {\n current_component = component;\n}\nfunction get_current_component() {\n if (!current_component)\n throw new Error('Function called outside component initialization');\n return current_component;\n}\nfunction beforeUpdate(fn) {\n get_current_component().$$.before_update.push(fn);\n}\nfunction onMount(fn) {\n get_current_component().$$.on_mount.push(fn);\n}\nfunction afterUpdate(fn) {\n get_current_component().$$.after_update.push(fn);\n}\nfunction onDestroy(fn) {\n get_current_component().$$.on_destroy.push(fn);\n}\nfunction createEventDispatcher() {\n const component = get_current_component();\n return (type, detail) => {\n const callbacks = component.$$.callbacks[type];\n if (callbacks) {\n // TODO are there situations where events could be dispatched\n // in a server (non-DOM) environment?\n const event = custom_event(type, detail);\n callbacks.slice().forEach(fn => {\n fn.call(component, event);\n });\n }\n };\n}\nfunction setContext(key, context) {\n get_current_component().$$.context.set(key, context);\n}\nfunction getContext(key) {\n return get_current_component().$$.context.get(key);\n}\nfunction getAllContexts() {\n return get_current_component().$$.context;\n}\nfunction hasContext(key) {\n return get_current_component().$$.context.has(key);\n}\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\nfunction bubble(component, event) {\n const callbacks = component.$$.callbacks[event.type];\n if (callbacks) {\n // @ts-ignore\n callbacks.slice().forEach(fn => fn.call(this, event));\n }\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\nconst binding_callbacks = [];\nconst render_callbacks = [];\nconst flush_callbacks = [];\nconst resolved_promise = Promise.resolve();\nlet update_scheduled = false;\nfunction schedule_update() {\n if (!update_scheduled) {\n update_scheduled = true;\n resolved_promise.then(flush);\n }\n}\nfunction tick() {\n schedule_update();\n return resolved_promise;\n}\nfunction add_render_callback(fn) {\n render_callbacks.push(fn);\n}\nfunction add_flush_callback(fn) {\n flush_callbacks.push(fn);\n}\n// flush() calls callbacks in this order:\n// 1. All beforeUpdate callbacks, in order: parents before children\n// 2. All bind:this callbacks, in reverse order: children before parents.\n// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT\n// for afterUpdates called during the initial onMount, which are called in\n// reverse order: children before parents.\n// Since callbacks might update component values, which could trigger another\n// call to flush(), the following steps guard against this:\n// 1. During beforeUpdate, any updated components will be added to the\n// dirty_components array and will cause a reentrant call to flush(). Because\n// the flush index is kept outside the function, the reentrant call will pick\n// up where the earlier call left off and go through all dirty components. The\n// current_component value is saved and restored so that the reentrant call will\n// not interfere with the \"parent\" flush() call.\n// 2. bind:this callbacks cannot trigger new flush() calls.\n// 3. During afterUpdate, any updated components will NOT have their afterUpdate\n// callback called a second time; the seen_callbacks set, outside the flush()\n// function, guarantees this behavior.\nconst seen_callbacks = new Set();\nlet flushidx = 0; // Do *not* move this inside the flush() function\nfunction flush() {\n const saved_component = current_component;\n do {\n // first, call beforeUpdate functions\n // and update components\n while (flushidx < dirty_components.length) {\n const component = dirty_components[flushidx];\n flushidx++;\n set_current_component(component);\n update(component.$$);\n }\n set_current_component(null);\n dirty_components.length = 0;\n flushidx = 0;\n while (binding_callbacks.length)\n binding_callbacks.pop()();\n // then, once components are updated, call\n // afterUpdate functions. This may cause\n // subsequent updates...\n for (let i = 0; i < render_callbacks.length; i += 1) {\n const callback = render_callbacks[i];\n if (!seen_callbacks.has(callback)) {\n // ...so guard against infinite loops\n seen_callbacks.add(callback);\n callback();\n }\n }\n render_callbacks.length = 0;\n } while (dirty_components.length);\n while (flush_callbacks.length) {\n flush_callbacks.pop()();\n }\n update_scheduled = false;\n seen_callbacks.clear();\n set_current_component(saved_component);\n}\nfunction update($$) {\n if ($$.fragment !== null) {\n $$.update();\n run_all($$.before_update);\n const dirty = $$.dirty;\n $$.dirty = [-1];\n $$.fragment && $$.fragment.p($$.ctx, dirty);\n $$.after_update.forEach(add_render_callback);\n }\n}\n\nlet promise;\nfunction wait() {\n if (!promise) {\n promise = Promise.resolve();\n promise.then(() => {\n promise = null;\n });\n }\n return promise;\n}\nfunction dispatch(node, direction, kind) {\n node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\nconst outroing = new Set();\nlet outros;\nfunction group_outros() {\n outros = {\n r: 0,\n c: [],\n p: outros // parent group\n };\n}\nfunction check_outros() {\n if (!outros.r) {\n run_all(outros.c);\n }\n outros = outros.p;\n}\nfunction transition_in(block, local) {\n if (block && block.i) {\n outroing.delete(block);\n block.i(local);\n }\n}\nfunction transition_out(block, local, detach, callback) {\n if (block && block.o) {\n if (outroing.has(block))\n return;\n outroing.add(block);\n outros.c.push(() => {\n outroing.delete(block);\n if (callback) {\n if (detach)\n block.d(1);\n callback();\n }\n });\n block.o(local);\n }\n}\nconst null_transition = { duration: 0 };\nfunction create_in_transition(node, fn, params) {\n let config = fn(node, params);\n let running = false;\n let animation_name;\n let task;\n let uid = 0;\n function cleanup() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n tick(0, 1);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n if (task)\n task.abort();\n running = true;\n add_render_callback(() => dispatch(node, true, 'start'));\n task = loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(1, 0);\n dispatch(node, true, 'end');\n cleanup();\n return running = false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(t, 1 - t);\n }\n }\n return running;\n });\n }\n let started = false;\n return {\n start() {\n if (started)\n return;\n started = true;\n delete_rule(node);\n if (is_function(config)) {\n config = config();\n wait().then(go);\n }\n else {\n go();\n }\n },\n invalidate() {\n started = false;\n },\n end() {\n if (running) {\n cleanup();\n running = false;\n }\n }\n };\n}\nfunction create_out_transition(node, fn, params) {\n let config = fn(node, params);\n let running = true;\n let animation_name;\n const group = outros;\n group.r += 1;\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n add_render_callback(() => dispatch(node, false, 'start'));\n loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(0, 1);\n dispatch(node, false, 'end');\n if (!--group.r) {\n // this will result in `end()` being called,\n // so we don't need to clean up here\n run_all(group.c);\n }\n return false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(1 - t, t);\n }\n }\n return running;\n });\n }\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go();\n });\n }\n else {\n go();\n }\n return {\n end(reset) {\n if (reset && config.tick) {\n config.tick(1, 0);\n }\n if (running) {\n if (animation_name)\n delete_rule(node, animation_name);\n running = false;\n }\n }\n };\n}\nfunction create_bidirectional_transition(node, fn, params, intro) {\n let config = fn(node, params);\n let t = intro ? 0 : 1;\n let running_program = null;\n let pending_program = null;\n let animation_name = null;\n function clear_animation() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function init(program, duration) {\n const d = (program.b - t);\n duration *= Math.abs(d);\n return {\n a: t,\n b: program.b,\n d,\n duration,\n start: program.start,\n end: program.start + duration,\n group: program.group\n };\n }\n function go(b) {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n const program = {\n start: now() + delay,\n b\n };\n if (!b) {\n // @ts-ignore todo: improve typings\n program.group = outros;\n outros.r += 1;\n }\n if (running_program || pending_program) {\n pending_program = program;\n }\n else {\n // if this is an intro, and there's a delay, we need to do\n // an initial tick and/or apply CSS animation immediately\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, b, duration, delay, easing, css);\n }\n if (b)\n tick(0, 1);\n running_program = init(program, duration);\n add_render_callback(() => dispatch(node, b, 'start'));\n loop(now => {\n if (pending_program && now > pending_program.start) {\n running_program = init(pending_program, duration);\n pending_program = null;\n dispatch(node, running_program.b, 'start');\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);\n }\n }\n if (running_program) {\n if (now >= running_program.end) {\n tick(t = running_program.b, 1 - t);\n dispatch(node, running_program.b, 'end');\n if (!pending_program) {\n // we're done\n if (running_program.b) {\n // intro — we can tidy up immediately\n clear_animation();\n }\n else {\n // outro — needs to be coordinated\n if (!--running_program.group.r)\n run_all(running_program.group.c);\n }\n }\n running_program = null;\n }\n else if (now >= running_program.start) {\n const p = now - running_program.start;\n t = running_program.a + running_program.d * easing(p / running_program.duration);\n tick(t, 1 - t);\n }\n }\n return !!(running_program || pending_program);\n });\n }\n }\n return {\n run(b) {\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go(b);\n });\n }\n else {\n go(b);\n }\n },\n end() {\n clear_animation();\n running_program = pending_program = null;\n }\n };\n}\n\nfunction handle_promise(promise, info) {\n const token = info.token = {};\n function update(type, index, key, value) {\n if (info.token !== token)\n return;\n info.resolved = value;\n let child_ctx = info.ctx;\n if (key !== undefined) {\n child_ctx = child_ctx.slice();\n child_ctx[key] = value;\n }\n const block = type && (info.current = type)(child_ctx);\n let needs_flush = false;\n if (info.block) {\n if (info.blocks) {\n info.blocks.forEach((block, i) => {\n if (i !== index && block) {\n group_outros();\n transition_out(block, 1, 1, () => {\n if (info.blocks[i] === block) {\n info.blocks[i] = null;\n }\n });\n check_outros();\n }\n });\n }\n else {\n info.block.d(1);\n }\n block.c();\n transition_in(block, 1);\n block.m(info.mount(), info.anchor);\n needs_flush = true;\n }\n info.block = block;\n if (info.blocks)\n info.blocks[index] = block;\n if (needs_flush) {\n flush();\n }\n }\n if (is_promise(promise)) {\n const current_component = get_current_component();\n promise.then(value => {\n set_current_component(current_component);\n update(info.then, 1, info.value, value);\n set_current_component(null);\n }, error => {\n set_current_component(current_component);\n update(info.catch, 2, info.error, error);\n set_current_component(null);\n if (!info.hasCatch) {\n throw error;\n }\n });\n // if we previously had a then/catch block, destroy it\n if (info.current !== info.pending) {\n update(info.pending, 0);\n return true;\n }\n }\n else {\n if (info.current !== info.then) {\n update(info.then, 1, info.value, promise);\n return true;\n }\n info.resolved = promise;\n }\n}\nfunction update_await_block_branch(info, ctx, dirty) {\n const child_ctx = ctx.slice();\n const { resolved } = info;\n if (info.current === info.then) {\n child_ctx[info.value] = resolved;\n }\n if (info.current === info.catch) {\n child_ctx[info.error] = resolved;\n }\n info.block.p(child_ctx, dirty);\n}\n\nconst globals = (typeof window !== 'undefined'\n ? window\n : typeof globalThis !== 'undefined'\n ? globalThis\n : global);\n\nfunction destroy_block(block, lookup) {\n block.d(1);\n lookup.delete(block.key);\n}\nfunction outro_and_destroy_block(block, lookup) {\n transition_out(block, 1, 1, () => {\n lookup.delete(block.key);\n });\n}\nfunction fix_and_destroy_block(block, lookup) {\n block.f();\n destroy_block(block, lookup);\n}\nfunction fix_and_outro_and_destroy_block(block, lookup) {\n block.f();\n outro_and_destroy_block(block, lookup);\n}\nfunction update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {\n let o = old_blocks.length;\n let n = list.length;\n let i = o;\n const old_indexes = {};\n while (i--)\n old_indexes[old_blocks[i].key] = i;\n const new_blocks = [];\n const new_lookup = new Map();\n const deltas = new Map();\n i = n;\n while (i--) {\n const child_ctx = get_context(ctx, list, i);\n const key = get_key(child_ctx);\n let block = lookup.get(key);\n if (!block) {\n block = create_each_block(key, child_ctx);\n block.c();\n }\n else if (dynamic) {\n block.p(child_ctx, dirty);\n }\n new_lookup.set(key, new_blocks[i] = block);\n if (key in old_indexes)\n deltas.set(key, Math.abs(i - old_indexes[key]));\n }\n const will_move = new Set();\n const did_move = new Set();\n function insert(block) {\n transition_in(block, 1);\n block.m(node, next);\n lookup.set(block.key, block);\n next = block.first;\n n--;\n }\n while (o && n) {\n const new_block = new_blocks[n - 1];\n const old_block = old_blocks[o - 1];\n const new_key = new_block.key;\n const old_key = old_block.key;\n if (new_block === old_block) {\n // do nothing\n next = new_block.first;\n o--;\n n--;\n }\n else if (!new_lookup.has(old_key)) {\n // remove old block\n destroy(old_block, lookup);\n o--;\n }\n else if (!lookup.has(new_key) || will_move.has(new_key)) {\n insert(new_block);\n }\n else if (did_move.has(old_key)) {\n o--;\n }\n else if (deltas.get(new_key) > deltas.get(old_key)) {\n did_move.add(new_key);\n insert(new_block);\n }\n else {\n will_move.add(old_key);\n o--;\n }\n }\n while (o--) {\n const old_block = old_blocks[o];\n if (!new_lookup.has(old_block.key))\n destroy(old_block, lookup);\n }\n while (n)\n insert(new_blocks[n - 1]);\n return new_blocks;\n}\nfunction validate_each_keys(ctx, list, get_context, get_key) {\n const keys = new Set();\n for (let i = 0; i < list.length; i++) {\n const key = get_key(get_context(ctx, list, i));\n if (keys.has(key)) {\n throw new Error('Cannot have duplicate keys in a keyed each');\n }\n keys.add(key);\n }\n}\n\nfunction get_spread_update(levels, updates) {\n const update = {};\n const to_null_out = {};\n const accounted_for = { $$scope: 1 };\n let i = levels.length;\n while (i--) {\n const o = levels[i];\n const n = updates[i];\n if (n) {\n for (const key in o) {\n if (!(key in n))\n to_null_out[key] = 1;\n }\n for (const key in n) {\n if (!accounted_for[key]) {\n update[key] = n[key];\n accounted_for[key] = 1;\n }\n }\n levels[i] = n;\n }\n else {\n for (const key in o) {\n accounted_for[key] = 1;\n }\n }\n }\n for (const key in to_null_out) {\n if (!(key in update))\n update[key] = undefined;\n }\n return update;\n}\nfunction get_spread_object(spread_props) {\n return typeof spread_props === 'object' && spread_props !== null ? spread_props : {};\n}\n\n// source: https://html.spec.whatwg.org/multipage/indices.html\nconst boolean_attributes = new Set([\n 'allowfullscreen',\n 'allowpaymentrequest',\n 'async',\n 'autofocus',\n 'autoplay',\n 'checked',\n 'controls',\n 'default',\n 'defer',\n 'disabled',\n 'formnovalidate',\n 'hidden',\n 'ismap',\n 'loop',\n 'multiple',\n 'muted',\n 'nomodule',\n 'novalidate',\n 'open',\n 'playsinline',\n 'readonly',\n 'required',\n 'reversed',\n 'selected'\n]);\n\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\nfunction spread(args, attrs_to_add) {\n const attributes = Object.assign({}, ...args);\n if (attrs_to_add) {\n const classes_to_add = attrs_to_add.classes;\n const styles_to_add = attrs_to_add.styles;\n if (classes_to_add) {\n if (attributes.class == null) {\n attributes.class = classes_to_add;\n }\n else {\n attributes.class += ' ' + classes_to_add;\n }\n }\n if (styles_to_add) {\n if (attributes.style == null) {\n attributes.style = style_object_to_string(styles_to_add);\n }\n else {\n attributes.style = style_object_to_string(merge_ssr_styles(attributes.style, styles_to_add));\n }\n }\n }\n let str = '';\n Object.keys(attributes).forEach(name => {\n if (invalid_attribute_name_character.test(name))\n return;\n const value = attributes[name];\n if (value === true)\n str += ' ' + name;\n else if (boolean_attributes.has(name.toLowerCase())) {\n if (value)\n str += ' ' + name;\n }\n else if (value != null) {\n str += ` ${name}=\"${value}\"`;\n }\n });\n return str;\n}\nfunction merge_ssr_styles(style_attribute, style_directive) {\n const style_object = {};\n for (const individual_style of style_attribute.split(';')) {\n const colon_index = individual_style.indexOf(':');\n const name = individual_style.slice(0, colon_index).trim();\n const value = individual_style.slice(colon_index + 1).trim();\n if (!name)\n continue;\n style_object[name] = value;\n }\n for (const name in style_directive) {\n const value = style_directive[name];\n if (value) {\n style_object[name] = value;\n }\n else {\n delete style_object[name];\n }\n }\n return style_object;\n}\nconst escaped = {\n '\"': '"',\n \"'\": ''',\n '&': '&',\n '<': '<',\n '>': '>'\n};\nfunction escape(html) {\n return String(html).replace(/[\"'&<>]/g, match => escaped[match]);\n}\nfunction escape_attribute_value(value) {\n return typeof value === 'string' ? escape(value) : value;\n}\nfunction escape_object(obj) {\n const result = {};\n for (const key in obj) {\n result[key] = escape_attribute_value(obj[key]);\n }\n return result;\n}\nfunction each(items, fn) {\n let str = '';\n for (let i = 0; i < items.length; i += 1) {\n str += fn(items[i], i);\n }\n return str;\n}\nconst missing_component = {\n $$render: () => ''\n};\nfunction validate_component(component, name) {\n if (!component || !component.$$render) {\n if (name === 'svelte:component')\n name += ' this={...}';\n throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules`);\n }\n return component;\n}\nfunction debug(file, line, column, values) {\n console.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n console.log(values); // eslint-disable-line no-console\n return '';\n}\nlet on_destroy;\nfunction create_ssr_component(fn) {\n function $$render(result, props, bindings, slots, context) {\n const parent_component = current_component;\n const $$ = {\n on_destroy,\n context: new Map(context || (parent_component ? parent_component.$$.context : [])),\n // these will be immediately discarded\n on_mount: [],\n before_update: [],\n after_update: [],\n callbacks: blank_object()\n };\n set_current_component({ $$ });\n const html = fn(result, props, bindings, slots);\n set_current_component(parent_component);\n return html;\n }\n return {\n render: (props = {}, { $$slots = {}, context = new Map() } = {}) => {\n on_destroy = [];\n const result = { title: '', head: '', css: new Set() };\n const html = $$render(result, props, {}, $$slots, context);\n run_all(on_destroy);\n return {\n html,\n css: {\n code: Array.from(result.css).map(css => css.code).join('\\n'),\n map: null // TODO\n },\n head: result.title + result.head\n };\n },\n $$render\n };\n}\nfunction add_attribute(name, value, boolean) {\n if (value == null || (boolean && !value))\n return '';\n const assignment = (boolean && value === true) ? '' : `=\"${escape_attribute_value(value.toString())}\"`;\n return ` ${name}${assignment}`;\n}\nfunction add_classes(classes) {\n return classes ? ` class=\"${classes}\"` : '';\n}\nfunction style_object_to_string(style_object) {\n return Object.keys(style_object)\n .filter(key => style_object[key])\n .map(key => `${key}: ${style_object[key]};`)\n .join(' ');\n}\nfunction add_styles(style_object) {\n const styles = style_object_to_string(style_object);\n return styles ? ` style=\"${styles}\"` : '';\n}\n\nfunction bind(component, name, callback) {\n const index = component.$$.props[name];\n if (index !== undefined) {\n component.$$.bound[index] = callback;\n callback(component.$$.ctx[index]);\n }\n}\nfunction create_component(block) {\n block && block.c();\n}\nfunction claim_component(block, parent_nodes) {\n block && block.l(parent_nodes);\n}\nfunction mount_component(component, target, anchor, customElement) {\n const { fragment, on_mount, on_destroy, after_update } = component.$$;\n fragment && fragment.m(target, anchor);\n if (!customElement) {\n // onMount happens before the initial afterUpdate\n add_render_callback(() => {\n const new_on_destroy = on_mount.map(run).filter(is_function);\n if (on_destroy) {\n on_destroy.push(...new_on_destroy);\n }\n else {\n // Edge case - component was destroyed immediately,\n // most likely as a result of a binding initialising\n run_all(new_on_destroy);\n }\n component.$$.on_mount = [];\n });\n }\n after_update.forEach(add_render_callback);\n}\nfunction destroy_component(component, detaching) {\n const $$ = component.$$;\n if ($$.fragment !== null) {\n run_all($$.on_destroy);\n $$.fragment && $$.fragment.d(detaching);\n // TODO null out other refs, including component.$$ (but need to\n // preserve final state?)\n $$.on_destroy = $$.fragment = null;\n $$.ctx = [];\n }\n}\nfunction make_dirty(component, i) {\n if (component.$$.dirty[0] === -1) {\n dirty_components.push(component);\n schedule_update();\n component.$$.dirty.fill(0);\n }\n component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));\n}\nfunction init(component, options, instance, create_fragment, not_equal, props, append_styles, dirty = [-1]) {\n const parent_component = current_component;\n set_current_component(component);\n const $$ = component.$$ = {\n fragment: null,\n ctx: null,\n // state\n props,\n update: noop,\n not_equal,\n bound: blank_object(),\n // lifecycle\n on_mount: [],\n on_destroy: [],\n on_disconnect: [],\n before_update: [],\n after_update: [],\n context: new Map(options.context || (parent_component ? parent_component.$$.context : [])),\n // everything else\n callbacks: blank_object(),\n dirty,\n skip_bound: false,\n root: options.target || parent_component.$$.root\n };\n append_styles && append_styles($$.root);\n let ready = false;\n $$.ctx = instance\n ? instance(component, options.props || {}, (i, ret, ...rest) => {\n const value = rest.length ? rest[0] : ret;\n if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n if (!$$.skip_bound && $$.bound[i])\n $$.bound[i](value);\n if (ready)\n make_dirty(component, i);\n }\n return ret;\n })\n : [];\n $$.update();\n ready = true;\n run_all($$.before_update);\n // `false` as a special case of no DOM component\n $$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n if (options.target) {\n if (options.hydrate) {\n start_hydrating();\n const nodes = children(options.target);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.l(nodes);\n nodes.forEach(detach);\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.c();\n }\n if (options.intro)\n transition_in(component.$$.fragment);\n mount_component(component, options.target, options.anchor, options.customElement);\n end_hydrating();\n flush();\n }\n set_current_component(parent_component);\n}\nlet SvelteElement;\nif (typeof HTMLElement === 'function') {\n SvelteElement = class extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n }\n connectedCallback() {\n const { on_mount } = this.$$;\n this.$$.on_disconnect = on_mount.map(run).filter(is_function);\n // @ts-ignore todo: improve typings\n for (const key in this.$$.slotted) {\n // @ts-ignore todo: improve typings\n this.appendChild(this.$$.slotted[key]);\n }\n }\n attributeChangedCallback(attr, _oldValue, newValue) {\n this[attr] = newValue;\n }\n disconnectedCallback() {\n run_all(this.$$.on_disconnect);\n }\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n // TODO should this delegate to addEventListener?\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n };\n}\n/**\n * Base class for Svelte components. Used when dev=false.\n */\nclass SvelteComponent {\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n}\n\nfunction dispatch_dev(type, detail) {\n document.dispatchEvent(custom_event(type, Object.assign({ version: '3.47.0' }, detail), true));\n}\nfunction append_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append(target, node);\n}\nfunction append_hydration_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append_hydration(target, node);\n}\nfunction insert_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert(target, node, anchor);\n}\nfunction insert_hydration_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert_hydration(target, node, anchor);\n}\nfunction detach_dev(node) {\n dispatch_dev('SvelteDOMRemove', { node });\n detach(node);\n}\nfunction detach_between_dev(before, after) {\n while (before.nextSibling && before.nextSibling !== after) {\n detach_dev(before.nextSibling);\n }\n}\nfunction detach_before_dev(after) {\n while (after.previousSibling) {\n detach_dev(after.previousSibling);\n }\n}\nfunction detach_after_dev(before) {\n while (before.nextSibling) {\n detach_dev(before.nextSibling);\n }\n}\nfunction listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {\n const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : [];\n if (has_prevent_default)\n modifiers.push('preventDefault');\n if (has_stop_propagation)\n modifiers.push('stopPropagation');\n dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });\n const dispose = listen(node, event, handler, options);\n return () => {\n dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });\n dispose();\n };\n}\nfunction attr_dev(node, attribute, value) {\n attr(node, attribute, value);\n if (value == null)\n dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });\n else\n dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });\n}\nfunction prop_dev(node, property, value) {\n node[property] = value;\n dispatch_dev('SvelteDOMSetProperty', { node, property, value });\n}\nfunction dataset_dev(node, property, value) {\n node.dataset[property] = value;\n dispatch_dev('SvelteDOMSetDataset', { node, property, value });\n}\nfunction set_data_dev(text, data) {\n data = '' + data;\n if (text.wholeText === data)\n return;\n dispatch_dev('SvelteDOMSetData', { node: text, data });\n text.data = data;\n}\nfunction validate_each_argument(arg) {\n if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {\n let msg = '{#each} only iterates over array-like objects.';\n if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {\n msg += ' You can use a spread to convert this iterable into an array.';\n }\n throw new Error(msg);\n }\n}\nfunction validate_slots(name, slot, keys) {\n for (const slot_key of Object.keys(slot)) {\n if (!~keys.indexOf(slot_key)) {\n console.warn(`<${name}> received an unexpected slot \"${slot_key}\".`);\n }\n }\n}\nfunction validate_dynamic_element(tag) {\n if (tag && typeof tag !== 'string') {\n throw new Error(' expects \"this\" attribute to be a string.');\n }\n}\n/**\n * Base class for Svelte components with some minor dev-enhancements. Used when dev=true.\n */\nclass SvelteComponentDev extends SvelteComponent {\n constructor(options) {\n if (!options || (!options.target && !options.$$inline)) {\n throw new Error(\"'target' is a required option\");\n }\n super();\n }\n $destroy() {\n super.$destroy();\n this.$destroy = () => {\n console.warn('Component was already destroyed'); // eslint-disable-line no-console\n };\n }\n $capture_state() { }\n $inject_state() { }\n}\n/**\n * Base class to create strongly typed Svelte components.\n * This only exists for typing purposes and should be used in `.d.ts` files.\n *\n * ### Example:\n *\n * You have component library on npm called `component-library`, from which\n * you export a component called `MyComponent`. For Svelte+TypeScript users,\n * you want to provide typings. Therefore you create a `index.d.ts`:\n * ```ts\n * import { SvelteComponentTyped } from \"svelte\";\n * export class MyComponent extends SvelteComponentTyped<{foo: string}> {}\n * ```\n * Typing this makes it possible for IDEs like VS Code with the Svelte extension\n * to provide intellisense and to use the component like this in a Svelte file\n * with TypeScript:\n * ```svelte\n * \n * \n * ```\n *\n * #### Why not make this part of `SvelteComponent(Dev)`?\n * Because\n * ```ts\n * class ASubclassOfSvelteComponent extends SvelteComponent<{foo: string}> {}\n * const component: typeof SvelteComponent = ASubclassOfSvelteComponent;\n * ```\n * will throw a type error, so we need to separate the more strictly typed class.\n */\nclass SvelteComponentTyped extends SvelteComponentDev {\n constructor(options) {\n super(options);\n }\n}\nfunction loop_guard(timeout) {\n const start = Date.now();\n return () => {\n if (Date.now() - start > timeout) {\n throw new Error('Infinite loop detected');\n }\n };\n}\n\nexport { HtmlTag, HtmlTagHydration, SvelteComponent, SvelteComponentDev, SvelteComponentTyped, SvelteElement, action_destroyer, add_attribute, add_classes, add_flush_callback, add_location, add_render_callback, add_resize_listener, add_styles, add_transform, afterUpdate, append, append_dev, append_empty_stylesheet, append_hydration, append_hydration_dev, append_styles, assign, attr, attr_dev, attribute_to_object, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_html_tag, claim_space, claim_svg_element, claim_text, clear_loops, component_subscribe, compute_rest_props, compute_slots, createEventDispatcher, create_animation, create_bidirectional_transition, create_component, create_in_transition, create_out_transition, create_slot, create_ssr_component, current_component, custom_event, dataset_dev, debug, destroy_block, destroy_component, destroy_each, detach, detach_after_dev, detach_before_dev, detach_between_dev, detach_dev, dirty_components, dispatch_dev, each, element, element_is, empty, end_hydrating, escape, escape_attribute_value, escape_object, escaped, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, getAllContexts, getContext, get_all_dirty_from_scope, get_binding_group_value, get_current_component, get_custom_elements_slots, get_root_for_style, get_slot_changes, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, hasContext, has_prop, identity, init, insert, insert_dev, insert_hydration, insert_hydration_dev, intros, invalid_attribute_name_character, is_client, is_crossorigin, is_empty, is_function, is_promise, listen, listen_dev, loop, loop_guard, merge_ssr_styles, missing_component, mount_component, noop, not_equal, now, null_to_empty, object_without_properties, onDestroy, onMount, once, outro_and_destroy_block, prevent_default, prop_dev, query_selector_all, raf, run, run_all, safe_not_equal, schedule_update, select_multiple_value, select_option, select_options, select_value, self, setContext, set_attributes, set_current_component, set_custom_element_data, set_data, set_data_dev, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, spread, src_url_equal, start_hydrating, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, trusted, update_await_block_branch, update_keyed_each, update_slot, update_slot_base, validate_component, validate_dynamic_element, validate_each_argument, validate_each_keys, validate_slots, validate_store, xlink_attr };\n","/*!\n* sweetalert2 v11.4.8\n* Released under the MIT License.\n*/\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = global || self, global.Sweetalert2 = factory());\n}(this, function () { 'use strict';\n\n const consolePrefix = 'SweetAlert2:';\n /**\n * Filter the unique values into a new array\n * @param arr\n */\n\n const uniqueArray = arr => {\n const result = [];\n\n for (let i = 0; i < arr.length; i++) {\n if (result.indexOf(arr[i]) === -1) {\n result.push(arr[i]);\n }\n }\n\n return result;\n };\n /**\n * Capitalize the first letter of a string\n * @param {string} str\n * @returns {string}\n */\n\n const capitalizeFirstLetter = str => str.charAt(0).toUpperCase() + str.slice(1);\n /**\n * @param {NodeList | HTMLCollection | NamedNodeMap} nodeList\n * @returns {array}\n */\n\n const toArray = nodeList => Array.prototype.slice.call(nodeList);\n /**\n * Standardize console warnings\n * @param {string | array} message\n */\n\n const warn = message => {\n console.warn(\"\".concat(consolePrefix, \" \").concat(typeof message === 'object' ? message.join(' ') : message));\n };\n /**\n * Standardize console errors\n * @param {string} message\n */\n\n const error = message => {\n console.error(\"\".concat(consolePrefix, \" \").concat(message));\n };\n /**\n * Private global state for `warnOnce`\n * @type {Array}\n * @private\n */\n\n const previousWarnOnceMessages = [];\n /**\n * Show a console warning, but only if it hasn't already been shown\n * @param {string} message\n */\n\n const warnOnce = message => {\n if (!previousWarnOnceMessages.includes(message)) {\n previousWarnOnceMessages.push(message);\n warn(message);\n }\n };\n /**\n * Show a one-time console warning about deprecated params/methods\n */\n\n const warnAboutDeprecation = (deprecatedParam, useInstead) => {\n warnOnce(\"\\\"\".concat(deprecatedParam, \"\\\" is deprecated and will be removed in the next major release. Please use \\\"\").concat(useInstead, \"\\\" instead.\"));\n };\n /**\n * If `arg` is a function, call it (with no arguments or context) and return the result.\n * Otherwise, just pass the value through\n * @param arg\n */\n\n const callIfFunction = arg => typeof arg === 'function' ? arg() : arg;\n const hasToPromiseFn = arg => arg && typeof arg.toPromise === 'function';\n const asPromise = arg => hasToPromiseFn(arg) ? arg.toPromise() : Promise.resolve(arg);\n const isPromise = arg => arg && Promise.resolve(arg) === arg;\n\n const defaultParams = {\n title: '',\n titleText: '',\n text: '',\n html: '',\n footer: '',\n icon: undefined,\n iconColor: undefined,\n iconHtml: undefined,\n template: undefined,\n toast: false,\n showClass: {\n popup: 'swal2-show',\n backdrop: 'swal2-backdrop-show',\n icon: 'swal2-icon-show'\n },\n hideClass: {\n popup: 'swal2-hide',\n backdrop: 'swal2-backdrop-hide',\n icon: 'swal2-icon-hide'\n },\n customClass: {},\n target: 'body',\n color: undefined,\n backdrop: true,\n heightAuto: true,\n allowOutsideClick: true,\n allowEscapeKey: true,\n allowEnterKey: true,\n stopKeydownPropagation: true,\n keydownListenerCapture: false,\n showConfirmButton: true,\n showDenyButton: false,\n showCancelButton: false,\n preConfirm: undefined,\n preDeny: undefined,\n confirmButtonText: 'OK',\n confirmButtonAriaLabel: '',\n confirmButtonColor: undefined,\n denyButtonText: 'No',\n denyButtonAriaLabel: '',\n denyButtonColor: undefined,\n cancelButtonText: 'Cancel',\n cancelButtonAriaLabel: '',\n cancelButtonColor: undefined,\n buttonsStyling: true,\n reverseButtons: false,\n focusConfirm: true,\n focusDeny: false,\n focusCancel: false,\n returnFocus: true,\n showCloseButton: false,\n closeButtonHtml: '×',\n closeButtonAriaLabel: 'Close this dialog',\n loaderHtml: '',\n showLoaderOnConfirm: false,\n showLoaderOnDeny: false,\n imageUrl: undefined,\n imageWidth: undefined,\n imageHeight: undefined,\n imageAlt: '',\n timer: undefined,\n timerProgressBar: false,\n width: undefined,\n padding: undefined,\n background: undefined,\n input: undefined,\n inputPlaceholder: '',\n inputLabel: '',\n inputValue: '',\n inputOptions: {},\n inputAutoTrim: true,\n inputAttributes: {},\n inputValidator: undefined,\n returnInputValueOnDeny: false,\n validationMessage: undefined,\n grow: false,\n position: 'center',\n progressSteps: [],\n currentProgressStep: undefined,\n progressStepsDistance: undefined,\n willOpen: undefined,\n didOpen: undefined,\n didRender: undefined,\n willClose: undefined,\n didClose: undefined,\n didDestroy: undefined,\n scrollbarPadding: true\n };\n const updatableParams = ['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'];\n const deprecatedParams = {};\n const toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'focusConfirm', 'focusDeny', 'focusCancel', 'returnFocus', 'heightAuto', 'keydownListenerCapture'];\n /**\n * Is valid parameter\n * @param {string} paramName\n */\n\n const isValidParameter = paramName => {\n return Object.prototype.hasOwnProperty.call(defaultParams, paramName);\n };\n /**\n * Is valid parameter for Swal.update() method\n * @param {string} paramName\n */\n\n const isUpdatableParameter = paramName => {\n return updatableParams.indexOf(paramName) !== -1;\n };\n /**\n * Is deprecated parameter\n * @param {string} paramName\n */\n\n const isDeprecatedParameter = paramName => {\n return deprecatedParams[paramName];\n };\n\n const checkIfParamIsValid = param => {\n if (!isValidParameter(param)) {\n warn(\"Unknown parameter \\\"\".concat(param, \"\\\"\"));\n }\n };\n\n const checkIfToastParamIsValid = param => {\n if (toastIncompatibleParams.includes(param)) {\n warn(\"The parameter \\\"\".concat(param, \"\\\" is incompatible with toasts\"));\n }\n };\n\n const checkIfParamIsDeprecated = param => {\n if (isDeprecatedParameter(param)) {\n warnAboutDeprecation(param, isDeprecatedParameter(param));\n }\n };\n /**\n * Show relevant warnings for given params\n *\n * @param params\n */\n\n\n const showWarningsForParams = params => {\n if (!params.backdrop && params.allowOutsideClick) {\n warn('\"allowOutsideClick\" parameter requires `backdrop` parameter to be set to `true`');\n }\n\n for (const param in params) {\n checkIfParamIsValid(param);\n\n if (params.toast) {\n checkIfToastParamIsValid(param);\n }\n\n checkIfParamIsDeprecated(param);\n }\n };\n\n const swalPrefix = 'swal2-';\n const prefix = items => {\n const result = {};\n\n for (const i in items) {\n result[items[i]] = swalPrefix + items[i];\n }\n\n return result;\n };\n const swalClasses = prefix(['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']);\n const iconTypes = prefix(['success', 'warning', 'info', 'question', 'error']);\n\n /**\n * Gets the popup container which contains the backdrop and the popup itself.\n *\n * @returns {HTMLElement | null}\n */\n\n const getContainer = () => document.body.querySelector(\".\".concat(swalClasses.container));\n const elementBySelector = selectorString => {\n const container = getContainer();\n return container ? container.querySelector(selectorString) : null;\n };\n\n const elementByClass = className => {\n return elementBySelector(\".\".concat(className));\n };\n\n const getPopup = () => elementByClass(swalClasses.popup);\n const getIcon = () => elementByClass(swalClasses.icon);\n const getTitle = () => elementByClass(swalClasses.title);\n const getHtmlContainer = () => elementByClass(swalClasses['html-container']);\n const getImage = () => elementByClass(swalClasses.image);\n const getProgressSteps = () => elementByClass(swalClasses['progress-steps']);\n const getValidationMessage = () => elementByClass(swalClasses['validation-message']);\n const getConfirmButton = () => elementBySelector(\".\".concat(swalClasses.actions, \" .\").concat(swalClasses.confirm));\n const getDenyButton = () => elementBySelector(\".\".concat(swalClasses.actions, \" .\").concat(swalClasses.deny));\n const getInputLabel = () => elementByClass(swalClasses['input-label']);\n const getLoader = () => elementBySelector(\".\".concat(swalClasses.loader));\n const getCancelButton = () => elementBySelector(\".\".concat(swalClasses.actions, \" .\").concat(swalClasses.cancel));\n const getActions = () => elementByClass(swalClasses.actions);\n const getFooter = () => elementByClass(swalClasses.footer);\n const getTimerProgressBar = () => elementByClass(swalClasses['timer-progress-bar']);\n const getCloseButton = () => elementByClass(swalClasses.close); // https://github.com/jkup/focusable/blob/master/index.js\n\n const focusable = \"\\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\";\n const getFocusableElements = () => {\n const focusableElementsWithTabindex = toArray(getPopup().querySelectorAll('[tabindex]:not([tabindex=\"-1\"]):not([tabindex=\"0\"])')) // sort according to tabindex\n .sort((a, b) => {\n const tabindexA = parseInt(a.getAttribute('tabindex'));\n const tabindexB = parseInt(b.getAttribute('tabindex'));\n\n if (tabindexA > tabindexB) {\n return 1;\n } else if (tabindexA < tabindexB) {\n return -1;\n }\n\n return 0;\n });\n const otherFocusableElements = toArray(getPopup().querySelectorAll(focusable)).filter(el => el.getAttribute('tabindex') !== '-1');\n return uniqueArray(focusableElementsWithTabindex.concat(otherFocusableElements)).filter(el => isVisible(el));\n };\n const isModal = () => {\n return hasClass(document.body, swalClasses.shown) && !hasClass(document.body, swalClasses['toast-shown']) && !hasClass(document.body, swalClasses['no-backdrop']);\n };\n const isToast = () => {\n return getPopup() && hasClass(getPopup(), swalClasses.toast);\n };\n const isLoading = () => {\n return getPopup().hasAttribute('data-loading');\n };\n\n const states = {\n previousBodyPadding: null\n };\n /**\n * Securely set innerHTML of an element\n * https://github.com/sweetalert2/sweetalert2/issues/1926\n *\n * @param {HTMLElement} elem\n * @param {string} html\n */\n\n const setInnerHtml = (elem, html) => {\n elem.textContent = '';\n\n if (html) {\n const parser = new DOMParser();\n const parsed = parser.parseFromString(html, \"text/html\");\n toArray(parsed.querySelector('head').childNodes).forEach(child => {\n elem.appendChild(child);\n });\n toArray(parsed.querySelector('body').childNodes).forEach(child => {\n elem.appendChild(child);\n });\n }\n };\n /**\n * @param {HTMLElement} elem\n * @param {string} className\n * @returns {boolean}\n */\n\n const hasClass = (elem, className) => {\n if (!className) {\n return false;\n }\n\n const classList = className.split(/\\s+/);\n\n for (let i = 0; i < classList.length; i++) {\n if (!elem.classList.contains(classList[i])) {\n return false;\n }\n }\n\n return true;\n };\n\n const removeCustomClasses = (elem, params) => {\n toArray(elem.classList).forEach(className => {\n if (!Object.values(swalClasses).includes(className) && !Object.values(iconTypes).includes(className) && !Object.values(params.showClass).includes(className)) {\n elem.classList.remove(className);\n }\n });\n };\n\n const applyCustomClass = (elem, params, className) => {\n removeCustomClasses(elem, params);\n\n if (params.customClass && params.customClass[className]) {\n if (typeof params.customClass[className] !== 'string' && !params.customClass[className].forEach) {\n return warn(\"Invalid type of customClass.\".concat(className, \"! Expected string or iterable object, got \\\"\").concat(typeof params.customClass[className], \"\\\"\"));\n }\n\n addClass(elem, params.customClass[className]);\n }\n };\n /**\n * @param {HTMLElement} popup\n * @param {string} inputType\n * @returns {HTMLInputElement | null}\n */\n\n const getInput = (popup, inputType) => {\n if (!inputType) {\n return null;\n }\n\n switch (inputType) {\n case 'select':\n case 'textarea':\n case 'file':\n return popup.querySelector(\".\".concat(swalClasses.popup, \" > .\").concat(swalClasses[inputType]));\n\n case 'checkbox':\n return popup.querySelector(\".\".concat(swalClasses.popup, \" > .\").concat(swalClasses.checkbox, \" input\"));\n\n case 'radio':\n return popup.querySelector(\".\".concat(swalClasses.popup, \" > .\").concat(swalClasses.radio, \" input:checked\")) || popup.querySelector(\".\".concat(swalClasses.popup, \" > .\").concat(swalClasses.radio, \" input:first-child\"));\n\n case 'range':\n return popup.querySelector(\".\".concat(swalClasses.popup, \" > .\").concat(swalClasses.range, \" input\"));\n\n default:\n return popup.querySelector(\".\".concat(swalClasses.popup, \" > .\").concat(swalClasses.input));\n }\n };\n /**\n * @param {HTMLInputElement} input\n */\n\n const focusInput = input => {\n input.focus(); // place cursor at end of text in text input\n\n if (input.type !== 'file') {\n // http://stackoverflow.com/a/2345915\n const val = input.value;\n input.value = '';\n input.value = val;\n }\n };\n /**\n * @param {HTMLElement | HTMLElement[] | null} target\n * @param {string | string[]} classList\n * @param {boolean} condition\n */\n\n const toggleClass = (target, classList, condition) => {\n if (!target || !classList) {\n return;\n }\n\n if (typeof classList === 'string') {\n classList = classList.split(/\\s+/).filter(Boolean);\n }\n\n classList.forEach(className => {\n if (Array.isArray(target)) {\n target.forEach(elem => {\n condition ? elem.classList.add(className) : elem.classList.remove(className);\n });\n } else {\n condition ? target.classList.add(className) : target.classList.remove(className);\n }\n });\n };\n /**\n * @param {HTMLElement | HTMLElement[] | null} target\n * @param {string | string[]} classList\n */\n\n const addClass = (target, classList) => {\n toggleClass(target, classList, true);\n };\n /**\n * @param {HTMLElement | HTMLElement[] | null} target\n * @param {string | string[]} classList\n */\n\n const removeClass = (target, classList) => {\n toggleClass(target, classList, false);\n };\n /**\n * Get direct child of an element by class name\n *\n * @param {HTMLElement} elem\n * @param {string} className\n * @returns {HTMLElement | null}\n */\n\n const getDirectChildByClass = (elem, className) => {\n const childNodes = toArray(elem.childNodes);\n\n for (let i = 0; i < childNodes.length; i++) {\n if (hasClass(childNodes[i], className)) {\n return childNodes[i];\n }\n }\n };\n /**\n * @param {HTMLElement} elem\n * @param {string} property\n * @param {*} value\n */\n\n const applyNumericalStyle = (elem, property, value) => {\n if (value === \"\".concat(parseInt(value))) {\n value = parseInt(value);\n }\n\n if (value || parseInt(value) === 0) {\n elem.style[property] = typeof value === 'number' ? \"\".concat(value, \"px\") : value;\n } else {\n elem.style.removeProperty(property);\n }\n };\n /**\n * @param {HTMLElement} elem\n * @param {string} display\n */\n\n const show = function (elem) {\n let display = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'flex';\n elem.style.display = display;\n };\n /**\n * @param {HTMLElement} elem\n */\n\n const hide = elem => {\n elem.style.display = 'none';\n };\n const setStyle = (parent, selector, property, value) => {\n const el = parent.querySelector(selector);\n\n if (el) {\n el.style[property] = value;\n }\n };\n const toggle = (elem, condition, display) => {\n condition ? show(elem, display) : hide(elem);\n }; // borrowed from jquery $(elem).is(':visible') implementation\n\n const isVisible = elem => !!(elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length));\n const allButtonsAreHidden = () => !isVisible(getConfirmButton()) && !isVisible(getDenyButton()) && !isVisible(getCancelButton());\n const isScrollable = elem => !!(elem.scrollHeight > elem.clientHeight); // borrowed from https://stackoverflow.com/a/46352119\n\n const hasCssAnimation = elem => {\n const style = window.getComputedStyle(elem);\n const animDuration = parseFloat(style.getPropertyValue('animation-duration') || '0');\n const transDuration = parseFloat(style.getPropertyValue('transition-duration') || '0');\n return animDuration > 0 || transDuration > 0;\n };\n const animateTimerProgressBar = function (timer) {\n let reset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n const timerProgressBar = getTimerProgressBar();\n\n if (isVisible(timerProgressBar)) {\n if (reset) {\n timerProgressBar.style.transition = 'none';\n timerProgressBar.style.width = '100%';\n }\n\n setTimeout(() => {\n timerProgressBar.style.transition = \"width \".concat(timer / 1000, \"s linear\");\n timerProgressBar.style.width = '0%';\n }, 10);\n }\n };\n const stopTimerProgressBar = () => {\n const timerProgressBar = getTimerProgressBar();\n const timerProgressBarWidth = parseInt(window.getComputedStyle(timerProgressBar).width);\n timerProgressBar.style.removeProperty('transition');\n timerProgressBar.style.width = '100%';\n const timerProgressBarFullWidth = parseInt(window.getComputedStyle(timerProgressBar).width);\n const timerProgressBarPercent = timerProgressBarWidth / timerProgressBarFullWidth * 100;\n timerProgressBar.style.removeProperty('transition');\n timerProgressBar.style.width = \"\".concat(timerProgressBarPercent, \"%\");\n };\n\n /**\n * Detect Node env\n *\n * @returns {boolean}\n */\n const isNodeEnv = () => typeof window === 'undefined' || typeof document === 'undefined';\n\n const RESTORE_FOCUS_TIMEOUT = 100;\n\n const globalState = {};\n\n const focusPreviousActiveElement = () => {\n if (globalState.previousActiveElement && globalState.previousActiveElement.focus) {\n globalState.previousActiveElement.focus();\n globalState.previousActiveElement = null;\n } else if (document.body) {\n document.body.focus();\n }\n }; // Restore previous active (focused) element\n\n\n const restoreActiveElement = returnFocus => {\n return new Promise(resolve => {\n if (!returnFocus) {\n return resolve();\n }\n\n const x = window.scrollX;\n const y = window.scrollY;\n globalState.restoreFocusTimeout = setTimeout(() => {\n focusPreviousActiveElement();\n resolve();\n }, RESTORE_FOCUS_TIMEOUT); // issues/900\n\n window.scrollTo(x, y);\n });\n };\n\n const sweetHTML = \"\\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, '');\n\n const resetOldContainer = () => {\n const oldContainer = getContainer();\n\n if (!oldContainer) {\n return false;\n }\n\n oldContainer.remove();\n removeClass([document.documentElement, document.body], [swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['has-column']]);\n return true;\n };\n\n const resetValidationMessage = () => {\n globalState.currentInstance.resetValidationMessage();\n };\n\n const addInputChangeListeners = () => {\n const popup = getPopup();\n const input = getDirectChildByClass(popup, swalClasses.input);\n const file = getDirectChildByClass(popup, swalClasses.file);\n const range = popup.querySelector(\".\".concat(swalClasses.range, \" input\"));\n const rangeOutput = popup.querySelector(\".\".concat(swalClasses.range, \" output\"));\n const select = getDirectChildByClass(popup, swalClasses.select);\n const checkbox = popup.querySelector(\".\".concat(swalClasses.checkbox, \" input\"));\n const textarea = getDirectChildByClass(popup, swalClasses.textarea);\n input.oninput = resetValidationMessage;\n file.onchange = resetValidationMessage;\n select.onchange = resetValidationMessage;\n checkbox.onchange = resetValidationMessage;\n textarea.oninput = resetValidationMessage;\n\n range.oninput = () => {\n resetValidationMessage();\n rangeOutput.value = range.value;\n };\n\n range.onchange = () => {\n resetValidationMessage();\n range.nextSibling.value = range.value;\n };\n };\n\n const getTarget = target => typeof target === 'string' ? document.querySelector(target) : target;\n\n const setupAccessibility = params => {\n const popup = getPopup();\n popup.setAttribute('role', params.toast ? 'alert' : 'dialog');\n popup.setAttribute('aria-live', params.toast ? 'polite' : 'assertive');\n\n if (!params.toast) {\n popup.setAttribute('aria-modal', 'true');\n }\n };\n\n const setupRTL = targetElement => {\n if (window.getComputedStyle(targetElement).direction === 'rtl') {\n addClass(getContainer(), swalClasses.rtl);\n }\n };\n /*\n * Add modal + backdrop to DOM\n */\n\n\n const init = params => {\n // Clean up the old popup container if it exists\n const oldContainerExisted = resetOldContainer();\n /* istanbul ignore if */\n\n if (isNodeEnv()) {\n error('SweetAlert2 requires document to initialize');\n return;\n }\n\n const container = document.createElement('div');\n container.className = swalClasses.container;\n\n if (oldContainerExisted) {\n addClass(container, swalClasses['no-transition']);\n }\n\n setInnerHtml(container, sweetHTML);\n const targetElement = getTarget(params.target);\n targetElement.appendChild(container);\n setupAccessibility(params);\n setupRTL(targetElement);\n addInputChangeListeners();\n };\n\n /**\n * @param {HTMLElement | object | string} param\n * @param {HTMLElement} target\n */\n\n const parseHtmlToContainer = (param, target) => {\n // DOM element\n if (param instanceof HTMLElement) {\n target.appendChild(param);\n } // Object\n else if (typeof param === 'object') {\n handleObject(param, target);\n } // Plain string\n else if (param) {\n setInnerHtml(target, param);\n }\n };\n /**\n * @param {object} param\n * @param {HTMLElement} target\n */\n\n const handleObject = (param, target) => {\n // JQuery element(s)\n if (param.jquery) {\n handleJqueryElem(target, param);\n } // For other objects use their string representation\n else {\n setInnerHtml(target, param.toString());\n }\n };\n\n const handleJqueryElem = (target, elem) => {\n target.textContent = '';\n\n if (0 in elem) {\n for (let i = 0; (i in elem); i++) {\n target.appendChild(elem[i].cloneNode(true));\n }\n } else {\n target.appendChild(elem.cloneNode(true));\n }\n };\n\n const animationEndEvent = (() => {\n // Prevent run in Node env\n\n /* istanbul ignore if */\n if (isNodeEnv()) {\n return false;\n }\n\n const testEl = document.createElement('div');\n const transEndEventNames = {\n WebkitAnimation: 'webkitAnimationEnd',\n // Chrome, Safari and Opera\n animation: 'animationend' // Standard syntax\n\n };\n\n for (const i in transEndEventNames) {\n if (Object.prototype.hasOwnProperty.call(transEndEventNames, i) && typeof testEl.style[i] !== 'undefined') {\n return transEndEventNames[i];\n }\n }\n\n return false;\n })();\n\n // https://github.com/twbs/bootstrap/blob/master/js/src/modal.js\n\n const measureScrollbar = () => {\n const scrollDiv = document.createElement('div');\n scrollDiv.className = swalClasses['scrollbar-measure'];\n document.body.appendChild(scrollDiv);\n const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;\n document.body.removeChild(scrollDiv);\n return scrollbarWidth;\n };\n\n const renderActions = (instance, params) => {\n const actions = getActions();\n const loader = getLoader(); // Actions (buttons) wrapper\n\n if (!params.showConfirmButton && !params.showDenyButton && !params.showCancelButton) {\n hide(actions);\n } else {\n show(actions);\n } // Custom class\n\n\n applyCustomClass(actions, params, 'actions'); // Render all the buttons\n\n renderButtons(actions, loader, params); // Loader\n\n setInnerHtml(loader, params.loaderHtml);\n applyCustomClass(loader, params, 'loader');\n };\n\n function renderButtons(actions, loader, params) {\n const confirmButton = getConfirmButton();\n const denyButton = getDenyButton();\n const cancelButton = getCancelButton(); // Render buttons\n\n renderButton(confirmButton, 'confirm', params);\n renderButton(denyButton, 'deny', params);\n renderButton(cancelButton, 'cancel', params);\n handleButtonsStyling(confirmButton, denyButton, cancelButton, params);\n\n if (params.reverseButtons) {\n if (params.toast) {\n actions.insertBefore(cancelButton, confirmButton);\n actions.insertBefore(denyButton, confirmButton);\n } else {\n actions.insertBefore(cancelButton, loader);\n actions.insertBefore(denyButton, loader);\n actions.insertBefore(confirmButton, loader);\n }\n }\n }\n\n function handleButtonsStyling(confirmButton, denyButton, cancelButton, params) {\n if (!params.buttonsStyling) {\n return removeClass([confirmButton, denyButton, cancelButton], swalClasses.styled);\n }\n\n addClass([confirmButton, denyButton, cancelButton], swalClasses.styled); // Buttons background colors\n\n if (params.confirmButtonColor) {\n confirmButton.style.backgroundColor = params.confirmButtonColor;\n addClass(confirmButton, swalClasses['default-outline']);\n }\n\n if (params.denyButtonColor) {\n denyButton.style.backgroundColor = params.denyButtonColor;\n addClass(denyButton, swalClasses['default-outline']);\n }\n\n if (params.cancelButtonColor) {\n cancelButton.style.backgroundColor = params.cancelButtonColor;\n addClass(cancelButton, swalClasses['default-outline']);\n }\n }\n\n function renderButton(button, buttonType, params) {\n toggle(button, params[\"show\".concat(capitalizeFirstLetter(buttonType), \"Button\")], 'inline-block');\n setInnerHtml(button, params[\"\".concat(buttonType, \"ButtonText\")]); // Set caption text\n\n button.setAttribute('aria-label', params[\"\".concat(buttonType, \"ButtonAriaLabel\")]); // ARIA label\n // Add buttons custom classes\n\n button.className = swalClasses[buttonType];\n applyCustomClass(button, params, \"\".concat(buttonType, \"Button\"));\n addClass(button, params[\"\".concat(buttonType, \"ButtonClass\")]);\n }\n\n function handleBackdropParam(container, backdrop) {\n if (typeof backdrop === 'string') {\n container.style.background = backdrop;\n } else if (!backdrop) {\n addClass([document.documentElement, document.body], swalClasses['no-backdrop']);\n }\n }\n\n function handlePositionParam(container, position) {\n if (position in swalClasses) {\n addClass(container, swalClasses[position]);\n } else {\n warn('The \"position\" parameter is not valid, defaulting to \"center\"');\n addClass(container, swalClasses.center);\n }\n }\n\n function handleGrowParam(container, grow) {\n if (grow && typeof grow === 'string') {\n const growClass = \"grow-\".concat(grow);\n\n if (growClass in swalClasses) {\n addClass(container, swalClasses[growClass]);\n }\n }\n }\n\n const renderContainer = (instance, params) => {\n const container = getContainer();\n\n if (!container) {\n return;\n }\n\n handleBackdropParam(container, params.backdrop);\n handlePositionParam(container, params.position);\n handleGrowParam(container, params.grow); // Custom class\n\n applyCustomClass(container, params, 'container');\n };\n\n /**\n * This module contains `WeakMap`s for each effectively-\"private property\" that a `Swal` has.\n * For example, to set the private property \"foo\" of `this` to \"bar\", you can `privateProps.foo.set(this, 'bar')`\n * This is the approach that Babel will probably take to implement private methods/fields\n * https://github.com/tc39/proposal-private-methods\n * https://github.com/babel/babel/pull/7555\n * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module*\n * then we can use that language feature.\n */\n var privateProps = {\n awaitingPromise: new WeakMap(),\n promise: new WeakMap(),\n innerParams: new WeakMap(),\n domCache: new WeakMap()\n };\n\n const inputTypes = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea'];\n const renderInput = (instance, params) => {\n const popup = getPopup();\n const innerParams = privateProps.innerParams.get(instance);\n const rerender = !innerParams || params.input !== innerParams.input;\n inputTypes.forEach(inputType => {\n const inputClass = swalClasses[inputType];\n const inputContainer = getDirectChildByClass(popup, inputClass); // set attributes\n\n setAttributes(inputType, params.inputAttributes); // set class\n\n inputContainer.className = inputClass;\n\n if (rerender) {\n hide(inputContainer);\n }\n });\n\n if (params.input) {\n if (rerender) {\n showInput(params);\n } // set custom class\n\n\n setCustomClass(params);\n }\n };\n\n const showInput = params => {\n if (!renderInputType[params.input]) {\n return error(\"Unexpected type of input! Expected \\\"text\\\", \\\"email\\\", \\\"password\\\", \\\"number\\\", \\\"tel\\\", \\\"select\\\", \\\"radio\\\", \\\"checkbox\\\", \\\"textarea\\\", \\\"file\\\" or \\\"url\\\", got \\\"\".concat(params.input, \"\\\"\"));\n }\n\n const inputContainer = getInputContainer(params.input);\n const input = renderInputType[params.input](inputContainer, params);\n show(input); // input autofocus\n\n setTimeout(() => {\n focusInput(input);\n });\n };\n\n const removeAttributes = input => {\n for (let i = 0; i < input.attributes.length; i++) {\n const attrName = input.attributes[i].name;\n\n if (!['type', 'value', 'style'].includes(attrName)) {\n input.removeAttribute(attrName);\n }\n }\n };\n\n const setAttributes = (inputType, inputAttributes) => {\n const input = getInput(getPopup(), inputType);\n\n if (!input) {\n return;\n }\n\n removeAttributes(input);\n\n for (const attr in inputAttributes) {\n input.setAttribute(attr, inputAttributes[attr]);\n }\n };\n\n const setCustomClass = params => {\n const inputContainer = getInputContainer(params.input);\n\n if (params.customClass) {\n addClass(inputContainer, params.customClass.input);\n }\n };\n\n const setInputPlaceholder = (input, params) => {\n if (!input.placeholder || params.inputPlaceholder) {\n input.placeholder = params.inputPlaceholder;\n }\n };\n\n const setInputLabel = (input, prependTo, params) => {\n if (params.inputLabel) {\n input.id = swalClasses.input;\n const label = document.createElement('label');\n const labelClass = swalClasses['input-label'];\n label.setAttribute('for', input.id);\n label.className = labelClass;\n addClass(label, params.customClass.inputLabel);\n label.innerText = params.inputLabel;\n prependTo.insertAdjacentElement('beforebegin', label);\n }\n };\n\n const getInputContainer = inputType => {\n const inputClass = swalClasses[inputType] ? swalClasses[inputType] : swalClasses.input;\n return getDirectChildByClass(getPopup(), inputClass);\n };\n\n const renderInputType = {};\n\n renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = (input, params) => {\n if (typeof params.inputValue === 'string' || typeof params.inputValue === 'number') {\n input.value = params.inputValue;\n } else if (!isPromise(params.inputValue)) {\n warn(\"Unexpected type of inputValue! Expected \\\"string\\\", \\\"number\\\" or \\\"Promise\\\", got \\\"\".concat(typeof params.inputValue, \"\\\"\"));\n }\n\n setInputLabel(input, input, params);\n setInputPlaceholder(input, params);\n input.type = params.input;\n return input;\n };\n\n renderInputType.file = (input, params) => {\n setInputLabel(input, input, params);\n setInputPlaceholder(input, params);\n return input;\n };\n\n renderInputType.range = (range, params) => {\n const rangeInput = range.querySelector('input');\n const rangeOutput = range.querySelector('output');\n rangeInput.value = params.inputValue;\n rangeInput.type = params.input;\n rangeOutput.value = params.inputValue;\n setInputLabel(rangeInput, range, params);\n return range;\n };\n\n renderInputType.select = (select, params) => {\n select.textContent = '';\n\n if (params.inputPlaceholder) {\n const placeholder = document.createElement('option');\n setInnerHtml(placeholder, params.inputPlaceholder);\n placeholder.value = '';\n placeholder.disabled = true;\n placeholder.selected = true;\n select.appendChild(placeholder);\n }\n\n setInputLabel(select, select, params);\n return select;\n };\n\n renderInputType.radio = radio => {\n radio.textContent = '';\n return radio;\n };\n\n renderInputType.checkbox = (checkboxContainer, params) => {\n /** @type {HTMLInputElement} */\n const checkbox = getInput(getPopup(), 'checkbox');\n checkbox.value = '1';\n checkbox.id = swalClasses.checkbox;\n checkbox.checked = Boolean(params.inputValue);\n const label = checkboxContainer.querySelector('span');\n setInnerHtml(label, params.inputPlaceholder);\n return checkboxContainer;\n };\n\n renderInputType.textarea = (textarea, params) => {\n textarea.value = params.inputValue;\n setInputPlaceholder(textarea, params);\n setInputLabel(textarea, textarea, params);\n\n const getMargin = el => parseInt(window.getComputedStyle(el).marginLeft) + parseInt(window.getComputedStyle(el).marginRight); // https://github.com/sweetalert2/sweetalert2/issues/2291\n\n\n setTimeout(() => {\n // https://github.com/sweetalert2/sweetalert2/issues/1699\n if ('MutationObserver' in window) {\n const initialPopupWidth = parseInt(window.getComputedStyle(getPopup()).width);\n\n const textareaResizeHandler = () => {\n const textareaWidth = textarea.offsetWidth + getMargin(textarea);\n\n if (textareaWidth > initialPopupWidth) {\n getPopup().style.width = \"\".concat(textareaWidth, \"px\");\n } else {\n getPopup().style.width = null;\n }\n };\n\n new MutationObserver(textareaResizeHandler).observe(textarea, {\n attributes: true,\n attributeFilter: ['style']\n });\n }\n });\n return textarea;\n };\n\n const renderContent = (instance, params) => {\n const htmlContainer = getHtmlContainer();\n applyCustomClass(htmlContainer, params, 'htmlContainer'); // Content as HTML\n\n if (params.html) {\n parseHtmlToContainer(params.html, htmlContainer);\n show(htmlContainer, 'block');\n } // Content as plain text\n else if (params.text) {\n htmlContainer.textContent = params.text;\n show(htmlContainer, 'block');\n } // No content\n else {\n hide(htmlContainer);\n }\n\n renderInput(instance, params);\n };\n\n const renderFooter = (instance, params) => {\n const footer = getFooter();\n toggle(footer, params.footer);\n\n if (params.footer) {\n parseHtmlToContainer(params.footer, footer);\n } // Custom class\n\n\n applyCustomClass(footer, params, 'footer');\n };\n\n const renderCloseButton = (instance, params) => {\n const closeButton = getCloseButton();\n setInnerHtml(closeButton, params.closeButtonHtml); // Custom class\n\n applyCustomClass(closeButton, params, 'closeButton');\n toggle(closeButton, params.showCloseButton);\n closeButton.setAttribute('aria-label', params.closeButtonAriaLabel);\n };\n\n const renderIcon = (instance, params) => {\n const innerParams = privateProps.innerParams.get(instance);\n const icon = getIcon(); // if the given icon already rendered, apply the styling without re-rendering the icon\n\n if (innerParams && params.icon === innerParams.icon) {\n // Custom or default content\n setContent(icon, params);\n applyStyles(icon, params);\n return;\n }\n\n if (!params.icon && !params.iconHtml) {\n return hide(icon);\n }\n\n if (params.icon && Object.keys(iconTypes).indexOf(params.icon) === -1) {\n error(\"Unknown icon! Expected \\\"success\\\", \\\"error\\\", \\\"warning\\\", \\\"info\\\" or \\\"question\\\", got \\\"\".concat(params.icon, \"\\\"\"));\n return hide(icon);\n }\n\n show(icon); // Custom or default content\n\n setContent(icon, params);\n applyStyles(icon, params); // Animate icon\n\n addClass(icon, params.showClass.icon);\n };\n\n const applyStyles = (icon, params) => {\n for (const iconType in iconTypes) {\n if (params.icon !== iconType) {\n removeClass(icon, iconTypes[iconType]);\n }\n }\n\n addClass(icon, iconTypes[params.icon]); // Icon color\n\n setColor(icon, params); // Success icon background color\n\n adjustSuccessIconBackgroundColor(); // Custom class\n\n applyCustomClass(icon, params, 'icon');\n }; // Adjust success icon background color to match the popup background color\n\n\n const adjustSuccessIconBackgroundColor = () => {\n const popup = getPopup();\n const popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color');\n const successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix');\n\n for (let i = 0; i < successIconParts.length; i++) {\n successIconParts[i].style.backgroundColor = popupBackgroundColor;\n }\n };\n\n const successIconHtml = \"\\n
        \\n \\n
        \\n
        \\n\";\n const errorIconHtml = \"\\n \\n \\n \\n \\n\";\n\n const setContent = (icon, params) => {\n icon.textContent = '';\n\n if (params.iconHtml) {\n setInnerHtml(icon, iconContent(params.iconHtml));\n } else if (params.icon === 'success') {\n setInnerHtml(icon, successIconHtml);\n } else if (params.icon === 'error') {\n setInnerHtml(icon, errorIconHtml);\n } else {\n const defaultIconHtml = {\n question: '?',\n warning: '!',\n info: 'i'\n };\n setInnerHtml(icon, iconContent(defaultIconHtml[params.icon]));\n }\n };\n\n const setColor = (icon, params) => {\n if (!params.iconColor) {\n return;\n }\n\n icon.style.color = params.iconColor;\n icon.style.borderColor = params.iconColor;\n\n for (const sel of ['.swal2-success-line-tip', '.swal2-success-line-long', '.swal2-x-mark-line-left', '.swal2-x-mark-line-right']) {\n setStyle(icon, sel, 'backgroundColor', params.iconColor);\n }\n\n setStyle(icon, '.swal2-success-ring', 'borderColor', params.iconColor);\n };\n\n const iconContent = content => \"
        \").concat(content, \"
        \");\n\n const renderImage = (instance, params) => {\n const image = getImage();\n\n if (!params.imageUrl) {\n return hide(image);\n }\n\n show(image, ''); // Src, alt\n\n image.setAttribute('src', params.imageUrl);\n image.setAttribute('alt', params.imageAlt); // Width, height\n\n applyNumericalStyle(image, 'width', params.imageWidth);\n applyNumericalStyle(image, 'height', params.imageHeight); // Class\n\n image.className = swalClasses.image;\n applyCustomClass(image, params, 'image');\n };\n\n const createStepElement = step => {\n const stepEl = document.createElement('li');\n addClass(stepEl, swalClasses['progress-step']);\n setInnerHtml(stepEl, step);\n return stepEl;\n };\n\n const createLineElement = params => {\n const lineEl = document.createElement('li');\n addClass(lineEl, swalClasses['progress-step-line']);\n\n if (params.progressStepsDistance) {\n lineEl.style.width = params.progressStepsDistance;\n }\n\n return lineEl;\n };\n\n const renderProgressSteps = (instance, params) => {\n const progressStepsContainer = getProgressSteps();\n\n if (!params.progressSteps || params.progressSteps.length === 0) {\n return hide(progressStepsContainer);\n }\n\n show(progressStepsContainer);\n progressStepsContainer.textContent = '';\n\n if (params.currentProgressStep >= params.progressSteps.length) {\n warn('Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)');\n }\n\n params.progressSteps.forEach((step, index) => {\n const stepEl = createStepElement(step);\n progressStepsContainer.appendChild(stepEl);\n\n if (index === params.currentProgressStep) {\n addClass(stepEl, swalClasses['active-progress-step']);\n }\n\n if (index !== params.progressSteps.length - 1) {\n const lineEl = createLineElement(params);\n progressStepsContainer.appendChild(lineEl);\n }\n });\n };\n\n const renderTitle = (instance, params) => {\n const title = getTitle();\n toggle(title, params.title || params.titleText, 'block');\n\n if (params.title) {\n parseHtmlToContainer(params.title, title);\n }\n\n if (params.titleText) {\n title.innerText = params.titleText;\n } // Custom class\n\n\n applyCustomClass(title, params, 'title');\n };\n\n const renderPopup = (instance, params) => {\n const container = getContainer();\n const popup = getPopup(); // Width\n // https://github.com/sweetalert2/sweetalert2/issues/2170\n\n if (params.toast) {\n applyNumericalStyle(container, 'width', params.width);\n popup.style.width = '100%';\n popup.insertBefore(getLoader(), getIcon());\n } else {\n applyNumericalStyle(popup, 'width', params.width);\n } // Padding\n\n\n applyNumericalStyle(popup, 'padding', params.padding); // Color\n\n if (params.color) {\n popup.style.color = params.color;\n } // Background\n\n\n if (params.background) {\n popup.style.background = params.background;\n }\n\n hide(getValidationMessage()); // Classes\n\n addClasses(popup, params);\n };\n\n const addClasses = (popup, params) => {\n // Default Class + showClass when updating Swal.update({})\n popup.className = \"\".concat(swalClasses.popup, \" \").concat(isVisible(popup) ? params.showClass.popup : '');\n\n if (params.toast) {\n addClass([document.documentElement, document.body], swalClasses['toast-shown']);\n addClass(popup, swalClasses.toast);\n } else {\n addClass(popup, swalClasses.modal);\n } // Custom class\n\n\n applyCustomClass(popup, params, 'popup');\n\n if (typeof params.customClass === 'string') {\n addClass(popup, params.customClass);\n } // Icon class (#1842)\n\n\n if (params.icon) {\n addClass(popup, swalClasses[\"icon-\".concat(params.icon)]);\n }\n };\n\n const render = (instance, params) => {\n renderPopup(instance, params);\n renderContainer(instance, params);\n renderProgressSteps(instance, params);\n renderIcon(instance, params);\n renderImage(instance, params);\n renderTitle(instance, params);\n renderCloseButton(instance, params);\n renderContent(instance, params);\n renderActions(instance, params);\n renderFooter(instance, params);\n\n if (typeof params.didRender === 'function') {\n params.didRender(getPopup());\n }\n };\n\n const DismissReason = Object.freeze({\n cancel: 'cancel',\n backdrop: 'backdrop',\n close: 'close',\n esc: 'esc',\n timer: 'timer'\n });\n\n // Adding aria-hidden=\"true\" to elements outside of the active modal dialog ensures that\n // elements not within the active modal dialog will not be surfaced if a user opens a screen\n // reader’s list of elements (headings, form controls, landmarks, etc.) in the document.\n\n const setAriaHidden = () => {\n const bodyChildren = toArray(document.body.children);\n bodyChildren.forEach(el => {\n if (el === getContainer() || el.contains(getContainer())) {\n return;\n }\n\n if (el.hasAttribute('aria-hidden')) {\n el.setAttribute('data-previous-aria-hidden', el.getAttribute('aria-hidden'));\n }\n\n el.setAttribute('aria-hidden', 'true');\n });\n };\n const unsetAriaHidden = () => {\n const bodyChildren = toArray(document.body.children);\n bodyChildren.forEach(el => {\n if (el.hasAttribute('data-previous-aria-hidden')) {\n el.setAttribute('aria-hidden', el.getAttribute('data-previous-aria-hidden'));\n el.removeAttribute('data-previous-aria-hidden');\n } else {\n el.removeAttribute('aria-hidden');\n }\n });\n };\n\n const swalStringParams = ['swal-title', 'swal-html', 'swal-footer'];\n const getTemplateParams = params => {\n const template = typeof params.template === 'string' ? document.querySelector(params.template) : params.template;\n\n if (!template) {\n return {};\n }\n /** @type {DocumentFragment} */\n\n\n const templateContent = template.content;\n showWarningsForElements(templateContent);\n const result = Object.assign(getSwalParams(templateContent), getSwalButtons(templateContent), getSwalImage(templateContent), getSwalIcon(templateContent), getSwalInput(templateContent), getSwalStringParams(templateContent, swalStringParams));\n return result;\n };\n /**\n * @param {DocumentFragment} templateContent\n */\n\n const getSwalParams = templateContent => {\n const result = {};\n toArray(templateContent.querySelectorAll('swal-param')).forEach(param => {\n showWarningsForAttributes(param, ['name', 'value']);\n const paramName = param.getAttribute('name');\n const value = param.getAttribute('value');\n\n if (typeof defaultParams[paramName] === 'boolean' && value === 'false') {\n result[paramName] = false;\n }\n\n if (typeof defaultParams[paramName] === 'object') {\n result[paramName] = JSON.parse(value);\n }\n });\n return result;\n };\n /**\n * @param {DocumentFragment} templateContent\n */\n\n\n const getSwalButtons = templateContent => {\n const result = {};\n toArray(templateContent.querySelectorAll('swal-button')).forEach(button => {\n showWarningsForAttributes(button, ['type', 'color', 'aria-label']);\n const type = button.getAttribute('type');\n result[\"\".concat(type, \"ButtonText\")] = button.innerHTML;\n result[\"show\".concat(capitalizeFirstLetter(type), \"Button\")] = true;\n\n if (button.hasAttribute('color')) {\n result[\"\".concat(type, \"ButtonColor\")] = button.getAttribute('color');\n }\n\n if (button.hasAttribute('aria-label')) {\n result[\"\".concat(type, \"ButtonAriaLabel\")] = button.getAttribute('aria-label');\n }\n });\n return result;\n };\n /**\n * @param {DocumentFragment} templateContent\n */\n\n\n const getSwalImage = templateContent => {\n const result = {};\n /** @type {HTMLElement} */\n\n const image = templateContent.querySelector('swal-image');\n\n if (image) {\n showWarningsForAttributes(image, ['src', 'width', 'height', 'alt']);\n\n if (image.hasAttribute('src')) {\n result.imageUrl = image.getAttribute('src');\n }\n\n if (image.hasAttribute('width')) {\n result.imageWidth = image.getAttribute('width');\n }\n\n if (image.hasAttribute('height')) {\n result.imageHeight = image.getAttribute('height');\n }\n\n if (image.hasAttribute('alt')) {\n result.imageAlt = image.getAttribute('alt');\n }\n }\n\n return result;\n };\n /**\n * @param {DocumentFragment} templateContent\n */\n\n\n const getSwalIcon = templateContent => {\n const result = {};\n /** @type {HTMLElement} */\n\n const icon = templateContent.querySelector('swal-icon');\n\n if (icon) {\n showWarningsForAttributes(icon, ['type', 'color']);\n\n if (icon.hasAttribute('type')) {\n result.icon = icon.getAttribute('type');\n }\n\n if (icon.hasAttribute('color')) {\n result.iconColor = icon.getAttribute('color');\n }\n\n result.iconHtml = icon.innerHTML;\n }\n\n return result;\n };\n /**\n * @param {DocumentFragment} templateContent\n */\n\n\n const getSwalInput = templateContent => {\n const result = {};\n /** @type {HTMLElement} */\n\n const input = templateContent.querySelector('swal-input');\n\n if (input) {\n showWarningsForAttributes(input, ['type', 'label', 'placeholder', 'value']);\n result.input = input.getAttribute('type') || 'text';\n\n if (input.hasAttribute('label')) {\n result.inputLabel = input.getAttribute('label');\n }\n\n if (input.hasAttribute('placeholder')) {\n result.inputPlaceholder = input.getAttribute('placeholder');\n }\n\n if (input.hasAttribute('value')) {\n result.inputValue = input.getAttribute('value');\n }\n }\n\n const inputOptions = templateContent.querySelectorAll('swal-input-option');\n\n if (inputOptions.length) {\n result.inputOptions = {};\n toArray(inputOptions).forEach(option => {\n showWarningsForAttributes(option, ['value']);\n const optionValue = option.getAttribute('value');\n const optionName = option.innerHTML;\n result.inputOptions[optionValue] = optionName;\n });\n }\n\n return result;\n };\n /**\n * @param {DocumentFragment} templateContent\n * @param {string[]} paramNames\n */\n\n\n const getSwalStringParams = (templateContent, paramNames) => {\n const result = {};\n\n for (const i in paramNames) {\n const paramName = paramNames[i];\n /** @type {HTMLElement} */\n\n const tag = templateContent.querySelector(paramName);\n\n if (tag) {\n showWarningsForAttributes(tag, []);\n result[paramName.replace(/^swal-/, '')] = tag.innerHTML.trim();\n }\n }\n\n return result;\n };\n /**\n * @param {DocumentFragment} templateContent\n */\n\n\n const showWarningsForElements = templateContent => {\n const allowedElements = swalStringParams.concat(['swal-param', 'swal-button', 'swal-image', 'swal-icon', 'swal-input', 'swal-input-option']);\n toArray(templateContent.children).forEach(el => {\n const tagName = el.tagName.toLowerCase();\n\n if (allowedElements.indexOf(tagName) === -1) {\n warn(\"Unrecognized element <\".concat(tagName, \">\"));\n }\n });\n };\n /**\n * @param {HTMLElement} el\n * @param {string[]} allowedAttributes\n */\n\n\n const showWarningsForAttributes = (el, allowedAttributes) => {\n toArray(el.attributes).forEach(attribute => {\n if (allowedAttributes.indexOf(attribute.name) === -1) {\n warn([\"Unrecognized attribute \\\"\".concat(attribute.name, \"\\\" on <\").concat(el.tagName.toLowerCase(), \">.\"), \"\".concat(allowedAttributes.length ? \"Allowed attributes are: \".concat(allowedAttributes.join(', ')) : 'To set the value, use HTML within the element.')]);\n }\n });\n };\n\n var defaultInputValidators = {\n email: (string, validationMessage) => {\n return /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z0-9-]{2,24}$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid email address');\n },\n url: (string, validationMessage) => {\n // taken from https://stackoverflow.com/a/3809435 with a small change from #1306 and #2013\n return /^https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-z]{2,63}\\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid URL');\n }\n };\n\n function setDefaultInputValidators(params) {\n // Use default `inputValidator` for supported input types if not provided\n if (!params.inputValidator) {\n Object.keys(defaultInputValidators).forEach(key => {\n if (params.input === key) {\n params.inputValidator = defaultInputValidators[key];\n }\n });\n }\n }\n\n function validateCustomTargetElement(params) {\n // Determine if the custom target element is valid\n if (!params.target || typeof params.target === 'string' && !document.querySelector(params.target) || typeof params.target !== 'string' && !params.target.appendChild) {\n warn('Target parameter is not valid, defaulting to \"body\"');\n params.target = 'body';\n }\n }\n /**\n * Set type, text and actions on popup\n *\n * @param params\n */\n\n\n function setParameters(params) {\n setDefaultInputValidators(params); // showLoaderOnConfirm && preConfirm\n\n if (params.showLoaderOnConfirm && !params.preConfirm) {\n warn('showLoaderOnConfirm is set to true, but preConfirm is not defined.\\n' + 'showLoaderOnConfirm should be used together with preConfirm, see usage example:\\n' + 'https://sweetalert2.github.io/#ajax-request');\n }\n\n validateCustomTargetElement(params); // Replace newlines with
        in title\n\n if (typeof params.title === 'string') {\n params.title = params.title.split('\\n').join('
        ');\n }\n\n init(params);\n }\n\n class Timer {\n constructor(callback, delay) {\n this.callback = callback;\n this.remaining = delay;\n this.running = false;\n this.start();\n }\n\n start() {\n if (!this.running) {\n this.running = true;\n this.started = new Date();\n this.id = setTimeout(this.callback, this.remaining);\n }\n\n return this.remaining;\n }\n\n stop() {\n if (this.running) {\n this.running = false;\n clearTimeout(this.id);\n this.remaining -= new Date().getTime() - this.started.getTime();\n }\n\n return this.remaining;\n }\n\n increase(n) {\n const running = this.running;\n\n if (running) {\n this.stop();\n }\n\n this.remaining += n;\n\n if (running) {\n this.start();\n }\n\n return this.remaining;\n }\n\n getTimerLeft() {\n if (this.running) {\n this.stop();\n this.start();\n }\n\n return this.remaining;\n }\n\n isRunning() {\n return this.running;\n }\n\n }\n\n const fixScrollbar = () => {\n // for queues, do not do this more than once\n if (states.previousBodyPadding !== null) {\n return;\n } // if the body has overflow\n\n\n if (document.body.scrollHeight > window.innerHeight) {\n // add padding so the content doesn't shift after removal of scrollbar\n states.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right'));\n document.body.style.paddingRight = \"\".concat(states.previousBodyPadding + measureScrollbar(), \"px\");\n }\n };\n const undoScrollbar = () => {\n if (states.previousBodyPadding !== null) {\n document.body.style.paddingRight = \"\".concat(states.previousBodyPadding, \"px\");\n states.previousBodyPadding = null;\n }\n };\n\n /* istanbul ignore file */\n\n const iOSfix = () => {\n const iOS = // @ts-ignore\n /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream || navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1;\n\n if (iOS && !hasClass(document.body, swalClasses.iosfix)) {\n const offset = document.body.scrollTop;\n document.body.style.top = \"\".concat(offset * -1, \"px\");\n addClass(document.body, swalClasses.iosfix);\n lockBodyScroll();\n addBottomPaddingForTallPopups();\n }\n };\n /**\n * https://github.com/sweetalert2/sweetalert2/issues/1948\n */\n\n const addBottomPaddingForTallPopups = () => {\n const ua = navigator.userAgent;\n const iOS = !!ua.match(/iPad/i) || !!ua.match(/iPhone/i);\n const webkit = !!ua.match(/WebKit/i);\n const iOSSafari = iOS && webkit && !ua.match(/CriOS/i);\n\n if (iOSSafari) {\n const bottomPanelHeight = 44;\n\n if (getPopup().scrollHeight > window.innerHeight - bottomPanelHeight) {\n getContainer().style.paddingBottom = \"\".concat(bottomPanelHeight, \"px\");\n }\n }\n };\n /**\n * https://github.com/sweetalert2/sweetalert2/issues/1246\n */\n\n\n const lockBodyScroll = () => {\n const container = getContainer();\n let preventTouchMove;\n\n container.ontouchstart = e => {\n preventTouchMove = shouldPreventTouchMove(e);\n };\n\n container.ontouchmove = e => {\n if (preventTouchMove) {\n e.preventDefault();\n e.stopPropagation();\n }\n };\n };\n\n const shouldPreventTouchMove = event => {\n const target = event.target;\n const container = getContainer();\n\n if (isStylus(event) || isZoom(event)) {\n return false;\n }\n\n if (target === container) {\n return true;\n }\n\n if (!isScrollable(container) && target.tagName !== 'INPUT' && // #1603\n target.tagName !== 'TEXTAREA' && // #2266\n !(isScrollable(getHtmlContainer()) && // #1944\n getHtmlContainer().contains(target))) {\n return true;\n }\n\n return false;\n };\n /**\n * https://github.com/sweetalert2/sweetalert2/issues/1786\n *\n * @param {*} event\n * @returns {boolean}\n */\n\n\n const isStylus = event => {\n return event.touches && event.touches.length && event.touches[0].touchType === 'stylus';\n };\n /**\n * https://github.com/sweetalert2/sweetalert2/issues/1891\n *\n * @param {TouchEvent} event\n * @returns {boolean}\n */\n\n\n const isZoom = event => {\n return event.touches && event.touches.length > 1;\n };\n\n const undoIOSfix = () => {\n if (hasClass(document.body, swalClasses.iosfix)) {\n const offset = parseInt(document.body.style.top, 10);\n removeClass(document.body, swalClasses.iosfix);\n document.body.style.top = '';\n document.body.scrollTop = offset * -1;\n }\n };\n\n const SHOW_CLASS_TIMEOUT = 10;\n /**\n * Open popup, add necessary classes and styles, fix scrollbar\n *\n * @param params\n */\n\n const openPopup = params => {\n const container = getContainer();\n const popup = getPopup();\n\n if (typeof params.willOpen === 'function') {\n params.willOpen(popup);\n }\n\n const bodyStyles = window.getComputedStyle(document.body);\n const initialBodyOverflow = bodyStyles.overflowY;\n addClasses$1(container, popup, params); // scrolling is 'hidden' until animation is done, after that 'auto'\n\n setTimeout(() => {\n setScrollingVisibility(container, popup);\n }, SHOW_CLASS_TIMEOUT);\n\n if (isModal()) {\n fixScrollContainer(container, params.scrollbarPadding, initialBodyOverflow);\n setAriaHidden();\n }\n\n if (!isToast() && !globalState.previousActiveElement) {\n globalState.previousActiveElement = document.activeElement;\n }\n\n if (typeof params.didOpen === 'function') {\n setTimeout(() => params.didOpen(popup));\n }\n\n removeClass(container, swalClasses['no-transition']);\n };\n\n const swalOpenAnimationFinished = event => {\n const popup = getPopup();\n\n if (event.target !== popup) {\n return;\n }\n\n const container = getContainer();\n popup.removeEventListener(animationEndEvent, swalOpenAnimationFinished);\n container.style.overflowY = 'auto';\n };\n\n const setScrollingVisibility = (container, popup) => {\n if (animationEndEvent && hasCssAnimation(popup)) {\n container.style.overflowY = 'hidden';\n popup.addEventListener(animationEndEvent, swalOpenAnimationFinished);\n } else {\n container.style.overflowY = 'auto';\n }\n };\n\n const fixScrollContainer = (container, scrollbarPadding, initialBodyOverflow) => {\n iOSfix();\n\n if (scrollbarPadding && initialBodyOverflow !== 'hidden') {\n fixScrollbar();\n } // sweetalert2/issues/1247\n\n\n setTimeout(() => {\n container.scrollTop = 0;\n });\n };\n\n const addClasses$1 = (container, popup, params) => {\n addClass(container, params.showClass.backdrop); // this workaround with opacity is needed for https://github.com/sweetalert2/sweetalert2/issues/2059\n\n popup.style.setProperty('opacity', '0', 'important');\n show(popup, 'grid');\n setTimeout(() => {\n // Animate popup right after showing it\n addClass(popup, params.showClass.popup); // and remove the opacity workaround\n\n popup.style.removeProperty('opacity');\n }, SHOW_CLASS_TIMEOUT); // 10ms in order to fix #2062\n\n addClass([document.documentElement, document.body], swalClasses.shown);\n\n if (params.heightAuto && params.backdrop && !params.toast) {\n addClass([document.documentElement, document.body], swalClasses['height-auto']);\n }\n };\n\n /**\n * Shows loader (spinner), this is useful with AJAX requests.\n * By default the loader be shown instead of the \"Confirm\" button.\n */\n\n const showLoading = buttonToReplace => {\n let popup = getPopup();\n\n if (!popup) {\n new Swal(); // eslint-disable-line no-new\n }\n\n popup = getPopup();\n const loader = getLoader();\n\n if (isToast()) {\n hide(getIcon());\n } else {\n replaceButton(popup, buttonToReplace);\n }\n\n show(loader);\n popup.setAttribute('data-loading', true);\n popup.setAttribute('aria-busy', true);\n popup.focus();\n };\n\n const replaceButton = (popup, buttonToReplace) => {\n const actions = getActions();\n const loader = getLoader();\n\n if (!buttonToReplace && isVisible(getConfirmButton())) {\n buttonToReplace = getConfirmButton();\n }\n\n show(actions);\n\n if (buttonToReplace) {\n hide(buttonToReplace);\n loader.setAttribute('data-button-to-replace', buttonToReplace.className);\n }\n\n loader.parentNode.insertBefore(loader, buttonToReplace);\n addClass([popup, actions], swalClasses.loading);\n };\n\n const handleInputOptionsAndValue = (instance, params) => {\n if (params.input === 'select' || params.input === 'radio') {\n handleInputOptions(instance, params);\n } else if (['text', 'email', 'number', 'tel', 'textarea'].includes(params.input) && (hasToPromiseFn(params.inputValue) || isPromise(params.inputValue))) {\n showLoading(getConfirmButton());\n handleInputValue(instance, params);\n }\n };\n const getInputValue = (instance, innerParams) => {\n const input = instance.getInput();\n\n if (!input) {\n return null;\n }\n\n switch (innerParams.input) {\n case 'checkbox':\n return getCheckboxValue(input);\n\n case 'radio':\n return getRadioValue(input);\n\n case 'file':\n return getFileValue(input);\n\n default:\n return innerParams.inputAutoTrim ? input.value.trim() : input.value;\n }\n };\n\n const getCheckboxValue = input => input.checked ? 1 : 0;\n\n const getRadioValue = input => input.checked ? input.value : null;\n\n const getFileValue = input => input.files.length ? input.getAttribute('multiple') !== null ? input.files : input.files[0] : null;\n\n const handleInputOptions = (instance, params) => {\n const popup = getPopup();\n\n const processInputOptions = inputOptions => populateInputOptions[params.input](popup, formatInputOptions(inputOptions), params);\n\n if (hasToPromiseFn(params.inputOptions) || isPromise(params.inputOptions)) {\n showLoading(getConfirmButton());\n asPromise(params.inputOptions).then(inputOptions => {\n instance.hideLoading();\n processInputOptions(inputOptions);\n });\n } else if (typeof params.inputOptions === 'object') {\n processInputOptions(params.inputOptions);\n } else {\n error(\"Unexpected type of inputOptions! Expected object, Map or Promise, got \".concat(typeof params.inputOptions));\n }\n };\n\n const handleInputValue = (instance, params) => {\n const input = instance.getInput();\n hide(input);\n asPromise(params.inputValue).then(inputValue => {\n input.value = params.input === 'number' ? parseFloat(inputValue) || 0 : \"\".concat(inputValue);\n show(input);\n input.focus();\n instance.hideLoading();\n }).catch(err => {\n error(\"Error in inputValue promise: \".concat(err));\n input.value = '';\n show(input);\n input.focus();\n instance.hideLoading();\n });\n };\n\n const populateInputOptions = {\n select: (popup, inputOptions, params) => {\n const select = getDirectChildByClass(popup, swalClasses.select);\n\n const renderOption = (parent, optionLabel, optionValue) => {\n const option = document.createElement('option');\n option.value = optionValue;\n setInnerHtml(option, optionLabel);\n option.selected = isSelected(optionValue, params.inputValue);\n parent.appendChild(option);\n };\n\n inputOptions.forEach(inputOption => {\n const optionValue = inputOption[0];\n const optionLabel = inputOption[1]; // spec:\n // https://www.w3.org/TR/html401/interact/forms.html#h-17.6\n // \"...all OPTGROUP elements must be specified directly within a SELECT element (i.e., groups may not be nested)...\"\n // check whether this is a \n\n if (Array.isArray(optionLabel)) {\n // if it is an array, then it is an \n const optgroup = document.createElement('optgroup');\n optgroup.label = optionValue;\n optgroup.disabled = false; // not configurable for now\n\n select.appendChild(optgroup);\n optionLabel.forEach(o => renderOption(optgroup, o[1], o[0]));\n } else {\n // case of \n valueFormatted = formatInputOptions(valueFormatted);\n }\n\n result.push([key, valueFormatted]);\n });\n } else {\n Object.keys(inputOptions).forEach(key => {\n let valueFormatted = inputOptions[key];\n\n if (typeof valueFormatted === 'object') {\n // case of \n valueFormatted = formatInputOptions(valueFormatted);\n }\n\n result.push([key, valueFormatted]);\n });\n }\n\n return result;\n };\n\n const isSelected = (optionValue, inputValue) => {\n return inputValue && inputValue.toString() === optionValue.toString();\n };\n\n /**\n * Hides loader and shows back the button which was hidden by .showLoading()\n */\n\n function hideLoading() {\n // do nothing if popup is closed\n const innerParams = privateProps.innerParams.get(this);\n\n if (!innerParams) {\n return;\n }\n\n const domCache = privateProps.domCache.get(this);\n hide(domCache.loader);\n\n if (isToast()) {\n if (innerParams.icon) {\n show(getIcon());\n }\n } else {\n showRelatedButton(domCache);\n }\n\n removeClass([domCache.popup, domCache.actions], swalClasses.loading);\n domCache.popup.removeAttribute('aria-busy');\n domCache.popup.removeAttribute('data-loading');\n domCache.confirmButton.disabled = false;\n domCache.denyButton.disabled = false;\n domCache.cancelButton.disabled = false;\n }\n\n const showRelatedButton = domCache => {\n const buttonToReplace = domCache.popup.getElementsByClassName(domCache.loader.getAttribute('data-button-to-replace'));\n\n if (buttonToReplace.length) {\n show(buttonToReplace[0], 'inline-block');\n } else if (allButtonsAreHidden()) {\n hide(domCache.actions);\n }\n };\n\n /**\n * Gets the input DOM node, this method works with input parameter.\n * @returns {HTMLElement | null}\n */\n\n function getInput$1(instance) {\n const innerParams = privateProps.innerParams.get(instance || this);\n const domCache = privateProps.domCache.get(instance || this);\n\n if (!domCache) {\n return null;\n }\n\n return getInput(domCache.popup, innerParams.input);\n }\n\n /**\n * This module contains `WeakMap`s for each effectively-\"private property\" that a `Swal` has.\n * For example, to set the private property \"foo\" of `this` to \"bar\", you can `privateProps.foo.set(this, 'bar')`\n * This is the approach that Babel will probably take to implement private methods/fields\n * https://github.com/tc39/proposal-private-methods\n * https://github.com/babel/babel/pull/7555\n * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module*\n * then we can use that language feature.\n */\n var privateMethods = {\n swalPromiseResolve: new WeakMap(),\n swalPromiseReject: new WeakMap()\n };\n\n /*\n * Global function to determine if SweetAlert2 popup is shown\n */\n\n const isVisible$1 = () => {\n return isVisible(getPopup());\n };\n /*\n * Global function to click 'Confirm' button\n */\n\n const clickConfirm = () => getConfirmButton() && getConfirmButton().click();\n /*\n * Global function to click 'Deny' button\n */\n\n const clickDeny = () => getDenyButton() && getDenyButton().click();\n /*\n * Global function to click 'Cancel' button\n */\n\n const clickCancel = () => getCancelButton() && getCancelButton().click();\n\n const removeKeydownHandler = globalState => {\n if (globalState.keydownTarget && globalState.keydownHandlerAdded) {\n globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, {\n capture: globalState.keydownListenerCapture\n });\n globalState.keydownHandlerAdded = false;\n }\n };\n const addKeydownHandler = (instance, globalState, innerParams, dismissWith) => {\n removeKeydownHandler(globalState);\n\n if (!innerParams.toast) {\n globalState.keydownHandler = e => keydownHandler(instance, e, dismissWith);\n\n globalState.keydownTarget = innerParams.keydownListenerCapture ? window : getPopup();\n globalState.keydownListenerCapture = innerParams.keydownListenerCapture;\n globalState.keydownTarget.addEventListener('keydown', globalState.keydownHandler, {\n capture: globalState.keydownListenerCapture\n });\n globalState.keydownHandlerAdded = true;\n }\n }; // Focus handling\n\n const setFocus = (innerParams, index, increment) => {\n const focusableElements = getFocusableElements(); // search for visible elements and select the next possible match\n\n if (focusableElements.length) {\n index = index + increment; // rollover to first item\n\n if (index === focusableElements.length) {\n index = 0; // go to last item\n } else if (index === -1) {\n index = focusableElements.length - 1;\n }\n\n return focusableElements[index].focus();\n } // no visible focusable elements, focus the popup\n\n\n getPopup().focus();\n };\n const arrowKeysNextButton = ['ArrowRight', 'ArrowDown'];\n const arrowKeysPreviousButton = ['ArrowLeft', 'ArrowUp'];\n\n const keydownHandler = (instance, e, dismissWith) => {\n const innerParams = privateProps.innerParams.get(instance);\n\n if (!innerParams) {\n return; // This instance has already been destroyed\n } // Ignore keydown during IME composition\n // https://developer.mozilla.org/en-US/docs/Web/API/Document/keydown_event#ignoring_keydown_during_ime_composition\n // https://github.com/sweetalert2/sweetalert2/issues/720\n // https://github.com/sweetalert2/sweetalert2/issues/2406\n\n\n if (e.isComposing || e.keyCode === 229) {\n return;\n }\n\n if (innerParams.stopKeydownPropagation) {\n e.stopPropagation();\n } // ENTER\n\n\n if (e.key === 'Enter') {\n handleEnter(instance, e, innerParams);\n } // TAB\n else if (e.key === 'Tab') {\n handleTab(e, innerParams);\n } // ARROWS - switch focus between buttons\n else if ([...arrowKeysNextButton, ...arrowKeysPreviousButton].includes(e.key)) {\n handleArrows(e.key);\n } // ESC\n else if (e.key === 'Escape') {\n handleEsc(e, innerParams, dismissWith);\n }\n };\n\n const handleEnter = (instance, e, innerParams) => {\n // https://github.com/sweetalert2/sweetalert2/issues/2386\n if (!callIfFunction(innerParams.allowEnterKey)) {\n return;\n }\n\n if (e.target && instance.getInput() && e.target.outerHTML === instance.getInput().outerHTML) {\n if (['textarea', 'file'].includes(innerParams.input)) {\n return; // do not submit\n }\n\n clickConfirm();\n e.preventDefault();\n }\n };\n\n const handleTab = (e, innerParams) => {\n const targetElement = e.target;\n const focusableElements = getFocusableElements();\n let btnIndex = -1;\n\n for (let i = 0; i < focusableElements.length; i++) {\n if (targetElement === focusableElements[i]) {\n btnIndex = i;\n break;\n }\n } // Cycle to the next button\n\n\n if (!e.shiftKey) {\n setFocus(innerParams, btnIndex, 1);\n } // Cycle to the prev button\n else {\n setFocus(innerParams, btnIndex, -1);\n }\n\n e.stopPropagation();\n e.preventDefault();\n };\n\n const handleArrows = key => {\n const confirmButton = getConfirmButton();\n const denyButton = getDenyButton();\n const cancelButton = getCancelButton();\n\n if (![confirmButton, denyButton, cancelButton].includes(document.activeElement)) {\n return;\n }\n\n const sibling = arrowKeysNextButton.includes(key) ? 'nextElementSibling' : 'previousElementSibling';\n let buttonToFocus = document.activeElement;\n\n for (let i = 0; i < getActions().children.length; i++) {\n buttonToFocus = buttonToFocus[sibling];\n\n if (!buttonToFocus) {\n return;\n }\n\n if (isVisible(buttonToFocus) && buttonToFocus instanceof HTMLButtonElement) {\n break;\n }\n }\n\n if (buttonToFocus instanceof HTMLButtonElement) {\n buttonToFocus.focus();\n }\n };\n\n const handleEsc = (e, innerParams, dismissWith) => {\n if (callIfFunction(innerParams.allowEscapeKey)) {\n e.preventDefault();\n dismissWith(DismissReason.esc);\n }\n };\n\n /*\n * Instance method to close sweetAlert\n */\n\n function removePopupAndResetState(instance, container, returnFocus, didClose) {\n if (isToast()) {\n triggerDidCloseAndDispose(instance, didClose);\n } else {\n restoreActiveElement(returnFocus).then(() => triggerDidCloseAndDispose(instance, didClose));\n removeKeydownHandler(globalState);\n }\n\n const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); // workaround for #2088\n // for some reason removing the container in Safari will scroll the document to bottom\n\n if (isSafari) {\n container.setAttribute('style', 'display:none !important');\n container.removeAttribute('class');\n container.innerHTML = '';\n } else {\n container.remove();\n }\n\n if (isModal()) {\n undoScrollbar();\n undoIOSfix();\n unsetAriaHidden();\n }\n\n removeBodyClasses();\n }\n\n function removeBodyClasses() {\n removeClass([document.documentElement, document.body], [swalClasses.shown, swalClasses['height-auto'], swalClasses['no-backdrop'], swalClasses['toast-shown']]);\n }\n\n function close(resolveValue) {\n resolveValue = prepareResolveValue(resolveValue);\n const swalPromiseResolve = privateMethods.swalPromiseResolve.get(this);\n const didClose = triggerClosePopup(this);\n\n if (this.isAwaitingPromise()) {\n // A swal awaiting for a promise (after a click on Confirm or Deny) cannot be dismissed anymore #2335\n if (!resolveValue.isDismissed) {\n handleAwaitingPromise(this);\n swalPromiseResolve(resolveValue);\n }\n } else if (didClose) {\n // Resolve Swal promise\n swalPromiseResolve(resolveValue);\n }\n }\n function isAwaitingPromise() {\n return !!privateProps.awaitingPromise.get(this);\n }\n\n const triggerClosePopup = instance => {\n const popup = getPopup();\n\n if (!popup) {\n return false;\n }\n\n const innerParams = privateProps.innerParams.get(instance);\n\n if (!innerParams || hasClass(popup, innerParams.hideClass.popup)) {\n return false;\n }\n\n removeClass(popup, innerParams.showClass.popup);\n addClass(popup, innerParams.hideClass.popup);\n const backdrop = getContainer();\n removeClass(backdrop, innerParams.showClass.backdrop);\n addClass(backdrop, innerParams.hideClass.backdrop);\n handlePopupAnimation(instance, popup, innerParams);\n return true;\n };\n\n function rejectPromise(error) {\n const rejectPromise = privateMethods.swalPromiseReject.get(this);\n handleAwaitingPromise(this);\n\n if (rejectPromise) {\n // Reject Swal promise\n rejectPromise(error);\n }\n }\n const handleAwaitingPromise = instance => {\n if (instance.isAwaitingPromise()) {\n privateProps.awaitingPromise.delete(instance); // The instance might have been previously partly destroyed, we must resume the destroy process in this case #2335\n\n if (!privateProps.innerParams.get(instance)) {\n instance._destroy();\n }\n }\n };\n\n const prepareResolveValue = resolveValue => {\n // When user calls Swal.close()\n if (typeof resolveValue === 'undefined') {\n return {\n isConfirmed: false,\n isDenied: false,\n isDismissed: true\n };\n }\n\n return Object.assign({\n isConfirmed: false,\n isDenied: false,\n isDismissed: false\n }, resolveValue);\n };\n\n const handlePopupAnimation = (instance, popup, innerParams) => {\n const container = getContainer(); // If animation is supported, animate\n\n const animationIsSupported = animationEndEvent && hasCssAnimation(popup);\n\n if (typeof innerParams.willClose === 'function') {\n innerParams.willClose(popup);\n }\n\n if (animationIsSupported) {\n animatePopup(instance, popup, container, innerParams.returnFocus, innerParams.didClose);\n } else {\n // Otherwise, remove immediately\n removePopupAndResetState(instance, container, innerParams.returnFocus, innerParams.didClose);\n }\n };\n\n const animatePopup = (instance, popup, container, returnFocus, didClose) => {\n globalState.swalCloseEventFinishedCallback = removePopupAndResetState.bind(null, instance, container, returnFocus, didClose);\n popup.addEventListener(animationEndEvent, function (e) {\n if (e.target === popup) {\n globalState.swalCloseEventFinishedCallback();\n delete globalState.swalCloseEventFinishedCallback;\n }\n });\n };\n\n const triggerDidCloseAndDispose = (instance, didClose) => {\n setTimeout(() => {\n if (typeof didClose === 'function') {\n didClose.bind(instance.params)();\n }\n\n instance._destroy();\n });\n };\n\n function setButtonsDisabled(instance, buttons, disabled) {\n const domCache = privateProps.domCache.get(instance);\n buttons.forEach(button => {\n domCache[button].disabled = disabled;\n });\n }\n\n function setInputDisabled(input, disabled) {\n if (!input) {\n return false;\n }\n\n if (input.type === 'radio') {\n const radiosContainer = input.parentNode.parentNode;\n const radios = radiosContainer.querySelectorAll('input');\n\n for (let i = 0; i < radios.length; i++) {\n radios[i].disabled = disabled;\n }\n } else {\n input.disabled = disabled;\n }\n }\n\n function enableButtons() {\n setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], false);\n }\n function disableButtons() {\n setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], true);\n }\n function enableInput() {\n return setInputDisabled(this.getInput(), false);\n }\n function disableInput() {\n return setInputDisabled(this.getInput(), true);\n }\n\n function showValidationMessage(error) {\n const domCache = privateProps.domCache.get(this);\n const params = privateProps.innerParams.get(this);\n setInnerHtml(domCache.validationMessage, error);\n domCache.validationMessage.className = swalClasses['validation-message'];\n\n if (params.customClass && params.customClass.validationMessage) {\n addClass(domCache.validationMessage, params.customClass.validationMessage);\n }\n\n show(domCache.validationMessage);\n const input = this.getInput();\n\n if (input) {\n input.setAttribute('aria-invalid', true);\n input.setAttribute('aria-describedby', swalClasses['validation-message']);\n focusInput(input);\n addClass(input, swalClasses.inputerror);\n }\n } // Hide block with validation message\n\n function resetValidationMessage$1() {\n const domCache = privateProps.domCache.get(this);\n\n if (domCache.validationMessage) {\n hide(domCache.validationMessage);\n }\n\n const input = this.getInput();\n\n if (input) {\n input.removeAttribute('aria-invalid');\n input.removeAttribute('aria-describedby');\n removeClass(input, swalClasses.inputerror);\n }\n }\n\n function getProgressSteps$1() {\n const domCache = privateProps.domCache.get(this);\n return domCache.progressSteps;\n }\n\n /**\n * Updates popup parameters.\n */\n\n function update(params) {\n const popup = getPopup();\n const innerParams = privateProps.innerParams.get(this);\n\n if (!popup || hasClass(popup, innerParams.hideClass.popup)) {\n return warn(\"You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.\");\n }\n\n const validUpdatableParams = filterValidParams(params);\n const updatedParams = Object.assign({}, innerParams, validUpdatableParams);\n render(this, updatedParams);\n privateProps.innerParams.set(this, updatedParams);\n Object.defineProperties(this, {\n params: {\n value: Object.assign({}, this.params, params),\n writable: false,\n enumerable: true\n }\n });\n }\n\n const filterValidParams = params => {\n const validUpdatableParams = {};\n Object.keys(params).forEach(param => {\n if (isUpdatableParameter(param)) {\n validUpdatableParams[param] = params[param];\n } else {\n warn(\"Invalid parameter to update: \\\"\".concat(param, \"\\\". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\\n\\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md\"));\n }\n });\n return validUpdatableParams;\n };\n\n function _destroy() {\n const domCache = privateProps.domCache.get(this);\n const innerParams = privateProps.innerParams.get(this);\n\n if (!innerParams) {\n disposeWeakMaps(this); // The WeakMaps might have been partly destroyed, we must recall it to dispose any remaining WeakMaps #2335\n\n return; // This instance has already been destroyed\n } // Check if there is another Swal closing\n\n\n if (domCache.popup && globalState.swalCloseEventFinishedCallback) {\n globalState.swalCloseEventFinishedCallback();\n delete globalState.swalCloseEventFinishedCallback;\n } // Check if there is a swal disposal defer timer\n\n\n if (globalState.deferDisposalTimer) {\n clearTimeout(globalState.deferDisposalTimer);\n delete globalState.deferDisposalTimer;\n }\n\n if (typeof innerParams.didDestroy === 'function') {\n innerParams.didDestroy();\n }\n\n disposeSwal(this);\n }\n\n const disposeSwal = instance => {\n disposeWeakMaps(instance); // Unset this.params so GC will dispose it (#1569)\n\n delete instance.params; // Unset globalState props so GC will dispose globalState (#1569)\n\n delete globalState.keydownHandler;\n delete globalState.keydownTarget; // Unset currentInstance\n\n delete globalState.currentInstance;\n };\n\n const disposeWeakMaps = instance => {\n // If the current instance is awaiting a promise result, we keep the privateMethods to call them once the promise result is retrieved #2335\n if (instance.isAwaitingPromise()) {\n unsetWeakMaps(privateProps, instance);\n privateProps.awaitingPromise.set(instance, true);\n } else {\n unsetWeakMaps(privateMethods, instance);\n unsetWeakMaps(privateProps, instance);\n }\n };\n\n const unsetWeakMaps = (obj, instance) => {\n for (const i in obj) {\n obj[i].delete(instance);\n }\n };\n\n\n\n var instanceMethods = /*#__PURE__*/Object.freeze({\n hideLoading: hideLoading,\n disableLoading: hideLoading,\n getInput: getInput$1,\n close: close,\n isAwaitingPromise: isAwaitingPromise,\n rejectPromise: rejectPromise,\n handleAwaitingPromise: handleAwaitingPromise,\n closePopup: close,\n closeModal: close,\n closeToast: close,\n enableButtons: enableButtons,\n disableButtons: disableButtons,\n enableInput: enableInput,\n disableInput: disableInput,\n showValidationMessage: showValidationMessage,\n resetValidationMessage: resetValidationMessage$1,\n getProgressSteps: getProgressSteps$1,\n update: update,\n _destroy: _destroy\n });\n\n const handleConfirmButtonClick = instance => {\n const innerParams = privateProps.innerParams.get(instance);\n instance.disableButtons();\n\n if (innerParams.input) {\n handleConfirmOrDenyWithInput(instance, 'confirm');\n } else {\n confirm(instance, true);\n }\n };\n const handleDenyButtonClick = instance => {\n const innerParams = privateProps.innerParams.get(instance);\n instance.disableButtons();\n\n if (innerParams.returnInputValueOnDeny) {\n handleConfirmOrDenyWithInput(instance, 'deny');\n } else {\n deny(instance, false);\n }\n };\n const handleCancelButtonClick = (instance, dismissWith) => {\n instance.disableButtons();\n dismissWith(DismissReason.cancel);\n };\n\n const handleConfirmOrDenyWithInput = (instance, type\n /* 'confirm' | 'deny' */\n ) => {\n const innerParams = privateProps.innerParams.get(instance);\n\n if (!innerParams.input) {\n return error(\"The \\\"input\\\" parameter is needed to be set when using returnInputValueOn\".concat(capitalizeFirstLetter(type)));\n }\n\n const inputValue = getInputValue(instance, innerParams);\n\n if (innerParams.inputValidator) {\n handleInputValidator(instance, inputValue, type);\n } else if (!instance.getInput().checkValidity()) {\n instance.enableButtons();\n instance.showValidationMessage(innerParams.validationMessage);\n } else if (type === 'deny') {\n deny(instance, inputValue);\n } else {\n confirm(instance, inputValue);\n }\n };\n\n const handleInputValidator = (instance, inputValue, type\n /* 'confirm' | 'deny' */\n ) => {\n const innerParams = privateProps.innerParams.get(instance);\n instance.disableInput();\n const validationPromise = Promise.resolve().then(() => asPromise(innerParams.inputValidator(inputValue, innerParams.validationMessage)));\n validationPromise.then(validationMessage => {\n instance.enableButtons();\n instance.enableInput();\n\n if (validationMessage) {\n instance.showValidationMessage(validationMessage);\n } else if (type === 'deny') {\n deny(instance, inputValue);\n } else {\n confirm(instance, inputValue);\n }\n });\n };\n\n const deny = (instance, value) => {\n const innerParams = privateProps.innerParams.get(instance || undefined);\n\n if (innerParams.showLoaderOnDeny) {\n showLoading(getDenyButton());\n }\n\n if (innerParams.preDeny) {\n privateProps.awaitingPromise.set(instance || undefined, true); // Flagging the instance as awaiting a promise so it's own promise's reject/resolve methods doesn't get destroyed until the result from this preDeny's promise is received\n\n const preDenyPromise = Promise.resolve().then(() => asPromise(innerParams.preDeny(value, innerParams.validationMessage)));\n preDenyPromise.then(preDenyValue => {\n if (preDenyValue === false) {\n instance.hideLoading();\n handleAwaitingPromise(instance);\n } else {\n instance.closePopup({\n isDenied: true,\n value: typeof preDenyValue === 'undefined' ? value : preDenyValue\n });\n }\n }).catch(error$$1 => rejectWith(instance || undefined, error$$1));\n } else {\n instance.closePopup({\n isDenied: true,\n value\n });\n }\n };\n\n const succeedWith = (instance, value) => {\n instance.closePopup({\n isConfirmed: true,\n value\n });\n };\n\n const rejectWith = (instance, error$$1) => {\n instance.rejectPromise(error$$1);\n };\n\n const confirm = (instance, value) => {\n const innerParams = privateProps.innerParams.get(instance || undefined);\n\n if (innerParams.showLoaderOnConfirm) {\n showLoading();\n }\n\n if (innerParams.preConfirm) {\n instance.resetValidationMessage();\n privateProps.awaitingPromise.set(instance || undefined, true); // Flagging the instance as awaiting a promise so it's own promise's reject/resolve methods doesn't get destroyed until the result from this preConfirm's promise is received\n\n const preConfirmPromise = Promise.resolve().then(() => asPromise(innerParams.preConfirm(value, innerParams.validationMessage)));\n preConfirmPromise.then(preConfirmValue => {\n if (isVisible(getValidationMessage()) || preConfirmValue === false) {\n instance.hideLoading();\n handleAwaitingPromise(instance);\n } else {\n succeedWith(instance, typeof preConfirmValue === 'undefined' ? value : preConfirmValue);\n }\n }).catch(error$$1 => rejectWith(instance || undefined, error$$1));\n } else {\n succeedWith(instance, value);\n }\n };\n\n const handlePopupClick = (instance, domCache, dismissWith) => {\n const innerParams = privateProps.innerParams.get(instance);\n\n if (innerParams.toast) {\n handleToastClick(instance, domCache, dismissWith);\n } else {\n // Ignore click events that had mousedown on the popup but mouseup on the container\n // This can happen when the user drags a slider\n handleModalMousedown(domCache); // Ignore click events that had mousedown on the container but mouseup on the popup\n\n handleContainerMousedown(domCache);\n handleModalClick(instance, domCache, dismissWith);\n }\n };\n\n const handleToastClick = (instance, domCache, dismissWith) => {\n // Closing toast by internal click\n domCache.popup.onclick = () => {\n const innerParams = privateProps.innerParams.get(instance);\n\n if (innerParams && (isAnyButtonShown(innerParams) || innerParams.timer || innerParams.input)) {\n return;\n }\n\n dismissWith(DismissReason.close);\n };\n };\n /**\n * @param {*} innerParams\n * @returns {boolean}\n */\n\n\n const isAnyButtonShown = innerParams => {\n return innerParams.showConfirmButton || innerParams.showDenyButton || innerParams.showCancelButton || innerParams.showCloseButton;\n };\n\n let ignoreOutsideClick = false;\n\n const handleModalMousedown = domCache => {\n domCache.popup.onmousedown = () => {\n domCache.container.onmouseup = function (e) {\n domCache.container.onmouseup = undefined; // We only check if the mouseup target is the container because usually it doesn't\n // have any other direct children aside of the popup\n\n if (e.target === domCache.container) {\n ignoreOutsideClick = true;\n }\n };\n };\n };\n\n const handleContainerMousedown = domCache => {\n domCache.container.onmousedown = () => {\n domCache.popup.onmouseup = function (e) {\n domCache.popup.onmouseup = undefined; // We also need to check if the mouseup target is a child of the popup\n\n if (e.target === domCache.popup || domCache.popup.contains(e.target)) {\n ignoreOutsideClick = true;\n }\n };\n };\n };\n\n const handleModalClick = (instance, domCache, dismissWith) => {\n domCache.container.onclick = e => {\n const innerParams = privateProps.innerParams.get(instance);\n\n if (ignoreOutsideClick) {\n ignoreOutsideClick = false;\n return;\n }\n\n if (e.target === domCache.container && callIfFunction(innerParams.allowOutsideClick)) {\n dismissWith(DismissReason.backdrop);\n }\n };\n };\n\n const isJqueryElement = elem => typeof elem === 'object' && elem.jquery;\n\n const isElement = elem => elem instanceof Element || isJqueryElement(elem);\n\n const argsToParams = args => {\n const params = {};\n\n if (typeof args[0] === 'object' && !isElement(args[0])) {\n Object.assign(params, args[0]);\n } else {\n ['title', 'html', 'icon'].forEach((name, index) => {\n const arg = args[index];\n\n if (typeof arg === 'string' || isElement(arg)) {\n params[name] = arg;\n } else if (arg !== undefined) {\n error(\"Unexpected type of \".concat(name, \"! Expected \\\"string\\\" or \\\"Element\\\", got \").concat(typeof arg));\n }\n });\n }\n\n return params;\n };\n\n function fire() {\n const Swal = this; // eslint-disable-line @typescript-eslint/no-this-alias\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return new Swal(...args);\n }\n\n /**\n * Returns an extended version of `Swal` containing `params` as defaults.\n * Useful for reusing Swal configuration.\n *\n * For example:\n *\n * Before:\n * const textPromptOptions = { input: 'text', showCancelButton: true }\n * const {value: firstName} = await Swal.fire({ ...textPromptOptions, title: 'What is your first name?' })\n * const {value: lastName} = await Swal.fire({ ...textPromptOptions, title: 'What is your last name?' })\n *\n * After:\n * const TextPrompt = Swal.mixin({ input: 'text', showCancelButton: true })\n * const {value: firstName} = await TextPrompt('What is your first name?')\n * const {value: lastName} = await TextPrompt('What is your last name?')\n *\n * @param mixinParams\n */\n function mixin(mixinParams) {\n class MixinSwal extends this {\n _main(params, priorityMixinParams) {\n return super._main(params, Object.assign({}, mixinParams, priorityMixinParams));\n }\n\n }\n\n return MixinSwal;\n }\n\n /**\n * If `timer` parameter is set, returns number of milliseconds of timer remained.\n * Otherwise, returns undefined.\n */\n\n const getTimerLeft = () => {\n return globalState.timeout && globalState.timeout.getTimerLeft();\n };\n /**\n * Stop timer. Returns number of milliseconds of timer remained.\n * If `timer` parameter isn't set, returns undefined.\n */\n\n const stopTimer = () => {\n if (globalState.timeout) {\n stopTimerProgressBar();\n return globalState.timeout.stop();\n }\n };\n /**\n * Resume timer. Returns number of milliseconds of timer remained.\n * If `timer` parameter isn't set, returns undefined.\n */\n\n const resumeTimer = () => {\n if (globalState.timeout) {\n const remaining = globalState.timeout.start();\n animateTimerProgressBar(remaining);\n return remaining;\n }\n };\n /**\n * Resume timer. Returns number of milliseconds of timer remained.\n * If `timer` parameter isn't set, returns undefined.\n */\n\n const toggleTimer = () => {\n const timer = globalState.timeout;\n return timer && (timer.running ? stopTimer() : resumeTimer());\n };\n /**\n * Increase timer. Returns number of milliseconds of an updated timer.\n * If `timer` parameter isn't set, returns undefined.\n */\n\n const increaseTimer = n => {\n if (globalState.timeout) {\n const remaining = globalState.timeout.increase(n);\n animateTimerProgressBar(remaining, true);\n return remaining;\n }\n };\n /**\n * Check if timer is running. Returns true if timer is running\n * or false if timer is paused or stopped.\n * If `timer` parameter isn't set, returns undefined\n */\n\n const isTimerRunning = () => {\n return globalState.timeout && globalState.timeout.isRunning();\n };\n\n let bodyClickListenerAdded = false;\n const clickHandlers = {};\n function bindClickHandler() {\n let attr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'data-swal-template';\n clickHandlers[attr] = this;\n\n if (!bodyClickListenerAdded) {\n document.body.addEventListener('click', bodyClickListener);\n bodyClickListenerAdded = true;\n }\n }\n\n const bodyClickListener = event => {\n for (let el = event.target; el && el !== document; el = el.parentNode) {\n for (const attr in clickHandlers) {\n const template = el.getAttribute(attr);\n\n if (template) {\n clickHandlers[attr].fire({\n template\n });\n return;\n }\n }\n }\n };\n\n\n\n var staticMethods = /*#__PURE__*/Object.freeze({\n isValidParameter: isValidParameter,\n isUpdatableParameter: isUpdatableParameter,\n isDeprecatedParameter: isDeprecatedParameter,\n argsToParams: argsToParams,\n isVisible: isVisible$1,\n clickConfirm: clickConfirm,\n clickDeny: clickDeny,\n clickCancel: clickCancel,\n getContainer: getContainer,\n getPopup: getPopup,\n getTitle: getTitle,\n getHtmlContainer: getHtmlContainer,\n getImage: getImage,\n getIcon: getIcon,\n getInputLabel: getInputLabel,\n getCloseButton: getCloseButton,\n getActions: getActions,\n getConfirmButton: getConfirmButton,\n getDenyButton: getDenyButton,\n getCancelButton: getCancelButton,\n getLoader: getLoader,\n getFooter: getFooter,\n getTimerProgressBar: getTimerProgressBar,\n getFocusableElements: getFocusableElements,\n getValidationMessage: getValidationMessage,\n isLoading: isLoading,\n fire: fire,\n mixin: mixin,\n showLoading: showLoading,\n enableLoading: showLoading,\n getTimerLeft: getTimerLeft,\n stopTimer: stopTimer,\n resumeTimer: resumeTimer,\n toggleTimer: toggleTimer,\n increaseTimer: increaseTimer,\n isTimerRunning: isTimerRunning,\n bindClickHandler: bindClickHandler\n });\n\n let currentInstance;\n\n class SweetAlert {\n constructor() {\n // Prevent run in Node env\n if (typeof window === 'undefined') {\n return;\n }\n\n currentInstance = this; // @ts-ignore\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n const outerParams = Object.freeze(this.constructor.argsToParams(args));\n Object.defineProperties(this, {\n params: {\n value: outerParams,\n writable: false,\n enumerable: true,\n configurable: true\n }\n }); // @ts-ignore\n\n const promise = this._main(this.params);\n\n privateProps.promise.set(this, promise);\n }\n\n _main(userParams) {\n let mixinParams = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n showWarningsForParams(Object.assign({}, mixinParams, userParams));\n\n if (globalState.currentInstance) {\n globalState.currentInstance._destroy();\n\n if (isModal()) {\n unsetAriaHidden();\n }\n }\n\n globalState.currentInstance = this;\n const innerParams = prepareParams(userParams, mixinParams);\n setParameters(innerParams);\n Object.freeze(innerParams); // clear the previous timer\n\n if (globalState.timeout) {\n globalState.timeout.stop();\n delete globalState.timeout;\n } // clear the restore focus timeout\n\n\n clearTimeout(globalState.restoreFocusTimeout);\n const domCache = populateDomCache(this);\n render(this, innerParams);\n privateProps.innerParams.set(this, innerParams);\n return swalPromise(this, domCache, innerParams);\n } // `catch` cannot be the name of a module export, so we define our thenable methods here instead\n\n\n then(onFulfilled) {\n const promise = privateProps.promise.get(this);\n return promise.then(onFulfilled);\n }\n\n finally(onFinally) {\n const promise = privateProps.promise.get(this);\n return promise.finally(onFinally);\n }\n\n }\n\n const swalPromise = (instance, domCache, innerParams) => {\n return new Promise((resolve, reject) => {\n // functions to handle all closings/dismissals\n const dismissWith = dismiss => {\n instance.closePopup({\n isDismissed: true,\n dismiss\n });\n };\n\n privateMethods.swalPromiseResolve.set(instance, resolve);\n privateMethods.swalPromiseReject.set(instance, reject);\n\n domCache.confirmButton.onclick = () => handleConfirmButtonClick(instance);\n\n domCache.denyButton.onclick = () => handleDenyButtonClick(instance);\n\n domCache.cancelButton.onclick = () => handleCancelButtonClick(instance, dismissWith);\n\n domCache.closeButton.onclick = () => dismissWith(DismissReason.close);\n\n handlePopupClick(instance, domCache, dismissWith);\n addKeydownHandler(instance, globalState, innerParams, dismissWith);\n handleInputOptionsAndValue(instance, innerParams);\n openPopup(innerParams);\n setupTimer(globalState, innerParams, dismissWith);\n initFocus(domCache, innerParams); // Scroll container to top on open (#1247, #1946)\n\n setTimeout(() => {\n domCache.container.scrollTop = 0;\n });\n });\n };\n\n const prepareParams = (userParams, mixinParams) => {\n const templateParams = getTemplateParams(userParams);\n const params = Object.assign({}, defaultParams, mixinParams, templateParams, userParams); // precedence is described in #2131\n\n params.showClass = Object.assign({}, defaultParams.showClass, params.showClass);\n params.hideClass = Object.assign({}, defaultParams.hideClass, params.hideClass);\n return params;\n };\n\n const populateDomCache = instance => {\n const domCache = {\n popup: getPopup(),\n container: getContainer(),\n actions: getActions(),\n confirmButton: getConfirmButton(),\n denyButton: getDenyButton(),\n cancelButton: getCancelButton(),\n loader: getLoader(),\n closeButton: getCloseButton(),\n validationMessage: getValidationMessage(),\n progressSteps: getProgressSteps()\n };\n privateProps.domCache.set(instance, domCache);\n return domCache;\n };\n\n const setupTimer = (globalState$$1, innerParams, dismissWith) => {\n const timerProgressBar = getTimerProgressBar();\n hide(timerProgressBar);\n\n if (innerParams.timer) {\n globalState$$1.timeout = new Timer(() => {\n dismissWith('timer');\n delete globalState$$1.timeout;\n }, innerParams.timer);\n\n if (innerParams.timerProgressBar) {\n show(timerProgressBar);\n applyCustomClass(timerProgressBar, innerParams, 'timerProgressBar');\n setTimeout(() => {\n if (globalState$$1.timeout && globalState$$1.timeout.running) {\n // timer can be already stopped or unset at this point\n animateTimerProgressBar(innerParams.timer);\n }\n });\n }\n }\n };\n\n const initFocus = (domCache, innerParams) => {\n if (innerParams.toast) {\n return;\n }\n\n if (!callIfFunction(innerParams.allowEnterKey)) {\n return blurActiveElement();\n }\n\n if (!focusButton(domCache, innerParams)) {\n setFocus(innerParams, -1, 1);\n }\n };\n\n const focusButton = (domCache, innerParams) => {\n if (innerParams.focusDeny && isVisible(domCache.denyButton)) {\n domCache.denyButton.focus();\n return true;\n }\n\n if (innerParams.focusCancel && isVisible(domCache.cancelButton)) {\n domCache.cancelButton.focus();\n return true;\n }\n\n if (innerParams.focusConfirm && isVisible(domCache.confirmButton)) {\n domCache.confirmButton.focus();\n return true;\n }\n\n return false;\n };\n\n const blurActiveElement = () => {\n if (document.activeElement instanceof HTMLElement && typeof document.activeElement.blur === 'function') {\n document.activeElement.blur();\n }\n }; // Assign instance methods from src/instanceMethods/*.js to prototype\n\n\n Object.assign(SweetAlert.prototype, instanceMethods); // Assign static methods from src/staticMethods/*.js to constructor\n\n Object.assign(SweetAlert, staticMethods); // Proxy to instance methods to constructor, for now, for backwards compatibility\n\n Object.keys(instanceMethods).forEach(key => {\n SweetAlert[key] = function () {\n if (currentInstance) {\n return currentInstance[key](...arguments);\n }\n };\n });\n SweetAlert.DismissReason = DismissReason;\n SweetAlert.version = '11.4.8';\n\n const Swal = SweetAlert; // @ts-ignore\n\n Swal.default = Swal;\n\n return Swal;\n\n}));\nif (typeof this !== 'undefined' && this.Sweetalert2){ this.swal = this.sweetAlert = this.Swal = this.SweetAlert = this.Sweetalert2}\n\n\"undefined\"!=typeof document&&function(e,t){var n=e.createElement(\"style\");if(e.getElementsByTagName(\"head\")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,\".swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4!important;grid-row:1/4!important;grid-template-columns:1fr 99fr 1fr;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:\\\"top-start top top-end\\\" \\\"center-start center center-end\\\" \\\"bottom-start bottom-center bottom-end\\\";grid-template-rows:minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto);grid-template-rows:minmax(min-content,auto) minmax(min-content,auto) minmax(min-content,auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-bottom-start,.swal2-container.swal2-center-start,.swal2-container.swal2-top-start{grid-template-columns:minmax(0,1fr) auto auto}.swal2-container.swal2-bottom,.swal2-container.swal2-center,.swal2-container.swal2-top{grid-template-columns:auto minmax(0,1fr) auto}.swal2-container.swal2-bottom-end,.swal2-container.swal2-center-end,.swal2-container.swal2-top-end{grid-template-columns:auto auto minmax(0,1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-left>.swal2-popup,.swal2-container.swal2-center-start>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-left>.swal2-popup,.swal2-container.swal2-bottom-start>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-fullscreen>.swal2-popup,.swal2-container.swal2-grow-row>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none!important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0,100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px transparent;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(112,102,224,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(220,55,65,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,120,129,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:0}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto!important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:inherit;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em 2em 3px}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px transparent;color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 3px;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:\\\"!\\\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-warning.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-warning.swal2-icon-show .swal2-icon-content{-webkit-animation:swal2-animate-i-mark .5s;animation:swal2-animate-i-mark .5s}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-info.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-info.swal2-icon-show .swal2-icon-content{-webkit-animation:swal2-animate-i-mark .8s;animation:swal2-animate-i-mark .8s}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-question.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-question.swal2-icon-show .swal2-icon-content{-webkit-animation:swal2-animate-question-mark .8s;animation:swal2-animate-question-mark .8s}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@-webkit-keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@-webkit-keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{background-color:transparent!important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:transparent;pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}\");","import { noop, safe_not_equal, subscribe, run_all, is_function } from '../internal/index.mjs';\nexport { get_store_value as get } from '../internal/index.mjs';\n\nconst subscriber_queue = [];\n/**\n * Creates a `Readable` store that allows reading by subscription.\n * @param value initial value\n * @param {StartStopNotifier}start start and stop notifications for subscriptions\n */\nfunction readable(value, start) {\n return {\n subscribe: writable(value, start).subscribe\n };\n}\n/**\n * Create a `Writable` store that allows both updating and reading by subscription.\n * @param {*=}value initial value\n * @param {StartStopNotifier=}start start and stop notifications for subscriptions\n */\nfunction writable(value, start = noop) {\n let stop;\n const subscribers = new Set();\n function set(new_value) {\n if (safe_not_equal(value, new_value)) {\n value = new_value;\n if (stop) { // store is ready\n const run_queue = !subscriber_queue.length;\n for (const subscriber of subscribers) {\n subscriber[1]();\n subscriber_queue.push(subscriber, value);\n }\n if (run_queue) {\n for (let i = 0; i < subscriber_queue.length; i += 2) {\n subscriber_queue[i][0](subscriber_queue[i + 1]);\n }\n subscriber_queue.length = 0;\n }\n }\n }\n }\n function update(fn) {\n set(fn(value));\n }\n function subscribe(run, invalidate = noop) {\n const subscriber = [run, invalidate];\n subscribers.add(subscriber);\n if (subscribers.size === 1) {\n stop = start(set) || noop;\n }\n run(value);\n return () => {\n subscribers.delete(subscriber);\n if (subscribers.size === 0) {\n stop();\n stop = null;\n }\n };\n }\n return { set, update, subscribe };\n}\nfunction derived(stores, fn, initial_value) {\n const single = !Array.isArray(stores);\n const stores_array = single\n ? [stores]\n : stores;\n const auto = fn.length < 2;\n return readable(initial_value, (set) => {\n let inited = false;\n const values = [];\n let pending = 0;\n let cleanup = noop;\n const sync = () => {\n if (pending) {\n return;\n }\n cleanup();\n const result = fn(single ? values[0] : values, set);\n if (auto) {\n set(result);\n }\n else {\n cleanup = is_function(result) ? result : noop;\n }\n };\n const unsubscribers = stores_array.map((store, i) => subscribe(store, (value) => {\n values[i] = value;\n pending &= ~(1 << i);\n if (inited) {\n sync();\n }\n }, () => {\n pending |= (1 << i);\n }));\n inited = true;\n sync();\n return function stop() {\n run_all(unsubscribers);\n cleanup();\n };\n });\n}\n\nexport { derived, readable, writable };\n","// index.ts\nimport { writable as internal, get } from \"svelte/store\";\nvar stores = {};\nfunction writable(key, initialValue) {\n const browser = typeof localStorage != \"undefined\";\n function updateStorage(key2, value) {\n if (!browser)\n return;\n localStorage.setItem(key2, JSON.stringify(value));\n }\n if (!stores[key]) {\n const store = internal(initialValue, (set2) => {\n const json = browser ? localStorage.getItem(key) : null;\n if (json) {\n set2(JSON.parse(json));\n }\n if (browser) {\n const handleStorage = (event) => {\n if (event.key === key)\n set2(event.newValue ? JSON.parse(event.newValue) : null);\n };\n window.addEventListener(\"storage\", handleStorage);\n return () => window.removeEventListener(\"storage\", handleStorage);\n }\n });\n const { subscribe, set } = store;\n stores[key] = {\n set(value) {\n updateStorage(key, value);\n set(value);\n },\n update(updater) {\n const value = updater(get(store));\n updateStorage(key, value);\n set(value);\n },\n subscribe\n };\n }\n return stores[key];\n}\nexport {\n writable\n};\n//# sourceMappingURL=index.mjs.map\n","/** @typedef {{ id: Errors, msg: string }} Error */\n\nexport const external = {\n // @ts-ignore\n Peer: window.Peer,\n};\n\n/** @enum {number} */\nexport const Messages = {\n INIT_STATE: 0,\n NEW_PROBLEM: 1,\n UPDATE_SERVER_STATE: 2,\n UPDATE_CLIENT_STATE: 3,\n};\n\nexport const hivemindBrain = new URLSearchParams(location.search).get('game');\nexport const isHivemindBrain = hivemindBrain === null;\nexport const isAndroid = window.navigator.userAgent.includes('Android');\n\n/** @enum {string} */\nexport const Errors = {\n NO_SELF_DECODE: 'no-self-decode',\n};\n\nexport const alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\n// random strings to keep track of\nexport const noshow = 'dontshow';\nexport const firstlaunch = 'has-launched';\nexport const cryptogramCharacterLabel = 'Cryptogram character';\nexport const occurencesCharacterLabel = 'Occurences of character';\nexport const replacementCharacterLabel = 'Replacement for character';\n\nexport const congratulationTitles = [\n 'Congratulations!',\n \"Let's gooo\",\n 'I knew you could do it',\n 'What a speedy boi',\n 'Sheeesh',\n \"Are you sonic, cause you're fast\",\n \"Are you going to MIT, cause you're fast\",\n 'You almost finished as fast as an MIT boy',\n 'Zoom zoom',\n 'Vroom vroom',\n 'You just broke the sound barrier',\n \"Are you 30k mph, cause you're faster than escape velocity\",\n 'Too smart, too fast',\n 'ZHOOOOOM',\n 'Haha cryptogram go brrr',\n \"I'm proud of you\",\n 'Most speedy cryptonerd',\n 'I *c* you',\n \"Deja vu, although I've never seen such speed before\",\n 'You spend too much time on these puzzles, touch grass',\n 'Did f appear 1 time, cause you were as fast as f1 cars',\n 'You were faster than a Princeton waitlist student responding to a phone ring',\n 'Quite e-e-e-legaaant',\n 'Omae wa mou, SOLVEDERU',\n 'Speedy and steady wins the race',\n \"You're almost as fast as C\",\n 'Are you JIT compiled, cause that was a massive speedup',\n 'That took you so little time, spacetime became just space',\n 'You going so fast, you escaped a black hole',\n 'You went so fast, you look red from here and blue over there',\n];\n","import { derived, get, writable } from 'svelte/store';\nimport { writable as lswritable } from 'svelte-local-storage-store';\nimport { firstlaunch } from './constants.js';\n\n/** @typedef {import('./quotes.js').EncryptedQuote} EncryptedQuote */\n\n// progress is null if none or an array of whether the char is filled\nconst defaultUsers = [\n {\n id: '',\n name: '',\n progress: [null, [true]][0],\n solved: false,\n },\n].slice(1);\n\n/** @typedef {typeof defaultUsers[0]} User */\n/** @typedef {import('peerjs').DataConnection} Connection */\n\nexport const users = writable(defaultUsers);\n\nexport const id = writable('');\nexport const gameProblem = writable(\n /** @type {EncryptedQuote | null} */ (null)\n);\nexport const name = lswritable(\n 'name',\n `person-${Math.floor(Math.random() * 10000)}`\n);\nexport const patristocratEnabled = lswritable('patristocrat', false);\nexport const hintEnabled = lswritable('hint', false);\nexport const hivemindConnection = writable(\n /** @type {Connection | null} */ (null)\n);\nexport const progress = writable([null, [true]][0]);\nexport const solved = writable(false);\nexport const isFirstLaunch = lswritable(firstlaunch, true);\nexport const needsKeyboardEntry = writable(false);\nexport const focussedKey = writable(/** @type {string | null} */ (null));\n\n/** @type {Map} */\nexport const connections = new Map(); // id -> connection\n\n/** @type {Map void>} */\nexport const keyboardSubscriptions = new Map();\n\nexport const self = derived(\n [id, name, progress, solved],\n ([id, name, progress, solved]) => {\n return { id, name, progress, solved };\n }\n);\n\nexport const problemStart = derived(\n gameProblem,\n ($gp) => $gp?.start ?? Date.now()\n);\n\n/** @type {import('svelte/store').Readable>} */\nexport const timeTakenByOpponents = derived(\n [users, problemStart],\n ([$users, $problemStart]) => {\n return new Map(\n $users.map((u) => [\n u.id,\n u.solved\n ? get(timeTakenByOpponents).get(u.id) ?? Date.now() - $problemStart\n : Date.now() - $problemStart,\n ])\n );\n }\n);\n\nexport const resetStores = () => {\n id.set('');\n gameProblem.set(null);\n name.set('');\n hivemindConnection.set(null);\n progress.set(null);\n solved.set(false);\n connections.clear();\n};\n","/** @type {(...args: any[]) => any} */\nexport const log = (...args) => !process.env.PRODUCTION && console.log(...args);\n\n/** @type {(num: number) => string} */\nconst padTime = (num) => `${Math.floor(num)}`.padStart(2, '0');\n\n/** @type {(ms: number) => string} */\nexport const fmtTime = (ms) => {\n const hours = padTime(ms / 60000 / 60);\n const minutes = padTime((ms / 60000) % 60);\n const seconds = padTime((ms % 60000) / 1000);\n if (hours !== '00') {\n return `${hours}:${minutes}:${seconds}`.replace(/^0+/g, '');\n }\n if (minutes !== '00') {\n return `${minutes}:${seconds}`.replace(/^0+/g, '');\n }\n return `00:${seconds}`;\n};\n\n/** @type {(ms: number) => Promise} */\nexport const sleep = (ms) => new Promise((res) => setTimeout(res, ms));\n\n/**\n * @template T\n * @param {Array} arr\n * @returns {Set}\n */\nexport const getDuplicates = (arr) => {\n const duplicates = new Set();\n /** @type {typeof duplicates} */\n const visited = new Set();\n\n for (const entry of arr) {\n if (visited.has(entry)) {\n duplicates.add(entry);\n }\n visited.add(entry);\n }\n\n return duplicates;\n};\n\n/**\n * @template T\n * @param {Array} arr\n * @returns {T}\n */\nexport const choose = (arr) => arr[Math.floor(Math.random() * arr.length)];\n\n/**\n * @template T\n * @param {Iterable} it\n * @returns {Map}\n */\nexport const getCounts = (it) => {\n const count = new Map();\n for (const item of it) {\n count.set(item, (count.has(item) ? count.get(item) : 0) + 1);\n }\n return count;\n};\n","import Swal from 'sweetalert2';\nimport { get } from 'svelte/store';\nimport {\n connections,\n gameProblem,\n id,\n hivemindConnection,\n name,\n self,\n progress,\n solved,\n users,\n} from './store.js';\nimport {\n external,\n hivemindBrain,\n isHivemindBrain,\n Messages,\n} from './constants.js';\nimport { log } from './utils.js';\n\nexport const peer = new external.Peer();\n\n/**\n * @typedef {import('./store.js').User} User\n * @typedef {import('peerjs').DataConnection} Connection\n * @typedef {{ type: 0, name: string }} INIT_MSG\n * @typedef {{ type: 1, problem: import('./quotes.js').EncryptedQuote }} NEW_PROB_MSG\n * @typedef {{ type: 2, progress: null | boolean[], solved: boolean, name: string }}\n * UPDATE_S_MSG\n * @typedef {{ type: 3, users: User[] }} UPDATE_C_MSG\n * @typedef {INIT_MSG | NEW_PROB_MSG | UPDATE_S_MSG | UPDATE_C_MSG} PeerData\n */\n\n/**\n * @template T extends PeerData\n * @typedef {(otherId: string, data: T) => void} DataResponder\n */\n\n/** @type {(otherId: string) => (data: PeerData) => void} */\nexport const onData = (otherId) => (data) => {\n log('got data', data);\n if (dataResponders[data.type]) {\n // @ts-ignore\n dataResponders[data.type](otherId, data);\n }\n};\n\n/** @type {DataResponder} */\nconst initializeRemotePlayer = (id, data) => {\n users.update(($users) => [\n ...$users,\n {\n id,\n name: data.name,\n progress: null,\n solved: false,\n },\n ]);\n};\n\n/** @type {DataResponder} */\nconst onNewProblem = (_, data) => {\n gameProblem.set(data.problem);\n};\n\n/** @type {DataResponder} */\nconst updateFromClient = (id, data) => {\n if (!isHivemindBrain) return;\n users.update(($users) =>\n $users.map((u) =>\n u.id !== id\n ? u\n : {\n ...u,\n name: data.name,\n progress: data.progress,\n solved: data.solved,\n }\n )\n );\n};\n\n/** @type {DataResponder} */\nconst updateFromServer = (_, data) => {\n if (isHivemindBrain) return;\n const ourId = get(id);\n users.set(data.users.filter((u) => u.id !== ourId));\n};\n\nconst dataResponders = [\n initializeRemotePlayer,\n onNewProblem,\n updateFromClient,\n updateFromServer,\n];\n\n/** @type {(otherId: string) => () => void} */\nconst removePlayer = (otherId) => () => {\n users.update(($users) => $users.filter((u) => u.id !== otherId));\n connections.delete(otherId);\n};\n\nconst sendInitialState = (/** @type {Connection} */ conn) =>\n conn?.send({\n type: Messages.INIT_STATE,\n name: get(name),\n });\n\nconst openConnection = (/** @type {Connection} */ conn) =>\n new Promise((res) => {\n conn.on('open', () => {\n if (conn.peer === hivemindBrain) hivemindConnection.set(conn);\n connections.set(conn.peer, conn);\n conn.on('data', onData(conn.peer));\n conn.on('close', removePlayer(conn.peer));\n setTimeout(() => {\n sendInitialState(conn);\n }, 100);\n res(conn);\n });\n });\n\nconst emit = (/** @type {any} */ msg) =>\n connections.forEach((conn) => conn.send(msg));\n\n/** @type {(otherId: string) => Promise} */\nexport const connectTo = (otherId) =>\n new Promise((res) => {\n const unsub = id.subscribe(($id) => {\n if ($id === '') return;\n const conn = peer.connect(otherId);\n setTimeout(() => unsub());\n openConnection(conn).then(res);\n });\n });\n\npeer.on('open', (/** @type {string} */ $id) => {\n id.set($id);\n if (!isHivemindBrain && hivemindBrain !== null) {\n connectTo(hivemindBrain);\n }\n});\npeer.on('connection', openConnection);\npeer.on('error', (/** @type {any} */ e) => {\n Swal.fire({\n title: 'Connection error',\n text: `${e}`,\n icon: 'error',\n confirmButtonColor: 'var(--red)',\n });\n});\n\nconst subscriptions = [\n users.subscribe(($users) => {\n if (isHivemindBrain)\n emit({\n type: Messages.UPDATE_CLIENT_STATE,\n users: [...$users.map((u) => ({ ...u, conn: null })), get(self)],\n });\n }),\n self.subscribe(($self) => {\n log('own state changed', $self);\n if (isHivemindBrain)\n emit({\n type: Messages.UPDATE_CLIENT_STATE,\n users: [...get(users).map((u) => ({ ...u, conn: null })), $self],\n });\n else\n get(hivemindConnection)?.send({\n type: Messages.UPDATE_SERVER_STATE,\n name: $self.name,\n progress: $self.progress,\n solved: $self.solved,\n });\n }),\n gameProblem.subscribe(($problem) => {\n if ($problem === null) return;\n\n progress.set(null);\n solved.set(false);\n\n if (isHivemindBrain) {\n users.update((us) =>\n us.map((u) => ({ ...u, progress: null, solved: false }))\n );\n emit({\n type: Messages.NEW_PROBLEM,\n problem: $problem,\n });\n }\n }),\n];\n\n// @ts-ignore\nif (window.$cryptoduel$subscriptions)\n // @ts-ignore\n window.$cryptoduel$subscriptions.forEach((u) => u());\n// @ts-ignore\nwindow.$cryptoduel$subscriptions = subscriptions;\n","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction normalizeComputedStyleValue(string) {\n // \"250px\" --> 250\n return +string.replace(/px/, '');\n}\n\nfunction fixDPR(canvas) {\n var dpr = window.devicePixelRatio;\n var computedStyles = getComputedStyle(canvas);\n var width = normalizeComputedStyleValue(computedStyles.getPropertyValue('width'));\n var height = normalizeComputedStyleValue(computedStyles.getPropertyValue('height'));\n canvas.setAttribute('width', (width * dpr).toString());\n canvas.setAttribute('height', (height * dpr).toString());\n}\n\nfunction generateRandomNumber(min, max) {\n var fractionDigits = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n var randomNumber = Math.random() * (max - min) + min;\n return Math.floor(randomNumber * Math.pow(10, fractionDigits)) / Math.pow(10, fractionDigits);\n}\n\nfunction generateRandomArrayElement(arr) {\n return arr[generateRandomNumber(0, arr.length)];\n}\n\nvar FREE_FALLING_OBJECT_ACCELERATION = 0.00125;\nvar MIN_DRAG_FORCE_COEFFICIENT = 0.0005;\nvar MAX_DRAG_FORCE_COEFFICIENT = 0.0009;\nvar ROTATION_SLOWDOWN_ACCELERATION = 0.00001;\nvar INITIAL_SHAPE_RADIUS = 6;\nvar INITIAL_EMOJI_SIZE = 80;\nvar MIN_INITIAL_CONFETTI_SPEED = 0.9;\nvar MAX_INITIAL_CONFETTI_SPEED = 1.7;\nvar MIN_FINAL_X_CONFETTI_SPEED = 0.2;\nvar MAX_FINAL_X_CONFETTI_SPEED = 0.6;\nvar MIN_INITIAL_ROTATION_SPEED = 0.03;\nvar MAX_INITIAL_ROTATION_SPEED = 0.07;\nvar MIN_CONFETTI_ANGLE = 15;\nvar MAX_CONFETTI_ANGLE = 82;\nvar MAX_CONFETTI_POSITION_SHIFT = 150;\nvar SHAPE_VISIBILITY_TRESHOLD = 100;\nvar DEFAULT_CONFETTI_NUMBER = 250;\nvar DEFAULT_EMOJIS_NUMBER = 40;\nvar DEFAULT_CONFETTI_COLORS = ['#fcf403', '#62fc03', '#f4fc03', '#03e7fc', '#03fca5', '#a503fc', '#fc03ad', '#fc03c2'];\n\nfunction getWindowWidthCoefficient(canvasWidth) {\n var HD_SCREEN_WIDTH = 1920;\n return Math.log(canvasWidth) / Math.log(HD_SCREEN_WIDTH);\n}\n\nvar ConfettiShape = /*#__PURE__*/function () {\n function ConfettiShape(args) {\n _classCallCheck(this, ConfettiShape);\n\n var initialPosition = args.initialPosition,\n direction = args.direction,\n confettiRadius = args.confettiRadius,\n confettiColors = args.confettiColors,\n emojis = args.emojis,\n emojiSize = args.emojiSize,\n canvasWidth = args.canvasWidth;\n var randomConfettiSpeed = generateRandomNumber(MIN_INITIAL_CONFETTI_SPEED, MAX_INITIAL_CONFETTI_SPEED, 3);\n var initialSpeed = randomConfettiSpeed * getWindowWidthCoefficient(canvasWidth);\n this.confettiSpeed = {\n x: initialSpeed,\n y: initialSpeed\n };\n this.finalConfettiSpeedX = generateRandomNumber(MIN_FINAL_X_CONFETTI_SPEED, MAX_FINAL_X_CONFETTI_SPEED, 3);\n this.rotationSpeed = emojis.length ? 0.01 : generateRandomNumber(MIN_INITIAL_ROTATION_SPEED, MAX_INITIAL_ROTATION_SPEED, 3) * getWindowWidthCoefficient(canvasWidth);\n this.dragForceCoefficient = generateRandomNumber(MIN_DRAG_FORCE_COEFFICIENT, MAX_DRAG_FORCE_COEFFICIENT, 6);\n this.radius = {\n x: confettiRadius,\n y: confettiRadius\n };\n this.initialRadius = confettiRadius;\n this.rotationAngle = direction === 'left' ? generateRandomNumber(0, 0.2, 3) : generateRandomNumber(-0.2, 0, 3);\n this.emojiSize = emojiSize;\n this.emojiRotationAngle = generateRandomNumber(0, 2 * Math.PI);\n this.radiusYUpdateDirection = 'down';\n var angle = direction === 'left' ? generateRandomNumber(MAX_CONFETTI_ANGLE, MIN_CONFETTI_ANGLE) * Math.PI / 180 : generateRandomNumber(-MIN_CONFETTI_ANGLE, -MAX_CONFETTI_ANGLE) * Math.PI / 180;\n this.absCos = Math.abs(Math.cos(angle));\n this.absSin = Math.abs(Math.sin(angle));\n var positionShift = generateRandomNumber(-MAX_CONFETTI_POSITION_SHIFT, 0);\n var shiftedInitialPosition = {\n x: initialPosition.x + (direction === 'left' ? -positionShift : positionShift) * this.absCos,\n y: initialPosition.y - positionShift * this.absSin\n };\n this.currentPosition = Object.assign({}, shiftedInitialPosition);\n this.initialPosition = Object.assign({}, shiftedInitialPosition);\n this.color = emojis.length ? null : generateRandomArrayElement(confettiColors);\n this.emoji = emojis.length ? generateRandomArrayElement(emojis) : null;\n this.createdAt = new Date().getTime();\n this.direction = direction;\n }\n\n _createClass(ConfettiShape, [{\n key: \"draw\",\n value: function draw(canvasContext) {\n var currentPosition = this.currentPosition,\n radius = this.radius,\n color = this.color,\n emoji = this.emoji,\n rotationAngle = this.rotationAngle,\n emojiRotationAngle = this.emojiRotationAngle,\n emojiSize = this.emojiSize;\n var dpr = window.devicePixelRatio;\n\n if (color) {\n canvasContext.fillStyle = color;\n canvasContext.beginPath();\n canvasContext.ellipse(currentPosition.x * dpr, currentPosition.y * dpr, radius.x * dpr, radius.y * dpr, rotationAngle, 0, 2 * Math.PI);\n canvasContext.fill();\n } else if (emoji) {\n canvasContext.font = \"\".concat(emojiSize, \"px serif\");\n canvasContext.save();\n canvasContext.translate(dpr * currentPosition.x, dpr * currentPosition.y);\n canvasContext.rotate(emojiRotationAngle);\n canvasContext.textAlign = 'center';\n canvasContext.fillText(emoji, 0, 0);\n canvasContext.restore();\n }\n }\n }, {\n key: \"updatePosition\",\n value: function updatePosition(iterationTimeDelta, currentTime) {\n var confettiSpeed = this.confettiSpeed,\n dragForceCoefficient = this.dragForceCoefficient,\n finalConfettiSpeedX = this.finalConfettiSpeedX,\n radiusYUpdateDirection = this.radiusYUpdateDirection,\n rotationSpeed = this.rotationSpeed,\n createdAt = this.createdAt,\n direction = this.direction;\n var timeDeltaSinceCreation = currentTime - createdAt;\n if (confettiSpeed.x > finalConfettiSpeedX) this.confettiSpeed.x -= dragForceCoefficient * iterationTimeDelta;\n this.currentPosition.x += confettiSpeed.x * (direction === 'left' ? -this.absCos : this.absCos) * iterationTimeDelta;\n this.currentPosition.y = this.initialPosition.y - confettiSpeed.y * this.absSin * timeDeltaSinceCreation + FREE_FALLING_OBJECT_ACCELERATION * Math.pow(timeDeltaSinceCreation, 2) / 2;\n this.rotationSpeed -= this.emoji ? 0.0001 : ROTATION_SLOWDOWN_ACCELERATION * iterationTimeDelta;\n if (this.rotationSpeed < 0) this.rotationSpeed = 0; // no need to update rotation radius for emoji\n\n if (this.emoji) {\n this.emojiRotationAngle += this.rotationSpeed * iterationTimeDelta % (2 * Math.PI);\n return;\n }\n\n if (radiusYUpdateDirection === 'down') {\n this.radius.y -= iterationTimeDelta * rotationSpeed;\n\n if (this.radius.y <= 0) {\n this.radius.y = 0;\n this.radiusYUpdateDirection = 'up';\n }\n } else {\n this.radius.y += iterationTimeDelta * rotationSpeed;\n\n if (this.radius.y >= this.initialRadius) {\n this.radius.y = this.initialRadius;\n this.radiusYUpdateDirection = 'down';\n }\n }\n }\n }, {\n key: \"getIsVisibleOnCanvas\",\n value: function getIsVisibleOnCanvas(canvasHeight) {\n return this.currentPosition.y < canvasHeight + SHAPE_VISIBILITY_TRESHOLD;\n }\n }]);\n\n return ConfettiShape;\n}();\n\nfunction createCanvas() {\n var canvas = document.createElement('canvas');\n canvas.style.position = 'fixed';\n canvas.style.width = '100%';\n canvas.style.height = '100%';\n canvas.style.top = '0';\n canvas.style.left = '0';\n canvas.style.zIndex = '1000';\n canvas.style.pointerEvents = 'none';\n document.body.appendChild(canvas);\n return canvas;\n}\n\nfunction normalizeConfettiConfig(confettiConfig) {\n var _confettiConfig$confe = confettiConfig.confettiRadius,\n confettiRadius = _confettiConfig$confe === void 0 ? INITIAL_SHAPE_RADIUS : _confettiConfig$confe,\n _confettiConfig$confe2 = confettiConfig.confettiNumber,\n confettiNumber = _confettiConfig$confe2 === void 0 ? confettiConfig.confettiesNumber || (confettiConfig.emojis ? DEFAULT_EMOJIS_NUMBER : DEFAULT_CONFETTI_NUMBER) : _confettiConfig$confe2,\n _confettiConfig$confe3 = confettiConfig.confettiColors,\n confettiColors = _confettiConfig$confe3 === void 0 ? DEFAULT_CONFETTI_COLORS : _confettiConfig$confe3,\n _confettiConfig$emoji = confettiConfig.emojis,\n emojis = _confettiConfig$emoji === void 0 ? confettiConfig.emojies || [] : _confettiConfig$emoji,\n _confettiConfig$emoji2 = confettiConfig.emojiSize,\n emojiSize = _confettiConfig$emoji2 === void 0 ? INITIAL_EMOJI_SIZE : _confettiConfig$emoji2; // deprecate wrong plural forms, used in early releases\n\n if (confettiConfig.emojies) console.error(\"emojies argument is deprecated, please use emojis instead\");\n if (confettiConfig.confettiesNumber) console.error(\"confettiesNumber argument is deprecated, please use confettiNumber instead\");\n return {\n confettiRadius: confettiRadius,\n confettiNumber: confettiNumber,\n confettiColors: confettiColors,\n emojis: emojis,\n emojiSize: emojiSize\n };\n}\n\nvar ConfettiBatch = /*#__PURE__*/function () {\n function ConfettiBatch(canvasContext) {\n var _this = this;\n\n _classCallCheck(this, ConfettiBatch);\n\n this.canvasContext = canvasContext;\n this.shapes = [];\n this.promise = new Promise(function (completionCallback) {\n return _this.resolvePromise = completionCallback;\n });\n }\n\n _createClass(ConfettiBatch, [{\n key: \"getBatchCompletePromise\",\n value: function getBatchCompletePromise() {\n return this.promise;\n }\n }, {\n key: \"addShapes\",\n value: function addShapes() {\n var _this$shapes;\n\n (_this$shapes = this.shapes).push.apply(_this$shapes, arguments);\n }\n }, {\n key: \"complete\",\n value: function complete() {\n var _a;\n\n if (this.shapes.length) {\n return false;\n }\n\n (_a = this.resolvePromise) === null || _a === void 0 ? void 0 : _a.call(this);\n return true;\n }\n }, {\n key: \"processShapes\",\n value: function processShapes(time, canvasHeight, cleanupInvisibleShapes) {\n var _this2 = this;\n\n var timeDelta = time.timeDelta,\n currentTime = time.currentTime;\n this.shapes = this.shapes.filter(function (shape) {\n // Render the shapes in this batch\n shape.updatePosition(timeDelta, currentTime);\n shape.draw(_this2.canvasContext); // Only cleanup the shapes if we're being asked to\n\n if (!cleanupInvisibleShapes) {\n return true;\n }\n\n return shape.getIsVisibleOnCanvas(canvasHeight);\n });\n }\n }]);\n\n return ConfettiBatch;\n}();\n\nvar JSConfetti = /*#__PURE__*/function () {\n function JSConfetti() {\n var jsConfettiConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _classCallCheck(this, JSConfetti);\n\n this.activeConfettiBatches = [];\n this.canvas = jsConfettiConfig.canvas || createCanvas();\n this.canvasContext = this.canvas.getContext('2d');\n this.requestAnimationFrameRequested = false;\n this.lastUpdated = new Date().getTime();\n this.iterationIndex = 0;\n this.loop = this.loop.bind(this);\n requestAnimationFrame(this.loop);\n }\n\n _createClass(JSConfetti, [{\n key: \"loop\",\n value: function loop() {\n this.requestAnimationFrameRequested = false;\n fixDPR(this.canvas);\n var currentTime = new Date().getTime();\n var timeDelta = currentTime - this.lastUpdated;\n var canvasHeight = this.canvas.offsetHeight;\n var cleanupInvisibleShapes = this.iterationIndex % 10 === 0;\n this.activeConfettiBatches = this.activeConfettiBatches.filter(function (batch) {\n batch.processShapes({\n timeDelta: timeDelta,\n currentTime: currentTime\n }, canvasHeight, cleanupInvisibleShapes); // Do not remove invisible shapes on every iteration\n\n if (!cleanupInvisibleShapes) {\n return true;\n }\n\n return !batch.complete();\n });\n this.iterationIndex++;\n this.queueAnimationFrameIfNeeded(currentTime);\n }\n }, {\n key: \"queueAnimationFrameIfNeeded\",\n value: function queueAnimationFrameIfNeeded(currentTime) {\n if (this.requestAnimationFrameRequested) {\n // We already have a pended animation frame, so there is no more work\n return;\n }\n\n if (this.activeConfettiBatches.length < 1) {\n // No shapes to animate, so don't queue another frame\n return;\n }\n\n this.requestAnimationFrameRequested = true; // Capture the last updated time for animation\n\n this.lastUpdated = currentTime || new Date().getTime();\n requestAnimationFrame(this.loop);\n }\n }, {\n key: \"addConfetti\",\n value: function addConfetti() {\n var confettiConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var _normalizeConfettiCon = normalizeConfettiConfig(confettiConfig),\n confettiRadius = _normalizeConfettiCon.confettiRadius,\n confettiNumber = _normalizeConfettiCon.confettiNumber,\n confettiColors = _normalizeConfettiCon.confettiColors,\n emojis = _normalizeConfettiCon.emojis,\n emojiSize = _normalizeConfettiCon.emojiSize; // Use the bounding rect rather tahn the canvas width / height, because\n // .width / .height are unset until a layout pass has been completed. Upon\n // confetti being immediately queued on a page load, this hasn't happened so\n // the default of 300x150 will be returned, causing an improper source point\n // for the confetti animation.\n\n\n var canvasRect = this.canvas.getBoundingClientRect();\n var canvasWidth = canvasRect.width;\n var canvasHeight = canvasRect.height;\n var yPosition = canvasHeight * 5 / 7;\n var leftConfettiPosition = {\n x: 0,\n y: yPosition\n };\n var rightConfettiPosition = {\n x: canvasWidth,\n y: yPosition\n };\n var confettiGroup = new ConfettiBatch(this.canvasContext);\n\n for (var i = 0; i < confettiNumber / 2; i++) {\n var confettiOnTheRight = new ConfettiShape({\n initialPosition: leftConfettiPosition,\n direction: 'right',\n confettiRadius: confettiRadius,\n confettiColors: confettiColors,\n confettiNumber: confettiNumber,\n emojis: emojis,\n emojiSize: emojiSize,\n canvasWidth: canvasWidth\n });\n var confettiOnTheLeft = new ConfettiShape({\n initialPosition: rightConfettiPosition,\n direction: 'left',\n confettiRadius: confettiRadius,\n confettiColors: confettiColors,\n confettiNumber: confettiNumber,\n emojis: emojis,\n emojiSize: emojiSize,\n canvasWidth: canvasWidth\n });\n confettiGroup.addShapes(confettiOnTheRight, confettiOnTheLeft);\n }\n\n this.activeConfettiBatches.push(confettiGroup);\n this.queueAnimationFrameIfNeeded();\n return confettiGroup.getBatchCompletePromise();\n }\n }]);\n\n return JSConfetti;\n}();\n\nexport default JSConfetti;\n","/**\n * Utilities with logic specific to cryptoduel\n */\n\nimport { choose, fmtTime } from './utils.js';\nimport { congratulationTitles, isHivemindBrain } from './constants.js';\n\n/** @typedef {import('./quotes.js').EncryptedQuote} EncryptedQuote */\n\n/** @type {(gp: EncryptedQuote | null) => boolean[]} */\nexport const getEmptyProgress = (gp) =>\n gp === null ? [] : [...gp.ciphertext].map((_) => false);\n\n/** @type {(timeTaken: number) => string} */\nexport const getCongratulationsMessage = (timeTaken) => {\n return `You solved the quote in ${fmtTime(timeTaken)}!`;\n};\n\n/** @type {() => string} */\nexport const getCongratulationsTitle = () => choose(congratulationTitles);\n\n/** @type {(id: string) => string} */\nexport const getJoinLink = (id) =>\n isHivemindBrain\n ? `${window.location.href}?game=${encodeURIComponent(id)}`\n : window.location.href;\n","import { get } from 'svelte/store';\n\nimport ConfettiGenerator from 'js-confetti';\nimport Swal from 'sweetalert2';\nimport {\n getCongratulationsMessage,\n getCongratulationsTitle,\n} from './cryptoduelutils.js';\nimport { noshow } from './constants.js';\nimport { problemStart, keyboardSubscriptions } from './store.js';\n\n/** @typedef {import('./constants.js').Error} Error */\n\n/** @type {any | undefined} */\nlet confetti;\nsetTimeout(() => {\n confetti = new ConfettiGenerator({\n // @ts-ignore\n canvas: document.querySelector('#confetti'),\n });\n}, 10);\n// @ts-ignore\nwindow.$cryptoduel$confetti = confetti;\n\nexport const confettiCelebration = () => {\n Swal.fire({\n title: getCongratulationsTitle(),\n text: getCongratulationsMessage(Date.now() - get(problemStart)),\n icon: 'success',\n confirmButtonColor: 'var(--primary-color)',\n });\n\n confetti.addConfetti();\n};\n\nconst getErrLocalstorageKey = (/** @type {Error} */ err) =>\n `show-err-${err.id}`;\n\nexport const showError = (\n /** @type {import('./constants.js').Error} */ err\n) => {\n const errKey = getErrLocalstorageKey(err);\n if (localStorage.getItem(errKey) === noshow) return;\n\n Swal.fire({\n title: `Error (${err.id})`,\n text: err.msg,\n icon: 'error',\n showDenyButton: true,\n denyButtonText: \"Don't show this error message again\",\n confirmButtonColor: 'var(--primary-color)',\n denyButtonColor: 'var(--red)',\n }).then((r) => {\n if (r.isDenied) {\n localStorage.setItem(errKey, noshow);\n }\n });\n};\n\nlet keebSub = 0;\n\n/** @type {(listener: (c: string) => void) => () => void} */\nexport const subscribeToKeyboard = (listener) => {\n const subscriptionId = keebSub++;\n keyboardSubscriptions.set(keebSub, listener);\n return () => keyboardSubscriptions.delete(subscriptionId);\n};\n","import { amountChunks } from './meta.js';\nimport { alphabet } from './constants.js';\nexport { alphabet } from './constants.js';\n\n/** @typedef {{ author: string, text: string }} Quote */\n/** @typedef {Quote & {\n plaintext: string, ciphertext: string, start: number, hint?: string\n}} EncryptedQuote */\n\nexport const getQuoteGenerator = () => {\n let quoteIndex = 0;\n\n const chunk = fetch(\n `./quotes/${Math.floor(Math.random() * (amountChunks))}.json`\n )\n .then((r) => r.json())\n .then(shuffleArray);\n\n const newQuote = async () => {\n const quotes = /** @type {{ quoteAuthor: string, quoteText: string }[]} */ (\n await chunk\n );\n const quote = quotes[quoteIndex++ % quotes.length];\n return { author: quote.quoteAuthor, text: cleanUpText(quote.quoteText) };\n };\n\n return newQuote;\n};\n\n/**\n * @template T\n * @param {Array} arr\n * @returns {Array}\n */\nconst shuffleArray = (arr) =>\n arr\n .map((a) => /** @type {[number, T]} */ ([Math.random(), a]))\n .sort((a, b) => a[0] - b[0])\n .map((a) => a[1]);\n\n/** @type {() => string[]} */\nconst generateRandomEncryption = () => {\n const encMap = shuffleArray([...Array(26).keys()]);\n if (encMap.some((x, i) => x === i)) return generateRandomEncryption();\n return encMap.map((i) => alphabet[i]);\n};\n\n/** @type {(quote: Quote) => EncryptedQuote} */\nexport const toAristocratCipher = (quote) => {\n const plaintext = quote.text.toUpperCase();\n const encryptionAlphabet = generateRandomEncryption();\n const ciphertext = [...plaintext]\n .map((char) => encryptionAlphabet[alphabet.indexOf(char)] ?? char)\n .join('');\n\n return {\n ...quote,\n plaintext,\n ciphertext,\n start: Date.now(),\n hint: splitQuote(plaintext)[0],\n };\n};\n\n/** @type {(text: string) => string} */\nconst patristify = (text) => {\n const alphabetChars = [...text].filter((c) => alphabet.includes(c)).join('');\n return [...Array(alphabetChars.length).keys()]\n .filter((i) => i % 5 === 0)\n .map((i) => alphabetChars.slice(i, i + 5))\n .join(' ');\n};\n\n/** @type {(quote: EncryptedQuote) => EncryptedQuote} */\nexport const toPatristocratCipher = (quote) => ({\n ...quote,\n plaintext: patristify(quote.plaintext),\n ciphertext: patristify(quote.ciphertext),\n});\n\n/** @type {(text: string) => string[]} */\nexport const splitQuote = (text) => [...text.split(/\\s+/g)];\n\n/** @type {(text: string) => string} */\n// eslint-disable-next-line no-control-regex\nconst cleanUpText = (text) => text.replace(/[^\\x00-\\x7F]+/g, ''); // ascii-only\n","import { Errors } from '@/js/constants.js';\n\n/**\n * @template T\n * @typedef {(node: HTMLElement, options: Partial) => Partial<{\n * update: (newOptions: Partial) => void,\n * destroy: () => void\n * }>} Action\n */\n\nconst replaceableElementDefaultOptions = {\n ogchar: '',\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n dispatch: (/** @type {string} */ _key, _detail = {}) => {},\n disabled: false,\n};\n\n/** @type {Action} */\nexport const replaceableElement = (node, options_ = {}) => {\n let options = /** @type {typeof replaceableElementDefaultOptions} */ ({\n ...options_,\n replaceableElementDefaultOptions,\n });\n const { dispatch } = options;\n\n const setProperties = () => {\n node.style.setProperty(\n 'pointer-events',\n options.disabled ? 'none' : 'auto'\n );\n };\n\n setProperties();\n\n /** @type {(e: KeyboardEvent) => void} */\n const onKeyDown = (e) => {\n if (options.disabled) return;\n\n if (e.key !== 'Tab') e.preventDefault();\n\n if (options.ogchar === e.key.toUpperCase()) {\n dispatch('error', {\n id: Errors.NO_SELF_DECODE,\n msg: 'Letters cannot decode to themselves',\n });\n return;\n }\n\n dispatch('replace', {\n from: options.ogchar,\n to: e.key.toUpperCase(),\n });\n };\n\n node.addEventListener('keydown', onKeyDown);\n\n return {\n update(newOptions) {\n options = { ...options, ...newOptions };\n setProperties();\n },\n\n destroy() {\n node.removeEventListener('keydown', onKeyDown);\n },\n };\n};\n","\n\n\n\n\n {#if isAndroid}\n \n {replacement_}\n \n {:else}\n \n {/if}\n
        \n\n\n","\n\n
        \n {#each word as ch, i}\n {@const replacement = replacedChars[i]}\n {@const duplicate =\n replacement !== '' && duplicateReplacements.has(replacement)}\n
        \n
        {ch}
        \n \n
        \n {/each}\n
        \n\n\n","\n\n\n \n \n \n \n \n {#each alphabet as ch, i}\n {@const replacementId = `replacement-${i}`}\n {@const isInQuote = frequencies.has(ch)}\n \n \n \n \n \n {/each}\n
        -#🠗
        {ch}{isInQuote ? frequencies.get(ch) : 0}
        \n\n\n","\n\n{#if problem}\n

        Solve this quote by {problem.author}

        \n {#if problem.hint}\n

        HINT: The first word is {problem.hint}

        \n {/if}\n
        \n {#each words as word}\n \n {/each}\n
        \n \n{/if}\n\n\n","\n\n
        \n \n \n
        \n\n\n","\n\n
        \n {#if $id !== ''}\n {#if shareLink}\n \n {:else}\n \n {/if}\n {joinLink}\n {:else}\n

        Acquiring join link...

        \n {/if}\n
        \n\n\n","export const getNumber = (name) => {\n const charactersArray = Array.from(name);\n let charactersCodesSum = 0;\n charactersArray.forEach((charactersArrayItem) => {\n return (charactersCodesSum += charactersArrayItem.charCodeAt(0));\n });\n return charactersCodesSum;\n};\nexport const getModulus = (num, max) => {\n return num % max;\n};\nexport const getDigit = (number, ntn) => {\n return Math.floor((number / Math.pow(10, ntn)) % 10);\n};\nexport const getBoolean = (number, ntn) => {\n return !(getDigit(number, ntn) % 2);\n};\nexport const getAngle = (x, y) => {\n return (Math.atan2(y, x) * 180) / Math.PI;\n};\nexport const getUnit = (number, range, index) => {\n let value = number % range;\n if (index && getDigit(number, index) % 2 === 0) {\n return -value;\n }\n else\n return value;\n};\nexport const getRandomColor = (number, colors, range) => {\n return colors[number % range];\n};\nexport const getContrast = (hexcolor) => {\n // If a leading # is provided, remove it\n if (hexcolor.slice(0, 1) === '#') {\n hexcolor = hexcolor.slice(1);\n }\n // Convert to RGB value\n var r = parseInt(hexcolor.substr(0, 2), 16);\n var g = parseInt(hexcolor.substr(2, 2), 16);\n var b = parseInt(hexcolor.substr(4, 2), 16);\n // Get YIQ ratio\n var yiq = (r * 299 + g * 587 + b * 114) / 1000;\n // Check contrast\n return yiq >= 128 ? 'black' : 'white';\n};\n//# sourceMappingURL=utils.js.map","export const DEFAULTS = {\n colors: ['#92A1C6', '#146A7C', '#F0AB3D', '#C271B4', '#C20D90'],\n name: 'Clara Barton',\n square: false,\n size: 40,\n};\n//# sourceMappingURL=CONSTANTS.js.map","\n\n\n \n \n \n \n \n \n \n {#if data.isMouthOpen}\n \n {:else}\n \n {/if}\n\n \n \n \n \n\n","\n\n
        \n \n
        \n\n\n","\n\n
        \n {#each $users as user}\n \n \n
        \n {#each user.progress ?? emptyProgress as hasFilled}\n
        \n {/each}\n
        \n
        \n {/each}\n
        \n\n\n","\n\n
        \n {#each $users as user}\n \n {:else}\n waiting for some cool cryptographers\n {/each}\n
        \n\n\n","\n\n (focussedOnButton = true)}\n on:blur={() => (focussedOnButton = false)}\n>\n Play\n\n\n\n","\n\n

        \n An aristocrat cryptogram is a quote encrypted by substituting each letter with\n another letter. A patristocrat cryptogram is an aristocrat with all whitespace\n and punctuation removed.\n

        \n

        \n In cryptoduel, you compete with friends to see who can decrypt the quote the\n fastest!\n

        \n{#if verbose}\n

        \n The table given shows the amount of times each character appears in the\n quote as well as the replacement for each character. You may either enter\n replacment characters into the table or under each character of the quote.\n

        \n{/if}\n","\n\n
        \n

        Welcome to Cryptoduel

        \n \"cryptogram\n \n \n Play\n
        \n\n\n","\n\n
        \n \n \n
        \n\n\n","\n\n
        \n
        expanded.update((e) => !e)}>\n \n {title}\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 {#if connectingToHivemind}\n \n Connecting to {hivemindBrain ?? ''}\n \n {:else if $users.length > 0}\n \n \n \n {/if}\n {#if $users.length > 0 && $gameProblem}\n \n \n \n {/if}\n {#if $gameProblem || isHivemindBrain}\n \n {#if $gameProblem}\n progress.set(e.detail.progress)}\n on:solved={() => solved.set(true)}\n on:error\n />\n {/if}\n {#if isHivemindBrain}\n \n {/if}\n \n {/if}\n
        \n\n\n","export const amountQuotes = 4369;\nexport const amountChunks = 9;\n","\n\n\n
        \n {#each rows as row}\n
        \n {#each row as char}\n \n {char}\n
        \n {/each}\n
        \n {/each}\n
        \n \n DELETE\n
        \n \n\n\n\n","\n\n\n\n
        \n {#if $isFirstLaunch}\n \n {:else}\n showError(e.detail)} />\n {/if}\n
        \n
        \n\n\n","import App from './App.svelte';\nimport 'sweetalert2/dist/sweetalert2.min.css';\n\nconst app = new App({\n target: document.body,\n props: {\n name: 'world',\n },\n});\n\nexport default app;\n\n// recreate the whole app if an HMR update touches this module\nif (import.meta.hot) {\n import.meta.hot.dispose(() => {\n app.$destroy();\n });\n import.meta.hot.accept();\n}\n"],"names":["noop","run","fn","blank_object","Object","create","run_all","fns","forEach","is_function","thing","safe_not_equal","a","b","src_url_equal_anchor","current_component","subscribe","store","callbacks","unsub","unsubscribe","get_store_value","value","_","component_subscribe","component","callback","$$","on_destroy","push","create_slot","definition","ctx","$$scope","slot_ctx","get_slot_context","tar","src","k","assign","slice","get_slot_changes","dirty","lets","undefined","merged","len","Math","max","length","i","update_slot_base","slot","slot_definition","slot_changes","get_slot_context_fn","slot_context","p","get_all_dirty_from_scope","append","target","node","appendChild","insert","anchor","insertBefore","detach","parentNode","removeChild","destroy_each","iterations","detaching","d","element","name","document","createElement","svg_element","createElementNS","text","data","createTextNode","space","empty","listen","event","handler","options","addEventListener","removeEventListener","attr","attribute","removeAttribute","getAttribute","setAttribute","set_data","wholeText","set_input_value","input","set_style","key","important","style","removeProperty","setProperty","toggle_class","toggle","classList","set_current_component","get_current_component","Error","onMount","on_mount","createEventDispatcher","type","detail","bubbles","e","createEvent","initCustomEvent","custom_event","call","bubble","this","dirty_components","binding_callbacks","render_callbacks","flush_callbacks","resolved_promise","Promise","resolve","update_scheduled","add_render_callback","add_flush_callback","seen_callbacks","Set","flushidx","flush","saved_component","update","pop","has","add","clear","fragment","before_update","after_update","outroing","outros","group_outros","r","c","check_outros","transition_in","block","local","delete","transition_out","o","bind","index","props","bound","create_component","mount_component","customElement","m","new_on_destroy","map","filter","destroy_component","make_dirty","then","fill","init","instance","create_fragment","not_equal","append_styles","parent_component","on_disconnect","context","Map","skip_bound","root","ready","ret","rest","hydrate","nodes","Array","from","childNodes","children","l","intro","SvelteComponent","$destroy","$on","indexOf","splice","$set","$$props","obj","$$set","keys","module","exports","consolePrefix","uniqueArray","arr","result","capitalizeFirstLetter","str","charAt","toUpperCase","toArray","nodeList","prototype","warn","message","console","concat","join","error","previousWarnOnceMessages","warnOnce","includes","warnAboutDeprecation","deprecatedParam","useInstead","callIfFunction","arg","hasToPromiseFn","toPromise","asPromise","isPromise","defaultParams","title","titleText","html","footer","icon","iconColor","iconHtml","template","toast","showClass","popup","backdrop","hideClass","customClass","color","heightAuto","allowOutsideClick","allowEscapeKey","allowEnterKey","stopKeydownPropagation","keydownListenerCapture","showConfirmButton","showDenyButton","showCancelButton","preConfirm","preDeny","confirmButtonText","confirmButtonAriaLabel","confirmButtonColor","denyButtonText","denyButtonAriaLabel","denyButtonColor","cancelButtonText","cancelButtonAriaLabel","cancelButtonColor","buttonsStyling","reverseButtons","focusConfirm","focusDeny","focusCancel","returnFocus","showCloseButton","closeButtonHtml","closeButtonAriaLabel","loaderHtml","showLoaderOnConfirm","showLoaderOnDeny","imageUrl","imageWidth","imageHeight","imageAlt","timer","timerProgressBar","width","padding","background","inputPlaceholder","inputLabel","inputValue","inputOptions","inputAutoTrim","inputAttributes","inputValidator","returnInputValueOnDeny","validationMessage","grow","position","progressSteps","currentProgressStep","progressStepsDistance","willOpen","didOpen","didRender","willClose","didClose","didDestroy","scrollbarPadding","updatableParams","deprecatedParams","toastIncompatibleParams","isValidParameter","paramName","hasOwnProperty","isUpdatableParameter","isDeprecatedParameter","checkIfParamIsValid","param","checkIfToastParamIsValid","checkIfParamIsDeprecated","showWarningsForParams","params","swalPrefix","prefix","items","swalClasses","iconTypes","getContainer","body","querySelector","container","elementBySelector","selectorString","elementByClass","className","getPopup","getIcon","getTitle","getHtmlContainer","getImage","image","getProgressSteps","getValidationMessage","getConfirmButton","actions","confirm","getDenyButton","deny","getInputLabel","getLoader","loader","getCancelButton","cancel","getActions","getFooter","getTimerProgressBar","getCloseButton","close","focusable","getFocusableElements","focusableElementsWithTabindex","querySelectorAll","sort","tabindexA","parseInt","tabindexB","otherFocusableElements","el","isVisible","isModal","hasClass","shown","isToast","isLoading","hasAttribute","states","previousBodyPadding","setInnerHtml","elem","textContent","parsed","DOMParser","parseFromString","child","split","contains","removeCustomClasses","values","remove","applyCustomClass","addClass","getInput","inputType","checkbox","radio","range","focusInput","focus","val","toggleClass","condition","Boolean","isArray","removeClass","getDirectChildByClass","applyNumericalStyle","property","show","display","arguments","hide","setStyle","parent","selector","offsetWidth","offsetHeight","getClientRects","allButtonsAreHidden","isScrollable","scrollHeight","clientHeight","hasCssAnimation","window","getComputedStyle","animDuration","parseFloat","getPropertyValue","transDuration","animateTimerProgressBar","reset","transition","setTimeout","stopTimerProgressBar","timerProgressBarWidth","timerProgressBarPercent","isNodeEnv","RESTORE_FOCUS_TIMEOUT","globalState","focusPreviousActiveElement","previousActiveElement","restoreActiveElement","x","scrollX","y","scrollY","restoreFocusTimeout","scrollTo","sweetHTML","file","select","label","textarea","replace","resetOldContainer","oldContainer","documentElement","resetValidationMessage","currentInstance","addInputChangeListeners","rangeOutput","oninput","onchange","nextSibling","getTarget","setupAccessibility","setupRTL","targetElement","direction","rtl","oldContainerExisted","parseHtmlToContainer","HTMLElement","handleObject","jquery","handleJqueryElem","toString","cloneNode","animationEndEvent","testEl","transEndEventNames","WebkitAnimation","animation","measureScrollbar","scrollDiv","scrollbarWidth","getBoundingClientRect","clientWidth","renderActions","renderButtons","confirmButton","denyButton","cancelButton","renderButton","handleButtonsStyling","styled","backgroundColor","button","buttonType","handleBackdropParam","handlePositionParam","center","handleGrowParam","growClass","renderContainer","privateProps","awaitingPromise","WeakMap","promise","innerParams","domCache","inputTypes","renderInput","get","rerender","inputClass","inputContainer","setAttributes","showInput","setCustomClass","renderInputType","getInputContainer","removeAttributes","attributes","attrName","setInputPlaceholder","placeholder","setInputLabel","prependTo","id","labelClass","innerText","insertAdjacentElement","email","password","number","tel","url","rangeInput","disabled","selected","checkboxContainer","checked","getMargin","marginLeft","marginRight","initialPopupWidth","MutationObserver","textareaWidth","observe","attributeFilter","renderContent","htmlContainer","renderFooter","renderCloseButton","closeButton","renderIcon","setContent","applyStyles","iconType","setColor","adjustSuccessIconBackgroundColor","popupBackgroundColor","successIconParts","successIconHtml","errorIconHtml","iconContent","question","warning","info","borderColor","sel","content","renderImage","createStepElement","step","stepEl","createLineElement","lineEl","renderProgressSteps","progressStepsContainer","renderTitle","renderPopup","addClasses","modal","render","DismissReason","freeze","esc","setAriaHidden","unsetAriaHidden","swalStringParams","getTemplateParams","templateContent","showWarningsForElements","getSwalParams","getSwalButtons","getSwalImage","getSwalIcon","getSwalInput","getSwalStringParams","showWarningsForAttributes","JSON","parse","innerHTML","option","optionValue","optionName","paramNames","tag","trim","allowedElements","tagName","toLowerCase","allowedAttributes","defaultInputValidators","string","test","setDefaultInputValidators","validateCustomTargetElement","setParameters","Timer","constructor","delay","remaining","running","start","started","Date","stop","clearTimeout","getTime","increase","n","getTimerLeft","isRunning","fixScrollbar","innerHeight","paddingRight","undoScrollbar","iOSfix","navigator","userAgent","MSStream","platform","maxTouchPoints","iosfix","offset","scrollTop","top","lockBodyScroll","addBottomPaddingForTallPopups","ua","iOS","match","webkit","bottomPanelHeight","paddingBottom","preventTouchMove","ontouchstart","shouldPreventTouchMove","ontouchmove","preventDefault","stopPropagation","isStylus","isZoom","touches","touchType","undoIOSfix","SHOW_CLASS_TIMEOUT","openPopup","initialBodyOverflow","overflowY","addClasses$1","setScrollingVisibility","fixScrollContainer","activeElement","swalOpenAnimationFinished","showLoading","buttonToReplace","Swal","replaceButton","loading","handleInputOptionsAndValue","handleInputOptions","handleInputValue","getInputValue","getCheckboxValue","getRadioValue","getFileValue","files","processInputOptions","populateInputOptions","formatInputOptions","hideLoading","catch","err","renderOption","optionLabel","isSelected","inputOption","optgroup","radioValue","radioLabel","radioInput","radioLabelElement","radios","valueFormatted","showRelatedButton","getElementsByClassName","getInput$1","privateMethods","swalPromiseResolve","swalPromiseReject","isVisible$1","clickConfirm","click","clickDeny","clickCancel","removeKeydownHandler","keydownTarget","keydownHandlerAdded","keydownHandler","capture","addKeydownHandler","dismissWith","setFocus","increment","focusableElements","arrowKeysNextButton","arrowKeysPreviousButton","isComposing","keyCode","handleEnter","handleTab","handleArrows","handleEsc","outerHTML","btnIndex","shiftKey","sibling","buttonToFocus","HTMLButtonElement","removePopupAndResetState","triggerDidCloseAndDispose","removeBodyClasses","resolveValue","prepareResolveValue","triggerClosePopup","isAwaitingPromise","isDismissed","handleAwaitingPromise","handlePopupAnimation","rejectPromise","_destroy","isConfirmed","isDenied","animationIsSupported","animatePopup","swalCloseEventFinishedCallback","setButtonsDisabled","buttons","setInputDisabled","enableButtons","disableButtons","enableInput","disableInput","showValidationMessage","inputerror","resetValidationMessage$1","getProgressSteps$1","validUpdatableParams","filterValidParams","updatedParams","set","defineProperties","writable","enumerable","deferDisposalTimer","disposeSwal","disposeWeakMaps","unsetWeakMaps","instanceMethods","disableLoading","closePopup","closeModal","closeToast","handleConfirmButtonClick","handleConfirmOrDenyWithInput","handleDenyButtonClick","handleCancelButtonClick","handleInputValidator","checkValidity","preDenyValue","error$$1","rejectWith","succeedWith","preConfirmValue","handlePopupClick","handleToastClick","handleModalMousedown","handleContainerMousedown","handleModalClick","onclick","isAnyButtonShown","ignoreOutsideClick","onmousedown","onmouseup","isJqueryElement","isElement","Element","argsToParams","args","fire","_len","_key","mixin","mixinParams","MixinSwal","_main","priorityMixinParams","super","timeout","stopTimer","resumeTimer","toggleTimer","increaseTimer","isTimerRunning","bodyClickListenerAdded","clickHandlers","bindClickHandler","bodyClickListener","staticMethods","enableLoading","SweetAlert","outerParams","configurable","userParams","prepareParams","populateDomCache","swalPromise","onFulfilled","finally","onFinally","reject","dismiss","setupTimer","initFocus","templateParams","globalState$$1","focusButton","blurActiveElement","blur","version","default","factory","Sweetalert2","swal","sweetAlert","t","getElementsByTagName","styleSheet","cssText","subscriber_queue","subscribers","new_value","run_queue","subscriber","invalidate","size","derived","stores","initial_value","single","stores_array","auto","inited","pending","cleanup","sync","unsubscribers","initialValue","browser","localStorage","updateStorage","key2","setItem","stringify","internal","set2","json","getItem","handleStorage","newValue","updater","external","Peer","Messages","hivemindBrain","URLSearchParams","location","search","isHivemindBrain","isAndroid","Errors","alphabet","noshow","congratulationTitles","users","progress","solved","gameProblem","lswritable","floor","random","patristocratEnabled","hintEnabled","hivemindConnection","isFirstLaunch","needsKeyboardEntry","focussedKey","connections","keyboardSubscriptions","self","problemStart","$gp","now","timeTakenByOpponents","$users","$problemStart","u","padTime","num","padStart","fmtTime","ms","hours","minutes","seconds","peer","dataResponders","problem","ourId","openConnection","conn","res","on","otherId","removePlayer","send","sendInitialState","emit","msg","$id","connect","subscriptions","$self","$problem","us","_classCallCheck","Constructor","TypeError","_defineProperties","descriptor","defineProperty","_createClass","protoProps","staticProps","normalizeComputedStyleValue","generateRandomNumber","min","fractionDigits","randomNumber","pow","generateRandomArrayElement","$cryptoduel$subscriptions","DEFAULT_CONFETTI_COLORS","getWindowWidthCoefficient","canvasWidth","log","ConfettiShape","initialPosition","confettiRadius","confettiColors","emojis","emojiSize","initialSpeed","confettiSpeed","finalConfettiSpeedX","rotationSpeed","dragForceCoefficient","radius","initialRadius","rotationAngle","emojiRotationAngle","PI","radiusYUpdateDirection","angle","absCos","abs","cos","absSin","sin","positionShift","shiftedInitialPosition","currentPosition","emoji","createdAt","canvasContext","dpr","devicePixelRatio","fillStyle","beginPath","ellipse","font","save","translate","rotate","textAlign","fillText","restore","iterationTimeDelta","currentTime","timeDeltaSinceCreation","canvasHeight","createCanvas","canvas","height","left","zIndex","pointerEvents","normalizeConfettiConfig","confettiConfig","_confettiConfig$confe","_confettiConfig$confe2","confettiNumber","confettiesNumber","_confettiConfig$confe3","_confettiConfig$emoji","emojies","_confettiConfig$emoji2","ConfettiBatch","_this","shapes","completionCallback","resolvePromise","_this$shapes","apply","_a","time","cleanupInvisibleShapes","_this2","timeDelta","shape","updatePosition","draw","getIsVisibleOnCanvas","JSConfetti","jsConfettiConfig","activeConfettiBatches","getContext","requestAnimationFrameRequested","lastUpdated","iterationIndex","loop","requestAnimationFrame","computedStyles","batch","processShapes","complete","queueAnimationFrameIfNeeded","_normalizeConfettiCon","canvasRect","yPosition","leftConfettiPosition","rightConfettiPosition","confettiGroup","confettiOnTheRight","confettiOnTheLeft","addShapes","getBatchCompletePromise","getCongratulationsTitle","choose","confetti","ConfettiGenerator","$cryptoduel$confetti","keebSub","shuffleArray","generateRandomEncryption","encMap","some","toAristocratCipher","quote","plaintext","encryptionAlphabet","ciphertext","char","hint","splitQuote","patristify","alphabetChars","cleanUpText","replaceableElementDefaultOptions","ogchar","dispatch","_detail","replaceableElement","options_","setProperties","onKeyDown","to","newOptions","destroy","action_result","div","create_if_block","svelte_element","create_dynamic_element","focussedKeys","replacement","disableUnderline","focussed","listener","subscriptionId","subscribeToKeyboard","$$invalidate","replacement_","constants_0","child_ctx","constants_1","div1","div0","t0","t0_value","replacementcharacter_changes","each_blocks","word","replacedChars","ch","alphabetIdx","replaceChars","duplicateReplacements","duplicates","visited","entry","getDuplicates","tr","td0","td1","t2","t2_value","table","td2","frequencies","it","count","item","getCounts","t1_value","author","if_block","create_if_block_1","current","t1","replacementtable_changes","getProgress","words","every","isCorrect","newReplacement","input_disabled_value","label_1","gp","$name","t_value","id_","clicked","shareLink","joinLink","href","encodeURIComponent","getJoinLink","clipboard","writeText","share","getDigit","ntn","getBoolean","getUnit","getRandomColor","colors","DEFAULTS","square","path","mouthSpread","faceColor","isMouthOpen","SIZE","rect0","rect0_rx_value","rect1","rect2","wrapperTranslateX","wrapperTranslateY","wrapperRotate","wrapperScale","wrapperColor","isCircle","eyeSpread","rect3","rect4","g0","faceTranslateX","faceTranslateY","faceRotate","svg","mask","g1","numFromName","charactersArray","charactersCodesSum","charactersArrayItem","charCodeAt","getNumber","preTranslateX","preTranslateY","hexcolor","substr","generateData","userbubble","UserBubble","userbubble_changes","emptyProgress","$gameProblem","span","each_1_else","users_","passive","exiting","startingExit","handleExtensionWait","handleHasExtended","focussedOnButton","extendHandleId","extendHandle","override","extended","p0","p1","verbose","element_src","h1","img","div2","span0","span1","flyInMs","closed","dense","expanded","$expanded","style_","checkbox0_changes","checkbox1_changes","create_if_block_2","if_block1","create_if_block_3","if_block2","getNewQuote","quoteIndex","chunk","fetch","async","quotes","quoteAuthor","quoteText","getQuoteGenerator","createProblem","$patristocratEnabled","toPatristocratCipher","$hintEnabled","connectingToHivemind","$hivemindConnection","rows","active","mounted","$needsKeyboardEntry","scrollBy","behavior","cb","main","timeTaken","$solved","addConfetti","errKey","getErrLocalstorageKey","showError","app","hot","dispose","accept"],"mappings":"gCAAA,SAASA,KAgBT,SAASC,EAAIC,GACT,OAAOA,IAEX,SAASC,IACL,OAAOC,OAAOC,OAAO,MAEzB,SAASC,EAAQC,GACbA,EAAIC,QAAQP,GAEhB,SAASQ,EAAYC,GACjB,MAAwB,mBAAVA,EAElB,SAASC,EAAeC,EAAGC,GACvB,OAAOD,GAAKA,EAAIC,GAAKA,EAAID,IAAMC,GAAOD,GAAkB,iBAANA,GAAgC,mBAANA,EAEhF,IAAIE,EA84BAC,EA33BJ,SAASC,EAAUC,KAAUC,GACzB,GAAa,MAATD,EACA,OAAOjB,EAEX,MAAMmB,EAAQF,EAAMD,aAAaE,GACjC,OAAOC,EAAMC,YAAc,IAAMD,EAAMC,cAAgBD,EAE3D,SAASE,EAAgBJ,GACrB,IAAIK,EAEJ,OADAN,EAAUC,GAAOM,GAAKD,EAAQC,GAA9BP,GACOM,EAEX,SAASE,EAAoBC,EAAWR,EAAOS,GAC3CD,EAAUE,GAAGC,WAAWC,KAAKb,EAAUC,EAAOS,IAElD,SAASI,EAAYC,EAAYC,EAAKC,EAAS/B,GAC3C,GAAI6B,EAAY,C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ChBO,eAAgB,sCAChBD,mBAAoB,uBACpBG,gBAAiB,eAChBjG,MAAMtB,IACHA,EAAEomB,UACJ+H,aAAaG,QAAQwZ,EAAQpY,QuB/BRsY,CAAUjqC,EAAEF,SCpBlC,MAACoqC,GAAM,oEAAQ,CAClB3tC,OAAQe,SAASoQ,KACjB9K,MAAO,CACLvF,KAAM,iBAOY,oBAAXoI,QAA0BA,OAAO0kC,MACxB,oBAAX1kC,QAA0BA,OAAO0kC,IAAIC,SAAQ,KAClDF,GAAIllC,cAEY,oBAAXS,QAA0BA,OAAO0kC,IAAIE"} \ No newline at end of file +{"version":3,"file":"bundle.js","sources":["../../node_modules/svelte/internal/index.mjs","../../node_modules/sweetalert2/dist/sweetalert2.all.js","../../node_modules/svelte/store/index.mjs","../../node_modules/svelte-local-storage-store/dist/index.mjs","../../src/js/constants.js","../../src/js/store.js","../../src/js/utils.js","../../src/js/networking.js","../../node_modules/js-confetti/dist/es/index.js","../../src/js/cryptoduelutils.js","../../src/js/actions.js","../../src/js/quotes.js","../../src/js/use.js","../../src/components/ReplacementCharacter.svelte","../../src/components/Word.svelte","../../src/components/ReplacementTable.svelte","../../src/components/CryptogramSolver.svelte","../../src/components/NameChooser.svelte","../../src/components/JoinLink.svelte","../../node_modules/svelte-boring-avatars/dist/lib/utils.js","../../node_modules/svelte-boring-avatars/dist/lib/components/CONSTANTS.js","../../node_modules/svelte-boring-avatars/dist/lib/components/AvatarBeam.svelte","../../src/components/UserBubble.svelte","../../src/components/OpponentProgress.svelte","../../src/components/Lobby.svelte","../../src/components/BulletButton.svelte","../../src/components/HelpInfo.svelte","../../src/components/FirstLaunchPrompt.svelte","../../src/components/Checkbox.svelte","../../src/components/Panel.svelte","../../src/components/Game.svelte","../../src/js/meta.js","../../src/components/Keyboard.svelte","../../src/views/index/App.svelte","../../src/views/index/index.js"],"sourcesContent":["function noop() { }\nconst identity = x => x;\nfunction assign(tar, src) {\n // @ts-ignore\n for (const k in src)\n tar[k] = src[k];\n return tar;\n}\nfunction is_promise(value) {\n return value && typeof value === 'object' && typeof value.then === 'function';\n}\nfunction add_location(element, file, line, column, char) {\n element.__svelte_meta = {\n loc: { file, line, column, char }\n };\n}\nfunction run(fn) {\n return fn();\n}\nfunction blank_object() {\n return Object.create(null);\n}\nfunction run_all(fns) {\n fns.forEach(run);\n}\nfunction is_function(thing) {\n return typeof thing === 'function';\n}\nfunction safe_not_equal(a, b) {\n return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');\n}\nlet src_url_equal_anchor;\nfunction src_url_equal(element_src, url) {\n if (!src_url_equal_anchor) {\n src_url_equal_anchor = document.createElement('a');\n }\n src_url_equal_anchor.href = url;\n return element_src === src_url_equal_anchor.href;\n}\nfunction not_equal(a, b) {\n return a != a ? b == b : a !== b;\n}\nfunction is_empty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction validate_store(store, name) {\n if (store != null && typeof store.subscribe !== 'function') {\n throw new Error(`'${name}' is not a store with a 'subscribe' method`);\n }\n}\nfunction subscribe(store, ...callbacks) {\n if (store == null) {\n return noop;\n }\n const unsub = store.subscribe(...callbacks);\n return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\nfunction get_store_value(store) {\n let value;\n subscribe(store, _ => value = _)();\n return value;\n}\nfunction component_subscribe(component, store, callback) {\n component.$$.on_destroy.push(subscribe(store, callback));\n}\nfunction create_slot(definition, ctx, $$scope, fn) {\n if (definition) {\n const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n return definition[0](slot_ctx);\n }\n}\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n return definition[1] && fn\n ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))\n : $$scope.ctx;\n}\nfunction get_slot_changes(definition, $$scope, dirty, fn) {\n if (definition[2] && fn) {\n const lets = definition[2](fn(dirty));\n if ($$scope.dirty === undefined) {\n return lets;\n }\n if (typeof lets === 'object') {\n const merged = [];\n const len = Math.max($$scope.dirty.length, lets.length);\n for (let i = 0; i < len; i += 1) {\n merged[i] = $$scope.dirty[i] | lets[i];\n }\n return merged;\n }\n return $$scope.dirty | lets;\n }\n return $$scope.dirty;\n}\nfunction update_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn) {\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\n}\nfunction update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n update_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn);\n}\nfunction get_all_dirty_from_scope($$scope) {\n if ($$scope.ctx.length > 32) {\n const dirty = [];\n const length = $$scope.ctx.length / 32;\n for (let i = 0; i < length; i++) {\n dirty[i] = -1;\n }\n return dirty;\n }\n return -1;\n}\nfunction exclude_internal_props(props) {\n const result = {};\n for (const k in props)\n if (k[0] !== '$')\n result[k] = props[k];\n return result;\n}\nfunction compute_rest_props(props, keys) {\n const rest = {};\n keys = new Set(keys);\n for (const k in props)\n if (!keys.has(k) && k[0] !== '$')\n rest[k] = props[k];\n return rest;\n}\nfunction compute_slots(slots) {\n const result = {};\n for (const key in slots) {\n result[key] = true;\n }\n return result;\n}\nfunction once(fn) {\n let ran = false;\n return function (...args) {\n if (ran)\n return;\n ran = true;\n fn.call(this, ...args);\n };\n}\nfunction null_to_empty(value) {\n return value == null ? '' : value;\n}\nfunction set_store_value(store, ret, value) {\n store.set(value);\n return ret;\n}\nconst has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\nfunction action_destroyer(action_result) {\n return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\n\nconst is_client = typeof window !== 'undefined';\nlet now = is_client\n ? () => window.performance.now()\n : () => Date.now();\nlet raf = is_client ? cb => requestAnimationFrame(cb) : noop;\n// used internally for testing\nfunction set_now(fn) {\n now = fn;\n}\nfunction set_raf(fn) {\n raf = fn;\n}\n\nconst tasks = new Set();\nfunction run_tasks(now) {\n tasks.forEach(task => {\n if (!task.c(now)) {\n tasks.delete(task);\n task.f();\n }\n });\n if (tasks.size !== 0)\n raf(run_tasks);\n}\n/**\n * For testing purposes only!\n */\nfunction clear_loops() {\n tasks.clear();\n}\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n */\nfunction loop(callback) {\n let task;\n if (tasks.size === 0)\n raf(run_tasks);\n return {\n promise: new Promise(fulfill => {\n tasks.add(task = { c: callback, f: fulfill });\n }),\n abort() {\n tasks.delete(task);\n }\n };\n}\n\n// Track which nodes are claimed during hydration. Unclaimed nodes can then be removed from the DOM\n// at the end of hydration without touching the remaining nodes.\nlet is_hydrating = false;\nfunction start_hydrating() {\n is_hydrating = true;\n}\nfunction end_hydrating() {\n is_hydrating = false;\n}\nfunction upper_bound(low, high, key, value) {\n // Return first index of value larger than input value in the range [low, high)\n while (low < high) {\n const mid = low + ((high - low) >> 1);\n if (key(mid) <= value) {\n low = mid + 1;\n }\n else {\n high = mid;\n }\n }\n return low;\n}\nfunction init_hydrate(target) {\n if (target.hydrate_init)\n return;\n target.hydrate_init = true;\n // We know that all children have claim_order values since the unclaimed have been detached if target is not \n let children = target.childNodes;\n // If target is , there may be children without claim_order\n if (target.nodeName === 'HEAD') {\n const myChildren = [];\n for (let i = 0; i < children.length; i++) {\n const node = children[i];\n if (node.claim_order !== undefined) {\n myChildren.push(node);\n }\n }\n children = myChildren;\n }\n /*\n * Reorder claimed children optimally.\n * We can reorder claimed children optimally by finding the longest subsequence of\n * nodes that are already claimed in order and only moving the rest. The longest\n * subsequence subsequence of nodes that are claimed in order can be found by\n * computing the longest increasing subsequence of .claim_order values.\n *\n * This algorithm is optimal in generating the least amount of reorder operations\n * possible.\n *\n * Proof:\n * We know that, given a set of reordering operations, the nodes that do not move\n * always form an increasing subsequence, since they do not move among each other\n * meaning that they must be already ordered among each other. Thus, the maximal\n * set of nodes that do not move form a longest increasing subsequence.\n */\n // Compute longest increasing subsequence\n // m: subsequence length j => index k of smallest value that ends an increasing subsequence of length j\n const m = new Int32Array(children.length + 1);\n // Predecessor indices + 1\n const p = new Int32Array(children.length);\n m[0] = -1;\n let longest = 0;\n for (let i = 0; i < children.length; i++) {\n const current = children[i].claim_order;\n // Find the largest subsequence length such that it ends in a value less than our current value\n // upper_bound returns first greater value, so we subtract one\n // with fast path for when we are on the current longest subsequence\n const seqLen = ((longest > 0 && children[m[longest]].claim_order <= current) ? longest + 1 : upper_bound(1, longest, idx => children[m[idx]].claim_order, current)) - 1;\n p[i] = m[seqLen] + 1;\n const newLen = seqLen + 1;\n // We can guarantee that current is the smallest value. Otherwise, we would have generated a longer sequence.\n m[newLen] = i;\n longest = Math.max(newLen, longest);\n }\n // The longest increasing subsequence of nodes (initially reversed)\n const lis = [];\n // The rest of the nodes, nodes that will be moved\n const toMove = [];\n let last = children.length - 1;\n for (let cur = m[longest] + 1; cur != 0; cur = p[cur - 1]) {\n lis.push(children[cur - 1]);\n for (; last >= cur; last--) {\n toMove.push(children[last]);\n }\n last--;\n }\n for (; last >= 0; last--) {\n toMove.push(children[last]);\n }\n lis.reverse();\n // We sort the nodes being moved to guarantee that their insertion order matches the claim order\n toMove.sort((a, b) => a.claim_order - b.claim_order);\n // Finally, we move the nodes\n for (let i = 0, j = 0; i < toMove.length; i++) {\n while (j < lis.length && toMove[i].claim_order >= lis[j].claim_order) {\n j++;\n }\n const anchor = j < lis.length ? lis[j] : null;\n target.insertBefore(toMove[i], anchor);\n }\n}\nfunction append(target, node) {\n target.appendChild(node);\n}\nfunction append_styles(target, style_sheet_id, styles) {\n const append_styles_to = get_root_for_style(target);\n if (!append_styles_to.getElementById(style_sheet_id)) {\n const style = element('style');\n style.id = style_sheet_id;\n style.textContent = styles;\n append_stylesheet(append_styles_to, style);\n }\n}\nfunction get_root_for_style(node) {\n if (!node)\n return document;\n const root = node.getRootNode ? node.getRootNode() : node.ownerDocument;\n if (root && root.host) {\n return root;\n }\n return node.ownerDocument;\n}\nfunction append_empty_stylesheet(node) {\n const style_element = element('style');\n append_stylesheet(get_root_for_style(node), style_element);\n return style_element.sheet;\n}\nfunction append_stylesheet(node, style) {\n append(node.head || node, style);\n}\nfunction append_hydration(target, node) {\n if (is_hydrating) {\n init_hydrate(target);\n if ((target.actual_end_child === undefined) || ((target.actual_end_child !== null) && (target.actual_end_child.parentElement !== target))) {\n target.actual_end_child = target.firstChild;\n }\n // Skip nodes of undefined ordering\n while ((target.actual_end_child !== null) && (target.actual_end_child.claim_order === undefined)) {\n target.actual_end_child = target.actual_end_child.nextSibling;\n }\n if (node !== target.actual_end_child) {\n // We only insert if the ordering of this node should be modified or the parent node is not target\n if (node.claim_order !== undefined || node.parentNode !== target) {\n target.insertBefore(node, target.actual_end_child);\n }\n }\n else {\n target.actual_end_child = node.nextSibling;\n }\n }\n else if (node.parentNode !== target || node.nextSibling !== null) {\n target.appendChild(node);\n }\n}\nfunction insert(target, node, anchor) {\n target.insertBefore(node, anchor || null);\n}\nfunction insert_hydration(target, node, anchor) {\n if (is_hydrating && !anchor) {\n append_hydration(target, node);\n }\n else if (node.parentNode !== target || node.nextSibling != anchor) {\n target.insertBefore(node, anchor || null);\n }\n}\nfunction detach(node) {\n node.parentNode.removeChild(node);\n}\nfunction destroy_each(iterations, detaching) {\n for (let i = 0; i < iterations.length; i += 1) {\n if (iterations[i])\n iterations[i].d(detaching);\n }\n}\nfunction element(name) {\n return document.createElement(name);\n}\nfunction element_is(name, is) {\n return document.createElement(name, { is });\n}\nfunction object_without_properties(obj, exclude) {\n const target = {};\n for (const k in obj) {\n if (has_prop(obj, k)\n // @ts-ignore\n && exclude.indexOf(k) === -1) {\n // @ts-ignore\n target[k] = obj[k];\n }\n }\n return target;\n}\nfunction svg_element(name) {\n return document.createElementNS('http://www.w3.org/2000/svg', name);\n}\nfunction text(data) {\n return document.createTextNode(data);\n}\nfunction space() {\n return text(' ');\n}\nfunction empty() {\n return text('');\n}\nfunction listen(node, event, handler, options) {\n node.addEventListener(event, handler, options);\n return () => node.removeEventListener(event, handler, options);\n}\nfunction prevent_default(fn) {\n return function (event) {\n event.preventDefault();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction stop_propagation(fn) {\n return function (event) {\n event.stopPropagation();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction self(fn) {\n return function (event) {\n // @ts-ignore\n if (event.target === this)\n fn.call(this, event);\n };\n}\nfunction trusted(fn) {\n return function (event) {\n // @ts-ignore\n if (event.isTrusted)\n fn.call(this, event);\n };\n}\nfunction attr(node, attribute, value) {\n if (value == null)\n node.removeAttribute(attribute);\n else if (node.getAttribute(attribute) !== value)\n node.setAttribute(attribute, value);\n}\nfunction set_attributes(node, attributes) {\n // @ts-ignore\n const descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n for (const key in attributes) {\n if (attributes[key] == null) {\n node.removeAttribute(key);\n }\n else if (key === 'style') {\n node.style.cssText = attributes[key];\n }\n else if (key === '__value') {\n node.value = node[key] = attributes[key];\n }\n else if (descriptors[key] && descriptors[key].set) {\n node[key] = attributes[key];\n }\n else {\n attr(node, key, attributes[key]);\n }\n }\n}\nfunction set_svg_attributes(node, attributes) {\n for (const key in attributes) {\n attr(node, key, attributes[key]);\n }\n}\nfunction set_custom_element_data(node, prop, value) {\n if (prop in node) {\n node[prop] = typeof node[prop] === 'boolean' && value === '' ? true : value;\n }\n else {\n attr(node, prop, value);\n }\n}\nfunction xlink_attr(node, attribute, value) {\n node.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\nfunction get_binding_group_value(group, __value, checked) {\n const value = new Set();\n for (let i = 0; i < group.length; i += 1) {\n if (group[i].checked)\n value.add(group[i].__value);\n }\n if (!checked) {\n value.delete(__value);\n }\n return Array.from(value);\n}\nfunction to_number(value) {\n return value === '' ? null : +value;\n}\nfunction time_ranges_to_array(ranges) {\n const array = [];\n for (let i = 0; i < ranges.length; i += 1) {\n array.push({ start: ranges.start(i), end: ranges.end(i) });\n }\n return array;\n}\nfunction children(element) {\n return Array.from(element.childNodes);\n}\nfunction init_claim_info(nodes) {\n if (nodes.claim_info === undefined) {\n nodes.claim_info = { last_index: 0, total_claimed: 0 };\n }\n}\nfunction claim_node(nodes, predicate, processNode, createNode, dontUpdateLastIndex = false) {\n // Try to find nodes in an order such that we lengthen the longest increasing subsequence\n init_claim_info(nodes);\n const resultNode = (() => {\n // We first try to find an element after the previous one\n for (let i = nodes.claim_info.last_index; i < nodes.length; i++) {\n const node = nodes[i];\n if (predicate(node)) {\n const replacement = processNode(node);\n if (replacement === undefined) {\n nodes.splice(i, 1);\n }\n else {\n nodes[i] = replacement;\n }\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n return node;\n }\n }\n // Otherwise, we try to find one before\n // We iterate in reverse so that we don't go too far back\n for (let i = nodes.claim_info.last_index - 1; i >= 0; i--) {\n const node = nodes[i];\n if (predicate(node)) {\n const replacement = processNode(node);\n if (replacement === undefined) {\n nodes.splice(i, 1);\n }\n else {\n nodes[i] = replacement;\n }\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n else if (replacement === undefined) {\n // Since we spliced before the last_index, we decrease it\n nodes.claim_info.last_index--;\n }\n return node;\n }\n }\n // If we can't find any matching node, we create a new one\n return createNode();\n })();\n resultNode.claim_order = nodes.claim_info.total_claimed;\n nodes.claim_info.total_claimed += 1;\n return resultNode;\n}\nfunction claim_element_base(nodes, name, attributes, create_element) {\n return claim_node(nodes, (node) => node.nodeName === name, (node) => {\n const remove = [];\n for (let j = 0; j < node.attributes.length; j++) {\n const attribute = node.attributes[j];\n if (!attributes[attribute.name]) {\n remove.push(attribute.name);\n }\n }\n remove.forEach(v => node.removeAttribute(v));\n return undefined;\n }, () => create_element(name));\n}\nfunction claim_element(nodes, name, attributes) {\n return claim_element_base(nodes, name, attributes, element);\n}\nfunction claim_svg_element(nodes, name, attributes) {\n return claim_element_base(nodes, name, attributes, svg_element);\n}\nfunction claim_text(nodes, data) {\n return claim_node(nodes, (node) => node.nodeType === 3, (node) => {\n const dataStr = '' + data;\n if (node.data.startsWith(dataStr)) {\n if (node.data.length !== dataStr.length) {\n return node.splitText(dataStr.length);\n }\n }\n else {\n node.data = dataStr;\n }\n }, () => text(data), true // Text nodes should not update last index since it is likely not worth it to eliminate an increasing subsequence of actual elements\n );\n}\nfunction claim_space(nodes) {\n return claim_text(nodes, ' ');\n}\nfunction find_comment(nodes, text, start) {\n for (let i = start; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeType === 8 /* comment node */ && node.textContent.trim() === text) {\n return i;\n }\n }\n return nodes.length;\n}\nfunction claim_html_tag(nodes) {\n // find html opening tag\n const start_index = find_comment(nodes, 'HTML_TAG_START', 0);\n const end_index = find_comment(nodes, 'HTML_TAG_END', start_index);\n if (start_index === end_index) {\n return new HtmlTagHydration();\n }\n init_claim_info(nodes);\n const html_tag_nodes = nodes.splice(start_index, end_index - start_index + 1);\n detach(html_tag_nodes[0]);\n detach(html_tag_nodes[html_tag_nodes.length - 1]);\n const claimed_nodes = html_tag_nodes.slice(1, html_tag_nodes.length - 1);\n for (const n of claimed_nodes) {\n n.claim_order = nodes.claim_info.total_claimed;\n nodes.claim_info.total_claimed += 1;\n }\n return new HtmlTagHydration(claimed_nodes);\n}\nfunction set_data(text, data) {\n data = '' + data;\n if (text.wholeText !== data)\n text.data = data;\n}\nfunction set_input_value(input, value) {\n input.value = value == null ? '' : value;\n}\nfunction set_input_type(input, type) {\n try {\n input.type = type;\n }\n catch (e) {\n // do nothing\n }\n}\nfunction set_style(node, key, value, important) {\n if (value === null) {\n node.style.removeProperty(key);\n }\n else {\n node.style.setProperty(key, value, important ? 'important' : '');\n }\n}\nfunction select_option(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n if (option.__value === value) {\n option.selected = true;\n return;\n }\n }\n select.selectedIndex = -1; // no option should be selected\n}\nfunction select_options(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n option.selected = ~value.indexOf(option.__value);\n }\n}\nfunction select_value(select) {\n const selected_option = select.querySelector(':checked') || select.options[0];\n return selected_option && selected_option.__value;\n}\nfunction select_multiple_value(select) {\n return [].map.call(select.querySelectorAll(':checked'), option => option.__value);\n}\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\nlet crossorigin;\nfunction is_crossorigin() {\n if (crossorigin === undefined) {\n crossorigin = false;\n try {\n if (typeof window !== 'undefined' && window.parent) {\n void window.parent.document;\n }\n }\n catch (error) {\n crossorigin = true;\n }\n }\n return crossorigin;\n}\nfunction add_resize_listener(node, fn) {\n const computed_style = getComputedStyle(node);\n if (computed_style.position === 'static') {\n node.style.position = 'relative';\n }\n const iframe = element('iframe');\n iframe.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' +\n 'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;');\n iframe.setAttribute('aria-hidden', 'true');\n iframe.tabIndex = -1;\n const crossorigin = is_crossorigin();\n let unsubscribe;\n if (crossorigin) {\n iframe.src = \"data:text/html,\";\n unsubscribe = listen(window, 'message', (event) => {\n if (event.source === iframe.contentWindow)\n fn();\n });\n }\n else {\n iframe.src = 'about:blank';\n iframe.onload = () => {\n unsubscribe = listen(iframe.contentWindow, 'resize', fn);\n };\n }\n append(node, iframe);\n return () => {\n if (crossorigin) {\n unsubscribe();\n }\n else if (unsubscribe && iframe.contentWindow) {\n unsubscribe();\n }\n detach(iframe);\n };\n}\nfunction toggle_class(element, name, toggle) {\n element.classList[toggle ? 'add' : 'remove'](name);\n}\nfunction custom_event(type, detail, bubbles = false) {\n const e = document.createEvent('CustomEvent');\n e.initCustomEvent(type, bubbles, false, detail);\n return e;\n}\nfunction query_selector_all(selector, parent = document.body) {\n return Array.from(parent.querySelectorAll(selector));\n}\nclass HtmlTag {\n constructor() {\n this.e = this.n = null;\n }\n c(html) {\n this.h(html);\n }\n m(html, target, anchor = null) {\n if (!this.e) {\n this.e = element(target.nodeName);\n this.t = target;\n this.c(html);\n }\n this.i(anchor);\n }\n h(html) {\n this.e.innerHTML = html;\n this.n = Array.from(this.e.childNodes);\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert(this.t, this.n[i], anchor);\n }\n }\n p(html) {\n this.d();\n this.h(html);\n this.i(this.a);\n }\n d() {\n this.n.forEach(detach);\n }\n}\nclass HtmlTagHydration extends HtmlTag {\n constructor(claimed_nodes) {\n super();\n this.e = this.n = null;\n this.l = claimed_nodes;\n }\n c(html) {\n if (this.l) {\n this.n = this.l;\n }\n else {\n super.c(html);\n }\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert_hydration(this.t, this.n[i], anchor);\n }\n }\n}\nfunction attribute_to_object(attributes) {\n const result = {};\n for (const attribute of attributes) {\n result[attribute.name] = attribute.value;\n }\n return result;\n}\nfunction get_custom_elements_slots(element) {\n const result = {};\n element.childNodes.forEach((node) => {\n result[node.slot || 'default'] = true;\n });\n return result;\n}\n\n// we need to store the information for multiple documents because a Svelte application could also contain iframes\n// https://github.com/sveltejs/svelte/issues/3624\nconst managed_styles = new Map();\nlet active = 0;\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\nfunction hash(str) {\n let hash = 5381;\n let i = str.length;\n while (i--)\n hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n return hash >>> 0;\n}\nfunction create_style_information(doc, node) {\n const info = { stylesheet: append_empty_stylesheet(node), rules: {} };\n managed_styles.set(doc, info);\n return info;\n}\nfunction create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {\n const step = 16.666 / duration;\n let keyframes = '{\\n';\n for (let p = 0; p <= 1; p += step) {\n const t = a + (b - a) * ease(p);\n keyframes += p * 100 + `%{${fn(t, 1 - t)}}\\n`;\n }\n const rule = keyframes + `100% {${fn(b, 1 - b)}}\\n}`;\n const name = `__svelte_${hash(rule)}_${uid}`;\n const doc = get_root_for_style(node);\n const { stylesheet, rules } = managed_styles.get(doc) || create_style_information(doc, node);\n if (!rules[name]) {\n rules[name] = true;\n stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);\n }\n const animation = node.style.animation || '';\n node.style.animation = `${animation ? `${animation}, ` : ''}${name} ${duration}ms linear ${delay}ms 1 both`;\n active += 1;\n return name;\n}\nfunction delete_rule(node, name) {\n const previous = (node.style.animation || '').split(', ');\n const next = previous.filter(name\n ? anim => anim.indexOf(name) < 0 // remove specific animation\n : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n );\n const deleted = previous.length - next.length;\n if (deleted) {\n node.style.animation = next.join(', ');\n active -= deleted;\n if (!active)\n clear_rules();\n }\n}\nfunction clear_rules() {\n raf(() => {\n if (active)\n return;\n managed_styles.forEach(info => {\n const { stylesheet } = info;\n let i = stylesheet.cssRules.length;\n while (i--)\n stylesheet.deleteRule(i);\n info.rules = {};\n });\n managed_styles.clear();\n });\n}\n\nfunction create_animation(node, from, fn, params) {\n if (!from)\n return noop;\n const to = node.getBoundingClientRect();\n if (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom)\n return noop;\n const { delay = 0, duration = 300, easing = identity, \n // @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation?\n start: start_time = now() + delay, \n // @ts-ignore todo:\n end = start_time + duration, tick = noop, css } = fn(node, { from, to }, params);\n let running = true;\n let started = false;\n let name;\n function start() {\n if (css) {\n name = create_rule(node, 0, 1, duration, delay, easing, css);\n }\n if (!delay) {\n started = true;\n }\n }\n function stop() {\n if (css)\n delete_rule(node, name);\n running = false;\n }\n loop(now => {\n if (!started && now >= start_time) {\n started = true;\n }\n if (started && now >= end) {\n tick(1, 0);\n stop();\n }\n if (!running) {\n return false;\n }\n if (started) {\n const p = now - start_time;\n const t = 0 + 1 * easing(p / duration);\n tick(t, 1 - t);\n }\n return true;\n });\n start();\n tick(0, 1);\n return stop;\n}\nfunction fix_position(node) {\n const style = getComputedStyle(node);\n if (style.position !== 'absolute' && style.position !== 'fixed') {\n const { width, height } = style;\n const a = node.getBoundingClientRect();\n node.style.position = 'absolute';\n node.style.width = width;\n node.style.height = height;\n add_transform(node, a);\n }\n}\nfunction add_transform(node, a) {\n const b = node.getBoundingClientRect();\n if (a.left !== b.left || a.top !== b.top) {\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n node.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;\n }\n}\n\nlet current_component;\nfunction set_current_component(component) {\n current_component = component;\n}\nfunction get_current_component() {\n if (!current_component)\n throw new Error('Function called outside component initialization');\n return current_component;\n}\nfunction beforeUpdate(fn) {\n get_current_component().$$.before_update.push(fn);\n}\nfunction onMount(fn) {\n get_current_component().$$.on_mount.push(fn);\n}\nfunction afterUpdate(fn) {\n get_current_component().$$.after_update.push(fn);\n}\nfunction onDestroy(fn) {\n get_current_component().$$.on_destroy.push(fn);\n}\nfunction createEventDispatcher() {\n const component = get_current_component();\n return (type, detail) => {\n const callbacks = component.$$.callbacks[type];\n if (callbacks) {\n // TODO are there situations where events could be dispatched\n // in a server (non-DOM) environment?\n const event = custom_event(type, detail);\n callbacks.slice().forEach(fn => {\n fn.call(component, event);\n });\n }\n };\n}\nfunction setContext(key, context) {\n get_current_component().$$.context.set(key, context);\n}\nfunction getContext(key) {\n return get_current_component().$$.context.get(key);\n}\nfunction getAllContexts() {\n return get_current_component().$$.context;\n}\nfunction hasContext(key) {\n return get_current_component().$$.context.has(key);\n}\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\nfunction bubble(component, event) {\n const callbacks = component.$$.callbacks[event.type];\n if (callbacks) {\n // @ts-ignore\n callbacks.slice().forEach(fn => fn.call(this, event));\n }\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\nconst binding_callbacks = [];\nconst render_callbacks = [];\nconst flush_callbacks = [];\nconst resolved_promise = Promise.resolve();\nlet update_scheduled = false;\nfunction schedule_update() {\n if (!update_scheduled) {\n update_scheduled = true;\n resolved_promise.then(flush);\n }\n}\nfunction tick() {\n schedule_update();\n return resolved_promise;\n}\nfunction add_render_callback(fn) {\n render_callbacks.push(fn);\n}\nfunction add_flush_callback(fn) {\n flush_callbacks.push(fn);\n}\n// flush() calls callbacks in this order:\n// 1. All beforeUpdate callbacks, in order: parents before children\n// 2. All bind:this callbacks, in reverse order: children before parents.\n// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT\n// for afterUpdates called during the initial onMount, which are called in\n// reverse order: children before parents.\n// Since callbacks might update component values, which could trigger another\n// call to flush(), the following steps guard against this:\n// 1. During beforeUpdate, any updated components will be added to the\n// dirty_components array and will cause a reentrant call to flush(). Because\n// the flush index is kept outside the function, the reentrant call will pick\n// up where the earlier call left off and go through all dirty components. The\n// current_component value is saved and restored so that the reentrant call will\n// not interfere with the \"parent\" flush() call.\n// 2. bind:this callbacks cannot trigger new flush() calls.\n// 3. During afterUpdate, any updated components will NOT have their afterUpdate\n// callback called a second time; the seen_callbacks set, outside the flush()\n// function, guarantees this behavior.\nconst seen_callbacks = new Set();\nlet flushidx = 0; // Do *not* move this inside the flush() function\nfunction flush() {\n const saved_component = current_component;\n do {\n // first, call beforeUpdate functions\n // and update components\n while (flushidx < dirty_components.length) {\n const component = dirty_components[flushidx];\n flushidx++;\n set_current_component(component);\n update(component.$$);\n }\n set_current_component(null);\n dirty_components.length = 0;\n flushidx = 0;\n while (binding_callbacks.length)\n binding_callbacks.pop()();\n // then, once components are updated, call\n // afterUpdate functions. This may cause\n // subsequent updates...\n for (let i = 0; i < render_callbacks.length; i += 1) {\n const callback = render_callbacks[i];\n if (!seen_callbacks.has(callback)) {\n // ...so guard against infinite loops\n seen_callbacks.add(callback);\n callback();\n }\n }\n render_callbacks.length = 0;\n } while (dirty_components.length);\n while (flush_callbacks.length) {\n flush_callbacks.pop()();\n }\n update_scheduled = false;\n seen_callbacks.clear();\n set_current_component(saved_component);\n}\nfunction update($$) {\n if ($$.fragment !== null) {\n $$.update();\n run_all($$.before_update);\n const dirty = $$.dirty;\n $$.dirty = [-1];\n $$.fragment && $$.fragment.p($$.ctx, dirty);\n $$.after_update.forEach(add_render_callback);\n }\n}\n\nlet promise;\nfunction wait() {\n if (!promise) {\n promise = Promise.resolve();\n promise.then(() => {\n promise = null;\n });\n }\n return promise;\n}\nfunction dispatch(node, direction, kind) {\n node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\nconst outroing = new Set();\nlet outros;\nfunction group_outros() {\n outros = {\n r: 0,\n c: [],\n p: outros // parent group\n };\n}\nfunction check_outros() {\n if (!outros.r) {\n run_all(outros.c);\n }\n outros = outros.p;\n}\nfunction transition_in(block, local) {\n if (block && block.i) {\n outroing.delete(block);\n block.i(local);\n }\n}\nfunction transition_out(block, local, detach, callback) {\n if (block && block.o) {\n if (outroing.has(block))\n return;\n outroing.add(block);\n outros.c.push(() => {\n outroing.delete(block);\n if (callback) {\n if (detach)\n block.d(1);\n callback();\n }\n });\n block.o(local);\n }\n}\nconst null_transition = { duration: 0 };\nfunction create_in_transition(node, fn, params) {\n let config = fn(node, params);\n let running = false;\n let animation_name;\n let task;\n let uid = 0;\n function cleanup() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n tick(0, 1);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n if (task)\n task.abort();\n running = true;\n add_render_callback(() => dispatch(node, true, 'start'));\n task = loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(1, 0);\n dispatch(node, true, 'end');\n cleanup();\n return running = false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(t, 1 - t);\n }\n }\n return running;\n });\n }\n let started = false;\n return {\n start() {\n if (started)\n return;\n started = true;\n delete_rule(node);\n if (is_function(config)) {\n config = config();\n wait().then(go);\n }\n else {\n go();\n }\n },\n invalidate() {\n started = false;\n },\n end() {\n if (running) {\n cleanup();\n running = false;\n }\n }\n };\n}\nfunction create_out_transition(node, fn, params) {\n let config = fn(node, params);\n let running = true;\n let animation_name;\n const group = outros;\n group.r += 1;\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n add_render_callback(() => dispatch(node, false, 'start'));\n loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(0, 1);\n dispatch(node, false, 'end');\n if (!--group.r) {\n // this will result in `end()` being called,\n // so we don't need to clean up here\n run_all(group.c);\n }\n return false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(1 - t, t);\n }\n }\n return running;\n });\n }\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go();\n });\n }\n else {\n go();\n }\n return {\n end(reset) {\n if (reset && config.tick) {\n config.tick(1, 0);\n }\n if (running) {\n if (animation_name)\n delete_rule(node, animation_name);\n running = false;\n }\n }\n };\n}\nfunction create_bidirectional_transition(node, fn, params, intro) {\n let config = fn(node, params);\n let t = intro ? 0 : 1;\n let running_program = null;\n let pending_program = null;\n let animation_name = null;\n function clear_animation() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function init(program, duration) {\n const d = (program.b - t);\n duration *= Math.abs(d);\n return {\n a: t,\n b: program.b,\n d,\n duration,\n start: program.start,\n end: program.start + duration,\n group: program.group\n };\n }\n function go(b) {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n const program = {\n start: now() + delay,\n b\n };\n if (!b) {\n // @ts-ignore todo: improve typings\n program.group = outros;\n outros.r += 1;\n }\n if (running_program || pending_program) {\n pending_program = program;\n }\n else {\n // if this is an intro, and there's a delay, we need to do\n // an initial tick and/or apply CSS animation immediately\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, b, duration, delay, easing, css);\n }\n if (b)\n tick(0, 1);\n running_program = init(program, duration);\n add_render_callback(() => dispatch(node, b, 'start'));\n loop(now => {\n if (pending_program && now > pending_program.start) {\n running_program = init(pending_program, duration);\n pending_program = null;\n dispatch(node, running_program.b, 'start');\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);\n }\n }\n if (running_program) {\n if (now >= running_program.end) {\n tick(t = running_program.b, 1 - t);\n dispatch(node, running_program.b, 'end');\n if (!pending_program) {\n // we're done\n if (running_program.b) {\n // intro — we can tidy up immediately\n clear_animation();\n }\n else {\n // outro — needs to be coordinated\n if (!--running_program.group.r)\n run_all(running_program.group.c);\n }\n }\n running_program = null;\n }\n else if (now >= running_program.start) {\n const p = now - running_program.start;\n t = running_program.a + running_program.d * easing(p / running_program.duration);\n tick(t, 1 - t);\n }\n }\n return !!(running_program || pending_program);\n });\n }\n }\n return {\n run(b) {\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go(b);\n });\n }\n else {\n go(b);\n }\n },\n end() {\n clear_animation();\n running_program = pending_program = null;\n }\n };\n}\n\nfunction handle_promise(promise, info) {\n const token = info.token = {};\n function update(type, index, key, value) {\n if (info.token !== token)\n return;\n info.resolved = value;\n let child_ctx = info.ctx;\n if (key !== undefined) {\n child_ctx = child_ctx.slice();\n child_ctx[key] = value;\n }\n const block = type && (info.current = type)(child_ctx);\n let needs_flush = false;\n if (info.block) {\n if (info.blocks) {\n info.blocks.forEach((block, i) => {\n if (i !== index && block) {\n group_outros();\n transition_out(block, 1, 1, () => {\n if (info.blocks[i] === block) {\n info.blocks[i] = null;\n }\n });\n check_outros();\n }\n });\n }\n else {\n info.block.d(1);\n }\n block.c();\n transition_in(block, 1);\n block.m(info.mount(), info.anchor);\n needs_flush = true;\n }\n info.block = block;\n if (info.blocks)\n info.blocks[index] = block;\n if (needs_flush) {\n flush();\n }\n }\n if (is_promise(promise)) {\n const current_component = get_current_component();\n promise.then(value => {\n set_current_component(current_component);\n update(info.then, 1, info.value, value);\n set_current_component(null);\n }, error => {\n set_current_component(current_component);\n update(info.catch, 2, info.error, error);\n set_current_component(null);\n if (!info.hasCatch) {\n throw error;\n }\n });\n // if we previously had a then/catch block, destroy it\n if (info.current !== info.pending) {\n update(info.pending, 0);\n return true;\n }\n }\n else {\n if (info.current !== info.then) {\n update(info.then, 1, info.value, promise);\n return true;\n }\n info.resolved = promise;\n }\n}\nfunction update_await_block_branch(info, ctx, dirty) {\n const child_ctx = ctx.slice();\n const { resolved } = info;\n if (info.current === info.then) {\n child_ctx[info.value] = resolved;\n }\n if (info.current === info.catch) {\n child_ctx[info.error] = resolved;\n }\n info.block.p(child_ctx, dirty);\n}\n\nconst globals = (typeof window !== 'undefined'\n ? window\n : typeof globalThis !== 'undefined'\n ? globalThis\n : global);\n\nfunction destroy_block(block, lookup) {\n block.d(1);\n lookup.delete(block.key);\n}\nfunction outro_and_destroy_block(block, lookup) {\n transition_out(block, 1, 1, () => {\n lookup.delete(block.key);\n });\n}\nfunction fix_and_destroy_block(block, lookup) {\n block.f();\n destroy_block(block, lookup);\n}\nfunction fix_and_outro_and_destroy_block(block, lookup) {\n block.f();\n outro_and_destroy_block(block, lookup);\n}\nfunction update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {\n let o = old_blocks.length;\n let n = list.length;\n let i = o;\n const old_indexes = {};\n while (i--)\n old_indexes[old_blocks[i].key] = i;\n const new_blocks = [];\n const new_lookup = new Map();\n const deltas = new Map();\n i = n;\n while (i--) {\n const child_ctx = get_context(ctx, list, i);\n const key = get_key(child_ctx);\n let block = lookup.get(key);\n if (!block) {\n block = create_each_block(key, child_ctx);\n block.c();\n }\n else if (dynamic) {\n block.p(child_ctx, dirty);\n }\n new_lookup.set(key, new_blocks[i] = block);\n if (key in old_indexes)\n deltas.set(key, Math.abs(i - old_indexes[key]));\n }\n const will_move = new Set();\n const did_move = new Set();\n function insert(block) {\n transition_in(block, 1);\n block.m(node, next);\n lookup.set(block.key, block);\n next = block.first;\n n--;\n }\n while (o && n) {\n const new_block = new_blocks[n - 1];\n const old_block = old_blocks[o - 1];\n const new_key = new_block.key;\n const old_key = old_block.key;\n if (new_block === old_block) {\n // do nothing\n next = new_block.first;\n o--;\n n--;\n }\n else if (!new_lookup.has(old_key)) {\n // remove old block\n destroy(old_block, lookup);\n o--;\n }\n else if (!lookup.has(new_key) || will_move.has(new_key)) {\n insert(new_block);\n }\n else if (did_move.has(old_key)) {\n o--;\n }\n else if (deltas.get(new_key) > deltas.get(old_key)) {\n did_move.add(new_key);\n insert(new_block);\n }\n else {\n will_move.add(old_key);\n o--;\n }\n }\n while (o--) {\n const old_block = old_blocks[o];\n if (!new_lookup.has(old_block.key))\n destroy(old_block, lookup);\n }\n while (n)\n insert(new_blocks[n - 1]);\n return new_blocks;\n}\nfunction validate_each_keys(ctx, list, get_context, get_key) {\n const keys = new Set();\n for (let i = 0; i < list.length; i++) {\n const key = get_key(get_context(ctx, list, i));\n if (keys.has(key)) {\n throw new Error('Cannot have duplicate keys in a keyed each');\n }\n keys.add(key);\n }\n}\n\nfunction get_spread_update(levels, updates) {\n const update = {};\n const to_null_out = {};\n const accounted_for = { $$scope: 1 };\n let i = levels.length;\n while (i--) {\n const o = levels[i];\n const n = updates[i];\n if (n) {\n for (const key in o) {\n if (!(key in n))\n to_null_out[key] = 1;\n }\n for (const key in n) {\n if (!accounted_for[key]) {\n update[key] = n[key];\n accounted_for[key] = 1;\n }\n }\n levels[i] = n;\n }\n else {\n for (const key in o) {\n accounted_for[key] = 1;\n }\n }\n }\n for (const key in to_null_out) {\n if (!(key in update))\n update[key] = undefined;\n }\n return update;\n}\nfunction get_spread_object(spread_props) {\n return typeof spread_props === 'object' && spread_props !== null ? spread_props : {};\n}\n\n// source: https://html.spec.whatwg.org/multipage/indices.html\nconst boolean_attributes = new Set([\n 'allowfullscreen',\n 'allowpaymentrequest',\n 'async',\n 'autofocus',\n 'autoplay',\n 'checked',\n 'controls',\n 'default',\n 'defer',\n 'disabled',\n 'formnovalidate',\n 'hidden',\n 'ismap',\n 'loop',\n 'multiple',\n 'muted',\n 'nomodule',\n 'novalidate',\n 'open',\n 'playsinline',\n 'readonly',\n 'required',\n 'reversed',\n 'selected'\n]);\n\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\nfunction spread(args, attrs_to_add) {\n const attributes = Object.assign({}, ...args);\n if (attrs_to_add) {\n const classes_to_add = attrs_to_add.classes;\n const styles_to_add = attrs_to_add.styles;\n if (classes_to_add) {\n if (attributes.class == null) {\n attributes.class = classes_to_add;\n }\n else {\n attributes.class += ' ' + classes_to_add;\n }\n }\n if (styles_to_add) {\n if (attributes.style == null) {\n attributes.style = style_object_to_string(styles_to_add);\n }\n else {\n attributes.style = style_object_to_string(merge_ssr_styles(attributes.style, styles_to_add));\n }\n }\n }\n let str = '';\n Object.keys(attributes).forEach(name => {\n if (invalid_attribute_name_character.test(name))\n return;\n const value = attributes[name];\n if (value === true)\n str += ' ' + name;\n else if (boolean_attributes.has(name.toLowerCase())) {\n if (value)\n str += ' ' + name;\n }\n else if (value != null) {\n str += ` ${name}=\"${value}\"`;\n }\n });\n return str;\n}\nfunction merge_ssr_styles(style_attribute, style_directive) {\n const style_object = {};\n for (const individual_style of style_attribute.split(';')) {\n const colon_index = individual_style.indexOf(':');\n const name = individual_style.slice(0, colon_index).trim();\n const value = individual_style.slice(colon_index + 1).trim();\n if (!name)\n continue;\n style_object[name] = value;\n }\n for (const name in style_directive) {\n const value = style_directive[name];\n if (value) {\n style_object[name] = value;\n }\n else {\n delete style_object[name];\n }\n }\n return style_object;\n}\nconst escaped = {\n '\"': '"',\n \"'\": ''',\n '&': '&',\n '<': '<',\n '>': '>'\n};\nfunction escape(html) {\n return String(html).replace(/[\"'&<>]/g, match => escaped[match]);\n}\nfunction escape_attribute_value(value) {\n return typeof value === 'string' ? escape(value) : value;\n}\nfunction escape_object(obj) {\n const result = {};\n for (const key in obj) {\n result[key] = escape_attribute_value(obj[key]);\n }\n return result;\n}\nfunction each(items, fn) {\n let str = '';\n for (let i = 0; i < items.length; i += 1) {\n str += fn(items[i], i);\n }\n return str;\n}\nconst missing_component = {\n $$render: () => ''\n};\nfunction validate_component(component, name) {\n if (!component || !component.$$render) {\n if (name === 'svelte:component')\n name += ' this={...}';\n throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules`);\n }\n return component;\n}\nfunction debug(file, line, column, values) {\n console.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n console.log(values); // eslint-disable-line no-console\n return '';\n}\nlet on_destroy;\nfunction create_ssr_component(fn) {\n function $$render(result, props, bindings, slots, context) {\n const parent_component = current_component;\n const $$ = {\n on_destroy,\n context: new Map(context || (parent_component ? parent_component.$$.context : [])),\n // these will be immediately discarded\n on_mount: [],\n before_update: [],\n after_update: [],\n callbacks: blank_object()\n };\n set_current_component({ $$ });\n const html = fn(result, props, bindings, slots);\n set_current_component(parent_component);\n return html;\n }\n return {\n render: (props = {}, { $$slots = {}, context = new Map() } = {}) => {\n on_destroy = [];\n const result = { title: '', head: '', css: new Set() };\n const html = $$render(result, props, {}, $$slots, context);\n run_all(on_destroy);\n return {\n html,\n css: {\n code: Array.from(result.css).map(css => css.code).join('\\n'),\n map: null // TODO\n },\n head: result.title + result.head\n };\n },\n $$render\n };\n}\nfunction add_attribute(name, value, boolean) {\n if (value == null || (boolean && !value))\n return '';\n const assignment = (boolean && value === true) ? '' : `=\"${escape_attribute_value(value.toString())}\"`;\n return ` ${name}${assignment}`;\n}\nfunction add_classes(classes) {\n return classes ? ` class=\"${classes}\"` : '';\n}\nfunction style_object_to_string(style_object) {\n return Object.keys(style_object)\n .filter(key => style_object[key])\n .map(key => `${key}: ${style_object[key]};`)\n .join(' ');\n}\nfunction add_styles(style_object) {\n const styles = style_object_to_string(style_object);\n return styles ? ` style=\"${styles}\"` : '';\n}\n\nfunction bind(component, name, callback) {\n const index = component.$$.props[name];\n if (index !== undefined) {\n component.$$.bound[index] = callback;\n callback(component.$$.ctx[index]);\n }\n}\nfunction create_component(block) {\n block && block.c();\n}\nfunction claim_component(block, parent_nodes) {\n block && block.l(parent_nodes);\n}\nfunction mount_component(component, target, anchor, customElement) {\n const { fragment, on_mount, on_destroy, after_update } = component.$$;\n fragment && fragment.m(target, anchor);\n if (!customElement) {\n // onMount happens before the initial afterUpdate\n add_render_callback(() => {\n const new_on_destroy = on_mount.map(run).filter(is_function);\n if (on_destroy) {\n on_destroy.push(...new_on_destroy);\n }\n else {\n // Edge case - component was destroyed immediately,\n // most likely as a result of a binding initialising\n run_all(new_on_destroy);\n }\n component.$$.on_mount = [];\n });\n }\n after_update.forEach(add_render_callback);\n}\nfunction destroy_component(component, detaching) {\n const $$ = component.$$;\n if ($$.fragment !== null) {\n run_all($$.on_destroy);\n $$.fragment && $$.fragment.d(detaching);\n // TODO null out other refs, including component.$$ (but need to\n // preserve final state?)\n $$.on_destroy = $$.fragment = null;\n $$.ctx = [];\n }\n}\nfunction make_dirty(component, i) {\n if (component.$$.dirty[0] === -1) {\n dirty_components.push(component);\n schedule_update();\n component.$$.dirty.fill(0);\n }\n component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));\n}\nfunction init(component, options, instance, create_fragment, not_equal, props, append_styles, dirty = [-1]) {\n const parent_component = current_component;\n set_current_component(component);\n const $$ = component.$$ = {\n fragment: null,\n ctx: null,\n // state\n props,\n update: noop,\n not_equal,\n bound: blank_object(),\n // lifecycle\n on_mount: [],\n on_destroy: [],\n on_disconnect: [],\n before_update: [],\n after_update: [],\n context: new Map(options.context || (parent_component ? parent_component.$$.context : [])),\n // everything else\n callbacks: blank_object(),\n dirty,\n skip_bound: false,\n root: options.target || parent_component.$$.root\n };\n append_styles && append_styles($$.root);\n let ready = false;\n $$.ctx = instance\n ? instance(component, options.props || {}, (i, ret, ...rest) => {\n const value = rest.length ? rest[0] : ret;\n if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n if (!$$.skip_bound && $$.bound[i])\n $$.bound[i](value);\n if (ready)\n make_dirty(component, i);\n }\n return ret;\n })\n : [];\n $$.update();\n ready = true;\n run_all($$.before_update);\n // `false` as a special case of no DOM component\n $$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n if (options.target) {\n if (options.hydrate) {\n start_hydrating();\n const nodes = children(options.target);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.l(nodes);\n nodes.forEach(detach);\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.c();\n }\n if (options.intro)\n transition_in(component.$$.fragment);\n mount_component(component, options.target, options.anchor, options.customElement);\n end_hydrating();\n flush();\n }\n set_current_component(parent_component);\n}\nlet SvelteElement;\nif (typeof HTMLElement === 'function') {\n SvelteElement = class extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n }\n connectedCallback() {\n const { on_mount } = this.$$;\n this.$$.on_disconnect = on_mount.map(run).filter(is_function);\n // @ts-ignore todo: improve typings\n for (const key in this.$$.slotted) {\n // @ts-ignore todo: improve typings\n this.appendChild(this.$$.slotted[key]);\n }\n }\n attributeChangedCallback(attr, _oldValue, newValue) {\n this[attr] = newValue;\n }\n disconnectedCallback() {\n run_all(this.$$.on_disconnect);\n }\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n // TODO should this delegate to addEventListener?\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n };\n}\n/**\n * Base class for Svelte components. Used when dev=false.\n */\nclass SvelteComponent {\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n}\n\nfunction dispatch_dev(type, detail) {\n document.dispatchEvent(custom_event(type, Object.assign({ version: '3.47.0' }, detail), true));\n}\nfunction append_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append(target, node);\n}\nfunction append_hydration_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append_hydration(target, node);\n}\nfunction insert_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert(target, node, anchor);\n}\nfunction insert_hydration_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert_hydration(target, node, anchor);\n}\nfunction detach_dev(node) {\n dispatch_dev('SvelteDOMRemove', { node });\n detach(node);\n}\nfunction detach_between_dev(before, after) {\n while (before.nextSibling && before.nextSibling !== after) {\n detach_dev(before.nextSibling);\n }\n}\nfunction detach_before_dev(after) {\n while (after.previousSibling) {\n detach_dev(after.previousSibling);\n }\n}\nfunction detach_after_dev(before) {\n while (before.nextSibling) {\n detach_dev(before.nextSibling);\n }\n}\nfunction listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {\n const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : [];\n if (has_prevent_default)\n modifiers.push('preventDefault');\n if (has_stop_propagation)\n modifiers.push('stopPropagation');\n dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });\n const dispose = listen(node, event, handler, options);\n return () => {\n dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });\n dispose();\n };\n}\nfunction attr_dev(node, attribute, value) {\n attr(node, attribute, value);\n if (value == null)\n dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });\n else\n dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });\n}\nfunction prop_dev(node, property, value) {\n node[property] = value;\n dispatch_dev('SvelteDOMSetProperty', { node, property, value });\n}\nfunction dataset_dev(node, property, value) {\n node.dataset[property] = value;\n dispatch_dev('SvelteDOMSetDataset', { node, property, value });\n}\nfunction set_data_dev(text, data) {\n data = '' + data;\n if (text.wholeText === data)\n return;\n dispatch_dev('SvelteDOMSetData', { node: text, data });\n text.data = data;\n}\nfunction validate_each_argument(arg) {\n if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {\n let msg = '{#each} only iterates over array-like objects.';\n if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {\n msg += ' You can use a spread to convert this iterable into an array.';\n }\n throw new Error(msg);\n }\n}\nfunction validate_slots(name, slot, keys) {\n for (const slot_key of Object.keys(slot)) {\n if (!~keys.indexOf(slot_key)) {\n console.warn(`<${name}> received an unexpected slot \"${slot_key}\".`);\n }\n }\n}\nfunction validate_dynamic_element(tag) {\n if (tag && typeof tag !== 'string') {\n throw new Error(' expects \"this\" attribute to be a string.');\n }\n}\n/**\n * Base class for Svelte components with some minor dev-enhancements. Used when dev=true.\n */\nclass SvelteComponentDev extends SvelteComponent {\n constructor(options) {\n if (!options || (!options.target && !options.$$inline)) {\n throw new Error(\"'target' is a required option\");\n }\n super();\n }\n $destroy() {\n super.$destroy();\n this.$destroy = () => {\n console.warn('Component was already destroyed'); // eslint-disable-line no-console\n };\n }\n $capture_state() { }\n $inject_state() { }\n}\n/**\n * Base class to create strongly typed Svelte components.\n * This only exists for typing purposes and should be used in `.d.ts` files.\n *\n * ### Example:\n *\n * You have component library on npm called `component-library`, from which\n * you export a component called `MyComponent`. For Svelte+TypeScript users,\n * you want to provide typings. Therefore you create a `index.d.ts`:\n * ```ts\n * import { SvelteComponentTyped } from \"svelte\";\n * export class MyComponent extends SvelteComponentTyped<{foo: string}> {}\n * ```\n * Typing this makes it possible for IDEs like VS Code with the Svelte extension\n * to provide intellisense and to use the component like this in a Svelte file\n * with TypeScript:\n * ```svelte\n * \n * \n * ```\n *\n * #### Why not make this part of `SvelteComponent(Dev)`?\n * Because\n * ```ts\n * class ASubclassOfSvelteComponent extends SvelteComponent<{foo: string}> {}\n * const component: typeof SvelteComponent = ASubclassOfSvelteComponent;\n * ```\n * will throw a type error, so we need to separate the more strictly typed class.\n */\nclass SvelteComponentTyped extends SvelteComponentDev {\n constructor(options) {\n super(options);\n }\n}\nfunction loop_guard(timeout) {\n const start = Date.now();\n return () => {\n if (Date.now() - start > timeout) {\n throw new Error('Infinite loop detected');\n }\n };\n}\n\nexport { HtmlTag, HtmlTagHydration, SvelteComponent, SvelteComponentDev, SvelteComponentTyped, SvelteElement, action_destroyer, add_attribute, add_classes, add_flush_callback, add_location, add_render_callback, add_resize_listener, add_styles, add_transform, afterUpdate, append, append_dev, append_empty_stylesheet, append_hydration, append_hydration_dev, append_styles, assign, attr, attr_dev, attribute_to_object, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_html_tag, claim_space, claim_svg_element, claim_text, clear_loops, component_subscribe, compute_rest_props, compute_slots, createEventDispatcher, create_animation, create_bidirectional_transition, create_component, create_in_transition, create_out_transition, create_slot, create_ssr_component, current_component, custom_event, dataset_dev, debug, destroy_block, destroy_component, destroy_each, detach, detach_after_dev, detach_before_dev, detach_between_dev, detach_dev, dirty_components, dispatch_dev, each, element, element_is, empty, end_hydrating, escape, escape_attribute_value, escape_object, escaped, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, getAllContexts, getContext, get_all_dirty_from_scope, get_binding_group_value, get_current_component, get_custom_elements_slots, get_root_for_style, get_slot_changes, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, hasContext, has_prop, identity, init, insert, insert_dev, insert_hydration, insert_hydration_dev, intros, invalid_attribute_name_character, is_client, is_crossorigin, is_empty, is_function, is_promise, listen, listen_dev, loop, loop_guard, merge_ssr_styles, missing_component, mount_component, noop, not_equal, now, null_to_empty, object_without_properties, onDestroy, onMount, once, outro_and_destroy_block, prevent_default, prop_dev, query_selector_all, raf, run, run_all, safe_not_equal, schedule_update, select_multiple_value, select_option, select_options, select_value, self, setContext, set_attributes, set_current_component, set_custom_element_data, set_data, set_data_dev, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, spread, src_url_equal, start_hydrating, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, trusted, update_await_block_branch, update_keyed_each, update_slot, update_slot_base, validate_component, validate_dynamic_element, validate_each_argument, validate_each_keys, validate_slots, validate_store, xlink_attr };\n","/*!\n* sweetalert2 v11.4.8\n* Released under the MIT License.\n*/\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = global || self, global.Sweetalert2 = factory());\n}(this, function () { 'use strict';\n\n const consolePrefix = 'SweetAlert2:';\n /**\n * Filter the unique values into a new array\n * @param arr\n */\n\n const uniqueArray = arr => {\n const result = [];\n\n for (let i = 0; i < arr.length; i++) {\n if (result.indexOf(arr[i]) === -1) {\n result.push(arr[i]);\n }\n }\n\n return result;\n };\n /**\n * Capitalize the first letter of a string\n * @param {string} str\n * @returns {string}\n */\n\n const capitalizeFirstLetter = str => str.charAt(0).toUpperCase() + str.slice(1);\n /**\n * @param {NodeList | HTMLCollection | NamedNodeMap} nodeList\n * @returns {array}\n */\n\n const toArray = nodeList => Array.prototype.slice.call(nodeList);\n /**\n * Standardize console warnings\n * @param {string | array} message\n */\n\n const warn = message => {\n console.warn(\"\".concat(consolePrefix, \" \").concat(typeof message === 'object' ? message.join(' ') : message));\n };\n /**\n * Standardize console errors\n * @param {string} message\n */\n\n const error = message => {\n console.error(\"\".concat(consolePrefix, \" \").concat(message));\n };\n /**\n * Private global state for `warnOnce`\n * @type {Array}\n * @private\n */\n\n const previousWarnOnceMessages = [];\n /**\n * Show a console warning, but only if it hasn't already been shown\n * @param {string} message\n */\n\n const warnOnce = message => {\n if (!previousWarnOnceMessages.includes(message)) {\n previousWarnOnceMessages.push(message);\n warn(message);\n }\n };\n /**\n * Show a one-time console warning about deprecated params/methods\n */\n\n const warnAboutDeprecation = (deprecatedParam, useInstead) => {\n warnOnce(\"\\\"\".concat(deprecatedParam, \"\\\" is deprecated and will be removed in the next major release. Please use \\\"\").concat(useInstead, \"\\\" instead.\"));\n };\n /**\n * If `arg` is a function, call it (with no arguments or context) and return the result.\n * Otherwise, just pass the value through\n * @param arg\n */\n\n const callIfFunction = arg => typeof arg === 'function' ? arg() : arg;\n const hasToPromiseFn = arg => arg && typeof arg.toPromise === 'function';\n const asPromise = arg => hasToPromiseFn(arg) ? arg.toPromise() : Promise.resolve(arg);\n const isPromise = arg => arg && Promise.resolve(arg) === arg;\n\n const defaultParams = {\n title: '',\n titleText: '',\n text: '',\n html: '',\n footer: '',\n icon: undefined,\n iconColor: undefined,\n iconHtml: undefined,\n template: undefined,\n toast: false,\n showClass: {\n popup: 'swal2-show',\n backdrop: 'swal2-backdrop-show',\n icon: 'swal2-icon-show'\n },\n hideClass: {\n popup: 'swal2-hide',\n backdrop: 'swal2-backdrop-hide',\n icon: 'swal2-icon-hide'\n },\n customClass: {},\n target: 'body',\n color: undefined,\n backdrop: true,\n heightAuto: true,\n allowOutsideClick: true,\n allowEscapeKey: true,\n allowEnterKey: true,\n stopKeydownPropagation: true,\n keydownListenerCapture: false,\n showConfirmButton: true,\n showDenyButton: false,\n showCancelButton: false,\n preConfirm: undefined,\n preDeny: undefined,\n confirmButtonText: 'OK',\n confirmButtonAriaLabel: '',\n confirmButtonColor: undefined,\n denyButtonText: 'No',\n denyButtonAriaLabel: '',\n denyButtonColor: undefined,\n cancelButtonText: 'Cancel',\n cancelButtonAriaLabel: '',\n cancelButtonColor: undefined,\n buttonsStyling: true,\n reverseButtons: false,\n focusConfirm: true,\n focusDeny: false,\n focusCancel: false,\n returnFocus: true,\n showCloseButton: false,\n closeButtonHtml: '×',\n closeButtonAriaLabel: 'Close this dialog',\n loaderHtml: '',\n showLoaderOnConfirm: false,\n showLoaderOnDeny: false,\n imageUrl: undefined,\n imageWidth: undefined,\n imageHeight: undefined,\n imageAlt: '',\n timer: undefined,\n timerProgressBar: false,\n width: undefined,\n padding: undefined,\n background: undefined,\n input: undefined,\n inputPlaceholder: '',\n inputLabel: '',\n inputValue: '',\n inputOptions: {},\n inputAutoTrim: true,\n inputAttributes: {},\n inputValidator: undefined,\n returnInputValueOnDeny: false,\n validationMessage: undefined,\n grow: false,\n position: 'center',\n progressSteps: [],\n currentProgressStep: undefined,\n progressStepsDistance: undefined,\n willOpen: undefined,\n didOpen: undefined,\n didRender: undefined,\n willClose: undefined,\n didClose: undefined,\n didDestroy: undefined,\n scrollbarPadding: true\n };\n const updatableParams = ['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'];\n const deprecatedParams = {};\n const toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'focusConfirm', 'focusDeny', 'focusCancel', 'returnFocus', 'heightAuto', 'keydownListenerCapture'];\n /**\n * Is valid parameter\n * @param {string} paramName\n */\n\n const isValidParameter = paramName => {\n return Object.prototype.hasOwnProperty.call(defaultParams, paramName);\n };\n /**\n * Is valid parameter for Swal.update() method\n * @param {string} paramName\n */\n\n const isUpdatableParameter = paramName => {\n return updatableParams.indexOf(paramName) !== -1;\n };\n /**\n * Is deprecated parameter\n * @param {string} paramName\n */\n\n const isDeprecatedParameter = paramName => {\n return deprecatedParams[paramName];\n };\n\n const checkIfParamIsValid = param => {\n if (!isValidParameter(param)) {\n warn(\"Unknown parameter \\\"\".concat(param, \"\\\"\"));\n }\n };\n\n const checkIfToastParamIsValid = param => {\n if (toastIncompatibleParams.includes(param)) {\n warn(\"The parameter \\\"\".concat(param, \"\\\" is incompatible with toasts\"));\n }\n };\n\n const checkIfParamIsDeprecated = param => {\n if (isDeprecatedParameter(param)) {\n warnAboutDeprecation(param, isDeprecatedParameter(param));\n }\n };\n /**\n * Show relevant warnings for given params\n *\n * @param params\n */\n\n\n const showWarningsForParams = params => {\n if (!params.backdrop && params.allowOutsideClick) {\n warn('\"allowOutsideClick\" parameter requires `backdrop` parameter to be set to `true`');\n }\n\n for (const param in params) {\n checkIfParamIsValid(param);\n\n if (params.toast) {\n checkIfToastParamIsValid(param);\n }\n\n checkIfParamIsDeprecated(param);\n }\n };\n\n const swalPrefix = 'swal2-';\n const prefix = items => {\n const result = {};\n\n for (const i in items) {\n result[items[i]] = swalPrefix + items[i];\n }\n\n return result;\n };\n const swalClasses = prefix(['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']);\n const iconTypes = prefix(['success', 'warning', 'info', 'question', 'error']);\n\n /**\n * Gets the popup container which contains the backdrop and the popup itself.\n *\n * @returns {HTMLElement | null}\n */\n\n const getContainer = () => document.body.querySelector(\".\".concat(swalClasses.container));\n const elementBySelector = selectorString => {\n const container = getContainer();\n return container ? container.querySelector(selectorString) : null;\n };\n\n const elementByClass = className => {\n return elementBySelector(\".\".concat(className));\n };\n\n const getPopup = () => elementByClass(swalClasses.popup);\n const getIcon = () => elementByClass(swalClasses.icon);\n const getTitle = () => elementByClass(swalClasses.title);\n const getHtmlContainer = () => elementByClass(swalClasses['html-container']);\n const getImage = () => elementByClass(swalClasses.image);\n const getProgressSteps = () => elementByClass(swalClasses['progress-steps']);\n const getValidationMessage = () => elementByClass(swalClasses['validation-message']);\n const getConfirmButton = () => elementBySelector(\".\".concat(swalClasses.actions, \" .\").concat(swalClasses.confirm));\n const getDenyButton = () => elementBySelector(\".\".concat(swalClasses.actions, \" .\").concat(swalClasses.deny));\n const getInputLabel = () => elementByClass(swalClasses['input-label']);\n const getLoader = () => elementBySelector(\".\".concat(swalClasses.loader));\n const getCancelButton = () => elementBySelector(\".\".concat(swalClasses.actions, \" .\").concat(swalClasses.cancel));\n const getActions = () => elementByClass(swalClasses.actions);\n const getFooter = () => elementByClass(swalClasses.footer);\n const getTimerProgressBar = () => elementByClass(swalClasses['timer-progress-bar']);\n const getCloseButton = () => elementByClass(swalClasses.close); // https://github.com/jkup/focusable/blob/master/index.js\n\n const focusable = \"\\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\";\n const getFocusableElements = () => {\n const focusableElementsWithTabindex = toArray(getPopup().querySelectorAll('[tabindex]:not([tabindex=\"-1\"]):not([tabindex=\"0\"])')) // sort according to tabindex\n .sort((a, b) => {\n const tabindexA = parseInt(a.getAttribute('tabindex'));\n const tabindexB = parseInt(b.getAttribute('tabindex'));\n\n if (tabindexA > tabindexB) {\n return 1;\n } else if (tabindexA < tabindexB) {\n return -1;\n }\n\n return 0;\n });\n const otherFocusableElements = toArray(getPopup().querySelectorAll(focusable)).filter(el => el.getAttribute('tabindex') !== '-1');\n return uniqueArray(focusableElementsWithTabindex.concat(otherFocusableElements)).filter(el => isVisible(el));\n };\n const isModal = () => {\n return hasClass(document.body, swalClasses.shown) && !hasClass(document.body, swalClasses['toast-shown']) && !hasClass(document.body, swalClasses['no-backdrop']);\n };\n const isToast = () => {\n return getPopup() && hasClass(getPopup(), swalClasses.toast);\n };\n const isLoading = () => {\n return getPopup().hasAttribute('data-loading');\n };\n\n const states = {\n previousBodyPadding: null\n };\n /**\n * Securely set innerHTML of an element\n * https://github.com/sweetalert2/sweetalert2/issues/1926\n *\n * @param {HTMLElement} elem\n * @param {string} html\n */\n\n const setInnerHtml = (elem, html) => {\n elem.textContent = '';\n\n if (html) {\n const parser = new DOMParser();\n const parsed = parser.parseFromString(html, \"text/html\");\n toArray(parsed.querySelector('head').childNodes).forEach(child => {\n elem.appendChild(child);\n });\n toArray(parsed.querySelector('body').childNodes).forEach(child => {\n elem.appendChild(child);\n });\n }\n };\n /**\n * @param {HTMLElement} elem\n * @param {string} className\n * @returns {boolean}\n */\n\n const hasClass = (elem, className) => {\n if (!className) {\n return false;\n }\n\n const classList = className.split(/\\s+/);\n\n for (let i = 0; i < classList.length; i++) {\n if (!elem.classList.contains(classList[i])) {\n return false;\n }\n }\n\n return true;\n };\n\n const removeCustomClasses = (elem, params) => {\n toArray(elem.classList).forEach(className => {\n if (!Object.values(swalClasses).includes(className) && !Object.values(iconTypes).includes(className) && !Object.values(params.showClass).includes(className)) {\n elem.classList.remove(className);\n }\n });\n };\n\n const applyCustomClass = (elem, params, className) => {\n removeCustomClasses(elem, params);\n\n if (params.customClass && params.customClass[className]) {\n if (typeof params.customClass[className] !== 'string' && !params.customClass[className].forEach) {\n return warn(\"Invalid type of customClass.\".concat(className, \"! Expected string or iterable object, got \\\"\").concat(typeof params.customClass[className], \"\\\"\"));\n }\n\n addClass(elem, params.customClass[className]);\n }\n };\n /**\n * @param {HTMLElement} popup\n * @param {string} inputType\n * @returns {HTMLInputElement | null}\n */\n\n const getInput = (popup, inputType) => {\n if (!inputType) {\n return null;\n }\n\n switch (inputType) {\n case 'select':\n case 'textarea':\n case 'file':\n return popup.querySelector(\".\".concat(swalClasses.popup, \" > .\").concat(swalClasses[inputType]));\n\n case 'checkbox':\n return popup.querySelector(\".\".concat(swalClasses.popup, \" > .\").concat(swalClasses.checkbox, \" input\"));\n\n case 'radio':\n return popup.querySelector(\".\".concat(swalClasses.popup, \" > .\").concat(swalClasses.radio, \" input:checked\")) || popup.querySelector(\".\".concat(swalClasses.popup, \" > .\").concat(swalClasses.radio, \" input:first-child\"));\n\n case 'range':\n return popup.querySelector(\".\".concat(swalClasses.popup, \" > .\").concat(swalClasses.range, \" input\"));\n\n default:\n return popup.querySelector(\".\".concat(swalClasses.popup, \" > .\").concat(swalClasses.input));\n }\n };\n /**\n * @param {HTMLInputElement} input\n */\n\n const focusInput = input => {\n input.focus(); // place cursor at end of text in text input\n\n if (input.type !== 'file') {\n // http://stackoverflow.com/a/2345915\n const val = input.value;\n input.value = '';\n input.value = val;\n }\n };\n /**\n * @param {HTMLElement | HTMLElement[] | null} target\n * @param {string | string[]} classList\n * @param {boolean} condition\n */\n\n const toggleClass = (target, classList, condition) => {\n if (!target || !classList) {\n return;\n }\n\n if (typeof classList === 'string') {\n classList = classList.split(/\\s+/).filter(Boolean);\n }\n\n classList.forEach(className => {\n if (Array.isArray(target)) {\n target.forEach(elem => {\n condition ? elem.classList.add(className) : elem.classList.remove(className);\n });\n } else {\n condition ? target.classList.add(className) : target.classList.remove(className);\n }\n });\n };\n /**\n * @param {HTMLElement | HTMLElement[] | null} target\n * @param {string | string[]} classList\n */\n\n const addClass = (target, classList) => {\n toggleClass(target, classList, true);\n };\n /**\n * @param {HTMLElement | HTMLElement[] | null} target\n * @param {string | string[]} classList\n */\n\n const removeClass = (target, classList) => {\n toggleClass(target, classList, false);\n };\n /**\n * Get direct child of an element by class name\n *\n * @param {HTMLElement} elem\n * @param {string} className\n * @returns {HTMLElement | null}\n */\n\n const getDirectChildByClass = (elem, className) => {\n const childNodes = toArray(elem.childNodes);\n\n for (let i = 0; i < childNodes.length; i++) {\n if (hasClass(childNodes[i], className)) {\n return childNodes[i];\n }\n }\n };\n /**\n * @param {HTMLElement} elem\n * @param {string} property\n * @param {*} value\n */\n\n const applyNumericalStyle = (elem, property, value) => {\n if (value === \"\".concat(parseInt(value))) {\n value = parseInt(value);\n }\n\n if (value || parseInt(value) === 0) {\n elem.style[property] = typeof value === 'number' ? \"\".concat(value, \"px\") : value;\n } else {\n elem.style.removeProperty(property);\n }\n };\n /**\n * @param {HTMLElement} elem\n * @param {string} display\n */\n\n const show = function (elem) {\n let display = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'flex';\n elem.style.display = display;\n };\n /**\n * @param {HTMLElement} elem\n */\n\n const hide = elem => {\n elem.style.display = 'none';\n };\n const setStyle = (parent, selector, property, value) => {\n const el = parent.querySelector(selector);\n\n if (el) {\n el.style[property] = value;\n }\n };\n const toggle = (elem, condition, display) => {\n condition ? show(elem, display) : hide(elem);\n }; // borrowed from jquery $(elem).is(':visible') implementation\n\n const isVisible = elem => !!(elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length));\n const allButtonsAreHidden = () => !isVisible(getConfirmButton()) && !isVisible(getDenyButton()) && !isVisible(getCancelButton());\n const isScrollable = elem => !!(elem.scrollHeight > elem.clientHeight); // borrowed from https://stackoverflow.com/a/46352119\n\n const hasCssAnimation = elem => {\n const style = window.getComputedStyle(elem);\n const animDuration = parseFloat(style.getPropertyValue('animation-duration') || '0');\n const transDuration = parseFloat(style.getPropertyValue('transition-duration') || '0');\n return animDuration > 0 || transDuration > 0;\n };\n const animateTimerProgressBar = function (timer) {\n let reset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n const timerProgressBar = getTimerProgressBar();\n\n if (isVisible(timerProgressBar)) {\n if (reset) {\n timerProgressBar.style.transition = 'none';\n timerProgressBar.style.width = '100%';\n }\n\n setTimeout(() => {\n timerProgressBar.style.transition = \"width \".concat(timer / 1000, \"s linear\");\n timerProgressBar.style.width = '0%';\n }, 10);\n }\n };\n const stopTimerProgressBar = () => {\n const timerProgressBar = getTimerProgressBar();\n const timerProgressBarWidth = parseInt(window.getComputedStyle(timerProgressBar).width);\n timerProgressBar.style.removeProperty('transition');\n timerProgressBar.style.width = '100%';\n const timerProgressBarFullWidth = parseInt(window.getComputedStyle(timerProgressBar).width);\n const timerProgressBarPercent = timerProgressBarWidth / timerProgressBarFullWidth * 100;\n timerProgressBar.style.removeProperty('transition');\n timerProgressBar.style.width = \"\".concat(timerProgressBarPercent, \"%\");\n };\n\n /**\n * Detect Node env\n *\n * @returns {boolean}\n */\n const isNodeEnv = () => typeof window === 'undefined' || typeof document === 'undefined';\n\n const RESTORE_FOCUS_TIMEOUT = 100;\n\n const globalState = {};\n\n const focusPreviousActiveElement = () => {\n if (globalState.previousActiveElement && globalState.previousActiveElement.focus) {\n globalState.previousActiveElement.focus();\n globalState.previousActiveElement = null;\n } else if (document.body) {\n document.body.focus();\n }\n }; // Restore previous active (focused) element\n\n\n const restoreActiveElement = returnFocus => {\n return new Promise(resolve => {\n if (!returnFocus) {\n return resolve();\n }\n\n const x = window.scrollX;\n const y = window.scrollY;\n globalState.restoreFocusTimeout = setTimeout(() => {\n focusPreviousActiveElement();\n resolve();\n }, RESTORE_FOCUS_TIMEOUT); // issues/900\n\n window.scrollTo(x, y);\n });\n };\n\n const sweetHTML = \"\\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, '');\n\n const resetOldContainer = () => {\n const oldContainer = getContainer();\n\n if (!oldContainer) {\n return false;\n }\n\n oldContainer.remove();\n removeClass([document.documentElement, document.body], [swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['has-column']]);\n return true;\n };\n\n const resetValidationMessage = () => {\n globalState.currentInstance.resetValidationMessage();\n };\n\n const addInputChangeListeners = () => {\n const popup = getPopup();\n const input = getDirectChildByClass(popup, swalClasses.input);\n const file = getDirectChildByClass(popup, swalClasses.file);\n const range = popup.querySelector(\".\".concat(swalClasses.range, \" input\"));\n const rangeOutput = popup.querySelector(\".\".concat(swalClasses.range, \" output\"));\n const select = getDirectChildByClass(popup, swalClasses.select);\n const checkbox = popup.querySelector(\".\".concat(swalClasses.checkbox, \" input\"));\n const textarea = getDirectChildByClass(popup, swalClasses.textarea);\n input.oninput = resetValidationMessage;\n file.onchange = resetValidationMessage;\n select.onchange = resetValidationMessage;\n checkbox.onchange = resetValidationMessage;\n textarea.oninput = resetValidationMessage;\n\n range.oninput = () => {\n resetValidationMessage();\n rangeOutput.value = range.value;\n };\n\n range.onchange = () => {\n resetValidationMessage();\n range.nextSibling.value = range.value;\n };\n };\n\n const getTarget = target => typeof target === 'string' ? document.querySelector(target) : target;\n\n const setupAccessibility = params => {\n const popup = getPopup();\n popup.setAttribute('role', params.toast ? 'alert' : 'dialog');\n popup.setAttribute('aria-live', params.toast ? 'polite' : 'assertive');\n\n if (!params.toast) {\n popup.setAttribute('aria-modal', 'true');\n }\n };\n\n const setupRTL = targetElement => {\n if (window.getComputedStyle(targetElement).direction === 'rtl') {\n addClass(getContainer(), swalClasses.rtl);\n }\n };\n /*\n * Add modal + backdrop to DOM\n */\n\n\n const init = params => {\n // Clean up the old popup container if it exists\n const oldContainerExisted = resetOldContainer();\n /* istanbul ignore if */\n\n if (isNodeEnv()) {\n error('SweetAlert2 requires document to initialize');\n return;\n }\n\n const container = document.createElement('div');\n container.className = swalClasses.container;\n\n if (oldContainerExisted) {\n addClass(container, swalClasses['no-transition']);\n }\n\n setInnerHtml(container, sweetHTML);\n const targetElement = getTarget(params.target);\n targetElement.appendChild(container);\n setupAccessibility(params);\n setupRTL(targetElement);\n addInputChangeListeners();\n };\n\n /**\n * @param {HTMLElement | object | string} param\n * @param {HTMLElement} target\n */\n\n const parseHtmlToContainer = (param, target) => {\n // DOM element\n if (param instanceof HTMLElement) {\n target.appendChild(param);\n } // Object\n else if (typeof param === 'object') {\n handleObject(param, target);\n } // Plain string\n else if (param) {\n setInnerHtml(target, param);\n }\n };\n /**\n * @param {object} param\n * @param {HTMLElement} target\n */\n\n const handleObject = (param, target) => {\n // JQuery element(s)\n if (param.jquery) {\n handleJqueryElem(target, param);\n } // For other objects use their string representation\n else {\n setInnerHtml(target, param.toString());\n }\n };\n\n const handleJqueryElem = (target, elem) => {\n target.textContent = '';\n\n if (0 in elem) {\n for (let i = 0; (i in elem); i++) {\n target.appendChild(elem[i].cloneNode(true));\n }\n } else {\n target.appendChild(elem.cloneNode(true));\n }\n };\n\n const animationEndEvent = (() => {\n // Prevent run in Node env\n\n /* istanbul ignore if */\n if (isNodeEnv()) {\n return false;\n }\n\n const testEl = document.createElement('div');\n const transEndEventNames = {\n WebkitAnimation: 'webkitAnimationEnd',\n // Chrome, Safari and Opera\n animation: 'animationend' // Standard syntax\n\n };\n\n for (const i in transEndEventNames) {\n if (Object.prototype.hasOwnProperty.call(transEndEventNames, i) && typeof testEl.style[i] !== 'undefined') {\n return transEndEventNames[i];\n }\n }\n\n return false;\n })();\n\n // https://github.com/twbs/bootstrap/blob/master/js/src/modal.js\n\n const measureScrollbar = () => {\n const scrollDiv = document.createElement('div');\n scrollDiv.className = swalClasses['scrollbar-measure'];\n document.body.appendChild(scrollDiv);\n const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;\n document.body.removeChild(scrollDiv);\n return scrollbarWidth;\n };\n\n const renderActions = (instance, params) => {\n const actions = getActions();\n const loader = getLoader(); // Actions (buttons) wrapper\n\n if (!params.showConfirmButton && !params.showDenyButton && !params.showCancelButton) {\n hide(actions);\n } else {\n show(actions);\n } // Custom class\n\n\n applyCustomClass(actions, params, 'actions'); // Render all the buttons\n\n renderButtons(actions, loader, params); // Loader\n\n setInnerHtml(loader, params.loaderHtml);\n applyCustomClass(loader, params, 'loader');\n };\n\n function renderButtons(actions, loader, params) {\n const confirmButton = getConfirmButton();\n const denyButton = getDenyButton();\n const cancelButton = getCancelButton(); // Render buttons\n\n renderButton(confirmButton, 'confirm', params);\n renderButton(denyButton, 'deny', params);\n renderButton(cancelButton, 'cancel', params);\n handleButtonsStyling(confirmButton, denyButton, cancelButton, params);\n\n if (params.reverseButtons) {\n if (params.toast) {\n actions.insertBefore(cancelButton, confirmButton);\n actions.insertBefore(denyButton, confirmButton);\n } else {\n actions.insertBefore(cancelButton, loader);\n actions.insertBefore(denyButton, loader);\n actions.insertBefore(confirmButton, loader);\n }\n }\n }\n\n function handleButtonsStyling(confirmButton, denyButton, cancelButton, params) {\n if (!params.buttonsStyling) {\n return removeClass([confirmButton, denyButton, cancelButton], swalClasses.styled);\n }\n\n addClass([confirmButton, denyButton, cancelButton], swalClasses.styled); // Buttons background colors\n\n if (params.confirmButtonColor) {\n confirmButton.style.backgroundColor = params.confirmButtonColor;\n addClass(confirmButton, swalClasses['default-outline']);\n }\n\n if (params.denyButtonColor) {\n denyButton.style.backgroundColor = params.denyButtonColor;\n addClass(denyButton, swalClasses['default-outline']);\n }\n\n if (params.cancelButtonColor) {\n cancelButton.style.backgroundColor = params.cancelButtonColor;\n addClass(cancelButton, swalClasses['default-outline']);\n }\n }\n\n function renderButton(button, buttonType, params) {\n toggle(button, params[\"show\".concat(capitalizeFirstLetter(buttonType), \"Button\")], 'inline-block');\n setInnerHtml(button, params[\"\".concat(buttonType, \"ButtonText\")]); // Set caption text\n\n button.setAttribute('aria-label', params[\"\".concat(buttonType, \"ButtonAriaLabel\")]); // ARIA label\n // Add buttons custom classes\n\n button.className = swalClasses[buttonType];\n applyCustomClass(button, params, \"\".concat(buttonType, \"Button\"));\n addClass(button, params[\"\".concat(buttonType, \"ButtonClass\")]);\n }\n\n function handleBackdropParam(container, backdrop) {\n if (typeof backdrop === 'string') {\n container.style.background = backdrop;\n } else if (!backdrop) {\n addClass([document.documentElement, document.body], swalClasses['no-backdrop']);\n }\n }\n\n function handlePositionParam(container, position) {\n if (position in swalClasses) {\n addClass(container, swalClasses[position]);\n } else {\n warn('The \"position\" parameter is not valid, defaulting to \"center\"');\n addClass(container, swalClasses.center);\n }\n }\n\n function handleGrowParam(container, grow) {\n if (grow && typeof grow === 'string') {\n const growClass = \"grow-\".concat(grow);\n\n if (growClass in swalClasses) {\n addClass(container, swalClasses[growClass]);\n }\n }\n }\n\n const renderContainer = (instance, params) => {\n const container = getContainer();\n\n if (!container) {\n return;\n }\n\n handleBackdropParam(container, params.backdrop);\n handlePositionParam(container, params.position);\n handleGrowParam(container, params.grow); // Custom class\n\n applyCustomClass(container, params, 'container');\n };\n\n /**\n * This module contains `WeakMap`s for each effectively-\"private property\" that a `Swal` has.\n * For example, to set the private property \"foo\" of `this` to \"bar\", you can `privateProps.foo.set(this, 'bar')`\n * This is the approach that Babel will probably take to implement private methods/fields\n * https://github.com/tc39/proposal-private-methods\n * https://github.com/babel/babel/pull/7555\n * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module*\n * then we can use that language feature.\n */\n var privateProps = {\n awaitingPromise: new WeakMap(),\n promise: new WeakMap(),\n innerParams: new WeakMap(),\n domCache: new WeakMap()\n };\n\n const inputTypes = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea'];\n const renderInput = (instance, params) => {\n const popup = getPopup();\n const innerParams = privateProps.innerParams.get(instance);\n const rerender = !innerParams || params.input !== innerParams.input;\n inputTypes.forEach(inputType => {\n const inputClass = swalClasses[inputType];\n const inputContainer = getDirectChildByClass(popup, inputClass); // set attributes\n\n setAttributes(inputType, params.inputAttributes); // set class\n\n inputContainer.className = inputClass;\n\n if (rerender) {\n hide(inputContainer);\n }\n });\n\n if (params.input) {\n if (rerender) {\n showInput(params);\n } // set custom class\n\n\n setCustomClass(params);\n }\n };\n\n const showInput = params => {\n if (!renderInputType[params.input]) {\n return error(\"Unexpected type of input! Expected \\\"text\\\", \\\"email\\\", \\\"password\\\", \\\"number\\\", \\\"tel\\\", \\\"select\\\", \\\"radio\\\", \\\"checkbox\\\", \\\"textarea\\\", \\\"file\\\" or \\\"url\\\", got \\\"\".concat(params.input, \"\\\"\"));\n }\n\n const inputContainer = getInputContainer(params.input);\n const input = renderInputType[params.input](inputContainer, params);\n show(input); // input autofocus\n\n setTimeout(() => {\n focusInput(input);\n });\n };\n\n const removeAttributes = input => {\n for (let i = 0; i < input.attributes.length; i++) {\n const attrName = input.attributes[i].name;\n\n if (!['type', 'value', 'style'].includes(attrName)) {\n input.removeAttribute(attrName);\n }\n }\n };\n\n const setAttributes = (inputType, inputAttributes) => {\n const input = getInput(getPopup(), inputType);\n\n if (!input) {\n return;\n }\n\n removeAttributes(input);\n\n for (const attr in inputAttributes) {\n input.setAttribute(attr, inputAttributes[attr]);\n }\n };\n\n const setCustomClass = params => {\n const inputContainer = getInputContainer(params.input);\n\n if (params.customClass) {\n addClass(inputContainer, params.customClass.input);\n }\n };\n\n const setInputPlaceholder = (input, params) => {\n if (!input.placeholder || params.inputPlaceholder) {\n input.placeholder = params.inputPlaceholder;\n }\n };\n\n const setInputLabel = (input, prependTo, params) => {\n if (params.inputLabel) {\n input.id = swalClasses.input;\n const label = document.createElement('label');\n const labelClass = swalClasses['input-label'];\n label.setAttribute('for', input.id);\n label.className = labelClass;\n addClass(label, params.customClass.inputLabel);\n label.innerText = params.inputLabel;\n prependTo.insertAdjacentElement('beforebegin', label);\n }\n };\n\n const getInputContainer = inputType => {\n const inputClass = swalClasses[inputType] ? swalClasses[inputType] : swalClasses.input;\n return getDirectChildByClass(getPopup(), inputClass);\n };\n\n const renderInputType = {};\n\n renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = (input, params) => {\n if (typeof params.inputValue === 'string' || typeof params.inputValue === 'number') {\n input.value = params.inputValue;\n } else if (!isPromise(params.inputValue)) {\n warn(\"Unexpected type of inputValue! Expected \\\"string\\\", \\\"number\\\" or \\\"Promise\\\", got \\\"\".concat(typeof params.inputValue, \"\\\"\"));\n }\n\n setInputLabel(input, input, params);\n setInputPlaceholder(input, params);\n input.type = params.input;\n return input;\n };\n\n renderInputType.file = (input, params) => {\n setInputLabel(input, input, params);\n setInputPlaceholder(input, params);\n return input;\n };\n\n renderInputType.range = (range, params) => {\n const rangeInput = range.querySelector('input');\n const rangeOutput = range.querySelector('output');\n rangeInput.value = params.inputValue;\n rangeInput.type = params.input;\n rangeOutput.value = params.inputValue;\n setInputLabel(rangeInput, range, params);\n return range;\n };\n\n renderInputType.select = (select, params) => {\n select.textContent = '';\n\n if (params.inputPlaceholder) {\n const placeholder = document.createElement('option');\n setInnerHtml(placeholder, params.inputPlaceholder);\n placeholder.value = '';\n placeholder.disabled = true;\n placeholder.selected = true;\n select.appendChild(placeholder);\n }\n\n setInputLabel(select, select, params);\n return select;\n };\n\n renderInputType.radio = radio => {\n radio.textContent = '';\n return radio;\n };\n\n renderInputType.checkbox = (checkboxContainer, params) => {\n /** @type {HTMLInputElement} */\n const checkbox = getInput(getPopup(), 'checkbox');\n checkbox.value = '1';\n checkbox.id = swalClasses.checkbox;\n checkbox.checked = Boolean(params.inputValue);\n const label = checkboxContainer.querySelector('span');\n setInnerHtml(label, params.inputPlaceholder);\n return checkboxContainer;\n };\n\n renderInputType.textarea = (textarea, params) => {\n textarea.value = params.inputValue;\n setInputPlaceholder(textarea, params);\n setInputLabel(textarea, textarea, params);\n\n const getMargin = el => parseInt(window.getComputedStyle(el).marginLeft) + parseInt(window.getComputedStyle(el).marginRight); // https://github.com/sweetalert2/sweetalert2/issues/2291\n\n\n setTimeout(() => {\n // https://github.com/sweetalert2/sweetalert2/issues/1699\n if ('MutationObserver' in window) {\n const initialPopupWidth = parseInt(window.getComputedStyle(getPopup()).width);\n\n const textareaResizeHandler = () => {\n const textareaWidth = textarea.offsetWidth + getMargin(textarea);\n\n if (textareaWidth > initialPopupWidth) {\n getPopup().style.width = \"\".concat(textareaWidth, \"px\");\n } else {\n getPopup().style.width = null;\n }\n };\n\n new MutationObserver(textareaResizeHandler).observe(textarea, {\n attributes: true,\n attributeFilter: ['style']\n });\n }\n });\n return textarea;\n };\n\n const renderContent = (instance, params) => {\n const htmlContainer = getHtmlContainer();\n applyCustomClass(htmlContainer, params, 'htmlContainer'); // Content as HTML\n\n if (params.html) {\n parseHtmlToContainer(params.html, htmlContainer);\n show(htmlContainer, 'block');\n } // Content as plain text\n else if (params.text) {\n htmlContainer.textContent = params.text;\n show(htmlContainer, 'block');\n } // No content\n else {\n hide(htmlContainer);\n }\n\n renderInput(instance, params);\n };\n\n const renderFooter = (instance, params) => {\n const footer = getFooter();\n toggle(footer, params.footer);\n\n if (params.footer) {\n parseHtmlToContainer(params.footer, footer);\n } // Custom class\n\n\n applyCustomClass(footer, params, 'footer');\n };\n\n const renderCloseButton = (instance, params) => {\n const closeButton = getCloseButton();\n setInnerHtml(closeButton, params.closeButtonHtml); // Custom class\n\n applyCustomClass(closeButton, params, 'closeButton');\n toggle(closeButton, params.showCloseButton);\n closeButton.setAttribute('aria-label', params.closeButtonAriaLabel);\n };\n\n const renderIcon = (instance, params) => {\n const innerParams = privateProps.innerParams.get(instance);\n const icon = getIcon(); // if the given icon already rendered, apply the styling without re-rendering the icon\n\n if (innerParams && params.icon === innerParams.icon) {\n // Custom or default content\n setContent(icon, params);\n applyStyles(icon, params);\n return;\n }\n\n if (!params.icon && !params.iconHtml) {\n return hide(icon);\n }\n\n if (params.icon && Object.keys(iconTypes).indexOf(params.icon) === -1) {\n error(\"Unknown icon! Expected \\\"success\\\", \\\"error\\\", \\\"warning\\\", \\\"info\\\" or \\\"question\\\", got \\\"\".concat(params.icon, \"\\\"\"));\n return hide(icon);\n }\n\n show(icon); // Custom or default content\n\n setContent(icon, params);\n applyStyles(icon, params); // Animate icon\n\n addClass(icon, params.showClass.icon);\n };\n\n const applyStyles = (icon, params) => {\n for (const iconType in iconTypes) {\n if (params.icon !== iconType) {\n removeClass(icon, iconTypes[iconType]);\n }\n }\n\n addClass(icon, iconTypes[params.icon]); // Icon color\n\n setColor(icon, params); // Success icon background color\n\n adjustSuccessIconBackgroundColor(); // Custom class\n\n applyCustomClass(icon, params, 'icon');\n }; // Adjust success icon background color to match the popup background color\n\n\n const adjustSuccessIconBackgroundColor = () => {\n const popup = getPopup();\n const popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color');\n const successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix');\n\n for (let i = 0; i < successIconParts.length; i++) {\n successIconParts[i].style.backgroundColor = popupBackgroundColor;\n }\n };\n\n const successIconHtml = \"\\n
          \\n \\n
          \\n
          \\n\";\n const errorIconHtml = \"\\n \\n \\n \\n \\n\";\n\n const setContent = (icon, params) => {\n icon.textContent = '';\n\n if (params.iconHtml) {\n setInnerHtml(icon, iconContent(params.iconHtml));\n } else if (params.icon === 'success') {\n setInnerHtml(icon, successIconHtml);\n } else if (params.icon === 'error') {\n setInnerHtml(icon, errorIconHtml);\n } else {\n const defaultIconHtml = {\n question: '?',\n warning: '!',\n info: 'i'\n };\n setInnerHtml(icon, iconContent(defaultIconHtml[params.icon]));\n }\n };\n\n const setColor = (icon, params) => {\n if (!params.iconColor) {\n return;\n }\n\n icon.style.color = params.iconColor;\n icon.style.borderColor = params.iconColor;\n\n for (const sel of ['.swal2-success-line-tip', '.swal2-success-line-long', '.swal2-x-mark-line-left', '.swal2-x-mark-line-right']) {\n setStyle(icon, sel, 'backgroundColor', params.iconColor);\n }\n\n setStyle(icon, '.swal2-success-ring', 'borderColor', params.iconColor);\n };\n\n const iconContent = content => \"
          \").concat(content, \"
          \");\n\n const renderImage = (instance, params) => {\n const image = getImage();\n\n if (!params.imageUrl) {\n return hide(image);\n }\n\n show(image, ''); // Src, alt\n\n image.setAttribute('src', params.imageUrl);\n image.setAttribute('alt', params.imageAlt); // Width, height\n\n applyNumericalStyle(image, 'width', params.imageWidth);\n applyNumericalStyle(image, 'height', params.imageHeight); // Class\n\n image.className = swalClasses.image;\n applyCustomClass(image, params, 'image');\n };\n\n const createStepElement = step => {\n const stepEl = document.createElement('li');\n addClass(stepEl, swalClasses['progress-step']);\n setInnerHtml(stepEl, step);\n return stepEl;\n };\n\n const createLineElement = params => {\n const lineEl = document.createElement('li');\n addClass(lineEl, swalClasses['progress-step-line']);\n\n if (params.progressStepsDistance) {\n lineEl.style.width = params.progressStepsDistance;\n }\n\n return lineEl;\n };\n\n const renderProgressSteps = (instance, params) => {\n const progressStepsContainer = getProgressSteps();\n\n if (!params.progressSteps || params.progressSteps.length === 0) {\n return hide(progressStepsContainer);\n }\n\n show(progressStepsContainer);\n progressStepsContainer.textContent = '';\n\n if (params.currentProgressStep >= params.progressSteps.length) {\n warn('Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)');\n }\n\n params.progressSteps.forEach((step, index) => {\n const stepEl = createStepElement(step);\n progressStepsContainer.appendChild(stepEl);\n\n if (index === params.currentProgressStep) {\n addClass(stepEl, swalClasses['active-progress-step']);\n }\n\n if (index !== params.progressSteps.length - 1) {\n const lineEl = createLineElement(params);\n progressStepsContainer.appendChild(lineEl);\n }\n });\n };\n\n const renderTitle = (instance, params) => {\n const title = getTitle();\n toggle(title, params.title || params.titleText, 'block');\n\n if (params.title) {\n parseHtmlToContainer(params.title, title);\n }\n\n if (params.titleText) {\n title.innerText = params.titleText;\n } // Custom class\n\n\n applyCustomClass(title, params, 'title');\n };\n\n const renderPopup = (instance, params) => {\n const container = getContainer();\n const popup = getPopup(); // Width\n // https://github.com/sweetalert2/sweetalert2/issues/2170\n\n if (params.toast) {\n applyNumericalStyle(container, 'width', params.width);\n popup.style.width = '100%';\n popup.insertBefore(getLoader(), getIcon());\n } else {\n applyNumericalStyle(popup, 'width', params.width);\n } // Padding\n\n\n applyNumericalStyle(popup, 'padding', params.padding); // Color\n\n if (params.color) {\n popup.style.color = params.color;\n } // Background\n\n\n if (params.background) {\n popup.style.background = params.background;\n }\n\n hide(getValidationMessage()); // Classes\n\n addClasses(popup, params);\n };\n\n const addClasses = (popup, params) => {\n // Default Class + showClass when updating Swal.update({})\n popup.className = \"\".concat(swalClasses.popup, \" \").concat(isVisible(popup) ? params.showClass.popup : '');\n\n if (params.toast) {\n addClass([document.documentElement, document.body], swalClasses['toast-shown']);\n addClass(popup, swalClasses.toast);\n } else {\n addClass(popup, swalClasses.modal);\n } // Custom class\n\n\n applyCustomClass(popup, params, 'popup');\n\n if (typeof params.customClass === 'string') {\n addClass(popup, params.customClass);\n } // Icon class (#1842)\n\n\n if (params.icon) {\n addClass(popup, swalClasses[\"icon-\".concat(params.icon)]);\n }\n };\n\n const render = (instance, params) => {\n renderPopup(instance, params);\n renderContainer(instance, params);\n renderProgressSteps(instance, params);\n renderIcon(instance, params);\n renderImage(instance, params);\n renderTitle(instance, params);\n renderCloseButton(instance, params);\n renderContent(instance, params);\n renderActions(instance, params);\n renderFooter(instance, params);\n\n if (typeof params.didRender === 'function') {\n params.didRender(getPopup());\n }\n };\n\n const DismissReason = Object.freeze({\n cancel: 'cancel',\n backdrop: 'backdrop',\n close: 'close',\n esc: 'esc',\n timer: 'timer'\n });\n\n // Adding aria-hidden=\"true\" to elements outside of the active modal dialog ensures that\n // elements not within the active modal dialog will not be surfaced if a user opens a screen\n // reader’s list of elements (headings, form controls, landmarks, etc.) in the document.\n\n const setAriaHidden = () => {\n const bodyChildren = toArray(document.body.children);\n bodyChildren.forEach(el => {\n if (el === getContainer() || el.contains(getContainer())) {\n return;\n }\n\n if (el.hasAttribute('aria-hidden')) {\n el.setAttribute('data-previous-aria-hidden', el.getAttribute('aria-hidden'));\n }\n\n el.setAttribute('aria-hidden', 'true');\n });\n };\n const unsetAriaHidden = () => {\n const bodyChildren = toArray(document.body.children);\n bodyChildren.forEach(el => {\n if (el.hasAttribute('data-previous-aria-hidden')) {\n el.setAttribute('aria-hidden', el.getAttribute('data-previous-aria-hidden'));\n el.removeAttribute('data-previous-aria-hidden');\n } else {\n el.removeAttribute('aria-hidden');\n }\n });\n };\n\n const swalStringParams = ['swal-title', 'swal-html', 'swal-footer'];\n const getTemplateParams = params => {\n const template = typeof params.template === 'string' ? document.querySelector(params.template) : params.template;\n\n if (!template) {\n return {};\n }\n /** @type {DocumentFragment} */\n\n\n const templateContent = template.content;\n showWarningsForElements(templateContent);\n const result = Object.assign(getSwalParams(templateContent), getSwalButtons(templateContent), getSwalImage(templateContent), getSwalIcon(templateContent), getSwalInput(templateContent), getSwalStringParams(templateContent, swalStringParams));\n return result;\n };\n /**\n * @param {DocumentFragment} templateContent\n */\n\n const getSwalParams = templateContent => {\n const result = {};\n toArray(templateContent.querySelectorAll('swal-param')).forEach(param => {\n showWarningsForAttributes(param, ['name', 'value']);\n const paramName = param.getAttribute('name');\n const value = param.getAttribute('value');\n\n if (typeof defaultParams[paramName] === 'boolean' && value === 'false') {\n result[paramName] = false;\n }\n\n if (typeof defaultParams[paramName] === 'object') {\n result[paramName] = JSON.parse(value);\n }\n });\n return result;\n };\n /**\n * @param {DocumentFragment} templateContent\n */\n\n\n const getSwalButtons = templateContent => {\n const result = {};\n toArray(templateContent.querySelectorAll('swal-button')).forEach(button => {\n showWarningsForAttributes(button, ['type', 'color', 'aria-label']);\n const type = button.getAttribute('type');\n result[\"\".concat(type, \"ButtonText\")] = button.innerHTML;\n result[\"show\".concat(capitalizeFirstLetter(type), \"Button\")] = true;\n\n if (button.hasAttribute('color')) {\n result[\"\".concat(type, \"ButtonColor\")] = button.getAttribute('color');\n }\n\n if (button.hasAttribute('aria-label')) {\n result[\"\".concat(type, \"ButtonAriaLabel\")] = button.getAttribute('aria-label');\n }\n });\n return result;\n };\n /**\n * @param {DocumentFragment} templateContent\n */\n\n\n const getSwalImage = templateContent => {\n const result = {};\n /** @type {HTMLElement} */\n\n const image = templateContent.querySelector('swal-image');\n\n if (image) {\n showWarningsForAttributes(image, ['src', 'width', 'height', 'alt']);\n\n if (image.hasAttribute('src')) {\n result.imageUrl = image.getAttribute('src');\n }\n\n if (image.hasAttribute('width')) {\n result.imageWidth = image.getAttribute('width');\n }\n\n if (image.hasAttribute('height')) {\n result.imageHeight = image.getAttribute('height');\n }\n\n if (image.hasAttribute('alt')) {\n result.imageAlt = image.getAttribute('alt');\n }\n }\n\n return result;\n };\n /**\n * @param {DocumentFragment} templateContent\n */\n\n\n const getSwalIcon = templateContent => {\n const result = {};\n /** @type {HTMLElement} */\n\n const icon = templateContent.querySelector('swal-icon');\n\n if (icon) {\n showWarningsForAttributes(icon, ['type', 'color']);\n\n if (icon.hasAttribute('type')) {\n result.icon = icon.getAttribute('type');\n }\n\n if (icon.hasAttribute('color')) {\n result.iconColor = icon.getAttribute('color');\n }\n\n result.iconHtml = icon.innerHTML;\n }\n\n return result;\n };\n /**\n * @param {DocumentFragment} templateContent\n */\n\n\n const getSwalInput = templateContent => {\n const result = {};\n /** @type {HTMLElement} */\n\n const input = templateContent.querySelector('swal-input');\n\n if (input) {\n showWarningsForAttributes(input, ['type', 'label', 'placeholder', 'value']);\n result.input = input.getAttribute('type') || 'text';\n\n if (input.hasAttribute('label')) {\n result.inputLabel = input.getAttribute('label');\n }\n\n if (input.hasAttribute('placeholder')) {\n result.inputPlaceholder = input.getAttribute('placeholder');\n }\n\n if (input.hasAttribute('value')) {\n result.inputValue = input.getAttribute('value');\n }\n }\n\n const inputOptions = templateContent.querySelectorAll('swal-input-option');\n\n if (inputOptions.length) {\n result.inputOptions = {};\n toArray(inputOptions).forEach(option => {\n showWarningsForAttributes(option, ['value']);\n const optionValue = option.getAttribute('value');\n const optionName = option.innerHTML;\n result.inputOptions[optionValue] = optionName;\n });\n }\n\n return result;\n };\n /**\n * @param {DocumentFragment} templateContent\n * @param {string[]} paramNames\n */\n\n\n const getSwalStringParams = (templateContent, paramNames) => {\n const result = {};\n\n for (const i in paramNames) {\n const paramName = paramNames[i];\n /** @type {HTMLElement} */\n\n const tag = templateContent.querySelector(paramName);\n\n if (tag) {\n showWarningsForAttributes(tag, []);\n result[paramName.replace(/^swal-/, '')] = tag.innerHTML.trim();\n }\n }\n\n return result;\n };\n /**\n * @param {DocumentFragment} templateContent\n */\n\n\n const showWarningsForElements = templateContent => {\n const allowedElements = swalStringParams.concat(['swal-param', 'swal-button', 'swal-image', 'swal-icon', 'swal-input', 'swal-input-option']);\n toArray(templateContent.children).forEach(el => {\n const tagName = el.tagName.toLowerCase();\n\n if (allowedElements.indexOf(tagName) === -1) {\n warn(\"Unrecognized element <\".concat(tagName, \">\"));\n }\n });\n };\n /**\n * @param {HTMLElement} el\n * @param {string[]} allowedAttributes\n */\n\n\n const showWarningsForAttributes = (el, allowedAttributes) => {\n toArray(el.attributes).forEach(attribute => {\n if (allowedAttributes.indexOf(attribute.name) === -1) {\n warn([\"Unrecognized attribute \\\"\".concat(attribute.name, \"\\\" on <\").concat(el.tagName.toLowerCase(), \">.\"), \"\".concat(allowedAttributes.length ? \"Allowed attributes are: \".concat(allowedAttributes.join(', ')) : 'To set the value, use HTML within the element.')]);\n }\n });\n };\n\n var defaultInputValidators = {\n email: (string, validationMessage) => {\n return /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z0-9-]{2,24}$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid email address');\n },\n url: (string, validationMessage) => {\n // taken from https://stackoverflow.com/a/3809435 with a small change from #1306 and #2013\n return /^https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-z]{2,63}\\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid URL');\n }\n };\n\n function setDefaultInputValidators(params) {\n // Use default `inputValidator` for supported input types if not provided\n if (!params.inputValidator) {\n Object.keys(defaultInputValidators).forEach(key => {\n if (params.input === key) {\n params.inputValidator = defaultInputValidators[key];\n }\n });\n }\n }\n\n function validateCustomTargetElement(params) {\n // Determine if the custom target element is valid\n if (!params.target || typeof params.target === 'string' && !document.querySelector(params.target) || typeof params.target !== 'string' && !params.target.appendChild) {\n warn('Target parameter is not valid, defaulting to \"body\"');\n params.target = 'body';\n }\n }\n /**\n * Set type, text and actions on popup\n *\n * @param params\n */\n\n\n function setParameters(params) {\n setDefaultInputValidators(params); // showLoaderOnConfirm && preConfirm\n\n if (params.showLoaderOnConfirm && !params.preConfirm) {\n warn('showLoaderOnConfirm is set to true, but preConfirm is not defined.\\n' + 'showLoaderOnConfirm should be used together with preConfirm, see usage example:\\n' + 'https://sweetalert2.github.io/#ajax-request');\n }\n\n validateCustomTargetElement(params); // Replace newlines with
          in title\n\n if (typeof params.title === 'string') {\n params.title = params.title.split('\\n').join('
          ');\n }\n\n init(params);\n }\n\n class Timer {\n constructor(callback, delay) {\n this.callback = callback;\n this.remaining = delay;\n this.running = false;\n this.start();\n }\n\n start() {\n if (!this.running) {\n this.running = true;\n this.started = new Date();\n this.id = setTimeout(this.callback, this.remaining);\n }\n\n return this.remaining;\n }\n\n stop() {\n if (this.running) {\n this.running = false;\n clearTimeout(this.id);\n this.remaining -= new Date().getTime() - this.started.getTime();\n }\n\n return this.remaining;\n }\n\n increase(n) {\n const running = this.running;\n\n if (running) {\n this.stop();\n }\n\n this.remaining += n;\n\n if (running) {\n this.start();\n }\n\n return this.remaining;\n }\n\n getTimerLeft() {\n if (this.running) {\n this.stop();\n this.start();\n }\n\n return this.remaining;\n }\n\n isRunning() {\n return this.running;\n }\n\n }\n\n const fixScrollbar = () => {\n // for queues, do not do this more than once\n if (states.previousBodyPadding !== null) {\n return;\n } // if the body has overflow\n\n\n if (document.body.scrollHeight > window.innerHeight) {\n // add padding so the content doesn't shift after removal of scrollbar\n states.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right'));\n document.body.style.paddingRight = \"\".concat(states.previousBodyPadding + measureScrollbar(), \"px\");\n }\n };\n const undoScrollbar = () => {\n if (states.previousBodyPadding !== null) {\n document.body.style.paddingRight = \"\".concat(states.previousBodyPadding, \"px\");\n states.previousBodyPadding = null;\n }\n };\n\n /* istanbul ignore file */\n\n const iOSfix = () => {\n const iOS = // @ts-ignore\n /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream || navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1;\n\n if (iOS && !hasClass(document.body, swalClasses.iosfix)) {\n const offset = document.body.scrollTop;\n document.body.style.top = \"\".concat(offset * -1, \"px\");\n addClass(document.body, swalClasses.iosfix);\n lockBodyScroll();\n addBottomPaddingForTallPopups();\n }\n };\n /**\n * https://github.com/sweetalert2/sweetalert2/issues/1948\n */\n\n const addBottomPaddingForTallPopups = () => {\n const ua = navigator.userAgent;\n const iOS = !!ua.match(/iPad/i) || !!ua.match(/iPhone/i);\n const webkit = !!ua.match(/WebKit/i);\n const iOSSafari = iOS && webkit && !ua.match(/CriOS/i);\n\n if (iOSSafari) {\n const bottomPanelHeight = 44;\n\n if (getPopup().scrollHeight > window.innerHeight - bottomPanelHeight) {\n getContainer().style.paddingBottom = \"\".concat(bottomPanelHeight, \"px\");\n }\n }\n };\n /**\n * https://github.com/sweetalert2/sweetalert2/issues/1246\n */\n\n\n const lockBodyScroll = () => {\n const container = getContainer();\n let preventTouchMove;\n\n container.ontouchstart = e => {\n preventTouchMove = shouldPreventTouchMove(e);\n };\n\n container.ontouchmove = e => {\n if (preventTouchMove) {\n e.preventDefault();\n e.stopPropagation();\n }\n };\n };\n\n const shouldPreventTouchMove = event => {\n const target = event.target;\n const container = getContainer();\n\n if (isStylus(event) || isZoom(event)) {\n return false;\n }\n\n if (target === container) {\n return true;\n }\n\n if (!isScrollable(container) && target.tagName !== 'INPUT' && // #1603\n target.tagName !== 'TEXTAREA' && // #2266\n !(isScrollable(getHtmlContainer()) && // #1944\n getHtmlContainer().contains(target))) {\n return true;\n }\n\n return false;\n };\n /**\n * https://github.com/sweetalert2/sweetalert2/issues/1786\n *\n * @param {*} event\n * @returns {boolean}\n */\n\n\n const isStylus = event => {\n return event.touches && event.touches.length && event.touches[0].touchType === 'stylus';\n };\n /**\n * https://github.com/sweetalert2/sweetalert2/issues/1891\n *\n * @param {TouchEvent} event\n * @returns {boolean}\n */\n\n\n const isZoom = event => {\n return event.touches && event.touches.length > 1;\n };\n\n const undoIOSfix = () => {\n if (hasClass(document.body, swalClasses.iosfix)) {\n const offset = parseInt(document.body.style.top, 10);\n removeClass(document.body, swalClasses.iosfix);\n document.body.style.top = '';\n document.body.scrollTop = offset * -1;\n }\n };\n\n const SHOW_CLASS_TIMEOUT = 10;\n /**\n * Open popup, add necessary classes and styles, fix scrollbar\n *\n * @param params\n */\n\n const openPopup = params => {\n const container = getContainer();\n const popup = getPopup();\n\n if (typeof params.willOpen === 'function') {\n params.willOpen(popup);\n }\n\n const bodyStyles = window.getComputedStyle(document.body);\n const initialBodyOverflow = bodyStyles.overflowY;\n addClasses$1(container, popup, params); // scrolling is 'hidden' until animation is done, after that 'auto'\n\n setTimeout(() => {\n setScrollingVisibility(container, popup);\n }, SHOW_CLASS_TIMEOUT);\n\n if (isModal()) {\n fixScrollContainer(container, params.scrollbarPadding, initialBodyOverflow);\n setAriaHidden();\n }\n\n if (!isToast() && !globalState.previousActiveElement) {\n globalState.previousActiveElement = document.activeElement;\n }\n\n if (typeof params.didOpen === 'function') {\n setTimeout(() => params.didOpen(popup));\n }\n\n removeClass(container, swalClasses['no-transition']);\n };\n\n const swalOpenAnimationFinished = event => {\n const popup = getPopup();\n\n if (event.target !== popup) {\n return;\n }\n\n const container = getContainer();\n popup.removeEventListener(animationEndEvent, swalOpenAnimationFinished);\n container.style.overflowY = 'auto';\n };\n\n const setScrollingVisibility = (container, popup) => {\n if (animationEndEvent && hasCssAnimation(popup)) {\n container.style.overflowY = 'hidden';\n popup.addEventListener(animationEndEvent, swalOpenAnimationFinished);\n } else {\n container.style.overflowY = 'auto';\n }\n };\n\n const fixScrollContainer = (container, scrollbarPadding, initialBodyOverflow) => {\n iOSfix();\n\n if (scrollbarPadding && initialBodyOverflow !== 'hidden') {\n fixScrollbar();\n } // sweetalert2/issues/1247\n\n\n setTimeout(() => {\n container.scrollTop = 0;\n });\n };\n\n const addClasses$1 = (container, popup, params) => {\n addClass(container, params.showClass.backdrop); // this workaround with opacity is needed for https://github.com/sweetalert2/sweetalert2/issues/2059\n\n popup.style.setProperty('opacity', '0', 'important');\n show(popup, 'grid');\n setTimeout(() => {\n // Animate popup right after showing it\n addClass(popup, params.showClass.popup); // and remove the opacity workaround\n\n popup.style.removeProperty('opacity');\n }, SHOW_CLASS_TIMEOUT); // 10ms in order to fix #2062\n\n addClass([document.documentElement, document.body], swalClasses.shown);\n\n if (params.heightAuto && params.backdrop && !params.toast) {\n addClass([document.documentElement, document.body], swalClasses['height-auto']);\n }\n };\n\n /**\n * Shows loader (spinner), this is useful with AJAX requests.\n * By default the loader be shown instead of the \"Confirm\" button.\n */\n\n const showLoading = buttonToReplace => {\n let popup = getPopup();\n\n if (!popup) {\n new Swal(); // eslint-disable-line no-new\n }\n\n popup = getPopup();\n const loader = getLoader();\n\n if (isToast()) {\n hide(getIcon());\n } else {\n replaceButton(popup, buttonToReplace);\n }\n\n show(loader);\n popup.setAttribute('data-loading', true);\n popup.setAttribute('aria-busy', true);\n popup.focus();\n };\n\n const replaceButton = (popup, buttonToReplace) => {\n const actions = getActions();\n const loader = getLoader();\n\n if (!buttonToReplace && isVisible(getConfirmButton())) {\n buttonToReplace = getConfirmButton();\n }\n\n show(actions);\n\n if (buttonToReplace) {\n hide(buttonToReplace);\n loader.setAttribute('data-button-to-replace', buttonToReplace.className);\n }\n\n loader.parentNode.insertBefore(loader, buttonToReplace);\n addClass([popup, actions], swalClasses.loading);\n };\n\n const handleInputOptionsAndValue = (instance, params) => {\n if (params.input === 'select' || params.input === 'radio') {\n handleInputOptions(instance, params);\n } else if (['text', 'email', 'number', 'tel', 'textarea'].includes(params.input) && (hasToPromiseFn(params.inputValue) || isPromise(params.inputValue))) {\n showLoading(getConfirmButton());\n handleInputValue(instance, params);\n }\n };\n const getInputValue = (instance, innerParams) => {\n const input = instance.getInput();\n\n if (!input) {\n return null;\n }\n\n switch (innerParams.input) {\n case 'checkbox':\n return getCheckboxValue(input);\n\n case 'radio':\n return getRadioValue(input);\n\n case 'file':\n return getFileValue(input);\n\n default:\n return innerParams.inputAutoTrim ? input.value.trim() : input.value;\n }\n };\n\n const getCheckboxValue = input => input.checked ? 1 : 0;\n\n const getRadioValue = input => input.checked ? input.value : null;\n\n const getFileValue = input => input.files.length ? input.getAttribute('multiple') !== null ? input.files : input.files[0] : null;\n\n const handleInputOptions = (instance, params) => {\n const popup = getPopup();\n\n const processInputOptions = inputOptions => populateInputOptions[params.input](popup, formatInputOptions(inputOptions), params);\n\n if (hasToPromiseFn(params.inputOptions) || isPromise(params.inputOptions)) {\n showLoading(getConfirmButton());\n asPromise(params.inputOptions).then(inputOptions => {\n instance.hideLoading();\n processInputOptions(inputOptions);\n });\n } else if (typeof params.inputOptions === 'object') {\n processInputOptions(params.inputOptions);\n } else {\n error(\"Unexpected type of inputOptions! Expected object, Map or Promise, got \".concat(typeof params.inputOptions));\n }\n };\n\n const handleInputValue = (instance, params) => {\n const input = instance.getInput();\n hide(input);\n asPromise(params.inputValue).then(inputValue => {\n input.value = params.input === 'number' ? parseFloat(inputValue) || 0 : \"\".concat(inputValue);\n show(input);\n input.focus();\n instance.hideLoading();\n }).catch(err => {\n error(\"Error in inputValue promise: \".concat(err));\n input.value = '';\n show(input);\n input.focus();\n instance.hideLoading();\n });\n };\n\n const populateInputOptions = {\n select: (popup, inputOptions, params) => {\n const select = getDirectChildByClass(popup, swalClasses.select);\n\n const renderOption = (parent, optionLabel, optionValue) => {\n const option = document.createElement('option');\n option.value = optionValue;\n setInnerHtml(option, optionLabel);\n option.selected = isSelected(optionValue, params.inputValue);\n parent.appendChild(option);\n };\n\n inputOptions.forEach(inputOption => {\n const optionValue = inputOption[0];\n const optionLabel = inputOption[1]; // spec:\n // https://www.w3.org/TR/html401/interact/forms.html#h-17.6\n // \"...all OPTGROUP elements must be specified directly within a SELECT element (i.e., groups may not be nested)...\"\n // check whether this is a \n\n if (Array.isArray(optionLabel)) {\n // if it is an array, then it is an \n const optgroup = document.createElement('optgroup');\n optgroup.label = optionValue;\n optgroup.disabled = false; // not configurable for now\n\n select.appendChild(optgroup);\n optionLabel.forEach(o => renderOption(optgroup, o[1], o[0]));\n } else {\n // case of \n valueFormatted = formatInputOptions(valueFormatted);\n }\n\n result.push([key, valueFormatted]);\n });\n } else {\n Object.keys(inputOptions).forEach(key => {\n let valueFormatted = inputOptions[key];\n\n if (typeof valueFormatted === 'object') {\n // case of \n valueFormatted = formatInputOptions(valueFormatted);\n }\n\n result.push([key, valueFormatted]);\n });\n }\n\n return result;\n };\n\n const isSelected = (optionValue, inputValue) => {\n return inputValue && inputValue.toString() === optionValue.toString();\n };\n\n /**\n * Hides loader and shows back the button which was hidden by .showLoading()\n */\n\n function hideLoading() {\n // do nothing if popup is closed\n const innerParams = privateProps.innerParams.get(this);\n\n if (!innerParams) {\n return;\n }\n\n const domCache = privateProps.domCache.get(this);\n hide(domCache.loader);\n\n if (isToast()) {\n if (innerParams.icon) {\n show(getIcon());\n }\n } else {\n showRelatedButton(domCache);\n }\n\n removeClass([domCache.popup, domCache.actions], swalClasses.loading);\n domCache.popup.removeAttribute('aria-busy');\n domCache.popup.removeAttribute('data-loading');\n domCache.confirmButton.disabled = false;\n domCache.denyButton.disabled = false;\n domCache.cancelButton.disabled = false;\n }\n\n const showRelatedButton = domCache => {\n const buttonToReplace = domCache.popup.getElementsByClassName(domCache.loader.getAttribute('data-button-to-replace'));\n\n if (buttonToReplace.length) {\n show(buttonToReplace[0], 'inline-block');\n } else if (allButtonsAreHidden()) {\n hide(domCache.actions);\n }\n };\n\n /**\n * Gets the input DOM node, this method works with input parameter.\n * @returns {HTMLElement | null}\n */\n\n function getInput$1(instance) {\n const innerParams = privateProps.innerParams.get(instance || this);\n const domCache = privateProps.domCache.get(instance || this);\n\n if (!domCache) {\n return null;\n }\n\n return getInput(domCache.popup, innerParams.input);\n }\n\n /**\n * This module contains `WeakMap`s for each effectively-\"private property\" that a `Swal` has.\n * For example, to set the private property \"foo\" of `this` to \"bar\", you can `privateProps.foo.set(this, 'bar')`\n * This is the approach that Babel will probably take to implement private methods/fields\n * https://github.com/tc39/proposal-private-methods\n * https://github.com/babel/babel/pull/7555\n * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module*\n * then we can use that language feature.\n */\n var privateMethods = {\n swalPromiseResolve: new WeakMap(),\n swalPromiseReject: new WeakMap()\n };\n\n /*\n * Global function to determine if SweetAlert2 popup is shown\n */\n\n const isVisible$1 = () => {\n return isVisible(getPopup());\n };\n /*\n * Global function to click 'Confirm' button\n */\n\n const clickConfirm = () => getConfirmButton() && getConfirmButton().click();\n /*\n * Global function to click 'Deny' button\n */\n\n const clickDeny = () => getDenyButton() && getDenyButton().click();\n /*\n * Global function to click 'Cancel' button\n */\n\n const clickCancel = () => getCancelButton() && getCancelButton().click();\n\n const removeKeydownHandler = globalState => {\n if (globalState.keydownTarget && globalState.keydownHandlerAdded) {\n globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, {\n capture: globalState.keydownListenerCapture\n });\n globalState.keydownHandlerAdded = false;\n }\n };\n const addKeydownHandler = (instance, globalState, innerParams, dismissWith) => {\n removeKeydownHandler(globalState);\n\n if (!innerParams.toast) {\n globalState.keydownHandler = e => keydownHandler(instance, e, dismissWith);\n\n globalState.keydownTarget = innerParams.keydownListenerCapture ? window : getPopup();\n globalState.keydownListenerCapture = innerParams.keydownListenerCapture;\n globalState.keydownTarget.addEventListener('keydown', globalState.keydownHandler, {\n capture: globalState.keydownListenerCapture\n });\n globalState.keydownHandlerAdded = true;\n }\n }; // Focus handling\n\n const setFocus = (innerParams, index, increment) => {\n const focusableElements = getFocusableElements(); // search for visible elements and select the next possible match\n\n if (focusableElements.length) {\n index = index + increment; // rollover to first item\n\n if (index === focusableElements.length) {\n index = 0; // go to last item\n } else if (index === -1) {\n index = focusableElements.length - 1;\n }\n\n return focusableElements[index].focus();\n } // no visible focusable elements, focus the popup\n\n\n getPopup().focus();\n };\n const arrowKeysNextButton = ['ArrowRight', 'ArrowDown'];\n const arrowKeysPreviousButton = ['ArrowLeft', 'ArrowUp'];\n\n const keydownHandler = (instance, e, dismissWith) => {\n const innerParams = privateProps.innerParams.get(instance);\n\n if (!innerParams) {\n return; // This instance has already been destroyed\n } // Ignore keydown during IME composition\n // https://developer.mozilla.org/en-US/docs/Web/API/Document/keydown_event#ignoring_keydown_during_ime_composition\n // https://github.com/sweetalert2/sweetalert2/issues/720\n // https://github.com/sweetalert2/sweetalert2/issues/2406\n\n\n if (e.isComposing || e.keyCode === 229) {\n return;\n }\n\n if (innerParams.stopKeydownPropagation) {\n e.stopPropagation();\n } // ENTER\n\n\n if (e.key === 'Enter') {\n handleEnter(instance, e, innerParams);\n } // TAB\n else if (e.key === 'Tab') {\n handleTab(e, innerParams);\n } // ARROWS - switch focus between buttons\n else if ([...arrowKeysNextButton, ...arrowKeysPreviousButton].includes(e.key)) {\n handleArrows(e.key);\n } // ESC\n else if (e.key === 'Escape') {\n handleEsc(e, innerParams, dismissWith);\n }\n };\n\n const handleEnter = (instance, e, innerParams) => {\n // https://github.com/sweetalert2/sweetalert2/issues/2386\n if (!callIfFunction(innerParams.allowEnterKey)) {\n return;\n }\n\n if (e.target && instance.getInput() && e.target.outerHTML === instance.getInput().outerHTML) {\n if (['textarea', 'file'].includes(innerParams.input)) {\n return; // do not submit\n }\n\n clickConfirm();\n e.preventDefault();\n }\n };\n\n const handleTab = (e, innerParams) => {\n const targetElement = e.target;\n const focusableElements = getFocusableElements();\n let btnIndex = -1;\n\n for (let i = 0; i < focusableElements.length; i++) {\n if (targetElement === focusableElements[i]) {\n btnIndex = i;\n break;\n }\n } // Cycle to the next button\n\n\n if (!e.shiftKey) {\n setFocus(innerParams, btnIndex, 1);\n } // Cycle to the prev button\n else {\n setFocus(innerParams, btnIndex, -1);\n }\n\n e.stopPropagation();\n e.preventDefault();\n };\n\n const handleArrows = key => {\n const confirmButton = getConfirmButton();\n const denyButton = getDenyButton();\n const cancelButton = getCancelButton();\n\n if (![confirmButton, denyButton, cancelButton].includes(document.activeElement)) {\n return;\n }\n\n const sibling = arrowKeysNextButton.includes(key) ? 'nextElementSibling' : 'previousElementSibling';\n let buttonToFocus = document.activeElement;\n\n for (let i = 0; i < getActions().children.length; i++) {\n buttonToFocus = buttonToFocus[sibling];\n\n if (!buttonToFocus) {\n return;\n }\n\n if (isVisible(buttonToFocus) && buttonToFocus instanceof HTMLButtonElement) {\n break;\n }\n }\n\n if (buttonToFocus instanceof HTMLButtonElement) {\n buttonToFocus.focus();\n }\n };\n\n const handleEsc = (e, innerParams, dismissWith) => {\n if (callIfFunction(innerParams.allowEscapeKey)) {\n e.preventDefault();\n dismissWith(DismissReason.esc);\n }\n };\n\n /*\n * Instance method to close sweetAlert\n */\n\n function removePopupAndResetState(instance, container, returnFocus, didClose) {\n if (isToast()) {\n triggerDidCloseAndDispose(instance, didClose);\n } else {\n restoreActiveElement(returnFocus).then(() => triggerDidCloseAndDispose(instance, didClose));\n removeKeydownHandler(globalState);\n }\n\n const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); // workaround for #2088\n // for some reason removing the container in Safari will scroll the document to bottom\n\n if (isSafari) {\n container.setAttribute('style', 'display:none !important');\n container.removeAttribute('class');\n container.innerHTML = '';\n } else {\n container.remove();\n }\n\n if (isModal()) {\n undoScrollbar();\n undoIOSfix();\n unsetAriaHidden();\n }\n\n removeBodyClasses();\n }\n\n function removeBodyClasses() {\n removeClass([document.documentElement, document.body], [swalClasses.shown, swalClasses['height-auto'], swalClasses['no-backdrop'], swalClasses['toast-shown']]);\n }\n\n function close(resolveValue) {\n resolveValue = prepareResolveValue(resolveValue);\n const swalPromiseResolve = privateMethods.swalPromiseResolve.get(this);\n const didClose = triggerClosePopup(this);\n\n if (this.isAwaitingPromise()) {\n // A swal awaiting for a promise (after a click on Confirm or Deny) cannot be dismissed anymore #2335\n if (!resolveValue.isDismissed) {\n handleAwaitingPromise(this);\n swalPromiseResolve(resolveValue);\n }\n } else if (didClose) {\n // Resolve Swal promise\n swalPromiseResolve(resolveValue);\n }\n }\n function isAwaitingPromise() {\n return !!privateProps.awaitingPromise.get(this);\n }\n\n const triggerClosePopup = instance => {\n const popup = getPopup();\n\n if (!popup) {\n return false;\n }\n\n const innerParams = privateProps.innerParams.get(instance);\n\n if (!innerParams || hasClass(popup, innerParams.hideClass.popup)) {\n return false;\n }\n\n removeClass(popup, innerParams.showClass.popup);\n addClass(popup, innerParams.hideClass.popup);\n const backdrop = getContainer();\n removeClass(backdrop, innerParams.showClass.backdrop);\n addClass(backdrop, innerParams.hideClass.backdrop);\n handlePopupAnimation(instance, popup, innerParams);\n return true;\n };\n\n function rejectPromise(error) {\n const rejectPromise = privateMethods.swalPromiseReject.get(this);\n handleAwaitingPromise(this);\n\n if (rejectPromise) {\n // Reject Swal promise\n rejectPromise(error);\n }\n }\n const handleAwaitingPromise = instance => {\n if (instance.isAwaitingPromise()) {\n privateProps.awaitingPromise.delete(instance); // The instance might have been previously partly destroyed, we must resume the destroy process in this case #2335\n\n if (!privateProps.innerParams.get(instance)) {\n instance._destroy();\n }\n }\n };\n\n const prepareResolveValue = resolveValue => {\n // When user calls Swal.close()\n if (typeof resolveValue === 'undefined') {\n return {\n isConfirmed: false,\n isDenied: false,\n isDismissed: true\n };\n }\n\n return Object.assign({\n isConfirmed: false,\n isDenied: false,\n isDismissed: false\n }, resolveValue);\n };\n\n const handlePopupAnimation = (instance, popup, innerParams) => {\n const container = getContainer(); // If animation is supported, animate\n\n const animationIsSupported = animationEndEvent && hasCssAnimation(popup);\n\n if (typeof innerParams.willClose === 'function') {\n innerParams.willClose(popup);\n }\n\n if (animationIsSupported) {\n animatePopup(instance, popup, container, innerParams.returnFocus, innerParams.didClose);\n } else {\n // Otherwise, remove immediately\n removePopupAndResetState(instance, container, innerParams.returnFocus, innerParams.didClose);\n }\n };\n\n const animatePopup = (instance, popup, container, returnFocus, didClose) => {\n globalState.swalCloseEventFinishedCallback = removePopupAndResetState.bind(null, instance, container, returnFocus, didClose);\n popup.addEventListener(animationEndEvent, function (e) {\n if (e.target === popup) {\n globalState.swalCloseEventFinishedCallback();\n delete globalState.swalCloseEventFinishedCallback;\n }\n });\n };\n\n const triggerDidCloseAndDispose = (instance, didClose) => {\n setTimeout(() => {\n if (typeof didClose === 'function') {\n didClose.bind(instance.params)();\n }\n\n instance._destroy();\n });\n };\n\n function setButtonsDisabled(instance, buttons, disabled) {\n const domCache = privateProps.domCache.get(instance);\n buttons.forEach(button => {\n domCache[button].disabled = disabled;\n });\n }\n\n function setInputDisabled(input, disabled) {\n if (!input) {\n return false;\n }\n\n if (input.type === 'radio') {\n const radiosContainer = input.parentNode.parentNode;\n const radios = radiosContainer.querySelectorAll('input');\n\n for (let i = 0; i < radios.length; i++) {\n radios[i].disabled = disabled;\n }\n } else {\n input.disabled = disabled;\n }\n }\n\n function enableButtons() {\n setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], false);\n }\n function disableButtons() {\n setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], true);\n }\n function enableInput() {\n return setInputDisabled(this.getInput(), false);\n }\n function disableInput() {\n return setInputDisabled(this.getInput(), true);\n }\n\n function showValidationMessage(error) {\n const domCache = privateProps.domCache.get(this);\n const params = privateProps.innerParams.get(this);\n setInnerHtml(domCache.validationMessage, error);\n domCache.validationMessage.className = swalClasses['validation-message'];\n\n if (params.customClass && params.customClass.validationMessage) {\n addClass(domCache.validationMessage, params.customClass.validationMessage);\n }\n\n show(domCache.validationMessage);\n const input = this.getInput();\n\n if (input) {\n input.setAttribute('aria-invalid', true);\n input.setAttribute('aria-describedby', swalClasses['validation-message']);\n focusInput(input);\n addClass(input, swalClasses.inputerror);\n }\n } // Hide block with validation message\n\n function resetValidationMessage$1() {\n const domCache = privateProps.domCache.get(this);\n\n if (domCache.validationMessage) {\n hide(domCache.validationMessage);\n }\n\n const input = this.getInput();\n\n if (input) {\n input.removeAttribute('aria-invalid');\n input.removeAttribute('aria-describedby');\n removeClass(input, swalClasses.inputerror);\n }\n }\n\n function getProgressSteps$1() {\n const domCache = privateProps.domCache.get(this);\n return domCache.progressSteps;\n }\n\n /**\n * Updates popup parameters.\n */\n\n function update(params) {\n const popup = getPopup();\n const innerParams = privateProps.innerParams.get(this);\n\n if (!popup || hasClass(popup, innerParams.hideClass.popup)) {\n return warn(\"You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.\");\n }\n\n const validUpdatableParams = filterValidParams(params);\n const updatedParams = Object.assign({}, innerParams, validUpdatableParams);\n render(this, updatedParams);\n privateProps.innerParams.set(this, updatedParams);\n Object.defineProperties(this, {\n params: {\n value: Object.assign({}, this.params, params),\n writable: false,\n enumerable: true\n }\n });\n }\n\n const filterValidParams = params => {\n const validUpdatableParams = {};\n Object.keys(params).forEach(param => {\n if (isUpdatableParameter(param)) {\n validUpdatableParams[param] = params[param];\n } else {\n warn(\"Invalid parameter to update: \\\"\".concat(param, \"\\\". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\\n\\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md\"));\n }\n });\n return validUpdatableParams;\n };\n\n function _destroy() {\n const domCache = privateProps.domCache.get(this);\n const innerParams = privateProps.innerParams.get(this);\n\n if (!innerParams) {\n disposeWeakMaps(this); // The WeakMaps might have been partly destroyed, we must recall it to dispose any remaining WeakMaps #2335\n\n return; // This instance has already been destroyed\n } // Check if there is another Swal closing\n\n\n if (domCache.popup && globalState.swalCloseEventFinishedCallback) {\n globalState.swalCloseEventFinishedCallback();\n delete globalState.swalCloseEventFinishedCallback;\n } // Check if there is a swal disposal defer timer\n\n\n if (globalState.deferDisposalTimer) {\n clearTimeout(globalState.deferDisposalTimer);\n delete globalState.deferDisposalTimer;\n }\n\n if (typeof innerParams.didDestroy === 'function') {\n innerParams.didDestroy();\n }\n\n disposeSwal(this);\n }\n\n const disposeSwal = instance => {\n disposeWeakMaps(instance); // Unset this.params so GC will dispose it (#1569)\n\n delete instance.params; // Unset globalState props so GC will dispose globalState (#1569)\n\n delete globalState.keydownHandler;\n delete globalState.keydownTarget; // Unset currentInstance\n\n delete globalState.currentInstance;\n };\n\n const disposeWeakMaps = instance => {\n // If the current instance is awaiting a promise result, we keep the privateMethods to call them once the promise result is retrieved #2335\n if (instance.isAwaitingPromise()) {\n unsetWeakMaps(privateProps, instance);\n privateProps.awaitingPromise.set(instance, true);\n } else {\n unsetWeakMaps(privateMethods, instance);\n unsetWeakMaps(privateProps, instance);\n }\n };\n\n const unsetWeakMaps = (obj, instance) => {\n for (const i in obj) {\n obj[i].delete(instance);\n }\n };\n\n\n\n var instanceMethods = /*#__PURE__*/Object.freeze({\n hideLoading: hideLoading,\n disableLoading: hideLoading,\n getInput: getInput$1,\n close: close,\n isAwaitingPromise: isAwaitingPromise,\n rejectPromise: rejectPromise,\n handleAwaitingPromise: handleAwaitingPromise,\n closePopup: close,\n closeModal: close,\n closeToast: close,\n enableButtons: enableButtons,\n disableButtons: disableButtons,\n enableInput: enableInput,\n disableInput: disableInput,\n showValidationMessage: showValidationMessage,\n resetValidationMessage: resetValidationMessage$1,\n getProgressSteps: getProgressSteps$1,\n update: update,\n _destroy: _destroy\n });\n\n const handleConfirmButtonClick = instance => {\n const innerParams = privateProps.innerParams.get(instance);\n instance.disableButtons();\n\n if (innerParams.input) {\n handleConfirmOrDenyWithInput(instance, 'confirm');\n } else {\n confirm(instance, true);\n }\n };\n const handleDenyButtonClick = instance => {\n const innerParams = privateProps.innerParams.get(instance);\n instance.disableButtons();\n\n if (innerParams.returnInputValueOnDeny) {\n handleConfirmOrDenyWithInput(instance, 'deny');\n } else {\n deny(instance, false);\n }\n };\n const handleCancelButtonClick = (instance, dismissWith) => {\n instance.disableButtons();\n dismissWith(DismissReason.cancel);\n };\n\n const handleConfirmOrDenyWithInput = (instance, type\n /* 'confirm' | 'deny' */\n ) => {\n const innerParams = privateProps.innerParams.get(instance);\n\n if (!innerParams.input) {\n return error(\"The \\\"input\\\" parameter is needed to be set when using returnInputValueOn\".concat(capitalizeFirstLetter(type)));\n }\n\n const inputValue = getInputValue(instance, innerParams);\n\n if (innerParams.inputValidator) {\n handleInputValidator(instance, inputValue, type);\n } else if (!instance.getInput().checkValidity()) {\n instance.enableButtons();\n instance.showValidationMessage(innerParams.validationMessage);\n } else if (type === 'deny') {\n deny(instance, inputValue);\n } else {\n confirm(instance, inputValue);\n }\n };\n\n const handleInputValidator = (instance, inputValue, type\n /* 'confirm' | 'deny' */\n ) => {\n const innerParams = privateProps.innerParams.get(instance);\n instance.disableInput();\n const validationPromise = Promise.resolve().then(() => asPromise(innerParams.inputValidator(inputValue, innerParams.validationMessage)));\n validationPromise.then(validationMessage => {\n instance.enableButtons();\n instance.enableInput();\n\n if (validationMessage) {\n instance.showValidationMessage(validationMessage);\n } else if (type === 'deny') {\n deny(instance, inputValue);\n } else {\n confirm(instance, inputValue);\n }\n });\n };\n\n const deny = (instance, value) => {\n const innerParams = privateProps.innerParams.get(instance || undefined);\n\n if (innerParams.showLoaderOnDeny) {\n showLoading(getDenyButton());\n }\n\n if (innerParams.preDeny) {\n privateProps.awaitingPromise.set(instance || undefined, true); // Flagging the instance as awaiting a promise so it's own promise's reject/resolve methods doesn't get destroyed until the result from this preDeny's promise is received\n\n const preDenyPromise = Promise.resolve().then(() => asPromise(innerParams.preDeny(value, innerParams.validationMessage)));\n preDenyPromise.then(preDenyValue => {\n if (preDenyValue === false) {\n instance.hideLoading();\n handleAwaitingPromise(instance);\n } else {\n instance.closePopup({\n isDenied: true,\n value: typeof preDenyValue === 'undefined' ? value : preDenyValue\n });\n }\n }).catch(error$$1 => rejectWith(instance || undefined, error$$1));\n } else {\n instance.closePopup({\n isDenied: true,\n value\n });\n }\n };\n\n const succeedWith = (instance, value) => {\n instance.closePopup({\n isConfirmed: true,\n value\n });\n };\n\n const rejectWith = (instance, error$$1) => {\n instance.rejectPromise(error$$1);\n };\n\n const confirm = (instance, value) => {\n const innerParams = privateProps.innerParams.get(instance || undefined);\n\n if (innerParams.showLoaderOnConfirm) {\n showLoading();\n }\n\n if (innerParams.preConfirm) {\n instance.resetValidationMessage();\n privateProps.awaitingPromise.set(instance || undefined, true); // Flagging the instance as awaiting a promise so it's own promise's reject/resolve methods doesn't get destroyed until the result from this preConfirm's promise is received\n\n const preConfirmPromise = Promise.resolve().then(() => asPromise(innerParams.preConfirm(value, innerParams.validationMessage)));\n preConfirmPromise.then(preConfirmValue => {\n if (isVisible(getValidationMessage()) || preConfirmValue === false) {\n instance.hideLoading();\n handleAwaitingPromise(instance);\n } else {\n succeedWith(instance, typeof preConfirmValue === 'undefined' ? value : preConfirmValue);\n }\n }).catch(error$$1 => rejectWith(instance || undefined, error$$1));\n } else {\n succeedWith(instance, value);\n }\n };\n\n const handlePopupClick = (instance, domCache, dismissWith) => {\n const innerParams = privateProps.innerParams.get(instance);\n\n if (innerParams.toast) {\n handleToastClick(instance, domCache, dismissWith);\n } else {\n // Ignore click events that had mousedown on the popup but mouseup on the container\n // This can happen when the user drags a slider\n handleModalMousedown(domCache); // Ignore click events that had mousedown on the container but mouseup on the popup\n\n handleContainerMousedown(domCache);\n handleModalClick(instance, domCache, dismissWith);\n }\n };\n\n const handleToastClick = (instance, domCache, dismissWith) => {\n // Closing toast by internal click\n domCache.popup.onclick = () => {\n const innerParams = privateProps.innerParams.get(instance);\n\n if (innerParams && (isAnyButtonShown(innerParams) || innerParams.timer || innerParams.input)) {\n return;\n }\n\n dismissWith(DismissReason.close);\n };\n };\n /**\n * @param {*} innerParams\n * @returns {boolean}\n */\n\n\n const isAnyButtonShown = innerParams => {\n return innerParams.showConfirmButton || innerParams.showDenyButton || innerParams.showCancelButton || innerParams.showCloseButton;\n };\n\n let ignoreOutsideClick = false;\n\n const handleModalMousedown = domCache => {\n domCache.popup.onmousedown = () => {\n domCache.container.onmouseup = function (e) {\n domCache.container.onmouseup = undefined; // We only check if the mouseup target is the container because usually it doesn't\n // have any other direct children aside of the popup\n\n if (e.target === domCache.container) {\n ignoreOutsideClick = true;\n }\n };\n };\n };\n\n const handleContainerMousedown = domCache => {\n domCache.container.onmousedown = () => {\n domCache.popup.onmouseup = function (e) {\n domCache.popup.onmouseup = undefined; // We also need to check if the mouseup target is a child of the popup\n\n if (e.target === domCache.popup || domCache.popup.contains(e.target)) {\n ignoreOutsideClick = true;\n }\n };\n };\n };\n\n const handleModalClick = (instance, domCache, dismissWith) => {\n domCache.container.onclick = e => {\n const innerParams = privateProps.innerParams.get(instance);\n\n if (ignoreOutsideClick) {\n ignoreOutsideClick = false;\n return;\n }\n\n if (e.target === domCache.container && callIfFunction(innerParams.allowOutsideClick)) {\n dismissWith(DismissReason.backdrop);\n }\n };\n };\n\n const isJqueryElement = elem => typeof elem === 'object' && elem.jquery;\n\n const isElement = elem => elem instanceof Element || isJqueryElement(elem);\n\n const argsToParams = args => {\n const params = {};\n\n if (typeof args[0] === 'object' && !isElement(args[0])) {\n Object.assign(params, args[0]);\n } else {\n ['title', 'html', 'icon'].forEach((name, index) => {\n const arg = args[index];\n\n if (typeof arg === 'string' || isElement(arg)) {\n params[name] = arg;\n } else if (arg !== undefined) {\n error(\"Unexpected type of \".concat(name, \"! Expected \\\"string\\\" or \\\"Element\\\", got \").concat(typeof arg));\n }\n });\n }\n\n return params;\n };\n\n function fire() {\n const Swal = this; // eslint-disable-line @typescript-eslint/no-this-alias\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return new Swal(...args);\n }\n\n /**\n * Returns an extended version of `Swal` containing `params` as defaults.\n * Useful for reusing Swal configuration.\n *\n * For example:\n *\n * Before:\n * const textPromptOptions = { input: 'text', showCancelButton: true }\n * const {value: firstName} = await Swal.fire({ ...textPromptOptions, title: 'What is your first name?' })\n * const {value: lastName} = await Swal.fire({ ...textPromptOptions, title: 'What is your last name?' })\n *\n * After:\n * const TextPrompt = Swal.mixin({ input: 'text', showCancelButton: true })\n * const {value: firstName} = await TextPrompt('What is your first name?')\n * const {value: lastName} = await TextPrompt('What is your last name?')\n *\n * @param mixinParams\n */\n function mixin(mixinParams) {\n class MixinSwal extends this {\n _main(params, priorityMixinParams) {\n return super._main(params, Object.assign({}, mixinParams, priorityMixinParams));\n }\n\n }\n\n return MixinSwal;\n }\n\n /**\n * If `timer` parameter is set, returns number of milliseconds of timer remained.\n * Otherwise, returns undefined.\n */\n\n const getTimerLeft = () => {\n return globalState.timeout && globalState.timeout.getTimerLeft();\n };\n /**\n * Stop timer. Returns number of milliseconds of timer remained.\n * If `timer` parameter isn't set, returns undefined.\n */\n\n const stopTimer = () => {\n if (globalState.timeout) {\n stopTimerProgressBar();\n return globalState.timeout.stop();\n }\n };\n /**\n * Resume timer. Returns number of milliseconds of timer remained.\n * If `timer` parameter isn't set, returns undefined.\n */\n\n const resumeTimer = () => {\n if (globalState.timeout) {\n const remaining = globalState.timeout.start();\n animateTimerProgressBar(remaining);\n return remaining;\n }\n };\n /**\n * Resume timer. Returns number of milliseconds of timer remained.\n * If `timer` parameter isn't set, returns undefined.\n */\n\n const toggleTimer = () => {\n const timer = globalState.timeout;\n return timer && (timer.running ? stopTimer() : resumeTimer());\n };\n /**\n * Increase timer. Returns number of milliseconds of an updated timer.\n * If `timer` parameter isn't set, returns undefined.\n */\n\n const increaseTimer = n => {\n if (globalState.timeout) {\n const remaining = globalState.timeout.increase(n);\n animateTimerProgressBar(remaining, true);\n return remaining;\n }\n };\n /**\n * Check if timer is running. Returns true if timer is running\n * or false if timer is paused or stopped.\n * If `timer` parameter isn't set, returns undefined\n */\n\n const isTimerRunning = () => {\n return globalState.timeout && globalState.timeout.isRunning();\n };\n\n let bodyClickListenerAdded = false;\n const clickHandlers = {};\n function bindClickHandler() {\n let attr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'data-swal-template';\n clickHandlers[attr] = this;\n\n if (!bodyClickListenerAdded) {\n document.body.addEventListener('click', bodyClickListener);\n bodyClickListenerAdded = true;\n }\n }\n\n const bodyClickListener = event => {\n for (let el = event.target; el && el !== document; el = el.parentNode) {\n for (const attr in clickHandlers) {\n const template = el.getAttribute(attr);\n\n if (template) {\n clickHandlers[attr].fire({\n template\n });\n return;\n }\n }\n }\n };\n\n\n\n var staticMethods = /*#__PURE__*/Object.freeze({\n isValidParameter: isValidParameter,\n isUpdatableParameter: isUpdatableParameter,\n isDeprecatedParameter: isDeprecatedParameter,\n argsToParams: argsToParams,\n isVisible: isVisible$1,\n clickConfirm: clickConfirm,\n clickDeny: clickDeny,\n clickCancel: clickCancel,\n getContainer: getContainer,\n getPopup: getPopup,\n getTitle: getTitle,\n getHtmlContainer: getHtmlContainer,\n getImage: getImage,\n getIcon: getIcon,\n getInputLabel: getInputLabel,\n getCloseButton: getCloseButton,\n getActions: getActions,\n getConfirmButton: getConfirmButton,\n getDenyButton: getDenyButton,\n getCancelButton: getCancelButton,\n getLoader: getLoader,\n getFooter: getFooter,\n getTimerProgressBar: getTimerProgressBar,\n getFocusableElements: getFocusableElements,\n getValidationMessage: getValidationMessage,\n isLoading: isLoading,\n fire: fire,\n mixin: mixin,\n showLoading: showLoading,\n enableLoading: showLoading,\n getTimerLeft: getTimerLeft,\n stopTimer: stopTimer,\n resumeTimer: resumeTimer,\n toggleTimer: toggleTimer,\n increaseTimer: increaseTimer,\n isTimerRunning: isTimerRunning,\n bindClickHandler: bindClickHandler\n });\n\n let currentInstance;\n\n class SweetAlert {\n constructor() {\n // Prevent run in Node env\n if (typeof window === 'undefined') {\n return;\n }\n\n currentInstance = this; // @ts-ignore\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n const outerParams = Object.freeze(this.constructor.argsToParams(args));\n Object.defineProperties(this, {\n params: {\n value: outerParams,\n writable: false,\n enumerable: true,\n configurable: true\n }\n }); // @ts-ignore\n\n const promise = this._main(this.params);\n\n privateProps.promise.set(this, promise);\n }\n\n _main(userParams) {\n let mixinParams = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n showWarningsForParams(Object.assign({}, mixinParams, userParams));\n\n if (globalState.currentInstance) {\n globalState.currentInstance._destroy();\n\n if (isModal()) {\n unsetAriaHidden();\n }\n }\n\n globalState.currentInstance = this;\n const innerParams = prepareParams(userParams, mixinParams);\n setParameters(innerParams);\n Object.freeze(innerParams); // clear the previous timer\n\n if (globalState.timeout) {\n globalState.timeout.stop();\n delete globalState.timeout;\n } // clear the restore focus timeout\n\n\n clearTimeout(globalState.restoreFocusTimeout);\n const domCache = populateDomCache(this);\n render(this, innerParams);\n privateProps.innerParams.set(this, innerParams);\n return swalPromise(this, domCache, innerParams);\n } // `catch` cannot be the name of a module export, so we define our thenable methods here instead\n\n\n then(onFulfilled) {\n const promise = privateProps.promise.get(this);\n return promise.then(onFulfilled);\n }\n\n finally(onFinally) {\n const promise = privateProps.promise.get(this);\n return promise.finally(onFinally);\n }\n\n }\n\n const swalPromise = (instance, domCache, innerParams) => {\n return new Promise((resolve, reject) => {\n // functions to handle all closings/dismissals\n const dismissWith = dismiss => {\n instance.closePopup({\n isDismissed: true,\n dismiss\n });\n };\n\n privateMethods.swalPromiseResolve.set(instance, resolve);\n privateMethods.swalPromiseReject.set(instance, reject);\n\n domCache.confirmButton.onclick = () => handleConfirmButtonClick(instance);\n\n domCache.denyButton.onclick = () => handleDenyButtonClick(instance);\n\n domCache.cancelButton.onclick = () => handleCancelButtonClick(instance, dismissWith);\n\n domCache.closeButton.onclick = () => dismissWith(DismissReason.close);\n\n handlePopupClick(instance, domCache, dismissWith);\n addKeydownHandler(instance, globalState, innerParams, dismissWith);\n handleInputOptionsAndValue(instance, innerParams);\n openPopup(innerParams);\n setupTimer(globalState, innerParams, dismissWith);\n initFocus(domCache, innerParams); // Scroll container to top on open (#1247, #1946)\n\n setTimeout(() => {\n domCache.container.scrollTop = 0;\n });\n });\n };\n\n const prepareParams = (userParams, mixinParams) => {\n const templateParams = getTemplateParams(userParams);\n const params = Object.assign({}, defaultParams, mixinParams, templateParams, userParams); // precedence is described in #2131\n\n params.showClass = Object.assign({}, defaultParams.showClass, params.showClass);\n params.hideClass = Object.assign({}, defaultParams.hideClass, params.hideClass);\n return params;\n };\n\n const populateDomCache = instance => {\n const domCache = {\n popup: getPopup(),\n container: getContainer(),\n actions: getActions(),\n confirmButton: getConfirmButton(),\n denyButton: getDenyButton(),\n cancelButton: getCancelButton(),\n loader: getLoader(),\n closeButton: getCloseButton(),\n validationMessage: getValidationMessage(),\n progressSteps: getProgressSteps()\n };\n privateProps.domCache.set(instance, domCache);\n return domCache;\n };\n\n const setupTimer = (globalState$$1, innerParams, dismissWith) => {\n const timerProgressBar = getTimerProgressBar();\n hide(timerProgressBar);\n\n if (innerParams.timer) {\n globalState$$1.timeout = new Timer(() => {\n dismissWith('timer');\n delete globalState$$1.timeout;\n }, innerParams.timer);\n\n if (innerParams.timerProgressBar) {\n show(timerProgressBar);\n applyCustomClass(timerProgressBar, innerParams, 'timerProgressBar');\n setTimeout(() => {\n if (globalState$$1.timeout && globalState$$1.timeout.running) {\n // timer can be already stopped or unset at this point\n animateTimerProgressBar(innerParams.timer);\n }\n });\n }\n }\n };\n\n const initFocus = (domCache, innerParams) => {\n if (innerParams.toast) {\n return;\n }\n\n if (!callIfFunction(innerParams.allowEnterKey)) {\n return blurActiveElement();\n }\n\n if (!focusButton(domCache, innerParams)) {\n setFocus(innerParams, -1, 1);\n }\n };\n\n const focusButton = (domCache, innerParams) => {\n if (innerParams.focusDeny && isVisible(domCache.denyButton)) {\n domCache.denyButton.focus();\n return true;\n }\n\n if (innerParams.focusCancel && isVisible(domCache.cancelButton)) {\n domCache.cancelButton.focus();\n return true;\n }\n\n if (innerParams.focusConfirm && isVisible(domCache.confirmButton)) {\n domCache.confirmButton.focus();\n return true;\n }\n\n return false;\n };\n\n const blurActiveElement = () => {\n if (document.activeElement instanceof HTMLElement && typeof document.activeElement.blur === 'function') {\n document.activeElement.blur();\n }\n }; // Assign instance methods from src/instanceMethods/*.js to prototype\n\n\n Object.assign(SweetAlert.prototype, instanceMethods); // Assign static methods from src/staticMethods/*.js to constructor\n\n Object.assign(SweetAlert, staticMethods); // Proxy to instance methods to constructor, for now, for backwards compatibility\n\n Object.keys(instanceMethods).forEach(key => {\n SweetAlert[key] = function () {\n if (currentInstance) {\n return currentInstance[key](...arguments);\n }\n };\n });\n SweetAlert.DismissReason = DismissReason;\n SweetAlert.version = '11.4.8';\n\n const Swal = SweetAlert; // @ts-ignore\n\n Swal.default = Swal;\n\n return Swal;\n\n}));\nif (typeof this !== 'undefined' && this.Sweetalert2){ this.swal = this.sweetAlert = this.Swal = this.SweetAlert = this.Sweetalert2}\n\n\"undefined\"!=typeof document&&function(e,t){var n=e.createElement(\"style\");if(e.getElementsByTagName(\"head\")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,\".swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4!important;grid-row:1/4!important;grid-template-columns:1fr 99fr 1fr;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:\\\"top-start top top-end\\\" \\\"center-start center center-end\\\" \\\"bottom-start bottom-center bottom-end\\\";grid-template-rows:minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto);grid-template-rows:minmax(min-content,auto) minmax(min-content,auto) minmax(min-content,auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-bottom-start,.swal2-container.swal2-center-start,.swal2-container.swal2-top-start{grid-template-columns:minmax(0,1fr) auto auto}.swal2-container.swal2-bottom,.swal2-container.swal2-center,.swal2-container.swal2-top{grid-template-columns:auto minmax(0,1fr) auto}.swal2-container.swal2-bottom-end,.swal2-container.swal2-center-end,.swal2-container.swal2-top-end{grid-template-columns:auto auto minmax(0,1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-left>.swal2-popup,.swal2-container.swal2-center-start>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-left>.swal2-popup,.swal2-container.swal2-bottom-start>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-fullscreen>.swal2-popup,.swal2-container.swal2-grow-row>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none!important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0,100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px transparent;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(112,102,224,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(220,55,65,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,120,129,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:0}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto!important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:inherit;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em 2em 3px}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px transparent;color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 3px;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:\\\"!\\\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-warning.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-warning.swal2-icon-show .swal2-icon-content{-webkit-animation:swal2-animate-i-mark .5s;animation:swal2-animate-i-mark .5s}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-info.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-info.swal2-icon-show .swal2-icon-content{-webkit-animation:swal2-animate-i-mark .8s;animation:swal2-animate-i-mark .8s}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-question.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-question.swal2-icon-show .swal2-icon-content{-webkit-animation:swal2-animate-question-mark .8s;animation:swal2-animate-question-mark .8s}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@-webkit-keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@-webkit-keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{background-color:transparent!important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:transparent;pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}\");","import { noop, safe_not_equal, subscribe, run_all, is_function } from '../internal/index.mjs';\nexport { get_store_value as get } from '../internal/index.mjs';\n\nconst subscriber_queue = [];\n/**\n * Creates a `Readable` store that allows reading by subscription.\n * @param value initial value\n * @param {StartStopNotifier}start start and stop notifications for subscriptions\n */\nfunction readable(value, start) {\n return {\n subscribe: writable(value, start).subscribe\n };\n}\n/**\n * Create a `Writable` store that allows both updating and reading by subscription.\n * @param {*=}value initial value\n * @param {StartStopNotifier=}start start and stop notifications for subscriptions\n */\nfunction writable(value, start = noop) {\n let stop;\n const subscribers = new Set();\n function set(new_value) {\n if (safe_not_equal(value, new_value)) {\n value = new_value;\n if (stop) { // store is ready\n const run_queue = !subscriber_queue.length;\n for (const subscriber of subscribers) {\n subscriber[1]();\n subscriber_queue.push(subscriber, value);\n }\n if (run_queue) {\n for (let i = 0; i < subscriber_queue.length; i += 2) {\n subscriber_queue[i][0](subscriber_queue[i + 1]);\n }\n subscriber_queue.length = 0;\n }\n }\n }\n }\n function update(fn) {\n set(fn(value));\n }\n function subscribe(run, invalidate = noop) {\n const subscriber = [run, invalidate];\n subscribers.add(subscriber);\n if (subscribers.size === 1) {\n stop = start(set) || noop;\n }\n run(value);\n return () => {\n subscribers.delete(subscriber);\n if (subscribers.size === 0) {\n stop();\n stop = null;\n }\n };\n }\n return { set, update, subscribe };\n}\nfunction derived(stores, fn, initial_value) {\n const single = !Array.isArray(stores);\n const stores_array = single\n ? [stores]\n : stores;\n const auto = fn.length < 2;\n return readable(initial_value, (set) => {\n let inited = false;\n const values = [];\n let pending = 0;\n let cleanup = noop;\n const sync = () => {\n if (pending) {\n return;\n }\n cleanup();\n const result = fn(single ? values[0] : values, set);\n if (auto) {\n set(result);\n }\n else {\n cleanup = is_function(result) ? result : noop;\n }\n };\n const unsubscribers = stores_array.map((store, i) => subscribe(store, (value) => {\n values[i] = value;\n pending &= ~(1 << i);\n if (inited) {\n sync();\n }\n }, () => {\n pending |= (1 << i);\n }));\n inited = true;\n sync();\n return function stop() {\n run_all(unsubscribers);\n cleanup();\n };\n });\n}\n\nexport { derived, readable, writable };\n","// index.ts\nimport { writable as internal, get } from \"svelte/store\";\nvar stores = {};\nfunction writable(key, initialValue) {\n const browser = typeof localStorage != \"undefined\";\n function updateStorage(key2, value) {\n if (!browser)\n return;\n localStorage.setItem(key2, JSON.stringify(value));\n }\n if (!stores[key]) {\n const store = internal(initialValue, (set2) => {\n const json = browser ? localStorage.getItem(key) : null;\n if (json) {\n set2(JSON.parse(json));\n }\n if (browser) {\n const handleStorage = (event) => {\n if (event.key === key)\n set2(event.newValue ? JSON.parse(event.newValue) : null);\n };\n window.addEventListener(\"storage\", handleStorage);\n return () => window.removeEventListener(\"storage\", handleStorage);\n }\n });\n const { subscribe, set } = store;\n stores[key] = {\n set(value) {\n updateStorage(key, value);\n set(value);\n },\n update(updater) {\n const value = updater(get(store));\n updateStorage(key, value);\n set(value);\n },\n subscribe\n };\n }\n return stores[key];\n}\nexport {\n writable\n};\n//# sourceMappingURL=index.mjs.map\n","/** @typedef {{ id: Errors, msg: string }} Error */\n\nexport const external = {\n // @ts-ignore\n Peer: window.Peer,\n};\n\n/** @enum {number} */\nexport const Messages = {\n INIT_STATE: 0,\n NEW_PROBLEM: 1,\n UPDATE_SERVER_STATE: 2,\n UPDATE_CLIENT_STATE: 3,\n};\n\nexport const hivemindBrain = new URLSearchParams(location.search).get('game');\nexport const isHivemindBrain = hivemindBrain === null;\nexport const isAndroid = window.navigator.userAgent.includes('Android');\n\n/** @enum {string} */\nexport const Errors = {\n NO_SELF_DECODE: 'no-self-decode',\n};\n\nexport const alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\n// random strings to keep track of\nexport const noshow = 'dontshow';\nexport const firstlaunch = 'has-launched';\nexport const cryptogramCharacterLabel = 'Cryptogram character';\nexport const occurencesCharacterLabel = 'Occurences of character';\nexport const replacementCharacterLabel = 'Replacement for character';\n\nexport const congratulationTitles = [\n 'Congratulations!',\n \"Let's gooo\",\n 'I knew you could do it',\n 'What a speedy boi',\n 'Sheeesh',\n \"Are you sonic, cause you're fast\",\n \"Are you going to MIT, cause you're fast\",\n 'You almost finished as fast as an MIT boy',\n 'Zoom zoom',\n 'Vroom vroom',\n 'You just broke the sound barrier',\n \"Are you 30k mph, cause you're faster than escape velocity\",\n 'Too smart, too fast',\n 'ZHOOOOOM',\n 'Haha cryptogram go brrr',\n \"I'm proud of you\",\n 'Most speedy cryptonerd',\n 'I *c* you',\n \"Deja vu, although I've never seen such speed before\",\n 'You spend too much time on these puzzles, touch grass',\n 'Did f appear 1 time, cause you were as fast as f1 cars',\n 'You were faster than a Princeton waitlist student responding to a phone ring',\n 'Quite e-e-e-legaaant',\n 'Omae wa mou, SOLVEDERU',\n 'Speedy and steady wins the race',\n \"You're almost as fast as C\",\n 'Are you JIT compiled, cause that was a massive speedup',\n 'That took you so little time, spacetime became just space',\n 'You going so fast, you escaped a black hole',\n 'You went so fast, you look red from here and blue over there',\n];\n","import { derived, get, writable } from 'svelte/store';\nimport { writable as lswritable } from 'svelte-local-storage-store';\nimport { firstlaunch } from './constants.js';\n\n/** @typedef {import('./quotes.js').EncryptedQuote} EncryptedQuote */\n\n// progress is null if none or an array of whether the char is filled\nconst defaultUsers = [\n {\n id: '',\n name: '',\n progress: [null, [true]][0],\n solved: false,\n },\n].slice(1);\n\n/** @typedef {typeof defaultUsers[0]} User */\n/** @typedef {import('peerjs').DataConnection} Connection */\n\nexport const users = writable(defaultUsers);\n\nexport const id = writable('');\nexport const gameProblem = writable(\n /** @type {EncryptedQuote | null} */ (null)\n);\nexport const name = lswritable(\n 'name',\n `person-${Math.floor(Math.random() * 10000)}`\n);\nexport const patristocratEnabled = lswritable('patristocrat', false);\nexport const hintEnabled = lswritable('hint', false);\nexport const hivemindConnection = writable(\n /** @type {Connection | null} */ (null)\n);\nexport const progress = writable([null, [true]][0]);\nexport const solved = writable(false);\nexport const isFirstLaunch = lswritable(firstlaunch, true);\nexport const needsKeyboardEntry = writable(false);\nexport const focussedKey = writable(/** @type {string | null} */ (null));\n\n/** @type {Map} */\nexport const connections = new Map(); // id -> connection\n\n/** @type {Map void>} */\nexport const keyboardSubscriptions = new Map();\n\nexport const self = derived(\n [id, name, progress, solved],\n ([id, name, progress, solved]) => {\n return { id, name, progress, solved };\n }\n);\n\nexport const problemStart = derived(\n gameProblem,\n ($gp) => $gp?.start ?? Date.now()\n);\n\n/** @type {import('svelte/store').Readable>} */\nexport const timeTakenByOpponents = derived(\n [users, problemStart],\n ([$users, $problemStart]) => {\n return new Map(\n $users.map((u) => [\n u.id,\n u.solved\n ? get(timeTakenByOpponents)?.get(u.id) ?? Date.now() - $problemStart\n : Date.now() - $problemStart,\n ])\n );\n }\n);\n\nexport const resetStores = () => {\n id.set('');\n gameProblem.set(null);\n name.set('');\n hivemindConnection.set(null);\n progress.set(null);\n solved.set(false);\n connections.clear();\n};\n","/** @type {(...args: any[]) => any} */\nexport const log = (...args) => !process.env.PRODUCTION && console.log(...args);\n\n/** @type {(num: number) => string} */\nconst padTime = (num) => `${Math.floor(num)}`.padStart(2, '0');\n\n/** @type {(ms: number) => string} */\nexport const fmtTime = (ms) => {\n const hours = padTime(ms / 60000 / 60);\n const minutes = padTime((ms / 60000) % 60);\n const seconds = padTime((ms % 60000) / 1000);\n if (hours !== '00') {\n return `${hours}:${minutes}:${seconds}`.replace(/^0+/g, '');\n }\n if (minutes !== '00') {\n return `${minutes}:${seconds}`.replace(/^0+/g, '');\n }\n return `00:${seconds}`;\n};\n\n/** @type {(ms: number) => Promise} */\nexport const sleep = (ms) => new Promise((res) => setTimeout(res, ms));\n\n/**\n * @template T\n * @param {Array} arr\n * @returns {Set}\n */\nexport const getDuplicates = (arr) => {\n const duplicates = new Set();\n /** @type {typeof duplicates} */\n const visited = new Set();\n\n for (const entry of arr) {\n if (visited.has(entry)) {\n duplicates.add(entry);\n }\n visited.add(entry);\n }\n\n return duplicates;\n};\n\n/**\n * @template T\n * @param {Array} arr\n * @returns {T}\n */\nexport const choose = (arr) => arr[Math.floor(Math.random() * arr.length)];\n\n/**\n * @template T\n * @param {Iterable} it\n * @returns {Map}\n */\nexport const getCounts = (it) => {\n const count = new Map();\n for (const item of it) {\n count.set(item, (count.has(item) ? count.get(item) : 0) + 1);\n }\n return count;\n};\n","import Swal from 'sweetalert2';\nimport { get } from 'svelte/store';\nimport {\n connections,\n gameProblem,\n id,\n hivemindConnection,\n name,\n self,\n progress,\n solved,\n users,\n} from './store.js';\nimport {\n external,\n hivemindBrain,\n isHivemindBrain,\n Messages,\n} from './constants.js';\nimport { log } from './utils.js';\n\nexport const peer = new external.Peer();\n\n/**\n * @typedef {import('./store.js').User} User\n * @typedef {import('peerjs').DataConnection} Connection\n * @typedef {{ type: 0, name: string }} INIT_MSG\n * @typedef {{ type: 1, problem: import('./quotes.js').EncryptedQuote }} NEW_PROB_MSG\n * @typedef {{ type: 2, progress: null | boolean[], solved: boolean, name: string }}\n * UPDATE_S_MSG\n * @typedef {{ type: 3, users: User[] }} UPDATE_C_MSG\n * @typedef {INIT_MSG | NEW_PROB_MSG | UPDATE_S_MSG | UPDATE_C_MSG} PeerData\n */\n\n/**\n * @template T extends PeerData\n * @typedef {(otherId: string, data: T) => void} DataResponder\n */\n\n/** @type {(otherId: string) => (data: PeerData) => void} */\nexport const onData = (otherId) => (data) => {\n log('got data', data);\n if (dataResponders[data.type]) {\n // @ts-ignore\n dataResponders[data.type](otherId, data);\n }\n};\n\n/** @type {DataResponder} */\nconst initializeRemotePlayer = (id, data) => {\n users.update(($users) => [\n ...$users,\n {\n id,\n name: data.name,\n progress: null,\n solved: false,\n },\n ]);\n const $problem = get(gameProblem);\n if (!connections.has(id) || $problem === null) return;\n connections.get(id)?.send({\n type: Messages.NEW_PROBLEM,\n problem: $problem\n });\n};\n\n/** @type {DataResponder} */\nconst onNewProblem = (_, data) => {\n gameProblem.set(data.problem);\n};\n\n/** @type {DataResponder} */\nconst updateFromClient = (id, data) => {\n if (!isHivemindBrain) return;\n users.update(($users) =>\n $users.map((u) =>\n u.id !== id\n ? u\n : {\n ...u,\n name: data.name,\n progress: data.progress,\n solved: data.solved,\n }\n )\n );\n};\n\n/** @type {DataResponder} */\nconst updateFromServer = (_, data) => {\n if (isHivemindBrain) return;\n const ourId = get(id);\n users.set(data.users.filter((u) => u.id !== ourId));\n};\n\nconst dataResponders = [\n initializeRemotePlayer,\n onNewProblem,\n updateFromClient,\n updateFromServer,\n];\n\n/** @type {(otherId: string) => () => void} */\nconst removePlayer = (otherId) => () => {\n users.update(($users) => $users.filter((u) => u.id !== otherId));\n connections.delete(otherId);\n};\n\nconst sendInitialState = (/** @type {Connection} */ conn) =>\n conn?.send({\n type: Messages.INIT_STATE,\n name: get(name),\n });\n\nconst openConnection = (/** @type {Connection} */ conn) =>\n new Promise((res) => {\n conn.on('open', () => {\n if (conn.peer === hivemindBrain) hivemindConnection.set(conn);\n connections.set(conn.peer, conn);\n conn.on('data', onData(conn.peer));\n conn.on('close', removePlayer(conn.peer));\n setTimeout(() => {\n sendInitialState(conn);\n }, 100);\n res(conn);\n });\n });\n\nconst emit = (/** @type {any} */ msg) =>\n connections.forEach((conn) => conn.send(msg));\n\n/** @type {(otherId: string) => Promise} */\nexport const connectTo = (otherId) =>\n new Promise((res) => {\n const unsub = id.subscribe(($id) => {\n if ($id === '') return;\n const conn = peer.connect(otherId);\n setTimeout(() => unsub());\n openConnection(conn).then(res);\n });\n });\n\npeer.on('open', (/** @type {string} */ $id) => {\n id.set($id);\n if (!isHivemindBrain && hivemindBrain !== null) {\n connectTo(hivemindBrain);\n }\n});\npeer.on('connection', openConnection);\npeer.on('error', (/** @type {any} */ e) => {\n Swal.fire({\n title: 'Connection error',\n text: `${e}`,\n icon: 'error',\n confirmButtonColor: 'var(--red)',\n });\n});\n\nconst subscriptions = [\n users.subscribe(($users) => {\n if (isHivemindBrain)\n emit({\n type: Messages.UPDATE_CLIENT_STATE,\n users: [...$users.map((u) => ({ ...u, conn: null })), get(self)],\n });\n }),\n self.subscribe(($self) => {\n log('own state changed', $self);\n if (isHivemindBrain)\n emit({\n type: Messages.UPDATE_CLIENT_STATE,\n users: [...get(users).map((u) => ({ ...u, conn: null })), $self],\n });\n else\n get(hivemindConnection)?.send({\n type: Messages.UPDATE_SERVER_STATE,\n name: $self.name,\n progress: $self.progress,\n solved: $self.solved,\n });\n }),\n gameProblem.subscribe(($problem) => {\n if ($problem === null) return;\n\n progress.set(null);\n solved.set(false);\n\n if (isHivemindBrain) {\n users.update((us) =>\n us.map((u) => ({ ...u, progress: null, solved: false }))\n );\n emit({\n type: Messages.NEW_PROBLEM,\n problem: $problem,\n });\n }\n }),\n];\n\n// @ts-ignore\nif (window.$cryptoduel$subscriptions)\n // @ts-ignore\n window.$cryptoduel$subscriptions.forEach((u) => u());\n// @ts-ignore\nwindow.$cryptoduel$subscriptions = subscriptions;\n","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction normalizeComputedStyleValue(string) {\n // \"250px\" --> 250\n return +string.replace(/px/, '');\n}\n\nfunction fixDPR(canvas) {\n var dpr = window.devicePixelRatio;\n var computedStyles = getComputedStyle(canvas);\n var width = normalizeComputedStyleValue(computedStyles.getPropertyValue('width'));\n var height = normalizeComputedStyleValue(computedStyles.getPropertyValue('height'));\n canvas.setAttribute('width', (width * dpr).toString());\n canvas.setAttribute('height', (height * dpr).toString());\n}\n\nfunction generateRandomNumber(min, max) {\n var fractionDigits = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n var randomNumber = Math.random() * (max - min) + min;\n return Math.floor(randomNumber * Math.pow(10, fractionDigits)) / Math.pow(10, fractionDigits);\n}\n\nfunction generateRandomArrayElement(arr) {\n return arr[generateRandomNumber(0, arr.length)];\n}\n\nvar FREE_FALLING_OBJECT_ACCELERATION = 0.00125;\nvar MIN_DRAG_FORCE_COEFFICIENT = 0.0005;\nvar MAX_DRAG_FORCE_COEFFICIENT = 0.0009;\nvar ROTATION_SLOWDOWN_ACCELERATION = 0.00001;\nvar INITIAL_SHAPE_RADIUS = 6;\nvar INITIAL_EMOJI_SIZE = 80;\nvar MIN_INITIAL_CONFETTI_SPEED = 0.9;\nvar MAX_INITIAL_CONFETTI_SPEED = 1.7;\nvar MIN_FINAL_X_CONFETTI_SPEED = 0.2;\nvar MAX_FINAL_X_CONFETTI_SPEED = 0.6;\nvar MIN_INITIAL_ROTATION_SPEED = 0.03;\nvar MAX_INITIAL_ROTATION_SPEED = 0.07;\nvar MIN_CONFETTI_ANGLE = 15;\nvar MAX_CONFETTI_ANGLE = 82;\nvar MAX_CONFETTI_POSITION_SHIFT = 150;\nvar SHAPE_VISIBILITY_TRESHOLD = 100;\nvar DEFAULT_CONFETTI_NUMBER = 250;\nvar DEFAULT_EMOJIS_NUMBER = 40;\nvar DEFAULT_CONFETTI_COLORS = ['#fcf403', '#62fc03', '#f4fc03', '#03e7fc', '#03fca5', '#a503fc', '#fc03ad', '#fc03c2'];\n\nfunction getWindowWidthCoefficient(canvasWidth) {\n var HD_SCREEN_WIDTH = 1920;\n return Math.log(canvasWidth) / Math.log(HD_SCREEN_WIDTH);\n}\n\nvar ConfettiShape = /*#__PURE__*/function () {\n function ConfettiShape(args) {\n _classCallCheck(this, ConfettiShape);\n\n var initialPosition = args.initialPosition,\n direction = args.direction,\n confettiRadius = args.confettiRadius,\n confettiColors = args.confettiColors,\n emojis = args.emojis,\n emojiSize = args.emojiSize,\n canvasWidth = args.canvasWidth;\n var randomConfettiSpeed = generateRandomNumber(MIN_INITIAL_CONFETTI_SPEED, MAX_INITIAL_CONFETTI_SPEED, 3);\n var initialSpeed = randomConfettiSpeed * getWindowWidthCoefficient(canvasWidth);\n this.confettiSpeed = {\n x: initialSpeed,\n y: initialSpeed\n };\n this.finalConfettiSpeedX = generateRandomNumber(MIN_FINAL_X_CONFETTI_SPEED, MAX_FINAL_X_CONFETTI_SPEED, 3);\n this.rotationSpeed = emojis.length ? 0.01 : generateRandomNumber(MIN_INITIAL_ROTATION_SPEED, MAX_INITIAL_ROTATION_SPEED, 3) * getWindowWidthCoefficient(canvasWidth);\n this.dragForceCoefficient = generateRandomNumber(MIN_DRAG_FORCE_COEFFICIENT, MAX_DRAG_FORCE_COEFFICIENT, 6);\n this.radius = {\n x: confettiRadius,\n y: confettiRadius\n };\n this.initialRadius = confettiRadius;\n this.rotationAngle = direction === 'left' ? generateRandomNumber(0, 0.2, 3) : generateRandomNumber(-0.2, 0, 3);\n this.emojiSize = emojiSize;\n this.emojiRotationAngle = generateRandomNumber(0, 2 * Math.PI);\n this.radiusYUpdateDirection = 'down';\n var angle = direction === 'left' ? generateRandomNumber(MAX_CONFETTI_ANGLE, MIN_CONFETTI_ANGLE) * Math.PI / 180 : generateRandomNumber(-MIN_CONFETTI_ANGLE, -MAX_CONFETTI_ANGLE) * Math.PI / 180;\n this.absCos = Math.abs(Math.cos(angle));\n this.absSin = Math.abs(Math.sin(angle));\n var positionShift = generateRandomNumber(-MAX_CONFETTI_POSITION_SHIFT, 0);\n var shiftedInitialPosition = {\n x: initialPosition.x + (direction === 'left' ? -positionShift : positionShift) * this.absCos,\n y: initialPosition.y - positionShift * this.absSin\n };\n this.currentPosition = Object.assign({}, shiftedInitialPosition);\n this.initialPosition = Object.assign({}, shiftedInitialPosition);\n this.color = emojis.length ? null : generateRandomArrayElement(confettiColors);\n this.emoji = emojis.length ? generateRandomArrayElement(emojis) : null;\n this.createdAt = new Date().getTime();\n this.direction = direction;\n }\n\n _createClass(ConfettiShape, [{\n key: \"draw\",\n value: function draw(canvasContext) {\n var currentPosition = this.currentPosition,\n radius = this.radius,\n color = this.color,\n emoji = this.emoji,\n rotationAngle = this.rotationAngle,\n emojiRotationAngle = this.emojiRotationAngle,\n emojiSize = this.emojiSize;\n var dpr = window.devicePixelRatio;\n\n if (color) {\n canvasContext.fillStyle = color;\n canvasContext.beginPath();\n canvasContext.ellipse(currentPosition.x * dpr, currentPosition.y * dpr, radius.x * dpr, radius.y * dpr, rotationAngle, 0, 2 * Math.PI);\n canvasContext.fill();\n } else if (emoji) {\n canvasContext.font = \"\".concat(emojiSize, \"px serif\");\n canvasContext.save();\n canvasContext.translate(dpr * currentPosition.x, dpr * currentPosition.y);\n canvasContext.rotate(emojiRotationAngle);\n canvasContext.textAlign = 'center';\n canvasContext.fillText(emoji, 0, 0);\n canvasContext.restore();\n }\n }\n }, {\n key: \"updatePosition\",\n value: function updatePosition(iterationTimeDelta, currentTime) {\n var confettiSpeed = this.confettiSpeed,\n dragForceCoefficient = this.dragForceCoefficient,\n finalConfettiSpeedX = this.finalConfettiSpeedX,\n radiusYUpdateDirection = this.radiusYUpdateDirection,\n rotationSpeed = this.rotationSpeed,\n createdAt = this.createdAt,\n direction = this.direction;\n var timeDeltaSinceCreation = currentTime - createdAt;\n if (confettiSpeed.x > finalConfettiSpeedX) this.confettiSpeed.x -= dragForceCoefficient * iterationTimeDelta;\n this.currentPosition.x += confettiSpeed.x * (direction === 'left' ? -this.absCos : this.absCos) * iterationTimeDelta;\n this.currentPosition.y = this.initialPosition.y - confettiSpeed.y * this.absSin * timeDeltaSinceCreation + FREE_FALLING_OBJECT_ACCELERATION * Math.pow(timeDeltaSinceCreation, 2) / 2;\n this.rotationSpeed -= this.emoji ? 0.0001 : ROTATION_SLOWDOWN_ACCELERATION * iterationTimeDelta;\n if (this.rotationSpeed < 0) this.rotationSpeed = 0; // no need to update rotation radius for emoji\n\n if (this.emoji) {\n this.emojiRotationAngle += this.rotationSpeed * iterationTimeDelta % (2 * Math.PI);\n return;\n }\n\n if (radiusYUpdateDirection === 'down') {\n this.radius.y -= iterationTimeDelta * rotationSpeed;\n\n if (this.radius.y <= 0) {\n this.radius.y = 0;\n this.radiusYUpdateDirection = 'up';\n }\n } else {\n this.radius.y += iterationTimeDelta * rotationSpeed;\n\n if (this.radius.y >= this.initialRadius) {\n this.radius.y = this.initialRadius;\n this.radiusYUpdateDirection = 'down';\n }\n }\n }\n }, {\n key: \"getIsVisibleOnCanvas\",\n value: function getIsVisibleOnCanvas(canvasHeight) {\n return this.currentPosition.y < canvasHeight + SHAPE_VISIBILITY_TRESHOLD;\n }\n }]);\n\n return ConfettiShape;\n}();\n\nfunction createCanvas() {\n var canvas = document.createElement('canvas');\n canvas.style.position = 'fixed';\n canvas.style.width = '100%';\n canvas.style.height = '100%';\n canvas.style.top = '0';\n canvas.style.left = '0';\n canvas.style.zIndex = '1000';\n canvas.style.pointerEvents = 'none';\n document.body.appendChild(canvas);\n return canvas;\n}\n\nfunction normalizeConfettiConfig(confettiConfig) {\n var _confettiConfig$confe = confettiConfig.confettiRadius,\n confettiRadius = _confettiConfig$confe === void 0 ? INITIAL_SHAPE_RADIUS : _confettiConfig$confe,\n _confettiConfig$confe2 = confettiConfig.confettiNumber,\n confettiNumber = _confettiConfig$confe2 === void 0 ? confettiConfig.confettiesNumber || (confettiConfig.emojis ? DEFAULT_EMOJIS_NUMBER : DEFAULT_CONFETTI_NUMBER) : _confettiConfig$confe2,\n _confettiConfig$confe3 = confettiConfig.confettiColors,\n confettiColors = _confettiConfig$confe3 === void 0 ? DEFAULT_CONFETTI_COLORS : _confettiConfig$confe3,\n _confettiConfig$emoji = confettiConfig.emojis,\n emojis = _confettiConfig$emoji === void 0 ? confettiConfig.emojies || [] : _confettiConfig$emoji,\n _confettiConfig$emoji2 = confettiConfig.emojiSize,\n emojiSize = _confettiConfig$emoji2 === void 0 ? INITIAL_EMOJI_SIZE : _confettiConfig$emoji2; // deprecate wrong plural forms, used in early releases\n\n if (confettiConfig.emojies) console.error(\"emojies argument is deprecated, please use emojis instead\");\n if (confettiConfig.confettiesNumber) console.error(\"confettiesNumber argument is deprecated, please use confettiNumber instead\");\n return {\n confettiRadius: confettiRadius,\n confettiNumber: confettiNumber,\n confettiColors: confettiColors,\n emojis: emojis,\n emojiSize: emojiSize\n };\n}\n\nvar ConfettiBatch = /*#__PURE__*/function () {\n function ConfettiBatch(canvasContext) {\n var _this = this;\n\n _classCallCheck(this, ConfettiBatch);\n\n this.canvasContext = canvasContext;\n this.shapes = [];\n this.promise = new Promise(function (completionCallback) {\n return _this.resolvePromise = completionCallback;\n });\n }\n\n _createClass(ConfettiBatch, [{\n key: \"getBatchCompletePromise\",\n value: function getBatchCompletePromise() {\n return this.promise;\n }\n }, {\n key: \"addShapes\",\n value: function addShapes() {\n var _this$shapes;\n\n (_this$shapes = this.shapes).push.apply(_this$shapes, arguments);\n }\n }, {\n key: \"complete\",\n value: function complete() {\n var _a;\n\n if (this.shapes.length) {\n return false;\n }\n\n (_a = this.resolvePromise) === null || _a === void 0 ? void 0 : _a.call(this);\n return true;\n }\n }, {\n key: \"processShapes\",\n value: function processShapes(time, canvasHeight, cleanupInvisibleShapes) {\n var _this2 = this;\n\n var timeDelta = time.timeDelta,\n currentTime = time.currentTime;\n this.shapes = this.shapes.filter(function (shape) {\n // Render the shapes in this batch\n shape.updatePosition(timeDelta, currentTime);\n shape.draw(_this2.canvasContext); // Only cleanup the shapes if we're being asked to\n\n if (!cleanupInvisibleShapes) {\n return true;\n }\n\n return shape.getIsVisibleOnCanvas(canvasHeight);\n });\n }\n }]);\n\n return ConfettiBatch;\n}();\n\nvar JSConfetti = /*#__PURE__*/function () {\n function JSConfetti() {\n var jsConfettiConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _classCallCheck(this, JSConfetti);\n\n this.activeConfettiBatches = [];\n this.canvas = jsConfettiConfig.canvas || createCanvas();\n this.canvasContext = this.canvas.getContext('2d');\n this.requestAnimationFrameRequested = false;\n this.lastUpdated = new Date().getTime();\n this.iterationIndex = 0;\n this.loop = this.loop.bind(this);\n requestAnimationFrame(this.loop);\n }\n\n _createClass(JSConfetti, [{\n key: \"loop\",\n value: function loop() {\n this.requestAnimationFrameRequested = false;\n fixDPR(this.canvas);\n var currentTime = new Date().getTime();\n var timeDelta = currentTime - this.lastUpdated;\n var canvasHeight = this.canvas.offsetHeight;\n var cleanupInvisibleShapes = this.iterationIndex % 10 === 0;\n this.activeConfettiBatches = this.activeConfettiBatches.filter(function (batch) {\n batch.processShapes({\n timeDelta: timeDelta,\n currentTime: currentTime\n }, canvasHeight, cleanupInvisibleShapes); // Do not remove invisible shapes on every iteration\n\n if (!cleanupInvisibleShapes) {\n return true;\n }\n\n return !batch.complete();\n });\n this.iterationIndex++;\n this.queueAnimationFrameIfNeeded(currentTime);\n }\n }, {\n key: \"queueAnimationFrameIfNeeded\",\n value: function queueAnimationFrameIfNeeded(currentTime) {\n if (this.requestAnimationFrameRequested) {\n // We already have a pended animation frame, so there is no more work\n return;\n }\n\n if (this.activeConfettiBatches.length < 1) {\n // No shapes to animate, so don't queue another frame\n return;\n }\n\n this.requestAnimationFrameRequested = true; // Capture the last updated time for animation\n\n this.lastUpdated = currentTime || new Date().getTime();\n requestAnimationFrame(this.loop);\n }\n }, {\n key: \"addConfetti\",\n value: function addConfetti() {\n var confettiConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var _normalizeConfettiCon = normalizeConfettiConfig(confettiConfig),\n confettiRadius = _normalizeConfettiCon.confettiRadius,\n confettiNumber = _normalizeConfettiCon.confettiNumber,\n confettiColors = _normalizeConfettiCon.confettiColors,\n emojis = _normalizeConfettiCon.emojis,\n emojiSize = _normalizeConfettiCon.emojiSize; // Use the bounding rect rather tahn the canvas width / height, because\n // .width / .height are unset until a layout pass has been completed. Upon\n // confetti being immediately queued on a page load, this hasn't happened so\n // the default of 300x150 will be returned, causing an improper source point\n // for the confetti animation.\n\n\n var canvasRect = this.canvas.getBoundingClientRect();\n var canvasWidth = canvasRect.width;\n var canvasHeight = canvasRect.height;\n var yPosition = canvasHeight * 5 / 7;\n var leftConfettiPosition = {\n x: 0,\n y: yPosition\n };\n var rightConfettiPosition = {\n x: canvasWidth,\n y: yPosition\n };\n var confettiGroup = new ConfettiBatch(this.canvasContext);\n\n for (var i = 0; i < confettiNumber / 2; i++) {\n var confettiOnTheRight = new ConfettiShape({\n initialPosition: leftConfettiPosition,\n direction: 'right',\n confettiRadius: confettiRadius,\n confettiColors: confettiColors,\n confettiNumber: confettiNumber,\n emojis: emojis,\n emojiSize: emojiSize,\n canvasWidth: canvasWidth\n });\n var confettiOnTheLeft = new ConfettiShape({\n initialPosition: rightConfettiPosition,\n direction: 'left',\n confettiRadius: confettiRadius,\n confettiColors: confettiColors,\n confettiNumber: confettiNumber,\n emojis: emojis,\n emojiSize: emojiSize,\n canvasWidth: canvasWidth\n });\n confettiGroup.addShapes(confettiOnTheRight, confettiOnTheLeft);\n }\n\n this.activeConfettiBatches.push(confettiGroup);\n this.queueAnimationFrameIfNeeded();\n return confettiGroup.getBatchCompletePromise();\n }\n }]);\n\n return JSConfetti;\n}();\n\nexport default JSConfetti;\n","/**\n * Utilities with logic specific to cryptoduel\n */\n\nimport { choose, fmtTime } from './utils.js';\nimport { congratulationTitles, isHivemindBrain } from './constants.js';\n\n/** @typedef {import('./quotes.js').EncryptedQuote} EncryptedQuote */\n\n/** @type {(gp: EncryptedQuote | null) => boolean[]} */\nexport const getEmptyProgress = (gp) =>\n gp === null ? [] : [...gp.ciphertext].map((_) => false);\n\n/** @type {(timeTaken: number) => string} */\nexport const getCongratulationsMessage = (timeTaken) => {\n return `You solved the quote in ${fmtTime(timeTaken)}!`;\n};\n\n/** @type {() => string} */\nexport const getCongratulationsTitle = () => choose(congratulationTitles);\n\n/** @type {(id: string) => string} */\nexport const getJoinLink = (id) =>\n isHivemindBrain\n ? `${window.location.href}?game=${encodeURIComponent(id)}`\n : window.location.href;\n","import { get } from 'svelte/store';\n\nimport ConfettiGenerator from 'js-confetti';\nimport Swal from 'sweetalert2';\nimport {\n getCongratulationsMessage,\n getCongratulationsTitle,\n} from './cryptoduelutils.js';\nimport { noshow } from './constants.js';\nimport { problemStart, keyboardSubscriptions } from './store.js';\n\n/** @typedef {import('./constants.js').Error} Error */\n\n/** @type {any | undefined} */\nlet confetti;\nsetTimeout(() => {\n confetti = new ConfettiGenerator({\n // @ts-ignore\n canvas: document.querySelector('#confetti'),\n });\n}, 10);\n// @ts-ignore\nwindow.$cryptoduel$confetti = confetti;\n\nexport const confettiCelebration = () => {\n Swal.fire({\n title: getCongratulationsTitle(),\n text: getCongratulationsMessage(Date.now() - get(problemStart)),\n icon: 'success',\n confirmButtonColor: 'var(--primary-color)',\n });\n\n confetti.addConfetti();\n};\n\nconst getErrLocalstorageKey = (/** @type {Error} */ err) =>\n `show-err-${err.id}`;\n\nexport const showError = (\n /** @type {import('./constants.js').Error} */ err\n) => {\n const errKey = getErrLocalstorageKey(err);\n if (localStorage.getItem(errKey) === noshow) return;\n\n Swal.fire({\n title: `Error (${err.id})`,\n text: err.msg,\n icon: 'error',\n showDenyButton: true,\n denyButtonText: \"Don't show this error message again\",\n confirmButtonColor: 'var(--primary-color)',\n denyButtonColor: 'var(--red)',\n }).then((r) => {\n if (r.isDenied) {\n localStorage.setItem(errKey, noshow);\n }\n });\n};\n\nlet keebSub = 0;\n\n/** @type {(listener: (c: string) => void) => () => void} */\nexport const subscribeToKeyboard = (listener) => {\n const subscriptionId = keebSub++;\n keyboardSubscriptions.set(keebSub, listener);\n return () => keyboardSubscriptions.delete(subscriptionId);\n};\n","import { amountChunks } from './meta.js';\nimport { alphabet } from './constants.js';\nexport { alphabet } from './constants.js';\n\n/** @typedef {{ author: string, text: string }} Quote */\n/** @typedef {Quote & {\n plaintext: string, ciphertext: string, start: number, hint?: string\n}} EncryptedQuote */\n\nexport const getQuoteGenerator = () => {\n let quoteIndex = 0;\n\n const chunk = fetch(\n `./quotes/${Math.floor(Math.random() * (amountChunks))}.json`\n )\n .then((r) => r.json())\n .then(shuffleArray);\n\n const newQuote = async () => {\n const quotes = /** @type {{ quoteAuthor: string, quoteText: string }[]} */ (\n await chunk\n );\n const quote = quotes[quoteIndex++ % quotes.length];\n return { author: quote.quoteAuthor, text: cleanUpText(quote.quoteText) };\n };\n\n return newQuote;\n};\n\n/**\n * @template T\n * @param {Array} arr\n * @returns {Array}\n */\nconst shuffleArray = (arr) =>\n arr\n .map((a) => /** @type {[number, T]} */ ([Math.random(), a]))\n .sort((a, b) => a[0] - b[0])\n .map((a) => a[1]);\n\n/** @type {() => string[]} */\nconst generateRandomEncryption = () => {\n const encMap = shuffleArray([...Array(26).keys()]);\n if (encMap.some((x, i) => x === i)) return generateRandomEncryption();\n return encMap.map((i) => alphabet[i]);\n};\n\n/** @type {(quote: Quote) => EncryptedQuote} */\nexport const toAristocratCipher = (quote) => {\n const plaintext = quote.text.toUpperCase();\n const encryptionAlphabet = generateRandomEncryption();\n const ciphertext = [...plaintext]\n .map((char) => encryptionAlphabet[alphabet.indexOf(char)] ?? char)\n .join('');\n\n return {\n ...quote,\n plaintext,\n ciphertext,\n start: Date.now(),\n hint: splitQuote(plaintext)[0],\n };\n};\n\n/** @type {(text: string) => string} */\nconst patristify = (text) => {\n const alphabetChars = [...text].filter((c) => alphabet.includes(c)).join('');\n return [...Array(alphabetChars.length).keys()]\n .filter((i) => i % 5 === 0)\n .map((i) => alphabetChars.slice(i, i + 5))\n .join(' ');\n};\n\n/** @type {(quote: EncryptedQuote) => EncryptedQuote} */\nexport const toPatristocratCipher = (quote) => ({\n ...quote,\n plaintext: patristify(quote.plaintext),\n ciphertext: patristify(quote.ciphertext),\n});\n\n/** @type {(text: string) => string[]} */\nexport const splitQuote = (text) => [...text.split(/\\s+/g)];\n\n/** @type {(text: string) => string} */\n// eslint-disable-next-line no-control-regex\nconst cleanUpText = (text) => text.replace(/[^\\x00-\\x7F]+/g, ''); // ascii-only\n","import { Errors } from '@/js/constants.js';\n\n/**\n * @template T\n * @typedef {(node: HTMLElement, options: Partial) => Partial<{\n * update: (newOptions: Partial) => void,\n * destroy: () => void\n * }>} Action\n */\n\nconst replaceableElementDefaultOptions = {\n ogchar: '',\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n dispatch: (/** @type {string} */ _key, _detail = {}) => {},\n disabled: false,\n};\n\n/** @type {Action} */\nexport const replaceableElement = (node, options_ = {}) => {\n let options = /** @type {typeof replaceableElementDefaultOptions} */ ({\n ...options_,\n replaceableElementDefaultOptions,\n });\n const { dispatch } = options;\n\n const setProperties = () => {\n node.style.setProperty(\n 'pointer-events',\n options.disabled ? 'none' : 'auto'\n );\n };\n\n setProperties();\n\n /** @type {(e: KeyboardEvent) => void} */\n const onKeyDown = (e) => {\n if (options.disabled) return;\n\n if (e.key !== 'Tab') e.preventDefault();\n\n if (options.ogchar === e.key.toUpperCase()) {\n dispatch('error', {\n id: Errors.NO_SELF_DECODE,\n msg: 'Letters cannot decode to themselves',\n });\n return;\n }\n\n dispatch('replace', {\n from: options.ogchar,\n to: e.key.toUpperCase(),\n });\n };\n\n node.addEventListener('keydown', onKeyDown);\n\n return {\n update(newOptions) {\n options = { ...options, ...newOptions };\n setProperties();\n },\n\n destroy() {\n node.removeEventListener('keydown', onKeyDown);\n },\n };\n};\n","\n\n\n\n\n {#if isAndroid}\n \n {replacement_}\n \n {:else}\n \n {/if}\n
          \n\n\n","\n\n
          \n {#each word as ch, i}\n {@const replacement = replacedChars[i]}\n {@const duplicate =\n replacement !== '' && duplicateReplacements.has(replacement)}\n
          \n
          {ch}
          \n \n
          \n {/each}\n
          \n\n\n","\n\n\n \n \n \n \n \n {#each alphabet as ch, i}\n {@const replacementId = `replacement-${i}`}\n {@const isInQuote = frequencies.has(ch)}\n \n \n \n \n \n {/each}\n
          -#🠗
          {ch}{isInQuote ? frequencies.get(ch) : 0}
          \n\n\n","\n\n{#if problem}\n

          Solve this quote by {problem.author}

          \n {#if problem.hint}\n

          HINT: The first word is {problem.hint}

          \n {/if}\n
          \n {#each words as word}\n \n {/each}\n
          \n \n{/if}\n\n\n","\n\n
          \n \n \n
          \n\n\n","\n\n
          \n {#if $id !== ''}\n {#if shareLink}\n \n {:else}\n \n {/if}\n {joinLink}\n {:else}\n

          Acquiring join link...

          \n {/if}\n
          \n\n\n","export const getNumber = (name) => {\n const charactersArray = Array.from(name);\n let charactersCodesSum = 0;\n charactersArray.forEach((charactersArrayItem) => {\n return (charactersCodesSum += charactersArrayItem.charCodeAt(0));\n });\n return charactersCodesSum;\n};\nexport const getModulus = (num, max) => {\n return num % max;\n};\nexport const getDigit = (number, ntn) => {\n return Math.floor((number / Math.pow(10, ntn)) % 10);\n};\nexport const getBoolean = (number, ntn) => {\n return !(getDigit(number, ntn) % 2);\n};\nexport const getAngle = (x, y) => {\n return (Math.atan2(y, x) * 180) / Math.PI;\n};\nexport const getUnit = (number, range, index) => {\n let value = number % range;\n if (index && getDigit(number, index) % 2 === 0) {\n return -value;\n }\n else\n return value;\n};\nexport const getRandomColor = (number, colors, range) => {\n return colors[number % range];\n};\nexport const getContrast = (hexcolor) => {\n // If a leading # is provided, remove it\n if (hexcolor.slice(0, 1) === '#') {\n hexcolor = hexcolor.slice(1);\n }\n // Convert to RGB value\n var r = parseInt(hexcolor.substr(0, 2), 16);\n var g = parseInt(hexcolor.substr(2, 2), 16);\n var b = parseInt(hexcolor.substr(4, 2), 16);\n // Get YIQ ratio\n var yiq = (r * 299 + g * 587 + b * 114) / 1000;\n // Check contrast\n return yiq >= 128 ? 'black' : 'white';\n};\n//# sourceMappingURL=utils.js.map","export const DEFAULTS = {\n colors: ['#92A1C6', '#146A7C', '#F0AB3D', '#C271B4', '#C20D90'],\n name: 'Clara Barton',\n square: false,\n size: 40,\n};\n//# sourceMappingURL=CONSTANTS.js.map","\n\n\n \n \n \n \n \n \n \n {#if data.isMouthOpen}\n \n {:else}\n \n {/if}\n\n \n \n \n \n\n","\n\n
          \n \n
          \n\n\n","\n\n
          \n {#each $users as user}\n \n \n
          \n {#each user.progress ?? emptyProgress as hasFilled}\n
          \n {/each}\n
          \n
          \n {/each}\n
          \n\n\n","\n\n
          \n {#each $users as user}\n \n {:else}\n waiting for some cool cryptographers\n {/each}\n
          \n\n\n","\n\n (focussedOnButton = true)}\n on:blur={() => (focussedOnButton = false)}\n>\n Play\n\n\n\n","\n\n

          \n An aristocrat cryptogram is a quote encrypted by substituting each letter with\n another letter. A patristocrat cryptogram is an aristocrat with all whitespace\n and punctuation removed.\n

          \n

          \n In cryptoduel, you compete with friends to see who can decrypt the quote the\n fastest!\n

          \n{#if verbose}\n

          \n The table given shows the amount of times each character appears in the\n quote as well as the replacement for each character. You may either enter\n replacment characters into the table or under each character of the quote.\n

          \n{/if}\n","\n\n
          \n

          Welcome to Cryptoduel

          \n \"cryptogram\n \n \n Play\n
          \n\n\n","\n\n
          \n \n \n
          \n\n\n","\n\n
          \n
          expanded.update((e) => !e)}>\n \n {title}\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 {#if connectingToHivemind}\n \n Connecting to {hivemindBrain ?? ''}\n \n {:else if $users.length > 0}\n \n \n \n {/if}\n {#if $users.length > 0 && $gameProblem}\n \n \n \n {/if}\n {#if $gameProblem || isHivemindBrain}\n \n {#if $gameProblem}\n progress.set(e.detail.progress)}\n on:solved={() => solved.set(true)}\n on:error\n />\n {/if}\n {#if isHivemindBrain}\n \n {/if}\n \n {/if}\n
          \n\n\n","export const amountQuotes = 4369;\nexport const amountChunks = 9;\n","\n\n\n
          \n {#each rows as row}\n
          \n {#each row as char}\n \n {char}\n
          \n {/each}\n
          \n {/each}\n
          \n \n DELETE\n
          \n \n\n\n\n","\n\n\n\n
          \n {#if $isFirstLaunch}\n \n {:else}\n showError(e.detail)} />\n {/if}\n
          \n
          \n\n\n","import App from './App.svelte';\nimport 'sweetalert2/dist/sweetalert2.min.css';\n\nconst app = new App({\n target: document.body,\n props: {\n name: 'world',\n },\n});\n\nexport default app;\n\n// recreate the whole app if an HMR update touches this module\nif (import.meta.hot) {\n import.meta.hot.dispose(() => {\n app.$destroy();\n });\n import.meta.hot.accept();\n}\n"],"names":["noop","run","fn","blank_object","Object","create","run_all","fns","forEach","is_function","thing","safe_not_equal","a","b","src_url_equal_anchor","current_component","subscribe","store","callbacks","unsub","unsubscribe","get_store_value","value","_","component_subscribe","component","callback","$$","on_destroy","push","create_slot","definition","ctx","$$scope","slot_ctx","get_slot_context","tar","src","k","assign","slice","get_slot_changes","dirty","lets","undefined","merged","len","Math","max","length","i","update_slot_base","slot","slot_definition","slot_changes","get_slot_context_fn","slot_context","p","get_all_dirty_from_scope","append","target","node","appendChild","insert","anchor","insertBefore","detach","parentNode","removeChild","destroy_each","iterations","detaching","d","element","name","document","createElement","svg_element","createElementNS","text","data","createTextNode","space","empty","listen","event","handler","options","addEventListener","removeEventListener","attr","attribute","removeAttribute","getAttribute","setAttribute","set_data","wholeText","set_input_value","input","set_style","key","important","style","removeProperty","setProperty","toggle_class","toggle","classList","set_current_component","get_current_component","Error","onMount","on_mount","createEventDispatcher","type","detail","bubbles","e","createEvent","initCustomEvent","custom_event","call","bubble","this","dirty_components","binding_callbacks","render_callbacks","flush_callbacks","resolved_promise","Promise","resolve","update_scheduled","add_render_callback","add_flush_callback","seen_callbacks","Set","flushidx","flush","saved_component","update","pop","has","add","clear","fragment","before_update","after_update","outroing","outros","group_outros","r","c","check_outros","transition_in","block","local","delete","transition_out","o","bind","index","props","bound","create_component","mount_component","customElement","m","new_on_destroy","map","filter","destroy_component","make_dirty","then","fill","init","instance","create_fragment","not_equal","append_styles","parent_component","on_disconnect","context","Map","skip_bound","root","ready","ret","rest","hydrate","nodes","Array","from","childNodes","children","l","intro","SvelteComponent","$destroy","$on","indexOf","splice","$set","$$props","obj","$$set","keys","module","exports","consolePrefix","uniqueArray","arr","result","capitalizeFirstLetter","str","charAt","toUpperCase","toArray","nodeList","prototype","warn","message","console","concat","join","error","previousWarnOnceMessages","warnOnce","includes","warnAboutDeprecation","deprecatedParam","useInstead","callIfFunction","arg","hasToPromiseFn","toPromise","asPromise","isPromise","defaultParams","title","titleText","html","footer","icon","iconColor","iconHtml","template","toast","showClass","popup","backdrop","hideClass","customClass","color","heightAuto","allowOutsideClick","allowEscapeKey","allowEnterKey","stopKeydownPropagation","keydownListenerCapture","showConfirmButton","showDenyButton","showCancelButton","preConfirm","preDeny","confirmButtonText","confirmButtonAriaLabel","confirmButtonColor","denyButtonText","denyButtonAriaLabel","denyButtonColor","cancelButtonText","cancelButtonAriaLabel","cancelButtonColor","buttonsStyling","reverseButtons","focusConfirm","focusDeny","focusCancel","returnFocus","showCloseButton","closeButtonHtml","closeButtonAriaLabel","loaderHtml","showLoaderOnConfirm","showLoaderOnDeny","imageUrl","imageWidth","imageHeight","imageAlt","timer","timerProgressBar","width","padding","background","inputPlaceholder","inputLabel","inputValue","inputOptions","inputAutoTrim","inputAttributes","inputValidator","returnInputValueOnDeny","validationMessage","grow","position","progressSteps","currentProgressStep","progressStepsDistance","willOpen","didOpen","didRender","willClose","didClose","didDestroy","scrollbarPadding","updatableParams","deprecatedParams","toastIncompatibleParams","isValidParameter","paramName","hasOwnProperty","isUpdatableParameter","isDeprecatedParameter","checkIfParamIsValid","param","checkIfToastParamIsValid","checkIfParamIsDeprecated","showWarningsForParams","params","swalPrefix","prefix","items","swalClasses","iconTypes","getContainer","body","querySelector","container","elementBySelector","selectorString","elementByClass","className","getPopup","getIcon","getTitle","getHtmlContainer","getImage","image","getProgressSteps","getValidationMessage","getConfirmButton","actions","confirm","getDenyButton","deny","getInputLabel","getLoader","loader","getCancelButton","cancel","getActions","getFooter","getTimerProgressBar","getCloseButton","close","focusable","getFocusableElements","focusableElementsWithTabindex","querySelectorAll","sort","tabindexA","parseInt","tabindexB","otherFocusableElements","el","isVisible","isModal","hasClass","shown","isToast","isLoading","hasAttribute","states","previousBodyPadding","setInnerHtml","elem","textContent","parsed","DOMParser","parseFromString","child","split","contains","removeCustomClasses","values","remove","applyCustomClass","addClass","getInput","inputType","checkbox","radio","range","focusInput","focus","val","toggleClass","condition","Boolean","isArray","removeClass","getDirectChildByClass","applyNumericalStyle","property","show","display","arguments","hide","setStyle","parent","selector","offsetWidth","offsetHeight","getClientRects","allButtonsAreHidden","isScrollable","scrollHeight","clientHeight","hasCssAnimation","window","getComputedStyle","animDuration","parseFloat","getPropertyValue","transDuration","animateTimerProgressBar","reset","transition","setTimeout","stopTimerProgressBar","timerProgressBarWidth","timerProgressBarPercent","isNodeEnv","RESTORE_FOCUS_TIMEOUT","globalState","focusPreviousActiveElement","previousActiveElement","restoreActiveElement","x","scrollX","y","scrollY","restoreFocusTimeout","scrollTo","sweetHTML","file","select","label","textarea","replace","resetOldContainer","oldContainer","documentElement","resetValidationMessage","currentInstance","addInputChangeListeners","rangeOutput","oninput","onchange","nextSibling","getTarget","setupAccessibility","setupRTL","targetElement","direction","rtl","oldContainerExisted","parseHtmlToContainer","HTMLElement","handleObject","jquery","handleJqueryElem","toString","cloneNode","animationEndEvent","testEl","transEndEventNames","WebkitAnimation","animation","measureScrollbar","scrollDiv","scrollbarWidth","getBoundingClientRect","clientWidth","renderActions","renderButtons","confirmButton","denyButton","cancelButton","renderButton","handleButtonsStyling","styled","backgroundColor","button","buttonType","handleBackdropParam","handlePositionParam","center","handleGrowParam","growClass","renderContainer","privateProps","awaitingPromise","WeakMap","promise","innerParams","domCache","inputTypes","renderInput","get","rerender","inputClass","inputContainer","setAttributes","showInput","setCustomClass","renderInputType","getInputContainer","removeAttributes","attributes","attrName","setInputPlaceholder","placeholder","setInputLabel","prependTo","id","labelClass","innerText","insertAdjacentElement","email","password","number","tel","url","rangeInput","disabled","selected","checkboxContainer","checked","getMargin","marginLeft","marginRight","initialPopupWidth","MutationObserver","textareaWidth","observe","attributeFilter","renderContent","htmlContainer","renderFooter","renderCloseButton","closeButton","renderIcon","setContent","applyStyles","iconType","setColor","adjustSuccessIconBackgroundColor","popupBackgroundColor","successIconParts","successIconHtml","errorIconHtml","iconContent","question","warning","info","borderColor","sel","content","renderImage","createStepElement","step","stepEl","createLineElement","lineEl","renderProgressSteps","progressStepsContainer","renderTitle","renderPopup","addClasses","modal","render","DismissReason","freeze","esc","setAriaHidden","unsetAriaHidden","swalStringParams","getTemplateParams","templateContent","showWarningsForElements","getSwalParams","getSwalButtons","getSwalImage","getSwalIcon","getSwalInput","getSwalStringParams","showWarningsForAttributes","JSON","parse","innerHTML","option","optionValue","optionName","paramNames","tag","trim","allowedElements","tagName","toLowerCase","allowedAttributes","defaultInputValidators","string","test","setDefaultInputValidators","validateCustomTargetElement","setParameters","Timer","constructor","delay","remaining","running","start","started","Date","stop","clearTimeout","getTime","increase","n","getTimerLeft","isRunning","fixScrollbar","innerHeight","paddingRight","undoScrollbar","iOSfix","navigator","userAgent","MSStream","platform","maxTouchPoints","iosfix","offset","scrollTop","top","lockBodyScroll","addBottomPaddingForTallPopups","ua","iOS","match","webkit","bottomPanelHeight","paddingBottom","preventTouchMove","ontouchstart","shouldPreventTouchMove","ontouchmove","preventDefault","stopPropagation","isStylus","isZoom","touches","touchType","undoIOSfix","SHOW_CLASS_TIMEOUT","openPopup","initialBodyOverflow","overflowY","addClasses$1","setScrollingVisibility","fixScrollContainer","activeElement","swalOpenAnimationFinished","showLoading","buttonToReplace","Swal","replaceButton","loading","handleInputOptionsAndValue","handleInputOptions","handleInputValue","getInputValue","getCheckboxValue","getRadioValue","getFileValue","files","processInputOptions","populateInputOptions","formatInputOptions","hideLoading","catch","err","renderOption","optionLabel","isSelected","inputOption","optgroup","radioValue","radioLabel","radioInput","radioLabelElement","radios","valueFormatted","showRelatedButton","getElementsByClassName","getInput$1","privateMethods","swalPromiseResolve","swalPromiseReject","isVisible$1","clickConfirm","click","clickDeny","clickCancel","removeKeydownHandler","keydownTarget","keydownHandlerAdded","keydownHandler","capture","addKeydownHandler","dismissWith","setFocus","increment","focusableElements","arrowKeysNextButton","arrowKeysPreviousButton","isComposing","keyCode","handleEnter","handleTab","handleArrows","handleEsc","outerHTML","btnIndex","shiftKey","sibling","buttonToFocus","HTMLButtonElement","removePopupAndResetState","triggerDidCloseAndDispose","removeBodyClasses","resolveValue","prepareResolveValue","triggerClosePopup","isAwaitingPromise","isDismissed","handleAwaitingPromise","handlePopupAnimation","rejectPromise","_destroy","isConfirmed","isDenied","animationIsSupported","animatePopup","swalCloseEventFinishedCallback","setButtonsDisabled","buttons","setInputDisabled","enableButtons","disableButtons","enableInput","disableInput","showValidationMessage","inputerror","resetValidationMessage$1","getProgressSteps$1","validUpdatableParams","filterValidParams","updatedParams","set","defineProperties","writable","enumerable","deferDisposalTimer","disposeSwal","disposeWeakMaps","unsetWeakMaps","instanceMethods","disableLoading","closePopup","closeModal","closeToast","handleConfirmButtonClick","handleConfirmOrDenyWithInput","handleDenyButtonClick","handleCancelButtonClick","handleInputValidator","checkValidity","preDenyValue","error$$1","rejectWith","succeedWith","preConfirmValue","handlePopupClick","handleToastClick","handleModalMousedown","handleContainerMousedown","handleModalClick","onclick","isAnyButtonShown","ignoreOutsideClick","onmousedown","onmouseup","isJqueryElement","isElement","Element","argsToParams","args","fire","_len","_key","mixin","mixinParams","MixinSwal","_main","priorityMixinParams","super","timeout","stopTimer","resumeTimer","toggleTimer","increaseTimer","isTimerRunning","bodyClickListenerAdded","clickHandlers","bindClickHandler","bodyClickListener","staticMethods","enableLoading","SweetAlert","outerParams","configurable","userParams","prepareParams","populateDomCache","swalPromise","onFulfilled","finally","onFinally","reject","dismiss","setupTimer","initFocus","templateParams","globalState$$1","focusButton","blurActiveElement","blur","version","default","factory","Sweetalert2","swal","sweetAlert","t","getElementsByTagName","styleSheet","cssText","subscriber_queue","subscribers","new_value","run_queue","subscriber","invalidate","size","derived","stores","initial_value","single","stores_array","auto","inited","pending","cleanup","sync","unsubscribers","initialValue","browser","localStorage","updateStorage","key2","setItem","stringify","internal","set2","json","getItem","handleStorage","newValue","updater","external","Peer","Messages","hivemindBrain","URLSearchParams","location","search","isHivemindBrain","isAndroid","Errors","alphabet","noshow","congratulationTitles","users","progress","solved","gameProblem","lswritable","floor","random","patristocratEnabled","hintEnabled","hivemindConnection","isFirstLaunch","needsKeyboardEntry","focussedKey","connections","keyboardSubscriptions","self","problemStart","$gp","now","timeTakenByOpponents","$users","$problemStart","u","padTime","num","padStart","fmtTime","ms","hours","minutes","seconds","peer","dataResponders","$problem","send","problem","ourId","openConnection","conn","res","on","otherId","removePlayer","sendInitialState","emit","msg","$id","connect","subscriptions","$self","us","_classCallCheck","Constructor","TypeError","_defineProperties","descriptor","defineProperty","_createClass","protoProps","staticProps","normalizeComputedStyleValue","generateRandomNumber","min","fractionDigits","randomNumber","pow","generateRandomArrayElement","$cryptoduel$subscriptions","DEFAULT_CONFETTI_COLORS","getWindowWidthCoefficient","canvasWidth","log","ConfettiShape","initialPosition","confettiRadius","confettiColors","emojis","emojiSize","initialSpeed","confettiSpeed","finalConfettiSpeedX","rotationSpeed","dragForceCoefficient","radius","initialRadius","rotationAngle","emojiRotationAngle","PI","radiusYUpdateDirection","angle","absCos","abs","cos","absSin","sin","positionShift","shiftedInitialPosition","currentPosition","emoji","createdAt","canvasContext","dpr","devicePixelRatio","fillStyle","beginPath","ellipse","font","save","translate","rotate","textAlign","fillText","restore","iterationTimeDelta","currentTime","timeDeltaSinceCreation","canvasHeight","createCanvas","canvas","height","left","zIndex","pointerEvents","normalizeConfettiConfig","confettiConfig","_confettiConfig$confe","_confettiConfig$confe2","confettiNumber","confettiesNumber","_confettiConfig$confe3","_confettiConfig$emoji","emojies","_confettiConfig$emoji2","ConfettiBatch","_this","shapes","completionCallback","resolvePromise","_this$shapes","apply","_a","time","cleanupInvisibleShapes","_this2","timeDelta","shape","updatePosition","draw","getIsVisibleOnCanvas","JSConfetti","jsConfettiConfig","activeConfettiBatches","getContext","requestAnimationFrameRequested","lastUpdated","iterationIndex","loop","requestAnimationFrame","computedStyles","batch","processShapes","complete","queueAnimationFrameIfNeeded","_normalizeConfettiCon","canvasRect","yPosition","leftConfettiPosition","rightConfettiPosition","confettiGroup","confettiOnTheRight","confettiOnTheLeft","addShapes","getBatchCompletePromise","getCongratulationsTitle","choose","confetti","ConfettiGenerator","$cryptoduel$confetti","keebSub","shuffleArray","generateRandomEncryption","encMap","some","toAristocratCipher","quote","plaintext","encryptionAlphabet","ciphertext","char","hint","splitQuote","patristify","alphabetChars","cleanUpText","replaceableElementDefaultOptions","ogchar","dispatch","_detail","replaceableElement","options_","setProperties","onKeyDown","to","newOptions","destroy","action_result","div","create_if_block","svelte_element","create_dynamic_element","focussedKeys","replacement","disableUnderline","focussed","listener","subscriptionId","subscribeToKeyboard","$$invalidate","replacement_","constants_0","child_ctx","constants_1","div1","div0","t0","t0_value","replacementcharacter_changes","each_blocks","word","replacedChars","ch","alphabetIdx","replaceChars","duplicateReplacements","duplicates","visited","entry","getDuplicates","tr","td0","td1","t2","t2_value","table","td2","frequencies","it","count","item","getCounts","t1_value","author","if_block","create_if_block_1","current","t1","replacementtable_changes","getProgress","words","every","isCorrect","newReplacement","input_disabled_value","label_1","gp","$name","t_value","id_","clicked","shareLink","joinLink","href","encodeURIComponent","getJoinLink","clipboard","writeText","share","getDigit","ntn","getBoolean","getUnit","getRandomColor","colors","DEFAULTS","square","path","mouthSpread","faceColor","isMouthOpen","SIZE","rect0","rect0_rx_value","rect1","rect2","wrapperTranslateX","wrapperTranslateY","wrapperRotate","wrapperScale","wrapperColor","isCircle","eyeSpread","rect3","rect4","g0","faceTranslateX","faceTranslateY","faceRotate","svg","mask","g1","numFromName","charactersArray","charactersCodesSum","charactersArrayItem","charCodeAt","getNumber","preTranslateX","preTranslateY","hexcolor","substr","generateData","userbubble","UserBubble","userbubble_changes","emptyProgress","$gameProblem","span","each_1_else","users_","passive","exiting","startingExit","handleExtensionWait","handleHasExtended","focussedOnButton","extendHandleId","extendHandle","override","extended","p0","p1","verbose","element_src","h1","img","div2","span0","span1","flyInMs","closed","dense","expanded","$expanded","style_","checkbox0_changes","checkbox1_changes","create_if_block_2","if_block1","create_if_block_3","if_block2","getNewQuote","quoteIndex","chunk","fetch","async","quotes","quoteAuthor","quoteText","getQuoteGenerator","createProblem","$patristocratEnabled","toPatristocratCipher","$hintEnabled","connectingToHivemind","$hivemindConnection","rows","active","mounted","$needsKeyboardEntry","scrollBy","behavior","cb","main","timeTaken","$solved","addConfetti","errKey","getErrLocalstorageKey","showError","app","hot","dispose","accept"],"mappings":"gCAAA,SAASA,KAgBT,SAASC,EAAIC,GACT,OAAOA,IAEX,SAASC,IACL,OAAOC,OAAOC,OAAO,MAEzB,SAASC,EAAQC,GACbA,EAAIC,QAAQP,GAEhB,SAASQ,EAAYC,GACjB,MAAwB,mBAAVA,EAElB,SAASC,EAAeC,EAAGC,GACvB,OAAOD,GAAKA,EAAIC,GAAKA,EAAID,IAAMC,GAAOD,GAAkB,iBAANA,GAAgC,mBAANA,EAEhF,IAAIE,EA84BAC,EA33BJ,SAASC,EAAUC,KAAUC,GACzB,GAAa,MAATD,EACA,OAAOjB,EAEX,MAAMmB,EAAQF,EAAMD,aAAaE,GACjC,OAAOC,EAAMC,YAAc,IAAMD,EAAMC,cAAgBD,EAE3D,SAASE,EAAgBJ,GACrB,IAAIK,EAEJ,OADAN,EAAUC,GAAOM,GAAKD,EAAQC,GAA9BP,GACOM,EAEX,SAASE,EAAoBC,EAAWR,EAAOS,GAC3CD,EAAUE,GAAGC,WAAWC,KAAKb,EAAUC,EAAOS,IAElD,SAASI,EAAYC,EAAYC,EAAKC,EAAS/B,GAC3C,GAAI6B,EAAY,CACZ,MAAMG,EAAWC,EAAiBJ,EAAYC,EAAKC,EAAS/B,GAC5D,OAAO6B,EAAW,GAAGG,IAG7B,SAASC,EAAiBJ,EAAYC,EAAKC,EAAS/B,GAChD,OAAO6B,EAAW,IAAM7B,EAtE5B,SAAgBkC,EAAKC,GAEjB,IAA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