MC/website/web/assets/altcha.js
Dev 6deb4a2e7d DuneRealms V2 clean baseline
Owner-authorised history reset; current source tree preserved exactly.
2026-11-13 00:05:14 +01:00

1 line
83 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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,E=8192,S=16384,k=32768,C=1<<25,x=65536,I=1<<17,O=1<<19,T=65536,A=1<<21,R=1<<23,P=Symbol("$state"),L=Symbol("component"),M=Symbol("legacy props"),N=Symbol(""),V=Symbol("attributes"),D=Symbol("class"),j=Symbol("style"),F=Symbol("text"),U=Symbol("form reset"),H=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 G(e){return e===this.v}function Y(e,t){return e!=e?t==t:e!==t||null!==e&&"object"==typeof e||"function"==typeof e}function B(e){return!Y(e,this.v)}const J={},Z=Symbol("uninitialized"),W="http://www.w3.org/1999/xhtml";let z=null;function X(e){z=e}function K(e,t=!1,n){z={p:z,i:!1,c:null,e:null,s:e,x:null,r:Ht,l:null}}function Q(e){var t=z,n=t.e;if(null!==n)for(var r of(t.e=null,n))yn(r);return void 0!==e&&(t.x=e),t.i=!0,z=t.p,ee(e)}function ee(e={}){return a(e,L,{value:!0}),e}let te=[];function ne(){var e=te;te=[],function(e){for(var t=0;t<e.length;t++)e[t]()}(e)}function re(e){if(0===te.length&&!ft){var t=te;queueMicrotask(()=>{t===te&&ne()})}te.push(e)}function ie(){for(;te.length>0;)ne()}function oe(e){console.warn("https://svelte.dev/e/hydration_mismatch")}let ae,se=!1;function le(e){se=e}function ce(e){if(null===e)throw oe(),J;return ae=e}function ue(){return ce(Ce(ae))}function fe(e){if(se){if(null!==Ce(ae))throw oe(),J;ae=e}}function de(e=1){if(se){for(var t=e,n=ae;t--;)n=Ce(n);ae=n}}function he(e=!0){for(var t=0,n=ae;;){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=Ce(n);e&&n.remove(),n=i}}function ve(e){if(!e||8!==e.nodeType)throw oe(),J;return e.data}function pe(e){if("object"!=typeof e||null===e||P in e||L in e)return e;const n=f(e);if(n!==c&&n!==u)return e;var r=new Map,i=t(e),o=Tt(0),a=Xt,l=e=>{if(Xt===a)return e();var t=jt,n=Xt;Ut(null),Kt(a);var r=e();return Ut(t),Kt(n),r};return i&&r.set("length",Tt(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=Tt(n.value);return r.set(t,e),e}):Rt(i,n.value,!0),!0},deleteProperty(e,t){var n=r.get(t);if(void 0===n){if(t in e){const e=l(()=>Tt(Z));r.set(t,e),Lt(o)}}else Rt(n,Z),Lt(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(()=>Tt(pe(a?t[n]:Z))),r.set(n,o)),void 0!==o){var c=cn(o);return c===Z?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=cn(i))}else if(void 0===n){var o=r.get(t),a=o?.v;if(void 0!==o&&a!==Z)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!==Z||Reflect.has(e,t);if((void 0!==n||null!==Ht&&(!i||s(e,t)?.writable))&&(void 0===n&&(n=l(()=>Tt(i?pe(e[t]):Z)),r.set(t,n)),cn(n)===Z))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?Rt(d,Z):f in e&&(d=l(()=>Tt(Z)),r.set(f+"",d))}void 0===c?u&&!s(e,t)?.writable||(Rt(c=l(()=>Tt(void 0)),pe(n)),r.set(t,c)):(u=c.v!==Z,Rt(c,l(()=>pe(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&&Rt(v,p+1)}Lt(o)}return!0},ownKeys(e){cn(o);var t=Reflect.ownKeys(e).filter(e=>{var t=r.get(e);return void 0===t||t.v!==Z});for(var[n,i]of r)i.v===Z||n in e||t.push(n);return t},setPrototypeOf(){!function(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}()}})}function ge(e){try{if(null!==e&&"object"==typeof e&&P in e)return e[P]}catch{}return e}function me(e,t){return Object.is(ge(e),ge(t))}var ye,be,we,_e,$e;function Ee(){if(void 0===ye){ye=window,be=document,we=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;_e=s(t,"firstChild").get,$e=s(t,"nextSibling").get,d(e)&&(e[D]=void 0,e[V]=null,e[j]=void 0,e.__e=void 0),d(n)&&(n[F]=void 0)}}function Se(e=""){return document.createTextNode(e)}function ke(e){return _e.call(e)}function Ce(e){return $e.call(e)}function xe(e,t){if(!se)return ke(e);var n=ke(ae);if(null===n)n=ae.appendChild(Se());else if(t&&3!==n.nodeType){var r=Se();return n?.before(r),ce(r),r}return t&&Re(n),ce(n),n}function Ie(e,t=!1){if(!se){var n=ke(e);return n instanceof Comment&&""===n.data?Ce(n):n}if(t){if(3!==ae?.nodeType){var r=Se();return ae?.before(r),ce(r),r}Re(ae)}return ae}function Oe(e,t=!1){if(!se)return ke(e);var n=xe(e,t);return fe(e),n}function Te(e,t=1,n=!1){let r=se?ae:e;for(var i;t--;)i=r,r=Ce(r);if(!se)return r;if(n){if(3!==r?.nodeType){var o=Se();return null===r?i?.after(o):r.before(o),ce(o),o}Re(r)}return ce(r),r}function Ae(e,t,n){return null==t||t===W?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function Re(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 Pe(e,t){if(null===t||0===(t.f&S)){for(;null!==t;){if(128&t.f&&!(33570816&t.f)){if(0===(t.f&k))throw e;try{return void t.b.error(e)}catch(t){e=t}}t=t.parent}throw e}}const Le=-7169;function Me(e,t){e.f=e.f&Le|t}function Ne(e){0!==(e.f&b)||null===e.deps?Me(e,w):Me(e,$)}function Ve(e){if(null!==e)for(const t of e)2&t.f&&0!==(t.f&T)&&(t.f^=T,Ve(t.deps))}function De(e,t,n){0!==(e.f&_)?t.add(e):0!==(e.f&$)&&n.add(e),Ve(e.deps),Me(e,w)}function je(e,t,n){if(null==e)return t(void 0),h;const r=dn(()=>e.subscribe(t,n));return r.unsubscribe?()=>r.unsubscribe():r}const Fe=[];function Ue(e,t=h){let n=null;const r=new Set;function i(t){if(Y(e,t)&&(e=t,n)){const t=!Fe.length;for(const t of r)t[1](),Fe.push(t,e);if(t){for(let e=0;e<Fe.length;e+=2)Fe[e][0](Fe[e+1]);Fe.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 He(e){let t;return je(e,e=>t=e)(),t}let qe=Symbol("unmounted");function Ge(e,t,n){const r=n[t]??={store:null,source:At(void 0),unsubscribe:h};if(r.store!==e&&!(qe 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=je(e,e=>{i?r.source.v=e:Rt(r.source,e)}),i=!1}return e&&qe in n?He(e):cn(r.source)}function Ye(e,t){if(t){const t=document.body;e.autofocus=!0,re(()=>{document.activeElement===t&&e.focus()})}}let Be=!1;function Je(){Be||(Be=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[U]?.()})},{capture:!0}))}function Ze(e){var t=jt,n=Ht;Ut(null),qt(null);try{return e()}finally{Ut(t),qt(n)}}function We(e,t,n,r){const i=Ke;var o=e.filter(e=>!e.settled),a=t.map(i);if(0!==n.length||0!==o.length){var s,l,c,u,f=Ht,d=(s=Ht,l=jt,c=z,u=st,function(e=!0){qt(s),Ut(l),X(c),e&&0===(s.f&S)&&(u?.activate(),u?.apply())}),h=1===o.length?o[0].promise:o.length>1?Promise.all(o.map(e=>e.promise)):null,v=Xe();0!==n.length?h?h.then(()=>{d(),g(),ze()}):g():h.then(()=>p([])).finally(v)}else r(a);function p(e){if(0===(f.f&S)){d();try{r([...a,...e])}catch(e){Pe(e,f)}ze()}}function g(){Promise.all(n.map(e=>et(e))).then(p).catch(e=>Pe(e,f)).finally(v)}}function ze(e=!0){qt(null),Ut(null),X(null),e&&st?.deactivate()}function Xe(){var e=Ht,t=e.b,n=st,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 Ke(e){null!==Ht&&(Ht.f|=O);return{ctx:z,deps:null,effects:null,equals:G,f:2050,fn:e,reactions:null,rv:0,v:Z,wv:0,parent:Ht,ac:null}}const Qe=Symbol("obsolete");function et(e,t,n){let r=Ht;null===r&&function(){throw new Error("https://svelte.dev/e/async_derived_orphan")}();var i=void 0,o=Ot(Z),a=!jt,s=new Set;return function(e){vn(4718592,e)}(()=>{var t=Ht,n=v();i=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==H&&n.reject(e)}).finally(ze)}catch(e){n.reject(e),ze()}var l=st;if(a){if(0!==(t.f&k))var c=Xe();if(r.b?.is_rendered())l.async_deriveds.get(t)?.reject(Qe);else for(const e of s.values())e.reject(Qe);s.add(n),l.async_deriveds.set(t,n)}const u=(e,t=void 0)=>{c?.(),s.delete(n),t!==Qe&&(l.activate(),t?(o.f|=R,Pt(o,t)):(0!==(o.f&R)&&(o.f^=R),Pt(o,e)),l.deactivate())};n.promise.then(u,e=>u(null,e||"unknown"))}),gn(()=>{for(const e of s)e.reject(Qe)}),new Promise(e=>{!function t(n){function r(){n===i?e(o):t(i)}n.then(r,r)}(i)})}function tt(e){const t=Ke(e);return Yt(t),t}function nt(e){var t,n=Ht,r=e.parent;if(!Vt&&null!==r&&e.v!==Z&&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)xn(t[n])}}(e),t=nn(e)}finally{qt(n)}return t}function rt(e){var t=nt(e);e.equals(t)||(e.wv=Qt(),st?.is_fork&&null!==e.deps||(null!==st?(st.capture(e,t,!0),lt?.capture(e,t,!0)):e.v=t,null!==e.deps))?Vt||(null!==ct?(pn()||st?.is_fork)&&ct.set(e,t):Ne(e)):Me(e,w)}function it(e){if(null!==e.effects)for(const t of e.effects)t.teardown&&null!==t.fn&&sn(t)}let ot=null,at=null,st=null,lt=null,ct=null,ut=null,ft=!1,dt=!1,ht=null,vt=null;var pt=0;let gt=1;class mt{id=gt++;#e=!1;linked=!0;#t=null;#n=null;async_deriveds=new Map;current=new Map;previous=new Map;#r=new Set;#i=new Set;#o=0;#a=new Map;#s=null;#l=[];#c=[];#u=new Set;#f=new Set;#d=new Map;#h=new Set;is_fork=!1;#v=!1;constructor(){null===at?ot=at=this:(at.#n=this,this.#t=at),at=this}#p(){if(this.is_fork)return!0;for(const n of this.#a.keys()){for(var e=n,t=!1;null!==e.parent;){if(this.#d.has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}skip_effect(e){this.#d.has(e)||this.#d.set(e,{d:[],m:[]}),this.#h.delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=this.#d.get(e);if(n){for(var r of(this.#d.delete(e),n.d))Me(r,_),t(r);for(r of n.m)Me(r,$),t(r)}this.#h.add(e)}#g(){this.#e=!0,pt++>1e3&&(this.#m(),function(){try{!function(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}()}catch(e){Pe(e,ut)}}());for(const e of this.#u)this.#f.delete(e),Me(e,_),this.schedule(e);for(const e of this.#f)Me(e,$),this.schedule(e);const e=this.#l;this.#l=[],this.apply();var t=ht=[],n=[],r=vt=[];for(const r of e)try{this.#y(r,t,n)}catch(e){throw kt(r),this.#p()||this.discard(),e}if(st=null,r.length>0){var i=mt.ensure();for(const e of r)i.schedule(e)}if(ht=null,vt=null,this.#p()){this.#b(n),this.#b(t);for(const[e,t]of this.#d)St(e,t);return void(r.length>0&&st.#g())}const o=this.#w();if(o)return this.#b(n),this.#b(t),void o.#_(this);this.#u.clear(),this.#f.clear();for(const e of this.#r)e(this);this.#r.clear(),lt=this,wt(n),wt(t),lt=null,this.#s?.resolve();var a=st;if(0!==this.#o||0!==this.#l.length&&null===a||this.#m(),this.#l.length>0)if(null!==a){const e=a;e.#l.push(...this.#l.filter(t=>!e.#l.includes(t)))}else a=this;null!==a&&(xt.clear(),a.#g())}#y(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&E)||this.#d.has(r))&&null!==r.fn){o?r.f^=w:4&i?t.push(r):en(r)&&(0!==(i&g)&&this.#f.add(r),sn(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}}}#w(){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).catch(e.reject)}e.async_deriveds.clear(),this.transfer_effects(e.#u,e.#f);const t=e=>{var n=e.reactions;if(null!==n&&(!(2&e.f)||6144&e.f))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.#f.delete(i),Me(i,_),this.schedule(i))}}};for(const e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#m(),st=this,this.#g()}#b(e){for(var t=0;t<e.length;t+=1)De(e[t],this.#u,this.#f)}capture(e,t,n=!1){e.v===Z||this.previous.has(e)||this.previous.set(e,e.v),0===(e.f&R)&&(this.current.set(e,[t,n]),ct?.set(e,t)),this.is_fork||(e.v=t)}activate(){st=this}deactivate(){st=null,ct=null}flush(){try{e,dt=!0,st=this,this.#g()}finally{pt=0,ut=null,ht=null,vt=null,dt=!1,st=null,ct=null,xt.clear()}}discard(){for(const e of this.#i)e(this);this.#i.clear();for(const e of this.async_deriveds.values())e.reject(Qe);this.#m(),this.#s?.resolve()}register_created_effect(e){this.#c.push(e)}#$(){for(let u=ot;null!==u;u=u.#n){var e=u.id<this.id,t=[];for(const[r,[i,o]]of this.current){if(u.current.has(r)){var n=u.current.get(r)[0];if(!e||i===n)continue;u.current.set(r,[i,o])}t.push(r)}if(e)for(const[e,t]of this.async_deriveds){const n=u.async_deriveds.get(e);n&&t.promise.then(n.resolve).catch(n.reject)}var r=[...u.current.keys()].filter(e=>!u.current.get(e)[1]);if(u.#e&&0!==r.length){var i=r.filter(e=>!this.current.has(e));if(0===i.length)e&&u.discard();else if(t.length>0){if(e)for(const e of this.#h)u.unskip_effect(e,e=>{4194320&e.f?u.schedule(e):u.#b([e])});u.activate();var o=new Set,a=new Map;for(var s of t)_t(s,i,o,a);a=new Map;var l=[...u.current].filter(([e,t])=>{const n=this.current.get(e);return!n||(n[0]!==t[0]||n[1]!==t[1])}).map(([e])=>e);if(l.length>0)for(const e of this.#c)155648&e.f||!$t(e,l,a)||(4194320&e.f?(Me(e,_),u.schedule(e)):u.#u.add(e));if(u.#l.length>0&&!u.#v){for(var c of(u.apply(),u.#l))u.#y(c,[],[]);u.#l=[]}u.deactivate()}}}}increment(e,t){if(this.#o+=1,e){let e=this.#a.get(t)??0;this.#a.set(t,e+1)}}decrement(e,t){if(this.#o-=1,e){let e=this.#a.get(t)??0;1===e?this.#a.delete(t):this.#a.set(t,e-1)}this.#v||(this.#v=!0,re(()=>{this.#v=!1,this.linked&&this.flush()}))}transfer_effects(e,t){for(const t of e)this.#u.add(t);for(const e of t)this.#f.add(e);e.clear(),t.clear()}oncommit(e){this.#r.add(e)}ondiscard(e){this.#i.add(e)}settled(){return(this.#s??=v()).promise}static ensure(){if(null===st){const e=st=new mt;dt||ft||re(()=>{e.#e||e.flush()})}return st}apply(){ct=null}schedule(e){if(ut=e,e.b?.is_pending&&16777228&e.f&&0===(e.f&k))e.b.defer_effect(e);else{for(var t=e;null!==t.parent;){var n=(t=t.parent).f;if(!(null===ht||t!==Ht||null!==jt&&2&jt.f))return;if(96&n){if(0===(n&w))return;t.f^=w}}this.#l.push(t)}}#m(){if(this.linked){var e=this.#t,t=this.#n;null===e?ot=t:e.#n=t,null===t?at=e:t.#t=e,this.linked=!1}}}function yt(e){var t=ft;ft=!0;try{for(;;){if(ie(),null===st)return;st.flush()}}finally{ft=t}}let bt=null;function wt(e){var t=e.length;if(0!==t){for(var n=0;n<t;){var r=e[n++];if(!(24576&r.f)&&en(r)&&(bt=new Set,sn(r),null===r.deps&&null===r.first&&null===r.nodes&&null===r.teardown&&null===r.ac&&On(r),bt?.size>0)){xt.clear();for(const e of bt){if(24576&e.f)continue;const t=[e];let n=e.parent;for(;null!==n;)bt.has(n)&&(bt.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){const n=t[e];24576&n.f||sn(n)}}bt.clear()}}bt=null}}function _t(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?_t(i,t,n,r):4194320&e&&0===(e&_)&&$t(i,t,r)&&(Me(i,_),Et(i))}}function $t(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&&$t(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function Et(e){st.schedule(e)}function St(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),Me(e,w);for(var n=e.first;null!==n;)St(n,t),n=n.next}}function kt(e){Me(e,w);for(var t=e.first;null!==t;)kt(t),t=t.next}let Ct=new Set;const xt=new Map;let It=!1;function Ot(e,t){return{f:0,v:e,reactions:null,equals:G,rv:0,wv:0}}function Tt(e,t){const n=Ot(e);return Yt(n),n}function At(e,t=!1,n=!0){const r=Ot(e);return t||(r.equals=B),r}function Rt(e,t,n=!1){return null===jt||Ft&&0===(jt.f&I)||!(4325394&jt.f)||null!==Gt&&Gt.has(e)||function(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}(),Pt(e,n?pe(t):t,vt)}function Pt(e,t,n=null){if(!e.equals(t)){Vt?xt.set(e,t):xt.has(e)||xt.set(e,e.v);var r=mt.ensure();if(r.capture(e,t),2&e.f){const t=e;0!==(e.f&_)&&nt(t),null===ct&&Ne(t)}e.wv=Qt(),Mt(e,_,n),null===Ht||0===(Ht.f&w)||96&Ht.f||(null===Zt?function(e){Zt=e}([e]):Zt.push(e)),!r.is_fork&&Ct.size>0&&!It&&function(){It=!1;for(const e of Ct){let t;0!==(e.f&w)&&Me(e,$);try{t=en(e)}catch{t=!0}t&&sn(e)}Ct.clear()}()}return t}function Lt(e){Rt(e,e.v+1)}function Mt(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&&Me(a,t),0!==(s&I))Ct.add(a);else if(2&s){var c=a;ct?.delete(c),0===(s&T)&&(s&b&&(null===Ht||0===(Ht.f&A))&&(a.f|=T),Mt(c,$,n))}else if(l){var u=a;0!==(s&g)&&null!==bt&&bt.add(u),null!==n?n.push(u):Et(u)}}}let Nt=!1,Vt=!1;function Dt(e){Vt=e}let jt=null,Ft=!1;function Ut(e){jt=e}let Ht=null;function qt(e){Ht=e}let Gt=null;function Yt(e){null!==jt&&(Gt??=new Set).add(e)}let Bt=null,Jt=0,Zt=null;let Wt=1,zt=0,Xt=zt;function Kt(e){Xt=e}function Qt(){return++Wt}function en(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(en(o)&&rt(o),o.wv>e.wv)return!0}0!==(t&b)&&null===ct&&Me(e,w)}return!1}function tn(e,t,n=!0){var r=e.reactions;if(null!==r&&(null===Gt||!Gt.has(e)))for(var i=0;i<r.length;i++){var o=r[i];2&o.f?tn(o,t,!1):t===o&&(n?Me(o,_):0!==(o.f&w)&&Me(o,$),Et(o))}}function nn(e){var t=Bt,n=Jt,r=Zt,i=jt,o=Gt,a=z,s=Ft,l=Xt,c=e.f;Bt=null,Jt=0,Zt=null,jt=96&c?null:e,Gt=null,X(e.ctx),Ft=!1,Xt=++zt,null!==e.ac&&(Ze(()=>{e.ac.abort(H)}),e.ac=null);try{e.f|=A;var u=(0,e.fn)();e.f|=k;var f=rn(e);if(!(null===Zt||Ft||null===f||6146&e.f))for(var d=0;d<Zt.length;d++)tn(Zt[d],e);if(null!==i&&i!==e){if(zt++,null!==i.deps)for(let e=0;e<n;e+=1)i.deps[e].rv=zt;if(null!==t)for(const e of t)e.rv=zt;null!==Zt&&(null===r?r=Zt:r.push(...Zt))}return 0!==(e.f&R)&&(e.f^=R),u}catch(t){return rn(e),function(e){var t=Ht;if(null===t)return jt.f|=R,e;if(0===(t.f&k)&&!(4&t.f))throw e;Pe(e,t)}(t)}finally{e.f^=A,Bt=t,Jt=n,Zt=r,jt=i,Gt=o,X(a),Ft=s,Xt=l}}function rn(e){var t=e.deps,n=st?.is_fork;if(null!==Bt){var r;if(n||an(e,Jt),null!==t&&Jt>0)for(t.length=Jt+Bt.length,r=0;r<Bt.length;r++)t[Jt+r]=Bt[r];else e.deps=t=Bt;if(pn()&&0!==(e.f&b))for(r=Jt;r<t.length;r++)(t[r].reactions??=[]).push(e)}else!n&&null!==t&&Jt<t.length&&(an(e,Jt),t.length=Jt);return t}function on(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===Bt||!r.call(Bt,t))){var s=t;0!==(s.f&b)&&(s.f^=b,s.f&=-65537),s.v!==Z&&Ne(s),null!==s.ac&&Ze(()=>{s.ac.abort(H),s.ac=null,Me(s,_)}),function(e){if(null!==e.effects)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),null!==t.ac&&Ze(()=>{t.ac.abort(H),t.ac=null}),null!==t.fn&&(t.teardown=h),an(t,0),Cn(t))}(s),an(s,0)}}function an(e,t){var n=e.deps;if(null!==n)for(var r=t;r<n.length;r++)on(e,n[r])}function sn(e){var t=e.f;if(0===(t&S)){Me(e,w);var n=Ht,r=Nt;Ht=e,Nt=!(96&t);try{16777232&t?function(e){var t=e.first;for(;null!==t;){var n=t.next;0===(t.f&m)&&xn(t),t=n}}(e):Cn(e),kn(e);var i=nn(e);e.teardown="function"==typeof i?i:null,e.wv=Wt}finally{Nt=r,Ht=n}}}async function ln(){await Promise.resolve(),yt()}function cn(e){var t=!!(2&e.f);if(null!==jt&&!Ft&&!(null!==Ht&&0!==(Ht.f&S)||null!==Gt&&Gt.has(e))){var n=jt.deps;if(0!==(jt.f&A))e.rv<zt&&(e.rv=zt,null===Bt&&null!==n&&n[Jt]===e?Jt++:null===Bt?Bt=[e]:Bt.push(e));else{jt.deps??=[],r.call(jt.deps,e)||jt.deps.push(e);var i=e.reactions;null===i?e.reactions=[jt]:r.call(i,jt)||i.push(jt)}}if(Vt&&xt.has(e))return xt.get(e);if(t){var o=e;if(Vt){var a=o.v;return(0===(o.f&w)&&null!==o.reactions||fn(o))&&(a=nt(o)),xt.set(o,a),a}var s=0===(o.f&b)&&!Ft&&null!==jt&&(Nt||0!==(jt.f&b)),l=0===(o.f&k);en(o)&&(s&&(o.f|=b),rt(o)),s&&!l&&(it(o),un(o))}if(ct?.has(e))return ct.get(e);if(0!==(e.f&R))throw e.v;return e.v}function un(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)&&(it(t),un(t))}function fn(e){if(e.v===Z)return!0;if(null===e.deps)return!1;for(const t of e.deps){if(xt.has(t))return!0;if(2&t.f&&fn(t))return!0}return!1}function dn(e){var t=Ft;try{return Ft=!0,e()}finally{Ft=t}}function hn(e){null===Ht&&(null===jt&&function(){throw new Error("https://svelte.dev/e/effect_orphan")}(),function(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}()),Vt&&function(){throw new Error("https://svelte.dev/e/effect_in_teardown")}()}function vn(e,t){var n=Ht;null!==n&&0!==(n.f&E)&&(e|=E);var r={ctx:z,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};st?.register_created_effect(r);var i=r;if(4&e)null!==ht?ht.push(r):mt.ensure().schedule(r);else if(null!==t){try{sn(r)}catch(e){throw xn(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!==jt&&2&jt.f&&0===(e&y))){var o=jt;(o.effects??=[]).push(i)}return r}function pn(){return null!==jt&&!Ft}function gn(e){const t=vn(8,null);return Me(t,w),t.teardown=e,t}function mn(e){hn();var t=Ht.f;if(!(!jt&&0!==(t&m)&&null!==z&&!z.i))return yn(e);var n=z;(n.e??=[]).push(e)}function yn(e){return vn(1048580,e)}function bn(e){return vn(4,e)}function wn(e,t=0){return vn(8|t,e)}function _n(e,t=[],n=[],r=[]){We(r,t,n,t=>{vn(8,()=>{e(...t.map(cn))})})}function $n(e,t=0){return vn(g|t,e)}function En(e,t=0){return vn(p|t,e)}function Sn(e){return vn(524320,e)}function kn(e){var t=e.teardown;if(null!==t){const n=Vt,r=jt;Dt(!0),Ut(null);try{t.call(null)}catch(t){Pe(t,e.parent)}finally{Dt(n),Ut(r)}}}function Cn(e,t=!1){var n=e.first;for(e.first=e.last=null;null!==n;){const e=n.ac;null!==e&&Ze(()=>{e.abort(H)});var r=n.next;0!==(n.f&y)?n.parent=null:xn(n,t),n=r}}function xn(e,t=!0){var n=!1;(t||262144&e.f)&&null!==e.nodes&&null!==e.nodes.end&&(In(e.nodes.start,e.nodes.end),n=!0),e.f|=C,Cn(e,t&&!n),an(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|=S;var i=e.parent;null!==i&&null!==i.first&&On(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function In(e,t){for(;null!==e;){var n=e===t?null:Ce(e);e.remove(),e=n}}function On(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 Tn(e,t,n=!0){var r=[];e.f|=256,An(e,r,!0);var i=()=>{n&&xn(e),t&&t()},o=r.length;if(o>0){var a=()=>--o||i();for(var s of r)s.out(a)}else i()}function An(e,t,n){if(0===(e.f&E)){e.f^=E;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))An(i,t,!!(0!==(i.f&x)||0!==(i.f&m)&&0!==(e.f&g))&&n);i=o}}}function Rn(e){e.f&=-257,Pn(e,!0)}function Pn(e,t){if(!(256&e.f)&&0!==(e.f&E)){e.f^=E,0===(e.f&w)&&(Me(e,_),mt.ensure().schedule(e));for(var n=e.first;null!==n;){var r=n.next;Pn(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 Ln(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;null!==n;){var i=n===r?null:Ce(n);t.append(n),n=i}}function Mn(e){const t={get:e=>He(t.store)[e],set:(e,n)=>{"string"==typeof e?Object.assign(He(t.store),{[e]:n}):Object.assign(He(t.store),e),t.store.set(He(t.store))},store:Ue(e)};return t}globalThis.$altcha=globalThis.$altcha||{algorithms:new Map,defaults:Mn({}),i18n:Mn({}),instances:new Set,plugins:new Set};globalThis.$altcha.i18n.set("en",{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/" target="_blank" rel="noopener" aria-label="Altcha (official website, opens in new tab)">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."});"undefined"!=typeof window&&((window.__svelte??={}).v??=new Set).add("5");const Nn=Symbol("events"),Vn=new Set,Dn=new Set;function jn(e,t,n,r={}){function i(e){if(r.capture||Yn.call(t,e),!e.cancelBubble)return Ze(()=>n?.call(this,e))}return e.startsWith("pointer")||e.startsWith("touch")||"wheel"===e?re(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function Fn(e,t,n,r,i){var o={capture:r,passive:i},a=jn(e,t,n,o);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&gn(()=>{t.removeEventListener(e,a,o)})}function Un(e,t,n){(t[Nn]??={})[e]=n}function Hn(e){for(var t=0;t<e.length;t++)Vn.add(e[t]);for(var n of Dn)n(e)}let qn=null,Gn=!1;function Yn(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],o=i[0]||e.target;qn=e,Gn||(Gn=!0,setTimeout(()=>{Gn=!1,qn=null}));var s=0,l=qn===e&&e[Nn];if(l){var c=i.indexOf(l);if(-1!==c&&(t===document||t===window))return void(e[Nn]=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=jt,d=Ht;Ut(null),qt(null);try{for(var h,v=[];null!==o&&o!==t;){try{var p=o[Nn]?.[r];null==p||o.disabled&&e.target!==o||p.call(o,e)}catch(e){h?v.push(e):h=e}if(e.cancelBubble)break;s++,o=s<i.length?i[s]:null}if(h){for(let e of v)queueMicrotask(()=>{throw e});throw h}}finally{e[Nn]=t,delete e.currentTarget,Ut(f),qt(d)}}}const Bn=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Jn(e){var t=Ae("template");return t.innerHTML=function(e){return Bn?.createHTML(e)??e}(e.replaceAll("<!>","\x3c!----\x3e")),t.content}function Zn(e,t){var n=Ht;null===n.nodes&&(n.nodes={start:e,end:t,a:null,t:null})}function Wn(e,t){var n,r=!!(1&t),i=!!(2&t),o=!e.startsWith("<!>");return()=>{if(se)return Zn(ae,null),ae;void 0===n&&(n=Jn(o?e:"<!>"+e),r||(n=ke(n)));var t=i||we?document.importNode(n,!0):n.cloneNode(!0);r?Zn(ke(t),t.lastChild):Zn(t,t);return t}}function zn(e,t,n="svg"){var r,i=`<${n}>${!e.startsWith("<!>")?e:"<!>"+e}</${n}>`;return()=>{if(se)return Zn(ae,null),ae;if(!r){var e=Jn(i);r=ke(ke(e))}var t=r.cloneNode(!0);return Zn(t,t),t}}function Xn(e,t){return zn(e,0,"svg")}function Kn(e=""){if(!se){var t=Se(e+"");return Zn(t,t),t}var n=ae;return 3!==n.nodeType?(n.before(n=Se()),ce(n)):Re(n),Zn(n,n),n}function Qn(){if(se)return Zn(ae,null),ae;var e=document.createDocumentFragment(),t=document.createComment(""),n=Se();return e.append(t,n),Zn(t,n),e}function er(e,t){if(se){var n=Ht;return 0!==(n.f&k)&&null!==n.nodes.end||(n.nodes.end=ae),void ue()}null!==e&&e.before(t)}function tr(e){return e.endsWith("capture")&&"gotpointercapture"!==e&&"lostpointercapture"!==e}const nr=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function rr(e){return nr.includes(e)}const ir={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 or(e){return e=e.toLowerCase(),ir[e]??e}const ar=["touchstart","touchmove"];function sr(e){return ar.includes(e)}class lr{parent;is_pending=!1;transform_error;#E;#S=se?ae:null;#k;#C;#x;#I=null;#O=null;#T=null;#A=null;#R=0;#P=0;#L=!1;#u=new Set;#f=new Set;#M=null;#N=function(e){let t,n=0,r=Ot(0);return()=>{pn()&&(cn(r),wn(()=>(0===n&&(t=dn(()=>e(()=>Lt(r)))),n+=1,()=>{re(()=>{n-=1,0===n&&(t?.(),t=void 0,Lt(r))})})))}}(()=>(this.#M=Ot(this.#R),()=>{this.#M=null}));constructor(e,t,n,r){this.#E=e,this.#k=t,this.#C=e=>{var t=Ht;t.b=this,t.f|=128,n(e)},this.parent=Ht.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#x=$n(()=>{if(se){const e=this.#S;ue();const t="[!"===e.data;if(e.data.startsWith("[?")){const t=JSON.parse(e.data.slice(2));this.#V(t)}else t?this.#D():this.#j()}else this.#F()},589824),se&&(this.#E=ae)}#j(){try{this.#I=Sn(()=>this.#C(this.#E))}catch(e){this.error(e)}}#V(e){const t=this.#k.failed,{reset:n,invoke_onerror:r}=this.#U(e);re(r),t&&(this.#T=Sn(()=>{t(this.#E,()=>e,()=>n)}))}#U(e){var t=!1,n=!1;const r=()=>{t?console.warn("https://svelte.dev/e/svelte_boundary_reset_noop"):(t=!0,n&&function(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}(),null!==this.#T&&Tn(this.#T,()=>{this.#T=null}),this.#H(()=>{this.#F()}))};return{reset:r,invoke_onerror:()=>{try{n=!0,this.#k.onerror?.(e,r),n=!1}catch(e){Pe(e,this.#x&&this.#x.parent)}}}}#D(){const e=this.#k.pending;e&&(this.is_pending=!0,this.#O=Sn(()=>e(this.#E)),re(()=>{var e=this.#A=document.createDocumentFragment(),t=Se(),n=!1;if(e.append(t),this.#I=this.#H(()=>{try{return Sn(()=>this.#C(t))}catch(e){try{this.error(e),n=!0}catch(e){Pe(e,this.#x.parent)}return null}}),null===this.#I)return this.#A=null,void(n&&this.#q(st));0===this.#P&&(this.#E.before(e),this.#A=null,Tn(this.#O,()=>{this.#O=null}),this.#q(st))}))}#F(){try{if(this.is_pending=this.has_pending_snippet(),this.#P=0,this.#R=0,this.#I=Sn(()=>{this.#C(this.#E)}),this.#P>0){var e=this.#A=document.createDocumentFragment();Ln(this.#I,e);const t=this.#k.pending;this.#O=Sn(()=>t(this.#E))}else this.#q(st)}catch(e){this.error(e)}}#q(e){this.is_pending=!1,e.transfer_effects(this.#u,this.#f)}defer_effect(e){De(e,this.#u,this.#f)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#k.pending}#H(e){var t=Ht,n=jt,r=z;qt(this.#x),Ut(this.#x),X(this.#x.ctx);try{return mt.ensure(),e()}finally{qt(t),Ut(n),X(r)}}#G(e,t){this.has_pending_snippet()?(this.#P+=e,0===this.#P&&(this.#q(t),this.#O&&Tn(this.#O,()=>{this.#O=null}),this.#A&&(this.#E.before(this.#A),this.#A=null))):this.parent&&this.parent.#G(e,t)}update_pending_count(e,t){this.#G(e,t),this.#R+=e,this.#M&&!this.#L&&(this.#L=!0,re(()=>{this.#L=!1,this.#M&&Pt(this.#M,this.#R)}))}get_effect_pending(){return this.#N(),cn(this.#M)}error(e){if(!this.#k.onerror&&!this.#k.failed)throw e;st?.is_fork?(this.#I&&st.skip_effect(this.#I),this.#O&&st.skip_effect(this.#O),this.#T&&st.skip_effect(this.#T),st.oncommit(()=>{this.#Y(e)})):this.#Y(e)}#Y(e){this.#I&&(xn(this.#I),this.#I=null),this.#O&&(xn(this.#O),this.#O=null),this.#T&&(xn(this.#T),this.#T=null),se&&(ce(this.#S),de(),ce(he()));let t=this.#k.failed;const n=e=>{const{reset:n,invoke_onerror:r}=this.#U(e);r(),t&&(this.#T=this.#H(()=>{try{return Sn(()=>{var r=Ht;r.b=this,r.f|=128,t(this.#E,()=>e,()=>n)})}catch(e){return Pe(e,this.#x.parent),null}}))};re(()=>{var t;try{t=this.transform_error(e)}catch(e){return void Pe(e,this.#x&&this.#x.parent)}null!==t&&"object"==typeof t&&"function"==typeof t.then?t.then(n,e=>Pe(e,this.#x&&this.#x.parent)):n(t)})}}function cr(e,t){var n=null==t?"":"object"==typeof t?`${t}`:t;n!==(e[F]??=e.nodeValue)&&(e[F]=n,e.nodeValue=`${n}`)}function ur(e,t){return hr(e,t)}function fr(e,t){Ee(),t.intro=t.intro??!1;const n=t.target,r=se,i=ae;try{for(var o=ke(n);o&&(8!==o.nodeType||"["!==o.data);)o=Ce(o);if(!o)throw J;le(!0),ce(o);const r=hr(e,{...t,anchor:o});return le(!1),r}catch(r){if(r instanceof Error&&r.message.split("\n").some(e=>e.startsWith("https://svelte.dev/e/")))throw r;return r!==J&&console.warn("Failed to hydrate: ",r),!1===t.recover&&function(){throw new Error("https://svelte.dev/e/hydration_failed")}(),Ee(),n.textContent="",le(!1),ur(e,t)}finally{le(r),ce(i)}}const dr=new Map;function hr(e,{target:t,anchor:n,props:r={},events:o,context:a,intro:s=!0,transformError:l}){Ee();var c=void 0,u=function(e){mt.ensure();const t=vn(524352,e);return(e={})=>new Promise(n=>{e.outro?Tn(t,()=>{xn(t),n(void 0)}):(xn(t),n(void 0))})}(()=>{var s=n??t.appendChild(Se());!function(e,t,n,r){new lr(e,t,n,r)}(s,{pending:()=>{}},t=>{if(K({}),a&&(z.c=a),o&&(r.$$events=o),se&&Zn(t,null),c=e(t,r)||ee(),se&&(Ht.nodes.end=ae,null===ae||8!==ae.nodeType||"]"!==ae.data))throw oe(),J;Q()},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=sr(r);for(const e of[t,document]){var o=dr.get(e);void 0===o&&(o=new Map,dr.set(e,o));var a=o.get(r);void 0===a?(e.addEventListener(r,Yn,{passive:i}),o.set(r,1)):o.set(r,a+1)}}}};return f(i(Vn)),Dn.add(f),()=>{for(var e of u)for(const n of[t,document]){var r=dr.get(n),i=r.get(e);0==--i?(n.removeEventListener(e,Yn),r.delete(e),0===r.size&&dr.delete(n)):r.set(e,i)}Dn.delete(f),s!==n&&s.parentNode?.removeChild(s)}});return vr.set(c,u),c}let vr=new WeakMap;class pr{anchor;#B=new Map;#J=new Map;#Z=new Map;#W=new Set;#z=!0;constructor(e,t=!0){this.anchor=e,this.#z=t}#$=e=>{if(this.#B.has(e)){var t=this.#B.get(e),n=this.#J.get(t);if(n)Rn(n),this.#W.delete(t);else{var r=this.#Z.get(t);r&&(Rn(r.effect),this.#J.set(t,r.effect),this.#Z.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(const[t,n]of this.#B){if(this.#B.delete(t),t===e)break;const r=this.#Z.get(n);r&&(xn(r.effect),this.#Z.delete(n))}for(const[e,r]of this.#J){if(e===t||this.#W.has(e))continue;const i=()=>{if(Array.from(this.#B.values()).includes(e)){var t=document.createDocumentFragment();Ln(r,t),t.append(Se()),this.#Z.set(e,{effect:r,fragment:t})}else xn(r);this.#W.delete(e),this.#J.delete(e)};this.#z||!n?(this.#W.add(e),Tn(r,i,!1)):i()}}};#X=e=>{this.#B.delete(e);const t=Array.from(this.#B.values());for(const[e,n]of this.#Z)t.includes(e)||(xn(n.effect),this.#Z.delete(e))};ensure(e,t){var n=st;!t||this.#J.has(e)||this.#Z.has(e)||this.#J.set(e,Sn(()=>t(this.anchor)));this.#B.set(n,e),se&&(this.anchor=ae),this.#$(n)}}function gr(e){null===z&&function(){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}(),mn(()=>{const t=dn(e);if("function"==typeof t)return t})}function mr(e,t,n=!1){var r;se&&(r=ae,ue());var i=new pr(e);function o(e,t){if(se){var n=ve(r);if(e!==parseInt(n.substring(1))){var o=he();return ce(o),i.anchor=o,le(!1),i.ensure(e,t),void le(!0)}}i.ensure(e,t)}$n(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},n?x:0)}const yr=Symbol("NaN");function br(e,t,n=!1,r=!1,i=!1,o=!1){var a=e,s="";if(n){var l=e;se&&(a=ce(ke(l)))}_n(()=>{var e=Ht;if(s!==(s=t()??"")){if(n&&!se)return e.nodes=null,l.innerHTML=s,void(""!==s&&Zn(ke(l),l.lastChild));if(null!==e.nodes&&(In(e.nodes.start,e.nodes.end),e.nodes=null),""!==s){if(se){ae.data;for(var o=ue(),c=o;null!==o&&(8!==o.nodeType||""!==o.data);)c=o,o=Ce(o);if(null===o)throw oe(),J;return Zn(ae,c),void(a=ce(o))}var u=Ae(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(Zn(ke(f),f.lastChild),r||i)for(;ke(f);)a.before(ke(f));else a.before(f)}}else se&&ue()})}function wr(e,t){var n,r=void 0;En(()=>{r!==(r=t())&&(n&&(xn(n),n=null),r&&(n=Sn(()=>{bn(()=>r(e))})))})}function _r(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=_r(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function $r(e){return"object"==typeof e?function(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=_r(e))&&(r&&(r+=" "),r+=t);return r}(e):e??""}const Er=[..." \t\n\r\f \v\ufeff"];function Sr(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 kr(e){return"-"!==e[0]||"-"!==e[1]?e.toLowerCase():e}function Cr(e,t,n,r,i,o){var a=e[D];if(se||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&&!Er.includes(r[a-1])||s!==r.length&&!Er.includes(r[s])?a=s:r=(0===a?"":r.substring(0,a))+r.substring(s+1)}return""===r?null:r}(n,0,o);se&&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 xr(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 Ir(e,t,n,r){var i=e[j];if(se||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(/\/\*.*?\*\//g,"").trim();var o=!1,a=0,s=!1,l=[];n&&l.push(...Object.keys(n).map(kr)),r&&l.push(...Object.keys(r).map(kr));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=kr(e.substring(c,u).trim());l.includes(h)||(";"!==d&&f++,i+=" "+e.substring(c,f).trim()+";")}c=f+1,u=-1}}}return n&&(i+=Sr(n)),r&&(i+=Sr(r,!0)),""===(i=i.trim())?null:i}return null==e?null:String(e)}(t,r);se&&o===e.getAttribute("style")||(null==o?e.removeAttribute("style"):e.style.cssText=o),e[j]=t}else r&&(Array.isArray(r)?(xr(e,n?.[0],r[0]),xr(e,n?.[1],r[1],"important")):xr(e,n,r));return r}function Or(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function Tr(e,t){var n=!("__defaultValue"in e);(n||e.__defaultValue!==t)&&(e.__defaultValue=t,Ar(e,!n||"__value"in e))}function Ar(e,n){var r=e.__defaultValue,i=e.multiple,o=i?r??[]:null;if(!i||t(o)){var a=e.selectedIndex,s=n&&i?new Set(e.selectedOptions):null;for(var l of e.options){var c=Pr(l);Or(l,i?o.includes(c):me(c,r))}if(n)if(null!==s)for(l of e.options){var u=s.has(l);l.selected!==u&&(l.selected=u)}else e.selectedIndex!==a&&(e.selectedIndex=a)}}function Rr(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(Pr(i))}else{for(i of e.options){if(me(Pr(i),n))return void(i.selected=!0)}r&&void 0===n||(e.selectedIndex=-1)}}function Pr(e){return"__value"in e?e.__value:e.value}function Lr(e){if(null!==e.target.closest("selectedcontent"))return!0;if("childList"===e.type){var t=[...e.addedNodes,...e.removedNodes];return t.length>0&&t.every(e=>"SELECTEDCONTENT"===e.nodeName)}return!1}const Mr=Symbol("class"),Nr=Symbol("style"),Vr=Symbol("is custom element"),Dr=Symbol("is html"),jr=q?"link":"LINK",Fr=q?"input":"INPUT",Ur=q?"option":"OPTION",Hr=q?"select":"SELECT",qr=q?"progress":"PROGRESS";function Gr(e){if(se){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var n=e.value;Yr(e,"value",null),e.value=n}if(e.hasAttribute("checked")){var r=e.checked;Yr(e,"checked",null),e.checked=r}}};e[U]=n,re(n),Je()}}function Yr(e,t,n,r){var i=Jr(e);se&&(i[t]=e.getAttribute(t),"src"===t||"srcset"===t||"href"===t&&e.nodeName===jr)||i[t]!==(i[t]=n)&&("loading"===t&&(e[N]=n),null==n?e.removeAttribute(t):"string"!=typeof n&&Wr(e).has(t)?e[t]=n:e.setAttribute(t,n))}function Br(e,t,n=[],r=[],i=[],o,a=!1,s=!1){We(i,n,r,n=>{var r=void 0,i={},o=e.nodeName===Hr,l=!1;if(En(()=>{var c=t(...n.map(cn)),u=function(e,t,n,r,i=!1){se&&i&&e.nodeName===Fr&&("defaultValue"in n||"defaultChecked"in n||Gr(e));var o=Jr(e),a=o[Vr],s=!o[Dr];let l=se&&a;l&&le(!1);var c=t||{},u=e.nodeName===Ur,f=e.nodeName===Hr;for(var d in t)d in n||d[0]+d[1]==="$$"||(n[d]=null);n.class?n.class=$r(n.class):n[Mr]&&(n.class=null),n[Nr]&&(n.style??=null);var h=Wr(e);if(e.nodeName===Fr&&"type"in n&&("value"in n||"__value"in n)){var v=n.type;(v!==c.type||void 0===v&&e.hasAttribute("type"))&&(c.type=v,Yr(e,"type",v))}for(const r in n){let i=n[r];if(u&&"value"===r&&null==i)e.value=e.__value="",c[r]=i;else if("class"!==r)if("style"!==r){var p=c[r];if(i!==p||void 0===i&&e.hasAttribute(r)){c[r]=i;var g=r[0]+r[1];if("$$"!==g)if("on"===g){const t={},n="$$"+r;let o=r.slice(2);var m=rr(o);if(tr(o)&&(o=o.slice(0,-7),t.capture=!0),!m&&p){if(null!=i)continue;e.removeEventListener(o,c[n],t),c[n]=null}if(m)Un(o,e,i),Hn([o]);else if(null!=i){let i=function(e){c[r].call(this,e)};c[n]=jn(o,e,i,t)}}else if("style"===r)Yr(e,r,i);else if("autofocus"===r)Ye(e,Boolean(i));else if(a||"__value"!==r&&("value"!==r||null==i))if("selected"===r&&u)Or(e,i);else{var y=r;s||(y=or(y));var b="defaultValue"===y||"defaultChecked"===y;if(f&&"defaultValue"===y)continue;if(null!=i||a||b)b||(a||"string"!=typeof i)&&h.has(y)?(e[y]=i,y in o&&(o[y]=Z)):"function"!=typeof i&&Yr(e,y,i);else if(o[r]=null,"value"===y||"checked"===y){let n=e;const r=void 0===t;if("value"===y){let e=n.defaultValue;n.removeAttribute(y),n.defaultValue=e,n.value=n.__value=r?e:null}else{let e=n.defaultChecked;n.removeAttribute(y),n.defaultChecked=e,n.checked=!!r&&e}}else e.removeAttribute(r)}else e.value=e.__value=i}}else Ir(e,i,t?.[Nr],n[Nr]),c[r]=i,c[Nr]=n[Nr];else Cr(e,"http://www.w3.org/1999/xhtml"===e.namespaceURI,i,0,t?.[Mr],n[Mr]),c[r]=i,c[Mr]=n[Mr]}return l&&le(!0),c}(e,r,c,0,a,s);if(l&&o){var f=e;"defaultValue"in c&&Tr(f,c.defaultValue),"value"in c&&Rr(f,c.value)}for(let e of Object.getOwnPropertySymbols(i))c[e]||xn(i[e]);for(let t of Object.getOwnPropertySymbols(c)){var d=c[t];"@attach"!==t.description||r&&d===r[t]||(i[t]&&xn(i[t]),i[t]=Sn(()=>wr(e,()=>d))),u[t]=d}r=u}),o){var c=e;bn(()=>{var e=r;"defaultValue"in e&&Tr(c,e.defaultValue),Rr(c,e.value,!0),function(e){var t=new MutationObserver(t=>{t.every(Lr)||("__defaultValue"in e&&Ar(e,!1),"__value"in e&&Rr(e,e.__value))});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),gn(()=>{t.disconnect()})}(c)})}l=!0})}function Jr(e){return e[V]??={[Vr]:e.nodeName.includes("-"),[Dr]:e.namespaceURI===W}}var Zr=new Map;function Wr(e){var t,n=e.getAttribute("is")||e.nodeName,r=Zr.get(n);if(r)return r;Zr.set(n,r=new Set);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.add(a);i=f(i)}return r}function zr(e,t,n=t){var r=new WeakSet;!function(e,t,n,r=n){e.addEventListener(t,()=>Ze(n));const i=e[U];e[U]=i?()=>{i(),r(!0)}:()=>r(!0),Je()}(e,"input",async i=>{var o=i?e.defaultValue:e.value;if(o=Xr(e)?Kr(o):o,n(o),null!==st&&r.add(st),await ln(),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))}}}),(se&&e.defaultValue!==e.value||null==dn(t)&&e.value)&&(n(Xr(e)?Kr(e.value):e.value),null!==st&&r.add(st)),wn(()=>{var n=t();if(e===document.activeElement){var i=st;if(r.has(i))return}Xr(e)&&n===Kr(e.value)||("date"!==e.type||n||e.value)&&n!==e.value&&(e.value=n??"")})}function Xr(e){var t=e.type;return"number"===t||"range"===t}function Kr(e){return""===e?null:+e}function Qr(e,t){return e===t||e?.[P]===t}function ei(e=ee(),t,n,r){var i=z.r,o=Ht;return bn(()=>{var r,a;return wn(()=>{r=a,a=[],dn(()=>{Qr(n(...a),e)||(t(e,...a),r&&Qr(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&&Qr(n(...a),e)&&t(null,...a),s?.()}}}),e}const ti={get(e,t){if(!e.exclude.has(t))return e.props[t]},set:(e,t)=>!1,getOwnPropertyDescriptor(e,t){if(!e.exclude.has(t))return t in e.props?{enumerable:!0,configurable:!0,value:e.props[t]}:void 0},has:(e,t)=>!e.exclude.has(t)&&t in e.props,ownKeys:e=>Reflect.ownKeys(e.props).filter(t=>!e.exclude.has(t))};function ni(e,t,n){return new Proxy({props:e,exclude:t},ti)}function ri(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=Ke(()=>(l=!1,i())),u=Ht;return function(e,t){if(arguments.length>0){const n=t?cn(c):e;return Rt(c,n),l=!0,void 0!==o&&(o=n),e}return Vt&&l||0!==(u.f&S)?c.v:cn(c)}}class ii{#K;#Q;constructor(e){var t=new Map,n=(e,n)=>{var r=At(n,!1,!1);return t.set(e,r),r};const r=new Proxy({...e.props||{},$$events:{}},{get:(e,r)=>cn(t.get(r)??n(r,Reflect.get(e,r))),has:(e,r)=>r===M||(cn(t.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r)),set:(e,r,i)=>(Rt(t.get(r)??n(r,i),i),Reflect.set(e,r,i))});this.#Q=(e.hydrate?fr:ur)(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||yt(),this.#K=r.$$events;for(const e of Object.keys(this.#Q))"$set"!==e&&"$destroy"!==e&&"$on"!==e&&a(this,e,{get(){return this.#Q[e]},set(t){this.#Q[e]=t},enumerable:!0});this.#Q.$set=e=>{Object.assign(r,e)},this.#Q.$destroy=()=>{!function(e,t){const n=vr.get(e);n?(vr.delete(e),n(t)):Promise.resolve()}(this.#Q)}}$set(e){this.#Q.$set(e)}$on(e,t){this.#K[e]=this.#K[e]||[];const n=(...e)=>t.call(this,...e);return this.#K[e].push(n),()=>{this.#K[e]=this.#K[e].filter(e=>e!==n)}}$destroy(){this.#Q.$destroy()}}let oi=class{};function ai(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 si(e,t,n,r,i,l){let c=class extends oi{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=ai(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&&(oi=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=Ae("slot");"default"!==e&&(n.name=e),er(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]=ai(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 ii(e)),this.$$me=function(e){mt.ensure();const t=vn(524352,e);return()=>{xn(t)}}(()=>{wn(()=>{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=ai(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]=ai(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 li=new Set(["$$slots","$$events","$$legacy","$$host","loading"]),ci=Wn('<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 ui(e,t){K(t,!0);let n,r=ri(t,"loading"),i=ni(t,li);var o={get loading(){return r()},set loading(e){r(e),yt()}},a=ci(),s=xe(a);Br(s,()=>({type:"checkbox",...i}),void 0,void 0,void 0,0,!0),ei(s,e=>n=e,()=>n);var l=Te(s,2);return de(2),fe(a),_n(()=>Yr(a,"data-loading",r())),Un("click",l,function(){n?.click()}),er(e,a),Q(o)}Hn(["click"]),si(ui,{loading:{}},[],[],{mode:"open"});var fi=new Set(["$$slots","$$events","$$legacy","$$host","loading"]),di=Wn('<div class="altcha-checkbox-native"><input/> <div class="altcha-spinner altcha-checkbox-native-spinner"></div></div>');function hi(e,t){K(t,!0);let n=ri(t,"loading"),r=ni(t,fi);var i={get loading(){return n()},set loading(e){n(e),yt()}},o=di();return Br(xe(o),()=>({type:"checkbox",...r}),void 0,void 0,void 0,0,!0),de(2),fe(o),_n(()=>Yr(o,"data-loading",n())),er(e,o),Q(i)}si(hi,{loading:{}},[],[],{mode:"open"});var vi=Wn('<div><a target="_blank" rel="noopener" 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 pi(e,t){K(t,!0);let n=ri(t,"strings");var r={get strings(){return n()},set strings(e){n(e),yt()}},i=vi(),o=xe(i);return Yr(o,"href","https://altcha.org"),fe(i),_n(()=>Yr(o,"aria-label",n().ariaLinkLabel)),er(e,i),Q(r)}si(pi,{strings:{}},[],[],{mode:"open"});var gi=Wn('<div class="altcha-footer"><p></p> <!></div>');function mi(e,t){K(t,!0);let n=ri(t,"logo"),r=ri(t,"strings");var i={get logo(){return n()},set logo(e){n(e),yt()},get strings(){return r()},set strings(e){r(e),yt()}},o=gi(),a=xe(o);br(a,()=>r().footer,!0),fe(a);var s=Te(a,2),l=e=>{pi(e,{get strings(){return r()}})};return mr(s,e=>{n()&&e(l)}),fe(o),er(e,o),Q(i)}si(mi,{logo:{},strings:{}},[],[],{mode:"open"});var yi=new Set(["$$slots","$$events","$$legacy","$$host","loading"]),bi=Wn('<div class="altcha-switch"><input/> <div class="altcha-switch-toggle"><div class="altcha-spinner altcha-switch-spinner"></div></div></div>');function wi(e,t){K(t,!0);let n,r=ri(t,"loading"),i=ni(t,yi);var o={get loading(){return r()},set loading(e){r(e),yt()}},a=bi(),s=xe(a);Br(s,()=>({type:"checkbox",...i}),void 0,void 0,void 0,0,!0),ei(s,e=>n=e,()=>n);var l=Te(s,2);return fe(a),_n(()=>Yr(a,"data-loading",r())),Un("click",l,function(){n?.click()}),er(e,a),Q(o)}Hn(["click"]),si(wi,{loading:{}},[],[],{mode:"open"});var _i=(e=>(e.ERROR="error",e.LOADING="loading",e.PLAYING="playing",e.PAUSED="paused",e.READY="ready",e))(_i||{}),$i=(e=>(e.SHA_256="SHA-256",e.SHA_384="SHA-384",e.SHA_512="SHA-512",e))($i||{}),Ei=(e=>(e.CODE="code",e.ERROR="error",e.VERIFIED="verified",e.VERIFYING="verifying",e.UNVERIFIED="unverified",e.EXPIRED="expired",e))(Ei||{}),Si=Wn('<div class="altcha-code-challenge-title"> </div>'),ki=Wn('<div class="altcha-spinner"></div>'),Ci=Xn('<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>'),xi=Xn('<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>'),Ii=Xn('<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>'),Oi=Wn('<button type="button" class="altcha-button altcha-button-secondary"><!></button>'),Ti=Wn('<audio hidden="" autoplay=""></audio>'),Ai=Wn('<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 Ri(e,t){K(t,!0);let n=ri(t,"audioUrl"),r=ri(t,"codeChallenge"),i=ri(t,"config"),o=ri(t,"imageUrl"),a=ri(t,"onCancel"),s=ri(t,"onReload"),l=ri(t,"onSubmit"),c=ri(t,"strings"),u=Tt(void 0),f=Tt(void 0),d=Tt(void 0),h=Tt(!1),v=Tt(""),p=Tt(!1);function g(){Rt(u,_i.PAUSED,!0)}function m(e){Rt(u,_i.ERROR,!0)}function y(){Rt(u,_i.READY,!0)}function b(){Rt(u,_i.LOADING,!0)}function w(){Rt(u,_i.PLAYING,!0)}function _(){Rt(u,_i.PAUSED,!0)}function $(e){e.play().catch(e=>{if(!(e instanceof DOMException&&"AbortError"===e.name))throw e})}function E(){cn(f)?cn(u)===_i.LOADING||(cn(f).paused?(n()&&cn(f).src!==n()&&(cn(f).src=n()),cn(f).currentTime=0,$(cn(f))):cn(f).pause()):(Rt(p,!0),requestAnimationFrame(()=>{cn(f)&&n()&&(cn(f).src=n(),$(cn(f)))}))}gr(()=>(i().disableAutoFocus||ln().then(()=>{cn(d)?.focus()}),()=>{cn(f)&&(cn(f).pause(),Rt(f,void 0))}));var S={get audioUrl(){return n()},set audioUrl(e){n(e),yt()},get codeChallenge(){return r()},set codeChallenge(e){r(e),yt()},get config(){return i()},set config(e){i(e),yt()},get imageUrl(){return o()},set imageUrl(e){o(e),yt()},get onCancel(){return a()},set onCancel(e){a(e),yt()},get onReload(){return s()},set onReload(e){s(e),yt()},get onSubmit(){return l()},set onSubmit(e){l(e),yt()},get strings(){return c()},set strings(e){c(e),yt()}},k=Ai(),C=xe(k),x=xe(C),I=e=>{var t=Si(),n=Oe(t,!0);_n(()=>cr(n,c().verificationRequired)),er(e,t)};mr(x,e=>{"standard"!==i().codeChallengeDisplay&&e(I)});var O=Te(x,2),T=Oe(O,!0),A=Te(O,2),R=Te(A,2),P=xe(R);Gr(P),P.disabled=cn(h),ei(P,e=>Rt(d,e),()=>cn(d));var L=Te(P,2),M=e=>{var t=Oi(),n=xe(t),r=e=>{er(e,ki())},i=e=>{er(e,Ci())},o=e=>{er(e,xi())},a=e=>{er(e,Ii())};mr(n,e=>{cn(u)===_i.LOADING?e(r):cn(u)===_i.ERROR?e(i,1):cn(u)===_i.PLAYING?e(o,2):e(a,-1)}),fe(t),_n(()=>{Yr(t,"title",c().getAudioChallenge),t.disabled=cn(u)===_i.LOADING||cn(u)===_i.ERROR,Yr(t,"aria-label",cn(u)===_i.LOADING?c().loading:c().getAudioChallenge)}),Fn("click",t,()=>E(),!0),er(e,t)};mr(L,e=>{r().audio&&e(M)});var N=Te(L,2);fe(R);var V=Te(R,2),D=xe(V),j=Oe(D,!0),F=Te(D,2),U=Oe(F,!0);fe(V),fe(C);var H=Te(C,2),q=e=>{var t=Ti();ei(t,e=>Rt(f,e),()=>cn(f)),Fn("error",t,m),Fn("loadstart",t,b),Fn("canplay",t,y),Fn("pause",t,_),Fn("playing",t,w),Fn("ended",t,g),er(e,t)};return mr(H,e=>{cn(p)&&e(q)}),fe(k),_n(()=>{cr(T,c().enterCodeFromImage),Yr(A,"src",o()),Yr(P,"minlength",r().length||1),Yr(P,"maxlength",r().length),Yr(P,"placeholder",c().enterCode),Yr(P,"aria-label",cn(u)===_i.LOADING?c().loading:cn(u)===_i.PLAYING?"":c().enterCodeAria),Yr(P,"aria-live",cn(u)?"assertive":"polite"),Yr(P,"aria-busy",cn(u)===_i.LOADING),Yr(N,"title",c().reload),Yr(N,"aria-label",c().reload),Yr(D,"aria-label",c().verify),cr(j,c().verify),Yr(F,"aria-label",c().cancel),cr(U,c().cancel)}),Fn("submit",C,function(e){e.preventDefault(),e.stopPropagation(),l()?.(cn(v))},!0),Un("keydown",P,function(e){"Space"===e.code?(e.preventDefault(),e.stopPropagation(),E()):"Escape"===e.code&&(e.preventDefault(),e.stopPropagation(),a()?.())}),zr(P,()=>cn(v),e=>Rt(v,e)),Fn("click",N,()=>s()?.(),!0),Fn("click",F,()=>a()?.(),!0),er(e,k),Q(S)}Hn(["keydown"]),si(Ri,{audioUrl:{},codeChallenge:{},config:{},imageUrl:{},onCancel:{},onReload:{},onSubmit:{},strings:{}},[],[],{mode:"open"});var Pi=new Set(["$$slots","$$events","$$legacy","$$host","anchor","children","display","backdrop","onClickOutside","onClickOutsideDelay","onClose","placement","updateUISignal","variant"]),Li=Wn('<div class="altcha-popover-backdrop" data-backdrop=""></div>'),Mi=Wn('<div class="altcha-popover-arrow"></div>'),Ni=Wn('<div role="button" class="altcha-popover-close">&times;</div>'),Vi=Wn('<!> <div><!> <!> <div class="altcha-popover-content"><!></div></div>',1);function Di(e,t){K(t,!0);let n=ri(t,"anchor"),r=ri(t,"children"),i=ri(t,"display",0,"standard"),o=ri(t,"backdrop",0,!1),a=ri(t,"onClickOutside"),s=ri(t,"onClickOutsideDelay",0,600),l=ri(t,"onClose"),c=ri(t,"placement",0,"auto"),u=ri(t,"updateUISignal"),f=ri(t,"variant",0,"neutral"),d=ni(t,Pi),v=Tt(void 0),p=Tt(void 0),g=Tt(!1),m=Tt(0);function y(){l()?.()}function b(){if(n()&&"auto"===c()&&cn(v)){const e=n().getBoundingClientRect(),t=document.documentElement.clientHeight-(e.top+e.height)<cn(v).clientHeight;cn(g)!==t&&Rt(g,t)}}mn(()=>{"auto"!==c()&&Rt(g,"top"===c())}),mn(()=>{u()&&b()}),gr(()=>{const e="bottomsheet"===i()||"overlay"===i();return e&&(cn(p)&&document.body.append(cn(p)),cn(v)&&document.body.append(cn(v))),b(),ln().then(()=>{Rt(m,Date.now(),!0)}),()=>{e&&(cn(p)&&document.body.removeChild(cn(p)),cn(v)&&document.body.removeChild(cn(v)))}});var w={get anchor(){return n()},set anchor(e){n(e),yt()},get children(){return r()},set children(e){r(e),yt()},get display(){return i()},set display(e="standard"){i(e),yt()},get backdrop(){return o()},set backdrop(e=!1){o(e),yt()},get onClickOutside(){return a()},set onClickOutside(e){a(e),yt()},get onClickOutsideDelay(){return s()},set onClickOutsideDelay(e=600){s(e),yt()},get onClose(){return l()},set onClose(e){l(e),yt()},get placement(){return c()},set placement(e="auto"){c(e),yt()},get updateUISignal(){return u()},set updateUISignal(e){u(e),yt()},get variant(){return f()},set variant(e="neutral"){f(e),yt()}},_=Vi();Fn("click",ye,function(e){const t=e.target;cn(v)?.contains(t)||s()&&!(cn(m)+s()<Date.now())||a()?.()},!0),Fn("resize",ye,function(){b()}),Fn("scroll",ye,function(){b()});var $=Ie(_),E=e=>{var t=Li();ei(t,e=>Rt(p,e),()=>cn(p)),er(e,t)};mr($,e=>{o()&&e(E)});var S=Te($,2);Br(S,()=>({...d,class:`altcha-popover ${(t.class||"")??""}`,"data-popover":!0,"data-variant":f(),"data-top":cn(g),"data-display":i()}));var k=xe(S),C=e=>{er(e,Mi())};mr(k,e=>{"standard"===i()&&e(C)});var I=Te(k,2),O=e=>{var t=Ni();Fn("click",t,y,!0),er(e,t)};mr(I,e=>{"standard"!==i()&&e(O)});var T=Te(I,2);return function(e,t,...n){var r=new pr(e);$n(()=>{const e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},x)}(xe(T),()=>r()??h),fe(T),fe(S),ei(S,e=>Rt(v,e),()=>cn(v)),er(e,_),Q(w)}async function ji(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}=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 ji({...e,challenge:t,controller:r,concurrency:n,createWorker:i})}throw n}finally{u()}return r.signal.aborted?null:f||null}si(Di,{anchor:{},children:{},display:{},backdrop:{},onClickOutside:{},onClickOutsideDelay:{},onClose:{},placement:{},updateUISignal:{},variant:{}},[],[],{mode:"open"}),Object.values($i);class Fi{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 Ui=Wn('<div class="altcha-overlay-backdrop" data-backdrop=""></div>'),Hi=Wn('<div class="altcha-overlay-content"></div>'),qi=Wn('<div role="button" class="altcha-overlay-close">&times;</div> <!>',1),Gi=Wn('<div class="altcha-floating-arrow"></div>'),Yi=Wn('<input type="hidden"/>'),Bi=Wn('<div class="altcha-error">Secure context (HTTPS) required.</div>'),Ji=Wn('<div class="altcha-error"> </div>'),Zi=Wn("<!> <!>",1),Wi=Wn('<!> <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.get("altcha-widget")&&customElements.define("altcha-widget",si(function(e,t){K(t,!0);const[n,r]=function(){const e={};return[e,function(){gn(()=>{for(var t in e)e[t].unsubscribe();a(e,qe,{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)=>{ln().then(()=>{d?.dispatchEvent(new CustomEvent(e,{detail:t}))})};let v=null,p=Tt(pe(new URL(location.origin))),g=Tt(!1),m=Tt(null),y=Tt(null),b=Tt(null),w=Tt(pe(Ei.UNVERIFIED)),_=Tt(void 0),$=Tt(void 0),E=Tt(null),S=Tt(void 0),k=Tt(null),C=Tt(null),I=Tt(null),O=Tt(null),T=Tt(pe([])),A=Tt(0),R=Tt(pe({})),P=Tt(!0);const L=tt(()=>({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,...Ge(s,"$altchaDefaults",n),...cn(R)})),M=tt(()=>`altcha-checkbox-${t.id||Math.floor(1e12*Math.random()).toString(16)}`),N=tt(()=>function(e){switch(e){case"checkbox":return ui;case"switch":return wi;default:return hi}}(cn(L).type)),V=tt(()=>cn(L).auto),D=tt(()=>cn(w)===Ei.VERIFYING),j=tt(()=>!cn(L).hideFooter),F=tt(()=>!cn(L).hideLogo&&"bar"!==cn(L).display),U=tt(()=>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]}}(Ge(f,"$altchaI18nStore",n),[cn(L).language,document.documentElement.lang,...navigator.languages])),H=tt(()=>i.includes(cn(U).language)?"rtl":void 0),q=tt(()=>({...cn(U).strings})),G=tt(()=>cn(m)?.audio?.match(/^(https?:)?\//)?ee(cn(m).audio,cn(p),{language:cn(L).audioChallengeLanguage||cn(U).language}).toString():cn(m)?.audio),Y=tt(()=>cn(m)?.image?.match(/^(https?:)?\//)?ee(cn(m).image,cn(p)):cn(m)?.image);async function B(e,...t){let n;for(const r of cn(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=cn(L).challenge,t){const n=await B("onFetchChallenge",e);let r=null;if(void 0!==n)return n;if("string"==typeof e)if(e.startsWith("{")){Se("parsing JSON challenge");try{r=JSON.parse(e)}catch{throw new Error("Unable to parse JSON challenge.")}}else{Se("fetching challenge from",t?.method||"GET",e),Rt(p,new URL(e,location.origin),!0);const n=await cn(L).fetch(e,{credentials:cn(L).credentials||void 0,...t});await we(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){Se("unable to configure from x-altcha-config header",e)}}(i);const o=await n.json();if(o&&"his"in o&&o.his){if(Se("requested HIS"),!v)throw new Error("Server requested HIS data but collector is disabled.");return Z(ee(o.his.url,cn(p)),{body:JSON.stringify({his:v.export()}),headers:{"content-type":"application/json"},method:"POST"})}o&&"hisResult"in o&&o.hisResult&&Se("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 null!==e&&"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(cn(M))}function z(e){return cn(E)?Array.from(cn(E).elements).filter(t=>t.matches(e)):[]}function X(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function ee(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 te(e){!cn(g)&&e.currentTarget.checked?(e.preventDefault(),e.currentTarget.checked=!1,cn(w)!==Ei.VERIFYING&&Pe()):e.currentTarget.checked||(e.preventDefault(),ke())}function ne(e){cn(w)===Ei.VERIFYING?e.currentTarget.setCustomValidity(cn(q).waitAlert):cn(L).validationMessage&&e.currentTarget.setCustomValidity(cn(L).validationMessage)}function re(){me(cn(L).display),ke()}function ie(e){const t=e.target;"onfocus"===cn(V)&&cn(w)===Ei.UNVERIFIED&&cn(E)&&t instanceof Element&&(cn(E).contains(t)||t.form===cn(E))&&Pe()}function oe(){me(cn(L).display),ke()}function de(e){const t=e.target;"true"!==t?.getAttribute("data-code-challenge")&&"onsubmit"===cn(V)&&cn(w)===Ei.UNVERIFIED&&(e.preventDefault(),e.stopPropagation(),Rt(k,e.submitter,!0),Ae(),Pe().then(e=>{e&&!cn(m)&&ln().then(()=>{ge(cn(k))})}))}function ge(e){cn(E)&&"requestSubmit"in cn(E)?cn(E).requestSubmit(e):cn(E)?.reportValidity()&&(e?e.click():cn(E).submit())}function me(e){switch(e){case"bar":case"floating":case"overlay":Ee(),cn(V)&&"off"!==cn(V)||(cn(R).auto="onsubmit");break;case"standard":Ae()}cn(b)!==e&&Rt(b,e,!0)}async function we(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 _e(e){if(!cn(O))return void Ce(Ei.ERROR,"Cannot verify code challenge without PoW payload.");Ce(Ei.VERIFYING);let t=null;if(cn(L).verifyUrl)t=await async function(e,t){const n=await B("onRequestServerVerification",e,t);if(void 0!==n)return n;if(Se("requesting server verification from",cn(L).verifyUrl),!cn(L).verifyUrl)throw new Error("Parameter verifyUrl must be set for server verification.");const r=await cn(L).fetch(ee(cn(L).verifyUrl,cn(p)),{body:JSON.stringify({code:t,fields:cn(L).serverVerificationFields?z('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:cn(L).serverVerificationTimeZone?X():void 0}),credentials:cn(L).credentials||void 0,headers:{"Content-Type":"application/json"},method:"POST"});await we(r);const i=await r.json();return i&&"object"==typeof i&&"payload"in i&&i.payload&&h("serververification",i),i}(cn(O),e);else{if(!cn(L).verifyFunction)return void Ce(Ei.ERROR,"Parameter verifyUrl is required for code challenge verification.");t=await cn(L).verifyFunction(cn(O),e)}t?.payload&&(Rt(O,t.payload,!0),Se("server payload",cn(O))),!0===t?.verified?(Se("verified"),Ce(Ei.VERIFIED),h("verified",{payload:cn(O)}),"onsubmit"===cn(V)&&ln().then(()=>{ge(cn(k))})):Ce(Ei.ERROR,t?.reason||"Verification failed."),cn(L).disableAutoFocus||W()?.focus()}function $e(e){Object.assign(cn(R),{...Object.fromEntries(Object.entries(e).filter(([e,t])=>void 0!==t))})}function Ee(){Rt(P,!1)}function Se(...e){(cn(L).debug||e.some(e=>e instanceof Error))&&console[e[0]instanceof Error?"error":"log"]("ALTCHA",`[name=${cn(L).name}]`,...e)}function ke(e=Ei.UNVERIFIED,t=null){Rt(g,!1),Rt(C,t,!0),Rt(O,null),cn(y)&&cn(y).abort(),cn(I)&&(clearTimeout(cn(I)),Rt(I,null)),Ce(e)}function Ce(e,t=null){Rt(w,e,!0),Rt(C,t,!0),h("statechange",{payload:cn(O),state:cn(w)})}function Ae(){Rt(P,!0),ln().then(()=>{Re()})}function Re(){if("floating"===cn(L).display)return function(e=20){if(!cn(S))return;const t=cn(L).floatingPlacement;if(!cn($)&&(Rt($,(cn(L).floatingAnchor instanceof HTMLElement?cn(L).floatingAnchor:cn(L).floatingAnchor?document.querySelector(cn(L).floatingAnchor):z('input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])')[0])||cn(E),!0),!cn($)))return void Se("unable to find floating anchor element");const n=parseInt(cn(L).floatingOffset,10)||12,r=cn($).getBoundingClientRect(),i=cn(S).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(cn(S).style.setProperty("--altcha-floating-left",`${l}px`),cn(S).style.setProperty("--altcha-floating-top",s?r.top-(i.height+n)+"px":`${r.bottom+n}px`),cn(S).setAttribute("data-floating-position",s?"top":"bottom"),cn(_)){const e=cn(_).getBoundingClientRect();cn(_).style.left=r.left-l+r.width/2-e.width/2+"px"}}();Rt(A,cn(A)+1)}async function Pe(e={}){const{concurrency:t=Math.max(1,cn(L).workers),controller:n=new AbortController,minDuration:r=cn(L).minDuration}=e,i=performance.now();let a=null,s=null,l=!1;const c=await B("onVerify",e);if(void 0!==c)return c;ke(Ei.VERIFYING),Rt(y,n,!0);try{if(!o)throw new Error("Secure context (HTTPS) required.");if(cn(L).mockError)throw new Error("Mock error.");if(cn(L).test)return Se("running test mode with null challenge"),await J(Math.max(0,r-(performance.now()-i))),cn(y)?.signal.aborted?(ke(),null):(Rt(O,btoa(JSON.stringify({challenge:null,solution:null,test:!0})),!0),Se("verified"),Ce(Ei.VERIFIED),h("verified",{payload:cn(O)}),{payload:cn(O)});if(a=await Z(),!a)throw new Error("Failed to fetch challenge.");Se("challenge",a),"configuration"in a&&(Se("re-configuring from challenge",a.configuration),$e(a.configuration)),a.parameters.expiresAt&&function(e){cn(I)&&clearTimeout(cn(I));const t=()=>{cn(w)!==Ei.UNVERIFIED?(Rt(g,!1),Ce(Ei.EXPIRED)):ke(),h("expired")},n=1e3*e-Date.now();n>=1?Rt(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 ji({challenge:a,concurrency:t,controller:n,createWorker:e,counterMode:l?"string":"uint32",onOutOfMemory:e=>{if(Se("out of memory error received"),h("outofmemory"),cn(L).retryOnOutOfMemoryError&&e>1){const t=Math.floor(e/2);return Se(`retrying with ${t} workers...`),t}},timeout:cn(L).timeout}),cn(y)?.signal.aborted)return ke(),null;if(!s)throw new Error("Failed to find solution.");Se("solution",s),await J(Math.max(0,r-(performance.now()-i))),Rt(m,a.codeChallenge||cn(L).codeChallenge||null,!0),Rt(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),cn(m)?(Se("requesting code verification"),Ce(Ei.CODE),h("codechallenge",{codeChallenge:cn(m)})):cn(L).verifyUrl?await _e():(Se("verified"),Ce(Ei.VERIFIED),h("verified",{payload:cn(O)}))}catch(e){return Se("verification failed",e),Ce(Ei.ERROR,String(e)),null}finally{Rt(y,null)}return{challenge:a,payload:cn(O),solution:s}}mn(()=>{$e({auto:t.auto,challenge:t.challenge,display:t.display,language:t.language,name:t.name,type:t.type,workers:t.workers})}),mn(()=>{t.theme?d?.setAttribute("theme",t.theme):d?.removeAttribute("theme")}),mn(()=>{if(t.configuration)try{$e(JSON.parse(t.configuration))}catch{Se("unable to parse the `configuration` attribute (JSON expected)")}}),mn(()=>{cn(b)!==cn(L).display&&me(cn(L).display)}),mn(()=>{cn(g)&&cn(w)===Ei.VERIFYING&&Rt(g,!1)}),mn(()=>{cn(g)||cn(w)!==Ei.VERIFIED||Rt(g,!0)}),mn(()=>{if(!cn(g)){const e=W();e&&e.checked&&(e.checked=!1)}}),mn(()=>{cn(w)===Ei.VERIFIED&&W()?.setCustomValidity("")}),mn(()=>{if("onload"===cn(V)){const e=setTimeout(()=>{Pe()},10);return()=>{e&&clearTimeout(e)}}}),mn(()=>{cn(C)&&Se("error:",cn(C))}),mn(()=>{cn(O)&&cn(L).setCookie&&function(e,t={}){const{domain:n,name:r=cn(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}(cn(O),cn(L).setCookie)}),gr(()=>(Se("mounted","3.5.0"),d&&globalThis.$altcha.instances.add(d),Rt(E,function(){if(t.form){const e=d?.getRootNode(),n=e?.getElementById?.(t.form);return n instanceof HTMLFormElement?n:null}return cn(S)?.closest("form")??null}(),!0),cn(E)?.addEventListener("reset",oe),cn(E)?.addEventListener("submit",de,{capture:!0}),document.addEventListener("focusin",ie),function(){Rt(T,[...globalThis.$altcha.plugins].map(e=>new e(d)),!0),Se("activating plugins",cn(T).map(e=>e.constructor.name));for(const e of cn(T))e.activate()}(),cn(L).humanInteractionSignature&&(Se("human interaction signature enabled"),v=new Fi),h("load"),o||Se("secure context (HTTPS) required"),()=>{!function(){for(const e of cn(T))e.destroy()}(),d&&globalThis.$altcha.instances.delete(d),cn(I)&&clearTimeout(cn(I)),cn(E)?.removeEventListener("reset",oe),cn(E)?.removeEventListener("submit",de,{capture:!0}),document.removeEventListener("focusin",ie),v?.destroy()}));var Le={configure:$e,getConfiguration:function(){return{...cn(L)}},getState:function(){return cn(w)},hide:Ee,log:Se,reset:ke,setState:Ce,show:Ae,updateUI:Re,verify:Pe},Me=Wi();Fn("scroll",be,function(){Re()}),Fn("click",be,function(e){const t=e.target;"floating"!==cn(L).display||!t||d?.contains(t)||t.hasAttribute("data-backdrop")||t.closest("[data-popover]")||cn(w)===Ei.VERIFIED||cn(L).floatingPersist||Ee()}),Fn("pageshow",ye,function(e){e.persisted&&(me(cn(L).display),ke())}),Fn("resize",ye,function(){Re()});var Ne=Ie(Me),Ve=e=>{er(e,Ui())};mr(Ne,e=>{"overlay"===cn(L).display&&cn(P)&&e(Ve)});var De=Te(Ne,2),je=xe(De),Fe=e=>{var t=qi(),n=Ie(t),r=Te(n,2),i=e=>{var t=Hi();br(t,()=>document.querySelector(cn(L).overlayContent)?.innerHTML,!0),fe(t),er(e,t)};mr(r,e=>{cn(L).overlayContent&&e(i)}),Fn("click",n,re,!0),er(e,t)};mr(je,e=>{"overlay"===cn(L).display&&cn(P)&&e(Fe)});var Ue=Te(je,2),He=xe(Ue),Ye=xe(He),Be=xe(Ye);{let e=tt(()=>"standard"===cn(L).display&&"onsubmit"!==cn(V)||cn(w)===Ei.VERIFYING);!function(e,t,n){var r;se&&(r=ae,ue());var i=new pr(e);$n(()=>{var e=t()??null;if(se&&"["===ve(r)!=(null!==e)){var o=he();return ce(o),i.anchor=o,le(!1),i.ensure(e,e&&(t=>n(t,e))),void le(!0)}i.ensure(e,e&&(t=>n(t,e)))},x)}(Be,()=>cn(N),(n,r)=>{r(n,{get id(){return cn(M)},get form(){return t.form},name:"",get required(){return cn(e)},get loading(){return cn(D)},get checked(){return cn(g)},onchange:te,oninvalid:ne})})}var Je=Te(Be,2),Ze=xe(Je),We=e=>{var t=Kn();_n(()=>cr(t,cn(q).verificationRequired)),er(e,t)},ze=e=>{var t=Kn();_n(()=>cr(t,cn(q).verifying)),er(e,t)},Xe=e=>{var t=Kn();_n(()=>cr(t,cn(q).verified)),er(e,t)},Ke=e=>{var t=Kn();_n(()=>cr(t,cn(q).label)),er(e,t)};mr(Ze,e=>{cn(w)===Ei.CODE&&cn(m)?e(We):cn(w)===Ei.VERIFYING?e(ze,1):cn(w)===Ei.VERIFIED?e(Xe,2):e(Ke,-1)}),fe(Je),fe(Ye);var Qe=Te(Ye,2),et=e=>{pi(e,{get strings(){return cn(q)}})};mr(Qe,e=>{cn(F)&&e(et)}),fe(He);var nt=Te(He,2),rt=e=>{{let t=tt(()=>"bar"===cn(L).display&&cn(F));mi(e,{get logo(){return cn(t)},get strings(){return cn(q)}})}};mr(nt,e=>{cn(j)&&e(rt)});var it=Te(nt,2),ot=e=>{var t=Gi();ei(t,e=>Rt(_,e),()=>cn(_)),er(e,t)};mr(it,e=>{"floating"===cn(L).display&&e(ot)});var at=Te(it,2),st=e=>{var n=Yi();Gr(n),_n(()=>{var e,r,i;Yr(n,"form",t.form),Yr(n,"name",cn(L).name),e=n,r=cn(O),(i=Jr(e)).value!==(i.value=r??void 0)&&(e.value!==r||0===r&&e.nodeName===qr)&&(e.value=r??"")}),er(e,n)};mr(at,e=>{cn(L).setCookie||e(st)}),fe(Ue);var lt=Te(Ue,2),ct=e=>{Di(e,{get anchor(){return cn(S)},onClickOutside:()=>{o&&ke()},get placement(){return cn(L).popoverPlacement},role:"alert",variant:"error",get dir(){return cn(H)},get updateUISignal(){return cn(A)},children:(e,t)=>{var n=Qn(),r=Ie(n),i=e=>{er(e,Bi())},a=e=>{var t=Ji(),n=Oe(t,!0);_n(()=>cr(n,cn(q).expired)),er(e,t)},s=e=>{var t=Ji(),n=Oe(t,!0);_n(()=>{Yr(t,"title",cn(C)),cr(n,cn(q).error)}),er(e,t)};mr(r,e=>{cn(C)||o?cn(C)||cn(w)!==Ei.EXPIRED?e(s,-1):e(a,1):e(i)}),er(e,n)},$$slots:{default:!0}})},ut=e=>{var t=Qn();!function(e,t,n){se&&ue();var r=new pr(e);$n(()=>{var e=t();e!=e&&(e=yr),r.ensure(e,n)})}(Ie(t),()=>cn(m),e=>{{let t=tt(()=>"standard"!==cn(L).codeChallengeDisplay);Di(e,{get anchor(){return cn(S)},get backdrop(){return cn(t)},get display(){return cn(L).codeChallengeDisplay},onClose:()=>{ke()},get placement(){return cn(L).popoverPlacement},role:"dialog",get"aria-label"(){return cn(q).verificationRequired},get dir(){return cn(H)},get updateUISignal(){return cn(A)},children:(e,t)=>{var n=Zi(),r=Ie(n);Ri(r,{get audioUrl(){return cn(G)},get imageUrl(){return cn(Y)},onCancel:()=>ke(),onReload:()=>Pe(),onSubmit:e=>_e(e),get codeChallenge(){return cn(m)},get config(){return cn(L)},get strings(){return cn(q)}});var i=Te(r,2),o=e=>{mi(e,{get logo(){return cn(F)},get strings(){return cn(q)}})};mr(i,e=>{cn(j)&&"standard"!==cn(L).codeChallengeDisplay&&e(o)}),er(e,n)},$$slots:{default:!0}})}}),er(e,t)};mr(lt,e=>{cn(C)||cn(w)===Ei.EXPIRED||!o?e(ct):cn(m)&&cn(w)===Ei.CODE&&e(ut,1)}),fe(De),ei(De,e=>Rt(S,e),()=>cn(S)),_n(e=>{Yr(De,"data-state",cn(w)),Yr(De,"data-display",cn(L).display||void 0),Yr(De,"data-placement",e),Yr(De,"data-visible",cn(P)||void 0),Yr(De,"dir",cn(H)),Yr(Je,"for",cn(M)),De.dir=De.dir},[()=>function(e){switch(e){case"bar":return cn(L).barPlacement||"bottom";case"floating":return cn(L).floatingPlacement||"auto";default:return}}(cn(L).display)]),er(e,Me);var ft=Q(Le);return r(),ft},{auto:{type:"String"},challenge:{type:"String"},configuration:{type:"String"},display:{type:"String"},form:{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"]));