altcha 3.0.8 → 3.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/external/altcha.js +4106 -3837
- package/dist/external/altcha.min.js +1 -1
- package/dist/external/altcha.umd.cjs +4064 -3795
- package/dist/external/altcha.umd.min.cjs +1 -1
- package/dist/main/altcha.i18n.js +4072 -3799
- package/dist/main/altcha.i18n.min.js +1 -1
- package/dist/main/altcha.i18n.umd.cjs +3999 -3726
- package/dist/main/altcha.i18n.umd.min.cjs +1 -1
- package/dist/main/altcha.js +4072 -3799
- package/dist/main/altcha.min.js +1 -1
- package/dist/main/altcha.umd.cjs +3999 -3726
- package/dist/main/altcha.umd.min.cjs +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=Array.isArray,t=Array.prototype.indexOf,n=Array.prototype.includes,r=Array.from,i=Object.keys,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyDescriptors,l=Object.prototype,c=Array.prototype,u=Object.getPrototypeOf,f=Object.isExtensible;const d=()=>{};function h(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}const v=1<<24,p=16,g=32,m=64,y=512,b=1024,w=2048,_=4096,$=8192,E=16384,C=32768,S=1<<25,k=65536,x=1<<17,I=1<<19,O=65536,T=1<<21,A=1<<23,R=Symbol("$state"),P=Symbol("legacy props"),L=Symbol(""),M=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},N=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function D(e){return e===this.v}function V(e,t){return e!=e?t==t:e!==t||null!==e&&"object"==typeof e||"function"==typeof e}function j(e){return!V(e,this.v)}const U={},F=Symbol(),q="http://www.w3.org/1999/xhtml";let H=null;function G(e){H=e}function Y(e,t=!1,n){H={p:H,i:!1,c:null,e:null,s:e,x:null,r:Qn,l:null}}function B(e){var t=H,n=t.e;if(null!==n)for(var r of(t.e=null,n))xr(r);return void 0!==e&&(t.x=e),t.i=!0,H=t.p,e??{}}let J=[];function Z(){var e=J;J=[],function(e){for(var t=0;t<e.length;t++)e[t]()}(e)}function W(e){if(0===J.length&&!En){var t=J;queueMicrotask(()=>{t===J&&Z()})}J.push(e)}function z(){for(;J.length>0;)Z()}function X(e){console.warn("https://svelte.dev/e/hydration_mismatch")}let K,Q=!1;function ee(e){Q=e}function te(e){if(null===e)throw X(),U;return K=e}function ne(){return te(ye(K))}function re(e){if(Q){if(null!==ye(K))throw X(),U;K=e}}function ie(e=1){if(Q){for(var t=e,n=K;t--;)n=ye(n);K=n}}function oe(e=!0){for(var t=0,n=K;;){if(8===n.nodeType){var r=n.data;if("]"===r){if(0===t)return n;t-=1}else("["===r||"[!"===r||"["===r[0]&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=ye(n);e&&n.remove(),n=i}}function ae(e){if(!e||8!==e.nodeType)throw X(),U;return e.data}function se(t){if("object"!=typeof t||null===t||R in t)return t;const n=u(t);if(n!==l&&n!==c)return t;var r=new Map,i=e(t),o=Fn(0),s=lr,f=e=>{if(lr===s)return e();var t=zn,n=lr;Kn(null),cr(s);var r=e();return Kn(t),cr(n),r};return i&&r.set("length",Fn(t.length)),new Proxy(t,{defineProperty(e,t,n){"value"in n&&!1!==n.configurable&&!1!==n.enumerable&&!1!==n.writable||function(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}();var i=r.get(t);return void 0===i?f(()=>{var e=Fn(n.value);return r.set(t,e),e}):Hn(i,n.value,!0),!0},deleteProperty(e,t){var n=r.get(t);if(void 0===n){if(t in e){const e=f(()=>Fn(F));r.set(t,e),Yn(o)}}else Hn(n,F),Yn(o);return!0},get(e,n,i){if(n===R)return t;var o=r.get(n),s=n in e;if(void 0!==o||s&&!a(e,n)?.writable||(o=f(()=>Fn(se(s?e[n]:F))),r.set(n,o)),void 0!==o){var l=yr(o);return l===F?void 0:l}return Reflect.get(e,n,i)},getOwnPropertyDescriptor(e,t){var n=Reflect.getOwnPropertyDescriptor(e,t);if(n&&"value"in n){var i=r.get(t);i&&(n.value=yr(i))}else if(void 0===n){var o=r.get(t),a=o?.v;if(void 0!==o&&a!==F)return{enumerable:!0,configurable:!0,value:a,writable:!0}}return n},has(e,t){if(t===R)return!0;var n=r.get(t),i=void 0!==n&&n.v!==F||Reflect.has(e,t);if((void 0!==n||null!==Qn&&(!i||a(e,t)?.writable))&&(void 0===n&&(n=f(()=>Fn(i?se(e[t]):F)),r.set(t,n)),yr(n)===F))return!1;return i},set(e,t,n,s){var l=r.get(t),c=t in e;if(i&&"length"===t)for(var u=n;u<l.v;u+=1){var d=r.get(u+"");void 0!==d?Hn(d,F):u in e&&(d=f(()=>Fn(F)),r.set(u+"",d))}void 0===l?c&&!a(e,t)?.writable||(Hn(l=f(()=>Fn(void 0)),se(n)),r.set(t,l)):(c=l.v!==F,Hn(l,f(()=>se(n))));var h=Reflect.getOwnPropertyDescriptor(e,t);if(h?.set&&h.set.call(s,n),!c){if(i&&"string"==typeof t){var v=r.get("length"),p=Number(t);Number.isInteger(p)&&p>=v.v&&Hn(v,p+1)}Yn(o)}return!0},ownKeys(e){yr(o);var t=Reflect.ownKeys(e).filter(e=>{var t=r.get(e);return void 0===t||t.v!==F});for(var[n,i]of r)i.v===F||n in e||t.push(n);return t},setPrototypeOf(){!function(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}()}})}function le(e){try{if(null!==e&&"object"==typeof e&&R in e)return e[R]}catch{}return e}function ce(e,t){return Object.is(le(e),le(t))}var ue,fe,de,he,ve;function pe(){if(void 0===ue){ue=window,fe=document,de=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;he=a(t,"firstChild").get,ve=a(t,"nextSibling").get,f(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),f(n)&&(n.__t=void 0)}}function ge(e=""){return document.createTextNode(e)}function me(e){return he.call(e)}function ye(e){return ve.call(e)}function be(e,t){if(!Q)return me(e);var n=me(K);if(null===n)n=K.appendChild(ge());else if(t&&3!==n.nodeType){var r=ge();return n?.before(r),te(r),r}return t&&Ee(n),te(n),n}function we(e,t=!1){if(!Q){var n=me(e);return n instanceof Comment&&""===n.data?ye(n):n}if(t){if(3!==K?.nodeType){var r=ge();return K?.before(r),te(r),r}Ee(K)}return K}function _e(e,t=1,n=!1){let r=Q?K:e;for(var i;t--;)i=r,r=ye(r);if(!Q)return r;if(n){if(3!==r?.nodeType){var o=ge();return null===r?i?.after(o):r.before(o),te(o),o}Ee(r)}return te(r),r}function $e(e,t,n){let r;return document.createElementNS(t??q,e,r)}function Ee(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;null!==t&&3===t.nodeType;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function Ce(e){var t=Qn;if(null===t)return zn.f|=A,e;if(0===(t.f&C)&&!(4&t.f))throw e;Se(e,t)}function Se(e,t){for(;null!==t;){if(128&t.f){if(0===(t.f&C))throw e;try{return void t.b.error(e)}catch(t){e=t}}t=t.parent}throw e}const ke=-7169;function xe(e,t){e.f=e.f&ke|t}function Ie(e){0!==(e.f&y)||null===e.deps?xe(e,b):xe(e,_)}function Oe(e){if(null!==e)for(const t of e)2&t.f&&0!==(t.f&O)&&(t.f^=O,Oe(t.deps))}function Te(e,t,n){0!==(e.f&w)?t.add(e):0!==(e.f&_)&&n.add(e),Oe(e.deps),xe(e,b)}function Ae(e){return e.endsWith("capture")&&"gotpointercapture"!==e&&"lostpointercapture"!==e}const Re=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Pe(e){return Re.includes(e)}const Le={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function Me(e){return e=e.toLowerCase(),Le[e]??e}const Ne=["touchstart","touchmove"];function De(e){return Ne.includes(e)}function Ve(e,t){if(t){const t=document.body;e.autofocus=!0,W(()=>{document.activeElement===t&&e.focus()})}}let je=!1;function Ue(){je||(je=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function Fe(e){var t=zn,n=Qn;Kn(null),er(null);try{return e()}finally{Kn(t),er(n)}}const qe=Symbol("events"),He=new Set,Ge=new Set;function Ye(e,t,n,r={}){function i(e){if(r.capture||ze.call(t,e),!e.cancelBubble)return Fe(()=>n?.call(this,e))}return e.startsWith("pointer")||e.startsWith("touch")||"wheel"===e?W(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function Be(e,t,n,r,i){var o={capture:r,passive:i},a=Ye(e,t,n,o);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Sr(()=>{t.removeEventListener(e,a,o)})}function Je(e,t,n){(t[qe]??={})[e]=n}function Ze(e){for(var t=0;t<e.length;t++)He.add(e[t]);for(var n of Ge)n(e)}let We=null;function ze(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;We=e;var s=0,l=We===e&&e[qe];if(l){var c=i.indexOf(l);if(-1!==c&&(t===document||t===window))return void(e[qe]=t);var u=i.indexOf(t);if(-1===u)return;c<=u&&(s=c)}if((a=i[s]||e.target)!==t){o(e,"currentTarget",{configurable:!0,get:()=>a||n});var f=zn,d=Qn;Kn(null),er(null);try{for(var h,v=[];null!==a;){var p=a.assignedSlot||a.parentNode||a.host||null;try{var g=a[qe]?.[r];null==g||a.disabled&&e.target!==a||g.call(a,e)}catch(e){h?v.push(e):h=e}if(e.cancelBubble||p===t||null===p)break;a=p}if(h){for(let e of v)queueMicrotask(()=>{throw e});throw h}}finally{e[qe]=t,delete e.currentTarget,Kn(f),er(d)}}}const Xe=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Ke(e){var t=$e("template");return t.innerHTML=function(e){return Xe?.createHTML(e)??e}(e.replaceAll("<!>","\x3c!----\x3e")),t.content}function Qe(e,t){var n=Qn;null===n.nodes&&(n.nodes={start:e,end:t,a:null,t:null})}function et(e,t){var n,r=!!(1&t),i=!!(2&t),o=!e.startsWith("<!>");return()=>{if(Q)return Qe(K,null),K;void 0===n&&(n=Ke(o?e:"<!>"+e),r||(n=me(n)));var t=i||de?document.importNode(n,!0):n.cloneNode(!0);r?Qe(me(t),t.lastChild):Qe(t,t);return t}}function tt(e,t,n="svg"){var r,i=`<${n}>${!e.startsWith("<!>")?e:"<!>"+e}</${n}>`;return()=>{if(Q)return Qe(K,null),K;if(!r){var e=Ke(i);r=me(me(e))}var t=r.cloneNode(!0);return Qe(t,t),t}}function nt(e,t){return tt(e,0,"svg")}function rt(e=""){if(!Q){var t=ge(e+"");return Qe(t,t),t}var n=K;return 3!==n.nodeType?(n.before(n=ge()),te(n)):Ee(n),Qe(n,n),n}function it(){if(Q)return Qe(K,null),K;var e=document.createDocumentFragment(),t=document.createComment(""),n=ge();return e.append(t,n),Qe(t,n),e}function ot(e,t){if(Q){var n=Qn;return 0!==(n.f&C)&&null!==n.nodes.end||(n.nodes.end=K),void ne()}null!==e&&e.before(t)}class at{parent;is_pending=!1;transform_error;#e;#t=Q?K:null;#n;#r;#i;#o=null;#a=null;#s=null;#l=null;#c=0;#u=0;#f=!1;#d=new Set;#h=new Set;#v=null;#p=function(e){let t,n=0,r=Un(0);return()=>{Cr()&&(yr(r),Or(()=>(0===n&&(t=_r(()=>e(()=>Yn(r)))),n+=1,()=>{W(()=>{n-=1,0===n&&(t?.(),t=void 0,Yn(r))})})))}}(()=>(this.#v=Un(this.#c),()=>{this.#v=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=Qn;t.b=this,t.f|=128,n(e)},this.parent=Qn.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=Ar(()=>{if(Q){const e=this.#t;ne();const t="[!"===e.data;if(e.data.startsWith("[?")){const t=JSON.parse(e.data.slice(2));this.#g(t)}else t?this.#m():this.#y()}else this.#b()},589824),Q&&(this.#e=K)}#y(){try{this.#o=Pr(()=>this.#r(this.#e))}catch(e){this.error(e)}}#g(e){const t=this.#n.failed;t&&(this.#s=Pr(()=>{t(this.#e,()=>e,()=>()=>{})}))}#m(){const e=this.#n.pending;if(e){this.is_pending=!0,this.#a=Pr(()=>e(this.#e));var t=wn;W(()=>{var e=this.#l=document.createDocumentFragment(),n=ge();e.append(n),this.#o=this.#w(()=>Pr(()=>this.#r(n))),0===this.#u&&(this.#e.before(e),this.#l=null,jr(this.#a,()=>{this.#a=null}),this.#_(t))})}}#b(){var e=wn;try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#c=0,this.#o=Pr(()=>{this.#r(this.#e)}),this.#u>0){var t=this.#l=document.createDocumentFragment();qr(this.#o,t);const e=this.#n.pending;this.#a=Pr(()=>e(this.#e))}else this.#_(e)}catch(e){this.error(e)}}#_(e){this.is_pending=!1;for(const t of this.#d)xe(t,w),e.schedule(t);for(const t of this.#h)xe(t,_),e.schedule(t);this.#d.clear(),this.#h.clear()}defer_effect(e){Te(e,this.#d,this.#h)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#w(e){var t=Qn,n=zn,r=H;er(this.#i),Kn(this.#i),G(this.#i.ctx);try{return On.ensure(),e()}catch(e){return Ce(e),null}finally{er(t),Kn(n),G(r)}}#$(e,t){this.has_pending_snippet()?(this.#u+=e,0===this.#u&&(this.#_(t),this.#a&&jr(this.#a,()=>{this.#a=null}),this.#l&&(this.#e.before(this.#l),this.#l=null))):this.parent&&this.parent.#$(e,t)}update_pending_count(e,t){this.#$(e,t),this.#c+=e,this.#v&&!this.#f&&(this.#f=!0,W(()=>{this.#f=!1,this.#v&&Gn(this.#v,this.#c)}))}get_effect_pending(){return this.#p(),yr(this.#v)}error(e){var t=this.#n.onerror;let n=this.#n.failed;if(!t&&!n)throw e;this.#o&&(Nr(this.#o),this.#o=null),this.#a&&(Nr(this.#a),this.#a=null),this.#s&&(Nr(this.#s),this.#s=null),Q&&(te(this.#t),ie(),te(oe()));var r=!1,i=!1;const o=()=>{r?console.warn("https://svelte.dev/e/svelte_boundary_reset_noop"):(r=!0,i&&function(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}(),null!==this.#s&&jr(this.#s,()=>{this.#s=null}),this.#w(()=>{this.#b()}))},a=e=>{try{i=!0,t?.(e,o),i=!1}catch(e){Se(e,this.#i&&this.#i.parent)}n&&(this.#s=this.#w(()=>{try{return Pr(()=>{var t=Qn;t.b=this,t.f|=128,n(this.#e,()=>e,()=>o)})}catch(e){return Se(e,this.#i.parent),null}}))};W(()=>{var t;try{t=this.transform_error(e)}catch(e){return void Se(e,this.#i&&this.#i.parent)}null!==t&&"object"==typeof t&&"function"==typeof t.then?t.then(a,e=>Se(e,this.#i&&this.#i.parent)):a(t)})}}function st(e,t){var n=null==t?"":"object"==typeof t?`${t}`:t;n!==(e.__t??=e.nodeValue)&&(e.__t=n,e.nodeValue=`${n}`)}function lt(e,t){return ft(e,t)}function ct(e,t){pe(),t.intro=t.intro??!1;const n=t.target,r=Q,i=K;try{for(var o=me(n);o&&(8!==o.nodeType||"["!==o.data);)o=ye(o);if(!o)throw U;ee(!0),te(o);const r=ft(e,{...t,anchor:o});return ee(!1),r}catch(r){if(r instanceof Error&&r.message.split("\n").some(e=>e.startsWith("https://svelte.dev/e/")))throw r;return r!==U&&console.warn("Failed to hydrate: ",r),!1===t.recover&&function(){throw new Error("https://svelte.dev/e/hydration_failed")}(),pe(),n.textContent="",ee(!1),lt(e,t)}finally{ee(r),te(i)}}const ut=new Map;function ft(e,{target:t,anchor:n,props:i={},events:o,context:a,intro:s=!0,transformError:l}){pe();var c=void 0,u=function(e){On.ensure();const t=Er(524352,e);return(e={})=>new Promise(n=>{e.outro?jr(t,()=>{Nr(t),n(void 0)}):(Nr(t),n(void 0))})}(()=>{var s=n??t.appendChild(ge());!function(e,t,n,r){new at(e,t,n,r)}(s,{pending:()=>{}},t=>{if(Y({}),a&&(H.c=a),o&&(i.$$events=o),Q&&Qe(t,null),c=e(t,i)||{},Q&&(Qn.nodes.end=K,null===K||8!==K.nodeType||"]"!==K.data))throw X(),U;B()},l);var u=new Set,f=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!u.has(r)){u.add(r);var i=De(r);for(const e of[t,document]){var o=ut.get(e);void 0===o&&(o=new Map,ut.set(e,o));var a=o.get(r);void 0===a?(e.addEventListener(r,ze,{passive:i}),o.set(r,1)):o.set(r,a+1)}}}};return f(r(He)),Ge.add(f),()=>{for(var e of u)for(const n of[t,document]){var r=ut.get(n),i=r.get(e);0==--i?(n.removeEventListener(e,ze),r.delete(e),0===r.size&&ut.delete(n)):r.set(e,i)}Ge.delete(f),s!==n&&s.parentNode?.removeChild(s)}});return dt.set(c,u),c}let dt=new WeakMap;function ht(e){var t=null!==zn&&2&zn.f?zn:null;null!==Qn&&(Qn.f|=I);return{ctx:H,deps:null,effects:null,equals:D,f:2050,fn:e,reactions:null,rv:0,v:F,wv:0,parent:t??Qn,ac:null}}function vt(e,t,n){let r=Qn;null===r&&function(){throw new Error("https://svelte.dev/e/async_derived_orphan")}();var i=void 0,o=Un(F),a=!zn,s=new Map;return function(e){Er(4718592,e)}(()=>{var t=Qn,n=h();i=n.promise;try{Promise.resolve(e()).then(n.resolve,n.reject).finally(wt)}catch(e){n.reject(e),wt()}var l=wn;if(a){if(0!==(t.f&C))var c=_t();if(r.b.is_rendered())s.get(l)?.reject(M),s.delete(l);else{for(const e of s.values())e.reject(M);s.clear()}s.set(l,n)}const u=(e,n=void 0)=>{c&&c(n===M);if(n!==M&&0===(t.f&E)){if(l.activate(),n)o.f|=A,Gn(o,n);else{0!==(o.f&A)&&(o.f^=A),Gn(o,e);for(const[e,t]of s){if(s.delete(e),e===l)break;t.reject(M)}}l.deactivate()}};n.promise.then(u,e=>u(null,e||"unknown"))}),Sr(()=>{for(const e of s.values())e.reject(M)}),new Promise(e=>{!function t(n){function r(){n===i?e(o):t(i)}n.then(r,r)}(i)})}function pt(e){const t=ht(e);return nr(t),t}function gt(e){var t,n=Qn;er(function(e){for(var t=e.parent;null!==t;){if(!(2&t.f))return 0===(t.f&E)?t:null;t=t.parent}return null}(e));try{e.f&=-65537,function(e){var t=e.effects;if(null!==t){e.effects=null;for(var n=0;n<t.length;n+=1)Nr(t[n])}}(e),t=hr(e)}finally{er(n)}return t}function mt(e){var t=gt(e);e.equals(t)||(e.wv=ur(),wn?.is_fork&&null!==e.deps||(e.v=t,null!==e.deps))?Zn||(null!==_n?(Cr()||wn?.is_fork)&&_n.set(e,t):Ie(e)):xe(e,b)}function yt(e){if(null!==e.effects)for(const t of e.effects)t.teardown&&gr(t)}function bt(e,t,n,r){const i=ht;var o=e.filter(e=>!e.settled);if(0!==n.length||0!==o.length){var a,s,l,c,u=Qn,f=(a=Qn,s=zn,l=H,c=wn,function(e=!0){er(a),Kn(s),G(l),e&&0===(a.f&E)&&(c?.activate(),c?.apply())}),d=1===o.length?o[0].promise:o.length>1?Promise.all(o.map(e=>e.promise)):null;if(0!==n.length){var h=_t();d?d.then(()=>{f(),p(),wt()}):p()}else d.then(()=>v(t.map(i)))}else r(t.map(i));function v(e){f();try{r(e)}catch(e){0===(u.f&E)&&Se(e,u)}wt()}function p(){Promise.all(n.map(e=>vt(e))).then(e=>v([...t.map(i),...e])).catch(e=>Se(e,u)).finally(()=>h())}}function wt(e=!0){er(null),Kn(null),G(null),e&&wn?.deactivate()}function _t(){var e=Qn.b,t=wn,n=e.is_rendered();return e.update_pending_count(1,t),t.increment(n),(r=!1)=>{e.update_pending_count(-1,t),t.decrement(n,r)}}class $t{anchor;#E=new Map;#C=new Map;#S=new Map;#k=new Set;#x=!0;constructor(e,t=!0){this.anchor=e,this.#x=t}#I=e=>{if(this.#E.has(e)){var t=this.#E.get(e),n=this.#C.get(t);if(n)Fr(n,!0),this.#k.delete(t);else{var r=this.#S.get(t);r&&(this.#C.set(t,r.effect),this.#S.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(const[t,n]of this.#E){if(this.#E.delete(t),t===e)break;const r=this.#S.get(n);r&&(Nr(r.effect),this.#S.delete(n))}for(const[e,r]of this.#C){if(e===t||this.#k.has(e))continue;const i=()=>{if(Array.from(this.#E.values()).includes(e)){var t=document.createDocumentFragment();qr(r,t),t.append(ge()),this.#S.set(e,{effect:r,fragment:t})}else Nr(r);this.#k.delete(e),this.#C.delete(e)};this.#x||!n?(this.#k.add(e),jr(r,i,!1)):i()}}};#O=e=>{this.#E.delete(e);const t=Array.from(this.#E.values());for(const[e,n]of this.#S)t.includes(e)||(Nr(n.effect),this.#S.delete(e))};ensure(e,t){var n=wn;!t||this.#C.has(e)||this.#S.has(e)||this.#C.set(e,Pr(()=>t(this.anchor)));this.#E.set(n,e),Q&&(this.anchor=K),this.#I(n)}}function Et(e,t,n=!1){var r;Q&&(r=K,ne());var i=new $t(e);function o(e,t){if(Q){var n=ae(r);if(e!==parseInt(n.substring(1))){var o=oe();return te(o),i.anchor=o,ee(!1),i.ensure(e,t),void ee(!0)}}i.ensure(e,t)}Ar(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},n?k:0)}const Ct=Symbol("NaN");function St(e,t,n=!1,r=!1,i=!1,o=!1){var a=e,s="";if(n){var l=e;Q&&(a=te(me(l)))}Tr(()=>{var e=Qn;if(s!==(s=t()??"")){if(n&&!Q)return e.nodes=null,l.innerHTML=s,void(""!==s&&Qe(me(l),l.lastChild));if(null!==e.nodes&&(Dr(e.nodes.start,e.nodes.end),e.nodes=null),""!==s){if(Q){K.data;for(var o=ne(),c=o;null!==o&&(8!==o.nodeType||""!==o.data);)c=o,o=ye(o);if(null===o)throw X(),U;return Qe(K,c),void(a=te(o))}var u=$e(r?"svg":i?"math":"template",r?"http://www.w3.org/2000/svg":i?"http://www.w3.org/1998/Math/MathML":void 0);u.innerHTML=s;var f=r||i?u:u.content;if(Qe(me(f),f.lastChild),r||i)for(;me(f);)a.before(me(f));else a.before(f)}}else Q&&ne()})}function kt(e,t){var n,r=void 0;Rr(()=>{r!==(r=t())&&(n&&(Nr(n),n=null),r&&(n=Pr(()=>{Ir(()=>r(e))})))})}function xt(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=xt(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function It(e){return"object"==typeof e?function(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=xt(e))&&(r&&(r+=" "),r+=t);return r}(e):e??""}const Ot=[..." \t\n\r\f \v\ufeff"];function Tt(e,t=!1){var n=t?" !important;":";",r="";for(var i of Object.keys(e)){var o=e[i];null!=o&&""!==o&&(r+=" "+i+": "+o+n)}return r}function At(e){return"-"!==e[0]||"-"!==e[1]?e.toLowerCase():e}function Rt(e,t,n,r,i,o){var a=e.__className;if(Q||a!==n||void 0===a){var s=function(e,t,n){var r=null==e?"":""+e;if(n)for(var i of Object.keys(n))if(n[i])r=r?r+" "+i:i;else if(r.length)for(var o=i.length,a=0;(a=r.indexOf(i,a))>=0;){var s=a+o;0!==a&&!Ot.includes(r[a-1])||s!==r.length&&!Ot.includes(r[s])?a=s:r=(0===a?"":r.substring(0,a))+r.substring(s+1)}return""===r?null:r}(n,0,o);Q&&s===e.getAttribute("class")||(null==s?e.removeAttribute("class"):t?e.className=s:e.setAttribute("class",s)),e.__className=n}else if(o&&i!==o)for(var l in o){var c=!!o[l];null!=i&&c===!!i[l]||e.classList.toggle(l,c)}return o}function Pt(e,t={},n,r){for(var i in n){var o=n[i];t[i]!==o&&(null==n[i]?e.style.removeProperty(i):e.style.setProperty(i,o,r))}}function Lt(e,t,n,r){var i=e.__style;if(Q||i!==t){var o=function(e,t){if(t){var n,r,i="";if(Array.isArray(t)?(n=t[0],r=t[1]):n=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var o=!1,a=0,s=!1,l=[];n&&l.push(...Object.keys(n).map(At)),r&&l.push(...Object.keys(r).map(At));var c=0,u=-1;const t=e.length;for(var f=0;f<t;f++){var d=e[f];if(s?"/"===d&&"*"===e[f-1]&&(s=!1):o?o===d&&(o=!1):"/"===d&&"*"===e[f+1]?s=!0:'"'===d||"'"===d?o=d:"("===d?a++:")"===d&&a--,!s&&!1===o&&0===a)if(":"===d&&-1===u)u=f;else if(";"===d||f===t-1){if(-1!==u){var h=At(e.substring(c,u).trim());l.includes(h)||(";"!==d&&f++,i+=" "+e.substring(c,f).trim()+";")}c=f+1,u=-1}}}return n&&(i+=Tt(n)),r&&(i+=Tt(r,!0)),""===(i=i.trim())?null:i}return null==e?null:String(e)}(t,r);Q&&o===e.getAttribute("style")||(null==o?e.removeAttribute("style"):e.style.cssText=o),e.__style=t}else r&&(Array.isArray(r)?(Pt(e,n?.[0],r[0]),Pt(e,n?.[1],r[1],"important")):Pt(e,n,r));return r}function Mt(t,n,r=!1){if(t.multiple){if(null==n)return;if(!e(n))return void console.warn("https://svelte.dev/e/select_multiple_invalid_value");for(var i of t.options)i.selected=n.includes(Nt(i))}else{for(i of t.options){if(ce(Nt(i),n))return void(i.selected=!0)}r&&void 0===n||(t.selectedIndex=-1)}}function Nt(e){return"__value"in e?e.__value:e.value}const Dt=Symbol("class"),Vt=Symbol("style"),jt=Symbol("is custom element"),Ut=Symbol("is html"),Ft=N?"link":"LINK",qt=N?"input":"INPUT",Ht=N?"option":"OPTION",Gt=N?"select":"SELECT",Yt=N?"progress":"PROGRESS";function Bt(e){if(Q){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var n=e.value;Zt(e,"value",null),e.value=n}if(e.hasAttribute("checked")){var r=e.checked;Zt(e,"checked",null),e.checked=r}}};e.__on_r=n,W(n),Ue()}}function Jt(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function Zt(e,t,n,r){var i=zt(e);Q&&(i[t]=e.getAttribute(t),"src"===t||"srcset"===t||"href"===t&&e.nodeName===Ft)||i[t]!==(i[t]=n)&&("loading"===t&&(e[L]=n),null==n?e.removeAttribute(t):"string"!=typeof n&&Kt(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Wt(e,t,n=[],r=[],i=[],o,a=!1,s=!1){bt(i,n,r,n=>{var r=void 0,i={},o=e.nodeName===Gt,l=!1;if(Rr(()=>{var c=t(...n.map(yr)),u=function(e,t,n,r,i=!1){if(Q&&i&&e.nodeName===qt){var o=e;("checkbox"===o.type?"defaultChecked":"defaultValue")in n||Bt(o)}var a=zt(e),s=a[jt],l=!a[Ut];let c=Q&&s;c&&ee(!1);var u=t||{},f=e.nodeName===Ht;for(var d in t)d in n||(n[d]=null);n.class?n.class=It(n.class):n[Dt]&&(n.class=null),n[Vt]&&(n.style??=null);var h=Kt(e);for(const r in n){let i=n[r];if(f&&"value"===r&&null==i)e.value=e.__value="",u[r]=i;else if("class"!==r)if("style"!==r){var v=u[r];if(i!==v||void 0===i&&e.hasAttribute(r)){u[r]=i;var p=r[0]+r[1];if("$$"!==p)if("on"===p){const t={},n="$$"+r;let o=r.slice(2);var g=Pe(o);if(Ae(o)&&(o=o.slice(0,-7),t.capture=!0),!g&&v){if(null!=i)continue;e.removeEventListener(o,u[n],t),u[n]=null}if(g)Je(o,e,i),Ze([o]);else if(null!=i){let i=function(e){u[r].call(this,e)};u[n]=Ye(o,e,i,t)}}else if("style"===r)Zt(e,r,i);else if("autofocus"===r)Ve(e,Boolean(i));else if(s||"__value"!==r&&("value"!==r||null==i))if("selected"===r&&f)Jt(e,i);else{var m=r;l||(m=Me(m));var y="defaultValue"===m||"defaultChecked"===m;if(null!=i||s||y)y||h.includes(m)&&(s||"string"!=typeof i)?(e[m]=i,m in a&&(a[m]=F)):"function"!=typeof i&&Zt(e,m,i);else if(a[r]=null,"value"===m||"checked"===m){let n=e;const r=void 0===t;if("value"===m){let e=n.defaultValue;n.removeAttribute(m),n.defaultValue=e,n.value=n.__value=r?e:null}else{let e=n.defaultChecked;n.removeAttribute(m),n.defaultChecked=e,n.checked=!!r&&e}}else e.removeAttribute(r)}else e.value=e.__value=i}}else Lt(e,i,t?.[Vt],n[Vt]),u[r]=i,u[Vt]=n[Vt];else Rt(e,"http://www.w3.org/1999/xhtml"===e.namespaceURI,i,0,t?.[Dt],n[Dt]),u[r]=i,u[Dt]=n[Dt]}return c&&ee(!0),u}(e,r,c,0,a,s);l&&o&&"value"in c&&Mt(e,c.value);for(let e of Object.getOwnPropertySymbols(i))c[e]||Nr(i[e]);for(let t of Object.getOwnPropertySymbols(c)){var f=c[t];"@attach"!==t.description||r&&f===r[t]||(i[t]&&Nr(i[t]),i[t]=Pr(()=>kt(e,()=>f))),u[t]=f}r=u}),o){var c=e;Ir(()=>{Mt(c,r.value,!0),function(e){var t=new MutationObserver(()=>{Mt(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Sr(()=>{t.disconnect()})}(c)})}l=!0})}function zt(e){return e.__attributes??={[jt]:e.nodeName.includes("-"),[Ut]:e.namespaceURI===q}}var Xt=new Map;function Kt(e){var t,n=e.getAttribute("is")||e.nodeName,r=Xt.get(n);if(r)return r;Xt.set(n,r=[]);for(var i=e,o=Element.prototype;o!==i;){for(var a in t=s(i))t[a].set&&r.push(a);i=u(i)}return r}function Qt(e,t,n=t){var r=new WeakSet;!function(e,t,n,r=n){e.addEventListener(t,()=>Fe(n));const i=e.__on_r;e.__on_r=i?()=>{i(),r(!0)}:()=>r(!0),Ue()}(e,"input",async i=>{var o=i?e.defaultValue:e.value;if(o=en(e)?tn(o):o,n(o),null!==wn&&r.add(wn),await mr(),o!==(o=t())){var a=e.selectionStart,s=e.selectionEnd,l=e.value.length;if(e.value=o??"",null!==s){var c=e.value.length;a===s&&s===l&&c>l?(e.selectionStart=c,e.selectionEnd=c):(e.selectionStart=a,e.selectionEnd=Math.min(s,c))}}}),(Q&&e.defaultValue!==e.value||null==_r(t)&&e.value)&&(n(en(e)?tn(e.value):e.value),null!==wn&&r.add(wn)),Or(()=>{var n=t();if(e===document.activeElement){var i=wn;if(r.has(i))return}en(e)&&n===tn(e.value)||("date"!==e.type||n||e.value)&&n!==e.value&&(e.value=n??"")})}function en(e){var t=e.type;return"number"===t||"range"===t}function tn(e){return""===e?null:+e}function nn(e,t){return e===t||e?.[R]===t}function rn(e={},t,n,r){var i=H.r,o=Qn;return Ir(()=>{var r,a;return Or(()=>{r=a,a=[],_r(()=>{e!==n(...a)&&(t(e,...a),r&&nn(n(...r),e)&&t(null,...r))})}),()=>{let r=o;for(;r!==i&&null!==r.parent&&r.parent.f&S;)r=r.parent;const s=r.teardown;r.teardown=()=>{a&&nn(n(...a),e)&&t(null,...a),s?.()}}}),e}const on={get(e,t){if(!e.exclude.includes(t))return e.props[t]},set:(e,t)=>!1,getOwnPropertyDescriptor(e,t){if(!e.exclude.includes(t))return t in e.props?{enumerable:!0,configurable:!0,value:e.props[t]}:void 0},has:(e,t)=>!e.exclude.includes(t)&&t in e.props,ownKeys:e=>Reflect.ownKeys(e.props).filter(t=>!e.exclude.includes(t))};function an(e,t,n){return new Proxy({props:e,exclude:t},on)}function sn(e,t,n,r){var i,o=r,a=!0,s=()=>(a&&(a=!1,o=r),o);void 0===e[t]&&void 0!==r&&s(),i=()=>{var n=e[t];return void 0===n?s():(a=!0,n)};var l=!1,c=ht(()=>(l=!1,i())),u=Qn;return function(e,t){if(arguments.length>0){const n=t?yr(c):e;return Hn(c,n),l=!0,void 0!==o&&(o=n),e}return Zn&&l||0!==(u.f&E)?c.v:yr(c)}}class ln{#T;#A;constructor(e){var t=new Map,n=(e,n)=>{var r=qn(n,!1,!1);return t.set(e,r),r};const r=new Proxy({...e.props||{},$$events:{}},{get:(e,r)=>yr(t.get(r)??n(r,Reflect.get(e,r))),has:(e,r)=>r===P||(yr(t.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r)),set:(e,r,i)=>(Hn(t.get(r)??n(r,i),i),Reflect.set(e,r,i))});this.#A=(e.hydrate?ct:lt)(e.component,{target:e.target,anchor:e.anchor,props:r,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError}),e?.props?.$$host&&!1!==e.sync||Tn(),this.#T=r.$$events;for(const e of Object.keys(this.#A))"$set"!==e&&"$destroy"!==e&&"$on"!==e&&o(this,e,{get(){return this.#A[e]},set(t){this.#A[e]=t},enumerable:!0});this.#A.$set=e=>{Object.assign(r,e)},this.#A.$destroy=()=>{!function(e,t){const n=dt.get(e);n?(dt.delete(e),n(t)):Promise.resolve()}(this.#A)}}$set(e){this.#A.$set(e)}$on(e,t){this.#T[e]=this.#T[e]||[];const n=(...e)=>t.call(this,...e);return this.#T[e].push(n),()=>{this.#T[e]=this.#T[e].filter(e=>e!==n)}}$destroy(){this.#A.$destroy()}}let cn=class{};function un(e,t,n,r){const i=n[e]?.type;if(t="Boolean"===i&&"boolean"!=typeof t?null!=t:t,!r||!n[e])return t;if("toAttribute"===r)switch(i){case"Object":case"Array":return null==t?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return null==t?null:t;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":default:return t;case"Number":return null!=t?+t:t}}function fn(e,t,n,r,s,l){let c=class extends cn{constructor(){super(e,n,s),this.$$p_d=t}static get observedAttributes(){return i(t).map(e=>(t[e].attribute||e).toLowerCase())}};return i(t).forEach(e=>{o(c.prototype,e,{get(){return this.$$c&&e in this.$$c?this.$$c[e]:this.$$d[e]},set(n){n=un(e,n,t),this.$$d[e]=n;var r=this.$$c;if(r){var i=a(r,e)?.get;i?r[e]=n:r.$set({[e]:n})}}})}),r.forEach(e=>{o(c.prototype,e,{get(){return this.$$c?.[e]}})}),e.element=c,c}function dn(e){null===H&&function(){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}(),kr(()=>{const t=_r(e);if("function"==typeof t)return t})}function hn(e,t,n){if(null==e)return t(void 0),d;const r=_r(()=>e.subscribe(t,n));return r.unsubscribe?()=>r.unsubscribe():r}"function"==typeof HTMLElement&&(cn=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){const e=this.$$l_u.get(t);e&&(e(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(e){return t=>{const n=$e("slot");"default"!==e&&(n.name=e),ot(t,n)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const n={},r=function(e){const t={};return e.childNodes.forEach(e=>{t[e.slot||"default"]=!0}),t}(this);for(const e of this.$$s)e in r&&("default"!==e||this.$$d.children?n[e]=t(e):(this.$$d.children=t(e),n.default=!0));for(const e of this.attributes){const t=this.$$g_p(e.name);t in this.$$d||(this.$$d[t]=un(t,e.value,this.$$p_d,"toProp"))}for(const e in this.$$p_d)e in this.$$d||void 0===this[e]||(this.$$d[e]=this[e],delete this[e]);this.$$c=(e={component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:n,$$host:this}},new ln(e)),this.$$me=function(e){On.ensure();const t=Er(524352,e);return()=>{Nr(t)}}(()=>{Or(()=>{this.$$r=!0;for(const e of i(this.$$c)){if(!this.$$p_d[e]?.reflect)continue;this.$$d[e]=this.$$c[e];const t=un(e,this.$$d[e],this.$$p_d,"toAttribute");null==t?this.removeAttribute(this.$$p_d[e].attribute||e):this.setAttribute(this.$$p_d[e].attribute||e,t)}this.$$r=!1})});for(const e in this.$$l)for(const t of this.$$l[e]){const n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}this.$$l={}}var e}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=un(e,n,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return i(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});const vn=[];function pn(e,t=d){let n=null;const r=new Set;function i(t){if(V(e,t)&&(e=t,n)){const t=!vn.length;for(const t of r)t[1](),vn.push(t,e);if(t){for(let e=0;e<vn.length;e+=2)vn[e][0](vn[e+1]);vn.length=0}}}function o(t){i(t(e))}return{set:i,update:o,subscribe:function(a,s=d){const l=[a,s];return r.add(l),1===r.size&&(n=t(i,o)||d),a(e),()=>{r.delete(l),0===r.size&&n&&(n(),n=null)}}}}function gn(e){let t;return hn(e,e=>t=e)(),t}let mn=Symbol();function yn(e,t,n){const r=n[t]??={store:null,source:qn(void 0),unsubscribe:d};if(r.store!==e&&!(mn in n))if(r.unsubscribe(),r.store=e??null,null==e)r.source.v=void 0,r.unsubscribe=d;else{var i=!0;r.unsubscribe=hn(e,e=>{i?r.source.v=e:Hn(r.source,e)}),i=!1}return e&&mn in n?gn(e):yr(r.source)}const bn=new Set;let wn=null,_n=null,$n=null,En=!1,Cn=!1,Sn=null,kn=null;var xn=0;let In=1;class On{id=In++;current=new Map;previous=new Map;#R=new Set;#P=new Set;#L=0;#M=0;#N=null;#D=[];#d=new Set;#h=new Set;#V=new Map;is_fork=!1;#j=!1;#U(){return this.is_fork||this.#M>0}skip_effect(e){this.#V.has(e)||this.#V.set(e,{d:[],m:[]})}unskip_effect(e){var t=this.#V.get(e);if(t){for(var n of(this.#V.delete(e),t.d))xe(n,w),this.schedule(n);for(n of t.m)xe(n,_),this.schedule(n)}}#F(){xn++>1e3&&function(){try{!function(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}()}catch(e){Se(e,$n)}}();const e=this.#D;this.#D=[],this.apply();var t=Sn=[],n=[],r=kn=[];for(const r of e)this.#q(r,t,n);if(wn=null,r.length>0){var i=On.ensure();for(const e of r)i.schedule(e)}if(Sn=null,kn=null,this.#U()){this.#H(n),this.#H(t);for(const[e,t]of this.#V)Nn(e,t)}else{this.#d.clear(),this.#h.clear();for(const e of this.#R)e(this);this.#R.clear(),Rn(n),Rn(t),0===this.#L&&this.#I(),this.#N?.resolve()}var o=wn;if(this.#D.length>0){const e=o??=this;e.#D.push(...this.#D.filter(t=>!e.#D.includes(t)))}null!==o&&(bn.add(o),o.#F())}#q(e,t,n){e.f^=b;for(var r=e.first;null!==r;){var i=r.f,o=!!(96&i);if(!(o&&0!==(i&b)||0!==(i&$)||this.#V.has(r))&&null!==r.fn){o?r.f^=b:4&i?t.push(r):fr(r)&&(0!==(i&p)&&this.#h.add(r),gr(r));var a=r.first;if(null!==a){r=a;continue}}for(;null!==r;){var s=r.next;if(null!==s){r=s;break}r=r.parent}}}#H(e){for(var t=0;t<e.length;t+=1)Te(e[t],this.#d,this.#h)}capture(e,t){t===F||this.previous.has(e)||this.previous.set(e,t),0===(e.f&A)&&(this.current.set(e,e.v),_n?.set(e,e.v))}activate(){wn=this}deactivate(){wn=null,_n=null}flush(){try{if(Cn=!0,wn=this,!this.#U()){for(const e of this.#d)this.#h.delete(e),xe(e,w),this.schedule(e);for(const e of this.#h)xe(e,_),this.schedule(e)}this.#F()}finally{xn=0,$n=null,Sn=null,kn=null,Cn=!1,wn=null,_n=null,Vn.clear()}}discard(){for(const e of this.#P)e(this);this.#P.clear()}#I(){if(bn.size>1){this.previous.clear();var e=wn,t=_n,n=!0;for(const e of bn){if(e===this){n=!1;continue}const t=[];for(const[r,i]of this.current){if(e.current.has(r)){if(!n||i===e.current.get(r))continue;e.current.set(r,i)}t.push(r)}if(0===t.length)continue;const r=[...e.current.keys()].filter(e=>!this.current.has(e));if(r.length>0){e.activate();const n=new Set,i=new Map;for(const e of t)Pn(e,r,n,i);if(e.#D.length>0){e.apply();for(const t of e.#D)e.#q(t,[],[])}e.deactivate()}}wn=e,_n=t}this.#V.clear(),bn.delete(this)}increment(e){this.#L+=1,e&&(this.#M+=1)}decrement(e,t){this.#L-=1,e&&(this.#M-=1),this.#j||t||(this.#j=!0,W(()=>{this.#j=!1,this.flush()}))}oncommit(e){this.#R.add(e)}ondiscard(e){this.#P.add(e)}settled(){return(this.#N??=h()).promise}static ensure(){if(null===wn){const e=wn=new On;Cn||(bn.add(wn),En||W(()=>{wn===e&&e.flush()}))}return wn}apply(){}schedule(e){if($n=e,e.b?.is_pending&&16777228&e.f&&0===(e.f&C))e.b.defer_effect(e);else{for(var t=e;null!==t.parent;){var n=(t=t.parent).f;if(!(null===Sn||t!==Qn||null!==zn&&2&zn.f))return;if(96&n){if(0===(n&b))return;t.f^=b}}this.#D.push(t)}}}function Tn(e){var t=En;En=!0;try{for(;;){if(z(),null===wn)return;wn.flush()}}finally{En=t}}let An=null;function Rn(e){var t=e.length;if(0!==t){for(var n=0;n<t;){var r=e[n++];if(!(24576&r.f)&&fr(r)&&(An=new Set,gr(r),null===r.deps&&null===r.first&&null===r.nodes&&null===r.teardown&&null===r.ac&&Vr(r),An?.size>0)){Vn.clear();for(const e of An){if(24576&e.f)continue;const t=[e];let n=e.parent;for(;null!==n;)An.has(n)&&(An.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){const n=t[e];24576&n.f||gr(n)}}An.clear()}}An=null}}function Pn(e,t,n,r){if(!n.has(e)&&(n.add(e),null!==e.reactions))for(const i of e.reactions){const e=i.f;2&e?Pn(i,t,n,r):4194320&e&&0===(e&w)&&Ln(i,t,r)&&(xe(i,w),Mn(i))}}function Ln(e,t,r){const i=r.get(e);if(void 0!==i)return i;if(null!==e.deps)for(const i of e.deps){if(n.call(t,i))return!0;if(2&i.f&&Ln(i,t,r))return r.set(i,!0),!0}return r.set(e,!1),!1}function Mn(e){wn.schedule(e)}function Nn(e,t){if(0===(e.f&g)||0===(e.f&b)){0!==(e.f&w)?t.d.push(e):0!==(e.f&_)&&t.m.push(e),xe(e,b);for(var n=e.first;null!==n;)Nn(n,t),n=n.next}}let Dn=new Set;const Vn=new Map;let jn=!1;function Un(e,t){return{f:0,v:e,reactions:null,equals:D,rv:0,wv:0}}function Fn(e,t){const n=Un(e);return nr(n),n}function qn(e,t=!1,n=!0){const r=Un(e);return t||(r.equals=j),r}function Hn(e,t,r=!1){return null===zn||Xn&&0===(zn.f&x)||!(4325394&zn.f)||null!==tr&&n.call(tr,e)||function(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}(),Gn(e,r?se(t):t,kn)}function Gn(e,t,n=null){if(!e.equals(t)){var r=e.v;Zn?Vn.set(e,t):Vn.set(e,r),e.v=t;var i=On.ensure();if(i.capture(e,r),2&e.f){const t=e;0!==(e.f&w)&>(t),Ie(t)}e.wv=ur(),Bn(e,w,n),null===Qn||0===(Qn.f&b)||96&Qn.f||(null===or?function(e){or=e}([e]):or.push(e)),!i.is_fork&&Dn.size>0&&!jn&&function(){jn=!1;for(const e of Dn)0!==(e.f&b)&&xe(e,_),fr(e)&&gr(e);Dn.clear()}()}return t}function Yn(e){Hn(e,e.v+1)}function Bn(e,t,n){var r=e.reactions;if(null!==r)for(var i=r.length,o=0;o<i;o++){var a=r[o],s=a.f,l=0===(s&w);if(l&&xe(a,t),2&s){var c=a;_n?.delete(c),0===(s&O)&&(s&y&&(a.f|=O),Bn(c,_,n))}else if(l){var u=a;0!==(s&p)&&null!==An&&An.add(u),null!==n?n.push(u):Mn(u)}}}let Jn=!1,Zn=!1;function Wn(e){Zn=e}let zn=null,Xn=!1;function Kn(e){zn=e}let Qn=null;function er(e){Qn=e}let tr=null;function nr(e){null!==zn&&(null===tr?tr=[e]:tr.push(e))}let rr=null,ir=0,or=null;let ar=1,sr=0,lr=sr;function cr(e){lr=e}function ur(){return++ar}function fr(e){var t=e.f;if(0!==(t&w))return!0;if(2&t&&(e.f&=-65537),0!==(t&_)){for(var n=e.deps,r=n.length,i=0;i<r;i++){var o=n[i];if(fr(o)&&mt(o),o.wv>e.wv)return!0}0!==(t&y)&&null===_n&&xe(e,b)}return!1}function dr(e,t,r=!0){var i=e.reactions;if(null!==i&&(null===tr||!n.call(tr,e)))for(var o=0;o<i.length;o++){var a=i[o];2&a.f?dr(a,t,!1):t===a&&(r?xe(a,w):0!==(a.f&b)&&xe(a,_),Mn(a))}}function hr(e){var t=rr,n=ir,r=or,i=zn,o=tr,a=H,s=Xn,l=lr,c=e.f;rr=null,ir=0,or=null,zn=96&c?null:e,tr=null,G(e.ctx),Xn=!1,lr=++sr,null!==e.ac&&(Fe(()=>{e.ac.abort(M)}),e.ac=null);try{e.f|=T;var u=(0,e.fn)();e.f|=C;var f=e.deps,d=wn?.is_fork;if(null!==rr){var h;if(d||pr(e,ir),null!==f&&ir>0)for(f.length=ir+rr.length,h=0;h<rr.length;h++)f[ir+h]=rr[h];else e.deps=f=rr;if(Cr()&&0!==(e.f&y))for(h=ir;h<f.length;h++)(f[h].reactions??=[]).push(e)}else!d&&null!==f&&ir<f.length&&(pr(e,ir),f.length=ir);if(!(null===or||Xn||null===f||6146&e.f))for(h=0;h<or.length;h++)dr(or[h],e);if(null!==i&&i!==e){if(sr++,null!==i.deps)for(let e=0;e<n;e+=1)i.deps[e].rv=sr;if(null!==t)for(const e of t)e.rv=sr;null!==or&&(null===r?r=or:r.push(...or))}return 0!==(e.f&A)&&(e.f^=A),u}catch(e){return Ce(e)}finally{e.f^=T,rr=t,ir=n,or=r,zn=i,tr=o,G(a),Xn=s,lr=l}}function vr(e,r){let i=r.reactions;if(null!==i){var o=t.call(i,e);if(-1!==o){var a=i.length-1;0===a?i=r.reactions=null:(i[o]=i[a],i.pop())}}if(null===i&&2&r.f&&(null===rr||!n.call(rr,r))){var s=r;0!==(s.f&y)&&(s.f^=y,s.f&=-65537),Ie(s),function(e){if(null!==e.effects)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(M),t.teardown=d,t.ac=null,pr(t,0),Mr(t))}(s),pr(s,0)}}function pr(e,t){var n=e.deps;if(null!==n)for(var r=t;r<n.length;r++)vr(e,n[r])}function gr(e){var t=e.f;if(0===(t&E)){xe(e,b);var n=Qn,r=Jn;Qn=e,Jn=!0;try{16777232&t?function(e){var t=e.first;for(;null!==t;){var n=t.next;0===(t.f&g)&&Nr(t),t=n}}(e):Mr(e),Lr(e);var i=hr(e);e.teardown="function"==typeof i?i:null,e.wv=ar}finally{Jn=r,Qn=n}}}async function mr(){await Promise.resolve(),Tn()}function yr(e){var t=!!(2&e.f);if(null!==zn&&!Xn&&!(null!==Qn&&0!==(Qn.f&E)||null!==tr&&n.call(tr,e))){var r=zn.deps;if(0!==(zn.f&T))e.rv<sr&&(e.rv=sr,null===rr&&null!==r&&r[ir]===e?ir++:null===rr?rr=[e]:rr.push(e));else{(zn.deps??=[]).push(e);var i=e.reactions;null===i?e.reactions=[zn]:n.call(i,zn)||i.push(zn)}}if(Zn&&Vn.has(e))return Vn.get(e);if(t){var o=e;if(Zn){var a=o.v;return(0===(o.f&b)&&null!==o.reactions||wr(o))&&(a=gt(o)),Vn.set(o,a),a}var s=0===(o.f&y)&&!Xn&&null!==zn&&(Jn||0!==(zn.f&y)),l=0===(o.f&C);fr(o)&&(s&&(o.f|=y),mt(o)),s&&!l&&(yt(o),br(o))}if(_n?.has(e))return _n.get(e);if(0!==(e.f&A))throw e.v;return e.v}function br(e){if(e.f|=y,null!==e.deps)for(const t of e.deps)(t.reactions??=[]).push(e),2&t.f&&0===(t.f&y)&&(yt(t),br(t))}function wr(e){if(e.v===F)return!0;if(null===e.deps)return!1;for(const t of e.deps){if(Vn.has(t))return!0;if(2&t.f&&wr(t))return!0}return!1}function _r(e){var t=Xn;try{return Xn=!0,e()}finally{Xn=t}}function $r(e){null===Qn&&(null===zn&&function(){throw new Error("https://svelte.dev/e/effect_orphan")}(),function(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}()),Zn&&function(){throw new Error("https://svelte.dev/e/effect_in_teardown")}()}function Er(e,t){var n=Qn;null!==n&&0!==(n.f&$)&&(e|=$);var r={ctx:H,deps:null,nodes:null,f:e|w|y,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null},i=r;if(4&e)null!==Sn?Sn.push(r):On.ensure().schedule(r);else if(null!==t){try{gr(r)}catch(e){throw Nr(r),e}null===i.deps&&null===i.teardown&&null===i.nodes&&i.first===i.last&&0===(i.f&I)&&(i=i.first,0!==(e&p)&&0!==(e&k)&&null!==i&&(i.f|=k))}if(null!==i&&(i.parent=n,null!==n&&function(e,t){var n=t.last;null===n?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}(i,n),null!==zn&&2&zn.f&&0===(e&m))){var o=zn;(o.effects??=[]).push(i)}return r}function Cr(){return null!==zn&&!Xn}function Sr(e){const t=Er(8,null);return xe(t,b),t.teardown=e,t}function kr(e){$r();var t=Qn.f;if(!(!zn&&0!==(t&g)&&0===(t&C)))return xr(e);var n=H;(n.e??=[]).push(e)}function xr(e){return Er(1048580,e)}function Ir(e){return Er(4,e)}function Or(e,t=0){return Er(8|t,e)}function Tr(e,t=[],n=[],r=[]){bt(r,t,n,t=>{Er(8,()=>e(...t.map(yr)))})}function Ar(e,t=0){return Er(p|t,e)}function Rr(e,t=0){return Er(v|t,e)}function Pr(e){return Er(524320,e)}function Lr(e){var t=e.teardown;if(null!==t){const e=Zn,n=zn;Wn(!0),Kn(null);try{t.call(null)}finally{Wn(e),Kn(n)}}}function Mr(e,t=!1){var n=e.first;for(e.first=e.last=null;null!==n;){const e=n.ac;null!==e&&Fe(()=>{e.abort(M)});var r=n.next;0!==(n.f&m)?n.parent=null:Nr(n,t),n=r}}function Nr(e,t=!0){var n=!1;(t||262144&e.f)&&null!==e.nodes&&null!==e.nodes.end&&(Dr(e.nodes.start,e.nodes.end),n=!0),xe(e,S),Mr(e,t&&!n),pr(e,0);var r=e.nodes&&e.nodes.t;if(null!==r)for(const e of r)e.stop();Lr(e),e.f^=S,e.f|=E;var i=e.parent;null!==i&&null!==i.first&&Vr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function Dr(e,t){for(;null!==e;){var n=e===t?null:ye(e);e.remove(),e=n}}function Vr(e){var t=e.parent,n=e.prev,r=e.next;null!==n&&(n.next=r),null!==r&&(r.prev=n),null!==t&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function jr(e,t,n=!0){var r=[];Ur(e,r,!0);var i=()=>{n&&Nr(e),t&&t()},o=r.length;if(o>0){var a=()=>--o||i();for(var s of r)s.out(a)}else i()}function Ur(e,t,n){if(0===(e.f&$)){e.f^=$;var r=e.nodes&&e.nodes.t;if(null!==r)for(const e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;null!==i;){var o=i.next;Ur(i,t,!!(0!==(i.f&k)||0!==(i.f&g)&&0!==(e.f&p))&&n),i=o}}}function Fr(e,t){if(0!==(e.f&$)){e.f^=$,0===(e.f&b)&&(xe(e,w),On.ensure().schedule(e));for(var n=e.first;null!==n;){var r=n.next;Fr(n,!!(0!==(n.f&k)||0!==(n.f&g))&&t),n=r}var i=e.nodes&&e.nodes.t;if(null!==i)for(const e of i)(e.is_global||t)&&e.in()}}function qr(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;null!==n;){var i=n===r?null:ye(n);t.append(n),n=i}}function Hr(e){const t={get:e=>gn(t.store)[e],set:(e,n)=>{"string"==typeof e?Object.assign(gn(t.store),{[e]:n}):Object.assign(gn(t.store),e),t.store.set(gn(t.store))},store:pn(e)};return t}globalThis.$altcha=globalThis.$altcha||{algorithms:new Map,defaults:Hr({}),i18n:Hr({}),instances:new Set,plugins:new Set};const Gr={ariaLinkLabel:"Altcha (official website)",cancel:"Cancel",enterCode:"Enter code",enterCodeAria:"Enter code you hear. Press Space to play audio.",enterCodeFromImage:"To proceed, please enter the code from the image below.",error:"Verification failed. Try again later.",expired:"Verification expired. Try again.",footer:'Protected by <a href="https://altcha.org/" tabindex="-1" target="_blank" aria-label="Altcha (official website)">ALTCHA</a>',getAudioChallenge:"Get an audio challenge",label:"I'm not a robot",loading:"Loading...",reload:"Reload",verify:"Verify",verificationRequired:"Verification required!",verified:"Verified",verifying:"Verifying...",waitAlert:"Verifying... please wait."};"$altcha"in globalThis&&globalThis.$altcha.i18n.set("en",Gr);"undefined"!=typeof window&&((window.__svelte??={}).v??=new Set).add("5");var Yr=et('<div class="altcha-checkbox"><input/> <svg aria-hidden="true" width="12" height="9" viewBox="0 0 12 9"><polyline points="1 5 4 8 11 1"></polyline></svg> <div class="altcha-spinner altcha-checkbox-spinner" aria-hidden="true"></div></div>');function Br(e,t){Y(t,!0);let n,r=sn(t,"loading"),i=an(t,["$$slots","$$events","$$legacy","$$host","loading"]);var o={get loading(){return r()},set loading(e){r(e),Tn()}},a=Yr(),s=be(a);Wt(s,()=>({type:"checkbox",...i}),void 0,void 0,void 0,0,!0),rn(s,e=>n=e,()=>n);var l=_e(s,2);return ie(2),re(a),Tr(()=>Zt(a,"data-loading",r())),Je("click",l,function(){n?.click()}),ot(e,a),B(o)}Ze(["click"]),fn(Br,{loading:{}},[],[],{mode:"open"});var Jr=et('<div class="altcha-checkbox-native"><input/> <div class="altcha-spinner altcha-checkbox-native-spinner"></div></div>');function Zr(e,t){Y(t,!0);let n=sn(t,"loading"),r=an(t,["$$slots","$$events","$$legacy","$$host","loading"]);var i={get loading(){return n()},set loading(e){n(e),Tn()}},o=Jr();return Wt(be(o),()=>({type:"checkbox",...r}),void 0,void 0,void 0,0,!0),ie(2),re(o),Tr(()=>Zt(o,"data-loading",n())),ot(e,o),B(i)}fn(Zr,{loading:{}},[],[],{mode:"open"});var Wr=et('<div><a target="_blank" class="altcha-logo" aria-hidden="true" tabindex="-1"><svg width="22" height="22" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.33955 16.4279C5.88954 20.6586 12.1971 21.2105 16.4279 17.6604C18.4699 15.947 19.6548 13.5911 19.9352 11.1365L17.9886 10.4279C17.8738 12.5624 16.909 14.6459 15.1423 16.1284C11.7577 18.9684 6.71167 18.5269 3.87164 15.1423C1.03163 11.7577 1.4731 6.71166 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577C16.9767 5.86872 17.5322 7.02798 17.804 8.2324L19.9522 9.01429C19.7622 7.07737 19.0059 5.17558 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956C-0.658625 5.88958 -1.21046 12.1971 2.33955 16.4279Z" fill="currentColor"></path><path d="M3.57212 2.33956C1.65755 3.94607 0.496389 6.11731 0.12782 8.40523L2.04639 9.13961C2.26047 7.15832 3.21057 5.25375 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577L13.8302 6.78606L19.9633 9.13364C19.7929 7.15555 19.0335 5.20847 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956Z" fill="currentColor"></path><path d="M7 10H5C5 12.7614 7.23858 15 10 15C12.7614 15 15 12.7614 15 10H13C13 11.6569 11.6569 13 10 13C8.3431 13 7 11.6569 7 10Z" fill="currentColor"></path></svg></a></div>');function zr(e,t){Y(t,!0);let n=sn(t,"strings");var r={get strings(){return n()},set strings(e){n(e),Tn()}},i=Wr(),o=be(i);return Zt(o,"href","https://altcha.org"),re(i),Tr(()=>Zt(o,"aria-label",n().ariaLinkLabel)),ot(e,i),B(r)}fn(zr,{strings:{}},[],[],{mode:"open"});var Xr=et('<div class="altcha-footer"><p></p> <!></div>');function Kr(e,t){Y(t,!0);let n=sn(t,"logo"),r=sn(t,"strings");var i={get logo(){return n()},set logo(e){n(e),Tn()},get strings(){return r()},set strings(e){r(e),Tn()}},o=Xr(),a=be(o);St(a,()=>r().footer,!0),re(a);var s=_e(a,2),l=e=>{zr(e,{get strings(){return r()}})};return Et(s,e=>{n()&&e(l)}),re(o),ot(e,o),B(i)}fn(Kr,{logo:{},strings:{}},[],[],{mode:"open"});var Qr=et('<div class="altcha-switch"><input/> <div class="altcha-switch-toggle"><div class="altcha-spinner altcha-switch-spinner"></div></div></div>');function ei(e,t){Y(t,!0);let n,r=sn(t,"loading"),i=an(t,["$$slots","$$events","$$legacy","$$host","loading"]);var o={get loading(){return r()},set loading(e){r(e),Tn()}},a=Qr(),s=be(a);Wt(s,()=>({type:"checkbox",...i}),void 0,void 0,void 0,0,!0),rn(s,e=>n=e,()=>n);var l=_e(s,2);return re(a),Tr(()=>Zt(a,"data-loading",r())),Je("click",l,function(){n?.click()}),ot(e,a),B(o)}Ze(["click"]),fn(ei,{loading:{}},[],[],{mode:"open"});var ti=(e=>(e.ERROR="error",e.LOADING="loading",e.PLAYING="playing",e.PAUSED="paused",e.READY="ready",e))(ti||{}),ni=(e=>(e.CODE="code",e.ERROR="error",e.VERIFIED="verified",e.VERIFYING="verifying",e.UNVERIFIED="unverified",e.EXPIRED="expired",e))(ni||{}),ri=et('<div class="altcha-code-challenge-title"> </div>'),ii=et('<div class="altcha-spinner"></div>'),oi=nt('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12.8659 3.00017L22.3922 19.5002C22.6684 19.9785 22.5045 20.5901 22.0262 20.8662C21.8742 20.954 21.7017 21.0002 21.5262 21.0002H2.47363C1.92135 21.0002 1.47363 20.5525 1.47363 20.0002C1.47363 19.8246 1.51984 19.6522 1.60761 19.5002L11.1339 3.00017C11.41 2.52187 12.0216 2.358 12.4999 2.63414C12.6519 2.72191 12.7782 2.84815 12.8659 3.00017ZM10.9999 16.0002V18.0002H12.9999V16.0002H10.9999ZM10.9999 9.00017V14.0002H12.9999V9.00017H10.9999Z"></path></svg>'),ai=nt('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M15 7C15 6.44772 15.4477 6 16 6C16.5523 6 17 6.44772 17 7V17C17 17.5523 16.5523 18 16 18C15.4477 18 15 17.5523 15 17V7ZM7 7C7 6.44772 7.44772 6 8 6C8.55228 6 9 6.44772 9 7V17C9 17.5523 8.55228 18 8 18C7.44772 18 7 17.5523 7 17V7Z"></path></svg>'),si=nt('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M4 12H7C8.10457 12 9 12.8954 9 14V19C9 20.1046 8.10457 21 7 21H4C2.89543 21 2 20.1046 2 19V12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12V19C22 20.1046 21.1046 21 20 21H17C15.8954 21 15 20.1046 15 19V14C15 12.8954 15.8954 12 17 12H20C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12Z"></path></svg>'),li=et('<button type="button" class="altcha-button altcha-button-secondary"><!></button>'),ci=et('<audio hidden="" autoplay=""></audio>'),ui=et('<div class="altcha-code-challenge"><form data-code-challenge="true"><!> <div class="altcha-code-challenge-text"> </div> <img class="altcha-code-challenge-image" alt=""/> <div class="altcha-code-challenge-row"><input type="text" class="altcha-input" autocomplete="off" name="" required=""/> <!> <button type="button" class="altcha-button altcha-button-secondary"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2V4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 9.25022 5.38734 6.82447 7.50024 5.38451L7.5 8H9.5V2L3.5 2V4L5.99918 3.99989C3.57075 5.82434 2 8.72873 2 12Z"></path></svg></button></div> <div class="altcha-code-challenge-buttons"><button type="submit" class="altcha-button"> </button> <button type="button" class="altcha-button altcha-button-secondary"> </button></div></form> <!></div>');function fi(e,t){Y(t,!0);let n=sn(t,"audioUrl"),r=sn(t,"codeChallenge"),i=sn(t,"config"),o=sn(t,"imageUrl"),a=sn(t,"onCancel"),s=sn(t,"onReload"),l=sn(t,"onSubmit"),c=sn(t,"strings"),u=Fn(void 0),f=Fn(void 0),d=Fn(void 0),h=Fn(!1),v=Fn(""),p=Fn(!1);function g(){Hn(u,ti.PAUSED,!0)}function m(e){Hn(u,ti.ERROR,!0)}function y(){Hn(u,ti.READY,!0)}function b(){Hn(u,ti.LOADING,!0)}function w(){Hn(u,ti.PLAYING,!0)}function _(){Hn(u,ti.PAUSED,!0)}function $(){yr(f)?yr(u)===ti.LOADING||(yr(f).paused?(n()&&yr(f).src!==n()&&(yr(f).src=n()),yr(f).currentTime=0,yr(f).play()):yr(f).pause()):(Hn(p,!0),requestAnimationFrame(()=>{yr(f)&&n()&&(yr(f).src=n(),yr(f).play())}))}dn(()=>(i().disableAutoFocus||mr().then(()=>{yr(d)?.focus()}),()=>{yr(f)&&(yr(f).pause(),Hn(f,void 0))}));var E={get audioUrl(){return n()},set audioUrl(e){n(e),Tn()},get codeChallenge(){return r()},set codeChallenge(e){r(e),Tn()},get config(){return i()},set config(e){i(e),Tn()},get imageUrl(){return o()},set imageUrl(e){o(e),Tn()},get onCancel(){return a()},set onCancel(e){a(e),Tn()},get onReload(){return s()},set onReload(e){s(e),Tn()},get onSubmit(){return l()},set onSubmit(e){l(e),Tn()},get strings(){return c()},set strings(e){c(e),Tn()}},C=ui(),S=be(C),k=be(S),x=e=>{var t=ri(),n=be(t,!0);re(t),Tr(()=>st(n,c().verificationRequired)),ot(e,t)};Et(k,e=>{"standard"!==i().codeChallengeDisplay&&e(x)});var I=_e(k,2),O=be(I,!0);re(I);var T=_e(I,2),A=_e(T,2),R=be(A);Bt(R),R.disabled=yr(h),rn(R,e=>Hn(d,e),()=>yr(d));var P=_e(R,2),L=e=>{var t=li(),n=be(t),r=e=>{ot(e,ii())},i=e=>{ot(e,oi())},o=e=>{ot(e,ai())},a=e=>{ot(e,si())};Et(n,e=>{yr(u)===ti.LOADING?e(r):yr(u)===ti.ERROR?e(i,1):yr(u)===ti.PLAYING?e(o,2):e(a,-1)}),re(t),Tr(()=>{Zt(t,"title",c().getAudioChallenge),t.disabled=yr(u)===ti.LOADING||yr(u)===ti.ERROR,Zt(t,"aria-label",yr(u)===ti.LOADING?c().loading:c().getAudioChallenge)}),Be("click",t,()=>$(),!0),ot(e,t)};Et(P,e=>{r().audio&&e(L)});var M=_e(P,2);re(A);var N=_e(A,2),D=be(N),V=be(D,!0);re(D);var j=_e(D,2),U=be(j,!0);re(j),re(N),re(S);var F=_e(S,2),q=e=>{var t=ci();rn(t,e=>Hn(f,e),()=>yr(f)),Be("error",t,m),Be("loadstart",t,b),Be("canplay",t,y),Be("pause",t,_),Be("playing",t,w),Be("ended",t,g),ot(e,t)};return Et(F,e=>{yr(p)&&e(q)}),re(C),Tr(()=>{st(O,c().enterCodeFromImage),Zt(T,"src",o()),Zt(R,"minlength",r().length||1),Zt(R,"maxlength",r().length),Zt(R,"placeholder",c().enterCode),Zt(R,"aria-label",yr(u)===ti.LOADING?c().loading:yr(u)===ti.PLAYING?"":c().enterCodeAria),Zt(R,"aria-live",yr(u)?"assertive":"polite"),Zt(R,"aria-busy",yr(u)===ti.LOADING),Zt(M,"title",c().reload),Zt(M,"aria-label",c().reload),Zt(D,"aria-label",c().verify),st(V,c().verify),Zt(j,"aria-label",c().cancel),st(U,c().cancel)}),Be("submit",S,function(e){e.preventDefault(),e.stopPropagation(),l()?.(yr(v))},!0),Je("keydown",R,function(e){"Space"===e.code?(e.preventDefault(),e.stopPropagation(),$()):"Escape"===e.code&&(e.preventDefault(),e.stopPropagation(),a()?.())}),Qt(R,()=>yr(v),e=>Hn(v,e)),Be("click",M,()=>s()?.(),!0),Be("click",j,()=>a()?.(),!0),ot(e,C),B(E)}Ze(["keydown"]),fn(fi,{audioUrl:{},codeChallenge:{},config:{},imageUrl:{},onCancel:{},onReload:{},onSubmit:{},strings:{}},[],[],{mode:"open"});var di=et('<div class="altcha-popover-backdrop" data-backdrop=""></div>'),hi=et('<div class="altcha-popover-arrow"></div>'),vi=et('<div role="button" class="altcha-popover-close">×</div>'),pi=et('<!> <div><!> <!> <div class="altcha-popover-content"><!></div></div>',1);function gi(e,t){Y(t,!0);let n=sn(t,"anchor"),r=sn(t,"children"),i=sn(t,"display",0,"standard"),o=sn(t,"backdrop",0,!1),a=sn(t,"onClickOutside"),s=sn(t,"onClickOutsideDelay",0,600),l=sn(t,"onClose"),c=sn(t,"placement",0,"auto"),u=sn(t,"updateUISignal"),f=sn(t,"variant",0,"neutral"),h=an(t,["$$slots","$$events","$$legacy","$$host","anchor","children","display","backdrop","onClickOutside","onClickOutsideDelay","onClose","placement","updateUISignal","variant"]),v=Fn(void 0),p=Fn(void 0),g=Fn(!1),m=Fn(0);function y(){l()?.()}function b(){if(n()&&"auto"===c()&&yr(v)){const e=n().getBoundingClientRect(),t=document.documentElement.clientHeight-(e.top+e.height)<yr(v).clientHeight;yr(g)!==t&&Hn(g,t)}}kr(()=>{"auto"!==c()&&Hn(g,"top"===c())}),kr(()=>{u()&&b()}),dn(()=>{const e="bottomsheet"===i()||"overlay"===i();return e&&(yr(p)&&document.body.append(yr(p)),yr(v)&&document.body.append(yr(v))),b(),mr().then(()=>{Hn(m,Date.now(),!0)}),()=>{e&&(yr(p)&&document.body.removeChild(yr(p)),yr(v)&&document.body.removeChild(yr(v)))}});var w={get anchor(){return n()},set anchor(e){n(e),Tn()},get children(){return r()},set children(e){r(e),Tn()},get display(){return i()},set display(e="standard"){i(e),Tn()},get backdrop(){return o()},set backdrop(e=!1){o(e),Tn()},get onClickOutside(){return a()},set onClickOutside(e){a(e),Tn()},get onClickOutsideDelay(){return s()},set onClickOutsideDelay(e=600){s(e),Tn()},get onClose(){return l()},set onClose(e){l(e),Tn()},get placement(){return c()},set placement(e="auto"){c(e),Tn()},get updateUISignal(){return u()},set updateUISignal(e){u(e),Tn()},get variant(){return f()},set variant(e="neutral"){f(e),Tn()}},_=pi();Be("click",ue,function(e){const t=e.target;yr(v)?.contains(t)||s()&&!(yr(m)+s()<Date.now())||a()?.()},!0),Be("resize",ue,function(){b()}),Be("scroll",ue,function(){b()});var $=we(_),E=e=>{var t=di();rn(t,e=>Hn(p,e),()=>yr(p)),ot(e,t)};Et($,e=>{o()&&e(E)});var C=_e($,2);Wt(C,()=>({...h,class:`altcha-popover ${(t.class||"")??""}`,"data-popover":!0,"data-variant":f(),"data-top":yr(g),"data-display":i()}));var S=be(C),x=e=>{ot(e,hi())};Et(S,e=>{"standard"===i()&&e(x)});var I=_e(S,2),O=e=>{var t=vi();Be("click",t,y,!0),ot(e,t)};Et(I,e=>{"standard"!==i()&&e(O)});var T=_e(I,2);return function(e,t,...n){var r=new $t(e);Ar(()=>{const e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},k)}(be(T),()=>r()??d),re(T),re(C),rn(C,e=>Hn(v,e),()=>yr(v)),ot(e,_),B(w)}async function mi(e){const{challenge:t,concurrency:n=navigator.hardwareConcurrency,controller:r=new AbortController,createWorker:i,onOutOfMemory:o=e=>e>1?Math.floor(e/2):0,counterMode:a,timeout:s=9e4}=e,l=Math.min(16,Math.max(1,n)),c=[],u=()=>{for(const e of c)e.terminate()};for(let e=0;e<l;e++)c.push(await i(t.parameters.algorithm));let f=null;try{f=await Promise.race(c.map((e,n)=>(r.signal.addEventListener("abort",()=>{e.postMessage({type:"abort"})}),new Promise((r,i)=>{e.addEventListener("error",e=>{i(e)}),e.addEventListener("message",t=>{if(t.data){for(const t of c)t!==e&&t.postMessage({type:"abort"});if(t.data.error)return i(new Error(t.data.error))}r(t.data)}),e.postMessage({challenge:t,counterMode:a,counterStart:n,counterStep:l,timeout:s,type:"work"})}))))}catch(n){if(n instanceof Error&&!!n?.message?.includes("Out of memory")&&o){u();const n=o(l);if(n)return mi({...e,challenge:t,controller:r,concurrency:n,createWorker:i})}throw n}finally{u()}return r.signal.aborted?null:f||null}fn(gi,{anchor:{},children:{},display:{},backdrop:{},onClickOutside:{},onClickOutsideDelay:{},onClose:{},placement:{},updateUISignal:{},variant:{}},[],[],{mode:"open"});class yi{TAG_CODES={INPUT:1,TEXTAREA:2,SELECT:3,BUTTON:4,A:5,DETAILS:6,SUMMARY:7,IFRAME:8,VIDEO:9,AUDIO:10};maxSamples;sampleInterval;target;focusStartTime=0;focusInteraction=0;focusInteractionTimer=null;lastPointerSample=0;lastTouchSample=0;lastScrollSample=0;pendingPointer=null;pendingTouch=null;focus=[];pointer=[];scroll=[];touch=[];constructor(e={}){const{maxSamples:t=60,sampleInterval:n=50,target:r=window}=e;this.maxSamples=t,this.sampleInterval=n,this.target=r,this.attach()}destroy(){const e={capture:!0};this.target.removeEventListener("focusin",this.onFocus,e),this.target.removeEventListener("keydown",this.onInteraction,e),this.target.removeEventListener("pointerdown",this.onInteraction,e),this.target.removeEventListener("pointermove",this.onPointer,e),this.target.removeEventListener("scroll",this.onScroll,e),this.target.removeEventListener("touchmove",this.onTouchMove,e)}export(){return{focus:this.focus,maxTouchPoints:navigator.maxTouchPoints||0,pointer:this.pointer,scroll:this.scroll,time:Date.now(),touch:this.touch}}attach(){const e={passive:!0,capture:!0};this.target.addEventListener("focusin",this.onFocus,e),this.target.addEventListener("keydown",this.onInteraction,e),this.target.addEventListener("pointerdown",this.onInteraction,e),this.target.addEventListener("pointermove",this.onPointer,e),this.target.addEventListener("scroll",this.onScroll,e),this.target.addEventListener("touchmove",this.onTouchMove,e)}evict(e){e.length>this.maxSamples&&e.splice(0,e.length-this.maxSamples)}onFocus=e=>{if(2===this.focusInteraction)return;const t=e.target;if(!(t instanceof Element))return;const n=performance.now();0===this.focusStartTime&&(this.focusStartTime=n),this.focus.push([Math.round(n-this.focusStartTime),t.tabIndex,this.TAG_CODES[t.tagName]??0,this.focusInteraction?1:0]),this.evict(this.focus)};onInteraction=e=>{this.focusInteraction="keyCode"in e?1:2,this.focusInteractionTimer&&clearTimeout(this.focusInteractionTimer),this.focusInteractionTimer=setTimeout(()=>{this.focusInteraction=0},100)};onPointer=e=>{if("touch"===e.pointerType)return;const t=e.timeStamp||performance.now();this.pendingPointer=[Math.round(e.clientX),Math.round(e.clientY),Math.round(t)],t-this.lastPointerSample>=this.sampleInterval&&(this.pointer.push(this.pendingPointer),this.lastPointerSample=t,this.pendingPointer=null,this.evict(this.pointer))};onScroll=()=>{const e=performance.now();e-this.lastScrollSample<this.sampleInterval||(this.scroll.push([Math.round(window.scrollY),Math.round(e)]),this.lastScrollSample=e,this.evict(this.scroll))};onTouchMove=e=>{const t=e.timeStamp||performance.now(),n=e.touches[0];n&&(this.pendingTouch=[Math.round(n.clientX),Math.round(n.clientY),Math.round(t),Math.round(1e3*n.force)/1e3,Math.round(n.radiusX||0),Math.round(n.radiusY||0)],t-this.lastTouchSample>=this.sampleInterval&&(this.touch.push(this.pendingTouch),this.lastTouchSample=t,this.pendingTouch=null,this.evict(this.touch)))}}var bi=et('<div class="altcha-overlay-backdrop" data-backdrop=""></div>'),wi=et('<div class="altcha-overlay-content"></div>'),_i=et('<div role="button" class="altcha-overlay-close">×</div> <!>',1),$i=et('<div class="altcha-floating-arrow"></div>'),Ei=et('<input type="hidden"/>'),Ci=et('<div class="altcha-error">Secure context (HTTPS) required.</div>'),Si=et('<div class="altcha-error"> </div>'),ki=et('<div class="altcha-error"> </div>'),xi=et("<!> <!>",1),Ii=et('<!> <div class="altcha"><!> <div class="altcha-main"><div><div class="altcha-checkbox-wrap"><!> <label><!></label></div> <!></div> <!> <!> <!></div> <!></div>',1);"undefined"!=typeof window&&window.customElements&&customElements.define("altcha-widget",fn(function(e,t){Y(t,!0);const[n,r]=function(){const e={};return[e,function(){Sr(()=>{for(var t in e)e[t].unsubscribe();o(e,mn,{enumerable:!1,value:!0})})}]}(),i=["ar","fa","he","ur"],{isSecureContext:a}=globalThis,{store:s}=globalThis.$altcha.defaults,l=navigator.hardwareConcurrency||2,c=navigator.deviceMemory||0,u=c&&c<=4?Math.min(4,l):l,f=globalThis.$altcha.i18n.store,d=t.$$host,h=(e,t)=>{mr().then(()=>{d?.dispatchEvent(new CustomEvent(e,{detail:t}))})};let v=null,p=Fn(se(new URL(location.origin))),g=Fn(!1),m=Fn(null),y=Fn(null),b=Fn(null),w=Fn(se(ni.UNVERIFIED)),_=Fn(void 0),$=Fn(void 0),E=Fn(null),C=Fn(void 0),S=Fn(null),x=Fn(null),I=Fn(null),O=Fn(null),T=Fn(se([])),A=Fn(0),R=Fn(se({})),P=Fn(!0);const L=pt(()=>({fetch:(e,t)=>fetch(e,t),audioChallengeLanguage:"",auto:"off",barPlacement:"bottom",challenge:"",codeChallenge:null,codeChallengeDisplay:"standard",credentials:null,debug:!1,disableAutoFocus:!1,display:"standard",floatingAnchor:"",floatingOffset:8,floatingPersist:!1,floatingPlacement:"auto",hideFooter:!1,hideLogo:!1,humanInteractionSignature:!0,language:"",mockError:!1,minDuration:500,overlayContent:"",name:"altcha",popoverPlacement:"auto",retryOnOutOfMemoryError:!0,setCookie:null,serverVerificationFields:!1,serverVerificationTimeZone:!1,test:!1,timeout:9e4,type:"checkbox",validationMessage:"",verifyFunction:null,verifyUrl:"",workers:u,...yn(s,"$altchaDefaults",n),...yr(R)})),M=pt(()=>`altcha-checkbox-${t.id||Math.floor(1e12*Math.random()).toString(16)}`),N=pt(()=>function(e){switch(e){case"checkbox":return Br;case"switch":return ei;default:return Zr}}(yr(L).type)),D=pt(()=>yr(L).auto),V=pt(()=>yr(w)===ni.VERIFYING),j=pt(()=>!yr(L).hideFooter),U=pt(()=>!yr(L).hideLogo&&"bar"!==yr(L).display),F=pt(()=>function(e,t){const n=Object.keys(e).map(e=>e.toLowerCase());let r=t.reduce((t,r)=>(r=r.toLowerCase(),t||(e[r]?r:null)||n.find(e=>r.split("-")[0]===e.split("-")[0])||null),null);e[r||""]||(r="en");return{language:r,strings:e[r]}}(yn(f,"$altchaI18nStore",n),[yr(L).language,document.documentElement.lang,...navigator.languages])),q=pt(()=>i.includes(yr(F).language)?"rtl":void 0),H=pt(()=>({...yr(F).strings})),G=pt(()=>yr(m)?.audio?.match(/^(https?:)?\//)?le(yr(m).audio,yr(p),{language:yr(L).audioChallengeLanguage||yr(F).language}).toString():yr(m)?.audio),J=pt(()=>yr(m)?.image?.match(/^(https?:)?\//)?le(yr(m).image,yr(p)):yr(m)?.image);async function Z(e,...t){let n;for(const r of yr(T))n=await r[e].call(r,...t);return n}async function W(e){await new Promise(t=>setTimeout(t,e))}async function z(e=yr(L).challenge,t){const n=await Z("onFetchChallenge",e);let r=null;if(void 0!==n)return n;if("string"==typeof e)if(e.match(/^(https?:)?\//)){ke("fetching challenge from",t?.method||"GET",e),Hn(p,new URL(e,location.origin),!0);const n=await yr(L).fetch(e,{credentials:yr(L).credentials||void 0,...t});await $e(n);const i=n.headers.get("x-altcha-config");i&&function(e){try{const t=JSON.parse(e);t&&"object"==typeof t&&Ce({serverVerificationFields:t?.sentinel?.fields,serverVerificationTimeZone:t?.sentinel?.timeZone,verifyUrl:t.verifyurl,...t})}catch(e){ke("unable to configure from x-altcha-config header",e)}}(i);const o=await n.json();if(o&&"his"in o&&o.his){if(ke("requested HIS"),!v)throw new Error("Server requested HIS data but collector is disabled.");return z(le(o.his.url,yr(p)),{body:JSON.stringify({his:v.export()}),headers:{"content-type":"application/json"},method:"POST"})}o&&"hisResult"in o&&o.hisResult&&ke("HIS result",o.hisResult),r=o}else{ke("parsing JSON challenge");try{r=JSON.parse(e)}catch{throw new Error("Unable to parse JSON challenge.")}}else if(e&&"object"==typeof e)try{r=JSON.parse(JSON.stringify(e))}catch{throw new Error("Unable to parse JSON challenge.")}if(function(e){return"object"==typeof e&&"challenge"in e}(r)&&(r=function(e){const[t,n]=e.salt.split("?"),r={};if(n)try{Object.assign(r,Object.fromEntries(new URLSearchParams(n).entries()))}catch{}const i={codeChallenge:e.codeChallenge,parameters:{algorithm:e.algorithm,cost:1,data:r,expiresAt:r?.expires?parseInt(r.expires,10):void 0,keyLength:"SHA-512"===e.algorithm?64:"SHA-384"===e.algorithm?48:32,nonce:(o=(new TextEncoder).encode(e.salt),Array.from(new Uint8Array(o)).map(e=>e.toString(16).padStart(2,"0")).join("")),keyPrefix:e.challenge,salt:""},signature:e.signature};var o;return Object.defineProperties(i,{_originalSalt:{enumerable:!1,value:e.salt,writable:!1},_version:{enumerable:!1,value:1,writable:!1}}),i}(r)),!function(e){return!!e&&"object"==typeof e&&"parameters"in e&&!!e.parameters&&"object"==typeof e.parameters&&"algorithm"in e.parameters&&"nonce"in e.parameters&&"salt"in e.parameters&&"keyPrefix"in e.parameters}(r))throw new Error("Challenge validation failed.");return r}function X(){return document.getElementById(yr(M))}function ie(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function le(e,t,n){const r=new URL(e,t);if(r.search||(r.search=t.search),n)for(const e in n)void 0!==n[e]&&null!==n[e]&&r.searchParams.set(e,n[e]);return r.toString()}function ce(e){!yr(g)&&e.currentTarget.checked?(e.preventDefault(),e.currentTarget.checked=!1,yr(w)!==ni.VERIFYING&&Ae()):e.currentTarget.checked||(e.preventDefault(),xe())}function de(e){yr(w)===ni.VERIFYING?e.currentTarget.setCustomValidity(yr(H).waitAlert):yr(L).validationMessage&&e.currentTarget.setCustomValidity(yr(L).validationMessage)}function he(){ye(yr(L).display),xe()}function ve(e){"onfocus"===yr(D)&&yr(w)===ni.UNVERIFIED&&Ae()}function pe(){ye(yr(L).display),xe()}function ge(e){const t=e.target;"true"!==t?.getAttribute("data-code-challenge")&&"onsubmit"===yr(D)&&yr(w)===ni.UNVERIFIED&&(e.preventDefault(),e.stopPropagation(),Hn(S,e.submitter,!0),Oe(),Ae().then(e=>{e&&!yr(m)&&mr().then(()=>{me(yr(S))})}))}function me(e){yr(E)&&"requestSubmit"in yr(E)?yr(E).requestSubmit(e):yr(E)?.reportValidity()&&(e?e.click():yr(E).submit())}function ye(e){switch(e){case"bar":case"floating":case"overlay":Se(),yr(D)&&"off"!==yr(D)||(yr(R).auto="onsubmit");break;case"standard":Oe()}yr(b)!==e&&Hn(b,e,!0)}async function $e(e){if(e.status>=400){if(e.headers.get("content-type")?.includes("/json")){let t;try{t=await e.json()}catch{}if(t&&"error"in t)throw new Error(`Server responded with ${e.status} - ${t.error}`)}throw new Error(`Server responded with ${e.status}.`)}const t=e.headers.get("content-type");if(!t||!t.includes("/json"))throw new Error(`Server responded with invalid content-type. Expected application/json, received ${t}.`)}async function Ee(e){if(!yr(O))return void Ie(ni.ERROR,"Cannot verify code challenge without PoW payload.");Ie(ni.VERIFYING);let t=null;if(yr(L).verifyUrl)t=await async function(e,t){const n=await Z("onRequestServerVerification",e,t);if(void 0!==n)return n;if(ke("requesting server verification from",yr(L).verifyUrl),!yr(L).verifyUrl)throw new Error("Parameter verifyUrl must be set for server verification.");const r=await yr(L).fetch(le(yr(L).verifyUrl,yr(p)),{body:JSON.stringify({code:t,fields:yr(L).serverVerificationFields?[...yr(E)?.querySelectorAll('input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])')||[]].reduce((e,t)=>{const n=t.name,r=t.value;return n&&r&&(e[n]=/\n/.test(r)?r.replace(new RegExp("(?<!\\r)\\n","g"),"\r\n"):r),e},{}):void 0,payload:e,timeZone:yr(L).serverVerificationTimeZone?ie():void 0}),credentials:yr(L).credentials||void 0,headers:{"Content-Type":"application/json"},method:"POST"});await $e(r);const i=await r.json();return i&&"object"==typeof i&&"payload"in i&&i.payload&&h("serververification",i),i}(yr(O),e);else{if(!yr(L).verifyFunction)return void Ie(ni.ERROR,"Parameter verifyUrl is required for code challenge verification.");t=await yr(L).verifyFunction(yr(O),e)}t?.payload&&(Hn(O,t.payload,!0),ke("server payload",yr(O))),!0===t?.verified?(ke("verified"),Ie(ni.VERIFIED),h("verified",{payload:yr(O)}),"onsubmit"===yr(D)&&mr().then(()=>{me(yr(S))})):Ie(ni.ERROR,t?.reason||"Verification failed."),yr(L).disableAutoFocus||X()?.focus()}function Ce(e){Object.assign(yr(R),{...Object.fromEntries(Object.entries(e).filter(([e,t])=>void 0!==t))})}function Se(){Hn(P,!1)}function ke(...e){(yr(L).debug||e.some(e=>e instanceof Error))&&console[e[0]instanceof Error?"error":"log"]("ALTCHA",`[name=${yr(L).name}]`,...e)}function xe(e=ni.UNVERIFIED,t=null){Hn(g,!1),Hn(x,t,!0),Hn(O,null),yr(y)&&yr(y).abort(),yr(I)&&(clearTimeout(yr(I)),Hn(I,null)),Ie(e)}function Ie(e,t=null){Hn(w,e,!0),Hn(x,t,!0),h("statechange",{payload:yr(O),state:yr(w)})}function Oe(){Hn(P,!0),mr().then(()=>{Te()})}function Te(){if("floating"===yr(L).display)return function(e=20){if(!yr(C))return;const t=yr(L).floatingPlacement;if(!yr($)&&(Hn($,(yr(L).floatingAnchor instanceof HTMLElement?yr(L).floatingAnchor:yr(L).floatingAnchor?document.querySelector(yr(L).floatingAnchor):yr(E)?.querySelector('input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])'))||yr(E),!0),!yr($)))return void ke("unable to find floating anchor element");const n=parseInt(yr(L).floatingOffset,10)||12,r=yr($).getBoundingClientRect(),i=yr(C).getBoundingClientRect(),o=document.documentElement.clientHeight,a=document.documentElement.clientWidth,s=t&&"auto"!==t?"top"===t:r.bottom+i.height+n+e>o,l=Math.max(e,Math.min(a-e-i.width,r.left+r.width/2-i.width/2));if(yr(C).style.setProperty("--altcha-floating-left",`${l}px`),yr(C).style.setProperty("--altcha-floating-top",s?r.top-(i.height+n)+"px":`${r.bottom+n}px`),yr(C).setAttribute("data-floating-position",s?"top":"bottom"),yr(_)){const e=yr(_).getBoundingClientRect();yr(_).style.left=r.left-l+r.width/2-e.width/2+"px"}}();Hn(A,yr(A)+1)}async function Ae(e={}){const{concurrency:t=Math.max(1,yr(L).workers),controller:n=new AbortController,minDuration:r=yr(L).minDuration}=e,i=performance.now();let o=null,s=null,l=!1;const c=await Z("onVerify",e);if(void 0!==c)return c;xe(ni.VERIFYING),Hn(y,n,!0);try{if(!a)throw new Error("Secure context (HTTPS) required.");if(yr(L).mockError)throw new Error("Mock error.");if(yr(L).test)return ke("running test mode with null challenge"),await W(Math.max(0,r-(performance.now()-i))),yr(y)?.signal.aborted?(xe(),null):(Hn(O,btoa(JSON.stringify({challenge:null,solution:null,test:!0})),!0),ke("verified"),Ie(ni.VERIFIED),h("verified",{payload:yr(O)}),{payload:yr(O)});if(o=await z(),!o)throw new Error("Failed to fetch challenge.");ke("challenge",o),"configuration"in o&&(ke("re-configuring from challenge",o.configuration),Ce(o.configuration)),o.parameters.expiresAt&&function(e){yr(I)&&clearTimeout(yr(I));const t=()=>{yr(w)!==ni.UNVERIFIED?(Hn(g,!1),Ie(ni.EXPIRED)):xe(),h("expired")},n=1e3*e-Date.now();n>=1?Hn(I,setTimeout(t,n),!0):t()}(o.parameters.expiresAt),l="_version"in o&&1===o._version;const e=globalThis.$altcha.algorithms.get(o.parameters.algorithm);if(!e)throw new Error(`Unsupported algorithm ${o.parameters.algorithm}.`);if(s=await mi({challenge:o,concurrency:t,controller:n,createWorker:e,counterMode:l?"string":"uint32",onOutOfMemory:e=>{if(ke("out of memory error received"),h("outofmemory"),yr(L).retryOnOutOfMemoryError&&e>1){const t=Math.floor(e/2);return ke(`retrying with ${t} workers...`),t}},timeout:yr(L).timeout}),yr(y)?.signal.aborted)return xe(),null;if(!s)throw new Error("Failed to find solution.");ke("solution",s),await W(Math.max(0,r-(performance.now()-i))),Hn(m,o.codeChallenge||yr(L).codeChallenge||null,!0),Hn(O,l?btoa(JSON.stringify(function(e,t){return{algorithm:e.parameters.algorithm,challenge:e.parameters.keyPrefix,number:t.counter,salt:"_originalSalt"in e?e._originalSalt:e.parameters.nonce,signature:e.signature,took:t.time||0}}(o,s))):btoa(JSON.stringify({challenge:{parameters:o.parameters,signature:o.signature},solution:s})),!0),yr(m)?(ke("requesting code verification"),Ie(ni.CODE),h("codechallenge",{codeChallenge:yr(m)})):yr(L).verifyUrl?await Ee():(ke("verified"),Ie(ni.VERIFIED),h("verified",{payload:yr(O)}))}catch(e){return ke("verification failed",e),Ie(ni.ERROR,String(e)),null}finally{Hn(y,null)}return{challenge:o,payload:yr(O),solution:s}}kr(()=>{Ce({auto:t.auto,challenge:t.challenge,display:t.display,language:t.language,name:t.name,type:t.type,workers:t.workers})}),kr(()=>{if(t.configuration)try{Ce(JSON.parse(t.configuration))}catch{ke("unable to parse the `configuration` attribute (JSON expected)")}}),kr(()=>{yr(b)!==yr(L).display&&ye(yr(L).display)}),kr(()=>{yr(g)&&yr(w)===ni.VERIFYING&&Hn(g,!1)}),kr(()=>{yr(g)||yr(w)!==ni.VERIFIED||Hn(g,!0)}),kr(()=>{if(!yr(g)){const e=X();e&&e.checked&&(e.checked=!1)}}),kr(()=>{yr(w)===ni.VERIFIED&&X()?.setCustomValidity("")}),kr(()=>{if("onload"===yr(D)){const e=setTimeout(()=>{Ae()},1);return()=>{e&&clearTimeout(e)}}}),kr(()=>{yr(x)&&ke("error:",yr(x))}),kr(()=>{yr(O)&&yr(L).setCookie&&function(e,t={}){const{domain:n,name:r=yr(L).name,maxAge:i,path:o,sameSite:a,secure:s}=t;let l=`${encodeURIComponent(r)}=${encodeURIComponent(e)}`;n&&(l+=`; Domain=${n}`);null!=i&&(l+=`; Max-Age=${i}`);o&&(l+=`; Path=${o}`);a&&(l+=`; SameSite=${a}`);s&&(l+="; Secure");document.cookie=l}(yr(O),yr(L).setCookie)}),dn(()=>(ke("mounted","3.0.8"),d&&globalThis.$altcha.instances.add(d),Hn(E,yr(C)?.closest("form"),!0),yr(E)?.addEventListener("reset",pe),yr(E)?.addEventListener("submit",ge,{capture:!0}),yr(E)?.addEventListener("focusin",ve),function(){Hn(T,[...globalThis.$altcha.plugins].map(e=>new e(d)),!0),ke("activating plugins",yr(T).map(e=>e.constructor.name));for(const e of yr(T))e.activate()}(),yr(L).humanInteractionSignature&&(ke("human interaction signature enabled"),v=new yi),h("load"),a||ke("secure context (HTTPS) required"),()=>{!function(){for(const e of yr(T))e.destroy()}(),d&&globalThis.$altcha.instances.delete(d),yr(I)&&clearTimeout(yr(I)),yr(E)?.removeEventListener("reset",pe),yr(E)?.removeEventListener("submit",ge,{capture:!0}),yr(E)?.removeEventListener("focusin",ve),v?.destroy()}));var Re={configure:Ce,getConfiguration:function(){return{...yr(L)}},getState:function(){return yr(w)},hide:Se,log:ke,reset:xe,setState:Ie,show:Oe,updateUI:Te,verify:Ae},Pe=Ii();Be("scroll",fe,function(){Te()}),Be("click",fe,function(e){const t=e.target;"floating"!==yr(L).display||!t||d?.contains(t)||t.hasAttribute("data-backdrop")||t.closest("[data-popover]")||yr(w)===ni.VERIFIED||yr(L).floatingPersist||Se()}),Be("pageshow",ue,function(e){e.persisted&&(ye(yr(L).display),xe())}),Be("resize",ue,function(){Te()});var Le=we(Pe),Me=e=>{ot(e,bi())};Et(Le,e=>{"overlay"===yr(L).display&&yr(P)&&e(Me)});var Ne=_e(Le,2),De=be(Ne),Ve=e=>{var t=_i(),n=we(t),r=_e(n,2),i=e=>{var t=wi();St(t,()=>document.querySelector(yr(L).overlayContent)?.innerHTML,!0),re(t),ot(e,t)};Et(r,e=>{yr(L).overlayContent&&e(i)}),Be("click",n,he,!0),ot(e,t)};Et(De,e=>{"overlay"===yr(L).display&&yr(P)&&e(Ve)});var je=_e(De,2),Ue=be(je),Fe=be(Ue),qe=be(Fe);{let e=pt(()=>"standard"===yr(L).display&&"onsubmit"!==yr(D)||yr(w)===ni.VERIFYING);!function(e,t,n){var r;Q&&(r=K,ne());var i=new $t(e);Ar(()=>{var e=t()??null;if(Q&&"["===ae(r)!=(null!==e)){var o=oe();return te(o),i.anchor=o,ee(!1),i.ensure(e,e&&(t=>n(t,e))),void ee(!0)}i.ensure(e,e&&(t=>n(t,e)))},k)}(qe,()=>yr(N),(t,n)=>{n(t,{get id(){return yr(M)},name:"",get required(){return yr(e)},get loading(){return yr(V)},get checked(){return yr(g)},onchange:ce,oninvalid:de})})}var He=_e(qe,2),Ge=be(He),Ye=e=>{var t=rt();Tr(()=>st(t,yr(H).verificationRequired)),ot(e,t)},Je=e=>{var t=rt();Tr(()=>st(t,yr(H).verifying)),ot(e,t)},Ze=e=>{var t=rt();Tr(()=>st(t,yr(H).verified)),ot(e,t)},We=e=>{var t=rt();Tr(()=>st(t,yr(H).label)),ot(e,t)};Et(Ge,e=>{yr(w)===ni.CODE&&yr(m)?e(Ye):yr(w)===ni.VERIFYING?e(Je,1):yr(w)===ni.VERIFIED?e(Ze,2):e(We,-1)}),re(He),re(Fe);var ze=_e(Fe,2),Xe=e=>{zr(e,{get strings(){return yr(H)}})};Et(ze,e=>{yr(U)&&e(Xe)}),re(Ue);var Ke=_e(Ue,2),Qe=e=>{{let t=pt(()=>"bar"===yr(L).display&&yr(U));Kr(e,{get logo(){return yr(t)},get strings(){return yr(H)}})}};Et(Ke,e=>{yr(j)&&e(Qe)});var et=_e(Ke,2),tt=e=>{var t=$i();rn(t,e=>Hn(_,e),()=>yr(_)),ot(e,t)};Et(et,e=>{"floating"===yr(L).display&&e(tt)});var nt=_e(et,2),at=e=>{var t=Ei();Bt(t),Tr(()=>{var e,n,r;Zt(t,"name",yr(L).name),e=t,n=yr(O),(r=zt(e)).value!==(r.value=n??void 0)&&(e.value!==n||0===n&&e.nodeName===Yt)&&(e.value=n??"")}),ot(e,t)};Et(nt,e=>{yr(L).setCookie||e(at)}),re(je);var lt=_e(je,2),ct=e=>{gi(e,{get anchor(){return yr(C)},onClickOutside:()=>{a&&xe()},get placement(){return yr(L).popoverPlacement},role:"alert",variant:"error",get dir(){return yr(q)},get updateUISignal(){return yr(A)},children:(e,t)=>{var n=it(),r=we(n),i=e=>{ot(e,Ci())},o=e=>{var t=Si(),n=be(t,!0);re(t),Tr(()=>st(n,yr(H).expired)),ot(e,t)},s=e=>{var t=ki(),n=be(t,!0);re(t),Tr(()=>{Zt(t,"title",yr(x)),st(n,yr(H).error)}),ot(e,t)};Et(r,e=>{yr(x)||a?yr(x)||yr(w)!==ni.EXPIRED?e(s,-1):e(o,1):e(i)}),ot(e,n)},$$slots:{default:!0}})},ut=e=>{var t=it();!function(e,t,n){Q&&ne();var r=new $t(e);Ar(()=>{var e=t();e!=e&&(e=Ct),r.ensure(e,n)})}(we(t),()=>yr(m),e=>{{let t=pt(()=>"standard"!==yr(L).codeChallengeDisplay);gi(e,{get anchor(){return yr(C)},get backdrop(){return yr(t)},get display(){return yr(L).codeChallengeDisplay},onClose:()=>{xe()},get placement(){return yr(L).popoverPlacement},role:"dialog",get"aria-label"(){return yr(H).verificationRequired},get dir(){return yr(q)},get updateUISignal(){return yr(A)},children:(e,t)=>{var n=xi(),r=we(n);fi(r,{get audioUrl(){return yr(G)},get imageUrl(){return yr(J)},onCancel:()=>xe(),onReload:()=>Ae(),onSubmit:e=>Ee(e),get codeChallenge(){return yr(m)},get config(){return yr(L)},get strings(){return yr(H)}});var i=_e(r,2),o=e=>{Kr(e,{get logo(){return yr(U)},get strings(){return yr(H)}})};Et(i,e=>{yr(j)&&"standard"!==yr(L).codeChallengeDisplay&&e(o)}),ot(e,n)},$$slots:{default:!0}})}}),ot(e,t)};Et(lt,e=>{yr(x)||yr(w)===ni.EXPIRED||!a?e(ct):yr(m)&&yr(w)===ni.CODE&&e(ut,1)}),re(Ne),rn(Ne,e=>Hn(C,e),()=>yr(C)),Tr(e=>{Zt(Ne,"data-state",yr(w)),Zt(Ne,"data-display",yr(L).display||void 0),Zt(Ne,"data-placement",e),Zt(Ne,"data-visible",yr(P)||void 0),Zt(Ne,"dir",yr(q)),Zt(He,"for",yr(M)),Ne.dir=Ne.dir},[()=>function(e){switch(e){case"bar":return yr(L).barPlacement||"bottom";case"floating":return yr(L).floatingPlacement||"auto";default:return}}(yr(L).display)]),ot(e,Pe);var ft=B(Re);return r(),ft},{auto:{type:"String"},challenge:{type:"String"},configuration:{type:"String"},display:{type:"String"},language:{type:"String"},name:{type:"String"},theme:{type:"String"},type:{type:"String"},workers:{type:"Number"}},[],["configure","getConfiguration","getState","hide","log","reset","setState","show","updateUI","verify"]));
|
|
1
|
+
const e=!1;var t=Array.isArray,n=Array.prototype.indexOf,r=Array.prototype.includes,i=Array.from,o=Object.keys,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyDescriptors,c=Object.prototype,u=Array.prototype,f=Object.getPrototypeOf,d=Object.isExtensible;const h=()=>{};function v(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}const p=1<<24,g=16,m=32,y=64,b=512,w=1024,_=2048,$=4096,k=8192,E=16384,S=32768,C=1<<25,x=65536,I=1<<17,O=1<<19,T=65536,A=1<<21,R=1<<23,P=Symbol("$state"),M=Symbol("legacy props"),L=Symbol(""),N=Symbol("attributes"),D=Symbol("class"),V=Symbol("style"),j=Symbol("text"),U=Symbol("form reset"),F=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},q=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function H(e){return e===this.v}function G(e,t){return e!=e?t==t:e!==t||null!==e&&"object"==typeof e||"function"==typeof e}function Y(e){return!G(e,this.v)}const B={},J=Symbol("uninitialized"),Z="http://www.w3.org/1999/xhtml";let W=null;function z(e){W=e}function X(e,t=!1,n){W={p:W,i:!1,c:null,e:null,s:e,x:null,r:Ft,l:null}}function K(e){var t=W,n=t.e;if(null!==n)for(var r of(t.e=null,n))gn(r);return void 0!==e&&(t.x=e),t.i=!0,W=t.p,e??{}}let Q=[];function ee(){var e=Q;Q=[],function(e){for(var t=0;t<e.length;t++)e[t]()}(e)}function te(e){if(0===Q.length&&!We){var t=Q;queueMicrotask(()=>{t===Q&&ee()})}Q.push(e)}function ne(){for(;Q.length>0;)ee()}function re(e){console.warn("https://svelte.dev/e/hydration_mismatch")}let ie,oe=!1;function ae(e){oe=e}function se(e){if(null===e)throw re(),B;return ie=e}function le(){return se(Ee(ie))}function ce(e){if(oe){if(null!==Ee(ie))throw re(),B;ie=e}}function ue(e=1){if(oe){for(var t=e,n=ie;t--;)n=Ee(n);ie=n}}function fe(e=!0){for(var t=0,n=ie;;){if(8===n.nodeType){var r=n.data;if("]"===r){if(0===t)return n;t-=1}else("["===r||"[!"===r||"["===r[0]&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=Ee(n);e&&n.remove(),n=i}}function de(e){if(!e||8!==e.nodeType)throw re(),B;return e.data}function he(e){if("object"!=typeof e||null===e||P in e)return e;const n=f(e);if(n!==c&&n!==u)return e;var r=new Map,i=t(e),o=St(0),a=zt,l=e=>{if(zt===a)return e();var t=Vt,n=zt;Ut(null),Xt(a);var r=e();return Ut(t),Xt(n),r};return i&&r.set("length",St(e.length)),new Proxy(e,{defineProperty(e,t,n){"value"in n&&!1!==n.configurable&&!1!==n.enumerable&&!1!==n.writable||function(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}();var i=r.get(t);return void 0===i?l(()=>{var e=St(n.value);return r.set(t,e),e}):xt(i,n.value,!0),!0},deleteProperty(e,t){var n=r.get(t);if(void 0===n){if(t in e){const e=l(()=>St(J));r.set(t,e),Ot(o)}}else xt(n,J),Ot(o);return!0},get(t,n,i){if(n===P)return e;var o=r.get(n),a=n in t;if(void 0!==o||a&&!s(t,n)?.writable||(o=l(()=>St(he(a?t[n]:J))),r.set(n,o)),void 0!==o){var c=sn(o);return c===J?void 0:c}return Reflect.get(t,n,i)},getOwnPropertyDescriptor(e,t){var n=Reflect.getOwnPropertyDescriptor(e,t);if(n&&"value"in n){var i=r.get(t);i&&(n.value=sn(i))}else if(void 0===n){var o=r.get(t),a=o?.v;if(void 0!==o&&a!==J)return{enumerable:!0,configurable:!0,value:a,writable:!0}}return n},has(e,t){if(t===P)return!0;var n=r.get(t),i=void 0!==n&&n.v!==J||Reflect.has(e,t);if((void 0!==n||null!==Ft&&(!i||s(e,t)?.writable))&&(void 0===n&&(n=l(()=>St(i?he(e[t]):J)),r.set(t,n)),sn(n)===J))return!1;return i},set(e,t,n,a){var c=r.get(t),u=t in e;if(i&&"length"===t)for(var f=n;f<c.v;f+=1){var d=r.get(f+"");void 0!==d?xt(d,J):f in e&&(d=l(()=>St(J)),r.set(f+"",d))}void 0===c?u&&!s(e,t)?.writable||(xt(c=l(()=>St(void 0)),he(n)),r.set(t,c)):(u=c.v!==J,xt(c,l(()=>he(n))));var h=Reflect.getOwnPropertyDescriptor(e,t);if(h?.set&&h.set.call(a,n),!u){if(i&&"string"==typeof t){var v=r.get("length"),p=Number(t);Number.isInteger(p)&&p>=v.v&&xt(v,p+1)}Ot(o)}return!0},ownKeys(e){sn(o);var t=Reflect.ownKeys(e).filter(e=>{var t=r.get(e);return void 0===t||t.v!==J});for(var[n,i]of r)i.v===J||n in e||t.push(n);return t},setPrototypeOf(){!function(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}()}})}function ve(e){try{if(null!==e&&"object"==typeof e&&P in e)return e[P]}catch{}return e}function pe(e,t){return Object.is(ve(e),ve(t))}var ge,me,ye,be,we;function _e(){if(void 0===ge){ge=window,me=document,ye=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;be=s(t,"firstChild").get,we=s(t,"nextSibling").get,d(e)&&(e[D]=void 0,e[N]=null,e[V]=void 0,e.__e=void 0),d(n)&&(n[j]=void 0)}}function $e(e=""){return document.createTextNode(e)}function ke(e){return be.call(e)}function Ee(e){return we.call(e)}function Se(e,t){if(!oe)return ke(e);var n=ke(ie);if(null===n)n=ie.appendChild($e());else if(t&&3!==n.nodeType){var r=$e();return n?.before(r),se(r),r}return t&&Oe(n),se(n),n}function Ce(e,t=!1){if(!oe){var n=ke(e);return n instanceof Comment&&""===n.data?Ee(n):n}if(t){if(3!==ie?.nodeType){var r=$e();return ie?.before(r),se(r),r}Oe(ie)}return ie}function xe(e,t=1,n=!1){let r=oe?ie:e;for(var i;t--;)i=r,r=Ee(r);if(!oe)return r;if(n){if(3!==r?.nodeType){var o=$e();return null===r?i?.after(o):r.before(o),se(o),o}Oe(r)}return se(r),r}function Ie(e,t,n){let r;return document.createElementNS(t??Z,e,r)}function Oe(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;null!==t&&3===t.nodeType;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function Te(e){var t=Ft;if(null===t)return Vt.f|=R,e;if(0===(t.f&S)&&!(4&t.f))throw e;Ae(e,t)}function Ae(e,t){for(;null!==t;){if(128&t.f){if(0===(t.f&S))throw e;try{return void t.b.error(e)}catch(t){e=t}}t=t.parent}throw e}const Re=-7169;function Pe(e,t){e.f=e.f&Re|t}function Me(e){0!==(e.f&b)||null===e.deps?Pe(e,w):Pe(e,$)}function Le(e){if(null!==e)for(const t of e)2&t.f&&0!==(t.f&T)&&(t.f^=T,Le(t.deps))}function Ne(e,t,n){0!==(e.f&_)?t.add(e):0!==(e.f&$)&&n.add(e),Le(e.deps),Pe(e,w)}function De(e,t,n){if(null==e)return t(void 0),h;const r=un(()=>e.subscribe(t,n));return r.unsubscribe?()=>r.unsubscribe():r}const Ve=[];function je(e,t=h){let n=null;const r=new Set;function i(t){if(G(e,t)&&(e=t,n)){const t=!Ve.length;for(const t of r)t[1](),Ve.push(t,e);if(t){for(let e=0;e<Ve.length;e+=2)Ve[e][0](Ve[e+1]);Ve.length=0}}}function o(t){i(t(e))}return{set:i,update:o,subscribe:function(a,s=h){const l=[a,s];return r.add(l),1===r.size&&(n=t(i,o)||h),a(e),()=>{r.delete(l),0===r.size&&n&&(n(),n=null)}}}}function Ue(e){let t;return De(e,e=>t=e)(),t}let Fe=Symbol("unmounted");function qe(e,t,n){const r=n[t]??={store:null,source:Ct(void 0),unsubscribe:h};if(r.store!==e&&!(Fe in n))if(r.unsubscribe(),r.store=e??null,null==e)r.source.v=void 0,r.unsubscribe=h;else{var i=!0;r.unsubscribe=De(e,e=>{i?r.source.v=e:xt(r.source,e)}),i=!1}return e&&Fe in n?Ue(e):sn(r.source)}let He=null,Ge=null,Ye=null,Be=null,Je=null,Ze=null,We=!1,ze=!1,Xe=null,Ke=null;var Qe=0;let et=1;class tt{id=et++;#e=!1;linked=!0;#t=null;#n=null;async_deriveds=new Map;current=new Map;previous=new Map;unblocked=new Set;#r=new Set;#i=new Set;#o=new Set;#a=0;#s=new Map;#l=null;#c=[];#u=[];#f=new Set;#d=new Set;#h=new Map;#v=new Set;is_fork=!1;#p=!1;#g(){if(this.is_fork)return!0;for(const n of this.#s.keys()){for(var e=n,t=!1;null!==e.parent;){if(this.#h.has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}skip_effect(e){this.#h.has(e)||this.#h.set(e,{d:[],m:[]}),this.#v.delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=this.#h.get(e);if(n){for(var r of(this.#h.delete(e),n.d))Pe(r,_),t(r);for(r of n.m)Pe(r,$),t(r)}this.#v.add(e)}#m(){if(this.#e=!0,Qe++>1e3&&(this.#y(),function(){try{!function(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}()}catch(e){Ae(e,Ze)}}()),!this.#g()){for(const e of this.#f)this.#d.delete(e),Pe(e,_),this.schedule(e);for(const e of this.#d)Pe(e,$),this.schedule(e)}const e=this.#c;this.#c=[],this.apply();var t=Xe=[],n=[],r=Ke=[];for(const r of e)try{this.#b(r,t,n)}catch(e){throw ct(r),e}if(Ye=null,r.length>0){var i=tt.ensure();for(const e of r)i.schedule(e)}if(Xe=null,Ke=null,this.#g()){this.#w(n),this.#w(t);for(const[e,t]of this.#h)lt(e,t);return void(r.length>0&&Ye.#m())}const o=this.#_();if(o)o.#$(this);else{this.#f.clear(),this.#d.clear();for(const e of this.#r)e(this);this.#r.clear(),Be=this,it(n),it(t),Be=null,this.#l?.resolve();var a=Ye;if(this.linked&&0===this.#a&&this.#y(),this.#c.length>0){null===a&&(a=this,this.#k());const e=a;e.#c.push(...this.#c.filter(t=>!e.#c.includes(t)))}null!==a&&a.#m()}}#b(e,t,n){e.f^=w;for(var r=e.first;null!==r;){var i=r.f,o=!!(96&i);if(!(o&&0!==(i&w)||0!==(i&k)||this.#h.has(r))&&null!==r.fn){o?r.f^=w:4&i?t.push(r):Qt(r)&&(0!==(i&g)&&this.#d.add(r),on(r));var a=r.first;if(null!==a){r=a;continue}}for(;null!==r;){var s=r.next;if(null!==s){r=s;break}r=r.parent}}}#_(){for(var e=this.#t;null!==e;){if(!e.is_fork)for(const[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e;e=e.#t}return null}#$(e){for(const[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(const[t,n]of e.async_deriveds){const e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve)}const t=e=>{var n=e.reactions;if(null!==n)for(const e of n){var r=e.f;if(2&r)t(e);else{var i=e;4194320&r&&!this.async_deriveds.has(i)&&(this.#d.delete(i),Pe(i,_),this.schedule(i))}}};for(const e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#y(),Ye=this,this.#m()}#w(e){for(var t=0;t<e.length;t+=1)Ne(e[t],this.#f,this.#d)}capture(e,t,n=!1){e.v===J||this.previous.has(e)||this.previous.set(e,e.v),0===(e.f&R)&&(this.current.set(e,[t,n]),Je?.set(e,t)),this.is_fork||(e.v=t)}activate(){Ye=this}deactivate(){Ye=null,Je=null}flush(){try{e,ze=!0,Ye=this,this.#m()}finally{Qe=0,Ze=null,Xe=null,Ke=null,ze=!1,Ye=null,Je=null,$t.clear()}}discard(){for(const e of this.#i)e(this);this.#i.clear(),this.#o.clear(),this.#y()}register_created_effect(e){this.#u.push(e)}#E(){this.#y();for(let c=He;null!==c;c=c.#n){var e=c.id<this.id,t=[];for(const[r,[i,o]]of this.current){if(c.current.has(r)){var n=c.current.get(r)[0];if(!e||i===n)continue;c.current.set(r,[i,o])}t.push(r)}if(e)for(const[e,t]of this.async_deriveds){const n=c.async_deriveds.get(e);n&&t.promise.then(n.resolve)}if(c.#e){var r=[...c.current.keys()].filter(e=>!this.current.has(e));if(0===r.length)e&&c.discard();else if(t.length>0){if(e)for(const e of this.#v)c.unskip_effect(e,e=>{4194320&e.f?c.schedule(e):c.#w([e])});c.activate();var i=new Set,o=new Map;for(var a of t)ot(a,r,i,o);o=new Map;var s=[...c.current.keys()].filter(e=>!this.current.has(e)||this.current.get(e)[0]!==e.v);if(s.length>0)for(const e of this.#u)155648&e.f||!at(e,s,o)||(4194320&e.f?(Pe(e,_),c.schedule(e)):c.#f.add(e));if(c.#c.length>0){for(var l of(c.apply(),c.#c))c.#b(l,[],[]);c.#c=[]}c.deactivate()}}}}increment(e,t){if(this.#a+=1,e){let e=this.#s.get(t)??0;this.#s.set(t,e+1)}}decrement(e,t){if(this.#a-=1,e){let e=this.#s.get(t)??0;1===e?this.#s.delete(t):this.#s.set(t,e-1)}this.#p||(this.#p=!0,te(()=>{this.#p=!1,this.linked&&this.flush()}))}transfer_effects(e,t){for(const t of e)this.#f.add(t);for(const e of t)this.#d.add(e);e.clear(),t.clear()}oncommit(e){this.#r.add(e)}ondiscard(e){this.#i.add(e)}on_fork_commit(e){this.#o.add(e)}run_fork_commit_callbacks(){for(const e of this.#o)e(this);this.#o.clear()}settled(){return(this.#l??=v()).promise}static ensure(){if(null===Ye){const e=Ye=new tt;e.#k(),ze||We||te(()=>{e.#e||e.flush()})}return Ye}apply(){Je=null}schedule(e){if(Ze=e,e.b?.is_pending&&16777228&e.f&&0===(e.f&S))e.b.defer_effect(e);else{for(var t=e;null!==t.parent;){var n=(t=t.parent).f;if(!(null===Xe||t!==Ft||null!==Vt&&2&Vt.f))return;if(96&n){if(0===(n&w))return;t.f^=w}}this.#c.push(t)}}#k(){null===Ge?He=Ge=this:(Ge.#n=this,this.#t=Ge),Ge=this}#y(){var e=this.#t,t=this.#n;null===e?He=t:e.#n=t,null===t?Ge=e:t.#t=e,this.linked=!1}}function nt(e){var t=We;We=!0;try{for(;;){if(ne(),null===Ye)return;Ye.flush()}}finally{We=t}}let rt=null;function it(e){var t=e.length;if(0!==t){for(var n=0;n<t;){var r=e[n++];if(!(24576&r.f)&&Qt(r)&&(rt=new Set,on(r),null===r.deps&&null===r.first&&null===r.nodes&&null===r.teardown&&null===r.ac&&xn(r),rt?.size>0)){$t.clear();for(const e of rt){if(24576&e.f)continue;const t=[e];let n=e.parent;for(;null!==n;)rt.has(n)&&(rt.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){const n=t[e];24576&n.f||on(n)}}rt.clear()}}rt=null}}function ot(e,t,n,r){if(!n.has(e)&&(n.add(e),null!==e.reactions))for(const i of e.reactions){const e=i.f;2&e?ot(i,t,n,r):4194320&e&&0===(e&_)&&at(i,t,r)&&(Pe(i,_),st(i))}}function at(e,t,n){const i=n.get(e);if(void 0!==i)return i;if(null!==e.deps)for(const i of e.deps){if(r.call(t,i))return!0;if(2&i.f&&at(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function st(e){Ye.schedule(e)}function lt(e,t){if(0===(e.f&m)||0===(e.f&w)){0!==(e.f&_)?t.d.push(e):0!==(e.f&$)&&t.m.push(e),Pe(e,w);for(var n=e.first;null!==n;)lt(n,t),n=n.next}}function ct(e){Pe(e,w);for(var t=e.first;null!==t;)ct(t),t=t.next}class ut{parent;is_pending=!1;transform_error;#S;#C=oe?ie:null;#x;#I;#O;#T=null;#A=null;#R=null;#P=null;#M=0;#L=0;#N=!1;#f=new Set;#d=new Set;#D=null;#V=function(e){let t,n=0,r=Et(0);return()=>{hn()&&(sn(r),yn(()=>(0===n&&(t=un(()=>e(()=>Ot(r)))),n+=1,()=>{te(()=>{n-=1,0===n&&(t?.(),t=void 0,Ot(r))})})))}}(()=>(this.#D=Et(this.#M),()=>{this.#D=null}));constructor(e,t,n,r){this.#S=e,this.#x=t,this.#I=e=>{var t=Ft;t.b=this,t.f|=128,n(e)},this.parent=Ft.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#O=wn(()=>{if(oe){const e=this.#C;le();const t="[!"===e.data;if(e.data.startsWith("[?")){const t=JSON.parse(e.data.slice(2));this.#j(t)}else t?this.#U():this.#F()}else this.#q()},589824),oe&&(this.#S=ie)}#F(){try{this.#T=$n(()=>this.#I(this.#S))}catch(e){this.error(e)}}#j(e){const t=this.#x.failed;t&&(this.#R=$n(()=>{t(this.#S,()=>e,()=>()=>{})}))}#U(){const e=this.#x.pending;e&&(this.is_pending=!0,this.#A=$n(()=>e(this.#S)),te(()=>{var e=this.#P=document.createDocumentFragment(),t=$e();e.append(t),this.#T=this.#H(()=>$n(()=>this.#I(t))),0===this.#L&&(this.#S.before(e),this.#P=null,In(this.#A,()=>{this.#A=null}),this.#G(Ye))}))}#q(){try{if(this.is_pending=this.has_pending_snippet(),this.#L=0,this.#M=0,this.#T=$n(()=>{this.#I(this.#S)}),this.#L>0){var e=this.#P=document.createDocumentFragment();Rn(this.#T,e);const t=this.#x.pending;this.#A=$n(()=>t(this.#S))}else this.#G(Ye)}catch(e){this.error(e)}}#G(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#d)}defer_effect(e){Ne(e,this.#f,this.#d)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#x.pending}#H(e){var t=Ft,n=Vt,r=W;qt(this.#O),Ut(this.#O),z(this.#O.ctx);try{return tt.ensure(),e()}catch(e){return Te(e),null}finally{qt(t),Ut(n),z(r)}}#Y(e,t){this.has_pending_snippet()?(this.#L+=e,0===this.#L&&(this.#G(t),this.#A&&In(this.#A,()=>{this.#A=null}),this.#P&&(this.#S.before(this.#P),this.#P=null))):this.parent&&this.parent.#Y(e,t)}update_pending_count(e,t){this.#Y(e,t),this.#M+=e,this.#D&&!this.#N&&(this.#N=!0,te(()=>{this.#N=!1,this.#D&&It(this.#D,this.#M)}))}get_effect_pending(){return this.#V(),sn(this.#D)}error(e){if(!this.#x.onerror&&!this.#x.failed)throw e;Ye?.is_fork?(this.#T&&Ye.skip_effect(this.#T),this.#A&&Ye.skip_effect(this.#A),this.#R&&Ye.skip_effect(this.#R),Ye.on_fork_commit(()=>{this.#B(e)})):this.#B(e)}#B(e){this.#T&&(Sn(this.#T),this.#T=null),this.#A&&(Sn(this.#A),this.#A=null),this.#R&&(Sn(this.#R),this.#R=null),oe&&(se(this.#C),ue(),se(fe()));var t=this.#x.onerror;let n=this.#x.failed;var r=!1,i=!1;const o=()=>{r?console.warn("https://svelte.dev/e/svelte_boundary_reset_noop"):(r=!0,i&&function(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}(),null!==this.#R&&In(this.#R,()=>{this.#R=null}),this.#H(()=>{this.#q()}))},a=e=>{try{i=!0,t?.(e,o),i=!1}catch(e){Ae(e,this.#O&&this.#O.parent)}n&&(this.#R=this.#H(()=>{try{return $n(()=>{var t=Ft;t.b=this,t.f|=128,n(this.#S,()=>e,()=>o)})}catch(e){return Ae(e,this.#O.parent),null}}))};te(()=>{var t;try{t=this.transform_error(e)}catch(e){return void Ae(e,this.#O&&this.#O.parent)}null!==t&&"object"==typeof t&&"function"==typeof t.then?t.then(a,e=>Ae(e,this.#O&&this.#O.parent)):a(t)})}}function ft(e,t,n,r){const i=vt;var o=e.filter(e=>!e.settled);if(0!==n.length||0!==o.length){var a,s,l,c,u=Ft,f=(a=Ft,s=Vt,l=W,c=Ye,function(e=!0){qt(a),Ut(s),z(l),e&&0===(a.f&E)&&(c?.activate(),c?.apply())}),d=1===o.length?o[0].promise:o.length>1?Promise.all(o.map(e=>e.promise)):null,h=ht();0!==n.length?d?d.then(()=>{f(),p(),dt()}):p():d.then(()=>v(t.map(i))).finally(h)}else r(t.map(i));function v(e){if(0===(u.f&E)){f();try{r(e)}catch(e){Ae(e,u)}dt()}}function p(){Promise.all(n.map(e=>gt(e))).then(e=>v([...t.map(i),...e])).catch(e=>Ae(e,u)).finally(h)}}function dt(e=!0){qt(null),Ut(null),z(null),e&&Ye?.deactivate()}function ht(){var e=Ft,t=e.b,n=Ye,r=t.is_rendered();return t.update_pending_count(1,n),n.increment(r,e),()=>{t.update_pending_count(-1,n),n.decrement(r,e)}}function vt(e){null!==Ft&&(Ft.f|=O);return{ctx:W,deps:null,effects:null,equals:H,f:2050,fn:e,reactions:null,rv:0,v:J,wv:0,parent:Ft,ac:null}}const pt=Symbol("obsolete");function gt(e,t,n){let r=Ft;null===r&&function(){throw new Error("https://svelte.dev/e/async_derived_orphan")}();var i=void 0,o=Et(J),a=!Vt,s=new Set;return function(e){dn(4718592,e)}(()=>{var t=Ft,n=v();i=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==F&&n.reject(e)}).finally(dt)}catch(e){n.reject(e),dt()}var l=Ye;if(a){if(0!==(t.f&S))var c=ht();if(r.b.is_rendered())l.async_deriveds.get(t)?.reject(pt);else for(const e of s.values())e.reject(pt);s.add(n),l.async_deriveds.set(t,n)}const u=(e,t=void 0)=>{c?.(),s.delete(n),t!==pt&&(l.activate(),t?(o.f|=R,It(o,t)):(0!==(o.f&R)&&(o.f^=R),It(o,e)),l.deactivate())};n.promise.then(u,e=>u(null,e||"unknown"))}),vn(()=>{for(const e of s)e.reject(pt)}),new Promise(e=>{!function t(n){function r(){n===i?e(o):t(i)}n.then(r,r)}(i)})}function mt(e){const t=vt(e);return Gt(t),t}function yt(e){var t,n=Ft,r=e.parent;if(!Nt&&null!==r&&e.v!==J&&24576&r.f)return console.warn("https://svelte.dev/e/derived_inert"),e.v;qt(r);try{e.f&=-65537,function(e){var t=e.effects;if(null!==t){e.effects=null;for(var n=0;n<t.length;n+=1)Sn(t[n])}}(e),t=tn(e)}finally{qt(n)}return t}function bt(e){var t=yt(e);e.equals(t)||(e.wv=Kt(),Ye?.is_fork&&null!==e.deps||(null!==Ye?(Ye.capture(e,t,!0),Be?.capture(e,t,!0)):e.v=t,null!==e.deps))?Nt||(null!==Je?(hn()||Ye?.is_fork)&&Je.set(e,t):Me(e)):Pe(e,w)}function wt(e){if(null!==e.effects)for(const t of e.effects)t.teardown&&null!==t.fn&&on(t)}let _t=new Set;const $t=new Map;let kt=!1;function Et(e,t){return{f:0,v:e,reactions:null,equals:H,rv:0,wv:0}}function St(e,t){const n=Et(e);return Gt(n),n}function Ct(e,t=!1,n=!0){const r=Et(e);return t||(r.equals=Y),r}function xt(e,t,n=!1){return null===Vt||jt&&0===(Vt.f&I)||!(4325394&Vt.f)||null!==Ht&&r.call(Ht,e)||function(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}(),It(e,n?he(t):t,Ke)}function It(e,t,n=null){if(!e.equals(t)){$t.set(e,Nt?t:e.v);var r=tt.ensure();if(r.capture(e,t),2&e.f){const t=e;0!==(e.f&_)&&yt(t),null===Je&&Me(t)}e.wv=Kt(),Tt(e,_,n),null===Ft||0===(Ft.f&w)||96&Ft.f||(null===Jt?function(e){Jt=e}([e]):Jt.push(e)),!r.is_fork&&_t.size>0&&!kt&&function(){kt=!1;for(const e of _t){let t;0!==(e.f&w)&&Pe(e,$);try{t=Qt(e)}catch{t=!0}t&&on(e)}_t.clear()}()}return t}function Ot(e){xt(e,e.v+1)}function Tt(e,t,n){var r=e.reactions;if(null!==r)for(var i=r.length,o=0;o<i;o++){var a=r[o],s=a.f,l=0===(s&_);if(l&&Pe(a,t),0!==(s&I))_t.add(a);else if(2&s){var c=a;Je?.delete(c),0===(s&T)&&(s&b&&(null===Ft||0===(Ft.f&A))&&(a.f|=T),Tt(c,$,n))}else if(l){var u=a;0!==(s&g)&&null!==rt&&rt.add(u),null!==n?n.push(u):st(u)}}}function At(e,t){if(t){const t=document.body;e.autofocus=!0,te(()=>{document.activeElement===t&&e.focus()})}}let Rt=!1;function Pt(){Rt||(Rt=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[U]?.()})},{capture:!0}))}function Mt(e){var t=Vt,n=Ft;Ut(null),qt(null);try{return e()}finally{Ut(t),qt(n)}}let Lt=!1,Nt=!1;function Dt(e){Nt=e}let Vt=null,jt=!1;function Ut(e){Vt=e}let Ft=null;function qt(e){Ft=e}let Ht=null;function Gt(e){null!==Vt&&(null===Ht?Ht=[e]:Ht.push(e))}let Yt=null,Bt=0,Jt=null;let Zt=1,Wt=0,zt=Wt;function Xt(e){zt=e}function Kt(){return++Zt}function Qt(e){var t=e.f;if(0!==(t&_))return!0;if(2&t&&(e.f&=-65537),0!==(t&$)){for(var n=e.deps,r=n.length,i=0;i<r;i++){var o=n[i];if(Qt(o)&&bt(o),o.wv>e.wv)return!0}0!==(t&b)&&null===Je&&Pe(e,w)}return!1}function en(e,t,n=!0){var i=e.reactions;if(null!==i&&(null===Ht||!r.call(Ht,e)))for(var o=0;o<i.length;o++){var a=i[o];2&a.f?en(a,t,!1):t===a&&(n?Pe(a,_):0!==(a.f&w)&&Pe(a,$),st(a))}}function tn(e){var t=Yt,n=Bt,r=Jt,i=Vt,o=Ht,a=W,s=jt,l=zt,c=e.f;Yt=null,Bt=0,Jt=null,Vt=96&c?null:e,Ht=null,z(e.ctx),jt=!1,zt=++Wt,null!==e.ac&&(Mt(()=>{e.ac.abort(F)}),e.ac=null);try{e.f|=A;var u=(0,e.fn)();e.f|=S;var f=e.deps,d=Ye?.is_fork;if(null!==Yt){var h;if(d||rn(e,Bt),null!==f&&Bt>0)for(f.length=Bt+Yt.length,h=0;h<Yt.length;h++)f[Bt+h]=Yt[h];else e.deps=f=Yt;if(hn()&&0!==(e.f&b))for(h=Bt;h<f.length;h++)(f[h].reactions??=[]).push(e)}else!d&&null!==f&&Bt<f.length&&(rn(e,Bt),f.length=Bt);if(!(null===Jt||jt||null===f||6146&e.f))for(h=0;h<Jt.length;h++)en(Jt[h],e);if(null!==i&&i!==e){if(Wt++,null!==i.deps)for(let e=0;e<n;e+=1)i.deps[e].rv=Wt;if(null!==t)for(const e of t)e.rv=Wt;null!==Jt&&(null===r?r=Jt:r.push(...Jt))}return 0!==(e.f&R)&&(e.f^=R),u}catch(e){return Te(e)}finally{e.f^=A,Yt=t,Bt=n,Jt=r,Vt=i,Ht=o,z(a),jt=s,zt=l}}function nn(e,t){let i=t.reactions;if(null!==i){var o=n.call(i,e);if(-1!==o){var a=i.length-1;0===a?i=t.reactions=null:(i[o]=i[a],i.pop())}}if(null===i&&2&t.f&&(null===Yt||!r.call(Yt,t))){var s=t;0!==(s.f&b)&&(s.f^=b,s.f&=-65537),s.v!==J&&Me(s),function(e){if(null!==e.effects)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(F),null!==t.fn&&(t.teardown=h),t.ac=null,rn(t,0),En(t))}(s),rn(s,0)}}function rn(e,t){var n=e.deps;if(null!==n)for(var r=t;r<n.length;r++)nn(e,n[r])}function on(e){var t=e.f;if(0===(t&E)){Pe(e,w);var n=Ft,r=Lt;Ft=e,Lt=!0;try{16777232&t?function(e){var t=e.first;for(;null!==t;){var n=t.next;0===(t.f&m)&&Sn(t),t=n}}(e):En(e),kn(e);var i=tn(e);e.teardown="function"==typeof i?i:null,e.wv=Zt}finally{Lt=r,Ft=n}}}async function an(){await Promise.resolve(),nt()}function sn(e){var t=!!(2&e.f);if(null!==Vt&&!jt&&!(null!==Ft&&0!==(Ft.f&E)||null!==Ht&&r.call(Ht,e))){var n=Vt.deps;if(0!==(Vt.f&A))e.rv<Wt&&(e.rv=Wt,null===Yt&&null!==n&&n[Bt]===e?Bt++:null===Yt?Yt=[e]:Yt.push(e));else{(Vt.deps??=[]).push(e);var i=e.reactions;null===i?e.reactions=[Vt]:r.call(i,Vt)||i.push(Vt)}}if(Nt&&$t.has(e))return $t.get(e);if(t){var o=e;if(Nt){var a=o.v;return(0===(o.f&w)&&null!==o.reactions||cn(o))&&(a=yt(o)),$t.set(o,a),a}var s=0===(o.f&b)&&!jt&&null!==Vt&&(Lt||0!==(Vt.f&b)),l=0===(o.f&S);Qt(o)&&(s&&(o.f|=b),bt(o)),s&&!l&&(wt(o),ln(o))}if(Je?.has(e))return Je.get(e);if(0!==(e.f&R))throw e.v;return e.v}function ln(e){if(e.f|=b,null!==e.deps)for(const t of e.deps)(t.reactions??=[]).push(e),2&t.f&&0===(t.f&b)&&(wt(t),ln(t))}function cn(e){if(e.v===J)return!0;if(null===e.deps)return!1;for(const t of e.deps){if($t.has(t))return!0;if(2&t.f&&cn(t))return!0}return!1}function un(e){var t=jt;try{return jt=!0,e()}finally{jt=t}}function fn(e){null===Ft&&(null===Vt&&function(){throw new Error("https://svelte.dev/e/effect_orphan")}(),function(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}()),Nt&&function(){throw new Error("https://svelte.dev/e/effect_in_teardown")}()}function dn(e,t){var n=Ft;null!==n&&0!==(n.f&k)&&(e|=k);var r={ctx:W,deps:null,nodes:null,f:e|_|b,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};Ye?.register_created_effect(r);var i=r;if(4&e)null!==Xe?Xe.push(r):tt.ensure().schedule(r);else if(null!==t){try{on(r)}catch(e){throw Sn(r),e}null===i.deps&&null===i.teardown&&null===i.nodes&&i.first===i.last&&0===(i.f&O)&&(i=i.first,0!==(e&g)&&0!==(e&x)&&null!==i&&(i.f|=x))}if(null!==i&&(i.parent=n,null!==n&&function(e,t){var n=t.last;null===n?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}(i,n),null!==Vt&&2&Vt.f&&0===(e&y))){var o=Vt;(o.effects??=[]).push(i)}return r}function hn(){return null!==Vt&&!jt}function vn(e){const t=dn(8,null);return Pe(t,w),t.teardown=e,t}function pn(e){fn();var t=Ft.f;if(!(!Vt&&0!==(t&m)&&0===(t&S)))return gn(e);var n=W;(n.e??=[]).push(e)}function gn(e){return dn(1048580,e)}function mn(e){return dn(4,e)}function yn(e,t=0){return dn(8|t,e)}function bn(e,t=[],n=[],r=[]){ft(r,t,n,t=>{dn(8,()=>e(...t.map(sn)))})}function wn(e,t=0){return dn(g|t,e)}function _n(e,t=0){return dn(p|t,e)}function $n(e){return dn(524320,e)}function kn(e){var t=e.teardown;if(null!==t){const e=Nt,n=Vt;Dt(!0),Ut(null);try{t.call(null)}finally{Dt(e),Ut(n)}}}function En(e,t=!1){var n=e.first;for(e.first=e.last=null;null!==n;){const e=n.ac;null!==e&&Mt(()=>{e.abort(F)});var r=n.next;0!==(n.f&y)?n.parent=null:Sn(n,t),n=r}}function Sn(e,t=!0){var n=!1;(t||262144&e.f)&&null!==e.nodes&&null!==e.nodes.end&&(Cn(e.nodes.start,e.nodes.end),n=!0),Pe(e,C),En(e,t&&!n),rn(e,0);var r=e.nodes&&e.nodes.t;if(null!==r)for(const e of r)e.stop();kn(e),e.f^=C,e.f|=E;var i=e.parent;null!==i&&null!==i.first&&xn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Cn(e,t){for(;null!==e;){var n=e===t?null:Ee(e);e.remove(),e=n}}function xn(e){var t=e.parent,n=e.prev,r=e.next;null!==n&&(n.next=r),null!==r&&(r.prev=n),null!==t&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function In(e,t,n=!0){var r=[];On(e,r,!0);var i=()=>{n&&Sn(e),t&&t()},o=r.length;if(o>0){var a=()=>--o||i();for(var s of r)s.out(a)}else i()}function On(e,t,n){if(0===(e.f&k)){e.f^=k;var r=e.nodes&&e.nodes.t;if(null!==r)for(const e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;null!==i;){var o=i.next;if(0===(i.f&y))On(i,t,!!(0!==(i.f&x)||0!==(i.f&m)&&0!==(e.f&g))&&n);i=o}}}function Tn(e){An(e,!0)}function An(e,t){if(0!==(e.f&k)){e.f^=k,0===(e.f&w)&&(Pe(e,_),tt.ensure().schedule(e));for(var n=e.first;null!==n;){var r=n.next;An(n,!!(0!==(n.f&x)||0!==(n.f&m))&&t),n=r}var i=e.nodes&&e.nodes.t;if(null!==i)for(const e of i)(e.is_global||t)&&e.in()}}function Rn(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;null!==n;){var i=n===r?null:Ee(n);t.append(n),n=i}}function Pn(e){const t={get:e=>Ue(t.store)[e],set:(e,n)=>{"string"==typeof e?Object.assign(Ue(t.store),{[e]:n}):Object.assign(Ue(t.store),e),t.store.set(Ue(t.store))},store:je(e)};return t}globalThis.$altcha=globalThis.$altcha||{algorithms:new Map,defaults:Pn({}),i18n:Pn({}),instances:new Set,plugins:new Set};const Mn={ariaLinkLabel:"Altcha (official website)",cancel:"Cancel",enterCode:"Enter code",enterCodeAria:"Enter code you hear. Press Space to play audio.",enterCodeFromImage:"To proceed, please enter the code from the image below.",error:"Verification failed. Try again later.",expired:"Verification expired. Try again.",footer:'Protected by <a href="https://altcha.org/" tabindex="-1" target="_blank" aria-label="Altcha (official website)">ALTCHA</a>',getAudioChallenge:"Get an audio challenge",label:"I'm not a robot",loading:"Loading...",reload:"Reload",verify:"Verify",verificationRequired:"Verification required!",verified:"Verified",verifying:"Verifying...",waitAlert:"Verifying... please wait."};"$altcha"in globalThis&&globalThis.$altcha.i18n.set("en",Mn);"undefined"!=typeof window&&((window.__svelte??={}).v??=new Set).add("5");const Ln=Symbol("events"),Nn=new Set,Dn=new Set;function Vn(e,t,n,r={}){function i(e){if(r.capture||Hn.call(t,e),!e.cancelBubble)return Mt(()=>n?.call(this,e))}return e.startsWith("pointer")||e.startsWith("touch")||"wheel"===e?te(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function jn(e,t,n,r,i){var o={capture:r,passive:i},a=Vn(e,t,n,o);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&vn(()=>{t.removeEventListener(e,a,o)})}function Un(e,t,n){(t[Ln]??={})[e]=n}function Fn(e){for(var t=0;t<e.length;t++)Nn.add(e[t]);for(var n of Dn)n(e)}let qn=null;function Hn(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],o=i[0]||e.target;qn=e;var s=0,l=qn===e&&e[Ln];if(l){var c=i.indexOf(l);if(-1!==c&&(t===document||t===window))return void(e[Ln]=t);var u=i.indexOf(t);if(-1===u)return;c<=u&&(s=c)}if((o=i[s]||e.target)!==t){a(e,"currentTarget",{configurable:!0,get:()=>o||n});var f=Vt,d=Ft;Ut(null),qt(null);try{for(var h,v=[];null!==o;){var p=o.assignedSlot||o.parentNode||o.host||null;try{var g=o[Ln]?.[r];null==g||o.disabled&&e.target!==o||g.call(o,e)}catch(e){h?v.push(e):h=e}if(e.cancelBubble||p===t||null===p)break;o=p}if(h){for(let e of v)queueMicrotask(()=>{throw e});throw h}}finally{e[Ln]=t,delete e.currentTarget,Ut(f),qt(d)}}}const Gn=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Yn(e){var t=Ie("template");return t.innerHTML=function(e){return Gn?.createHTML(e)??e}(e.replaceAll("<!>","\x3c!----\x3e")),t.content}function Bn(e,t){var n=Ft;null===n.nodes&&(n.nodes={start:e,end:t,a:null,t:null})}function Jn(e,t){var n,r=!!(1&t),i=!!(2&t),o=!e.startsWith("<!>");return()=>{if(oe)return Bn(ie,null),ie;void 0===n&&(n=Yn(o?e:"<!>"+e),r||(n=ke(n)));var t=i||ye?document.importNode(n,!0):n.cloneNode(!0);r?Bn(ke(t),t.lastChild):Bn(t,t);return t}}function Zn(e,t,n="svg"){var r,i=`<${n}>${!e.startsWith("<!>")?e:"<!>"+e}</${n}>`;return()=>{if(oe)return Bn(ie,null),ie;if(!r){var e=Yn(i);r=ke(ke(e))}var t=r.cloneNode(!0);return Bn(t,t),t}}function Wn(e,t){return Zn(e,0,"svg")}function zn(e=""){if(!oe){var t=$e(e+"");return Bn(t,t),t}var n=ie;return 3!==n.nodeType?(n.before(n=$e()),se(n)):Oe(n),Bn(n,n),n}function Xn(){if(oe)return Bn(ie,null),ie;var e=document.createDocumentFragment(),t=document.createComment(""),n=$e();return e.append(t,n),Bn(t,n),e}function Kn(e,t){if(oe){var n=Ft;return 0!==(n.f&S)&&null!==n.nodes.end||(n.nodes.end=ie),void le()}null!==e&&e.before(t)}function Qn(e){return e.endsWith("capture")&&"gotpointercapture"!==e&&"lostpointercapture"!==e}const er=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function tr(e){return er.includes(e)}const nr={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function rr(e){return e=e.toLowerCase(),nr[e]??e}const ir=["touchstart","touchmove"];function or(e){return ir.includes(e)}function ar(e,t){var n=null==t?"":"object"==typeof t?`${t}`:t;n!==(e[j]??=e.nodeValue)&&(e[j]=n,e.nodeValue=`${n}`)}function sr(e,t){return ur(e,t)}function lr(e,t){_e(),t.intro=t.intro??!1;const n=t.target,r=oe,i=ie;try{for(var o=ke(n);o&&(8!==o.nodeType||"["!==o.data);)o=Ee(o);if(!o)throw B;ae(!0),se(o);const r=ur(e,{...t,anchor:o});return ae(!1),r}catch(r){if(r instanceof Error&&r.message.split("\n").some(e=>e.startsWith("https://svelte.dev/e/")))throw r;return r!==B&&console.warn("Failed to hydrate: ",r),!1===t.recover&&function(){throw new Error("https://svelte.dev/e/hydration_failed")}(),_e(),n.textContent="",ae(!1),sr(e,t)}finally{ae(r),se(i)}}const cr=new Map;function ur(e,{target:t,anchor:n,props:r={},events:o,context:a,intro:s=!0,transformError:l}){_e();var c=void 0,u=function(e){tt.ensure();const t=dn(524352,e);return(e={})=>new Promise(n=>{e.outro?In(t,()=>{Sn(t),n(void 0)}):(Sn(t),n(void 0))})}(()=>{var s=n??t.appendChild($e());!function(e,t,n,r){new ut(e,t,n,r)}(s,{pending:()=>{}},t=>{if(X({}),a&&(W.c=a),o&&(r.$$events=o),oe&&Bn(t,null),c=e(t,r)||{},oe&&(Ft.nodes.end=ie,null===ie||8!==ie.nodeType||"]"!==ie.data))throw re(),B;K()},l);var u=new Set,f=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!u.has(r)){u.add(r);var i=or(r);for(const e of[t,document]){var o=cr.get(e);void 0===o&&(o=new Map,cr.set(e,o));var a=o.get(r);void 0===a?(e.addEventListener(r,Hn,{passive:i}),o.set(r,1)):o.set(r,a+1)}}}};return f(i(Nn)),Dn.add(f),()=>{for(var e of u)for(const n of[t,document]){var r=cr.get(n),i=r.get(e);0==--i?(n.removeEventListener(e,Hn),r.delete(e),0===r.size&&cr.delete(n)):r.set(e,i)}Dn.delete(f),s!==n&&s.parentNode?.removeChild(s)}});return fr.set(c,u),c}let fr=new WeakMap;class dr{anchor;#J=new Map;#Z=new Map;#W=new Map;#z=new Set;#X=!0;constructor(e,t=!0){this.anchor=e,this.#X=t}#E=e=>{if(this.#J.has(e)){var t=this.#J.get(e),n=this.#Z.get(t);if(n)Tn(n),this.#z.delete(t);else{var r=this.#W.get(t);r&&(this.#Z.set(t,r.effect),this.#W.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(const[t,n]of this.#J){if(this.#J.delete(t),t===e)break;const r=this.#W.get(n);r&&(Sn(r.effect),this.#W.delete(n))}for(const[e,r]of this.#Z){if(e===t||this.#z.has(e))continue;const i=()=>{if(Array.from(this.#J.values()).includes(e)){var t=document.createDocumentFragment();Rn(r,t),t.append($e()),this.#W.set(e,{effect:r,fragment:t})}else Sn(r);this.#z.delete(e),this.#Z.delete(e)};this.#X||!n?(this.#z.add(e),In(r,i,!1)):i()}}};#K=e=>{this.#J.delete(e);const t=Array.from(this.#J.values());for(const[e,n]of this.#W)t.includes(e)||(Sn(n.effect),this.#W.delete(e))};ensure(e,t){var n=Ye;!t||this.#Z.has(e)||this.#W.has(e)||this.#Z.set(e,$n(()=>t(this.anchor)));this.#J.set(n,e),oe&&(this.anchor=ie),this.#E(n)}}function hr(e){null===W&&function(){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}(),pn(()=>{const t=un(e);if("function"==typeof t)return t})}function vr(e,t,n=!1){var r;oe&&(r=ie,le());var i=new dr(e);function o(e,t){if(oe){var n=de(r);if(e!==parseInt(n.substring(1))){var o=fe();return se(o),i.anchor=o,ae(!1),i.ensure(e,t),void ae(!0)}}i.ensure(e,t)}wn(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},n?x:0)}const pr=Symbol("NaN");function gr(e,t,n=!1,r=!1,i=!1,o=!1){var a=e,s="";if(n){var l=e;oe&&(a=se(ke(l)))}bn(()=>{var e=Ft;if(s!==(s=t()??"")){if(n&&!oe)return e.nodes=null,l.innerHTML=s,void(""!==s&&Bn(ke(l),l.lastChild));if(null!==e.nodes&&(Cn(e.nodes.start,e.nodes.end),e.nodes=null),""!==s){if(oe){ie.data;for(var o=le(),c=o;null!==o&&(8!==o.nodeType||""!==o.data);)c=o,o=Ee(o);if(null===o)throw re(),B;return Bn(ie,c),void(a=se(o))}var u=Ie(r?"svg":i?"math":"template",r?"http://www.w3.org/2000/svg":i?"http://www.w3.org/1998/Math/MathML":void 0);u.innerHTML=s;var f=r||i?u:u.content;if(Bn(ke(f),f.lastChild),r||i)for(;ke(f);)a.before(ke(f));else a.before(f)}}else oe&&le()})}function mr(e,t){var n,r=void 0;_n(()=>{r!==(r=t())&&(n&&(Sn(n),n=null),r&&(n=$n(()=>{mn(()=>r(e))})))})}function yr(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=yr(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function br(e){return"object"==typeof e?function(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=yr(e))&&(r&&(r+=" "),r+=t);return r}(e):e??""}const wr=[..." \t\n\r\f \v\ufeff"];function _r(e,t=!1){var n=t?" !important;":";",r="";for(var i of Object.keys(e)){var o=e[i];null!=o&&""!==o&&(r+=" "+i+": "+o+n)}return r}function $r(e){return"-"!==e[0]||"-"!==e[1]?e.toLowerCase():e}function kr(e,t,n,r,i,o){var a=e[D];if(oe||a!==n||void 0===a){var s=function(e,t,n){var r=null==e?"":""+e;if(n)for(var i of Object.keys(n))if(n[i])r=r?r+" "+i:i;else if(r.length)for(var o=i.length,a=0;(a=r.indexOf(i,a))>=0;){var s=a+o;0!==a&&!wr.includes(r[a-1])||s!==r.length&&!wr.includes(r[s])?a=s:r=(0===a?"":r.substring(0,a))+r.substring(s+1)}return""===r?null:r}(n,0,o);oe&&s===e.getAttribute("class")||(null==s?e.removeAttribute("class"):t?e.className=s:e.setAttribute("class",s)),e[D]=n}else if(o&&i!==o)for(var l in o){var c=!!o[l];null!=i&&c===!!i[l]||e.classList.toggle(l,c)}return o}function Er(e,t={},n,r){for(var i in n){var o=n[i];t[i]!==o&&(null==n[i]?e.style.removeProperty(i):e.style.setProperty(i,o,r))}}function Sr(e,t,n,r){var i=e[V];if(oe||i!==t){var o=function(e,t){if(t){var n,r,i="";if(Array.isArray(t)?(n=t[0],r=t[1]):n=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var o=!1,a=0,s=!1,l=[];n&&l.push(...Object.keys(n).map($r)),r&&l.push(...Object.keys(r).map($r));var c=0,u=-1;const t=e.length;for(var f=0;f<t;f++){var d=e[f];if(s?"/"===d&&"*"===e[f-1]&&(s=!1):o?o===d&&(o=!1):"/"===d&&"*"===e[f+1]?s=!0:'"'===d||"'"===d?o=d:"("===d?a++:")"===d&&a--,!s&&!1===o&&0===a)if(":"===d&&-1===u)u=f;else if(";"===d||f===t-1){if(-1!==u){var h=$r(e.substring(c,u).trim());l.includes(h)||(";"!==d&&f++,i+=" "+e.substring(c,f).trim()+";")}c=f+1,u=-1}}}return n&&(i+=_r(n)),r&&(i+=_r(r,!0)),""===(i=i.trim())?null:i}return null==e?null:String(e)}(t,r);oe&&o===e.getAttribute("style")||(null==o?e.removeAttribute("style"):e.style.cssText=o),e[V]=t}else r&&(Array.isArray(r)?(Er(e,n?.[0],r[0]),Er(e,n?.[1],r[1],"important")):Er(e,n,r));return r}function Cr(e,n,r=!1){if(e.multiple){if(null==n)return;if(!t(n))return void console.warn("https://svelte.dev/e/select_multiple_invalid_value");for(var i of e.options)i.selected=n.includes(xr(i))}else{for(i of e.options){if(pe(xr(i),n))return void(i.selected=!0)}r&&void 0===n||(e.selectedIndex=-1)}}function xr(e){return"__value"in e?e.__value:e.value}const Ir=Symbol("class"),Or=Symbol("style"),Tr=Symbol("is custom element"),Ar=Symbol("is html"),Rr=q?"link":"LINK",Pr=q?"input":"INPUT",Mr=q?"option":"OPTION",Lr=q?"select":"SELECT",Nr=q?"progress":"PROGRESS";function Dr(e){if(oe){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var n=e.value;jr(e,"value",null),e.value=n}if(e.hasAttribute("checked")){var r=e.checked;jr(e,"checked",null),e.checked=r}}};e[U]=n,te(n),Pt()}}function Vr(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function jr(e,t,n,r){var i=Fr(e);oe&&(i[t]=e.getAttribute(t),"src"===t||"srcset"===t||"href"===t&&e.nodeName===Rr)||i[t]!==(i[t]=n)&&("loading"===t&&(e[L]=n),null==n?e.removeAttribute(t):"string"!=typeof n&&Hr(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Ur(e,t,n=[],r=[],i=[],o,a=!1,s=!1){ft(i,n,r,n=>{var r=void 0,i={},o=e.nodeName===Lr,l=!1;if(_n(()=>{var c=t(...n.map(sn)),u=function(e,t,n,r,i=!1){if(oe&&i&&e.nodeName===Pr){var o=e;("checkbox"===o.type?"defaultChecked":"defaultValue")in n||Dr(o)}var a=Fr(e),s=a[Tr],l=!a[Ar];let c=oe&&s;c&&ae(!1);var u=t||{},f=e.nodeName===Mr;for(var d in t)d in n||(n[d]=null);n.class?n.class=br(n.class):n[Ir]&&(n.class=null),n[Or]&&(n.style??=null);var h=Hr(e);for(const r in n){let i=n[r];if(f&&"value"===r&&null==i)e.value=e.__value="",u[r]=i;else if("class"!==r)if("style"!==r){var v=u[r];if(i!==v||void 0===i&&e.hasAttribute(r)){u[r]=i;var p=r[0]+r[1];if("$$"!==p)if("on"===p){const t={},n="$$"+r;let o=r.slice(2);var g=tr(o);if(Qn(o)&&(o=o.slice(0,-7),t.capture=!0),!g&&v){if(null!=i)continue;e.removeEventListener(o,u[n],t),u[n]=null}if(g)Un(o,e,i),Fn([o]);else if(null!=i){let i=function(e){u[r].call(this,e)};u[n]=Vn(o,e,i,t)}}else if("style"===r)jr(e,r,i);else if("autofocus"===r)At(e,Boolean(i));else if(s||"__value"!==r&&("value"!==r||null==i))if("selected"===r&&f)Vr(e,i);else{var m=r;l||(m=rr(m));var y="defaultValue"===m||"defaultChecked"===m;if(null!=i||s||y)y||h.includes(m)&&(s||"string"!=typeof i)?(e[m]=i,m in a&&(a[m]=J)):"function"!=typeof i&&jr(e,m,i);else if(a[r]=null,"value"===m||"checked"===m){let n=e;const r=void 0===t;if("value"===m){let e=n.defaultValue;n.removeAttribute(m),n.defaultValue=e,n.value=n.__value=r?e:null}else{let e=n.defaultChecked;n.removeAttribute(m),n.defaultChecked=e,n.checked=!!r&&e}}else e.removeAttribute(r)}else e.value=e.__value=i}}else Sr(e,i,t?.[Or],n[Or]),u[r]=i,u[Or]=n[Or];else kr(e,"http://www.w3.org/1999/xhtml"===e.namespaceURI,i,0,t?.[Ir],n[Ir]),u[r]=i,u[Ir]=n[Ir]}return c&&ae(!0),u}(e,r,c,0,a,s);l&&o&&"value"in c&&Cr(e,c.value);for(let e of Object.getOwnPropertySymbols(i))c[e]||Sn(i[e]);for(let t of Object.getOwnPropertySymbols(c)){var f=c[t];"@attach"!==t.description||r&&f===r[t]||(i[t]&&Sn(i[t]),i[t]=$n(()=>mr(e,()=>f))),u[t]=f}r=u}),o){var c=e;mn(()=>{Cr(c,r.value,!0),function(e){var t=new MutationObserver(()=>{Cr(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),vn(()=>{t.disconnect()})}(c)})}l=!0})}function Fr(e){return e[N]??={[Tr]:e.nodeName.includes("-"),[Ar]:e.namespaceURI===Z}}var qr=new Map;function Hr(e){var t,n=e.getAttribute("is")||e.nodeName,r=qr.get(n);if(r)return r;qr.set(n,r=[]);for(var i=e,o=Element.prototype;o!==i;){for(var a in t=l(i))t[a].set&&"innerHTML"!==a&&"textContent"!==a&&"innerText"!==a&&r.push(a);i=f(i)}return r}function Gr(e,t,n=t){var r=new WeakSet;!function(e,t,n,r=n){e.addEventListener(t,()=>Mt(n));const i=e[U];e[U]=i?()=>{i(),r(!0)}:()=>r(!0),Pt()}(e,"input",async i=>{var o=i?e.defaultValue:e.value;if(o=Yr(e)?Br(o):o,n(o),null!==Ye&&r.add(Ye),await an(),o!==(o=t())){var a=e.selectionStart,s=e.selectionEnd,l=e.value.length;if(e.value=o??"",null!==s){var c=e.value.length;a===s&&s===l&&c>l?(e.selectionStart=c,e.selectionEnd=c):(e.selectionStart=a,e.selectionEnd=Math.min(s,c))}}}),(oe&&e.defaultValue!==e.value||null==un(t)&&e.value)&&(n(Yr(e)?Br(e.value):e.value),null!==Ye&&r.add(Ye)),yn(()=>{var n=t();if(e===document.activeElement){var i=Ye;if(r.has(i))return}Yr(e)&&n===Br(e.value)||("date"!==e.type||n||e.value)&&n!==e.value&&(e.value=n??"")})}function Yr(e){var t=e.type;return"number"===t||"range"===t}function Br(e){return""===e?null:+e}function Jr(e,t){return e===t||e?.[P]===t}function Zr(e={},t,n,r){var i=W.r,o=Ft;return mn(()=>{var r,a;return yn(()=>{r=a,a=[],un(()=>{Jr(n(...a),e)||(t(e,...a),r&&Jr(n(...r),e)&&t(null,...r))})}),()=>{let r=o;for(;r!==i&&null!==r.parent&&r.parent.f&C;)r=r.parent;const s=r.teardown;r.teardown=()=>{a&&Jr(n(...a),e)&&t(null,...a),s?.()}}}),e}const Wr={get(e,t){if(!e.exclude.includes(t))return e.props[t]},set:(e,t)=>!1,getOwnPropertyDescriptor(e,t){if(!e.exclude.includes(t))return t in e.props?{enumerable:!0,configurable:!0,value:e.props[t]}:void 0},has:(e,t)=>!e.exclude.includes(t)&&t in e.props,ownKeys:e=>Reflect.ownKeys(e.props).filter(t=>!e.exclude.includes(t))};function zr(e,t,n){return new Proxy({props:e,exclude:t},Wr)}function Xr(e,t,n,r){var i,o=r,a=!0,s=()=>(a&&(a=!1,o=r),o);void 0===e[t]&&void 0!==r&&s(),i=()=>{var n=e[t];return void 0===n?s():(a=!0,n)};var l=!1,c=vt(()=>(l=!1,i())),u=Ft;return function(e,t){if(arguments.length>0){const n=t?sn(c):e;return xt(c,n),l=!0,void 0!==o&&(o=n),e}return Nt&&l||0!==(u.f&E)?c.v:sn(c)}}class Kr{#Q;#ee;constructor(e){var t=new Map,n=(e,n)=>{var r=Ct(n,!1,!1);return t.set(e,r),r};const r=new Proxy({...e.props||{},$$events:{}},{get:(e,r)=>sn(t.get(r)??n(r,Reflect.get(e,r))),has:(e,r)=>r===M||(sn(t.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r)),set:(e,r,i)=>(xt(t.get(r)??n(r,i),i),Reflect.set(e,r,i))});this.#ee=(e.hydrate?lr:sr)(e.component,{target:e.target,anchor:e.anchor,props:r,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError}),e?.props?.$$host&&!1!==e.sync||nt(),this.#Q=r.$$events;for(const e of Object.keys(this.#ee))"$set"!==e&&"$destroy"!==e&&"$on"!==e&&a(this,e,{get(){return this.#ee[e]},set(t){this.#ee[e]=t},enumerable:!0});this.#ee.$set=e=>{Object.assign(r,e)},this.#ee.$destroy=()=>{!function(e,t){const n=fr.get(e);n?(fr.delete(e),n(t)):Promise.resolve()}(this.#ee)}}$set(e){this.#ee.$set(e)}$on(e,t){this.#Q[e]=this.#Q[e]||[];const n=(...e)=>t.call(this,...e);return this.#Q[e].push(n),()=>{this.#Q[e]=this.#Q[e].filter(e=>e!==n)}}$destroy(){this.#ee.$destroy()}}let Qr=class{};function ei(e,t,n,r){const i=n[e]?.type;if(t="Boolean"===i&&"boolean"!=typeof t?null!=t:t,!r||!n[e])return t;if("toAttribute"===r)switch(i){case"Object":case"Array":return null==t?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return null==t?null:t;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":default:return t;case"Number":return null!=t?+t:t}}function ti(e,t,n,r,i,l){let c=class extends Qr{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return o(t).map(e=>(t[e].attribute||e).toLowerCase())}};return o(t).forEach(e=>{a(c.prototype,e,{get(){return this.$$c&&e in this.$$c?this.$$c[e]:this.$$d[e]},set(n){n=ei(e,n,t),this.$$d[e]=n;var r=this.$$c;if(r){var i=s(r,e)?.get;i?r[e]=n:r.$set({[e]:n})}}})}),r.forEach(e=>{a(c.prototype,e,{get(){return this.$$c?.[e]}})}),e.element=c,c}"function"==typeof HTMLElement&&(Qr=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){const e=this.$$l_u.get(t);e&&(e(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(e){return t=>{const n=Ie("slot");"default"!==e&&(n.name=e),Kn(t,n)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const n={},r=function(e){const t={};return e.childNodes.forEach(e=>{t[e.slot||"default"]=!0}),t}(this);for(const e of this.$$s)e in r&&("default"!==e||this.$$d.children?n[e]=t(e):(this.$$d.children=t(e),n.default=!0));for(const e of this.attributes){const t=this.$$g_p(e.name);t in this.$$d||(this.$$d[t]=ei(t,e.value,this.$$p_d,"toProp"))}for(const e in this.$$p_d)e in this.$$d||void 0===this[e]||(this.$$d[e]=this[e],delete this[e]);this.$$c=(e={component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:n,$$host:this}},new Kr(e)),this.$$me=function(e){tt.ensure();const t=dn(524352,e);return()=>{Sn(t)}}(()=>{yn(()=>{this.$$r=!0;for(const e of o(this.$$c)){if(!this.$$p_d[e]?.reflect)continue;this.$$d[e]=this.$$c[e];const t=ei(e,this.$$d[e],this.$$p_d,"toAttribute");null==t?this.removeAttribute(this.$$p_d[e].attribute||e):this.setAttribute(this.$$p_d[e].attribute||e,t)}this.$$r=!1})});for(const e in this.$$l)for(const t of this.$$l[e]){const n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}this.$$l={}}var e}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=ei(e,n,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return o(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});var ni=Jn('<div class="altcha-checkbox"><input/> <svg aria-hidden="true" width="12" height="9" viewBox="0 0 12 9"><polyline points="1 5 4 8 11 1"></polyline></svg> <div class="altcha-spinner altcha-checkbox-spinner" aria-hidden="true"></div></div>');function ri(e,t){X(t,!0);let n,r=Xr(t,"loading"),i=zr(t,["$$slots","$$events","$$legacy","$$host","loading"]);var o={get loading(){return r()},set loading(e){r(e),nt()}},a=ni(),s=Se(a);Ur(s,()=>({type:"checkbox",...i}),void 0,void 0,void 0,0,!0),Zr(s,e=>n=e,()=>n);var l=xe(s,2);return ue(2),ce(a),bn(()=>jr(a,"data-loading",r())),Un("click",l,function(){n?.click()}),Kn(e,a),K(o)}Fn(["click"]),ti(ri,{loading:{}},[],[],{mode:"open"});var ii=Jn('<div class="altcha-checkbox-native"><input/> <div class="altcha-spinner altcha-checkbox-native-spinner"></div></div>');function oi(e,t){X(t,!0);let n=Xr(t,"loading"),r=zr(t,["$$slots","$$events","$$legacy","$$host","loading"]);var i={get loading(){return n()},set loading(e){n(e),nt()}},o=ii();return Ur(Se(o),()=>({type:"checkbox",...r}),void 0,void 0,void 0,0,!0),ue(2),ce(o),bn(()=>jr(o,"data-loading",n())),Kn(e,o),K(i)}ti(oi,{loading:{}},[],[],{mode:"open"});var ai=Jn('<div><a target="_blank" class="altcha-logo" aria-hidden="true" tabindex="-1"><svg width="22" height="22" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.33955 16.4279C5.88954 20.6586 12.1971 21.2105 16.4279 17.6604C18.4699 15.947 19.6548 13.5911 19.9352 11.1365L17.9886 10.4279C17.8738 12.5624 16.909 14.6459 15.1423 16.1284C11.7577 18.9684 6.71167 18.5269 3.87164 15.1423C1.03163 11.7577 1.4731 6.71166 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577C16.9767 5.86872 17.5322 7.02798 17.804 8.2324L19.9522 9.01429C19.7622 7.07737 19.0059 5.17558 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956C-0.658625 5.88958 -1.21046 12.1971 2.33955 16.4279Z" fill="currentColor"></path><path d="M3.57212 2.33956C1.65755 3.94607 0.496389 6.11731 0.12782 8.40523L2.04639 9.13961C2.26047 7.15832 3.21057 5.25375 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577L13.8302 6.78606L19.9633 9.13364C19.7929 7.15555 19.0335 5.20847 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956Z" fill="currentColor"></path><path d="M7 10H5C5 12.7614 7.23858 15 10 15C12.7614 15 15 12.7614 15 10H13C13 11.6569 11.6569 13 10 13C8.3431 13 7 11.6569 7 10Z" fill="currentColor"></path></svg></a></div>');function si(e,t){X(t,!0);let n=Xr(t,"strings");var r={get strings(){return n()},set strings(e){n(e),nt()}},i=ai(),o=Se(i);return jr(o,"href","https://altcha.org"),ce(i),bn(()=>jr(o,"aria-label",n().ariaLinkLabel)),Kn(e,i),K(r)}ti(si,{strings:{}},[],[],{mode:"open"});var li=Jn('<div class="altcha-footer"><p></p> <!></div>');function ci(e,t){X(t,!0);let n=Xr(t,"logo"),r=Xr(t,"strings");var i={get logo(){return n()},set logo(e){n(e),nt()},get strings(){return r()},set strings(e){r(e),nt()}},o=li(),a=Se(o);gr(a,()=>r().footer,!0),ce(a);var s=xe(a,2),l=e=>{si(e,{get strings(){return r()}})};return vr(s,e=>{n()&&e(l)}),ce(o),Kn(e,o),K(i)}ti(ci,{logo:{},strings:{}},[],[],{mode:"open"});var ui=Jn('<div class="altcha-switch"><input/> <div class="altcha-switch-toggle"><div class="altcha-spinner altcha-switch-spinner"></div></div></div>');function fi(e,t){X(t,!0);let n,r=Xr(t,"loading"),i=zr(t,["$$slots","$$events","$$legacy","$$host","loading"]);var o={get loading(){return r()},set loading(e){r(e),nt()}},a=ui(),s=Se(a);Ur(s,()=>({type:"checkbox",...i}),void 0,void 0,void 0,0,!0),Zr(s,e=>n=e,()=>n);var l=xe(s,2);return ce(a),bn(()=>jr(a,"data-loading",r())),Un("click",l,function(){n?.click()}),Kn(e,a),K(o)}Fn(["click"]),ti(fi,{loading:{}},[],[],{mode:"open"});var di=(e=>(e.ERROR="error",e.LOADING="loading",e.PLAYING="playing",e.PAUSED="paused",e.READY="ready",e))(di||{}),hi=(e=>(e.CODE="code",e.ERROR="error",e.VERIFIED="verified",e.VERIFYING="verifying",e.UNVERIFIED="unverified",e.EXPIRED="expired",e))(hi||{}),vi=Jn('<div class="altcha-code-challenge-title"> </div>'),pi=Jn('<div class="altcha-spinner"></div>'),gi=Wn('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12.8659 3.00017L22.3922 19.5002C22.6684 19.9785 22.5045 20.5901 22.0262 20.8662C21.8742 20.954 21.7017 21.0002 21.5262 21.0002H2.47363C1.92135 21.0002 1.47363 20.5525 1.47363 20.0002C1.47363 19.8246 1.51984 19.6522 1.60761 19.5002L11.1339 3.00017C11.41 2.52187 12.0216 2.358 12.4999 2.63414C12.6519 2.72191 12.7782 2.84815 12.8659 3.00017ZM10.9999 16.0002V18.0002H12.9999V16.0002H10.9999ZM10.9999 9.00017V14.0002H12.9999V9.00017H10.9999Z"></path></svg>'),mi=Wn('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M15 7C15 6.44772 15.4477 6 16 6C16.5523 6 17 6.44772 17 7V17C17 17.5523 16.5523 18 16 18C15.4477 18 15 17.5523 15 17V7ZM7 7C7 6.44772 7.44772 6 8 6C8.55228 6 9 6.44772 9 7V17C9 17.5523 8.55228 18 8 18C7.44772 18 7 17.5523 7 17V7Z"></path></svg>'),yi=Wn('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M4 12H7C8.10457 12 9 12.8954 9 14V19C9 20.1046 8.10457 21 7 21H4C2.89543 21 2 20.1046 2 19V12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12V19C22 20.1046 21.1046 21 20 21H17C15.8954 21 15 20.1046 15 19V14C15 12.8954 15.8954 12 17 12H20C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12Z"></path></svg>'),bi=Jn('<button type="button" class="altcha-button altcha-button-secondary"><!></button>'),wi=Jn('<audio hidden="" autoplay=""></audio>'),_i=Jn('<div class="altcha-code-challenge"><form data-code-challenge="true"><!> <div class="altcha-code-challenge-text"> </div> <img class="altcha-code-challenge-image" alt=""/> <div class="altcha-code-challenge-row"><input type="text" class="altcha-input" autocomplete="off" name="" required=""/> <!> <button type="button" class="altcha-button altcha-button-secondary"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2V4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 9.25022 5.38734 6.82447 7.50024 5.38451L7.5 8H9.5V2L3.5 2V4L5.99918 3.99989C3.57075 5.82434 2 8.72873 2 12Z"></path></svg></button></div> <div class="altcha-code-challenge-buttons"><button type="submit" class="altcha-button"> </button> <button type="button" class="altcha-button altcha-button-secondary"> </button></div></form> <!></div>');function $i(e,t){X(t,!0);let n=Xr(t,"audioUrl"),r=Xr(t,"codeChallenge"),i=Xr(t,"config"),o=Xr(t,"imageUrl"),a=Xr(t,"onCancel"),s=Xr(t,"onReload"),l=Xr(t,"onSubmit"),c=Xr(t,"strings"),u=St(void 0),f=St(void 0),d=St(void 0),h=St(!1),v=St(""),p=St(!1);function g(){xt(u,di.PAUSED,!0)}function m(e){xt(u,di.ERROR,!0)}function y(){xt(u,di.READY,!0)}function b(){xt(u,di.LOADING,!0)}function w(){xt(u,di.PLAYING,!0)}function _(){xt(u,di.PAUSED,!0)}function $(){sn(f)?sn(u)===di.LOADING||(sn(f).paused?(n()&&sn(f).src!==n()&&(sn(f).src=n()),sn(f).currentTime=0,sn(f).play()):sn(f).pause()):(xt(p,!0),requestAnimationFrame(()=>{sn(f)&&n()&&(sn(f).src=n(),sn(f).play())}))}hr(()=>(i().disableAutoFocus||an().then(()=>{sn(d)?.focus()}),()=>{sn(f)&&(sn(f).pause(),xt(f,void 0))}));var k={get audioUrl(){return n()},set audioUrl(e){n(e),nt()},get codeChallenge(){return r()},set codeChallenge(e){r(e),nt()},get config(){return i()},set config(e){i(e),nt()},get imageUrl(){return o()},set imageUrl(e){o(e),nt()},get onCancel(){return a()},set onCancel(e){a(e),nt()},get onReload(){return s()},set onReload(e){s(e),nt()},get onSubmit(){return l()},set onSubmit(e){l(e),nt()},get strings(){return c()},set strings(e){c(e),nt()}},E=_i(),S=Se(E),C=Se(S),x=e=>{var t=vi(),n=Se(t,!0);ce(t),bn(()=>ar(n,c().verificationRequired)),Kn(e,t)};vr(C,e=>{"standard"!==i().codeChallengeDisplay&&e(x)});var I=xe(C,2),O=Se(I,!0);ce(I);var T=xe(I,2),A=xe(T,2),R=Se(A);Dr(R),R.disabled=sn(h),Zr(R,e=>xt(d,e),()=>sn(d));var P=xe(R,2),M=e=>{var t=bi(),n=Se(t),r=e=>{Kn(e,pi())},i=e=>{Kn(e,gi())},o=e=>{Kn(e,mi())},a=e=>{Kn(e,yi())};vr(n,e=>{sn(u)===di.LOADING?e(r):sn(u)===di.ERROR?e(i,1):sn(u)===di.PLAYING?e(o,2):e(a,-1)}),ce(t),bn(()=>{jr(t,"title",c().getAudioChallenge),t.disabled=sn(u)===di.LOADING||sn(u)===di.ERROR,jr(t,"aria-label",sn(u)===di.LOADING?c().loading:c().getAudioChallenge)}),jn("click",t,()=>$(),!0),Kn(e,t)};vr(P,e=>{r().audio&&e(M)});var L=xe(P,2);ce(A);var N=xe(A,2),D=Se(N),V=Se(D,!0);ce(D);var j=xe(D,2),U=Se(j,!0);ce(j),ce(N),ce(S);var F=xe(S,2),q=e=>{var t=wi();Zr(t,e=>xt(f,e),()=>sn(f)),jn("error",t,m),jn("loadstart",t,b),jn("canplay",t,y),jn("pause",t,_),jn("playing",t,w),jn("ended",t,g),Kn(e,t)};return vr(F,e=>{sn(p)&&e(q)}),ce(E),bn(()=>{ar(O,c().enterCodeFromImage),jr(T,"src",o()),jr(R,"minlength",r().length||1),jr(R,"maxlength",r().length),jr(R,"placeholder",c().enterCode),jr(R,"aria-label",sn(u)===di.LOADING?c().loading:sn(u)===di.PLAYING?"":c().enterCodeAria),jr(R,"aria-live",sn(u)?"assertive":"polite"),jr(R,"aria-busy",sn(u)===di.LOADING),jr(L,"title",c().reload),jr(L,"aria-label",c().reload),jr(D,"aria-label",c().verify),ar(V,c().verify),jr(j,"aria-label",c().cancel),ar(U,c().cancel)}),jn("submit",S,function(e){e.preventDefault(),e.stopPropagation(),l()?.(sn(v))},!0),Un("keydown",R,function(e){"Space"===e.code?(e.preventDefault(),e.stopPropagation(),$()):"Escape"===e.code&&(e.preventDefault(),e.stopPropagation(),a()?.())}),Gr(R,()=>sn(v),e=>xt(v,e)),jn("click",L,()=>s()?.(),!0),jn("click",j,()=>a()?.(),!0),Kn(e,E),K(k)}Fn(["keydown"]),ti($i,{audioUrl:{},codeChallenge:{},config:{},imageUrl:{},onCancel:{},onReload:{},onSubmit:{},strings:{}},[],[],{mode:"open"});var ki=Jn('<div class="altcha-popover-backdrop" data-backdrop=""></div>'),Ei=Jn('<div class="altcha-popover-arrow"></div>'),Si=Jn('<div role="button" class="altcha-popover-close">×</div>'),Ci=Jn('<!> <div><!> <!> <div class="altcha-popover-content"><!></div></div>',1);function xi(e,t){X(t,!0);let n=Xr(t,"anchor"),r=Xr(t,"children"),i=Xr(t,"display",0,"standard"),o=Xr(t,"backdrop",0,!1),a=Xr(t,"onClickOutside"),s=Xr(t,"onClickOutsideDelay",0,600),l=Xr(t,"onClose"),c=Xr(t,"placement",0,"auto"),u=Xr(t,"updateUISignal"),f=Xr(t,"variant",0,"neutral"),d=zr(t,["$$slots","$$events","$$legacy","$$host","anchor","children","display","backdrop","onClickOutside","onClickOutsideDelay","onClose","placement","updateUISignal","variant"]),v=St(void 0),p=St(void 0),g=St(!1),m=St(0);function y(){l()?.()}function b(){if(n()&&"auto"===c()&&sn(v)){const e=n().getBoundingClientRect(),t=document.documentElement.clientHeight-(e.top+e.height)<sn(v).clientHeight;sn(g)!==t&&xt(g,t)}}pn(()=>{"auto"!==c()&&xt(g,"top"===c())}),pn(()=>{u()&&b()}),hr(()=>{const e="bottomsheet"===i()||"overlay"===i();return e&&(sn(p)&&document.body.append(sn(p)),sn(v)&&document.body.append(sn(v))),b(),an().then(()=>{xt(m,Date.now(),!0)}),()=>{e&&(sn(p)&&document.body.removeChild(sn(p)),sn(v)&&document.body.removeChild(sn(v)))}});var w={get anchor(){return n()},set anchor(e){n(e),nt()},get children(){return r()},set children(e){r(e),nt()},get display(){return i()},set display(e="standard"){i(e),nt()},get backdrop(){return o()},set backdrop(e=!1){o(e),nt()},get onClickOutside(){return a()},set onClickOutside(e){a(e),nt()},get onClickOutsideDelay(){return s()},set onClickOutsideDelay(e=600){s(e),nt()},get onClose(){return l()},set onClose(e){l(e),nt()},get placement(){return c()},set placement(e="auto"){c(e),nt()},get updateUISignal(){return u()},set updateUISignal(e){u(e),nt()},get variant(){return f()},set variant(e="neutral"){f(e),nt()}},_=Ci();jn("click",ge,function(e){const t=e.target;sn(v)?.contains(t)||s()&&!(sn(m)+s()<Date.now())||a()?.()},!0),jn("resize",ge,function(){b()}),jn("scroll",ge,function(){b()});var $=Ce(_),k=e=>{var t=ki();Zr(t,e=>xt(p,e),()=>sn(p)),Kn(e,t)};vr($,e=>{o()&&e(k)});var E=xe($,2);Ur(E,()=>({...d,class:`altcha-popover ${(t.class||"")??""}`,"data-popover":!0,"data-variant":f(),"data-top":sn(g),"data-display":i()}));var S=Se(E),C=e=>{Kn(e,Ei())};vr(S,e=>{"standard"===i()&&e(C)});var I=xe(S,2),O=e=>{var t=Si();jn("click",t,y,!0),Kn(e,t)};vr(I,e=>{"standard"!==i()&&e(O)});var T=xe(I,2);return function(e,t,...n){var r=new dr(e);wn(()=>{const e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},x)}(Se(T),()=>r()??h),ce(T),ce(E),Zr(E,e=>xt(v,e),()=>sn(v)),Kn(e,_),K(w)}async function Ii(e){const{challenge:t,concurrency:n=navigator.hardwareConcurrency,controller:r=new AbortController,createWorker:i,onOutOfMemory:o=e=>e>1?Math.floor(e/2):0,counterMode:a,timeout:s=9e4}=e,l=Math.min(16,Math.max(1,n)),c=[],u=()=>{for(const e of c)e.terminate()};for(let e=0;e<l;e++)c.push(await i(t.parameters.algorithm));let f=null;try{f=await Promise.race(c.map((e,n)=>(r.signal.addEventListener("abort",()=>{e.postMessage({type:"abort"})}),new Promise((r,i)=>{e.addEventListener("error",e=>{i(e)}),e.addEventListener("message",t=>{if(t.data){for(const t of c)t!==e&&t.postMessage({type:"abort"});if(t.data.error)return i(new Error(t.data.error))}r(t.data)}),e.postMessage({challenge:t,counterMode:a,counterStart:n,counterStep:l,timeout:s,type:"work"})}))))}catch(n){if(n instanceof Error&&!!n?.message?.includes("Out of memory")&&o){u();const n=o(l);if(n)return Ii({...e,challenge:t,controller:r,concurrency:n,createWorker:i})}throw n}finally{u()}return r.signal.aborted?null:f||null}ti(xi,{anchor:{},children:{},display:{},backdrop:{},onClickOutside:{},onClickOutsideDelay:{},onClose:{},placement:{},updateUISignal:{},variant:{}},[],[],{mode:"open"});class Oi{TAG_CODES={INPUT:1,TEXTAREA:2,SELECT:3,BUTTON:4,A:5,DETAILS:6,SUMMARY:7,IFRAME:8,VIDEO:9,AUDIO:10};maxSamples;sampleInterval;target;focusStartTime=0;focusInteraction=0;focusInteractionTimer=null;lastPointerSample=0;lastTouchSample=0;lastScrollSample=0;pendingPointer=null;pendingTouch=null;focus=[];pointer=[];scroll=[];touch=[];constructor(e={}){const{maxSamples:t=60,sampleInterval:n=50,target:r=window}=e;this.maxSamples=t,this.sampleInterval=n,this.target=r,this.attach()}destroy(){const e={capture:!0};this.target.removeEventListener("focusin",this.onFocus,e),this.target.removeEventListener("keydown",this.onInteraction,e),this.target.removeEventListener("pointerdown",this.onInteraction,e),this.target.removeEventListener("pointermove",this.onPointer,e),this.target.removeEventListener("scroll",this.onScroll,e),this.target.removeEventListener("touchmove",this.onTouchMove,e)}export(){return{focus:this.focus,maxTouchPoints:navigator.maxTouchPoints||0,pointer:this.pointer,scroll:this.scroll,time:Date.now(),touch:this.touch}}attach(){const e={passive:!0,capture:!0};this.target.addEventListener("focusin",this.onFocus,e),this.target.addEventListener("keydown",this.onInteraction,e),this.target.addEventListener("pointerdown",this.onInteraction,e),this.target.addEventListener("pointermove",this.onPointer,e),this.target.addEventListener("scroll",this.onScroll,e),this.target.addEventListener("touchmove",this.onTouchMove,e)}evict(e){e.length>this.maxSamples&&e.splice(0,e.length-this.maxSamples)}onFocus=e=>{if(2===this.focusInteraction)return;const t=e.target;if(!(t instanceof Element))return;const n=performance.now();0===this.focusStartTime&&(this.focusStartTime=n),this.focus.push([Math.round(n-this.focusStartTime),t.tabIndex,this.TAG_CODES[t.tagName]??0,this.focusInteraction?1:0]),this.evict(this.focus)};onInteraction=e=>{this.focusInteraction="keyCode"in e?1:2,this.focusInteractionTimer&&clearTimeout(this.focusInteractionTimer),this.focusInteractionTimer=setTimeout(()=>{this.focusInteraction=0},100)};onPointer=e=>{if("touch"===e.pointerType)return;const t=e.timeStamp||performance.now();this.pendingPointer=[Math.round(e.clientX),Math.round(e.clientY),Math.round(t)],t-this.lastPointerSample>=this.sampleInterval&&(this.pointer.push(this.pendingPointer),this.lastPointerSample=t,this.pendingPointer=null,this.evict(this.pointer))};onScroll=()=>{const e=performance.now();e-this.lastScrollSample<this.sampleInterval||(this.scroll.push([Math.round(window.scrollY),Math.round(e)]),this.lastScrollSample=e,this.evict(this.scroll))};onTouchMove=e=>{const t=e.timeStamp||performance.now(),n=e.touches[0];n&&(this.pendingTouch=[Math.round(n.clientX),Math.round(n.clientY),Math.round(t),Math.round(1e3*n.force)/1e3,Math.round(n.radiusX||0),Math.round(n.radiusY||0)],t-this.lastTouchSample>=this.sampleInterval&&(this.touch.push(this.pendingTouch),this.lastTouchSample=t,this.pendingTouch=null,this.evict(this.touch)))}}var Ti=Jn('<div class="altcha-overlay-backdrop" data-backdrop=""></div>'),Ai=Jn('<div class="altcha-overlay-content"></div>'),Ri=Jn('<div role="button" class="altcha-overlay-close">×</div> <!>',1),Pi=Jn('<div class="altcha-floating-arrow"></div>'),Mi=Jn('<input type="hidden"/>'),Li=Jn('<div class="altcha-error">Secure context (HTTPS) required.</div>'),Ni=Jn('<div class="altcha-error"> </div>'),Di=Jn('<div class="altcha-error"> </div>'),Vi=Jn("<!> <!>",1),ji=Jn('<!> <div class="altcha"><!> <div class="altcha-main"><div><div class="altcha-checkbox-wrap"><!> <label><!></label></div> <!></div> <!> <!> <!></div> <!></div>',1);"undefined"!=typeof window&&window.customElements&&customElements.define("altcha-widget",ti(function(e,t){X(t,!0);const[n,r]=function(){const e={};return[e,function(){vn(()=>{for(var t in e)e[t].unsubscribe();a(e,Fe,{enumerable:!1,value:!0})})}]}(),i=["ar","fa","he","ur"],{isSecureContext:o}=globalThis,{store:s}=globalThis.$altcha.defaults,l=navigator.hardwareConcurrency||2,c=navigator.deviceMemory||0,u=c&&c<=4?Math.min(4,l):l,f=globalThis.$altcha.i18n.store,d=t.$$host,h=(e,t)=>{an().then(()=>{d?.dispatchEvent(new CustomEvent(e,{detail:t}))})};let v=null,p=St(he(new URL(location.origin))),g=St(!1),m=St(null),y=St(null),b=St(null),w=St(he(hi.UNVERIFIED)),_=St(void 0),$=St(void 0),k=St(null),E=St(void 0),S=St(null),C=St(null),I=St(null),O=St(null),T=St(he([])),A=St(0),R=St(he({})),P=St(!0);const M=mt(()=>({fetch:(e,t)=>fetch(e,t),audioChallengeLanguage:"",auto:"off",barPlacement:"bottom",challenge:"",codeChallenge:null,codeChallengeDisplay:"standard",credentials:null,debug:!1,disableAutoFocus:!1,display:"standard",floatingAnchor:"",floatingOffset:8,floatingPersist:!1,floatingPlacement:"auto",hideFooter:!1,hideLogo:!1,humanInteractionSignature:!0,language:"",mockError:!1,minDuration:500,overlayContent:"",name:"altcha",popoverPlacement:"auto",retryOnOutOfMemoryError:!0,setCookie:null,serverVerificationFields:!1,serverVerificationTimeZone:!1,test:!1,timeout:9e4,type:"checkbox",validationMessage:"",verifyFunction:null,verifyUrl:"",workers:u,...qe(s,"$altchaDefaults",n),...sn(R)})),L=mt(()=>`altcha-checkbox-${t.id||Math.floor(1e12*Math.random()).toString(16)}`),N=mt(()=>function(e){switch(e){case"checkbox":return ri;case"switch":return fi;default:return oi}}(sn(M).type)),D=mt(()=>sn(M).auto),V=mt(()=>sn(w)===hi.VERIFYING),j=mt(()=>!sn(M).hideFooter),U=mt(()=>!sn(M).hideLogo&&"bar"!==sn(M).display),F=mt(()=>function(e,t){const n=Object.keys(e).map(e=>e.toLowerCase());let r=t.reduce((t,r)=>(r=r.toLowerCase(),t||(e[r]?r:null)||n.find(e=>r.split("-")[0]===e.split("-")[0])||null),null);e[r||""]||(r="en");return{language:r,strings:e[r]}}(qe(f,"$altchaI18nStore",n),[sn(M).language,document.documentElement.lang,...navigator.languages])),q=mt(()=>i.includes(sn(F).language)?"rtl":void 0),H=mt(()=>({...sn(F).strings})),G=mt(()=>sn(m)?.audio?.match(/^(https?:)?\//)?Q(sn(m).audio,sn(p),{language:sn(M).audioChallengeLanguage||sn(F).language}).toString():sn(m)?.audio),Y=mt(()=>sn(m)?.image?.match(/^(https?:)?\//)?Q(sn(m).image,sn(p)):sn(m)?.image);async function B(e,...t){let n;for(const r of sn(T))n=await r[e].call(r,...t);return n}async function J(e){await new Promise(t=>setTimeout(t,e))}async function Z(e=sn(M).challenge,t){const n=await B("onFetchChallenge",e);let r=null;if(void 0!==n)return n;if("string"==typeof e)if(e.startsWith("{")){ke("parsing JSON challenge");try{r=JSON.parse(e)}catch{throw new Error("Unable to parse JSON challenge.")}}else{ke("fetching challenge from",t?.method||"GET",e),xt(p,new URL(e,location.origin),!0);const n=await sn(M).fetch(e,{credentials:sn(M).credentials||void 0,...t});await be(n);const i=n.headers.get("x-altcha-config");i&&function(e){try{const t=JSON.parse(e);t&&"object"==typeof t&&_e({serverVerificationFields:t?.sentinel?.fields,serverVerificationTimeZone:t?.sentinel?.timeZone,verifyUrl:t.verifyurl,...t})}catch(e){ke("unable to configure from x-altcha-config header",e)}}(i);const o=await n.json();if(o&&"his"in o&&o.his){if(ke("requested HIS"),!v)throw new Error("Server requested HIS data but collector is disabled.");return Z(Q(o.his.url,sn(p)),{body:JSON.stringify({his:v.export()}),headers:{"content-type":"application/json"},method:"POST"})}o&&"hisResult"in o&&o.hisResult&&ke("HIS result",o.hisResult),r=o}else if(e&&"object"==typeof e)try{r=JSON.parse(JSON.stringify(e))}catch{throw new Error("Unable to parse JSON challenge.")}if(function(e){return"object"==typeof e&&"challenge"in e}(r)&&(r=function(e){const[t,n]=e.salt.split("?"),r={};if(n)try{Object.assign(r,Object.fromEntries(new URLSearchParams(n).entries()))}catch{}const i={codeChallenge:e.codeChallenge,parameters:{algorithm:e.algorithm,cost:1,data:r,expiresAt:r?.expires?parseInt(r.expires,10):void 0,keyLength:"SHA-512"===e.algorithm?64:"SHA-384"===e.algorithm?48:32,nonce:(o=(new TextEncoder).encode(e.salt),Array.from(new Uint8Array(o)).map(e=>e.toString(16).padStart(2,"0")).join("")),keyPrefix:e.challenge,salt:""},signature:e.signature};var o;return Object.defineProperties(i,{_originalSalt:{enumerable:!1,value:e.salt,writable:!1},_version:{enumerable:!1,value:1,writable:!1}}),i}(r)),!function(e){return!!e&&"object"==typeof e&&"parameters"in e&&!!e.parameters&&"object"==typeof e.parameters&&"algorithm"in e.parameters&&"nonce"in e.parameters&&"salt"in e.parameters&&"keyPrefix"in e.parameters}(r))throw new Error("Challenge validation failed.");return r}function W(){return document.getElementById(sn(L))}function z(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function Q(e,t,n){const r=new URL(e,t);if(r.search||(r.search=t.search),n)for(const e in n)void 0!==n[e]&&null!==n[e]&&r.searchParams.set(e,n[e]);return r.toString()}function ee(e){!sn(g)&&e.currentTarget.checked?(e.preventDefault(),e.currentTarget.checked=!1,sn(w)!==hi.VERIFYING&&Ae()):e.currentTarget.checked||(e.preventDefault(),Ee())}function te(e){sn(w)===hi.VERIFYING?e.currentTarget.setCustomValidity(sn(H).waitAlert):sn(M).validationMessage&&e.currentTarget.setCustomValidity(sn(M).validationMessage)}function ne(){ye(sn(M).display),Ee()}function re(e){"onfocus"===sn(D)&&sn(w)===hi.UNVERIFIED&&Ae()}function ue(){ye(sn(M).display),Ee()}function ve(e){const t=e.target;"true"!==t?.getAttribute("data-code-challenge")&&"onsubmit"===sn(D)&&sn(w)===hi.UNVERIFIED&&(e.preventDefault(),e.stopPropagation(),xt(S,e.submitter,!0),Oe(),Ae().then(e=>{e&&!sn(m)&&an().then(()=>{pe(sn(S))})}))}function pe(e){sn(k)&&"requestSubmit"in sn(k)?sn(k).requestSubmit(e):sn(k)?.reportValidity()&&(e?e.click():sn(k).submit())}function ye(e){switch(e){case"bar":case"floating":case"overlay":$e(),sn(D)&&"off"!==sn(D)||(sn(R).auto="onsubmit");break;case"standard":Oe()}sn(b)!==e&&xt(b,e,!0)}async function be(e){if(e.status>=400){if(e.headers.get("content-type")?.includes("/json")){let t;try{t=await e.json()}catch{}if(t&&"error"in t)throw new Error(`Server responded with ${e.status} - ${t.error}`)}throw new Error(`Server responded with ${e.status}.`)}const t=e.headers.get("content-type");if(!t||!t.includes("/json"))throw new Error(`Server responded with invalid content-type. Expected application/json, received ${t}.`)}async function we(e){if(!sn(O))return void Ie(hi.ERROR,"Cannot verify code challenge without PoW payload.");Ie(hi.VERIFYING);let t=null;if(sn(M).verifyUrl)t=await async function(e,t){const n=await B("onRequestServerVerification",e,t);if(void 0!==n)return n;if(ke("requesting server verification from",sn(M).verifyUrl),!sn(M).verifyUrl)throw new Error("Parameter verifyUrl must be set for server verification.");const r=await sn(M).fetch(Q(sn(M).verifyUrl,sn(p)),{body:JSON.stringify({code:t,fields:sn(M).serverVerificationFields?[...sn(k)?.querySelectorAll('input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])')||[]].reduce((e,t)=>{const n=t.name,r=t.value;return n&&r&&(e[n]=/\n/.test(r)?r.replace(new RegExp("(?<!\\r)\\n","g"),"\r\n"):r),e},{}):void 0,payload:e,timeZone:sn(M).serverVerificationTimeZone?z():void 0}),credentials:sn(M).credentials||void 0,headers:{"Content-Type":"application/json"},method:"POST"});await be(r);const i=await r.json();return i&&"object"==typeof i&&"payload"in i&&i.payload&&h("serververification",i),i}(sn(O),e);else{if(!sn(M).verifyFunction)return void Ie(hi.ERROR,"Parameter verifyUrl is required for code challenge verification.");t=await sn(M).verifyFunction(sn(O),e)}t?.payload&&(xt(O,t.payload,!0),ke("server payload",sn(O))),!0===t?.verified?(ke("verified"),Ie(hi.VERIFIED),h("verified",{payload:sn(O)}),"onsubmit"===sn(D)&&an().then(()=>{pe(sn(S))})):Ie(hi.ERROR,t?.reason||"Verification failed."),sn(M).disableAutoFocus||W()?.focus()}function _e(e){Object.assign(sn(R),{...Object.fromEntries(Object.entries(e).filter(([e,t])=>void 0!==t))})}function $e(){xt(P,!1)}function ke(...e){(sn(M).debug||e.some(e=>e instanceof Error))&&console[e[0]instanceof Error?"error":"log"]("ALTCHA",`[name=${sn(M).name}]`,...e)}function Ee(e=hi.UNVERIFIED,t=null){xt(g,!1),xt(C,t,!0),xt(O,null),sn(y)&&sn(y).abort(),sn(I)&&(clearTimeout(sn(I)),xt(I,null)),Ie(e)}function Ie(e,t=null){xt(w,e,!0),xt(C,t,!0),h("statechange",{payload:sn(O),state:sn(w)})}function Oe(){xt(P,!0),an().then(()=>{Te()})}function Te(){if("floating"===sn(M).display)return function(e=20){if(!sn(E))return;const t=sn(M).floatingPlacement;if(!sn($)&&(xt($,(sn(M).floatingAnchor instanceof HTMLElement?sn(M).floatingAnchor:sn(M).floatingAnchor?document.querySelector(sn(M).floatingAnchor):sn(k)?.querySelector('input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])'))||sn(k),!0),!sn($)))return void ke("unable to find floating anchor element");const n=parseInt(sn(M).floatingOffset,10)||12,r=sn($).getBoundingClientRect(),i=sn(E).getBoundingClientRect(),o=document.documentElement.clientHeight,a=document.documentElement.clientWidth,s=t&&"auto"!==t?"top"===t:r.bottom+i.height+n+e>o,l=Math.max(e,Math.min(a-e-i.width,r.left+r.width/2-i.width/2));if(sn(E).style.setProperty("--altcha-floating-left",`${l}px`),sn(E).style.setProperty("--altcha-floating-top",s?r.top-(i.height+n)+"px":`${r.bottom+n}px`),sn(E).setAttribute("data-floating-position",s?"top":"bottom"),sn(_)){const e=sn(_).getBoundingClientRect();sn(_).style.left=r.left-l+r.width/2-e.width/2+"px"}}();xt(A,sn(A)+1)}async function Ae(e={}){const{concurrency:t=Math.max(1,sn(M).workers),controller:n=new AbortController,minDuration:r=sn(M).minDuration}=e,i=performance.now();let a=null,s=null,l=!1;const c=await B("onVerify",e);if(void 0!==c)return c;Ee(hi.VERIFYING),xt(y,n,!0);try{if(!o)throw new Error("Secure context (HTTPS) required.");if(sn(M).mockError)throw new Error("Mock error.");if(sn(M).test)return ke("running test mode with null challenge"),await J(Math.max(0,r-(performance.now()-i))),sn(y)?.signal.aborted?(Ee(),null):(xt(O,btoa(JSON.stringify({challenge:null,solution:null,test:!0})),!0),ke("verified"),Ie(hi.VERIFIED),h("verified",{payload:sn(O)}),{payload:sn(O)});if(a=await Z(),!a)throw new Error("Failed to fetch challenge.");ke("challenge",a),"configuration"in a&&(ke("re-configuring from challenge",a.configuration),_e(a.configuration)),a.parameters.expiresAt&&function(e){sn(I)&&clearTimeout(sn(I));const t=()=>{sn(w)!==hi.UNVERIFIED?(xt(g,!1),Ie(hi.EXPIRED)):Ee(),h("expired")},n=1e3*e-Date.now();n>=1?xt(I,setTimeout(t,n),!0):t()}(a.parameters.expiresAt),l="_version"in a&&1===a._version;const e=globalThis.$altcha.algorithms.get(a.parameters.algorithm);if(!e)throw new Error(`Unsupported algorithm ${a.parameters.algorithm}.`);if(s=await Ii({challenge:a,concurrency:t,controller:n,createWorker:e,counterMode:l?"string":"uint32",onOutOfMemory:e=>{if(ke("out of memory error received"),h("outofmemory"),sn(M).retryOnOutOfMemoryError&&e>1){const t=Math.floor(e/2);return ke(`retrying with ${t} workers...`),t}},timeout:sn(M).timeout}),sn(y)?.signal.aborted)return Ee(),null;if(!s)throw new Error("Failed to find solution.");ke("solution",s),await J(Math.max(0,r-(performance.now()-i))),xt(m,a.codeChallenge||sn(M).codeChallenge||null,!0),xt(O,l?btoa(JSON.stringify(function(e,t){return{algorithm:e.parameters.algorithm,challenge:e.parameters.keyPrefix,number:t.counter,salt:"_originalSalt"in e?e._originalSalt:e.parameters.nonce,signature:e.signature,took:t.time||0}}(a,s))):btoa(JSON.stringify({challenge:{parameters:a.parameters,signature:a.signature},solution:s})),!0),sn(m)?(ke("requesting code verification"),Ie(hi.CODE),h("codechallenge",{codeChallenge:sn(m)})):sn(M).verifyUrl?await we():(ke("verified"),Ie(hi.VERIFIED),h("verified",{payload:sn(O)}))}catch(e){return ke("verification failed",e),Ie(hi.ERROR,String(e)),null}finally{xt(y,null)}return{challenge:a,payload:sn(O),solution:s}}pn(()=>{_e({auto:t.auto,challenge:t.challenge,display:t.display,language:t.language,name:t.name,type:t.type,workers:t.workers})}),pn(()=>{if(t.configuration)try{_e(JSON.parse(t.configuration))}catch{ke("unable to parse the `configuration` attribute (JSON expected)")}}),pn(()=>{sn(b)!==sn(M).display&&ye(sn(M).display)}),pn(()=>{sn(g)&&sn(w)===hi.VERIFYING&&xt(g,!1)}),pn(()=>{sn(g)||sn(w)!==hi.VERIFIED||xt(g,!0)}),pn(()=>{if(!sn(g)){const e=W();e&&e.checked&&(e.checked=!1)}}),pn(()=>{sn(w)===hi.VERIFIED&&W()?.setCustomValidity("")}),pn(()=>{if("onload"===sn(D)){const e=setTimeout(()=>{Ae()},1);return()=>{e&&clearTimeout(e)}}}),pn(()=>{sn(C)&&ke("error:",sn(C))}),pn(()=>{sn(O)&&sn(M).setCookie&&function(e,t={}){const{domain:n,name:r=sn(M).name,maxAge:i,path:o,sameSite:a,secure:s}=t;let l=`${encodeURIComponent(r)}=${encodeURIComponent(e)}`;n&&(l+=`; Domain=${n}`);null!=i&&(l+=`; Max-Age=${i}`);o&&(l+=`; Path=${o}`);a&&(l+=`; SameSite=${a}`);s&&(l+="; Secure");document.cookie=l}(sn(O),sn(M).setCookie)}),hr(()=>(ke("mounted","3.0.10"),d&&globalThis.$altcha.instances.add(d),xt(k,sn(E)?.closest("form"),!0),sn(k)?.addEventListener("reset",ue),sn(k)?.addEventListener("submit",ve,{capture:!0}),sn(k)?.addEventListener("focusin",re),function(){xt(T,[...globalThis.$altcha.plugins].map(e=>new e(d)),!0),ke("activating plugins",sn(T).map(e=>e.constructor.name));for(const e of sn(T))e.activate()}(),sn(M).humanInteractionSignature&&(ke("human interaction signature enabled"),v=new Oi),h("load"),o||ke("secure context (HTTPS) required"),()=>{!function(){for(const e of sn(T))e.destroy()}(),d&&globalThis.$altcha.instances.delete(d),sn(I)&&clearTimeout(sn(I)),sn(k)?.removeEventListener("reset",ue),sn(k)?.removeEventListener("submit",ve,{capture:!0}),sn(k)?.removeEventListener("focusin",re),v?.destroy()}));var Re={configure:_e,getConfiguration:function(){return{...sn(M)}},getState:function(){return sn(w)},hide:$e,log:ke,reset:Ee,setState:Ie,show:Oe,updateUI:Te,verify:Ae},Pe=ji();jn("scroll",me,function(){Te()}),jn("click",me,function(e){const t=e.target;"floating"!==sn(M).display||!t||d?.contains(t)||t.hasAttribute("data-backdrop")||t.closest("[data-popover]")||sn(w)===hi.VERIFIED||sn(M).floatingPersist||$e()}),jn("pageshow",ge,function(e){e.persisted&&(ye(sn(M).display),Ee())}),jn("resize",ge,function(){Te()});var Me=Ce(Pe),Le=e=>{Kn(e,Ti())};vr(Me,e=>{"overlay"===sn(M).display&&sn(P)&&e(Le)});var Ne=xe(Me,2),De=Se(Ne),Ve=e=>{var t=Ri(),n=Ce(t),r=xe(n,2),i=e=>{var t=Ai();gr(t,()=>document.querySelector(sn(M).overlayContent)?.innerHTML,!0),ce(t),Kn(e,t)};vr(r,e=>{sn(M).overlayContent&&e(i)}),jn("click",n,ne,!0),Kn(e,t)};vr(De,e=>{"overlay"===sn(M).display&&sn(P)&&e(Ve)});var je=xe(De,2),Ue=Se(je),He=Se(Ue),Ge=Se(He);{let e=mt(()=>"standard"===sn(M).display&&"onsubmit"!==sn(D)||sn(w)===hi.VERIFYING);!function(e,t,n){var r;oe&&(r=ie,le());var i=new dr(e);wn(()=>{var e=t()??null;if(oe&&"["===de(r)!=(null!==e)){var o=fe();return se(o),i.anchor=o,ae(!1),i.ensure(e,e&&(t=>n(t,e))),void ae(!0)}i.ensure(e,e&&(t=>n(t,e)))},x)}(Ge,()=>sn(N),(t,n)=>{n(t,{get id(){return sn(L)},name:"",get required(){return sn(e)},get loading(){return sn(V)},get checked(){return sn(g)},onchange:ee,oninvalid:te})})}var Ye=xe(Ge,2),Be=Se(Ye),Je=e=>{var t=zn();bn(()=>ar(t,sn(H).verificationRequired)),Kn(e,t)},Ze=e=>{var t=zn();bn(()=>ar(t,sn(H).verifying)),Kn(e,t)},We=e=>{var t=zn();bn(()=>ar(t,sn(H).verified)),Kn(e,t)},ze=e=>{var t=zn();bn(()=>ar(t,sn(H).label)),Kn(e,t)};vr(Be,e=>{sn(w)===hi.CODE&&sn(m)?e(Je):sn(w)===hi.VERIFYING?e(Ze,1):sn(w)===hi.VERIFIED?e(We,2):e(ze,-1)}),ce(Ye),ce(He);var Xe=xe(He,2),Ke=e=>{si(e,{get strings(){return sn(H)}})};vr(Xe,e=>{sn(U)&&e(Ke)}),ce(Ue);var Qe=xe(Ue,2),et=e=>{{let t=mt(()=>"bar"===sn(M).display&&sn(U));ci(e,{get logo(){return sn(t)},get strings(){return sn(H)}})}};vr(Qe,e=>{sn(j)&&e(et)});var tt=xe(Qe,2),nt=e=>{var t=Pi();Zr(t,e=>xt(_,e),()=>sn(_)),Kn(e,t)};vr(tt,e=>{"floating"===sn(M).display&&e(nt)});var rt=xe(tt,2),it=e=>{var t=Mi();Dr(t),bn(()=>{var e,n,r;jr(t,"name",sn(M).name),e=t,n=sn(O),(r=Fr(e)).value!==(r.value=n??void 0)&&(e.value!==n||0===n&&e.nodeName===Nr)&&(e.value=n??"")}),Kn(e,t)};vr(rt,e=>{sn(M).setCookie||e(it)}),ce(je);var ot=xe(je,2),at=e=>{xi(e,{get anchor(){return sn(E)},onClickOutside:()=>{o&&Ee()},get placement(){return sn(M).popoverPlacement},role:"alert",variant:"error",get dir(){return sn(q)},get updateUISignal(){return sn(A)},children:(e,t)=>{var n=Xn(),r=Ce(n),i=e=>{Kn(e,Li())},a=e=>{var t=Ni(),n=Se(t,!0);ce(t),bn(()=>ar(n,sn(H).expired)),Kn(e,t)},s=e=>{var t=Di(),n=Se(t,!0);ce(t),bn(()=>{jr(t,"title",sn(C)),ar(n,sn(H).error)}),Kn(e,t)};vr(r,e=>{sn(C)||o?sn(C)||sn(w)!==hi.EXPIRED?e(s,-1):e(a,1):e(i)}),Kn(e,n)},$$slots:{default:!0}})},st=e=>{var t=Xn();!function(e,t,n){oe&&le();var r=new dr(e);wn(()=>{var e=t();e!=e&&(e=pr),r.ensure(e,n)})}(Ce(t),()=>sn(m),e=>{{let t=mt(()=>"standard"!==sn(M).codeChallengeDisplay);xi(e,{get anchor(){return sn(E)},get backdrop(){return sn(t)},get display(){return sn(M).codeChallengeDisplay},onClose:()=>{Ee()},get placement(){return sn(M).popoverPlacement},role:"dialog",get"aria-label"(){return sn(H).verificationRequired},get dir(){return sn(q)},get updateUISignal(){return sn(A)},children:(e,t)=>{var n=Vi(),r=Ce(n);$i(r,{get audioUrl(){return sn(G)},get imageUrl(){return sn(Y)},onCancel:()=>Ee(),onReload:()=>Ae(),onSubmit:e=>we(e),get codeChallenge(){return sn(m)},get config(){return sn(M)},get strings(){return sn(H)}});var i=xe(r,2),o=e=>{ci(e,{get logo(){return sn(U)},get strings(){return sn(H)}})};vr(i,e=>{sn(j)&&"standard"!==sn(M).codeChallengeDisplay&&e(o)}),Kn(e,n)},$$slots:{default:!0}})}}),Kn(e,t)};vr(ot,e=>{sn(C)||sn(w)===hi.EXPIRED||!o?e(at):sn(m)&&sn(w)===hi.CODE&&e(st,1)}),ce(Ne),Zr(Ne,e=>xt(E,e),()=>sn(E)),bn(e=>{jr(Ne,"data-state",sn(w)),jr(Ne,"data-display",sn(M).display||void 0),jr(Ne,"data-placement",e),jr(Ne,"data-visible",sn(P)||void 0),jr(Ne,"dir",sn(q)),jr(Ye,"for",sn(L)),Ne.dir=Ne.dir},[()=>function(e){switch(e){case"bar":return sn(M).barPlacement||"bottom";case"floating":return sn(M).floatingPlacement||"auto";default:return}}(sn(M).display)]),Kn(e,Pe);var lt=K(Re);return r(),lt},{auto:{type:"String"},challenge:{type:"String"},configuration:{type:"String"},display:{type:"String"},language:{type:"String"},name:{type:"String"},theme:{type:"String"},type:{type:"String"},workers:{type:"Number"}},[],["configure","getConfiguration","getState","hide","log","reset","setState","show","updateUI","verify"]));
|