jobsys-newbie 3.0.0 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- const e=require(`./chunk-DMQnFFSv.cjs`);let t=require(`vue`),n=require(`ant-design-vue`),r=require(`dayjs`);r=e.a(r);let i=require(`lodash-es`),a=require(`axios`);a=e.a(a);const o=typeof globalThis==`object`&&`crypto`in globalThis?globalThis.crypto:void 0;function s(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name===`Uint8Array`}function c(e){if(!Number.isSafeInteger(e)||e<0)throw Error(`positive integer expected, got `+e)}function l(e,...t){if(!s(e))throw Error(`Uint8Array expected`);if(t.length>0&&!t.includes(e.length))throw Error(`Uint8Array expected of length `+t+`, got length=`+e.length)}function u(e){if(typeof e!=`function`||typeof e.create!=`function`)throw Error(`Hash should be wrapped by utils.createHasher`);c(e.outputLen),c(e.blockLen)}function d(e,t=!0){if(e.destroyed)throw Error(`Hash instance has been destroyed`);if(t&&e.finished)throw Error(`Hash#digest() has already been called`)}function f(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}var p=(()=>typeof Uint8Array.from([]).toHex==`function`&&typeof Uint8Array.fromHex==`function`)(),m=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,`0`));function h(e){if(l(e),p)return e.toHex();let t=``;for(let n=0;n<e.length;n++)t+=m[e[n]];return t}var g={_0:48,_9:57,A:65,F:70,a:97,f:102};function _(e){if(e>=g._0&&e<=g._9)return e-g._0;if(e>=g.A&&e<=g.F)return e-(g.A-10);if(e>=g.a&&e<=g.f)return e-(g.a-10)}function v(e){if(typeof e!=`string`)throw Error(`hex string expected, got `+typeof e);if(p)return Uint8Array.fromHex(e);let t=e.length,n=t/2;if(t%2)throw Error(`hex string expected, got unpadded hex of length `+t);let r=new Uint8Array(n);for(let t=0,i=0;t<n;t++,i+=2){let n=_(e.charCodeAt(i)),a=_(e.charCodeAt(i+1));if(n===void 0||a===void 0){let t=e[i]+e[i+1];throw Error(`hex string expected, got non-hex character "`+t+`" at index `+i)}r[t]=n*16+a}return r}function y(e){if(typeof e!=`string`)throw Error(`string expected`);return new Uint8Array(new TextEncoder().encode(e))}function b(e){return new TextDecoder().decode(e)}function x(e){return typeof e==`string`&&(e=y(e)),l(e),e}function S(...e){let t=0;for(let n=0;n<e.length;n++){let r=e[n];l(r),t+=r.length}let n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){let i=e[t];n.set(i,r),r+=i.length}return n}var C=class{};function w(e=32){if(o&&typeof o.getRandomValues==`function`)return o.getRandomValues(new Uint8Array(e));if(o&&typeof o.randomBytes==`function`)return Uint8Array.from(o.randomBytes(e));throw Error(`crypto.getRandomValues must be defined`)}var T=BigInt(0),E=BigInt(1);function D(e,t){if(typeof t!=`boolean`)throw Error(e+` boolean expected, got `+t)}function O(e,t=``){if(typeof e!=`boolean`){let n=t&&`"${t}"`;throw Error(n+`expected boolean, got type=`+typeof e)}return e}function ee(e,t,n=``){let r=s(e),i=e?.length,a=t!==void 0;if(!r||a&&i!==t){let o=n&&`"${n}" `,s=a?` of length ${t}`:``,c=r?`length=${i}`:`type=${typeof e}`;throw Error(o+`expected Uint8Array`+s+`, got `+c)}return e}function te(e){let t=e.toString(16);return t.length&1?`0`+t:t}function ne(e){if(typeof e!=`string`)throw Error(`hex string expected, got `+typeof e);return e===``?T:BigInt(`0x`+e)}function re(e){return ne(h(e))}function ie(e){return l(e),ne(h(Uint8Array.from(e).reverse()))}function ae(e,t){return v(e.toString(16).padStart(t*2,`0`))}function oe(e,t){return ae(e,t).reverse()}function se(e){return v(te(e))}function k(e,t,n){let r;if(typeof t==`string`)try{r=v(t)}catch(t){throw Error(e+` must be hex string or Uint8Array, cause: `+t)}else if(s(t))r=Uint8Array.from(t);else throw Error(e+` must be hex string or Uint8Array`);let i=r.length;if(typeof n==`number`&&i!==n)throw Error(e+` of length `+n+` expected, got `+i);return r}function ce(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return n===0}function le(e){return Uint8Array.from(e)}function ue(e){return Uint8Array.from(e,(t,n)=>{let r=t.charCodeAt(0);if(t.length!==1||r>127)throw Error(`string contains non-ASCII character "${e[n]}" with code ${r} at position ${n}`);return r})}var de=e=>typeof e==`bigint`&&T<=e;function fe(e,t,n){return de(e)&&de(t)&&de(n)&&t<=e&&e<n}function pe(e,t,n,r){if(!fe(t,n,r))throw Error(`expected valid `+e+`: `+n+` <= n < `+r+`, got `+t)}function me(e){let t;for(t=0;e>T;e>>=E,t+=1);return t}function he(e,t){return e>>BigInt(t)&E}function ge(e,t,n){return e|(n?E:T)<<BigInt(t)}const _e=e=>(E<<BigInt(e))-E;function ve(e,t,n){if(typeof e!=`number`||e<2)throw Error(`hashLen must be a number`);if(typeof t!=`number`||t<2)throw Error(`qByteLen must be a number`);if(typeof n!=`function`)throw Error(`hmacFn must be a function`);let r=e=>new Uint8Array(e),i=e=>Uint8Array.of(e),a=r(e),o=r(e),s=0,c=()=>{a.fill(1),o.fill(0),s=0},l=(...e)=>n(o,a,...e),u=(e=r(0))=>{o=l(i(0),e),a=l(),e.length!==0&&(o=l(i(1),e),a=l())},d=()=>{if(s++>=1e3)throw Error(`drbg: tried 1000 values`);let e=0,n=[];for(;e<t;){a=l();let t=a.slice();n.push(t),e+=a.length}return S(...n)};return(e,t)=>{c(),u(e);let n;for(;!(n=t(d()));)u();return c(),n}}var ye={bigint:e=>typeof e==`bigint`,function:e=>typeof e==`function`,boolean:e=>typeof e==`boolean`,string:e=>typeof e==`string`,stringOrUint8Array:e=>typeof e==`string`||s(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e==`function`&&Number.isSafeInteger(e.outputLen)};function be(e,t,n={}){let r=(t,n,r)=>{let i=ye[n];if(typeof i!=`function`)throw Error(`invalid validator function`);let a=e[t];if(!(r&&a===void 0)&&!i(a,e))throw Error(`param `+String(t)+` is invalid. Expected `+n+`, got `+a)};for(let[e,n]of Object.entries(t))r(e,n,!1);for(let[e,t]of Object.entries(n))r(e,t,!0);return e}function xe(e){return typeof e==`function`&&Number.isSafeInteger(e.outputLen)}function Se(e,t,n={}){if(!e||typeof e!=`object`)throw Error(`expected valid options object`);function r(t,n,r){let i=e[t];if(r&&i===void 0)return;let a=typeof i;if(a!==n||i===null)throw Error(`param "${t}" is invalid: expected ${n}, got ${a}`)}Object.entries(t).forEach(([e,t])=>r(e,t,!1)),Object.entries(n).forEach(([e,t])=>r(e,t,!0))}const Ce=()=>{throw Error(`not implemented`)};function we(e){let t=new WeakMap;return(n,...r)=>{let i=t.get(n);if(i!==void 0)return i;let a=e(n,...r);return t.set(n,a),a}}const Te=l,Ee=c,De=h,Oe=b,A=S,ke=v,Ae=s,je=w,Me=y,Ne=D,j=te,M=ne,Pe=re,Fe=ie,Ie=ae,Le=oe,Re=se,ze=k,Be=ce,Ve=le,He=ue,Ue=fe,We=pe,Ge=me,Ke=he,qe=ge,Je=_e,Ye=ve,Xe=Ce,Ze=we,Qe=be,$e=xe;var et=class extends C{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,u(e);let n=x(t);if(this.iHash=e.create(),typeof this.iHash.update!=`function`)throw Error(`Expected instance of class which extends utils.Hash`);this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let r=this.blockLen,i=new Uint8Array(r);i.set(n.length>r?e.create().update(n).digest():n);for(let e=0;e<i.length;e++)i[e]^=54;this.iHash.update(i),this.oHash=e.create();for(let e=0;e<i.length;e++)i[e]^=106;this.oHash.update(i),f(i)}update(e){return d(this),this.iHash.update(e),this}digestInto(e){d(this),l(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||=Object.create(Object.getPrototypeOf(this),{});let{oHash:t,iHash:n,finished:r,destroyed:i,blockLen:a,outputLen:o}=this;return e=e,e.finished=r,e.destroyed=i,e.blockLen=a,e.outputLen=o,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}};const tt=(e,t,n)=>new et(e,t).update(n).digest();tt.create=(e,t)=>new et(e,t);var N=BigInt(0),P=BigInt(1),nt=BigInt(2),rt=BigInt(3),it=BigInt(4),at=BigInt(5),ot=BigInt(7),st=BigInt(8),ct=BigInt(9),lt=BigInt(16);function ut(e,t){let n=e%t;return n>=N?n:t+n}function dt(e,t){if(e===N)throw Error(`invert: expected non-zero number`);if(t<=N)throw Error(`invert: expected positive modulus, got `+t);let n=ut(e,t),r=t,i=N,a=P,o=P,s=N;for(;n!==N;){let e=r/n,t=r%n,c=i-o*e,l=a-s*e;r=n,n=t,i=o,a=s,o=c,s=l}if(r!==P)throw Error(`invert: does not exist`);return ut(i,t)}function ft(e,t,n){if(!e.eql(e.sqr(t),n))throw Error(`Cannot find square root`)}function pt(e,t){let n=(e.ORDER+P)/it,r=e.pow(t,n);return ft(e,r,t),r}function mt(e,t){let n=(e.ORDER-at)/st,r=e.mul(t,nt),i=e.pow(r,n),a=e.mul(t,i),o=e.mul(e.mul(a,nt),i),s=e.mul(a,e.sub(o,e.ONE));return ft(e,s,t),s}function ht(e){let t=wt(e),n=gt(e),r=n(t,t.neg(t.ONE)),i=n(t,r),a=n(t,t.neg(r)),o=(e+ot)/lt;return(e,t)=>{let n=e.pow(t,o),s=e.mul(n,r),c=e.mul(n,i),l=e.mul(n,a),u=e.eql(e.sqr(s),t),d=e.eql(e.sqr(c),t);n=e.cmov(n,s,u),s=e.cmov(l,c,d);let f=e.eql(e.sqr(s),t),p=e.cmov(n,s,f);return ft(e,p,t),p}}function gt(e){if(e<rt)throw Error(`sqrt is not defined for small field`);let t=e-P,n=0;for(;t%nt===N;)t/=nt,n++;let r=nt,i=wt(e);for(;St(i,r)===1;)if(r++>1e3)throw Error(`Cannot find square root: probably non-prime P`);if(n===1)return pt;let a=i.pow(r,t),o=(t+P)/nt;return function(e,r){if(e.is0(r))return r;if(St(e,r)!==1)throw Error(`Cannot find square root`);let i=n,s=e.mul(e.ONE,a),c=e.pow(r,t),l=e.pow(r,o);for(;!e.eql(c,e.ONE);){if(e.is0(c))return e.ZERO;let t=1,n=e.sqr(c);for(;!e.eql(n,e.ONE);)if(t++,n=e.sqr(n),t===i)throw Error(`Cannot find square root`);let r=P<<BigInt(i-t-1),a=e.pow(s,r);i=t,s=e.sqr(a),c=e.mul(c,s),l=e.mul(l,a)}return l}}function _t(e){return e%it===rt?pt:e%st===at?mt:e%lt===ct?ht(e):gt(e)}var vt=[`create`,`isValid`,`is0`,`neg`,`inv`,`sqrt`,`sqr`,`eql`,`add`,`sub`,`mul`,`pow`,`div`,`addN`,`subN`,`mulN`,`sqrN`];function yt(e){return Se(e,vt.reduce((e,t)=>(e[t]=`function`,e),{ORDER:`bigint`,MASK:`bigint`,BYTES:`number`,BITS:`number`})),e}function bt(e,t,n){if(n<N)throw Error(`invalid exponent, negatives unsupported`);if(n===N)return e.ONE;if(n===P)return t;let r=e.ONE,i=t;for(;n>N;)n&P&&(r=e.mul(r,i)),i=e.sqr(i),n>>=P;return r}function xt(e,t,n=!1){let r=Array(t.length).fill(n?e.ZERO:void 0),i=t.reduce((t,n,i)=>e.is0(n)?t:(r[i]=t,e.mul(t,n)),e.ONE),a=e.inv(i);return t.reduceRight((t,n,i)=>e.is0(n)?t:(r[i]=e.mul(t,r[i]),e.mul(t,n)),a),r}function St(e,t){let n=(e.ORDER-P)/nt,r=e.pow(t,n),i=e.eql(r,e.ONE),a=e.eql(r,e.ZERO),o=e.eql(r,e.neg(e.ONE));if(!i&&!a&&!o)throw Error(`invalid Legendre symbol result`);return i?1:a?0:-1}function Ct(e,t){t!==void 0&&c(t);let n=t===void 0?e.toString(2).length:t;return{nBitLength:n,nByteLength:Math.ceil(n/8)}}function wt(e,t,n=!1,r={}){if(e<=N)throw Error(`invalid field: expected ORDER > 0, got `+e);let i,a,o=!1,s;if(typeof t==`object`&&t){if(r.sqrt||n)throw Error(`cannot specify opts in two arguments`);let e=t;e.BITS&&(i=e.BITS),e.sqrt&&(a=e.sqrt),typeof e.isLE==`boolean`&&(n=e.isLE),typeof e.modFromBytes==`boolean`&&(o=e.modFromBytes),s=e.allowedLengths}else typeof t==`number`&&(i=t),r.sqrt&&(a=r.sqrt);let{nBitLength:c,nByteLength:l}=Ct(e,i);if(l>2048)throw Error(`invalid field: expected ORDER of <= 2048 bytes`);let u,d=Object.freeze({ORDER:e,isLE:n,BITS:c,BYTES:l,MASK:_e(c),ZERO:N,ONE:P,allowedLengths:s,create:t=>ut(t,e),isValid:t=>{if(typeof t!=`bigint`)throw Error(`invalid field element: expected bigint, got `+typeof t);return N<=t&&t<e},is0:e=>e===N,isValidNot0:e=>!d.is0(e)&&d.isValid(e),isOdd:e=>(e&P)===P,neg:t=>ut(-t,e),eql:(e,t)=>e===t,sqr:t=>ut(t*t,e),add:(t,n)=>ut(t+n,e),sub:(t,n)=>ut(t-n,e),mul:(t,n)=>ut(t*n,e),pow:(e,t)=>bt(d,e,t),div:(t,n)=>ut(t*dt(n,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>dt(t,e),sqrt:a||(t=>(u||=_t(e),u(d,t))),toBytes:e=>n?oe(e,l):ae(e,l),fromBytes:(t,r=!0)=>{if(s){if(!s.includes(t.length)||t.length>l)throw Error(`Field.fromBytes: expected `+s+` bytes, got `+t.length);let e=new Uint8Array(l);e.set(t,n?0:e.length-t.length),t=e}if(t.length!==l)throw Error(`Field.fromBytes: expected `+l+` bytes, got `+t.length);let i=n?ie(t):re(t);if(o&&(i=ut(i,e)),!r&&!d.isValid(i))throw Error(`invalid field element: outside of range 0..ORDER`);return i},invertBatch:e=>xt(d,e),cmov:(e,t,n)=>n?t:e});return Object.freeze(d)}function Tt(e){if(typeof e!=`bigint`)throw Error(`field order must be bigint`);let t=e.toString(2).length;return Math.ceil(t/8)}function Et(e){let t=Tt(e);return t+Math.ceil(t/2)}function Dt(e,t,n=!1){let r=e.length,i=Tt(t),a=Et(t);if(r<16||r<a||r>1024)throw Error(`expected `+a+`-1024 bytes of input, got `+r);let o=ut(n?ie(e):re(e),t-P)+P;return n?oe(o,i):ae(o,i)}var Ot=BigInt(0),kt=BigInt(1);function At(e,t){let n=t.negate();return e?n:t}function jt(e,t){let n=xt(e.Fp,t.map(e=>e.Z));return t.map((t,r)=>e.fromAffine(t.toAffine(n[r])))}function Mt(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw Error(`invalid window size, expected [1..`+t+`], got W=`+e)}function Nt(e,t){Mt(e,t);let n=Math.ceil(t/e)+1,r=2**(e-1),i=2**e;return{windows:n,windowSize:r,mask:_e(e),maxNumber:i,shiftBy:BigInt(e)}}function Pt(e,t,n){let{windowSize:r,mask:i,maxNumber:a,shiftBy:o}=n,s=Number(e&i),c=e>>o;s>r&&(s-=a,c+=kt);let l=t*r,u=l+Math.abs(s)-1,d=s===0,f=s<0,p=t%2!=0;return{nextN:c,offset:u,isZero:d,isNeg:f,isNegF:p,offsetF:l}}function Ft(e,t){if(!Array.isArray(e))throw Error(`array expected`);e.forEach((e,n)=>{if(!(e instanceof t))throw Error(`invalid point at index `+n)})}function It(e,t){if(!Array.isArray(e))throw Error(`array of scalars expected`);e.forEach((e,n)=>{if(!t.isValid(e))throw Error(`invalid scalar at index `+n)})}var Lt=new WeakMap,Rt=new WeakMap;function zt(e){return Rt.get(e)||1}function Bt(e){if(e!==Ot)throw Error(`invalid wNAF`)}var Vt=class{constructor(e,t){this.BASE=e.BASE,this.ZERO=e.ZERO,this.Fn=e.Fn,this.bits=t}_unsafeLadder(e,t,n=this.ZERO){let r=e;for(;t>Ot;)t&kt&&(n=n.add(r)),r=r.double(),t>>=kt;return n}precomputeWindow(e,t){let{windows:n,windowSize:r}=Nt(t,this.bits),i=[],a=e,o=a;for(let e=0;e<n;e++){o=a,i.push(o);for(let e=1;e<r;e++)o=o.add(a),i.push(o);a=o.double()}return i}wNAF(e,t,n){if(!this.Fn.isValid(n))throw Error(`invalid scalar`);let r=this.ZERO,i=this.BASE,a=Nt(e,this.bits);for(let e=0;e<a.windows;e++){let{nextN:o,offset:s,isZero:c,isNeg:l,isNegF:u,offsetF:d}=Pt(n,e,a);n=o,c?i=i.add(At(u,t[d])):r=r.add(At(l,t[s]))}return Bt(n),{p:r,f:i}}wNAFUnsafe(e,t,n,r=this.ZERO){let i=Nt(e,this.bits);for(let e=0;e<i.windows&&n!==Ot;e++){let{nextN:a,offset:o,isZero:s,isNeg:c}=Pt(n,e,i);if(n=a,!s){let e=t[o];r=r.add(c?e.negate():e)}}return Bt(n),r}getPrecomputes(e,t,n){let r=Lt.get(t);return r||(r=this.precomputeWindow(t,e),e!==1&&(typeof n==`function`&&(r=n(r)),Lt.set(t,r))),r}cached(e,t,n){let r=zt(e);return this.wNAF(r,this.getPrecomputes(r,e,n),t)}unsafe(e,t,n,r){let i=zt(e);return i===1?this._unsafeLadder(e,t,r):this.wNAFUnsafe(i,this.getPrecomputes(i,e,n),t,r)}createCache(e,t){Mt(t,this.bits),Rt.set(e,t),Lt.delete(e)}hasCache(e){return zt(e)!==1}};function Ht(e,t,n,r){let i=t,a=e.ZERO,o=e.ZERO;for(;n>Ot||r>Ot;)n&kt&&(a=a.add(i)),r&kt&&(o=o.add(i)),i=i.double(),n>>=kt,r>>=kt;return{p1:a,p2:o}}function Ut(e,t,n,r){Ft(n,e),It(r,t);let i=n.length,a=r.length;if(i!==a)throw Error(`arrays of points and scalars must have equal length`);let o=e.ZERO,s=me(BigInt(i)),c=1;s>12?c=s-3:s>4?c=s-2:s>0&&(c=2);let l=_e(c),u=Array(Number(l)+1).fill(o),d=Math.floor((t.BITS-1)/c)*c,f=o;for(let e=d;e>=0;e-=c){u.fill(o);for(let t=0;t<a;t++){let i=r[t],a=Number(i>>BigInt(e)&l);u[a]=u[a].add(n[t])}let t=o;for(let e=u.length-1,n=o;e>0;e--)n=n.add(u[e]),t=t.add(n);if(f=f.add(t),e!==0)for(let e=0;e<c;e++)f=f.double()}return f}function Wt(e,t,n){if(t){if(t.ORDER!==e)throw Error(`Field.ORDER must match order: Fp == p, Fn == n`);return yt(t),t}else return wt(e,{isLE:n})}function Gt(e,t,n={},r){if(r===void 0&&(r=e===`edwards`),!t||typeof t!=`object`)throw Error(`expected valid ${e} CURVE object`);for(let e of[`p`,`n`,`h`]){let n=t[e];if(!(typeof n==`bigint`&&n>Ot))throw Error(`CURVE.${e} must be positive bigint`)}let i=Wt(t.p,n.Fp,r),a=Wt(t.n,n.Fn,r),o=[`Gx`,`Gy`,`a`,e===`weierstrass`?`b`:`d`];for(let e of o)if(!i.isValid(t[e]))throw Error(`CURVE.${e} must be valid field element of CURVE.Fp`);return t=Object.freeze(Object.assign({},t)),{CURVE:t,Fp:i,Fn:a}}var Kt=(e,t)=>(e+(e>=0?t:-t)/en)/t;function qt(e,t,n){let[[r,i],[a,o]]=t,s=Kt(o*e,n),c=Kt(-i*e,n),l=e-s*r-c*a,u=-s*i-c*o,d=l<Qt,f=u<Qt;d&&(l=-l),f&&(u=-u);let p=_e(Math.ceil(me(n)/2))+$t;if(l<Qt||l>=p||u<Qt||u>=p)throw Error(`splitScalar (endomorphism): failed, k=`+e);return{k1neg:d,k1:l,k2neg:f,k2:u}}function Jt(e){if(![`compact`,`recovered`,`der`].includes(e))throw Error(`Signature format must be "compact", "recovered", or "der"`);return e}function Yt(e,t){let n={};for(let r of Object.keys(t))n[r]=e[r]===void 0?t[r]:e[r];return O(n.lowS,`lowS`),O(n.prehash,`prehash`),n.format!==void 0&&Jt(n.format),n}var Xt=class extends Error{constructor(e=``){super(e)}};const Zt={Err:Xt,_tlv:{encode:(e,t)=>{let{Err:n}=Zt;if(e<0||e>256)throw new n(`tlv.encode: wrong tag`);if(t.length&1)throw new n(`tlv.encode: unpadded data`);let r=t.length/2,i=te(r);if(i.length/2&128)throw new n(`tlv.encode: long form length too big`);let a=r>127?te(i.length/2|128):``;return te(e)+a+i+t},decode(e,t){let{Err:n}=Zt,r=0;if(e<0||e>256)throw new n(`tlv.encode: wrong tag`);if(t.length<2||t[r++]!==e)throw new n(`tlv.decode: wrong tlv`);let i=t[r++],a=!!(i&128),o=0;if(!a)o=i;else{let e=i&127;if(!e)throw new n(`tlv.decode(long): indefinite length not supported`);if(e>4)throw new n(`tlv.decode(long): byte length is too big`);let a=t.subarray(r,r+e);if(a.length!==e)throw new n(`tlv.decode: length bytes not complete`);if(a[0]===0)throw new n(`tlv.decode(long): zero leftmost byte`);for(let e of a)o=o<<8|e;if(r+=e,o<128)throw new n(`tlv.decode(long): not minimal encoding`)}let s=t.subarray(r,r+o);if(s.length!==o)throw new n(`tlv.decode: wrong value length`);return{v:s,l:t.subarray(r+o)}}},_int:{encode(e){let{Err:t}=Zt;if(e<Qt)throw new t(`integer: negative integers are not allowed`);let n=te(e);if(Number.parseInt(n[0],16)&8&&(n=`00`+n),n.length&1)throw new t(`unexpected DER parsing assertion: unpadded hex`);return n},decode(e){let{Err:t}=Zt;if(e[0]&128)throw new t(`invalid signature integer: negative`);if(e[0]===0&&!(e[1]&128))throw new t(`invalid signature integer: unnecessary leading zero`);return re(e)}},toSig(e){let{Err:t,_int:n,_tlv:r}=Zt,i=k(`signature`,e),{v:a,l:o}=r.decode(48,i);if(o.length)throw new t(`invalid signature: left bytes after parsing`);let{v:s,l:c}=r.decode(2,a),{v:l,l:u}=r.decode(2,c);if(u.length)throw new t(`invalid signature: left bytes after parsing`);return{r:n.decode(s),s:n.decode(l)}},hexFromSig(e){let{_tlv:t,_int:n}=Zt,r=t.encode(2,n.encode(e.r))+t.encode(2,n.encode(e.s));return t.encode(48,r)}};var Qt=BigInt(0),$t=BigInt(1),en=BigInt(2),tn=BigInt(3),nn=BigInt(4);function rn(e,t){let{BYTES:n}=e,r;if(typeof t==`bigint`)r=t;else{let i=k(`private key`,t);try{r=e.fromBytes(i)}catch{throw Error(`invalid private key: expected ui8a of size ${n}, got ${typeof t}`)}}if(!e.isValidNot0(r))throw Error(`invalid private key: out of range [1..N-1]`);return r}function an(e,t={}){let n=Gt(`weierstrass`,e,t),{Fp:r,Fn:i}=n,a=n.CURVE,{h:o,n:s}=a;Se(t,{},{allowInfinityPoint:`boolean`,clearCofactor:`function`,isTorsionFree:`function`,fromBytes:`function`,toBytes:`function`,endo:`object`,wrapPrivateKey:`boolean`});let{endo:c}=t;if(c&&(!r.is0(a.a)||typeof c.beta!=`bigint`||!Array.isArray(c.basises)))throw Error(`invalid endo: expected "beta": bigint and "basises": array`);let l=sn(r,i);function u(){if(!r.isOdd)throw Error(`compression is not supported: Field does not have .isOdd()`)}function d(e,t,n){let{x:i,y:a}=t.toAffine(),o=r.toBytes(i);return O(n,`isCompressed`),n?(u(),S(on(!r.isOdd(a)),o)):S(Uint8Array.of(4),o,r.toBytes(a))}function f(e){ee(e,void 0,`Point`);let{publicKey:t,publicKeyUncompressed:n}=l,i=e.length,a=e[0],o=e.subarray(1);if(i===t&&(a===2||a===3)){let e=r.fromBytes(o);if(!r.isValid(e))throw Error(`bad point: is not on curve, wrong x`);let t=g(e),n;try{n=r.sqrt(t)}catch(e){let t=e instanceof Error?`: `+e.message:``;throw Error(`bad point: is not on curve, sqrt error`+t)}u();let i=r.isOdd(n);return(a&1)==1!==i&&(n=r.neg(n)),{x:e,y:n}}else if(i===n&&a===4){let e=r.BYTES,t=r.fromBytes(o.subarray(0,e)),n=r.fromBytes(o.subarray(e,e*2));if(!_(t,n))throw Error(`bad point: is not on curve`);return{x:t,y:n}}else throw Error(`bad point: got length ${i}, expected compressed=${t} or uncompressed=${n}`)}let p=t.toBytes||d,m=t.fromBytes||f;function g(e){let t=r.sqr(e),n=r.mul(t,e);return r.add(r.add(n,r.mul(e,a.a)),a.b)}function _(e,t){let n=r.sqr(t),i=g(e);return r.eql(n,i)}if(!_(a.Gx,a.Gy))throw Error(`bad curve params: generator point`);let v=r.mul(r.pow(a.a,tn),nn),y=r.mul(r.sqr(a.b),BigInt(27));if(r.is0(r.add(v,y)))throw Error(`bad curve params: a or b`);function b(e,t,n=!1){if(!r.isValid(t)||n&&r.is0(t))throw Error(`bad point coordinate ${e}`);return t}function x(e){if(!(e instanceof D))throw Error(`ProjectivePoint expected`)}function C(e){if(!c||!c.basises)throw Error(`no endo`);return qt(e,c.basises,i.ORDER)}let w=we((e,t)=>{let{X:n,Y:i,Z:a}=e;if(r.eql(a,r.ONE))return{x:n,y:i};let o=e.is0();t??=o?r.ONE:r.inv(a);let s=r.mul(n,t),c=r.mul(i,t),l=r.mul(a,t);if(o)return{x:r.ZERO,y:r.ZERO};if(!r.eql(l,r.ONE))throw Error(`invZ was invalid`);return{x:s,y:c}}),T=we(e=>{if(e.is0()){if(t.allowInfinityPoint&&!r.is0(e.Y))return;throw Error(`bad point: ZERO`)}let{x:n,y:i}=e.toAffine();if(!r.isValid(n)||!r.isValid(i))throw Error(`bad point: x or y not field elements`);if(!_(n,i))throw Error(`bad point: equation left != right`);if(!e.isTorsionFree())throw Error(`bad point: not in prime-order subgroup`);return!0});function E(e,t,n,i,a){return n=new D(r.mul(n.X,e),n.Y,n.Z),t=At(i,t),n=At(a,n),t.add(n)}class D{constructor(e,t,n){this.X=b(`x`,e),this.Y=b(`y`,t,!0),this.Z=b(`z`,n),Object.freeze(this)}static CURVE(){return a}static fromAffine(e){let{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw Error(`invalid affine point`);if(e instanceof D)throw Error(`projective point not allowed`);return r.is0(t)&&r.is0(n)?D.ZERO:new D(t,n,r.ONE)}static fromBytes(e){let t=D.fromAffine(m(ee(e,void 0,`point`)));return t.assertValidity(),t}static fromHex(e){return D.fromBytes(k(`pointHex`,e))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(e=8,t=!0){return ne.createCache(this,e),t||this.multiply(tn),this}assertValidity(){T(this)}hasEvenY(){let{y:e}=this.toAffine();if(!r.isOdd)throw Error(`Field doesn't support isOdd`);return!r.isOdd(e)}equals(e){x(e);let{X:t,Y:n,Z:i}=this,{X:a,Y:o,Z:s}=e,c=r.eql(r.mul(t,s),r.mul(a,i)),l=r.eql(r.mul(n,s),r.mul(o,i));return c&&l}negate(){return new D(this.X,r.neg(this.Y),this.Z)}double(){let{a:e,b:t}=a,n=r.mul(t,tn),{X:i,Y:o,Z:s}=this,c=r.ZERO,l=r.ZERO,u=r.ZERO,d=r.mul(i,i),f=r.mul(o,o),p=r.mul(s,s),m=r.mul(i,o);return m=r.add(m,m),u=r.mul(i,s),u=r.add(u,u),c=r.mul(e,u),l=r.mul(n,p),l=r.add(c,l),c=r.sub(f,l),l=r.add(f,l),l=r.mul(c,l),c=r.mul(m,c),u=r.mul(n,u),p=r.mul(e,p),m=r.sub(d,p),m=r.mul(e,m),m=r.add(m,u),u=r.add(d,d),d=r.add(u,d),d=r.add(d,p),d=r.mul(d,m),l=r.add(l,d),p=r.mul(o,s),p=r.add(p,p),d=r.mul(p,m),c=r.sub(c,d),u=r.mul(p,f),u=r.add(u,u),u=r.add(u,u),new D(c,l,u)}add(e){x(e);let{X:t,Y:n,Z:i}=this,{X:o,Y:s,Z:c}=e,l=r.ZERO,u=r.ZERO,d=r.ZERO,f=a.a,p=r.mul(a.b,tn),m=r.mul(t,o),h=r.mul(n,s),g=r.mul(i,c),_=r.add(t,n),v=r.add(o,s);_=r.mul(_,v),v=r.add(m,h),_=r.sub(_,v),v=r.add(t,i);let y=r.add(o,c);return v=r.mul(v,y),y=r.add(m,g),v=r.sub(v,y),y=r.add(n,i),l=r.add(s,c),y=r.mul(y,l),l=r.add(h,g),y=r.sub(y,l),d=r.mul(f,v),l=r.mul(p,g),d=r.add(l,d),l=r.sub(h,d),d=r.add(h,d),u=r.mul(l,d),h=r.add(m,m),h=r.add(h,m),g=r.mul(f,g),v=r.mul(p,v),h=r.add(h,g),g=r.sub(m,g),g=r.mul(f,g),v=r.add(v,g),m=r.mul(h,v),u=r.add(u,m),m=r.mul(y,v),l=r.mul(_,l),l=r.sub(l,m),m=r.mul(_,h),d=r.mul(y,d),d=r.add(d,m),new D(l,u,d)}subtract(e){return this.add(e.negate())}is0(){return this.equals(D.ZERO)}multiply(e){let{endo:n}=t;if(!i.isValidNot0(e))throw Error(`invalid scalar: out of range`);let r,a,o=e=>ne.cached(this,e,e=>jt(D,e));if(n){let{k1neg:t,k1:i,k2neg:s,k2:c}=C(e),{p:l,f:u}=o(i),{p:d,f}=o(c);a=u.add(f),r=E(n.beta,l,d,t,s)}else{let{p:t,f:n}=o(e);r=t,a=n}return jt(D,[r,a])[0]}multiplyUnsafe(e){let{endo:n}=t,r=this;if(!i.isValid(e))throw Error(`invalid scalar: out of range`);if(e===Qt||r.is0())return D.ZERO;if(e===$t)return r;if(ne.hasCache(this))return this.multiply(e);if(n){let{k1neg:t,k1:i,k2neg:a,k2:o}=C(e),{p1:s,p2:c}=Ht(D,r,i,o);return E(n.beta,s,c,t,a)}else return ne.unsafe(r,e)}multiplyAndAddUnsafe(e,t,n){let r=this.multiplyUnsafe(t).add(e.multiplyUnsafe(n));return r.is0()?void 0:r}toAffine(e){return w(this,e)}isTorsionFree(){let{isTorsionFree:e}=t;return o===$t?!0:e?e(D,this):ne.unsafe(this,s).is0()}clearCofactor(){let{clearCofactor:e}=t;return o===$t?this:e?e(D,this):this.multiplyUnsafe(o)}isSmallOrder(){return this.multiplyUnsafe(o).is0()}toBytes(e=!0){return O(e,`isCompressed`),this.assertValidity(),p(D,this,e)}toHex(e=!0){return h(this.toBytes(e))}toString(){return`<Point ${this.is0()?`ZERO`:this.toHex()}>`}get px(){return this.X}get py(){return this.X}get pz(){return this.Z}toRawBytes(e=!0){return this.toBytes(e)}_setWindowSize(e){this.precompute(e)}static normalizeZ(e){return jt(D,e)}static msm(e,t){return Ut(D,i,e,t)}static fromPrivateKey(e){return D.BASE.multiply(rn(i,e))}}D.BASE=new D(a.Gx,a.Gy,r.ONE),D.ZERO=new D(r.ZERO,r.ONE,r.ZERO),D.Fp=r,D.Fn=i;let te=i.BITS,ne=new Vt(D,t.endo?Math.ceil(te/2):te);return D.BASE.precompute(8),D}function on(e){return Uint8Array.of(e?2:3)}function sn(e,t){return{secretKey:t.BYTES,publicKey:1+e.BYTES,publicKeyUncompressed:1+2*e.BYTES,publicKeyHasPrefix:!0,signature:2*t.BYTES}}function cn(e,t={}){let{Fn:n}=e,r=t.randomBytes||w,i=Object.assign(sn(e.Fp,n),{seed:Et(n.ORDER)});function a(e){try{return!!rn(n,e)}catch{return!1}}function o(t,n){let{publicKey:r,publicKeyUncompressed:a}=i;try{let i=t.length;return n===!0&&i!==r||n===!1&&i!==a?!1:!!e.fromBytes(t)}catch{return!1}}function s(e=r(i.seed)){return Dt(ee(e,i.seed,`seed`),n.ORDER)}function c(t,r=!0){return e.BASE.multiply(rn(n,t)).toBytes(r)}function l(e){let t=s(e);return{secretKey:t,publicKey:c(t)}}function u(t){if(typeof t==`bigint`)return!1;if(t instanceof e)return!0;let{secretKey:r,publicKey:a,publicKeyUncompressed:o}=i;if(n.allowedLengths||r===a)return;let s=k(`key`,t).length;return s===a||s===o}function d(t,r,i=!0){if(u(t)===!0)throw Error(`first arg must be private key`);if(u(r)===!1)throw Error(`second arg must be public key`);let a=rn(n,t);return e.fromHex(r).multiply(a).toBytes(i)}let f={isValidSecretKey:a,isValidPublicKey:o,randomSecretKey:s,isValidPrivateKey:a,randomPrivateKey:s,normPrivateKeyToScalar:e=>rn(n,e),precompute(t=8,n=e.BASE){return n.precompute(t,!1)}};return Object.freeze({getPublicKey:c,getSharedSecret:d,keygen:l,Point:e,utils:f,lengths:i})}function ln(e,t,n={}){u(t),Se(n,{},{hmac:`function`,lowS:`boolean`,randomBytes:`function`,bits2int:`function`,bits2int_modN:`function`});let r=n.randomBytes||w,i=n.hmac||((e,...n)=>tt(t,e,S(...n))),{Fp:a,Fn:o}=e,{ORDER:c,BITS:l}=o,{keygen:d,getPublicKey:f,getSharedSecret:p,utils:m,lengths:g}=cn(e,n),_={prehash:!1,lowS:typeof n.lowS==`boolean`?n.lowS:!1,format:void 0,extraEntropy:!1},y=`compact`;function b(e){return e>c>>$t}function x(e,t){if(!o.isValidNot0(t))throw Error(`invalid signature ${e}: out of range 1..Point.Fn.ORDER`);return t}function C(e,t){Jt(t);let n=g.signature;return ee(e,t===`compact`?n:t===`recovered`?n+1:void 0,`${t} signature`)}class T{constructor(e,t,n){this.r=x(`r`,e),this.s=x(`s`,t),n!=null&&(this.recovery=n),Object.freeze(this)}static fromBytes(e,t=y){C(e,t);let n;if(t===`der`){let{r:t,s:n}=Zt.toSig(ee(e));return new T(t,n)}t===`recovered`&&(n=e[0],t=`compact`,e=e.subarray(1));let r=o.BYTES,i=e.subarray(0,r),a=e.subarray(r,r*2);return new T(o.fromBytes(i),o.fromBytes(a),n)}static fromHex(e,t){return this.fromBytes(v(e),t)}addRecoveryBit(e){return new T(this.r,this.s,e)}recoverPublicKey(t){let n=a.ORDER,{r,s:i,recovery:s}=this;if(s==null||![0,1,2,3].includes(s))throw Error(`recovery id invalid`);if(c*en<n&&s>1)throw Error(`recovery id is ambiguous for h>1 curve`);let l=s===2||s===3?r+c:r;if(!a.isValid(l))throw Error(`recovery id 2 or 3 invalid`);let u=a.toBytes(l),d=e.fromBytes(S(on((s&1)==0),u)),f=o.inv(l),p=D(k(`msgHash`,t)),m=o.create(-p*f),h=o.create(i*f),g=e.BASE.multiplyUnsafe(m).add(d.multiplyUnsafe(h));if(g.is0())throw Error(`point at infinify`);return g.assertValidity(),g}hasHighS(){return b(this.s)}toBytes(e=y){if(Jt(e),e===`der`)return v(Zt.hexFromSig(this));let t=o.toBytes(this.r),n=o.toBytes(this.s);if(e===`recovered`){if(this.recovery==null)throw Error(`recovery bit must be present`);return S(Uint8Array.of(this.recovery),t,n)}return S(t,n)}toHex(e){return h(this.toBytes(e))}assertValidity(){}static fromCompact(e){return T.fromBytes(k(`sig`,e),`compact`)}static fromDER(e){return T.fromBytes(k(`sig`,e),`der`)}normalizeS(){return this.hasHighS()?new T(this.r,o.neg(this.s),this.recovery):this}toDERRawBytes(){return this.toBytes(`der`)}toDERHex(){return h(this.toBytes(`der`))}toCompactRawBytes(){return this.toBytes(`compact`)}toCompactHex(){return h(this.toBytes(`compact`))}}let E=n.bits2int||function(e){if(e.length>8192)throw Error(`input is too large`);let t=re(e),n=e.length*8-l;return n>0?t>>BigInt(n):t},D=n.bits2int_modN||function(e){return o.create(E(e))},O=_e(l);function te(e){return pe(`num < 2^`+l,e,Qt,O),o.toBytes(e)}function ne(e,n){return ee(e,void 0,`message`),n?ee(t(e),void 0,`prehashed message`):e}function ie(t,n,i){if([`recovered`,`canonical`].some(e=>e in i))throw Error(`sign() legacy options not supported`);let{lowS:a,prehash:s,extraEntropy:c}=Yt(i,_);t=ne(t,s);let l=D(t),u=rn(o,n),d=[te(u),te(l)];if(c!=null&&c!==!1){let e=c===!0?r(g.secretKey):c;d.push(k(`extraEntropy`,e))}let f=S(...d),p=l;function m(t){let n=E(t);if(!o.isValidNot0(n))return;let r=o.inv(n),i=e.BASE.multiply(n).toAffine(),s=o.create(i.x);if(s===Qt)return;let c=o.create(r*o.create(p+s*u));if(c===Qt)return;let l=(i.x===s?0:2)|Number(i.y&$t),d=c;return a&&b(c)&&(d=o.neg(c),l^=1),new T(s,d,l)}return{seed:f,k2sig:m}}function ae(e,n,r={}){e=k(`message`,e);let{seed:a,k2sig:s}=ie(e,n,r);return ve(t.outputLen,o.BYTES,i)(a,s)}function oe(e){let t,n=typeof e==`string`||s(e),r=!n&&typeof e==`object`&&!!e&&typeof e.r==`bigint`&&typeof e.s==`bigint`;if(!n&&!r)throw Error(`invalid signature, expected Uint8Array, hex string or Signature instance`);if(r)t=new T(e.r,e.s);else if(n){try{t=T.fromBytes(k(`sig`,e),`der`)}catch(e){if(!(e instanceof Zt.Err))throw e}if(!t)try{t=T.fromBytes(k(`sig`,e),`compact`)}catch{return!1}}return t||!1}function se(t,n,r,i={}){let{lowS:a,prehash:s,format:c}=Yt(i,_);if(r=k(`publicKey`,r),n=ne(k(`message`,n),s),`strict`in i)throw Error(`options.strict was renamed to lowS`);let l=c===void 0?oe(t):T.fromBytes(k(`sig`,t),c);if(l===!1)return!1;try{let t=e.fromBytes(r);if(a&&l.hasHighS())return!1;let{r:i,s}=l,c=D(n),u=o.inv(s),d=o.create(c*u),f=o.create(i*u),p=e.BASE.multiplyUnsafe(d).add(t.multiplyUnsafe(f));return p.is0()?!1:o.create(p.x)===i}catch{return!1}}function ce(e,t,n={}){let{prehash:r}=Yt(n,_);return t=ne(t,r),T.fromBytes(e,`recovered`).recoverPublicKey(t).toBytes()}return Object.freeze({keygen:d,getPublicKey:f,getSharedSecret:p,utils:m,lengths:g,Point:e,sign:ae,verify:se,recoverPublicKey:ce,Signature:T,hash:t})}function un(e){let t={a:e.a,b:e.b,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},n=e.Fp,r=e.allowedPrivateKeyLengths?Array.from(new Set(e.allowedPrivateKeyLengths.map(e=>Math.ceil(e/2)))):void 0;return{CURVE:t,curveOpts:{Fp:n,Fn:wt(t.n,{BITS:e.nBitLength,allowedLengths:r,modFromBytes:e.wrapPrivateKey}),allowInfinityPoint:e.allowInfinityPoint,endo:e.endo,isTorsionFree:e.isTorsionFree,clearCofactor:e.clearCofactor,fromBytes:e.fromBytes,toBytes:e.toBytes}}}function dn(e){let{CURVE:t,curveOpts:n}=un(e),r={hmac:e.hmac,randomBytes:e.randomBytes,lowS:e.lowS,bits2int:e.bits2int,bits2int_modN:e.bits2int_modN};return{CURVE:t,curveOpts:n,hash:e.hash,ecdsaOpts:r}}function fn(e,t){let n=t.Point;return Object.assign({},t,{ProjectivePoint:n,CURVE:Object.assign({},e,Ct(n.Fn.ORDER,n.Fn.BITS))})}function pn(e){let{CURVE:t,curveOpts:n,hash:r,ecdsaOpts:i}=dn(e);return fn(e,ln(an(t,n),r,i))}function mn(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name===`Uint8Array`}function hn(e,...t){if(!mn(e))throw Error(`Uint8Array expected`);if(t.length>0&&!t.includes(e.length))throw Error(`Uint8Array expected of length `+t+`, got length=`+e.length)}function gn(e,t=!0){if(e.destroyed)throw Error(`Hash instance has been destroyed`);if(t&&e.finished)throw Error(`Hash#digest() has already been called`)}function _n(e,t){hn(e);let n=t.outputLen;if(e.length<n)throw Error(`digestInto() expects output buffer of length at least `+n)}function vn(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function yn(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function bn(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function xn(e){if(typeof e!=`string`)throw Error(`string expected`);return new Uint8Array(new TextEncoder().encode(e))}function Sn(e){if(typeof e==`string`)e=xn(e);else if(mn(e))e=wn(e);else throw Error(`Uint8Array expected, got `+typeof e);return e}function Cn(e,t,n,r){if(typeof e.setBigUint64==`function`)return e.setBigUint64(t,n,r);let i=BigInt(32),a=BigInt(4294967295),o=Number(n>>i&a),s=Number(n&a),c=r?4:0,l=r?0:4;e.setUint32(t+c,o,r),e.setUint32(t+l,s,r)}function wn(e){return Uint8Array.from(e)}var Tn=16,En=new Uint8Array(16),Dn=vn(En),On=225,kn=(e,t,n,r)=>{let i=r&1;return{s3:n<<31|r>>>1,s2:t<<31|n>>>1,s1:e<<31|t>>>1,s0:e>>>1^On<<24&-(i&1)}},An=e=>(e>>>0&255)<<24|(e>>>8&255)<<16|(e>>>16&255)<<8|e>>>24&255|0;function jn(e){e.reverse();let t=e[15]&1,n=0;for(let t=0;t<e.length;t++){let r=e[t];e[t]=r>>>1|n,n=(r&1)<<7}return e[0]^=-t&225,e}var Mn=e=>e>64*1024?8:e>1024?4:2,Nn=class{constructor(e,t){this.blockLen=Tn,this.outputLen=Tn,this.s0=0,this.s1=0,this.s2=0,this.s3=0,this.finished=!1,e=Sn(e),hn(e,16);let n=bn(e),r=n.getUint32(0,!1),i=n.getUint32(4,!1),a=n.getUint32(8,!1),o=n.getUint32(12,!1),s=[];for(let e=0;e<128;e++)s.push({s0:An(r),s1:An(i),s2:An(a),s3:An(o)}),{s0:r,s1:i,s2:a,s3:o}=kn(r,i,a,o);let c=Mn(t||1024);if(![1,2,4,8].includes(c))throw Error(`ghash: invalid window size, expected 2, 4 or 8`);this.W=c;let l=128/c,u=this.windowSize=2**c,d=[];for(let e=0;e<l;e++)for(let t=0;t<u;t++){let n=0,r=0,i=0,a=0;for(let o=0;o<c;o++){if(!(t>>>c-o-1&1))continue;let{s0:l,s1:u,s2:d,s3:f}=s[c*e+o];n^=l,r^=u,i^=d,a^=f}d.push({s0:n,s1:r,s2:i,s3:a})}this.t=d}_updateBlock(e,t,n,r){e^=this.s0,t^=this.s1,n^=this.s2,r^=this.s3;let{W:i,t:a,windowSize:o}=this,s=0,c=0,l=0,u=0,d=(1<<i)-1,f=0;for(let p of[e,t,n,r])for(let e=0;e<4;e++){let t=p>>>8*e&255;for(let e=8/i-1;e>=0;e--){let n=t>>>i*e&d,{s0:r,s1:p,s2:m,s3:h}=a[f*o+n];s^=r,c^=p,l^=m,u^=h,f+=1}}this.s0=s,this.s1=c,this.s2=l,this.s3=u}update(e){gn(this),e=Sn(e),hn(e);let t=vn(e),n=Math.floor(e.length/Tn),r=e.length%Tn;for(let e=0;e<n;e++)this._updateBlock(t[e*4+0],t[e*4+1],t[e*4+2],t[e*4+3]);return r&&(En.set(e.subarray(n*Tn)),this._updateBlock(Dn[0],Dn[1],Dn[2],Dn[3]),yn(Dn)),this}destroy(){let{t:e}=this;for(let t of e)t.s0=0,t.s1=0,t.s2=0,t.s3=0}digestInto(e){gn(this),_n(e,this),this.finished=!0;let{s0:t,s1:n,s2:r,s3:i}=this,a=vn(e);return a[0]=t,a[1]=n,a[2]=r,a[3]=i,e}digest(){let e=new Uint8Array(Tn);return this.digestInto(e),this.destroy(),e}},Pn=class extends Nn{constructor(e,t){e=Sn(e),hn(e);let n=jn(wn(e));super(n,t),yn(n)}update(e){e=Sn(e),gn(this);let t=vn(e),n=e.length%Tn,r=Math.floor(e.length/Tn);for(let e=0;e<r;e++)this._updateBlock(An(t[e*4+3]),An(t[e*4+2]),An(t[e*4+1]),An(t[e*4+0]));return n&&(En.set(e.subarray(r*Tn)),this._updateBlock(An(Dn[3]),An(Dn[2]),An(Dn[1]),An(Dn[0])),yn(Dn)),this}digestInto(e){gn(this),_n(e,this),this.finished=!0;let{s0:t,s1:n,s2:r,s3:i}=this,a=vn(e);return a[0]=t,a[1]=n,a[2]=r,a[3]=i,e.reverse()}};function Fn(e){let t=(t,n)=>e(n,t.length).update(Sn(t)).digest(),n=e(new Uint8Array(16),0);return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=(t,n)=>e(t,n),t}const In=Fn((e,t)=>new Nn(e,t)),Ln=Fn((e,t)=>new Pn(e,t));var Rn=Object.defineProperty,zn=(e,t)=>{for(var n in t)Rn(e,n,{get:t[n],enumerable:!0})},Bn={};zn(Bn,{EmptyArray:()=>qr,arrayToHex:()=>Rr,arrayToUtf8:()=>zr,calculateSharedKey:()=>Gr,comparePublicKeyHex:()=>Vr,compressPublicKeyHex:()=>Ir,doDecrypt:()=>Xr,doEncrypt:()=>Jr,doSignature:()=>Zr,doVerifySignature:()=>Qr,generateKeyPairHex:()=>Fr,getHash:()=>ei,getPoint:()=>ri,getPublicKeyFromPrivateKey:()=>ni,getZ:()=>$r,hexToArray:()=>L,initRNGPool:()=>ar,leftPad:()=>I,precomputePublicKey:()=>ti,utf8ToHex:()=>Lr,verifyPublicKey:()=>Br});var Vn=BigInt(0),Hn=BigInt(1),Un=BigInt(2);function Wn(e){let t=e.toString(16);if(t[0]!==`-`)t.length%2==1?t=`0`+t:t.match(/^[0-7]/)||(t=`00`+t);else{t=t.substring(1);let n=t.length;n%2==1?n+=1:t.match(/^[0-7]/)||(n+=2);let r=``;for(let e=0;e<n;e++)r+=`f`;t=((M(r)^e)+Hn).toString(16).replace(/^-/,``)}return t}var Gn=class{constructor(e=null,t=`00`,n=`00`,r=``){this.tlv=e,this.t=t,this.l=n,this.v=r}getEncodedHex(){return this.tlv||=(this.v=this.getValue(),this.l=this.getLength(),this.t+this.l+this.v),this.tlv}getLength(){let e=this.v.length/2,t=e.toString(16);return t.length%2==1&&(t=`0`+t),e<128?t:(128+t.length/2).toString(16)+t}getValue(){return``}},Kn=class extends Gn{constructor(e){super(),this.t=`02`,e&&(this.v=Wn(e))}getValue(){return this.v}},qn=class extends Gn{constructor(e){super(),this.s=e,this.t=`04`,e&&(this.v=e.toLowerCase())}hV=``;getValue(){return this.v}},Jn=class extends Gn{constructor(e){super(),this.asn1Array=e}t=`30`;getValue(){return this.v=this.asn1Array.map(e=>e.getEncodedHex()).join(``),this.v}};function Yn(e,t){if(+e[t+2]<8)return 1;let n=e.slice(t+2,t+6).slice(0,2);return(parseInt(n,16)-128)*2}function Xn(e,t){let n=Yn(e,t),r=e.substring(t+2,t+2+n*2);return r?+(+r[0]<8?M(r):M(r.substring(2))).toString():-1}function Zn(e,t){return t+(Yn(e,t)+1)*2}function Qn(e,t){return new Jn([new Kn(e),new Kn(t)]).getEncodedHex()}function $n(e,t,n,r){return new Jn([new Kn(e),new Kn(t),new qn(n),new qn(r)]).getEncodedHex()}function er(e){let t=Zn(e,0),n=Zn(e,t),r=Xn(e,t),i=e.substring(n,n+r*2),a=n+i.length,o=Zn(e,a),s=Xn(e,a),c=e.substring(o,o+s*2);return{r:M(i),s:M(c)}}function tr(e){function t(e,t){let n=Zn(e,t),r=Xn(e,t),i=e.substring(n,n+r*2);return{value:i,nextStart:n+i.length}}let{value:n,nextStart:r}=t(e,Zn(e,0)),{value:i,nextStart:a}=t(e,r),{value:o,nextStart:s}=t(e,a),{value:c}=t(e,s);return{x:M(n),y:M(i),hash:o,cipher:c}}var nr=16384,rr=new Uint8Array,ir;async function ar(){if(`crypto`in globalThis){ir=globalThis.crypto;return}if(!(rr.length>nr/2))if(`wx`in globalThis&&`getRandomValues`in globalThis.wx)rr=await new Promise(e=>{wx.getRandomValues({length:nr,success(t){e(new Uint8Array(t.randomValues))}})});else try{ir=globalThis.crypto?globalThis.crypto:(await Promise.resolve().then(()=>e.i(1)(require(`./__vite-browser-external-aYiy3g-2.cjs`)))).webcrypto;let t=new Uint8Array(nr);ir.getRandomValues(t),rr=t}catch{throw Error(`no available csprng, abort.`)}}ar();function or(e){if(rr.length>e){let t=rr.slice(0,e);return rr=rr.slice(e),ar(),t}else throw Error(`random number pool is not ready or insufficient, prevent getting too long random values or too often.`)}function sr(e=0){let t=new Uint8Array(e);return ir?ir.getRandomValues(t):or(e)}var cr=e=>e instanceof Uint8Array,lr=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);if(new Uint8Array(new Uint32Array([287454020]).buffer)[0]!==68)throw Error(`Non little-endian hardware is not supported`);var ur=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,`0`));function dr(e){if(!cr(e))throw Error(`Uint8Array expected`);let t=``;for(let n=0;n<e.length;n++)t+=ur[e[n]];return t}function fr(e){if(typeof e!=`string`)throw Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function pr(e){if(typeof e==`string`&&(e=fr(e)),!cr(e))throw Error(`expected Uint8Array, got ${typeof e}`);return e}var mr=class{clone(){return this._cloneInto()}};function hr(e){let t=t=>e().update(pr(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}var gr=(e,t,n)=>e&t|e&n|t&n,_r=(e,t,n)=>e^t^n,vr=(e,t,n)=>e&t|~e&n;function yr(e,t,n,r){if(typeof e.setBigUint64==`function`)return e.setBigUint64(t,n,r);let i=BigInt(32),a=BigInt(4294967295),o=Number(n>>i&a),s=Number(n&a),c=r?4:0,l=r?0:4;e.setUint32(t+c,o,r),e.setUint32(t+l,s,r)}function br(e,t){let n=t&31;return e<<n|e>>>32-n}function xr(e){return e^br(e,9)^br(e,17)}function Sr(e){return e^br(e,15)^br(e,23)}var Cr=class extends mr{constructor(e,t,n,r){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=lr(this.buffer)}buffer;view;finished=!1;length=0;pos=0;destroyed=!1;update(e){let{view:t,buffer:n,blockLen:r}=this;e=pr(e);let i=e.length;for(let a=0;a<i;){let o=Math.min(r-this.pos,i-a);if(o===r){let t=lr(e);for(;r<=i-a;a+=r)this.process(t,a);continue}n.set(e.subarray(a,a+o),this.pos),this.pos+=o,a+=o,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){this.finished=!0;let{buffer:t,view:n,blockLen:r,isLE:i}=this,{pos:a}=this;t[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>r-a&&(this.process(n,0),a=0);for(let e=a;e<r;e++)t[e]=0;yr(n,r-8,BigInt(this.length*8),i),this.process(n,0);let o=lr(e),s=this.outputLen;if(s%4)throw Error(`_sha2: outputLen should be aligned to 32bit`);let c=s/4,l=this.get();if(c>l.length)throw Error(`_sha2: outputLen bigger than state`);for(let e=0;e<c;e++)o.setUint32(4*e,l[e],i)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||=new this.constructor,e.set(...this.get());let{blockLen:t,buffer:n,length:r,finished:i,destroyed:a,pos:o}=this;return e.length=r,e.pos=o,e.finished=i,e.destroyed=a,r%t&&e.buffer.set(n),e}},wr=new Uint32Array([1937774191,1226093241,388252375,3666478592,2842636476,372324522,3817729613,2969243214]),Tr=new Uint32Array(68),Er=new Uint32Array(64),Dr=2043430169,Or=2055708042,kr=class extends Cr{A=wr[0]|0;B=wr[1]|0;C=wr[2]|0;D=wr[3]|0;E=wr[4]|0;F=wr[5]|0;G=wr[6]|0;H=wr[7]|0;constructor(){super(64,32,8,!1)}get(){let{A:e,B:t,C:n,D:r,E:i,F:a,G:o,H:s}=this;return[e,t,n,r,i,a,o,s]}set(e,t,n,r,i,a,o,s){this.A=e|0,this.B=t|0,this.C=n|0,this.D=r|0,this.E=i|0,this.F=a|0,this.G=o|0,this.H=s|0}process(e,t){for(let n=0;n<16;n++,t+=4)Tr[n]=e.getUint32(t,!1);for(let e=16;e<68;e++)Tr[e]=Sr(Tr[e-16]^Tr[e-9]^br(Tr[e-3],15))^br(Tr[e-13],7)^Tr[e-6];for(let e=0;e<64;e++)Er[e]=Tr[e]^Tr[e+4];let{A:n,B:r,C:i,D:a,E:o,F:s,G:c,H:l}=this;for(let e=0;e<64;e++){let t=e>=0&&e<=15,u=t?Dr:Or,d=br(br(n,12)+o+br(u,e),7),f=d^br(n,12),p=(t?_r(n,r,i):gr(n,r,i))+a+f+Er[e]|0,m=(t?_r(o,s,c):vr(o,s,c))+l+d+Tr[e]|0;a=i,i=br(r,9),r=n,n=p,l=c,c=br(s,19),s=o,o=xr(m)}n=n^this.A|0,r=r^this.B|0,i=i^this.C|0,a=a^this.D|0,o=o^this.E|0,s=s^this.F|0,c=c^this.G|0,l=l^this.H|0,this.set(n,r,i,a,o,s,c,l)}roundClean(){Tr.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}},Ar=hr(()=>new kr),jr=class extends mr{oHash;iHash;blockLen;outputLen;finished=!1;destroyed=!1;constructor(e,t){super();let n=pr(t);if(this.iHash=e.create(),typeof this.iHash.update!=`function`)throw Error(`Expected instance of class which extends utils.Hash`);this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let r=this.blockLen,i=new Uint8Array(r);i.set(n.length>r?e.create().update(n).digest():n);for(let e=0;e<i.length;e++)i[e]^=54;this.iHash.update(i),this.oHash=e.create();for(let e=0;e<i.length;e++)i[e]^=106;this.oHash.update(i),i.fill(0)}update(e){return this.iHash.update(e),this}digestInto(e){this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||=Object.create(Object.getPrototypeOf(this),{});let{oHash:t,iHash:n,finished:r,destroyed:i,blockLen:a,outputLen:o}=this;return e=e,e.finished=r,e.destroyed=i,e.blockLen=a,e.outputLen=o,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}},Mr=(e,t,n)=>new jr(e,t).update(n).digest();Mr.create=(e,t)=>new jr(e,t);var Nr=wt(BigInt(`115792089210356248756420345214020892766250353991924191454421193933289684991999`)),F=pn({a:BigInt(`115792089210356248756420345214020892766250353991924191454421193933289684991996`),b:BigInt(`18505919022281880113072981827955639221458448578012075254857346196103069175443`),Fp:Nr,h:Hn,n:BigInt(`115792089210356248756420345214020892766061623724957744567843809356293439045923`),Gx:BigInt(`22963146547237050559479531362550074578802567295341616970375194840604139615431`),Gy:BigInt(`85132369209828568825618990617112496413088388631904505083283536607588877201568`),hash:Ar,hmac:(e,...t)=>Mr(Ar,e,A(...t)),randomBytes:sr}),Pr=wt(BigInt(F.CURVE.n));function Fr(e){let t=e?Ie(ut(BigInt(e),Hn)+Hn,32):F.utils.randomPrivateKey(),n=F.getPublicKey(t,!1);return{privateKey:I(De(t),64),publicKey:I(De(n),64)}}function Ir(e){if(e.length!==130)throw Error(`Invalid public key to compress`);let t=(e.length-2)/2,n=e.substring(2,2+t),r=M(e.substring(t+2,t+t+2)),i=`03`;return ut(r,Un)===Vn&&(i=`02`),i+n}function Lr(e){return De(Me(e))}function I(e,t){return e.length>=t?e:Array(t-e.length+1).join(`0`)+e}function Rr(e){return e.map(e=>{let t=e.toString(16);return t.length===1?`0`+t:t}).join(``)}function zr(e){let t=[];for(let n=0,r=e.length;n<r;n++)e[n]>=240&&e[n]<=247?(t.push(String.fromCodePoint(((e[n]&7)<<18)+((e[n+1]&63)<<12)+((e[n+2]&63)<<6)+(e[n+3]&63))),n+=3):e[n]>=224&&e[n]<=239?(t.push(String.fromCodePoint(((e[n]&15)<<12)+((e[n+1]&63)<<6)+(e[n+2]&63))),n+=2):e[n]>=192&&e[n]<=223?(t.push(String.fromCodePoint(((e[n]&31)<<6)+(e[n+1]&63))),n++):t.push(String.fromCodePoint(e[n]));return t.join(``)}function L(e){let t=e.length;t%2!=0&&(e=I(e,t+1)),t=e.length;let n=t/2,r=new Uint8Array(n);for(let t=0;t<n;t++)r[t]=parseInt(e.substring(t*2,t*2+2),16);return r}function Br(e){let t=F.ProjectivePoint.fromHex(e);if(!t)return!1;try{return t.assertValidity(),!0}catch{return!1}}function Vr(e,t){let n=F.ProjectivePoint.fromHex(e);if(!n)return!1;let r=F.ProjectivePoint.fromHex(t);return r?n.equals(r):!1}var Hr=M(`80000000000000000000000000000000`),Ur=M(`7fffffffffffffffffffffffffffffff`);function Wr(e,t){let n=new Uint8Array(t),r=1,i=0,a=qr,o=new Uint8Array(4),s=()=>{o[0]=r>>24&255,o[1]=r>>16&255,o[2]=r>>8&255,o[3]=r&255,a=Ar(A(e,o)),r++,i=0};s();for(let e=0,t=n.length;e<t;e++)i===a.length&&s(),n[e]=a[i++]&255;return n}function Gr(e,t,n,r,i,a=!1,o=`1234567812345678`,s=`1234567812345678`){let c=F.ProjectivePoint.fromHex(t.publicKey),l=F.ProjectivePoint.fromHex(r),u=F.ProjectivePoint.fromHex(n),d=$r(e.publicKey,o),f=$r(n,s);a&&([d,f]=[f,d]);let p=M(t.privateKey),m=M(e.privateKey),h=Hr+(c.x&Ur),g=Pr.add(m,Pr.mulN(h,p)),_=l.x,v=Pr.add(Hr,_&Ur),y=l.multiply(v).add(u).multiply(g);return Wr(A(L(I(j(y.x),64)),L(I(j(y.y),64)),d,f),i)}var Kr=0,qr=new Uint8Array;function Jr(e,t,n=1,r){let i=typeof e==`string`?L(Lr(e)):Uint8Array.from(e),a=typeof t==`string`?F.ProjectivePoint.fromHex(t):t,o=Fr(),s=M(o.privateKey),c=o.publicKey;c.length>128&&(c=c.substring(c.length-128));let l=a.multiply(s),u=L(I(j(l.x),64)),d=L(I(j(l.y),64)),f=dr(Ar(A(u,i,d)));Yr(u,d,i);let p=dr(i);if(r?.asn1){let e=F.ProjectivePoint.fromHex(o.publicKey);return n===Kr?$n(e.x,e.y,p,f):$n(e.x,e.y,f,p)}return n===Kr?c+p+f:c+f+p}function Yr(e,t,n){let r=1,i=0,a=qr,o=new Uint8Array(4),s=()=>{o[0]=r>>24&255,o[1]=r>>16&255,o[2]=r>>8&255,o[3]=r&255,a=Ar(A(e,t,o)),r++,i=0};s();for(let e=0,t=n.length;e<t;e++)i===a.length&&s(),n[e]^=a[i++]&255}function Xr(e,t,n=1,{output:r=`string`,asn1:i=!1}={}){let a=M(t),o,s,c;if(i){let{x:t,y:r,cipher:i,hash:a}=tr(e);o=F.ProjectivePoint.fromAffine({x:t,y:r}),c=a,s=i,n===Kr&&([s,c]=[c,s])}else o=F.ProjectivePoint.fromHex(`04`+e.substring(0,128)),c=e.substring(128,192),s=e.substring(192),n===Kr&&(c=e.substring(e.length-64),s=e.substring(128,e.length-64));let l=L(s),u=o.multiply(a),d=L(I(j(u.x),64)),f=L(I(j(u.y),64));return Yr(d,f,l),Rr(Array.from(Ar(A(d,l,f))))===c.toLowerCase()?r===`array`?l:zr(l):r===`array`?[]:``}function Zr(e,t,n={}){let{pointPool:r,der:i,hash:a,publicKey:o,userId:s}=n,c=typeof e==`string`?Lr(e):Rr(Array.from(e));a&&(o||=ni(t),c=ei(c,o,s));let l=M(t),u=M(c),d=null,f=null,p=null;do{do{let e;e=r&&r.length?r.pop():ri(),d=e.k,f=Pr.add(u,e.x1)}while(f===Vn||f+d===F.CURVE.n);p=Pr.mul(Pr.inv(Pr.addN(l,Hn)),Pr.subN(d,Pr.mulN(f,l)))}while(p===Vn);return i?Qn(f,p):I(j(f),64)+I(j(p),64)}function Qr(e,t,n,r={}){let i,{hash:a,der:o,userId:s}=r,c=typeof n==`string`?n:n.toHex(!1);i=a?ei(typeof e==`string`?Lr(e):e,c,s):typeof e==`string`?Lr(e):Rr(Array.from(e));let l,u;if(o){let e=er(t);l=e.r,u=e.s}else l=M(t.substring(0,64)),u=M(t.substring(64));let d=typeof n==`string`?F.ProjectivePoint.fromHex(n):n,f=M(i),p=Pr.add(l,u);if(p===Vn)return!1;let m=F.ProjectivePoint.BASE.multiply(u).add(d.multiply(p)),h=Pr.add(f,m.x);return l===h}function $r(e,t=`1234567812345678`){t=Lr(t);let n=I(j(F.CURVE.a),64),r=I(j(F.CURVE.b),64),i=I(j(F.ProjectivePoint.BASE.x),64),a=I(j(F.ProjectivePoint.BASE.y),64),o,s;if(e.length===128)o=e.substring(0,64),s=e.substring(64,128);else{let t=F.ProjectivePoint.fromHex(e);o=I(j(t.x),64),s=I(j(t.y),64)}let c=L(t+n+r+i+a+o+s),l=t.length*4;return Ar(A(new Uint8Array([l>>8&255,l&255]),c))}function ei(e,t,n=`1234567812345678`){return dr(Ar(A($r(t,n),typeof e==`string`?L(e):e)))}function ti(e,t){let n=F.ProjectivePoint.fromHex(e);return F.utils.precompute(t,n)}function ni(e){return I(De(F.getPublicKey(e,!1)),64)}function ri(){let e=Fr(),t=F.ProjectivePoint.fromHex(e.publicKey),n=M(e.privateKey);return{...e,k:n,x1:t.x}}function ii(e){let t=[];for(let n=0,r=e.length;n<r;n++){let r=e.codePointAt(n);if(r<=127)t.push(r);else if(r<=2047)t.push(192|r>>>6),t.push(128|r&63);else if(r<=55295||r>=57344&&r<=65535)t.push(224|r>>>12),t.push(128|r>>>6&63),t.push(128|r&63);else if(r>=65536&&r<=1114111)n++,t.push(240|r>>>18&28),t.push(128|r>>>12&63),t.push(128|r>>>6&63),t.push(128|r&63);else throw t.push(r),Error(`input is not supported`)}return new Uint8Array(t)}function ai(e,t){if(e=typeof e==`string`?ii(e):e,t){if((t.mode||`hmac`)!==`hmac`)throw Error(`invalid mode`);let n=t.key;if(!n)throw Error(`invalid key`);return n=typeof n==`string`?L(n):n,dr(Mr(Ar,n,e))}return dr(Ar(e))}var oi={};zn(oi,{decrypt:()=>yi,encrypt:()=>vi,sm4:()=>_i});var R=0,si=32,ci=16,li=Uint8Array.from([214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72]),ui=new Uint32Array([462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257]);function di(e){return(li[e>>>24&255]&255)<<24|(li[e>>>16&255]&255)<<16|(li[e>>>8&255]&255)<<8|li[e&255]&255}new Uint32Array(4),new Uint32Array(4);function fi(e,t,n){let r=0,i=0,a=0,o=0,s=0,c=0,l=0,u=0;s=e[0]&255,c=e[1]&255,l=e[2]&255,u=e[3]&255,r=s<<24|c<<16|l<<8|u,s=e[4]&255,c=e[5]&255,l=e[6]&255,u=e[7]&255,i=s<<24|c<<16|l<<8|u,s=e[8]&255,c=e[9]&255,l=e[10]&255,u=e[11]&255,a=s<<24|c<<16|l<<8|u,s=e[12]&255,c=e[13]&255,l=e[14]&255,u=e[15]&255,o=s<<24|c<<16|l<<8|u;for(let e=0;e<32;e+=4)s=i^a^o^n[e],s=di(s),r^=s^(s<<2|s>>>30)^(s<<10|s>>>22)^(s<<18|s>>>14)^(s<<24|s>>>8),c=a^o^r^n[e+1],c=di(c),i^=c^(c<<2|c>>>30)^(c<<10|c>>>22)^(c<<18|c>>>14)^(c<<24|c>>>8),l=o^r^i^n[e+2],l=di(l),a^=l^(l<<2|l>>>30)^(l<<10|l>>>22)^(l<<18|l>>>14)^(l<<24|l>>>8),u=r^i^a^n[e+3],u=di(u),o^=u^(u<<2|u>>>30)^(u<<10|u>>>22)^(u<<18|u>>>14)^(u<<24|u>>>8);t[0]=o>>>24&255,t[1]=o>>>16&255,t[2]=o>>>8&255,t[3]=o&255,t[4]=a>>>24&255,t[5]=a>>>16&255,t[6]=a>>>8&255,t[7]=a&255,t[8]=i>>>24&255,t[9]=i>>>16&255,t[10]=i>>>8&255,t[11]=i&255,t[12]=r>>>24&255,t[13]=r>>>16&255,t[14]=r>>>8&255,t[15]=r&255}function pi(e,t,n){let r=0,i=0,a=0,o=0,s=0;r=(e[0]&255)<<24|(e[1]&255)<<16|(e[2]&255)<<8|e[3]&255,i=(e[4]&255)<<24|(e[5]&255)<<16|(e[6]&255)<<8|e[7]&255,a=(e[8]&255)<<24|(e[9]&255)<<16|(e[10]&255)<<8|e[11]&255,o=(e[12]&255)<<24|(e[13]&255)<<16|(e[14]&255)<<8|e[15]&255,r^=2746333894,i^=1453994832,a^=1736282519,o^=2993693404;for(let e=0;e<32;e+=4)s=i^a^o^ui[e+0],s=di(s),r^=s^(s<<13|s>>>19)^(s<<23|s>>>9),t[e+0]=r,s=a^o^r^ui[e+1],s=di(s),i^=s^(s<<13|s>>>19)^(s<<23|s>>>9),t[e+1]=i,s=o^r^i^ui[e+2],s=di(s),a^=s^(s<<13|s>>>19)^(s<<23|s>>>9),t[e+2]=a,s=r^i^a^ui[e+3],s=di(s),o^=s^(s<<13|s>>>19)^(s<<23|s>>>9),t[e+3]=o;if(n===R)for(let e=0;e<16;e++)[t[e],t[31-e]]=[t[31-e],t[e]]}function mi(e){for(let t=e.length-1;t>=0&&(e[t]++,e[t]===0);t--);}function hi(e,t,n,r,i,a){function o(){let e=new Uint32Array(si);pi(t,e,1);let r=new Uint8Array(16).fill(0),i=new Uint8Array(16);fi(r,i,e);let a;if(n.length===12)a=new Uint8Array(16),a.set(n,0),a[15]=1;else{let e=In.create(i);e.update(n);let t=new Uint8Array(16);Cn(bn(t),8,BigInt(n.length*8),!1),e.update(t),a=e.digest()}let o=new Uint8Array(a);mi(o);let s=new Uint8Array(16);return fi(a,s,e),{roundKey:e,h:i,j0:a,counter:o,tagMask:s}}function s(e,t){let n=r.length,i=t.length,a=In.create(e);n>0&&a.update(r),a.update(t);let o=new Uint8Array(16),s=bn(o);return Cn(s,0,BigInt(n*8),!1),Cn(s,8,BigInt(i*8),!1),a.update(o),a.digest()}let{roundKey:c,h:l,j0:u,counter:d,tagMask:f}=o();if(i===R&&a){let t=s(l,e);for(let e=0;e<16;e++)t[e]^=f[e];let n=0;for(let e=0;e<16;e++)n|=t[e]^a[e];if(n!==0)throw Error(`authentication tag mismatch`)}let p=new Uint8Array(e.length),m=0,h=e.length;for(;h>=ci;){let t=new Uint8Array(ci);fi(d,t,c);for(let n=0;n<ci&&n<h;n++)p[m+n]=e[m+n]^t[n];mi(d),m+=ci,h-=ci}if(h>0){let t=new Uint8Array(ci);fi(d,t,c);for(let n=0;n<h;n++)p[m+n]=e[m+n]^t[n]}if(i!==R){let e=s(l,p);for(let t=0;t<16;t++)e[t]^=f[t];return{output:p,tag:e}}return{output:p}}var gi=new Uint8Array(16);function _i(e,t,n,r={}){let{padding:i=`pkcs#7`,mode:a,iv:o=new Uint8Array(16),output:s,associatedData:c,outputTag:l,tag:u}=r;if(a===`gcm`){let r=typeof t==`string`?L(t):Uint8Array.from(t),i=typeof o==`string`?L(o):Uint8Array.from(o),a=c?typeof c==`string`?L(c):Uint8Array.from(c):new Uint8Array,d;d=typeof e==`string`?n===R?L(e):ii(e):Uint8Array.from(e);let f=u?typeof u==`string`?L(u):Uint8Array.from(u):void 0,p=hi(d,r,i,a,n,f);return s===`array`?l&&n!==R?p:p.output:l&&n!==R||n!==R?{output:dr(p.output),tag:p.tag?dr(p.tag):void 0}:zr(p.output)}if(a===`cbc`&&(typeof o==`string`&&(o=L(o)),o.length!==128/8))throw Error(`iv is invalid`);if(typeof t==`string`&&(t=L(t)),t.length!==128/8)throw Error(`key is invalid`);if(e=typeof e==`string`?n===R?L(e):ii(e):Uint8Array.from(e),(i===`pkcs#5`||i===`pkcs#7`)&&n!==R){let t=ci-e.length%ci,n=new Uint8Array(e.length+t);n.set(e,0);for(let r=0;r<t;r++)n[e.length+r]=t;e=n}let d=new Uint32Array(si);pi(t,d,n);let f=new Uint8Array(e.length),p=o,m=e.length,h=0;for(;m>=ci;){let t=e.subarray(h,h+16);if(a===`cbc`)for(let e=0;e<ci;e++)n!==R&&(t[e]^=p[e]);fi(t,gi,d);for(let e=0;e<ci;e++)a===`cbc`&&n===R&&(gi[e]^=p[e]),f[h+e]=gi[e];a===`cbc`&&(p=n===R?t:gi),m-=ci,h+=ci}if((i===`pkcs#5`||i===`pkcs#7`)&&n===R){let e=f.length,t=f[e-1];for(let n=1;n<=t;n++)if(f[e-n]!==t)throw Error(`padding is invalid`);f=f.slice(0,e-t)}return s===`array`?f:n===R?zr(f):dr(f)}function vi(e,t,n={}){return _i(e,t,1,n)}function yi(e,t,n={}){return _i(e,t,0,n)}function bi(){return Bn}function xi(e,t){return ai(e,t)}function Si(e,t,n){return oi.encrypt(e,t,n)}function Ci(e,t,n){return oi.encrypt(e,t,n)}function wi(e,t){return e&&/^\d+$/.test(e)&&String(e).length<=10&&(e=parseInt(`${e}000`)),t?(0,r.default)(e,t):(0,r.default)(e)}function Ti(e,t){return e?(r.default.isDayjs(e)||(e=wi(e)),e.format(t||`YYYY-MM-DD HH:mm`)):``}function Ei(e){return e?(r.default.isDayjs(e)||(e=wi(e)),e.unix()):``}const Di={STATE_CODE_SUCCESS:`SUCCESS`,STATE_CODE_FAIL:`FAIL`,STATE_CODE_NOT_FOUND:`NOT_FOUND`,STATE_CODE_INFO_NOT_COMPLETE:`INCOMPLETE`,STATE_CODE_NOT_ALLOWED:`NOT_ALLOWED`};function Oi(e){Object.keys(e).forEach(t=>{Di[t]=e[t]})}function ki(e){return e||={},e.loading=!0,{get(t,n){return new Promise((r,i)=>{a.default.get(t,n).then(e=>{r(e)}).catch(e=>{i(e)}).finally(()=>{e.loading=!1})})},post(t,n,r){return new Promise((i,o)=>{a.default.post(t,n,r).then(e=>{i(e)}).catch(e=>{o(e)}).finally(()=>{e.loading=!1})})}}}async function Ai(e,t,n){if(e.finishedText=e.finishedText||`加载完毕`,e.loading=!0,!e.uri)return console.error(`URI is required in pagination`),e;let r={};try{r=await a.default.get(e.uri,{params:{...e.params||{},page:t||!e.page?1:e.page+1}})}catch{return e.loading=!1,e.finished=!1,e.error=!0,e}if(r.status!==Di.STATE_CODE_SUCCESS)return e.loading=!1,e.error=!0,e.errorText=r.result,e;let i;i=n?n(r):r.result;let o=i.data;!t&&e.items&&(o=e.items.concat(o));let s=i.current_page||i.current||i.page||1,c=i.last_page||i.lastPage||i.pages||0,l=i.total_size||i.totalSize||i.total||0;return e.loading=!1,e.error=!1,e.page=s,e.items=o,e.finished=c===0||c===s,e.empty=l===0,e}var{STATE_CODE_FAIL:ji,STATE_CODE_INFO_NOT_COMPLETE:Mi,STATE_CODE_NOT_FOUND:Ni,STATE_CODE_NOT_ALLOWED:Pi,STATE_CODE_SUCCESS:Fi}=Di;function Ii(e){let{url:t,csrfToken:n}=e,{method:r,data:i}=e;r||=`post`,i||={};let a=document.createElement(`form`);if(a.action=t,a.method=r,a.target=`_blank`,a.style.display=`none`,Object.keys(i).forEach(e=>{let t=document.createElement(`input`);t.type=`hidden`,t.name=e,t.value=i[e],a.appendChild(t)}),!n){let e=document.createElement(`input`);e.type=`hidden`,e.name=`_token`,e.value=document.querySelector(`meta[name="csrf-token"]`)?.getAttribute(`content`),a.appendChild(e)}return document.body.appendChild(a),a}function Li(e,t){let{status:r}=e,a=e.result,o={};o.default=`请求失败, 请检查数据并重试`,o[ji]=`系统错误,请稍候再试`,o[Ni]=`请求的内容不存在`,o[Mi]=`信息不完整`,o[Pi]=`没有权限`;let s={[Fi]:`success`},c=t[r]||t[s[r]]||o[r]||o.def;(0,i.isString)(c)?r===Fi?n.message.success(c):n.message.error(a||c):(0,i.isFunction)(c)&&c()}function Ri(e,t){Li(e,{success:t})}function zi(e){e&&e.errorFields?e.errorFields.forEach(e=>{n.message.error(e.errors.join(` `))}):e&&e.response||n.message.error(`请检查填写项`)}const Bi={commonLabelCol:{span:8,xxl:6},commonWrapperCol:{span:12,xxl:14},commonWrapperOffset:{xs:{offset:8,span:12},xxl:{offset:6,span:14}},commonLabelFullCol:{span:8,xxl:6},commonWrapperFullCol:{span:16,xxl:18},commonWrapperFullOffset:{xs:{offset:8,span:16},xxl:{offset:6,span:18}},commonLabelPartCol:{span:4,xxl:3},commonWrapperPartCol:{span:20,xxl:21},commonWrapperPartOffset:{xs:{offset:4,span:20},xxl:{offset:3,span:21}}};function Vi(e,t){let n=(0,i.cloneDeep)(e);t||={};let a=e=>{for(let n in e){let o;if(r.default.isDayjs(e[n])?o=e[n]:Object.prototype.toString.call(e[n])===`[object Date]`&&(o=(0,r.default)(e[n])),o&&t.date){(0,i.isString)(t.date)?e[n]=o.format(t.date):(0,i.isFunction)(t.date)?e[n]=t.date(o):e[n]=e[n].unix();continue}if((0,i.isBoolean)(e[n])&&t.boolean){t.boolean===!0?e[n]=e[n]?1:0:Array.isArray(t.boolean)&&(e[n]=e[n]?t.boolean?.[0]||1:t.boolean?.[1]||0);continue}if(t.attachment){let r=t.attachment;if((0,i.isObject)(e[n])&&e[n]._type===`file`&&(0,i.isString)(r)&&!(0,i.isUndefined)(e[n][r])){e[n]=e[n][r];continue}else if((0,i.isObject)(e[n])&&e[n]._type===`file`&&(0,i.isFunction)(r)){e[n]=r(e[n]);continue}}(0,i.isArray)(e[n])&&(e[n]=a(e[n]))}return e};return a(n)}function Hi(e,t){typeof console<`u`&&(console.warn(`[intlify] `+e),t&&console.warn(t.stack))}var Ui={};function Wi(e){Ui[e]||(Ui[e]=!0,Hi(e))}var Gi=typeof window<`u`,Ki,qi;if(process.env.NODE_ENV!==`production`){let e=Gi&&window.performance;e&&e.mark&&e.measure&&e.clearMarks&&e.clearMeasures&&(Ki=t=>{e.mark(t)},qi=(t,n,r)=>{e.measure(t,n,r),e.clearMarks(n),e.clearMarks(r)})}var Ji=/\{([0-9a-zA-Z]+)\}/g;function Yi(e,...t){return t.length===1&&K(t[0])&&(t=t[0]),(!t||!t.hasOwnProperty)&&(t={}),e.replace(Ji,(e,n)=>t.hasOwnProperty(n)?t[n]:``)}var Xi=(e,t=!1)=>t?Symbol.for(e):Symbol(e),Zi=(e,t,n)=>Qi({l:e,k:t,s:n}),Qi=e=>JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`).replace(/\u0027/g,`\\u0027`),z=e=>typeof e==`number`&&isFinite(e),$i=e=>fa(e)===`[object Date]`,ea=e=>fa(e)===`[object RegExp]`,ta=e=>q(e)&&Object.keys(e).length===0,B=Object.assign,na=Object.create,V=(e=null)=>na(e),ra,ia=()=>ra||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:V();function aa(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&apos;`).replace(/\//g,`&#x2F;`).replace(/=/g,`&#x3D;`)}function oa(e){return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,`&amp;`).replace(/"/g,`&quot;`).replace(/'/g,`&apos;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}function sa(e){return e=e.replace(/(\w+)\s*=\s*"([^"]*)"/g,(e,t,n)=>`${t}="${oa(n)}"`),e=e.replace(/(\w+)\s*=\s*'([^']*)'/g,(e,t,n)=>`${t}='${oa(n)}'`),/\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e)&&(process.env.NODE_ENV!==`production`&&Hi(`Potentially dangerous event handlers detected in translation. Consider removing onclick, onerror, etc. from your translation messages.`),e=e.replace(/(\s+)(on)(\w+\s*=)/gi,`$1&#111;n$3`)),[/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi].forEach(t=>{e=e.replace(t,`$1javascript&#58;`)}),e}var ca=Object.prototype.hasOwnProperty;function la(e,t){return ca.call(e,t)}var H=Array.isArray,U=e=>typeof e==`function`,W=e=>typeof e==`string`,G=e=>typeof e==`boolean`,K=e=>typeof e==`object`&&!!e,ua=e=>K(e)&&U(e.then)&&U(e.catch),da=Object.prototype.toString,fa=e=>da.call(e),q=e=>fa(e)===`[object Object]`,pa=e=>e==null?``:H(e)||q(e)&&e.toString===da?JSON.stringify(e,null,2):String(e);function ma(e,t=``){return e.reduce((e,n,r)=>r===0?e+n:e+t+n,``)}var ha=2;function ga(e,t=0,n=e.length){let r=e.split(/\r?\n/),i=0,a=[];for(let e=0;e<r.length;e++)if(i+=r[e].length+1,i>=t){for(let o=e-ha;o<=e+ha||n>i;o++){if(o<0||o>=r.length)continue;let s=o+1;a.push(`${s}${` `.repeat(3-String(s).length)}| ${r[o]}`);let c=r[o].length;if(o===e){let e=t-(i-c)+1,r=Math.max(1,n>i?c-e:n-t);a.push(` | `+` `.repeat(e)+`^`.repeat(r))}else if(o>e){if(n>i){let e=Math.max(Math.min(n-i,c),1);a.push(` | `+`^`.repeat(e))}i+=c+1}}break}return a.join(`
1
+ const e=require(`./chunk-DMQnFFSv.cjs`);let t=require(`vue`),n=require(`ant-design-vue`),r=require(`dayjs`);r=e.a(r);let i=require(`lodash-es`),a=require(`axios`);a=e.a(a);const o=typeof globalThis==`object`&&`crypto`in globalThis?globalThis.crypto:void 0;function s(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name===`Uint8Array`}function c(e){if(!Number.isSafeInteger(e)||e<0)throw Error(`positive integer expected, got `+e)}function l(e,...t){if(!s(e))throw Error(`Uint8Array expected`);if(t.length>0&&!t.includes(e.length))throw Error(`Uint8Array expected of length `+t+`, got length=`+e.length)}function u(e){if(typeof e!=`function`||typeof e.create!=`function`)throw Error(`Hash should be wrapped by utils.createHasher`);c(e.outputLen),c(e.blockLen)}function d(e,t=!0){if(e.destroyed)throw Error(`Hash instance has been destroyed`);if(t&&e.finished)throw Error(`Hash#digest() has already been called`)}function f(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}var p=(()=>typeof Uint8Array.from([]).toHex==`function`&&typeof Uint8Array.fromHex==`function`)(),m=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,`0`));function h(e){if(l(e),p)return e.toHex();let t=``;for(let n=0;n<e.length;n++)t+=m[e[n]];return t}var g={_0:48,_9:57,A:65,F:70,a:97,f:102};function _(e){if(e>=g._0&&e<=g._9)return e-g._0;if(e>=g.A&&e<=g.F)return e-(g.A-10);if(e>=g.a&&e<=g.f)return e-(g.a-10)}function v(e){if(typeof e!=`string`)throw Error(`hex string expected, got `+typeof e);if(p)return Uint8Array.fromHex(e);let t=e.length,n=t/2;if(t%2)throw Error(`hex string expected, got unpadded hex of length `+t);let r=new Uint8Array(n);for(let t=0,i=0;t<n;t++,i+=2){let n=_(e.charCodeAt(i)),a=_(e.charCodeAt(i+1));if(n===void 0||a===void 0){let t=e[i]+e[i+1];throw Error(`hex string expected, got non-hex character "`+t+`" at index `+i)}r[t]=n*16+a}return r}function y(e){if(typeof e!=`string`)throw Error(`string expected`);return new Uint8Array(new TextEncoder().encode(e))}function b(e){return new TextDecoder().decode(e)}function x(e){return typeof e==`string`&&(e=y(e)),l(e),e}function S(...e){let t=0;for(let n=0;n<e.length;n++){let r=e[n];l(r),t+=r.length}let n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){let i=e[t];n.set(i,r),r+=i.length}return n}var C=class{};function w(e=32){if(o&&typeof o.getRandomValues==`function`)return o.getRandomValues(new Uint8Array(e));if(o&&typeof o.randomBytes==`function`)return Uint8Array.from(o.randomBytes(e));throw Error(`crypto.getRandomValues must be defined`)}var T=BigInt(0),E=BigInt(1);function D(e,t){if(typeof t!=`boolean`)throw Error(e+` boolean expected, got `+t)}function O(e,t=``){if(typeof e!=`boolean`){let n=t&&`"${t}"`;throw Error(n+`expected boolean, got type=`+typeof e)}return e}function ee(e,t,n=``){let r=s(e),i=e?.length,a=t!==void 0;if(!r||a&&i!==t){let o=n&&`"${n}" `,s=a?` of length ${t}`:``,c=r?`length=${i}`:`type=${typeof e}`;throw Error(o+`expected Uint8Array`+s+`, got `+c)}return e}function te(e){let t=e.toString(16);return t.length&1?`0`+t:t}function ne(e){if(typeof e!=`string`)throw Error(`hex string expected, got `+typeof e);return e===``?T:BigInt(`0x`+e)}function re(e){return ne(h(e))}function ie(e){return l(e),ne(h(Uint8Array.from(e).reverse()))}function ae(e,t){return v(e.toString(16).padStart(t*2,`0`))}function oe(e,t){return ae(e,t).reverse()}function se(e){return v(te(e))}function k(e,t,n){let r;if(typeof t==`string`)try{r=v(t)}catch(t){throw Error(e+` must be hex string or Uint8Array, cause: `+t)}else if(s(t))r=Uint8Array.from(t);else throw Error(e+` must be hex string or Uint8Array`);let i=r.length;if(typeof n==`number`&&i!==n)throw Error(e+` of length `+n+` expected, got `+i);return r}function ce(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return n===0}function le(e){return Uint8Array.from(e)}function ue(e){return Uint8Array.from(e,(t,n)=>{let r=t.charCodeAt(0);if(t.length!==1||r>127)throw Error(`string contains non-ASCII character "${e[n]}" with code ${r} at position ${n}`);return r})}var de=e=>typeof e==`bigint`&&T<=e;function fe(e,t,n){return de(e)&&de(t)&&de(n)&&t<=e&&e<n}function pe(e,t,n,r){if(!fe(t,n,r))throw Error(`expected valid `+e+`: `+n+` <= n < `+r+`, got `+t)}function me(e){let t;for(t=0;e>T;e>>=E,t+=1);return t}function he(e,t){return e>>BigInt(t)&E}function ge(e,t,n){return e|(n?E:T)<<BigInt(t)}const _e=e=>(E<<BigInt(e))-E;function ve(e,t,n){if(typeof e!=`number`||e<2)throw Error(`hashLen must be a number`);if(typeof t!=`number`||t<2)throw Error(`qByteLen must be a number`);if(typeof n!=`function`)throw Error(`hmacFn must be a function`);let r=e=>new Uint8Array(e),i=e=>Uint8Array.of(e),a=r(e),o=r(e),s=0,c=()=>{a.fill(1),o.fill(0),s=0},l=(...e)=>n(o,a,...e),u=(e=r(0))=>{o=l(i(0),e),a=l(),e.length!==0&&(o=l(i(1),e),a=l())},d=()=>{if(s++>=1e3)throw Error(`drbg: tried 1000 values`);let e=0,n=[];for(;e<t;){a=l();let t=a.slice();n.push(t),e+=a.length}return S(...n)};return(e,t)=>{c(),u(e);let n;for(;!(n=t(d()));)u();return c(),n}}var ye={bigint:e=>typeof e==`bigint`,function:e=>typeof e==`function`,boolean:e=>typeof e==`boolean`,string:e=>typeof e==`string`,stringOrUint8Array:e=>typeof e==`string`||s(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e==`function`&&Number.isSafeInteger(e.outputLen)};function be(e,t,n={}){let r=(t,n,r)=>{let i=ye[n];if(typeof i!=`function`)throw Error(`invalid validator function`);let a=e[t];if(!(r&&a===void 0)&&!i(a,e))throw Error(`param `+String(t)+` is invalid. Expected `+n+`, got `+a)};for(let[e,n]of Object.entries(t))r(e,n,!1);for(let[e,t]of Object.entries(n))r(e,t,!0);return e}function xe(e){return typeof e==`function`&&Number.isSafeInteger(e.outputLen)}function Se(e,t,n={}){if(!e||typeof e!=`object`)throw Error(`expected valid options object`);function r(t,n,r){let i=e[t];if(r&&i===void 0)return;let a=typeof i;if(a!==n||i===null)throw Error(`param "${t}" is invalid: expected ${n}, got ${a}`)}Object.entries(t).forEach(([e,t])=>r(e,t,!1)),Object.entries(n).forEach(([e,t])=>r(e,t,!0))}const Ce=()=>{throw Error(`not implemented`)};function we(e){let t=new WeakMap;return(n,...r)=>{let i=t.get(n);if(i!==void 0)return i;let a=e(n,...r);return t.set(n,a),a}}const Te=l,Ee=c,De=h,Oe=b,A=S,ke=v,Ae=s,je=w,Me=y,Ne=D,j=te,M=ne,Pe=re,Fe=ie,Ie=ae,Le=oe,Re=se,ze=k,Be=ce,Ve=le,He=ue,Ue=fe,We=pe,Ge=me,Ke=he,qe=ge,Je=_e,Ye=ve,Xe=Ce,Ze=we,Qe=be,$e=xe;var et=class extends C{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,u(e);let n=x(t);if(this.iHash=e.create(),typeof this.iHash.update!=`function`)throw Error(`Expected instance of class which extends utils.Hash`);this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let r=this.blockLen,i=new Uint8Array(r);i.set(n.length>r?e.create().update(n).digest():n);for(let e=0;e<i.length;e++)i[e]^=54;this.iHash.update(i),this.oHash=e.create();for(let e=0;e<i.length;e++)i[e]^=106;this.oHash.update(i),f(i)}update(e){return d(this),this.iHash.update(e),this}digestInto(e){d(this),l(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||=Object.create(Object.getPrototypeOf(this),{});let{oHash:t,iHash:n,finished:r,destroyed:i,blockLen:a,outputLen:o}=this;return e=e,e.finished=r,e.destroyed=i,e.blockLen=a,e.outputLen=o,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}};const tt=(e,t,n)=>new et(e,t).update(n).digest();tt.create=(e,t)=>new et(e,t);var N=BigInt(0),P=BigInt(1),nt=BigInt(2),rt=BigInt(3),it=BigInt(4),at=BigInt(5),ot=BigInt(7),st=BigInt(8),ct=BigInt(9),lt=BigInt(16);function ut(e,t){let n=e%t;return n>=N?n:t+n}function dt(e,t){if(e===N)throw Error(`invert: expected non-zero number`);if(t<=N)throw Error(`invert: expected positive modulus, got `+t);let n=ut(e,t),r=t,i=N,a=P,o=P,s=N;for(;n!==N;){let e=r/n,t=r%n,c=i-o*e,l=a-s*e;r=n,n=t,i=o,a=s,o=c,s=l}if(r!==P)throw Error(`invert: does not exist`);return ut(i,t)}function ft(e,t,n){if(!e.eql(e.sqr(t),n))throw Error(`Cannot find square root`)}function pt(e,t){let n=(e.ORDER+P)/it,r=e.pow(t,n);return ft(e,r,t),r}function mt(e,t){let n=(e.ORDER-at)/st,r=e.mul(t,nt),i=e.pow(r,n),a=e.mul(t,i),o=e.mul(e.mul(a,nt),i),s=e.mul(a,e.sub(o,e.ONE));return ft(e,s,t),s}function ht(e){let t=wt(e),n=gt(e),r=n(t,t.neg(t.ONE)),i=n(t,r),a=n(t,t.neg(r)),o=(e+ot)/lt;return(e,t)=>{let n=e.pow(t,o),s=e.mul(n,r),c=e.mul(n,i),l=e.mul(n,a),u=e.eql(e.sqr(s),t),d=e.eql(e.sqr(c),t);n=e.cmov(n,s,u),s=e.cmov(l,c,d);let f=e.eql(e.sqr(s),t),p=e.cmov(n,s,f);return ft(e,p,t),p}}function gt(e){if(e<rt)throw Error(`sqrt is not defined for small field`);let t=e-P,n=0;for(;t%nt===N;)t/=nt,n++;let r=nt,i=wt(e);for(;St(i,r)===1;)if(r++>1e3)throw Error(`Cannot find square root: probably non-prime P`);if(n===1)return pt;let a=i.pow(r,t),o=(t+P)/nt;return function(e,r){if(e.is0(r))return r;if(St(e,r)!==1)throw Error(`Cannot find square root`);let i=n,s=e.mul(e.ONE,a),c=e.pow(r,t),l=e.pow(r,o);for(;!e.eql(c,e.ONE);){if(e.is0(c))return e.ZERO;let t=1,n=e.sqr(c);for(;!e.eql(n,e.ONE);)if(t++,n=e.sqr(n),t===i)throw Error(`Cannot find square root`);let r=P<<BigInt(i-t-1),a=e.pow(s,r);i=t,s=e.sqr(a),c=e.mul(c,s),l=e.mul(l,a)}return l}}function _t(e){return e%it===rt?pt:e%st===at?mt:e%lt===ct?ht(e):gt(e)}var vt=[`create`,`isValid`,`is0`,`neg`,`inv`,`sqrt`,`sqr`,`eql`,`add`,`sub`,`mul`,`pow`,`div`,`addN`,`subN`,`mulN`,`sqrN`];function yt(e){return Se(e,vt.reduce((e,t)=>(e[t]=`function`,e),{ORDER:`bigint`,MASK:`bigint`,BYTES:`number`,BITS:`number`})),e}function bt(e,t,n){if(n<N)throw Error(`invalid exponent, negatives unsupported`);if(n===N)return e.ONE;if(n===P)return t;let r=e.ONE,i=t;for(;n>N;)n&P&&(r=e.mul(r,i)),i=e.sqr(i),n>>=P;return r}function xt(e,t,n=!1){let r=Array(t.length).fill(n?e.ZERO:void 0),i=t.reduce((t,n,i)=>e.is0(n)?t:(r[i]=t,e.mul(t,n)),e.ONE),a=e.inv(i);return t.reduceRight((t,n,i)=>e.is0(n)?t:(r[i]=e.mul(t,r[i]),e.mul(t,n)),a),r}function St(e,t){let n=(e.ORDER-P)/nt,r=e.pow(t,n),i=e.eql(r,e.ONE),a=e.eql(r,e.ZERO),o=e.eql(r,e.neg(e.ONE));if(!i&&!a&&!o)throw Error(`invalid Legendre symbol result`);return i?1:a?0:-1}function Ct(e,t){t!==void 0&&c(t);let n=t===void 0?e.toString(2).length:t;return{nBitLength:n,nByteLength:Math.ceil(n/8)}}function wt(e,t,n=!1,r={}){if(e<=N)throw Error(`invalid field: expected ORDER > 0, got `+e);let i,a,o=!1,s;if(typeof t==`object`&&t){if(r.sqrt||n)throw Error(`cannot specify opts in two arguments`);let e=t;e.BITS&&(i=e.BITS),e.sqrt&&(a=e.sqrt),typeof e.isLE==`boolean`&&(n=e.isLE),typeof e.modFromBytes==`boolean`&&(o=e.modFromBytes),s=e.allowedLengths}else typeof t==`number`&&(i=t),r.sqrt&&(a=r.sqrt);let{nBitLength:c,nByteLength:l}=Ct(e,i);if(l>2048)throw Error(`invalid field: expected ORDER of <= 2048 bytes`);let u,d=Object.freeze({ORDER:e,isLE:n,BITS:c,BYTES:l,MASK:_e(c),ZERO:N,ONE:P,allowedLengths:s,create:t=>ut(t,e),isValid:t=>{if(typeof t!=`bigint`)throw Error(`invalid field element: expected bigint, got `+typeof t);return N<=t&&t<e},is0:e=>e===N,isValidNot0:e=>!d.is0(e)&&d.isValid(e),isOdd:e=>(e&P)===P,neg:t=>ut(-t,e),eql:(e,t)=>e===t,sqr:t=>ut(t*t,e),add:(t,n)=>ut(t+n,e),sub:(t,n)=>ut(t-n,e),mul:(t,n)=>ut(t*n,e),pow:(e,t)=>bt(d,e,t),div:(t,n)=>ut(t*dt(n,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>dt(t,e),sqrt:a||(t=>(u||=_t(e),u(d,t))),toBytes:e=>n?oe(e,l):ae(e,l),fromBytes:(t,r=!0)=>{if(s){if(!s.includes(t.length)||t.length>l)throw Error(`Field.fromBytes: expected `+s+` bytes, got `+t.length);let e=new Uint8Array(l);e.set(t,n?0:e.length-t.length),t=e}if(t.length!==l)throw Error(`Field.fromBytes: expected `+l+` bytes, got `+t.length);let i=n?ie(t):re(t);if(o&&(i=ut(i,e)),!r&&!d.isValid(i))throw Error(`invalid field element: outside of range 0..ORDER`);return i},invertBatch:e=>xt(d,e),cmov:(e,t,n)=>n?t:e});return Object.freeze(d)}function Tt(e){if(typeof e!=`bigint`)throw Error(`field order must be bigint`);let t=e.toString(2).length;return Math.ceil(t/8)}function Et(e){let t=Tt(e);return t+Math.ceil(t/2)}function Dt(e,t,n=!1){let r=e.length,i=Tt(t),a=Et(t);if(r<16||r<a||r>1024)throw Error(`expected `+a+`-1024 bytes of input, got `+r);let o=ut(n?ie(e):re(e),t-P)+P;return n?oe(o,i):ae(o,i)}var Ot=BigInt(0),kt=BigInt(1);function At(e,t){let n=t.negate();return e?n:t}function jt(e,t){let n=xt(e.Fp,t.map(e=>e.Z));return t.map((t,r)=>e.fromAffine(t.toAffine(n[r])))}function Mt(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw Error(`invalid window size, expected [1..`+t+`], got W=`+e)}function Nt(e,t){Mt(e,t);let n=Math.ceil(t/e)+1,r=2**(e-1),i=2**e;return{windows:n,windowSize:r,mask:_e(e),maxNumber:i,shiftBy:BigInt(e)}}function Pt(e,t,n){let{windowSize:r,mask:i,maxNumber:a,shiftBy:o}=n,s=Number(e&i),c=e>>o;s>r&&(s-=a,c+=kt);let l=t*r,u=l+Math.abs(s)-1,d=s===0,f=s<0,p=t%2!=0;return{nextN:c,offset:u,isZero:d,isNeg:f,isNegF:p,offsetF:l}}function Ft(e,t){if(!Array.isArray(e))throw Error(`array expected`);e.forEach((e,n)=>{if(!(e instanceof t))throw Error(`invalid point at index `+n)})}function It(e,t){if(!Array.isArray(e))throw Error(`array of scalars expected`);e.forEach((e,n)=>{if(!t.isValid(e))throw Error(`invalid scalar at index `+n)})}var Lt=new WeakMap,Rt=new WeakMap;function zt(e){return Rt.get(e)||1}function Bt(e){if(e!==Ot)throw Error(`invalid wNAF`)}var Vt=class{constructor(e,t){this.BASE=e.BASE,this.ZERO=e.ZERO,this.Fn=e.Fn,this.bits=t}_unsafeLadder(e,t,n=this.ZERO){let r=e;for(;t>Ot;)t&kt&&(n=n.add(r)),r=r.double(),t>>=kt;return n}precomputeWindow(e,t){let{windows:n,windowSize:r}=Nt(t,this.bits),i=[],a=e,o=a;for(let e=0;e<n;e++){o=a,i.push(o);for(let e=1;e<r;e++)o=o.add(a),i.push(o);a=o.double()}return i}wNAF(e,t,n){if(!this.Fn.isValid(n))throw Error(`invalid scalar`);let r=this.ZERO,i=this.BASE,a=Nt(e,this.bits);for(let e=0;e<a.windows;e++){let{nextN:o,offset:s,isZero:c,isNeg:l,isNegF:u,offsetF:d}=Pt(n,e,a);n=o,c?i=i.add(At(u,t[d])):r=r.add(At(l,t[s]))}return Bt(n),{p:r,f:i}}wNAFUnsafe(e,t,n,r=this.ZERO){let i=Nt(e,this.bits);for(let e=0;e<i.windows&&n!==Ot;e++){let{nextN:a,offset:o,isZero:s,isNeg:c}=Pt(n,e,i);if(n=a,!s){let e=t[o];r=r.add(c?e.negate():e)}}return Bt(n),r}getPrecomputes(e,t,n){let r=Lt.get(t);return r||(r=this.precomputeWindow(t,e),e!==1&&(typeof n==`function`&&(r=n(r)),Lt.set(t,r))),r}cached(e,t,n){let r=zt(e);return this.wNAF(r,this.getPrecomputes(r,e,n),t)}unsafe(e,t,n,r){let i=zt(e);return i===1?this._unsafeLadder(e,t,r):this.wNAFUnsafe(i,this.getPrecomputes(i,e,n),t,r)}createCache(e,t){Mt(t,this.bits),Rt.set(e,t),Lt.delete(e)}hasCache(e){return zt(e)!==1}};function Ht(e,t,n,r){let i=t,a=e.ZERO,o=e.ZERO;for(;n>Ot||r>Ot;)n&kt&&(a=a.add(i)),r&kt&&(o=o.add(i)),i=i.double(),n>>=kt,r>>=kt;return{p1:a,p2:o}}function Ut(e,t,n,r){Ft(n,e),It(r,t);let i=n.length,a=r.length;if(i!==a)throw Error(`arrays of points and scalars must have equal length`);let o=e.ZERO,s=me(BigInt(i)),c=1;s>12?c=s-3:s>4?c=s-2:s>0&&(c=2);let l=_e(c),u=Array(Number(l)+1).fill(o),d=Math.floor((t.BITS-1)/c)*c,f=o;for(let e=d;e>=0;e-=c){u.fill(o);for(let t=0;t<a;t++){let i=r[t],a=Number(i>>BigInt(e)&l);u[a]=u[a].add(n[t])}let t=o;for(let e=u.length-1,n=o;e>0;e--)n=n.add(u[e]),t=t.add(n);if(f=f.add(t),e!==0)for(let e=0;e<c;e++)f=f.double()}return f}function Wt(e,t,n){if(t){if(t.ORDER!==e)throw Error(`Field.ORDER must match order: Fp == p, Fn == n`);return yt(t),t}else return wt(e,{isLE:n})}function Gt(e,t,n={},r){if(r===void 0&&(r=e===`edwards`),!t||typeof t!=`object`)throw Error(`expected valid ${e} CURVE object`);for(let e of[`p`,`n`,`h`]){let n=t[e];if(!(typeof n==`bigint`&&n>Ot))throw Error(`CURVE.${e} must be positive bigint`)}let i=Wt(t.p,n.Fp,r),a=Wt(t.n,n.Fn,r),o=[`Gx`,`Gy`,`a`,e===`weierstrass`?`b`:`d`];for(let e of o)if(!i.isValid(t[e]))throw Error(`CURVE.${e} must be valid field element of CURVE.Fp`);return t=Object.freeze(Object.assign({},t)),{CURVE:t,Fp:i,Fn:a}}var Kt=(e,t)=>(e+(e>=0?t:-t)/en)/t;function qt(e,t,n){let[[r,i],[a,o]]=t,s=Kt(o*e,n),c=Kt(-i*e,n),l=e-s*r-c*a,u=-s*i-c*o,d=l<Qt,f=u<Qt;d&&(l=-l),f&&(u=-u);let p=_e(Math.ceil(me(n)/2))+$t;if(l<Qt||l>=p||u<Qt||u>=p)throw Error(`splitScalar (endomorphism): failed, k=`+e);return{k1neg:d,k1:l,k2neg:f,k2:u}}function Jt(e){if(![`compact`,`recovered`,`der`].includes(e))throw Error(`Signature format must be "compact", "recovered", or "der"`);return e}function Yt(e,t){let n={};for(let r of Object.keys(t))n[r]=e[r]===void 0?t[r]:e[r];return O(n.lowS,`lowS`),O(n.prehash,`prehash`),n.format!==void 0&&Jt(n.format),n}var Xt=class extends Error{constructor(e=``){super(e)}};const Zt={Err:Xt,_tlv:{encode:(e,t)=>{let{Err:n}=Zt;if(e<0||e>256)throw new n(`tlv.encode: wrong tag`);if(t.length&1)throw new n(`tlv.encode: unpadded data`);let r=t.length/2,i=te(r);if(i.length/2&128)throw new n(`tlv.encode: long form length too big`);let a=r>127?te(i.length/2|128):``;return te(e)+a+i+t},decode(e,t){let{Err:n}=Zt,r=0;if(e<0||e>256)throw new n(`tlv.encode: wrong tag`);if(t.length<2||t[r++]!==e)throw new n(`tlv.decode: wrong tlv`);let i=t[r++],a=!!(i&128),o=0;if(!a)o=i;else{let e=i&127;if(!e)throw new n(`tlv.decode(long): indefinite length not supported`);if(e>4)throw new n(`tlv.decode(long): byte length is too big`);let a=t.subarray(r,r+e);if(a.length!==e)throw new n(`tlv.decode: length bytes not complete`);if(a[0]===0)throw new n(`tlv.decode(long): zero leftmost byte`);for(let e of a)o=o<<8|e;if(r+=e,o<128)throw new n(`tlv.decode(long): not minimal encoding`)}let s=t.subarray(r,r+o);if(s.length!==o)throw new n(`tlv.decode: wrong value length`);return{v:s,l:t.subarray(r+o)}}},_int:{encode(e){let{Err:t}=Zt;if(e<Qt)throw new t(`integer: negative integers are not allowed`);let n=te(e);if(Number.parseInt(n[0],16)&8&&(n=`00`+n),n.length&1)throw new t(`unexpected DER parsing assertion: unpadded hex`);return n},decode(e){let{Err:t}=Zt;if(e[0]&128)throw new t(`invalid signature integer: negative`);if(e[0]===0&&!(e[1]&128))throw new t(`invalid signature integer: unnecessary leading zero`);return re(e)}},toSig(e){let{Err:t,_int:n,_tlv:r}=Zt,i=k(`signature`,e),{v:a,l:o}=r.decode(48,i);if(o.length)throw new t(`invalid signature: left bytes after parsing`);let{v:s,l:c}=r.decode(2,a),{v:l,l:u}=r.decode(2,c);if(u.length)throw new t(`invalid signature: left bytes after parsing`);return{r:n.decode(s),s:n.decode(l)}},hexFromSig(e){let{_tlv:t,_int:n}=Zt,r=t.encode(2,n.encode(e.r))+t.encode(2,n.encode(e.s));return t.encode(48,r)}};var Qt=BigInt(0),$t=BigInt(1),en=BigInt(2),tn=BigInt(3),nn=BigInt(4);function rn(e,t){let{BYTES:n}=e,r;if(typeof t==`bigint`)r=t;else{let i=k(`private key`,t);try{r=e.fromBytes(i)}catch{throw Error(`invalid private key: expected ui8a of size ${n}, got ${typeof t}`)}}if(!e.isValidNot0(r))throw Error(`invalid private key: out of range [1..N-1]`);return r}function an(e,t={}){let n=Gt(`weierstrass`,e,t),{Fp:r,Fn:i}=n,a=n.CURVE,{h:o,n:s}=a;Se(t,{},{allowInfinityPoint:`boolean`,clearCofactor:`function`,isTorsionFree:`function`,fromBytes:`function`,toBytes:`function`,endo:`object`,wrapPrivateKey:`boolean`});let{endo:c}=t;if(c&&(!r.is0(a.a)||typeof c.beta!=`bigint`||!Array.isArray(c.basises)))throw Error(`invalid endo: expected "beta": bigint and "basises": array`);let l=sn(r,i);function u(){if(!r.isOdd)throw Error(`compression is not supported: Field does not have .isOdd()`)}function d(e,t,n){let{x:i,y:a}=t.toAffine(),o=r.toBytes(i);return O(n,`isCompressed`),n?(u(),S(on(!r.isOdd(a)),o)):S(Uint8Array.of(4),o,r.toBytes(a))}function f(e){ee(e,void 0,`Point`);let{publicKey:t,publicKeyUncompressed:n}=l,i=e.length,a=e[0],o=e.subarray(1);if(i===t&&(a===2||a===3)){let e=r.fromBytes(o);if(!r.isValid(e))throw Error(`bad point: is not on curve, wrong x`);let t=g(e),n;try{n=r.sqrt(t)}catch(e){let t=e instanceof Error?`: `+e.message:``;throw Error(`bad point: is not on curve, sqrt error`+t)}u();let i=r.isOdd(n);return(a&1)==1!==i&&(n=r.neg(n)),{x:e,y:n}}else if(i===n&&a===4){let e=r.BYTES,t=r.fromBytes(o.subarray(0,e)),n=r.fromBytes(o.subarray(e,e*2));if(!_(t,n))throw Error(`bad point: is not on curve`);return{x:t,y:n}}else throw Error(`bad point: got length ${i}, expected compressed=${t} or uncompressed=${n}`)}let p=t.toBytes||d,m=t.fromBytes||f;function g(e){let t=r.sqr(e),n=r.mul(t,e);return r.add(r.add(n,r.mul(e,a.a)),a.b)}function _(e,t){let n=r.sqr(t),i=g(e);return r.eql(n,i)}if(!_(a.Gx,a.Gy))throw Error(`bad curve params: generator point`);let v=r.mul(r.pow(a.a,tn),nn),y=r.mul(r.sqr(a.b),BigInt(27));if(r.is0(r.add(v,y)))throw Error(`bad curve params: a or b`);function b(e,t,n=!1){if(!r.isValid(t)||n&&r.is0(t))throw Error(`bad point coordinate ${e}`);return t}function x(e){if(!(e instanceof D))throw Error(`ProjectivePoint expected`)}function C(e){if(!c||!c.basises)throw Error(`no endo`);return qt(e,c.basises,i.ORDER)}let w=we((e,t)=>{let{X:n,Y:i,Z:a}=e;if(r.eql(a,r.ONE))return{x:n,y:i};let o=e.is0();t??=o?r.ONE:r.inv(a);let s=r.mul(n,t),c=r.mul(i,t),l=r.mul(a,t);if(o)return{x:r.ZERO,y:r.ZERO};if(!r.eql(l,r.ONE))throw Error(`invZ was invalid`);return{x:s,y:c}}),T=we(e=>{if(e.is0()){if(t.allowInfinityPoint&&!r.is0(e.Y))return;throw Error(`bad point: ZERO`)}let{x:n,y:i}=e.toAffine();if(!r.isValid(n)||!r.isValid(i))throw Error(`bad point: x or y not field elements`);if(!_(n,i))throw Error(`bad point: equation left != right`);if(!e.isTorsionFree())throw Error(`bad point: not in prime-order subgroup`);return!0});function E(e,t,n,i,a){return n=new D(r.mul(n.X,e),n.Y,n.Z),t=At(i,t),n=At(a,n),t.add(n)}class D{constructor(e,t,n){this.X=b(`x`,e),this.Y=b(`y`,t,!0),this.Z=b(`z`,n),Object.freeze(this)}static CURVE(){return a}static fromAffine(e){let{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw Error(`invalid affine point`);if(e instanceof D)throw Error(`projective point not allowed`);return r.is0(t)&&r.is0(n)?D.ZERO:new D(t,n,r.ONE)}static fromBytes(e){let t=D.fromAffine(m(ee(e,void 0,`point`)));return t.assertValidity(),t}static fromHex(e){return D.fromBytes(k(`pointHex`,e))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(e=8,t=!0){return ne.createCache(this,e),t||this.multiply(tn),this}assertValidity(){T(this)}hasEvenY(){let{y:e}=this.toAffine();if(!r.isOdd)throw Error(`Field doesn't support isOdd`);return!r.isOdd(e)}equals(e){x(e);let{X:t,Y:n,Z:i}=this,{X:a,Y:o,Z:s}=e,c=r.eql(r.mul(t,s),r.mul(a,i)),l=r.eql(r.mul(n,s),r.mul(o,i));return c&&l}negate(){return new D(this.X,r.neg(this.Y),this.Z)}double(){let{a:e,b:t}=a,n=r.mul(t,tn),{X:i,Y:o,Z:s}=this,c=r.ZERO,l=r.ZERO,u=r.ZERO,d=r.mul(i,i),f=r.mul(o,o),p=r.mul(s,s),m=r.mul(i,o);return m=r.add(m,m),u=r.mul(i,s),u=r.add(u,u),c=r.mul(e,u),l=r.mul(n,p),l=r.add(c,l),c=r.sub(f,l),l=r.add(f,l),l=r.mul(c,l),c=r.mul(m,c),u=r.mul(n,u),p=r.mul(e,p),m=r.sub(d,p),m=r.mul(e,m),m=r.add(m,u),u=r.add(d,d),d=r.add(u,d),d=r.add(d,p),d=r.mul(d,m),l=r.add(l,d),p=r.mul(o,s),p=r.add(p,p),d=r.mul(p,m),c=r.sub(c,d),u=r.mul(p,f),u=r.add(u,u),u=r.add(u,u),new D(c,l,u)}add(e){x(e);let{X:t,Y:n,Z:i}=this,{X:o,Y:s,Z:c}=e,l=r.ZERO,u=r.ZERO,d=r.ZERO,f=a.a,p=r.mul(a.b,tn),m=r.mul(t,o),h=r.mul(n,s),g=r.mul(i,c),_=r.add(t,n),v=r.add(o,s);_=r.mul(_,v),v=r.add(m,h),_=r.sub(_,v),v=r.add(t,i);let y=r.add(o,c);return v=r.mul(v,y),y=r.add(m,g),v=r.sub(v,y),y=r.add(n,i),l=r.add(s,c),y=r.mul(y,l),l=r.add(h,g),y=r.sub(y,l),d=r.mul(f,v),l=r.mul(p,g),d=r.add(l,d),l=r.sub(h,d),d=r.add(h,d),u=r.mul(l,d),h=r.add(m,m),h=r.add(h,m),g=r.mul(f,g),v=r.mul(p,v),h=r.add(h,g),g=r.sub(m,g),g=r.mul(f,g),v=r.add(v,g),m=r.mul(h,v),u=r.add(u,m),m=r.mul(y,v),l=r.mul(_,l),l=r.sub(l,m),m=r.mul(_,h),d=r.mul(y,d),d=r.add(d,m),new D(l,u,d)}subtract(e){return this.add(e.negate())}is0(){return this.equals(D.ZERO)}multiply(e){let{endo:n}=t;if(!i.isValidNot0(e))throw Error(`invalid scalar: out of range`);let r,a,o=e=>ne.cached(this,e,e=>jt(D,e));if(n){let{k1neg:t,k1:i,k2neg:s,k2:c}=C(e),{p:l,f:u}=o(i),{p:d,f}=o(c);a=u.add(f),r=E(n.beta,l,d,t,s)}else{let{p:t,f:n}=o(e);r=t,a=n}return jt(D,[r,a])[0]}multiplyUnsafe(e){let{endo:n}=t,r=this;if(!i.isValid(e))throw Error(`invalid scalar: out of range`);if(e===Qt||r.is0())return D.ZERO;if(e===$t)return r;if(ne.hasCache(this))return this.multiply(e);if(n){let{k1neg:t,k1:i,k2neg:a,k2:o}=C(e),{p1:s,p2:c}=Ht(D,r,i,o);return E(n.beta,s,c,t,a)}else return ne.unsafe(r,e)}multiplyAndAddUnsafe(e,t,n){let r=this.multiplyUnsafe(t).add(e.multiplyUnsafe(n));return r.is0()?void 0:r}toAffine(e){return w(this,e)}isTorsionFree(){let{isTorsionFree:e}=t;return o===$t?!0:e?e(D,this):ne.unsafe(this,s).is0()}clearCofactor(){let{clearCofactor:e}=t;return o===$t?this:e?e(D,this):this.multiplyUnsafe(o)}isSmallOrder(){return this.multiplyUnsafe(o).is0()}toBytes(e=!0){return O(e,`isCompressed`),this.assertValidity(),p(D,this,e)}toHex(e=!0){return h(this.toBytes(e))}toString(){return`<Point ${this.is0()?`ZERO`:this.toHex()}>`}get px(){return this.X}get py(){return this.X}get pz(){return this.Z}toRawBytes(e=!0){return this.toBytes(e)}_setWindowSize(e){this.precompute(e)}static normalizeZ(e){return jt(D,e)}static msm(e,t){return Ut(D,i,e,t)}static fromPrivateKey(e){return D.BASE.multiply(rn(i,e))}}D.BASE=new D(a.Gx,a.Gy,r.ONE),D.ZERO=new D(r.ZERO,r.ONE,r.ZERO),D.Fp=r,D.Fn=i;let te=i.BITS,ne=new Vt(D,t.endo?Math.ceil(te/2):te);return D.BASE.precompute(8),D}function on(e){return Uint8Array.of(e?2:3)}function sn(e,t){return{secretKey:t.BYTES,publicKey:1+e.BYTES,publicKeyUncompressed:1+2*e.BYTES,publicKeyHasPrefix:!0,signature:2*t.BYTES}}function cn(e,t={}){let{Fn:n}=e,r=t.randomBytes||w,i=Object.assign(sn(e.Fp,n),{seed:Et(n.ORDER)});function a(e){try{return!!rn(n,e)}catch{return!1}}function o(t,n){let{publicKey:r,publicKeyUncompressed:a}=i;try{let i=t.length;return n===!0&&i!==r||n===!1&&i!==a?!1:!!e.fromBytes(t)}catch{return!1}}function s(e=r(i.seed)){return Dt(ee(e,i.seed,`seed`),n.ORDER)}function c(t,r=!0){return e.BASE.multiply(rn(n,t)).toBytes(r)}function l(e){let t=s(e);return{secretKey:t,publicKey:c(t)}}function u(t){if(typeof t==`bigint`)return!1;if(t instanceof e)return!0;let{secretKey:r,publicKey:a,publicKeyUncompressed:o}=i;if(n.allowedLengths||r===a)return;let s=k(`key`,t).length;return s===a||s===o}function d(t,r,i=!0){if(u(t)===!0)throw Error(`first arg must be private key`);if(u(r)===!1)throw Error(`second arg must be public key`);let a=rn(n,t);return e.fromHex(r).multiply(a).toBytes(i)}let f={isValidSecretKey:a,isValidPublicKey:o,randomSecretKey:s,isValidPrivateKey:a,randomPrivateKey:s,normPrivateKeyToScalar:e=>rn(n,e),precompute(t=8,n=e.BASE){return n.precompute(t,!1)}};return Object.freeze({getPublicKey:c,getSharedSecret:d,keygen:l,Point:e,utils:f,lengths:i})}function ln(e,t,n={}){u(t),Se(n,{},{hmac:`function`,lowS:`boolean`,randomBytes:`function`,bits2int:`function`,bits2int_modN:`function`});let r=n.randomBytes||w,i=n.hmac||((e,...n)=>tt(t,e,S(...n))),{Fp:a,Fn:o}=e,{ORDER:c,BITS:l}=o,{keygen:d,getPublicKey:f,getSharedSecret:p,utils:m,lengths:g}=cn(e,n),_={prehash:!1,lowS:typeof n.lowS==`boolean`?n.lowS:!1,format:void 0,extraEntropy:!1},y=`compact`;function b(e){return e>c>>$t}function x(e,t){if(!o.isValidNot0(t))throw Error(`invalid signature ${e}: out of range 1..Point.Fn.ORDER`);return t}function C(e,t){Jt(t);let n=g.signature;return ee(e,t===`compact`?n:t===`recovered`?n+1:void 0,`${t} signature`)}class T{constructor(e,t,n){this.r=x(`r`,e),this.s=x(`s`,t),n!=null&&(this.recovery=n),Object.freeze(this)}static fromBytes(e,t=y){C(e,t);let n;if(t===`der`){let{r:t,s:n}=Zt.toSig(ee(e));return new T(t,n)}t===`recovered`&&(n=e[0],t=`compact`,e=e.subarray(1));let r=o.BYTES,i=e.subarray(0,r),a=e.subarray(r,r*2);return new T(o.fromBytes(i),o.fromBytes(a),n)}static fromHex(e,t){return this.fromBytes(v(e),t)}addRecoveryBit(e){return new T(this.r,this.s,e)}recoverPublicKey(t){let n=a.ORDER,{r,s:i,recovery:s}=this;if(s==null||![0,1,2,3].includes(s))throw Error(`recovery id invalid`);if(c*en<n&&s>1)throw Error(`recovery id is ambiguous for h>1 curve`);let l=s===2||s===3?r+c:r;if(!a.isValid(l))throw Error(`recovery id 2 or 3 invalid`);let u=a.toBytes(l),d=e.fromBytes(S(on((s&1)==0),u)),f=o.inv(l),p=D(k(`msgHash`,t)),m=o.create(-p*f),h=o.create(i*f),g=e.BASE.multiplyUnsafe(m).add(d.multiplyUnsafe(h));if(g.is0())throw Error(`point at infinify`);return g.assertValidity(),g}hasHighS(){return b(this.s)}toBytes(e=y){if(Jt(e),e===`der`)return v(Zt.hexFromSig(this));let t=o.toBytes(this.r),n=o.toBytes(this.s);if(e===`recovered`){if(this.recovery==null)throw Error(`recovery bit must be present`);return S(Uint8Array.of(this.recovery),t,n)}return S(t,n)}toHex(e){return h(this.toBytes(e))}assertValidity(){}static fromCompact(e){return T.fromBytes(k(`sig`,e),`compact`)}static fromDER(e){return T.fromBytes(k(`sig`,e),`der`)}normalizeS(){return this.hasHighS()?new T(this.r,o.neg(this.s),this.recovery):this}toDERRawBytes(){return this.toBytes(`der`)}toDERHex(){return h(this.toBytes(`der`))}toCompactRawBytes(){return this.toBytes(`compact`)}toCompactHex(){return h(this.toBytes(`compact`))}}let E=n.bits2int||function(e){if(e.length>8192)throw Error(`input is too large`);let t=re(e),n=e.length*8-l;return n>0?t>>BigInt(n):t},D=n.bits2int_modN||function(e){return o.create(E(e))},O=_e(l);function te(e){return pe(`num < 2^`+l,e,Qt,O),o.toBytes(e)}function ne(e,n){return ee(e,void 0,`message`),n?ee(t(e),void 0,`prehashed message`):e}function ie(t,n,i){if([`recovered`,`canonical`].some(e=>e in i))throw Error(`sign() legacy options not supported`);let{lowS:a,prehash:s,extraEntropy:c}=Yt(i,_);t=ne(t,s);let l=D(t),u=rn(o,n),d=[te(u),te(l)];if(c!=null&&c!==!1){let e=c===!0?r(g.secretKey):c;d.push(k(`extraEntropy`,e))}let f=S(...d),p=l;function m(t){let n=E(t);if(!o.isValidNot0(n))return;let r=o.inv(n),i=e.BASE.multiply(n).toAffine(),s=o.create(i.x);if(s===Qt)return;let c=o.create(r*o.create(p+s*u));if(c===Qt)return;let l=(i.x===s?0:2)|Number(i.y&$t),d=c;return a&&b(c)&&(d=o.neg(c),l^=1),new T(s,d,l)}return{seed:f,k2sig:m}}function ae(e,n,r={}){e=k(`message`,e);let{seed:a,k2sig:s}=ie(e,n,r);return ve(t.outputLen,o.BYTES,i)(a,s)}function oe(e){let t,n=typeof e==`string`||s(e),r=!n&&typeof e==`object`&&!!e&&typeof e.r==`bigint`&&typeof e.s==`bigint`;if(!n&&!r)throw Error(`invalid signature, expected Uint8Array, hex string or Signature instance`);if(r)t=new T(e.r,e.s);else if(n){try{t=T.fromBytes(k(`sig`,e),`der`)}catch(e){if(!(e instanceof Zt.Err))throw e}if(!t)try{t=T.fromBytes(k(`sig`,e),`compact`)}catch{return!1}}return t||!1}function se(t,n,r,i={}){let{lowS:a,prehash:s,format:c}=Yt(i,_);if(r=k(`publicKey`,r),n=ne(k(`message`,n),s),`strict`in i)throw Error(`options.strict was renamed to lowS`);let l=c===void 0?oe(t):T.fromBytes(k(`sig`,t),c);if(l===!1)return!1;try{let t=e.fromBytes(r);if(a&&l.hasHighS())return!1;let{r:i,s}=l,c=D(n),u=o.inv(s),d=o.create(c*u),f=o.create(i*u),p=e.BASE.multiplyUnsafe(d).add(t.multiplyUnsafe(f));return p.is0()?!1:o.create(p.x)===i}catch{return!1}}function ce(e,t,n={}){let{prehash:r}=Yt(n,_);return t=ne(t,r),T.fromBytes(e,`recovered`).recoverPublicKey(t).toBytes()}return Object.freeze({keygen:d,getPublicKey:f,getSharedSecret:p,utils:m,lengths:g,Point:e,sign:ae,verify:se,recoverPublicKey:ce,Signature:T,hash:t})}function un(e){let t={a:e.a,b:e.b,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},n=e.Fp,r=e.allowedPrivateKeyLengths?Array.from(new Set(e.allowedPrivateKeyLengths.map(e=>Math.ceil(e/2)))):void 0;return{CURVE:t,curveOpts:{Fp:n,Fn:wt(t.n,{BITS:e.nBitLength,allowedLengths:r,modFromBytes:e.wrapPrivateKey}),allowInfinityPoint:e.allowInfinityPoint,endo:e.endo,isTorsionFree:e.isTorsionFree,clearCofactor:e.clearCofactor,fromBytes:e.fromBytes,toBytes:e.toBytes}}}function dn(e){let{CURVE:t,curveOpts:n}=un(e),r={hmac:e.hmac,randomBytes:e.randomBytes,lowS:e.lowS,bits2int:e.bits2int,bits2int_modN:e.bits2int_modN};return{CURVE:t,curveOpts:n,hash:e.hash,ecdsaOpts:r}}function fn(e,t){let n=t.Point;return Object.assign({},t,{ProjectivePoint:n,CURVE:Object.assign({},e,Ct(n.Fn.ORDER,n.Fn.BITS))})}function pn(e){let{CURVE:t,curveOpts:n,hash:r,ecdsaOpts:i}=dn(e);return fn(e,ln(an(t,n),r,i))}function mn(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name===`Uint8Array`}function hn(e,...t){if(!mn(e))throw Error(`Uint8Array expected`);if(t.length>0&&!t.includes(e.length))throw Error(`Uint8Array expected of length `+t+`, got length=`+e.length)}function gn(e,t=!0){if(e.destroyed)throw Error(`Hash instance has been destroyed`);if(t&&e.finished)throw Error(`Hash#digest() has already been called`)}function _n(e,t){hn(e);let n=t.outputLen;if(e.length<n)throw Error(`digestInto() expects output buffer of length at least `+n)}function vn(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function yn(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function bn(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function xn(e){if(typeof e!=`string`)throw Error(`string expected`);return new Uint8Array(new TextEncoder().encode(e))}function Sn(e){if(typeof e==`string`)e=xn(e);else if(mn(e))e=wn(e);else throw Error(`Uint8Array expected, got `+typeof e);return e}function Cn(e,t,n,r){if(typeof e.setBigUint64==`function`)return e.setBigUint64(t,n,r);let i=BigInt(32),a=BigInt(4294967295),o=Number(n>>i&a),s=Number(n&a),c=r?4:0,l=r?0:4;e.setUint32(t+c,o,r),e.setUint32(t+l,s,r)}function wn(e){return Uint8Array.from(e)}var Tn=16,En=new Uint8Array(16),Dn=vn(En),On=225,kn=(e,t,n,r)=>{let i=r&1;return{s3:n<<31|r>>>1,s2:t<<31|n>>>1,s1:e<<31|t>>>1,s0:e>>>1^On<<24&-(i&1)}},An=e=>(e>>>0&255)<<24|(e>>>8&255)<<16|(e>>>16&255)<<8|e>>>24&255|0;function jn(e){e.reverse();let t=e[15]&1,n=0;for(let t=0;t<e.length;t++){let r=e[t];e[t]=r>>>1|n,n=(r&1)<<7}return e[0]^=-t&225,e}var Mn=e=>e>64*1024?8:e>1024?4:2,Nn=class{constructor(e,t){this.blockLen=Tn,this.outputLen=Tn,this.s0=0,this.s1=0,this.s2=0,this.s3=0,this.finished=!1,e=Sn(e),hn(e,16);let n=bn(e),r=n.getUint32(0,!1),i=n.getUint32(4,!1),a=n.getUint32(8,!1),o=n.getUint32(12,!1),s=[];for(let e=0;e<128;e++)s.push({s0:An(r),s1:An(i),s2:An(a),s3:An(o)}),{s0:r,s1:i,s2:a,s3:o}=kn(r,i,a,o);let c=Mn(t||1024);if(![1,2,4,8].includes(c))throw Error(`ghash: invalid window size, expected 2, 4 or 8`);this.W=c;let l=128/c,u=this.windowSize=2**c,d=[];for(let e=0;e<l;e++)for(let t=0;t<u;t++){let n=0,r=0,i=0,a=0;for(let o=0;o<c;o++){if(!(t>>>c-o-1&1))continue;let{s0:l,s1:u,s2:d,s3:f}=s[c*e+o];n^=l,r^=u,i^=d,a^=f}d.push({s0:n,s1:r,s2:i,s3:a})}this.t=d}_updateBlock(e,t,n,r){e^=this.s0,t^=this.s1,n^=this.s2,r^=this.s3;let{W:i,t:a,windowSize:o}=this,s=0,c=0,l=0,u=0,d=(1<<i)-1,f=0;for(let p of[e,t,n,r])for(let e=0;e<4;e++){let t=p>>>8*e&255;for(let e=8/i-1;e>=0;e--){let n=t>>>i*e&d,{s0:r,s1:p,s2:m,s3:h}=a[f*o+n];s^=r,c^=p,l^=m,u^=h,f+=1}}this.s0=s,this.s1=c,this.s2=l,this.s3=u}update(e){gn(this),e=Sn(e),hn(e);let t=vn(e),n=Math.floor(e.length/Tn),r=e.length%Tn;for(let e=0;e<n;e++)this._updateBlock(t[e*4+0],t[e*4+1],t[e*4+2],t[e*4+3]);return r&&(En.set(e.subarray(n*Tn)),this._updateBlock(Dn[0],Dn[1],Dn[2],Dn[3]),yn(Dn)),this}destroy(){let{t:e}=this;for(let t of e)t.s0=0,t.s1=0,t.s2=0,t.s3=0}digestInto(e){gn(this),_n(e,this),this.finished=!0;let{s0:t,s1:n,s2:r,s3:i}=this,a=vn(e);return a[0]=t,a[1]=n,a[2]=r,a[3]=i,e}digest(){let e=new Uint8Array(Tn);return this.digestInto(e),this.destroy(),e}},Pn=class extends Nn{constructor(e,t){e=Sn(e),hn(e);let n=jn(wn(e));super(n,t),yn(n)}update(e){e=Sn(e),gn(this);let t=vn(e),n=e.length%Tn,r=Math.floor(e.length/Tn);for(let e=0;e<r;e++)this._updateBlock(An(t[e*4+3]),An(t[e*4+2]),An(t[e*4+1]),An(t[e*4+0]));return n&&(En.set(e.subarray(r*Tn)),this._updateBlock(An(Dn[3]),An(Dn[2]),An(Dn[1]),An(Dn[0])),yn(Dn)),this}digestInto(e){gn(this),_n(e,this),this.finished=!0;let{s0:t,s1:n,s2:r,s3:i}=this,a=vn(e);return a[0]=t,a[1]=n,a[2]=r,a[3]=i,e.reverse()}};function Fn(e){let t=(t,n)=>e(n,t.length).update(Sn(t)).digest(),n=e(new Uint8Array(16),0);return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=(t,n)=>e(t,n),t}const In=Fn((e,t)=>new Nn(e,t)),Ln=Fn((e,t)=>new Pn(e,t));var Rn=Object.defineProperty,zn=(e,t)=>{for(var n in t)Rn(e,n,{get:t[n],enumerable:!0})},Bn={};zn(Bn,{EmptyArray:()=>qr,arrayToHex:()=>Rr,arrayToUtf8:()=>zr,calculateSharedKey:()=>Gr,comparePublicKeyHex:()=>Vr,compressPublicKeyHex:()=>Ir,doDecrypt:()=>Xr,doEncrypt:()=>Jr,doSignature:()=>Zr,doVerifySignature:()=>Qr,generateKeyPairHex:()=>Fr,getHash:()=>ei,getPoint:()=>ri,getPublicKeyFromPrivateKey:()=>ni,getZ:()=>$r,hexToArray:()=>L,initRNGPool:()=>ar,leftPad:()=>I,precomputePublicKey:()=>ti,utf8ToHex:()=>Lr,verifyPublicKey:()=>Br});var Vn=BigInt(0),Hn=BigInt(1),Un=BigInt(2);function Wn(e){let t=e.toString(16);if(t[0]!==`-`)t.length%2==1?t=`0`+t:t.match(/^[0-7]/)||(t=`00`+t);else{t=t.substring(1);let n=t.length;n%2==1?n+=1:t.match(/^[0-7]/)||(n+=2);let r=``;for(let e=0;e<n;e++)r+=`f`;t=((M(r)^e)+Hn).toString(16).replace(/^-/,``)}return t}var Gn=class{constructor(e=null,t=`00`,n=`00`,r=``){this.tlv=e,this.t=t,this.l=n,this.v=r}getEncodedHex(){return this.tlv||=(this.v=this.getValue(),this.l=this.getLength(),this.t+this.l+this.v),this.tlv}getLength(){let e=this.v.length/2,t=e.toString(16);return t.length%2==1&&(t=`0`+t),e<128?t:(128+t.length/2).toString(16)+t}getValue(){return``}},Kn=class extends Gn{constructor(e){super(),this.t=`02`,e&&(this.v=Wn(e))}getValue(){return this.v}},qn=class extends Gn{constructor(e){super(),this.s=e,this.t=`04`,e&&(this.v=e.toLowerCase())}hV=``;getValue(){return this.v}},Jn=class extends Gn{constructor(e){super(),this.asn1Array=e}t=`30`;getValue(){return this.v=this.asn1Array.map(e=>e.getEncodedHex()).join(``),this.v}};function Yn(e,t){if(+e[t+2]<8)return 1;let n=e.slice(t+2,t+6).slice(0,2);return(parseInt(n,16)-128)*2}function Xn(e,t){let n=Yn(e,t),r=e.substring(t+2,t+2+n*2);return r?+(+r[0]<8?M(r):M(r.substring(2))).toString():-1}function Zn(e,t){return t+(Yn(e,t)+1)*2}function Qn(e,t){return new Jn([new Kn(e),new Kn(t)]).getEncodedHex()}function $n(e,t,n,r){return new Jn([new Kn(e),new Kn(t),new qn(n),new qn(r)]).getEncodedHex()}function er(e){let t=Zn(e,0),n=Zn(e,t),r=Xn(e,t),i=e.substring(n,n+r*2),a=n+i.length,o=Zn(e,a),s=Xn(e,a),c=e.substring(o,o+s*2);return{r:M(i),s:M(c)}}function tr(e){function t(e,t){let n=Zn(e,t),r=Xn(e,t),i=e.substring(n,n+r*2);return{value:i,nextStart:n+i.length}}let{value:n,nextStart:r}=t(e,Zn(e,0)),{value:i,nextStart:a}=t(e,r),{value:o,nextStart:s}=t(e,a),{value:c}=t(e,s);return{x:M(n),y:M(i),hash:o,cipher:c}}var nr=16384,rr=new Uint8Array,ir;async function ar(){if(`crypto`in globalThis){ir=globalThis.crypto;return}if(!(rr.length>nr/2))if(`wx`in globalThis&&`getRandomValues`in globalThis.wx)rr=await new Promise(e=>{wx.getRandomValues({length:nr,success(t){e(new Uint8Array(t.randomValues))}})});else try{ir=globalThis.crypto?globalThis.crypto:(await Promise.resolve().then(()=>e.i(1)(require(`./__vite-browser-external-aYiy3g-2.cjs`)))).webcrypto;let t=new Uint8Array(nr);ir.getRandomValues(t),rr=t}catch{throw Error(`no available csprng, abort.`)}}ar();function or(e){if(rr.length>e){let t=rr.slice(0,e);return rr=rr.slice(e),ar(),t}else throw Error(`random number pool is not ready or insufficient, prevent getting too long random values or too often.`)}function sr(e=0){let t=new Uint8Array(e);return ir?ir.getRandomValues(t):or(e)}var cr=e=>e instanceof Uint8Array,lr=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);if(new Uint8Array(new Uint32Array([287454020]).buffer)[0]!==68)throw Error(`Non little-endian hardware is not supported`);var ur=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,`0`));function dr(e){if(!cr(e))throw Error(`Uint8Array expected`);let t=``;for(let n=0;n<e.length;n++)t+=ur[e[n]];return t}function fr(e){if(typeof e!=`string`)throw Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function pr(e){if(typeof e==`string`&&(e=fr(e)),!cr(e))throw Error(`expected Uint8Array, got ${typeof e}`);return e}var mr=class{clone(){return this._cloneInto()}};function hr(e){let t=t=>e().update(pr(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}var gr=(e,t,n)=>e&t|e&n|t&n,_r=(e,t,n)=>e^t^n,vr=(e,t,n)=>e&t|~e&n;function yr(e,t,n,r){if(typeof e.setBigUint64==`function`)return e.setBigUint64(t,n,r);let i=BigInt(32),a=BigInt(4294967295),o=Number(n>>i&a),s=Number(n&a),c=r?4:0,l=r?0:4;e.setUint32(t+c,o,r),e.setUint32(t+l,s,r)}function br(e,t){let n=t&31;return e<<n|e>>>32-n}function xr(e){return e^br(e,9)^br(e,17)}function Sr(e){return e^br(e,15)^br(e,23)}var Cr=class extends mr{constructor(e,t,n,r){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=lr(this.buffer)}buffer;view;finished=!1;length=0;pos=0;destroyed=!1;update(e){let{view:t,buffer:n,blockLen:r}=this;e=pr(e);let i=e.length;for(let a=0;a<i;){let o=Math.min(r-this.pos,i-a);if(o===r){let t=lr(e);for(;r<=i-a;a+=r)this.process(t,a);continue}n.set(e.subarray(a,a+o),this.pos),this.pos+=o,a+=o,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){this.finished=!0;let{buffer:t,view:n,blockLen:r,isLE:i}=this,{pos:a}=this;t[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>r-a&&(this.process(n,0),a=0);for(let e=a;e<r;e++)t[e]=0;yr(n,r-8,BigInt(this.length*8),i),this.process(n,0);let o=lr(e),s=this.outputLen;if(s%4)throw Error(`_sha2: outputLen should be aligned to 32bit`);let c=s/4,l=this.get();if(c>l.length)throw Error(`_sha2: outputLen bigger than state`);for(let e=0;e<c;e++)o.setUint32(4*e,l[e],i)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||=new this.constructor,e.set(...this.get());let{blockLen:t,buffer:n,length:r,finished:i,destroyed:a,pos:o}=this;return e.length=r,e.pos=o,e.finished=i,e.destroyed=a,r%t&&e.buffer.set(n),e}},wr=new Uint32Array([1937774191,1226093241,388252375,3666478592,2842636476,372324522,3817729613,2969243214]),Tr=new Uint32Array(68),Er=new Uint32Array(64),Dr=2043430169,Or=2055708042,kr=class extends Cr{A=wr[0]|0;B=wr[1]|0;C=wr[2]|0;D=wr[3]|0;E=wr[4]|0;F=wr[5]|0;G=wr[6]|0;H=wr[7]|0;constructor(){super(64,32,8,!1)}get(){let{A:e,B:t,C:n,D:r,E:i,F:a,G:o,H:s}=this;return[e,t,n,r,i,a,o,s]}set(e,t,n,r,i,a,o,s){this.A=e|0,this.B=t|0,this.C=n|0,this.D=r|0,this.E=i|0,this.F=a|0,this.G=o|0,this.H=s|0}process(e,t){for(let n=0;n<16;n++,t+=4)Tr[n]=e.getUint32(t,!1);for(let e=16;e<68;e++)Tr[e]=Sr(Tr[e-16]^Tr[e-9]^br(Tr[e-3],15))^br(Tr[e-13],7)^Tr[e-6];for(let e=0;e<64;e++)Er[e]=Tr[e]^Tr[e+4];let{A:n,B:r,C:i,D:a,E:o,F:s,G:c,H:l}=this;for(let e=0;e<64;e++){let t=e>=0&&e<=15,u=t?Dr:Or,d=br(br(n,12)+o+br(u,e),7),f=d^br(n,12),p=(t?_r(n,r,i):gr(n,r,i))+a+f+Er[e]|0,m=(t?_r(o,s,c):vr(o,s,c))+l+d+Tr[e]|0;a=i,i=br(r,9),r=n,n=p,l=c,c=br(s,19),s=o,o=xr(m)}n=n^this.A|0,r=r^this.B|0,i=i^this.C|0,a=a^this.D|0,o=o^this.E|0,s=s^this.F|0,c=c^this.G|0,l=l^this.H|0,this.set(n,r,i,a,o,s,c,l)}roundClean(){Tr.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}},Ar=hr(()=>new kr),jr=class extends mr{oHash;iHash;blockLen;outputLen;finished=!1;destroyed=!1;constructor(e,t){super();let n=pr(t);if(this.iHash=e.create(),typeof this.iHash.update!=`function`)throw Error(`Expected instance of class which extends utils.Hash`);this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let r=this.blockLen,i=new Uint8Array(r);i.set(n.length>r?e.create().update(n).digest():n);for(let e=0;e<i.length;e++)i[e]^=54;this.iHash.update(i),this.oHash=e.create();for(let e=0;e<i.length;e++)i[e]^=106;this.oHash.update(i),i.fill(0)}update(e){return this.iHash.update(e),this}digestInto(e){this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||=Object.create(Object.getPrototypeOf(this),{});let{oHash:t,iHash:n,finished:r,destroyed:i,blockLen:a,outputLen:o}=this;return e=e,e.finished=r,e.destroyed=i,e.blockLen=a,e.outputLen=o,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}},Mr=(e,t,n)=>new jr(e,t).update(n).digest();Mr.create=(e,t)=>new jr(e,t);var Nr=wt(BigInt(`115792089210356248756420345214020892766250353991924191454421193933289684991999`)),F=pn({a:BigInt(`115792089210356248756420345214020892766250353991924191454421193933289684991996`),b:BigInt(`18505919022281880113072981827955639221458448578012075254857346196103069175443`),Fp:Nr,h:Hn,n:BigInt(`115792089210356248756420345214020892766061623724957744567843809356293439045923`),Gx:BigInt(`22963146547237050559479531362550074578802567295341616970375194840604139615431`),Gy:BigInt(`85132369209828568825618990617112496413088388631904505083283536607588877201568`),hash:Ar,hmac:(e,...t)=>Mr(Ar,e,A(...t)),randomBytes:sr}),Pr=wt(BigInt(F.CURVE.n));function Fr(e){let t=e?Ie(ut(BigInt(e),Hn)+Hn,32):F.utils.randomPrivateKey(),n=F.getPublicKey(t,!1);return{privateKey:I(De(t),64),publicKey:I(De(n),64)}}function Ir(e){if(e.length!==130)throw Error(`Invalid public key to compress`);let t=(e.length-2)/2,n=e.substring(2,2+t),r=M(e.substring(t+2,t+t+2)),i=`03`;return ut(r,Un)===Vn&&(i=`02`),i+n}function Lr(e){return De(Me(e))}function I(e,t){return e.length>=t?e:Array(t-e.length+1).join(`0`)+e}function Rr(e){return e.map(e=>{let t=e.toString(16);return t.length===1?`0`+t:t}).join(``)}function zr(e){let t=[];for(let n=0,r=e.length;n<r;n++)e[n]>=240&&e[n]<=247?(t.push(String.fromCodePoint(((e[n]&7)<<18)+((e[n+1]&63)<<12)+((e[n+2]&63)<<6)+(e[n+3]&63))),n+=3):e[n]>=224&&e[n]<=239?(t.push(String.fromCodePoint(((e[n]&15)<<12)+((e[n+1]&63)<<6)+(e[n+2]&63))),n+=2):e[n]>=192&&e[n]<=223?(t.push(String.fromCodePoint(((e[n]&31)<<6)+(e[n+1]&63))),n++):t.push(String.fromCodePoint(e[n]));return t.join(``)}function L(e){let t=e.length;t%2!=0&&(e=I(e,t+1)),t=e.length;let n=t/2,r=new Uint8Array(n);for(let t=0;t<n;t++)r[t]=parseInt(e.substring(t*2,t*2+2),16);return r}function Br(e){let t=F.ProjectivePoint.fromHex(e);if(!t)return!1;try{return t.assertValidity(),!0}catch{return!1}}function Vr(e,t){let n=F.ProjectivePoint.fromHex(e);if(!n)return!1;let r=F.ProjectivePoint.fromHex(t);return r?n.equals(r):!1}var Hr=M(`80000000000000000000000000000000`),Ur=M(`7fffffffffffffffffffffffffffffff`);function Wr(e,t){let n=new Uint8Array(t),r=1,i=0,a=qr,o=new Uint8Array(4),s=()=>{o[0]=r>>24&255,o[1]=r>>16&255,o[2]=r>>8&255,o[3]=r&255,a=Ar(A(e,o)),r++,i=0};s();for(let e=0,t=n.length;e<t;e++)i===a.length&&s(),n[e]=a[i++]&255;return n}function Gr(e,t,n,r,i,a=!1,o=`1234567812345678`,s=`1234567812345678`){let c=F.ProjectivePoint.fromHex(t.publicKey),l=F.ProjectivePoint.fromHex(r),u=F.ProjectivePoint.fromHex(n),d=$r(e.publicKey,o),f=$r(n,s);a&&([d,f]=[f,d]);let p=M(t.privateKey),m=M(e.privateKey),h=Hr+(c.x&Ur),g=Pr.add(m,Pr.mulN(h,p)),_=l.x,v=Pr.add(Hr,_&Ur),y=l.multiply(v).add(u).multiply(g);return Wr(A(L(I(j(y.x),64)),L(I(j(y.y),64)),d,f),i)}var Kr=0,qr=new Uint8Array;function Jr(e,t,n=1,r){let i=typeof e==`string`?L(Lr(e)):Uint8Array.from(e),a=typeof t==`string`?F.ProjectivePoint.fromHex(t):t,o=Fr(),s=M(o.privateKey),c=o.publicKey;c.length>128&&(c=c.substring(c.length-128));let l=a.multiply(s),u=L(I(j(l.x),64)),d=L(I(j(l.y),64)),f=dr(Ar(A(u,i,d)));Yr(u,d,i);let p=dr(i);if(r?.asn1){let e=F.ProjectivePoint.fromHex(o.publicKey);return n===Kr?$n(e.x,e.y,p,f):$n(e.x,e.y,f,p)}return n===Kr?c+p+f:c+f+p}function Yr(e,t,n){let r=1,i=0,a=qr,o=new Uint8Array(4),s=()=>{o[0]=r>>24&255,o[1]=r>>16&255,o[2]=r>>8&255,o[3]=r&255,a=Ar(A(e,t,o)),r++,i=0};s();for(let e=0,t=n.length;e<t;e++)i===a.length&&s(),n[e]^=a[i++]&255}function Xr(e,t,n=1,{output:r=`string`,asn1:i=!1}={}){let a=M(t),o,s,c;if(i){let{x:t,y:r,cipher:i,hash:a}=tr(e);o=F.ProjectivePoint.fromAffine({x:t,y:r}),c=a,s=i,n===Kr&&([s,c]=[c,s])}else o=F.ProjectivePoint.fromHex(`04`+e.substring(0,128)),c=e.substring(128,192),s=e.substring(192),n===Kr&&(c=e.substring(e.length-64),s=e.substring(128,e.length-64));let l=L(s),u=o.multiply(a),d=L(I(j(u.x),64)),f=L(I(j(u.y),64));return Yr(d,f,l),Rr(Array.from(Ar(A(d,l,f))))===c.toLowerCase()?r===`array`?l:zr(l):r===`array`?[]:``}function Zr(e,t,n={}){let{pointPool:r,der:i,hash:a,publicKey:o,userId:s}=n,c=typeof e==`string`?Lr(e):Rr(Array.from(e));a&&(o||=ni(t),c=ei(c,o,s));let l=M(t),u=M(c),d=null,f=null,p=null;do{do{let e;e=r&&r.length?r.pop():ri(),d=e.k,f=Pr.add(u,e.x1)}while(f===Vn||f+d===F.CURVE.n);p=Pr.mul(Pr.inv(Pr.addN(l,Hn)),Pr.subN(d,Pr.mulN(f,l)))}while(p===Vn);return i?Qn(f,p):I(j(f),64)+I(j(p),64)}function Qr(e,t,n,r={}){let i,{hash:a,der:o,userId:s}=r,c=typeof n==`string`?n:n.toHex(!1);i=a?ei(typeof e==`string`?Lr(e):e,c,s):typeof e==`string`?Lr(e):Rr(Array.from(e));let l,u;if(o){let e=er(t);l=e.r,u=e.s}else l=M(t.substring(0,64)),u=M(t.substring(64));let d=typeof n==`string`?F.ProjectivePoint.fromHex(n):n,f=M(i),p=Pr.add(l,u);if(p===Vn)return!1;let m=F.ProjectivePoint.BASE.multiply(u).add(d.multiply(p)),h=Pr.add(f,m.x);return l===h}function $r(e,t=`1234567812345678`){t=Lr(t);let n=I(j(F.CURVE.a),64),r=I(j(F.CURVE.b),64),i=I(j(F.ProjectivePoint.BASE.x),64),a=I(j(F.ProjectivePoint.BASE.y),64),o,s;if(e.length===128)o=e.substring(0,64),s=e.substring(64,128);else{let t=F.ProjectivePoint.fromHex(e);o=I(j(t.x),64),s=I(j(t.y),64)}let c=L(t+n+r+i+a+o+s),l=t.length*4;return Ar(A(new Uint8Array([l>>8&255,l&255]),c))}function ei(e,t,n=`1234567812345678`){return dr(Ar(A($r(t,n),typeof e==`string`?L(e):e)))}function ti(e,t){let n=F.ProjectivePoint.fromHex(e);return F.utils.precompute(t,n)}function ni(e){return I(De(F.getPublicKey(e,!1)),64)}function ri(){let e=Fr(),t=F.ProjectivePoint.fromHex(e.publicKey),n=M(e.privateKey);return{...e,k:n,x1:t.x}}function ii(e){let t=[];for(let n=0,r=e.length;n<r;n++){let r=e.codePointAt(n);if(r<=127)t.push(r);else if(r<=2047)t.push(192|r>>>6),t.push(128|r&63);else if(r<=55295||r>=57344&&r<=65535)t.push(224|r>>>12),t.push(128|r>>>6&63),t.push(128|r&63);else if(r>=65536&&r<=1114111)n++,t.push(240|r>>>18&28),t.push(128|r>>>12&63),t.push(128|r>>>6&63),t.push(128|r&63);else throw t.push(r),Error(`input is not supported`)}return new Uint8Array(t)}function ai(e,t){if(e=typeof e==`string`?ii(e):e,t){if((t.mode||`hmac`)!==`hmac`)throw Error(`invalid mode`);let n=t.key;if(!n)throw Error(`invalid key`);return n=typeof n==`string`?L(n):n,dr(Mr(Ar,n,e))}return dr(Ar(e))}var oi={};zn(oi,{decrypt:()=>yi,encrypt:()=>vi,sm4:()=>_i});var R=0,si=32,ci=16,li=Uint8Array.from([214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72]),ui=new Uint32Array([462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257]);function di(e){return(li[e>>>24&255]&255)<<24|(li[e>>>16&255]&255)<<16|(li[e>>>8&255]&255)<<8|li[e&255]&255}new Uint32Array(4),new Uint32Array(4);function fi(e,t,n){let r=0,i=0,a=0,o=0,s=0,c=0,l=0,u=0;s=e[0]&255,c=e[1]&255,l=e[2]&255,u=e[3]&255,r=s<<24|c<<16|l<<8|u,s=e[4]&255,c=e[5]&255,l=e[6]&255,u=e[7]&255,i=s<<24|c<<16|l<<8|u,s=e[8]&255,c=e[9]&255,l=e[10]&255,u=e[11]&255,a=s<<24|c<<16|l<<8|u,s=e[12]&255,c=e[13]&255,l=e[14]&255,u=e[15]&255,o=s<<24|c<<16|l<<8|u;for(let e=0;e<32;e+=4)s=i^a^o^n[e],s=di(s),r^=s^(s<<2|s>>>30)^(s<<10|s>>>22)^(s<<18|s>>>14)^(s<<24|s>>>8),c=a^o^r^n[e+1],c=di(c),i^=c^(c<<2|c>>>30)^(c<<10|c>>>22)^(c<<18|c>>>14)^(c<<24|c>>>8),l=o^r^i^n[e+2],l=di(l),a^=l^(l<<2|l>>>30)^(l<<10|l>>>22)^(l<<18|l>>>14)^(l<<24|l>>>8),u=r^i^a^n[e+3],u=di(u),o^=u^(u<<2|u>>>30)^(u<<10|u>>>22)^(u<<18|u>>>14)^(u<<24|u>>>8);t[0]=o>>>24&255,t[1]=o>>>16&255,t[2]=o>>>8&255,t[3]=o&255,t[4]=a>>>24&255,t[5]=a>>>16&255,t[6]=a>>>8&255,t[7]=a&255,t[8]=i>>>24&255,t[9]=i>>>16&255,t[10]=i>>>8&255,t[11]=i&255,t[12]=r>>>24&255,t[13]=r>>>16&255,t[14]=r>>>8&255,t[15]=r&255}function pi(e,t,n){let r=0,i=0,a=0,o=0,s=0;r=(e[0]&255)<<24|(e[1]&255)<<16|(e[2]&255)<<8|e[3]&255,i=(e[4]&255)<<24|(e[5]&255)<<16|(e[6]&255)<<8|e[7]&255,a=(e[8]&255)<<24|(e[9]&255)<<16|(e[10]&255)<<8|e[11]&255,o=(e[12]&255)<<24|(e[13]&255)<<16|(e[14]&255)<<8|e[15]&255,r^=2746333894,i^=1453994832,a^=1736282519,o^=2993693404;for(let e=0;e<32;e+=4)s=i^a^o^ui[e+0],s=di(s),r^=s^(s<<13|s>>>19)^(s<<23|s>>>9),t[e+0]=r,s=a^o^r^ui[e+1],s=di(s),i^=s^(s<<13|s>>>19)^(s<<23|s>>>9),t[e+1]=i,s=o^r^i^ui[e+2],s=di(s),a^=s^(s<<13|s>>>19)^(s<<23|s>>>9),t[e+2]=a,s=r^i^a^ui[e+3],s=di(s),o^=s^(s<<13|s>>>19)^(s<<23|s>>>9),t[e+3]=o;if(n===R)for(let e=0;e<16;e++)[t[e],t[31-e]]=[t[31-e],t[e]]}function mi(e){for(let t=e.length-1;t>=0&&(e[t]++,e[t]===0);t--);}function hi(e,t,n,r,i,a){function o(){let e=new Uint32Array(si);pi(t,e,1);let r=new Uint8Array(16).fill(0),i=new Uint8Array(16);fi(r,i,e);let a;if(n.length===12)a=new Uint8Array(16),a.set(n,0),a[15]=1;else{let e=In.create(i);e.update(n);let t=new Uint8Array(16);Cn(bn(t),8,BigInt(n.length*8),!1),e.update(t),a=e.digest()}let o=new Uint8Array(a);mi(o);let s=new Uint8Array(16);return fi(a,s,e),{roundKey:e,h:i,j0:a,counter:o,tagMask:s}}function s(e,t){let n=r.length,i=t.length,a=In.create(e);n>0&&a.update(r),a.update(t);let o=new Uint8Array(16),s=bn(o);return Cn(s,0,BigInt(n*8),!1),Cn(s,8,BigInt(i*8),!1),a.update(o),a.digest()}let{roundKey:c,h:l,j0:u,counter:d,tagMask:f}=o();if(i===R&&a){let t=s(l,e);for(let e=0;e<16;e++)t[e]^=f[e];let n=0;for(let e=0;e<16;e++)n|=t[e]^a[e];if(n!==0)throw Error(`authentication tag mismatch`)}let p=new Uint8Array(e.length),m=0,h=e.length;for(;h>=ci;){let t=new Uint8Array(ci);fi(d,t,c);for(let n=0;n<ci&&n<h;n++)p[m+n]=e[m+n]^t[n];mi(d),m+=ci,h-=ci}if(h>0){let t=new Uint8Array(ci);fi(d,t,c);for(let n=0;n<h;n++)p[m+n]=e[m+n]^t[n]}if(i!==R){let e=s(l,p);for(let t=0;t<16;t++)e[t]^=f[t];return{output:p,tag:e}}return{output:p}}var gi=new Uint8Array(16);function _i(e,t,n,r={}){let{padding:i=`pkcs#7`,mode:a,iv:o=new Uint8Array(16),output:s,associatedData:c,outputTag:l,tag:u}=r;if(a===`gcm`){let r=typeof t==`string`?L(t):Uint8Array.from(t),i=typeof o==`string`?L(o):Uint8Array.from(o),a=c?typeof c==`string`?L(c):Uint8Array.from(c):new Uint8Array,d;d=typeof e==`string`?n===R?L(e):ii(e):Uint8Array.from(e);let f=u?typeof u==`string`?L(u):Uint8Array.from(u):void 0,p=hi(d,r,i,a,n,f);return s===`array`?l&&n!==R?p:p.output:l&&n!==R||n!==R?{output:dr(p.output),tag:p.tag?dr(p.tag):void 0}:zr(p.output)}if(a===`cbc`&&(typeof o==`string`&&(o=L(o)),o.length!==128/8))throw Error(`iv is invalid`);if(typeof t==`string`&&(t=L(t)),t.length!==128/8)throw Error(`key is invalid`);if(e=typeof e==`string`?n===R?L(e):ii(e):Uint8Array.from(e),(i===`pkcs#5`||i===`pkcs#7`)&&n!==R){let t=ci-e.length%ci,n=new Uint8Array(e.length+t);n.set(e,0);for(let r=0;r<t;r++)n[e.length+r]=t;e=n}let d=new Uint32Array(si);pi(t,d,n);let f=new Uint8Array(e.length),p=o,m=e.length,h=0;for(;m>=ci;){let t=e.subarray(h,h+16);if(a===`cbc`)for(let e=0;e<ci;e++)n!==R&&(t[e]^=p[e]);fi(t,gi,d);for(let e=0;e<ci;e++)a===`cbc`&&n===R&&(gi[e]^=p[e]),f[h+e]=gi[e];a===`cbc`&&(p=n===R?t:gi),m-=ci,h+=ci}if((i===`pkcs#5`||i===`pkcs#7`)&&n===R){let e=f.length,t=f[e-1];for(let n=1;n<=t;n++)if(f[e-n]!==t)throw Error(`padding is invalid`);f=f.slice(0,e-t)}return s===`array`?f:n===R?zr(f):dr(f)}function vi(e,t,n={}){return _i(e,t,1,n)}function yi(e,t,n={}){return _i(e,t,0,n)}function bi(){return Bn}function xi(e,t){return ai(e,t)}function Si(e,t,n){return oi.encrypt(e,t,n)}function Ci(e,t,n){return oi.encrypt(e,t,n)}function wi(e,t){return e&&/^\d+$/.test(e)&&String(e).length<=10&&(e=parseInt(`${e}000`)),t?(0,r.default)(e,t):(0,r.default)(e)}function Ti(e,t){return e?(r.default.isDayjs(e)||(e=wi(e)),e.format(t||`YYYY-MM-DD HH:mm`)):``}function Ei(e){return e?(r.default.isDayjs(e)||(e=wi(e)),e.unix()):``}const Di={STATE_CODE_SUCCESS:`SUCCESS`,STATE_CODE_FAIL:`FAIL`,STATE_CODE_NOT_FOUND:`NOT_FOUND`,STATE_CODE_INFO_NOT_COMPLETE:`INCOMPLETE`,STATE_CODE_NOT_ALLOWED:`NOT_ALLOWED`};function Oi(e){Object.keys(e).forEach(t=>{Di[t]=e[t]})}function ki(e){return e||={},e.loading=!0,{get(t,n){return new Promise((r,i)=>{a.default.get(t,n).then(e=>{r(e)}).catch(e=>{i(e)}).finally(()=>{e.loading=!1})})},post(t,n,r){return new Promise((i,o)=>{a.default.post(t,n,r).then(e=>{i(e)}).catch(e=>{o(e)}).finally(()=>{e.loading=!1})})}}}async function Ai(e,t,n){if(e.finishedText=e.finishedText||`加载完毕`,e.loading=!0,!e.uri)return console.error(`URI is required in pagination`),e;let r={};try{r=await a.default.get(e.uri,{params:{...e.params,page:t||!e.page?1:e.page+1}})}catch(t){return console.error(t),e.loading=!1,e.finished=!1,e.error=!0,e}if(r.status!==Di.STATE_CODE_SUCCESS)return e.loading=!1,e.error=!0,e.errorText=r.result,e;let i;i=n?n(r):r.result;let o=i.data;!t&&e.items&&(o=e.items.concat(o));let s=i.current_page||i.current||i.page||1,c=i.last_page||i.lastPage||i.pages||0,l=i.total_size||i.totalSize||i.total||0;return e.loading=!1,e.error=!1,e.page=s,e.items=o,e.finished=c===0||c===s,e.empty=l===0,e}var{STATE_CODE_FAIL:ji,STATE_CODE_INFO_NOT_COMPLETE:Mi,STATE_CODE_NOT_FOUND:Ni,STATE_CODE_NOT_ALLOWED:Pi,STATE_CODE_SUCCESS:Fi}=Di;function Ii(e){let{url:t,csrfToken:n}=e,{method:r,data:i}=e;r||=`post`,i||={};let a=document.createElement(`form`);if(a.action=t,a.method=r,a.target=`_blank`,a.style.display=`none`,Object.keys(i).forEach(e=>{let t=document.createElement(`input`);t.type=`hidden`,t.name=e,t.value=i[e],a.appendChild(t)}),!n){let e=document.createElement(`input`);e.type=`hidden`,e.name=`_token`,e.value=document.querySelector(`meta[name="csrf-token"]`)?.getAttribute(`content`),a.appendChild(e)}return document.body.appendChild(a),a}function Li(e,t){let{status:r}=e,a=e.result,o={};o.default=`请求失败, 请检查数据并重试`,o[ji]=`系统错误,请稍候再试`,o[Ni]=`请求的内容不存在`,o[Mi]=`信息不完整`,o[Pi]=`没有权限`;let s={[Fi]:`success`},c=t[r]||t[s[r]]||o[r]||o.def;(0,i.isString)(c)?r===Fi?n.message.success(c):n.message.error(a||c):(0,i.isFunction)(c)&&c()}function Ri(e,t){Li(e,{success:t})}function zi(e){e&&e.errorFields?e.errorFields.forEach(e=>{n.message.error(e.errors.join(` `))}):e&&e.response||n.message.error(`请检查填写项`)}const Bi={commonLabelCol:{span:8,xxl:6},commonWrapperCol:{span:12,xxl:14},commonWrapperOffset:{xs:{offset:8,span:12},xxl:{offset:6,span:14}},commonLabelFullCol:{span:8,xxl:6},commonWrapperFullCol:{span:16,xxl:18},commonWrapperFullOffset:{xs:{offset:8,span:16},xxl:{offset:6,span:18}},commonLabelPartCol:{span:4,xxl:3},commonWrapperPartCol:{span:20,xxl:21},commonWrapperPartOffset:{xs:{offset:4,span:20},xxl:{offset:3,span:21}}};function Vi(e,t){let n=(0,i.cloneDeep)(e);t||={};let a=e=>{for(let n in e){let o;if(r.default.isDayjs(e[n])?o=e[n]:Object.prototype.toString.call(e[n])===`[object Date]`&&(o=(0,r.default)(e[n])),o&&t.date){(0,i.isString)(t.date)?e[n]=o.format(t.date):(0,i.isFunction)(t.date)?e[n]=t.date(o):e[n]=e[n].unix();continue}if((0,i.isBoolean)(e[n])&&t.boolean){t.boolean===!0?e[n]=e[n]?1:0:Array.isArray(t.boolean)&&(e[n]=e[n]?t.boolean?.[0]||1:t.boolean?.[1]||0);continue}if(t.attachment){let r=t.attachment;if((0,i.isObject)(e[n])&&e[n]._type===`file`&&(0,i.isString)(r)&&!(0,i.isUndefined)(e[n][r])){e[n]=e[n][r];continue}else if((0,i.isObject)(e[n])&&e[n]._type===`file`&&(0,i.isFunction)(r)){e[n]=r(e[n]);continue}}(0,i.isArray)(e[n])&&(e[n]=a(e[n]))}return e};return a(n)}function Hi(e,t){typeof console<`u`&&(console.warn(`[intlify] `+e),t&&console.warn(t.stack))}var Ui={};function Wi(e){Ui[e]||(Ui[e]=!0,Hi(e))}var Gi=typeof window<`u`,Ki,qi;if(process.env.NODE_ENV!==`production`){let e=Gi&&window.performance;e&&e.mark&&e.measure&&e.clearMarks&&e.clearMeasures&&(Ki=t=>{e.mark(t)},qi=(t,n,r)=>{e.measure(t,n,r),e.clearMarks(n),e.clearMarks(r)})}var Ji=/\{([0-9a-zA-Z]+)\}/g;function Yi(e,...t){return t.length===1&&K(t[0])&&(t=t[0]),(!t||!t.hasOwnProperty)&&(t={}),e.replace(Ji,(e,n)=>t.hasOwnProperty(n)?t[n]:``)}var Xi=(e,t=!1)=>t?Symbol.for(e):Symbol(e),Zi=(e,t,n)=>Qi({l:e,k:t,s:n}),Qi=e=>JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`).replace(/\u0027/g,`\\u0027`),z=e=>typeof e==`number`&&isFinite(e),$i=e=>fa(e)===`[object Date]`,ea=e=>fa(e)===`[object RegExp]`,ta=e=>q(e)&&Object.keys(e).length===0,B=Object.assign,na=Object.create,V=(e=null)=>na(e),ra,ia=()=>ra||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:V();function aa(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&apos;`).replace(/\//g,`&#x2F;`).replace(/=/g,`&#x3D;`)}function oa(e){return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,`&amp;`).replace(/"/g,`&quot;`).replace(/'/g,`&apos;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}function sa(e){return e=e.replace(/(\w+)\s*=\s*"([^"]*)"/g,(e,t,n)=>`${t}="${oa(n)}"`),e=e.replace(/(\w+)\s*=\s*'([^']*)'/g,(e,t,n)=>`${t}='${oa(n)}'`),/\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e)&&(process.env.NODE_ENV!==`production`&&Hi(`Potentially dangerous event handlers detected in translation. Consider removing onclick, onerror, etc. from your translation messages.`),e=e.replace(/(\s+)(on)(\w+\s*=)/gi,`$1&#111;n$3`)),[/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi].forEach(t=>{e=e.replace(t,`$1javascript&#58;`)}),e}var ca=Object.prototype.hasOwnProperty;function la(e,t){return ca.call(e,t)}var H=Array.isArray,U=e=>typeof e==`function`,W=e=>typeof e==`string`,G=e=>typeof e==`boolean`,K=e=>typeof e==`object`&&!!e,ua=e=>K(e)&&U(e.then)&&U(e.catch),da=Object.prototype.toString,fa=e=>da.call(e),q=e=>fa(e)===`[object Object]`,pa=e=>e==null?``:H(e)||q(e)&&e.toString===da?JSON.stringify(e,null,2):String(e);function ma(e,t=``){return e.reduce((e,n,r)=>r===0?e+n:e+t+n,``)}var ha=2;function ga(e,t=0,n=e.length){let r=e.split(/\r?\n/),i=0,a=[];for(let e=0;e<r.length;e++)if(i+=r[e].length+1,i>=t){for(let o=e-ha;o<=e+ha||n>i;o++){if(o<0||o>=r.length)continue;let s=o+1;a.push(`${s}${` `.repeat(3-String(s).length)}| ${r[o]}`);let c=r[o].length;if(o===e){let e=t-(i-c)+1,r=Math.max(1,n>i?c-e:n-t);a.push(` | `+` `.repeat(e)+`^`.repeat(r))}else if(o>e){if(n>i){let e=Math.max(Math.min(n-i,c),1);a.push(` | `+`^`.repeat(e))}i+=c+1}}break}return a.join(`
2
2
  `)}function _a(){let e=new Map;return{events:e,on(t,n){let r=e.get(t);r&&r.push(n)||e.set(t,[n])},off(t,n){let r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},emit(t,n){(e.get(t)||[]).slice().map(e=>e(n)),(e.get(`*`)||[]).slice().map(e=>e(t,n))}}}var va=e=>!K(e)||H(e);function ya(e,t){if(va(e)||va(t))throw Error(`Invalid value`);let n=[{src:e,des:t}];for(;n.length;){let{src:e,des:t}=n.pop();Object.keys(e).forEach(r=>{r!==`__proto__`&&(K(e[r])&&!K(t[r])&&(t[r]=Array.isArray(e[r])?[]:V()),va(t[r])||va(e[r])?t[r]=e[r]:n.push({src:e[r],des:t[r]}))})}}function ba(e,t,n){return{line:e,column:t,offset:n}}function xa(e,t,n){let r={start:e,end:t};return n!=null&&(r.source=n),r}var J={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16},Sa=17,Ca={[J.EXPECTED_TOKEN]:`Expected token: '{0}'`,[J.INVALID_TOKEN_IN_PLACEHOLDER]:`Invalid token in placeholder: '{0}'`,[J.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:`Unterminated single quote in placeholder`,[J.UNKNOWN_ESCAPE_SEQUENCE]:`Unknown escape sequence: \\{0}`,[J.INVALID_UNICODE_ESCAPE_SEQUENCE]:`Invalid unicode escape sequence: {0}`,[J.UNBALANCED_CLOSING_BRACE]:`Unbalanced closing brace`,[J.UNTERMINATED_CLOSING_BRACE]:`Unterminated closing brace`,[J.EMPTY_PLACEHOLDER]:`Empty placeholder`,[J.NOT_ALLOW_NEST_PLACEHOLDER]:`Not allowed nest placeholder`,[J.INVALID_LINKED_FORMAT]:`Invalid linked format`,[J.MUST_HAVE_MESSAGES_IN_PLURAL]:`Plural must have messages`,[J.UNEXPECTED_EMPTY_LINKED_MODIFIER]:`Unexpected empty linked modifier`,[J.UNEXPECTED_EMPTY_LINKED_KEY]:`Unexpected empty linked key`,[J.UNEXPECTED_LEXICAL_ANALYSIS]:`Unexpected lexical analysis in token: '{0}'`,[J.UNHANDLED_CODEGEN_NODE_TYPE]:`unhandled codegen node type: '{0}'`,[J.UNHANDLED_MINIFIER_NODE_TYPE]:`unhandled mimifier node type: '{0}'`};function wa(e,t,n={}){let{domain:r,messages:i,args:a}=n,o=process.env.NODE_ENV===`production`?e:Yi((i||Ca)[e]||``,...a||[]),s=SyntaxError(String(o));return s.code=e,t&&(s.location=t),s.domain=r,s}function Ta(e){throw e}var Ea=/<\/?[\w\s="/.':;#-\/]+>/,Da=e=>Ea.test(e),Oa=` `,ka=`\r`,Y=`
3
3
  `,Aa=`\u2028`,ja=`\u2029`;function Ma(e){let t=e,n=0,r=1,i=1,a=0,o=e=>t[e]===ka&&t[e+1]===Y,s=e=>t[e]===Y,c=e=>t[e]===ja,l=e=>t[e]===Aa,u=e=>o(e)||s(e)||c(e)||l(e),d=()=>n,f=()=>r,p=()=>i,m=()=>a,h=e=>o(e)||c(e)||l(e)?Y:t[e],g=()=>h(n),_=()=>h(n+a);function v(){return a=0,u(n)&&(r++,i=0),o(n)&&n++,n++,i++,t[n]}function y(){return o(n+a)&&a++,a++,t[n+a]}function b(){n=0,r=1,i=1,a=0}function x(e=0){a=e}function S(){let e=n+a;for(;e!==n;)v();a=0}return{index:d,line:f,column:p,peekOffset:m,charAt:h,currentChar:g,currentPeek:_,next:v,peek:y,reset:b,resetPeek:x,skipToPeek:S}}var Na=void 0,Pa=`.`,Fa=`'`,Ia=`tokenizer`;function La(e,t={}){let n=t.location!==!1,r=Ma(e),i=()=>r.index(),a=()=>ba(r.line(),r.column(),r.index()),o=a(),s=i(),c={currentType:13,offset:s,startLoc:o,endLoc:o,lastType:13,lastOffset:s,lastStartLoc:o,lastEndLoc:o,braceNest:0,inLinked:!1,text:``},l=()=>c,{onError:u}=t;function d(e,t,r,...i){let a=l();t.column+=r,t.offset+=r,u&&u(wa(e,n?xa(a.startLoc,t):null,{domain:Ia,args:i}))}function f(e,t,r){e.endLoc=a(),e.currentType=t;let i={type:t};return n&&(i.loc=xa(e.startLoc,e.endLoc)),r!=null&&(i.value=r),i}let p=e=>f(e,13);function m(e,t){return e.currentChar()===t?(e.next(),t):(d(J.EXPECTED_TOKEN,a(),0,t),``)}function h(e){let t=``;for(;e.currentPeek()===Oa||e.currentPeek()===Y;)t+=e.currentPeek(),e.peek();return t}function g(e){let t=h(e);return e.skipToPeek(),t}function _(e){if(e===Na)return!1;let t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t===95}function v(e){if(e===Na)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57}function y(e,t){let{currentType:n}=t;if(n!==2)return!1;h(e);let r=_(e.currentPeek());return e.resetPeek(),r}function b(e,t){let{currentType:n}=t;if(n!==2)return!1;h(e);let r=v(e.currentPeek()===`-`?e.peek():e.currentPeek());return e.resetPeek(),r}function x(e,t){let{currentType:n}=t;if(n!==2)return!1;h(e);let r=e.currentPeek()===Fa;return e.resetPeek(),r}function S(e,t){let{currentType:n}=t;if(n!==7)return!1;h(e);let r=e.currentPeek()===`.`;return e.resetPeek(),r}function C(e,t){let{currentType:n}=t;if(n!==8)return!1;h(e);let r=_(e.currentPeek());return e.resetPeek(),r}function w(e,t){let{currentType:n}=t;if(!(n===7||n===11))return!1;h(e);let r=e.currentPeek()===`:`;return e.resetPeek(),r}function T(e,t){let{currentType:n}=t;if(n!==9)return!1;let r=()=>{let t=e.currentPeek();return t===`{`?_(e.peek()):t===`@`||t===`|`||t===`:`||t===`.`||t===Oa||!t?!1:t===Y?(e.peek(),r()):D(e,!1)},i=r();return e.resetPeek(),i}function E(e){h(e);let t=e.currentPeek()===`|`;return e.resetPeek(),t}function D(e,t=!0){let n=(t=!1,r=``)=>{let i=e.currentPeek();return i===`{`||i===`@`||!i?t:i===`|`?!(r===Oa||r===Y):i===Oa?(e.peek(),n(!0,Oa)):i===Y?(e.peek(),n(!0,Y)):!0},r=n();return t&&e.resetPeek(),r}function O(e,t){let n=e.currentChar();return n===Na?Na:t(n)?(e.next(),n):null}function ee(e){let t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||t===95||t===36}function te(e){return O(e,ee)}function ne(e){let t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||t===95||t===36||t===45}function re(e){return O(e,ne)}function ie(e){let t=e.charCodeAt(0);return t>=48&&t<=57}function ae(e){return O(e,ie)}function oe(e){let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function se(e){return O(e,oe)}function k(e){let t=``,n=``;for(;t=ae(e);)n+=t;return n}function ce(e){let t=``;for(;;){let n=e.currentChar();if(n===`{`||n===`}`||n===`@`||n===`|`||!n)break;if(n===Oa||n===Y)if(D(e))t+=n,e.next();else if(E(e))break;else t+=n,e.next();else t+=n,e.next()}return t}function le(e){g(e);let t=``,n=``;for(;t=re(e);)n+=t;return e.currentChar()===Na&&d(J.UNTERMINATED_CLOSING_BRACE,a(),0),n}function ue(e){g(e);let t=``;return e.currentChar()===`-`?(e.next(),t+=`-${k(e)}`):t+=k(e),e.currentChar()===Na&&d(J.UNTERMINATED_CLOSING_BRACE,a(),0),t}function de(e){return e!==Fa&&e!==Y}function fe(e){g(e),m(e,`'`);let t=``,n=``;for(;t=O(e,de);)t===`\\`?n+=pe(e):n+=t;let r=e.currentChar();return r===Y||r===Na?(d(J.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,a(),0),r===Y&&(e.next(),m(e,`'`)),n):(m(e,`'`),n)}function pe(e){let t=e.currentChar();switch(t){case`\\`:case`'`:return e.next(),`\\${t}`;case`u`:return me(e,t,4);case`U`:return me(e,t,6);default:return d(J.UNKNOWN_ESCAPE_SEQUENCE,a(),0,t),``}}function me(e,t,n){m(e,t);let r=``;for(let i=0;i<n;i++){let n=se(e);if(!n){d(J.INVALID_UNICODE_ESCAPE_SEQUENCE,a(),0,`\\${t}${r}${e.currentChar()}`);break}r+=n}return`\\${t}${r}`}function he(e){return e!==`{`&&e!==`}`&&e!==Oa&&e!==Y}function ge(e){g(e);let t=``,n=``;for(;t=O(e,he);)n+=t;return n}function _e(e){let t=``,n=``;for(;t=te(e);)n+=t;return n}function ve(e){let t=n=>{let r=e.currentChar();return r===`{`||r===`@`||r===`|`||r===`(`||r===`)`||!r||r===Oa?n:(n+=r,e.next(),t(n))};return t(``)}function ye(e){g(e);let t=m(e,`|`);return g(e),t}function be(e,t){let n=null;switch(e.currentChar()){case`{`:return t.braceNest>=1&&d(J.NOT_ALLOW_NEST_PLACEHOLDER,a(),0),e.next(),n=f(t,2,`{`),g(e),t.braceNest++,n;case`}`:return t.braceNest>0&&t.currentType===2&&d(J.EMPTY_PLACEHOLDER,a(),0),e.next(),n=f(t,3,`}`),t.braceNest--,t.braceNest>0&&g(e),t.inLinked&&t.braceNest===0&&(t.inLinked=!1),n;case`@`:return t.braceNest>0&&d(J.UNTERMINATED_CLOSING_BRACE,a(),0),n=xe(e,t)||p(t),t.braceNest=0,n;default:{let r=!0,i=!0,o=!0;if(E(e))return t.braceNest>0&&d(J.UNTERMINATED_CLOSING_BRACE,a(),0),n=f(t,1,ye(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(t.currentType===4||t.currentType===5||t.currentType===6))return d(J.UNTERMINATED_CLOSING_BRACE,a(),0),t.braceNest=0,Se(e,t);if(r=y(e,t))return n=f(t,4,le(e)),g(e),n;if(i=b(e,t))return n=f(t,5,ue(e)),g(e),n;if(o=x(e,t))return n=f(t,6,fe(e)),g(e),n;if(!r&&!i&&!o)return n=f(t,12,ge(e)),d(J.INVALID_TOKEN_IN_PLACEHOLDER,a(),0,n.value),g(e),n;break}}return n}function xe(e,t){let{currentType:n}=t,r=null,i=e.currentChar();switch((n===7||n===8||n===11||n===9)&&(i===Y||i===Oa)&&d(J.INVALID_LINKED_FORMAT,a(),0),i){case`@`:return e.next(),r=f(t,7,`@`),t.inLinked=!0,r;case`.`:return g(e),e.next(),f(t,8,`.`);case`:`:return g(e),e.next(),f(t,9,`:`);default:return E(e)?(r=f(t,1,ye(e)),t.braceNest=0,t.inLinked=!1,r):S(e,t)||w(e,t)?(g(e),xe(e,t)):C(e,t)?(g(e),f(t,11,_e(e))):T(e,t)?(g(e),i===`{`?be(e,t)||r:f(t,10,ve(e))):(n===7&&d(J.INVALID_LINKED_FORMAT,a(),0),t.braceNest=0,t.inLinked=!1,Se(e,t))}}function Se(e,t){let n={type:13};if(t.braceNest>0)return be(e,t)||p(t);if(t.inLinked)return xe(e,t)||p(t);switch(e.currentChar()){case`{`:return be(e,t)||p(t);case`}`:return d(J.UNBALANCED_CLOSING_BRACE,a(),0),e.next(),f(t,3,`}`);case`@`:return xe(e,t)||p(t);default:if(E(e))return n=f(t,1,ye(e)),t.braceNest=0,t.inLinked=!1,n;if(D(e))return f(t,0,ce(e));break}return n}function Ce(){let{currentType:e,offset:t,startLoc:n,endLoc:o}=c;return c.lastType=e,c.lastOffset=t,c.lastStartLoc=n,c.lastEndLoc=o,c.offset=i(),c.startLoc=a(),r.currentChar()===Na?f(c,13):Se(r,c)}return{nextToken:Ce,currentOffset:i,currentPosition:a,context:l}}var Ra=`parser`,za=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function Ba(e,t,n){switch(e){case`\\\\`:return`\\`;case`\\'`:return`'`;default:{let e=parseInt(t||n,16);return e<=55295||e>=57344?String.fromCodePoint(e):`�`}}}function Va(e={}){let t=e.location!==!1,{onError:n}=e;function r(e,r,i,a,...o){let s=e.currentPosition();s.offset+=a,s.column+=a,n&&n(wa(r,t?xa(i,s):null,{domain:Ra,args:o}))}function i(e,n,r){let i={type:e};return t&&(i.start=n,i.end=n,i.loc={start:r,end:r}),i}function a(e,n,r,i){t&&(e.end=n,e.loc&&(e.loc.end=r))}function o(e,t){let n=e.context(),r=i(3,n.offset,n.startLoc);return r.value=t,a(r,e.currentOffset(),e.currentPosition()),r}function s(e,t){let{lastOffset:n,lastStartLoc:r}=e.context(),o=i(5,n,r);return o.index=parseInt(t,10),e.nextToken(),a(o,e.currentOffset(),e.currentPosition()),o}function c(e,t){let{lastOffset:n,lastStartLoc:r}=e.context(),o=i(4,n,r);return o.key=t,e.nextToken(),a(o,e.currentOffset(),e.currentPosition()),o}function l(e,t){let{lastOffset:n,lastStartLoc:r}=e.context(),o=i(9,n,r);return o.value=t.replace(za,Ba),e.nextToken(),a(o,e.currentOffset(),e.currentPosition()),o}function u(e){let t=e.nextToken(),n=e.context(),{lastOffset:o,lastStartLoc:s}=n,c=i(8,o,s);return t.type===11?(t.value??r(e,J.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,Ha(t)),c.value=t.value||``,a(c,e.currentOffset(),e.currentPosition()),{node:c}):(r(e,J.UNEXPECTED_EMPTY_LINKED_MODIFIER,n.lastStartLoc,0),c.value=``,a(c,o,s),{nextConsumeToken:t,node:c})}function d(e,t){let n=e.context(),r=i(7,n.offset,n.startLoc);return r.value=t,a(r,e.currentOffset(),e.currentPosition()),r}function f(e){let t=e.context(),n=i(6,t.offset,t.startLoc),o=e.nextToken();if(o.type===8){let t=u(e);n.modifier=t.node,o=t.nextConsumeToken||e.nextToken()}switch(o.type!==9&&r(e,J.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,Ha(o)),o=e.nextToken(),o.type===2&&(o=e.nextToken()),o.type){case 10:o.value??r(e,J.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,Ha(o)),n.key=d(e,o.value||``);break;case 4:o.value??r(e,J.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,Ha(o)),n.key=c(e,o.value||``);break;case 5:o.value??r(e,J.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,Ha(o)),n.key=s(e,o.value||``);break;case 6:o.value??r(e,J.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,Ha(o)),n.key=l(e,o.value||``);break;default:{r(e,J.UNEXPECTED_EMPTY_LINKED_KEY,t.lastStartLoc,0);let s=e.context(),c=i(7,s.offset,s.startLoc);return c.value=``,a(c,s.offset,s.startLoc),n.key=c,a(n,s.offset,s.startLoc),{nextConsumeToken:o,node:n}}}return a(n,e.currentOffset(),e.currentPosition()),{node:n}}function p(e){let t=e.context(),n=i(2,t.currentType===1?e.currentOffset():t.offset,t.currentType===1?t.endLoc:t.startLoc);n.items=[];let u=null;do{let i=u||e.nextToken();switch(u=null,i.type){case 0:i.value??r(e,J.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,Ha(i)),n.items.push(o(e,i.value||``));break;case 5:i.value??r(e,J.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,Ha(i)),n.items.push(s(e,i.value||``));break;case 4:i.value??r(e,J.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,Ha(i)),n.items.push(c(e,i.value||``));break;case 6:i.value??r(e,J.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,Ha(i)),n.items.push(l(e,i.value||``));break;case 7:{let t=f(e);n.items.push(t.node),u=t.nextConsumeToken||null;break}}}while(t.currentType!==13&&t.currentType!==1);return a(n,t.currentType===1?t.lastOffset:e.currentOffset(),t.currentType===1?t.lastEndLoc:e.currentPosition()),n}function m(e,t,n,o){let s=e.context(),c=o.items.length===0,l=i(1,t,n);l.cases=[],l.cases.push(o);do{let t=p(e);c||=t.items.length===0,l.cases.push(t)}while(s.currentType!==13);return c&&r(e,J.MUST_HAVE_MESSAGES_IN_PLURAL,n,0),a(l,e.currentOffset(),e.currentPosition()),l}function h(e){let t=e.context(),{offset:n,startLoc:r}=t,i=p(e);return t.currentType===13?i:m(e,n,r,i)}function g(n){let o=La(n,B({},e)),s=o.context(),c=i(0,s.offset,s.startLoc);return t&&c.loc&&(c.loc.source=n),c.body=h(o),e.onCacheKey&&(c.cacheKey=e.onCacheKey(n)),s.currentType!==13&&r(o,J.UNEXPECTED_LEXICAL_ANALYSIS,s.lastStartLoc,0,n[s.offset]||``),a(c,o.currentOffset(),o.currentPosition()),c}return{parse:g}}function Ha(e){if(e.type===13)return`EOF`;let t=(e.value||``).replace(/\r?\n/gu,`\\n`);return t.length>10?t.slice(0,9)+`…`:t}function Ua(e,t={}){let n={ast:e,helpers:new Set};return{context:()=>n,helper:e=>(n.helpers.add(e),e)}}function Wa(e,t){for(let n=0;n<e.length;n++)Ga(e[n],t)}function Ga(e,t){switch(e.type){case 1:Wa(e.cases,t),t.helper(`plural`);break;case 2:Wa(e.items,t);break;case 6:Ga(e.key,t),t.helper(`linked`),t.helper(`type`);break;case 5:t.helper(`interpolate`),t.helper(`list`);break;case 4:t.helper(`interpolate`),t.helper(`named`);break}}function Ka(e,t={}){let n=Ua(e);n.helper(`normalize`),e.body&&Ga(e.body,n);let r=n.context();e.helpers=Array.from(r.helpers)}function qa(e){let t=e.body;return t.type===2?Ja(t):t.cases.forEach(e=>Ja(e)),e}function Ja(e){if(e.items.length===1){let t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{let t=[];for(let n=0;n<e.items.length;n++){let r=e.items[n];if(!(r.type===3||r.type===9)||r.value==null)break;t.push(r.value)}if(t.length===e.items.length){e.static=ma(t);for(let t=0;t<e.items.length;t++){let n=e.items[t];(n.type===3||n.type===9)&&delete n.value}}}}var Ya=`minifier`;function Xa(e){switch(e.t=e.type,e.type){case 0:{let t=e;Xa(t.body),t.b=t.body,delete t.body;break}case 1:{let t=e,n=t.cases;for(let e=0;e<n.length;e++)Xa(n[e]);t.c=n,delete t.cases;break}case 2:{let t=e,n=t.items;for(let e=0;e<n.length;e++)Xa(n[e]);t.i=n,delete t.items,t.static&&(t.s=t.static,delete t.static);break}case 3:case 9:case 8:case 7:{let t=e;t.value&&(t.v=t.value,delete t.value);break}case 6:{let t=e;Xa(t.key),t.k=t.key,delete t.key,t.modifier&&(Xa(t.modifier),t.m=t.modifier,delete t.modifier);break}case 5:{let t=e;t.i=t.index,delete t.index;break}case 4:{let t=e;t.k=t.key,delete t.key;break}default:if(process.env.NODE_ENV!==`production`)throw wa(J.UNHANDLED_MINIFIER_NODE_TYPE,null,{domain:Ya,args:[e.type]})}delete e.type}var Za=`parser`;function Qa(e,t){let{sourceMap:n,filename:r,breakLineCode:i,needIndent:a}=t,o=t.location!==!1,s={filename:r,code:``,column:1,line:1,offset:0,map:void 0,breakLineCode:i,needIndent:a,indentLevel:0};o&&e.loc&&(s.source=e.loc.source);let c=()=>s;function l(e,t){s.code+=e}function u(e,t=!0){let n=t?i:``;l(a?n+` `.repeat(e):n)}function d(e=!0){let t=++s.indentLevel;e&&u(t)}function f(e=!0){let t=--s.indentLevel;e&&u(t)}function p(){u(s.indentLevel)}return{context:c,push:l,indent:d,deindent:f,newline:p,helper:e=>`_${e}`,needIndent:()=>s.needIndent}}function $a(e,t){let{helper:n}=e;e.push(`${n(`linked`)}(`),ro(e,t.key),t.modifier?(e.push(`, `),ro(e,t.modifier),e.push(`, _type`)):e.push(`, undefined, _type`),e.push(`)`)}function eo(e,t){let{helper:n,needIndent:r}=e;e.push(`${n(`normalize`)}([`),e.indent(r());let i=t.items.length;for(let n=0;n<i&&(ro(e,t.items[n]),n!==i-1);n++)e.push(`, `);e.deindent(r()),e.push(`])`)}function to(e,t){let{helper:n,needIndent:r}=e;if(t.cases.length>1){e.push(`${n(`plural`)}([`),e.indent(r());let i=t.cases.length;for(let n=0;n<i&&(ro(e,t.cases[n]),n!==i-1);n++)e.push(`, `);e.deindent(r()),e.push(`])`)}}function no(e,t){t.body?ro(e,t.body):e.push(`null`)}function ro(e,t){let{helper:n}=e;switch(t.type){case 0:no(e,t);break;case 1:to(e,t);break;case 2:eo(e,t);break;case 6:$a(e,t);break;case 8:e.push(JSON.stringify(t.value),t);break;case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n(`interpolate`)}(${n(`list`)}(${t.index}))`,t);break;case 4:e.push(`${n(`interpolate`)}(${n(`named`)}(${JSON.stringify(t.key)}))`,t);break;case 9:e.push(JSON.stringify(t.value),t);break;case 3:e.push(JSON.stringify(t.value),t);break;default:if(process.env.NODE_ENV!==`production`)throw wa(J.UNHANDLED_CODEGEN_NODE_TYPE,null,{domain:Za,args:[t.type]})}}var io=(e,t={})=>{let n=W(t.mode)?t.mode:`normal`,r=W(t.filename)?t.filename:`message.intl`,i=!!t.sourceMap,a=t.breakLineCode==null?n===`arrow`?`;`:`
4
4
  `:t.breakLineCode,o=t.needIndent?t.needIndent:n!==`arrow`,s=e.helpers||[],c=Qa(e,{mode:n,filename:r,sourceMap:i,breakLineCode:a,needIndent:o});c.push(n===`normal`?`function __msg__ (ctx) {`:`(ctx) => {`),c.indent(o),s.length>0&&(c.push(`const { ${ma(s.map(e=>`${e}: _${e}`),`, `)} } = ctx`),c.newline()),c.push(`return `),ro(c,e),c.deindent(o),c.push(`}`),delete e.helpers;let{code:l,map:u}=c.context();return{ast:e,code:l,map:u?u.toJSON():void 0}};function ao(e,t={}){let n=B({},t),r=!!n.jit,i=!!n.minify,a=n.optimize==null?!0:n.optimize,o=Va(n).parse(e);return r?(a&&qa(o),i&&Xa(o),{ast:o,code:``}):(Ka(o,n),io(o,n))}function oo(){typeof __INTLIFY_PROD_DEVTOOLS__!=`boolean`&&(ia().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!=`boolean`&&(ia().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function so(e){return K(e)&&vo(e)===0&&(la(e,`b`)||la(e,`body`))}var co=[`b`,`body`];function lo(e){return To(e,co)}var uo=[`c`,`cases`];function fo(e){return To(e,uo,[])}var po=[`s`,`static`];function mo(e){return To(e,po)}var ho=[`i`,`items`];function go(e){return To(e,ho,[])}var _o=[`t`,`type`];function vo(e){return To(e,_o)}var yo=[`v`,`value`];function bo(e,t){let n=To(e,yo);if(n!=null)return n;throw Do(t)}var xo=[`m`,`modifier`];function So(e){return To(e,xo)}var Co=[`k`,`key`];function wo(e){let t=To(e,Co);if(t)return t;throw Do(6)}function To(e,t,n){for(let n=0;n<t.length;n++){let r=t[n];if(la(e,r)&&e[r]!=null)return e[r]}return n}var Eo=[...co,...uo,...po,...ho,...Co,...xo,...yo,..._o];function Do(e){return Error(`unhandled node type: ${e}`)}function Oo(e){return t=>ko(t,e)}function ko(e,t){let n=lo(t);if(n==null)throw Do(0);if(vo(n)===1){let t=fo(n);return e.plural(t.reduce((t,n)=>[...t,Ao(e,n)],[]))}else return Ao(e,n)}function Ao(e,t){let n=mo(t);if(n!=null)return e.type===`text`?n:e.normalize([n]);{let n=go(t).reduce((t,n)=>[...t,jo(e,n)],[]);return e.normalize(n)}}function jo(e,t){let n=vo(t);switch(n){case 3:return bo(t,n);case 9:return bo(t,n);case 4:{let r=t;if(la(r,`k`)&&r.k)return e.interpolate(e.named(r.k));if(la(r,`key`)&&r.key)return e.interpolate(e.named(r.key));throw Do(n)}case 5:{let r=t;if(la(r,`i`)&&z(r.i))return e.interpolate(e.list(r.i));if(la(r,`index`)&&z(r.index))return e.interpolate(e.list(r.index));throw Do(n)}case 6:{let n=t,r=So(n),i=wo(n);return e.linked(jo(e,i),r?jo(e,r):void 0,e.type)}case 7:return bo(t,n);case 8:return bo(t,n);default:throw Error(`unhandled node on format message part: ${n}`)}}var Mo=`Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.`;function No(e,t){t&&Da(e)&&Hi(Yi(Mo,{source:e}))}var Po=e=>e,Fo=V();function Io(e,t={}){let n=!1,r=t.onError||Ta;return t.onError=e=>{n=!0,r(e)},{...ao(e,t),detectError:n}}function Lo(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&W(e)){let n=G(t.warnHtmlMessage)?t.warnHtmlMessage:!0;process.env.NODE_ENV!==`production`&&No(e,n);let r=(t.onCacheKey||Po)(e),i=Fo[r];if(i)return i;let{ast:a,detectError:o}=Io(e,{...t,location:process.env.NODE_ENV!==`production`,jit:!0}),s=Oo(a);return o?s:Fo[r]=s}else{if(process.env.NODE_ENV!==`production`&&!so(e))return Hi(`the message that is resolve with key '${t.key}' is not supported for jit compilation`),(()=>e);let n=e.cacheKey;return n?Fo[n]||(Fo[n]=Oo(e)):Oo(e)}}var Ro=null;function zo(e){Ro=e}function Bo(e,t,n){Ro&&Ro.emit(`i18n:init`,{timestamp:Date.now(),i18n:e,version:t,meta:n})}var Vo=Ho(`function:translate`);function Ho(e){return t=>Ro&&Ro.emit(e,t)}var X={INVALID_ARGUMENT:17,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_NON_STRING_MESSAGE:20,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},Uo=24;function Wo(e){return wa(e,null,process.env.NODE_ENV===`production`?void 0:{messages:Go})}var Go={[X.INVALID_ARGUMENT]:`Invalid arguments`,[X.INVALID_DATE_ARGUMENT]:`The date provided is an invalid Date object.Make sure your Date represents a valid date.`,[X.INVALID_ISO_DATE_ARGUMENT]:`The argument provided is not a valid ISO date string`,[X.NOT_SUPPORT_NON_STRING_MESSAGE]:`Not support non-string message`,[X.NOT_SUPPORT_LOCALE_PROMISE_VALUE]:`cannot support promise value`,[X.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]:`cannot support async function`,[X.NOT_SUPPORT_LOCALE_TYPE]:`cannot support locale type`};function Ko(e,t){return t.locale==null?Jo(e.locale):Jo(t.locale)}var qo;function Jo(e){if(W(e))return e;if(U(e)){if(e.resolvedOnce&&qo!=null)return qo;if(e.constructor.name===`Function`){let t=e();if(ua(t))throw Wo(X.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return qo=t}else throw Wo(X.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw Wo(X.NOT_SUPPORT_LOCALE_TYPE)}function Yo(e,t,n){return[...new Set([n,...H(t)?t:K(t)?Object.keys(t):W(t)?[t]:[n]])]}function Xo(e,t,n){let r=W(n)?n:hs,i=e;i.__localeChainCache||=new Map;let a=i.__localeChainCache.get(r);if(!a){a=[];let e=[n];for(;H(e);)e=Zo(a,e,t);let o=H(t)||!q(t)?t:t.default?t.default:null;e=W(o)?[o]:o,H(e)&&Zo(a,e,!1),i.__localeChainCache.set(r,a)}return a}function Zo(e,t,n){let r=!0;for(let i=0;i<t.length&&G(r);i++){let a=t[i];W(a)&&(r=Qo(e,t[i],n))}return r}function Qo(e,t,n){let r,i=t.split(`-`);do r=$o(e,i.join(`-`),n),i.splice(-1,1);while(i.length&&r===!0);return r}function $o(e,t,n){let r=!1;if(!e.includes(t)&&(r=!0,t)){r=t[t.length-1]!==`!`;let i=t.replace(/!/g,``);e.push(i),(H(n)||q(n))&&n[i]&&(r=n[i])}return r}var es=[];es[0]={w:[0],i:[3,0],"[":[4],o:[7]},es[1]={w:[1],".":[2],"[":[4],o:[7]},es[2]={w:[2],i:[3,0],0:[3,0]},es[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},es[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},es[5]={"'":[4,0],o:8,l:[5,0]},es[6]={'"':[4,0],o:8,l:[6,0]};var ts=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function ns(e){return ts.test(e)}function rs(e){let t=e.charCodeAt(0);return t===e.charCodeAt(e.length-1)&&(t===34||t===39)?e.slice(1,-1):e}function is(e){if(e==null)return`o`;switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return`i`;case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return`w`}return`i`}function as(e){let t=e.trim();return e.charAt(0)===`0`&&isNaN(parseInt(e))?!1:ns(t)?rs(t):`*`+t}function os(e){let t=[],n=-1,r=0,i=0,a,o,s,c,l,u,d,f=[];f[0]=()=>{o===void 0?o=s:o+=s},f[1]=()=>{o!==void 0&&(t.push(o),o=void 0)},f[2]=()=>{f[0](),i++},f[3]=()=>{if(i>0)i--,r=4,f[0]();else{if(i=0,o===void 0||(o=as(o),o===!1))return!1;f[1]()}};function p(){let t=e[n+1];if(r===5&&t===`'`||r===6&&t===`"`)return n++,s=`\\`+t,f[0](),!0}for(;r!==null;)if(n++,a=e[n],!(a===`\\`&&p())){if(c=is(a),d=es[r],l=d[c]||d.l||8,l===8||(r=l[0],l[1]!==void 0&&(u=f[l[1]],u&&(s=a,u()===!1))))return;if(r===7)return t}}var ss=new Map;function cs(e,t){return K(e)?e[t]:null}function ls(e,t){if(!K(e))return null;let n=ss.get(t);if(n||(n=os(t),n&&ss.set(t,n)),!n)return null;let r=n.length,i=e,a=0;for(;a<r;){let e=n[a];if(Eo.includes(e)&&so(i))return null;let t=i[e];if(t===void 0||U(i))return null;i=t,a++}return i}var Z={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:7},us=8,ds={[Z.NOT_FOUND_KEY]:`Not found '{key}' key in '{locale}' locale messages.`,[Z.FALLBACK_TO_TRANSLATE]:`Fall back to translate '{key}' key with '{target}' locale.`,[Z.CANNOT_FORMAT_NUMBER]:`Cannot format a number value due to not supported Intl.NumberFormat.`,[Z.FALLBACK_TO_NUMBER_FORMAT]:`Fall back to number format '{key}' key with '{target}' locale.`,[Z.CANNOT_FORMAT_DATE]:`Cannot format a date value due to not supported Intl.DateTimeFormat.`,[Z.FALLBACK_TO_DATE_FORMAT]:`Fall back to datetime format '{key}' key with '{target}' locale.`,[Z.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]:`This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future.`};function fs(e,...t){return Yi(ds[e],...t)}var ps=`11.1.11`,ms=-1,hs=`en-US`,gs=``,_s=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function vs(){return{upper:(e,t)=>t===`text`&&W(e)?e.toUpperCase():t===`vnode`&&K(e)&&`__v_isVNode`in e?e.children.toUpperCase():e,lower:(e,t)=>t===`text`&&W(e)?e.toLowerCase():t===`vnode`&&K(e)&&`__v_isVNode`in e?e.children.toLowerCase():e,capitalize:(e,t)=>t===`text`&&W(e)?_s(e):t===`vnode`&&K(e)&&`__v_isVNode`in e?_s(e.children):e}}var ys;function bs(e){ys=e}var xs;function Ss(e){xs=e}var Cs;function ws(e){Cs=e}var Ts=null,Es=e=>{Ts=e},Ds=()=>Ts,Os=null,ks=e=>{Os=e},As=()=>Os,js=0;function Ms(e={}){let t=U(e.onWarn)?e.onWarn:Hi,n=W(e.version)?e.version:ps,r=W(e.locale)||U(e.locale)?e.locale:hs,i=U(r)?hs:r,a=H(e.fallbackLocale)||q(e.fallbackLocale)||W(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:i,o=q(e.messages)?e.messages:Ns(i),s=q(e.datetimeFormats)?e.datetimeFormats:Ns(i),c=q(e.numberFormats)?e.numberFormats:Ns(i),l=B(V(),e.modifiers,vs()),u=e.pluralRules||V(),d=U(e.missing)?e.missing:null,f=G(e.missingWarn)||ea(e.missingWarn)?e.missingWarn:!0,p=G(e.fallbackWarn)||ea(e.fallbackWarn)?e.fallbackWarn:!0,m=!!e.fallbackFormat,h=!!e.unresolving,g=U(e.postTranslation)?e.postTranslation:null,_=q(e.processor)?e.processor:null,v=G(e.warnHtmlMessage)?e.warnHtmlMessage:!0,y=!!e.escapeParameter,b=U(e.messageCompiler)?e.messageCompiler:ys;process.env.NODE_ENV!==`production`&&U(e.messageCompiler)&&Wi(fs(Z.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));let x=U(e.messageResolver)?e.messageResolver:xs||cs,S=U(e.localeFallbacker)?e.localeFallbacker:Cs||Yo,C=K(e.fallbackContext)?e.fallbackContext:void 0,w=e,T=K(w.__datetimeFormatters)?w.__datetimeFormatters:new Map,E=K(w.__numberFormatters)?w.__numberFormatters:new Map,D=K(w.__meta)?w.__meta:{};js++;let O={version:n,cid:js,locale:r,fallbackLocale:a,messages:o,modifiers:l,pluralRules:u,missing:d,missingWarn:f,fallbackWarn:p,fallbackFormat:m,unresolving:h,postTranslation:g,processor:_,warnHtmlMessage:v,escapeParameter:y,messageCompiler:b,messageResolver:x,localeFallbacker:S,fallbackContext:C,onWarn:t,__meta:D};return O.datetimeFormats=s,O.numberFormats=c,O.__datetimeFormatters=T,O.__numberFormatters=E,process.env.NODE_ENV!==`production`&&(O.__v_emitter=w.__v_emitter==null?void 0:w.__v_emitter),(process.env.NODE_ENV!==`production`||__INTLIFY_PROD_DEVTOOLS__)&&Bo(O,n,D),O}var Ns=e=>({[e]:V()});function Ps(e,t){return e instanceof RegExp?e.test(t):e}function Fs(e,t){return e instanceof RegExp?e.test(t):e}function Is(e,t,n,r,i){let{missing:a,onWarn:o}=e;if(process.env.NODE_ENV!==`production`){let r=e.__v_emitter;r&&r.emit(`missing`,{locale:n,key:t,type:i,groupId:`${i}:${t}`})}if(a!==null){let r=a(e,n,t,i);return W(r)?r:t}else return process.env.NODE_ENV!==`production`&&Fs(r,t)&&o(fs(Z.NOT_FOUND_KEY,{key:t,locale:n})),t}function Ls(e,t,n){let r=e;r.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function Rs(e,t){return e===t?!1:e.split(`-`)[0]===t.split(`-`)[0]}function zs(e,t){let n=t.indexOf(e);if(n===-1)return!1;for(let r=n+1;r<t.length;r++)if(Rs(e,t[r]))return!0;return!1}var Bs=typeof Intl<`u`,Vs={dateTimeFormat:Bs&&Intl.DateTimeFormat!==void 0,numberFormat:Bs&&Intl.NumberFormat!==void 0};function Hs(e,...t){let{datetimeFormats:n,unresolving:r,fallbackLocale:i,onWarn:a,localeFallbacker:o}=e,{__datetimeFormatters:s}=e;if(process.env.NODE_ENV!==`production`&&!Vs.dateTimeFormat)return a(fs(Z.CANNOT_FORMAT_DATE)),``;let[c,l,u,d]=Ws(...t),f=G(u.missingWarn)?u.missingWarn:e.missingWarn,p=G(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn,m=!!u.part,h=Ko(e,u),g=o(e,i,h);if(!W(c)||c===``)return new Intl.DateTimeFormat(h,d).format(l);let _={},v,y=null,b=h,x=null,S=`datetime format`;for(let t=0;t<g.length;t++){if(v=x=g[t],process.env.NODE_ENV!==`production`&&h!==v&&Ps(p,c)&&a(fs(Z.FALLBACK_TO_DATE_FORMAT,{key:c,target:v})),process.env.NODE_ENV!==`production`&&h!==v){let t=e.__v_emitter;t&&t.emit(`fallback`,{type:S,key:c,from:b,to:x,groupId:`${S}:${c}`})}if(_=n[v]||{},y=_[c],q(y))break;Is(e,c,v,f,S),b=x}if(!q(y)||!W(v))return r?-1:c;let C=`${v}__${c}`;ta(d)||(C=`${C}__${JSON.stringify(d)}`);let w=s.get(C);return w||(w=new Intl.DateTimeFormat(v,B({},y,d)),s.set(C,w)),m?w.formatToParts(l):w.format(l)}var Us=[`localeMatcher`,`weekday`,`era`,`year`,`month`,`day`,`hour`,`minute`,`second`,`timeZoneName`,`formatMatcher`,`hour12`,`timeZone`,`dateStyle`,`timeStyle`,`calendar`,`dayPeriod`,`numberingSystem`,`hourCycle`,`fractionalSecondDigits`];function Ws(...e){let[t,n,r,i]=e,a=V(),o=V(),s;if(W(t)){let e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Wo(X.INVALID_ISO_DATE_ARGUMENT);let n=e[3]?e[3].trim().startsWith(`T`)?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();s=new Date(n);try{s.toISOString()}catch{throw Wo(X.INVALID_ISO_DATE_ARGUMENT)}}else if($i(t)){if(isNaN(t.getTime()))throw Wo(X.INVALID_DATE_ARGUMENT);s=t}else if(z(t))s=t;else throw Wo(X.INVALID_ARGUMENT);return W(n)?a.key=n:q(n)&&Object.keys(n).forEach(e=>{Us.includes(e)?o[e]=n[e]:a[e]=n[e]}),W(r)?a.locale=r:q(r)&&(o=r),q(i)&&(o=i),[a.key||``,s,a,o]}function Gs(e,t,n){let r=e;for(let e in n){let n=`${t}__${e}`;r.__datetimeFormatters.has(n)&&r.__datetimeFormatters.delete(n)}}function Ks(e,...t){let{numberFormats:n,unresolving:r,fallbackLocale:i,onWarn:a,localeFallbacker:o}=e,{__numberFormatters:s}=e;if(process.env.NODE_ENV!==`production`&&!Vs.numberFormat)return a(fs(Z.CANNOT_FORMAT_NUMBER)),``;let[c,l,u,d]=Js(...t),f=G(u.missingWarn)?u.missingWarn:e.missingWarn,p=G(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn,m=!!u.part,h=Ko(e,u),g=o(e,i,h);if(!W(c)||c===``)return new Intl.NumberFormat(h,d).format(l);let _={},v,y=null,b=h,x=null,S=`number format`;for(let t=0;t<g.length;t++){if(v=x=g[t],process.env.NODE_ENV!==`production`&&h!==v&&Ps(p,c)&&a(fs(Z.FALLBACK_TO_NUMBER_FORMAT,{key:c,target:v})),process.env.NODE_ENV!==`production`&&h!==v){let t=e.__v_emitter;t&&t.emit(`fallback`,{type:S,key:c,from:b,to:x,groupId:`${S}:${c}`})}if(_=n[v]||{},y=_[c],q(y))break;Is(e,c,v,f,S),b=x}if(!q(y)||!W(v))return r?-1:c;let C=`${v}__${c}`;ta(d)||(C=`${C}__${JSON.stringify(d)}`);let w=s.get(C);return w||(w=new Intl.NumberFormat(v,B({},y,d)),s.set(C,w)),m?w.formatToParts(l):w.format(l)}var qs=[`localeMatcher`,`style`,`currency`,`currencyDisplay`,`currencySign`,`useGrouping`,`minimumIntegerDigits`,`minimumFractionDigits`,`maximumFractionDigits`,`minimumSignificantDigits`,`maximumSignificantDigits`,`compactDisplay`,`notation`,`signDisplay`,`unit`,`unitDisplay`,`roundingMode`,`roundingPriority`,`roundingIncrement`,`trailingZeroDisplay`];function Js(...e){let[t,n,r,i]=e,a=V(),o=V();if(!z(t))throw Wo(X.INVALID_ARGUMENT);let s=t;return W(n)?a.key=n:q(n)&&Object.keys(n).forEach(e=>{qs.includes(e)?o[e]=n[e]:a[e]=n[e]}),W(r)?a.locale=r:q(r)&&(o=r),q(i)&&(o=i),[a.key||``,s,a,o]}function Ys(e,t,n){let r=e;for(let e in n){let n=`${t}__${e}`;r.__numberFormatters.has(n)&&r.__numberFormatters.delete(n)}}var Xs=e=>e,Zs=e=>``,Qs=`text`,$s=e=>e.length===0?``:ma(e),ec=pa;function tc(e,t){return e=Math.abs(e),t===2?e?e>1?1:0:1:e?Math.min(e,2):0}function nc(e){let t=z(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(z(e.named.count)||z(e.named.n))?z(e.named.count)?e.named.count:z(e.named.n)?e.named.n:t:t}function rc(e,t){t.count||=e,t.n||=e}function ic(e={}){let t=e.locale,n=nc(e),r=K(e.pluralRules)&&W(t)&&U(e.pluralRules[t])?e.pluralRules[t]:tc,i=K(e.pluralRules)&&W(t)&&U(e.pluralRules[t])?tc:void 0,a=e=>e[r(n,e.length,i)],o=e.list||[],s=e=>o[e],c=e.named||V();z(e.pluralIndex)&&rc(n,c);let l=e=>c[e];function u(t,n){return(U(e.messages)?e.messages(t,!!n):K(e.messages)?e.messages[t]:!1)||(e.parent?e.parent.message(t):Zs)}let d=t=>e.modifiers?e.modifiers[t]:Xs,f=q(e.processor)&&U(e.processor.normalize)?e.processor.normalize:$s,p=q(e.processor)&&U(e.processor.interpolate)?e.processor.interpolate:ec,m={list:s,named:l,plural:a,linked:(e,...t)=>{let[n,r]=t,i=`text`,a=``;t.length===1?K(n)?(a=n.modifier||a,i=n.type||i):W(n)&&(a=n||a):t.length===2&&(W(n)&&(a=n||a),W(r)&&(i=r||i));let o=u(e,!0)(m),s=i===`vnode`&&H(o)&&a?o[0]:o;return a?d(a)(s,i):s},message:u,type:q(e.processor)&&W(e.processor.type)?e.processor.type:Qs,interpolate:p,normalize:f,values:B(V(),o,c)};return m}var ac=()=>``,oc=e=>U(e);function sc(e,...t){let{fallbackFormat:n,postTranslation:r,unresolving:i,messageCompiler:a,fallbackLocale:o,messages:s}=e,[c,l]=fc(...t),u=G(l.missingWarn)?l.missingWarn:e.missingWarn,d=G(l.fallbackWarn)?l.fallbackWarn:e.fallbackWarn,f=G(l.escapeParameter)?l.escapeParameter:e.escapeParameter,p=!!l.resolvedMessage,m=W(l.default)||G(l.default)?G(l.default)?a?c:()=>c:l.default:n?a?c:()=>c:null,h=n||m!=null&&(W(m)||U(m)),g=Ko(e,l);f&&cc(l);let[_,v,y]=p?[c,g,s[g]||V()]:lc(e,c,g,o,d,u),b=_,x=c;if(!p&&!(W(b)||so(b)||oc(b))&&h&&(b=m,x=b),!p&&(!(W(b)||so(b)||oc(b))||!W(v)))return i?-1:c;if(process.env.NODE_ENV!==`production`&&W(b)&&e.messageCompiler==null)return Hi(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${c}'.`),c;let S=!1,C=oc(b)?b:uc(e,c,v,b,x,()=>{S=!0});if(S)return b;let w=dc(e,C,ic(hc(e,v,y,l))),T=r?r(w,c):w;if(f&&W(T)&&(T=sa(T)),process.env.NODE_ENV!==`production`||__INTLIFY_PROD_DEVTOOLS__){let t={timestamp:Date.now(),key:W(c)?c:oc(b)?b.key:``,locale:v||(oc(b)?b.locale:``),format:W(b)?b:oc(b)?b.source:``,message:T};t.meta=B({},e.__meta,Ds()||{}),Vo(t)}return T}function cc(e){H(e.list)?e.list=e.list.map(e=>W(e)?aa(e):e):K(e.named)&&Object.keys(e.named).forEach(t=>{W(e.named[t])&&(e.named[t]=aa(e.named[t]))})}function lc(e,t,n,r,i,a){let{messages:o,onWarn:s,messageResolver:c,localeFallbacker:l}=e,u=l(e,r,n),d=V(),f,p=null,m=n,h=null,g=`translate`;for(let r=0;r<u.length;r++){if(f=h=u[r],process.env.NODE_ENV!==`production`&&n!==f&&!Rs(n,f)&&Ps(i,t)&&s(fs(Z.FALLBACK_TO_TRANSLATE,{key:t,target:f})),process.env.NODE_ENV!==`production`&&n!==f){let n=e.__v_emitter;n&&n.emit(`fallback`,{type:g,key:t,from:m,to:h,groupId:`${g}:${t}`})}d=o[f]||V();let l=null,_,v;if(process.env.NODE_ENV!==`production`&&Gi&&(l=window.performance.now(),_=`intlify-message-resolve-start`,v=`intlify-message-resolve-end`,Ki&&Ki(_)),(p=c(d,t))===null&&(p=d[t]),process.env.NODE_ENV!==`production`&&Gi){let n=window.performance.now(),r=e.__v_emitter;r&&l&&p&&r.emit(`message-resolve`,{type:`message-resolve`,key:t,message:p,time:n-l,groupId:`${g}:${t}`}),_&&v&&Ki&&qi&&(Ki(v),qi(`intlify message resolve`,_,v))}if(W(p)||so(p)||oc(p))break;if(!zs(f,u)){let n=Is(e,t,f,a,g);n!==t&&(p=n)}m=h}return[p,f,d]}function uc(e,t,n,r,i,a){let{messageCompiler:o,warnHtmlMessage:s}=e;if(oc(r)){let e=r;return e.locale=e.locale||n,e.key=e.key||t,e}if(o==null){let e=(()=>r);return e.locale=n,e.key=t,e}let c=null,l,u;process.env.NODE_ENV!==`production`&&Gi&&(c=window.performance.now(),l=`intlify-message-compilation-start`,u=`intlify-message-compilation-end`,Ki&&Ki(l));let d=o(r,pc(e,n,i,r,s,a));if(process.env.NODE_ENV!==`production`&&Gi){let n=window.performance.now(),i=e.__v_emitter;i&&c&&i.emit(`message-compilation`,{type:`message-compilation`,message:r,time:n-c,groupId:`translate:${t}`}),l&&u&&Ki&&qi&&(Ki(u),qi(`intlify message compilation`,l,u))}return d.locale=n,d.key=t,d.source=r,d}function dc(e,t,n){let r=null,i,a;process.env.NODE_ENV!==`production`&&Gi&&(r=window.performance.now(),i=`intlify-message-evaluation-start`,a=`intlify-message-evaluation-end`,Ki&&Ki(i));let o=t(n);if(process.env.NODE_ENV!==`production`&&Gi){let n=window.performance.now(),s=e.__v_emitter;s&&r&&s.emit(`message-evaluation`,{type:`message-evaluation`,value:o,time:n-r,groupId:`translate:${t.key}`}),i&&a&&Ki&&qi&&(Ki(a),qi(`intlify message evaluation`,i,a))}return o}function fc(...e){let[t,n,r]=e,i=V();if(!W(t)&&!z(t)&&!oc(t)&&!so(t))throw Wo(X.INVALID_ARGUMENT);let a=z(t)?String(t):(oc(t),t);return z(n)?i.plural=n:W(n)?i.default=n:q(n)&&!ta(n)?i.named=n:H(n)&&(i.list=n),z(r)?i.plural=r:W(r)?i.default=r:q(r)&&B(i,r),[a,i]}function pc(e,t,n,r,i,a){return{locale:t,key:n,warnHtmlMessage:i,onError:t=>{if(a&&a(t),process.env.NODE_ENV!==`production`){let i=mc(r),a=`Message compilation error: ${t.message}`,o=t.location&&i&&ga(i,t.location.start.offset,t.location.end.offset),s=e.__v_emitter;s&&i&&s.emit(`compile-error`,{message:i,error:t.message,start:t.location&&t.location.start.offset,end:t.location&&t.location.end.offset,groupId:`translate:${n}`}),console.error(o?`${a}\n${o}`:a)}else throw t},onCacheKey:e=>Zi(t,n,e)}}function mc(e){if(W(e))return e;if(e.loc&&e.loc.source)return e.loc.source}function hc(e,t,n,r){let{modifiers:i,pluralRules:a,messageResolver:o,fallbackLocale:s,fallbackWarn:c,missingWarn:l,fallbackContext:u}=e,d={locale:t,modifiers:i,pluralRules:a,messages:(r,i)=>{let a=o(n,r);if(a==null&&(u||i)){let[,,n]=lc(u||e,r,t,s,c,l);a=o(n,r)}if(W(a)||so(a)){let n=!1,i=uc(e,r,t,a,r,()=>{n=!0});return n?ac:i}else if(oc(a))return a;else return ac}};return e.processor&&(d.processor=e.processor),r.list&&(d.list=r.list),r.named&&(d.named=r.named),z(r.plural)&&(d.pluralIndex=r.plural),d}oo();function gc(){return _c().__VUE_DEVTOOLS_GLOBAL_HOOK__}function _c(){return typeof navigator<`u`&&typeof window<`u`?window:typeof globalThis<`u`?globalThis:{}}const vc=typeof Proxy==`function`,yc=`devtools-plugin:setup`,bc=`plugin:settings:set`;var xc,Sc;function Cc(){return xc===void 0&&(typeof window<`u`&&window.performance?(xc=!0,Sc=window.performance):typeof globalThis<`u`&&globalThis.perf_hooks?.performance?(xc=!0,Sc=globalThis.perf_hooks.performance):xc=!1),xc}function wc(){return Cc()?Sc.now():Date.now()}var Tc=class{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;let n={};if(e.settings)for(let t in e.settings)n[t]=e.settings[t].defaultValue;let r=`__vue-devtools-plugin-settings__${e.id}`,i=Object.assign({},n);try{let e=localStorage.getItem(r),t=JSON.parse(e);Object.assign(i,t)}catch{}this.fallbacks={getSettings(){return i},setSettings(e){try{localStorage.setItem(r,JSON.stringify(e))}catch{}i=e},now(){return wc()}},t&&t.on(`plugin:settings:set`,(e,t)=>{e===this.plugin.id&&this.fallbacks.setSettings(t)}),this.proxiedOn=new Proxy({},{get:(e,t)=>this.target?this.target.on[t]:(...e)=>{this.onQueue.push({method:t,args:e})}}),this.proxiedTarget=new Proxy({},{get:(e,t)=>this.target?this.target[t]:t===`on`?this.proxiedOn:Object.keys(this.fallbacks).includes(t)?(...e)=>(this.targetQueue.push({method:t,args:e,resolve:()=>{}}),this.fallbacks[t](...e)):(...e)=>new Promise(n=>{this.targetQueue.push({method:t,args:e,resolve:n})})})}async setRealTarget(e){this.target=e;for(let e of this.onQueue)this.target.on[e.method](...e.args);for(let e of this.targetQueue)e.resolve(await this.target[e.method](...e.args))}};function Ec(e,t){let n=e,r=_c(),i=gc(),a=vc&&n.enableEarlyProxy;if(i&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!a))i.emit(`devtools-plugin:setup`,e,t);else{let e=a?new Tc(n,i):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:e}),e&&t(e.proxiedTarget)}}var Dc=`11.1.11`;function Oc(){typeof __VUE_I18N_FULL_INSTALL__!=`boolean`&&(ia().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!=`boolean`&&(ia().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!=`boolean`&&(ia().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!=`boolean`&&(ia().__INTLIFY_PROD_DEVTOOLS__=!1)}var Q={UNEXPECTED_RETURN_TYPE:24,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:30,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_COMPATIBLE_LEGACY_VUE_I18N:33,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function $(e,...t){return wa(e,null,process.env.NODE_ENV===`production`?void 0:{messages:kc,args:t})}var kc={[Q.UNEXPECTED_RETURN_TYPE]:`Unexpected return type in composer`,[Q.INVALID_ARGUMENT]:`Invalid argument`,[Q.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[Q.NOT_INSTALLED]:"Need to install with `app.use` function",[Q.UNEXPECTED_ERROR]:`Unexpected error`,[Q.REQUIRED_VALUE]:`Required in value: {0}`,[Q.INVALID_VALUE]:`Invalid value`,[Q.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:`Cannot setup vue-devtools plugin`,[Q.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[Q.NOT_COMPATIBLE_LEGACY_VUE_I18N]:`Not compatible legacy VueI18n.`,[Q.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:`Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly`},Ac=Xi(`__translateVNode`),jc=Xi(`__datetimeParts`),Mc=Xi(`__numberParts`),Nc=Xi(`__enableEmitter`),Pc=Xi(`__disableEmitter`),Fc=Xi(`__setPluralRules`);Xi(`__intlifyMeta`);var Ic=Xi(`__injectWithOption`),Lc=Xi(`__dispose`),Rc={FALLBACK_TO_ROOT:8,NOT_FOUND_PARENT_SCOPE:9,IGNORE_OBJ_FLATTEN:10,DEPRECATE_LEGACY_MODE:11,DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE:12,DUPLICATE_USE_I18N_CALLING:13},zc={[Rc.FALLBACK_TO_ROOT]:`Fall back to {type} '{key}' with root locale.`,[Rc.NOT_FOUND_PARENT_SCOPE]:`Not found parent scope. use the global scope.`,[Rc.IGNORE_OBJ_FLATTEN]:`Ignore object flatten: '{key}' key has an string value`,[Rc.DEPRECATE_LEGACY_MODE]:`Legacy API mode has been deprecated in v11. Use Composition API mode instead.
5
5
  About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guide/advanced/composition.html`,[Rc.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]:`'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead.`,[Rc.DUPLICATE_USE_I18N_CALLING]:"Duplicate `useI18n` calling by local scope. Please don't call it on local scope, due to it does not work properly in component."};function Bc(e,...t){return Yi(zc[e],...t)}function Vc(e){if(!K(e)||so(e))return e;for(let t in e)if(la(e,t))if(!t.includes(`.`))K(e[t])&&Vc(e[t]);else{let n=t.split(`.`),r=n.length-1,i=e,a=!1;for(let e=0;e<r;e++){if(n[e]===`__proto__`)throw Error(`unsafe key: ${n[e]}`);if(n[e]in i||(i[n[e]]=V()),!K(i[n[e]])){process.env.NODE_ENV!==`production`&&Hi(Bc(Rc.IGNORE_OBJ_FLATTEN,{key:n[e]})),a=!0;break}i=i[n[e]]}if(a||(so(i)?Eo.includes(n[r])||delete e[t]:(i[n[r]]=e[t],delete e[t])),!so(i)){let e=i[n[r]];K(e)&&Vc(e)}}return e}function Hc(e,t){let{messages:n,__i18n:r,messageResolver:i,flatJson:a}=t,o=q(n)?n:H(r)?V():{[e]:V()};if(H(r)&&r.forEach(e=>{if(`locale`in e&&`resource`in e){let{locale:t,resource:n}=e;t?(o[t]=o[t]||V(),ya(n,o[t])):ya(n,o)}else W(e)&&ya(JSON.parse(e),o)}),i==null&&a)for(let e in o)la(o,e)&&Vc(o[e]);return o}function Uc(e){return e.type}function Wc(e,t,n){let r=K(t.messages)?t.messages:V();`__i18nGlobal`in n&&(r=Hc(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));let i=Object.keys(r);if(i.length&&i.forEach(t=>{e.mergeLocaleMessage(t,r[t])}),K(t.datetimeFormats)){let n=Object.keys(t.datetimeFormats);n.length&&n.forEach(n=>{e.mergeDateTimeFormat(n,t.datetimeFormats[n])})}if(K(t.numberFormats)){let n=Object.keys(t.numberFormats);n.length&&n.forEach(n=>{e.mergeNumberFormat(n,t.numberFormats[n])})}}function Gc(e){return(0,t.createVNode)(t.Text,null,e,0)}var Kc=`__INTLIFY_META__`,qc=()=>[],Jc=()=>!1,Yc=0;function Xc(e){return((n,r,i,a)=>e(r,i,(0,t.getCurrentInstance)()||void 0,a))}var Zc=()=>{let e=(0,t.getCurrentInstance)(),n=null;return e&&(n=Uc(e)[Kc])?{[Kc]:n}:null};function Qc(e={}){let{__root:n,__injectWithOption:r}=e,i=n===void 0,a=e.flatJson,o=Gi?t.ref:t.shallowRef,s=G(e.inheritLocale)?e.inheritLocale:!0,c=o(n&&s?n.locale.value:W(e.locale)?e.locale:hs),l=o(n&&s?n.fallbackLocale.value:W(e.fallbackLocale)||H(e.fallbackLocale)||q(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:c.value),u=o(Hc(c.value,e)),d=o(q(e.datetimeFormats)?e.datetimeFormats:{[c.value]:{}}),f=o(q(e.numberFormats)?e.numberFormats:{[c.value]:{}}),p=n?n.missingWarn:G(e.missingWarn)||ea(e.missingWarn)?e.missingWarn:!0,m=n?n.fallbackWarn:G(e.fallbackWarn)||ea(e.fallbackWarn)?e.fallbackWarn:!0,h=n?n.fallbackRoot:G(e.fallbackRoot)?e.fallbackRoot:!0,g=!!e.fallbackFormat,_=U(e.missing)?e.missing:null,v=U(e.missing)?Xc(e.missing):null,y=U(e.postTranslation)?e.postTranslation:null,b=n?n.warnHtmlMessage:G(e.warnHtmlMessage)?e.warnHtmlMessage:!0,x=!!e.escapeParameter,S=n?n.modifiers:q(e.modifiers)?e.modifiers:{},C=e.pluralRules||n&&n.pluralRules,w;w=(()=>{i&&ks(null);let t={version:Dc,locale:c.value,fallbackLocale:l.value,messages:u.value,modifiers:S,pluralRules:C,missing:v===null?void 0:v,missingWarn:p,fallbackWarn:m,fallbackFormat:g,unresolving:!0,postTranslation:y===null?void 0:y,warnHtmlMessage:b,escapeParameter:x,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:`vue`}};t.datetimeFormats=d.value,t.numberFormats=f.value,t.__datetimeFormatters=q(w)?w.__datetimeFormatters:void 0,t.__numberFormatters=q(w)?w.__numberFormatters:void 0,process.env.NODE_ENV!==`production`&&(t.__v_emitter=q(w)?w.__v_emitter:void 0);let n=Ms(t);return i&&ks(n),n})(),Ls(w,c.value,l.value);function T(){return[c.value,l.value,u.value,d.value,f.value]}let E=(0,t.computed)({get:()=>c.value,set:e=>{w.locale=e,c.value=e}}),D=(0,t.computed)({get:()=>l.value,set:e=>{w.fallbackLocale=e,l.value=e,Ls(w,c.value,e)}}),O=(0,t.computed)(()=>u.value),ee=(0,t.computed)(()=>d.value),te=(0,t.computed)(()=>f.value);function ne(){return U(y)?y:null}function re(e){y=e,w.postTranslation=e}function ie(){return _}function ae(e){e!==null&&(v=Xc(e)),_=e,w.missing=v}function oe(e,t){return e!==`translate`||!t.resolvedMessage}let se=(e,t,r,a,o,s)=>{T();let c;try{process.env.NODE_ENV!==`production`||__INTLIFY_PROD_DEVTOOLS__,i||(w.fallbackContext=n?As():void 0),c=e(w)}finally{process.env.NODE_ENV!==`production`||__INTLIFY_PROD_DEVTOOLS__,i||(w.fallbackContext=void 0)}if(r!==`translate exists`&&z(c)&&c===-1||r===`translate exists`&&!c){let[e,i]=t();if(process.env.NODE_ENV!==`production`&&n&&W(e)&&oe(r,i)&&(h&&(Ps(m,e)||Fs(p,e))&&Hi(Bc(Rc.FALLBACK_TO_ROOT,{key:e,type:r})),process.env.NODE_ENV!==`production`)){let{__v_emitter:t}=w;t&&h&&t.emit(`fallback`,{type:r,key:e,to:`global`,groupId:`${r}:${e}`})}return n&&h?a(n):o(e)}else if(s(c))return c;else throw $(Q.UNEXPECTED_RETURN_TYPE)};function k(...e){return se(t=>Reflect.apply(sc,null,[t,...e]),()=>fc(...e),`translate`,t=>Reflect.apply(t.t,t,[...e]),e=>e,e=>W(e))}function ce(...e){let[t,n,r]=e;if(r&&!K(r))throw $(Q.INVALID_ARGUMENT);return k(t,n,B({resolvedMessage:!0},r||{}))}function le(...e){return se(t=>Reflect.apply(Hs,null,[t,...e]),()=>Ws(...e),`datetime format`,t=>Reflect.apply(t.d,t,[...e]),()=>``,e=>W(e)||H(e))}function ue(...e){return se(t=>Reflect.apply(Ks,null,[t,...e]),()=>Js(...e),`number format`,t=>Reflect.apply(t.n,t,[...e]),()=>``,e=>W(e)||H(e))}function de(e){return e.map(e=>W(e)||z(e)||G(e)?Gc(String(e)):e)}let fe={normalize:de,interpolate:e=>e,type:`vnode`};function pe(...e){return se(t=>{let n,r=t;try{r.processor=fe,n=Reflect.apply(sc,null,[r,...e])}finally{r.processor=null}return n},()=>fc(...e),`translate`,t=>t[Ac](...e),e=>[Gc(e)],e=>H(e))}function me(...e){return se(t=>Reflect.apply(Ks,null,[t,...e]),()=>Js(...e),`number format`,t=>t[Mc](...e),qc,e=>W(e)||H(e))}function he(...e){return se(t=>Reflect.apply(Hs,null,[t,...e]),()=>Ws(...e),`datetime format`,t=>t[jc](...e),qc,e=>W(e)||H(e))}function ge(e){C=e,w.pluralRules=C}function _e(e,t){return se(()=>{if(!e)return!1;let n=be(W(t)?t:c.value),r=w.messageResolver(n,e);return so(r)||oc(r)||W(r)},()=>[e],`translate exists`,n=>Reflect.apply(n.te,n,[e,t]),Jc,e=>G(e))}function ve(e){let t=null,n=Xo(w,l.value,c.value);for(let r=0;r<n.length;r++){let i=u.value[n[r]]||{},a=w.messageResolver(i,e);if(a!=null){t=a;break}}return t}function ye(e){return ve(e)??(n&&n.tm(e)||{})}function be(e){return u.value[e]||{}}function xe(e,t){if(a){let n={[e]:t};for(let e in n)la(n,e)&&Vc(n[e]);t=n[e]}u.value[e]=t,w.messages=u.value}function Se(e,t){u.value[e]=u.value[e]||{};let n={[e]:t};if(a)for(let e in n)la(n,e)&&Vc(n[e]);t=n[e],ya(t,u.value[e]),w.messages=u.value}function Ce(e){return d.value[e]||{}}function we(e,t){d.value[e]=t,w.datetimeFormats=d.value,Gs(w,e,t)}function Te(e,t){d.value[e]=B(d.value[e]||{},t),w.datetimeFormats=d.value,Gs(w,e,t)}function Ee(e){return f.value[e]||{}}function De(e,t){f.value[e]=t,w.numberFormats=f.value,Ys(w,e,t)}function Oe(e,t){f.value[e]=B(f.value[e]||{},t),w.numberFormats=f.value,Ys(w,e,t)}Yc++,n&&Gi&&((0,t.watch)(n.locale,e=>{s&&(c.value=e,w.locale=e,Ls(w,c.value,l.value))}),(0,t.watch)(n.fallbackLocale,e=>{s&&(l.value=e,w.fallbackLocale=e,Ls(w,c.value,l.value))}));let A={id:Yc,locale:E,fallbackLocale:D,get inheritLocale(){return s},set inheritLocale(e){s=e,e&&n&&(c.value=n.locale.value,l.value=n.fallbackLocale.value,Ls(w,c.value,l.value))},get availableLocales(){return Object.keys(u.value).sort()},messages:O,get modifiers(){return S},get pluralRules(){return C||{}},get isGlobal(){return i},get missingWarn(){return p},set missingWarn(e){p=e,w.missingWarn=p},get fallbackWarn(){return m},set fallbackWarn(e){m=e,w.fallbackWarn=m},get fallbackRoot(){return h},set fallbackRoot(e){h=e},get fallbackFormat(){return g},set fallbackFormat(e){g=e,w.fallbackFormat=g},get warnHtmlMessage(){return b},set warnHtmlMessage(e){b=e,w.warnHtmlMessage=e},get escapeParameter(){return x},set escapeParameter(e){x=e,w.escapeParameter=e},t:k,getLocaleMessage:be,setLocaleMessage:xe,mergeLocaleMessage:Se,getPostTranslationHandler:ne,setPostTranslationHandler:re,getMissingHandler:ie,setMissingHandler:ae,[Fc]:ge};return A.datetimeFormats=ee,A.numberFormats=te,A.rt=ce,A.te=_e,A.tm=ye,A.d=le,A.n=ue,A.getDateTimeFormat=Ce,A.setDateTimeFormat=we,A.mergeDateTimeFormat=Te,A.getNumberFormat=Ee,A.setNumberFormat=De,A.mergeNumberFormat=Oe,A[Ic]=r,A[Ac]=pe,A[jc]=he,A[Mc]=me,process.env.NODE_ENV!==`production`&&(A[Nc]=e=>{w.__v_emitter=e},A[Pc]=()=>{w.__v_emitter=void 0}),A}var $c=`vue-i18n: composer properties`,el={"vue-devtools-plugin-vue-i18n":`Vue I18n DevTools`,"vue-i18n-resource-inspector":`Vue I18n DevTools`,"vue-i18n-timeline":`Vue I18n`},tl={"vue-i18n-resource-inspector":`Search for scopes ...`},nl={"vue-i18n-timeline":16764185},rl;async function il(e,t){return new Promise((n,r)=>{try{Ec({id:`vue-devtools-plugin-vue-i18n`,label:el[`vue-devtools-plugin-vue-i18n`],packageName:`vue-i18n`,homepage:`https://vue-i18n.intlify.dev`,logo:`https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png`,componentStateTypes:[$c],app:e},r=>{rl=r,r.on.visitComponentTree(({componentInstance:e,treeNode:n})=>{ol(e,n,t)}),r.on.inspectComponent(({componentInstance:e,instanceData:n})=>{e.vnode.el&&e.vnode.el.__VUE_I18N__&&n&&(t.mode===`legacy`?e.vnode.el.__VUE_I18N__!==t.global.__composer&&sl(n,e.vnode.el.__VUE_I18N__):sl(n,e.vnode.el.__VUE_I18N__))}),r.addInspector({id:`vue-i18n-resource-inspector`,label:el[`vue-i18n-resource-inspector`],icon:`language`,treeFilterPlaceholder:tl[`vue-i18n-resource-inspector`]}),r.on.getInspectorTree(n=>{n.app===e&&n.inspectorId===`vue-i18n-resource-inspector`&&pl(n,t)});let i=new Map;r.on.getInspectorState(async n=>{if(n.app===e&&n.inspectorId===`vue-i18n-resource-inspector`)if(r.unhighlightElement(),gl(n,t),n.nodeId===`global`){if(!i.has(n.app)){let[e]=await r.getComponentInstances(n.app);i.set(n.app,e)}r.highlightElement(i.get(n.app))}else{let e=ml(n.nodeId,t);e&&r.highlightElement(e)}}),r.on.editInspectorState(n=>{n.app===e&&n.inspectorId===`vue-i18n-resource-inspector`&&yl(n,t)}),r.addTimelineLayer({id:`vue-i18n-timeline`,label:el[`vue-i18n-timeline`],color:nl[`vue-i18n-timeline`]}),n(!0)})}catch(e){console.error(e),r(!1)}})}function al(e){return e.type.name||e.type.displayName||e.type.__file||`Anonymous`}function ol(e,t,n){let r=n.mode===`composition`?n.global:n.global.__composer;if(e&&e.vnode.el&&e.vnode.el.__VUE_I18N__&&e.vnode.el.__VUE_I18N__!==r){let n={label:`i18n (${al(e)} Scope)`,textColor:0,backgroundColor:16764185};t.tags.push(n)}}function sl(e,t){let n=$c;e.state.push({type:n,key:`locale`,editable:!0,value:t.locale.value}),e.state.push({type:n,key:`availableLocales`,editable:!1,value:t.availableLocales}),e.state.push({type:n,key:`fallbackLocale`,editable:!0,value:t.fallbackLocale.value}),e.state.push({type:n,key:`inheritLocale`,editable:!0,value:t.inheritLocale}),e.state.push({type:n,key:`messages`,editable:!1,value:cl(t.messages.value)}),e.state.push({type:n,key:`datetimeFormats`,editable:!1,value:t.datetimeFormats.value}),e.state.push({type:n,key:`numberFormats`,editable:!1,value:t.numberFormats.value})}function cl(e){let t={};return Object.keys(e).forEach(n=>{let r=e[n];U(r)&&`source`in r?t[n]=fl(r):so(r)&&r.loc&&r.loc.source?t[n]=r.loc.source:K(r)?t[n]=cl(r):t[n]=r}),t}var ll={"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"&":`&amp;`};function ul(e){return e.replace(/[<>"&]/g,dl)}function dl(e){return ll[e]||e}function fl(e){return{_custom:{type:`function`,display:`<span>ƒ</span> ${e.source?`("${ul(e.source)}")`:`(?)`}`}}}function pl(e,t){e.rootNodes.push({id:`global`,label:`Global Scope`});let n=t.mode===`composition`?t.global:t.global.__composer;for(let[r,i]of t.__instances){let a=t.mode===`composition`?i:i.__composer;n!==a&&e.rootNodes.push({id:a.id.toString(),label:`${al(r)} Scope`})}}function ml(e,t){let n=null;if(e!==`global`){for(let[r,i]of t.__instances.entries())if(i.id.toString()===e){n=r;break}}return n}function hl(e,t){if(e===`global`)return t.mode===`composition`?t.global:t.global.__composer;{let n=Array.from(t.__instances.values()).find(t=>t.id.toString()===e);return n?t.mode===`composition`?n:n.__composer:null}}function gl(e,t){let n=hl(e.nodeId,t);return n&&(e.state=_l(n)),null}function _l(e){let t={},n=`Locale related info`;t[n]=[{type:n,key:`locale`,editable:!0,value:e.locale.value},{type:n,key:`fallbackLocale`,editable:!0,value:e.fallbackLocale.value},{type:n,key:`availableLocales`,editable:!1,value:e.availableLocales},{type:n,key:`inheritLocale`,editable:!0,value:e.inheritLocale}];let r=`Locale messages info`;t[r]=[{type:r,key:`messages`,editable:!1,value:cl(e.messages.value)}];{let n=`Datetime formats info`;t[n]=[{type:n,key:`datetimeFormats`,editable:!1,value:e.datetimeFormats.value}];let r=`Datetime formats info`;t[r]=[{type:r,key:`numberFormats`,editable:!1,value:e.numberFormats.value}]}return t}function vl(e,t){if(rl){let n;t&&`groupId`in t&&(n=t.groupId,delete t.groupId),rl.addTimelineEvent({layerId:`vue-i18n-timeline`,event:{title:e,groupId:n,time:Date.now(),meta:{},data:t||{},logType:e===`compile-error`?`error`:e===`fallback`||e===`missing`?`warning`:`default`}})}}function yl(e,t){let n=hl(e.nodeId,t);if(n){let[t]=e.path;t===`locale`&&W(e.state.value)?n.locale.value=e.state.value:t===`fallbackLocale`&&(W(e.state.value)||H(e.state.value)||K(e.state.value))?n.fallbackLocale.value=e.state.value:t===`inheritLocale`&&G(e.state.value)&&(n.inheritLocale=e.state.value)}}function bl(e){let t=W(e.locale)?e.locale:hs,n=W(e.fallbackLocale)||H(e.fallbackLocale)||q(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,r=U(e.missing)?e.missing:void 0,i=G(e.silentTranslationWarn)||ea(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,a=G(e.silentFallbackWarn)||ea(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,o=G(e.fallbackRoot)?e.fallbackRoot:!0,s=!!e.formatFallbackMessages,c=q(e.modifiers)?e.modifiers:{},l=e.pluralizationRules,u=U(e.postTranslation)?e.postTranslation:void 0,d=W(e.warnHtmlInMessage)?e.warnHtmlInMessage!==`off`:!0,f=!!e.escapeParameterHtml,p=G(e.sync)?e.sync:!0,m=e.messages;if(q(e.sharedMessages)){let t=e.sharedMessages;m=Object.keys(t).reduce((e,n)=>(B(e[n]||(e[n]={}),t[n]),e),m||{})}let{__i18n:h,__root:g,__injectWithOption:_}=e,v=e.datetimeFormats,y=e.numberFormats,b=e.flatJson;return{locale:t,fallbackLocale:n,messages:m,flatJson:b,datetimeFormats:v,numberFormats:y,missing:r,missingWarn:i,fallbackWarn:a,fallbackRoot:o,fallbackFormat:s,modifiers:c,pluralRules:l,postTranslation:u,warnHtmlMessage:d,escapeParameter:f,messageResolver:e.messageResolver,inheritLocale:p,__i18n:h,__root:g,__injectWithOption:_}}function xl(e={}){let t=Qc(bl(e)),{__extender:n}=e,r={id:t.id,get locale(){return t.locale.value},set locale(e){t.locale.value=e},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(e){t.fallbackLocale.value=e},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(e){t.setMissingHandler(e)},get silentTranslationWarn(){return G(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(e){t.missingWarn=G(e)?!e:e},get silentFallbackWarn(){return G(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(e){t.fallbackWarn=G(e)?!e:e},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(e){t.fallbackFormat=e},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(e){t.setPostTranslationHandler(e)},get sync(){return t.inheritLocale},set sync(e){t.inheritLocale=e},get warnHtmlInMessage(){return t.warnHtmlMessage?`warn`:`off`},set warnHtmlInMessage(e){t.warnHtmlMessage=e!==`off`},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(e){t.escapeParameter=e},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...e){return Reflect.apply(t.t,t,[...e])},rt(...e){return Reflect.apply(t.rt,t,[...e])},te(e,n){return t.te(e,n)},tm(e){return t.tm(e)},getLocaleMessage(e){return t.getLocaleMessage(e)},setLocaleMessage(e,n){t.setLocaleMessage(e,n)},mergeLocaleMessage(e,n){t.mergeLocaleMessage(e,n)},d(...e){return Reflect.apply(t.d,t,[...e])},getDateTimeFormat(e){return t.getDateTimeFormat(e)},setDateTimeFormat(e,n){t.setDateTimeFormat(e,n)},mergeDateTimeFormat(e,n){t.mergeDateTimeFormat(e,n)},n(...e){return Reflect.apply(t.n,t,[...e])},getNumberFormat(e){return t.getNumberFormat(e)},setNumberFormat(e,n){t.setNumberFormat(e,n)},mergeNumberFormat(e,n){t.mergeNumberFormat(e,n)}};return r.__extender=n,process.env.NODE_ENV!==`production`&&(r.__enableEmitter=e=>{let n=t;n[Nc]&&n[Nc](e)},r.__disableEmitter=()=>{let e=t;e[Pc]&&e[Pc]()}),r}function Sl(e,n,r){return{beforeCreate(){let i=(0,t.getCurrentInstance)();if(!i)throw $(Q.UNEXPECTED_ERROR);let a=this.$options;if(a.i18n){let t=a.i18n;if(a.__i18n&&(t.__i18n=a.__i18n),t.__root=n,this===this.$root)this.$i18n=Cl(e,t);else{t.__injectWithOption=!0,t.__extender=r.__vueI18nExtend,this.$i18n=xl(t);let e=this.$i18n;e.__extender&&(e.__disposer=e.__extender(this.$i18n))}}else if(a.__i18n)if(this===this.$root)this.$i18n=Cl(e,a);else{this.$i18n=xl({__i18n:a.__i18n,__injectWithOption:!0,__extender:r.__vueI18nExtend,__root:n});let e=this.$i18n;e.__extender&&(e.__disposer=e.__extender(this.$i18n))}else this.$i18n=e;a.__i18nGlobal&&Wc(n,a,a),this.$t=(...e)=>this.$i18n.t(...e),this.$rt=(...e)=>this.$i18n.rt(...e),this.$te=(e,t)=>this.$i18n.te(e,t),this.$d=(...e)=>this.$i18n.d(...e),this.$n=(...e)=>this.$i18n.n(...e),this.$tm=e=>this.$i18n.tm(e),r.__setInstance(i,this.$i18n)},mounted(){if(process.env.NODE_ENV!==`production`&&this.$el&&this.$i18n){let e=this.$i18n;this.$el.__VUE_I18N__=e.__composer;let t=this.__v_emitter=_a();e.__enableEmitter&&e.__enableEmitter(t),t.on(`*`,vl)}},unmounted(){let e=(0,t.getCurrentInstance)();if(!e)throw $(Q.UNEXPECTED_ERROR);let n=this.$i18n;process.env.NODE_ENV!==`production`&&this.$el&&this.$el.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off(`*`,vl),delete this.__v_emitter),this.$i18n&&(n.__disableEmitter&&n.__disableEmitter(),delete this.$el.__VUE_I18N__)),delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,n.__disposer&&(n.__disposer(),delete n.__disposer,delete n.__extender),r.__deleteInstance(e),delete this.$i18n}}}function Cl(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[Fc](t.pluralizationRules||e.pluralizationRules);let n=Hc(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(t=>e.mergeLocaleMessage(t,n[t])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(n=>e.mergeDateTimeFormat(n,t.datetimeFormats[n])),t.numberFormats&&Object.keys(t.numberFormats).forEach(n=>e.mergeNumberFormat(n,t.numberFormats[n])),e}var wl={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e===`parent`||e===`global`,default:`parent`},i18n:{type:Object}};function Tl({slots:e},n){return n.length===1&&n[0]===`default`?(e.default?e.default():[]).reduce((e,n)=>[...e,...n.type===t.Fragment?n.children:[n]],[]):n.reduce((t,n)=>{let r=e[n];return r&&(t[n]=r()),t},V())}function El(){return t.Fragment}var Dl=(0,t.defineComponent)({name:`i18n-t`,props:B({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>z(e)||!isNaN(e)}},wl),setup(e,n){let{slots:r,attrs:i}=n,a=e.i18n||Rl({useScope:e.scope,__useComponent:!0});return()=>{let o=Object.keys(r).filter(e=>e[0]!==`_`),s=V();e.locale&&(s.locale=e.locale),e.plural!==void 0&&(s.plural=W(e.plural)?+e.plural:e.plural);let c=Tl(n,o),l=a[Ac](e.keypath,c,s),u=B(V(),i);return(0,t.h)(W(e.tag)||K(e.tag)?e.tag:El(),u,l)}}});function Ol(e){return H(e)&&!W(e[0])}function kl(e,n,r,i){let{slots:a,attrs:o}=n;return()=>{let n={part:!0},s=V();e.locale&&(n.locale=e.locale),W(e.format)?n.key=e.format:K(e.format)&&(W(e.format.key)&&(n.key=e.format.key),s=Object.keys(e.format).reduce((t,n)=>r.includes(n)?B(V(),t,{[n]:e.format[n]}):t,V()));let c=i(e.value,n,s),l=[n.key];H(c)?l=c.map((e,t)=>{let n=a[e.type],r=n?n({[e.type]:e.value,index:t,parts:c}):[e.value];return Ol(r)&&(r[0].key=`${e.type}-${t}`),r}):W(c)&&(l=[c]);let u=B(V(),o);return(0,t.h)(W(e.tag)||K(e.tag)?e.tag:El(),u,l)}}var Al=(0,t.defineComponent)({name:`i18n-n`,props:B({value:{type:Number,required:!0},format:{type:[String,Object]}},wl),setup(e,t){let n=e.i18n||Rl({useScope:e.scope,__useComponent:!0});return kl(e,t,qs,(...e)=>n[Mc](...e))}});function jl(e,t){let n=e;if(e.mode===`composition`)return n.__getInstance(t)||e.global;{let r=n.__getInstance(t);return r==null?e.global.__composer:r.__composer}}function Ml(e){let n=t=>{process.env.NODE_ENV!==`production`&&Wi(Bc(Rc.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE));let{instance:n,value:r}=t;if(!n||!n.$)throw $(Q.UNEXPECTED_ERROR);let i=jl(e,n.$),a=Nl(r);return[Reflect.apply(i.t,i,[...Pl(a)]),i]};return{created:(r,i)=>{let[a,o]=n(i);Gi&&e.global===o&&(r.__i18nWatcher=(0,t.watch)(o.locale,()=>{i.instance&&i.instance.$forceUpdate()})),r.__composer=o,r.textContent=a},unmounted:e=>{Gi&&e.__i18nWatcher&&(e.__i18nWatcher(),e.__i18nWatcher=void 0,delete e.__i18nWatcher),e.__composer&&(e.__composer=void 0,delete e.__composer)},beforeUpdate:(e,{value:t})=>{if(e.__composer){let n=e.__composer,r=Nl(t);e.textContent=Reflect.apply(n.t,n,[...Pl(r)])}},getSSRProps:e=>{let[t]=n(e);return{textContent:t}}}}function Nl(e){if(W(e))return{path:e};if(q(e)){if(!(`path`in e))throw $(Q.REQUIRED_VALUE,`path`);return e}else throw $(Q.INVALID_VALUE)}function Pl(e){let{path:t,locale:n,args:r,choice:i,plural:a}=e,o={},s=r||{};return W(n)&&(o.locale=n),z(i)&&(o.plural=i),z(a)&&(o.plural=a),[t,s,o]}function Fl(e,t,...n){let r=q(n[0])?n[0]:{};(!G(r.globalInstall)||r.globalInstall)&&([Dl.name,`I18nT`].forEach(t=>e.component(t,Dl)),[Al.name,`I18nN`].forEach(t=>e.component(t,Al)),[Yl.name,`I18nD`].forEach(t=>e.component(t,Yl))),e.directive(`t`,Ml(t))}var Il=Xi(`global-vue-i18n`);function Ll(e={}){let t=__VUE_I18N_LEGACY_API__&&G(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__;process.env.NODE_ENV!==`production`&&t&&Wi(Bc(Rc.DEPRECATE_LEGACY_MODE));let n=G(e.globalInjection)?e.globalInjection:!0,r=new Map,[i,a]=zl(e,t),o=Xi(process.env.NODE_ENV===`production`?``:`vue-i18n`);function s(e){return r.get(e)||null}function c(e,t){r.set(e,t)}function l(e){r.delete(e)}let u={get mode(){return __VUE_I18N_LEGACY_API__&&t?`legacy`:`composition`},async install(e,...r){if(process.env.NODE_ENV!==`production`&&(e.__VUE_I18N__=u),e.__VUE_I18N_SYMBOL__=o,e.provide(e.__VUE_I18N_SYMBOL__,u),q(r[0])){let e=r[0];u.__composerExtend=e.__composerExtend,u.__vueI18nExtend=e.__vueI18nExtend}let i=null;!t&&n&&(i=Jl(e,u.global)),__VUE_I18N_FULL_INSTALL__&&Fl(e,u,...r),__VUE_I18N_LEGACY_API__&&t&&e.mixin(Sl(a,a.__composer,u));let s=e.unmount;if(e.unmount=()=>{i&&i(),u.dispose(),s()},process.env.NODE_ENV!==`production`){if(!await il(e,u))throw $(Q.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);let n=_a();if(t){let e=a;e.__enableEmitter&&e.__enableEmitter(n)}else{let e=a;e[Nc]&&e[Nc](n)}n.on(`*`,vl)}},get global(){return a},dispose(){i.stop()},__instances:r,__getInstance:s,__setInstance:c,__deleteInstance:l};return u}function Rl(e={}){let n=(0,t.getCurrentInstance)();if(n==null)throw $(Q.MUST_BE_CALL_SETUP_TOP);if(!n.isCE&&n.appContext.app!=null&&!n.appContext.app.__VUE_I18N_SYMBOL__)throw $(Q.NOT_INSTALLED);let r=Bl(n),i=Hl(r),a=Uc(n),o=Vl(e,a);if(o===`global`)return Wc(i,e,a),i;if(o===`parent`){let t=Ul(r,n,e.__useComponent);return t??=(process.env.NODE_ENV!==`production`&&Hi(Bc(Rc.NOT_FOUND_PARENT_SCOPE)),i),t}let s=r,c=s.__getInstance(n);if(c==null){let t=B({},e);`__i18n`in a&&(t.__i18n=a.__i18n),i&&(t.__root=i),c=Qc(t),s.__composerExtend&&(c[Lc]=s.__composerExtend(c)),Gl(s,n,c),s.__setInstance(n,c)}else process.env.NODE_ENV!==`production`&&o===`local`&&Hi(Bc(Rc.DUPLICATE_USE_I18N_CALLING));return c}function zl(e,n){let r=(0,t.effectScope)(),i=__VUE_I18N_LEGACY_API__&&n?r.run(()=>xl(e)):r.run(()=>Qc(e));if(i==null)throw $(Q.UNEXPECTED_ERROR);return[r,i]}function Bl(e){let n=(0,t.inject)(e.isCE?Il:e.appContext.app.__VUE_I18N_SYMBOL__);if(!n)throw $(e.isCE?Q.NOT_INSTALLED_WITH_PROVIDE:Q.UNEXPECTED_ERROR);return n}function Vl(e,t){return ta(e)?`__i18n`in t?`local`:`global`:e.useScope?e.useScope:`local`}function Hl(e){return e.mode===`composition`?e.global:e.global.__composer}function Ul(e,t,n=!1){let r=null,i=t.root,a=Wl(t,n);for(;a!=null;){let t=e;if(e.mode===`composition`)r=t.__getInstance(a);else if(__VUE_I18N_LEGACY_API__){let e=t.__getInstance(a);e!=null&&(r=e.__composer,n&&r&&!r[Ic]&&(r=null))}if(r!=null||i===a)break;a=a.parent}return r}function Wl(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function Gl(e,n,r){let i=null;(0,t.onMounted)(()=>{if(process.env.NODE_ENV!==`production`&&n.vnode.el){n.vnode.el.__VUE_I18N__=r,i=_a();let e=r;e[Nc]&&e[Nc](i),i.on(`*`,vl)}},n),(0,t.onUnmounted)(()=>{let t=r;process.env.NODE_ENV!==`production`&&n.vnode.el&&n.vnode.el.__VUE_I18N__&&(i&&i.off(`*`,vl),t[Pc]&&t[Pc](),delete n.vnode.el.__VUE_I18N__),e.__deleteInstance(n);let a=t[Lc];a&&(a(),delete t[Lc])},n)}var Kl=[`locale`,`fallbackLocale`,`availableLocales`],ql=[`t`,`rt`,`d`,`n`,`tm`,`te`];function Jl(e,n){let r=Object.create(null);return Kl.forEach(e=>{let i=Object.getOwnPropertyDescriptor(n,e);if(!i)throw $(Q.UNEXPECTED_ERROR);let a=(0,t.isRef)(i.value)?{get(){return i.value.value},set(e){i.value.value=e}}:{get(){return i.get&&i.get()}};Object.defineProperty(r,e,a)}),e.config.globalProperties.$i18n=r,ql.forEach(t=>{let r=Object.getOwnPropertyDescriptor(n,t);if(!r||!r.value)throw $(Q.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${t}`,r)}),()=>{delete e.config.globalProperties.$i18n,ql.forEach(t=>{delete e.config.globalProperties[`$${t}`]})}}var Yl=(0,t.defineComponent)({name:`i18n-d`,props:B({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},wl),setup(e,t){let n=e.i18n||Rl({useScope:e.scope,__useComponent:!0});return kl(e,t,Us,(...e)=>n[jc](...e))}});if(Oc(),bs(Lo),Ss(ls),ws(Xo),process.env.NODE_ENV!==`production`||__INTLIFY_PROD_DEVTOOLS__){let e=ia();e.__INTLIFY__=!0,zo(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;const Xl={yes:`是`,no:`否`,actions:`操作`,add:`添加`,delete:`删除`,edit:`编辑`,save:`保存`,confirm:`确定`,cancel:`取消`,close:`关闭`,clear:`清除`,more:`更多`,"action-prompt":`操作提示`,"close-confirm":`确定关闭吗?`,"delete-confirm":`确定删除吗?`,"cancel-confirm":`确定取消吗?`,"edit-confirm":`确定编辑吗?`,"save-confirm":`确定保存吗?`,"save-success":`保存成功`,"save-error":`保存失败`,"delete-success":`删除成功`,"delete-error":`删除失败`,success:`成功`,error:`错误`,fail:`失败`,loading:`加载中`,"loading-finished":`数据加载完毕`,data:`数据`,"no-data":`暂无数据`,content:`内容`,"no-content":`暂无内容`,search:`搜索`,start:`开始`,end:`结束`},Zl={"please-select":`请选择{title}`,"please-input":`请填写{title}`,"please-upload":`请上传{title}`,"search-placeholder":`请输入搜索内容`,upload:`上传`,"upload-fail":`上传失败,请稍后再试`,"upload-size-limit":`超过服务器上传附件的大小限制`,"upload-size-max":`上传文件大小不能超过{size}MB`,"upload-num-max":`最多只能上传{num}个文件`,options:`选项`,title:`标题`,"row-title":`行标题`,scale:`分值`,attachment:`附件`},Ql={equal:`等于`,"not-equal":`不等于`,include:`包含`,exclude:`不包含`,"include-sub":`包括子级`,"less-than":`小于`,"greater-than":`大于`,between:`介于`,null:`为空`,"not-null":`不为空`,"multiple-choice-available":`可多选`,"start-time":`开始时间`,"end-time":`结束时间`,"last-week":`上周`,"last-month":`上个月`,"past-week":`过去一周`,"past-two-weeks":`过去两周`,"past-month":`过去一个月`,"past-days":`过去{days}天`,"textarea-placeholder":`搜索{title},每行一个`,"sort-setting":`排序设置`,"toggle-more":`展示/关闭更多搜索选项`,collapse:`收起`,"clear-all-search-items":`清除所有搜索项`,"search-items":`搜索条件`,"item-unit":`项`,"items-unit":`项`,"sortable-items":`可排序项`,"sorted-items":`已排序项`,"select-sorting-item":`请选择排序项`,ascending:`升序排序`,descending:`降序排序`,"remove-item":`移除当前项`},$l={editable:`可编辑`,total:`共 {total} 条`,custom:`自定义列`,"select-all":`全选`,"unselect-all":`取消全选`,attachment:`查看附件 {title}`,"copy-success":`复制成功`};var eu={common:Xl,form:Zl,search:Ql,table:$l,"signature-pad":{agreement:`请先同意协议`}};const tu={yes:`Yes`,no:`No`,actions:`Actions`,add:`Add`,delete:`Delete`,edit:`Edit`,save:`Save`,confirm:`Confirm`,cancel:`Cancel`,close:`Close`,clear:`Clear`,more:`More`,"action-prompt":`Tips`,"close-confirm":`Are you sure you want to close?`,"delete-confirm":`Are you sure you want to delete this item?`,"cancel-confirm":`Are you sure you want to cancel this action?`,"edit-confirm":`Are you sure you want to edit this item?`,"save-confirm":`Are you sure you want to save this item?`,"save-success":`Save success`,"save-error":`Save error`,"delete-success":`Delete success`,"delete-error":`Delete error`,success:`Success`,error:`Error`,fail:`Fail`,loading:`Loading`,"loading-finished":`Finished`,data:`Data`,"no-data":`No data`,content:`Content`,"no-content":`No content`,search:`Search`,start:`Start`,end:`End`},nu={"please-select":`Please select {title}`,"please-input":`Please input {title}`,"please-upload":`Please upload {title}`,"search-placeholder":`Please enter search content`,upload:`Upload`,"upload-fail":`Upload fail`,"upload-size-limit":`Exceeded the server upload attachment size limit`,"upload-size-max":`The maximum file size you can upload is {size}MB`,"upload-num-max":`You can only upload up to {num} files`,options:`Options`,title:`Title`,"row-title":`Row title`,scale:`Scale`,attachment:`Attachment`},ru={equal:`Equal to`,"not-equal":`Not equal to`,include:`Include`,exclude:`Exclude`,"include-sub":`Include sub-level`,"less-than":`Less than`,"greater-than":`Greater than`,between:`Between`,null:`Null`,"not-null":`Not null`,"multiple-choice-available":`Multiple choice available`,"start-time":`Start time`,"end-time":`End time`,"last-week":`Last week`,"last-month":`Last month`,"past-week":`Past week`,"past-two-weeks":`Past two weeks`,"past-month":`Past month`,"past-days":`Past {days} days`,"textarea-placeholder":`Search {title},one per line`,"sort-setting":`Sort setting`,"toggle-more":`Show/Hide More Search Options`,collapse:`Collapse`,"clear-all-search-items":`Clear all search items`,"search-items":`Search`,"item-unit":`item`,"items-unit":`items`,"sortable-items":`Sortable items`,"sorted-items":`Sorted items`,"select-sorting-item":`Please select sorting items`,ascending:`Ascending`,descending:`Descending`,"remove-item":`Remove sorting item`},iu={editable:`Editable`,total:`Total {total}`,custom:`Custom`,"select-all":`Select all`,"unselect-all":`Unselect all`,attachment:`Attachment {title}`,"copy-success":`Copy success`};var au={common:tu,form:nu,search:ru,table:iu,"signature-pad":{agreement:`Please check the agreement`}},ou=Ll({legacy:!1,locale:`zh_CN`,fallbackLocale:`zh_CN`,messages:{zh_CN:eu,en_US:au}}),su=ou;function cu(e,t,r,a){let o=n.Modal.confirm({title:su.global.t(`common.action-prompt`),content:e||``,onOk:()=>(t&&(0,i.isFunction)(t)&&t(),r?(o.update({okButtonProps:{loading:!0}}),new Promise(()=>{})):null),onCancel:()=>{a&&(0,i.isFunction)(a)&&a()}});return o}function lu(e,t){if(!t)return``;let n=t.find(t=>t.value===e);return n?n.label:``}function uu(e,t,n){n||={value:`value`,label:`label`,children:`children`};let r=[];function i(e){t.includes(e[n.value])&&r.push(e[n.label]),e[n.children]?.length&&e[n.children].forEach(e=>{i(e)})}return e.forEach(e=>{i(e)}),r}function du(e,t,n){n||={value:`value`,label:`label`,children:`children`};for(let r of e){if(r[n.value]===t)return r;if(r[n.children]&&r[n.children].length){let e=du(r[n.children],t,n);if(e)return e}}return null}function fu(e,t,n){n||={value:`value`,label:`label`,children:`children`};let r=[];return(0,i.reduce)(t,(e,t)=>{let a=(0,i.find)(e,{[n.value]:t});if(a)return r.push(a[n.label]),a[n.children]},e),r}function pu(e,t,n){n||={value:`value`,label:`label`,children:`children`};let r=[];function i(e,t,r){for(let a of e)if(a[n.value]===t){r.unshift(a[n.label]);break}else if(a[n.children]&&i(a[n.children],t,r).length>0){r.unshift(a[n.label]);break}return r}return i(e,t,r)}function mu(e,t,n){n||={value:`value`,label:`label`,children:`children`};let r=[];function i(e,t,r){for(let a of e)if(a[n.value]===t){r.unshift(a[n.value]);break}else if(a[n.children]&&i(a[n.children],t,r).length>0){r.unshift(a[n.value]);break}return r}return i(e,t,r)}function hu(e,t,n){return(0,i.flatMapDeep)(e,(e,r)=>r===t?e:r===n?hu(e,t,n):[])}var gu={},_u={setItem(e,t){gu[e]=t},getItem(e){return gu[e]},removeItem(e){delete gu[e]}};window._printCache=()=>{console.log(JSON.parse(JSON.stringify(gu,null,2)))};function vu(e,t){let n=t||_u,r=!!t;return{get(t){let a=n.getItem(e);return(0,i.isNull)(a)||(0,i.isUndefined)(a)?t:r?JSON.parse(a):a},set(t){n.setItem(e,r?JSON.stringify(t):t)},remove(){n.removeItem(e)}}}function yu(e,t=2){if(typeof e!=`number`&&isNaN(e))return 0;let n=10**t;return Math.round(e*n)/n}function bu(e,t){t||={};let n={};switch(e){case`email`:n.pattern=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,n.message=t.message||`请填写正确的邮箱地址`;break;case`phone`:t.mode===`strict`?n.pattern=/^(?:(?:\+|00)86)?1(?:(?:3[\d])|(?:4[5-7|9])|(?:5[0-3|5-9])|(?:6[5-7])|(?:7[0-8])|(?:8[\d])|(?:9[1|8|9]))\d{8}$/:n.pattern=/^(?:(?:\+|00)86)?1[3-9]\d{9}$/,n.message=t.message||`请填写正确的手机号码`;break;case`tel`:case`telephone`:t.strict===`strict`?n.pattern=/^\d{3}-\d{8}$|^\d{4}-\d{7,8}$/:n.pattern=/^(?:\d{3}-)?\d{8}$|^(?:\d{4}-)?\d{7,8}$/,n.message=t.message||`请填写正确的座机号码`;break;case`ID`:case`id`:!t.mode||[`china`,`cn`].includes(t.mode?.toLowerCase())?t.version?.toLowerCase()===`v1`?n.pattern=/^[1-9]\d{7}(?:0\d|10|11|12)(?:0[1-9]|[1-2][\d]|30|31)\d{3}$/:t.version?.toLowerCase()===`v2`?n.pattern=/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|10|11|12)(?:0[1-9]|[1-2]\d|30|31)\d{3}[\dXx]$/:n.pattern=/(^\d{8}(0\d|10|11|12)([0-2]\d|30|31)\d{3}$)|(^\d{6}(18|19|20)\d{2}(0[1-9]|10|11|12)([0-2]\d|30|31)\d{3}(\d|X|x)$)/:[`hk`,`hongkong`,`xg`,`xianggang`].includes(t.mode.toLowerCase())||[`macau`,`macao`,`mo`,`aomen`,`am`].includes(t.mode.toLowerCase())?n.pattern=/^[a-zA-Z]\d{6}\([\dA]\)$/:[`taiwan`,`tw`].includes(t.mode.toLowerCase())&&(n.pattern=/^[a-zA-Z][0-9]{9}$/),n.message=t.message||`请填写正确的证件号码`;break;case`passport`:n.pattern=/(^[EeKkGgDdSsPpHh]\d{8}$)|(^(([Ee][a-fA-F])|([DdSsPp][Ee])|([Kk][Jj])|([Mm][Aa])|(1[45]))\d{7}$)/,n.message=t.message||`请填写正确的护照号码`;break;case`credit-code`:case`uscc`:n.pattern=/^[0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}$/,n.message=t.message||`请填写正确的统一社会信用代码`;break;case`bank-account`:case`bank`:n.pattern=/^[1-9]\d{9,29}$/,n.message=t.message||`请填写正确的银行账号`;break;case`stock`:n.pattern=/^(s[hz]|S[HZ])(000[\d]{3}|002[\d]{3}|300[\d]{3}|600[\d]{3}|60[\d]{4})$/,n.message=t.message||`请填写正确的股票代码`;break;case`url`:t.mode===`image`?n.pattern=/^https?:\/\/(.+\/)+.+(\.(gif|png|jpg|jpeg|webp|svg|psd|bmp|tif))$/i:t.mode===`video`?n.pattern=/^https?:\/\/(.+\/)+.+(\.(swf|avi|flv|mpg|rm|mov|wav|asf|3gp|mkv|rmvb|mp4))$/i:n.pattern=/^(((ht|f)tps?):\/\/)?[\w-]+(\.[\w-]+)+([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?$/,n.message=t.message||`请填写正确的链接`;break;case`md5`:n.pattern=/^([a-f\d]{32}|[A-F\d]{32})$/,n.message=t.message||`请填写正确的md5值`;break;case`base64`:n.pattern=/^\s*data:(?:[a-z]+\/[a-z0-9-+.]+(?:;[a-z-]+=[a-z0-9-]+)?)?(?:;base64)?,([a-z0-9!$&',()*+;=\-._~:@/?%\s]*?)\s*$/i,n.message=t.message||`请填写正确的base64值`;break;case`currency`:case`money`:t.mode===`positive`?n.pattern=/^\d+(,\d{3})*(\.\d{1,2})?$/:n.pattern=/^-?\d+(,\d{3})*(\.\d{1,2})?$/,n.message=t.message||`请填写正确的货币金额`;break;case`chinese`:n.pattern=/^(?:[\u3400-\u4DB5\u4E00-\u9FEA\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0])+$/,n.message=t.message||`请填写中文字符`;break;case`name`:t.en||t.english?n.pattern=/(^[a-zA-Z]{1}[a-zA-Z\s]{0,20}[a-zA-Z]{1}$)/:n.pattern=/^(?:[\u4e00-\u9fa5·]{2,16})$/,n.message=t.message||`请填写正确的姓名`;break;case`decimal`:n.pattern=/^\d+\.\d+$/,n.message=t.message||`请填写正确的小数`;break;case`number`:n.pattern=/^\d{1,}$/,n.message=t.message||`请填写正确的数字`;break;case`date`:n.pattern=/^\d{4}(-)(1[0-2]|0?\d)\1([0-2]\d|\d|30|31)$/,n.message=t.message||`请填写正确的日期`;break;case`time`:t.mode===`12`?n.pattern=/^(?:1[0-2]|0?[1-9]):[0-5]\d:[0-5]\d$/:n.pattern=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d$/,n.message=t.message||`请填写正确的时间`;break;case`car`:case`plate-number`:case`car-number`:t.mode===`green`||t.mode===`newEnergy`?n.pattern=/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领]{1}[A-HJ-NP-Z]{1}(([0-9]{5}[DF])|([DF][A-HJ-NP-Z0-9][0-9]{4}))$/:t.mode===`notNewEnergy`?n.pattern=/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领]{1}[A-HJ-NP-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/:n.pattern=/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领]{1}[A-HJ-NP-Z]{1}(?:(([0-9]{5}[DF])|([DF][A-HJ-NP-Z0-9][0-9]{4}))|[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1})$/,n.message=t.message||`请填写正确的车牌号`;break;case`version`:n.pattern=/^\d+(?:\.\d+){2}$/,n.message=t.message||`请填写正确的版本号`;break;case`ip`:case`IP`:t.mode===`v6`||t.mode===`ipv6`?n.pattern=/^(?:(?:(?:[0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))|\[(?:(?:(?:[0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))\](?::(?:[0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$/i:n.pattern=/^((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]).){3}(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(?::(?:[0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$/,n.message=t.message||`请填写正确的IP地址`;break;case`qq`:n.pattern=/^[1-9][0-9]{4,10}$/,n.message=t.message||`请填写正确的QQ号`;break;case`wechat`:n.pattern=/^[a-zA-Z][-_a-zA-Z0-9]{5,19}$/,n.message=t.message||`请填写正确的微信号`;break;case`alpha-numeric`:case`numeric-alpha`:n.mode===`strict`?n.pattern=/^(?=.*[a-zA-Z])(?=.*\d).+$/:n.pattern=/^[A-Za-z0-9]+$/,n.message=t.message||`请填写字母与数字的组合`;break;case`alpha`:t.mode===`lower`||t.mode===`lowercase`?n.pattern=/^[a-z]+$/:t.mode===`upper`||t.mode===`uppercase`?n.pattern=/^[A-Z]+$/:n.pattern=/^[a-zA-Z]+$/,n.message=t.message||`请填写正确的字母`;break;case`username`:n.pattern=/^[a-zA-Z0-9_-]{4,16}$/,n.message=t.message||`请填写正确的用户名`;break;case`password`:n.pattern=/^\S*(?=\S{6,})(?=\S*\d)(?=\S*[A-Z])(?=\S*[a-z])(?=\S*[!@#$%^&*? ])\S*$/,n.message=t.message||`密码必须包含大小写字母、数字和特殊字符,不少于6位`;break;case`zip`:n.pattern=/^(0[1-7]|1[0-356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[0-5]|8[013-6])\d{4}$/,n.message=t.message||`请填写正确的邮政编码`;break;case`mac`:case`MAC`:n.pattern=/^((([a-f0-9]{2}:){5})|(([a-f0-9]{2}-){5}))[a-f0-9]{2}$/i,n.message=t.message||`请填写正确的MAC地址`;break}return n}function xu(e,t){let{t:n}=Rl();return(0,i.isArray)(e)?e.map(e=>n(e,t)).join(``):n(e,t)}function Su(e,t,n){let{capitalizeFirst:r=!0,uncapitalizeSecond:i=!0,uncapitalizeSecondAll:a=!0}=n||{};n||={};let{locale:o}=n;return o||=Rl().locale,o.value.includes(`en`)?(e=e.trim(),t=t.trim(),r&&(e=e.charAt(0).toUpperCase()+e.slice(1)),i&&(t=t.charAt(0).toLowerCase()+t.slice(1)),a&&(t=t.toLowerCase()),`${e} ${t}`):`${e}${t}`}Object.defineProperty(exports,`A`,{enumerable:!0,get:function(){return xi}}),Object.defineProperty(exports,`C`,{enumerable:!0,get:function(){return Oi}}),Object.defineProperty(exports,`D`,{enumerable:!0,get:function(){return Ei}}),Object.defineProperty(exports,`E`,{enumerable:!0,get:function(){return Ti}}),Object.defineProperty(exports,`M`,{enumerable:!0,get:function(){return Si}}),Object.defineProperty(exports,`O`,{enumerable:!0,get:function(){return wi}}),Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return Di}}),Object.defineProperty(exports,`T`,{enumerable:!0,get:function(){return Ai}}),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return zi}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return fu}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return Li}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return pu}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return lu}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return yu}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return Bi}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return Rl}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return vu}}),Object.defineProperty(exports,`j`,{enumerable:!0,get:function(){return Ci}}),Object.defineProperty(exports,`k`,{enumerable:!0,get:function(){return bi}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return mu}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return su}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return xu}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return uu}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return cu}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return bu}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return du}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return Su}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return hu}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return Vi}}),Object.defineProperty(exports,`w`,{enumerable:!0,get:function(){return ki}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return Ri}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return Ii}});
6
- //# sourceMappingURL=hooks-CzJrMtYg.cjs.map
6
+ //# sourceMappingURL=hooks-C0Aterus.cjs.map