diff --git a/docs/3rdpartylicenses.txt b/docs/3rdpartylicenses.txt old mode 100644 new mode 100755 index 34e6245..2a58164 --- a/docs/3rdpartylicenses.txt +++ b/docs/3rdpartylicenses.txt @@ -1,17 +1,155 @@ @angular/animations MIT +The MIT License + +Copyright (c) 2010-2024 Google LLC. https://angular.dev/license + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + @angular/common MIT +The MIT License + +Copyright (c) 2010-2024 Google LLC. https://angular.dev/license + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + @angular/core MIT +The MIT License + +Copyright (c) 2010-2024 Google LLC. https://angular.dev/license + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +@angular/forms +MIT +The MIT License + +Copyright (c) 2010-2024 Google LLC. https://angular.dev/license + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + @angular/platform-browser MIT +The MIT License + +Copyright (c) 2010-2024 Google LLC. https://angular.dev/license + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + @angular/router MIT +The MIT License + +Copyright (c) 2010-2024 Google LLC. https://angular.dev/license + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +@belomonte/async-modal-ngx +Unlicense @jsr/nostrify__nostrify MIT License diff --git a/docs/929.3327f3f3a9dc4b18.js b/docs/929.3327f3f3a9dc4b18.js new file mode 100755 index 0000000..79b9bd5 --- /dev/null +++ b/docs/929.3327f3f3a9dc4b18.js @@ -0,0 +1 @@ +(()=>{"use strict";var it={d:(t,e)=>{for(var n in e)it.o(e,n)&&!it.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},Rt={};function Ct(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function $t(t,...e){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function wt(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}it.r(Rt),it.d(Rt,{OG:()=>Gt,My:()=>ut,Ph:()=>j,lX:()=>zt,Id:()=>ct,fg:()=>pe,qj:()=>C,aT:()=>lt,lq:()=>Q,z:()=>Kt,Q5:()=>pt});const jt="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,Vt=t=>t instanceof Uint8Array,Pt=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),G=(t,e)=>t<<32-e|t>>>e;if(68!==new Uint8Array(new Uint32Array([287454020]).buffer)[0])throw new Error("Non little-endian hardware is not supported");function yt(t){if("string"==typeof t&&(t=function ze(t){if("string"!=typeof t)throw new Error("utf8ToBytes expected string, got "+typeof t);return new Uint8Array((new TextEncoder).encode(t))}(t)),!Vt(t))throw new Error("expected Uint8Array, got "+typeof t);return t}class de{clone(){return this._cloneInto()}}function Me(t){const e=r=>t().update(yt(r)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}function he(t=32){if(jt&&"function"==typeof jt.getRandomValues)return jt.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}class Ye extends de{constructor(e,n,r,o){super(),this.blockLen=e,this.outputLen=n,this.padOffset=r,this.isLE=o,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=Pt(this.buffer)}update(e){wt(this);const{view:n,buffer:r,blockLen:o}=this,s=(e=yt(e)).length;for(let c=0;co-c&&(this.process(r,0),c=0);for(let a=c;a>o&s),i=Number(n&s),u=r?0:4;t.setUint32(e+(r?4:0),c,r),t.setUint32(e+u,i,r)})(r,o-8,BigInt(8*this.length),s),this.process(r,0);const i=Pt(e),f=this.outputLen;if(f%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=f/4,d=this.get();if(u>d.length)throw new Error("_sha2: outputLen bigger than state");for(let a=0;at&e^~t&n,Qe=(t,e,n)=>t&e^t&n^e&n,Je=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Y=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),X=new Uint32Array(64);class ge extends Ye{constructor(){super(64,32,8,!1),this.A=0|Y[0],this.B=0|Y[1],this.C=0|Y[2],this.D=0|Y[3],this.E=0|Y[4],this.F=0|Y[5],this.G=0|Y[6],this.H=0|Y[7]}get(){const{A:e,B:n,C:r,D:o,E:s,F:c,G:i,H:f}=this;return[e,n,r,o,s,c,i,f]}set(e,n,r,o,s,c,i,f){this.A=0|e,this.B=0|n,this.C=0|r,this.D=0|o,this.E=0|s,this.F=0|c,this.G=0|i,this.H=0|f}process(e,n){for(let a=0;a<16;a++,n+=4)X[a]=e.getUint32(n,!1);for(let a=16;a<64;a++){const E=X[a-15],B=X[a-2],p=G(E,7)^G(E,18)^E>>>3,l=G(B,17)^G(B,19)^B>>>10;X[a]=l+X[a-7]+p+X[a-16]|0}let{A:r,B:o,C:s,D:c,E:i,F:f,G:u,H:d}=this;for(let a=0;a<64;a++){const B=d+(G(i,6)^G(i,11)^G(i,25))+Xe(i,f,u)+Je[a]+X[a]|0,l=(G(r,2)^G(r,13)^G(r,22))+Qe(r,o,s)|0;d=u,u=f,f=i,i=c+B|0,c=s,s=o,o=r,r=B+l|0}r=r+this.A|0,o=o+this.B|0,s=s+this.C|0,c=c+this.D|0,i=i+this.E|0,f=f+this.F|0,u=u+this.G|0,d=d+this.H|0,this.set(r,o,s,c,i,f,u,d)}roundClean(){X.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const Dt=Me(()=>new ge),Bt=(BigInt(0),BigInt(1)),Fe=BigInt(2),_t=t=>t instanceof Uint8Array,tn=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function ut(t){if(!_t(t))throw new Error("Uint8Array expected");let e="";for(let n=0;nr+o.length,0));let n=0;return t.forEach(r=>{if(!_t(r))throw new Error("Uint8Array expected");e.set(r,n),n+=r.length}),e}const Gt=t=>(Fe<new Uint8Array(t),ye=t=>Uint8Array.from(t);function pe(t,e,n){if("number"!=typeof t||t<2)throw new Error("hashLen must be a number");if("number"!=typeof e||e<2)throw new Error("qByteLen must be a number");if("function"!=typeof n)throw new Error("hmacFn must be a function");let r=Mt(t),o=Mt(t),s=0;const c=()=>{r.fill(1),o.fill(0),s=0},i=(...a)=>n(o,r,...a),f=(a=Mt())=>{o=i(ye([0]),a),r=i(),0!==a.length&&(o=i(ye([1]),a),r=i())},u=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let a=0;const E=[];for(;a{let B;for(c(),f(a);!(B=E(u()));)f();return c(),B}}const nn={bigint:t=>"bigint"==typeof t,function:t=>"function"==typeof t,boolean:t=>"boolean"==typeof t,string:t=>"string"==typeof t,stringOrUint8Array:t=>"string"==typeof t||t instanceof Uint8Array,isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>"function"==typeof t&&Number.isSafeInteger(t.outputLen)};function pt(t,e,n={}){const r=(o,s,c)=>{const i=nn[s];if("function"!=typeof i)throw new Error(`Invalid validator "${s}", expected function`);const f=t[o];if(!(c&&void 0===f||i(f,t)))throw new Error(`Invalid param ${String(o)}=${f} (${typeof f}), expected ${s}`)};for(const[o,s]of Object.entries(e))r(o,s,!1);for(const[o,s]of Object.entries(n))r(o,s,!0);return t}const H=BigInt(0),L=BigInt(1),J=BigInt(2),rn=BigInt(3),Wt=BigInt(4),xe=BigInt(5),me=BigInt(8);function k(t,e){const n=t%e;return n>=H?n:e+n}function cn(t,e,n){if(n<=H||e 0");if(n===L)return H;let r=L;for(;e>H;)e&L&&(r=r*t%n),t=t*t%n,e>>=L;return r}function z(t,e,n){let r=t;for(;e-- >H;)r*=r,r%=n;return r}function vt(t,e){if(t===H||e<=H)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let n=k(t,e),r=e,o=H,s=L,c=L,i=H;for(;n!==H;){const u=r/n,d=r%n,a=o-c*u,E=s-i*u;r=n,n=d,o=c,s=i,c=a,i=E}if(r!==L)throw new Error("invert: does not exist");return k(o,e)}BigInt(9),BigInt(16);const un=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Yt(t,e){const n=void 0!==e?e:t.toString(2).length;return{nBitLength:n,nByteLength:Math.ceil(n/8)}}function Ee(t){if("bigint"!=typeof t)throw new Error("field order must be bigint");const e=t.toString(2).length;return Math.ceil(e/8)}function Be(t){const e=Ee(t);return e+Math.ceil(e/2)}class _e extends de{constructor(e,n){super(),this.finished=!1,this.destroyed=!1,function ue(t){if("function"!=typeof t||"function"!=typeof t.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");Ct(t.outputLen),Ct(t.blockLen)}(e);const r=yt(n);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,s=new Uint8Array(o);s.set(r.length>o?e.create().update(r).digest():r);for(let c=0;cnew _e(t,e).update(n).digest();ve.create=(t,e)=>new _e(t,e);const wn=BigInt(0),Xt=BigInt(1);function Ae(t){return function ln(t){pt(t,un.reduce((r,o)=>(r[o]="function",r),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"}))}(t.Fp),pt(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Yt(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}const{Ph:xn,aT:mn}=Rt,ft={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(t){const{Err:e}=ft;if(t.length<2||2!==t[0])throw new e("Invalid signature integer tag");const n=t[1],r=t.subarray(2,n+2);if(!n||r.length!==n)throw new e("Invalid signature integer: wrong length");if(128&r[0])throw new e("Invalid signature integer: negative");if(0===r[0]&&!(128&r[1]))throw new e("Invalid signature integer: unnecessary leading zero");return{d:xn(r),l:t.subarray(n+2)}},toSig(t){const{Err:e}=ft,n="string"==typeof t?mn(t):t;if(!(n instanceof Uint8Array))throw new Error("ui8a expected");let r=n.length;if(r<2||48!=n[0])throw new e("Invalid signature tag");if(n[1]!==r-2)throw new e("Invalid signature: incorrect length");const{d:o,l:s}=ft._parseInt(n.subarray(2)),{d:c,l:i}=ft._parseInt(s);if(i.length)throw new e("Invalid signature: left bytes after parsing");return{r:o,s:c}},hexFromSig(t){const e=u=>8&Number.parseInt(u[0],16)?"00"+u:u,n=u=>{const d=u.toString(16);return 1&d.length?`0${d}`:d},r=e(n(t.s)),o=e(n(t.r)),s=r.length/2,c=o.length/2,i=n(s),f=n(c);return`30${n(c+s+4)}02${f}${o}02${i}${r}`}},K=BigInt(0),N=BigInt(1),At=(BigInt(2),BigInt(3));function _n(t){const e=function Bn(t){const e=Ae(t);return pt(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}(t),{Fp:n,n:r}=e,o=n.BYTES+1,s=2*n.BYTES+1;function i(b){return k(b,r)}function f(b){return vt(b,r)}const{ProjectivePoint:u,normPrivateKeyToScalar:d,weierstrassEquation:a,isWithinCurveOrder:E}=function En(t){const e=function pn(t){const e=Ae(t);pt(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:n,Fp:r,a:o}=e;if(n){if(!r.eql(o,r.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!=typeof n||"bigint"!=typeof n.beta||"function"!=typeof n.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}(t),{Fp:n}=e,r=e.toBytes||((p,l,h)=>{const g=l.toAffine();return ct(Uint8Array.from([4]),n.toBytes(g.x),n.toBytes(g.y))}),o=e.fromBytes||(p=>{const l=p.subarray(1);return{x:n.fromBytes(l.subarray(0,n.BYTES)),y:n.fromBytes(l.subarray(n.BYTES,2*n.BYTES))}});function s(p){const{a:l,b:h}=e,g=n.sqr(p),w=n.mul(g,p);return n.add(n.add(w,n.mul(p,l)),h)}if(!n.eql(n.sqr(e.Gy),s(e.Gx)))throw new Error("bad generator point: equation left != right");function c(p){return"bigint"==typeof p&&Kn.eql(x,n.ZERO);return w(h)&&w(g)?a.ZERO:new a(h,g,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(l){const h=n.invertBatch(l.map(g=>g.pz));return l.map((g,w)=>g.toAffine(h[w])).map(a.fromAffine)}static fromHex(l){const h=a.fromAffine(o(C("pointHex",l)));return h.assertValidity(),h}static fromPrivateKey(l){return a.BASE.multiply(f(l))}_setWindowSize(l){this._WINDOW_SIZE=l,u.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!n.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:l,y:h}=this.toAffine();if(!n.isValid(l)||!n.isValid(h))throw new Error("bad point: x or y not FE");const g=n.sqr(h),w=s(l);if(!n.eql(g,w))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:l}=this.toAffine();if(n.isOdd)return!n.isOdd(l);throw new Error("Field doesn't support isOdd")}equals(l){d(l);const{px:h,py:g,pz:w}=this,{px:x,py:v,pz:S}=l,m=n.eql(n.mul(h,S),n.mul(x,w)),_=n.eql(n.mul(g,S),n.mul(v,w));return m&&_}negate(){return new a(this.px,n.neg(this.py),this.pz)}double(){const{a:l,b:h}=e,g=n.mul(h,At),{px:w,py:x,pz:v}=this;let S=n.ZERO,m=n.ZERO,_=n.ZERO,A=n.mul(w,w),$=n.mul(x,x),q=n.mul(v,v),O=n.mul(w,x);return O=n.add(O,O),_=n.mul(w,v),_=n.add(_,_),S=n.mul(l,_),m=n.mul(g,q),m=n.add(S,m),S=n.sub($,m),m=n.add($,m),m=n.mul(S,m),S=n.mul(O,S),_=n.mul(g,_),q=n.mul(l,q),O=n.sub(A,q),O=n.mul(l,O),O=n.add(O,_),_=n.add(A,A),A=n.add(_,A),A=n.add(A,q),A=n.mul(A,O),m=n.add(m,A),q=n.mul(x,v),q=n.add(q,q),A=n.mul(q,O),S=n.sub(S,A),_=n.mul(q,$),_=n.add(_,_),_=n.add(_,_),new a(S,m,_)}add(l){d(l);const{px:h,py:g,pz:w}=this,{px:x,py:v,pz:S}=l;let m=n.ZERO,_=n.ZERO,A=n.ZERO;const $=e.a,q=n.mul(e.b,At);let O=n.mul(h,x),V=n.mul(g,v),P=n.mul(w,S),nt=n.add(h,g),b=n.add(x,v);nt=n.mul(nt,b),b=n.add(O,V),nt=n.sub(nt,b),b=n.add(h,w);let y=n.add(x,S);return b=n.mul(b,y),y=n.add(O,P),b=n.sub(b,y),y=n.add(g,w),m=n.add(v,S),y=n.mul(y,m),m=n.add(V,P),y=n.sub(y,m),A=n.mul($,b),m=n.mul(q,P),A=n.add(m,A),m=n.sub(V,A),A=n.add(V,A),_=n.mul(m,A),V=n.add(O,O),V=n.add(V,O),P=n.mul($,P),b=n.mul(q,b),V=n.add(V,P),P=n.sub(O,P),P=n.mul($,P),b=n.add(b,P),O=n.mul(V,b),_=n.add(_,O),O=n.mul(y,b),m=n.mul(nt,m),m=n.sub(m,O),O=n.mul(nt,V),A=n.mul(y,A),A=n.add(A,O),new a(m,_,A)}subtract(l){return this.add(l.negate())}is0(){return this.equals(a.ZERO)}wNAF(l){return B.wNAFCached(this,u,l,h=>{const g=n.invertBatch(h.map(w=>w.pz));return h.map((w,x)=>w.toAffine(g[x])).map(a.fromAffine)})}multiplyUnsafe(l){const h=a.ZERO;if(l===K)return h;if(i(l),l===N)return this;const{endo:g}=e;if(!g)return B.unsafeLadder(this,l);let{k1neg:w,k1:x,k2neg:v,k2:S}=g.splitScalar(l),m=h,_=h,A=this;for(;x>K||S>K;)x&N&&(m=m.add(A)),S&N&&(_=_.add(A)),A=A.double(),x>>=N,S>>=N;return w&&(m=m.negate()),v&&(_=_.negate()),_=new a(n.mul(_.px,g.beta),_.py,_.pz),m.add(_)}multiply(l){i(l);let g,w,h=l;const{endo:x}=e;if(x){const{k1neg:v,k1:S,k2neg:m,k2:_}=x.splitScalar(h);let{p:A,f:$}=this.wNAF(S),{p:q,f:O}=this.wNAF(_);A=B.constTimeNegate(v,A),q=B.constTimeNegate(m,q),q=new a(n.mul(q.px,x.beta),q.py,q.pz),g=A.add(q),w=$.add(O)}else{const{p:v,f:S}=this.wNAF(h);g=v,w=S}return a.normalizeZ([g,w])[0]}multiplyAndAddUnsafe(l,h,g){const w=a.BASE,x=(S,m)=>m!==K&&m!==N&&S.equals(w)?S.multiply(m):S.multiplyUnsafe(m),v=x(this,h).add(x(l,g));return v.is0()?void 0:v}toAffine(l){const{px:h,py:g,pz:w}=this,x=this.is0();null==l&&(l=x?n.ONE:n.inv(w));const v=n.mul(h,l),S=n.mul(g,l),m=n.mul(w,l);if(x)return{x:n.ZERO,y:n.ZERO};if(!n.eql(m,n.ONE))throw new Error("invZ was invalid");return{x:v,y:S}}isTorsionFree(){const{h:l,isTorsionFree:h}=e;if(l===N)return!0;if(h)return h(a,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:l,clearCofactor:h}=e;return l===N?this:h?h(a,this):this.multiplyUnsafe(e.h)}toRawBytes(l=!0){return this.assertValidity(),r(a,this,l)}toHex(l=!0){return ut(this.toRawBytes(l))}}a.BASE=new a(e.Gx,e.Gy,n.ONE),a.ZERO=new a(n.ZERO,n.ONE,n.ZERO);const E=e.nBitLength,B=function yn(t,e){const n=(o,s)=>{const c=s.negate();return o?c:s},r=o=>({windows:Math.ceil(e/o)+1,windowSize:2**(o-1)});return{constTimeNegate:n,unsafeLadder(o,s){let c=t.ZERO,i=o;for(;s>wn;)s&Xt&&(c=c.add(i)),i=i.double(),s>>=Xt;return c},precomputeWindow(o,s){const{windows:c,windowSize:i}=r(s),f=[];let u=o,d=u;for(let a=0;a>=B,h>f&&(h-=E,c+=Xt);const g=l,w=l+Math.abs(h)-1,v=h<0;0===h?d=d.add(n(p%2!=0,s[g])):u=u.add(n(v,s[w]))}return{p:u,f:d}},wNAFCached(o,s,c,i){const f=o._WINDOW_SIZE||1;let u=s.get(o);return u||(u=this.precomputeWindow(o,f),1!==f&&s.set(o,i(u))),this.wNAF(f,u,c)}}}(a,e.endo?Math.ceil(E/2):E);return{CURVE:e,ProjectivePoint:a,normPrivateKeyToScalar:f,weierstrassEquation:s,isWithinCurveOrder:c}}({...e,toBytes(b,y,I){const T=y.toAffine(),U=n.toBytes(T.x),R=ct;return I?R(Uint8Array.from([y.hasEvenY()?2:3]),U):R(Uint8Array.from([4]),U,n.toBytes(T.y))},fromBytes(b){const y=b.length,I=b[0],T=b.subarray(1);if(y!==o||2!==I&&3!==I){if(y===s&&4===I)return{x:n.fromBytes(T.subarray(0,n.BYTES)),y:n.fromBytes(T.subarray(n.BYTES,2*n.BYTES))};throw new Error(`Point of length ${y} was invalid. Expected ${o} compressed bytes or ${s} uncompressed bytes`)}{const U=j(T);if(!function c(b){return Kut(Q(b,e.nByteLength));function p(b){return b>r>>N}const h=(b,y,I)=>j(b.slice(y,I));class g{constructor(y,I,T){this.r=y,this.s=I,this.recovery=T,this.assertValidity()}static fromCompact(y){const I=e.nByteLength;return y=C("compactSignature",y,2*I),new g(h(y,0,I),h(y,I,2*I))}static fromDER(y){const{r:I,s:T}=ft.toSig(C("DER",y));return new g(I,T)}assertValidity(){if(!E(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!E(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(y){return new g(this.r,this.s,y)}recoverPublicKey(y){const{r:I,s:T,recovery:U}=this,R=_(C("msgHash",y));if(null==U||![0,1,2,3].includes(U))throw new Error("recovery id invalid");const Z=2===U||3===U?I+e.n:I;if(Z>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const rt=u.fromHex((1&U?"03":"02")+B(Z)),ot=f(Z),ht=i(-R*ot),Et=i(T*ot),st=u.BASE.multiplyAndAddUnsafe(rt,ht,Et);if(!st)throw new Error("point at infinify");return st.assertValidity(),st}hasHighS(){return p(this.s)}normalizeS(){return this.hasHighS()?new g(this.r,i(-this.s),this.recovery):this}toDERRawBytes(){return lt(this.toDERHex())}toDERHex(){return ft.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return lt(this.toCompactHex())}toCompactHex(){return B(this.r)+B(this.s)}}const w={isValidPrivateKey(b){try{return d(b),!0}catch{return!1}},normPrivateKeyToScalar:d,randomPrivateKey:()=>{const b=Be(e.n);return function bn(t,e,n=!1){const r=t.length,o=Ee(e),s=Be(e);if(r<16||r1024)throw new Error(`expected ${s}-1024 bytes of input, got ${r}`);const i=k(n?j(t):zt(t),e-L)+L;return n?Kt(i,o):Q(i,o)}(e.randomBytes(b),e.n)},precompute:(b=8,y=u.BASE)=>(y._setWindowSize(b),y.multiply(BigInt(3)),y)};function v(b){const y=b instanceof Uint8Array,I="string"==typeof b,T=(y||I)&&b.length;return y?T===o||T===s:I?T===2*o||T===2*s:b instanceof u}const m=e.bits2int||function(b){const y=j(b),I=8*b.length-e.nBitLength;return I>0?y>>BigInt(I):y},_=e.bits2int_modN||function(b){return i(m(b))},A=Gt(e.nBitLength);function $(b){if("bigint"!=typeof b)throw new Error("bigint expected");if(!(K<=b&&bat in I))throw new Error("sign() legacy options not supported");const{hash:T,randomBytes:U}=e;let{lowS:R,prehash:Z,extraEntropy:D}=I;null==R&&(R=!0),b=C("msgHash",b),Z&&(b=C("prehashed msgHash",T(b)));const rt=_(b),ot=d(y),ht=[$(ot),$(rt)];if(null!=D){const at=!0===D?U(n.BYTES):D;ht.push(C("extraEntropy",at))}const Et=ct(...ht),st=rt;return{seed:Et,k2sig:function ae(at){const gt=m(at);if(!E(gt))return;const $e=f(gt),W=u.BASE.multiply(gt).toAffine(),bt=i(W.x);if(bt===K)return;const kt=i($e*i(st+bt*ot));if(kt===K)return;let je=(W.x===bt?0:2)|Number(W.y&N),Ve=kt;return R&&p(kt)&&(Ve=function l(b){return p(b)?i(-b):b}(kt),je^=1),new g(bt,Ve,je)}}}(b,y,I);return pe(e.hash.outputLen,e.nByteLength,e.hmac)(T,U)},verify:function nt(b,y,I,T=V){const U=b;if(y=C("msgHash",y),I=C("publicKey",I),"strict"in T)throw new Error("options.strict was renamed to lowS");const{lowS:R,prehash:Z}=T;let D,rt;try{if("string"==typeof U||U instanceof Uint8Array)try{D=g.fromDER(U)}catch(W){if(!(W instanceof ft.Err))throw W;D=g.fromCompact(U)}else{if("object"!=typeof U||"bigint"!=typeof U.r||"bigint"!=typeof U.s)throw new Error("PARSE");{const{r:W,s:bt}=U;D=new g(W,bt)}}rt=u.fromHex(I)}catch(W){if("PARSE"===W.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(R&&D.hasHighS())return!1;Z&&(y=e.hash(y));const{r:ot,s:ht}=D,Et=_(y),st=f(ht),ae=i(Et*st),at=i(ot*st),gt=u.BASE.multiplyAndAddUnsafe(rt,ae,at)?.toAffine();return!!gt&&i(gt.x)===ot},ProjectivePoint:u,Signature:g,utils:w}}function An(t){return{hash:t,hmac:(e,...n)=>ve(t,e,function Ke(...t){const e=new Uint8Array(t.reduce((r,o)=>r+o.length,0));let n=0;return t.forEach(r=>{if(!Vt(r))throw new Error("Uint8Array expected");e.set(r,n),n+=r.length}),e}(...n)),randomBytes:he}}BigInt(4);const St=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),It=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Ie=BigInt(1),Ot=BigInt(2),Oe=(t,e)=>(t+e/Ot)/e;function Le(t){const e=St,n=BigInt(3),r=BigInt(6),o=BigInt(11),s=BigInt(22),c=BigInt(23),i=BigInt(44),f=BigInt(88),u=t*t*t%e,d=u*u*t%e,a=z(d,n,e)*d%e,E=z(a,n,e)*d%e,B=z(E,Ot,e)*u%e,p=z(B,o,e)*B%e,l=z(p,s,e)*p%e,h=z(l,i,e)*l%e,g=z(h,f,e)*h%e,w=z(g,i,e)*l%e,x=z(w,n,e)*d%e,v=z(x,c,e)*p%e,S=z(v,r,e)*u%e,m=z(S,Ot,e);if(!Qt.eql(Qt.sqr(m),t))throw new Error("Cannot find square root");return m}const Qt=function gn(t,e,n=!1,r={}){if(t<=H)throw new Error(`Expected Field ORDER > 0, got ${t}`);const{nBitLength:o,nByteLength:s}=Yt(t,e);if(s>2048)throw new Error("Field lengths over 2048 bytes are not supported");const c=function an(t){if(t%Wt===rn){const e=(t+L)/Wt;return function(r,o){const s=r.pow(o,e);if(!r.eql(r.sqr(s),o))throw new Error("Cannot find square root");return s}}if(t%me===xe){const e=(t-xe)/me;return function(r,o){const s=r.mul(o,J),c=r.pow(s,e),i=r.mul(o,c),f=r.mul(r.mul(i,J),c),u=r.mul(i,r.sub(f,r.ONE));if(!r.eql(r.sqr(u),o))throw new Error("Cannot find square root");return u}}return function fn(t){const e=(t-L)/J;let n,r,o;for(n=t-L,r=0;n%J===H;n/=J,r++);for(o=J;ok(f,t),isValid:f=>{if("bigint"!=typeof f)throw new Error("Invalid field element: expected bigint, got "+typeof f);return H<=f&&ff===H,isOdd:f=>(f&L)===L,neg:f=>k(-f,t),eql:(f,u)=>f===u,sqr:f=>k(f*f,t),add:(f,u)=>k(f+u,t),sub:(f,u)=>k(f-u,t),mul:(f,u)=>k(f*u,t),pow:(f,u)=>function dn(t,e,n){if(n 0");if(n===H)return t.ONE;if(n===L)return e;let r=t.ONE,o=e;for(;n>H;)n&L&&(r=t.mul(r,o)),o=t.sqr(o),n>>=L;return r}(i,f,u),div:(f,u)=>k(f*vt(u,t),t),sqrN:f=>f*f,addN:(f,u)=>f+u,subN:(f,u)=>f-u,mulN:(f,u)=>f*u,inv:f=>vt(f,t),sqrt:r.sqrt||(f=>c(i,f)),invertBatch:f=>function hn(t,e){const n=new Array(e.length),r=e.reduce((s,c,i)=>t.is0(c)?s:(n[i]=s,t.mul(s,c)),t.ONE),o=t.inv(r);return e.reduceRight((s,c,i)=>t.is0(c)?s:(n[i]=t.mul(s,n[i]),t.mul(s,c)),o),n}(i,f),cmov:(f,u,d)=>d?u:f,toBytes:f=>n?Kt(f,s):Q(f,s),fromBytes:f=>{if(f.length!==s)throw new Error(`Fp.fromBytes: expected ${s}, got ${f.length}`);return n?zt(f):j(f)}});return Object.freeze(i)}(St,void 0,void 0,{sqrt:Le}),Jt=function Sn(t,e){const n=r=>_n({...t,...An(r)});return Object.freeze({...n(e),create:n})}({a:BigInt(0),b:BigInt(7),Fp:Qt,n:It,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=It,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-Ie*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=n,c=BigInt("0x100000000000000000000000000000000"),i=Oe(s*t,e),f=Oe(-r*t,e);let u=k(t-i*n-f*o,e),d=k(-i*r-f*s,e);const a=u>c,E=d>c;if(a&&(u=e-u),E&&(d=e-d),u>c||d>c)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:a,k1:u,k2neg:E,k2:d}}}},Dt),Lt=BigInt(0),Ue=t=>"bigint"==typeof t&&Lto.charCodeAt(0)));n=ct(r,r),Te[t]=n}return Dt(ct(n,...e))}const Ft=t=>t.toRawBytes(!0).slice(1),te=t=>Q(t,32),ee=t=>k(t,St),xt=t=>k(t,It),ne=Jt.ProjectivePoint;function re(t){let e=Jt.utils.normPrivateKeyToScalar(t),n=ne.fromPrivateKey(e);return{scalar:n.hasEvenY()?e:xt(-e),bytes:Ft(n)}}function qe(t){if(!Ue(t))throw new Error("bad x: need 0 < x < p");const e=ee(t*t);let r=Le(ee(e*t+BigInt(7)));r%Ot!==Lt&&(r=ee(-r));const o=new ne(t,r,Ie);return o.assertValidity(),o}function Ne(...t){return xt(j(Ut("BIP0340/challenge",...t)))}function He(t,e,n){const r=C("signature",t,64),o=C("message",e),s=C("publicKey",n,32);try{const c=qe(j(s)),i=j(r.subarray(0,32));if(!Ue(i))return!1;const f=j(r.subarray(32,64));if(!(t=>"bigint"==typeof t&&Ltne.BASE.multiplyAndAddUnsafe(t,e,n))(c,f,xt(-u));return!(!d||!d.hasEvenY()||d.toAffine().x!==i)}catch{return!1}}const mt={getPublicKey:function Ln(t){return re(t).bytes},sign:function Un(t,e,n=he(32)){const r=C("message",t),{bytes:o,scalar:s}=re(e),c=C("auxRand",n,32),i=te(s^j(Ut("BIP0340/aux",c))),f=Ut("BIP0340/nonce",i,o,r),u=xt(j(f));if(u===Lt)throw new Error("sign failed: k is zero");const{bytes:d,scalar:a}=re(u),E=Ne(d,o,r),B=new Uint8Array(64);if(B.set(d,0),B.set(te(xt(a+E*s)),32),!He(B,r,o))throw new Error("sign: Invalid signature produced");return B},verify:He,utils:{randomPrivateKey:Jt.utils.randomPrivateKey,lift_x:qe,pointToBytes:Ft,numberToBytesBE:Q,bytesToNumberBE:j,taggedHash:Ut,mod:k}},oe=("object"==typeof globalThis&&"crypto"in globalThis&&globalThis,t=>t instanceof Uint8Array),se=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),M=(t,e)=>t<<32-e|t>>>e;if(68!==new Uint8Array(new Uint32Array([287454020]).buffer)[0])throw new Error("Non little-endian hardware is not supported");const Tn=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function Tt(t){if(!oe(t))throw new Error("Uint8Array expected");let e="";for(let n=0;nt().update(qt(r)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}function Re(t,...e){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}const fe_exists=function $n(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")},fe_output=function jn(t,e){Re(t);const n=e.outputLen;if(t.lengtho-c&&(this.process(r,0),c=0);for(let a=c;a>o&s),i=Number(n&s),u=r?0:4;t.setUint32(e+(r?4:0),c,r),t.setUint32(e+u,i,r)})(r,o-8,BigInt(8*this.length),s),this.process(r,0);const i=se(e),f=this.outputLen;if(f%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=f/4,d=this.get();if(u>d.length)throw new Error("_sha2: outputLen bigger than state");for(let a=0;at&e^~t&n,Dn=(t,e,n)=>t&e^t&n^e&n,zn=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),tt=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),et=new Uint32Array(64);class Ce extends Pn{constructor(){super(64,32,8,!1),this.A=0|tt[0],this.B=0|tt[1],this.C=0|tt[2],this.D=0|tt[3],this.E=0|tt[4],this.F=0|tt[5],this.G=0|tt[6],this.H=0|tt[7]}get(){const{A:e,B:n,C:r,D:o,E:s,F:c,G:i,H:f}=this;return[e,n,r,o,s,c,i,f]}set(e,n,r,o,s,c,i,f){this.A=0|e,this.B=0|n,this.C=0|r,this.D=0|o,this.E=0|s,this.F=0|c,this.G=0|i,this.H=0|f}process(e,n){for(let a=0;a<16;a++,n+=4)et[a]=e.getUint32(n,!1);for(let a=16;a<64;a++){const E=et[a-15],B=et[a-2],p=M(E,7)^M(E,18)^E>>>3,l=M(B,17)^M(B,19)^B>>>10;et[a]=l+et[a-7]+p+et[a-16]|0}let{A:r,B:o,C:s,D:c,E:i,F:f,G:u,H:d}=this;for(let a=0;a<64;a++){const B=d+(M(i,6)^M(i,11)^M(i,25))+Zn(i,f,u)+zn[a]+et[a]|0,l=(M(r,2)^M(r,13)^M(r,22))+Dn(r,o,s)|0;d=u,u=f,f=i,i=c+B|0,c=s,s=o,o=r,r=B+l|0}r=r+this.A|0,o=o+this.B|0,s=s+this.C|0,c=c+this.D|0,i=i+this.E|0,f=f+this.F|0,u=u+this.G|0,d=d+this.H|0,this.set(r,o,s,c,i,f,u,d)}roundClean(){et.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class Kn extends Ce{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}const Gn=ke(()=>new Ce);ke(()=>new Kn);var dt=Symbol("verified"),Mn=t=>t instanceof Object;new TextDecoder("utf-8");var Yn=new TextEncoder;function Nt(t){return Tt(Gn(Yn.encode(function Qn(t){if(!function Wn(t){if(!Mn(t)||"number"!=typeof t.kind||"string"!=typeof t.content||"number"!=typeof t.created_at||"string"!=typeof t.pubkey||!t.pubkey.match(/^[a-f0-9]{64}$/)||!Array.isArray(t.tags))return!1;for(let e=0;e{const e=function Fn(t,e){let n=0;const r=t,o=["nonce",n.toString(),e.toString()];for(r.tags.push(o);;){const s=Math.floor((new Date).getTime()/1e3);if(s!==r.created_at&&(n=0,r.created_at=s),o[1]=(++n).toString(),r.id=Nt(r),Jn(r.id)>=e)break}return r}(t,10);postMessage({data:e})})})(); \ No newline at end of file diff --git a/docs/index.html b/docs/index.html old mode 100644 new mode 100755 index 979a281..91d089e --- a/docs/index.html +++ b/docs/index.html @@ -35,8 +35,8 @@ - + - + diff --git a/docs/main.9efb7f0519389c38.js b/docs/main.9efb7f0519389c38.js deleted file mode 100644 index d169a69..0000000 --- a/docs/main.9efb7f0519389c38.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkomeglestr=self.webpackChunkomeglestr||[]).push([[792],{45:(zp,Sb,pc)=>{var gc={};pc.r(gc),pc.d(gc,{OG:()=>o0,My:()=>Da,Ph:()=>wn,lX:()=>r0,Id:()=>Gs,fg:()=>NA,qj:()=>Zt,aT:()=>Ca,lq:()=>Yi,z:()=>s0,Q5:()=>Bl});var qp={};function Ib(e,t,r,i,s,o,a){try{var c=e[o](a),l=c.value}catch(u){return void r(u)}c.done?t(l):Promise.resolve(l).then(i,s)}function $(e){return function(){var t=this,r=arguments;return new Promise(function(i,s){var o=e.apply(t,r);function a(l){Ib(o,i,s,a,c,"next",l)}function c(l){Ib(o,i,s,a,c,"throw",l)}a(void 0)})}}pc.r(qp),pc.d(qp,{aK:()=>ro,e8:()=>Ua,DO:()=>Xl,dJ:()=>zN,OG:()=>Tw,My:()=>ja,Ph:()=>no,lX:()=>Cw,Id:()=>eu,fg:()=>GN,qj:()=>gr,aT:()=>Va,r4:()=>Wh,aY:()=>to,x:()=>Aw,lq:()=>Ha,z:()=>Sw,zW:()=>$a,Q5:()=>tu});let wt=null,mc=!1,Hu=1;const Er=Symbol("SIGNAL");function me(e){const t=wt;return wt=e,t}const Tb={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function Gp(e){if(mc)throw new Error("");if(null===wt)return;wt.consumerOnSignalRead(e);const t=wt.nextProducerIndex++;mo(wt),t0}function mo(e){e.producerNode??=[],e.producerIndexOfThis??=[],e.producerLastReadVersion??=[]}function Lb(e){e.liveConsumerNode??=[],e.liveConsumerIndexOfThis??=[]}let Fb=function fk(){throw new Error};function Bb(){Fb()}let Zp=null;function Ub(e,t){Mb()||Bb(),e.equal(e.value,t)||(e.value=t,function yk(e){e.version++,function lk(){Hu++}(),Ab(e),Zp?.()}(e))}const mk={...Tb,equal:function ok(e,t){return Object.is(e,t)},value:void 0};function nt(e){return"function"==typeof e}function qu(e){const r=e(i=>{Error.call(i),i.stack=(new Error).stack});return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}const Kp=qu(e=>function(r){e(this),this.message=r?`${r.length} errors occurred during unsubscription:\n${r.map((i,s)=>`${s+1}) ${i.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=r});function Gu(e,t){if(e){const r=e.indexOf(t);0<=r&&e.splice(r,1)}}class Rt{constructor(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=!0;const{_parentage:r}=this;if(r)if(this._parentage=null,Array.isArray(r))for(const o of r)o.remove(this);else r.remove(this);const{initialTeardown:i}=this;if(nt(i))try{i()}catch(o){t=o instanceof Kp?o.errors:[o]}const{_finalizers:s}=this;if(s){this._finalizers=null;for(const o of s)try{Hb(o)}catch(a){t=t??[],a instanceof Kp?t=[...t,...a.errors]:t.push(a)}}if(t)throw new Kp(t)}}add(t){var r;if(t&&t!==this)if(this.closed)Hb(t);else{if(t instanceof Rt){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(t)}}_hasParent(t){const{_parentage:r}=this;return r===t||Array.isArray(r)&&r.includes(t)}_addParent(t){const{_parentage:r}=this;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t}_removeParent(t){const{_parentage:r}=this;r===t?this._parentage=null:Array.isArray(r)&&Gu(r,t)}remove(t){const{_finalizers:r}=this;r&&Gu(r,t),t instanceof Rt&&t._removeParent(this)}}Rt.EMPTY=(()=>{const e=new Rt;return e.closed=!0,e})();const $b=Rt.EMPTY;function Vb(e){return e instanceof Rt||e&&"closed"in e&&nt(e.remove)&&nt(e.add)&&nt(e.unsubscribe)}function Hb(e){nt(e)?e():e.unsubscribe()}const Es={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Wu={setTimeout(e,t,...r){const{delegate:i}=Wu;return i?.setTimeout?i.setTimeout(e,t,...r):setTimeout(e,t,...r)},clearTimeout(e){const{delegate:t}=Wu;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function zb(e){Wu.setTimeout(()=>{const{onUnhandledError:t}=Es;if(!t)throw e;t(e)})}function Qp(){}const wk=Yp("C",void 0,void 0);function Yp(e,t,r){return{kind:e,value:t,error:r}}let Ds=null;function Zu(e){if(Es.useDeprecatedSynchronousErrorHandling){const t=!Ds;if(t&&(Ds={errorThrown:!1,error:null}),e(),t){const{errorThrown:r,error:i}=Ds;if(Ds=null,r)throw i}}else e()}class Jp extends Rt{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,Vb(t)&&t.add(this)):this.destination=Ik}static create(t,r,i){return new eg(t,r,i)}next(t){this.isStopped?tg(function bk(e){return Yp("N",e,void 0)}(t),this):this._next(t)}error(t){this.isStopped?tg(function _k(e){return Yp("E",void 0,e)}(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?tg(wk,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(t){this.destination.next(t)}_error(t){try{this.destination.error(t)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const Dk=Function.prototype.bind;function Xp(e,t){return Dk.call(e,t)}class Ck{constructor(t){this.partialObserver=t}next(t){const{partialObserver:r}=this;if(r.next)try{r.next(t)}catch(i){Ku(i)}}error(t){const{partialObserver:r}=this;if(r.error)try{r.error(t)}catch(i){Ku(i)}else Ku(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(r){Ku(r)}}}class eg extends Jp{constructor(t,r,i){let s;if(super(),nt(t)||!t)s={next:t??void 0,error:r??void 0,complete:i??void 0};else{let o;this&&Es.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=()=>this.unsubscribe(),s={next:t.next&&Xp(t.next,o),error:t.error&&Xp(t.error,o),complete:t.complete&&Xp(t.complete,o)}):s=t}this.destination=new Ck(s)}}function Ku(e){Es.useDeprecatedSynchronousErrorHandling?function Ek(e){Es.useDeprecatedSynchronousErrorHandling&&Ds&&(Ds.errorThrown=!0,Ds.error=e)}(e):zb(e)}function tg(e,t){const{onStoppedNotification:r}=Es;r&&Wu.setTimeout(()=>r(e,t))}const Ik={closed:!0,next:Qp,error:function Sk(e){throw e},complete:Qp},ng="function"==typeof Symbol&&Symbol.observable||"@@observable";function Cs(e){return e}function qb(e){return 0===e.length?Cs:1===e.length?e[0]:function(r){return e.reduce((i,s)=>s(i),r)}}let Ot=(()=>{class e{constructor(r){r&&(this._subscribe=r)}lift(r){const i=new e;return i.source=this,i.operator=r,i}subscribe(r,i,s){const o=function Ak(e){return e&&e instanceof Jp||function xk(e){return e&&nt(e.next)&&nt(e.error)&&nt(e.complete)}(e)&&Vb(e)}(r)?r:new eg(r,i,s);return Zu(()=>{const{operator:a,source:c}=this;o.add(a?a.call(o,c):c?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(r){try{return this._subscribe(r)}catch(i){r.error(i)}}forEach(r,i){return new(i=Gb(i))((s,o)=>{const a=new eg({next:c=>{try{r(c)}catch(l){o(l),a.unsubscribe()}},error:o,complete:s});this.subscribe(a)})}_subscribe(r){var i;return null===(i=this.source)||void 0===i?void 0:i.subscribe(r)}[ng](){return this}pipe(...r){return qb(r)(this)}toPromise(r){return new(r=Gb(r))((i,s)=>{let o;this.subscribe(a=>o=a,a=>s(a),()=>i(o))})}}return e.create=t=>new e(t),e})();function Gb(e){var t;return null!==(t=e??Es.Promise)&&void 0!==t?t:Promise}const Mk=qu(e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let ot=(()=>{class e extends Ot{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(r){const i=new Wb(this,this);return i.operator=r,i}_throwIfClosed(){if(this.closed)throw new Mk}next(r){Zu(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const i of this.currentObservers)i.next(r)}})}error(r){Zu(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=r;const{observers:i}=this;for(;i.length;)i.shift().error(r)}})}complete(){Zu(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:r}=this;for(;r.length;)r.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var r;return(null===(r=this.observers)||void 0===r?void 0:r.length)>0}_trySubscribe(r){return this._throwIfClosed(),super._trySubscribe(r)}_subscribe(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)}_innerSubscribe(r){const{hasError:i,isStopped:s,observers:o}=this;return i||s?$b:(this.currentObservers=null,o.push(r),new Rt(()=>{this.currentObservers=null,Gu(o,r)}))}_checkFinalizedStatuses(r){const{hasError:i,thrownError:s,isStopped:o}=this;i?r.error(s):o&&r.complete()}asObservable(){const r=new Ot;return r.source=this,r}}return e.create=(t,r)=>new Wb(t,r),e})();class Wb extends ot{constructor(t,r){super(),this.destination=t,this.source=r}next(t){var r,i;null===(i=null===(r=this.destination)||void 0===r?void 0:r.next)||void 0===i||i.call(r,t)}error(t){var r,i;null===(i=null===(r=this.destination)||void 0===r?void 0:r.error)||void 0===i||i.call(r,t)}complete(){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===r||r.call(t)}_subscribe(t){var r,i;return null!==(i=null===(r=this.source)||void 0===r?void 0:r.subscribe(t))&&void 0!==i?i:$b}}class jn extends ot{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){const r=super._subscribe(t);return!r.closed&&t.next(this._value),r}getValue(){const{hasError:t,thrownError:r,_value:i}=this;if(t)throw r;return this._throwIfClosed(),i}next(t){super.next(this._value=t)}}function Zb(e){return nt(e?.lift)}function Nt(e){return t=>{if(Zb(t))return t.lift(function(r){try{return e(r,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function _t(e,t,r,i,s){return new Nk(e,t,r,i,s)}class Nk extends Jp{constructor(t,r,i,s,o,a){super(t),this.onFinalize=o,this.shouldUnsubscribe=a,this._next=r?function(c){try{r(c)}catch(l){t.error(l)}}:super._next,this._error=s?function(c){try{s(c)}catch(l){t.error(l)}finally{this.unsubscribe()}}:super._error,this._complete=i?function(){try{i()}catch(c){t.error(c)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:r}=this;super.unsubscribe(),!r&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}}}function Ue(e,t){return Nt((r,i)=>{let s=0;r.subscribe(_t(i,o=>{i.next(e.call(t,o,s++))}))})}const Kb="https://g.co/ng/security#xss";class M extends Error{constructor(t,r){super(function yo(e,t){return`NG0${Math.abs(e)}${t?": "+t:""}`}(t,r)),this.code=t}}function ii(e){return{toString:e}.toString()}const wo="__parameters__";function bo(e,t,r){return ii(()=>{const i=function rg(e){return function(...r){if(e){const i=e(...r);for(const s in i)this[s]=i[s]}}}(t);function s(...o){if(this instanceof s)return i.apply(this,o),this;const a=new s(...o);return c.annotation=a,c;function c(l,u,d){const f=l.hasOwnProperty(wo)?l[wo]:Object.defineProperty(l,wo,{value:[]})[wo];for(;f.length<=d;)f.push(null);return(f[d]=f[d]||[]).push(a),l}}return r&&(s.prototype=Object.create(r.prototype)),s.prototype.ngMetadataName=e,s.annotationCls=s,s})}const Pe=globalThis;function Fe(e){for(let t in e)if(e[t]===Fe)return t;throw Error("Could not find renamed property on target object.")}function bt(e){if("string"==typeof e)return e;if(Array.isArray(e))return"["+e.map(bt).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return`${e.overriddenName}`;if(e.name)return`${e.name}`;const t=e.toString();if(null==t)return""+t;const r=t.indexOf("\n");return-1===r?t:t.substring(0,r)}function ig(e,t){return null==e||""===e?null===t?"":t:null==t||""===t?e:e+" "+t}const Ok=Fe({__forward_ref__:Fe});function sg(e){return e.__forward_ref__=sg,e.toString=function(){return bt(this())},e}function re(e){return Yu(e)?e():e}function Yu(e){return"function"==typeof e&&e.hasOwnProperty(Ok)&&e.__forward_ref__===sg}function z(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function Jt(e){return{providers:e.providers||[],imports:e.imports||[]}}function Ju(e){return Xb(e,ed)||Xb(e,eE)}function Xb(e,t){return e.hasOwnProperty(t)?e[t]:null}function Xu(e){return e&&(e.hasOwnProperty(og)||e.hasOwnProperty(Uk))?e[og]:null}const ed=Fe({\u0275prov:Fe}),og=Fe({\u0275inj:Fe}),eE=Fe({ngInjectableDef:Fe}),Uk=Fe({ngInjectorDef:Fe});class K{constructor(t,r){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof r?this.__NG_ELEMENT_ID__=r:void 0!==r&&(this.\u0275prov=z({token:this,providedIn:r.providedIn||"root",factory:r.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function dg(e){return e&&!!e.\u0275providers}const vc=Fe({\u0275cmp:Fe}),fg=Fe({\u0275dir:Fe}),hg=Fe({\u0275pipe:Fe}),nE=Fe({\u0275mod:Fe}),si=Fe({\u0275fac:Fe}),wc=Fe({__NG_ELEMENT_ID__:Fe}),rE=Fe({__NG_ENV_ID__:Fe});function de(e){return"string"==typeof e?e:null==e?"":String(e)}function pg(e,t){throw new M(-201,!1)}var Ee=function(e){return e[e.Default=0]="Default",e[e.Host=1]="Host",e[e.Self=2]="Self",e[e.SkipSelf=4]="SkipSelf",e[e.Optional=8]="Optional",e}(Ee||{});let gg;function iE(){return gg}function fn(e){const t=gg;return gg=e,t}function sE(e,t,r){const i=Ju(e);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:r&Ee.Optional?null:void 0!==t?t:void pg()}const _c={},mg="__NG_DI_FLAG__",td="ngTempTokenPath",qk=/\n/gm,oE="__source";let Eo;function Bi(e){const t=Eo;return Eo=e,t}function Zk(e,t=Ee.Default){if(void 0===Eo)throw new M(-203,!1);return null===Eo?sE(e,void 0,t):Eo.get(e,t&Ee.Optional?null:void 0,t)}function G(e,t=Ee.Default){return(iE()||Zk)(re(e),t)}function P(e,t=Ee.Default){return G(e,nd(t))}function nd(e){return typeof e>"u"||"number"==typeof e?e:(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function yg(e){const t=[];for(let r=0;rArray.isArray(r)?Do(r,t):t(r))}function cE(e,t,r){t>=e.length?e.push(r):e.splice(t,0,r)}function sd(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function Tn(e,t,r){let i=Co(e,t);return i>=0?e[1|i]=r:(i=~i,function lE(e,t,r,i){let s=e.length;if(s==t)e.push(r,i);else if(1===s)e.push(i,e[0]),e[0]=r;else{for(s--,e.push(e[s-1],e[s]);s>t;)e[s]=e[s-2],s--;e[t]=r,e[t+1]=i}}(e,i,t,r)),i}function wg(e,t){const r=Co(e,t);if(r>=0)return e[1|r]}function Co(e,t){return function uE(e,t,r){let i=0,s=e.length>>r;for(;s!==i;){const o=i+(s-i>>1),a=e[o<t?s=o:i=o+1}return~(s<t){a=o-1;break}}}for(;o-1){let o;for(;++so?"":s[d+1].toLowerCase(),2&i&&u!==f){if(er(i))return!1;a=!0}}}}else{if(!a&&!er(i)&&!er(l))return!1;if(a&&er(l))continue;a=!1,i=l|1&i}}return er(i)||a}function er(e){return!(1&e)}function oP(e,t,r,i){if(null===t)return-1;let s=0;if(i||!r){let o=!1;for(;s-1)for(r++;r0?'="'+c+'"':"")+"]"}else 8&i?s+="."+a:4&i&&(s+=" "+a);else""!==s&&!er(a)&&(t+=yE(o,s),s=""),i=a,o=o||!er(i);r++}return""!==s&&(t+=yE(o,s)),t}function So(e){return ii(()=>{const t=wE(e),r={...t,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===cd.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||Jn.Emulated,styles:e.styles||Me,_:null,schemas:e.schemas||null,tView:null,id:""};_E(r);const i=e.dependencies;return r.directiveDefs=ld(i,!1),r.pipeDefs=ld(i,!0),r.id=function yP(e){let t=0;const r=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,e.consts,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery].join("|");for(const s of r)t=Math.imul(31,t)+s.charCodeAt(0)|0;return t+=2147483648,"c"+t}(r),r})}function pP(e){return we(e)||Et(e)}function gP(e){return null!==e}function pn(e){return ii(()=>({type:e.type,bootstrap:e.bootstrap||Me,declarations:e.declarations||Me,imports:e.imports||Me,exports:e.exports||Me,transitiveCompileScopes:null,schemas:e.schemas||null,id:e.id||null}))}function vE(e,t){if(null==e)return Dr;const r={};for(const i in e)if(e.hasOwnProperty(i)){const s=e[i];let o,a,c=Xn.None;Array.isArray(s)?(c=s[0],o=s[1],a=s[2]??o):(o=s,a=s),t?(r[o]=c!==Xn.None?[i,c]:i,t[o]=a):r[o]=i}return r}function Xt(e){return ii(()=>{const t=wE(e);return _E(t),t})}function en(e){return{type:e.type,name:e.name,factory:null,pure:!1!==e.pure,standalone:!0===e.standalone,onDestroy:e.type.prototype.ngOnDestroy||null}}function we(e){return e[vc]||null}function Et(e){return e[fg]||null}function kt(e){return e[hg]||null}function jt(e,t){const r=e[nE]||null;if(!r&&!0===t)throw new Error(`Type ${bt(e)} does not have '\u0275mod' property.`);return r}function wE(e){const t={};return{type:e.type,providersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputTransforms:null,inputConfig:e.inputs||Dr,exportAs:e.exportAs||null,standalone:!0===e.standalone,signals:!0===e.signals,selectors:e.selectors||Me,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:vE(e.inputs,t),outputs:vE(e.outputs),debugInfo:null}}function _E(e){e.features?.forEach(t=>t(e))}function ld(e,t){if(!e)return null;const r=t?kt:pP;return()=>("function"==typeof e?e():e).map(i=>r(i)).filter(gP)}function vP(...e){return{\u0275providers:Dg(0,e),\u0275fromNgModule:!0}}function Dg(e,...t){const r=[],i=new Set;let s;const o=a=>{r.push(a)};return Do(t,a=>{const c=a;ud(c,o,[],i)&&(s||=[],s.push(c))}),void 0!==s&&bE(s,o),r}function bE(e,t){for(let r=0;r{t(o,i)})}}function ud(e,t,r,i){if(!(e=re(e)))return!1;let s=null,o=Xu(e);const a=!o&&we(e);if(o||a){if(a&&!a.standalone)return!1;s=e}else{const l=e.ngModule;if(o=Xu(l),!o)return!1;s=l}const c=i.has(s);if(a){if(c)return!1;if(i.add(s),a.dependencies){const l="function"==typeof a.dependencies?a.dependencies():a.dependencies;for(const u of l)ud(u,t,r,i)}}else{if(!o)return!1;{if(null!=o.imports&&!c){let u;i.add(s);try{Do(o.imports,d=>{ud(d,t,r,i)&&(u||=[],u.push(d))})}finally{}void 0!==u&&bE(u,t)}if(!c){const u=Ss(s)||(()=>new s);t({provide:s,useFactory:u,deps:Me},s),t({provide:_g,useValue:s,multi:!0},s),t({provide:Is,useValue:()=>G(s),multi:!0},s)}const l=o.providers;if(null!=l&&!c){const u=e;Cg(l,d=>{t(d,u)})}}}return s!==e&&void 0!==e.providers}function Cg(e,t){for(let r of e)dg(r)&&(r=r.\u0275providers),Array.isArray(r)?Cg(r,t):t(r)}const wP=Fe({provide:String,useValue:Fe});function Sg(e){return null!==e&&"object"==typeof e&&wP in e}function Ts(e){return"function"==typeof e}const Ig=new K(""),dd={},bP={};let Tg;function fd(){return void 0===Tg&&(Tg=new ad),Tg}class gn{}class Io extends gn{get destroyed(){return this._destroyed}constructor(t,r,i,s){super(),this.parent=r,this.source=i,this.scopes=s,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,Ag(t,a=>this.processProvider(a)),this.records.set(dE,To(void 0,this)),s.has("environment")&&this.records.set(gn,To(void 0,this));const o=this.records.get(Ig);null!=o&&"string"==typeof o.value&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(_g,Me,Ee.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;const t=me(null);try{for(const i of this._ngOnDestroyHooks)i.ngOnDestroy();const r=this._onDestroyHooks;this._onDestroyHooks=[];for(const i of r)i()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),me(t)}}onDestroy(t){return this.assertNotDestroyed(),this._onDestroyHooks.push(t),()=>this.removeOnDestroy(t)}runInContext(t){this.assertNotDestroyed();const r=Bi(this),i=fn(void 0);try{return t()}finally{Bi(r),fn(i)}}get(t,r=_c,i=Ee.Default){if(this.assertNotDestroyed(),t.hasOwnProperty(rE))return t[rE](this);i=nd(i);const o=Bi(this),a=fn(void 0);try{if(!(i&Ee.SkipSelf)){let l=this.records.get(t);if(void 0===l){const u=function IP(e){return"function"==typeof e||"object"==typeof e&&e instanceof K}(t)&&Ju(t);l=u&&this.injectableDefInScope(u)?To(xg(t),dd):null,this.records.set(t,l)}if(null!=l)return this.hydrate(t,l)}return(i&Ee.Self?fd():this.parent).get(t,r=i&Ee.Optional&&r===_c?null:r)}catch(c){if("NullInjectorError"===c.name){if((c[td]=c[td]||[]).unshift(bt(t)),o)throw c;return function Qk(e,t,r,i){const s=e[td];throw t[oE]&&s.unshift(t[oE]),e.message=function Yk(e,t,r,i=null){e=e&&"\n"===e.charAt(0)&&"\u0275"==e.charAt(1)?e.slice(2):e;let s=bt(t);if(Array.isArray(t))s=t.map(bt).join(" -> ");else if("object"==typeof t){let o=[];for(let a in t)if(t.hasOwnProperty(a)){let c=t[a];o.push(a+":"+("string"==typeof c?JSON.stringify(c):bt(c)))}s=`{${o.join(", ")}}`}return`${r}${i?"("+i+")":""}[${s}]: ${e.replace(qk,"\n ")}`}("\n"+e.message,s,r,i),e.ngTokenPath=s,e[td]=null,e}(c,t,"R3InjectorError",this.source)}throw c}finally{fn(a),Bi(o)}}resolveInjectorInitializers(){const t=me(null),r=Bi(this),i=fn(void 0);try{const o=this.get(Is,Me,Ee.Self);for(const a of o)a()}finally{Bi(r),fn(i),me(t)}}toString(){const t=[],r=this.records;for(const i of r.keys())t.push(bt(i));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new M(205,!1)}processProvider(t){let r=Ts(t=re(t))?t:re(t&&t.provide);const i=function DP(e){return Sg(e)?To(void 0,e.useValue):To(function CE(e,t,r){let i;if(Ts(e)){const s=re(e);return Ss(s)||xg(s)}if(Sg(e))i=()=>re(e.useValue);else if(function DE(e){return!(!e||!e.useFactory)}(e))i=()=>e.useFactory(...yg(e.deps||[]));else if(function EE(e){return!(!e||!e.useExisting)}(e))i=()=>G(re(e.useExisting));else{const s=re(e&&(e.useClass||e.provide));if(!function CP(e){return!!e.deps}(e))return Ss(s)||xg(s);i=()=>new s(...yg(e.deps))}return i}(e),dd)}(t);if(!Ts(t)&&!0===t.multi){let s=this.records.get(r);s||(s=To(void 0,dd,!0),s.factory=()=>yg(s.multi),this.records.set(r,s)),r=t,s.multi.push(t)}this.records.set(r,i)}hydrate(t,r){const i=me(null);try{return r.value===dd&&(r.value=bP,r.value=r.factory()),"object"==typeof r.value&&r.value&&function SP(e){return null!==e&&"object"==typeof e&&"function"==typeof e.ngOnDestroy}(r.value)&&this._ngOnDestroyHooks.add(r.value),r.value}finally{me(i)}}injectableDefInScope(t){if(!t.providedIn)return!1;const r=re(t.providedIn);return"string"==typeof r?"any"===r||this.scopes.has(r):this.injectorDefTypes.has(r)}removeOnDestroy(t){const r=this._onDestroyHooks.indexOf(t);-1!==r&&this._onDestroyHooks.splice(r,1)}}function xg(e){const t=Ju(e),r=null!==t?t.factory:Ss(e);if(null!==r)return r;if(e instanceof K)throw new M(204,!1);if(e instanceof Function)return function EP(e){if(e.length>0)throw new M(204,!1);const r=function Bk(e){return e&&(e[ed]||e[eE])||null}(e);return null!==r?()=>r.factory(e):()=>new e}(e);throw new M(204,!1)}function To(e,t,r=!1){return{factory:e,value:t,multi:r?[]:void 0}}function Ag(e,t){for(const r of e)Array.isArray(r)?Ag(r,t):r&&dg(r)?Ag(r.\u0275providers,t):t(r)}function oi(e,t){e instanceof Io&&e.assertNotDestroyed();const i=Bi(e),s=fn(void 0);try{return t()}finally{Bi(i),fn(s)}}function SE(){return void 0!==iE()||null!=function Wk(){return Eo}()}const rt=0,F=1,ee=2,ut=3,tr=4,$t=5,xn=6,Ao=7,We=8,mt=9,nr=10,ie=11,Sc=12,TE=13,Mo=14,it=15,Ic=16,No=17,ai=18,Tc=19,xE=20,ji=21,gd=22,xs=23,fe=25,Ng=1,Cr=7,Ro=9,dt=10;var Rg=function(e){return e[e.None=0]="None",e[e.HasTransplantedViews=2]="HasTransplantedViews",e}(Rg||{});function Vt(e){return Array.isArray(e)&&"object"==typeof e[Ng]}function Ht(e){return Array.isArray(e)&&!0===e[Ng]}function Og(e){return!!(4&e.flags)}function As(e){return e.componentOffset>-1}function yd(e){return!(1&~e.flags)}function rr(e){return!!e.template}function kg(e){return!!(512&e[ee])}class UP{constructor(t,r,i){this.previousValue=t,this.currentValue=r,this.firstChange=i}isFirstChange(){return this.firstChange}}function RE(e,t,r,i){null!==t?t.applyValueToInputSignal(t,i):e[r]=i}function Ms(){return OE}function OE(e){return e.type.prototype.ngOnChanges&&(e.setInput=$P),jP}function jP(){const e=PE(this),t=e?.current;if(t){const r=e.previous;if(r===Dr)e.previous=t;else for(let i in t)r[i]=t[i];e.current=null,this.ngOnChanges(t)}}function $P(e,t,r,i,s){const o=this.declaredInputs[i],a=PE(e)||function VP(e,t){return e[kE]=t}(e,{previous:Dr,current:null}),c=a.current||(a.current={}),l=a.previous,u=l[o];c[o]=new UP(u&&u.currentValue,r,l===Dr),RE(e,t,s,r)}Ms.ngInherit=!0;const kE="__ngSimpleChanges__";function PE(e){return e[kE]||null}const Sr=function(e,t,r){};let BE=!1;function je(e){for(;Array.isArray(e);)e=e[rt];return e}function Ac(e,t){return je(t[e])}function tn(e,t){return je(t[e.index])}function Mc(e,t){return e.data[t]}function Oo(e,t){return e[t]}function An(e,t){const r=t[e];return Vt(r)?r:r[rt]}function Ug(e){return!(128&~e[ee])}function Ir(e,t){return null==t?null:e[t]}function UE(e){e[No]=0}function ZP(e){1024&e[ee]||(e[ee]|=1024,Ug(e)&&Nc(e))}function jg(e){return!!(9216&e[ee]||e[xs]?.dirty)}function $g(e){e[nr].changeDetectionScheduler?.notify(1),jg(e)?Nc(e):64&e[ee]&&(function zP(){return BE}()?(e[ee]|=1024,Nc(e)):e[nr].changeDetectionScheduler?.notify())}function Nc(e){e[nr].changeDetectionScheduler?.notify();let t=Ns(e);for(;null!==t&&!(8192&t[ee])&&(t[ee]|=8192,Ug(t));)t=Ns(t)}function vd(e,t){if(!(256&~e[ee]))throw new M(911,!1);null===e[ji]&&(e[ji]=[]),e[ji].push(t)}function Ns(e){const t=e[ut];return Ht(t)?t[ut]:t}const se={lFrame:KE(null),bindingsEnabled:!0,skipHydrationRootTNode:null};function VE(){return se.bindingsEnabled}function N(){return se.lFrame.lView}function De(){return se.lFrame.tView}function ci(e){return se.lFrame.contextLView=e,e[We]}function li(e){return se.lFrame.contextLView=null,e}function Be(){let e=HE();for(;null!==e&&64===e.type;)e=e.parent;return e}function HE(){return se.lFrame.currentTNode}function Tr(e,t){const r=se.lFrame;r.currentTNode=e,r.isParent=t}function Hg(){return se.lFrame.isParent}function zg(){se.lFrame.isParent=!1}function ir(){return se.lFrame.bindingIndex++}function di(e){const t=se.lFrame,r=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,r}function sL(e,t){const r=se.lFrame;r.bindingIndex=r.bindingRootIndex=e,qg(t)}function qg(e){se.lFrame.currentDirectiveIndex=e}function Gg(e){const t=se.lFrame.currentDirectiveIndex;return-1===t?null:e[t]}function Wg(){return se.lFrame.currentQueryIndex}function wd(e){se.lFrame.currentQueryIndex=e}function aL(e){const t=e[F];return 2===t.type?t.declTNode:1===t.type?e[$t]:null}function WE(e,t,r){if(r&Ee.SkipSelf){let s=t,o=e;for(;!(s=s.parent,null!==s||r&Ee.Host||(s=aL(o),null===s||(o=o[Mo],10&s.type))););if(null===s)return!1;t=s,e=o}const i=se.lFrame=ZE();return i.currentTNode=t,i.lView=e,!0}function Zg(e){const t=ZE(),r=e[F];se.lFrame=t,t.currentTNode=r.firstChild,t.lView=e,t.tView=r,t.contextLView=e,t.bindingIndex=r.bindingStartIndex,t.inI18n=!1}function ZE(){const e=se.lFrame,t=null===e?null:e.child;return null===t?KE(e):t}function KE(e){const t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return null!==e&&(e.child=t),t}function QE(){const e=se.lFrame;return se.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}const YE=QE;function Kg(){const e=QE();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function zt(){return se.lFrame.selectedIndex}function Rs(e){se.lFrame.selectedIndex=e}function Ze(){const e=se.lFrame;return Mc(e.tView,e.selectedIndex)}let XE=!0;function Oc(){return XE}function xr(e){XE=e}function _d(e,t){for(let r=t.directiveStart,i=t.directiveEnd;r=i)break}else t[l]<0&&(e[No]+=65536),(c>14>16&&(3&e[ee])===t&&(e[ee]+=16384,tD(c,o)):tD(c,o)}const Po=-1;class kc{constructor(t,r,i){this.factory=t,this.resolving=!1,this.canSeeViewProviders=r,this.injectImpl=i}}function Jg(e){return e!==Po}function Pc(e){return 32767&e}function Lc(e,t){let r=function wL(e){return e>>16}(e),i=t;for(;r>0;)i=i[Mo],r--;return i}let Xg=!0;function Dd(e){const t=Xg;return Xg=e,t}const nD=255,rD=5;let _L=0;const Ar={};function Cd(e,t){const r=iD(e,t);if(-1!==r)return r;const i=t[F];i.firstCreatePass&&(e.injectorIndex=t.length,em(i.data,e),em(t,null),em(i.blueprint,null));const s=Sd(e,t),o=e.injectorIndex;if(Jg(s)){const a=Pc(s),c=Lc(s,t),l=c[F].data;for(let u=0;u<8;u++)t[o+u]=c[a+u]|l[a+u]}return t[o+8]=s,o}function em(e,t){e.push(0,0,0,0,0,0,0,0,t)}function iD(e,t){return-1===e.injectorIndex||e.parent&&e.parent.injectorIndex===e.injectorIndex||null===t[e.injectorIndex+8]?-1:e.injectorIndex}function Sd(e,t){if(e.parent&&-1!==e.parent.injectorIndex)return e.parent.injectorIndex;let r=0,i=null,s=t;for(;null!==s;){if(i=dD(s),null===i)return Po;if(r++,s=s[Mo],-1!==i.injectorIndex)return i.injectorIndex|r<<16}return Po}function tm(e,t,r){!function bL(e,t,r){let i;"string"==typeof r?i=r.charCodeAt(0)||0:r.hasOwnProperty(wc)&&(i=r[wc]),null==i&&(i=r[wc]=_L++);const s=i&nD;t.data[e+(s>>rD)]|=1<=0?t&nD:SL:t}(r);if("function"==typeof o){if(!WE(t,e,i))return i&Ee.Host?sD(s,0,i):oD(t,r,i,s);try{let a;if(a=o(i),null!=a||i&Ee.Optional)return a;pg()}finally{YE()}}else if("number"==typeof o){let a=null,c=iD(e,t),l=Po,u=i&Ee.Host?t[it][$t]:null;for((-1===c||i&Ee.SkipSelf)&&(l=-1===c?Sd(e,t):t[c+8],l!==Po&&uD(i,!1)?(a=t[F],c=Pc(l),t=Lc(l,t)):c=-1);-1!==c;){const d=t[F];if(lD(o,c,d.data)){const f=DL(c,t,r,a,i,u);if(f!==Ar)return f}l=t[c+8],l!==Po&&uD(i,t[F].data[c+8]===u)&&lD(o,c,t)?(a=d,c=Pc(l),t=Lc(l,t)):c=-1}}return s}function DL(e,t,r,i,s,o){const a=t[F],c=a.data[e+8],d=Id(c,a,r,null==i?As(c)&&Xg:i!=a&&!!(3&c.type),s&Ee.Host&&o===c);return null!==d?Os(t,a,d,c):Ar}function Id(e,t,r,i,s){const o=e.providerIndexes,a=t.data,c=1048575&o,l=e.directiveStart,d=o>>20,h=s?c+d:e.directiveEnd;for(let p=i?c:c+d;p=l&&g.type===r)return p}if(s){const p=a[l];if(p&&rr(p)&&p.type===r)return l}return null}function Os(e,t,r,i){let s=e[r];const o=t.data;if(function gL(e){return e instanceof kc}(s)){const a=s;a.resolving&&function Vk(e,t){throw t&&t.join(" > "),new M(-200,e)}(function Re(e){return"function"==typeof e?e.name||e.toString():"object"==typeof e&&null!=e&&"function"==typeof e.type?e.type.name||e.type.toString():de(e)}(o[r]));const c=Dd(a.canSeeViewProviders);a.resolving=!0;const u=a.injectImpl?fn(a.injectImpl):null;WE(e,i,Ee.Default);try{s=e[r]=a.factory(void 0,o,e,i),t.firstCreatePass&&r>=i.directiveStart&&function hL(e,t,r){const{ngOnChanges:i,ngOnInit:s,ngDoCheck:o}=t.type.prototype;if(i){const a=OE(t);(r.preOrderHooks??=[]).push(e,a),(r.preOrderCheckHooks??=[]).push(e,a)}s&&(r.preOrderHooks??=[]).push(0-e,s),o&&((r.preOrderHooks??=[]).push(e,o),(r.preOrderCheckHooks??=[]).push(e,o))}(r,o[r],t)}finally{null!==u&&fn(u),Dd(c),a.resolving=!1,YE()}}return s}function lD(e,t,r){return!!(r[t+(e>>rD)]&1<{const t=e.prototype.constructor,r=t[si]||rm(t),i=Object.prototype;let s=Object.getPrototypeOf(e.prototype).constructor;for(;s&&s!==i;){const o=s[si]||rm(s);if(o&&o!==r)return o;s=Object.getPrototypeOf(s)}return o=>new o})}function rm(e){return Yu(e)?()=>{const t=rm(re(e));return t&&t()}:Ss(e)}function dD(e){const t=e[F],r=t.type;return 2===r?t.declTNode:1===r?e[$t]:null}function mD(e,t=null,r=null,i){const s=yD(e,t,r,i);return s.resolveInjectorInitializers(),s}function yD(e,t=null,r=null,i,s=new Set){const o=[r||Me,vP(e)];return i=i||("object"==typeof e?void 0:bt(e)),new Io(o,t||fd(),i||null,s)}let qt=(()=>{class e{static#e=this.THROW_IF_NOT_FOUND=_c;static#t=this.NULL=new ad;static create(r,i){if(Array.isArray(r))return mD({name:""},i,r,"");{const s=r.name??"";return mD({name:s},r.parent,r.providers,s)}}static#r=this.\u0275prov=z({token:e,providedIn:"any",factory:()=>G(dE)});static#h=this.__NG_ELEMENT_ID__=-1}return e})();function sm(e){return e.ngOriginalError}class $n{constructor(){this._console=console}handleError(t){const r=this._findOriginalError(t);this._console.error("ERROR",t),r&&this._console.error("ORIGINAL ERROR",r)}_findOriginalError(t){let r=t&&sm(t);for(;r&&sm(r);)r=sm(r);return r||null}}const wD=new K("",{providedIn:"root",factory:()=>P($n).handleError.bind(void 0)});let Bo=(()=>{class e{static#e=this.__NG_ELEMENT_ID__=PL;static#t=this.__NG_ENV_ID__=r=>r}return e})();class kL extends Bo{constructor(t){super(),this._lView=t}onDestroy(t){return vd(this._lView,t),()=>function Vg(e,t){if(null===e[ji])return;const r=e[ji].indexOf(t);-1!==r&&e[ji].splice(r,1)}(this._lView,t)}}function PL(){return new kL(N())}function LL(){return Uo(Be(),N())}function Uo(e,t){return new $i(tn(e,t))}let $i=(()=>{class e{constructor(r){this.nativeElement=r}static#e=this.__NG_ELEMENT_ID__=LL}return e})();function bD(e){return e instanceof $i?e.nativeElement:e}function om(e){return t=>{setTimeout(e,void 0,t)}}const rn=class FL extends ot{constructor(t=!1){super(),this.destroyRef=void 0,this.__isAsync=t,SE()&&(this.destroyRef=P(Bo,{optional:!0})??void 0)}emit(t){const r=me(null);try{super.next(t)}finally{me(r)}}subscribe(t,r,i){let s=t,o=r||(()=>null),a=i;if(t&&"object"==typeof t){const l=t;s=l.next?.bind(l),o=l.error?.bind(l),a=l.complete?.bind(l)}this.__isAsync&&(o=om(o),s&&(s=om(s)),a&&(a=om(a)));const c=super.subscribe({next:s,error:o,complete:a});return t instanceof Rt&&t.add(c),c}};function BL(){return this._results[Symbol.iterator]()}class am{static#e=Symbol.iterator;get changes(){return this._changes??=new rn}constructor(t=!1){this._emitDistinctChangesOnly=t,this.dirty=!0,this._onDirty=void 0,this._results=[],this._changesDetected=!1,this._changes=void 0,this.length=0,this.first=void 0,this.last=void 0;const r=am.prototype;r[Symbol.iterator]||(r[Symbol.iterator]=BL)}get(t){return this._results[t]}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,r){return this._results.reduce(t,r)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t,r){this.dirty=!1;const i=function hn(e){return e.flat(Number.POSITIVE_INFINITY)}(t);(this._changesDetected=!function tP(e,t,r){if(e.length!==t.length)return!1;for(let i=0;ioF}),oF="ng",$D=new K(""),ks=new K("",{providedIn:"platform",factory:()=>"unknown"}),VD=new K(""),HD=new K("",{providedIn:"root",factory:()=>Vi().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});let zD=()=>null;function wm(e,t,r=!1){return zD(e,t,r)}const KD=new K("",{providedIn:"root",factory:()=>!1});let Bd,Ud;function Vo(e){return function Dm(){if(void 0===Bd&&(Bd=null,Pe.trustedTypes))try{Bd=Pe.trustedTypes.createPolicy("angular",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Bd}()?.createHTML(e)||e}function YD(e){return function Cm(){if(void 0===Ud&&(Ud=null,Pe.trustedTypes))try{Ud=Pe.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Ud}()?.createHTML(e)||e}class Ps{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Kb})`}}class _F extends Ps{getTypeName(){return"HTML"}}class bF extends Ps{getTypeName(){return"Style"}}class EF extends Ps{getTypeName(){return"Script"}}class DF extends Ps{getTypeName(){return"URL"}}class CF extends Ps{getTypeName(){return"ResourceURL"}}function Mn(e){return e instanceof Ps?e.changingThisBreaksApplicationSecurity:e}function Mr(e,t){const r=function SF(e){return e instanceof Ps&&e.getTypeName()||null}(e);if(null!=r&&r!==t){if("ResourceURL"===r&&"URL"===t)return!0;throw new Error(`Required a safe ${t}, got a ${r} (see ${Kb})`)}return r===t}class NF{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{const r=(new window.DOMParser).parseFromString(Vo(t),"text/html").body;return null===r?this.inertDocumentHelper.getInertBodyElement(t):(r.removeChild(r.firstChild),r)}catch{return null}}}class RF{constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){const r=this.inertDocument.createElement("template");return r.innerHTML=Vo(t),r}}const kF=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function jd(e){return(e=String(e)).match(kF)?e:"unsafe:"+e}function fi(e){const t={};for(const r of e.split(","))t[r]=!0;return t}function zc(...e){const t={};for(const r of e)for(const i in r)r.hasOwnProperty(i)&&(t[i]=!0);return t}const tC=fi("area,br,col,hr,img,wbr"),nC=fi("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),rC=fi("rp,rt"),Sm=zc(tC,zc(nC,fi("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),zc(rC,fi("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),zc(rC,nC)),Im=fi("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),iC=zc(Im,fi("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),fi("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),PF=fi("script,style,template");class LF{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(t){let r=t.firstChild,i=!0,s=[];for(;r;)if(r.nodeType===Node.ELEMENT_NODE?i=this.startElement(r):r.nodeType===Node.TEXT_NODE?this.chars(r.nodeValue):this.sanitizedSomething=!0,i&&r.firstChild)s.push(r),r=UF(r);else for(;r;){r.nodeType===Node.ELEMENT_NODE&&this.endElement(r);let o=BF(r);if(o){r=o;break}r=s.pop()}return this.buf.join("")}startElement(t){const r=sC(t).toLowerCase();if(!Sm.hasOwnProperty(r))return this.sanitizedSomething=!0,!PF.hasOwnProperty(r);this.buf.push("<"),this.buf.push(r);const i=t.attributes;for(let s=0;s"),!0}endElement(t){const r=sC(t).toLowerCase();Sm.hasOwnProperty(r)&&!tC.hasOwnProperty(r)&&(this.buf.push(""))}chars(t){this.buf.push(aC(t))}}function BF(e){const t=e.nextSibling;if(t&&e!==t.previousSibling)throw oC(t);return t}function UF(e){const t=e.firstChild;if(t&&function FF(e,t){return(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}(e,t))throw oC(t);return t}function sC(e){const t=e.nodeName;return"string"==typeof t?t:"FORM"}function oC(e){return new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`)}const jF=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,$F=/([^\#-~ |!])/g;function aC(e){return e.replace(/&/g,"&").replace(jF,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace($F,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let $d;function cC(e,t){let r=null;try{$d=$d||function eC(e){const t=new RF(e);return function OF(){try{return!!(new window.DOMParser).parseFromString(Vo(""),"text/html")}catch{return!1}}()?new NF(t):t}(e);let i=t?String(t):"";r=$d.getInertBodyElement(i);let s=5,o=i;do{if(0===s)throw new Error("Failed to sanitize html because the input is unstable");s--,i=o,o=r.innerHTML,r=$d.getInertBodyElement(i)}while(i!==o);return Vo((new LF).sanitizeChildren(Tm(r)||r))}finally{if(r){const i=Tm(r)||r;for(;i.firstChild;)i.removeChild(i.firstChild)}}}function Tm(e){return"content"in e&&function VF(e){return e.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===e.nodeName}(e)?e.content:null}var Nn=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}(Nn||{});function xm(e){const t=function qc(){const e=N();return e&&e[nr].sanitizer}();return t?YD(t.sanitize(Nn.HTML,e)||""):Mr(e,"HTML")?YD(Mn(e)):cC(Vi(),de(e))}const ZF=/^>|^->||--!>|)/g,QF="\u200b$1\u200b";function gC(e){return e.ownerDocument.defaultView}function Rn(e){return e instanceof Function?e():e}var Hi=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}(Hi||{});let Rm;function Om(e,t){return Rm(e,t)}function zo(e,t,r,i,s){if(null!=i){let o,a=!1;Ht(i)?o=i:Vt(i)&&(a=!0,i=i[rt]);const c=je(i);0===e&&null!==r?null==s?CC(t,r,c):Ls(t,r,c,s||null,!0):1===e&&null!==r?Ls(t,r,c,s||null,!0):2===e?function Zc(e,t,r){const i=Gd(e,t);i&&function p3(e,t,r,i){e.removeChild(t,r,i)}(e,i,t,r)}(t,c,a):3===e&&t.destroyNode(c),null!=o&&function y3(e,t,r,i,s){const o=r[Cr];o!==je(r)&&zo(t,e,i,o,s);for(let c=dt;ct.replace(KF,QF))}(t))}function zd(e,t,r){return e.createElement(t,r)}function bC(e,t){t[nr].changeDetectionScheduler?.notify(1),Zd(e,t,t[ie],2,null,null)}function EC(e,t){const r=e[Ro],i=r.indexOf(t);r.splice(i,1)}function Gc(e,t){if(e.length<=dt)return;const r=dt+t,i=e[r];if(i){const s=i[Ic];null!==s&&s!==e&&EC(s,i),t>0&&(e[r-1][tr]=i[tr]);const o=sd(e,dt+t);!function a3(e,t){bC(e,t),t[rt]=null,t[$t]=null}(i[F],i);const a=o[ai];null!==a&&a.detachView(o[F]),i[ut]=null,i[tr]=null,i[ee]&=-129}return i}function qd(e,t){if(!(256&t[ee])){const r=t[ie];r.destroyNode&&Zd(e,t,r,3,null,null),function l3(e){let t=e[Sc];if(!t)return Lm(e[F],e);for(;t;){let r=null;if(Vt(t))r=t[Sc];else{const i=t[dt];i&&(r=i)}if(!r){for(;t&&!t[tr]&&t!==e;)Vt(t)&&Lm(t[F],t),t=t[ut];null===t&&(t=e),Vt(t)&&Lm(t[F],t),r=t&&t[tr]}t=r}}(t)}}function Lm(e,t){if(256&t[ee])return;const r=me(null);try{t[ee]&=-129,t[ee]|=256,t[xs]&&function kb(e){if(mo(e),yc(e))for(let t=0;t=0?i[a]():i[-a].unsubscribe(),o+=2}else r[o].call(i[r[o+1]]);null!==i&&(t[Ao]=null);const s=t[ji];if(null!==s){t[ji]=null;for(let o=0;o-1){const{encapsulation:o}=e.data[i.directiveStart+s];if(o===Jn.None||o===Jn.Emulated)return null}return tn(i,r)}}(e,t.parent,r)}function Ls(e,t,r,i,s){e.insertBefore(t,r,i,s)}function CC(e,t,r){e.appendChild(t,r)}function SC(e,t,r,i,s){null!==i?Ls(e,t,r,i,s):CC(e,t,r)}function Gd(e,t){return e.parentNode(t)}let Bm,xC=function TC(e,t,r){return 40&e.type?tn(e,r):null};function Wd(e,t,r,i){const s=Fm(e,i,t),o=t[ie],c=function IC(e,t,r){return xC(e,t,r)}(i.parent||t[$t],i,t);if(null!=s)if(Array.isArray(r))for(let l=0;lfe&&PC(e,t,fe,!1),Sr(a?2:0,s),r(i,s)}finally{Rs(o),Sr(a?3:1,s)}}function Vm(e,t,r){if(Og(t)){const i=me(null);try{const o=t.directiveEnd;for(let a=t.directiveStart;anull;function $C(e,t,r,i,s){for(let o in t){if(!t.hasOwnProperty(o))continue;const a=t[o];if(void 0===a)continue;i??={};let c,l=Xn.None;Array.isArray(a)?(c=a[0],l=a[1]):c=a;let u=o;if(null!==s){if(!s.hasOwnProperty(o))continue;u=s[o]}0===e?VC(i,r,u,c,l):VC(i,r,u,c)}return i}function VC(e,t,r,i,s){let o;e.hasOwnProperty(r)?(o=e[r]).push(t,i):o=e[r]=[t,i],void 0!==s&&o.push(s)}function yn(e,t,r,i,s,o,a,c){const l=tn(t,r);let d,u=t.inputs;!c&&null!=u&&(d=u[i])?(Qm(e,r,d,i,s),As(t)&&function M3(e,t){const r=An(t,e);16&r[ee]||(r[ee]|=64)}(r,t.index)):3&t.type&&(i=function A3(e){return"class"===e?"className":"for"===e?"htmlFor":"formaction"===e?"formAction":"innerHtml"===e?"innerHTML":"readonly"===e?"readOnly":"tabindex"===e?"tabIndex":e}(i),s=null!=a?a(s,t.value||"",i):s,o.setProperty(l,i,s))}function Gm(e,t,r,i){if(VE()){const s=null===i?null:{"":-1},o=function L3(e,t){const r=e.directiveRegistry;let i=null,s=null;if(r)for(let o=0;o0;){const r=e[--t];if("number"==typeof r&&r<0)return r}return 0})(a)!=c&&a.push(c),a.push(r,i,o)}}(e,t,i,Kc(e,r,s.hostVars,he),s)}function Nr(e,t,r,i,s,o){const a=tn(e,t);!function Zm(e,t,r,i,s,o,a){if(null==o)e.removeAttribute(t,s,r);else{const c=null==a?de(o):a(o,i||"",s);e.setAttribute(t,s,c,r)}}(t[ie],a,o,e.value,r,i,s)}function V3(e,t,r,i,s,o){const a=o[t];if(null!==a)for(let c=0;c0&&(r[s-1][tr]=t),i{Nc(e.lView)},consumerOnSignalRead(){this.lView[xs]=this}},XC=100;function Jd(e,t=!0,r=0){const i=e[nr],s=i.rendererFactory;s.begin?.();try{!function Y3(e,t){Xm(e,t);let r=0;for(;jg(e);){if(r===XC)throw new M(103,!1);r++,Xm(e,1)}}(e,r)}catch(a){throw t&&Yd(e,a),a}finally{s.end?.(),i.inlineEffectRunner?.flush()}}function J3(e,t,r,i){const s=t[ee];if(!(256&~s))return;t[nr].inlineEffectRunner?.flush(),Zg(t);let a=null,c=null;(function X3(e){return 2!==e.type})(e)&&(c=function W3(e){return e[xs]??function Z3(e){const t=JC.pop()??Object.create(Q3);return t.lView=e,t}(e)}(t),a=function Rb(e){return e&&(e.nextProducerIndex=0),me(e)}(c));try{UE(t),function qE(e){return se.lFrame.bindingIndex=e}(e.bindingStartIndex),null!==r&&BC(e,t,r,2,i);const l=!(3&~s);if(l){const f=e.preOrderCheckHooks;null!==f&&bd(t,f,null)}else{const f=e.preOrderHooks;null!==f&&Ed(t,f,0,null),Qg(t,0)}if(function eB(e){for(let t=ND(e);null!==t;t=RD(t)){if(!(t[ee]&Rg.HasTransplantedViews))continue;const r=t[Ro];for(let i=0;ie.nextProducerIndex;)e.producerNode.pop(),e.producerLastReadVersion.pop(),e.producerIndexOfThis.pop()}}(c,a),function K3(e){e.lView[xs]!==e&&(e.lView=null,JC.push(e))}(c)),Kg()}}function eS(e,t){for(let r=ND(e);null!==r;r=RD(r))for(let i=dt;i-1&&(Gc(t,i),sd(r,i))}this._attachedToViewContainer=!1}qd(this._lView[F],this._lView)}onDestroy(t){vd(this._lView,t)}markForCheck(){Xc(this._cdRefInjectingView||this._lView)}detach(){this._lView[ee]&=-129}reattach(){$g(this._lView),this._lView[ee]|=128}detectChanges(){this._lView[ee]|=1024,Jd(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new M(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,bC(this._lView[F],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new M(902,!1);this._appRef=t,$g(this._lView)}}let pi=(()=>{class e{static#e=this.__NG_ELEMENT_ID__=iB}return e})();const nB=pi,rB=class extends nB{constructor(t,r,i){super(),this._declarationLView=t,this._declarationTContainer=r,this.elementRef=i}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(t,r){return this.createEmbeddedViewImpl(t,r)}createEmbeddedViewImpl(t,r,i){const s=function Qc(e,t,r,i){const s=me(null);try{const o=t.tView,l=Kd(e,o,r,4096&e[ee]?4096:16,null,t,null,null,i?.injector??null,i?.embeddedViewInjector??null,i?.dehydratedView??null);l[Ic]=e[t.index];const d=e[ai];return null!==d&&(l[ai]=d.createEmbeddedView(o)),Ym(o,l,r),l}finally{me(s)}}(this._declarationLView,this._declarationTContainer,t,{embeddedViewInjector:r,dehydratedView:i});return new el(s)}};function iB(){return Xd(Be(),N())}function Xd(e,t){return 4&e.type?new rB(t,e,Uo(e,t)):null}class sf{}class xB{}class lS{}class MB{resolveComponentFactory(t){throw function AB(e){const t=Error(`No component factory found for ${bt(e)}.`);return t.ngComponent=e,t}(t)}}let sl=(()=>{class e{static#e=this.NULL=new MB}return e})();class sy{}let RB=(()=>{class e{static#e=this.\u0275prov=z({token:e,providedIn:"root",factory:()=>null})}return e})();const oy={},dS=new Set;function Rr(e){dS.has(e)||(dS.add(e),performance?.mark?.("mark_feature_usage",{detail:{feature:e}}))}function fS(...e){}class Ne{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:r=!1,shouldCoalesceRunChangeDetection:i=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new rn(!1),this.onMicrotaskEmpty=new rn(!1),this.onStable=new rn(!1),this.onError=new rn(!1),typeof Zone>"u")throw new M(908,!1);Zone.assertZonePatched();const s=this;s._nesting=0,s._outer=s._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(s._inner=s._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!i&&r,s.shouldCoalesceRunChangeDetection=i,s.lastRequestAnimationFrameId=-1,s.nativeRequestAnimationFrame=function OB(){const e="function"==typeof Pe.requestAnimationFrame;let t=Pe[e?"requestAnimationFrame":"setTimeout"],r=Pe[e?"cancelAnimationFrame":"clearTimeout"];if(typeof Zone<"u"&&t&&r){const i=t[Zone.__symbol__("OriginalDelegate")];i&&(t=i);const s=r[Zone.__symbol__("OriginalDelegate")];s&&(r=s)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:r}}().nativeRequestAnimationFrame,function LB(e){const t=()=>{!function PB(e){e.isCheckStableRunning||-1!==e.lastRequestAnimationFrameId||(e.lastRequestAnimationFrameId=e.nativeRequestAnimationFrame.call(Pe,()=>{e.fakeTopEventTask||(e.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{e.lastRequestAnimationFrameId=-1,cy(e),e.isCheckStableRunning=!0,ay(e),e.isCheckStableRunning=!1},void 0,()=>{},()=>{})),e.fakeTopEventTask.invoke()}),cy(e))}(e)};e._inner=e._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(r,i,s,o,a,c)=>{if(function FB(e){return!(!Array.isArray(e)||1!==e.length)&&!0===e[0].data?.__ignore_ng_zone__}(c))return r.invokeTask(s,o,a,c);try{return hS(e),r.invokeTask(s,o,a,c)}finally{(e.shouldCoalesceEventChangeDetection&&"eventTask"===o.type||e.shouldCoalesceRunChangeDetection)&&t(),pS(e)}},onInvoke:(r,i,s,o,a,c,l)=>{try{return hS(e),r.invoke(s,o,a,c,l)}finally{e.shouldCoalesceRunChangeDetection&&t(),pS(e)}},onHasTask:(r,i,s,o)=>{r.hasTask(s,o),i===s&&("microTask"==o.change?(e._hasPendingMicrotasks=o.microTask,cy(e),ay(e)):"macroTask"==o.change&&(e.hasPendingMacrotasks=o.macroTask))},onHandleError:(r,i,s,o)=>(r.handleError(s,o),e.runOutsideAngular(()=>e.onError.emit(o)),!1)})}(s)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!Ne.isInAngularZone())throw new M(909,!1)}static assertNotInAngularZone(){if(Ne.isInAngularZone())throw new M(909,!1)}run(t,r,i){return this._inner.run(t,r,i)}runTask(t,r,i,s){const o=this._inner,a=o.scheduleEventTask("NgZoneEvent: "+s,t,kB,fS,fS);try{return o.runTask(a,r,i)}finally{o.cancelTask(a)}}runGuarded(t,r,i){return this._inner.runGuarded(t,r,i)}runOutsideAngular(t){return this._outer.run(t)}}const kB={};function ay(e){if(0==e._nesting&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function cy(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&-1!==e.lastRequestAnimationFrameId)}function hS(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function pS(e){e._nesting--,ay(e)}class gS{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new rn,this.onMicrotaskEmpty=new rn,this.onStable=new rn,this.onError=new rn}run(t,r,i){return t.apply(r,i)}runGuarded(t,r,i){return t.apply(r,i)}runOutsideAngular(t){return t()}runTask(t,r,i,s){return t.apply(r,i)}}var Fs=function(e){return e[e.EarlyRead=0]="EarlyRead",e[e.Write=1]="Write",e[e.MixedReadWrite=2]="MixedReadWrite",e[e.Read=3]="Read",e}(Fs||{});const mS={destroy(){}};function uy(e,t){!t&&function hd(e){if(!SE())throw new M(-203,!1)}();const r=t?.injector??P(qt);if(!function sr(e){return"browser"===(e??P(qt)).get(ks)}(r))return mS;Rr("NgAfterNextRender");const i=r.get(ol),s=i.handler??=new vS,o=t?.phase??Fs.MixedReadWrite,a=()=>{s.unregister(l),c()},c=r.get(Bo).onDestroy(a),l=oi(r,()=>new yS(o,()=>{a(),e()}));return s.register(l),{destroy:a}}class yS{constructor(t,r){this.phase=t,this.callbackFn=r,this.zone=P(Ne),this.errorHandler=P($n,{optional:!0}),P(sf,{optional:!0})?.notify(1)}invoke(){try{this.zone.runOutsideAngular(this.callbackFn)}catch(t){this.errorHandler?.handleError(t)}}}class vS{constructor(){this.executingCallbacks=!1,this.buckets={[Fs.EarlyRead]:new Set,[Fs.Write]:new Set,[Fs.MixedReadWrite]:new Set,[Fs.Read]:new Set},this.deferredCallbacks=new Set}register(t){(this.executingCallbacks?this.deferredCallbacks:this.buckets[t.phase]).add(t)}unregister(t){this.buckets[t.phase].delete(t),this.deferredCallbacks.delete(t)}execute(){this.executingCallbacks=!0;for(const t of Object.values(this.buckets))for(const r of t)r.invoke();this.executingCallbacks=!1;for(const t of this.deferredCallbacks)this.buckets[t.phase].add(t);this.deferredCallbacks.clear()}destroy(){for(const t of Object.values(this.buckets))t.clear();this.deferredCallbacks.clear()}}let ol=(()=>{class e{constructor(){this.handler=null,this.internalCallbacks=[]}execute(){this.executeInternalCallbacks(),this.handler?.execute()}executeInternalCallbacks(){const r=[...this.internalCallbacks];this.internalCallbacks.length=0;for(const i of r)i()}ngOnDestroy(){this.handler?.destroy(),this.handler=null,this.internalCallbacks.length=0}static#e=this.\u0275prov=z({token:e,providedIn:"root",factory:()=>new e})}return e})();function lf(e,t,r){let i=r?e.styles:null,s=r?e.classes:null,o=0;if(null!==t)for(let a=0;a0&&OC(e,r,o.join(" "))}}(p,D,m,i),void 0!==r&&function KB(e,t,r){const i=e.projection=[];for(let s=0;s{class e{static#e=this.__NG_ELEMENT_ID__=YB}return e})();function YB(){return SS(Be(),N())}const JB=or,DS=class extends JB{constructor(t,r,i){super(),this._lContainer=t,this._hostTNode=r,this._hostLView=i}get element(){return Uo(this._hostTNode,this._hostLView)}get injector(){return new Ct(this._hostTNode,this._hostLView)}get parentInjector(){const t=Sd(this._hostTNode,this._hostLView);if(Jg(t)){const r=Lc(t,this._hostLView),i=Pc(t);return new Ct(r[F].data[i+8],r)}return new Ct(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const r=CS(this._lContainer);return null!==r&&r[t]||null}get length(){return this._lContainer.length-dt}createEmbeddedView(t,r,i){let s,o;"number"==typeof i?s=i:null!=i&&(s=i.index,o=i.injector);const c=t.createEmbeddedViewImpl(r||{},o,null);return this.insertImpl(c,s,Go(this._hostTNode,null)),c}createComponent(t,r,i,s,o){const a=t&&!function Cc(e){return"function"==typeof e}(t);let c;if(a)c=r;else{const g=r||{};c=g.index,i=g.injector,s=g.projectableNodes,o=g.environmentInjector||g.ngModuleRef}const l=a?t:new ll(we(t)),u=i||this.parentInjector;if(!o&&null==l.ngModule){const m=(a?u:this.parentInjector).get(gn,null);m&&(o=m)}we(l.componentType??{});const p=l.create(u,s,null,o);return this.insertImpl(p.hostView,c,Go(this._hostTNode,null)),p}insert(t,r){return this.insertImpl(t,r,!0)}insertImpl(t,r,i){const s=t._lView;if(function WP(e){return Ht(e[ut])}(s)){const c=this.indexOf(t);if(-1!==c)this.detach(c);else{const l=s[ut],u=new DS(l,l[$t],l[ut]);u.detach(u.indexOf(t))}}const o=this._adjustIndex(r),a=this._lContainer;return Yc(a,s,o,i),t.attachToViewContainerRef(),cE(hy(a),o,t),t}move(t,r){return this.insert(t,r)}indexOf(t){const r=CS(this._lContainer);return null!==r?r.indexOf(t):-1}remove(t){const r=this._adjustIndex(t,-1),i=Gc(this._lContainer,r);i&&(sd(hy(this._lContainer),r),qd(i[F],i))}detach(t){const r=this._adjustIndex(t,-1),i=Gc(this._lContainer,r);return i&&null!=sd(hy(this._lContainer),r)?new el(i):null}_adjustIndex(t,r=0){return t??this.length+r}};function CS(e){return e[8]}function hy(e){return e[8]||(e[8]=[])}function SS(e,t){let r;const i=t[e.index];return Ht(i)?r=i:(r=qC(i,t,null,e),t[e.index]=r,Qd(t,r)),IS(r,t,e,i),new DS(r,e,t)}let IS=function xS(e,t,r,i){if(e[Cr])return;let s;s=8&r.type?je(i):function XB(e,t){const r=e[ie],i=r.createComment(""),s=tn(t,e);return Ls(r,Gd(r,s),i,function g3(e,t){return e.nextSibling(t)}(r,s),!1),i}(t,r),e[Cr]=s},py=()=>!1;class gy{constructor(t){this.queryList=t,this.matches=null}clone(){return new gy(this.queryList)}setDirty(){this.queryList.setDirty()}}class my{constructor(t=[]){this.queries=t}createEmbeddedView(t){const r=t.queries;if(null!==r){const i=null!==t.contentQueries?t.contentQueries[0]:r.length,s=[];for(let o=0;ot.trim())}(t):t}}class yy{constructor(t=[]){this.queries=t}elementStart(t,r){for(let i=0;i0)i.push(a[c/2]);else{const u=o[c+1],d=t[-l];for(let f=dt;f(Gp(t),t.value);return r[Er]=t,r}(e),i=r[Er];return t?.equal&&(i.equal=t.equal),r.set=s=>Ub(i,s),r.update=s=>function gk(e,t){Mb()||Bb(),Ub(e,t(e.value))}(i,s),r.asReadonly=FS.bind(r),r}function FS(){const e=this[Er];if(void 0===e.readonlyFn){const t=()=>this();t[Er]=e,e.readonlyFn=t}return e.readonlyFn}class Bs{}class tI{}class Dy extends Bs{constructor(t,r,i){super(),this._parent=r,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new bS(this);const s=jt(t);this._bootstrapComponents=Rn(s.bootstrap),this._r3Injector=yD(t,r,[{provide:Bs,useValue:this},{provide:sl,useValue:this.componentFactoryResolver},...i],bt(t),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(t)}get injector(){return this._r3Injector}destroy(){const t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(r=>r()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}}class Cy extends tI{constructor(t){super(),this.moduleType=t}create(t){return new Dy(this.moduleType,t,[])}}class nI extends Bs{constructor(t){super(),this.componentFactoryResolver=new bS(this),this.instance=null;const r=new Io([...t.providers,{provide:Bs,useValue:this},{provide:sl,useValue:this.componentFactoryResolver}],t.parent||fd(),t.debugName,new Set(["environment"]));this.injector=r,t.runEnvironmentInitializers&&r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}}function hf(e,t,r=null){return new nI({providers:e,parent:t,debugName:r,runEnvironmentInitializers:!0}).injector}let Ko=(()=>{class e{constructor(){this.taskId=0,this.pendingTasks=new Set,this.hasPendingTasks=new jn(!1)}get _hasPendingTasks(){return this.hasPendingTasks.value}add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);const r=this.taskId++;return this.pendingTasks.add(r),r}remove(r){this.pendingTasks.delete(r),0===this.pendingTasks.size&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function gf(e){return!!function Sy(e){return null!==e&&("function"==typeof e||"object"==typeof e)}(e)&&(Array.isArray(e)||!(e instanceof Map)&&Symbol.iterator in e)}function ft(e,t,r){return!Object.is(e[t],r)&&(e[t]=r,!0)}function Hn(e,t,r,i,s,o,a,c){const l=N(),u=De(),d=e+fe,f=u.firstCreatePass?function P8(e,t,r,i,s,o,a,c,l){const u=t.consts,d=qo(t,e,4,a||null,Ir(u,c));Gm(t,r,d,Ir(u,l)),_d(t,d);const f=d.tView=qm(2,d,i,s,o,t.directiveRegistry,t.pipeRegistry,null,t.schemas,u,null);return null!==t.queries&&(t.queries.template(t,d),f.queries=t.queries.embeddedTView(d)),d}(d,u,l,t,r,i,s,o,a):u.data[d];Tr(f,!1);const h=rI(u,l,f,e);Oc()&&Wd(u,l,h,f),Gt(h,l);const p=qC(h,l,h,f);return l[d]=p,Qd(l,p),function TS(e,t,r){return py(e,t,r)}(p,f,l),yd(f)&&Hm(u,l,f),null!=a&&zm(l,f,c),Hn}let rI=function iI(e,t,r,i){return xr(!0),t[ie].createComment("")};function kr(e,t,r,i){const s=N();return ft(s,ir(),t)&&(De(),Nr(Ze(),s,e,t,r,i)),kr}function Ef(e,t){return e<<17|t<<2}function Wi(e){return e>>17&32767}function Py(e){return 2|e}function $s(e){return(131068&e)>>2}function Ly(e,t){return-131069&e|t<<2}function Fy(e){return 1|e}function PI(e,t,r,i){const s=e[r+1],o=null===t;let a=i?Wi(s):$s(s),c=!1;for(;0!==a&&(!1===c||o);){const u=e[a+1];bU(e[a],t)&&(c=!0,e[a+1]=i?Fy(u):Py(u)),a=i?Wi(u):$s(u)}c&&(e[r+1]=i?Py(s):Fy(s))}function bU(e,t){return null===e||null==t||(Array.isArray(e)?e[1]:e)===t||!(!Array.isArray(e)||"string"!=typeof t)&&Co(e,t)>=0}const St={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function LI(e){return e.substring(St.key,St.keyEnd)}function FI(e,t){const r=St.textEnd;return r===t?-1:(t=St.keyEnd=function SU(e,t,r){for(;t32;)t++;return t}(e,St.key=t,r),da(e,t,r))}function da(e,t,r){for(;t=0;r=FI(t,r))Tn(e,LI(t),!0)}function ar(e,t,r,i){const s=N(),o=De(),a=di(2);o.firstUpdatePass&&HI(o,e,a,i),t!==he&&ft(s,a,t)&&qI(o,o.data[zt()],s,s[ie],e,s[a+1]=function LU(e,t){return null==e||""===e||("string"==typeof t?e+=t:"object"==typeof e&&(e=bt(Mn(e)))),e}(t,r),i,a)}function VI(e,t){return t>=e.expandoStartIndex}function HI(e,t,r,i){const s=e.data;if(null===s[r+1]){const o=s[zt()],a=VI(e,r);WI(o,i)&&null===t&&!a&&(t=!1),t=function AU(e,t,r,i){const s=Gg(e);let o=i?t.residualClasses:t.residualStyles;if(null===s)0===(i?t.classBindings:t.styleBindings)&&(r=yl(r=jy(null,e,t,r,i),t.attrs,i),o=null);else{const a=t.directiveStylingLast;if(-1===a||e[a]!==s)if(r=jy(s,e,t,r,i),null===o){let l=function MU(e,t,r){const i=r?t.classBindings:t.styleBindings;if(0!==$s(i))return e[Wi(i)]}(e,t,i);void 0!==l&&Array.isArray(l)&&(l=jy(null,e,t,l[1],i),l=yl(l,t.attrs,i),function NU(e,t,r,i){e[Wi(r?t.classBindings:t.styleBindings)]=i}(e,t,i,l))}else o=function RU(e,t,r){let i;const s=t.directiveEnd;for(let o=1+t.directiveStylingLast;o0)&&(u=!0)):d=r,s)if(0!==l){const h=Wi(e[c+1]);e[i+1]=Ef(h,c),0!==h&&(e[h+1]=Ly(e[h+1],i)),e[c+1]=function yU(e,t){return 131071&e|t<<17}(e[c+1],i)}else e[i+1]=Ef(c,0),0!==c&&(e[c+1]=Ly(e[c+1],i)),c=i;else e[i+1]=Ef(l,0),0===c?c=i:e[l+1]=Ly(e[l+1],i),l=i;u&&(e[i+1]=Py(e[i+1])),PI(e,d,i,!0),PI(e,d,i,!1),function _U(e,t,r,i,s){const o=s?e.residualClasses:e.residualStyles;null!=o&&"string"==typeof t&&Co(o,t)>=0&&(r[i+1]=Fy(r[i+1]))}(t,d,e,i,o),a=Ef(c,l),o?t.classBindings=a:t.styleBindings=a}(s,o,t,r,a,i)}}function jy(e,t,r,i,s){let o=null;const a=r.directiveEnd;let c=r.directiveStylingLast;for(-1===c?c=r.directiveStart:c++;c0;){const l=e[s],u=Array.isArray(l),d=u?l[1]:l,f=null===d;let h=r[s+1];h===he&&(h=f?Me:void 0);let p=f?wg(h,i):d===i?h:void 0;if(u&&!Df(p)&&(p=wg(l,i)),Df(p)&&(c=p,a))return c;const g=e[s+1];s=a?Wi(g):$s(g)}if(null!==t){let l=o?t.residualClasses:t.residualStyles;null!=l&&(c=wg(l,i))}return c}function Df(e){return void 0!==e}function WI(e,t){return!!(e.flags&(t?8:16))}function Le(e,t,r,i){const s=N(),o=De(),a=fe+e,c=s[ie],l=o.firstCreatePass?function s4(e,t,r,i,s,o){const a=t.consts,l=qo(t,e,2,i,Ir(a,s));return Gm(t,r,l,Ir(a,o)),null!==l.attrs&&lf(l,l.attrs,!1),null!==l.mergedAttrs&&lf(l,l.mergedAttrs,!0),null!==t.queries&&t.queries.elementStart(t,l),l}(a,o,s,t,r,i):o.data[a],u=YI(o,s,l,c,t,e);s[a]=u;const d=yd(l);return Tr(l,!0),kC(c,u,l),!function hl(e){return!(32&~e.flags)}(l)&&Oc()&&Wd(o,s,u,l),0===function KP(){return se.lFrame.elementDepthCount}()&&Gt(u,s),function QP(){se.lFrame.elementDepthCount++}(),d&&(Hm(o,s,l),Vm(o,l,s)),null!==i&&zm(s,l),Le}function Qe(){let e=Be();Hg()?zg():(e=e.parent,Tr(e,!1));const t=e;(function JP(e){return se.skipHydrationRootTNode===e})(t)&&function nL(){se.skipHydrationRootTNode=null}(),function YP(){se.lFrame.elementDepthCount--}();const r=De();return r.firstCreatePass&&(_d(r,e),Og(e)&&r.queries.elementEnd(e)),null!=t.classesWithoutHost&&function yL(e){return!!(8&e.flags)}(t)&&By(r,t,N(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function vL(e){return!!(16&e.flags)}(t)&&By(r,t,N(),t.stylesWithoutHost,!1),Qe}function mi(e,t,r,i){return Le(e,t,r,i),Qe(),mi}let YI=(e,t,r,i,s,o)=>(xr(!0),zd(i,s,function JE(){return se.lFrame.currentNamespace}()));function ha(e,t,r){const i=N(),s=De(),o=e+fe,a=s.firstCreatePass?function c4(e,t,r,i,s){const o=t.consts,a=Ir(o,i),c=qo(t,e,8,"ng-container",a);return null!==a&&lf(c,a,!0),Gm(t,r,c,Ir(o,s)),null!==t.queries&&t.queries.elementStart(t,c),c}(o,s,i,t,r):s.data[o];Tr(a,!0);const c=XI(s,i,a,e);return i[o]=c,Oc()&&Wd(s,i,c,a),Gt(c,i),yd(a)&&(Hm(s,i,a),Vm(s,a,i)),null!=r&&zm(i,a),ha}function pa(){let e=Be();const t=De();return Hg()?zg():(e=e.parent,Tr(e,!1)),t.firstCreatePass&&(_d(t,e),Og(e)&&t.queries.elementEnd(e)),pa}let XI=(e,t,r,i)=>(xr(!0),Pm(t[ie],""));function Vs(){return N()}function qy(e,t,r){const i=N();if(ft(i,ir(),t)){const o=De(),a=Ze();yn(o,a,i,e,t,KC(Gg(o.data),a,i),r,!0)}return qy}const ma="en-US";let rT=ma;function kn(e,t,r,i){const s=N(),o=De(),a=Be();return function Zy(e,t,r,i,s,o,a){const c=yd(i),u=e.firstCreatePass&&ZC(e),d=t[We],f=WC(t);let h=!0;if(3&i.type||a){const m=tn(i,t),y=a?a(m):m,v=f.length,w=a?b=>a(je(b[i.index])):i.index;let _=null;if(!a&&c&&(_=function lj(e,t,r,i){const s=e.cleanup;if(null!=s)for(let o=0;ol?c[l]:null}"string"==typeof a&&(o+=2)}return null}(e,t,s,i.index)),null!==_)(_.__ngLastListenerFn__||_).__ngNextListenerFn__=o,_.__ngLastListenerFn__=o,h=!1;else{o=NT(i,t,d,o,!1);const b=r.listen(y,s,o);f.push(o,b),u&&u.push(s,w,v,v+1)}}else o=NT(i,t,d,o,!1);const p=i.outputs;let g;if(h&&null!==p&&(g=p[s])){const m=g.length;if(m)for(let y=0;y-1?An(e.index,t):t);let l=MT(t,r,i,a),u=o.__ngNextListenerFn__;for(;u;)l=MT(t,r,u,a)&&l,u=u.__ngNextListenerFn__;return s&&!1===l&&a.preventDefault(),l}}function It(e=1){return function cL(e){return(se.lFrame.contextLView=function jE(e,t){for(;e>0;)t=t[Mo],e--;return t}(e,se.lFrame.contextLView))[We]}(e)}function Yy(){return function _y(e,t){return e[ai].queries[t].queryList}(N(),Wg())}function xf(e){return Oo(function rL(){return se.lFrame.contextLView}(),fe+e)}function at(e,t=""){const r=N(),i=De(),s=e+fe,o=i.firstCreatePass?qo(i,s,1,t,null):i.data[s],a=JT(i,r,o,t,e);r[s]=a,Oc()&&Wd(i,r,a,o),Tr(o,!1)}let JT=(e,t,r,i,s)=>(xr(!0),function km(e,t){return e.createText(t)}(t[ie],i));function Af(e){return Fr("",e,""),Af}function Fr(e,t,r){const i=N(),s=function ra(e,t,r,i){return ft(e,ir(),r)?t+de(r)+i:he}(i,e,t,r);return s!==he&&function hi(e,t,r){const i=Ac(t,e);!function _C(e,t,r){e.setValue(t,r)}(e[ie],i,r)}(i,zt(),s),Fr}let kj=(()=>{class e{constructor(r){this._injector=r,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(r){if(!r.standalone)return null;if(!this.cachedInjectors.has(r)){const i=Dg(0,r.type),s=i.length>0?hf([i],this._injector,`Standalone[${r.type.name}]`):null;this.cachedInjectors.set(r,s)}return this.cachedInjectors.get(r)}ngOnDestroy(){try{for(const r of this.cachedInjectors.values())null!==r&&r.destroy()}finally{this.cachedInjectors.clear()}}static#e=this.\u0275prov=z({token:e,providedIn:"environment",factory:()=>new e(G(gn))})}return e})();function Mf(e){Rr("NgStandalone"),e.getStandaloneInjector=t=>t.get(kj).getOrCreateStandaloneInjector(e)}function d1(e,t,r,i,s,o){const a=t+r;return ft(e,a,s)?function Or(e,t,r){return e[t]=r}(e,a+1,o?i.call(o,s):i(s)):function Cl(e,t){const r=e[t];return r===he?void 0:r}(e,a+1)}function y1(e,t,r){const i=e+fe,s=N(),o=Oo(s,i);return function Sl(e,t){return e[F].data[t].pure}(s,i)?d1(s,function nn(){const e=se.lFrame;let t=e.bindingRootIndex;return-1===t&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}(),t,o.transform,r,o):o.transform(r)}let O1=(()=>{class e{log(r){console.log(r)}warn(r){console.warn(r)}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac,providedIn:"platform"})}return e})();const B1=new K(""),Pf=new K("");let lv,av=(()=>{class e{constructor(r,i,s){this._ngZone=r,this.registry=i,this._pendingCount=0,this._isZoneStable=!0,this._callbacks=[],this.taskTrackingZone=null,lv||(function q6(e){lv=e}(s),s.addToWindow(i)),this._watchAngularEvents(),r.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{Ne.assertNotInAngularZone(),queueMicrotask(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())queueMicrotask(()=>{for(;0!==this._callbacks.length;){let r=this._callbacks.pop();clearTimeout(r.timeoutId),r.doneCb()}});else{let r=this.getPendingTasks();this._callbacks=this._callbacks.filter(i=>!i.updateCb||!i.updateCb(r)||(clearTimeout(i.timeoutId),!1))}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(r=>({source:r.source,creationLocation:r.creationLocation,data:r.data})):[]}addCallback(r,i,s){let o=-1;i&&i>0&&(o=setTimeout(()=>{this._callbacks=this._callbacks.filter(a=>a.timeoutId!==o),r()},i)),this._callbacks.push({doneCb:r,timeoutId:o,updateCb:s})}whenStable(r,i,s){if(s&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(r,i,s),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(r){this.registry.registerApplication(r,this)}unregisterApplication(r){this.registry.unregisterApplication(r)}findProviders(r,i,s){return[]}static#e=this.\u0275fac=function(i){return new(i||e)(G(Ne),G(cv),G(Pf))};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac})}return e})(),cv=(()=>{class e{constructor(){this._applications=new Map}registerApplication(r,i){this._applications.set(r,i)}unregisterApplication(r){this._applications.delete(r)}unregisterAllApplications(){this._applications.clear()}getTestability(r){return this._applications.get(r)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(r,i=!0){return lv?.findTestabilityInTree(this,r,i)??null}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac,providedIn:"platform"})}return e})();function Lf(e){return!!e&&"function"==typeof e.then}function U1(e){return!!e&&"function"==typeof e.subscribe}const uv=new K("");let dv=(()=>{class e{constructor(){this.initialized=!1,this.done=!1,this.donePromise=new Promise((r,i)=>{this.resolve=r,this.reject=i}),this.appInits=P(uv,{optional:!0})??[]}runInitializers(){if(this.initialized)return;const r=[];for(const s of this.appInits){const o=s();if(Lf(o))r.push(o);else if(U1(o)){const a=new Promise((c,l)=>{o.subscribe({complete:c,error:l})});r.push(a)}}const i=()=>{this.done=!0,this.resolve()};Promise.all(r).then(()=>{i()}).catch(s=>{this.reject(s)}),0===r.length&&i(),this.initialized=!0}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const fv=new K("");function V1(e,t){return Array.isArray(t)?t.reduce(V1,e):{...e,...t}}let Br=(()=>{class e{constructor(){this._bootstrapListeners=[],this._runningTick=!1,this._destroyed=!1,this._destroyListeners=[],this._views=[],this.internalErrorHandler=P(wD),this.afterRenderEffectManager=P(ol),this.externalTestViews=new Set,this.beforeRender=new ot,this.afterTick=new ot,this.componentTypes=[],this.components=[],this.isStable=P(Ko).hasPendingTasks.pipe(Ue(r=>!r)),this._injector=P(gn)}get destroyed(){return this._destroyed}get injector(){return this._injector}bootstrap(r,i){const s=r instanceof lS;if(!this._injector.get(dv).done)throw!s&&function Ui(e){const t=we(e)||Et(e)||kt(e);return null!==t&&t.standalone}(r),new M(405,!1);let a;a=s?r:this._injector.get(sl).resolveComponentFactory(r),this.componentTypes.push(a.componentType);const c=function G6(e){return e.isBoundToModule}(a)?void 0:this._injector.get(Bs),u=a.create(qt.NULL,[],i||a.selector,c),d=u.location.nativeElement,f=u.injector.get(B1,null);return f?.registerApplication(d),u.onDestroy(()=>{this.detachView(u.hostView),Ff(this.components,u),f?.unregisterApplication(d)}),this._loadComponent(u),u}tick(){this._tick(!0)}_tick(r){if(this._runningTick)throw new M(101,!1);const i=me(null);try{this._runningTick=!0,this.detectChangesInAttachedViews(r)}catch(s){this.internalErrorHandler(s)}finally{this.afterTick.next(),this._runningTick=!1,me(i)}}detectChangesInAttachedViews(r){let i=0;const s=this.afterRenderEffectManager;for(;;){if(i===XC)throw new M(103,!1);if(r){const o=0===i;this.beforeRender.next(o);for(let{_lView:a,notifyErrorHandler:c}of this._views)Z6(a,o,c)}if(i++,s.executeInternalCallbacks(),![...this.externalTestViews.keys(),...this._views].some(({_lView:o})=>hv(o))&&(s.execute(),![...this.externalTestViews.keys(),...this._views].some(({_lView:o})=>hv(o))))break}}attachView(r){const i=r;this._views.push(i),i.attachToAppRef(this)}detachView(r){const i=r;Ff(this._views,i),i.detachFromAppRef()}_loadComponent(r){this.attachView(r.hostView),this.tick(),this.components.push(r);const i=this._injector.get(fv,[]);[...this._bootstrapListeners,...i].forEach(s=>s(r))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(r=>r()),this._views.slice().forEach(r=>r.destroy())}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(r){return this._destroyListeners.push(r),()=>Ff(this._destroyListeners,r)}destroy(){if(this._destroyed)throw new M(406,!1);const r=this._injector;r.destroy&&!r.destroyed&&r.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Ff(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}function Z6(e,t,r){!t&&!hv(e)||function K6(e,t,r){let i;r?(i=0,e[ee]|=1024):i=64&e[ee]?0:1,Jd(e,t,i)}(e,r,t)}function hv(e){return jg(e)}class Q6{constructor(t,r){this.ngModuleFactory=t,this.componentFactories=r}}let H1=(()=>{class e{compileModuleSync(r){return new Cy(r)}compileModuleAsync(r){return Promise.resolve(this.compileModuleSync(r))}compileModuleAndAllComponentsSync(r){const i=this.compileModuleSync(r),o=Rn(jt(r).declarations).reduce((a,c)=>{const l=we(c);return l&&a.push(new ll(l)),a},[]);return new Q6(i,o)}compileModuleAndAllComponentsAsync(r){return Promise.resolve(this.compileModuleAndAllComponentsSync(r))}clearCache(){}clearCacheFor(r){}getModuleId(r){}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),X6=(()=>{class e{constructor(){this.zone=P(Ne),this.applicationRef=P(Br)}initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function e$(){const e=P(Ne),t=P($n);return r=>e.runOutsideAngular(()=>t.handleError(r))}let n$=(()=>{class e{constructor(){this.subscription=new Rt,this.initialized=!1,this.zone=P(Ne),this.pendingTasks=P(Ko)}initialize(){if(this.initialized)return;this.initialized=!0;let r=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(r=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{Ne.assertNotInAngularZone(),queueMicrotask(()=>{null!==r&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(r),r=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{Ne.assertInAngularZone(),r??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const yi=new K("",{providedIn:"root",factory:()=>P(yi,Ee.Optional|Ee.SkipSelf)||function r$(){return typeof $localize<"u"&&$localize.locale||ma}()}),pv=new K("");let W1=(()=>{class e{constructor(r){this._injector=r,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(r,i){const s=function BB(e="zone.js",t){return"noop"===e?new gS:"zone.js"===e?new Ne(t):e}(i?.ngZone,function G1(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}({eventCoalescing:i?.ngZoneEventCoalescing,runCoalescing:i?.ngZoneRunCoalescing}));return s.run(()=>{const o=function A8(e,t,r){return new Dy(e,t,r)}(r.moduleType,this.injector,function q1(e){return[{provide:Ne,useFactory:e},{provide:Is,multi:!0,useFactory:()=>{const t=P(X6,{optional:!0});return()=>t.initialize()}},{provide:Is,multi:!0,useFactory:()=>{const t=P(n$);return()=>{t.initialize()}}},{provide:wD,useFactory:e$}]}(()=>s)),a=o.injector.get($n,null);return s.runOutsideAngular(()=>{const c=s.onError.subscribe({next:l=>{a.handleError(l)}});o.onDestroy(()=>{Ff(this._modules,o),c.unsubscribe()})}),function $1(e,t,r){try{const i=r();return Lf(i)?i.catch(s=>{throw t.runOutsideAngular(()=>e.handleError(s)),s}):i}catch(i){throw t.runOutsideAngular(()=>e.handleError(i)),i}}(a,s,()=>{const c=o.injector.get(dv);return c.runInitializers(),c.donePromise.then(()=>(function iT(e){"string"==typeof e&&(rT=e.toLowerCase().replace(/_/g,"-"))}(o.injector.get(yi,ma)||ma),this._moduleDoBootstrap(o),o))})})}bootstrapModule(r,i=[]){const s=V1({},i);return function J6(e,t,r){const i=new Cy(r);return Promise.resolve(i)}(0,0,r).then(o=>this.bootstrapModuleFactory(o,s))}_moduleDoBootstrap(r){const i=r.injector.get(Br);if(r._bootstrapComponents.length>0)r._bootstrapComponents.forEach(s=>i.bootstrap(s));else{if(!r.instance.ngDoBootstrap)throw new M(-403,!1);r.instance.ngDoBootstrap(i)}this._modules.push(r)}onDestroy(r){this._destroyListeners.push(r)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new M(404,!1);this._modules.slice().forEach(i=>i.destroy()),this._destroyListeners.forEach(i=>i());const r=this._injector.get(pv,null);r&&(r.forEach(i=>i()),r.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}static#e=this.\u0275fac=function(i){return new(i||e)(G(qt))};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac,providedIn:"platform"})}return e})(),Zi=null;const Z1=new K("");function K1(e,t,r=[]){const i=`Platform: ${t}`,s=new K(i);return(o=[])=>{let a=gv();if(!a||a.injector.get(Z1,!1)){const c=[...r,...o,{provide:s,useValue:!0}];e?e(c):function o$(e){if(Zi&&!Zi.get(Z1,!1))throw new M(400,!1);(function j1(){!function hk(e){Fb=e}(()=>{throw new M(600,!1)})})(),Zi=e;const t=e.get(W1);(function Y1(e){e.get($D,null)?.forEach(r=>r())})(e)}(function Q1(e=[],t){return qt.create({name:t,providers:[{provide:Ig,useValue:"platform"},{provide:pv,useValue:new Set([()=>Zi=null])},...e]})}(c,i))}return function a$(e){const t=gv();if(!t)throw new M(401,!1);return t}()}}function gv(){return Zi?.get(W1)??null}let Uf=(()=>{class e{static#e=this.__NG_ELEMENT_ID__=l$}return e})();function l$(e){return function u$(e,t,r){if(As(e)&&!r){const i=An(e.index,t);return new el(i,i)}return 47&e.type?new el(t[it],t):null}(Be(),N(),!(16&~e))}class nx{constructor(){}supports(t){return gf(t)}create(t){return new g$(t)}}const p$=(e,t)=>t;class g${constructor(t){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||p$}forEachItem(t){let r;for(r=this._itHead;null!==r;r=r._next)t(r)}forEachOperation(t){let r=this._itHead,i=this._removalsHead,s=0,o=null;for(;r||i;){const a=!i||r&&r.currentIndex{a=this._trackByFn(s,c),null!==r&&Object.is(r.trackById,a)?(i&&(r=this._verifyReinsertion(r,c,a,s)),Object.is(r.item,c)||this._addIdentityChange(r,c)):(r=this._mismatch(r,c,a,s),i=!0),r=r._next,s++}),this.length=s;return this._truncate(r),this.collection=t,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let t;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;t=t._nextMoved)t.previousIndex=t.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,r,i,s){let o;return null===t?o=this._itTail:(o=t._prev,this._remove(t)),null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(t.item,r)||this._addIdentityChange(t,r),this._reinsertAfter(t,o,s)):null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(i,s))?(Object.is(t.item,r)||this._addIdentityChange(t,r),this._moveAfter(t,o,s)):t=this._addAfter(new m$(r,i),o,s),t}_verifyReinsertion(t,r,i,s){let o=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==o?t=this._reinsertAfter(o,t._prev,s):t.currentIndex!=s&&(t.currentIndex=s,this._addToMoves(t,s)),t}_truncate(t){for(;null!==t;){const r=t._next;this._addToRemovals(this._unlink(t)),t=r}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(t,r,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);const s=t._prevRemoved,o=t._nextRemoved;return null===s?this._removalsHead=o:s._nextRemoved=o,null===o?this._removalsTail=s:o._prevRemoved=s,this._insertAfter(t,r,i),this._addToMoves(t,i),t}_moveAfter(t,r,i){return this._unlink(t),this._insertAfter(t,r,i),this._addToMoves(t,i),t}_addAfter(t,r,i){return this._insertAfter(t,r,i),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t}_insertAfter(t,r,i){const s=null===r?this._itHead:r._next;return t._next=s,t._prev=r,null===s?this._itTail=t:s._prev=t,null===r?this._itHead=t:r._next=t,null===this._linkedRecords&&(this._linkedRecords=new rx),this._linkedRecords.put(t),t.currentIndex=i,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);const r=t._prev,i=t._next;return null===r?this._itHead=i:r._next=i,null===i?this._itTail=r:i._prev=r,t}_addToMoves(t,r){return t.previousIndex===r||(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t),t}_addToRemovals(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new rx),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,r){return t.item=r,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t}}class m${constructor(t,r){this.item=t,this.trackById=r,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class y${constructor(){this._head=null,this._tail=null}add(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,r){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===r||r<=i.currentIndex)&&Object.is(i.trackById,t))return i;return null}remove(t){const r=t._prevDup,i=t._nextDup;return null===r?this._head=i:r._nextDup=i,null===i?this._tail=r:i._prevDup=r,null===this._head}}class rx{constructor(){this.map=new Map}put(t){const r=t.trackById;let i=this.map.get(r);i||(i=new y$,this.map.set(r,i)),i.add(t)}get(t,r){const s=this.map.get(t);return s?s.get(t,r):null}remove(t){const r=t.trackById;return this.map.get(r).remove(t)&&this.map.delete(r),t}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function ix(e,t,r){const i=e.previousIndex;if(null===i)return i;let s=0;return r&&i{class e{static#e=this.\u0275prov=z({token:e,providedIn:"root",factory:ox});constructor(r){this.factories=r}static create(r,i){if(null!=i){const s=i.factories.slice();r=r.concat(s)}return new e(r)}static extend(r){return{provide:e,useFactory:i=>e.create(r,i||ox()),deps:[[e,new id,new rd]]}}find(r){const i=this.factories.find(s=>s.supports(r));if(null!=i)return i;throw new M(901,!1)}}return e})();const E$=K1(null,"core",[]);let D$=(()=>{class e{constructor(r){}static#e=this.\u0275fac=function(i){return new(i||e)(G(Br))};static#t=this.\u0275mod=pn({type:e});static#r=this.\u0275inj=Jt({})}return e})(),Mx=null;function _a(){return Mx}class oV{}const Wt=new K("");let Cv=(()=>{class e{historyGo(r){throw new Error("")}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=z({token:e,factory:()=>P(cV),providedIn:"platform"})}return e})();const aV=new K("");let cV=(()=>{class e extends Cv{constructor(){super(),this._doc=P(Wt),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return _a().getBaseHref(this._doc)}onPopState(r){const i=_a().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",r,!1),()=>i.removeEventListener("popstate",r)}onHashChange(r){const i=_a().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",r,!1),()=>i.removeEventListener("hashchange",r)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(r){this._location.pathname=r}pushState(r,i,s){this._history.pushState(r,i,s)}replaceState(r,i,s){this._history.replaceState(r,i,s)}forward(){this._history.forward()}back(){this._history.back()}historyGo(r=0){this._history.go(r)}getState(){return this._history.state}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=z({token:e,factory:()=>new e,providedIn:"platform"})}return e})();function Sv(e,t){if(0==e.length)return t;if(0==t.length)return e;let r=0;return e.endsWith("/")&&r++,t.startsWith("/")&&r++,2==r?e+t.substring(1):1==r?e+t:e+"/"+t}function Nx(e){const t=e.match(/#|\?|$/),r=t&&t.index||e.length;return e.slice(0,r-("/"===e[r-1]?1:0))+e.slice(r)}function vi(e){return e&&"?"!==e[0]?"?"+e:e}let qs=(()=>{class e{historyGo(r){throw new Error("")}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=z({token:e,factory:()=>P(Ox),providedIn:"root"})}return e})();const Rx=new K("");let Ox=(()=>{class e extends qs{constructor(r,i){super(),this._platformLocation=r,this._removeListenerFns=[],this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??P(Wt).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(r){this._removeListenerFns.push(this._platformLocation.onPopState(r),this._platformLocation.onHashChange(r))}getBaseHref(){return this._baseHref}prepareExternalUrl(r){return Sv(this._baseHref,r)}path(r=!1){const i=this._platformLocation.pathname+vi(this._platformLocation.search),s=this._platformLocation.hash;return s&&r?`${i}${s}`:i}pushState(r,i,s,o){const a=this.prepareExternalUrl(s+vi(o));this._platformLocation.pushState(r,i,a)}replaceState(r,i,s,o){const a=this.prepareExternalUrl(s+vi(o));this._platformLocation.replaceState(r,i,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(r=0){this._platformLocation.historyGo?.(r)}static#e=this.\u0275fac=function(i){return new(i||e)(G(Cv),G(Rx,8))};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),lV=(()=>{class e extends qs{constructor(r,i){super(),this._platformLocation=r,this._baseHref="",this._removeListenerFns=[],null!=i&&(this._baseHref=i)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(r){this._removeListenerFns.push(this._platformLocation.onPopState(r),this._platformLocation.onHashChange(r))}getBaseHref(){return this._baseHref}path(r=!1){const i=this._platformLocation.hash??"#";return i.length>0?i.substring(1):i}prepareExternalUrl(r){const i=Sv(this._baseHref,r);return i.length>0?"#"+i:i}pushState(r,i,s,o){let a=this.prepareExternalUrl(s+vi(o));0==a.length&&(a=this._platformLocation.pathname),this._platformLocation.pushState(r,i,a)}replaceState(r,i,s,o){let a=this.prepareExternalUrl(s+vi(o));0==a.length&&(a=this._platformLocation.pathname),this._platformLocation.replaceState(r,i,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(r=0){this._platformLocation.historyGo?.(r)}static#e=this.\u0275fac=function(i){return new(i||e)(G(Cv),G(Rx,8))};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac})}return e})(),Ml=(()=>{class e{constructor(r){this._subject=new rn,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=r;const i=this._locationStrategy.getBaseHref();this._basePath=function fV(e){if(new RegExp("^(https?:)?//").test(e)){const[,r]=e.split(/\/\/[^\/]+/);return r}return e}(Nx(kx(i))),this._locationStrategy.onPopState(s=>{this._subject.emit({url:this.path(!0),pop:!0,state:s.state,type:s.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(r=!1){return this.normalize(this._locationStrategy.path(r))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(r,i=""){return this.path()==this.normalize(r+vi(i))}normalize(r){return e.stripTrailingSlash(function dV(e,t){if(!e||!t.startsWith(e))return t;const r=t.substring(e.length);return""===r||["/",";","?","#"].includes(r[0])?r:t}(this._basePath,kx(r)))}prepareExternalUrl(r){return r&&"/"!==r[0]&&(r="/"+r),this._locationStrategy.prepareExternalUrl(r)}go(r,i="",s=null){this._locationStrategy.pushState(s,"",r,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(r+vi(i)),s)}replaceState(r,i="",s=null){this._locationStrategy.replaceState(s,"",r,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(r+vi(i)),s)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(r=0){this._locationStrategy.historyGo?.(r)}onUrlChange(r){return this._urlChangeListeners.push(r),this._urlChangeSubscription??=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)}),()=>{const i=this._urlChangeListeners.indexOf(r);this._urlChangeListeners.splice(i,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(r="",i){this._urlChangeListeners.forEach(s=>s(r,i))}subscribe(r,i,s){return this._subject.subscribe({next:r,error:i,complete:s})}static#e=this.normalizeQueryParams=vi;static#t=this.joinWithSlash=Sv;static#r=this.stripTrailingSlash=Nx;static#h=this.\u0275fac=function(i){return new(i||e)(G(qs))};static#T=this.\u0275prov=z({token:e,factory:()=>function uV(){return new Ml(G(qs))}(),providedIn:"root"})}return e})();function kx(e){return e.replace(/\/index.html$/,"")}class XV{constructor(t,r,i,s){this.$implicit=t,this.ngForOf=r,this.index=i,this.count=s}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let qx=(()=>{class e{set ngForOf(r){this._ngForOf=r,this._ngForOfDirty=!0}set ngForTrackBy(r){this._trackByFn=r}get ngForTrackBy(){return this._trackByFn}constructor(r,i,s){this._viewContainer=r,this._template=i,this._differs=s,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(r){r&&(this._template=r)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const r=this._ngForOf;!this._differ&&r&&(this._differ=this._differs.find(r).create(this.ngForTrackBy))}if(this._differ){const r=this._differ.diff(this._ngForOf);r&&this._applyChanges(r)}}_applyChanges(r){const i=this._viewContainer;r.forEachOperation((s,o,a)=>{if(null==s.previousIndex)i.createEmbeddedView(this._template,new XV(s.item,this._ngForOf,-1,-1),null===a?void 0:a);else if(null==a)i.remove(null===o?void 0:o);else if(null!==o){const c=i.get(o);i.move(c,a),Gx(c,s)}});for(let s=0,o=i.length;s{Gx(i.get(s.currentIndex),s)})}static ngTemplateContextGuard(r,i){return!0}static#e=this.\u0275fac=function(i){return new(i||e)(X(or),X(pi),X(_v))};static#t=this.\u0275dir=Xt({type:e,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0})}return e})();function Gx(e,t){e.context.$implicit=t.item}let sh=(()=>{class e{constructor(r,i){this._viewContainer=r,this._context=new e5,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(r){this._context.$implicit=this._context.ngIf=r,this._updateView()}set ngIfThen(r){Wx("ngIfThen",r),this._thenTemplateRef=r,this._thenViewRef=null,this._updateView()}set ngIfElse(r){Wx("ngIfElse",r),this._elseTemplateRef=r,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(r,i){return!0}static#e=this.\u0275fac=function(i){return new(i||e)(X(or),X(pi))};static#t=this.\u0275dir=Xt({type:e,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0})}return e})();class e5{constructor(){this.$implicit=null,this.ngIf=null}}function Wx(e,t){if(t&&!t.createEmbeddedView)throw new Error(`${e} must be a TemplateRef, but received '${bt(t)}'.`)}let Ea=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=pn({type:e});static#r=this.\u0275inj=Jt({})}return e})();const Qx="browser";function Yx(e){return"server"===e}let M5=(()=>{class e{static#e=this.\u0275prov=z({token:e,providedIn:"root",factory:()=>function A5(e){return e===Qx}(P(ks))?new N5(P(Wt),window):new O5})}return e})();class N5{constructor(t,r){this.document=t,this.window=r,this.offset=()=>[0,0]}setOffset(t){this.offset=Array.isArray(t)?()=>t:t}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(t){this.window.scrollTo(t[0],t[1])}scrollToAnchor(t){const r=function R5(e,t){const r=e.getElementById(t)||e.getElementsByName(t)[0];if(r)return r;if("function"==typeof e.createTreeWalker&&e.body&&"function"==typeof e.body.attachShadow){const i=e.createTreeWalker(e.body,NodeFilter.SHOW_ELEMENT);let s=i.currentNode;for(;s;){const o=s.shadowRoot;if(o){const a=o.getElementById(t)||o.querySelector(`[name="${t}"]`);if(a)return a}s=i.nextNode()}}return null}(this.document,t);r&&(this.scrollToElement(r),r.focus())}setHistoryScrollRestoration(t){this.window.history.scrollRestoration=t}scrollToElement(t){const r=t.getBoundingClientRect(),i=r.left+this.window.pageXOffset,s=r.top+this.window.pageYOffset,o=this.offset();this.window.scrollTo(i-o[0],s-o[1])}}class O5{setOffset(t){}getScrollPosition(){return[0,0]}scrollToPosition(t){}scrollToAnchor(t){}setHistoryScrollRestoration(t){}}class cH extends oV{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class $v extends cH{static makeCurrent(){!function sV(e){Mx??=e}(new $v)}onAndCancel(t,r,i){return t.addEventListener(r,i),()=>{t.removeEventListener(r,i)}}dispatchEvent(t,r){t.dispatchEvent(r)}remove(t){t.parentNode&&t.parentNode.removeChild(t)}createElement(t,r){return(r=r||this.getDefaultDocument()).createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,r){return"window"===r?window:"document"===r?t:"body"===r?t.body:null}getBaseHref(t){const r=function lH(){return kl=kl||document.querySelector("base"),kl?kl.getAttribute("href"):null}();return null==r?null:function uH(e){return new URL(e,document.baseURI).pathname}(r)}resetBaseElement(){kl=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return function QV(e,t){t=encodeURIComponent(t);for(const r of e.split(";")){const i=r.indexOf("="),[s,o]=-1==i?[r,""]:[r.slice(0,i),r.slice(i+1)];if(s.trim()===t)return decodeURIComponent(o)}return null}(document.cookie,t)}}let kl=null,fH=(()=>{class e{build(){return new XMLHttpRequest}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac})}return e})();const Vv=new K("");let oA=(()=>{class e{constructor(r,i){this._zone=i,this._eventNameToPlugin=new Map,r.forEach(s=>{s.manager=this}),this._plugins=r.slice().reverse()}addEventListener(r,i,s){return this._findPluginFor(i).addEventListener(r,i,s)}getZone(){return this._zone}_findPluginFor(r){let i=this._eventNameToPlugin.get(r);if(i)return i;if(i=this._plugins.find(o=>o.supports(r)),!i)throw new M(5101,!1);return this._eventNameToPlugin.set(r,i),i}static#e=this.\u0275fac=function(i){return new(i||e)(G(Vv),G(Ne))};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac})}return e})();class aA{constructor(t){this._doc=t}}const Hv="ng-app-id";let cA=(()=>{class e{constructor(r,i,s,o={}){this.doc=r,this.appId=i,this.nonce=s,this.platformId=o,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=Yx(o),this.resetHostNodes()}addStyles(r){for(const i of r)1===this.changeUsageCount(i,1)&&this.onStyleAdded(i)}removeStyles(r){for(const i of r)this.changeUsageCount(i,-1)<=0&&this.onStyleRemoved(i)}ngOnDestroy(){const r=this.styleNodesInDOM;r&&(r.forEach(i=>i.remove()),r.clear());for(const i of this.getAllStyles())this.onStyleRemoved(i);this.resetHostNodes()}addHost(r){this.hostNodes.add(r);for(const i of this.getAllStyles())this.addStyleToHost(r,i)}removeHost(r){this.hostNodes.delete(r)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(r){for(const i of this.hostNodes)this.addStyleToHost(i,r)}onStyleRemoved(r){const i=this.styleRef;i.get(r)?.elements?.forEach(s=>s.remove()),i.delete(r)}collectServerRenderedStyles(){const r=this.doc.head?.querySelectorAll(`style[${Hv}="${this.appId}"]`);if(r?.length){const i=new Map;return r.forEach(s=>{null!=s.textContent&&i.set(s.textContent,s)}),i}return null}changeUsageCount(r,i){const s=this.styleRef;if(s.has(r)){const o=s.get(r);return o.usage+=i,o.usage}return s.set(r,{usage:i,elements:[]}),i}getStyleElement(r,i){const s=this.styleNodesInDOM,o=s?.get(i);if(o?.parentNode===r)return s.delete(i),o.removeAttribute(Hv),o;{const a=this.doc.createElement("style");return this.nonce&&a.setAttribute("nonce",this.nonce),a.textContent=i,this.platformIsServer&&a.setAttribute(Hv,this.appId),r.appendChild(a),a}}addStyleToHost(r,i){const s=this.getStyleElement(r,i),o=this.styleRef,a=o.get(i)?.elements;a?a.push(s):o.set(i,{elements:[s],usage:1})}resetHostNodes(){const r=this.hostNodes;r.clear(),r.add(this.doc.head)}static#e=this.\u0275fac=function(i){return new(i||e)(G(Wt),G(Nd),G(HD,8),G(ks))};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac})}return e})();const zv={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},qv=/%COMP%/g,mH=new K("",{providedIn:"root",factory:()=>!0});function uA(e,t){return t.map(r=>r.replace(qv,e))}let Gv=(()=>{class e{constructor(r,i,s,o,a,c,l,u=null){this.eventManager=r,this.sharedStylesHost=i,this.appId=s,this.removeStylesOnCompDestroy=o,this.doc=a,this.platformId=c,this.ngZone=l,this.nonce=u,this.rendererByCompId=new Map,this.platformIsServer=Yx(c),this.defaultRenderer=new Wv(r,a,l,this.platformIsServer)}createRenderer(r,i){if(!r||!i)return this.defaultRenderer;this.platformIsServer&&i.encapsulation===Jn.ShadowDom&&(i={...i,encapsulation:Jn.Emulated});const s=this.getOrCreateRenderer(r,i);return s instanceof fA?s.applyToHost(r):s instanceof Zv&&s.applyStyles(),s}getOrCreateRenderer(r,i){const s=this.rendererByCompId;let o=s.get(i.id);if(!o){const a=this.doc,c=this.ngZone,l=this.eventManager,u=this.sharedStylesHost,d=this.removeStylesOnCompDestroy,f=this.platformIsServer;switch(i.encapsulation){case Jn.Emulated:o=new fA(l,u,i,this.appId,d,a,c,f);break;case Jn.ShadowDom:return new _H(l,u,r,i,a,c,this.nonce,f);default:o=new Zv(l,u,i,d,a,c,f)}s.set(i.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}static#e=this.\u0275fac=function(i){return new(i||e)(G(oA),G(cA),G(Nd),G(mH),G(Wt),G(ks),G(Ne),G(HD))};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac})}return e})();class Wv{constructor(t,r,i,s){this.eventManager=t,this.doc=r,this.ngZone=i,this.platformIsServer=s,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(t,r){return r?this.doc.createElementNS(zv[r]||r,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,r){(dA(t)?t.content:t).appendChild(r)}insertBefore(t,r,i){t&&(dA(t)?t.content:t).insertBefore(r,i)}removeChild(t,r){t&&t.removeChild(r)}selectRootElement(t,r){let i="string"==typeof t?this.doc.querySelector(t):t;if(!i)throw new M(-5104,!1);return r||(i.textContent=""),i}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,r,i,s){if(s){r=s+":"+r;const o=zv[s];o?t.setAttributeNS(o,r,i):t.setAttribute(r,i)}else t.setAttribute(r,i)}removeAttribute(t,r,i){if(i){const s=zv[i];s?t.removeAttributeNS(s,r):t.removeAttribute(`${i}:${r}`)}else t.removeAttribute(r)}addClass(t,r){t.classList.add(r)}removeClass(t,r){t.classList.remove(r)}setStyle(t,r,i,s){s&(Hi.DashCase|Hi.Important)?t.style.setProperty(r,i,s&Hi.Important?"important":""):t.style[r]=i}removeStyle(t,r,i){i&Hi.DashCase?t.style.removeProperty(r):t.style[r]=""}setProperty(t,r,i){null!=t&&(t[r]=i)}setValue(t,r){t.nodeValue=r}listen(t,r,i){if("string"==typeof t&&!(t=_a().getGlobalEventTarget(this.doc,t)))throw new Error(`Unsupported event target ${t} for event ${r}`);return this.eventManager.addEventListener(t,r,this.decoratePreventDefault(i))}decoratePreventDefault(t){return r=>{if("__ngUnwrap__"===r)return t;!1===(this.platformIsServer?this.ngZone.runGuarded(()=>t(r)):t(r))&&r.preventDefault()}}}function dA(e){return"TEMPLATE"===e.tagName&&void 0!==e.content}class _H extends Wv{constructor(t,r,i,s,o,a,c,l){super(t,o,a,l),this.sharedStylesHost=r,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const u=uA(s.id,s.styles);for(const d of u){const f=document.createElement("style");c&&f.setAttribute("nonce",c),f.textContent=d,this.shadowRoot.appendChild(f)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,r){return super.appendChild(this.nodeOrShadowRoot(t),r)}insertBefore(t,r,i){return super.insertBefore(this.nodeOrShadowRoot(t),r,i)}removeChild(t,r){return super.removeChild(this.nodeOrShadowRoot(t),r)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class Zv extends Wv{constructor(t,r,i,s,o,a,c,l){super(t,o,a,c),this.sharedStylesHost=r,this.removeStylesOnCompDestroy=s,this.styles=l?uA(l,i.styles):i.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}}class fA extends Zv{constructor(t,r,i,s,o,a,c,l){const u=s+"-"+i.id;super(t,r,i,o,a,c,l,u),this.contentAttr=function yH(e){return"_ngcontent-%COMP%".replace(qv,e)}(u),this.hostAttr=function vH(e){return"_nghost-%COMP%".replace(qv,e)}(u)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,r){const i=super.createElement(t,r);return super.setAttribute(i,this.contentAttr,""),i}}let bH=(()=>{class e extends aA{constructor(r){super(r)}supports(r){return!0}addEventListener(r,i,s){return r.addEventListener(i,s,!1),()=>this.removeEventListener(r,i,s)}removeEventListener(r,i,s){return r.removeEventListener(i,s)}static#e=this.\u0275fac=function(i){return new(i||e)(G(Wt))};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac})}return e})();const hA=["alt","control","meta","shift"],EH={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},DH={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey};let CH=(()=>{class e extends aA{constructor(r){super(r)}supports(r){return null!=e.parseEventName(r)}addEventListener(r,i,s){const o=e.parseEventName(i),a=e.eventCallback(o.fullKey,s,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>_a().onAndCancel(r,o.domEventName,a))}static parseEventName(r){const i=r.toLowerCase().split("."),s=i.shift();if(0===i.length||"keydown"!==s&&"keyup"!==s)return null;const o=e._normalizeKey(i.pop());let a="",c=i.indexOf("code");if(c>-1&&(i.splice(c,1),a="code."),hA.forEach(u=>{const d=i.indexOf(u);d>-1&&(i.splice(d,1),a+=u+".")}),a+=o,0!=i.length||0===o.length)return null;const l={};return l.domEventName=s,l.fullKey=a,l}static matchEventFullKeyCode(r,i){let s=EH[r.key]||r.key,o="";return i.indexOf("code.")>-1&&(s=r.code,o="code."),!(null==s||!s)&&(s=s.toLowerCase()," "===s?s="space":"."===s&&(s="dot"),hA.forEach(a=>{a!==s&&(0,DH[a])(r)&&(o+=a+".")}),o+=s,o===i)}static eventCallback(r,i,s){return o=>{e.matchEventFullKeyCode(o,r)&&s.runGuarded(()=>i(o))}}static _normalizeKey(r){return"esc"===r?"escape":r}static#e=this.\u0275fac=function(i){return new(i||e)(G(Wt))};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac})}return e})();const gA=[{provide:ks,useValue:Qx},{provide:$D,useValue:function SH(){$v.makeCurrent()},multi:!0},{provide:Wt,useFactory:function TH(){return function sF(e){dm=e}(document),document},deps:[]}],xH=K1(E$,"browser",gA),AH=new K(""),mA=[{provide:Pf,useClass:class dH{addToWindow(t){Pe.getAngularTestability=(i,s=!0)=>{const o=t.findTestabilityInTree(i,s);if(null==o)throw new M(5103,!1);return o},Pe.getAllAngularTestabilities=()=>t.getAllTestabilities(),Pe.getAllAngularRootElements=()=>t.getAllRootElements(),Pe.frameworkStabilizers||(Pe.frameworkStabilizers=[]),Pe.frameworkStabilizers.push(i=>{const s=Pe.getAllAngularTestabilities();let o=s.length;const a=function(){o--,0==o&&i()};s.forEach(c=>{c.whenStable(a)})})}findTestabilityInTree(t,r,i){return null==r?null:t.getTestability(r)??(i?_a().isShadowRoot(r)?this.findTestabilityInTree(t,r.host,!0):this.findTestabilityInTree(t,r.parentElement,!0):null)}},deps:[]},{provide:B1,useClass:av,deps:[Ne,cv,Pf]},{provide:av,useClass:av,deps:[Ne,cv,Pf]}],yA=[{provide:Ig,useValue:"root"},{provide:$n,useFactory:function IH(){return new $n},deps:[]},{provide:Vv,useClass:bH,multi:!0,deps:[Wt,Ne,ks]},{provide:Vv,useClass:CH,multi:!0,deps:[Wt]},Gv,cA,oA,{provide:sy,useExisting:Gv},{provide:class k5{},useClass:fH,deps:[]},[]];let vA=(()=>{class e{constructor(r){}static withServerTransition(r){return{ngModule:e,providers:[{provide:Nd,useValue:r.appId}]}}static#e=this.\u0275fac=function(i){return new(i||e)(G(AH,12))};static#t=this.\u0275mod=pn({type:e});static#r=this.\u0275inj=Jt({providers:[...yA,...mA],imports:[Ea,D$]})}return e})(),MH=(()=>{class e{constructor(r){this._doc=r}getTitle(){return this._doc.title}setTitle(r){this._doc.title=r||""}static#e=this.\u0275fac=function(i){return new(i||e)(G(Wt))};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),bA=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=z({token:e,factory:function(i){let s=null;return s=i?new(i||e):G(kH),s},providedIn:"root"})}return e})(),kH=(()=>{class e extends bA{constructor(r){super(),this._doc=r}sanitize(r,i){if(null==i)return null;switch(r){case Nn.NONE:return i;case Nn.HTML:return Mr(i,"HTML")?Mn(i):cC(this._doc,String(i)).toString();case Nn.STYLE:return Mr(i,"Style")?Mn(i):i;case Nn.SCRIPT:if(Mr(i,"Script"))return Mn(i);throw new M(5200,!1);case Nn.URL:return Mr(i,"URL")?Mn(i):jd(String(i));case Nn.RESOURCE_URL:if(Mr(i,"ResourceURL"))return Mn(i);throw new M(5201,!1);default:throw new M(5202,!1)}}bypassSecurityTrustHtml(r){return function IF(e){return new _F(e)}(r)}bypassSecurityTrustStyle(r){return function TF(e){return new bF(e)}(r)}bypassSecurityTrustScript(r){return function xF(e){return new EF(e)}(r)}bypassSecurityTrustUrl(r){return function AF(e){return new DF(e)}(r)}bypassSecurityTrustResourceUrl(r){return function MF(e){return new CF(e)}(r)}static#e=this.\u0275fac=function(i){return new(i||e)(G(Wt))};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Kv=(()=>{class e{constructor(){this.wannachatStatusDefaultTimeoutInSeconds=20}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac})}return e})(),PH=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=pn({type:e});static#r=this.\u0275inj=Jt({providers:[Kv],imports:[Ea]})}return e})();function Qv(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function Yv(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function Ll(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}const Jv="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,Xv=e=>e instanceof Uint8Array,e0=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),Ur=(e,t)=>e<<32-t|e>>>t;if(68!==new Uint8Array(new Uint32Array([287454020]).buffer)[0])throw new Error("Non little-endian hardware is not supported");function Fl(e){if("string"==typeof e&&(e=function UH(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}(e)),!Xv(e))throw new Error("expected Uint8Array, got "+typeof e);return e}class SA{clone(){return this._cloneInto()}}function VH(e){const t=i=>e().update(Fl(i)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function IA(e=32){if(Jv&&"function"==typeof Jv.getRandomValues)return Jv.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}class zH extends SA{constructor(t,r,i,s){super(),this.blockLen=t,this.outputLen=r,this.padOffset=i,this.isLE=s,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=e0(this.buffer)}update(t){Ll(this);const{view:r,buffer:i,blockLen:s}=this,o=(t=Fl(t)).length;for(let a=0;as-a&&(this.process(i,0),a=0);for(let f=a;f>s&o),c=Number(r&o),u=i?0:4;e.setUint32(t+(i?4:0),a,i),e.setUint32(t+u,c,i)})(i,s-8,BigInt(8*this.length),o),this.process(i,0);const c=e0(t),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=l/4,d=this.get();if(u>d.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;fe&t^~e&r,GH=(e,t,r)=>e&t^e&r^t&r,WH=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Ki=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Qi=new Uint32Array(64);class TA extends zH{constructor(){super(64,32,8,!1),this.A=0|Ki[0],this.B=0|Ki[1],this.C=0|Ki[2],this.D=0|Ki[3],this.E=0|Ki[4],this.F=0|Ki[5],this.G=0|Ki[6],this.H=0|Ki[7]}get(){const{A:t,B:r,C:i,D:s,E:o,F:a,G:c,H:l}=this;return[t,r,i,s,o,a,c,l]}set(t,r,i,s,o,a,c,l){this.A=0|t,this.B=0|r,this.C=0|i,this.D=0|s,this.E=0|o,this.F=0|a,this.G=0|c,this.H=0|l}process(t,r){for(let f=0;f<16;f++,r+=4)Qi[f]=t.getUint32(r,!1);for(let f=16;f<64;f++){const h=Qi[f-15],p=Qi[f-2],g=Ur(h,7)^Ur(h,18)^h>>>3,m=Ur(p,17)^Ur(p,19)^p>>>10;Qi[f]=m+Qi[f-7]+g+Qi[f-16]|0}let{A:i,B:s,C:o,D:a,E:c,F:l,G:u,H:d}=this;for(let f=0;f<64;f++){const p=d+(Ur(c,6)^Ur(c,11)^Ur(c,25))+qH(c,l,u)+WH[f]+Qi[f]|0,m=(Ur(i,2)^Ur(i,13)^Ur(i,22))+GH(i,s,o)|0;d=u,u=l,l=c,c=a+p|0,a=o,o=s,s=i,i=p+m|0}i=i+this.A|0,s=s+this.B|0,o=o+this.C|0,a=a+this.D|0,c=c+this.E|0,l=l+this.F|0,u=u+this.G|0,d=d+this.H|0,this.set(i,s,o,a,c,l,u,d)}roundClean(){Qi.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const n0=VH(()=>new TA),lh=(BigInt(0),BigInt(1)),ZH=BigInt(2),uh=e=>e instanceof Uint8Array,KH=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Da(e){if(!uh(e))throw new Error("Uint8Array expected");let t="";for(let r=0;ri+s.length,0));let r=0;return e.forEach(i=>{if(!uh(i))throw new Error("Uint8Array expected");t.set(i,r),r+=i.length}),t}const o0=e=>(ZH<new Uint8Array(e),MA=e=>Uint8Array.from(e);function NA(e,t,r){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof r)throw new Error("hmacFn must be a function");let i=a0(e),s=a0(e),o=0;const a=()=>{i.fill(1),s.fill(0),o=0},c=(...f)=>r(s,i,...f),l=(f=a0())=>{s=c(MA([0]),f),i=c(),0!==f.length&&(s=c(MA([1]),f),i=c())},u=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let f=0;const h=[];for(;f{let p;for(a(),l(f);!(p=h(u()));)l();return a(),p}}const YH={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||e instanceof Uint8Array,isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};function Bl(e,t,r={}){const i=(s,o,a)=>{const c=YH[o];if("function"!=typeof c)throw new Error(`Invalid validator "${o}", expected function`);const l=e[s];if(!(a&&void 0===l||c(l,e)))throw new Error(`Invalid param ${String(s)}=${l} (${typeof l}), expected ${o}`)};for(const[s,o]of Object.entries(t))i(s,o,!1);for(const[s,o]of Object.entries(r))i(s,o,!0);return e}const xt=BigInt(0),ze=BigInt(1),Ji=BigInt(2),JH=BigInt(3),c0=BigInt(4),RA=BigInt(5),OA=BigInt(8);function At(e,t){const r=e%t;return r>=xt?r:t+r}function t9(e,t,r){if(r<=xt||t 0");if(r===ze)return xt;let i=ze;for(;t>xt;)t&ze&&(i=i*e%r),e=e*e%r,t>>=ze;return i}function Gn(e,t,r){let i=e;for(;t-- >xt;)i*=i,i%=r;return i}function dh(e,t){if(e===xt||t<=xt)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=At(e,t),i=t,s=xt,o=ze,a=ze,c=xt;for(;r!==xt;){const u=i/r,d=i%r,f=s-a*u,h=o-c*u;i=r,r=d,s=a,o=c,a=f,c=h}if(i!==ze)throw new Error("invert: does not exist");return At(s,t)}BigInt(9),BigInt(16);const i9=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function l0(e,t){const r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function kA(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function PA(e){const t=kA(e);return t+Math.ceil(t/2)}class LA extends SA{constructor(t,r){super(),this.finished=!1,this.destroyed=!1,function DA(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");Qv(e.outputLen),Qv(e.blockLen)}(t);const i=Fl(r);if(this.iHash=t.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,o=new Uint8Array(s);o.set(i.length>s?t.create().update(i).digest():i);for(let a=0;anew LA(e,t).update(r).digest();FA.create=(e,t)=>new LA(e,t);const u9=BigInt(0),u0=BigInt(1);function BA(e){return function s9(e){Bl(e,i9.reduce((i,s)=>(i[s]="function",i),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"}))}(e.Fp),Bl(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...l0(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}const{Ph:h9,aT:p9}=gc,Ws={Err:class extends Error{constructor(t=""){super(t)}},_parseInt(e){const{Err:t}=Ws;if(e.length<2||2!==e[0])throw new t("Invalid signature integer tag");const r=e[1],i=e.subarray(2,r+2);if(!r||i.length!==r)throw new t("Invalid signature integer: wrong length");if(128&i[0])throw new t("Invalid signature integer: negative");if(0===i[0]&&!(128&i[1]))throw new t("Invalid signature integer: unnecessary leading zero");return{d:h9(i),l:e.subarray(r+2)}},toSig(e){const{Err:t}=Ws,r="string"==typeof e?p9(e):e;if(!(r instanceof Uint8Array))throw new Error("ui8a expected");let i=r.length;if(i<2||48!=r[0])throw new t("Invalid signature tag");if(r[1]!==i-2)throw new t("Invalid signature: incorrect length");const{d:s,l:o}=Ws._parseInt(r.subarray(2)),{d:a,l:c}=Ws._parseInt(o);if(c.length)throw new t("Invalid signature: left bytes after parsing");return{r:s,s:a}},hexFromSig(e){const t=u=>8&Number.parseInt(u[0],16)?"00"+u:u,r=u=>{const d=u.toString(16);return 1&d.length?`0${d}`:d},i=t(r(e.s)),s=t(r(e.r)),o=i.length/2,a=s.length/2,c=r(o),l=r(a);return`30${r(a+o+4)}02${l}${s}02${c}${i}`}},dr=BigInt(0),ct=BigInt(1),fh=(BigInt(2),BigInt(3));function y9(e){const t=function m9(e){const t=BA(e);return Bl(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:r,n:i}=t,s=r.BYTES+1,o=2*r.BYTES+1;function c(I){return At(I,i)}function l(I){return dh(I,i)}const{ProjectivePoint:u,normPrivateKeyToScalar:d,weierstrassEquation:f,isWithinCurveOrder:h}=function g9(e){const t=function f9(e){const t=BA(e);Bl(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:i,a:s}=t;if(r){if(!i.eql(s,i.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:r}=t,i=t.toBytes||((g,m,y)=>{const v=m.toAffine();return Gs(Uint8Array.from([4]),r.toBytes(v.x),r.toBytes(v.y))}),s=t.fromBytes||(g=>{const m=g.subarray(1);return{x:r.fromBytes(m.subarray(0,r.BYTES)),y:r.fromBytes(m.subarray(r.BYTES,2*r.BYTES))}});function o(g){const{a:m,b:y}=t,v=r.sqr(g),w=r.mul(v,g);return r.add(r.add(w,r.mul(g,m)),y)}if(!r.eql(r.sqr(t.Gy),o(t.Gx)))throw new Error("bad generator point: equation left != right");function a(g){return"bigint"==typeof g&&drr.eql(_,r.ZERO);return w(y)&&w(v)?f.ZERO:new f(y,v,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(m){const y=r.invertBatch(m.map(v=>v.pz));return m.map((v,w)=>v.toAffine(y[w])).map(f.fromAffine)}static fromHex(m){const y=f.fromAffine(s(Zt("pointHex",m)));return y.assertValidity(),y}static fromPrivateKey(m){return f.BASE.multiply(l(m))}_setWindowSize(m){this._WINDOW_SIZE=m,u.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!r.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:m,y}=this.toAffine();if(!r.isValid(m)||!r.isValid(y))throw new Error("bad point: x or y not FE");const v=r.sqr(y),w=o(m);if(!r.eql(v,w))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:m}=this.toAffine();if(r.isOdd)return!r.isOdd(m);throw new Error("Field doesn't support isOdd")}equals(m){d(m);const{px:y,py:v,pz:w}=this,{px:_,py:b,pz:C}=m,D=r.eql(r.mul(y,C),r.mul(_,w)),S=r.eql(r.mul(v,C),r.mul(b,w));return D&&S}negate(){return new f(this.px,r.neg(this.py),this.pz)}double(){const{a:m,b:y}=t,v=r.mul(y,fh),{px:w,py:_,pz:b}=this;let C=r.ZERO,D=r.ZERO,S=r.ZERO,T=r.mul(w,w),O=r.mul(_,_),U=r.mul(b,b),B=r.mul(w,_);return B=r.add(B,B),S=r.mul(w,b),S=r.add(S,S),C=r.mul(m,S),D=r.mul(v,U),D=r.add(C,D),C=r.sub(O,D),D=r.add(O,D),D=r.mul(C,D),C=r.mul(B,C),S=r.mul(v,S),U=r.mul(m,U),B=r.sub(T,U),B=r.mul(m,B),B=r.add(B,S),S=r.add(T,T),T=r.add(S,T),T=r.add(T,U),T=r.mul(T,B),D=r.add(D,T),U=r.mul(_,b),U=r.add(U,U),T=r.mul(U,B),C=r.sub(C,T),S=r.mul(U,O),S=r.add(S,S),S=r.add(S,S),new f(C,D,S)}add(m){d(m);const{px:y,py:v,pz:w}=this,{px:_,py:b,pz:C}=m;let D=r.ZERO,S=r.ZERO,T=r.ZERO;const O=t.a,U=r.mul(t.b,fh);let B=r.mul(y,_),j=r.mul(v,b),Y=r.mul(w,C),k=r.add(y,v),I=r.add(_,b);k=r.mul(k,I),I=r.add(B,j),k=r.sub(k,I),I=r.add(y,w);let E=r.add(_,C);return I=r.mul(I,E),E=r.add(B,Y),I=r.sub(I,E),E=r.add(v,w),D=r.add(b,C),E=r.mul(E,D),D=r.add(j,Y),E=r.sub(E,D),T=r.mul(O,I),D=r.mul(U,Y),T=r.add(D,T),D=r.sub(j,T),T=r.add(j,T),S=r.mul(D,T),j=r.add(B,B),j=r.add(j,B),Y=r.mul(O,Y),I=r.mul(U,I),j=r.add(j,Y),Y=r.sub(B,Y),Y=r.mul(O,Y),I=r.add(I,Y),B=r.mul(j,I),S=r.add(S,B),B=r.mul(E,I),D=r.mul(k,D),D=r.sub(D,B),B=r.mul(k,j),T=r.mul(E,T),T=r.add(T,B),new f(D,S,T)}subtract(m){return this.add(m.negate())}is0(){return this.equals(f.ZERO)}wNAF(m){return p.wNAFCached(this,u,m,y=>{const v=r.invertBatch(y.map(w=>w.pz));return y.map((w,_)=>w.toAffine(v[_])).map(f.fromAffine)})}multiplyUnsafe(m){const y=f.ZERO;if(m===dr)return y;if(c(m),m===ct)return this;const{endo:v}=t;if(!v)return p.unsafeLadder(this,m);let{k1neg:w,k1:_,k2neg:b,k2:C}=v.splitScalar(m),D=y,S=y,T=this;for(;_>dr||C>dr;)_&ct&&(D=D.add(T)),C&ct&&(S=S.add(T)),T=T.double(),_>>=ct,C>>=ct;return w&&(D=D.negate()),b&&(S=S.negate()),S=new f(r.mul(S.px,v.beta),S.py,S.pz),D.add(S)}multiply(m){c(m);let v,w,y=m;const{endo:_}=t;if(_){const{k1neg:b,k1:C,k2neg:D,k2:S}=_.splitScalar(y);let{p:T,f:O}=this.wNAF(C),{p:U,f:B}=this.wNAF(S);T=p.constTimeNegate(b,T),U=p.constTimeNegate(D,U),U=new f(r.mul(U.px,_.beta),U.py,U.pz),v=T.add(U),w=O.add(B)}else{const{p:b,f:C}=this.wNAF(y);v=b,w=C}return f.normalizeZ([v,w])[0]}multiplyAndAddUnsafe(m,y,v){const w=f.BASE,_=(C,D)=>D!==dr&&D!==ct&&C.equals(w)?C.multiply(D):C.multiplyUnsafe(D),b=_(this,y).add(_(m,v));return b.is0()?void 0:b}toAffine(m){const{px:y,py:v,pz:w}=this,_=this.is0();null==m&&(m=_?r.ONE:r.inv(w));const b=r.mul(y,m),C=r.mul(v,m),D=r.mul(w,m);if(_)return{x:r.ZERO,y:r.ZERO};if(!r.eql(D,r.ONE))throw new Error("invZ was invalid");return{x:b,y:C}}isTorsionFree(){const{h:m,isTorsionFree:y}=t;if(m===ct)return!0;if(y)return y(f,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:m,clearCofactor:y}=t;return m===ct?this:y?y(f,this):this.multiplyUnsafe(t.h)}toRawBytes(m=!0){return this.assertValidity(),i(f,this,m)}toHex(m=!0){return Da(this.toRawBytes(m))}}f.BASE=new f(t.Gx,t.Gy,r.ONE),f.ZERO=new f(r.ZERO,r.ONE,r.ZERO);const h=t.nBitLength,p=function d9(e,t){const r=(s,o)=>{const a=o.negate();return s?a:o},i=s=>({windows:Math.ceil(t/s)+1,windowSize:2**(s-1)});return{constTimeNegate:r,unsafeLadder(s,o){let a=e.ZERO,c=s;for(;o>u9;)o&u0&&(a=a.add(c)),c=c.double(),o>>=u0;return a},precomputeWindow(s,o){const{windows:a,windowSize:c}=i(o),l=[];let u=s,d=u;for(let f=0;f>=p,y>l&&(y-=h,a+=u0);const v=m,w=m+Math.abs(y)-1,b=y<0;0===y?d=d.add(r(g%2!=0,o[v])):u=u.add(r(b,o[w]))}return{p:u,f:d}},wNAFCached(s,o,a,c){const l=s._WINDOW_SIZE||1;let u=o.get(s);return u||(u=this.precomputeWindow(s,l),1!==l&&o.set(s,c(u))),this.wNAF(l,u,a)}}}(f,t.endo?Math.ceil(h/2):h);return{CURVE:t,ProjectivePoint:f,normPrivateKeyToScalar:l,weierstrassEquation:o,isWithinCurveOrder:a}}({...t,toBytes(I,E,x){const R=E.toAffine(),A=r.toBytes(R.x),H=Gs;return x?H(Uint8Array.from([E.hasEvenY()?2:3]),A):H(Uint8Array.from([4]),A,r.toBytes(R.y))},fromBytes(I){const E=I.length,x=I[0],R=I.subarray(1);if(E!==s||2!==x&&3!==x){if(E===o&&4===x)return{x:r.fromBytes(R.subarray(0,r.BYTES)),y:r.fromBytes(R.subarray(r.BYTES,2*r.BYTES))};throw new Error(`Point of length ${E} was invalid. Expected ${s} compressed bytes or ${o} uncompressed bytes`)}{const A=wn(R);if(!function a(I){return drDa(Yi(I,t.nByteLength));function g(I){return I>i>>ct}const y=(I,E,x)=>wn(I.slice(E,x));class v{constructor(E,x,R){this.r=E,this.s=x,this.recovery=R,this.assertValidity()}static fromCompact(E){const x=t.nByteLength;return E=Zt("compactSignature",E,2*x),new v(y(E,0,x),y(E,x,2*x))}static fromDER(E){const{r:x,s:R}=Ws.toSig(Zt("DER",E));return new v(x,R)}assertValidity(){if(!h(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!h(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(E){return new v(this.r,this.s,E)}recoverPublicKey(E){const{r:x,s:R,recovery:A}=this,H=S(Zt("msgHash",E));if(null==A||![0,1,2,3].includes(A))throw new Error("recovery id invalid");const Q=2===A||3===A?x+t.n:x;if(Q>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const _e=u.fromHex((1&A?"03":"02")+p(Q)),le=l(Q),lt=c(-H*le),st=c(R*le),Se=u.BASE.multiplyAndAddUnsafe(_e,lt,st);if(!Se)throw new Error("point at infinify");return Se.assertValidity(),Se}hasHighS(){return g(this.s)}normalizeS(){return this.hasHighS()?new v(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return Ca(this.toDERHex())}toDERHex(){return Ws.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Ca(this.toCompactHex())}toCompactHex(){return p(this.r)+p(this.s)}}const w={isValidPrivateKey(I){try{return d(I),!0}catch{return!1}},normPrivateKeyToScalar:d,randomPrivateKey:()=>{const I=PA(t.n);return function l9(e,t,r=!1){const i=e.length,s=kA(t),o=PA(t);if(i<16||i1024)throw new Error(`expected ${o}-1024 bytes of input, got ${i}`);const c=At(r?wn(e):r0(e),t-ze)+ze;return r?s0(c,s):Yi(c,s)}(t.randomBytes(I),t.n)},precompute:(I=8,E=u.BASE)=>(E._setWindowSize(I),E.multiply(BigInt(3)),E)};function b(I){const E=I instanceof Uint8Array,x="string"==typeof I,R=(E||x)&&I.length;return E?R===s||R===o:x?R===2*s||R===2*o:I instanceof u}const D=t.bits2int||function(I){const E=wn(I),x=8*I.length-t.nBitLength;return x>0?E>>BigInt(x):E},S=t.bits2int_modN||function(I){return c(D(I))},T=o0(t.nBitLength);function O(I){if("bigint"!=typeof I)throw new Error("bigint expected");if(!(dr<=I&&IAe in x))throw new Error("sign() legacy options not supported");const{hash:R,randomBytes:A}=t;let{lowS:H,prehash:Q,extraEntropy:J}=x;null==H&&(H=!0),I=Zt("msgHash",I),Q&&(I=Zt("prehashed msgHash",R(I)));const _e=S(I),le=d(E),lt=[O(le),O(_e)];if(null!=J){const Ae=!0===J?A(r.BYTES):J;lt.push(Zt("extraEntropy",Ae))}const st=Gs(...lt),Se=_e;return{seed:st,k2sig:function tt(Ae){const Cn=D(Ae);if(!h(Cn))return;const Bt=l(Cn),Ut=u.BASE.multiply(Cn).toAffine(),br=c(Ut.x);if(br===dr)return;const go=c(Bt*c(Se+br*le));if(go===dr)return;let Vu=(Ut.x===br?0:2)|Number(Ut.y&ct),sk=go;return H&&g(go)&&(sk=function m(I){return g(I)?c(-I):I}(go),Vu^=1),new v(br,sk,Vu)}}}(I,E,x);return NA(t.hash.outputLen,t.nByteLength,t.hmac)(R,A)},verify:function k(I,E,x,R=j){const A=I;if(E=Zt("msgHash",E),x=Zt("publicKey",x),"strict"in R)throw new Error("options.strict was renamed to lowS");const{lowS:H,prehash:Q}=R;let J,_e;try{if("string"==typeof A||A instanceof Uint8Array)try{J=v.fromDER(A)}catch(Ut){if(!(Ut instanceof Ws.Err))throw Ut;J=v.fromCompact(A)}else{if("object"!=typeof A||"bigint"!=typeof A.r||"bigint"!=typeof A.s)throw new Error("PARSE");{const{r:Ut,s:br}=A;J=new v(Ut,br)}}_e=u.fromHex(x)}catch(Ut){if("PARSE"===Ut.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(H&&J.hasHighS())return!1;Q&&(E=t.hash(E));const{r:le,s:lt}=J,st=S(E),Se=l(lt),tt=c(st*Se),Ae=c(le*Se),Cn=u.BASE.multiplyAndAddUnsafe(_e,tt,Ae)?.toAffine();return!!Cn&&c(Cn.x)===le},ProjectivePoint:u,Signature:v,utils:w}}function w9(e){return{hash:e,hmac:(t,...r)=>FA(e,t,function jH(...e){const t=new Uint8Array(e.reduce((i,s)=>i+s.length,0));let r=0;return e.forEach(i=>{if(!Xv(i))throw new Error("Uint8Array expected");t.set(i,r),r+=i.length}),t}(...r)),randomBytes:IA}}BigInt(4);const hh=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),ph=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),jA=BigInt(1),gh=BigInt(2),$A=(e,t)=>(e+t/gh)/t;function VA(e){const t=hh,r=BigInt(3),i=BigInt(6),s=BigInt(11),o=BigInt(22),a=BigInt(23),c=BigInt(44),l=BigInt(88),u=e*e*e%t,d=u*u*e%t,f=Gn(d,r,t)*d%t,h=Gn(f,r,t)*d%t,p=Gn(h,gh,t)*u%t,g=Gn(p,s,t)*p%t,m=Gn(g,o,t)*g%t,y=Gn(m,c,t)*m%t,v=Gn(y,l,t)*y%t,w=Gn(v,c,t)*m%t,_=Gn(w,r,t)*d%t,b=Gn(_,a,t)*g%t,C=Gn(b,i,t)*u%t,D=Gn(C,gh,t);if(!d0.eql(d0.sqr(D),e))throw new Error("Cannot find square root");return D}const d0=function c9(e,t,r=!1,i={}){if(e<=xt)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:s,nByteLength:o}=l0(e,t);if(o>2048)throw new Error("Field lengths over 2048 bytes are not supported");const a=function r9(e){if(e%c0===JH){const t=(e+ze)/c0;return function(i,s){const o=i.pow(s,t);if(!i.eql(i.sqr(o),s))throw new Error("Cannot find square root");return o}}if(e%OA===RA){const t=(e-RA)/OA;return function(i,s){const o=i.mul(s,Ji),a=i.pow(o,t),c=i.mul(s,a),l=i.mul(i.mul(c,Ji),a),u=i.mul(c,i.sub(l,i.ONE));if(!i.eql(i.sqr(u),s))throw new Error("Cannot find square root");return u}}return function n9(e){const t=(e-ze)/Ji;let r,i,s;for(r=e-ze,i=0;r%Ji===xt;r/=Ji,i++);for(s=Ji;sAt(l,e),isValid:l=>{if("bigint"!=typeof l)throw new Error("Invalid field element: expected bigint, got "+typeof l);return xt<=l&&ll===xt,isOdd:l=>(l&ze)===ze,neg:l=>At(-l,e),eql:(l,u)=>l===u,sqr:l=>At(l*l,e),add:(l,u)=>At(l+u,e),sub:(l,u)=>At(l-u,e),mul:(l,u)=>At(l*u,e),pow:(l,u)=>function o9(e,t,r){if(r 0");if(r===xt)return e.ONE;if(r===ze)return t;let i=e.ONE,s=t;for(;r>xt;)r&ze&&(i=e.mul(i,s)),s=e.sqr(s),r>>=ze;return i}(c,l,u),div:(l,u)=>At(l*dh(u,e),e),sqrN:l=>l*l,addN:(l,u)=>l+u,subN:(l,u)=>l-u,mulN:(l,u)=>l*u,inv:l=>dh(l,e),sqrt:i.sqrt||(l=>a(c,l)),invertBatch:l=>function a9(e,t){const r=new Array(t.length),i=t.reduce((o,a,c)=>e.is0(a)?o:(r[c]=o,e.mul(o,a)),e.ONE),s=e.inv(i);return t.reduceRight((o,a,c)=>e.is0(a)?o:(r[c]=e.mul(o,r[c]),e.mul(o,a)),s),r}(c,l),cmov:(l,u,d)=>d?u:l,toBytes:l=>r?s0(l,o):Yi(l,o),fromBytes:l=>{if(l.length!==o)throw new Error(`Fp.fromBytes: expected ${o}, got ${l.length}`);return r?r0(l):wn(l)}});return Object.freeze(c)}(hh,void 0,void 0,{sqrt:VA}),Sa=function _9(e,t){const r=i=>y9({...e,...w9(i)});return Object.freeze({...r(t),create:r})}({a:BigInt(0),b:BigInt(7),Fp:d0,n:ph,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=ph,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),i=-jA*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=r,a=BigInt("0x100000000000000000000000000000000"),c=$A(o*e,t),l=$A(-i*e,t);let u=At(e-c*r-l*s,t),d=At(-c*i-l*o,t);const f=u>a,h=d>a;if(f&&(u=t-u),h&&(d=t-d),u>a||d>a)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:f,k1:u,k2neg:h,k2:d}}}},n0),mh=BigInt(0),HA=e=>"bigint"==typeof e&&mhs.charCodeAt(0)));r=Gs(i,i),zA[e]=r}return n0(Gs(r,...t))}const f0=e=>e.toRawBytes(!0).slice(1),h0=e=>Yi(e,32),p0=e=>At(e,hh),Ul=e=>At(e,ph),g0=Sa.ProjectivePoint;function m0(e){let t=Sa.utils.normPrivateKeyToScalar(e),r=g0.fromPrivateKey(t);return{scalar:r.hasEvenY()?t:Ul(-t),bytes:f0(r)}}function qA(e){if(!HA(e))throw new Error("bad x: need 0 < x < p");const t=p0(e*e);let i=VA(p0(t*e+BigInt(7)));i%gh!==mh&&(i=p0(-i));const s=new g0(e,i,jA);return s.assertValidity(),s}function GA(...e){return Ul(wn(yh("BIP0340/challenge",...e)))}function WA(e,t,r){const i=Zt("signature",e,64),s=Zt("message",t),o=Zt("publicKey",r,32);try{const a=qA(wn(o)),c=wn(i.subarray(0,32));if(!HA(c))return!1;const l=wn(i.subarray(32,64));if(!(e=>"bigint"==typeof e&&mhg0.BASE.multiplyAndAddUnsafe(e,t,r))(a,l,Ul(-u));return!(!d||!d.hasEvenY()||d.toAffine().x!==c)}catch{return!1}}const jl={getPublicKey:function D9(e){return m0(e).bytes},sign:function C9(e,t,r=IA(32)){const i=Zt("message",e),{bytes:s,scalar:o}=m0(t),a=Zt("auxRand",r,32),c=h0(o^wn(yh("BIP0340/aux",a))),l=yh("BIP0340/nonce",c,s,i),u=Ul(wn(l));if(u===mh)throw new Error("sign failed: k is zero");const{bytes:d,scalar:f}=m0(u),h=GA(d,s,i),p=new Uint8Array(64);if(p.set(d,0),p.set(h0(Ul(f+h*o)),32),!WA(p,i,s))throw new Error("sign: Invalid signature produced");return p},verify:WA,utils:{randomPrivateKey:Sa.utils.randomPrivateKey,lift_x:qA,pointToBytes:f0,numberToBytesBE:Yi,bytesToNumberBE:wn,taggedHash:yh,mod:At}},y0="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,v0=e=>e instanceof Uint8Array,w0=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),jr=(e,t)=>e<<32-t|e>>>t;if(68!==new Uint8Array(new Uint32Array([287454020]).buffer)[0])throw new Error("Non little-endian hardware is not supported");const S9=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function _n(e){if(!v0(e))throw new Error("Uint8Array expected");let t="";for(let r=0;ri+s.length,0));let r=0;return e.forEach(i=>{if(!v0(i))throw new Error("Uint8Array expected");t.set(i,r),r+=i.length}),t}class ZA{clone(){return this._cloneInto()}}function KA(e){const t=i=>e().update(Zs(i)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function QA(e=32){if(y0&&"function"==typeof y0.getRandomValues)return y0.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}function b0(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function YA(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}const $r={number:b0,bool:function A9(e){if("boolean"!=typeof e)throw new Error(`Expected boolean, not ${e}`)},bytes:YA,hash:function M9(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");b0(e.outputLen),b0(e.blockLen)},exists:function N9(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")},output:function R9(e,t){YA(e);const r=t.outputLen;if(e.lengths-a&&(this.process(i,0),a=0);for(let f=a;f>s&o),c=Number(r&o),u=i?0:4;e.setUint32(t+(i?4:0),a,i),e.setUint32(t+u,c,i)})(i,s-8,BigInt(8*this.length),o),this.process(i,0);const c=w0(t),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=l/4,d=this.get();if(u>d.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;fe&t^~e&r,L9=(e,t,r)=>e&t^e&r^t&r,F9=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),es=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ts=new Uint32Array(64);class JA extends k9{constructor(){super(64,32,8,!1),this.A=0|es[0],this.B=0|es[1],this.C=0|es[2],this.D=0|es[3],this.E=0|es[4],this.F=0|es[5],this.G=0|es[6],this.H=0|es[7]}get(){const{A:t,B:r,C:i,D:s,E:o,F:a,G:c,H:l}=this;return[t,r,i,s,o,a,c,l]}set(t,r,i,s,o,a,c,l){this.A=0|t,this.B=0|r,this.C=0|i,this.D=0|s,this.E=0|o,this.F=0|a,this.G=0|c,this.H=0|l}process(t,r){for(let f=0;f<16;f++,r+=4)ts[f]=t.getUint32(r,!1);for(let f=16;f<64;f++){const h=ts[f-15],p=ts[f-2],g=jr(h,7)^jr(h,18)^h>>>3,m=jr(p,17)^jr(p,19)^p>>>10;ts[f]=m+ts[f-7]+g+ts[f-16]|0}let{A:i,B:s,C:o,D:a,E:c,F:l,G:u,H:d}=this;for(let f=0;f<64;f++){const p=d+(jr(c,6)^jr(c,11)^jr(c,25))+P9(c,l,u)+F9[f]+ts[f]|0,m=(jr(i,2)^jr(i,13)^jr(i,22))+L9(i,s,o)|0;d=u,u=l,l=c,c=a+p|0,a=o,o=s,s=i,i=p+m|0}i=i+this.A|0,s=s+this.B|0,o=o+this.C|0,a=a+this.D|0,c=c+this.E|0,l=l+this.F|0,u=u+this.G|0,d=d+this.H|0,this.set(i,s,o,a,c,l,u,d)}roundClean(){ts.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class B9 extends JA{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}const $l=KA(()=>new JA);function Ks(e){if(!Number.isSafeInteger(e))throw new Error(`Wrong integer: ${e}`)}function fr(...e){const t=(s,o)=>a=>s(o(a));return{encode:Array.from(e).reverse().reduce((s,o)=>s?t(s,o.encode):o.encode,void 0),decode:e.reduce((s,o)=>s?t(s,o.decode):o.decode,void 0)}}function Vr(e){return{encode:t=>{if(!Array.isArray(t)||t.length&&"number"!=typeof t[0])throw new Error("alphabet.encode input should be an array of numbers");return t.map(r=>{if(Ks(r),r<0||r>=e.length)throw new Error(`Digit index outside alphabet: ${r} (alphabet: ${e.length})`);return e[r]})},decode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw new Error("alphabet.decode input should be array of strings");return t.map(r=>{if("string"!=typeof r)throw new Error(`alphabet.decode: not string element=${r}`);const i=e.indexOf(r);if(-1===i)throw new Error(`Unknown letter: "${r}". Allowed: ${e}`);return i})}}}function Hr(e=""){if("string"!=typeof e)throw new Error("join separator should be string");return{encode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw new Error("join.encode input should be array of strings");for(let r of t)if("string"!=typeof r)throw new Error(`join.encode: non-string input=${r}`);return t.join(e)},decode:t=>{if("string"!=typeof t)throw new Error("join.decode input should be string");return t.split(e)}}}function Vl(e,t="="){if(Ks(e),"string"!=typeof t)throw new Error("padding chr should be string");return{encode(r){if(!Array.isArray(r)||r.length&&"string"!=typeof r[0])throw new Error("padding.encode input should be array of strings");for(let i of r)if("string"!=typeof i)throw new Error(`padding.encode: non-string input=${i}`);for(;r.length*e%8;)r.push(t);return r},decode(r){if(!Array.isArray(r)||r.length&&"string"!=typeof r[0])throw new Error("padding.encode input should be array of strings");for(let s of r)if("string"!=typeof s)throw new Error(`padding.decode: non-string input=${s}`);let i=r.length;if(i*e%8)throw new Error("Invalid padding: string should have whole number of bytes");for(;i>0&&r[i-1]===t;i--)if(!((i-1)*e%8))throw new Error("Invalid padding: string has too much padding");return r.slice(0,i)}}}function XA(e){if("function"!=typeof e)throw new Error("normalize fn should be function");return{encode:t=>t,decode:t=>e(t)}}function eM(e,t,r){if(t<2)throw new Error(`convertRadix: wrong from=${t}, base cannot be less than 2`);if(r<2)throw new Error(`convertRadix: wrong to=${r}, base cannot be less than 2`);if(!Array.isArray(e))throw new Error("convertRadix: data should be array");if(!e.length)return[];let i=0;const s=[],o=Array.from(e);for(o.forEach(a=>{if(Ks(a),a<0||a>=t)throw new Error(`Wrong integer: ${a}`)});;){let a=0,c=!0;for(let l=i;lnew B9);const tM=(e,t)=>t?tM(t,e%t):e,wh=(e,t)=>e+(t-tM(e,t));function E0(e,t,r,i){if(!Array.isArray(e))throw new Error("convertRadix2: data should be array");if(t<=0||t>32)throw new Error(`convertRadix2: wrong from=${t}`);if(r<=0||r>32)throw new Error(`convertRadix2: wrong to=${r}`);if(wh(t,r)>32)throw new Error(`convertRadix2: carry overflow from=${t} to=${r} carryBits=${wh(t,r)}`);let s=0,o=0;const a=2**r-1,c=[];for(const l of e){if(Ks(l),l>=2**t)throw new Error(`convertRadix2: invalid data word=${l} from=${t}`);if(s=s<32)throw new Error(`convertRadix2: carry overflow pos=${o} from=${t}`);for(o+=t;o>=r;o-=r)c.push((s>>o-r&a)>>>0);s&=2**o-1}if(s=s<=t)throw new Error("Excess padding");if(!i&&s)throw new Error(`Non-zero padding: ${s}`);return i&&o>0&&c.push(s>>>0),c}function bi(e,t=!1){if(Ks(e),e<=0||e>32)throw new Error("radix2: bits should be in (0..32]");if(wh(8,e)>32||wh(e,8)>32)throw new Error("radix2: carry overflow");return{encode:r=>{if(!(r instanceof Uint8Array))throw new Error("radix2.encode input should be Uint8Array");return E0(Array.from(r),8,e,!t)},decode:r=>{if(!Array.isArray(r)||r.length&&"number"!=typeof r[0])throw new Error("radix2.decode input should be array of strings");return Uint8Array.from(E0(r,e,8,t))}}}function rM(e){if("function"!=typeof e)throw new Error("unsafeWrapper fn should be function");return function(...t){try{return e.apply(null,t)}catch{}}}fr(bi(4),Vr("0123456789ABCDEF"),Hr("")),fr(bi(5),Vr("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),Vl(5),Hr("")),fr(bi(5),Vr("0123456789ABCDEFGHIJKLMNOPQRSTUV"),Vl(5),Hr("")),fr(bi(5),Vr("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),Hr(""),XA(e=>e.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1")));const Ei=fr(bi(6),Vr("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),Vl(6),Hr("")),D0=(fr(bi(6),Vr("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),Vl(6),Hr("")),e=>fr(function nM(e){return Ks(e),{encode:t=>{if(!(t instanceof Uint8Array))throw new Error("radix.encode input should be Uint8Array");return eM(Array.from(t),256,e)},decode:t=>{if(!Array.isArray(t)||t.length&&"number"!=typeof t[0])throw new Error("radix.decode input should be array of strings");return Uint8Array.from(eM(t,e,256))}}}(58),Vr(e),Hr(""))),C0=(D0("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),D0("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),D0("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz"),fr(Vr("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),Hr(""))),oM=[996825010,642813549,513874426,1027748829,705979059];function Hl(e){const t=e>>25;let r=(33554431&e)<<5;for(let i=0;i>i&1)&&(r^=oM[i]);return r}function aM(e,t,r=1){const i=e.length;let s=1;for(let o=0;o126)throw new Error(`Invalid prefix (${e})`);s=Hl(s)^a>>5}s=Hl(s);for(let o=0;of)throw new TypeError(`Wrong string length: ${d.length} (${d}). Expected (8..${f})`);const h=d.toLowerCase();if(d!==h&&d!==d.toUpperCase())throw new Error("String must be lowercase or uppercase");const p=(d=h).lastIndexOf("1");if(0===p||-1===p)throw new Error('Letter "1" must be present between prefix and data only');const g=d.slice(0,p),m=d.slice(p+1);if(m.length<6)throw new Error("Data must be at least 6 characters long");const y=C0.decode(m).slice(0,-6),v=aM(g,y,t);if(!m.endsWith(v))throw new Error(`Invalid checksum in ${d}: expected "${v}"`);return{prefix:g,words:y}}return{encode:function a(d,f,h=90){if("string"!=typeof d)throw new Error("bech32.encode prefix should be string, not "+typeof d);if(!Array.isArray(f)||f.length&&"number"!=typeof f[0])throw new Error("bech32.encode words should be array of numbers, not "+typeof f);const p=d.length+7+f.length;if(!1!==h&&p>h)throw new TypeError(`Length ${p} exceeds limit ${h}`);return`${d=d.toLowerCase()}1${C0.encode(f)}${aM(d,f,t)}`},decode:c,decodeToBytes:function u(d){const{prefix:f,words:h}=c(d,!1);return{prefix:f,words:h,bytes:i(h)}},decodeUnsafe:rM(c),fromWords:i,fromWordsUnsafe:o,toWords:s}}const Ta=cM("bech32");function xa(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function S0(e){if("boolean"!=typeof e)throw new Error(`boolean expected, not ${e}`)}function uM(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}function Ce(e,...t){if(!uM(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function Qs(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Eh(e,t){Ce(e);const r=t.outputLen;if(e.length{if("string"!=typeof e||e.length%2)throw new TypeError(`hex.decode: expected string, got ${typeof e} with length ${e.length}`);return e.toLowerCase()}));const be=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),Aa=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);if(68!==new Uint8Array(new Uint32Array([287454020]).buffer)[0])throw new Error("Non little-endian hardware is not supported");function ns(e){if("string"==typeof e)e=function Y9(e){if("string"!=typeof e)throw new Error("string expected, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}(e);else{if(!uM(e))throw new Error("Uint8Array expected, got "+typeof e);e=e.slice()}return e}function Dh(e,t){if(e.length!==t.length)return!1;let r=0;for(let i=0;i(Object.assign(t,e),t);function Ys(e,t,r,i){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,i);const s=BigInt(32),o=BigInt(4294967295),a=Number(r>>s&o),c=Number(r&o),u=i?0:4;e.setUint32(t+(i?4:0),a,i),e.setUint32(t+u,c,i)}const x0=new Uint8Array(16),zr=be(x0),e7=(e,t,r,i)=>({s3:r<<31|i>>>1,s2:t<<31|r>>>1,s1:e<<31|t>>>1,s0:e>>>1^225<<24&-(1&i)}),Wn=e=>(e>>>0&255)<<24|(e>>>8&255)<<16|(e>>>16&255)<<8|e>>>24&255;class fM{constructor(t,r){this.blockLen=16,this.outputLen=16,this.s0=0,this.s1=0,this.s2=0,this.s3=0,this.finished=!1,Ce(t=ns(t),16);const i=Aa(t);let s=i.getUint32(0,!1),o=i.getUint32(4,!1),a=i.getUint32(8,!1),c=i.getUint32(12,!1);const l=[];for(let g=0;g<128;g++)l.push({s0:Wn(s),s1:Wn(o),s2:Wn(a),s3:Wn(c)}),({s0:s,s1:o,s2:a,s3:c}=e7(s,o,a,c));const u=(e=r||1024)>65536?8:e>1024?4:2;var e;if(![1,2,4,8].includes(u))throw new Error(`ghash: wrong window size=${u}, should be 2, 4 or 8`);this.W=u;const f=128/u,h=this.windowSize=2**u,p=[];for(let g=0;g>>u-b-1&1))continue;const{s0:D,s1:S,s2:T,s3:O}=l[u*g+b];y^=D,v^=S,w^=T,_^=O}p.push({s0:y,s1:v,s2:w,s3:_})}this.t=p}_updateBlock(t,r,i,s){t^=this.s0,r^=this.s1,i^=this.s2,s^=this.s3;const{W:o,t:a,windowSize:c}=this;let l=0,u=0,d=0,f=0;const h=(1<>>8*m&255;for(let v=8/o-1;v>=0;v--){const w=y>>>o*v&h,{s0:_,s1:b,s2:C,s3:D}=a[p*c+w];l^=_,u^=b,d^=C,f^=D,p+=1}}this.s0=l,this.s1=u,this.s2=d,this.s3=f}update(t){t=ns(t),Qs(this);const r=be(t),i=Math.floor(t.length/16),s=t.length%16;for(let o=0;o>>1|r,r=(1&s)<<7}return e[0]^=225&-t,e}((t=ns(t)).slice());super(i,r),i.fill(0)}update(t){t=ns(t),Qs(this);const r=be(t),i=t.length%16,s=Math.floor(t.length/16);for(let o=0;oe(s,i.length).update(ns(i)).digest(),r=e(new Uint8Array(16),0);return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=(i,s)=>e(i,s),t}hM((e,t)=>new fM(e,t)),hM((e,t)=>new r7(e,t)),new Uint8Array(16);const s7=283;function M0(e){return e<<1^s7&-(e>>7)}function Ma(e,t){let r=0;for(;t>0;t>>=1)r^=e&-(1&t),e=M0(e);return r}const N0=(()=>{let e=new Uint8Array(256);for(let r=0,i=1;r<256;r++,i^=M0(i))e[r]=i;const t=new Uint8Array(256);t[0]=99;for(let r=0;r<255;r++){let i=e[255-r];i|=i<<8,t[e[r]]=255&(i^i>>4^i>>5^i>>6^i>>7^99)}return t})(),o7=N0.map((e,t)=>N0.indexOf(t)),a7=e=>e<<24|e>>>8,R0=e=>e<<8|e>>>24;function gM(e,t){if(256!==e.length)throw new Error("Wrong sbox length");const r=new Uint32Array(256).map((u,d)=>t(e[d])),i=r.map(R0),s=i.map(R0),o=s.map(R0),a=new Uint32Array(65536),c=new Uint32Array(65536),l=new Uint16Array(65536);for(let u=0;u<256;u++)for(let d=0;d<256;d++){const f=256*u+d;a[f]=r[u]^i[d],c[f]=s[u]^o[d],l[f]=e[u]<<8|e[d]}return{sbox:e,sbox2:l,T0:r,T1:i,T2:s,T3:o,T01:a,T23:c}}const O0=gM(N0,e=>Ma(e,3)<<24|e<<16|e<<8|Ma(e,2)),mM=gM(o7,e=>Ma(e,11)<<24|Ma(e,13)<<16|Ma(e,9)<<8|Ma(e,14)),c7=(()=>{const e=new Uint8Array(16);for(let t=0,r=1;t<16;t++,r=M0(r))e[t]=r;return e})();function Si(e){Ce(e);const t=e.length;if(![16,24,32].includes(t))throw new Error(`aes: wrong key size: should be 16, 24 or 32, got: ${t}`);const{sbox2:r}=O0,i=be(e),s=i.length,o=c=>qr(r,c,c,c,c),a=new Uint32Array(t+28);a.set(i);for(let c=s;c6&&c%s==4&&(l=o(l)),a[c]=a[c-s]^l}return a}function is(e,t,r,i,s,o){return e[r<<8&65280|i>>>8&255]^t[s>>>8&65280|o>>>24&255]}function qr(e,t,r,i,s){return e[255&t|65280&r]|e[i>>>16&255|s>>>16&65280]<<16}function bn(e,t,r,i,s){const{sbox2:o,T01:a,T23:c}=O0;let l=0;t^=e[l++],r^=e[l++],i^=e[l++],s^=e[l++];const u=e.length/4-2;for(let g=0;g{const c=Si(t),{b:l,o:u,out:d}=function wM(e,t,r){let i=e.length;const s=i%16;if(!t&&0!==s)throw new Error("aec/(cbc-ecb): unpadded plaintext with disabled padding");const o=be(e);if(t){let l=16-s;l||(l=16),i+=l}const a=Na(i,r);return{b:o,o:be(a),out:a}}(o,s,a),f=be(r);let h=f[0],p=f[1],g=f[2],m=f[3],y=0;for(;y+4<=l.length;)h^=l[y+0],p^=l[y+1],g^=l[y+2],m^=l[y+3],({s0:h,s1:p,s2:g,s3:m}=bn(c,h,p,g,m)),u[y++]=h,u[y++]=p,u[y++]=g,u[y++]=m;if(s){const v=function bM(e){const t=new Uint8Array(16),r=be(t);t.set(e);const i=16-e.length;for(let s=16-i;s<16;s++)t[s]=i;return r}(o.subarray(4*y));h^=v[0],p^=v[1],g^=v[2],m^=v[3],({s0:h,s1:p,s2:g,s3:m}=bn(c,h,p,g,m)),u[y++]=h,u[y++]=p,u[y++]=g,u[y++]=m}return c.fill(0),d},decrypt:(o,a)=>{!function vM(e){if(Ce(e),e.length%16!=0)throw new Error("aes/(cbc-ecb).decrypt ciphertext should consist of blocks with size 16")}(o);const c=function k0(e){const t=Si(e),r=t.slice(),i=t.length,{sbox2:s}=O0,{T0:o,T1:a,T2:c,T3:l}=mM;for(let u=0;u>>8&255]^c[f>>>16&255]^l[f>>>24]}return r}(t),l=be(r),u=Na(o.length,a),d=be(o),f=be(u);let h=l[0],p=l[1],g=l[2],m=l[3];for(let y=0;y+4<=d.length;){const v=h,w=p,_=g,b=m;h=d[y+0],p=d[y+1],g=d[y+2],m=d[y+3];const{s0:C,s1:D,s2:S,s3:T}=Sh(c,h,p,g,m);f[y++]=C^v,f[y++]=D^w,f[y++]=S^_,f[y++]=T^b}return c.fill(0),function _M(e,t){if(!t)return e;const r=e.length;if(!r)throw new Error("aes/pcks5: empty ciphertext not allowed");const i=e[r-1];if(i<=0||i>16)throw new Error(`aes/pcks5: wrong padding byte: ${i}`);const s=e.subarray(0,-i);for(let o=0;o255&e[t++]|(255&e[t++])<<8;class d7{constructor(t){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,Ce(t=ns(t),32);const r=Pt(t,0),i=Pt(t,2),s=Pt(t,4),o=Pt(t,6),a=Pt(t,8),c=Pt(t,10),l=Pt(t,12),u=Pt(t,14);this.r[0]=8191&r,this.r[1]=8191&(r>>>13|i<<3),this.r[2]=7939&(i>>>10|s<<6),this.r[3]=8191&(s>>>7|o<<9),this.r[4]=255&(o>>>4|a<<12),this.r[5]=a>>>1&8190,this.r[6]=8191&(a>>>14|c<<2),this.r[7]=8065&(c>>>11|l<<5),this.r[8]=8191&(l>>>8|u<<8),this.r[9]=u>>>5&127;for(let d=0;d<8;d++)this.pad[d]=Pt(t,16+2*d)}process(t,r,i=!1){const s=i?0:2048,{h:o,r:a}=this,c=a[0],l=a[1],u=a[2],d=a[3],f=a[4],h=a[5],p=a[6],g=a[7],m=a[8],y=a[9],v=Pt(t,r+0),w=Pt(t,r+2),_=Pt(t,r+4),b=Pt(t,r+6),C=Pt(t,r+8),D=Pt(t,r+10),S=Pt(t,r+12),T=Pt(t,r+14);let O=o[0]+(8191&v),U=o[1]+(8191&(v>>>13|w<<3)),B=o[2]+(8191&(w>>>10|_<<6)),j=o[3]+(8191&(_>>>7|b<<9)),Y=o[4]+(8191&(b>>>4|C<<12)),k=o[5]+(C>>>1&8191),I=o[6]+(8191&(C>>>14|D<<2)),E=o[7]+(8191&(D>>>11|S<<5)),x=o[8]+(8191&(S>>>8|T<<8)),R=o[9]+(T>>>5|s),A=0,H=A+O*c+U*(5*y)+B*(5*m)+j*(5*g)+Y*(5*p);A=H>>>13,H&=8191,H+=k*(5*h)+I*(5*f)+E*(5*d)+x*(5*u)+R*(5*l),A+=H>>>13,H&=8191;let Q=A+O*l+U*c+B*(5*y)+j*(5*m)+Y*(5*g);A=Q>>>13,Q&=8191,Q+=k*(5*p)+I*(5*h)+E*(5*f)+x*(5*d)+R*(5*u),A+=Q>>>13,Q&=8191;let J=A+O*u+U*l+B*c+j*(5*y)+Y*(5*m);A=J>>>13,J&=8191,J+=k*(5*g)+I*(5*p)+E*(5*h)+x*(5*f)+R*(5*d),A+=J>>>13,J&=8191;let _e=A+O*d+U*u+B*l+j*c+Y*(5*y);A=_e>>>13,_e&=8191,_e+=k*(5*m)+I*(5*g)+E*(5*p)+x*(5*h)+R*(5*f),A+=_e>>>13,_e&=8191;let le=A+O*f+U*d+B*u+j*l+Y*c;A=le>>>13,le&=8191,le+=k*(5*y)+I*(5*m)+E*(5*g)+x*(5*p)+R*(5*h),A+=le>>>13,le&=8191;let lt=A+O*h+U*f+B*d+j*u+Y*l;A=lt>>>13,lt&=8191,lt+=k*c+I*(5*y)+E*(5*m)+x*(5*g)+R*(5*p),A+=lt>>>13,lt&=8191;let st=A+O*p+U*h+B*f+j*d+Y*u;A=st>>>13,st&=8191,st+=k*l+I*c+E*(5*y)+x*(5*m)+R*(5*g),A+=st>>>13,st&=8191;let Se=A+O*g+U*p+B*h+j*f+Y*d;A=Se>>>13,Se&=8191,Se+=k*u+I*l+E*c+x*(5*y)+R*(5*m),A+=Se>>>13,Se&=8191;let tt=A+O*m+U*g+B*p+j*h+Y*f;A=tt>>>13,tt&=8191,tt+=k*d+I*u+E*l+x*c+R*(5*y),A+=tt>>>13,tt&=8191;let Ae=A+O*y+U*m+B*g+j*p+Y*h;A=Ae>>>13,Ae&=8191,Ae+=k*f+I*d+E*u+x*l+R*c,A+=Ae>>>13,Ae&=8191,A=(A<<2)+A|0,A=A+H|0,H=8191&A,A>>>=13,Q+=A,o[0]=H,o[1]=Q,o[2]=J,o[3]=_e,o[4]=le,o[5]=lt,o[6]=st,o[7]=Se,o[8]=tt,o[9]=Ae}finalize(){const{h:t,pad:r}=this,i=new Uint16Array(10);let s=t[1]>>>13;t[1]&=8191;for(let c=2;c<10;c++)t[c]+=s,s=t[c]>>>13,t[c]&=8191;t[0]+=5*s,s=t[0]>>>13,t[0]&=8191,t[1]+=s,s=t[1]>>>13,t[1]&=8191,t[2]+=s,i[0]=t[0]+5,s=i[0]>>>13,i[0]&=8191;for(let c=1;c<10;c++)i[c]=t[c]+s,s=i[c]>>>13,i[c]&=8191;i[9]-=8192;let o=(1^s)-1;for(let c=0;c<10;c++)i[c]&=o;o=~o;for(let c=0;c<10;c++)t[c]=t[c]&o|i[c];t[0]=65535&(t[0]|t[1]<<13),t[1]=65535&(t[1]>>>3|t[2]<<10),t[2]=65535&(t[2]>>>6|t[3]<<7),t[3]=65535&(t[3]>>>9|t[4]<<4),t[4]=65535&(t[4]>>>12|t[5]<<1|t[6]<<14),t[5]=65535&(t[6]>>>2|t[7]<<11),t[6]=65535&(t[7]>>>5|t[8]<<8),t[7]=65535&(t[8]>>>8|t[9]<<5);let a=t[0]+r[0];t[0]=65535&a;for(let c=1;c<8;c++)a=(t[c]+r[c]|0)+(a>>>16)|0,t[c]=65535&a}update(t){Qs(this);const{buffer:r,blockLen:i}=this,s=(t=ns(t)).length;for(let o=0;o>>0,t[o++]=i[a]>>>8;return t}digest(){const{buffer:t,outputLen:r}=this;this.digestInto(t);const i=t.slice(0,r);return this.destroy(),i}}const h7=function f7(e){const t=(i,s)=>e(s).update(ns(i)).digest(),r=e(new Uint8Array(32));return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=i=>e(i),t}(e=>new d7(e)),SM=e=>Uint8Array.from(e.split("").map(t=>t.charCodeAt(0))),p7=SM("expand 16-byte k"),g7=SM("expand 32-byte k"),m7=be(p7),IM=be(g7);function Z(e,t){return e<>>32-t}function P0(e){return e.byteOffset%4==0}IM.slice();const TM=2**32-1,xM=new Uint32Array;function zl(e,t){const{allowShortKeys:r,extendNonceFn:i,counterLength:s,counterRight:o,rounds:a}=function J9(e,t){if(null==t||"object"!=typeof t)throw new Error("options must be defined");return Object.assign(e,t)}({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if("function"!=typeof e)throw new Error("core must be a function");return xa(s),xa(a),S0(o),S0(r),(c,l,u,d,f=0)=>{Ce(c),Ce(l),Ce(u);const h=u.length;if(d||(d=new Uint8Array(h)),Ce(d),xa(f),f<0||f>=TM)throw new Error("arx: counter overflow");if(d.length=TM)throw new Error("arx: counter overflow");const m=Math.min(64,l-g);if(f&&64===m){const y=g/4;if(g%4!=0)throw new Error("arx: invalid block position");for(let w,v=0;v<16;v++)w=y+v,p[w]=h[w]^d[v];g+=64}else{for(let v,y=0;y0;)p.pop().fill(0);return d}}function ql(e,t,r,i,s,o=20){let a=e[0],c=e[1],l=e[2],u=e[3],d=t[0],f=t[1],h=t[2],p=t[3],g=t[4],m=t[5],y=t[6],v=t[7],w=s,_=r[0],b=r[1],C=r[2],D=a,S=c,T=l,O=u,U=d,B=f,j=h,Y=p,k=g,I=m,E=y,x=v,R=w,A=_,H=b,Q=C;for(let _e=0;_e{e.update(t);const r=t.length%16;r&&e.update(b7.subarray(r))},E7=new Uint8Array(32);function MM(e,t,r,i,s){const o=e(t,r,E7),a=h7.create(o);s&&AM(a,s),AM(a,i);const c=new Uint8Array(16),l=Aa(c);Ys(l,0,BigInt(s?s.length:0),!0),Ys(l,8,BigInt(i.length),!0),a.update(c);const u=a.digest();return o.fill(0),u}const NM=e=>(t,r,i)=>(Ce(t,32),Ce(r),{encrypt:(o,a)=>{const c=o.length,l=c+16;a?Ce(a,l):a=new Uint8Array(l),e(t,r,o,a,1);const u=MM(e,t,r,a.subarray(0,-16),i);return a.set(u,c),a},decrypt:(o,a)=>{const c=o.length,l=c-16;if(c<16)throw new Error("encrypted data must be at least 16 bytes");a?Ce(a,l):a=new Uint8Array(l);const u=o.subarray(0,-16);if(!Dh(o.subarray(-16),MM(e,t,r,u,i)))throw new Error("invalid tag");return e(t,r,u,a,1),a}});NM(L0),NM(_7);class RM extends ZA{constructor(t,r){super(),this.finished=!1,this.destroyed=!1,$r.hash(t);const i=Zs(r);if(this.iHash=t.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,o=new Uint8Array(s);o.set(i.length>s?t.create().update(i).digest():i);for(let a=0;anew RM(e,t).update(r).digest();xh.create=(e,t)=>new RM(e,t);const F0=new Uint8Array([0]),kM=new Uint8Array;var D7=Object.defineProperty,gt=(e,t)=>{for(var r in t)D7(e,r,{get:t[r],enumerable:!0})},Js=Symbol("verified"),C7=e=>e instanceof Object;function LM(e){if(!C7(e)||"number"!=typeof e.kind||"string"!=typeof e.content||"number"!=typeof e.created_at||"string"!=typeof e.pubkey||!e.pubkey.match(/^[a-f0-9]{64}$/)||!Array.isArray(e.tags))return!1;for(let t=0;tBM,QueueNode:()=>FM,binarySearch:()=>B0,insertEventIntoAscendingList:()=>T7,insertEventIntoDescendingList:()=>I7,normalizeURL:()=>Oa,utf8Decoder:()=>Gr,utf8Encoder:()=>hr});var Gr=new TextDecoder("utf-8"),hr=new TextEncoder;function Oa(e){-1===e.indexOf("://")&&(e="wss://"+e);let t=new URL(e);return t.pathname=t.pathname.replace(/\/+/g,"/"),t.pathname.endsWith("/")&&(t.pathname=t.pathname.slice(0,-1)),("80"===t.port&&"ws:"===t.protocol||"443"===t.port&&"wss:"===t.protocol)&&(t.port=""),t.searchParams.sort(),t.hash="",t.toString()}function I7(e,t){const[r,i]=B0(e,s=>t.id===s.id?0:t.created_at===s.created_at?-1:s.created_at-t.created_at);return i||e.splice(r,0,t),e}function T7(e,t){const[r,i]=B0(e,s=>t.id===s.id?0:t.created_at===s.created_at?-1:t.created_at-s.created_at);return i||e.splice(r,0,t),e}function B0(e,t){let r=0,i=e.length-1;for(;r<=i;){const s=Math.floor((r+i)/2),o=t(e[s]);if(0===o)return[s,!0];o<0?i=s-1:r=s+1}return[r,!1]}var FM=class{value;next=null;prev=null;constructor(e){this.value=e}},BM=class{first;last;constructor(){this.first=null,this.last=null}enqueue(e){const t=new FM(e);return this.last?this.last===this.first?(this.last=t,this.last.prev=this.first,this.first.next=t):(t.prev=this.last,this.last.next=t,this.last=t):(this.first=t,this.last=t),!0}dequeue(){if(!this.first)return null;if(this.first===this.last){const t=this.first;return this.first=null,this.last=null,t.value}const e=this.first;return this.first=e.next,e.value}};function Ah(e){let t=$l(hr.encode(function A7(e){if(!LM(e))throw new Error("can't serialize event with wrong or missing properties");return JSON.stringify([0,e.pubkey,e.created_at,e.kind,e.tags,e.content])}(e)));return _n(t)}var Mh=new class{generateSecretKey(){return jl.utils.randomPrivateKey()}getPublicKey(e){return _n(jl.getPublicKey(e))}finalizeEvent(e,t){const r=e;return r.pubkey=_n(jl.getPublicKey(t)),r.id=Ah(r),r.sig=_n(jl.sign(Ah(r),t)),r[Js]=!0,r}verifyEvent(e){if("boolean"==typeof e[Js])return e[Js];const t=Ah(e);if(t!==e.id)return e[Js]=!1,!1;try{const r=jl.verify(e.sig,t,e.pubkey);return e[Js]=r,r}catch{return e[Js]=!1,!1}}},M7=Mh.generateSecretKey,UM=Mh.getPublicKey,Zn=Mh.finalizeEvent,ka=Mh.verifyEvent,Kt={};function jM(e){return 1e3<=e&&e<1e4||[1,2,4,5,6,7,8,16,40,41,42,43,44].includes(e)}function U0(e){return[0,3].includes(e)||1e4<=e&&e<2e4}function $M(e){return 2e4<=e&&e<3e4}function j0(e){return 3e4<=e&&e<4e4}function N7(e){return jM(e)?"regular":U0(e)?"replaceable":$M(e)?"ephemeral":j0(e)?"parameterized":"unknown"}gt(Kt,{Application:()=>Mz,BadgeAward:()=>U7,BadgeDefinition:()=>Dz,BlockedRelaysList:()=>cz,BookmarkList:()=>sz,Bookmarksets:()=>_z,Calendar:()=>Fz,CalendarEventRSVP:()=>Bz,ChannelCreation:()=>VM,ChannelHideMessage:()=>qM,ChannelMessage:()=>zM,ChannelMetadata:()=>HM,ChannelMuteUser:()=>GM,ClassifiedListing:()=>Oz,ClientAuth:()=>WM,CommunitiesList:()=>oz,CommunityDefinition:()=>$z,CommunityPostApproval:()=>Z7,Contacts:()=>P7,CreateOrUpdateProduct:()=>Iz,CreateOrUpdateStall:()=>Sz,Curationsets:()=>bz,Date:()=>Pz,DraftClassifiedListing:()=>kz,DraftLong:()=>xz,Emojisets:()=>Az,EncryptedDirectMessage:()=>L7,EncryptedDirectMessages:()=>F7,EventDeletion:()=>B7,FileMetadata:()=>V7,FileServerPreference:()=>fz,Followsets:()=>yz,GenericRepost:()=>j7,Genericlists:()=>vz,HTTPAuth:()=>H0,Handlerinformation:()=>jz,Handlerrecommendation:()=>Uz,Highlights:()=>tz,InterestsList:()=>uz,Interestsets:()=>Cz,JobFeedback:()=>Y7,JobRequest:()=>K7,JobResult:()=>Q7,Label:()=>W7,LightningPubRPC:()=>pz,LiveChatMessage:()=>H7,LiveEvent:()=>Nz,LongFormArticle:()=>Tz,Metadata:()=>R7,Mutelist:()=>nz,NWCWalletInfo:()=>hz,NWCWalletRequest:()=>ZM,NWCWalletResponse:()=>gz,NostrConnect:()=>mz,OpenTimestamps:()=>$7,Pinlist:()=>rz,ProblemTracker:()=>z7,ProfileBadges:()=>Ez,PublicChatsList:()=>az,Reaction:()=>V0,RecommendRelay:()=>k7,RelayList:()=>iz,Relaysets:()=>wz,Report:()=>q7,Reporting:()=>G7,Repost:()=>$0,SearchRelaysList:()=>lz,ShortTextNote:()=>O7,Time:()=>Lz,UserEmojiList:()=>dz,UserStatuses:()=>Rz,Zap:()=>ez,ZapGoal:()=>J7,ZapRequest:()=>X7,classifyKind:()=>N7,isEphemeralKind:()=>$M,isParameterizedReplaceableKind:()=>j0,isRegularKind:()=>jM,isReplaceableKind:()=>U0});var R7=0,O7=1,k7=2,P7=3,L7=4,F7=4,B7=5,$0=6,V0=7,U7=8,j7=16,VM=40,HM=41,zM=42,qM=43,GM=44,$7=1040,V7=1063,H7=1311,z7=1971,q7=1984,G7=1984,W7=1985,Z7=4550,K7=5999,Q7=6999,Y7=7e3,J7=9041,X7=9734,ez=9735,tz=9802,nz=1e4,rz=10001,iz=10002,sz=10003,oz=10004,az=10005,cz=10006,lz=10007,uz=10015,dz=10030,fz=10096,hz=13194,pz=21e3,WM=22242,ZM=23194,gz=23195,mz=24133,H0=27235,yz=3e4,vz=30001,wz=30002,_z=30003,bz=30004,Ez=30008,Dz=30009,Cz=30015,Sz=30017,Iz=30018,Tz=30023,xz=30024,Az=30030,Mz=30078,Nz=30311,Rz=30315,Oz=30402,kz=30403,Pz=31922,Lz=31923,Fz=31924,Bz=31925,Uz=31989,jz=31990,$z=34550;function Vz(e,t){if(e.ids&&-1===e.ids.indexOf(t.id)||e.kinds&&-1===e.kinds.indexOf(t.kind)||e.authors&&-1===e.authors.indexOf(t.pubkey))return!1;for(let r in e)if("#"===r[0]){let s=e[`#${r.slice(1)}`];if(s&&!t.tags.find(([o,a])=>o===r.slice(1)&&-1!==s.indexOf(a)))return!1}return!(e.since&&t.created_ate.until)}function Nh(e,t){for(let r=0;rU0(t))?e.authors.length*e.kinds.length:1/0,e.authors?.length&&e.kinds?.every(t=>j0(t))&&e["#d"]?.length?e.authors.length*e.kinds.length*e["#d"].length:1/0)}function Rh(e,t){let r=t.length+3,i=e.indexOf(`"${t}":`)+r,s=e.slice(i).indexOf('"')+i+1;return e.slice(s,s+64)}function QM(e,t){let r=t.length,i=e.indexOf(`"${t}":`)+r+3,s=e.slice(i),o=Math.min(s.indexOf(","),s.indexOf("}"));return parseInt(s.slice(0,o),10)}function YM(e){let t=e.slice(0,22).indexOf('"EVENT"');if(-1===t)return null;let r=e.slice(t+7+1).indexOf('"');if(-1===r)return null;let i=t+7+1+r,s=e.slice(i+1,80).indexOf('"');return-1===s?null:e.slice(i+1,i+1+s)}function zz(e,t){return t===Rh(e,"id")}function qz(e,t){return t===Rh(e,"pubkey")}function Gz(e,t){return t===QM(e,"kind")}function JM(e,t){return{kind:WM,created_at:Math.floor(Date.now()/1e3),tags:[["relay",e],["challenge",t]],content:""}}gt({},{getHex64:()=>Rh,getInt:()=>QM,getSubscriptionId:()=>YM,matchEventId:()=>zz,matchEventKind:()=>Gz,matchEventPubkey:()=>qz}),gt({},{makeAuthEvent:()=>JM});try{WebSocket}catch{}try{WebSocket}catch{}var Gl={};gt(Gl,{BECH32_REGEX:()=>tN,Bech32MaxSize:()=>G0,decode:()=>Wl,encodeBytes:()=>kh,naddrEncode:()=>sq,neventEncode:()=>iq,noteEncode:()=>nq,nprofileEncode:()=>rq,npubEncode:()=>tq,nrelayEncode:()=>oq,nsecEncode:()=>eq});var G0=5e3,tN=/[\x21-\x7E]{1,83}1[023456789acdefghjklmnpqrstuvwxyz]{6,}/;function Wl(e){let{prefix:t,words:r}=Ta.decode(e,G0),i=new Uint8Array(Ta.fromWords(r));switch(t){case"nprofile":{let s=Oh(i);if(!s[0]?.[0])throw new Error("missing TLV 0 for nprofile");if(32!==s[0][0].length)throw new Error("TLV 0 should be 32 bytes");return{type:"nprofile",data:{pubkey:_n(s[0][0]),relays:s[1]?s[1].map(o=>Gr.decode(o)):[]}}}case"nevent":{let s=Oh(i);if(!s[0]?.[0])throw new Error("missing TLV 0 for nevent");if(32!==s[0][0].length)throw new Error("TLV 0 should be 32 bytes");if(s[2]&&32!==s[2][0].length)throw new Error("TLV 2 should be 32 bytes");if(s[3]&&4!==s[3][0].length)throw new Error("TLV 3 should be 4 bytes");return{type:"nevent",data:{id:_n(s[0][0]),relays:s[1]?s[1].map(o=>Gr.decode(o)):[],author:s[2]?.[0]?_n(s[2][0]):void 0,kind:s[3]?.[0]?parseInt(_n(s[3][0]),16):void 0}}}case"naddr":{let s=Oh(i);if(!s[0]?.[0])throw new Error("missing TLV 0 for naddr");if(!s[2]?.[0])throw new Error("missing TLV 2 for naddr");if(32!==s[2][0].length)throw new Error("TLV 2 should be 32 bytes");if(!s[3]?.[0])throw new Error("missing TLV 3 for naddr");if(4!==s[3][0].length)throw new Error("TLV 3 should be 4 bytes");return{type:"naddr",data:{identifier:Gr.decode(s[0][0]),pubkey:_n(s[2][0]),kind:parseInt(_n(s[3][0]),16),relays:s[1]?s[1].map(o=>Gr.decode(o)):[]}}}case"nrelay":{let s=Oh(i);if(!s[0]?.[0])throw new Error("missing TLV 0 for nrelay");return{type:"nrelay",data:Gr.decode(s[0][0])}}case"nsec":return{type:t,data:i};case"npub":case"note":return{type:t,data:_n(i)};default:throw new Error(`unknown prefix ${t}`)}}function Oh(e){let t={},r=e;for(;r.length>0;){let i=r[0],s=r[1],o=r.slice(2,2+s);if(r=r.slice(2+s),o.lengthhr.encode(r))}))}function iq(e){let t;return void 0!==e.kind&&(t=function Xz(e){const t=new Uint8Array(4);return t[0]=e>>24&255,t[1]=e>>16&255,t[2]=e>>8&255,t[3]=255&e,t}(e.kind)),Zl("nevent",Ph({0:[Ia(e.id)],1:(e.relays||[]).map(i=>hr.encode(i)),2:e.author?[Ia(e.author)]:[],3:t?[new Uint8Array(t)]:[]}))}function sq(e){let t=new ArrayBuffer(4);return new DataView(t).setUint32(0,e.kind,!1),Zl("naddr",Ph({0:[hr.encode(e.identifier)],1:(e.relays||[]).map(i=>hr.encode(i)),2:[Ia(e.pubkey)],3:[new Uint8Array(t)]}))}function oq(e){return Zl("nrelay",Ph({0:[hr.encode(e)]}))}function Ph(e){let t=[];return Object.entries(e).reverse().forEach(([r,i])=>{i.forEach(s=>{let o=new Uint8Array(s.length+2);o.set([parseInt(r)],0),o.set([s.length],1),o.set(s,2),t.push(o)})}),vh(...t)}var Kl={};function nN(e,t,r){return W0.apply(this,arguments)}function W0(){return(W0=$(function*(e,t,r){const i=e instanceof Uint8Array?_n(e):e,o=rN(Sa.getSharedSecret(i,"02"+t));let a=Uint8Array.from(QA(16)),c=hr.encode(r),l=EM(o,a).encrypt(c);return`${Ei.encode(new Uint8Array(l))}?iv=${Ei.encode(new Uint8Array(a.buffer))}`})).apply(this,arguments)}function cq(e,t,r){return Z0.apply(this,arguments)}function Z0(){return(Z0=$(function*(e,t,r){const i=e instanceof Uint8Array?_n(e):e;let[s,o]=r.split("?iv="),c=rN(Sa.getSharedSecret(i,"02"+t)),l=Ei.decode(o),u=Ei.decode(s),d=EM(c,l).decrypt(u);return Gr.decode(d)})).apply(this,arguments)}function rN(e){return e.slice(1,33)}gt(Kl,{decrypt:()=>cq,encrypt:()=>nN}),gt({},{NIP05_REGEX:()=>iN,isValid:()=>fq,queryProfile:()=>sN,searchDomain:()=>dq,useFetchImplementation:()=>uq});var Lh,iN=/^(?:([\w.+-]+)@)?([\w_-]+(\.[\w_-]+)+)$/;try{Lh=fetch}catch{}function uq(e){Lh=e}function dq(e){return K0.apply(this,arguments)}function K0(){return(K0=$(function*(e,t=""){try{const r=`https://${e}/.well-known/nostr.json?name=${t}`;return(yield(yield Lh(r,{redirect:"error"})).json()).names}catch{return{}}})).apply(this,arguments)}function sN(e){return Q0.apply(this,arguments)}function Q0(){return(Q0=$(function*(e){const t=e.match(iN);if(!t)return null;const[r,i="_",s]=t;try{const o=`https://${s}/.well-known/nostr.json?name=${i}`,a=yield(yield Lh(o,{redirect:"error"})).json();let c=a.names[i];return c?{pubkey:c,relays:a.relays?.[c]}:null}catch{return null}})).apply(this,arguments)}function fq(e,t){return Y0.apply(this,arguments)}function Y0(){return(Y0=$(function*(e,t){let r=yield sN(t);return!!r&&r.pubkey===e})).apply(this,arguments)}function pq(e){const t={reply:void 0,root:void 0,mentions:[],profiles:[]},r=[];for(const i of e.tags)"e"===i[0]&&i[1]&&r.push(i),"p"===i[0]&&i[1]&&t.profiles.push({pubkey:i[1],relays:i[2]?[i[2]]:[]});for(let i=0;ipq}),gt({},{fetchRelayInformation:()=>yq,useFetchImplementation:()=>mq});try{fetch}catch{}function mq(e){}function yq(e){return J0.apply(this,arguments)}function J0(){return(J0=$(function*(e){return yield(yield fetch(e.replace("ws://","http://").replace("wss://","https://"),{headers:{Accept:"application/nostr+json"}})).json()})).apply(this,arguments)}function aN(e){let t=0;for(let r=0;r=t)break}return i}function bq(e,t,r,i){return Zn({kind:$0,tags:[...e.tags??[],["e",t.id,r],["p",t.pubkey]],content:""===e.content?"":JSON.stringify(t),created_at:e.created_at},i)}function cN(e){if(e.kind!==$0)return;let t,r;for(let i=e.tags.length-1;i>=0&&(void 0===t||void 0===r);i--){const s=e.tags[i];s.length>=2&&("e"===s[0]&&void 0===t?t=s:"p"===s[0]&&void 0===r&&(r=s))}return void 0!==t?{id:t[1],relays:[t[2],r?.[2]].filter(i=>"string"==typeof i),author:r?.[1]}:void 0}function Eq(e,{skipVerification:t}={}){const r=cN(e);if(void 0===r||""===e.content)return;let i;try{i=JSON.parse(e.content)}catch{return}return i.id===r.id&&(t||ka(i))?i:void 0}gt({},{getPow:()=>aN,minePow:()=>wq}),gt({},{finishRepostEvent:()=>bq,getRepostedEvent:()=>Eq,getRepostedEventPointer:()=>cN}),gt({},{NOSTR_URI_REGEX:()=>Fh,parse:()=>Sq,test:()=>Cq});var Fh=new RegExp(`nostr:(${tN.source})`);function Cq(e){return"string"==typeof e&&new RegExp(`^${Fh.source}$`).test(e)}function Sq(e){const t=e.match(new RegExp(`^${Fh.source}$`));if(!t)throw new Error(`Invalid Nostr URI: ${e}`);return{uri:t[0],value:t[1],decoded:Wl(t[1])}}function Tq(e,t,r){const i=t.tags.filter(s=>s.length>=2&&("e"===s[0]||"p"===s[0]));return Zn({...e,kind:V0,tags:[...e.tags??[],...i,["e",t.id],["p",t.pubkey]],content:e.content??"+"},r)}function xq(e){if(e.kind!==V0)return;let t,r;for(let i=e.tags.length-1;i>=0&&(void 0===t||void 0===r);i--){const s=e.tags[i];s.length>=2&&("e"===s[0]&&void 0===t?t=s:"p"===s[0]&&void 0===r&&(r=s))}return void 0!==t&&void 0!==r?{id:t[1],relays:[t[2],r[2]].filter(i=>void 0!==i),author:r[1]}:void 0}gt({},{finishReactionEvent:()=>Tq,getReactedEventPointer:()=>xq}),gt({},{matchAll:()=>Mq,regex:()=>X0,replaceAll:()=>Nq});var X0=()=>new RegExp(`\\b${Fh.source}\\b`,"g");function*Mq(e){const t=e.matchAll(X0());for(const r of t)try{const[i,s]=r;yield{uri:i,value:s,decoded:Wl(s),start:r.index,end:r.index+i.length}}catch{}}function Nq(e,t){return e.replaceAll(X0(),(r,i)=>t({uri:r,value:i,decoded:Wl(i)}))}gt({},{channelCreateEvent:()=>Oq,channelHideMessageEvent:()=>Lq,channelMessageEvent:()=>Pq,channelMetadataEvent:()=>kq,channelMuteUserEvent:()=>Fq});var Oq=(e,t)=>{let r;if("object"==typeof e.content)r=JSON.stringify(e.content);else{if("string"!=typeof e.content)return;r=e.content}return Zn({kind:VM,tags:[...e.tags??[]],content:r,created_at:e.created_at},t)},kq=(e,t)=>{let r;if("object"==typeof e.content)r=JSON.stringify(e.content);else{if("string"!=typeof e.content)return;r=e.content}return Zn({kind:HM,tags:[["e",e.channel_create_event_id],...e.tags??[]],content:r,created_at:e.created_at},t)},Pq=(e,t)=>{const r=[["e",e.channel_create_event_id,e.relay_url,"root"]];return e.reply_to_channel_message_event_id&&r.push(["e",e.reply_to_channel_message_event_id,e.relay_url,"reply"]),Zn({kind:zM,tags:[...r,...e.tags??[]],content:e.content,created_at:e.created_at},t)},Lq=(e,t)=>{let r;if("object"==typeof e.content)r=JSON.stringify(e.content);else{if("string"!=typeof e.content)return;r=e.content}return Zn({kind:qM,tags:[["e",e.channel_message_event_id],...e.tags??[]],content:r,created_at:e.created_at},t)},Fq=(e,t)=>{let r;if("object"==typeof e.content)r=JSON.stringify(e.content);else{if("string"!=typeof e.content)return;r=e.content}return Zn({kind:GM,tags:[["p",e.pubkey_to_mute],...e.tags??[]],content:r,created_at:e.created_at},t)};gt({},{EMOJI_SHORTCODE_REGEX:()=>lN,matchAll:()=>Uq,regex:()=>ew,replaceAll:()=>jq});var tw,lN=/:(\w+):/,ew=()=>new RegExp(`\\B${lN.source}\\B`,"g");function*Uq(e){const t=e.matchAll(ew());for(const r of t)try{const[i,s]=r;yield{shortcode:i,name:s,start:r.index,end:r.index+i.length}}catch{}}function jq(e,t){return e.replaceAll(ew(),(r,i)=>t({shortcode:r,name:i}))}gt({},{useFetchImplementation:()=>Vq,validateGithub:()=>Hq});try{tw=fetch}catch{}function Vq(e){tw=e}function Hq(e,t,r){return nw.apply(this,arguments)}function nw(){return(nw=$(function*(e,t,r){try{return(yield(yield tw(`https://gist.github.com/${t}/${r}/raw`)).text())===`Verifying that I control the following Nostr public key: ${e}`}catch{return!1}})).apply(this,arguments)}gt({},{decrypt:()=>mN,encrypt:()=>gN,getConversationKey:()=>fN,v2:()=>Zq});var uN=1,dN=65535;function fN(e,t){const r=Sa.getSharedSecret(e,"02"+t).subarray(1,33);return function OM(e,t,r){return $r.hash(e),void 0===r&&(r=new Uint8Array(e.outputLen)),xh(e,Zs(r),Zs(t))}($l,r,"nip44-v2")}function hN(e,t){const r=function PM(e,t,r,i=32){if($r.hash(e),$r.number(i),i>255*e.outputLen)throw new Error("Length should be <= 255*HashLen");const s=Math.ceil(i/e.outputLen);void 0===r&&(r=kM);const o=new Uint8Array(s*e.outputLen),a=xh.create(e,t),c=a._cloneInto(),l=new Uint8Array(a.outputLen);for(let u=0;udN)throw new Error("invalid plaintext size: must be between 1 and 65535 bytes");const t=new Uint8Array(2);return new DataView(t.buffer).setUint16(0,e,!1),t}(r);return vh(i,t,new Uint8Array(rw(r)-r))}(e),c=L0(i,s,a),l=pN(o,c,r);return Ei.encode(vh(new Uint8Array([2]),r,c,l))}function mN(e,t){const{nonce:r,ciphertext:i,mac:s}=function Wq(e){if("string"!=typeof e)throw new Error("payload must be a valid string");const t=e.length;if(t<132||t>87472)throw new Error("invalid payload length: "+t);if("#"===e[0])throw new Error("unknown encryption version");let r;try{r=Ei.decode(e)}catch(o){throw new Error("invalid base64: "+o.message)}const i=r.length;if(i<99||i>65603)throw new Error("invalid data length: "+i);const s=r[0];if(2!==s)throw new Error("unknown encryption version "+s);return{nonce:r.subarray(1,33),ciphertext:r.subarray(33,-32),mac:r.subarray(-32)}}(e),{chacha_key:o,chacha_nonce:a,hmac_key:c}=hN(t,r);if(!Dh(pN(c,i,r),s))throw new Error("invalid MAC");return function Gq(e){const t=new DataView(e.buffer).getUint16(0),r=e.subarray(2,2+t);if(tdN||r.length!==t||e.length!==2+rw(t))throw new Error("invalid padding");return Gr.decode(r)}(L0(o,a,i))}var sw,Zq={utils:{getConversationKey:fN,calcPaddedLen:rw},encrypt:gN,decrypt:mN};function Qq(e){const{pathname:t,searchParams:r}=new URL(e),i=t,s=r.get("relay"),o=r.get("secret");if(!i||!s||!o)throw new Error("invalid connection string");return{pubkey:i,relay:s,secret:o}}function Yq(e,t,r){return iw.apply(this,arguments)}function iw(){return(iw=$(function*(e,t,r){const s=yield nN(t,e,JSON.stringify({method:"pay_invoice",params:{invoice:r}})),o={kind:ZM,created_at:Math.round(Date.now()/1e3),content:s,tags:[["p",e]]};return Zn(o,t)})).apply(this,arguments)}gt({},{makeNwcRequestEvent:()=>Yq,parseConnectionString:()=>Qq}),gt({},{getZapEndpoint:()=>eG,makeZapReceipt:()=>rG,makeZapRequest:()=>tG,useFetchImplementation:()=>Xq,validateZapRequest:()=>nG});try{sw=fetch}catch{}function Xq(e){sw=e}function eG(e){return ow.apply(this,arguments)}function ow(){return(ow=$(function*(e){try{let t="",{lud06:r,lud16:i}=JSON.parse(e.content);if(r){let{words:a}=Ta.decode(r,1e3),c=Ta.fromWords(a);t=Gr.decode(c)}else{if(!i)return null;{let[a,c]=i.split("@");t=new URL(`/.well-known/lnurlp/${a}`,`https://${c}`).toString()}}let o=yield(yield sw(t)).json();if(o.allowsNostr&&o.nostrPubkey)return o.callback}catch{}return null})).apply(this,arguments)}function tG({profile:e,event:t,amount:r,relays:i,comment:s=""}){if(!r)throw new Error("amount not given");if(!e)throw new Error("profile not given");let o={kind:9734,created_at:Math.round(Date.now()/1e3),content:s,tags:[["p",e],["amount",r.toString()],["relays",...i]]};return t&&o.tags.push(["e",t]),o}function nG(e){let t;try{t=JSON.parse(e)}catch{return"Invalid zap request JSON."}if(!LM(t))return"Zap request is not a valid Nostr event.";if(!ka(t))return"Invalid signature on zap request.";let r=t.tags.find(([o,a])=>"p"===o&&a);if(!r)return"Zap request doesn't have a 'p' tag.";if(!r[1].match(/^[a-f0-9]{64}$/))return"Zap request 'p' tag is not valid hex.";let i=t.tags.find(([o,a])=>"e"===o&&a);return i&&!i[1].match(/^[a-f0-9]{64}$/)?"Zap request 'e' tag is not valid hex.":t.tags.find(([o,a])=>"relays"===o&&a)?null:"Zap request doesn't have a 'relays' tag."}function rG({zapRequest:e,preimage:t,bolt11:r,paidAt:i}){let s=JSON.parse(e),o=s.tags.filter(([c])=>"e"===c||"p"===c||"a"===c),a={kind:9735,created_at:Math.round(i.getTime()/1e3),content:"",tags:[...o,["P",s.pubkey],["bolt11",r],["description",e]]};return t&&a.tags.push(["preimage",t]),a}gt({},{getToken:()=>sG,hashPayload:()=>uw,unpackEventFromToken:()=>vN,validateEvent:()=>CN,validateEventKind:()=>_N,validateEventMethodTag:()=>EN,validateEventPayloadTag:()=>DN,validateEventTimestamp:()=>wN,validateEventUrlTag:()=>bN,validateToken:()=>oG});var yN="Nostr ";function sG(e,t,r){return aw.apply(this,arguments)}function aw(){return(aw=$(function*(e,t,r,i=!1,s){const o={kind:H0,tags:[["u",e],["method",t]],created_at:Math.round((new Date).getTime()/1e3),content:""};s&&o.tags.push(["payload",uw(s)]);const a=yield r(o);return(i?yN:"")+Ei.encode(hr.encode(JSON.stringify(a)))})).apply(this,arguments)}function oG(e,t,r){return cw.apply(this,arguments)}function cw(){return(cw=$(function*(e,t,r){const i=yield vN(e).catch(o=>{throw o});return yield CN(i,t,r).catch(o=>{throw o})})).apply(this,arguments)}function vN(e){return lw.apply(this,arguments)}function lw(){return(lw=$(function*(e){if(!e)throw new Error("Missing token");e=e.replace(yN,"");const t=Gr.decode(Ei.decode(e));if(!t||0===t.length||!t.startsWith("{"))throw new Error("Invalid token");return JSON.parse(t)})).apply(this,arguments)}function wN(e){return!!e.created_at&&Math.round((new Date).getTime()/1e3)-e.created_at<60}function _N(e){return e.kind===H0}function bN(e,t){const r=e.tags.find(i=>"u"===i[0]);return!!r&&r.length>0&&r[1]===t}function EN(e,t){const r=e.tags.find(i=>"method"===i[0]);return!!r&&r.length>0&&r[1].toLowerCase()===t.toLowerCase()}function uw(e){return _n($l(hr.encode(JSON.stringify(e))))}function DN(e,t){const r=e.tags.find(s=>"payload"===s[0]);if(!r)return!1;const i=uw(t);return r.length>0&&r[1]===i}function CN(e,t,r,i){return dw.apply(this,arguments)}function dw(){return(dw=$(function*(e,t,r,i){if(!ka(e))throw new Error("Invalid nostr event, signature invalid");if(!_N(e))throw new Error("Invalid nostr event, kind invalid");if(!wN(e))throw new Error("Invalid nostr event, created_at timestamp invalid");if(!bN(e,t))throw new Error("Invalid nostr event, url tag invalid");if(!EN(e,r))throw new Error("Invalid nostr event, method tag invalid");if(i&&"object"==typeof i&&Object.keys(i).length>0&&!DN(e,i))throw new Error("Invalid nostr event, payload tag does not match request body hash");return!0})).apply(this,arguments)}function ss(e){var t,r,i,s=2;for(typeof Symbol<"u"&&(r=Symbol.asyncIterator,i=Symbol.iterator);s--;){if(r&&null!=(t=e[r]))return t.call(e);if(i&&null!=(t=e[i]))return new Uh(t.call(e));r="@@asyncIterator",i="@@iterator"}throw new TypeError("Object is not async iterable")}function Uh(e){function t(r){if(Object(r)!==r)return Promise.reject(new TypeError(r+" is not an object."));var i=r.done;return Promise.resolve(r.value).then(function(s){return{value:s,done:i}})}return(Uh=function(i){this.s=i,this.n=i.next}).prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(i){var s=this.s.return;return void 0===s?Promise.resolve({value:i,done:!0}):t(s.apply(this.s,arguments))},throw:function(i){var s=this.s.return;return void 0===s?Promise.reject(i):t(s.apply(this.s,arguments))}},new Uh(e)}"object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date;const fw="object"==typeof process&&process?process:{};let jh=globalThis.AbortController,TN=globalThis.AbortSignal;if(typeof jh>"u"){TN=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,s){this._onabort.push(s)}},jh=class{constructor(){t()}signal=new TN;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(const s of this.signal._onabort)s(i);this.signal.onabort?.(i)}}};let e="1"!==fw.env?.LRU_CACHE_IGNORE_AC_WARNING;const t=()=>{e&&(e=!1,((e,t,r,i)=>{"function"==typeof fw.emitWarning?fw.emitWarning(e,t,r,i):console.error(`[${r}] ${t}: ${e}`)})("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var AN,MN;Symbol("type"),Symbol,Symbol,AN=Symbol.iterator,MN=Symbol.toStringTag;class Kn{cache;constructor(t){this.cache=t??new Map}get size(){return this.cache.size}add(t){this.#e(t);for(const r of this){if(Kn.deletes(r,t)||Kn.replaces(r,t))return this;Kn.replaces(t,r)&&this.delete(r)}return this.cache.set(t.id,t),this}#e(t){if(5===t.kind)for(const r of t.tags)if("e"===r[0]){const i=this.cache.get(r[1]);i&&i.pubkey===t.pubkey&&this.delete(i)}}clear(){this.cache.clear()}delete(t){return this.cache.delete(t.id)}forEach(t,r){return this.cache.forEach((i,s)=>t(i,i,this),r)}has(t){return this.cache.has(t.id)}*entries(){for(const t of this.values())yield[t,t]}keys(){return this.values()}*values(){for(const t of Kn.sortEvents([...this.cache.values()]))yield t}[AN](){return this.values()}[MN]="NSet";static isReplaceable(t){return[0,3].includes(t)||1e4<=t&&t<2e4}static isParameterizedReplaceable(t){return 3e4<=t&&t<4e4}static replaces(t,r){const{kind:i,pubkey:s}=t;if(Kn.isReplaceable(i))return i===r.kind&&s===r.pubkey&&Kn.sortEvents([t,r])[0]===t;if(Kn.isParameterizedReplaceable(i)){const o=t.tags.find(([c])=>"d"===c)?.[1]||"",a=r.tags.find(([c])=>"d"===c)?.[1]||"";return i===r.kind&&s===r.pubkey&&Kn.sortEvents([t,r])[0]===t&&o===a}return!1}static deletes(t,r){const{kind:i,pubkey:s,tags:o}=t;if(5===i&&s===r.pubkey)for(const[a,c]of o)if("e"===a&&c===r.id)return!0;return!1}static sortEvents(t){return t.sort((r,i)=>r.created_at!==i.created_at?i.created_at-r.created_at:r.id.localeCompare(i.id))}union(t){throw new Error("Method not implemented.")}intersection(t){throw new Error("Method not implemented.")}difference(t){throw new Error("Method not implemented.")}symmetricDifference(t){throw new Error("Method not implemented.")}isSubsetOf(t){throw new Error("Method not implemented.")}isSupersetOf(t){throw new Error("Method not implemented.")}isDisjointFrom(t){throw new Error("Method not implemented.")}}function Fa(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function pr(e,...t){if(!function lG(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function Ql(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}Symbol;const Ba="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,Xs=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),Wr=(e,t)=>e<<32-t|e>>>t;function kN(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}function eo(e){return"string"==typeof e&&(e=kN(e)),pr(e),e}new Uint8Array(new Uint32Array([287454020]).buffer);class PN{clone(){return this._cloneInto()}}function mw(e){const t=i=>e().update(eo(i)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function yG(e=32){if(Ba&&"function"==typeof Ba.getRandomValues)return Ba.getRandomValues(new Uint8Array(e));if(Ba&&"function"==typeof Ba.randomBytes)return Ba.randomBytes(e);throw new Error("crypto.getRandomValues must be defined")}class LN extends PN{constructor(t,r){super(),this.finished=!1,this.destroyed=!1,function pw(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");Fa(e.outputLen),Fa(e.blockLen)}(t);const i=eo(r);if(this.iHash=t.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,o=new Uint8Array(s);o.set(i.length>s?t.create().update(i).digest():i);for(let a=0;anew LN(e,t).update(r).digest();Jl.create=(e,t)=>new LN(e,t);const wG=(e,t,r)=>e&t^~e&r,_G=(e,t,r)=>e&t^e&r^t&r;class yw extends PN{constructor(t,r,i,s){super(),this.blockLen=t,this.outputLen=r,this.padOffset=i,this.isLE=s,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=Xs(this.buffer)}update(t){Ql(this);const{view:r,buffer:i,blockLen:s}=this,o=(t=eo(t)).length;for(let a=0;as-a&&(this.process(i,0),a=0);for(let f=a;f>s&o),c=Number(r&o),u=i?0:4;e.setUint32(t+(i?4:0),a,i),e.setUint32(t+u,c,i)})(i,s-8,BigInt(8*this.length),o),this.process(i,0);const c=Xs(t),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=l/4,d=this.get();if(u>d.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;ft)),EG=FN.map(e=>(9*e+5)%16);let vw=[FN],ww=[EG];for(let e=0;e<4;e++)for(let t of[vw,ww])t.push(t[e].map(r=>bG[r]));const AG=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),as=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),cs=new Uint32Array(64);class jN extends yw{constructor(){super(64,32,8,!1),this.A=0|as[0],this.B=0|as[1],this.C=0|as[2],this.D=0|as[3],this.E=0|as[4],this.F=0|as[5],this.G=0|as[6],this.H=0|as[7]}get(){const{A:t,B:r,C:i,D:s,E:o,F:a,G:c,H:l}=this;return[t,r,i,s,o,a,c,l]}set(t,r,i,s,o,a,c,l){this.A=0|t,this.B=0|r,this.C=0|i,this.D=0|s,this.E=0|o,this.F=0|a,this.G=0|c,this.H=0|l}process(t,r){for(let f=0;f<16;f++,r+=4)cs[f]=t.getUint32(r,!1);for(let f=16;f<64;f++){const h=cs[f-15],p=cs[f-2],g=Wr(h,7)^Wr(h,18)^h>>>3,m=Wr(p,17)^Wr(p,19)^p>>>10;cs[f]=m+cs[f-7]+g+cs[f-16]|0}let{A:i,B:s,C:o,D:a,E:c,F:l,G:u,H:d}=this;for(let f=0;f<64;f++){const p=d+(Wr(c,6)^Wr(c,11)^Wr(c,25))+wG(c,l,u)+AG[f]+cs[f]|0,m=(Wr(i,2)^Wr(i,13)^Wr(i,22))+_G(i,s,o)|0;d=u,u=l,l=c,c=a+p|0,a=o,o=s,s=i,i=p+m|0}i=i+this.A|0,s=s+this.B|0,o=o+this.C|0,a=a+this.D|0,c=c+this.E|0,l=l+this.F|0,u=u+this.G|0,d=d+this.H|0,this.set(i,s,o,a,c,l,u,d)}roundClean(){cs.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const _w=mw(()=>new jN),zh=BigInt(2**32-1),bw=BigInt(32);function $N(e,t=!1){return t?{h:Number(e&zh),l:Number(e>>bw&zh)}:{h:0|Number(e>>bw&zh),l:0|Number(e&zh)}}const ye_split=function MG(e,t=!1){let r=new Uint32Array(e.length),i=new Uint32Array(e.length);for(let s=0;sBigInt(e))),Dw=BigInt(0),Gh=BigInt(1),WG=BigInt(2);function to(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}function Xl(e){if(!to(e))throw new Error("Uint8Array expected")}function Ua(e,t){if("boolean"!=typeof t)throw new Error(`${e} must be valid boolean, got "${t}".`)}const ZG=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function ja(e){Xl(e);let t="";for(let r=0;r=Ti._0&&e<=Ti._9?e-Ti._0:e>=Ti._A&&e<=Ti._F?e-(Ti._A-10):e>=Ti._a&&e<=Ti._f?e-(Ti._a-10):void 0}function Va(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,r=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const i=new Uint8Array(r);for(let s=0,o=0;s"bigint"==typeof e&&Dw<=e;function Wh(e,t,r){return Iw(e)&&Iw(t)&&Iw(r)&&t<=e&&eDw;e>>=Gh,t+=1);return t}const Tw=e=>(WG<new Uint8Array(e),qN=e=>Uint8Array.from(e);function GN(e,t,r){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof r)throw new Error("hmacFn must be a function");let i=xw(e),s=xw(e),o=0;const a=()=>{i.fill(1),s.fill(0),o=0},c=(...f)=>r(s,i,...f),l=(f=xw())=>{s=c(qN([0]),f),i=c(),0!==f.length&&(s=c(qN([1]),f),i=c())},u=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let f=0;const h=[];for(;f{let p;for(a(),l(f);!(p=h(u()));)l();return a(),p}}const KG={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||to(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};function tu(e,t,r={}){const i=(s,o,a)=>{const c=KG[o];if("function"!=typeof c)throw new Error(`Invalid validator "${o}", expected function`);const l=e[s];if(!(a&&void 0===l||c(l,e)))throw new Error(`Invalid param ${String(s)}=${l} (${typeof l}), expected ${o}`)};for(const[s,o]of Object.entries(t))i(s,o,!1);for(const[s,o]of Object.entries(r))i(s,o,!0);return e}function Aw(e){const t=new WeakMap;return(r,...i)=>{const s=t.get(r);if(void 0!==s)return s;const o=e(r,...i);return t.set(r,o),o}}const Mt=BigInt(0),qe=BigInt(1),ds=BigInt(2),QG=BigInt(3),Mw=BigInt(4),WN=BigInt(5),ZN=BigInt(8);function Lt(e,t){const r=e%t;return r>=Mt?r:t+r}function XG(e,t,r){if(r<=Mt||t 0");if(r===qe)return Mt;let i=qe;for(;t>Mt;)t&qe&&(i=i*e%r),e=e*e%r,t>>=qe;return i}function Qn(e,t,r){let i=e;for(;t-- >Mt;)i*=i,i%=r;return i}function Zh(e,t){if(e===Mt||t<=Mt)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=Lt(e,t),i=t,s=Mt,o=qe,a=qe,c=Mt;for(;r!==Mt;){const u=i/r,d=i%r,f=s-a*u,h=o-c*u;i=r,r=d,s=a,o=c,a=f,c=h}if(i!==qe)throw new Error("invert: does not exist");return Lt(s,t)}BigInt(9),BigInt(16);const nW=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Nw(e,t){const r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function KN(e,t,r=!1,i={}){if(e<=Mt)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:s,nByteLength:o}=Nw(e,t);if(o>2048)throw new Error("Field lengths over 2048 bytes are not supported");const a=function tW(e){if(e%Mw===QG){const t=(e+qe)/Mw;return function(i,s){const o=i.pow(s,t);if(!i.eql(i.sqr(o),s))throw new Error("Cannot find square root");return o}}if(e%ZN===WN){const t=(e-WN)/ZN;return function(i,s){const o=i.mul(s,ds),a=i.pow(o,t),c=i.mul(s,a),l=i.mul(i.mul(c,ds),a),u=i.mul(c,i.sub(l,i.ONE));if(!i.eql(i.sqr(u),s))throw new Error("Cannot find square root");return u}}return function eW(e){const t=(e-qe)/ds;let r,i,s;for(r=e-qe,i=0;r%ds===Mt;r/=ds,i++);for(s=ds;sLt(l,e),isValid:l=>{if("bigint"!=typeof l)throw new Error("Invalid field element: expected bigint, got "+typeof l);return Mt<=l&&ll===Mt,isOdd:l=>(l&qe)===qe,neg:l=>Lt(-l,e),eql:(l,u)=>l===u,sqr:l=>Lt(l*l,e),add:(l,u)=>Lt(l+u,e),sub:(l,u)=>Lt(l-u,e),mul:(l,u)=>Lt(l*u,e),pow:(l,u)=>function iW(e,t,r){if(r 0");if(r===Mt)return e.ONE;if(r===qe)return t;let i=e.ONE,s=t;for(;r>Mt;)r&qe&&(i=e.mul(i,s)),s=e.sqr(s),r>>=qe;return i}(c,l,u),div:(l,u)=>Lt(l*Zh(u,e),e),sqrN:l=>l*l,addN:(l,u)=>l+u,subN:(l,u)=>l-u,mulN:(l,u)=>l*u,inv:l=>Zh(l,e),sqrt:i.sqrt||(l=>a(c,l)),invertBatch:l=>function sW(e,t){const r=new Array(t.length),i=t.reduce((o,a,c)=>e.is0(a)?o:(r[c]=o,e.mul(o,a)),e.ONE),s=e.inv(i);return t.reduceRight((o,a,c)=>e.is0(a)?o:(r[c]=e.mul(o,r[c]),e.mul(o,a)),s),r}(c,l),cmov:(l,u,d)=>d?u:l,toBytes:l=>r?Sw(l,o):Ha(l,o),fromBytes:l=>{if(l.length!==o)throw new Error(`Fp.fromBytes: expected ${o}, got ${l.length}`);return r?Cw(l):no(l)}});return Object.freeze(c)}function QN(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function YN(e){const t=QN(e);return t+Math.ceil(t/2)}const cW=BigInt(0),Rw=BigInt(1),Ow=new WeakMap,JN=new WeakMap;function XN(e){return function rW(e){tu(e,nW.reduce((i,s)=>(i[s]="function",i),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"}))}(e.Fp),tu(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Nw(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}function eR(e){void 0!==e.lowS&&Ua("lowS",e.lowS),void 0!==e.prehash&&Ua("prehash",e.prehash)}const{Ph:fW,aT:hW}=qp,xi={Err:class extends Error{constructor(t=""){super(t)}},_tlv:{encode:(e,t)=>{const{Err:r}=xi;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(1&t.length)throw new r("tlv.encode: unpadded data");const i=t.length/2,s=$a(i);if(s.length/2&128)throw new r("tlv.encode: long form length too big");const o=i>127?$a(s.length/2|128):"";return`${$a(e)}${o}${s}${t}`},decode(e,t){const{Err:r}=xi;let i=0;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length<2||t[i++]!==e)throw new r("tlv.decode: wrong tlv");const s=t[i++];let a=0;if(128&s){const l=127&s;if(!l)throw new r("tlv.decode(long): indefinite length not supported");if(l>4)throw new r("tlv.decode(long): byte length is too big");const u=t.subarray(i,i+l);if(u.length!==l)throw new r("tlv.decode: length bytes not complete");if(0===u[0])throw new r("tlv.decode(long): zero leftmost byte");for(const d of u)a=a<<8|d;if(i+=l,a<128)throw new r("tlv.decode(long): not minimal encoding")}else a=s;const c=t.subarray(i,i+a);if(c.length!==a)throw new r("tlv.decode: wrong value length");return{v:c,l:t.subarray(i+a)}}},_int:{encode(e){const{Err:t}=xi;if(e{const w=y.toAffine();return eu(Uint8Array.from([4]),r.toBytes(w.x),r.toBytes(w.y))}),o=t.fromBytes||(m=>{const y=m.subarray(1);return{x:r.fromBytes(y.subarray(0,r.BYTES)),y:r.fromBytes(y.subarray(r.BYTES,2*r.BYTES))}});function a(m){const{a:y,b:v}=t,w=r.sqr(m),_=r.mul(w,m);return r.add(r.add(_,r.mul(m,y)),v)}if(!r.eql(r.sqr(t.Gy),a(t.Gx)))throw new Error("bad generator point: equation left != right");function l(m){const{allowedPrivateKeyLengths:y,nByteLength:v,wrapPrivateKey:w,n:_}=t;if(y&&"bigint"!=typeof m){if(to(m)&&(m=ja(m)),"string"!=typeof m||!y.includes(m.length))throw new Error("Invalid key");m=m.padStart(2*v,"0")}let b;try{b="bigint"==typeof m?m:no(gr("private key",m,v))}catch{throw new Error(`private key must be ${v} bytes, hex or bigint, not ${typeof m}`)}return w&&(b=Lt(b,_)),ro("private key",b,$e,_),b}function u(m){if(!(m instanceof h))throw new Error("ProjectivePoint expected")}const d=Aw((m,y)=>{const{px:v,py:w,pz:_}=m;if(r.eql(_,r.ONE))return{x:v,y:w};const b=m.is0();null==y&&(y=b?r.ONE:r.inv(_));const C=r.mul(v,y),D=r.mul(w,y),S=r.mul(_,y);if(b)return{x:r.ZERO,y:r.ZERO};if(!r.eql(S,r.ONE))throw new Error("invZ was invalid");return{x:C,y:D}}),f=Aw(m=>{if(m.is0()){if(t.allowInfinityPoint&&!r.is0(m.py))return;throw new Error("bad point: ZERO")}const{x:y,y:v}=m.toAffine();if(!r.isValid(y)||!r.isValid(v))throw new Error("bad point: x or y not FE");const w=r.sqr(v),_=a(y);if(!r.eql(w,_))throw new Error("bad point: equation left != right");if(!m.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class h{constructor(y,v,w){if(this.px=y,this.py=v,this.pz=w,null==y||!r.isValid(y))throw new Error("x required");if(null==v||!r.isValid(v))throw new Error("y required");if(null==w||!r.isValid(w))throw new Error("z required");Object.freeze(this)}static fromAffine(y){const{x:v,y:w}=y||{};if(!y||!r.isValid(v)||!r.isValid(w))throw new Error("invalid affine point");if(y instanceof h)throw new Error("projective point not allowed");const _=b=>r.eql(b,r.ZERO);return _(v)&&_(w)?h.ZERO:new h(v,w,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(y){const v=r.invertBatch(y.map(w=>w.pz));return y.map((w,_)=>w.toAffine(v[_])).map(h.fromAffine)}static fromHex(y){const v=h.fromAffine(o(gr("pointHex",y)));return v.assertValidity(),v}static fromPrivateKey(y){return h.BASE.multiply(l(y))}static msm(y,v){return function uW(e,t,r,i){if(!Array.isArray(r)||!Array.isArray(i)||i.length!==r.length)throw new Error("arrays of points and scalars must have equal length");i.forEach((d,f)=>{if(!t.isValid(d))throw new Error(`wrong scalar at index ${f}`)}),r.forEach((d,f)=>{if(!(d instanceof e))throw new Error(`wrong point at index ${f}`)});const s=zN(BigInt(r.length)),o=s>12?s-3:s>4?s-2:s?2:1,a=(1<=0;d-=o){c.fill(e.ZERO);for(let h=0;h>BigInt(d)&BigInt(a));c[g]=c[g].add(r[h])}let f=e.ZERO;for(let h=c.length-1,p=e.ZERO;h>0;h--)p=p.add(c[h]),f=f.add(p);if(u=u.add(f),0!==d)for(let h=0;hmr||D>mr;)b&$e&&(S=S.add(O)),D&$e&&(T=T.add(O)),O=O.double(),b>>=$e,D>>=$e;return _&&(S=S.negate()),C&&(T=T.negate()),T=new h(r.mul(T.px,w.beta),T.py,T.pz),S.add(T)}multiply(y){const{endo:v,n:w}=t;let _,b;if(ro("scalar",y,$e,w),v){const{k1neg:C,k1:D,k2neg:S,k2:T}=v.splitScalar(y);let{p:O,f:U}=this.wNAF(D),{p:B,f:j}=this.wNAF(T);O=g.constTimeNegate(C,O),B=g.constTimeNegate(S,B),B=new h(r.mul(B.px,v.beta),B.py,B.pz),_=O.add(B),b=U.add(j)}else{const{p:C,f:D}=this.wNAF(y);_=C,b=D}return h.normalizeZ([_,b])[0]}multiplyAndAddUnsafe(y,v,w){const _=h.BASE,b=(D,S)=>S!==mr&&S!==$e&&D.equals(_)?D.multiply(S):D.multiplyUnsafe(S),C=b(this,v).add(b(y,w));return C.is0()?void 0:C}toAffine(y){return d(this,y)}isTorsionFree(){const{h:y,isTorsionFree:v}=t;if(y===$e)return!0;if(v)return v(h,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:y,clearCofactor:v}=t;return y===$e?this:v?v(h,this):this.multiplyUnsafe(t.h)}toRawBytes(y=!0){return Ua("isCompressed",y),this.assertValidity(),s(h,this,y)}toHex(y=!0){return Ua("isCompressed",y),ja(this.toRawBytes(y))}}h.BASE=new h(t.Gx,t.Gy,r.ONE),h.ZERO=new h(r.ZERO,r.ONE,r.ZERO);const p=t.nBitLength,g=function lW(e,t){const r=(o,a)=>{const c=a.negate();return o?c:a},i=o=>{if(!Number.isSafeInteger(o)||o<=0||o>t)throw new Error(`Wrong window size=${o}, should be [1..${t}]`)},s=o=>(i(o),{windows:Math.ceil(t/o)+1,windowSize:2**(o-1)});return{constTimeNegate:r,unsafeLadder(o,a){let c=e.ZERO,l=o;for(;a>cW;)a&Rw&&(c=c.add(l)),l=l.double(),a>>=Rw;return c},precomputeWindow(o,a){const{windows:c,windowSize:l}=s(a),u=[];let d=o,f=d;for(let h=0;h>=g,v>u&&(v-=p,c+=Rw);const w=y,_=y+Math.abs(v)-1,C=v<0;0===v?f=f.add(r(m%2!=0,a[w])):d=d.add(r(C,a[_]))}return{p:d,f}},wNAFCached(o,a,c){const l=JN.get(o)||1;let u=Ow.get(o);return u||(u=this.precomputeWindow(o,l),1!==l&&Ow.set(o,c(u))),this.wNAF(l,u,a)},setWindowSize(o,a){i(a),JN.set(o,a),Ow.delete(o)}}}(h,t.endo?Math.ceil(p/2):p);return{CURVE:t,ProjectivePoint:h,normPrivateKeyToScalar:l,weierstrassEquation:a,isWithinCurveOrder:function c(m){return Wh(m,$e,t.n)}}}({...t,toBytes(k,I,E){const x=I.toAffine(),R=r.toBytes(x.x),A=eu;return Ua("isCompressed",E),E?A(Uint8Array.from([I.hasEvenY()?2:3]),R):A(Uint8Array.from([4]),R,r.toBytes(x.y))},fromBytes(k){const I=k.length,E=k[0],x=k.subarray(1);if(I!==s||2!==E&&3!==E){if(I===o&&4===E)return{x:r.fromBytes(x.subarray(0,r.BYTES)),y:r.fromBytes(x.subarray(r.BYTES,2*r.BYTES))};throw new Error(`Point of length ${I} was invalid. Expected ${s} compressed bytes or ${o} uncompressed bytes`)}{const R=no(x);if(!Wh(R,$e,r.ORDER))throw new Error("Point is not on curve");const A=d(R);let H;try{H=r.sqrt(A)}catch(_e){const le=_e instanceof Error?": "+_e.message:"";throw new Error("Point is not on curve"+le)}return!(1&~E)!=((H&$e)===$e)&&(H=r.neg(H)),{x:R,y:H}}}}),h=k=>ja(Ha(k,t.nByteLength));function p(k){return k>i>>$e}const m=(k,I,E)=>no(k.slice(I,E));class y{constructor(I,E,x){this.r=I,this.s=E,this.recovery=x,this.assertValidity()}static fromCompact(I){const E=t.nByteLength;return I=gr("compactSignature",I,2*E),new y(m(I,0,E),m(I,E,2*E))}static fromDER(I){const{r:E,s:x}=xi.toSig(gr("DER",I));return new y(E,x)}assertValidity(){ro("r",this.r,$e,i),ro("s",this.s,$e,i)}addRecoveryBit(I){return new y(this.r,this.s,I)}recoverPublicKey(I){const{r:E,s:x,recovery:R}=this,A=D(gr("msgHash",I));if(null==R||![0,1,2,3].includes(R))throw new Error("recovery id invalid");const H=2===R||3===R?E+t.n:E;if(H>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const J=l.fromHex((1&R?"03":"02")+h(H)),_e=c(H),le=a(-A*_e),lt=a(x*_e),st=l.BASE.multiplyAndAddUnsafe(J,le,lt);if(!st)throw new Error("point at infinify");return st.assertValidity(),st}hasHighS(){return p(this.s)}normalizeS(){return this.hasHighS()?new y(this.r,a(-this.s),this.recovery):this}toDERRawBytes(){return Va(this.toDERHex())}toDERHex(){return xi.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Va(this.toCompactHex())}toCompactHex(){return h(this.r)+h(this.s)}}const v={isValidPrivateKey(k){try{return u(k),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const k=YN(t.n);return function aW(e,t,r=!1){const i=e.length,s=QN(t),o=YN(t);if(i<16||i1024)throw new Error(`expected ${o}-1024 bytes of input, got ${i}`);const c=Lt(r?no(e):Cw(e),t-qe)+qe;return r?Sw(c,s):Ha(c,s)}(t.randomBytes(k),t.n)},precompute:(k=8,I=l.BASE)=>(I._setWindowSize(k),I.multiply(BigInt(3)),I)};function _(k){const I=to(k),E="string"==typeof k,x=(I||E)&&k.length;return I?x===s||x===o:E?x===2*s||x===2*o:k instanceof l}const C=t.bits2int||function(k){const I=no(k),E=8*k.length-t.nBitLength;return E>0?I>>BigInt(E):I},D=t.bits2int_modN||function(k){return a(C(k))},S=Tw(t.nBitLength);function T(k){return ro(`num < 2^${t.nBitLength}`,k,mr,S),Ha(k,t.nByteLength)}const U={lowS:t.lowS,prehash:!1},B={lowS:t.lowS,prehash:!1};return l.BASE._setWindowSize(8),{CURVE:t,getPublicKey:function w(k,I=!0){return l.fromPrivateKey(k).toRawBytes(I)},getSharedSecret:function b(k,I,E=!0){if(_(k))throw new Error("first arg must be private key");if(!_(I))throw new Error("second arg must be public key");return l.fromHex(I).multiply(u(k)).toRawBytes(E)},sign:function j(k,I,E=U){const{seed:x,k2sig:R}=function O(k,I,E=U){if(["recovered","canonical"].some(tt=>tt in E))throw new Error("sign() legacy options not supported");const{hash:x,randomBytes:R}=t;let{lowS:A,prehash:H,extraEntropy:Q}=E;null==A&&(A=!0),k=gr("msgHash",k),eR(E),H&&(k=gr("prehashed msgHash",x(k)));const J=D(k),_e=u(I),le=[T(_e),T(J)];if(null!=Q&&!1!==Q){const tt=!0===Q?R(r.BYTES):Q;le.push(gr("extraEntropy",tt))}const lt=eu(...le),st=J;return{seed:lt,k2sig:function Se(tt){const Ae=C(tt);if(!f(Ae))return;const Cn=c(Ae),Bt=l.BASE.multiply(Ae).toAffine(),Ut=a(Bt.x);if(Ut===mr)return;const br=a(Cn*a(st+Ut*_e));if(br===mr)return;let go=(Bt.x===Ut?0:2)|Number(Bt.y&$e),Vu=br;return A&&p(br)&&(Vu=function g(k){return p(k)?a(-k):k}(br),go^=1),new y(Ut,Vu,go)}}}(k,I,E);return GN(t.hash.outputLen,t.nByteLength,t.hmac)(x,R)},verify:function Y(k,I,E,x=B){const R=k;if(I=gr("msgHash",I),E=gr("publicKey",E),"strict"in x)throw new Error("options.strict was renamed to lowS");eR(x);const{lowS:A,prehash:H}=x;let Q,J;try{if("string"==typeof R||to(R))try{Q=y.fromDER(R)}catch(Bt){if(!(Bt instanceof xi.Err))throw Bt;Q=y.fromCompact(R)}else{if("object"!=typeof R||"bigint"!=typeof R.r||"bigint"!=typeof R.s)throw new Error("PARSE");{const{r:Bt,s:Ut}=R;Q=new y(Bt,Ut)}}J=l.fromHex(E)}catch(Bt){if("PARSE"===Bt.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(A&&Q.hasHighS())return!1;H&&(I=t.hash(I));const{r:_e,s:le}=Q,lt=D(I),st=c(le),Se=a(lt*st),tt=a(_e*st),Ae=l.BASE.multiplyAndAddUnsafe(J,Se,tt)?.toAffine();return!!Ae&&a(Ae.x)===_e},ProjectivePoint:l,Signature:y,utils:v}}function vW(e){return{hash:e,hmac:(t,...r)=>Jl(e,t,function Yl(...e){let t=0;for(let i=0;i(e+t/Yh)/t;const kw=KN(nu,void 0,void 0,{sqrt:function rR(e){const t=nu,r=BigInt(3),i=BigInt(6),s=BigInt(11),o=BigInt(22),a=BigInt(23),c=BigInt(44),l=BigInt(88),u=e*e*e%t,d=u*u*e%t,f=Qn(d,r,t)*d%t,h=Qn(f,r,t)*d%t,p=Qn(h,Yh,t)*u%t,g=Qn(p,s,t)*p%t,m=Qn(g,o,t)*g%t,y=Qn(m,c,t)*m%t,v=Qn(y,l,t)*y%t,w=Qn(v,c,t)*m%t,_=Qn(w,r,t)*d%t,b=Qn(_,a,t)*g%t,C=Qn(b,i,t)*u%t,D=Qn(C,Yh,t);if(!kw.eql(kw.sqr(D),e))throw new Error("Cannot find square root");return D}});(function wW(e,t){const r=i=>mW({...e,...vW(i)});Object.freeze({...r(t),create:r})})({a:BigInt(0),b:BigInt(7),Fp:kw,n:Qh,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=Qh,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),i=-ru*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=r,a=BigInt("0x100000000000000000000000000000000"),c=nR(o*e,t),l=nR(-i*e,t);let u=Lt(e-c*r-l*s,t),d=Lt(-c*i-l*o,t);const f=u>a,h=d>a;if(f&&(u=t-u),h&&(d=t-d),u>a||d>a)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:f,k1:u,k2neg:h,k2:d}}}},_w),BigInt(0);var IR;function SR(e,t){this.v=e,this.k=t}function hs(e){return new SR(e,0)}function cu(e){var t,r;function i(o,a){try{var c=e[o](a),l=c.value,u=l instanceof SR;Promise.resolve(u?l.v:l).then(function(d){if(u){var f="return"===o?"return":"next";if(!l.k||d.done)return i(f,d);d=e[f](d).value}s(c.done?"return":"normal",d)},function(d){i("throw",d)})}catch(d){s("throw",d)}}function s(o,a){switch(o){case"return":t.resolve({value:a,done:!0});break;case"throw":t.reject(a);break;default:t.resolve({value:a,done:!1})}(t=t.next)?i(t.key,t.arg):r=null}this._invoke=function(o,a){return new Promise(function(c,l){var u={key:o,arg:a,resolve:c,reject:l,next:null};r?r=r.next=u:(t=r=u,i(o,a))})},"function"!=typeof e.return&&(this.return=void 0)}function ip(e){return function(){return new cu(e.apply(this,arguments))}}kN("Bitcoin seed"),new TextEncoder,(new TextEncoder).encode("0123456789abcdef"),new TextEncoder,new TextDecoder,cu.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},cu.prototype.next=function(e){return this._invoke("next",e)},cu.prototype.throw=function(e){return this._invoke("throw",e)},cu.prototype.return=function(e){return this._invoke("return",e)},IR=Symbol.asyncIterator;class TR{#e=[];#t;#r=!1;constructor(t){t?.aborted?this.abort():t?.addEventListener("abort",()=>this.abort(),{once:!0})}[IR](){var t=this;return ip(function*(){for(;!t.#r;)t.#e.length?yield t.#e.shift():yield hs(new Promise(r=>{t.#t=r}));throw new DOMException("The signal has been aborted","AbortError")})()}push(t){this.#e.push(t),this.#t?.()}abort(){this.#r=!0,this.#t?.()}}class xR{static regular(t){return 1e3<=t&&t<1e4||[1,2,4,5,6,7,8,16,40,41,42,43,44].includes(t)}static replaceable(t){return 1e4<=t&&t<2e4||[0,3].includes(t)}static ephemeral(t){return 2e4<=t&&t<3e4}static parameterizedReplaceable(t){return 3e4<=t&&t<4e4}}class WW{opts;relays;constructor(t){this.opts=t,this.relays=new Map}relay(t){const r=this.relays.get(t);if(r)return r;{const i=this.opts.open(t);return this.relays.set(t,i),i}}req(t,r){var i=this;return ip(function*(){const s=new AbortController,o=r?.signal?AbortSignal.any([r.signal,s.signal]):s.signal,a=yield hs(i.opts.reqRouter(t));if(a.size<1)return;const c=new TR(o),l=new Set,u=new Set;for(const m of a.keys()){const y=i.relay(m);$(function*(){var _,v=!1,w=!1;try{for(var C,b=ss(y.req(t,{signal:o}));v=!(C=yield b.next()).done;v=!1){const D=C.value;"EOSE"===D[0]&&(l.add(m),l.size===a.size&&c.push(D)),"CLOSED"===D[0]&&(u.add(m),u.size===a.size&&c.push(D)),"EVENT"===D[0]&&c.push(D)}}catch(D){w=!0,_=D}finally{try{v&&null!=b.return&&(yield b.return())}finally{if(w)throw _}}})().catch(()=>{})}try{var h,d=!1,f=!1;try{for(var g,p=ss(c);d=!(g=yield hs(p.next())).done;d=!1)yield g.value}catch(m){f=!0,h=m}finally{try{d&&null!=p.return&&(yield hs(p.return()))}finally{if(f)throw h}}}finally{s.abort()}})()}event(t,r){var i=this;return $(function*(){const s=yield i.opts.eventRouter(t);s.length<1||(yield Promise.any(s.map(o=>i.relay(o).event(t,r))))})()}query(t,r){var i=this;return $(function*(){const s=new Kn,o=t.reduce((h,p)=>h+KM(p),0);if(0===o)return[];const a=t.reduce((h,p)=>h||!!p.kinds?.some(g=>xR.replaceable(g)||xR.parameterizedReplaceable(g)),!1);try{var u,c=!1,l=!1;try{for(var f,d=ss(i.req(t,r));c=!(f=yield d.next()).done;c=!1){const h=f.value;if("EOSE"===h[0])break;if("EVENT"===h[0]&&s.add(h[2]),"CLOSED"===h[0])throw new Error("Subscription closed");if(!a&&s.size>=o)break}}catch(h){l=!0,u=h}finally{try{c&&null!=d.return&&(yield d.return())}finally{if(l)throw u}}}catch{}return[...s]})()}}class ZW{constructor(t,r){if(this._retries=0,!Number.isInteger(t)||t<0)throw new Error("Base must be a positive integer or zero");if(void 0!==r&&(!Number.isInteger(r)||r<0))throw new Error("ExpMax must be a undefined, a positive integer or zero");this.base=t,this.expMax=r,this.i=0}get retries(){return this._retries}get current(){return this.base*Math.pow(2,this.i)}next(){return this._retries++,this.i=void 0===this.expMax?this.i+1:Math.min(this.i+1,this.expMax),this.current}reset(){this._retries=0,this.i=0}}var xe,Ge=function(e){return e.open="open",e.close="close",e.error="error",e.message="message",e.retry="retry",e.reconnect="reconnect",e}(Ge||{});class KW{constructor(t,r,i){var s,o,a,c,l,u,d,f,h,p,g,m,y,v,w;this._closedByUser=!1,this.handleOpenEvent=_=>this.handleEvent(Ge.open,_),this.handleErrorEvent=_=>this.handleEvent(Ge.error,_),this.handleCloseEvent=_=>this.handleEvent(Ge.close,_),this.handleMessageEvent=_=>this.handleEvent(Ge.message,_),this._url=t,this._protocols=r,this._options={buffer:i?.buffer,retry:{maxRetries:null===(s=i?.retry)||void 0===s?void 0:s.maxRetries,instantReconnect:null===(o=i?.retry)||void 0===o?void 0:o.instantReconnect,backoff:null===(a=i?.retry)||void 0===a?void 0:a.backoff},listeners:{open:[...null!==(l=null===(c=i?.listeners)||void 0===c?void 0:c.open)&&void 0!==l?l:[]],close:[...null!==(d=null===(u=i?.listeners)||void 0===u?void 0:u.close)&&void 0!==d?d:[]],error:[...null!==(h=null===(f=i?.listeners)||void 0===f?void 0:f.error)&&void 0!==h?h:[]],message:[...null!==(g=null===(p=i?.listeners)||void 0===p?void 0:p.message)&&void 0!==g?g:[]],retry:[...null!==(y=null===(m=i?.listeners)||void 0===m?void 0:m.retry)&&void 0!==y?y:[]],reconnect:[...null!==(w=null===(v=i?.listeners)||void 0===v?void 0:v.reconnect)&&void 0!==w?w:[]]}},this._underlyingWebsocket=this.tryConnect()}get url(){return this._url}get protocols(){return this._protocols}get buffer(){return this._options.buffer}get maxRetries(){return this._options.retry.maxRetries}get instantReconnect(){return this._options.retry.instantReconnect}get backoff(){return this._options.retry.backoff}get closedByUser(){return this._closedByUser}get lastConnection(){return this._lastConnection}get underlyingWebsocket(){return this._underlyingWebsocket}get readyState(){return this._underlyingWebsocket.readyState}get bufferedAmount(){return this._underlyingWebsocket.bufferedAmount}get extensions(){return this._underlyingWebsocket.extensions}get binaryType(){return this._underlyingWebsocket.binaryType}set binaryType(t){this._underlyingWebsocket.binaryType=t}send(t){this.closedByUser||(this._underlyingWebsocket.readyState===this._underlyingWebsocket.OPEN?this._underlyingWebsocket.send(t):void 0!==this.buffer&&this.buffer.add(t))}close(t,r){this.cancelScheduledConnectionRetry(),this._closedByUser=!0,this._underlyingWebsocket.close(t,r)}addEventListener(t,r,i){this._options.listeners[t].push({listener:r,options:i})}removeEventListener(t,r,i){this._options.listeners[t]=this._options.listeners[t].filter(o=>o.listener!==r||o.options!==i)}tryConnect(){return this._underlyingWebsocket=new WebSocket(this.url,this.protocols),this._underlyingWebsocket.addEventListener(Ge.open,this.handleOpenEvent),this._underlyingWebsocket.addEventListener(Ge.close,this.handleCloseEvent),this._underlyingWebsocket.addEventListener(Ge.error,this.handleErrorEvent),this._underlyingWebsocket.addEventListener(Ge.message,this.handleMessageEvent),this._underlyingWebsocket}clearWebsocket(){this._underlyingWebsocket.removeEventListener(Ge.open,this.handleOpenEvent),this._underlyingWebsocket.removeEventListener(Ge.close,this.handleCloseEvent),this._underlyingWebsocket.removeEventListener(Ge.error,this.handleErrorEvent),this._underlyingWebsocket.removeEventListener(Ge.message,this.handleMessageEvent),this._underlyingWebsocket.close()}dispatchEvent(t,r){const s=[];this._options.listeners[t].forEach(({listener:o,options:a})=>{o(this,r),(void 0===a||void 0===a.once||!a.once)&&s.push({listener:o,options:a})}),this._options.listeners[t]=s}handleEvent(t,r){switch(t){case Ge.close:this.dispatchEvent(t,r),this.scheduleConnectionRetryIfNeeded();break;case Ge.open:if(void 0!==this.backoff&&void 0!==this._lastConnection){const i={retries:this.backoff.retries,lastConnection:new Date(this._lastConnection)},s=new CustomEvent(Ge.reconnect,{detail:i});this.dispatchEvent(Ge.reconnect,s),this.backoff.reset()}this._lastConnection=new Date,this.dispatchEvent(t,r),this.sendBufferedData();break;case Ge.retry:this.dispatchEvent(t,r),this.clearWebsocket(),this.tryConnect();break;default:this.dispatchEvent(t,r)}}sendBufferedData(){if(void 0!==this.buffer)for(let t=this.buffer.read();void 0!==t;t=this.buffer.read())this.send(t)}scheduleConnectionRetryIfNeeded(){if(this.closedByUser||void 0===this.backoff)return;const t=i=>{const s=new CustomEvent(Ge.retry,{detail:i});this.handleEvent(Ge.retry,s)},r={backoff:!0===this._options.retry.instantReconnect?0:this.backoff.next(),retries:!0===this._options.retry.instantReconnect?0:this.backoff.retries,lastConnection:this._lastConnection};(void 0===this._options.retry.maxRetries||r.retries<=this._options.retry.maxRetries)&&(this.retryTimeout=globalThis.setTimeout(()=>t(r),r.backoff))}cancelScheduledConnectionRetry(){globalThis.clearTimeout(this.retryTimeout)}}class QW{constructor(t){this._url=t}get url(){return this._url}withProtocols(t){return this._protocols=t,this}get protocols(){return this._protocols}withMaxRetries(t){var r;return this._options=Object.assign(Object.assign({},this._options),{retry:Object.assign(Object.assign({},null===(r=this._options)||void 0===r?void 0:r.retry),{maxRetries:t})}),this}get maxRetries(){var t,r;return null===(r=null===(t=this._options)||void 0===t?void 0:t.retry)||void 0===r?void 0:r.maxRetries}withInstantReconnect(t){var r;return this._options=Object.assign(Object.assign({},this._options),{retry:Object.assign(Object.assign({},null===(r=this._options)||void 0===r?void 0:r.retry),{instantReconnect:t})}),this}get instantReconnect(){var t,r;return null===(r=null===(t=this._options)||void 0===t?void 0:t.retry)||void 0===r?void 0:r.instantReconnect}withBackoff(t){var r;return this._options=Object.assign(Object.assign({},this._options),{retry:Object.assign(Object.assign({},null===(r=this._options)||void 0===r?void 0:r.retry),{backoff:t})}),this}get backoff(){var t,r;return null===(r=null===(t=this._options)||void 0===t?void 0:t.retry)||void 0===r?void 0:r.backoff}withBuffer(t){return this._options=Object.assign(Object.assign({},this._options),{buffer:t}),this}get buffer(){var t;return null===(t=this._options)||void 0===t?void 0:t.buffer}onOpen(t,r){return this.addListener(Ge.open,t,r),this}onClose(t,r){return this.addListener(Ge.close,t,r),this}onError(t,r){return this.addListener(Ge.error,t,r),this}onMessage(t,r){return this.addListener(Ge.message,t,r),this}onRetry(t,r){return this.addListener(Ge.retry,t,r),this}onReconnect(t,r){return this.addListener(Ge.reconnect,t,r),this}build(){return new KW(this._url,this._protocols,this._options)}addListener(t,r,i){var s,o,a,c,l,u,d,f,h,p,g,m,y,v,w,_,b,C,D,S,T;return this._options=Object.assign(Object.assign({},this._options),{listeners:{open:null!==(a=null===(o=null===(s=this._options)||void 0===s?void 0:s.listeners)||void 0===o?void 0:o.open)&&void 0!==a?a:[],close:null!==(u=null===(l=null===(c=this._options)||void 0===c?void 0:c.listeners)||void 0===l?void 0:l.close)&&void 0!==u?u:[],error:null!==(h=null===(f=null===(d=this._options)||void 0===d?void 0:d.listeners)||void 0===f?void 0:f.error)&&void 0!==h?h:[],message:null!==(m=null===(g=null===(p=this._options)||void 0===p?void 0:p.listeners)||void 0===g?void 0:g.message)&&void 0!==m?m:[],retry:null!==(w=null===(v=null===(y=this._options)||void 0===y?void 0:y.listeners)||void 0===v?void 0:v.retry)&&void 0!==w?w:[],reconnect:null!==(C=null===(b=null===(_=this._options)||void 0===_?void 0:_.listeners)||void 0===b?void 0:b.reconnect)&&void 0!==C?C:[],[t]:[...null!==(T=null===(S=null===(D=this._options)||void 0===D?void 0:D.listeners)||void 0===S?void 0:S[t])&&void 0!==T?T:[],{listener:r,options:i}]}}),this}}class YW{constructor(){this.elements=[]}add(t){this.elements.push(t)}clear(){this.elements.length=0}forEach(t){this.elements.forEach(t)}length(){return this.elements.length}isEmpty(){return 0===this.elements.length}peek(){return this.elements[0]}read(){return this.elements.shift()}}!function(e){e.assertEqual=s=>s,e.assertIs=function t(s){},e.assertNever=function r(s){throw new Error},e.arrayToEnum=s=>{const o={};for(const a of s)o[a]=a;return o},e.getValidEnumValues=s=>{const o=e.objectKeys(s).filter(c=>"number"!=typeof s[s[c]]),a={};for(const c of o)a[c]=s[c];return e.objectValues(a)},e.objectValues=s=>e.objectKeys(s).map(function(o){return s[o]}),e.objectKeys="function"==typeof Object.keys?s=>Object.keys(s):s=>{const o=[];for(const a in s)Object.prototype.hasOwnProperty.call(s,a)&&o.push(a);return o},e.find=(s,o)=>{for(const a of s)if(o(a))return a},e.isInteger="function"==typeof Number.isInteger?s=>Number.isInteger(s):s=>"number"==typeof s&&isFinite(s)&&Math.floor(s)===s,e.joinValues=function i(s,o=" | "){return s.map(a=>"string"==typeof a?`'${a}'`:a).join(o)},e.jsonStringifyReplacer=(s,o)=>"bigint"==typeof o?o.toString():o}(xe||(xe={}));var AR=function(e){return e.mergeShapes=(t,r)=>({...t,...r}),e}(AR||{});const W=xe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ps=e=>{switch(typeof e){case"undefined":return W.undefined;case"string":return W.string;case"number":return isNaN(e)?W.nan:W.number;case"boolean":return W.boolean;case"function":return W.function;case"bigint":return W.bigint;case"symbol":return W.symbol;case"object":return Array.isArray(e)?W.array:null===e?W.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?W.promise:typeof Map<"u"&&e instanceof Map?W.map:typeof Set<"u"&&e instanceof Set?W.set:typeof Date<"u"&&e instanceof Date?W.date:W.object;default:return W.unknown}},L=xe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);let Mi=(()=>{class e extends Error{constructor(r){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const i=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,i):this.__proto__=i,this.name="ZodError",this.issues=r}get errors(){return this.issues}format(r){const i=r||function(a){return a.message},s={_errors:[]},o=a=>{for(const c of a.issues)if("invalid_union"===c.code)c.unionErrors.map(o);else if("invalid_return_type"===c.code)o(c.returnTypeError);else if("invalid_arguments"===c.code)o(c.argumentsError);else if(0===c.path.length)s._errors.push(i(c));else{let l=s,u=0;for(;ui.message)){const i={},s=[];for(const o of this.issues)o.path.length>0?(i[o.path[0]]=i[o.path[0]]||[],i[o.path[0]].push(r(o))):s.push(r(o));return{formErrors:s,fieldErrors:i}}get formErrors(){return this.flatten()}}return e.create=t=>new e(t),e})();const qa=(e,t)=>{let r;switch(e.code){case L.invalid_type:r=e.received===W.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case L.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,xe.jsonStringifyReplacer)}`;break;case L.unrecognized_keys:r=`Unrecognized key(s) in object: ${xe.joinValues(e.keys,", ")}`;break;case L.invalid_union:r="Invalid input";break;case L.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${xe.joinValues(e.options)}`;break;case L.invalid_enum_value:r=`Invalid enum value. Expected ${xe.joinValues(e.options)}, received '${e.received}'`;break;case L.invalid_arguments:r="Invalid function arguments";break;case L.invalid_return_type:r="Invalid function return type";break;case L.invalid_date:r="Invalid date";break;case L.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:xe.assertNever(e.validation):r="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case L.too_small:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case L.too_big:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case L.custom:r="Invalid input";break;case L.invalid_intersection_types:r="Intersection results could not be merged";break;case L.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case L.not_finite:r="Number must be finite";break;default:r=t.defaultError,xe.assertNever(e)}return{message:r}};let MR=qa;function sp(){return MR}const op=e=>{const{data:t,path:r,errorMaps:i,issueData:s}=e,o=[...r,...s.path||[]],a={...s,path:o};if(void 0!==s.message)return{...s,path:o,message:s.message};let c="";const l=i.filter(u=>!!u).slice().reverse();for(const u of l)c=u(a,{data:t,defaultError:c}).message;return{...s,path:o,message:c}};function q(e,t){const r=sp(),i=op({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===qa?void 0:qa].filter(s=>!!s)});e.common.issues.push(i)}class Qt{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(t,r){const i=[];for(const s of r){if("aborted"===s.status)return oe;"dirty"===s.status&&t.dirty(),i.push(s.value)}return{status:t.value,value:i}}static mergeObjectAsync(t,r){return $(function*(){const i=[];for(const s of r){const o=yield s.key,a=yield s.value;i.push({key:o,value:a})}return Qt.mergeObjectSync(t,i)})()}static mergeObjectSync(t,r){const i={};for(const s of r){const{key:o,value:a}=s;if("aborted"===o.status||"aborted"===a.status)return oe;"dirty"===o.status&&t.dirty(),"dirty"===a.status&&t.dirty(),"__proto__"!==o.value&&(typeof a.value<"u"||s.alwaysSet)&&(i[o.value]=a.value)}return{status:t.value,value:i}}}const oe=Object.freeze({status:"aborted"}),Ga=e=>({status:"dirty",value:e}),un=e=>({status:"valid",value:e}),Zw=e=>"aborted"===e.status,Kw=e=>"dirty"===e.status,lu=e=>"valid"===e.status,uu=e=>typeof Promise<"u"&&e instanceof Promise;function ap(e,t,r,i){if("a"===r&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?i:"a"===r?i.call(e):i?i.value:t.get(e)}function NR(e,t,r,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(e,r):s?s.value=r:t.set(e,r),r}"function"==typeof SuppressedError&&SuppressedError;var du,fu,te=function(e){return e.errToObj=t=>"string"==typeof t?{message:t}:t||{},e.toString=t=>"string"==typeof t?t:t?.message,e}(te||{});class Zr{constructor(t,r,i,s){this._cachedPath=[],this.parent=t,this.data=r,this._path=i,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const RR=(e,t)=>{if(lu(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new Mi(e.common.issues);return this._error=r,this._error}}};function pe(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:i,description:s}=e;if(t&&(r||i))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:s}:{errorMap:(a,c)=>{var l,u;const{message:d}=e;return"invalid_enum_value"===a.code?{message:d??c.defaultError}:typeof c.data>"u"?{message:null!==(l=d??i)&&void 0!==l?l:c.defaultError}:"invalid_type"!==a.code?{message:c.defaultError}:{message:null!==(u=d??r)&&void 0!==u?u:c.defaultError}},description:s}}class ve{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return ps(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:ps(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Qt,ctx:{common:t.parent.common,data:t.data,parsedType:ps(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(uu(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const i=this.safeParse(t,r);if(i.success)return i.data;throw i.error}safeParse(t,r){var i;const s={common:{issues:[],async:null!==(i=r?.async)&&void 0!==i&&i,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ps(t)},o=this._parseSync({data:t,path:s.path,parent:s});return RR(s,o)}parseAsync(t,r){var i=this;return $(function*(){const s=yield i.safeParseAsync(t,r);if(s.success)return s.data;throw s.error})()}safeParseAsync(t,r){var i=this;return $(function*(){const s={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:i._def.errorMap,parent:null,data:t,parsedType:ps(t)},o=i._parse({data:t,path:s.path,parent:s}),a=yield uu(o)?o:Promise.resolve(o);return RR(s,a)})()}refine(t,r){const i=s=>"string"==typeof r||typeof r>"u"?{message:r}:"function"==typeof r?r(s):r;return this._refinement((s,o)=>{const a=t(s),c=()=>o.addIssue({code:L.custom,...i(s)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>!!l||(c(),!1)):!!a||(c(),!1)})}refinement(t,r){return this._refinement((i,s)=>!!t(i)||(s.addIssue("function"==typeof r?r(i,s):r),!1))}_refinement(t){return new ao({schema:this,typeName:ae.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return ms.create(this,this._def)}nullable(){return Ya.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return pu.create(this,this._def)}promise(){return dp.create(this,this._def)}or(t){return r_.create([this,t],this._def)}and(t){return s_.create(this,t,this._def)}transform(t){return new ao({...pe(this._def),schema:this,typeName:ae.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r="function"==typeof t?t:()=>t;return new c_({...pe(this._def),innerType:this,defaultValue:r,typeName:ae.ZodDefault})}brand(){return new u_({typeName:ae.ZodBranded,type:this,...pe(this._def)})}catch(t){const r="function"==typeof t?t:()=>t;return new l_({...pe(this._def),innerType:this,catchValue:r,typeName:ae.ZodCatch})}describe(t){return new(0,this.constructor)({...this._def,description:t})}pipe(t){return yu.create(this,t)}readonly(){return d_.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const tZ=/^c[^\s-]{8,}$/i,nZ=/^[0-9a-z]+$/,rZ=/^[0-9A-HJKMNP-TV-Z]{26}$/,iZ=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,sZ=/^[a-z0-9_-]{21}$/i,oZ=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,aZ=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let Qw;const lZ=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,uZ=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,dZ=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,OR="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",fZ=new RegExp(`^${OR}$`);function kR(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`),t}function hZ(e){return new RegExp(`^${kR(e)}$`)}function PR(e){let t=`${OR}T${kR(e)}`;const r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function pZ(e,t){return!(("v4"!==t&&t||!lZ.test(e))&&("v6"!==t&&t||!uZ.test(e)))}let cp=(()=>{class e extends ve{_parse(r){if(this._def.coerce&&(r.data=String(r.data)),this._getType(r)!==W.string){const a=this._getOrReturnCtx(r);return q(a,{code:L.invalid_type,expected:W.string,received:a.parsedType}),oe}const s=new Qt;let o;for(const a of this._def.checks)if("min"===a.kind)r.data.lengtha.value&&(o=this._getOrReturnCtx(r,o),q(o,{code:L.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if("length"===a.kind){const c=r.data.length>a.value,l=r.data.lengthr.test(o),{validation:i,code:L.invalid_string,...te.errToObj(s)})}_addCheck(r){return new e({...this._def,checks:[...this._def.checks,r]})}email(r){return this._addCheck({kind:"email",...te.errToObj(r)})}url(r){return this._addCheck({kind:"url",...te.errToObj(r)})}emoji(r){return this._addCheck({kind:"emoji",...te.errToObj(r)})}uuid(r){return this._addCheck({kind:"uuid",...te.errToObj(r)})}nanoid(r){return this._addCheck({kind:"nanoid",...te.errToObj(r)})}cuid(r){return this._addCheck({kind:"cuid",...te.errToObj(r)})}cuid2(r){return this._addCheck({kind:"cuid2",...te.errToObj(r)})}ulid(r){return this._addCheck({kind:"ulid",...te.errToObj(r)})}base64(r){return this._addCheck({kind:"base64",...te.errToObj(r)})}ip(r){return this._addCheck({kind:"ip",...te.errToObj(r)})}datetime(r){var i,s;return this._addCheck("string"==typeof r?{kind:"datetime",precision:null,offset:!1,local:!1,message:r}:{kind:"datetime",precision:typeof r?.precision>"u"?null:r?.precision,offset:null!==(i=r?.offset)&&void 0!==i&&i,local:null!==(s=r?.local)&&void 0!==s&&s,...te.errToObj(r?.message)})}date(r){return this._addCheck({kind:"date",message:r})}time(r){return this._addCheck("string"==typeof r?{kind:"time",precision:null,message:r}:{kind:"time",precision:typeof r?.precision>"u"?null:r?.precision,...te.errToObj(r?.message)})}duration(r){return this._addCheck({kind:"duration",...te.errToObj(r)})}regex(r,i){return this._addCheck({kind:"regex",regex:r,...te.errToObj(i)})}includes(r,i){return this._addCheck({kind:"includes",value:r,position:i?.position,...te.errToObj(i?.message)})}startsWith(r,i){return this._addCheck({kind:"startsWith",value:r,...te.errToObj(i)})}endsWith(r,i){return this._addCheck({kind:"endsWith",value:r,...te.errToObj(i)})}min(r,i){return this._addCheck({kind:"min",value:r,...te.errToObj(i)})}max(r,i){return this._addCheck({kind:"max",value:r,...te.errToObj(i)})}length(r,i){return this._addCheck({kind:"length",value:r,...te.errToObj(i)})}nonempty(r){return this.min(1,te.errToObj(r))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(r=>"datetime"===r.kind)}get isDate(){return!!this._def.checks.find(r=>"date"===r.kind)}get isTime(){return!!this._def.checks.find(r=>"time"===r.kind)}get isDuration(){return!!this._def.checks.find(r=>"duration"===r.kind)}get isEmail(){return!!this._def.checks.find(r=>"email"===r.kind)}get isURL(){return!!this._def.checks.find(r=>"url"===r.kind)}get isEmoji(){return!!this._def.checks.find(r=>"emoji"===r.kind)}get isUUID(){return!!this._def.checks.find(r=>"uuid"===r.kind)}get isNANOID(){return!!this._def.checks.find(r=>"nanoid"===r.kind)}get isCUID(){return!!this._def.checks.find(r=>"cuid"===r.kind)}get isCUID2(){return!!this._def.checks.find(r=>"cuid2"===r.kind)}get isULID(){return!!this._def.checks.find(r=>"ulid"===r.kind)}get isIP(){return!!this._def.checks.find(r=>"ip"===r.kind)}get isBase64(){return!!this._def.checks.find(r=>"base64"===r.kind)}get minLength(){let r=null;for(const i of this._def.checks)"min"===i.kind&&(null===r||i.value>r)&&(r=i.value);return r}get maxLength(){let r=null;for(const i of this._def.checks)"max"===i.kind&&(null===r||i.value{var r;return new e({checks:[],typeName:ae.ZodString,coerce:null!==(r=t?.coerce)&&void 0!==r&&r,...pe(t)})},e})();function gZ(e,t){const r=(e.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,s=r>i?r:i;return parseInt(e.toFixed(s).replace(".",""))%parseInt(t.toFixed(s).replace(".",""))/Math.pow(10,s)}let Yw=(()=>{class e extends ve{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(r){if(this._def.coerce&&(r.data=Number(r.data)),this._getType(r)!==W.number){const a=this._getOrReturnCtx(r);return q(a,{code:L.invalid_type,expected:W.number,received:a.parsedType}),oe}let s;const o=new Qt;for(const a of this._def.checks)"int"===a.kind?xe.isInteger(r.data)||(s=this._getOrReturnCtx(r,s),q(s,{code:L.invalid_type,expected:"integer",received:"float",message:a.message}),o.dirty()):"min"===a.kind?(a.inclusive?r.dataa.value:r.data>=a.value)&&(s=this._getOrReturnCtx(r,s),q(s,{code:L.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),o.dirty()):"multipleOf"===a.kind?0!==gZ(r.data,a.value)&&(s=this._getOrReturnCtx(r,s),q(s,{code:L.not_multiple_of,multipleOf:a.value,message:a.message}),o.dirty()):"finite"===a.kind?Number.isFinite(r.data)||(s=this._getOrReturnCtx(r,s),q(s,{code:L.not_finite,message:a.message}),o.dirty()):xe.assertNever(a);return{status:o.value,value:r.data}}gte(r,i){return this.setLimit("min",r,!0,te.toString(i))}gt(r,i){return this.setLimit("min",r,!1,te.toString(i))}lte(r,i){return this.setLimit("max",r,!0,te.toString(i))}lt(r,i){return this.setLimit("max",r,!1,te.toString(i))}setLimit(r,i,s,o){return new e({...this._def,checks:[...this._def.checks,{kind:r,value:i,inclusive:s,message:te.toString(o)}]})}_addCheck(r){return new e({...this._def,checks:[...this._def.checks,r]})}int(r){return this._addCheck({kind:"int",message:te.toString(r)})}positive(r){return this._addCheck({kind:"min",value:0,inclusive:!1,message:te.toString(r)})}negative(r){return this._addCheck({kind:"max",value:0,inclusive:!1,message:te.toString(r)})}nonpositive(r){return this._addCheck({kind:"max",value:0,inclusive:!0,message:te.toString(r)})}nonnegative(r){return this._addCheck({kind:"min",value:0,inclusive:!0,message:te.toString(r)})}multipleOf(r,i){return this._addCheck({kind:"multipleOf",value:r,message:te.toString(i)})}finite(r){return this._addCheck({kind:"finite",message:te.toString(r)})}safe(r){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:te.toString(r)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:te.toString(r)})}get minValue(){let r=null;for(const i of this._def.checks)"min"===i.kind&&(null===r||i.value>r)&&(r=i.value);return r}get maxValue(){let r=null;for(const i of this._def.checks)"max"===i.kind&&(null===r||i.value"int"===r.kind||"multipleOf"===r.kind&&xe.isInteger(r.value))}get isFinite(){let r=null,i=null;for(const s of this._def.checks){if("finite"===s.kind||"int"===s.kind||"multipleOf"===s.kind)return!0;"min"===s.kind?(null===i||s.value>i)&&(i=s.value):"max"===s.kind&&(null===r||s.valuenew e({checks:[],typeName:ae.ZodNumber,coerce:t?.coerce||!1,...pe(t)}),e})(),Jw=(()=>{class e extends ve{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(r){if(this._def.coerce&&(r.data=BigInt(r.data)),this._getType(r)!==W.bigint){const a=this._getOrReturnCtx(r);return q(a,{code:L.invalid_type,expected:W.bigint,received:a.parsedType}),oe}let s;const o=new Qt;for(const a of this._def.checks)"min"===a.kind?(a.inclusive?r.dataa.value:r.data>=a.value)&&(s=this._getOrReturnCtx(r,s),q(s,{code:L.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),o.dirty()):"multipleOf"===a.kind?r.data%a.value!==BigInt(0)&&(s=this._getOrReturnCtx(r,s),q(s,{code:L.not_multiple_of,multipleOf:a.value,message:a.message}),o.dirty()):xe.assertNever(a);return{status:o.value,value:r.data}}gte(r,i){return this.setLimit("min",r,!0,te.toString(i))}gt(r,i){return this.setLimit("min",r,!1,te.toString(i))}lte(r,i){return this.setLimit("max",r,!0,te.toString(i))}lt(r,i){return this.setLimit("max",r,!1,te.toString(i))}setLimit(r,i,s,o){return new e({...this._def,checks:[...this._def.checks,{kind:r,value:i,inclusive:s,message:te.toString(o)}]})}_addCheck(r){return new e({...this._def,checks:[...this._def.checks,r]})}positive(r){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:te.toString(r)})}negative(r){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:te.toString(r)})}nonpositive(r){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:te.toString(r)})}nonnegative(r){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:te.toString(r)})}multipleOf(r,i){return this._addCheck({kind:"multipleOf",value:r,message:te.toString(i)})}get minValue(){let r=null;for(const i of this._def.checks)"min"===i.kind&&(null===r||i.value>r)&&(r=i.value);return r}get maxValue(){let r=null;for(const i of this._def.checks)"max"===i.kind&&(null===r||i.value{var r;return new e({checks:[],typeName:ae.ZodBigInt,coerce:null!==(r=t?.coerce)&&void 0!==r&&r,...pe(t)})},e})(),Xw=(()=>{class e extends ve{_parse(r){if(this._def.coerce&&(r.data=!!r.data),this._getType(r)!==W.boolean){const s=this._getOrReturnCtx(r);return q(s,{code:L.invalid_type,expected:W.boolean,received:s.parsedType}),oe}return un(r.data)}}return e.create=t=>new e({typeName:ae.ZodBoolean,coerce:t?.coerce||!1,...pe(t)}),e})(),e_=(()=>{class e extends ve{_parse(r){if(this._def.coerce&&(r.data=new Date(r.data)),this._getType(r)!==W.date){const a=this._getOrReturnCtx(r);return q(a,{code:L.invalid_type,expected:W.date,received:a.parsedType}),oe}if(isNaN(r.data.getTime()))return q(this._getOrReturnCtx(r),{code:L.invalid_date}),oe;const s=new Qt;let o;for(const a of this._def.checks)"min"===a.kind?r.data.getTime()a.value&&(o=this._getOrReturnCtx(r,o),q(o,{code:L.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),s.dirty()):xe.assertNever(a);return{status:s.value,value:new Date(r.data.getTime())}}_addCheck(r){return new e({...this._def,checks:[...this._def.checks,r]})}min(r,i){return this._addCheck({kind:"min",value:r.getTime(),message:te.toString(i)})}max(r,i){return this._addCheck({kind:"max",value:r.getTime(),message:te.toString(i)})}get minDate(){let r=null;for(const i of this._def.checks)"min"===i.kind&&(null===r||i.value>r)&&(r=i.value);return null!=r?new Date(r):null}get maxDate(){let r=null;for(const i of this._def.checks)"max"===i.kind&&(null===r||i.valuenew e({checks:[],coerce:t?.coerce||!1,typeName:ae.ZodDate,...pe(t)}),e})(),LR=(()=>{class e extends ve{_parse(r){if(this._getType(r)!==W.symbol){const s=this._getOrReturnCtx(r);return q(s,{code:L.invalid_type,expected:W.symbol,received:s.parsedType}),oe}return un(r.data)}}return e.create=t=>new e({typeName:ae.ZodSymbol,...pe(t)}),e})(),t_=(()=>{class e extends ve{_parse(r){if(this._getType(r)!==W.undefined){const s=this._getOrReturnCtx(r);return q(s,{code:L.invalid_type,expected:W.undefined,received:s.parsedType}),oe}return un(r.data)}}return e.create=t=>new e({typeName:ae.ZodUndefined,...pe(t)}),e})(),n_=(()=>{class e extends ve{_parse(r){if(this._getType(r)!==W.null){const s=this._getOrReturnCtx(r);return q(s,{code:L.invalid_type,expected:W.null,received:s.parsedType}),oe}return un(r.data)}}return e.create=t=>new e({typeName:ae.ZodNull,...pe(t)}),e})(),lp=(()=>{class e extends ve{constructor(){super(...arguments),this._any=!0}_parse(r){return un(r.data)}}return e.create=t=>new e({typeName:ae.ZodAny,...pe(t)}),e})(),hu=(()=>{class e extends ve{constructor(){super(...arguments),this._unknown=!0}_parse(r){return un(r.data)}}return e.create=t=>new e({typeName:ae.ZodUnknown,...pe(t)}),e})(),oo=(()=>{class e extends ve{_parse(r){const i=this._getOrReturnCtx(r);return q(i,{code:L.invalid_type,expected:W.never,received:i.parsedType}),oe}}return e.create=t=>new e({typeName:ae.ZodNever,...pe(t)}),e})(),FR=(()=>{class e extends ve{_parse(r){if(this._getType(r)!==W.undefined){const s=this._getOrReturnCtx(r);return q(s,{code:L.invalid_type,expected:W.void,received:s.parsedType}),oe}return un(r.data)}}return e.create=t=>new e({typeName:ae.ZodVoid,...pe(t)}),e})(),pu=(()=>{class e extends ve{_parse(r){const{ctx:i,status:s}=this._processInputParams(r),o=this._def;if(i.parsedType!==W.array)return q(i,{code:L.invalid_type,expected:W.array,received:i.parsedType}),oe;if(null!==o.exactLength){const c=i.data.length>o.exactLength.value,l=i.data.lengtho.maxLength.value&&(q(i,{code:L.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),s.dirty()),i.common.async)return Promise.all([...i.data].map((c,l)=>o.type._parseAsync(new Zr(i,c,i.path,l)))).then(c=>Qt.mergeArray(s,c));const a=[...i.data].map((c,l)=>o.type._parseSync(new Zr(i,c,i.path,l)));return Qt.mergeArray(s,a)}get element(){return this._def.type}min(r,i){return new e({...this._def,minLength:{value:r,message:te.toString(i)}})}max(r,i){return new e({...this._def,maxLength:{value:r,message:te.toString(i)}})}length(r,i){return new e({...this._def,exactLength:{value:r,message:te.toString(i)}})}nonempty(r){return this.min(1,r)}}return e.create=(t,r)=>new e({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ae.ZodArray,...pe(r)}),e})();function Wa(e){if(e instanceof Za){const t={};for(const r in e.shape)t[r]=ms.create(Wa(e.shape[r]));return new Za({...e._def,shape:()=>t})}return e instanceof pu?new pu({...e._def,type:Wa(e.element)}):e instanceof ms?ms.create(Wa(e.unwrap())):e instanceof Ya?Ya.create(Wa(e.unwrap())):e instanceof Ka?Ka.create(e.items.map(t=>Wa(t))):e}let Za=(()=>{class e extends ve{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const r=this._def.shape(),i=xe.objectKeys(r);return this._cached={shape:r,keys:i}}_parse(r){if(this._getType(r)!==W.object){const d=this._getOrReturnCtx(r);return q(d,{code:L.invalid_type,expected:W.object,received:d.parsedType}),oe}const{status:s,ctx:o}=this._processInputParams(r),{shape:a,keys:c}=this._getCached(),l=[];if(!(this._def.catchall instanceof oo&&"strip"===this._def.unknownKeys))for(const d in o.data)c.includes(d)||l.push(d);const u=[];for(const d of c)u.push({key:{status:"valid",value:d},value:a[d]._parse(new Zr(o,o.data[d],o.path,d)),alwaysSet:d in o.data});if(this._def.catchall instanceof oo){const d=this._def.unknownKeys;if("passthrough"===d)for(const f of l)u.push({key:{status:"valid",value:f},value:{status:"valid",value:o.data[f]}});else if("strict"===d)l.length>0&&(q(o,{code:L.unrecognized_keys,keys:l}),s.dirty());else if("strip"!==d)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const d=this._def.catchall;for(const f of l)u.push({key:{status:"valid",value:f},value:d._parse(new Zr(o,o.data[f],o.path,f)),alwaysSet:f in o.data})}return o.common.async?Promise.resolve().then($(function*(){const d=[];for(const f of u){const h=yield f.key,p=yield f.value;d.push({key:h,value:p,alwaysSet:f.alwaysSet})}return d})).then(d=>Qt.mergeObjectSync(s,d)):Qt.mergeObjectSync(s,u)}get shape(){return this._def.shape()}strict(r){return new e({...this._def,unknownKeys:"strict",...void 0!==r?{errorMap:(i,s)=>{var o,a,c,l;const u=null!==(c=null===(a=(o=this._def).errorMap)||void 0===a?void 0:a.call(o,i,s).message)&&void 0!==c?c:s.defaultError;return"unrecognized_keys"===i.code?{message:null!==(l=te.errToObj(r).message)&&void 0!==l?l:u}:{message:u}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(r){return new e({...this._def,shape:()=>({...this._def.shape(),...r})})}merge(r){return new e({unknownKeys:r._def.unknownKeys,catchall:r._def.catchall,shape:()=>({...this._def.shape(),...r._def.shape()}),typeName:ae.ZodObject})}setKey(r,i){return this.augment({[r]:i})}catchall(r){return new e({...this._def,catchall:r})}pick(r){const i={};return xe.objectKeys(r).forEach(s=>{r[s]&&this.shape[s]&&(i[s]=this.shape[s])}),new e({...this._def,shape:()=>i})}omit(r){const i={};return xe.objectKeys(this.shape).forEach(s=>{r[s]||(i[s]=this.shape[s])}),new e({...this._def,shape:()=>i})}deepPartial(){return Wa(this)}partial(r){const i={};return xe.objectKeys(this.shape).forEach(s=>{const o=this.shape[s];i[s]=r&&!r[s]?o:o.optional()}),new e({...this._def,shape:()=>i})}required(r){const i={};return xe.objectKeys(this.shape).forEach(s=>{if(r&&!r[s])i[s]=this.shape[s];else{let a=this.shape[s];for(;a instanceof ms;)a=a._def.innerType;i[s]=a}}),new e({...this._def,shape:()=>i})}keyof(){return jR(xe.objectKeys(this.shape))}}return e.create=(t,r)=>new e({shape:()=>t,unknownKeys:"strip",catchall:oo.create(),typeName:ae.ZodObject,...pe(r)}),e.strictCreate=(t,r)=>new e({shape:()=>t,unknownKeys:"strict",catchall:oo.create(),typeName:ae.ZodObject,...pe(r)}),e.lazycreate=(t,r)=>new e({shape:t,unknownKeys:"strip",catchall:oo.create(),typeName:ae.ZodObject,...pe(r)}),e})(),r_=(()=>{class e extends ve{_parse(r){const{ctx:i}=this._processInputParams(r),s=this._def.options;if(i.common.async)return Promise.all(s.map(function(){var a=$(function*(c){const l={...i,common:{...i.common,issues:[]},parent:null};return{result:yield c._parseAsync({data:i.data,path:i.path,parent:l}),ctx:l}});return function(c){return a.apply(this,arguments)}}())).then(function o(a){for(const l of a)if("valid"===l.result.status)return l.result;for(const l of a)if("dirty"===l.result.status)return i.common.issues.push(...l.ctx.common.issues),l.result;const c=a.map(l=>new Mi(l.ctx.common.issues));return q(i,{code:L.invalid_union,unionErrors:c}),oe});{let a;const c=[];for(const u of s){const d={...i,common:{...i.common,issues:[]},parent:null},f=u._parseSync({data:i.data,path:i.path,parent:d});if("valid"===f.status)return f;"dirty"===f.status&&!a&&(a={result:f,ctx:d}),d.common.issues.length&&c.push(d.common.issues)}if(a)return i.common.issues.push(...a.ctx.common.issues),a.result;const l=c.map(u=>new Mi(u));return q(i,{code:L.invalid_union,unionErrors:l}),oe}}get options(){return this._def.options}}return e.create=(t,r)=>new e({options:t,typeName:ae.ZodUnion,...pe(r)}),e})();const Ni=e=>e instanceof o_?Ni(e.schema):e instanceof ao?Ni(e.innerType()):e instanceof a_?[e.value]:e instanceof gs?e.options:e instanceof mu?xe.objectValues(e.enum):e instanceof c_?Ni(e._def.innerType):e instanceof t_?[void 0]:e instanceof n_?[null]:e instanceof ms?[void 0,...Ni(e.unwrap())]:e instanceof Ya?[null,...Ni(e.unwrap())]:e instanceof u_||e instanceof d_?Ni(e.unwrap()):e instanceof l_?Ni(e._def.innerType):[];class up extends ve{_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==W.object)return q(r,{code:L.invalid_type,expected:W.object,received:r.parsedType}),oe;const i=this.discriminator,o=this.optionsMap.get(r.data[i]);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):(q(r,{code:L.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),oe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,i){const s=new Map;for(const o of r){const a=Ni(o.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const c of a){if(s.has(c))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(c)}`);s.set(c,o)}}return new up({typeName:ae.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:s,...pe(i)})}}function i_(e,t){const r=ps(e),i=ps(t);if(e===t)return{valid:!0,data:e};if(r===W.object&&i===W.object){const s=xe.objectKeys(t),o=xe.objectKeys(e).filter(c=>-1!==s.indexOf(c)),a={...e,...t};for(const c of o){const l=i_(e[c],t[c]);if(!l.valid)return{valid:!1};a[c]=l.data}return{valid:!0,data:a}}if(r===W.array&&i===W.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let o=0;o{class e extends ve{_parse(r){const{status:i,ctx:s}=this._processInputParams(r),o=(a,c)=>{if(Zw(a)||Zw(c))return oe;const l=i_(a.value,c.value);return l.valid?((Kw(a)||Kw(c))&&i.dirty(),{status:i.value,value:l.data}):(q(s,{code:L.invalid_intersection_types}),oe)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([a,c])=>o(a,c)):o(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}return e.create=(t,r,i)=>new e({left:t,right:r,typeName:ae.ZodIntersection,...pe(i)}),e})(),Ka=(()=>{class e extends ve{_parse(r){const{status:i,ctx:s}=this._processInputParams(r);if(s.parsedType!==W.array)return q(s,{code:L.invalid_type,expected:W.array,received:s.parsedType}),oe;if(s.data.lengththis._def.items.length&&(q(s,{code:L.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),i.dirty());const a=[...s.data].map((c,l)=>{const u=this._def.items[l]||this._def.rest;return u?u._parse(new Zr(s,c,s.path,l)):null}).filter(c=>!!c);return s.common.async?Promise.all(a).then(c=>Qt.mergeArray(i,c)):Qt.mergeArray(i,a)}get items(){return this._def.items}rest(r){return new e({...this._def,rest:r})}}return e.create=(t,r)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new e({items:t,typeName:ae.ZodTuple,rest:null,...pe(r)})},e})();class gu extends ve{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:i}=this._processInputParams(t);if(i.parsedType!==W.object)return q(i,{code:L.invalid_type,expected:W.object,received:i.parsedType}),oe;const s=[],o=this._def.keyType,a=this._def.valueType;for(const c in i.data)s.push({key:o._parse(new Zr(i,c,i.path,c)),value:a._parse(new Zr(i,i.data[c],i.path,c)),alwaysSet:c in i.data});return i.common.async?Qt.mergeObjectAsync(r,s):Qt.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(t,r,i){return new gu(r instanceof ve?{keyType:t,valueType:r,typeName:ae.ZodRecord,...pe(i)}:{keyType:cp.create(),valueType:t,typeName:ae.ZodRecord,...pe(r)})}}let BR=(()=>{class e extends ve{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(r){const{status:i,ctx:s}=this._processInputParams(r);if(s.parsedType!==W.map)return q(s,{code:L.invalid_type,expected:W.map,received:s.parsedType}),oe;const o=this._def.keyType,a=this._def.valueType,c=[...s.data.entries()].map(([l,u],d)=>({key:o._parse(new Zr(s,l,s.path,[d,"key"])),value:a._parse(new Zr(s,u,s.path,[d,"value"]))}));if(s.common.async){const l=new Map;return Promise.resolve().then($(function*(){for(const u of c){const d=yield u.key,f=yield u.value;if("aborted"===d.status||"aborted"===f.status)return oe;("dirty"===d.status||"dirty"===f.status)&&i.dirty(),l.set(d.value,f.value)}return{status:i.value,value:l}}))}{const l=new Map;for(const u of c){const d=u.key,f=u.value;if("aborted"===d.status||"aborted"===f.status)return oe;("dirty"===d.status||"dirty"===f.status)&&i.dirty(),l.set(d.value,f.value)}return{status:i.value,value:l}}}}return e.create=(t,r,i)=>new e({valueType:r,keyType:t,typeName:ae.ZodMap,...pe(i)}),e})(),UR=(()=>{class e extends ve{_parse(r){const{status:i,ctx:s}=this._processInputParams(r);if(s.parsedType!==W.set)return q(s,{code:L.invalid_type,expected:W.set,received:s.parsedType}),oe;const o=this._def;null!==o.minSize&&s.data.sizeo.maxSize.value&&(q(s,{code:L.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),i.dirty());const a=this._def.valueType;function c(u){const d=new Set;for(const f of u){if("aborted"===f.status)return oe;"dirty"===f.status&&i.dirty(),d.add(f.value)}return{status:i.value,value:d}}const l=[...s.data.values()].map((u,d)=>a._parse(new Zr(s,u,s.path,d)));return s.common.async?Promise.all(l).then(u=>c(u)):c(l)}min(r,i){return new e({...this._def,minSize:{value:r,message:te.toString(i)}})}max(r,i){return new e({...this._def,maxSize:{value:r,message:te.toString(i)}})}size(r,i){return this.min(r,i).max(r,i)}nonempty(r){return this.min(1,r)}}return e.create=(t,r)=>new e({valueType:t,minSize:null,maxSize:null,typeName:ae.ZodSet,...pe(r)}),e})();class Qa extends ve{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==W.function)return q(r,{code:L.invalid_type,expected:W.function,received:r.parsedType}),oe;function i(c,l){return op({data:c,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,sp(),qa].filter(u=>!!u),issueData:{code:L.invalid_arguments,argumentsError:l}})}function s(c,l){return op({data:c,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,sp(),qa].filter(u=>!!u),issueData:{code:L.invalid_return_type,returnTypeError:l}})}const o={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof dp){const c=this;return un($(function*(...l){const u=new Mi([]),d=yield c._def.args.parseAsync(l,o).catch(p=>{throw u.addIssue(i(l,p)),u}),f=yield Reflect.apply(a,this,d);return yield c._def.returns._def.type.parseAsync(f,o).catch(p=>{throw u.addIssue(s(f,p)),u})}))}{const c=this;return un(function(...l){const u=c._def.args.safeParse(l,o);if(!u.success)throw new Mi([i(l,u.error)]);const d=Reflect.apply(a,this,u.data),f=c._def.returns.safeParse(d,o);if(!f.success)throw new Mi([s(d,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Qa({...this._def,args:Ka.create(t).rest(hu.create())})}returns(t){return new Qa({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,i){return new Qa({args:t||Ka.create([]).rest(hu.create()),returns:r||hu.create(),typeName:ae.ZodFunction,...pe(i)})}}let o_=(()=>{class e extends ve{get schema(){return this._def.getter()}_parse(r){const{ctx:i}=this._processInputParams(r);return this._def.getter()._parse({data:i.data,path:i.path,parent:i})}}return e.create=(t,r)=>new e({getter:t,typeName:ae.ZodLazy,...pe(r)}),e})(),a_=(()=>{class e extends ve{_parse(r){if(r.data!==this._def.value){const i=this._getOrReturnCtx(r);return q(i,{received:i.data,code:L.invalid_literal,expected:this._def.value}),oe}return{status:"valid",value:r.data}}get value(){return this._def.value}}return e.create=(t,r)=>new e({value:t,typeName:ae.ZodLiteral,...pe(r)}),e})();function jR(e,t){return new gs({values:e,typeName:ae.ZodEnum,...pe(t)})}class gs extends ve{constructor(){super(...arguments),du.set(this,void 0)}_parse(t){if("string"!=typeof t.data){const r=this._getOrReturnCtx(t);return q(r,{expected:xe.joinValues(this._def.values),received:r.parsedType,code:L.invalid_type}),oe}if(ap(this,du,"f")||NR(this,du,new Set(this._def.values),"f"),!ap(this,du,"f").has(t.data)){const r=this._getOrReturnCtx(t);return q(r,{received:r.data,code:L.invalid_enum_value,options:this._def.values}),oe}return un(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return gs.create(t,{...this._def,...r})}exclude(t,r=this._def){return gs.create(this.options.filter(i=>!t.includes(i)),{...this._def,...r})}}du=new WeakMap,gs.create=jR;class mu extends ve{constructor(){super(...arguments),fu.set(this,void 0)}_parse(t){const r=xe.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(t);if(i.parsedType!==W.string&&i.parsedType!==W.number){const s=xe.objectValues(r);return q(i,{expected:xe.joinValues(s),received:i.parsedType,code:L.invalid_type}),oe}if(ap(this,fu,"f")||NR(this,fu,new Set(xe.getValidEnumValues(this._def.values)),"f"),!ap(this,fu,"f").has(t.data)){const s=xe.objectValues(r);return q(i,{received:i.data,code:L.invalid_enum_value,options:s}),oe}return un(t.data)}get enum(){return this._def.values}}fu=new WeakMap,mu.create=(e,t)=>new mu({values:e,typeName:ae.ZodNativeEnum,...pe(t)});let dp=(()=>{class e extends ve{unwrap(){return this._def.type}_parse(r){const{ctx:i}=this._processInputParams(r);if(i.parsedType!==W.promise&&!1===i.common.async)return q(i,{code:L.invalid_type,expected:W.promise,received:i.parsedType}),oe;const s=i.parsedType===W.promise?i.data:Promise.resolve(i.data);return un(s.then(o=>this._def.type.parseAsync(o,{path:i.path,errorMap:i.common.contextualErrorMap})))}}return e.create=(t,r)=>new e({type:t,typeName:ae.ZodPromise,...pe(r)}),e})(),ao=(()=>{class e extends ve{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ae.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(r){var i=this;const{status:s,ctx:o}=this._processInputParams(r),a=this._def.effect||null,c={addIssue:l=>{q(o,l),l.fatal?s.abort():s.dirty()},get path(){return o.path}};if(c.addIssue=c.addIssue.bind(c),"preprocess"===a.type){const l=a.transform(o.data,c);if(o.common.async)return Promise.resolve(l).then(function(){var u=$(function*(d){if("aborted"===s.value)return oe;const f=yield i._def.schema._parseAsync({data:d,path:o.path,parent:o});return"aborted"===f.status?oe:"dirty"===f.status||"dirty"===s.value?Ga(f.value):f});return function(d){return u.apply(this,arguments)}}());{if("aborted"===s.value)return oe;const u=this._def.schema._parseSync({data:l,path:o.path,parent:o});return"aborted"===u.status?oe:"dirty"===u.status||"dirty"===s.value?Ga(u.value):u}}if("refinement"===a.type){const l=u=>{const d=a.refinement(u,c);if(o.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(!1===o.common.async){const u=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return"aborted"===u.status?oe:("dirty"===u.status&&s.dirty(),l(u.value),{status:s.value,value:u.value})}return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(u=>"aborted"===u.status?oe:("dirty"===u.status&&s.dirty(),l(u.value).then(()=>({status:s.value,value:u.value}))))}if("transform"===a.type){if(!1===o.common.async){const l=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!lu(l))return l;const u=a.transform(l.value,c);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:s.value,value:u}}return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(l=>lu(l)?Promise.resolve(a.transform(l.value,c)).then(u=>({status:s.value,value:u})):l)}xe.assertNever(a)}}return e.create=(t,r,i)=>new e({schema:t,typeName:ae.ZodEffects,effect:r,...pe(i)}),e.createWithPreprocess=(t,r,i)=>new e({schema:r,effect:{type:"preprocess",transform:t},typeName:ae.ZodEffects,...pe(i)}),e})(),ms=(()=>{class e extends ve{_parse(r){return this._getType(r)===W.undefined?un(void 0):this._def.innerType._parse(r)}unwrap(){return this._def.innerType}}return e.create=(t,r)=>new e({innerType:t,typeName:ae.ZodOptional,...pe(r)}),e})(),Ya=(()=>{class e extends ve{_parse(r){return this._getType(r)===W.null?un(null):this._def.innerType._parse(r)}unwrap(){return this._def.innerType}}return e.create=(t,r)=>new e({innerType:t,typeName:ae.ZodNullable,...pe(r)}),e})(),c_=(()=>{class e extends ve{_parse(r){const{ctx:i}=this._processInputParams(r);let s=i.data;return i.parsedType===W.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:i.path,parent:i})}removeDefault(){return this._def.innerType}}return e.create=(t,r)=>new e({innerType:t,typeName:ae.ZodDefault,defaultValue:"function"==typeof r.default?r.default:()=>r.default,...pe(r)}),e})(),l_=(()=>{class e extends ve{_parse(r){const{ctx:i}=this._processInputParams(r),s={...i,common:{...i.common,issues:[]}},o=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return uu(o)?o.then(a=>({status:"valid",value:"valid"===a.status?a.value:this._def.catchValue({get error(){return new Mi(s.common.issues)},input:s.data})})):{status:"valid",value:"valid"===o.status?o.value:this._def.catchValue({get error(){return new Mi(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}return e.create=(t,r)=>new e({innerType:t,typeName:ae.ZodCatch,catchValue:"function"==typeof r.catch?r.catch:()=>r.catch,...pe(r)}),e})(),$R=(()=>{class e extends ve{_parse(r){if(this._getType(r)!==W.nan){const s=this._getOrReturnCtx(r);return q(s,{code:L.invalid_type,expected:W.nan,received:s.parsedType}),oe}return{status:"valid",value:r.data}}}return e.create=t=>new e({typeName:ae.ZodNaN,...pe(t)}),e})();const mZ=Symbol("zod_brand");class u_ extends ve{_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.type._parse({data:r.data,path:r.path,parent:r})}unwrap(){return this._def.type}}class yu extends ve{_parse(t){var r=this;const{status:i,ctx:s}=this._processInputParams(t);if(s.common.async)return function(){var a=$(function*(){const c=yield r._def.in._parseAsync({data:s.data,path:s.path,parent:s});return"aborted"===c.status?oe:"dirty"===c.status?(i.dirty(),Ga(c.value)):r._def.out._parseAsync({data:c.value,path:s.path,parent:s})});return function(){return a.apply(this,arguments)}}()();{const o=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return"aborted"===o.status?oe:"dirty"===o.status?(i.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:s.path,parent:s})}}static create(t,r){return new yu({in:t,out:r,typeName:ae.ZodPipeline})}}let d_=(()=>{class e extends ve{_parse(r){const i=this._def.innerType._parse(r),s=o=>(lu(o)&&(o.value=Object.freeze(o.value)),o);return uu(i)?i.then(o=>s(o)):s(i)}unwrap(){return this._def.innerType}}return e.create=(t,r)=>new e({innerType:t,typeName:ae.ZodReadonly,...pe(r)}),e})();function VR(e,t={},r){return e?lp.create().superRefine((i,s)=>{var o,a;if(!e(i)){const c="function"==typeof t?t(i):"string"==typeof t?{message:t}:t,l=null===(a=null!==(o=c.fatal)&&void 0!==o?o:r)||void 0===a||a;s.addIssue({code:"custom",..."string"==typeof c?{message:c}:c,fatal:l})}}):lp.create()}const yZ={object:Za.lazycreate};var ae=function(e){return e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly",e}(ae||{});const HR=cp.create,zR=Yw.create,qR=Xw.create,GR=ao.create;var V=Object.freeze({__proto__:null,defaultErrorMap:qa,setErrorMap:function XW(e){MR=e},getErrorMap:sp,makeIssue:op,EMPTY_PATH:[],addIssueToContext:q,ParseStatus:Qt,INVALID:oe,DIRTY:Ga,OK:un,isAborted:Zw,isDirty:Kw,isValid:lu,isAsync:uu,get util(){return xe},get objectUtil(){return AR},ZodParsedType:W,getParsedType:ps,ZodType:ve,datetimeRegex:PR,ZodString:cp,ZodNumber:Yw,ZodBigInt:Jw,ZodBoolean:Xw,ZodDate:e_,ZodSymbol:LR,ZodUndefined:t_,ZodNull:n_,ZodAny:lp,ZodUnknown:hu,ZodNever:oo,ZodVoid:FR,ZodArray:pu,ZodObject:Za,ZodUnion:r_,ZodDiscriminatedUnion:up,ZodIntersection:s_,ZodTuple:Ka,ZodRecord:gu,ZodMap:BR,ZodSet:UR,ZodFunction:Qa,ZodLazy:o_,ZodLiteral:a_,ZodEnum:gs,ZodNativeEnum:mu,ZodPromise:dp,ZodEffects:ao,ZodTransformer:ao,ZodOptional:ms,ZodNullable:Ya,ZodDefault:c_,ZodCatch:l_,ZodNaN:$R,BRAND:mZ,ZodBranded:u_,ZodPipeline:yu,ZodReadonly:d_,custom:VR,Schema:ve,ZodSchema:ve,late:yZ,get ZodFirstPartyTypeKind(){return ae},coerce:{string:e=>cp.create({...e,coerce:!0}),number:e=>Yw.create({...e,coerce:!0}),boolean:e=>Xw.create({...e,coerce:!0}),bigint:e=>Jw.create({...e,coerce:!0}),date:e=>e_.create({...e,coerce:!0})},any:lp.create,array:pu.create,bigint:Jw.create,boolean:qR,date:e_.create,discriminatedUnion:up.create,effect:GR,enum:gs.create,function:Qa.create,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>VR(r=>r instanceof e,t),intersection:s_.create,lazy:o_.create,literal:a_.create,map:BR.create,nan:$R.create,nativeEnum:mu.create,never:oo.create,null:n_.create,nullable:Ya.create,number:zR,object:Za.create,oboolean:()=>qR().optional(),onumber:()=>zR().optional(),optional:ms.create,ostring:()=>HR().optional(),pipeline:yu.create,preprocess:ao.createWithPreprocess,promise:dp.create,record:gu.create,set:UR.create,strictObject:Za.strictCreate,string:HR,symbol:LR.create,transformer:GR,tuple:Ka.create,undefined:t_.create,union:r_.create,unknown:hu.create,void:FR.create,NEVER:oe,ZodIssueCode:L,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:Mi});class et{static id(){return V.string().regex(/^[0-9a-f]{64}$/)}static event(){return V.object({id:et.id(),kind:V.number().int().nonnegative(),pubkey:et.id(),tags:V.string().array().array(),content:V.string(),created_at:V.number().int().nonnegative(),sig:V.string()})}static filter(){return V.object({kinds:V.number().int().nonnegative().array().optional(),ids:et.id().array().optional(),authors:et.id().array().optional(),since:V.number().int().nonnegative().optional(),until:V.number().int().nonnegative().optional(),limit:V.number().int().nonnegative().optional(),search:V.string().optional()}).passthrough().transform(t=>{const r=["kinds","ids","authors","since","until","limit","search"];return Object.entries(t).reduce((i,[s,o])=>((r.includes(s)||s.startsWith("#"))&&(i[s]=o),i),{})})}static bech32(t){return V.string().regex(/^[\x21-\x7E]{1,83}1[023456789acdefghjklmnpqrstuvwxyz]{6,}$/).refine(r=>!t||r.startsWith(`${t}1`))}static clientEVENT(){return V.tuple([V.literal("EVENT"),et.event()])}static clientREQ(){return V.tuple([V.literal("REQ"),V.string()]).rest(et.filter())}static clientCOUNT(){return V.tuple([V.literal("COUNT"),V.string()]).rest(et.filter())}static clientCLOSE(){return V.tuple([V.literal("CLOSE"),V.string()])}static clientAUTH(){return V.tuple([V.literal("AUTH"),et.event()])}static clientMsg(){return V.union([et.clientEVENT(),et.clientREQ(),et.clientCOUNT(),et.clientCLOSE(),et.clientAUTH()])}static relayEVENT(){return V.tuple([V.literal("EVENT"),V.string(),et.event()])}static relayOK(){return V.tuple([V.literal("OK"),et.id(),V.boolean(),V.string()])}static relayEOSE(){return V.tuple([V.literal("EOSE"),V.string()])}static relayNOTICE(){return V.tuple([V.literal("NOTICE"),V.string()])}static relayCLOSED(){return V.tuple([V.literal("CLOSED"),V.string(),V.string()])}static relayAUTH(){return V.tuple([V.literal("AUTH"),V.string()])}static relayCOUNT(){return V.tuple([V.literal("COUNT"),V.string(),V.object({count:V.number().int().nonnegative(),approximate:V.boolean().optional()})])}static relayMsg(){return V.union([et.relayEVENT(),et.relayOK(),et.relayEOSE(),et.relayNOTICE(),et.relayCLOSED(),et.relayAUTH(),et.relayCOUNT()])}static metadata(){return V.object({about:V.string().optional().catch(void 0),banner:V.string().url().optional().catch(void 0),bot:V.boolean().optional().catch(void 0),display_name:V.string().optional().catch(void 0),lud06:et.bech32("lnurl").optional().catch(void 0),lud16:V.string().email().optional().catch(void 0),name:V.string().optional().catch(void 0),nip05:V.string().email().optional().catch(void 0),picture:V.string().url().optional().catch(void 0),website:V.string().url().optional().catch(void 0)}).passthrough()}static connectRequest(){return V.object({id:V.string(),method:V.string(),params:V.string().array()})}static connectResponse(){return V.object({id:V.string(),result:V.string(),error:V.string().optional()})}static json(){return V.string().transform((t,r)=>{try{return JSON.parse(t)}catch{return r.addIssue({code:V.ZodIssueCode.custom,message:"Invalid JSON"}),V.NEVER}})}}class KZ{socket;subscriptions=new Map;ee=new EventTarget;constructor(t,r={}){const{auth:i,backoff:s=new ZW(1e3),verifyEvent:o=ka}=r;this.socket=new QW(t).withBuffer(new YW).withBackoff(!1===s?void 0:s).onOpen(()=>{for(const a of this.subscriptions.values())this.send(a)}).onMessage((a,c)=>{const l=et.json().pipe(et.relayMsg()).safeParse(c.data);if(!l.success)return;const u=l.data;switch(u[0]){case"EVENT":case"EOSE":case"CLOSED":if("EVENT"===u[0]&&!o(u[2]))break;"CLOSED"===u[0]&&this.subscriptions.delete(u[1]),this.ee.dispatchEvent(new CustomEvent(`sub:${u[1]}`,{detail:u}));break;case"OK":this.ee.dispatchEvent(new CustomEvent(`ok:${u[1]}`,{detail:u}));break;case"NOTICE":this.ee.dispatchEvent(new CustomEvent("notice",{detail:u}));break;case"COUNT":this.ee.dispatchEvent(new CustomEvent(`count:${u[1]}`,{detail:u}));break;case"AUTH":i?.(u[1]).then(d=>this.send(["AUTH",d])).catch(()=>{})}}).build()}send(t){switch(t[0]){case"REQ":this.subscriptions.set(t[1],t);break;case"CLOSE":this.subscriptions.delete(t[1]);break;case"EVENT":case"COUNT":return this.socket.send(JSON.stringify(t))}this.socket.readyState===WebSocket.OPEN&&this.socket.send(JSON.stringify(t))}req(t,r={}){var i=this;return ip(function*(){const{signal:s}=r,o=crypto.randomUUID(),a=i.on(`sub:${o}`,s),c=["REQ",o,...t];i.send(c);try{var d,l=!1,u=!1;try{for(var h,f=ss(a);l=!(h=yield hs(f.next())).done;l=!1){const p=h.value;if("EOSE"===p[0]&&(yield p),"CLOSED"===p[0])break;if("EVENT"===p[0]){if(!Nh(t,p[2]))continue;yield p}}}catch(p){u=!0,d=p}finally{try{l&&null!=f.return&&(yield hs(f.return()))}finally{if(u)throw d}}}finally{i.send(["CLOSE",o])}})()}query(t,r){var i=this;return $(function*(){const s=new Kn,o=t.reduce((f,h)=>f+KM(h),0);if(0===o)return[];var l,a=!1,c=!1;try{for(var d,u=ss(i.req(t,r));a=!(d=yield u.next()).done;a=!1){const f=d.value;if("EOSE"===f[0])break;if("EVENT"===f[0]&&s.add(f[2]),"CLOSED"===f[0])throw new Error("Subscription closed");if(s.size>=o)break}}catch(f){c=!0,l=f}finally{try{a&&null!=u.return&&(yield u.return())}finally{if(c)throw l}}return[...s]})()}event(t,r){var i=this;return $(function*(){const s=i.once(`ok:${t.id}`,r?.signal);i.send(["EVENT",t]);const[,,o,a]=yield s;if(!o)throw new Error(a)})()}count(t,r){var i=this;return $(function*(){const s=crypto.randomUUID(),o=i.once(`count:${s}`,r?.signal);i.send(["COUNT",s,...t]);const[,,a]=yield o;return a})()}on(t,r){var i=this;return ip(function*(){if(r?.aborted)throw i.abortError();const s=new TR(r),o=f=>s.push(f.detail);i.ee.addEventListener(t,o);try{var l,a=!1,c=!1;try{for(var d,u=ss(s);a=!(d=yield hs(u.next())).done;a=!1)yield d.value}catch(f){c=!0,l=f}finally{try{a&&null!=u.return&&(yield hs(u.return()))}finally{if(c)throw l}}}finally{i.ee.removeEventListener(t,o)}})()}once(t,r){var i=this;return $(function*(){var a,s=!1,o=!1;try{for(var l,c=ss(i.on(t,r));s=!(l=yield c.next()).done;s=!1)return l.value}catch(u){o=!0,a=u}finally{try{s&&null!=c.return&&(yield c.return())}finally{if(o)throw a}}throw new Error("Unreachable")})()}abortError(){return new DOMException("The signal has been aborted","AbortError")}close(){var t=this;return $(function*(){t.socket.readyState!==WebSocket.CLOSED&&(yield new Promise(r=>{t.socket.addEventListener(Ge.close,r,{once:!0}),t.socket.close()}))})()}}function vu(e){return Nt((t,r)=>{try{t.subscribe(r)}finally{r.add(e)}})}class fp extends WW{constructor(){var t;super({open:t=>new KZ(t),reqRouter:(t=$(function*(r){const i=[];return"wss://relay.nostr.net".split(",").forEach(s=>{i.push([s,r])}),new Map(i)}),function(i){return t.apply(this,arguments)}),eventRouter:function(){var t=$(function*(){return"wss://relay.nostr.net".split(",")});return function(){return t.apply(this,arguments)}}()})}observe(t){var r=this;console.info((new Date).toLocaleString(),"[[subscribe filter]]",t);const i=new AbortController,s=new ot;return $(function*(){var c,o=!1,a=!1;try{for(var u,l=ss(r.req(t,i));o=!(u=yield l.next()).done;o=!1){const d=u.value;if("CLOSED"===d[0]){s.error(d);break}"EVENT"===d[0]&&s.next(d[2])}}catch(d){a=!0,c=d}finally{try{o&&null!=l.return&&(yield l.return())}finally{if(a)throw c}}})(),s.asObservable().pipe(vu(()=>{console.info((new Date).toLocaleString(),"[[unsubscribe filter]]",t),i.abort()}))}}let WR=(()=>{class e{constructor(){this.pubkeySet=new Set,this.loadList()}loadList(){try{const r=sessionStorage.getItem("alwaysIgnoreWannachat");if(r){let i=JSON.parse(r);i instanceof Array?this.pubkeySet=new Set(i):sessionStorage.setItem("alwaysIgnoreWannachat","[]")}}catch{sessionStorage.setItem("alwaysIgnoreWannachat","[]")}}saveInList(r){this.pubkeySet.add(r),sessionStorage.setItem("alwaysIgnoreWannachat",JSON.stringify([...this.pubkeySet]))}isInList(r){return this.pubkeySet.has(r)}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),ZR=(()=>{class e{constructor(r,i){this.npool=r,this.ignoreListService=i}listenUserStatusUpdate(r){return console.info((new Date).toLocaleString(),"observing filter:",[{kinds:[Kt.UserStatuses],"#t":["omegle"],authors:[r]}]),this.npool.observe([{kinds:[Kt.UserStatuses],"#t":["omegle"],authors:[r]}])}queryWannachatResponse(r){return console.info((new Date).toLocaleString(),"quering filter:",[{kinds:[Kt.UserStatuses],"#t":["chating","omegle"],"#p":[r.pubkey],limit:1}]),this.npool.query([{kinds:[Kt.UserStatuses],"#t":["chating","omegle"],"#p":[r.pubkey],limit:1}])}listenWannachatResponse(r){return console.info((new Date).toLocaleString(),"observing filter:",[{kinds:[Kt.UserStatuses],"#t":["chating","omegle"],"#p":[r.pubkey],limit:1}]),this.npool.observe([{kinds:[Kt.UserStatuses],"#t":["chating","omegle"],"#p":[r.pubkey],limit:1}])}queryChatAvailable(){var r=this;return $(function*(){const i=Math.floor((new Date).getTime()/1e3);console.info((new Date).toLocaleString(),"quering filter: ",[{kinds:[Kt.UserStatuses],"#t":["wannachat","omegle"],since:i-600}]);let o=yield r.npool.query([{kinds:[Kt.UserStatuses],"#t":["wannachat","omegle"],since:i-600}]);o=o.filter(c=>!r.ignoreListService.isInList(c.pubkey));const a=o[Math.floor(Math.random()*o.length)];return a?console.info((new Date).toLocaleString(),"wanna chat found:",a):console.info((new Date).toLocaleString(),"wanna chat NOT found..."),Promise.resolve(a||null)})()}static#e=this.\u0275fac=function(i){return new(i||e)(G(fp),G(WR))};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac})}return e})();class co{constructor(t){const{type:r,data:i}=Gl.decode(t);if("nsec"===r)this.nsec=t,this.secretKey=i,this.pubkey=UM(this.secretKey),this.npub=Gl.npubEncode(this.pubkey);else{if("npub"!==r)throw new Error("Invalid argument, NostrUser expect nsec or npub string");this.npub=t,this.pubkey=i.toString(),this.nsec=void 0,this.secretKey=void 0}}static fromPubkey(t){return new co(Gl.npubEncode(t))}static fromSecretKeyBytes(t){return new co(Gl.nsecEncode(t))}static create(){return this.fromSecretKeyBytes(M7())}toString(){return this.pubkey}}class QZ extends Rt{constructor(t,r){super()}schedule(t,r=0){return this}}const hp={setInterval(e,t,...r){const{delegate:i}=hp;return i?.setInterval?i.setInterval(e,t,...r):setInterval(e,t,...r)},clearInterval(e){const{delegate:t}=hp;return(t?.clearInterval||clearInterval)(e)},delegate:void 0},KR={now:()=>(KR.delegate||Date).now(),delegate:void 0};class wu{constructor(t,r=wu.now){this.schedulerActionCtor=t,this.now=r}schedule(t,r=0,i){return new this.schedulerActionCtor(this,t).schedule(i,r)}}wu.now=KR.now;const XZ=new class JZ extends wu{constructor(t,r=wu.now){super(t,r),this.actions=[],this._active=!1}flush(t){const{actions:r}=this;if(this._active)return void r.push(t);let i;this._active=!0;do{if(i=t.execute(t.state,t.delay))break}while(t=r.shift());if(this._active=!1,i){for(;t=r.shift();)t.unsubscribe();throw i}}}(class YZ extends QZ{constructor(t,r){super(t,r),this.scheduler=t,this.work=r,this.pending=!1}schedule(t,r=0){var i;if(this.closed)return this;this.state=t;const s=this.id,o=this.scheduler;return null!=s&&(this.id=this.recycleAsyncId(o,s,r)),this.pending=!0,this.delay=r,this.id=null!==(i=this.id)&&void 0!==i?i:this.requestAsyncId(o,this.id,r),this}requestAsyncId(t,r,i=0){return hp.setInterval(t.flush.bind(t,this),i)}recycleAsyncId(t,r,i=0){if(null!=i&&this.delay===i&&!1===this.pending)return r;null!=r&&hp.clearInterval(r)}execute(t,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const i=this._execute(t,r);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,r){let s,i=!1;try{this.work(t)}catch(o){i=!0,s=o||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),s}unsubscribe(){if(!this.closed){const{id:t,scheduler:r}=this,{actions:i}=r;this.work=this.state=this.scheduler=null,this.pending=!1,Gu(i,this),null!=t&&(this.id=this.recycleAsyncId(r,t,null)),this.delay=null,super.unsubscribe()}}});function ys(e){return this instanceof ys?(this.v=e,this):new ys(e)}function XR(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,t=e[Symbol.asyncIterator];return t?t.call(e):(e=function g_(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r);function i(o){r[o]=e[o]&&function(a){return new Promise(function(c,l){!function s(o,a,c,l){Promise.resolve(l).then(function(u){o({value:u,done:c})},a)}(c,l,(a=e[o](a)).done,a.value)})}}}"function"==typeof SuppressedError&&SuppressedError;const e2=e=>e&&"number"==typeof e.length&&"function"!=typeof e;function t2(e){return nt(e?.then)}function n2(e){return nt(e[ng])}function r2(e){return Symbol.asyncIterator&&nt(e?.[Symbol.asyncIterator])}function i2(e){return new TypeError(`You provided ${null!==e&&"object"==typeof e?"an invalid object":`'${e}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}const s2=function EK(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function o2(e){return nt(e?.[s2])}function a2(e){return function JR(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s,i=r.apply(e,t||[]),o=[];return s=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),c("next"),c("throw"),c("return",function a(p){return function(g){return Promise.resolve(g).then(p,f)}}),s[Symbol.asyncIterator]=function(){return this},s;function c(p,g){i[p]&&(s[p]=function(m){return new Promise(function(y,v){o.push([p,m,y,v])>1||l(p,m)})},g&&(s[p]=g(s[p])))}function l(p,g){try{!function u(p){p.value instanceof ys?Promise.resolve(p.value.v).then(d,f):h(o[0][2],p)}(i[p](g))}catch(m){h(o[0][3],m)}}function d(p){l("next",p)}function f(p){l("throw",p)}function h(p,g){p(g),o.shift(),o.length&&l(o[0][0],o[0][1])}}(this,arguments,function*(){const r=e.getReader();try{for(;;){const{value:i,done:s}=yield ys(r.read());if(s)return yield ys(void 0);yield yield ys(i)}}finally{r.releaseLock()}})}function c2(e){return nt(e?.getReader)}function Kr(e){if(e instanceof Ot)return e;if(null!=e){if(n2(e))return function DK(e){return new Ot(t=>{const r=e[ng]();if(nt(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(e);if(e2(e))return function CK(e){return new Ot(t=>{for(let r=0;r{e.then(r=>{t.closed||(t.next(r),t.complete())},r=>t.error(r)).then(null,zb)})}(e);if(r2(e))return l2(e);if(o2(e))return function IK(e){return new Ot(t=>{for(const r of e)if(t.next(r),t.closed)return;t.complete()})}(e);if(c2(e))return function TK(e){return l2(a2(e))}(e)}throw i2(e)}function l2(e){return new Ot(t=>{(function xK(e,t){var r,i,s,o;return function QR(e,t,r,i){return new(r||(r=Promise))(function(o,a){function c(d){try{u(i.next(d))}catch(f){a(f)}}function l(d){try{u(i.throw(d))}catch(f){a(f)}}function u(d){d.done?o(d.value):function s(o){return o instanceof r?o:new r(function(a){a(o)})}(d.value).then(c,l)}u((i=i.apply(e,t||[])).next())})}(this,void 0,void 0,function*(){try{for(r=XR(e);!(i=yield r.next()).done;)if(t.next(i.value),t.closed)return}catch(a){s={error:a}}finally{try{i&&!i.done&&(o=r.return)&&(yield o.call(r))}finally{if(s)throw s.error}}t.complete()})})(e,t).catch(r=>t.error(r))})}function Qr(e,t,r,i=0,s=!1){const o=t.schedule(function(){r(),s?e.add(this.schedule(null,i)):this.unsubscribe()},i);if(e.add(o),!s)return o}const AK=qu(e=>function(r=null){e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=r});function u2(e,t){const{first:r,each:i,with:s=MK,scheduler:o=t??XZ,meta:a=null}=function eK(e){return e instanceof Date&&!isNaN(e)}(e)?{first:e}:"number"==typeof e?{each:e}:e;if(null==r&&null==i)throw new TypeError("No timeout provided.");return Nt((c,l)=>{let u,d,f=null,h=0;const p=g=>{d=Qr(l,o,()=>{try{u.unsubscribe(),Kr(s({meta:a,lastValue:f,seen:h})).subscribe(l)}catch(m){l.error(m)}},g)};u=c.subscribe(_t(l,g=>{d?.unsubscribe(),h++,l.next(f=g),i>0&&p(i)},void 0,void 0,()=>{d?.closed||d?.unsubscribe(),f=null})),!h&&p(null!=r?"number"==typeof r?r:+r-o.now():i)})}function MK(e){throw new AK(e)}function vs(e){return Nt((t,r)=>{let o,i=null,s=!1;i=t.subscribe(_t(r,void 0,void 0,a=>{o=Kr(e(a,vs(e)(t))),i?(i.unsubscribe(),i=null,o.subscribe(r)):s=!0})),s&&(i.unsubscribe(),i=null,o.subscribe(r))})}function Ja(e,t){const r=nt(e)?e:()=>e,i=s=>s.error(r());return new Ot(t?s=>t.schedule(i,0,s):i)}let m_=(()=>{class e{constructor(r){this.globalConfigService=r,this.largeExpirationTime=1800}getCurrentTimestamp(){return Math.floor(Date.now()/1e3)}getExpirationTimestamp(r=this.globalConfigService.wannachatStatusDefaultTimeoutInSeconds){const s=Math.floor(Date.now()/1e3)+r;return String(s)}createEncryptedDirectMessage(r,i,s){var o=this;return $(function*(){const a=yield Kl.encrypt(r.secretKey,i.pubkey,s),c={kind:Kt.EncryptedDirectMessage,content:a,created_at:o.getCurrentTimestamp(),tags:[["p",i.pubkey],["expiration",o.getExpirationTimestamp(o.largeExpirationTime)]]},l=Zn(c,r.secretKey);return Promise.resolve(l)})()}createWannaChatUserStatus(r){return this.createUserStatus(r,"wannachat",[["expiration",this.getExpirationTimestamp()],["t","omegle"],["t","wannachat"]])}createDisconnectedUserStatus(r){return this.createUserStatus(r,"disconnected",[["expiration",this.getExpirationTimestamp()]])}createTypingUserStatus(r){return this.createUserStatus(r,"typing",[["t","omegle"],["expiration",this.getExpirationTimestamp(this.largeExpirationTime)]])}createChatingUserStatus(r,i){return this.createUserStatus(r,"chating",[["expiration",this.getExpirationTimestamp(this.largeExpirationTime)],["p",i.pubkey],["t","omegle"],["t","chating"]])}deleteUserHistory(r){const i={kind:5,tags:[["k",String(Kt.EncryptedDirectMessage)],["k",String(Kt.UserStatuses)],["expiration",this.getExpirationTimestamp()]],created_at:Math.floor((new Date).getTime()/1e3),content:""};return Zn(i,r.secretKey)}cleanUserStatus(r){return this.createUserStatus(r,"",[["t","omegle"]])}createUserStatus(r,i,s){const o=[["d","general"],...s||[]],a={kind:Kt.UserStatuses,content:i,created_at:this.getCurrentTimestamp(),tags:o};return Zn(a,r.secretKey)}static#e=this.\u0275fac=function(i){return new(i||e)(G(Kv))};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),d2=(()=>{class e{constructor(r,i,s,o,a){this.nostrEventFactory=r,this.findStrangerNostr=i,this.ignoreListService=s,this.config=o,this.npool=a}publish(r){return this.npool.event(r)}searchStranger(r){var i=this;return $(function*(){const s=yield i.findStrangerNostr.queryChatAvailable();if(s){console.info((new Date).toLocaleString(),"inviting ",s.pubkey," to chat and listening confirmation");const o=i.listenChatingConfirmation(s,r);yield i.inviteToChating(r,s);const a=yield o;return i.ignoreListService.saveInList(s.pubkey),a?Promise.resolve(co.fromPubkey(s.pubkey)):(yield i.disconnect(r),i.searchStranger(r))}return yield i.publishWannaChatStatus(r),new Promise(o=>{const a=i.findStrangerNostr.listenWannachatResponse(r).pipe(u2(1e3*i.config.wannachatStatusDefaultTimeoutInSeconds),vs(c=>(a.unsubscribe(),i.deleteUserHistory(r).then(()=>i.searchStranger(r).then(l=>o(l))),Ja(()=>new c)))).subscribe({next:c=>{i.ignoreListService.saveInList(c.pubkey),i.replyChatInvitation(c,r).then(l=>l&&o(l)),a.unsubscribe()},error:c=>console.error((new Date).toLocaleString(),c)})})})()}replyChatInvitation(r,i){var s=this;return $(function*(){return console.info((new Date).toLocaleString(),"event was listen: ",r),console.info((new Date).toLocaleString(),"it must be a chating invitation from ",r.pubkey,", repling invitation..."),yield s.inviteToChating(i,r),console.info((new Date).toLocaleString(),"replied... resolving... "),console.info((new Date).toLocaleString(),"[searchStranger] unsubscribe"),Promise.resolve(co.fromPubkey(r.pubkey))})()}isChatingToMe(r,i){console.info((new Date).toLocaleString(),"is wannachat reply with chating? event: ",r);const s=r.tags.filter(([o])=>"p"===o).find(([,o])=>o===i.pubkey)||[];return console.info((new Date).toLocaleString(),"is wannachat reply with chating?",s.length?"yes":"no"),!!s.length}inviteToChating(r,i){const s=co.fromPubkey(i.pubkey);return this.publishChatInviteStatus(r,s)}listenChatingConfirmation(r,i){var s=this;return $(function*(){return new Promise(o=>{console.info((new Date).toLocaleString(),"listening status update from: ",r.pubkey);const a=s.findStrangerNostr.listenUserStatusUpdate(r.pubkey).pipe(u2(5e3),vs(c=>Ja(()=>new Error("chat confirmation timeout after 5s waiting, there is no stranger connected to this session")))).subscribe({next:c=>s.receiveChatingConfirmation(a,c,r,i).then(l=>{"boolean"==typeof l&&o(l)}),error:()=>o(!1)})})})()}receiveChatingConfirmation(r,i,s,o){return i.id===s.id&&"wannachat"===i.content?(console.info((new Date).toLocaleString(),"stranger #wannachat status was listen, ignoring and waiting new status..."),Promise.resolve(void 0)):(r.unsubscribe(),console.info((new Date).toLocaleString(),"[listenUserStatusUpdate] unsubscribe"),console.info((new Date).toLocaleString(),"stranger ",s.pubkey," update status: ",i),this.isChatingToMe(i,o)?(console.info((new Date).toLocaleString(),'is "chating" status confirmed, resolved with true'),Promise.resolve(!0)):(console.info((new Date).toLocaleString(),"unexpected status was given, resolved with false, event: ",i),Promise.resolve(!1)))}publishWannaChatStatus(r){var i=this;return $(function*(){const s=i.nostrEventFactory.createWannaChatUserStatus(r);return console.info((new Date).toLocaleString(),"updating my status to: ",s),yield i.npool.event(s),Promise.resolve(s)})()}publishChatInviteStatus(r,i){var s=this;return $(function*(){const o=s.nostrEventFactory.createChatingUserStatus(r,i);return console.info((new Date).toLocaleString(),"updating my status to: ",o),yield s.npool.event(o),Promise.resolve(o)})()}deleteUserHistory(r){var i=this;return $(function*(){const s=i.nostrEventFactory.deleteUserHistory(r);console.info((new Date).toLocaleString(),"deleting user history"),yield i.npool.event(s)})()}connect(){const r=co.create();return this.ignoreListService.saveInList(r.pubkey),r}disconnect(r){var i=this;return $(function*(){const s=i.nostrEventFactory.createDisconnectedUserStatus(r);return console.info((new Date).toLocaleString(),"updating my status to: ",s),yield i.deleteUserHistory(r),yield i.npool.event(s),Promise.resolve(s)})()}static#e=this.\u0275fac=function(i){return new(i||e)(G(m_),G(ZR),G(WR),G(Kv),G(fp))};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac})}return e})(),f2=(()=>{class e{constructor(r,i){this.nostrEventFactory=r,this.npool=i,this.updateUserCountTimeout=12e4}openEncryptedDirectMessage(r,i,s){return $(function*(){return Kl.decrypt(r.secretKey,i.pubkey,s.content)})()}listenMessages(r,i){return this.npool.observe([{kinds:[Kt.EncryptedDirectMessage],authors:[i.pubkey],"#p":[r.pubkey]}])}listenStrangerStatus(r){return this.npool.observe([{kinds:[Kt.UserStatuses],authors:[r.pubkey]}])}listenCurrenOnlineUsers(){const r=new ot;let i=!1;const s=()=>{i||(i=!0,console.info((new Date).toLocaleString(),"user count requested"),this.npool.query([{kinds:[Kt.UserStatuses],"#t":["omegle"]}]).then(a=>{const c=new Set;console.info((new Date).toLocaleString(),"count events",a),a.forEach(u=>c.add(u.pubkey));const l=[...c].length;console.info((new Date).toLocaleString(),"active users counted: ",l),r.next(l),i=!1}).catch(a=>{console.error((new Date).toLocaleString(),"user count lauched error",a),i=!1,clearInterval(o)}))},o=setInterval(s,this.updateUserCountTimeout);return s(),r.asObservable().pipe(vu(()=>clearInterval(o)))}sendMessage(r,i,s){var o=this;return $(function*(){yield o.stopTyping(r);const a=yield o.nostrEventFactory.createEncryptedDirectMessage(r,i,s);return o.npool.event(a)})()}isTyping(r){const i=this.nostrEventFactory.createTypingUserStatus(r);return this.npool.event(i)}stopTyping(r){const i=this.nostrEventFactory.cleanUserStatus(r);return this.npool.event(i)}static#e=this.\u0275fac=function(i){return new(i||e)(G(m_),G(fp))};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac})}return e})(),NK=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=pn({type:e});static#r=this.\u0275inj=Jt({providers:[ZR,d2,f2],imports:[Ea]})}return e})();function h2(e,t=0){return Nt((r,i)=>{r.subscribe(_t(i,s=>Qr(i,e,()=>i.next(s),t),()=>Qr(i,e,()=>i.complete(),t),s=>Qr(i,e,()=>i.error(s),t)))})}function p2(e,t=0){return Nt((r,i)=>{i.add(e.schedule(()=>r.subscribe(i),t))})}function g2(e,t){if(!e)throw new Error("Iterable cannot be null");return new Ot(r=>{Qr(r,t,()=>{const i=e[Symbol.asyncIterator]();Qr(r,t,()=>{i.next().then(s=>{s.done?r.complete():r.next(s.value)})},0,!0)})})}function Ft(e,t){return t?function BK(e,t){if(null!=e){if(n2(e))return function OK(e,t){return Kr(e).pipe(p2(t),h2(t))}(e,t);if(e2(e))return function PK(e,t){return new Ot(r=>{let i=0;return t.schedule(function(){i===e.length?r.complete():(r.next(e[i++]),r.closed||this.schedule())})})}(e,t);if(t2(e))return function kK(e,t){return Kr(e).pipe(p2(t),h2(t))}(e,t);if(r2(e))return g2(e,t);if(o2(e))return function LK(e,t){return new Ot(r=>{let i;return Qr(r,t,()=>{i=e[s2](),Qr(r,t,()=>{let s,o;try{({value:s,done:o}=i.next())}catch(a){return void r.error(a)}o?r.complete():r.next(s)},0,!0)}),()=>nt(i?.return)&&i.return()})}(e,t);if(c2(e))return function FK(e,t){return g2(a2(e),t)}(e,t)}throw i2(e)}(e,t):Kr(e)}function y_(e){return e[e.length-1]}function pp(e){return function UK(e){return e&&nt(e.schedule)}(y_(e))?e.pop():void 0}function ue(...e){return Ft(e,pp(e))}const{isArray:$K}=Array,{getPrototypeOf:VK,prototype:HK,keys:zK}=Object;const{isArray:WK}=Array;function v_(...e){const t=pp(e),r=function jK(e){return nt(y_(e))?e.pop():void 0}(e),{args:i,keys:s}=function qK(e){if(1===e.length){const t=e[0];if($K(t))return{args:t,keys:null};if(function GK(e){return e&&"object"==typeof e&&VK(e)===HK}(t)){const r=zK(t);return{args:r.map(i=>t[i]),keys:r}}}return{args:e,keys:null}}(e);if(0===i.length)return Ft([],t);const o=new Ot(function YK(e,t,r=Cs){return i=>{m2(t,()=>{const{length:s}=e,o=new Array(s);let a=s,c=s;for(let l=0;l{const u=Ft(e[l],t);let d=!1;u.subscribe(_t(i,f=>{o[l]=f,d||(d=!0,c--),c||i.next(r(o.slice()))},()=>{--a||i.complete()}))},i)},i)}}(i,t,s?a=>function QK(e,t){return e.reduce((r,i,s)=>(r[i]=t[s],r),{})}(s,a):Cs));return r?o.pipe(function KK(e){return Ue(t=>function ZK(e,t){return WK(t)?e(...t):e(t)}(e,t))}(r)):o}function m2(e,t,r){e?Qr(r,e,t):t()}const gp=qu(e=>function(){e(this),this.name="EmptyError",this.message="no elements in sequence"});function Yt(e,t,r=1/0){return nt(t)?Yt((i,s)=>Ue((o,a)=>t(i,o,s,a))(Kr(e(i,s))),r):("number"==typeof t&&(r=t),Nt((i,s)=>function JK(e,t,r,i,s,o,a,c){const l=[];let u=0,d=0,f=!1;const h=()=>{f&&!l.length&&!u&&t.complete()},p=m=>u{o&&t.next(m),u++;let y=!1;Kr(r(m,d++)).subscribe(_t(t,v=>{s?.(v),o?p(v):t.next(v)},()=>{y=!0},void 0,()=>{if(y)try{for(u--;l.length&&ug(v)):g(v)}h()}catch(v){t.error(v)}}))};return e.subscribe(_t(t,p,()=>{f=!0,h()})),()=>{c?.()}}(i,s,e,r)))}function _u(e=1/0){return Yt(Cs,e)}function w_(...e){return function XK(){return _u(1)}()(Ft(e,pp(e)))}function y2(e){return new Ot(t=>{Kr(e()).subscribe(t)})}const Yr=new Ot(e=>e.complete());function __(){return Nt((e,t)=>{let r=null;e._refCount++;const i=_t(t,void 0,void 0,void 0,()=>{if(!e||e._refCount<=0||0<--e._refCount)return void(r=null);const s=e._connection,o=r;r=null,s&&(!o||s===o)&&s.unsubscribe(),t.unsubscribe()});e.subscribe(i),i.closed||(r=e.connect())})}class v2 extends Ot{constructor(t,r){super(),this.source=t,this.subjectFactory=r,this._subject=null,this._refCount=0,this._connection=null,Zb(t)&&(this.lift=t.lift)}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){const t=this._subject;return(!t||t.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;const{_connection:t}=this;this._subject=this._connection=null,t?.unsubscribe()}connect(){let t=this._connection;if(!t){t=this._connection=new Rt;const r=this.getSubject();t.add(this.source.subscribe(_t(r,void 0,()=>{this._teardown(),r.complete()},i=>{this._teardown(),r.error(i)},()=>this._teardown()))),t.closed&&(this._connection=null,t=Rt.EMPTY)}return t}refCount(){return __()(this)}}function Jr(e,t){return Nt((r,i)=>{let s=null,o=0,a=!1;const c=()=>a&&!s&&i.complete();r.subscribe(_t(i,l=>{s?.unsubscribe();let u=0;const d=o++;Kr(e(l,d)).subscribe(s=_t(i,f=>i.next(t?t(l,f,d,u++):f),()=>{s=null,c()}))},()=>{a=!0,c()}))})}function Xa(e){return e<=0?()=>Yr:Nt((t,r)=>{let i=0;t.subscribe(_t(r,s=>{++i<=e&&(r.next(s),e<=i&&r.complete())}))})}function ws(e,t){return Nt((r,i)=>{let s=0;r.subscribe(_t(i,o=>e.call(t,o,s++)&&i.next(o)))})}function mp(e){return Nt((t,r)=>{let i=!1;t.subscribe(_t(r,s=>{i=!0,r.next(s)},()=>{i||r.next(e),r.complete()}))})}function w2(e=nQ){return Nt((t,r)=>{let i=!1;t.subscribe(_t(r,s=>{i=!0,r.next(s)},()=>i?r.complete():r.error(e())))})}function nQ(){return new gp}function lo(e,t){const r=arguments.length>=2;return i=>i.pipe(e?ws((s,o)=>e(s,o,i)):Cs,Xa(1),r?mp(t):w2(()=>new gp))}function bu(e,t){return nt(t)?Yt(e,t,1):Yt(e,1)}function dn(e,t,r){const i=nt(e)||t||r?{next:e,error:t,complete:r}:e;return i?Nt((s,o)=>{var a;null===(a=i.subscribe)||void 0===a||a.call(i);let c=!0;s.subscribe(_t(o,l=>{var u;null===(u=i.next)||void 0===u||u.call(i,l),o.next(l)},()=>{var l;c=!1,null===(l=i.complete)||void 0===l||l.call(i),o.complete()},l=>{var u;c=!1,null===(u=i.error)||void 0===u||u.call(i,l),o.error(l)},()=>{var l,u;c&&(null===(l=i.unsubscribe)||void 0===l||l.call(i)),null===(u=i.finalize)||void 0===u||u.call(i)}))}):Cs}function b_(e){return e<=0?()=>Yr:Nt((t,r)=>{let i=[];t.subscribe(_t(r,s=>{i.push(s),e{for(const s of i)r.next(s);r.complete()},void 0,()=>{i=null}))})}const ge="primary",Eu=Symbol("RouteTitle");class cQ{constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(this.params,t)}get(t){if(this.has(t)){const r=this.params[t];return Array.isArray(r)?r[0]:r}return null}getAll(t){if(this.has(t)){const r=this.params[t];return Array.isArray(r)?r:[r]}return[]}get keys(){return Object.keys(this.params)}}function ec(e){return new cQ(e)}function lQ(e,t,r){const i=r.path.split("/");if(i.length>e.length||"full"===r.pathMatch&&(t.hasChildren()||i.lengthi[o]===s)}return e===t}function b2(e){return e.length>0?e[e.length-1]:null}function _s(e){return function RK(e){return!!e&&(e instanceof Ot||nt(e.lift)&&nt(e.subscribe))}(e)?e:Lf(e)?Ft(Promise.resolve(e)):ue(e)}const dQ={exact:function C2(e,t,r){if(!uo(e.segments,t.segments)||!yp(e.segments,t.segments,r)||e.numberOfChildren!==t.numberOfChildren)return!1;for(const i in t.children)if(!e.children[i]||!C2(e.children[i],t.children[i],r))return!1;return!0},subset:S2},E2={exact:function fQ(e,t){return Xr(e,t)},subset:function hQ(e,t){return Object.keys(t).length<=Object.keys(e).length&&Object.keys(t).every(r=>_2(e[r],t[r]))},ignored:()=>!0};function D2(e,t,r){return dQ[r.paths](e.root,t.root,r.matrixParams)&&E2[r.queryParams](e.queryParams,t.queryParams)&&!("exact"===r.fragment&&e.fragment!==t.fragment)}function S2(e,t,r){return I2(e,t,t.segments,r)}function I2(e,t,r,i){if(e.segments.length>r.length){const s=e.segments.slice(0,r.length);return!(!uo(s,r)||t.hasChildren()||!yp(s,r,i))}if(e.segments.length===r.length){if(!uo(e.segments,r)||!yp(e.segments,r,i))return!1;for(const s in t.children)if(!e.children[s]||!S2(e.children[s],t.children[s],i))return!1;return!0}{const s=r.slice(0,e.segments.length),o=r.slice(e.segments.length);return!!(uo(e.segments,s)&&yp(e.segments,s,i)&&e.children[ge])&&I2(e.children[ge],t,o,i)}}function yp(e,t,r){return t.every((i,s)=>E2[r](e[s].parameters,i.parameters))}class tc{constructor(t=new Ve([],{}),r={},i=null){this.root=t,this.queryParams=r,this.fragment=i}get queryParamMap(){return this._queryParamMap??=ec(this.queryParams),this._queryParamMap}toString(){return mQ.serialize(this)}}class Ve{constructor(t,r){this.segments=t,this.children=r,this.parent=null,Object.values(r).forEach(i=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return vp(this)}}class Du{constructor(t,r){this.path=t,this.parameters=r}get parameterMap(){return this._parameterMap??=ec(this.parameters),this._parameterMap}toString(){return A2(this)}}function uo(e,t){return e.length===t.length&&e.every((r,i)=>r.path===t[i].path)}let nc=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=z({token:e,factory:()=>new D_,providedIn:"root"})}return e})();class D_{parse(t){const r=new TQ(t);return new tc(r.parseRootSegment(),r.parseQueryParams(),r.parseFragment())}serialize(t){const r=`/${Cu(t.root,!0)}`,i=function wQ(e){const t=Object.entries(e).map(([r,i])=>Array.isArray(i)?i.map(s=>`${wp(r)}=${wp(s)}`).join("&"):`${wp(r)}=${wp(i)}`).filter(r=>r);return t.length?`?${t.join("&")}`:""}(t.queryParams),s="string"==typeof t.fragment?`#${function yQ(e){return encodeURI(e)}(t.fragment)}`:"";return`${r}${i}${s}`}}const mQ=new D_;function vp(e){return e.segments.map(t=>A2(t)).join("/")}function Cu(e,t){if(!e.hasChildren())return vp(e);if(t){const r=e.children[ge]?Cu(e.children[ge],!1):"",i=[];return Object.entries(e.children).forEach(([s,o])=>{s!==ge&&i.push(`${s}:${Cu(o,!1)}`)}),i.length>0?`${r}(${i.join("//")})`:r}{const r=function gQ(e,t){let r=[];return Object.entries(e.children).forEach(([i,s])=>{i===ge&&(r=r.concat(t(s,i)))}),Object.entries(e.children).forEach(([i,s])=>{i!==ge&&(r=r.concat(t(s,i)))}),r}(e,(i,s)=>s===ge?[Cu(e.children[ge],!1)]:[`${s}:${Cu(i,!1)}`]);return 1===Object.keys(e.children).length&&null!=e.children[ge]?`${vp(e)}/${r[0]}`:`${vp(e)}/(${r.join("//")})`}}function T2(e){return encodeURIComponent(e).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function wp(e){return T2(e).replace(/%3B/gi,";")}function C_(e){return T2(e).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function _p(e){return decodeURIComponent(e)}function x2(e){return _p(e.replace(/\+/g,"%20"))}function A2(e){return`${C_(e.path)}${function vQ(e){return Object.entries(e).map(([t,r])=>`;${C_(t)}=${C_(r)}`).join("")}(e.parameters)}`}const _Q=/^[^\/()?;#]+/;function S_(e){const t=e.match(_Q);return t?t[0]:""}const bQ=/^[^\/()?;=#]+/,DQ=/^[^=?&#]+/,SQ=/^[^&#]+/;class TQ{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Ve([],{}):new Ve([],this.parseChildren())}parseQueryParams(){const t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let r={};this.peekStartsWith("/(")&&(this.capture("/"),r=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(t.length>0||Object.keys(r).length>0)&&(i[ge]=new Ve(t,r)),i}parseSegment(){const t=S_(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new M(4009,!1);return this.capture(t),new Du(_p(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const r=function EQ(e){const t=e.match(bQ);return t?t[0]:""}(this.remaining);if(!r)return;this.capture(r);let i="";if(this.consumeOptional("=")){const s=S_(this.remaining);s&&(i=s,this.capture(i))}t[_p(r)]=_p(i)}parseQueryParam(t){const r=function CQ(e){const t=e.match(DQ);return t?t[0]:""}(this.remaining);if(!r)return;this.capture(r);let i="";if(this.consumeOptional("=")){const a=function IQ(e){const t=e.match(SQ);return t?t[0]:""}(this.remaining);a&&(i=a,this.capture(i))}const s=x2(r),o=x2(i);if(t.hasOwnProperty(s)){let a=t[s];Array.isArray(a)||(a=[a],t[s]=a),a.push(o)}else t[s]=o}parseParens(t){const r={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const i=S_(this.remaining),s=this.remaining[i.length];if("/"!==s&&")"!==s&&";"!==s)throw new M(4010,!1);let o;i.indexOf(":")>-1?(o=i.slice(0,i.indexOf(":")),this.capture(o),this.capture(":")):t&&(o=ge);const a=this.parseChildren();r[o]=1===Object.keys(a).length?a[ge]:new Ve([],a),this.consumeOptional("//")}return r}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)}capture(t){if(!this.consumeOptional(t))throw new M(4011,!1)}}function M2(e){return e.segments.length>0?new Ve([],{[ge]:e}):e}function N2(e){const t={};for(const[i,s]of Object.entries(e.children)){const o=N2(s);if(i===ge&&0===o.segments.length&&o.hasChildren())for(const[a,c]of Object.entries(o.children))t[a]=c;else(o.segments.length>0||o.hasChildren())&&(t[i]=o)}return function xQ(e){if(1===e.numberOfChildren&&e.children[ge]){const t=e.children[ge];return new Ve(e.segments.concat(t.segments),t.children)}return e}(new Ve(e.segments,t))}function rc(e){return e instanceof tc}function R2(e){let t;const s=M2(function r(o){const a={};for(const l of o.children){const u=r(l);a[l.outlet]=u}const c=new Ve(o.url,a);return o===e&&(t=c),c}(e.root));return t??s}function O2(e,t,r,i){let s=e;for(;s.parent;)s=s.parent;if(0===t.length)return I_(s,s,s,r,i);const o=function MQ(e){if("string"==typeof e[0]&&1===e.length&&"/"===e[0])return new P2(!0,0,e);let t=0,r=!1;const i=e.reduce((s,o,a)=>{if("object"==typeof o&&null!=o){if(o.outlets){const c={};return Object.entries(o.outlets).forEach(([l,u])=>{c[l]="string"==typeof u?u.split("/"):u}),[...s,{outlets:c}]}if(o.segmentPath)return[...s,o.segmentPath]}return"string"!=typeof o?[...s,o]:0===a?(o.split("/").forEach((c,l)=>{0==l&&"."===c||(0==l&&""===c?r=!0:".."===c?t++:""!=c&&s.push(c))}),s):[...s,o]},[]);return new P2(r,t,i)}(t);if(o.toRoot())return I_(s,s,new Ve([],{}),r,i);const a=function NQ(e,t,r){if(e.isAbsolute)return new Ep(t,!0,0);if(!r)return new Ep(t,!1,NaN);if(null===r.parent)return new Ep(r,!0,0);const i=bp(e.commands[0])?0:1;return function RQ(e,t,r){let i=e,s=t,o=r;for(;o>s;){if(o-=s,i=i.parent,!i)throw new M(4005,!1);s=i.segments.length}return new Ep(i,!1,s-o)}(r,r.segments.length-1+i,e.numberOfDoubleDots)}(o,s,e),c=a.processChildren?Iu(a.segmentGroup,a.index,o.commands):L2(a.segmentGroup,a.index,o.commands);return I_(s,a.segmentGroup,c,r,i)}function bp(e){return"object"==typeof e&&null!=e&&!e.outlets&&!e.segmentPath}function Su(e){return"object"==typeof e&&null!=e&&e.outlets}function I_(e,t,r,i,s){let a,o={};i&&Object.entries(i).forEach(([l,u])=>{o[l]=Array.isArray(u)?u.map(d=>`${d}`):`${u}`}),a=e===t?r:k2(e,t,r);const c=M2(N2(a));return new tc(c,o,s)}function k2(e,t,r){const i={};return Object.entries(e.children).forEach(([s,o])=>{i[s]=o===t?r:k2(o,t,r)}),new Ve(e.segments,i)}class P2{constructor(t,r,i){if(this.isAbsolute=t,this.numberOfDoubleDots=r,this.commands=i,t&&i.length>0&&bp(i[0]))throw new M(4003,!1);const s=i.find(Su);if(s&&s!==b2(i))throw new M(4004,!1)}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class Ep{constructor(t,r,i){this.segmentGroup=t,this.processChildren=r,this.index=i}}function L2(e,t,r){if(e??=new Ve([],{}),0===e.segments.length&&e.hasChildren())return Iu(e,t,r);const i=function kQ(e,t,r){let i=0,s=t;const o={match:!1,pathIndex:0,commandIndex:0};for(;s=r.length)return o;const a=e.segments[s],c=r[i];if(Su(c))break;const l=`${c}`,u=i0&&void 0===l)break;if(l&&u&&"object"==typeof u&&void 0===u.outlets){if(!B2(l,u,a))return o;i+=2}else{if(!B2(l,{},a))return o;i++}s++}return{match:!0,pathIndex:s,commandIndex:i}}(e,t,r),s=r.slice(i.commandIndex);if(i.match&&i.pathIndexo!==ge)&&e.children[ge]&&1===e.numberOfChildren&&0===e.children[ge].segments.length){const o=Iu(e.children[ge],t,r);return new Ve(e.segments,o.children)}return Object.entries(i).forEach(([o,a])=>{"string"==typeof a&&(a=[a]),null!==a&&(s[o]=L2(e.children[o],t,a))}),Object.entries(e.children).forEach(([o,a])=>{void 0===i[o]&&(s[o]=a)}),new Ve(e.segments,s)}}function T_(e,t,r){const i=e.segments.slice(0,t);let s=0;for(;s{"string"==typeof i&&(i=[i]),null!==i&&(t[r]=T_(new Ve([],{}),0,i))}),t}function F2(e){const t={};return Object.entries(e).forEach(([r,i])=>t[r]=`${i}`),t}function B2(e,t,r){return e==r.path&&Xr(t,r.parameters)}const Tu="imperative";var Te=function(e){return e[e.NavigationStart=0]="NavigationStart",e[e.NavigationEnd=1]="NavigationEnd",e[e.NavigationCancel=2]="NavigationCancel",e[e.NavigationError=3]="NavigationError",e[e.RoutesRecognized=4]="RoutesRecognized",e[e.ResolveStart=5]="ResolveStart",e[e.ResolveEnd=6]="ResolveEnd",e[e.GuardsCheckStart=7]="GuardsCheckStart",e[e.GuardsCheckEnd=8]="GuardsCheckEnd",e[e.RouteConfigLoadStart=9]="RouteConfigLoadStart",e[e.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",e[e.ChildActivationStart=11]="ChildActivationStart",e[e.ChildActivationEnd=12]="ChildActivationEnd",e[e.ActivationStart=13]="ActivationStart",e[e.ActivationEnd=14]="ActivationEnd",e[e.Scroll=15]="Scroll",e[e.NavigationSkipped=16]="NavigationSkipped",e}(Te||{});class ei{constructor(t,r){this.id=t,this.url=r}}class Dp extends ei{constructor(t,r,i="imperative",s=null){super(t,r),this.type=Te.NavigationStart,this.navigationTrigger=i,this.restoredState=s}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class Ri extends ei{constructor(t,r,i){super(t,r),this.urlAfterRedirects=i,this.type=Te.NavigationEnd}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}var Fn=function(e){return e[e.Redirect=0]="Redirect",e[e.SupersededByNewNavigation=1]="SupersededByNewNavigation",e[e.NoDataFromResolver=2]="NoDataFromResolver",e[e.GuardRejected=3]="GuardRejected",e}(Fn||{}),Cp=function(e){return e[e.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",e[e.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",e}(Cp||{});class ic extends ei{constructor(t,r,i,s){super(t,r),this.reason=i,this.code=s,this.type=Te.NavigationCancel}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class sc extends ei{constructor(t,r,i,s){super(t,r),this.reason=i,this.code=s,this.type=Te.NavigationSkipped}}class Sp extends ei{constructor(t,r,i,s){super(t,r),this.error=i,this.target=s,this.type=Te.NavigationError}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class U2 extends ei{constructor(t,r,i,s){super(t,r),this.urlAfterRedirects=i,this.state=s,this.type=Te.RoutesRecognized}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class LQ extends ei{constructor(t,r,i,s){super(t,r),this.urlAfterRedirects=i,this.state=s,this.type=Te.GuardsCheckStart}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class FQ extends ei{constructor(t,r,i,s,o){super(t,r),this.urlAfterRedirects=i,this.state=s,this.shouldActivate=o,this.type=Te.GuardsCheckEnd}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class BQ extends ei{constructor(t,r,i,s){super(t,r),this.urlAfterRedirects=i,this.state=s,this.type=Te.ResolveStart}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class UQ extends ei{constructor(t,r,i,s){super(t,r),this.urlAfterRedirects=i,this.state=s,this.type=Te.ResolveEnd}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class jQ{constructor(t){this.route=t,this.type=Te.RouteConfigLoadStart}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class $Q{constructor(t){this.route=t,this.type=Te.RouteConfigLoadEnd}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class VQ{constructor(t){this.snapshot=t,this.type=Te.ChildActivationStart}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class HQ{constructor(t){this.snapshot=t,this.type=Te.ChildActivationEnd}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class zQ{constructor(t){this.snapshot=t,this.type=Te.ActivationStart}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class qQ{constructor(t){this.snapshot=t,this.type=Te.ActivationEnd}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class j2{constructor(t,r,i){this.routerEvent=t,this.position=r,this.anchor=i,this.type=Te.Scroll}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}class x_{}class A_{constructor(t){this.url=t}}class GQ{constructor(){this.outlet=null,this.route=null,this.injector=null,this.children=new xu,this.attachRef=null}}let xu=(()=>{class e{constructor(){this.contexts=new Map}onChildOutletCreated(r,i){const s=this.getOrCreateContext(r);s.outlet=i,this.contexts.set(r,s)}onChildOutletDestroyed(r){const i=this.getContext(r);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){const r=this.contexts;return this.contexts=new Map,r}onOutletReAttached(r){this.contexts=r}getOrCreateContext(r){let i=this.getContext(r);return i||(i=new GQ,this.contexts.set(r,i)),i}getContext(r){return this.contexts.get(r)||null}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();class $2{constructor(t){this._root=t}get root(){return this._root.value}parent(t){const r=this.pathFromRoot(t);return r.length>1?r[r.length-2]:null}children(t){const r=M_(t,this._root);return r?r.children.map(i=>i.value):[]}firstChild(t){const r=M_(t,this._root);return r&&r.children.length>0?r.children[0].value:null}siblings(t){const r=N_(t,this._root);return r.length<2?[]:r[r.length-2].children.map(s=>s.value).filter(s=>s!==t)}pathFromRoot(t){return N_(t,this._root).map(r=>r.value)}}function M_(e,t){if(e===t.value)return t;for(const r of t.children){const i=M_(e,r);if(i)return i}return null}function N_(e,t){if(e===t.value)return[t];for(const r of t.children){const i=N_(e,r);if(i.length)return i.unshift(t),i}return[]}class vr{constructor(t,r){this.value=t,this.children=r}toString(){return`TreeNode(${this.value})`}}function oc(e){const t={};return e&&e.children.forEach(r=>t[r.value.outlet]=r),t}class V2 extends $2{constructor(t,r){super(t),this.snapshot=r,k_(this,t)}toString(){return this.snapshot.toString()}}function H2(e){const t=function WQ(e){const o=new O_([],{},{},"",{},ge,e,null,{});return new z2("",new vr(o,[]))}(e),r=new jn([new Du("",{})]),i=new jn({}),s=new jn({}),o=new jn({}),a=new jn(""),c=new ac(r,i,o,a,s,ge,e,t.root);return c.snapshot=t.root,new V2(new vr(c,[]),t)}class ac{constructor(t,r,i,s,o,a,c,l){this.urlSubject=t,this.paramsSubject=r,this.queryParamsSubject=i,this.fragmentSubject=s,this.dataSubject=o,this.outlet=a,this.component=c,this._futureSnapshot=l,this.title=this.dataSubject?.pipe(Ue(u=>u[Eu]))??ue(void 0),this.url=t,this.params=r,this.queryParams=i,this.fragment=s,this.data=o}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(Ue(t=>ec(t))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(Ue(t=>ec(t))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function R_(e,t,r="emptyOnly"){let i;const{routeConfig:s}=e;return i=null===t||"always"!==r&&""!==s?.path&&(t.component||t.routeConfig?.loadComponent)?{params:{...e.params},data:{...e.data},resolve:{...e.data,...e._resolvedData??{}}}:{params:{...t.params,...e.params},data:{...t.data,...e.data},resolve:{...e.data,...t.data,...s?.data,...e._resolvedData}},s&&G2(s)&&(i.resolve[Eu]=s.title),i}class O_{get title(){return this.data?.[Eu]}constructor(t,r,i,s,o,a,c,l,u){this.url=t,this.params=r,this.queryParams=i,this.fragment=s,this.data=o,this.outlet=a,this.component=c,this.routeConfig=l,this._resolve=u}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=ec(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=ec(this.queryParams),this._queryParamMap}toString(){return`Route(url:'${this.url.map(i=>i.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class z2 extends $2{constructor(t,r){super(r),this.url=t,k_(this,r)}toString(){return q2(this._root)}}function k_(e,t){t.value._routerState=e,t.children.forEach(r=>k_(e,r))}function q2(e){const t=e.children.length>0?` { ${e.children.map(q2).join(", ")} } `:"";return`${e.value}${t}`}function P_(e){if(e.snapshot){const t=e.snapshot,r=e._futureSnapshot;e.snapshot=r,Xr(t.queryParams,r.queryParams)||e.queryParamsSubject.next(r.queryParams),t.fragment!==r.fragment&&e.fragmentSubject.next(r.fragment),Xr(t.params,r.params)||e.paramsSubject.next(r.params),function uQ(e,t){if(e.length!==t.length)return!1;for(let r=0;rXr(r.parameters,t[i].parameters))}(e.url,t.url);return r&&!(!e.parent!=!t.parent)&&(!e.parent||L_(e.parent,t.parent))}function G2(e){return"string"==typeof e.title||null===e.title}let F_=(()=>{class e{constructor(){this.activated=null,this._activatedRoute=null,this.name=ge,this.activateEvents=new rn,this.deactivateEvents=new rn,this.attachEvents=new rn,this.detachEvents=new rn,this.parentContexts=P(xu),this.location=P(or),this.changeDetector=P(Uf),this.environmentInjector=P(gn),this.inputBinder=P(Ip,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(r){if(r.name){const{firstChange:i,previousValue:s}=r.name;if(i)return;this.isTrackedInParentContexts(s)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(s)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(r){return this.parentContexts.getContext(r)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const r=this.parentContexts.getContext(this.name);r?.route&&(r.attachRef?this.attach(r.attachRef,r.route):this.activateWith(r.route,r.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new M(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new M(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new M(4012,!1);this.location.detach();const r=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(r.instance),r}attach(r,i){this.activated=r,this._activatedRoute=i,this.location.insert(r.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(r.instance)}deactivate(){if(this.activated){const r=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(r)}}activateWith(r,i){if(this.isActivated)throw new M(4013,!1);this._activatedRoute=r;const s=this.location,a=r.snapshot.component,c=this.parentContexts.getOrCreateContext(this.name).children,l=new B_(r,c,s.injector);this.activated=s.createComponent(a,{index:s.length,injector:l,environmentInjector:i??this.environmentInjector}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275dir=Xt({type:e,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[Ms]})}return e})();class B_{__ngOutletInjector(t){return new B_(this.route,this.childContexts,t)}constructor(t,r,i){this.route=t,this.childContexts=r,this.parent=i}get(t,r){return t===ac?this.route:t===xu?this.childContexts:this.parent.get(t,r)}}const Ip=new K("");let W2=(()=>{class e{constructor(){this.outletDataSubscriptions=new Map}bindActivatedRouteToOutletComponent(r){this.unsubscribeFromRouteData(r),this.subscribeToRouteData(r)}unsubscribeFromRouteData(r){this.outletDataSubscriptions.get(r)?.unsubscribe(),this.outletDataSubscriptions.delete(r)}subscribeToRouteData(r){const{activatedRoute:i}=r,s=v_([i.queryParams,i.params,i.data]).pipe(Jr(([o,a,c],l)=>(c={...o,...a,...c},0===l?ue(c):Promise.resolve(c)))).subscribe(o=>{if(!r.isActivated||!r.activatedComponentRef||r.activatedRoute!==i||null===i.component)return void this.unsubscribeFromRouteData(r);const a=function iV(e){const t=we(e);if(!t)return null;const r=new ll(t);return{get selector(){return r.selector},get type(){return r.componentType},get inputs(){return r.inputs},get outputs(){return r.outputs},get ngContentSelectors(){return r.ngContentSelectors},get isStandalone(){return t.standalone},get isSignal(){return t.signals}}}(i.component);if(a)for(const{templateName:c}of a.inputs)r.activatedComponentRef.setInput(c,o[c]);else this.unsubscribeFromRouteData(r)});this.outletDataSubscriptions.set(r,s)}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac})}return e})();function Au(e,t,r){if(r&&e.shouldReuseRoute(t.value,r.value.snapshot)){const i=r.value;i._futureSnapshot=t.value;const s=function KQ(e,t,r){return t.children.map(i=>{for(const s of r.children)if(e.shouldReuseRoute(i.value,s.value.snapshot))return Au(e,i,s);return Au(e,i)})}(e,t,r);return new vr(i,s)}{if(e.shouldAttach(t.value)){const o=e.retrieve(t.value);if(null!==o){const a=o.route;return a.value._futureSnapshot=t.value,a.children=t.children.map(c=>Au(e,c)),a}}const i=function QQ(e){return new ac(new jn(e.url),new jn(e.params),new jn(e.queryParams),new jn(e.fragment),new jn(e.data),e.outlet,e.component,e)}(t.value),s=t.children.map(o=>Au(e,o));return new vr(i,s)}}const Z2="ngNavigationCancelingError";function K2(e,t){const{redirectTo:r,navigationBehaviorOptions:i}=rc(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,s=Q2(!1,Fn.Redirect);return s.url=r,s.navigationBehaviorOptions=i,s}function Q2(e,t){const r=new Error(`NavigationCancelingError: ${e||""}`);return r[Z2]=!0,r.cancellationCode=t,r}function Y2(e){return!!e&&e[Z2]}let J2=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275cmp=So({type:e,selectors:[["ng-component"]],standalone:!0,features:[Mf],decls:1,vars:0,template:function(i,s){1&i&&mi(0,"router-outlet")},dependencies:[F_],encapsulation:2})}return e})();function U_(e){const t=e.children&&e.children.map(U_),r=t?{...e,children:t}:{...e};return!r.component&&!r.loadComponent&&(t||r.loadChildren)&&r.outlet&&r.outlet!==ge&&(r.component=J2),r}function ti(e){return e.outlet||ge}function Mu(e){if(!e)return null;if(e.routeConfig?._injector)return e.routeConfig._injector;for(let t=e.parent;t;t=t.parent){const r=t.routeConfig;if(r?._loadedInjector)return r._loadedInjector;if(r?._injector)return r._injector}return null}class iY{constructor(t,r,i,s,o){this.routeReuseStrategy=t,this.futureState=r,this.currState=i,this.forwardEvent=s,this.inputBindingEnabled=o}activate(t){const r=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(r,i,t),P_(this.futureState.root),this.activateChildRoutes(r,i,t)}deactivateChildRoutes(t,r,i){const s=oc(r);t.children.forEach(o=>{const a=o.value.outlet;this.deactivateRoutes(o,s[a],i),delete s[a]}),Object.values(s).forEach(o=>{this.deactivateRouteAndItsChildren(o,i)})}deactivateRoutes(t,r,i){const s=t.value,o=r?r.value:null;if(s===o)if(s.component){const a=i.getContext(s.outlet);a&&this.deactivateChildRoutes(t,r,a.children)}else this.deactivateChildRoutes(t,r,i);else o&&this.deactivateRouteAndItsChildren(r,i)}deactivateRouteAndItsChildren(t,r){t.value.component&&this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,r):this.deactivateRouteAndOutlet(t,r)}detachAndStoreRouteSubtree(t,r){const i=r.getContext(t.value.outlet),s=i&&t.value.component?i.children:r,o=oc(t);for(const a of Object.values(o))this.deactivateRouteAndItsChildren(a,s);if(i&&i.outlet){const a=i.outlet.detach(),c=i.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:a,route:t,contexts:c})}}deactivateRouteAndOutlet(t,r){const i=r.getContext(t.value.outlet),s=i&&t.value.component?i.children:r,o=oc(t);for(const a of Object.values(o))this.deactivateRouteAndItsChildren(a,s);i&&(i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated()),i.attachRef=null,i.route=null)}activateChildRoutes(t,r,i){const s=oc(r);t.children.forEach(o=>{this.activateRoutes(o,s[o.value.outlet],i),this.forwardEvent(new qQ(o.value.snapshot))}),t.children.length&&this.forwardEvent(new HQ(t.value.snapshot))}activateRoutes(t,r,i){const s=t.value,o=r?r.value:null;if(P_(s),s===o)if(s.component){const a=i.getOrCreateContext(s.outlet);this.activateChildRoutes(t,r,a.children)}else this.activateChildRoutes(t,r,i);else if(s.component){const a=i.getOrCreateContext(s.outlet);if(this.routeReuseStrategy.shouldAttach(s.snapshot)){const c=this.routeReuseStrategy.retrieve(s.snapshot);this.routeReuseStrategy.store(s.snapshot,null),a.children.onOutletReAttached(c.contexts),a.attachRef=c.componentRef,a.route=c.route.value,a.outlet&&a.outlet.attach(c.componentRef,c.route.value),P_(c.route.value),this.activateChildRoutes(t,null,a.children)}else{const c=Mu(s.snapshot);a.attachRef=null,a.route=s,a.injector=c,a.outlet&&a.outlet.activateWith(s,a.injector),this.activateChildRoutes(t,null,a.children)}}else this.activateChildRoutes(t,null,i)}}class X2{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class Tp{constructor(t,r){this.component=t,this.route=r}}function sY(e,t,r){const i=e._root;return Nu(i,t?t._root:null,r,[i.value])}function cc(e,t){const r=Symbol(),i=t.get(e,r);return i===r?"function"!=typeof e||function Fk(e){return null!==Ju(e)}(e)?t.get(e):e:i}function Nu(e,t,r,i,s={canDeactivateChecks:[],canActivateChecks:[]}){const o=oc(t);return e.children.forEach(a=>{(function aY(e,t,r,i,s={canDeactivateChecks:[],canActivateChecks:[]}){const o=e.value,a=t?t.value:null,c=r?r.getContext(e.value.outlet):null;if(a&&o.routeConfig===a.routeConfig){const l=function cY(e,t,r){if("function"==typeof r)return r(e,t);switch(r){case"pathParamsChange":return!uo(e.url,t.url);case"pathParamsOrQueryParamsChange":return!uo(e.url,t.url)||!Xr(e.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!L_(e,t)||!Xr(e.queryParams,t.queryParams);default:return!L_(e,t)}}(a,o,o.routeConfig.runGuardsAndResolvers);l?s.canActivateChecks.push(new X2(i)):(o.data=a.data,o._resolvedData=a._resolvedData),Nu(e,t,o.component?c?c.children:null:r,i,s),l&&c&&c.outlet&&c.outlet.isActivated&&s.canDeactivateChecks.push(new Tp(c.outlet.component,a))}else a&&Ru(t,c,s),s.canActivateChecks.push(new X2(i)),Nu(e,null,o.component?c?c.children:null:r,i,s)})(a,o[a.value.outlet],r,i.concat([a.value]),s),delete o[a.value.outlet]}),Object.entries(o).forEach(([a,c])=>Ru(c,r.getContext(a),s)),s}function Ru(e,t,r){const i=oc(e),s=e.value;Object.entries(i).forEach(([o,a])=>{Ru(a,s.component?t?t.children.getContext(o):null:t,r)}),r.canDeactivateChecks.push(new Tp(s.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,s))}function Ou(e){return"function"==typeof e}function eO(e){return e instanceof gp||"EmptyError"===e?.name}const xp=Symbol("INITIAL_VALUE");function lc(){return Jr(e=>v_(e.map(t=>t.pipe(Xa(1),function tQ(...e){const t=pp(e);return Nt((r,i)=>{(t?w_(e,r,t):w_(e,r)).subscribe(i)})}(xp)))).pipe(Ue(t=>{for(const r of t)if(!0!==r){if(r===xp)return xp;if(!1===r||r instanceof tc)return r}return!0}),ws(t=>t!==xp),Xa(1)))}function tO(e){return function Tk(...e){return qb(e)}(dn(t=>{if(rc(t))throw K2(0,t)}),Ue(t=>!0===t))}class j_{constructor(t){this.segmentGroup=t||null}}class $_ extends Error{constructor(t){super(),this.urlTree=t}}function uc(e){return Ja(new j_(e))}class TY{constructor(t,r){this.urlSerializer=t,this.urlTree=r}lineralizeSegments(t,r){let i=[],s=r.root;for(;;){if(i=i.concat(s.segments),0===s.numberOfChildren)return ue(i);if(s.numberOfChildren>1||!s.children[ge])return Ja(new M(4e3,!1));s=s.children[ge]}}applyRedirectCommands(t,r,i){const s=this.applyRedirectCreateUrlTree(r,this.urlSerializer.parse(r),t,i);if(r.startsWith("/"))throw new $_(s);return s}applyRedirectCreateUrlTree(t,r,i,s){const o=this.createSegmentGroup(t,r.root,i,s);return new tc(o,this.createQueryParams(r.queryParams,this.urlTree.queryParams),r.fragment)}createQueryParams(t,r){const i={};return Object.entries(t).forEach(([s,o])=>{if("string"==typeof o&&o.startsWith(":")){const c=o.substring(1);i[s]=r[c]}else i[s]=o}),i}createSegmentGroup(t,r,i,s){const o=this.createSegments(t,r.segments,i,s);let a={};return Object.entries(r.children).forEach(([c,l])=>{a[c]=this.createSegmentGroup(t,l,i,s)}),new Ve(o,a)}createSegments(t,r,i,s){return r.map(o=>o.path.startsWith(":")?this.findPosParam(t,o,s):this.findOrReturn(o,i))}findPosParam(t,r,i){const s=i[r.path.substring(1)];if(!s)throw new M(4001,!1);return s}findOrReturn(t,r){let i=0;for(const s of r){if(s.path===t.path)return r.splice(i),s;i++}return t}}const V_={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function xY(e,t,r,i,s){const o=H_(e,t,r);return o.matched?(i=function JQ(e,t){return e.providers&&!e._injector&&(e._injector=hf(e.providers,t,`Route: ${e.path}`)),e._injector??t}(t,i),function CY(e,t,r,i){const s=t.canMatch;return s&&0!==s.length?ue(s.map(a=>{const c=cc(a,e);return _s(function pY(e){return e&&Ou(e.canMatch)}(c)?c.canMatch(t,r):oi(e,()=>c(t,r)))})).pipe(lc(),tO()):ue(!0)}(i,t,r).pipe(Ue(a=>!0===a?o:{...V_}))):ue(o)}function H_(e,t,r){if("**"===t.path)return function AY(e){return{matched:!0,parameters:e.length>0?b2(e).parameters:{},consumedSegments:e,remainingSegments:[],positionalParamSegments:{}}}(r);if(""===t.path)return"full"===t.pathMatch&&(e.hasChildren()||r.length>0)?{...V_}:{matched:!0,consumedSegments:[],remainingSegments:r,parameters:{},positionalParamSegments:{}};const s=(t.matcher||lQ)(r,e,t);if(!s)return{...V_};const o={};Object.entries(s.posParams??{}).forEach(([c,l])=>{o[c]=l.path});const a=s.consumed.length>0?{...o,...s.consumed[s.consumed.length-1].parameters}:o;return{matched:!0,consumedSegments:s.consumed,remainingSegments:r.slice(s.consumed.length),parameters:a,positionalParamSegments:s.posParams??{}}}function nO(e,t,r,i){return r.length>0&&function RY(e,t,r){return r.some(i=>Ap(e,t,i)&&ti(i)!==ge)}(e,r,i)?{segmentGroup:new Ve(t,NY(i,new Ve(r,e.children))),slicedSegments:[]}:0===r.length&&function OY(e,t,r){return r.some(i=>Ap(e,t,i))}(e,r,i)?{segmentGroup:new Ve(e.segments,MY(e,r,i,e.children)),slicedSegments:r}:{segmentGroup:new Ve(e.segments,e.children),slicedSegments:r}}function MY(e,t,r,i){const s={};for(const o of r)if(Ap(e,t,o)&&!i[ti(o)]){const a=new Ve([],{});s[ti(o)]=a}return{...i,...s}}function NY(e,t){const r={};r[ge]=t;for(const i of e)if(""===i.path&&ti(i)!==ge){const s=new Ve([],{});r[ti(i)]=s}return r}function Ap(e,t,r){return(!(e.hasChildren()||t.length>0)||"full"!==r.pathMatch)&&""===r.path}class LY{}class UY{constructor(t,r,i,s,o,a,c){this.injector=t,this.configLoader=r,this.rootComponentType=i,this.config=s,this.urlTree=o,this.paramsInheritanceStrategy=a,this.urlSerializer=c,this.applyRedirects=new TY(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(t){return new M(4002,`'${t.segmentGroup}'`)}recognize(){const t=nO(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(t).pipe(Ue(r=>{const i=new O_([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},ge,this.rootComponentType,null,{}),s=new vr(i,r),o=new z2("",s),a=function AQ(e,t,r=null,i=null){return O2(R2(e),t,r,i)}(i,[],this.urlTree.queryParams,this.urlTree.fragment);return a.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(a),this.inheritParamsAndData(o._root,null),{state:o,tree:a}}))}match(t){return this.processSegmentGroup(this.injector,this.config,t,ge).pipe(vs(i=>{if(i instanceof $_)return this.urlTree=i.urlTree,this.match(i.urlTree.root);throw i instanceof j_?this.noMatchError(i):i}))}inheritParamsAndData(t,r){const i=t.value,s=R_(i,r,this.paramsInheritanceStrategy);i.params=Object.freeze(s.params),i.data=Object.freeze(s.data),t.children.forEach(o=>this.inheritParamsAndData(o,i))}processSegmentGroup(t,r,i,s){return 0===i.segments.length&&i.hasChildren()?this.processChildren(t,r,i):this.processSegment(t,r,i,i.segments,s,!0).pipe(Ue(o=>o instanceof vr?[o]:[]))}processChildren(t,r,i){const s=[];for(const o of Object.keys(i.children))"primary"===o?s.unshift(o):s.push(o);return Ft(s).pipe(bu(o=>{const a=i.children[o],c=function nY(e,t){const r=e.filter(i=>ti(i)===t);return r.push(...e.filter(i=>ti(i)!==t)),r}(r,o);return this.processSegmentGroup(t,c,a,o)}),function iQ(e,t){return Nt(function rQ(e,t,r,i,s){return(o,a)=>{let c=r,l=t,u=0;o.subscribe(_t(a,d=>{const f=u++;l=c?e(l,d,f):(c=!0,d),i&&a.next(l)},s&&(()=>{c&&a.next(l),a.complete()})))}}(e,t,arguments.length>=2,!0))}((o,a)=>(o.push(...a),o)),mp(null),function sQ(e,t){const r=arguments.length>=2;return i=>i.pipe(e?ws((s,o)=>e(s,o,i)):Cs,b_(1),r?mp(t):w2(()=>new gp))}(),Yt(o=>{if(null===o)return uc(i);const a=rO(o);return function jY(e){e.sort((t,r)=>t.value.outlet===ge?-1:r.value.outlet===ge?1:t.value.outlet.localeCompare(r.value.outlet))}(a),ue(a)}))}processSegment(t,r,i,s,o,a){return Ft(r).pipe(bu(c=>this.processSegmentAgainstRoute(c._injector??t,r,c,i,s,o,a).pipe(vs(l=>{if(l instanceof j_)return ue(null);throw l}))),lo(c=>!!c),vs(c=>{if(eO(c))return function PY(e,t,r){return 0===t.length&&!e.children[r]}(i,s,o)?ue(new LY):uc(i);throw c}))}processSegmentAgainstRoute(t,r,i,s,o,a,c){return function kY(e,t,r,i){return!!(ti(e)===i||i!==ge&&Ap(t,r,e))&&H_(t,e,r).matched}(i,s,o,a)?void 0===i.redirectTo?this.matchSegmentAgainstRoute(t,s,i,o,a):this.allowRedirects&&c?this.expandSegmentAgainstRouteUsingRedirect(t,s,r,i,o,a):uc(s):uc(s)}expandSegmentAgainstRouteUsingRedirect(t,r,i,s,o,a){const{matched:c,consumedSegments:l,positionalParamSegments:u,remainingSegments:d}=H_(r,s,o);if(!c)return uc(r);s.redirectTo.startsWith("/")&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>31&&(this.allowRedirects=!1));const f=this.applyRedirects.applyRedirectCommands(l,s.redirectTo,u);return this.applyRedirects.lineralizeSegments(s,f).pipe(Yt(h=>this.processSegment(t,i,r,h.concat(d),a,!1)))}matchSegmentAgainstRoute(t,r,i,s,o){const a=xY(r,i,s,t);return"**"===i.path&&(r.children={}),a.pipe(Jr(c=>c.matched?this.getChildConfig(t=i._injector??t,i,s).pipe(Jr(({routes:l})=>{const u=i._loadedInjector??t,{consumedSegments:d,remainingSegments:f,parameters:h}=c,p=new O_(d,h,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,function VY(e){return e.data||{}}(i),ti(i),i.component??i._loadedComponent??null,i,function HY(e){return e.resolve||{}}(i)),{segmentGroup:g,slicedSegments:m}=nO(r,d,f,l);if(0===m.length&&g.hasChildren())return this.processChildren(u,l,g).pipe(Ue(v=>null===v?null:new vr(p,v)));if(0===l.length&&0===m.length)return ue(new vr(p,[]));const y=ti(i)===o;return this.processSegment(u,l,g,m,y?ge:o,!0).pipe(Ue(v=>new vr(p,v instanceof vr?[v]:[])))})):uc(r)))}getChildConfig(t,r,i){return r.children?ue({routes:r.children,injector:t}):r.loadChildren?void 0!==r._loadedRoutes?ue({routes:r._loadedRoutes,injector:r._loadedInjector}):function DY(e,t,r,i){const s=t.canLoad;return void 0===s||0===s.length?ue(!0):ue(s.map(a=>{const c=cc(a,e);return _s(function uY(e){return e&&Ou(e.canLoad)}(c)?c.canLoad(t,r):oi(e,()=>c(t,r)))})).pipe(lc(),tO())}(t,r,i).pipe(Yt(s=>s?this.configLoader.loadChildren(t,r).pipe(dn(o=>{r._loadedRoutes=o.routes,r._loadedInjector=o.injector})):function IY(e){return Ja(Q2(!1,Fn.GuardRejected))}())):ue({routes:[],injector:t})}}function $Y(e){const t=e.value.routeConfig;return t&&""===t.path}function rO(e){const t=[],r=new Set;for(const i of e){if(!$Y(i)){t.push(i);continue}const s=t.find(o=>i.value.routeConfig===o.value.routeConfig);void 0!==s?(s.children.push(...i.children),r.add(s)):t.push(i)}for(const i of r){const s=rO(i.children);t.push(new vr(i.value,s))}return t.filter(i=>!r.has(i))}function iO(e){const t=e.children.map(r=>iO(r)).flat();return[e,...t]}function z_(e){return Jr(t=>{const r=e(t);return r?Ft(r).pipe(Ue(()=>t)):ue(t)})}let sO=(()=>{class e{buildTitle(r){let i,s=r.root;for(;void 0!==s;)i=this.getResolvedTitleForRoute(s)??i,s=s.children.find(o=>o.outlet===ge);return i}getResolvedTitleForRoute(r){return r.data[Eu]}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=z({token:e,factory:()=>P(KY),providedIn:"root"})}return e})(),KY=(()=>{class e extends sO{constructor(r){super(),this.title=r}updateTitle(r){const i=this.buildTitle(r);void 0!==i&&this.title.setTitle(i)}static#e=this.\u0275fac=function(i){return new(i||e)(G(MH))};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const dc=new K("",{providedIn:"root",factory:()=>({})}),fc=new K("");let q_=(()=>{class e{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=P(H1)}loadComponent(r){if(this.componentLoaders.get(r))return this.componentLoaders.get(r);if(r._loadedComponent)return ue(r._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(r);const i=_s(r.loadComponent()).pipe(Ue(oO),dn(o=>{this.onLoadEndListener&&this.onLoadEndListener(r),r._loadedComponent=o}),vu(()=>{this.componentLoaders.delete(r)})),s=new v2(i,()=>new ot).pipe(__());return this.componentLoaders.set(r,s),s}loadChildren(r,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return ue({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);const o=function QY(e,t,r,i){return _s(e.loadChildren()).pipe(Ue(oO),Yt(s=>s instanceof tI||Array.isArray(s)?ue(s):Ft(t.compileModuleAsync(s))),Ue(s=>{i&&i(e);let o,a,c=!1;return Array.isArray(s)?(a=s,!0):(o=s.create(r).injector,a=o.get(fc,[],{optional:!0,self:!0}).flat()),{routes:a.map(U_),injector:o}}))}(i,this.compiler,r,this.onLoadEndListener).pipe(vu(()=>{this.childrenLoaders.delete(i)})),a=new v2(o,()=>new ot).pipe(__());return this.childrenLoaders.set(i,a),a}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function oO(e){return function YY(e){return e&&"object"==typeof e&&"default"in e}(e)?e.default:e}let G_=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=z({token:e,factory:()=>P(JY),providedIn:"root"})}return e})(),JY=(()=>{class e{shouldProcessUrl(r){return!0}extract(r){return r}merge(r,i){return r}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const aO=new K(""),cO=new K("");function XY(e,t,r){const i=e.get(cO),s=e.get(Wt);return e.get(Ne).runOutsideAngular(()=>{if(!s.startViewTransition||i.skipNextTransition)return i.skipNextTransition=!1,new Promise(u=>setTimeout(u));let o;const a=new Promise(u=>{o=u}),c=s.startViewTransition(()=>(o(),function eJ(e){return new Promise(t=>{uy(t,{injector:e})})}(e))),{onViewTransitionCreated:l}=i;return l&&oi(e,()=>l({transition:c,from:t,to:r})),a})}let Mp=(()=>{class e{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new ot,this.transitionAbortSubject=new ot,this.configLoader=P(q_),this.environmentInjector=P(gn),this.urlSerializer=P(nc),this.rootContexts=P(xu),this.location=P(Ml),this.inputBindingEnabled=null!==P(Ip,{optional:!0}),this.titleStrategy=P(sO),this.options=P(dc,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=P(G_),this.createViewTransition=P(aO,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>ue(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=s=>this.events.next(new $Q(s)),this.configLoader.onLoadStartListener=s=>this.events.next(new jQ(s))}complete(){this.transitions?.complete()}handleNavigationRequest(r){const i=++this.navigationId;this.transitions?.next({...this.transitions.value,...r,id:i})}setupNavigations(r,i,s){return this.transitions=new jn({id:0,currentUrlTree:i,currentRawUrl:i,extractedUrl:this.urlHandlingStrategy.extract(i),urlAfterRedirects:this.urlHandlingStrategy.extract(i),rawUrl:i,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:Tu,restoredState:null,currentSnapshot:s.snapshot,targetSnapshot:null,currentRouterState:s,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(ws(o=>0!==o.id),Ue(o=>({...o,extractedUrl:this.urlHandlingStrategy.extract(o.rawUrl)})),Jr(o=>{let a=!1,c=!1;return ue(o).pipe(Jr(l=>{if(this.navigationId>o.id)return this.cancelNavigationTransition(o,"",Fn.SupersededByNewNavigation),Yr;this.currentTransition=o,this.currentNavigation={id:l.id,initialUrl:l.rawUrl,extractedUrl:l.extractedUrl,trigger:l.source,extras:l.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null};const u=!r.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl();if(!u&&"reload"!==(l.extras.onSameUrlNavigation??r.onSameUrlNavigation)){const f="";return this.events.next(new sc(l.id,this.urlSerializer.serialize(l.rawUrl),f,Cp.IgnoredSameUrlNavigation)),l.resolve(null),Yr}if(this.urlHandlingStrategy.shouldProcessUrl(l.rawUrl))return ue(l).pipe(Jr(f=>{const h=this.transitions?.getValue();return this.events.next(new Dp(f.id,this.urlSerializer.serialize(f.extractedUrl),f.source,f.restoredState)),h!==this.transitions?.getValue()?Yr:Promise.resolve(f)}),function zY(e,t,r,i,s,o){return Yt(a=>function FY(e,t,r,i,s,o,a="emptyOnly"){return new UY(e,t,r,i,s,a,o).recognize()}(e,t,r,i,a.extractedUrl,s,o).pipe(Ue(({state:c,tree:l})=>({...a,targetSnapshot:c,urlAfterRedirects:l}))))}(this.environmentInjector,this.configLoader,this.rootComponentType,r.config,this.urlSerializer,this.paramsInheritanceStrategy),dn(f=>{o.targetSnapshot=f.targetSnapshot,o.urlAfterRedirects=f.urlAfterRedirects,this.currentNavigation={...this.currentNavigation,finalUrl:f.urlAfterRedirects};const h=new U2(f.id,this.urlSerializer.serialize(f.extractedUrl),this.urlSerializer.serialize(f.urlAfterRedirects),f.targetSnapshot);this.events.next(h)}));if(u&&this.urlHandlingStrategy.shouldProcessUrl(l.currentRawUrl)){const{id:f,extractedUrl:h,source:p,restoredState:g,extras:m}=l,y=new Dp(f,this.urlSerializer.serialize(h),p,g);this.events.next(y);const v=H2(this.rootComponentType).snapshot;return this.currentTransition=o={...l,targetSnapshot:v,urlAfterRedirects:h,extras:{...m,skipLocationChange:!1,replaceUrl:!1}},this.currentNavigation.finalUrl=h,ue(o)}{const f="";return this.events.next(new sc(l.id,this.urlSerializer.serialize(l.extractedUrl),f,Cp.IgnoredByUrlHandlingStrategy)),l.resolve(null),Yr}}),dn(l=>{const u=new LQ(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(u)}),Ue(l=>(this.currentTransition=o={...l,guards:sY(l.targetSnapshot,l.currentSnapshot,this.rootContexts)},o)),function gY(e,t){return Yt(r=>{const{targetSnapshot:i,currentSnapshot:s,guards:{canActivateChecks:o,canDeactivateChecks:a}}=r;return 0===a.length&&0===o.length?ue({...r,guardsResult:!0}):function mY(e,t,r,i){return Ft(e).pipe(Yt(s=>function EY(e,t,r,i,s){const o=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return o&&0!==o.length?ue(o.map(c=>{const l=Mu(t)??s,u=cc(c,l);return _s(function hY(e){return e&&Ou(e.canDeactivate)}(u)?u.canDeactivate(e,t,r,i):oi(l,()=>u(e,t,r,i))).pipe(lo())})).pipe(lc()):ue(!0)}(s.component,s.route,r,t,i)),lo(s=>!0!==s,!0))}(a,i,s,e).pipe(Yt(c=>c&&function lY(e){return"boolean"==typeof e}(c)?function yY(e,t,r,i){return Ft(t).pipe(bu(s=>w_(function wY(e,t){return null!==e&&t&&t(new VQ(e)),ue(!0)}(s.route.parent,i),function vY(e,t){return null!==e&&t&&t(new zQ(e)),ue(!0)}(s.route,i),function bY(e,t,r){const i=t[t.length-1],o=t.slice(0,t.length-1).reverse().map(a=>function oY(e){const t=e.routeConfig?e.routeConfig.canActivateChild:null;return t&&0!==t.length?{node:e,guards:t}:null}(a)).filter(a=>null!==a).map(a=>y2(()=>ue(a.guards.map(l=>{const u=Mu(a.node)??r,d=cc(l,u);return _s(function fY(e){return e&&Ou(e.canActivateChild)}(d)?d.canActivateChild(i,e):oi(u,()=>d(i,e))).pipe(lo())})).pipe(lc())));return ue(o).pipe(lc())}(e,s.path,r),function _Y(e,t,r){const i=t.routeConfig?t.routeConfig.canActivate:null;if(!i||0===i.length)return ue(!0);const s=i.map(o=>y2(()=>{const a=Mu(t)??r,c=cc(o,a);return _s(function dY(e){return e&&Ou(e.canActivate)}(c)?c.canActivate(t,e):oi(a,()=>c(t,e))).pipe(lo())}));return ue(s).pipe(lc())}(e,s.route,r))),lo(s=>!0!==s,!0))}(i,o,e,t):ue(c)),Ue(c=>({...r,guardsResult:c})))})}(this.environmentInjector,l=>this.events.next(l)),dn(l=>{if(o.guardsResult=l.guardsResult,rc(l.guardsResult))throw K2(0,l.guardsResult);const u=new FQ(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot,!!l.guardsResult);this.events.next(u)}),ws(l=>!!l.guardsResult||(this.cancelNavigationTransition(l,"",Fn.GuardRejected),!1)),z_(l=>{if(l.guards.canActivateChecks.length)return ue(l).pipe(dn(u=>{const d=new BQ(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(d)}),Jr(u=>{let d=!1;return ue(u).pipe(function qY(e,t){return Yt(r=>{const{targetSnapshot:i,guards:{canActivateChecks:s}}=r;if(!s.length)return ue(r);const o=new Set(s.map(l=>l.route)),a=new Set;for(const l of o)if(!a.has(l))for(const u of iO(l))a.add(u);let c=0;return Ft(a).pipe(bu(l=>o.has(l)?function GY(e,t,r,i){const s=e.routeConfig,o=e._resolve;return void 0!==s?.title&&!G2(s)&&(o[Eu]=s.title),function WY(e,t,r,i){const s=E_(e);if(0===s.length)return ue({});const o={};return Ft(s).pipe(Yt(a=>function ZY(e,t,r,i){const s=Mu(t)??i,o=cc(e,s);return _s(o.resolve?o.resolve(t,r):oi(s,()=>o(t,r)))}(e[a],t,r,i).pipe(lo(),dn(c=>{o[a]=c}))),b_(1),function oQ(e){return Ue(()=>e)}(o),vs(a=>eO(a)?Yr:Ja(a)))}(o,e,t,i).pipe(Ue(a=>(e._resolvedData=a,e.data=R_(e,e.parent,r).resolve,null)))}(l,i,e,t):(l.data=R_(l,l.parent,e).resolve,ue(void 0))),dn(()=>c++),b_(1),Yt(l=>c===a.size?ue(r):Yr))})}(this.paramsInheritanceStrategy,this.environmentInjector),dn({next:()=>d=!0,complete:()=>{d||this.cancelNavigationTransition(u,"",Fn.NoDataFromResolver)}}))}),dn(u=>{const d=new UQ(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(d)}))}),z_(l=>{const u=d=>{const f=[];d.routeConfig?.loadComponent&&!d.routeConfig._loadedComponent&&f.push(this.configLoader.loadComponent(d.routeConfig).pipe(dn(h=>{d.component=h}),Ue(()=>{})));for(const h of d.children)f.push(...u(h));return f};return v_(u(l.targetSnapshot.root)).pipe(mp(null),Xa(1))}),z_(()=>this.afterPreactivation()),Jr(()=>{const{currentSnapshot:l,targetSnapshot:u}=o,d=this.createViewTransition?.(this.environmentInjector,l.root,u.root);return d?Ft(d).pipe(Ue(()=>o)):ue(o)}),Ue(l=>{const u=function ZQ(e,t,r){const i=Au(e,t._root,r?r._root:void 0);return new V2(i,t)}(r.routeReuseStrategy,l.targetSnapshot,l.currentRouterState);return this.currentTransition=o={...l,targetRouterState:u},this.currentNavigation.targetRouterState=u,o}),dn(()=>{this.events.next(new x_)}),((e,t,r,i)=>Ue(s=>(new iY(t,s.targetRouterState,s.currentRouterState,r,i).activate(e),s)))(this.rootContexts,r.routeReuseStrategy,l=>this.events.next(l),this.inputBindingEnabled),Xa(1),dn({next:l=>{a=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new Ri(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects))),this.titleStrategy?.updateTitle(l.targetRouterState.snapshot),l.resolve(!0)},complete:()=>{a=!0}}),function aQ(e){return Nt((t,r)=>{Kr(e).subscribe(_t(r,()=>r.complete(),Qp)),!r.closed&&t.subscribe(r)})}(this.transitionAbortSubject.pipe(dn(l=>{throw l}))),vu(()=>{!a&&!c&&this.cancelNavigationTransition(o,"",Fn.SupersededByNewNavigation),this.currentTransition?.id===o.id&&(this.currentNavigation=null,this.currentTransition=null)}),vs(l=>{if(c=!0,Y2(l))this.events.next(new ic(o.id,this.urlSerializer.serialize(o.extractedUrl),l.message,l.cancellationCode)),function YQ(e){return Y2(e)&&rc(e.url)}(l)?this.events.next(new A_(l.url)):o.resolve(!1);else{this.events.next(new Sp(o.id,this.urlSerializer.serialize(o.extractedUrl),l,o.targetSnapshot??void 0));try{o.resolve(r.errorHandler(l))}catch(u){this.options.resolveNavigationPromiseOnError?o.resolve(!1):o.reject(u)}}return Yr}))}))}cancelNavigationTransition(r,i,s){const o=new ic(r.id,this.urlSerializer.serialize(r.extractedUrl),i,s);this.events.next(o),r.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){return this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))).toString()!==this.currentTransition?.extractedUrl.toString()&&!this.currentTransition?.extras.skipLocationChange}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function tJ(e){return e!==Tu}let nJ=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=z({token:e,factory:()=>P(iJ),providedIn:"root"})}return e})();class rJ{shouldDetach(t){return!1}store(t,r){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,r){return t.routeConfig===r.routeConfig}}let iJ=(()=>{class e extends rJ{static#e=this.\u0275fac=(()=>{let r;return function(s){return(r||(r=nm(e)))(s||e)}})();static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),lO=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=z({token:e,factory:()=>P(sJ),providedIn:"root"})}return e})(),sJ=(()=>{class e extends lO{constructor(){super(...arguments),this.location=P(Ml),this.urlSerializer=P(nc),this.options=P(dc,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=P(G_),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new tc,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=H2(null),this.stateMemento=this.createStateMemento()}getCurrentUrlTree(){return this.currentUrlTree}getRawUrlTree(){return this.rawUrlTree}restoredState(){return this.location.getState()}get browserPageId(){return"computed"!==this.canceledNavigationResolution?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}getRouterState(){return this.routerState}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(r){return this.location.subscribe(i=>{"popstate"===i.type&&r(i.url,i.state)})}handleRouterEvent(r,i){if(r instanceof Dp)this.stateMemento=this.createStateMemento();else if(r instanceof sc)this.rawUrlTree=i.initialUrl;else if(r instanceof U2){if("eager"===this.urlUpdateStrategy&&!i.extras.skipLocationChange){const s=this.urlHandlingStrategy.merge(i.finalUrl,i.initialUrl);this.setBrowserUrl(s,i)}}else r instanceof x_?(this.currentUrlTree=i.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(i.finalUrl,i.initialUrl),this.routerState=i.targetRouterState,"deferred"===this.urlUpdateStrategy&&(i.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,i))):r instanceof ic&&(r.code===Fn.GuardRejected||r.code===Fn.NoDataFromResolver)?this.restoreHistory(i):r instanceof Sp?this.restoreHistory(i,!0):r instanceof Ri&&(this.lastSuccessfulId=r.id,this.currentPageId=this.browserPageId)}setBrowserUrl(r,i){const s=this.urlSerializer.serialize(r);if(this.location.isCurrentPathEqualTo(s)||i.extras.replaceUrl){const a={...i.extras.state,...this.generateNgRouterState(i.id,this.browserPageId)};this.location.replaceState(s,"",a)}else{const o={...i.extras.state,...this.generateNgRouterState(i.id,this.browserPageId+1)};this.location.go(s,"",o)}}restoreHistory(r,i=!1){if("computed"===this.canceledNavigationResolution){const o=this.currentPageId-this.browserPageId;0!==o?this.location.historyGo(o):this.currentUrlTree===r.finalUrl&&0===o&&(this.resetState(r),this.resetUrlToCurrentUrlTree())}else"replace"===this.canceledNavigationResolution&&(i&&this.resetState(r),this.resetUrlToCurrentUrlTree())}resetState(r){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,r.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(r,i){return"computed"===this.canceledNavigationResolution?{navigationId:r,\u0275routerPageId:i}:{navigationId:r}}static#e=this.\u0275fac=(()=>{let r;return function(s){return(r||(r=nm(e)))(s||e)}})();static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var ku=function(e){return e[e.COMPLETE=0]="COMPLETE",e[e.FAILED=1]="FAILED",e[e.REDIRECTING=2]="REDIRECTING",e}(ku||{});function uO(e,t){e.events.pipe(ws(r=>r instanceof Ri||r instanceof ic||r instanceof Sp||r instanceof sc),Ue(r=>r instanceof Ri||r instanceof sc?ku.COMPLETE:r instanceof ic&&(r.code===Fn.Redirect||r.code===Fn.SupersededByNewNavigation)?ku.REDIRECTING:ku.FAILED),ws(r=>r!==ku.REDIRECTING),Xa(1)).subscribe(()=>{t()})}function oJ(e){throw e}const aJ={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},cJ={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let wr=(()=>{class e{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}constructor(){this.disposed=!1,this.isNgZoneEnabled=!1,this.console=P(O1),this.stateManager=P(lO),this.options=P(dc,{optional:!0})||{},this.pendingTasks=P(Ko),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=P(Mp),this.urlSerializer=P(nc),this.location=P(Ml),this.urlHandlingStrategy=P(G_),this._events=new ot,this.errorHandler=this.options.errorHandler||oJ,this.navigated=!1,this.routeReuseStrategy=P(nJ),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=P(fc,{optional:!0})?.flat()??[],this.componentInputBindingEnabled=!!P(Ip,{optional:!0}),this.eventsSubscription=new Rt,this.isNgZoneEnabled=P(Ne)instanceof Ne&&Ne.isInAngularZone(),this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:r=>{this.console.warn(r)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){const r=this.navigationTransitions.events.subscribe(i=>{try{const s=this.navigationTransitions.currentTransition,o=this.navigationTransitions.currentNavigation;if(null!==s&&null!==o)if(this.stateManager.handleRouterEvent(i,o),i instanceof ic&&i.code!==Fn.Redirect&&i.code!==Fn.SupersededByNewNavigation)this.navigated=!0;else if(i instanceof Ri)this.navigated=!0;else if(i instanceof A_){const a=this.urlHandlingStrategy.merge(i.url,s.currentRawUrl),c={info:s.extras.info,skipLocationChange:s.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy||tJ(s.source)};this.scheduleNavigation(a,Tu,null,c,{resolve:s.resolve,reject:s.reject,promise:s.promise})}(function uJ(e){return!(e instanceof x_||e instanceof A_)})(i)&&this._events.next(i)}catch(s){this.navigationTransitions.transitionAbortSubject.next(s)}});this.eventsSubscription.add(r)}resetRootComponentType(r){this.routerState.root.component=r,this.navigationTransitions.rootComponentType=r}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),Tu,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((r,i)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(r,"popstate",i)},0)})}navigateToSyncWithBrowser(r,i,s){const o={replaceUrl:!0},a=s?.navigationId?s:null;if(s){const l={...s};delete l.navigationId,delete l.\u0275routerPageId,0!==Object.keys(l).length&&(o.state=l)}const c=this.parseUrl(r);this.scheduleNavigation(c,i,a,o)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(r){this.config=r.map(U_),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(r,i={}){const{relativeTo:s,queryParams:o,fragment:a,queryParamsHandling:c,preserveFragment:l}=i,u=l?this.currentUrlTree.fragment:a;let f,d=null;switch(c){case"merge":d={...this.currentUrlTree.queryParams,...o};break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=o||null}null!==d&&(d=this.removeEmptyProps(d));try{f=R2(s?s.snapshot:this.routerState.snapshot.root)}catch{("string"!=typeof r[0]||!r[0].startsWith("/"))&&(r=[]),f=this.currentUrlTree.root}return O2(f,r,d,u??null)}navigateByUrl(r,i={skipLocationChange:!1}){const s=rc(r)?r:this.parseUrl(r),o=this.urlHandlingStrategy.merge(s,this.rawUrlTree);return this.scheduleNavigation(o,Tu,null,i)}navigate(r,i={skipLocationChange:!1}){return function lJ(e){for(let t=0;t(null!=o&&(i[s]=o),i),{})}scheduleNavigation(r,i,s,o,a){if(this.disposed)return Promise.resolve(!1);let c,l,u;a?(c=a.resolve,l=a.reject,u=a.promise):u=new Promise((f,h)=>{c=f,l=h});const d=this.pendingTasks.add();return uO(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(d))}),this.navigationTransitions.handleNavigationRequest({source:i,restoredState:s,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:r,extras:o,resolve:c,reject:l,promise:u,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),u.catch(f=>Promise.reject(f))}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();class dO{}let hJ=(()=>{class e{constructor(r,i,s,o,a){this.router=r,this.injector=s,this.preloadingStrategy=o,this.loader=a}setUpPreloading(){this.subscription=this.router.events.pipe(ws(r=>r instanceof Ri),bu(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(r,i){const s=[];for(const o of i){o.providers&&!o._injector&&(o._injector=hf(o.providers,r,`Route: ${o.path}`));const a=o._injector??r,c=o._loadedInjector??a;(o.loadChildren&&!o._loadedRoutes&&void 0===o.canLoad||o.loadComponent&&!o._loadedComponent)&&s.push(this.preloadConfig(a,o)),(o.children||o._loadedRoutes)&&s.push(this.processRoutes(c,o.children??o._loadedRoutes))}return Ft(s).pipe(_u())}preloadConfig(r,i){return this.preloadingStrategy.preload(i,()=>{let s;s=i.loadChildren&&void 0===i.canLoad?this.loader.loadChildren(r,i):ue(null);const o=s.pipe(Yt(a=>null===a?ue(void 0):(i._loadedRoutes=a.routes,i._loadedInjector=a.injector,this.processRoutes(a.injector??r,a.routes))));return i.loadComponent&&!i._loadedComponent?Ft([o,this.loader.loadComponent(i)]).pipe(_u()):o})}static#e=this.\u0275fac=function(i){return new(i||e)(G(wr),G(H1),G(gn),G(dO),G(q_))};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const Z_=new K("");let fO=(()=>{class e{constructor(r,i,s,o,a={}){this.urlSerializer=r,this.transitions=i,this.viewportScroller=s,this.zone=o,this.options=a,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},this.environmentInjector=P(gn),a.scrollPositionRestoration||="disabled",a.anchorScrolling||="disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(r=>{r instanceof Dp?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=r.navigationTrigger,this.restoredId=r.restoredState?r.restoredState.navigationId:0):r instanceof Ri?(this.lastId=r.id,this.scheduleScrollEvent(r,this.urlSerializer.parse(r.urlAfterRedirects).fragment)):r instanceof sc&&r.code===Cp.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(r,this.urlSerializer.parse(r.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(r=>{r instanceof j2&&(r.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(r.position):r.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(r.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(r,i){var s=this;this.zone.runOutsideAngular($(function*(){yield new Promise(o=>{setTimeout(()=>{o()}),uy(()=>{o()},{injector:s.environmentInjector})}),s.zone.run(()=>{s.transitions.events.next(new j2(r,"popstate"===s.lastSource?s.store[s.restoredId]:null,i))})}))}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static#e=this.\u0275fac=function(i){!function LC(){throw new Error("invalid")}()};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac})}return e})();function ni(e,t){return{\u0275kind:e,\u0275providers:t}}function pO(){const e=P(qt);return t=>{const r=e.get(Br);if(t!==r.components[0])return;const i=e.get(wr),s=e.get(gO);1===e.get(K_)&&i.initialNavigation(),e.get(mO,null,Ee.Optional)?.setUpPreloading(),e.get(Z_,null,Ee.Optional)?.init(),i.resetRootComponentType(r.componentTypes[0]),s.closed||(s.next(),s.complete(),s.unsubscribe())}}const gO=new K("",{factory:()=>new ot}),K_=new K("",{providedIn:"root",factory:()=>1}),mO=new K("");function yJ(e){return ni(0,[{provide:mO,useExisting:hJ},{provide:dO,useExisting:e}])}function wJ(e){return ni(9,[{provide:aO,useValue:XY},{provide:cO,useValue:{skipNextTransition:!!e?.skipInitialTransition,...e}}])}const yO=new K("ROUTER_FORROOT_GUARD"),_J=[Ml,{provide:nc,useClass:D_},wr,xu,{provide:ac,useFactory:function hO(e){return e.routerState.root},deps:[wr]},q_,[]];let vO=(()=>{class e{constructor(r){}static forRoot(r,i){return{ngModule:e,providers:[_J,[],{provide:fc,multi:!0,useValue:r},{provide:yO,useFactory:CJ,deps:[[wr,new rd,new id]]},{provide:dc,useValue:i||{}},i?.useHash?{provide:qs,useClass:lV}:{provide:qs,useClass:Ox},{provide:Z_,useFactory:()=>{const e=P(M5),t=P(Ne),r=P(dc),i=P(Mp),s=P(nc);return r.scrollOffset&&e.setOffset(r.scrollOffset),new fO(s,i,e,t,r)}},i?.preloadingStrategy?yJ(i.preloadingStrategy).\u0275providers:[],i?.initialNavigation?SJ(i):[],i?.bindToComponentInputs?ni(8,[W2,{provide:Ip,useExisting:W2}]).\u0275providers:[],i?.enableViewTransitions?wJ().\u0275providers:[],[{provide:wO,useFactory:pO},{provide:fv,multi:!0,useExisting:wO}]]}}static forChild(r){return{ngModule:e,providers:[{provide:fc,multi:!0,useValue:r}]}}static#e=this.\u0275fac=function(i){return new(i||e)(G(yO,8))};static#t=this.\u0275mod=pn({type:e});static#r=this.\u0275inj=Jt({})}return e})();function CJ(e){return"guarded"}function SJ(e){return["disabled"===e.initialNavigation?ni(3,[{provide:uv,multi:!0,useFactory:()=>{const t=P(wr);return()=>{t.setUpLocationChangeListener()}}},{provide:K_,useValue:2}]).\u0275providers:[],"enabledBlocking"===e.initialNavigation?ni(2,[{provide:K_,useValue:0},{provide:uv,multi:!0,deps:[qt],useFactory:t=>{const r=t.get(aV,Promise.resolve());return()=>r.then(()=>new Promise(i=>{const s=t.get(wr),o=t.get(gO);uO(s,()=>{i(!0)}),t.get(Mp).afterPreactivation=()=>(i(!0),o.closed?ue(void 0):o),s.initialNavigation()}))}}]).\u0275providers:[]]}const wO=new K("");var Oi=function(e){return e.STRANGE="STRANGE",e.YOU="YOU",e}(Oi||{}),ki=function(e){return e.CONNECTED="CONNECTED",e.UP_TO_DISCONNECT="UP_TO_DISCONNECT",e.DISCONNECTED="DISCONNECTED",e.SEARCHING_STRANGER="SEARCHING_STRANGER",e}(ki||{});let TJ=(()=>{class e{constructor(){this.authorTypes={[Oi.STRANGE]:"Stranger",[Oi.YOU]:"You"}}transform(r){return this.authorTypes[r]}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275pipe=en({name:"author",type:e,pure:!0})}return e})();const xJ=["conversation"];function AJ(e,t){1&e&&(Le(0,"div",18),at(1," You're now chatting with a random stranger. "),Qe())}function MJ(e,t){1&e&&(Le(0,"div",18),at(1," Looking for someone you can chat with. "),Qe())}function NJ(e,t){if(1&e&&(Le(0,"div",19)(1,"span"),at(2),function m1(e,t){const r=De();let i;const s=e+fe;r.firstCreatePass?(i=function Wj(e,t){if(t)for(let r=t.length-1;r>=0;r--){const i=t[r];if(e===i.name)return i}}(t,r.pipeRegistry),r.data[s]=i,i.onDestroy&&(r.destroyHooks??=[]).push(s,i.onDestroy)):i=r.data[s];const o=i.factory||(i.factory=Ss(i.type)),c=fn(X);try{const l=Dd(!1),u=o();return Dd(l),function mj(e,t,r,i){r>=e.data.length&&(e.data[r]=null,e.blueprint[r]=null),t[r]=i}(r,N(),s,u),u}finally{fn(c)}}(3,"author"),Qe(),Le(4,"span",20),at(5),Qe()()),2&e){const r=t.$implicit,i=It();Ie(),Uy("authorStranger",r.author===i.authorStrange)("authorYou",r.author===i.authorYou),Ie(),Fr("",y1(3,6,r.author),": "),Ie(3),Af(r.text)}}function RJ(e,t){1&e&&(Le(0,"div",18),at(1," Stranger is typing... "),Qe())}function OJ(e,t){1&e&&(Le(0,"div",18),at(1,"Stranger has disconnected."),Qe())}function kJ(e,t){1&e&&(Le(0,"div",18),at(1,"You have disconnected."),Qe())}function PJ(e,t){if(1&e&&(ha(0),Hn(1,OJ,2,0,"div",9)(2,kJ,2,0,"div",9),pa()),2&e){const r=It();Ie(),Ke("ngIf",r.whoDisconnected===r.authorStrange),Ie(),Ke("ngIf",r.whoDisconnected===r.authorYou)}}function LJ(e,t){if(1&e){const r=Vs();Le(0,"button",21),kn("click",function(){return ci(r),li(It().findStranger())}),at(1," Start "),Qe()}if(2&e){const r=It();kr("disabled",r.currentState===r.stateSearchingStranger?"disabled":null)}}function FJ(e,t){if(1&e){const r=Vs();Le(0,"button",22),kn("click",function(){ci(r);const s=It();return li(s.currentState=s.stateUpToDisconnect)}),at(1," Stop "),Qe()}}function BJ(e,t){if(1&e){const r=Vs();Le(0,"button",23),kn("click",function(){ci(r);const s=It(),o=xf(19);return s.disconnect(),li(s.cleanMessageField(o))}),at(1," Really? "),Qe()}}const UJ=[{path:"chat",component:(()=>{class e{constructor(r,i){this.findStrangerProxy=r,this.talkToStrangerNostr=i,this.stateConnected=ki.CONNECTED,this.stateUpToDisconnect=ki.UP_TO_DISCONNECT,this.stateDisconnected=ki.DISCONNECTED,this.stateSearchingStranger=ki.SEARCHING_STRANGER,this.authorStrange=Oi.STRANGE,this.authorYou=Oi.YOU,this.typingTimeoutAmount=2e3,this.typingTimeoutId=0,this.currentOnline=1,this.strangeIsTyping=!1,this.currentState=ki.DISCONNECTED,this.whoDisconnected=null,this.you=null,this.stranger=null,this.messages=[],this.subscriptions=new Rt}ngOnInit(){this.subscriptions.add(this.talkToStrangerNostr.listenCurrenOnlineUsers().subscribe(r=>this.currentOnline=r||1))}ngOnDestroy(){this.subscriptions.unsubscribe()}onBeforeUnload(){var r=this;return $(function*(){return yield r.disconnect(),!0})()}findStranger(){this.whoDisconnected=null,this.currentState=this.stateSearchingStranger,this.messages=[];const r=this.you=this.findStrangerProxy.connect();console.info((new Date).toLocaleString(),"me: ",r.pubkey),this.findStrangerProxy.searchStranger(this.you).then(i=>this.startConversation(r,i)).catch(i=>console.error((new Date).toLocaleString(),i))}disconnect(){return this.you?(this.stranger=null,this.findStrangerProxy.disconnect(this.you).then(()=>(this.currentState=ki.DISCONNECTED,this.strangeIsTyping=!1,this.whoDisconnected||(this.whoDisconnected=Oi.YOU),Promise.resolve()))):Promise.resolve()}startConversation(r,i){console.log((new Date).toLocaleString(),"starting conversation, stranger: ",i),this.stranger=i,this.currentState=ki.CONNECTED,1===this.currentOnline&&(this.currentOnline=2),this.subscriptions.add(this.talkToStrangerNostr.listenMessages(r,i).subscribe({next:s=>this.addMessageFromStranger(r,i,s)})),this.subscriptions.add(this.talkToStrangerNostr.listenStrangerStatus(i).subscribe({next:s=>this.handleStrangerStatus(s)}))}addMessageFromStranger(r,i,s){this.talkToStrangerNostr.openEncryptedDirectMessage(r,i,s).then(o=>{this.messages.push({text:o,author:Oi.STRANGE,time:s.created_at}),this.scrollConversationToTheEnd()})}handleStrangerStatus(r){"typing"===r.content?(this.strangeIsTyping=!0,this.scrollConversationToTheEnd()):"disconnected"===r.content?(this.strangeIsTyping=!1,this.whoDisconnected=Oi.STRANGE,this.currentState=ki.DISCONNECTED,this.disconnect()):this.strangeIsTyping=!1}sendMessage(r){const i=this.you,s=this.stranger;i&&s&&r.length&&(this.talkToStrangerNostr.sendMessage(i,s,r),this.messages.push({author:Oi.YOU,text:r,time:Math.floor((new Date).getTime()/1e3)}),this.scrollConversationToTheEnd())}scrollConversationToTheEnd(){setTimeout(()=>{const r=this.conversationEl.nativeElement;r.scrollTo({top:r.scrollHeight,behavior:"smooth"})})}cleanMessageField(r){setTimeout(()=>r.value="")}onTyping(){const r=this.you;r&&(this.typingTimeoutId||this.talkToStrangerNostr.isTyping(r),clearTimeout(this.typingTimeoutId),this.typingTimeoutId=Number(setTimeout(()=>{this.talkToStrangerNostr.stopTyping(r),this.typingTimeoutId=0},this.typingTimeoutAmount)))}static#e=this.\u0275fac=function(i){return new(i||e)(X(d2),X(f2))};static#t=this.\u0275cmp=So({type:e,selectors:[["omg-chat"]],viewQuery:function(i,s){if(1&i&&function VT(e,t,r){RS(e,t,r)}(xJ,5),2&i){let o;(function Qy(e){const t=N(),r=De(),i=Wg();wd(i+1);const s=by(r,i);if(e.dirty&&function GP(e){return!(4&~e[ee])}(t)===!(2&~s.metadata.flags)){if(null===s.matches)e.reset([]);else{const o=PS(t,i);e.reset(o,bD),e.notifyOnChanges()}return!0}return!1})(o=Yy())&&(s.conversationEl=o.first)}},hostBindings:function(i,s){1&i&&kn("beforeunload",function(){return s.onBeforeUnload()},0,gC)},decls:23,vars:11,consts:[["conversation",""],["messageField",""],["send",""],[1,"navbar"],["src","./assets/logo.png","alt","logo",1,"logo"],[1,"description"],[1,"online"],[1,"main"],[1,"conversation"],["class","message",4,"ngIf"],["class","chat",4,"ngFor","ngForOf"],[4,"ngIf"],["novalidate","","autocomplete","off",1,"form"],["type","button","class","btn start bottomLeftRadius",3,"click",4,"ngIf"],["type","button","class","btn bottomLeftRadius",3,"click",4,"ngIf"],["type","button","class","btn bottomLeftRadius bold",3,"click",4,"ngIf"],["name","text",1,"textarea",3,"keydown.enter","keydown"],["type","button",1,"btn","bottomRightRadius",3,"click"],[1,"message"],[1,"chat"],[1,"text"],["type","button",1,"btn","start","bottomLeftRadius",3,"click"],["type","button",1,"btn","bottomLeftRadius",3,"click"],["type","button",1,"btn","bottomLeftRadius","bold",3,"click"]],template:function(i,s){if(1&i){const o=Vs();Le(0,"section",3),mi(1,"img",4),Le(2,"h2",5),at(3,"Talk to strangers!"),Qe(),Le(4,"h2",6),at(5),Qe()(),Le(6,"main",7)(7,"section",8,0),Hn(9,AJ,2,0,"div",9)(10,MJ,2,0,"div",9)(11,NJ,6,8,"div",10)(12,RJ,2,0,"div",9)(13,PJ,3,2,"ng-container",11),Qe(),Le(14,"form",12),Hn(15,LJ,2,1,"button",13)(16,FJ,2,0,"button",14)(17,BJ,2,0,"button",15),Le(18,"textarea",16,1),kn("keydown.enter",function(){ci(o);const c=xf(19);return s.sendMessage(c.value),li(s.cleanMessageField(c))})("keydown",function(){return ci(o),li(s.onTyping())}),Qe(),Le(20,"button",17,2),kn("click",function(){ci(o);const c=xf(19);return s.sendMessage(c.value),li(s.cleanMessageField(c))}),at(22," Send "),Qe()()()}2&i&&(Ie(5),Af(s.currentOnline),Ie(4),Ke("ngIf",s.stranger),Ie(),Ke("ngIf",!s.stranger&&s.currentState===s.stateSearchingStranger),Ie(),Ke("ngForOf",s.messages),Ie(),Ke("ngIf",s.strangeIsTyping),Ie(),Ke("ngIf",s.currentState===s.stateDisconnected),Ie(2),Ke("ngIf",s.currentState===s.stateDisconnected||s.currentState===s.stateSearchingStranger),Ie(),Ke("ngIf",s.currentState===s.stateConnected),Ie(),Ke("ngIf",s.currentState===s.stateUpToDisconnect),Ie(),kr("disabled",s.currentState===s.stateDisconnected||s.currentState===s.stateSearchingStranger?"disabled":null),Ie(2),kr("disabled",s.currentState===s.stateDisconnected||s.currentState===s.stateSearchingStranger?"disabled":null))},dependencies:[qx,sh,TJ],encapsulation:2})}return e})()},{path:"",redirectTo:"chat",pathMatch:"full"}];let jJ=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=pn({type:e});static#r=this.\u0275inj=Jt({imports:[vO.forRoot(UJ,{useHash:!0}),vO]})}return e})(),Q_=(()=>{class e extends ot{constructor(){super()}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var ce=function(e){return e[e.State=0]="State",e[e.Transition=1]="Transition",e[e.Sequence=2]="Sequence",e[e.Group=3]="Group",e[e.Animate=4]="Animate",e[e.Keyframes=5]="Keyframes",e[e.Style=6]="Style",e[e.Trigger=7]="Trigger",e[e.Reference=8]="Reference",e[e.AnimateChild=9]="AnimateChild",e[e.AnimateRef=10]="AnimateRef",e[e.Query=11]="Query",e[e.Stagger=12]="Stagger",e}(ce||{});const Pi="*";function $J(e,t){return{type:ce.Trigger,name:e,definitions:t,options:{}}}function _O(e,t=null){return{type:ce.Animate,styles:t,timings:e}}function Pu(e){return{type:ce.Style,styles:e,offset:null}}function Y_(e,t,r){return{type:ce.State,name:e,styles:t,options:r}}function bO(e,t,r=null){return{type:ce.Transition,expr:e,animation:t,options:r}}class Lu{constructor(t=0,r=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=t+r}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._originalOnStartFns.push(t),this._onStartFns.push(t)}onDone(t){this._originalOnDoneFns.push(t),this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(t){this._position=this.totalTime?t*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(t){const r="start"==t?this._onStartFns:this._onDoneFns;r.forEach(i=>i()),r.length=0}}class EO{constructor(t){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;let r=0,i=0,s=0;const o=this.players.length;0==o?queueMicrotask(()=>this._onFinish()):this.players.forEach(a=>{a.onDone(()=>{++r==o&&this._onFinish()}),a.onDestroy(()=>{++i==o&&this._onDestroy()}),a.onStart(()=>{++s==o&&this._onStart()})}),this.totalTime=this.players.reduce((a,c)=>Math.max(a,c.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){const r=t*this.totalTime;this.players.forEach(i=>{const s=i.totalTime?Math.min(1,r/i.totalTime):1;i.setPosition(s)})}getPosition(){const t=this.players.reduce((r,i)=>null===r||i.totalTime>r.totalTime?i:r,null);return null!=t?t.getPosition():0}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){const r="start"==t?this._onStartFns:this._onDoneFns;r.forEach(i=>i()),r.length=0}}const DO=["toast-component",""];function WJ(e,t){if(1&e){const r=Vs();Le(0,"button",5),kn("click",function(){return ci(r),li(It().remove())}),Le(1,"span",6),at(2,"\xd7"),Qe()()}}function ZJ(e,t){if(1&e&&(ha(0),at(1),pa()),2&e){const r=It(2);Ie(),Fr("[",r.duplicatesCount+1,"]")}}function KJ(e,t){if(1&e&&(Le(0,"div"),at(1),Hn(2,ZJ,2,1,"ng-container",4),Qe()),2&e){const r=It();gi(r.options.titleClass),kr("aria-label",r.title),Ie(),Fr(" ",r.title," "),Ie(),Ke("ngIf",r.duplicatesCount)}}function QJ(e,t){if(1&e&&mi(0,"div",7),2&e){const r=It();gi(r.options.messageClass),Ke("innerHTML",r.message,xm)}}function YJ(e,t){if(1&e&&(Le(0,"div",8),at(1),Qe()),2&e){const r=It();gi(r.options.messageClass),kr("aria-label",r.message),Ie(),Fr(" ",r.message," ")}}function JJ(e,t){if(1&e&&(Le(0,"div"),mi(1,"div",9),Qe()),2&e){const r=It();Ie(),fa("width",r.width()+"%")}}class sX{_attachedHost;component;viewContainerRef;injector;constructor(t,r){this.component=t,this.injector=r}attach(t,r){return this._attachedHost=t,t.attach(this,r)}detach(){const t=this._attachedHost;if(t)return this._attachedHost=void 0,t.detach()}get isAttached(){return null!=this._attachedHost}setAttachedHost(t){this._attachedHost=t}}class oX{_attachedPortal;_disposeFn;attach(t,r){return this._attachedPortal=t,this.attachComponentPortal(t,r)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(t){this._disposeFn=t}}class aX{_overlayRef;componentInstance;duplicatesCount=0;_afterClosed=new ot;_activate=new ot;_manualClose=new ot;_resetTimeout=new ot;_countDuplicate=new ot;constructor(t){this._overlayRef=t}manualClose(){this._manualClose.next(),this._manualClose.complete()}manualClosed(){return this._manualClose.asObservable()}timeoutReset(){return this._resetTimeout.asObservable()}countDuplicate(){return this._countDuplicate.asObservable()}close(){this._overlayRef.detach(),this._afterClosed.next(),this._manualClose.next(),this._afterClosed.complete(),this._manualClose.complete(),this._activate.complete(),this._resetTimeout.complete(),this._countDuplicate.complete()}afterClosed(){return this._afterClosed.asObservable()}isInactive(){return this._activate.isStopped}activate(){this._activate.next(),this._activate.complete()}afterActivate(){return this._activate.asObservable()}onDuplicate(t,r){t&&this._resetTimeout.next(),r&&this._countDuplicate.next(++this.duplicatesCount)}}class Np{toastId;config;message;title;toastType;toastRef;_onTap=new ot;_onAction=new ot;constructor(t,r,i,s,o,a){this.toastId=t,this.config=r,this.message=i,this.title=s,this.toastType=o,this.toastRef=a,this.toastRef.afterClosed().subscribe(()=>{this._onAction.complete(),this._onTap.complete()})}triggerTap(){this._onTap.next(),this.config.tapToDismiss&&this._onTap.complete()}onTap(){return this._onTap.asObservable()}triggerAction(t){this._onAction.next(t)}onAction(){return this._onAction.asObservable()}}const SO=new K("ToastConfig");class cX extends oX{_hostDomElement;_componentFactoryResolver;_appRef;constructor(t,r,i){super(),this._hostDomElement=t,this._componentFactoryResolver=r,this._appRef=i}attachComponentPortal(t,r){const i=this._componentFactoryResolver.resolveComponentFactory(t.component);let s;return s=i.create(t.injector),this._appRef.attachView(s.hostView),this.setDisposeFn(()=>{this._appRef.detachView(s.hostView),s.destroy()}),r?this._hostDomElement.insertBefore(this._getComponentRootNode(s),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(s)),s}_getComponentRootNode(t){return t.hostView.rootNodes[0]}}let lX=(()=>{class e{_document=P(Wt);_containerElement;ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){const r=this._document.createElement("div");r.classList.add("overlay-container"),r.setAttribute("aria-live","polite"),this._document.body.appendChild(r),this._containerElement=r}static \u0275fac=function(i){return new(i||e)};static \u0275prov=z({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();class uX{_portalHost;constructor(t){this._portalHost=t}attach(t,r=!0){return this._portalHost.attach(t,r)}detach(){return this._portalHost.detach()}}let dX=(()=>{class e{_overlayContainer=P(lX);_componentFactoryResolver=P(sl);_appRef=P(Br);_document=P(Wt);_paneElements=new Map;create(r,i){return this._createOverlayRef(this.getPaneElement(r,i))}getPaneElement(r="",i){return this._paneElements.get(i)||this._paneElements.set(i,{}),this._paneElements.get(i)[r]||(this._paneElements.get(i)[r]=this._createPaneElement(r,i)),this._paneElements.get(i)[r]}_createPaneElement(r,i){const s=this._document.createElement("div");return s.id="toast-container",s.classList.add(r),s.classList.add("toast-container"),i?i.getContainerElement().appendChild(s):this._overlayContainer.getContainerElement().appendChild(s),s}_createPortalHost(r){return new cX(r,this._componentFactoryResolver,this._appRef)}_createOverlayRef(r){return new uX(this._createPortalHost(r))}static \u0275fac=function(i){return new(i||e)};static \u0275prov=z({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),X_=(()=>{class e{overlay;_injector;sanitizer;ngZone;toastrConfig;currentlyActive=0;toasts=[];overlayContainer;previousToastMessage;index=0;constructor(r,i,s,o,a){this.overlay=i,this._injector=s,this.sanitizer=o,this.ngZone=a,this.toastrConfig={...r.default,...r.config},r.config.iconClasses&&(this.toastrConfig.iconClasses={...r.default.iconClasses,...r.config.iconClasses})}show(r,i,s={},o=""){return this._preBuildNotification(o,r,i,this.applyConfig(s))}success(r,i,s={}){return this._preBuildNotification(this.toastrConfig.iconClasses.success||"",r,i,this.applyConfig(s))}error(r,i,s={}){return this._preBuildNotification(this.toastrConfig.iconClasses.error||"",r,i,this.applyConfig(s))}info(r,i,s={}){return this._preBuildNotification(this.toastrConfig.iconClasses.info||"",r,i,this.applyConfig(s))}warning(r,i,s={}){return this._preBuildNotification(this.toastrConfig.iconClasses.warning||"",r,i,this.applyConfig(s))}clear(r){for(const i of this.toasts)if(void 0!==r){if(i.toastId===r)return void i.toastRef.manualClose()}else i.toastRef.manualClose()}remove(r){const i=this._findToast(r);if(!i||(i.activeToast.toastRef.close(),this.toasts.splice(i.index,1),this.currentlyActive=this.currentlyActive-1,!this.toastrConfig.maxOpened||!this.toasts.length))return!1;if(this.currentlyActivethis._buildNotification(r,i,s,o)):this._buildNotification(r,i,s,o)}_buildNotification(r,i,s,o){if(!o.toastComponent)throw new Error("toastComponent required");const a=this.findDuplicate(s,i,this.toastrConfig.resetTimeoutOnDuplicate&&o.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&s||i)&&this.toastrConfig.preventDuplicates&&null!==a)return a;this.previousToastMessage=i;let c=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(c=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));const l=this.overlay.create(o.positionClass,this.overlayContainer);this.index=this.index+1;let u=i;i&&o.enableHtml&&(u=this.sanitizer.sanitize(Nn.HTML,i));const d=new aX(l),f=new Np(this.index,o,u,s,r,d),p=qt.create({providers:[{provide:Np,useValue:f}],parent:this._injector}),g=new sX(o.toastComponent,p),m=l.attach(g,o.newestOnTop);d.componentInstance=m.instance;const y={toastId:this.index,title:s||"",message:i||"",toastRef:d,onShown:d.afterActivate(),onHidden:d.afterClosed(),onTap:f.onTap(),onAction:f.onAction(),portal:m};return c||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{y.toastRef.activate()})),this.toasts.push(y),y}static \u0275fac=function(i){return new(i||e)(G(SO),G(dX),G(qt),G(bA),G(Ne))};static \u0275prov=z({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const fX={maxOpened:0,autoDismiss:!1,newestOnTop:!0,preventDuplicates:!1,countDuplicates:!1,resetTimeoutOnDuplicate:!1,includeTitleDuplicates:!1,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},closeButton:!1,disableTimeOut:!1,timeOut:5e3,extendedTimeOut:1e3,enableHtml:!1,progressBar:!1,toastClass:"ngx-toastr",positionClass:"toast-top-right",titleClass:"toast-title",messageClass:"toast-message",easing:"ease-in",easeTime:300,tapToDismiss:!0,onActivateTick:!1,progressAnimation:"decreasing",toastComponent:(()=>{class e{toastrService;toastPackage;ngZone;message;title;options;duplicatesCount;originalTimeout;width=ul(-1);toastClasses="";state;get _state(){return this.state()}get displayStyle(){if("inactive"===this.state().value)return"none"}timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(r,i,s){this.toastrService=r,this.toastPackage=i,this.ngZone=s,this.message=i.message,this.title=i.title,this.options=i.config,this.originalTimeout=i.config.timeOut,this.toastClasses=`${i.toastType} ${i.config.toastClass}`,this.sub=i.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=i.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=i.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=i.toastRef.countDuplicate().subscribe(o=>{this.duplicatesCount=o}),this.state=ul({value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.update(r=>({...r,value:"active"})),!0!==this.options.disableTimeOut&&"timeOut"!==this.options.disableTimeOut&&this.options.timeOut&&(this.outsideTimeout(()=>this.remove(),this.options.timeOut),this.hideTime=(new Date).getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}updateProgress(){if(0===this.width()||100===this.width()||!this.options.timeOut)return;const r=(new Date).getTime();this.width.set((this.hideTime-r)/this.options.timeOut*100),"increasing"===this.options.progressAnimation&&this.width.update(s=>100-s),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.update(r=>({...r,value:"active"})),this.outsideTimeout(()=>this.remove(),this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=(new Date).getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10)}remove(){"removed"!==this.state().value&&(clearTimeout(this.timeout),this.state.update(r=>({...r,value:"removed"})),this.outsideTimeout(()=>this.toastrService.remove(this.toastPackage.toastId),+this.toastPackage.config.easeTime))}tapToast(){"removed"!==this.state().value&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){"removed"!==this.state().value&&"extendedTimeOut"!==this.options.disableTimeOut&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){!0===this.options.disableTimeOut||"extendedTimeOut"===this.options.disableTimeOut||0===this.options.extendedTimeOut||"removed"===this.state().value||(this.outsideTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=(new Date).getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}outsideTimeout(r,i){this.ngZone?this.ngZone.runOutsideAngular(()=>this.timeout=setTimeout(()=>this.runInsideAngular(r),i)):this.timeout=setTimeout(()=>r(),i)}outsideInterval(r,i){this.ngZone?this.ngZone.runOutsideAngular(()=>this.intervalId=setInterval(()=>this.runInsideAngular(r),i)):this.intervalId=setInterval(()=>r(),i)}runInsideAngular(r){this.ngZone?this.ngZone.run(()=>r()):r()}static \u0275fac=function(i){return new(i||e)(X(X_),X(Np),X(Ne))};static \u0275cmp=So({type:e,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(i,s){1&i&&kn("click",function(){return s.tapToast()})("mouseenter",function(){return s.stickAround()})("mouseleave",function(){return s.delayedHideToast()}),2&i&&(qy("@flyInOut",s._state),gi(s.toastClasses),fa("display",s.displayStyle))},standalone:!0,features:[Mf],attrs:DO,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(i,s){1&i&&Hn(0,WJ,3,0,"button",0)(1,KJ,3,5,"div",1)(2,QJ,1,3,"div",2)(3,YJ,2,4,"div",3)(4,JJ,2,2,"div",4),2&i&&(Ke("ngIf",s.options.closeButton),Ie(),Ke("ngIf",s.title),Ie(),Ke("ngIf",s.message&&s.options.enableHtml),Ie(),Ke("ngIf",s.message&&!s.options.enableHtml),Ie(),Ke("ngIf",s.options.progressBar))},dependencies:[sh],encapsulation:2,data:{animation:[$J("flyInOut",[Y_("inactive",Pu({opacity:0})),Y_("active",Pu({opacity:1})),Y_("removed",Pu({opacity:0})),bO("inactive => active",_O("{{ easeTime }}ms {{ easing }}")),bO("active => removed",_O("{{ easeTime }}ms {{ easing }}"))])]},changeDetection:0})}return e})()},hX=(e={})=>function Dc(e){return{\u0275providers:e}}([{provide:SO,useValue:{default:fX,config:e}}]);let pX=(()=>{class e{static forRoot(r={}){return{ngModule:e,providers:[hX(r)]}}static \u0275fac=function(i){return new(i||e)};static \u0275mod=pn({type:e});static \u0275inj=Jt({})}return e})(),gX=(()=>{class e{constructor(r,i){this.error$=r,this.toastrService=i,this.subscriptions=new Rt}ngOnInit(){this.subscriptions.add(this.error$.subscribe(r=>this.toastrService.error(r)))}ngOnDestroy(){this.subscriptions.unsubscribe()}static#e=this.\u0275fac=function(i){return new(i||e)(X(Q_),X(X_))};static#t=this.\u0275cmp=So({type:e,selectors:[["app-root"]],decls:1,vars:0,template:function(i,s){1&i&&mi(0,"router-outlet")},dependencies:[F_],encapsulation:2})}return e})(),mX=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=pn({type:e});static#r=this.\u0275inj=Jt({imports:[Ea]})}return e})(),yX=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=pn({type:e});static#r=this.\u0275inj=Jt({providers:[m_,fp],imports:[Ea]})}return e})();function IO(e){return new M(3e3,!1)}function bs(e){switch(e.length){case 0:return new Lu;case 1:return e[0];default:return new EO(e)}}function TO(e,t,r=new Map,i=new Map){const s=[],o=[];let a=-1,c=null;if(t.forEach(l=>{const u=l.get("offset"),d=u==a,f=d&&c||new Map;l.forEach((h,p)=>{let g=p,m=h;if("offset"!==p)switch(g=e.normalizePropertyName(g,s),m){case"!":m=r.get(p);break;case Pi:m=i.get(p);break;default:m=e.normalizeStyleValue(p,g,m,s)}f.set(g,m)}),d||o.push(f),c=f,a=u}),s.length)throw function jX(e){return new M(3502,!1)}();return o}function eb(e,t,r,i){switch(t){case"start":e.onStart(()=>i(r&&tb(r,"start",e)));break;case"done":e.onDone(()=>i(r&&tb(r,"done",e)));break;case"destroy":e.onDestroy(()=>i(r&&tb(r,"destroy",e)))}}function tb(e,t,r){const o=nb(e.element,e.triggerName,e.fromState,e.toState,t||e.phaseName,r.totalTime??e.totalTime,!!r.disabled),a=e._data;return null!=a&&(o._data=a),o}function nb(e,t,r,i,s="",o=0,a){return{element:e,triggerName:t,fromState:r,toState:i,phaseName:s,totalTime:o,disabled:!!a}}function Bn(e,t,r){let i=e.get(t);return i||e.set(t,i=r),i}function xO(e){const t=e.indexOf(":");return[e.substring(1,t),e.slice(t+1)]}const JX=typeof document>"u"?null:document.documentElement;function rb(e){const t=e.parentNode||e.host||null;return t===JX?null:t}let fo=null,AO=!1;function MO(e,t){for(;t;){if(t===e)return!0;t=rb(t)}return!1}function NO(e,t,r){if(r)return Array.from(e.querySelectorAll(t));const i=e.querySelector(t);return i?[i]:[]}let ib=(()=>{class e{validateStyleProperty(r){return function eee(e){fo||(fo=function tee(){return typeof document<"u"?document.body:null}()||{},AO=!!fo.style&&"WebkitAppearance"in fo.style);let t=!0;return fo.style&&!function XX(e){return"ebkit"==e.substring(1,6)}(e)&&(t=e in fo.style,!t&&AO&&(t="Webkit"+e.charAt(0).toUpperCase()+e.slice(1)in fo.style)),t}(r)}matchesElement(r,i){return!1}containsElement(r,i){return MO(r,i)}getParentElement(r){return rb(r)}query(r,i,s){return NO(r,i,s)}computeStyle(r,i,s){return s||""}animate(r,i,s,o,a,c=[],l){return new Lu(s,o)}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac})}return e})();class sb{static#e=this.NOOP=new ib}class ob{}const ree=1e3,ab="ng-enter",Rp="ng-leave",Op="ng-trigger",kp=".ng-trigger",OO="ng-animating",cb=".ng-animating";function Li(e){if("number"==typeof e)return e;const t=e.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:lb(parseFloat(t[1]),t[2])}function lb(e,t){return"s"===t?e*ree:e}function Pp(e,t,r){return e.hasOwnProperty("duration")?e:function see(e,t,r){let s,o=0,a="";if("string"==typeof e){const c=e.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===c)return t.push(IO()),{duration:0,delay:0,easing:""};s=lb(parseFloat(c[1]),c[2]);const l=c[3];null!=l&&(o=lb(parseFloat(l),c[4]));const u=c[5];u&&(a=u)}else s=e;if(!r){let c=!1,l=t.length;s<0&&(t.push(function vX(){return new M(3100,!1)}()),c=!0),o<0&&(t.push(function wX(){return new M(3101,!1)}()),c=!0),c&&t.splice(l,0,IO())}return{duration:s,delay:o,easing:a}}(e,t,r)}function ri(e,t,r){t.forEach((i,s)=>{const o=db(s);r&&!r.has(s)&&r.set(s,e.style[o]),e.style[o]=i})}function ho(e,t){t.forEach((r,i)=>{const s=db(i);e.style[s]=""})}function Fu(e){return Array.isArray(e)?1==e.length?e[0]:function VJ(e,t=null){return{type:ce.Sequence,steps:e,options:t}}(e):e}const ub=new RegExp("{{\\s*(.+?)\\s*}}","g");function PO(e){let t=[];if("string"==typeof e){let r;for(;r=ub.exec(e);)t.push(r[1]);ub.lastIndex=0}return t}function Bu(e,t,r){const i=`${e}`,s=i.replace(ub,(o,a)=>{let c=t[a];return null==c&&(r.push(function bX(e){return new M(3003,!1)}()),c=""),c.toString()});return s==i?e:s}const cee=/-+([a-z0-9])/g;function db(e){return e.replace(cee,(...t)=>t[1].toUpperCase())}function Un(e,t,r){switch(t.type){case ce.Trigger:return e.visitTrigger(t,r);case ce.State:return e.visitState(t,r);case ce.Transition:return e.visitTransition(t,r);case ce.Sequence:return e.visitSequence(t,r);case ce.Group:return e.visitGroup(t,r);case ce.Animate:return e.visitAnimate(t,r);case ce.Keyframes:return e.visitKeyframes(t,r);case ce.Style:return e.visitStyle(t,r);case ce.Reference:return e.visitReference(t,r);case ce.AnimateChild:return e.visitAnimateChild(t,r);case ce.AnimateRef:return e.visitAnimateRef(t,r);case ce.Query:return e.visitQuery(t,r);case ce.Stagger:return e.visitStagger(t,r);default:throw function EX(e){return new M(3004,!1)}()}}function fb(e,t){return window.getComputedStyle(e)[t]}const dee=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]);class LO extends ob{normalizePropertyName(t,r){return db(t)}normalizeStyleValue(t,r,i,s){let o="";const a=i.toString().trim();if(dee.has(r)&&0!==i&&"0"!==i)if("number"==typeof i)o="px";else{const c=i.match(/^[+-]?[\d\.]+([a-z]*)$/);c&&0==c[1].length&&s.push(function DX(e,t){return new M(3005,!1)}())}return a+o}}const Lp="*";const Fp=new Set(["true","1"]),Bp=new Set(["false","0"]);function FO(e,t){const r=Fp.has(e)||Bp.has(e),i=Fp.has(t)||Bp.has(t);return(s,o)=>{let a=e==Lp||e==s,c=t==Lp||t==o;return!a&&r&&"boolean"==typeof s&&(a=s?Fp.has(e):Bp.has(e)),!c&&i&&"boolean"==typeof o&&(c=o?Fp.has(t):Bp.has(t)),a&&c}}const gee=new RegExp("s*:selfs*,?","g");function hb(e,t,r,i){return new mee(e).build(t,r,i)}class mee{constructor(t){this._driver=t}build(t,r,i){const s=new wee(r);return this._resetContextStyleTimingState(s),Un(this,Fu(t),s)}_resetContextStyleTimingState(t){t.currentQuerySelector="",t.collectedStyles=new Map,t.collectedStyles.set("",new Map),t.currentTime=0}visitTrigger(t,r){let i=r.queryCount=0,s=r.depCount=0;const o=[],a=[];return"@"==t.name.charAt(0)&&r.errors.push(function CX(){return new M(3006,!1)}()),t.definitions.forEach(c=>{if(this._resetContextStyleTimingState(r),c.type==ce.State){const l=c,u=l.name;u.toString().split(/\s*,\s*/).forEach(d=>{l.name=d,o.push(this.visitState(l,r))}),l.name=u}else if(c.type==ce.Transition){const l=this.visitTransition(c,r);i+=l.queryCount,s+=l.depCount,a.push(l)}else r.errors.push(function SX(){return new M(3007,!1)}())}),{type:ce.Trigger,name:t.name,states:o,transitions:a,queryCount:i,depCount:s,options:null}}visitState(t,r){const i=this.visitStyle(t.styles,r),s=t.options&&t.options.params||null;if(i.containsDynamicStyles){const o=new Set,a=s||{};i.styles.forEach(c=>{c instanceof Map&&c.forEach(l=>{PO(l).forEach(u=>{a.hasOwnProperty(u)||o.add(u)})})}),o.size&&r.errors.push(function IX(e,t){return new M(3008,!1)}(0,o.values()))}return{type:ce.State,name:t.name,style:i,options:s?{params:s}:null}}visitTransition(t,r){r.queryCount=0,r.depCount=0;const i=Un(this,Fu(t.animation),r),s=function fee(e,t){const r=[];return"string"==typeof e?e.split(/\s*,\s*/).forEach(i=>function hee(e,t,r){if(":"==e[0]){const l=function pee(e,t){switch(e){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(r,i)=>parseFloat(i)>parseFloat(r);case":decrement":return(r,i)=>parseFloat(i) *"}}(e,r);if("function"==typeof l)return void t.push(l);e=l}const i=e.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return r.push(function PX(e){return new M(3015,!1)}()),t;const s=i[1],o=i[2],a=i[3];t.push(FO(s,a)),"<"==o[0]&&(s!=Lp||a!=Lp)&&t.push(FO(a,s))}(i,r,t)):r.push(e),r}(t.expr,r.errors);return{type:ce.Transition,matchers:s,animation:i,queryCount:r.queryCount,depCount:r.depCount,options:po(t.options)}}visitSequence(t,r){return{type:ce.Sequence,steps:t.steps.map(i=>Un(this,i,r)),options:po(t.options)}}visitGroup(t,r){const i=r.currentTime;let s=0;const o=t.steps.map(a=>{r.currentTime=i;const c=Un(this,a,r);return s=Math.max(s,r.currentTime),c});return r.currentTime=s,{type:ce.Group,steps:o,options:po(t.options)}}visitAnimate(t,r){const i=function bee(e,t){if(e.hasOwnProperty("duration"))return e;if("number"==typeof e)return pb(Pp(e,t).duration,0,"");const r=e;if(r.split(/\s+/).some(o=>"{"==o.charAt(0)&&"{"==o.charAt(1))){const o=pb(0,0,"");return o.dynamic=!0,o.strValue=r,o}const s=Pp(r,t);return pb(s.duration,s.delay,s.easing)}(t.timings,r.errors);r.currentAnimateTimings=i;let s,o=t.styles?t.styles:Pu({});if(o.type==ce.Keyframes)s=this.visitKeyframes(o,r);else{let a=t.styles,c=!1;if(!a){c=!0;const u={};i.easing&&(u.easing=i.easing),a=Pu(u)}r.currentTime+=i.duration+i.delay;const l=this.visitStyle(a,r);l.isEmptyStep=c,s=l}return r.currentAnimateTimings=null,{type:ce.Animate,timings:i,style:s,options:null}}visitStyle(t,r){const i=this._makeStyleAst(t,r);return this._validateStyleAst(i,r),i}_makeStyleAst(t,r){const i=[],s=Array.isArray(t.styles)?t.styles:[t.styles];for(let c of s)"string"==typeof c?c===Pi?i.push(c):r.errors.push(new M(3002,!1)):i.push(new Map(Object.entries(c)));let o=!1,a=null;return i.forEach(c=>{if(c instanceof Map&&(c.has("easing")&&(a=c.get("easing"),c.delete("easing")),!o))for(let l of c.values())if(l.toString().indexOf("{{")>=0){o=!0;break}}),{type:ce.Style,styles:i,easing:a,offset:t.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(t,r){const i=r.currentAnimateTimings;let s=r.currentTime,o=r.currentTime;i&&o>0&&(o-=i.duration+i.delay),t.styles.forEach(a=>{"string"!=typeof a&&a.forEach((c,l)=>{const u=r.collectedStyles.get(r.currentQuerySelector),d=u.get(l);let f=!0;d&&(o!=s&&o>=d.startTime&&s<=d.endTime&&(r.errors.push(function xX(e,t,r,i,s){return new M(3010,!1)}()),f=!1),o=d.startTime),f&&u.set(l,{startTime:o,endTime:s}),r.options&&function aee(e,t,r){const i=t.params||{},s=PO(e);s.length&&s.forEach(o=>{i.hasOwnProperty(o)||r.push(function _X(e){return new M(3001,!1)}())})}(c,r.options,r.errors)})})}visitKeyframes(t,r){const i={type:ce.Keyframes,styles:[],options:null};if(!r.currentAnimateTimings)return r.errors.push(function AX(){return new M(3011,!1)}()),i;let o=0;const a=[];let c=!1,l=!1,u=0;const d=t.steps.map(v=>{const w=this._makeStyleAst(v,r);let _=null!=w.offset?w.offset:function _ee(e){if("string"==typeof e)return null;let t=null;if(Array.isArray(e))e.forEach(r=>{if(r instanceof Map&&r.has("offset")){const i=r;t=parseFloat(i.get("offset")),i.delete("offset")}});else if(e instanceof Map&&e.has("offset")){const r=e;t=parseFloat(r.get("offset")),r.delete("offset")}return t}(w.styles),b=0;return null!=_&&(o++,b=w.offset=_),l=l||b<0||b>1,c=c||b0&&o{const _=h>0?w==p?1:h*w:a[w],b=_*y;r.currentTime=g+m.delay+b,m.duration=b,this._validateStyleAst(v,r),v.offset=_,i.styles.push(v)}),i}visitReference(t,r){return{type:ce.Reference,animation:Un(this,Fu(t.animation),r),options:po(t.options)}}visitAnimateChild(t,r){return r.depCount++,{type:ce.AnimateChild,options:po(t.options)}}visitAnimateRef(t,r){return{type:ce.AnimateRef,animation:this.visitReference(t.animation,r),options:po(t.options)}}visitQuery(t,r){const i=r.currentQuerySelector,s=t.options||{};r.queryCount++,r.currentQuery=t;const[o,a]=function yee(e){const t=!!e.split(/\s*,\s*/).find(r=>":self"==r);return t&&(e=e.replace(gee,"")),e=e.replace(/@\*/g,kp).replace(/@\w+/g,r=>kp+"-"+r.slice(1)).replace(/:animating/g,cb),[e,t]}(t.selector);r.currentQuerySelector=i.length?i+" "+o:o,Bn(r.collectedStyles,r.currentQuerySelector,new Map);const c=Un(this,Fu(t.animation),r);return r.currentQuery=null,r.currentQuerySelector=i,{type:ce.Query,selector:o,limit:s.limit||0,optional:!!s.optional,includeSelf:a,animation:c,originalSelector:t.selector,options:po(t.options)}}visitStagger(t,r){r.currentQuery||r.errors.push(function OX(){return new M(3013,!1)}());const i="full"===t.timings?{duration:0,delay:0,easing:"full"}:Pp(t.timings,r.errors,!0);return{type:ce.Stagger,animation:Un(this,Fu(t.animation),r),timings:i,options:null}}}class wee{constructor(t){this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}}function po(e){return e?(e={...e}).params&&(e.params=function vee(e){return e?{...e}:null}(e.params)):e={},e}function pb(e,t,r){return{duration:e,delay:t,easing:r}}function gb(e,t,r,i,s,o,a=null,c=!1){return{type:1,element:e,keyframes:t,preStyleProps:r,postStyleProps:i,duration:s,delay:o,totalTime:s+o,easing:a,subTimeline:c}}class Up{constructor(){this._map=new Map}get(t){return this._map.get(t)||[]}append(t,r){let i=this._map.get(t);i||this._map.set(t,i=[]),i.push(...r)}has(t){return this._map.has(t)}clear(){this._map.clear()}}const Cee=new RegExp(":enter","g"),Iee=new RegExp(":leave","g");function mb(e,t,r,i,s,o=new Map,a=new Map,c,l,u=[]){return(new Tee).buildKeyframes(e,t,r,i,s,o,a,c,l,u)}class Tee{buildKeyframes(t,r,i,s,o,a,c,l,u,d=[]){u=u||new Up;const f=new yb(t,r,u,s,o,d,[]);f.options=l;const h=l.delay?Li(l.delay):0;f.currentTimeline.delayNextStep(h),f.currentTimeline.setStyles([a],null,f.errors,l),Un(this,i,f);const p=f.timelines.filter(g=>g.containsAnimation());if(p.length&&c.size){let g;for(let m=p.length-1;m>=0;m--){const y=p[m];if(y.element===r){g=y;break}}g&&!g.allowOnlyTimelineStyles()&&g.setStyles([c],null,f.errors,l)}return p.length?p.map(g=>g.buildKeyframes()):[gb(r,[],[],[],0,h,"",!1)]}visitTrigger(t,r){}visitState(t,r){}visitTransition(t,r){}visitAnimateChild(t,r){const i=r.subInstructions.get(r.element);if(i){const s=r.createSubContext(t.options),o=r.currentTimeline.currentTime,a=this._visitSubInstructions(i,s,s.options);o!=a&&r.transformIntoNewTimeline(a)}r.previousNode=t}visitAnimateRef(t,r){const i=r.createSubContext(t.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([t.options,t.animation.options],r,i),this.visitReference(t.animation,i),r.transformIntoNewTimeline(i.currentTimeline.currentTime),r.previousNode=t}_applyAnimationRefDelays(t,r,i){for(const s of t){const o=s?.delay;if(o){const a="number"==typeof o?o:Li(Bu(o,s?.params??{},r.errors));i.delayNextStep(a)}}}_visitSubInstructions(t,r,i){let o=r.currentTimeline.currentTime;const a=null!=i.duration?Li(i.duration):null,c=null!=i.delay?Li(i.delay):null;return 0!==a&&t.forEach(l=>{const u=r.appendInstructionToTimeline(l,a,c);o=Math.max(o,u.duration+u.delay)}),o}visitReference(t,r){r.updateOptions(t.options,!0),Un(this,t.animation,r),r.previousNode=t}visitSequence(t,r){const i=r.subContextCount;let s=r;const o=t.options;if(o&&(o.params||o.delay)&&(s=r.createSubContext(o),s.transformIntoNewTimeline(),null!=o.delay)){s.previousNode.type==ce.Style&&(s.currentTimeline.snapshotCurrentStyles(),s.previousNode=jp);const a=Li(o.delay);s.delayNextStep(a)}t.steps.length&&(t.steps.forEach(a=>Un(this,a,s)),s.currentTimeline.applyStylesToKeyframe(),s.subContextCount>i&&s.transformIntoNewTimeline()),r.previousNode=t}visitGroup(t,r){const i=[];let s=r.currentTimeline.currentTime;const o=t.options&&t.options.delay?Li(t.options.delay):0;t.steps.forEach(a=>{const c=r.createSubContext(t.options);o&&c.delayNextStep(o),Un(this,a,c),s=Math.max(s,c.currentTimeline.currentTime),i.push(c.currentTimeline)}),i.forEach(a=>r.currentTimeline.mergeTimelineCollectedStyles(a)),r.transformIntoNewTimeline(s),r.previousNode=t}_visitTiming(t,r){if(t.dynamic){const i=t.strValue;return Pp(r.params?Bu(i,r.params,r.errors):i,r.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,r){const i=r.currentAnimateTimings=this._visitTiming(t.timings,r),s=r.currentTimeline;i.delay&&(r.incrementTime(i.delay),s.snapshotCurrentStyles());const o=t.style;o.type==ce.Keyframes?this.visitKeyframes(o,r):(r.incrementTime(i.duration),this.visitStyle(o,r),s.applyStylesToKeyframe()),r.currentAnimateTimings=null,r.previousNode=t}visitStyle(t,r){const i=r.currentTimeline,s=r.currentAnimateTimings;!s&&i.hasCurrentStyleProperties()&&i.forwardFrame();const o=s&&s.easing||t.easing;t.isEmptyStep?i.applyEmptyStep(o):i.setStyles(t.styles,o,r.errors,r.options),r.previousNode=t}visitKeyframes(t,r){const i=r.currentAnimateTimings,s=r.currentTimeline.duration,o=i.duration,c=r.createSubContext().currentTimeline;c.easing=i.easing,t.styles.forEach(l=>{c.forwardTime((l.offset||0)*o),c.setStyles(l.styles,l.easing,r.errors,r.options),c.applyStylesToKeyframe()}),r.currentTimeline.mergeTimelineCollectedStyles(c),r.transformIntoNewTimeline(s+o),r.previousNode=t}visitQuery(t,r){const i=r.currentTimeline.currentTime,s=t.options||{},o=s.delay?Li(s.delay):0;o&&(r.previousNode.type===ce.Style||0==i&&r.currentTimeline.hasCurrentStyleProperties())&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=jp);let a=i;const c=r.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!s.optional,r.errors);r.currentQueryTotal=c.length;let l=null;c.forEach((u,d)=>{r.currentQueryIndex=d;const f=r.createSubContext(t.options,u);o&&f.delayNextStep(o),u===r.element&&(l=f.currentTimeline),Un(this,t.animation,f),f.currentTimeline.applyStylesToKeyframe(),a=Math.max(a,f.currentTimeline.currentTime)}),r.currentQueryIndex=0,r.currentQueryTotal=0,r.transformIntoNewTimeline(a),l&&(r.currentTimeline.mergeTimelineCollectedStyles(l),r.currentTimeline.snapshotCurrentStyles()),r.previousNode=t}visitStagger(t,r){const i=r.parentContext,s=r.currentTimeline,o=t.timings,a=Math.abs(o.duration),c=a*(r.currentQueryTotal-1);let l=a*r.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":l=c-l;break;case"full":l=i.currentStaggerTime}const d=r.currentTimeline;l&&d.delayNextStep(l);const f=d.currentTime;Un(this,t.animation,r),r.previousNode=t,i.currentStaggerTime=s.currentTime-f+(s.startTime-i.currentTimeline.startTime)}}const jp={};class yb{constructor(t,r,i,s,o,a,c,l){this._driver=t,this.element=r,this.subInstructions=i,this._enterClassName=s,this._leaveClassName=o,this.errors=a,this.timelines=c,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=jp,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new $p(this._driver,r,0),c.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,r){if(!t)return;const i=t;let s=this.options;null!=i.duration&&(s.duration=Li(i.duration)),null!=i.delay&&(s.delay=Li(i.delay));const o=i.params;if(o){let a=s.params;a||(a=this.options.params={}),Object.keys(o).forEach(c=>{(!r||!a.hasOwnProperty(c))&&(a[c]=Bu(o[c],a,this.errors))})}}_copyOptions(){const t={};if(this.options){const r=this.options.params;if(r){const i=t.params={};Object.keys(r).forEach(s=>{i[s]=r[s]})}}return t}createSubContext(t=null,r,i){const s=r||this.element,o=new yb(this._driver,s,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(s,i||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(t),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(t){return this.previousNode=jp,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,r,i){const s={duration:r??t.duration,delay:this.currentTimeline.currentTime+(i??0)+t.delay,easing:""},o=new xee(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,s,t.stretchStartingKeyframe);return this.timelines.push(o),s}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,r,i,s,o,a){let c=[];if(s&&c.push(this.element),t.length>0){t=(t=t.replace(Cee,"."+this._enterClassName)).replace(Iee,"."+this._leaveClassName);let u=this._driver.query(this.element,t,1!=i);0!==i&&(u=i<0?u.slice(u.length+i,u.length):u.slice(0,i)),c.push(...u)}return!o&&0==c.length&&a.push(function kX(e){return new M(3014,!1)}()),c}}class $p{constructor(t,r,i,s){this._driver=t,this.element=r,this.startTime=i,this._elementTimelineStylesLookup=s,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(r),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(r,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(t){const r=1===this._keyframes.size&&this._pendingStyles.size;this.duration||r?(this.forwardTime(this.currentTime+t),r&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,r){return this.applyStylesToKeyframe(),new $p(this._driver,t,r||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,r){this._localTimelineStyles.set(t,r),this._globalTimelineStyles.set(t,r),this._styleSummary.set(t,{time:this.currentTime,value:r})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&this._previousKeyframe.set("easing",t);for(let[r,i]of this._globalTimelineStyles)this._backFill.set(r,i||Pi),this._currentKeyframe.set(r,Pi);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,r,i,s){r&&this._previousKeyframe.set("easing",r);const o=s&&s.params||{},a=function Aee(e,t){const r=new Map;let i;return e.forEach(s=>{if("*"===s){i??=t.keys();for(let o of i)r.set(o,Pi)}else for(let[o,a]of s)r.set(o,a)}),r}(t,this._globalTimelineStyles);for(let[c,l]of a){const u=Bu(l,o,i);this._pendingStyles.set(c,u),this._localTimelineStyles.has(c)||this._backFill.set(c,this._globalTimelineStyles.get(c)??Pi),this._updateStyle(c,u)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((t,r)=>{this._currentKeyframe.set(r,t)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((t,r)=>{this._currentKeyframe.has(r)||this._currentKeyframe.set(r,t)}))}snapshotCurrentStyles(){for(let[t,r]of this._localTimelineStyles)this._pendingStyles.set(t,r),this._updateStyle(t,r)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const t=[];for(let r in this._currentKeyframe)t.push(r);return t}mergeTimelineCollectedStyles(t){t._styleSummary.forEach((r,i)=>{const s=this._styleSummary.get(i);(!s||r.time>s.time)&&this._updateStyle(i,r.value)})}buildKeyframes(){this.applyStylesToKeyframe();const t=new Set,r=new Set,i=1===this._keyframes.size&&0===this.duration;let s=[];this._keyframes.forEach((c,l)=>{const u=new Map([...this._backFill,...c]);u.forEach((d,f)=>{"!"===d?t.add(f):d===Pi&&r.add(f)}),i||u.set("offset",l/this.duration),s.push(u)});const o=[...t.values()],a=[...r.values()];if(i){const c=s[0],l=new Map(c);c.set("offset",0),l.set("offset",1),s=[c,l]}return gb(this.element,s,o,a,this.duration,this.startTime,this.easing,!1)}}class xee extends $p{constructor(t,r,i,s,o,a,c=!1){super(t,r,a.delay),this.keyframes=i,this.preStyleProps=s,this.postStyleProps=o,this._stretchStartingKeyframe=c,this.timings={duration:a.duration,delay:a.delay,easing:a.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:r,duration:i,easing:s}=this.timings;if(this._stretchStartingKeyframe&&r){const o=[],a=i+r,c=r/a,l=new Map(t[0]);l.set("offset",0),o.push(l);const u=new Map(t[0]);u.set("offset",jO(c)),o.push(u);const d=t.length-1;for(let f=1;f<=d;f++){let h=new Map(t[f]);const p=h.get("offset");h.set("offset",jO((r+p*i)/a)),o.push(h)}i=a,r=0,s="",t=o}return gb(this.element,t,this.preStyleProps,this.postStyleProps,i,r,s,!0)}}function jO(e,t=3){const r=Math.pow(10,t-1);return Math.round(e*r)/r}function $O(e,t,r,i,s,o,a,c,l,u,d,f,h){return{type:0,element:e,triggerName:t,isRemovalTransition:s,fromState:r,fromStyles:o,toState:i,toStyles:a,timelines:c,queriedElements:l,preStyleProps:u,postStyleProps:d,totalTime:f,errors:h}}const vb={};class VO{constructor(t,r,i){this._triggerName=t,this.ast=r,this._stateStyles=i}match(t,r,i,s){return function Mee(e,t,r,i,s){return e.some(o=>o(t,r,i,s))}(this.ast.matchers,t,r,i,s)}buildStyles(t,r,i){let s=this._stateStyles.get("*");return void 0!==t&&(s=this._stateStyles.get(t?.toString())||s),s?s.buildStyles(r,i):new Map}build(t,r,i,s,o,a,c,l,u,d){const f=[],h=this.ast.options&&this.ast.options.params||vb,g=this.buildStyles(i,c&&c.params||vb,f),m=l&&l.params||vb,y=this.buildStyles(s,m,f),v=new Set,w=new Map,_=new Map,b="void"===s,C={params:HO(m,h),delay:this.ast.options?.delay},D=d?[]:mb(t,r,this.ast.animation,o,a,g,y,C,u,f);let S=0;return D.forEach(T=>{S=Math.max(T.duration+T.delay,S)}),f.length?$O(r,this._triggerName,i,s,b,g,y,[],[],w,_,S,f):(D.forEach(T=>{const O=T.element,U=Bn(w,O,new Set);T.preStyleProps.forEach(j=>U.add(j));const B=Bn(_,O,new Set);T.postStyleProps.forEach(j=>B.add(j)),O!==r&&v.add(O)}),$O(r,this._triggerName,i,s,b,g,y,D,[...v.values()],w,_,S))}}function HO(e,t){const r={...t};return Object.entries(e).forEach(([i,s])=>{null!=s&&(r[i]=s)}),r}class Nee{constructor(t,r,i){this.styles=t,this.defaultParams=r,this.normalizer=i}buildStyles(t,r){const i=new Map,s=HO(t,this.defaultParams);return this.styles.styles.forEach(o=>{"string"!=typeof o&&o.forEach((a,c)=>{a&&(a=Bu(a,s,r));const l=this.normalizer.normalizePropertyName(c,r);a=this.normalizer.normalizeStyleValue(c,l,a,r),i.set(c,a)})}),i}}class Oee{constructor(t,r,i){this.name=t,this.ast=r,this._normalizer=i,this.transitionFactories=[],this.states=new Map,r.states.forEach(s=>{this.states.set(s.name,new Nee(s.style,s.options&&s.options.params||{},i))}),zO(this.states,"true","1"),zO(this.states,"false","0"),r.transitions.forEach(s=>{this.transitionFactories.push(new VO(t,s,this.states))}),this.fallbackTransition=function kee(e,t,r){return new VO(e,{type:ce.Transition,animation:{type:ce.Sequence,steps:[],options:null},matchers:[(a,c)=>!0],options:null,queryCount:0,depCount:0},t)}(t,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,r,i,s){return this.transitionFactories.find(a=>a.match(t,r,i,s))||null}matchStyles(t,r,i){return this.fallbackTransition.buildStyles(t,r,i)}}function zO(e,t,r){e.has(t)?e.has(r)||e.set(r,e.get(t)):e.has(r)&&e.set(t,e.get(r))}const Pee=new Up;class Lee{constructor(t,r,i){this.bodyNode=t,this._driver=r,this._normalizer=i,this._animations=new Map,this._playersById=new Map,this.players=[]}register(t,r){const i=[],o=hb(this._driver,r,i,[]);if(i.length)throw function $X(e){return new M(3503,!1)}();this._animations.set(t,o)}_buildPlayer(t,r,i){const s=t.element,o=TO(this._normalizer,t.keyframes,r,i);return this._driver.animate(s,o,t.duration,t.delay,t.easing,[],!0)}create(t,r,i={}){const s=[],o=this._animations.get(t);let a;const c=new Map;if(o?(a=mb(this._driver,r,o,ab,Rp,new Map,new Map,i,Pee,s),a.forEach(d=>{const f=Bn(c,d.element,new Map);d.postStyleProps.forEach(h=>f.set(h,null))})):(s.push(function VX(){return new M(3300,!1)}()),a=[]),s.length)throw function HX(e){return new M(3504,!1)}();c.forEach((d,f)=>{d.forEach((h,p)=>{d.set(p,this._driver.computeStyle(f,p,Pi))})});const u=bs(a.map(d=>{const f=c.get(d.element);return this._buildPlayer(d,new Map,f)}));return this._playersById.set(t,u),u.onDestroy(()=>this.destroy(t)),this.players.push(u),u}destroy(t){const r=this._getPlayer(t);r.destroy(),this._playersById.delete(t);const i=this.players.indexOf(r);i>=0&&this.players.splice(i,1)}_getPlayer(t){const r=this._playersById.get(t);if(!r)throw function zX(e){return new M(3301,!1)}();return r}listen(t,r,i,s){const o=nb(r,"","","");return eb(this._getPlayer(t),i,o,s),()=>{}}command(t,r,i,s){if("register"==i)return void this.register(t,s[0]);if("create"==i)return void this.create(t,r,s[0]||{});const o=this._getPlayer(t);switch(i){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(s[0]));break;case"destroy":this.destroy(t)}}}const qO="ng-animate-queued",wb="ng-animate-disabled",$ee=[],GO={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},Vee={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},_r="__ng_removed";class _b{get params(){return this.options.params}constructor(t,r=""){this.namespaceId=r;const i=t&&t.hasOwnProperty("value");if(this.value=function Gee(e){return e??null}(i?t.value:t),i){const{value:o,...a}=t;this.options=a}else this.options={};this.options.params||(this.options.params={})}absorbOptions(t){const r=t.params;if(r){const i=this.options.params;Object.keys(r).forEach(s=>{null==i[s]&&(i[s]=r[s])})}}}const Uu="void",bb=new _b(Uu);class Hee{constructor(t,r,i){this.id=t,this.hostElement=r,this._engine=i,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,Yn(r,this._hostClassName)}listen(t,r,i,s){if(!this._triggers.has(r))throw function qX(e,t){return new M(3302,!1)}();if(null==i||0==i.length)throw function GX(e){return new M(3303,!1)}();if(!function Wee(e){return"start"==e||"done"==e}(i))throw function WX(e,t){return new M(3400,!1)}();const o=Bn(this._elementListeners,t,[]),a={name:r,phase:i,callback:s};o.push(a);const c=Bn(this._engine.statesByElement,t,new Map);return c.has(r)||(Yn(t,Op),Yn(t,Op+"-"+r),c.set(r,bb)),()=>{this._engine.afterFlush(()=>{const l=o.indexOf(a);l>=0&&o.splice(l,1),this._triggers.has(r)||c.delete(r)})}}register(t,r){return!this._triggers.has(t)&&(this._triggers.set(t,r),!0)}_getTrigger(t){const r=this._triggers.get(t);if(!r)throw function ZX(e){return new M(3401,!1)}();return r}trigger(t,r,i,s=!0){const o=this._getTrigger(r),a=new Eb(this.id,r,t);let c=this._engine.statesByElement.get(t);c||(Yn(t,Op),Yn(t,Op+"-"+r),this._engine.statesByElement.set(t,c=new Map));let l=c.get(r);const u=new _b(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&l&&u.absorbOptions(l.options),c.set(r,u),l||(l=bb),u.value!==Uu&&l.value===u.value){if(!function Qee(e,t){const r=Object.keys(e),i=Object.keys(t);if(r.length!=i.length)return!1;for(let s=0;s{ho(t,y),ri(t,v)})}return}const h=Bn(this._engine.playersByElement,t,[]);h.forEach(m=>{m.namespaceId==this.id&&m.triggerName==r&&m.queued&&m.destroy()});let p=o.matchTransition(l.value,u.value,t,u.params),g=!1;if(!p){if(!s)return;p=o.fallbackTransition,g=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:r,transition:p,fromState:l,toState:u,player:a,isFallbackTransition:g}),g||(Yn(t,qO),a.onStart(()=>{hc(t,qO)})),a.onDone(()=>{let m=this.players.indexOf(a);m>=0&&this.players.splice(m,1);const y=this._engine.playersByElement.get(t);if(y){let v=y.indexOf(a);v>=0&&y.splice(v,1)}}),this.players.push(a),h.push(a),a}deregister(t){this._triggers.delete(t),this._engine.statesByElement.forEach(r=>r.delete(t)),this._elementListeners.forEach((r,i)=>{this._elementListeners.set(i,r.filter(s=>s.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);const r=this._engine.playersByElement.get(t);r&&(r.forEach(i=>i.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,r){const i=this._engine.driver.query(t,kp,!0);i.forEach(s=>{if(s[_r])return;const o=this._engine.fetchNamespacesByElement(s);o.size?o.forEach(a=>a.triggerLeaveAnimation(s,r,!1,!0)):this.clearElementCache(s)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(s=>this.clearElementCache(s)))}triggerLeaveAnimation(t,r,i,s){const o=this._engine.statesByElement.get(t),a=new Map;if(o){const c=[];if(o.forEach((l,u)=>{if(a.set(u,l.value),this._triggers.has(u)){const d=this.trigger(t,u,Uu,s);d&&c.push(d)}}),c.length)return this._engine.markElementAsRemoved(this.id,t,!0,r,a),i&&bs(c).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){const r=this._elementListeners.get(t),i=this._engine.statesByElement.get(t);if(r&&i){const s=new Set;r.forEach(o=>{const a=o.name;if(s.has(a))return;s.add(a);const l=this._triggers.get(a).fallbackTransition,u=i.get(a)||bb,d=new _b(Uu),f=new Eb(this.id,a,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:a,transition:l,fromState:u,toState:d,player:f,isFallbackTransition:!0})})}}removeNode(t,r){const i=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,r),this.triggerLeaveAnimation(t,r,!0))return;let s=!1;if(i.totalAnimations){const o=i.players.length?i.playersByQueriedElement.get(t):[];if(o&&o.length)s=!0;else{let a=t;for(;a=a.parentNode;)if(i.statesByElement.get(a)){s=!0;break}}}if(this.prepareLeaveAnimationListeners(t),s)i.markElementAsRemoved(this.id,t,!1,r);else{const o=t[_r];(!o||o===GO)&&(i.afterFlush(()=>this.clearElementCache(t)),i.destroyInnerAnimations(t),i._onRemovalComplete(t,r))}}insertNode(t,r){Yn(t,this._hostClassName)}drainQueuedTransitions(t){const r=[];return this._queue.forEach(i=>{const s=i.player;if(s.destroyed)return;const o=i.element,a=this._elementListeners.get(o);a&&a.forEach(c=>{if(c.name==i.triggerName){const l=nb(o,i.triggerName,i.fromState.value,i.toState.value);l._data=t,eb(i.player,c.phase,l,c.callback)}}),s.markedForDestroy?this._engine.afterFlush(()=>{s.destroy()}):r.push(i)}),this._queue=[],r.sort((i,s)=>{const o=i.transition.ast.depCount,a=s.transition.ast.depCount;return 0==o||0==a?o-a:this._engine.driver.containsElement(i.element,s.element)?1:-1})}destroy(t){this.players.forEach(r=>r.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}}class zee{_onRemovalComplete(t,r){this.onRemovalComplete(t,r)}constructor(t,r,i,s){this.bodyNode=t,this.driver=r,this._normalizer=i,this.scheduler=s,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(o,a)=>{}}get queuedPlayers(){const t=[];return this._namespaceList.forEach(r=>{r.players.forEach(i=>{i.queued&&t.push(i)})}),t}createNamespace(t,r){const i=new Hee(t,r,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,r)?this._balanceNamespaceList(i,r):(this.newHostElements.set(r,i),this.collectEnterElement(r)),this._namespaceLookup[t]=i}_balanceNamespaceList(t,r){const i=this._namespaceList,s=this.namespacesByHostElement;if(i.length-1>=0){let a=!1,c=this.driver.getParentElement(r);for(;c;){const l=s.get(c);if(l){const u=i.indexOf(l);i.splice(u+1,0,t),a=!0;break}c=this.driver.getParentElement(c)}a||i.unshift(t)}else i.push(t);return s.set(r,t),t}register(t,r){let i=this._namespaceLookup[t];return i||(i=this.createNamespace(t,r)),i}registerTrigger(t,r,i){let s=this._namespaceLookup[t];s&&s.register(r,i)&&this.totalAnimations++}destroy(t,r){t&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{const i=this._fetchNamespace(t);this.namespacesByHostElement.delete(i.hostElement);const s=this._namespaceList.indexOf(i);s>=0&&this._namespaceList.splice(s,1),i.destroy(r),delete this._namespaceLookup[t]}))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){const r=new Set,i=this.statesByElement.get(t);if(i)for(let s of i.values())if(s.namespaceId){const o=this._fetchNamespace(s.namespaceId);o&&r.add(o)}return r}trigger(t,r,i,s){if(Vp(r)){const o=this._fetchNamespace(t);if(o)return o.trigger(r,i,s),!0}return!1}insertNode(t,r,i,s){if(!Vp(r))return;const o=r[_r];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;const a=this.collectedLeaveElements.indexOf(r);a>=0&&this.collectedLeaveElements.splice(a,1)}if(t){const a=this._fetchNamespace(t);a&&a.insertNode(r,i)}s&&this.collectEnterElement(r)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,r){r?this.disabledNodes.has(t)||(this.disabledNodes.add(t),Yn(t,wb)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),hc(t,wb))}removeNode(t,r,i){if(Vp(r)){this.scheduler?.notify();const s=t?this._fetchNamespace(t):null;s?s.removeNode(r,i):this.markElementAsRemoved(t,r,!1,i);const o=this.namespacesByHostElement.get(r);o&&o.id!==t&&o.removeNode(r,i)}else this._onRemovalComplete(r,i)}markElementAsRemoved(t,r,i,s,o){this.collectedLeaveElements.push(r),r[_r]={namespaceId:t,setForRemoval:s,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:o}}listen(t,r,i,s,o){return Vp(r)?this._fetchNamespace(t).listen(r,i,s,o):()=>{}}_buildInstruction(t,r,i,s,o){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,i,s,t.fromState.options,t.toState.options,r,o)}destroyInnerAnimations(t){let r=this.driver.query(t,kp,!0);r.forEach(i=>this.destroyActiveAnimationsForElement(i)),0!=this.playersByQueriedElement.size&&(r=this.driver.query(t,cb,!0),r.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(t){const r=this.playersByElement.get(t);r&&r.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(t){const r=this.playersByQueriedElement.get(t);r&&r.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return bs(this.players).onDone(()=>t());t()})}processLeaveNode(t){const r=t[_r];if(r&&r.setForRemoval){if(t[_r]=GO,r.namespaceId){this.destroyInnerAnimations(t);const i=this._fetchNamespace(r.namespaceId);i&&i.clearElementCache(t)}this._onRemovalComplete(t,r.setForRemoval)}t.classList?.contains(wb)&&this.markElementAsDisabled(t,!1),this.driver.query(t,".ng-animate-disabled",!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(t=-1){let r=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,s)=>this._balanceNamespaceList(i,s)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;ii()),this._flushFns=[],this._whenQuietFns.length){const i=this._whenQuietFns;this._whenQuietFns=[],r.length?bs(r).onDone(()=>{i.forEach(s=>s())}):i.forEach(s=>s())}}reportError(t){throw function KX(e){return new M(3402,!1)}()}_flushAnimations(t,r){const i=new Up,s=[],o=new Map,a=[],c=new Map,l=new Map,u=new Map,d=new Set;this.disabledNodes.forEach(E=>{d.add(E);const x=this.driver.query(E,".ng-animate-queued",!0);for(let R=0;R{const R=ab+m++;g.set(x,R),E.forEach(A=>Yn(A,R))});const y=[],v=new Set,w=new Set;for(let E=0;Ev.add(A)):w.add(x))}const _=new Map,b=KO(h,Array.from(v));b.forEach((E,x)=>{const R=Rp+m++;_.set(x,R),E.forEach(A=>Yn(A,R))}),t.push(()=>{p.forEach((E,x)=>{const R=g.get(x);E.forEach(A=>hc(A,R))}),b.forEach((E,x)=>{const R=_.get(x);E.forEach(A=>hc(A,R))}),y.forEach(E=>{this.processLeaveNode(E)})});const C=[],D=[];for(let E=this._namespaceList.length-1;E>=0;E--)this._namespaceList[E].drainQueuedTransitions(r).forEach(R=>{const A=R.player,H=R.element;if(C.push(A),this.collectedEnterElements.length){const Se=H[_r];if(Se&&Se.setForMove){if(Se.previousTriggersValues&&Se.previousTriggersValues.has(R.triggerName)){const tt=Se.previousTriggersValues.get(R.triggerName),Ae=this.statesByElement.get(R.element);if(Ae&&Ae.has(R.triggerName)){const Cn=Ae.get(R.triggerName);Cn.value=tt,Ae.set(R.triggerName,Cn)}}return void A.destroy()}}const Q=!f||!this.driver.containsElement(f,H),J=_.get(H),_e=g.get(H),le=this._buildInstruction(R,i,_e,J,Q);if(le.errors&&le.errors.length)return void D.push(le);if(Q)return A.onStart(()=>ho(H,le.fromStyles)),A.onDestroy(()=>ri(H,le.toStyles)),void s.push(A);if(R.isFallbackTransition)return A.onStart(()=>ho(H,le.fromStyles)),A.onDestroy(()=>ri(H,le.toStyles)),void s.push(A);const lt=[];le.timelines.forEach(Se=>{Se.stretchStartingKeyframe=!0,this.disabledNodes.has(Se.element)||lt.push(Se)}),le.timelines=lt,i.append(H,le.timelines),a.push({instruction:le,player:A,element:H}),le.queriedElements.forEach(Se=>Bn(c,Se,[]).push(A)),le.preStyleProps.forEach((Se,tt)=>{if(Se.size){let Ae=l.get(tt);Ae||l.set(tt,Ae=new Set),Se.forEach((Cn,Bt)=>Ae.add(Bt))}}),le.postStyleProps.forEach((Se,tt)=>{let Ae=u.get(tt);Ae||u.set(tt,Ae=new Set),Se.forEach((Cn,Bt)=>Ae.add(Bt))})});if(D.length){const E=[];D.forEach(x=>{E.push(function QX(e,t){return new M(3505,!1)}())}),C.forEach(x=>x.destroy()),this.reportError(E)}const S=new Map,T=new Map;a.forEach(E=>{const x=E.element;i.has(x)&&(T.set(x,x),this._beforeAnimationBuild(E.player.namespaceId,E.instruction,S))}),s.forEach(E=>{const x=E.element;this._getPreviousPlayers(x,!1,E.namespaceId,E.triggerName,null).forEach(A=>{Bn(S,x,[]).push(A),A.destroy()})});const O=y.filter(E=>YO(E,l,u)),U=new Map;ZO(U,this.driver,w,u,Pi).forEach(E=>{YO(E,l,u)&&O.push(E)});const j=new Map;p.forEach((E,x)=>{ZO(j,this.driver,new Set(E),l,"!")}),O.forEach(E=>{const x=U.get(E),R=j.get(E);U.set(E,new Map([...x?.entries()??[],...R?.entries()??[]]))});const Y=[],k=[],I={};a.forEach(E=>{const{element:x,player:R,instruction:A}=E;if(i.has(x)){if(d.has(x))return R.onDestroy(()=>ri(x,A.toStyles)),R.disabled=!0,R.overrideTotalTime(A.totalTime),void s.push(R);let H=I;if(T.size>1){let J=x;const _e=[];for(;J=J.parentNode;){const le=T.get(J);if(le){H=le;break}_e.push(J)}_e.forEach(le=>T.set(le,H))}const Q=this._buildAnimation(R.namespaceId,A,S,o,j,U);if(R.setRealPlayer(Q),H===I)Y.push(R);else{const J=this.playersByElement.get(H);J&&J.length&&(R.parentPlayer=bs(J)),s.push(R)}}else ho(x,A.fromStyles),R.onDestroy(()=>ri(x,A.toStyles)),k.push(R),d.has(x)&&s.push(R)}),k.forEach(E=>{const x=o.get(E.element);if(x&&x.length){const R=bs(x);E.setRealPlayer(R)}}),s.forEach(E=>{E.parentPlayer?E.syncPlayerEvents(E.parentPlayer):E.destroy()});for(let E=0;E!Q.destroyed);H.length?Zee(this,x,H):this.processLeaveNode(x)}return y.length=0,Y.forEach(E=>{this.players.push(E),E.onDone(()=>{E.destroy();const x=this.players.indexOf(E);this.players.splice(x,1)}),E.play()}),Y}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,r,i,s,o){let a=[];if(r){const c=this.playersByQueriedElement.get(t);c&&(a=c)}else{const c=this.playersByElement.get(t);if(c){const l=!o||o==Uu;c.forEach(u=>{u.queued||!l&&u.triggerName!=s||a.push(u)})}}return(i||s)&&(a=a.filter(c=>!(i&&i!=c.namespaceId||s&&s!=c.triggerName))),a}_beforeAnimationBuild(t,r,i){const o=r.element,a=r.isRemovalTransition?void 0:t,c=r.isRemovalTransition?void 0:r.triggerName;for(const l of r.timelines){const u=l.element,d=u!==o,f=Bn(i,u,[]);this._getPreviousPlayers(u,d,a,c,r.toState).forEach(p=>{const g=p.getRealPlayer();g.beforeDestroy&&g.beforeDestroy(),p.destroy(),f.push(p)})}ho(o,r.fromStyles)}_buildAnimation(t,r,i,s,o,a){const c=r.triggerName,l=r.element,u=[],d=new Set,f=new Set,h=r.timelines.map(g=>{const m=g.element;d.add(m);const y=m[_r];if(y&&y.removedBeforeQueried)return new Lu(g.duration,g.delay);const v=m!==l,w=function Kee(e){const t=[];return QO(e,t),t}((i.get(m)||$ee).map(S=>S.getRealPlayer())).filter(S=>!!S.element&&S.element===m),_=o.get(m),b=a.get(m),C=TO(this._normalizer,g.keyframes,_,b),D=this._buildPlayer(g,C,w);if(g.subTimeline&&s&&f.add(m),v){const S=new Eb(t,c,m);S.setRealPlayer(D),u.push(S)}return D});u.forEach(g=>{Bn(this.playersByQueriedElement,g.element,[]).push(g),g.onDone(()=>function qee(e,t,r){let i=e.get(t);if(i){if(i.length){const s=i.indexOf(r);i.splice(s,1)}0==i.length&&e.delete(t)}return i}(this.playersByQueriedElement,g.element,g))}),d.forEach(g=>Yn(g,OO));const p=bs(h);return p.onDestroy(()=>{d.forEach(g=>hc(g,OO)),ri(l,r.toStyles)}),f.forEach(g=>{Bn(s,g,[]).push(p)}),p}_buildPlayer(t,r,i){return r.length>0?this.driver.animate(t.element,r,t.duration,t.delay,t.easing,i):new Lu(t.duration,t.delay)}}class Eb{constructor(t,r,i){this.namespaceId=t,this.triggerName=r,this.element=i,this._player=new Lu,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,this._queuedCallbacks.forEach((r,i)=>{r.forEach(s=>eb(t,i,void 0,s))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){const r=this._player;r.triggerCallback&&t.onStart(()=>r.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,r){Bn(this._queuedCallbacks,t,[]).push(r)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){const r=this._player;r.triggerCallback&&r.triggerCallback(t)}}function Vp(e){return e&&1===e.nodeType}function WO(e,t){const r=e.style.display;return e.style.display=t??"none",r}function ZO(e,t,r,i,s){const o=[];r.forEach(l=>o.push(WO(l)));const a=[];i.forEach((l,u)=>{const d=new Map;l.forEach(f=>{const h=t.computeStyle(u,f,s);d.set(f,h),(!h||0==h.length)&&(u[_r]=Vee,a.push(u))}),e.set(u,d)});let c=0;return r.forEach(l=>WO(l,o[c++])),a}function KO(e,t){const r=new Map;if(e.forEach(c=>r.set(c,[])),0==t.length)return r;const s=new Set(t),o=new Map;function a(c){if(!c)return 1;let l=o.get(c);if(l)return l;const u=c.parentNode;return l=r.has(u)?u:s.has(u)?1:a(u),o.set(c,l),l}return t.forEach(c=>{const l=a(c);1!==l&&r.get(l).push(c)}),r}function Yn(e,t){e.classList?.add(t)}function hc(e,t){e.classList?.remove(t)}function Zee(e,t,r){bs(r).onDone(()=>e.processLeaveNode(t))}function QO(e,t){for(let r=0;rs.add(o)):t.set(e,i),r.delete(e),!0}class ju{constructor(t,r,i,s){this._driver=r,this._normalizer=i,this._triggerCache={},this.onRemovalComplete=(o,a)=>{},this._transitionEngine=new zee(t.body,r,i,s),this._timelineEngine=new Lee(t.body,r,i),this._transitionEngine.onRemovalComplete=(o,a)=>this.onRemovalComplete(o,a)}registerTrigger(t,r,i,s,o){const a=t+"-"+s;let c=this._triggerCache[a];if(!c){const l=[],d=hb(this._driver,o,l,[]);if(l.length)throw function UX(e,t){return new M(3404,!1)}();c=function Ree(e,t,r){return new Oee(e,t,r)}(s,d,this._normalizer),this._triggerCache[a]=c}this._transitionEngine.registerTrigger(r,s,c)}register(t,r){this._transitionEngine.register(t,r)}destroy(t,r){this._transitionEngine.destroy(t,r)}onInsert(t,r,i,s){this._transitionEngine.insertNode(t,r,i,s)}onRemove(t,r,i){this._transitionEngine.removeNode(t,r,i)}disableAnimations(t,r){this._transitionEngine.markElementAsDisabled(t,r)}process(t,r,i,s){if("@"==i.charAt(0)){const[o,a]=xO(i);this._timelineEngine.command(o,r,a,s)}else this._transitionEngine.trigger(t,r,i,s)}listen(t,r,i,s,o){if("@"==i.charAt(0)){const[a,c]=xO(i);return this._timelineEngine.listen(a,r,c,o)}return this._transitionEngine.listen(t,r,i,s,o)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(t){this._transitionEngine.afterFlushAnimationsDone(t)}}class $u{static#e=this.initialStylesByElement=new WeakMap;constructor(t,r,i){this._element=t,this._startStyles=r,this._endStyles=i,this._state=0;let s=$u.initialStylesByElement.get(t);s||$u.initialStylesByElement.set(t,s=new Map),this._initialStyles=s}start(){this._state<1&&(this._startStyles&&ri(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(ri(this._element,this._initialStyles),this._endStyles&&(ri(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&($u.initialStylesByElement.delete(this._element),this._startStyles&&(ho(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(ho(this._element,this._endStyles),this._endStyles=null),ri(this._element,this._initialStyles),this._state=3)}}function Db(e){let t=null;return e.forEach((r,i)=>{(function Jee(e){return"display"===e||"position"===e})(i)&&(t=t||new Map,t.set(i,r))}),t}class JO{constructor(t,r,i,s){this.element=t,this.keyframes=r,this.options=i,this._specialStyles=s,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:new Map;const r=()=>this._onFinish();this.domPlayer.addEventListener("finish",r),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",r)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(t){const r=[];return t.forEach(i=>{r.push(Object.fromEntries(i))}),r}_triggerWebAnimation(t,r,i){return t.animate(this._convertKeyframesToObject(r),i)}onStart(t){this._originalOnStartFns.push(t),this._onStartFns.push(t)}onDone(t){this._originalOnDoneFns.push(t),this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}setPosition(t){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=t*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const t=new Map;this.hasStarted()&&this._finalKeyframe.forEach((i,s)=>{"offset"!==s&&t.set(s,this._finished?i:fb(this.element,s))}),this.currentSnapshot=t}triggerCallback(t){const r="start"===t?this._onStartFns:this._onDoneFns;r.forEach(i=>i()),r.length=0}}class XO{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}matchesElement(t,r){return!1}containsElement(t,r){return MO(t,r)}getParentElement(t){return rb(t)}query(t,r,i){return NO(t,r,i)}computeStyle(t,r,i){return fb(t,r)}animate(t,r,i,s,o,a=[]){const l={duration:i,delay:s,fill:0==s?"both":"forwards"};o&&(l.easing=o);const u=new Map,d=a.filter(p=>p instanceof JO);(function lee(e,t){return 0===e||0===t})(i,s)&&d.forEach(p=>{p.currentSnapshot.forEach((g,m)=>u.set(m,g))});let f=function oee(e){return e.length?e[0]instanceof Map?e:e.map(t=>new Map(Object.entries(t))):[]}(r).map(p=>new Map(p));f=function uee(e,t,r){if(r.size&&t.length){let i=t[0],s=[];if(r.forEach((o,a)=>{i.has(a)||s.push(a),i.set(a,o)}),s.length)for(let o=1;oa.set(c,fb(e,c)))}}return t}(t,f,u);const h=function Yee(e,t){let r=null,i=null;return Array.isArray(t)&&t.length?(r=Db(t[0]),t.length>1&&(i=Db(t[t.length-1]))):t instanceof Map&&(r=Db(t)),r||i?new $u(e,r,i):null}(t,f);return new JO(t,f,l,h)}}const ek="@.disabled";class tk{constructor(t,r,i,s){this.namespaceId=t,this.delegate=r,this.engine=i,this._onDestroy=s,this.\u0275type=0}get data(){return this.delegate.data}destroyNode(t){this.delegate.destroyNode?.(t)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(t,r){return this.delegate.createElement(t,r)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,r){this.delegate.appendChild(t,r),this.engine.onInsert(this.namespaceId,r,t,!1)}insertBefore(t,r,i,s=!0){this.delegate.insertBefore(t,r,i),this.engine.onInsert(this.namespaceId,r,t,s)}removeChild(t,r,i){this.engine.onRemove(this.namespaceId,r,this.delegate)}selectRootElement(t,r){return this.delegate.selectRootElement(t,r)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,r,i,s){this.delegate.setAttribute(t,r,i,s)}removeAttribute(t,r,i){this.delegate.removeAttribute(t,r,i)}addClass(t,r){this.delegate.addClass(t,r)}removeClass(t,r){this.delegate.removeClass(t,r)}setStyle(t,r,i,s){this.delegate.setStyle(t,r,i,s)}removeStyle(t,r,i){this.delegate.removeStyle(t,r,i)}setProperty(t,r,i){"@"==r.charAt(0)&&r==ek?this.disableAnimations(t,!!i):this.delegate.setProperty(t,r,i)}setValue(t,r){this.delegate.setValue(t,r)}listen(t,r,i){return this.delegate.listen(t,r,i)}disableAnimations(t,r){this.engine.disableAnimations(t,r)}}class Xee extends tk{constructor(t,r,i,s,o){super(r,i,s,o),this.factory=t,this.namespaceId=r}setProperty(t,r,i){"@"==r.charAt(0)?"."==r.charAt(1)&&r==ek?this.disableAnimations(t,i=void 0===i||!!i):this.engine.process(this.namespaceId,t,r.slice(1),i):this.delegate.setProperty(t,r,i)}listen(t,r,i){if("@"==r.charAt(0)){const s=function ete(e){switch(e){case"body":return document.body;case"document":return document;case"window":return window;default:return e}}(t);let o=r.slice(1),a="";return"@"!=o.charAt(0)&&([o,a]=function tte(e){const t=e.indexOf(".");return[e.substring(0,t),e.slice(t+1)]}(o)),this.engine.listen(this.namespaceId,s,o,a,c=>{this.factory.scheduleListenerCallback(c._data||-1,i,c)})}return this.delegate.listen(t,r,i)}}class nte{constructor(t,r,i){this.delegate=t,this.engine=r,this._zone=i,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,r.onRemovalComplete=(s,o)=>{const a=o?.parentNode(s);a&&o.removeChild(a,s)}}createRenderer(t,r){const s=this.delegate.createRenderer(t,r);if(!t||!r?.data?.animation){const u=this._rendererCache;let d=u.get(s);return d||(d=new tk("",s,this.engine,()=>u.delete(s)),u.set(s,d)),d}const o=r.id,a=r.id+"-"+this._currentId;this._currentId++,this.engine.register(a,t);const c=u=>{Array.isArray(u)?u.forEach(c):this.engine.registerTrigger(o,a,t,u.name,u)};return r.data.animation.forEach(c),new Xee(this,a,s,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(t,r,i){if(t>=0&&tr(i));const s=this._animationCallbacksBuffer;0==s.length&&queueMicrotask(()=>{this._zone.run(()=>{s.forEach(o=>{const[a,c]=o;a(c)}),this._animationCallbacksBuffer=[]})}),s.push([r,i])}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}let rte=(()=>{class e extends ju{constructor(r,i,s){super(r,i,s,P(sf,{optional:!0}))}ngOnDestroy(){this.flush()}static#e=this.\u0275fac=function(i){return new(i||e)(G(Wt),G(sb),G(ob))};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac})}return e})();const nk=[{provide:ob,useFactory:function ite(){return new LO}},{provide:ju,useClass:rte},{provide:sy,useFactory:function ste(e,t,r){return new nte(e,t,r)},deps:[Gv,ju,Ne]}],Cb=[{provide:sb,useFactory:()=>new XO},{provide:VD,useValue:"BrowserAnimations"},...nk],rk=[{provide:sb,useClass:ib},{provide:VD,useValue:"NoopAnimations"},...nk];let ote=(()=>{class e{static withConfig(r){return{ngModule:e,providers:r.disableAnimations?rk:Cb}}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=pn({type:e});static#r=this.\u0275inj=Jt({providers:Cb,imports:[vA]})}return e})(),ik=(()=>{class e extends $n{constructor(r){super(),this.error$=r}handleError(r){/^AbortError/.test(String(r))||(r.errors&&r.errors.length?r.errors.forEach(i=>{console.error((new Date).toLocaleString(),i.message),this.error$.next(i.message)}):r.message?(console.error((new Date).toLocaleString(),r.message),this.error$.next(r.message)):(console.error((new Date).toLocaleString(),"application throw unkown error"),this.error$.next("application throw unkown error")))}static#e=this.\u0275fac=function(i){return new(i||e)(G(Q_))};static#t=this.\u0275prov=z({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),ate=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=pn({type:e});static#r=this.\u0275inj=Jt({providers:[Q_,ik,{provide:$n,useClass:ik}],imports:[Ea,ote]})}return e})(),cte=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=pn({type:e,bootstrap:[gX]});static#r=this.\u0275inj=Jt({imports:[mX,vA,jJ,PH,NK,yX,pX.forRoot({timeOut:1e4,positionClass:"toast-top-center",preventDuplicates:!0}),ate]})}return e})();xH().bootstrapModule(cte).catch(e=>console.error(e))}},zp=>{zp(zp.s=45)}]); \ No newline at end of file diff --git a/docs/main.c5b676f8f08b1fd2.js b/docs/main.c5b676f8f08b1fd2.js new file mode 100755 index 0000000..96e8a48 --- /dev/null +++ b/docs/main.c5b676f8f08b1fd2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkomeglestr=self.webpackChunkomeglestr||[]).push([[792],{999:(am,yC,_i)=>{var Wc={};_i.r(Wc),_i.d(Wc,{OG:()=>A_,My:()=>nc,Ph:()=>Nn,lX:()=>T_,Id:()=>Co,fg:()=>KN,qj:()=>an,aT:()=>rc,lq:()=>ys,z:()=>x_,Q5:()=>Eu});var cm={};function vC(e,t){return Object.is(e,t)}_i.r(cm),_i.d(cm,{aK:()=>ko,e8:()=>vc,DO:()=>Lu,dJ:()=>ak,OG:()=>Xw,My:()=>_c,Ph:()=>Oo,lX:()=>Qw,Id:()=>Fu,fg:()=>lk,qj:()=>Mr,aT:()=>bc,r4:()=>Zp,aY:()=>Ro,x:()=>tb,lq:()=>Ec,z:()=>Yw,zW:()=>wc,Q5:()=>Bu});let At=null,Zc=!1,Od=1;const mr=Symbol("SIGNAL");function ve(e){const t=At;return At=e,t}const kd={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function lm(e){if(Zc)throw new Error("");if(null===At)return;At.consumerOnSignalRead(e);const t=At.nextProducerIndex++;Fd(At),te.nextProducerIndex;)e.producerNode.pop(),e.producerLastReadVersion.pop(),e.producerIndexOfThis.pop()}}function dm(e){Fd(e);for(let t=0;t0}function Fd(e){e.producerNode??=[],e.producerIndexOfThis??=[],e.producerLastReadVersion??=[]}function SC(e){e.liveConsumerNode??=[],e.liveConsumerIndexOfThis??=[]}function IC(e){return void 0!==e.producerNode}const hm=Symbol("UNSET"),pm=Symbol("COMPUTING"),Bd=Symbol("ERRORED"),jF={...kd,value:hm,dirty:!0,error:null,equal:vC,producerMustRecompute:e=>e.value===hm||e.value===pm,producerRecomputeValue(e){if(e.value===pm)throw new Error("Detected cycle in computations.");const t=e.value;e.value=pm;const r=Pd(e);let i;try{i=e.computation()}catch(s){i=Bd,e.error=s}finally{um(e,r)}t!==hm&&t!==Bd&&i!==Bd&&e.equal(t,i)?e.value=t:(e.value=i,e.version++)}};let TC=function $F(){throw new Error};function xC(){TC()}let Vd=null;function AC(e,t){EC()||xC(),e.equal(e.value,t)||(e.value=t,function WF(e){e.version++,function VF(){Od++}(),bC(e),Vd?.()}(e))}const GF={...kd,equal:vC,value:void 0};function at(e){return"function"==typeof e}function Ud(e){const r=e(i=>{Error.call(i),i.stack=(new Error).stack});return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}const gm=Ud(e=>function(r){e(this),this.message=r?`${r.length} errors occurred during unsubscription:\n${r.map((i,s)=>`${s+1}) ${i.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=r});function jd(e,t){if(e){const r=e.indexOf(t);0<=r&&e.splice(r,1)}}class Et{constructor(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=!0;const{_parentage:r}=this;if(r)if(this._parentage=null,Array.isArray(r))for(const o of r)o.remove(this);else r.remove(this);const{initialTeardown:i}=this;if(at(i))try{i()}catch(o){t=o instanceof gm?o.errors:[o]}const{_finalizers:s}=this;if(s){this._finalizers=null;for(const o of s)try{OC(o)}catch(a){t=t??[],a instanceof gm?t=[...t,...a.errors]:t.push(a)}}if(t)throw new gm(t)}}add(t){var r;if(t&&t!==this)if(this.closed)OC(t);else{if(t instanceof Et){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(t)}}_hasParent(t){const{_parentage:r}=this;return r===t||Array.isArray(r)&&r.includes(t)}_addParent(t){const{_parentage:r}=this;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t}_removeParent(t){const{_parentage:r}=this;r===t?this._parentage=null:Array.isArray(r)&&jd(r,t)}remove(t){const{_finalizers:r}=this;r&&jd(r,t),t instanceof Et&&t._removeParent(this)}}Et.EMPTY=(()=>{const e=new Et;return e.closed=!0,e})();const NC=Et.EMPTY;function RC(e){return e instanceof Et||e&&"closed"in e&&at(e.remove)&&at(e.add)&&at(e.unsubscribe)}function OC(e){at(e)?e():e.unsubscribe()}const qs={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},$d={setTimeout(e,t,...r){const{delegate:i}=$d;return i?.setTimeout?i.setTimeout(e,t,...r):setTimeout(e,t,...r)},clearTimeout(e){const{delegate:t}=$d;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function kC(e){$d.setTimeout(()=>{const{onUnhandledError:t}=qs;if(!t)throw e;t(e)})}function mm(){}const KF=ym("C",void 0,void 0);function ym(e,t,r){return{kind:e,value:t,error:r}}let Gs=null;function Hd(e){if(qs.useDeprecatedSynchronousErrorHandling){const t=!Gs;if(t&&(Gs={errorThrown:!1,error:null}),e(),t){const{errorThrown:r,error:i}=Gs;if(Gs=null,r)throw i}}else e()}class vm extends Et{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,RC(t)&&t.add(this)):this.destination=n3}static create(t,r,i){return new wm(t,r,i)}next(t){this.isStopped?bm(function YF(e){return ym("N",e,void 0)}(t),this):this._next(t)}error(t){this.isStopped?bm(function QF(e){return ym("E",void 0,e)}(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?bm(KF,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(t){this.destination.next(t)}_error(t){try{this.destination.error(t)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const XF=Function.prototype.bind;function _m(e,t){return XF.call(e,t)}class e3{constructor(t){this.partialObserver=t}next(t){const{partialObserver:r}=this;if(r.next)try{r.next(t)}catch(i){zd(i)}}error(t){const{partialObserver:r}=this;if(r.error)try{r.error(t)}catch(i){zd(i)}else zd(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(r){zd(r)}}}class wm extends vm{constructor(t,r,i){let s;if(super(),at(t)||!t)s={next:t??void 0,error:r??void 0,complete:i??void 0};else{let o;this&&qs.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=()=>this.unsubscribe(),s={next:t.next&&_m(t.next,o),error:t.error&&_m(t.error,o),complete:t.complete&&_m(t.complete,o)}):s=t}this.destination=new e3(s)}}function zd(e){qs.useDeprecatedSynchronousErrorHandling?function JF(e){qs.useDeprecatedSynchronousErrorHandling&&Gs&&(Gs.errorThrown=!0,Gs.error=e)}(e):kC(e)}function bm(e,t){const{onStoppedNotification:r}=qs;r&&$d.setTimeout(()=>r(e,t))}const n3={closed:!0,next:mm,error:function t3(e){throw e},complete:mm},Em="function"==typeof Symbol&&Symbol.observable||"@@observable";function Ws(e){return e}function PC(e){return 0===e.length?Ws:1===e.length?e[0]:function(r){return e.reduce((i,s)=>s(i),r)}}let jt=(()=>{class e{constructor(r){r&&(this._subscribe=r)}lift(r){const i=new e;return i.source=this,i.operator=r,i}subscribe(r,i,s){const o=function s3(e){return e&&e instanceof vm||function i3(e){return e&&at(e.next)&&at(e.error)&&at(e.complete)}(e)&&RC(e)}(r)?r:new wm(r,i,s);return Hd(()=>{const{operator:a,source:c}=this;o.add(a?a.call(o,c):c?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(r){try{return this._subscribe(r)}catch(i){r.error(i)}}forEach(r,i){return new(i=LC(i))((s,o)=>{const a=new wm({next:c=>{try{r(c)}catch(l){o(l),a.unsubscribe()}},error:o,complete:s});this.subscribe(a)})}_subscribe(r){var i;return null===(i=this.source)||void 0===i?void 0:i.subscribe(r)}[Em](){return this}pipe(...r){return PC(r)(this)}toPromise(r){return new(r=LC(r))((i,s)=>{let o;this.subscribe(a=>o=a,a=>s(a),()=>i(o))})}}return e.create=t=>new e(t),e})();function LC(e){var t;return null!==(t=e??qs.Promise)&&void 0!==t?t:Promise}const o3=Ud(e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let Xe=(()=>{class e extends jt{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(r){const i=new FC(this,this);return i.operator=r,i}_throwIfClosed(){if(this.closed)throw new o3}next(r){Hd(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const i of this.currentObservers)i.next(r)}})}error(r){Hd(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=r;const{observers:i}=this;for(;i.length;)i.shift().error(r)}})}complete(){Hd(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:r}=this;for(;r.length;)r.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var r;return(null===(r=this.observers)||void 0===r?void 0:r.length)>0}_trySubscribe(r){return this._throwIfClosed(),super._trySubscribe(r)}_subscribe(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)}_innerSubscribe(r){const{hasError:i,isStopped:s,observers:o}=this;return i||s?NC:(this.currentObservers=null,o.push(r),new Et(()=>{this.currentObservers=null,jd(o,r)}))}_checkFinalizedStatuses(r){const{hasError:i,thrownError:s,isStopped:o}=this;i?r.error(s):o&&r.complete()}asObservable(){const r=new jt;return r.source=this,r}}return e.create=(t,r)=>new FC(t,r),e})();class FC extends Xe{constructor(t,r){super(),this.destination=t,this.source=r}next(t){var r,i;null===(i=null===(r=this.destination)||void 0===r?void 0:r.next)||void 0===i||i.call(r,t)}error(t){var r,i;null===(i=null===(r=this.destination)||void 0===r?void 0:r.error)||void 0===i||i.call(r,t)}complete(){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===r||r.call(t)}_subscribe(t){var r,i;return null!==(i=null===(r=this.source)||void 0===r?void 0:r.subscribe(t))&&void 0!==i?i:NC}}class Jn extends Xe{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){const r=super._subscribe(t);return!r.closed&&t.next(this._value),r}getValue(){const{hasError:t,thrownError:r,_value:i}=this;if(t)throw r;return this._throwIfClosed(),i}next(t){super.next(this._value=t)}}function BC(e){return at(e?.lift)}function $t(e){return t=>{if(BC(t))return t.lift(function(r){try{return e(r,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function Ct(e,t,r,i,s){return new a3(e,t,r,i,s)}class a3 extends vm{constructor(t,r,i,s,o,a){super(t),this.onFinalize=o,this.shouldUnsubscribe=a,this._next=r?function(c){try{r(c)}catch(l){t.error(l)}}:super._next,this._error=s?function(c){try{s(c)}catch(l){t.error(l)}finally{this.unsubscribe()}}:super._error,this._complete=i?function(){try{i()}catch(c){t.error(c)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:r}=this;super.unsubscribe(),!r&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}}}function Ve(e,t){return $t((r,i)=>{let s=0;r.subscribe(Ct(i,o=>{i.next(e.call(t,o,s++))}))})}const VC="https://g.co/ng/security#xss";class A extends Error{constructor(t,r){super(function Qo(e,t){return`NG0${Math.abs(e)}${t?": "+t:""}`}(t,r)),this.code=t}}function wi(e){return{toString:e}.toString()}const Jo="__parameters__";function ea(e,t,r){return wi(()=>{const i=function Cm(e){return function(...r){if(e){const i=e(...r);for(const s in i)this[s]=i[s]}}}(t);function s(...o){if(this instanceof s)return i.apply(this,o),this;const a=new s(...o);return c.annotation=a,c;function c(l,u,d){const f=l.hasOwnProperty(Jo)?l[Jo]:Object.defineProperty(l,Jo,{value:[]})[Jo];for(;f.length<=d;)f.push(null);return(f[d]=f[d]||[]).push(a),l}}return r&&(s.prototype=Object.create(r.prototype)),s.prototype.ngMetadataName=e,s.annotationCls=s,s})}const ct=globalThis;function $e(e){for(let t in e)if(e[t]===$e)return t;throw Error("Could not find renamed property on target object.")}function c3(e,t){for(const r in t)t.hasOwnProperty(r)&&!e.hasOwnProperty(r)&&(e[r]=t[r])}function Mt(e){if("string"==typeof e)return e;if(Array.isArray(e))return"["+e.map(Mt).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return`${e.overriddenName}`;if(e.name)return`${e.name}`;const t=e.toString();if(null==t)return""+t;const r=t.indexOf("\n");return-1===r?t:t.substring(0,r)}function Dm(e,t){return null==e||""===e?null===t?"":t:null==t||""===t?e:e+" "+t}const l3=$e({__forward_ref__:$e});function et(e){return e.__forward_ref__=et,e.toString=function(){return Mt(this())},e}function ie(e){return Gd(e)?e():e}function Gd(e){return"function"==typeof e&&e.hasOwnProperty(l3)&&e.__forward_ref__===et}function H(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function Nt(e){return{providers:e.providers||[],imports:e.imports||[]}}function Wd(e){return HC(e,Kd)||HC(e,zC)}function HC(e,t){return e.hasOwnProperty(t)?e[t]:null}function Zd(e){return e&&(e.hasOwnProperty(Sm)||e.hasOwnProperty(g3))?e[Sm]:null}const Kd=$e({\u0275prov:$e}),Sm=$e({\u0275inj:$e}),zC=$e({ngInjectableDef:$e}),g3=$e({ngInjectorDef:$e});class q{constructor(t,r){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof r?this.__NG_ELEMENT_ID__=r:void 0!==r&&(this.\u0275prov=H({token:this,providedIn:r.providedIn||"root",factory:r.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function Mm(e){return e&&!!e.\u0275providers}const Qc=$e({\u0275cmp:$e}),Nm=$e({\u0275dir:$e}),Rm=$e({\u0275pipe:$e}),GC=$e({\u0275mod:$e}),bi=$e({\u0275fac:$e}),Yc=$e({__NG_ELEMENT_ID__:$e}),WC=$e({__NG_ENV_ID__:$e});function he(e){return"string"==typeof e?e:null==e?"":String(e)}function Om(e,t){throw new A(-201,!1)}var Ie=function(e){return e[e.Default=0]="Default",e[e.Host=1]="Host",e[e.Self=2]="Self",e[e.SkipSelf=4]="SkipSelf",e[e.Optional=8]="Optional",e}(Ie||{});let km;function ZC(){return km}function Sn(e){const t=km;return km=e,t}function KC(e,t,r){const i=Wd(e);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:r&Ie.Optional?null:void 0!==t?t:void Om()}const Jc={},Pm="__NG_DI_FLAG__",Qd="ngTempTokenPath",b3=/\n/gm,QC="__source";let ta;function es(e){const t=ta;return ta=e,t}function D3(e,t=Ie.Default){if(void 0===ta)throw new A(-203,!1);return null===ta?KC(e,void 0,t):ta.get(e,t&Ie.Optional?null:void 0,t)}function Z(e,t=Ie.Default){return(ZC()||D3)(ie(e),t)}function O(e,t=Ie.Default){return Z(e,Yd(t))}function Yd(e){return typeof e>"u"||"number"==typeof e?e:(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function Lm(e){const t=[];for(let r=0;rArray.isArray(r)?na(r,t):t(r))}function JC(e,t,r){t>=e.length?e.push(r):e.splice(t,0,r)}function ef(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function Vn(e,t,r){let i=ra(e,t);return i>=0?e[1|i]=r:(i=~i,function XC(e,t,r,i){let s=e.length;if(s==t)e.push(r,i);else if(1===s)e.push(i,e[0]),e[0]=r;else{for(s--,e.push(e[s-1],e[s]);s>t;)e[s]=e[s-2],s--;e[t]=r,e[t+1]=i}}(e,i,t,r)),i}function Bm(e,t){const r=ra(e,t);if(r>=0)return e[1|r]}function ra(e,t){return function eD(e,t,r){let i=0,s=e.length>>r;for(;s!==i;){const o=i+(s-i>>1),a=e[o<t?s=o:i=o+1}return~(s<t){a=o-1;break}}}for(;o-1){let o;for(;++so?"":s[d+1].toLowerCase(),2&i&&u!==f){if(vr(i))return!1;a=!0}}}}else{if(!a&&!vr(i)&&!vr(l))return!1;if(a&&vr(l))continue;a=!1,i=l|1&i}}return vr(i)||a}function vr(e){return!(1&e)}function L3(e,t,r,i){if(null===t)return-1;let s=0;if(i||!r){let o=!1;for(;s-1)for(r++;r0?'="'+c+'"':"")+"]"}else 8&i?s+="."+a:4&i&&(s+=" "+a);else""!==s&&!vr(a)&&(t+=aD(o,s),s=""),i=a,o=o||!vr(i);r++}return""!==s&&(t+=aD(o,s)),t}function ns(e){return wi(()=>{const t=lD(e),r={...t,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===rf.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||yr.Emulated,styles:e.styles||ke,_:null,schemas:e.schemas||null,tView:null,id:""};uD(r);const i=e.dependencies;return r.directiveDefs=sf(i,!1),r.pipeDefs=sf(i,!0),r.id=function W3(e){let t=0;const r=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,e.consts,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery].join("|");for(const s of r)t=Math.imul(31,t)+s.charCodeAt(0)|0;return t+=2147483648,"c"+t}(r),r})}function z3(e){return Ce(e)||Rt(e)}function q3(e){return null!==e}function Ht(e){return wi(()=>({type:e.type,bootstrap:e.bootstrap||ke,declarations:e.declarations||ke,imports:e.imports||ke,exports:e.exports||ke,transitiveCompileScopes:null,schemas:e.schemas||null,id:e.id||null}))}function cD(e,t){if(null==e)return Br;const r={};for(const i in e)if(e.hasOwnProperty(i)){const s=e[i];let o,a,c=ts.None;Array.isArray(s)?(c=s[0],o=s[1],a=s[2]??o):(o=s,a=s),t?(r[o]=c!==ts.None?[i,c]:i,t[o]=a):r[o]=i}return r}function de(e){return wi(()=>{const t=lD(e);return uD(t),t})}function fn(e){return{type:e.type,name:e.name,factory:null,pure:!1!==e.pure,standalone:!0===e.standalone,onDestroy:e.type.prototype.ngOnDestroy||null}}function Ce(e){return e[Qc]||null}function Rt(e){return e[Nm]||null}function Gt(e){return e[Rm]||null}function en(e,t){const r=e[GC]||null;if(!r&&!0===t)throw new Error(`Type ${Mt(e)} does not have '\u0275mod' property.`);return r}function lD(e){const t={};return{type:e.type,providersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputTransforms:null,inputConfig:e.inputs||Br,exportAs:e.exportAs||null,standalone:!0===e.standalone,signals:!0===e.signals,selectors:e.selectors||ke,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:cD(e.inputs,t),outputs:cD(e.outputs),debugInfo:null}}function uD(e){e.features?.forEach(t=>t(e))}function sf(e,t){if(!e)return null;const r=t?Gt:z3;return()=>("function"==typeof e?e():e).map(i=>r(i)).filter(q3)}function Z3(...e){return{\u0275providers:$m(0,e),\u0275fromNgModule:!0}}function $m(e,...t){const r=[],i=new Set;let s;const o=a=>{r.push(a)};return na(t,a=>{const c=a;af(c,o,[],i)&&(s||=[],s.push(c))}),void 0!==s&&dD(s,o),r}function dD(e,t){for(let r=0;r{t(o,i)})}}function af(e,t,r,i){if(!(e=ie(e)))return!1;let s=null,o=Zd(e);const a=!o&&Ce(e);if(o||a){if(a&&!a.standalone)return!1;s=e}else{const l=e.ngModule;if(o=Zd(l),!o)return!1;s=l}const c=i.has(s);if(a){if(c)return!1;if(i.add(s),a.dependencies){const l="function"==typeof a.dependencies?a.dependencies():a.dependencies;for(const u of l)af(u,t,r,i)}}else{if(!o)return!1;{if(null!=o.imports&&!c){let u;i.add(s);try{na(o.imports,d=>{af(d,t,r,i)&&(u||=[],u.push(d))})}finally{}void 0!==u&&dD(u,t)}if(!c){const u=Zs(s)||(()=>new s);t({provide:s,useFactory:u,deps:ke},s),t({provide:Vm,useValue:s,multi:!0},s),t({provide:Vr,useValue:()=>Z(s),multi:!0},s)}const l=o.providers;if(null!=l&&!c){const u=e;Hm(l,d=>{t(d,u)})}}}return s!==e&&void 0!==e.providers}function Hm(e,t){for(let r of e)Mm(r)&&(r=r.\u0275providers),Array.isArray(r)?Hm(r,t):t(r)}const K3=$e({provide:String,useValue:$e});function zm(e){return null!==e&&"object"==typeof e&&K3 in e}function Ks(e){return"function"==typeof e}const qm=new q(""),cf={},Y3={};let Gm;function lf(){return void 0===Gm&&(Gm=new nf),Gm}class Tn{}class ia extends Tn{get destroyed(){return this._destroyed}constructor(t,r,i,s){super(),this.parent=r,this.source=i,this.scopes=s,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,Zm(t,a=>this.processProvider(a)),this.records.set(tD,sa(void 0,this)),s.has("environment")&&this.records.set(Tn,sa(void 0,this));const o=this.records.get(qm);null!=o&&"string"==typeof o.value&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(Vm,ke,Ie.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;const t=ve(null);try{for(const i of this._ngOnDestroyHooks)i.ngOnDestroy();const r=this._onDestroyHooks;this._onDestroyHooks=[];for(const i of r)i()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),ve(t)}}onDestroy(t){return this.assertNotDestroyed(),this._onDestroyHooks.push(t),()=>this.removeOnDestroy(t)}runInContext(t){this.assertNotDestroyed();const r=es(this),i=Sn(void 0);try{return t()}finally{es(r),Sn(i)}}get(t,r=Jc,i=Ie.Default){if(this.assertNotDestroyed(),t.hasOwnProperty(WC))return t[WC](this);i=Yd(i);const o=es(this),a=Sn(void 0);try{if(!(i&Ie.SkipSelf)){let l=this.records.get(t);if(void 0===l){const u=function nB(e){return"function"==typeof e||"object"==typeof e&&e instanceof q}(t)&&Wd(t);l=u&&this.injectableDefInScope(u)?sa(Wm(t),cf):null,this.records.set(t,l)}if(null!=l)return this.hydrate(t,l)}return(i&Ie.Self?lf():this.parent).get(t,r=i&Ie.Optional&&r===Jc?null:r)}catch(c){if("NullInjectorError"===c.name){if((c[Qd]=c[Qd]||[]).unshift(Mt(t)),o)throw c;return function I3(e,t,r,i){const s=e[Qd];throw t[QC]&&s.unshift(t[QC]),e.message=function T3(e,t,r,i=null){e=e&&"\n"===e.charAt(0)&&"\u0275"==e.charAt(1)?e.slice(2):e;let s=Mt(t);if(Array.isArray(t))s=t.map(Mt).join(" -> ");else if("object"==typeof t){let o=[];for(let a in t)if(t.hasOwnProperty(a)){let c=t[a];o.push(a+":"+("string"==typeof c?JSON.stringify(c):Mt(c)))}s=`{${o.join(", ")}}`}return`${r}${i?"("+i+")":""}[${s}]: ${e.replace(b3,"\n ")}`}("\n"+e.message,s,r,i),e.ngTokenPath=s,e[Qd]=null,e}(c,t,"R3InjectorError",this.source)}throw c}finally{Sn(a),es(o)}}resolveInjectorInitializers(){const t=ve(null),r=es(this),i=Sn(void 0);try{const o=this.get(Vr,ke,Ie.Self);for(const a of o)a()}finally{es(r),Sn(i),ve(t)}}toString(){const t=[],r=this.records;for(const i of r.keys())t.push(Mt(i));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new A(205,!1)}processProvider(t){let r=Ks(t=ie(t))?t:ie(t&&t.provide);const i=function X3(e){return zm(e)?sa(void 0,e.useValue):sa(pD(e),cf)}(t);if(!Ks(t)&&!0===t.multi){let s=this.records.get(r);s||(s=sa(void 0,cf,!0),s.factory=()=>Lm(s.multi),this.records.set(r,s)),r=t,s.multi.push(t)}this.records.set(r,i)}hydrate(t,r){const i=ve(null);try{return r.value===cf&&(r.value=Y3,r.value=r.factory()),"object"==typeof r.value&&r.value&&function tB(e){return null!==e&&"object"==typeof e&&"function"==typeof e.ngOnDestroy}(r.value)&&this._ngOnDestroyHooks.add(r.value),r.value}finally{ve(i)}}injectableDefInScope(t){if(!t.providedIn)return!1;const r=ie(t.providedIn);return"string"==typeof r?"any"===r||this.scopes.has(r):this.injectorDefTypes.has(r)}removeOnDestroy(t){const r=this._onDestroyHooks.indexOf(t);-1!==r&&this._onDestroyHooks.splice(r,1)}}function Wm(e){const t=Wd(e),r=null!==t?t.factory:Zs(e);if(null!==r)return r;if(e instanceof q)throw new A(204,!1);if(e instanceof Function)return function J3(e){if(e.length>0)throw new A(204,!1);const r=function p3(e){return e&&(e[Kd]||e[zC])||null}(e);return null!==r?()=>r.factory(e):()=>new e}(e);throw new A(204,!1)}function pD(e,t,r){let i;if(Ks(e)){const s=ie(e);return Zs(s)||Wm(s)}if(zm(e))i=()=>ie(e.useValue);else if(function hD(e){return!(!e||!e.useFactory)}(e))i=()=>e.useFactory(...Lm(e.deps||[]));else if(function fD(e){return!(!e||!e.useExisting)}(e))i=()=>Z(ie(e.useExisting));else{const s=ie(e&&(e.useClass||e.provide));if(!function eB(e){return!!e.deps}(e))return Zs(s)||Wm(s);i=()=>new s(...Lm(e.deps))}return i}function sa(e,t,r=!1){return{factory:e,value:t,multi:r?[]:void 0}}function Zm(e,t){for(const r of e)Array.isArray(r)?Zm(r,t):r&&Mm(r)?Zm(r.\u0275providers,t):t(r)}function Ei(e,t){e instanceof ia&&e.assertNotDestroyed();const i=es(e),s=Sn(void 0);try{return t()}finally{es(i),Sn(s)}}function gD(){return void 0!==ZC()||null!=function C3(){return ta}()}const lt=0,F=1,ne=2,Dt=3,_r=4,Wt=5,hn=6,aa=7,tt=8,St=9,Ur=10,se=11,rl=12,yD=13,ca=14,ut=15,Qs=16,la=17,Ci=18,ua=19,vD=20,is=21,df=22,Xn=23,Y=25,Ym=1,jr=7,da=9,mt=10;var hf=function(e){return e[e.None=0]="None",e[e.HasTransplantedViews=2]="HasTransplantedViews",e}(hf||{});function kt(e){return Array.isArray(e)&&"object"==typeof e[Ym]}function tn(e){return Array.isArray(e)&&!0===e[Ym]}function Jm(e){return!!(4&e.flags)}function Ys(e){return e.componentOffset>-1}function pf(e){return!(1&~e.flags)}function wr(e){return!!e.template}function sl(e){return!!(512&e[ne])}class pB{constructor(t,r,i){this.previousValue=t,this.currentValue=r,this.firstChange=i}isFirstChange(){return this.firstChange}}function CD(e,t,r,i){null!==t?t.applyValueToInputSignal(t,i):e[r]=i}function er(){return DD}function DD(e){return e.type.prototype.ngOnChanges&&(e.setInput=mB),gB}function gB(){const e=ID(this),t=e?.current;if(t){const r=e.previous;if(r===Br)e.previous=t;else for(let i in t)r[i]=t[i];e.current=null,this.ngOnChanges(t)}}function mB(e,t,r,i,s){const o=this.declaredInputs[i],a=ID(e)||function yB(e,t){return e[SD]=t}(e,{previous:Br,current:null}),c=a.current||(a.current={}),l=a.previous,u=l[o];c[o]=new pB(u&&u.currentValue,r,l===Br),CD(e,t,s,r)}er.ngInherit=!0;const SD="__ngSimpleChanges__";function ID(e){return e[SD]||null}const $r=function(e,t,r){},TD="svg";function Pe(e){for(;Array.isArray(e);)e=e[lt];return e}function ol(e,t){return Pe(t[e])}function pn(e,t){return Pe(t[e.index])}function al(e,t){return e.data[t]}function Js(e,t){return e[t]}function Un(e,t){const r=t[e];return kt(r)?r:r[lt]}function ry(e){return!(128&~e[ne])}function tr(e,t){return null==t?null:e[t]}function AD(e){e[la]=0}function MD(e){1024&e[ne]||(e[ne]|=1024,ry(e)&&mf(e))}function gf(e){return!!(9216&e[ne]||e[Xn]?.dirty)}function iy(e){e[Ur].changeDetectionScheduler?.notify(8),64&e[ne]&&(e[ne]|=1024),gf(e)&&mf(e)}function mf(e){e[Ur].changeDetectionScheduler?.notify(0);let t=Di(e);for(;null!==t&&!(8192&t[ne])&&(t[ne]|=8192,ry(t));)t=Di(t)}function yf(e,t){if(!(256&~e[ne]))throw new A(911,!1);null===e[is]&&(e[is]=[]),e[is].push(t)}function Di(e){const t=e[Dt];return tn(t)?t[Dt]:t}const oe={lFrame:HD(null),bindingsEnabled:!0,skipHydrationRootTNode:null};let RD=!1;function OD(){return oe.bindingsEnabled}function N(){return oe.lFrame.lView}function _e(){return oe.lFrame.tView}function nn(e){return oe.lFrame.contextLView=e,e[tt]}function rn(e){return oe.lFrame.contextLView=null,e}function He(){let e=kD();for(;null!==e&&64===e.type;)e=e.parent;return e}function kD(){return oe.lFrame.currentTNode}function br(e,t){const r=oe.lFrame;r.currentTNode=e,r.isParent=t}function ay(){return oe.lFrame.isParent}function cy(){oe.lFrame.isParent=!1}function FD(){return RD}function BD(e){RD=e}function Er(){return oe.lFrame.bindingIndex++}function Ii(e){const t=oe.lFrame,r=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,r}function NB(e,t){const r=oe.lFrame;r.bindingIndex=r.bindingRootIndex=e,ly(t)}function ly(e){oe.lFrame.currentDirectiveIndex=e}function uy(e){const t=oe.lFrame.currentDirectiveIndex;return-1===t?null:e[t]}function dy(){return oe.lFrame.currentQueryIndex}function _f(e){oe.lFrame.currentQueryIndex=e}function OB(e){const t=e[F];return 2===t.type?t.declTNode:1===t.type?e[Wt]:null}function jD(e,t,r){if(r&Ie.SkipSelf){let s=t,o=e;for(;!(s=s.parent,null!==s||r&Ie.Host||(s=OB(o),null===s||(o=o[ca],10&s.type))););if(null===s)return!1;t=s,e=o}const i=oe.lFrame=$D();return i.currentTNode=t,i.lView=e,!0}function fy(e){const t=$D(),r=e[F];oe.lFrame=t,t.currentTNode=r.firstChild,t.lView=e,t.tView=r,t.contextLView=e,t.bindingIndex=r.bindingStartIndex,t.inI18n=!1}function $D(){const e=oe.lFrame,t=null===e?null:e.child;return null===t?HD(e):t}function HD(e){const t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return null!==e&&(e.child=t),t}function zD(){const e=oe.lFrame;return oe.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}const qD=zD;function hy(){const e=zD();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function Zt(){return oe.lFrame.selectedIndex}function eo(e){oe.lFrame.selectedIndex=e}function nt(){const e=oe.lFrame;return al(e.tView,e.selectedIndex)}function wf(){oe.lFrame.currentNamespace=TD}function bf(){!function LB(){oe.lFrame.currentNamespace=null}()}let WD=!0;function ll(){return WD}function Hr(e){WD=e}function Ef(e,t){for(let r=t.directiveStart,i=t.directiveEnd;r=i)break}else t[l]<0&&(e[la]+=65536),(c>14>16&&(3&e[ne])===t&&(e[ne]+=16384,KD(c,o)):KD(c,o)}const fa=-1;class ul{constructor(t,r,i){this.factory=t,this.resolving=!1,this.canSeeViewProviders=r,this.injectImpl=i}}const my={};class to{constructor(t,r){this.injector=t,this.parentInjector=r}get(t,r,i){i=Yd(i);const s=this.injector.get(t,my,i);return s!==my||r===my?s:this.parentInjector.get(t,r,i)}}function yy(e){return e!==fa}function dl(e){return 32767&e}function fl(e,t){let r=function HB(e){return e>>16}(e),i=t;for(;r>0;)i=i[ca],r--;return i}let vy=!0;function Sf(e){const t=vy;return vy=e,t}const YD=255,JD=5;let qB=0;const zr={};function If(e,t){const r=XD(e,t);if(-1!==r)return r;const i=t[F];i.firstCreatePass&&(e.injectorIndex=t.length,_y(i.data,e),_y(t,null),_y(i.blueprint,null));const s=Tf(e,t),o=e.injectorIndex;if(yy(s)){const a=dl(s),c=fl(s,t),l=c[F].data;for(let u=0;u<8;u++)t[o+u]=c[a+u]|l[a+u]}return t[o+8]=s,o}function _y(e,t){e.push(0,0,0,0,0,0,0,0,t)}function XD(e,t){return-1===e.injectorIndex||e.parent&&e.parent.injectorIndex===e.injectorIndex||null===t[e.injectorIndex+8]?-1:e.injectorIndex}function Tf(e,t){if(e.parent&&-1!==e.parent.injectorIndex)return e.parent.injectorIndex;let r=0,i=null,s=t;for(;null!==s;){if(i=oS(s),null===i)return fa;if(r++,s=s[ca],-1!==i.injectorIndex)return i.injectorIndex|r<<16}return fa}function wy(e,t,r){!function GB(e,t,r){let i;"string"==typeof r?i=r.charCodeAt(0)||0:r.hasOwnProperty(Yc)&&(i=r[Yc]),null==i&&(i=r[Yc]=qB++);const s=i&YD;t.data[e+(s>>JD)]|=1<=0?t&YD:QB:t}(r);if("function"==typeof o){if(!jD(t,e,i))return i&Ie.Host?eS(s,0,i):tS(t,r,i,s);try{let a;if(a=o(i),null!=a||i&Ie.Optional)return a;Om()}finally{qD()}}else if("number"==typeof o){let a=null,c=XD(e,t),l=fa,u=i&Ie.Host?t[ut][Wt]:null;for((-1===c||i&Ie.SkipSelf)&&(l=-1===c?Tf(e,t):t[c+8],l!==fa&&sS(i,!1)?(a=t[F],c=dl(l),t=fl(l,t)):c=-1);-1!==c;){const d=t[F];if(iS(o,c,d.data)){const f=ZB(c,t,r,a,i,u);if(f!==zr)return f}l=t[c+8],l!==fa&&sS(i,t[F].data[c+8]===u)&&iS(o,c,t)?(a=d,c=dl(l),t=fl(l,t)):c=-1}}return s}function ZB(e,t,r,i,s,o){const a=t[F],c=a.data[e+8],d=xf(c,a,r,null==i?Ys(c)&&vy:i!=a&&!!(3&c.type),s&Ie.Host&&o===c);return null!==d?no(t,a,d,c):zr}function xf(e,t,r,i,s){const o=e.providerIndexes,a=t.data,c=1048575&o,l=e.directiveStart,d=o>>20,h=s?c+d:e.directiveEnd;for(let p=i?c:c+d;p=l&&g.type===r)return p}if(s){const p=a[l];if(p&&wr(p)&&p.type===r)return l}return null}function no(e,t,r,i){let s=e[r];const o=t.data;if(function VB(e){return e instanceof ul}(s)){const a=s;a.resolving&&function v3(e,t){throw t&&t.join(" > "),new A(-200,e)}(function Le(e){return"function"==typeof e?e.name||e.toString():"object"==typeof e&&null!=e&&"function"==typeof e.type?e.type.name||e.type.toString():he(e)}(o[r]));const c=Sf(a.canSeeViewProviders);a.resolving=!0;const u=a.injectImpl?Sn(a.injectImpl):null;jD(e,i,Ie.Default);try{s=e[r]=a.factory(void 0,o,e,i),t.firstCreatePass&&r>=i.directiveStart&&function FB(e,t,r){const{ngOnChanges:i,ngOnInit:s,ngDoCheck:o}=t.type.prototype;if(i){const a=DD(t);(r.preOrderHooks??=[]).push(e,a),(r.preOrderCheckHooks??=[]).push(e,a)}s&&(r.preOrderHooks??=[]).push(0-e,s),o&&((r.preOrderHooks??=[]).push(e,o),(r.preOrderCheckHooks??=[]).push(e,o))}(r,o[r],t)}finally{null!==u&&Sn(u),Sf(c),a.resolving=!1,qD()}}return s}function iS(e,t,r){return!!(r[t+(e>>JD)]&1<{const t=e.prototype.constructor,r=t[bi]||by(t),i=Object.prototype;let s=Object.getPrototypeOf(e.prototype).constructor;for(;s&&s!==i;){const o=s[bi]||by(s);if(o&&o!==r)return o;s=Object.getPrototypeOf(s)}return o=>new o})}function by(e){return Gd(e)?()=>{const t=by(ie(e));return t&&t()}:Zs(e)}function oS(e){const t=e[F],r=t.type;return 2===r?t.declTNode:1===r?e[Wt]:null}function dS(e,t=null,r=null,i){const s=fS(e,t,r,i);return s.resolveInjectorInitializers(),s}function fS(e,t=null,r=null,i,s=new Set){const o=[r||ke,Z3(e)];return i=i||("object"==typeof e?void 0:Mt(e)),new ia(o,t||lf(),i||null,s)}class It{static{this.THROW_IF_NOT_FOUND=Jc}static{this.NULL=new nf}static create(t,r){if(Array.isArray(t))return dS({name:""},r,t,"");{const i=t.name??"";return dS({name:i},t.parent,t.providers,i)}}static{this.\u0275prov=H({token:It,providedIn:"any",factory:()=>Z(tD)})}static{this.__NG_ELEMENT_ID__=-1}}new q("").__NG_ELEMENT_ID__=e=>{const t=He();if(null===t)throw new A(204,!1);if(2&t.type)return t.value;if(e&Ie.Optional)return null;throw new A(204,!1)};function Cy(e){return e.ngOriginalError}const pS=!0;let pl=(()=>{class e{static{this.__NG_ELEMENT_ID__=aV}static{this.__NG_ENV_ID__=r=>r}}return e})();class oV extends pl{constructor(t){super(),this._lView=t}onDestroy(t){return yf(this._lView,t),()=>function sy(e,t){if(null===e[is])return;const r=e[is].indexOf(t);-1!==r&&e[is].splice(r,1)}(this._lView,t)}}function aV(){return new oV(N())}let ro=(()=>{class e{constructor(){this.taskId=0,this.pendingTasks=new Set,this.hasPendingTasks=new Jn(!1)}get _hasPendingTasks(){return this.hasPendingTasks.value}add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);const r=this.taskId++;return this.pendingTasks.add(r),r}remove(r){this.pendingTasks.delete(r),0===this.pendingTasks.size&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}static{this.\u0275prov=H({token:e,providedIn:"root",factory:()=>new e})}}return e})();const dt=class cV extends Xe{constructor(t=!1){super(),this.destroyRef=void 0,this.pendingTasks=void 0,this.__isAsync=t,gD()&&(this.destroyRef=O(pl,{optional:!0})??void 0,this.pendingTasks=O(ro,{optional:!0})??void 0)}emit(t){const r=ve(null);try{super.next(t)}finally{ve(r)}}subscribe(t,r,i){let s=t,o=r||(()=>null),a=i;if(t&&"object"==typeof t){const l=t;s=l.next?.bind(l),o=l.error?.bind(l),a=l.complete?.bind(l)}this.__isAsync&&(o=this.wrapInTimeout(o),s&&(s=this.wrapInTimeout(s)),a&&(a=this.wrapInTimeout(a)));const c=super.subscribe({next:s,error:o,complete:a});return t instanceof Et&&t.add(c),c}wrapInTimeout(t){return r=>{const i=this.pendingTasks?.add();setTimeout(()=>{t(r),void 0!==i&&this.pendingTasks?.remove(i)})}}};function Mf(...e){}function gS(e){let t,r;function i(){e=Mf;try{void 0!==r&&"function"==typeof cancelAnimationFrame&&cancelAnimationFrame(r),void 0!==t&&clearTimeout(t)}catch{}}return t=setTimeout(()=>{e(),i()}),"function"==typeof requestAnimationFrame&&(r=requestAnimationFrame(()=>{e(),i()})),()=>i()}function mS(e){return queueMicrotask(()=>e()),()=>{e=Mf}}const Dy="isAngularZone",Nf=Dy+"_ID";let lV=0;class Ne{constructor(t){this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new dt(!1),this.onMicrotaskEmpty=new dt(!1),this.onStable=new dt(!1),this.onError=new dt(!1);const{enableLongStackTrace:r=!1,shouldCoalesceEventChangeDetection:i=!1,shouldCoalesceRunChangeDetection:s=!1,scheduleInRootZone:o=pS}=t;if(typeof Zone>"u")throw new A(908,!1);Zone.assertZonePatched();const a=this;a._nesting=0,a._outer=a._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(a._inner=a._inner.fork(new Zone.TaskTrackingZoneSpec)),r&&Zone.longStackTraceZoneSpec&&(a._inner=a._inner.fork(Zone.longStackTraceZoneSpec)),a.shouldCoalesceEventChangeDetection=!s&&i,a.shouldCoalesceRunChangeDetection=s,a.callbackScheduled=!1,a.scheduleInRootZone=o,function fV(e){const t=()=>{!function dV(e){function t(){gS(()=>{e.callbackScheduled=!1,Iy(e),e.isCheckStableRunning=!0,Sy(e),e.isCheckStableRunning=!1})}e.isCheckStableRunning||e.callbackScheduled||(e.callbackScheduled=!0,e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),Iy(e))}(e)},r=lV++;e._inner=e._inner.fork({name:"angular",properties:{[Dy]:!0,[Nf]:r,[Nf+r]:!0},onInvokeTask:(i,s,o,a,c,l)=>{if(function hV(e){return _S(e,"__ignore_ng_zone__")}(l))return i.invokeTask(o,a,c,l);try{return yS(e),i.invokeTask(o,a,c,l)}finally{(e.shouldCoalesceEventChangeDetection&&"eventTask"===a.type||e.shouldCoalesceRunChangeDetection)&&t(),vS(e)}},onInvoke:(i,s,o,a,c,l,u)=>{try{return yS(e),i.invoke(o,a,c,l,u)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!function pV(e){return _S(e,"__scheduler_tick__")}(l)&&t(),vS(e)}},onHasTask:(i,s,o,a)=>{i.hasTask(o,a),s===o&&("microTask"==a.change?(e._hasPendingMicrotasks=a.microTask,Iy(e),Sy(e)):"macroTask"==a.change&&(e.hasPendingMacrotasks=a.macroTask))},onHandleError:(i,s,o,a)=>(i.handleError(o,a),e.runOutsideAngular(()=>e.onError.emit(a)),!1)})}(a)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get(Dy)}static assertInAngularZone(){if(!Ne.isInAngularZone())throw new A(909,!1)}static assertNotInAngularZone(){if(Ne.isInAngularZone())throw new A(909,!1)}run(t,r,i){return this._inner.run(t,r,i)}runTask(t,r,i,s){const o=this._inner,a=o.scheduleEventTask("NgZoneEvent: "+s,t,uV,Mf,Mf);try{return o.runTask(a,r,i)}finally{o.cancelTask(a)}}runGuarded(t,r,i){return this._inner.runGuarded(t,r,i)}runOutsideAngular(t){return this._outer.run(t)}}const uV={};function Sy(e){if(0==e._nesting&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function Iy(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&!0===e.callbackScheduled)}function yS(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function vS(e){e._nesting--,Sy(e)}class Ty{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new dt,this.onMicrotaskEmpty=new dt,this.onStable=new dt,this.onError=new dt}run(t,r,i){return t.apply(r,i)}runGuarded(t,r,i){return t.apply(r,i)}runOutsideAngular(t){return t()}runTask(t,r,i,s){return t.apply(r,i)}}function _S(e,t){return!(!Array.isArray(e)||1!==e.length)&&!0===e[0]?.data?.[t]}class nr{constructor(){this._console=console}handleError(t){const r=this._findOriginalError(t);this._console.error("ERROR",t),r&&this._console.error("ORIGINAL ERROR",r)}_findOriginalError(t){let r=t&&Cy(t);for(;r&&Cy(r);)r=Cy(r);return r||null}}const mV=new q("",{providedIn:"root",factory:()=>{const e=O(Ne),t=O(nr);return r=>e.runOutsideAngular(()=>t.handleError(r))}});function yV(){return ga(He(),N())}function ga(e,t){return new jn(pn(e,t))}let jn=(()=>{class e{constructor(r){this.nativeElement=r}static{this.__NG_ELEMENT_ID__=yV}}return e})();function bS(e){return e instanceof jn?e.nativeElement:e}function vV(){return this._results[Symbol.iterator]()}class xy{get changes(){return this._changes??=new dt}constructor(t=!1){this._emitDistinctChangesOnly=t,this.dirty=!0,this._onDirty=void 0,this._results=[],this._changesDetected=!1,this._changes=void 0,this.length=0,this.first=void 0,this.last=void 0;const r=xy.prototype;r[Symbol.iterator]||(r[Symbol.iterator]=vV)}get(t){return this._results[t]}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,r){return this._results.reduce(t,r)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t,r){this.dirty=!1;const i=function In(e){return e.flat(Number.POSITIVE_INFINITY)}(t);(this._changesDetected=!function N3(e,t,r){if(e.length!==t.length)return!1;for(let i=0;iVV}),VV="ng",jS=new q(""),os=new q("",{providedIn:"platform",factory:()=>"unknown"}),$S=new q(""),HS=new q("",{providedIn:"root",factory:()=>ss().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});let zS=()=>null;function Uy(e,t,r=!1){return zS(e,t,r)}const JS=new q("",{providedIn:"root",factory:()=>!1});let Uf,jf;function wa(e){return function qy(){if(void 0===Uf&&(Uf=null,ct.trustedTypes))try{Uf=ct.trustedTypes.createPolicy("angular",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Uf}()?.createHTML(e)||e}function tI(e){return function Gy(){if(void 0===jf&&(jf=null,ct.trustedTypes))try{jf=ct.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return jf}()?.createHTML(e)||e}class so{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${VC})`}}class XV extends so{getTypeName(){return"HTML"}}class e8 extends so{getTypeName(){return"Style"}}class t8 extends so{getTypeName(){return"Script"}}class n8 extends so{getTypeName(){return"URL"}}class r8 extends so{getTypeName(){return"ResourceURL"}}function $n(e){return e instanceof so?e.changingThisBreaksApplicationSecurity:e}function qr(e,t){const r=function i8(e){return e instanceof so&&e.getTypeName()||null}(e);if(null!=r&&r!==t){if("ResourceURL"===r&&"URL"===t)return!0;throw new Error(`Required a safe ${t}, got a ${r} (see ${VC})`)}return r===t}class u8{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{const r=(new window.DOMParser).parseFromString(wa(t),"text/html").body;return null===r?this.inertDocumentHelper.getInertBodyElement(t):(r.firstChild?.remove(),r)}catch{return null}}}class d8{constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){const r=this.inertDocument.createElement("template");return r.innerHTML=wa(t),r}}const h8=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function $f(e){return(e=String(e)).match(h8)?e:"unsafe:"+e}function Ti(e){const t={};for(const r of e.split(","))t[r]=!0;return t}function Cl(...e){const t={};for(const r of e)for(const i in r)r.hasOwnProperty(i)&&(t[i]=!0);return t}const sI=Ti("area,br,col,hr,img,wbr"),oI=Ti("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),aI=Ti("rp,rt"),Wy=Cl(sI,Cl(oI,Ti("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),Cl(aI,Ti("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),Cl(aI,oI)),Zy=Ti("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),cI=Cl(Zy,Ti("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Ti("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),p8=Ti("script,style,template");class g8{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(t){let r=t.firstChild,i=!0,s=[];for(;r;)if(r.nodeType===Node.ELEMENT_NODE?i=this.startElement(r):r.nodeType===Node.TEXT_NODE?this.chars(r.nodeValue):this.sanitizedSomething=!0,i&&r.firstChild)s.push(r),r=v8(r);else for(;r;){r.nodeType===Node.ELEMENT_NODE&&this.endElement(r);let o=y8(r);if(o){r=o;break}r=s.pop()}return this.buf.join("")}startElement(t){const r=lI(t).toLowerCase();if(!Wy.hasOwnProperty(r))return this.sanitizedSomething=!0,!p8.hasOwnProperty(r);this.buf.push("<"),this.buf.push(r);const i=t.attributes;for(let s=0;s"),!0}endElement(t){const r=lI(t).toLowerCase();Wy.hasOwnProperty(r)&&!sI.hasOwnProperty(r)&&(this.buf.push(""))}chars(t){this.buf.push(dI(t))}}function y8(e){const t=e.nextSibling;if(t&&e!==t.previousSibling)throw uI(t);return t}function v8(e){const t=e.firstChild;if(t&&function m8(e,t){return(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}(e,t))throw uI(t);return t}function lI(e){const t=e.nodeName;return"string"==typeof t?t:"FORM"}function uI(e){return new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`)}const _8=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,w8=/([^\#-~ |!])/g;function dI(e){return e.replace(/&/g,"&").replace(_8,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(w8,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let Hf;function fI(e,t){let r=null;try{Hf=Hf||function iI(e){const t=new d8(e);return function f8(){try{return!!(new window.DOMParser).parseFromString(wa(""),"text/html")}catch{return!1}}()?new u8(t):t}(e);let i=t?String(t):"";r=Hf.getInertBodyElement(i);let s=5,o=i;do{if(0===s)throw new Error("Failed to sanitize html because the input is unstable");s--,i=o,o=r.innerHTML,r=Hf.getInertBodyElement(i)}while(i!==o);return wa((new g8).sanitizeChildren(Ky(r)||r))}finally{if(r){const i=Ky(r)||r;for(;i.firstChild;)i.firstChild.remove()}}}function Ky(e){return"content"in e&&function b8(e){return e.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===e.nodeName}(e)?e.content:null}var Hn=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}(Hn||{});function Qy(e){const t=function Dl(){const e=N();return e&&e[Ur].sanitizer}();return t?tI(t.sanitize(Hn.HTML,e)||""):qr(e,"HTML")?tI($n(e)):fI(ss(),he(e))}const T8=/^>|^->||--!>|)/g,A8="\u200b$1\u200b";function wI(e){return e.ownerDocument.defaultView}function zn(e){return e instanceof Function?e():e}var as=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}(as||{});let Xy;function ev(e,t){return Xy(e,t)}function Ea(e,t,r,i,s){if(null!=i){let o,a=!1;tn(i)?o=i:kt(i)&&(a=!0,i=i[lt]);const c=Pe(i);0===e&&null!==r?null==s?AI(t,r,c):oo(t,r,c,s||null,!0):1===e&&null!==r?oo(t,r,c,s||null,!0):2===e?function Il(e,t,r){e.removeChild(null,t,r)}(t,c,a):3===e&&t.destroyNode(c),null!=o&&function Z8(e,t,r,i,s){const o=r[jr];o!==Pe(r)&&Ea(t,e,i,o,s);for(let c=mt;ct.replace(x8,A8))}(t))}function Gf(e,t,r){return e.createElement(t,r)}function II(e,t){t[Ur].changeDetectionScheduler?.notify(9),Kf(e,t,t[se],2,null,null)}function TI(e,t){const r=e[da],i=t[Dt];(kt(i)||t[ut]!==i[Dt][ut])&&(e[ne]|=hf.HasTransplantedViews),null===r?e[da]=[t]:r.push(t)}function rv(e,t){const r=e[da],i=r.indexOf(t);r.splice(i,1)}function Sl(e,t){if(e.length<=mt)return;const r=mt+t,i=e[r];if(i){const s=i[Qs];null!==s&&s!==e&&rv(s,i),t>0&&(e[r-1][_r]=i[_r]);const o=ef(e,mt+t);!function U8(e,t){II(e,t),t[lt]=null,t[Wt]=null}(i[F],i);const a=o[Ci];null!==a&&a.detachView(o[F]),i[Dt]=null,i[_r]=null,i[ne]&=-129}return i}function Wf(e,t){if(!(256&t[ne])){const r=t[se];r.destroyNode&&Kf(e,t,r,3,null,null),function $8(e){let t=e[rl];if(!t)return iv(e[F],e);for(;t;){let r=null;if(kt(t))r=t[rl];else{const i=t[mt];i&&(r=i)}if(!r){for(;t&&!t[_r]&&t!==e;)kt(t)&&iv(t[F],t),t=t[Dt];null===t&&(t=e),kt(t)&&iv(t[F],t),r=t&&t[_r]}t=r}}(t)}}function iv(e,t){if(256&t[ne])return;const r=ve(null);try{t[ne]&=-129,t[ne]|=256,t[Xn]&&fm(t[Xn]),function q8(e,t){let r;if(null!=e&&null!=(r=e.destroyHooks))for(let i=0;i=0?i[a]():i[-a].unsubscribe(),o+=2}else r[o].call(i[r[o+1]]);null!==i&&(t[aa]=null);const s=t[is];if(null!==s){t[is]=null;for(let o=0;o-1){const{encapsulation:o}=e.data[i.directiveStart+s];if(o===yr.None||o===yr.Emulated)return null}return pn(i,r)}}(e,t.parent,r)}function oo(e,t,r,i,s){e.insertBefore(t,r,i,s)}function AI(e,t,r){e.appendChild(t,r)}function MI(e,t,r,i,s){null!==i?oo(e,t,r,i,s):AI(e,t,r)}function ov(e,t){return e.parentNode(t)}let av,OI=function RI(e,t,r){return 40&e.type?pn(e,r):null};function Zf(e,t,r,i){const s=sv(e,i,t),o=t[se],c=function NI(e,t,r){return OI(e,t,r)}(i.parent||t[Wt],i,t);if(null!=s)if(Array.isArray(r))for(let l=0;lY&&UI(e,t,Y,!1),$r(a?2:0,s),r(i,s)}finally{eo(o),$r(a?3:1,s)}}function dv(e,t,r){if(Jm(t)){const i=ve(null);try{const o=t.directiveEnd;for(let a=t.directiveStart;anull;function GI(e,t,r,i,s){for(let o in t){if(!t.hasOwnProperty(o))continue;const a=t[o];if(void 0===a)continue;i??={};let c,l=ts.None;Array.isArray(a)?(c=a[0],l=a[1]):c=a;let u=o;if(null!==s){if(!s.hasOwnProperty(o))continue;u=s[o]}0===e?WI(i,r,u,c,l):WI(i,r,u,c)}return i}function WI(e,t,r,i,s){let o;e.hasOwnProperty(r)?(o=e[r]).push(t,i):o=e[r]=[t,i],void 0!==s&&o.push(s)}function An(e,t,r,i,s,o,a,c){const l=pn(t,r);let d,u=t.inputs;!c&&null!=u&&(d=u[i])?(_v(e,r,d,i,s),Ys(t)&&function aU(e,t){const r=Un(t,e);16&r[ne]||(r[ne]|=64)}(r,t.index)):3&t.type&&(i=function oU(e){return"class"===e?"className":"for"===e?"htmlFor":"formaction"===e?"formAction":"innerHtml"===e?"innerHTML":"readonly"===e?"readOnly":"tabindex"===e?"tabIndex":e}(i),s=null!=a?a(s,t.value||"",i):s,o.setProperty(l,i,s))}function gv(e,t,r,i){if(OD()){const s=null===i?null:{"":-1},o=function hU(e,t){const r=e.directiveRegistry;let i=null,s=null;if(r)for(let o=0;o0;){const r=e[--t];if("number"==typeof r&&r<0)return r}return 0})(a)!=c&&a.push(c),a.push(r,i,o)}}(e,t,i,Tl(e,r,s.hostVars,pe),s)}function Gr(e,t,r,i,s,o){const a=pn(e,t);!function yv(e,t,r,i,s,o,a){if(null==o)e.removeAttribute(t,s,r);else{const c=null==a?he(o):a(o,i||"",s);e.setAttribute(t,s,c,r)}}(t[se],a,o,e.value,r,i,s)}function _U(e,t,r,i,s,o){const a=o[t];if(null!==a)for(let c=0;c{mf(e.lView)},consumerOnSignalRead(){this.lView[Xn]=this}},AU={...kd,consumerIsAlwaysLive:!0,consumerMarkedDirty:e=>{let t=Di(e.lView);for(;t&&!iT(t[F]);)t=Di(t);t&&MD(t)},consumerOnSignalRead(){this.lView[Xn]=this}};function iT(e){return 2!==e.type}const MU=100;function Xf(e,t=!0,r=0){const i=e[Ur],s=i.rendererFactory;s.begin?.();try{!function NU(e,t){const r=FD();try{BD(!0),Ev(e,t);let i=0;for(;gf(e);){if(i===MU)throw new A(103,!1);i++,Ev(e,1)}}finally{BD(r)}}(e,r)}catch(a){throw t&&Jf(e,a),a}finally{s.end?.(),i.inlineEffectRunner?.flush()}}function RU(e,t,r,i){const s=t[ne];if(!(256&~s))return;t[Ur].inlineEffectRunner?.flush(),fy(t);let c=!0,l=null,u=null;iT(e)?(u=function DU(e){return e[Xn]??function SU(e){const t=rT.pop()??Object.create(TU);return t.lView=e,t}(e)}(t),l=Pd(u)):null===function _C(){return At}()?(c=!1,u=function xU(e){const t=e[Xn]??Object.create(AU);return t.lView=e,t}(t),l=Pd(u)):t[Xn]&&(fm(t[Xn]),t[Xn]=null);try{AD(t),function VD(e){return oe.lFrame.bindingIndex=e}(e.bindingStartIndex),null!==r&&HI(e,t,r,2,i);const d=!(3&~s);if(d){const p=e.preOrderCheckHooks;null!==p&&Cf(t,p,null)}else{const p=e.preOrderHooks;null!==p&&Df(t,p,0,null),py(t,0)}if(function OU(e){for(let t=NS(e);null!==t;t=RS(t)){if(!(t[ne]&hf.HasTransplantedViews))continue;const r=t[da];for(let i=0;i-1&&(Sl(t,i),ef(r,i))}this._attachedToViewContainer=!1}Wf(this._lView[F],this._lView)}onDestroy(t){yf(this._lView,t)}markForCheck(){Al(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[ne]&=-129}reattach(){iy(this._lView),this._lView[ne]|=128}detectChanges(){this._lView[ne]|=1024,Xf(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new A(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;const t=sl(this._lView),r=this._lView[Qs];null!==r&&!t&&rv(r,this._lView),II(this._lView[F],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new A(902,!1);this._appRef=t;const r=sl(this._lView),i=this._lView[Qs];null!==i&&!r&&TI(i,this._lView),iy(this._lView)}}let Ai=(()=>{class e{static{this.__NG_ELEMENT_ID__=FU}}return e})();const PU=Ai,LU=class extends PU{constructor(t,r,i){super(),this._declarationLView=t,this._declarationTContainer=r,this.elementRef=i}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(t,r){return this.createEmbeddedViewImpl(t,r)}createEmbeddedViewImpl(t,r,i){const s=function Ca(e,t,r,i){const s=ve(null);try{const o=t.tView,l=Qf(e,o,r,4096&e[ne]?4096:16,null,t,null,null,i?.injector??null,i?.embeddedViewInjector??null,i?.dehydratedView??null);l[Qs]=e[t.index];const d=e[Ci];return null!==d&&(l[Ci]=d.createEmbeddedView(o)),wv(o,l,r),l}finally{ve(s)}}(this._declarationLView,this._declarationTContainer,t,{embeddedViewInjector:r,dehydratedView:i});return new Ml(s)}};function FU(){return eh(He(),N())}function eh(e,t){return 4&e.type?new LU(t,e,ga(e,t)):null}class Ia{}const Bl=new q("",{providedIn:"root",factory:()=>!1}),MT=new q(""),Ov=new q("");class Aj{}class NT{}class Nj{resolveComponentFactory(t){throw function Mj(e){const t=Error(`No component factory found for ${Mt(e)}.`);return t.ngComponent=e,t}(t)}}class Vl{static{this.NULL=new Nj}}class oh{}let Oj=(()=>{class e{static{this.\u0275prov=H({token:e,providedIn:"root",factory:()=>null})}}return e})();function ch(e,t,r){let i=r?e.styles:null,s=r?e.classes:null,o=0;if(null!==t)for(let a=0;a0&&BI(e,r,o.join(" "))}}(h,C,g,i),void 0!==r&&function Hj(e,t,r){const i=e.projection=[];for(let s=0;s{class e{static{this.__NG_ELEMENT_ID__=qj}}return e})();function qj(){return VT(He(),N())}const Gj=rr,FT=class extends Gj{constructor(t,r,i){super(),this._lContainer=t,this._hostTNode=r,this._hostLView=i}get element(){return ga(this._hostTNode,this._hostLView)}get injector(){return new Pt(this._hostTNode,this._hostLView)}get parentInjector(){const t=Tf(this._hostTNode,this._hostLView);if(yy(t)){const r=fl(t,this._hostLView),i=dl(t);return new Pt(r[F].data[i+8],r)}return new Pt(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const r=BT(this._lContainer);return null!==r&&r[t]||null}get length(){return this._lContainer.length-mt}createEmbeddedView(t,r,i){let s,o;"number"==typeof i?s=i:null!=i&&(s=i.index,o=i.injector);const c=t.createEmbeddedViewImpl(r||{},o,null);return this.insertImpl(c,s,lo(this._hostTNode,null)),c}createComponent(t,r,i,s,o){const a=t&&!function nl(e){return"function"==typeof e}(t);let c;if(a)c=r;else{const g=r||{};c=g.index,i=g.injector,s=g.projectableNodes,o=g.environmentInjector||g.ngModuleRef}const l=a?t:new $l(Ce(t)),u=i||this.parentInjector;if(!o&&null==l.ngModule){const m=(a?u:this.parentInjector).get(Tn,null);m&&(o=m)}Ce(l.componentType??{});const p=l.create(u,s,null,o);return this.insertImpl(p.hostView,c,lo(this._hostTNode,null)),p}insert(t,r){return this.insertImpl(t,r,!0)}insertImpl(t,r,i){const s=t._lView;if(function bB(e){return tn(e[Dt])}(s)){const c=this.indexOf(t);if(-1!==c)this.detach(c);else{const l=s[Dt],u=new FT(l,l[Wt],l[Dt]);u.detach(u.indexOf(t))}}const o=this._adjustIndex(r),a=this._lContainer;return function Da(e,t,r,i=!0){const s=t[F];if(function H8(e,t,r,i){const s=mt+i,o=r.length;i>0&&(r[s-1][_r]=t),i!1;class Bv{constructor(t){this.queryList=t,this.matches=null}clone(){return new Bv(this.queryList)}setDirty(){this.queryList.setDirty()}}class Vv{constructor(t=[]){this.queries=t}createEmbeddedView(t){const r=t.queries;if(null!==r){const i=null!==t.contentQueries?t.contentQueries[0]:r.length,s=[];for(let o=0;ot.trim())}(t):t}}class Uv{constructor(t=[]){this.queries=t}elementStart(t,r){for(let i=0;i0)i.push(a[c/2]);else{const u=o[c+1],d=t[-l];for(let f=mt;f(lm(t),t.value);return r[mr]=t,r}(e),i=r[mr];return t?.equal&&(i.equal=t.equal),r.set=s=>AC(i,s),r.update=s=>function qF(e,t){EC()||xC(),AC(e,t(e.value))}(i,s),r.asReadonly=JT.bind(r),r}function JT(){const e=this[mr];if(void 0===e.readonlyFn){const t=()=>this();t[mr]=e,e.readonlyFn=t}return e.readonlyFn}function Ue(e){let t=function u1(e){return Object.getPrototypeOf(e.prototype).constructor}(e.type),r=!0;const i=[e];for(;t;){let s;if(wr(e))s=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new A(903,!1);s=t.\u0275dir}if(s){if(r){i.push(s);const a=e;a.inputs=uh(e.inputs),a.inputTransforms=uh(e.inputTransforms),a.declaredInputs=uh(e.declaredInputs),a.outputs=uh(e.outputs);const c=s.hostBindings;c&&m4(e,c);const l=s.viewQuery,u=s.contentQueries;if(l&&p4(e,l),u&&g4(e,u),f4(e,s),c3(e.outputs,s.outputs),wr(s)&&s.data.animation){const d=e.data;d.animation=(d.animation||[]).concat(s.data.animation)}}const o=s.features;if(o)for(let a=0;a=0;i--){const s=e[i];s.hostVars=t+=s.hostVars,s.hostAttrs=el(s.hostAttrs,r=el(r,s.hostAttrs))}}(i)}function f4(e,t){for(const r in t.inputs){if(!t.inputs.hasOwnProperty(r)||e.inputs.hasOwnProperty(r))continue;const i=t.inputs[r];if(void 0!==i&&(e.inputs[r]=i,e.declaredInputs[r]=t.declaredInputs[r],null!==t.inputTransforms)){const s=Array.isArray(i)?i[0]:i;if(!t.inputTransforms.hasOwnProperty(s))continue;e.inputTransforms??={},e.inputTransforms[s]=t.inputTransforms[s]}}}function uh(e){return e===Br?{}:e===ke?[]:e}function p4(e,t){const r=e.viewQuery;e.viewQuery=r?(i,s)=>{t(i,s),r(i,s)}:t}function g4(e,t){const r=e.contentQueries;e.contentQueries=r?(i,s,o)=>{t(i,s,o),r(i,s,o)}:t}function m4(e,t){const r=e.hostBindings;e.hostBindings=r?(i,s)=>{t(i,s),r(i,s)}:t}class ho{}class g1{}class Gv extends ho{constructor(t,r,i,s=!0){super(),this.ngModuleType=t,this._parent=r,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new PT(this);const o=en(t);this._bootstrapComponents=zn(o.bootstrap),this._r3Injector=fS(t,r,[{provide:ho,useValue:this},{provide:Vl,useValue:this.componentFactoryResolver},...i],Mt(t),new Set(["environment"])),s&&this.resolveInjectorInitializers()}resolveInjectorInitializers(){this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(this.ngModuleType)}get injector(){return this._r3Injector}destroy(){const t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(r=>r()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}}class Wv extends g1{constructor(t){super(),this.moduleType=t}create(t){return new Gv(this.moduleType,t,[])}}class m1 extends ho{constructor(t){super(),this.componentFactoryResolver=new PT(this),this.instance=null;const r=new ia([...t.providers,{provide:ho,useValue:this},{provide:Vl,useValue:this.componentFactoryResolver}],t.parent||lf(),t.debugName,new Set(["environment"]));this.injector=r,t.runEnvironmentInitializers&&r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}}function dh(e,t,r=null){return new m1({providers:e,parent:t,debugName:r,runEnvironmentInitializers:!0}).injector}function fh(e){return!!function Zv(e){return null!==e&&("function"==typeof e||"object"==typeof e)}(e)&&(Array.isArray(e)||!(e instanceof Map)&&Symbol.iterator in e)}function yt(e,t,r){return!Object.is(e[t],r)&&(e[t]=r,!0)}function ql(e,t,r,i,s,o,a,c,l,u){const d=r+Y,f=t.firstCreatePass?function x4(e,t,r,i,s,o,a,c,l){const u=t.consts,d=co(t,e,4,a||null,c||null);gv(t,r,d,tr(u,l)),Ef(t,d);const f=d.tView=pv(2,d,i,s,o,t.directiveRegistry,t.pipeRegistry,null,t.schemas,u,null);return null!==t.queries&&(t.queries.template(t,d),f.queries=t.queries.embeddedTView(d)),d}(d,t,e,i,s,o,a,c,l):t.data[d];br(f,!1);const h=y1(t,e,f,r);ll()&&Zf(t,e,h,f),sn(h,e);const p=QI(h,e,h,f);return e[d]=p,Yf(e,p),function jT(e,t,r){return Fv(e,t,r)}(p,f,e),pf(f)&&fv(t,e,f),null!=l&&hv(e,f,u),f}function sr(e,t,r,i,s,o,a,c){const l=N(),u=_e();return ql(l,u,e,t,r,i,s,tr(u.consts,o),a,c),sr}let y1=function v1(e,t,r,i){return Hr(!0),t[se].createComment("")};var Ma=function(e){return e[e.EarlyRead=0]="EarlyRead",e[e.Write=1]="Write",e[e.MixedReadWrite=2]="MixedReadWrite",e[e.Read=3]="Read",e}(Ma||{});let D1=(()=>{class e{constructor(){this.impl=null}execute(){this.impl?.execute()}static{this.\u0275prov=H({token:e,providedIn:"root",factory:()=>new e})}}return e})();class Zl{constructor(){this.ngZone=O(Ne),this.scheduler=O(Ia),this.errorHandler=O(nr,{optional:!0}),this.sequences=new Set,this.deferredRegistrations=new Set,this.executing=!1}static{this.PHASES=[Ma.EarlyRead,Ma.Write,Ma.MixedReadWrite,Ma.Read]}execute(){this.executing=!0;for(const t of Zl.PHASES)for(const r of this.sequences)if(!r.erroredOrDestroyed&&r.hooks[t])try{r.pipelinedValue=this.ngZone.runOutsideAngular(()=>r.hooks[t](r.pipelinedValue))}catch(i){r.erroredOrDestroyed=!0,this.errorHandler?.handleError(i)}this.executing=!1;for(const t of this.sequences)t.afterRun(),t.once&&(this.sequences.delete(t),t.destroy());for(const t of this.deferredRegistrations)this.sequences.add(t);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear()}register(t){this.executing?this.deferredRegistrations.add(t):(this.sequences.add(t),this.scheduler.notify(6))}unregister(t){this.executing&&this.sequences.has(t)?(t.erroredOrDestroyed=!0,t.pipelinedValue=void 0,t.once=!0):(this.sequences.delete(t),this.deferredRegistrations.delete(t))}static{this.\u0275prov=H({token:Zl,providedIn:"root",factory:()=>new Zl})}}class R4{constructor(t,r,i,s){this.impl=t,this.hooks=r,this.once=i,this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.unregisterOnDestroy=s?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.()}}function yh(e,t){!t?.injector&&function Km(e){if(!gD())throw new A(-203,!1)}();const r=t?.injector??O(It);return function qn(e){return"browser"===(e??O(It)).get(os)}(r)?(mn("NgAfterNextRender"),function S1(e,t,r,i){const s=t.get(D1);s.impl??=t.get(Zl);const o=r?.phase??Ma.MixedReadWrite,a=!0!==r?.manualCleanup?t.get(pl):null,c=new R4(s.impl,function k4(e,t){if(e instanceof Function){const r=[void 0,void 0,void 0,void 0];return r[t]=e,r}return[e.earlyRead,e.write,e.mixedReadWrite,e.read]}(e,o),i,a);return s.impl.register(c),c}(e,r,t,!0)):I1}const I1={destroy(){}};function Kt(e,t,r,i){const s=N();return yt(s,Er(),t)&&(_e(),Gr(nt(),s,e,t,r,i)),Kt}function wh(e,t){return e<<17|t<<2}function ds(e){return e>>17&32767}function o0(e){return 2|e}function mo(e){return(131068&e)>>2}function a0(e,t){return-131069&e|t<<2}function c0(e){return 1|e}function J1(e,t,r,i){const s=e[r+1],o=null===t;let a=i?ds(s):mo(s),c=!1;for(;0!==a&&(!1===c||o);){const u=e[a+1];m6(e[a],t)&&(c=!0,e[a+1]=i?c0(u):o0(u)),a=i?ds(u):mo(u)}c&&(e[r+1]=i?o0(s):c0(s))}function m6(e,t){return null===e||null==t||(Array.isArray(e)?e[1]:e)===t||!(!Array.isArray(e)||"string"!=typeof t)&&ra(e,t)>=0}const Lt={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function X1(e){return e.substring(Lt.key,Lt.keyEnd)}function ex(e,t){const r=Lt.textEnd;return r===t?-1:(t=Lt.keyEnd=function w6(e,t,r){for(;t32;)t++;return t}(e,Lt.key=t,r),qa(e,t,r))}function qa(e,t,r){for(;t=0;r=ex(t,r))Vn(e,X1(t),!0)}function Cr(e,t,r,i){const s=N(),o=_e(),a=Ii(2);o.firstUpdatePass&&ox(o,e,a,i),t!==pe&&yt(s,a,t)&&cx(o,o.data[Zt()],s,s[se],e,s[a+1]=function N6(e,t){return null==e||""===e||("string"==typeof t?e+=t:"object"==typeof e&&(e=Mt($n(e)))),e}(t,r),i,a)}function sx(e,t){return t>=e.expandoStartIndex}function ox(e,t,r,i){const s=e.data;if(null===s[r+1]){const o=s[Zt()],a=sx(e,r);ux(o,i)&&null===t&&!a&&(t=!1),t=function D6(e,t,r,i){const s=uy(e);let o=i?t.residualClasses:t.residualStyles;if(null===s)0===(i?t.classBindings:t.styleBindings)&&(r=Yl(r=u0(null,e,t,r,i),t.attrs,i),o=null);else{const a=t.directiveStylingLast;if(-1===a||e[a]!==s)if(r=u0(s,e,t,r,i),null===o){let l=function S6(e,t,r){const i=r?t.classBindings:t.styleBindings;if(0!==mo(i))return e[ds(i)]}(e,t,i);void 0!==l&&Array.isArray(l)&&(l=u0(null,e,t,l[1],i),l=Yl(l,t.attrs,i),function I6(e,t,r,i){e[ds(r?t.classBindings:t.styleBindings)]=i}(e,t,i,l))}else o=function T6(e,t,r){let i;const s=t.directiveEnd;for(let o=1+t.directiveStylingLast;o0)&&(u=!0)):d=r,s)if(0!==l){const h=ds(e[c+1]);e[i+1]=wh(h,c),0!==h&&(e[h+1]=a0(e[h+1],i)),e[c+1]=function f6(e,t){return 131071&e|t<<17}(e[c+1],i)}else e[i+1]=wh(c,0),0!==c&&(e[c+1]=a0(e[c+1],i)),c=i;else e[i+1]=wh(l,0),0===c?c=i:e[l+1]=a0(e[l+1],i),l=i;u&&(e[i+1]=o0(e[i+1])),J1(e,d,i,!0),J1(e,d,i,!1),function g6(e,t,r,i,s){const o=s?e.residualClasses:e.residualStyles;null!=o&&"string"==typeof t&&ra(o,t)>=0&&(r[i+1]=c0(r[i+1]))}(t,d,e,i,o),a=wh(c,l),o?t.classBindings=a:t.styleBindings=a}(s,o,t,r,a,i)}}function u0(e,t,r,i,s){let o=null;const a=r.directiveEnd;let c=r.directiveStylingLast;for(-1===c?c=r.directiveStart:c++;c0;){const l=e[s],u=Array.isArray(l),d=u?l[1]:l,f=null===d;let h=r[s+1];h===pe&&(h=f?ke:void 0);let p=f?Bm(h,i):d===i?h:void 0;if(u&&!bh(p)&&(p=Bm(l,i)),bh(p)&&(c=p,a))return c;const g=e[s+1];s=a?ds(g):mo(g)}if(null!==t){let l=o?t.residualClasses:t.residualStyles;null!=l&&(c=Bm(l,i))}return c}function bh(e){return void 0!==e}function ux(e,t){return!!(e.flags&(t?8:16))}function ge(e,t,r,i){const s=N(),o=_e(),a=Y+e,c=s[se],l=o.firstCreatePass?function e$(e,t,r,i,s,o){const a=t.consts,l=co(t,e,2,i,tr(a,s));return gv(t,r,l,tr(a,o)),null!==l.attrs&&ch(l,l.attrs,!1),null!==l.mergedAttrs&&ch(l,l.mergedAttrs,!0),null!==t.queries&&t.queries.elementStart(t,l),l}(a,o,s,t,r,i):o.data[a],u=px(o,s,l,c,t,e);s[a]=u;const d=pf(l);return br(l,!0),VI(c,u,l),!function xa(e){return!(32&~e.flags)}(l)&&ll()&&Zf(o,s,u,l),0===function EB(){return oe.lFrame.elementDepthCount}()&&sn(u,s),function CB(){oe.lFrame.elementDepthCount++}(),d&&(fv(o,s,l),dv(o,l,s)),null!==i&&hv(s,l),ge}function we(){let e=He();ay()?cy():(e=e.parent,br(e,!1));const t=e;(function SB(e){return oe.skipHydrationRootTNode===e})(t)&&function AB(){oe.skipHydrationRootTNode=null}(),function DB(){oe.lFrame.elementDepthCount--}();const r=_e();return r.firstCreatePass&&(Ef(r,e),Jm(e)&&r.queries.elementEnd(e)),null!=t.classesWithoutHost&&function jB(e){return!!(8&e.flags)}(t)&&l0(r,t,N(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function $B(e){return!!(16&e.flags)}(t)&&l0(r,t,N(),t.stylesWithoutHost,!1),we}function or(e,t,r,i){return ge(e,t,r,i),we(),or}let px=(e,t,r,i,s,o)=>(Hr(!0),Gf(i,s,function GD(){return oe.lFrame.currentNamespace}()));function Ga(e,t,r){const i=N(),s=_e(),o=e+Y,a=s.firstCreatePass?function r$(e,t,r,i,s){const o=t.consts,a=tr(o,i),c=co(t,e,8,"ng-container",a);return null!==a&&ch(c,a,!0),gv(t,r,c,tr(o,s)),null!==t.queries&&t.queries.elementStart(t,c),c}(o,s,i,t,r):s.data[o];br(a,!0);const c=mx(s,i,a,e);return i[o]=c,ll()&&Zf(s,i,c,a),sn(c,i),pf(a)&&(fv(s,i,a),dv(s,a,i)),null!=r&&hv(i,a),Ga}function Wa(){let e=He();const t=_e();return ay()?cy():(e=e.parent,br(e,!1)),t.firstCreatePass&&(Ef(t,e),Jm(e)&&t.queries.elementEnd(e)),Wa}let mx=(e,t,r,i)=>(Hr(!0),nv(t[se],""));function Ri(){return N()}function p0(e,t,r){const i=N();if(yt(i,Er(),t)){const o=_e(),a=nt();An(o,a,i,e,t,eT(uy(o.data),a,i),r,!0)}return p0}const Ch="en-US";let wx=Ch,Bx=(e,t,r)=>{};function ze(e,t,r,i){const s=N(),o=_e(),a=He();return function y0(e,t,r,i,s,o,a){const c=pf(i),u=e.firstCreatePass&&XI(e),d=t[tt],f=JI(t);let h=!0;if(3&i.type||a){const m=pn(i,t),y=a?a(m):m,_=f.length,v=a?b=>a(Pe(b[i.index])):i.index;let w=null;if(!a&&c&&(w=function Q$(e,t,r,i){const s=e.cleanup;if(null!=s)for(let o=0;ol?c[l]:null}"string"==typeof a&&(o+=2)}return null}(e,t,s,i.index)),null!==w)(w.__ngLastListenerFn__||w).__ngNextListenerFn__=o,w.__ngLastListenerFn__=o,h=!1;else{o=$x(i,t,d,o),Bx(m,s,o);const b=r.listen(y,s,o);f.push(o,b),u&&u.push(s,v,_,_+1)}}else o=$x(i,t,d,o);const p=i.outputs;let g;if(h&&null!==p&&(g=p[s])){const m=g.length;if(m)for(let y=0;y-1?Un(e.index,t):t,5);let c=jx(t,r,i,o),l=s.__ngNextListenerFn__;for(;l;)c=jx(t,r,l,o)&&c,l=l.__ngNextListenerFn__;return c}}function wt(e=1){return function kB(e){return(oe.lFrame.contextLView=function ND(e,t){for(;e>0;)t=t[ca],e--;return t}(e,oe.lFrame.contextLView))[tt]}(e)}function _0(e,t,r){GT(e,t,r)}function Th(e){const t=N(),r=_e(),i=dy();_f(i+1);const s=zv(r,i);if(e.dirty&&function wB(e){return!(4&~e[ne])}(t)===!(2&~s.metadata.flags)){if(null===s.matches)e.reset([]);else{const o=KT(t,i);e.reset(o,bS),e.notifyOnChanges()}return!0}return!1}function xh(){return function Hv(e,t){return e[Ci].queries[t].queryList}(N(),dy())}function Ka(e){return Js(function PD(){return oe.lFrame.contextLView}(),Y+e)}function je(e,t=""){const r=N(),i=_e(),s=e+Y,o=i.firstCreatePass?co(i,s,1,t,null):i.data[s],a=cA(i,r,o,t,e);r[s]=a,ll()&&Zf(i,r,a,o),br(o,!1)}let cA=(e,t,r,i,s)=>(Hr(!0),function tv(e,t){return e.createText(t)}(t[se],i));function Qa(e){return Yr("",e,""),Qa}function Yr(e,t,r){const i=N(),s=function Fa(e,t,r,i){return yt(e,Er(),r)?t+he(r)+i:pe}(i,e,t,r);return s!==pe&&function xi(e,t,r){const i=ol(t,e);!function SI(e,t,r){e.setValue(t,r)}(e[se],i,r)}(i,Zt(),s),Yr}function b0(e,t,r,i,s){if(e=ie(e),Array.isArray(e))for(let o=0;o>20;if(Ks(e)||!e.multi){const p=new ul(u,s,k),g=C0(l,t,s?d:d+h,f);-1===g?(wy(If(c,a),o,l),E0(o,e,t.length),t.push(l),c.directiveStart++,c.directiveEnd++,s&&(c.providerIndexes+=1048576),r.push(p),a.push(p)):(r[g]=p,a[g]=p)}else{const p=C0(l,t,d+h,f),g=C0(l,t,d,d+h),y=g>=0&&r[g];if(s&&!y||!s&&!(p>=0&&r[p])){wy(If(c,a),o,l);const _=function b5(e,t,r,i,s){const o=new ul(e,r,k);return o.multi=[],o.index=t,o.componentProviders=0,bA(o,s,i&&!r),o}(s?w5:_5,r.length,s,i,u);!s&&y&&(r[g].providerFactory=_),E0(o,e,t.length,0),t.push(l),c.directiveStart++,c.directiveEnd++,s&&(c.providerIndexes+=1048576),r.push(_),a.push(_)}else E0(o,e,p>-1?p:g,bA(r[s?g:p],u,!s&&i));!s&&i&&y&&r[g].componentProviders++}}}function E0(e,t,r,i){const s=Ks(t),o=function Q3(e){return!!e.useClass}(t);if(s||o){const l=(o?ie(t.useClass):t).prototype.ngOnDestroy;if(l){const u=e.destroyHooks||(e.destroyHooks=[]);if(!s&&t.multi){const d=u.indexOf(r);-1===d?u.push(r,[i,l]):u[d+1].push(i,l)}else u.push(r,l)}}}function bA(e,t,r){return r&&e.componentProviders++,e.multi.push(t)-1}function C0(e,t,r,i){for(let s=r;s{r.providersResolver=(i,s)=>function v5(e,t,r){const i=_e();if(i.firstCreatePass){const s=wr(e);b0(r,i.data,i.blueprint,s,!0),b0(t,i.data,i.blueprint,s,!1)}}(i,s?s(e):e,t)}}let E5=(()=>{class e{constructor(r){this._injector=r,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(r){if(!r.standalone)return null;if(!this.cachedInjectors.has(r)){const i=$m(0,r.type),s=i.length>0?dh([i],this._injector,`Standalone[${r.type.name}]`):null;this.cachedInjectors.set(r,s)}return this.cachedInjectors.get(r)}ngOnDestroy(){try{for(const r of this.cachedInjectors.values())null!==r&&r.destroy()}finally{this.cachedInjectors.clear()}}static{this.\u0275prov=H({token:e,providedIn:"environment",factory:()=>new e(Z(Tn))})}}return e})();function Ah(e){mn("NgStandalone"),e.getStandaloneInjector=t=>t.get(E5).getOrCreateStandaloneInjector(e)}function DA(e,t,r,i,s,o){const a=t+r;return yt(e,a,s)?function Zr(e,t,r){return e[t]=r}(e,a+1,o?i.call(o,s):i(s)):function ru(e,t){const r=e[t];return r===pe?void 0:r}(e,a+1)}function MA(e,t,r){const i=e+Y,s=N(),o=Js(s,i);return function iu(e,t){return e[F].data[t].pure}(s,i)?DA(s,function gn(){const e=oe.lFrame;let t=e.bindingRootIndex;return-1===t&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}(),t,o.transform,r,o):o.transform(r)}function NA(e,t){return eh(e,t)}let WA=(()=>{class e{log(r){console.log(r)}warn(r){console.warn(r)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"platform"})}}return e})();const JA=new q(""),kh=new q("");let R0,M0=(()=>{class e{constructor(r,i,s){this._ngZone=r,this.registry=i,this._isZoneStable=!0,this._callbacks=[],this.taskTrackingZone=null,R0||(function OH(e){R0=e}(s),s.addToWindow(i)),this._watchAngularEvents(),r.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{Ne.assertNotInAngularZone(),queueMicrotask(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}isStable(){return this._isZoneStable&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())queueMicrotask(()=>{for(;0!==this._callbacks.length;){let r=this._callbacks.pop();clearTimeout(r.timeoutId),r.doneCb()}});else{let r=this.getPendingTasks();this._callbacks=this._callbacks.filter(i=>!i.updateCb||!i.updateCb(r)||(clearTimeout(i.timeoutId),!1))}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(r=>({source:r.source,creationLocation:r.creationLocation,data:r.data})):[]}addCallback(r,i,s){let o=-1;i&&i>0&&(o=setTimeout(()=>{this._callbacks=this._callbacks.filter(a=>a.timeoutId!==o),r()},i)),this._callbacks.push({doneCb:r,timeoutId:o,updateCb:s})}whenStable(r,i,s){if(s&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(r,i,s),this._runCallbacksIfReady()}registerApplication(r){this.registry.registerApplication(r,this)}unregisterApplication(r){this.registry.unregisterApplication(r)}findProviders(r,i,s){return[]}static{this.\u0275fac=function(i){return new(i||e)(Z(Ne),Z(N0),Z(kh))}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac})}}return e})(),N0=(()=>{class e{constructor(){this._applications=new Map}registerApplication(r,i){this._applications.set(r,i)}unregisterApplication(r){this._applications.delete(r)}unregisterAllApplications(){this._applications.clear()}getTestability(r){return this._applications.get(r)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(r,i=!0){return R0?.findTestabilityInTree(this,r,i)??null}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"platform"})}}return e})();function cu(e){return!!e&&"function"==typeof e.then}function XA(e){return!!e&&"function"==typeof e.subscribe}const O0=new q("");let eM=(()=>{class e{constructor(){this.initialized=!1,this.done=!1,this.donePromise=new Promise((r,i)=>{this.resolve=r,this.reject=i}),this.appInits=O(O0,{optional:!0})??[]}runInitializers(){if(this.initialized)return;const r=[];for(const s of this.appInits){const o=s();if(cu(o))r.push(o);else if(XA(o)){const a=new Promise((c,l)=>{o.subscribe({complete:c,error:l})});r.push(a)}}const i=()=>{this.done=!0,this.resolve()};Promise.all(r).then(()=>{i()}).catch(s=>{this.reject(s)}),0===r.length&&i(),this.initialized=!0}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const Ph=new q("");function nM(e,t){return Array.isArray(t)?t.reduce(nM,e):{...e,...t}}let ar=(()=>{class e{constructor(){this._bootstrapListeners=[],this._runningTick=!1,this._destroyed=!1,this._destroyListeners=[],this._views=[],this.internalErrorHandler=O(mV),this.afterRenderManager=O(D1),this.zonelessEnabled=O(Bl),this.dirtyFlags=0,this.deferredDirtyFlags=0,this.externalTestViews=new Set,this.beforeRender=new Xe,this.afterTick=new Xe,this.componentTypes=[],this.components=[],this.isStable=O(ro).hasPendingTasks.pipe(Ve(r=>!r)),this._injector=O(Tn)}get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}whenStable(){let r;return new Promise(i=>{r=this.isStable.subscribe({next:s=>{s&&i()}})}).finally(()=>{r.unsubscribe()})}get injector(){return this._injector}bootstrap(r,i){const s=r instanceof NT;if(!this._injector.get(eM).done)throw!s&&function rs(e){const t=Ce(e)||Rt(e)||Gt(e);return null!==t&&t.standalone}(r),new A(405,!1);let a;a=s?r:this._injector.get(Vl).resolveComponentFactory(r),this.componentTypes.push(a.componentType);const c=function kH(e){return e.isBoundToModule}(a)?void 0:this._injector.get(ho),u=a.create(It.NULL,[],i||a.selector,c),d=u.location.nativeElement,f=u.injector.get(JA,null);return f?.registerApplication(d),u.onDestroy(()=>{this.detachView(u.hostView),Lh(this.components,u),f?.unregisterApplication(d)}),this._loadComponent(u),u}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){if(this._runningTick)throw new A(101,!1);const r=ve(null);try{this._runningTick=!0,this.synchronize()}catch(i){this.internalErrorHandler(i)}finally{this._runningTick=!1,ve(r),this.afterTick.next()}}synchronize(){let r=null;this._injector.destroyed||(r=this._injector.get(oh,null,{optional:!0})),this.dirtyFlags|=this.deferredDirtyFlags,this.deferredDirtyFlags=0;let i=0;for(;0!==this.dirtyFlags&&i++<10;)this.synchronizeOnce(r)}synchronizeOnce(r){if(this.dirtyFlags|=this.deferredDirtyFlags,this.deferredDirtyFlags=0,7&this.dirtyFlags){const i=!!(1&this.dirtyFlags);this.dirtyFlags&=-8,this.dirtyFlags|=8,this.beforeRender.next(i);for(let{_lView:s,notifyErrorHandler:o}of this._views)FH(s,o,i,this.zonelessEnabled);if(this.dirtyFlags&=-5,this.syncDirtyFlagsWithViews(),7&this.dirtyFlags)return}else r?.begin?.(),r?.end?.();8&this.dirtyFlags&&(this.dirtyFlags&=-9,this.afterRenderManager.execute()),this.syncDirtyFlagsWithViews()}syncDirtyFlagsWithViews(){this.allViews.some(({_lView:r})=>gf(r))?this.dirtyFlags|=2:this.dirtyFlags&=-8}attachView(r){const i=r;this._views.push(i),i.attachToAppRef(this)}detachView(r){const i=r;Lh(this._views,i),i.detachFromAppRef()}_loadComponent(r){this.attachView(r.hostView),this.tick(),this.components.push(r);const i=this._injector.get(Ph,[]);[...this._bootstrapListeners,...i].forEach(s=>s(r))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(r=>r()),this._views.slice().forEach(r=>r.destroy())}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(r){return this._destroyListeners.push(r),()=>Lh(this._destroyListeners,r)}destroy(){if(this._destroyed)throw new A(406,!1);const r=this._injector;r.destroy&&!r.destroyed&&r.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function Lh(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}function FH(e,t,r,i){(r||gf(e))&&Xf(e,t,r&&!i?0:1)}class BH{constructor(t,r){this.ngModuleFactory=t,this.componentFactories=r}}let iM=(()=>{class e{compileModuleSync(r){return new Wv(r)}compileModuleAsync(r){return Promise.resolve(this.compileModuleSync(r))}compileModuleAndAllComponentsSync(r){const i=this.compileModuleSync(r),o=zn(en(r).declarations).reduce((a,c)=>{const l=Ce(c);return l&&a.push(new $l(l)),a},[]);return new BH(i,o)}compileModuleAndAllComponentsAsync(r){return Promise.resolve(this.compileModuleAndAllComponentsSync(r))}clearCache(){}clearCacheFor(r){}getModuleId(r){}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),jH=(()=>{class e{constructor(){this.zone=O(Ne),this.changeDetectionScheduler=O(Ia),this.applicationRef=O(ar)}initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function k0({ngZoneFactory:e,ignoreChangesOutsideZone:t,scheduleInRootZone:r}){return e??=()=>new Ne({...P0(),scheduleInRootZone:r}),[{provide:Ne,useFactory:e},{provide:Vr,multi:!0,useFactory:()=>{const i=O(jH,{optional:!0});return()=>i.initialize()}},{provide:Vr,multi:!0,useFactory:()=>{const i=O(HH);return()=>{i.initialize()}}},!0===t?{provide:MT,useValue:!0}:[],{provide:Ov,useValue:r??pS}]}function P0(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}let HH=(()=>{class e{constructor(){this.subscription=new Et,this.initialized=!1,this.zone=O(Ne),this.pendingTasks=O(ro)}initialize(){if(this.initialized)return;this.initialized=!0;let r=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(r=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{Ne.assertNotInAngularZone(),queueMicrotask(()=>{null!==r&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(r),r=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{Ne.assertInAngularZone(),r??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),lu=(()=>{class e{constructor(){this.appRef=O(ar),this.taskService=O(ro),this.ngZone=O(Ne),this.zonelessEnabled=O(Bl),this.disableScheduling=O(MT,{optional:!0})??!1,this.zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run,this.schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}],this.subscriptions=new Et,this.angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Nf):null,this.scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(O(Ov,{optional:!0})??!1),this.cancelScheduledCallback=null,this.useMicrotaskScheduler=!1,this.runningTick=!1,this.pendingRenderTaskId=null,this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{this.runningTick||this.cleanup()})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()})),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof Ty||!this.zoneIsDefined)}notify(r){if(!this.zonelessEnabled&&5===r)return;switch(r){case 0:this.appRef.dirtyFlags|=2;break;case 3:case 2:case 4:case 5:case 1:this.appRef.dirtyFlags|=4;break;case 7:this.appRef.deferredDirtyFlags|=8;break;default:this.appRef.dirtyFlags|=8}if(!this.shouldScheduleTick())return;const i=this.useMicrotaskScheduler?mS:gS;this.pendingRenderTaskId=this.taskService.add(),this.cancelScheduledCallback=this.scheduleInRootZone?Zone.root.run(()=>i(()=>this.tick())):this.ngZone.runOutsideAngular(()=>i(()=>this.tick()))}shouldScheduleTick(){return!(this.disableScheduling||null!==this.pendingRenderTaskId||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(Nf+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;!this.zonelessEnabled&&7&this.appRef.dirtyFlags&&(this.appRef.dirtyFlags|=1);const r=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(i){throw this.taskService.remove(r),i}finally{this.cleanup()}this.useMicrotaskScheduler=!0,mS(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(r)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,null!==this.pendingRenderTaskId){const r=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(r)}}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const fs=new q("",{providedIn:"root",factory:()=>O(fs,Ie.Optional|Ie.SkipSelf)||function zH(){return typeof $localize<"u"&&$localize.locale||Ch}()}),Bh=new q("");function Vh(e){return!e.moduleRef}let uM=(()=>{class e{constructor(r){this._injector=r,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(r,i){const s=i?.scheduleInRootZone,a=i?.ignoreChangesOutsideZone,c=[k0({ngZoneFactory:()=>function gV(e="zone.js",t){return"noop"===e?new Ty:"zone.js"===e?new Ne(t):e}(i?.ngZone,{...P0({eventCoalescing:i?.ngZoneEventCoalescing,runCoalescing:i?.ngZoneRunCoalescing}),scheduleInRootZone:s}),ignoreChangesOutsideZone:a}),{provide:Ia,useExisting:lu}],l=function C4(e,t,r){return new Gv(e,t,r,!1)}(r.moduleType,this.injector,c);return function lM(e){const t=Vh(e)?e.r3Injector:e.moduleRef.injector,r=t.get(Ne);return r.run(()=>{Vh(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();const i=t.get(nr,null);let s;if(r.runOutsideAngular(()=>{s=r.onError.subscribe({next:o=>{i.handleError(o)}})}),Vh(e)){const o=()=>t.destroy(),a=e.platformInjector.get(Bh);a.add(o),t.onDestroy(()=>{s.unsubscribe(),a.delete(o)})}else{const o=()=>e.moduleRef.destroy(),a=e.platformInjector.get(Bh);a.add(o),e.moduleRef.onDestroy(()=>{Lh(e.allPlatformModules,e.moduleRef),s.unsubscribe(),a.delete(o)})}return function LH(e,t,r){try{const i=r();return cu(i)?i.catch(s=>{throw t.runOutsideAngular(()=>e.handleError(s)),s}):i}catch(i){throw t.runOutsideAngular(()=>e.handleError(i)),i}}(i,r,()=>{const o=t.get(eM);return o.runInitializers(),o.donePromise.then(()=>{if(function f$(e){"string"==typeof e&&(wx=e.toLowerCase().replace(/_/g,"-"))}(t.get(fs,Ch)||Ch),Vh(e)){const c=t.get(ar);return void 0!==e.rootComponent&&c.bootstrap(e.rootComponent),c}return function QH(e,t){const r=e.injector.get(ar);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(i=>r.bootstrap(i));else{if(!e.instance.ngDoBootstrap)throw new A(-403,!1);e.instance.ngDoBootstrap(r)}t.push(e)}(e.moduleRef,e.allPlatformModules),e.moduleRef})})})}({moduleRef:l,allPlatformModules:this._modules,platformInjector:this.injector})}bootstrapModule(r,i=[]){const s=nM({},i);return function UH(e,t,r){const i=new Wv(r);return Promise.resolve(i)}(0,0,r).then(o=>this.bootstrapModuleFactory(o,s))}onDestroy(r){this._destroyListeners.push(r)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new A(404,!1);this._modules.slice().forEach(i=>i.destroy()),this._destroyListeners.forEach(i=>i());const r=this._injector.get(Bh,null);r&&(r.forEach(i=>i()),r.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}static{this.\u0275fac=function(i){return new(i||e)(Z(It))}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"platform"})}}return e})(),hs=null;const dM=new q("");function fM(e,t,r=[]){const i=`Platform: ${t}`,s=new q(i);return(o=[])=>{let a=F0();if(!a||a.injector.get(dM,!1)){const c=[...r,...o,{provide:s,useValue:!0}];e?e(c):function YH(e){if(hs&&!hs.get(dM,!1))throw new A(400,!1);(function tM(){!function HF(e){TC=e}(()=>{throw new A(600,!1)})})(),hs=e;const t=e.get(uM);(function pM(e){e.get(jS,null)?.forEach(r=>r())})(e)}(function hM(e=[],t){return It.create({name:t,providers:[{provide:qm,useValue:"platform"},{provide:Bh,useValue:new Set([()=>hs=null])},...e]})}(c,i))}return function JH(){const t=F0();if(!t)throw new A(401,!1);return t}()}}function F0(){return hs?.get(uM)??null}let uu=(()=>{class e{static{this.__NG_ELEMENT_ID__=ez}}return e})();function ez(e){return function tz(e,t,r){if(Ys(e)&&!r){const i=Un(e.index,t);return new Ml(i,i)}return 175&e.type?new Ml(t[ut],t):null}(He(),N(),!(16&~e))}class _M{constructor(){}supports(t){return fh(t)}create(t){return new oz(t)}}const sz=(e,t)=>t;class oz{constructor(t){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||sz}forEachItem(t){let r;for(r=this._itHead;null!==r;r=r._next)t(r)}forEachOperation(t){let r=this._itHead,i=this._removalsHead,s=0,o=null;for(;r||i;){const a=!i||r&&r.currentIndex{a=this._trackByFn(s,c),null!==r&&Object.is(r.trackById,a)?(i&&(r=this._verifyReinsertion(r,c,a,s)),Object.is(r.item,c)||this._addIdentityChange(r,c)):(r=this._mismatch(r,c,a,s),i=!0),r=r._next,s++}),this.length=s;return this._truncate(r),this.collection=t,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let t;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;t=t._nextMoved)t.previousIndex=t.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,r,i,s){let o;return null===t?o=this._itTail:(o=t._prev,this._remove(t)),null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(t.item,r)||this._addIdentityChange(t,r),this._reinsertAfter(t,o,s)):null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(i,s))?(Object.is(t.item,r)||this._addIdentityChange(t,r),this._moveAfter(t,o,s)):t=this._addAfter(new az(r,i),o,s),t}_verifyReinsertion(t,r,i,s){let o=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==o?t=this._reinsertAfter(o,t._prev,s):t.currentIndex!=s&&(t.currentIndex=s,this._addToMoves(t,s)),t}_truncate(t){for(;null!==t;){const r=t._next;this._addToRemovals(this._unlink(t)),t=r}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(t,r,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);const s=t._prevRemoved,o=t._nextRemoved;return null===s?this._removalsHead=o:s._nextRemoved=o,null===o?this._removalsTail=s:o._prevRemoved=s,this._insertAfter(t,r,i),this._addToMoves(t,i),t}_moveAfter(t,r,i){return this._unlink(t),this._insertAfter(t,r,i),this._addToMoves(t,i),t}_addAfter(t,r,i){return this._insertAfter(t,r,i),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t}_insertAfter(t,r,i){const s=null===r?this._itHead:r._next;return t._next=s,t._prev=r,null===s?this._itTail=t:s._prev=t,null===r?this._itHead=t:r._next=t,null===this._linkedRecords&&(this._linkedRecords=new wM),this._linkedRecords.put(t),t.currentIndex=i,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);const r=t._prev,i=t._next;return null===r?this._itHead=i:r._next=i,null===i?this._itTail=r:i._prev=r,t}_addToMoves(t,r){return t.previousIndex===r||(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t),t}_addToRemovals(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new wM),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,r){return t.item=r,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t}}class az{constructor(t,r){this.item=t,this.trackById=r,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class cz{constructor(){this._head=null,this._tail=null}add(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,r){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===r||r<=i.currentIndex)&&Object.is(i.trackById,t))return i;return null}remove(t){const r=t._prevDup,i=t._nextDup;return null===r?this._head=i:r._nextDup=i,null===i?this._tail=r:i._prevDup=r,null===this._head}}class wM{constructor(){this.map=new Map}put(t){const r=t.trackById;let i=this.map.get(r);i||(i=new cz,this.map.set(r,i)),i.add(t)}get(t,r){const s=this.map.get(t);return s?s.get(t,r):null}remove(t){const r=t.trackById;return this.map.get(r).remove(t)&&this.map.delete(r),t}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function bM(e,t,r){const i=e.previousIndex;if(null===i)return i;let s=0;return r&&i{class e{static{this.\u0275prov=H({token:e,providedIn:"root",factory:CM})}constructor(r){this.factories=r}static create(r,i){if(null!=i){const s=i.factories.slice();r=r.concat(s)}return new e(r)}static extend(r){return{provide:e,useFactory:i=>e.create(r,i||CM()),deps:[[e,new Xd,new Jd]]}}find(r){const i=this.factories.find(s=>s.supports(r));if(null!=i)return i;throw new A(901,!1)}}return e})();const hz=fM(null,"core",[]);let pz=(()=>{class e{constructor(r){}static{this.\u0275fac=function(i){return new(i||e)(Z(ar))}}static{this.\u0275mod=Ht({type:e})}static{this.\u0275inj=Nt({})}}return e})();function pu(e,t){mn("NgSignals");const r=function UF(e){const t=Object.create(jF);t.computation=e;const r=()=>{if(wC(t),lm(t),t.value===Bd)throw t.error;return t.value};return r[mr]=t,r}(e);return t?.equal&&(r[mr].equal=t.equal),r}function Jr(e){const t=ve(null);try{return e()}finally{ve(t)}}let WM=null;function ps(){return WM}class Xz{}const on=new q("");let q0=(()=>{class e{historyGo(r){throw new Error("")}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=H({token:e,factory:()=>O(t7),providedIn:"platform"})}}return e})();const e7=new q("");let t7=(()=>{class e extends q0{constructor(){super(),this._doc=O(on),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return ps().getBaseHref(this._doc)}onPopState(r){const i=ps().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",r,!1),()=>i.removeEventListener("popstate",r)}onHashChange(r){const i=ps().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",r,!1),()=>i.removeEventListener("hashchange",r)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(r){this._location.pathname=r}pushState(r,i,s){this._history.pushState(r,i,s)}replaceState(r,i,s){this._history.replaceState(r,i,s)}forward(){this._history.forward()}back(){this._history.back()}historyGo(r=0){this._history.go(r)}getState(){return this._history.state}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=H({token:e,factory:()=>new e,providedIn:"platform"})}}return e})();function G0(e,t){if(0==e.length)return t;if(0==t.length)return e;let r=0;return e.endsWith("/")&&r++,t.startsWith("/")&&r++,2==r?e+t.substring(1):1==r?e+t:e+"/"+t}function ZM(e){const t=e.match(/#|\?|$/),r=t&&t.index||e.length;return e.slice(0,r-("/"===e[r-1]?1:0))+e.slice(r)}function Oi(e){return e&&"?"!==e[0]?"?"+e:e}let wo=(()=>{class e{historyGo(r){throw new Error("")}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=H({token:e,factory:()=>O(QM),providedIn:"root"})}}return e})();const KM=new q("");let QM=(()=>{class e extends wo{constructor(r,i){super(),this._platformLocation=r,this._removeListenerFns=[],this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??O(on).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(r){this._removeListenerFns.push(this._platformLocation.onPopState(r),this._platformLocation.onHashChange(r))}getBaseHref(){return this._baseHref}prepareExternalUrl(r){return G0(this._baseHref,r)}path(r=!1){const i=this._platformLocation.pathname+Oi(this._platformLocation.search),s=this._platformLocation.hash;return s&&r?`${i}${s}`:i}pushState(r,i,s,o){const a=this.prepareExternalUrl(s+Oi(o));this._platformLocation.pushState(r,i,a)}replaceState(r,i,s,o){const a=this.prepareExternalUrl(s+Oi(o));this._platformLocation.replaceState(r,i,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(r=0){this._platformLocation.historyGo?.(r)}static{this.\u0275fac=function(i){return new(i||e)(Z(q0),Z(KM,8))}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),n7=(()=>{class e extends wo{constructor(r,i){super(),this._platformLocation=r,this._baseHref="",this._removeListenerFns=[],null!=i&&(this._baseHref=i)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(r){this._removeListenerFns.push(this._platformLocation.onPopState(r),this._platformLocation.onHashChange(r))}getBaseHref(){return this._baseHref}path(r=!1){const i=this._platformLocation.hash??"#";return i.length>0?i.substring(1):i}prepareExternalUrl(r){const i=G0(this._baseHref,r);return i.length>0?"#"+i:i}pushState(r,i,s,o){let a=this.prepareExternalUrl(s+Oi(o));0==a.length&&(a=this._platformLocation.pathname),this._platformLocation.pushState(r,i,a)}replaceState(r,i,s,o){let a=this.prepareExternalUrl(s+Oi(o));0==a.length&&(a=this._platformLocation.pathname),this._platformLocation.replaceState(r,i,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(r=0){this._platformLocation.historyGo?.(r)}static{this.\u0275fac=function(i){return new(i||e)(Z(q0),Z(KM,8))}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac})}}return e})(),gu=(()=>{class e{constructor(r){this._subject=new dt,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=r;const i=this._locationStrategy.getBaseHref();this._basePath=function s7(e){if(new RegExp("^(https?:)?//").test(e)){const[,r]=e.split(/\/\/[^\/]+/);return r}return e}(ZM(YM(i))),this._locationStrategy.onPopState(s=>{this._subject.emit({url:this.path(!0),pop:!0,state:s.state,type:s.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(r=!1){return this.normalize(this._locationStrategy.path(r))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(r,i=""){return this.path()==this.normalize(r+Oi(i))}normalize(r){return e.stripTrailingSlash(function i7(e,t){if(!e||!t.startsWith(e))return t;const r=t.substring(e.length);return""===r||["/",";","?","#"].includes(r[0])?r:t}(this._basePath,YM(r)))}prepareExternalUrl(r){return r&&"/"!==r[0]&&(r="/"+r),this._locationStrategy.prepareExternalUrl(r)}go(r,i="",s=null){this._locationStrategy.pushState(s,"",r,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(r+Oi(i)),s)}replaceState(r,i="",s=null){this._locationStrategy.replaceState(s,"",r,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(r+Oi(i)),s)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(r=0){this._locationStrategy.historyGo?.(r)}onUrlChange(r){return this._urlChangeListeners.push(r),this._urlChangeSubscription??=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)}),()=>{const i=this._urlChangeListeners.indexOf(r);this._urlChangeListeners.splice(i,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(r="",i){this._urlChangeListeners.forEach(s=>s(r,i))}subscribe(r,i,s){return this._subject.subscribe({next:r,error:i,complete:s})}static{this.normalizeQueryParams=Oi}static{this.joinWithSlash=G0}static{this.stripTrailingSlash=ZM}static{this.\u0275fac=function(i){return new(i||e)(Z(wo))}}static{this.\u0275prov=H({token:e,factory:()=>function r7(){return new gu(Z(wo))}(),providedIn:"root"})}}return e})();function YM(e){return e.replace(/\/index.html$/,"")}class G7{constructor(t,r,i,s){this.$implicit=t,this.ngForOf=r,this.index=i,this.count=s}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let r_=(()=>{class e{set ngForOf(r){this._ngForOf=r,this._ngForOfDirty=!0}set ngForTrackBy(r){this._trackByFn=r}get ngForTrackBy(){return this._trackByFn}constructor(r,i,s){this._viewContainer=r,this._template=i,this._differs=s,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(r){r&&(this._template=r)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const r=this._ngForOf;!this._differ&&r&&(this._differ=this._differs.find(r).create(this.ngForTrackBy))}if(this._differ){const r=this._differ.diff(this._ngForOf);r&&this._applyChanges(r)}}_applyChanges(r){const i=this._viewContainer;r.forEachOperation((s,o,a)=>{if(null==s.previousIndex)i.createEmbeddedView(this._template,new G7(s.item,this._ngForOf,-1,-1),null===a?void 0:a);else if(null==a)i.remove(null===o?void 0:o);else if(null!==o){const c=i.get(o);i.move(c,a),cN(c,s)}});for(let s=0,o=i.length;s{cN(i.get(s.currentIndex),s)})}static ngTemplateContextGuard(r,i){return!0}static{this.\u0275fac=function(i){return new(i||e)(k(rr),k(Ai),k($0))}}static{this.\u0275dir=de({type:e,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0})}}return e})();function cN(e,t){e.context.$implicit=t.item}let op=(()=>{class e{constructor(r,i){this._viewContainer=r,this._context=new W7,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(r){this._context.$implicit=this._context.ngIf=r,this._updateView()}set ngIfThen(r){lN("ngIfThen",r),this._thenTemplateRef=r,this._thenViewRef=null,this._updateView()}set ngIfElse(r){lN("ngIfElse",r),this._elseTemplateRef=r,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(r,i){return!0}static{this.\u0275fac=function(i){return new(i||e)(k(rr),k(Ai))}}static{this.\u0275dir=de({type:e,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0})}}return e})();class W7{constructor(){this.$implicit=null,this.ngIf=null}}function lN(e,t){if(t&&!t.createEmbeddedView)throw new Error(`${e} must be a TemplateRef, but received '${Mt(t)}'.`)}let bo=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=Ht({type:e})}static{this.\u0275inj=Nt({})}}return e})();const fN="browser";function hN(e){return"server"===e}let w9=(()=>{class e{static{this.\u0275prov=H({token:e,providedIn:"root",factory:()=>function _9(e){return e===fN}(O(os))?new b9(O(on),window):new C9})}}return e})();class b9{constructor(t,r){this.document=t,this.window=r,this.offset=()=>[0,0]}setOffset(t){this.offset=Array.isArray(t)?()=>t:t}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(t){this.window.scrollTo(t[0],t[1])}scrollToAnchor(t){const r=function E9(e,t){const r=e.getElementById(t)||e.getElementsByName(t)[0];if(r)return r;if("function"==typeof e.createTreeWalker&&e.body&&"function"==typeof e.body.attachShadow){const i=e.createTreeWalker(e.body,NodeFilter.SHOW_ELEMENT);let s=i.currentNode;for(;s;){const o=s.shadowRoot;if(o){const a=o.getElementById(t)||o.querySelector(`[name="${t}"]`);if(a)return a}s=i.nextNode()}}return null}(this.document,t);r&&(this.scrollToElement(r),r.focus())}setHistoryScrollRestoration(t){this.window.history.scrollRestoration=t}scrollToElement(t){const r=t.getBoundingClientRect(),i=r.left+this.window.pageXOffset,s=r.top+this.window.pageYOffset,o=this.offset();this.window.scrollTo(i-o[0],s-o[1])}}class C9{setOffset(t){}getScrollPosition(){return[0,0]}scrollToPosition(t){}scrollToAnchor(t){}setHistoryScrollRestoration(t){}}class J9 extends Xz{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class d_ extends J9{static makeCurrent(){!function Jz(e){WM??=e}(new d_)}onAndCancel(t,r,i){return t.addEventListener(r,i),()=>{t.removeEventListener(r,i)}}dispatchEvent(t,r){t.dispatchEvent(r)}remove(t){t.remove()}createElement(t,r){return(r=r||this.getDefaultDocument()).createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,r){return"window"===r?window:"document"===r?t:"body"===r?t.body:null}getBaseHref(t){const r=function X9(){return _u=_u||document.querySelector("base"),_u?_u.getAttribute("href"):null}();return null==r?null:function eq(e){return new URL(e,document.baseURI).pathname}(r)}resetBaseElement(){_u=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return function H7(e,t){t=encodeURIComponent(t);for(const r of e.split(";")){const i=r.indexOf("="),[s,o]=-1==i?[r,""]:[r.slice(0,i),r.slice(i+1)];if(s.trim()===t)return decodeURIComponent(o)}return null}(document.cookie,t)}}let _u=null,nq=(()=>{class e{build(){return new XMLHttpRequest}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac})}}return e})();const f_=new q("");let DN=(()=>{class e{constructor(r,i){this._zone=i,this._eventNameToPlugin=new Map,r.forEach(s=>{s.manager=this}),this._plugins=r.slice().reverse()}addEventListener(r,i,s){return this._findPluginFor(i).addEventListener(r,i,s)}getZone(){return this._zone}_findPluginFor(r){let i=this._eventNameToPlugin.get(r);if(i)return i;if(i=this._plugins.find(o=>o.supports(r)),!i)throw new A(5101,!1);return this._eventNameToPlugin.set(r,i),i}static{this.\u0275fac=function(i){return new(i||e)(Z(f_),Z(Ne))}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac})}}return e})();class SN{constructor(t){this._doc=t}}const h_="ng-app-id";let IN=(()=>{class e{constructor(r,i,s,o={}){this.doc=r,this.appId=i,this.nonce=s,this.platformId=o,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=hN(o),this.resetHostNodes()}addStyles(r){for(const i of r)1===this.changeUsageCount(i,1)&&this.onStyleAdded(i)}removeStyles(r){for(const i of r)this.changeUsageCount(i,-1)<=0&&this.onStyleRemoved(i)}ngOnDestroy(){const r=this.styleNodesInDOM;r&&(r.forEach(i=>i.remove()),r.clear());for(const i of this.getAllStyles())this.onStyleRemoved(i);this.resetHostNodes()}addHost(r){this.hostNodes.add(r);for(const i of this.getAllStyles())this.addStyleToHost(r,i)}removeHost(r){this.hostNodes.delete(r)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(r){for(const i of this.hostNodes)this.addStyleToHost(i,r)}onStyleRemoved(r){const i=this.styleRef;i.get(r)?.elements?.forEach(s=>s.remove()),i.delete(r)}collectServerRenderedStyles(){const r=this.doc.head?.querySelectorAll(`style[${h_}="${this.appId}"]`);if(r?.length){const i=new Map;return r.forEach(s=>{null!=s.textContent&&i.set(s.textContent,s)}),i}return null}changeUsageCount(r,i){const s=this.styleRef;if(s.has(r)){const o=s.get(r);return o.usage+=i,o.usage}return s.set(r,{usage:i,elements:[]}),i}getStyleElement(r,i){const s=this.styleNodesInDOM,o=s?.get(i);if(o?.parentNode===r)return s.delete(i),o.removeAttribute(h_),o;{const a=this.doc.createElement("style");return this.nonce&&a.setAttribute("nonce",this.nonce),a.textContent=i,this.platformIsServer&&a.setAttribute(h_,this.appId),r.appendChild(a),a}}addStyleToHost(r,i){const s=this.getStyleElement(r,i),o=this.styleRef,a=o.get(i)?.elements;a?a.push(s):o.set(i,{elements:[s],usage:1})}resetHostNodes(){const r=this.hostNodes;r.clear(),r.add(this.doc.head)}static{this.\u0275fac=function(i){return new(i||e)(Z(on),Z(ya),Z(HS,8),Z(os))}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac})}}return e})();const p_={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},g_=/%COMP%/g,oq=new q("",{providedIn:"root",factory:()=>!0});function xN(e,t){return t.map(r=>r.replace(g_,e))}let m_=(()=>{class e{constructor(r,i,s,o,a,c,l,u=null){this.eventManager=r,this.sharedStylesHost=i,this.appId=s,this.removeStylesOnCompDestroy=o,this.doc=a,this.platformId=c,this.ngZone=l,this.nonce=u,this.rendererByCompId=new Map,this.platformIsServer=hN(c),this.defaultRenderer=new y_(r,a,l,this.platformIsServer)}createRenderer(r,i){if(!r||!i)return this.defaultRenderer;this.platformIsServer&&i.encapsulation===yr.ShadowDom&&(i={...i,encapsulation:yr.Emulated});const s=this.getOrCreateRenderer(r,i);return s instanceof MN?s.applyToHost(r):s instanceof v_&&s.applyStyles(),s}getOrCreateRenderer(r,i){const s=this.rendererByCompId;let o=s.get(i.id);if(!o){const a=this.doc,c=this.ngZone,l=this.eventManager,u=this.sharedStylesHost,d=this.removeStylesOnCompDestroy,f=this.platformIsServer;switch(i.encapsulation){case yr.Emulated:o=new MN(l,u,i,this.appId,d,a,c,f);break;case yr.ShadowDom:return new uq(l,u,r,i,a,c,this.nonce,f);default:o=new v_(l,u,i,d,a,c,f)}s.set(i.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}static{this.\u0275fac=function(i){return new(i||e)(Z(DN),Z(IN),Z(ya),Z(oq),Z(on),Z(os),Z(Ne),Z(HS))}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac})}}return e})();class y_{constructor(t,r,i,s){this.eventManager=t,this.doc=r,this.ngZone=i,this.platformIsServer=s,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(t,r){return r?this.doc.createElementNS(p_[r]||r,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,r){(AN(t)?t.content:t).appendChild(r)}insertBefore(t,r,i){t&&(AN(t)?t.content:t).insertBefore(r,i)}removeChild(t,r){r.remove()}selectRootElement(t,r){let i="string"==typeof t?this.doc.querySelector(t):t;if(!i)throw new A(-5104,!1);return r||(i.textContent=""),i}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,r,i,s){if(s){r=s+":"+r;const o=p_[s];o?t.setAttributeNS(o,r,i):t.setAttribute(r,i)}else t.setAttribute(r,i)}removeAttribute(t,r,i){if(i){const s=p_[i];s?t.removeAttributeNS(s,r):t.removeAttribute(`${i}:${r}`)}else t.removeAttribute(r)}addClass(t,r){t.classList.add(r)}removeClass(t,r){t.classList.remove(r)}setStyle(t,r,i,s){s&(as.DashCase|as.Important)?t.style.setProperty(r,i,s&as.Important?"important":""):t.style[r]=i}removeStyle(t,r,i){i&as.DashCase?t.style.removeProperty(r):t.style[r]=""}setProperty(t,r,i){null!=t&&(t[r]=i)}setValue(t,r){t.nodeValue=r}listen(t,r,i){if("string"==typeof t&&!(t=ps().getGlobalEventTarget(this.doc,t)))throw new Error(`Unsupported event target ${t} for event ${r}`);return this.eventManager.addEventListener(t,r,this.decoratePreventDefault(i))}decoratePreventDefault(t){return r=>{if("__ngUnwrap__"===r)return t;!1===(this.platformIsServer?this.ngZone.runGuarded(()=>t(r)):t(r))&&r.preventDefault()}}}function AN(e){return"TEMPLATE"===e.tagName&&void 0!==e.content}class uq extends y_{constructor(t,r,i,s,o,a,c,l){super(t,o,a,l),this.sharedStylesHost=r,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const u=xN(s.id,s.styles);for(const d of u){const f=document.createElement("style");c&&f.setAttribute("nonce",c),f.textContent=d,this.shadowRoot.appendChild(f)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,r){return super.appendChild(this.nodeOrShadowRoot(t),r)}insertBefore(t,r,i){return super.insertBefore(this.nodeOrShadowRoot(t),r,i)}removeChild(t,r){return super.removeChild(null,r)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class v_ extends y_{constructor(t,r,i,s,o,a,c,l){super(t,o,a,c),this.sharedStylesHost=r,this.removeStylesOnCompDestroy=s,this.styles=l?xN(l,i.styles):i.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}}class MN extends v_{constructor(t,r,i,s,o,a,c,l){const u=s+"-"+i.id;super(t,r,i,o,a,c,l,u),this.contentAttr=function aq(e){return"_ngcontent-%COMP%".replace(g_,e)}(u),this.hostAttr=function cq(e){return"_nghost-%COMP%".replace(g_,e)}(u)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,r){const i=super.createElement(t,r);return super.setAttribute(i,this.contentAttr,""),i}}let dq=(()=>{class e extends SN{constructor(r){super(r)}supports(r){return!0}addEventListener(r,i,s){return r.addEventListener(i,s,!1),()=>this.removeEventListener(r,i,s)}removeEventListener(r,i,s){return r.removeEventListener(i,s)}static{this.\u0275fac=function(i){return new(i||e)(Z(on))}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac})}}return e})();const NN=["alt","control","meta","shift"],fq={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},hq={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey};let pq=(()=>{class e extends SN{constructor(r){super(r)}supports(r){return null!=e.parseEventName(r)}addEventListener(r,i,s){const o=e.parseEventName(i),a=e.eventCallback(o.fullKey,s,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>ps().onAndCancel(r,o.domEventName,a))}static parseEventName(r){const i=r.toLowerCase().split("."),s=i.shift();if(0===i.length||"keydown"!==s&&"keyup"!==s)return null;const o=e._normalizeKey(i.pop());let a="",c=i.indexOf("code");if(c>-1&&(i.splice(c,1),a="code."),NN.forEach(u=>{const d=i.indexOf(u);d>-1&&(i.splice(d,1),a+=u+".")}),a+=o,0!=i.length||0===o.length)return null;const l={};return l.domEventName=s,l.fullKey=a,l}static matchEventFullKeyCode(r,i){let s=fq[r.key]||r.key,o="";return i.indexOf("code.")>-1&&(s=r.code,o="code."),!(null==s||!s)&&(s=s.toLowerCase()," "===s?s="space":"."===s&&(s="dot"),NN.forEach(a=>{a!==s&&(0,hq[a])(r)&&(o+=a+".")}),o+=s,o===i)}static eventCallback(r,i,s){return o=>{e.matchEventFullKeyCode(o,r)&&s.runGuarded(()=>i(o))}}static _normalizeKey(r){return"esc"===r?"escape":r}static{this.\u0275fac=function(i){return new(i||e)(Z(on))}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac})}}return e})();const ON=[{provide:os,useValue:fN},{provide:jS,useValue:function gq(){d_.makeCurrent()},multi:!0},{provide:on,useFactory:function yq(){return function BV(e){Oy=e}(document),document},deps:[]}],vq=fM(hz,"browser",ON),_q=new q(""),kN=[{provide:kh,useClass:class tq{addToWindow(t){ct.getAngularTestability=(i,s=!0)=>{const o=t.findTestabilityInTree(i,s);if(null==o)throw new A(5103,!1);return o},ct.getAllAngularTestabilities=()=>t.getAllTestabilities(),ct.getAllAngularRootElements=()=>t.getAllRootElements(),ct.frameworkStabilizers||(ct.frameworkStabilizers=[]),ct.frameworkStabilizers.push(i=>{const s=ct.getAllAngularTestabilities();let o=s.length;const a=function(){o--,0==o&&i()};s.forEach(c=>{c.whenStable(a)})})}findTestabilityInTree(t,r,i){return null==r?null:t.getTestability(r)??(i?ps().isShadowRoot(r)?this.findTestabilityInTree(t,r.host,!0):this.findTestabilityInTree(t,r.parentElement,!0):null)}},deps:[]},{provide:JA,useClass:M0,deps:[Ne,N0,kh]},{provide:M0,useClass:M0,deps:[Ne,N0,kh]}],PN=[{provide:qm,useValue:"root"},{provide:nr,useFactory:function mq(){return new nr},deps:[]},{provide:f_,useClass:dq,multi:!0,deps:[on,Ne,os]},{provide:f_,useClass:pq,multi:!0,deps:[on]},m_,IN,DN,{provide:oh,useExisting:m_},{provide:class D9{},useClass:nq,deps:[]},[]];let LN=(()=>{class e{constructor(r){}static withServerTransition(r){return{ngModule:e,providers:[{provide:ya,useValue:r.appId}]}}static{this.\u0275fac=function(i){return new(i||e)(Z(_q,12))}}static{this.\u0275mod=Ht({type:e})}static{this.\u0275inj=Nt({providers:[...PN,...kN],imports:[bo,pz]})}}return e})(),wq=(()=>{class e{constructor(r){this._doc=r}getTitle(){return this._doc.title}setTitle(r){this._doc.title=r||""}static{this.\u0275fac=function(i){return new(i||e)(Z(on))}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),VN=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=H({token:e,factory:function(i){let s=null;return s=i?new(i||e):Z(Dq),s},providedIn:"root"})}}return e})(),Dq=(()=>{class e extends VN{constructor(r){super(),this._doc=r}sanitize(r,i){if(null==i)return null;switch(r){case Hn.NONE:return i;case Hn.HTML:return qr(i,"HTML")?$n(i):fI(this._doc,String(i)).toString();case Hn.STYLE:return qr(i,"Style")?$n(i):i;case Hn.SCRIPT:if(qr(i,"Script"))return $n(i);throw new A(5200,!1);case Hn.URL:return qr(i,"URL")?$n(i):$f(String(i));case Hn.RESOURCE_URL:if(qr(i,"ResourceURL"))return $n(i);throw new A(5201,!1);default:throw new A(5202,!1)}}bypassSecurityTrustHtml(r){return function s8(e){return new XV(e)}(r)}bypassSecurityTrustStyle(r){return function o8(e){return new e8(e)}(r)}bypassSecurityTrustScript(r){return function a8(e){return new t8(e)}(r)}bypassSecurityTrustUrl(r){return function c8(e){return new n8(e)}(r)}bypassSecurityTrustResourceUrl(r){return function l8(e){return new r8(e)}(r)}static{this.\u0275fac=function(i){return new(i||e)(Z(on))}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),__=(()=>{class e{constructor(){this.wannachatStatusDefaultTimeoutInSeconds=20}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac})}}return e})(),Sq=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=Ht({type:e})}static{this.\u0275inj=Nt({providers:[__],imports:[bo]})}}return e})();function UN(e,t,r,i,s,o,a){try{var c=e[o](a),l=c.value}catch(u){return void r(u)}c.done?t(l):Promise.resolve(l).then(i,s)}function U(e){return function(){var t=this,r=arguments;return new Promise(function(i,s){var o=e.apply(t,r);function a(l){UN(o,i,s,a,c,"next",l)}function c(l){UN(o,i,s,a,c,"throw",l)}a(void 0)})}}function w_(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function b_(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function wu(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}const E_="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,C_=e=>e instanceof Uint8Array,D_=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),Xr=(e,t)=>e<<32-t|e>>>t;if(68!==new Uint8Array(new Uint32Array([287454020]).buffer)[0])throw new Error("Non little-endian hardware is not supported");function bu(e){if("string"==typeof e&&(e=function Aq(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}(e)),!C_(e))throw new Error("expected Uint8Array, got "+typeof e);return e}class HN{clone(){return this._cloneInto()}}function Rq(e){const t=i=>e().update(bu(i)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function zN(e=32){if(E_&&"function"==typeof E_.getRandomValues)return E_.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}class kq extends HN{constructor(t,r,i,s){super(),this.blockLen=t,this.outputLen=r,this.padOffset=i,this.isLE=s,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=D_(this.buffer)}update(t){wu(this);const{view:r,buffer:i,blockLen:s}=this,o=(t=bu(t)).length;for(let a=0;as-a&&(this.process(i,0),a=0);for(let f=a;f>s&o),c=Number(r&o),u=i?0:4;e.setUint32(t+(i?4:0),a,i),e.setUint32(t+u,c,i)})(i,s-8,BigInt(8*this.length),o),this.process(i,0);const c=D_(t),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=l/4,d=this.get();if(u>d.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;fe&t^~e&r,Lq=(e,t,r)=>e&t^e&r^t&r,Fq=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),gs=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ms=new Uint32Array(64);class qN extends kq{constructor(){super(64,32,8,!1),this.A=0|gs[0],this.B=0|gs[1],this.C=0|gs[2],this.D=0|gs[3],this.E=0|gs[4],this.F=0|gs[5],this.G=0|gs[6],this.H=0|gs[7]}get(){const{A:t,B:r,C:i,D:s,E:o,F:a,G:c,H:l}=this;return[t,r,i,s,o,a,c,l]}set(t,r,i,s,o,a,c,l){this.A=0|t,this.B=0|r,this.C=0|i,this.D=0|s,this.E=0|o,this.F=0|a,this.G=0|c,this.H=0|l}process(t,r){for(let f=0;f<16;f++,r+=4)ms[f]=t.getUint32(r,!1);for(let f=16;f<64;f++){const h=ms[f-15],p=ms[f-2],g=Xr(h,7)^Xr(h,18)^h>>>3,m=Xr(p,17)^Xr(p,19)^p>>>10;ms[f]=m+ms[f-7]+g+ms[f-16]|0}let{A:i,B:s,C:o,D:a,E:c,F:l,G:u,H:d}=this;for(let f=0;f<64;f++){const p=d+(Xr(c,6)^Xr(c,11)^Xr(c,25))+Pq(c,l,u)+Fq[f]+ms[f]|0,m=(Xr(i,2)^Xr(i,13)^Xr(i,22))+Lq(i,s,o)|0;d=u,u=l,l=c,c=a+p|0,a=o,o=s,s=i,i=p+m|0}i=i+this.A|0,s=s+this.B|0,o=o+this.C|0,a=a+this.D|0,c=c+this.E|0,l=l+this.F|0,u=u+this.G|0,d=d+this.H|0,this.set(i,s,o,a,c,l,u,d)}roundClean(){ms.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const I_=Rq(()=>new qN),dp=(BigInt(0),BigInt(1)),Bq=BigInt(2),fp=e=>e instanceof Uint8Array,Vq=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function nc(e){if(!fp(e))throw new Error("Uint8Array expected");let t="";for(let r=0;ri+s.length,0));let r=0;return e.forEach(i=>{if(!fp(i))throw new Error("Uint8Array expected");t.set(i,r),r+=i.length}),t}const A_=e=>(Bq<new Uint8Array(e),ZN=e=>Uint8Array.from(e);function KN(e,t,r){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof r)throw new Error("hmacFn must be a function");let i=M_(e),s=M_(e),o=0;const a=()=>{i.fill(1),s.fill(0),o=0},c=(...f)=>r(s,i,...f),l=(f=M_())=>{s=c(ZN([0]),f),i=c(),0!==f.length&&(s=c(ZN([1]),f),i=c())},u=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let f=0;const h=[];for(;f{let p;for(a(),l(f);!(p=h(u()));)l();return a(),p}}const jq={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||e instanceof Uint8Array,isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};function Eu(e,t,r={}){const i=(s,o,a)=>{const c=jq[o];if("function"!=typeof c)throw new Error(`Invalid validator "${o}", expected function`);const l=e[s];if(!(a&&void 0===l||c(l,e)))throw new Error(`Invalid param ${String(s)}=${l} (${typeof l}), expected ${o}`)};for(const[s,o]of Object.entries(t))i(s,o,!1);for(const[s,o]of Object.entries(r))i(s,o,!0);return e}const Bt=BigInt(0),Qe=BigInt(1),vs=BigInt(2),$q=BigInt(3),N_=BigInt(4),QN=BigInt(5),YN=BigInt(8);function Vt(e,t){const r=e%t;return r>=Bt?r:t+r}function qq(e,t,r){if(r<=Bt||t 0");if(r===Qe)return Bt;let i=Qe;for(;t>Bt;)t&Qe&&(i=i*e%r),e=e*e%r,t>>=Qe;return i}function ur(e,t,r){let i=e;for(;t-- >Bt;)i*=i,i%=r;return i}function hp(e,t){if(e===Bt||t<=Bt)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=Vt(e,t),i=t,s=Bt,o=Qe,a=Qe,c=Bt;for(;r!==Bt;){const u=i/r,d=i%r,f=s-a*u,h=o-c*u;i=r,r=d,s=a,o=c,a=f,c=h}if(i!==Qe)throw new Error("invert: does not exist");return Vt(s,t)}BigInt(9),BigInt(16);const Zq=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function R_(e,t){const r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function JN(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function XN(e){const t=JN(e);return t+Math.ceil(t/2)}class eR extends HN{constructor(t,r){super(),this.finished=!1,this.destroyed=!1,function jN(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");w_(e.outputLen),w_(e.blockLen)}(t);const i=bu(r);if(this.iHash=t.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,o=new Uint8Array(s);o.set(i.length>s?t.create().update(i).digest():i);for(let a=0;anew eR(e,t).update(r).digest();tR.create=(e,t)=>new eR(e,t);const eG=BigInt(0),O_=BigInt(1);function nR(e){return function Kq(e){Eu(e,Zq.reduce((i,s)=>(i[s]="function",i),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"}))}(e.Fp),Eu(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...R_(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}const{Ph:rG,aT:iG}=Wc,Do={Err:class extends Error{constructor(t=""){super(t)}},_parseInt(e){const{Err:t}=Do;if(e.length<2||2!==e[0])throw new t("Invalid signature integer tag");const r=e[1],i=e.subarray(2,r+2);if(!r||i.length!==r)throw new t("Invalid signature integer: wrong length");if(128&i[0])throw new t("Invalid signature integer: negative");if(0===i[0]&&!(128&i[1]))throw new t("Invalid signature integer: unnecessary leading zero");return{d:rG(i),l:e.subarray(r+2)}},toSig(e){const{Err:t}=Do,r="string"==typeof e?iG(e):e;if(!(r instanceof Uint8Array))throw new Error("ui8a expected");let i=r.length;if(i<2||48!=r[0])throw new t("Invalid signature tag");if(r[1]!==i-2)throw new t("Invalid signature: incorrect length");const{d:s,l:o}=Do._parseInt(r.subarray(2)),{d:a,l:c}=Do._parseInt(o);if(c.length)throw new t("Invalid signature: left bytes after parsing");return{r:s,s:a}},hexFromSig(e){const t=u=>8&Number.parseInt(u[0],16)?"00"+u:u,r=u=>{const d=u.toString(16);return 1&d.length?`0${d}`:d},i=t(r(e.s)),s=t(r(e.r)),o=i.length/2,a=s.length/2,c=r(o),l=r(a);return`30${r(a+o+4)}02${l}${s}02${c}${i}`}},Tr=BigInt(0),pt=BigInt(1),pp=(BigInt(2),BigInt(3));function aG(e){const t=function oG(e){const t=nR(e);return Eu(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:r,n:i}=t,s=r.BYTES+1,o=2*r.BYTES+1;function c(I){return Vt(I,i)}function l(I){return hp(I,i)}const{ProjectivePoint:u,normPrivateKeyToScalar:d,weierstrassEquation:f,isWithinCurveOrder:h}=function sG(e){const t=function nG(e){const t=nR(e);Eu(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:i,a:s}=t;if(r){if(!i.eql(s,i.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:r}=t,i=t.toBytes||((g,m,y)=>{const _=m.toAffine();return Co(Uint8Array.from([4]),r.toBytes(_.x),r.toBytes(_.y))}),s=t.fromBytes||(g=>{const m=g.subarray(1);return{x:r.fromBytes(m.subarray(0,r.BYTES)),y:r.fromBytes(m.subarray(r.BYTES,2*r.BYTES))}});function o(g){const{a:m,b:y}=t,_=r.sqr(g),v=r.mul(_,g);return r.add(r.add(v,r.mul(g,m)),y)}if(!r.eql(r.sqr(t.Gy),o(t.Gx)))throw new Error("bad generator point: equation left != right");function a(g){return"bigint"==typeof g&&Trr.eql(w,r.ZERO);return v(y)&&v(_)?f.ZERO:new f(y,_,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(m){const y=r.invertBatch(m.map(_=>_.pz));return m.map((_,v)=>_.toAffine(y[v])).map(f.fromAffine)}static fromHex(m){const y=f.fromAffine(s(an("pointHex",m)));return y.assertValidity(),y}static fromPrivateKey(m){return f.BASE.multiply(l(m))}_setWindowSize(m){this._WINDOW_SIZE=m,u.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!r.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:m,y}=this.toAffine();if(!r.isValid(m)||!r.isValid(y))throw new Error("bad point: x or y not FE");const _=r.sqr(y),v=o(m);if(!r.eql(_,v))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:m}=this.toAffine();if(r.isOdd)return!r.isOdd(m);throw new Error("Field doesn't support isOdd")}equals(m){d(m);const{px:y,py:_,pz:v}=this,{px:w,py:b,pz:D}=m,C=r.eql(r.mul(y,D),r.mul(w,v)),S=r.eql(r.mul(_,D),r.mul(b,v));return C&&S}negate(){return new f(this.px,r.neg(this.py),this.pz)}double(){const{a:m,b:y}=t,_=r.mul(y,pp),{px:v,py:w,pz:b}=this;let D=r.ZERO,C=r.ZERO,S=r.ZERO,T=r.mul(v,v),P=r.mul(w,w),$=r.mul(b,b),V=r.mul(v,w);return V=r.add(V,V),S=r.mul(v,b),S=r.add(S,S),D=r.mul(m,S),C=r.mul(_,$),C=r.add(D,C),D=r.sub(P,C),C=r.add(P,C),C=r.mul(D,C),D=r.mul(V,D),S=r.mul(_,S),$=r.mul(m,$),V=r.sub(T,$),V=r.mul(m,V),V=r.add(V,S),S=r.add(T,T),T=r.add(S,T),T=r.add(T,$),T=r.mul(T,V),C=r.add(C,T),$=r.mul(w,b),$=r.add($,$),T=r.mul($,V),D=r.sub(D,T),S=r.mul($,P),S=r.add(S,S),S=r.add(S,S),new f(D,C,S)}add(m){d(m);const{px:y,py:_,pz:v}=this,{px:w,py:b,pz:D}=m;let C=r.ZERO,S=r.ZERO,T=r.ZERO;const P=t.a,$=r.mul(t.b,pp);let V=r.mul(y,w),j=r.mul(_,b),X=r.mul(v,D),L=r.add(y,_),I=r.add(w,b);L=r.mul(L,I),I=r.add(V,j),L=r.sub(L,I),I=r.add(y,v);let E=r.add(w,D);return I=r.mul(I,E),E=r.add(V,X),I=r.sub(I,E),E=r.add(_,v),C=r.add(b,D),E=r.mul(E,C),C=r.add(j,X),E=r.sub(E,C),T=r.mul(P,I),C=r.mul($,X),T=r.add(C,T),C=r.sub(j,T),T=r.add(j,T),S=r.mul(C,T),j=r.add(V,V),j=r.add(j,V),X=r.mul(P,X),I=r.mul($,I),j=r.add(j,X),X=r.sub(V,X),X=r.mul(P,X),I=r.add(I,X),V=r.mul(j,I),S=r.add(S,V),V=r.mul(E,I),C=r.mul(L,C),C=r.sub(C,V),V=r.mul(L,j),T=r.mul(E,T),T=r.add(T,V),new f(C,S,T)}subtract(m){return this.add(m.negate())}is0(){return this.equals(f.ZERO)}wNAF(m){return p.wNAFCached(this,u,m,y=>{const _=r.invertBatch(y.map(v=>v.pz));return y.map((v,w)=>v.toAffine(_[w])).map(f.fromAffine)})}multiplyUnsafe(m){const y=f.ZERO;if(m===Tr)return y;if(c(m),m===pt)return this;const{endo:_}=t;if(!_)return p.unsafeLadder(this,m);let{k1neg:v,k1:w,k2neg:b,k2:D}=_.splitScalar(m),C=y,S=y,T=this;for(;w>Tr||D>Tr;)w&pt&&(C=C.add(T)),D&pt&&(S=S.add(T)),T=T.double(),w>>=pt,D>>=pt;return v&&(C=C.negate()),b&&(S=S.negate()),S=new f(r.mul(S.px,_.beta),S.py,S.pz),C.add(S)}multiply(m){c(m);let _,v,y=m;const{endo:w}=t;if(w){const{k1neg:b,k1:D,k2neg:C,k2:S}=w.splitScalar(y);let{p:T,f:P}=this.wNAF(D),{p:$,f:V}=this.wNAF(S);T=p.constTimeNegate(b,T),$=p.constTimeNegate(C,$),$=new f(r.mul($.px,w.beta),$.py,$.pz),_=T.add($),v=P.add(V)}else{const{p:b,f:D}=this.wNAF(y);_=b,v=D}return f.normalizeZ([_,v])[0]}multiplyAndAddUnsafe(m,y,_){const v=f.BASE,w=(D,C)=>C!==Tr&&C!==pt&&D.equals(v)?D.multiply(C):D.multiplyUnsafe(C),b=w(this,y).add(w(m,_));return b.is0()?void 0:b}toAffine(m){const{px:y,py:_,pz:v}=this,w=this.is0();null==m&&(m=w?r.ONE:r.inv(v));const b=r.mul(y,m),D=r.mul(_,m),C=r.mul(v,m);if(w)return{x:r.ZERO,y:r.ZERO};if(!r.eql(C,r.ONE))throw new Error("invZ was invalid");return{x:b,y:D}}isTorsionFree(){const{h:m,isTorsionFree:y}=t;if(m===pt)return!0;if(y)return y(f,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:m,clearCofactor:y}=t;return m===pt?this:y?y(f,this):this.multiplyUnsafe(t.h)}toRawBytes(m=!0){return this.assertValidity(),i(f,this,m)}toHex(m=!0){return nc(this.toRawBytes(m))}}f.BASE=new f(t.Gx,t.Gy,r.ONE),f.ZERO=new f(r.ZERO,r.ONE,r.ZERO);const h=t.nBitLength,p=function tG(e,t){const r=(s,o)=>{const a=o.negate();return s?a:o},i=s=>({windows:Math.ceil(t/s)+1,windowSize:2**(s-1)});return{constTimeNegate:r,unsafeLadder(s,o){let a=e.ZERO,c=s;for(;o>eG;)o&O_&&(a=a.add(c)),c=c.double(),o>>=O_;return a},precomputeWindow(s,o){const{windows:a,windowSize:c}=i(o),l=[];let u=s,d=u;for(let f=0;f>=p,y>l&&(y-=h,a+=O_);const _=m,v=m+Math.abs(y)-1,b=y<0;0===y?d=d.add(r(g%2!=0,o[_])):u=u.add(r(b,o[v]))}return{p:u,f:d}},wNAFCached(s,o,a,c){const l=s._WINDOW_SIZE||1;let u=o.get(s);return u||(u=this.precomputeWindow(s,l),1!==l&&o.set(s,c(u))),this.wNAF(l,u,a)}}}(f,t.endo?Math.ceil(h/2):h);return{CURVE:t,ProjectivePoint:f,normPrivateKeyToScalar:l,weierstrassEquation:o,isWithinCurveOrder:a}}({...t,toBytes(I,E,x){const R=E.toAffine(),M=r.toBytes(R.x),G=Co;return x?G(Uint8Array.from([E.hasEvenY()?2:3]),M):G(Uint8Array.from([4]),M,r.toBytes(R.y))},fromBytes(I){const E=I.length,x=I[0],R=I.subarray(1);if(E!==s||2!==x&&3!==x){if(E===o&&4===x)return{x:r.fromBytes(R.subarray(0,r.BYTES)),y:r.fromBytes(R.subarray(r.BYTES,2*r.BYTES))};throw new Error(`Point of length ${E} was invalid. Expected ${s} compressed bytes or ${o} uncompressed bytes`)}{const M=Nn(R);if(!function a(I){return Trnc(ys(I,t.nByteLength));function g(I){return I>i>>pt}const y=(I,E,x)=>Nn(I.slice(E,x));class _{constructor(E,x,R){this.r=E,this.s=x,this.recovery=R,this.assertValidity()}static fromCompact(E){const x=t.nByteLength;return E=an("compactSignature",E,2*x),new _(y(E,0,x),y(E,x,2*x))}static fromDER(E){const{r:x,s:R}=Do.toSig(an("DER",E));return new _(x,R)}assertValidity(){if(!h(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!h(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(E){return new _(this.r,this.s,E)}recoverPublicKey(E){const{r:x,s:R,recovery:M}=this,G=S(an("msgHash",E));if(null==M||![0,1,2,3].includes(M))throw new Error("recovery id invalid");const J=2===M||3===M?x+t.n:x;if(J>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const Se=u.fromHex((1&M?"03":"02")+p(J)),ue=l(J),gt=c(-G*ue),ht=c(R*ue),Ae=u.BASE.multiplyAndAddUnsafe(Se,gt,ht);if(!Ae)throw new Error("point at infinify");return Ae.assertValidity(),Ae}hasHighS(){return g(this.s)}normalizeS(){return this.hasHighS()?new _(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return rc(this.toDERHex())}toDERHex(){return Do.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return rc(this.toCompactHex())}toCompactHex(){return p(this.r)+p(this.s)}}const v={isValidPrivateKey(I){try{return d(I),!0}catch{return!1}},normPrivateKeyToScalar:d,randomPrivateKey:()=>{const I=XN(t.n);return function Xq(e,t,r=!1){const i=e.length,s=JN(t),o=XN(t);if(i<16||i1024)throw new Error(`expected ${o}-1024 bytes of input, got ${i}`);const c=Vt(r?Nn(e):T_(e),t-Qe)+Qe;return r?x_(c,s):ys(c,s)}(t.randomBytes(I),t.n)},precompute:(I=8,E=u.BASE)=>(E._setWindowSize(I),E.multiply(BigInt(3)),E)};function b(I){const E=I instanceof Uint8Array,x="string"==typeof I,R=(E||x)&&I.length;return E?R===s||R===o:x?R===2*s||R===2*o:I instanceof u}const C=t.bits2int||function(I){const E=Nn(I),x=8*I.length-t.nBitLength;return x>0?E>>BigInt(x):E},S=t.bits2int_modN||function(I){return c(C(I))},T=A_(t.nBitLength);function P(I){if("bigint"!=typeof I)throw new Error("bigint expected");if(!(Tr<=I&&IOe in x))throw new Error("sign() legacy options not supported");const{hash:R,randomBytes:M}=t;let{lowS:G,prehash:J,extraEntropy:ee}=x;null==G&&(G=!0),I=an("msgHash",I),J&&(I=an("prehashed msgHash",R(I)));const Se=S(I),ue=d(E),gt=[P(ue),P(Se)];if(null!=ee){const Oe=!0===ee?M(r.BYTES):ee;gt.push(an("extraEntropy",Oe))}const ht=Co(...gt),Ae=Se;return{seed:ht,k2sig:function ot(Oe){const Ln=C(Oe);if(!h(Ln))return;const Jt=l(Ln),Xt=u.BASE.multiply(Ln).toAffine(),Fr=c(Xt.x);if(Fr===Tr)return;const Ko=c(Jt*c(Ae+Fr*ue));if(Ko===Tr)return;let Rd=(Xt.x===Fr?0:2)|Number(Xt.y&pt),FF=Ko;return G&&g(Ko)&&(FF=function m(I){return g(I)?c(-I):I}(Ko),Rd^=1),new _(Fr,FF,Rd)}}}(I,E,x);return KN(t.hash.outputLen,t.nByteLength,t.hmac)(R,M)},verify:function L(I,E,x,R=j){const M=I;if(E=an("msgHash",E),x=an("publicKey",x),"strict"in R)throw new Error("options.strict was renamed to lowS");const{lowS:G,prehash:J}=R;let ee,Se;try{if("string"==typeof M||M instanceof Uint8Array)try{ee=_.fromDER(M)}catch(Xt){if(!(Xt instanceof Do.Err))throw Xt;ee=_.fromCompact(M)}else{if("object"!=typeof M||"bigint"!=typeof M.r||"bigint"!=typeof M.s)throw new Error("PARSE");{const{r:Xt,s:Fr}=M;ee=new _(Xt,Fr)}}Se=u.fromHex(x)}catch(Xt){if("PARSE"===Xt.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(G&&ee.hasHighS())return!1;J&&(E=t.hash(E));const{r:ue,s:gt}=ee,ht=S(E),Ae=l(gt),ot=c(ht*Ae),Oe=c(ue*Ae),Ln=u.BASE.multiplyAndAddUnsafe(Se,ot,Oe)?.toAffine();return!!Ln&&c(Ln.x)===ue},ProjectivePoint:u,Signature:_,utils:v}}function lG(e){return{hash:e,hmac:(t,...r)=>tR(e,t,function Mq(...e){const t=new Uint8Array(e.reduce((i,s)=>i+s.length,0));let r=0;return e.forEach(i=>{if(!C_(i))throw new Error("Uint8Array expected");t.set(i,r),r+=i.length}),t}(...r)),randomBytes:zN}}BigInt(4);const gp=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),mp=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),iR=BigInt(1),yp=BigInt(2),sR=(e,t)=>(e+t/yp)/t;function oR(e){const t=gp,r=BigInt(3),i=BigInt(6),s=BigInt(11),o=BigInt(22),a=BigInt(23),c=BigInt(44),l=BigInt(88),u=e*e*e%t,d=u*u*e%t,f=ur(d,r,t)*d%t,h=ur(f,r,t)*d%t,p=ur(h,yp,t)*u%t,g=ur(p,s,t)*p%t,m=ur(g,o,t)*g%t,y=ur(m,c,t)*m%t,_=ur(y,l,t)*y%t,v=ur(_,c,t)*m%t,w=ur(v,r,t)*d%t,b=ur(w,a,t)*g%t,D=ur(b,i,t)*u%t,C=ur(D,yp,t);if(!k_.eql(k_.sqr(C),e))throw new Error("Cannot find square root");return C}const k_=function Jq(e,t,r=!1,i={}){if(e<=Bt)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:s,nByteLength:o}=R_(e,t);if(o>2048)throw new Error("Field lengths over 2048 bytes are not supported");const a=function Wq(e){if(e%N_===$q){const t=(e+Qe)/N_;return function(i,s){const o=i.pow(s,t);if(!i.eql(i.sqr(o),s))throw new Error("Cannot find square root");return o}}if(e%YN===QN){const t=(e-QN)/YN;return function(i,s){const o=i.mul(s,vs),a=i.pow(o,t),c=i.mul(s,a),l=i.mul(i.mul(c,vs),a),u=i.mul(c,i.sub(l,i.ONE));if(!i.eql(i.sqr(u),s))throw new Error("Cannot find square root");return u}}return function Gq(e){const t=(e-Qe)/vs;let r,i,s;for(r=e-Qe,i=0;r%vs===Bt;r/=vs,i++);for(s=vs;sVt(l,e),isValid:l=>{if("bigint"!=typeof l)throw new Error("Invalid field element: expected bigint, got "+typeof l);return Bt<=l&&ll===Bt,isOdd:l=>(l&Qe)===Qe,neg:l=>Vt(-l,e),eql:(l,u)=>l===u,sqr:l=>Vt(l*l,e),add:(l,u)=>Vt(l+u,e),sub:(l,u)=>Vt(l-u,e),mul:(l,u)=>Vt(l*u,e),pow:(l,u)=>function Qq(e,t,r){if(r 0");if(r===Bt)return e.ONE;if(r===Qe)return t;let i=e.ONE,s=t;for(;r>Bt;)r&Qe&&(i=e.mul(i,s)),s=e.sqr(s),r>>=Qe;return i}(c,l,u),div:(l,u)=>Vt(l*hp(u,e),e),sqrN:l=>l*l,addN:(l,u)=>l+u,subN:(l,u)=>l-u,mulN:(l,u)=>l*u,inv:l=>hp(l,e),sqrt:i.sqrt||(l=>a(c,l)),invertBatch:l=>function Yq(e,t){const r=new Array(t.length),i=t.reduce((o,a,c)=>e.is0(a)?o:(r[c]=o,e.mul(o,a)),e.ONE),s=e.inv(i);return t.reduceRight((o,a,c)=>e.is0(a)?o:(r[c]=e.mul(o,r[c]),e.mul(o,a)),s),r}(c,l),cmov:(l,u,d)=>d?u:l,toBytes:l=>r?x_(l,o):ys(l,o),fromBytes:l=>{if(l.length!==o)throw new Error(`Fp.fromBytes: expected ${o}, got ${l.length}`);return r?T_(l):Nn(l)}});return Object.freeze(c)}(gp,void 0,void 0,{sqrt:oR}),ic=function uG(e,t){const r=i=>aG({...e,...lG(i)});return Object.freeze({...r(t),create:r})}({a:BigInt(0),b:BigInt(7),Fp:k_,n:mp,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=mp,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),i=-iR*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=r,a=BigInt("0x100000000000000000000000000000000"),c=sR(o*e,t),l=sR(-i*e,t);let u=Vt(e-c*r-l*s,t),d=Vt(-c*i-l*o,t);const f=u>a,h=d>a;if(f&&(u=t-u),h&&(d=t-d),u>a||d>a)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:f,k1:u,k2neg:h,k2:d}}}},I_),vp=BigInt(0),aR=e=>"bigint"==typeof e&&vps.charCodeAt(0)));r=Co(i,i),cR[e]=r}return I_(Co(r,...t))}const P_=e=>e.toRawBytes(!0).slice(1),L_=e=>ys(e,32),F_=e=>Vt(e,gp),Cu=e=>Vt(e,mp),B_=ic.ProjectivePoint;function V_(e){let t=ic.utils.normPrivateKeyToScalar(e),r=B_.fromPrivateKey(t);return{scalar:r.hasEvenY()?t:Cu(-t),bytes:P_(r)}}function lR(e){if(!aR(e))throw new Error("bad x: need 0 < x < p");const t=F_(e*e);let i=oR(F_(t*e+BigInt(7)));i%yp!==vp&&(i=F_(-i));const s=new B_(e,i,iR);return s.assertValidity(),s}function uR(...e){return Cu(Nn(_p("BIP0340/challenge",...e)))}function dR(e,t,r){const i=an("signature",e,64),s=an("message",t),o=an("publicKey",r,32);try{const a=lR(Nn(o)),c=Nn(i.subarray(0,32));if(!aR(c))return!1;const l=Nn(i.subarray(32,64));if(!(e=>"bigint"==typeof e&&vpB_.BASE.multiplyAndAddUnsafe(e,t,r))(a,l,Cu(-u));return!(!d||!d.hasEvenY()||d.toAffine().x!==c)}catch{return!1}}const Du={getPublicKey:function hG(e){return V_(e).bytes},sign:function pG(e,t,r=zN(32)){const i=an("message",e),{bytes:s,scalar:o}=V_(t),a=an("auxRand",r,32),c=L_(o^Nn(_p("BIP0340/aux",a))),l=_p("BIP0340/nonce",c,s,i),u=Cu(Nn(l));if(u===vp)throw new Error("sign failed: k is zero");const{bytes:d,scalar:f}=V_(u),h=uR(d,s,i),p=new Uint8Array(64);if(p.set(d,0),p.set(L_(Cu(f+h*o)),32),!dR(p,i,s))throw new Error("sign: Invalid signature produced");return p},verify:dR,utils:{randomPrivateKey:ic.utils.randomPrivateKey,lift_x:lR,pointToBytes:P_,numberToBytesBE:ys,bytesToNumberBE:Nn,taggedHash:_p,mod:Vt}},U_="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,j_=e=>e instanceof Uint8Array,$_=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),ei=(e,t)=>e<<32-t|e>>>t;if(68!==new Uint8Array(new Uint32Array([287454020]).buffer)[0])throw new Error("Non little-endian hardware is not supported");const gG=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Rn(e){if(!j_(e))throw new Error("Uint8Array expected");let t="";for(let r=0;ri+s.length,0));let r=0;return e.forEach(i=>{if(!j_(i))throw new Error("Uint8Array expected");t.set(i,r),r+=i.length}),t}class fR{clone(){return this._cloneInto()}}function hR(e){const t=i=>e().update(So(i)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function pR(e=32){if(U_&&"function"==typeof U_.getRandomValues)return U_.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}function z_(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function gR(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}const ti={number:z_,bool:function _G(e){if("boolean"!=typeof e)throw new Error(`Expected boolean, not ${e}`)},bytes:gR,hash:function wG(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");z_(e.outputLen),z_(e.blockLen)},exists:function bG(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")},output:function EG(e,t){gR(e);const r=t.outputLen;if(e.lengths-a&&(this.process(i,0),a=0);for(let f=a;f>s&o),c=Number(r&o),u=i?0:4;e.setUint32(t+(i?4:0),a,i),e.setUint32(t+u,c,i)})(i,s-8,BigInt(8*this.length),o),this.process(i,0);const c=$_(t),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=l/4,d=this.get();if(u>d.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;fe&t^~e&r,IG=(e,t,r)=>e&t^e&r^t&r,TG=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),ws=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),bs=new Uint32Array(64);class mR extends DG{constructor(){super(64,32,8,!1),this.A=0|ws[0],this.B=0|ws[1],this.C=0|ws[2],this.D=0|ws[3],this.E=0|ws[4],this.F=0|ws[5],this.G=0|ws[6],this.H=0|ws[7]}get(){const{A:t,B:r,C:i,D:s,E:o,F:a,G:c,H:l}=this;return[t,r,i,s,o,a,c,l]}set(t,r,i,s,o,a,c,l){this.A=0|t,this.B=0|r,this.C=0|i,this.D=0|s,this.E=0|o,this.F=0|a,this.G=0|c,this.H=0|l}process(t,r){for(let f=0;f<16;f++,r+=4)bs[f]=t.getUint32(r,!1);for(let f=16;f<64;f++){const h=bs[f-15],p=bs[f-2],g=ei(h,7)^ei(h,18)^h>>>3,m=ei(p,17)^ei(p,19)^p>>>10;bs[f]=m+bs[f-7]+g+bs[f-16]|0}let{A:i,B:s,C:o,D:a,E:c,F:l,G:u,H:d}=this;for(let f=0;f<64;f++){const p=d+(ei(c,6)^ei(c,11)^ei(c,25))+SG(c,l,u)+TG[f]+bs[f]|0,m=(ei(i,2)^ei(i,13)^ei(i,22))+IG(i,s,o)|0;d=u,u=l,l=c,c=a+p|0,a=o,o=s,s=i,i=p+m|0}i=i+this.A|0,s=s+this.B|0,o=o+this.C|0,a=a+this.D|0,c=c+this.E|0,l=l+this.F|0,u=u+this.G|0,d=d+this.H|0,this.set(i,s,o,a,c,l,u,d)}roundClean(){bs.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class xG extends mR{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}const Su=hR(()=>new mR);function Io(e){if(!Number.isSafeInteger(e))throw new Error(`Wrong integer: ${e}`)}function xr(...e){const t=(s,o)=>a=>s(o(a));return{encode:Array.from(e).reverse().reduce((s,o)=>s?t(s,o.encode):o.encode,void 0),decode:e.reduce((s,o)=>s?t(s,o.decode):o.decode,void 0)}}function ni(e){return{encode:t=>{if(!Array.isArray(t)||t.length&&"number"!=typeof t[0])throw new Error("alphabet.encode input should be an array of numbers");return t.map(r=>{if(Io(r),r<0||r>=e.length)throw new Error(`Digit index outside alphabet: ${r} (alphabet: ${e.length})`);return e[r]})},decode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw new Error("alphabet.decode input should be array of strings");return t.map(r=>{if("string"!=typeof r)throw new Error(`alphabet.decode: not string element=${r}`);const i=e.indexOf(r);if(-1===i)throw new Error(`Unknown letter: "${r}". Allowed: ${e}`);return i})}}}function ri(e=""){if("string"!=typeof e)throw new Error("join separator should be string");return{encode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw new Error("join.encode input should be array of strings");for(let r of t)if("string"!=typeof r)throw new Error(`join.encode: non-string input=${r}`);return t.join(e)},decode:t=>{if("string"!=typeof t)throw new Error("join.decode input should be string");return t.split(e)}}}function Iu(e,t="="){if(Io(e),"string"!=typeof t)throw new Error("padding chr should be string");return{encode(r){if(!Array.isArray(r)||r.length&&"string"!=typeof r[0])throw new Error("padding.encode input should be array of strings");for(let i of r)if("string"!=typeof i)throw new Error(`padding.encode: non-string input=${i}`);for(;r.length*e%8;)r.push(t);return r},decode(r){if(!Array.isArray(r)||r.length&&"string"!=typeof r[0])throw new Error("padding.encode input should be array of strings");for(let s of r)if("string"!=typeof s)throw new Error(`padding.decode: non-string input=${s}`);let i=r.length;if(i*e%8)throw new Error("Invalid padding: string should have whole number of bytes");for(;i>0&&r[i-1]===t;i--)if(!((i-1)*e%8))throw new Error("Invalid padding: string has too much padding");return r.slice(0,i)}}}function yR(e){if("function"!=typeof e)throw new Error("normalize fn should be function");return{encode:t=>t,decode:t=>e(t)}}function vR(e,t,r){if(t<2)throw new Error(`convertRadix: wrong from=${t}, base cannot be less than 2`);if(r<2)throw new Error(`convertRadix: wrong to=${r}, base cannot be less than 2`);if(!Array.isArray(e))throw new Error("convertRadix: data should be array");if(!e.length)return[];let i=0;const s=[],o=Array.from(e);for(o.forEach(a=>{if(Io(a),a<0||a>=t)throw new Error(`Wrong integer: ${a}`)});;){let a=0,c=!0;for(let l=i;lnew xG);const _R=(e,t)=>t?_R(t,e%t):e,bp=(e,t)=>e+(t-_R(e,t));function q_(e,t,r,i){if(!Array.isArray(e))throw new Error("convertRadix2: data should be array");if(t<=0||t>32)throw new Error(`convertRadix2: wrong from=${t}`);if(r<=0||r>32)throw new Error(`convertRadix2: wrong to=${r}`);if(bp(t,r)>32)throw new Error(`convertRadix2: carry overflow from=${t} to=${r} carryBits=${bp(t,r)}`);let s=0,o=0;const a=2**r-1,c=[];for(const l of e){if(Io(l),l>=2**t)throw new Error(`convertRadix2: invalid data word=${l} from=${t}`);if(s=s<32)throw new Error(`convertRadix2: carry overflow pos=${o} from=${t}`);for(o+=t;o>=r;o-=r)c.push((s>>o-r&a)>>>0);s&=2**o-1}if(s=s<=t)throw new Error("Excess padding");if(!i&&s)throw new Error(`Non-zero padding: ${s}`);return i&&o>0&&c.push(s>>>0),c}function Li(e,t=!1){if(Io(e),e<=0||e>32)throw new Error("radix2: bits should be in (0..32]");if(bp(8,e)>32||bp(e,8)>32)throw new Error("radix2: carry overflow");return{encode:r=>{if(!(r instanceof Uint8Array))throw new Error("radix2.encode input should be Uint8Array");return q_(Array.from(r),8,e,!t)},decode:r=>{if(!Array.isArray(r)||r.length&&"number"!=typeof r[0])throw new Error("radix2.decode input should be array of strings");return Uint8Array.from(q_(r,e,8,t))}}}function bR(e){if("function"!=typeof e)throw new Error("unsafeWrapper fn should be function");return function(...t){try{return e.apply(null,t)}catch{}}}xr(Li(4),ni("0123456789ABCDEF"),ri("")),xr(Li(5),ni("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),Iu(5),ri("")),xr(Li(5),ni("0123456789ABCDEFGHIJKLMNOPQRSTUV"),Iu(5),ri("")),xr(Li(5),ni("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),ri(""),yR(e=>e.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1")));const Fi=xr(Li(6),ni("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),Iu(6),ri("")),G_=(xr(Li(6),ni("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),Iu(6),ri("")),e=>xr(function wR(e){return Io(e),{encode:t=>{if(!(t instanceof Uint8Array))throw new Error("radix.encode input should be Uint8Array");return vR(Array.from(t),256,e)},decode:t=>{if(!Array.isArray(t)||t.length&&"number"!=typeof t[0])throw new Error("radix.decode input should be array of strings");return Uint8Array.from(vR(t,e,256))}}}(58),ni(e),ri(""))),W_=(G_("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),G_("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),G_("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz"),xr(ni("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),ri(""))),DR=[996825010,642813549,513874426,1027748829,705979059];function Tu(e){const t=e>>25;let r=(33554431&e)<<5;for(let i=0;i>i&1)&&(r^=DR[i]);return r}function SR(e,t,r=1){const i=e.length;let s=1;for(let o=0;o126)throw new Error(`Invalid prefix (${e})`);s=Tu(s)^a>>5}s=Tu(s);for(let o=0;of)throw new TypeError(`Wrong string length: ${d.length} (${d}). Expected (8..${f})`);const h=d.toLowerCase();if(d!==h&&d!==d.toUpperCase())throw new Error("String must be lowercase or uppercase");const p=(d=h).lastIndexOf("1");if(0===p||-1===p)throw new Error('Letter "1" must be present between prefix and data only');const g=d.slice(0,p),m=d.slice(p+1);if(m.length<6)throw new Error("Data must be at least 6 characters long");const y=W_.decode(m).slice(0,-6),_=SR(g,y,t);if(!m.endsWith(_))throw new Error(`Invalid checksum in ${d}: expected "${_}"`);return{prefix:g,words:y}}return{encode:function a(d,f,h=90){if("string"!=typeof d)throw new Error("bech32.encode prefix should be string, not "+typeof d);if(!Array.isArray(f)||f.length&&"number"!=typeof f[0])throw new Error("bech32.encode words should be array of numbers, not "+typeof f);const p=d.length+7+f.length;if(!1!==h&&p>h)throw new TypeError(`Length ${p} exceeds limit ${h}`);return`${d=d.toLowerCase()}1${W_.encode(f)}${SR(d,f,t)}`},decode:c,decodeToBytes:function u(d){const{prefix:f,words:h}=c(d,!1);return{prefix:f,words:h,bytes:i(h)}},decodeUnsafe:bR(c),fromWords:i,fromWordsUnsafe:o,toWords:s}}const oc=IR("bech32");function ac(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function Z_(e){if("boolean"!=typeof e)throw new Error(`boolean expected, not ${e}`)}function xR(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}function xe(e,...t){if(!xR(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function To(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Dp(e,t){xe(e);const r=t.outputLen;if(e.length{if("string"!=typeof e||e.length%2)throw new TypeError(`hex.decode: expected string, got ${typeof e} with length ${e.length}`);return e.toLowerCase()}));const Te=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),cc=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);if(68!==new Uint8Array(new Uint32Array([287454020]).buffer)[0])throw new Error("Non little-endian hardware is not supported");function Es(e){if("string"==typeof e)e=function jG(e){if("string"!=typeof e)throw new Error("string expected, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}(e);else{if(!xR(e))throw new Error("Uint8Array expected, got "+typeof e);e=e.slice()}return e}function Sp(e,t){if(e.length!==t.length)return!1;let r=0;for(let i=0;i(Object.assign(t,e),t);function xo(e,t,r,i){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,i);const s=BigInt(32),o=BigInt(4294967295),a=Number(r>>s&o),c=Number(r&o),u=i?0:4;e.setUint32(t+(i?4:0),a,i),e.setUint32(t+u,c,i)}const Y_=new Uint8Array(16),ii=Te(Y_),zG=(e,t,r,i)=>({s3:r<<31|i>>>1,s2:t<<31|r>>>1,s1:e<<31|t>>>1,s0:e>>>1^225<<24&-(1&i)}),dr=e=>(e>>>0&255)<<24|(e>>>8&255)<<16|(e>>>16&255)<<8|e>>>24&255;class MR{constructor(t,r){this.blockLen=16,this.outputLen=16,this.s0=0,this.s1=0,this.s2=0,this.s3=0,this.finished=!1,xe(t=Es(t),16);const i=cc(t);let s=i.getUint32(0,!1),o=i.getUint32(4,!1),a=i.getUint32(8,!1),c=i.getUint32(12,!1);const l=[];for(let g=0;g<128;g++)l.push({s0:dr(s),s1:dr(o),s2:dr(a),s3:dr(c)}),({s0:s,s1:o,s2:a,s3:c}=zG(s,o,a,c));const u=(e=r||1024)>65536?8:e>1024?4:2;var e;if(![1,2,4,8].includes(u))throw new Error(`ghash: wrong window size=${u}, should be 2, 4 or 8`);this.W=u;const f=128/u,h=this.windowSize=2**u,p=[];for(let g=0;g>>u-b-1&1))continue;const{s0:C,s1:S,s2:T,s3:P}=l[u*g+b];y^=C,_^=S,v^=T,w^=P}p.push({s0:y,s1:_,s2:v,s3:w})}this.t=p}_updateBlock(t,r,i,s){t^=this.s0,r^=this.s1,i^=this.s2,s^=this.s3;const{W:o,t:a,windowSize:c}=this;let l=0,u=0,d=0,f=0;const h=(1<>>8*m&255;for(let _=8/o-1;_>=0;_--){const v=y>>>o*_&h,{s0:w,s1:b,s2:D,s3:C}=a[p*c+v];l^=w,u^=b,d^=D,f^=C,p+=1}}this.s0=l,this.s1=u,this.s2=d,this.s3=f}update(t){t=Es(t),To(this);const r=Te(t),i=Math.floor(t.length/16),s=t.length%16;for(let o=0;o>>1|r,r=(1&s)<<7}return e[0]^=225&-t,e}((t=Es(t)).slice());super(i,r),i.fill(0)}update(t){t=Es(t),To(this);const r=Te(t),i=t.length%16,s=Math.floor(t.length/16);for(let o=0;oe(s,i.length).update(Es(i)).digest(),r=e(new Uint8Array(16),0);return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=(i,s)=>e(i,s),t}NR((e,t)=>new MR(e,t)),NR((e,t)=>new WG(e,t)),new Uint8Array(16);const KG=283;function X_(e){return e<<1^KG&-(e>>7)}function lc(e,t){let r=0;for(;t>0;t>>=1)r^=e&-(1&t),e=X_(e);return r}const ew=(()=>{let e=new Uint8Array(256);for(let r=0,i=1;r<256;r++,i^=X_(i))e[r]=i;const t=new Uint8Array(256);t[0]=99;for(let r=0;r<255;r++){let i=e[255-r];i|=i<<8,t[e[r]]=255&(i^i>>4^i>>5^i>>6^i>>7^99)}return t})(),QG=ew.map((e,t)=>ew.indexOf(t)),YG=e=>e<<24|e>>>8,tw=e=>e<<8|e>>>24;function OR(e,t){if(256!==e.length)throw new Error("Wrong sbox length");const r=new Uint32Array(256).map((u,d)=>t(e[d])),i=r.map(tw),s=i.map(tw),o=s.map(tw),a=new Uint32Array(65536),c=new Uint32Array(65536),l=new Uint16Array(65536);for(let u=0;u<256;u++)for(let d=0;d<256;d++){const f=256*u+d;a[f]=r[u]^i[d],c[f]=s[u]^o[d],l[f]=e[u]<<8|e[d]}return{sbox:e,sbox2:l,T0:r,T1:i,T2:s,T3:o,T01:a,T23:c}}const nw=OR(ew,e=>lc(e,3)<<24|e<<16|e<<8|lc(e,2)),kR=OR(QG,e=>lc(e,11)<<24|lc(e,13)<<16|lc(e,9)<<8|lc(e,14)),JG=(()=>{const e=new Uint8Array(16);for(let t=0,r=1;t<16;t++,r=X_(r))e[t]=r;return e})();function Ui(e){xe(e);const t=e.length;if(![16,24,32].includes(t))throw new Error(`aes: wrong key size: should be 16, 24 or 32, got: ${t}`);const{sbox2:r}=nw,i=Te(e),s=i.length,o=c=>si(r,c,c,c,c),a=new Uint32Array(t+28);a.set(i);for(let c=s;c6&&c%s==4&&(l=o(l)),a[c]=a[c-s]^l}return a}function Ds(e,t,r,i,s,o){return e[r<<8&65280|i>>>8&255]^t[s>>>8&65280|o>>>24&255]}function si(e,t,r,i,s){return e[255&t|65280&r]|e[i>>>16&255|s>>>16&65280]<<16}function On(e,t,r,i,s){const{sbox2:o,T01:a,T23:c}=nw;let l=0;t^=e[l++],r^=e[l++],i^=e[l++],s^=e[l++];const u=e.length/4-2;for(let g=0;g{const c=Ui(t),{b:l,o:u,out:d}=function FR(e,t,r){let i=e.length;const s=i%16;if(!t&&0!==s)throw new Error("aec/(cbc-ecb): unpadded plaintext with disabled padding");const o=Te(e);if(t){let l=16-s;l||(l=16),i+=l}const a=uc(i,r);return{b:o,o:Te(a),out:a}}(o,s,a),f=Te(r);let h=f[0],p=f[1],g=f[2],m=f[3],y=0;for(;y+4<=l.length;)h^=l[y+0],p^=l[y+1],g^=l[y+2],m^=l[y+3],({s0:h,s1:p,s2:g,s3:m}=On(c,h,p,g,m)),u[y++]=h,u[y++]=p,u[y++]=g,u[y++]=m;if(s){const _=function VR(e){const t=new Uint8Array(16),r=Te(t);t.set(e);const i=16-e.length;for(let s=16-i;s<16;s++)t[s]=i;return r}(o.subarray(4*y));h^=_[0],p^=_[1],g^=_[2],m^=_[3],({s0:h,s1:p,s2:g,s3:m}=On(c,h,p,g,m)),u[y++]=h,u[y++]=p,u[y++]=g,u[y++]=m}return c.fill(0),d},decrypt:(o,a)=>{!function LR(e){if(xe(e),e.length%16!=0)throw new Error("aes/(cbc-ecb).decrypt ciphertext should consist of blocks with size 16")}(o);const c=function rw(e){const t=Ui(e),r=t.slice(),i=t.length,{sbox2:s}=nw,{T0:o,T1:a,T2:c,T3:l}=kR;for(let u=0;u>>8&255]^c[f>>>16&255]^l[f>>>24]}return r}(t),l=Te(r),u=uc(o.length,a),d=Te(o),f=Te(u);let h=l[0],p=l[1],g=l[2],m=l[3];for(let y=0;y+4<=d.length;){const _=h,v=p,w=g,b=m;h=d[y+0],p=d[y+1],g=d[y+2],m=d[y+3];const{s0:D,s1:C,s2:S,s3:T}=Tp(c,h,p,g,m);f[y++]=D^_,f[y++]=C^v,f[y++]=S^w,f[y++]=T^b}return c.fill(0),function BR(e,t){if(!t)return e;const r=e.length;if(!r)throw new Error("aes/pcks5: empty ciphertext not allowed");const i=e[r-1];if(i<=0||i>16)throw new Error(`aes/pcks5: wrong padding byte: ${i}`);const s=e.subarray(0,-i);for(let o=0;o255&e[t++]|(255&e[t++])<<8;class tW{constructor(t){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,xe(t=Es(t),32);const r=Qt(t,0),i=Qt(t,2),s=Qt(t,4),o=Qt(t,6),a=Qt(t,8),c=Qt(t,10),l=Qt(t,12),u=Qt(t,14);this.r[0]=8191&r,this.r[1]=8191&(r>>>13|i<<3),this.r[2]=7939&(i>>>10|s<<6),this.r[3]=8191&(s>>>7|o<<9),this.r[4]=255&(o>>>4|a<<12),this.r[5]=a>>>1&8190,this.r[6]=8191&(a>>>14|c<<2),this.r[7]=8065&(c>>>11|l<<5),this.r[8]=8191&(l>>>8|u<<8),this.r[9]=u>>>5&127;for(let d=0;d<8;d++)this.pad[d]=Qt(t,16+2*d)}process(t,r,i=!1){const s=i?0:2048,{h:o,r:a}=this,c=a[0],l=a[1],u=a[2],d=a[3],f=a[4],h=a[5],p=a[6],g=a[7],m=a[8],y=a[9],_=Qt(t,r+0),v=Qt(t,r+2),w=Qt(t,r+4),b=Qt(t,r+6),D=Qt(t,r+8),C=Qt(t,r+10),S=Qt(t,r+12),T=Qt(t,r+14);let P=o[0]+(8191&_),$=o[1]+(8191&(_>>>13|v<<3)),V=o[2]+(8191&(v>>>10|w<<6)),j=o[3]+(8191&(w>>>7|b<<9)),X=o[4]+(8191&(b>>>4|D<<12)),L=o[5]+(D>>>1&8191),I=o[6]+(8191&(D>>>14|C<<2)),E=o[7]+(8191&(C>>>11|S<<5)),x=o[8]+(8191&(S>>>8|T<<8)),R=o[9]+(T>>>5|s),M=0,G=M+P*c+$*(5*y)+V*(5*m)+j*(5*g)+X*(5*p);M=G>>>13,G&=8191,G+=L*(5*h)+I*(5*f)+E*(5*d)+x*(5*u)+R*(5*l),M+=G>>>13,G&=8191;let J=M+P*l+$*c+V*(5*y)+j*(5*m)+X*(5*g);M=J>>>13,J&=8191,J+=L*(5*p)+I*(5*h)+E*(5*f)+x*(5*d)+R*(5*u),M+=J>>>13,J&=8191;let ee=M+P*u+$*l+V*c+j*(5*y)+X*(5*m);M=ee>>>13,ee&=8191,ee+=L*(5*g)+I*(5*p)+E*(5*h)+x*(5*f)+R*(5*d),M+=ee>>>13,ee&=8191;let Se=M+P*d+$*u+V*l+j*c+X*(5*y);M=Se>>>13,Se&=8191,Se+=L*(5*m)+I*(5*g)+E*(5*p)+x*(5*h)+R*(5*f),M+=Se>>>13,Se&=8191;let ue=M+P*f+$*d+V*u+j*l+X*c;M=ue>>>13,ue&=8191,ue+=L*(5*y)+I*(5*m)+E*(5*g)+x*(5*p)+R*(5*h),M+=ue>>>13,ue&=8191;let gt=M+P*h+$*f+V*d+j*u+X*l;M=gt>>>13,gt&=8191,gt+=L*c+I*(5*y)+E*(5*m)+x*(5*g)+R*(5*p),M+=gt>>>13,gt&=8191;let ht=M+P*p+$*h+V*f+j*d+X*u;M=ht>>>13,ht&=8191,ht+=L*l+I*c+E*(5*y)+x*(5*m)+R*(5*g),M+=ht>>>13,ht&=8191;let Ae=M+P*g+$*p+V*h+j*f+X*d;M=Ae>>>13,Ae&=8191,Ae+=L*u+I*l+E*c+x*(5*y)+R*(5*m),M+=Ae>>>13,Ae&=8191;let ot=M+P*m+$*g+V*p+j*h+X*f;M=ot>>>13,ot&=8191,ot+=L*d+I*u+E*l+x*c+R*(5*y),M+=ot>>>13,ot&=8191;let Oe=M+P*y+$*m+V*g+j*p+X*h;M=Oe>>>13,Oe&=8191,Oe+=L*f+I*d+E*u+x*l+R*c,M+=Oe>>>13,Oe&=8191,M=(M<<2)+M|0,M=M+G|0,G=8191&M,M>>>=13,J+=M,o[0]=G,o[1]=J,o[2]=ee,o[3]=Se,o[4]=ue,o[5]=gt,o[6]=ht,o[7]=Ae,o[8]=ot,o[9]=Oe}finalize(){const{h:t,pad:r}=this,i=new Uint16Array(10);let s=t[1]>>>13;t[1]&=8191;for(let c=2;c<10;c++)t[c]+=s,s=t[c]>>>13,t[c]&=8191;t[0]+=5*s,s=t[0]>>>13,t[0]&=8191,t[1]+=s,s=t[1]>>>13,t[1]&=8191,t[2]+=s,i[0]=t[0]+5,s=i[0]>>>13,i[0]&=8191;for(let c=1;c<10;c++)i[c]=t[c]+s,s=i[c]>>>13,i[c]&=8191;i[9]-=8192;let o=(1^s)-1;for(let c=0;c<10;c++)i[c]&=o;o=~o;for(let c=0;c<10;c++)t[c]=t[c]&o|i[c];t[0]=65535&(t[0]|t[1]<<13),t[1]=65535&(t[1]>>>3|t[2]<<10),t[2]=65535&(t[2]>>>6|t[3]<<7),t[3]=65535&(t[3]>>>9|t[4]<<4),t[4]=65535&(t[4]>>>12|t[5]<<1|t[6]<<14),t[5]=65535&(t[6]>>>2|t[7]<<11),t[6]=65535&(t[7]>>>5|t[8]<<8),t[7]=65535&(t[8]>>>8|t[9]<<5);let a=t[0]+r[0];t[0]=65535&a;for(let c=1;c<8;c++)a=(t[c]+r[c]|0)+(a>>>16)|0,t[c]=65535&a}update(t){To(this);const{buffer:r,blockLen:i}=this,s=(t=Es(t)).length;for(let o=0;o>>0,t[o++]=i[a]>>>8;return t}digest(){const{buffer:t,outputLen:r}=this;this.digestInto(t);const i=t.slice(0,r);return this.destroy(),i}}const rW=function nW(e){const t=(i,s)=>e(s).update(Es(i)).digest(),r=e(new Uint8Array(32));return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=i=>e(i),t}(e=>new tW(e)),HR=e=>Uint8Array.from(e.split("").map(t=>t.charCodeAt(0))),iW=HR("expand 16-byte k"),sW=HR("expand 32-byte k"),oW=Te(iW),zR=Te(sW);function Q(e,t){return e<>>32-t}function iw(e){return e.byteOffset%4==0}zR.slice();const qR=2**32-1,GR=new Uint32Array;function xu(e,t){const{allowShortKeys:r,extendNonceFn:i,counterLength:s,counterRight:o,rounds:a}=function $G(e,t){if(null==t||"object"!=typeof t)throw new Error("options must be defined");return Object.assign(e,t)}({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if("function"!=typeof e)throw new Error("core must be a function");return ac(s),ac(a),Z_(o),Z_(r),(c,l,u,d,f=0)=>{xe(c),xe(l),xe(u);const h=u.length;if(d||(d=new Uint8Array(h)),xe(d),ac(f),f<0||f>=qR)throw new Error("arx: counter overflow");if(d.length=qR)throw new Error("arx: counter overflow");const m=Math.min(64,l-g);if(f&&64===m){const y=g/4;if(g%4!=0)throw new Error("arx: invalid block position");for(let v,_=0;_<16;_++)v=y+_,p[v]=h[v]^d[_];g+=64}else{for(let _,y=0;y0;)p.pop().fill(0);return d}}function Au(e,t,r,i,s,o=20){let a=e[0],c=e[1],l=e[2],u=e[3],d=t[0],f=t[1],h=t[2],p=t[3],g=t[4],m=t[5],y=t[6],_=t[7],v=s,w=r[0],b=r[1],D=r[2],C=a,S=c,T=l,P=u,$=d,V=f,j=h,X=p,L=g,I=m,E=y,x=_,R=v,M=w,G=b,J=D;for(let Se=0;Se{e.update(t);const r=t.length%16;r&&e.update(dW.subarray(r))},fW=new Uint8Array(32);function ZR(e,t,r,i,s){const o=e(t,r,fW),a=rW.create(o);s&&WR(a,s),WR(a,i);const c=new Uint8Array(16),l=cc(c);xo(l,0,BigInt(s?s.length:0),!0),xo(l,8,BigInt(i.length),!0),a.update(c);const u=a.digest();return o.fill(0),u}const KR=e=>(t,r,i)=>(xe(t,32),xe(r),{encrypt:(o,a)=>{const c=o.length,l=c+16;a?xe(a,l):a=new Uint8Array(l),e(t,r,o,a,1);const u=ZR(e,t,r,a.subarray(0,-16),i);return a.set(u,c),a},decrypt:(o,a)=>{const c=o.length,l=c-16;if(c<16)throw new Error("encrypted data must be at least 16 bytes");a?xe(a,l):a=new Uint8Array(l);const u=o.subarray(0,-16);if(!Sp(o.subarray(-16),ZR(e,t,r,u,i)))throw new Error("invalid tag");return e(t,r,u,a,1),a}});KR(sw),KR(uW);class QR extends fR{constructor(t,r){super(),this.finished=!1,this.destroyed=!1,ti.hash(t);const i=So(r);if(this.iHash=t.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,o=new Uint8Array(s);o.set(i.length>s?t.create().update(i).digest():i);for(let a=0;anew QR(e,t).update(r).digest();Mp.create=(e,t)=>new QR(e,t);const ow=new Uint8Array([0]),JR=new Uint8Array;var hW=Object.defineProperty,bt=(e,t)=>{for(var r in t)hW(e,r,{get:t[r],enumerable:!0})},Ao=Symbol("verified"),pW=e=>e instanceof Object;function eO(e){if(!pW(e)||"number"!=typeof e.kind||"string"!=typeof e.content||"number"!=typeof e.created_at||"string"!=typeof e.pubkey||!e.pubkey.match(/^[a-f0-9]{64}$/)||!Array.isArray(e.tags))return!1;for(let t=0;tnO,QueueNode:()=>tO,binarySearch:()=>aw,insertEventIntoAscendingList:()=>yW,insertEventIntoDescendingList:()=>mW,normalizeURL:()=>fc,utf8Decoder:()=>ji,utf8Encoder:()=>oi});var ji=new TextDecoder("utf-8"),oi=new TextEncoder;function fc(e){-1===e.indexOf("://")&&(e="wss://"+e);let t=new URL(e);return t.pathname=t.pathname.replace(/\/+/g,"/"),t.pathname.endsWith("/")&&(t.pathname=t.pathname.slice(0,-1)),("80"===t.port&&"ws:"===t.protocol||"443"===t.port&&"wss:"===t.protocol)&&(t.port=""),t.searchParams.sort(),t.hash="",t.toString()}function mW(e,t){const[r,i]=aw(e,s=>t.id===s.id?0:t.created_at===s.created_at?-1:s.created_at-t.created_at);return i||e.splice(r,0,t),e}function yW(e,t){const[r,i]=aw(e,s=>t.id===s.id?0:t.created_at===s.created_at?-1:t.created_at-s.created_at);return i||e.splice(r,0,t),e}function aw(e,t){let r=0,i=e.length-1;for(;r<=i;){const s=Math.floor((r+i)/2),o=t(e[s]);if(0===o)return[s,!0];o<0?i=s-1:r=s+1}return[r,!1]}var tO=class{value;next=null;prev=null;constructor(e){this.value=e}},nO=class{first;last;constructor(){this.first=null,this.last=null}enqueue(e){const t=new tO(e);return this.last?this.last===this.first?(this.last=t,this.last.prev=this.first,this.first.next=t):(t.prev=this.last,this.last.next=t,this.last=t):(this.first=t,this.last=t),!0}dequeue(){if(!this.first)return null;if(this.first===this.last){const t=this.first;return this.first=null,this.last=null,t.value}const e=this.first;return this.first=e.next,e.value}};function Np(e){let t=Su(oi.encode(function _W(e){if(!eO(e))throw new Error("can't serialize event with wrong or missing properties");return JSON.stringify([0,e.pubkey,e.created_at,e.kind,e.tags,e.content])}(e)));return Rn(t)}var Rp=new class{generateSecretKey(){return Du.utils.randomPrivateKey()}getPublicKey(e){return Rn(Du.getPublicKey(e))}finalizeEvent(e,t){const r=e;return r.pubkey=Rn(Du.getPublicKey(t)),r.id=Np(r),r.sig=Rn(Du.sign(Np(r),t)),r[Ao]=!0,r}verifyEvent(e){if("boolean"==typeof e[Ao])return e[Ao];const t=Np(e);if(t!==e.id)return e[Ao]=!1,!1;try{const r=Du.verify(e.sig,t,e.pubkey);return e[Ao]=r,r}catch{return e[Ao]=!1,!1}}},wW=Rp.generateSecretKey,rO=Rp.getPublicKey,fr=Rp.finalizeEvent,hc=Rp.verifyEvent,cn={};function iO(e){return 1e3<=e&&e<1e4||[1,2,4,5,6,7,8,16,40,41,42,43,44].includes(e)}function cw(e){return[0,3].includes(e)||1e4<=e&&e<2e4}function sO(e){return 2e4<=e&&e<3e4}function lw(e){return 3e4<=e&&e<4e4}function bW(e){return iO(e)?"regular":cw(e)?"replaceable":sO(e)?"ephemeral":lw(e)?"parameterized":"unknown"}bt(cn,{Application:()=>CZ,BadgeAward:()=>xW,BadgeDefinition:()=>mZ,BlockedRelaysList:()=>XW,BookmarkList:()=>QW,Bookmarksets:()=>hZ,Calendar:()=>MZ,CalendarEventRSVP:()=>NZ,ChannelCreation:()=>oO,ChannelHideMessage:()=>lO,ChannelMessage:()=>cO,ChannelMetadata:()=>aO,ChannelMuteUser:()=>uO,ClassifiedListing:()=>IZ,ClientAuth:()=>dO,CommunitiesList:()=>YW,CommunityDefinition:()=>kZ,CommunityPostApproval:()=>VW,Contacts:()=>SW,CreateOrUpdateProduct:()=>_Z,CreateOrUpdateStall:()=>vZ,Curationsets:()=>pZ,Date:()=>xZ,DirectMessageRelaysList:()=>rZ,DraftClassifiedListing:()=>TZ,DraftLong:()=>bZ,Emojisets:()=>EZ,EncryptedDirectMessage:()=>IW,EventDeletion:()=>TW,FileMetadata:()=>OW,FileServerPreference:()=>sZ,Followsets:()=>uZ,GenericRepost:()=>NW,Genericlists:()=>dZ,GiftWrap:()=>iZ,HTTPAuth:()=>fw,Handlerinformation:()=>OZ,Handlerrecommendation:()=>RZ,Highlights:()=>GW,InterestsList:()=>tZ,Interestsets:()=>yZ,JobFeedback:()=>$W,JobRequest:()=>UW,JobResult:()=>jW,Label:()=>BW,LightningPubRPC:()=>aZ,LiveChatMessage:()=>kW,LiveEvent:()=>DZ,LongFormArticle:()=>wZ,Metadata:()=>EW,Mutelist:()=>WW,NWCWalletInfo:()=>oZ,NWCWalletRequest:()=>fO,NWCWalletResponse:()=>cZ,NostrConnect:()=>lZ,OpenTimestamps:()=>RW,Pinlist:()=>ZW,PrivateDirectMessage:()=>MW,ProblemTracker:()=>PW,ProfileBadges:()=>gZ,PublicChatsList:()=>JW,Reaction:()=>dw,RecommendRelay:()=>DW,RelayList:()=>KW,Relaysets:()=>fZ,Report:()=>LW,Reporting:()=>FW,Repost:()=>uw,Seal:()=>AW,SearchRelaysList:()=>eZ,ShortTextNote:()=>CW,Time:()=>AZ,UserEmojiList:()=>nZ,UserStatuses:()=>SZ,Zap:()=>qW,ZapGoal:()=>HW,ZapRequest:()=>zW,classifyKind:()=>bW,isEphemeralKind:()=>sO,isParameterizedReplaceableKind:()=>lw,isRegularKind:()=>iO,isReplaceableKind:()=>cw});var EW=0,CW=1,DW=2,SW=3,IW=4,TW=5,uw=6,dw=7,xW=8,AW=13,MW=14,NW=16,oO=40,aO=41,cO=42,lO=43,uO=44,RW=1040,OW=1063,kW=1311,PW=1971,LW=1984,FW=1984,BW=1985,VW=4550,UW=5999,jW=6999,$W=7e3,HW=9041,zW=9734,qW=9735,GW=9802,WW=1e4,ZW=10001,KW=10002,QW=10003,YW=10004,JW=10005,XW=10006,eZ=10007,tZ=10015,nZ=10030,rZ=10050,iZ=10059,sZ=10096,oZ=13194,aZ=21e3,dO=22242,fO=23194,cZ=23195,lZ=24133,fw=27235,uZ=3e4,dZ=30001,fZ=30002,hZ=30003,pZ=30004,gZ=30008,mZ=30009,yZ=30015,vZ=30017,_Z=30018,wZ=30023,bZ=30024,EZ=30030,CZ=30078,DZ=30311,SZ=30315,IZ=30402,TZ=30403,xZ=31922,AZ=31923,MZ=31924,NZ=31925,RZ=31989,OZ=31990,kZ=34550;function PZ(e,t){if(e.ids&&-1===e.ids.indexOf(t.id)||e.kinds&&-1===e.kinds.indexOf(t.kind)||e.authors&&-1===e.authors.indexOf(t.pubkey))return!1;for(let r in e)if("#"===r[0]){let s=e[`#${r.slice(1)}`];if(s&&!t.tags.find(([o,a])=>o===r.slice(1)&&-1!==s.indexOf(a)))return!1}return!(e.since&&t.created_ate.until)}function Op(e,t){for(let r=0;rcw(t))?e.authors.length*e.kinds.length:1/0,e.authors?.length&&e.kinds?.every(t=>lw(t))&&e["#d"]?.length?e.authors.length*e.kinds.length*e["#d"].length:1/0)}function kp(e,t){let r=t.length+3,i=e.indexOf(`"${t}":`)+r,s=e.slice(i).indexOf('"')+i+1;return e.slice(s,s+64)}function pO(e,t){let r=t.length,i=e.indexOf(`"${t}":`)+r+3,s=e.slice(i),o=Math.min(s.indexOf(","),s.indexOf("}"));return parseInt(s.slice(0,o),10)}function gO(e){let t=e.slice(0,22).indexOf('"EVENT"');if(-1===t)return null;let r=e.slice(t+7+1).indexOf('"');if(-1===r)return null;let i=t+7+1+r,s=e.slice(i+1,80).indexOf('"');return-1===s?null:e.slice(i+1,i+1+s)}function FZ(e,t){return t===kp(e,"id")}function BZ(e,t){return t===kp(e,"pubkey")}function VZ(e,t){return t===pO(e,"kind")}function mO(e,t){return{kind:dO,created_at:Math.floor(Date.now()/1e3),tags:[["relay",e],["challenge",t]],content:""}}bt({},{getHex64:()=>kp,getInt:()=>pO,getSubscriptionId:()=>gO,matchEventId:()=>FZ,matchEventKind:()=>VZ,matchEventPubkey:()=>BZ}),bt({},{makeAuthEvent:()=>mO});try{WebSocket}catch{}try{WebSocket}catch{}var Mu={};bt(Mu,{BECH32_REGEX:()=>_O,Bech32MaxSize:()=>gw,NostrTypeGuard:()=>GZ,decode:()=>Nu,encodeBytes:()=>Lp,naddrEncode:()=>XZ,neventEncode:()=>JZ,noteEncode:()=>QZ,nprofileEncode:()=>YZ,npubEncode:()=>KZ,nsecEncode:()=>ZZ});var GZ={isNProfile:e=>/^nprofile1[a-z\d]+$/.test(e||""),isNRelay:e=>/^nrelay1[a-z\d]+$/.test(e||""),isNEvent:e=>/^nevent1[a-z\d]+$/.test(e||""),isNAddr:e=>/^naddr1[a-z\d]+$/.test(e||""),isNSec:e=>/^nsec1[a-z\d]{58}$/.test(e||""),isNPub:e=>/^npub1[a-z\d]{58}$/.test(e||""),isNote:e=>/^note1[a-z\d]+$/.test(e||""),isNcryptsec:e=>/^ncryptsec1[a-z\d]+$/.test(e||"")},gw=5e3,_O=/[\x21-\x7E]{1,83}1[023456789acdefghjklmnpqrstuvwxyz]{6,}/;function Nu(e){let{prefix:t,words:r}=oc.decode(e,gw),i=new Uint8Array(oc.fromWords(r));switch(t){case"nprofile":{let s=mw(i);if(!s[0]?.[0])throw new Error("missing TLV 0 for nprofile");if(32!==s[0][0].length)throw new Error("TLV 0 should be 32 bytes");return{type:"nprofile",data:{pubkey:Rn(s[0][0]),relays:s[1]?s[1].map(o=>ji.decode(o)):[]}}}case"nevent":{let s=mw(i);if(!s[0]?.[0])throw new Error("missing TLV 0 for nevent");if(32!==s[0][0].length)throw new Error("TLV 0 should be 32 bytes");if(s[2]&&32!==s[2][0].length)throw new Error("TLV 2 should be 32 bytes");if(s[3]&&4!==s[3][0].length)throw new Error("TLV 3 should be 4 bytes");return{type:"nevent",data:{id:Rn(s[0][0]),relays:s[1]?s[1].map(o=>ji.decode(o)):[],author:s[2]?.[0]?Rn(s[2][0]):void 0,kind:s[3]?.[0]?parseInt(Rn(s[3][0]),16):void 0}}}case"naddr":{let s=mw(i);if(!s[0]?.[0])throw new Error("missing TLV 0 for naddr");if(!s[2]?.[0])throw new Error("missing TLV 2 for naddr");if(32!==s[2][0].length)throw new Error("TLV 2 should be 32 bytes");if(!s[3]?.[0])throw new Error("missing TLV 3 for naddr");if(4!==s[3][0].length)throw new Error("TLV 3 should be 4 bytes");return{type:"naddr",data:{identifier:ji.decode(s[0][0]),pubkey:Rn(s[2][0]),kind:parseInt(Rn(s[3][0]),16),relays:s[1]?s[1].map(o=>ji.decode(o)):[]}}}case"nsec":return{type:t,data:i};case"npub":case"note":return{type:t,data:Rn(i)};default:throw new Error(`unknown prefix ${t}`)}}function mw(e){let t={},r=e;for(;r.length>0;){let i=r[0],s=r[1],o=r.slice(2,2+s);if(r=r.slice(2+s),o.lengthoi.encode(r))}))}function JZ(e){let t;return void 0!==e.kind&&(t=function WZ(e){const t=new Uint8Array(4);return t[0]=e>>24&255,t[1]=e>>16&255,t[2]=e>>8&255,t[3]=255&e,t}(e.kind)),Pp("nevent",yw({0:[sc(e.id)],1:(e.relays||[]).map(i=>oi.encode(i)),2:e.author?[sc(e.author)]:[],3:t?[new Uint8Array(t)]:[]}))}function XZ(e){let t=new ArrayBuffer(4);return new DataView(t).setUint32(0,e.kind,!1),Pp("naddr",yw({0:[oi.encode(e.identifier)],1:(e.relays||[]).map(i=>oi.encode(i)),2:[sc(e.pubkey)],3:[new Uint8Array(t)]}))}function yw(e){let t=[];return Object.entries(e).reverse().forEach(([r,i])=>{i.forEach(s=>{let o=new Uint8Array(s.length+2);o.set([parseInt(r)],0),o.set([s.length],1),o.set(s,2),t.push(o)})}),wp(...t)}var Ru={};function wO(e,t,r){return vw.apply(this,arguments)}function vw(){return(vw=U(function*(e,t,r){const i=e instanceof Uint8Array?Rn(e):e,o=bO(ic.getSharedSecret(i,"02"+t));let a=Uint8Array.from(pR(16)),c=oi.encode(r),l=UR(o,a).encrypt(c);return`${Fi.encode(new Uint8Array(l))}?iv=${Fi.encode(new Uint8Array(a.buffer))}`})).apply(this,arguments)}function tK(e,t,r){return _w.apply(this,arguments)}function _w(){return(_w=U(function*(e,t,r){const i=e instanceof Uint8Array?Rn(e):e;let[s,o]=r.split("?iv="),c=bO(ic.getSharedSecret(i,"02"+t)),l=Fi.decode(o),u=Fi.decode(s),d=UR(c,l).decrypt(u);return ji.decode(d)})).apply(this,arguments)}function bO(e){return e.slice(1,33)}bt(Ru,{decrypt:()=>tK,encrypt:()=>wO}),bt({},{NIP05_REGEX:()=>ww,isNip05:()=>rK,isValid:()=>oK,queryProfile:()=>EO,searchDomain:()=>sK,useFetchImplementation:()=>iK});var Fp,ww=/^(?:([\w.+-]+)@)?([\w_-]+(\.[\w_-]+)+)$/,rK=e=>ww.test(e||"");try{Fp=fetch}catch{}function iK(e){Fp=e}function sK(e){return bw.apply(this,arguments)}function bw(){return(bw=U(function*(e,t=""){try{const r=`https://${e}/.well-known/nostr.json?name=${t}`;return(yield(yield Fp(r,{redirect:"error"})).json()).names}catch{return{}}})).apply(this,arguments)}function EO(e){return Ew.apply(this,arguments)}function Ew(){return(Ew=U(function*(e){const t=e.match(ww);if(!t)return null;const[r,i="_",s]=t;try{const o=`https://${s}/.well-known/nostr.json?name=${i}`,a=yield(yield Fp(o,{redirect:"error"})).json();let c=a.names[i];return c?{pubkey:c,relays:a.relays?.[c]}:null}catch{return null}})).apply(this,arguments)}function oK(e,t){return Cw.apply(this,arguments)}function Cw(){return(Cw=U(function*(e,t){let r=yield EO(t);return!!r&&r.pubkey===e})).apply(this,arguments)}function cK(e){const t={reply:void 0,root:void 0,mentions:[],profiles:[]},r=[];for(const i of e.tags)"e"===i[0]&&i[1]&&r.push(i),"p"===i[0]&&i[1]&&t.profiles.push({pubkey:i[1],relays:i[2]?[i[2]]:[]});for(let i=0;icK}),bt({},{fetchRelayInformation:()=>dK,useFetchImplementation:()=>uK});try{fetch}catch{}function uK(e){}function dK(e){return Dw.apply(this,arguments)}function Dw(){return(Dw=U(function*(e){return yield(yield fetch(e.replace("ws://","http://").replace("wss://","https://"),{headers:{Accept:"application/nostr+json"}})).json()})).apply(this,arguments)}function DO(e){let t=0;for(let r=0;r=t)break}return i}function gK(e,t,r,i){return fr({kind:uw,tags:[...e.tags??[],["e",t.id,r],["p",t.pubkey]],content:""===e.content?"":JSON.stringify(t),created_at:e.created_at},i)}function SO(e){if(e.kind!==uw)return;let t,r;for(let i=e.tags.length-1;i>=0&&(void 0===t||void 0===r);i--){const s=e.tags[i];s.length>=2&&("e"===s[0]&&void 0===t?t=s:"p"===s[0]&&void 0===r&&(r=s))}return void 0!==t?{id:t[1],relays:[t[2],r?.[2]].filter(i=>"string"==typeof i),author:r?.[1]}:void 0}function mK(e,{skipVerification:t}={}){const r=SO(e);if(void 0===r||""===e.content)return;let i;try{i=JSON.parse(e.content)}catch{return}return i.id===r.id&&(t||hc(i))?i:void 0}bt({},{getPow:()=>DO,minePow:()=>hK}),bt({},{finishRepostEvent:()=>gK,getRepostedEvent:()=>mK,getRepostedEventPointer:()=>SO}),bt({},{NOSTR_URI_REGEX:()=>Bp,parse:()=>_K,test:()=>vK});var Bp=new RegExp(`nostr:(${_O.source})`);function vK(e){return"string"==typeof e&&new RegExp(`^${Bp.source}$`).test(e)}function _K(e){const t=e.match(new RegExp(`^${Bp.source}$`));if(!t)throw new Error(`Invalid Nostr URI: ${e}`);return{uri:t[0],value:t[1],decoded:Nu(t[1])}}function bK(e,t,r){const i=t.tags.filter(s=>s.length>=2&&("e"===s[0]||"p"===s[0]));return fr({...e,kind:dw,tags:[...e.tags??[],...i,["e",t.id],["p",t.pubkey]],content:e.content??"+"},r)}function EK(e){if(e.kind!==dw)return;let t,r;for(let i=e.tags.length-1;i>=0&&(void 0===t||void 0===r);i--){const s=e.tags[i];s.length>=2&&("e"===s[0]&&void 0===t?t=s:"p"===s[0]&&void 0===r&&(r=s))}return void 0!==t&&void 0!==r?{id:t[1],relays:[t[2],r[2]].filter(i=>void 0!==i),author:r[1]}:void 0}bt({},{finishReactionEvent:()=>bK,getReactedEventPointer:()=>EK}),bt({},{matchAll:()=>DK,regex:()=>Sw,replaceAll:()=>SK});var Sw=()=>new RegExp(`\\b${Bp.source}\\b`,"g");function*DK(e){const t=e.matchAll(Sw());for(const r of t)try{const[i,s]=r;yield{uri:i,value:s,decoded:Nu(s),start:r.index,end:r.index+i.length}}catch{}}function SK(e,t){return e.replaceAll(Sw(),(r,i)=>t({uri:r,value:i,decoded:Nu(i)}))}bt({},{channelCreateEvent:()=>TK,channelHideMessageEvent:()=>MK,channelMessageEvent:()=>AK,channelMetadataEvent:()=>xK,channelMuteUserEvent:()=>NK});var TK=(e,t)=>{let r;if("object"==typeof e.content)r=JSON.stringify(e.content);else{if("string"!=typeof e.content)return;r=e.content}return fr({kind:oO,tags:[...e.tags??[]],content:r,created_at:e.created_at},t)},xK=(e,t)=>{let r;if("object"==typeof e.content)r=JSON.stringify(e.content);else{if("string"!=typeof e.content)return;r=e.content}return fr({kind:aO,tags:[["e",e.channel_create_event_id],...e.tags??[]],content:r,created_at:e.created_at},t)},AK=(e,t)=>{const r=[["e",e.channel_create_event_id,e.relay_url,"root"]];return e.reply_to_channel_message_event_id&&r.push(["e",e.reply_to_channel_message_event_id,e.relay_url,"reply"]),fr({kind:cO,tags:[...r,...e.tags??[]],content:e.content,created_at:e.created_at},t)},MK=(e,t)=>{let r;if("object"==typeof e.content)r=JSON.stringify(e.content);else{if("string"!=typeof e.content)return;r=e.content}return fr({kind:lO,tags:[["e",e.channel_message_event_id],...e.tags??[]],content:r,created_at:e.created_at},t)},NK=(e,t)=>{let r;if("object"==typeof e.content)r=JSON.stringify(e.content);else{if("string"!=typeof e.content)return;r=e.content}return fr({kind:uO,tags:[["p",e.pubkey_to_mute],...e.tags??[]],content:r,created_at:e.created_at},t)};bt({},{EMOJI_SHORTCODE_REGEX:()=>IO,matchAll:()=>OK,regex:()=>Iw,replaceAll:()=>kK});var Tw,IO=/:(\w+):/,Iw=()=>new RegExp(`\\B${IO.source}\\B`,"g");function*OK(e){const t=e.matchAll(Iw());for(const r of t)try{const[i,s]=r;yield{shortcode:i,name:s,start:r.index,end:r.index+i.length}}catch{}}function kK(e,t){return e.replaceAll(Iw(),(r,i)=>t({shortcode:r,name:i}))}bt({},{useFetchImplementation:()=>LK,validateGithub:()=>FK});try{Tw=fetch}catch{}function LK(e){Tw=e}function FK(e,t,r){return xw.apply(this,arguments)}function xw(){return(xw=U(function*(e,t,r){try{return(yield(yield Tw(`https://gist.github.com/${t}/${r}/raw`)).text())===`Verifying that I control the following Nostr public key: ${e}`}catch{return!1}})).apply(this,arguments)}bt({},{decrypt:()=>OO,encrypt:()=>RO,getConversationKey:()=>AO,v2:()=>$K});var TO=1,xO=65535;function AO(e,t){const r=ic.getSharedSecret(e,"02"+t).subarray(1,33);return function YR(e,t,r){return ti.hash(e),void 0===r&&(r=new Uint8Array(e.outputLen)),Mp(e,So(r),So(t))}(Su,r,"nip44-v2")}function MO(e,t){const r=function XR(e,t,r,i=32){if(ti.hash(e),ti.number(i),i>255*e.outputLen)throw new Error("Length should be <= 255*HashLen");const s=Math.ceil(i/e.outputLen);void 0===r&&(r=JR);const o=new Uint8Array(s*e.outputLen),a=Mp.create(e,t),c=a._cloneInto(),l=new Uint8Array(a.outputLen);for(let u=0;uxO)throw new Error("invalid plaintext size: must be between 1 and 65535 bytes");const t=new Uint8Array(2);return new DataView(t.buffer).setUint16(0,e,!1),t}(r);return wp(i,t,new Uint8Array(Aw(r)-r))}(e),c=sw(i,s,a),l=NO(o,c,r);return Fi.encode(wp(new Uint8Array([2]),r,c,l))}function OO(e,t){const{nonce:r,ciphertext:i,mac:s}=function jK(e){if("string"!=typeof e)throw new Error("payload must be a valid string");const t=e.length;if(t<132||t>87472)throw new Error("invalid payload length: "+t);if("#"===e[0])throw new Error("unknown encryption version");let r;try{r=Fi.decode(e)}catch(o){throw new Error("invalid base64: "+o.message)}const i=r.length;if(i<99||i>65603)throw new Error("invalid data length: "+i);const s=r[0];if(2!==s)throw new Error("unknown encryption version "+s);return{nonce:r.subarray(1,33),ciphertext:r.subarray(33,-32),mac:r.subarray(-32)}}(e),{chacha_key:o,chacha_nonce:a,hmac_key:c}=MO(t,r);if(!Sp(NO(c,i,r),s))throw new Error("invalid MAC");return function UK(e){const t=new DataView(e.buffer).getUint16(0),r=e.subarray(2,2+t);if(txO||r.length!==t||e.length!==2+Aw(t))throw new Error("invalid padding");return ji.decode(r)}(sw(o,a,i))}var Nw,$K={utils:{getConversationKey:AO,calcPaddedLen:Aw},encrypt:RO,decrypt:OO};function zK(e){const{pathname:t,searchParams:r}=new URL(e),i=t,s=r.get("relay"),o=r.get("secret");if(!i||!s||!o)throw new Error("invalid connection string");return{pubkey:i,relay:s,secret:o}}function qK(e,t,r){return Mw.apply(this,arguments)}function Mw(){return(Mw=U(function*(e,t,r){const s=yield wO(t,e,JSON.stringify({method:"pay_invoice",params:{invoice:r}})),o={kind:fO,created_at:Math.round(Date.now()/1e3),content:s,tags:[["p",e]]};return fr(o,t)})).apply(this,arguments)}bt({},{makeNwcRequestEvent:()=>qK,parseConnectionString:()=>zK}),bt({},{getZapEndpoint:()=>ZK,makeZapReceipt:()=>YK,makeZapRequest:()=>KK,useFetchImplementation:()=>WK,validateZapRequest:()=>QK});try{Nw=fetch}catch{}function WK(e){Nw=e}function ZK(e){return Rw.apply(this,arguments)}function Rw(){return(Rw=U(function*(e){try{let t="",{lud06:r,lud16:i}=JSON.parse(e.content);if(r){let{words:a}=oc.decode(r,1e3),c=oc.fromWords(a);t=ji.decode(c)}else{if(!i)return null;{let[a,c]=i.split("@");t=new URL(`/.well-known/lnurlp/${a}`,`https://${c}`).toString()}}let o=yield(yield Nw(t)).json();if(o.allowsNostr&&o.nostrPubkey)return o.callback}catch{}return null})).apply(this,arguments)}function KK({profile:e,event:t,amount:r,relays:i,comment:s=""}){if(!r)throw new Error("amount not given");if(!e)throw new Error("profile not given");let o={kind:9734,created_at:Math.round(Date.now()/1e3),content:s,tags:[["p",e],["amount",r.toString()],["relays",...i]]};return t&&o.tags.push(["e",t]),o}function QK(e){let t;try{t=JSON.parse(e)}catch{return"Invalid zap request JSON."}if(!eO(t))return"Zap request is not a valid Nostr event.";if(!hc(t))return"Invalid signature on zap request.";let r=t.tags.find(([o,a])=>"p"===o&&a);if(!r)return"Zap request doesn't have a 'p' tag.";if(!r[1].match(/^[a-f0-9]{64}$/))return"Zap request 'p' tag is not valid hex.";let i=t.tags.find(([o,a])=>"e"===o&&a);return i&&!i[1].match(/^[a-f0-9]{64}$/)?"Zap request 'e' tag is not valid hex.":t.tags.find(([o,a])=>"relays"===o&&a)?null:"Zap request doesn't have a 'relays' tag."}function YK({zapRequest:e,preimage:t,bolt11:r,paidAt:i}){let s=JSON.parse(e),o=s.tags.filter(([c])=>"e"===c||"p"===c||"a"===c),a={kind:9735,created_at:Math.round(i.getTime()/1e3),content:"",tags:[...o,["P",s.pubkey],["bolt11",r],["description",e]]};return t&&a.tags.push(["preimage",t]),a}bt({},{getToken:()=>XK,hashPayload:()=>Lw,unpackEventFromToken:()=>PO,validateEvent:()=>jO,validateEventKind:()=>FO,validateEventMethodTag:()=>VO,validateEventPayloadTag:()=>UO,validateEventTimestamp:()=>LO,validateEventUrlTag:()=>BO,validateToken:()=>eQ});var kO="Nostr ";function XK(e,t,r){return Ow.apply(this,arguments)}function Ow(){return(Ow=U(function*(e,t,r,i=!1,s){const o={kind:fw,tags:[["u",e],["method",t]],created_at:Math.round((new Date).getTime()/1e3),content:""};s&&o.tags.push(["payload",Lw(s)]);const a=yield r(o);return(i?kO:"")+Fi.encode(oi.encode(JSON.stringify(a)))})).apply(this,arguments)}function eQ(e,t,r){return kw.apply(this,arguments)}function kw(){return(kw=U(function*(e,t,r){const i=yield PO(e).catch(o=>{throw o});return yield jO(i,t,r).catch(o=>{throw o})})).apply(this,arguments)}function PO(e){return Pw.apply(this,arguments)}function Pw(){return(Pw=U(function*(e){if(!e)throw new Error("Missing token");e=e.replace(kO,"");const t=ji.decode(Fi.decode(e));if(!t||0===t.length||!t.startsWith("{"))throw new Error("Invalid token");return JSON.parse(t)})).apply(this,arguments)}function LO(e){return!!e.created_at&&Math.round((new Date).getTime()/1e3)-e.created_at<60}function FO(e){return e.kind===fw}function BO(e,t){const r=e.tags.find(i=>"u"===i[0]);return!!r&&r.length>0&&r[1]===t}function VO(e,t){const r=e.tags.find(i=>"method"===i[0]);return!!r&&r.length>0&&r[1].toLowerCase()===t.toLowerCase()}function Lw(e){return Rn(Su(oi.encode(JSON.stringify(e))))}function UO(e,t){const r=e.tags.find(s=>"payload"===s[0]);if(!r)return!1;const i=Lw(t);return r.length>0&&r[1]===i}function jO(e,t,r,i){return Fw.apply(this,arguments)}function Fw(){return(Fw=U(function*(e,t,r,i){if(!hc(e))throw new Error("Invalid nostr event, signature invalid");if(!FO(e))throw new Error("Invalid nostr event, kind invalid");if(!LO(e))throw new Error("Invalid nostr event, created_at timestamp invalid");if(!BO(e,t))throw new Error("Invalid nostr event, url tag invalid");if(!VO(e,r))throw new Error("Invalid nostr event, method tag invalid");if(i&&"object"==typeof i&&Object.keys(i).length>0&&!UO(e,i))throw new Error("Invalid nostr event, payload tag does not match request body hash");return!0})).apply(this,arguments)}function Ss(e){var t,r,i,s=2;for(typeof Symbol<"u"&&(r=Symbol.asyncIterator,i=Symbol.iterator);s--;){if(r&&null!=(t=e[r]))return t.call(e);if(i&&null!=(t=e[i]))return new Up(t.call(e));r="@@asyncIterator",i="@@iterator"}throw new TypeError("Object is not async iterable")}function Up(e){function t(r){if(Object(r)!==r)return Promise.reject(new TypeError(r+" is not an object."));var i=r.done;return Promise.resolve(r.value).then(function(s){return{value:s,done:i}})}return(Up=function(i){this.s=i,this.n=i.next}).prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(i){var s=this.s.return;return void 0===s?Promise.resolve({value:i,done:!0}):t(s.apply(this.s,arguments))},throw:function(i){var s=this.s.return;return void 0===s?Promise.reject(i):t(s.apply(this.s,arguments))}},new Up(e)}"object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date;const Bw="object"==typeof process&&process?process:{};let jp=globalThis.AbortController,zO=globalThis.AbortSignal;if(typeof jp>"u"){zO=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,s){this._onabort.push(s)}},jp=class{constructor(){t()}signal=new zO;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(const s of this.signal._onabort)s(i);this.signal.onabort?.(i)}}};let e="1"!==Bw.env?.LRU_CACHE_IGNORE_AC_WARNING;const t=()=>{e&&(e=!1,((e,t,r,i)=>{"function"==typeof Bw.emitWarning?Bw.emitWarning(e,t,r,i):console.error(`[${r}] ${t}: ${e}`)})("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var GO,WO;Symbol("type"),Symbol,Symbol,GO=Symbol.iterator,WO=Symbol.toStringTag;class hr{cache;constructor(t){this.cache=t??new Map}get size(){return this.cache.size}add(t){this.#t(t);for(const r of this){if(hr.deletes(r,t)||hr.replaces(r,t))return this;hr.replaces(t,r)&&this.delete(r)}return this.cache.set(t.id,t),this}#t(t){if(5===t.kind)for(const r of t.tags)if("e"===r[0]){const i=this.cache.get(r[1]);i&&i.pubkey===t.pubkey&&this.delete(i)}}clear(){this.cache.clear()}delete(t){return this.cache.delete(t.id)}forEach(t,r){return this.cache.forEach((i,s)=>t(i,i,this),r)}has(t){return this.cache.has(t.id)}*entries(){for(const t of this.values())yield[t,t]}keys(){return this.values()}*values(){for(const t of hr.sortEvents([...this.cache.values()]))yield t}[GO](){return this.values()}[WO]="NSet";static isReplaceable(t){return[0,3].includes(t)||1e4<=t&&t<2e4}static isParameterizedReplaceable(t){return 3e4<=t&&t<4e4}static replaces(t,r){const{kind:i,pubkey:s}=t;if(hr.isReplaceable(i))return i===r.kind&&s===r.pubkey&&hr.sortEvents([t,r])[0]===t;if(hr.isParameterizedReplaceable(i)){const o=t.tags.find(([c])=>"d"===c)?.[1]||"",a=r.tags.find(([c])=>"d"===c)?.[1]||"";return i===r.kind&&s===r.pubkey&&hr.sortEvents([t,r])[0]===t&&o===a}return!1}static deletes(t,r){const{kind:i,pubkey:s,tags:o}=t;if(5===i&&s===r.pubkey)for(const[a,c]of o)if("e"===a&&c===r.id)return!0;return!1}static sortEvents(t){return t.sort((r,i)=>r.created_at!==i.created_at?i.created_at-r.created_at:r.id.localeCompare(i.id))}union(t){throw new Error("Method not implemented.")}intersection(t){throw new Error("Method not implemented.")}difference(t){throw new Error("Method not implemented.")}symmetricDifference(t){throw new Error("Method not implemented.")}isSubsetOf(t){throw new Error("Method not implemented.")}isSupersetOf(t){throw new Error("Method not implemented.")}isDisjointFrom(t){throw new Error("Method not implemented.")}}function mc(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function Ar(e,...t){if(!function rQ(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function Ou(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}Symbol;const yc="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,Mo=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),ai=(e,t)=>e<<32-t|e>>>t;function YO(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}function No(e){return"string"==typeof e&&(e=YO(e)),Ar(e),e}new Uint8Array(new Uint32Array([287454020]).buffer);class JO{clone(){return this._cloneInto()}}function $w(e){const t=i=>e().update(No(i)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function dQ(e=32){if(yc&&"function"==typeof yc.getRandomValues)return yc.getRandomValues(new Uint8Array(e));if(yc&&"function"==typeof yc.randomBytes)return yc.randomBytes(e);throw new Error("crypto.getRandomValues must be defined")}class XO extends JO{constructor(t,r){super(),this.finished=!1,this.destroyed=!1,function Uw(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");mc(e.outputLen),mc(e.blockLen)}(t);const i=No(r);if(this.iHash=t.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,o=new Uint8Array(s);o.set(i.length>s?t.create().update(i).digest():i);for(let a=0;anew XO(e,t).update(r).digest();Pu.create=(e,t)=>new XO(e,t);const hQ=(e,t,r)=>e&t^~e&r,pQ=(e,t,r)=>e&t^e&r^t&r;class Hw extends JO{constructor(t,r,i,s){super(),this.blockLen=t,this.outputLen=r,this.padOffset=i,this.isLE=s,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=Mo(this.buffer)}update(t){Ou(this);const{view:r,buffer:i,blockLen:s}=this,o=(t=No(t)).length;for(let a=0;as-a&&(this.process(i,0),a=0);for(let f=a;f>s&o),c=Number(r&o),u=i?0:4;e.setUint32(t+(i?4:0),a,i),e.setUint32(t+u,c,i)})(i,s-8,BigInt(8*this.length),o),this.process(i,0);const c=Mo(t),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=l/4,d=this.get();if(u>d.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;ft)),mQ=ek.map(e=>(9*e+5)%16);let zw=[ek],qw=[mQ];for(let e=0;e<4;e++)for(let t of[zw,qw])t.push(t[e].map(r=>gQ[r]));const CQ=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Ts=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),xs=new Uint32Array(64);class rk extends Hw{constructor(){super(64,32,8,!1),this.A=0|Ts[0],this.B=0|Ts[1],this.C=0|Ts[2],this.D=0|Ts[3],this.E=0|Ts[4],this.F=0|Ts[5],this.G=0|Ts[6],this.H=0|Ts[7]}get(){const{A:t,B:r,C:i,D:s,E:o,F:a,G:c,H:l}=this;return[t,r,i,s,o,a,c,l]}set(t,r,i,s,o,a,c,l){this.A=0|t,this.B=0|r,this.C=0|i,this.D=0|s,this.E=0|o,this.F=0|a,this.G=0|c,this.H=0|l}process(t,r){for(let f=0;f<16;f++,r+=4)xs[f]=t.getUint32(r,!1);for(let f=16;f<64;f++){const h=xs[f-15],p=xs[f-2],g=ai(h,7)^ai(h,18)^h>>>3,m=ai(p,17)^ai(p,19)^p>>>10;xs[f]=m+xs[f-7]+g+xs[f-16]|0}let{A:i,B:s,C:o,D:a,E:c,F:l,G:u,H:d}=this;for(let f=0;f<64;f++){const p=d+(ai(c,6)^ai(c,11)^ai(c,25))+hQ(c,l,u)+CQ[f]+xs[f]|0,m=(ai(i,2)^ai(i,13)^ai(i,22))+pQ(i,s,o)|0;d=u,u=l,l=c,c=a+p|0,a=o,o=s,s=i,i=p+m|0}i=i+this.A|0,s=s+this.B|0,o=o+this.C|0,a=a+this.D|0,c=c+this.E|0,l=l+this.F|0,u=u+this.G|0,d=d+this.H|0,this.set(i,s,o,a,c,l,u,d)}roundClean(){xs.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const Gw=$w(()=>new rk),qp=BigInt(2**32-1),Ww=BigInt(32);function ik(e,t=!1){return t?{h:Number(e&qp),l:Number(e>>Ww&qp)}:{h:0|Number(e>>Ww&qp),l:0|Number(e&qp)}}const be_split=function DQ(e,t=!1){let r=new Uint32Array(e.length),i=new Uint32Array(e.length);for(let s=0;sBigInt(e))),Kw=BigInt(0),Wp=BigInt(1),jQ=BigInt(2);function Ro(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}function Lu(e){if(!Ro(e))throw new Error("Uint8Array expected")}function vc(e,t){if("boolean"!=typeof t)throw new Error(`${e} must be valid boolean, got "${t}".`)}const $Q=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function _c(e){Lu(e);let t="";for(let r=0;r=Hi._0&&e<=Hi._9?e-Hi._0:e>=Hi._A&&e<=Hi._F?e-(Hi._A-10):e>=Hi._a&&e<=Hi._f?e-(Hi._a-10):void 0}function bc(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,r=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const i=new Uint8Array(r);for(let s=0,o=0;s"bigint"==typeof e&&Kw<=e;function Zp(e,t,r){return Jw(e)&&Jw(t)&&Jw(r)&&t<=e&&eKw;e>>=Wp,t+=1);return t}const Xw=e=>(jQ<new Uint8Array(e),ck=e=>Uint8Array.from(e);function lk(e,t,r){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof r)throw new Error("hmacFn must be a function");let i=eb(e),s=eb(e),o=0;const a=()=>{i.fill(1),s.fill(0),o=0},c=(...f)=>r(s,i,...f),l=(f=eb())=>{s=c(ck([0]),f),i=c(),0!==f.length&&(s=c(ck([1]),f),i=c())},u=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let f=0;const h=[];for(;f{let p;for(a(),l(f);!(p=h(u()));)l();return a(),p}}const HQ={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||Ro(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};function Bu(e,t,r={}){const i=(s,o,a)=>{const c=HQ[o];if("function"!=typeof c)throw new Error(`Invalid validator "${o}", expected function`);const l=e[s];if(!(a&&void 0===l||c(l,e)))throw new Error(`Invalid param ${String(s)}=${l} (${typeof l}), expected ${o}`)};for(const[s,o]of Object.entries(t))i(s,o,!1);for(const[s,o]of Object.entries(r))i(s,o,!0);return e}function tb(e){const t=new WeakMap;return(r,...i)=>{const s=t.get(r);if(void 0!==s)return s;const o=e(r,...i);return t.set(r,o),o}}const Ut=BigInt(0),Ye=BigInt(1),Ns=BigInt(2),zQ=BigInt(3),nb=BigInt(4),uk=BigInt(5),dk=BigInt(8);function Yt(e,t){const r=e%t;return r>=Ut?r:t+r}function WQ(e,t,r){if(r<=Ut||t 0");if(r===Ye)return Ut;let i=Ye;for(;t>Ut;)t&Ye&&(i=i*e%r),e=e*e%r,t>>=Ye;return i}function pr(e,t,r){let i=e;for(;t-- >Ut;)i*=i,i%=r;return i}function Kp(e,t){if(e===Ut||t<=Ut)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=Yt(e,t),i=t,s=Ut,o=Ye,a=Ye,c=Ut;for(;r!==Ut;){const u=i/r,d=i%r,f=s-a*u,h=o-c*u;i=r,r=d,s=a,o=c,a=f,c=h}if(i!==Ye)throw new Error("invert: does not exist");return Yt(s,t)}BigInt(9),BigInt(16);const QQ=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function rb(e,t){const r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function fk(e,t,r=!1,i={}){if(e<=Ut)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:s,nByteLength:o}=rb(e,t);if(o>2048)throw new Error("Field lengths over 2048 bytes are not supported");const a=function KQ(e){if(e%nb===zQ){const t=(e+Ye)/nb;return function(i,s){const o=i.pow(s,t);if(!i.eql(i.sqr(o),s))throw new Error("Cannot find square root");return o}}if(e%dk===uk){const t=(e-uk)/dk;return function(i,s){const o=i.mul(s,Ns),a=i.pow(o,t),c=i.mul(s,a),l=i.mul(i.mul(c,Ns),a),u=i.mul(c,i.sub(l,i.ONE));if(!i.eql(i.sqr(u),s))throw new Error("Cannot find square root");return u}}return function ZQ(e){const t=(e-Ye)/Ns;let r,i,s;for(r=e-Ye,i=0;r%Ns===Ut;r/=Ns,i++);for(s=Ns;sYt(l,e),isValid:l=>{if("bigint"!=typeof l)throw new Error("Invalid field element: expected bigint, got "+typeof l);return Ut<=l&&ll===Ut,isOdd:l=>(l&Ye)===Ye,neg:l=>Yt(-l,e),eql:(l,u)=>l===u,sqr:l=>Yt(l*l,e),add:(l,u)=>Yt(l+u,e),sub:(l,u)=>Yt(l-u,e),mul:(l,u)=>Yt(l*u,e),pow:(l,u)=>function JQ(e,t,r){if(r 0");if(r===Ut)return e.ONE;if(r===Ye)return t;let i=e.ONE,s=t;for(;r>Ut;)r&Ye&&(i=e.mul(i,s)),s=e.sqr(s),r>>=Ye;return i}(c,l,u),div:(l,u)=>Yt(l*Kp(u,e),e),sqrN:l=>l*l,addN:(l,u)=>l+u,subN:(l,u)=>l-u,mulN:(l,u)=>l*u,inv:l=>Kp(l,e),sqrt:i.sqrt||(l=>a(c,l)),invertBatch:l=>function XQ(e,t){const r=new Array(t.length),i=t.reduce((o,a,c)=>e.is0(a)?o:(r[c]=o,e.mul(o,a)),e.ONE),s=e.inv(i);return t.reduceRight((o,a,c)=>e.is0(a)?o:(r[c]=e.mul(o,r[c]),e.mul(o,a)),s),r}(c,l),cmov:(l,u,d)=>d?u:l,toBytes:l=>r?Yw(l,o):Ec(l,o),fromBytes:l=>{if(l.length!==o)throw new Error(`Fp.fromBytes: expected ${o}, got ${l.length}`);return r?Qw(l):Oo(l)}});return Object.freeze(c)}function hk(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function pk(e){const t=hk(e);return t+Math.ceil(t/2)}const nY=BigInt(0),ib=BigInt(1),sb=new WeakMap,gk=new WeakMap;function mk(e){return function YQ(e){Bu(e,QQ.reduce((i,s)=>(i[s]="function",i),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"}))}(e.Fp),Bu(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...rb(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}function yk(e){void 0!==e.lowS&&vc("lowS",e.lowS),void 0!==e.prehash&&vc("prehash",e.prehash)}const{Ph:oY,aT:aY}=cm,zi={Err:class extends Error{constructor(t=""){super(t)}},_tlv:{encode:(e,t)=>{const{Err:r}=zi;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(1&t.length)throw new r("tlv.encode: unpadded data");const i=t.length/2,s=wc(i);if(s.length/2&128)throw new r("tlv.encode: long form length too big");const o=i>127?wc(s.length/2|128):"";return`${wc(e)}${o}${s}${t}`},decode(e,t){const{Err:r}=zi;let i=0;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length<2||t[i++]!==e)throw new r("tlv.decode: wrong tlv");const s=t[i++];let a=0;if(128&s){const l=127&s;if(!l)throw new r("tlv.decode(long): indefinite length not supported");if(l>4)throw new r("tlv.decode(long): byte length is too big");const u=t.subarray(i,i+l);if(u.length!==l)throw new r("tlv.decode: length bytes not complete");if(0===u[0])throw new r("tlv.decode(long): zero leftmost byte");for(const d of u)a=a<<8|d;if(i+=l,a<128)throw new r("tlv.decode(long): not minimal encoding")}else a=s;const c=t.subarray(i,i+a);if(c.length!==a)throw new r("tlv.decode: wrong value length");return{v:c,l:t.subarray(i+a)}}},_int:{encode(e){const{Err:t}=zi;if(e{const v=y.toAffine();return Fu(Uint8Array.from([4]),r.toBytes(v.x),r.toBytes(v.y))}),o=t.fromBytes||(m=>{const y=m.subarray(1);return{x:r.fromBytes(y.subarray(0,r.BYTES)),y:r.fromBytes(y.subarray(r.BYTES,2*r.BYTES))}});function a(m){const{a:y,b:_}=t,v=r.sqr(m),w=r.mul(v,m);return r.add(r.add(w,r.mul(m,y)),_)}if(!r.eql(r.sqr(t.Gy),a(t.Gx)))throw new Error("bad generator point: equation left != right");function l(m){const{allowedPrivateKeyLengths:y,nByteLength:_,wrapPrivateKey:v,n:w}=t;if(y&&"bigint"!=typeof m){if(Ro(m)&&(m=_c(m)),"string"!=typeof m||!y.includes(m.length))throw new Error("Invalid key");m=m.padStart(2*_,"0")}let b;try{b="bigint"==typeof m?m:Oo(Mr("private key",m,_))}catch{throw new Error(`private key must be ${_} bytes, hex or bigint, not ${typeof m}`)}return v&&(b=Yt(b,w)),ko("private key",b,Ge,w),b}function u(m){if(!(m instanceof h))throw new Error("ProjectivePoint expected")}const d=tb((m,y)=>{const{px:_,py:v,pz:w}=m;if(r.eql(w,r.ONE))return{x:_,y:v};const b=m.is0();null==y&&(y=b?r.ONE:r.inv(w));const D=r.mul(_,y),C=r.mul(v,y),S=r.mul(w,y);if(b)return{x:r.ZERO,y:r.ZERO};if(!r.eql(S,r.ONE))throw new Error("invZ was invalid");return{x:D,y:C}}),f=tb(m=>{if(m.is0()){if(t.allowInfinityPoint&&!r.is0(m.py))return;throw new Error("bad point: ZERO")}const{x:y,y:_}=m.toAffine();if(!r.isValid(y)||!r.isValid(_))throw new Error("bad point: x or y not FE");const v=r.sqr(_),w=a(y);if(!r.eql(v,w))throw new Error("bad point: equation left != right");if(!m.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class h{constructor(y,_,v){if(this.px=y,this.py=_,this.pz=v,null==y||!r.isValid(y))throw new Error("x required");if(null==_||!r.isValid(_))throw new Error("y required");if(null==v||!r.isValid(v))throw new Error("z required");Object.freeze(this)}static fromAffine(y){const{x:_,y:v}=y||{};if(!y||!r.isValid(_)||!r.isValid(v))throw new Error("invalid affine point");if(y instanceof h)throw new Error("projective point not allowed");const w=b=>r.eql(b,r.ZERO);return w(_)&&w(v)?h.ZERO:new h(_,v,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(y){const _=r.invertBatch(y.map(v=>v.pz));return y.map((v,w)=>v.toAffine(_[w])).map(h.fromAffine)}static fromHex(y){const _=h.fromAffine(o(Mr("pointHex",y)));return _.assertValidity(),_}static fromPrivateKey(y){return h.BASE.multiply(l(y))}static msm(y,_){return function iY(e,t,r,i){if(!Array.isArray(r)||!Array.isArray(i)||i.length!==r.length)throw new Error("arrays of points and scalars must have equal length");i.forEach((d,f)=>{if(!t.isValid(d))throw new Error(`wrong scalar at index ${f}`)}),r.forEach((d,f)=>{if(!(d instanceof e))throw new Error(`wrong point at index ${f}`)});const s=ak(BigInt(r.length)),o=s>12?s-3:s>4?s-2:s?2:1,a=(1<=0;d-=o){c.fill(e.ZERO);for(let h=0;h>BigInt(d)&BigInt(a));c[g]=c[g].add(r[h])}let f=e.ZERO;for(let h=c.length-1,p=e.ZERO;h>0;h--)p=p.add(c[h]),f=f.add(p);if(u=u.add(f),0!==d)for(let h=0;hNr||C>Nr;)b&Ge&&(S=S.add(P)),C&Ge&&(T=T.add(P)),P=P.double(),b>>=Ge,C>>=Ge;return w&&(S=S.negate()),D&&(T=T.negate()),T=new h(r.mul(T.px,v.beta),T.py,T.pz),S.add(T)}multiply(y){const{endo:_,n:v}=t;let w,b;if(ko("scalar",y,Ge,v),_){const{k1neg:D,k1:C,k2neg:S,k2:T}=_.splitScalar(y);let{p:P,f:$}=this.wNAF(C),{p:V,f:j}=this.wNAF(T);P=g.constTimeNegate(D,P),V=g.constTimeNegate(S,V),V=new h(r.mul(V.px,_.beta),V.py,V.pz),w=P.add(V),b=$.add(j)}else{const{p:D,f:C}=this.wNAF(y);w=D,b=C}return h.normalizeZ([w,b])[0]}multiplyAndAddUnsafe(y,_,v){const w=h.BASE,b=(C,S)=>S!==Nr&&S!==Ge&&C.equals(w)?C.multiply(S):C.multiplyUnsafe(S),D=b(this,_).add(b(y,v));return D.is0()?void 0:D}toAffine(y){return d(this,y)}isTorsionFree(){const{h:y,isTorsionFree:_}=t;if(y===Ge)return!0;if(_)return _(h,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:y,clearCofactor:_}=t;return y===Ge?this:_?_(h,this):this.multiplyUnsafe(t.h)}toRawBytes(y=!0){return vc("isCompressed",y),this.assertValidity(),s(h,this,y)}toHex(y=!0){return vc("isCompressed",y),_c(this.toRawBytes(y))}}h.BASE=new h(t.Gx,t.Gy,r.ONE),h.ZERO=new h(r.ZERO,r.ONE,r.ZERO);const p=t.nBitLength,g=function rY(e,t){const r=(o,a)=>{const c=a.negate();return o?c:a},i=o=>{if(!Number.isSafeInteger(o)||o<=0||o>t)throw new Error(`Wrong window size=${o}, should be [1..${t}]`)},s=o=>(i(o),{windows:Math.ceil(t/o)+1,windowSize:2**(o-1)});return{constTimeNegate:r,unsafeLadder(o,a){let c=e.ZERO,l=o;for(;a>nY;)a&ib&&(c=c.add(l)),l=l.double(),a>>=ib;return c},precomputeWindow(o,a){const{windows:c,windowSize:l}=s(a),u=[];let d=o,f=d;for(let h=0;h>=g,_>u&&(_-=p,c+=ib);const v=y,w=y+Math.abs(_)-1,D=_<0;0===_?f=f.add(r(m%2!=0,a[v])):d=d.add(r(D,a[w]))}return{p:d,f}},wNAFCached(o,a,c){const l=gk.get(o)||1;let u=sb.get(o);return u||(u=this.precomputeWindow(o,l),1!==l&&sb.set(o,c(u))),this.wNAF(l,u,a)},setWindowSize(o,a){i(a),gk.set(o,a),sb.delete(o)}}}(h,t.endo?Math.ceil(p/2):p);return{CURVE:t,ProjectivePoint:h,normPrivateKeyToScalar:l,weierstrassEquation:a,isWithinCurveOrder:function c(m){return Zp(m,Ge,t.n)}}}({...t,toBytes(L,I,E){const x=I.toAffine(),R=r.toBytes(x.x),M=Fu;return vc("isCompressed",E),E?M(Uint8Array.from([I.hasEvenY()?2:3]),R):M(Uint8Array.from([4]),R,r.toBytes(x.y))},fromBytes(L){const I=L.length,E=L[0],x=L.subarray(1);if(I!==s||2!==E&&3!==E){if(I===o&&4===E)return{x:r.fromBytes(x.subarray(0,r.BYTES)),y:r.fromBytes(x.subarray(r.BYTES,2*r.BYTES))};throw new Error(`Point of length ${I} was invalid. Expected ${s} compressed bytes or ${o} uncompressed bytes`)}{const R=Oo(x);if(!Zp(R,Ge,r.ORDER))throw new Error("Point is not on curve");const M=d(R);let G;try{G=r.sqrt(M)}catch(Se){const ue=Se instanceof Error?": "+Se.message:"";throw new Error("Point is not on curve"+ue)}return!(1&~E)!=((G&Ge)===Ge)&&(G=r.neg(G)),{x:R,y:G}}}}),h=L=>_c(Ec(L,t.nByteLength));function p(L){return L>i>>Ge}const m=(L,I,E)=>Oo(L.slice(I,E));class y{constructor(I,E,x){this.r=I,this.s=E,this.recovery=x,this.assertValidity()}static fromCompact(I){const E=t.nByteLength;return I=Mr("compactSignature",I,2*E),new y(m(I,0,E),m(I,E,2*E))}static fromDER(I){const{r:E,s:x}=zi.toSig(Mr("DER",I));return new y(E,x)}assertValidity(){ko("r",this.r,Ge,i),ko("s",this.s,Ge,i)}addRecoveryBit(I){return new y(this.r,this.s,I)}recoverPublicKey(I){const{r:E,s:x,recovery:R}=this,M=C(Mr("msgHash",I));if(null==R||![0,1,2,3].includes(R))throw new Error("recovery id invalid");const G=2===R||3===R?E+t.n:E;if(G>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const ee=l.fromHex((1&R?"03":"02")+h(G)),Se=c(G),ue=a(-M*Se),gt=a(x*Se),ht=l.BASE.multiplyAndAddUnsafe(ee,ue,gt);if(!ht)throw new Error("point at infinify");return ht.assertValidity(),ht}hasHighS(){return p(this.s)}normalizeS(){return this.hasHighS()?new y(this.r,a(-this.s),this.recovery):this}toDERRawBytes(){return bc(this.toDERHex())}toDERHex(){return zi.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return bc(this.toCompactHex())}toCompactHex(){return h(this.r)+h(this.s)}}const _={isValidPrivateKey(L){try{return u(L),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const L=pk(t.n);return function tY(e,t,r=!1){const i=e.length,s=hk(t),o=pk(t);if(i<16||i1024)throw new Error(`expected ${o}-1024 bytes of input, got ${i}`);const c=Yt(r?Oo(e):Qw(e),t-Ye)+Ye;return r?Yw(c,s):Ec(c,s)}(t.randomBytes(L),t.n)},precompute:(L=8,I=l.BASE)=>(I._setWindowSize(L),I.multiply(BigInt(3)),I)};function w(L){const I=Ro(L),E="string"==typeof L,x=(I||E)&&L.length;return I?x===s||x===o:E?x===2*s||x===2*o:L instanceof l}const D=t.bits2int||function(L){const I=Oo(L),E=8*L.length-t.nBitLength;return E>0?I>>BigInt(E):I},C=t.bits2int_modN||function(L){return a(D(L))},S=Xw(t.nBitLength);function T(L){return ko(`num < 2^${t.nBitLength}`,L,Nr,S),Ec(L,t.nByteLength)}const $={lowS:t.lowS,prehash:!1},V={lowS:t.lowS,prehash:!1};return l.BASE._setWindowSize(8),{CURVE:t,getPublicKey:function v(L,I=!0){return l.fromPrivateKey(L).toRawBytes(I)},getSharedSecret:function b(L,I,E=!0){if(w(L))throw new Error("first arg must be private key");if(!w(I))throw new Error("second arg must be public key");return l.fromHex(I).multiply(u(L)).toRawBytes(E)},sign:function j(L,I,E=$){const{seed:x,k2sig:R}=function P(L,I,E=$){if(["recovered","canonical"].some(ot=>ot in E))throw new Error("sign() legacy options not supported");const{hash:x,randomBytes:R}=t;let{lowS:M,prehash:G,extraEntropy:J}=E;null==M&&(M=!0),L=Mr("msgHash",L),yk(E),G&&(L=Mr("prehashed msgHash",x(L)));const ee=C(L),Se=u(I),ue=[T(Se),T(ee)];if(null!=J&&!1!==J){const ot=!0===J?R(r.BYTES):J;ue.push(Mr("extraEntropy",ot))}const gt=Fu(...ue),ht=ee;return{seed:gt,k2sig:function Ae(ot){const Oe=D(ot);if(!f(Oe))return;const Ln=c(Oe),Jt=l.BASE.multiply(Oe).toAffine(),Xt=a(Jt.x);if(Xt===Nr)return;const Fr=a(Ln*a(ht+Xt*Se));if(Fr===Nr)return;let Ko=(Jt.x===Xt?0:2)|Number(Jt.y&Ge),Rd=Fr;return M&&p(Fr)&&(Rd=function g(L){return p(L)?a(-L):L}(Fr),Ko^=1),new y(Xt,Rd,Ko)}}}(L,I,E);return lk(t.hash.outputLen,t.nByteLength,t.hmac)(x,R)},verify:function X(L,I,E,x=V){const R=L;if(I=Mr("msgHash",I),E=Mr("publicKey",E),"strict"in x)throw new Error("options.strict was renamed to lowS");yk(x);const{lowS:M,prehash:G}=x;let J,ee;try{if("string"==typeof R||Ro(R))try{J=y.fromDER(R)}catch(Jt){if(!(Jt instanceof zi.Err))throw Jt;J=y.fromCompact(R)}else{if("object"!=typeof R||"bigint"!=typeof R.r||"bigint"!=typeof R.s)throw new Error("PARSE");{const{r:Jt,s:Xt}=R;J=new y(Jt,Xt)}}ee=l.fromHex(E)}catch(Jt){if("PARSE"===Jt.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(M&&J.hasHighS())return!1;G&&(I=t.hash(I));const{r:Se,s:ue}=J,gt=C(I),ht=c(ue),Ae=a(gt*ht),ot=a(Se*ht),Oe=l.BASE.multiplyAndAddUnsafe(ee,Ae,ot)?.toAffine();return!!Oe&&a(Oe.x)===Se},ProjectivePoint:l,Signature:y,utils:_}}function fY(e){return{hash:e,hmac:(t,...r)=>Pu(e,t,function ku(...e){let t=0;for(let i=0;i(e+t/Jp)/t;const ob=fk(Vu,void 0,void 0,{sqrt:function wk(e){const t=Vu,r=BigInt(3),i=BigInt(6),s=BigInt(11),o=BigInt(22),a=BigInt(23),c=BigInt(44),l=BigInt(88),u=e*e*e%t,d=u*u*e%t,f=pr(d,r,t)*d%t,h=pr(f,r,t)*d%t,p=pr(h,Jp,t)*u%t,g=pr(p,s,t)*p%t,m=pr(g,o,t)*g%t,y=pr(m,c,t)*m%t,_=pr(y,l,t)*y%t,v=pr(_,c,t)*m%t,w=pr(v,r,t)*d%t,b=pr(w,a,t)*g%t,D=pr(b,i,t)*u%t,C=pr(D,Jp,t);if(!ob.eql(ob.sqr(C),e))throw new Error("Cannot find square root");return C}});(function hY(e,t){const r=i=>uY({...e,...fY(i)});Object.freeze({...r(t),create:r})})({a:BigInt(0),b:BigInt(7),Fp:ob,n:Yp,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=Yp,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),i=-Uu*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=r,a=BigInt("0x100000000000000000000000000000000"),c=_k(o*e,t),l=_k(-i*e,t);let u=Yt(e-c*r-l*s,t),d=Yt(-c*i-l*o,t);const f=u>a,h=d>a;if(f&&(u=t-u),h&&(d=t-d),u>a||d>a)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:f,k1:u,k2neg:h,k2:d}}}},Gw),BigInt(0);var Hk,Gk;function $k(e,t){this.v=e,this.k=t}function Os(e){return new $k(e,0)}function sg(e){return function(){return new qu(e.apply(this,arguments))}}function qu(e){var t,r;function i(o,a){try{var c=e[o](a),l=c.value,u=l instanceof $k;Promise.resolve(u?l.v:l).then(function(d){if(u){var f="return"===o?"return":"next";if(!l.k||d.done)return i(f,d);d=e[f](d).value}s(c.done?"return":"normal",d)},function(d){i("throw",d)})}catch(d){s("throw",d)}}function s(o,a){switch(o){case"return":t.resolve({value:a,done:!0});break;case"throw":t.reject(a);break;default:t.resolve({value:a,done:!1})}(t=t.next)?i(t.key,t.arg):r=null}this._invoke=function(o,a){return new Promise(function(c,l){var u={key:o,arg:a,resolve:c,reject:l,next:null};r?r=r.next=u:(t=r=u,i(o,a))})},"function"!=typeof e.return&&(this.return=void 0)}YO("Bitcoin seed"),new TextEncoder,(new TextEncoder).encode("0123456789abcdef"),new TextEncoder,new TextDecoder,qu.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},qu.prototype.next=function(e){return this._invoke("next",e)},qu.prototype.throw=function(e){return this._invoke("throw",e)},qu.prototype.return=function(e){return this._invoke("return",e)},Hk=Symbol.asyncIterator;class zk{#t=[];#i;#f=!1;constructor(t){t?.aborted?this.abort():t?.addEventListener("abort",()=>this.abort(),{once:!0})}[Hk](){var t=this;return sg(function*(){for(;!t.#f;)t.#t.length?yield t.#t.shift():yield Os(new Promise(r=>{t.#i=r}));throw new DOMException("The signal has been aborted","AbortError")})()}push(t){this.#t.push(t),this.#i?.()}abort(){this.#f=!0,this.#i?.()}}class qk{static regular(t){return 1e3<=t&&t<1e4||[1,2,4,5,6,7,8,16,40,41,42,43,44].includes(t)}static replaceable(t){return 1e4<=t&&t<2e4||[0,3].includes(t)}static ephemeral(t){return 2e4<=t&&t<3e4}static parameterizedReplaceable(t){return 3e4<=t&&t<4e4}}Gk=Symbol.asyncDispose;class jY{opts;_relays;constructor(t){this.opts=t,this._relays=new Map}relay(t){const r=this._relays.get(t);if(r)return r;{const i=this.opts.open(t);return this._relays.set(t,i),i}}get relays(){return this._relays}req(t,r){var i=this;return sg(function*(){const s=new AbortController,o=r?.signal?AbortSignal.any([r.signal,s.signal]):s.signal,a=yield Os(i.opts.reqRouter(t));if(a.size<1)return;const c=new zk(o),l=new Set,u=new Set;for(const[m,y]of a.entries()){const _=i.relay(m);U(function*(){var b,v=!1,w=!1;try{for(var C,D=Ss(_.req(y,{signal:o}));v=!(C=yield D.next()).done;v=!1){const S=C.value;"EOSE"===S[0]&&(l.add(m),l.size===a.size&&c.push(S)),"CLOSED"===S[0]&&(u.add(m),u.size===a.size&&c.push(S)),"EVENT"===S[0]&&c.push(S)}}catch(S){w=!0,b=S}finally{try{v&&null!=D.return&&(yield D.return())}finally{if(w)throw b}}})().catch(()=>{})}try{var h,d=!1,f=!1;try{for(var g,p=Ss(c);d=!(g=yield Os(p.next())).done;d=!1)yield g.value}catch(m){f=!0,h=m}finally{try{d&&null!=p.return&&(yield Os(p.return()))}finally{if(f)throw h}}}finally{s.abort()}})()}event(t,r){var i=this;return U(function*(){const s=yield i.opts.eventRouter(t);s.length<1||(yield Promise.any(s.map(o=>i.relay(o).event(t,r))))})()}query(t,r){var i=this;return U(function*(){const s=new hr,o=t.reduce((h,p)=>h+hO(p),0);if(0===o)return[];const a=t.reduce((h,p)=>h||!!p.kinds?.some(g=>qk.replaceable(g)||qk.parameterizedReplaceable(g)),!1);try{var u,c=!1,l=!1;try{for(var f,d=Ss(i.req(t,r));c=!(f=yield d.next()).done;c=!1){const h=f.value;if("EOSE"===h[0])break;if("EVENT"===h[0]&&s.add(h[2]),"CLOSED"===h[0])throw new Error("Subscription closed");if(!a&&s.size>=o)break}}catch(h){l=!0,u=h}finally{try{c&&null!=d.return&&(yield d.return())}finally{if(l)throw u}}}catch{}return[...s]})()}close(){var t=this;return U(function*(){yield Promise.all([...t._relays.values()].map(r=>r.close()))})()}[Gk](){var t=this;return U(function*(){yield t.close()})()}}class $Y{constructor(t,r){if(this._retries=0,!Number.isInteger(t)||t<0)throw new Error("Base must be a positive integer or zero");if(void 0!==r&&(!Number.isInteger(r)||r<0))throw new Error("ExpMax must be a undefined, a positive integer or zero");this.base=t,this.expMax=r,this.i=0}get retries(){return this._retries}get current(){return this.base*Math.pow(2,this.i)}next(){return this._retries++,this.i=void 0===this.expMax?this.i+1:Math.min(this.i+1,this.expMax),this.current}reset(){this._retries=0,this.i=0}}var Re,Je=function(e){return e.open="open",e.close="close",e.error="error",e.message="message",e.retry="retry",e.reconnect="reconnect",e}(Je||{});class HY{constructor(t,r,i){var s,o,a,c,l,u,d,f,h,p,g,m,y,_,v;this._closedByUser=!1,this.handleOpenEvent=w=>this.handleEvent(Je.open,w),this.handleErrorEvent=w=>this.handleEvent(Je.error,w),this.handleCloseEvent=w=>this.handleEvent(Je.close,w),this.handleMessageEvent=w=>this.handleEvent(Je.message,w),this._url=t,this._protocols=r,this._options={buffer:i?.buffer,retry:{maxRetries:null===(s=i?.retry)||void 0===s?void 0:s.maxRetries,instantReconnect:null===(o=i?.retry)||void 0===o?void 0:o.instantReconnect,backoff:null===(a=i?.retry)||void 0===a?void 0:a.backoff},listeners:{open:[...null!==(l=null===(c=i?.listeners)||void 0===c?void 0:c.open)&&void 0!==l?l:[]],close:[...null!==(d=null===(u=i?.listeners)||void 0===u?void 0:u.close)&&void 0!==d?d:[]],error:[...null!==(h=null===(f=i?.listeners)||void 0===f?void 0:f.error)&&void 0!==h?h:[]],message:[...null!==(g=null===(p=i?.listeners)||void 0===p?void 0:p.message)&&void 0!==g?g:[]],retry:[...null!==(y=null===(m=i?.listeners)||void 0===m?void 0:m.retry)&&void 0!==y?y:[]],reconnect:[...null!==(v=null===(_=i?.listeners)||void 0===_?void 0:_.reconnect)&&void 0!==v?v:[]]}},this._underlyingWebsocket=this.tryConnect()}get url(){return this._url}get protocols(){return this._protocols}get buffer(){return this._options.buffer}get maxRetries(){return this._options.retry.maxRetries}get instantReconnect(){return this._options.retry.instantReconnect}get backoff(){return this._options.retry.backoff}get closedByUser(){return this._closedByUser}get lastConnection(){return this._lastConnection}get underlyingWebsocket(){return this._underlyingWebsocket}get readyState(){return this._underlyingWebsocket.readyState}get bufferedAmount(){return this._underlyingWebsocket.bufferedAmount}get extensions(){return this._underlyingWebsocket.extensions}get binaryType(){return this._underlyingWebsocket.binaryType}set binaryType(t){this._underlyingWebsocket.binaryType=t}send(t){this.closedByUser||(this._underlyingWebsocket.readyState===this._underlyingWebsocket.OPEN?this._underlyingWebsocket.send(t):void 0!==this.buffer&&this.buffer.add(t))}close(t,r){this.cancelScheduledConnectionRetry(),this._closedByUser=!0,this._underlyingWebsocket.close(t,r)}addEventListener(t,r,i){this._options.listeners[t].push({listener:r,options:i})}removeEventListener(t,r,i){this._options.listeners[t]=this._options.listeners[t].filter(o=>o.listener!==r||o.options!==i)}tryConnect(){return this._underlyingWebsocket=new WebSocket(this.url,this.protocols),this._underlyingWebsocket.addEventListener(Je.open,this.handleOpenEvent),this._underlyingWebsocket.addEventListener(Je.close,this.handleCloseEvent),this._underlyingWebsocket.addEventListener(Je.error,this.handleErrorEvent),this._underlyingWebsocket.addEventListener(Je.message,this.handleMessageEvent),this._underlyingWebsocket}clearWebsocket(){this._underlyingWebsocket.removeEventListener(Je.open,this.handleOpenEvent),this._underlyingWebsocket.removeEventListener(Je.close,this.handleCloseEvent),this._underlyingWebsocket.removeEventListener(Je.error,this.handleErrorEvent),this._underlyingWebsocket.removeEventListener(Je.message,this.handleMessageEvent),this._underlyingWebsocket.close()}dispatchEvent(t,r){const s=[];this._options.listeners[t].forEach(({listener:o,options:a})=>{o(this,r),(void 0===a||void 0===a.once||!a.once)&&s.push({listener:o,options:a})}),this._options.listeners[t]=s}handleEvent(t,r){switch(t){case Je.close:this.dispatchEvent(t,r),this.scheduleConnectionRetryIfNeeded();break;case Je.open:if(void 0!==this.backoff&&void 0!==this._lastConnection){const i={retries:this.backoff.retries,lastConnection:new Date(this._lastConnection)},s=new CustomEvent(Je.reconnect,{detail:i});this.dispatchEvent(Je.reconnect,s),this.backoff.reset()}this._lastConnection=new Date,this.dispatchEvent(t,r),this.sendBufferedData();break;case Je.retry:this.dispatchEvent(t,r),this.clearWebsocket(),this.tryConnect();break;default:this.dispatchEvent(t,r)}}sendBufferedData(){if(void 0!==this.buffer)for(let t=this.buffer.read();void 0!==t;t=this.buffer.read())this.send(t)}scheduleConnectionRetryIfNeeded(){if(this.closedByUser||void 0===this.backoff)return;const t=i=>{const s=new CustomEvent(Je.retry,{detail:i});this.handleEvent(Je.retry,s)},r={backoff:!0===this._options.retry.instantReconnect?0:this.backoff.next(),retries:!0===this._options.retry.instantReconnect?0:this.backoff.retries,lastConnection:this._lastConnection};(void 0===this._options.retry.maxRetries||r.retries<=this._options.retry.maxRetries)&&(this.retryTimeout=globalThis.setTimeout(()=>t(r),r.backoff))}cancelScheduledConnectionRetry(){globalThis.clearTimeout(this.retryTimeout)}}class zY{constructor(t){this._url=t}get url(){return this._url}withProtocols(t){return this._protocols=t,this}get protocols(){return this._protocols}withMaxRetries(t){var r;return this._options=Object.assign(Object.assign({},this._options),{retry:Object.assign(Object.assign({},null===(r=this._options)||void 0===r?void 0:r.retry),{maxRetries:t})}),this}get maxRetries(){var t,r;return null===(r=null===(t=this._options)||void 0===t?void 0:t.retry)||void 0===r?void 0:r.maxRetries}withInstantReconnect(t){var r;return this._options=Object.assign(Object.assign({},this._options),{retry:Object.assign(Object.assign({},null===(r=this._options)||void 0===r?void 0:r.retry),{instantReconnect:t})}),this}get instantReconnect(){var t,r;return null===(r=null===(t=this._options)||void 0===t?void 0:t.retry)||void 0===r?void 0:r.instantReconnect}withBackoff(t){var r;return this._options=Object.assign(Object.assign({},this._options),{retry:Object.assign(Object.assign({},null===(r=this._options)||void 0===r?void 0:r.retry),{backoff:t})}),this}get backoff(){var t,r;return null===(r=null===(t=this._options)||void 0===t?void 0:t.retry)||void 0===r?void 0:r.backoff}withBuffer(t){return this._options=Object.assign(Object.assign({},this._options),{buffer:t}),this}get buffer(){var t;return null===(t=this._options)||void 0===t?void 0:t.buffer}onOpen(t,r){return this.addListener(Je.open,t,r),this}onClose(t,r){return this.addListener(Je.close,t,r),this}onError(t,r){return this.addListener(Je.error,t,r),this}onMessage(t,r){return this.addListener(Je.message,t,r),this}onRetry(t,r){return this.addListener(Je.retry,t,r),this}onReconnect(t,r){return this.addListener(Je.reconnect,t,r),this}build(){return new HY(this._url,this._protocols,this._options)}addListener(t,r,i){var s,o,a,c,l,u,d,f,h,p,g,m,y,_,v,w,b,D,C,S,T;return this._options=Object.assign(Object.assign({},this._options),{listeners:{open:null!==(a=null===(o=null===(s=this._options)||void 0===s?void 0:s.listeners)||void 0===o?void 0:o.open)&&void 0!==a?a:[],close:null!==(u=null===(l=null===(c=this._options)||void 0===c?void 0:c.listeners)||void 0===l?void 0:l.close)&&void 0!==u?u:[],error:null!==(h=null===(f=null===(d=this._options)||void 0===d?void 0:d.listeners)||void 0===f?void 0:f.error)&&void 0!==h?h:[],message:null!==(m=null===(g=null===(p=this._options)||void 0===p?void 0:p.listeners)||void 0===g?void 0:g.message)&&void 0!==m?m:[],retry:null!==(v=null===(_=null===(y=this._options)||void 0===y?void 0:y.listeners)||void 0===_?void 0:_.retry)&&void 0!==v?v:[],reconnect:null!==(D=null===(b=null===(w=this._options)||void 0===w?void 0:w.listeners)||void 0===b?void 0:b.reconnect)&&void 0!==D?D:[],[t]:[...null!==(T=null===(S=null===(C=this._options)||void 0===C?void 0:C.listeners)||void 0===S?void 0:S[t])&&void 0!==T?T:[],{listener:r,options:i}]}}),this}}class qY{constructor(){this.elements=[]}add(t){this.elements.push(t)}clear(){this.elements.length=0}forEach(t){this.elements.forEach(t)}length(){return this.elements.length}isEmpty(){return 0===this.elements.length}peek(){return this.elements[0]}read(){return this.elements.shift()}}!function(e){e.assertEqual=s=>s,e.assertIs=function t(s){},e.assertNever=function r(s){throw new Error},e.arrayToEnum=s=>{const o={};for(const a of s)o[a]=a;return o},e.getValidEnumValues=s=>{const o=e.objectKeys(s).filter(c=>"number"!=typeof s[s[c]]),a={};for(const c of o)a[c]=s[c];return e.objectValues(a)},e.objectValues=s=>e.objectKeys(s).map(function(o){return s[o]}),e.objectKeys="function"==typeof Object.keys?s=>Object.keys(s):s=>{const o=[];for(const a in s)Object.prototype.hasOwnProperty.call(s,a)&&o.push(a);return o},e.find=(s,o)=>{for(const a of s)if(o(a))return a},e.isInteger="function"==typeof Number.isInteger?s=>Number.isInteger(s):s=>"number"==typeof s&&isFinite(s)&&Math.floor(s)===s,e.joinValues=function i(s,o=" | "){return s.map(a=>"string"==typeof a?`'${a}'`:a).join(o)},e.jsonStringifyReplacer=(s,o)=>"bigint"==typeof o?o.toString():o}(Re||(Re={}));var Wk=function(e){return e.mergeShapes=(t,r)=>({...t,...r}),e}(Wk||{});const K=Re.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ks=e=>{switch(typeof e){case"undefined":return K.undefined;case"string":return K.string;case"number":return isNaN(e)?K.nan:K.number;case"boolean":return K.boolean;case"function":return K.function;case"bigint":return K.bigint;case"symbol":return K.symbol;case"object":return Array.isArray(e)?K.array:null===e?K.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?K.promise:typeof Map<"u"&&e instanceof Map?K.map:typeof Set<"u"&&e instanceof Set?K.set:typeof Date<"u"&&e instanceof Date?K.date:K.object;default:return K.unknown}},B=Re.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);let Gi=(()=>{class e extends Error{constructor(r){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const i=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,i):this.__proto__=i,this.name="ZodError",this.issues=r}get errors(){return this.issues}format(r){const i=r||function(a){return a.message},s={_errors:[]},o=a=>{for(const c of a.issues)if("invalid_union"===c.code)c.unionErrors.map(o);else if("invalid_return_type"===c.code)o(c.returnTypeError);else if("invalid_arguments"===c.code)o(c.argumentsError);else if(0===c.path.length)s._errors.push(i(c));else{let l=s,u=0;for(;ui.message){const i={},s=[];for(const o of this.issues)o.path.length>0?(i[o.path[0]]=i[o.path[0]]||[],i[o.path[0]].push(r(o))):s.push(r(o));return{formErrors:s,fieldErrors:i}}get formErrors(){return this.flatten()}}return e.create=t=>new e(t),e})();const Dc=(e,t)=>{let r;switch(e.code){case B.invalid_type:r=e.received===K.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case B.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Re.jsonStringifyReplacer)}`;break;case B.unrecognized_keys:r=`Unrecognized key(s) in object: ${Re.joinValues(e.keys,", ")}`;break;case B.invalid_union:r="Invalid input";break;case B.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Re.joinValues(e.options)}`;break;case B.invalid_enum_value:r=`Invalid enum value. Expected ${Re.joinValues(e.options)}, received '${e.received}'`;break;case B.invalid_arguments:r="Invalid function arguments";break;case B.invalid_return_type:r="Invalid function return type";break;case B.invalid_date:r="Invalid date";break;case B.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:Re.assertNever(e.validation):r="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case B.too_small:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case B.too_big:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case B.custom:r="Invalid input";break;case B.invalid_intersection_types:r="Intersection results could not be merged";break;case B.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case B.not_finite:r="Number must be finite";break;default:r=t.defaultError,Re.assertNever(e)}return{message:r}};let Zk=Dc;function og(){return Zk}const ag=e=>{const{data:t,path:r,errorMaps:i,issueData:s}=e,o=[...r,...s.path||[]],a={...s,path:o};if(void 0!==s.message)return{...s,path:o,message:s.message};let c="";const l=i.filter(u=>!!u).slice().reverse();for(const u of l)c=u(a,{data:t,defaultError:c}).message;return{...s,path:o,message:c}};function W(e,t){const r=og(),i=ag({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Dc?void 0:Dc].filter(s=>!!s)});e.common.issues.push(i)}class ln{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(t,r){const i=[];for(const s of r){if("aborted"===s.status)return ae;"dirty"===s.status&&t.dirty(),i.push(s.value)}return{status:t.value,value:i}}static mergeObjectAsync(t,r){return U(function*(){const i=[];for(const s of r){const o=yield s.key,a=yield s.value;i.push({key:o,value:a})}return ln.mergeObjectSync(t,i)})()}static mergeObjectSync(t,r){const i={};for(const s of r){const{key:o,value:a}=s;if("aborted"===o.status||"aborted"===a.status)return ae;"dirty"===o.status&&t.dirty(),"dirty"===a.status&&t.dirty(),"__proto__"!==o.value&&(typeof a.value<"u"||s.alwaysSet)&&(i[o.value]=a.value)}return{status:t.value,value:i}}}const ae=Object.freeze({status:"aborted"}),Sc=e=>({status:"dirty",value:e}),En=e=>({status:"valid",value:e}),wb=e=>"aborted"===e.status,bb=e=>"dirty"===e.status,Gu=e=>"valid"===e.status,Wu=e=>typeof Promise<"u"&&e instanceof Promise;function cg(e,t,r,i){if("a"===r&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?i:"a"===r?i.call(e):i?i.value:t.get(e)}function Kk(e,t,r,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(e,r):s?s.value=r:t.set(e,r),r}"function"==typeof SuppressedError&&SuppressedError;var Zu,Ku,te=function(e){return e.errToObj=t=>"string"==typeof t?{message:t}:t||{},e.toString=t=>"string"==typeof t?t:t?.message,e}(te||{});class ci{constructor(t,r,i,s){this._cachedPath=[],this.parent=t,this.data=r,this._path=i,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Qk=(e,t)=>{if(Gu(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new Gi(e.common.issues);return this._error=r,this._error}}};function me(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:i,description:s}=e;if(t&&(r||i))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:s}:{errorMap:(a,c)=>{var l,u;const{message:d}=e;return"invalid_enum_value"===a.code?{message:d??c.defaultError}:typeof c.data>"u"?{message:null!==(l=d??i)&&void 0!==l?l:c.defaultError}:"invalid_type"!==a.code?{message:c.defaultError}:{message:null!==(u=d??r)&&void 0!==u?u:c.defaultError}},description:s}}class Ee{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return ks(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:ks(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ln,ctx:{common:t.parent.common,data:t.data,parsedType:ks(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(Wu(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const i=this.safeParse(t,r);if(i.success)return i.data;throw i.error}safeParse(t,r){var i;const s={common:{issues:[],async:null!==(i=r?.async)&&void 0!==i&&i,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ks(t)},o=this._parseSync({data:t,path:s.path,parent:s});return Qk(s,o)}parseAsync(t,r){var i=this;return U(function*(){const s=yield i.safeParseAsync(t,r);if(s.success)return s.data;throw s.error})()}safeParseAsync(t,r){var i=this;return U(function*(){const s={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:i._def.errorMap,parent:null,data:t,parsedType:ks(t)},o=i._parse({data:t,path:s.path,parent:s}),a=yield Wu(o)?o:Promise.resolve(o);return Qk(s,a)})()}refine(t,r){const i=s=>"string"==typeof r||typeof r>"u"?{message:r}:"function"==typeof r?r(s):r;return this._refinement((s,o)=>{const a=t(s),c=()=>o.addIssue({code:B.custom,...i(s)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>!!l||(c(),!1)):!!a||(c(),!1)})}refinement(t,r){return this._refinement((i,s)=>!!t(i)||(s.addIssue("function"==typeof r?r(i,s):r),!1))}_refinement(t){return new Bo({schema:this,typeName:ce.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Ls.create(this,this._def)}nullable(){return Mc.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Yu.create(this,this._def)}promise(){return fg.create(this,this._def)}or(t){return Ab.create([this,t],this._def)}and(t){return Nb.create(this,t,this._def)}transform(t){return new Bo({...me(this._def),schema:this,typeName:ce.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r="function"==typeof t?t:()=>t;return new kb({...me(this._def),innerType:this,defaultValue:r,typeName:ce.ZodDefault})}brand(){return new Lb({typeName:ce.ZodBranded,type:this,...me(this._def)})}catch(t){const r="function"==typeof t?t:()=>t;return new Pb({...me(this._def),innerType:this,catchValue:r,typeName:ce.ZodCatch})}describe(t){return new(0,this.constructor)({...this._def,description:t})}pipe(t){return ed.create(this,t)}readonly(){return Fb.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const KY=/^c[^\s-]{8,}$/i,QY=/^[0-9a-z]+$/,YY=/^[0-9A-HJKMNP-TV-Z]{26}$/,JY=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,XY=/^[a-z0-9_-]{21}$/i,eJ=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,tJ=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let Eb;const rJ=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,iJ=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,sJ=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Yk="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",oJ=new RegExp(`^${Yk}$`);function Jk(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`),t}function aJ(e){return new RegExp(`^${Jk(e)}$`)}function Xk(e){let t=`${Yk}T${Jk(e)}`;const r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function cJ(e,t){return!(("v4"!==t&&t||!rJ.test(e))&&("v6"!==t&&t||!iJ.test(e)))}let lg=(()=>{class e extends Ee{_parse(r){if(this._def.coerce&&(r.data=String(r.data)),this._getType(r)!==K.string){const a=this._getOrReturnCtx(r);return W(a,{code:B.invalid_type,expected:K.string,received:a.parsedType}),ae}const s=new ln;let o;for(const a of this._def.checks)if("min"===a.kind)r.data.lengtha.value&&(o=this._getOrReturnCtx(r,o),W(o,{code:B.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if("length"===a.kind){const c=r.data.length>a.value,l=r.data.lengthr.test(o),{validation:i,code:B.invalid_string,...te.errToObj(s)})}_addCheck(r){return new e({...this._def,checks:[...this._def.checks,r]})}email(r){return this._addCheck({kind:"email",...te.errToObj(r)})}url(r){return this._addCheck({kind:"url",...te.errToObj(r)})}emoji(r){return this._addCheck({kind:"emoji",...te.errToObj(r)})}uuid(r){return this._addCheck({kind:"uuid",...te.errToObj(r)})}nanoid(r){return this._addCheck({kind:"nanoid",...te.errToObj(r)})}cuid(r){return this._addCheck({kind:"cuid",...te.errToObj(r)})}cuid2(r){return this._addCheck({kind:"cuid2",...te.errToObj(r)})}ulid(r){return this._addCheck({kind:"ulid",...te.errToObj(r)})}base64(r){return this._addCheck({kind:"base64",...te.errToObj(r)})}ip(r){return this._addCheck({kind:"ip",...te.errToObj(r)})}datetime(r){var i,s;return this._addCheck("string"==typeof r?{kind:"datetime",precision:null,offset:!1,local:!1,message:r}:{kind:"datetime",precision:typeof r?.precision>"u"?null:r?.precision,offset:null!==(i=r?.offset)&&void 0!==i&&i,local:null!==(s=r?.local)&&void 0!==s&&s,...te.errToObj(r?.message)})}date(r){return this._addCheck({kind:"date",message:r})}time(r){return this._addCheck("string"==typeof r?{kind:"time",precision:null,message:r}:{kind:"time",precision:typeof r?.precision>"u"?null:r?.precision,...te.errToObj(r?.message)})}duration(r){return this._addCheck({kind:"duration",...te.errToObj(r)})}regex(r,i){return this._addCheck({kind:"regex",regex:r,...te.errToObj(i)})}includes(r,i){return this._addCheck({kind:"includes",value:r,position:i?.position,...te.errToObj(i?.message)})}startsWith(r,i){return this._addCheck({kind:"startsWith",value:r,...te.errToObj(i)})}endsWith(r,i){return this._addCheck({kind:"endsWith",value:r,...te.errToObj(i)})}min(r,i){return this._addCheck({kind:"min",value:r,...te.errToObj(i)})}max(r,i){return this._addCheck({kind:"max",value:r,...te.errToObj(i)})}length(r,i){return this._addCheck({kind:"length",value:r,...te.errToObj(i)})}nonempty(r){return this.min(1,te.errToObj(r))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(r=>"datetime"===r.kind)}get isDate(){return!!this._def.checks.find(r=>"date"===r.kind)}get isTime(){return!!this._def.checks.find(r=>"time"===r.kind)}get isDuration(){return!!this._def.checks.find(r=>"duration"===r.kind)}get isEmail(){return!!this._def.checks.find(r=>"email"===r.kind)}get isURL(){return!!this._def.checks.find(r=>"url"===r.kind)}get isEmoji(){return!!this._def.checks.find(r=>"emoji"===r.kind)}get isUUID(){return!!this._def.checks.find(r=>"uuid"===r.kind)}get isNANOID(){return!!this._def.checks.find(r=>"nanoid"===r.kind)}get isCUID(){return!!this._def.checks.find(r=>"cuid"===r.kind)}get isCUID2(){return!!this._def.checks.find(r=>"cuid2"===r.kind)}get isULID(){return!!this._def.checks.find(r=>"ulid"===r.kind)}get isIP(){return!!this._def.checks.find(r=>"ip"===r.kind)}get isBase64(){return!!this._def.checks.find(r=>"base64"===r.kind)}get minLength(){let r=null;for(const i of this._def.checks)"min"===i.kind&&(null===r||i.value>r)&&(r=i.value);return r}get maxLength(){let r=null;for(const i of this._def.checks)"max"===i.kind&&(null===r||i.value{var r;return new e({checks:[],typeName:ce.ZodString,coerce:null!==(r=t?.coerce)&&void 0!==r&&r,...me(t)})},e})();function lJ(e,t){const r=(e.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,s=r>i?r:i;return parseInt(e.toFixed(s).replace(".",""))%parseInt(t.toFixed(s).replace(".",""))/Math.pow(10,s)}let Cb=(()=>{class e extends Ee{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(r){if(this._def.coerce&&(r.data=Number(r.data)),this._getType(r)!==K.number){const a=this._getOrReturnCtx(r);return W(a,{code:B.invalid_type,expected:K.number,received:a.parsedType}),ae}let s;const o=new ln;for(const a of this._def.checks)"int"===a.kind?Re.isInteger(r.data)||(s=this._getOrReturnCtx(r,s),W(s,{code:B.invalid_type,expected:"integer",received:"float",message:a.message}),o.dirty()):"min"===a.kind?(a.inclusive?r.dataa.value:r.data>=a.value)&&(s=this._getOrReturnCtx(r,s),W(s,{code:B.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),o.dirty()):"multipleOf"===a.kind?0!==lJ(r.data,a.value)&&(s=this._getOrReturnCtx(r,s),W(s,{code:B.not_multiple_of,multipleOf:a.value,message:a.message}),o.dirty()):"finite"===a.kind?Number.isFinite(r.data)||(s=this._getOrReturnCtx(r,s),W(s,{code:B.not_finite,message:a.message}),o.dirty()):Re.assertNever(a);return{status:o.value,value:r.data}}gte(r,i){return this.setLimit("min",r,!0,te.toString(i))}gt(r,i){return this.setLimit("min",r,!1,te.toString(i))}lte(r,i){return this.setLimit("max",r,!0,te.toString(i))}lt(r,i){return this.setLimit("max",r,!1,te.toString(i))}setLimit(r,i,s,o){return new e({...this._def,checks:[...this._def.checks,{kind:r,value:i,inclusive:s,message:te.toString(o)}]})}_addCheck(r){return new e({...this._def,checks:[...this._def.checks,r]})}int(r){return this._addCheck({kind:"int",message:te.toString(r)})}positive(r){return this._addCheck({kind:"min",value:0,inclusive:!1,message:te.toString(r)})}negative(r){return this._addCheck({kind:"max",value:0,inclusive:!1,message:te.toString(r)})}nonpositive(r){return this._addCheck({kind:"max",value:0,inclusive:!0,message:te.toString(r)})}nonnegative(r){return this._addCheck({kind:"min",value:0,inclusive:!0,message:te.toString(r)})}multipleOf(r,i){return this._addCheck({kind:"multipleOf",value:r,message:te.toString(i)})}finite(r){return this._addCheck({kind:"finite",message:te.toString(r)})}safe(r){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:te.toString(r)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:te.toString(r)})}get minValue(){let r=null;for(const i of this._def.checks)"min"===i.kind&&(null===r||i.value>r)&&(r=i.value);return r}get maxValue(){let r=null;for(const i of this._def.checks)"max"===i.kind&&(null===r||i.value"int"===r.kind||"multipleOf"===r.kind&&Re.isInteger(r.value))}get isFinite(){let r=null,i=null;for(const s of this._def.checks){if("finite"===s.kind||"int"===s.kind||"multipleOf"===s.kind)return!0;"min"===s.kind?(null===i||s.value>i)&&(i=s.value):"max"===s.kind&&(null===r||s.valuenew e({checks:[],typeName:ce.ZodNumber,coerce:t?.coerce||!1,...me(t)}),e})(),Db=(()=>{class e extends Ee{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(r){if(this._def.coerce&&(r.data=BigInt(r.data)),this._getType(r)!==K.bigint){const a=this._getOrReturnCtx(r);return W(a,{code:B.invalid_type,expected:K.bigint,received:a.parsedType}),ae}let s;const o=new ln;for(const a of this._def.checks)"min"===a.kind?(a.inclusive?r.dataa.value:r.data>=a.value)&&(s=this._getOrReturnCtx(r,s),W(s,{code:B.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),o.dirty()):"multipleOf"===a.kind?r.data%a.value!==BigInt(0)&&(s=this._getOrReturnCtx(r,s),W(s,{code:B.not_multiple_of,multipleOf:a.value,message:a.message}),o.dirty()):Re.assertNever(a);return{status:o.value,value:r.data}}gte(r,i){return this.setLimit("min",r,!0,te.toString(i))}gt(r,i){return this.setLimit("min",r,!1,te.toString(i))}lte(r,i){return this.setLimit("max",r,!0,te.toString(i))}lt(r,i){return this.setLimit("max",r,!1,te.toString(i))}setLimit(r,i,s,o){return new e({...this._def,checks:[...this._def.checks,{kind:r,value:i,inclusive:s,message:te.toString(o)}]})}_addCheck(r){return new e({...this._def,checks:[...this._def.checks,r]})}positive(r){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:te.toString(r)})}negative(r){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:te.toString(r)})}nonpositive(r){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:te.toString(r)})}nonnegative(r){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:te.toString(r)})}multipleOf(r,i){return this._addCheck({kind:"multipleOf",value:r,message:te.toString(i)})}get minValue(){let r=null;for(const i of this._def.checks)"min"===i.kind&&(null===r||i.value>r)&&(r=i.value);return r}get maxValue(){let r=null;for(const i of this._def.checks)"max"===i.kind&&(null===r||i.value{var r;return new e({checks:[],typeName:ce.ZodBigInt,coerce:null!==(r=t?.coerce)&&void 0!==r&&r,...me(t)})},e})(),Sb=(()=>{class e extends Ee{_parse(r){if(this._def.coerce&&(r.data=!!r.data),this._getType(r)!==K.boolean){const s=this._getOrReturnCtx(r);return W(s,{code:B.invalid_type,expected:K.boolean,received:s.parsedType}),ae}return En(r.data)}}return e.create=t=>new e({typeName:ce.ZodBoolean,coerce:t?.coerce||!1,...me(t)}),e})(),Ib=(()=>{class e extends Ee{_parse(r){if(this._def.coerce&&(r.data=new Date(r.data)),this._getType(r)!==K.date){const a=this._getOrReturnCtx(r);return W(a,{code:B.invalid_type,expected:K.date,received:a.parsedType}),ae}if(isNaN(r.data.getTime()))return W(this._getOrReturnCtx(r),{code:B.invalid_date}),ae;const s=new ln;let o;for(const a of this._def.checks)"min"===a.kind?r.data.getTime()a.value&&(o=this._getOrReturnCtx(r,o),W(o,{code:B.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),s.dirty()):Re.assertNever(a);return{status:s.value,value:new Date(r.data.getTime())}}_addCheck(r){return new e({...this._def,checks:[...this._def.checks,r]})}min(r,i){return this._addCheck({kind:"min",value:r.getTime(),message:te.toString(i)})}max(r,i){return this._addCheck({kind:"max",value:r.getTime(),message:te.toString(i)})}get minDate(){let r=null;for(const i of this._def.checks)"min"===i.kind&&(null===r||i.value>r)&&(r=i.value);return null!=r?new Date(r):null}get maxDate(){let r=null;for(const i of this._def.checks)"max"===i.kind&&(null===r||i.valuenew e({checks:[],coerce:t?.coerce||!1,typeName:ce.ZodDate,...me(t)}),e})(),e2=(()=>{class e extends Ee{_parse(r){if(this._getType(r)!==K.symbol){const s=this._getOrReturnCtx(r);return W(s,{code:B.invalid_type,expected:K.symbol,received:s.parsedType}),ae}return En(r.data)}}return e.create=t=>new e({typeName:ce.ZodSymbol,...me(t)}),e})(),Tb=(()=>{class e extends Ee{_parse(r){if(this._getType(r)!==K.undefined){const s=this._getOrReturnCtx(r);return W(s,{code:B.invalid_type,expected:K.undefined,received:s.parsedType}),ae}return En(r.data)}}return e.create=t=>new e({typeName:ce.ZodUndefined,...me(t)}),e})(),xb=(()=>{class e extends Ee{_parse(r){if(this._getType(r)!==K.null){const s=this._getOrReturnCtx(r);return W(s,{code:B.invalid_type,expected:K.null,received:s.parsedType}),ae}return En(r.data)}}return e.create=t=>new e({typeName:ce.ZodNull,...me(t)}),e})(),ug=(()=>{class e extends Ee{constructor(){super(...arguments),this._any=!0}_parse(r){return En(r.data)}}return e.create=t=>new e({typeName:ce.ZodAny,...me(t)}),e})(),Qu=(()=>{class e extends Ee{constructor(){super(...arguments),this._unknown=!0}_parse(r){return En(r.data)}}return e.create=t=>new e({typeName:ce.ZodUnknown,...me(t)}),e})(),Fo=(()=>{class e extends Ee{_parse(r){const i=this._getOrReturnCtx(r);return W(i,{code:B.invalid_type,expected:K.never,received:i.parsedType}),ae}}return e.create=t=>new e({typeName:ce.ZodNever,...me(t)}),e})(),t2=(()=>{class e extends Ee{_parse(r){if(this._getType(r)!==K.undefined){const s=this._getOrReturnCtx(r);return W(s,{code:B.invalid_type,expected:K.void,received:s.parsedType}),ae}return En(r.data)}}return e.create=t=>new e({typeName:ce.ZodVoid,...me(t)}),e})(),Yu=(()=>{class e extends Ee{_parse(r){const{ctx:i,status:s}=this._processInputParams(r),o=this._def;if(i.parsedType!==K.array)return W(i,{code:B.invalid_type,expected:K.array,received:i.parsedType}),ae;if(null!==o.exactLength){const c=i.data.length>o.exactLength.value,l=i.data.lengtho.maxLength.value&&(W(i,{code:B.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),s.dirty()),i.common.async)return Promise.all([...i.data].map((c,l)=>o.type._parseAsync(new ci(i,c,i.path,l)))).then(c=>ln.mergeArray(s,c));const a=[...i.data].map((c,l)=>o.type._parseSync(new ci(i,c,i.path,l)));return ln.mergeArray(s,a)}get element(){return this._def.type}min(r,i){return new e({...this._def,minLength:{value:r,message:te.toString(i)}})}max(r,i){return new e({...this._def,maxLength:{value:r,message:te.toString(i)}})}length(r,i){return new e({...this._def,exactLength:{value:r,message:te.toString(i)}})}nonempty(r){return this.min(1,r)}}return e.create=(t,r)=>new e({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ce.ZodArray,...me(r)}),e})();function Ic(e){if(e instanceof Tc){const t={};for(const r in e.shape)t[r]=Ls.create(Ic(e.shape[r]));return new Tc({...e._def,shape:()=>t})}return e instanceof Yu?new Yu({...e._def,type:Ic(e.element)}):e instanceof Ls?Ls.create(Ic(e.unwrap())):e instanceof Mc?Mc.create(Ic(e.unwrap())):e instanceof xc?xc.create(e.items.map(t=>Ic(t))):e}let Tc=(()=>{class e extends Ee{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const r=this._def.shape(),i=Re.objectKeys(r);return this._cached={shape:r,keys:i}}_parse(r){if(this._getType(r)!==K.object){const d=this._getOrReturnCtx(r);return W(d,{code:B.invalid_type,expected:K.object,received:d.parsedType}),ae}const{status:s,ctx:o}=this._processInputParams(r),{shape:a,keys:c}=this._getCached(),l=[];if(!(this._def.catchall instanceof Fo&&"strip"===this._def.unknownKeys))for(const d in o.data)c.includes(d)||l.push(d);const u=[];for(const d of c)u.push({key:{status:"valid",value:d},value:a[d]._parse(new ci(o,o.data[d],o.path,d)),alwaysSet:d in o.data});if(this._def.catchall instanceof Fo){const d=this._def.unknownKeys;if("passthrough"===d)for(const f of l)u.push({key:{status:"valid",value:f},value:{status:"valid",value:o.data[f]}});else if("strict"===d)l.length>0&&(W(o,{code:B.unrecognized_keys,keys:l}),s.dirty());else if("strip"!==d)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const d=this._def.catchall;for(const f of l)u.push({key:{status:"valid",value:f},value:d._parse(new ci(o,o.data[f],o.path,f)),alwaysSet:f in o.data})}return o.common.async?Promise.resolve().then(U(function*(){const d=[];for(const f of u){const h=yield f.key,p=yield f.value;d.push({key:h,value:p,alwaysSet:f.alwaysSet})}return d})).then(d=>ln.mergeObjectSync(s,d)):ln.mergeObjectSync(s,u)}get shape(){return this._def.shape()}strict(r){return new e({...this._def,unknownKeys:"strict",...void 0!==r?{errorMap:(i,s)=>{var o,a,c,l;const u=null!==(c=null===(a=(o=this._def).errorMap)||void 0===a?void 0:a.call(o,i,s).message)&&void 0!==c?c:s.defaultError;return"unrecognized_keys"===i.code?{message:null!==(l=te.errToObj(r).message)&&void 0!==l?l:u}:{message:u}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(r){return new e({...this._def,shape:()=>({...this._def.shape(),...r})})}merge(r){return new e({unknownKeys:r._def.unknownKeys,catchall:r._def.catchall,shape:()=>({...this._def.shape(),...r._def.shape()}),typeName:ce.ZodObject})}setKey(r,i){return this.augment({[r]:i})}catchall(r){return new e({...this._def,catchall:r})}pick(r){const i={};return Re.objectKeys(r).forEach(s=>{r[s]&&this.shape[s]&&(i[s]=this.shape[s])}),new e({...this._def,shape:()=>i})}omit(r){const i={};return Re.objectKeys(this.shape).forEach(s=>{r[s]||(i[s]=this.shape[s])}),new e({...this._def,shape:()=>i})}deepPartial(){return Ic(this)}partial(r){const i={};return Re.objectKeys(this.shape).forEach(s=>{const o=this.shape[s];i[s]=r&&!r[s]?o:o.optional()}),new e({...this._def,shape:()=>i})}required(r){const i={};return Re.objectKeys(this.shape).forEach(s=>{if(r&&!r[s])i[s]=this.shape[s];else{let a=this.shape[s];for(;a instanceof Ls;)a=a._def.innerType;i[s]=a}}),new e({...this._def,shape:()=>i})}keyof(){return i2(Re.objectKeys(this.shape))}}return e.create=(t,r)=>new e({shape:()=>t,unknownKeys:"strip",catchall:Fo.create(),typeName:ce.ZodObject,...me(r)}),e.strictCreate=(t,r)=>new e({shape:()=>t,unknownKeys:"strict",catchall:Fo.create(),typeName:ce.ZodObject,...me(r)}),e.lazycreate=(t,r)=>new e({shape:t,unknownKeys:"strip",catchall:Fo.create(),typeName:ce.ZodObject,...me(r)}),e})(),Ab=(()=>{class e extends Ee{_parse(r){const{ctx:i}=this._processInputParams(r),s=this._def.options;if(i.common.async)return Promise.all(s.map(function(){var a=U(function*(c){const l={...i,common:{...i.common,issues:[]},parent:null};return{result:yield c._parseAsync({data:i.data,path:i.path,parent:l}),ctx:l}});return function(c){return a.apply(this,arguments)}}())).then(function o(a){for(const l of a)if("valid"===l.result.status)return l.result;for(const l of a)if("dirty"===l.result.status)return i.common.issues.push(...l.ctx.common.issues),l.result;const c=a.map(l=>new Gi(l.ctx.common.issues));return W(i,{code:B.invalid_union,unionErrors:c}),ae});{let a;const c=[];for(const u of s){const d={...i,common:{...i.common,issues:[]},parent:null},f=u._parseSync({data:i.data,path:i.path,parent:d});if("valid"===f.status)return f;"dirty"===f.status&&!a&&(a={result:f,ctx:d}),d.common.issues.length&&c.push(d.common.issues)}if(a)return i.common.issues.push(...a.ctx.common.issues),a.result;const l=c.map(u=>new Gi(u));return W(i,{code:B.invalid_union,unionErrors:l}),ae}}get options(){return this._def.options}}return e.create=(t,r)=>new e({options:t,typeName:ce.ZodUnion,...me(r)}),e})();const Wi=e=>e instanceof Rb?Wi(e.schema):e instanceof Bo?Wi(e.innerType()):e instanceof Ob?[e.value]:e instanceof Ps?e.options:e instanceof Xu?Re.objectValues(e.enum):e instanceof kb?Wi(e._def.innerType):e instanceof Tb?[void 0]:e instanceof xb?[null]:e instanceof Ls?[void 0,...Wi(e.unwrap())]:e instanceof Mc?[null,...Wi(e.unwrap())]:e instanceof Lb||e instanceof Fb?Wi(e.unwrap()):e instanceof Pb?Wi(e._def.innerType):[];class dg extends Ee{_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==K.object)return W(r,{code:B.invalid_type,expected:K.object,received:r.parsedType}),ae;const i=this.discriminator,o=this.optionsMap.get(r.data[i]);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):(W(r,{code:B.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),ae)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,i){const s=new Map;for(const o of r){const a=Wi(o.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const c of a){if(s.has(c))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(c)}`);s.set(c,o)}}return new dg({typeName:ce.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:s,...me(i)})}}function Mb(e,t){const r=ks(e),i=ks(t);if(e===t)return{valid:!0,data:e};if(r===K.object&&i===K.object){const s=Re.objectKeys(t),o=Re.objectKeys(e).filter(c=>-1!==s.indexOf(c)),a={...e,...t};for(const c of o){const l=Mb(e[c],t[c]);if(!l.valid)return{valid:!1};a[c]=l.data}return{valid:!0,data:a}}if(r===K.array&&i===K.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let o=0;o{class e extends Ee{_parse(r){const{status:i,ctx:s}=this._processInputParams(r),o=(a,c)=>{if(wb(a)||wb(c))return ae;const l=Mb(a.value,c.value);return l.valid?((bb(a)||bb(c))&&i.dirty(),{status:i.value,value:l.data}):(W(s,{code:B.invalid_intersection_types}),ae)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([a,c])=>o(a,c)):o(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}return e.create=(t,r,i)=>new e({left:t,right:r,typeName:ce.ZodIntersection,...me(i)}),e})(),xc=(()=>{class e extends Ee{_parse(r){const{status:i,ctx:s}=this._processInputParams(r);if(s.parsedType!==K.array)return W(s,{code:B.invalid_type,expected:K.array,received:s.parsedType}),ae;if(s.data.lengththis._def.items.length&&(W(s,{code:B.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),i.dirty());const a=[...s.data].map((c,l)=>{const u=this._def.items[l]||this._def.rest;return u?u._parse(new ci(s,c,s.path,l)):null}).filter(c=>!!c);return s.common.async?Promise.all(a).then(c=>ln.mergeArray(i,c)):ln.mergeArray(i,a)}get items(){return this._def.items}rest(r){return new e({...this._def,rest:r})}}return e.create=(t,r)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new e({items:t,typeName:ce.ZodTuple,rest:null,...me(r)})},e})();class Ju extends Ee{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:i}=this._processInputParams(t);if(i.parsedType!==K.object)return W(i,{code:B.invalid_type,expected:K.object,received:i.parsedType}),ae;const s=[],o=this._def.keyType,a=this._def.valueType;for(const c in i.data)s.push({key:o._parse(new ci(i,c,i.path,c)),value:a._parse(new ci(i,i.data[c],i.path,c)),alwaysSet:c in i.data});return i.common.async?ln.mergeObjectAsync(r,s):ln.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(t,r,i){return new Ju(r instanceof Ee?{keyType:t,valueType:r,typeName:ce.ZodRecord,...me(i)}:{keyType:lg.create(),valueType:t,typeName:ce.ZodRecord,...me(r)})}}let n2=(()=>{class e extends Ee{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(r){const{status:i,ctx:s}=this._processInputParams(r);if(s.parsedType!==K.map)return W(s,{code:B.invalid_type,expected:K.map,received:s.parsedType}),ae;const o=this._def.keyType,a=this._def.valueType,c=[...s.data.entries()].map(([l,u],d)=>({key:o._parse(new ci(s,l,s.path,[d,"key"])),value:a._parse(new ci(s,u,s.path,[d,"value"]))}));if(s.common.async){const l=new Map;return Promise.resolve().then(U(function*(){for(const u of c){const d=yield u.key,f=yield u.value;if("aborted"===d.status||"aborted"===f.status)return ae;("dirty"===d.status||"dirty"===f.status)&&i.dirty(),l.set(d.value,f.value)}return{status:i.value,value:l}}))}{const l=new Map;for(const u of c){const d=u.key,f=u.value;if("aborted"===d.status||"aborted"===f.status)return ae;("dirty"===d.status||"dirty"===f.status)&&i.dirty(),l.set(d.value,f.value)}return{status:i.value,value:l}}}}return e.create=(t,r,i)=>new e({valueType:r,keyType:t,typeName:ce.ZodMap,...me(i)}),e})(),r2=(()=>{class e extends Ee{_parse(r){const{status:i,ctx:s}=this._processInputParams(r);if(s.parsedType!==K.set)return W(s,{code:B.invalid_type,expected:K.set,received:s.parsedType}),ae;const o=this._def;null!==o.minSize&&s.data.sizeo.maxSize.value&&(W(s,{code:B.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),i.dirty());const a=this._def.valueType;function c(u){const d=new Set;for(const f of u){if("aborted"===f.status)return ae;"dirty"===f.status&&i.dirty(),d.add(f.value)}return{status:i.value,value:d}}const l=[...s.data.values()].map((u,d)=>a._parse(new ci(s,u,s.path,d)));return s.common.async?Promise.all(l).then(u=>c(u)):c(l)}min(r,i){return new e({...this._def,minSize:{value:r,message:te.toString(i)}})}max(r,i){return new e({...this._def,maxSize:{value:r,message:te.toString(i)}})}size(r,i){return this.min(r,i).max(r,i)}nonempty(r){return this.min(1,r)}}return e.create=(t,r)=>new e({valueType:t,minSize:null,maxSize:null,typeName:ce.ZodSet,...me(r)}),e})();class Ac extends Ee{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==K.function)return W(r,{code:B.invalid_type,expected:K.function,received:r.parsedType}),ae;function i(c,l){return ag({data:c,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,og(),Dc].filter(u=>!!u),issueData:{code:B.invalid_arguments,argumentsError:l}})}function s(c,l){return ag({data:c,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,og(),Dc].filter(u=>!!u),issueData:{code:B.invalid_return_type,returnTypeError:l}})}const o={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof fg){const c=this;return En(U(function*(...l){const u=new Gi([]),d=yield c._def.args.parseAsync(l,o).catch(p=>{throw u.addIssue(i(l,p)),u}),f=yield Reflect.apply(a,this,d);return yield c._def.returns._def.type.parseAsync(f,o).catch(p=>{throw u.addIssue(s(f,p)),u})}))}{const c=this;return En(function(...l){const u=c._def.args.safeParse(l,o);if(!u.success)throw new Gi([i(l,u.error)]);const d=Reflect.apply(a,this,u.data),f=c._def.returns.safeParse(d,o);if(!f.success)throw new Gi([s(d,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ac({...this._def,args:xc.create(t).rest(Qu.create())})}returns(t){return new Ac({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,i){return new Ac({args:t||xc.create([]).rest(Qu.create()),returns:r||Qu.create(),typeName:ce.ZodFunction,...me(i)})}}let Rb=(()=>{class e extends Ee{get schema(){return this._def.getter()}_parse(r){const{ctx:i}=this._processInputParams(r);return this._def.getter()._parse({data:i.data,path:i.path,parent:i})}}return e.create=(t,r)=>new e({getter:t,typeName:ce.ZodLazy,...me(r)}),e})(),Ob=(()=>{class e extends Ee{_parse(r){if(r.data!==this._def.value){const i=this._getOrReturnCtx(r);return W(i,{received:i.data,code:B.invalid_literal,expected:this._def.value}),ae}return{status:"valid",value:r.data}}get value(){return this._def.value}}return e.create=(t,r)=>new e({value:t,typeName:ce.ZodLiteral,...me(r)}),e})();function i2(e,t){return new Ps({values:e,typeName:ce.ZodEnum,...me(t)})}class Ps extends Ee{constructor(){super(...arguments),Zu.set(this,void 0)}_parse(t){if("string"!=typeof t.data){const r=this._getOrReturnCtx(t);return W(r,{expected:Re.joinValues(this._def.values),received:r.parsedType,code:B.invalid_type}),ae}if(cg(this,Zu,"f")||Kk(this,Zu,new Set(this._def.values),"f"),!cg(this,Zu,"f").has(t.data)){const r=this._getOrReturnCtx(t);return W(r,{received:r.data,code:B.invalid_enum_value,options:this._def.values}),ae}return En(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return Ps.create(t,{...this._def,...r})}exclude(t,r=this._def){return Ps.create(this.options.filter(i=>!t.includes(i)),{...this._def,...r})}}Zu=new WeakMap,Ps.create=i2;class Xu extends Ee{constructor(){super(...arguments),Ku.set(this,void 0)}_parse(t){const r=Re.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(t);if(i.parsedType!==K.string&&i.parsedType!==K.number){const s=Re.objectValues(r);return W(i,{expected:Re.joinValues(s),received:i.parsedType,code:B.invalid_type}),ae}if(cg(this,Ku,"f")||Kk(this,Ku,new Set(Re.getValidEnumValues(this._def.values)),"f"),!cg(this,Ku,"f").has(t.data)){const s=Re.objectValues(r);return W(i,{received:i.data,code:B.invalid_enum_value,options:s}),ae}return En(t.data)}get enum(){return this._def.values}}Ku=new WeakMap,Xu.create=(e,t)=>new Xu({values:e,typeName:ce.ZodNativeEnum,...me(t)});let fg=(()=>{class e extends Ee{unwrap(){return this._def.type}_parse(r){const{ctx:i}=this._processInputParams(r);if(i.parsedType!==K.promise&&!1===i.common.async)return W(i,{code:B.invalid_type,expected:K.promise,received:i.parsedType}),ae;const s=i.parsedType===K.promise?i.data:Promise.resolve(i.data);return En(s.then(o=>this._def.type.parseAsync(o,{path:i.path,errorMap:i.common.contextualErrorMap})))}}return e.create=(t,r)=>new e({type:t,typeName:ce.ZodPromise,...me(r)}),e})(),Bo=(()=>{class e extends Ee{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ce.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(r){var i=this;const{status:s,ctx:o}=this._processInputParams(r),a=this._def.effect||null,c={addIssue:l=>{W(o,l),l.fatal?s.abort():s.dirty()},get path(){return o.path}};if(c.addIssue=c.addIssue.bind(c),"preprocess"===a.type){const l=a.transform(o.data,c);if(o.common.async)return Promise.resolve(l).then(function(){var u=U(function*(d){if("aborted"===s.value)return ae;const f=yield i._def.schema._parseAsync({data:d,path:o.path,parent:o});return"aborted"===f.status?ae:"dirty"===f.status||"dirty"===s.value?Sc(f.value):f});return function(d){return u.apply(this,arguments)}}());{if("aborted"===s.value)return ae;const u=this._def.schema._parseSync({data:l,path:o.path,parent:o});return"aborted"===u.status?ae:"dirty"===u.status||"dirty"===s.value?Sc(u.value):u}}if("refinement"===a.type){const l=u=>{const d=a.refinement(u,c);if(o.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(!1===o.common.async){const u=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return"aborted"===u.status?ae:("dirty"===u.status&&s.dirty(),l(u.value),{status:s.value,value:u.value})}return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(u=>"aborted"===u.status?ae:("dirty"===u.status&&s.dirty(),l(u.value).then(()=>({status:s.value,value:u.value}))))}if("transform"===a.type){if(!1===o.common.async){const l=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!Gu(l))return l;const u=a.transform(l.value,c);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:s.value,value:u}}return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(l=>Gu(l)?Promise.resolve(a.transform(l.value,c)).then(u=>({status:s.value,value:u})):l)}Re.assertNever(a)}}return e.create=(t,r,i)=>new e({schema:t,typeName:ce.ZodEffects,effect:r,...me(i)}),e.createWithPreprocess=(t,r,i)=>new e({schema:r,effect:{type:"preprocess",transform:t},typeName:ce.ZodEffects,...me(i)}),e})(),Ls=(()=>{class e extends Ee{_parse(r){return this._getType(r)===K.undefined?En(void 0):this._def.innerType._parse(r)}unwrap(){return this._def.innerType}}return e.create=(t,r)=>new e({innerType:t,typeName:ce.ZodOptional,...me(r)}),e})(),Mc=(()=>{class e extends Ee{_parse(r){return this._getType(r)===K.null?En(null):this._def.innerType._parse(r)}unwrap(){return this._def.innerType}}return e.create=(t,r)=>new e({innerType:t,typeName:ce.ZodNullable,...me(r)}),e})(),kb=(()=>{class e extends Ee{_parse(r){const{ctx:i}=this._processInputParams(r);let s=i.data;return i.parsedType===K.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:i.path,parent:i})}removeDefault(){return this._def.innerType}}return e.create=(t,r)=>new e({innerType:t,typeName:ce.ZodDefault,defaultValue:"function"==typeof r.default?r.default:()=>r.default,...me(r)}),e})(),Pb=(()=>{class e extends Ee{_parse(r){const{ctx:i}=this._processInputParams(r),s={...i,common:{...i.common,issues:[]}},o=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return Wu(o)?o.then(a=>({status:"valid",value:"valid"===a.status?a.value:this._def.catchValue({get error(){return new Gi(s.common.issues)},input:s.data})})):{status:"valid",value:"valid"===o.status?o.value:this._def.catchValue({get error(){return new Gi(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}return e.create=(t,r)=>new e({innerType:t,typeName:ce.ZodCatch,catchValue:"function"==typeof r.catch?r.catch:()=>r.catch,...me(r)}),e})(),s2=(()=>{class e extends Ee{_parse(r){if(this._getType(r)!==K.nan){const s=this._getOrReturnCtx(r);return W(s,{code:B.invalid_type,expected:K.nan,received:s.parsedType}),ae}return{status:"valid",value:r.data}}}return e.create=t=>new e({typeName:ce.ZodNaN,...me(t)}),e})();const uJ=Symbol("zod_brand");class Lb extends Ee{_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.type._parse({data:r.data,path:r.path,parent:r})}unwrap(){return this._def.type}}class ed extends Ee{_parse(t){var r=this;const{status:i,ctx:s}=this._processInputParams(t);if(s.common.async)return function(){var a=U(function*(){const c=yield r._def.in._parseAsync({data:s.data,path:s.path,parent:s});return"aborted"===c.status?ae:"dirty"===c.status?(i.dirty(),Sc(c.value)):r._def.out._parseAsync({data:c.value,path:s.path,parent:s})});return function(){return a.apply(this,arguments)}}()();{const o=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return"aborted"===o.status?ae:"dirty"===o.status?(i.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:s.path,parent:s})}}static create(t,r){return new ed({in:t,out:r,typeName:ce.ZodPipeline})}}let Fb=(()=>{class e extends Ee{_parse(r){const i=this._def.innerType._parse(r),s=o=>(Gu(o)&&(o.value=Object.freeze(o.value)),o);return Wu(i)?i.then(o=>s(o)):s(i)}unwrap(){return this._def.innerType}}return e.create=(t,r)=>new e({innerType:t,typeName:ce.ZodReadonly,...me(r)}),e})();function o2(e,t={},r){return e?ug.create().superRefine((i,s)=>{var o,a;if(!e(i)){const c="function"==typeof t?t(i):"string"==typeof t?{message:t}:t,l=null===(a=null!==(o=c.fatal)&&void 0!==o?o:r)||void 0===a||a;s.addIssue({code:"custom",..."string"==typeof c?{message:c}:c,fatal:l})}}):ug.create()}const dJ={object:Tc.lazycreate};var ce=function(e){return e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly",e}(ce||{});const a2=lg.create,c2=Cb.create,hJ=s2.create,pJ=Db.create,l2=Sb.create,gJ=Ib.create,mJ=e2.create,yJ=Tb.create,vJ=xb.create,_J=ug.create,wJ=Qu.create,bJ=Fo.create,EJ=t2.create,CJ=Yu.create,DJ=Tc.create,SJ=Tc.strictCreate,IJ=Ab.create,TJ=dg.create,xJ=Nb.create,AJ=xc.create,MJ=Ju.create,NJ=n2.create,RJ=r2.create,OJ=Ac.create,kJ=Rb.create,PJ=Ob.create,LJ=Ps.create,FJ=Xu.create,BJ=fg.create,u2=Bo.create,VJ=Ls.create,UJ=Mc.create,jJ=Bo.createWithPreprocess,$J=ed.create;var d2,z=Object.freeze({__proto__:null,defaultErrorMap:Dc,setErrorMap:function WY(e){Zk=e},getErrorMap:og,makeIssue:ag,EMPTY_PATH:[],addIssueToContext:W,ParseStatus:ln,INVALID:ae,DIRTY:Sc,OK:En,isAborted:wb,isDirty:bb,isValid:Gu,isAsync:Wu,get util(){return Re},get objectUtil(){return Wk},ZodParsedType:K,getParsedType:ks,ZodType:Ee,datetimeRegex:Xk,ZodString:lg,ZodNumber:Cb,ZodBigInt:Db,ZodBoolean:Sb,ZodDate:Ib,ZodSymbol:e2,ZodUndefined:Tb,ZodNull:xb,ZodAny:ug,ZodUnknown:Qu,ZodNever:Fo,ZodVoid:t2,ZodArray:Yu,ZodObject:Tc,ZodUnion:Ab,ZodDiscriminatedUnion:dg,ZodIntersection:Nb,ZodTuple:xc,ZodRecord:Ju,ZodMap:n2,ZodSet:r2,ZodFunction:Ac,ZodLazy:Rb,ZodLiteral:Ob,ZodEnum:Ps,ZodNativeEnum:Xu,ZodPromise:fg,ZodEffects:Bo,ZodTransformer:Bo,ZodOptional:Ls,ZodNullable:Mc,ZodDefault:kb,ZodCatch:Pb,ZodNaN:s2,BRAND:uJ,ZodBranded:Lb,ZodPipeline:ed,ZodReadonly:Fb,custom:o2,Schema:Ee,ZodSchema:Ee,late:dJ,get ZodFirstPartyTypeKind(){return ce},coerce:{string:e=>lg.create({...e,coerce:!0}),number:e=>Cb.create({...e,coerce:!0}),boolean:e=>Sb.create({...e,coerce:!0}),bigint:e=>Db.create({...e,coerce:!0}),date:e=>Ib.create({...e,coerce:!0})},any:_J,array:CJ,bigint:pJ,boolean:l2,date:gJ,discriminatedUnion:TJ,effect:u2,enum:LJ,function:OJ,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>o2(r=>r instanceof e,t),intersection:xJ,lazy:kJ,literal:PJ,map:NJ,nan:hJ,nativeEnum:FJ,never:bJ,null:vJ,nullable:UJ,number:c2,object:DJ,oboolean:()=>l2().optional(),onumber:()=>c2().optional(),optional:VJ,ostring:()=>a2().optional(),pipeline:$J,preprocess:jJ,promise:BJ,record:MJ,set:RJ,strictObject:SJ,string:a2,symbol:mJ,transformer:u2,tuple:AJ,undefined:yJ,union:IJ,unknown:wJ,void:EJ,NEVER:ae,ZodIssueCode:B,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:Gi});class st{static id(){return z.string().regex(/^[0-9a-f]{64}$/)}static event(){return z.object({id:st.id(),kind:z.number().int().nonnegative(),pubkey:st.id(),tags:z.string().array().array(),content:z.string(),created_at:z.number().int().nonnegative(),sig:z.string()})}static filter(){return z.object({kinds:z.number().int().nonnegative().array().optional(),ids:st.id().array().optional(),authors:st.id().array().optional(),since:z.number().int().nonnegative().optional(),until:z.number().int().nonnegative().optional(),limit:z.number().int().nonnegative().optional(),search:z.string().optional()}).passthrough().transform(t=>{const r=["kinds","ids","authors","since","until","limit","search"];return Object.entries(t).reduce((i,[s,o])=>((r.includes(s)||s.startsWith("#"))&&(i[s]=o),i),{})})}static bech32(t){return z.string().regex(/^[\x21-\x7E]{1,83}1[023456789acdefghjklmnpqrstuvwxyz]{6,}$/).refine(r=>!t||r.startsWith(`${t}1`))}static clientEVENT(){return z.tuple([z.literal("EVENT"),st.event()])}static clientREQ(){return z.tuple([z.literal("REQ"),z.string()]).rest(st.filter())}static clientCOUNT(){return z.tuple([z.literal("COUNT"),z.string()]).rest(st.filter())}static clientCLOSE(){return z.tuple([z.literal("CLOSE"),z.string()])}static clientAUTH(){return z.tuple([z.literal("AUTH"),st.event()])}static clientMsg(){return z.union([st.clientEVENT(),st.clientREQ(),st.clientCOUNT(),st.clientCLOSE(),st.clientAUTH()])}static relayEVENT(){return z.tuple([z.literal("EVENT"),z.string(),st.event()])}static relayOK(){return z.tuple([z.literal("OK"),st.id(),z.boolean(),z.string()])}static relayEOSE(){return z.tuple([z.literal("EOSE"),z.string()])}static relayNOTICE(){return z.tuple([z.literal("NOTICE"),z.string()])}static relayCLOSED(){return z.tuple([z.literal("CLOSED"),z.string(),z.string()])}static relayAUTH(){return z.tuple([z.literal("AUTH"),z.string()])}static relayCOUNT(){return z.tuple([z.literal("COUNT"),z.string(),z.object({count:z.number().int().nonnegative(),approximate:z.boolean().optional()})])}static relayMsg(){return z.union([st.relayEVENT(),st.relayOK(),st.relayEOSE(),st.relayNOTICE(),st.relayCLOSED(),st.relayAUTH(),st.relayCOUNT()])}static metadata(){return z.object({about:z.string().optional().catch(void 0),banner:z.string().url().optional().catch(void 0),bot:z.boolean().optional().catch(void 0),display_name:z.string().optional().catch(void 0),lud06:st.bech32("lnurl").optional().catch(void 0),lud16:z.string().email().optional().catch(void 0),name:z.string().optional().catch(void 0),nip05:z.string().email().optional().catch(void 0),picture:z.string().url().optional().catch(void 0),website:z.string().url().optional().catch(void 0)}).passthrough()}static connectRequest(){return z.object({id:z.string(),method:z.string(),params:z.string().array()})}static connectResponse(){return z.object({id:z.string(),result:z.string(),error:z.string().optional()})}static json(){return z.string().transform((t,r)=>{try{return JSON.parse(t)}catch{return r.addIssue({code:z.ZodIssueCode.custom,message:"Invalid JSON"}),z.NEVER}})}}d2=Symbol.asyncDispose;class HJ{url;opts;socket;subs;closedByUser;idleTimer;ee;get subscriptions(){return[...this.subs.values()]}constructor(t,r={}){this.url=t,this.opts=r,this.subs=new Map,this.closedByUser=!1,this.ee=new EventTarget,this.socket=this.createSocket(),this.maybeStartIdleTimer()}createSocket(){const{backoff:t=new $Y(1e3)}=this.opts;return new zY(this.url).withBuffer(new qY).withBackoff(!1===t?void 0:t).onOpen(()=>{for(const r of this.subs.values())this.send(r)}).onClose(()=>{this.subs.size||this.socket.close()}).onMessage((r,i)=>{const s=st.json().pipe(st.relayMsg()).safeParse(i.data);s.success&&this.receive(s.data)}).build()}receive(t){const{auth:r,verifyEvent:i=hc}=this.opts;switch(t[0]){case"EVENT":if(!i(t[2]))break;this.ee.dispatchEvent(new CustomEvent(`sub:${t[1]}`,{detail:t}));break;case"EOSE":this.ee.dispatchEvent(new CustomEvent(`sub:${t[1]}`,{detail:t}));break;case"CLOSED":this.subs.delete(t[1]),this.maybeStartIdleTimer(),this.ee.dispatchEvent(new CustomEvent(`sub:${t[1]}`,{detail:t})),this.ee.dispatchEvent(new CustomEvent(`count:${t[1]}`,{detail:t}));break;case"OK":this.ee.dispatchEvent(new CustomEvent(`ok:${t[1]}`,{detail:t}));break;case"NOTICE":this.ee.dispatchEvent(new CustomEvent("notice",{detail:t}));break;case"COUNT":this.ee.dispatchEvent(new CustomEvent(`count:${t[1]}`,{detail:t}));break;case"AUTH":r?.(t[1]).then(s=>this.send(["AUTH",s])).catch(()=>{})}}send(t){switch(this.wake(),t[0]){case"REQ":this.subs.set(t[1],t);break;case"CLOSE":this.subs.delete(t[1]),this.maybeStartIdleTimer();break;case"EVENT":case"COUNT":return this.socket.send(JSON.stringify(t))}this.socket.readyState===WebSocket.OPEN&&this.socket.send(JSON.stringify(t))}req(t,r={}){var i=this;return sg(function*(){const{signal:s}=r,o=crypto.randomUUID(),a=i.on(`sub:${o}`,s),c=["REQ",o,...t];i.send(c);try{var d,l=!1,u=!1;try{for(var h,f=Ss(a);l=!(h=yield Os(f.next())).done;l=!1){const p=h.value;if("EOSE"===p[0]&&(yield p),"CLOSED"===p[0])break;if("EVENT"===p[0]){if(!Op(t,p[2]))continue;yield p}}}catch(p){u=!0,d=p}finally{try{l&&null!=f.return&&(yield Os(f.return()))}finally{if(u)throw d}}}finally{i.send(["CLOSE",o])}})()}query(t,r){var i=this;return U(function*(){const s=new hr,o=t.reduce((f,h)=>f+hO(h),0);if(0===o)return[];var l,a=!1,c=!1;try{for(var d,u=Ss(i.req(t,r));a=!(d=yield u.next()).done;a=!1){const f=d.value;if("EOSE"===f[0])break;if("EVENT"===f[0]&&s.add(f[2]),"CLOSED"===f[0])throw new Error("Subscription closed");if(s.size>=o)break}}catch(f){c=!0,l=f}finally{try{a&&null!=u.return&&(yield u.return())}finally{if(c)throw l}}return[...s]})()}event(t,r){var i=this;return U(function*(){const s=i.once(`ok:${t.id}`,r?.signal);i.send(["EVENT",t]);const[,,o,a]=yield s;if(!o)throw new Error(a)})()}count(t,r){var i=this;return U(function*(){const s=crypto.randomUUID(),o=i.once(`count:${s}`,r?.signal);i.send(["COUNT",s,...t]);const a=yield o;switch(a[0]){case"CLOSED":throw new Error("Subscription closed");case"COUNT":{const[,,c]=a;return c}}})()}on(t,r){var i=this;return sg(function*(){if(r?.aborted)throw i.abortError();const s=new zk(r),o=f=>s.push(f.detail);i.ee.addEventListener(t,o);try{var l,a=!1,c=!1;try{for(var d,u=Ss(s);a=!(d=yield Os(u.next())).done;a=!1)yield d.value}catch(f){c=!0,l=f}finally{try{a&&null!=u.return&&(yield Os(u.return()))}finally{if(c)throw l}}}finally{i.ee.removeEventListener(t,o)}})()}once(t,r){var i=this;return U(function*(){var a,s=!1,o=!1;try{for(var l,c=Ss(i.on(t,r));s=!(l=yield c.next()).done;s=!1)return l.value}catch(u){o=!0,a=u}finally{try{s&&null!=c.return&&(yield c.return())}finally{if(o)throw a}}throw new Error("Unreachable")})()}abortError(){return new DOMException("The signal has been aborted","AbortError")}maybeStartIdleTimer(){const{idleTimeout:t=3e4}=this.opts;!1!==t&&(this.idleTimer||this.subs.size||this.closedByUser||(this.idleTimer=setTimeout(()=>this.socket.close(),t)))}stopIdleTimer(){clearTimeout(this.idleTimer),this.idleTimer=void 0}wake(){this.stopIdleTimer(),!this.closedByUser&&this.socket.closedByUser&&(this.socket=this.createSocket())}close(){var t=this;return U(function*(){t.closedByUser=!0,t.socket.close(),t.stopIdleTimer(),t.socket.readyState!==WebSocket.CLOSED&&(yield new Promise(r=>{t.socket.addEventListener(Je.close,r,{once:!0})}))})()}[d2](){var t=this;return U(function*(){yield t.close()})()}}function td(e){return $t((t,r)=>{try{t.subscribe(r)}finally{r.add(e)}})}function nd(e){-1===e.indexOf("://")&&(e="wss://"+e);let t=new URL(e);return t.pathname=t.pathname.replace(/\/+/g,"/"),t.pathname.endsWith("/")&&(t.pathname=t.pathname.slice(0,-1)),("80"===t.port&&"ws:"===t.protocol||"443"===t.port&&"wss:"===t.protocol)&&(t.port=""),t.searchParams.sort(),t.hash="",t.toString()}new TextDecoder("utf-8"),new TextEncoder;let Bb=(()=>{class e{saveConfig(r){localStorage.setItem("omeglestr",JSON.stringify({relays:r}))}getConfig(){const r=localStorage.getItem("omeglestr");try{if(r)return JSON.parse(r).relays.map(nd)}catch{}return"wss://relay.nostr.net".split(",").map(nd)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),hg=(()=>{class e extends jY{constructor(r){var i,s;super({open:s=>new HJ(s),reqRouter:(s=U(function*(o){const a=[];return i.relayConfigService.getConfig().forEach(c=>{a.push([c,o])}),new Map(a)}),function(a){return s.apply(this,arguments)}),eventRouter:function(){var s=U(function*(){return i.relayConfigService.getConfig()});return function(){return s.apply(this,arguments)}}()}),i=this,this.relayConfigService=r}observe(r){var i=this;console.info((new Date).toLocaleString(),"[[subscribe filter]]",r);const s=new AbortController,o=new Xe,a=new Map;return U(function*(){var u,c=!1,l=!1;try{for(var f,d=Ss(i.req(r,s));c=!(f=yield d.next()).done;c=!1){const h=f.value;if("CLOSED"===h[0]){o.error(h);break}if("EVENT"===h[0]){const p=a.size;a.set(h[2].id,h[2]),p!==a.size?o.next(h[2]):(console.debug((new Date).toLocaleString(),"event deduplicated, not emiting again: ",h[2]),console.debug((new Date).toLocaleString(),"current nset from request: ",a))}}}catch(h){l=!0,u=h}finally{try{c&&null!=d.return&&(yield d.return())}finally{if(l)throw u}}})(),o.asObservable().pipe(td(()=>{console.info((new Date).toLocaleString(),"[[unsubscribe filter]]",r),s.abort()}))}static{this.\u0275fac=function(i){return new(i||e)(Z(Bb))}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac})}}return e})(),h2=(()=>{class e{constructor(){this.pubkeySet=new Set,this.loadList()}loadList(){try{const r=sessionStorage.getItem("alwaysIgnoreWannachat");if(r){let i=JSON.parse(r);i instanceof Array?this.pubkeySet=new Set(i):sessionStorage.setItem("alwaysIgnoreWannachat","[]")}}catch{sessionStorage.setItem("alwaysIgnoreWannachat","[]")}}saveInList(r){this.pubkeySet.add(r),sessionStorage.setItem("alwaysIgnoreWannachat",JSON.stringify([...this.pubkeySet]))}isInList(r){return this.pubkeySet.has(r)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),p2=(()=>{class e{constructor(r,i){this.npool=r,this.ignoreListService=i}listenUserStatusUpdate(r){return console.info((new Date).toLocaleString(),"observing filter:",[{kinds:[cn.UserStatuses],authors:[r]}]),this.npool.observe([{kinds:[cn.UserStatuses],authors:[r]}])}queryWannachatResponse(r){return console.info((new Date).toLocaleString(),"quering filter:",[{kinds:[cn.UserStatuses],"#t":["chating","omegle"],"#p":[r.pubkey],limit:1}]),this.npool.query([{kinds:[cn.UserStatuses],"#t":["chating","omegle"],"#p":[r.pubkey],limit:1}])}listenWannachatResponse(r){return console.info((new Date).toLocaleString(),"observing filter:",[{kinds:[cn.UserStatuses],"#t":["chating","omegle"],"#p":[r.pubkey],limit:1}]),this.npool.observe([{kinds:[cn.UserStatuses],"#t":["chating","omegle"],"#p":[r.pubkey],limit:1}])}queryChatAvailable(){var r=this;return U(function*(){const i=Math.floor((new Date).getTime()/1e3);console.info((new Date).toLocaleString(),"quering filter: ",[{kinds:[cn.UserStatuses],"#t":["wannachat","omegle"],since:i-600}]);let o=yield r.npool.query([{kinds:[cn.UserStatuses],"#t":["wannachat","omegle"],since:i-600}]);o=o.filter(c=>!r.ignoreListService.isInList(c.pubkey));const a=o[Math.floor(Math.random()*o.length)];return a?console.info((new Date).toLocaleString(),"wanna chat found:",a):console.info((new Date).toLocaleString(),"wanna chat NOT found..."),Promise.resolve(a||null)})()}static{this.\u0275fac=function(i){return new(i||e)(Z(hg),Z(h2))}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac})}}return e})();class Vo{constructor(t){const{type:r,data:i}=Mu.decode(t);if("nsec"===r)this.nsec=t,this.secretKey=i,this.pubkey=rO(this.secretKey),this.npub=Mu.npubEncode(this.pubkey);else{if("npub"!==r)throw new Error("Invalid argument, NostrUser expect nsec or npub string");this.npub=t,this.pubkey=i.toString(),this.nsec=void 0,this.secretKey=void 0}}static fromPubkey(t){return new Vo(Mu.npubEncode(t))}static fromSecretKeyBytes(t){return new Vo(Mu.nsecEncode(t))}static create(){return this.fromSecretKeyBytes(wW())}toString(){return this.pubkey}}class qJ extends Et{constructor(t,r){super()}schedule(t,r=0){return this}}const pg={setInterval(e,t,...r){const{delegate:i}=pg;return i?.setInterval?i.setInterval(e,t,...r):setInterval(e,t,...r)},clearInterval(e){const{delegate:t}=pg;return(t?.clearInterval||clearInterval)(e)},delegate:void 0},g2={now:()=>(g2.delegate||Date).now(),delegate:void 0};class rd{constructor(t,r=rd.now){this.schedulerActionCtor=t,this.now=r}schedule(t,r=0,i){return new this.schedulerActionCtor(this,t).schedule(i,r)}}rd.now=g2.now;const ZJ=new class WJ extends rd{constructor(t,r=rd.now){super(t,r),this.actions=[],this._active=!1}flush(t){const{actions:r}=this;if(this._active)return void r.push(t);let i;this._active=!0;do{if(i=t.execute(t.state,t.delay))break}while(t=r.shift());if(this._active=!1,i){for(;t=r.shift();)t.unsubscribe();throw i}}}(class GJ extends qJ{constructor(t,r){super(t,r),this.scheduler=t,this.work=r,this.pending=!1}schedule(t,r=0){var i;if(this.closed)return this;this.state=t;const s=this.id,o=this.scheduler;return null!=s&&(this.id=this.recycleAsyncId(o,s,r)),this.pending=!0,this.delay=r,this.id=null!==(i=this.id)&&void 0!==i?i:this.requestAsyncId(o,this.id,r),this}requestAsyncId(t,r,i=0){return pg.setInterval(t.flush.bind(t,this),i)}recycleAsyncId(t,r,i=0){if(null!=i&&this.delay===i&&!1===this.pending)return r;null!=r&&pg.clearInterval(r)}execute(t,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const i=this._execute(t,r);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,r){let s,i=!1;try{this.work(t)}catch(o){i=!0,s=o||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),s}unsubscribe(){if(!this.closed){const{id:t,scheduler:r}=this,{actions:i}=r;this.work=this.state=this.scheduler=null,this.pending=!1,jd(i,this),null!=t&&(this.id=this.recycleAsyncId(r,t,null)),this.delay=null,super.unsubscribe()}}});function Fs(e){return this instanceof Fs?(this.v=e,this):new Fs(e)}function _2(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,t=e[Symbol.asyncIterator];return t?t.call(e):(e=function $b(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r);function i(o){r[o]=e[o]&&function(a){return new Promise(function(c,l){!function s(o,a,c,l){Promise.resolve(l).then(function(u){o({value:u,done:c})},a)}(c,l,(a=e[o](a)).done,a.value)})}}}"function"==typeof SuppressedError&&SuppressedError;const w2=e=>e&&"number"==typeof e.length&&"function"!=typeof e;function b2(e){return at(e?.then)}function E2(e){return at(e[Em])}function C2(e){return Symbol.asyncIterator&&at(e?.[Symbol.asyncIterator])}function D2(e){return new TypeError(`You provided ${null!==e&&"object"==typeof e?"an invalid object":`'${e}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}const S2=function EX(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function I2(e){return at(e?.[S2])}function T2(e){return function v2(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s,i=r.apply(e,t||[]),o=[];return s=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),c("next"),c("throw"),c("return",function a(p){return function(g){return Promise.resolve(g).then(p,f)}}),s[Symbol.asyncIterator]=function(){return this},s;function c(p,g){i[p]&&(s[p]=function(m){return new Promise(function(y,_){o.push([p,m,y,_])>1||l(p,m)})},g&&(s[p]=g(s[p])))}function l(p,g){try{!function u(p){p.value instanceof Fs?Promise.resolve(p.value.v).then(d,f):h(o[0][2],p)}(i[p](g))}catch(m){h(o[0][3],m)}}function d(p){l("next",p)}function f(p){l("throw",p)}function h(p,g){p(g),o.shift(),o.length&&l(o[0][0],o[0][1])}}(this,arguments,function*(){const r=e.getReader();try{for(;;){const{value:i,done:s}=yield Fs(r.read());if(s)return yield Fs(void 0);yield yield Fs(i)}}finally{r.releaseLock()}})}function x2(e){return at(e?.getReader)}function Or(e){if(e instanceof jt)return e;if(null!=e){if(E2(e))return function CX(e){return new jt(t=>{const r=e[Em]();if(at(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(e);if(w2(e))return function DX(e){return new jt(t=>{for(let r=0;r{e.then(r=>{t.closed||(t.next(r),t.complete())},r=>t.error(r)).then(null,kC)})}(e);if(C2(e))return A2(e);if(I2(e))return function IX(e){return new jt(t=>{for(const r of e)if(t.next(r),t.closed)return;t.complete()})}(e);if(x2(e))return function TX(e){return A2(T2(e))}(e)}throw D2(e)}function A2(e){return new jt(t=>{(function xX(e,t){var r,i,s,o;return function m2(e,t,r,i){return new(r||(r=Promise))(function(o,a){function c(d){try{u(i.next(d))}catch(f){a(f)}}function l(d){try{u(i.throw(d))}catch(f){a(f)}}function u(d){d.done?o(d.value):function s(o){return o instanceof r?o:new r(function(a){a(o)})}(d.value).then(c,l)}u((i=i.apply(e,t||[])).next())})}(this,void 0,void 0,function*(){try{for(r=_2(e);!(i=yield r.next()).done;)if(t.next(i.value),t.closed)return}catch(a){s={error:a}}finally{try{i&&!i.done&&(o=r.return)&&(yield o.call(r))}finally{if(s)throw s.error}}t.complete()})})(e,t).catch(r=>t.error(r))})}function li(e,t,r,i=0,s=!1){const o=t.schedule(function(){r(),s?e.add(this.schedule(null,i)):this.unsubscribe()},i);if(e.add(o),!s)return o}const AX=Ud(e=>function(r=null){e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=r});function M2(e,t){const{first:r,each:i,with:s=MX,scheduler:o=t??ZJ,meta:a=null}=function KJ(e){return e instanceof Date&&!isNaN(e)}(e)?{first:e}:"number"==typeof e?{each:e}:e;if(null==r&&null==i)throw new TypeError("No timeout provided.");return $t((c,l)=>{let u,d,f=null,h=0;const p=g=>{d=li(l,o,()=>{try{u.unsubscribe(),Or(s({meta:a,lastValue:f,seen:h})).subscribe(l)}catch(m){l.error(m)}},g)};u=c.subscribe(Ct(l,g=>{d?.unsubscribe(),h++,l.next(f=g),i>0&&p(i)},void 0,void 0,()=>{d?.closed||d?.unsubscribe(),f=null})),!h&&p(null!=r?"number"==typeof r?r:+r-o.now():i)})}function MX(e){throw new AX(e)}function Bs(e){return $t((t,r)=>{let o,i=null,s=!1;i=t.subscribe(Ct(r,void 0,void 0,a=>{o=Or(e(a,Bs(e)(t))),i?(i.unsubscribe(),i=null,o.subscribe(r)):s=!0})),s&&(i.unsubscribe(),i=null,o.subscribe(r))})}function Nc(e,t){const r=at(e)?e:()=>e,i=s=>s.error(r());return new jt(t?s=>t.schedule(i,0,s):i)}let Hb=(()=>{class e{constructor(r){this.globalConfigService=r,this.largeExpirationTime=1800}getCurrentTimestamp(){return Math.floor(Date.now()/1e3)}getExpirationTimestamp(r=this.globalConfigService.wannachatStatusDefaultTimeoutInSeconds){const s=Math.floor(Date.now()/1e3)+r;return String(s)}createEncryptedDirectMessage(r,i,s){var o=this;return U(function*(){const a=yield Ru.encrypt(r.secretKey,i.pubkey,s),c={kind:cn.EncryptedDirectMessage,content:a,created_at:o.getCurrentTimestamp(),tags:[["p",i.pubkey],["expiration",o.getExpirationTimestamp(o.largeExpirationTime)]]},l=fr(c,r.secretKey);return Promise.resolve(l)})()}createWannaChatUserStatus(r,i=!1){return this.createUserStatus(r,"wannachat",[["expiration",this.getExpirationTimestamp()],["t","omegle"],["t","wannachat"]],i)}createDisconnectedUserStatus(r){return this.createUserStatus(r,"disconnected",[["expiration",this.getExpirationTimestamp()]])}createTypingUserStatus(r){return this.createUserStatus(r,"typing",[["t","omegle"],["expiration",this.getExpirationTimestamp(this.largeExpirationTime)]])}createChatingUserStatus(r,i,s=!1){return this.createUserStatus(r,"chating",[["expiration",this.getExpirationTimestamp(this.largeExpirationTime)],["p",i.pubkey],["t","omegle"],["t","chating"]],s)}deleteUserHistory(r){const i={kind:5,tags:[["k",String(cn.EncryptedDirectMessage)],["k",String(cn.UserStatuses)],["expiration",this.getExpirationTimestamp()]],created_at:Math.floor((new Date).getTime()/1e3),content:""};return fr(i,r.secretKey)}cleanUserStatus(r){return this.createUserStatus(r,"",[["expiration",this.getExpirationTimestamp(this.largeExpirationTime)],["t","omegle"]])}createUserStatus(r,i,s,o=!1){var a=this;return U(function*(){const c=[["d","general"],...s||[]];let l={kind:cn.UserStatuses,content:i,created_at:a.getCurrentTimestamp(),tags:c};if(o){const{data:u}=yield new Promise(d=>{const f=new Worker(_i.tu(new URL(_i.p+_i.u(929),_i.b)));f.onmessage=({data:h})=>d(h),f.postMessage({...l,pubkey:r.pubkey})});l=u}return fr(l,r.secretKey)})()}static{this.\u0275fac=function(i){return new(i||e)(Z(__))}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),N2=(()=>{class e{constructor(r,i,s,o,a){this.nostrEventFactory=r,this.findStrangerNostr=i,this.ignoreListService=s,this.config=o,this.npool=a}publish(r){return this.npool.event(r)}searchStranger(r){var i=this;return U(function*(){const s=yield i.findStrangerNostr.queryChatAvailable(),o=!0;if(s){console.info((new Date).toLocaleString(),"inviting ",s.pubkey," to chat and listening confirmation");const a=i.listenChatingConfirmation(s,r);yield i.inviteToChating(r,s,o);const c=yield a;return i.ignoreListService.saveInList(s.pubkey),c?Promise.resolve(Vo.fromPubkey(s.pubkey)):(yield i.disconnect(r),i.searchStranger(r))}return yield i.publishWannaChatStatus(r,o),new Promise(a=>{const c=i.findStrangerNostr.listenWannachatResponse(r).pipe(M2(1e3*i.config.wannachatStatusDefaultTimeoutInSeconds),Bs(l=>(c.unsubscribe(),i.deleteUserHistory(r).then(()=>i.searchStranger(r).then(u=>a(u))),Nc(()=>new l)))).subscribe({next:l=>{i.ignoreListService.saveInList(l.pubkey),i.replyChatInvitation(l,r).then(u=>u&&a(u)).catch(u=>{throw console.error(u),u}),c.unsubscribe()},error:l=>console.error((new Date).toLocaleString(),l)})})})()}replyChatInvitation(r,i){var s=this;return U(function*(){return console.info((new Date).toLocaleString(),"event was listen: ",r),console.info((new Date).toLocaleString(),"it must be a chating invitation from ",r.pubkey,", repling invitation..."),yield s.inviteToChating(i,r),console.info((new Date).toLocaleString(),"replied... resolving... "),console.info((new Date).toLocaleString(),"[searchStranger] unsubscribe"),Promise.resolve(Vo.fromPubkey(r.pubkey))})()}isChatingToMe(r,i){console.info((new Date).toLocaleString(),"is wannachat reply with chating? event: ",r);const s=r.tags.filter(([o])=>"p"===o).find(([,o])=>o===i.pubkey)||[];return console.info((new Date).toLocaleString(),"is wannachat reply with chating?",s.length?"yes":"no"),!!s.length}inviteToChating(r,i,s=!1){const o=Vo.fromPubkey(i.pubkey);return this.publishChatInviteStatus(r,o,s)}listenChatingConfirmation(r,i){var s=this;return U(function*(){return new Promise(o=>{console.info((new Date).toLocaleString(),"listening status update from: ",r.pubkey);const a=s.findStrangerNostr.listenUserStatusUpdate(r.pubkey).pipe(M2(5e3),Bs(c=>Nc(()=>new Error("chat confirmation timeout after 5s waiting, there is no stranger connected to this session")))).subscribe({next:c=>s.receiveChatingConfirmation(a,c,r,i).then(l=>{"boolean"==typeof l&&o(l)}),error:c=>{console.error(c),o(!1)}})})})()}receiveChatingConfirmation(r,i,s,o){return i.id===s.id&&"wannachat"===i.content?(console.info((new Date).toLocaleString(),"stranger #wannachat status was listen, ignoring and waiting new status..."),Promise.resolve(void 0)):(r.unsubscribe(),console.info((new Date).toLocaleString(),"[listenUserStatusUpdate] unsubscribe"),console.info((new Date).toLocaleString(),"stranger ",s.pubkey," update status: ",i),this.isChatingToMe(i,o)?(console.info((new Date).toLocaleString(),'is "chating" status confirmed, resolved with true'),Promise.resolve(!0)):(console.info((new Date).toLocaleString(),"unexpected status was given, resolved with false, event: ",i),Promise.resolve(!1)))}publishWannaChatStatus(r,i=!1){var s=this;return U(function*(){const o=yield s.nostrEventFactory.createWannaChatUserStatus(r,i);return console.info((new Date).toLocaleString(),"updating my status to: ",o),yield s.npool.event(o),Promise.resolve(o)})()}publishChatInviteStatus(r,i,s=!1){var o=this;return U(function*(){const a=yield o.nostrEventFactory.createChatingUserStatus(r,i,s);return console.info((new Date).toLocaleString(),"updating my status to: ",a),yield o.npool.event(a),Promise.resolve(a)})()}deleteUserHistory(r){var i=this;return U(function*(){const s=i.nostrEventFactory.deleteUserHistory(r);console.info((new Date).toLocaleString(),"deleting user history"),yield i.npool.event(s)})()}connect(){const r=Vo.create();return this.ignoreListService.saveInList(r.pubkey),r}disconnect(r){var i=this;return U(function*(){const s=yield i.nostrEventFactory.createDisconnectedUserStatus(r);return console.info((new Date).toLocaleString(),"updating my status to: ",s),yield i.deleteUserHistory(r),yield i.npool.event(s),Promise.resolve(s)})()}static{this.\u0275fac=function(i){return new(i||e)(Z(Hb),Z(p2),Z(h2),Z(__),Z(hg))}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac})}}return e})(),R2=(()=>{class e{constructor(r,i){this.nostrEventFactory=r,this.npool=i,this.updateUserCountTimeout=3e5}openEncryptedDirectMessage(r,i,s){return U(function*(){return Ru.decrypt(r.secretKey,i.pubkey,s.content)})()}listenMessages(r,i){return this.npool.observe([{kinds:[cn.EncryptedDirectMessage],authors:[i.pubkey],"#p":[r.pubkey]}])}listenStrangerStatus(r){return this.npool.observe([{kinds:[cn.UserStatuses],authors:[r.pubkey]}])}listenCurrenOnlineUsers(){const r=new Xe;let i=!1;const s=()=>{i||(i=!0,console.info((new Date).toLocaleString(),"user count requested"),this.npool.query([{kinds:[cn.UserStatuses],"#t":["omegle"],since:Math.floor(Date.now()/1e3)-86400}]).then(a=>{const c=new Set;console.info((new Date).toLocaleString(),"count events",a),a.forEach(u=>c.add(u.pubkey));const l=[...c].length;console.info((new Date).toLocaleString(),"active users counted: ",l),r.next(l),i=!1}).catch(a=>{console.error((new Date).toLocaleString(),"user count lauched error",a),i=!1,clearInterval(o)}))},o=setInterval(s,this.updateUserCountTimeout);return s(),r.asObservable().pipe(td(()=>clearInterval(o)))}sendMessage(r,i,s){var o=this;return U(function*(){yield o.stopTyping(r);const a=yield o.nostrEventFactory.createEncryptedDirectMessage(r,i,s);return o.npool.event(a)})()}isTyping(r){var i=this;return U(function*(){const s=yield i.nostrEventFactory.createTypingUserStatus(r);return i.npool.event(s)})()}stopTyping(r){var i=this;return U(function*(){const s=yield i.nostrEventFactory.cleanUserStatus(r);return i.npool.event(s)})()}static{this.\u0275fac=function(i){return new(i||e)(Z(Hb),Z(hg))}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac})}}return e})(),NX=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=Ht({type:e})}static{this.\u0275inj=Nt({providers:[p2,N2,R2],imports:[bo]})}}return e})();function O2(e,t=0){return $t((r,i)=>{r.subscribe(Ct(i,s=>li(i,e,()=>i.next(s),t),()=>li(i,e,()=>i.complete(),t),s=>li(i,e,()=>i.error(s),t)))})}function k2(e,t=0){return $t((r,i)=>{i.add(e.schedule(()=>r.subscribe(i),t))})}function P2(e,t){if(!e)throw new Error("Iterable cannot be null");return new jt(r=>{li(r,t,()=>{const i=e[Symbol.asyncIterator]();li(r,t,()=>{i.next().then(s=>{s.done?r.complete():r.next(s.value)})},0,!0)})})}function qt(e,t){return t?function BX(e,t){if(null!=e){if(E2(e))return function OX(e,t){return Or(e).pipe(k2(t),O2(t))}(e,t);if(w2(e))return function PX(e,t){return new jt(r=>{let i=0;return t.schedule(function(){i===e.length?r.complete():(r.next(e[i++]),r.closed||this.schedule())})})}(e,t);if(b2(e))return function kX(e,t){return Or(e).pipe(k2(t),O2(t))}(e,t);if(C2(e))return P2(e,t);if(I2(e))return function LX(e,t){return new jt(r=>{let i;return li(r,t,()=>{i=e[S2](),li(r,t,()=>{let s,o;try{({value:s,done:o}=i.next())}catch(a){return void r.error(a)}o?r.complete():r.next(s)},0,!0)}),()=>at(i?.return)&&i.return()})}(e,t);if(x2(e))return function FX(e,t){return P2(T2(e),t)}(e,t)}throw D2(e)}(e,t):Or(e)}function zb(e){return e[e.length-1]}function L2(e){return at(zb(e))?e.pop():void 0}function gg(e){return function VX(e){return e&&at(e.schedule)}(zb(e))?e.pop():void 0}function fe(...e){return qt(e,gg(e))}const{isArray:UX}=Array,{getPrototypeOf:jX,prototype:$X,keys:HX}=Object;function F2(e){if(1===e.length){const t=e[0];if(UX(t))return{args:t,keys:null};if(function zX(e){return e&&"object"==typeof e&&jX(e)===$X}(t)){const r=HX(t);return{args:r.map(i=>t[i]),keys:r}}}return{args:e,keys:null}}const{isArray:qX}=Array;function B2(e){return Ve(t=>function GX(e,t){return qX(t)?e(...t):e(t)}(e,t))}function V2(e,t){return e.reduce((r,i,s)=>(r[i]=t[s],r),{})}function qb(...e){const t=gg(e),r=L2(e),{args:i,keys:s}=F2(e);if(0===i.length)return qt([],t);const o=new jt(function WX(e,t,r=Ws){return i=>{U2(t,()=>{const{length:s}=e,o=new Array(s);let a=s,c=s;for(let l=0;l{const u=qt(e[l],t);let d=!1;u.subscribe(Ct(i,f=>{o[l]=f,d||(d=!0,c--),c||i.next(r(o.slice()))},()=>{--a||i.complete()}))},i)},i)}}(i,t,s?a=>V2(s,a):Ws));return r?o.pipe(B2(r)):o}function U2(e,t,r){e?li(r,e,t):t()}const mg=Ud(e=>function(){e(this),this.name="EmptyError",this.message="no elements in sequence"});function un(e,t,r=1/0){return at(t)?un((i,s)=>Ve((o,a)=>t(i,o,s,a))(Or(e(i,s))),r):("number"==typeof t&&(r=t),$t((i,s)=>function ZX(e,t,r,i,s,o,a,c){const l=[];let u=0,d=0,f=!1;const h=()=>{f&&!l.length&&!u&&t.complete()},p=m=>u{o&&t.next(m),u++;let y=!1;Or(r(m,d++)).subscribe(Ct(t,_=>{s?.(_),o?p(_):t.next(_)},()=>{y=!0},void 0,()=>{if(y)try{for(u--;l.length&&ug(_)):g(_)}h()}catch(_){t.error(_)}}))};return e.subscribe(Ct(t,p,()=>{f=!0,h()})),()=>{c?.()}}(i,s,e,r)))}function id(e=1/0){return un(Ws,e)}function Gb(...e){return function KX(){return id(1)}()(qt(e,gg(e)))}function j2(e){return new jt(t=>{Or(e()).subscribe(t)})}const ui=new jt(e=>e.complete());function Wb(){return $t((e,t)=>{let r=null;e._refCount++;const i=Ct(t,void 0,void 0,void 0,()=>{if(!e||e._refCount<=0||0<--e._refCount)return void(r=null);const s=e._connection,o=r;r=null,s&&(!o||s===o)&&s.unsubscribe(),t.unsubscribe()});e.subscribe(i),i.closed||(r=e.connect())})}class $2 extends jt{constructor(t,r){super(),this.source=t,this.subjectFactory=r,this._subject=null,this._refCount=0,this._connection=null,BC(t)&&(this.lift=t.lift)}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){const t=this._subject;return(!t||t.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;const{_connection:t}=this;this._subject=this._connection=null,t?.unsubscribe()}connect(){let t=this._connection;if(!t){t=this._connection=new Et;const r=this.getSubject();t.add(this.source.subscribe(Ct(r,void 0,()=>{this._teardown(),r.complete()},i=>{this._teardown(),r.error(i)},()=>this._teardown()))),t.closed&&(this._connection=null,t=Et.EMPTY)}return t}refCount(){return Wb()(this)}}function di(e,t){return $t((r,i)=>{let s=null,o=0,a=!1;const c=()=>a&&!s&&i.complete();r.subscribe(Ct(i,l=>{s?.unsubscribe();let u=0;const d=o++;Or(e(l,d)).subscribe(s=Ct(i,f=>i.next(t?t(l,f,d,u++):f),()=>{s=null,c()}))},()=>{a=!0,c()}))})}function Rc(e){return e<=0?()=>ui:$t((t,r)=>{let i=0;t.subscribe(Ct(r,s=>{++i<=e&&(r.next(s),e<=i&&r.complete())}))})}function Zi(e,t){return $t((r,i)=>{let s=0;r.subscribe(Ct(i,o=>e.call(t,o,s++)&&i.next(o)))})}function yg(e){return $t((t,r)=>{let i=!1;t.subscribe(Ct(r,s=>{i=!0,r.next(s)},()=>{i||r.next(e),r.complete()}))})}function H2(e=JX){return $t((t,r)=>{let i=!1;t.subscribe(Ct(r,s=>{i=!0,r.next(s)},()=>i?r.complete():r.error(e())))})}function JX(){return new mg}function Vs(e,t){const r=arguments.length>=2;return i=>i.pipe(e?Zi((s,o)=>e(s,o,i)):Ws,Rc(1),r?yg(t):H2(()=>new mg))}function sd(e,t){return at(t)?un(e,t,1):un(e,1)}function Cn(e,t,r){const i=at(e)||t||r?{next:e,error:t,complete:r}:e;return i?$t((s,o)=>{var a;null===(a=i.subscribe)||void 0===a||a.call(i);let c=!0;s.subscribe(Ct(o,l=>{var u;null===(u=i.next)||void 0===u||u.call(i,l),o.next(l)},()=>{var l;c=!1,null===(l=i.complete)||void 0===l||l.call(i),o.complete()},l=>{var u;c=!1,null===(u=i.error)||void 0===u||u.call(i,l),o.error(l)},()=>{var l,u;c&&(null===(l=i.unsubscribe)||void 0===l||l.call(i)),null===(u=i.finalize)||void 0===u||u.call(i)}))}):Ws}function Zb(e){return e<=0?()=>ui:$t((t,r)=>{let i=[];t.subscribe(Ct(r,s=>{i.push(s),e{for(const s of i)r.next(s);r.complete()},void 0,()=>{i=null}))})}const ye="primary",od=Symbol("RouteTitle");class iee{constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(this.params,t)}get(t){if(this.has(t)){const r=this.params[t];return Array.isArray(r)?r[0]:r}return null}getAll(t){if(this.has(t)){const r=this.params[t];return Array.isArray(r)?r:[r]}return[]}get keys(){return Object.keys(this.params)}}function Oc(e){return new iee(e)}function see(e,t,r){const i=r.path.split("/");if(i.length>e.length||"full"===r.pathMatch&&(t.hasChildren()||i.lengthi[o]===s)}return e===t}function q2(e){return e.length>0?e[e.length-1]:null}function Us(e){return function RX(e){return!!e&&(e instanceof jt||at(e.lift)&&at(e.subscribe))}(e)?e:cu(e)?qt(Promise.resolve(e)):fe(e)}const aee={exact:function Z2(e,t,r){if(!jo(e.segments,t.segments)||!vg(e.segments,t.segments,r)||e.numberOfChildren!==t.numberOfChildren)return!1;for(const i in t.children)if(!e.children[i]||!Z2(e.children[i],t.children[i],r))return!1;return!0},subset:K2},G2={exact:function cee(e,t){return fi(e,t)},subset:function lee(e,t){return Object.keys(t).length<=Object.keys(e).length&&Object.keys(t).every(r=>z2(e[r],t[r]))},ignored:()=>!0};function W2(e,t,r){return aee[r.paths](e.root,t.root,r.matrixParams)&&G2[r.queryParams](e.queryParams,t.queryParams)&&!("exact"===r.fragment&&e.fragment!==t.fragment)}function K2(e,t,r){return Q2(e,t,t.segments,r)}function Q2(e,t,r,i){if(e.segments.length>r.length){const s=e.segments.slice(0,r.length);return!(!jo(s,r)||t.hasChildren()||!vg(s,r,i))}if(e.segments.length===r.length){if(!jo(e.segments,r)||!vg(e.segments,r,i))return!1;for(const s in t.children)if(!e.children[s]||!K2(e.children[s],t.children[s],i))return!1;return!0}{const s=r.slice(0,e.segments.length),o=r.slice(e.segments.length);return!!(jo(e.segments,s)&&vg(e.segments,s,i)&&e.children[ye])&&Q2(e.children[ye],t,o,i)}}function vg(e,t,r){return t.every((i,s)=>G2[r](e[s].parameters,i.parameters))}class Uo{constructor(t=new We([],{}),r={},i=null){this.root=t,this.queryParams=r,this.fragment=i}get queryParamMap(){return this._queryParamMap??=Oc(this.queryParams),this._queryParamMap}toString(){return fee.serialize(this)}}class We{constructor(t,r){this.segments=t,this.children=r,this.parent=null,Object.values(r).forEach(i=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return wg(this)}}class ad{constructor(t,r){this.path=t,this.parameters=r}get parameterMap(){return this._parameterMap??=Oc(this.parameters),this._parameterMap}toString(){return X2(this)}}function jo(e,t){return e.length===t.length&&e.every((r,i)=>r.path===t[i].path)}let kc=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=H({token:e,factory:()=>new _g,providedIn:"root"})}}return e})();class _g{parse(t){const r=new Cee(t);return new Uo(r.parseRootSegment(),r.parseQueryParams(),r.parseFragment())}serialize(t){const r=`/${cd(t.root,!0)}`,i=function gee(e){const t=Object.entries(e).map(([r,i])=>Array.isArray(i)?i.map(s=>`${bg(r)}=${bg(s)}`).join("&"):`${bg(r)}=${bg(i)}`).filter(r=>r);return t.length?`?${t.join("&")}`:""}(t.queryParams),s="string"==typeof t.fragment?`#${function hee(e){return encodeURI(e)}(t.fragment)}`:"";return`${r}${i}${s}`}}const fee=new _g;function wg(e){return e.segments.map(t=>X2(t)).join("/")}function cd(e,t){if(!e.hasChildren())return wg(e);if(t){const r=e.children[ye]?cd(e.children[ye],!1):"",i=[];return Object.entries(e.children).forEach(([s,o])=>{s!==ye&&i.push(`${s}:${cd(o,!1)}`)}),i.length>0?`${r}(${i.join("//")})`:r}{const r=function dee(e,t){let r=[];return Object.entries(e.children).forEach(([i,s])=>{i===ye&&(r=r.concat(t(s,i)))}),Object.entries(e.children).forEach(([i,s])=>{i!==ye&&(r=r.concat(t(s,i)))}),r}(e,(i,s)=>s===ye?[cd(e.children[ye],!1)]:[`${s}:${cd(i,!1)}`]);return 1===Object.keys(e.children).length&&null!=e.children[ye]?`${wg(e)}/${r[0]}`:`${wg(e)}/(${r.join("//")})`}}function Y2(e){return encodeURIComponent(e).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function bg(e){return Y2(e).replace(/%3B/gi,";")}function Qb(e){return Y2(e).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Eg(e){return decodeURIComponent(e)}function J2(e){return Eg(e.replace(/\+/g,"%20"))}function X2(e){return`${Qb(e.path)}${function pee(e){return Object.entries(e).map(([t,r])=>`;${Qb(t)}=${Qb(r)}`).join("")}(e.parameters)}`}const mee=/^[^\/()?;#]+/;function Yb(e){const t=e.match(mee);return t?t[0]:""}const yee=/^[^\/()?;=#]+/,_ee=/^[^=?&#]+/,bee=/^[^&#]+/;class Cee{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new We([],{}):new We([],this.parseChildren())}parseQueryParams(){const t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let r={};this.peekStartsWith("/(")&&(this.capture("/"),r=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(t.length>0||Object.keys(r).length>0)&&(i[ye]=new We(t,r)),i}parseSegment(){const t=Yb(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new A(4009,!1);return this.capture(t),new ad(Eg(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const r=function vee(e){const t=e.match(yee);return t?t[0]:""}(this.remaining);if(!r)return;this.capture(r);let i="";if(this.consumeOptional("=")){const s=Yb(this.remaining);s&&(i=s,this.capture(i))}t[Eg(r)]=Eg(i)}parseQueryParam(t){const r=function wee(e){const t=e.match(_ee);return t?t[0]:""}(this.remaining);if(!r)return;this.capture(r);let i="";if(this.consumeOptional("=")){const a=function Eee(e){const t=e.match(bee);return t?t[0]:""}(this.remaining);a&&(i=a,this.capture(i))}const s=J2(r),o=J2(i);if(t.hasOwnProperty(s)){let a=t[s];Array.isArray(a)||(a=[a],t[s]=a),a.push(o)}else t[s]=o}parseParens(t){const r={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const i=Yb(this.remaining),s=this.remaining[i.length];if("/"!==s&&")"!==s&&";"!==s)throw new A(4010,!1);let o;i.indexOf(":")>-1?(o=i.slice(0,i.indexOf(":")),this.capture(o),this.capture(":")):t&&(o=ye);const a=this.parseChildren();r[o]=1===Object.keys(a).length?a[ye]:new We([],a),this.consumeOptional("//")}return r}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)}capture(t){if(!this.consumeOptional(t))throw new A(4011,!1)}}function eP(e){return e.segments.length>0?new We([],{[ye]:e}):e}function tP(e){const t={};for(const[i,s]of Object.entries(e.children)){const o=tP(s);if(i===ye&&0===o.segments.length&&o.hasChildren())for(const[a,c]of Object.entries(o.children))t[a]=c;else(o.segments.length>0||o.hasChildren())&&(t[i]=o)}return function Dee(e){if(1===e.numberOfChildren&&e.children[ye]){const t=e.children[ye];return new We(e.segments.concat(t.segments),t.children)}return e}(new We(e.segments,t))}function $o(e){return e instanceof Uo}function nP(e){let t;const s=eP(function r(o){const a={};for(const l of o.children){const u=r(l);a[l.outlet]=u}const c=new We(o.url,a);return o===e&&(t=c),c}(e.root));return t??s}function rP(e,t,r,i){let s=e;for(;s.parent;)s=s.parent;if(0===t.length)return Jb(s,s,s,r,i);const o=function Iee(e){if("string"==typeof e[0]&&1===e.length&&"/"===e[0])return new sP(!0,0,e);let t=0,r=!1;const i=e.reduce((s,o,a)=>{if("object"==typeof o&&null!=o){if(o.outlets){const c={};return Object.entries(o.outlets).forEach(([l,u])=>{c[l]="string"==typeof u?u.split("/"):u}),[...s,{outlets:c}]}if(o.segmentPath)return[...s,o.segmentPath]}return"string"!=typeof o?[...s,o]:0===a?(o.split("/").forEach((c,l)=>{0==l&&"."===c||(0==l&&""===c?r=!0:".."===c?t++:""!=c&&s.push(c))}),s):[...s,o]},[]);return new sP(r,t,i)}(t);if(o.toRoot())return Jb(s,s,new We([],{}),r,i);const a=function Tee(e,t,r){if(e.isAbsolute)return new Dg(t,!0,0);if(!r)return new Dg(t,!1,NaN);if(null===r.parent)return new Dg(r,!0,0);const i=Cg(e.commands[0])?0:1;return function xee(e,t,r){let i=e,s=t,o=r;for(;o>s;){if(o-=s,i=i.parent,!i)throw new A(4005,!1);s=i.segments.length}return new Dg(i,!1,s-o)}(r,r.segments.length-1+i,e.numberOfDoubleDots)}(o,s,e),c=a.processChildren?ud(a.segmentGroup,a.index,o.commands):oP(a.segmentGroup,a.index,o.commands);return Jb(s,a.segmentGroup,c,r,i)}function Cg(e){return"object"==typeof e&&null!=e&&!e.outlets&&!e.segmentPath}function ld(e){return"object"==typeof e&&null!=e&&e.outlets}function Jb(e,t,r,i,s){let a,o={};i&&Object.entries(i).forEach(([l,u])=>{o[l]=Array.isArray(u)?u.map(d=>`${d}`):`${u}`}),a=e===t?r:iP(e,t,r);const c=eP(tP(a));return new Uo(c,o,s)}function iP(e,t,r){const i={};return Object.entries(e.children).forEach(([s,o])=>{i[s]=o===t?r:iP(o,t,r)}),new We(e.segments,i)}class sP{constructor(t,r,i){if(this.isAbsolute=t,this.numberOfDoubleDots=r,this.commands=i,t&&i.length>0&&Cg(i[0]))throw new A(4003,!1);const s=i.find(ld);if(s&&s!==q2(i))throw new A(4004,!1)}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class Dg{constructor(t,r,i){this.segmentGroup=t,this.processChildren=r,this.index=i}}function oP(e,t,r){if(e??=new We([],{}),0===e.segments.length&&e.hasChildren())return ud(e,t,r);const i=function Mee(e,t,r){let i=0,s=t;const o={match:!1,pathIndex:0,commandIndex:0};for(;s=r.length)return o;const a=e.segments[s],c=r[i];if(ld(c))break;const l=`${c}`,u=i0&&void 0===l)break;if(l&&u&&"object"==typeof u&&void 0===u.outlets){if(!cP(l,u,a))return o;i+=2}else{if(!cP(l,{},a))return o;i++}s++}return{match:!0,pathIndex:s,commandIndex:i}}(e,t,r),s=r.slice(i.commandIndex);if(i.match&&i.pathIndexo!==ye)&&e.children[ye]&&1===e.numberOfChildren&&0===e.children[ye].segments.length){const o=ud(e.children[ye],t,r);return new We(e.segments,o.children)}return Object.entries(i).forEach(([o,a])=>{"string"==typeof a&&(a=[a]),null!==a&&(s[o]=oP(e.children[o],t,a))}),Object.entries(e.children).forEach(([o,a])=>{void 0===i[o]&&(s[o]=a)}),new We(e.segments,s)}}function Xb(e,t,r){const i=e.segments.slice(0,t);let s=0;for(;s{"string"==typeof i&&(i=[i]),null!==i&&(t[r]=Xb(new We([],{}),0,i))}),t}function aP(e){const t={};return Object.entries(e).forEach(([r,i])=>t[r]=`${i}`),t}function cP(e,t,r){return e==r.path&&fi(t,r.parameters)}const dd="imperative";var Me=function(e){return e[e.NavigationStart=0]="NavigationStart",e[e.NavigationEnd=1]="NavigationEnd",e[e.NavigationCancel=2]="NavigationCancel",e[e.NavigationError=3]="NavigationError",e[e.RoutesRecognized=4]="RoutesRecognized",e[e.ResolveStart=5]="ResolveStart",e[e.ResolveEnd=6]="ResolveEnd",e[e.GuardsCheckStart=7]="GuardsCheckStart",e[e.GuardsCheckEnd=8]="GuardsCheckEnd",e[e.RouteConfigLoadStart=9]="RouteConfigLoadStart",e[e.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",e[e.ChildActivationStart=11]="ChildActivationStart",e[e.ChildActivationEnd=12]="ChildActivationEnd",e[e.ActivationStart=13]="ActivationStart",e[e.ActivationEnd=14]="ActivationEnd",e[e.Scroll=15]="Scroll",e[e.NavigationSkipped=16]="NavigationSkipped",e}(Me||{});class hi{constructor(t,r){this.id=t,this.url=r}}class fd extends hi{constructor(t,r,i="imperative",s=null){super(t,r),this.type=Me.NavigationStart,this.navigationTrigger=i,this.restoredState=s}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class Ki extends hi{constructor(t,r,i){super(t,r),this.urlAfterRedirects=i,this.type=Me.NavigationEnd}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}var Kn=function(e){return e[e.Redirect=0]="Redirect",e[e.SupersededByNewNavigation=1]="SupersededByNewNavigation",e[e.NoDataFromResolver=2]="NoDataFromResolver",e[e.GuardRejected=3]="GuardRejected",e}(Kn||{}),Sg=function(e){return e[e.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",e[e.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",e}(Sg||{});class Ho extends hi{constructor(t,r,i,s){super(t,r),this.reason=i,this.code=s,this.type=Me.NavigationCancel}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class Pc extends hi{constructor(t,r,i,s){super(t,r),this.reason=i,this.code=s,this.type=Me.NavigationSkipped}}class eE extends hi{constructor(t,r,i,s){super(t,r),this.error=i,this.target=s,this.type=Me.NavigationError}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class lP extends hi{constructor(t,r,i,s){super(t,r),this.urlAfterRedirects=i,this.state=s,this.type=Me.RoutesRecognized}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Ree extends hi{constructor(t,r,i,s){super(t,r),this.urlAfterRedirects=i,this.state=s,this.type=Me.GuardsCheckStart}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Oee extends hi{constructor(t,r,i,s,o){super(t,r),this.urlAfterRedirects=i,this.state=s,this.shouldActivate=o,this.type=Me.GuardsCheckEnd}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class kee extends hi{constructor(t,r,i,s){super(t,r),this.urlAfterRedirects=i,this.state=s,this.type=Me.ResolveStart}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Pee extends hi{constructor(t,r,i,s){super(t,r),this.urlAfterRedirects=i,this.state=s,this.type=Me.ResolveEnd}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Lee{constructor(t){this.route=t,this.type=Me.RouteConfigLoadStart}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class Fee{constructor(t){this.route=t,this.type=Me.RouteConfigLoadEnd}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class Bee{constructor(t){this.snapshot=t,this.type=Me.ChildActivationStart}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Vee{constructor(t){this.snapshot=t,this.type=Me.ChildActivationEnd}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Uee{constructor(t){this.snapshot=t,this.type=Me.ActivationStart}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class jee{constructor(t){this.snapshot=t,this.type=Me.ActivationEnd}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class uP{constructor(t,r,i){this.routerEvent=t,this.position=r,this.anchor=i,this.type=Me.Scroll}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}class tE{}class Ig{constructor(t,r){this.url=t,this.navigationBehaviorOptions=r}}function kr(e){return e.outlet||ye}function hd(e){if(!e)return null;if(e.routeConfig?._injector)return e.routeConfig._injector;for(let t=e.parent;t;t=t.parent){const r=t.routeConfig;if(r?._loadedInjector)return r._loadedInjector;if(r?._injector)return r._injector}return null}class Wee{get injector(){return hd(this.route?.snapshot)??this.rootInjector}set injector(t){}constructor(t){this.rootInjector=t,this.outlet=null,this.route=null,this.children=new pd(this.rootInjector),this.attachRef=null}}let pd=(()=>{class e{constructor(r){this.rootInjector=r,this.contexts=new Map}onChildOutletCreated(r,i){const s=this.getOrCreateContext(r);s.outlet=i,this.contexts.set(r,s)}onChildOutletDestroyed(r){const i=this.getContext(r);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){const r=this.contexts;return this.contexts=new Map,r}onOutletReAttached(r){this.contexts=r}getOrCreateContext(r){let i=this.getContext(r);return i||(i=new Wee(this.rootInjector),this.contexts.set(r,i)),i}getContext(r){return this.contexts.get(r)||null}static{this.\u0275fac=function(i){return new(i||e)(Z(Tn))}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();class dP{constructor(t){this._root=t}get root(){return this._root.value}parent(t){const r=this.pathFromRoot(t);return r.length>1?r[r.length-2]:null}children(t){const r=nE(t,this._root);return r?r.children.map(i=>i.value):[]}firstChild(t){const r=nE(t,this._root);return r&&r.children.length>0?r.children[0].value:null}siblings(t){const r=rE(t,this._root);return r.length<2?[]:r[r.length-2].children.map(s=>s.value).filter(s=>s!==t)}pathFromRoot(t){return rE(t,this._root).map(r=>r.value)}}function nE(e,t){if(e===t.value)return t;for(const r of t.children){const i=nE(e,r);if(i)return i}return null}function rE(e,t){if(e===t.value)return[t];for(const r of t.children){const i=rE(e,r);if(i.length)return i.unshift(t),i}return[]}class Pr{constructor(t,r){this.value=t,this.children=r}toString(){return`TreeNode(${this.value})`}}function Lc(e){const t={};return e&&e.children.forEach(r=>t[r.value.outlet]=r),t}class fP extends dP{constructor(t,r){super(t),this.snapshot=r,iE(this,t)}toString(){return this.snapshot.toString()}}function hP(e){const t=function Zee(e){const o=new xg([],{},{},"",{},ye,e,null,{});return new pP("",new Pr(o,[]))}(e),r=new Jn([new ad("",{})]),i=new Jn({}),s=new Jn({}),o=new Jn({}),a=new Jn(""),c=new Fc(r,i,o,a,s,ye,e,t.root);return c.snapshot=t.root,new fP(new Pr(c,[]),t)}class Fc{constructor(t,r,i,s,o,a,c,l){this.urlSubject=t,this.paramsSubject=r,this.queryParamsSubject=i,this.fragmentSubject=s,this.dataSubject=o,this.outlet=a,this.component=c,this._futureSnapshot=l,this.title=this.dataSubject?.pipe(Ve(u=>u[od]))??fe(void 0),this.url=t,this.params=r,this.queryParams=i,this.fragment=s,this.data=o}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(Ve(t=>Oc(t))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(Ve(t=>Oc(t))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function Tg(e,t,r="emptyOnly"){let i;const{routeConfig:s}=e;return i=null===t||"always"!==r&&""!==s?.path&&(t.component||t.routeConfig?.loadComponent)?{params:{...e.params},data:{...e.data},resolve:{...e.data,...e._resolvedData??{}}}:{params:{...t.params,...e.params},data:{...t.data,...e.data},resolve:{...e.data,...t.data,...s?.data,...e._resolvedData}},s&&mP(s)&&(i.resolve[od]=s.title),i}class xg{get title(){return this.data?.[od]}constructor(t,r,i,s,o,a,c,l,u){this.url=t,this.params=r,this.queryParams=i,this.fragment=s,this.data=o,this.outlet=a,this.component=c,this.routeConfig=l,this._resolve=u}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=Oc(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=Oc(this.queryParams),this._queryParamMap}toString(){return`Route(url:'${this.url.map(i=>i.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class pP extends dP{constructor(t,r){super(r),this.url=t,iE(this,r)}toString(){return gP(this._root)}}function iE(e,t){t.value._routerState=e,t.children.forEach(r=>iE(e,r))}function gP(e){const t=e.children.length>0?` { ${e.children.map(gP).join(", ")} } `:"";return`${e.value}${t}`}function sE(e){if(e.snapshot){const t=e.snapshot,r=e._futureSnapshot;e.snapshot=r,fi(t.queryParams,r.queryParams)||e.queryParamsSubject.next(r.queryParams),t.fragment!==r.fragment&&e.fragmentSubject.next(r.fragment),fi(t.params,r.params)||e.paramsSubject.next(r.params),function oee(e,t){if(e.length!==t.length)return!1;for(let r=0;rfi(r.parameters,t[i].parameters))}(e.url,t.url);return r&&!(!e.parent!=!t.parent)&&(!e.parent||oE(e.parent,t.parent))}function mP(e){return"string"==typeof e.title||null===e.title}let aE=(()=>{class e{constructor(){this.activated=null,this._activatedRoute=null,this.name=ye,this.activateEvents=new dt,this.deactivateEvents=new dt,this.attachEvents=new dt,this.detachEvents=new dt,this.parentContexts=O(pd),this.location=O(rr),this.changeDetector=O(uu),this.inputBinder=O(Ag,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(r){if(r.name){const{firstChange:i,previousValue:s}=r.name;if(i)return;this.isTrackedInParentContexts(s)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(s)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(r){return this.parentContexts.getContext(r)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const r=this.parentContexts.getContext(this.name);r?.route&&(r.attachRef?this.attach(r.attachRef,r.route):this.activateWith(r.route,r.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new A(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new A(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new A(4012,!1);this.location.detach();const r=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(r.instance),r}attach(r,i){this.activated=r,this._activatedRoute=i,this.location.insert(r.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(r.instance)}deactivate(){if(this.activated){const r=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(r)}}activateWith(r,i){if(this.isActivated)throw new A(4013,!1);this._activatedRoute=r;const s=this.location,a=r.snapshot.component,c=this.parentContexts.getOrCreateContext(this.name).children,l=new cE(r,c,s.injector);this.activated=s.createComponent(a,{index:s.length,injector:l,environmentInjector:i}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275dir=de({type:e,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[er]})}}return e})();class cE{__ngOutletInjector(t){return new cE(this.route,this.childContexts,t)}constructor(t,r,i){this.route=t,this.childContexts=r,this.parent=i}get(t,r){return t===Fc?this.route:t===pd?this.childContexts:this.parent.get(t,r)}}const Ag=new q("");let yP=(()=>{class e{constructor(){this.outletDataSubscriptions=new Map}bindActivatedRouteToOutletComponent(r){this.unsubscribeFromRouteData(r),this.subscribeToRouteData(r)}unsubscribeFromRouteData(r){this.outletDataSubscriptions.get(r)?.unsubscribe(),this.outletDataSubscriptions.delete(r)}subscribeToRouteData(r){const{activatedRoute:i}=r,s=qb([i.queryParams,i.params,i.data]).pipe(di(([o,a,c],l)=>(c={...o,...a,...c},0===l?fe(c):Promise.resolve(c)))).subscribe(o=>{if(!r.isActivated||!r.activatedComponentRef||r.activatedRoute!==i||null===i.component)return void this.unsubscribeFromRouteData(r);const a=function Yz(e){const t=Ce(e);if(!t)return null;const r=new $l(t);return{get selector(){return r.selector},get type(){return r.componentType},get inputs(){return r.inputs},get outputs(){return r.outputs},get ngContentSelectors(){return r.ngContentSelectors},get isStandalone(){return t.standalone},get isSignal(){return t.signals}}}(i.component);if(a)for(const{templateName:c}of a.inputs)r.activatedComponentRef.setInput(c,o[c]);else this.unsubscribeFromRouteData(r)});this.outletDataSubscriptions.set(r,s)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac})}}return e})();function gd(e,t,r){if(r&&e.shouldReuseRoute(t.value,r.value.snapshot)){const i=r.value;i._futureSnapshot=t.value;const s=function Qee(e,t,r){return t.children.map(i=>{for(const s of r.children)if(e.shouldReuseRoute(i.value,s.value.snapshot))return gd(e,i,s);return gd(e,i)})}(e,t,r);return new Pr(i,s)}{if(e.shouldAttach(t.value)){const o=e.retrieve(t.value);if(null!==o){const a=o.route;return a.value._futureSnapshot=t.value,a.children=t.children.map(c=>gd(e,c)),a}}const i=function Yee(e){return new Fc(new Jn(e.url),new Jn(e.params),new Jn(e.queryParams),new Jn(e.fragment),new Jn(e.data),e.outlet,e.component,e)}(t.value),s=t.children.map(o=>gd(e,o));return new Pr(i,s)}}class lE{constructor(t,r){this.redirectTo=t,this.navigationBehaviorOptions=r}}const vP="ngNavigationCancelingError";function Mg(e,t){const{redirectTo:r,navigationBehaviorOptions:i}=$o(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,s=_P(!1,Kn.Redirect);return s.url=r,s.navigationBehaviorOptions=i,s}function _P(e,t){const r=new Error(`NavigationCancelingError: ${e||""}`);return r[vP]=!0,r.cancellationCode=t,r}function wP(e){return!!e&&e[vP]}class ete{constructor(t,r,i,s,o){this.routeReuseStrategy=t,this.futureState=r,this.currState=i,this.forwardEvent=s,this.inputBindingEnabled=o}activate(t){const r=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(r,i,t),sE(this.futureState.root),this.activateChildRoutes(r,i,t)}deactivateChildRoutes(t,r,i){const s=Lc(r);t.children.forEach(o=>{const a=o.value.outlet;this.deactivateRoutes(o,s[a],i),delete s[a]}),Object.values(s).forEach(o=>{this.deactivateRouteAndItsChildren(o,i)})}deactivateRoutes(t,r,i){const s=t.value,o=r?r.value:null;if(s===o)if(s.component){const a=i.getContext(s.outlet);a&&this.deactivateChildRoutes(t,r,a.children)}else this.deactivateChildRoutes(t,r,i);else o&&this.deactivateRouteAndItsChildren(r,i)}deactivateRouteAndItsChildren(t,r){t.value.component&&this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,r):this.deactivateRouteAndOutlet(t,r)}detachAndStoreRouteSubtree(t,r){const i=r.getContext(t.value.outlet),s=i&&t.value.component?i.children:r,o=Lc(t);for(const a of Object.values(o))this.deactivateRouteAndItsChildren(a,s);if(i&&i.outlet){const a=i.outlet.detach(),c=i.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:a,route:t,contexts:c})}}deactivateRouteAndOutlet(t,r){const i=r.getContext(t.value.outlet),s=i&&t.value.component?i.children:r,o=Lc(t);for(const a of Object.values(o))this.deactivateRouteAndItsChildren(a,s);i&&(i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated()),i.attachRef=null,i.route=null)}activateChildRoutes(t,r,i){const s=Lc(r);t.children.forEach(o=>{this.activateRoutes(o,s[o.value.outlet],i),this.forwardEvent(new jee(o.value.snapshot))}),t.children.length&&this.forwardEvent(new Vee(t.value.snapshot))}activateRoutes(t,r,i){const s=t.value,o=r?r.value:null;if(sE(s),s===o)if(s.component){const a=i.getOrCreateContext(s.outlet);this.activateChildRoutes(t,r,a.children)}else this.activateChildRoutes(t,r,i);else if(s.component){const a=i.getOrCreateContext(s.outlet);if(this.routeReuseStrategy.shouldAttach(s.snapshot)){const c=this.routeReuseStrategy.retrieve(s.snapshot);this.routeReuseStrategy.store(s.snapshot,null),a.children.onOutletReAttached(c.contexts),a.attachRef=c.componentRef,a.route=c.route.value,a.outlet&&a.outlet.attach(c.componentRef,c.route.value),sE(c.route.value),this.activateChildRoutes(t,null,a.children)}else a.attachRef=null,a.route=s,a.outlet&&a.outlet.activateWith(s,a.injector),this.activateChildRoutes(t,null,a.children)}else this.activateChildRoutes(t,null,i)}}class bP{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class Ng{constructor(t,r){this.component=t,this.route=r}}function tte(e,t,r){const i=e._root;return md(i,t?t._root:null,r,[i.value])}function Bc(e,t){const r=Symbol(),i=t.get(e,r);return i===r?"function"!=typeof e||function h3(e){return null!==Wd(e)}(e)?t.get(e):e:i}function md(e,t,r,i,s={canDeactivateChecks:[],canActivateChecks:[]}){const o=Lc(t);return e.children.forEach(a=>{(function rte(e,t,r,i,s={canDeactivateChecks:[],canActivateChecks:[]}){const o=e.value,a=t?t.value:null,c=r?r.getContext(e.value.outlet):null;if(a&&o.routeConfig===a.routeConfig){const l=function ite(e,t,r){if("function"==typeof r)return r(e,t);switch(r){case"pathParamsChange":return!jo(e.url,t.url);case"pathParamsOrQueryParamsChange":return!jo(e.url,t.url)||!fi(e.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!oE(e,t)||!fi(e.queryParams,t.queryParams);default:return!oE(e,t)}}(a,o,o.routeConfig.runGuardsAndResolvers);l?s.canActivateChecks.push(new bP(i)):(o.data=a.data,o._resolvedData=a._resolvedData),md(e,t,o.component?c?c.children:null:r,i,s),l&&c&&c.outlet&&c.outlet.isActivated&&s.canDeactivateChecks.push(new Ng(c.outlet.component,a))}else a&&yd(t,c,s),s.canActivateChecks.push(new bP(i)),md(e,null,o.component?c?c.children:null:r,i,s)})(a,o[a.value.outlet],r,i.concat([a.value]),s),delete o[a.value.outlet]}),Object.entries(o).forEach(([a,c])=>yd(c,r.getContext(a),s)),s}function yd(e,t,r){const i=Lc(e),s=e.value;Object.entries(i).forEach(([o,a])=>{yd(a,s.component?t?t.children.getContext(o):null:t,r)}),r.canDeactivateChecks.push(new Ng(s.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,s))}function vd(e){return"function"==typeof e}function EP(e){return e instanceof mg||"EmptyError"===e?.name}const Rg=Symbol("INITIAL_VALUE");function Vc(){return di(e=>qb(e.map(t=>t.pipe(Rc(1),function YX(...e){const t=gg(e);return $t((r,i)=>{(t?Gb(e,r,t):Gb(e,r)).subscribe(i)})}(Rg)))).pipe(Ve(t=>{for(const r of t)if(!0!==r){if(r===Rg)return Rg;if(!1===r||dte(r))return r}return!0}),Zi(t=>t!==Rg),Rc(1)))}function dte(e){return $o(e)||e instanceof lE}function CP(e){return function r3(...e){return PC(e)}(Cn(t=>{if("boolean"!=typeof t)throw Mg(0,t)}),Ve(t=>!0===t))}class uE{constructor(t){this.segmentGroup=t||null}}class Og extends Error{constructor(t){super(),this.urlTree=t}}function Uc(e){return Nc(new uE(e))}class Dte{constructor(t,r){this.urlSerializer=t,this.urlTree=r}lineralizeSegments(t,r){let i=[],s=r.root;for(;;){if(i=i.concat(s.segments),0===s.numberOfChildren)return fe(i);if(s.numberOfChildren>1||!s.children[ye])return Nc(new A(4e3,!1));s=s.children[ye]}}applyRedirectCommands(t,r,i,s,o){if("string"!=typeof r){const c=r,{queryParams:l,fragment:u,routeConfig:d,url:f,outlet:h,params:p,data:g,title:m}=s,y=Ei(o,()=>c({params:p,data:g,queryParams:l,fragment:u,routeConfig:d,url:f,outlet:h,title:m}));if(y instanceof Uo)throw new Og(y);r=y}const a=this.applyRedirectCreateUrlTree(r,this.urlSerializer.parse(r),t,i);if("/"===r[0])throw new Og(a);return a}applyRedirectCreateUrlTree(t,r,i,s){const o=this.createSegmentGroup(t,r.root,i,s);return new Uo(o,this.createQueryParams(r.queryParams,this.urlTree.queryParams),r.fragment)}createQueryParams(t,r){const i={};return Object.entries(t).forEach(([s,o])=>{if("string"==typeof o&&":"===o[0]){const c=o.substring(1);i[s]=r[c]}else i[s]=o}),i}createSegmentGroup(t,r,i,s){const o=this.createSegments(t,r.segments,i,s);let a={};return Object.entries(r.children).forEach(([c,l])=>{a[c]=this.createSegmentGroup(t,l,i,s)}),new We(o,a)}createSegments(t,r,i,s){return r.map(o=>":"===o.path[0]?this.findPosParam(t,o,s):this.findOrReturn(o,i))}findPosParam(t,r,i){const s=i[r.path.substring(1)];if(!s)throw new A(4001,!1);return s}findOrReturn(t,r){let i=0;for(const s of r){if(s.path===t.path)return r.splice(i),s;i++}return t}}const dE={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function Ste(e,t,r,i,s){const o=DP(e,t,r);return o.matched?(i=function $ee(e,t){return e.providers&&!e._injector&&(e._injector=dh(e.providers,t,`Route: ${e.path}`)),e._injector??t}(t,i),function bte(e,t,r,i){const s=t.canMatch;return s&&0!==s.length?fe(s.map(a=>{const c=Bc(a,e);return Us(function ute(e){return e&&vd(e.canMatch)}(c)?c.canMatch(t,r):Ei(e,()=>c(t,r)))})).pipe(Vc(),CP()):fe(!0)}(i,t,r).pipe(Ve(a=>!0===a?o:{...dE}))):fe(o)}function DP(e,t,r){if("**"===t.path)return function Ite(e){return{matched:!0,parameters:e.length>0?q2(e).parameters:{},consumedSegments:e,remainingSegments:[],positionalParamSegments:{}}}(r);if(""===t.path)return"full"===t.pathMatch&&(e.hasChildren()||r.length>0)?{...dE}:{matched:!0,consumedSegments:[],remainingSegments:r,parameters:{},positionalParamSegments:{}};const s=(t.matcher||see)(r,e,t);if(!s)return{...dE};const o={};Object.entries(s.posParams??{}).forEach(([c,l])=>{o[c]=l.path});const a=s.consumed.length>0?{...o,...s.consumed[s.consumed.length-1].parameters}:o;return{matched:!0,consumedSegments:s.consumed,remainingSegments:r.slice(s.consumed.length),parameters:a,positionalParamSegments:s.posParams??{}}}function SP(e,t,r,i){return r.length>0&&function Ate(e,t,r){return r.some(i=>kg(e,t,i)&&kr(i)!==ye)}(e,r,i)?{segmentGroup:new We(t,xte(i,new We(r,e.children))),slicedSegments:[]}:0===r.length&&function Mte(e,t,r){return r.some(i=>kg(e,t,i))}(e,r,i)?{segmentGroup:new We(e.segments,Tte(e,r,i,e.children)),slicedSegments:r}:{segmentGroup:new We(e.segments,e.children),slicedSegments:r}}function Tte(e,t,r,i){const s={};for(const o of r)if(kg(e,t,o)&&!i[kr(o)]){const a=new We([],{});s[kr(o)]=a}return{...i,...s}}function xte(e,t){const r={};r[ye]=t;for(const i of e)if(""===i.path&&kr(i)!==ye){const s=new We([],{});r[kr(i)]=s}return r}function kg(e,t,r){return(!(e.hasChildren()||t.length>0)||"full"!==r.pathMatch)&&""===r.path}class Rte{}class Pte{constructor(t,r,i,s,o,a,c){this.injector=t,this.configLoader=r,this.rootComponentType=i,this.config=s,this.urlTree=o,this.paramsInheritanceStrategy=a,this.urlSerializer=c,this.applyRedirects=new Dte(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(t){return new A(4002,`'${t.segmentGroup}'`)}recognize(){const t=SP(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(t).pipe(Ve(({children:r,rootSnapshot:i})=>{const s=new Pr(i,r),o=new pP("",s),a=function See(e,t,r=null,i=null){return rP(nP(e),t,r,i)}(i,[],this.urlTree.queryParams,this.urlTree.fragment);return a.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(a),{state:o,tree:a}}))}match(t){const r=new xg([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,Object.freeze({}),ye,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,t,ye,r).pipe(Ve(i=>({children:i,rootSnapshot:r})),Bs(i=>{if(i instanceof Og)return this.urlTree=i.urlTree,this.match(i.urlTree.root);throw i instanceof uE?this.noMatchError(i):i}))}processSegmentGroup(t,r,i,s,o){return 0===i.segments.length&&i.hasChildren()?this.processChildren(t,r,i,o):this.processSegment(t,r,i,i.segments,s,!0,o).pipe(Ve(a=>a instanceof Pr?[a]:[]))}processChildren(t,r,i,s){const o=[];for(const a of Object.keys(i.children))"primary"===a?o.unshift(a):o.push(a);return qt(o).pipe(sd(a=>{const c=i.children[a],l=function Gee(e,t){const r=e.filter(i=>kr(i)===t);return r.push(...e.filter(i=>kr(i)!==t)),r}(r,a);return this.processSegmentGroup(t,l,c,a,s)}),function eee(e,t){return $t(function XX(e,t,r,i,s){return(o,a)=>{let c=r,l=t,u=0;o.subscribe(Ct(a,d=>{const f=u++;l=c?e(l,d,f):(c=!0,d),i&&a.next(l)},s&&(()=>{c&&a.next(l),a.complete()})))}}(e,t,arguments.length>=2,!0))}((a,c)=>(a.push(...c),a)),yg(null),function tee(e,t){const r=arguments.length>=2;return i=>i.pipe(e?Zi((s,o)=>e(s,o,i)):Ws,Zb(1),r?yg(t):H2(()=>new mg))}(),un(a=>{if(null===a)return Uc(i);const c=IP(a);return function Lte(e){e.sort((t,r)=>t.value.outlet===ye?-1:r.value.outlet===ye?1:t.value.outlet.localeCompare(r.value.outlet))}(c),fe(c)}))}processSegment(t,r,i,s,o,a,c){return qt(r).pipe(sd(l=>this.processSegmentAgainstRoute(l._injector??t,r,l,i,s,o,a,c).pipe(Bs(u=>{if(u instanceof uE)return fe(null);throw u}))),Vs(l=>!!l),Bs(l=>{if(EP(l))return function Nte(e,t,r){return 0===t.length&&!e.children[r]}(i,s,o)?fe(new Rte):Uc(i);throw l}))}processSegmentAgainstRoute(t,r,i,s,o,a,c,l){return kr(i)===a||a!==ye&&kg(s,o,i)?void 0===i.redirectTo?this.matchSegmentAgainstRoute(t,s,i,o,a,l):this.allowRedirects&&c?this.expandSegmentAgainstRouteUsingRedirect(t,s,r,i,o,a,l):Uc(s):Uc(s)}expandSegmentAgainstRouteUsingRedirect(t,r,i,s,o,a,c){const{matched:l,parameters:u,consumedSegments:d,positionalParamSegments:f,remainingSegments:h}=DP(r,s,o);if(!l)return Uc(r);"string"==typeof s.redirectTo&&"/"===s.redirectTo[0]&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>31&&(this.allowRedirects=!1));const p=new xg(o,u,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,TP(s),kr(s),s.component??s._loadedComponent??null,s,xP(s)),g=Tg(p,c,this.paramsInheritanceStrategy);p.params=Object.freeze(g.params),p.data=Object.freeze(g.data);const m=this.applyRedirects.applyRedirectCommands(d,s.redirectTo,f,p,t);return this.applyRedirects.lineralizeSegments(s,m).pipe(un(y=>this.processSegment(t,i,r,y.concat(h),a,!1,c)))}matchSegmentAgainstRoute(t,r,i,s,o,a){const c=Ste(r,i,s,t);return"**"===i.path&&(r.children={}),c.pipe(di(l=>l.matched?this.getChildConfig(t=i._injector??t,i,s).pipe(di(({routes:u})=>{const d=i._loadedInjector??t,{parameters:f,consumedSegments:h,remainingSegments:p}=l,g=new xg(h,f,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,TP(i),kr(i),i.component??i._loadedComponent??null,i,xP(i)),m=Tg(g,a,this.paramsInheritanceStrategy);g.params=Object.freeze(m.params),g.data=Object.freeze(m.data);const{segmentGroup:y,slicedSegments:_}=SP(r,h,p,u);if(0===_.length&&y.hasChildren())return this.processChildren(d,u,y,g).pipe(Ve(w=>new Pr(g,w)));if(0===u.length&&0===_.length)return fe(new Pr(g,[]));const v=kr(i)===o;return this.processSegment(d,u,y,_,v?ye:o,!0,g).pipe(Ve(w=>new Pr(g,w instanceof Pr?[w]:[])))})):Uc(r)))}getChildConfig(t,r,i){return r.children?fe({routes:r.children,injector:t}):r.loadChildren?void 0!==r._loadedRoutes?fe({routes:r._loadedRoutes,injector:r._loadedInjector}):function wte(e,t,r,i){const s=t.canLoad;return void 0===s||0===s.length?fe(!0):fe(s.map(a=>{const c=Bc(a,e);return Us(function ote(e){return e&&vd(e.canLoad)}(c)?c.canLoad(t,r):Ei(e,()=>c(t,r)))})).pipe(Vc(),CP())}(t,r,i).pipe(un(s=>s?this.configLoader.loadChildren(t,r).pipe(Cn(o=>{r._loadedRoutes=o.routes,r._loadedInjector=o.injector})):function Cte(){return Nc(_P(!1,Kn.GuardRejected))}())):fe({routes:[],injector:t})}}function Fte(e){const t=e.value.routeConfig;return t&&""===t.path}function IP(e){const t=[],r=new Set;for(const i of e){if(!Fte(i)){t.push(i);continue}const s=t.find(o=>i.value.routeConfig===o.value.routeConfig);void 0!==s?(s.children.push(...i.children),r.add(s)):t.push(i)}for(const i of r){const s=IP(i.children);t.push(new Pr(i.value,s))}return t.filter(i=>!r.has(i))}function TP(e){return e.data||{}}function xP(e){return e.resolve||{}}function AP(e){const t=e.children.map(r=>AP(r)).flat();return[e,...t]}function fE(e){return di(t=>{const r=e(t);return r?qt(r).pipe(Ve(()=>t)):fe(t)})}let MP=(()=>{class e{buildTitle(r){let i,s=r.root;for(;void 0!==s;)i=this.getResolvedTitleForRoute(s)??i,s=s.children.find(o=>o.outlet===ye);return i}getResolvedTitleForRoute(r){return r.data[od]}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=H({token:e,factory:()=>O(Hte),providedIn:"root"})}}return e})(),Hte=(()=>{class e extends MP{constructor(r){super(),this.title=r}updateTitle(r){const i=this.buildTitle(r);void 0!==i&&this.title.setTitle(i)}static{this.\u0275fac=function(i){return new(i||e)(Z(wq))}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const jc=new q("",{providedIn:"root",factory:()=>({})});let NP=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=ns({type:e,selectors:[["ng-component"]],standalone:!0,features:[Ah],decls:1,vars:0,template:function(i,s){1&i&&or(0,"router-outlet")},dependencies:[aE],encapsulation:2})}}return e})();function hE(e){const t=e.children&&e.children.map(hE),r=t?{...e,children:t}:{...e};return!r.component&&!r.loadComponent&&(t||r.loadChildren)&&r.outlet&&r.outlet!==ye&&(r.component=NP),r}const $c=new q("");let pE=(()=>{class e{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=O(iM)}loadComponent(r){if(this.componentLoaders.get(r))return this.componentLoaders.get(r);if(r._loadedComponent)return fe(r._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(r);const i=Us(r.loadComponent()).pipe(Ve(RP),Cn(o=>{this.onLoadEndListener&&this.onLoadEndListener(r),r._loadedComponent=o}),td(()=>{this.componentLoaders.delete(r)})),s=new $2(i,()=>new Xe).pipe(Wb());return this.componentLoaders.set(r,s),s}loadChildren(r,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return fe({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);const o=function zte(e,t,r,i){return Us(e.loadChildren()).pipe(Ve(RP),un(s=>s instanceof g1||Array.isArray(s)?fe(s):qt(t.compileModuleAsync(s))),Ve(s=>{i&&i(e);let o,a,c=!1;return Array.isArray(s)?(a=s,!0):(o=s.create(r).injector,a=o.get($c,[],{optional:!0,self:!0}).flat()),{routes:a.map(hE),injector:o}}))}(i,this.compiler,r,this.onLoadEndListener).pipe(td(()=>{this.childrenLoaders.delete(i)})),a=new $2(o,()=>new Xe).pipe(Wb());return this.childrenLoaders.set(i,a),a}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function RP(e){return function qte(e){return e&&"object"==typeof e&&"default"in e}(e)?e.default:e}let gE=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=H({token:e,factory:()=>O(Gte),providedIn:"root"})}}return e})(),Gte=(()=>{class e{shouldProcessUrl(r){return!0}extract(r){return r}merge(r,i){return r}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const OP=new q(""),kP=new q("");function Wte(e,t,r){const i=e.get(kP),s=e.get(on);return e.get(Ne).runOutsideAngular(()=>{if(!s.startViewTransition||i.skipNextTransition)return i.skipNextTransition=!1,new Promise(u=>setTimeout(u));let o;const a=new Promise(u=>{o=u}),c=s.startViewTransition(()=>(o(),function Zte(e){return new Promise(t=>{yh({read:()=>setTimeout(t)},{injector:e})})}(e))),{onViewTransitionCreated:l}=i;return l&&Ei(e,()=>l({transition:c,from:t,to:r})),a})}const PP=new q("");let Pg=(()=>{class e{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new Xe,this.transitionAbortSubject=new Xe,this.configLoader=O(pE),this.environmentInjector=O(Tn),this.urlSerializer=O(kc),this.rootContexts=O(pd),this.location=O(gu),this.inputBindingEnabled=null!==O(Ag,{optional:!0}),this.titleStrategy=O(MP),this.options=O(jc,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=O(gE),this.createViewTransition=O(OP,{optional:!0}),this.navigationErrorHandler=O(PP,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>fe(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=s=>this.events.next(new Fee(s)),this.configLoader.onLoadStartListener=s=>this.events.next(new Lee(s))}complete(){this.transitions?.complete()}handleNavigationRequest(r){const i=++this.navigationId;this.transitions?.next({...this.transitions.value,...r,id:i})}setupNavigations(r,i,s){return this.transitions=new Jn({id:0,currentUrlTree:i,currentRawUrl:i,extractedUrl:this.urlHandlingStrategy.extract(i),urlAfterRedirects:this.urlHandlingStrategy.extract(i),rawUrl:i,extras:{},resolve:()=>{},reject:()=>{},promise:Promise.resolve(!0),source:dd,restoredState:null,currentSnapshot:s.snapshot,targetSnapshot:null,currentRouterState:s,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(Zi(o=>0!==o.id),Ve(o=>({...o,extractedUrl:this.urlHandlingStrategy.extract(o.rawUrl)})),di(o=>{let a=!1,c=!1;return fe(o).pipe(di(l=>{if(this.navigationId>o.id)return this.cancelNavigationTransition(o,"",Kn.SupersededByNewNavigation),ui;this.currentTransition=o,this.currentNavigation={id:l.id,initialUrl:l.rawUrl,extractedUrl:l.extractedUrl,targetBrowserUrl:"string"==typeof l.extras.browserUrl?this.urlSerializer.parse(l.extras.browserUrl):l.extras.browserUrl,trigger:l.source,extras:l.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null};const u=!r.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl();if(!u&&"reload"!==(l.extras.onSameUrlNavigation??r.onSameUrlNavigation)){const f="";return this.events.next(new Pc(l.id,this.urlSerializer.serialize(l.rawUrl),f,Sg.IgnoredSameUrlNavigation)),l.resolve(!1),ui}if(this.urlHandlingStrategy.shouldProcessUrl(l.rawUrl))return fe(l).pipe(di(f=>{const h=this.transitions?.getValue();return this.events.next(new fd(f.id,this.urlSerializer.serialize(f.extractedUrl),f.source,f.restoredState)),h!==this.transitions?.getValue()?ui:Promise.resolve(f)}),function Bte(e,t,r,i,s,o){return un(a=>function Ote(e,t,r,i,s,o,a="emptyOnly"){return new Pte(e,t,r,i,s,a,o).recognize()}(e,t,r,i,a.extractedUrl,s,o).pipe(Ve(({state:c,tree:l})=>({...a,targetSnapshot:c,urlAfterRedirects:l}))))}(this.environmentInjector,this.configLoader,this.rootComponentType,r.config,this.urlSerializer,this.paramsInheritanceStrategy),Cn(f=>{o.targetSnapshot=f.targetSnapshot,o.urlAfterRedirects=f.urlAfterRedirects,this.currentNavigation={...this.currentNavigation,finalUrl:f.urlAfterRedirects};const h=new lP(f.id,this.urlSerializer.serialize(f.extractedUrl),this.urlSerializer.serialize(f.urlAfterRedirects),f.targetSnapshot);this.events.next(h)}));if(u&&this.urlHandlingStrategy.shouldProcessUrl(l.currentRawUrl)){const{id:f,extractedUrl:h,source:p,restoredState:g,extras:m}=l,y=new fd(f,this.urlSerializer.serialize(h),p,g);this.events.next(y);const _=hP(this.rootComponentType).snapshot;return this.currentTransition=o={...l,targetSnapshot:_,urlAfterRedirects:h,extras:{...m,skipLocationChange:!1,replaceUrl:!1}},this.currentNavigation.finalUrl=h,fe(o)}{const f="";return this.events.next(new Pc(l.id,this.urlSerializer.serialize(l.extractedUrl),f,Sg.IgnoredByUrlHandlingStrategy)),l.resolve(!1),ui}}),Cn(l=>{const u=new Ree(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(u)}),Ve(l=>(this.currentTransition=o={...l,guards:tte(l.targetSnapshot,l.currentSnapshot,this.rootContexts)},o)),function fte(e,t){return un(r=>{const{targetSnapshot:i,currentSnapshot:s,guards:{canActivateChecks:o,canDeactivateChecks:a}}=r;return 0===a.length&&0===o.length?fe({...r,guardsResult:!0}):function hte(e,t,r,i){return qt(e).pipe(un(s=>function _te(e,t,r,i,s){const o=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return o&&0!==o.length?fe(o.map(c=>{const l=hd(t)??s,u=Bc(c,l);return Us(function lte(e){return e&&vd(e.canDeactivate)}(u)?u.canDeactivate(e,t,r,i):Ei(l,()=>u(e,t,r,i))).pipe(Vs())})).pipe(Vc()):fe(!0)}(s.component,s.route,r,t,i)),Vs(s=>!0!==s,!0))}(a,i,s,e).pipe(un(c=>c&&function ste(e){return"boolean"==typeof e}(c)?function pte(e,t,r,i){return qt(t).pipe(sd(s=>Gb(function mte(e,t){return null!==e&&t&&t(new Bee(e)),fe(!0)}(s.route.parent,i),function gte(e,t){return null!==e&&t&&t(new Uee(e)),fe(!0)}(s.route,i),function vte(e,t,r){const i=t[t.length-1],o=t.slice(0,t.length-1).reverse().map(a=>function nte(e){const t=e.routeConfig?e.routeConfig.canActivateChild:null;return t&&0!==t.length?{node:e,guards:t}:null}(a)).filter(a=>null!==a).map(a=>j2(()=>fe(a.guards.map(l=>{const u=hd(a.node)??r,d=Bc(l,u);return Us(function cte(e){return e&&vd(e.canActivateChild)}(d)?d.canActivateChild(i,e):Ei(u,()=>d(i,e))).pipe(Vs())})).pipe(Vc())));return fe(o).pipe(Vc())}(e,s.path,r),function yte(e,t,r){const i=t.routeConfig?t.routeConfig.canActivate:null;if(!i||0===i.length)return fe(!0);const s=i.map(o=>j2(()=>{const a=hd(t)??r,c=Bc(o,a);return Us(function ate(e){return e&&vd(e.canActivate)}(c)?c.canActivate(t,e):Ei(a,()=>c(t,e))).pipe(Vs())}));return fe(s).pipe(Vc())}(e,s.route,r))),Vs(s=>!0!==s,!0))}(i,o,e,t):fe(c)),Ve(c=>({...r,guardsResult:c})))})}(this.environmentInjector,l=>this.events.next(l)),Cn(l=>{if(o.guardsResult=l.guardsResult,l.guardsResult&&"boolean"!=typeof l.guardsResult)throw Mg(0,l.guardsResult);const u=new Oee(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot,!!l.guardsResult);this.events.next(u)}),Zi(l=>!!l.guardsResult||(this.cancelNavigationTransition(l,"",Kn.GuardRejected),!1)),fE(l=>{if(l.guards.canActivateChecks.length)return fe(l).pipe(Cn(u=>{const d=new kee(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(d)}),di(u=>{let d=!1;return fe(u).pipe(function Vte(e,t){return un(r=>{const{targetSnapshot:i,guards:{canActivateChecks:s}}=r;if(!s.length)return fe(r);const o=new Set(s.map(l=>l.route)),a=new Set;for(const l of o)if(!a.has(l))for(const u of AP(l))a.add(u);let c=0;return qt(a).pipe(sd(l=>o.has(l)?function Ute(e,t,r,i){const s=e.routeConfig,o=e._resolve;return void 0!==s?.title&&!mP(s)&&(o[od]=s.title),function jte(e,t,r,i){const s=Kb(e);if(0===s.length)return fe({});const o={};return qt(s).pipe(un(a=>function $te(e,t,r,i){const s=hd(t)??i,o=Bc(e,s);return Us(o.resolve?o.resolve(t,r):Ei(s,()=>o(t,r)))}(e[a],t,r,i).pipe(Vs(),Cn(c=>{if(c instanceof lE)throw Mg(new _g,c);o[a]=c}))),Zb(1),function nee(e){return Ve(()=>e)}(o),Bs(a=>EP(a)?ui:Nc(a)))}(o,e,t,i).pipe(Ve(a=>(e._resolvedData=a,e.data=Tg(e,e.parent,r).resolve,null)))}(l,i,e,t):(l.data=Tg(l,l.parent,e).resolve,fe(void 0))),Cn(()=>c++),Zb(1),un(l=>c===a.size?fe(r):ui))})}(this.paramsInheritanceStrategy,this.environmentInjector),Cn({next:()=>d=!0,complete:()=>{d||this.cancelNavigationTransition(u,"",Kn.NoDataFromResolver)}}))}),Cn(u=>{const d=new Pee(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(d)}))}),fE(l=>{const u=d=>{const f=[];d.routeConfig?.loadComponent&&!d.routeConfig._loadedComponent&&f.push(this.configLoader.loadComponent(d.routeConfig).pipe(Cn(h=>{d.component=h}),Ve(()=>{})));for(const h of d.children)f.push(...u(h));return f};return qb(u(l.targetSnapshot.root)).pipe(yg(null),Rc(1))}),fE(()=>this.afterPreactivation()),di(()=>{const{currentSnapshot:l,targetSnapshot:u}=o,d=this.createViewTransition?.(this.environmentInjector,l.root,u.root);return d?qt(d).pipe(Ve(()=>o)):fe(o)}),Ve(l=>{const u=function Kee(e,t,r){const i=gd(e,t._root,r?r._root:void 0);return new fP(i,t)}(r.routeReuseStrategy,l.targetSnapshot,l.currentRouterState);return this.currentTransition=o={...l,targetRouterState:u},this.currentNavigation.targetRouterState=u,o}),Cn(()=>{this.events.next(new tE)}),((e,t,r,i)=>Ve(s=>(new ete(t,s.targetRouterState,s.currentRouterState,r,i).activate(e),s)))(this.rootContexts,r.routeReuseStrategy,l=>this.events.next(l),this.inputBindingEnabled),Rc(1),Cn({next:l=>{a=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new Ki(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects))),this.titleStrategy?.updateTitle(l.targetRouterState.snapshot),l.resolve(!0)},complete:()=>{a=!0}}),function ree(e){return $t((t,r)=>{Or(e).subscribe(Ct(r,()=>r.complete(),mm)),!r.closed&&t.subscribe(r)})}(this.transitionAbortSubject.pipe(Cn(l=>{throw l}))),td(()=>{!a&&!c&&this.cancelNavigationTransition(o,"",Kn.SupersededByNewNavigation),this.currentTransition?.id===o.id&&(this.currentNavigation=null,this.currentTransition=null)}),Bs(l=>{if(c=!0,wP(l))this.events.next(new Ho(o.id,this.urlSerializer.serialize(o.extractedUrl),l.message,l.cancellationCode)),function Jee(e){return wP(e)&&$o(e.url)}(l)?this.events.next(new Ig(l.url,l.navigationBehaviorOptions)):o.resolve(!1);else{const u=new eE(o.id,this.urlSerializer.serialize(o.extractedUrl),l,o.targetSnapshot??void 0);try{const d=Ei(this.environmentInjector,()=>this.navigationErrorHandler?.(u));if(d instanceof lE){const{message:f,cancellationCode:h}=Mg(0,d);this.events.next(new Ho(o.id,this.urlSerializer.serialize(o.extractedUrl),f,h)),this.events.next(new Ig(d.redirectTo,d.navigationBehaviorOptions))}else{this.events.next(u);const f=r.errorHandler(l);o.resolve(!!f)}}catch(d){this.options.resolveNavigationPromiseOnError?o.resolve(!1):o.reject(d)}}return ui}))}))}cancelNavigationTransition(r,i,s){const o=new Ho(r.id,this.urlSerializer.serialize(r.extractedUrl),i,s);this.events.next(o),r.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){const r=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),i=this.currentNavigation?.targetBrowserUrl??this.currentNavigation?.extractedUrl;return r.toString()!==i?.toString()&&!this.currentNavigation?.extras.skipLocationChange}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function Kte(e){return e!==dd}let Qte=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=H({token:e,factory:()=>O(Jte),providedIn:"root"})}}return e})();class Yte{shouldDetach(t){return!1}store(t,r){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,r){return t.routeConfig===r.routeConfig}}let Jte=(()=>{class e extends Yte{static{this.\u0275fac=(()=>{let r;return function(s){return(r||(r=zt(e)))(s||e)}})()}static{this.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),LP=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=H({token:e,factory:()=>O(Xte),providedIn:"root"})}}return e})(),Xte=(()=>{class e extends LP{constructor(){super(...arguments),this.location=O(gu),this.urlSerializer=O(kc),this.options=O(jc,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=O(gE),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new Uo,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=hP(null),this.stateMemento=this.createStateMemento()}getCurrentUrlTree(){return this.currentUrlTree}getRawUrlTree(){return this.rawUrlTree}restoredState(){return this.location.getState()}get browserPageId(){return"computed"!==this.canceledNavigationResolution?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}getRouterState(){return this.routerState}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(r){return this.location.subscribe(i=>{"popstate"===i.type&&r(i.url,i.state)})}handleRouterEvent(r,i){if(r instanceof fd)this.stateMemento=this.createStateMemento();else if(r instanceof Pc)this.rawUrlTree=i.initialUrl;else if(r instanceof lP){if("eager"===this.urlUpdateStrategy&&!i.extras.skipLocationChange){const s=this.urlHandlingStrategy.merge(i.finalUrl,i.initialUrl);this.setBrowserUrl(i.targetBrowserUrl??s,i)}}else r instanceof tE?(this.currentUrlTree=i.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(i.finalUrl,i.initialUrl),this.routerState=i.targetRouterState,"deferred"===this.urlUpdateStrategy&&!i.extras.skipLocationChange&&this.setBrowserUrl(i.targetBrowserUrl??this.rawUrlTree,i)):r instanceof Ho&&(r.code===Kn.GuardRejected||r.code===Kn.NoDataFromResolver)?this.restoreHistory(i):r instanceof eE?this.restoreHistory(i,!0):r instanceof Ki&&(this.lastSuccessfulId=r.id,this.currentPageId=this.browserPageId)}setBrowserUrl(r,i){const s=r instanceof Uo?this.urlSerializer.serialize(r):r;if(this.location.isCurrentPathEqualTo(s)||i.extras.replaceUrl){const a={...i.extras.state,...this.generateNgRouterState(i.id,this.browserPageId)};this.location.replaceState(s,"",a)}else{const o={...i.extras.state,...this.generateNgRouterState(i.id,this.browserPageId+1)};this.location.go(s,"",o)}}restoreHistory(r,i=!1){if("computed"===this.canceledNavigationResolution){const o=this.currentPageId-this.browserPageId;0!==o?this.location.historyGo(o):this.currentUrlTree===r.finalUrl&&0===o&&(this.resetState(r),this.resetUrlToCurrentUrlTree())}else"replace"===this.canceledNavigationResolution&&(i&&this.resetState(r),this.resetUrlToCurrentUrlTree())}resetState(r){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,r.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(r,i){return"computed"===this.canceledNavigationResolution?{navigationId:r,\u0275routerPageId:i}:{navigationId:r}}static{this.\u0275fac=(()=>{let r;return function(s){return(r||(r=zt(e)))(s||e)}})()}static{this.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var _d=function(e){return e[e.COMPLETE=0]="COMPLETE",e[e.FAILED=1]="FAILED",e[e.REDIRECTING=2]="REDIRECTING",e}(_d||{});function FP(e,t){e.events.pipe(Zi(r=>r instanceof Ki||r instanceof Ho||r instanceof eE||r instanceof Pc),Ve(r=>r instanceof Ki||r instanceof Pc?_d.COMPLETE:r instanceof Ho&&(r.code===Kn.Redirect||r.code===Kn.SupersededByNewNavigation)?_d.REDIRECTING:_d.FAILED),Zi(r=>r!==_d.REDIRECTING),Rc(1)).subscribe(()=>{t()})}function ene(e){throw e}const tne={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},nne={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let pi=(()=>{class e{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}constructor(){this.disposed=!1,this.console=O(WA),this.stateManager=O(LP),this.options=O(jc,{optional:!0})||{},this.pendingTasks=O(ro),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=O(Pg),this.urlSerializer=O(kc),this.location=O(gu),this.urlHandlingStrategy=O(gE),this._events=new Xe,this.errorHandler=this.options.errorHandler||ene,this.navigated=!1,this.routeReuseStrategy=O(Qte),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=O($c,{optional:!0})?.flat()??[],this.componentInputBindingEnabled=!!O(Ag,{optional:!0}),this.eventsSubscription=new Et,this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:r=>{this.console.warn(r)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){const r=this.navigationTransitions.events.subscribe(i=>{try{const s=this.navigationTransitions.currentTransition,o=this.navigationTransitions.currentNavigation;if(null!==s&&null!==o)if(this.stateManager.handleRouterEvent(i,o),i instanceof Ho&&i.code!==Kn.Redirect&&i.code!==Kn.SupersededByNewNavigation)this.navigated=!0;else if(i instanceof Ki)this.navigated=!0;else if(i instanceof Ig){const a=i.navigationBehaviorOptions,c=this.urlHandlingStrategy.merge(i.url,s.currentRawUrl),l={browserUrl:s.extras.browserUrl,info:s.extras.info,skipLocationChange:s.extras.skipLocationChange,replaceUrl:s.extras.replaceUrl||"eager"===this.urlUpdateStrategy||Kte(s.source),...a};this.scheduleNavigation(c,dd,null,l,{resolve:s.resolve,reject:s.reject,promise:s.promise})}(function ine(e){return!(e instanceof tE||e instanceof Ig)})(i)&&this._events.next(i)}catch(s){this.navigationTransitions.transitionAbortSubject.next(s)}});this.eventsSubscription.add(r)}resetRootComponentType(r){this.routerState.root.component=r,this.navigationTransitions.rootComponentType=r}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),dd,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((r,i)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(r,"popstate",i)},0)})}navigateToSyncWithBrowser(r,i,s){const o={replaceUrl:!0},a=s?.navigationId?s:null;if(s){const l={...s};delete l.navigationId,delete l.\u0275routerPageId,0!==Object.keys(l).length&&(o.state=l)}const c=this.parseUrl(r);this.scheduleNavigation(c,i,a,o)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(r){this.config=r.map(hE),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(r,i={}){const{relativeTo:s,queryParams:o,fragment:a,queryParamsHandling:c,preserveFragment:l}=i,u=l?this.currentUrlTree.fragment:a;let f,d=null;switch(c??this.options.defaultQueryParamsHandling){case"merge":d={...this.currentUrlTree.queryParams,...o};break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=o||null}null!==d&&(d=this.removeEmptyProps(d));try{f=nP(s?s.snapshot:this.routerState.snapshot.root)}catch{("string"!=typeof r[0]||"/"!==r[0][0])&&(r=[]),f=this.currentUrlTree.root}return rP(f,r,d,u??null)}navigateByUrl(r,i={skipLocationChange:!1}){const s=$o(r)?r:this.parseUrl(r),o=this.urlHandlingStrategy.merge(s,this.rawUrlTree);return this.scheduleNavigation(o,dd,null,i)}navigate(r,i={skipLocationChange:!1}){return function rne(e){for(let t=0;t(null!=o&&(i[s]=o),i),{})}scheduleNavigation(r,i,s,o,a){if(this.disposed)return Promise.resolve(!1);let c,l,u;a?(c=a.resolve,l=a.reject,u=a.promise):u=new Promise((f,h)=>{c=f,l=h});const d=this.pendingTasks.add();return FP(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(d))}),this.navigationTransitions.handleNavigationRequest({source:i,restoredState:s,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:r,extras:o,resolve:c,reject:l,promise:u,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),u.catch(f=>Promise.reject(f))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();class BP{}let ane=(()=>{class e{constructor(r,i,s,o,a){this.router=r,this.injector=s,this.preloadingStrategy=o,this.loader=a}setUpPreloading(){this.subscription=this.router.events.pipe(Zi(r=>r instanceof Ki),sd(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(r,i){const s=[];for(const o of i){o.providers&&!o._injector&&(o._injector=dh(o.providers,r,`Route: ${o.path}`));const a=o._injector??r,c=o._loadedInjector??a;(o.loadChildren&&!o._loadedRoutes&&void 0===o.canLoad||o.loadComponent&&!o._loadedComponent)&&s.push(this.preloadConfig(a,o)),(o.children||o._loadedRoutes)&&s.push(this.processRoutes(c,o.children??o._loadedRoutes))}return qt(s).pipe(id())}preloadConfig(r,i){return this.preloadingStrategy.preload(i,()=>{let s;s=i.loadChildren&&void 0===i.canLoad?this.loader.loadChildren(r,i):fe(null);const o=s.pipe(un(a=>null===a?fe(void 0):(i._loadedRoutes=a.routes,i._loadedInjector=a.injector,this.processRoutes(a.injector??r,a.routes))));return i.loadComponent&&!i._loadedComponent?qt([o,this.loader.loadComponent(i)]).pipe(id()):o})}static{this.\u0275fac=function(i){return new(i||e)(Z(pi),Z(iM),Z(Tn),Z(BP),Z(pE))}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const yE=new q("");let VP=(()=>{class e{constructor(r,i,s,o,a={}){this.urlSerializer=r,this.transitions=i,this.viewportScroller=s,this.zone=o,this.options=a,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},a.scrollPositionRestoration||="disabled",a.anchorScrolling||="disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(r=>{r instanceof fd?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=r.navigationTrigger,this.restoredId=r.restoredState?r.restoredState.navigationId:0):r instanceof Ki?(this.lastId=r.id,this.scheduleScrollEvent(r,this.urlSerializer.parse(r.urlAfterRedirects).fragment)):r instanceof Pc&&r.code===Sg.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(r,this.urlSerializer.parse(r.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(r=>{r instanceof uP&&(r.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(r.position):r.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(r.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(r,i){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new uP(r,"popstate"===this.lastSource?this.store[this.restoredId]:null,i))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static{this.\u0275fac=function(i){!function jI(){throw new Error("invalid")}()}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac})}}return e})();function gi(e,t){return{\u0275kind:e,\u0275providers:t}}function jP(){const e=O(It);return t=>{const r=e.get(ar);if(t!==r.components[0])return;const i=e.get(pi),s=e.get($P);1===e.get(vE)&&i.initialNavigation(),e.get(HP,null,Ie.Optional)?.setUpPreloading(),e.get(yE,null,Ie.Optional)?.init(),i.resetRootComponentType(r.componentTypes[0]),s.closed||(s.next(),s.complete(),s.unsubscribe())}}const $P=new q("",{factory:()=>new Xe}),vE=new q("",{providedIn:"root",factory:()=>1}),HP=new q("");function dne(e){return gi(0,[{provide:HP,useExisting:ane},{provide:BP,useExisting:e}])}function hne(e){return gi(9,[{provide:OP,useValue:Wte},{provide:kP,useValue:{skipNextTransition:!!e?.skipInitialTransition,...e}}])}const zP=new q("ROUTER_FORROOT_GUARD"),pne=[gu,{provide:kc,useClass:_g},pi,pd,{provide:Fc,useFactory:function UP(e){return e.routerState.root},deps:[pi]},pE,[]];let qP=(()=>{class e{constructor(r){}static forRoot(r,i){return{ngModule:e,providers:[pne,[],{provide:$c,multi:!0,useValue:r},{provide:zP,useFactory:vne,deps:[[pi,new Jd,new Xd]]},{provide:jc,useValue:i||{}},i?.useHash?{provide:wo,useClass:n7}:{provide:wo,useClass:QM},{provide:yE,useFactory:()=>{const e=O(w9),t=O(Ne),r=O(jc),i=O(Pg),s=O(kc);return r.scrollOffset&&e.setOffset(r.scrollOffset),new VP(s,i,e,t,r)}},i?.preloadingStrategy?dne(i.preloadingStrategy).\u0275providers:[],i?.initialNavigation?_ne(i):[],i?.bindToComponentInputs?gi(8,[yP,{provide:Ag,useExisting:yP}]).\u0275providers:[],i?.enableViewTransitions?hne().\u0275providers:[],[{provide:GP,useFactory:jP},{provide:Ph,multi:!0,useExisting:GP}]]}}static forChild(r){return{ngModule:e,providers:[{provide:$c,multi:!0,useValue:r}]}}static{this.\u0275fac=function(i){return new(i||e)(Z(zP,8))}}static{this.\u0275mod=Ht({type:e})}static{this.\u0275inj=Nt({})}}return e})();function vne(e){return"guarded"}function _ne(e){return["disabled"===e.initialNavigation?gi(3,[{provide:O0,multi:!0,useFactory:()=>{const t=O(pi);return()=>{t.setUpLocationChangeListener()}}},{provide:vE,useValue:2}]).\u0275providers:[],"enabledBlocking"===e.initialNavigation?gi(2,[{provide:vE,useValue:0},{provide:O0,multi:!0,deps:[It],useFactory:t=>{const r=t.get(e7,Promise.resolve());return()=>r.then(()=>new Promise(i=>{const s=t.get(pi),o=t.get($P);FP(s,()=>{i(!0)}),t.get(Pg).afterPreactivation=()=>(i(!0),o.closed?fe(void 0):o),s.initialNavigation()}))}}]).\u0275providers:[]]}const GP=new q("");var Qi=function(e){return e.STRANGE="STRANGE",e.YOU="YOU",e}(Qi||{}),mi=function(e){return e.CONNECTED="CONNECTED",e.UP_TO_DISCONNECT="UP_TO_DISCONNECT",e.DISCONNECTED="DISCONNECTED",e.SEARCHING_STRANGER="SEARCHING_STRANGER",e}(mi||{});const bne=["modalContainer"];function Ene(e,t){}class wd{static{this.modalInjectSubject=new Xe}static{this.modalInject$=wd.modalInjectSubject.asObservable()}constructor(t){this.component=t,this.injectData=null,this.cssClasses=[],this.outletName="default",this.subscription=new Et}setData(t){return this.injectData=t,this}setBindToRoute(t){return this.router=t,this}setRootCssClasses(t){return this.cssClasses=t,this}setOutletName(t){return this.outletName=t,this}build(){const t=new Xe,r=this.injectData,i=this.component,s=this.outletName;return this.router?(this.subscription.add(this.router.events.pipe(Zi(o=>o instanceof fd)).pipe(Vs()).subscribe(()=>{t.closed||t.complete()})),this.subscription.add(t.subscribe({complete:()=>this.subscription.unsubscribe()}))):console.warn(`Component "${i.name}" served as modal was not associated with the route and will not be automatically removed if the route is changed`),wd.modalInjectSubject.next({component:i,data:r,outletName:s,cssClasses:this.cssClasses,response:t}),t.asObservable()}}let WP=(()=>{class e{createModal(r){return new wd(r)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac})}}return e})(),Cne=(()=>{class e{constructor(r){this.ngZone=r,this.modalInject$=wd.modalInject$,this.classes=[],this.isOpen=!1,this.content=null,this.subscriptions=new Et,this.container=null,this.display="none",this.showingDisplay="block",this.name="default",this.opened=new dt,this.closed=new dt}ngOnInit(){this.listenModalInjection()}listenModalInjection(){this.subscriptions.add(this.modalInject$.subscribe({next:r=>this.renderModal(r)}))}renderModal(r){r.outletName===this.name&&setTimeout(()=>{this.open(),this.openModal(r)})}open(){this.ngZone.run(()=>{this.isOpen=!0,this.display=this.showingDisplay,this.opened.emit()})}close(){this.ngZone.run(()=>{this.isOpen=!1,this.display="none",this.closed.emit()})}getClasses(r){return(r=r||[]).concat(this.classes).join(" ")}openModal(r){const i=this.container;if(!i)return void console.error("Impossible to create modal: the this.container attribute is empty");i.clear();const s=this.content=i.createComponent(r.component).instance;this.classes=r.cssClasses,s?(s.response=r.response,s.onInjectData&&s.onInjectData(r.data||null),r.response.subscribe({error:this.closeModal.bind(this),complete:this.closeModal.bind(this)})):console.error(`Could not create component ${r.component.name} inside modal container.`)}closeModal(r){const i=this.container;i?setTimeout(()=>{i.clear(),this.close(),this.content?.response.complete()}):console.error("Impossible to create modal: the this.container attribute is empty",r)}ngOnDestroy(){this.subscriptions.unsubscribe()}static{this.\u0275fac=function(i){return new(i||e)(k(Ne))}}static{this.\u0275cmp=ns({type:e,selectors:[["modal-outlet"]],viewQuery:function(i,s){if(1&i&&_0(bne,5,rr),2&i){let o;Th(o=xh())&&(s.container=o.first)}},hostVars:2,hostBindings:function(i,s){2&i&&yo("display",s.display)},inputs:{showingDisplay:"showingDisplay",name:"name"},outputs:{opened:"opened",closed:"closed"},decls:2,vars:0,consts:[["modalContainer",""]],template:function(i,s){1&i&&sr(0,Ene,0,0,"ng-template",null,0,NA)},encapsulation:2})}}return e})(),Dne=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=Ht({type:e})}static{this.\u0275inj=Nt({providers:[WP]})}}return e})();class Sne{close(){this.response.complete()}}const dn=new q(""),$s=new q("");function sL(e){return null!=e}function oL(e){return cu(e)?qt(e):e}function aL(e){let t={};return e.forEach(r=>{t=null!=r?{...t,...r}:t}),0===Object.keys(t).length?null:t}function cL(e,t){return t.map(r=>r(e))}function lL(e){return e.map(t=>function Rne(e){return!e.validate}(t)?t:r=>t.validate(r))}function wE(e){return null!=e?function uL(e){if(!e)return null;const t=e.filter(sL);return 0==t.length?null:function(r){return aL(cL(r,t))}}(lL(e)):null}function bE(e){return null!=e?function dL(e){if(!e)return null;const t=e.filter(sL);return 0==t.length?null:function(r){return function Ine(...e){const t=L2(e),{args:r,keys:i}=F2(e),s=new jt(o=>{const{length:a}=r;if(!a)return void o.complete();const c=new Array(a);let l=a,u=a;for(let d=0;d{f||(f=!0,u--),c[d]=h},()=>l--,void 0,()=>{(!l||!f)&&(u||o.next(i?V2(i,c):c),o.complete())}))}});return t?s.pipe(B2(t)):s}(cL(r,t).map(oL)).pipe(Ve(aL))}}(lL(e)):null}function fL(e,t){return null===e?[t]:Array.isArray(e)?[...e,t]:[e,t]}function EE(e){return e?Array.isArray(e)?e:[e]:[]}function Fg(e,t){return Array.isArray(e)?e.includes(t):e===t}function gL(e,t){const r=EE(t);return EE(e).forEach(s=>{Fg(r,s)||r.push(s)}),r}function mL(e,t){return EE(t).filter(r=>!Fg(e,r))}class yL{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=wE(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=bE(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control&&this.control.reset(t)}hasError(t,r){return!!this.control&&this.control.hasError(t,r)}getError(t,r){return this.control?this.control.getError(t,r):null}}class Dn extends yL{get formDirective(){return null}get path(){return null}}class vL{constructor(t){this._cd=t}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}}let _L=(()=>{class e extends vL{constructor(r){super(r)}static{this.\u0275fac=function(i){return new(i||e)(k(Dn,10))}}static{this.\u0275dir=de({type:e,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,s){2&i&&Ql("ng-untouched",s.isUntouched)("ng-touched",s.isTouched)("ng-pristine",s.isPristine)("ng-dirty",s.isDirty)("ng-valid",s.isValid)("ng-invalid",s.isInvalid)("ng-pending",s.isPending)("ng-submitted",s.isSubmitted)},features:[Ue]})}}return e})();const bd="VALID",Vg="INVALID",Hc="PENDING",Ed="DISABLED";class zc{}class bL extends zc{constructor(t,r){super(),this.value=t,this.source=r}}class SE extends zc{constructor(t,r){super(),this.pristine=t,this.source=r}}class IE extends zc{constructor(t,r){super(),this.touched=t,this.source=r}}class Ug extends zc{constructor(t,r){super(),this.status=t,this.source=r}}function jg(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}class AE{constructor(t,r){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=null,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this._status=pu(()=>this.statusReactive()),this.statusReactive=Wr(void 0),this._pristine=pu(()=>this.pristineReactive()),this.pristineReactive=Wr(!0),this._touched=pu(()=>this.touchedReactive()),this.touchedReactive=Wr(!1),this._events=new Xe,this.events=this._events.asObservable(),this._onDisabledChange=[],this._assignValidators(t),this._assignAsyncValidators(r)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get status(){return Jr(this.statusReactive)}set status(t){Jr(()=>this.statusReactive.set(t))}get valid(){return this.status===bd}get invalid(){return this.status===Vg}get pending(){return this.status==Hc}get disabled(){return this.status===Ed}get enabled(){return this.status!==Ed}get pristine(){return Jr(this.pristineReactive)}set pristine(t){Jr(()=>this.pristineReactive.set(t))}get dirty(){return!this.pristine}get touched(){return Jr(this.touchedReactive)}set touched(t){Jr(()=>this.touchedReactive.set(t))}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(gL(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(gL(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(mL(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(mL(t,this._rawAsyncValidators))}hasValidator(t){return Fg(this._rawValidators,t)}hasAsyncValidator(t){return Fg(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){const r=!1===this.touched;this.touched=!0;const i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsTouched({...t,sourceControl:i}),r&&!1!==t.emitEvent&&this._events.next(new IE(!0,i))}markAllAsTouched(t={}){this.markAsTouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(r=>r.markAllAsTouched(t))}markAsUntouched(t={}){const r=!0===this.touched;this.touched=!1,this._pendingTouched=!1;const i=t.sourceControl??this;this._forEachChild(s=>{s.markAsUntouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:i})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,i),r&&!1!==t.emitEvent&&this._events.next(new IE(!1,i))}markAsDirty(t={}){const r=!0===this.pristine;this.pristine=!1;const i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsDirty({...t,sourceControl:i}),r&&!1!==t.emitEvent&&this._events.next(new SE(!1,i))}markAsPristine(t={}){const r=!1===this.pristine;this.pristine=!0,this._pendingDirty=!1;const i=t.sourceControl??this;this._forEachChild(s=>{s.markAsPristine({onlySelf:!0,emitEvent:t.emitEvent})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t,i),r&&!1!==t.emitEvent&&this._events.next(new SE(!0,i))}markAsPending(t={}){this.status=Hc;const r=t.sourceControl??this;!1!==t.emitEvent&&(this._events.next(new Ug(this.status,r)),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.markAsPending({...t,sourceControl:r})}disable(t={}){const r=this._parentMarkedDirty(t.onlySelf);this.status=Ed,this.errors=null,this._forEachChild(s=>{s.disable({...t,onlySelf:!0})}),this._updateValue();const i=t.sourceControl??this;!1!==t.emitEvent&&(this._events.next(new bL(this.value,i)),this._events.next(new Ug(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...t,skipPristineCheck:r},this),this._onDisabledChange.forEach(s=>s(!0))}enable(t={}){const r=this._parentMarkedDirty(t.onlySelf);this.status=bd,this._forEachChild(i=>{i.enable({...t,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors({...t,skipPristineCheck:r},this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(t,r){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine({},r),this._parent._updateTouched({},r))}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){const i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===bd||this.status===Hc)&&this._runAsyncValidator(i,t.emitEvent)}const r=t.sourceControl??this;!1!==t.emitEvent&&(this._events.next(new bL(this.value,r)),this._events.next(new Ug(this.status,r)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity({...t,sourceControl:r})}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(r=>r._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Ed:bd}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,r){if(this.asyncValidator){this.status=Hc,this._hasOwnPendingAsyncValidator={emitEvent:!1!==r};const i=oL(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(s=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(s,{emitEvent:r,shouldHaveEmitted:t})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();const t=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,t}return!1}setErrors(t,r={}){this.errors=t,this._updateControlsErrors(!1!==r.emitEvent,this,r.shouldHaveEmitted)}get(t){let r=t;return null==r||(Array.isArray(r)||(r=r.split(".")),0===r.length)?null:r.reduce((i,s)=>i&&i._find(s),this)}getError(t,r){const i=r?this.get(r):this;return i&&i.errors?i.errors[t]:null}hasError(t,r){return!!this.getError(t,r)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,r,i){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||i)&&this._events.next(new Ug(this.status,r)),this._parent&&this._parent._updateControlsErrors(t,r,i)}_initObservables(){this.valueChanges=new dt,this.statusChanges=new dt}_calculateStatus(){return this._allControlsDisabled()?Ed:this.errors?Vg:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Hc)?Hc:this._anyControlsHaveStatus(Vg)?Vg:bd}_anyControlsHaveStatus(t){return this._anyControls(r=>r.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,r){const i=!this._anyControlsDirty(),s=this.pristine!==i;this.pristine=i,this._parent&&!t.onlySelf&&this._parent._updatePristine(t,r),s&&this._events.next(new SE(this.pristine,r))}_updateTouched(t={},r){this.touched=this._anyControlsTouched(),this._events.next(new IE(this.touched,r)),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,r)}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){jg(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){return!t&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=function Une(e){return Array.isArray(e)?wE(e):e||null}(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=function jne(e){return Array.isArray(e)?bE(e):e||null}(this._rawAsyncValidators)}}class ME extends AE{constructor(t,r,i){super(function TE(e){return(jg(e)?e.validators:e)||null}(r),function xE(e,t){return(jg(t)?t.asyncValidators:e)||null}(i,r)),this.controls=t,this._initObservables(),this._setUpdateStrategy(r),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(t,r){return this.controls[t]?this.controls[t]:(this.controls[t]=r,r.setParent(this),r._registerOnCollectionChange(this._onCollectionChange),r)}addControl(t,r,i={}){this.registerControl(t,r),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(t,r={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}setControl(t,r,i={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],r&&this.registerControl(t,r),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,r={}){(function CL(e,t,r){e._forEachChild((i,s)=>{if(void 0===r[s])throw new A(1002,"")})})(this,0,t),Object.keys(t).forEach(i=>{(function EL(e,t,r){const i=e.controls;if(!(t?Object.keys(i):i).length)throw new A(1e3,"");if(!i[r])throw new A(1001,"")})(this,!0,i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:r.emitEvent})}),this.updateValueAndValidity(r)}patchValue(t,r={}){null!=t&&(Object.keys(t).forEach(i=>{const s=this.controls[i];s&&s.patchValue(t[i],{onlySelf:!0,emitEvent:r.emitEvent})}),this.updateValueAndValidity(r))}reset(t={},r={}){this._forEachChild((i,s)=>{i.reset(t?t[s]:null,{onlySelf:!0,emitEvent:r.emitEvent})}),this._updatePristine(r,this),this._updateTouched(r,this),this.updateValueAndValidity(r)}getRawValue(){return this._reduceChildren({},(t,r,i)=>(t[i]=r.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(r,i)=>!!i._syncPendingControls()||r);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(r=>{const i=this.controls[r];i&&t(i,r)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(const[r,i]of Object.entries(this.controls))if(this.contains(r)&&t(i))return!0;return!1}_reduceValue(){return this._reduceChildren({},(r,i,s)=>((i.enabled||this.disabled)&&(r[s]=i.value),r))}_reduceChildren(t,r){let i=t;return this._forEachChild((s,o)=>{i=r(i,s,o)}),i}_allControlsDisabled(){for(const t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}}const qc=new q("CallSetDisabledState",{providedIn:"root",factory:()=>$g}),$g="always";function qg(e,t){e.forEach(r=>{r.registerOnValidatorChange&&r.registerOnValidatorChange(t)})}function NE(e,t){const r=function hL(e){return e._rawValidators}(e);null!==t.validator?e.setValidators(fL(r,t.validator)):"function"==typeof r&&e.setValidators([r]);const i=function pL(e){return e._rawAsyncValidators}(e);null!==t.asyncValidator?e.setAsyncValidators(fL(i,t.asyncValidator)):"function"==typeof i&&e.setAsyncValidators([i]);const s=()=>e.updateValueAndValidity();qg(t._rawValidators,s),qg(t._rawAsyncValidators,s)}function DL(e,t){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}const Yne={provide:Dn,useExisting:et(()=>Wg)},Dd=Promise.resolve();let Wg=(()=>{class e extends Dn{get submitted(){return Jr(this.submittedReactive)}constructor(r,i,s){super(),this.callSetDisabledState=s,this._submitted=pu(()=>this.submittedReactive()),this.submittedReactive=Wr(!1),this._directives=new Set,this.ngSubmit=new dt,this.form=new ME({},wE(r),bE(i))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(r){Dd.then(()=>{const i=this._findContainer(r.path);r.control=i.registerControl(r.name,r.control),function Cd(e,t,r=$g){NE(e,t),t.valueAccessor.writeValue(e.value),(e.disabled||"always"===r)&&t.valueAccessor.setDisabledState?.(e.disabled),function zne(e,t){t.valueAccessor.registerOnChange(r=>{e._pendingValue=r,e._pendingChange=!0,e._pendingDirty=!0,"change"===e.updateOn&&DL(e,t)})}(e,t),function Gne(e,t){const r=(i,s)=>{t.valueAccessor.writeValue(i),s&&t.viewToModelUpdate(i)};e.registerOnChange(r),t._registerOnDestroy(()=>{e._unregisterOnChange(r)})}(e,t),function qne(e,t){t.valueAccessor.registerOnTouched(()=>{e._pendingTouched=!0,"blur"===e.updateOn&&e._pendingChange&&DL(e,t),"submit"!==e.updateOn&&e.markAsTouched()})}(e,t),function Hne(e,t){if(t.valueAccessor.setDisabledState){const r=i=>{t.valueAccessor.setDisabledState(i)};e.registerOnDisabledChange(r),t._registerOnDestroy(()=>{e._unregisterOnDisabledChange(r)})}}(e,t)}(r.control,r,this.callSetDisabledState),r.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(r)})}getControl(r){return this.form.get(r.path)}removeControl(r){Dd.then(()=>{const i=this._findContainer(r.path);i&&i.removeControl(r.name),this._directives.delete(r)})}addFormGroup(r){Dd.then(()=>{const i=this._findContainer(r.path),s=new ME({});(function SL(e,t){NE(e,t)})(s,r),i.registerControl(r.name,s),s.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(r){Dd.then(()=>{const i=this._findContainer(r.path);i&&i.removeControl(r.name)})}getFormGroup(r){return this.form.get(r.path)}updateModel(r,i){Dd.then(()=>{this.form.get(r.path).setValue(i)})}setValue(r){this.control.setValue(r)}onSubmit(r){return this.submittedReactive.set(!0),function IL(e,t){e._syncPendingControls(),t.forEach(r=>{const i=r.control;"submit"===i.updateOn&&i._pendingChange&&(r.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}(this.form,this._directives),this.ngSubmit.emit(r),"dialog"===r?.target?.method}onReset(){this.resetForm()}resetForm(r=void 0){this.form.reset(r),this.submittedReactive.set(!1)}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(r){return r.pop(),r.length?this.form.get(r):this.form}static{this.\u0275fac=function(i){return new(i||e)(k(dn,10),k($s,10),k(qc,8))}}static{this.\u0275dir=de({type:e,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(i,s){1&i&&ze("submit",function(a){return s.onSubmit(a)})("reset",function(){return s.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[ft([Yne]),Ue]})}}return e})();Promise.resolve();let kL=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275dir=de({type:e,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]})}}return e})(),Dre=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=Ht({type:e})}static{this.\u0275inj=Nt({})}}return e})(),Ire=(()=>{class e{static withConfig(r){return{ngModule:e,providers:[{provide:qc,useValue:r.callSetDisabledState??$g}]}}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=Ht({type:e})}static{this.\u0275inj=Nt({imports:[Dre]})}}return e})();function Tre(e,t){if(1&e){const r=Ri();ge(0,"li")(1,"span"),je(2),we(),ge(3,"button",17),ze("click",function(){const s=nn(r).$implicit;return rn(wt().removeRelay(s))}),je(4,"\u2715"),we()()}if(2&e){const r=t.$implicit;De(2),Qa(r)}}let xre=(()=>{class e extends Sne{constructor(r){super(),this.relayConfigService=r,this.response=new Xe,this.relays=[]}ngOnInit(){this.relays=this.relayConfigService.getConfig()}removeRelay(r){const i=nd(r),o=this.relays.indexOf(i);-1!==o&&this.relays.splice(o,1)}addRelay(r){r.value&&(this.relays=[...new Set([...this.relays,nd(r.value)])],r.value="")}ok(){this.response.next(!0),this.close()}cancel(){this.response.next(!1),this.close()}useDefault(){this.relays="wss://relay.nostr.net".split(",").map(nd),this.save()}save(){this.relayConfigService.saveConfig([...new Set(this.relays)]),this.close()}static{this.\u0275fac=function(i){return new(i||e)(k(Bb))}}static{this.\u0275cmp=ns({type:e,selectors:[["omg-relay-config"]],features:[Ue],decls:28,vars:1,consts:[["relayField",""],["type","button",1,"closeButton","exitButton",3,"click"],[1,"relayList"],[4,"ngFor","ngForOf"],[1,"field"],[1,"fieldWithButton"],["name","relay","type","text","autocomplete","off","placeholder","wss://relay.example",3,"keyup.enter"],["type","button",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","24","height","24","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["stroke","none","d","M0 0h24v24H0z","fill","none"],["d","M7 12l5 5l-1.5 1.5a3.536 3.536 0 1 1 -5 -5l1.5 -1.5z"],["d","M17 12l-5 -5l1.5 -1.5a3.536 3.536 0 1 1 5 5l-1.5 1.5z"],["d","M3 21l2.5 -2.5"],["d","M18.5 5.5l2.5 -2.5"],["d","M10 11l-2 2"],["d","M13 14l-2 2"],[1,"button-group"],["type","button",1,"closeButton",3,"click"]],template:function(i,s){if(1&i){const o=Ri();ge(0,"form")(1,"h1")(2,"span"),je(3,"Configure nostr relays"),we(),ge(4,"button",1),ze("click",function(){return nn(o),rn(s.close())}),je(5,"\u2715"),we()(),ge(6,"ul",2),sr(7,Tre,5,1,"li",3),we(),ge(8,"div",4)(9,"label"),je(10,"Relay"),we(),ge(11,"div",5)(12,"input",6,0),ze("keyup.enter",function(){nn(o);const c=Ka(13);return rn(s.addRelay(c))}),we(),ge(14,"button",7),ze("click",function(){nn(o);const c=Ka(13);return rn(s.addRelay(c))}),wf(),ge(15,"svg",8),or(16,"path",9)(17,"path",10)(18,"path",11)(19,"path",12)(20,"path",13)(21,"path",14)(22,"path",15),we()()()(),bf(),ge(23,"div",16)(24,"button",7),ze("click",function(){return nn(o),rn(s.useDefault())}),je(25,"Use default"),we(),ge(26,"button",7),ze("click",function(){return nn(o),rn(s.save())}),je(27,"Save"),we()()()}2&i&&(De(7),qe("ngForOf",s.relays))},dependencies:[r_,kL,_L,Wg],styles:[".closeButton[_ngcontent-%COMP%]{border:0;cursor:pointer;appearance:none;background-color:transparent;font-size:10px;margin-left:1rem}.closeButton.exitButton[_ngcontent-%COMP%]{float:right}.field[_ngcontent-%COMP%]{display:flex;flex-direction:column}h1[_ngcontent-%COMP%]{font-size:14px;margin-bottom:1rem}.fieldWithButton[_ngcontent-%COMP%]{display:flex}.fieldWithButton[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding:3px 1rem;border-radius:5px 0 0 5px;border:1px solid black}.fieldWithButton[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border-left:0;border-radius:0 5px 5px 0}button[_ngcontent-%COMP%]{background-color:#fff;border:1px solid black;padding:.25rem .5rem;border-radius:5px;cursor:pointer}button[_ngcontent-%COMP%]:hover{background-color:#f1f1f1}button[_ngcontent-%COMP%]:active{background-color:#e6e6e6}.button-group[_ngcontent-%COMP%]{display:flex;margin:1rem 0 0;justify-content:space-between}"]})}}return e})(),jE=(()=>{class e extends Xe{constructor(){super()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),$E=(()=>{class e extends nr{constructor(r){super(),this.error$=r}handleError(r){/^AbortError/.test(String(r))||(r.errors&&r.errors.length?r.errors.forEach(i=>{console.error((new Date).toLocaleString(),i.message),this.error$.next(i.message)}):r.message?(console.error((new Date).toLocaleString(),r.message),this.error$.next(r.message)):(console.error((new Date).toLocaleString(),"application throw unkown error"),this.error$.next("application throw unkown error")))}getErrorMessage(r){if(!/^AbortError/.test(String(r))){if(r.errors&&r.errors.length)return r.errors.map(i=>i.message);if(r.message)return[r.message]}return[]}static{this.\u0275fac=function(i){return new(i||e)(Z(jE))}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),Are=(()=>{class e{constructor(){this.authorTypes={[Qi.STRANGE]:"Stranger",[Qi.YOU]:"You"}}transform(r){return this.authorTypes[r]}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275pipe=fn({name:"author",type:e,pure:!0})}}return e})();const Mre=["conversation"];function Nre(e,t){1&e&&(ge(0,"div",22),je(1," You're now chatting with a random stranger. "),we())}function Rre(e,t){1&e&&(ge(0,"div",22),je(1," Looking for someone you can chat with. "),we())}function Ore(e,t){if(1&e&&(ge(0,"span",26),wf(),ge(1,"svg",27),or(2,"path",7)(3,"path",28),we(),bf(),ge(4,"span",29),je(5),we()()),2&e){const r=wt().$implicit;De(5),Qa(r[1])}}function kre(e,t){if(1&e&&(ge(0,"div",23)(1,"span"),je(2),function AA(e,t){const r=_e();let i;const s=e+Y;r.firstCreatePass?(i=function L5(e,t){if(t)for(let r=t.length-1;r>=0;r--){const i=t[r];if(e===i.name)return i}}(t,r.pipeRegistry),r.data[s]=i,i.onDestroy&&(r.destroyHooks??=[]).push(s,i.onDestroy)):i=r.data[s];const o=i.factory||(i.factory=Zs(i.type)),c=Sn(k);try{const l=Sf(!1),u=o();return Sf(l),function w0(e,t,r,i){r>=e.data.length&&(e.data[r]=null,e.blueprint[r]=null),t[r]=i}(r,N(),s,u),u}finally{Sn(c)}}(3,"author"),we(),ge(4,"span",24),je(5),we(),sr(6,Ore,6,1,"span",25),we()),2&e){const r=t.$implicit,i=wt();De(),Ql("authorStranger",r[0].author===i.authorStrange)("authorYou",r[0].author===i.authorYou),De(),Yr("",MA(3,7,r[0].author),": "),De(3),Qa(r[0].text),De(),qe("ngIf",r[1])}}function Pre(e,t){1&e&&(ge(0,"div",22),je(1," Stranger is typing... "),we())}function Lre(e,t){1&e&&(ge(0,"div",22),je(1,"Stranger has disconnected."),we())}function Fre(e,t){1&e&&(ge(0,"div",22),je(1,"You have disconnected."),we())}function Bre(e,t){if(1&e&&(Ga(0),sr(1,Lre,2,0,"div",13)(2,Fre,2,0,"div",13),Wa()),2&e){const r=wt();De(),qe("ngIf",r.whoDisconnected===r.authorStrange),De(),qe("ngIf",r.whoDisconnected===r.authorYou)}}function Vre(e,t){if(1&e){const r=Ri();ge(0,"button",30),ze("click",function(){return nn(r),rn(wt().findStranger())}),je(1," Start "),we()}if(2&e){const r=wt();Kt("disabled",r.currentState===r.stateSearchingStranger?"disabled":null)}}function Ure(e,t){if(1&e){const r=Ri();ge(0,"button",31),ze("click",function(){nn(r);const s=wt();return rn(s.currentState=s.stateUpToDisconnect)}),je(1," Stop "),we()}}function jre(e,t){if(1&e){const r=Ri();ge(0,"button",32),ze("click",function(){nn(r);const s=wt(),o=Ka(23);return s.disconnect(),rn(s.cleanMessageField(o))}),je(1," Really? "),we()}}const $re=[{path:"chat",component:(()=>{class e{constructor(r,i,s,o){this.globalErrorHandler=r,this.findStrangerProxy=i,this.talkToStrangerNostr=s,this.modalService=o,this.stateConnected=mi.CONNECTED,this.stateUpToDisconnect=mi.UP_TO_DISCONNECT,this.stateDisconnected=mi.DISCONNECTED,this.stateSearchingStranger=mi.SEARCHING_STRANGER,this.authorStrange=Qi.STRANGE,this.authorYou=Qi.YOU,this.typingTimeoutAmount=2e3,this.typingTimeoutId=0,this.currentOnline=1,this.strangeIsTyping=!1,this.currentState=mi.DISCONNECTED,this.whoDisconnected=null,this.you=null,this.stranger=null,this.messages=[],this.subscriptions=new Et}ngOnInit(){this.countStrangers()}countStrangers(){this.subscriptions.add(this.talkToStrangerNostr.listenCurrenOnlineUsers().subscribe(r=>this.currentOnline=r||1))}ngOnDestroy(){this.subscriptions.unsubscribe()}onBeforeUnload(){var r=this;return U(function*(){return yield r.disconnect(),!0})()}configRelays(){this.modalService.createModal(xre).build()}findStranger(){this.whoDisconnected=null,this.currentState=this.stateSearchingStranger,this.messages=[];const r=this.you=this.findStrangerProxy.connect();console.info((new Date).toLocaleString(),"me: ",r.pubkey),this.findStrangerProxy.searchStranger(this.you).then(i=>this.startConversation(r,i)).catch(i=>{throw console.error((new Date).toLocaleString(),i),this.strangeIsTyping=!1,this.currentState=mi.DISCONNECTED,this.whoDisconnected=null,this.stranger=null,i})}disconnect(){return this.you?(this.stranger=null,this.findStrangerProxy.disconnect(this.you).then(()=>(this.currentState=mi.DISCONNECTED,this.strangeIsTyping=!1,this.whoDisconnected||(this.whoDisconnected=Qi.YOU),Promise.resolve()))):Promise.resolve()}startConversation(r,i){console.log((new Date).toLocaleString(),"starting conversation, stranger: ",i),this.stranger=i,this.currentState=mi.CONNECTED,1===this.currentOnline&&(this.currentOnline=2),this.subscriptions.add(this.talkToStrangerNostr.listenMessages(r,i).subscribe({next:s=>this.addMessageFromStranger(r,i,s)})),this.subscriptions.add(this.talkToStrangerNostr.listenStrangerStatus(i).subscribe({next:s=>this.handleStrangerStatus(s)}))}addMessageFromStranger(r,i,s){this.talkToStrangerNostr.openEncryptedDirectMessage(r,i,s).then(o=>{this.messages.push([{text:o,author:Qi.STRANGE,time:s.created_at},null]),this.scrollConversationToTheEnd()})}handleStrangerStatus(r){"typing"===r.content?(this.strangeIsTyping=!0,this.scrollConversationToTheEnd()):"disconnected"===r.content?(this.strangeIsTyping=!1,this.whoDisconnected=Qi.STRANGE,this.currentState=mi.DISCONNECTED,this.disconnect()):this.strangeIsTyping=!1}sendMessage(r){var i=this;return U(function*(){const s=i.you,o=i.stranger;if(s&&o&&r.length){const a=[{author:Qi.YOU,text:r,time:Math.floor((new Date).getTime()/1e3)},null];i.messages.push(a),i.scrollConversationToTheEnd();try{yield i.talkToStrangerNostr.sendMessage(s,o,r)}catch(c){a[1]=i.globalErrorHandler.getErrorMessage(c).join("; ")}}})()}scrollConversationToTheEnd(){setTimeout(()=>{const r=this.conversationEl.nativeElement;r.scrollTo({top:r.scrollHeight,behavior:"smooth"})})}cleanMessageField(r){setTimeout(()=>r.value="")}onTyping(){const r=this.you;r&&(this.typingTimeoutId||this.talkToStrangerNostr.isTyping(r),clearTimeout(this.typingTimeoutId),this.typingTimeoutId=Number(setTimeout(()=>{this.talkToStrangerNostr.stopTyping(r),this.typingTimeoutId=0},this.typingTimeoutAmount)))}static{this.\u0275fac=function(i){return new(i||e)(k($E),k(N2),k(R2),k(WP))}}static{this.\u0275cmp=ns({type:e,selectors:[["omg-chat"]],viewQuery:function(i,s){if(1&i&&_0(Mre,5),2&i){let o;Th(o=xh())&&(s.conversationEl=o.first)}},hostBindings:function(i,s){1&i&&ze("beforeunload",function(){return s.onBeforeUnload()},0,wI)},decls:27,vars:11,consts:[["conversation",""],["messageField",""],["send",""],[1,"navbar"],["src","./assets/logo.png","alt","logo",1,"logo"],[1,"description"],["xmlns","http://www.w3.org/2000/svg","width","24","height","24","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"config",3,"click"],["stroke","none","d","M0 0h24v24H0z","fill","none"],["d","M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z"],["d","M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0"],[1,"online"],[1,"main"],[1,"conversation"],["class","message",4,"ngIf"],["class","chat",4,"ngFor","ngForOf"],[4,"ngIf"],["novalidate","","autocomplete","off",1,"form"],["type","button","class","btn start bottomLeftRadius",3,"click",4,"ngIf"],["type","button","class","btn bottomLeftRadius",3,"click",4,"ngIf"],["type","button","class","btn bottomLeftRadius bold",3,"click",4,"ngIf"],["name","text",1,"textarea",3,"keydown.enter","keydown"],["type","button",1,"btn","bottomRightRadius",3,"click"],[1,"message"],[1,"chat"],[1,"text"],["class","errorWrap",4,"ngIf"],[1,"errorWrap"],["xmlns","http://www.w3.org/2000/svg","width","24","height","24","viewBox","0 0 24 24","fill","currentColor",1,"messageNotSent"],["d","M17 3.34a10 10 0 1 1 -15 8.66l.005 -.324a10 10 0 0 1 14.995 -8.336m-5 11.66a1 1 0 0 0 -1 1v.01a1 1 0 0 0 2 0v-.01a1 1 0 0 0 -1 -1m0 -7a1 1 0 0 0 -1 1v4a1 1 0 0 0 2 0v-4a1 1 0 0 0 -1 -1"],[1,"errorMessage"],["type","button",1,"btn","start","bottomLeftRadius",3,"click"],["type","button",1,"btn","bottomLeftRadius",3,"click"],["type","button",1,"btn","bottomLeftRadius","bold",3,"click"]],template:function(i,s){if(1&i){const o=Ri();ge(0,"section",3),or(1,"img",4),ge(2,"h2",5),je(3,"Talk to strangers!"),we(),wf(),ge(4,"svg",6),ze("click",function(){return nn(o),rn(s.configRelays())}),or(5,"path",7)(6,"path",8)(7,"path",9),we(),bf(),ge(8,"h2",10),je(9),we()(),ge(10,"main",11)(11,"section",12,0),sr(13,Nre,2,0,"div",13)(14,Rre,2,0,"div",13)(15,kre,7,9,"div",14)(16,Pre,2,0,"div",13)(17,Bre,3,2,"ng-container",15),we(),ge(18,"form",16),sr(19,Vre,2,1,"button",17)(20,Ure,2,0,"button",18)(21,jre,2,0,"button",19),ge(22,"textarea",20,1),ze("keydown.enter",function(){nn(o);const c=Ka(23);return s.sendMessage(c.value),rn(s.cleanMessageField(c))})("keydown",function(){return nn(o),rn(s.onTyping())}),we(),ge(24,"button",21,2),ze("click",function(){nn(o);const c=Ka(23);return s.sendMessage(c.value),rn(s.cleanMessageField(c))}),je(26," Send "),we()()()}2&i&&(De(9),Qa(s.currentOnline),De(4),qe("ngIf",s.stranger),De(),qe("ngIf",!s.stranger&&s.currentState===s.stateSearchingStranger),De(),qe("ngForOf",s.messages),De(),qe("ngIf",s.strangeIsTyping),De(),qe("ngIf",s.currentState===s.stateDisconnected),De(2),qe("ngIf",s.currentState===s.stateDisconnected||s.currentState===s.stateSearchingStranger),De(),qe("ngIf",s.currentState===s.stateConnected),De(),qe("ngIf",s.currentState===s.stateUpToDisconnect),De(),Kt("disabled",s.currentState===s.stateDisconnected||s.currentState===s.stateSearchingStranger?"disabled":null),De(2),Kt("disabled",s.currentState===s.stateDisconnected||s.currentState===s.stateSearchingStranger?"disabled":null))},dependencies:[r_,op,Are],encapsulation:2})}}return e})()},{path:"",redirectTo:"chat",pathMatch:"full"}];let Hre=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=Ht({type:e})}static{this.\u0275inj=Nt({imports:[qP.forRoot($re,{useHash:!0}),qP]})}}return e})();var le=function(e){return e[e.State=0]="State",e[e.Transition=1]="Transition",e[e.Sequence=2]="Sequence",e[e.Group=3]="Group",e[e.Animate=4]="Animate",e[e.Keyframes=5]="Keyframes",e[e.Style=6]="Style",e[e.Trigger=7]="Trigger",e[e.Reference=8]="Reference",e[e.AnimateChild=9]="AnimateChild",e[e.AnimateRef=10]="AnimateRef",e[e.Query=11]="Query",e[e.Stagger=12]="Stagger",e}(le||{});const Yi="*";function zre(e,t){return{type:le.Trigger,name:e,definitions:t,options:{}}}function XL(e,t=null){return{type:le.Animate,styles:t,timings:e}}function Sd(e){return{type:le.Style,styles:e,offset:null}}function HE(e,t,r){return{type:le.State,name:e,styles:t,options:r}}function eF(e,t,r=null){return{type:le.Transition,expr:e,animation:t,options:r}}class Id{constructor(t=0,r=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=t+r}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._originalOnStartFns.push(t),this._onStartFns.push(t)}onDone(t){this._originalOnDoneFns.push(t),this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(t){this._position=this.totalTime?t*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(t){const r="start"==t?this._onStartFns:this._onDoneFns;r.forEach(i=>i()),r.length=0}}class tF{constructor(t){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;let r=0,i=0,s=0;const o=this.players.length;0==o?queueMicrotask(()=>this._onFinish()):this.players.forEach(a=>{a.onDone(()=>{++r==o&&this._onFinish()}),a.onDestroy(()=>{++i==o&&this._onDestroy()}),a.onStart(()=>{++s==o&&this._onStart()})}),this.totalTime=this.players.reduce((a,c)=>Math.max(a,c.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){const r=t*this.totalTime;this.players.forEach(i=>{const s=i.totalTime?Math.min(1,r/i.totalTime):1;i.setPosition(s)})}getPosition(){const t=this.players.reduce((r,i)=>null===r||i.totalTime>r.totalTime?i:r,null);return null!=t?t.getPosition():0}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){const r="start"==t?this._onStartFns:this._onDoneFns;r.forEach(i=>i()),r.length=0}}const nF=["toast-component",""];function Qre(e,t){if(1&e){const r=Ri();ge(0,"button",5),ze("click",function(){return nn(r),rn(wt().remove())}),ge(1,"span",6),je(2,"\xd7"),we()()}}function Yre(e,t){if(1&e&&(Ga(0),je(1),Wa()),2&e){const r=wt(2);De(),Yr("[",r.duplicatesCount+1,"]")}}function Jre(e,t){if(1&e&&(ge(0,"div"),je(1),sr(2,Yre,2,1,"ng-container",4),we()),2&e){const r=wt();Ni(r.options.titleClass),Kt("aria-label",r.title),De(),Yr(" ",r.title," "),De(),qe("ngIf",r.duplicatesCount)}}function Xre(e,t){if(1&e&&or(0,"div",7),2&e){const r=wt();Ni(r.options.messageClass),qe("innerHTML",r.message,Qy)}}function eie(e,t){if(1&e&&(ge(0,"div",8),je(1),we()),2&e){const r=wt();Ni(r.options.messageClass),Kt("aria-label",r.message),De(),Yr(" ",r.message," ")}}function tie(e,t){if(1&e&&(ge(0,"div"),or(1,"div",9),we()),2&e){const r=wt();De(),yo("width",r.width()+"%")}}class cie{_attachedHost;component;viewContainerRef;injector;constructor(t,r){this.component=t,this.injector=r}attach(t,r){return this._attachedHost=t,t.attach(this,r)}detach(){const t=this._attachedHost;if(t)return this._attachedHost=void 0,t.detach()}get isAttached(){return null!=this._attachedHost}setAttachedHost(t){this._attachedHost=t}}class lie{_attachedPortal;_disposeFn;attach(t,r){return this._attachedPortal=t,this.attachComponentPortal(t,r)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(t){this._disposeFn=t}}class uie{_overlayRef;componentInstance;duplicatesCount=0;_afterClosed=new Xe;_activate=new Xe;_manualClose=new Xe;_resetTimeout=new Xe;_countDuplicate=new Xe;constructor(t){this._overlayRef=t}manualClose(){this._manualClose.next(),this._manualClose.complete()}manualClosed(){return this._manualClose.asObservable()}timeoutReset(){return this._resetTimeout.asObservable()}countDuplicate(){return this._countDuplicate.asObservable()}close(){this._overlayRef.detach(),this._afterClosed.next(),this._manualClose.next(),this._afterClosed.complete(),this._manualClose.complete(),this._activate.complete(),this._resetTimeout.complete(),this._countDuplicate.complete()}afterClosed(){return this._afterClosed.asObservable()}isInactive(){return this._activate.isStopped}activate(){this._activate.next(),this._activate.complete()}afterActivate(){return this._activate.asObservable()}onDuplicate(t,r){t&&this._resetTimeout.next(),r&&this._countDuplicate.next(++this.duplicatesCount)}}class Zg{toastId;config;message;title;toastType;toastRef;_onTap=new Xe;_onAction=new Xe;constructor(t,r,i,s,o,a){this.toastId=t,this.config=r,this.message=i,this.title=s,this.toastType=o,this.toastRef=a,this.toastRef.afterClosed().subscribe(()=>{this._onAction.complete(),this._onTap.complete()})}triggerTap(){this._onTap.next(),this.config.tapToDismiss&&this._onTap.complete()}onTap(){return this._onTap.asObservable()}triggerAction(t){this._onAction.next(t)}onAction(){return this._onAction.asObservable()}}const iF=new q("ToastConfig");class die extends lie{_hostDomElement;_componentFactoryResolver;_appRef;constructor(t,r,i){super(),this._hostDomElement=t,this._componentFactoryResolver=r,this._appRef=i}attachComponentPortal(t,r){const i=this._componentFactoryResolver.resolveComponentFactory(t.component);let s;return s=i.create(t.injector),this._appRef.attachView(s.hostView),this.setDisposeFn(()=>{this._appRef.detachView(s.hostView),s.destroy()}),r?this._hostDomElement.insertBefore(this._getComponentRootNode(s),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(s)),s}_getComponentRootNode(t){return t.hostView.rootNodes[0]}}let fie=(()=>{class e{_document=O(on);_containerElement;ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){const r=this._document.createElement("div");r.classList.add("overlay-container"),r.setAttribute("aria-live","polite"),this._document.body.appendChild(r),this._containerElement=r}static \u0275fac=function(i){return new(i||e)};static \u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();class hie{_portalHost;constructor(t){this._portalHost=t}attach(t,r=!0){return this._portalHost.attach(t,r)}detach(){return this._portalHost.detach()}}let pie=(()=>{class e{_overlayContainer=O(fie);_componentFactoryResolver=O(Vl);_appRef=O(ar);_document=O(on);_paneElements=new Map;create(r,i){return this._createOverlayRef(this.getPaneElement(r,i))}getPaneElement(r="",i){return this._paneElements.get(i)||this._paneElements.set(i,{}),this._paneElements.get(i)[r]||(this._paneElements.get(i)[r]=this._createPaneElement(r,i)),this._paneElements.get(i)[r]}_createPaneElement(r,i){const s=this._document.createElement("div");return s.id="toast-container",s.classList.add(r),s.classList.add("toast-container"),i?i.getContainerElement().appendChild(s):this._overlayContainer.getContainerElement().appendChild(s),s}_createPortalHost(r){return new die(r,this._componentFactoryResolver,this._appRef)}_createOverlayRef(r){return new hie(this._createPortalHost(r))}static \u0275fac=function(i){return new(i||e)};static \u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),qE=(()=>{class e{overlay;_injector;sanitizer;ngZone;toastrConfig;currentlyActive=0;toasts=[];overlayContainer;previousToastMessage;index=0;constructor(r,i,s,o,a){this.overlay=i,this._injector=s,this.sanitizer=o,this.ngZone=a,this.toastrConfig={...r.default,...r.config},r.config.iconClasses&&(this.toastrConfig.iconClasses={...r.default.iconClasses,...r.config.iconClasses})}show(r,i,s={},o=""){return this._preBuildNotification(o,r,i,this.applyConfig(s))}success(r,i,s={}){return this._preBuildNotification(this.toastrConfig.iconClasses.success||"",r,i,this.applyConfig(s))}error(r,i,s={}){return this._preBuildNotification(this.toastrConfig.iconClasses.error||"",r,i,this.applyConfig(s))}info(r,i,s={}){return this._preBuildNotification(this.toastrConfig.iconClasses.info||"",r,i,this.applyConfig(s))}warning(r,i,s={}){return this._preBuildNotification(this.toastrConfig.iconClasses.warning||"",r,i,this.applyConfig(s))}clear(r){for(const i of this.toasts)if(void 0!==r){if(i.toastId===r)return void i.toastRef.manualClose()}else i.toastRef.manualClose()}remove(r){const i=this._findToast(r);if(!i||(i.activeToast.toastRef.close(),this.toasts.splice(i.index,1),this.currentlyActive=this.currentlyActive-1,!this.toastrConfig.maxOpened||!this.toasts.length))return!1;if(this.currentlyActivethis._buildNotification(r,i,s,o)):this._buildNotification(r,i,s,o)}_buildNotification(r,i,s,o){if(!o.toastComponent)throw new Error("toastComponent required");const a=this.findDuplicate(s,i,this.toastrConfig.resetTimeoutOnDuplicate&&o.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&s||i)&&this.toastrConfig.preventDuplicates&&null!==a)return a;this.previousToastMessage=i;let c=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(c=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));const l=this.overlay.create(o.positionClass,this.overlayContainer);this.index=this.index+1;let u=i;i&&o.enableHtml&&(u=this.sanitizer.sanitize(Hn.HTML,i));const d=new uie(l),f=new Zg(this.index,o,u,s,r,d),p=It.create({providers:[{provide:Zg,useValue:f}],parent:this._injector}),g=new cie(o.toastComponent,p),m=l.attach(g,o.newestOnTop);d.componentInstance=m.instance;const y={toastId:this.index,title:s||"",message:i||"",toastRef:d,onShown:d.afterActivate(),onHidden:d.afterClosed(),onTap:f.onTap(),onAction:f.onAction(),portal:m};return c||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{y.toastRef.activate()})),this.toasts.push(y),y}static \u0275fac=function(i){return new(i||e)(Z(iF),Z(pie),Z(It),Z(VN),Z(Ne))};static \u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const gie={maxOpened:0,autoDismiss:!1,newestOnTop:!0,preventDuplicates:!1,countDuplicates:!1,resetTimeoutOnDuplicate:!1,includeTitleDuplicates:!1,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},closeButton:!1,disableTimeOut:!1,timeOut:5e3,extendedTimeOut:1e3,enableHtml:!1,progressBar:!1,toastClass:"ngx-toastr",positionClass:"toast-top-right",titleClass:"toast-title",messageClass:"toast-message",easing:"ease-in",easeTime:300,tapToDismiss:!0,onActivateTick:!1,progressAnimation:"decreasing",toastComponent:(()=>{class e{toastrService;toastPackage;ngZone;message;title;options;duplicatesCount;originalTimeout;width=Wr(-1);toastClasses="";state;get _state(){return this.state()}get displayStyle(){if("inactive"===this.state().value)return"none"}timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(r,i,s){this.toastrService=r,this.toastPackage=i,this.ngZone=s,this.message=i.message,this.title=i.title,this.options=i.config,this.originalTimeout=i.config.timeOut,this.toastClasses=`${i.toastType} ${i.config.toastClass}`,this.sub=i.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=i.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=i.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=i.toastRef.countDuplicate().subscribe(o=>{this.duplicatesCount=o}),this.state=Wr({value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.update(r=>({...r,value:"active"})),!0!==this.options.disableTimeOut&&"timeOut"!==this.options.disableTimeOut&&this.options.timeOut&&(this.outsideTimeout(()=>this.remove(),this.options.timeOut),this.hideTime=(new Date).getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}updateProgress(){if(0===this.width()||100===this.width()||!this.options.timeOut)return;const r=(new Date).getTime();this.width.set((this.hideTime-r)/this.options.timeOut*100),"increasing"===this.options.progressAnimation&&this.width.update(s=>100-s),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.update(r=>({...r,value:"active"})),this.outsideTimeout(()=>this.remove(),this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=(new Date).getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10)}remove(){"removed"!==this.state().value&&(clearTimeout(this.timeout),this.state.update(r=>({...r,value:"removed"})),this.outsideTimeout(()=>this.toastrService.remove(this.toastPackage.toastId),+this.toastPackage.config.easeTime))}tapToast(){"removed"!==this.state().value&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){"removed"!==this.state().value&&"extendedTimeOut"!==this.options.disableTimeOut&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){!0===this.options.disableTimeOut||"extendedTimeOut"===this.options.disableTimeOut||0===this.options.extendedTimeOut||"removed"===this.state().value||(this.outsideTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=(new Date).getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}outsideTimeout(r,i){this.ngZone?this.ngZone.runOutsideAngular(()=>this.timeout=setTimeout(()=>this.runInsideAngular(r),i)):this.timeout=setTimeout(()=>r(),i)}outsideInterval(r,i){this.ngZone?this.ngZone.runOutsideAngular(()=>this.intervalId=setInterval(()=>this.runInsideAngular(r),i)):this.intervalId=setInterval(()=>r(),i)}runInsideAngular(r){this.ngZone?this.ngZone.run(()=>r()):r()}static \u0275fac=function(i){return new(i||e)(k(qE),k(Zg),k(Ne))};static \u0275cmp=ns({type:e,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(i,s){1&i&&ze("click",function(){return s.tapToast()})("mouseenter",function(){return s.stickAround()})("mouseleave",function(){return s.delayedHideToast()}),2&i&&(p0("@flyInOut",s._state),Ni(s.toastClasses),yo("display",s.displayStyle))},standalone:!0,features:[Ah],attrs:nF,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(i,s){1&i&&sr(0,Qre,3,0,"button",0)(1,Jre,3,5,"div",1)(2,Xre,1,3,"div",2)(3,eie,2,4,"div",3)(4,tie,2,2,"div",4),2&i&&(qe("ngIf",s.options.closeButton),De(),qe("ngIf",s.title),De(),qe("ngIf",s.message&&s.options.enableHtml),De(),qe("ngIf",s.message&&!s.options.enableHtml),De(),qe("ngIf",s.options.progressBar))},dependencies:[op],encapsulation:2,data:{animation:[zre("flyInOut",[HE("inactive",Sd({opacity:0})),HE("active",Sd({opacity:1})),HE("removed",Sd({opacity:0})),eF("inactive => active",XL("{{ easeTime }}ms {{ easing }}")),eF("active => removed",XL("{{ easeTime }}ms {{ easing }}"))])]},changeDetection:0})}return e})()},mie=(e={})=>function tl(e){return{\u0275providers:e}}([{provide:iF,useValue:{default:gie,config:e}}]);let yie=(()=>{class e{static forRoot(r={}){return{ngModule:e,providers:[mie(r)]}}static \u0275fac=function(i){return new(i||e)};static \u0275mod=Ht({type:e});static \u0275inj=Nt({})}return e})(),vie=(()=>{class e{constructor(r,i){this.error$=r,this.toastrService=i,this.subscriptions=new Et}ngOnInit(){this.subscriptions.add(this.error$.subscribe(r=>this.toastrService.error(r)))}ngOnDestroy(){this.subscriptions.unsubscribe()}static{this.\u0275fac=function(i){return new(i||e)(k(jE),k(qE))}}static{this.\u0275cmp=ns({type:e,selectors:[["app-root"]],decls:2,vars:0,template:function(i,s){1&i&&or(0,"modal-outlet")(1,"router-outlet")},dependencies:[aE,Cne],encapsulation:2})}}return e})(),_ie=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=Ht({type:e})}static{this.\u0275inj=Nt({providers:[Bb],imports:[bo,Ire]})}}return e})(),wie=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=Ht({type:e})}static{this.\u0275inj=Nt({imports:[bo,_ie]})}}return e})(),bie=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=Ht({type:e})}static{this.\u0275inj=Nt({providers:[Hb,hg],imports:[bo]})}}return e})();function sF(e){return new A(3e3,!1)}function zs(e){switch(e.length){case 0:return new Id;case 1:return e[0];default:return new tF(e)}}function oF(e,t,r=new Map,i=new Map){const s=[],o=[];let a=-1,c=null;if(t.forEach(l=>{const u=l.get("offset"),d=u==a,f=d&&c||new Map;l.forEach((h,p)=>{let g=p,m=h;if("offset"!==p)switch(g=e.normalizePropertyName(g,s),m){case"!":m=r.get(p);break;case Yi:m=i.get(p);break;default:m=e.normalizeStyleValue(p,g,m,s)}f.set(g,m)}),d||o.push(f),c=f,a=u}),s.length)throw function zie(){return new A(3502,!1)}();return o}function GE(e,t,r,i){switch(t){case"start":e.onStart(()=>i(r&&WE(r,"start",e)));break;case"done":e.onDone(()=>i(r&&WE(r,"done",e)));break;case"destroy":e.onDestroy(()=>i(r&&WE(r,"destroy",e)))}}function WE(e,t,r){const o=ZE(e.element,e.triggerName,e.fromState,e.toState,t||e.phaseName,r.totalTime??e.totalTime,!!r.disabled),a=e._data;return null!=a&&(o._data=a),o}function ZE(e,t,r,i,s="",o=0,a){return{element:e,triggerName:t,fromState:r,toState:i,phaseName:s,totalTime:o,disabled:!!a}}function Qn(e,t,r){let i=e.get(t);return i||e.set(t,i=r),i}function aF(e){const t=e.indexOf(":");return[e.substring(1,t),e.slice(t+1)]}const nse=typeof document>"u"?null:document.documentElement;function KE(e){const t=e.parentNode||e.host||null;return t===nse?null:t}let Go=null,cF=!1;function lF(e,t){for(;t;){if(t===e)return!0;t=KE(t)}return!1}function uF(e,t,r){if(r)return Array.from(e.querySelectorAll(t));const i=e.querySelector(t);return i?[i]:[]}let QE=(()=>{class e{validateStyleProperty(r){return function ise(e){Go||(Go=function sse(){return typeof document<"u"?document.body:null}()||{},cF=!!Go.style&&"WebkitAppearance"in Go.style);let t=!0;return Go.style&&!function rse(e){return"ebkit"==e.substring(1,6)}(e)&&(t=e in Go.style,!t&&cF&&(t="Webkit"+e.charAt(0).toUpperCase()+e.slice(1)in Go.style)),t}(r)}containsElement(r,i){return lF(r,i)}getParentElement(r){return KE(r)}query(r,i,s){return uF(r,i,s)}computeStyle(r,i,s){return s||""}animate(r,i,s,o,a,c=[],l){return new Id(s,o)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac})}}return e})();class YE{static{this.NOOP=new QE}}class JE{}const ase=1e3,XE="ng-enter",Kg="ng-leave",Qg="ng-trigger",Yg=".ng-trigger",fF="ng-animating",eC=".ng-animating";function Ji(e){if("number"==typeof e)return e;const t=e.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:tC(parseFloat(t[1]),t[2])}function tC(e,t){return"s"===t?e*ase:e}function Jg(e,t,r){return e.hasOwnProperty("duration")?e:function lse(e,t,r){let s,o=0,a="";if("string"==typeof e){const c=e.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===c)return t.push(sF()),{duration:0,delay:0,easing:""};s=tC(parseFloat(c[1]),c[2]);const l=c[3];null!=l&&(o=tC(parseFloat(l),c[4]));const u=c[5];u&&(a=u)}else s=e;if(!r){let c=!1,l=t.length;s<0&&(t.push(function Eie(){return new A(3100,!1)}()),c=!0),o<0&&(t.push(function Cie(){return new A(3101,!1)}()),c=!0),c&&t.splice(l,0,sF())}return{duration:s,delay:o,easing:a}}(e,t,r)}function vi(e,t,r){t.forEach((i,s)=>{const o=rC(s);r&&!r.has(s)&&r.set(s,e.style[o]),e.style[o]=i})}function Wo(e,t){t.forEach((r,i)=>{const s=rC(i);e.style[s]=""})}function Td(e){return Array.isArray(e)?1==e.length?e[0]:function qre(e,t=null){return{type:le.Sequence,steps:e,options:t}}(e):e}const nC=new RegExp("{{\\s*(.+?)\\s*}}","g");function pF(e){let t=[];if("string"==typeof e){let r;for(;r=nC.exec(e);)t.push(r[1]);nC.lastIndex=0}return t}function xd(e,t,r){const i=`${e}`,s=i.replace(nC,(o,a)=>{let c=t[a];return null==c&&(r.push(function Sie(){return new A(3003,!1)}()),c=""),c.toString()});return s==i?e:s}const fse=/-+([a-z0-9])/g;function rC(e){return e.replace(fse,(...t)=>t[1].toUpperCase())}function Yn(e,t,r){switch(t.type){case le.Trigger:return e.visitTrigger(t,r);case le.State:return e.visitState(t,r);case le.Transition:return e.visitTransition(t,r);case le.Sequence:return e.visitSequence(t,r);case le.Group:return e.visitGroup(t,r);case le.Animate:return e.visitAnimate(t,r);case le.Keyframes:return e.visitKeyframes(t,r);case le.Style:return e.visitStyle(t,r);case le.Reference:return e.visitReference(t,r);case le.AnimateChild:return e.visitAnimateChild(t,r);case le.AnimateRef:return e.visitAnimateRef(t,r);case le.Query:return e.visitQuery(t,r);case le.Stagger:return e.visitStagger(t,r);default:throw function Iie(){return new A(3004,!1)}()}}function iC(e,t){return window.getComputedStyle(e)[t]}const gse=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]);class gF extends JE{normalizePropertyName(t,r){return rC(t)}normalizeStyleValue(t,r,i,s){let o="";const a=i.toString().trim();if(gse.has(r)&&0!==i&&"0"!==i)if("number"==typeof i)o="px";else{const c=i.match(/^[+-]?[\d\.]+([a-z]*)$/);c&&0==c[1].length&&s.push(function Tie(){return new A(3005,!1)}())}return a+o}}const Xg="*";const em=new Set(["true","1"]),tm=new Set(["false","0"]);function mF(e,t){const r=em.has(e)||tm.has(e),i=em.has(t)||tm.has(t);return(s,o)=>{let a=e==Xg||e==s,c=t==Xg||t==o;return!a&&r&&"boolean"==typeof s&&(a=s?em.has(e):tm.has(e)),!c&&i&&"boolean"==typeof o&&(c=o?em.has(t):tm.has(t)),a&&c}}const _se=new RegExp("s*:selfs*,?","g");function sC(e,t,r,i){return new wse(e).build(t,r,i)}class wse{constructor(t){this._driver=t}build(t,r,i){const s=new Cse(r);return this._resetContextStyleTimingState(s),Yn(this,Td(t),s)}_resetContextStyleTimingState(t){t.currentQuerySelector="",t.collectedStyles=new Map,t.collectedStyles.set("",new Map),t.currentTime=0}visitTrigger(t,r){let i=r.queryCount=0,s=r.depCount=0;const o=[],a=[];return"@"==t.name.charAt(0)&&r.errors.push(function xie(){return new A(3006,!1)}()),t.definitions.forEach(c=>{if(this._resetContextStyleTimingState(r),c.type==le.State){const l=c,u=l.name;u.toString().split(/\s*,\s*/).forEach(d=>{l.name=d,o.push(this.visitState(l,r))}),l.name=u}else if(c.type==le.Transition){const l=this.visitTransition(c,r);i+=l.queryCount,s+=l.depCount,a.push(l)}else r.errors.push(function Aie(){return new A(3007,!1)}())}),{type:le.Trigger,name:t.name,states:o,transitions:a,queryCount:i,depCount:s,options:null}}visitState(t,r){const i=this.visitStyle(t.styles,r),s=t.options&&t.options.params||null;if(i.containsDynamicStyles){const o=new Set,a=s||{};i.styles.forEach(c=>{c instanceof Map&&c.forEach(l=>{pF(l).forEach(u=>{a.hasOwnProperty(u)||o.add(u)})})}),o.size&&r.errors.push(function Mie(){return new A(3008,!1)}(0,o.values()))}return{type:le.State,name:t.name,style:i,options:s?{params:s}:null}}visitTransition(t,r){r.queryCount=0,r.depCount=0;const i=Yn(this,Td(t.animation),r),s=function mse(e,t){const r=[];return"string"==typeof e?e.split(/\s*,\s*/).forEach(i=>function yse(e,t,r){if(":"==e[0]){const l=function vse(e,t){switch(e){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(r,i)=>parseFloat(i)>parseFloat(r);case":decrement":return(r,i)=>parseFloat(i) *"}}(e,r);if("function"==typeof l)return void t.push(l);e=l}const i=e.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return r.push(function Vie(){return new A(3015,!1)}()),t;const s=i[1],o=i[2],a=i[3];t.push(mF(s,a)),"<"==o[0]&&(s!=Xg||a!=Xg)&&t.push(mF(a,s))}(i,r,t)):r.push(e),r}(t.expr,r.errors);return{type:le.Transition,matchers:s,animation:i,queryCount:r.queryCount,depCount:r.depCount,options:Zo(t.options)}}visitSequence(t,r){return{type:le.Sequence,steps:t.steps.map(i=>Yn(this,i,r)),options:Zo(t.options)}}visitGroup(t,r){const i=r.currentTime;let s=0;const o=t.steps.map(a=>{r.currentTime=i;const c=Yn(this,a,r);return s=Math.max(s,r.currentTime),c});return r.currentTime=s,{type:le.Group,steps:o,options:Zo(t.options)}}visitAnimate(t,r){const i=function Sse(e,t){if(e.hasOwnProperty("duration"))return e;if("number"==typeof e)return oC(Jg(e,t).duration,0,"");const r=e;if(r.split(/\s+/).some(o=>"{"==o.charAt(0)&&"{"==o.charAt(1))){const o=oC(0,0,"");return o.dynamic=!0,o.strValue=r,o}const s=Jg(r,t);return oC(s.duration,s.delay,s.easing)}(t.timings,r.errors);r.currentAnimateTimings=i;let s,o=t.styles?t.styles:Sd({});if(o.type==le.Keyframes)s=this.visitKeyframes(o,r);else{let a=t.styles,c=!1;if(!a){c=!0;const u={};i.easing&&(u.easing=i.easing),a=Sd(u)}r.currentTime+=i.duration+i.delay;const l=this.visitStyle(a,r);l.isEmptyStep=c,s=l}return r.currentAnimateTimings=null,{type:le.Animate,timings:i,style:s,options:null}}visitStyle(t,r){const i=this._makeStyleAst(t,r);return this._validateStyleAst(i,r),i}_makeStyleAst(t,r){const i=[],s=Array.isArray(t.styles)?t.styles:[t.styles];for(let c of s)"string"==typeof c?c===Yi?i.push(c):r.errors.push(new A(3002,!1)):i.push(new Map(Object.entries(c)));let o=!1,a=null;return i.forEach(c=>{if(c instanceof Map&&(c.has("easing")&&(a=c.get("easing"),c.delete("easing")),!o))for(let l of c.values())if(l.toString().indexOf("{{")>=0){o=!0;break}}),{type:le.Style,styles:i,easing:a,offset:t.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(t,r){const i=r.currentAnimateTimings;let s=r.currentTime,o=r.currentTime;i&&o>0&&(o-=i.duration+i.delay),t.styles.forEach(a=>{"string"!=typeof a&&a.forEach((c,l)=>{const u=r.collectedStyles.get(r.currentQuerySelector),d=u.get(l);let f=!0;d&&(o!=s&&o>=d.startTime&&s<=d.endTime&&(r.errors.push(function Rie(){return new A(3010,!1)}()),f=!1),o=d.startTime),f&&u.set(l,{startTime:o,endTime:s}),r.options&&function dse(e,t,r){const i=t.params||{},s=pF(e);s.length&&s.forEach(o=>{i.hasOwnProperty(o)||r.push(function Die(){return new A(3001,!1)}())})}(c,r.options,r.errors)})})}visitKeyframes(t,r){const i={type:le.Keyframes,styles:[],options:null};if(!r.currentAnimateTimings)return r.errors.push(function Oie(){return new A(3011,!1)}()),i;let o=0;const a=[];let c=!1,l=!1,u=0;const d=t.steps.map(_=>{const v=this._makeStyleAst(_,r);let w=null!=v.offset?v.offset:function Dse(e){if("string"==typeof e)return null;let t=null;if(Array.isArray(e))e.forEach(r=>{if(r instanceof Map&&r.has("offset")){const i=r;t=parseFloat(i.get("offset")),i.delete("offset")}});else if(e instanceof Map&&e.has("offset")){const r=e;t=parseFloat(r.get("offset")),r.delete("offset")}return t}(v.styles),b=0;return null!=w&&(o++,b=v.offset=w),l=l||b<0||b>1,c=c||b0&&o{const w=h>0?v==p?1:h*v:a[v],b=w*y;r.currentTime=g+m.delay+b,m.duration=b,this._validateStyleAst(_,r),_.offset=w,i.styles.push(_)}),i}visitReference(t,r){return{type:le.Reference,animation:Yn(this,Td(t.animation),r),options:Zo(t.options)}}visitAnimateChild(t,r){return r.depCount++,{type:le.AnimateChild,options:Zo(t.options)}}visitAnimateRef(t,r){return{type:le.AnimateRef,animation:this.visitReference(t.animation,r),options:Zo(t.options)}}visitQuery(t,r){const i=r.currentQuerySelector,s=t.options||{};r.queryCount++,r.currentQuery=t;const[o,a]=function bse(e){const t=!!e.split(/\s*,\s*/).find(r=>":self"==r);return t&&(e=e.replace(_se,"")),e=e.replace(/@\*/g,Yg).replace(/@\w+/g,r=>Yg+"-"+r.slice(1)).replace(/:animating/g,eC),[e,t]}(t.selector);r.currentQuerySelector=i.length?i+" "+o:o,Qn(r.collectedStyles,r.currentQuerySelector,new Map);const c=Yn(this,Td(t.animation),r);return r.currentQuery=null,r.currentQuerySelector=i,{type:le.Query,selector:o,limit:s.limit||0,optional:!!s.optional,includeSelf:a,animation:c,originalSelector:t.selector,options:Zo(t.options)}}visitStagger(t,r){r.currentQuery||r.errors.push(function Fie(){return new A(3013,!1)}());const i="full"===t.timings?{duration:0,delay:0,easing:"full"}:Jg(t.timings,r.errors,!0);return{type:le.Stagger,animation:Yn(this,Td(t.animation),r),timings:i,options:null}}}class Cse{constructor(t){this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}}function Zo(e){return e?(e={...e}).params&&(e.params=function Ese(e){return e?{...e}:null}(e.params)):e={},e}function oC(e,t,r){return{duration:e,delay:t,easing:r}}function aC(e,t,r,i,s,o,a=null,c=!1){return{type:1,element:e,keyframes:t,preStyleProps:r,postStyleProps:i,duration:s,delay:o,totalTime:s+o,easing:a,subTimeline:c}}class nm{constructor(){this._map=new Map}get(t){return this._map.get(t)||[]}append(t,r){let i=this._map.get(t);i||this._map.set(t,i=[]),i.push(...r)}has(t){return this._map.has(t)}clear(){this._map.clear()}}const xse=new RegExp(":enter","g"),Mse=new RegExp(":leave","g");function cC(e,t,r,i,s,o=new Map,a=new Map,c,l,u=[]){return(new Nse).buildKeyframes(e,t,r,i,s,o,a,c,l,u)}class Nse{buildKeyframes(t,r,i,s,o,a,c,l,u,d=[]){u=u||new nm;const f=new lC(t,r,u,s,o,d,[]);f.options=l;const h=l.delay?Ji(l.delay):0;f.currentTimeline.delayNextStep(h),f.currentTimeline.setStyles([a],null,f.errors,l),Yn(this,i,f);const p=f.timelines.filter(g=>g.containsAnimation());if(p.length&&c.size){let g;for(let m=p.length-1;m>=0;m--){const y=p[m];if(y.element===r){g=y;break}}g&&!g.allowOnlyTimelineStyles()&&g.setStyles([c],null,f.errors,l)}return p.length?p.map(g=>g.buildKeyframes()):[aC(r,[],[],[],0,h,"",!1)]}visitTrigger(t,r){}visitState(t,r){}visitTransition(t,r){}visitAnimateChild(t,r){const i=r.subInstructions.get(r.element);if(i){const s=r.createSubContext(t.options),o=r.currentTimeline.currentTime,a=this._visitSubInstructions(i,s,s.options);o!=a&&r.transformIntoNewTimeline(a)}r.previousNode=t}visitAnimateRef(t,r){const i=r.createSubContext(t.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([t.options,t.animation.options],r,i),this.visitReference(t.animation,i),r.transformIntoNewTimeline(i.currentTimeline.currentTime),r.previousNode=t}_applyAnimationRefDelays(t,r,i){for(const s of t){const o=s?.delay;if(o){const a="number"==typeof o?o:Ji(xd(o,s?.params??{},r.errors));i.delayNextStep(a)}}}_visitSubInstructions(t,r,i){let o=r.currentTimeline.currentTime;const a=null!=i.duration?Ji(i.duration):null,c=null!=i.delay?Ji(i.delay):null;return 0!==a&&t.forEach(l=>{const u=r.appendInstructionToTimeline(l,a,c);o=Math.max(o,u.duration+u.delay)}),o}visitReference(t,r){r.updateOptions(t.options,!0),Yn(this,t.animation,r),r.previousNode=t}visitSequence(t,r){const i=r.subContextCount;let s=r;const o=t.options;if(o&&(o.params||o.delay)&&(s=r.createSubContext(o),s.transformIntoNewTimeline(),null!=o.delay)){s.previousNode.type==le.Style&&(s.currentTimeline.snapshotCurrentStyles(),s.previousNode=rm);const a=Ji(o.delay);s.delayNextStep(a)}t.steps.length&&(t.steps.forEach(a=>Yn(this,a,s)),s.currentTimeline.applyStylesToKeyframe(),s.subContextCount>i&&s.transformIntoNewTimeline()),r.previousNode=t}visitGroup(t,r){const i=[];let s=r.currentTimeline.currentTime;const o=t.options&&t.options.delay?Ji(t.options.delay):0;t.steps.forEach(a=>{const c=r.createSubContext(t.options);o&&c.delayNextStep(o),Yn(this,a,c),s=Math.max(s,c.currentTimeline.currentTime),i.push(c.currentTimeline)}),i.forEach(a=>r.currentTimeline.mergeTimelineCollectedStyles(a)),r.transformIntoNewTimeline(s),r.previousNode=t}_visitTiming(t,r){if(t.dynamic){const i=t.strValue;return Jg(r.params?xd(i,r.params,r.errors):i,r.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,r){const i=r.currentAnimateTimings=this._visitTiming(t.timings,r),s=r.currentTimeline;i.delay&&(r.incrementTime(i.delay),s.snapshotCurrentStyles());const o=t.style;o.type==le.Keyframes?this.visitKeyframes(o,r):(r.incrementTime(i.duration),this.visitStyle(o,r),s.applyStylesToKeyframe()),r.currentAnimateTimings=null,r.previousNode=t}visitStyle(t,r){const i=r.currentTimeline,s=r.currentAnimateTimings;!s&&i.hasCurrentStyleProperties()&&i.forwardFrame();const o=s&&s.easing||t.easing;t.isEmptyStep?i.applyEmptyStep(o):i.setStyles(t.styles,o,r.errors,r.options),r.previousNode=t}visitKeyframes(t,r){const i=r.currentAnimateTimings,s=r.currentTimeline.duration,o=i.duration,c=r.createSubContext().currentTimeline;c.easing=i.easing,t.styles.forEach(l=>{c.forwardTime((l.offset||0)*o),c.setStyles(l.styles,l.easing,r.errors,r.options),c.applyStylesToKeyframe()}),r.currentTimeline.mergeTimelineCollectedStyles(c),r.transformIntoNewTimeline(s+o),r.previousNode=t}visitQuery(t,r){const i=r.currentTimeline.currentTime,s=t.options||{},o=s.delay?Ji(s.delay):0;o&&(r.previousNode.type===le.Style||0==i&&r.currentTimeline.hasCurrentStyleProperties())&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=rm);let a=i;const c=r.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!s.optional,r.errors);r.currentQueryTotal=c.length;let l=null;c.forEach((u,d)=>{r.currentQueryIndex=d;const f=r.createSubContext(t.options,u);o&&f.delayNextStep(o),u===r.element&&(l=f.currentTimeline),Yn(this,t.animation,f),f.currentTimeline.applyStylesToKeyframe(),a=Math.max(a,f.currentTimeline.currentTime)}),r.currentQueryIndex=0,r.currentQueryTotal=0,r.transformIntoNewTimeline(a),l&&(r.currentTimeline.mergeTimelineCollectedStyles(l),r.currentTimeline.snapshotCurrentStyles()),r.previousNode=t}visitStagger(t,r){const i=r.parentContext,s=r.currentTimeline,o=t.timings,a=Math.abs(o.duration),c=a*(r.currentQueryTotal-1);let l=a*r.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":l=c-l;break;case"full":l=i.currentStaggerTime}const d=r.currentTimeline;l&&d.delayNextStep(l);const f=d.currentTime;Yn(this,t.animation,r),r.previousNode=t,i.currentStaggerTime=s.currentTime-f+(s.startTime-i.currentTimeline.startTime)}}const rm={};class lC{constructor(t,r,i,s,o,a,c,l){this._driver=t,this.element=r,this.subInstructions=i,this._enterClassName=s,this._leaveClassName=o,this.errors=a,this.timelines=c,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=rm,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new im(this._driver,r,0),c.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,r){if(!t)return;const i=t;let s=this.options;null!=i.duration&&(s.duration=Ji(i.duration)),null!=i.delay&&(s.delay=Ji(i.delay));const o=i.params;if(o){let a=s.params;a||(a=this.options.params={}),Object.keys(o).forEach(c=>{(!r||!a.hasOwnProperty(c))&&(a[c]=xd(o[c],a,this.errors))})}}_copyOptions(){const t={};if(this.options){const r=this.options.params;if(r){const i=t.params={};Object.keys(r).forEach(s=>{i[s]=r[s]})}}return t}createSubContext(t=null,r,i){const s=r||this.element,o=new lC(this._driver,s,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(s,i||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(t),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(t){return this.previousNode=rm,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,r,i){const s={duration:r??t.duration,delay:this.currentTimeline.currentTime+(i??0)+t.delay,easing:""},o=new Rse(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,s,t.stretchStartingKeyframe);return this.timelines.push(o),s}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,r,i,s,o,a){let c=[];if(s&&c.push(this.element),t.length>0){t=(t=t.replace(xse,"."+this._enterClassName)).replace(Mse,"."+this._leaveClassName);let u=this._driver.query(this.element,t,1!=i);0!==i&&(u=i<0?u.slice(u.length+i,u.length):u.slice(0,i)),c.push(...u)}return!o&&0==c.length&&a.push(function Bie(){return new A(3014,!1)}()),c}}class im{constructor(t,r,i,s){this._driver=t,this.element=r,this.startTime=i,this._elementTimelineStylesLookup=s,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(r),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(r,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(t){const r=1===this._keyframes.size&&this._pendingStyles.size;this.duration||r?(this.forwardTime(this.currentTime+t),r&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,r){return this.applyStylesToKeyframe(),new im(this._driver,t,r||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,r){this._localTimelineStyles.set(t,r),this._globalTimelineStyles.set(t,r),this._styleSummary.set(t,{time:this.currentTime,value:r})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&this._previousKeyframe.set("easing",t);for(let[r,i]of this._globalTimelineStyles)this._backFill.set(r,i||Yi),this._currentKeyframe.set(r,Yi);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,r,i,s){r&&this._previousKeyframe.set("easing",r);const o=s&&s.params||{},a=function Ose(e,t){const r=new Map;let i;return e.forEach(s=>{if("*"===s){i??=t.keys();for(let o of i)r.set(o,Yi)}else for(let[o,a]of s)r.set(o,a)}),r}(t,this._globalTimelineStyles);for(let[c,l]of a){const u=xd(l,o,i);this._pendingStyles.set(c,u),this._localTimelineStyles.has(c)||this._backFill.set(c,this._globalTimelineStyles.get(c)??Yi),this._updateStyle(c,u)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((t,r)=>{this._currentKeyframe.set(r,t)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((t,r)=>{this._currentKeyframe.has(r)||this._currentKeyframe.set(r,t)}))}snapshotCurrentStyles(){for(let[t,r]of this._localTimelineStyles)this._pendingStyles.set(t,r),this._updateStyle(t,r)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const t=[];for(let r in this._currentKeyframe)t.push(r);return t}mergeTimelineCollectedStyles(t){t._styleSummary.forEach((r,i)=>{const s=this._styleSummary.get(i);(!s||r.time>s.time)&&this._updateStyle(i,r.value)})}buildKeyframes(){this.applyStylesToKeyframe();const t=new Set,r=new Set,i=1===this._keyframes.size&&0===this.duration;let s=[];this._keyframes.forEach((c,l)=>{const u=new Map([...this._backFill,...c]);u.forEach((d,f)=>{"!"===d?t.add(f):d===Yi&&r.add(f)}),i||u.set("offset",l/this.duration),s.push(u)});const o=[...t.values()],a=[...r.values()];if(i){const c=s[0],l=new Map(c);c.set("offset",0),l.set("offset",1),s=[c,l]}return aC(this.element,s,o,a,this.duration,this.startTime,this.easing,!1)}}class Rse extends im{constructor(t,r,i,s,o,a,c=!1){super(t,r,a.delay),this.keyframes=i,this.preStyleProps=s,this.postStyleProps=o,this._stretchStartingKeyframe=c,this.timings={duration:a.duration,delay:a.delay,easing:a.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:r,duration:i,easing:s}=this.timings;if(this._stretchStartingKeyframe&&r){const o=[],a=i+r,c=r/a,l=new Map(t[0]);l.set("offset",0),o.push(l);const u=new Map(t[0]);u.set("offset",_F(c)),o.push(u);const d=t.length-1;for(let f=1;f<=d;f++){let h=new Map(t[f]);const p=h.get("offset");h.set("offset",_F((r+p*i)/a)),o.push(h)}i=a,r=0,s="",t=o}return aC(this.element,t,this.preStyleProps,this.postStyleProps,i,r,s,!0)}}function _F(e,t=3){const r=Math.pow(10,t-1);return Math.round(e*r)/r}function wF(e,t,r,i,s,o,a,c,l,u,d,f,h){return{type:0,element:e,triggerName:t,isRemovalTransition:s,fromState:r,fromStyles:o,toState:i,toStyles:a,timelines:c,queriedElements:l,preStyleProps:u,postStyleProps:d,totalTime:f,errors:h}}const uC={};class bF{constructor(t,r,i){this._triggerName=t,this.ast=r,this._stateStyles=i}match(t,r,i,s){return function kse(e,t,r,i,s){return e.some(o=>o(t,r,i,s))}(this.ast.matchers,t,r,i,s)}buildStyles(t,r,i){let s=this._stateStyles.get("*");return void 0!==t&&(s=this._stateStyles.get(t?.toString())||s),s?s.buildStyles(r,i):new Map}build(t,r,i,s,o,a,c,l,u,d){const f=[],h=this.ast.options&&this.ast.options.params||uC,g=this.buildStyles(i,c&&c.params||uC,f),m=l&&l.params||uC,y=this.buildStyles(s,m,f),_=new Set,v=new Map,w=new Map,b="void"===s,D={params:EF(m,h),delay:this.ast.options?.delay},C=d?[]:cC(t,r,this.ast.animation,o,a,g,y,D,u,f);let S=0;return C.forEach(T=>{S=Math.max(T.duration+T.delay,S)}),f.length?wF(r,this._triggerName,i,s,b,g,y,[],[],v,w,S,f):(C.forEach(T=>{const P=T.element,$=Qn(v,P,new Set);T.preStyleProps.forEach(j=>$.add(j));const V=Qn(w,P,new Set);T.postStyleProps.forEach(j=>V.add(j)),P!==r&&_.add(P)}),wF(r,this._triggerName,i,s,b,g,y,C,[..._.values()],v,w,S))}}function EF(e,t){const r={...t};return Object.entries(e).forEach(([i,s])=>{null!=s&&(r[i]=s)}),r}class Pse{constructor(t,r,i){this.styles=t,this.defaultParams=r,this.normalizer=i}buildStyles(t,r){const i=new Map,s=EF(t,this.defaultParams);return this.styles.styles.forEach(o=>{"string"!=typeof o&&o.forEach((a,c)=>{a&&(a=xd(a,s,r));const l=this.normalizer.normalizePropertyName(c,r);a=this.normalizer.normalizeStyleValue(c,l,a,r),i.set(c,a)})}),i}}class Fse{constructor(t,r,i){this.name=t,this.ast=r,this._normalizer=i,this.transitionFactories=[],this.states=new Map,r.states.forEach(s=>{this.states.set(s.name,new Pse(s.style,s.options&&s.options.params||{},i))}),CF(this.states,"true","1"),CF(this.states,"false","0"),r.transitions.forEach(s=>{this.transitionFactories.push(new bF(t,s,this.states))}),this.fallbackTransition=function Bse(e,t){return new bF(e,{type:le.Transition,animation:{type:le.Sequence,steps:[],options:null},matchers:[(a,c)=>!0],options:null,queryCount:0,depCount:0},t)}(t,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,r,i,s){return this.transitionFactories.find(a=>a.match(t,r,i,s))||null}matchStyles(t,r,i){return this.fallbackTransition.buildStyles(t,r,i)}}function CF(e,t,r){e.has(t)?e.has(r)||e.set(r,e.get(t)):e.has(r)&&e.set(t,e.get(r))}const Vse=new nm;class Use{constructor(t,r,i){this.bodyNode=t,this._driver=r,this._normalizer=i,this._animations=new Map,this._playersById=new Map,this.players=[]}register(t,r){const i=[],o=sC(this._driver,r,i,[]);if(i.length)throw function qie(){return new A(3503,!1)}();this._animations.set(t,o)}_buildPlayer(t,r,i){const s=t.element,o=oF(this._normalizer,t.keyframes,r,i);return this._driver.animate(s,o,t.duration,t.delay,t.easing,[],!0)}create(t,r,i={}){const s=[],o=this._animations.get(t);let a;const c=new Map;if(o?(a=cC(this._driver,r,o,XE,Kg,new Map,new Map,i,Vse,s),a.forEach(d=>{const f=Qn(c,d.element,new Map);d.postStyleProps.forEach(h=>f.set(h,null))})):(s.push(function Gie(){return new A(3300,!1)}()),a=[]),s.length)throw function Wie(){return new A(3504,!1)}();c.forEach((d,f)=>{d.forEach((h,p)=>{d.set(p,this._driver.computeStyle(f,p,Yi))})});const u=zs(a.map(d=>{const f=c.get(d.element);return this._buildPlayer(d,new Map,f)}));return this._playersById.set(t,u),u.onDestroy(()=>this.destroy(t)),this.players.push(u),u}destroy(t){const r=this._getPlayer(t);r.destroy(),this._playersById.delete(t);const i=this.players.indexOf(r);i>=0&&this.players.splice(i,1)}_getPlayer(t){const r=this._playersById.get(t);if(!r)throw function Zie(){return new A(3301,!1)}();return r}listen(t,r,i,s){const o=ZE(r,"","","");return GE(this._getPlayer(t),i,o,s),()=>{}}command(t,r,i,s){if("register"==i)return void this.register(t,s[0]);if("create"==i)return void this.create(t,r,s[0]||{});const o=this._getPlayer(t);switch(i){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(s[0]));break;case"destroy":this.destroy(t)}}}const DF="ng-animate-queued",dC="ng-animate-disabled",qse=[],SF={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},Gse={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Lr="__ng_removed";class fC{get params(){return this.options.params}constructor(t,r=""){this.namespaceId=r;const i=t&&t.hasOwnProperty("value");if(this.value=function Qse(e){return e??null}(i?t.value:t),i){const{value:o,...a}=t;this.options=a}else this.options={};this.options.params||(this.options.params={})}absorbOptions(t){const r=t.params;if(r){const i=this.options.params;Object.keys(r).forEach(s=>{null==i[s]&&(i[s]=r[s])})}}}const Ad="void",hC=new fC(Ad);class Wse{constructor(t,r,i){this.id=t,this.hostElement=r,this._engine=i,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,gr(r,this._hostClassName)}listen(t,r,i,s){if(!this._triggers.has(r))throw function Kie(){return new A(3302,!1)}();if(null==i||0==i.length)throw function Qie(){return new A(3303,!1)}();if(!function Yse(e){return"start"==e||"done"==e}(i))throw function Yie(){return new A(3400,!1)}();const o=Qn(this._elementListeners,t,[]),a={name:r,phase:i,callback:s};o.push(a);const c=Qn(this._engine.statesByElement,t,new Map);return c.has(r)||(gr(t,Qg),gr(t,Qg+"-"+r),c.set(r,hC)),()=>{this._engine.afterFlush(()=>{const l=o.indexOf(a);l>=0&&o.splice(l,1),this._triggers.has(r)||c.delete(r)})}}register(t,r){return!this._triggers.has(t)&&(this._triggers.set(t,r),!0)}_getTrigger(t){const r=this._triggers.get(t);if(!r)throw function Jie(){return new A(3401,!1)}();return r}trigger(t,r,i,s=!0){const o=this._getTrigger(r),a=new pC(this.id,r,t);let c=this._engine.statesByElement.get(t);c||(gr(t,Qg),gr(t,Qg+"-"+r),this._engine.statesByElement.set(t,c=new Map));let l=c.get(r);const u=new fC(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&l&&u.absorbOptions(l.options),c.set(r,u),l||(l=hC),u.value!==Ad&&l.value===u.value){if(!function eoe(e,t){const r=Object.keys(e),i=Object.keys(t);if(r.length!=i.length)return!1;for(let s=0;s{Wo(t,y),vi(t,_)})}return}const h=Qn(this._engine.playersByElement,t,[]);h.forEach(m=>{m.namespaceId==this.id&&m.triggerName==r&&m.queued&&m.destroy()});let p=o.matchTransition(l.value,u.value,t,u.params),g=!1;if(!p){if(!s)return;p=o.fallbackTransition,g=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:r,transition:p,fromState:l,toState:u,player:a,isFallbackTransition:g}),g||(gr(t,DF),a.onStart(()=>{Gc(t,DF)})),a.onDone(()=>{let m=this.players.indexOf(a);m>=0&&this.players.splice(m,1);const y=this._engine.playersByElement.get(t);if(y){let _=y.indexOf(a);_>=0&&y.splice(_,1)}}),this.players.push(a),h.push(a),a}deregister(t){this._triggers.delete(t),this._engine.statesByElement.forEach(r=>r.delete(t)),this._elementListeners.forEach((r,i)=>{this._elementListeners.set(i,r.filter(s=>s.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);const r=this._engine.playersByElement.get(t);r&&(r.forEach(i=>i.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,r){const i=this._engine.driver.query(t,Yg,!0);i.forEach(s=>{if(s[Lr])return;const o=this._engine.fetchNamespacesByElement(s);o.size?o.forEach(a=>a.triggerLeaveAnimation(s,r,!1,!0)):this.clearElementCache(s)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(s=>this.clearElementCache(s)))}triggerLeaveAnimation(t,r,i,s){const o=this._engine.statesByElement.get(t),a=new Map;if(o){const c=[];if(o.forEach((l,u)=>{if(a.set(u,l.value),this._triggers.has(u)){const d=this.trigger(t,u,Ad,s);d&&c.push(d)}}),c.length)return this._engine.markElementAsRemoved(this.id,t,!0,r,a),i&&zs(c).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){const r=this._elementListeners.get(t),i=this._engine.statesByElement.get(t);if(r&&i){const s=new Set;r.forEach(o=>{const a=o.name;if(s.has(a))return;s.add(a);const l=this._triggers.get(a).fallbackTransition,u=i.get(a)||hC,d=new fC(Ad),f=new pC(this.id,a,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:a,transition:l,fromState:u,toState:d,player:f,isFallbackTransition:!0})})}}removeNode(t,r){const i=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,r),this.triggerLeaveAnimation(t,r,!0))return;let s=!1;if(i.totalAnimations){const o=i.players.length?i.playersByQueriedElement.get(t):[];if(o&&o.length)s=!0;else{let a=t;for(;a=a.parentNode;)if(i.statesByElement.get(a)){s=!0;break}}}if(this.prepareLeaveAnimationListeners(t),s)i.markElementAsRemoved(this.id,t,!1,r);else{const o=t[Lr];(!o||o===SF)&&(i.afterFlush(()=>this.clearElementCache(t)),i.destroyInnerAnimations(t),i._onRemovalComplete(t,r))}}insertNode(t,r){gr(t,this._hostClassName)}drainQueuedTransitions(t){const r=[];return this._queue.forEach(i=>{const s=i.player;if(s.destroyed)return;const o=i.element,a=this._elementListeners.get(o);a&&a.forEach(c=>{if(c.name==i.triggerName){const l=ZE(o,i.triggerName,i.fromState.value,i.toState.value);l._data=t,GE(i.player,c.phase,l,c.callback)}}),s.markedForDestroy?this._engine.afterFlush(()=>{s.destroy()}):r.push(i)}),this._queue=[],r.sort((i,s)=>{const o=i.transition.ast.depCount,a=s.transition.ast.depCount;return 0==o||0==a?o-a:this._engine.driver.containsElement(i.element,s.element)?1:-1})}destroy(t){this.players.forEach(r=>r.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}}class Zse{_onRemovalComplete(t,r){this.onRemovalComplete(t,r)}constructor(t,r,i){this.bodyNode=t,this.driver=r,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(s,o)=>{}}get queuedPlayers(){const t=[];return this._namespaceList.forEach(r=>{r.players.forEach(i=>{i.queued&&t.push(i)})}),t}createNamespace(t,r){const i=new Wse(t,r,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,r)?this._balanceNamespaceList(i,r):(this.newHostElements.set(r,i),this.collectEnterElement(r)),this._namespaceLookup[t]=i}_balanceNamespaceList(t,r){const i=this._namespaceList,s=this.namespacesByHostElement;if(i.length-1>=0){let a=!1,c=this.driver.getParentElement(r);for(;c;){const l=s.get(c);if(l){const u=i.indexOf(l);i.splice(u+1,0,t),a=!0;break}c=this.driver.getParentElement(c)}a||i.unshift(t)}else i.push(t);return s.set(r,t),t}register(t,r){let i=this._namespaceLookup[t];return i||(i=this.createNamespace(t,r)),i}registerTrigger(t,r,i){let s=this._namespaceLookup[t];s&&s.register(r,i)&&this.totalAnimations++}destroy(t,r){t&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{const i=this._fetchNamespace(t);this.namespacesByHostElement.delete(i.hostElement);const s=this._namespaceList.indexOf(i);s>=0&&this._namespaceList.splice(s,1),i.destroy(r),delete this._namespaceLookup[t]}))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){const r=new Set,i=this.statesByElement.get(t);if(i)for(let s of i.values())if(s.namespaceId){const o=this._fetchNamespace(s.namespaceId);o&&r.add(o)}return r}trigger(t,r,i,s){if(sm(r)){const o=this._fetchNamespace(t);if(o)return o.trigger(r,i,s),!0}return!1}insertNode(t,r,i,s){if(!sm(r))return;const o=r[Lr];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;const a=this.collectedLeaveElements.indexOf(r);a>=0&&this.collectedLeaveElements.splice(a,1)}if(t){const a=this._fetchNamespace(t);a&&a.insertNode(r,i)}s&&this.collectEnterElement(r)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,r){r?this.disabledNodes.has(t)||(this.disabledNodes.add(t),gr(t,dC)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Gc(t,dC))}removeNode(t,r,i){if(sm(r)){const s=t?this._fetchNamespace(t):null;s?s.removeNode(r,i):this.markElementAsRemoved(t,r,!1,i);const o=this.namespacesByHostElement.get(r);o&&o.id!==t&&o.removeNode(r,i)}else this._onRemovalComplete(r,i)}markElementAsRemoved(t,r,i,s,o){this.collectedLeaveElements.push(r),r[Lr]={namespaceId:t,setForRemoval:s,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:o}}listen(t,r,i,s,o){return sm(r)?this._fetchNamespace(t).listen(r,i,s,o):()=>{}}_buildInstruction(t,r,i,s,o){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,i,s,t.fromState.options,t.toState.options,r,o)}destroyInnerAnimations(t){let r=this.driver.query(t,Yg,!0);r.forEach(i=>this.destroyActiveAnimationsForElement(i)),0!=this.playersByQueriedElement.size&&(r=this.driver.query(t,eC,!0),r.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(t){const r=this.playersByElement.get(t);r&&r.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(t){const r=this.playersByQueriedElement.get(t);r&&r.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return zs(this.players).onDone(()=>t());t()})}processLeaveNode(t){const r=t[Lr];if(r&&r.setForRemoval){if(t[Lr]=SF,r.namespaceId){this.destroyInnerAnimations(t);const i=this._fetchNamespace(r.namespaceId);i&&i.clearElementCache(t)}this._onRemovalComplete(t,r.setForRemoval)}t.classList?.contains(dC)&&this.markElementAsDisabled(t,!1),this.driver.query(t,".ng-animate-disabled",!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(t=-1){let r=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,s)=>this._balanceNamespaceList(i,s)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;ii()),this._flushFns=[],this._whenQuietFns.length){const i=this._whenQuietFns;this._whenQuietFns=[],r.length?zs(r).onDone(()=>{i.forEach(s=>s())}):i.forEach(s=>s())}}reportError(t){throw function Xie(){return new A(3402,!1)}()}_flushAnimations(t,r){const i=new nm,s=[],o=new Map,a=[],c=new Map,l=new Map,u=new Map,d=new Set;this.disabledNodes.forEach(E=>{d.add(E);const x=this.driver.query(E,".ng-animate-queued",!0);for(let R=0;R{const R=XE+m++;g.set(x,R),E.forEach(M=>gr(M,R))});const y=[],_=new Set,v=new Set;for(let E=0;E_.add(M)):v.add(x))}const w=new Map,b=xF(h,Array.from(_));b.forEach((E,x)=>{const R=Kg+m++;w.set(x,R),E.forEach(M=>gr(M,R))}),t.push(()=>{p.forEach((E,x)=>{const R=g.get(x);E.forEach(M=>Gc(M,R))}),b.forEach((E,x)=>{const R=w.get(x);E.forEach(M=>Gc(M,R))}),y.forEach(E=>{this.processLeaveNode(E)})});const D=[],C=[];for(let E=this._namespaceList.length-1;E>=0;E--)this._namespaceList[E].drainQueuedTransitions(r).forEach(R=>{const M=R.player,G=R.element;if(D.push(M),this.collectedEnterElements.length){const Ae=G[Lr];if(Ae&&Ae.setForMove){if(Ae.previousTriggersValues&&Ae.previousTriggersValues.has(R.triggerName)){const ot=Ae.previousTriggersValues.get(R.triggerName),Oe=this.statesByElement.get(R.element);if(Oe&&Oe.has(R.triggerName)){const Ln=Oe.get(R.triggerName);Ln.value=ot,Oe.set(R.triggerName,Ln)}}return void M.destroy()}}const J=!f||!this.driver.containsElement(f,G),ee=w.get(G),Se=g.get(G),ue=this._buildInstruction(R,i,Se,ee,J);if(ue.errors&&ue.errors.length)return void C.push(ue);if(J)return M.onStart(()=>Wo(G,ue.fromStyles)),M.onDestroy(()=>vi(G,ue.toStyles)),void s.push(M);if(R.isFallbackTransition)return M.onStart(()=>Wo(G,ue.fromStyles)),M.onDestroy(()=>vi(G,ue.toStyles)),void s.push(M);const gt=[];ue.timelines.forEach(Ae=>{Ae.stretchStartingKeyframe=!0,this.disabledNodes.has(Ae.element)||gt.push(Ae)}),ue.timelines=gt,i.append(G,ue.timelines),a.push({instruction:ue,player:M,element:G}),ue.queriedElements.forEach(Ae=>Qn(c,Ae,[]).push(M)),ue.preStyleProps.forEach((Ae,ot)=>{if(Ae.size){let Oe=l.get(ot);Oe||l.set(ot,Oe=new Set),Ae.forEach((Ln,Jt)=>Oe.add(Jt))}}),ue.postStyleProps.forEach((Ae,ot)=>{let Oe=u.get(ot);Oe||u.set(ot,Oe=new Set),Ae.forEach((Ln,Jt)=>Oe.add(Jt))})});if(C.length){const E=[];C.forEach(x=>{E.push(function ese(){return new A(3505,!1)}())}),D.forEach(x=>x.destroy()),this.reportError(E)}const S=new Map,T=new Map;a.forEach(E=>{const x=E.element;i.has(x)&&(T.set(x,x),this._beforeAnimationBuild(E.player.namespaceId,E.instruction,S))}),s.forEach(E=>{const x=E.element;this._getPreviousPlayers(x,!1,E.namespaceId,E.triggerName,null).forEach(M=>{Qn(S,x,[]).push(M),M.destroy()})});const P=y.filter(E=>MF(E,l,u)),$=new Map;TF($,this.driver,v,u,Yi).forEach(E=>{MF(E,l,u)&&P.push(E)});const j=new Map;p.forEach((E,x)=>{TF(j,this.driver,new Set(E),l,"!")}),P.forEach(E=>{const x=$.get(E),R=j.get(E);$.set(E,new Map([...x?.entries()??[],...R?.entries()??[]]))});const X=[],L=[],I={};a.forEach(E=>{const{element:x,player:R,instruction:M}=E;if(i.has(x)){if(d.has(x))return R.onDestroy(()=>vi(x,M.toStyles)),R.disabled=!0,R.overrideTotalTime(M.totalTime),void s.push(R);let G=I;if(T.size>1){let ee=x;const Se=[];for(;ee=ee.parentNode;){const ue=T.get(ee);if(ue){G=ue;break}Se.push(ee)}Se.forEach(ue=>T.set(ue,G))}const J=this._buildAnimation(R.namespaceId,M,S,o,j,$);if(R.setRealPlayer(J),G===I)X.push(R);else{const ee=this.playersByElement.get(G);ee&&ee.length&&(R.parentPlayer=zs(ee)),s.push(R)}}else Wo(x,M.fromStyles),R.onDestroy(()=>vi(x,M.toStyles)),L.push(R),d.has(x)&&s.push(R)}),L.forEach(E=>{const x=o.get(E.element);if(x&&x.length){const R=zs(x);E.setRealPlayer(R)}}),s.forEach(E=>{E.parentPlayer?E.syncPlayerEvents(E.parentPlayer):E.destroy()});for(let E=0;E!J.destroyed);G.length?Jse(this,x,G):this.processLeaveNode(x)}return y.length=0,X.forEach(E=>{this.players.push(E),E.onDone(()=>{E.destroy();const x=this.players.indexOf(E);this.players.splice(x,1)}),E.play()}),X}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,r,i,s,o){let a=[];if(r){const c=this.playersByQueriedElement.get(t);c&&(a=c)}else{const c=this.playersByElement.get(t);if(c){const l=!o||o==Ad;c.forEach(u=>{u.queued||!l&&u.triggerName!=s||a.push(u)})}}return(i||s)&&(a=a.filter(c=>!(i&&i!=c.namespaceId||s&&s!=c.triggerName))),a}_beforeAnimationBuild(t,r,i){const o=r.element,a=r.isRemovalTransition?void 0:t,c=r.isRemovalTransition?void 0:r.triggerName;for(const l of r.timelines){const u=l.element,d=u!==o,f=Qn(i,u,[]);this._getPreviousPlayers(u,d,a,c,r.toState).forEach(p=>{const g=p.getRealPlayer();g.beforeDestroy&&g.beforeDestroy(),p.destroy(),f.push(p)})}Wo(o,r.fromStyles)}_buildAnimation(t,r,i,s,o,a){const c=r.triggerName,l=r.element,u=[],d=new Set,f=new Set,h=r.timelines.map(g=>{const m=g.element;d.add(m);const y=m[Lr];if(y&&y.removedBeforeQueried)return new Id(g.duration,g.delay);const _=m!==l,v=function Xse(e){const t=[];return AF(e,t),t}((i.get(m)||qse).map(S=>S.getRealPlayer())).filter(S=>!!S.element&&S.element===m),w=o.get(m),b=a.get(m),D=oF(this._normalizer,g.keyframes,w,b),C=this._buildPlayer(g,D,v);if(g.subTimeline&&s&&f.add(m),_){const S=new pC(t,c,m);S.setRealPlayer(C),u.push(S)}return C});u.forEach(g=>{Qn(this.playersByQueriedElement,g.element,[]).push(g),g.onDone(()=>function Kse(e,t,r){let i=e.get(t);if(i){if(i.length){const s=i.indexOf(r);i.splice(s,1)}0==i.length&&e.delete(t)}return i}(this.playersByQueriedElement,g.element,g))}),d.forEach(g=>gr(g,fF));const p=zs(h);return p.onDestroy(()=>{d.forEach(g=>Gc(g,fF)),vi(l,r.toStyles)}),f.forEach(g=>{Qn(s,g,[]).push(p)}),p}_buildPlayer(t,r,i){return r.length>0?this.driver.animate(t.element,r,t.duration,t.delay,t.easing,i):new Id(t.duration,t.delay)}}class pC{constructor(t,r,i){this.namespaceId=t,this.triggerName=r,this.element=i,this._player=new Id,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,this._queuedCallbacks.forEach((r,i)=>{r.forEach(s=>GE(t,i,void 0,s))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){const r=this._player;r.triggerCallback&&t.onStart(()=>r.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,r){Qn(this._queuedCallbacks,t,[]).push(r)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){const r=this._player;r.triggerCallback&&r.triggerCallback(t)}}function sm(e){return e&&1===e.nodeType}function IF(e,t){const r=e.style.display;return e.style.display=t??"none",r}function TF(e,t,r,i,s){const o=[];r.forEach(l=>o.push(IF(l)));const a=[];i.forEach((l,u)=>{const d=new Map;l.forEach(f=>{const h=t.computeStyle(u,f,s);d.set(f,h),(!h||0==h.length)&&(u[Lr]=Gse,a.push(u))}),e.set(u,d)});let c=0;return r.forEach(l=>IF(l,o[c++])),a}function xF(e,t){const r=new Map;if(e.forEach(c=>r.set(c,[])),0==t.length)return r;const s=new Set(t),o=new Map;function a(c){if(!c)return 1;let l=o.get(c);if(l)return l;const u=c.parentNode;return l=r.has(u)?u:s.has(u)?1:a(u),o.set(c,l),l}return t.forEach(c=>{const l=a(c);1!==l&&r.get(l).push(c)}),r}function gr(e,t){e.classList?.add(t)}function Gc(e,t){e.classList?.remove(t)}function Jse(e,t,r){zs(r).onDone(()=>e.processLeaveNode(t))}function AF(e,t){for(let r=0;rs.add(o)):t.set(e,i),r.delete(e),!0}class Md{constructor(t,r,i){this._driver=r,this._normalizer=i,this._triggerCache={},this.onRemovalComplete=(s,o)=>{},this._transitionEngine=new Zse(t.body,r,i),this._timelineEngine=new Use(t.body,r,i),this._transitionEngine.onRemovalComplete=(s,o)=>this.onRemovalComplete(s,o)}registerTrigger(t,r,i,s,o){const a=t+"-"+s;let c=this._triggerCache[a];if(!c){const l=[],d=sC(this._driver,o,l,[]);if(l.length)throw function Hie(){return new A(3404,!1)}();c=function Lse(e,t,r){return new Fse(e,t,r)}(s,d,this._normalizer),this._triggerCache[a]=c}this._transitionEngine.registerTrigger(r,s,c)}register(t,r){this._transitionEngine.register(t,r)}destroy(t,r){this._transitionEngine.destroy(t,r)}onInsert(t,r,i,s){this._transitionEngine.insertNode(t,r,i,s)}onRemove(t,r,i){this._transitionEngine.removeNode(t,r,i)}disableAnimations(t,r){this._transitionEngine.markElementAsDisabled(t,r)}process(t,r,i,s){if("@"==i.charAt(0)){const[o,a]=aF(i);this._timelineEngine.command(o,r,a,s)}else this._transitionEngine.trigger(t,r,i,s)}listen(t,r,i,s,o){if("@"==i.charAt(0)){const[a,c]=aF(i);return this._timelineEngine.listen(a,r,c,o)}return this._transitionEngine.listen(t,r,i,s,o)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(t){this._transitionEngine.afterFlushAnimationsDone(t)}}class Nd{static{this.initialStylesByElement=new WeakMap}constructor(t,r,i){this._element=t,this._startStyles=r,this._endStyles=i,this._state=0;let s=Nd.initialStylesByElement.get(t);s||Nd.initialStylesByElement.set(t,s=new Map),this._initialStyles=s}start(){this._state<1&&(this._startStyles&&vi(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(vi(this._element,this._initialStyles),this._endStyles&&(vi(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(Nd.initialStylesByElement.delete(this._element),this._startStyles&&(Wo(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Wo(this._element,this._endStyles),this._endStyles=null),vi(this._element,this._initialStyles),this._state=3)}}function gC(e){let t=null;return e.forEach((r,i)=>{(function noe(e){return"display"===e||"position"===e})(i)&&(t=t||new Map,t.set(i,r))}),t}class NF{constructor(t,r,i,s){this.element=t,this.keyframes=r,this.options=i,this._specialStyles=s,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:new Map;const r=()=>this._onFinish();this.domPlayer.addEventListener("finish",r),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",r)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(t){const r=[];return t.forEach(i=>{r.push(Object.fromEntries(i))}),r}_triggerWebAnimation(t,r,i){return t.animate(this._convertKeyframesToObject(r),i)}onStart(t){this._originalOnStartFns.push(t),this._onStartFns.push(t)}onDone(t){this._originalOnDoneFns.push(t),this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}setPosition(t){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=t*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const t=new Map;this.hasStarted()&&this._finalKeyframe.forEach((i,s)=>{"offset"!==s&&t.set(s,this._finished?i:iC(this.element,s))}),this.currentSnapshot=t}triggerCallback(t){const r="start"===t?this._onStartFns:this._onDoneFns;r.forEach(i=>i()),r.length=0}}class RF{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}containsElement(t,r){return lF(t,r)}getParentElement(t){return KE(t)}query(t,r,i){return uF(t,r,i)}computeStyle(t,r,i){return iC(t,r)}animate(t,r,i,s,o,a=[]){const l={duration:i,delay:s,fill:0==s?"both":"forwards"};o&&(l.easing=o);const u=new Map,d=a.filter(p=>p instanceof NF);(function hse(e,t){return 0===e||0===t})(i,s)&&d.forEach(p=>{p.currentSnapshot.forEach((g,m)=>u.set(m,g))});let f=function use(e){return e.length?e[0]instanceof Map?e:e.map(t=>new Map(Object.entries(t))):[]}(r).map(p=>new Map(p));f=function pse(e,t,r){if(r.size&&t.length){let i=t[0],s=[];if(r.forEach((o,a)=>{i.has(a)||s.push(a),i.set(a,o)}),s.length)for(let o=1;oa.set(c,iC(e,c)))}}return t}(t,f,u);const h=function toe(e,t){let r=null,i=null;return Array.isArray(t)&&t.length?(r=gC(t[0]),t.length>1&&(i=gC(t[t.length-1]))):t instanceof Map&&(r=gC(t)),r||i?new Nd(e,r,i):null}(t,f);return new NF(t,f,l,h)}}const OF="@.disabled";class kF{constructor(t,r,i,s){this.namespaceId=t,this.delegate=r,this.engine=i,this._onDestroy=s,this.\u0275type=0}get data(){return this.delegate.data}destroyNode(t){this.delegate.destroyNode?.(t)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(t,r){return this.delegate.createElement(t,r)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,r){this.delegate.appendChild(t,r),this.engine.onInsert(this.namespaceId,r,t,!1)}insertBefore(t,r,i,s=!0){this.delegate.insertBefore(t,r,i),this.engine.onInsert(this.namespaceId,r,t,s)}removeChild(t,r,i){this.parentNode(r)&&this.engine.onRemove(this.namespaceId,r,this.delegate)}selectRootElement(t,r){return this.delegate.selectRootElement(t,r)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,r,i,s){this.delegate.setAttribute(t,r,i,s)}removeAttribute(t,r,i){this.delegate.removeAttribute(t,r,i)}addClass(t,r){this.delegate.addClass(t,r)}removeClass(t,r){this.delegate.removeClass(t,r)}setStyle(t,r,i,s){this.delegate.setStyle(t,r,i,s)}removeStyle(t,r,i){this.delegate.removeStyle(t,r,i)}setProperty(t,r,i){"@"==r.charAt(0)&&r==OF?this.disableAnimations(t,!!i):this.delegate.setProperty(t,r,i)}setValue(t,r){this.delegate.setValue(t,r)}listen(t,r,i){return this.delegate.listen(t,r,i)}disableAnimations(t,r){this.engine.disableAnimations(t,r)}}class roe extends kF{constructor(t,r,i,s,o){super(r,i,s,o),this.factory=t,this.namespaceId=r}setProperty(t,r,i){"@"==r.charAt(0)?"."==r.charAt(1)&&r==OF?this.disableAnimations(t,i=void 0===i||!!i):this.engine.process(this.namespaceId,t,r.slice(1),i):this.delegate.setProperty(t,r,i)}listen(t,r,i){if("@"==r.charAt(0)){const s=function ioe(e){switch(e){case"body":return document.body;case"document":return document;case"window":return window;default:return e}}(t);let o=r.slice(1),a="";return"@"!=o.charAt(0)&&([o,a]=function soe(e){const t=e.indexOf(".");return[e.substring(0,t),e.slice(t+1)]}(o)),this.engine.listen(this.namespaceId,s,o,a,c=>{this.factory.scheduleListenerCallback(c._data||-1,i,c)})}return this.delegate.listen(t,r,i)}}class ooe{constructor(t,r,i){this.delegate=t,this.engine=r,this._zone=i,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,r.onRemovalComplete=(s,o)=>{o?.removeChild(null,s)}}createRenderer(t,r){const s=this.delegate.createRenderer(t,r);if(!t||!r?.data?.animation){const u=this._rendererCache;let d=u.get(s);return d||(d=new kF("",s,this.engine,()=>u.delete(s)),u.set(s,d)),d}const o=r.id,a=r.id+"-"+this._currentId;this._currentId++,this.engine.register(a,t);const c=u=>{Array.isArray(u)?u.forEach(c):this.engine.registerTrigger(o,a,t,u.name,u)};return r.data.animation.forEach(c),new roe(this,a,s,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(t,r,i){if(t>=0&&tr(i));const s=this._animationCallbacksBuffer;0==s.length&&queueMicrotask(()=>{this._zone.run(()=>{s.forEach(o=>{const[a,c]=o;a(c)}),this._animationCallbacksBuffer=[]})}),s.push([r,i])}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}let aoe=(()=>{class e extends Md{constructor(r,i,s){super(r,i,s)}ngOnDestroy(){this.flush()}static{this.\u0275fac=function(i){return new(i||e)(Z(on),Z(YE),Z(JE))}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac})}}return e})();const PF=[{provide:JE,useFactory:function coe(){return new gF}},{provide:Md,useClass:aoe},{provide:oh,useFactory:function loe(e,t,r){return new ooe(e,t,r)},deps:[m_,Md,Ne]}],mC=[{provide:YE,useFactory:()=>new RF},{provide:$S,useValue:"BrowserAnimations"},...PF],LF=[{provide:YE,useClass:QE},{provide:$S,useValue:"NoopAnimations"},...PF];let uoe=(()=>{class e{static withConfig(r){return{ngModule:e,providers:r.disableAnimations?LF:mC}}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=Ht({type:e})}static{this.\u0275inj=Nt({providers:mC,imports:[LN]})}}return e})(),doe=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=Ht({type:e})}static{this.\u0275inj=Nt({providers:[jE,$E,{provide:nr,useClass:$E}],imports:[bo,uoe]})}}return e})(),foe=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=Ht({type:e,bootstrap:[vie]})}static{this.\u0275inj=Nt({imports:[wie,LN,Hre,Sq,NX,Dne,bie,yie.forRoot({timeOut:1e4,positionClass:"toast-top-center",preventDuplicates:!0}),doe]})}}return e})();vq().bootstrapModule(foe).catch(e=>console.error(e))}},am=>{am(am.s=999)}]); \ No newline at end of file diff --git a/docs/polyfills.76501f31eddd659a.js b/docs/polyfills.76501f31eddd659a.js new file mode 100755 index 0000000..3bda43a --- /dev/null +++ b/docs/polyfills.76501f31eddd659a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkomeglestr=self.webpackChunkomeglestr||[]).push([[461],{935:()=>{const te=globalThis;function ee(e){return(te.__Zone_symbol_prefix||"__zone_symbol__")+e}const ke=Object.getOwnPropertyDescriptor,Ne=Object.defineProperty,Le=Object.getPrototypeOf,_t=Object.create,Et=Array.prototype.slice,Ie="addEventListener",Me="removeEventListener",Ze=ee(Ie),Ae=ee(Me),ae="true",le="false",ve=ee("");function je(e,r){return Zone.current.wrap(e,r)}function He(e,r,c,t,i){return Zone.current.scheduleMacroTask(e,r,c,t,i)}const j=ee,we=typeof window<"u",Te=we?window:void 0,$=we&&Te||globalThis,Tt="removeAttribute";function xe(e,r){for(let c=e.length-1;c>=0;c--)"function"==typeof e[c]&&(e[c]=je(e[c],r+"_"+c));return e}function We(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&typeof e.set>"u")}const qe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,Re=!("nw"in $)&&typeof $.process<"u"&&"[object process]"===$.process.toString(),Ve=!Re&&!qe&&!(!we||!Te.HTMLElement),Xe=typeof $.process<"u"&&"[object process]"===$.process.toString()&&!qe&&!(!we||!Te.HTMLElement),Ce={},mt=j("enable_beforeunload"),Ye=function(e){if(!(e=e||$.event))return;let r=Ce[e.type];r||(r=Ce[e.type]=j("ON_PROPERTY"+e.type));const c=this||e.target||$,t=c[r];let i;return Ve&&c===Te&&"error"===e.type?(i=t&&t.call(this,e.message,e.filename,e.lineno,e.colno,e.error),!0===i&&e.preventDefault()):(i=t&&t.apply(this,arguments),"beforeunload"===e.type&&$[mt]&&"string"==typeof i?e.returnValue=i:null!=i&&!i&&e.preventDefault()),i};function $e(e,r,c){let t=ke(e,r);if(!t&&c&&ke(c,r)&&(t={enumerable:!0,configurable:!0}),!t||!t.configurable)return;const i=j("on"+r+"patched");if(e.hasOwnProperty(i)&&e[i])return;delete t.writable,delete t.value;const u=t.get,E=t.set,T=r.slice(2);let y=Ce[T];y||(y=Ce[T]=j("ON_PROPERTY"+T)),t.set=function(D){let d=this;!d&&e===$&&(d=$),d&&("function"==typeof d[y]&&d.removeEventListener(T,Ye),E&&E.call(d,null),d[y]=D,"function"==typeof D&&d.addEventListener(T,Ye,!1))},t.get=function(){let D=this;if(!D&&e===$&&(D=$),!D)return null;const d=D[y];if(d)return d;if(u){let w=u.call(this);if(w)return t.set.call(this,w),"function"==typeof D[Tt]&&D.removeAttribute(r),w}return null},Ne(e,r,t),e[i]=!0}function Je(e,r,c){if(r)for(let t=0;tfunction(E,T){const y=c(E,T);return y.cbIdx>=0&&"function"==typeof T[y.cbIdx]?He(y.name,T[y.cbIdx],y,i):u.apply(E,T)})}function fe(e,r){e[j("OriginalDelegate")]=r}let Ke=!1,Ge=!1;function kt(){if(Ke)return Ge;Ke=!0;try{const e=Te.navigator.userAgent;(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/")||-1!==e.indexOf("Edge/"))&&(Ge=!0)}catch{}return Ge}function Qe(e){return"function"==typeof e}function et(e){return"number"==typeof e}let ge=!1;if(typeof window<"u")try{const e=Object.defineProperty({},"passive",{get:function(){ge=!0}});window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch{ge=!1}const vt={useG:!0},ne={},tt={},nt=new RegExp("^"+ve+"(\\w+)(true|false)$"),rt=j("propagationStopped");function ot(e,r){const c=(r?r(e):e)+le,t=(r?r(e):e)+ae,i=ve+c,u=ve+t;ne[e]={},ne[e][le]=i,ne[e][ae]=u}function bt(e,r,c,t){const i=t&&t.add||Ie,u=t&&t.rm||Me,E=t&&t.listeners||"eventListeners",T=t&&t.rmAll||"removeAllListeners",y=j(i),D="."+i+":",d="prependListener",w="."+d+":",Z=function(k,h,H){if(k.isRemoved)return;const V=k.callback;let Y;"object"==typeof V&&V.handleEvent&&(k.callback=g=>V.handleEvent(g),k.originalDelegate=V);try{k.invoke(k,h,[H])}catch(g){Y=g}const G=k.options;return G&&"object"==typeof G&&G.once&&h[u].call(h,H.type,k.originalDelegate?k.originalDelegate:k.callback,G),Y};function x(k,h,H){if(!(h=h||e.event))return;const V=k||h.target||e,Y=V[ne[h.type][H?ae:le]];if(Y){const G=[];if(1===Y.length){const g=Z(Y[0],V,h);g&&G.push(g)}else{const g=Y.slice();for(let z=0;z{throw z})}}}const U=function(k){return x(this,k,!1)},J=function(k){return x(this,k,!0)};function K(k,h){if(!k)return!1;let H=!0;h&&void 0!==h.useG&&(H=h.useG);const V=h&&h.vh;let Y=!0;h&&void 0!==h.chkDup&&(Y=h.chkDup);let G=!1;h&&void 0!==h.rt&&(G=h.rt);let g=k;for(;g&&!g.hasOwnProperty(i);)g=Le(g);if(!g&&k[i]&&(g=k),!g||g[y])return!1;const z=h&&h.eventNameToString,O={},R=g[y]=g[i],b=g[j(u)]=g[u],S=g[j(E)]=g[E],Q=g[j(T)]=g[T];let W;h&&h.prepend&&(W=g[j(h.prepend)]=g[h.prepend]);const q=H?function(s){if(!O.isExisting)return R.call(O.target,O.eventName,O.capture?J:U,O.options)}:function(s){return R.call(O.target,O.eventName,s.invoke,O.options)},A=H?function(s){if(!s.isRemoved){const l=ne[s.eventName];let v;l&&(v=l[s.capture?ae:le]);const C=v&&s.target[v];if(C)for(let m=0;mse.zone.cancelTask(se);s.call(ye,"abort",ce,{once:!0}),se.removeAbortListener=()=>ye.removeEventListener("abort",ce)}return O.target=null,Pe&&(Pe.taskData=null),lt&&(O.options.once=!0),!ge&&"boolean"==typeof se.options||(se.options=ie),se.target=I,se.capture=Be,se.eventName=M,B&&(se.originalDelegate=F),L?pe.unshift(se):pe.push(se),m?I:void 0}};return g[i]=a(R,D,q,A,G),W&&(g[d]=a(W,w,function(s){return W.call(O.target,O.eventName,s.invoke,O.options)},A,G,!0)),g[u]=function(){const s=this||e;let l=arguments[0];h&&h.transferEventName&&(l=h.transferEventName(l));const v=arguments[2],C=!!v&&("boolean"==typeof v||v.capture),m=arguments[1];if(!m)return b.apply(this,arguments);if(V&&!V(b,m,s,arguments))return;const L=ne[l];let I;L&&(I=L[C?ae:le]);const M=I&&s[I];if(M)for(let F=0;Ffunction(i,u){i[rt]=!0,t&&t.apply(i,u)})}const De=j("zoneTask");function me(e,r,c,t){let i=null,u=null;c+=t;const E={};function T(D){const d=D.data;d.args[0]=function(){return D.invoke.apply(this,arguments)};const w=i.apply(e,d.args);return et(w)?d.handleId=w:(d.handle=w,d.isRefreshable=Qe(w.refresh)),D}function y(D){const{handle:d,handleId:w}=D.data;return u.call(e,d??w)}i=ue(e,r+=t,D=>function(d,w){if(Qe(w[0])){const Z={isRefreshable:!1,isPeriodic:"Interval"===t,delay:"Timeout"===t||"Interval"===t?w[1]||0:void 0,args:w},x=w[0];w[0]=function(){try{return x.apply(this,arguments)}finally{const{handle:H,handleId:V,isPeriodic:Y,isRefreshable:G}=Z;!Y&&!G&&(V?delete E[V]:H&&(H[De]=null))}};const U=He(r,w[0],Z,T,y);if(!U)return U;const{handleId:J,handle:K,isRefreshable:X,isPeriodic:k}=U.data;if(J)E[J]=U;else if(K&&(K[De]=U,X&&!k)){const h=K.refresh;K.refresh=function(){const{zone:H,state:V}=U;return"notScheduled"===V?(U._state="scheduled",H._updateTaskCount(U,1)):"running"===V&&(U._state="scheduling"),h.call(this)}}return K??J??U}return D.apply(e,w)}),u=ue(e,c,D=>function(d,w){const Z=w[0];let x;et(Z)?(x=E[Z],delete E[Z]):(x=Z?.[De],x?Z[De]=null:x=Z),x?.type?x.cancelFn&&x.zone.cancelTask(x):D.apply(e,w)})}function it(e,r,c){if(!c||0===c.length)return r;const t=c.filter(u=>u.target===e);if(!t||0===t.length)return r;const i=t[0].ignoreProperties;return r.filter(u=>-1===i.indexOf(u))}function ct(e,r,c,t){e&&Je(e,it(e,r,c),t)}function Fe(e){return Object.getOwnPropertyNames(e).filter(r=>r.startsWith("on")&&r.length>2).map(r=>r.substring(2))}function It(e,r,c,t,i){const u=Zone.__symbol__(t);if(r[u])return;const E=r[u]=r[t];r[t]=function(T,y,D){return y&&y.prototype&&i.forEach(function(d){const w=`${c}.${t}::`+d,Z=y.prototype;try{if(Z.hasOwnProperty(d)){const x=e.ObjectGetOwnPropertyDescriptor(Z,d);x&&x.value?(x.value=e.wrapWithCurrentZone(x.value,w),e._redefineProperty(y.prototype,d,x)):Z[d]&&(Z[d]=e.wrapWithCurrentZone(Z[d],w))}else Z[d]&&(Z[d]=e.wrapWithCurrentZone(Z[d],w))}catch{}}),E.call(r,T,y,D)},e.attachOriginToPatched(r[t],E)}const at=function Oe(){const e=globalThis,r=!0===e[ee("forceDuplicateZoneCheck")];if(e.Zone&&(r||"function"!=typeof e.Zone.__symbol__))throw new Error("Zone already loaded.");return e.Zone??=function ze(){const e=te.performance;function r(N){e&&e.mark&&e.mark(N)}function c(N,_){e&&e.measure&&e.measure(N,_)}r("Zone");let t=(()=>{class N{static{this.__symbol__=ee}static assertZonePatched(){if(te.Promise!==O.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let n=N.current;for(;n.parent;)n=n.parent;return n}static get current(){return b.zone}static get currentTask(){return S}static __load_patch(n,o,p=!1){if(O.hasOwnProperty(n)){const P=!0===te[ee("forceDuplicateZoneCheck")];if(!p&&P)throw Error("Already loaded patch: "+n)}else if(!te["__Zone_disable_"+n]){const P="Zone:"+n;r(P),O[n]=o(te,N,R),c(P,P)}}get parent(){return this._parent}get name(){return this._name}constructor(n,o){this._parent=n,this._name=o?o.name||"unnamed":"",this._properties=o&&o.properties||{},this._zoneDelegate=new u(this,this._parent&&this._parent._zoneDelegate,o)}get(n){const o=this.getZoneWith(n);if(o)return o._properties[n]}getZoneWith(n){let o=this;for(;o;){if(o._properties.hasOwnProperty(n))return o;o=o._parent}return null}fork(n){if(!n)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,n)}wrap(n,o){if("function"!=typeof n)throw new Error("Expecting function got: "+n);const p=this._zoneDelegate.intercept(this,n,o),P=this;return function(){return P.runGuarded(p,this,arguments,o)}}run(n,o,p,P){b={parent:b,zone:this};try{return this._zoneDelegate.invoke(this,n,o,p,P)}finally{b=b.parent}}runGuarded(n,o=null,p,P){b={parent:b,zone:this};try{try{return this._zoneDelegate.invoke(this,n,o,p,P)}catch(q){if(this._zoneDelegate.handleError(this,q))throw q}}finally{b=b.parent}}runTask(n,o,p){if(n.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(n.zone||K).name+"; Execution: "+this.name+")");const P=n,{type:q,data:{isPeriodic:A=!1,isRefreshable:_e=!1}={}}=n;if(n.state===X&&(q===z||q===g))return;const he=n.state!=H;he&&P._transitionTo(H,h);const de=S;S=P,b={parent:b,zone:this};try{q==g&&n.data&&!A&&!_e&&(n.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,P,o,p)}catch(oe){if(this._zoneDelegate.handleError(this,oe))throw oe}}finally{const oe=n.state;if(oe!==X&&oe!==Y)if(q==z||A||_e&&oe===k)he&&P._transitionTo(h,H,k);else{const f=P._zoneDelegates;this._updateTaskCount(P,-1),he&&P._transitionTo(X,H,X),_e&&(P._zoneDelegates=f)}b=b.parent,S=de}}scheduleTask(n){if(n.zone&&n.zone!==this){let p=this;for(;p;){if(p===n.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${n.zone.name}`);p=p.parent}}n._transitionTo(k,X);const o=[];n._zoneDelegates=o,n._zone=this;try{n=this._zoneDelegate.scheduleTask(this,n)}catch(p){throw n._transitionTo(Y,k,X),this._zoneDelegate.handleError(this,p),p}return n._zoneDelegates===o&&this._updateTaskCount(n,1),n.state==k&&n._transitionTo(h,k),n}scheduleMicroTask(n,o,p,P){return this.scheduleTask(new E(G,n,o,p,P,void 0))}scheduleMacroTask(n,o,p,P,q){return this.scheduleTask(new E(g,n,o,p,P,q))}scheduleEventTask(n,o,p,P,q){return this.scheduleTask(new E(z,n,o,p,P,q))}cancelTask(n){if(n.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(n.zone||K).name+"; Execution: "+this.name+")");if(n.state===h||n.state===H){n._transitionTo(V,h,H);try{this._zoneDelegate.cancelTask(this,n)}catch(o){throw n._transitionTo(Y,V),this._zoneDelegate.handleError(this,o),o}return this._updateTaskCount(n,-1),n._transitionTo(X,V),n.runCount=-1,n}}_updateTaskCount(n,o){const p=n._zoneDelegates;-1==o&&(n._zoneDelegates=null);for(let P=0;PN.hasTask(n,o),onScheduleTask:(N,_,n,o)=>N.scheduleTask(n,o),onInvokeTask:(N,_,n,o,p,P)=>N.invokeTask(n,o,p,P),onCancelTask:(N,_,n,o)=>N.cancelTask(n,o)};class u{get zone(){return this._zone}constructor(_,n,o){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this._zone=_,this._parentDelegate=n,this._forkZS=o&&(o&&o.onFork?o:n._forkZS),this._forkDlgt=o&&(o.onFork?n:n._forkDlgt),this._forkCurrZone=o&&(o.onFork?this._zone:n._forkCurrZone),this._interceptZS=o&&(o.onIntercept?o:n._interceptZS),this._interceptDlgt=o&&(o.onIntercept?n:n._interceptDlgt),this._interceptCurrZone=o&&(o.onIntercept?this._zone:n._interceptCurrZone),this._invokeZS=o&&(o.onInvoke?o:n._invokeZS),this._invokeDlgt=o&&(o.onInvoke?n:n._invokeDlgt),this._invokeCurrZone=o&&(o.onInvoke?this._zone:n._invokeCurrZone),this._handleErrorZS=o&&(o.onHandleError?o:n._handleErrorZS),this._handleErrorDlgt=o&&(o.onHandleError?n:n._handleErrorDlgt),this._handleErrorCurrZone=o&&(o.onHandleError?this._zone:n._handleErrorCurrZone),this._scheduleTaskZS=o&&(o.onScheduleTask?o:n._scheduleTaskZS),this._scheduleTaskDlgt=o&&(o.onScheduleTask?n:n._scheduleTaskDlgt),this._scheduleTaskCurrZone=o&&(o.onScheduleTask?this._zone:n._scheduleTaskCurrZone),this._invokeTaskZS=o&&(o.onInvokeTask?o:n._invokeTaskZS),this._invokeTaskDlgt=o&&(o.onInvokeTask?n:n._invokeTaskDlgt),this._invokeTaskCurrZone=o&&(o.onInvokeTask?this._zone:n._invokeTaskCurrZone),this._cancelTaskZS=o&&(o.onCancelTask?o:n._cancelTaskZS),this._cancelTaskDlgt=o&&(o.onCancelTask?n:n._cancelTaskDlgt),this._cancelTaskCurrZone=o&&(o.onCancelTask?this._zone:n._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const p=o&&o.onHasTask;(p||n&&n._hasTaskZS)&&(this._hasTaskZS=p?o:i,this._hasTaskDlgt=n,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=this._zone,o.onScheduleTask||(this._scheduleTaskZS=i,this._scheduleTaskDlgt=n,this._scheduleTaskCurrZone=this._zone),o.onInvokeTask||(this._invokeTaskZS=i,this._invokeTaskDlgt=n,this._invokeTaskCurrZone=this._zone),o.onCancelTask||(this._cancelTaskZS=i,this._cancelTaskDlgt=n,this._cancelTaskCurrZone=this._zone))}fork(_,n){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,_,n):new t(_,n)}intercept(_,n,o){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,_,n,o):n}invoke(_,n,o,p,P){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,_,n,o,p,P):n.apply(o,p)}handleError(_,n){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,_,n)}scheduleTask(_,n){let o=n;if(this._scheduleTaskZS)this._hasTaskZS&&o._zoneDelegates.push(this._hasTaskDlgtOwner),o=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,_,n),o||(o=n);else if(n.scheduleFn)n.scheduleFn(n);else{if(n.type!=G)throw new Error("Task is missing scheduleFn.");U(n)}return o}invokeTask(_,n,o,p){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,_,n,o,p):n.callback.apply(o,p)}cancelTask(_,n){let o;if(this._cancelTaskZS)o=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,_,n);else{if(!n.cancelFn)throw Error("Task is not cancelable");o=n.cancelFn(n)}return o}hasTask(_,n){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,_,n)}catch(o){this.handleError(_,o)}}_updateTaskCount(_,n){const o=this._taskCounts,p=o[_],P=o[_]=p+n;if(P<0)throw new Error("More tasks executed then were scheduled.");0!=p&&0!=P||this.hasTask(this._zone,{microTask:o.microTask>0,macroTask:o.macroTask>0,eventTask:o.eventTask>0,change:_})}}class E{constructor(_,n,o,p,P,q){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=_,this.source=n,this.data=p,this.scheduleFn=P,this.cancelFn=q,!o)throw new Error("callback is not defined");this.callback=o;const A=this;this.invoke=_===z&&p&&p.useG?E.invokeTask:function(){return E.invokeTask.call(te,A,this,arguments)}}static invokeTask(_,n,o){_||(_=this),Q++;try{return _.runCount++,_.zone.runTask(_,n,o)}finally{1==Q&&J(),Q--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(X,k)}_transitionTo(_,n,o){if(this._state!==n&&this._state!==o)throw new Error(`${this.type} '${this.source}': can not transition to '${_}', expecting state '${n}'${o?" or '"+o+"'":""}, was '${this._state}'.`);this._state=_,_==X&&(this._zoneDelegates=null)}toString(){return this.data&&typeof this.data.handleId<"u"?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}const T=ee("setTimeout"),y=ee("Promise"),D=ee("then");let Z,d=[],w=!1;function x(N){if(Z||te[y]&&(Z=te[y].resolve(0)),Z){let _=Z[D];_||(_=Z.then),_.call(Z,N)}else te[T](N,0)}function U(N){0===Q&&0===d.length&&x(J),N&&d.push(N)}function J(){if(!w){for(w=!0;d.length;){const N=d;d=[];for(let _=0;_b,onUnhandledError:W,microtaskDrainDone:W,scheduleMicroTask:U,showUncaughtError:()=>!t[ee("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:W,patchMethod:()=>W,bindArguments:()=>[],patchThen:()=>W,patchMacroTask:()=>W,patchEventPrototype:()=>W,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>W,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>W,wrapWithCurrentZone:()=>W,filterProperties:()=>[],attachOriginToPatched:()=>W,_redefineProperty:()=>W,patchCallbacks:()=>W,nativeScheduleMicroTask:x};let b={parent:null,zone:new t(null,null)},S=null,Q=0;function W(){}return c("Zone","Zone"),t}(),e.Zone}();(function Zt(e){(function Nt(e){e.__load_patch("ZoneAwarePromise",(r,c,t)=>{const i=Object.getOwnPropertyDescriptor,u=Object.defineProperty,T=t.symbol,y=[],D=!1!==r[T("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],d=T("Promise"),w=T("then"),Z="__creationTrace__";t.onUnhandledError=f=>{if(t.showUncaughtError()){const a=f&&f.rejection;a?console.error("Unhandled Promise rejection:",a instanceof Error?a.message:a,"; Zone:",f.zone.name,"; Task:",f.task&&f.task.source,"; Value:",a,a instanceof Error?a.stack:void 0):console.error(f)}},t.microtaskDrainDone=()=>{for(;y.length;){const f=y.shift();try{f.zone.runGuarded(()=>{throw f.throwOriginal?f.rejection:f})}catch(a){U(a)}}};const x=T("unhandledPromiseRejectionHandler");function U(f){t.onUnhandledError(f);try{const a=c[x];"function"==typeof a&&a.call(this,f)}catch{}}function J(f){return f&&f.then}function K(f){return f}function X(f){return A.reject(f)}const k=T("state"),h=T("value"),H=T("finally"),V=T("parentPromiseValue"),Y=T("parentPromiseState"),G="Promise.then",g=null,z=!0,O=!1,R=0;function b(f,a){return s=>{try{N(f,a,s)}catch(l){N(f,!1,l)}}}const S=function(){let f=!1;return function(s){return function(){f||(f=!0,s.apply(null,arguments))}}},Q="Promise resolved with itself",W=T("currentTaskTrace");function N(f,a,s){const l=S();if(f===s)throw new TypeError(Q);if(f[k]===g){let v=null;try{("object"==typeof s||"function"==typeof s)&&(v=s&&s.then)}catch(C){return l(()=>{N(f,!1,C)})(),f}if(a!==O&&s instanceof A&&s.hasOwnProperty(k)&&s.hasOwnProperty(h)&&s[k]!==g)n(s),N(f,s[k],s[h]);else if(a!==O&&"function"==typeof v)try{v.call(s,l(b(f,a)),l(b(f,!1)))}catch(C){l(()=>{N(f,!1,C)})()}else{f[k]=a;const C=f[h];if(f[h]=s,f[H]===H&&a===z&&(f[k]=f[Y],f[h]=f[V]),a===O&&s instanceof Error){const m=c.currentTask&&c.currentTask.data&&c.currentTask.data[Z];m&&u(s,W,{configurable:!0,enumerable:!1,writable:!0,value:m})}for(let m=0;m{try{const L=f[h],I=!!s&&H===s[H];I&&(s[V]=L,s[Y]=C);const M=a.run(m,void 0,I&&m!==X&&m!==K?[]:[L]);N(s,!0,M)}catch(L){N(s,!1,L)}},s)}const P=function(){},q=r.AggregateError;class A{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(a){return a instanceof A?a:N(new this(null),z,a)}static reject(a){return N(new this(null),O,a)}static withResolvers(){const a={};return a.promise=new A((s,l)=>{a.resolve=s,a.reject=l}),a}static any(a){if(!a||"function"!=typeof a[Symbol.iterator])return Promise.reject(new q([],"All promises were rejected"));const s=[];let l=0;try{for(let m of a)l++,s.push(A.resolve(m))}catch{return Promise.reject(new q([],"All promises were rejected"))}if(0===l)return Promise.reject(new q([],"All promises were rejected"));let v=!1;const C=[];return new A((m,L)=>{for(let I=0;I{v||(v=!0,m(M))},M=>{C.push(M),l--,0===l&&(v=!0,L(new q(C,"All promises were rejected")))})})}static race(a){let s,l,v=new this((L,I)=>{s=L,l=I});function C(L){s(L)}function m(L){l(L)}for(let L of a)J(L)||(L=this.resolve(L)),L.then(C,m);return v}static all(a){return A.allWithCallback(a)}static allSettled(a){return(this&&this.prototype instanceof A?this:A).allWithCallback(a,{thenCallback:l=>({status:"fulfilled",value:l}),errorCallback:l=>({status:"rejected",reason:l})})}static allWithCallback(a,s){let l,v,C=new this((M,F)=>{l=M,v=F}),m=2,L=0;const I=[];for(let M of a){J(M)||(M=this.resolve(M));const F=L;try{M.then(B=>{I[F]=s?s.thenCallback(B):B,m--,0===m&&l(I)},B=>{s?(I[F]=s.errorCallback(B),m--,0===m&&l(I)):v(B)})}catch(B){v(B)}m++,L++}return m-=2,0===m&&l(I),C}constructor(a){const s=this;if(!(s instanceof A))throw new Error("Must be an instanceof Promise.");s[k]=g,s[h]=[];try{const l=S();a&&a(l(b(s,z)),l(b(s,O)))}catch(l){N(s,!1,l)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return A}then(a,s){let l=this.constructor?.[Symbol.species];(!l||"function"!=typeof l)&&(l=this.constructor||A);const v=new l(P),C=c.current;return this[k]==g?this[h].push(C,v,a,s):o(this,C,v,a,s),v}catch(a){return this.then(null,a)}finally(a){let s=this.constructor?.[Symbol.species];(!s||"function"!=typeof s)&&(s=A);const l=new s(P);l[H]=H;const v=c.current;return this[k]==g?this[h].push(v,l,a,a):o(this,v,l,a,a),l}}A.resolve=A.resolve,A.reject=A.reject,A.race=A.race,A.all=A.all;const _e=r[d]=r.Promise;r.Promise=A;const he=T("thenPatched");function de(f){const a=f.prototype,s=i(a,"then");if(s&&(!1===s.writable||!s.configurable))return;const l=a.then;a[w]=l,f.prototype.then=function(v,C){return new A((L,I)=>{l.call(this,L,I)}).then(v,C)},f[he]=!0}return t.patchThen=de,_e&&(de(_e),ue(r,"fetch",f=>function oe(f){return function(a,s){let l=f.apply(a,s);if(l instanceof A)return l;let v=l.constructor;return v[he]||de(v),l}}(f))),Promise[c.__symbol__("uncaughtPromiseErrors")]=y,A})})(e),function Lt(e){e.__load_patch("toString",r=>{const c=Function.prototype.toString,t=j("OriginalDelegate"),i=j("Promise"),u=j("Error"),E=function(){if("function"==typeof this){const d=this[t];if(d)return"function"==typeof d?c.call(d):Object.prototype.toString.call(d);if(this===Promise){const w=r[i];if(w)return c.call(w)}if(this===Error){const w=r[u];if(w)return c.call(w)}}return c.call(this)};E[t]=c,Function.prototype.toString=E;const T=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":T.call(this)}})}(e),function Mt(e){e.__load_patch("util",(r,c,t)=>{const i=Fe(r);t.patchOnProperties=Je,t.patchMethod=ue,t.bindArguments=xe,t.patchMacroTask=yt;const u=c.__symbol__("BLACK_LISTED_EVENTS"),E=c.__symbol__("UNPATCHED_EVENTS");r[E]&&(r[u]=r[E]),r[u]&&(c[u]=c[E]=r[u]),t.patchEventPrototype=Pt,t.patchEventTarget=bt,t.isIEOrEdge=kt,t.ObjectDefineProperty=Ne,t.ObjectGetOwnPropertyDescriptor=ke,t.ObjectCreate=_t,t.ArraySlice=Et,t.patchClass=be,t.wrapWithCurrentZone=je,t.filterProperties=it,t.attachOriginToPatched=fe,t._redefineProperty=Object.defineProperty,t.patchCallbacks=It,t.getGlobalObjects=()=>({globalSources:tt,zoneSymbolEventNames:ne,eventNames:i,isBrowser:Ve,isMix:Xe,isNode:Re,TRUE_STR:ae,FALSE_STR:le,ZONE_SYMBOL_PREFIX:ve,ADD_EVENT_LISTENER_STR:Ie,REMOVE_EVENT_LISTENER_STR:Me})})}(e)})(at),function Ot(e){e.__load_patch("legacy",r=>{const c=r[e.__symbol__("legacyPatch")];c&&c()}),e.__load_patch("timers",r=>{const c="set",t="clear";me(r,c,t,"Timeout"),me(r,c,t,"Interval"),me(r,c,t,"Immediate")}),e.__load_patch("requestAnimationFrame",r=>{me(r,"request","cancel","AnimationFrame"),me(r,"mozRequest","mozCancel","AnimationFrame"),me(r,"webkitRequest","webkitCancel","AnimationFrame")}),e.__load_patch("blocking",(r,c)=>{const t=["alert","prompt","confirm"];for(let i=0;ifunction(D,d){return c.current.run(E,r,d,y)})}),e.__load_patch("EventTarget",(r,c,t)=>{(function Dt(e,r){r.patchEventPrototype(e,r)})(r,t),function Ct(e,r){if(Zone[r.symbol("patchEventTarget")])return;const{eventNames:c,zoneSymbolEventNames:t,TRUE_STR:i,FALSE_STR:u,ZONE_SYMBOL_PREFIX:E}=r.getGlobalObjects();for(let y=0;y{be("MutationObserver"),be("WebKitMutationObserver")}),e.__load_patch("IntersectionObserver",(r,c,t)=>{be("IntersectionObserver")}),e.__load_patch("FileReader",(r,c,t)=>{be("FileReader")}),e.__load_patch("on_property",(r,c,t)=>{!function St(e,r){if(Re&&!Xe||Zone[e.symbol("patchEvents")])return;const c=r.__Zone_ignore_on_properties;let t=[];if(Ve){const i=window;t=t.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);const u=function pt(){try{const e=Te.navigator.userAgent;if(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/"))return!0}catch{}return!1}()?[{target:i,ignoreProperties:["error"]}]:[];ct(i,Fe(i),c&&c.concat(u),Le(i))}t=t.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(let i=0;i{!function Rt(e,r){const{isBrowser:c,isMix:t}=r.getGlobalObjects();(c||t)&&e.customElements&&"customElements"in e&&r.patchCallbacks(r,e.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback","formAssociatedCallback","formDisabledCallback","formResetCallback","formStateRestoreCallback"])}(r,t)}),e.__load_patch("XHR",(r,c)=>{!function D(d){const w=d.XMLHttpRequest;if(!w)return;const Z=w.prototype;let U=Z[Ze],J=Z[Ae];if(!U){const R=d.XMLHttpRequestEventTarget;if(R){const b=R.prototype;U=b[Ze],J=b[Ae]}}const K="readystatechange",X="scheduled";function k(R){const b=R.data,S=b.target;S[E]=!1,S[y]=!1;const Q=S[u];U||(U=S[Ze],J=S[Ae]),Q&&J.call(S,K,Q);const W=S[u]=()=>{if(S.readyState===S.DONE)if(!b.aborted&&S[E]&&R.state===X){const _=S[c.__symbol__("loadfalse")];if(0!==S.status&&_&&_.length>0){const n=R.invoke;R.invoke=function(){const o=S[c.__symbol__("loadfalse")];for(let p=0;pfunction(R,b){return R[i]=0==b[2],R[T]=b[1],V.apply(R,b)}),G=j("fetchTaskAborting"),g=j("fetchTaskScheduling"),z=ue(Z,"send",()=>function(R,b){if(!0===c.current[g]||R[i])return z.apply(R,b);{const S={target:R,url:R[T],isPeriodic:!1,args:b,aborted:!1},Q=He("XMLHttpRequest.send",h,S,k,H);R&&!0===R[y]&&!S.aborted&&Q.state===X&&Q.invoke()}}),O=ue(Z,"abort",()=>function(R,b){const S=function x(R){return R[t]}(R);if(S&&"string"==typeof S.type){if(null==S.cancelFn||S.data&&S.data.aborted)return;S.zone.cancelTask(S)}else if(!0===c.current[G])return O.apply(R,b)})}(r);const t=j("xhrTask"),i=j("xhrSync"),u=j("xhrListener"),E=j("xhrScheduled"),T=j("xhrURL"),y=j("xhrErrorBeforeScheduled")}),e.__load_patch("geolocation",r=>{r.navigator&&r.navigator.geolocation&&function gt(e,r){const c=e.constructor.name;for(let t=0;t{const y=function(){return T.apply(this,xe(arguments,c+"."+i))};return fe(y,T),y})(u)}}}(r.navigator.geolocation,["getCurrentPosition","watchPosition"])}),e.__load_patch("PromiseRejectionEvent",(r,c)=>{function t(i){return function(u){st(r,i).forEach(T=>{const y=r.PromiseRejectionEvent;if(y){const D=new y(i,{promise:u.promise,reason:u.rejection});T.invoke(D)}})}}r.PromiseRejectionEvent&&(c[j("unhandledPromiseRejectionHandler")]=t("unhandledrejection"),c[j("rejectionHandledHandler")]=t("rejectionhandled"))}),e.__load_patch("queueMicrotask",(r,c,t)=>{!function wt(e,r){r.patchMethod(e,"queueMicrotask",c=>function(t,i){Zone.current.scheduleMicroTask("queueMicrotask",i[0])})}(r,t)})}(at)}},te=>{te(te.s=935)}]); \ No newline at end of file diff --git a/docs/polyfills.86aad890f66d0367.js b/docs/polyfills.86aad890f66d0367.js deleted file mode 100644 index f8baf29..0000000 --- a/docs/polyfills.86aad890f66d0367.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkomeglestr=self.webpackChunkomeglestr||[]).push([[461],{935:()=>{const te=globalThis;function ee(e){return(te.__Zone_symbol_prefix||"__zone_symbol__")+e}const ke=Object.getOwnPropertyDescriptor,Ne=Object.defineProperty,Le=Object.getPrototypeOf,_t=Object.create,Et=Array.prototype.slice,Ie="addEventListener",Me="removeEventListener",Ze=ee(Ie),Ae=ee(Me),ae="true",le="false",ve=ee("");function je(e,r){return Zone.current.wrap(e,r)}function He(e,r,c,t,i){return Zone.current.scheduleMacroTask(e,r,c,t,i)}const j=ee,we=typeof window<"u",Te=we?window:void 0,$=we&&Te||globalThis,Tt="removeAttribute";function xe(e,r){for(let c=e.length-1;c>=0;c--)"function"==typeof e[c]&&(e[c]=je(e[c],r+"_"+c));return e}function We(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&typeof e.set>"u")}const qe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,Re=!("nw"in $)&&typeof $.process<"u"&&"[object process]"===$.process.toString(),Ve=!Re&&!qe&&!(!we||!Te.HTMLElement),Xe=typeof $.process<"u"&&"[object process]"===$.process.toString()&&!qe&&!(!we||!Te.HTMLElement),Ce={},mt=j("enable_beforeunload"),Ye=function(e){if(!(e=e||$.event))return;let r=Ce[e.type];r||(r=Ce[e.type]=j("ON_PROPERTY"+e.type));const c=this||e.target||$,t=c[r];let i;return Ve&&c===Te&&"error"===e.type?(i=t&&t.call(this,e.message,e.filename,e.lineno,e.colno,e.error),!0===i&&e.preventDefault()):(i=t&&t.apply(this,arguments),"beforeunload"===e.type&&$[mt]&&"string"==typeof i?e.returnValue=i:null!=i&&!i&&e.preventDefault()),i};function $e(e,r,c){let t=ke(e,r);if(!t&&c&&ke(c,r)&&(t={enumerable:!0,configurable:!0}),!t||!t.configurable)return;const i=j("on"+r+"patched");if(e.hasOwnProperty(i)&&e[i])return;delete t.writable,delete t.value;const u=t.get,E=t.set,T=r.slice(2);let y=Ce[T];y||(y=Ce[T]=j("ON_PROPERTY"+T)),t.set=function(D){let d=this;!d&&e===$&&(d=$),d&&("function"==typeof d[y]&&d.removeEventListener(T,Ye),E&&E.call(d,null),d[y]=D,"function"==typeof D&&d.addEventListener(T,Ye,!1))},t.get=function(){let D=this;if(!D&&e===$&&(D=$),!D)return null;const d=D[y];if(d)return d;if(u){let w=u.call(this);if(w)return t.set.call(this,w),"function"==typeof D[Tt]&&D.removeAttribute(r),w}return null},Ne(e,r,t),e[i]=!0}function Je(e,r,c){if(r)for(let t=0;tfunction(E,T){const y=c(E,T);return y.cbIdx>=0&&"function"==typeof T[y.cbIdx]?He(y.name,T[y.cbIdx],y,i):u.apply(E,T)})}function fe(e,r){e[j("OriginalDelegate")]=r}let Ke=!1,Ge=!1;function kt(){if(Ke)return Ge;Ke=!0;try{const e=Te.navigator.userAgent;(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/")||-1!==e.indexOf("Edge/"))&&(Ge=!0)}catch{}return Ge}function Qe(e){return"function"==typeof e}function et(e){return"number"==typeof e}let ge=!1;if(typeof window<"u")try{const e=Object.defineProperty({},"passive",{get:function(){ge=!0}});window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch{ge=!1}const vt={useG:!0},ne={},tt={},nt=new RegExp("^"+ve+"(\\w+)(true|false)$"),rt=j("propagationStopped");function ot(e,r){const c=(r?r(e):e)+le,t=(r?r(e):e)+ae,i=ve+c,u=ve+t;ne[e]={},ne[e][le]=i,ne[e][ae]=u}function bt(e,r,c,t){const i=t&&t.add||Ie,u=t&&t.rm||Me,E=t&&t.listeners||"eventListeners",T=t&&t.rmAll||"removeAllListeners",y=j(i),D="."+i+":",d="prependListener",w="."+d+":",Z=function(k,h,H){if(k.isRemoved)return;const V=k.callback;let Y;"object"==typeof V&&V.handleEvent&&(k.callback=g=>V.handleEvent(g),k.originalDelegate=V);try{k.invoke(k,h,[H])}catch(g){Y=g}const G=k.options;return G&&"object"==typeof G&&G.once&&h[u].call(h,H.type,k.originalDelegate?k.originalDelegate:k.callback,G),Y};function x(k,h,H){if(!(h=h||e.event))return;const V=k||h.target||e,Y=V[ne[h.type][H?ae:le]];if(Y){const G=[];if(1===Y.length){const g=Z(Y[0],V,h);g&&G.push(g)}else{const g=Y.slice();for(let z=0;z{throw z})}}}const U=function(k){return x(this,k,!1)},J=function(k){return x(this,k,!0)};function K(k,h){if(!k)return!1;let H=!0;h&&void 0!==h.useG&&(H=h.useG);const V=h&&h.vh;let Y=!0;h&&void 0!==h.chkDup&&(Y=h.chkDup);let G=!1;h&&void 0!==h.rt&&(G=h.rt);let g=k;for(;g&&!g.hasOwnProperty(i);)g=Le(g);if(!g&&k[i]&&(g=k),!g||g[y])return!1;const z=h&&h.eventNameToString,O={},R=g[y]=g[i],b=g[j(u)]=g[u],S=g[j(E)]=g[E],Q=g[j(T)]=g[T];let W;h&&h.prepend&&(W=g[j(h.prepend)]=g[h.prepend]);const q=H?function(s){if(!O.isExisting)return R.call(O.target,O.eventName,O.capture?J:U,O.options)}:function(s){return R.call(O.target,O.eventName,s.invoke,O.options)},A=H?function(s){if(!s.isRemoved){const l=ne[s.eventName];let v;l&&(v=l[s.capture?ae:le]);const C=v&&s.target[v];if(C)for(let m=0;mse.zone.cancelTask(se);s.call(ye,"abort",ce,{once:!0}),se.removeAbortListener=()=>ye.removeEventListener("abort",ce)}return O.target=null,Pe&&(Pe.taskData=null),lt&&(O.options.once=!0),!ge&&"boolean"==typeof se.options||(se.options=ie),se.target=I,se.capture=Be,se.eventName=M,B&&(se.originalDelegate=F),L?pe.unshift(se):pe.push(se),m?I:void 0}};return g[i]=a(R,D,q,A,G),W&&(g[d]=a(W,w,function(s){return W.call(O.target,O.eventName,s.invoke,O.options)},A,G,!0)),g[u]=function(){const s=this||e;let l=arguments[0];h&&h.transferEventName&&(l=h.transferEventName(l));const v=arguments[2],C=!!v&&("boolean"==typeof v||v.capture),m=arguments[1];if(!m)return b.apply(this,arguments);if(V&&!V(b,m,s,arguments))return;const L=ne[l];let I;L&&(I=L[C?ae:le]);const M=I&&s[I];if(M)for(let F=0;Ffunction(i,u){i[rt]=!0,t&&t.apply(i,u)})}const De=j("zoneTask");function me(e,r,c,t){let i=null,u=null;c+=t;const E={};function T(D){const d=D.data;d.args[0]=function(){return D.invoke.apply(this,arguments)};const w=i.apply(e,d.args);return et(w)?d.handleId=w:(d.handle=w,d.isRefreshable=Qe(w.refresh)),D}function y(D){const{handle:d,handleId:w}=D.data;return u.call(e,d??w)}i=ue(e,r+=t,D=>function(d,w){if(Qe(w[0])){const Z={isRefreshable:!1,isPeriodic:"Interval"===t,delay:"Timeout"===t||"Interval"===t?w[1]||0:void 0,args:w},x=w[0];w[0]=function(){try{return x.apply(this,arguments)}finally{const{handle:H,handleId:V,isPeriodic:Y,isRefreshable:G}=Z;!Y&&!G&&(V?delete E[V]:H&&(H[De]=null))}};const U=He(r,w[0],Z,T,y);if(!U)return U;const{handleId:J,handle:K,isRefreshable:X,isPeriodic:k}=U.data;if(J)E[J]=U;else if(K&&(K[De]=U,X&&!k)){const h=K.refresh;K.refresh=function(){const{zone:H,state:V}=U;return"notScheduled"===V?(U._state="scheduled",H._updateTaskCount(U,1)):"running"===V&&(U._state="scheduling"),h.call(this)}}return K??J??U}return D.apply(e,w)}),u=ue(e,c,D=>function(d,w){const Z=w[0];let x;et(Z)?(x=E[Z],delete E[Z]):(x=Z?.[De],x?Z[De]=null:x=Z),x?.type?x.cancelFn&&x.zone.cancelTask(x):D.apply(e,w)})}function it(e,r,c){if(!c||0===c.length)return r;const t=c.filter(u=>u.target===e);if(!t||0===t.length)return r;const i=t[0].ignoreProperties;return r.filter(u=>-1===i.indexOf(u))}function ct(e,r,c,t){e&&Je(e,it(e,r,c),t)}function Fe(e){return Object.getOwnPropertyNames(e).filter(r=>r.startsWith("on")&&r.length>2).map(r=>r.substring(2))}function It(e,r,c,t,i){const u=Zone.__symbol__(t);if(r[u])return;const E=r[u]=r[t];r[t]=function(T,y,D){return y&&y.prototype&&i.forEach(function(d){const w=`${c}.${t}::`+d,Z=y.prototype;try{if(Z.hasOwnProperty(d)){const x=e.ObjectGetOwnPropertyDescriptor(Z,d);x&&x.value?(x.value=e.wrapWithCurrentZone(x.value,w),e._redefineProperty(y.prototype,d,x)):Z[d]&&(Z[d]=e.wrapWithCurrentZone(Z[d],w))}else Z[d]&&(Z[d]=e.wrapWithCurrentZone(Z[d],w))}catch{}}),E.call(r,T,y,D)},e.attachOriginToPatched(r[t],E)}const at=function Oe(){const e=globalThis,r=!0===e[ee("forceDuplicateZoneCheck")];if(e.Zone&&(r||"function"!=typeof e.Zone.__symbol__))throw new Error("Zone already loaded.");return e.Zone??=function ze(){const e=te.performance;function r(N){e&&e.mark&&e.mark(N)}function c(N,_){e&&e.measure&&e.measure(N,_)}r("Zone");let t=(()=>{class N{static#e=this.__symbol__=ee;static assertZonePatched(){if(te.Promise!==O.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let n=N.current;for(;n.parent;)n=n.parent;return n}static get current(){return b.zone}static get currentTask(){return S}static __load_patch(n,o,p=!1){if(O.hasOwnProperty(n)){const P=!0===te[ee("forceDuplicateZoneCheck")];if(!p&&P)throw Error("Already loaded patch: "+n)}else if(!te["__Zone_disable_"+n]){const P="Zone:"+n;r(P),O[n]=o(te,N,R),c(P,P)}}get parent(){return this._parent}get name(){return this._name}constructor(n,o){this._parent=n,this._name=o?o.name||"unnamed":"",this._properties=o&&o.properties||{},this._zoneDelegate=new u(this,this._parent&&this._parent._zoneDelegate,o)}get(n){const o=this.getZoneWith(n);if(o)return o._properties[n]}getZoneWith(n){let o=this;for(;o;){if(o._properties.hasOwnProperty(n))return o;o=o._parent}return null}fork(n){if(!n)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,n)}wrap(n,o){if("function"!=typeof n)throw new Error("Expecting function got: "+n);const p=this._zoneDelegate.intercept(this,n,o),P=this;return function(){return P.runGuarded(p,this,arguments,o)}}run(n,o,p,P){b={parent:b,zone:this};try{return this._zoneDelegate.invoke(this,n,o,p,P)}finally{b=b.parent}}runGuarded(n,o=null,p,P){b={parent:b,zone:this};try{try{return this._zoneDelegate.invoke(this,n,o,p,P)}catch(q){if(this._zoneDelegate.handleError(this,q))throw q}}finally{b=b.parent}}runTask(n,o,p){if(n.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(n.zone||K).name+"; Execution: "+this.name+")");const P=n,{type:q,data:{isPeriodic:A=!1,isRefreshable:_e=!1}={}}=n;if(n.state===X&&(q===z||q===g))return;const he=n.state!=H;he&&P._transitionTo(H,h);const de=S;S=P,b={parent:b,zone:this};try{q==g&&n.data&&!A&&!_e&&(n.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,P,o,p)}catch(oe){if(this._zoneDelegate.handleError(this,oe))throw oe}}finally{const oe=n.state;if(oe!==X&&oe!==Y)if(q==z||A||_e&&oe===k)he&&P._transitionTo(h,H,k);else{const f=P._zoneDelegates;this._updateTaskCount(P,-1),he&&P._transitionTo(X,H,X),_e&&(P._zoneDelegates=f)}b=b.parent,S=de}}scheduleTask(n){if(n.zone&&n.zone!==this){let p=this;for(;p;){if(p===n.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${n.zone.name}`);p=p.parent}}n._transitionTo(k,X);const o=[];n._zoneDelegates=o,n._zone=this;try{n=this._zoneDelegate.scheduleTask(this,n)}catch(p){throw n._transitionTo(Y,k,X),this._zoneDelegate.handleError(this,p),p}return n._zoneDelegates===o&&this._updateTaskCount(n,1),n.state==k&&n._transitionTo(h,k),n}scheduleMicroTask(n,o,p,P){return this.scheduleTask(new E(G,n,o,p,P,void 0))}scheduleMacroTask(n,o,p,P,q){return this.scheduleTask(new E(g,n,o,p,P,q))}scheduleEventTask(n,o,p,P,q){return this.scheduleTask(new E(z,n,o,p,P,q))}cancelTask(n){if(n.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(n.zone||K).name+"; Execution: "+this.name+")");if(n.state===h||n.state===H){n._transitionTo(V,h,H);try{this._zoneDelegate.cancelTask(this,n)}catch(o){throw n._transitionTo(Y,V),this._zoneDelegate.handleError(this,o),o}return this._updateTaskCount(n,-1),n._transitionTo(X,V),n.runCount=-1,n}}_updateTaskCount(n,o){const p=n._zoneDelegates;-1==o&&(n._zoneDelegates=null);for(let P=0;PN.hasTask(n,o),onScheduleTask:(N,_,n,o)=>N.scheduleTask(n,o),onInvokeTask:(N,_,n,o,p,P)=>N.invokeTask(n,o,p,P),onCancelTask:(N,_,n,o)=>N.cancelTask(n,o)};class u{get zone(){return this._zone}constructor(_,n,o){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this._zone=_,this._parentDelegate=n,this._forkZS=o&&(o&&o.onFork?o:n._forkZS),this._forkDlgt=o&&(o.onFork?n:n._forkDlgt),this._forkCurrZone=o&&(o.onFork?this._zone:n._forkCurrZone),this._interceptZS=o&&(o.onIntercept?o:n._interceptZS),this._interceptDlgt=o&&(o.onIntercept?n:n._interceptDlgt),this._interceptCurrZone=o&&(o.onIntercept?this._zone:n._interceptCurrZone),this._invokeZS=o&&(o.onInvoke?o:n._invokeZS),this._invokeDlgt=o&&(o.onInvoke?n:n._invokeDlgt),this._invokeCurrZone=o&&(o.onInvoke?this._zone:n._invokeCurrZone),this._handleErrorZS=o&&(o.onHandleError?o:n._handleErrorZS),this._handleErrorDlgt=o&&(o.onHandleError?n:n._handleErrorDlgt),this._handleErrorCurrZone=o&&(o.onHandleError?this._zone:n._handleErrorCurrZone),this._scheduleTaskZS=o&&(o.onScheduleTask?o:n._scheduleTaskZS),this._scheduleTaskDlgt=o&&(o.onScheduleTask?n:n._scheduleTaskDlgt),this._scheduleTaskCurrZone=o&&(o.onScheduleTask?this._zone:n._scheduleTaskCurrZone),this._invokeTaskZS=o&&(o.onInvokeTask?o:n._invokeTaskZS),this._invokeTaskDlgt=o&&(o.onInvokeTask?n:n._invokeTaskDlgt),this._invokeTaskCurrZone=o&&(o.onInvokeTask?this._zone:n._invokeTaskCurrZone),this._cancelTaskZS=o&&(o.onCancelTask?o:n._cancelTaskZS),this._cancelTaskDlgt=o&&(o.onCancelTask?n:n._cancelTaskDlgt),this._cancelTaskCurrZone=o&&(o.onCancelTask?this._zone:n._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const p=o&&o.onHasTask;(p||n&&n._hasTaskZS)&&(this._hasTaskZS=p?o:i,this._hasTaskDlgt=n,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=this._zone,o.onScheduleTask||(this._scheduleTaskZS=i,this._scheduleTaskDlgt=n,this._scheduleTaskCurrZone=this._zone),o.onInvokeTask||(this._invokeTaskZS=i,this._invokeTaskDlgt=n,this._invokeTaskCurrZone=this._zone),o.onCancelTask||(this._cancelTaskZS=i,this._cancelTaskDlgt=n,this._cancelTaskCurrZone=this._zone))}fork(_,n){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,_,n):new t(_,n)}intercept(_,n,o){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,_,n,o):n}invoke(_,n,o,p,P){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,_,n,o,p,P):n.apply(o,p)}handleError(_,n){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,_,n)}scheduleTask(_,n){let o=n;if(this._scheduleTaskZS)this._hasTaskZS&&o._zoneDelegates.push(this._hasTaskDlgtOwner),o=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,_,n),o||(o=n);else if(n.scheduleFn)n.scheduleFn(n);else{if(n.type!=G)throw new Error("Task is missing scheduleFn.");U(n)}return o}invokeTask(_,n,o,p){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,_,n,o,p):n.callback.apply(o,p)}cancelTask(_,n){let o;if(this._cancelTaskZS)o=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,_,n);else{if(!n.cancelFn)throw Error("Task is not cancelable");o=n.cancelFn(n)}return o}hasTask(_,n){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,_,n)}catch(o){this.handleError(_,o)}}_updateTaskCount(_,n){const o=this._taskCounts,p=o[_],P=o[_]=p+n;if(P<0)throw new Error("More tasks executed then were scheduled.");0!=p&&0!=P||this.hasTask(this._zone,{microTask:o.microTask>0,macroTask:o.macroTask>0,eventTask:o.eventTask>0,change:_})}}class E{constructor(_,n,o,p,P,q){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=_,this.source=n,this.data=p,this.scheduleFn=P,this.cancelFn=q,!o)throw new Error("callback is not defined");this.callback=o;const A=this;this.invoke=_===z&&p&&p.useG?E.invokeTask:function(){return E.invokeTask.call(te,A,this,arguments)}}static invokeTask(_,n,o){_||(_=this),Q++;try{return _.runCount++,_.zone.runTask(_,n,o)}finally{1==Q&&J(),Q--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(X,k)}_transitionTo(_,n,o){if(this._state!==n&&this._state!==o)throw new Error(`${this.type} '${this.source}': can not transition to '${_}', expecting state '${n}'${o?" or '"+o+"'":""}, was '${this._state}'.`);this._state=_,_==X&&(this._zoneDelegates=null)}toString(){return this.data&&typeof this.data.handleId<"u"?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}const T=ee("setTimeout"),y=ee("Promise"),D=ee("then");let Z,d=[],w=!1;function x(N){if(Z||te[y]&&(Z=te[y].resolve(0)),Z){let _=Z[D];_||(_=Z.then),_.call(Z,N)}else te[T](N,0)}function U(N){0===Q&&0===d.length&&x(J),N&&d.push(N)}function J(){if(!w){for(w=!0;d.length;){const N=d;d=[];for(let _=0;_b,onUnhandledError:W,microtaskDrainDone:W,scheduleMicroTask:U,showUncaughtError:()=>!t[ee("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:W,patchMethod:()=>W,bindArguments:()=>[],patchThen:()=>W,patchMacroTask:()=>W,patchEventPrototype:()=>W,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>W,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>W,wrapWithCurrentZone:()=>W,filterProperties:()=>[],attachOriginToPatched:()=>W,_redefineProperty:()=>W,patchCallbacks:()=>W,nativeScheduleMicroTask:x};let b={parent:null,zone:new t(null,null)},S=null,Q=0;function W(){}return c("Zone","Zone"),t}(),e.Zone}();(function Zt(e){(function Nt(e){e.__load_patch("ZoneAwarePromise",(r,c,t)=>{const i=Object.getOwnPropertyDescriptor,u=Object.defineProperty,T=t.symbol,y=[],D=!1!==r[T("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],d=T("Promise"),w=T("then"),Z="__creationTrace__";t.onUnhandledError=f=>{if(t.showUncaughtError()){const a=f&&f.rejection;a?console.error("Unhandled Promise rejection:",a instanceof Error?a.message:a,"; Zone:",f.zone.name,"; Task:",f.task&&f.task.source,"; Value:",a,a instanceof Error?a.stack:void 0):console.error(f)}},t.microtaskDrainDone=()=>{for(;y.length;){const f=y.shift();try{f.zone.runGuarded(()=>{throw f.throwOriginal?f.rejection:f})}catch(a){U(a)}}};const x=T("unhandledPromiseRejectionHandler");function U(f){t.onUnhandledError(f);try{const a=c[x];"function"==typeof a&&a.call(this,f)}catch{}}function J(f){return f&&f.then}function K(f){return f}function X(f){return A.reject(f)}const k=T("state"),h=T("value"),H=T("finally"),V=T("parentPromiseValue"),Y=T("parentPromiseState"),G="Promise.then",g=null,z=!0,O=!1,R=0;function b(f,a){return s=>{try{N(f,a,s)}catch(l){N(f,!1,l)}}}const S=function(){let f=!1;return function(s){return function(){f||(f=!0,s.apply(null,arguments))}}},Q="Promise resolved with itself",W=T("currentTaskTrace");function N(f,a,s){const l=S();if(f===s)throw new TypeError(Q);if(f[k]===g){let v=null;try{("object"==typeof s||"function"==typeof s)&&(v=s&&s.then)}catch(C){return l(()=>{N(f,!1,C)})(),f}if(a!==O&&s instanceof A&&s.hasOwnProperty(k)&&s.hasOwnProperty(h)&&s[k]!==g)n(s),N(f,s[k],s[h]);else if(a!==O&&"function"==typeof v)try{v.call(s,l(b(f,a)),l(b(f,!1)))}catch(C){l(()=>{N(f,!1,C)})()}else{f[k]=a;const C=f[h];if(f[h]=s,f[H]===H&&a===z&&(f[k]=f[Y],f[h]=f[V]),a===O&&s instanceof Error){const m=c.currentTask&&c.currentTask.data&&c.currentTask.data[Z];m&&u(s,W,{configurable:!0,enumerable:!1,writable:!0,value:m})}for(let m=0;m{try{const L=f[h],I=!!s&&H===s[H];I&&(s[V]=L,s[Y]=C);const M=a.run(m,void 0,I&&m!==X&&m!==K?[]:[L]);N(s,!0,M)}catch(L){N(s,!1,L)}},s)}const P=function(){},q=r.AggregateError;class A{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(a){return a instanceof A?a:N(new this(null),z,a)}static reject(a){return N(new this(null),O,a)}static withResolvers(){const a={};return a.promise=new A((s,l)=>{a.resolve=s,a.reject=l}),a}static any(a){if(!a||"function"!=typeof a[Symbol.iterator])return Promise.reject(new q([],"All promises were rejected"));const s=[];let l=0;try{for(let m of a)l++,s.push(A.resolve(m))}catch{return Promise.reject(new q([],"All promises were rejected"))}if(0===l)return Promise.reject(new q([],"All promises were rejected"));let v=!1;const C=[];return new A((m,L)=>{for(let I=0;I{v||(v=!0,m(M))},M=>{C.push(M),l--,0===l&&(v=!0,L(new q(C,"All promises were rejected")))})})}static race(a){let s,l,v=new this((L,I)=>{s=L,l=I});function C(L){s(L)}function m(L){l(L)}for(let L of a)J(L)||(L=this.resolve(L)),L.then(C,m);return v}static all(a){return A.allWithCallback(a)}static allSettled(a){return(this&&this.prototype instanceof A?this:A).allWithCallback(a,{thenCallback:l=>({status:"fulfilled",value:l}),errorCallback:l=>({status:"rejected",reason:l})})}static allWithCallback(a,s){let l,v,C=new this((M,F)=>{l=M,v=F}),m=2,L=0;const I=[];for(let M of a){J(M)||(M=this.resolve(M));const F=L;try{M.then(B=>{I[F]=s?s.thenCallback(B):B,m--,0===m&&l(I)},B=>{s?(I[F]=s.errorCallback(B),m--,0===m&&l(I)):v(B)})}catch(B){v(B)}m++,L++}return m-=2,0===m&&l(I),C}constructor(a){const s=this;if(!(s instanceof A))throw new Error("Must be an instanceof Promise.");s[k]=g,s[h]=[];try{const l=S();a&&a(l(b(s,z)),l(b(s,O)))}catch(l){N(s,!1,l)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return A}then(a,s){let l=this.constructor?.[Symbol.species];(!l||"function"!=typeof l)&&(l=this.constructor||A);const v=new l(P),C=c.current;return this[k]==g?this[h].push(C,v,a,s):o(this,C,v,a,s),v}catch(a){return this.then(null,a)}finally(a){let s=this.constructor?.[Symbol.species];(!s||"function"!=typeof s)&&(s=A);const l=new s(P);l[H]=H;const v=c.current;return this[k]==g?this[h].push(v,l,a,a):o(this,v,l,a,a),l}}A.resolve=A.resolve,A.reject=A.reject,A.race=A.race,A.all=A.all;const _e=r[d]=r.Promise;r.Promise=A;const he=T("thenPatched");function de(f){const a=f.prototype,s=i(a,"then");if(s&&(!1===s.writable||!s.configurable))return;const l=a.then;a[w]=l,f.prototype.then=function(v,C){return new A((L,I)=>{l.call(this,L,I)}).then(v,C)},f[he]=!0}return t.patchThen=de,_e&&(de(_e),ue(r,"fetch",f=>function oe(f){return function(a,s){let l=f.apply(a,s);if(l instanceof A)return l;let v=l.constructor;return v[he]||de(v),l}}(f))),Promise[c.__symbol__("uncaughtPromiseErrors")]=y,A})})(e),function Lt(e){e.__load_patch("toString",r=>{const c=Function.prototype.toString,t=j("OriginalDelegate"),i=j("Promise"),u=j("Error"),E=function(){if("function"==typeof this){const d=this[t];if(d)return"function"==typeof d?c.call(d):Object.prototype.toString.call(d);if(this===Promise){const w=r[i];if(w)return c.call(w)}if(this===Error){const w=r[u];if(w)return c.call(w)}}return c.call(this)};E[t]=c,Function.prototype.toString=E;const T=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":T.call(this)}})}(e),function Mt(e){e.__load_patch("util",(r,c,t)=>{const i=Fe(r);t.patchOnProperties=Je,t.patchMethod=ue,t.bindArguments=xe,t.patchMacroTask=yt;const u=c.__symbol__("BLACK_LISTED_EVENTS"),E=c.__symbol__("UNPATCHED_EVENTS");r[E]&&(r[u]=r[E]),r[u]&&(c[u]=c[E]=r[u]),t.patchEventPrototype=Pt,t.patchEventTarget=bt,t.isIEOrEdge=kt,t.ObjectDefineProperty=Ne,t.ObjectGetOwnPropertyDescriptor=ke,t.ObjectCreate=_t,t.ArraySlice=Et,t.patchClass=be,t.wrapWithCurrentZone=je,t.filterProperties=it,t.attachOriginToPatched=fe,t._redefineProperty=Object.defineProperty,t.patchCallbacks=It,t.getGlobalObjects=()=>({globalSources:tt,zoneSymbolEventNames:ne,eventNames:i,isBrowser:Ve,isMix:Xe,isNode:Re,TRUE_STR:ae,FALSE_STR:le,ZONE_SYMBOL_PREFIX:ve,ADD_EVENT_LISTENER_STR:Ie,REMOVE_EVENT_LISTENER_STR:Me})})}(e)})(at),function Ot(e){e.__load_patch("legacy",r=>{const c=r[e.__symbol__("legacyPatch")];c&&c()}),e.__load_patch("timers",r=>{const c="set",t="clear";me(r,c,t,"Timeout"),me(r,c,t,"Interval"),me(r,c,t,"Immediate")}),e.__load_patch("requestAnimationFrame",r=>{me(r,"request","cancel","AnimationFrame"),me(r,"mozRequest","mozCancel","AnimationFrame"),me(r,"webkitRequest","webkitCancel","AnimationFrame")}),e.__load_patch("blocking",(r,c)=>{const t=["alert","prompt","confirm"];for(let i=0;ifunction(D,d){return c.current.run(E,r,d,y)})}),e.__load_patch("EventTarget",(r,c,t)=>{(function Dt(e,r){r.patchEventPrototype(e,r)})(r,t),function Ct(e,r){if(Zone[r.symbol("patchEventTarget")])return;const{eventNames:c,zoneSymbolEventNames:t,TRUE_STR:i,FALSE_STR:u,ZONE_SYMBOL_PREFIX:E}=r.getGlobalObjects();for(let y=0;y{be("MutationObserver"),be("WebKitMutationObserver")}),e.__load_patch("IntersectionObserver",(r,c,t)=>{be("IntersectionObserver")}),e.__load_patch("FileReader",(r,c,t)=>{be("FileReader")}),e.__load_patch("on_property",(r,c,t)=>{!function St(e,r){if(Re&&!Xe||Zone[e.symbol("patchEvents")])return;const c=r.__Zone_ignore_on_properties;let t=[];if(Ve){const i=window;t=t.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);const u=function pt(){try{const e=Te.navigator.userAgent;if(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/"))return!0}catch{}return!1}()?[{target:i,ignoreProperties:["error"]}]:[];ct(i,Fe(i),c&&c.concat(u),Le(i))}t=t.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(let i=0;i{!function Rt(e,r){const{isBrowser:c,isMix:t}=r.getGlobalObjects();(c||t)&&e.customElements&&"customElements"in e&&r.patchCallbacks(r,e.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback","formAssociatedCallback","formDisabledCallback","formResetCallback","formStateRestoreCallback"])}(r,t)}),e.__load_patch("XHR",(r,c)=>{!function D(d){const w=d.XMLHttpRequest;if(!w)return;const Z=w.prototype;let U=Z[Ze],J=Z[Ae];if(!U){const R=d.XMLHttpRequestEventTarget;if(R){const b=R.prototype;U=b[Ze],J=b[Ae]}}const K="readystatechange",X="scheduled";function k(R){const b=R.data,S=b.target;S[E]=!1,S[y]=!1;const Q=S[u];U||(U=S[Ze],J=S[Ae]),Q&&J.call(S,K,Q);const W=S[u]=()=>{if(S.readyState===S.DONE)if(!b.aborted&&S[E]&&R.state===X){const _=S[c.__symbol__("loadfalse")];if(0!==S.status&&_&&_.length>0){const n=R.invoke;R.invoke=function(){const o=S[c.__symbol__("loadfalse")];for(let p=0;pfunction(R,b){return R[i]=0==b[2],R[T]=b[1],V.apply(R,b)}),G=j("fetchTaskAborting"),g=j("fetchTaskScheduling"),z=ue(Z,"send",()=>function(R,b){if(!0===c.current[g]||R[i])return z.apply(R,b);{const S={target:R,url:R[T],isPeriodic:!1,args:b,aborted:!1},Q=He("XMLHttpRequest.send",h,S,k,H);R&&!0===R[y]&&!S.aborted&&Q.state===X&&Q.invoke()}}),O=ue(Z,"abort",()=>function(R,b){const S=function x(R){return R[t]}(R);if(S&&"string"==typeof S.type){if(null==S.cancelFn||S.data&&S.data.aborted)return;S.zone.cancelTask(S)}else if(!0===c.current[G])return O.apply(R,b)})}(r);const t=j("xhrTask"),i=j("xhrSync"),u=j("xhrListener"),E=j("xhrScheduled"),T=j("xhrURL"),y=j("xhrErrorBeforeScheduled")}),e.__load_patch("geolocation",r=>{r.navigator&&r.navigator.geolocation&&function gt(e,r){const c=e.constructor.name;for(let t=0;t{const y=function(){return T.apply(this,xe(arguments,c+"."+i))};return fe(y,T),y})(u)}}}(r.navigator.geolocation,["getCurrentPosition","watchPosition"])}),e.__load_patch("PromiseRejectionEvent",(r,c)=>{function t(i){return function(u){st(r,i).forEach(T=>{const y=r.PromiseRejectionEvent;if(y){const D=new y(i,{promise:u.promise,reason:u.rejection});T.invoke(D)}})}}r.PromiseRejectionEvent&&(c[j("unhandledPromiseRejectionHandler")]=t("unhandledrejection"),c[j("rejectionHandledHandler")]=t("rejectionhandled"))}),e.__load_patch("queueMicrotask",(r,c,t)=>{!function wt(e,r){r.patchMethod(e,"queueMicrotask",c=>function(t,i){Zone.current.scheduleMicroTask("queueMicrotask",i[0])})}(r,t)})}(at)}},te=>{te(te.s=935)}]); \ No newline at end of file diff --git a/docs/runtime.36e1908757eb47d0.js b/docs/runtime.36e1908757eb47d0.js new file mode 100755 index 0000000..5b949b7 --- /dev/null +++ b/docs/runtime.36e1908757eb47d0.js @@ -0,0 +1 @@ +(()=>{"use strict";var e,i={},p={};function r(e){var a=p[e];if(void 0!==a)return a.exports;var t=p[e]={exports:{}};return i[e](t,t.exports,r),t.exports}r.m=i,e=[],r.O=(a,t,o,u)=>{if(!t){var c=1/0;for(n=0;n=u)&&Object.keys(r.O).every(_=>r.O[_](t[l]))?t.splice(l--,1):(s=!1,u0&&e[n-1][2]>u;n--)e[n]=e[n-1];e[n]=[t,o,u]},r.d=(e,a)=>{for(var t in a)r.o(a,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})},r.u=e=>e+".3327f3f3a9dc4b18.js",r.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),r.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:a=>a},typeof trustedTypes<"u"&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="",(()=>{r.b=document.baseURI||self.location.href;var e={121:0};r.O.j=o=>0===e[o];var a=(o,u)=>{var l,f,[n,c,s]=u,d=0;if(n.some(v=>0!==e[v])){for(l in c)r.o(c,l)&&(r.m[l]=c[l]);if(s)var b=s(r)}for(o&&o(u);d{"use strict";var e,d={},i={};function a(e){var l=i[e];if(void 0!==l)return l.exports;var r=i[e]={exports:{}};return d[e](r,r.exports,a),r.exports}a.m=d,e=[],a.O=(l,r,f,o)=>{if(!r){var c=1/0;for(n=0;n=o)&&Object.keys(a.O).every(p=>a.O[p](r[t]))?r.splice(t--,1):(s=!1,o0&&e[n-1][2]>o;n--)e[n]=e[n-1];e[n]=[r,f,o]},a.d=(e,l)=>{for(var r in l)a.o(l,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:l[r]})},a.o=(e,l)=>Object.prototype.hasOwnProperty.call(e,l),a.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={121:0};a.O.j=f=>0===e[f];var l=(f,o)=>{var t,u,[n,c,s]=o,v=0;if(n.some(_=>0!==e[_])){for(t in c)a.o(c,t)&&(a.m[t]=c[t]);if(s)var b=s(a)}for(f&&f(o);vli{margin:.5rem}ul.relayList>li .removeButton{color:#fff;background-color:transparent}ul.relayList>li:before{content:"";display:inline-block;background-color:#0c0;border-radius:2px;width:6px;height:6px;margin-right:8px}@media only screen and (max-width: 56.25em){.description{margin-left:6rem;font-size:2rem}.online{font-size:2rem}}@media only screen and (max-width: 48.125em){.online{display:none}}@media only screen and (max-width: 43.75em){.form{grid-template-columns:10rem 1fr 10rem}.btn{font-size:1.4rem}}@media only screen and (max-width: 31.25em){.conversation{height:90%}.form{height:10%;grid-template-columns:7rem 1fr 7rem}.btn{font-size:1.2rem}}@media only screen and (max-width: 32.5em){.description{display:none}}@media only screen and (max-width: 28.125em){.logo{height:12rem}}modal-outlet{display:flex;justify-content:center;align-items:center;background-color:#0000001a;border:0;position:fixed;inset:0;z-index:500}modal-outlet>*{margin:4rem auto;display:block;min-width:200px;max-width:250px;background-color:#fff;border-radius:15px;padding:1rem;box-sizing:border-box}.toast-center-center{top:50%;left:50%;transform:translate(-50%,-50%)}.toast-top-center{top:0;right:0;width:100%}.toast-bottom-center{bottom:0;right:0;width:100%}.toast-top-full-width{top:0;right:0;width:100%}.toast-bottom-full-width{bottom:0;right:0;width:100%}.toast-top-left{top:12px;left:12px}.toast-top-right{top:12px;right:12px}.toast-bottom-right{right:12px;bottom:12px}.toast-bottom-left{bottom:12px;left:12px}.toast-title{font-weight:700}.toast-message{word-wrap:break-word}.toast-message a,.toast-message label{color:#fff}.toast-message a:hover{color:#ccc;text-decoration:none}.toast-close-button{position:relative;right:-.3em;top:-.3em;float:right;font-size:20px;font-weight:700;color:#fff;text-shadow:0 1px 0 #ffffff}.toast-close-button:hover,.toast-close-button:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.4}button.toast-close-button{padding:0;cursor:pointer;background:transparent;border:0}.toast-container{pointer-events:none;position:fixed;z-index:999999}.toast-container *{box-sizing:border-box}.toast-container .ngx-toastr{position:relative;overflow:hidden;margin:0 0 6px;padding:15px 15px 15px 50px;width:300px;border-radius:3px;background-position:15px center;background-repeat:no-repeat;background-size:24px;box-shadow:0 0 12px #999;color:#fff}.toast-container .ngx-toastr:hover{box-shadow:0 0 12px #000;opacity:1;cursor:pointer}.toast-info{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCA1MTIgNTEyJyB3aWR0aD0nNTEyJyBoZWlnaHQ9JzUxMic+PHBhdGggZmlsbD0ncmdiKDI1NSwyNTUsMjU1KScgZD0nTTI1NiA4QzExOS4wNDMgOCA4IDExOS4wODMgOCAyNTZjMCAxMzYuOTk3IDExMS4wNDMgMjQ4IDI0OCAyNDhzMjQ4LTExMS4wMDMgMjQ4LTI0OEM1MDQgMTE5LjA4MyAzOTIuOTU3IDggMjU2IDh6bTAgMTEwYzIzLjE5NiAwIDQyIDE4LjgwNCA0MiA0MnMtMTguODA0IDQyLTQyIDQyLTQyLTE4LjgwNC00Mi00MiAxOC44MDQtNDIgNDItNDJ6bTU2IDI1NGMwIDYuNjI3LTUuMzczIDEyLTEyIDEyaC04OGMtNi42MjcgMC0xMi01LjM3My0xMi0xMnYtMjRjMC02LjYyNyA1LjM3My0xMiAxMi0xMmgxMnYtNjRoLTEyYy02LjYyNyAwLTEyLTUuMzczLTEyLTEydi0yNGMwLTYuNjI3IDUuMzczLTEyIDEyLTEyaDY0YzYuNjI3IDAgMTIgNS4zNzMgMTIgMTJ2MTAwaDEyYzYuNjI3IDAgMTIgNS4zNzMgMTIgMTJ2MjR6Jy8+PC9zdmc+)}.toast-error{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCA1MTIgNTEyJyB3aWR0aD0nNTEyJyBoZWlnaHQ9JzUxMic+PHBhdGggZmlsbD0ncmdiKDI1NSwyNTUsMjU1KScgZD0nTTI1NiA4QzExOSA4IDggMTE5IDggMjU2czExMSAyNDggMjQ4IDI0OCAyNDgtMTExIDI0OC0yNDhTMzkzIDggMjU2IDh6bTEyMS42IDMxMy4xYzQuNyA0LjcgNC43IDEyLjMgMCAxN0wzMzggMzc3LjZjLTQuNyA0LjctMTIuMyA0LjctMTcgMEwyNTYgMzEybC02NS4xIDY1LjZjLTQuNyA0LjctMTIuMyA0LjctMTcgMEwxMzQuNCAzMzhjLTQuNy00LjctNC43LTEyLjMgMC0xN2w2NS42LTY1LTY1LjYtNjUuMWMtNC43LTQuNy00LjctMTIuMyAwLTE3bDM5LjYtMzkuNmM0LjctNC43IDEyLjMtNC43IDE3IDBsNjUgNjUuNyA2NS4xLTY1LjZjNC43LTQuNyAxMi4zLTQuNyAxNyAwbDM5LjYgMzkuNmM0LjcgNC43IDQuNyAxMi4zIDAgMTdMMzEyIDI1Nmw2NS42IDY1LjF6Jy8+PC9zdmc+)}.toast-success{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCA1MTIgNTEyJyB3aWR0aD0nNTEyJyBoZWlnaHQ9JzUxMic+PHBhdGggZmlsbD0ncmdiKDI1NSwyNTUsMjU1KScgZD0nTTE3My44OTggNDM5LjQwNGwtMTY2LjQtMTY2LjRjLTkuOTk3LTkuOTk3LTkuOTk3LTI2LjIwNiAwLTM2LjIwNGwzNi4yMDMtMzYuMjA0YzkuOTk3LTkuOTk4IDI2LjIwNy05Ljk5OCAzNi4yMDQgMEwxOTIgMzEyLjY5IDQzMi4wOTUgNzIuNTk2YzkuOTk3LTkuOTk3IDI2LjIwNy05Ljk5NyAzNi4yMDQgMGwzNi4yMDMgMzYuMjA0YzkuOTk3IDkuOTk3IDkuOTk3IDI2LjIwNiAwIDM2LjIwNGwtMjk0LjQgMjk0LjQwMWMtOS45OTggOS45OTctMjYuMjA3IDkuOTk3LTM2LjIwNC0uMDAxeicvPjwvc3ZnPg==)}.toast-warning{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCA1NzYgNTEyJyB3aWR0aD0nNTc2JyBoZWlnaHQ9JzUxMic+PHBhdGggZmlsbD0ncmdiKDI1NSwyNTUsMjU1KScgZD0nTTU2OS41MTcgNDQwLjAxM0M1ODcuOTc1IDQ3Mi4wMDcgNTY0LjgwNiA1MTIgNTI3Ljk0IDUxMkg0OC4wNTRjLTM2LjkzNyAwLTU5Ljk5OS00MC4wNTUtNDEuNTc3LTcxLjk4N0wyNDYuNDIzIDIzLjk4NWMxOC40NjctMzIuMDA5IDY0LjcyLTMxLjk1MSA4My4xNTQgMGwyMzkuOTQgNDE2LjAyOHpNMjg4IDM1NGMtMjUuNDA1IDAtNDYgMjAuNTk1LTQ2IDQ2czIwLjU5NSA0NiA0NiA0NiA0Ni0yMC41OTUgNDYtNDYtMjAuNTk1LTQ2LTQ2LTQ2em0tNDMuNjczLTE2NS4zNDZsNy40MTggMTM2Yy4zNDcgNi4zNjQgNS42MDkgMTEuMzQ2IDExLjk4MiAxMS4zNDZoNDguNTQ2YzYuMzczIDAgMTEuNjM1LTQuOTgyIDExLjk4Mi0xMS4zNDZsNy40MTgtMTM2Yy4zNzUtNi44NzQtNS4wOTgtMTIuNjU0LTExLjk4Mi0xMi42NTRoLTYzLjM4M2MtNi44ODQgMC0xMi4zNTYgNS43OC0xMS45ODEgMTIuNjU0eicvPjwvc3ZnPg==)}.toast-container.toast-top-center .ngx-toastr,.toast-container.toast-bottom-center .ngx-toastr{width:300px;margin-left:auto;margin-right:auto}.toast-container.toast-top-full-width .ngx-toastr,.toast-container.toast-bottom-full-width .ngx-toastr{width:96%;margin-left:auto;margin-right:auto}.ngx-toastr{background-color:#030303;pointer-events:auto}.toast-success{background-color:#51a351}.toast-error{background-color:#bd362f}.toast-info{background-color:#2f96b4}.toast-warning{background-color:#f89406}.toast-progress{position:absolute;left:0;bottom:0;height:4px;background-color:#000;opacity:.4}@media all and (max-width: 240px){.toast-container .ngx-toastr.div{padding:8px 8px 8px 50px;width:11em}.toast-container .toast-close-button{right:-.2em;top:-.2em}}@media all and (min-width: 241px) and (max-width: 480px){.toast-container .ngx-toastr.div{padding:8px 8px 8px 50px;width:18em}.toast-container .toast-close-button{right:-.2em;top:-.2em}}@media all and (min-width: 481px) and (max-width: 768px){.toast-container .ngx-toastr.div{padding:15px 15px 15px 50px;width:25em}} diff --git a/docs/workers/nostr-event-pow.worker.ts b/docs/workers/nostr-event-pow.worker.ts new file mode 100755 index 0000000..efd2b55 --- /dev/null +++ b/docs/workers/nostr-event-pow.worker.ts @@ -0,0 +1,10 @@ +/// + +import { UnsignedEvent } from "nostr-tools"; +import { minePow } from "nostr-tools/nip13"; + +// include pow to event, some relays require it for first event of a new pubkey +addEventListener('message', ({ data }) => { + const powEvent = minePow(data as UnsignedEvent, 10); + postMessage({ data: powEvent }); +}); diff --git a/src/app/pages/chat/chat.component.ts b/src/app/pages/chat/chat.component.ts index 7f628e9..bfb9b19 100755 --- a/src/app/pages/chat/chat.component.ts +++ b/src/app/pages/chat/chat.component.ts @@ -154,7 +154,6 @@ export class ChatComponent implements OnDestroy, OnInit { this.strangeIsTyping = true; this.scrollConversationToTheEnd(); } else if (event.content === 'disconnected') { - debugger; this.strangeIsTyping = false; this.whoDisconnected = MessageAuthor.STRANGE; this.currentState = ChatState.DISCONNECTED; diff --git a/src/styles.scss b/src/styles.scss index 18a1f0c..d7fee4e 100755 --- a/src/styles.scss +++ b/src/styles.scss @@ -98,7 +98,9 @@ body { background-color: #ffdebd; position: absolute; display: none; - top: -.5rem; + top: -1rem; + left: 100%; + white-space: nowrap; &:before, &:after {