@masonitestudios/spartanauth-widgets 1.1.1 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +222 -0
- package/dist/sa-widgets.mjs +1092 -988
- package/dist/sa-widgets.umd.js +45 -4
- package/package.json +2 -2
package/dist/sa-widgets.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(st){typeof define=="function"&&define.amd?define(st):st()})(function(){"use strict";const Ge={equals:(e,t)=>e===t};let vt=Et;const xe=1,He=2,Ct={owned:null,cleanups:null,context:null,owner:null};var Z=null;let it=null,en=null,Y=null,se=null,Fe=null,We=0;function tn(e,t){const n=Y,r=Z,s=e.length===0,i=t===void 0?r:t,u=s?Ct:{owned:null,cleanups:null,context:i?i.context:null,owner:i},o=s?e:()=>e(()=>Ze(()=>Ue(u)));Z=u,Y=null;try{return qe(o,!0)}finally{Y=n,Z=r}}function C(e,t){t=t?Object.assign({},Ge,t):Ge;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=s=>(typeof s=="function"&&(s=s(n.value)),At(n,s));return[wt.bind(n),r]}function y(e,t,n){const r=ut(e,t,!1,xe);Le(r)}function nn(e,t,n){vt=on;const r=ut(e,t,!1,xe);r.user=!0,Fe?Fe.push(r):Le(r)}function h(e,t,n){n=n?Object.assign({},Ge,n):Ge;const r=ut(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Le(r),wt.bind(r)}function Ze(e){if(Y===null)return e();const t=Y;Y=null;try{return e()}finally{Y=t}}function at(e){nn(()=>Ze(e))}function rn(e){return Z===null||(Z.cleanups===null?Z.cleanups=[e]:Z.cleanups.push(e)),e}function sn(){return Z}function wt(){if(this.sources&&this.state)if(this.state===xe)Le(this);else{const e=se;se=null,qe(()=>Xe(this),!1),se=e}if(Y){const e=this.observers?this.observers.length:0;Y.sources?(Y.sources.push(this),Y.sourceSlots.push(e)):(Y.sources=[this],Y.sourceSlots=[e]),this.observers?(this.observers.push(Y),this.observerSlots.push(Y.sources.length-1)):(this.observers=[Y],this.observerSlots=[Y.sources.length-1])}return this.value}function At(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&qe(()=>{for(let s=0;s<e.observers.length;s+=1){const i=e.observers[s],u=it&&it.running;u&&it.disposed.has(i),(u?!i.tState:!i.state)&&(i.pure?se.push(i):Fe.push(i),i.observers&&Ft(i)),u||(i.state=xe)}if(se.length>1e6)throw se=[],new Error},!1)),t}function Le(e){if(!e.fn)return;Ue(e);const t=We;an(e,e.value,t)}function an(e,t,n){let r;const s=Z,i=Y;Y=Z=e;try{r=e.fn(t)}catch(u){return e.pure&&(e.state=xe,e.owned&&e.owned.forEach(Ue),e.owned=null),e.updatedAt=n+1,yt(u)}finally{Y=i,Z=s}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?At(e,r):e.value=r,e.updatedAt=n)}function ut(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:Z,context:Z?Z.context:null,pure:n};return Z===null||Z!==Ct&&(Z.owned?Z.owned.push(i):Z.owned=[i]),i}function Ye(e){if(e.state===0)return;if(e.state===He)return Xe(e);if(e.suspense&&Ze(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<We);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===xe)Le(e);else if(e.state===He){const r=se;se=null,qe(()=>Xe(e,t[0]),!1),se=r}}function qe(e,t){if(se)return e();let n=!1;t||(se=[]),Fe?n=!0:Fe=[],We++;try{const r=e();return un(n),r}catch(r){n||(Fe=null),se=null,yt(r)}}function un(e){if(se&&(Et(se),se=null),e)return;const t=Fe;Fe=null,t.length&&qe(()=>vt(t),!1)}function Et(e){for(let t=0;t<e.length;t++)Ye(e[t])}function on(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:Ye(r)}for(t=0;t<n;t++)Ye(e[t])}function Xe(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<We)&&Ye(r):s===He&&Xe(r,t)}}}function Ft(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=He,n.pure?se.push(n):Fe.push(n),n.observers&&Ft(n))}}function Ue(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--)Ue(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)Ue(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 ln(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function yt(e,t=Z){throw ln(e)}function cn(e,t,n){let r=n.length,s=t.length,i=r,u=0,o=0,w=t[s-1].nextSibling,$=null;for(;u<s||o<i;){if(t[u]===n[o]){u++,o++;continue}for(;t[s-1]===n[i-1];)s--,i--;if(s===u){const D=i<r?o?n[o-1].nextSibling:n[i-o]:w;for(;o<i;)e.insertBefore(n[o++],D)}else if(i===o)for(;u<s;)(!$||!$.has(t[u]))&&t[u].remove(),u++;else if(t[u]===n[i-1]&&n[o]===t[s-1]){const D=t[--s].nextSibling;e.insertBefore(n[o++],t[u++].nextSibling),e.insertBefore(n[--i],D),t[s]=n[i]}else{if(!$){$=new Map;let k=o;for(;k<i;)$.set(n[k],k++)}const D=$.get(t[u]);if(D!=null)if(o<D&&D<i){let k=u,oe=1,he;for(;++k<s&&k<i&&!((he=$.get(t[k]))==null||he!==D+oe);)oe++;if(oe>D-o){const ye=t[u];for(;o<D;)e.insertBefore(n[o++],ye)}else e.replaceChild(n[o++],t[u++])}else u++;else t[u++].remove()}}}const $t="_$DX_DELEGATE";function A(e,t,n,r){let s;const i=()=>{const o=document.createElement("template");return o.innerHTML=e,o.content.firstChild},u=()=>(s||(s=i())).cloneNode(!0);return u.cloneNode=u,u}function ot(e,t=window.document){const n=t[$t]||(t[$t]=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,dn))}}function ue(e,t,n){n==null?e.removeAttribute(t):e.setAttribute(t,n)}function kt(e,t,n){return Ze(()=>e(t,n))}function f(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return Qe(e,t,r,n);y(s=>Qe(e,t(),s,n),r)}function dn(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},o=()=>{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,o();break}if(t.parentNode===s)break}}else o();i(r)}function Qe(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 o=n[0];o&&o.nodeType===3?o.data!==t&&(o.data=t):o=document.createTextNode(t),n=ze(e,n,r,o)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||i==="boolean")n=ze(e,n,r);else{if(i==="function")return y(()=>{let o=t();for(;typeof o=="function";)o=o();n=Qe(e,o,n,r)}),()=>n;if(Array.isArray(t)){const o=[],w=n&&Array.isArray(n);if(lt(o,t,n,s))return y(()=>n=Qe(e,o,n,r,!0)),()=>n;if(o.length===0){if(n=ze(e,n,r),u)return n}else w?n.length===0?Bt(e,o,r):cn(e,n,o):(n&&ze(e),Bt(e,o));n=o}else if(t.nodeType){if(Array.isArray(n)){if(u)return n=ze(e,n,r,t);ze(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function lt(e,t,n,r){let s=!1;for(let i=0,u=t.length;i<u;i++){let o=t[i],w=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=lt(e,o,w)||s;else if($==="function")if(r){for(;typeof o=="function";)o=o();s=lt(e,Array.isArray(o)?o:[o],Array.isArray(w)?w:[w])||s}else e.push(o),s=!0;else{const D=String(o);w&&w.nodeType===3&&w.data===D?e.push(w):e.push(document.createTextNode(D))}}return s}function Bt(e,t,n=null){for(let r=0,s=t.length;r<s;r++)e.insertBefore(t[r],n)}function ze(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 o=t[u];if(s!==o){const w=o.parentNode===e;!i&&!u?w?e.replaceChild(s,o):e.insertBefore(s,n):w&&o.remove()}else i=!0}}else e.insertBefore(s,n);return[s]}function fn(e){return Object.keys(e).reduce((n,r)=>{const s=e[r];return n[r]=Object.assign({},s),_t(s.value)&&!mn(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 hn(e){return e?Object.keys(e).reduce((n,r)=>{const s=e[r];return n[r]=_t(s)&&"value"in s?s:{value:s},n[r].attribute||(n[r].attribute=gn(r)),n[r].parse="parse"in n[r]?n[r].parse:typeof n[r].value!="string",n},{}):{}}function pn(e){return Object.keys(e).reduce((n,r)=>(n[r]=e[r].value,n),{})}function Dn(e,t){const n=fn(t);return Object.keys(t).forEach(s=>{const i=n[s],u=e.getAttribute(i.attribute),o=e[s];u!=null&&(i.value=i.parse?xt(u):u),o!=null&&(i.value=Array.isArray(o)?o.slice(0):o),i.reflect&&St(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&&St(this,i.attribute,i.value,!!i.parse);for(let D=0,k=this.__propertyChangedCallbacks.length;D<k;D++)this.__propertyChangedCallbacks[D](s,w,$)},enumerable:!0,configurable:!0})}),n}function xt(e){if(e)try{return JSON.parse(e)}catch{return e}}function St(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 gn(e){return e.replace(/\.?([A-Z]+)/g,(t,n)=>"-"+n.toLowerCase()).replace("_","-").replace(/^-/,"")}function _t(e){return e!=null&&(typeof e=="object"||typeof e=="function")}function mn(e){return Object.prototype.toString.call(e)==="[object Function]"}function bn(e){return typeof e=="function"&&e.toString().indexOf("class")===0}let ct;function vn(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=pn(this.props),i=this.Component,u=ct;try{ct=this,this.__initialized=!0,bn(i)?new i(s,{element:this}):i(s,{element:this})}finally{ct=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?xt(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 Cn(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 o=i.get(e);return o?(o.prototype.Component=u,o):(o=vn(r,hn(t)),o.prototype.Component=u,o.prototype.registeredTag=e,i.define(e,o,s),o)}}function wn(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 An(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 En(e){return(t,n)=>{const{element:r}=n;return tn(s=>{const i=wn(t);r.addPropertyChangedCallback((o,w)=>i[o]=w),r.addReleaseCallback(()=>{r.renderRoot.textContent="",s()});const u=e(i,n);return f(r.renderRoot,u)},An(r))}}function dt(e,t,n){return arguments.length===2&&(n=t,t={}),Cn(e,t)(En(n))}var Fn="٠١٢٣٤٥٦٧٨٩",yn="۰۱۲۳۴۵۶۷۸۹",$n="൦൧൨൩൪൫൬൭൮൯",kn="೦೧೨೩೪೫೬೭೮೯",Bn="໐໑໒໓໔໕໖໗໘໙",xn="୦୧୨୩୪୫୬୭୮୯",Sn="០១២៣៤៥៦៧៨៩",_n="߀߁߂߃߄߅߆߇߈߉",Tn="੦੧੨੩੪੫੬੭੮੯",On="૦૧૨૩૪૫૬૭૮૯",In="०१२३४५६७८९",Pn="၀၁၂၃၄၅၆၇၈၉",zn="௦௧௨௩௪௫௬௭௮௯",Nn="౦౧౨౩౪౫౬౭౮౯",Mn="๐๑๒๓๔๕๖๗๘๙",jn="༠༡༢༣༤༥༦༧༨༩",Tt={ar:Fn,fa:yn,ml:$n,kn,lo:Bn,or:xn,kh:Sn,nqo:_n,pa:Tn,gu:On,hi:In,my:Pn,ta:zn,te:Nn,th:Mn,bo:jn},Rn=["ru"],Ln=["id"],qn=["id"],Un=["ady-cyrl"],Jn=["aeb-arab"],Vn=["sq"],Kn=["ru"],Gn=["zh-hant"],Hn=["es"],Wn=["hi"],Zn=["es"],Yn=["ar"],Xn=["ar"],Qn=["ar"],er=["es"],tr=["fr"],nr=["ru"],rr=["fr","es","ru"],sr=["hi"],ir=["es"],ar=["fa"],ur=["ru"],or=["id"],lr=["de"],cr=["bbc-latn"],dr=["fa"],fr=["fa"],hr=["bho"],pr=["en"],Dr=["id"],gr=["fr"],mr=["bn"],br=["fa"],vr=["fr"],Cr=["id"],wr=["id"],Ar=["ru"],Er=["oc"],Fr=["nan","zh-hant"],yr=["ru"],$r=["it"],kr=["crh-latn"],Br=["sk"],xr=["pl"],Sr=["ru"],_r=["hsb","de"],Tr=["ms"],Or=["ne"],Ir=["it"],Pr=["it"],zr=["es"],Nr=["fr"],Mr=["fi"],jr=["fr"],Rr=["fr"],Lr=["de"],qr=["it"],Ur=["tr"],Jr=["gan-hant","zh-hant","zh-hans"],Vr=["fr"],Kr=["pt"],Gr=["fa"],Hr=["es"],Wr=["gom-deva"],Zr=["id"],Yr=["de"],Xr=["es"],Qr=["zh-hant"],es=["hif-latn"],ts=["de"],ns=["dsb","de"],rs=["fr"],ss=["hy"],is=["zh-cn","zh-hans"],as=["ru"],us=["eo"],os=["ike-cans"],ls=["en"],cs=["da"],ds=["id"],fs=["kk-latn","kk-cyrl"],hs=["fr"],ps=["kbd-cyrl"],Ds=["fr"],gs=["ur"],ms=["tr"],bs=["my"],vs=["kk-cyrl"],Cs=["da"],ws=["ru"],As=["ru"],Es=["fi"],Fs=["ks-arab"],ys=["de"],$s=["ku-latn"],ks=["ru"],Bs=["ru"],xs=["es"],Ss=["de"],_s=["ru"],Ts=["ru","az"],Os=["nl"],Is=["it"],Ps=["et"],zs=["fa"],Ns=["it","rm","fur"],Ms=["pms","eml","lij","vec","it"],js=["fr"],Rs=["fa"],Ls=["lv"],qs=["fa"],Us=["zh-hant"],Js=["tr"],Vs=["id"],Ks=["hi"],Gs=["myv","ru"],Hs=["fr"],Ws=["mrj","ru"],Zs=["id"],Ys=["my"],Xs=["ro"],Qs=["mhr","ru"],ei=["pt"],ti=["mdf","ru"],ni=["fa"],ri=["es"],si=["cdo","zh-hant"],ii=["it"],ai=["nn"],ui=["de"],oi=["id"],li=["nb"],ci=["fr"],di=["ca","fr"],fi=["fi"],hi=["ru"],pi=["fr"],Di=["de"],gi=["de"],mi=["de"],bi=["en"],vi=["it"],Ci=["el"],wi=["pt-br"],Ai=["qug","es"],Ei=["qu","es"],Fi=["it"],yi=["ro"],$i=["uk","ru"],ki=["ro"],Bi=["ruq-latn","ro"],xi=["hi"],Si=["ru"],_i=["it"],Ti=["en"],Oi=["it"],Ii=["cbk","fa"],Pi=["fr"],zi=["fr"],Ni=["lt"],Mi=["bs","sr-el","hr"],ji=["fr"],Ri=["shy-latn"],Li=["cs"],qi=["skr-arab"],Ui=["de"],Ji=["fi"],Vi=["sr-ec"],Ki=["nl"],Gi=["de"],Hi=["ru"],Wi=["id"],Zi=["pl"],Yi=["zh-tw","zh-hant","zh-hans"],Xi=["zh-tw","zh-hant","zh-hans"],Qi=["kn"],ea=["pt"],ta=["tg-cyrl"],na=["zh-tw","zh-hant","zh-hans"],ra=["tt-cyrl","ru"],sa=["fr"],ia=["ru"],aa=["ru"],ua=["ug-arab"],oa=["it"],la=["et"],ca=["nl"],da=["de"],fa=["fi"],ha=["et"],pa=["fr"],Da=["fr"],ga=["zh-hans"],ma=["ru"],ba=["ka"],va=["he"],Ca=["zh-hans"],wa=["nl"],Aa=["kab"],Ea=["zh-hans"],Ot={ab:Rn,abs:Ln,ace:qn,ady:Un,aeb:Jn,"aeb-arab":["ar"],aln:Vn,alt:Kn,ami:Gn,an:Hn,anp:Wn,arn:Zn,arq:Yn,ary:Xn,arz:Qn,ast:er,atj:tr,av:nr,avk:rr,awa:sr,ay:ir,azb:ar,ba:ur,ban:or,"ban-bali":["ban"],bar:lr,bbc:cr,"bbc-latn":["id"],bcc:dr,"be-tarask":["be"],bgn:fr,bh:hr,bi:pr,bjn:Dr,bm:gr,bpy:mr,bqi:br,br:vr,btm:Cr,bug:wr,bxr:Ar,ca:Er,"cbk-zam":["es"],cdo:Fr,ce:yr,co:$r,crh:kr,"crh-cyrl":["ru"],cs:Br,csb:xr,cv:Sr,"de-at":["de"],"de-ch":["de"],"de-formal":["de"],dsb:_r,dtp:Tr,dty:Or,egl:Ir,eml:Pr,"en-ca":["en"],"en-gb":["en"],"es-419":["es"],"es-formal":["es"],ext:zr,ff:Nr,fit:Mr,frc:jr,frp:Rr,frr:Lr,fur:qr,gag:Ur,gan:Jr,"gan-hans":["zh-hans"],"gan-hant":["zh-hant","zh-hans"],gcr:Vr,gl:Kr,glk:Gr,gn:Hr,gom:Wr,"gom-deva":["hi"],gor:Zr,gsw:Yr,guc:Xr,hak:Qr,hif:es,hrx:ts,hsb:ns,ht:rs,"hu-formal":["hu"],hyw:ss,ii:is,inh:as,io:us,iu:os,jam:ls,jut:cs,jv:ds,kaa:fs,kab:hs,kbd:ps,kbp:Ds,khw:gs,kiu:ms,kjp:bs,kk:vs,"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:Cs,"ko-kp":["ko"],koi:ws,krc:As,krl:Es,ks:Fs,ksh:ys,ku:$s,"ku-arab":["ckb"],kum:ks,kv:Bs,lad:xs,lb:Ss,lbe:_s,lez:Ts,li:Os,lij:Is,liv:Ps,lki:zs,lld:Ns,lmo:Ms,ln:js,lrc:Rs,ltg:Ls,luz:qs,lzh:Us,lzz:Js,mad:Vs,mai:Ks,"map-bms":["jv","id"],mdf:Gs,mg:Hs,mhr:Ws,min:Zs,mnw:Ys,mo:Xs,mrj:Qs,"ms-arab":["ms"],mwl:ei,myv:ti,mzn:ni,nah:ri,nan:si,nap:ii,nb:ai,nds:ui,"nds-nl":["nl"],nia:oi,"nl-informal":["nl"],nn:li,nrm:ci,oc:di,olo:fi,os:hi,pcd:pi,pdc:Di,pdt:gi,pfl:mi,pih:bi,pms:vi,pnt:Ci,pt:wi,"pt-br":["pt"],qu:Ai,qug:Ei,rgn:Fi,rmy:yi,"roa-tara":["it"],rue:$i,rup:ki,ruq:Bi,"ruq-cyrl":["mk"],"ruq-latn":["ro"],sa:xi,sah:Si,scn:_i,sco:Ti,sdc:Oi,sdh:Ii,ses:Pi,sg:zi,sgs:Ni,sh:Mi,shi:ji,shy:Ri,"shy-latn":["fr"],sk:Li,skr:qi,"skr-arab":["ur","pnb"],sli:Ui,smn:Ji,sr:Vi,srn:Ki,stq:Gi,sty:Hi,su:Wi,szl:Zi,szy:Yi,tay:Xi,tcy:Qi,tet:ea,tg:ta,trv:na,tt:ra,"tt-cyrl":["ru"],ty:sa,tyv:ia,udm:aa,ug:ua,vec:oa,vep:la,vls:ca,vmf:da,vot:fa,vro:ha,wa:pa,wo:Da,wuu:ga,xal:ma,xmf:ba,yi:va,za:Ca,zea:wa,zgh:Aa,zh:Ea,"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 fe=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=[...Ot[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 Tt[e]?Tt[e].split(""):!1}},Fa=class extends fe{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}},ya=class extends fe{convertGrammar(t,n){switch(n){case"instrumental":t="s "+t;break;case"lokativ":t="o "+t;break}return t}},$a=class extends fe{convertGrammar(e,t){switch(t){case"instrumental":e="z "+e;break;case"lokatiw":e="wo "+e;break}return e}},ka=class extends fe{convertGrammar(e,t){switch(t){case"instrumental":e="z "+e;break;case"lokatiw":e="wo "+e;break}return e}},Ba=class extends fe{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}},xa=class extends fe{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 Sa extends fe{convertGrammar(t,n){switch(n){case"mestnik":t="o "+t;break;case"orodnik":t="z "+t;break}return t}}let _a=class extends fe{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 Ta extends fe{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 Oa=class extends fe{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}},Ia=class extends fe{convertGrammar(e,t){switch(t){case"rol":e+="ról";break;case"ba":e+="ba";break;case"k":e+="k";break}return e}},Pa=class extends fe{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 za extends fe{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 It={bs:ya,default:fe,dsb:$a,fi:Ba,ga:Oa,he:Fa,hsb:ka,hu:Ia,hy:Ta,la:_a,os:Pa,ru:xa,sl:Sa,uk:za};const Na=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 Pt=class{constructor(e){this.locale=Ne(e),this.language=new(It[this.locale]||It.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=Ma(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 Ne(e){return typeof e=="string"?e.toLowerCase():e}function Ma(e){const t=e.match(Na);return t?t[2]===void 0?"ltr":"rtl":null}function ja(e,{wikilinks:t=!1}={}){let n=0;function r(c){return()=>{for(let m=0;m<c.length;m++){const O=c[m]();if(O!==null)return O}return null}}function s(c){const m=n,O=[];for(let S=0;S<c.length;S++){const te=c[S]();if(te===null)return n=m,null;O.push(te)}return O}function i(c,m){return()=>{const O=n,S=[];let te=m();for(;te!==null;)S.push(te),te=m();return S.length<c?(n=O,null):S}}function u(c){const m=c.length;return()=>{let O=null;return e.slice(n,n+m)===c&&(O=c,n+=m),O}}function o(c){return()=>{const m=e.slice(n).match(c);return m===null?null:(n+=m[0].length,m[0])}}const w=o(/^\s+/),$=u("|"),D=u(":"),k=u("\\"),oe=o(/^./),he=u("$"),ye=o(/^\d+/),R=u('"'),X=u("'"),Q=o(t?/^[^{}[\]$<\\]/:/^[^{}$<\\]/),le=o(t?/^[^{}[\]$\\|]/:/^[^{}$\\|]/),H=o(t?/^[^{}[\]$\s]/:/^[^{}$\s]/);function ne(c,m){return()=>{const O=c();return O===null?null:m(O)}}function K(){const c=i(1,ee)();return c===null?null:c.join("")}function Ae(){const c=i(1,ke)();return c===null?null:c.join("")}const $e=r([B,H]);function Ee(){const c=i(1,$e)();return c===null?null:c.join("")}function B(){const c=s([k,oe]);return c===null?null:c[1]}const ee=r([B,le]),ke=r([B,Q]);function pe(){const c=s([he,ye]);return c===null?null:["REPLACE",parseInt(c[1],10)-1]}const me=ne(o(/^[ !"$&'()*,./0-9;=?@A-Z^_`a-z~\x80-\xFF+-]+/),function(c){return c.toString()});function b(){const c=s([$,i(0,G)]);if(c===null)return null;const m=c[1];return m.length>1?["CONCAT"].concat(m):m[0]}function be(){const c=s([me,D,pe]);return c===null?null:[c[0],c[2]]}function Je(){const c=s([me,D,G]);return c===null?null:[c[0],c[2]]}function ve(){const c=s([me,D]);return c===null?null:[c[0],""]}const je=r([function(){const c=s([r([be,Je,ve]),i(0,b)]);return c===null?null:c[0].concat(c[1])},function(){const c=s([me,i(0,b)]);return c===null?null:[c[0]].concat(c[1])}]),Ve=u("{{"),Ke=u("}}"),Oe=u("[["),Ie=u("]]"),Pe=u("["),Re=u("]");function Ce(){const c=s([Ve,je,Ke]);return c===null?null:c[1]}function Se(){const c=s([i(1,G),$,i(1,U)]);return c===null?null:[["CONCAT"].concat(c[0]),["CONCAT"].concat(c[2])]}function _e(){const c=s([i(1,G)]);return c===null?null:[["CONCAT"].concat(c[0])]}const E=r([Se,_e]);function v(){let c=null;const m=s([Oe,E,Ie]);if(m!==null){const O=m[1];c=["WIKILINK"].concat(O)}return c}function x(){let c=null;const m=s([Pe,i(1,M),w,i(1,U),Re]);return m!==null&&(c=["EXTLINK",m[1].length===1?m[1][0]:["CONCAT"].concat(m[1]),["CONCAT"].concat(m[3])]),c}const j=o(/^[A-Za-z]+/);function d(c,m,O,S={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||S.allowedHtmlElements.indexOf(c)===-1)return!1;const te=/[\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 re=0,ie=O.length;re<ie;re+=2){const de=O[re];if(S.allowedHtmlCommonAttributes.indexOf(de)===-1&&(S.allowedHtmlAttributesByElement[c]||[]).indexOf(de)===-1||de==="style"&&O[re+1].search(te)!==-1)return!1}return!0}function _(){const c=o(/^[^"]*/),m=s([R,c,R]);return m===null?null:m[1]}function I(){const c=o(/^[^']*/),m=s([X,c,X]);return m===null?null:m[1]}function N(){const c=o(/^\s*=\s*/),m=s([w,j,c,r([_,I])]);return m===null?null:[m[1],m[3]]}function L(){const c=i(0,N)();return Array.prototype.concat.apply(["HTMLATTRIBUTES"],c)}function q(){let c=null;const m=n,O=u("<"),S=o(/^\/?/),te=o(/^\s*>/),re=s([O,j,L,S,te]);if(re===null)return null;const ie=n,de=re[1],Be=i(0,U)(),mt=n,bt=u("</"),rt=s([bt,j,te]);if(rt===null)return["CONCAT",e.slice(m,ie)].concat(Be);const l=n,g=rt[1],F=re[2],ae=F.slice(1);if(d(de,g,ae))c=["HTMLELEMENT",de,F].concat(Be);else{const Te=De=>De.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'");c=["CONCAT",Te(e.slice(m,ie))].concat(Be,Te(e.slice(mt,l)))}return c}const M=r([Ce,pe,v,x,Ee]),U=r([Ce,pe,v,x,q,Ae]),G=r([Ce,pe,K]);function ce(){const c=i(0,U)();return c===null?null:["CONCAT"].concat(c)}const J=ce();if(J===null||n!==e.length)throw new Error("Parse error at position "+n.toString()+" in input: "+e);return J}class zt{constructor(t,{wikilinks:n=!1}={}){this.locale=Ne(t),this.wikilinks=n,this.emitter=new Pt(this.locale)}parse(t,n){if(t.includes("{{")||t.includes("<")||this.wikilinks&&t.includes("[")){const r=ja(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 Ra{constructor(){this.sourceMap=new Map}load(t,n){if(typeof t!="object")throw new Error("Invalid message source. Must be an object");if(n=Ne(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(Ne(n));return r?r[t]:null}hasLocale(t){return this.sourceMap.has(t)}}class La{constructor(t,{finalFallback:n="en",messages:r=void 0,wikilinks:s=!1}={}){this.locale=Ne(t),this.parser=new zt(this.locale,{wikilinks:s}),this.messageStore=new Ra,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=Ne(t),this.parser=new zt(this.locale,{wikilinks:this.wikilinks})}getFallbackLocales(){return[...Ot[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 o=i.slice(0,u).join("-"),w=this.messageStore.getMessage(t,o);if(typeof w=="string")return w;u--}while(u);n=s[r],r++}return t}registerParserPlugin(t,n){Pt.prototype[t]=n}}const Nt={"@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."},qa={en:Nt,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 ft(e){const t=new La("en",{messages:Nt});return e!=="en"&&(t.load(qa[e],e),t.setLocale(e)),t}function Mt(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 jt(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",ge="convert";function Me(e,t,n){if(t===T)return n;if(t===ge)return e(n);if(t instanceof Array)return n.map(r=>Me(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]=Me(e,i.schema,n[s])}return r}}function ht(e,t){return{required:!0,schema:e,derive:t}}function z(e){return{required:!0,schema:e}}function V(e){return{required:!1,schema:e}}var Rt={type:z(T),id:z(ge),transports:V(T)},Lt={appid:V(T),appidExclude:V(T),credProps:V(T)},qt={appid:V(T),appidExclude:V(T),credProps:V(T)},Ua={publicKey:z({rp:z(T),user:z({id:z(ge),name:z(T),displayName:z(T)}),challenge:z(ge),pubKeyCredParams:z(T),timeout:V(T),excludeCredentials:V([Rt]),authenticatorSelection:V(T),attestation:V(T),extensions:V(Lt)}),signal:V(T)},Ja={type:z(T),id:z(T),rawId:z(ge),authenticatorAttachment:V(T),response:z({clientDataJSON:z(ge),attestationObject:z(ge),transports:ht(T,e=>{var t;return((t=e.getTransports)==null?void 0:t.call(e))||[]})}),clientExtensionResults:ht(qt,e=>e.getClientExtensionResults())},Va={mediation:V(T),publicKey:z({challenge:z(ge),timeout:V(T),rpId:V(T),allowCredentials:V([Rt]),userVerification:V(T),extensions:V(Lt)}),signal:V(T)},Ka={type:z(T),id:z(T),rawId:z(ge),authenticatorAttachment:V(T),response:z({clientDataJSON:z(ge),authenticatorData:z(ge),signature:z(ge),userHandle:z(ge)}),clientExtensionResults:ht(qt,e=>e.getClientExtensionResults())};function Ut(e){return Me(Mt,Ua,e)}function Ga(e){return Me(jt,Ja,e)}function Ha(e){return Me(Mt,Va,e)}function Wa(e){return Me(jt,Ka,e)}async function Jt(e){const t=await navigator.credentials.create(e);return t.toJSON=()=>Ga(t),t}async function Za(e){const t=await navigator.credentials.get(e);return t.toJSON=()=>Wa(t),t}function pt(e){this.message=e}pt.prototype=new Error,pt.prototype.name="InvalidCharacterError";var Vt=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new pt("'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 Ya(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(Vt(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 Vt(t)}}function et(e){this.message=e}function Xa(e,t){if(typeof e!="string")throw new et("Invalid token specified");var n=(t=t||{}).header===!0?0:1;try{return JSON.parse(Ya(e.split(".")[n]))}catch(r){throw new et("Invalid token specified: "+r.message)}}et.prototype=new Error,et.prototype.name="InvalidTokenError";const tt="spartan-token";function Kt(){const e=localStorage.getItem(tt);let t=null;if(e)try{if(t=Xa(e),t.exp>eu())return t;localStorage.removeItem(tt)}catch(n){console.error("Error decoding token",n),localStorage.removeItem(tt)}return null}function Qa(){const e=localStorage.getItem(tt);return e||null}function eu(){return Math.round(new Date().getTime()/1e3)}var tu=A(`<div class=widget-root><form class=login-frame><style>.widget-root {
|
|
1
|
+
(function(it){typeof define=="function"&&define.amd?define(it):it()})(function(){"use strict";const Ke={equals:(e,t)=>e===t};let vt=Et;const Se=1,He=2,Ct={owned:null,cleanups:null,context:null,owner:null};var Q=null;let st=null,en=null,ee=null,ue=null,Be=null,We=0;function tn(e,t){const n=ee,r=Q,i=e.length===0,s=t===void 0?r:t,u=i?Ct:{owned:null,cleanups:null,context:s?s.context:null,owner:s},o=i?e:()=>e(()=>Ze(()=>Ge(u)));Q=u,ee=null;try{return Ve(o,!0)}finally{ee=n,Q=r}}function w(e,t){t=t?Object.assign({},Ke,t):Ke;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=i=>(typeof i=="function"&&(i=i(n.value)),At(n,i));return[wt.bind(n),r]}function y(e,t,n){const r=ut(e,t,!1,Se);Je(r)}function nn(e,t,n){vt=on;const r=ut(e,t,!1,Se);r.user=!0,Be?Be.push(r):Je(r)}function f(e,t,n){n=n?Object.assign({},Ke,n):Ke;const r=ut(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Je(r),wt.bind(r)}function Ze(e){if(ee===null)return e();const t=ee;ee=null;try{return e()}finally{ee=t}}function at(e){nn(()=>Ze(e))}function rn(e){return Q===null||(Q.cleanups===null?Q.cleanups=[e]:Q.cleanups.push(e)),e}function sn(){return Q}function wt(){if(this.sources&&this.state)if(this.state===Se)Je(this);else{const e=ue;ue=null,Ve(()=>Xe(this),!1),ue=e}if(ee){const e=this.observers?this.observers.length:0;ee.sources?(ee.sources.push(this),ee.sourceSlots.push(e)):(ee.sources=[this],ee.sourceSlots=[e]),this.observers?(this.observers.push(ee),this.observerSlots.push(ee.sources.length-1)):(this.observers=[ee],this.observerSlots=[ee.sources.length-1])}return this.value}function At(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&Ve(()=>{for(let i=0;i<e.observers.length;i+=1){const s=e.observers[i],u=st&&st.running;u&&st.disposed.has(s),(u?!s.tState:!s.state)&&(s.pure?ue.push(s):Be.push(s),s.observers&&Ft(s)),u||(s.state=Se)}if(ue.length>1e6)throw ue=[],new Error},!1)),t}function Je(e){if(!e.fn)return;Ge(e);const t=We;an(e,e.value,t)}function an(e,t,n){let r;const i=Q,s=ee;ee=Q=e;try{r=e.fn(t)}catch(u){return e.pure&&(e.state=Se,e.owned&&e.owned.forEach(Ge),e.owned=null),e.updatedAt=n+1,yt(u)}finally{ee=s,Q=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?At(e,r):e.value=r,e.updatedAt=n)}function ut(e,t,n,r=Se,i){const s={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:Q,context:Q?Q.context:null,pure:n};return Q===null||Q!==Ct&&(Q.owned?Q.owned.push(s):Q.owned=[s]),s}function Ye(e){if(e.state===0)return;if(e.state===He)return Xe(e);if(e.suspense&&Ze(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<We);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===Se)Je(e);else if(e.state===He){const r=ue;ue=null,Ve(()=>Xe(e,t[0]),!1),ue=r}}function Ve(e,t){if(ue)return e();let n=!1;t||(ue=[]),Be?n=!0:Be=[],We++;try{const r=e();return un(n),r}catch(r){n||(Be=null),ue=null,yt(r)}}function un(e){if(ue&&(Et(ue),ue=null),e)return;const t=Be;Be=null,t.length&&Ve(()=>vt(t),!1)}function Et(e){for(let t=0;t<e.length;t++)Ye(e[t])}function on(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:Ye(r)}for(t=0;t<n;t++)Ye(e[t])}function Xe(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const r=e.sources[n];if(r.sources){const i=r.state;i===Se?r!==t&&(!r.updatedAt||r.updatedAt<We)&&Ye(r):i===He&&Xe(r,t)}}}function Ft(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=He,n.pure?ue.push(n):Be.push(n),n.observers&&Ft(n))}}function Ge(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),r=e.sourceSlots.pop(),i=n.observers;if(i&&i.length){const s=i.pop(),u=n.observerSlots.pop();r<i.length&&(s.sourceSlots[u]=r,i[r]=s,n.observerSlots[r]=u)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)Ge(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)Ge(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 ln(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function yt(e,t=Q){throw ln(e)}function cn(e,t,n){let r=n.length,i=t.length,s=r,u=0,o=0,A=t[i-1].nextSibling,k=null;for(;u<i||o<s;){if(t[u]===n[o]){u++,o++;continue}for(;t[i-1]===n[s-1];)i--,s--;if(i===u){const g=s<r?o?n[o-1].nextSibling:n[s-o]:A;for(;o<s;)e.insertBefore(n[o++],g)}else if(s===o)for(;u<i;)(!k||!k.has(t[u]))&&t[u].remove(),u++;else if(t[u]===n[s-1]&&n[o]===t[i-1]){const g=t[--i].nextSibling;e.insertBefore(n[o++],t[u++].nextSibling),e.insertBefore(n[--s],g),t[i]=n[s]}else{if(!k){k=new Map;let q=o;for(;q<s;)k.set(n[q],q++)}const g=k.get(t[u]);if(g!=null)if(o<g&&g<s){let q=u,Ae=1,we;for(;++q<i&&q<s&&!((we=k.get(t[q]))==null||we!==g+Ae);)Ae++;if(Ae>g-o){const $e=t[u];for(;o<g;)e.insertBefore(n[o++],$e)}else e.replaceChild(n[o++],t[u++])}else u++;else t[u++].remove()}}}const $t="_$DX_DELEGATE";function v(e,t,n,r){let i;const s=()=>{const o=document.createElement("template");return o.innerHTML=e,o.content.firstChild},u=()=>(i||(i=s())).cloneNode(!0);return u.cloneNode=u,u}function ot(e,t=window.document){const n=t[$t]||(t[$t]=new Set);for(let r=0,i=e.length;r<i;r++){const s=e[r];n.has(s)||(n.add(s),t.addEventListener(s,dn))}}function fe(e,t,n){n==null?e.removeAttribute(t):e.setAttribute(t,n)}function kt(e,t,n){return Ze(()=>e(t,n))}function d(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return Qe(e,t,r,n);y(i=>Qe(e,t(),i,n),r)}function dn(e){let t=e.target;const n=`$$${e.type}`,r=e.target,i=e.currentTarget,s=A=>Object.defineProperty(e,"target",{configurable:!0,value:A}),u=()=>{const A=t[n];if(A&&!t.disabled){const k=t[`${n}Data`];if(k!==void 0?A.call(t,k,e):A.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&s(t.host),!0},o=()=>{for(;u()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),e.composedPath){const A=e.composedPath();s(A[0]);for(let k=0;k<A.length-2&&(t=A[k],!!u());k++){if(t._$host){t=t._$host,o();break}if(t.parentNode===i)break}}else o();s(r)}function Qe(e,t,n,r,i){for(;typeof n=="function";)n=n();if(t===n)return n;const s=typeof t,u=r!==void 0;if(e=u&&n[0]&&n[0].parentNode||e,s==="string"||s==="number"){if(s==="number"&&(t=t.toString(),t===n))return n;if(u){let o=n[0];o&&o.nodeType===3?o.data!==t&&(o.data=t):o=document.createTextNode(t),n=Re(e,n,r,o)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||s==="boolean")n=Re(e,n,r);else{if(s==="function")return y(()=>{let o=t();for(;typeof o=="function";)o=o();n=Qe(e,o,n,r)}),()=>n;if(Array.isArray(t)){const o=[],A=n&&Array.isArray(n);if(lt(o,t,n,i))return y(()=>n=Qe(e,o,n,r,!0)),()=>n;if(o.length===0){if(n=Re(e,n,r),u)return n}else A?n.length===0?Bt(e,o,r):cn(e,n,o):(n&&Re(e),Bt(e,o));n=o}else if(t.nodeType){if(Array.isArray(n)){if(u)return n=Re(e,n,r,t);Re(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function lt(e,t,n,r){let i=!1;for(let s=0,u=t.length;s<u;s++){let o=t[s],A=n&&n[e.length],k;if(!(o==null||o===!0||o===!1))if((k=typeof o)=="object"&&o.nodeType)e.push(o);else if(Array.isArray(o))i=lt(e,o,A)||i;else if(k==="function")if(r){for(;typeof o=="function";)o=o();i=lt(e,Array.isArray(o)?o:[o],Array.isArray(A)?A:[A])||i}else e.push(o),i=!0;else{const g=String(o);A&&A.nodeType===3&&A.data===g?e.push(A):e.push(document.createTextNode(g))}}return i}function Bt(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function Re(e,t,n,r){if(n===void 0)return e.textContent="";const i=r||document.createTextNode("");if(t.length){let s=!1;for(let u=t.length-1;u>=0;u--){const o=t[u];if(i!==o){const A=o.parentNode===e;!s&&!u?A?e.replaceChild(i,o):e.insertBefore(i,n):A&&o.remove()}else s=!0}}else e.insertBefore(i,n);return[i]}function hn(e){return Object.keys(e).reduce((n,r)=>{const i=e[r];return n[r]=Object.assign({},i),St(i.value)&&!mn(i.value)&&!Array.isArray(i.value)&&(n[r].value=Object.assign({},i.value)),Array.isArray(i.value)&&(n[r].value=i.value.slice(0)),n},{})}function fn(e){return e?Object.keys(e).reduce((n,r)=>{const i=e[r];return n[r]=St(i)&&"value"in i?i:{value:i},n[r].attribute||(n[r].attribute=Dn(r)),n[r].parse="parse"in n[r]?n[r].parse:typeof n[r].value!="string",n},{}):{}}function pn(e){return Object.keys(e).reduce((n,r)=>(n[r]=e[r].value,n),{})}function gn(e,t){const n=hn(t);return Object.keys(t).forEach(i=>{const s=n[i],u=e.getAttribute(s.attribute),o=e[i];u!=null&&(s.value=s.parse?xt(u):u),o!=null&&(s.value=Array.isArray(o)?o.slice(0):o),s.reflect&&_t(e,s.attribute,s.value,!!s.parse),Object.defineProperty(e,i,{get(){return s.value},set(A){const k=s.value;s.value=A,s.reflect&&_t(this,s.attribute,s.value,!!s.parse);for(let g=0,q=this.__propertyChangedCallbacks.length;g<q;g++)this.__propertyChangedCallbacks[g](i,A,k)},enumerable:!0,configurable:!0})}),n}function xt(e){if(e)try{return JSON.parse(e)}catch{return e}}function _t(e,t,n,r){if(n==null||n===!1)return e.removeAttribute(t);let i=r?JSON.stringify(n):n;e.__updating[t]=!0,i==="true"&&(i=""),e.setAttribute(t,i),Promise.resolve().then(()=>delete e.__updating[t])}function Dn(e){return e.replace(/\.?([A-Z]+)/g,(t,n)=>"-"+n.toLowerCase()).replace("_","-").replace(/^-/,"")}function St(e){return e!=null&&(typeof e=="object"||typeof e=="function")}function mn(e){return Object.prototype.toString.call(e)==="[object Function]"}function bn(e){return typeof e=="function"&&e.toString().indexOf("class")===0}let ct;function vn(e,t){const n=Object.keys(t);return class extends e{static get observedAttributes(){return n.map(i=>t[i].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=gn(this,t);const i=pn(this.props),s=this.Component,u=ct;try{ct=this,this.__initialized=!0,bn(s)?new s(i,{element:this}):s(i,{element:this})}finally{ct=u}}async disconnectedCallback(){if(await Promise.resolve(),this.isConnected)return;this.__propertyChangedCallbacks.length=0;let i=null;for(;i=this.__releaseCallbacks.pop();)i(this);delete this.__initialized,this.__released=!0}attributeChangedCallback(i,s,u){if(this.__initialized&&!this.__updating[i]&&(i=this.lookupProp(i),i in t)){if(u==null&&!this[i])return;this[i]=t[i].parse?xt(u):u}}lookupProp(i){if(t)return n.find(s=>i===s||i===t[s].attribute)}get renderRoot(){return this.shadowRoot||this.attachShadow({mode:"open"})}addReleaseCallback(i){this.__releaseCallbacks.push(i)}addPropertyChangedCallback(i){this.__propertyChangedCallbacks.push(i)}}}function Cn(e,t={},n={}){const{BaseElement:r=HTMLElement,extension:i,customElements:s=window.customElements}=n;return u=>{if(!e)throw new Error("tag is required to register a Component");let o=s.get(e);return o?(o.prototype.Component=u,o):(o=vn(r,fn(t)),o.prototype.Component=u,o.prototype.registeredTag=e,s.define(e,o,i),o)}}function wn(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const[i,s]=w(e[t[r]]);Object.defineProperty(n,t[r],{get:i,set(u){s(()=>u)}})}return n}function An(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 En(e){return(t,n)=>{const{element:r}=n;return tn(i=>{const s=wn(t);r.addPropertyChangedCallback((o,A)=>s[o]=A),r.addReleaseCallback(()=>{r.renderRoot.textContent="",i()});const u=e(s,n);return d(r.renderRoot,u)},An(r))}}function dt(e,t,n){return arguments.length===2&&(n=t,t={}),Cn(e,t)(En(n))}var Fn="٠١٢٣٤٥٦٧٨٩",yn="۰۱۲۳۴۵۶۷۸۹",$n="൦൧൨൩൪൫൬൭൮൯",kn="೦೧೨೩೪೫೬೭೮೯",Bn="໐໑໒໓໔໕໖໗໘໙",xn="୦୧୨୩୪୫୬୭୮୯",_n="០១២៣៤៥៦៧៨៩",Sn="߀߁߂߃߄߅߆߇߈߉",Tn="੦੧੨੩੪੫੬੭੮੯",On="૦૧૨૩૪૫૬૭૮૯",In="०१२३४५६७८९",Pn="၀၁၂၃၄၅၆၇၈၉",zn="௦௧௨௩௪௫௬௭௮௯",Mn="౦౧౨౩౪౫౬౭౮౯",Nn="๐๑๒๓๔๕๖๗๘๙",jn="༠༡༢༣༤༥༦༧༨༩",Tt={ar:Fn,fa:yn,ml:$n,kn,lo:Bn,or:xn,kh:_n,nqo:Sn,pa:Tn,gu:On,hi:In,my:Pn,ta:zn,te:Mn,th:Nn,bo:jn},Rn=["ru"],Ln=["id"],Un=["id"],qn=["ady-cyrl"],Jn=["aeb-arab"],Vn=["sq"],Gn=["ru"],Kn=["zh-hant"],Hn=["es"],Wn=["hi"],Zn=["es"],Yn=["ar"],Xn=["ar"],Qn=["ar"],er=["es"],tr=["fr"],nr=["ru"],rr=["fr","es","ru"],ir=["hi"],sr=["es"],ar=["fa"],ur=["ru"],or=["id"],lr=["de"],cr=["bbc-latn"],dr=["fa"],hr=["fa"],fr=["bho"],pr=["en"],gr=["id"],Dr=["fr"],mr=["bn"],br=["fa"],vr=["fr"],Cr=["id"],wr=["id"],Ar=["ru"],Er=["oc"],Fr=["nan","zh-hant"],yr=["ru"],$r=["it"],kr=["crh-latn"],Br=["sk"],xr=["pl"],_r=["ru"],Sr=["hsb","de"],Tr=["ms"],Or=["ne"],Ir=["it"],Pr=["it"],zr=["es"],Mr=["fr"],Nr=["fi"],jr=["fr"],Rr=["fr"],Lr=["de"],Ur=["it"],qr=["tr"],Jr=["gan-hant","zh-hant","zh-hans"],Vr=["fr"],Gr=["pt"],Kr=["fa"],Hr=["es"],Wr=["gom-deva"],Zr=["id"],Yr=["de"],Xr=["es"],Qr=["zh-hant"],ei=["hif-latn"],ti=["de"],ni=["dsb","de"],ri=["fr"],ii=["hy"],si=["zh-cn","zh-hans"],ai=["ru"],ui=["eo"],oi=["ike-cans"],li=["en"],ci=["da"],di=["id"],hi=["kk-latn","kk-cyrl"],fi=["fr"],pi=["kbd-cyrl"],gi=["fr"],Di=["ur"],mi=["tr"],bi=["my"],vi=["kk-cyrl"],Ci=["da"],wi=["ru"],Ai=["ru"],Ei=["fi"],Fi=["ks-arab"],yi=["de"],$i=["ku-latn"],ki=["ru"],Bi=["ru"],xi=["es"],_i=["de"],Si=["ru"],Ti=["ru","az"],Oi=["nl"],Ii=["it"],Pi=["et"],zi=["fa"],Mi=["it","rm","fur"],Ni=["pms","eml","lij","vec","it"],ji=["fr"],Ri=["fa"],Li=["lv"],Ui=["fa"],qi=["zh-hant"],Ji=["tr"],Vi=["id"],Gi=["hi"],Ki=["myv","ru"],Hi=["fr"],Wi=["mrj","ru"],Zi=["id"],Yi=["my"],Xi=["ro"],Qi=["mhr","ru"],es=["pt"],ts=["mdf","ru"],ns=["fa"],rs=["es"],is=["cdo","zh-hant"],ss=["it"],as=["nn"],us=["de"],os=["id"],ls=["nb"],cs=["fr"],ds=["ca","fr"],hs=["fi"],fs=["ru"],ps=["fr"],gs=["de"],Ds=["de"],ms=["de"],bs=["en"],vs=["it"],Cs=["el"],ws=["pt-br"],As=["qug","es"],Es=["qu","es"],Fs=["it"],ys=["ro"],$s=["uk","ru"],ks=["ro"],Bs=["ruq-latn","ro"],xs=["hi"],_s=["ru"],Ss=["it"],Ts=["en"],Os=["it"],Is=["cbk","fa"],Ps=["fr"],zs=["fr"],Ms=["lt"],Ns=["bs","sr-el","hr"],js=["fr"],Rs=["shy-latn"],Ls=["cs"],Us=["skr-arab"],qs=["de"],Js=["fi"],Vs=["sr-ec"],Gs=["nl"],Ks=["de"],Hs=["ru"],Ws=["id"],Zs=["pl"],Ys=["zh-tw","zh-hant","zh-hans"],Xs=["zh-tw","zh-hant","zh-hans"],Qs=["kn"],ea=["pt"],ta=["tg-cyrl"],na=["zh-tw","zh-hant","zh-hans"],ra=["tt-cyrl","ru"],ia=["fr"],sa=["ru"],aa=["ru"],ua=["ug-arab"],oa=["it"],la=["et"],ca=["nl"],da=["de"],ha=["fi"],fa=["et"],pa=["fr"],ga=["fr"],Da=["zh-hans"],ma=["ru"],ba=["ka"],va=["he"],Ca=["zh-hans"],wa=["nl"],Aa=["kab"],Ea=["zh-hans"],Ot={ab:Rn,abs:Ln,ace:Un,ady:qn,aeb:Jn,"aeb-arab":["ar"],aln:Vn,alt:Gn,ami:Kn,an:Hn,anp:Wn,arn:Zn,arq:Yn,ary:Xn,arz:Qn,ast:er,atj:tr,av:nr,avk:rr,awa:ir,ay:sr,azb:ar,ba:ur,ban:or,"ban-bali":["ban"],bar:lr,bbc:cr,"bbc-latn":["id"],bcc:dr,"be-tarask":["be"],bgn:hr,bh:fr,bi:pr,bjn:gr,bm:Dr,bpy:mr,bqi:br,br:vr,btm:Cr,bug:wr,bxr:Ar,ca:Er,"cbk-zam":["es"],cdo:Fr,ce:yr,co:$r,crh:kr,"crh-cyrl":["ru"],cs:Br,csb:xr,cv:_r,"de-at":["de"],"de-ch":["de"],"de-formal":["de"],dsb:Sr,dtp:Tr,dty:Or,egl:Ir,eml:Pr,"en-ca":["en"],"en-gb":["en"],"es-419":["es"],"es-formal":["es"],ext:zr,ff:Mr,fit:Nr,frc:jr,frp:Rr,frr:Lr,fur:Ur,gag:qr,gan:Jr,"gan-hans":["zh-hans"],"gan-hant":["zh-hant","zh-hans"],gcr:Vr,gl:Gr,glk:Kr,gn:Hr,gom:Wr,"gom-deva":["hi"],gor:Zr,gsw:Yr,guc:Xr,hak:Qr,hif:ei,hrx:ti,hsb:ni,ht:ri,"hu-formal":["hu"],hyw:ii,ii:si,inh:ai,io:ui,iu:oi,jam:li,jut:ci,jv:di,kaa:hi,kab:fi,kbd:pi,kbp:gi,khw:Di,kiu:mi,kjp:bi,kk:vi,"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:Ci,"ko-kp":["ko"],koi:wi,krc:Ai,krl:Ei,ks:Fi,ksh:yi,ku:$i,"ku-arab":["ckb"],kum:ki,kv:Bi,lad:xi,lb:_i,lbe:Si,lez:Ti,li:Oi,lij:Ii,liv:Pi,lki:zi,lld:Mi,lmo:Ni,ln:ji,lrc:Ri,ltg:Li,luz:Ui,lzh:qi,lzz:Ji,mad:Vi,mai:Gi,"map-bms":["jv","id"],mdf:Ki,mg:Hi,mhr:Wi,min:Zi,mnw:Yi,mo:Xi,mrj:Qi,"ms-arab":["ms"],mwl:es,myv:ts,mzn:ns,nah:rs,nan:is,nap:ss,nb:as,nds:us,"nds-nl":["nl"],nia:os,"nl-informal":["nl"],nn:ls,nrm:cs,oc:ds,olo:hs,os:fs,pcd:ps,pdc:gs,pdt:Ds,pfl:ms,pih:bs,pms:vs,pnt:Cs,pt:ws,"pt-br":["pt"],qu:As,qug:Es,rgn:Fs,rmy:ys,"roa-tara":["it"],rue:$s,rup:ks,ruq:Bs,"ruq-cyrl":["mk"],"ruq-latn":["ro"],sa:xs,sah:_s,scn:Ss,sco:Ts,sdc:Os,sdh:Is,ses:Ps,sg:zs,sgs:Ms,sh:Ns,shi:js,shy:Rs,"shy-latn":["fr"],sk:Ls,skr:Us,"skr-arab":["ur","pnb"],sli:qs,smn:Js,sr:Vs,srn:Gs,stq:Ks,sty:Hs,su:Ws,szl:Zs,szy:Ys,tay:Xs,tcy:Qs,tet:ea,tg:ta,trv:na,tt:ra,"tt-cyrl":["ru"],ty:ia,tyv:sa,udm:aa,ug:ua,vec:oa,vep:la,vls:ca,vmf:da,vot:ha,vro:fa,wa:pa,wo:ga,wuu:Da,xal:ma,xmf:ba,yi:va,za:Ca,zea:wa,zgh:Aa,zh:Ea,"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 i=0;i<t.length;i++){const s=t[i];if(n.test(s)){if(parseInt(s.slice(0,s.indexOf("=")),10)===e)return s.slice(s.indexOf("=")+1);t[i]=void 0}}t=t.filter(i=>!!i);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),i=r.resolvedOptions().pluralCategories,s=r.select(e);return n.filter(u=>i.includes(u)).indexOf(s)}convertNumber(e,t=!1){let n=this.digitTransformTable(this.locale),r="";if(t){if(parseFloat(e,10)===e||!n)return e;const i=[];for(const u in n)i[n[u]]=u;n=i;const s=String(e);for(let u=0;u<s.length;u++)r+=n[s[u]]||s[u];return parseFloat(r,10)}if(Intl.NumberFormat){let i;const s=[...Ot[this.locale]||[],"en"];return Intl.NumberFormat.supportedLocalesOf(this.locale).length?i=[this.locale]:i=s,r=new Intl.NumberFormat(i).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 Tt[e]?Tt[e].split(""):!1}},Fa=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}},ya=class extends De{convertGrammar(t,n){switch(n){case"instrumental":t="s "+t;break;case"lokativ":t="o "+t;break}return t}},$a=class extends De{convertGrammar(e,t){switch(t){case"instrumental":e="z "+e;break;case"lokatiw":e="wo "+e;break}return e}},ka=class extends De{convertGrammar(e,t){switch(t){case"instrumental":e="z "+e;break;case"lokatiw":e="wo "+e;break}return e}},Ba=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}},xa=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 Sa=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 Ta 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 Oa=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}},Ia=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}},Pa=class extends De{convertGrammar(e,t){let n,r,i,s;switch(n="мæ",r="",i="",s="",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)||(i="-"),t){case"genitive":s=i+r+"ы";break;case"dative":s=i+r+"æн";break;case"allative":s=i+n;break;case"ablative":r==="й"?s=i+r+"æ":s=i+r+"æй";break;case"superessive":s=i+r+"ыл";break;case"equative":s=i+r+"ау";break;case"comitative":s=i+"имæ";break}return e+s}};class za 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 It={bs:ya,default:De,dsb:$a,fi:Ba,ga:Oa,he:Fa,hsb:ka,hu:Ia,hy:Ta,la:Sa,os:Pa,ru:xa,sl:_a,uk:za};const Ma=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 Pt=class{constructor(e){this.locale=Le(e),this.language=new(It[this.locale]||It.default)(this.locale)}emit(e,t){let n,r,i;switch(typeof e){case"string":case"number":n=e;break;case"object":if(r=e.slice(1).map(s=>this.emit(s,t)),i=e[0].toLowerCase(),typeof this[i]=="function")n=this[i](r,t);else throw new Error('unknown operation "'+i+'"');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=Na(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,i="";for(const u in n)i+=` ${u}="${n[u]}"`;Array.isArray(r)||(r=[r]);const s=r.join("");return`<${t}${i}>${s}</${t}>`}};function Le(e){return typeof e=="string"?e.toLowerCase():e}function Na(e){const t=e.match(Ma);return t?t[2]===void 0?"ltr":"rtl":null}function ja(e,{wikilinks:t=!1}={}){let n=0;function r(c){return()=>{for(let m=0;m<c.length;m++){const P=c[m]();if(P!==null)return P}return null}}function i(c){const m=n,P=[];for(let _=0;_<c.length;_++){const ne=c[_]();if(ne===null)return n=m,null;P.push(ne)}return P}function s(c,m){return()=>{const P=n,_=[];let ne=m();for(;ne!==null;)_.push(ne),ne=m();return _.length<c?(n=P,null):_}}function u(c){const m=c.length;return()=>{let P=null;return e.slice(n,n+m)===c&&(P=c,n+=m),P}}function o(c){return()=>{const m=e.slice(n).match(c);return m===null?null:(n+=m[0].length,m[0])}}const A=o(/^\s+/),k=u("|"),g=u(":"),q=u("\\"),Ae=o(/^./),we=u("$"),$e=o(/^\d+/),S=u('"'),re=u("'"),oe=o(t?/^[^{}[\]$<\\]/:/^[^{}$<\\]/),ke=o(t?/^[^{}[\]$\\|]/:/^[^{}$\\|]/),Fe=o(t?/^[^{}[\]$\s]/:/^[^{}$\s]/);function xe(c,m){return()=>{const P=c();return P===null?null:m(P)}}function B(){const c=s(1,ie)();return c===null?null:c.join("")}function le(){const c=s(1,se)();return c===null?null:c.join("")}const W=r([Y,Fe]);function me(){const c=s(1,W)();return c===null?null:c.join("")}function Y(){const c=i([q,Ae]);return c===null?null:c[1]}const ie=r([Y,ke]),se=r([Y,oe]);function ce(){const c=i([we,$e]);return c===null?null:["REPLACE",parseInt(c[1],10)-1]}const be=xe(o(/^[ !"$&'()*,./0-9;=?@A-Z^_`a-z~\x80-\xFF+-]+/),function(c){return c.toString()});function b(){const c=i([k,s(0,Z)]);if(c===null)return null;const m=c[1];return m.length>1?["CONCAT"].concat(m):m[0]}function $(){const c=i([be,g,ce]);return c===null?null:[c[0],c[2]]}function I(){const c=i([be,g,Z]);return c===null?null:[c[0],c[2]]}function z(){const c=i([be,g]);return c===null?null:[c[0],""]}const te=r([function(){const c=i([r([$,I,z]),s(0,b)]);return c===null?null:c[0].concat(c[1])},function(){const c=i([be,s(0,b)]);return c===null?null:[c[0]].concat(c[1])}]),Te=u("{{"),Oe=u("}}"),Me=u("[["),Ne=u("]]"),je=u("["),qe=u("]");function Ee(){const c=i([Te,te,Oe]);return c===null?null:c[1]}function Ie(){const c=i([s(1,Z),k,s(1,G)]);return c===null?null:[["CONCAT"].concat(c[0]),["CONCAT"].concat(c[2])]}function Pe(){const c=i([s(1,Z)]);return c===null?null:[["CONCAT"].concat(c[0])]}const E=r([Ie,Pe]);function C(){let c=null;const m=i([Me,E,Ne]);if(m!==null){const P=m[1];c=["WIKILINK"].concat(P)}return c}function x(){let c=null;const m=i([je,s(1,L),A,s(1,G),qe]);return m!==null&&(c=["EXTLINK",m[1].length===1?m[1][0]:["CONCAT"].concat(m[1]),["CONCAT"].concat(m[3])]),c}const U=o(/^[A-Za-z]+/);function h(c,m,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(c=c.toLowerCase(),m=m.toLowerCase(),c!==m||_.allowedHtmlElements.indexOf(c)===-1)return!1;const ne=/[\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 ae=0,de=P.length;ae<de;ae+=2){const ge=P[ae];if(_.allowedHtmlCommonAttributes.indexOf(ge)===-1&&(_.allowedHtmlAttributesByElement[c]||[]).indexOf(ge)===-1||ge==="style"&&P[ae+1].search(ne)!==-1)return!1}return!0}function T(){const c=o(/^[^"]*/),m=i([S,c,S]);return m===null?null:m[1]}function M(){const c=o(/^[^']*/),m=i([re,c,re]);return m===null?null:m[1]}function R(){const c=o(/^\s*=\s*/),m=i([A,U,c,r([T,M])]);return m===null?null:[m[1],m[3]]}function J(){const c=s(0,R)();return Array.prototype.concat.apply(["HTMLATTRIBUTES"],c)}function V(){let c=null;const m=n,P=u("<"),_=o(/^\/?/),ne=o(/^\s*>/),ae=i([P,U,J,_,ne]);if(ae===null)return null;const de=n,ge=ae[1],_e=s(0,G)(),mt=n,bt=u("</"),rt=i([bt,U,ne]);if(rt===null)return["CONCAT",e.slice(m,de)].concat(_e);const l=n,D=rt[1],F=ae[2],he=F.slice(1);if(h(ge,D,he))c=["HTMLELEMENT",ge,F].concat(_e);else{const ze=ve=>ve.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'");c=["CONCAT",ze(e.slice(m,de))].concat(_e,ze(e.slice(mt,l)))}return c}const L=r([Ee,ce,C,x,me]),G=r([Ee,ce,C,x,V,le]),Z=r([Ee,ce,B]);function pe(){const c=s(0,G)();return c===null?null:["CONCAT"].concat(c)}const K=pe();if(K===null||n!==e.length)throw new Error("Parse error at position "+n.toString()+" in input: "+e);return K}class zt{constructor(t,{wikilinks:n=!1}={}){this.locale=Le(t),this.wikilinks=n,this.emitter=new Pt(this.locale)}parse(t,n){if(t.includes("{{")||t.includes("<")||this.wikilinks&&t.includes("[")){const r=ja(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,i)=>{const s=parseInt(i,10)-1;return n[s]!==void 0?n[s]:"$"+i})}}class Ra{constructor(){this.sourceMap=new Map}load(t,n){if(typeof t!="object")throw new Error("Invalid message source. Must be an object");if(n=Le(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(Le(n));return r?r[t]:null}hasLocale(t){return this.sourceMap.has(t)}}class La{constructor(t,{finalFallback:n="en",messages:r=void 0,wikilinks:i=!1}={}){this.locale=Le(t),this.parser=new zt(this.locale,{wikilinks:i}),this.messageStore=new Ra,r&&this.load(r,this.locale),this.finalFallback=n,this.wikilinks=i}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=Le(t),this.parser=new zt(this.locale,{wikilinks:this.wikilinks})}getFallbackLocales(){return[...Ot[this.locale]||[],this.finalFallback]}getMessage(t){let n=this.locale,r=0;const i=this.getFallbackLocales(this.locale);for(;n;){const s=n.split("-");let u=s.length;do{const o=s.slice(0,u).join("-"),A=this.messageStore.getMessage(t,o);if(typeof A=="string")return A;u--}while(u);n=i[r],r++}return t}registerParserPlugin(t,n){Pt.prototype[t]=n}}const Mt={"@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."},Ua={en:Mt,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 ht(e){const t=new La("en",{messages:Mt});return e!=="en"&&(t.load(Ua[e],e),t.setLocale(e)),t}function Nt(e){const t="==".slice(0,(4-e.length%4)%4),n=e.replace(/-/g,"+").replace(/_/g,"/")+t,r=atob(n),i=new ArrayBuffer(r.length),s=new Uint8Array(i);for(let u=0;u<r.length;u++)s[u]=r.charCodeAt(u);return i}function jt(e){const t=new Uint8Array(e);let n="";for(const s of t)n+=String.fromCharCode(s);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}var O="copy",Ce="convert";function Ue(e,t,n){if(t===O)return n;if(t===Ce)return e(n);if(t instanceof Array)return n.map(r=>Ue(e,t[0],r));if(t instanceof Object){const r={};for(const[i,s]of Object.entries(t)){if(s.derive){const u=s.derive(n);u!==void 0&&(n[i]=u)}if(!(i in n)){if(s.required)throw new Error(`Missing key: ${i}`);continue}if(n[i]==null){r[i]=null;continue}r[i]=Ue(e,s.schema,n[i])}return r}}function ft(e,t){return{required:!0,schema:e,derive:t}}function j(e){return{required:!0,schema:e}}function H(e){return{required:!1,schema:e}}var Rt={type:j(O),id:j(Ce),transports:H(O)},Lt={appid:H(O),appidExclude:H(O),credProps:H(O)},Ut={appid:H(O),appidExclude:H(O),credProps:H(O)},qa={publicKey:j({rp:j(O),user:j({id:j(Ce),name:j(O),displayName:j(O)}),challenge:j(Ce),pubKeyCredParams:j(O),timeout:H(O),excludeCredentials:H([Rt]),authenticatorSelection:H(O),attestation:H(O),extensions:H(Lt)}),signal:H(O)},Ja={type:j(O),id:j(O),rawId:j(Ce),authenticatorAttachment:H(O),response:j({clientDataJSON:j(Ce),attestationObject:j(Ce),transports:ft(O,e=>{var t;return((t=e.getTransports)==null?void 0:t.call(e))||[]})}),clientExtensionResults:ft(Ut,e=>e.getClientExtensionResults())},Va={mediation:H(O),publicKey:j({challenge:j(Ce),timeout:H(O),rpId:H(O),allowCredentials:H([Rt]),userVerification:H(O),extensions:H(Lt)}),signal:H(O)},Ga={type:j(O),id:j(O),rawId:j(Ce),authenticatorAttachment:H(O),response:j({clientDataJSON:j(Ce),authenticatorData:j(Ce),signature:j(Ce),userHandle:j(Ce)}),clientExtensionResults:ft(Ut,e=>e.getClientExtensionResults())};function qt(e){return Ue(Nt,qa,e)}function Ka(e){return Ue(jt,Ja,e)}function Ha(e){return Ue(Nt,Va,e)}function Wa(e){return Ue(jt,Ga,e)}async function Jt(e){const t=await navigator.credentials.create(e);return t.toJSON=()=>Ka(t),t}async function Za(e){const t=await navigator.credentials.get(e);return t.toJSON=()=>Wa(t),t}function pt(e){this.message=e}pt.prototype=new Error,pt.prototype.name="InvalidCharacterError";var Vt=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new pt("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,i=0,s=0,u="";r=t.charAt(s++);~r&&(n=i%4?64*n+r:r,i++%4)?u+=String.fromCharCode(255&n>>(-2*i&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return u};function Ya(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(Vt(n).replace(/(.)/g,function(r,i){var s=i.charCodeAt(0).toString(16).toUpperCase();return s.length<2&&(s="0"+s),"%"+s}))}(t)}catch{return Vt(t)}}function et(e){this.message=e}function Xa(e,t){if(typeof e!="string")throw new et("Invalid token specified");var n=(t=t||{}).header===!0?0:1;try{return JSON.parse(Ya(e.split(".")[n]))}catch(r){throw new et("Invalid token specified: "+r.message)}}et.prototype=new Error,et.prototype.name="InvalidTokenError";const tt="spartan-token";function Gt(){const e=localStorage.getItem(tt);let t=null;if(e)try{if(t=Xa(e),t.exp>eu())return t;localStorage.removeItem(tt)}catch(n){console.error("Error decoding token",n),localStorage.removeItem(tt)}return null}function Qa(){const e=localStorage.getItem(tt);return e||null}function eu(){return Math.round(new Date().getTime()/1e3)}var tu=v(`<div class=widget-root><form class=login-frame><style>.widget-root {
|
|
2
2
|
display: block;
|
|
3
3
|
position: relative;
|
|
4
4
|
}
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
margin-bottom: 0;
|
|
145
145
|
display: block;
|
|
146
146
|
}
|
|
147
|
-
</style><style></style><h1>`),nu=A("<span class=error-message>"),Dt=A("<span>"),ru=A("<input type=text autocomplete=one-time-code required>"),Gt=A("<span class=hint>"),su=A("<input type=password autocomplete=new-password required>"),Ht=A("<button type=submit>"),iu=A("<span class=info-message>"),au=A("<span class=success-message>"),uu=A("<input type=text autocomplete=username>"),ou=A("<input type=password autocomplete=current-password>"),gt=A("<p>"),lu=A("<select>"),cu=A("<option> (<!>)"),du=A("<input type=text>"),Wt=A("<input type=text autocomplete=one-time-code>"),Zt=A("<input type=password autocomplete=new-password>"),fu=A("<span class=checkbox-wrapper><input type=checkbox><span> "),hu=A("<button type=button>"),nt=A("<a class=centered-text href=#>"),pu=A("<div class=social-divider><span>"),Du=A("<button type=button class=social-btn>"),gu=A('<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>'),mu=A('<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>'),bu=A('<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>'),vu=A('<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>'),Cu=A("<div class=loading-overlay part=loading-overlay><slot name=loading>");dt("spartan-login",{domain:"http://127.0.0.1:11000",sector:"0ad5c3e5-0186-4557-8b32-4b36f247bf09",startMode:"password",styles:"",locale:"en",redirect:"",hideSocial:!1},e=>{const[t,n]=C((e.startMode||"password").toLowerCase()),[r,s]=C(""),[i,u]=C(""),[o,w]=C(""),[$,D]=C(""),[k]=C(e.redirect),[oe,he]=C(!1),[ye,R]=C(!1),[X,Q]=C(!1),[le,H]=C(""),[ne,K]=C(""),[Ae,$e]=C([]),[Ee,B]=C(""),[ee,ke]=C([]),[pe,me]=C(""),[b,be]=C(!1),[Je,ve]=C(!1),[je,Ve]=C(""),[Ke,Oe]=C(""),[Ie,Pe]=C(""),[Re,Ce]=C(""),[Se,_e]=C(""),[E,v]=C(""),[x,j]=C(!1),d=ft(e.locale);let _,I=null,N;const L=()=>b()||!!pe();rn(()=>{I&&clearTimeout(I)});try{N=e.styles}catch{N=""}console.log(N),at(async()=>{const l=new URLSearchParams(window.location.search);if(l.get("error")){history.replaceState({},"",window.location.pathname);const De=l.get("error_description");D(De||d.i18n("sa-social-error")),q(),M();return}const F=l.get("code");if(F){history.replaceState({},"",window.location.pathname),be(!0);try{const De=await fetch(`${e.domain}/api/v1/oauth/exchange`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:F})});if(!De.ok)throw new Error(d.i18n("sa-social-error"));const W=await De.json();localStorage.setItem("spartan-token",W.token);const a=_.getRootNode().host;e.redirect!==""?(a.dispatchEvent(new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:W.token}})),window.location.href=e.redirect):(I=setTimeout(()=>{I=null,be(!1),q(),M()},5e3),a.dispatchEvent(new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:W.token}})))}catch(De){D(De.message||d.i18n("sa-social-error")),be(!1),q(),M()}return}const ae=l.get("sub");if(ae){Pe(ae);const De=l.get("email");De&&Ce(De);const a=new URLSearchParams(window.location.hash.replace(/^#/,"")).get("otp");a&&_e(a),n("invite");return}if(Kt()&&e.redirect!==""&&window.location.pathname!==e.redirect){window.location.href=e.redirect;return}q(),M()});function q(){fetch(`${e.domain}/api/v1/sectors/${e.sector}/publicsettings`,{method:"GET",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"}}).then(l=>{if(l.ok)return l.json();throw new Error("Network response was not ok.")}).then(l=>{console.log(l),he(l.SelfSignUpAllowed),ve(l.MFARequired||!1)}).catch(l=>{console.log(l),D(l.message)})}function M(){e.hideSocial||fetch(`${e.domain}/api/v1/sectors/${e.sector}/oauth/providers`,{method:"GET",mode:"cors",cache:"no-cache"}).then(l=>{if(l.ok)return l.json();throw new Error("Failed to load social providers")}).then(l=>{const g=(l.providers||[]).filter(F=>F.enabled);ke(g)}).catch(()=>{})}function U(l){if(pe())return;me(l),D("");const g=window.location.origin+window.location.pathname;fetch(`${e.domain}/api/v1/oauth/${l}/initiate`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({sectorID:e.sector,redirectURI:g})}).then(F=>{if(F.ok)return F.json();throw new Error(d.i18n("sa-social-error"))}).then(F=>{window.location.href=F.authURL}).catch(F=>{me(""),D(F.message)})}function G(l,g){return D(""),Oe(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:l,sectorID:e.sector,transactionId:g})}).then(F=>{if(!F.ok)throw new Error(d.i18n("sa-signup-verify-error"))}).then(()=>{n("signup-verify")}).catch(F=>{D(F.message)})}function ce(){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:o().toUpperCase().trim(),sectorID:e.sector,transactionId:Ke()})}).then(l=>{if(l.ok)return l.json();throw l.status===400?new Error(d.i18n("sa-signup-verify-error")):new Error(d.i18n("sa-signup-verify-error"))}).then(l=>{Ve(l.token),localStorage.setItem("spartan-token",l.token),_.getRootNode().host.dispatchEvent(new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:l.token}})),w(""),n("signup-webauthn")}).catch(l=>{D(l.message)})}function J(){b()||(be(!0),D(""),fetch(`${e.domain}/api/v1/webauthn/registration/begin`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:`bearer ${je()}`},body:JSON.stringify({keyName:"Default",sectorID:e.sector})}).then(l=>{if(!l.ok)throw new Error(d.i18n("sa-signup-webauthn-error"));return l.json()}).then(l=>{const g=Ut(l.Options);return Jt(g).then(F=>{let ae=JSON.parse(JSON.stringify(F));return ae.transactionID=l.TransactionID,ae})}).then(l=>fetch(`${e.domain}/api/v1/webauthn/registration/finish`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:`bearer ${je()}`},body:JSON.stringify(l)})).then(l=>{if(!l.ok)throw new Error(d.i18n("sa-signup-webauthn-error"));c()}).catch(l=>{D((l==null?void 0:l.message)||String(l))}).finally(()=>{be(!1)}))}function c(){n(e.startMode),e.redirect!==""&&(window.location.href=e.redirect)}function m(){return console.log("login"),D(""),t()==="password"?te():t()==="webauthn"?S():t()==="otp-pick"?de(Ee()):t()==="otp"?Be():t()==="reset-email"?mt():t()==="reset-code"?bt():Promise.resolve()}function O(){return console.log("signup"),D(""),R(!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(l=>{if(l.ok)return l.json();throw new Error(d.i18n("sa-error-creating-user"))}).then(l=>{if(console.log(l),Je())return G(r(),l.enrollmentTransactionId||"");R(!0),n(e.startMode)}).catch(l=>{R(!1),D(l.message),console.log(l)})}function S(){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(l=>{if(l.ok)return l.json();throw l.status===401?(n("password"),D(d.i18n("webauthn-not-enrolled")),new Error(d.i18n("webauthn-not-enrolled"))):new Error(`${l.status} ${l.statusText}: Network response was not ok.`)}).then(l=>{console.log(l);const g=Ha(l.CredentialAssertion);return console.log("Parsed WebAuthn request options:",g),Za(g).then(F=>{const ae=JSON.stringify(F);let Te=JSON.parse(ae);return Te.transactionID=l.TransactionID,Te})}).then(l=>fetch(`${e.domain}/api/v1/login/webauthn/finish`,{method:"POST",mode:"cors",cache:"no-cache",body:JSON.stringify(l)})).then(re).catch(l=>{D(l.message),console.log(l)})}function te(){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(re)}function re(l){return Promise.resolve(l).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 G(r(),g.transactionID||"");if(g.challengeType.indexOf("otp")!==-1)return ie();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 F=new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:g.token,transactionID:g.transactionID}});_.getRootNode().host.dispatchEvent(F),k()!==""&&(window.location.href=k())}).catch(g=>g.json().then(F=>{console.log(F.message),D(F.message)}).catch(F=>{console.log(F)}))}function ie(){const l=localStorage.getItem("spartan-txid")||"";return fetch(e.domain+`/api/v1/otp/${encodeURIComponent(r())}?transactionID=${encodeURIComponent(l)}§orID=${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 F=g.registrations||[];if(F.length===0){D(d.i18n("sa-otp-no-registrations"));return}if(F.length===1)return de(F[0].ID||"");$e(F),B(F[0].ID||""),n("otp-pick"),D("")}).catch(g=>{D(g.message),console.log(g)})}function de(l){return console.log("begin OTP, registrationID:",l),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:l,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 Be(){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:o(),transactionID:localStorage.getItem("spartan-txid"),sectorID:e.sector})}).then(re)}function mt(){return console.log("begin password reset"),D(""),Q(!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(l=>{if(l.ok)return l.json();throw new Error(d.i18n("sa-reset-error"))}).then(l=>{console.log(l),D(d.i18n("sa-reset-email-sent")),H(""),K(""),n("reset-code")}).catch(l=>{D(l.message),console.log(l)})}function bt(){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:ne(),sectorID:e.sector})}).then(l=>{if(l.ok)return l.json();throw l.status===400?new Error(d.i18n("sa-reset-error-code")):new Error(d.i18n("sa-reset-error"))}).then(l=>{console.log(l),Q(!0),H(""),K(""),u(""),n(e.startMode)}).catch(l=>{D(l.message),console.log(l)})}async function rt(){if(D(""),!Se()||Se().trim().length===0){D(d.i18n("sa-invite-error-otp"));return}if(!E()||E().length<8){D("Password must be at least 8 characters");return}const l=Ie();if(!l){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:l,otp:Se().toUpperCase().trim(),password:E(),sectorID:e.sector})}).catch(()=>null);if(!g){D(d.i18n("sa-invite-error-generic"));return}if(g.ok){history.replaceState({},"",window.location.pathname);const F=await g.json().catch(()=>({})),ae=_.getRootNode().host;F.token?(localStorage.setItem("spartan-token",F.token),ae.dispatchEvent(new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:F.token}})),k()!==""?window.location.href=k():e.redirect!==""?window.location.href=e.redirect:(j(!1),Pe(""),Ce(""),_e(""),v(""),n(e.startMode),q(),M())):(j(!0),ae.dispatchEvent(new CustomEvent("spartan-invite-complete",{bubbles:!0,cancelable:!0,detail:{sub:l,success:!0}})),setTimeout(()=>{k()!==""?window.location.href=k():e.redirect!==""?window.location.href=e.redirect:(j(!1),Pe(""),Ce(""),_e(""),v(""),n(e.startMode),q(),M())},2e3))}else{const F=await g.json().catch(()=>({}));g.status===400||String(F.message).includes("invalid OTP")?D(d.i18n("sa-invite-error-otp")):g.status===504||String(F.message).includes("expired")?D(d.i18n("sa-invite-error-expired")):D(F.message||d.i18n("sa-invite-error-generic"))}}return(()=>{var l=tu(),g=l.firstChild,F=g.firstChild,ae=F.nextSibling,Te=ae.nextSibling,De=_;return typeof De=="function"?kt(De,g):_=g,g.addEventListener("submit",W=>{if(W.preventDefault(),b())return;be(!0),(t()==="sign-up"?O():t()==="signup-verify"?ce():t()==="invite"?Promise.resolve(rt()):m()).finally(()=>be(!1))}),f(ae,N),f(Te,(()=>{var W=h(()=>t()==="reset-email"||t()==="reset-code");return()=>W()?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(g,$&&(()=>{var W=nu();return f(W,$),W})(),null),f(g,(()=>{var W=h(()=>!!ye());return()=>W()&&(()=>{var a=Dt();return f(a,()=>d.i18n("sa-signup-complete")),a})()})(),null),f(g,(()=>{var W=h(()=>!!X());return()=>W()&&(()=>{var a=Dt();return f(a,()=>d.i18n("sa-reset-success")),a})()})(),null),f(g,(()=>{var W=h(()=>t()==="invite");return()=>W()&&[h(()=>h(()=>!!Re())()&&(()=>{var a=iu();return f(a,Re),a})()),h(()=>h(()=>!!x())()&&(()=>{var a=au();return f(a,()=>d.i18n("sa-invite-success")),a})()),(()=>{var a=ru();return a.$$input=p=>_e(p.currentTarget.value),y(p=>{var P=d.i18n("sa-invite-otp"),we=b()||x();return P!==p.e&&ue(a,"placeholder",p.e=P),we!==p.t&&(a.disabled=p.t=we),p},{e:void 0,t:void 0}),y(()=>a.value=Se()),a})(),(()=>{var a=Gt();return f(a,()=>d.i18n("sa-invite-otp-hint")),a})(),(()=>{var a=su();return a.$$input=p=>v(p.currentTarget.value),y(p=>{var P=d.i18n("sa-invite-password"),we=b()||x();return P!==p.e&&ue(a,"placeholder",p.e=P),we!==p.t&&(a.disabled=p.t=we),p},{e:void 0,t:void 0}),y(()=>a.value=E()),a})(),(()=>{var a=Gt();return f(a,()=>d.i18n("sa-invite-password-hint")),a})(),(()=>{var a=Ht();return f(a,(()=>{var p=h(()=>!!b());return()=>p()?d.i18n("sa-invite-completing"):d.i18n("sa-invite-submit")})()),y(()=>a.disabled=b()||x()),a})()]})(),null),f(g,(()=>{var W=h(()=>t()!=="invite");return()=>W()&&[(()=>{var a=uu();return a.addEventListener("change",p=>s(p.currentTarget.value)),a.$$input=p=>s(p.currentTarget.value),y(p=>{var P=d.i18n("sa-username"),we=t()==="otp"||t()==="otp-pick"||t()==="reset-code"||t()==="signup-verify"||t()==="signup-webauthn";return P!==p.e&&ue(a,"placeholder",p.e=P),we!==p.t&&(a.disabled=p.t=we),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=ou();return a.addEventListener("change",p=>u(p.currentTarget.value)),a.$$input=p=>u(p.currentTarget.value),y(()=>ue(a,"placeholder",d.i18n("sa-password"))),y(()=>a.value=i()),a})()),h(()=>h(()=>t()==="webauthn")()&&Dt()),h(()=>h(()=>t()==="otp-pick")()&&[(()=>{var a=gt();return f(a,()=>d.i18n("sa-otp-choose")),a})(),(()=>{var a=lu();return a.addEventListener("change",p=>B(p.currentTarget.value)),f(a,()=>Ae().map(p=>(()=>{var P=cu(),we=P.firstChild,Qt=we.nextSibling;return Qt.nextSibling,f(P,()=>p.DisplayName||p.ID,we),f(P,()=>p.Type,Qt),y(()=>P.value=p.ID),P})())),y(()=>a.value=Ee()),a})()]),h(()=>h(()=>t()==="otp")()&&(()=>{var a=du();return a.$$input=p=>w(p.currentTarget.value),y(()=>ue(a,"placeholder",d.i18n("sa-code"))),y(()=>a.value=o()),a})()),h(()=>h(()=>t()==="reset-code")()&&[(()=>{var a=Wt();return a.$$input=p=>H(p.currentTarget.value),y(()=>ue(a,"placeholder",d.i18n("sa-reset-code"))),y(()=>a.value=le()),a})(),(()=>{var a=Zt();return a.$$input=p=>K(p.currentTarget.value),y(()=>ue(a,"placeholder",d.i18n("sa-new-password"))),y(()=>a.value=ne()),a})()]),h(()=>h(()=>t()==="password"||t()==="webauthn")()&&(()=>{var a=fu(),p=a.firstChild,P=p.nextSibling;return P.firstChild,a.$$click=()=>n(t()==="password"?"webauthn":"password"),f(P,()=>d.i18n("sa-use-password"),null),y(()=>p.checked=t()==="password"),a})())]),h(()=>h(()=>t()==="sign-up")()&&(()=>{var a=Zt();return a.addEventListener("change",p=>u(p.currentTarget.value)),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=gt();return f(a,()=>d.i18n("sa-signup-verify-prompt")),a})(),(()=>{var a=Wt();return a.$$input=p=>w(p.currentTarget.value),y(()=>ue(a,"placeholder",d.i18n("sa-code"))),y(()=>a.value=o()),a})()]),h(()=>h(()=>t()==="signup-webauthn")()&&(()=>{var a=gt();return f(a,()=>d.i18n("sa-signup-webauthn-prompt")),a})()),h(()=>h(()=>t()!=="signup-webauthn")()&&(()=>{var a=Ht();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=hu();return a.$$click=()=>J(),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=nt();return a.$$click=()=>c(),f(a,()=>d.i18n("sa-signup-webauthn-done")),a})()]),h(()=>h(()=>t()==="password")()&&(()=>{var a=nt();return a.$$click=()=>{D(""),Q(!1),n("reset-email")},f(a,()=>d.i18n("sa-forgot-password")),a})()),h(()=>h(()=>t()==="reset-email"||t()==="reset-code")()&&(()=>{var a=nt();return a.$$click=()=>{D(""),H(""),K(""),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=nt();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(()=>!e.hideSocial&&ee().length>0&&(t()==="password"||t()==="webauthn"||t()==="sign-up"))()&&[(()=>{var a=pu(),p=a.firstChild;return f(p,()=>d.i18n("sa-or")),a})(),h(()=>ee().map(a=>(()=>{var p=Du();return p.$$click=()=>U(a.provider),f(p,(()=>{var P=h(()=>a.provider==="google");return()=>P()&&gu()})(),null),f(p,(()=>{var P=h(()=>a.provider==="github");return()=>P()&&mu()})(),null),f(p,(()=>{var P=h(()=>a.provider==="apple");return()=>P()&&bu()})(),null),f(p,(()=>{var P=h(()=>a.provider==="oidc");return()=>P()&&vu()})(),null),f(p,(()=>{var P=h(()=>a.provider==="google");return()=>P()?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=!!pe()||b()),p})()))])]})(),null),f(l,(()=>{var W=h(()=>!!L());return()=>W()&&(()=>{var a=Cu(),p=a.firstChild;return p._$owner=sn(),f(p,()=>d.i18n("sa-loading")),a})()})(),null),l})()}),ot(["input","click"]);var wu=A(`<div class=container><style>.container {
|
|
147
|
+
</style><style></style><h1>`),nu=v("<span class=error-message>"),gt=v("<span>"),ru=v("<input type=text autocomplete=one-time-code required>"),Kt=v("<span class=hint>"),iu=v("<input type=password autocomplete=new-password required>"),Ht=v("<button type=submit>"),su=v("<span class=info-message>"),au=v("<span class=success-message>"),uu=v("<input type=text autocomplete=username>"),ou=v("<input type=password autocomplete=current-password>"),Dt=v("<p>"),lu=v("<select>"),cu=v("<option> (<!>)"),du=v("<input type=text>"),Wt=v("<input type=text autocomplete=one-time-code>"),Zt=v("<input type=password autocomplete=new-password>"),hu=v("<span class=checkbox-wrapper><input type=checkbox><span> "),fu=v("<button type=button>"),nt=v("<a class=centered-text href=#>"),pu=v("<div class=social-divider><span>"),gu=v("<button type=button class=social-btn>"),Du=v('<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>'),mu=v('<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>'),bu=v('<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>'),vu=v('<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>'),Cu=v("<div class=loading-overlay part=loading-overlay><slot name=loading>");dt("spartan-login",{domain:"http://127.0.0.1:11000",sector:"0ad5c3e5-0186-4557-8b32-4b36f247bf09",startMode:"password",styles:"",locale:"en",redirect:"",hideSocial:!1},e=>{const[t,n]=w((e.startMode||"password").toLowerCase()),[r,i]=w(""),[s,u]=w(""),[o,A]=w(""),[k,g]=w(""),[q]=w(e.redirect),[Ae,we]=w(!1),[$e,S]=w(!1),[re,oe]=w(!1),[ke,Fe]=w(""),[xe,B]=w(""),[le,W]=w([]),[me,Y]=w(""),[ie,se]=w([]),[ce,be]=w(""),[b,$]=w(!1),[I,z]=w(!1),[te,Te]=w(""),[Oe,Me]=w(""),[Ne,je]=w(""),[qe,Ee]=w(""),[Ie,Pe]=w(""),[E,C]=w(""),[x,U]=w(!1),h=ht(e.locale);let T,M=null,R;const J=()=>b()||!!ce();rn(()=>{M&&clearTimeout(M)});try{R=e.styles}catch{R=""}console.log(R),at(async()=>{const l=new URLSearchParams(window.location.search);if(l.get("error")){history.replaceState({},"",window.location.pathname);const ve=l.get("error_description");g(ve||h.i18n("sa-social-error")),V(),L();return}const F=l.get("code");if(F){history.replaceState({},"",window.location.pathname),$(!0);try{const ve=await fetch(`${e.domain}/api/v1/oauth/exchange`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:F})});if(!ve.ok)throw new Error(h.i18n("sa-social-error"));const X=await ve.json();localStorage.setItem("spartan-token",X.token);const a=T.getRootNode().host;e.redirect!==""?(a.dispatchEvent(new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:X.token}})),window.location.href=e.redirect):(M=setTimeout(()=>{M=null,$(!1),V(),L()},5e3),a.dispatchEvent(new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:X.token}})))}catch(ve){g(ve.message||h.i18n("sa-social-error")),$(!1),V(),L()}return}const he=l.get("sub");if(he){je(he);const ve=l.get("email");ve&&Ee(ve);const a=new URLSearchParams(window.location.hash.replace(/^#/,"")).get("otp");a&&Pe(a),n("invite");return}if(Gt()&&e.redirect!==""&&window.location.pathname!==e.redirect){window.location.href=e.redirect;return}V(),L()});function V(){fetch(`${e.domain}/api/v1/sectors/${e.sector}/publicsettings`,{method:"GET",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"}}).then(l=>{if(l.ok)return l.json();throw new Error("Network response was not ok.")}).then(l=>{console.log(l),we(l.SelfSignUpAllowed),z(l.MFARequired||!1)}).catch(l=>{console.log(l),g(l.message)})}function L(){e.hideSocial||fetch(`${e.domain}/api/v1/sectors/${e.sector}/oauth/providers`,{method:"GET",mode:"cors",cache:"no-cache"}).then(l=>{if(l.ok)return l.json();throw new Error("Failed to load social providers")}).then(l=>{const D=(l.providers||[]).filter(F=>F.enabled);se(D)}).catch(()=>{})}function G(l){if(ce())return;be(l),g("");const D=window.location.origin+window.location.pathname;fetch(`${e.domain}/api/v1/oauth/${l}/initiate`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({sectorID:e.sector,redirectURI:D})}).then(F=>{if(F.ok)return F.json();throw new Error(h.i18n("sa-social-error"))}).then(F=>{window.location.href=F.authURL}).catch(F=>{be(""),g(F.message)})}function Z(l,D){return g(""),Me(D),fetch(`${e.domain}/api/v1/signup/mfa/begin`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:l,sectorID:e.sector,transactionId:D})}).then(F=>{if(!F.ok)throw new Error(h.i18n("sa-signup-verify-error"))}).then(()=>{n("signup-verify")}).catch(F=>{g(F.message)})}function pe(){return g(""),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:Oe()})}).then(l=>{if(l.ok)return l.json();throw l.status===400?new Error(h.i18n("sa-signup-verify-error")):new Error(h.i18n("sa-signup-verify-error"))}).then(l=>{Te(l.token),localStorage.setItem("spartan-token",l.token),T.getRootNode().host.dispatchEvent(new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:l.token}})),A(""),n("signup-webauthn")}).catch(l=>{g(l.message)})}function K(){b()||($(!0),g(""),fetch(`${e.domain}/api/v1/webauthn/registration/begin`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:`bearer ${te()}`},body:JSON.stringify({keyName:"Default",sectorID:e.sector})}).then(l=>{if(!l.ok)throw new Error(h.i18n("sa-signup-webauthn-error"));return l.json()}).then(l=>{const D=qt(l.Options);return Jt(D).then(F=>{let he=JSON.parse(JSON.stringify(F));return he.transactionID=l.TransactionID,he})}).then(l=>fetch(`${e.domain}/api/v1/webauthn/registration/finish`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:`bearer ${te()}`},body:JSON.stringify(l)})).then(l=>{if(!l.ok)throw new Error(h.i18n("sa-signup-webauthn-error"));c()}).catch(l=>{g((l==null?void 0:l.message)||String(l))}).finally(()=>{$(!1)}))}function c(){n(e.startMode),e.redirect!==""&&(window.location.href=e.redirect)}function m(){return console.log("login"),g(""),t()==="password"?ne():t()==="webauthn"?_():t()==="otp-pick"?ge(me()):t()==="otp"?_e():t()==="reset-email"?mt():t()==="reset-code"?bt():Promise.resolve()}function P(){return console.log("signup"),g(""),S(!1),fetch(`${e.domain}/api/v1/users`,{method:"POST",mode:"cors",cache:"no-cache",body:JSON.stringify({username:r(),password:s(),sectorID:e.sector})}).then(l=>{if(l.ok)return l.json();throw new Error(h.i18n("sa-error-creating-user"))}).then(l=>{if(console.log(l),I())return Z(r(),l.enrollmentTransactionId||"");S(!0),n(e.startMode)}).catch(l=>{S(!1),g(l.message),console.log(l)})}function _(){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(l=>{if(l.ok)return l.json();throw l.status===401?(n("password"),g(h.i18n("webauthn-not-enrolled")),new Error(h.i18n("webauthn-not-enrolled"))):new Error(`${l.status} ${l.statusText}: Network response was not ok.`)}).then(l=>{console.log(l);const D=Ha(l.CredentialAssertion);return console.log("Parsed WebAuthn request options:",D),Za(D).then(F=>{const he=JSON.stringify(F);let ze=JSON.parse(he);return ze.transactionID=l.TransactionID,ze})}).then(l=>fetch(`${e.domain}/api/v1/login/webauthn/finish`,{method:"POST",mode:"cors",cache:"no-cache",body:JSON.stringify(l)})).then(ae).catch(l=>{g(l.message),console.log(l)})}function ne(){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:s(),sectorID:e.sector})}).then(ae)}function ae(l){return Promise.resolve(l).then(D=>{if(D.ok)return D.json();throw D}).then(D=>{if(console.log(D),localStorage.setItem("spartan-txid",D.transactionID),!D.token){if(D.challengeType==="email_enrollment")return Z(r(),D.transactionID||"");if(D.challengeType.indexOf("otp")!==-1)return de();D.challengeType.indexOf("webauthn")!==-1?(n("webauthn"),g(h.i18n("sa-webauthn-required"))):g(h.i18n("sa-unknown-challenge"));return}localStorage.setItem("spartan-token",D.token);const F=new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:D.token,transactionID:D.transactionID}});T.getRootNode().host.dispatchEvent(F),q()!==""&&(window.location.href=q())}).catch(D=>D.json().then(F=>{console.log(F.message),g(F.message)}).catch(F=>{console.log(F)}))}function de(){const l=localStorage.getItem("spartan-txid")||"";return fetch(e.domain+`/api/v1/otp/${encodeURIComponent(r())}?transactionID=${encodeURIComponent(l)}§orID=${encodeURIComponent(e.sector)}`,{method:"get",mode:"cors",cache:"no-cache"}).then(D=>{if(D.ok)return D.json();throw new Error(h.i18n("error-otp-list"))}).then(D=>{const F=D.registrations||[];if(F.length===0){g(h.i18n("sa-otp-no-registrations"));return}if(F.length===1)return ge(F[0].ID||"");W(F),Y(F[0].ID||""),n("otp-pick"),g("")}).catch(D=>{g(D.message),console.log(D)})}function ge(l){return console.log("begin OTP, registrationID:",l),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:l,sectorID:e.sector})}).then(D=>{if(D.ok)return D.json();throw new Error(`${D.status} ${D.statusText}`)}).then(D=>{console.log(D),D.transactionID&&localStorage.setItem("spartan-txid",D.transactionID),A(""),g(""),n("otp")}).catch(D=>{g(D.message),console.log(D)})}function _e(){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:o(),transactionID:localStorage.getItem("spartan-txid"),sectorID:e.sector})}).then(ae)}function mt(){return console.log("begin password reset"),g(""),oe(!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(l=>{if(l.ok)return l.json();throw new Error(h.i18n("sa-reset-error"))}).then(l=>{console.log(l),g(h.i18n("sa-reset-email-sent")),Fe(""),B(""),n("reset-code")}).catch(l=>{g(l.message),console.log(l)})}function bt(){return console.log("complete password reset"),g(""),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:ke().toUpperCase().trim(),newPassword:xe(),sectorID:e.sector})}).then(l=>{if(l.ok)return l.json();throw l.status===400?new Error(h.i18n("sa-reset-error-code")):new Error(h.i18n("sa-reset-error"))}).then(l=>{console.log(l),oe(!0),Fe(""),B(""),u(""),n(e.startMode)}).catch(l=>{g(l.message),console.log(l)})}async function rt(){if(g(""),!Ie()||Ie().trim().length===0){g(h.i18n("sa-invite-error-otp"));return}if(!E()||E().length<8){g("Password must be at least 8 characters");return}const l=Ne();if(!l){g("Missing invitation information");return}const D=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:l,otp:Ie().toUpperCase().trim(),password:E(),sectorID:e.sector})}).catch(()=>null);if(!D){g(h.i18n("sa-invite-error-generic"));return}if(D.ok){history.replaceState({},"",window.location.pathname);const F=await D.json().catch(()=>({})),he=T.getRootNode().host;F.token?(localStorage.setItem("spartan-token",F.token),he.dispatchEvent(new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:F.token}})),q()!==""?window.location.href=q():e.redirect!==""?window.location.href=e.redirect:(U(!1),je(""),Ee(""),Pe(""),C(""),n(e.startMode),V(),L())):(U(!0),he.dispatchEvent(new CustomEvent("spartan-invite-complete",{bubbles:!0,cancelable:!0,detail:{sub:l,success:!0}})),setTimeout(()=>{q()!==""?window.location.href=q():e.redirect!==""?window.location.href=e.redirect:(U(!1),je(""),Ee(""),Pe(""),C(""),n(e.startMode),V(),L())},2e3))}else{const F=await D.json().catch(()=>({}));D.status===400||String(F.message).includes("invalid OTP")?g(h.i18n("sa-invite-error-otp")):D.status===504||String(F.message).includes("expired")?g(h.i18n("sa-invite-error-expired")):g(F.message||h.i18n("sa-invite-error-generic"))}}return(()=>{var l=tu(),D=l.firstChild,F=D.firstChild,he=F.nextSibling,ze=he.nextSibling,ve=T;return typeof ve=="function"?kt(ve,D):T=D,D.addEventListener("submit",X=>{if(X.preventDefault(),b())return;$(!0),(t()==="sign-up"?P():t()==="signup-verify"?pe():t()==="invite"?Promise.resolve(rt()):m()).finally(()=>$(!1))}),d(he,R),d(ze,(()=>{var X=f(()=>t()==="reset-email"||t()==="reset-code");return()=>X()?h.i18n("sa-reset-password"):f(()=>t()==="signup-verify"||t()==="signup-webauthn")()?h.i18n("sa-signup-mfa-title"):f(()=>t()==="invite")()?h.i18n("sa-complete-invite"):h.i18n("sa-login")})()),d(D,k&&(()=>{var X=nu();return d(X,k),X})(),null),d(D,(()=>{var X=f(()=>!!$e());return()=>X()&&(()=>{var a=gt();return d(a,()=>h.i18n("sa-signup-complete")),a})()})(),null),d(D,(()=>{var X=f(()=>!!re());return()=>X()&&(()=>{var a=gt();return d(a,()=>h.i18n("sa-reset-success")),a})()})(),null),d(D,(()=>{var X=f(()=>t()==="invite");return()=>X()&&[f(()=>f(()=>!!qe())()&&(()=>{var a=su();return d(a,qe),a})()),f(()=>f(()=>!!x())()&&(()=>{var a=au();return d(a,()=>h.i18n("sa-invite-success")),a})()),(()=>{var a=ru();return a.$$input=p=>Pe(p.currentTarget.value),y(p=>{var N=h.i18n("sa-invite-otp"),ye=b()||x();return N!==p.e&&fe(a,"placeholder",p.e=N),ye!==p.t&&(a.disabled=p.t=ye),p},{e:void 0,t:void 0}),y(()=>a.value=Ie()),a})(),(()=>{var a=Kt();return d(a,()=>h.i18n("sa-invite-otp-hint")),a})(),(()=>{var a=iu();return a.$$input=p=>C(p.currentTarget.value),y(p=>{var N=h.i18n("sa-invite-password"),ye=b()||x();return N!==p.e&&fe(a,"placeholder",p.e=N),ye!==p.t&&(a.disabled=p.t=ye),p},{e:void 0,t:void 0}),y(()=>a.value=E()),a})(),(()=>{var a=Kt();return d(a,()=>h.i18n("sa-invite-password-hint")),a})(),(()=>{var a=Ht();return d(a,(()=>{var p=f(()=>!!b());return()=>p()?h.i18n("sa-invite-completing"):h.i18n("sa-invite-submit")})()),y(()=>a.disabled=b()||x()),a})()]})(),null),d(D,(()=>{var X=f(()=>t()!=="invite");return()=>X()&&[(()=>{var a=uu();return a.addEventListener("change",p=>i(p.currentTarget.value)),a.$$input=p=>i(p.currentTarget.value),y(p=>{var N=h.i18n("sa-username"),ye=t()==="otp"||t()==="otp-pick"||t()==="reset-code"||t()==="signup-verify"||t()==="signup-webauthn";return N!==p.e&&fe(a,"placeholder",p.e=N),ye!==p.t&&(a.disabled=p.t=ye),p},{e:void 0,t:void 0}),y(()=>a.value=r()),a})(),f(()=>f(()=>t()!=="sign-up"&&t()!=="signup-verify"&&t()!=="signup-webauthn")()&&[f(()=>f(()=>t()==="password")()&&(()=>{var a=ou();return a.addEventListener("change",p=>u(p.currentTarget.value)),a.$$input=p=>u(p.currentTarget.value),y(()=>fe(a,"placeholder",h.i18n("sa-password"))),y(()=>a.value=s()),a})()),f(()=>f(()=>t()==="webauthn")()&>()),f(()=>f(()=>t()==="otp-pick")()&&[(()=>{var a=Dt();return d(a,()=>h.i18n("sa-otp-choose")),a})(),(()=>{var a=lu();return a.addEventListener("change",p=>Y(p.currentTarget.value)),d(a,()=>le().map(p=>(()=>{var N=cu(),ye=N.firstChild,Qt=ye.nextSibling;return Qt.nextSibling,d(N,()=>p.DisplayName||p.ID,ye),d(N,()=>p.Type,Qt),y(()=>N.value=p.ID),N})())),y(()=>a.value=me()),a})()]),f(()=>f(()=>t()==="otp")()&&(()=>{var a=du();return a.$$input=p=>A(p.currentTarget.value),y(()=>fe(a,"placeholder",h.i18n("sa-code"))),y(()=>a.value=o()),a})()),f(()=>f(()=>t()==="reset-code")()&&[(()=>{var a=Wt();return a.$$input=p=>Fe(p.currentTarget.value),y(()=>fe(a,"placeholder",h.i18n("sa-reset-code"))),y(()=>a.value=ke()),a})(),(()=>{var a=Zt();return a.$$input=p=>B(p.currentTarget.value),y(()=>fe(a,"placeholder",h.i18n("sa-new-password"))),y(()=>a.value=xe()),a})()]),f(()=>f(()=>t()==="password"||t()==="webauthn")()&&(()=>{var a=hu(),p=a.firstChild,N=p.nextSibling;return N.firstChild,a.$$click=()=>n(t()==="password"?"webauthn":"password"),d(N,()=>h.i18n("sa-use-password"),null),y(()=>p.checked=t()==="password"),a})())]),f(()=>f(()=>t()==="sign-up")()&&(()=>{var a=Zt();return a.addEventListener("change",p=>u(p.currentTarget.value)),a.$$input=p=>u(p.currentTarget.value),y(()=>fe(a,"placeholder",h.i18n("sa-password"))),y(()=>a.value=s()),a})()),f(()=>f(()=>t()==="signup-verify")()&&[(()=>{var a=Dt();return d(a,()=>h.i18n("sa-signup-verify-prompt")),a})(),(()=>{var a=Wt();return a.$$input=p=>A(p.currentTarget.value),y(()=>fe(a,"placeholder",h.i18n("sa-code"))),y(()=>a.value=o()),a})()]),f(()=>f(()=>t()==="signup-webauthn")()&&(()=>{var a=Dt();return d(a,()=>h.i18n("sa-signup-webauthn-prompt")),a})()),f(()=>f(()=>t()!=="signup-webauthn")()&&(()=>{var a=Ht();return d(a,(()=>{var p=f(()=>!!b());return()=>p()?h.i18n("sa-loading"):f(()=>t()==="sign-up")()?h.i18n("sa-signup"):f(()=>t()==="otp-pick")()?h.i18n("sa-otp-send-code"):f(()=>t()==="otp")()?h.i18n("sa-otp-verify"):f(()=>t()==="reset-email")()?h.i18n("sa-otp-send-code"):f(()=>t()==="reset-code")()?h.i18n("sa-reset-submit"):f(()=>t()==="signup-verify")()?h.i18n("sa-otp-verify"):h.i18n("sa-login")})()),y(()=>a.disabled=b()),a})()),f(()=>f(()=>t()==="signup-webauthn")()&&[(()=>{var a=fu();return a.$$click=()=>K(),d(a,(()=>{var p=f(()=>!!b());return()=>p()?h.i18n("sa-loading"):h.i18n("sa-signup-webauthn-setup")})()),y(()=>a.disabled=b()),a})(),(()=>{var a=nt();return a.$$click=()=>c(),d(a,()=>h.i18n("sa-signup-webauthn-done")),a})()]),f(()=>f(()=>t()==="password")()&&(()=>{var a=nt();return a.$$click=()=>{g(""),oe(!1),n("reset-email")},d(a,()=>h.i18n("sa-forgot-password")),a})()),f(()=>f(()=>t()==="reset-email"||t()==="reset-code")()&&(()=>{var a=nt();return a.$$click=()=>{g(""),Fe(""),B(""),n(e.startMode)},d(a,()=>h.i18n("sa-back")),a})()),f(()=>f(()=>!!(Ae()&&t()!=="reset-email"&&t()!=="reset-code"&&t()!=="signup-verify"&&t()!=="signup-webauthn"))()&&(()=>{var a=nt();return a.$$click=()=>t()==="sign-up"?n(e.startMode):n("sign-up"),d(a,(()=>{var p=f(()=>t()==="sign-up");return()=>p()?h.i18n("sa-back"):h.i18n("sa-signup")})()),a})()),f(()=>f(()=>!e.hideSocial&&ie().length>0&&(t()==="password"||t()==="webauthn"||t()==="sign-up"))()&&[(()=>{var a=pu(),p=a.firstChild;return d(p,()=>h.i18n("sa-or")),a})(),f(()=>ie().map(a=>(()=>{var p=gu();return p.$$click=()=>G(a.provider),d(p,(()=>{var N=f(()=>a.provider==="google");return()=>N()&&Du()})(),null),d(p,(()=>{var N=f(()=>a.provider==="github");return()=>N()&&mu()})(),null),d(p,(()=>{var N=f(()=>a.provider==="apple");return()=>N()&&bu()})(),null),d(p,(()=>{var N=f(()=>a.provider==="oidc");return()=>N()&&vu()})(),null),d(p,(()=>{var N=f(()=>a.provider==="google");return()=>N()?h.i18n("sa-social-google"):f(()=>a.provider==="github")()?h.i18n("sa-social-github"):f(()=>a.provider==="apple")()?h.i18n("sa-social-apple"):h.i18n("sa-social-oidc")})(),null),y(()=>p.disabled=!!ce()||b()),p})()))])]})(),null),d(l,(()=>{var X=f(()=>!!J());return()=>X()&&(()=>{var a=Cu(),p=a.firstChild;return p._$owner=sn(),d(p,()=>h.i18n("sa-loading")),a})()})(),null),l})()}),ot(["input","click"]);var wu=v(`<div class=container><style>.container {
|
|
148
148
|
background-color: #ffffff;
|
|
149
149
|
border-radius: 10px;
|
|
150
150
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
|
@@ -322,7 +322,7 @@
|
|
|
322
322
|
.modal-content .btn.verify:hover {
|
|
323
323
|
background-color: #0056b3;
|
|
324
324
|
}
|
|
325
|
-
</style><style></style><h1 class=header>`),Yt=
|
|
325
|
+
</style><style></style><h1 class=header>`),Yt=v("<span class=error-message>"),Au=v("<div class=section><h2></h2><div class=security-keys>"),Eu=v('<div class=key-item><span></span><button class="btn remove">'),Xt=v("<span>"),Fu=v("<div class=section><div class=security-keys>"),yu=v('<button class="btn add">+ '),$u=v('<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">'),ku=v("<div class=section><h2></h2><table><thead><tr><th></th><th></th><th></th></tr></thead><tbody>"),Bu=v('<tr class=mfa-list-item><td></td><td></td><td><button class="btn remove">'),xu=v('<span> <button class="btn validate">'),_u=v('<div class=section><div class=mfa-manage><button class="btn add">+ '),Su=v('<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">'),Tu=v('<div class=modal id=mfaModal><div class=modal-content><span class=close id=closeModal>×</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');dt("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=>{w(""),w("");const[t,n]=w(""),[r,i]=w(""),[s,u]=w(""),[o]=w(e.showWebAuthn),[A,k]=w(!1),[g,q]=w(!1),[Ae,we]=w(!1),[$e,S]=w(!1),[re,oe]=w(!1),[ke,Fe]=w([]),[xe,B]=w([]),[le,W]=w(""),[me,Y]=w(""),[ie,se]=w(""),[ce,be]=w(""),b=ht(e.locale);let $;try{$=e.styles}catch{$=""}at(async()=>{if(Gt())q(!0),i("");else{if(e.redirectOnUnauthenticated){window.location.href=e.redirect;return}q(!1),i(b.i18n("not-authenticated"))}I().then(C=>{console.log(C)}),await Me(),Ee().then(C=>{B(C.registrations)})});async function I(){return await(await fetch(`${e.domain}/api/v1/users/self`,z("get"))).json()}function z(E="get"){return{method:E,mode:"cors",cache:"no-cache",headers:{"Content-Type":"application",Authorization:`bearer ${Qa()}`}}}function te(){if(re())return;oe(!0);let E=z("post");E.body=JSON.stringify({keyName:t(),sectorID:e.sector}),fetch(`${e.domain}/api/v1/webauthn/registration/begin`,E).then(C=>{if(C.status===200)return C.json();throw C}).then(C=>(console.log(C),Te(C))).catch(C=>{C.json?C.json().then(x=>{i(x.message)}):i(C)}).finally(()=>{oe(!1)})}async function Te(E){try{const C=qt(E.Options);console.log("Parsed WebAuthn creation options:",C);const x=await Jt(C),U=JSON.stringify(x);let h=JSON.parse(U);h.transactionID=E.TransactionID;let T=z("post");T.body=JSON.stringify(h);const M=await fetch(`${e.domain}/api/v1/webauthn/registration/finish`,T);if(M.status!==200){const R=await M.json();i(R.message);return}k(!1),n(""),Me()}catch(C){console.error("WebAuthn registration error:",C),i((C==null?void 0:C.message)||String(C))}}async function Oe(E){let C=z("delete");C.body=JSON.stringify({ID:E});try{if((await fetch(`${e.domain}/api/v1/webauthn/${E}`,C)).status!==200){i(b.i18n("error-webauthn-remove"));return}Me()}catch(x){console.error(x),i(b.i18n("error-webauthn-remove"));return}}async function Me(){let E=z("get");try{const x=await(await fetch(`${e.domain}/api/v1/webauthn/registration/list`,E)).json();Fe(x.registrations||[])}catch(C){console.error(C),Fe([])}}function Ne(E,C){re()||(oe(!0),je(E,C).then(x=>{if(x)return Ee().then(U=>{B(U.registrations),W(x.transactionID),S(!0)})}).finally(()=>{oe(!1)}))}function je(E,C){let x=z("post");return x.body=JSON.stringify({destination:E,OTPType:Pe(C),sectorID:e.sector}),fetch(`${e.domain}/api/v1/otp/begin`,x).then(U=>{if(U.status!==200){i(b.i18n("error-otp-verification"));return}return U.json()}).catch(U=>{console.error(U),i(b.i18n("error-otp-registration"))})}function qe(E,C){if(re())return;oe(!0);let x=z("post");x.body=JSON.stringify({transactionID:E,password:C}),fetch(`${e.domain}/api/v1/otp/finish`,x).then(U=>{if(U.status!==200){u(b.i18n("error-otp-verification"));return}return S(!1),Y(""),we(!1),be(""),se(""),Ee().then(h=>{B(h.registrations)}),U.json()}).catch(U=>{console.error(U),u(b.i18n("error-otp-registration"))}).finally(()=>{oe(!1)})}async function Ee(){let E=z("get");try{return await(await fetch(`${e.domain}/api/v1/otp/list`,E)).json()}catch(C){console.error(C),i(b.i18n("error-otp-list"));return}}async function Ie(E){let C=z("delete");C.body=JSON.stringify({ID:E});try{if((await fetch(`${e.domain}/api/v1/otp/${E}`,C)).status!==200){i(b.i18n("error-otp-remove"));return}Ee().then(U=>{B(U.registrations)})}catch(x){console.error(x),i(b.i18n("error-otp-remove"));return}}function Pe(E){return E==="EMAIL"?2:1}return(()=>{var E=wu(),C=E.firstChild,x=C.nextSibling,U=x.nextSibling;return d(x,$),d(U,()=>b.i18n("sa-account-settings")),d(E,r&&(()=>{var h=Yt();return d(h,r),h})(),null),d(E,(()=>{var h=f(()=>!!(o()&&ke().length));return()=>h()&&(()=>{var T=Au(),M=T.firstChild,R=M.nextSibling;return d(M,()=>b.i18n("sa-webauthn-security-keys")),d(R,()=>ke().map(J=>(()=>{var V=Eu(),L=V.firstChild,G=L.nextSibling;return d(L,()=>J.keyName),G.$$click=()=>{confirm(b.i18n("sa-confirm-delete-key"))&&Oe(J.keyName)},d(G,()=>b.i18n("sa-remove")),V})()),null),d(R,(()=>{var J=f(()=>ke().length<=0);return()=>J()&&(()=>{var V=Xt();return d(V,()=>b.i18n("sa-no-security-keys")),V})()})(),null),T})()})(),null),d(E,(()=>{var h=f(()=>!!o());return()=>h()&&(()=>{var T=Fu(),M=T.firstChild;return d(M,(()=>{var R=f(()=>!A());return()=>R()&&(()=>{var J=yu();return J.firstChild,J.$$click=()=>k(!0),d(J,()=>b.i18n("sa-add-security-key"),null),J})()})(),null),d(M,(()=>{var R=f(()=>!!A());return()=>R()&&(()=>{var J=$u(),V=J.firstChild,L=V.firstChild,G=L.nextSibling,Z=G.nextSibling,pe=Z.nextSibling;return d(L,()=>b.i18n("sa-webauthn-key-name")),G.$$input=K=>n(K.currentTarget.value),Z.$$click=()=>k(!1),d(Z,()=>b.i18n("sa-cancel")),pe.$$click=()=>t()!==""&&te(),d(pe,()=>b.i18n("sa-register")),y(K=>{var c=b.i18n("sa-webauthn-key-name"),m=t()===""||re();return c!==K.e&&fe(G,"placeholder",K.e=c),m!==K.t&&(pe.disabled=K.t=m),K},{e:void 0,t:void 0}),y(()=>G.value=t()),J})()})(),null),T})()})(),null),d(E,(()=>{var h=f(()=>xe().length>0);return()=>h()&&(()=>{var T=ku(),M=T.firstChild,R=M.nextSibling,J=R.firstChild,V=J.firstChild,L=V.firstChild,G=L.nextSibling,Z=G.nextSibling,pe=J.nextSibling;return d(M,()=>b.i18n("sa-mfa")),d(L,()=>b.i18n("sa-mfa-destination")),d(G,()=>b.i18n("sa-mfa-validated")),d(Z,()=>b.i18n("sa-mfa-action")),d(pe,()=>xe().map(K=>(()=>{var c=Bu(),m=c.firstChild,P=m.nextSibling,_=P.nextSibling,ne=_.firstChild;return d(m,()=>K.DisplayName),d(P,(()=>{var ae=f(()=>!!K.Validated);return()=>ae()?(()=>{var de=Xt();return d(de,()=>b.i18n("sa-yes")),de})():(()=>{var de=xu(),ge=de.firstChild,_e=ge.nextSibling;return d(de,()=>b.i18n("sa-no"),ge),_e.$$click=()=>{Ne(K.DisplayName,K.Type==="email"?"EMAIL":"SMS")},d(_e,()=>b.i18n("sa-validate")),y(()=>_e.disabled=re()),de})()})()),ne.$$click=()=>{confirm(b.i18n("sa-confirm-delete-key"))&&Ie(K.ID)},d(ne,()=>b.i18n("sa-remove")),y(()=>fe(m,"title",K.DisplayName)),c})())),T})()})(),null),d(E,(()=>{var h=f(()=>!Ae());return()=>h()&&(()=>{var T=_u(),M=T.firstChild,R=M.firstChild;return R.firstChild,R.$$click=()=>we(!0),d(R,()=>b.i18n("sa-register-mfa"),null),T})()})(),null),d(E,(()=>{var h=f(()=>!!Ae());return()=>h()&&(()=>{var T=Su(),M=T.firstChild,R=M.nextSibling,J=R.firstChild,V=J.firstChild,L=V.nextSibling,G=L.nextSibling,Z=J.nextSibling,pe=Z.firstChild,K=pe.nextSibling,c=K.nextSibling,m=Z.nextSibling,P=m.firstChild;return d(M,()=>b.i18n("sa-add-mfa")),d(V,()=>b.i18n("sa-email")),L.$$input=_=>se(_.currentTarget.value),G.$$click=()=>Ne(ie(),"EMAIL"),d(G,()=>b.i18n("sa-add-email")),d(pe,()=>b.i18n("sa-phone")),K.$$input=_=>be(_.currentTarget.value),c.$$click=()=>Ne(ce(),"SMS"),d(c,()=>b.i18n("sa-add-sms")),P.$$click=()=>we(!1),d(P,()=>b.i18n("sa-cancel")),y(_=>{var ne=b.i18n("sa-email"),ae=re(),de=b.i18n("sa-phone"),ge=re();return ne!==_.e&&fe(L,"placeholder",_.e=ne),ae!==_.t&&(G.disabled=_.t=ae),de!==_.a&&fe(K,"placeholder",_.a=de),ge!==_.o&&(c.disabled=_.o=ge),_},{e:void 0,t:void 0,a:void 0,o:void 0}),y(()=>L.value=ie()),y(()=>K.value=ce()),T})()})(),null),d(E,(()=>{var h=f(()=>!!$e());return()=>h()&&(()=>{var T=Tu(),M=T.firstChild,R=M.firstChild,J=R.nextSibling,V=J.nextSibling,L=V.nextSibling,G=L.nextSibling;return T.$$click=()=>S(!1),M.$$click=Z=>Z.stopPropagation(),R.$$click=()=>S(!1),d(M,(()=>{var Z=f(()=>!!s());return()=>Z()&&(()=>{var pe=Yt();return d(pe,s),pe})()})(),V),L.$$input=Z=>Y(Z.currentTarget.value),G.$$click=()=>qe(le(),me()),y(()=>G.disabled=re()),y(()=>L.value=me()),T})()})(),null),E})()}),ot(["click","input"]);var Ou=v(`<form class=invite-frame><style>.invite-frame {
|
|
326
326
|
display: flex;
|
|
327
327
|
flex-direction: column;
|
|
328
328
|
justify-content: center;
|
|
@@ -382,4 +382,45 @@
|
|
|
382
382
|
margin-bottom: 10px;
|
|
383
383
|
display: block;
|
|
384
384
|
}
|
|
385
|
-
|
|
385
|
+
|
|
386
|
+
.social-divider {
|
|
387
|
+
display: flex;
|
|
388
|
+
align-items: center;
|
|
389
|
+
margin: 20px 0 4px 0;
|
|
390
|
+
color: #888;
|
|
391
|
+
font-size: 0.85em;
|
|
392
|
+
}
|
|
393
|
+
.social-divider::before, .social-divider::after {
|
|
394
|
+
content: '';
|
|
395
|
+
flex: 1;
|
|
396
|
+
border-bottom: 1px solid #ccc;
|
|
397
|
+
}
|
|
398
|
+
.social-divider span {
|
|
399
|
+
margin: 0 10px;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.social-btn {
|
|
403
|
+
display: flex;
|
|
404
|
+
align-items: center;
|
|
405
|
+
justify-content: center;
|
|
406
|
+
gap: 10px;
|
|
407
|
+
margin: 8px 0 0 0;
|
|
408
|
+
padding: 10px;
|
|
409
|
+
width: 100%;
|
|
410
|
+
border: 1px solid #ccc;
|
|
411
|
+
border-radius: 10px;
|
|
412
|
+
background: #fff;
|
|
413
|
+
cursor: pointer;
|
|
414
|
+
font-size: inherit;
|
|
415
|
+
font-family: inherit;
|
|
416
|
+
box-sizing: border-box;
|
|
417
|
+
color: #333;
|
|
418
|
+
}
|
|
419
|
+
.social-btn:hover:not(:disabled) {
|
|
420
|
+
background-color: #f5f5f5;
|
|
421
|
+
}
|
|
422
|
+
.social-btn:disabled {
|
|
423
|
+
opacity: 0.6;
|
|
424
|
+
cursor: not-allowed;
|
|
425
|
+
}
|
|
426
|
+
</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>`),Iu=v("<span class=info-message>"),Pu=v("<span class=error-message>"),zu=v("<span class=success-message>"),Mu=v("<div class=social-divider><span>"),Nu=v("<button type=button class=social-btn>"),ju=v('<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>'),Ru=v('<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>'),Lu=v('<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>'),Uu=v('<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>');dt("spartan-invite",{domain:"http://127.0.0.1:11000",sector:"0ad5c3e5-0186-4557-8b32-4b36f247bf09",sub:"",email:"",styles:"",locale:"en",redirect:"",hideSocial:!1},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]=w(""),[r,i]=w(""),[s,u]=w(""),[o,A]=w(""),[k,g]=w(!1),[q,Ae]=w([]),[we,$e]=w(""),S=ht(e.locale);let re,oe;try{oe=e.styles}catch{oe=""}at(async()=>{e.sub||new URLSearchParams(window.location.search).get("sub")||u("Missing invitation information. Please use the link from your invite email.");const le=new URLSearchParams(window.location.hash.replace("#","")).get("otp");le&&n(le),Fe()});async function ke(B){var me,Y;if(B.preventDefault(),u(""),A(""),g(!0),!t()||t().trim().length===0){u("Please enter your verification code"),g(!1);return}if(!r()||r().length<8){u("Password must be at least 8 characters"),g(!1);return}const le=new URLSearchParams(window.location.search),W=e.sub||le.get("sub")||"";if(!W){u("Missing invitation information"),g(!1);return}try{const ie=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:W,otp:t().toUpperCase().trim(),password:r(),sectorID:e.sector})});if(ie.ok){const se=await ie.json();A(S.i18n("sa-invite-success"));const ce=new CustomEvent("spartan-invite-complete",{bubbles:!0,cancelable:!0,detail:{sub:W,success:!0}});re&&re.getRootNode().host.dispatchEvent(ce),setTimeout(()=>{e.redirect&&e.redirect!==""&&(window.location.href=e.redirect)},2e3)}else{const se=await ie.json().catch(()=>({}));ie.status===400||(me=se.message)!=null&&me.includes("invalid OTP")?u(S.i18n("sa-invite-error-otp")):ie.status===504||(Y=se.message)!=null&&Y.includes("expired")?u(S.i18n("sa-invite-error-expired")):u(se.message||S.i18n("sa-invite-error-generic")),g(!1)}}catch(ie){console.error("Error completing invite:",ie),u(S.i18n("sa-invite-error-generic")),g(!1)}}function Fe(){e.hideSocial||fetch(`${e.domain}/api/v1/sectors/${e.sector}/oauth/providers`,{method:"GET",mode:"cors",cache:"no-cache"}).then(B=>{if(B.ok)return B.json();throw new Error("Failed to load social providers")}).then(B=>{const le=(B.providers||[]).filter(W=>W.enabled);Ae(le)}).catch(()=>{})}function xe(B){if(we())return;$e(B),u("");const le=window.location.origin+window.location.pathname;fetch(`${e.domain}/api/v1/oauth/${B}/initiate`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({sectorID:e.sector,redirectURI:le})}).then(W=>{if(W.ok)return W.json();throw new Error(S.i18n("sa-social-error"))}).then(W=>{window.location.href=W.authURL}).catch(W=>{$e(""),u(W.message)})}return(()=>{var B=Ou(),le=B.firstChild,W=le.nextSibling,me=W.nextSibling,Y=me.nextSibling,ie=Y.nextSibling,se=ie.nextSibling,ce=se.nextSibling,be=ce.nextSibling,b=re;return typeof b=="function"?kt(b,B):re=B,B.addEventListener("submit",ke),d(W,oe),d(me,()=>S.i18n("sa-complete-invite")),d(B,(()=>{var $=f(()=>!!e.email);return()=>$()&&(()=>{var I=Iu();return d(I,()=>e.email),I})()})(),Y),d(B,(()=>{var $=f(()=>!!s());return()=>$()&&(()=>{var I=Pu();return d(I,s),I})()})(),Y),d(B,(()=>{var $=f(()=>!!o());return()=>$()&&(()=>{var I=zu();return d(I,o),I})()})(),Y),Y.$$input=$=>n($.currentTarget.value),d(ie,()=>S.i18n("sa-invite-otp-hint")),se.$$input=$=>i($.currentTarget.value),d(ce,()=>S.i18n("sa-invite-password-hint")),d(be,(()=>{var $=f(()=>!!k());return()=>$()?S.i18n("sa-invite-completing"):S.i18n("sa-invite-submit")})()),d(B,(()=>{var $=f(()=>!e.hideSocial&&q().length>0);return()=>$()&&[(()=>{var I=Mu(),z=I.firstChild;return d(z,()=>S.i18n("sa-or")),I})(),f(()=>q().map(I=>(()=>{var z=Nu();return z.$$click=()=>xe(I.provider),d(z,(()=>{var te=f(()=>I.provider==="google");return()=>te()&&ju()})(),null),d(z,(()=>{var te=f(()=>I.provider==="github");return()=>te()&&Ru()})(),null),d(z,(()=>{var te=f(()=>I.provider==="apple");return()=>te()&&Lu()})(),null),d(z,(()=>{var te=f(()=>I.provider==="oidc");return()=>te()&&Uu()})(),null),d(z,(()=>{var te=f(()=>I.provider==="google");return()=>te()?S.i18n("sa-social-google"):f(()=>I.provider==="github")()?S.i18n("sa-social-github"):f(()=>I.provider==="apple")()?S.i18n("sa-social-apple"):S.i18n("sa-social-oidc")})(),null),y(()=>z.disabled=!!we()||k()),z})()))]})(),null),y($=>{var I=S.i18n("sa-invite-otp"),z=k()||o()!=="",te=S.i18n("sa-invite-password"),Te=k()||o()!=="",Oe=k()||o()!=="";return I!==$.e&&fe(Y,"placeholder",$.e=I),z!==$.t&&(Y.disabled=$.t=z),te!==$.a&&fe(se,"placeholder",$.a=te),Te!==$.o&&(se.disabled=$.o=Te),Oe!==$.i&&(be.disabled=$.i=Oe),$},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),y(()=>Y.value=t()),y(()=>se.value=r()),B})()}),ot(["input","click"])});
|