@masonitestudios/spartanauth-widgets 1.0.0 → 1.0.2

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,4 +1,4 @@
1
- (function(Ke){typeof define=="function"&&define.amd?define(Ke):Ke()})(function(){"use strict";const ze={equals:(e,t)=>e===t};let ut=lt;const Ae=1,Ne=2,it={owned:null,cleanups:null,context:null,owner:null};var te=null;let Ge=null,Rt=null,V=null,Q=null,pe=null,Me=0;function qt(e,t){const n=V,r=te,s=e.length===0,u=t===void 0?r:t,a=s?it:{owned:null,cleanups:null,context:u?u.context:null,owner:u},o=s?e:()=>e(()=>je(()=>Oe(a)));te=a,V=null;try{return Te(o,!0)}finally{V=n,te=r}}function F(e,t){t=t?Object.assign({},ze,t):ze;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=s=>(typeof s=="function"&&(s=s(n.value)),ot(n,s));return[at.bind(n),r]}function x(e,t,n){const r=We(e,t,!1,Ae);Se(r)}function Lt(e,t,n){ut=Vt;const r=We(e,t,!1,Ae);r.user=!0,pe?pe.push(r):Se(r)}function m(e,t,n){n=n?Object.assign({},ze,n):ze;const r=We(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Se(r),at.bind(r)}function je(e){if(V===null)return e();const t=V;V=null;try{return e()}finally{V=t}}function He(e){Lt(()=>je(e))}function at(){if(this.sources&&this.state)if(this.state===Ae)Se(this);else{const e=Q;Q=null,Te(()=>qe(this),!1),Q=e}if(V){const e=this.observers?this.observers.length:0;V.sources?(V.sources.push(this),V.sourceSlots.push(e)):(V.sources=[this],V.sourceSlots=[e]),this.observers?(this.observers.push(V),this.observerSlots.push(V.sources.length-1)):(this.observers=[V],this.observerSlots=[V.sources.length-1])}return this.value}function ot(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&Te(()=>{for(let s=0;s<e.observers.length;s+=1){const u=e.observers[s],a=Ge&&Ge.running;a&&Ge.disposed.has(u),(a?!u.tState:!u.state)&&(u.pure?Q.push(u):pe.push(u),u.observers&&ct(u)),a||(u.state=Ae)}if(Q.length>1e6)throw Q=[],new Error},!1)),t}function Se(e){if(!e.fn)return;Oe(e);const t=Me;Ut(e,e.value,t)}function Ut(e,t,n){let r;const s=te,u=V;V=te=e;try{r=e.fn(t)}catch(a){return e.pure&&(e.state=Ae,e.owned&&e.owned.forEach(Oe),e.owned=null),e.updatedAt=n+1,dt(a)}finally{V=u,te=s}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?ot(e,r):e.value=r,e.updatedAt=n)}function We(e,t,n,r=Ae,s){const u={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:te,context:te?te.context:null,pure:n};return te===null||te!==it&&(te.owned?te.owned.push(u):te.owned=[u]),u}function Re(e){if(e.state===0)return;if(e.state===Ne)return qe(e);if(e.suspense&&je(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Me);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===Ae)Se(e);else if(e.state===Ne){const r=Q;Q=null,Te(()=>qe(e,t[0]),!1),Q=r}}function Te(e,t){if(Q)return e();let n=!1;t||(Q=[]),pe?n=!0:pe=[],Me++;try{const r=e();return Jt(n),r}catch(r){n||(pe=null),Q=null,dt(r)}}function Jt(e){if(Q&&(lt(Q),Q=null),e)return;const t=pe;pe=null,t.length&&Te(()=>ut(t),!1)}function lt(e){for(let t=0;t<e.length;t++)Re(e[t])}function Vt(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:Re(r)}for(t=0;t<n;t++)Re(e[t])}function qe(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const r=e.sources[n];if(r.sources){const s=r.state;s===Ae?r!==t&&(!r.updatedAt||r.updatedAt<Me)&&Re(r):s===Ne&&qe(r,t)}}}function ct(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=Ne,n.pure?Q.push(n):pe.push(n),n.observers&&ct(n))}}function Oe(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),r=e.sourceSlots.pop(),s=n.observers;if(s&&s.length){const u=s.pop(),a=n.observerSlots.pop();r<s.length&&(u.sourceSlots[a]=r,s[r]=u,n.observerSlots[r]=a)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)Oe(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)Oe(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function Kt(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function dt(e,t=te){throw Kt(e)}function Gt(e,t,n){let r=n.length,s=t.length,u=r,a=0,o=0,A=t[s-1].nextSibling,$=null;for(;a<s||o<u;){if(t[a]===n[o]){a++,o++;continue}for(;t[s-1]===n[u-1];)s--,u--;if(s===a){const h=u<r?o?n[o-1].nextSibling:n[u-o]:A;for(;o<u;)e.insertBefore(n[o++],h)}else if(u===o)for(;a<s;)(!$||!$.has(t[a]))&&t[a].remove(),a++;else if(t[a]===n[u-1]&&n[o]===t[s-1]){const h=t[--s].nextSibling;e.insertBefore(n[o++],t[a++].nextSibling),e.insertBefore(n[--u],h),t[s]=n[u]}else{if(!$){$=new Map;let _=o;for(;_<u;)$.set(n[_],_++)}const h=$.get(t[a]);if(h!=null)if(o<h&&h<u){let _=a,ne=1,ue;for(;++_<s&&_<u&&!((ue=$.get(t[_]))==null||ue!==h+ne);)ne++;if(ne>h-o){const De=t[a];for(;o<h;)e.insertBefore(n[o++],De)}else e.replaceChild(n[o++],t[a++])}else a++;else t[a++].remove()}}}const ft="_$DX_DELEGATE";function y(e,t,n,r){let s;const u=()=>{const o=document.createElement("template");return o.innerHTML=e,o.content.firstChild},a=()=>(s||(s=u())).cloneNode(!0);return a.cloneNode=a,a}function Ze(e,t=window.document){const n=t[ft]||(t[ft]=new Set);for(let r=0,s=e.length;r<s;r++){const u=e[r];n.has(u)||(n.add(u),t.addEventListener(u,Ht))}}function oe(e,t,n){n==null?e.removeAttribute(t):e.setAttribute(t,n)}function ht(e,t,n){return je(()=>e(t,n))}function d(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return Le(e,t,r,n);x(s=>Le(e,t(),s,n),r)}function Ht(e){let t=e.target;const n=`$$${e.type}`,r=e.target,s=e.currentTarget,u=A=>Object.defineProperty(e,"target",{configurable:!0,value:A}),a=()=>{const A=t[n];if(A&&!t.disabled){const $=t[`${n}Data`];if($!==void 0?A.call(t,$,e):A.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&u(t.host),!0},o=()=>{for(;a()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),e.composedPath){const A=e.composedPath();u(A[0]);for(let $=0;$<A.length-2&&(t=A[$],!!a());$++){if(t._$host){t=t._$host,o();break}if(t.parentNode===s)break}}else o();u(r)}function Le(e,t,n,r,s){for(;typeof n=="function";)n=n();if(t===n)return n;const u=typeof t,a=r!==void 0;if(e=a&&n[0]&&n[0].parentNode||e,u==="string"||u==="number"){if(u==="number"&&(t=t.toString(),t===n))return n;if(a){let o=n[0];o&&o.nodeType===3?o.data!==t&&(o.data=t):o=document.createTextNode(t),n=ye(e,n,r,o)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||u==="boolean")n=ye(e,n,r);else{if(u==="function")return x(()=>{let o=t();for(;typeof o=="function";)o=o();n=Le(e,o,n,r)}),()=>n;if(Array.isArray(t)){const o=[],A=n&&Array.isArray(n);if(Ye(o,t,n,s))return x(()=>n=Le(e,o,n,r,!0)),()=>n;if(o.length===0){if(n=ye(e,n,r),a)return n}else A?n.length===0?pt(e,o,r):Gt(e,n,o):(n&&ye(e),pt(e,o));n=o}else if(t.nodeType){if(Array.isArray(n)){if(a)return n=ye(e,n,r,t);ye(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function Ye(e,t,n,r){let s=!1;for(let u=0,a=t.length;u<a;u++){let o=t[u],A=n&&n[e.length],$;if(!(o==null||o===!0||o===!1))if(($=typeof o)=="object"&&o.nodeType)e.push(o);else if(Array.isArray(o))s=Ye(e,o,A)||s;else if($==="function")if(r){for(;typeof o=="function";)o=o();s=Ye(e,Array.isArray(o)?o:[o],Array.isArray(A)?A:[A])||s}else e.push(o),s=!0;else{const h=String(o);A&&A.nodeType===3&&A.data===h?e.push(A):e.push(document.createTextNode(h))}}return s}function pt(e,t,n=null){for(let r=0,s=t.length;r<s;r++)e.insertBefore(t[r],n)}function ye(e,t,n,r){if(n===void 0)return e.textContent="";const s=r||document.createTextNode("");if(t.length){let u=!1;for(let a=t.length-1;a>=0;a--){const o=t[a];if(s!==o){const A=o.parentNode===e;!u&&!a?A?e.replaceChild(s,o):e.insertBefore(s,n):A&&o.remove()}else u=!0}}else e.insertBefore(s,n);return[s]}function Wt(e){return Object.keys(e).reduce((n,r)=>{const s=e[r];return n[r]=Object.assign({},s),mt(s.value)&&!en(s.value)&&!Array.isArray(s.value)&&(n[r].value=Object.assign({},s.value)),Array.isArray(s.value)&&(n[r].value=s.value.slice(0)),n},{})}function Zt(e){return e?Object.keys(e).reduce((n,r)=>{const s=e[r];return n[r]=mt(s)&&"value"in s?s:{value:s},n[r].attribute||(n[r].attribute=Qt(r)),n[r].parse="parse"in n[r]?n[r].parse:typeof n[r].value!="string",n},{}):{}}function Yt(e){return Object.keys(e).reduce((n,r)=>(n[r]=e[r].value,n),{})}function Xt(e,t){const n=Wt(t);return Object.keys(t).forEach(s=>{const u=n[s],a=e.getAttribute(u.attribute),o=e[s];a!=null&&(u.value=u.parse?Dt(a):a),o!=null&&(u.value=Array.isArray(o)?o.slice(0):o),u.reflect&&gt(e,u.attribute,u.value,!!u.parse),Object.defineProperty(e,s,{get(){return u.value},set(A){const $=u.value;u.value=A,u.reflect&&gt(this,u.attribute,u.value,!!u.parse);for(let h=0,_=this.__propertyChangedCallbacks.length;h<_;h++)this.__propertyChangedCallbacks[h](s,A,$)},enumerable:!0,configurable:!0})}),n}function Dt(e){if(e)try{return JSON.parse(e)}catch{return e}}function gt(e,t,n,r){if(n==null||n===!1)return e.removeAttribute(t);let s=r?JSON.stringify(n):n;e.__updating[t]=!0,s==="true"&&(s=""),e.setAttribute(t,s),Promise.resolve().then(()=>delete e.__updating[t])}function Qt(e){return e.replace(/\.?([A-Z]+)/g,(t,n)=>"-"+n.toLowerCase()).replace("_","-").replace(/^-/,"")}function mt(e){return e!=null&&(typeof e=="object"||typeof e=="function")}function en(e){return Object.prototype.toString.call(e)==="[object Function]"}function tn(e){return typeof e=="function"&&e.toString().indexOf("class")===0}let Xe;function nn(e,t){const n=Object.keys(t);return class extends e{static get observedAttributes(){return n.map(s=>t[s].attribute)}constructor(){super(),this.__initialized=!1,this.__released=!1,this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props={}}connectedCallback(){if(this.__initialized)return;this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props=Xt(this,t);const s=Yt(this.props),u=this.Component,a=Xe;try{Xe=this,this.__initialized=!0,tn(u)?new u(s,{element:this}):u(s,{element:this})}finally{Xe=a}}async disconnectedCallback(){if(await Promise.resolve(),this.isConnected)return;this.__propertyChangedCallbacks.length=0;let s=null;for(;s=this.__releaseCallbacks.pop();)s(this);delete this.__initialized,this.__released=!0}attributeChangedCallback(s,u,a){if(this.__initialized&&!this.__updating[s]&&(s=this.lookupProp(s),s in t)){if(a==null&&!this[s])return;this[s]=t[s].parse?Dt(a):a}}lookupProp(s){if(t)return n.find(u=>s===u||s===t[u].attribute)}get renderRoot(){return this.shadowRoot||this.attachShadow({mode:"open"})}addReleaseCallback(s){this.__releaseCallbacks.push(s)}addPropertyChangedCallback(s){this.__propertyChangedCallbacks.push(s)}}}function rn(e,t={},n={}){const{BaseElement:r=HTMLElement,extension:s,customElements:u=window.customElements}=n;return a=>{if(!e)throw new Error("tag is required to register a Component");let o=u.get(e);return o?(o.prototype.Component=a,o):(o=nn(r,Zt(t)),o.prototype.Component=a,o.prototype.registeredTag=e,u.define(e,o,s),o)}}function sn(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const[s,u]=F(e[t[r]]);Object.defineProperty(n,t[r],{get:s,set(a){u(()=>a)}})}return n}function un(e){if(e.assignedSlot&&e.assignedSlot._$owner)return e.assignedSlot._$owner;let t=e.parentNode;for(;t&&!t._$owner&&!(t.assignedSlot&&t.assignedSlot._$owner);)t=t.parentNode;return t&&t.assignedSlot?t.assignedSlot._$owner:e._$owner}function an(e){return(t,n)=>{const{element:r}=n;return qt(s=>{const u=sn(t);r.addPropertyChangedCallback((o,A)=>u[o]=A),r.addReleaseCallback(()=>{r.renderRoot.textContent="",s()});const a=e(u,n);return d(r.renderRoot,a)},un(r))}}function Qe(e,t,n){return arguments.length===2&&(n=t,t={}),rn(e,t)(an(n))}var on="٠١٢٣٤٥٦٧٨٩",ln="۰۱۲۳۴۵۶۷۸۹",cn="൦൧൨൩൪൫൬൭൮൯",dn="೦೧೨೩೪೫೬೭೮೯",fn="໐໑໒໓໔໕໖໗໘໙",hn="୦୧୨୩୪୫୬୭୮୯",pn="០១២៣៤៥៦៧៨៩",Dn="߀߁߂߃߄߅߆߇߈߉",gn="੦੧੨੩੪੫੬੭੮੯",mn="૦૧૨૩૪૫૬૭૮૯",bn="०१२३४५६७८९",Cn="၀၁၂၃၄၅၆၇၈၉",vn="௦௧௨௩௪௫௬௭௮௯",An="౦౧౨౩౪౫౬౭౮౯",wn="๐๑๒๓๔๕๖๗๘๙",En="༠༡༢༣༤༥༦༧༨༩",bt={ar:on,fa:ln,ml:cn,kn:dn,lo:fn,or:hn,kh:pn,nqo:Dn,pa:gn,gu:mn,hi:bn,my:Cn,ta:vn,te:An,th:wn,bo:En},Fn=["ru"],yn=["id"],$n=["id"],Bn=["ady-cyrl"],kn=["aeb-arab"],xn=["sq"],_n=["ru"],Sn=["zh-hant"],Tn=["es"],On=["hi"],In=["es"],Pn=["ar"],zn=["ar"],Nn=["ar"],Mn=["es"],jn=["fr"],Rn=["ru"],qn=["fr","es","ru"],Ln=["hi"],Un=["es"],Jn=["fa"],Vn=["ru"],Kn=["id"],Gn=["de"],Hn=["bbc-latn"],Wn=["fa"],Zn=["fa"],Yn=["bho"],Xn=["en"],Qn=["id"],er=["fr"],tr=["bn"],nr=["fa"],rr=["fr"],sr=["id"],ur=["id"],ir=["ru"],ar=["oc"],or=["nan","zh-hant"],lr=["ru"],cr=["it"],dr=["crh-latn"],fr=["sk"],hr=["pl"],pr=["ru"],Dr=["hsb","de"],gr=["ms"],mr=["ne"],br=["it"],Cr=["it"],vr=["es"],Ar=["fr"],wr=["fi"],Er=["fr"],Fr=["fr"],yr=["de"],$r=["it"],Br=["tr"],kr=["gan-hant","zh-hant","zh-hans"],xr=["fr"],_r=["pt"],Sr=["fa"],Tr=["es"],Or=["gom-deva"],Ir=["id"],Pr=["de"],zr=["es"],Nr=["zh-hant"],Mr=["hif-latn"],jr=["de"],Rr=["dsb","de"],qr=["fr"],Lr=["hy"],Ur=["zh-cn","zh-hans"],Jr=["ru"],Vr=["eo"],Kr=["ike-cans"],Gr=["en"],Hr=["da"],Wr=["id"],Zr=["kk-latn","kk-cyrl"],Yr=["fr"],Xr=["kbd-cyrl"],Qr=["fr"],es=["ur"],ts=["tr"],ns=["my"],rs=["kk-cyrl"],ss=["da"],us=["ru"],is=["ru"],as=["fi"],os=["ks-arab"],ls=["de"],cs=["ku-latn"],ds=["ru"],fs=["ru"],hs=["es"],ps=["de"],Ds=["ru"],gs=["ru","az"],ms=["nl"],bs=["it"],Cs=["et"],vs=["fa"],As=["it","rm","fur"],ws=["pms","eml","lij","vec","it"],Es=["fr"],Fs=["fa"],ys=["lv"],$s=["fa"],Bs=["zh-hant"],ks=["tr"],xs=["id"],_s=["hi"],Ss=["myv","ru"],Ts=["fr"],Os=["mrj","ru"],Is=["id"],Ps=["my"],zs=["ro"],Ns=["mhr","ru"],Ms=["pt"],js=["mdf","ru"],Rs=["fa"],qs=["es"],Ls=["cdo","zh-hant"],Us=["it"],Js=["nn"],Vs=["de"],Ks=["id"],Gs=["nb"],Hs=["fr"],Ws=["ca","fr"],Zs=["fi"],Ys=["ru"],Xs=["fr"],Qs=["de"],eu=["de"],tu=["de"],nu=["en"],ru=["it"],su=["el"],uu=["pt-br"],iu=["qug","es"],au=["qu","es"],ou=["it"],lu=["ro"],cu=["uk","ru"],du=["ro"],fu=["ruq-latn","ro"],hu=["hi"],pu=["ru"],Du=["it"],gu=["en"],mu=["it"],bu=["cbk","fa"],Cu=["fr"],vu=["fr"],Au=["lt"],wu=["bs","sr-el","hr"],Eu=["fr"],Fu=["shy-latn"],yu=["cs"],$u=["skr-arab"],Bu=["de"],ku=["fi"],xu=["sr-ec"],_u=["nl"],Su=["de"],Tu=["ru"],Ou=["id"],Iu=["pl"],Pu=["zh-tw","zh-hant","zh-hans"],zu=["zh-tw","zh-hant","zh-hans"],Nu=["kn"],Mu=["pt"],ju=["tg-cyrl"],Ru=["zh-tw","zh-hant","zh-hans"],qu=["tt-cyrl","ru"],Lu=["fr"],Uu=["ru"],Ju=["ru"],Vu=["ug-arab"],Ku=["it"],Gu=["et"],Hu=["nl"],Wu=["de"],Zu=["fi"],Yu=["et"],Xu=["fr"],Qu=["fr"],ei=["zh-hans"],ti=["ru"],ni=["ka"],ri=["he"],si=["zh-hans"],ui=["nl"],ii=["kab"],ai=["zh-hans"],Ct={ab:Fn,abs:yn,ace:$n,ady:Bn,aeb:kn,"aeb-arab":["ar"],aln:xn,alt:_n,ami:Sn,an:Tn,anp:On,arn:In,arq:Pn,ary:zn,arz:Nn,ast:Mn,atj:jn,av:Rn,avk:qn,awa:Ln,ay:Un,azb:Jn,ba:Vn,ban:Kn,"ban-bali":["ban"],bar:Gn,bbc:Hn,"bbc-latn":["id"],bcc:Wn,"be-tarask":["be"],bgn:Zn,bh:Yn,bi:Xn,bjn:Qn,bm:er,bpy:tr,bqi:nr,br:rr,btm:sr,bug:ur,bxr:ir,ca:ar,"cbk-zam":["es"],cdo:or,ce:lr,co:cr,crh:dr,"crh-cyrl":["ru"],cs:fr,csb:hr,cv:pr,"de-at":["de"],"de-ch":["de"],"de-formal":["de"],dsb:Dr,dtp:gr,dty:mr,egl:br,eml:Cr,"en-ca":["en"],"en-gb":["en"],"es-419":["es"],"es-formal":["es"],ext:vr,ff:Ar,fit:wr,frc:Er,frp:Fr,frr:yr,fur:$r,gag:Br,gan:kr,"gan-hans":["zh-hans"],"gan-hant":["zh-hant","zh-hans"],gcr:xr,gl:_r,glk:Sr,gn:Tr,gom:Or,"gom-deva":["hi"],gor:Ir,gsw:Pr,guc:zr,hak:Nr,hif:Mr,hrx:jr,hsb:Rr,ht:qr,"hu-formal":["hu"],hyw:Lr,ii:Ur,inh:Jr,io:Vr,iu:Kr,jam:Gr,jut:Hr,jv:Wr,kaa:Zr,kab:Yr,kbd:Xr,kbp:Qr,khw:es,kiu:ts,kjp:ns,kk:rs,"kk-arab":["kk-cyrl"],"kk-cn":["kk-arab","kk-cyrl"],"kk-kz":["kk-cyrl"],"kk-latn":["kk-cyrl"],"kk-tr":["kk-latn","kk-cyrl"],kl:ss,"ko-kp":["ko"],koi:us,krc:is,krl:as,ks:os,ksh:ls,ku:cs,"ku-arab":["ckb"],kum:ds,kv:fs,lad:hs,lb:ps,lbe:Ds,lez:gs,li:ms,lij:bs,liv:Cs,lki:vs,lld:As,lmo:ws,ln:Es,lrc:Fs,ltg:ys,luz:$s,lzh:Bs,lzz:ks,mad:xs,mai:_s,"map-bms":["jv","id"],mdf:Ss,mg:Ts,mhr:Os,min:Is,mnw:Ps,mo:zs,mrj:Ns,"ms-arab":["ms"],mwl:Ms,myv:js,mzn:Rs,nah:qs,nan:Ls,nap:Us,nb:Js,nds:Vs,"nds-nl":["nl"],nia:Ks,"nl-informal":["nl"],nn:Gs,nrm:Hs,oc:Ws,olo:Zs,os:Ys,pcd:Xs,pdc:Qs,pdt:eu,pfl:tu,pih:nu,pms:ru,pnt:su,pt:uu,"pt-br":["pt"],qu:iu,qug:au,rgn:ou,rmy:lu,"roa-tara":["it"],rue:cu,rup:du,ruq:fu,"ruq-cyrl":["mk"],"ruq-latn":["ro"],sa:hu,sah:pu,scn:Du,sco:gu,sdc:mu,sdh:bu,ses:Cu,sg:vu,sgs:Au,sh:wu,shi:Eu,shy:Fu,"shy-latn":["fr"],sk:yu,skr:$u,"skr-arab":["ur","pnb"],sli:Bu,smn:ku,sr:xu,srn:_u,stq:Su,sty:Tu,su:Ou,szl:Iu,szy:Pu,tay:zu,tcy:Nu,tet:Mu,tg:ju,trv:Ru,tt:qu,"tt-cyrl":["ru"],ty:Lu,tyv:Uu,udm:Ju,ug:Vu,vec:Ku,vep:Gu,vls:Hu,vmf:Wu,vot:Zu,vro:Yu,wa:Xu,wo:Qu,wuu:ei,xal:ti,xmf:ni,yi:ri,za:si,zea:ui,zgh:ii,zh:ai,"zh-cn":["zh-hans"],"zh-hant":["zh-hans"],"zh-hk":["zh-hant","zh-hans"],"zh-mo":["zh-hk","zh-hant","zh-hans"],"zh-my":["zh-sg","zh-hans"],"zh-sg":["zh-hans"],"zh-tw":["zh-hant","zh-hans"]};let se=class{constructor(e){this.locale=e}convertPlural(e,t){const n=/\d+=/i;if(!t||t.length===0)return"";for(let s=0;s<t.length;s++){const u=t[s];if(n.test(u)){if(parseInt(u.slice(0,u.indexOf("=")),10)===e)return u.slice(u.indexOf("=")+1);t[s]=void 0}}t=t.filter(s=>!!s);let r=this.getPluralForm(e,this.locale);return r=Math.min(r,t.length-1),t[r]}getPluralForm(e,t){const n=["zero","one","two","few","many","other"],r=new Intl.PluralRules(t),s=r.resolvedOptions().pluralCategories,u=r.select(e);return n.filter(a=>s.includes(a)).indexOf(u)}convertNumber(e,t=!1){let n=this.digitTransformTable(this.locale),r="";if(t){if(parseFloat(e,10)===e||!n)return e;const s=[];for(const a in n)s[n[a]]=a;n=s;const u=String(e);for(let a=0;a<u.length;a++)r+=n[u[a]]||u[a];return parseFloat(r,10)}if(Intl.NumberFormat){let s;const u=[...Ct[this.locale]||[],"en"];return Intl.NumberFormat.supportedLocalesOf(this.locale).length?s=[this.locale]:s=u,r=new Intl.NumberFormat(s).format(e),r==="NaN"&&(r=e),r}}convertGrammar(e){return e}gender(e,t){if(!t||t.length===0)return"";for(;t.length<2;)t.push(t[t.length-1]);return e==="male"?t[0]:e==="female"?t[1]:t.length===3?t[2]:t[0]}digitTransformTable(e){return bt[e]?bt[e].split(""):!1}},oi=class extends se{convertGrammar(e,t){switch(t){case"prefixed":case"תחילית":e.slice(0,1)==="ו"&&e.slice(0,2)!=="וו"&&(e="ו"+e),e.slice(0,1)==="ה"&&(e=e.slice(1)),(e.slice(0,1)<"א"||e.slice(0,1)>"ת")&&(e="־"+e)}return e}},li=class extends se{convertGrammar(t,n){switch(n){case"instrumental":t="s "+t;break;case"lokativ":t="o "+t;break}return t}},ci=class extends se{convertGrammar(e,t){switch(t){case"instrumental":e="z "+e;break;case"lokatiw":e="wo "+e;break}return e}},di=class extends se{convertGrammar(e,t){switch(t){case"instrumental":e="z "+e;break;case"lokatiw":e="wo "+e;break}return e}},fi=class extends se{convertGrammar(e,t){let n=e.match(/[aou][^äöy]*$/i);const r=e;switch(e.match(/wiki$/i)&&(n=!1),e.match(/[bcdfghjklmnpqrstvwxz]$/i)&&(e+="i"),t){case"genitive":e+="n";break;case"elative":e+=n?"sta":"stä";break;case"partitive":e+=n?"a":"ä";break;case"illative":e+=e.slice(-1)+"n";break;case"inessive":e+=n?"ssa":"ssä";break;default:e=r;break}return e}},hi=class extends se{convertGrammar(e,t){return t==="genitive"&&(e.slice(-1)==="ь"?e=e.slice(0,-1)+"я":e.slice(-2)==="ия"?e=e.slice(0,-2)+"ии":e.slice(-2)==="ка"?e=e.slice(0,-2)+"ки":e.slice(-2)==="ти"?e=e.slice(0,-2)+"тей":e.slice(-2)==="ды"?e=e.slice(0,-2)+"дов":e.slice(-3)==="ник"&&(e=e.slice(0,-3)+"ника")),e}};class pi extends se{convertGrammar(t,n){switch(n){case"mestnik":t="o "+t;break;case"orodnik":t="z "+t;break}return t}}let Di=class extends se{convertGrammar(e,t){switch(t){case"genitive":e=e.replace(/u[ms]$/i,"i"),e=e.replace(/ommunia$/i,"ommunium"),e=e.replace(/a$/i,"ae"),e=e.replace(/libri$/i,"librorum"),e=e.replace(/nuntii$/i,"nuntiorum"),e=e.replace(/tio$/i,"tionis"),e=e.replace(/ns$/i,"ntis"),e=e.replace(/as$/i,"atis"),e=e.replace(/es$/i,"ei");break;case"accusative":e=e.replace(/u[ms]$/i,"um"),e=e.replace(/ommunia$/i,"am"),e=e.replace(/a$/i,"ommunia"),e=e.replace(/libri$/i,"libros"),e=e.replace(/nuntii$/i,"nuntios"),e=e.replace(/tio$/i,"tionem"),e=e.replace(/ns$/i,"ntem"),e=e.replace(/as$/i,"atem"),e=e.replace(/es$/i,"em");break;case"ablative":e=e.replace(/u[ms]$/i,"o"),e=e.replace(/ommunia$/i,"ommunibus"),e=e.replace(/a$/i,"a"),e=e.replace(/libri$/i,"libris"),e=e.replace(/nuntii$/i,"nuntiis"),e=e.replace(/tio$/i,"tione"),e=e.replace(/ns$/i,"nte"),e=e.replace(/as$/i,"ate"),e=e.replace(/es$/i,"e");break}return e}};class gi extends se{convertGrammar(t,n){return n==="genitive"&&(t.slice(-1)==="ա"?t=t.slice(0,-1)+"այի":t.slice(-1)==="ո"?t=t.slice(0,-1)+"ոյի":t.slice(-4)==="գիրք"?t=t.slice(0,-4)+"գրքի":t=t+"ի"),t}}let mi=class extends se{convertGrammar(e,t){if(t==="ainmlae")switch(e){case"an Domhnach":e="Dé Domhnaigh";break;case"an Luan":e="Dé Luain";break;case"an Mháirt":e="Dé Mháirt";break;case"an Chéadaoin":e="Dé Chéadaoin";break;case"an Déardaoin":e="Déardaoin";break;case"an Aoine":e="Dé hAoine";break;case"an Satharn":e="Dé Sathairn";break}return e}},bi=class extends se{convertGrammar(e,t){switch(t){case"rol":e+="ról";break;case"ba":e+="ba";break;case"k":e+="k";break}return e}},Ci=class extends se{convertGrammar(e,t){let n,r,s,u;switch(n="мæ",r="",s="",u="",e.match(/тæ$/i)?(e=e.slice(0,-1),n="æм"):e.match(/[аæеёиоыэюя]$/i)?r="й":e.match(/у$/i)?e.slice(-2,-1).match(/[аæеёиоыэюя]$/i)||(r="й"):e.match(/[бвгджзйклмнопрстфхцчшщьъ]$/i)||(s="-"),t){case"genitive":u=s+r+"ы";break;case"dative":u=s+r+"æн";break;case"allative":u=s+n;break;case"ablative":r==="й"?u=s+r+"æ":u=s+r+"æй";break;case"superessive":u=s+r+"ыл";break;case"equative":u=s+r+"ау";break;case"comitative":u=s+"имæ";break}return e+u}};class vi extends se{convertGrammar(t,n){switch(n){case"genitive":t.slice(-1)==="ь"?t=t.slice(0,-1)+"я":t.slice(-2)==="ія"?t=t.slice(0,-2)+"ії":t.slice(-2)==="ка"?t=t.slice(0,-2)+"ки":t.slice(-2)==="ти"?t=t.slice(0,-2)+"тей":t.slice(-2)==="ды"?t=t.slice(0,-2)+"дов":t.slice(-3)==="ник"&&(t=t.slice(0,-3)+"ника");break;case"accusative":t.slice(-2)==="ія"&&(t=t.slice(0,-2)+"ію");break}return t}}var vt={bs:li,default:se,dsb:ci,fi,ga:mi,he:oi,hsb:di,hu:bi,hy:gi,la:Di,os:Ci,ru:hi,sl:pi,uk:vi};const Ai=new RegExp("(?:([A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁːˑˠ-ˤˮͰ-ͳͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-҂Ҋ-ԯԱ-Ֆՙ-՟ա-և։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ঀংঃঅ-ঌএঐও-নপ-রলশ-হঽ-ীেৈোৌৎৗড়ঢ়য়-ৡ০-ৱ৴-৺ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਾ-ੀਖ਼-ੜਫ਼੦-੯ੲ-ੴઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽ-ીૉોૌૐૠૡ૦-૰ૹଂଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽାୀେୈୋୌୗଡ଼ଢ଼ୟ-ୡ୦-୷ஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹாிுூெ-ைொ-ௌௐௗ௦-௲ఁ-ఃఅ-ఌఎ-ఐఒ-నప-హఽు-ౄౘ-ౚౠౡ౦-౯౿ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೄೆ-ೈೊೋೕೖೞೠೡ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ീെ-ൈൊ-ൌൎൗൟ-ൡ൦-൵൹-ൿංඃඅ-ඖක-නඳ-රලව-ෆා-ෑෘ-ෟ෦-෯ෲ-෴ก-ะาำเ-ๆ๏-๛ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆ໐-໙ໜ-ໟༀ-༗༚-༴༶༸༾-ཇཉ-ཬཿ྅ྈ-ྌ྾-࿅࿇-࿌࿎-࿚က-ာေးျြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃႄႇ-ႌႎ-ႜ႞-ჅჇჍა-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፠-፼ᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙿᚁ-ᚚᚠ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱ᜵᜶ᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳាើ-ៅះៈ។-៚ៜ០-៩᠐-᠙ᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᤣ-ᤦᤩ-ᤫᤰᤱᤳ-ᤸ᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧚ᨀ-ᨖᨙᨚ᨞-ᩕᩗᩡᩣᩤᩭ-ᩲ᪀-᪉᪐-᪙᪠-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-ᭋ᭐-᭪᭴-᭼ᮂ-ᮡᮦᮧ᮪ᮮ-ᯥᯧᯪ-ᯬᯮ᯲᯳᯼-ᰫᰴᰵ᰻-᱉ᱍ-᱿᳀-᳇᳓᳡ᳩ-ᳬᳮ-ᳳᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵰ⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〮〯〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎ㆐-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㋾㌀-㍶㍻-㏝㏠-㏾㐀-䶵一-鿕ꀀ-ꒌꓐ-ꘌꘐ-ꘫꙀ-ꙮꚀ-ꚝꚠ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꞭꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꣽ꤀-ꤥ꤮-ꥆꥒ꥓꥟-ꥼꦃ-ꦲꦴꦵꦺꦻꦽ-꧍ꧏ-꧙꧞-ꧤꧦ-ꧾꨀ-ꨨꨯꨰꨳꨴꩀ-ꩂꩄ-ꩋꩍ꩐-꩙꩜-ꩻꩽ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫫꫮ-ꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭥꭰ-ꯤꯦꯧꯩ-꯬꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ-舘並-龎ff-stﬓ-ﬗA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]|\uD800[\uDC00-\uDC0B]|\uD800[\uDC0D-\uDC26]|\uD800[\uDC28-\uDC3A]|𐀼|𐀽|\uD800[\uDC3F-\uDC4D]|\uD800[\uDC50-\uDC5D]|\uD800[\uDC80-\uDCFA]|𐄀|𐄂|\uD800[\uDD07-\uDD33]|\uD800[\uDD37-\uDD3F]|\uD800[\uDDD0-\uDDFC]|\uD800[\uDE80-\uDE9C]|\uD800[\uDEA0-\uDED0]|\uD800[\uDF00-\uDF23]|\uD800[\uDF30-\uDF4A]|\uD800[\uDF50-\uDF75]|\uD800[\uDF80-\uDF9D]|\uD800[\uDF9F-\uDFC3]|\uD800[\uDFC8-\uDFD5]|\uD801[\uDC00-\uDC9D]|\uD801[\uDCA0-\uDCA9]|\uD801[\uDD00-\uDD27]|\uD801[\uDD30-\uDD63]|𐕯|\uD801[\uDE00-\uDF36]|\uD801[\uDF40-\uDF55]|\uD801[\uDF60-\uDF67]|𑀀|\uD804[\uDC02-\uDC37]|\uD804[\uDC47-\uDC4D]|\uD804[\uDC66-\uDC6F]|\uD804[\uDC82-\uDCB2]|𑂷|𑂸|\uD804[\uDCBB-\uDCC1]|\uD804[\uDCD0-\uDCE8]|\uD804[\uDCF0-\uDCF9]|\uD804[\uDD03-\uDD26]|𑄬|\uD804[\uDD36-\uDD43]|\uD804[\uDD50-\uDD72]|\uD804[\uDD74-\uDD76]|\uD804[\uDD82-\uDDB5]|\uD804[\uDDBF-\uDDC9]|𑇍|\uD804[\uDDD0-\uDDDF]|\uD804[\uDDE1-\uDDF4]|\uD804[\uDE00-\uDE11]|\uD804[\uDE13-\uDE2E]|𑈲|𑈳|𑈵|\uD804[\uDE38-\uDE3D]|\uD804[\uDE80-\uDE86]|𑊈|\uD804[\uDE8A-\uDE8D]|\uD804[\uDE8F-\uDE9D]|\uD804[\uDE9F-\uDEA9]|\uD804[\uDEB0-\uDEDE]|\uD804[\uDEE0-\uDEE2]|\uD804[\uDEF0-\uDEF9]|𑌂|𑌃|\uD804[\uDF05-\uDF0C]|𑌏|𑌐|\uD804[\uDF13-\uDF28]|\uD804[\uDF2A-\uDF30]|𑌲|𑌳|\uD804[\uDF35-\uDF39]|\uD804[\uDF3D-\uDF3F]|\uD804[\uDF41-\uDF44]|𑍇|𑍈|\uD804[\uDF4B-\uDF4D]|𑍐|𑍗|\uD804[\uDF5D-\uDF63]|\uD805[\uDC80-\uDCB2]|𑒹|\uD805[\uDCBB-\uDCBE]|𑓁|\uD805[\uDCC4-\uDCC7]|\uD805[\uDCD0-\uDCD9]|\uD805[\uDD80-\uDDB1]|\uD805[\uDDB8-\uDDBB]|𑖾|\uD805[\uDDC1-\uDDDB]|\uD805[\uDE00-\uDE32]|𑘻|𑘼|𑘾|\uD805[\uDE41-\uDE44]|\uD805[\uDE50-\uDE59]|\uD805[\uDE80-\uDEAA]|𑚬|𑚮|𑚯|𑚶|\uD805[\uDEC0-\uDEC9]|\uD805[\uDF00-\uDF19]|𑜠|𑜡|𑜦|\uD805[\uDF30-\uDF3F]|\uD806[\uDCA0-\uDCF2]|𑣿|\uD806[\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E]|\uD809[\uDC70-\uDC74]|\uD809[\uDC80-\uDD43]|\uD80C[\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38]|\uD81A[\uDE40-\uDE5E]|\uD81A[\uDE60-\uDE69]|𖩮|𖩯|\uD81A[\uDED0-\uDEED]|𖫵|\uD81A[\uDF00-\uDF2F]|\uD81A[\uDF37-\uDF45]|\uD81A[\uDF50-\uDF59]|\uD81A[\uDF5B-\uDF61]|\uD81A[\uDF63-\uDF77]|\uD81A[\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44]|\uD81B[\uDF50-\uDF7E]|\uD81B[\uDF93-\uDF9F]|𛀀|𛀁|\uD82F[\uDC00-\uDC6A]|\uD82F[\uDC70-\uDC7C]|\uD82F[\uDC80-\uDC88]|\uD82F[\uDC90-\uDC99]|𛲜|𛲟|\uD834[\uDC00-\uDCF5]|\uD834[\uDD00-\uDD26]|\uD834[\uDD29-\uDD66]|\uD834[\uDD6A-\uDD72]|𝆃|𝆄|\uD834[\uDD8C-\uDDA9]|\uD834[\uDDAE-\uDDE8]|\uD834[\uDF60-\uDF71]|\uD835[\uDC00-\uDC54]|\uD835[\uDC56-\uDC9C]|𝒞|𝒟|𝒢|𝒥|𝒦|\uD835[\uDCA9-\uDCAC]|\uD835[\uDCAE-\uDCB9]|𝒻|\uD835[\uDCBD-\uDCC3]|\uD835[\uDCC5-\uDD05]|\uD835[\uDD07-\uDD0A]|\uD835[\uDD0D-\uDD14]|\uD835[\uDD16-\uDD1C]|\uD835[\uDD1E-\uDD39]|\uD835[\uDD3B-\uDD3E]|\uD835[\uDD40-\uDD44]|𝕆|\uD835[\uDD4A-\uDD50]|\uD835[\uDD52-\uDEA5]|\uD835[\uDEA8-\uDEDA]|\uD835[\uDEDC-\uDF14]|\uD835[\uDF16-\uDF4E]|\uD835[\uDF50-\uDF88]|\uD835[\uDF8A-\uDFC2]|\uD835[\uDFC4-\uDFCB]|\uD836[\uDC00-\uDDFF]|\uD836[\uDE37-\uDE3A]|\uD836[\uDE6D-\uDE74]|\uD836[\uDE76-\uDE83]|\uD836[\uDE85-\uDE8B]|\uD83C[\uDD10-\uDD2E]|\uD83C[\uDD30-\uDD69]|\uD83C[\uDD70-\uDD9A]|\uD83C[\uDDE6-\uDE02]|\uD83C[\uDE10-\uDE3A]|\uD83C[\uDE40-\uDE48]|🉐|🉑|[\uD840-\uD868][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6]|\uD869[\uDF00-\uDFFF]|[\uD86A-\uD86C][\uDC00-\uDFFF]|\uD86D[\uDC00-\uDF34]|\uD86D[\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD86E[\uDC20-\uDFFF]|[\uD86F-\uD872][\uDC00-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|[\uDB80-\uDBBE][\uDC00-\uDFFF]|\uDBBF[\uDC00-\uDFFD]|[\uDBC0-\uDBFE][\uDC00-\uDFFF]|\uDBFF[\uDC00-\uDFFD])|([֐־׀׃׆׈-׿߀-ߪߴߵߺ-ࠕࠚࠤࠨ࠮-ࡘ࡜-࢟‏יִײַ-ﬨשׁ-ﭏ؈؋؍؛-ي٭-ٯٱ-ەۥۦۮۯۺ-ܐܒ-ܯ݋-ޥޱ-޿ࢠ-࣢ﭐ-ﴽ﵀-﷏ﷰ-﷼﷾﷿ﹰ-﻾]|\uD802[\uDC00-\uDD1E]|\uD802[\uDD20-\uDE00]|𐨄|\uD802[\uDE07-\uDE0B]|\uD802[\uDE10-\uDE37]|\uD802[\uDE3B-\uDE3E]|\uD802[\uDE40-\uDEE4]|\uD802[\uDEE7-\uDF38]|\uD802[\uDF40-\uDFFF]|\uD803[\uDC00-\uDE5F]|\uD803[\uDE7F-\uDFFF]|\uD83A[\uDC00-\uDCCF]|\uD83A[\uDCD7-\uDFFF]|\uD83B[\uDC00-\uDDFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDE00-\uDEEF]|\uD83B[\uDEF2-\uDEFF]))");let At=class{constructor(e){this.locale=$e(e),this.language=new(vt[this.locale]||vt.default)(this.locale)}emit(e,t){let n,r,s;switch(typeof e){case"string":case"number":n=e;break;case"object":if(r=e.slice(1).map(u=>this.emit(u,t)),s=e[0].toLowerCase(),typeof this[s]=="function")n=this[s](r,t);else throw new Error('unknown operation "'+s+'"');break;case"undefined":n="";break;default:throw new Error("unexpected type in AST: "+typeof e)}return n}concat(e){let t="";return e.forEach(n=>{t+=n}),t}replace(e,t){const n=parseInt(e[0],10);return n<t.length?t[n]:"$"+(n+1)}plural(e){const t=parseFloat(this.language.convertNumber(e[0],10)),n=e.slice(1);return n.length?this.language.convertPlural(t,n):""}gender(e){const t=e[0],n=e.slice(1);return this.language.gender(t,n)}grammar(e){const t=e[0],n=e[1];return n&&t&&this.language.convertGrammar(n,t)}wikilink(e){let t,n=e[0];n.charAt(0)===":"&&(n=n.slice(1));const r=`./${n}`;return e.length===1?t=n:t=e[1],`<a href="${r}" title="${n}">${t}</a>`}extlink(e){if(e.length!==2)throw new Error("Expected two items in the node");return`<a href="${e[0]}">${e[1]}</a>`}bidi(e){const t=wi(e[0]);return t==="ltr"?"‪"+e[0]+"‬":t==="rtl"?"‫"+e[0]+"‬":e[0]}formatnum(e){const t=!!e[1]&&e[1]==="R",n=e[0];return typeof n=="string"||typeof n=="number"?this.language.convertNumber(n,t):n}htmlattributes(e){const t={};for(let n=0,r=e.length;n<r;n+=2)t[e[n]]=e[n+1];return t}htmlelement(e){const t=e.shift(),n=e.shift();let r=e,s="";for(const a in n)s+=` ${a}="${n[a]}"`;Array.isArray(r)||(r=[r]);const u=r.join("");return`<${t}${s}>${u}</${t}>`}};function $e(e){return typeof e=="string"?e.toLowerCase():e}function wi(e){const t=e.match(Ai);return t?t[2]===void 0?"ltr":"rtl":null}function Ei(e,{wikilinks:t=!1}={}){let n=0;function r(l){return()=>{for(let f=0;f<l.length;f++){const B=l[f]();if(B!==null)return B}return null}}function s(l){const f=n,B=[];for(let p=0;p<l.length;p++){const c=l[p]();if(c===null)return n=f,null;B.push(c)}return B}function u(l,f){return()=>{const B=n,p=[];let c=f();for(;c!==null;)p.push(c),c=f();return p.length<l?(n=B,null):p}}function a(l){const f=l.length;return()=>{let B=null;return e.slice(n,n+f)===l&&(B=l,n+=f),B}}function o(l){return()=>{const f=e.slice(n).match(l);return f===null?null:(n+=f[0].length,f[0])}}const A=o(/^\s+/),$=a("|"),h=a(":"),_=a("\\"),ne=o(/^./),ue=a("$"),De=o(/^\d+/),N=a('"'),re=a("'"),ee=o(t?/^[^{}[\]$<\\]/:/^[^{}$<\\]/),ie=o(t?/^[^{}[\]$\\|]/:/^[^{}$\\|]/),R=o(t?/^[^{}[\]$\s]/:/^[^{}$\s]/);function X(l,f){return()=>{const B=l();return B===null?null:f(B)}}function K(){const l=u(1,G)();return l===null?null:l.join("")}function de(){const l=u(1,ge)();return l===null?null:l.join("")}const fe=r([k,R]);function he(){const l=u(1,fe)();return l===null?null:l.join("")}function k(){const l=s([_,ne]);return l===null?null:l[1]}const G=r([k,ie]),ge=r([k,ee]);function v(){const l=s([ue,De]);return l===null?null:["REPLACE",parseInt(l[1],10)-1]}const ae=X(o(/^[ !"$&'()*,./0-9;=?@A-Z^_`a-z~\x80-\xFF+-]+/),function(l){return l.toString()});function me(){const l=s([$,u(0,i)]);if(l===null)return null;const f=l[1];return f.length>1?["CONCAT"].concat(f):f[0]}function ce(){const l=s([ae,h,v]);return l===null?null:[l[0],l[2]]}function ke(){const l=s([ae,h,i]);return l===null?null:[l[0],l[2]]}function Ie(){const l=s([ae,h]);return l===null?null:[l[0],""]}const Pe=r([function(){const l=s([r([ce,ke,Ie]),u(0,me)]);return l===null?null:l[0].concat(l[1])},function(){const l=s([ae,u(0,me)]);return l===null?null:[l[0]].concat(l[1])}]),Ee=a("{{"),D=a("}}"),be=a("[["),we=a("]]"),Ce=a("["),xe=a("]");function Fe(){const l=s([Ee,Pe,D]);return l===null?null:l[1]}function E(){const l=s([u(1,i),$,u(1,Y)]);return l===null?null:[["CONCAT"].concat(l[0]),["CONCAT"].concat(l[2])]}function w(){const l=s([u(1,i)]);return l===null?null:[["CONCAT"].concat(l[0])]}const T=r([E,w]);function q(){let l=null;const f=s([be,T,we]);if(f!==null){const B=f[1];l=["WIKILINK"].concat(B)}return l}function M(){let l=null;const f=s([Ce,u(1,Z),A,u(1,Y),xe]);return f!==null&&(l=["EXTLINK",f[1].length===1?f[1][0]:["CONCAT"].concat(f[1]),["CONCAT"].concat(f[3])]),l}const O=o(/^[A-Za-z]+/);function j(l,f,B,p={allowedHtmlElements:["b","bdi","del","i","ins","u","font","big","small","sub","sup","h1","h2","h3","h4","h5","h6","cite","code","em","s","strike","strong","tt","var","div","center","blockquote","ol","ul","dl","table","caption","pre","ruby","rb","rp","rt","rtc","p","span","abbr","dfn","kbd","samp","data","time","mark","li","dt","dd"],allowedHtmlCommonAttributes:["id","class","style","lang","dir","title","aria-describedby","aria-flowto","aria-hidden","aria-label","aria-labelledby","aria-owns","role","about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"],allowedHtmlAttributesByElement:{}}){if(l=l.toLowerCase(),f=f.toLowerCase(),l!==f||p.allowedHtmlElements.indexOf(l)===-1)return!1;const c=/[\000-\010\013\016-\037\177]|expression|filter\s*:|accelerator\s*:|-o-link\s*:|-o-link-source\s*:|-o-replace\s*:|url\s*\(|image\s*\(|image-set\s*\(/i;for(let C=0,z=B.length;C<z;C+=2){const ve=B[C];if(p.allowedHtmlCommonAttributes.indexOf(ve)===-1&&(p.allowedHtmlAttributesByElement[l]||[]).indexOf(ve)===-1||ve==="style"&&B[C+1].search(c)!==-1)return!1}return!0}function L(){const l=o(/^[^"]*/),f=s([N,l,N]);return f===null?null:f[1]}function P(){const l=o(/^[^']*/),f=s([re,l,re]);return f===null?null:f[1]}function H(){const l=o(/^\s*=\s*/),f=s([A,O,l,r([L,P])]);return f===null?null:[f[1],f[3]]}function J(){const l=u(0,H)();return Array.prototype.concat.apply(["HTMLATTRIBUTES"],l)}function W(){let l=null;const f=n,B=a("<"),p=o(/^\/?/),c=o(/^\s*>/),C=s([B,O,J,p,c]);if(C===null)return null;const z=n,ve=C[1],_e=u(0,Y)(),ga=n,ma=a("</"),Nt=s([ma,O,c]);if(Nt===null)return["CONCAT",e.slice(f,z)].concat(_e);const ba=n,Ca=Nt[1],Mt=C[2],va=Mt.slice(1);if(j(ve,Ca,va))l=["HTMLELEMENT",ve,Mt].concat(_e);else{const jt=Aa=>Aa.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;");l=["CONCAT",jt(e.slice(f,z))].concat(_e,jt(e.slice(ga,ba)))}return l}const Z=r([Fe,v,q,M,he]),Y=r([Fe,v,q,M,W,de]),i=r([Fe,v,K]);function g(){const l=u(0,Y)();return l===null?null:["CONCAT"].concat(l)}const b=g();if(b===null||n!==e.length)throw new Error("Parse error at position "+n.toString()+" in input: "+e);return b}class wt{constructor(t,{wikilinks:n=!1}={}){this.locale=$e(t),this.wikilinks=n,this.emitter=new At(this.locale)}parse(t,n){if(t.includes("{{")||t.includes("<")||this.wikilinks&&t.includes("[")){const r=Ei(t,{wikilinks:this.wikilinks});return this.emitter.emit(r,n)}else return this.simpleParse(t,n)}simpleParse(t,n){return t.replace(/\$(\d+)/g,(r,s)=>{const u=parseInt(s,10)-1;return n[u]!==void 0?n[u]:"$"+s})}}class Fi{constructor(){this.sourceMap=new Map}load(t,n){if(typeof t!="object")throw new Error("Invalid message source. Must be an object");if(n=$e(n),n){if(!/^[a-zA-Z0-9-]+$/.test(n))throw new Error(`Invalid locale ${n}`);for(const r in t)if(r.indexOf("@")!==0){if(typeof t[r]=="object")return this.load(t);if(typeof t[r]!="string")throw new Error(`Invalid message for message ${r} in ${n} locale.`);break}this.sourceMap.has(n)?this.sourceMap.set(n,Object.assign(this.sourceMap.get(n),t)):this.sourceMap.set(n,t)}else for(n in t)this.load(t[n],n)}getMessage(t,n){const r=this.sourceMap.get($e(n));return r?r[t]:null}hasLocale(t){return this.sourceMap.has(t)}}class yi{constructor(t,{finalFallback:n="en",messages:r=void 0,wikilinks:s=!1}={}){this.locale=$e(t),this.parser=new wt(this.locale,{wikilinks:s}),this.messageStore=new Fi,r&&this.load(r,this.locale),this.finalFallback=n,this.wikilinks=s}load(t,n){return this.messageStore.load(t,n||this.locale)}i18n(t,...n){return this.parser.parse(this.getMessage(t),n)}setLocale(t){this.locale=$e(t),this.parser=new wt(this.locale,{wikilinks:this.wikilinks})}getFallbackLocales(){return[...Ct[this.locale]||[],this.finalFallback]}getMessage(t){let n=this.locale,r=0;const s=this.getFallbackLocales(this.locale);for(;n;){const u=n.split("-");let a=u.length;do{const o=u.slice(0,a).join("-"),A=this.messageStore.getMessage(t,o);if(typeof A=="string")return A;a--}while(a);n=s[r],r++}return t}registerParserPlugin(t,n){At.prototype[t]=n}}const Et={"@metadata":{authors:["Mason Payne"],"last-updated":"2024-01-08",locale:"en"},"sa-login":"Login","sa-username":"Email","sa-password":"Password","sa-use-password":"Use Password","sa-code":"Code","sa-signup":"Sign up","sa-signup-complete":"Sign up complete","sa-back":"Back","sa-error-creating-user":"Error creating user.","sa-remember":"Remember me","sa-forgot":"Forgot your password?","sa-register":"Register","sa-error.login":"Invalid email or password","sa-error.register":"Invalid email or password","sa-error.unknown":"Unknown error","sa-account-settings":"Account Settings","sa-webauthn-security-keys":"Your passkeys","sa-add-security-key":"Add passkey","webauthn-not-enrolled":"WebAuthn not enrolled","sa-webauthn-key-name":"Key Name","sa-cancel":"Cancel","sa-no-security-keys":"No passkeys","sa-webauthn-key-actions":"Actions","sa-remove":"Remove","not-authenticated":"Not authenticated","error-otp-registration":"Error registering OTP","sa-confirm-delete-key":"Are you sure you want to delete this key?","sa-add-mfa":"Manage MFA","sa-add-email":"Add Email","sa-email":"Email","sa-phone":"Phone","sa-add-sms":"Add SMS","sa-mfa":"MFA Registrations","error-otp-list":"Error listing OTPs","sa-type":"Type","sa-mfa-destination":"Destination","sa-mfa-validated":"Validated","sa-validate":"Validate","sa-mfa-action":"Action","sa-no":"No","sa-yes":"Yes","error-otp-remove":"Error removing MFA Registration","error-webauthn-remove":"Error removing WebAuthn Registration","sa-register-mfa":"Register MFA","sa-otp-required":"A one-time code is required.","sa-otp-choose":"Choose how to receive your code:","sa-otp-no-registrations":"No MFA methods registered.","sa-otp-send-code":"Send Code","sa-otp-verify":"Verify Code","sa-unknown-challenge":"Unknown challenge type.","sa-invite-otp":"Verification Code","sa-invite-otp-hint":"Enter the code from your invite email","sa-invite-password":"Choose a Password","sa-invite-password-hint":"Create a secure password for your account","sa-invite-submit":"Complete Registration","sa-invite-success":"Registration complete! Redirecting to login...","sa-invite-error-otp":"Invalid or expired verification code","sa-invite-error-expired":"This invite has expired. Please contact your administrator.","sa-invite-error-generic":"Unable to complete registration. Please try again.","sa-invite-completing":"Completing registration...","sa-forgot-password":"Forgot your password?","sa-reset-password":"Reset Password","sa-reset-email-sent":"If an account exists with that email, a reset code has been sent.","sa-new-password":"New Password","sa-reset-code":"Reset Code","sa-reset-submit":"Reset Password","sa-reset-success":"Password reset successfully! You can now log in.","sa-reset-error":"Unable to reset password. Please try again.","sa-reset-error-code":"Invalid or expired reset code","sa-or":"Or","sa-social-google":"Continue with Google","sa-social-github":"Continue with GitHub","sa-social-apple":"Continue with Apple","sa-social-oidc":"Continue with SSO","sa-social-error":"Error starting social login","sa-signup-mfa-title":"Verify Your Email","sa-signup-verify-prompt":"A verification code has been sent to your email. Enter it below to activate multi-factor authentication.","sa-signup-verify-error":"Invalid or expired verification code.","sa-signup-webauthn-prompt":"Your account is secure! Optionally, add a passkey for faster and easier logins.","sa-signup-webauthn-setup":"Set Up Passkey","sa-signup-webauthn-done":"Skip for now","sa-signup-webauthn-error":"Error setting up passkey. Please try again from your account settings."},$i={en:Et,fr:{"@metadata":{authors:["Mason Payne"],"last-updated":"2022-05-28",locale:"fr"},"sa-login":"Connexion","sa-username":"Adresse e-mail","sa-password":"Mot de passe","sa-use-password":"Utiliser le mot de passe","sa-code":"code à deux facteurs","sa-remember":"Souviens-toi de moi","sa-forgot":"Mot de passe oublié?","sa-register":"S'inscrire","sa-error.login":"E-mail ou mot de passe invalide","sa-error.register":"E-mail ou mot de passe invalide","sa-error.unknown":"Erreur inconnue","sa-otp-required":"Un code à usage unique est requis.","sa-otp-choose":"Choisissez comment recevoir votre code :","sa-otp-no-registrations":"Aucune méthode MFA enregistrée.","sa-otp-send-code":"Envoyer le code","sa-otp-verify":"Vérifier le code","sa-unknown-challenge":"Type de défi inconnu.","sa-complete-invite":"Complétez votre invitation","sa-invite-otp":"Code de vérification","sa-invite-otp-hint":"Entrez le code de votre email d'invitation","sa-invite-password":"Choisissez un mot de passe","sa-invite-password-hint":"Créez un mot de passe sécurisé pour votre compte","sa-invite-submit":"Terminer l'inscription","sa-invite-success":"Inscription terminée ! Redirection vers la connexion...","sa-invite-error-otp":"Code de vérification invalide ou expiré","sa-invite-error-expired":"Cette invitation a expiré. Veuillez contacter votre administrateur.","sa-invite-error-generic":"Impossible de terminer l'inscription. Veuillez réessayer.","sa-invite-completing":"Finalisation de l'inscription...","sa-forgot-password":"Mot de passe oublié ?","sa-reset-password":"Réinitialiser le mot de passe","sa-reset-email-sent":"Si un compte existe avec cet e-mail, un code de réinitialisation a été envoyé.","sa-new-password":"Nouveau mot de passe","sa-reset-code":"Code de réinitialisation","sa-reset-submit":"Réinitialiser le mot de passe","sa-reset-success":"Mot de passe réinitialisé avec succès ! Vous pouvez maintenant vous connecter.","sa-reset-error":"Impossible de réinitialiser le mot de passe. Veuillez réessayer.","sa-reset-error-code":"Code de réinitialisation invalide ou expiré","sa-or":"Ou","sa-social-google":"Continuer avec Google","sa-social-github":"Continuer avec GitHub","sa-social-apple":"Continuer avec Apple","sa-social-oidc":"Continuer avec SSO","sa-social-error":"Erreur lors de la connexion sociale","sa-signup-mfa-title":"Vérifiez votre e-mail","sa-signup-verify-prompt":"Un code de vérification a été envoyé à votre e-mail. Entrez-le ci-dessous pour activer l'authentification multi-facteurs.","sa-signup-verify-error":"Code de vérification invalide ou expiré.","sa-signup-webauthn-prompt":"Votre compte est sécurisé ! Ajoutez optionnellement une clé d'accès pour des connexions plus rapides.","sa-signup-webauthn-setup":"Configurer la clé d'accès","sa-signup-webauthn-done":"Ignorer pour l'instant","sa-signup-webauthn-error":"Erreur lors de la configuration de la clé d'accès. Veuillez réessayer depuis les paramètres de votre compte."},es:{"@metadata":{authors:["Mason Payne"],"last-updated":"2022-05-28",locale:"es"},"sa-login":"Acceso","sa-username":"Correo electrónico","sa-password":"Clave","sa-use-password":"Usar contraseña","sa-code":"Código","sa-remember":"Acuérdate de mí","sa-forgot":"¿Olvidaste tu contraseña?","sa-register":"Registro","sa-error.login":"Correo electrónico o contraseña inválidos","sa-error.register":"Correo electrónico o contraseña inválidos","sa-error.unknown":"Error desconocido","sa-otp-required":"Se requiere un código de un solo uso.","sa-otp-choose":"Elige cómo recibir tu código:","sa-otp-no-registrations":"No hay métodos MFA registrados.","sa-unknown-challenge":"Tipo de desafío desconocido.","sa-complete-invite":"Completa tu invitación","sa-invite-otp":"Código de verificación","sa-invite-otp-hint":"Ingresa el código de tu correo de invitación","sa-invite-password":"Elige una contraseña","sa-invite-password-hint":"Crea una contraseña segura para tu cuenta","sa-invite-submit":"Completar registro","sa-invite-success":"¡Registro completo! Redirigiendo al inicio de sesión...","sa-invite-error-otp":"Código de verificación inválido o expirado","sa-invite-error-expired":"Esta invitación ha expirado. Por favor contacta a tu administrador.","sa-invite-error-generic":"No se pudo completar el registro. Por favor intenta de nuevo.","sa-invite-completing":"Completando registro...","sa-forgot-password":"¿Olvidaste tu contraseña?","sa-reset-password":"Restablecer contraseña","sa-reset-email-sent":"Si existe una cuenta con ese correo, se ha enviado un código de restablecimiento.","sa-new-password":"Nueva contraseña","sa-reset-code":"Código de restablecimiento","sa-reset-submit":"Restablecer contraseña","sa-reset-success":"¡Contraseña restablecida con éxito! Ya puedes iniciar sesión.","sa-reset-error":"No se pudo restablecer la contraseña. Por favor intenta de nuevo.","sa-reset-error-code":"Código de restablecimiento inválido o expirado","sa-or":"O","sa-social-google":"Continuar con Google","sa-social-github":"Continuar con GitHub","sa-social-apple":"Continuar con Apple","sa-social-oidc":"Continuar con SSO","sa-social-error":"Error al iniciar sesión social","sa-signup-mfa-title":"Verifica tu correo electrónico","sa-signup-verify-prompt":"Se ha enviado un código de verificación a tu correo. Ingrésalo para activar la autenticación multifactor.","sa-signup-verify-error":"Código de verificación inválido o expirado.","sa-signup-webauthn-prompt":"¡Tu cuenta está protegida! Opcionalmente, agrega una clave de acceso para inicios de sesión más rápidos.","sa-signup-webauthn-setup":"Configurar clave de acceso","sa-signup-webauthn-done":"Omitir por ahora","sa-signup-webauthn-error":"Error al configurar la clave de acceso. Intenta de nuevo desde la configuración de tu cuenta."},ja:{"@metadata":{authors:["Mason Payne"],"last-updated":"2022-05-28",locale:"ja"},"sa-login":"ログイン","sa-username":"メールアドレス","sa-password":"パスワード","sa-use-password":"パスワードを使用する","sa-code":"コード","sa-remember":"私を覚えてますか","sa-forgot":"パスワードをお忘れですか?","sa-register":"登録","sa-error.login":"メールアドレスかパスワードが無効","sa-error.register":"メールアドレスかパスワードが無効","sa-error.unknown":"未知のエラー","sa-otp-required":"ワンタイムコードが必要です。","sa-otp-choose":"コードの受け取り方法を選択してください:","sa-otp-no-registrations":"MFA方法が登録されていません。","sa-otp-send-code":"コードを送信","sa-otp-verify":"コードを確認","sa-unknown-challenge":"不明なチャレンジタイプです。","sa-complete-invite":"招待を完了する","sa-invite-otp":"確認コード","sa-invite-otp-hint":"招待メールのコードを入力してください","sa-invite-password":"パスワードを選択","sa-invite-password-hint":"アカウント用の安全なパスワードを作成してください","sa-invite-submit":"登録を完了","sa-invite-success":"登録完了!ログインページへリダイレクト中...","sa-invite-error-otp":"無効または期限切れの確認コード","sa-invite-error-expired":"この招待は期限切れです。管理者にお問い合わせください。","sa-invite-error-generic":"登録を完了できませんでした。もう一度お試しください。","sa-invite-completing":"登録を完了しています...","sa-forgot-password":"パスワードをお忘れですか?","sa-reset-password":"パスワードをリセット","sa-reset-email-sent":"そのメールアドレスのアカウントが存在する場合、リセットコードが送信されました。","sa-new-password":"新しいパスワード","sa-reset-code":"リセットコード","sa-reset-submit":"パスワードをリセット","sa-reset-success":"パスワードが正常にリセットされました!ログインできます。","sa-reset-error":"パスワードをリセットできませんでした。もう一度お試しください。","sa-reset-error-code":"無効または期限切れのリセットコード","sa-or":"または","sa-social-google":"Googleで続ける","sa-social-github":"GitHubで続ける","sa-social-apple":"Appleで続ける","sa-social-oidc":"SSOで続ける","sa-social-error":"ソーシャルログイン開始エラー","sa-signup-mfa-title":"メールを確認してください","sa-signup-verify-prompt":"確認コードがメールに送信されました。多要素認証を有効にするために入力してください。","sa-signup-verify-error":"無効または期限切れの確認コードです。","sa-signup-webauthn-prompt":"アカウントが保護されました!パスキーを追加してより速く簡単にログインできます(任意)。","sa-signup-webauthn-setup":"パスキーを設定","sa-signup-webauthn-done":"今はスキップ","sa-signup-webauthn-error":"パスキーの設定中にエラーが発生しました。アカウント設定から再試行してください。"}};function et(e){const t=new yi("en",{messages:Et});return e!=="en"&&(t.load($i[e],e),t.setLocale(e)),t}function Ft(e){const t="==".slice(0,(4-e.length%4)%4),n=e.replace(/-/g,"+").replace(/_/g,"/")+t,r=atob(n),s=new ArrayBuffer(r.length),u=new Uint8Array(s);for(let a=0;a<r.length;a++)u[a]=r.charCodeAt(a);return s}function yt(e){const t=new Uint8Array(e);let n="";for(const u of t)n+=String.fromCharCode(u);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}var S="copy",le="convert";function Be(e,t,n){if(t===S)return n;if(t===le)return e(n);if(t instanceof Array)return n.map(r=>Be(e,t[0],r));if(t instanceof Object){const r={};for(const[s,u]of Object.entries(t)){if(u.derive){const a=u.derive(n);a!==void 0&&(n[s]=a)}if(!(s in n)){if(u.required)throw new Error(`Missing key: ${s}`);continue}if(n[s]==null){r[s]=null;continue}r[s]=Be(e,u.schema,n[s])}return r}}function tt(e,t){return{required:!0,schema:e,derive:t}}function I(e){return{required:!0,schema:e}}function U(e){return{required:!1,schema:e}}var $t={type:I(S),id:I(le),transports:U(S)},Bt={appid:U(S),appidExclude:U(S),credProps:U(S)},kt={appid:U(S),appidExclude:U(S),credProps:U(S)},Bi={publicKey:I({rp:I(S),user:I({id:I(le),name:I(S),displayName:I(S)}),challenge:I(le),pubKeyCredParams:I(S),timeout:U(S),excludeCredentials:U([$t]),authenticatorSelection:U(S),attestation:U(S),extensions:U(Bt)}),signal:U(S)},ki={type:I(S),id:I(S),rawId:I(le),authenticatorAttachment:U(S),response:I({clientDataJSON:I(le),attestationObject:I(le),transports:tt(S,e=>{var t;return((t=e.getTransports)==null?void 0:t.call(e))||[]})}),clientExtensionResults:tt(kt,e=>e.getClientExtensionResults())},xi={mediation:U(S),publicKey:I({challenge:I(le),timeout:U(S),rpId:U(S),allowCredentials:U([$t]),userVerification:U(S),extensions:U(Bt)}),signal:U(S)},_i={type:I(S),id:I(S),rawId:I(le),authenticatorAttachment:U(S),response:I({clientDataJSON:I(le),authenticatorData:I(le),signature:I(le),userHandle:I(le)}),clientExtensionResults:tt(kt,e=>e.getClientExtensionResults())};function xt(e){return Be(Ft,Bi,e)}function Si(e){return Be(yt,ki,e)}function Ti(e){return Be(Ft,xi,e)}function Oi(e){return Be(yt,_i,e)}async function _t(e){const t=await navigator.credentials.create(e);return t.toJSON=()=>Si(t),t}async function Ii(e){const t=await navigator.credentials.get(e);return t.toJSON=()=>Oi(t),t}function nt(e){this.message=e}nt.prototype=new Error,nt.prototype.name="InvalidCharacterError";var St=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new nt("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,s=0,u=0,a="";r=t.charAt(u++);~r&&(n=s%4?64*n+r:r,s++%4)?a+=String.fromCharCode(255&n>>(-2*s&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return a};function Pi(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(n){return decodeURIComponent(St(n).replace(/(.)/g,function(r,s){var u=s.charCodeAt(0).toString(16).toUpperCase();return u.length<2&&(u="0"+u),"%"+u}))}(t)}catch{return St(t)}}function Ue(e){this.message=e}function zi(e,t){if(typeof e!="string")throw new Ue("Invalid token specified");var n=(t=t||{}).header===!0?0:1;try{return JSON.parse(Pi(e.split(".")[n]))}catch(r){throw new Ue("Invalid token specified: "+r.message)}}Ue.prototype=new Error,Ue.prototype.name="InvalidTokenError";const Je="spartan-token";function Tt(){const e=localStorage.getItem(Je);let t=null;if(e)try{if(t=zi(e),t.exp>Mi())return t;localStorage.removeItem(Je)}catch(n){console.error("Error decoding token",n),localStorage.removeItem(Je)}return null}function Ni(){const e=localStorage.getItem(Je);return e||null}function Mi(){return Math.round(new Date().getTime()/1e3)}var ji=y(`<form class=login-frame><style>.login-frame {
1
+ (function(nt){typeof define=="function"&&define.amd?define(nt):nt()})(function(){"use strict";const Ke={equals:(e,t)=>e===t};let gt=Ct;const xe=1,Ge=2,mt={owned:null,cleanups:null,context:null,owner:null};var ae=null;let rt=null,Xt=null,W=null,ne=null,Ee=null,He=0;function Qt(e,t){const n=W,r=ae,s=e.length===0,i=t===void 0?r:t,u=s?mt:{owned:null,cleanups:null,context:i?i.context:null,owner:i},l=s?e:()=>e(()=>We(()=>qe(u)));ae=u,W=null;try{return Le(l,!0)}finally{W=n,ae=r}}function C(e,t){t=t?Object.assign({},Ke,t):Ke;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=s=>(typeof s=="function"&&(s=s(n.value)),vt(n,s));return[bt.bind(n),r]}function y(e,t,n){const r=it(e,t,!1,xe);Re(r)}function en(e,t,n){gt=rn;const r=it(e,t,!1,xe);r.user=!0,Ee?Ee.push(r):Re(r)}function h(e,t,n){n=n?Object.assign({},Ke,n):Ke;const r=it(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Re(r),bt.bind(r)}function We(e){if(W===null)return e();const t=W;W=null;try{return e()}finally{W=t}}function st(e){en(()=>We(e))}function bt(){if(this.sources&&this.state)if(this.state===xe)Re(this);else{const e=ne;ne=null,Le(()=>Ye(this),!1),ne=e}if(W){const e=this.observers?this.observers.length:0;W.sources?(W.sources.push(this),W.sourceSlots.push(e)):(W.sources=[this],W.sourceSlots=[e]),this.observers?(this.observers.push(W),this.observerSlots.push(W.sources.length-1)):(this.observers=[W],this.observerSlots=[W.sources.length-1])}return this.value}function vt(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&Le(()=>{for(let s=0;s<e.observers.length;s+=1){const i=e.observers[s],u=rt&&rt.running;u&&rt.disposed.has(i),(u?!i.tState:!i.state)&&(i.pure?ne.push(i):Ee.push(i),i.observers&&wt(i)),u||(i.state=xe)}if(ne.length>1e6)throw ne=[],new Error},!1)),t}function Re(e){if(!e.fn)return;qe(e);const t=He;tn(e,e.value,t)}function tn(e,t,n){let r;const s=ae,i=W;W=ae=e;try{r=e.fn(t)}catch(u){return e.pure&&(e.state=xe,e.owned&&e.owned.forEach(qe),e.owned=null),e.updatedAt=n+1,At(u)}finally{W=i,ae=s}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?vt(e,r):e.value=r,e.updatedAt=n)}function it(e,t,n,r=xe,s){const i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:ae,context:ae?ae.context:null,pure:n};return ae===null||ae!==mt&&(ae.owned?ae.owned.push(i):ae.owned=[i]),i}function Ze(e){if(e.state===0)return;if(e.state===Ge)return Ye(e);if(e.suspense&&We(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<He);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===xe)Re(e);else if(e.state===Ge){const r=ne;ne=null,Le(()=>Ye(e,t[0]),!1),ne=r}}function Le(e,t){if(ne)return e();let n=!1;t||(ne=[]),Ee?n=!0:Ee=[],He++;try{const r=e();return nn(n),r}catch(r){n||(Ee=null),ne=null,At(r)}}function nn(e){if(ne&&(Ct(ne),ne=null),e)return;const t=Ee;Ee=null,t.length&&Le(()=>gt(t),!1)}function Ct(e){for(let t=0;t<e.length;t++)Ze(e[t])}function rn(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:Ze(r)}for(t=0;t<n;t++)Ze(e[t])}function Ye(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const r=e.sources[n];if(r.sources){const s=r.state;s===xe?r!==t&&(!r.updatedAt||r.updatedAt<He)&&Ze(r):s===Ge&&Ye(r,t)}}}function wt(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=Ge,n.pure?ne.push(n):Ee.push(n),n.observers&&wt(n))}}function qe(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),r=e.sourceSlots.pop(),s=n.observers;if(s&&s.length){const i=s.pop(),u=n.observerSlots.pop();r<s.length&&(i.sourceSlots[u]=r,s[r]=i,n.observerSlots[r]=u)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)qe(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)qe(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function sn(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function At(e,t=ae){throw sn(e)}function an(e,t,n){let r=n.length,s=t.length,i=r,u=0,l=0,w=t[s-1].nextSibling,$=null;for(;u<s||l<i;){if(t[u]===n[l]){u++,l++;continue}for(;t[s-1]===n[i-1];)s--,i--;if(s===u){const D=i<r?l?n[l-1].nextSibling:n[i-l]:w;for(;l<i;)e.insertBefore(n[l++],D)}else if(i===l)for(;u<s;)(!$||!$.has(t[u]))&&t[u].remove(),u++;else if(t[u]===n[i-1]&&n[l]===t[s-1]){const D=t[--s].nextSibling;e.insertBefore(n[l++],t[u++].nextSibling),e.insertBefore(n[--i],D),t[s]=n[i]}else{if(!$){$=new Map;let B=l;for(;B<i;)$.set(n[B],B++)}const D=$.get(t[u]);if(D!=null)if(l<D&&D<i){let B=u,oe=1,fe;for(;++B<s&&B<i&&!((fe=$.get(t[B]))==null||fe!==D+oe);)oe++;if(oe>D-l){const Fe=t[u];for(;l<D;)e.insertBefore(n[l++],Fe)}else e.replaceChild(n[l++],t[u++])}else u++;else t[u++].remove()}}}const Et="_$DX_DELEGATE";function F(e,t,n,r){let s;const i=()=>{const l=document.createElement("template");return l.innerHTML=e,l.content.firstChild},u=()=>(s||(s=i())).cloneNode(!0);return u.cloneNode=u,u}function at(e,t=window.document){const n=t[Et]||(t[Et]=new Set);for(let r=0,s=e.length;r<s;r++){const i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,un))}}function ue(e,t,n){n==null?e.removeAttribute(t):e.setAttribute(t,n)}function Ft(e,t,n){return We(()=>e(t,n))}function f(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return Xe(e,t,r,n);y(s=>Xe(e,t(),s,n),r)}function un(e){let t=e.target;const n=`$$${e.type}`,r=e.target,s=e.currentTarget,i=w=>Object.defineProperty(e,"target",{configurable:!0,value:w}),u=()=>{const w=t[n];if(w&&!t.disabled){const $=t[`${n}Data`];if($!==void 0?w.call(t,$,e):w.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&i(t.host),!0},l=()=>{for(;u()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),e.composedPath){const w=e.composedPath();i(w[0]);for(let $=0;$<w.length-2&&(t=w[$],!!u());$++){if(t._$host){t=t._$host,l();break}if(t.parentNode===s)break}}else l();i(r)}function Xe(e,t,n,r,s){for(;typeof n=="function";)n=n();if(t===n)return n;const i=typeof t,u=r!==void 0;if(e=u&&n[0]&&n[0].parentNode||e,i==="string"||i==="number"){if(i==="number"&&(t=t.toString(),t===n))return n;if(u){let l=n[0];l&&l.nodeType===3?l.data!==t&&(l.data=t):l=document.createTextNode(t),n=Pe(e,n,r,l)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||i==="boolean")n=Pe(e,n,r);else{if(i==="function")return y(()=>{let l=t();for(;typeof l=="function";)l=l();n=Xe(e,l,n,r)}),()=>n;if(Array.isArray(t)){const l=[],w=n&&Array.isArray(n);if(ut(l,t,n,s))return y(()=>n=Xe(e,l,n,r,!0)),()=>n;if(l.length===0){if(n=Pe(e,n,r),u)return n}else w?n.length===0?yt(e,l,r):an(e,n,l):(n&&Pe(e),yt(e,l));n=l}else if(t.nodeType){if(Array.isArray(n)){if(u)return n=Pe(e,n,r,t);Pe(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function ut(e,t,n,r){let s=!1;for(let i=0,u=t.length;i<u;i++){let l=t[i],w=n&&n[e.length],$;if(!(l==null||l===!0||l===!1))if(($=typeof l)=="object"&&l.nodeType)e.push(l);else if(Array.isArray(l))s=ut(e,l,w)||s;else if($==="function")if(r){for(;typeof l=="function";)l=l();s=ut(e,Array.isArray(l)?l:[l],Array.isArray(w)?w:[w])||s}else e.push(l),s=!0;else{const D=String(l);w&&w.nodeType===3&&w.data===D?e.push(w):e.push(document.createTextNode(D))}}return s}function yt(e,t,n=null){for(let r=0,s=t.length;r<s;r++)e.insertBefore(t[r],n)}function Pe(e,t,n,r){if(n===void 0)return e.textContent="";const s=r||document.createTextNode("");if(t.length){let i=!1;for(let u=t.length-1;u>=0;u--){const l=t[u];if(s!==l){const w=l.parentNode===e;!i&&!u?w?e.replaceChild(s,l):e.insertBefore(s,n):w&&l.remove()}else i=!0}}else e.insertBefore(s,n);return[s]}function on(e){return Object.keys(e).reduce((n,r)=>{const s=e[r];return n[r]=Object.assign({},s),kt(s.value)&&!hn(s.value)&&!Array.isArray(s.value)&&(n[r].value=Object.assign({},s.value)),Array.isArray(s.value)&&(n[r].value=s.value.slice(0)),n},{})}function ln(e){return e?Object.keys(e).reduce((n,r)=>{const s=e[r];return n[r]=kt(s)&&"value"in s?s:{value:s},n[r].attribute||(n[r].attribute=fn(r)),n[r].parse="parse"in n[r]?n[r].parse:typeof n[r].value!="string",n},{}):{}}function cn(e){return Object.keys(e).reduce((n,r)=>(n[r]=e[r].value,n),{})}function dn(e,t){const n=on(t);return Object.keys(t).forEach(s=>{const i=n[s],u=e.getAttribute(i.attribute),l=e[s];u!=null&&(i.value=i.parse?$t(u):u),l!=null&&(i.value=Array.isArray(l)?l.slice(0):l),i.reflect&&Bt(e,i.attribute,i.value,!!i.parse),Object.defineProperty(e,s,{get(){return i.value},set(w){const $=i.value;i.value=w,i.reflect&&Bt(this,i.attribute,i.value,!!i.parse);for(let D=0,B=this.__propertyChangedCallbacks.length;D<B;D++)this.__propertyChangedCallbacks[D](s,w,$)},enumerable:!0,configurable:!0})}),n}function $t(e){if(e)try{return JSON.parse(e)}catch{return e}}function Bt(e,t,n,r){if(n==null||n===!1)return e.removeAttribute(t);let s=r?JSON.stringify(n):n;e.__updating[t]=!0,s==="true"&&(s=""),e.setAttribute(t,s),Promise.resolve().then(()=>delete e.__updating[t])}function fn(e){return e.replace(/\.?([A-Z]+)/g,(t,n)=>"-"+n.toLowerCase()).replace("_","-").replace(/^-/,"")}function kt(e){return e!=null&&(typeof e=="object"||typeof e=="function")}function hn(e){return Object.prototype.toString.call(e)==="[object Function]"}function pn(e){return typeof e=="function"&&e.toString().indexOf("class")===0}let ot;function Dn(e,t){const n=Object.keys(t);return class extends e{static get observedAttributes(){return n.map(s=>t[s].attribute)}constructor(){super(),this.__initialized=!1,this.__released=!1,this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props={}}connectedCallback(){if(this.__initialized)return;this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props=dn(this,t);const s=cn(this.props),i=this.Component,u=ot;try{ot=this,this.__initialized=!0,pn(i)?new i(s,{element:this}):i(s,{element:this})}finally{ot=u}}async disconnectedCallback(){if(await Promise.resolve(),this.isConnected)return;this.__propertyChangedCallbacks.length=0;let s=null;for(;s=this.__releaseCallbacks.pop();)s(this);delete this.__initialized,this.__released=!0}attributeChangedCallback(s,i,u){if(this.__initialized&&!this.__updating[s]&&(s=this.lookupProp(s),s in t)){if(u==null&&!this[s])return;this[s]=t[s].parse?$t(u):u}}lookupProp(s){if(t)return n.find(i=>s===i||s===t[i].attribute)}get renderRoot(){return this.shadowRoot||this.attachShadow({mode:"open"})}addReleaseCallback(s){this.__releaseCallbacks.push(s)}addPropertyChangedCallback(s){this.__propertyChangedCallbacks.push(s)}}}function gn(e,t={},n={}){const{BaseElement:r=HTMLElement,extension:s,customElements:i=window.customElements}=n;return u=>{if(!e)throw new Error("tag is required to register a Component");let l=i.get(e);return l?(l.prototype.Component=u,l):(l=Dn(r,ln(t)),l.prototype.Component=u,l.prototype.registeredTag=e,i.define(e,l,s),l)}}function mn(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const[s,i]=C(e[t[r]]);Object.defineProperty(n,t[r],{get:s,set(u){i(()=>u)}})}return n}function bn(e){if(e.assignedSlot&&e.assignedSlot._$owner)return e.assignedSlot._$owner;let t=e.parentNode;for(;t&&!t._$owner&&!(t.assignedSlot&&t.assignedSlot._$owner);)t=t.parentNode;return t&&t.assignedSlot?t.assignedSlot._$owner:e._$owner}function vn(e){return(t,n)=>{const{element:r}=n;return Qt(s=>{const i=mn(t);r.addPropertyChangedCallback((l,w)=>i[l]=w),r.addReleaseCallback(()=>{r.renderRoot.textContent="",s()});const u=e(i,n);return f(r.renderRoot,u)},bn(r))}}function lt(e,t,n){return arguments.length===2&&(n=t,t={}),gn(e,t)(vn(n))}var Cn="٠١٢٣٤٥٦٧٨٩",wn="۰۱۲۳۴۵۶۷۸۹",An="൦൧൨൩൪൫൬൭൮൯",En="೦೧೨೩೪೫೬೭೮೯",Fn="໐໑໒໓໔໕໖໗໘໙",yn="୦୧୨୩୪୫୬୭୮୯",$n="០១២៣៤៥៦៧៨៩",Bn="߀߁߂߃߄߅߆߇߈߉",kn="੦੧੨੩੪੫੬੭੮੯",xn="૦૧૨૩૪૫૬૭૮૯",Sn="०१२३४५६७८९",_n="၀၁၂၃၄၅၆၇၈၉",Tn="௦௧௨௩௪௫௬௭௮௯",On="౦౧౨౩౪౫౬౭౮౯",In="๐๑๒๓๔๕๖๗๘๙",Pn="༠༡༢༣༤༥༦༧༨༩",xt={ar:Cn,fa:wn,ml:An,kn:En,lo:Fn,or:yn,kh:$n,nqo:Bn,pa:kn,gu:xn,hi:Sn,my:_n,ta:Tn,te:On,th:In,bo:Pn},zn=["ru"],Nn=["id"],Mn=["id"],jn=["ady-cyrl"],Rn=["aeb-arab"],Ln=["sq"],qn=["ru"],Un=["zh-hant"],Jn=["es"],Vn=["hi"],Kn=["es"],Gn=["ar"],Hn=["ar"],Wn=["ar"],Zn=["es"],Yn=["fr"],Xn=["ru"],Qn=["fr","es","ru"],er=["hi"],tr=["es"],nr=["fa"],rr=["ru"],sr=["id"],ir=["de"],ar=["bbc-latn"],ur=["fa"],or=["fa"],lr=["bho"],cr=["en"],dr=["id"],fr=["fr"],hr=["bn"],pr=["fa"],Dr=["fr"],gr=["id"],mr=["id"],br=["ru"],vr=["oc"],Cr=["nan","zh-hant"],wr=["ru"],Ar=["it"],Er=["crh-latn"],Fr=["sk"],yr=["pl"],$r=["ru"],Br=["hsb","de"],kr=["ms"],xr=["ne"],Sr=["it"],_r=["it"],Tr=["es"],Or=["fr"],Ir=["fi"],Pr=["fr"],zr=["fr"],Nr=["de"],Mr=["it"],jr=["tr"],Rr=["gan-hant","zh-hant","zh-hans"],Lr=["fr"],qr=["pt"],Ur=["fa"],Jr=["es"],Vr=["gom-deva"],Kr=["id"],Gr=["de"],Hr=["es"],Wr=["zh-hant"],Zr=["hif-latn"],Yr=["de"],Xr=["dsb","de"],Qr=["fr"],es=["hy"],ts=["zh-cn","zh-hans"],ns=["ru"],rs=["eo"],ss=["ike-cans"],is=["en"],as=["da"],us=["id"],os=["kk-latn","kk-cyrl"],ls=["fr"],cs=["kbd-cyrl"],ds=["fr"],fs=["ur"],hs=["tr"],ps=["my"],Ds=["kk-cyrl"],gs=["da"],ms=["ru"],bs=["ru"],vs=["fi"],Cs=["ks-arab"],ws=["de"],As=["ku-latn"],Es=["ru"],Fs=["ru"],ys=["es"],$s=["de"],Bs=["ru"],ks=["ru","az"],xs=["nl"],Ss=["it"],_s=["et"],Ts=["fa"],Os=["it","rm","fur"],Is=["pms","eml","lij","vec","it"],Ps=["fr"],zs=["fa"],Ns=["lv"],Ms=["fa"],js=["zh-hant"],Rs=["tr"],Ls=["id"],qs=["hi"],Us=["myv","ru"],Js=["fr"],Vs=["mrj","ru"],Ks=["id"],Gs=["my"],Hs=["ro"],Ws=["mhr","ru"],Zs=["pt"],Ys=["mdf","ru"],Xs=["fa"],Qs=["es"],ei=["cdo","zh-hant"],ti=["it"],ni=["nn"],ri=["de"],si=["id"],ii=["nb"],ai=["fr"],ui=["ca","fr"],oi=["fi"],li=["ru"],ci=["fr"],di=["de"],fi=["de"],hi=["de"],pi=["en"],Di=["it"],gi=["el"],mi=["pt-br"],bi=["qug","es"],vi=["qu","es"],Ci=["it"],wi=["ro"],Ai=["uk","ru"],Ei=["ro"],Fi=["ruq-latn","ro"],yi=["hi"],$i=["ru"],Bi=["it"],ki=["en"],xi=["it"],Si=["cbk","fa"],_i=["fr"],Ti=["fr"],Oi=["lt"],Ii=["bs","sr-el","hr"],Pi=["fr"],zi=["shy-latn"],Ni=["cs"],Mi=["skr-arab"],ji=["de"],Ri=["fi"],Li=["sr-ec"],qi=["nl"],Ui=["de"],Ji=["ru"],Vi=["id"],Ki=["pl"],Gi=["zh-tw","zh-hant","zh-hans"],Hi=["zh-tw","zh-hant","zh-hans"],Wi=["kn"],Zi=["pt"],Yi=["tg-cyrl"],Xi=["zh-tw","zh-hant","zh-hans"],Qi=["tt-cyrl","ru"],ea=["fr"],ta=["ru"],na=["ru"],ra=["ug-arab"],sa=["it"],ia=["et"],aa=["nl"],ua=["de"],oa=["fi"],la=["et"],ca=["fr"],da=["fr"],fa=["zh-hans"],ha=["ru"],pa=["ka"],Da=["he"],ga=["zh-hans"],ma=["nl"],ba=["kab"],va=["zh-hans"],St={ab:zn,abs:Nn,ace:Mn,ady:jn,aeb:Rn,"aeb-arab":["ar"],aln:Ln,alt:qn,ami:Un,an:Jn,anp:Vn,arn:Kn,arq:Gn,ary:Hn,arz:Wn,ast:Zn,atj:Yn,av:Xn,avk:Qn,awa:er,ay:tr,azb:nr,ba:rr,ban:sr,"ban-bali":["ban"],bar:ir,bbc:ar,"bbc-latn":["id"],bcc:ur,"be-tarask":["be"],bgn:or,bh:lr,bi:cr,bjn:dr,bm:fr,bpy:hr,bqi:pr,br:Dr,btm:gr,bug:mr,bxr:br,ca:vr,"cbk-zam":["es"],cdo:Cr,ce:wr,co:Ar,crh:Er,"crh-cyrl":["ru"],cs:Fr,csb:yr,cv:$r,"de-at":["de"],"de-ch":["de"],"de-formal":["de"],dsb:Br,dtp:kr,dty:xr,egl:Sr,eml:_r,"en-ca":["en"],"en-gb":["en"],"es-419":["es"],"es-formal":["es"],ext:Tr,ff:Or,fit:Ir,frc:Pr,frp:zr,frr:Nr,fur:Mr,gag:jr,gan:Rr,"gan-hans":["zh-hans"],"gan-hant":["zh-hant","zh-hans"],gcr:Lr,gl:qr,glk:Ur,gn:Jr,gom:Vr,"gom-deva":["hi"],gor:Kr,gsw:Gr,guc:Hr,hak:Wr,hif:Zr,hrx:Yr,hsb:Xr,ht:Qr,"hu-formal":["hu"],hyw:es,ii:ts,inh:ns,io:rs,iu:ss,jam:is,jut:as,jv:us,kaa:os,kab:ls,kbd:cs,kbp:ds,khw:fs,kiu:hs,kjp:ps,kk:Ds,"kk-arab":["kk-cyrl"],"kk-cn":["kk-arab","kk-cyrl"],"kk-kz":["kk-cyrl"],"kk-latn":["kk-cyrl"],"kk-tr":["kk-latn","kk-cyrl"],kl:gs,"ko-kp":["ko"],koi:ms,krc:bs,krl:vs,ks:Cs,ksh:ws,ku:As,"ku-arab":["ckb"],kum:Es,kv:Fs,lad:ys,lb:$s,lbe:Bs,lez:ks,li:xs,lij:Ss,liv:_s,lki:Ts,lld:Os,lmo:Is,ln:Ps,lrc:zs,ltg:Ns,luz:Ms,lzh:js,lzz:Rs,mad:Ls,mai:qs,"map-bms":["jv","id"],mdf:Us,mg:Js,mhr:Vs,min:Ks,mnw:Gs,mo:Hs,mrj:Ws,"ms-arab":["ms"],mwl:Zs,myv:Ys,mzn:Xs,nah:Qs,nan:ei,nap:ti,nb:ni,nds:ri,"nds-nl":["nl"],nia:si,"nl-informal":["nl"],nn:ii,nrm:ai,oc:ui,olo:oi,os:li,pcd:ci,pdc:di,pdt:fi,pfl:hi,pih:pi,pms:Di,pnt:gi,pt:mi,"pt-br":["pt"],qu:bi,qug:vi,rgn:Ci,rmy:wi,"roa-tara":["it"],rue:Ai,rup:Ei,ruq:Fi,"ruq-cyrl":["mk"],"ruq-latn":["ro"],sa:yi,sah:$i,scn:Bi,sco:ki,sdc:xi,sdh:Si,ses:_i,sg:Ti,sgs:Oi,sh:Ii,shi:Pi,shy:zi,"shy-latn":["fr"],sk:Ni,skr:Mi,"skr-arab":["ur","pnb"],sli:ji,smn:Ri,sr:Li,srn:qi,stq:Ui,sty:Ji,su:Vi,szl:Ki,szy:Gi,tay:Hi,tcy:Wi,tet:Zi,tg:Yi,trv:Xi,tt:Qi,"tt-cyrl":["ru"],ty:ea,tyv:ta,udm:na,ug:ra,vec:sa,vep:ia,vls:aa,vmf:ua,vot:oa,vro:la,wa:ca,wo:da,wuu:fa,xal:ha,xmf:pa,yi:Da,za:ga,zea:ma,zgh:ba,zh:va,"zh-cn":["zh-hans"],"zh-hant":["zh-hans"],"zh-hk":["zh-hant","zh-hans"],"zh-mo":["zh-hk","zh-hant","zh-hans"],"zh-my":["zh-sg","zh-hans"],"zh-sg":["zh-hans"],"zh-tw":["zh-hant","zh-hans"]};let de=class{constructor(e){this.locale=e}convertPlural(e,t){const n=/\d+=/i;if(!t||t.length===0)return"";for(let s=0;s<t.length;s++){const i=t[s];if(n.test(i)){if(parseInt(i.slice(0,i.indexOf("=")),10)===e)return i.slice(i.indexOf("=")+1);t[s]=void 0}}t=t.filter(s=>!!s);let r=this.getPluralForm(e,this.locale);return r=Math.min(r,t.length-1),t[r]}getPluralForm(e,t){const n=["zero","one","two","few","many","other"],r=new Intl.PluralRules(t),s=r.resolvedOptions().pluralCategories,i=r.select(e);return n.filter(u=>s.includes(u)).indexOf(i)}convertNumber(e,t=!1){let n=this.digitTransformTable(this.locale),r="";if(t){if(parseFloat(e,10)===e||!n)return e;const s=[];for(const u in n)s[n[u]]=u;n=s;const i=String(e);for(let u=0;u<i.length;u++)r+=n[i[u]]||i[u];return parseFloat(r,10)}if(Intl.NumberFormat){let s;const i=[...St[this.locale]||[],"en"];return Intl.NumberFormat.supportedLocalesOf(this.locale).length?s=[this.locale]:s=i,r=new Intl.NumberFormat(s).format(e),r==="NaN"&&(r=e),r}}convertGrammar(e){return e}gender(e,t){if(!t||t.length===0)return"";for(;t.length<2;)t.push(t[t.length-1]);return e==="male"?t[0]:e==="female"?t[1]:t.length===3?t[2]:t[0]}digitTransformTable(e){return xt[e]?xt[e].split(""):!1}},Ca=class extends de{convertGrammar(e,t){switch(t){case"prefixed":case"תחילית":e.slice(0,1)==="ו"&&e.slice(0,2)!=="וו"&&(e="ו"+e),e.slice(0,1)==="ה"&&(e=e.slice(1)),(e.slice(0,1)<"א"||e.slice(0,1)>"ת")&&(e="־"+e)}return e}},wa=class extends de{convertGrammar(t,n){switch(n){case"instrumental":t="s "+t;break;case"lokativ":t="o "+t;break}return t}},Aa=class extends de{convertGrammar(e,t){switch(t){case"instrumental":e="z "+e;break;case"lokatiw":e="wo "+e;break}return e}},Ea=class extends de{convertGrammar(e,t){switch(t){case"instrumental":e="z "+e;break;case"lokatiw":e="wo "+e;break}return e}},Fa=class extends de{convertGrammar(e,t){let n=e.match(/[aou][^äöy]*$/i);const r=e;switch(e.match(/wiki$/i)&&(n=!1),e.match(/[bcdfghjklmnpqrstvwxz]$/i)&&(e+="i"),t){case"genitive":e+="n";break;case"elative":e+=n?"sta":"stä";break;case"partitive":e+=n?"a":"ä";break;case"illative":e+=e.slice(-1)+"n";break;case"inessive":e+=n?"ssa":"ssä";break;default:e=r;break}return e}},ya=class extends de{convertGrammar(e,t){return t==="genitive"&&(e.slice(-1)==="ь"?e=e.slice(0,-1)+"я":e.slice(-2)==="ия"?e=e.slice(0,-2)+"ии":e.slice(-2)==="ка"?e=e.slice(0,-2)+"ки":e.slice(-2)==="ти"?e=e.slice(0,-2)+"тей":e.slice(-2)==="ды"?e=e.slice(0,-2)+"дов":e.slice(-3)==="ник"&&(e=e.slice(0,-3)+"ника")),e}};class $a extends de{convertGrammar(t,n){switch(n){case"mestnik":t="o "+t;break;case"orodnik":t="z "+t;break}return t}}let Ba=class extends de{convertGrammar(e,t){switch(t){case"genitive":e=e.replace(/u[ms]$/i,"i"),e=e.replace(/ommunia$/i,"ommunium"),e=e.replace(/a$/i,"ae"),e=e.replace(/libri$/i,"librorum"),e=e.replace(/nuntii$/i,"nuntiorum"),e=e.replace(/tio$/i,"tionis"),e=e.replace(/ns$/i,"ntis"),e=e.replace(/as$/i,"atis"),e=e.replace(/es$/i,"ei");break;case"accusative":e=e.replace(/u[ms]$/i,"um"),e=e.replace(/ommunia$/i,"am"),e=e.replace(/a$/i,"ommunia"),e=e.replace(/libri$/i,"libros"),e=e.replace(/nuntii$/i,"nuntios"),e=e.replace(/tio$/i,"tionem"),e=e.replace(/ns$/i,"ntem"),e=e.replace(/as$/i,"atem"),e=e.replace(/es$/i,"em");break;case"ablative":e=e.replace(/u[ms]$/i,"o"),e=e.replace(/ommunia$/i,"ommunibus"),e=e.replace(/a$/i,"a"),e=e.replace(/libri$/i,"libris"),e=e.replace(/nuntii$/i,"nuntiis"),e=e.replace(/tio$/i,"tione"),e=e.replace(/ns$/i,"nte"),e=e.replace(/as$/i,"ate"),e=e.replace(/es$/i,"e");break}return e}};class ka extends de{convertGrammar(t,n){return n==="genitive"&&(t.slice(-1)==="ա"?t=t.slice(0,-1)+"այի":t.slice(-1)==="ո"?t=t.slice(0,-1)+"ոյի":t.slice(-4)==="գիրք"?t=t.slice(0,-4)+"գրքի":t=t+"ի"),t}}let xa=class extends de{convertGrammar(e,t){if(t==="ainmlae")switch(e){case"an Domhnach":e="Dé Domhnaigh";break;case"an Luan":e="Dé Luain";break;case"an Mháirt":e="Dé Mháirt";break;case"an Chéadaoin":e="Dé Chéadaoin";break;case"an Déardaoin":e="Déardaoin";break;case"an Aoine":e="Dé hAoine";break;case"an Satharn":e="Dé Sathairn";break}return e}},Sa=class extends de{convertGrammar(e,t){switch(t){case"rol":e+="ról";break;case"ba":e+="ba";break;case"k":e+="k";break}return e}},_a=class extends de{convertGrammar(e,t){let n,r,s,i;switch(n="мæ",r="",s="",i="",e.match(/тæ$/i)?(e=e.slice(0,-1),n="æм"):e.match(/[аæеёиоыэюя]$/i)?r="й":e.match(/у$/i)?e.slice(-2,-1).match(/[аæеёиоыэюя]$/i)||(r="й"):e.match(/[бвгджзйклмнопрстфхцчшщьъ]$/i)||(s="-"),t){case"genitive":i=s+r+"ы";break;case"dative":i=s+r+"æн";break;case"allative":i=s+n;break;case"ablative":r==="й"?i=s+r+"æ":i=s+r+"æй";break;case"superessive":i=s+r+"ыл";break;case"equative":i=s+r+"ау";break;case"comitative":i=s+"имæ";break}return e+i}};class Ta extends de{convertGrammar(t,n){switch(n){case"genitive":t.slice(-1)==="ь"?t=t.slice(0,-1)+"я":t.slice(-2)==="ія"?t=t.slice(0,-2)+"ії":t.slice(-2)==="ка"?t=t.slice(0,-2)+"ки":t.slice(-2)==="ти"?t=t.slice(0,-2)+"тей":t.slice(-2)==="ды"?t=t.slice(0,-2)+"дов":t.slice(-3)==="ник"&&(t=t.slice(0,-3)+"ника");break;case"accusative":t.slice(-2)==="ія"&&(t=t.slice(0,-2)+"ію");break}return t}}var _t={bs:wa,default:de,dsb:Aa,fi:Fa,ga:xa,he:Ca,hsb:Ea,hu:Sa,hy:ka,la:Ba,os:_a,ru:ya,sl:$a,uk:Ta};const Oa=new RegExp("(?:([A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁːˑˠ-ˤˮͰ-ͳͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-҂Ҋ-ԯԱ-Ֆՙ-՟ա-և։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ঀংঃঅ-ঌএঐও-নপ-রলশ-হঽ-ীেৈোৌৎৗড়ঢ়য়-ৡ০-ৱ৴-৺ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਾ-ੀਖ਼-ੜਫ਼੦-੯ੲ-ੴઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽ-ીૉોૌૐૠૡ૦-૰ૹଂଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽାୀେୈୋୌୗଡ଼ଢ଼ୟ-ୡ୦-୷ஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹாிுூெ-ைொ-ௌௐௗ௦-௲ఁ-ఃఅ-ఌఎ-ఐఒ-నప-హఽు-ౄౘ-ౚౠౡ౦-౯౿ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೄೆ-ೈೊೋೕೖೞೠೡ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ീെ-ൈൊ-ൌൎൗൟ-ൡ൦-൵൹-ൿංඃඅ-ඖක-නඳ-රලව-ෆා-ෑෘ-ෟ෦-෯ෲ-෴ก-ะาำเ-ๆ๏-๛ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆ໐-໙ໜ-ໟༀ-༗༚-༴༶༸༾-ཇཉ-ཬཿ྅ྈ-ྌ྾-࿅࿇-࿌࿎-࿚က-ာေးျြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃႄႇ-ႌႎ-ႜ႞-ჅჇჍა-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፠-፼ᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙿᚁ-ᚚᚠ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱ᜵᜶ᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳាើ-ៅះៈ។-៚ៜ០-៩᠐-᠙ᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᤣ-ᤦᤩ-ᤫᤰᤱᤳ-ᤸ᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧚ᨀ-ᨖᨙᨚ᨞-ᩕᩗᩡᩣᩤᩭ-ᩲ᪀-᪉᪐-᪙᪠-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-ᭋ᭐-᭪᭴-᭼ᮂ-ᮡᮦᮧ᮪ᮮ-ᯥᯧᯪ-ᯬᯮ᯲᯳᯼-ᰫᰴᰵ᰻-᱉ᱍ-᱿᳀-᳇᳓᳡ᳩ-ᳬᳮ-ᳳᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵰ⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〮〯〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎ㆐-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㋾㌀-㍶㍻-㏝㏠-㏾㐀-䶵一-鿕ꀀ-ꒌꓐ-ꘌꘐ-ꘫꙀ-ꙮꚀ-ꚝꚠ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꞭꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꣽ꤀-ꤥ꤮-ꥆꥒ꥓꥟-ꥼꦃ-ꦲꦴꦵꦺꦻꦽ-꧍ꧏ-꧙꧞-ꧤꧦ-ꧾꨀ-ꨨꨯꨰꨳꨴꩀ-ꩂꩄ-ꩋꩍ꩐-꩙꩜-ꩻꩽ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫫꫮ-ꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭥꭰ-ꯤꯦꯧꯩ-꯬꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ-舘並-龎ff-stﬓ-ﬗA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]|\uD800[\uDC00-\uDC0B]|\uD800[\uDC0D-\uDC26]|\uD800[\uDC28-\uDC3A]|𐀼|𐀽|\uD800[\uDC3F-\uDC4D]|\uD800[\uDC50-\uDC5D]|\uD800[\uDC80-\uDCFA]|𐄀|𐄂|\uD800[\uDD07-\uDD33]|\uD800[\uDD37-\uDD3F]|\uD800[\uDDD0-\uDDFC]|\uD800[\uDE80-\uDE9C]|\uD800[\uDEA0-\uDED0]|\uD800[\uDF00-\uDF23]|\uD800[\uDF30-\uDF4A]|\uD800[\uDF50-\uDF75]|\uD800[\uDF80-\uDF9D]|\uD800[\uDF9F-\uDFC3]|\uD800[\uDFC8-\uDFD5]|\uD801[\uDC00-\uDC9D]|\uD801[\uDCA0-\uDCA9]|\uD801[\uDD00-\uDD27]|\uD801[\uDD30-\uDD63]|𐕯|\uD801[\uDE00-\uDF36]|\uD801[\uDF40-\uDF55]|\uD801[\uDF60-\uDF67]|𑀀|\uD804[\uDC02-\uDC37]|\uD804[\uDC47-\uDC4D]|\uD804[\uDC66-\uDC6F]|\uD804[\uDC82-\uDCB2]|𑂷|𑂸|\uD804[\uDCBB-\uDCC1]|\uD804[\uDCD0-\uDCE8]|\uD804[\uDCF0-\uDCF9]|\uD804[\uDD03-\uDD26]|𑄬|\uD804[\uDD36-\uDD43]|\uD804[\uDD50-\uDD72]|\uD804[\uDD74-\uDD76]|\uD804[\uDD82-\uDDB5]|\uD804[\uDDBF-\uDDC9]|𑇍|\uD804[\uDDD0-\uDDDF]|\uD804[\uDDE1-\uDDF4]|\uD804[\uDE00-\uDE11]|\uD804[\uDE13-\uDE2E]|𑈲|𑈳|𑈵|\uD804[\uDE38-\uDE3D]|\uD804[\uDE80-\uDE86]|𑊈|\uD804[\uDE8A-\uDE8D]|\uD804[\uDE8F-\uDE9D]|\uD804[\uDE9F-\uDEA9]|\uD804[\uDEB0-\uDEDE]|\uD804[\uDEE0-\uDEE2]|\uD804[\uDEF0-\uDEF9]|𑌂|𑌃|\uD804[\uDF05-\uDF0C]|𑌏|𑌐|\uD804[\uDF13-\uDF28]|\uD804[\uDF2A-\uDF30]|𑌲|𑌳|\uD804[\uDF35-\uDF39]|\uD804[\uDF3D-\uDF3F]|\uD804[\uDF41-\uDF44]|𑍇|𑍈|\uD804[\uDF4B-\uDF4D]|𑍐|𑍗|\uD804[\uDF5D-\uDF63]|\uD805[\uDC80-\uDCB2]|𑒹|\uD805[\uDCBB-\uDCBE]|𑓁|\uD805[\uDCC4-\uDCC7]|\uD805[\uDCD0-\uDCD9]|\uD805[\uDD80-\uDDB1]|\uD805[\uDDB8-\uDDBB]|𑖾|\uD805[\uDDC1-\uDDDB]|\uD805[\uDE00-\uDE32]|𑘻|𑘼|𑘾|\uD805[\uDE41-\uDE44]|\uD805[\uDE50-\uDE59]|\uD805[\uDE80-\uDEAA]|𑚬|𑚮|𑚯|𑚶|\uD805[\uDEC0-\uDEC9]|\uD805[\uDF00-\uDF19]|𑜠|𑜡|𑜦|\uD805[\uDF30-\uDF3F]|\uD806[\uDCA0-\uDCF2]|𑣿|\uD806[\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E]|\uD809[\uDC70-\uDC74]|\uD809[\uDC80-\uDD43]|\uD80C[\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38]|\uD81A[\uDE40-\uDE5E]|\uD81A[\uDE60-\uDE69]|𖩮|𖩯|\uD81A[\uDED0-\uDEED]|𖫵|\uD81A[\uDF00-\uDF2F]|\uD81A[\uDF37-\uDF45]|\uD81A[\uDF50-\uDF59]|\uD81A[\uDF5B-\uDF61]|\uD81A[\uDF63-\uDF77]|\uD81A[\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44]|\uD81B[\uDF50-\uDF7E]|\uD81B[\uDF93-\uDF9F]|𛀀|𛀁|\uD82F[\uDC00-\uDC6A]|\uD82F[\uDC70-\uDC7C]|\uD82F[\uDC80-\uDC88]|\uD82F[\uDC90-\uDC99]|𛲜|𛲟|\uD834[\uDC00-\uDCF5]|\uD834[\uDD00-\uDD26]|\uD834[\uDD29-\uDD66]|\uD834[\uDD6A-\uDD72]|𝆃|𝆄|\uD834[\uDD8C-\uDDA9]|\uD834[\uDDAE-\uDDE8]|\uD834[\uDF60-\uDF71]|\uD835[\uDC00-\uDC54]|\uD835[\uDC56-\uDC9C]|𝒞|𝒟|𝒢|𝒥|𝒦|\uD835[\uDCA9-\uDCAC]|\uD835[\uDCAE-\uDCB9]|𝒻|\uD835[\uDCBD-\uDCC3]|\uD835[\uDCC5-\uDD05]|\uD835[\uDD07-\uDD0A]|\uD835[\uDD0D-\uDD14]|\uD835[\uDD16-\uDD1C]|\uD835[\uDD1E-\uDD39]|\uD835[\uDD3B-\uDD3E]|\uD835[\uDD40-\uDD44]|𝕆|\uD835[\uDD4A-\uDD50]|\uD835[\uDD52-\uDEA5]|\uD835[\uDEA8-\uDEDA]|\uD835[\uDEDC-\uDF14]|\uD835[\uDF16-\uDF4E]|\uD835[\uDF50-\uDF88]|\uD835[\uDF8A-\uDFC2]|\uD835[\uDFC4-\uDFCB]|\uD836[\uDC00-\uDDFF]|\uD836[\uDE37-\uDE3A]|\uD836[\uDE6D-\uDE74]|\uD836[\uDE76-\uDE83]|\uD836[\uDE85-\uDE8B]|\uD83C[\uDD10-\uDD2E]|\uD83C[\uDD30-\uDD69]|\uD83C[\uDD70-\uDD9A]|\uD83C[\uDDE6-\uDE02]|\uD83C[\uDE10-\uDE3A]|\uD83C[\uDE40-\uDE48]|🉐|🉑|[\uD840-\uD868][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6]|\uD869[\uDF00-\uDFFF]|[\uD86A-\uD86C][\uDC00-\uDFFF]|\uD86D[\uDC00-\uDF34]|\uD86D[\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD86E[\uDC20-\uDFFF]|[\uD86F-\uD872][\uDC00-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|[\uDB80-\uDBBE][\uDC00-\uDFFF]|\uDBBF[\uDC00-\uDFFD]|[\uDBC0-\uDBFE][\uDC00-\uDFFF]|\uDBFF[\uDC00-\uDFFD])|([֐־׀׃׆׈-׿߀-ߪߴߵߺ-ࠕࠚࠤࠨ࠮-ࡘ࡜-࢟‏יִײַ-ﬨשׁ-ﭏ؈؋؍؛-ي٭-ٯٱ-ەۥۦۮۯۺ-ܐܒ-ܯ݋-ޥޱ-޿ࢠ-࣢ﭐ-ﴽ﵀-﷏ﷰ-﷼﷾﷿ﹰ-﻾]|\uD802[\uDC00-\uDD1E]|\uD802[\uDD20-\uDE00]|𐨄|\uD802[\uDE07-\uDE0B]|\uD802[\uDE10-\uDE37]|\uD802[\uDE3B-\uDE3E]|\uD802[\uDE40-\uDEE4]|\uD802[\uDEE7-\uDF38]|\uD802[\uDF40-\uDFFF]|\uD803[\uDC00-\uDE5F]|\uD803[\uDE7F-\uDFFF]|\uD83A[\uDC00-\uDCCF]|\uD83A[\uDCD7-\uDFFF]|\uD83B[\uDC00-\uDDFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDE00-\uDEEF]|\uD83B[\uDEF2-\uDEFF]))");let Tt=class{constructor(e){this.locale=ze(e),this.language=new(_t[this.locale]||_t.default)(this.locale)}emit(e,t){let n,r,s;switch(typeof e){case"string":case"number":n=e;break;case"object":if(r=e.slice(1).map(i=>this.emit(i,t)),s=e[0].toLowerCase(),typeof this[s]=="function")n=this[s](r,t);else throw new Error('unknown operation "'+s+'"');break;case"undefined":n="";break;default:throw new Error("unexpected type in AST: "+typeof e)}return n}concat(e){let t="";return e.forEach(n=>{t+=n}),t}replace(e,t){const n=parseInt(e[0],10);return n<t.length?t[n]:"$"+(n+1)}plural(e){const t=parseFloat(this.language.convertNumber(e[0],10)),n=e.slice(1);return n.length?this.language.convertPlural(t,n):""}gender(e){const t=e[0],n=e.slice(1);return this.language.gender(t,n)}grammar(e){const t=e[0],n=e[1];return n&&t&&this.language.convertGrammar(n,t)}wikilink(e){let t,n=e[0];n.charAt(0)===":"&&(n=n.slice(1));const r=`./${n}`;return e.length===1?t=n:t=e[1],`<a href="${r}" title="${n}">${t}</a>`}extlink(e){if(e.length!==2)throw new Error("Expected two items in the node");return`<a href="${e[0]}">${e[1]}</a>`}bidi(e){const t=Ia(e[0]);return t==="ltr"?"‪"+e[0]+"‬":t==="rtl"?"‫"+e[0]+"‬":e[0]}formatnum(e){const t=!!e[1]&&e[1]==="R",n=e[0];return typeof n=="string"||typeof n=="number"?this.language.convertNumber(n,t):n}htmlattributes(e){const t={};for(let n=0,r=e.length;n<r;n+=2)t[e[n]]=e[n+1];return t}htmlelement(e){const t=e.shift(),n=e.shift();let r=e,s="";for(const u in n)s+=` ${u}="${n[u]}"`;Array.isArray(r)||(r=[r]);const i=r.join("");return`<${t}${s}>${i}</${t}>`}};function ze(e){return typeof e=="string"?e.toLowerCase():e}function Ia(e){const t=e.match(Oa);return t?t[2]===void 0?"ltr":"rtl":null}function Pa(e,{wikilinks:t=!1}={}){let n=0;function r(c){return()=>{for(let m=0;m<c.length;m++){const I=c[m]();if(I!==null)return I}return null}}function s(c){const m=n,I=[];for(let x=0;x<c.length;x++){const ee=c[x]();if(ee===null)return n=m,null;I.push(ee)}return I}function i(c,m){return()=>{const I=n,x=[];let ee=m();for(;ee!==null;)x.push(ee),ee=m();return x.length<c?(n=I,null):x}}function u(c){const m=c.length;return()=>{let I=null;return e.slice(n,n+m)===c&&(I=c,n+=m),I}}function l(c){return()=>{const m=e.slice(n).match(c);return m===null?null:(n+=m[0].length,m[0])}}const w=l(/^\s+/),$=u("|"),D=u(":"),B=u("\\"),oe=l(/^./),fe=u("$"),Fe=l(/^\d+/),L=u('"'),Z=u("'"),Y=l(t?/^[^{}[\]$<\\]/:/^[^{}$<\\]/),le=l(t?/^[^{}[\]$\\|]/:/^[^{}$\\|]/),G=l(t?/^[^{}[\]$\s]/:/^[^{}$\s]/);function te(c,m){return()=>{const I=c();return I===null?null:m(I)}}function V(){const c=i(1,X)();return c===null?null:c.join("")}function we(){const c=i(1,$e)();return c===null?null:c.join("")}const ye=r([k,G]);function Ae(){const c=i(1,ye)();return c===null?null:c.join("")}function k(){const c=s([B,oe]);return c===null?null:c[1]}const X=r([k,le]),$e=r([k,Y]);function De(){const c=s([fe,Fe]);return c===null?null:["REPLACE",parseInt(c[1],10)-1]}const ge=te(l(/^[ !"$&'()*,./0-9;=?@A-Z^_`a-z~\x80-\xFF+-]+/),function(c){return c.toString()});function b(){const c=s([$,i(0,H)]);if(c===null)return null;const m=c[1];return m.length>1?["CONCAT"].concat(m):m[0]}function me(){const c=s([ge,D,De]);return c===null?null:[c[0],c[2]]}function Ue(){const c=s([ge,D,H]);return c===null?null:[c[0],c[2]]}function be(){const c=s([ge,D]);return c===null?null:[c[0],""]}const Me=r([function(){const c=s([r([me,Ue,be]),i(0,b)]);return c===null?null:c[0].concat(c[1])},function(){const c=s([ge,i(0,b)]);return c===null?null:[c[0]].concat(c[1])}]),Je=u("{{"),Ve=u("}}"),Te=u("[["),Oe=u("]]"),Ie=u("["),je=u("]");function ve(){const c=s([Je,Me,Ve]);return c===null?null:c[1]}function Se(){const c=s([i(1,H),$,i(1,q)]);return c===null?null:[["CONCAT"].concat(c[0]),["CONCAT"].concat(c[2])]}function _e(){const c=s([i(1,H)]);return c===null?null:[["CONCAT"].concat(c[0])]}const A=r([Se,_e]);function v(){let c=null;const m=s([Te,A,Oe]);if(m!==null){const I=m[1];c=["WIKILINK"].concat(I)}return c}function S(){let c=null;const m=s([Ie,i(1,K),w,i(1,q),je]);return m!==null&&(c=["EXTLINK",m[1].length===1?m[1][0]:["CONCAT"].concat(m[1]),["CONCAT"].concat(m[3])]),c}const R=l(/^[A-Za-z]+/);function d(c,m,I,x={allowedHtmlElements:["b","bdi","del","i","ins","u","font","big","small","sub","sup","h1","h2","h3","h4","h5","h6","cite","code","em","s","strike","strong","tt","var","div","center","blockquote","ol","ul","dl","table","caption","pre","ruby","rb","rp","rt","rtc","p","span","abbr","dfn","kbd","samp","data","time","mark","li","dt","dd"],allowedHtmlCommonAttributes:["id","class","style","lang","dir","title","aria-describedby","aria-flowto","aria-hidden","aria-label","aria-labelledby","aria-owns","role","about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"],allowedHtmlAttributesByElement:{}}){if(c=c.toLowerCase(),m=m.toLowerCase(),c!==m||x.allowedHtmlElements.indexOf(c)===-1)return!1;const ee=/[\000-\010\013\016-\037\177]|expression|filter\s*:|accelerator\s*:|-o-link\s*:|-o-link-source\s*:|-o-replace\s*:|url\s*\(|image\s*\(|image-set\s*\(/i;for(let se=0,ie=I.length;se<ie;se+=2){const he=I[se];if(x.allowedHtmlCommonAttributes.indexOf(he)===-1&&(x.allowedHtmlAttributesByElement[c]||[]).indexOf(he)===-1||he==="style"&&I[se+1].search(ee)!==-1)return!1}return!0}function _(){const c=l(/^[^"]*/),m=s([L,c,L]);return m===null?null:m[1]}function z(){const c=l(/^[^']*/),m=s([Z,c,Z]);return m===null?null:m[1]}function P(){const c=l(/^\s*=\s*/),m=s([w,R,c,r([_,z])]);return m===null?null:[m[1],m[3]]}function O(){const c=i(0,P)();return Array.prototype.concat.apply(["HTMLATTRIBUTES"],c)}function Q(){let c=null;const m=n,I=u("<"),x=l(/^\/?/),ee=l(/^\s*>/),se=s([I,R,O,x,ee]);if(se===null)return null;const ie=n,he=se[1],Be=i(0,q)(),Dt=n,o=u("</"),g=s([o,R,ee]);if(g===null)return["CONCAT",e.slice(m,ie)].concat(Be);const E=n,ce=g[1],ke=se[2],j=ke.slice(1);if(d(he,ce,j))c=["HTMLELEMENT",he,ke].concat(Be);else{const a=p=>p.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;");c=["CONCAT",a(e.slice(m,ie))].concat(Be,a(e.slice(Dt,E)))}return c}const K=r([ve,De,v,S,Ae]),q=r([ve,De,v,S,Q,we]),H=r([ve,De,V]);function re(){const c=i(0,q)();return c===null?null:["CONCAT"].concat(c)}const U=re();if(U===null||n!==e.length)throw new Error("Parse error at position "+n.toString()+" in input: "+e);return U}class Ot{constructor(t,{wikilinks:n=!1}={}){this.locale=ze(t),this.wikilinks=n,this.emitter=new Tt(this.locale)}parse(t,n){if(t.includes("{{")||t.includes("<")||this.wikilinks&&t.includes("[")){const r=Pa(t,{wikilinks:this.wikilinks});return this.emitter.emit(r,n)}else return this.simpleParse(t,n)}simpleParse(t,n){return t.replace(/\$(\d+)/g,(r,s)=>{const i=parseInt(s,10)-1;return n[i]!==void 0?n[i]:"$"+s})}}class za{constructor(){this.sourceMap=new Map}load(t,n){if(typeof t!="object")throw new Error("Invalid message source. Must be an object");if(n=ze(n),n){if(!/^[a-zA-Z0-9-]+$/.test(n))throw new Error(`Invalid locale ${n}`);for(const r in t)if(r.indexOf("@")!==0){if(typeof t[r]=="object")return this.load(t);if(typeof t[r]!="string")throw new Error(`Invalid message for message ${r} in ${n} locale.`);break}this.sourceMap.has(n)?this.sourceMap.set(n,Object.assign(this.sourceMap.get(n),t)):this.sourceMap.set(n,t)}else for(n in t)this.load(t[n],n)}getMessage(t,n){const r=this.sourceMap.get(ze(n));return r?r[t]:null}hasLocale(t){return this.sourceMap.has(t)}}class Na{constructor(t,{finalFallback:n="en",messages:r=void 0,wikilinks:s=!1}={}){this.locale=ze(t),this.parser=new Ot(this.locale,{wikilinks:s}),this.messageStore=new za,r&&this.load(r,this.locale),this.finalFallback=n,this.wikilinks=s}load(t,n){return this.messageStore.load(t,n||this.locale)}i18n(t,...n){return this.parser.parse(this.getMessage(t),n)}setLocale(t){this.locale=ze(t),this.parser=new Ot(this.locale,{wikilinks:this.wikilinks})}getFallbackLocales(){return[...St[this.locale]||[],this.finalFallback]}getMessage(t){let n=this.locale,r=0;const s=this.getFallbackLocales(this.locale);for(;n;){const i=n.split("-");let u=i.length;do{const l=i.slice(0,u).join("-"),w=this.messageStore.getMessage(t,l);if(typeof w=="string")return w;u--}while(u);n=s[r],r++}return t}registerParserPlugin(t,n){Tt.prototype[t]=n}}const It={"@metadata":{authors:["Mason Payne"],"last-updated":"2024-01-08",locale:"en"},"sa-login":"Login","sa-username":"Email","sa-password":"Password","sa-use-password":"Use Password","sa-code":"Code","sa-signup":"Sign up","sa-signup-complete":"Sign up complete","sa-back":"Back","sa-error-creating-user":"Error creating user.","sa-remember":"Remember me","sa-forgot":"Forgot your password?","sa-register":"Register","sa-error.login":"Invalid email or password","sa-error.register":"Invalid email or password","sa-error.unknown":"Unknown error","sa-account-settings":"Account Settings","sa-webauthn-security-keys":"Your passkeys","sa-add-security-key":"Add passkey","webauthn-not-enrolled":"WebAuthn not enrolled","sa-webauthn-key-name":"Key Name","sa-cancel":"Cancel","sa-no-security-keys":"No passkeys","sa-webauthn-key-actions":"Actions","sa-remove":"Remove","not-authenticated":"Not authenticated","error-otp-registration":"Error registering OTP","sa-confirm-delete-key":"Are you sure you want to delete this key?","sa-add-mfa":"Manage MFA","sa-add-email":"Add Email","sa-email":"Email","sa-phone":"Phone","sa-add-sms":"Add SMS","sa-mfa":"MFA Registrations","error-otp-list":"Error listing OTPs","sa-type":"Type","sa-mfa-destination":"Destination","sa-mfa-validated":"Validated","sa-validate":"Validate","sa-mfa-action":"Action","sa-no":"No","sa-yes":"Yes","error-otp-remove":"Error removing MFA Registration","error-webauthn-remove":"Error removing WebAuthn Registration","sa-register-mfa":"Register MFA","sa-otp-required":"A one-time code is required.","sa-otp-choose":"Choose how to receive your code:","sa-otp-no-registrations":"No MFA methods registered.","sa-otp-send-code":"Send Code","sa-otp-verify":"Verify Code","sa-unknown-challenge":"Unknown challenge type.","sa-complete-invite":"Complete Your Invitation","sa-invite-otp":"Verification Code","sa-invite-otp-hint":"Enter the code from your invite email","sa-invite-password":"Choose a Password","sa-invite-password-hint":"Create a secure password for your account","sa-invite-submit":"Complete Registration","sa-invite-success":"Registration complete! Redirecting to login...","sa-invite-error-otp":"Invalid or expired verification code","sa-invite-error-expired":"This invite has expired. Please contact your administrator.","sa-invite-error-generic":"Unable to complete registration. Please try again.","sa-invite-completing":"Completing registration...","sa-forgot-password":"Forgot your password?","sa-reset-password":"Reset Password","sa-reset-email-sent":"If an account exists with that email, a reset code has been sent.","sa-new-password":"New Password","sa-reset-code":"Reset Code","sa-reset-submit":"Reset Password","sa-reset-success":"Password reset successfully! You can now log in.","sa-reset-error":"Unable to reset password. Please try again.","sa-reset-error-code":"Invalid or expired reset code","sa-or":"Or","sa-social-google":"Continue with Google","sa-social-github":"Continue with GitHub","sa-social-apple":"Continue with Apple","sa-social-oidc":"Continue with SSO","sa-loading":"Loading...","sa-social-error":"Error starting social login","sa-signup-mfa-title":"Verify Your Email","sa-signup-verify-prompt":"A verification code has been sent to your email. Enter it below to activate multi-factor authentication.","sa-signup-verify-error":"Invalid or expired verification code.","sa-signup-webauthn-prompt":"Your account is secure! Optionally, add a passkey for faster and easier logins.","sa-signup-webauthn-setup":"Set Up Passkey","sa-signup-webauthn-done":"Skip for now","sa-signup-webauthn-error":"Error setting up passkey. Please try again from your account settings."},Ma={en:It,fr:{"@metadata":{authors:["Mason Payne"],"last-updated":"2022-05-28",locale:"fr"},"sa-login":"Connexion","sa-username":"Adresse e-mail","sa-password":"Mot de passe","sa-use-password":"Utiliser le mot de passe","sa-code":"code à deux facteurs","sa-remember":"Souviens-toi de moi","sa-forgot":"Mot de passe oublié?","sa-register":"S'inscrire","sa-error.login":"E-mail ou mot de passe invalide","sa-error.register":"E-mail ou mot de passe invalide","sa-error.unknown":"Erreur inconnue","sa-otp-required":"Un code à usage unique est requis.","sa-otp-choose":"Choisissez comment recevoir votre code :","sa-otp-no-registrations":"Aucune méthode MFA enregistrée.","sa-otp-send-code":"Envoyer le code","sa-otp-verify":"Vérifier le code","sa-unknown-challenge":"Type de défi inconnu.","sa-complete-invite":"Complétez votre invitation","sa-invite-otp":"Code de vérification","sa-invite-otp-hint":"Entrez le code de votre email d'invitation","sa-invite-password":"Choisissez un mot de passe","sa-invite-password-hint":"Créez un mot de passe sécurisé pour votre compte","sa-invite-submit":"Terminer l'inscription","sa-invite-success":"Inscription terminée ! Redirection vers la connexion...","sa-invite-error-otp":"Code de vérification invalide ou expiré","sa-invite-error-expired":"Cette invitation a expiré. Veuillez contacter votre administrateur.","sa-invite-error-generic":"Impossible de terminer l'inscription. Veuillez réessayer.","sa-invite-completing":"Finalisation de l'inscription...","sa-forgot-password":"Mot de passe oublié ?","sa-reset-password":"Réinitialiser le mot de passe","sa-reset-email-sent":"Si un compte existe avec cet e-mail, un code de réinitialisation a été envoyé.","sa-new-password":"Nouveau mot de passe","sa-reset-code":"Code de réinitialisation","sa-reset-submit":"Réinitialiser le mot de passe","sa-reset-success":"Mot de passe réinitialisé avec succès ! Vous pouvez maintenant vous connecter.","sa-reset-error":"Impossible de réinitialiser le mot de passe. Veuillez réessayer.","sa-reset-error-code":"Code de réinitialisation invalide ou expiré","sa-or":"Ou","sa-social-google":"Continuer avec Google","sa-social-github":"Continuer avec GitHub","sa-social-apple":"Continuer avec Apple","sa-social-oidc":"Continuer avec SSO","sa-loading":"Chargement...","sa-social-error":"Erreur lors de la connexion sociale","sa-signup-mfa-title":"Vérifiez votre e-mail","sa-signup-verify-prompt":"Un code de vérification a été envoyé à votre e-mail. Entrez-le ci-dessous pour activer l'authentification multi-facteurs.","sa-signup-verify-error":"Code de vérification invalide ou expiré.","sa-signup-webauthn-prompt":"Votre compte est sécurisé ! Ajoutez optionnellement une clé d'accès pour des connexions plus rapides.","sa-signup-webauthn-setup":"Configurer la clé d'accès","sa-signup-webauthn-done":"Ignorer pour l'instant","sa-signup-webauthn-error":"Erreur lors de la configuration de la clé d'accès. Veuillez réessayer depuis les paramètres de votre compte."},es:{"@metadata":{authors:["Mason Payne"],"last-updated":"2022-05-28",locale:"es"},"sa-login":"Acceso","sa-username":"Correo electrónico","sa-password":"Clave","sa-use-password":"Usar contraseña","sa-code":"Código","sa-remember":"Acuérdate de mí","sa-forgot":"¿Olvidaste tu contraseña?","sa-register":"Registro","sa-error.login":"Correo electrónico o contraseña inválidos","sa-error.register":"Correo electrónico o contraseña inválidos","sa-error.unknown":"Error desconocido","sa-otp-required":"Se requiere un código de un solo uso.","sa-otp-choose":"Elige cómo recibir tu código:","sa-otp-no-registrations":"No hay métodos MFA registrados.","sa-unknown-challenge":"Tipo de desafío desconocido.","sa-complete-invite":"Completa tu invitación","sa-invite-otp":"Código de verificación","sa-invite-otp-hint":"Ingresa el código de tu correo de invitación","sa-invite-password":"Elige una contraseña","sa-invite-password-hint":"Crea una contraseña segura para tu cuenta","sa-invite-submit":"Completar registro","sa-invite-success":"¡Registro completo! Redirigiendo al inicio de sesión...","sa-invite-error-otp":"Código de verificación inválido o expirado","sa-invite-error-expired":"Esta invitación ha expirado. Por favor contacta a tu administrador.","sa-invite-error-generic":"No se pudo completar el registro. Por favor intenta de nuevo.","sa-invite-completing":"Completando registro...","sa-forgot-password":"¿Olvidaste tu contraseña?","sa-reset-password":"Restablecer contraseña","sa-reset-email-sent":"Si existe una cuenta con ese correo, se ha enviado un código de restablecimiento.","sa-new-password":"Nueva contraseña","sa-reset-code":"Código de restablecimiento","sa-reset-submit":"Restablecer contraseña","sa-reset-success":"¡Contraseña restablecida con éxito! Ya puedes iniciar sesión.","sa-reset-error":"No se pudo restablecer la contraseña. Por favor intenta de nuevo.","sa-reset-error-code":"Código de restablecimiento inválido o expirado","sa-or":"O","sa-social-google":"Continuar con Google","sa-social-github":"Continuar con GitHub","sa-social-apple":"Continuar con Apple","sa-social-oidc":"Continuar con SSO","sa-loading":"Cargando...","sa-social-error":"Error al iniciar sesión social","sa-signup-mfa-title":"Verifica tu correo electrónico","sa-signup-verify-prompt":"Se ha enviado un código de verificación a tu correo. Ingrésalo para activar la autenticación multifactor.","sa-signup-verify-error":"Código de verificación inválido o expirado.","sa-signup-webauthn-prompt":"¡Tu cuenta está protegida! Opcionalmente, agrega una clave de acceso para inicios de sesión más rápidos.","sa-signup-webauthn-setup":"Configurar clave de acceso","sa-signup-webauthn-done":"Omitir por ahora","sa-signup-webauthn-error":"Error al configurar la clave de acceso. Intenta de nuevo desde la configuración de tu cuenta."},ja:{"@metadata":{authors:["Mason Payne"],"last-updated":"2022-05-28",locale:"ja"},"sa-login":"ログイン","sa-username":"メールアドレス","sa-password":"パスワード","sa-use-password":"パスワードを使用する","sa-code":"コード","sa-remember":"私を覚えてますか","sa-forgot":"パスワードをお忘れですか?","sa-register":"登録","sa-error.login":"メールアドレスかパスワードが無効","sa-error.register":"メールアドレスかパスワードが無効","sa-error.unknown":"未知のエラー","sa-otp-required":"ワンタイムコードが必要です。","sa-otp-choose":"コードの受け取り方法を選択してください:","sa-otp-no-registrations":"MFA方法が登録されていません。","sa-otp-send-code":"コードを送信","sa-otp-verify":"コードを確認","sa-unknown-challenge":"不明なチャレンジタイプです。","sa-complete-invite":"招待を完了する","sa-invite-otp":"確認コード","sa-invite-otp-hint":"招待メールのコードを入力してください","sa-invite-password":"パスワードを選択","sa-invite-password-hint":"アカウント用の安全なパスワードを作成してください","sa-invite-submit":"登録を完了","sa-invite-success":"登録完了!ログインページへリダイレクト中...","sa-invite-error-otp":"無効または期限切れの確認コード","sa-invite-error-expired":"この招待は期限切れです。管理者にお問い合わせください。","sa-invite-error-generic":"登録を完了できませんでした。もう一度お試しください。","sa-invite-completing":"登録を完了しています...","sa-forgot-password":"パスワードをお忘れですか?","sa-reset-password":"パスワードをリセット","sa-reset-email-sent":"そのメールアドレスのアカウントが存在する場合、リセットコードが送信されました。","sa-new-password":"新しいパスワード","sa-reset-code":"リセットコード","sa-reset-submit":"パスワードをリセット","sa-reset-success":"パスワードが正常にリセットされました!ログインできます。","sa-reset-error":"パスワードをリセットできませんでした。もう一度お試しください。","sa-reset-error-code":"無効または期限切れのリセットコード","sa-or":"または","sa-social-google":"Googleで続ける","sa-social-github":"GitHubで続ける","sa-social-apple":"Appleで続ける","sa-social-oidc":"SSOで続ける","sa-loading":"読み込み中...","sa-social-error":"ソーシャルログイン開始エラー","sa-signup-mfa-title":"メールを確認してください","sa-signup-verify-prompt":"確認コードがメールに送信されました。多要素認証を有効にするために入力してください。","sa-signup-verify-error":"無効または期限切れの確認コードです。","sa-signup-webauthn-prompt":"アカウントが保護されました!パスキーを追加してより速く簡単にログインできます(任意)。","sa-signup-webauthn-setup":"パスキーを設定","sa-signup-webauthn-done":"今はスキップ","sa-signup-webauthn-error":"パスキーの設定中にエラーが発生しました。アカウント設定から再試行してください。"}};function ct(e){const t=new Na("en",{messages:It});return e!=="en"&&(t.load(Ma[e],e),t.setLocale(e)),t}function Pt(e){const t="==".slice(0,(4-e.length%4)%4),n=e.replace(/-/g,"+").replace(/_/g,"/")+t,r=atob(n),s=new ArrayBuffer(r.length),i=new Uint8Array(s);for(let u=0;u<r.length;u++)i[u]=r.charCodeAt(u);return s}function zt(e){const t=new Uint8Array(e);let n="";for(const i of t)n+=String.fromCharCode(i);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}var T="copy",pe="convert";function Ne(e,t,n){if(t===T)return n;if(t===pe)return e(n);if(t instanceof Array)return n.map(r=>Ne(e,t[0],r));if(t instanceof Object){const r={};for(const[s,i]of Object.entries(t)){if(i.derive){const u=i.derive(n);u!==void 0&&(n[s]=u)}if(!(s in n)){if(i.required)throw new Error(`Missing key: ${s}`);continue}if(n[s]==null){r[s]=null;continue}r[s]=Ne(e,i.schema,n[s])}return r}}function dt(e,t){return{required:!0,schema:e,derive:t}}function M(e){return{required:!0,schema:e}}function J(e){return{required:!1,schema:e}}var Nt={type:M(T),id:M(pe),transports:J(T)},Mt={appid:J(T),appidExclude:J(T),credProps:J(T)},jt={appid:J(T),appidExclude:J(T),credProps:J(T)},ja={publicKey:M({rp:M(T),user:M({id:M(pe),name:M(T),displayName:M(T)}),challenge:M(pe),pubKeyCredParams:M(T),timeout:J(T),excludeCredentials:J([Nt]),authenticatorSelection:J(T),attestation:J(T),extensions:J(Mt)}),signal:J(T)},Ra={type:M(T),id:M(T),rawId:M(pe),authenticatorAttachment:J(T),response:M({clientDataJSON:M(pe),attestationObject:M(pe),transports:dt(T,e=>{var t;return((t=e.getTransports)==null?void 0:t.call(e))||[]})}),clientExtensionResults:dt(jt,e=>e.getClientExtensionResults())},La={mediation:J(T),publicKey:M({challenge:M(pe),timeout:J(T),rpId:J(T),allowCredentials:J([Nt]),userVerification:J(T),extensions:J(Mt)}),signal:J(T)},qa={type:M(T),id:M(T),rawId:M(pe),authenticatorAttachment:J(T),response:M({clientDataJSON:M(pe),authenticatorData:M(pe),signature:M(pe),userHandle:M(pe)}),clientExtensionResults:dt(jt,e=>e.getClientExtensionResults())};function Rt(e){return Ne(Pt,ja,e)}function Ua(e){return Ne(zt,Ra,e)}function Ja(e){return Ne(Pt,La,e)}function Va(e){return Ne(zt,qa,e)}async function Lt(e){const t=await navigator.credentials.create(e);return t.toJSON=()=>Ua(t),t}async function Ka(e){const t=await navigator.credentials.get(e);return t.toJSON=()=>Va(t),t}function ft(e){this.message=e}ft.prototype=new Error,ft.prototype.name="InvalidCharacterError";var qt=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new ft("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,s=0,i=0,u="";r=t.charAt(i++);~r&&(n=s%4?64*n+r:r,s++%4)?u+=String.fromCharCode(255&n>>(-2*s&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return u};function Ga(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(n){return decodeURIComponent(qt(n).replace(/(.)/g,function(r,s){var i=s.charCodeAt(0).toString(16).toUpperCase();return i.length<2&&(i="0"+i),"%"+i}))}(t)}catch{return qt(t)}}function Qe(e){this.message=e}function Ha(e,t){if(typeof e!="string")throw new Qe("Invalid token specified");var n=(t=t||{}).header===!0?0:1;try{return JSON.parse(Ga(e.split(".")[n]))}catch(r){throw new Qe("Invalid token specified: "+r.message)}}Qe.prototype=new Error,Qe.prototype.name="InvalidTokenError";const et="spartan-token";function Ut(){const e=localStorage.getItem(et);let t=null;if(e)try{if(t=Ha(e),t.exp>Za())return t;localStorage.removeItem(et)}catch(n){console.error("Error decoding token",n),localStorage.removeItem(et)}return null}function Wa(){const e=localStorage.getItem(et);return e||null}function Za(){return Math.round(new Date().getTime()/1e3)}var Ya=F(`<form class=login-frame><style>.login-frame {
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  justify-content: center;
@@ -33,6 +33,11 @@
33
33
  border-radius: 10px;
34
34
  }
35
35
 
36
+ .login-frame button:disabled {
37
+ opacity: 0.6;
38
+ cursor: not-allowed;
39
+ }
40
+
36
41
  .login-frame select {
37
42
  background-color: #ffffff;
38
43
  border: 1px solid #ccc;
@@ -104,7 +109,25 @@
104
109
  opacity: 0.6;
105
110
  cursor: not-allowed;
106
111
  }
107
- </style><style></style><h1></h1><input type=text>`),Ri=y("<span class=error-message>"),rt=y("<span>"),Ot=y("<input type=password>"),st=y("<p>"),qi=y("<select>"),Li=y("<option> (<!>)"),Ui=y("<input type=text>"),It=y("<input type=text autocomplete=one-time-code>"),Ji=y("<input type=password autocomplete=new-password>"),Vi=y("<span class=checkbox-wrapper><input type=checkbox><span>&nbsp;"),Ki=y("<button type=submit>"),Gi=y("<button type=button>"),Ve=y("<a class=centered-text href=#>"),Hi=y("<div class=social-divider><span>"),Wi=y("<button type=button class=social-btn>"),Zi=y('<svg width=18 height=18 viewBox="0 0 18 18"xmlns=http://www.w3.org/2000/svg><path d="M17.64 9.2c0-.637-.057-1.251-.164-1.84H9v3.481h4.844c-.209 1.125-.843 2.078-1.796 2.717v2.258h2.908c1.702-1.567 2.684-3.875 2.684-6.615z"fill=#4285F4></path><path d="M9 18c2.43 0 4.467-.806 5.956-2.184l-2.908-2.258c-.806.54-1.837.86-3.048.86-2.344 0-4.328-1.584-5.036-3.711H.957v2.332C2.438 15.983 5.482 18 9 18z"fill=#34A853></path><path d="M3.964 10.707c-.18-.54-.282-1.117-.282-1.707s.102-1.167.282-1.707V4.961H.957C.347 6.175 0 7.548 0 9s.348 2.825.957 4.039l3.007-2.332z"fill=#FBBC05></path><path d="M9 3.58c1.321 0 2.508.454 3.44 1.345l2.582-2.58C13.463.891 11.426 0 9 0 5.482 0 2.438 2.017.957 4.961L3.964 7.293C4.672 5.166 6.656 3.58 9 3.58z"fill=#EA4335>'),Yi=y('<svg width=18 height=18 viewBox="0 0 16 16"xmlns=http://www.w3.org/2000/svg><path fill-rule=evenodd d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"fill=currentColor>'),Xi=y('<svg width=18 height=18 viewBox="20 16 16 19"xmlns=http://www.w3.org/2000/svg><path d="M28.2226562,20.3846154 C29.0546875,20.3846154 30.0976562,19.8048315 30.71875,19.0317864 C31.28125,18.3312142 31.6914062,17.352829 31.6914062,16.3744437 C31.6914062,16.2415766 31.6796875,16.1087095 31.65625,16 C30.7304687,16.0362365 29.6171875,16.640178 28.9492187,17.4494596 C28.421875,18.06548 27.9414062,19.0317864 27.9414062,20.0222505 C27.9414062,20.1671964 27.9648438,20.3121424 27.9765625,20.3604577 C28.0351562,20.3725366 28.1289062,20.3846154 28.2226562,20.3846154 Z M25.2929688,35 C26.4296875,35 26.9335938,34.214876 28.3515625,34.214876 C29.7929688,34.214876 30.109375,34.9758423 31.375,34.9758423 C32.6171875,34.9758423 33.4492188,33.792117 34.234375,32.6325493 C35.1132812,31.3038779 35.4765625,29.9993643 35.5,29.9389701 C35.4179688,29.9148125 33.0390625,28.9122695 33.0390625,26.0979021 C33.0390625,23.6579784 34.9140625,22.5588048 35.0195312,22.474253 C33.7773438,20.6382708 31.890625,20.5899555 31.375,20.5899555 C29.9804688,20.5899555 28.84375,21.4596313 28.1289062,21.4596313 C27.3554688,21.4596313 26.3359375,20.6382708 25.1289062,20.6382708 C22.8320312,20.6382708 20.5,22.5950413 20.5,26.2911634 C20.5,28.5861411 21.3671875,31.013986 22.4335938,32.5842339 C23.3476562,33.9129053 24.1445312,35 25.2929688,35 Z"fill=currentColor fill-rule=nonzero>'),Qi=y('<svg width=18 height=18 viewBox="0 0 24 24"xmlns=http://www.w3.org/2000/svg><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 4a3 3 0 110 6 3 3 0 010-6zm0 14c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08s5.97 1.09 6 3.08c-1.29 1.94-3.5 3.22-6 3.22z"fill=currentColor>');Qe("spartan-login",{domain:"http://127.0.0.1:11000",sector:"0ad5c3e5-0186-4557-8b32-4b36f247bf09",startMode:"password",styles:"",locale:"en",redirect:""},e=>{const[t,n]=F((e.startMode||"password").toLowerCase()),[r,s]=F(""),[u,a]=F(""),[o,A]=F(""),[$,h]=F(""),[_]=F(e.redirect),[ne,ue]=F(!1),[De,N]=F(!1),[re,ee]=F(!1),[ie,R]=F(""),[X,K]=F(""),[de,fe]=F([]),[he,k]=F(""),[G,ge]=F([]),[v,ae]=F(""),[me,ce]=F(!1),[ke,Ie]=F(""),[Pe,Ee]=F(""),D=et(e.locale);let be,we;try{we=e.styles}catch{we=""}console.log(we),He(async()=>{const i=new URLSearchParams(window.location.search);if(i.get("error")){history.replaceState({},"",window.location.pathname);const f=i.get("error_description");h(f||D.i18n("sa-social-error")),Ce(),xe();return}const b=i.get("code");if(b){history.replaceState({},"",window.location.pathname);try{const f=await fetch(`${e.domain}/api/v1/oauth/exchange`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:b})});if(!f.ok)throw new Error(D.i18n("sa-social-error"));const B=await f.json();localStorage.setItem("spartan-token",B.token),be.getRootNode().host.dispatchEvent(new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:B.token}})),e.redirect!==""&&(window.location.href=e.redirect)}catch(f){h(f.message||D.i18n("sa-social-error"))}return}if(Tt()&&e.redirect!==""&&window.location.pathname!==e.redirect){window.location.href=e.redirect;return}Ce(),xe()});function Ce(){fetch(`${e.domain}/api/v1/sectors/${e.sector}/publicsettings`,{method:"GET",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"}}).then(i=>{if(i.ok)return i.json();throw new Error("Network response was not ok.")}).then(i=>{console.log(i),ue(i.SelfSignUpAllowed),ce(i.MFARequired||!1)}).catch(i=>{console.log(i),h(i.message)})}function xe(){fetch(`${e.domain}/api/v1/sectors/${e.sector}/oauth/providers`,{method:"GET",mode:"cors",cache:"no-cache"}).then(i=>{if(i.ok)return i.json();throw new Error("Failed to load social providers")}).then(i=>{const g=(i.providers||[]).filter(b=>b.enabled);ge(g)}).catch(()=>{})}function Fe(i){if(v())return;ae(i),h("");const g=window.location.origin+window.location.pathname;fetch(`${e.domain}/api/v1/oauth/${i}/initiate`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({sectorID:e.sector,redirectURI:g})}).then(b=>{if(b.ok)return b.json();throw new Error(D.i18n("sa-social-error"))}).then(b=>{window.location.href=b.authURL}).catch(b=>{ae(""),h(b.message)})}function E(i,g){h(""),Ee(g),fetch(`${e.domain}/api/v1/signup/mfa/begin`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:i,sectorID:e.sector,transactionId:g})}).then(b=>{if(!b.ok)throw new Error(D.i18n("sa-signup-verify-error"))}).then(()=>{n("signup-verify")}).catch(b=>{h(b.message)})}function w(){h(""),fetch(`${e.domain}/api/v1/signup/mfa/verify`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:r(),code:o().toUpperCase().trim(),sectorID:e.sector,transactionId:Pe()})}).then(i=>{if(i.ok)return i.json();throw i.status===400?new Error(D.i18n("sa-signup-verify-error")):new Error(D.i18n("sa-signup-verify-error"))}).then(i=>{Ie(i.token),localStorage.setItem("spartan-token",i.token),be.getRootNode().host.dispatchEvent(new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:i.token}})),A(""),n("signup-webauthn")}).catch(i=>{h(i.message)})}async function T(){h("");try{const i=await fetch(`${e.domain}/api/v1/webauthn/registration/begin`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:`bearer ${ke()}`},body:JSON.stringify({keyName:"Default",sectorID:e.sector})});if(!i.ok)throw new Error(D.i18n("sa-signup-webauthn-error"));const g=await i.json(),b=xt(g.Options),l=await _t(b);let f=JSON.parse(JSON.stringify(l));if(f.transactionID=g.TransactionID,!(await fetch(`${e.domain}/api/v1/webauthn/registration/finish`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:`bearer ${ke()}`},body:JSON.stringify(f)})).ok)throw new Error(D.i18n("sa-signup-webauthn-error"));q()}catch(i){h((i==null?void 0:i.message)||String(i))}}function q(){n(e.startMode),e.redirect!==""&&(window.location.href=e.redirect)}function M(i){i.preventDefault(),console.log("login"),h(""),t()==="password"?L():t()==="webauthn"?j():t()==="otp-pick"?J(he()):t()==="otp"?W():t()==="reset-email"?Z():t()==="reset-code"&&Y()}function O(i){i.preventDefault(),console.log("signup"),h(""),N(!1),fetch(`${e.domain}/api/v1/users`,{method:"POST",mode:"cors",cache:"no-cache",body:JSON.stringify({username:r(),password:u(),sectorID:e.sector})}).then(g=>{if(g.ok)return g.json();throw new Error(D.i18n("sa-error-creating-user"))}).then(g=>{console.log(g),me()?E(r(),g.enrollmentTransactionId||""):(N(!0),n(e.startMode))}).catch(g=>{N(!1),h(g.message),console.log(g)})}function j(){console.log("webauthnLogin"),fetch(`${e.domain}/api/v1/login/webauthn/begin`,{method:"POST",mode:"cors",cache:"no-cache",body:JSON.stringify({username:r(),sectorID:e.sector})}).then(i=>{if(i.ok)return i.json();throw i.status===401?(n("password"),h(D.i18n("webauthn-not-enrolled")),new Error(D.i18n("webauthn-not-enrolled"))):new Error(`${i.status} ${i.statusText}: Network response was not ok.`)}).then(i=>{console.log(i);const g=Ti(i.CredentialAssertion);return console.log("Parsed WebAuthn request options:",g),Ii(g).then(b=>{const l=JSON.stringify(b);let f=JSON.parse(l);return f.transactionID=i.TransactionID,f})}).then(i=>fetch(`${e.domain}/api/v1/login/webauthn/finish`,{method:"POST",mode:"cors",cache:"no-cache",body:JSON.stringify(i)})).then(P).catch(i=>{h(i.message),console.log(i)})}function L(){console.log("password login"),fetch(e.domain+"/api/v1/login/password",{method:"post",mode:"cors",cache:"no-cache",body:JSON.stringify({username:r(),password:u(),sectorID:e.sector})}).then(P)}async function P(i){let g=Promise.resolve(i);return g.then(b=>{if(i.ok)return i.json();throw new Error("Network response was not ok.")}).then(b=>{if(console.log(b),localStorage.setItem("spartan-txid",b.transactionID),!b.token){if(b.challengeType==="email_enrollment"){E(r(),b.transactionID||"");return}b.challengeType.indexOf("otp")!==-1?H():b.challengeType.indexOf("webauthn")!==-1?(n("webauthn"),h(D.i18n("sa-webauthn-required"))):h(D.i18n("sa-unknown-challenge"));return}localStorage.setItem("spartan-token",b.token);const l=new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:b.token,transactionID:b.transactionID}});be.getRootNode().host.dispatchEvent(l),_()!==""&&(window.location.href=_())}).catch(b=>{b.json().then(l=>{console.log(l.message),h(l.message)}).catch(l=>{console.log(l)}),console.log(b)}),g}function H(){const i=localStorage.getItem("spartan-txid")||"";fetch(e.domain+`/api/v1/otp/${encodeURIComponent(r())}?transactionID=${encodeURIComponent(i)}&sectorID=${encodeURIComponent(e.sector)}`,{method:"get",mode:"cors",cache:"no-cache"}).then(g=>{if(g.ok)return g.json();throw new Error(D.i18n("error-otp-list"))}).then(g=>{const b=g.registrations||[];if(b.length===0){h(D.i18n("sa-otp-no-registrations"));return}b.length===1?J(b[0].ID||""):(fe(b),k(b[0].ID||""),n("otp-pick"),h(""))}).catch(g=>{h(g.message),console.log(g)})}function J(i){console.log("begin OTP, registrationID:",i),fetch(e.domain+"/api/v1/login/otp/begin",{method:"post",mode:"cors",cache:"no-cache",body:JSON.stringify({username:r(),transactionID:localStorage.getItem("spartan-txid"),registrationID:i,sectorID:e.sector})}).then(g=>{if(g.ok)return g.json();throw new Error(`${g.status} ${g.statusText}`)}).then(g=>{console.log(g),g.transactionID&&localStorage.setItem("spartan-txid",g.transactionID),A(""),h(""),n("otp")}).catch(g=>{h(g.message),console.log(g)})}function W(){console.log("OTP login submit"),fetch(e.domain+"/api/v1/login/otp",{method:"post",mode:"cors",cache:"no-cache",body:JSON.stringify({username:r(),password:o(),transactionID:localStorage.getItem("spartan-txid"),sectorID:e.sector})}).then(P)}function Z(){console.log("begin password reset"),h(""),ee(!1),fetch(`${e.domain}/api/v1/password/reset/begin`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:r(),sectorID:e.sector})}).then(i=>{if(i.ok)return i.json();throw new Error(D.i18n("sa-reset-error"))}).then(i=>{console.log(i),h(D.i18n("sa-reset-email-sent")),R(""),K(""),n("reset-code")}).catch(i=>{h(i.message),console.log(i)})}function Y(){console.log("complete password reset"),h(""),fetch(`${e.domain}/api/v1/password/reset/complete`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:r(),code:ie().toUpperCase().trim(),newPassword:X(),sectorID:e.sector})}).then(i=>{if(i.ok)return i.json();throw i.status===400?new Error(D.i18n("sa-reset-error-code")):new Error(D.i18n("sa-reset-error"))}).then(i=>{console.log(i),ee(!0),R(""),K(""),a(""),n(e.startMode)}).catch(i=>{h(i.message),console.log(i)})}return(()=>{var i=ji(),g=i.firstChild,b=g.nextSibling,l=b.nextSibling,f=l.nextSibling,B=be;return typeof B=="function"?ht(B,i):be=i,i.addEventListener("submit",p=>{p.preventDefault(),t()==="sign-up"?O(p):t()==="signup-verify"?(p.preventDefault(),w()):M(p)}),d(b,we),d(l,(()=>{var p=m(()=>t()==="reset-email"||t()==="reset-code");return()=>p()?D.i18n("sa-reset-password"):m(()=>t()==="signup-verify"||t()==="signup-webauthn")()?D.i18n("sa-signup-mfa-title"):D.i18n("sa-login")})()),d(i,$&&(()=>{var p=Ri();return d(p,$),p})(),f),d(i,(()=>{var p=m(()=>!!De());return()=>p()&&(()=>{var c=rt();return d(c,()=>D.i18n("sa-signup-complete")),c})()})(),f),d(i,(()=>{var p=m(()=>!!re());return()=>p()&&(()=>{var c=rt();return d(c,()=>D.i18n("sa-reset-success")),c})()})(),f),f.$$input=p=>s(p.currentTarget.value),d(i,(()=>{var p=m(()=>t()!=="sign-up"&&t()!=="signup-verify"&&t()!=="signup-webauthn");return()=>p()&&[m(()=>m(()=>t()==="password")()&&(()=>{var c=Ot();return c.$$input=C=>a(C.currentTarget.value),x(()=>oe(c,"placeholder",D.i18n("sa-password"))),x(()=>c.value=u()),c})()),m(()=>m(()=>t()==="webauthn")()&&rt()),m(()=>m(()=>t()==="otp-pick")()&&[(()=>{var c=st();return d(c,()=>D.i18n("sa-otp-choose")),c})(),(()=>{var c=qi();return c.addEventListener("change",C=>k(C.currentTarget.value)),d(c,()=>de().map(C=>(()=>{var z=Li(),ve=z.firstChild,_e=ve.nextSibling;return _e.nextSibling,d(z,()=>C.DisplayName||C.ID,ve),d(z,()=>C.Type,_e),x(()=>z.value=C.ID),z})())),x(()=>c.value=he()),c})()]),m(()=>m(()=>t()==="otp")()&&(()=>{var c=Ui();return c.$$input=C=>A(C.currentTarget.value),x(()=>oe(c,"placeholder",D.i18n("sa-code"))),x(()=>c.value=o()),c})()),m(()=>m(()=>t()==="reset-code")()&&[(()=>{var c=It();return c.$$input=C=>R(C.currentTarget.value),x(()=>oe(c,"placeholder",D.i18n("sa-reset-code"))),x(()=>c.value=ie()),c})(),(()=>{var c=Ji();return c.$$input=C=>K(C.currentTarget.value),x(()=>oe(c,"placeholder",D.i18n("sa-new-password"))),x(()=>c.value=X()),c})()]),m(()=>m(()=>t()==="password"||t()==="webauthn")()&&(()=>{var c=Vi(),C=c.firstChild,z=C.nextSibling;return z.firstChild,c.$$click=()=>n(t()==="password"?"webauthn":"password"),d(z,()=>D.i18n("sa-use-password"),null),x(()=>C.checked=t()==="password"),c})())]})(),null),d(i,(()=>{var p=m(()=>t()==="sign-up");return()=>p()&&(()=>{var c=Ot();return c.$$input=C=>a(C.currentTarget.value),x(()=>oe(c,"placeholder",D.i18n("sa-password"))),x(()=>c.value=u()),c})()})(),null),d(i,(()=>{var p=m(()=>t()==="signup-verify");return()=>p()&&[(()=>{var c=st();return d(c,()=>D.i18n("sa-signup-verify-prompt")),c})(),(()=>{var c=It();return c.$$input=C=>A(C.currentTarget.value),x(()=>oe(c,"placeholder",D.i18n("sa-code"))),x(()=>c.value=o()),c})()]})(),null),d(i,(()=>{var p=m(()=>t()==="signup-webauthn");return()=>p()&&(()=>{var c=st();return d(c,()=>D.i18n("sa-signup-webauthn-prompt")),c})()})(),null),d(i,(()=>{var p=m(()=>t()!=="signup-webauthn");return()=>p()&&(()=>{var c=Ki();return d(c,(()=>{var C=m(()=>t()==="sign-up");return()=>C()?D.i18n("sa-signup"):m(()=>t()==="otp-pick")()?D.i18n("sa-otp-send-code"):m(()=>t()==="otp")()?D.i18n("sa-otp-verify"):m(()=>t()==="reset-email")()?D.i18n("sa-otp-send-code"):m(()=>t()==="reset-code")()?D.i18n("sa-reset-submit"):m(()=>t()==="signup-verify")()?D.i18n("sa-otp-verify"):D.i18n("sa-login")})()),c})()})(),null),d(i,(()=>{var p=m(()=>t()==="signup-webauthn");return()=>p()&&[(()=>{var c=Gi();return c.$$click=()=>T(),d(c,()=>D.i18n("sa-signup-webauthn-setup")),c})(),(()=>{var c=Ve();return c.$$click=()=>q(),d(c,()=>D.i18n("sa-signup-webauthn-done")),c})()]})(),null),d(i,(()=>{var p=m(()=>t()==="password");return()=>p()&&(()=>{var c=Ve();return c.$$click=()=>{h(""),ee(!1),n("reset-email")},d(c,()=>D.i18n("sa-forgot-password")),c})()})(),null),d(i,(()=>{var p=m(()=>t()==="reset-email"||t()==="reset-code");return()=>p()&&(()=>{var c=Ve();return c.$$click=()=>{h(""),R(""),K(""),n(e.startMode)},d(c,()=>D.i18n("sa-back")),c})()})(),null),d(i,(()=>{var p=m(()=>!!(ne()&&t()!=="reset-email"&&t()!=="reset-code"&&t()!=="signup-verify"&&t()!=="signup-webauthn"));return()=>p()&&(()=>{var c=Ve();return c.$$click=()=>t()==="sign-up"?n(e.startMode):n("sign-up"),d(c,(()=>{var C=m(()=>t()==="sign-up");return()=>C()?D.i18n("sa-back"):D.i18n("sa-signup")})()),c})()})(),null),d(i,(()=>{var p=m(()=>G().length>0&&(t()==="password"||t()==="webauthn"||t()==="sign-up"));return()=>p()&&[(()=>{var c=Hi(),C=c.firstChild;return d(C,()=>D.i18n("sa-or")),c})(),m(()=>G().map(c=>(()=>{var C=Wi();return C.$$click=()=>Fe(c.provider),d(C,(()=>{var z=m(()=>c.provider==="google");return()=>z()&&Zi()})(),null),d(C,(()=>{var z=m(()=>c.provider==="github");return()=>z()&&Yi()})(),null),d(C,(()=>{var z=m(()=>c.provider==="apple");return()=>z()&&Xi()})(),null),d(C,(()=>{var z=m(()=>c.provider==="oidc");return()=>z()&&Qi()})(),null),d(C,(()=>{var z=m(()=>c.provider==="google");return()=>z()?D.i18n("sa-social-google"):m(()=>c.provider==="github")()?D.i18n("sa-social-github"):m(()=>c.provider==="apple")()?D.i18n("sa-social-apple"):D.i18n("sa-social-oidc")})(),null),x(()=>C.disabled=!!v()),C})()))]})(),null),x(p=>{var c=D.i18n("sa-username"),C=t()==="otp"||t()==="otp-pick"||t()==="reset-code"||t()==="signup-verify"||t()==="signup-webauthn";return c!==p.e&&oe(f,"placeholder",p.e=c),C!==p.t&&(f.disabled=p.t=C),p},{e:void 0,t:void 0}),x(()=>f.value=r()),i})()}),Ze(["input","click"]);var ea=y(`<div class=container><style>.container {
112
+ .login-frame .success-message {
113
+ color: green;
114
+ margin: 10px 0;
115
+ }
116
+
117
+ .login-frame .info-message {
118
+ color: #666;
119
+ margin: 10px 0;
120
+ font-size: 0.9em;
121
+ }
122
+
123
+ .login-frame .hint {
124
+ color: #666;
125
+ font-size: 0.85em;
126
+ margin-top: 5px;
127
+ margin-bottom: 0;
128
+ display: block;
129
+ }
130
+ </style><style></style><h1>`),Xa=F("<span class=error-message>"),ht=F("<span>"),Qa=F("<input type=text autocomplete=one-time-code required>"),Jt=F("<span class=hint>"),eu=F("<input type=password autocomplete=new-password required>"),Vt=F("<button type=submit>"),tu=F("<span class=info-message>"),nu=F("<span class=success-message>"),Kt=F("<input type=text>"),Gt=F("<input type=password>"),pt=F("<p>"),ru=F("<select>"),su=F("<option> (<!>)"),Ht=F("<input type=text autocomplete=one-time-code>"),iu=F("<input type=password autocomplete=new-password>"),au=F("<span class=checkbox-wrapper><input type=checkbox><span>&nbsp;"),uu=F("<button type=button>"),tt=F("<a class=centered-text href=#>"),ou=F("<div class=social-divider><span>"),lu=F("<button type=button class=social-btn>"),cu=F('<svg width=18 height=18 viewBox="0 0 18 18"xmlns=http://www.w3.org/2000/svg><path d="M17.64 9.2c0-.637-.057-1.251-.164-1.84H9v3.481h4.844c-.209 1.125-.843 2.078-1.796 2.717v2.258h2.908c1.702-1.567 2.684-3.875 2.684-6.615z"fill=#4285F4></path><path d="M9 18c2.43 0 4.467-.806 5.956-2.184l-2.908-2.258c-.806.54-1.837.86-3.048.86-2.344 0-4.328-1.584-5.036-3.711H.957v2.332C2.438 15.983 5.482 18 9 18z"fill=#34A853></path><path d="M3.964 10.707c-.18-.54-.282-1.117-.282-1.707s.102-1.167.282-1.707V4.961H.957C.347 6.175 0 7.548 0 9s.348 2.825.957 4.039l3.007-2.332z"fill=#FBBC05></path><path d="M9 3.58c1.321 0 2.508.454 3.44 1.345l2.582-2.58C13.463.891 11.426 0 9 0 5.482 0 2.438 2.017.957 4.961L3.964 7.293C4.672 5.166 6.656 3.58 9 3.58z"fill=#EA4335>'),du=F('<svg width=18 height=18 viewBox="0 0 16 16"xmlns=http://www.w3.org/2000/svg><path fill-rule=evenodd d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"fill=currentColor>'),fu=F('<svg width=18 height=18 viewBox="20 16 16 19"xmlns=http://www.w3.org/2000/svg><path d="M28.2226562,20.3846154 C29.0546875,20.3846154 30.0976562,19.8048315 30.71875,19.0317864 C31.28125,18.3312142 31.6914062,17.352829 31.6914062,16.3744437 C31.6914062,16.2415766 31.6796875,16.1087095 31.65625,16 C30.7304687,16.0362365 29.6171875,16.640178 28.9492187,17.4494596 C28.421875,18.06548 27.9414062,19.0317864 27.9414062,20.0222505 C27.9414062,20.1671964 27.9648438,20.3121424 27.9765625,20.3604577 C28.0351562,20.3725366 28.1289062,20.3846154 28.2226562,20.3846154 Z M25.2929688,35 C26.4296875,35 26.9335938,34.214876 28.3515625,34.214876 C29.7929688,34.214876 30.109375,34.9758423 31.375,34.9758423 C32.6171875,34.9758423 33.4492188,33.792117 34.234375,32.6325493 C35.1132812,31.3038779 35.4765625,29.9993643 35.5,29.9389701 C35.4179688,29.9148125 33.0390625,28.9122695 33.0390625,26.0979021 C33.0390625,23.6579784 34.9140625,22.5588048 35.0195312,22.474253 C33.7773438,20.6382708 31.890625,20.5899555 31.375,20.5899555 C29.9804688,20.5899555 28.84375,21.4596313 28.1289062,21.4596313 C27.3554688,21.4596313 26.3359375,20.6382708 25.1289062,20.6382708 C22.8320312,20.6382708 20.5,22.5950413 20.5,26.2911634 C20.5,28.5861411 21.3671875,31.013986 22.4335938,32.5842339 C23.3476562,33.9129053 24.1445312,35 25.2929688,35 Z"fill=currentColor fill-rule=nonzero>'),hu=F('<svg width=18 height=18 viewBox="0 0 24 24"xmlns=http://www.w3.org/2000/svg><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 4a3 3 0 110 6 3 3 0 010-6zm0 14c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08s5.97 1.09 6 3.08c-1.29 1.94-3.5 3.22-6 3.22z"fill=currentColor>');lt("spartan-login",{domain:"http://127.0.0.1:11000",sector:"0ad5c3e5-0186-4557-8b32-4b36f247bf09",startMode:"password",styles:"",locale:"en",redirect:""},e=>{const[t,n]=C((e.startMode||"password").toLowerCase()),[r,s]=C(""),[i,u]=C(""),[l,w]=C(""),[$,D]=C(""),[B]=C(e.redirect),[oe,fe]=C(!1),[Fe,L]=C(!1),[Z,Y]=C(!1),[le,G]=C(""),[te,V]=C(""),[we,ye]=C([]),[Ae,k]=C(""),[X,$e]=C([]),[De,ge]=C(""),[b,me]=C(!1),[Ue,be]=C(!1),[Me,Je]=C(""),[Ve,Te]=C(""),[Oe,Ie]=C(""),[je,ve]=C(""),[Se,_e]=C(""),[A,v]=C(""),[S,R]=C(!1),d=ct(e.locale);let _,z;try{z=e.styles}catch{z=""}console.log(z),st(async()=>{const o=new URLSearchParams(window.location.search);if(o.get("error")){history.replaceState({},"",window.location.pathname);const j=o.get("error_description");D(j||d.i18n("sa-social-error")),P(),O();return}const E=o.get("code");if(E){history.replaceState({},"",window.location.pathname),me(!0);try{const j=await fetch(`${e.domain}/api/v1/oauth/exchange`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:E})});if(!j.ok)throw new Error(d.i18n("sa-social-error"));const a=await j.json();localStorage.setItem("spartan-token",a.token),_.getRootNode().host.dispatchEvent(new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:a.token}})),e.redirect!==""?window.location.href=e.redirect:(me(!1),P(),O())}catch(j){D(j.message||d.i18n("sa-social-error")),me(!1),P(),O()}return}const ce=o.get("sub");if(ce){Ie(ce);const j=o.get("email");j&&ve(j);const p=new URLSearchParams(window.location.hash.replace(/^#/,"")).get("otp");p&&_e(p),n("invite");return}if(Ut()&&e.redirect!==""&&window.location.pathname!==e.redirect){window.location.href=e.redirect;return}P(),O()});function P(){fetch(`${e.domain}/api/v1/sectors/${e.sector}/publicsettings`,{method:"GET",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"}}).then(o=>{if(o.ok)return o.json();throw new Error("Network response was not ok.")}).then(o=>{console.log(o),fe(o.SelfSignUpAllowed),be(o.MFARequired||!1)}).catch(o=>{console.log(o),D(o.message)})}function O(){fetch(`${e.domain}/api/v1/sectors/${e.sector}/oauth/providers`,{method:"GET",mode:"cors",cache:"no-cache"}).then(o=>{if(o.ok)return o.json();throw new Error("Failed to load social providers")}).then(o=>{const g=(o.providers||[]).filter(E=>E.enabled);$e(g)}).catch(()=>{})}function Q(o){if(De())return;ge(o),D("");const g=window.location.origin+window.location.pathname;fetch(`${e.domain}/api/v1/oauth/${o}/initiate`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({sectorID:e.sector,redirectURI:g})}).then(E=>{if(E.ok)return E.json();throw new Error(d.i18n("sa-social-error"))}).then(E=>{window.location.href=E.authURL}).catch(E=>{ge(""),D(E.message)})}function K(o,g){return D(""),Te(g),fetch(`${e.domain}/api/v1/signup/mfa/begin`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:o,sectorID:e.sector,transactionId:g})}).then(E=>{if(!E.ok)throw new Error(d.i18n("sa-signup-verify-error"))}).then(()=>{n("signup-verify")}).catch(E=>{D(E.message)})}function q(){return D(""),fetch(`${e.domain}/api/v1/signup/mfa/verify`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:r(),code:l().toUpperCase().trim(),sectorID:e.sector,transactionId:Ve()})}).then(o=>{if(o.ok)return o.json();throw o.status===400?new Error(d.i18n("sa-signup-verify-error")):new Error(d.i18n("sa-signup-verify-error"))}).then(o=>{Je(o.token),localStorage.setItem("spartan-token",o.token),_.getRootNode().host.dispatchEvent(new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:o.token}})),w(""),n("signup-webauthn")}).catch(o=>{D(o.message)})}function H(){b()||(me(!0),D(""),fetch(`${e.domain}/api/v1/webauthn/registration/begin`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:`bearer ${Me()}`},body:JSON.stringify({keyName:"Default",sectorID:e.sector})}).then(o=>{if(!o.ok)throw new Error(d.i18n("sa-signup-webauthn-error"));return o.json()}).then(o=>{const g=Rt(o.Options);return Lt(g).then(E=>{let ce=JSON.parse(JSON.stringify(E));return ce.transactionID=o.TransactionID,ce})}).then(o=>fetch(`${e.domain}/api/v1/webauthn/registration/finish`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:`bearer ${Me()}`},body:JSON.stringify(o)})).then(o=>{if(!o.ok)throw new Error(d.i18n("sa-signup-webauthn-error"));re()}).catch(o=>{D((o==null?void 0:o.message)||String(o))}).finally(()=>{me(!1)}))}function re(){n(e.startMode),e.redirect!==""&&(window.location.href=e.redirect)}function U(){return console.log("login"),D(""),t()==="password"?I():t()==="webauthn"?m():t()==="otp-pick"?se(Ae()):t()==="otp"?ie():t()==="reset-email"?he():t()==="reset-code"?Be():Promise.resolve()}function c(){return console.log("signup"),D(""),L(!1),fetch(`${e.domain}/api/v1/users`,{method:"POST",mode:"cors",cache:"no-cache",body:JSON.stringify({username:r(),password:i(),sectorID:e.sector})}).then(o=>{if(o.ok)return o.json();throw new Error(d.i18n("sa-error-creating-user"))}).then(o=>{if(console.log(o),Ue())return K(r(),o.enrollmentTransactionId||"");L(!0),n(e.startMode)}).catch(o=>{L(!1),D(o.message),console.log(o)})}function m(){return console.log("webauthnLogin"),fetch(`${e.domain}/api/v1/login/webauthn/begin`,{method:"POST",mode:"cors",cache:"no-cache",body:JSON.stringify({username:r(),sectorID:e.sector})}).then(o=>{if(o.ok)return o.json();throw o.status===401?(n("password"),D(d.i18n("webauthn-not-enrolled")),new Error(d.i18n("webauthn-not-enrolled"))):new Error(`${o.status} ${o.statusText}: Network response was not ok.`)}).then(o=>{console.log(o);const g=Ja(o.CredentialAssertion);return console.log("Parsed WebAuthn request options:",g),Ka(g).then(E=>{const ce=JSON.stringify(E);let ke=JSON.parse(ce);return ke.transactionID=o.TransactionID,ke})}).then(o=>fetch(`${e.domain}/api/v1/login/webauthn/finish`,{method:"POST",mode:"cors",cache:"no-cache",body:JSON.stringify(o)})).then(x).catch(o=>{D(o.message),console.log(o)})}function I(){return console.log("password login"),fetch(e.domain+"/api/v1/login/password",{method:"post",mode:"cors",cache:"no-cache",body:JSON.stringify({username:r(),password:i(),sectorID:e.sector})}).then(x)}function x(o){return Promise.resolve(o).then(g=>{if(g.ok)return g.json();throw g}).then(g=>{if(console.log(g),localStorage.setItem("spartan-txid",g.transactionID),!g.token){if(g.challengeType==="email_enrollment")return K(r(),g.transactionID||"");if(g.challengeType.indexOf("otp")!==-1)return ee();g.challengeType.indexOf("webauthn")!==-1?(n("webauthn"),D(d.i18n("sa-webauthn-required"))):D(d.i18n("sa-unknown-challenge"));return}localStorage.setItem("spartan-token",g.token);const E=new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:g.token,transactionID:g.transactionID}});_.getRootNode().host.dispatchEvent(E),B()!==""&&(window.location.href=B())}).catch(g=>g.json().then(E=>{console.log(E.message),D(E.message)}).catch(E=>{console.log(E)}))}function ee(){const o=localStorage.getItem("spartan-txid")||"";return fetch(e.domain+`/api/v1/otp/${encodeURIComponent(r())}?transactionID=${encodeURIComponent(o)}&sectorID=${encodeURIComponent(e.sector)}`,{method:"get",mode:"cors",cache:"no-cache"}).then(g=>{if(g.ok)return g.json();throw new Error(d.i18n("error-otp-list"))}).then(g=>{const E=g.registrations||[];if(E.length===0){D(d.i18n("sa-otp-no-registrations"));return}if(E.length===1)return se(E[0].ID||"");ye(E),k(E[0].ID||""),n("otp-pick"),D("")}).catch(g=>{D(g.message),console.log(g)})}function se(o){return console.log("begin OTP, registrationID:",o),fetch(e.domain+"/api/v1/login/otp/begin",{method:"post",mode:"cors",cache:"no-cache",body:JSON.stringify({username:r(),transactionID:localStorage.getItem("spartan-txid"),registrationID:o,sectorID:e.sector})}).then(g=>{if(g.ok)return g.json();throw new Error(`${g.status} ${g.statusText}`)}).then(g=>{console.log(g),g.transactionID&&localStorage.setItem("spartan-txid",g.transactionID),w(""),D(""),n("otp")}).catch(g=>{D(g.message),console.log(g)})}function ie(){return console.log("OTP login submit"),fetch(e.domain+"/api/v1/login/otp",{method:"post",mode:"cors",cache:"no-cache",body:JSON.stringify({username:r(),password:l(),transactionID:localStorage.getItem("spartan-txid"),sectorID:e.sector})}).then(x)}function he(){return console.log("begin password reset"),D(""),Y(!1),fetch(`${e.domain}/api/v1/password/reset/begin`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:r(),sectorID:e.sector})}).then(o=>{if(o.ok)return o.json();throw new Error(d.i18n("sa-reset-error"))}).then(o=>{console.log(o),D(d.i18n("sa-reset-email-sent")),G(""),V(""),n("reset-code")}).catch(o=>{D(o.message),console.log(o)})}function Be(){return console.log("complete password reset"),D(""),fetch(`${e.domain}/api/v1/password/reset/complete`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:r(),code:le().toUpperCase().trim(),newPassword:te(),sectorID:e.sector})}).then(o=>{if(o.ok)return o.json();throw o.status===400?new Error(d.i18n("sa-reset-error-code")):new Error(d.i18n("sa-reset-error"))}).then(o=>{console.log(o),Y(!0),G(""),V(""),u(""),n(e.startMode)}).catch(o=>{D(o.message),console.log(o)})}async function Dt(){if(D(""),!Se()||Se().trim().length===0){D(d.i18n("sa-invite-error-otp"));return}if(!A()||A().length<8){D("Password must be at least 8 characters");return}const o=Oe();if(!o){D("Missing invitation information");return}const g=await fetch(`${e.domain}/api/v1/users/invite/complete`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({sub:o,otp:Se().toUpperCase().trim(),password:A(),sectorID:e.sector})}).catch(()=>null);if(!g){D(d.i18n("sa-invite-error-generic"));return}if(g.ok){history.replaceState({},"",window.location.pathname);const E=await g.json().catch(()=>({})),ce=_.getRootNode().host;E.token?(localStorage.setItem("spartan-token",E.token),ce.dispatchEvent(new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:E.token}})),B()!==""?window.location.href=B():e.redirect!==""?window.location.href=e.redirect:(R(!1),Ie(""),ve(""),_e(""),v(""),n(e.startMode),P(),O())):(R(!0),ce.dispatchEvent(new CustomEvent("spartan-invite-complete",{bubbles:!0,cancelable:!0,detail:{sub:o,success:!0}})),setTimeout(()=>{B()!==""?window.location.href=B():e.redirect!==""?window.location.href=e.redirect:(R(!1),Ie(""),ve(""),_e(""),v(""),n(e.startMode),P(),O())},2e3))}else{const E=await g.json().catch(()=>({}));g.status===400||String(E.message).includes("invalid OTP")?D(d.i18n("sa-invite-error-otp")):g.status===504||String(E.message).includes("expired")?D(d.i18n("sa-invite-error-expired")):D(E.message||d.i18n("sa-invite-error-generic"))}}return(()=>{var o=Ya(),g=o.firstChild,E=g.nextSibling,ce=E.nextSibling,ke=_;return typeof ke=="function"?Ft(ke,o):_=o,o.addEventListener("submit",j=>{if(j.preventDefault(),b())return;me(!0),(t()==="sign-up"?c():t()==="signup-verify"?q():t()==="invite"?Promise.resolve(Dt()):U()).finally(()=>me(!1))}),f(E,z),f(ce,(()=>{var j=h(()=>t()==="reset-email"||t()==="reset-code");return()=>j()?d.i18n("sa-reset-password"):h(()=>t()==="signup-verify"||t()==="signup-webauthn")()?d.i18n("sa-signup-mfa-title"):h(()=>t()==="invite")()?d.i18n("sa-complete-invite"):d.i18n("sa-login")})()),f(o,$&&(()=>{var j=Xa();return f(j,$),j})(),null),f(o,(()=>{var j=h(()=>!!Fe());return()=>j()&&(()=>{var a=ht();return f(a,()=>d.i18n("sa-signup-complete")),a})()})(),null),f(o,(()=>{var j=h(()=>!!Z());return()=>j()&&(()=>{var a=ht();return f(a,()=>d.i18n("sa-reset-success")),a})()})(),null),f(o,(()=>{var j=h(()=>t()==="invite");return()=>j()&&[h(()=>h(()=>!!je())()&&(()=>{var a=tu();return f(a,je),a})()),h(()=>h(()=>!!S())()&&(()=>{var a=nu();return f(a,()=>d.i18n("sa-invite-success")),a})()),(()=>{var a=Qa();return a.$$input=p=>_e(p.currentTarget.value),y(p=>{var N=d.i18n("sa-invite-otp"),Ce=b()||S();return N!==p.e&&ue(a,"placeholder",p.e=N),Ce!==p.t&&(a.disabled=p.t=Ce),p},{e:void 0,t:void 0}),y(()=>a.value=Se()),a})(),(()=>{var a=Jt();return f(a,()=>d.i18n("sa-invite-otp-hint")),a})(),(()=>{var a=eu();return a.$$input=p=>v(p.currentTarget.value),y(p=>{var N=d.i18n("sa-invite-password"),Ce=b()||S();return N!==p.e&&ue(a,"placeholder",p.e=N),Ce!==p.t&&(a.disabled=p.t=Ce),p},{e:void 0,t:void 0}),y(()=>a.value=A()),a})(),(()=>{var a=Jt();return f(a,()=>d.i18n("sa-invite-password-hint")),a})(),(()=>{var a=Vt();return f(a,(()=>{var p=h(()=>!!b());return()=>p()?d.i18n("sa-invite-completing"):d.i18n("sa-invite-submit")})()),y(()=>a.disabled=b()||S()),a})()]})(),null),f(o,(()=>{var j=h(()=>t()!=="invite");return()=>j()&&[(()=>{var a=Kt();return a.$$input=p=>s(p.currentTarget.value),y(p=>{var N=d.i18n("sa-username"),Ce=t()==="otp"||t()==="otp-pick"||t()==="reset-code"||t()==="signup-verify"||t()==="signup-webauthn";return N!==p.e&&ue(a,"placeholder",p.e=N),Ce!==p.t&&(a.disabled=p.t=Ce),p},{e:void 0,t:void 0}),y(()=>a.value=r()),a})(),h(()=>h(()=>t()!=="sign-up"&&t()!=="signup-verify"&&t()!=="signup-webauthn")()&&[h(()=>h(()=>t()==="password")()&&(()=>{var a=Gt();return a.$$input=p=>u(p.currentTarget.value),y(()=>ue(a,"placeholder",d.i18n("sa-password"))),y(()=>a.value=i()),a})()),h(()=>h(()=>t()==="webauthn")()&&ht()),h(()=>h(()=>t()==="otp-pick")()&&[(()=>{var a=pt();return f(a,()=>d.i18n("sa-otp-choose")),a})(),(()=>{var a=ru();return a.addEventListener("change",p=>k(p.currentTarget.value)),f(a,()=>we().map(p=>(()=>{var N=su(),Ce=N.firstChild,Yt=Ce.nextSibling;return Yt.nextSibling,f(N,()=>p.DisplayName||p.ID,Ce),f(N,()=>p.Type,Yt),y(()=>N.value=p.ID),N})())),y(()=>a.value=Ae()),a})()]),h(()=>h(()=>t()==="otp")()&&(()=>{var a=Kt();return a.$$input=p=>w(p.currentTarget.value),y(()=>ue(a,"placeholder",d.i18n("sa-code"))),y(()=>a.value=l()),a})()),h(()=>h(()=>t()==="reset-code")()&&[(()=>{var a=Ht();return a.$$input=p=>G(p.currentTarget.value),y(()=>ue(a,"placeholder",d.i18n("sa-reset-code"))),y(()=>a.value=le()),a})(),(()=>{var a=iu();return a.$$input=p=>V(p.currentTarget.value),y(()=>ue(a,"placeholder",d.i18n("sa-new-password"))),y(()=>a.value=te()),a})()]),h(()=>h(()=>t()==="password"||t()==="webauthn")()&&(()=>{var a=au(),p=a.firstChild,N=p.nextSibling;return N.firstChild,a.$$click=()=>n(t()==="password"?"webauthn":"password"),f(N,()=>d.i18n("sa-use-password"),null),y(()=>p.checked=t()==="password"),a})())]),h(()=>h(()=>t()==="sign-up")()&&(()=>{var a=Gt();return a.$$input=p=>u(p.currentTarget.value),y(()=>ue(a,"placeholder",d.i18n("sa-password"))),y(()=>a.value=i()),a})()),h(()=>h(()=>t()==="signup-verify")()&&[(()=>{var a=pt();return f(a,()=>d.i18n("sa-signup-verify-prompt")),a})(),(()=>{var a=Ht();return a.$$input=p=>w(p.currentTarget.value),y(()=>ue(a,"placeholder",d.i18n("sa-code"))),y(()=>a.value=l()),a})()]),h(()=>h(()=>t()==="signup-webauthn")()&&(()=>{var a=pt();return f(a,()=>d.i18n("sa-signup-webauthn-prompt")),a})()),h(()=>h(()=>t()!=="signup-webauthn")()&&(()=>{var a=Vt();return f(a,(()=>{var p=h(()=>!!b());return()=>p()?d.i18n("sa-loading"):h(()=>t()==="sign-up")()?d.i18n("sa-signup"):h(()=>t()==="otp-pick")()?d.i18n("sa-otp-send-code"):h(()=>t()==="otp")()?d.i18n("sa-otp-verify"):h(()=>t()==="reset-email")()?d.i18n("sa-otp-send-code"):h(()=>t()==="reset-code")()?d.i18n("sa-reset-submit"):h(()=>t()==="signup-verify")()?d.i18n("sa-otp-verify"):d.i18n("sa-login")})()),y(()=>a.disabled=b()),a})()),h(()=>h(()=>t()==="signup-webauthn")()&&[(()=>{var a=uu();return a.$$click=()=>H(),f(a,(()=>{var p=h(()=>!!b());return()=>p()?d.i18n("sa-loading"):d.i18n("sa-signup-webauthn-setup")})()),y(()=>a.disabled=b()),a})(),(()=>{var a=tt();return a.$$click=()=>re(),f(a,()=>d.i18n("sa-signup-webauthn-done")),a})()]),h(()=>h(()=>t()==="password")()&&(()=>{var a=tt();return a.$$click=()=>{D(""),Y(!1),n("reset-email")},f(a,()=>d.i18n("sa-forgot-password")),a})()),h(()=>h(()=>t()==="reset-email"||t()==="reset-code")()&&(()=>{var a=tt();return a.$$click=()=>{D(""),G(""),V(""),n(e.startMode)},f(a,()=>d.i18n("sa-back")),a})()),h(()=>h(()=>!!(oe()&&t()!=="reset-email"&&t()!=="reset-code"&&t()!=="signup-verify"&&t()!=="signup-webauthn"))()&&(()=>{var a=tt();return a.$$click=()=>t()==="sign-up"?n(e.startMode):n("sign-up"),f(a,(()=>{var p=h(()=>t()==="sign-up");return()=>p()?d.i18n("sa-back"):d.i18n("sa-signup")})()),a})()),h(()=>h(()=>X().length>0&&(t()==="password"||t()==="webauthn"||t()==="sign-up"))()&&[(()=>{var a=ou(),p=a.firstChild;return f(p,()=>d.i18n("sa-or")),a})(),h(()=>X().map(a=>(()=>{var p=lu();return p.$$click=()=>Q(a.provider),f(p,(()=>{var N=h(()=>a.provider==="google");return()=>N()&&cu()})(),null),f(p,(()=>{var N=h(()=>a.provider==="github");return()=>N()&&du()})(),null),f(p,(()=>{var N=h(()=>a.provider==="apple");return()=>N()&&fu()})(),null),f(p,(()=>{var N=h(()=>a.provider==="oidc");return()=>N()&&hu()})(),null),f(p,(()=>{var N=h(()=>a.provider==="google");return()=>N()?d.i18n("sa-social-google"):h(()=>a.provider==="github")()?d.i18n("sa-social-github"):h(()=>a.provider==="apple")()?d.i18n("sa-social-apple"):d.i18n("sa-social-oidc")})(),null),y(()=>p.disabled=!!De()||b()),p})()))])]})(),null),o})()}),at(["input","click"]);var pu=F(`<div class=container><style>.container {
108
131
  background-color: #ffffff;
109
132
  border-radius: 10px;
110
133
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
@@ -172,6 +195,11 @@
172
195
  cursor: pointer;
173
196
  }
174
197
 
198
+ .btn:disabled {
199
+ opacity: 0.6;
200
+ cursor: not-allowed;
201
+ }
202
+
175
203
  .btn.add {
176
204
  background-color: #007bff;
177
205
  color: #ffffff;
@@ -277,7 +305,7 @@
277
305
  .modal-content .btn.verify:hover {
278
306
  background-color: #0056b3;
279
307
  }
280
- </style><style></style><h1 class=header>`),Pt=y("<span class=error-message>"),ta=y("<div class=section><h2></h2><div class=security-keys>"),na=y('<div class=key-item><span></span><button class="btn remove">'),zt=y("<span>"),ra=y("<div class=section><div class=security-keys>"),sa=y('<button class="btn add">+ '),ua=y('<div class=add-key-form><div class=add-key-item><label for=keyName style=display:none;></label><input id=keyName type=text><button class="btn remove"></button><button class="btn add">'),ia=y("<div class=section><h2></h2><table><thead><tr><th></th><th></th><th></th></tr></thead><tbody>"),aa=y('<tr class=mfa-list-item><td></td><td></td><td><button class="btn remove">'),oa=y('<span>&nbsp; <button class="btn validate">'),la=y('<div class=section><div class=mfa-manage><button class="btn add">+ '),ca=y('<div class=section><h2></h2><div class=mfa-manage><div class=mfa-item><label for=email></label><input id=email type=text><button class="btn add"></button></div><div class=mfa-item><label for=phone></label><input id=phone type=text><button class="btn add"></button></div><div class=mfa-item><button class="btn remove">'),da=y('<div class=modal id=mfaModal><div class=modal-content><span class=close id=closeModal>&times;</span><h2>MFA Verification</h2><p>Please enter the verification code sent to your email or phone:</p><input type=text id=mfaCode placeholder="Enter verification code"><button class="btn verify"id=verifyMfa>Verify');Qe("spartan-account-settings",{domain:"http://127.0.0.1:11000",sector:"0ad5c3e5-0186-4557-8b32-4b36f247bf09",styles:"",locale:"en",showWebAuthn:!0,redirect:"/",redirectOnUnauthenticated:!0},e=>{F(""),F("");const[t,n]=F(""),[r,s]=F(""),[u,a]=F(""),[o]=F(e.showWebAuthn),[A,$]=F(!1),[h,_]=F(!1),[ne,ue]=F(!1),[De,N]=F(!1),[re,ee]=F([]),[ie,R]=F([]),[X,K]=F(""),[de,fe]=F(""),[he,k]=F(""),[G,ge]=F(""),v=et(e.locale);let ae;try{ae=e.styles}catch{ae=""}He(async()=>{if(Tt())_(!0),s("");else{if(e.redirectOnUnauthenticated){window.location.href=e.redirect;return}_(!1),s(v.i18n("not-authenticated"))}me().then(w=>{console.log(w)}),await Ee(),Ce().then(w=>{R(w.registrations)})});async function me(){return await(await fetch(`${e.domain}/api/v1/users/self`,ce("get"))).json()}function ce(E="get"){return{method:E,mode:"cors",cache:"no-cache",headers:{"Content-Type":"application",Authorization:`bearer ${Ni()}`}}}function ke(){let E=ce("post");E.body=JSON.stringify({keyName:t(),sectorID:e.sector}),fetch(`${e.domain}/api/v1/webauthn/registration/begin`,E).then(w=>{if(w.status===200)return w.json();throw w}).then(w=>(console.log(w),Ie(w))).catch(w=>{w.json?w.json().then(T=>{s(T.message)}):s(w)})}async function Ie(E){try{const w=xt(E.Options);console.log("Parsed WebAuthn creation options:",w);const T=await _t(w),q=JSON.stringify(T);let M=JSON.parse(q);M.transactionID=E.TransactionID;let O=ce("post");O.body=JSON.stringify(M);const j=await fetch(`${e.domain}/api/v1/webauthn/registration/finish`,O);if(j.status!==200){const L=await j.json();s(L.message);return}$(!1),n(""),Ee()}catch(w){console.error("WebAuthn registration error:",w),s((w==null?void 0:w.message)||String(w))}}async function Pe(E){let w=ce("delete");w.body=JSON.stringify({ID:E});try{if((await fetch(`${e.domain}/api/v1/webauthn/${E}`,w)).status!==200){s(v.i18n("error-webauthn-remove"));return}Ee()}catch(T){console.error(T),s(v.i18n("error-webauthn-remove"));return}}async function Ee(){let E=ce("get");try{const T=await(await fetch(`${e.domain}/api/v1/webauthn/registration/list`,E)).json();ee(T.registrations||[])}catch(w){console.error(w),ee([])}}async function D(E,w){const T=await be(E,w);T&&(Ce().then(q=>{R(q.registrations)}),K(T.transactionID),N(!0))}async function be(E,w){let T=ce("post");T.body=JSON.stringify({destination:E,OTPType:Fe(w),sectorID:e.sector});try{const q=await fetch(`${e.domain}/api/v1/otp/begin`,T);if(q.status!==200){s(v.i18n("error-otp-verification"));return}return await q.json()}catch(q){console.error(q),s(v.i18n("error-otp-registration"));return}}async function we(E,w){let T=ce("post");T.body=JSON.stringify({transactionID:E,password:w});try{const q=await fetch(`${e.domain}/api/v1/otp/finish`,T);if(q.status!==200){a(v.i18n("error-otp-verification"));return}return N(!1),fe(""),ue(!1),ge(""),k(""),Ce().then(M=>{R(M.registrations)}),await q.json()}catch(q){console.error(q),a(v.i18n("error-otp-registration"));return}}async function Ce(){let E=ce("get");try{return await(await fetch(`${e.domain}/api/v1/otp/list`,E)).json()}catch(w){console.error(w),s(v.i18n("error-otp-list"));return}}async function xe(E){let w=ce("delete");w.body=JSON.stringify({ID:E});try{if((await fetch(`${e.domain}/api/v1/otp/${E}`,w)).status!==200){s(v.i18n("error-otp-remove"));return}Ce().then(q=>{R(q.registrations)})}catch(T){console.error(T),s(v.i18n("error-otp-remove"));return}}function Fe(E){return E==="EMAIL"?2:1}return(()=>{var E=ea(),w=E.firstChild,T=w.nextSibling,q=T.nextSibling;return d(T,ae),d(q,()=>v.i18n("sa-account-settings")),d(E,r&&(()=>{var M=Pt();return d(M,r),M})(),null),d(E,(()=>{var M=m(()=>!!(o()&&re().length));return()=>M()&&(()=>{var O=ta(),j=O.firstChild,L=j.nextSibling;return d(j,()=>v.i18n("sa-webauthn-security-keys")),d(L,()=>re().map(P=>(()=>{var H=na(),J=H.firstChild,W=J.nextSibling;return d(J,()=>P.keyName),W.$$click=()=>{confirm(v.i18n("sa-confirm-delete-key"))&&Pe(P.keyName)},d(W,()=>v.i18n("sa-remove")),H})()),null),d(L,(()=>{var P=m(()=>re().length<=0);return()=>P()&&(()=>{var H=zt();return d(H,()=>v.i18n("sa-no-security-keys")),H})()})(),null),O})()})(),null),d(E,(()=>{var M=m(()=>!!o());return()=>M()&&(()=>{var O=ra(),j=O.firstChild;return d(j,(()=>{var L=m(()=>!A());return()=>L()&&(()=>{var P=sa();return P.firstChild,P.$$click=()=>$(!0),d(P,()=>v.i18n("sa-add-security-key"),null),P})()})(),null),d(j,(()=>{var L=m(()=>!!A());return()=>L()&&(()=>{var P=ua(),H=P.firstChild,J=H.firstChild,W=J.nextSibling,Z=W.nextSibling,Y=Z.nextSibling;return d(J,()=>v.i18n("sa-webauthn-key-name")),W.$$input=i=>n(i.currentTarget.value),Z.$$click=()=>$(!1),d(Z,()=>v.i18n("sa-cancel")),Y.$$click=()=>t()!==""&&ke(),d(Y,()=>v.i18n("sa-register")),x(i=>{var g=v.i18n("sa-webauthn-key-name"),b=t()==="";return g!==i.e&&oe(W,"placeholder",i.e=g),b!==i.t&&(Y.disabled=i.t=b),i},{e:void 0,t:void 0}),x(()=>W.value=t()),P})()})(),null),O})()})(),null),d(E,(()=>{var M=m(()=>ie().length>0);return()=>M()&&(()=>{var O=ia(),j=O.firstChild,L=j.nextSibling,P=L.firstChild,H=P.firstChild,J=H.firstChild,W=J.nextSibling,Z=W.nextSibling,Y=P.nextSibling;return d(j,()=>v.i18n("sa-mfa")),d(J,()=>v.i18n("sa-mfa-destination")),d(W,()=>v.i18n("sa-mfa-validated")),d(Z,()=>v.i18n("sa-mfa-action")),d(Y,()=>ie().map(i=>(()=>{var g=aa(),b=g.firstChild,l=b.nextSibling,f=l.nextSibling,B=f.firstChild;return d(b,()=>i.DisplayName),d(l,(()=>{var p=m(()=>!!i.Validated);return()=>p()?(()=>{var c=zt();return d(c,()=>v.i18n("sa-yes")),c})():(()=>{var c=oa(),C=c.firstChild,z=C.nextSibling;return d(c,()=>v.i18n("sa-no"),C),z.$$click=()=>{D(i.DisplayName,i.Type==="email"?"EMAIL":"SMS")},d(z,()=>v.i18n("sa-validate")),c})()})()),B.$$click=()=>{confirm(v.i18n("sa-confirm-delete-key"))&&xe(i.ID)},d(B,()=>v.i18n("sa-remove")),x(()=>oe(b,"title",i.DisplayName)),g})())),O})()})(),null),d(E,(()=>{var M=m(()=>!ne());return()=>M()&&(()=>{var O=la(),j=O.firstChild,L=j.firstChild;return L.firstChild,L.$$click=()=>ue(!0),d(L,()=>v.i18n("sa-register-mfa"),null),O})()})(),null),d(E,(()=>{var M=m(()=>!!ne());return()=>M()&&(()=>{var O=ca(),j=O.firstChild,L=j.nextSibling,P=L.firstChild,H=P.firstChild,J=H.nextSibling,W=J.nextSibling,Z=P.nextSibling,Y=Z.firstChild,i=Y.nextSibling,g=i.nextSibling,b=Z.nextSibling,l=b.firstChild;return d(j,()=>v.i18n("sa-add-mfa")),d(H,()=>v.i18n("sa-email")),J.$$input=f=>k(f.currentTarget.value),W.$$click=()=>D(he(),"EMAIL"),d(W,()=>v.i18n("sa-add-email")),d(Y,()=>v.i18n("sa-phone")),i.$$input=f=>ge(f.currentTarget.value),g.$$click=()=>D(G(),"SMS"),d(g,()=>v.i18n("sa-add-sms")),l.$$click=()=>ue(!1),d(l,()=>v.i18n("sa-cancel")),x(f=>{var B=v.i18n("sa-email"),p=v.i18n("sa-phone");return B!==f.e&&oe(J,"placeholder",f.e=B),p!==f.t&&oe(i,"placeholder",f.t=p),f},{e:void 0,t:void 0}),x(()=>J.value=he()),x(()=>i.value=G()),O})()})(),null),d(E,(()=>{var M=m(()=>!!De());return()=>M()&&(()=>{var O=da(),j=O.firstChild,L=j.firstChild,P=L.nextSibling,H=P.nextSibling,J=H.nextSibling,W=J.nextSibling;return O.$$click=()=>N(!1),j.$$click=Z=>Z.stopPropagation(),L.$$click=()=>N(!1),d(j,(()=>{var Z=m(()=>!!u());return()=>Z()&&(()=>{var Y=Pt();return d(Y,u),Y})()})(),H),J.$$input=Z=>fe(Z.currentTarget.value),W.$$click=()=>we(X(),de()),x(()=>J.value=de()),O})()})(),null),E})()}),Ze(["click","input"]);var fa=y(`<form class=invite-frame><style>.invite-frame {
308
+ </style><style></style><h1 class=header>`),Wt=F("<span class=error-message>"),Du=F("<div class=section><h2></h2><div class=security-keys>"),gu=F('<div class=key-item><span></span><button class="btn remove">'),Zt=F("<span>"),mu=F("<div class=section><div class=security-keys>"),bu=F('<button class="btn add">+ '),vu=F('<div class=add-key-form><div class=add-key-item><label for=keyName style=display:none;></label><input id=keyName type=text><button class="btn remove"></button><button class="btn add">'),Cu=F("<div class=section><h2></h2><table><thead><tr><th></th><th></th><th></th></tr></thead><tbody>"),wu=F('<tr class=mfa-list-item><td></td><td></td><td><button class="btn remove">'),Au=F('<span>&nbsp; <button class="btn validate">'),Eu=F('<div class=section><div class=mfa-manage><button class="btn add">+ '),Fu=F('<div class=section><h2></h2><div class=mfa-manage><div class=mfa-item><label for=email></label><input id=email type=text><button class="btn add"></button></div><div class=mfa-item><label for=phone></label><input id=phone type=text><button class="btn add"></button></div><div class=mfa-item><button class="btn remove">'),yu=F('<div class=modal id=mfaModal><div class=modal-content><span class=close id=closeModal>&times;</span><h2>MFA Verification</h2><p>Please enter the verification code sent to your email or phone:</p><input type=text id=mfaCode placeholder="Enter verification code"><button class="btn verify"id=verifyMfa>Verify');lt("spartan-account-settings",{domain:"http://127.0.0.1:11000",sector:"0ad5c3e5-0186-4557-8b32-4b36f247bf09",styles:"",locale:"en",showWebAuthn:!0,redirect:"/",redirectOnUnauthenticated:!0},e=>{C(""),C("");const[t,n]=C(""),[r,s]=C(""),[i,u]=C(""),[l]=C(e.showWebAuthn),[w,$]=C(!1),[D,B]=C(!1),[oe,fe]=C(!1),[Fe,L]=C(!1),[Z,Y]=C(!1),[le,G]=C([]),[te,V]=C([]),[we,ye]=C(""),[Ae,k]=C(""),[X,$e]=C(""),[De,ge]=C(""),b=ct(e.locale);let me;try{me=e.styles}catch{me=""}st(async()=>{if(Ut())B(!0),s("");else{if(e.redirectOnUnauthenticated){window.location.href=e.redirect;return}B(!1),s(b.i18n("not-authenticated"))}Ue().then(v=>{console.log(v)}),await Te(),ve().then(v=>{V(v.registrations)})});async function Ue(){return await(await fetch(`${e.domain}/api/v1/users/self`,be("get"))).json()}function be(A="get"){return{method:A,mode:"cors",cache:"no-cache",headers:{"Content-Type":"application",Authorization:`bearer ${Wa()}`}}}function Me(){if(Z())return;Y(!0);let A=be("post");A.body=JSON.stringify({keyName:t(),sectorID:e.sector}),fetch(`${e.domain}/api/v1/webauthn/registration/begin`,A).then(v=>{if(v.status===200)return v.json();throw v}).then(v=>(console.log(v),Je(v))).catch(v=>{v.json?v.json().then(S=>{s(S.message)}):s(v)}).finally(()=>{Y(!1)})}async function Je(A){try{const v=Rt(A.Options);console.log("Parsed WebAuthn creation options:",v);const S=await Lt(v),R=JSON.stringify(S);let d=JSON.parse(R);d.transactionID=A.TransactionID;let _=be("post");_.body=JSON.stringify(d);const z=await fetch(`${e.domain}/api/v1/webauthn/registration/finish`,_);if(z.status!==200){const P=await z.json();s(P.message);return}$(!1),n(""),Te()}catch(v){console.error("WebAuthn registration error:",v),s((v==null?void 0:v.message)||String(v))}}async function Ve(A){let v=be("delete");v.body=JSON.stringify({ID:A});try{if((await fetch(`${e.domain}/api/v1/webauthn/${A}`,v)).status!==200){s(b.i18n("error-webauthn-remove"));return}Te()}catch(S){console.error(S),s(b.i18n("error-webauthn-remove"));return}}async function Te(){let A=be("get");try{const S=await(await fetch(`${e.domain}/api/v1/webauthn/registration/list`,A)).json();G(S.registrations||[])}catch(v){console.error(v),G([])}}function Oe(A,v){Z()||(Y(!0),Ie(A,v).then(S=>{if(S)return ve().then(R=>{V(R.registrations),ye(S.transactionID),L(!0)})}).finally(()=>{Y(!1)}))}function Ie(A,v){let S=be("post");return S.body=JSON.stringify({destination:A,OTPType:_e(v),sectorID:e.sector}),fetch(`${e.domain}/api/v1/otp/begin`,S).then(R=>{if(R.status!==200){s(b.i18n("error-otp-verification"));return}return R.json()}).catch(R=>{console.error(R),s(b.i18n("error-otp-registration"))})}function je(A,v){if(Z())return;Y(!0);let S=be("post");S.body=JSON.stringify({transactionID:A,password:v}),fetch(`${e.domain}/api/v1/otp/finish`,S).then(R=>{if(R.status!==200){u(b.i18n("error-otp-verification"));return}return L(!1),k(""),fe(!1),ge(""),$e(""),ve().then(d=>{V(d.registrations)}),R.json()}).catch(R=>{console.error(R),u(b.i18n("error-otp-registration"))}).finally(()=>{Y(!1)})}async function ve(){let A=be("get");try{return await(await fetch(`${e.domain}/api/v1/otp/list`,A)).json()}catch(v){console.error(v),s(b.i18n("error-otp-list"));return}}async function Se(A){let v=be("delete");v.body=JSON.stringify({ID:A});try{if((await fetch(`${e.domain}/api/v1/otp/${A}`,v)).status!==200){s(b.i18n("error-otp-remove"));return}ve().then(R=>{V(R.registrations)})}catch(S){console.error(S),s(b.i18n("error-otp-remove"));return}}function _e(A){return A==="EMAIL"?2:1}return(()=>{var A=pu(),v=A.firstChild,S=v.nextSibling,R=S.nextSibling;return f(S,me),f(R,()=>b.i18n("sa-account-settings")),f(A,r&&(()=>{var d=Wt();return f(d,r),d})(),null),f(A,(()=>{var d=h(()=>!!(l()&&le().length));return()=>d()&&(()=>{var _=Du(),z=_.firstChild,P=z.nextSibling;return f(z,()=>b.i18n("sa-webauthn-security-keys")),f(P,()=>le().map(O=>(()=>{var Q=gu(),K=Q.firstChild,q=K.nextSibling;return f(K,()=>O.keyName),q.$$click=()=>{confirm(b.i18n("sa-confirm-delete-key"))&&Ve(O.keyName)},f(q,()=>b.i18n("sa-remove")),Q})()),null),f(P,(()=>{var O=h(()=>le().length<=0);return()=>O()&&(()=>{var Q=Zt();return f(Q,()=>b.i18n("sa-no-security-keys")),Q})()})(),null),_})()})(),null),f(A,(()=>{var d=h(()=>!!l());return()=>d()&&(()=>{var _=mu(),z=_.firstChild;return f(z,(()=>{var P=h(()=>!w());return()=>P()&&(()=>{var O=bu();return O.firstChild,O.$$click=()=>$(!0),f(O,()=>b.i18n("sa-add-security-key"),null),O})()})(),null),f(z,(()=>{var P=h(()=>!!w());return()=>P()&&(()=>{var O=vu(),Q=O.firstChild,K=Q.firstChild,q=K.nextSibling,H=q.nextSibling,re=H.nextSibling;return f(K,()=>b.i18n("sa-webauthn-key-name")),q.$$input=U=>n(U.currentTarget.value),H.$$click=()=>$(!1),f(H,()=>b.i18n("sa-cancel")),re.$$click=()=>t()!==""&&Me(),f(re,()=>b.i18n("sa-register")),y(U=>{var c=b.i18n("sa-webauthn-key-name"),m=t()===""||Z();return c!==U.e&&ue(q,"placeholder",U.e=c),m!==U.t&&(re.disabled=U.t=m),U},{e:void 0,t:void 0}),y(()=>q.value=t()),O})()})(),null),_})()})(),null),f(A,(()=>{var d=h(()=>te().length>0);return()=>d()&&(()=>{var _=Cu(),z=_.firstChild,P=z.nextSibling,O=P.firstChild,Q=O.firstChild,K=Q.firstChild,q=K.nextSibling,H=q.nextSibling,re=O.nextSibling;return f(z,()=>b.i18n("sa-mfa")),f(K,()=>b.i18n("sa-mfa-destination")),f(q,()=>b.i18n("sa-mfa-validated")),f(H,()=>b.i18n("sa-mfa-action")),f(re,()=>te().map(U=>(()=>{var c=wu(),m=c.firstChild,I=m.nextSibling,x=I.nextSibling,ee=x.firstChild;return f(m,()=>U.DisplayName),f(I,(()=>{var se=h(()=>!!U.Validated);return()=>se()?(()=>{var ie=Zt();return f(ie,()=>b.i18n("sa-yes")),ie})():(()=>{var ie=Au(),he=ie.firstChild,Be=he.nextSibling;return f(ie,()=>b.i18n("sa-no"),he),Be.$$click=()=>{Oe(U.DisplayName,U.Type==="email"?"EMAIL":"SMS")},f(Be,()=>b.i18n("sa-validate")),y(()=>Be.disabled=Z()),ie})()})()),ee.$$click=()=>{confirm(b.i18n("sa-confirm-delete-key"))&&Se(U.ID)},f(ee,()=>b.i18n("sa-remove")),y(()=>ue(m,"title",U.DisplayName)),c})())),_})()})(),null),f(A,(()=>{var d=h(()=>!oe());return()=>d()&&(()=>{var _=Eu(),z=_.firstChild,P=z.firstChild;return P.firstChild,P.$$click=()=>fe(!0),f(P,()=>b.i18n("sa-register-mfa"),null),_})()})(),null),f(A,(()=>{var d=h(()=>!!oe());return()=>d()&&(()=>{var _=Fu(),z=_.firstChild,P=z.nextSibling,O=P.firstChild,Q=O.firstChild,K=Q.nextSibling,q=K.nextSibling,H=O.nextSibling,re=H.firstChild,U=re.nextSibling,c=U.nextSibling,m=H.nextSibling,I=m.firstChild;return f(z,()=>b.i18n("sa-add-mfa")),f(Q,()=>b.i18n("sa-email")),K.$$input=x=>$e(x.currentTarget.value),q.$$click=()=>Oe(X(),"EMAIL"),f(q,()=>b.i18n("sa-add-email")),f(re,()=>b.i18n("sa-phone")),U.$$input=x=>ge(x.currentTarget.value),c.$$click=()=>Oe(De(),"SMS"),f(c,()=>b.i18n("sa-add-sms")),I.$$click=()=>fe(!1),f(I,()=>b.i18n("sa-cancel")),y(x=>{var ee=b.i18n("sa-email"),se=Z(),ie=b.i18n("sa-phone"),he=Z();return ee!==x.e&&ue(K,"placeholder",x.e=ee),se!==x.t&&(q.disabled=x.t=se),ie!==x.a&&ue(U,"placeholder",x.a=ie),he!==x.o&&(c.disabled=x.o=he),x},{e:void 0,t:void 0,a:void 0,o:void 0}),y(()=>K.value=X()),y(()=>U.value=De()),_})()})(),null),f(A,(()=>{var d=h(()=>!!Fe());return()=>d()&&(()=>{var _=yu(),z=_.firstChild,P=z.firstChild,O=P.nextSibling,Q=O.nextSibling,K=Q.nextSibling,q=K.nextSibling;return _.$$click=()=>L(!1),z.$$click=H=>H.stopPropagation(),P.$$click=()=>L(!1),f(z,(()=>{var H=h(()=>!!i());return()=>H()&&(()=>{var re=Wt();return f(re,i),re})()})(),Q),K.$$input=H=>k(H.currentTarget.value),q.$$click=()=>je(we(),Ae()),y(()=>q.disabled=Z()),y(()=>K.value=Ae()),_})()})(),null),A})()}),at(["click","input"]);var $u=F(`<form class=invite-frame><style>.invite-frame {
281
309
  display: flex;
282
310
  flex-direction: column;
283
311
  justify-content: center;
@@ -337,4 +365,4 @@
337
365
  margin-bottom: 10px;
338
366
  display: block;
339
367
  }
340
- </style><style></style><h1></h1><input type=text autocomplete=one-time-code required><span class=hint></span><input type=password autocomplete=new-password required minlength=8><span class=hint></span><button type=submit>`),ha=y("<span class=info-message>"),pa=y("<span class=error-message>"),Da=y("<span class=success-message>");Qe("spartan-invite",{domain:"http://127.0.0.1:11000",sector:"0ad5c3e5-0186-4557-8b32-4b36f247bf09",sub:"",email:"",styles:"",locale:"en",redirect:""},e=>{const[t,n]=F(""),[r,s]=F(""),[u,a]=F(""),[o,A]=F(""),[$,h]=F(!1),_=et(e.locale);let ne,ue;try{ue=e.styles}catch{ue=""}He(async()=>{e.sub||new URLSearchParams(window.location.search).get("sub")||a("Missing invitation information. Please use the link from your invite email.");const re=new URLSearchParams(window.location.hash.replace("#","")).get("otp");re&&n(re)});async function De(N){var ie,R;if(N.preventDefault(),a(""),A(""),h(!0),!t()||t().trim().length===0){a("Please enter your verification code"),h(!1);return}if(!r()||r().length<8){a("Password must be at least 8 characters"),h(!1);return}const re=new URLSearchParams(window.location.search),ee=e.sub||re.get("sub")||"";if(!ee){a("Missing invitation information"),h(!1);return}try{const X=await fetch(`${e.domain}/api/v1/users/invite/complete`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({sub:ee,otp:t().toUpperCase().trim(),password:r(),sectorID:e.sector})});if(X.ok){const K=await X.json();A(_.i18n("sa-invite-success"));const de=new CustomEvent("spartan-invite-complete",{bubbles:!0,cancelable:!0,detail:{sub:ee,success:!0}});ne&&ne.getRootNode().host.dispatchEvent(de),setTimeout(()=>{e.redirect&&e.redirect!==""&&(window.location.href=e.redirect)},2e3)}else{const K=await X.json().catch(()=>({}));X.status===400||(ie=K.message)!=null&&ie.includes("invalid OTP")?a(_.i18n("sa-invite-error-otp")):X.status===504||(R=K.message)!=null&&R.includes("expired")?a(_.i18n("sa-invite-error-expired")):a(K.message||_.i18n("sa-invite-error-generic")),h(!1)}}catch(X){console.error("Error completing invite:",X),a(_.i18n("sa-invite-error-generic")),h(!1)}}return(()=>{var N=fa(),re=N.firstChild,ee=re.nextSibling,ie=ee.nextSibling,R=ie.nextSibling,X=R.nextSibling,K=X.nextSibling,de=K.nextSibling,fe=de.nextSibling,he=ne;return typeof he=="function"?ht(he,N):ne=N,N.addEventListener("submit",De),d(ee,ue),d(ie,()=>_.i18n("sa-complete-invite")),d(N,(()=>{var k=m(()=>!!e.email);return()=>k()&&(()=>{var G=ha();return d(G,()=>e.email),G})()})(),R),d(N,(()=>{var k=m(()=>!!u());return()=>k()&&(()=>{var G=pa();return d(G,u),G})()})(),R),d(N,(()=>{var k=m(()=>!!o());return()=>k()&&(()=>{var G=Da();return d(G,o),G})()})(),R),R.$$input=k=>n(k.currentTarget.value),d(X,()=>_.i18n("sa-invite-otp-hint")),K.$$input=k=>s(k.currentTarget.value),d(de,()=>_.i18n("sa-invite-password-hint")),d(fe,(()=>{var k=m(()=>!!$());return()=>k()?_.i18n("sa-invite-completing"):_.i18n("sa-invite-submit")})()),x(k=>{var G=_.i18n("sa-invite-otp"),ge=$()||o()!=="",v=_.i18n("sa-invite-password"),ae=$()||o()!=="",me=$()||o()!=="";return G!==k.e&&oe(R,"placeholder",k.e=G),ge!==k.t&&(R.disabled=k.t=ge),v!==k.a&&oe(K,"placeholder",k.a=v),ae!==k.o&&(K.disabled=k.o=ae),me!==k.i&&(fe.disabled=k.i=me),k},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),x(()=>R.value=t()),x(()=>K.value=r()),N})()}),Ze(["input"])});
368
+ </style><style></style><h1></h1><input type=text autocomplete=one-time-code required><span class=hint></span><input type=password autocomplete=new-password required minlength=8><span class=hint></span><button type=submit>`),Bu=F("<span class=info-message>"),ku=F("<span class=error-message>"),xu=F("<span class=success-message>");lt("spartan-invite",{domain:"http://127.0.0.1:11000",sector:"0ad5c3e5-0186-4557-8b32-4b36f247bf09",sub:"",email:"",styles:"",locale:"en",redirect:""},e=>{console.warn("[spartan-invite] <spartan-invite> is deprecated. Use <spartan-login> instead — it now handles invite links by detecting ?sub= URL params automatically.");const[t,n]=C(""),[r,s]=C(""),[i,u]=C(""),[l,w]=C(""),[$,D]=C(!1),B=ct(e.locale);let oe,fe;try{fe=e.styles}catch{fe=""}st(async()=>{e.sub||new URLSearchParams(window.location.search).get("sub")||u("Missing invitation information. Please use the link from your invite email.");const Z=new URLSearchParams(window.location.hash.replace("#","")).get("otp");Z&&n(Z)});async function Fe(L){var le,G;if(L.preventDefault(),u(""),w(""),D(!0),!t()||t().trim().length===0){u("Please enter your verification code"),D(!1);return}if(!r()||r().length<8){u("Password must be at least 8 characters"),D(!1);return}const Z=new URLSearchParams(window.location.search),Y=e.sub||Z.get("sub")||"";if(!Y){u("Missing invitation information"),D(!1);return}try{const te=await fetch(`${e.domain}/api/v1/users/invite/complete`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({sub:Y,otp:t().toUpperCase().trim(),password:r(),sectorID:e.sector})});if(te.ok){const V=await te.json();w(B.i18n("sa-invite-success"));const we=new CustomEvent("spartan-invite-complete",{bubbles:!0,cancelable:!0,detail:{sub:Y,success:!0}});oe&&oe.getRootNode().host.dispatchEvent(we),setTimeout(()=>{e.redirect&&e.redirect!==""&&(window.location.href=e.redirect)},2e3)}else{const V=await te.json().catch(()=>({}));te.status===400||(le=V.message)!=null&&le.includes("invalid OTP")?u(B.i18n("sa-invite-error-otp")):te.status===504||(G=V.message)!=null&&G.includes("expired")?u(B.i18n("sa-invite-error-expired")):u(V.message||B.i18n("sa-invite-error-generic")),D(!1)}}catch(te){console.error("Error completing invite:",te),u(B.i18n("sa-invite-error-generic")),D(!1)}}return(()=>{var L=$u(),Z=L.firstChild,Y=Z.nextSibling,le=Y.nextSibling,G=le.nextSibling,te=G.nextSibling,V=te.nextSibling,we=V.nextSibling,ye=we.nextSibling,Ae=oe;return typeof Ae=="function"?Ft(Ae,L):oe=L,L.addEventListener("submit",Fe),f(Y,fe),f(le,()=>B.i18n("sa-complete-invite")),f(L,(()=>{var k=h(()=>!!e.email);return()=>k()&&(()=>{var X=Bu();return f(X,()=>e.email),X})()})(),G),f(L,(()=>{var k=h(()=>!!i());return()=>k()&&(()=>{var X=ku();return f(X,i),X})()})(),G),f(L,(()=>{var k=h(()=>!!l());return()=>k()&&(()=>{var X=xu();return f(X,l),X})()})(),G),G.$$input=k=>n(k.currentTarget.value),f(te,()=>B.i18n("sa-invite-otp-hint")),V.$$input=k=>s(k.currentTarget.value),f(we,()=>B.i18n("sa-invite-password-hint")),f(ye,(()=>{var k=h(()=>!!$());return()=>k()?B.i18n("sa-invite-completing"):B.i18n("sa-invite-submit")})()),y(k=>{var X=B.i18n("sa-invite-otp"),$e=$()||l()!=="",De=B.i18n("sa-invite-password"),ge=$()||l()!=="",b=$()||l()!=="";return X!==k.e&&ue(G,"placeholder",k.e=X),$e!==k.t&&(G.disabled=k.t=$e),De!==k.a&&ue(V,"placeholder",k.a=De),ge!==k.o&&(V.disabled=k.o=ge),b!==k.i&&(ye.disabled=k.i=b),k},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),y(()=>G.value=t()),y(()=>V.value=r()),L})()}),at(["input"])});