altcha 0.6.6 → 0.6.7

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.
@@ -1,2 +1,2 @@
1
- (function(U,Z){typeof exports=="object"&&typeof module<"u"?Z(exports):typeof define=="function"&&define.amd?define(["exports"],Z):(U=typeof globalThis<"u"?globalThis:U||self,Z(U.altcha={}))})(this,function(U){"use strict";var cr=Object.defineProperty;var ar=(U,Z,ne)=>Z in U?cr(U,Z,{enumerable:!0,configurable:!0,writable:!0,value:ne}):U[Z]=ne;var O=(U,Z,ne)=>ar(U,typeof Z!="symbol"?Z+"":Z,ne);const Z="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2NvbnN0IGY9bmV3IFRleHRFbmNvZGVyO2Z1bmN0aW9uIGQoZSl7cmV0dXJuWy4uLm5ldyBVaW50OEFycmF5KGUpXS5tYXAodD0+dC50b1N0cmluZygxNikucGFkU3RhcnQoMiwiMCIpKS5qb2luKCIiKX1hc3luYyBmdW5jdGlvbiBwKGUsdCxvKXtyZXR1cm4gZChhd2FpdCBjcnlwdG8uc3VidGxlLmRpZ2VzdChvLnRvVXBwZXJDYXNlKCksZi5lbmNvZGUoZSt0KSkpfWZ1bmN0aW9uIGcoZSx0LG89IlNIQS0yNTYiLGw9MWU2LGM9MCl7Y29uc3QgYT1uZXcgQWJvcnRDb250cm9sbGVyLGk9RGF0ZS5ub3coKTtyZXR1cm57cHJvbWlzZTooYXN5bmMoKT0+e2ZvcihsZXQgbj1jO248PWw7bis9MSl7aWYoYS5zaWduYWwuYWJvcnRlZClyZXR1cm4gbnVsbDtpZihhd2FpdCBwKHQsbixvKT09PWUpcmV0dXJue251bWJlcjpuLHRvb2s6RGF0ZS5ub3coKS1pfX1yZXR1cm4gbnVsbH0pKCksY29udHJvbGxlcjphfX1sZXQgcjtvbm1lc3NhZ2U9YXN5bmMgZT0+e2NvbnN0e3R5cGU6dCxwYXlsb2FkOm99PWUuZGF0YTtpZih0PT09ImFib3J0IilyPT1udWxsfHxyLmFib3J0KCkscj12b2lkIDA7ZWxzZSBpZih0PT09IndvcmsiKXtjb25zdHthbGc6bCxjaGFsbGVuZ2U6YyxtYXg6YSxzYWx0Omksc3RhcnQ6dX09b3x8e30sbj1nKGMsaSxsLGEsdSk7cj1uLmNvbnRyb2xsZXIsbi5wcm9taXNlLnRoZW4ocz0+e3NlbGYucG9zdE1lc3NhZ2UocyYmey4uLnMsd29ya2VyOiEwfSl9KX19fSkoKTsK",ne=r=>Uint8Array.from(atob(r),e=>e.charCodeAt(0)),Se=typeof window<"u"&&window.Blob&&new Blob([ne(Z)],{type:"text/javascript;charset=utf-8"});function dt(r){let e;try{if(e=Se&&(window.URL||window.webkitURL).createObjectURL(Se),!e)throw"";const t=new Worker(e,{name:r==null?void 0:r.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),t}catch{return new Worker("data:text/javascript;base64,"+Z,{name:r==null?void 0:r.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}function ie(){}function Ne(r){return r()}function je(){return Object.create(null)}function ce(r){r.forEach(Ne)}function Te(r){return typeof r=="function"}function ht(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function gt(r){return Object.keys(r).length===0}function p(r,e){r.appendChild(e)}function mt(r,e,t){const i=bt(r);if(!i.getElementById(e)){const o=R("style");o.id=e,o.textContent=t,vt(i,o)}}function bt(r){if(!r)return document;const e=r.getRootNode?r.getRootNode():r.ownerDocument;return e&&e.host?e:r.ownerDocument}function vt(r,e){return p(r.head||r,e),e.sheet}function M(r,e,t){r.insertBefore(e,t||null)}function T(r){r.parentNode&&r.parentNode.removeChild(r)}function R(r){return document.createElement(r)}function P(r){return document.createElementNS("http://www.w3.org/2000/svg",r)}function wt(r){return document.createTextNode(r)}function Y(){return wt(" ")}function ke(r,e,t,i){return r.addEventListener(e,t,i),()=>r.removeEventListener(e,t,i)}function s(r,e,t){t==null?r.removeAttribute(e):r.getAttribute(e)!==t&&r.setAttribute(e,t)}function yt(r){return Array.from(r.childNodes)}function Ze(r,e,t){r.classList.toggle(e,!!t)}function pt(r,e,{bubbles:t=!1,cancelable:i=!1}={}){return new CustomEvent(r,{detail:e,bubbles:t,cancelable:i})}function _t(r){const e={};return r.childNodes.forEach(t=>{e[t.slot||"default"]=!0}),e}let ae;function fe(r){ae=r}function xe(){if(!ae)throw new Error("Function called outside component initialization");return ae}function kt(r){xe().$$.on_mount.push(r)}function xt(r){xe().$$.on_destroy.push(r)}function Et(){const r=xe();return(e,t,{cancelable:i=!1}={})=>{const o=r.$$.callbacks[e];if(o){const l=pt(e,t,{cancelable:i});return o.slice().forEach(c=>{c.call(r,l)}),!l.defaultPrevented}return!0}}const oe=[],ge=[];let le=[];const Me=[],Ve=Promise.resolve();let Ee=!1;function De(){Ee||(Ee=!0,Ve.then(w))}function Ct(){return De(),Ve}function Ce(r){le.push(r)}const Le=new Set;let se=0;function w(){if(se!==0)return;const r=ae;do{try{for(;se<oe.length;){const e=oe[se];se++,fe(e),Lt(e.$$)}}catch(e){throw oe.length=0,se=0,e}for(fe(null),oe.length=0,se=0;ge.length;)ge.pop()();for(let e=0;e<le.length;e+=1){const t=le[e];Le.has(t)||(Le.add(t),t())}le.length=0}while(oe.length);for(;Me.length;)Me.pop()();Ee=!1,Le.clear(),fe(r)}function Lt(r){if(r.fragment!==null){r.update(),ce(r.before_update);const e=r.dirty;r.dirty=[-1],r.fragment&&r.fragment.p(r.ctx,e),r.after_update.forEach(Ce)}}function Rt(r){const e=[],t=[];le.forEach(i=>r.indexOf(i)===-1?e.push(i):t.push(i)),t.forEach(i=>i()),le=e}const It=new Set;function zt(r,e){r&&r.i&&(It.delete(r),r.i(e))}function At(r,e,t){const{fragment:i,after_update:o}=r.$$;i&&i.m(e,t),Ce(()=>{const l=r.$$.on_mount.map(Ne).filter(Te);r.$$.on_destroy?r.$$.on_destroy.push(...l):ce(l),r.$$.on_mount=[]}),o.forEach(Ce)}function St(r,e){const t=r.$$;t.fragment!==null&&(Rt(t.after_update),ce(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function Nt(r,e){r.$$.dirty[0]===-1&&(oe.push(r),De(),r.$$.dirty.fill(0)),r.$$.dirty[e/31|0]|=1<<e%31}function jt(r,e,t,i,o,l,c=null,a=[-1]){const d=ae;fe(r);const f=r.$$={fragment:null,ctx:[],props:l,update:ie,not_equal:o,bound:je(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(d?d.$$.context:[])),callbacks:je(),dirty:a,skip_bound:!1,root:e.target||d.$$.root};c&&c(f.root);let G=!1;if(f.ctx=t?t(r,e.props||{},(N,X,...$)=>{const k=$.length?$[0]:X;return f.ctx&&o(f.ctx[N],f.ctx[N]=k)&&(!f.skip_bound&&f.bound[N]&&f.bound[N](k),G&&Nt(r,N)),X}):[],f.update(),G=!0,ce(f.before_update),f.fragment=i?i(f.ctx):!1,e.target){if(e.hydrate){const N=yt(e.target);f.fragment&&f.fragment.l(N),N.forEach(T)}else f.fragment&&f.fragment.c();e.intro&&zt(r.$$.fragment),At(r,e.target,e.anchor),w()}fe(d)}let Fe;typeof HTMLElement=="function"&&(Fe=class extends HTMLElement{constructor(e,t,i){super();O(this,"$$ctor");O(this,"$$s");O(this,"$$c");O(this,"$$cn",!1);O(this,"$$d",{});O(this,"$$r",!1);O(this,"$$p_d",{});O(this,"$$l",{});O(this,"$$l_u",new Map);this.$$ctor=e,this.$$s=t,i&&this.attachShadow({mode:"open"})}addEventListener(e,t,i){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const o=this.$$c.$on(e,t);this.$$l_u.set(t,o)}super.addEventListener(e,t,i)}removeEventListener(e,t,i){if(super.removeEventListener(e,t,i),this.$$c){const o=this.$$l_u.get(t);o&&(o(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(l){return()=>{let c;return{c:function(){c=R("slot"),l!=="default"&&s(c,"name",l)},m:function(f,G){M(f,c,G)},d:function(f){f&&T(c)}}}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},i=_t(this);for(const l of this.$$s)l in i&&(t[l]=[e(l)]);for(const l of this.attributes){const c=this.$$g_p(l.name);c in this.$$d||(this.$$d[c]=me(c,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=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:t,$$scope:{ctx:[]}}});const o=()=>{this.$$r=!0;for(const l in this.$$p_d)if(this.$$d[l]=this.$$c.$$.ctx[this.$$c.$$.props[l]],this.$$p_d[l].reflect){const c=me(l,this.$$d[l],this.$$p_d,"toAttribute");c==null?this.removeAttribute(this.$$p_d[l].attribute||l):this.setAttribute(this.$$p_d[l].attribute||l,c)}this.$$r=!1};this.$$c.$$.after_update.push(o),o();for(const l in this.$$l)for(const c of this.$$l[l]){const a=this.$$c.$on(l,c);this.$$l_u.set(c,a)}this.$$l={}}}attributeChangedCallback(e,t,i){var o;this.$$r||(e=this.$$g_p(e),this.$$d[e]=me(e,i,this.$$p_d,"toProp"),(o=this.$$c)==null||o.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{this.$$cn||(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(e){return Object.keys(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function me(r,e,t,i){var l;const o=(l=t[r])==null?void 0:l.type;if(e=o==="Boolean"&&typeof e!="boolean"?e!=null:e,!i||!t[r])return e;if(i==="toAttribute")switch(o){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(o){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function Tt(r,e,t,i,o,l){let c=class extends Fe{constructor(){super(r,t,o),this.$$p_d=e}static get observedAttributes(){return Object.keys(e).map(a=>(e[a].attribute||a).toLowerCase())}};return Object.keys(e).forEach(a=>{Object.defineProperty(c.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(d){var f;d=me(a,d,e),this.$$d[a]=d,(f=this.$$c)==null||f.$set({[a]:d})}})}),i.forEach(a=>{Object.defineProperty(c.prototype,a,{get(){var d;return(d=this.$$c)==null?void 0:d[a]}})}),l&&(c=l(c)),r.element=c,c}class Zt{constructor(){O(this,"$$");O(this,"$$set")}$destroy(){St(this,1),this.$destroy=ie}$on(e,t){if(!Te(t))return ie;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(t),()=>{const o=i.indexOf(t);o!==-1&&i.splice(o,1)}}$set(e){this.$$set&&!gt(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Mt="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Mt);const Vt=new TextEncoder;function Dt(r){return[...new Uint8Array(r)].map(e=>e.toString(16).padStart(2,"0")).join("")}async function Ft(r,e="SHA-256",t=1e5){const i=Date.now().toString(16);r||(r=Math.round(Math.random()*t));const o=await $e(i,r,e);return{algorithm:e,challenge:o,salt:i,signature:""}}async function $e(r,e,t){return Dt(await crypto.subtle.digest(t.toUpperCase(),Vt.encode(r+e)))}function $t(r,e,t="SHA-256",i=1e6,o=0){const l=new AbortController,c=Date.now();return{promise:(async()=>{for(let d=o;d<=i;d+=1){if(l.signal.aborted)return null;if(await $e(e,d,t)===r)return{number:d,took:Date.now()-c}}return null})(),controller:l}}var m=(r=>(r.ERROR="error",r.VERIFIED="verified",r.VERIFYING="verifying",r.UNVERIFIED="unverified",r.EXPIRED="expired",r))(m||{});function Ut(r){mt(r,"svelte-ddsc3z",'.altcha.svelte-ddsc3z.svelte-ddsc3z{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;text-align:left}.altcha.svelte-ddsc3z.svelte-ddsc3z:focus-within{border-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating].svelte-ddsc3z.svelte-ddsc3z{background:var(--altcha-color-base, white);display:none;filter:drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.2));left:-100%;position:fixed;top:-100%;width:var(--altcha-max-width, 260px);z-index:999999}.altcha[data-floating=top].svelte-ddsc3z .altcha-anchor-arrow.svelte-ddsc3z{border-bottom-color:transparent;border-top-color:var(--altcha-color-border, #a0a0a0);bottom:-12px;top:auto}.altcha[data-floating=bottom].svelte-ddsc3z.svelte-ddsc3z:focus-within::after{border-bottom-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating=top].svelte-ddsc3z.svelte-ddsc3z:focus-within::after{border-top-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating].svelte-ddsc3z.svelte-ddsc3z:not([data-state=unverified]){display:block}.altcha-anchor-arrow.svelte-ddsc3z.svelte-ddsc3z{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.svelte-ddsc3z.svelte-ddsc3z{align-items:center;display:flex;gap:0.4rem;padding:0.7rem}.altcha-label.svelte-ddsc3z.svelte-ddsc3z{flex-grow:1}.altcha-label.svelte-ddsc3z label.svelte-ddsc3z{cursor:pointer}.altcha-logo.svelte-ddsc3z.svelte-ddsc3z{color:currentColor;opacity:0.3}.altcha-logo.svelte-ddsc3z.svelte-ddsc3z:hover{opacity:1}.altcha-error.svelte-ddsc3z.svelte-ddsc3z{color:var(--altcha-color-error-text, #f23939);display:flex;font-size:0.85rem;gap:0.3rem;padding:0 0.7rem 0.7rem}.altcha-footer.svelte-ddsc3z.svelte-ddsc3z{align-items:center;background-color:var(--altcha-color-footer-bg, transparent);display:flex;font-size:0.75rem;opacity:0.4;padding:0.2rem 0.7rem;text-align:right}.altcha-footer.svelte-ddsc3z.svelte-ddsc3z:hover{opacity:1}.altcha-footer.svelte-ddsc3z>.svelte-ddsc3z:first-child{flex-grow:1}.altcha-footer.svelte-ddsc3z a{color:currentColor}.altcha-checkbox.svelte-ddsc3z.svelte-ddsc3z{display:flex;align-items:center;height:24px;width:24px}.altcha-checkbox.svelte-ddsc3z input.svelte-ddsc3z{width:18px;height:18px;margin:0}.altcha-hidden.svelte-ddsc3z.svelte-ddsc3z{display:none}.altcha-spinner.svelte-ddsc3z.svelte-ddsc3z{animation:svelte-ddsc3z-altcha-spinner 0.75s infinite linear;transform-origin:center}@keyframes svelte-ddsc3z-altcha-spinner{100%{transform:rotate(360deg)}}')}function Ue(r){let e,t,i;return{c(){e=P("svg"),t=P("path"),i=P("path"),s(t,"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"),s(t,"fill","currentColor"),s(t,"opacity",".25"),s(i,"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"),s(i,"fill","currentColor"),s(i,"class","altcha-spinner svelte-ddsc3z"),s(e,"width","24"),s(e,"height","24"),s(e,"viewBox","0 0 24 24"),s(e,"xmlns","http://www.w3.org/2000/svg")},m(o,l){M(o,e,l),p(e,t),p(e,i)},d(o){o&&T(e)}}}function Gt(r){let e,t=r[11].label+"",i;return{c(){e=R("label"),s(e,"for",i=r[4]+"_checkbox"),s(e,"class","svelte-ddsc3z")},m(o,l){M(o,e,l),e.innerHTML=t},p(o,l){l[0]&2048&&t!==(t=o[11].label+"")&&(e.innerHTML=t),l[0]&16&&i!==(i=o[4]+"_checkbox")&&s(e,"for",i)},d(o){o&&T(e)}}}function Ot(r){let e,t=r[11].verifying+"";return{c(){e=R("span")},m(i,o){M(i,e,o),e.innerHTML=t},p(i,o){o[0]&2048&&t!==(t=i[11].verifying+"")&&(e.innerHTML=t)},d(i){i&&T(e)}}}function Xt(r){let e,t=r[11].verified+"",i,o;return{c(){e=R("span"),i=Y(),o=R("input"),s(o,"type","hidden"),s(o,"name",r[4]),o.value=r[5]},m(l,c){M(l,e,c),e.innerHTML=t,M(l,i,c),M(l,o,c)},p(l,c){c[0]&2048&&t!==(t=l[11].verified+"")&&(e.innerHTML=t),c[0]&16&&s(o,"name",l[4]),c[0]&32&&(o.value=l[5])},d(l){l&&(T(e),T(i),T(o))}}}function Ge(r){let e,t,i,o,l,c,a;return{c(){e=R("div"),t=R("a"),i=P("svg"),o=P("path"),l=P("path"),c=P("path"),s(o,"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"),s(o,"fill","currentColor"),s(l,"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"),s(l,"fill","currentColor"),s(c,"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"),s(c,"fill","currentColor"),s(i,"width","22"),s(i,"height","22"),s(i,"viewBox","0 0 20 20"),s(i,"fill","none"),s(i,"xmlns","http://www.w3.org/2000/svg"),s(t,"href",Pe),s(t,"target","_blank"),s(t,"class","altcha-logo svelte-ddsc3z"),s(t,"aria-label",a=r[11].ariaLinkLabel)},m(d,f){M(d,e,f),p(e,t),p(t,i),p(i,o),p(i,l),p(i,c)},p(d,f){f[0]&2048&&a!==(a=d[11].ariaLinkLabel)&&s(t,"aria-label",a)},d(d){d&&T(e)}}}function Oe(r){let e,t,i,o;function l(d,f){return d[6]===m.EXPIRED?Ht:Bt}let c=l(r),a=c(r);return{c(){e=R("div"),t=P("svg"),i=P("path"),o=Y(),a.c(),s(i,"stroke-linecap","round"),s(i,"stroke-linejoin","round"),s(i,"d","M6 18L18 6M6 6l12 12"),s(t,"width","14"),s(t,"height","14"),s(t,"xmlns","http://www.w3.org/2000/svg"),s(t,"fill","none"),s(t,"viewBox","0 0 24 24"),s(t,"stroke-width","1.5"),s(t,"stroke","currentColor"),s(e,"class","altcha-error svelte-ddsc3z")},m(d,f){M(d,e,f),p(e,t),p(t,i),p(e,o),a.m(e,null)},p(d,f){c===(c=l(d))&&a?a.p(d,f):(a.d(1),a=c(d),a&&(a.c(),a.m(e,null)))},d(d){d&&T(e),a.d()}}}function Bt(r){let e,t=r[11].error+"";return{c(){e=R("div"),s(e,"title",r[10])},m(i,o){M(i,e,o),e.innerHTML=t},p(i,o){o[0]&2048&&t!==(t=i[11].error+"")&&(e.innerHTML=t),o[0]&1024&&s(e,"title",i[10])},d(i){i&&T(e)}}}function Ht(r){let e,t=r[11].expired+"";return{c(){e=R("div"),s(e,"title",r[10])},m(i,o){M(i,e,o),e.innerHTML=t},p(i,o){o[0]&2048&&t!==(t=i[11].expired+"")&&(e.innerHTML=t),o[0]&1024&&s(e,"title",i[10])},d(i){i&&T(e)}}}function Xe(r){let e,t,i=r[11].footer+"";return{c(){e=R("div"),t=R("div"),s(t,"class","svelte-ddsc3z"),s(e,"class","altcha-footer svelte-ddsc3z")},m(o,l){M(o,e,l),p(e,t),t.innerHTML=i},p(o,l){l[0]&2048&&i!==(i=o[11].footer+"")&&(t.innerHTML=i)},d(o){o&&T(e)}}}function Be(r){let e;return{c(){e=R("div"),s(e,"class","altcha-anchor-arrow svelte-ddsc3z")},m(t,i){M(t,e,i),r[37](e)},p:ie,d(t){t&&T(e),r[37](null)}}}function Pt(r){let e,t,i,o,l,c,a,d,f,G,N,X,$,k,K,S=r[6]===m.VERIFYING&&Ue();function q(h,v){return h[6]===m.VERIFIED?Xt:h[6]===m.VERIFYING?Ot:Gt}let W=q(r),V=W(r),E=(r[3]!==!0||r[12])&&Ge(r),I=(r[10]||r[6]===m.EXPIRED)&&Oe(r),z=r[11].footer&&(r[2]!==!0||r[12])&&Xe(r),y=r[1]&&Be(r);return{c(){e=R("div"),t=R("div"),S&&S.c(),i=Y(),o=R("div"),l=R("input"),d=Y(),f=R("div"),V.c(),G=Y(),E&&E.c(),N=Y(),I&&I.c(),X=Y(),z&&z.c(),$=Y(),y&&y.c(),s(l,"type","checkbox"),s(l,"id",c=r[4]+"_checkbox"),l.required=a=r[0]!=="onsubmit",s(l,"class","svelte-ddsc3z"),s(o,"class","altcha-checkbox svelte-ddsc3z"),Ze(o,"altcha-hidden",r[6]===m.VERIFYING),s(f,"class","altcha-label svelte-ddsc3z"),s(t,"class","altcha-main svelte-ddsc3z"),s(e,"class","altcha svelte-ddsc3z"),s(e,"data-state",r[6]),s(e,"data-floating",r[1])},m(h,v){M(h,e,v),p(e,t),S&&S.m(t,null),p(t,i),p(t,o),p(o,l),l.checked=r[7],p(t,d),p(t,f),V.m(f,null),p(t,G),E&&E.m(t,null),p(e,N),I&&I.m(e,null),p(e,X),z&&z.m(e,null),p(e,$),y&&y.m(e,null),r[38](e),k||(K=[ke(l,"change",r[36]),ke(l,"change",r[13]),ke(l,"invalid",r[14])],k=!0)},p(h,v){h[6]===m.VERIFYING?S||(S=Ue(),S.c(),S.m(t,i)):S&&(S.d(1),S=null),v[0]&16&&c!==(c=h[4]+"_checkbox")&&s(l,"id",c),v[0]&1&&a!==(a=h[0]!=="onsubmit")&&(l.required=a),v[0]&128&&(l.checked=h[7]),v[0]&64&&Ze(o,"altcha-hidden",h[6]===m.VERIFYING),W===(W=q(h))&&V?V.p(h,v):(V.d(1),V=W(h),V&&(V.c(),V.m(f,null))),h[3]!==!0||h[12]?E?E.p(h,v):(E=Ge(h),E.c(),E.m(t,null)):E&&(E.d(1),E=null),h[10]||h[6]===m.EXPIRED?I?I.p(h,v):(I=Oe(h),I.c(),I.m(e,X)):I&&(I.d(1),I=null),h[11].footer&&(h[2]!==!0||h[12])?z?z.p(h,v):(z=Xe(h),z.c(),z.m(e,$)):z&&(z.d(1),z=null),h[1]?y?y.p(h,v):(y=Be(h),y.c(),y.m(e,null)):y&&(y.d(1),y=null),v[0]&64&&s(e,"data-state",h[6]),v[0]&2&&s(e,"data-floating",h[1])},i:ie,o:ie,d(h){h&&T(e),S&&S.d(),V.d(),E&&E.d(),I&&I.d(),z&&z.d(),y&&y.d(),r[38](null),k=!1,ce(K)}}}const He="Visit Altcha.org",Pe="https://altcha.org/";function We(r){return JSON.parse(r)}function Wt(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function Yt(r,e,t){var ft,ut;let i,o,l,c,{auto:a=void 0}=e,{blockspam:d=void 0}=e,{challengeurl:f=void 0}=e,{challengejson:G=void 0}=e,{debug:N=!1}=e,{delay:X=0}=e,{expire:$=void 0}=e,{floating:k=void 0}=e,{floatinganchor:K=void 0}=e,{floatingoffset:S=void 0}=e,{hidefooter:q=!1}=e,{hidelogo:W=!1}=e,{name:V="altcha"}=e,{maxnumber:E=1e6}=e,{mockerror:I=!1}=e,{refetchonexpire:z=!0}=e,{spamfilter:y=!1}=e,{strings:h=void 0}=e,{test:v=!1}=e,{verifyurl:Q=void 0}=e,{workers:ue=Math.min(16,navigator.hardwareConcurrency||8)}=e,{workerurl:be=void 0}=e;const Re=Et(),Ke=["SHA-256","SHA-384","SHA-512"],Je=(ut=(ft=document.documentElement.lang)==null?void 0:ft.split("-"))==null?void 0:ut[0];let J=!1,C,ee=null,ve=null,b=null,Ie=null,te=null,D=m.UNVERIFIED,B=null;xt(()=>{b&&(b.removeEventListener("submit",Qe),b.removeEventListener("reset",et),b.removeEventListener("focusin",qe),b=null),B&&(clearTimeout(B),B=null),document.removeEventListener("click",it),document.removeEventListener("scroll",ot),window.removeEventListener("resize",st)}),kt(()=>{x("mounted","0.6.6"),x("workers",ue),v&&x("using test mode"),$&&we($),a!==void 0&&x("auto",a),k!==void 0&&ct(k),b=C.closest("form"),b&&(b.addEventListener("submit",Qe,{capture:!0}),b.addEventListener("reset",et),a==="onfocus"&&b.addEventListener("focusin",qe)),a==="onload"&&re(),i&&(q||W)&&x("Attributes hidefooter and hidelogo ignored because usage with free API Keys require attribution.")});function x(...n){(N||n.some(u=>u instanceof Error))&&console[n[0]instanceof Error?"error":"log"]("ALTCHA",...n)}function qe(n){D===m.UNVERIFIED&&re()}function Qe(n){b&&a==="onsubmit"&&(D===m.UNVERIFIED?(n.preventDefault(),n.stopPropagation(),re().then(()=>{b==null||b.requestSubmit()})):D!==m.VERIFIED&&(n.preventDefault(),n.stopPropagation(),D===m.VERIFYING&&lt()))}function et(){ye()}function tt(n,u){return btoa(JSON.stringify({algorithm:n.algorithm,challenge:n.challenge,number:u.number,salt:n.salt,signature:n.signature,test:v?!0:void 0,took:u.took}))}function rt(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(!Ke.includes(n.algorithm.toUpperCase()))throw new Error(`Unknown algorithm value. Allowed values: ${Ke.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 Kt(){var n;if(I)throw x("mocking error"),new Error("Mocked error.");if(o)return x("using provided json data"),o;if(v)return x("generating test challenge",{test:v}),Ft(typeof v!="boolean"?+v:void 0);{if(!f)throw new Error("Attribute challengeurl not set.");x("fetching challenge from",f);const u=await fetch(f,{headers:{"x-altcha-spam-filter":y?"1":"0"}});if(u.status!==200)throw new Error(`Server responded with ${u.status}.`);const g=u.headers.get("Expires"),A=u.headers.get("X-Altcha-Config"),F=await u.json(),j=new URLSearchParams((n=F.salt.split("?"))==null?void 0:n[1]),H=j.get("expires")||j.get("expire");if(H){const _=new Date(+H*1e3),L=isNaN(_.getTime())?0:_.getTime()-Date.now();L>0&&we(L)}if(A)try{const _=JSON.parse(A);_&&typeof _=="object"&&(_.verifyurl&&(_.verifyurl=new URL(_.verifyurl,new URL(f)).toString()),at(_))}catch(_){x("unable to configure from X-Altcha-Config",_)}if(!$&&(g!=null&&g.length)){const _=Date.parse(g);if(_){const L=_-Date.now();L>0&&we(L)}}return F}}function nt(){f&&z&&D===m.VERIFIED?re():ye(m.EXPIRED,c.expired)}async function Jt(n){let u=null;if("Worker"in window){try{u=await qt(n.challenge,n.salt,n.algorithm,n.maxnumber)}catch(g){x(g)}if((u==null?void 0:u.number)!==void 0)return{data:n,solution:u}}return{data:n,solution:await $t(n.challenge,n.salt,n.algorithm,n.maxnumber||E).promise}}async function qt(n,u,g,A=typeof v=="number"?v:E,F=Math.ceil(ue)){const j=[];F=Math.min(16,Math.max(1,F));for(let L=0;L<F;L++)j.push(createAltchaWorker(be));const H=Math.ceil(A/F),_=await Promise.all(j.map((L,Ae)=>{const de=Ae*H;return new Promise(pe=>{L.addEventListener("message",_e=>{if(_e.data)for(const he of j)he!==L&&he.postMessage({type:"abort"});pe(_e.data)}),L.postMessage({payload:{alg:g,challenge:n,max:de+H,salt:u,start:de},type:"work"})})}));for(const L of j)L.terminate();return _.find(L=>!!L)||null}function Qt(){[m.UNVERIFIED,m.ERROR,m.EXPIRED].includes(D)?y&&(b==null?void 0:b.reportValidity())===!1?t(7,J=!1):re():t(7,J=!0)}function it(n){const u=n.target;k&&u&&!C.contains(u)&&D===m.VERIFIED&&t(8,C.style.display="none",C)}function ot(){k&&ze()}function lt(){D===m.VERIFYING&&c.waitAlert&&alert(c.waitAlert)}function er(n){k&&D!==m.UNVERIFIED&&requestAnimationFrame(()=>{ze()})}function st(){k&&ze()}function we(n){x("expire",n),B&&(clearTimeout(B),B=null),n<1?nt():B=setTimeout(nt,n)}function ct(n){x("floating",n),k!==n&&(t(8,C.style.left="",C),t(8,C.style.top="",C)),t(1,k=n===!0||n===""?"auto":n===!1||n==="false"?void 0:k),k?(a||t(0,a="onsubmit"),document.addEventListener("scroll",ot),document.addEventListener("click",it),window.addEventListener("resize",st)):a==="onsubmit"&&t(0,a=void 0)}function tr(n){var g;const u=b==null?void 0:b.querySelector(typeof n=="string"?`input[name="${n}"]`:'input[type="email"]:not([data-no-spamfilter])');return((g=u==null?void 0:u.value)==null?void 0:g.slice(u.value.indexOf("@")))||void 0}function rr(n){return[...(b==null?void 0:b.querySelectorAll(n!=null&&n.length?n.map(g=>`input[name="${g}"]`).join(", "):'input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])'))||[]].reduce((g,A)=>{const F=A.name,j=A.value;return F&&j&&(g[F]=/\n/.test(j)?j.replace(new RegExp("(?<!\\r)\\n","g"),`\r
2
- `):j),g},{})}async function nr(n){if(!Q)throw new Error("Attribute verifyurl not set.");x("requesting server verification from",Q);const u={payload:n};if(y){const{blockedCountries:F,classifier:j,disableRules:H,email:_,expectedLanguages:L,expectedCountries:Ae,fields:de,ipAddress:pe,text:_e,timeZone:he}=ir();u.blockedCountries=F,u.classifier=j,u.disableRules=H,u.email=_===!1?void 0:tr(_),u.expectedCountries=Ae,u.expectedLanguages=L||(Je?[Je]:void 0),u.fields=de===!1?void 0:rr(de),u.ipAddress=pe===!1?void 0:pe||"auto",u.text=_e,u.timeZone=he===!1?void 0:he||Wt()}const g=await fetch(Q,{body:JSON.stringify(u),headers:{"content-type":"application/json"},method:"POST"});if(g.status!==200)throw new Error(`Server responded with ${g.status}.`);const A=await g.json();if(A!=null&&A.payload&&t(5,te=A.payload),Re("serververification",A),d&&A.classification==="BAD")throw new Error("SpamFilter returned negative classification.")}function ir(){return y==="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 y=="object"?y:{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 ze(n=20){if(C)if(ve||(ve=(K?document.querySelector(K):b==null?void 0:b.querySelector('input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])'))||b),ve){const u=parseInt(S,10)||12,g=ve.getBoundingClientRect(),A=C.getBoundingClientRect(),F=document.documentElement.clientHeight,j=document.documentElement.clientWidth,H=k==="auto"?g.bottom+A.height+u+n>F:k==="top",_=Math.max(n,Math.min(j-n-A.width,g.left+g.width/2-A.width/2));if(H?t(8,C.style.top=`${g.top-(A.height+u)}px`,C):t(8,C.style.top=`${g.bottom+u}px`,C),t(8,C.style.left=`${_}px`,C),C.setAttribute("data-floating",H?"top":"bottom"),ee){const L=ee.getBoundingClientRect();t(9,ee.style.left=g.left-_+g.width/2-L.width/2+"px",ee)}}else x("unable to find floating anchor element")}function at(n){n.auto!==void 0&&(t(0,a=n.auto),a==="onload"&&re()),n.floatinganchor!==void 0&&t(19,K=n.floatinganchor),n.delay!==void 0&&t(17,X=n.delay),n.floatingoffset!==void 0&&t(20,S=n.floatingoffset),n.floating!==void 0&&ct(n.floating),n.expire!==void 0&&(we(n.expire),t(18,$=n.expire)),n.challenge&&(rt(n.challenge),o=n.challenge),n.challengeurl!==void 0&&t(15,f=n.challengeurl),n.debug!==void 0&&t(16,N=!!n.debug),n.hidefooter!==void 0&&t(2,q=!!n.hidefooter),n.hidelogo!==void 0&&t(3,W=!!n.hidelogo),n.maxnumber!==void 0&&t(21,E=+n.maxnumber),n.mockerror!==void 0&&t(22,I=!!n.mockerror),n.name!==void 0&&t(4,V=n.name),n.refetchonexpire!==void 0&&t(23,z=!!n.refetchonexpire),n.spamfilter!==void 0&&t(24,y=typeof n.spamfilter=="object"?n.spamfilter:!!n.spamfilter),n.strings&&t(35,l=n.strings),n.test!==void 0&&t(25,v=typeof n.test=="number"?n.test:!!n.test),n.verifyurl!==void 0&&t(26,Q=n.verifyurl),n.workers!==void 0&&t(27,ue=+n.workers),n.workerurl!==void 0&&t(28,be=n.workerurl)}function ye(n=m.UNVERIFIED,u=null){B&&(clearTimeout(B),B=null),t(7,J=!1),t(10,Ie=u),t(5,te=null),t(6,D=n)}async function re(){return ye(m.VERIFYING),await new Promise(n=>setTimeout(n,X||0)),Kt().then(n=>(rt(n),x("challenge",n),Jt(n))).then(({data:n,solution:u})=>{if(x("solution",u),(u==null?void 0:u.number)!==void 0){if(Q)return nr(tt(n,u));t(5,te=tt(n,u)),x("payload",te)}else throw x("Unable to find a solution. Ensure that the 'maxnumber' attribute is greater than the randomly generated number."),new Error("Unexpected result returned.")}).then(()=>{Ct().then(()=>{t(6,D=m.VERIFIED),t(7,J=!0),x("verified"),Re("verified",{payload:te})})}).catch(n=>{x(n),t(6,D=m.ERROR),t(7,J=!1),t(10,Ie=n.message)})}function or(){J=this.checked,t(7,J)}function lr(n){ge[n?"unshift":"push"](()=>{ee=n,t(9,ee)})}function sr(n){ge[n?"unshift":"push"](()=>{C=n,t(8,C)})}return r.$$set=n=>{"auto"in n&&t(0,a=n.auto),"blockspam"in n&&t(29,d=n.blockspam),"challengeurl"in n&&t(15,f=n.challengeurl),"challengejson"in n&&t(30,G=n.challengejson),"debug"in n&&t(16,N=n.debug),"delay"in n&&t(17,X=n.delay),"expire"in n&&t(18,$=n.expire),"floating"in n&&t(1,k=n.floating),"floatinganchor"in n&&t(19,K=n.floatinganchor),"floatingoffset"in n&&t(20,S=n.floatingoffset),"hidefooter"in n&&t(2,q=n.hidefooter),"hidelogo"in n&&t(3,W=n.hidelogo),"name"in n&&t(4,V=n.name),"maxnumber"in n&&t(21,E=n.maxnumber),"mockerror"in n&&t(22,I=n.mockerror),"refetchonexpire"in n&&t(23,z=n.refetchonexpire),"spamfilter"in n&&t(24,y=n.spamfilter),"strings"in n&&t(31,h=n.strings),"test"in n&&t(25,v=n.test),"verifyurl"in n&&t(26,Q=n.verifyurl),"workers"in n&&t(27,ue=n.workers),"workerurl"in n&&t(28,be=n.workerurl)},r.$$.update=()=>{r.$$.dirty[0]&32768&&t(12,i=!!(f!=null&&f.includes(".altcha.org"))&&!!(f!=null&&f.includes("apiKey=ckey_"))),r.$$.dirty[0]&1073741824&&(o=G?We(G):void 0),r.$$.dirty[1]&1&&t(35,l=h?We(h):{}),r.$$.dirty[1]&16&&t(11,c={ariaLinkLabel:He,error:"Verification failed. Try again later.",expired:"Verification expired. Try again.",footer:`Protected by <a href="${Pe}" target="_blank" aria-label="${l.ariaLinkLabel||He}">ALTCHA</a>`,label:"I'm not a robot",verified:"Verified",verifying:"Verifying...",waitAlert:"Verifying... please wait.",...l}),r.$$.dirty[0]&96&&Re("statechange",{payload:te,state:D}),r.$$.dirty[0]&64&&er()},[a,k,q,W,V,te,D,J,C,ee,Ie,c,i,Qt,lt,f,N,X,$,K,S,E,I,z,y,v,Q,ue,be,d,G,h,at,ye,re,l,or,lr,sr]}class Ye extends Zt{constructor(e){super(),jt(this,e,Yt,Pt,ht,{auto:0,blockspam:29,challengeurl:15,challengejson:30,debug:16,delay:17,expire:18,floating:1,floatinganchor:19,floatingoffset:20,hidefooter:2,hidelogo:3,name:4,maxnumber:21,mockerror:22,refetchonexpire:23,spamfilter:24,strings:31,test:25,verifyurl:26,workers:27,workerurl:28,configure:32,reset:33,verify:34},Ut,[-1,-1,-1])}get auto(){return this.$$.ctx[0]}set auto(e){this.$$set({auto:e}),w()}get blockspam(){return this.$$.ctx[29]}set blockspam(e){this.$$set({blockspam:e}),w()}get challengeurl(){return this.$$.ctx[15]}set challengeurl(e){this.$$set({challengeurl:e}),w()}get challengejson(){return this.$$.ctx[30]}set challengejson(e){this.$$set({challengejson:e}),w()}get debug(){return this.$$.ctx[16]}set debug(e){this.$$set({debug:e}),w()}get delay(){return this.$$.ctx[17]}set delay(e){this.$$set({delay:e}),w()}get expire(){return this.$$.ctx[18]}set expire(e){this.$$set({expire:e}),w()}get floating(){return this.$$.ctx[1]}set floating(e){this.$$set({floating:e}),w()}get floatinganchor(){return this.$$.ctx[19]}set floatinganchor(e){this.$$set({floatinganchor:e}),w()}get floatingoffset(){return this.$$.ctx[20]}set floatingoffset(e){this.$$set({floatingoffset:e}),w()}get hidefooter(){return this.$$.ctx[2]}set hidefooter(e){this.$$set({hidefooter:e}),w()}get hidelogo(){return this.$$.ctx[3]}set hidelogo(e){this.$$set({hidelogo:e}),w()}get name(){return this.$$.ctx[4]}set name(e){this.$$set({name:e}),w()}get maxnumber(){return this.$$.ctx[21]}set maxnumber(e){this.$$set({maxnumber:e}),w()}get mockerror(){return this.$$.ctx[22]}set mockerror(e){this.$$set({mockerror:e}),w()}get refetchonexpire(){return this.$$.ctx[23]}set refetchonexpire(e){this.$$set({refetchonexpire:e}),w()}get spamfilter(){return this.$$.ctx[24]}set spamfilter(e){this.$$set({spamfilter:e}),w()}get strings(){return this.$$.ctx[31]}set strings(e){this.$$set({strings:e}),w()}get test(){return this.$$.ctx[25]}set test(e){this.$$set({test:e}),w()}get verifyurl(){return this.$$.ctx[26]}set verifyurl(e){this.$$set({verifyurl:e}),w()}get workers(){return this.$$.ctx[27]}set workers(e){this.$$set({workers:e}),w()}get workerurl(){return this.$$.ctx[28]}set workerurl(e){this.$$set({workerurl:e}),w()}get configure(){return this.$$.ctx[32]}get reset(){return this.$$.ctx[33]}get verify(){return this.$$.ctx[34]}}customElements.define("altcha-widget",Tt(Ye,{auto:{},blockspam:{},challengeurl:{},challengejson:{},debug:{type:"Boolean"},delay:{},expire:{},floating:{},floatinganchor:{},floatingoffset:{},hidefooter:{type:"Boolean"},hidelogo:{type:"Boolean"},name:{},maxnumber:{},mockerror:{type:"Boolean"},refetchonexpire:{type:"Boolean"},spamfilter:{type:"Boolean"},strings:{},test:{type:"Boolean"},verifyurl:{},workers:{},workerurl:{}},[],["configure","reset","verify"],!1)),globalThis.createAltchaWorker=r=>r?new Worker(new URL(r)):new dt,U.Altcha=Ye,Object.defineProperty(U,Symbol.toStringTag,{value:"Module"})});
1
+ (function(U,Z){typeof exports=="object"&&typeof module<"u"?Z(exports):typeof define=="function"&&define.amd?define(["exports"],Z):(U=typeof globalThis<"u"?globalThis:U||self,Z(U.altcha={}))})(this,function(U){"use strict";var cr=Object.defineProperty;var ar=(U,Z,ne)=>Z in U?cr(U,Z,{enumerable:!0,configurable:!0,writable:!0,value:ne}):U[Z]=ne;var O=(U,Z,ne)=>ar(U,typeof Z!="symbol"?Z+"":Z,ne);const Z="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2NvbnN0IGY9bmV3IFRleHRFbmNvZGVyO2Z1bmN0aW9uIGQoZSl7cmV0dXJuWy4uLm5ldyBVaW50OEFycmF5KGUpXS5tYXAodD0+dC50b1N0cmluZygxNikucGFkU3RhcnQoMiwiMCIpKS5qb2luKCIiKX1hc3luYyBmdW5jdGlvbiBwKGUsdCxvKXtyZXR1cm4gZChhd2FpdCBjcnlwdG8uc3VidGxlLmRpZ2VzdChvLnRvVXBwZXJDYXNlKCksZi5lbmNvZGUoZSt0KSkpfWZ1bmN0aW9uIGcoZSx0LG89IlNIQS0yNTYiLGw9MWU2LGM9MCl7Y29uc3QgYT1uZXcgQWJvcnRDb250cm9sbGVyLGk9RGF0ZS5ub3coKTtyZXR1cm57cHJvbWlzZTooYXN5bmMoKT0+e2ZvcihsZXQgbj1jO248PWw7bis9MSl7aWYoYS5zaWduYWwuYWJvcnRlZClyZXR1cm4gbnVsbDtpZihhd2FpdCBwKHQsbixvKT09PWUpcmV0dXJue251bWJlcjpuLHRvb2s6RGF0ZS5ub3coKS1pfX1yZXR1cm4gbnVsbH0pKCksY29udHJvbGxlcjphfX1sZXQgcjtvbm1lc3NhZ2U9YXN5bmMgZT0+e2NvbnN0e3R5cGU6dCxwYXlsb2FkOm99PWUuZGF0YTtpZih0PT09ImFib3J0IilyPT1udWxsfHxyLmFib3J0KCkscj12b2lkIDA7ZWxzZSBpZih0PT09IndvcmsiKXtjb25zdHthbGc6bCxjaGFsbGVuZ2U6YyxtYXg6YSxzYWx0Omksc3RhcnQ6dX09b3x8e30sbj1nKGMsaSxsLGEsdSk7cj1uLmNvbnRyb2xsZXIsbi5wcm9taXNlLnRoZW4ocz0+e3NlbGYucG9zdE1lc3NhZ2UocyYmey4uLnMsd29ya2VyOiEwfSl9KX19fSkoKTsK",ne=r=>Uint8Array.from(atob(r),e=>e.charCodeAt(0)),Se=typeof self<"u"&&self.Blob&&new Blob([ne(Z)],{type:"text/javascript;charset=utf-8"});function dt(r){let e;try{if(e=Se&&(self.URL||self.webkitURL).createObjectURL(Se),!e)throw"";const t=new Worker(e,{name:r==null?void 0:r.name});return t.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),t}catch{return new Worker("data:text/javascript;base64,"+Z,{name:r==null?void 0:r.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}function ie(){}function Ne(r){return r()}function je(){return Object.create(null)}function ce(r){r.forEach(Ne)}function Te(r){return typeof r=="function"}function ht(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function gt(r){return Object.keys(r).length===0}function p(r,e){r.appendChild(e)}function mt(r,e,t){const i=bt(r);if(!i.getElementById(e)){const o=R("style");o.id=e,o.textContent=t,vt(i,o)}}function bt(r){if(!r)return document;const e=r.getRootNode?r.getRootNode():r.ownerDocument;return e&&e.host?e:r.ownerDocument}function vt(r,e){return p(r.head||r,e),e.sheet}function M(r,e,t){r.insertBefore(e,t||null)}function T(r){r.parentNode&&r.parentNode.removeChild(r)}function R(r){return document.createElement(r)}function P(r){return document.createElementNS("http://www.w3.org/2000/svg",r)}function wt(r){return document.createTextNode(r)}function Y(){return wt(" ")}function ke(r,e,t,i){return r.addEventListener(e,t,i),()=>r.removeEventListener(e,t,i)}function s(r,e,t){t==null?r.removeAttribute(e):r.getAttribute(e)!==t&&r.setAttribute(e,t)}function yt(r){return Array.from(r.childNodes)}function Ze(r,e,t){r.classList.toggle(e,!!t)}function pt(r,e,{bubbles:t=!1,cancelable:i=!1}={}){return new CustomEvent(r,{detail:e,bubbles:t,cancelable:i})}function _t(r){const e={};return r.childNodes.forEach(t=>{e[t.slot||"default"]=!0}),e}let ae;function fe(r){ae=r}function xe(){if(!ae)throw new Error("Function called outside component initialization");return ae}function kt(r){xe().$$.on_mount.push(r)}function xt(r){xe().$$.on_destroy.push(r)}function Et(){const r=xe();return(e,t,{cancelable:i=!1}={})=>{const o=r.$$.callbacks[e];if(o){const l=pt(e,t,{cancelable:i});return o.slice().forEach(c=>{c.call(r,l)}),!l.defaultPrevented}return!0}}const oe=[],ge=[];let le=[];const Me=[],Ve=Promise.resolve();let Ee=!1;function $e(){Ee||(Ee=!0,Ve.then(w))}function Ct(){return $e(),Ve}function Ce(r){le.push(r)}const Le=new Set;let se=0;function w(){if(se!==0)return;const r=ae;do{try{for(;se<oe.length;){const e=oe[se];se++,fe(e),Lt(e.$$)}}catch(e){throw oe.length=0,se=0,e}for(fe(null),oe.length=0,se=0;ge.length;)ge.pop()();for(let e=0;e<le.length;e+=1){const t=le[e];Le.has(t)||(Le.add(t),t())}le.length=0}while(oe.length);for(;Me.length;)Me.pop()();Ee=!1,Le.clear(),fe(r)}function Lt(r){if(r.fragment!==null){r.update(),ce(r.before_update);const e=r.dirty;r.dirty=[-1],r.fragment&&r.fragment.p(r.ctx,e),r.after_update.forEach(Ce)}}function Rt(r){const e=[],t=[];le.forEach(i=>r.indexOf(i)===-1?e.push(i):t.push(i)),t.forEach(i=>i()),le=e}const It=new Set;function zt(r,e){r&&r.i&&(It.delete(r),r.i(e))}function At(r,e,t){const{fragment:i,after_update:o}=r.$$;i&&i.m(e,t),Ce(()=>{const l=r.$$.on_mount.map(Ne).filter(Te);r.$$.on_destroy?r.$$.on_destroy.push(...l):ce(l),r.$$.on_mount=[]}),o.forEach(Ce)}function St(r,e){const t=r.$$;t.fragment!==null&&(Rt(t.after_update),ce(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function Nt(r,e){r.$$.dirty[0]===-1&&(oe.push(r),$e(),r.$$.dirty.fill(0)),r.$$.dirty[e/31|0]|=1<<e%31}function jt(r,e,t,i,o,l,c=null,a=[-1]){const d=ae;fe(r);const f=r.$$={fragment:null,ctx:[],props:l,update:ie,not_equal:o,bound:je(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(d?d.$$.context:[])),callbacks:je(),dirty:a,skip_bound:!1,root:e.target||d.$$.root};c&&c(f.root);let G=!1;if(f.ctx=t?t(r,e.props||{},(N,X,...F)=>{const k=F.length?F[0]:X;return f.ctx&&o(f.ctx[N],f.ctx[N]=k)&&(!f.skip_bound&&f.bound[N]&&f.bound[N](k),G&&Nt(r,N)),X}):[],f.update(),G=!0,ce(f.before_update),f.fragment=i?i(f.ctx):!1,e.target){if(e.hydrate){const N=yt(e.target);f.fragment&&f.fragment.l(N),N.forEach(T)}else f.fragment&&f.fragment.c();e.intro&&zt(r.$$.fragment),At(r,e.target,e.anchor),w()}fe(d)}let De;typeof HTMLElement=="function"&&(De=class extends HTMLElement{constructor(e,t,i){super();O(this,"$$ctor");O(this,"$$s");O(this,"$$c");O(this,"$$cn",!1);O(this,"$$d",{});O(this,"$$r",!1);O(this,"$$p_d",{});O(this,"$$l",{});O(this,"$$l_u",new Map);this.$$ctor=e,this.$$s=t,i&&this.attachShadow({mode:"open"})}addEventListener(e,t,i){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const o=this.$$c.$on(e,t);this.$$l_u.set(t,o)}super.addEventListener(e,t,i)}removeEventListener(e,t,i){if(super.removeEventListener(e,t,i),this.$$c){const o=this.$$l_u.get(t);o&&(o(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(l){return()=>{let c;return{c:function(){c=R("slot"),l!=="default"&&s(c,"name",l)},m:function(f,G){M(f,c,G)},d:function(f){f&&T(c)}}}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},i=_t(this);for(const l of this.$$s)l in i&&(t[l]=[e(l)]);for(const l of this.attributes){const c=this.$$g_p(l.name);c in this.$$d||(this.$$d[c]=me(c,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=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:t,$$scope:{ctx:[]}}});const o=()=>{this.$$r=!0;for(const l in this.$$p_d)if(this.$$d[l]=this.$$c.$$.ctx[this.$$c.$$.props[l]],this.$$p_d[l].reflect){const c=me(l,this.$$d[l],this.$$p_d,"toAttribute");c==null?this.removeAttribute(this.$$p_d[l].attribute||l):this.setAttribute(this.$$p_d[l].attribute||l,c)}this.$$r=!1};this.$$c.$$.after_update.push(o),o();for(const l in this.$$l)for(const c of this.$$l[l]){const a=this.$$c.$on(l,c);this.$$l_u.set(c,a)}this.$$l={}}}attributeChangedCallback(e,t,i){var o;this.$$r||(e=this.$$g_p(e),this.$$d[e]=me(e,i,this.$$p_d,"toProp"),(o=this.$$c)==null||o.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(e){return Object.keys(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function me(r,e,t,i){var l;const o=(l=t[r])==null?void 0:l.type;if(e=o==="Boolean"&&typeof e!="boolean"?e!=null:e,!i||!t[r])return e;if(i==="toAttribute")switch(o){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(o){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function Tt(r,e,t,i,o,l){let c=class extends De{constructor(){super(r,t,o),this.$$p_d=e}static get observedAttributes(){return Object.keys(e).map(a=>(e[a].attribute||a).toLowerCase())}};return Object.keys(e).forEach(a=>{Object.defineProperty(c.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(d){var f;d=me(a,d,e),this.$$d[a]=d,(f=this.$$c)==null||f.$set({[a]:d})}})}),i.forEach(a=>{Object.defineProperty(c.prototype,a,{get(){var d;return(d=this.$$c)==null?void 0:d[a]}})}),r.element=c,c}class Zt{constructor(){O(this,"$$");O(this,"$$set")}$destroy(){St(this,1),this.$destroy=ie}$on(e,t){if(!Te(t))return ie;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(t),()=>{const o=i.indexOf(t);o!==-1&&i.splice(o,1)}}$set(e){this.$$set&&!gt(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Mt="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Mt);const Vt=new TextEncoder;function $t(r){return[...new Uint8Array(r)].map(e=>e.toString(16).padStart(2,"0")).join("")}async function Dt(r,e="SHA-256",t=1e5){const i=Date.now().toString(16);r||(r=Math.round(Math.random()*t));const o=await Fe(i,r,e);return{algorithm:e,challenge:o,salt:i,signature:""}}async function Fe(r,e,t){return $t(await crypto.subtle.digest(t.toUpperCase(),Vt.encode(r+e)))}function Ft(r,e,t="SHA-256",i=1e6,o=0){const l=new AbortController,c=Date.now();return{promise:(async()=>{for(let d=o;d<=i;d+=1){if(l.signal.aborted)return null;if(await Fe(e,d,t)===r)return{number:d,took:Date.now()-c}}return null})(),controller:l}}var m=(r=>(r.ERROR="error",r.VERIFIED="verified",r.VERIFYING="verifying",r.UNVERIFIED="unverified",r.EXPIRED="expired",r))(m||{});function Ut(r){mt(r,"svelte-ddsc3z",'.altcha.svelte-ddsc3z.svelte-ddsc3z{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;text-align:left}.altcha.svelte-ddsc3z.svelte-ddsc3z:focus-within{border-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating].svelte-ddsc3z.svelte-ddsc3z{background:var(--altcha-color-base, white);display:none;filter:drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.2));left:-100%;position:fixed;top:-100%;width:var(--altcha-max-width, 260px);z-index:999999}.altcha[data-floating=top].svelte-ddsc3z .altcha-anchor-arrow.svelte-ddsc3z{border-bottom-color:transparent;border-top-color:var(--altcha-color-border, #a0a0a0);bottom:-12px;top:auto}.altcha[data-floating=bottom].svelte-ddsc3z.svelte-ddsc3z:focus-within::after{border-bottom-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating=top].svelte-ddsc3z.svelte-ddsc3z:focus-within::after{border-top-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating].svelte-ddsc3z.svelte-ddsc3z:not([data-state=unverified]){display:block}.altcha-anchor-arrow.svelte-ddsc3z.svelte-ddsc3z{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.svelte-ddsc3z.svelte-ddsc3z{align-items:center;display:flex;gap:0.4rem;padding:0.7rem}.altcha-label.svelte-ddsc3z.svelte-ddsc3z{flex-grow:1}.altcha-label.svelte-ddsc3z label.svelte-ddsc3z{cursor:pointer}.altcha-logo.svelte-ddsc3z.svelte-ddsc3z{color:currentColor;opacity:0.3}.altcha-logo.svelte-ddsc3z.svelte-ddsc3z:hover{opacity:1}.altcha-error.svelte-ddsc3z.svelte-ddsc3z{color:var(--altcha-color-error-text, #f23939);display:flex;font-size:0.85rem;gap:0.3rem;padding:0 0.7rem 0.7rem}.altcha-footer.svelte-ddsc3z.svelte-ddsc3z{align-items:center;background-color:var(--altcha-color-footer-bg, transparent);display:flex;font-size:0.75rem;opacity:0.4;padding:0.2rem 0.7rem;text-align:right}.altcha-footer.svelte-ddsc3z.svelte-ddsc3z:hover{opacity:1}.altcha-footer.svelte-ddsc3z>.svelte-ddsc3z:first-child{flex-grow:1}.altcha-footer.svelte-ddsc3z a{color:currentColor}.altcha-checkbox.svelte-ddsc3z.svelte-ddsc3z{display:flex;align-items:center;height:24px;width:24px}.altcha-checkbox.svelte-ddsc3z input.svelte-ddsc3z{width:18px;height:18px;margin:0}.altcha-hidden.svelte-ddsc3z.svelte-ddsc3z{display:none}.altcha-spinner.svelte-ddsc3z.svelte-ddsc3z{animation:svelte-ddsc3z-altcha-spinner 0.75s infinite linear;transform-origin:center}@keyframes svelte-ddsc3z-altcha-spinner{100%{transform:rotate(360deg)}}')}function Ue(r){let e,t,i;return{c(){e=P("svg"),t=P("path"),i=P("path"),s(t,"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"),s(t,"fill","currentColor"),s(t,"opacity",".25"),s(i,"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"),s(i,"fill","currentColor"),s(i,"class","altcha-spinner svelte-ddsc3z"),s(e,"width","24"),s(e,"height","24"),s(e,"viewBox","0 0 24 24"),s(e,"xmlns","http://www.w3.org/2000/svg")},m(o,l){M(o,e,l),p(e,t),p(e,i)},d(o){o&&T(e)}}}function Gt(r){let e,t=r[11].label+"",i;return{c(){e=R("label"),s(e,"for",i=r[4]+"_checkbox"),s(e,"class","svelte-ddsc3z")},m(o,l){M(o,e,l),e.innerHTML=t},p(o,l){l[0]&2048&&t!==(t=o[11].label+"")&&(e.innerHTML=t),l[0]&16&&i!==(i=o[4]+"_checkbox")&&s(e,"for",i)},d(o){o&&T(e)}}}function Ot(r){let e,t=r[11].verifying+"";return{c(){e=R("span")},m(i,o){M(i,e,o),e.innerHTML=t},p(i,o){o[0]&2048&&t!==(t=i[11].verifying+"")&&(e.innerHTML=t)},d(i){i&&T(e)}}}function Xt(r){let e,t=r[11].verified+"",i,o;return{c(){e=R("span"),i=Y(),o=R("input"),s(o,"type","hidden"),s(o,"name",r[4]),o.value=r[5]},m(l,c){M(l,e,c),e.innerHTML=t,M(l,i,c),M(l,o,c)},p(l,c){c[0]&2048&&t!==(t=l[11].verified+"")&&(e.innerHTML=t),c[0]&16&&s(o,"name",l[4]),c[0]&32&&(o.value=l[5])},d(l){l&&(T(e),T(i),T(o))}}}function Ge(r){let e,t,i,o,l,c,a;return{c(){e=R("div"),t=R("a"),i=P("svg"),o=P("path"),l=P("path"),c=P("path"),s(o,"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"),s(o,"fill","currentColor"),s(l,"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"),s(l,"fill","currentColor"),s(c,"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"),s(c,"fill","currentColor"),s(i,"width","22"),s(i,"height","22"),s(i,"viewBox","0 0 20 20"),s(i,"fill","none"),s(i,"xmlns","http://www.w3.org/2000/svg"),s(t,"href",Pe),s(t,"target","_blank"),s(t,"class","altcha-logo svelte-ddsc3z"),s(t,"aria-label",a=r[11].ariaLinkLabel)},m(d,f){M(d,e,f),p(e,t),p(t,i),p(i,o),p(i,l),p(i,c)},p(d,f){f[0]&2048&&a!==(a=d[11].ariaLinkLabel)&&s(t,"aria-label",a)},d(d){d&&T(e)}}}function Oe(r){let e,t,i,o;function l(d,f){return d[6]===m.EXPIRED?Ht:Bt}let c=l(r),a=c(r);return{c(){e=R("div"),t=P("svg"),i=P("path"),o=Y(),a.c(),s(i,"stroke-linecap","round"),s(i,"stroke-linejoin","round"),s(i,"d","M6 18L18 6M6 6l12 12"),s(t,"width","14"),s(t,"height","14"),s(t,"xmlns","http://www.w3.org/2000/svg"),s(t,"fill","none"),s(t,"viewBox","0 0 24 24"),s(t,"stroke-width","1.5"),s(t,"stroke","currentColor"),s(e,"class","altcha-error svelte-ddsc3z")},m(d,f){M(d,e,f),p(e,t),p(t,i),p(e,o),a.m(e,null)},p(d,f){c===(c=l(d))&&a?a.p(d,f):(a.d(1),a=c(d),a&&(a.c(),a.m(e,null)))},d(d){d&&T(e),a.d()}}}function Bt(r){let e,t=r[11].error+"";return{c(){e=R("div"),s(e,"title",r[10])},m(i,o){M(i,e,o),e.innerHTML=t},p(i,o){o[0]&2048&&t!==(t=i[11].error+"")&&(e.innerHTML=t),o[0]&1024&&s(e,"title",i[10])},d(i){i&&T(e)}}}function Ht(r){let e,t=r[11].expired+"";return{c(){e=R("div"),s(e,"title",r[10])},m(i,o){M(i,e,o),e.innerHTML=t},p(i,o){o[0]&2048&&t!==(t=i[11].expired+"")&&(e.innerHTML=t),o[0]&1024&&s(e,"title",i[10])},d(i){i&&T(e)}}}function Xe(r){let e,t,i=r[11].footer+"";return{c(){e=R("div"),t=R("div"),s(t,"class","svelte-ddsc3z"),s(e,"class","altcha-footer svelte-ddsc3z")},m(o,l){M(o,e,l),p(e,t),t.innerHTML=i},p(o,l){l[0]&2048&&i!==(i=o[11].footer+"")&&(t.innerHTML=i)},d(o){o&&T(e)}}}function Be(r){let e;return{c(){e=R("div"),s(e,"class","altcha-anchor-arrow svelte-ddsc3z")},m(t,i){M(t,e,i),r[37](e)},p:ie,d(t){t&&T(e),r[37](null)}}}function Pt(r){let e,t,i,o,l,c,a,d,f,G,N,X,F,k,K,S=r[6]===m.VERIFYING&&Ue();function q(h,v){return h[6]===m.VERIFIED?Xt:h[6]===m.VERIFYING?Ot:Gt}let W=q(r),V=W(r),E=(r[3]!==!0||r[12])&&Ge(r),I=(r[10]||r[6]===m.EXPIRED)&&Oe(r),z=r[11].footer&&(r[2]!==!0||r[12])&&Xe(r),y=r[1]&&Be(r);return{c(){e=R("div"),t=R("div"),S&&S.c(),i=Y(),o=R("div"),l=R("input"),d=Y(),f=R("div"),V.c(),G=Y(),E&&E.c(),N=Y(),I&&I.c(),X=Y(),z&&z.c(),F=Y(),y&&y.c(),s(l,"type","checkbox"),s(l,"id",c=r[4]+"_checkbox"),l.required=a=r[0]!=="onsubmit",s(l,"class","svelte-ddsc3z"),s(o,"class","altcha-checkbox svelte-ddsc3z"),Ze(o,"altcha-hidden",r[6]===m.VERIFYING),s(f,"class","altcha-label svelte-ddsc3z"),s(t,"class","altcha-main svelte-ddsc3z"),s(e,"class","altcha svelte-ddsc3z"),s(e,"data-state",r[6]),s(e,"data-floating",r[1])},m(h,v){M(h,e,v),p(e,t),S&&S.m(t,null),p(t,i),p(t,o),p(o,l),l.checked=r[7],p(t,d),p(t,f),V.m(f,null),p(t,G),E&&E.m(t,null),p(e,N),I&&I.m(e,null),p(e,X),z&&z.m(e,null),p(e,F),y&&y.m(e,null),r[38](e),k||(K=[ke(l,"change",r[36]),ke(l,"change",r[13]),ke(l,"invalid",r[14])],k=!0)},p(h,v){h[6]===m.VERIFYING?S||(S=Ue(),S.c(),S.m(t,i)):S&&(S.d(1),S=null),v[0]&16&&c!==(c=h[4]+"_checkbox")&&s(l,"id",c),v[0]&1&&a!==(a=h[0]!=="onsubmit")&&(l.required=a),v[0]&128&&(l.checked=h[7]),v[0]&64&&Ze(o,"altcha-hidden",h[6]===m.VERIFYING),W===(W=q(h))&&V?V.p(h,v):(V.d(1),V=W(h),V&&(V.c(),V.m(f,null))),h[3]!==!0||h[12]?E?E.p(h,v):(E=Ge(h),E.c(),E.m(t,null)):E&&(E.d(1),E=null),h[10]||h[6]===m.EXPIRED?I?I.p(h,v):(I=Oe(h),I.c(),I.m(e,X)):I&&(I.d(1),I=null),h[11].footer&&(h[2]!==!0||h[12])?z?z.p(h,v):(z=Xe(h),z.c(),z.m(e,F)):z&&(z.d(1),z=null),h[1]?y?y.p(h,v):(y=Be(h),y.c(),y.m(e,null)):y&&(y.d(1),y=null),v[0]&64&&s(e,"data-state",h[6]),v[0]&2&&s(e,"data-floating",h[1])},i:ie,o:ie,d(h){h&&T(e),S&&S.d(),V.d(),E&&E.d(),I&&I.d(),z&&z.d(),y&&y.d(),r[38](null),k=!1,ce(K)}}}const He="Visit Altcha.org",Pe="https://altcha.org/";function We(r){return JSON.parse(r)}function Wt(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function Yt(r,e,t){var ft,ut;let i,o,l,c,{auto:a=void 0}=e,{blockspam:d=void 0}=e,{challengeurl:f=void 0}=e,{challengejson:G=void 0}=e,{debug:N=!1}=e,{delay:X=0}=e,{expire:F=void 0}=e,{floating:k=void 0}=e,{floatinganchor:K=void 0}=e,{floatingoffset:S=void 0}=e,{hidefooter:q=!1}=e,{hidelogo:W=!1}=e,{name:V="altcha"}=e,{maxnumber:E=1e6}=e,{mockerror:I=!1}=e,{refetchonexpire:z=!0}=e,{spamfilter:y=!1}=e,{strings:h=void 0}=e,{test:v=!1}=e,{verifyurl:Q=void 0}=e,{workers:ue=Math.min(16,navigator.hardwareConcurrency||8)}=e,{workerurl:be=void 0}=e;const Re=Et(),Ke=["SHA-256","SHA-384","SHA-512"],Je=(ut=(ft=document.documentElement.lang)==null?void 0:ft.split("-"))==null?void 0:ut[0];let J=!1,C,ee=null,ve=null,b=null,Ie=null,te=null,$=m.UNVERIFIED,B=null;xt(()=>{b&&(b.removeEventListener("submit",Qe),b.removeEventListener("reset",et),b.removeEventListener("focusin",qe),b=null),B&&(clearTimeout(B),B=null),document.removeEventListener("click",it),document.removeEventListener("scroll",ot),window.removeEventListener("resize",st)}),kt(()=>{x("mounted","0.6.7"),x("workers",ue),v&&x("using test mode"),F&&we(F),a!==void 0&&x("auto",a),k!==void 0&&ct(k),b=C.closest("form"),b&&(b.addEventListener("submit",Qe,{capture:!0}),b.addEventListener("reset",et),a==="onfocus"&&b.addEventListener("focusin",qe)),a==="onload"&&re(),i&&(q||W)&&x("Attributes hidefooter and hidelogo ignored because usage with free API Keys require attribution.")});function x(...n){(N||n.some(u=>u instanceof Error))&&console[n[0]instanceof Error?"error":"log"]("ALTCHA",...n)}function qe(n){$===m.UNVERIFIED&&re()}function Qe(n){b&&a==="onsubmit"&&($===m.UNVERIFIED?(n.preventDefault(),n.stopPropagation(),re().then(()=>{b==null||b.requestSubmit()})):$!==m.VERIFIED&&(n.preventDefault(),n.stopPropagation(),$===m.VERIFYING&&lt()))}function et(){ye()}function tt(n,u){return btoa(JSON.stringify({algorithm:n.algorithm,challenge:n.challenge,number:u.number,salt:n.salt,signature:n.signature,test:v?!0:void 0,took:u.took}))}function rt(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(!Ke.includes(n.algorithm.toUpperCase()))throw new Error(`Unknown algorithm value. Allowed values: ${Ke.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 Kt(){var n;if(I)throw x("mocking error"),new Error("Mocked error.");if(o)return x("using provided json data"),o;if(v)return x("generating test challenge",{test:v}),Dt(typeof v!="boolean"?+v:void 0);{if(!f)throw new Error("Attribute challengeurl not set.");x("fetching challenge from",f);const u=await fetch(f,{headers:{"x-altcha-spam-filter":y?"1":"0"}});if(u.status!==200)throw new Error(`Server responded with ${u.status}.`);const g=u.headers.get("Expires"),A=u.headers.get("X-Altcha-Config"),D=await u.json(),j=new URLSearchParams((n=D.salt.split("?"))==null?void 0:n[1]),H=j.get("expires")||j.get("expire");if(H){const _=new Date(+H*1e3),L=isNaN(_.getTime())?0:_.getTime()-Date.now();L>0&&we(L)}if(A)try{const _=JSON.parse(A);_&&typeof _=="object"&&(_.verifyurl&&(_.verifyurl=new URL(_.verifyurl,new URL(f)).toString()),at(_))}catch(_){x("unable to configure from X-Altcha-Config",_)}if(!F&&(g!=null&&g.length)){const _=Date.parse(g);if(_){const L=_-Date.now();L>0&&we(L)}}return D}}function nt(){f&&z&&$===m.VERIFIED?re():ye(m.EXPIRED,c.expired)}async function Jt(n){let u=null;if("Worker"in window){try{u=await qt(n.challenge,n.salt,n.algorithm,n.maxnumber)}catch(g){x(g)}if((u==null?void 0:u.number)!==void 0)return{data:n,solution:u}}return{data:n,solution:await Ft(n.challenge,n.salt,n.algorithm,n.maxnumber||E).promise}}async function qt(n,u,g,A=typeof v=="number"?v:E,D=Math.ceil(ue)){const j=[];D=Math.min(16,Math.max(1,D));for(let L=0;L<D;L++)j.push(createAltchaWorker(be));const H=Math.ceil(A/D),_=await Promise.all(j.map((L,Ae)=>{const de=Ae*H;return new Promise(pe=>{L.addEventListener("message",_e=>{if(_e.data)for(const he of j)he!==L&&he.postMessage({type:"abort"});pe(_e.data)}),L.postMessage({payload:{alg:g,challenge:n,max:de+H,salt:u,start:de},type:"work"})})}));for(const L of j)L.terminate();return _.find(L=>!!L)||null}function Qt(){[m.UNVERIFIED,m.ERROR,m.EXPIRED].includes($)?y&&(b==null?void 0:b.reportValidity())===!1?t(7,J=!1):re():t(7,J=!0)}function it(n){const u=n.target;k&&u&&!C.contains(u)&&$===m.VERIFIED&&t(8,C.style.display="none",C)}function ot(){k&&ze()}function lt(){$===m.VERIFYING&&c.waitAlert&&alert(c.waitAlert)}function er(n){k&&$!==m.UNVERIFIED&&requestAnimationFrame(()=>{ze()})}function st(){k&&ze()}function we(n){x("expire",n),B&&(clearTimeout(B),B=null),n<1?nt():B=setTimeout(nt,n)}function ct(n){x("floating",n),k!==n&&(t(8,C.style.left="",C),t(8,C.style.top="",C)),t(1,k=n===!0||n===""?"auto":n===!1||n==="false"?void 0:k),k?(a||t(0,a="onsubmit"),document.addEventListener("scroll",ot),document.addEventListener("click",it),window.addEventListener("resize",st)):a==="onsubmit"&&t(0,a=void 0)}function tr(n){var g;const u=b==null?void 0:b.querySelector(typeof n=="string"?`input[name="${n}"]`:'input[type="email"]:not([data-no-spamfilter])');return((g=u==null?void 0:u.value)==null?void 0:g.slice(u.value.indexOf("@")))||void 0}function rr(n){return[...(b==null?void 0:b.querySelectorAll(n!=null&&n.length?n.map(g=>`input[name="${g}"]`).join(", "):'input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])'))||[]].reduce((g,A)=>{const D=A.name,j=A.value;return D&&j&&(g[D]=/\n/.test(j)?j.replace(new RegExp("(?<!\\r)\\n","g"),`\r
2
+ `):j),g},{})}async function nr(n){if(!Q)throw new Error("Attribute verifyurl not set.");x("requesting server verification from",Q);const u={payload:n};if(y){const{blockedCountries:D,classifier:j,disableRules:H,email:_,expectedLanguages:L,expectedCountries:Ae,fields:de,ipAddress:pe,text:_e,timeZone:he}=ir();u.blockedCountries=D,u.classifier=j,u.disableRules=H,u.email=_===!1?void 0:tr(_),u.expectedCountries=Ae,u.expectedLanguages=L||(Je?[Je]:void 0),u.fields=de===!1?void 0:rr(de),u.ipAddress=pe===!1?void 0:pe||"auto",u.text=_e,u.timeZone=he===!1?void 0:he||Wt()}const g=await fetch(Q,{body:JSON.stringify(u),headers:{"content-type":"application/json"},method:"POST"});if(g.status!==200)throw new Error(`Server responded with ${g.status}.`);const A=await g.json();if(A!=null&&A.payload&&t(5,te=A.payload),Re("serververification",A),d&&A.classification==="BAD")throw new Error("SpamFilter returned negative classification.")}function ir(){return y==="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 y=="object"?y:{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 ze(n=20){if(C)if(ve||(ve=(K?document.querySelector(K):b==null?void 0:b.querySelector('input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])'))||b),ve){const u=parseInt(S,10)||12,g=ve.getBoundingClientRect(),A=C.getBoundingClientRect(),D=document.documentElement.clientHeight,j=document.documentElement.clientWidth,H=k==="auto"?g.bottom+A.height+u+n>D:k==="top",_=Math.max(n,Math.min(j-n-A.width,g.left+g.width/2-A.width/2));if(H?t(8,C.style.top=`${g.top-(A.height+u)}px`,C):t(8,C.style.top=`${g.bottom+u}px`,C),t(8,C.style.left=`${_}px`,C),C.setAttribute("data-floating",H?"top":"bottom"),ee){const L=ee.getBoundingClientRect();t(9,ee.style.left=g.left-_+g.width/2-L.width/2+"px",ee)}}else x("unable to find floating anchor element")}function at(n){n.auto!==void 0&&(t(0,a=n.auto),a==="onload"&&re()),n.floatinganchor!==void 0&&t(19,K=n.floatinganchor),n.delay!==void 0&&t(17,X=n.delay),n.floatingoffset!==void 0&&t(20,S=n.floatingoffset),n.floating!==void 0&&ct(n.floating),n.expire!==void 0&&(we(n.expire),t(18,F=n.expire)),n.challenge&&(rt(n.challenge),o=n.challenge),n.challengeurl!==void 0&&t(15,f=n.challengeurl),n.debug!==void 0&&t(16,N=!!n.debug),n.hidefooter!==void 0&&t(2,q=!!n.hidefooter),n.hidelogo!==void 0&&t(3,W=!!n.hidelogo),n.maxnumber!==void 0&&t(21,E=+n.maxnumber),n.mockerror!==void 0&&t(22,I=!!n.mockerror),n.name!==void 0&&t(4,V=n.name),n.refetchonexpire!==void 0&&t(23,z=!!n.refetchonexpire),n.spamfilter!==void 0&&t(24,y=typeof n.spamfilter=="object"?n.spamfilter:!!n.spamfilter),n.strings&&t(35,l=n.strings),n.test!==void 0&&t(25,v=typeof n.test=="number"?n.test:!!n.test),n.verifyurl!==void 0&&t(26,Q=n.verifyurl),n.workers!==void 0&&t(27,ue=+n.workers),n.workerurl!==void 0&&t(28,be=n.workerurl)}function ye(n=m.UNVERIFIED,u=null){B&&(clearTimeout(B),B=null),t(7,J=!1),t(10,Ie=u),t(5,te=null),t(6,$=n)}async function re(){return ye(m.VERIFYING),await new Promise(n=>setTimeout(n,X||0)),Kt().then(n=>(rt(n),x("challenge",n),Jt(n))).then(({data:n,solution:u})=>{if(x("solution",u),(u==null?void 0:u.number)!==void 0){if(Q)return nr(tt(n,u));t(5,te=tt(n,u)),x("payload",te)}else throw x("Unable to find a solution. Ensure that the 'maxnumber' attribute is greater than the randomly generated number."),new Error("Unexpected result returned.")}).then(()=>{Ct().then(()=>{t(6,$=m.VERIFIED),t(7,J=!0),x("verified"),Re("verified",{payload:te})})}).catch(n=>{x(n),t(6,$=m.ERROR),t(7,J=!1),t(10,Ie=n.message)})}function or(){J=this.checked,t(7,J)}function lr(n){ge[n?"unshift":"push"](()=>{ee=n,t(9,ee)})}function sr(n){ge[n?"unshift":"push"](()=>{C=n,t(8,C)})}return r.$$set=n=>{"auto"in n&&t(0,a=n.auto),"blockspam"in n&&t(29,d=n.blockspam),"challengeurl"in n&&t(15,f=n.challengeurl),"challengejson"in n&&t(30,G=n.challengejson),"debug"in n&&t(16,N=n.debug),"delay"in n&&t(17,X=n.delay),"expire"in n&&t(18,F=n.expire),"floating"in n&&t(1,k=n.floating),"floatinganchor"in n&&t(19,K=n.floatinganchor),"floatingoffset"in n&&t(20,S=n.floatingoffset),"hidefooter"in n&&t(2,q=n.hidefooter),"hidelogo"in n&&t(3,W=n.hidelogo),"name"in n&&t(4,V=n.name),"maxnumber"in n&&t(21,E=n.maxnumber),"mockerror"in n&&t(22,I=n.mockerror),"refetchonexpire"in n&&t(23,z=n.refetchonexpire),"spamfilter"in n&&t(24,y=n.spamfilter),"strings"in n&&t(31,h=n.strings),"test"in n&&t(25,v=n.test),"verifyurl"in n&&t(26,Q=n.verifyurl),"workers"in n&&t(27,ue=n.workers),"workerurl"in n&&t(28,be=n.workerurl)},r.$$.update=()=>{r.$$.dirty[0]&32768&&t(12,i=!!(f!=null&&f.includes(".altcha.org"))&&!!(f!=null&&f.includes("apiKey=ckey_"))),r.$$.dirty[0]&1073741824&&(o=G?We(G):void 0),r.$$.dirty[1]&1&&t(35,l=h?We(h):{}),r.$$.dirty[1]&16&&t(11,c={ariaLinkLabel:He,error:"Verification failed. Try again later.",expired:"Verification expired. Try again.",footer:`Protected by <a href="${Pe}" target="_blank" aria-label="${l.ariaLinkLabel||He}">ALTCHA</a>`,label:"I'm not a robot",verified:"Verified",verifying:"Verifying...",waitAlert:"Verifying... please wait.",...l}),r.$$.dirty[0]&96&&Re("statechange",{payload:te,state:$}),r.$$.dirty[0]&64&&er()},[a,k,q,W,V,te,$,J,C,ee,Ie,c,i,Qt,lt,f,N,X,F,K,S,E,I,z,y,v,Q,ue,be,d,G,h,at,ye,re,l,or,lr,sr]}class Ye extends Zt{constructor(e){super(),jt(this,e,Yt,Pt,ht,{auto:0,blockspam:29,challengeurl:15,challengejson:30,debug:16,delay:17,expire:18,floating:1,floatinganchor:19,floatingoffset:20,hidefooter:2,hidelogo:3,name:4,maxnumber:21,mockerror:22,refetchonexpire:23,spamfilter:24,strings:31,test:25,verifyurl:26,workers:27,workerurl:28,configure:32,reset:33,verify:34},Ut,[-1,-1,-1])}get auto(){return this.$$.ctx[0]}set auto(e){this.$$set({auto:e}),w()}get blockspam(){return this.$$.ctx[29]}set blockspam(e){this.$$set({blockspam:e}),w()}get challengeurl(){return this.$$.ctx[15]}set challengeurl(e){this.$$set({challengeurl:e}),w()}get challengejson(){return this.$$.ctx[30]}set challengejson(e){this.$$set({challengejson:e}),w()}get debug(){return this.$$.ctx[16]}set debug(e){this.$$set({debug:e}),w()}get delay(){return this.$$.ctx[17]}set delay(e){this.$$set({delay:e}),w()}get expire(){return this.$$.ctx[18]}set expire(e){this.$$set({expire:e}),w()}get floating(){return this.$$.ctx[1]}set floating(e){this.$$set({floating:e}),w()}get floatinganchor(){return this.$$.ctx[19]}set floatinganchor(e){this.$$set({floatinganchor:e}),w()}get floatingoffset(){return this.$$.ctx[20]}set floatingoffset(e){this.$$set({floatingoffset:e}),w()}get hidefooter(){return this.$$.ctx[2]}set hidefooter(e){this.$$set({hidefooter:e}),w()}get hidelogo(){return this.$$.ctx[3]}set hidelogo(e){this.$$set({hidelogo:e}),w()}get name(){return this.$$.ctx[4]}set name(e){this.$$set({name:e}),w()}get maxnumber(){return this.$$.ctx[21]}set maxnumber(e){this.$$set({maxnumber:e}),w()}get mockerror(){return this.$$.ctx[22]}set mockerror(e){this.$$set({mockerror:e}),w()}get refetchonexpire(){return this.$$.ctx[23]}set refetchonexpire(e){this.$$set({refetchonexpire:e}),w()}get spamfilter(){return this.$$.ctx[24]}set spamfilter(e){this.$$set({spamfilter:e}),w()}get strings(){return this.$$.ctx[31]}set strings(e){this.$$set({strings:e}),w()}get test(){return this.$$.ctx[25]}set test(e){this.$$set({test:e}),w()}get verifyurl(){return this.$$.ctx[26]}set verifyurl(e){this.$$set({verifyurl:e}),w()}get workers(){return this.$$.ctx[27]}set workers(e){this.$$set({workers:e}),w()}get workerurl(){return this.$$.ctx[28]}set workerurl(e){this.$$set({workerurl:e}),w()}get configure(){return this.$$.ctx[32]}get reset(){return this.$$.ctx[33]}get verify(){return this.$$.ctx[34]}}customElements.define("altcha-widget",Tt(Ye,{auto:{},blockspam:{},challengeurl:{},challengejson:{},debug:{type:"Boolean"},delay:{},expire:{},floating:{},floatinganchor:{},floatingoffset:{},hidefooter:{type:"Boolean"},hidelogo:{type:"Boolean"},name:{},maxnumber:{},mockerror:{type:"Boolean"},refetchonexpire:{type:"Boolean"},spamfilter:{type:"Boolean"},strings:{},test:{type:"Boolean"},verifyurl:{},workers:{},workerurl:{}},[],["configure","reset","verify"],!1)),globalThis.createAltchaWorker=r=>r?new Worker(new URL(r)):new dt,U.Altcha=Ye,Object.defineProperty(U,Symbol.toStringTag,{value:"Module"})});
@@ -3,9 +3,60 @@ export {};
3
3
  declare module 'altcha';
4
4
 
5
5
  declare global {
6
+ type AltchaState = 'error' | 'expired' | 'verified' | 'verifying' | 'unverified';
7
+
8
+ interface AltchaStateChangeEvent extends CustomEvent<{
9
+ payload?: string;
10
+ state: AltchaState;
11
+ }> {}
12
+
13
+ interface AltchaVerifiedEvent extends CustomEvent<{
14
+ payload: string;
15
+ }> {}
16
+
17
+ interface AltchaServerVerificationEvent extends CustomEvent<Record<string, unknown>> {}
18
+
19
+ interface AltchaWidget {
20
+ auto?: 'onfocus' | 'onload' | 'onsubmit';
21
+ blockspam?: boolean;
22
+ challengeurl?: string;
23
+ challengejson?: string;
24
+ debug?: boolean;
25
+ delay?: number;
26
+ expire?: number;
27
+ floating?: 'auto' | 'top' | 'bottom' | 'false' | '' | boolean;
28
+ floatinganchor?: string;
29
+ floatingoffset?: number;
30
+ hidefooter?: boolean;
31
+ hidelogo?: boolean;
32
+ name?: string;
33
+ maxnumber?: number;
34
+ mockerror?: boolean;
35
+ refetchonexpire?: boolean;
36
+ spamfilter?: boolean | 'ipAddress';
37
+ strings?: string;
38
+ test?: boolean | number;
39
+ verifyurl?: string;
40
+ workers?: number;
41
+ workerurl?: string;
42
+ }
43
+
44
+ declare namespace svelteHTML {
45
+ interface IntrinsicElements {
46
+ 'altcha-widget': AltchaWidgetSvelte;
47
+ }
48
+
49
+ interface AltchaWidgetSvelte extends AltchaWidget {
50
+ 'on:statechange'?: (event: AltchaStateChangeEvent) => void;
51
+ 'on:serververification'?: (event: AltchaServerVerificationEvent) => void;
52
+ 'on:verified'?: (event: AltchaVerifiedEvent) => void;
53
+ style?: string;
54
+ }
55
+ }
56
+
6
57
  namespace JSX {
7
58
  interface IntrinsicElements {
8
- 'altcha-widget': AltchaWidget;
59
+ 'altcha-widget': AltchaWidgetReact;
9
60
  }
10
61
 
11
62
  interface AltchaWidgetCSSProperties extends React.CSSProperties {
@@ -20,31 +71,9 @@ declare global {
20
71
  '--altcha-max-width'?: string;
21
72
  }
22
73
 
23
- interface AltchaWidget extends React.HTMLAttributes<HTMLElement> {
24
- auto?: 'onfocus' | 'onload' | 'onsubmit';
25
- blockspam?: boolean;
26
- challengeurl?: string;
27
- challengejson?: string;
28
- debug?: boolean;
29
- delay?: number;
30
- expire?: number;
31
- floating?: 'auto' | 'top' | 'bottom' | 'false' | '' | boolean;
32
- floatinganchor?: string;
33
- floatingoffset?: number;
34
- hidefooter?: boolean;
35
- hidelogo?: boolean;
36
- name?: string;
37
- maxnumber?: number;
38
- mockerror?: boolean;
74
+ interface AltchaWidgetReact extends AltchaWidget extends React.HTMLAttributes<HTMLElement> {
39
75
  ref?: React.RefObject<HTMLElement>;
40
- refetchonexpire?: boolean;
41
- spamfilter?: boolean | 'ipAddress';
42
- strings?: string;
43
76
  style?: AltchaWidgetCSSProperties;
44
- test?: boolean | number;
45
- verifyurl?: string;
46
- workers?: number;
47
- workerurl?: string;
48
77
  }
49
78
  }
50
79
  }