altcha 2.2.2 → 2.2.3
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/README.md +3 -2
- package/dist/altcha.d.ts +39 -19
- package/dist/altcha.i18n.d.ts +39 -19
- package/dist/altcha.i18n.js +1461 -1452
- package/dist/altcha.i18n.umd.js +4 -4
- package/dist/altcha.js +1219 -1210
- package/dist/altcha.umd.cjs +4 -4
- package/dist_external/altcha.d.ts +39 -19
- package/dist_external/altcha.js +1196 -1187
- package/dist_external/altcha.umd.cjs +3 -3
- package/package.json +1 -1
package/dist/altcha.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(S,
|
|
2
|
-
`,W=typeof self<"u"&&self.Blob&&new Blob([D],{type:"text/javascript;charset=utf-8"});function Kt(e){let t;try{if(t=W&&(self.URL||self.webkitURL).createObjectURL(W),!t)throw"";const r=new Worker(t,{name:e==null?void 0:e.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(D),{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}const no="5";typeof window<"u"&&((gi=window.__svelte??(window.__svelte={})).v??(gi.v=new Set)).add(no);const io=1,oo=4,ao=8,lo=16,so=1,uo=2,Ar="[",nn="[!",on="]",ht={},ue=Symbol(),fo="http://www.w3.org/1999/xhtml",an=!1;function ln(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}var sn=Array.isArray,co=Array.prototype.indexOf,ho=Array.from,Xt=Object.keys,St=Object.defineProperty,Xe=Object.getOwnPropertyDescriptor,vo=Object.getOwnPropertyDescriptors,go=Object.prototype,po=Array.prototype,un=Object.getPrototypeOf,fn=Object.isExtensible;const vt=()=>{};function cn(e){for(var t=0;t<e.length;t++)e[t]()}function mo(e,t,r=!1){return e===void 0?r?t():t:e}const Ee=2,dn=4,Qt=8,Ir=16,Me=32,Qe=64,er=128,ve=256,tr=512,fe=1024,Se=2048,et=4096,gt=8192,rr=16384,_o=32768,Rr=65536,bo=1<<19,hn=1<<20,Sr=1<<21,$t=Symbol("$state"),vn=Symbol("legacy props"),yo=Symbol("");function wo(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Eo(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Co(e){throw new Error("https://svelte.dev/e/effect_orphan")}function xo(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ko(){throw new Error("https://svelte.dev/e/hydration_failed")}function Ao(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Io(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Ro(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function So(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function nr(e){console.warn("https://svelte.dev/e/hydration_mismatch")}let F=!1;function pt(e){F=e}let M;function je(e){if(e===null)throw nr(),ht;return M=e}function mt(){return je(Be(M))}function Z(e){if(F){if(Be(M)!==null)throw nr(),ht;M=e}}function $o(){for(var e=0,t=M;;){if(t.nodeType===8){var r=t.data;if(r===on){if(e===0)return t;e-=1}else(r===Ar||r===nn)&&(e+=1)}var i=Be(t);t.remove(),t=i}}let To=!1;function qe(e){if(typeof e!="object"||e===null||$t in e)return e;const t=un(e);if(t!==go&&t!==po)return e;var r=new Map,i=sn(e),l=P(0),o=N,f=s=>{var c=N;De(o);var d=s();return De(c),d};return i&&r.set("length",P(e.length)),new Proxy(e,{defineProperty(s,c,d){(!("value"in d)||d.configurable===!1||d.enumerable===!1||d.writable===!1)&&Io();var _=r.get(c);return _===void 0?(_=f(()=>P(d.value)),r.set(c,_)):b(_,f(()=>qe(d.value))),!0},deleteProperty(s,c){var d=r.get(c);if(d===void 0)c in s&&(r.set(c,f(()=>P(ue))),$r(l));else{if(i&&typeof c=="string"){var _=r.get("length"),v=Number(c);Number.isInteger(v)&&v<_.v&&b(_,v)}b(d,ue),$r(l)}return!0},get(s,c,d){var y;if(c===$t)return e;var _=r.get(c),v=c in s;if(_===void 0&&(!v||(y=Xe(s,c))!=null&&y.writable)&&(_=f(()=>P(qe(v?s[c]:ue))),r.set(c,_)),_!==void 0){var m=a(_);return m===ue?void 0:m}return Reflect.get(s,c,d)},getOwnPropertyDescriptor(s,c){var d=Reflect.getOwnPropertyDescriptor(s,c);if(d&&"value"in d){var _=r.get(c);_&&(d.value=a(_))}else if(d===void 0){var v=r.get(c),m=v==null?void 0:v.v;if(v!==void 0&&m!==ue)return{enumerable:!0,configurable:!0,value:m,writable:!0}}return d},has(s,c){var m;if(c===$t)return!0;var d=r.get(c),_=d!==void 0&&d.v!==ue||Reflect.has(s,c);if(d!==void 0||L!==null&&(!_||(m=Xe(s,c))!=null&&m.writable)){d===void 0&&(d=f(()=>P(_?qe(s[c]):ue)),r.set(c,d));var v=a(d);if(v===ue)return!1}return _},set(s,c,d,_){var te;var v=r.get(c),m=c in s;if(i&&c==="length")for(var y=d;y<v.v;y+=1){var T=r.get(y+"");T!==void 0?b(T,ue):y in s&&(T=f(()=>P(ue)),r.set(y+"",T))}v===void 0?(!m||(te=Xe(s,c))!=null&&te.writable)&&(v=f(()=>P(void 0)),b(v,f(()=>qe(d))),r.set(c,v)):(m=v.v!==ue,b(v,f(()=>qe(d))));var E=Reflect.getOwnPropertyDescriptor(s,c);if(E!=null&&E.set&&E.set.call(_,d),!m){if(i&&typeof c=="string"){var q=r.get("length"),pe=Number(c);Number.isInteger(pe)&&pe>=q.v&&b(q,pe+1)}$r(l)}return!0},ownKeys(s){a(l);var c=Reflect.ownKeys(s).filter(v=>{var m=r.get(v);return m===void 0||m.v!==ue});for(var[d,_]of r)_.v!==ue&&!(d in s)&&c.push(d);return c},setPrototypeOf(){Ro()}})}function $r(e,t=1){b(e,e.v+t)}var gn,pn,mn,_n;function Tr(){if(gn===void 0){gn=window,pn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;mn=Xe(t,"firstChild").get,_n=Xe(t,"nextSibling").get,fn(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),fn(r)&&(r.__t=void 0)}}function ir(e=""){return document.createTextNode(e)}function _e(e){return mn.call(e)}function Be(e){return _n.call(e)}function z(e,t){if(!F)return _e(e);var r=_e(M);return r===null&&(r=M.appendChild(ir())),je(r),r}function Tt(e,t){if(!F){var r=_e(e);return r instanceof Comment&&r.data===""?Be(r):r}return M}function J(e,t=1,r=!1){let i=F?M:e;for(var l;t--;)l=i,i=Be(i);if(!F)return i;var o=i==null?void 0:i.nodeType;if(r&&o!==3){var f=ir();return i===null?l==null||l.after(f):i.before(f),je(f),f}return je(i),i}function Do(e){e.textContent=""}function bn(e){return e===this.v}function yn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Dr(e){return!yn(e,this.v)}function or(e){var t=Ee|Se,r=N!==null&&(N.f&Ee)!==0?N:null;return L===null||r!==null&&(r.f&ve)!==0?t|=ve:L.f|=hn,{ctx:ae,deps:null,effects:null,equals:bn,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:r??L}}function Dt(e){const t=or(e);return Pn(t),t}function No(e){const t=or(e);return t.equals=Dr,t}function wn(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)He(t[r])}}function Lo(e){for(var t=e.parent;t!==null;){if((t.f&Ee)===0)return t;t=t.parent}return null}function En(e){var t,r=L;Ge(Lo(e));try{wn(e),t=Un(e)}finally{Ge(r)}return t}function Cn(e){var t=En(e),r=(We||(e.f&ve)!==0)&&e.deps!==null?et:fe;Ce(e,r),e.equals(t)||(e.v=t,e.wv=Fn())}function Po(e){L===null&&N===null&&Co(),N!==null&&(N.f&ve)!==0&&L===null&&Eo(),Pt&&wo()}function Oo(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function tt(e,t,r,i=!0){var l=L,o={ctx:ae,deps:null,nodes_start:null,nodes_end:null,f:e|Se,first:null,fn:t,last:null,next:null,parent:l,prev:null,teardown:null,transitions:null,wv:0};if(r)try{Ur(o),o.f|=_o}catch(c){throw He(o),c}else t!==null&&dr(o);var f=r&&o.deps===null&&o.first===null&&o.nodes_start===null&&o.teardown===null&&(o.f&(hn|er))===0;if(!f&&i&&(l!==null&&Oo(o,l),N!==null&&(N.f&Ee)!==0)){var s=N;(s.effects??(s.effects=[])).push(o)}return o}function Nr(e){const t=tt(Qt,null,!1);return Ce(t,fe),t.teardown=e,t}function Lr(e){Po();var t=L!==null&&(L.f&Me)!==0&&ae!==null&&!ae.m;if(t){var r=ae;(r.e??(r.e=[])).push({fn:e,effect:L,reaction:N})}else{var i=Pr(e);return i}}function Fo(e){const t=tt(Qe,e,!0);return()=>{He(t)}}function Mo(e){const t=tt(Qe,e,!0);return(r={})=>new Promise(i=>{r.outro?Mr(t,()=>{He(t),i(void 0)}):(He(t),i(void 0))})}function Pr(e){return tt(dn,e,!1)}function Or(e){return tt(Qt,e,!0)}function $e(e,t=[],r=or){const i=t.map(r);return xn(()=>e(...i.map(a)))}function xn(e,t=0){return tt(Qt|Ir|t,e,!0)}function Fr(e,t=!0){return tt(Qt|Me,e,!0,t)}function kn(e){var t=e.teardown;if(t!==null){const r=Pt,i=N;Ln(!0),De(null);try{t.call(null)}finally{Ln(r),De(i)}}}function An(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){var i=r.next;(r.f&Qe)!==0?r.parent=null:He(r,t),r=i}}function Vo(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&Me)===0&&He(t),t=r}}function He(e,t=!0){var r=!1;(t||(e.f&bo)!==0)&&e.nodes_start!==null&&(In(e.nodes_start,e.nodes_end),r=!0),An(e,t&&!r),cr(e,0),Ce(e,rr);var i=e.transitions;if(i!==null)for(const o of i)o.stop();kn(e);var l=e.parent;l!==null&&l.first!==null&&Rn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function In(e,t){for(;e!==null;){var r=e===t?null:Be(e);e.remove(),e=r}}function Rn(e){var t=e.parent,r=e.prev,i=e.next;r!==null&&(r.next=i),i!==null&&(i.prev=r),t!==null&&(t.first===e&&(t.first=i),t.last===e&&(t.last=r))}function Mr(e,t){var r=[];Sn(e,r,!0),Uo(r,()=>{He(e),t&&t()})}function Uo(e,t){var r=e.length;if(r>0){var i=()=>--r||t();for(var l of e)l.out(i)}else t()}function Sn(e,t,r){if((e.f>)===0){if(e.f^=gt,e.transitions!==null)for(const f of e.transitions)(f.is_global||r)&&t.push(f);for(var i=e.first;i!==null;){var l=i.next,o=(i.f&Rr)!==0||(i.f&Me)!==0;Sn(i,t,o?r:!1),i=l}}}function $n(e){Tn(e,!0)}function Tn(e,t){if((e.f>)!==0){e.f^=gt,(e.f&fe)===0&&(e.f^=fe),Ft(e)&&(Ce(e,Se),dr(e));for(var r=e.first;r!==null;){var i=r.next,l=(r.f&Rr)!==0||(r.f&Me)!==0;Tn(r,l?t:!1),r=i}if(e.transitions!==null)for(const o of e.transitions)(o.is_global||t)&&o.in()}}const jo=typeof requestIdleCallback>"u"?e=>setTimeout(e,1):requestIdleCallback;let Nt=[],Lt=[];function Dn(){var e=Nt;Nt=[],cn(e)}function Nn(){var e=Lt;Lt=[],cn(e)}function Vr(e){Nt.length===0&&queueMicrotask(Dn),Nt.push(e)}function qo(e){Lt.length===0&&jo(Nn),Lt.push(e)}function Bo(){Nt.length>0&&Dn(),Lt.length>0&&Nn()}let ar=!1,lr=!1,sr=null,rt=!1,Pt=!1;function Ln(e){Pt=e}let Ot=[],Vl=[],N=null,Te=!1;function De(e){N=e}let L=null;function Ge(e){L=e}let ie=null;function Pn(e){N!==null&&N.f&Sr&&(ie===null?ie=[e]:ie.push(e))}let oe=null,ge=0,be=null;function Ho(e){be=e}let On=1,ur=0,We=!1;function Fn(){return++On}function Ft(e){var v;var t=e.f;if((t&Se)!==0)return!0;if((t&et)!==0){var r=e.deps,i=(t&ve)!==0;if(r!==null){var l,o,f=(t&tr)!==0,s=i&&L!==null&&!We,c=r.length;if(f||s){var d=e,_=d.parent;for(l=0;l<c;l++)o=r[l],(f||!((v=o==null?void 0:o.reactions)!=null&&v.includes(d)))&&(o.reactions??(o.reactions=[])).push(d);f&&(d.f^=tr),s&&_!==null&&(_.f&ve)===0&&(d.f^=ve)}for(l=0;l<c;l++)if(o=r[l],Ft(o)&&Cn(o),o.wv>e.wv)return!0}(!i||L!==null&&!We)&&Ce(e,fe)}return!1}function Go(e,t){for(var r=t;r!==null;){if((r.f&er)!==0)try{r.fn(e);return}catch{r.f^=er}r=r.parent}throw ar=!1,e}function Mn(e){return(e.f&rr)===0&&(e.parent===null||(e.parent.f&er)===0)}function fr(e,t,r,i){if(ar){if(r===null&&(ar=!1),Mn(t))throw e;return}if(r!==null&&(ar=!0),Go(e,t),Mn(t))throw e}function Vn(e,t,r=!0){var i=e.reactions;if(i!==null)for(var l=0;l<i.length;l++){var o=i[l];ie!=null&&ie.includes(e)||((o.f&Ee)!==0?Vn(o,t,!1):t===o&&(r?Ce(o,Se):(o.f&fe)!==0&&Ce(o,et),dr(o)))}}function Un(e){var y;var t=oe,r=ge,i=be,l=N,o=We,f=ie,s=ae,c=Te,d=e.f;oe=null,ge=0,be=null,We=(d&ve)!==0&&(Te||!rt||N===null),N=(d&(Me|Qe))===0?e:null,ie=null,Hn(e.ctx),Te=!1,ur++,e.f|=Sr;try{var _=(0,e.fn)(),v=e.deps;if(oe!==null){var m;if(cr(e,ge),v!==null&&ge>0)for(v.length=ge+oe.length,m=0;m<oe.length;m++)v[ge+m]=oe[m];else e.deps=v=oe;if(!We)for(m=ge;m<v.length;m++)((y=v[m]).reactions??(y.reactions=[])).push(e)}else v!==null&&ge<v.length&&(cr(e,ge),v.length=ge);if(Yn()&&be!==null&&!Te&&v!==null&&(e.f&(Ee|et|Se))===0)for(m=0;m<be.length;m++)Vn(be[m],e);return l!==null&&l!==e&&(ur++,be!==null&&(i===null?i=be:i.push(...be))),_}finally{oe=t,ge=r,be=i,N=l,We=o,ie=f,Hn(s),Te=c,e.f^=Sr}}function Wo(e,t){let r=t.reactions;if(r!==null){var i=co.call(r,e);if(i!==-1){var l=r.length-1;l===0?r=t.reactions=null:(r[i]=r[l],r.pop())}}r===null&&(t.f&Ee)!==0&&(oe===null||!oe.includes(t))&&(Ce(t,et),(t.f&(ve|tr))===0&&(t.f^=tr),wn(t),cr(t,0))}function cr(e,t){var r=e.deps;if(r!==null)for(var i=t;i<r.length;i++)Wo(e,r[i])}function Ur(e){var t=e.f;if((t&rr)===0){Ce(e,fe);var r=L,i=ae,l=rt;L=e,rt=!0;try{(t&Ir)!==0?Vo(e):An(e),kn(e);var o=Un(e);e.teardown=typeof o=="function"?o:null,e.wv=On;var f=e.deps,s;an&&To&&e.f&Se}catch(c){fr(c,e,r,i||e.ctx)}finally{rt=l,L=r}}}function Yo(){try{xo()}catch(e){if(sr!==null)fr(e,sr,null);else throw e}}function jn(){var e=rt;try{var t=0;for(rt=!0;Ot.length>0;){t++>1e3&&Yo();var r=Ot,i=r.length;Ot=[];for(var l=0;l<i;l++){var o=zo(r[l]);Zo(o)}Mt.clear()}}finally{lr=!1,rt=e,sr=null}}function Zo(e){var t=e.length;if(t!==0)for(var r=0;r<t;r++){var i=e[r];if((i.f&(rr|gt))===0)try{Ft(i)&&(Ur(i),i.deps===null&&i.first===null&&i.nodes_start===null&&(i.teardown===null?Rn(i):i.fn=null))}catch(l){fr(l,i,null,i.ctx)}}}function dr(e){lr||(lr=!0,queueMicrotask(jn));for(var t=sr=e;t.parent!==null;){t=t.parent;var r=t.f;if((r&(Qe|Me))!==0){if((r&fe)===0)return;t.f^=fe}}Ot.push(t)}function zo(e){for(var t=[],r=e;r!==null;){var i=r.f,l=(i&(Me|Qe))!==0,o=l&&(i&fe)!==0;if(!o&&(i>)===0){if((i&dn)!==0)t.push(r);else if(l)r.f^=fe;else try{Ft(r)&&Ur(r)}catch(c){fr(c,r,null,r.ctx)}var f=r.first;if(f!==null){r=f;continue}}var s=r.parent;for(r=r.next;r===null&&s!==null;)r=s.next,s=s.parent}return t}function x(e){for(var t;;){if(Bo(),Ot.length===0)return t;lr=!0,jn()}}async function jr(){await Promise.resolve(),x()}function a(e){var t=e.f,r=(t&Ee)!==0;if(N!==null&&!Te){if(!(ie!=null&&ie.includes(e))){var i=N.deps;e.rv<ur&&(e.rv=ur,oe===null&&i!==null&&i[ge]===e?ge++:oe===null?oe=[e]:(!We||!oe.includes(e))&&oe.push(e))}}else if(r&&e.deps===null&&e.effects===null){var l=e,o=l.parent;o!==null&&(o.f&ve)===0&&(l.f^=ve)}return r&&(l=e,Ft(l)&&Cn(l)),Pt&&Mt.has(e)?Mt.get(e):e.v}function nt(e){var t=Te;try{return Te=!0,e()}finally{Te=t}}const Jo=-7169;function Ce(e,t){e.f=e.f&Jo|t}const Mt=new Map;function qn(e,t){var r={f:0,v:e,reactions:null,equals:bn,rv:0,wv:0};return r}function P(e,t){const r=qn(e);return Pn(r),r}function qr(e,t=!1){const r=qn(e);return t||(r.equals=Dr),r}function b(e,t,r=!1){N!==null&&!Te&&Yn()&&(N.f&(Ee|Ir))!==0&&!(ie!=null&&ie.includes(e))&&So();let i=r?qe(t):t;return Ko(e,i)}function Ko(e,t){if(!e.equals(t)){var r=e.v;Pt?Mt.set(e,t):Mt.set(e,r),e.v=t,(e.f&Ee)!==0&&((e.f&Se)!==0&&En(e),Ce(e,(e.f&ve)===0?fe:et)),e.wv=Fn(),Bn(e,Se),L!==null&&(L.f&fe)!==0&&(L.f&(Me|Qe))===0&&(be===null?Ho([e]):be.push(e))}return t}function Bn(e,t){var r=e.reactions;if(r!==null)for(var i=r.length,l=0;l<i;l++){var o=r[l],f=o.f;(f&Se)===0&&(Ce(o,t),(f&(fe|ve))!==0&&((f&Ee)!==0?Bn(o,et):dr(o)))}}let ae=null;function Hn(e){ae=e}function Gn(e,t=!1,r){var i=ae={p:ae,c:null,d:!1,e:null,m:!1,s:e,x:null,l:null};Nr(()=>{i.d=!0})}function Wn(e){const t=ae;if(t!==null){e!==void 0&&(t.x=e);const f=t.e;if(f!==null){var r=L,i=N;t.e=null;try{for(var l=0;l<f.length;l++){var o=f[l];Ge(o.effect),De(o.reaction),Pr(o.fn)}}finally{Ge(r),De(i)}}ae=t.p,t.m=!0}return e||{}}function Yn(){return!0}const Xo=["touchstart","touchmove"];function Qo(e){return Xo.includes(e)}function ea(e,t){if(t){const r=document.body;e.autofocus=!0,Vr(()=>{document.activeElement===r&&e.focus()})}}let Zn=!1;function zn(){Zn||(Zn=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const r of e.target.elements)(t=r.__on_r)==null||t.call(r)})},{capture:!0}))}function Jn(e){var t=N,r=L;De(null),Ge(null);try{return e()}finally{De(t),Ge(r)}}function ta(e,t,r,i=r){e.addEventListener(t,()=>Jn(r));const l=e.__on_r;l?e.__on_r=()=>{l(),i(!0)}:e.__on_r=()=>i(!0),zn()}const Kn=new Set,Br=new Set;function ra(e,t,r,i={}){function l(o){if(i.capture||Vt.call(t,o),!o.cancelBubble)return Jn(()=>r==null?void 0:r.call(this,o))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Vr(()=>{t.addEventListener(e,l,i)}):t.addEventListener(e,l,i),l}function Ye(e,t,r,i,l){var o={capture:i,passive:l},f=ra(e,t,r,o);(t===document.body||t===window||t===document)&&Nr(()=>{t.removeEventListener(e,f,o)})}function na(e){for(var t=0;t<e.length;t++)Kn.add(e[t]);for(var r of Br)r(e)}function Vt(e){var te;var t=this,r=t.ownerDocument,i=e.type,l=((te=e.composedPath)==null?void 0:te.call(e))||[],o=l[0]||e.target,f=0,s=e.__root;if(s){var c=l.indexOf(s);if(c!==-1&&(t===document||t===window)){e.__root=t;return}var d=l.indexOf(t);if(d===-1)return;c<=d&&(f=c)}if(o=l[f]||e.target,o!==t){St(e,"currentTarget",{configurable:!0,get(){return o||r}});var _=N,v=L;De(null),Ge(null);try{for(var m,y=[];o!==null;){var T=o.assignedSlot||o.parentNode||o.host||null;try{var E=o["__"+i];if(E!=null&&(!o.disabled||e.target===o))if(sn(E)){var[q,...pe]=E;q.apply(o,[e,...pe])}else E.call(o,e)}catch(le){m?y.push(le):m=le}if(e.cancelBubble||T===t||T===null)break;o=T}if(m){for(let le of y)queueMicrotask(()=>{throw le});throw m}}finally{e.__root=t,delete e.currentTarget,De(_),Ge(v)}}}function Hr(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function Ne(e,t){var r=L;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function xe(e,t){var r=(t&so)!==0,i=(t&uo)!==0,l,o=!e.startsWith("<!>");return()=>{if(F)return Ne(M,null),M;l===void 0&&(l=Hr(o?e:"<!>"+e),r||(l=_e(l)));var f=i||pn?document.importNode(l,!0):l.cloneNode(!0);if(r){var s=_e(f),c=f.lastChild;Ne(s,c)}else Ne(f,f);return f}}function hr(e,t,r="svg"){var i=!e.startsWith("<!>"),l=`<${r}>${i?e:"<!>"+e}</${r}>`,o;return()=>{if(F)return Ne(M,null),M;if(!o){var f=Hr(l),s=_e(f);o=_e(s)}var c=o.cloneNode(!0);return Ne(c,c),c}}function vr(){if(F)return Ne(M,null),M;var e=document.createDocumentFragment(),t=document.createComment(""),r=ir();return e.append(t,r),Ne(t,r),e}function B(e,t){if(F){L.nodes_end=M,mt();return}e!==null&&e.before(t)}function ia(e,t){var r=t==null?"":typeof t=="object"?t+"":t;r!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=r,e.nodeValue=r+"")}function Xn(e,t){return Qn(e,t)}function oa(e,t){Tr(),t.intro=t.intro??!1;const r=t.target,i=F,l=M;try{for(var o=_e(r);o&&(o.nodeType!==8||o.data!==Ar);)o=Be(o);if(!o)throw ht;pt(!0),je(o),mt();const f=Qn(e,{...t,anchor:o});if(M===null||M.nodeType!==8||M.data!==on)throw nr(),ht;return pt(!1),f}catch(f){if(f===ht)return t.recover===!1&&ko(),Tr(),Do(r),pt(!1),Xn(e,t);throw f}finally{pt(i),je(l)}}const _t=new Map;function Qn(e,{target:t,anchor:r,props:i={},events:l,context:o,intro:f=!0}){Tr();var s=new Set,c=v=>{for(var m=0;m<v.length;m++){var y=v[m];if(!s.has(y)){s.add(y);var T=Qo(y);t.addEventListener(y,Vt,{passive:T});var E=_t.get(y);E===void 0?(document.addEventListener(y,Vt,{passive:T}),_t.set(y,1)):_t.set(y,E+1)}}};c(ho(Kn)),Br.add(c);var d=void 0,_=Mo(()=>{var v=r??t.appendChild(ir());return Fr(()=>{if(o){Gn({});var m=ae;m.c=o}l&&(i.$$events=l),F&&Ne(v,null),d=e(v,i)||{},F&&(L.nodes_end=M),o&&Wn()}),()=>{var T;for(var m of s){t.removeEventListener(m,Vt);var y=_t.get(m);--y===0?(document.removeEventListener(m,Vt),_t.delete(m)):_t.set(m,y)}Br.delete(c),v!==r&&((T=v.parentNode)==null||T.removeChild(v))}});return Gr.set(d,_),d}let Gr=new WeakMap;function aa(e,t){const r=Gr.get(e);return r?(Gr.delete(e),r(t)):Promise.resolve()}function K(e,t,[r,i]=[0,0]){F&&r===0&&mt();var l=e,o=null,f=null,s=ue,c=r>0?Rr:0,d=!1;const _=(m,y=!0)=>{d=!0,v(y,m)},v=(m,y)=>{if(s===(s=m))return;let T=!1;if(F&&i!==-1){if(r===0){const q=l.data;q===Ar?i=0:q===nn?i=1/0:(i=parseInt(q.substring(1)),i!==i&&(i=s?1/0:-1))}const E=i>r;!!s===E&&(l=$o(),je(l),pt(!1),T=!0,i=-1)}s?(o?$n(o):y&&(o=Fr(()=>y(l))),f&&Mr(f,()=>{f=null})):(f?$n(f):y&&(f=Fr(()=>y(l,[r+1,i]))),o&&Mr(o,()=>{o=null})),T&&pt(!0)};xn(()=>{d=!1,t(_),d||v(null,null)},c),F&&(l=M)}function it(e,t,r=!1,i=!1,l=!1){var o=e,f="";$e(()=>{var s=L;if(f===(f=t()??"")){F&&mt();return}if(s.nodes_start!==null&&(In(s.nodes_start,s.nodes_end),s.nodes_start=s.nodes_end=null),f!==""){if(F){M.data;for(var c=mt(),d=c;c!==null&&(c.nodeType!==8||c.data!=="");)d=c,c=Be(c);if(c===null)throw nr(),ht;Ne(M,d),o=je(c);return}var _=f+"";r?_=`<svg>${_}</svg>`:i&&(_=`<math>${_}</math>`);var v=Hr(_);if((r||i)&&(v=_e(v)),Ne(_e(v),v.lastChild),r||i)for(;_e(v);)o.before(_e(v));else o.before(v)}})}function la(e,t,r,i,l){var s;F&&mt();var o=(s=t.$$slots)==null?void 0:s[r],f=!1;o===!0&&(o=t.children,f=!0),o===void 0||o(e,f?()=>i:i)}const ei=[...`
|
|
3
|
-
\r\f \v\uFEFF`];function sa(e,t,r){var i=""+e;if(r){for(var l in r)if(r[l])i=i?i+" "+l:l;else if(i.length)for(var o=l.length,f=0;(f=i.indexOf(l,f))>=0;){var s=f+o;(f===0||ei.includes(i[f-1]))&&(s===i.length||ei.includes(i[s]))?i=(f===0?"":i.substring(0,f))+i.substring(s+1):f=s}}return i===""?null:i}function ua(e,t,r,i,l,o){var f=e.__className;if(F||f!==r||f===void 0){var s=sa(r,i,o);(!F||s!==e.getAttribute("class"))&&(s==null?e.removeAttribute("class"):e.className=s),e.__className=r}else if(o&&l!==o)for(var c in o){var d=!!o[c];(l==null||d!==!!l[c])&&e.classList.toggle(c,d)}return o}const fa=Symbol("is custom element"),ca=Symbol("is html");function ti(e){if(F){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var i=e.value;$(e,"value",null),e.value=i}if(e.hasAttribute("checked")){var l=e.checked;$(e,"checked",null),e.checked=l}}};e.__on_r=r,qo(r),zn()}}function da(e,t){var r=ri(e);r.value===(r.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!=="PROGRESS")||(e.value=t??"")}function $(e,t,r,i){var l=ri(e);F&&(l[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||l[t]!==(l[t]=r)&&(t==="loading"&&(e[yo]=r),r==null?e.removeAttribute(t):typeof r!="string"&&ha(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function ri(e){return e.__attributes??(e.__attributes={[fa]:e.nodeName.includes("-"),[ca]:e.namespaceURI===fo})}var ni=new Map;function ha(e){var t=ni.get(e.nodeName);if(t)return t;ni.set(e.nodeName,t=[]);for(var r,i=e,l=Element.prototype;l!==i;){r=vo(i);for(var o in r)r[o].set&&t.push(o);i=un(i)}return t}function va(e,t,r=t){ta(e,"change",i=>{var l=i?e.defaultChecked:e.checked;r(l)}),(F&&e.defaultChecked!==e.checked||nt(t)==null)&&r(e.checked),Or(()=>{var i=t();e.checked=!!i})}function ii(e,t){return e===t||(e==null?void 0:e[$t])===t}function gr(e={},t,r,i){return Pr(()=>{var l,o;return Or(()=>{l=o,o=[],nt(()=>{e!==r(...o)&&(t(e,...o),l&&ii(r(...l),e)&&t(null,...l))})}),()=>{Vr(()=>{o&&ii(r(...o),e)&&t(null,...o)})}}),e}function oi(e){ae===null&&ln(),Lr(()=>{const t=nt(e);if(typeof t=="function")return t})}function ga(e){ae===null&&ln(),oi(()=>()=>nt(e))}function ai(e,t,r){if(e==null)return t(void 0),vt;const i=nt(()=>e.subscribe(t,r));return i.unsubscribe?()=>i.unsubscribe():i}const bt=[];function pa(e,t=vt){let r=null;const i=new Set;function l(s){if(yn(e,s)&&(e=s,r)){const c=!bt.length;for(const d of i)d[1](),bt.push(d,e);if(c){for(let d=0;d<bt.length;d+=2)bt[d][0](bt[d+1]);bt.length=0}}}function o(s){l(s(e))}function f(s,c=vt){const d=[s,c];return i.add(d),i.size===1&&(r=t(l,o)||vt),s(e),()=>{i.delete(d),i.size===0&&r&&(r(),r=null)}}return{set:l,update:o,subscribe:f}}function pr(e){let t;return ai(e,r=>t=r)(),t}let mr=!1,Wr=Symbol();function ma(e,t,r){const i=r[t]??(r[t]={store:null,source:qr(void 0),unsubscribe:vt});if(i.store!==e&&!(Wr in r))if(i.unsubscribe(),i.store=e??null,e==null)i.source.v=void 0,i.unsubscribe=vt;else{var l=!0;i.unsubscribe=ai(e,o=>{l?i.source.v=o:b(i.source,o)}),l=!1}return e&&Wr in r?pr(e):a(i.source)}function _a(){const e={};function t(){Nr(()=>{for(var r in e)e[r].unsubscribe();St(e,Wr,{enumerable:!1,value:!0})})}return[e,t]}function ba(e){var t=mr;try{return mr=!1,[e(),mr]}finally{mr=t}}function li(e){var t;return((t=e.ctx)==null?void 0:t.d)??!1}function k(e,t,r,i){var yt;var l=(r&io)!==0,o=!0,f=(r&ao)!==0,s=(r&lo)!==0,c=!1,d;f?[d,c]=ba(()=>e[t]):d=e[t];var _=$t in e||vn in e,v=f&&(((yt=Xe(e,t))==null?void 0:yt.set)??(_&&t in e&&(H=>e[t]=H)))||void 0,m=i,y=!0,T=!1,E=()=>(T=!0,y&&(y=!1,s?m=nt(i):m=i),m);d===void 0&&i!==void 0&&(v&&o&&Ao(),d=E(),v&&v(d));var q;if(q=()=>{var H=e[t];return H===void 0?E():(y=!0,T=!1,H)},(r&oo)===0)return q;if(v){var pe=e.$$legacy;return function(H,ce){return arguments.length>0?((!ce||pe||c)&&v(ce?q():H),H):q()}}var te=!1,le=qr(d),re=or(()=>{var H=q(),ce=a(le);return te?(te=!1,ce):le.v=H});return f&&a(re),l||(re.equals=Dr),function(H,ce){if(arguments.length>0){const ke=ce?a(re):f?qe(H):H;if(!re.equals(ke)){if(te=!0,b(le,ke),T&&m!==void 0&&(m=ke),li(re))return H;nt(()=>a(re))}return H}return li(re)?re.v:a(re)}}function ya(e){return new wa(e)}class wa{constructor(t){tn(this,Ve);tn(this,ye);var o;var r=new Map,i=(f,s)=>{var c=qr(s);return r.set(f,c),c};const l=new Proxy({...t.props||{},$$events:{}},{get(f,s){return a(r.get(s)??i(s,Reflect.get(f,s)))},has(f,s){return s===vn?!0:(a(r.get(s)??i(s,Reflect.get(f,s))),Reflect.has(f,s))},set(f,s,c){return b(r.get(s)??i(s,c),c),Reflect.set(f,s,c)}});rn(this,ye,(t.hydrate?oa:Xn)(t.component,{target:t.target,anchor:t.anchor,props:l,context:t.context,intro:t.intro??!1,recover:t.recover})),(!((o=t==null?void 0:t.props)!=null&&o.$$host)||t.sync===!1)&&x(),rn(this,Ve,l.$$events);for(const f of Object.keys(he(this,ye)))f==="$set"||f==="$destroy"||f==="$on"||St(this,f,{get(){return he(this,ye)[f]},set(s){he(this,ye)[f]=s},enumerable:!0});he(this,ye).$set=f=>{Object.assign(l,f)},he(this,ye).$destroy=()=>{aa(he(this,ye))}}$set(t){he(this,ye).$set(t)}$on(t,r){he(this,Ve)[t]=he(this,Ve)[t]||[];const i=(...l)=>r.call(this,...l);return he(this,Ve)[t].push(i),()=>{he(this,Ve)[t]=he(this,Ve)[t].filter(l=>l!==i)}}$destroy(){he(this,ye).$destroy()}}Ve=new WeakMap,ye=new WeakMap;let si;typeof HTMLElement=="function"&&(si=class extends HTMLElement{constructor(t,r,i){super();Re(this,"$$ctor");Re(this,"$$s");Re(this,"$$c");Re(this,"$$cn",!1);Re(this,"$$d",{});Re(this,"$$r",!1);Re(this,"$$p_d",{});Re(this,"$$l",{});Re(this,"$$l_u",new Map);Re(this,"$$me");this.$$ctor=t,this.$$s=r,i&&this.attachShadow({mode:"open"})}addEventListener(t,r,i){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(r),this.$$c){const l=this.$$c.$on(t,r);this.$$l_u.set(r,l)}super.addEventListener(t,r,i)}removeEventListener(t,r,i){if(super.removeEventListener(t,r,i),this.$$c){const l=this.$$l_u.get(r);l&&(l(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(l){return o=>{const f=document.createElement("slot");l!=="default"&&(f.name=l),B(o,f)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},i=Ea(this);for(const l of this.$$s)l in i&&(l==="default"&&!this.$$d.children?(this.$$d.children=t(l),r.default=!0):r[l]=t(l));for(const l of this.attributes){const o=this.$$g_p(l.name);o in this.$$d||(this.$$d[o]=_r(o,l.value,this.$$p_d,"toProp"))}for(const l in this.$$p_d)!(l in this.$$d)&&this[l]!==void 0&&(this.$$d[l]=this[l],delete this[l]);this.$$c=ya({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=Fo(()=>{Or(()=>{var l;this.$$r=!0;for(const o of Xt(this.$$c)){if(!((l=this.$$p_d[o])!=null&&l.reflect))continue;this.$$d[o]=this.$$c[o];const f=_r(o,this.$$d[o],this.$$p_d,"toAttribute");f==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,f)}this.$$r=!1})});for(const l in this.$$l)for(const o of this.$$l[l]){const f=this.$$c.$on(l,o);this.$$l_u.set(o,f)}this.$$l={}}}attributeChangedCallback(t,r,i){var l;this.$$r||(t=this.$$g_p(t),this.$$d[t]=_r(t,i,this.$$p_d,"toProp"),(l=this.$$c)==null||l.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return Xt(this.$$p_d).find(r=>this.$$p_d[r].attribute===t||!this.$$p_d[r].attribute&&r.toLowerCase()===t)||t}});function _r(e,t,r,i){var o;const l=(o=r[e])==null?void 0:o.type;if(t=l==="Boolean"&&typeof t!="boolean"?t!=null:t,!i||!r[e])return t;if(i==="toAttribute")switch(l){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(l){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Ea(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function Ca(e,t,r,i,l,o){let f=class extends si{constructor(){super(e,r,l),this.$$p_d=t}static get observedAttributes(){return Xt(t).map(s=>(t[s].attribute||s).toLowerCase())}};return Xt(t).forEach(s=>{St(f.prototype,s,{get(){return this.$$c&&s in this.$$c?this.$$c[s]:this.$$d[s]},set(c){var v;c=_r(s,c,t),this.$$d[s]=c;var d=this.$$c;if(d){var _=(v=Xe(d,s))==null?void 0:v.get;_?d[s]=c:d.$set({[s]:c})}}})}),i.forEach(s=>{St(f.prototype,s,{get(){var c;return(c=this.$$c)==null?void 0:c[s]}})}),e.element=f,f}const ui=new TextEncoder;function xa(e){return[...new Uint8Array(e)].map(t=>t.toString(16).padStart(2,"0")).join("")}async function ka(e,t="SHA-256",r=1e5){const i=Date.now().toString(16);e||(e=Math.round(Math.random()*r));const l=await fi(i,e,t);return{algorithm:t,challenge:l,salt:i,signature:""}}async function fi(e,t,r){if(typeof crypto>"u"||!("subtle"in crypto)||!("digest"in crypto.subtle))throw new Error("Web Crypto is not available. Secure context is required (https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts).");return xa(await crypto.subtle.digest(r.toUpperCase(),ui.encode(e+t)))}function Aa(e,t,r="SHA-256",i=1e6,l=0){const o=new AbortController,f=Date.now();return{promise:(async()=>{for(let c=l;c<=i;c+=1){if(o.signal.aborted)return null;if(await fi(t,c,r)===e)return{number:c,took:Date.now()-f}}return null})(),controller:o}}function ci(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function Ia(e){const t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r}function Ra(e,t=12){const r=new Uint8Array(t);for(let i=0;i<t;i++)r[i]=e%256,e=Math.floor(e/256);return r}async function Sa(e,t="",r=1e6,i=0){const l="AES-GCM",o=new AbortController,f=Date.now(),s=async()=>{for(let _=i;_<=r;_+=1){if(o.signal.aborted||!c||!d)return null;try{const v=await crypto.subtle.decrypt({name:l,iv:Ra(_)},c,d);if(v)return{clearText:new TextDecoder().decode(v),took:Date.now()-f}}catch{}}return null};let c=null,d=null;try{d=Ia(e);const _=await crypto.subtle.digest("SHA-256",ui.encode(t));c=await crypto.subtle.importKey("raw",_,l,!1,["decrypt"])}catch{return{promise:Promise.reject(),controller:o}}return{promise:s(),controller:o}}var w=(e=>(e.CODE="code",e.ERROR="error",e.VERIFIED="verified",e.VERIFYING="verifying",e.UNVERIFIED="unverified",e.EXPIRED="expired",e))(w||{}),ee=(e=>(e.ERROR="error",e.LOADING="loading",e.PLAYING="playing",e.PAUSED="paused",e.READY="ready",e))(ee||{});globalThis.altchaPlugins=globalThis.altchaPlugins||[],globalThis.altchaI18n=globalThis.altchaI18n||{get:e=>pr(globalThis.altchaI18n.store)[e],set:(e,t)=>{Object.assign(pr(globalThis.altchaI18n.store),{[e]:t}),globalThis.altchaI18n.store.set(pr(globalThis.altchaI18n.store))},store:pa({})};const $a={ariaLinkLabel:"Visit Altcha.org",enterCode:"Enter code",enterCodeAria:"Enter code you hear. Press Space to play audio.",error:"Verification failed. Try again later.",expired:"Verification expired. Try again.",footer:'Protected by <a href="https://altcha.org/" target="_blank" aria-label="Visit Altcha.org">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."};globalThis.altchaI18n.set("en",$a);const Yr=(e,t)=>{let r=No(()=>mo(t==null?void 0:t(),24));var i=La();$e(()=>{$(i,"width",a(r)),$(i,"height",a(r))}),B(e,i)};function Ta(e,t){e.code==="Space"&&(e.preventDefault(),e.stopImmediatePropagation(),t())}function Da(e,t){e.preventDefault(),t()}function Na(e,t,r,i,l,o,f,s){var c;[w.UNVERIFIED,w.ERROR,w.EXPIRED,w.CODE].includes(a(t))?r()!==!1&&((c=a(i))==null?void 0:c.reportValidity())===!1?b(l,!1):o()?f():s():b(l,!0)}var La=hr('<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" class="altcha-spinner"><path d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z" fill="currentColor" opacity=".25"></path><path d="M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z" fill="currentColor"></path></svg>'),Pa=xe('<input type="hidden">'),Oa=xe('<div><a target="_blank" class="altcha-logo" aria-hidden="true"><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>'),Fa=hr('<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>'),Ma=hr('<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>'),Va=hr('<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>'),Ua=xe('<button type="button" class="altcha-code-challenge-audio"><!></button>'),ja=xe("<audio hidden autoplay><source></audio>"),qa=xe('<div class="altcha-code-challenge" role="dialog"><div class="altcha-code-challenge-arrow"></div> <form data-code-challenge-form="1"><img class="altcha-code-challenge-image" alt=""> <input type="text" autocomplete="off" name="code" class="altcha-code-challenge-input" required> <div class="altcha-code-challenge-buttons"><div class="altcha-code-challenge-buttons-left"><!> <button type="button" class="altcha-code-challenge-reload"><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> <button type="submit" class="altcha-code-challenge-verify"><!> </button></div> <!></form></div>'),Ba=xe("<div><!></div>"),Ha=xe("<div><!></div>"),Ga=xe('<div class="altcha-error"><svg width="14" height="14" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"></path></svg> <!></div>'),Wa=xe('<div class="altcha-footer"><div><!></div></div>'),Ya=xe('<div class="altcha-anchor-arrow"></div>'),Za=xe('<!> <div class="altcha"><div class="altcha-main"><div><!> <input type="checkbox"></div> <label class="altcha-label"><!></label> <!> <!> <!></div> <!> <!> <!></div>',1);function di(e,t){var Qi,eo;Gn(t,!0);const[r,i]=_a(),l=()=>ma(Ja,"$altchaI18nStore",r);let o=k(t,"auto",7,void 0),f=k(t,"blockspam",7,void 0),s=k(t,"challengeurl",7,void 0),c=k(t,"challengejson",7,void 0),d=k(t,"credentials",7,void 0),_=k(t,"customfetch",7,void 0),v=k(t,"debug",7,!1),m=k(t,"delay",7,0),y=k(t,"disableautofocus",7,!1),T=k(t,"expire",7,void 0),E=k(t,"floating",7,void 0),q=k(t,"floatinganchor",7,void 0),pe=k(t,"floatingoffset",7,void 0),te=k(t,"floatingpersist",7,!1),le=k(t,"hidefooter",7,!1),re=k(t,"hidelogo",7,!1),yt=k(t,"id",7,void 0),H=k(t,"language",7,void 0),ce=k(t,"name",7,"altcha"),ke=k(t,"maxnumber",7,1e6),Ut=k(t,"mockerror",7,!1),Ze=k(t,"obfuscated",7,void 0),Ae=k(t,"overlay",7,void 0),jt=k(t,"overlaycontent",7,void 0),br=k(t,"plugins",7,void 0),qt=k(t,"refetchonexpire",7,!0),ot=k(t,"sentinel",7,void 0),Le=k(t,"spamfilter",7,!1),wt=k(t,"strings",7,void 0),we=k(t,"test",7,!1),se=k(t,"verifyurl",7,void 0),Et=k(t,"workers",23,()=>Math.min(16,navigator.hardwareConcurrency||8)),Bt=k(t,"workerurl",7,void 0);const{altchaI18n:za}=globalThis,Ja=za.store,pi=["SHA-256","SHA-384","SHA-512"],Ka="https://altcha.org/",ze=(n,u)=>{t.$$host.dispatchEvent(new CustomEvent(n,{detail:u}))},mi=(eo=(Qi=document.documentElement.lang)==null?void 0:Qi.split("-"))==null?void 0:eo[0],Zr=Dt(()=>{var n;return s()&&new URL(s(),location.origin).host.endsWith(".altcha.org")&&!!((n=s())!=null&&n.includes("apiKey=ckey_"))}),yr=Dt(()=>c()?Di(c()):void 0),Xa=Dt(()=>wt()?Di(wt()):{}),V=Dt(()=>({...wi(l()),...a(Xa)})),_i=Dt(()=>`${yt()||ce()}_checkbox_${Math.round(Math.random()*1e8)}`);let at=P(null),Ht=P(!1),Y=P(null),I=P(qe(w.UNVERIFIED)),U=P(void 0),Gt=P(null),Je=P(null),me=P(null),zr=P(null),Ct=P(null),O=P(null),Wt=P(null),lt=P(null),Pe=null,X=P(null),st=P(!1),Ke=[],Jr=P(!1),Oe=P(null);Lr(()=>{cl(a(lt))}),Lr(()=>{dl(a(I))}),ga(()=>{Qa(),b(Wt,null),a(O)&&(a(O).removeEventListener("submit",Ii),a(O).removeEventListener("reset",Ri),a(O).removeEventListener("focusin",Ai),b(O,null)),Pe&&(clearTimeout(Pe),Pe=null),document.removeEventListener("click",xi),document.removeEventListener("scroll",ki),window.removeEventListener("resize",Ti)}),oi(()=>{var n;R("mounted","2.2.2"),R("workers",Et()),nl(),R("plugins",Ke.length?Ke.map(u=>u.constructor.pluginName).join(", "):"none"),we()&&R("using test mode"),T()&&Kr(T()),o()!==void 0&&R("auto",o()),E()!==void 0&&Oi(E()),b(O,(n=a(U))==null?void 0:n.closest("form"),!0),a(O)&&(a(O).addEventListener("submit",Ii,{capture:!0}),a(O).addEventListener("reset",Ri),(o()==="onfocus"||te()==="focus")&&a(O).addEventListener("focusin",Ai)),Ae()&&Fi(!0),o()==="onload"&&(Ze()?Yt():Ue()),a(Zr)&&(le()||re())&&R("Attributes hidefooter and hidelogo ignored because usage with free API Keys requires attribution."),requestAnimationFrame(()=>{ze("load")})});function wr(n,u){return btoa(JSON.stringify({algorithm:n.algorithm,challenge:n.challenge,number:u.number,salt:n.salt,signature:n.signature,test:we()?!0:void 0,took:u.took}))}function Qa(){for(const n of Ke)n.destroy()}function bi(){s()&&qt()&&a(I)===w.VERIFIED?Ue():ut(w.EXPIRED,a(V).expired)}async function el(){if(Ut())throw R("mocking error"),new Error("Mocked error.");if(a(yr))return R("using provided json data"),Ni(a(yr).salt),a(yr);if(we())return R("generating test challenge",{test:we()}),ka(typeof we()!="boolean"?+we():void 0);{if(!s()&&a(O)){const h=a(O).getAttribute("action");h!=null&&h.includes("/form/")&&s(h+"/altcha")}if(!s())throw new Error("Attribute challengeurl not set.");R("fetching challenge from",s());const n={credentials:typeof d()=="boolean"?"include":d(),headers:Le()!==!1?{"x-altcha-spam-filter":"1"}:{}},u=await yi()(s(),n);if(!u||!(u instanceof Response))throw new Error("Custom fetch function did not return a response.");if(u.status!==200)throw new Error(`Server responded with ${u.status}.`);const g=u.headers.get("X-Altcha-Config"),p=await u.json();if(Ni(p.salt),g)try{const h=JSON.parse(g);h&&typeof h=="object"&&(h.verifyurl&&!h.verifyurl.startsWith("fn:")&&(h.verifyurl=Ci(h.verifyurl)),Ui(h))}catch(h){R("unable to configure from X-Altcha-Config",h)}return p}}function tl(n){var g,p;const u=(g=a(O))==null?void 0:g.querySelector(typeof n=="string"?`input[name="${n}"]`:'input[type="email"]:not([data-no-spamfilter])');return((p=u==null?void 0:u.value)==null?void 0:p.slice(u.value.indexOf("@")))||void 0}function yi(){let n=fetch;if(_())if(R("using customfetch"),typeof _()=="string"){if(n=globalThis[_()]||null,!n)throw new Error(`Custom fetch function not found: ${_()}`)}else n=_();return n}function wi(n,u=[H()||"",document.documentElement.lang||"",...navigator.languages]){const g=Object.keys(n).map(h=>h.toLowerCase()),p=u.reduce((h,C)=>(C=C.toLowerCase(),h||(n[C]?C:null)||g.find(A=>C.split("-")[0]===A.split("-")[0])||null),null);return n[p||"en"]}function rl(){return Le()==="ipAddress"?{blockedCountries:void 0,classifier:void 0,disableRules:void 0,email:!1,expectedCountries:void 0,expectedLanguages:void 0,fields:!1,ipAddress:void 0,text:void 0,timeZone:void 0}:typeof Le()=="object"?Le():{blockedCountries:void 0,classifier:void 0,disableRules:void 0,email:void 0,expectedCountries:void 0,expectedLanguages:void 0,fields:void 0,ipAddress:void 0,text:void 0,timeZone:void 0}}function Ei(n){var g;return[...((g=a(O))==null?void 0:g.querySelectorAll(n!=null&&n.length?n.map(p=>`input[name="${p}"]`).join(", "):'input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])'))||[]].reduce((p,h)=>{const C=h.name,A=h.value;return C&&A&&(p[C]=/\n/.test(A)?A.replace(new RegExp("(?<!\\r)\\n","g"),`\r
|
|
4
|
-
`):A),p},{})}function Ci(n,u){const g=new URL(s()||location.origin),p=new URL(n,g);if(p.search||(p.search=g.search),u)for(const h in u)u[h]!==void 0&&u[h]!==null&&p.searchParams.set(h,u[h]);return p.toString()}function nl(){const n=br()!==void 0?br().split(","):void 0;for(const u of globalThis.altchaPlugins)(!n||n.includes(u.pluginName))&&Ke.push(new u({el:a(U),clarify:Yt,dispatch:ze,getConfiguration:ji,getFloatingAnchor:qi,getState:Bi,log:R,reset:ut,solve:Vi,setState:Fe,setFloatingAnchor:Hi,verify:Ue}))}function R(...n){(v()||n.some(u=>u instanceof Error))&&console[n[0]instanceof Error?"error":"log"]("ALTCHA",`[name=${ce()}]`,...n)}function il(){b(X,ee.PAUSED,!0)}function ol(n){b(X,ee.ERROR,!0)}function al(){b(X,ee.READY,!0)}function ll(){b(X,ee.LOADING,!0)}function sl(){b(X,ee.PLAYING,!0)}function ul(){b(X,ee.PAUSED,!0)}function fl(n){var u;if(n.preventDefault(),n.stopPropagation(),a(Y)){const g=new FormData(n.target),p=String(g.get("code"));if((u=se())!=null&&u.startsWith("fn:")){const h=se().replace(/^fn:/,"");if(R(`calling ${h} function instead of verifyurl`),!(h in globalThis))throw new Error(`Global function "${h}" is undefined.`);return globalThis[h]({challenge:a(Y).challenge,code:p,solution:a(Y).solution})}b(st,!0),Li(wr(a(Y).challenge,a(Y).solution),p).then(({reason:h,verified:C})=>{C?(b(Y,null),Fe(w.VERIFIED),R("verified"),jr().then(()=>{var A;(A=a(zr))==null||A.focus(),ze("verified",{payload:a(Oe)}),o()==="onsubmit"?Pi(a(Wt)):Ae()&&Zt()})):(ut(),b(lt,h||"Verification failed",!0))}).catch(h=>{b(Y,null),Fe(w.ERROR,h),R("sentinel verification failed:",h)}).finally(()=>{b(st,!1)})}}function xi(n){var g;const u=n.target;E()&&u&&!a(U).contains(u)&&(a(I)===w.VERIFIED&&te()===!1||a(I)===w.VERIFIED&&te()==="focus"&&!((g=a(O))!=null&&g.matches(":focus-within"))||o()==="off"&&a(I)===w.UNVERIFIED)&&Zt()}function ki(){E()&&a(I)!==w.UNVERIFIED&&zt()}function cl(n){for(const u of Ke)typeof u.onErrorChange=="function"&&u.onErrorChange(a(lt))}function Ai(n){a(I)===w.UNVERIFIED?Ue():E()&&te()==="focus"&&a(I)===w.VERIFIED&&Er()}function Ii(n){var p;const u=n.target;u!=null&&u.hasAttribute("data-code-challenge-form")||(b(Wt,n.submitter,!0),a(O)&&o()==="onsubmit"?((p=a(Wt))==null||p.blur(),a(I)===w.UNVERIFIED?(n.preventDefault(),n.stopPropagation(),Ue().then(()=>{Pi(a(Wt))})):a(I)!==w.VERIFIED&&(n.preventDefault(),n.stopPropagation(),a(I)===w.VERIFYING&&Si())):a(O)&&E()&&o()==="off"&&a(I)===w.UNVERIFIED&&(n.preventDefault(),n.stopPropagation(),Er()))}function Ri(){ut()}function Si(){a(I)===w.VERIFYING&&a(V).waitAlert&&alert(a(V).waitAlert)}function $i(){a(Je)?a(Je).paused?(a(Je).currentTime=0,a(Je).play()):a(Je).pause():(b(Jr,!0),requestAnimationFrame(()=>{var n;(n=a(Je))==null||n.play()}))}function dl(n){for(const u of Ke)typeof u.onStateChange=="function"&&u.onStateChange(a(I));E()&&a(I)!==w.UNVERIFIED&&requestAnimationFrame(()=>{zt()}),b(Ht,a(I)===w.VERIFIED),Ae()&&a(me)&&(a(I)!==w.UNVERIFIED?Er():Zt())}function Ti(){E()&&zt()}function Di(n){return JSON.parse(n)}function Ni(n){var p;const u=new URLSearchParams((p=n.split("?"))==null?void 0:p[1]),g=u.get("expires")||u.get("expire");if(g){const h=new Date(+g*1e3),C=isNaN(h.getTime())?0:h.getTime()-Date.now();C>0&&Kr(C)}else Pe&&(clearTimeout(Pe),Pe=null)}async function hl(n){if(!se())throw new Error("Attribute verifyurl not set.");R("requesting server verification from",se());const u={payload:n};if(Le()!==!1){const{blockedCountries:h,classifier:C,disableRules:A,email:G,expectedLanguages:j,expectedCountries:ne,fields:de,ipAddress:ct,text:kt,timeZone:dt}=rl();u.blockedCountries=h,u.classifier=C,u.disableRules=A,u.email=G===!1?void 0:tl(G),u.expectedCountries=ne,u.expectedLanguages=j||(mi?[mi]:void 0),u.fields=de===!1?void 0:Ei(de),u.ipAddress=ct===!1?void 0:ct||"auto",u.text=kt,u.timeZone=dt===!1?void 0:dt||ci()}const g=await yi()(se(),{body:JSON.stringify(u),headers:{"content-type":"application/json"},method:"POST"});if(!g||!(g instanceof Response))throw new Error("Custom fetch function did not return a response.");if(g.status!==200)throw new Error(`Server responded with ${g.status}.`);const p=await g.json();if(p!=null&&p.payload&&b(Oe,p.payload,!0),ze("serververification",p),f()&&p.classification==="BAD")throw new Error("SpamFilter returned negative classification.")}async function Li(n,u){if(!se())throw new Error("Attribute verifyurl not set.");R("requesting sentinel verification from",se());const g={code:u,payload:n};ot()&&(g.fields=ot().fields?Ei():void 0,g.timeZone=ot().timeZone?ci():void 0);const p=await fetch(se(),{body:JSON.stringify(g),headers:{"content-type":"application/json"},method:"POST"});if(!p||!(p instanceof Response))throw new Error("Fetch function did not return a response.");if(p.status!==200)throw new Error(`Server responded with ${p.status}.`);const h=await p.json();return h!=null&&h.payload&&b(Oe,h.payload,!0),ze("sentinelverification",h),h}function Pi(n){var u;a(O)&&"requestSubmit"in a(O)?a(O).requestSubmit(n):(u=a(O))!=null&&u.reportValidity()&&(n?n.click():a(O).submit())}function Kr(n){R("expire",n),Pe&&(clearTimeout(Pe),Pe=null),n<1?bi():Pe=setTimeout(bi,n)}function Oi(n){R("floating",n),E()!==n&&(a(U).style.left="",a(U).style.top=""),E(n===!0||n===""?"auto":n===!1||n==="false"?void 0:E()),E()?(o()||o("onsubmit"),document.addEventListener("scroll",ki),document.addEventListener("click",xi),window.addEventListener("resize",Ti)):o()==="onsubmit"&&o(void 0)}function Fi(n){var u,g;if(R("overlay",n),Ae(n),n){if(o()||o("onsubmit"),a(me)&&a(U).parentElement&&a(me).replaceWith(a(U).parentElement),(g=(u=a(U))==null?void 0:u.parentElement)!=null&&g.parentElement){b(me,document.createElement("div"),!0),a(U).parentElement.parentElement.appendChild(a(me));const p=document.createElement("div"),h=document.createElement("button");h.type="button",h.innerHTML="×",h.addEventListener("click",C=>{C.preventDefault(),ut()}),a(me).classList.add("altcha-overlay-backdrop"),h.classList.add("altcha-overlay-close-button"),p.classList.add("altcha-overlay"),a(me).append(p),p.append(h),jt()&&p.append(...document.querySelectorAll(jt())),p.append(a(U).parentElement)}}else a(me)&&a(U).parentElement&&(a(me).replaceWith(a(U).parentElement),a(U).style.display="block")}function Mi(n){if(!n.algorithm)throw new Error("Invalid challenge. Property algorithm is missing.");if(n.signature===void 0)throw new Error("Invalid challenge. Property signature is missing.");if(!pi.includes(n.algorithm.toUpperCase()))throw new Error(`Unknown algorithm value. Allowed values: ${pi.join(", ")}`);if(!n.challenge||n.challenge.length<40)throw new Error("Challenge is too short. Min. 40 chars.");if(!n.salt||n.salt.length<10)throw new Error("Salt is too short. Min. 10 chars.")}async function Vi(n){let u=null,g=null;if("Worker"in window){try{u=vl(n,n.maxNumber||n.maxnumber||ke()),b(at,u.controller,!0),g=await u.promise}catch(p){R(p)}finally{b(at,null)}if(g===null||(g==null?void 0:g.number)!==void 0||"obfuscated"in n)return{data:n,solution:g}}if("obfuscated"in n){const p=await Sa(n.obfuscated,n.key,n.maxNumber||n.maxnumber);return{data:n,solution:await p.promise}}u=Aa(n.challenge,n.salt,n.algorithm,n.maxNumber||n.maxnumber||ke()),b(at,u.controller,!0);try{g=await u.promise}catch(p){R(p)}finally{b(at,null)}return{data:n,solution:g}}function vl(n,u=typeof we()=="number"?we():n.maxNumber||n.maxnumber||ke(),g=Math.ceil(Et())){const p=new AbortController,h=[];g=Math.min(16,u,Math.max(1,g));for(let G=0;G<g;G++)h.push(altchaCreateWorker(Bt()));const C=Math.ceil(u/g);return{promise:(async()=>{const G=await Promise.all(h.map((j,ne)=>{const de=ne*C;return p.signal.addEventListener("abort",()=>{j.postMessage({type:"abort"})}),new Promise(ct=>{j.addEventListener("message",kt=>{if(kt.data)for(const dt of h)dt!==j&&dt.postMessage({type:"abort"});ct(kt.data)}),j.postMessage({payload:n,max:de+C,start:de,type:"work"})})}));for(const j of h)j.terminate();return G.find(j=>!!j)||null})(),controller:p}}async function Yt(){if(!Ze()){Fe(w.ERROR);return}const n=Ke.find(u=>u.constructor.pluginName==="obfuscation");if(!n||!("clarify"in n)){Fe(w.ERROR),R("Plugin `obfuscation` not found. Import `altcha/plugins/obfuscation` to load it.");return}if("clarify"in n&&typeof n.clarify=="function")return n.clarify()}function Ui(n){n.obfuscated!==void 0&&Ze(n.obfuscated),n.auto!==void 0&&(o(n.auto),o()==="onload"&&(Ze()?Yt():Ue())),n.blockspam!==void 0&&f(!!n.blockspam),n.customfetch!==void 0&&_(n.customfetch),n.floatinganchor!==void 0&&q(n.floatinganchor),n.delay!==void 0&&m(n.delay),n.floatingoffset!==void 0&&pe(n.floatingoffset),n.floating!==void 0&&Oi(n.floating),n.expire!==void 0&&(Kr(n.expire),T(n.expire)),n.challenge&&(c(typeof n.challenge=="string"?n.challenge:JSON.stringify(n.challenge)),Mi(a(yr))),n.challengeurl!==void 0&&s(n.challengeurl),n.debug!==void 0&&v(!!n.debug),n.hidefooter!==void 0&&le(!!n.hidefooter),n.hidelogo!==void 0&&re(!!n.hidelogo),n.language!==void 0&&wt(wi(l(),[n.language])),n.maxnumber!==void 0&&ke(+n.maxnumber),n.mockerror!==void 0&&Ut(!!n.mockerror),n.name!==void 0&&ce(n.name),n.overlaycontent!==void 0&&jt(n.overlaycontent),n.overlay!==void 0&&Fi(n.overlay),n.refetchonexpire!==void 0&&qt(!!n.refetchonexpire),n.sentinel!==void 0&&typeof n.sentinel=="object"&&ot(n.sentinel),n.spamfilter!==void 0&&Le(typeof n.spamfilter=="object"?n.spamfilter:!!n.spamfilter),n.strings&&wt(typeof n.strings=="string"?n.strings:JSON.stringify(n.strings)),n.test!==void 0&&we(typeof n.test=="number"?n.test:!!n.test),n.verifyurl!==void 0&&se(n.verifyurl),n.workers!==void 0&&Et(+n.workers),n.workerurl!==void 0&&Bt(n.workerurl)}function ji(){return{auto:o(),blockspam:f(),challengeurl:s(),debug:v(),delay:m(),expire:T(),floating:E(),floatinganchor:q(),floatingoffset:pe(),hidefooter:le(),hidelogo:re(),name:ce(),maxnumber:ke(),mockerror:Ut(),obfuscated:Ze(),overlay:Ae(),refetchonexpire:qt(),spamfilter:Le(),strings:a(V),test:we(),verifyurl:se(),workers:Et(),workerurl:Bt()}}function qi(){return a(Ct)}function gl(n){return Ke.find(u=>u.constructor.pluginName===n)}function Bi(){return a(I)}function Zt(){a(U).style.display="none",Ae()&&a(me)&&(a(me).style.display="none")}function zt(n=20){var u;if(a(U))if(a(Ct)||b(Ct,(q()?document.querySelector(q()):(u=a(O))==null?void 0:u.querySelector('input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])'))||a(O),!0),a(Ct)){const g=parseInt(pe(),10)||12,p=a(Ct).getBoundingClientRect(),h=a(U).getBoundingClientRect(),C=document.documentElement.clientHeight,A=document.documentElement.clientWidth,G=E()==="auto"?p.bottom+h.height+g+n>C:E()==="top",j=Math.max(n,Math.min(A-n-h.width,p.left+p.width/2-h.width/2));if(G?a(U).style.top=`${p.top-(h.height+g)}px`:a(U).style.top=`${p.bottom+g}px`,a(U).style.left=`${j}px`,a(U).setAttribute("data-floating",G?"top":"bottom"),a(Gt)){const ne=a(Gt).getBoundingClientRect();a(Gt).style.left=p.left-j+p.width/2-ne.width/2+"px"}}else R("unable to find floating anchor element")}function ut(n=w.UNVERIFIED,u=null){a(at)&&(a(at).abort(),b(at,null)),b(Ht,!1),b(Oe,null),b(Y,null),b(Jr,!1),b(X,null),Fe(n,u)}function Hi(n){b(Ct,n,!0)}function Fe(n,u=null){b(I,n,!0),b(lt,u,!0),ze("statechange",{payload:a(Oe),state:a(I)})}function Er(){a(U).style.display="block",E()&&zt(),Ae()&&a(me)&&(a(me).style.display="flex")}async function Ue(){return ut(w.VERIFYING),await new Promise(n=>setTimeout(n,m()||0)),el().then(n=>(Mi(n),R("challenge",n),Vi(n))).then(({data:n,solution:u})=>{var g;if(R("solution",u),!u||n&&"challenge"in n&&!("clearText"in u)){if((u==null?void 0:u.number)!==void 0&&"challenge"in n)if(se()&&"codeChallenge"in n)["INPUT","BUTTON","SELECT","TEXTAREA"].includes(((g=document.activeElement)==null?void 0:g.tagName)||"")&&y()===!1&&document.activeElement.blur(),b(Y,{challenge:n,solution:u},!0);else{if(se()&&ot()!==void 0)return Li(wr(n,u));if(se())return hl(wr(n,u));b(Oe,wr(n,u),!0),R("payload",a(Oe))}else if(a(I)!==w.EXPIRED)throw R("Unable to find a solution. Ensure that the 'maxnumber' attribute is greater than the randomly generated number."),new Error("Unexpected result returned.")}}).then(()=>{a(Y)?(Fe(w.CODE),jr().then(()=>{ze("code",{codeChallenge:a(Y)})})):a(Oe)&&(Fe(w.VERIFIED),R("verified"),jr().then(()=>{ze("verified",{payload:a(Oe)}),Ae()&&Zt()}))}).catch(n=>{R(n),Fe(w.ERROR,n.message)})}var Gi=Za(),Wi=Tt(Gi);la(Wi,t,"default",{});var xt=J(Wi,2),Xr=z(xt),Cr=z(Xr);let Yi;var Zi=z(Cr);{var pl=n=>{Yr(n)};K(Zi,n=>{a(I)===w.VERIFYING&&n(pl)})}var ft=J(Zi,2);ti(ft),ft.__change=[Na,I,Le,O,Ht,Ze,Yt,Ue],gr(ft,n=>b(zr,n),()=>a(zr)),Z(Cr);var xr=J(Cr,2),ml=z(xr);{var _l=n=>{var u=vr(),g=Tt(u);it(g,()=>a(V).verified),B(n,u)},bl=(n,u)=>{{var g=h=>{var C=vr(),A=Tt(C);it(A,()=>a(V).verifying),B(h,C)},p=(h,C)=>{{var A=j=>{var ne=vr(),de=Tt(ne);it(de,()=>a(V).verificationRequired),B(j,ne)},G=j=>{var ne=vr(),de=Tt(ne);it(de,()=>a(V).label),B(j,ne)};K(h,j=>{a(I)===w.CODE?j(A):j(G,!1)},C)}};K(n,h=>{a(I)===w.VERIFYING?h(g):h(p,!1)},u)}};K(ml,n=>{a(I)===w.VERIFIED?n(_l):n(bl,!1)})}Z(xr);var zi=J(xr,2);{var yl=n=>{var u=Pa();ti(u),$e(()=>{$(u,"name",ce()),da(u,a(Oe))}),B(n,u)};K(zi,n=>{a(I)===w.VERIFIED&&n(yl)})}var Ji=J(zi,2);{var wl=n=>{var u=Oa(),g=z(u);$(g,"href",Ka),Z(u),$e(()=>$(g,"aria-label",a(V).ariaLinkLabel)),B(n,u)};K(Ji,n=>{(re()!==!0||a(Zr))&&n(wl)})}var El=J(Ji,2);{var Cl=n=>{var u=qa(),g=J(z(u),2),p=z(g),h=J(p,2);ea(h,!y()),h.__keydown=[Ta,$i];var C=J(h,2),A=z(C),G=z(A);{var j=Ie=>{var Q=Ua();Q.__click=$i;var kr=z(Q);{var Jt=At=>{Yr(At,()=>20)},Tl=(At,Dl)=>{{var Nl=It=>{var Qr=Fa();B(It,Qr)},Ll=(It,Qr)=>{{var Pl=Rt=>{var en=Ma();B(Rt,en)},Ol=Rt=>{var en=Va();B(Rt,en)};K(It,Rt=>{a(X)===ee.PLAYING?Rt(Pl):Rt(Ol,!1)},Qr)}};K(At,It=>{a(X)===ee.ERROR?It(Nl):It(Ll,!1)},Dl)}};K(kr,At=>{a(X)===ee.LOADING?At(Jt):At(Tl,!1)})}Z(Q),$e(()=>{$(Q,"title",a(V).getAudioChallenge),Q.disabled=a(X)===ee.LOADING||a(X)===ee.ERROR||a(st),$(Q,"aria-label",a(X)===ee.LOADING?a(V).loading:a(V).getAudioChallenge)}),B(Ie,Q)};K(G,Ie=>{a(Y).challenge.codeChallenge.audio&&Ie(j)})}var ne=J(G,2);ne.__click=[Da,Ue],Z(A);var de=J(A,2),ct=z(de);{var kt=Ie=>{Yr(Ie,()=>16)};K(ct,Ie=>{a(st)&&Ie(kt)})}var dt=J(ct);Z(de),Z(C);var Sl=J(C,2);{var $l=Ie=>{var Q=ja(),kr=z(Q);Z(Q),gr(Q,Jt=>b(Je,Jt),()=>a(Je)),$e(Jt=>$(kr,"src",Jt),[()=>Ci(a(Y).challenge.codeChallenge.audio,{language:H()})]),Ye("loadstart",Q,ll),Ye("canplay",Q,al),Ye("pause",Q,ul),Ye("playing",Q,sl),Ye("ended",Q,il),Ye("error",kr,ol),B(Ie,Q)};K(Sl,Ie=>{a(Y).challenge.codeChallenge.audio&&a(Jr)&&Ie($l)})}Z(g),Z(u),$e(()=>{$(u,"aria-label",a(V).verificationRequired),$(p,"src",a(Y).challenge.codeChallenge.image),$(h,"minlength",a(Y).challenge.codeChallenge.length||1),$(h,"maxlength",a(Y).challenge.codeChallenge.length),$(h,"placeholder",a(V).enterCode),$(h,"aria-label",a(X)===ee.LOADING?a(V).loading:a(X)===ee.PLAYING?"":a(V).enterCodeAria),$(h,"aria-live",a(X)?"assertive":"polite"),$(h,"aria-busy",a(X)===ee.LOADING),h.disabled=a(st),$(ne,"aria-label",a(V).reload),$(ne,"title",a(V).reload),ne.disabled=a(st),de.disabled=a(st),$(de,"aria-label",a(V).verify),ia(dt,` ${a(V).verify??""}`)}),Ye("submit",g,fl,!0),B(n,u)};K(El,n=>{var u;(u=a(Y))!=null&&u.challenge.codeChallenge&&n(Cl)})}Z(Xr);var Ki=J(Xr,2);{var xl=n=>{var u=Ga(),g=J(z(u),2);{var p=C=>{var A=Ba(),G=z(A);it(G,()=>a(V).expired),Z(A),$e(()=>$(A,"title",a(lt))),B(C,A)},h=C=>{var A=Ha(),G=z(A);it(G,()=>a(V).error),Z(A),$e(()=>$(A,"title",a(lt))),B(C,A)};K(g,C=>{a(I)===w.EXPIRED?C(p):C(h,!1)})}Z(u),B(n,u)};K(Ki,n=>{(a(lt)||a(I)===w.EXPIRED)&&n(xl)})}var Xi=J(Ki,2);{var kl=n=>{var u=Wa(),g=z(u),p=z(g);it(p,()=>a(V).footer),Z(g),Z(u),B(n,u)};K(Xi,n=>{a(V).footer&&(le()!==!0||a(Zr))&&n(kl)})}var Al=J(Xi,2);{var Il=n=>{var u=Ya();gr(u,g=>b(Gt,g),()=>a(Gt)),B(n,u)};K(Al,n=>{E()&&n(Il)})}Z(xt),gr(xt,n=>b(U,n),()=>a(U)),$e(n=>{$(xt,"data-state",a(I)),$(xt,"data-floating",E()),$(xt,"data-overlay",Ae()),Yi=ua(Cr,1,"altcha-checkbox",null,Yi,n),$(ft,"id",a(_i)),ft.required=o()!=="onsubmit"&&(!E()||o()!=="off"),$(xr,"for",a(_i))},[()=>({"altcha-checkbox-verifying":a(I)===w.VERIFYING})]),Ye("invalid",ft,Si),va(ft,()=>a(Ht),n=>b(Ht,n)),B(e,Gi);var Rl=Wn({clarify:Yt,configure:Ui,getConfiguration:ji,getFloatingAnchor:qi,getPlugin:gl,getState:Bi,hide:Zt,repositionFloating:zt,reset:ut,setFloatingAnchor:Hi,setState:Fe,show:Er,verify:Ue,get auto(){return o()},set auto(n=void 0){o(n),x()},get blockspam(){return f()},set blockspam(n=void 0){f(n),x()},get challengeurl(){return s()},set challengeurl(n=void 0){s(n),x()},get challengejson(){return c()},set challengejson(n=void 0){c(n),x()},get credentials(){return d()},set credentials(n=void 0){d(n),x()},get customfetch(){return _()},set customfetch(n=void 0){_(n),x()},get debug(){return v()},set debug(n=!1){v(n),x()},get delay(){return m()},set delay(n=0){m(n),x()},get disableautofocus(){return y()},set disableautofocus(n=!1){y(n),x()},get expire(){return T()},set expire(n=void 0){T(n),x()},get floating(){return E()},set floating(n=void 0){E(n),x()},get floatinganchor(){return q()},set floatinganchor(n=void 0){q(n),x()},get floatingoffset(){return pe()},set floatingoffset(n=void 0){pe(n),x()},get floatingpersist(){return te()},set floatingpersist(n=!1){te(n),x()},get hidefooter(){return le()},set hidefooter(n=!1){le(n),x()},get hidelogo(){return re()},set hidelogo(n=!1){re(n),x()},get id(){return yt()},set id(n=void 0){yt(n),x()},get language(){return H()},set language(n=void 0){H(n),x()},get name(){return ce()},set name(n="altcha"){ce(n),x()},get maxnumber(){return ke()},set maxnumber(n=1e6){ke(n),x()},get mockerror(){return Ut()},set mockerror(n=!1){Ut(n),x()},get obfuscated(){return Ze()},set obfuscated(n=void 0){Ze(n),x()},get overlay(){return Ae()},set overlay(n=void 0){Ae(n),x()},get overlaycontent(){return jt()},set overlaycontent(n=void 0){jt(n),x()},get plugins(){return br()},set plugins(n=void 0){br(n),x()},get refetchonexpire(){return qt()},set refetchonexpire(n=!0){qt(n),x()},get sentinel(){return ot()},set sentinel(n=void 0){ot(n),x()},get spamfilter(){return Le()},set spamfilter(n=!1){Le(n),x()},get strings(){return wt()},set strings(n=void 0){wt(n),x()},get test(){return we()},set test(n=!1){we(n),x()},get verifyurl(){return se()},set verifyurl(n=void 0){se(n),x()},get workers(){return Et()},set workers(n=Math.min(16,navigator.hardwareConcurrency||8)){Et(n),x()},get workerurl(){return Bt()},set workerurl(n=void 0){Bt(n),x()}});return i(),Rl}na(["change","keydown","click"]),customElements.define("altcha-widget",Ca(di,{blockspam:{type:"Boolean"},debug:{type:"Boolean"},delay:{type:"Number"},disableautofocus:{type:"Boolean"},expire:{type:"Number"},floatingoffset:{type:"Number"},hidefooter:{type:"Boolean"},hidelogo:{type:"Boolean"},maxnumber:{type:"Number"},mockerror:{type:"Boolean"},refetchonexpire:{type:"Boolean"},test:{type:"Boolean"},workers:{type:"Number"},auto:{},challengeurl:{},challengejson:{},credentials:{},customfetch:{},floating:{},floatinganchor:{},floatingpersist:{},id:{},language:{},name:{},obfuscated:{},overlay:{},overlaycontent:{},plugins:{},sentinel:{},spamfilter:{},strings:{},verifyurl:{},workerurl:{}},["default"],["clarify","configure","getConfiguration","getFloatingAnchor","getPlugin","getState","hide","repositionFloating","reset","setFloatingAnchor","setState","show","verify"],!1));const hi='@keyframes overlay-slidein{to{opacity:1;top:50%}}@keyframes altcha-spinner{to{transform:rotate(360deg)}}.altcha{background:var(--altcha-color-base, transparent);border:var(--altcha-border-width, 1px) solid var(--altcha-color-border, #a0a0a0);border-radius:var(--altcha-border-radius, 3px);color:var(--altcha-color-text, currentColor);display:flex;flex-direction:column;max-width:var(--altcha-max-width, 260px);position:relative}.altcha:focus-within{border-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating]{background:var(--altcha-color-base, white);display:none;filter:drop-shadow(3px 3px 6px rgba(0,0,0,.2));left:-100%;position:fixed;top:-100%;width:var(--altcha-max-width, 260px);z-index:999999}.altcha[data-floating=top] .altcha-anchor-arrow{border-bottom-color:transparent;border-top-color:var(--altcha-color-border, #a0a0a0);bottom:-12px;top:auto}.altcha[data-floating=bottom]:focus-within::after{border-bottom-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating=top]:focus-within::after{border-top-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating]:not([data-state=unverified]){display:block}.altcha-anchor-arrow{border:6px solid transparent;border-bottom-color:var(--altcha-color-border, #a0a0a0);content:"";height:0;left:12px;position:absolute;top:-12px;width:0}.altcha-main{align-items:center;display:flex;gap:.4rem;padding:.7rem;position:relative}.altcha-code-challenge{background:var(--altcha-color-base, white);border:1px solid var(--altcha-color-border-focus, currentColor);border-radius:var(--altcha-border-radius, 3px);filter:drop-shadow(3px 3px 6px rgba(0,0,0,.2));padding:.5rem;position:absolute;top:2.5rem;z-index:9999999}.altcha-code-challenge>form{display:flex;flex-direction:column;gap:.5rem}.altcha-code-challenge-input{border:1px solid currentColor;border-radius:3px;box-sizing:border-box;outline:0;font-size:16px;padding:.35rem;width:220px}.altcha-code-challenge-input:focus{outline:2px solid color-mix(in srgb,var(--altcha-color-active, #1D1DC9) 20%,transparent)}.altcha-code-challenge-input:disabled{opacity:.7}.altcha-code-challenge-image{background-color:#fff;border:1px solid currentColor;border-radius:3px;box-sizing:border-box;object-fit:contain;height:50px;width:220px}.altcha-code-challenge-audio,.altcha-code-challenge-reload{background:color-mix(in srgb,var(--altcha-color-text, currentColor) 10%,transparent);border:0;border-radius:3px;color:var(--altcha-color-text, currentColor);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:.35rem}.altcha-code-challenge-audio:disabled,.altcha-code-challenge-reload:disabled,.altcha-code-challenge-verify:disabled{opacity:.7;pointer-events:none}.altcha-code-challenge-audio>*,.altcha-code-challenge-reload>*{height:20px;width:20px}.altcha-code-challenge-buttons{display:flex;justify-content:space-between}.altcha-code-challenge-buttons-left{display:flex;gap:.25rem}.altcha-code-challenge-verify{align-items:center;background:var(--altcha-color-active, #1D1DC9);border:0;border-radius:3px;color:#fff;cursor:pointer;display:flex;gap:.5rem;font-size:100%;padding:.35rem 1rem}.altcha-code-challenge-arrow{border:6px solid transparent;border-bottom-color:var(--altcha-color-border, currentColor);content:"";height:0;left:.15rem;position:absolute;top:-12px;width:0}.altcha[data-floating=top] .altcha-code-challenge{top:-150px}.altcha[data-floating=top] .altcha-code-challenge-arrow{border-bottom-color:transparent;border-top-color:var(--altcha-color-border, currentColor);bottom:-12px;top:auto}.altcha-label{cursor:pointer;flex-grow:1}.altcha-logo{color:currentColor!important;opacity:.7}.altcha-footer:hover,.altcha-logo:hover{opacity:1}.altcha-error{color:var(--altcha-color-error-text, #f23939);display:flex;font-size:.85rem;gap:.3rem;padding:0 .7rem .7rem}.altcha-footer{align-items:center;background-color:var(--altcha-color-footer-bg, transparent);display:flex;font-size:.75rem;opacity:.7;justify-content:end;padding:.2rem .7rem}.altcha-footer a{color:currentColor}.altcha-checkbox{display:flex;align-items:center;justify-content:center;height:24px;position:relative;width:24px}.altcha-checkbox .altcha-spinner{bottom:0;left:0;position:absolute;right:0;top:0}.altcha-checkbox input{width:18px;height:18px;margin:0}.altcha-checkbox-verifying input{appearance:none;opacity:0;pointer-events:none}.altcha-spinner{animation:altcha-spinner .75s infinite linear;transform-origin:center}.altcha-overlay{--altcha-color-base:#fff;--altcha-color-text:#000;animation:overlay-slidein .5s forwards;display:flex;flex-direction:column;gap:.5rem;left:50%;width:260px;opacity:0;position:fixed;top:45%;transform:translate(-50%,-50%)}.altcha-overlay-backdrop{background:rgba(0,0,0,.5);bottom:0;display:none;left:0;position:fixed;right:0;top:0;z-index:99999999}.altcha-overlay-close-button{align-self:flex-end;background:0 0;border:0;padding:.25rem;cursor:pointer;color:currentColor;font-size:130%;line-height:1;opacity:.7}@media (max-height:450px){.altcha-overlay{top:10%!important;transform:translate(-50%,0)}}';function vi(e,t="__altcha-css"){if(!document.getElementById(t)){const r=document.createElement("style");r.id=t,r.textContent=e,document.head.appendChild(r)}}globalThis.altchaCreateWorker=e=>e?new Worker(new URL(e)):new Kt,vi(hi),vi(hi),S.Altcha=di,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(S,T){typeof exports=="object"&&typeof module<"u"?T(exports):typeof define=="function"&&define.amd?define(["exports"],T):(S=typeof globalThis<"u"?globalThis:S||self,T(S.altcha={}))})(this,function(S){"use strict";var Ml=Object.defineProperty;var ro=S=>{throw TypeError(S)};var Vl=(S,T,Y)=>T in S?Ml(S,T,{enumerable:!0,configurable:!0,writable:!0,value:Y}):S[T]=Y;var Ae=(S,T,Y)=>Vl(S,typeof T!="symbol"?T+"":T,Y),no=(S,T,Y)=>T.has(S)||ro("Cannot "+Y);var he=(S,T,Y)=>(no(S,T,"read from private field"),Y?Y.call(S):T.get(S)),rn=(S,T,Y)=>T.has(S)?ro("Cannot add the same private member more than once"):T instanceof WeakSet?T.add(S):T.set(S,Y),nn=(S,T,Y,Xt)=>(no(S,T,"write to private field"),Xt?Xt.call(S,Y):T.set(S,Y),Y);var pi,Me,_e;const T=`(function(){"use strict";const d=new TextEncoder;function p(e){return[...new Uint8Array(e)].map(t=>t.toString(16).padStart(2,"0")).join("")}async function b(e,t,r){if(typeof crypto>"u"||!("subtle"in crypto)||!("digest"in crypto.subtle))throw new Error("Web Crypto is not available. Secure context is required (https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts).");return p(await crypto.subtle.digest(r.toUpperCase(),d.encode(e+t)))}function w(e,t,r="SHA-256",n=1e6,s=0){const o=new AbortController,a=Date.now();return{promise:(async()=>{for(let c=s;c<=n;c+=1){if(o.signal.aborted)return null;if(await b(t,c,r)===e)return{number:c,took:Date.now()-a}}return null})(),controller:o}}function h(e){const t=atob(e),r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}function g(e,t=12){const r=new Uint8Array(t);for(let n=0;n<t;n++)r[n]=e%256,e=Math.floor(e/256);return r}async function m(e,t="",r=1e6,n=0){const s="AES-GCM",o=new AbortController,a=Date.now(),l=async()=>{for(let u=n;u<=r;u+=1){if(o.signal.aborted||!c||!y)return null;try{const f=await crypto.subtle.decrypt({name:s,iv:g(u)},c,y);if(f)return{clearText:new TextDecoder().decode(f),took:Date.now()-a}}catch{}}return null};let c=null,y=null;try{y=h(e);const u=await crypto.subtle.digest("SHA-256",d.encode(t));c=await crypto.subtle.importKey("raw",u,s,!1,["decrypt"])}catch{return{promise:Promise.reject(),controller:o}}return{promise:l(),controller:o}}let i;onmessage=async e=>{const{type:t,payload:r,start:n,max:s}=e.data;let o=null;if(t==="abort")i==null||i.abort(),i=void 0;else if(t==="work"){if("obfuscated"in r){const{key:a,obfuscated:l}=r||{};o=await m(l,a,s,n)}else{const{algorithm:a,challenge:l,salt:c}=r||{};o=w(l,c,a,s,n)}i=o.controller,o.promise.then(a=>{self.postMessage(a&&{...a,worker:!0})})}}})();
|
|
2
|
+
`,Y=typeof self<"u"&&self.Blob&&new Blob([T],{type:"text/javascript;charset=utf-8"});function Xt(e){let t;try{if(t=Y&&(self.URL||self.webkitURL).createObjectURL(Y),!t)throw"";const r=new Worker(t,{name:e==null?void 0:e.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(T),{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}const io="5";typeof window<"u"&&((pi=window.__svelte??(window.__svelte={})).v??(pi.v=new Set)).add(io);const oo=1,ao=4,lo=8,so=16,uo=1,fo=2,Ir="[",on="[!",an="]",pt={},ue=Symbol(),co="http://www.w3.org/1999/xhtml",ln=!1;function sn(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}var un=Array.isArray,ho=Array.prototype.indexOf,vo=Array.from,Qt=Object.keys,Tt=Object.defineProperty,Qe=Object.getOwnPropertyDescriptor,go=Object.getOwnPropertyDescriptors,po=Object.prototype,mo=Array.prototype,fn=Object.getPrototypeOf,cn=Object.isExtensible;const mt=()=>{};function dn(e){for(var t=0;t<e.length;t++)e[t]()}function bo(e,t,r=!1){return e===void 0?r?t():t:e}const we=2,hn=4,er=8,Rr=16,Fe=32,et=64,tr=128,ve=256,rr=512,fe=1024,Ie=2048,tt=4096,bt=8192,nr=16384,_o=32768,Sr=65536,yo=1<<19,vn=1<<20,$r=1<<21,Dt=Symbol("$state"),gn=Symbol("legacy props"),wo=Symbol("");function Eo(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Co(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function xo(e){throw new Error("https://svelte.dev/e/effect_orphan")}function ko(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Ao(){throw new Error("https://svelte.dev/e/hydration_failed")}function Io(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Ro(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function So(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function $o(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function ir(e){console.warn("https://svelte.dev/e/hydration_mismatch")}let M=!1;function _t(e){M=e}let V;function je(e){if(e===null)throw ir(),pt;return V=e}function yt(){return je(Be(V))}function z(e){if(M){if(Be(V)!==null)throw ir(),pt;V=e}}function To(){for(var e=0,t=V;;){if(t.nodeType===8){var r=t.data;if(r===an){if(e===0)return t;e-=1}else(r===Ir||r===on)&&(e+=1)}var i=Be(t);t.remove(),t=i}}let Do=!1;function qe(e){if(typeof e!="object"||e===null||Dt in e)return e;const t=fn(e);if(t!==po&&t!==mo)return e;var r=new Map,i=un(e),l=P(0),o=D,f=s=>{var c=D;$e(o);var d=s();return $e(c),d};return i&&r.set("length",P(e.length)),new Proxy(e,{defineProperty(s,c,d){(!("value"in d)||d.configurable===!1||d.enumerable===!1||d.writable===!1)&&Ro();var b=r.get(c);return b===void 0?(b=f(()=>P(d.value)),r.set(c,b)):_(b,f(()=>qe(d.value))),!0},deleteProperty(s,c){var d=r.get(c);if(d===void 0)c in s&&(r.set(c,f(()=>P(ue))),Tr(l));else{if(i&&typeof c=="string"){var b=r.get("length"),v=Number(c);Number.isInteger(v)&&v<b.v&&_(b,v)}_(d,ue),Tr(l)}return!0},get(s,c,d){var y;if(c===Dt)return e;var b=r.get(c),v=c in s;if(b===void 0&&(!v||(y=Qe(s,c))!=null&&y.writable)&&(b=f(()=>P(qe(v?s[c]:ue))),r.set(c,b)),b!==void 0){var m=a(b);return m===ue?void 0:m}return Reflect.get(s,c,d)},getOwnPropertyDescriptor(s,c){var d=Reflect.getOwnPropertyDescriptor(s,c);if(d&&"value"in d){var b=r.get(c);b&&(d.value=a(b))}else if(d===void 0){var v=r.get(c),m=v==null?void 0:v.v;if(v!==void 0&&m!==ue)return{enumerable:!0,configurable:!0,value:m,writable:!0}}return d},has(s,c){var m;if(c===Dt)return!0;var d=r.get(c),b=d!==void 0&&d.v!==ue||Reflect.has(s,c);if(d!==void 0||N!==null&&(!b||(m=Qe(s,c))!=null&&m.writable)){d===void 0&&(d=f(()=>P(b?qe(s[c]):ue)),r.set(c,d));var v=a(d);if(v===ue)return!1}return b},set(s,c,d,b){var re;var v=r.get(c),m=c in s;if(i&&c==="length")for(var y=d;y<v.v;y+=1){var L=r.get(y+"");L!==void 0?_(L,ue):y in s&&(L=f(()=>P(ue)),r.set(y+"",L))}v===void 0?(!m||(re=Qe(s,c))!=null&&re.writable)&&(v=f(()=>P(void 0)),_(v,f(()=>qe(d))),r.set(c,v)):(m=v.v!==ue,_(v,f(()=>qe(d))));var O=Reflect.getOwnPropertyDescriptor(s,c);if(O!=null&&O.set&&O.set.call(b,d),!m){if(i&&typeof c=="string"){var B=r.get("length"),R=Number(c);Number.isInteger(R)&&R>=B.v&&_(B,R+1)}Tr(l)}return!0},ownKeys(s){a(l);var c=Reflect.ownKeys(s).filter(v=>{var m=r.get(v);return m===void 0||m.v!==ue});for(var[d,b]of r)b.v!==ue&&!(d in s)&&c.push(d);return c},setPrototypeOf(){So()}})}function Tr(e,t=1){_(e,e.v+t)}var pn,mn,bn,_n;function Dr(){if(pn===void 0){pn=window,mn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;bn=Qe(t,"firstChild").get,_n=Qe(t,"nextSibling").get,cn(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),cn(r)&&(r.__t=void 0)}}function or(e=""){return document.createTextNode(e)}function me(e){return bn.call(e)}function Be(e){return _n.call(e)}function J(e,t){if(!M)return me(e);var r=me(V);return r===null&&(r=V.appendChild(or())),je(r),r}function Nt(e,t){if(!M){var r=me(e);return r instanceof Comment&&r.data===""?Be(r):r}return V}function K(e,t=1,r=!1){let i=M?V:e;for(var l;t--;)l=i,i=Be(i);if(!M)return i;var o=i==null?void 0:i.nodeType;if(r&&o!==3){var f=or();return i===null?l==null||l.after(f):i.before(f),je(f),f}return je(i),i}function No(e){e.textContent=""}function yn(e){return e===this.v}function wn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Nr(e){return!wn(e,this.v)}function ar(e){var t=we|Ie,r=D!==null&&(D.f&we)!==0?D:null;return N===null||r!==null&&(r.f&ve)!==0?t|=ve:N.f|=vn,{ctx:le,deps:null,effects:null,equals:yn,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:r??N}}function Lt(e){const t=ar(e);return On(t),t}function Lo(e){const t=ar(e);return t.equals=Nr,t}function En(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)He(t[r])}}function Po(e){for(var t=e.parent;t!==null;){if((t.f&we)===0)return t;t=t.parent}return null}function Cn(e){var t,r=N;Ge(Po(e));try{En(e),t=jn(e)}finally{Ge(r)}return t}function xn(e){var t=Cn(e),r=(We||(e.f&ve)!==0)&&e.deps!==null?tt:fe;Ee(e,r),e.equals(t)||(e.v=t,e.wv=Mn())}function Oo(e){N===null&&D===null&&xo(),D!==null&&(D.f&ve)!==0&&N===null&&Co(),Ft&&Eo()}function Fo(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function rt(e,t,r,i=!0){var l=N,o={ctx:le,deps:null,nodes_start:null,nodes_end:null,f:e|Ie,first:null,fn:t,last:null,next:null,parent:l,prev:null,teardown:null,transitions:null,wv:0};if(r)try{jr(o),o.f|=_o}catch(c){throw He(o),c}else t!==null&&hr(o);var f=r&&o.deps===null&&o.first===null&&o.nodes_start===null&&o.teardown===null&&(o.f&(vn|tr))===0;if(!f&&i&&(l!==null&&Fo(o,l),D!==null&&(D.f&we)!==0)){var s=D;(s.effects??(s.effects=[])).push(o)}return o}function Lr(e){const t=rt(er,null,!1);return Ee(t,fe),t.teardown=e,t}function Pr(e){Oo();var t=N!==null&&(N.f&Fe)!==0&&le!==null&&!le.m;if(t){var r=le;(r.e??(r.e=[])).push({fn:e,effect:N,reaction:D})}else{var i=Or(e);return i}}function Mo(e){const t=rt(et,e,!0);return()=>{He(t)}}function Vo(e){const t=rt(et,e,!0);return(r={})=>new Promise(i=>{r.outro?Vr(t,()=>{He(t),i(void 0)}):(He(t),i(void 0))})}function Or(e){return rt(hn,e,!1)}function Fr(e){return rt(er,e,!0)}function Re(e,t=[],r=ar){const i=t.map(r);return kn(()=>e(...i.map(a)))}function kn(e,t=0){return rt(er|Rr|t,e,!0)}function Mr(e,t=!0){return rt(er|Fe,e,!0,t)}function An(e){var t=e.teardown;if(t!==null){const r=Ft,i=D;Pn(!0),$e(null);try{t.call(null)}finally{Pn(r),$e(i)}}}function In(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){var i=r.next;(r.f&et)!==0?r.parent=null:He(r,t),r=i}}function Uo(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&Fe)===0&&He(t),t=r}}function He(e,t=!0){var r=!1;(t||(e.f&yo)!==0)&&e.nodes_start!==null&&(Rn(e.nodes_start,e.nodes_end),r=!0),In(e,t&&!r),dr(e,0),Ee(e,nr);var i=e.transitions;if(i!==null)for(const o of i)o.stop();An(e);var l=e.parent;l!==null&&l.first!==null&&Sn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function Rn(e,t){for(;e!==null;){var r=e===t?null:Be(e);e.remove(),e=r}}function Sn(e){var t=e.parent,r=e.prev,i=e.next;r!==null&&(r.next=i),i!==null&&(i.prev=r),t!==null&&(t.first===e&&(t.first=i),t.last===e&&(t.last=r))}function Vr(e,t){var r=[];$n(e,r,!0),jo(r,()=>{He(e),t&&t()})}function jo(e,t){var r=e.length;if(r>0){var i=()=>--r||t();for(var l of e)l.out(i)}else t()}function $n(e,t,r){if((e.f&bt)===0){if(e.f^=bt,e.transitions!==null)for(const f of e.transitions)(f.is_global||r)&&t.push(f);for(var i=e.first;i!==null;){var l=i.next,o=(i.f&Sr)!==0||(i.f&Fe)!==0;$n(i,t,o?r:!1),i=l}}}function Tn(e){Dn(e,!0)}function Dn(e,t){if((e.f&bt)!==0){e.f^=bt,(e.f&fe)===0&&(e.f^=fe),Vt(e)&&(Ee(e,Ie),hr(e));for(var r=e.first;r!==null;){var i=r.next,l=(r.f&Sr)!==0||(r.f&Fe)!==0;Dn(r,l?t:!1),r=i}if(e.transitions!==null)for(const o of e.transitions)(o.is_global||t)&&o.in()}}const qo=typeof requestIdleCallback>"u"?e=>setTimeout(e,1):requestIdleCallback;let Pt=[],Ot=[];function Nn(){var e=Pt;Pt=[],dn(e)}function Ln(){var e=Ot;Ot=[],dn(e)}function Ur(e){Pt.length===0&&queueMicrotask(Nn),Pt.push(e)}function Bo(e){Ot.length===0&&qo(Ln),Ot.push(e)}function Ho(){Pt.length>0&&Nn(),Ot.length>0&&Ln()}let lr=!1,sr=!1,ur=null,nt=!1,Ft=!1;function Pn(e){Ft=e}let Mt=[],Ul=[],D=null,Se=!1;function $e(e){D=e}let N=null;function Ge(e){N=e}let oe=null;function On(e){D!==null&&D.f&$r&&(oe===null?oe=[e]:oe.push(e))}let ae=null,ge=0,be=null;function Go(e){be=e}let Fn=1,fr=0,We=!1;function Mn(){return++Fn}function Vt(e){var v;var t=e.f;if((t&Ie)!==0)return!0;if((t&tt)!==0){var r=e.deps,i=(t&ve)!==0;if(r!==null){var l,o,f=(t&rr)!==0,s=i&&N!==null&&!We,c=r.length;if(f||s){var d=e,b=d.parent;for(l=0;l<c;l++)o=r[l],(f||!((v=o==null?void 0:o.reactions)!=null&&v.includes(d)))&&(o.reactions??(o.reactions=[])).push(d);f&&(d.f^=rr),s&&b!==null&&(b.f&ve)===0&&(d.f^=ve)}for(l=0;l<c;l++)if(o=r[l],Vt(o)&&xn(o),o.wv>e.wv)return!0}(!i||N!==null&&!We)&&Ee(e,fe)}return!1}function Wo(e,t){for(var r=t;r!==null;){if((r.f&tr)!==0)try{r.fn(e);return}catch{r.f^=tr}r=r.parent}throw lr=!1,e}function Vn(e){return(e.f&nr)===0&&(e.parent===null||(e.parent.f&tr)===0)}function cr(e,t,r,i){if(lr){if(r===null&&(lr=!1),Vn(t))throw e;return}if(r!==null&&(lr=!0),Wo(e,t),Vn(t))throw e}function Un(e,t,r=!0){var i=e.reactions;if(i!==null)for(var l=0;l<i.length;l++){var o=i[l];oe!=null&&oe.includes(e)||((o.f&we)!==0?Un(o,t,!1):t===o&&(r?Ee(o,Ie):(o.f&fe)!==0&&Ee(o,tt),hr(o)))}}function jn(e){var y;var t=ae,r=ge,i=be,l=D,o=We,f=oe,s=le,c=Se,d=e.f;ae=null,ge=0,be=null,We=(d&ve)!==0&&(Se||!nt||D===null),D=(d&(Fe|et))===0?e:null,oe=null,Gn(e.ctx),Se=!1,fr++,e.f|=$r;try{var b=(0,e.fn)(),v=e.deps;if(ae!==null){var m;if(dr(e,ge),v!==null&&ge>0)for(v.length=ge+ae.length,m=0;m<ae.length;m++)v[ge+m]=ae[m];else e.deps=v=ae;if(!We)for(m=ge;m<v.length;m++)((y=v[m]).reactions??(y.reactions=[])).push(e)}else v!==null&&ge<v.length&&(dr(e,ge),v.length=ge);if(Zn()&&be!==null&&!Se&&v!==null&&(e.f&(we|tt|Ie))===0)for(m=0;m<be.length;m++)Un(be[m],e);return l!==null&&l!==e&&(fr++,be!==null&&(i===null?i=be:i.push(...be))),b}finally{ae=t,ge=r,be=i,D=l,We=o,oe=f,Gn(s),Se=c,e.f^=$r}}function Yo(e,t){let r=t.reactions;if(r!==null){var i=ho.call(r,e);if(i!==-1){var l=r.length-1;l===0?r=t.reactions=null:(r[i]=r[l],r.pop())}}r===null&&(t.f&we)!==0&&(ae===null||!ae.includes(t))&&(Ee(t,tt),(t.f&(ve|rr))===0&&(t.f^=rr),En(t),dr(t,0))}function dr(e,t){var r=e.deps;if(r!==null)for(var i=t;i<r.length;i++)Yo(e,r[i])}function jr(e){var t=e.f;if((t&nr)===0){Ee(e,fe);var r=N,i=le,l=nt;N=e,nt=!0;try{(t&Rr)!==0?Uo(e):In(e),An(e);var o=jn(e);e.teardown=typeof o=="function"?o:null,e.wv=Fn;var f=e.deps,s;ln&&Do&&e.f&Ie}catch(c){cr(c,e,r,i||e.ctx)}finally{nt=l,N=r}}}function Zo(){try{ko()}catch(e){if(ur!==null)cr(e,ur,null);else throw e}}function qn(){var e=nt;try{var t=0;for(nt=!0;Mt.length>0;){t++>1e3&&Zo();var r=Mt,i=r.length;Mt=[];for(var l=0;l<i;l++){var o=Jo(r[l]);zo(o)}Ut.clear()}}finally{sr=!1,nt=e,ur=null}}function zo(e){var t=e.length;if(t!==0)for(var r=0;r<t;r++){var i=e[r];if((i.f&(nr|bt))===0)try{Vt(i)&&(jr(i),i.deps===null&&i.first===null&&i.nodes_start===null&&(i.teardown===null?Sn(i):i.fn=null))}catch(l){cr(l,i,null,i.ctx)}}}function hr(e){sr||(sr=!0,queueMicrotask(qn));for(var t=ur=e;t.parent!==null;){t=t.parent;var r=t.f;if((r&(et|Fe))!==0){if((r&fe)===0)return;t.f^=fe}}Mt.push(t)}function Jo(e){for(var t=[],r=e;r!==null;){var i=r.f,l=(i&(Fe|et))!==0,o=l&&(i&fe)!==0;if(!o&&(i&bt)===0){if((i&hn)!==0)t.push(r);else if(l)r.f^=fe;else try{Vt(r)&&jr(r)}catch(c){cr(c,r,null,r.ctx)}var f=r.first;if(f!==null){r=f;continue}}var s=r.parent;for(r=r.next;r===null&&s!==null;)r=s.next,s=s.parent}return t}function C(e){for(var t;;){if(Ho(),Mt.length===0)return t;sr=!0,qn()}}async function qr(){await Promise.resolve(),C()}function a(e){var t=e.f,r=(t&we)!==0;if(D!==null&&!Se){if(!(oe!=null&&oe.includes(e))){var i=D.deps;e.rv<fr&&(e.rv=fr,ae===null&&i!==null&&i[ge]===e?ge++:ae===null?ae=[e]:(!We||!ae.includes(e))&&ae.push(e))}}else if(r&&e.deps===null&&e.effects===null){var l=e,o=l.parent;o!==null&&(o.f&ve)===0&&(l.f^=ve)}return r&&(l=e,Vt(l)&&xn(l)),Ft&&Ut.has(e)?Ut.get(e):e.v}function it(e){var t=Se;try{return Se=!0,e()}finally{Se=t}}const Ko=-7169;function Ee(e,t){e.f=e.f&Ko|t}const Ut=new Map;function Bn(e,t){var r={f:0,v:e,reactions:null,equals:yn,rv:0,wv:0};return r}function P(e,t){const r=Bn(e);return On(r),r}function Br(e,t=!1){const r=Bn(e);return t||(r.equals=Nr),r}function _(e,t,r=!1){D!==null&&!Se&&Zn()&&(D.f&(we|Rr))!==0&&!(oe!=null&&oe.includes(e))&&$o();let i=r?qe(t):t;return Xo(e,i)}function Xo(e,t){if(!e.equals(t)){var r=e.v;Ft?Ut.set(e,t):Ut.set(e,r),e.v=t,(e.f&we)!==0&&((e.f&Ie)!==0&&Cn(e),Ee(e,(e.f&ve)===0?fe:tt)),e.wv=Mn(),Hn(e,Ie),N!==null&&(N.f&fe)!==0&&(N.f&(Fe|et))===0&&(be===null?Go([e]):be.push(e))}return t}function Hn(e,t){var r=e.reactions;if(r!==null)for(var i=r.length,l=0;l<i;l++){var o=r[l],f=o.f;(f&Ie)===0&&(Ee(o,t),(f&(fe|ve))!==0&&((f&we)!==0?Hn(o,tt):hr(o)))}}let le=null;function Gn(e){le=e}function Wn(e,t=!1,r){var i=le={p:le,c:null,d:!1,e:null,m:!1,s:e,x:null,l:null};Lr(()=>{i.d=!0})}function Yn(e){const t=le;if(t!==null){e!==void 0&&(t.x=e);const f=t.e;if(f!==null){var r=N,i=D;t.e=null;try{for(var l=0;l<f.length;l++){var o=f[l];Ge(o.effect),$e(o.reaction),Or(o.fn)}}finally{Ge(r),$e(i)}}le=t.p,t.m=!0}return e||{}}function Zn(){return!0}const Qo=["touchstart","touchmove"];function ea(e){return Qo.includes(e)}function ta(e,t){if(t){const r=document.body;e.autofocus=!0,Ur(()=>{document.activeElement===r&&e.focus()})}}let zn=!1;function Jn(){zn||(zn=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const r of e.target.elements)(t=r.__on_r)==null||t.call(r)})},{capture:!0}))}function Kn(e){var t=D,r=N;$e(null),Ge(null);try{return e()}finally{$e(t),Ge(r)}}function ra(e,t,r,i=r){e.addEventListener(t,()=>Kn(r));const l=e.__on_r;l?e.__on_r=()=>{l(),i(!0)}:e.__on_r=()=>i(!0),Jn()}const Xn=new Set,Hr=new Set;function na(e,t,r,i={}){function l(o){if(i.capture||jt.call(t,o),!o.cancelBubble)return Kn(()=>r==null?void 0:r.call(this,o))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Ur(()=>{t.addEventListener(e,l,i)}):t.addEventListener(e,l,i),l}function Ye(e,t,r,i,l){var o={capture:i,passive:l},f=na(e,t,r,o);(t===document.body||t===window||t===document)&&Lr(()=>{t.removeEventListener(e,f,o)})}function ia(e){for(var t=0;t<e.length;t++)Xn.add(e[t]);for(var r of Hr)r(e)}function jt(e){var re;var t=this,r=t.ownerDocument,i=e.type,l=((re=e.composedPath)==null?void 0:re.call(e))||[],o=l[0]||e.target,f=0,s=e.__root;if(s){var c=l.indexOf(s);if(c!==-1&&(t===document||t===window)){e.__root=t;return}var d=l.indexOf(t);if(d===-1)return;c<=d&&(f=c)}if(o=l[f]||e.target,o!==t){Tt(e,"currentTarget",{configurable:!0,get(){return o||r}});var b=D,v=N;$e(null),Ge(null);try{for(var m,y=[];o!==null;){var L=o.assignedSlot||o.parentNode||o.host||null;try{var O=o["__"+i];if(O!=null&&(!o.disabled||e.target===o))if(un(O)){var[B,...R]=O;B.apply(o,[e,...R])}else O.call(o,e)}catch(ce){m?y.push(ce):m=ce}if(e.cancelBubble||L===t||L===null)break;o=L}if(m){for(let ce of y)queueMicrotask(()=>{throw ce});throw m}}finally{e.__root=t,delete e.currentTarget,$e(b),Ge(v)}}}function Gr(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function Te(e,t){var r=N;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function Ce(e,t){var r=(t&uo)!==0,i=(t&fo)!==0,l,o=!e.startsWith("<!>");return()=>{if(M)return Te(V,null),V;l===void 0&&(l=Gr(o?e:"<!>"+e),r||(l=me(l)));var f=i||mn?document.importNode(l,!0):l.cloneNode(!0);if(r){var s=me(f),c=f.lastChild;Te(s,c)}else Te(f,f);return f}}function vr(e,t,r="svg"){var i=!e.startsWith("<!>"),l=`<${r}>${i?e:"<!>"+e}</${r}>`,o;return()=>{if(M)return Te(V,null),V;if(!o){var f=Gr(l),s=me(f);o=me(s)}var c=o.cloneNode(!0);return Te(c,c),c}}function gr(){if(M)return Te(V,null),V;var e=document.createDocumentFragment(),t=document.createComment(""),r=or();return e.append(t,r),Te(t,r),e}function G(e,t){if(M){N.nodes_end=V,yt();return}e!==null&&e.before(t)}function oa(e,t){var r=t==null?"":typeof t=="object"?t+"":t;r!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=r,e.nodeValue=r+"")}function Qn(e,t){return ei(e,t)}function aa(e,t){Dr(),t.intro=t.intro??!1;const r=t.target,i=M,l=V;try{for(var o=me(r);o&&(o.nodeType!==8||o.data!==Ir);)o=Be(o);if(!o)throw pt;_t(!0),je(o),yt();const f=ei(e,{...t,anchor:o});if(V===null||V.nodeType!==8||V.data!==an)throw ir(),pt;return _t(!1),f}catch(f){if(f===pt)return t.recover===!1&&Ao(),Dr(),No(r),_t(!1),Qn(e,t);throw f}finally{_t(i),je(l)}}const wt=new Map;function ei(e,{target:t,anchor:r,props:i={},events:l,context:o,intro:f=!0}){Dr();var s=new Set,c=v=>{for(var m=0;m<v.length;m++){var y=v[m];if(!s.has(y)){s.add(y);var L=ea(y);t.addEventListener(y,jt,{passive:L});var O=wt.get(y);O===void 0?(document.addEventListener(y,jt,{passive:L}),wt.set(y,1)):wt.set(y,O+1)}}};c(vo(Xn)),Hr.add(c);var d=void 0,b=Vo(()=>{var v=r??t.appendChild(or());return Mr(()=>{if(o){Wn({});var m=le;m.c=o}l&&(i.$$events=l),M&&Te(v,null),d=e(v,i)||{},M&&(N.nodes_end=V),o&&Yn()}),()=>{var L;for(var m of s){t.removeEventListener(m,jt);var y=wt.get(m);--y===0?(document.removeEventListener(m,jt),wt.delete(m)):wt.set(m,y)}Hr.delete(c),v!==r&&((L=v.parentNode)==null||L.removeChild(v))}});return Wr.set(d,b),d}let Wr=new WeakMap;function la(e,t){const r=Wr.get(e);return r?(Wr.delete(e),r(t)):Promise.resolve()}function X(e,t,[r,i]=[0,0]){M&&r===0&&yt();var l=e,o=null,f=null,s=ue,c=r>0?Sr:0,d=!1;const b=(m,y=!0)=>{d=!0,v(y,m)},v=(m,y)=>{if(s===(s=m))return;let L=!1;if(M&&i!==-1){if(r===0){const B=l.data;B===Ir?i=0:B===on?i=1/0:(i=parseInt(B.substring(1)),i!==i&&(i=s?1/0:-1))}const O=i>r;!!s===O&&(l=To(),je(l),_t(!1),L=!0,i=-1)}s?(o?Tn(o):y&&(o=Mr(()=>y(l))),f&&Vr(f,()=>{f=null})):(f?Tn(f):y&&(f=Mr(()=>y(l,[r+1,i]))),o&&Vr(o,()=>{o=null})),L&&_t(!0)};kn(()=>{d=!1,t(b),d||v(null,null)},c),M&&(l=V)}function ot(e,t,r=!1,i=!1,l=!1){var o=e,f="";Re(()=>{var s=N;if(f===(f=t()??"")){M&&yt();return}if(s.nodes_start!==null&&(Rn(s.nodes_start,s.nodes_end),s.nodes_start=s.nodes_end=null),f!==""){if(M){V.data;for(var c=yt(),d=c;c!==null&&(c.nodeType!==8||c.data!=="");)d=c,c=Be(c);if(c===null)throw ir(),pt;Te(V,d),o=je(c);return}var b=f+"";r?b=`<svg>${b}</svg>`:i&&(b=`<math>${b}</math>`);var v=Gr(b);if((r||i)&&(v=me(v)),Te(me(v),v.lastChild),r||i)for(;me(v);)o.before(me(v));else o.before(v)}})}function sa(e,t,r,i,l){var s;M&&yt();var o=(s=t.$$slots)==null?void 0:s[r],f=!1;o===!0&&(o=t.children,f=!0),o===void 0||o(e,f?()=>i:i)}const ti=[...`
|
|
3
|
+
\r\f \v\uFEFF`];function ua(e,t,r){var i=""+e;if(r){for(var l in r)if(r[l])i=i?i+" "+l:l;else if(i.length)for(var o=l.length,f=0;(f=i.indexOf(l,f))>=0;){var s=f+o;(f===0||ti.includes(i[f-1]))&&(s===i.length||ti.includes(i[s]))?i=(f===0?"":i.substring(0,f))+i.substring(s+1):f=s}}return i===""?null:i}function fa(e,t,r,i,l,o){var f=e.__className;if(M||f!==r||f===void 0){var s=ua(r,i,o);(!M||s!==e.getAttribute("class"))&&(s==null?e.removeAttribute("class"):e.className=s),e.__className=r}else if(o&&l!==o)for(var c in o){var d=!!o[c];(l==null||d!==!!l[c])&&e.classList.toggle(c,d)}return o}const ca=Symbol("is custom element"),da=Symbol("is html");function ri(e){if(M){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var i=e.value;$(e,"value",null),e.value=i}if(e.hasAttribute("checked")){var l=e.checked;$(e,"checked",null),e.checked=l}}};e.__on_r=r,Bo(r),Jn()}}function ha(e,t){var r=ni(e);r.value===(r.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!=="PROGRESS")||(e.value=t??"")}function $(e,t,r,i){var l=ni(e);M&&(l[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||l[t]!==(l[t]=r)&&(t==="loading"&&(e[wo]=r),r==null?e.removeAttribute(t):typeof r!="string"&&va(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function ni(e){return e.__attributes??(e.__attributes={[ca]:e.nodeName.includes("-"),[da]:e.namespaceURI===co})}var ii=new Map;function va(e){var t=ii.get(e.nodeName);if(t)return t;ii.set(e.nodeName,t=[]);for(var r,i=e,l=Element.prototype;l!==i;){r=go(i);for(var o in r)r[o].set&&t.push(o);i=fn(i)}return t}function ga(e,t,r=t){ra(e,"change",i=>{var l=i?e.defaultChecked:e.checked;r(l)}),(M&&e.defaultChecked!==e.checked||it(t)==null)&&r(e.checked),Fr(()=>{var i=t();e.checked=!!i})}function oi(e,t){return e===t||(e==null?void 0:e[Dt])===t}function pr(e={},t,r,i){return Or(()=>{var l,o;return Fr(()=>{l=o,o=[],it(()=>{e!==r(...o)&&(t(e,...o),l&&oi(r(...l),e)&&t(null,...l))})}),()=>{Ur(()=>{o&&oi(r(...o),e)&&t(null,...o)})}}),e}function ai(e){le===null&&sn(),Pr(()=>{const t=it(e);if(typeof t=="function")return t})}function pa(e){le===null&&sn(),ai(()=>()=>it(e))}function li(e,t,r){if(e==null)return t(void 0),mt;const i=it(()=>e.subscribe(t,r));return i.unsubscribe?()=>i.unsubscribe():i}const Et=[];function ma(e,t=mt){let r=null;const i=new Set;function l(s){if(wn(e,s)&&(e=s,r)){const c=!Et.length;for(const d of i)d[1](),Et.push(d,e);if(c){for(let d=0;d<Et.length;d+=2)Et[d][0](Et[d+1]);Et.length=0}}}function o(s){l(s(e))}function f(s,c=mt){const d=[s,c];return i.add(d),i.size===1&&(r=t(l,o)||mt),s(e),()=>{i.delete(d),i.size===0&&r&&(r(),r=null)}}return{set:l,update:o,subscribe:f}}function mr(e){let t;return li(e,r=>t=r)(),t}let br=!1,Yr=Symbol();function ba(e,t,r){const i=r[t]??(r[t]={store:null,source:Br(void 0),unsubscribe:mt});if(i.store!==e&&!(Yr in r))if(i.unsubscribe(),i.store=e??null,e==null)i.source.v=void 0,i.unsubscribe=mt;else{var l=!0;i.unsubscribe=li(e,o=>{l?i.source.v=o:_(i.source,o)}),l=!1}return e&&Yr in r?mr(e):a(i.source)}function _a(){const e={};function t(){Lr(()=>{for(var r in e)e[r].unsubscribe();Tt(e,Yr,{enumerable:!1,value:!0})})}return[e,t]}function ya(e){var t=br;try{return br=!1,[e(),br]}finally{br=t}}function si(e){var t;return((t=e.ctx)==null?void 0:t.d)??!1}function x(e,t,r,i){var Ve;var l=(r&oo)!==0,o=!0,f=(r&lo)!==0,s=(r&so)!==0,c=!1,d;f?[d,c]=ya(()=>e[t]):d=e[t];var b=Dt in e||gn in e,v=f&&(((Ve=Qe(e,t))==null?void 0:Ve.set)??(b&&t in e&&(H=>e[t]=H)))||void 0,m=i,y=!0,L=!1,O=()=>(L=!0,y&&(y=!1,s?m=it(i):m=i),m);d===void 0&&i!==void 0&&(v&&o&&Io(),d=O(),v&&v(d));var B;if(B=()=>{var H=e[t];return H===void 0?O():(y=!0,L=!1,H)},(r&ao)===0)return B;if(v){var R=e.$$legacy;return function(H,De){return arguments.length>0?((!De||R||c)&&v(De?B():H),H):B()}}var re=!1,ce=Br(d),ne=ar(()=>{var H=B(),De=a(ce);return re?(re=!1,De):ce.v=H});return f&&a(ne),l||(ne.equals=Nr),function(H,De){if(arguments.length>0){const Ze=De?a(ne):f?qe(H):H;if(!ne.equals(Ze)){if(re=!0,_(ce,Ze),L&&m!==void 0&&(m=Ze),si(ne))return H;it(()=>a(ne))}return H}return si(ne)?ne.v:a(ne)}}function wa(e){return new Ea(e)}class Ea{constructor(t){rn(this,Me);rn(this,_e);var o;var r=new Map,i=(f,s)=>{var c=Br(s);return r.set(f,c),c};const l=new Proxy({...t.props||{},$$events:{}},{get(f,s){return a(r.get(s)??i(s,Reflect.get(f,s)))},has(f,s){return s===gn?!0:(a(r.get(s)??i(s,Reflect.get(f,s))),Reflect.has(f,s))},set(f,s,c){return _(r.get(s)??i(s,c),c),Reflect.set(f,s,c)}});nn(this,_e,(t.hydrate?aa:Qn)(t.component,{target:t.target,anchor:t.anchor,props:l,context:t.context,intro:t.intro??!1,recover:t.recover})),(!((o=t==null?void 0:t.props)!=null&&o.$$host)||t.sync===!1)&&C(),nn(this,Me,l.$$events);for(const f of Object.keys(he(this,_e)))f==="$set"||f==="$destroy"||f==="$on"||Tt(this,f,{get(){return he(this,_e)[f]},set(s){he(this,_e)[f]=s},enumerable:!0});he(this,_e).$set=f=>{Object.assign(l,f)},he(this,_e).$destroy=()=>{la(he(this,_e))}}$set(t){he(this,_e).$set(t)}$on(t,r){he(this,Me)[t]=he(this,Me)[t]||[];const i=(...l)=>r.call(this,...l);return he(this,Me)[t].push(i),()=>{he(this,Me)[t]=he(this,Me)[t].filter(l=>l!==i)}}$destroy(){he(this,_e).$destroy()}}Me=new WeakMap,_e=new WeakMap;let ui;typeof HTMLElement=="function"&&(ui=class extends HTMLElement{constructor(t,r,i){super();Ae(this,"$$ctor");Ae(this,"$$s");Ae(this,"$$c");Ae(this,"$$cn",!1);Ae(this,"$$d",{});Ae(this,"$$r",!1);Ae(this,"$$p_d",{});Ae(this,"$$l",{});Ae(this,"$$l_u",new Map);Ae(this,"$$me");this.$$ctor=t,this.$$s=r,i&&this.attachShadow({mode:"open"})}addEventListener(t,r,i){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(r),this.$$c){const l=this.$$c.$on(t,r);this.$$l_u.set(r,l)}super.addEventListener(t,r,i)}removeEventListener(t,r,i){if(super.removeEventListener(t,r,i),this.$$c){const l=this.$$l_u.get(r);l&&(l(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(l){return o=>{const f=document.createElement("slot");l!=="default"&&(f.name=l),G(o,f)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},i=Ca(this);for(const l of this.$$s)l in i&&(l==="default"&&!this.$$d.children?(this.$$d.children=t(l),r.default=!0):r[l]=t(l));for(const l of this.attributes){const o=this.$$g_p(l.name);o in this.$$d||(this.$$d[o]=_r(o,l.value,this.$$p_d,"toProp"))}for(const l in this.$$p_d)!(l in this.$$d)&&this[l]!==void 0&&(this.$$d[l]=this[l],delete this[l]);this.$$c=wa({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=Mo(()=>{Fr(()=>{var l;this.$$r=!0;for(const o of Qt(this.$$c)){if(!((l=this.$$p_d[o])!=null&&l.reflect))continue;this.$$d[o]=this.$$c[o];const f=_r(o,this.$$d[o],this.$$p_d,"toAttribute");f==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,f)}this.$$r=!1})});for(const l in this.$$l)for(const o of this.$$l[l]){const f=this.$$c.$on(l,o);this.$$l_u.set(o,f)}this.$$l={}}}attributeChangedCallback(t,r,i){var l;this.$$r||(t=this.$$g_p(t),this.$$d[t]=_r(t,i,this.$$p_d,"toProp"),(l=this.$$c)==null||l.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return Qt(this.$$p_d).find(r=>this.$$p_d[r].attribute===t||!this.$$p_d[r].attribute&&r.toLowerCase()===t)||t}});function _r(e,t,r,i){var o;const l=(o=r[e])==null?void 0:o.type;if(t=l==="Boolean"&&typeof t!="boolean"?t!=null:t,!i||!r[e])return t;if(i==="toAttribute")switch(l){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(l){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Ca(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function xa(e,t,r,i,l,o){let f=class extends ui{constructor(){super(e,r,l),this.$$p_d=t}static get observedAttributes(){return Qt(t).map(s=>(t[s].attribute||s).toLowerCase())}};return Qt(t).forEach(s=>{Tt(f.prototype,s,{get(){return this.$$c&&s in this.$$c?this.$$c[s]:this.$$d[s]},set(c){var v;c=_r(s,c,t),this.$$d[s]=c;var d=this.$$c;if(d){var b=(v=Qe(d,s))==null?void 0:v.get;b?d[s]=c:d.$set({[s]:c})}}})}),i.forEach(s=>{Tt(f.prototype,s,{get(){var c;return(c=this.$$c)==null?void 0:c[s]}})}),e.element=f,f}const fi=new TextEncoder;function ka(e){return[...new Uint8Array(e)].map(t=>t.toString(16).padStart(2,"0")).join("")}async function Aa(e,t="SHA-256",r=1e5){const i=Date.now().toString(16);e||(e=Math.round(Math.random()*r));const l=await ci(i,e,t);return{algorithm:t,challenge:l,salt:i,signature:""}}async function ci(e,t,r){if(typeof crypto>"u"||!("subtle"in crypto)||!("digest"in crypto.subtle))throw new Error("Web Crypto is not available. Secure context is required (https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts).");return ka(await crypto.subtle.digest(r.toUpperCase(),fi.encode(e+t)))}function Ia(e,t,r="SHA-256",i=1e6,l=0){const o=new AbortController,f=Date.now();return{promise:(async()=>{for(let c=l;c<=i;c+=1){if(o.signal.aborted)return null;if(await ci(t,c,r)===e)return{number:c,took:Date.now()-f}}return null})(),controller:o}}function di(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function Ra(e){const t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r}function Sa(e,t=12){const r=new Uint8Array(t);for(let i=0;i<t;i++)r[i]=e%256,e=Math.floor(e/256);return r}async function $a(e,t="",r=1e6,i=0){const l="AES-GCM",o=new AbortController,f=Date.now(),s=async()=>{for(let b=i;b<=r;b+=1){if(o.signal.aborted||!c||!d)return null;try{const v=await crypto.subtle.decrypt({name:l,iv:Sa(b)},c,d);if(v)return{clearText:new TextDecoder().decode(v),took:Date.now()-f}}catch{}}return null};let c=null,d=null;try{d=Ra(e);const b=await crypto.subtle.digest("SHA-256",fi.encode(t));c=await crypto.subtle.importKey("raw",b,l,!1,["decrypt"])}catch{return{promise:Promise.reject(),controller:o}}return{promise:s(),controller:o}}var w=(e=>(e.CODE="code",e.ERROR="error",e.VERIFIED="verified",e.VERIFYING="verifying",e.UNVERIFIED="unverified",e.EXPIRED="expired",e))(w||{}),te=(e=>(e.ERROR="error",e.LOADING="loading",e.PLAYING="playing",e.PAUSED="paused",e.READY="ready",e))(te||{});globalThis.altchaPlugins=globalThis.altchaPlugins||[],globalThis.altchaI18n=globalThis.altchaI18n||{get:e=>mr(globalThis.altchaI18n.store)[e],set:(e,t)=>{Object.assign(mr(globalThis.altchaI18n.store),{[e]:t}),globalThis.altchaI18n.store.set(mr(globalThis.altchaI18n.store))},store:ma({})};const Ta={ariaLinkLabel:"Visit Altcha.org",enterCode:"Enter code",enterCodeAria:"Enter code you hear. Press Space to play audio.",error:"Verification failed. Try again later.",expired:"Verification expired. Try again.",footer:'Protected by <a href="https://altcha.org/" target="_blank" aria-label="Visit Altcha.org">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."};globalThis.altchaI18n.set("en",Ta);const Zr=(e,t)=>{let r=Lo(()=>bo(t==null?void 0:t(),24));var i=Pa();Re(()=>{$(i,"width",a(r)),$(i,"height",a(r))}),G(e,i)};function Da(e,t){e.code==="Space"&&(e.preventDefault(),e.stopImmediatePropagation(),t())}function Na(e,t){e.preventDefault(),t()}function La(e,t,r,i,l,o,f,s){var c;[w.UNVERIFIED,w.ERROR,w.EXPIRED,w.CODE].includes(a(t))?r()!==!1&&((c=a(i))==null?void 0:c.reportValidity())===!1?_(l,!1):o()?f():s():_(l,!0)}var Pa=vr('<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" class="altcha-spinner"><path d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z" fill="currentColor" opacity=".25"></path><path d="M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z" fill="currentColor"></path></svg>'),Oa=Ce('<input type="hidden">'),Fa=Ce('<div><a target="_blank" class="altcha-logo" aria-hidden="true"><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>'),Ma=vr('<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>'),Va=vr('<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>'),Ua=vr('<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>'),ja=Ce('<button type="button" class="altcha-code-challenge-audio"><!></button>'),qa=Ce("<audio hidden autoplay><source></audio>"),Ba=Ce('<div class="altcha-code-challenge" role="dialog"><div class="altcha-code-challenge-arrow"></div> <form data-code-challenge-form="1"><img class="altcha-code-challenge-image" alt=""> <input type="text" autocomplete="off" name="code" class="altcha-code-challenge-input" required> <div class="altcha-code-challenge-buttons"><div class="altcha-code-challenge-buttons-left"><!> <button type="button" class="altcha-code-challenge-reload"><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> <button type="submit" class="altcha-code-challenge-verify"><!> </button></div> <!></form></div>'),Ha=Ce("<div><!></div>"),Ga=Ce("<div><!></div>"),Wa=Ce('<div class="altcha-error"><svg width="14" height="14" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"></path></svg> <!></div>'),Ya=Ce('<div class="altcha-footer"><div><!></div></div>'),Za=Ce('<div class="altcha-anchor-arrow"></div>'),za=Ce('<!> <div class="altcha"><div class="altcha-main"><div><!> <input type="checkbox"></div> <label class="altcha-label"><!></label> <!> <!> <!></div> <!> <!> <!></div>',1);function hi(e,t){var eo,to;Wn(t,!0);const[r,i]=_a(),l=()=>ba(Ka,"$altchaI18nStore",r);let o=x(t,"auto",7,void 0),f=x(t,"blockspam",7,void 0),s=x(t,"challengeurl",7,void 0),c=x(t,"challengejson",7,void 0),d=x(t,"credentials",7,void 0),b=x(t,"customfetch",7,void 0),v=x(t,"debug",7,!1),m=x(t,"delay",7,0),y=x(t,"disableautofocus",7,!1),L=x(t,"refetchonexpire",7,!0),O=x(t,"disablerefetchonexpire",23,()=>!L()),B=x(t,"expire",7,void 0),R=x(t,"floating",7,void 0),re=x(t,"floatinganchor",7,void 0),ce=x(t,"floatingoffset",7,void 0),ne=x(t,"floatingpersist",7,!1),Ve=x(t,"hidefooter",7,!1),H=x(t,"hidelogo",7,!1),De=x(t,"id",7,void 0),Ze=x(t,"language",7,void 0),at=x(t,"name",7,"altcha"),lt=x(t,"maxnumber",7,1e6),qt=x(t,"mockerror",7,!1),ze=x(t,"obfuscated",7,void 0),xe=x(t,"overlay",7,void 0),Bt=x(t,"overlaycontent",7,void 0),yr=x(t,"plugins",7,void 0),st=x(t,"sentinel",7,void 0),Ne=x(t,"spamfilter",7,!1),Ct=x(t,"strings",7,void 0),ye=x(t,"test",7,!1),se=x(t,"verifyurl",7,void 0),xt=x(t,"workers",23,()=>Math.min(16,navigator.hardwareConcurrency||8)),Ht=x(t,"workerurl",7,void 0);const{altchaI18n:Ja}=globalThis,Ka=Ja.store,mi=["SHA-256","SHA-384","SHA-512"],Xa="https://altcha.org/",Je=(n,u)=>{t.$$host.dispatchEvent(new CustomEvent(n,{detail:u}))},bi=(to=(eo=document.documentElement.lang)==null?void 0:eo.split("-"))==null?void 0:to[0],zr=Lt(()=>{var n;return s()&&new URL(s(),location.origin).host.endsWith(".altcha.org")&&!!((n=s())!=null&&n.includes("apiKey=ckey_"))}),wr=Lt(()=>c()?Ni(c()):void 0),Qa=Lt(()=>Ct()?Ni(Ct()):{}),U=Lt(()=>({...Ei(l()),...a(Qa)})),_i=Lt(()=>`${De()||at()}_checkbox_${Math.round(Math.random()*1e8)}`);let ut=P(null),Gt=P(!1),Z=P(null),A=P(qe(w.UNVERIFIED)),j=P(void 0),Wt=P(null),Ke=P(null),pe=P(null),Jr=P(null),kt=P(null),F=P(null),Yt=P(null),ft=P(null),Le=null,Q=P(null),ct=P(!1),Xe=[],Kr=P(!1),Pe=P(null);Pr(()=>{dl(a(ft))}),Pr(()=>{hl(a(A))}),pa(()=>{el(),_(Yt,null),a(F)&&(a(F).removeEventListener("submit",Ri),a(F).removeEventListener("reset",Si),a(F).removeEventListener("focusin",Ii),_(F,null)),Le&&(clearTimeout(Le),Le=null),document.removeEventListener("click",ki),document.removeEventListener("scroll",Ai),window.removeEventListener("resize",Di)}),ai(()=>{var n;I("mounted","2.2.3"),I("workers",xt()),il(),I("plugins",Xe.length?Xe.map(u=>u.constructor.pluginName).join(", "):"none"),ye()&&I("using test mode"),B()&&Xr(B()),o()!==void 0&&I("auto",o()),R()!==void 0&&Fi(R()),_(F,(n=a(j))==null?void 0:n.closest("form"),!0),a(F)&&(a(F).addEventListener("submit",Ri,{capture:!0}),a(F).addEventListener("reset",Si),(o()==="onfocus"||ne()==="focus")&&a(F).addEventListener("focusin",Ii)),xe()&&Mi(!0),o()==="onload"&&(ze()?Zt():Ue()),a(zr)&&(Ve()||H())&&I("Attributes hidefooter and hidelogo ignored because usage with free API Keys requires attribution."),requestAnimationFrame(()=>{Je("load")})});function Er(n,u){return btoa(JSON.stringify({algorithm:n.algorithm,challenge:n.challenge,number:u.number,salt:n.salt,signature:n.signature,test:ye()?!0:void 0,took:u.took}))}function el(){for(const n of Xe)n.destroy()}function yi(){s()&&!O()&&a(A)===w.VERIFIED?Ue():dt(w.EXPIRED,a(U).expired)}async function tl(){if(qt())throw I("mocking error"),new Error("Mocked error.");if(a(wr))return I("using provided json data"),Li(a(wr).salt),a(wr);if(ye())return I("generating test challenge",{test:ye()}),Aa(typeof ye()!="boolean"?+ye():void 0);{if(!s()&&a(F)){const h=a(F).getAttribute("action");h!=null&&h.includes("/form/")&&s(h+"/altcha")}if(!s())throw new Error("Attribute challengeurl not set.");I("fetching challenge from",s());const n={credentials:typeof d()=="boolean"?"include":d(),headers:Ne()!==!1?{"x-altcha-spam-filter":"1"}:{}},u=await wi()(s(),n);if(!u||!(u instanceof Response))throw new Error("Custom fetch function did not return a response.");if(u.status!==200)throw new Error(`Server responded with ${u.status}.`);const g=u.headers.get("X-Altcha-Config"),p=await u.json();if(Li(p.salt),g)try{const h=JSON.parse(g);h&&typeof h=="object"&&(h.verifyurl&&!h.verifyurl.startsWith("fn:")&&(h.verifyurl=xi(h.verifyurl)),ji(h))}catch(h){I("unable to configure from X-Altcha-Config",h)}return p}}function rl(n){var g,p;const u=(g=a(F))==null?void 0:g.querySelector(typeof n=="string"?`input[name="${n}"]`:'input[type="email"]:not([data-no-spamfilter])');return((p=u==null?void 0:u.value)==null?void 0:p.slice(u.value.indexOf("@")))||void 0}function wi(){let n=fetch;if(b())if(I("using customfetch"),typeof b()=="string"){if(n=globalThis[b()]||null,!n)throw new Error(`Custom fetch function not found: ${b()}`)}else n=b();return n}function Ei(n,u=[Ze()||"",document.documentElement.lang||"",...navigator.languages]){const g=Object.keys(n).map(h=>h.toLowerCase()),p=u.reduce((h,E)=>(E=E.toLowerCase(),h||(n[E]?E:null)||g.find(k=>E.split("-")[0]===k.split("-")[0])||null),null);return n[p||"en"]}function nl(){return Ne()==="ipAddress"?{blockedCountries:void 0,classifier:void 0,disableRules:void 0,email:!1,expectedCountries:void 0,expectedLanguages:void 0,fields:!1,ipAddress:void 0,text:void 0,timeZone:void 0}:typeof Ne()=="object"?Ne():{blockedCountries:void 0,classifier:void 0,disableRules:void 0,email:void 0,expectedCountries:void 0,expectedLanguages:void 0,fields:void 0,ipAddress:void 0,text:void 0,timeZone:void 0}}function Ci(n){var g;return[...((g=a(F))==null?void 0:g.querySelectorAll(n!=null&&n.length?n.map(p=>`input[name="${p}"]`).join(", "):'input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])'))||[]].reduce((p,h)=>{const E=h.name,k=h.value;return E&&k&&(p[E]=/\n/.test(k)?k.replace(new RegExp("(?<!\\r)\\n","g"),`\r
|
|
4
|
+
`):k),p},{})}function xi(n,u){const g=new URL(s()||location.origin),p=new URL(n,g);if(p.search||(p.search=g.search),u)for(const h in u)u[h]!==void 0&&u[h]!==null&&p.searchParams.set(h,u[h]);return p.toString()}function il(){const n=yr()!==void 0?yr().split(","):void 0;for(const u of globalThis.altchaPlugins)(!n||n.includes(u.pluginName))&&Xe.push(new u({el:a(j),clarify:Zt,dispatch:Je,getConfiguration:qi,getFloatingAnchor:Bi,getState:Hi,log:I,reset:dt,solve:Ui,setState:Oe,setFloatingAnchor:Gi,verify:Ue}))}function I(...n){(v()||n.some(u=>u instanceof Error))&&console[n[0]instanceof Error?"error":"log"]("ALTCHA",`[name=${at()}]`,...n)}function ol(){_(Q,te.PAUSED,!0)}function al(n){_(Q,te.ERROR,!0)}function ll(){_(Q,te.READY,!0)}function sl(){_(Q,te.LOADING,!0)}function ul(){_(Q,te.PLAYING,!0)}function fl(){_(Q,te.PAUSED,!0)}function cl(n){var u;if(n.preventDefault(),n.stopPropagation(),a(Z)){const g=new FormData(n.target),p=String(g.get("code"));if((u=se())!=null&&u.startsWith("fn:")){const h=se().replace(/^fn:/,"");if(I(`calling ${h} function instead of verifyurl`),!(h in globalThis))throw new Error(`Global function "${h}" is undefined.`);return globalThis[h]({challenge:a(Z).challenge,code:p,solution:a(Z).solution})}_(ct,!0),Pi(Er(a(Z).challenge,a(Z).solution),p).then(({reason:h,verified:E})=>{E?(_(Z,null),Oe(w.VERIFIED),I("verified"),qr().then(()=>{var k;(k=a(Jr))==null||k.focus(),Je("verified",{payload:a(Pe)}),o()==="onsubmit"?Oi(a(Yt)):xe()&&zt()})):(dt(),_(ft,h||"Verification failed",!0))}).catch(h=>{_(Z,null),Oe(w.ERROR,h),I("sentinel verification failed:",h)}).finally(()=>{_(ct,!1)})}}function ki(n){var g;const u=n.target;R()&&u&&!a(j).contains(u)&&(a(A)===w.VERIFIED&&ne()===!1||a(A)===w.VERIFIED&&ne()==="focus"&&!((g=a(F))!=null&&g.matches(":focus-within"))||o()==="off"&&a(A)===w.UNVERIFIED)&&zt()}function Ai(){R()&&a(A)!==w.UNVERIFIED&&Jt()}function dl(n){for(const u of Xe)typeof u.onErrorChange=="function"&&u.onErrorChange(a(ft))}function Ii(n){a(A)===w.UNVERIFIED?Ue():R()&&ne()==="focus"&&a(A)===w.VERIFIED&&Cr()}function Ri(n){var p;const u=n.target;u!=null&&u.hasAttribute("data-code-challenge-form")||(_(Yt,n.submitter,!0),a(F)&&o()==="onsubmit"?((p=a(Yt))==null||p.blur(),a(A)===w.UNVERIFIED?(n.preventDefault(),n.stopPropagation(),Ue().then(()=>{Oi(a(Yt))})):a(A)!==w.VERIFIED&&(n.preventDefault(),n.stopPropagation(),a(A)===w.VERIFYING&&$i())):a(F)&&R()&&o()==="off"&&a(A)===w.UNVERIFIED&&(n.preventDefault(),n.stopPropagation(),Cr()))}function Si(){dt()}function $i(){a(A)===w.VERIFYING&&a(U).waitAlert&&alert(a(U).waitAlert)}function Ti(){a(Ke)?a(Ke).paused?(a(Ke).currentTime=0,a(Ke).play()):a(Ke).pause():(_(Kr,!0),requestAnimationFrame(()=>{var n;(n=a(Ke))==null||n.play()}))}function hl(n){for(const u of Xe)typeof u.onStateChange=="function"&&u.onStateChange(a(A));R()&&a(A)!==w.UNVERIFIED&&requestAnimationFrame(()=>{Jt()}),_(Gt,a(A)===w.VERIFIED),xe()&&a(pe)&&(a(A)!==w.UNVERIFIED?Cr():zt())}function Di(){R()&&Jt()}function Ni(n){return JSON.parse(n)}function Li(n){var p;const u=new URLSearchParams((p=n.split("?"))==null?void 0:p[1]),g=u.get("expires")||u.get("expire");if(g){const h=new Date(+g*1e3),E=isNaN(h.getTime())?0:h.getTime()-Date.now();E>0&&Xr(E)}else Le&&(clearTimeout(Le),Le=null)}async function vl(n){if(!se())throw new Error("Attribute verifyurl not set.");I("requesting server verification from",se());const u={payload:n};if(Ne()!==!1){const{blockedCountries:h,classifier:E,disableRules:k,email:W,expectedLanguages:q,expectedCountries:ie,fields:de,ipAddress:vt,text:It,timeZone:gt}=nl();u.blockedCountries=h,u.classifier=E,u.disableRules=k,u.email=W===!1?void 0:rl(W),u.expectedCountries=ie,u.expectedLanguages=q||(bi?[bi]:void 0),u.fields=de===!1?void 0:Ci(de),u.ipAddress=vt===!1?void 0:vt||"auto",u.text=It,u.timeZone=gt===!1?void 0:gt||di()}const g=await wi()(se(),{body:JSON.stringify(u),headers:{"content-type":"application/json"},method:"POST"});if(!g||!(g instanceof Response))throw new Error("Custom fetch function did not return a response.");if(g.status!==200)throw new Error(`Server responded with ${g.status}.`);const p=await g.json();if(p!=null&&p.payload&&_(Pe,p.payload,!0),Je("serververification",p),f()&&p.classification==="BAD")throw new Error("SpamFilter returned negative classification.")}async function Pi(n,u){if(!se())throw new Error("Attribute verifyurl not set.");I("requesting sentinel verification from",se());const g={code:u,payload:n};st()&&(g.fields=st().fields?Ci():void 0,g.timeZone=st().timeZone?di():void 0);const p=await fetch(se(),{body:JSON.stringify(g),headers:{"content-type":"application/json"},method:"POST"});if(!p||!(p instanceof Response))throw new Error("Fetch function did not return a response.");if(p.status!==200)throw new Error(`Server responded with ${p.status}.`);const h=await p.json();return h!=null&&h.payload&&_(Pe,h.payload,!0),Je("sentinelverification",h),h}function Oi(n){var u;a(F)&&"requestSubmit"in a(F)?a(F).requestSubmit(n):(u=a(F))!=null&&u.reportValidity()&&(n?n.click():a(F).submit())}function Xr(n){I("expire",n),Le&&(clearTimeout(Le),Le=null),n<1?yi():Le=setTimeout(yi,n)}function Fi(n){I("floating",n),R()!==n&&(a(j).style.left="",a(j).style.top=""),R(n===!0||n===""?"auto":n===!1||n==="false"?void 0:R()),R()?(o()||o("onsubmit"),document.addEventListener("scroll",Ai),document.addEventListener("click",ki),window.addEventListener("resize",Di)):o()==="onsubmit"&&o(void 0)}function Mi(n){var u,g;if(I("overlay",n),xe(n),n){if(o()||o("onsubmit"),a(pe)&&a(j).parentElement&&a(pe).replaceWith(a(j).parentElement),(g=(u=a(j))==null?void 0:u.parentElement)!=null&&g.parentElement){_(pe,document.createElement("div"),!0),a(j).parentElement.parentElement.appendChild(a(pe));const p=document.createElement("div"),h=document.createElement("button");h.type="button",h.innerHTML="×",h.addEventListener("click",E=>{E.preventDefault(),dt()}),a(pe).classList.add("altcha-overlay-backdrop"),h.classList.add("altcha-overlay-close-button"),p.classList.add("altcha-overlay"),a(pe).append(p),p.append(h),Bt()&&p.append(...document.querySelectorAll(Bt())),p.append(a(j).parentElement)}}else a(pe)&&a(j).parentElement&&(a(pe).replaceWith(a(j).parentElement),a(j).style.display="block")}function Vi(n){if(!n.algorithm)throw new Error("Invalid challenge. Property algorithm is missing.");if(n.signature===void 0)throw new Error("Invalid challenge. Property signature is missing.");if(!mi.includes(n.algorithm.toUpperCase()))throw new Error(`Unknown algorithm value. Allowed values: ${mi.join(", ")}`);if(!n.challenge||n.challenge.length<40)throw new Error("Challenge is too short. Min. 40 chars.");if(!n.salt||n.salt.length<10)throw new Error("Salt is too short. Min. 10 chars.")}async function Ui(n){let u=null,g=null;if("Worker"in window){try{u=gl(n,n.maxNumber||n.maxnumber||lt()),_(ut,u.controller,!0),g=await u.promise}catch(p){I(p)}finally{_(ut,null)}if(g===null||(g==null?void 0:g.number)!==void 0||"obfuscated"in n)return{data:n,solution:g}}if("obfuscated"in n){const p=await $a(n.obfuscated,n.key,n.maxNumber||n.maxnumber);return{data:n,solution:await p.promise}}u=Ia(n.challenge,n.salt,n.algorithm,n.maxNumber||n.maxnumber||lt()),_(ut,u.controller,!0);try{g=await u.promise}catch(p){I(p)}finally{_(ut,null)}return{data:n,solution:g}}function gl(n,u=typeof ye()=="number"?ye():n.maxNumber||n.maxnumber||lt(),g=Math.ceil(xt())){const p=new AbortController,h=[];g=Math.min(16,u,Math.max(1,g));for(let W=0;W<g;W++)h.push(altchaCreateWorker(Ht()));const E=Math.ceil(u/g);return{promise:(async()=>{const W=await Promise.all(h.map((q,ie)=>{const de=ie*E;return p.signal.addEventListener("abort",()=>{q.postMessage({type:"abort"})}),new Promise(vt=>{q.addEventListener("message",It=>{if(It.data)for(const gt of h)gt!==q&>.postMessage({type:"abort"});vt(It.data)}),q.postMessage({payload:n,max:de+E,start:de,type:"work"})})}));for(const q of h)q.terminate();return W.find(q=>!!q)||null})(),controller:p}}async function Zt(){if(!ze()){Oe(w.ERROR);return}const n=Xe.find(u=>u.constructor.pluginName==="obfuscation");if(!n||!("clarify"in n)){Oe(w.ERROR),I("Plugin `obfuscation` not found. Import `altcha/plugins/obfuscation` to load it.");return}if("clarify"in n&&typeof n.clarify=="function")return n.clarify()}function ji(n){n.obfuscated!==void 0&&ze(n.obfuscated),n.auto!==void 0&&(o(n.auto),o()==="onload"&&(ze()?Zt():Ue())),n.blockspam!==void 0&&f(!!n.blockspam),n.customfetch!==void 0&&b(n.customfetch),n.floatinganchor!==void 0&&re(n.floatinganchor),n.delay!==void 0&&m(n.delay),n.floatingoffset!==void 0&&ce(n.floatingoffset),n.floating!==void 0&&Fi(n.floating),n.expire!==void 0&&(Xr(n.expire),B(n.expire)),n.challenge&&(c(typeof n.challenge=="string"?n.challenge:JSON.stringify(n.challenge)),Vi(a(wr))),n.challengeurl!==void 0&&s(n.challengeurl),n.debug!==void 0&&v(!!n.debug),n.hidefooter!==void 0&&Ve(!!n.hidefooter),n.hidelogo!==void 0&&H(!!n.hidelogo),n.language!==void 0&&Ct(Ei(l(),[n.language])),n.maxnumber!==void 0&<(+n.maxnumber),n.mockerror!==void 0&&qt(!!n.mockerror),n.name!==void 0&&at(n.name),n.overlaycontent!==void 0&&Bt(n.overlaycontent),n.overlay!==void 0&&Mi(n.overlay),n.refetchonexpire!==void 0&&O(!n.refetchonexpire),n.disablerefetchonexpire!==void 0&&O(!n.disablerefetchonexpire),n.sentinel!==void 0&&typeof n.sentinel=="object"&&st(n.sentinel),n.spamfilter!==void 0&&Ne(typeof n.spamfilter=="object"?n.spamfilter:!!n.spamfilter),n.strings&&Ct(typeof n.strings=="string"?n.strings:JSON.stringify(n.strings)),n.test!==void 0&&ye(typeof n.test=="number"?n.test:!!n.test),n.verifyurl!==void 0&&se(n.verifyurl),n.workers!==void 0&&xt(+n.workers),n.workerurl!==void 0&&Ht(n.workerurl)}function qi(){return{auto:o(),blockspam:f(),challengeurl:s(),debug:v(),delay:m(),disableautofocus:y(),disablerefetchonexpire:O(),expire:B(),floating:R(),floatinganchor:re(),floatingoffset:ce(),hidefooter:Ve(),hidelogo:H(),name:at(),maxnumber:lt(),mockerror:qt(),obfuscated:ze(),overlay:xe(),refetchonexpire:!O(),spamfilter:Ne(),strings:a(U),test:ye(),verifyurl:se(),workers:xt(),workerurl:Ht()}}function Bi(){return a(kt)}function pl(n){return Xe.find(u=>u.constructor.pluginName===n)}function Hi(){return a(A)}function zt(){a(j).style.display="none",xe()&&a(pe)&&(a(pe).style.display="none")}function Jt(n=20){var u;if(a(j))if(a(kt)||_(kt,(re()?document.querySelector(re()):(u=a(F))==null?void 0:u.querySelector('input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])'))||a(F),!0),a(kt)){const g=parseInt(ce(),10)||12,p=a(kt).getBoundingClientRect(),h=a(j).getBoundingClientRect(),E=document.documentElement.clientHeight,k=document.documentElement.clientWidth,W=R()==="auto"?p.bottom+h.height+g+n>E:R()==="top",q=Math.max(n,Math.min(k-n-h.width,p.left+p.width/2-h.width/2));if(W?a(j).style.top=`${p.top-(h.height+g)}px`:a(j).style.top=`${p.bottom+g}px`,a(j).style.left=`${q}px`,a(j).setAttribute("data-floating",W?"top":"bottom"),a(Wt)){const ie=a(Wt).getBoundingClientRect();a(Wt).style.left=p.left-q+p.width/2-ie.width/2+"px"}}else I("unable to find floating anchor element")}function dt(n=w.UNVERIFIED,u=null){a(ut)&&(a(ut).abort(),_(ut,null)),_(Gt,!1),_(Pe,null),_(Z,null),_(Kr,!1),_(Q,null),Oe(n,u)}function Gi(n){_(kt,n,!0)}function Oe(n,u=null){_(A,n,!0),_(ft,u,!0),Je("statechange",{payload:a(Pe),state:a(A)})}function Cr(){a(j).style.display="block",R()&&Jt(),xe()&&a(pe)&&(a(pe).style.display="flex")}async function Ue(){return dt(w.VERIFYING),await new Promise(n=>setTimeout(n,m()||0)),tl().then(n=>(Vi(n),I("challenge",n),Ui(n))).then(({data:n,solution:u})=>{var g;if(I("solution",u),!u||n&&"challenge"in n&&!("clearText"in u)){if((u==null?void 0:u.number)!==void 0&&"challenge"in n)if(se()&&"codeChallenge"in n)["INPUT","BUTTON","SELECT","TEXTAREA"].includes(((g=document.activeElement)==null?void 0:g.tagName)||"")&&y()===!1&&document.activeElement.blur(),_(Z,{challenge:n,solution:u},!0);else{if(se()&&st()!==void 0)return Pi(Er(n,u));if(se())return vl(Er(n,u));_(Pe,Er(n,u),!0),I("payload",a(Pe))}else if(a(A)!==w.EXPIRED)throw I("Unable to find a solution. Ensure that the 'maxnumber' attribute is greater than the randomly generated number."),new Error("Unexpected result returned.")}}).then(()=>{a(Z)?(Oe(w.CODE),qr().then(()=>{Je("code",{codeChallenge:a(Z)})})):a(Pe)&&(Oe(w.VERIFIED),I("verified"),qr().then(()=>{Je("verified",{payload:a(Pe)}),xe()&&zt()}))}).catch(n=>{I(n),Oe(w.ERROR,n.message)})}var Wi=za(),Yi=Nt(Wi);sa(Yi,t,"default",{});var At=K(Yi,2),Qr=J(At),xr=J(Qr);let Zi;var zi=J(xr);{var ml=n=>{Zr(n)};X(zi,n=>{a(A)===w.VERIFYING&&n(ml)})}var ht=K(zi,2);ri(ht),ht.__change=[La,A,Ne,F,Gt,ze,Zt,Ue],pr(ht,n=>_(Jr,n),()=>a(Jr)),z(xr);var kr=K(xr,2),bl=J(kr);{var _l=n=>{var u=gr(),g=Nt(u);ot(g,()=>a(U).verified),G(n,u)},yl=(n,u)=>{{var g=h=>{var E=gr(),k=Nt(E);ot(k,()=>a(U).verifying),G(h,E)},p=(h,E)=>{{var k=q=>{var ie=gr(),de=Nt(ie);ot(de,()=>a(U).verificationRequired),G(q,ie)},W=q=>{var ie=gr(),de=Nt(ie);ot(de,()=>a(U).label),G(q,ie)};X(h,q=>{a(A)===w.CODE?q(k):q(W,!1)},E)}};X(n,h=>{a(A)===w.VERIFYING?h(g):h(p,!1)},u)}};X(bl,n=>{a(A)===w.VERIFIED?n(_l):n(yl,!1)})}z(kr);var Ji=K(kr,2);{var wl=n=>{var u=Oa();ri(u),Re(()=>{$(u,"name",at()),ha(u,a(Pe))}),G(n,u)};X(Ji,n=>{a(A)===w.VERIFIED&&n(wl)})}var Ki=K(Ji,2);{var El=n=>{var u=Fa(),g=J(u);$(g,"href",Xa),z(u),Re(()=>$(g,"aria-label",a(U).ariaLinkLabel)),G(n,u)};X(Ki,n=>{(H()!==!0||a(zr))&&n(El)})}var Cl=K(Ki,2);{var xl=n=>{var u=Ba(),g=K(J(u),2),p=J(g),h=K(p,2);ta(h,!y()),h.__keydown=[Da,Ti];var E=K(h,2),k=J(E),W=J(k);{var q=ke=>{var ee=ja();ee.__click=Ti;var Ar=J(ee);{var Kt=Rt=>{Zr(Rt,()=>20)},Dl=(Rt,Nl)=>{{var Ll=St=>{var en=Ma();G(St,en)},Pl=(St,en)=>{{var Ol=$t=>{var tn=Va();G($t,tn)},Fl=$t=>{var tn=Ua();G($t,tn)};X(St,$t=>{a(Q)===te.PLAYING?$t(Ol):$t(Fl,!1)},en)}};X(Rt,St=>{a(Q)===te.ERROR?St(Ll):St(Pl,!1)},Nl)}};X(Ar,Rt=>{a(Q)===te.LOADING?Rt(Kt):Rt(Dl,!1)})}z(ee),Re(()=>{$(ee,"title",a(U).getAudioChallenge),ee.disabled=a(Q)===te.LOADING||a(Q)===te.ERROR||a(ct),$(ee,"aria-label",a(Q)===te.LOADING?a(U).loading:a(U).getAudioChallenge)}),G(ke,ee)};X(W,ke=>{a(Z).challenge.codeChallenge.audio&&ke(q)})}var ie=K(W,2);ie.__click=[Na,Ue],z(k);var de=K(k,2),vt=J(de);{var It=ke=>{Zr(ke,()=>16)};X(vt,ke=>{a(ct)&&ke(It)})}var gt=K(vt);z(de),z(E);var $l=K(E,2);{var Tl=ke=>{var ee=qa(),Ar=J(ee);z(ee),pr(ee,Kt=>_(Ke,Kt),()=>a(Ke)),Re(Kt=>$(Ar,"src",Kt),[()=>xi(a(Z).challenge.codeChallenge.audio,{language:Ze()})]),Ye("loadstart",ee,sl),Ye("canplay",ee,ll),Ye("pause",ee,fl),Ye("playing",ee,ul),Ye("ended",ee,ol),Ye("error",Ar,al),G(ke,ee)};X($l,ke=>{a(Z).challenge.codeChallenge.audio&&a(Kr)&&ke(Tl)})}z(g),z(u),Re(()=>{$(u,"aria-label",a(U).verificationRequired),$(p,"src",a(Z).challenge.codeChallenge.image),$(h,"minlength",a(Z).challenge.codeChallenge.length||1),$(h,"maxlength",a(Z).challenge.codeChallenge.length),$(h,"placeholder",a(U).enterCode),$(h,"aria-label",a(Q)===te.LOADING?a(U).loading:a(Q)===te.PLAYING?"":a(U).enterCodeAria),$(h,"aria-live",a(Q)?"assertive":"polite"),$(h,"aria-busy",a(Q)===te.LOADING),h.disabled=a(ct),$(ie,"aria-label",a(U).reload),$(ie,"title",a(U).reload),ie.disabled=a(ct),de.disabled=a(ct),$(de,"aria-label",a(U).verify),oa(gt,` ${a(U).verify??""}`)}),Ye("submit",g,cl,!0),G(n,u)};X(Cl,n=>{var u;(u=a(Z))!=null&&u.challenge.codeChallenge&&n(xl)})}z(Qr);var Xi=K(Qr,2);{var kl=n=>{var u=Wa(),g=K(J(u),2);{var p=E=>{var k=Ha(),W=J(k);ot(W,()=>a(U).expired),z(k),Re(()=>$(k,"title",a(ft))),G(E,k)},h=E=>{var k=Ga(),W=J(k);ot(W,()=>a(U).error),z(k),Re(()=>$(k,"title",a(ft))),G(E,k)};X(g,E=>{a(A)===w.EXPIRED?E(p):E(h,!1)})}z(u),G(n,u)};X(Xi,n=>{(a(ft)||a(A)===w.EXPIRED)&&n(kl)})}var Qi=K(Xi,2);{var Al=n=>{var u=Ya(),g=J(u),p=J(g);ot(p,()=>a(U).footer),z(g),z(u),G(n,u)};X(Qi,n=>{a(U).footer&&(Ve()!==!0||a(zr))&&n(Al)})}var Il=K(Qi,2);{var Rl=n=>{var u=Za();pr(u,g=>_(Wt,g),()=>a(Wt)),G(n,u)};X(Il,n=>{R()&&n(Rl)})}z(At),pr(At,n=>_(j,n),()=>a(j)),Re(n=>{$(At,"data-state",a(A)),$(At,"data-floating",R()),$(At,"data-overlay",xe()),Zi=fa(xr,1,"altcha-checkbox",null,Zi,n),$(ht,"id",a(_i)),ht.required=o()!=="onsubmit"&&(!R()||o()!=="off"),$(kr,"for",a(_i))},[()=>({"altcha-checkbox-verifying":a(A)===w.VERIFYING})]),Ye("invalid",ht,$i),ga(ht,()=>a(Gt),n=>_(Gt,n)),G(e,Wi);var Sl=Yn({clarify:Zt,configure:ji,getConfiguration:qi,getFloatingAnchor:Bi,getPlugin:pl,getState:Hi,hide:zt,repositionFloating:Jt,reset:dt,setFloatingAnchor:Gi,setState:Oe,show:Cr,verify:Ue,get auto(){return o()},set auto(n=void 0){o(n),C()},get blockspam(){return f()},set blockspam(n=void 0){f(n),C()},get challengeurl(){return s()},set challengeurl(n=void 0){s(n),C()},get challengejson(){return c()},set challengejson(n=void 0){c(n),C()},get credentials(){return d()},set credentials(n=void 0){d(n),C()},get customfetch(){return b()},set customfetch(n=void 0){b(n),C()},get debug(){return v()},set debug(n=!1){v(n),C()},get delay(){return m()},set delay(n=0){m(n),C()},get disableautofocus(){return y()},set disableautofocus(n=!1){y(n),C()},get refetchonexpire(){return L()},set refetchonexpire(n=!0){L(n),C()},get disablerefetchonexpire(){return O()},set disablerefetchonexpire(n=!L){O(n),C()},get expire(){return B()},set expire(n=void 0){B(n),C()},get floating(){return R()},set floating(n=void 0){R(n),C()},get floatinganchor(){return re()},set floatinganchor(n=void 0){re(n),C()},get floatingoffset(){return ce()},set floatingoffset(n=void 0){ce(n),C()},get floatingpersist(){return ne()},set floatingpersist(n=!1){ne(n),C()},get hidefooter(){return Ve()},set hidefooter(n=!1){Ve(n),C()},get hidelogo(){return H()},set hidelogo(n=!1){H(n),C()},get id(){return De()},set id(n=void 0){De(n),C()},get language(){return Ze()},set language(n=void 0){Ze(n),C()},get name(){return at()},set name(n="altcha"){at(n),C()},get maxnumber(){return lt()},set maxnumber(n=1e6){lt(n),C()},get mockerror(){return qt()},set mockerror(n=!1){qt(n),C()},get obfuscated(){return ze()},set obfuscated(n=void 0){ze(n),C()},get overlay(){return xe()},set overlay(n=void 0){xe(n),C()},get overlaycontent(){return Bt()},set overlaycontent(n=void 0){Bt(n),C()},get plugins(){return yr()},set plugins(n=void 0){yr(n),C()},get sentinel(){return st()},set sentinel(n=void 0){st(n),C()},get spamfilter(){return Ne()},set spamfilter(n=!1){Ne(n),C()},get strings(){return Ct()},set strings(n=void 0){Ct(n),C()},get test(){return ye()},set test(n=!1){ye(n),C()},get verifyurl(){return se()},set verifyurl(n=void 0){se(n),C()},get workers(){return xt()},set workers(n=Math.min(16,navigator.hardwareConcurrency||8)){xt(n),C()},get workerurl(){return Ht()},set workerurl(n=void 0){Ht(n),C()}});return i(),Sl}ia(["change","keydown","click"]),customElements.define("altcha-widget",xa(hi,{blockspam:{type:"Boolean"},debug:{type:"Boolean"},delay:{type:"Number"},disableautofocus:{type:"Boolean"},disablerefetchonexpire:{type:"Boolean"},expire:{type:"Number"},floatingoffset:{type:"Number"},hidefooter:{type:"Boolean"},hidelogo:{type:"Boolean"},maxnumber:{type:"Number"},mockerror:{type:"Boolean"},refetchonexpire:{type:"Boolean"},test:{type:"Boolean"},workers:{type:"Number"},auto:{},challengeurl:{},challengejson:{},credentials:{},customfetch:{},floating:{},floatinganchor:{},floatingpersist:{},id:{},language:{},name:{},obfuscated:{},overlay:{},overlaycontent:{},plugins:{},sentinel:{},spamfilter:{},strings:{},verifyurl:{},workerurl:{}},["default"],["clarify","configure","getConfiguration","getFloatingAnchor","getPlugin","getState","hide","repositionFloating","reset","setFloatingAnchor","setState","show","verify"],!1));const vi='@keyframes overlay-slidein{to{opacity:1;top:50%}}@keyframes altcha-spinner{to{transform:rotate(360deg)}}.altcha{background:var(--altcha-color-base, transparent);border:var(--altcha-border-width, 1px) solid var(--altcha-color-border, #a0a0a0);border-radius:var(--altcha-border-radius, 3px);color:var(--altcha-color-text, currentColor);display:flex;flex-direction:column;max-width:var(--altcha-max-width, 260px);position:relative}.altcha:focus-within{border-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating]{background:var(--altcha-color-base, white);display:none;filter:drop-shadow(3px 3px 6px rgba(0,0,0,.2));left:-100%;position:fixed;top:-100%;width:var(--altcha-max-width, 260px);z-index:999999}.altcha[data-floating=top] .altcha-anchor-arrow{border-bottom-color:transparent;border-top-color:var(--altcha-color-border, #a0a0a0);bottom:-12px;top:auto}.altcha[data-floating=bottom]:focus-within::after{border-bottom-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating=top]:focus-within::after{border-top-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating]:not([data-state=unverified]){display:block}.altcha-anchor-arrow{border:6px solid transparent;border-bottom-color:var(--altcha-color-border, #a0a0a0);content:"";height:0;left:12px;position:absolute;top:-12px;width:0}.altcha-main{align-items:center;display:flex;gap:.4rem;padding:.7rem;position:relative}.altcha-code-challenge{background:var(--altcha-color-base, white);border:1px solid var(--altcha-color-border-focus, currentColor);border-radius:var(--altcha-border-radius, 3px);filter:drop-shadow(3px 3px 6px rgba(0,0,0,.2));padding:.5rem;position:absolute;top:2.5rem;z-index:9999999}.altcha-code-challenge>form{display:flex;flex-direction:column;gap:.5rem}.altcha-code-challenge-input{border:1px solid currentColor;border-radius:3px;box-sizing:border-box;outline:0;font-size:16px;padding:.35rem;width:220px}.altcha-code-challenge-input:focus{outline:2px solid color-mix(in srgb,var(--altcha-color-active, #1D1DC9) 20%,transparent)}.altcha-code-challenge-input:disabled{opacity:.7}.altcha-code-challenge-image{background-color:#fff;border:1px solid currentColor;border-radius:3px;box-sizing:border-box;object-fit:contain;height:50px;width:220px}.altcha-code-challenge-audio,.altcha-code-challenge-reload{background:color-mix(in srgb,var(--altcha-color-text, currentColor) 10%,transparent);border:0;border-radius:3px;color:var(--altcha-color-text, currentColor);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:.35rem}.altcha-code-challenge-audio:disabled,.altcha-code-challenge-reload:disabled,.altcha-code-challenge-verify:disabled{opacity:.7;pointer-events:none}.altcha-code-challenge-audio>*,.altcha-code-challenge-reload>*{height:20px;width:20px}.altcha-code-challenge-buttons{display:flex;justify-content:space-between}.altcha-code-challenge-buttons-left{display:flex;gap:.25rem}.altcha-code-challenge-verify{align-items:center;background:var(--altcha-color-active, #1D1DC9);border:0;border-radius:3px;color:#fff;cursor:pointer;display:flex;gap:.5rem;font-size:100%;padding:.35rem 1rem}.altcha-code-challenge-arrow{border:6px solid transparent;border-bottom-color:var(--altcha-color-border, currentColor);content:"";height:0;left:.15rem;position:absolute;top:-12px;width:0}.altcha[data-floating=top] .altcha-code-challenge{top:-150px}.altcha[data-floating=top] .altcha-code-challenge-arrow{border-bottom-color:transparent;border-top-color:var(--altcha-color-border, currentColor);bottom:-12px;top:auto}.altcha-label{cursor:pointer;flex-grow:1}.altcha-logo{color:currentColor!important;opacity:.7}.altcha-footer:hover,.altcha-logo:hover{opacity:1}.altcha-error{color:var(--altcha-color-error-text, #f23939);display:flex;font-size:.85rem;gap:.3rem;padding:0 .7rem .7rem}.altcha-footer{align-items:center;background-color:var(--altcha-color-footer-bg, transparent);display:flex;font-size:.75rem;opacity:.7;justify-content:end;padding:.2rem .7rem}.altcha-footer a{color:currentColor}.altcha-checkbox{display:flex;align-items:center;justify-content:center;height:24px;position:relative;width:24px}.altcha-checkbox .altcha-spinner{bottom:0;left:0;position:absolute;right:0;top:0}.altcha-checkbox input{width:18px;height:18px;margin:0}.altcha-checkbox-verifying input{appearance:none;opacity:0;pointer-events:none}.altcha-spinner{animation:altcha-spinner .75s infinite linear;transform-origin:center}.altcha-overlay{--altcha-color-base:#fff;--altcha-color-text:#000;animation:overlay-slidein .5s forwards;display:flex;flex-direction:column;gap:.5rem;left:50%;width:260px;opacity:0;position:fixed;top:45%;transform:translate(-50%,-50%)}.altcha-overlay-backdrop{background:rgba(0,0,0,.5);bottom:0;display:none;left:0;position:fixed;right:0;top:0;z-index:99999999}.altcha-overlay-close-button{align-self:flex-end;background:0 0;border:0;padding:.25rem;cursor:pointer;color:currentColor;font-size:130%;line-height:1;opacity:.7}@media (max-height:450px){.altcha-overlay{top:10%!important;transform:translate(-50%,0)}}';function gi(e,t="__altcha-css"){if(!document.getElementById(t)){const r=document.createElement("style");r.id=t,r.textContent=e,document.head.appendChild(r)}}globalThis.altchaCreateWorker=e=>e?new Worker(new URL(e)):new Xt,gi(vi),gi(vi),S.Altcha=hi,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -10,23 +10,40 @@ declare global {
|
|
|
10
10
|
set: (language: string, translation: Record<string, string>) => void;
|
|
11
11
|
store: {
|
|
12
12
|
set(this: void, value: Record<string, Record<string, string>>): void;
|
|
13
|
-
update(
|
|
14
|
-
|
|
13
|
+
update(
|
|
14
|
+
this: void,
|
|
15
|
+
updater: (
|
|
16
|
+
value: Record<string, Record<string, string>>
|
|
17
|
+
) => Record<string, Record<string, string>>
|
|
18
|
+
): void;
|
|
19
|
+
subscribe(
|
|
20
|
+
this: void,
|
|
21
|
+
run: (value: Record<string, Record<string, string>>) => void,
|
|
22
|
+
invalidate?: () => void
|
|
23
|
+
): () => void;
|
|
15
24
|
};
|
|
16
25
|
};
|
|
17
26
|
|
|
18
|
-
type AltchaState =
|
|
27
|
+
type AltchaState =
|
|
28
|
+
| 'error'
|
|
29
|
+
| 'expired'
|
|
30
|
+
| 'verified'
|
|
31
|
+
| 'verifying'
|
|
32
|
+
| 'unverified';
|
|
19
33
|
|
|
20
|
-
interface AltchaStateChangeEvent
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
34
|
+
interface AltchaStateChangeEvent
|
|
35
|
+
extends CustomEvent<{
|
|
36
|
+
payload?: string;
|
|
37
|
+
state: AltchaState;
|
|
38
|
+
}> {}
|
|
24
39
|
|
|
25
|
-
interface AltchaVerifiedEvent
|
|
26
|
-
|
|
27
|
-
|
|
40
|
+
interface AltchaVerifiedEvent
|
|
41
|
+
extends CustomEvent<{
|
|
42
|
+
payload: string;
|
|
43
|
+
}> {}
|
|
28
44
|
|
|
29
|
-
interface AltchaServerVerificationEvent
|
|
45
|
+
interface AltchaServerVerificationEvent
|
|
46
|
+
extends CustomEvent<Record<string, unknown>> {}
|
|
30
47
|
|
|
31
48
|
interface AltchaWidgetOptions {
|
|
32
49
|
auto?: 'off' | 'onfocus' | 'onload' | 'onsubmit';
|
|
@@ -35,10 +52,13 @@ declare global {
|
|
|
35
52
|
challengeurl?: string;
|
|
36
53
|
challengejson?: string;
|
|
37
54
|
credentials?: 'omit' | 'same-origin' | 'include' | boolean | undefined;
|
|
38
|
-
customfetch?:
|
|
55
|
+
customfetch?:
|
|
56
|
+
| string
|
|
57
|
+
| ((url: string, init?: RequestInit) => Promise<Response>);
|
|
39
58
|
debug?: boolean;
|
|
40
59
|
delay?: number;
|
|
41
60
|
disableautofocus?: boolean;
|
|
61
|
+
disablerefetchonexpire?: boolean;
|
|
42
62
|
expire?: number;
|
|
43
63
|
floating?: 'auto' | 'top' | 'bottom' | 'false' | '' | boolean;
|
|
44
64
|
floatinganchor?: string;
|
|
@@ -62,6 +82,7 @@ declare global {
|
|
|
62
82
|
overlay?: boolean;
|
|
63
83
|
overlaycontent?: string;
|
|
64
84
|
plugins?: string;
|
|
85
|
+
/** @deprecated Use `disablerefetchonexpire` instead. */
|
|
65
86
|
refetchonexpire?: boolean;
|
|
66
87
|
/** @deprecated */
|
|
67
88
|
spamfilter?: boolean | 'ipAddress';
|
|
@@ -82,14 +103,13 @@ declare global {
|
|
|
82
103
|
hide: () => void;
|
|
83
104
|
repositionFloating: (viewportOffset?: number) => void;
|
|
84
105
|
reset: (newState?: AltchaState, err?: string | null) => void;
|
|
85
|
-
setFloatingAnchor: (el: HTMLElement) => void;
|
|
86
|
-
setState: (newState: AltchaState, err?: string | null) => void;
|
|
106
|
+
setFloatingAnchor: (el: HTMLElement) => void;
|
|
107
|
+
setState: (newState: AltchaState, err?: string | null) => void;
|
|
87
108
|
show: () => void;
|
|
88
109
|
verify: () => Promise<void>;
|
|
89
110
|
}
|
|
90
111
|
|
|
91
|
-
interface AltchaWidget extends AltchaWidgetOptions {
|
|
92
|
-
}
|
|
112
|
+
interface AltchaWidget extends AltchaWidgetOptions {}
|
|
93
113
|
|
|
94
114
|
interface AltchaWidgetCSSProperties extends Partial<CSSStyleDeclaration> {
|
|
95
115
|
'--altcha-border-width'?: string;
|
|
@@ -138,7 +158,7 @@ declare global {
|
|
|
138
158
|
}
|
|
139
159
|
}
|
|
140
160
|
|
|
141
|
-
declare module
|
|
161
|
+
declare module 'react' {
|
|
142
162
|
namespace JSX {
|
|
143
163
|
interface IntrinsicElements {
|
|
144
164
|
'altcha-widget': AltchaWidgetReact;
|
|
@@ -146,7 +166,7 @@ declare module "react" {
|
|
|
146
166
|
}
|
|
147
167
|
}
|
|
148
168
|
|
|
149
|
-
declare module
|
|
169
|
+
declare module 'react/jsx-runtime' {
|
|
150
170
|
namespace JSX {
|
|
151
171
|
interface IntrinsicElements {
|
|
152
172
|
'altcha-widget': AltchaWidgetReact;
|
|
@@ -154,7 +174,7 @@ declare module "react/jsx-runtime" {
|
|
|
154
174
|
}
|
|
155
175
|
}
|
|
156
176
|
|
|
157
|
-
declare module
|
|
177
|
+
declare module 'react/jsx-dev-runtime' {
|
|
158
178
|
namespace JSX {
|
|
159
179
|
interface IntrinsicElements {
|
|
160
180
|
'altcha-widget': AltchaWidgetReact;
|