mirror of
https://github.com/Ride-The-Lightning/RTL.git
synced 2026-08-13 12:33:07 +02:00
The frontend build pulled in crypto-browserify, stream-browserify and vm-browserify (via tsconfig paths) only because otplib's @otplib/plugin-crypto requires Node's crypto. That chain carried the last production npm audit findings - the elliptic advisory (GHSA-848j-6mx2-7j84, no fixed release) plus browserify-sign/create-ecdh (issue #1634, item 3). The two-factor-auth settings dialog is the only browser consumer of otplib. It now uses a small WebCrypto TOTP service (src/app/shared/services/totp.service.ts, RFC 6238: HMAC-SHA1, 6 digits, 30s step) instead, so otplib is no longer bundled and the three polyfills plus their tsconfig path mappings are removed. The backend still verifies login tokens with otplib, so the new service must match it exactly - verified byte-for-byte against otplib and the RFC 6238 test vectors (generateSecret/keyuri/generate/check parity). Existing authenticator enrollments keep working. token check() is now async (WebCrypto's digest is promise-based); the dialog's verify handler was updated to match, and the value was never used for control flow. Production npm audit now reports zero vulnerabilities (from 13, incl. 2 critical, at the start of this cleanup series). Verified on the docker fixture: enrolled a 2FA secret from the new service, confirmed the backend otplib accepts a token it produces at login, rejected wrong/absent tokens. Unit spec covers RFC 6238 vectors, keyuri parity and base32 round-trip; both API suites and the full frontend suite (204 specs) pass.
1 line
No EOL
64 KiB
JavaScript
1 line
No EOL
64 KiB
JavaScript
(self.webpackChunkRTLApp=self.webpackChunkRTLApp||[]).push([[461],{4050(Wt,z,W){window.global=window,window.global.Buffer=window.global.Buffer||W(3838).hp,window.global.process=window.global.process||W(573)},3981(Wt,z){"use strict";z.byteLength=function w(I){var b=Z(I),st=b[1];return 3*(b[0]+st)/4-st},z.toByteArray=function tt(I){var b,gt,q=Z(I),st=q[0],Ct=q[1],dt=new Rt(function u(I,b,q){return 3*(b+q)/4-q}(0,st,Ct)),Pt=0,jt=Ct>0?st-4:st;for(gt=0;gt<jt;gt+=4)b=N[I.charCodeAt(gt)]<<18|N[I.charCodeAt(gt+1)]<<12|N[I.charCodeAt(gt+2)]<<6|N[I.charCodeAt(gt+3)],dt[Pt++]=b>>16&255,dt[Pt++]=b>>8&255,dt[Pt++]=255&b;return 2===Ct&&(b=N[I.charCodeAt(gt)]<<2|N[I.charCodeAt(gt+1)]>>4,dt[Pt++]=255&b),1===Ct&&(b=N[I.charCodeAt(gt)]<<10|N[I.charCodeAt(gt+1)]<<4|N[I.charCodeAt(gt+2)]>>2,dt[Pt++]=b>>8&255,dt[Pt++]=255&b),dt},z.fromByteArray=function It(I){for(var b,q=I.length,st=q%3,Ct=[],Pt=0,jt=q-st;Pt<jt;Pt+=16383)Ct.push(xt(I,Pt,Pt+16383>jt?jt:Pt+16383));return 1===st?Ct.push(W[(b=I[q-1])>>2]+W[b<<4&63]+"=="):2===st&&Ct.push(W[(b=(I[q-2]<<8)+I[q-1])>>10]+W[b>>4&63]+W[b<<2&63]+"="),Ct.join("")};for(var W=[],N=[],Rt=typeof Uint8Array<"u"?Uint8Array:Array,Et="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ot=0;ot<64;++ot)W[ot]=Et[ot],N[Et.charCodeAt(ot)]=ot;function Z(I){var b=I.length;if(b%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var q=I.indexOf("=");return-1===q&&(q=b),[q,q===b?0:4-q%4]}function _t(I){return W[I>>18&63]+W[I>>12&63]+W[I>>6&63]+W[63&I]}function xt(I,b,q){for(var Ct=[],dt=b;dt<q;dt+=3)Ct.push(_t((I[dt]<<16&16711680)+(I[dt+1]<<8&65280)+(255&I[dt+2])));return Ct.join("")}N[45]=62,N[95]=63},3838(Wt,z,W){"use strict";const Rt=W(3981),Et=W(2020),ot="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;z.hp=u,z.IS=50;const lt=2147483647;function w(r){if(r>lt)throw new RangeError('The value "'+r+'" is invalid for option "size"');const t=new Uint8Array(r);return Object.setPrototypeOf(t,u.prototype),t}function u(r,t,e){if("number"==typeof r){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return It(r)}return tt(r,t,e)}function tt(r,t,e){if("string"==typeof r)return function I(r,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const e=0|jt(r,t);let n=w(e);const i=n.write(r,t);return i!==e&&(n=n.slice(0,i)),n}(r,t);if(ArrayBuffer.isView(r))return function q(r){if(Ut(r,Uint8Array)){const t=new Uint8Array(r);return st(t.buffer,t.byteOffset,t.byteLength)}return b(r)}(r);if(null==r)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r);if(Ut(r,ArrayBuffer)||r&&Ut(r.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ut(r,SharedArrayBuffer)||r&&Ut(r.buffer,SharedArrayBuffer)))return st(r,t,e);if("number"==typeof r)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=r.valueOf&&r.valueOf();if(null!=n&&n!==r)return u.from(n,t,e);const i=function Ct(r){if(u.isBuffer(r)){const t=0|dt(r.length),e=w(t);return 0===e.length||r.copy(e,0,0,t),e}return void 0!==r.length?"number"!=typeof r.length||we(r.length)?w(0):b(r):"Buffer"===r.type&&Array.isArray(r.data)?b(r.data):void 0}(r);if(i)return i;if(typeof Symbol<"u"&&null!=Symbol.toPrimitive&&"function"==typeof r[Symbol.toPrimitive])return u.from(r[Symbol.toPrimitive]("string"),t,e);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r)}function _t(r){if("number"!=typeof r)throw new TypeError('"size" argument must be of type number');if(r<0)throw new RangeError('The value "'+r+'" is invalid for option "size"')}function It(r){return _t(r),w(r<0?0:0|dt(r))}function b(r){const t=r.length<0?0:0|dt(r.length),e=w(t);for(let n=0;n<t;n+=1)e[n]=255&r[n];return e}function st(r,t,e){if(t<0||r.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(r.byteLength<t+(e||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===e?new Uint8Array(r):void 0===e?new Uint8Array(r,t):new Uint8Array(r,t,e),Object.setPrototypeOf(n,u.prototype),n}function dt(r){if(r>=lt)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+lt.toString(16)+" bytes");return 0|r}function jt(r,t){if(u.isBuffer(r))return r.length;if(ArrayBuffer.isView(r)||Ut(r,ArrayBuffer))return r.byteLength;if("string"!=typeof r)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof r);const e=r.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===e)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":return he(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return Te(r).length;default:if(i)return n?-1:he(r).length;t=(""+t).toLowerCase(),i=!0}}function gt(r,t,e){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===e||e>this.length)&&(e=this.length),e<=0)||(e>>>=0)<=(t>>>=0))return"";for(r||(r="utf8");;)switch(r){case"hex":return ye(this,t,e);case"utf8":case"utf-8":return ae(this,t,e);case"ascii":return Ie(this,t,e);case"latin1":case"binary":return le(this,t,e);case"base64":return Pe(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ve(this,t,e);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}function St(r,t,e){const n=r[t];r[t]=r[e],r[e]=n}function Qt(r,t,e,n,i){if(0===r.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),we(e=+e)&&(e=i?0:r.length-1),e<0&&(e=r.length+e),e>=r.length){if(i)return-1;e=r.length-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:se(r,t,e,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(r,t,e):Uint8Array.prototype.lastIndexOf.call(r,t,e):se(r,[t],e,n,i);throw new TypeError("val must be string, number or Buffer")}function se(r,t,e,n,i){let ht,a=1,E=r.length,H=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(r.length<2||t.length<2)return-1;a=2,E/=2,H/=2,e/=2}function mt(Tt,rt){return 1===a?Tt[rt]:Tt.readUInt16BE(rt*a)}if(i){let Tt=-1;for(ht=e;ht<E;ht++)if(mt(r,ht)===mt(t,-1===Tt?0:ht-Tt)){if(-1===Tt&&(Tt=ht),ht-Tt+1===H)return Tt*a}else-1!==Tt&&(ht-=ht-Tt),Tt=-1}else for(e+H>E&&(e=E-H),ht=e;ht>=0;ht--){let Tt=!0;for(let rt=0;rt<H;rt++)if(mt(r,ht+rt)!==mt(t,rt)){Tt=!1;break}if(Tt)return ht}return-1}function de(r,t,e,n){e=Number(e)||0;const i=r.length-e;n?(n=Number(n))>i&&(n=i):n=i;const a=t.length;let E;for(n>a/2&&(n=a/2),E=0;E<n;++E){const H=parseInt(t.substr(2*E,2),16);if(we(H))return E;r[e+E]=H}return E}function Q(r,t,e,n){return fe(he(t,r.length-e),r,e,n)}function ce(r,t,e,n){return fe(function Be(r){const t=[];for(let e=0;e<r.length;++e)t.push(255&r.charCodeAt(e));return t}(t),r,e,n)}function ue(r,t,e,n){return fe(Te(t),r,e,n)}function vt(r,t,e,n){return fe(function Re(r,t){let e,n,i;const a=[];for(let E=0;E<r.length&&!((t-=2)<0);++E)e=r.charCodeAt(E),n=e>>8,i=e%256,a.push(i),a.push(n);return a}(t,r.length-e),r,e,n)}function Pe(r,t,e){return Rt.fromByteArray(0===t&&e===r.length?r:r.slice(t,e))}function ae(r,t,e){e=Math.min(r.length,e);const n=[];let i=t;for(;i<e;){const a=r[i];let E=null,H=a>239?4:a>223?3:a>191?2:1;if(i+H<=e){let mt,ht,Tt,rt;switch(H){case 1:a<128&&(E=a);break;case 2:mt=r[i+1],128==(192&mt)&&(rt=(31&a)<<6|63&mt,rt>127&&(E=rt));break;case 3:mt=r[i+1],ht=r[i+2],128==(192&mt)&&128==(192&ht)&&(rt=(15&a)<<12|(63&mt)<<6|63&ht,rt>2047&&(rt<55296||rt>57343)&&(E=rt));break;case 4:mt=r[i+1],ht=r[i+2],Tt=r[i+3],128==(192&mt)&&128==(192&ht)&&128==(192&Tt)&&(rt=(15&a)<<18|(63&mt)<<12|(63&ht)<<6|63&Tt,rt>65535&&rt<1114112&&(E=rt))}}null===E?(E=65533,H=1):E>65535&&(E-=65536,n.push(E>>>10&1023|55296),E=56320|1023&E),n.push(E),i+=H}return function xe(r){const t=r.length;if(t<=4096)return String.fromCharCode.apply(String,r);let e="",n=0;for(;n<t;)e+=String.fromCharCode.apply(String,r.slice(n,n+=4096));return e}(n)}function Ie(r,t,e){let n="";e=Math.min(r.length,e);for(let i=t;i<e;++i)n+=String.fromCharCode(127&r[i]);return n}function le(r,t,e){let n="";e=Math.min(r.length,e);for(let i=t;i<e;++i)n+=String.fromCharCode(r[i]);return n}function ye(r,t,e){const n=r.length;(!t||t<0)&&(t=0),(!e||e<0||e>n)&&(e=n);let i="";for(let a=t;a<e;++a)i+=De[r[a]];return i}function ve(r,t,e){const n=r.slice(t,e);let i="";for(let a=0;a<n.length-1;a+=2)i+=String.fromCharCode(n[a]+256*n[a+1]);return i}function wt(r,t,e){if(r%1!=0||r<0)throw new RangeError("offset is not uint");if(r+t>e)throw new RangeError("Trying to access beyond buffer length")}function At(r,t,e,n,i,a){if(!u.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(e+n>r.length)throw new RangeError("Index out of range")}function Ee(r,t,e,n,i){Gt(t,n,i,r,e,7);let a=Number(t&BigInt(4294967295));r[e++]=a,a>>=8,r[e++]=a,a>>=8,r[e++]=a,a>>=8,r[e++]=a;let E=Number(t>>BigInt(32)&BigInt(4294967295));return r[e++]=E,E>>=8,r[e++]=E,E>>=8,r[e++]=E,E>>=8,r[e++]=E,e}function _e(r,t,e,n,i){Gt(t,n,i,r,e,7);let a=Number(t&BigInt(4294967295));r[e+7]=a,a>>=8,r[e+6]=a,a>>=8,r[e+5]=a,a>>=8,r[e+4]=a;let E=Number(t>>BigInt(32)&BigInt(4294967295));return r[e+3]=E,E>>=8,r[e+2]=E,E>>=8,r[e+1]=E,E>>=8,r[e]=E,e+8}function ge(r,t,e,n,i,a){if(e+n>r.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function Nt(r,t,e,n,i){return t=+t,e>>>=0,i||ge(r,0,e,4),Et.write(r,t,e,n,23,4),e+4}function te(r,t,e,n,i){return t=+t,e>>>=0,i||ge(r,0,e,8),Et.write(r,t,e,n,52,8),e+8}!(u.TYPED_ARRAY_SUPPORT=function Z(){try{const r=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(r,t),42===r.foo()}catch{return!1}}())&&typeof console<"u"&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(r,t,e){return tt(r,t,e)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(r,t,e){return function xt(r,t,e){return _t(r),r<=0?w(r):void 0!==t?"string"==typeof e?w(r).fill(t,e):w(r).fill(t):w(r)}(r,t,e)},u.allocUnsafe=function(r){return It(r)},u.allocUnsafeSlow=function(r){return It(r)},u.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==u.prototype},u.compare=function(t,e){if(Ut(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),Ut(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let n=t.length,i=e.length;for(let a=0,E=Math.min(n,i);a<E;++a)if(t[a]!==e[a]){n=t[a],i=e[a];break}return n<i?-1:i<n?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);let n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;const i=u.allocUnsafe(e);let a=0;for(n=0;n<t.length;++n){let E=t[n];if(Ut(E,Uint8Array))a+E.length>i.length?(u.isBuffer(E)||(E=u.from(E)),E.copy(i,a)):Uint8Array.prototype.set.call(i,E,a);else{if(!u.isBuffer(E))throw new TypeError('"list" argument must be an Array of Buffers');E.copy(i,a)}a+=E.length}return i},u.byteLength=jt,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)St(this,e,e+1);return this},u.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)St(this,e,e+3),St(this,e+1,e+2);return this},u.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)St(this,e,e+7),St(this,e+1,e+6),St(this,e+2,e+5),St(this,e+3,e+4);return this},u.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?ae(this,0,t):gt.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){let t="";const e=z.IS;return t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(t+=" ... "),"<Buffer "+t+">"},ot&&(u.prototype[ot]=u.prototype.inspect),u.prototype.compare=function(t,e,n,i,a){if(Ut(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===i&&(i=0),void 0===a&&(a=this.length),e<0||n>t.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&e>=n)return 0;if(i>=a)return-1;if(e>=n)return 1;if(this===t)return 0;let E=(a>>>=0)-(i>>>=0),H=(n>>>=0)-(e>>>=0);const mt=Math.min(E,H),ht=this.slice(i,a),Tt=t.slice(e,n);for(let rt=0;rt<mt;++rt)if(ht[rt]!==Tt[rt]){E=ht[rt],H=Tt[rt];break}return E<H?-1:H<E?1:0},u.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},u.prototype.indexOf=function(t,e,n){return Qt(this,t,e,n,!0)},u.prototype.lastIndexOf=function(t,e,n){return Qt(this,t,e,n,!1)},u.prototype.write=function(t,e,n,i){if(void 0===e)i="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)i=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(n)?(n>>>=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}const a=this.length-e;if((void 0===n||n>a)&&(n=a),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let E=!1;for(;;)switch(i){case"hex":return de(this,t,e,n);case"utf8":case"utf-8":return Q(this,t,e,n);case"ascii":case"latin1":case"binary":return ce(this,t,e,n);case"base64":return ue(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return vt(this,t,e,n);default:if(E)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),E=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},u.prototype.slice=function(t,e){const n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t);const i=this.subarray(t,e);return Object.setPrototypeOf(i,u.prototype),i},u.prototype.readUintLE=u.prototype.readUIntLE=function(t,e,n){t>>>=0,e>>>=0,n||wt(t,e,this.length);let i=this[t],a=1,E=0;for(;++E<e&&(a*=256);)i+=this[t+E]*a;return i},u.prototype.readUintBE=u.prototype.readUIntBE=function(t,e,n){t>>>=0,e>>>=0,n||wt(t,e,this.length);let i=this[t+--e],a=1;for(;e>0&&(a*=256);)i+=this[t+--e]*a;return i},u.prototype.readUint8=u.prototype.readUInt8=function(t,e){return t>>>=0,e||wt(t,1,this.length),this[t]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,e){return t>>>=0,e||wt(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,e){return t>>>=0,e||wt(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(t,e){return t>>>=0,e||wt(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(t,e){return t>>>=0,e||wt(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readBigUInt64LE=Mt(function(t){Yt(t>>>=0,"offset");const e=this[t],n=this[t+7];(void 0===e||void 0===n)&&re(t,this.length-8);const i=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,a=this[++t]+256*this[++t]+65536*this[++t]+n*2**24;return BigInt(i)+(BigInt(a)<<BigInt(32))}),u.prototype.readBigUInt64BE=Mt(function(t){Yt(t>>>=0,"offset");const e=this[t],n=this[t+7];(void 0===e||void 0===n)&&re(t,this.length-8);const i=e*2**24+65536*this[++t]+256*this[++t]+this[++t],a=this[++t]*2**24+65536*this[++t]+256*this[++t]+n;return(BigInt(i)<<BigInt(32))+BigInt(a)}),u.prototype.readIntLE=function(t,e,n){t>>>=0,e>>>=0,n||wt(t,e,this.length);let i=this[t],a=1,E=0;for(;++E<e&&(a*=256);)i+=this[t+E]*a;return a*=128,i>=a&&(i-=Math.pow(2,8*e)),i},u.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||wt(t,e,this.length);let i=e,a=1,E=this[t+--i];for(;i>0&&(a*=256);)E+=this[t+--i]*a;return a*=128,E>=a&&(E-=Math.pow(2,8*e)),E},u.prototype.readInt8=function(t,e){return t>>>=0,e||wt(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){t>>>=0,e||wt(t,2,this.length);const n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){t>>>=0,e||wt(t,2,this.length);const n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(t,e){return t>>>=0,e||wt(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return t>>>=0,e||wt(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readBigInt64LE=Mt(function(t){Yt(t>>>=0,"offset");const e=this[t],n=this[t+7];return(void 0===e||void 0===n)&&re(t,this.length-8),(BigInt(this[t+4]+256*this[t+5]+65536*this[t+6]+(n<<24))<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)}),u.prototype.readBigInt64BE=Mt(function(t){Yt(t>>>=0,"offset");const e=this[t],n=this[t+7];(void 0===e||void 0===n)&&re(t,this.length-8);const i=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(i)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+n)}),u.prototype.readFloatLE=function(t,e){return t>>>=0,e||wt(t,4,this.length),Et.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return t>>>=0,e||wt(t,4,this.length),Et.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return t>>>=0,e||wt(t,8,this.length),Et.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return t>>>=0,e||wt(t,8,this.length),Et.read(this,t,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,e,n,i){t=+t,e>>>=0,n>>>=0,i||At(this,t,e,n,Math.pow(2,8*n)-1,0);let a=1,E=0;for(this[e]=255&t;++E<n&&(a*=256);)this[e+E]=t/a&255;return e+n},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(t,e,n,i){t=+t,e>>>=0,n>>>=0,i||At(this,t,e,n,Math.pow(2,8*n)-1,0);let a=n-1,E=1;for(this[e+a]=255&t;--a>=0&&(E*=256);)this[e+a]=t/E&255;return e+n},u.prototype.writeUint8=u.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||At(this,t,e,1,255,0),this[e]=255&t,e+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||At(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||At(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||At(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||At(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigUInt64LE=Mt(function(t,e=0){return Ee(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=Mt(function(t,e=0){return _e(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e>>>=0,!i){const mt=Math.pow(2,8*n-1);At(this,t,e,n,mt-1,-mt)}let a=0,E=1,H=0;for(this[e]=255&t;++a<n&&(E*=256);)t<0&&0===H&&0!==this[e+a-1]&&(H=1),this[e+a]=(t/E|0)-H&255;return e+n},u.prototype.writeIntBE=function(t,e,n,i){if(t=+t,e>>>=0,!i){const mt=Math.pow(2,8*n-1);At(this,t,e,n,mt-1,-mt)}let a=n-1,E=1,H=0;for(this[e+a]=255&t;--a>=0&&(E*=256);)t<0&&0===H&&0!==this[e+a+1]&&(H=1),this[e+a]=(t/E|0)-H&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||At(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||At(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||At(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||At(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||At(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigInt64LE=Mt(function(t,e=0){return Ee(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=Mt(function(t,e=0){return _e(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeFloatLE=function(t,e,n){return Nt(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return Nt(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return te(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return te(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,i){if(!u.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&0!==i&&(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<n&&(i=n),i===n||0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-n&&(i=t.length-e+n);const a=i-n;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,n,i):Uint8Array.prototype.set.call(t,this.subarray(n,i),e),a},u.prototype.fill=function(t,e,n,i){if("string"==typeof t){if("string"==typeof e?(i=e,e=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!u.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===t.length){const E=t.charCodeAt(0);("utf8"===i&&E<128||"latin1"===i)&&(t=E)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;let a;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(a=e;a<n;++a)this[a]=t;else{const E=u.isBuffer(t)?t:u.from(t,i),H=E.length;if(0===H)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(a=0;a<n-e;++a)this[a+e]=E[a%H]}return this};const ee={};function me(r,t,e){ee[r]=class extends e{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${r}]`,delete this.name}get code(){return r}set code(i){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:i,writable:!0})}toString(){return`${this.name} [${r}]: ${this.message}`}}}function Ht(r){let t="",e=r.length;const n="-"===r[0]?1:0;for(;e>=n+4;e-=3)t=`_${r.slice(e-3,e)}${t}`;return`${r.slice(0,e)}${t}`}function Gt(r,t,e,n,i,a){if(r>e||r<t){const E="bigint"==typeof t?"n":"";let H;throw H=a>3?0===t||t===BigInt(0)?`>= 0${E} and < 2${E} ** ${8*(a+1)}${E}`:`>= -(2${E} ** ${8*(a+1)-1}${E}) and < 2 ** ${8*(a+1)-1}${E}`:`>= ${t}${E} and <= ${e}${E}`,new ee.ERR_OUT_OF_RANGE("value",H,r)}!function Se(r,t,e){Yt(t,"offset"),(void 0===r[t]||void 0===r[t+e])&&re(t,r.length-(e+1))}(n,i,a)}function Yt(r,t){if("number"!=typeof r)throw new ee.ERR_INVALID_ARG_TYPE(t,"number",r)}function re(r,t,e){throw Math.floor(r)!==r?(Yt(r,e),new ee.ERR_OUT_OF_RANGE(e||"offset","an integer",r)):t<0?new ee.ERR_BUFFER_OUT_OF_BOUNDS:new ee.ERR_OUT_OF_RANGE(e||"offset",`>= ${e?1:0} and <= ${t}`,r)}me("ERR_BUFFER_OUT_OF_BOUNDS",function(r){return r?`${r} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),me("ERR_INVALID_ARG_TYPE",function(r,t){return`The "${r}" argument must be of type number. Received type ${typeof t}`},TypeError),me("ERR_OUT_OF_RANGE",function(r,t,e){let n=`The value of "${r}" is out of range.`,i=e;return Number.isInteger(e)&&Math.abs(e)>2**32?i=Ht(String(e)):"bigint"==typeof e&&(i=String(e),(e>BigInt(2)**BigInt(32)||e<-(BigInt(2)**BigInt(32)))&&(i=Ht(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);const Ae=/[^+/0-9A-Za-z-_]/g;function he(r,t){let e;t=t||1/0;const n=r.length;let i=null;const a=[];for(let E=0;E<n;++E){if(e=r.charCodeAt(E),e>55295&&e<57344){if(!i){if(e>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(E+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=e;continue}if(e<56320){(t-=3)>-1&&a.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,e<128){if((t-=1)<0)break;a.push(e)}else if(e<2048){if((t-=2)<0)break;a.push(e>>6|192,63&e|128)}else if(e<65536){if((t-=3)<0)break;a.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return a}function Te(r){return Rt.toByteArray(function Ot(r){if((r=(r=r.split("=")[0]).trim().replace(Ae,"")).length<2)return"";for(;r.length%4!=0;)r+="=";return r}(r))}function fe(r,t,e,n){let i;for(i=0;i<n&&!(i+e>=t.length||i>=r.length);++i)t[i+e]=r[i];return i}function Ut(r,t){return r instanceof t||null!=r&&null!=r.constructor&&null!=r.constructor.name&&r.constructor.name===t.name}function we(r){return r!=r}const De=function(){const r="0123456789abcdef",t=new Array(256);for(let e=0;e<16;++e){const n=16*e;for(let i=0;i<16;++i)t[n+i]=r[e]+r[i]}return t}();function Mt(r){return typeof BigInt>"u"?ne:r}function ne(){throw new Error("BigInt not supported")}},2020(Wt,z){z.read=function(W,N,Rt,Et,ot){var lt,Z,w=8*ot-Et-1,u=(1<<w)-1,tt=u>>1,_t=-7,xt=Rt?ot-1:0,It=Rt?-1:1,I=W[N+xt];for(xt+=It,lt=I&(1<<-_t)-1,I>>=-_t,_t+=w;_t>0;lt=256*lt+W[N+xt],xt+=It,_t-=8);for(Z=lt&(1<<-_t)-1,lt>>=-_t,_t+=Et;_t>0;Z=256*Z+W[N+xt],xt+=It,_t-=8);if(0===lt)lt=1-tt;else{if(lt===u)return Z?NaN:1/0*(I?-1:1);Z+=Math.pow(2,Et),lt-=tt}return(I?-1:1)*Z*Math.pow(2,lt-Et)},z.write=function(W,N,Rt,Et,ot,lt){var Z,w,u,tt=8*lt-ot-1,_t=(1<<tt)-1,xt=_t>>1,It=23===ot?Math.pow(2,-24)-Math.pow(2,-77):0,I=Et?0:lt-1,b=Et?1:-1,q=N<0||0===N&&1/N<0?1:0;for(N=Math.abs(N),isNaN(N)||N===1/0?(w=isNaN(N)?1:0,Z=_t):(Z=Math.floor(Math.log(N)/Math.LN2),N*(u=Math.pow(2,-Z))<1&&(Z--,u*=2),(N+=Z+xt>=1?It/u:It*Math.pow(2,1-xt))*u>=2&&(Z++,u/=2),Z+xt>=_t?(w=0,Z=_t):Z+xt>=1?(w=(N*u-1)*Math.pow(2,ot),Z+=xt):(w=N*Math.pow(2,xt-1)*Math.pow(2,ot),Z=0));ot>=8;W[Rt+I]=255&w,I+=b,w/=256,ot-=8);for(Z=Z<<ot|w,tt+=ot;tt>0;W[Rt+I]=255&Z,I+=b,Z/=256,tt-=8);W[Rt+I-b]|=128*q}},573(Wt){var W,N,z=Wt.exports={};function Rt(){throw new Error("setTimeout has not been defined")}function Et(){throw new Error("clearTimeout has not been defined")}function ot(b){if(W===setTimeout)return setTimeout(b,0);if((W===Rt||!W)&&setTimeout)return W=setTimeout,setTimeout(b,0);try{return W(b,0)}catch{try{return W.call(null,b,0)}catch{return W.call(this,b,0)}}}!function(){try{W="function"==typeof setTimeout?setTimeout:Rt}catch{W=Rt}try{N="function"==typeof clearTimeout?clearTimeout:Et}catch{N=Et}}();var u,Z=[],w=!1,tt=-1;function _t(){!w||!u||(w=!1,u.length?Z=u.concat(Z):tt=-1,Z.length&&xt())}function xt(){if(!w){var b=ot(_t);w=!0;for(var q=Z.length;q;){for(u=Z,Z=[];++tt<q;)u&&u[tt].run();tt=-1,q=Z.length}u=null,w=!1,function lt(b){if(N===clearTimeout)return clearTimeout(b);if((N===Et||!N)&&clearTimeout)return N=clearTimeout,clearTimeout(b);try{return N(b)}catch{try{return N.call(null,b)}catch{return N.call(this,b)}}}(b)}}function It(b,q){this.fun=b,this.array=q}function I(){}z.nextTick=function(b){var q=new Array(arguments.length-1);if(arguments.length>1)for(var st=1;st<arguments.length;st++)q[st-1]=arguments[st];Z.push(new It(b,q)),1===Z.length&&!w&&ot(xt)},It.prototype.run=function(){this.fun.apply(null,this.array)},z.title="browser",z.browser=!0,z.env={},z.argv=[],z.version="",z.versions={},z.on=I,z.addListener=I,z.once=I,z.off=I,z.removeListener=I,z.removeAllListeners=I,z.emit=I,z.prependListener=I,z.prependOnceListener=I,z.listeners=function(b){return[]},z.binding=function(b){throw new Error("process.binding is not supported")},z.cwd=function(){return"/"},z.chdir=function(b){throw new Error("process.chdir is not supported")},z.umask=function(){return 0}},6935(){"use strict";var Wt=Object.defineProperty,z=Object.defineProperties,W=Object.getOwnPropertyDescriptors,N=Object.getOwnPropertySymbols,Rt=Object.prototype.hasOwnProperty,Et=Object.prototype.propertyIsEnumerable,ot=(s,o,y)=>o in s?Wt(s,o,{enumerable:!0,configurable:!0,writable:!0,value:y}):s[o]=y,lt=(s,o)=>{for(var y in o||(o={}))Rt.call(o,y)&&ot(s,y,o[y]);if(N)for(var y of N(o))Et.call(o,y)&&ot(s,y,o[y]);return s},w=(s,o,y)=>(ot(s,"symbol"!=typeof o?o+"":o,y),y),u=globalThis;function tt(s){return(u.__Zone_symbol_prefix||"__zone_symbol__")+s}var It=Object.getOwnPropertyDescriptor,I=Object.defineProperty,b=Object.getPrototypeOf,q=Object.create,st=Array.prototype.slice,Ct="addEventListener",dt="removeEventListener",Pt=tt(Ct),jt=tt(dt),gt="true",St="false",Qt=tt("");function se(s,o){return Zone.current.wrap(s,o)}function de(s,o,y,c,d){return Zone.current.scheduleMacroTask(s,o,y,c,d)}var Q=tt,ce=typeof window<"u",ue=ce?window:void 0,vt=ce&&ue||globalThis;function ae(s,o){for(let y=s.length-1;y>=0;y--)"function"==typeof s[y]&&(s[y]=se(s[y],o+"_"+y));return s}function xe(s){return!s||!1!==s.writable&&!("function"==typeof s.get&&typeof s.set>"u")}var Ie=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,le=!("nw"in vt)&&typeof vt.process<"u"&&"[object process]"===vt.process.toString(),ye=!le&&!Ie&&!(!ce||!ue.HTMLElement),ve=typeof vt.process<"u"&&"[object process]"===vt.process.toString()&&!Ie&&!(!ce||!ue.HTMLElement),wt={},At=Q("enable_beforeunload"),Ee=function(s){if(!(s=s||vt.event))return;let o=wt[s.type];o||(o=wt[s.type]=Q("ON_PROPERTY"+s.type));const y=this||s.target||vt,c=y[o];let d;return ye&&y===ue&&"error"===s.type?(d=c&&c.call(this,s.message,s.filename,s.lineno,s.colno,s.error),!0===d&&s.preventDefault()):(d=c&&c.apply(this,arguments),"beforeunload"===s.type&&vt[At]&&"string"==typeof d?s.returnValue=d:null!=d&&!d&&s.preventDefault()),d};function _e(s,o,y){let c=It(s,o);if(!c&&y&&It(y,o)&&(c={enumerable:!0,configurable:!0}),!c||!c.configurable)return;const d=Q("on"+o+"patched");if(s.hasOwnProperty(d)&&s[d])return;delete c.writable,delete c.value;const _=c.get,D=c.set,x=o.slice(2);let S=wt[x];S||(S=wt[x]=Q("ON_PROPERTY"+x)),c.set=function(U){let B=this;!B&&s===vt&&(B=vt),B&&("function"==typeof B[S]&&B.removeEventListener(x,Ee),D?.call(B,null),B[S]=U,"function"==typeof U&&B.addEventListener(x,Ee,!1))},c.get=function(){let U=this;if(!U&&s===vt&&(U=vt),!U)return null;const B=U[S];if(B)return B;if(_){let L=_.call(this);if(L)return c.set.call(this,L),"function"==typeof U.removeAttribute&&U.removeAttribute(o),L}return null},I(s,o,c),s[d]=!0}function ge(s,o,y){if(o)for(let c=0;c<o.length;c++)_e(s,"on"+o[c],y);else{const c=[];for(const d in s)"on"==d.slice(0,2)&&c.push(d);for(let d=0;d<c.length;d++)_e(s,c[d],y)}}var Nt=Q("originalInstance");function te(s){const o=vt[s];if(!o)return;vt[Q(s)]=o,vt[s]=function(){const d=ae(arguments,s);switch(d.length){case 0:this[Nt]=new o;break;case 1:this[Nt]=new o(d[0]);break;case 2:this[Nt]=new o(d[0],d[1]);break;case 3:this[Nt]=new o(d[0],d[1],d[2]);break;case 4:this[Nt]=new o(d[0],d[1],d[2],d[3]);break;default:throw new Error("Arg list too long.")}},Gt(vt[s],o);const y=new o(function(){});let c;for(c in y)"XMLHttpRequest"===s&&"responseBlob"===c||function(d){"function"==typeof y[d]?vt[s].prototype[d]=function(){return this[Nt][d].apply(this[Nt],arguments)}:I(vt[s].prototype,d,{set:function(_){"function"==typeof _?(this[Nt][d]=se(_,s+"."+d),Gt(this[Nt][d],_)):this[Nt][d]=_},get:function(){return this[Nt][d]}})}(c);for(c in o)"prototype"!==c&&o.hasOwnProperty(c)&&(vt[s][c]=o[c])}function Ht(s,o,y){let c=s;for(;c&&!c.hasOwnProperty(o);)c=b(c);!c&&s[o]&&(c=s);const d=Q(o);let _=null;if(c&&(!(_=c[d])||!c.hasOwnProperty(d))&&(_=c[d]=c[o],xe(c&&It(c,o)))){const x=y(_,d,o);c[o]=function(){return x(this,arguments)},Gt(c[o],_)}return _}function Se(s,o,y){let c=null;function d(_){const D=_.data;return D.args[D.cbIdx]=function(){_.invoke.apply(this,arguments)},c.apply(D.target,D.args),_}c=Ht(s,o,_=>function(D,x){const S=y(D,x);return S.cbIdx>=0&&"function"==typeof x[S.cbIdx]?de(S.name,x[S.cbIdx],S,d):_.apply(D,x)})}function Gt(s,o){s[Q("OriginalDelegate")]=o}function Yt(s){return"function"==typeof s}function re(s){return"number"==typeof s}var Ae={useG:!0},Ot={},he={},Be=new RegExp("^"+Qt+"(\\w+)(true|false)$"),Re=Q("propagationStopped");function Te(s,o){const y=(o?o(s):s)+St,c=(o?o(s):s)+gt,d=Qt+y,_=Qt+c;Ot[s]={},Ot[s][St]=d,Ot[s][gt]=_}function fe(s,o,y,c){const d=c&&c.add||Ct,_=c&&c.rm||dt,D=c&&c.listeners||"eventListeners",x=c&&c.rmAll||"removeAllListeners",S=Q(d),U="."+d+":",B="prependListener",L="."+B+":",Y=function(P,k,ct){if(P.isRemoved)return;const et=P.callback;let yt;"object"==typeof et&&et.handleEvent&&(P.callback=R=>et.handleEvent(R),P.originalDelegate=et);try{P.invoke(P,k,[ct])}catch(R){yt=R}const ut=P.options;return ut&&"object"==typeof ut&&ut.once&&k[_].call(k,ct.type,P.originalDelegate?P.originalDelegate:P.callback,ut),yt};function K(P,k,ct){if(!(k=k||s.event))return;const et=P||k.target||s,yt=et[Ot[k.type][ct?gt:St]];if(yt){const ut=[];if(1===yt.length){const R=Y(yt[0],et,k);R&&ut.push(R)}else{const R=yt.slice();for(let bt=0;bt<R.length&&(!k||!0!==k[Re]);bt++){const j=Y(R[bt],et,k);j&&ut.push(j)}}if(1===ut.length)throw ut[0];for(let R=0;R<ut.length;R++){const bt=ut[R];o.nativeScheduleMicroTask(()=>{throw bt})}}}const Dt=function(P){return K(this,P,!1)},kt=function(P){return K(this,P,!0)};function Lt(P,k){if(!P)return!1;let ct=!0;k&&void 0!==k.useG&&(ct=k.useG);const et=k&&k.vh;let yt=!0;k&&void 0!==k.chkDup&&(yt=k.chkDup);let ut=!1;k&&void 0!==k.rt&&(ut=k.rt);let R=P;for(;R&&!R.hasOwnProperty(d);)R=b(R);if(!R&&P[d]&&(R=P),!R||R[S])return!1;const bt=k&&k.eventNameToString,j={},M=R[S]=R[d],X=R[Q(_)]=R[_],F=R[Q(D)]=R[D],Ft=R[Q(x)]=R[x];let Zt;k&&k.prepend&&(Zt=R[Q(k.prepend)]=R[k.prepend]);const it=ct?function(p){if(!j.isExisting)return M.call(j.target,j.eventName,j.capture?kt:Dt,j.options)}:function(p){return M.call(j.target,j.eventName,p.invoke,j.options)},J=ct?function(p){if(!p.isRemoved){const m=Ot[p.eventName];let C;m&&(C=m[p.capture?gt:St]);const O=C&&p.target[C];if(O)for(let v=0;v<O.length;v++)if(O[v]===p){O.splice(v,1),p.isRemoved=!0,p.removeAbortListener&&(p.removeAbortListener(),p.removeAbortListener=null),0===O.length&&(p.allRemoved=!0,p.target[C]=null);break}}if(p.allRemoved)return X.call(p.target,p.eventName,p.capture?kt:Dt,p.options)}:function(p){return X.call(p.target,p.eventName,p.invoke,p.options)},Jt=k?.diff||function(p,m){const C=typeof m;return"function"===C&&p.callback===m||"object"===C&&p.originalDelegate===m},Kt=Zone[Q("UNPATCHED_EVENTS")],Vt=s[Q("PASSIVE_EVENTS")],g=function(p,m,C,O,v=!1,G=!1){return function(){const V=this||s;let $=arguments[0];k&&k.transferEventName&&($=k.transferEventName($));let ft=arguments[1];if(!ft)return p.apply(this,arguments);if(le&&"uncaughtException"===$)return p.apply(this,arguments);let pt=!1;if("function"!=typeof ft){if(!ft.handleEvent)return p.apply(this,arguments);pt=!0}if(et&&!et(p,ft,V,arguments))return;const ie=!!Vt&&-1!==Vt.indexOf($),$t=function T(p){if("object"==typeof p&&null!==p){const m=lt({},p);return p.signal&&(m.signal=p.signal),m}return p}(function at(p,m){return m?"boolean"==typeof p?{capture:p,passive:!0}:p?"object"==typeof p&&!1!==p.passive?(s=>z(s,W({passive:!0})))(lt({},p)):p:{passive:!0}:p}(arguments[2],ie)),oe=$t?.signal;if(oe?.aborted)return;if(Kt)for(let Xt=0;Xt<Kt.length;Xt++)if($===Kt[Xt])return ie?p.call(V,$,ft,$t):p.apply(this,arguments);const Fe=!!$t&&("boolean"==typeof $t||$t.capture),Ue=!(!$t||"object"!=typeof $t)&&$t.once,Ve=Zone.current;let Ne=Ot[$];Ne||(Te($,bt),Ne=Ot[$]);const Me=Ne[Fe?gt:St];let Ce,pe=V[Me],Ze=!1;if(pe){if(Ze=!0,yt)for(let Xt=0;Xt<pe.length;Xt++)if(Jt(pe[Xt],ft))return}else pe=V[Me]=[];const je=V.constructor.name,He=he[je];He&&(Ce=He[$]),Ce||(Ce=je+m+(bt?bt($):$)),j.options=$t,Ue&&(j.options.once=!1),j.target=V,j.capture=Fe,j.eventName=$,j.isExisting=Ze;const ke=ct?Ae:void 0;ke&&(ke.taskData=j),oe&&(j.options.signal=void 0);const zt=Ve.scheduleEventTask(Ce,ft,ke,C,O);if(oe){j.options.signal=oe;const Xt=()=>zt.zone.cancelTask(zt);p.call(oe,"abort",Xt,{once:!0}),zt.removeAbortListener=()=>oe.removeEventListener("abort",Xt)}return j.target=null,ke&&(ke.taskData=null),Ue&&(j.options.once=!0),"boolean"!=typeof zt.options&&(zt.options=$t),zt.target=V,zt.capture=Fe,zt.eventName=$,pt&&(zt.originalDelegate=ft),G?pe.unshift(zt):pe.push(zt),v?V:void 0}};return R[d]=g(M,U,it,J,ut),Zt&&(R[B]=g(Zt,L,function(p){return Zt.call(j.target,j.eventName,p.invoke,j.options)},J,ut,!0)),R[_]=function(){const p=this||s;let m=arguments[0];k&&k.transferEventName&&(m=k.transferEventName(m));const C=arguments[2],O=!!C&&("boolean"==typeof C||C.capture),v=arguments[1];if(!v)return X.apply(this,arguments);if(et&&!et(X,v,p,arguments))return;const G=Ot[m];let V;G&&(V=G[O?gt:St]);const $=V&&p[V];if($)for(let ft=0;ft<$.length;ft++){const pt=$[ft];if(Jt(pt,v))return $.splice(ft,1),pt.isRemoved=!0,0!==$.length||(pt.allRemoved=!0,p[V]=null,O||"string"!=typeof m)||(p[Qt+"ON_PROPERTY"+m]=null),pt.zone.cancelTask(pt),ut?p:void 0}return X.apply(this,arguments)},R[D]=function(){const p=this||s;let m=arguments[0];k&&k.transferEventName&&(m=k.transferEventName(m));const C=[],O=Ut(p,bt?bt(m):m);for(let v=0;v<O.length;v++){const G=O[v];C.push(G.originalDelegate?G.originalDelegate:G.callback)}return C},R[x]=function(){const p=this||s;let m=arguments[0];if(m){k&&k.transferEventName&&(m=k.transferEventName(m));const C=Ot[m];if(C){const G=p[C[St]],V=p[C[gt]];if(G){const $=G.slice();for(let ft=0;ft<$.length;ft++){const pt=$[ft];this[_].call(this,m,pt.originalDelegate?pt.originalDelegate:pt.callback,pt.options)}}if(V){const $=V.slice();for(let ft=0;ft<$.length;ft++){const pt=$[ft];this[_].call(this,m,pt.originalDelegate?pt.originalDelegate:pt.callback,pt.options)}}}}else{const C=Object.keys(p);for(let O=0;O<C.length;O++){const G=Be.exec(C[O]);let V=G&&G[1];V&&"removeListener"!==V&&this[x].call(this,V)}this[x].call(this,"removeListener")}if(ut)return this},Gt(R[d],M),Gt(R[_],X),Ft&&Gt(R[x],Ft),F&&Gt(R[D],F),!0}let Bt=[];for(let P=0;P<y.length;P++)Bt[P]=Lt(y[P],c);return Bt}function Ut(s,o){if(!o){const _=[];for(let D in s){const x=Be.exec(D);let S=x&&x[1];if(S&&(!o||S===o)){const U=s[D];if(U)for(let B=0;B<U.length;B++)_.push(U[B])}}return _}let y=Ot[o];y||(Te(o),y=Ot[o]);const c=s[y[St]],d=s[y[gt]];return c?d?c.concat(d):c.slice():d?d.slice():[]}function we(s,o){const y=s.Event;y&&y.prototype&&o.patchMethod(y.prototype,"stopImmediatePropagation",c=>function(d,_){d[Re]=!0,c&&c.apply(d,_)})}var Mt=Q("zoneTask");function ne(s,o,y,c){let d=null,_=null;y+=c;const D={};function x(U){const B=U.data;B.args[0]=function(){return U.invoke.apply(this,arguments)};const L=d.apply(s,B.args);return re(L)?B.handleId=L:(B.handle=L,B.isRefreshable=Yt(L.refresh)),U}function S(U){const{handle:B,handleId:L}=U.data;return _.call(s,B??L)}d=Ht(s,o+=c,U=>function(B,L){var Y;if(Yt(L[0])){const K={isRefreshable:!1,isPeriodic:"Interval"===c,delay:"Timeout"===c||"Interval"===c?L[1]||0:void 0,args:L},Dt=L[0];L[0]=function(){try{return Dt.apply(this,arguments)}finally{const{handle:et,handleId:yt,isPeriodic:ut,isRefreshable:R}=K;!ut&&!R&&(yt?delete D[yt]:et&&(et[Mt]=null))}};const kt=de(o,L[0],K,x,S);if(!kt)return kt;const{handleId:Lt,handle:Bt,isRefreshable:P,isPeriodic:k}=kt.data;if(Lt)D[Lt]=kt;else if(Bt&&(Bt[Mt]=kt,P&&!k)){const ct=Bt.refresh;Bt.refresh=function(){const{zone:et,state:yt}=kt;return"notScheduled"===yt?(kt._state="scheduled",et._updateTaskCount(kt,1)):"running"===yt&&(kt._state="scheduling"),ct.call(this)}}return null!=(Y=Bt??Lt)?Y:kt}return U.apply(s,L)}),_=Ht(s,y,U=>function(B,L){const Y=L[0];let K;re(Y)?(K=D[Y],delete D[Y]):(K=Y?.[Mt],K?Y[Mt]=null:K=Y),K?.type?K.cancelFn&&K.zone.cancelTask(K):U.apply(s,L)})}function n(s,o,y){if(!y||0===y.length)return o;const c=y.filter(_=>_.target===s);if(0===c.length)return o;const d=c[0].ignoreProperties;return o.filter(_=>-1===d.indexOf(_))}function i(s,o,y,c){s&&ge(s,n(s,o,y),c)}function a(s){return Object.getOwnPropertyNames(s).filter(o=>o.startsWith("on")&&o.length>2).map(o=>o.substring(2))}function Tt(s,o,y,c,d){const _=Zone.__symbol__(c);if(o[_])return;const D=o[_]=o[c];o[c]=function(x,S,U){return S&&S.prototype&&d.forEach(function(B){const L=`${y}.${c}::`+B,Y=S.prototype;try{if(Y.hasOwnProperty(B)){const K=s.ObjectGetOwnPropertyDescriptor(Y,B);K&&K.value?(K.value=s.wrapWithCurrentZone(K.value,L),s._redefineProperty(S.prototype,B,K)):Y[B]&&(Y[B]=s.wrapWithCurrentZone(Y[B],L))}else Y[B]&&(Y[B]=s.wrapWithCurrentZone(Y[B],L))}catch{}}),D.call(o,x,S,U)},s.attachOriginToPatched(o[c],D)}var Le=function xt(){const o=globalThis,y=!0===o[tt("forceDuplicateZoneCheck")];if(o.Zone&&(y||"function"!=typeof o.Zone.__symbol__))throw new Error("Zone already loaded.");return null!=o.Zone||(o.Zone=function _t(){const s=u.performance;function o(nt){s&&s.mark&&s.mark(nt)}function y(nt,f){s&&s.measure&&s.measure(nt,f)}o("Zone");const c=class Oe{constructor(f,h){w(this,"_parent"),w(this,"_name"),w(this,"_properties"),w(this,"_zoneDelegate"),this._parent=f,this._name=h?h.name||"unnamed":"<root>",this._properties=h&&h.properties||{},this._zoneDelegate=new D(this,this._parent&&this._parent._zoneDelegate,h)}static assertZonePatched(){if(u.Promise!==M.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 f=Oe.current;for(;f.parent;)f=f.parent;return f}static get current(){return F.zone}static get currentTask(){return Ft}static __load_patch(f,h,l=!1){if(M.hasOwnProperty(f)){const A=!0===u[tt("forceDuplicateZoneCheck")];if(!l&&A)throw Error("Already loaded patch: "+f)}else if(!u["__Zone_disable_"+f]){const A="Zone:"+f;o(A),M[f]=h(u,Oe,X),y(A,A)}}get parent(){return this._parent}get name(){return this._name}get(f){const h=this.getZoneWith(f);if(h)return h._properties[f]}getZoneWith(f){let h=this;for(;h;){if(h._properties.hasOwnProperty(f))return h;h=h._parent}return null}fork(f){if(!f)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,f)}wrap(f,h){if("function"!=typeof f)throw new Error("Expecting function got: "+f);const l=this._zoneDelegate.intercept(this,f,h),A=this;return function(){return A.runGuarded(l,this,arguments,h)}}run(f,h,l,A){F={parent:F,zone:this};try{return this._zoneDelegate.invoke(this,f,h,l,A)}finally{F=F.parent}}runGuarded(f,h=null,l,A){F={parent:F,zone:this};try{try{return this._zoneDelegate.invoke(this,f,h,l,A)}catch(it){if(this._zoneDelegate.handleError(this,it))throw it}}finally{F=F.parent}}runTask(f,h,l){if(f.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(f.zone||Bt).name+"; Execution: "+this.name+")");const A=f,{type:it,data:{isPeriodic:J=!1,isRefreshable:qt=!1}={}}=f;if(f.state===P&&(it===j||it===bt))return;const Jt=f.state!=et;Jt&&A._transitionTo(et,ct);const Kt=Ft;Ft=A,F={parent:F,zone:this};try{it==bt&&f.data&&!J&&!qt&&(f.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,A,h,l)}catch(Vt){if(this._zoneDelegate.handleError(this,Vt))throw Vt}}finally{const Vt=f.state;if(Vt!==P&&Vt!==ut)if(it==j||J||qt&&Vt===k)Jt&&A._transitionTo(ct,et,k);else{const T=A._zoneDelegates;this._updateTaskCount(A,-1),Jt&&A._transitionTo(P,et,P),qt&&(A._zoneDelegates=T)}F=F.parent,Ft=Kt}}scheduleTask(f){if(f.zone&&f.zone!==this){let l=this;for(;l;){if(l===f.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${f.zone.name}`);l=l.parent}}f._transitionTo(k,P);const h=[];f._zoneDelegates=h,f._zone=this;try{f=this._zoneDelegate.scheduleTask(this,f)}catch(l){throw f._transitionTo(ut,k,P),this._zoneDelegate.handleError(this,l),l}return f._zoneDelegates===h&&this._updateTaskCount(f,1),f.state==k&&f._transitionTo(ct,k),f}scheduleMicroTask(f,h,l,A){return this.scheduleTask(new x(R,f,h,l,A,void 0))}scheduleMacroTask(f,h,l,A,it){return this.scheduleTask(new x(bt,f,h,l,A,it))}scheduleEventTask(f,h,l,A,it){return this.scheduleTask(new x(j,f,h,l,A,it))}cancelTask(f){if(f.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(f.zone||Bt).name+"; Execution: "+this.name+")");if(f.state===ct||f.state===et){f._transitionTo(yt,ct,et);try{this._zoneDelegate.cancelTask(this,f)}catch(h){throw f._transitionTo(ut,yt),this._zoneDelegate.handleError(this,h),h}return this._updateTaskCount(f,-1),f._transitionTo(P,yt),f.runCount=-1,f}}_updateTaskCount(f,h){const l=f._zoneDelegates;-1==h&&(f._zoneDelegates=null);for(let A=0;A<l.length;A++)l[A]._updateTaskCount(f.type,h)}};w(c,"__symbol__",tt);let d=c;const _={name:"",onHasTask:(nt,f,h,l)=>nt.hasTask(h,l),onScheduleTask:(nt,f,h,l)=>nt.scheduleTask(h,l),onInvokeTask:(nt,f,h,l,A,it)=>nt.invokeTask(h,l,A,it),onCancelTask:(nt,f,h,l)=>nt.cancelTask(h,l)};class D{constructor(f,h,l){w(this,"_zone"),w(this,"_taskCounts",{microTask:0,macroTask:0,eventTask:0}),w(this,"_parentDelegate"),w(this,"_forkDlgt"),w(this,"_forkZS"),w(this,"_forkCurrZone"),w(this,"_interceptDlgt"),w(this,"_interceptZS"),w(this,"_interceptCurrZone"),w(this,"_invokeDlgt"),w(this,"_invokeZS"),w(this,"_invokeCurrZone"),w(this,"_handleErrorDlgt"),w(this,"_handleErrorZS"),w(this,"_handleErrorCurrZone"),w(this,"_scheduleTaskDlgt"),w(this,"_scheduleTaskZS"),w(this,"_scheduleTaskCurrZone"),w(this,"_invokeTaskDlgt"),w(this,"_invokeTaskZS"),w(this,"_invokeTaskCurrZone"),w(this,"_cancelTaskDlgt"),w(this,"_cancelTaskZS"),w(this,"_cancelTaskCurrZone"),w(this,"_hasTaskDlgt"),w(this,"_hasTaskDlgtOwner"),w(this,"_hasTaskZS"),w(this,"_hasTaskCurrZone"),this._zone=f,this._parentDelegate=h,this._forkZS=l&&(l&&l.onFork?l:h._forkZS),this._forkDlgt=l&&(l.onFork?h:h._forkDlgt),this._forkCurrZone=l&&(l.onFork?this._zone:h._forkCurrZone),this._interceptZS=l&&(l.onIntercept?l:h._interceptZS),this._interceptDlgt=l&&(l.onIntercept?h:h._interceptDlgt),this._interceptCurrZone=l&&(l.onIntercept?this._zone:h._interceptCurrZone),this._invokeZS=l&&(l.onInvoke?l:h._invokeZS),this._invokeDlgt=l&&(l.onInvoke?h:h._invokeDlgt),this._invokeCurrZone=l&&(l.onInvoke?this._zone:h._invokeCurrZone),this._handleErrorZS=l&&(l.onHandleError?l:h._handleErrorZS),this._handleErrorDlgt=l&&(l.onHandleError?h:h._handleErrorDlgt),this._handleErrorCurrZone=l&&(l.onHandleError?this._zone:h._handleErrorCurrZone),this._scheduleTaskZS=l&&(l.onScheduleTask?l:h._scheduleTaskZS),this._scheduleTaskDlgt=l&&(l.onScheduleTask?h:h._scheduleTaskDlgt),this._scheduleTaskCurrZone=l&&(l.onScheduleTask?this._zone:h._scheduleTaskCurrZone),this._invokeTaskZS=l&&(l.onInvokeTask?l:h._invokeTaskZS),this._invokeTaskDlgt=l&&(l.onInvokeTask?h:h._invokeTaskDlgt),this._invokeTaskCurrZone=l&&(l.onInvokeTask?this._zone:h._invokeTaskCurrZone),this._cancelTaskZS=l&&(l.onCancelTask?l:h._cancelTaskZS),this._cancelTaskDlgt=l&&(l.onCancelTask?h:h._cancelTaskDlgt),this._cancelTaskCurrZone=l&&(l.onCancelTask?this._zone:h._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const A=l&&l.onHasTask;(A||h&&h._hasTaskZS)&&(this._hasTaskZS=A?l:_,this._hasTaskDlgt=h,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=this._zone,l.onScheduleTask||(this._scheduleTaskZS=_,this._scheduleTaskDlgt=h,this._scheduleTaskCurrZone=this._zone),l.onInvokeTask||(this._invokeTaskZS=_,this._invokeTaskDlgt=h,this._invokeTaskCurrZone=this._zone),l.onCancelTask||(this._cancelTaskZS=_,this._cancelTaskDlgt=h,this._cancelTaskCurrZone=this._zone))}get zone(){return this._zone}fork(f,h){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,f,h):new d(f,h)}intercept(f,h,l){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,f,h,l):h}invoke(f,h,l,A,it){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,f,h,l,A,it):h.apply(l,A)}handleError(f,h){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,f,h)}scheduleTask(f,h){let l=h;if(this._scheduleTaskZS)this._hasTaskZS&&l._zoneDelegates.push(this._hasTaskDlgtOwner),l=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,f,h),l||(l=h);else if(h.scheduleFn)h.scheduleFn(h);else{if(h.type!=R)throw new Error("Task is missing scheduleFn.");kt(h)}return l}invokeTask(f,h,l,A){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,f,h,l,A):h.callback.apply(l,A)}cancelTask(f,h){let l;if(this._cancelTaskZS)l=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,f,h);else{if(!h.cancelFn)throw Error("Task is not cancelable");l=h.cancelFn(h)}return l}hasTask(f,h){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,f,h)}catch(l){this.handleError(f,l)}}_updateTaskCount(f,h){const l=this._taskCounts,A=l[f],it=l[f]=A+h;if(it<0)throw new Error("More tasks executed then were scheduled.");0!=A&&0!=it||this.hasTask(this._zone,{microTask:l.microTask>0,macroTask:l.macroTask>0,eventTask:l.eventTask>0,change:f})}}class x{constructor(f,h,l,A,it,J){if(w(this,"type"),w(this,"source"),w(this,"invoke"),w(this,"callback"),w(this,"data"),w(this,"scheduleFn"),w(this,"cancelFn"),w(this,"_zone",null),w(this,"runCount",0),w(this,"_zoneDelegates",null),w(this,"_state","notScheduled"),this.type=f,this.source=h,this.data=A,this.scheduleFn=it,this.cancelFn=J,!l)throw new Error("callback is not defined");this.callback=l;const qt=this;this.invoke=f===j&&A&&A.useG?x.invokeTask:function(){return x.invokeTask.call(u,qt,this,arguments)}}static invokeTask(f,h,l){f||(f=this),Zt++;try{return f.runCount++,f.zone.runTask(f,h,l)}finally{1==Zt&&Lt(),Zt--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(P,k)}_transitionTo(f,h,l){if(this._state!==h&&this._state!==l)throw new Error(`${this.type} '${this.source}': can not transition to '${f}', expecting state '${h}'${l?" or '"+l+"'":""}, was '${this._state}'.`);this._state=f,f==P&&(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 S=tt("setTimeout"),U=tt("Promise"),B=tt("then");let K,L=[],Y=!1;function Dt(nt){if(K||u[U]&&(K=u[U].resolve(0)),K){let f=K[B];f||(f=K.then),f.call(K,nt)}else u[S](nt,0)}function kt(nt){0===Zt&&0===L.length&&Dt(Lt),nt&&L.push(nt)}function Lt(){if(!Y){for(Y=!0;L.length;){const nt=L;L=[];for(let f=0;f<nt.length;f++){const h=nt[f];try{h.zone.runTask(h,null,null)}catch(l){X.onUnhandledError(l)}}}X.microtaskDrainDone(),Y=!1}}const Bt={name:"NO ZONE"},P="notScheduled",k="scheduling",ct="scheduled",et="running",yt="canceling",ut="unknown",R="microTask",bt="macroTask",j="eventTask",M={},X={symbol:tt,currentZoneFrame:()=>F,onUnhandledError:at,microtaskDrainDone:at,scheduleMicroTask:kt,showUncaughtError:()=>!d[tt("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:at,patchMethod:()=>at,bindArguments:()=>[],patchThen:()=>at,patchMacroTask:()=>at,patchEventPrototype:()=>at,getGlobalObjects:()=>{},ObjectDefineProperty:()=>at,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>at,wrapWithCurrentZone:()=>at,filterProperties:()=>[],attachOriginToPatched:()=>at,_redefineProperty:()=>at,patchCallbacks:()=>at,nativeScheduleMicroTask:Dt};let F={parent:null,zone:new d(null,null)},Ft=null,Zt=0;function at(){}return y("Zone","Zone"),d}()),o.Zone}();(function Ge(s){(function mt(s){s.__load_patch("ZoneAwarePromise",(o,y,c)=>{const d=Object.getOwnPropertyDescriptor,_=Object.defineProperty,x=c.symbol,S=[],U=!1!==o[x("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],B=x("Promise"),L=x("then");c.onUnhandledError=T=>{if(c.showUncaughtError()){const g=T&&T.rejection;g?console.error("Unhandled Promise rejection:",g instanceof Error?g.message:g,"; Zone:",T.zone.name,"; Task:",T.task&&T.task.source,"; Value:",g,g instanceof Error?g.stack:void 0):console.error(T)}},c.microtaskDrainDone=()=>{for(;S.length;){const T=S.shift();try{T.zone.runGuarded(()=>{throw T.throwOriginal?T.rejection:T})}catch(g){Dt(g)}}};const K=x("unhandledPromiseRejectionHandler");function Dt(T){c.onUnhandledError(T);try{const g=y[K];"function"==typeof g&&g.call(this,T)}catch{}}function kt(T){return T&&"function"==typeof T.then}function Lt(T){return T}function Bt(T){return J.reject(T)}const P=x("state"),k=x("value"),ct=x("finally"),et=x("parentPromiseValue"),yt=x("parentPromiseState"),R=null,j=!1;function X(T,g){return p=>{try{at(T,g,p)}catch(m){at(T,!1,m)}}}const F=function(){let T=!1;return function(p){return function(){T||(T=!0,p.apply(null,arguments))}}},Ft="Promise resolved with itself",Zt=x("currentTaskTrace");function at(T,g,p){const m=F();if(T===p)throw new TypeError(Ft);if(T[P]===R){let C=null;try{("object"==typeof p||"function"==typeof p)&&(C=p&&p.then)}catch(O){return m(()=>{at(T,!1,O)})(),T}if(g!==j&&p instanceof J&&p.hasOwnProperty(P)&&p.hasOwnProperty(k)&&p[P]!==R)f(p),at(T,p[P],p[k]);else if(g!==j&&"function"==typeof C)try{C.call(p,m(X(T,g)),m(X(T,!1)))}catch(O){m(()=>{at(T,!1,O)})()}else{T[P]=g;const O=T[k];if(T[k]=p,T[ct]===ct&&!0===g&&(T[P]=T[yt],T[k]=T[et]),g===j&&p instanceof Error){const v=y.currentTask&&y.currentTask.data&&y.currentTask.data.__creationTrace__;v&&_(p,Zt,{configurable:!0,enumerable:!1,writable:!0,value:v})}for(let v=0;v<O.length;)h(T,O[v++],O[v++],O[v++],O[v++]);if(0==O.length&&g==j){T[P]=0;let v=p;try{throw new Error("Uncaught (in promise): "+function D(T){return T&&T.toString===Object.prototype.toString?(T.constructor&&T.constructor.name||"")+": "+JSON.stringify(T):T?T.toString():Object.prototype.toString.call(T)}(p)+(p&&p.stack?"\n"+p.stack:""))}catch(G){v=G}U&&(v.throwOriginal=!0),v.rejection=p,v.promise=T,v.zone=y.current,v.task=y.currentTask,S.push(v),c.scheduleMicroTask()}}}return T}const nt=x("rejectionHandledHandler");function f(T){if(0===T[P]){try{const g=y[nt];g&&"function"==typeof g&&g.call(this,{rejection:T[k],promise:T})}catch{}T[P]=j;for(let g=0;g<S.length;g++)T===S[g].promise&&S.splice(g,1)}}function h(T,g,p,m,C){f(T);const O=T[P],v=O?"function"==typeof m?m:Lt:"function"==typeof C?C:Bt;g.scheduleMicroTask("Promise.then",()=>{try{const G=T[k],V=!!p&&ct===p[ct];V&&(p[et]=G,p[yt]=O);const $=g.run(v,void 0,V&&v!==Bt&&v!==Lt?[]:[G]);at(p,!0,$)}catch(G){at(p,!1,G)}},p)}const A=function(){},it=o.AggregateError;class J{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(g){return g instanceof J?g:at(new this(null),!0,g)}static reject(g){return at(new this(null),j,g)}static withResolvers(){const g={};return g.promise=new J((p,m)=>{g.resolve=p,g.reject=m}),g}static any(g){if(!g||"function"!=typeof g[Symbol.iterator])return Promise.reject(new it([],"All promises were rejected"));const p=[];let m=0;try{for(let v of g)m++,p.push(J.resolve(v))}catch{return Promise.reject(new it([],"All promises were rejected"))}if(0===m)return Promise.reject(new it([],"All promises were rejected"));let C=!1;const O=[];return new J((v,G)=>{for(let V=0;V<p.length;V++)p[V].then($=>{C||(C=!0,v($))},$=>{O.push($),m--,0===m&&(C=!0,G(new it(O,"All promises were rejected")))})})}static race(g){let p,m,C=new this((G,V)=>{p=G,m=V});function O(G){p(G)}function v(G){m(G)}for(let G of g)kt(G)||(G=this.resolve(G)),G.then(O,v);return C}static all(g){return J.allWithCallback(g)}static allSettled(g){return(this&&this.prototype instanceof J?this:J).allWithCallback(g,{thenCallback:m=>({status:"fulfilled",value:m}),errorCallback:m=>({status:"rejected",reason:m})})}static allWithCallback(g,p){let m,C,O=new this(($,ft)=>{m=$,C=ft}),v=2,G=0;const V=[];for(let $ of g){kt($)||($=this.resolve($));const ft=G;try{$.then(pt=>{V[ft]=p?p.thenCallback(pt):pt,v--,0===v&&m(V)},pt=>{p?(V[ft]=p.errorCallback(pt),v--,0===v&&m(V)):C(pt)})}catch(pt){C(pt)}v++,G++}return v-=2,0===v&&m(V),O}constructor(g){const p=this;if(!(p instanceof J))throw new Error("Must be an instanceof Promise.");p[P]=R,p[k]=[];try{const m=F();g&&g(m(X(p,!0)),m(X(p,j)))}catch(m){at(p,!1,m)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return J}then(g,p){var m;let C=null==(m=this.constructor)?void 0:m[Symbol.species];(!C||"function"!=typeof C)&&(C=this.constructor||J);const O=new C(A),v=y.current;return this[P]==R?this[k].push(v,O,g,p):h(this,v,O,g,p),O}catch(g){return this.then(null,g)}finally(g){var p;let m=null==(p=this.constructor)?void 0:p[Symbol.species];(!m||"function"!=typeof m)&&(m=J);const C=new m(A);C[ct]=ct;const O=y.current;return this[P]==R?this[k].push(O,C,g,g):h(this,O,C,g,g),C}}J.resolve=J.resolve,J.reject=J.reject,J.race=J.race,J.all=J.all;const qt=o[B]=o.Promise;o.Promise=J;const Jt=x("thenPatched");function Kt(T){const g=T.prototype,p=d(g,"then");if(p&&(!1===p.writable||!p.configurable))return;const m=g.then;g[L]=m,T.prototype.then=function(C,O){return new J((G,V)=>{m.call(this,G,V)}).then(C,O)},T[Jt]=!0}return c.patchThen=Kt,qt&&(Kt(qt),Ht(o,"fetch",T=>function Vt(T){return function(g,p){let m=T.apply(g,p);if(m instanceof J)return m;let C=m.constructor;return C[Jt]||Kt(C),m}}(T))),Promise[y.__symbol__("uncaughtPromiseErrors")]=S,J})})(s),function ht(s){s.__load_patch("toString",o=>{const y=Function.prototype.toString,c=Q("OriginalDelegate"),d=Q("Promise"),_=Q("Error"),D=function(){if("function"==typeof this){const B=this[c];if(B)return"function"==typeof B?y.call(B):Object.prototype.toString.call(B);if(this===Promise){const L=o[d];if(L)return y.call(L)}if(this===Error){const L=o[_];if(L)return y.call(L)}}return y.call(this)};D[c]=y,Function.prototype.toString=D;const x=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":x.call(this)}})}(s),function rt(s){s.__load_patch("util",(o,y,c)=>{const d=a(o);c.patchOnProperties=ge,c.patchMethod=Ht,c.bindArguments=ae,c.patchMacroTask=Se;const _=y.__symbol__("BLACK_LISTED_EVENTS"),D=y.__symbol__("UNPATCHED_EVENTS");o[D]&&(o[_]=o[D]),o[_]&&(y[_]=y[D]=o[_]),c.patchEventPrototype=we,c.patchEventTarget=fe,c.ObjectDefineProperty=I,c.ObjectGetOwnPropertyDescriptor=It,c.ObjectCreate=q,c.ArraySlice=st,c.patchClass=te,c.wrapWithCurrentZone=se,c.filterProperties=n,c.attachOriginToPatched=Gt,c._redefineProperty=Object.defineProperty,c.patchCallbacks=Tt,c.getGlobalObjects=()=>({globalSources:he,zoneSymbolEventNames:Ot,eventNames:d,isBrowser:ye,isMix:ve,isNode:le,TRUE_STR:gt,FALSE_STR:St,ZONE_SYMBOL_PREFIX:Qt,ADD_EVENT_LISTENER_STR:Ct,REMOVE_EVENT_LISTENER_STR:dt})})}(s)})(Le),function H(s){s.__load_patch("timers",o=>{const c="clear";ne(o,"set",c,"Timeout"),ne(o,"set",c,"Interval"),ne(o,"set",c,"Immediate")}),s.__load_patch("requestAnimationFrame",o=>{ne(o,"request","cancel","AnimationFrame"),ne(o,"mozRequest","mozCancel","AnimationFrame"),ne(o,"webkitRequest","webkitCancel","AnimationFrame")}),s.__load_patch("blocking",(o,y)=>{const c=["alert","prompt","confirm"];for(let d=0;d<c.length;d++)Ht(o,c[d],(D,x,S)=>function(U,B){return y.current.run(D,o,B,S)})}),s.__load_patch("EventTarget",(o,y,c)=>{(function e(s,o){o.patchEventPrototype(s,o)})(o,c),function t(s,o){if(Zone[o.symbol("patchEventTarget")])return;const{eventNames:y,zoneSymbolEventNames:c,TRUE_STR:d,FALSE_STR:_,ZONE_SYMBOL_PREFIX:D}=o.getGlobalObjects();for(let S=0;S<y.length;S++){const U=y[S],Y=D+(U+_),K=D+(U+d);c[U]={},c[U][_]=Y,c[U][d]=K}const x=s.EventTarget;x&&x.prototype&&o.patchEventTarget(s,o,[x&&x.prototype])}(o,c);const d=o.XMLHttpRequestEventTarget;d&&d.prototype&&c.patchEventTarget(o,c,[d.prototype])}),s.__load_patch("MutationObserver",(o,y,c)=>{te("MutationObserver"),te("WebKitMutationObserver")}),s.__load_patch("IntersectionObserver",(o,y,c)=>{te("IntersectionObserver")}),s.__load_patch("FileReader",(o,y,c)=>{te("FileReader")}),s.__load_patch("on_property",(o,y,c)=>{!function E(s,o){if(le&&!ve||Zone[s.symbol("patchEvents")])return;const y=o.__Zone_ignore_on_properties;let c=[];if(ye){const d=window;c=c.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]),i(d,a(d),y,b(d))}c=c.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(let d=0;d<c.length;d++){const _=o[c[d]];_?.prototype&&i(_.prototype,a(_.prototype),y)}}(c,o)}),s.__load_patch("customElements",(o,y,c)=>{!function r(s,o){const{isBrowser:y,isMix:c}=o.getGlobalObjects();(y||c)&&s.customElements&&"customElements"in s&&o.patchCallbacks(o,s.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback","formAssociatedCallback","formDisabledCallback","formResetCallback","formStateRestoreCallback"])}(o,c)}),s.__load_patch("XHR",(o,y)=>{!function U(B){const L=B.XMLHttpRequest;if(!L)return;const Y=L.prototype;let Dt=Y[Pt],kt=Y[jt];if(!Dt){const M=B.XMLHttpRequestEventTarget;if(M){const X=M.prototype;Dt=X[Pt],kt=X[jt]}}const Lt="readystatechange",Bt="scheduled";function P(M){const X=M.data,F=X.target;F[D]=!1,F[S]=!1;const Ft=F[_];Dt||(Dt=F[Pt],kt=F[jt]),Ft&&kt.call(F,Lt,Ft);const Zt=F[_]=()=>{if(F.readyState===F.DONE)if(!X.aborted&&F[D]&&M.state===Bt){const nt=F[y.__symbol__("loadfalse")];if(0!==F.status&&nt&&nt.length>0){const f=M.invoke;M.invoke=function(){const h=F[y.__symbol__("loadfalse")];for(let l=0;l<h.length;l++)h[l]===M&&h.splice(l,1);!X.aborted&&M.state===Bt&&f.call(M)},nt.push(M)}else M.invoke()}else!X.aborted&&!1===F[D]&&(F[S]=!0)};return Dt.call(F,Lt,Zt),F[c]||(F[c]=M),bt.apply(F,X.args),F[D]=!0,M}function k(){}function ct(M){const X=M.data;return X.aborted=!0,j.apply(X.target,X.args)}const et=Ht(Y,"open",()=>function(M,X){return M[d]=0==X[2],M[x]=X[1],et.apply(M,X)}),ut=Q("fetchTaskAborting"),R=Q("fetchTaskScheduling"),bt=Ht(Y,"send",()=>function(M,X){if(!0===y.current[R]||M[d])return bt.apply(M,X);{const F={target:M,url:M[x],isPeriodic:!1,args:X,aborted:!1},Ft=de("XMLHttpRequest.send",k,F,P,ct);M&&!0===M[S]&&!F.aborted&&Ft.state===Bt&&Ft.invoke()}}),j=Ht(Y,"abort",()=>function(M,X){const F=function K(M){return M[c]}(M);if(F&&"string"==typeof F.type){if(null==F.cancelFn||F.data&&F.data.aborted)return;F.zone.cancelTask(F)}else if(!0===y.current[ut])return j.apply(M,X)})}(o);const c=Q("xhrTask"),d=Q("xhrSync"),_=Q("xhrListener"),D=Q("xhrScheduled"),x=Q("xhrURL"),S=Q("xhrErrorBeforeScheduled")}),s.__load_patch("geolocation",o=>{o.navigator&&o.navigator.geolocation&&function be(s,o){const y=s.constructor.name;for(let c=0;c<o.length;c++){const d=o[c],_=s[d];if(_){if(!xe(It(s,d)))continue;s[d]=(x=>{const S=function(){return x.apply(this,ae(arguments,y+"."+d))};return Gt(S,x),S})(_)}}}(o.navigator.geolocation,["getCurrentPosition","watchPosition"])}),s.__load_patch("PromiseRejectionEvent",(o,y)=>{function c(d){return function(_){Ut(o,d).forEach(x=>{const S=o.PromiseRejectionEvent;if(S){const U=new S(d,{promise:_.promise,reason:_.rejection});x.invoke(U)}})}}o.PromiseRejectionEvent&&(y[Q("unhandledPromiseRejectionHandler")]=c("unhandledrejection"),y[Q("rejectionHandledHandler")]=c("rejectionhandled"))}),s.__load_patch("queueMicrotask",(o,y,c)=>{!function De(s,o){o.patchMethod(s,"queueMicrotask",y=>function(c,d){Zone.current.scheduleMicroTask("queueMicrotask",d[0])})}(o,c)})}(Le)}},Wt=>{var z=N=>Wt(Wt.s=N);z(6935),z(4050)}]); |