@nice2dev/testing 1.3.15 → 1.3.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
"use strict";var Nb=Object.defineProperty;var jb=(e,t,n)=>t in e?Nb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var R=(e,t,n)=>jb(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Fb=require("react"),Ge=require("react/jsx-runtime"),Ue=require("@testing-library/react");var dl=Object.defineProperty,Rb=(e,t)=>{let n={};for(var r in e)dl(n,r,{get:e[r],enumerable:!0});return dl(n,Symbol.toStringTag,{value:"Module"}),n};const Lb=214013,Db=2531011,Bb=4294967295,qo=-2147483649,Ub=-1443076087,Vb=505908858,qb=1170746341,Wb=-755606699,zb=1994129409,Gb=916127744;var Kb=class Ep{constructor(t){this.seed=t}clone(){return new Ep(this.seed)}next(){const t=this.seed,n=Math.imul(t,Lb)+Db|0,r=Math.imul(t,Ub)+Vb|0,i=Math.imul(t,qb)+Wb|0;this.seed=i;const o=(n&qo)>>16,s=(r&qo)>>16;return(i&qo)>>16|s<<15|o<<30}jump(){this.seed=Math.imul(this.seed,zb)+Gb&Bb}getState(){return[this.seed]}};function Hb(e){return new Kb(e)}const We=624,ei=397,Wo=2567483615,Yb=1812433253,Jb=11,Xb=7,Zb=2636928640,Qb=15,e0=4022730752,t0=18,zo=2147483647,Go=2147483648,n0="SUSgbA\\W`E[]KN2RUSo8XVU?HKBFRl11E\\KoWOg5B]XEWG;BE;1:oVK[`B^Z9Qd23^XTnhL>]Unda4f[X;_j9H5QD=cN<5H`3bW>9bk1mjoI2fK0obmAAINOV:>Mek_V9dd<hZ\\gC3?Fm7FEk07QH_3PLm^@?^i\\QMkgP<]oLHmFnlecg5F@7U^@4jhZ?WZS0k@GHehmM36:5^9;>Hmm`co>k:KOSkSbIINb1VFf>LXgP>GUAQTD>Ci>XMGkUflLlb?_FaFUk@?5N7i70@;1o68ah@I<HFH7R2^J:G][Gf962ITWID9GWK8ElD2G5=DcHcL]cA]P2n7A=[<bInM;IHDQnJMReRXDWbVldnGEIPij`E08Xdci3@0c:IBbD4:Nk]?lEN9j^;T`0blZX7eiWE8c`<ak7j05FZi>AjUDh?M1B?^??FAXKThf<aBOXZf7jXYGK>R<;NHk3S9YhM7STJ6`:MIE`S@7298X8W>PNK=@;lLX<i\\TXLL<W@X[X54H]in8M;;n?kkQbajgAMY=Tf9b;ZKf0QUB2FHYWfnfkDoU9YkcLd95T>lK6GM1YL\\lid:J>KYS=iJ]Y>QlF>?R5_[5QeYC=66;A32Ac>OHk_ne^0g>bK:g;KFPgbGUcPR_Z=TX3H9d03bKZ2IhEPKBo>LSGWd0iFdV8C<Y:<>T[O6lC\\blaZ>GoAYP4clf^j1IfnZJ]QeDe2X<HE[LJNWnaCg[P]Co^:IRbWPY?97UePBlZNNHY6LOBM8P>=h?Ye:_f_Sb9Ki5GDYBF4dWeMfdg^ccPllNWM7G1\\UMdoYeOOD5^e@foA22G?ADYo5:FVG[bWo96;>3kc_c1Ab30>30;1@4F8g2hY?DJ4[LOL;ZLLKo2]jo>[KMDUcR279N_kF=3WL@Dd620bMTdA\\U9k``ef2iD9JgJ8CZBHS>F^Uk;<laeaeHS<15OSeS`PcSSKBRBFY]aQ=EgUXGNg=?d56`KA@2BejY0^[_DCX`L=CGMT=BW^6S1i@2ATBVk>3_ocRA>2U:4GPQ6o>5jX2HIcV3S@On6KB<[SKB?FC_AAji9agbBFkAi\\;4I\\UJ]c36Ub@[;gQACVGY<V]SDJBUU]La\\_a@JdOO8gm2T0DJMa:8Hf7>E]noQ[1Kambn??QQ]S?1i0oMGOijb\\aGY6lQ^CJ?9bFle8<eH4UUjBINX;n8@VOA5ah^URV49B[A?ONHhHAC1J5;;h0SXYlG^0W=eJdHh^K4SGe=1HZLLam;D<Q3AOdbPcdX``82\\jo0En8jRVGC73WMCF9`d:0heS?80?C188cSn7H9<daZ]MgS4Pb^1HkA:1PU^5>^h_g[RQV@PnYBRI_]`B]Bh@Uk03eXGY`I16L76H28X`R>IROMeNVUdU[:lghLhPCQZ:4a<30YBZCYnXe[?;jc8gKI2QH2MjnWBm4nGCZW`aVU2a;P<AMI25mlW_Nm][2?b6o851X@lAm]YZ`bWRF1g<Ga:T]1NXH5Veja5P9S9>:aNg:Th1Y=5o78K>LQ8hW@5S?I83Lk5Xk;j5@I3o[d:4RjE^oS30:WP9gC\\i8aSI>QRE@4lP:7lDg8g2`Ql[2I8aBU\\BQ?B4_clL9Q]S;^e1Ob5[>3JER2`c7B=o]fPOWO<DGi;Niba1PoWPPE_Q3aX0OB0mZej\\f_M[J4Y6]1`h2MkF[GiW8Q^d3^_=<I1N2Q7]2<2j[iP7V3V821FaI]A`93bC^Z\\G=WJ;^Ih?B97_iIF@\\Dl<eK1je8SNTWo_=XFMZH<<JYLZ^YQMPgYOV45K_:]kSI8^XlO0]GY=VUfe_C_F6TOcoAlVUH:o=WhhT@K`2KFhe<3\\KXQ>W:M?S_4S5d@J^`[AGA7@3]DnGSCO`\\?E8HT75^d9\\:m\\m1egIfk8cd6bD9\\eU8\\n[Pb0Cgd^S0n9kGJHb]i5XodlKHc34Fhi9K>0U5WK`>7Ff2^KL=WC6:kc?e5C^a1T1:4:^S5flXlGNIj08AfO?Dh7T7dWO>E]NI9?ob7B7P_h[4TEP[EU;GllFTnSmg9:\\[N]<SAoKP_kPlG56A:I3T6EG8Hj=XnUE`KT5U@OQ?]7[N^MFN1_NU4KO_3::Le`8IL9[1Z1H1;V3SC\\N3]S@4U[F2mhT5dYM7[4Pg_Na0_8WTH0`bgceQS8]EG;XgD4Ib4iLTP@kE79Mn>AYRJA1U5^Blhgno:aHVYc03c3J0Vc9FjEV^M75Zfd8kVC9>iJDk`AJ[6f7DK2D^DL\\AX:6b5h31XH;RQB\\N<ZSM=J;6L[`UW^eOIFc1Y]6_dfedIe4ARh72mTXC0WND_IDHVCZRDE0eODARCEETQI5TPUQE=jEH5bS?LP[ai`F5ABRYDo2o\\@=]GT?_9;hc4Lm:\\SF9k1T<0E@fX9BG[]g0nY7k[Qmi@la8`PF0j6@Q?Ii7bLkXQ<lLHf]`:DCh@9JY5>hEVLTdhL\\b1EB0lLh<=WaO@F<;8g<d:@e:LA:cFIEdmQh7hNHfSRToW?8N4:Z1K;XEDRO;OIDh<UdVln?bjgL>?VE98[B\\K<BVjkG8LiSX;fb>jf?DUK00Aih<WY6QD6cEnHBZ8iN_fd<G8Ci`11RUW2QlW]IXV:m?;J0GXXHfGNQ>:D`=fLPbO?VOTEYLj^cNj5PM>jKB5HVjJ4U7lXaTQNL9<@\\1`m\\Ug@VQHd7>jW=ca0`miF7;N0F=GjoQ`RFchKMGTmn8cF@Oh4GGCm7m2`U9j93Tb>=kSERjE_J939F01I1;`<ijk_=_Vn=7RVAI6fnQI5KlF:C44bN<<8K=Z<2TP<1]5?<dB>^LA=ebloE2Y2:9lkh0\\<YKbHD97iE`<C5oj^1>X:??`H6BXF2hG1Q[dF0Q=>W=J?7C\\k1T?<;R44oW?1hY^G8Zm]ZKnfOf0eCFYo6?=D8?<`6HU5SXh1;=:23LmV_FSi;OJfV<^?GkIDPISeHg1LaGE:V3Y3K3H<QJfbY?=;ldZRhnhQT_mGXDLFXXhSONE6Do_0iNZagB:BPGOTH;VhHUTd6LhQm^[;dO]5Hlkg<R:F<Kn\\:I:EGojgWZ2X@SYO_dlH;G8S<>oEKabY`:oU;=JW7ig?S?EYb86b7n8ce\\]IRa]koiWY<RfO;5kUI;7lVeC?[@ZaXDiF04B8R]bg@>O<mQDoUcBLcf^f>m2kMBUloD>Ze@NN^Z11TM`inXYhE_I=kA`:ZF4d\\>`L@;ZP[`ENU5cL[BV6\\Z?Di76:jg3hE6oG6jFc8kP=[GS1;WSedYQW1:U4\\OF32GgmMC<AjO]872bdBb`bKAA?8j78b>T3VfcUB2m4J^CPRU;8dScI]LU]^bBYA5_3:Y0N5i^?200000";var r0=class Tp{constructor(t,n){this.states=t,this.index=n}clone(){return new Tp(this.states.slice(),this.index)}next(){let t=this.states[this.index];return t^=t>>>Jb,t^=t<<Xb&Zb,t^=t<<Qb&e0,t^=t>>>t0,this.index=xi(this.states,this.index),t}getState(){return[this.index,...this.states]}jump(){const t=this.states.slice(),n=this.index;this.index=xi(this.states,this.index);for(let r=19932;r>0;--r)n0.charCodeAt(r/6|0)-48&1<<r%6&&pl(this.states,this.index,t,n),this.index=xi(this.states,this.index);pl(this.states,this.index,t,n)}};function pl(e,t,n,r){let i=0;if(r>=t){for(;i<We-r;i++)e[i+t]^=n[i+r];for(;i<We-t;i++)e[i+t]^=n[i+r-We];for(;i<We;i++)e[i+t-We]^=n[i+r-We]}else{for(;i<We-t;i++)e[i+t]^=n[i+r];for(;i<We-r;i++)e[i+t-We]^=n[i+r];for(;i<We;i++)e[i+t-We]^=n[i+r-We]}}function xi(e,t){if(t<We-ei){const n=e[t]&Go|e[t+1]&zo;return e[t]=e[t+ei]^n>>>1^-(n&1)&Wo,t+1}else if(t<We-1){const n=e[t]&Go|e[t+1]&zo;return e[t]=e[t+ei-We]^n>>>1^-(n&1)&Wo,t+1}else{const n=e[t]&Go|e[0]&zo;return e[t]=e[ei-1]^n>>>1^-(n&1)&Wo,0}}function i0(e){for(let t=0;t!==We;++t)xi(e,t)}function o0(e){const t=[e|0];for(let n=1;n!==We;++n){const r=t[n-1]^t[n-1]>>>30;t.push(Math.imul(Yb,r)+n|0)}return i0(t),new r0(t,0)}const s0=[1667051007,2321340297,1548169110,304075285];var a0=class vp{constructor(t,n,r,i){this.s01=t,this.s00=n,this.s11=r,this.s10=i}clone(){return new vp(this.s01,this.s00,this.s11,this.s10)}next(){const t=this.s00^this.s00<<23,n=this.s01^(this.s01<<23|this.s00>>>9),r=this.s10,i=this.s11,o=this.s00+r|0;return this.s01=i,this.s00=r,this.s11=n^i^n>>>18^i>>>5,this.s10=t^r^(t>>>18|n<<14)^(r>>>5|i<<27),o}jump(){let t=0,n=0,r=0,i=0,o=this.s01,s=this.s00,c=this.s11,a=this.s10;for(let u=0;u!==4;++u){const l=s0[u];for(let f=1;f;f<<=1){l&f&&(t^=o,n^=s,r^=c,i^=a);const h=s^s<<23,d=o^(o<<23|s>>>9);o=c,s=a,a=h^a^(h>>>18|d<<14)^(a>>>5|c<<27),c=d^c^d>>>18^c>>>5}}this.s01=t,this.s00=n,this.s11=r,this.s10=i}getState(){return[this.s01,this.s00,this.s11,this.s10]}};function ml(e){return new a0(-1,~e,e|0,0)}const c0=[3639956645,3750757012,1261568508,386426335];var u0=class Ap{constructor(t,n,r,i){this.s01=t,this.s00=n,this.s11=r,this.s10=i}clone(){return new Ap(this.s01,this.s00,this.s11,this.s10)}next(){const t=this.s00+this.s10|0,n=this.s10^this.s00,r=this.s11^this.s01,i=this.s00,o=this.s01;return this.s00=i<<24^o>>>8^n^n<<16,this.s01=o<<24^i>>>8^r^(r<<16|n>>>16),this.s10=r<<5^n>>>27,this.s11=n<<5^r>>>27,t}jump(){let t=0,n=0,r=0,i=0,o=this.s01,s=this.s00,c=this.s11,a=this.s10;for(let u=0;u!==4;++u){const l=c0[u];for(let f=1;f;f<<=1){l&f&&(t^=o,n^=s,r^=c,i^=a);const h=a^s,d=c^o,m=s,p=o;s=m<<24^p>>>8^h^h<<16,o=p<<24^m>>>8^d^(d<<16|h>>>16),a=d<<5^h>>>27,c=h<<5^d>>>27}}this.s01=t,this.s00=n,this.s11=r,this.s10=i}getState(){return[this.s01,this.s00,this.s11,this.s10]}};function l0(e){return new u0(-1,~e,e|0,0)}function f0(e,t){for(let n=0;n!==t;++n)e.next()}const gl=BigInt,h0=4294967296n;function d0(e,t,n){const r=n-t+1n;let i=h0,o=1;for(;i<r;)i<<=32n,++o;let s=yl(o,e);if(s<r)return s+t;if(s+r<i)return s%r+t;const c=i-i%r;for(;s>=c;)s=yl(o,e);return s%r+t}function yl(e,t){let n=gl(t.next()+2147483648);for(let r=1;r<e;++r){const i=t.next();n=(n<<32n)+gl(i+2147483648)}return n}function gr(e,t){const n=t>2?~~(4294967296/t)*t:4294967296;let r=e.next()+2147483648;for(;r>=n;)r=e.next()+2147483648;return r%t}function Ko(e,t){if(t<0){const n=-t;e.sign=-1,e.data[0]=~~(n/4294967296),e.data[1]=n>>>0}else e.sign=1,e.data[0]=~~(t/4294967296),e.data[1]=t>>>0;return e}function p0(e,t,n){const r=t.data[1],i=t.data[0],o=t.sign,s=n.data[1],c=n.data[0],a=n.sign;if(e.sign=1,o===1&&a===-1){const p=r+s,y=i+c+(p>4294967295?1:0);return e.data[0]=y>>>0,e.data[1]=p>>>0,e}let u=r,l=i,f=s,h=c;o===-1&&(u=s,l=c,f=r,h=i);let d=0,m=u-f;return m<0&&(d=1,m=m>>>0),e.data[0]=l-h-d,e.data[1]=m,e}function m0(e,t,n){const r=n[0]+1;for(t[0]=gr(e,r),t[1]=gr(e,4294967296);t[0]>=n[0]&&(t[0]!==n[0]||t[1]>=n[1]);)t[0]=gr(e,r),t[1]=gr(e,4294967296);return t}const g0=Number.MAX_SAFE_INTEGER,y0={sign:1,data:[0,0]},b0={sign:1,data:[0,0]},bl={sign:1,data:[0,0]},Ho=[0,0];function w0(e,t,n,r){const i=r<=g0?Ko(bl,r):p0(bl,Ko(y0,n),Ko(b0,t));return i.data[1]===4294967295?(i.data[0]+=1,i.data[1]=0):i.data[1]+=1,m0(e,Ho,i.data),Ho[0]*4294967296+Ho[1]+t}function Yo(e,t,n){const r=n-t;return r<=4294967295?gr(e,r+1)+t:w0(e,t,n,r)}const wl=Symbol.for("fast-check/PreconditionFailure");var Zt=class extends Error{constructor(e=!1){super(),this.interruptExecution=e,this.footprint=wl}static isFailure(e){return e!=null&&e.footprint===wl}};function Ip(e){if(!e)throw new Zt}var x0=class{[Symbol.iterator](){return this}next(e){return{value:e,done:!0}}};const S0=new x0;function E0(){return S0}function*T0(e,t){for(const n of e)yield t(n)}function*v0(e,t){for(const n of e)yield*t(n)}function*A0(e,t){for(const n of e)t(n)&&(yield n)}function*I0(e,t){for(let n=0;n<t;++n){const r=e.next();if(r.done)break;yield r.value}}function*k0(e,t){let n=e.next();for(;!n.done&&t(n.value);)yield n.value,n=e.next()}function*C0(e,t){for(let n=e.next();!n.done;n=e.next())yield n.value;for(const n of t)for(let r=n.next();!r.done;r=n.next())yield r.value}const _0=Symbol.iterator;var J=class Wt{static nil(){return new Wt(E0())}static of(...t){return new Wt(t[_0]())}constructor(t){this.g=t}next(){return this.g.next()}[Symbol.iterator](){return this.g}map(t){return new Wt(T0(this.g,t))}flatMap(t){return new Wt(v0(this.g,t))}dropWhile(t){let n=!1;function*r(i){(n||!t(i))&&(n=!0,yield i)}return this.flatMap(r)}drop(t){if(t<=0)return this;let n=0;function r(){return n++<t}return this.dropWhile(r)}takeWhile(t){return new Wt(k0(this.g,t))}take(t){return new Wt(I0(this.g,t))}filter(t){return new Wt(A0(this.g,t))}every(t){for(const n of this.g)if(!t(n))return!1;return!0}has(t){for(const n of this.g)if(t(n))return[!0,n];return[!1,null]}join(...t){return new Wt(C0(this.g,t))}getNthOrLast(t){let n=t,r=null;for(const i of this.g){if(n--===0)return i;r=i}return r}};function Jt(e){return new J(e)}const Fe=Symbol.for("fast-check/cloneMethod");function mn(e){return e!==null&&(typeof e=="object"||typeof e=="function")&&Fe in e&&typeof e[Fe]=="function"}function Sn(e){return mn(e)?e[Fe]():e}const $0=Object.defineProperty;var L=class{constructor(e,t,n){this.value_=e,this.context=t,this.hasToBeCloned=n!==void 0||mn(e),this.readOnce=!1,this.value=e,this.hasToBeCloned&&$0(this,"value",{get:n!==void 0?n:this.getValue,enumerable:!1,configurable:!1})}getValue(){return this.hasToBeCloned?this.readOnce?this.value_[Fe]():(this.readOnce=!0,this.value_):this.value_}},xe=class{filter(e){return new P0(this,e)}map(e,t){return new O0(this,e,t)}chain(e){return new M0(this,e)}},M0=class extends xe{constructor(e,t){super(),this.arb=e,this.chainer=t}generate(e,t){const n=e.clone(),r=this.arb.generate(e,t);return this.valueChainer(r,e,n,t)}canShrinkWithoutContext(e){return!1}shrink(e,t){return this.isSafeContext(t)?(t.stoppedForOriginal?J.nil():this.arb.shrink(t.originalValue,t.originalContext).map(n=>this.valueChainer(n,t.clonedMrng.clone(),t.clonedMrng,t.originalBias))).join(t.chainedArbitrary.shrink(e,t.chainedContext).map(n=>{const r={...t,chainedContext:n.context,stoppedForOriginal:!0};return new L(n.value_,r)})):J.nil()}valueChainer(e,t,n,r){const i=this.chainer(e.value_),o=i.generate(t,r),s={originalBias:r,originalValue:e.value_,originalContext:e.context,stoppedForOriginal:!1,chainedArbitrary:i,chainedContext:o.context,clonedMrng:n};return new L(o.value_,s)}isSafeContext(e){return e!=null&&typeof e=="object"&&"originalBias"in e&&"originalValue"in e&&"originalContext"in e&&"stoppedForOriginal"in e&&"chainedArbitrary"in e&&"chainedContext"in e&&"clonedMrng"in e}};function kp(e,t){const n=e.value,r=t(n);return e.hasToBeCloned&&(typeof r=="object"&&r!==null||typeof r=="function")&&Object.isExtensible(r)&&!mn(r)&&Object.defineProperty(r,Fe,{get:()=>()=>kp(e,t)[0]}),[r,n]}function xl(e,t){const[n,r]=kp(e,t);return new L(n,{originalValue:r,originalContext:e.context})}var O0=class extends xe{constructor(e,t,n){super(),this.arb=e,this.mapper=t,this.unmapper=n,this.bindValueMapper=r=>xl(r,t)}generate(e,t){const n=this.arb.generate(e,t);if(!n.hasToBeCloned){const r=n.value;return new L(this.mapper(r),{originalValue:r,originalContext:n.context})}return xl(n,this.mapper)}canShrinkWithoutContext(e){if(this.unmapper!==void 0)try{const t=this.unmapper(e);return this.arb.canShrinkWithoutContext(t)}catch{return!1}return!1}shrink(e,t){if(this.isSafeContext(t))return this.arb.shrink(t.originalValue,t.originalContext).map(this.bindValueMapper);if(this.unmapper!==void 0){const n=this.unmapper(e);return this.arb.shrink(n,void 0).map(this.bindValueMapper)}return J.nil()}isSafeContext(e){return e!=null&&typeof e=="object"&&"originalValue"in e&&"originalContext"in e}},P0=class extends xe{constructor(e,t){super(),this.arb=e,this.refinement=t,this.bindRefinementOnValue=n=>this.refinementOnValue(n)}generate(e,t){for(;;){const n=this.arb.generate(e,t);if(this.refinementOnValue(n))return n}}canShrinkWithoutContext(e){return this.arb.canShrinkWithoutContext(e)&&this.refinement(e)}shrink(e,t){return this.arb.shrink(e,t).filter(this.bindRefinementOnValue)}refinementOnValue(e){return this.refinement(e.value)}};function Cp(e){return typeof e=="object"&&e!==null&&"generate"in e&&"shrink"in e&&"canShrinkWithoutContext"in e}function _p(e){if(!Cp(e))throw new Error("Unexpected value received: not an instance of Arbitrary")}const $p=Function.prototype.apply,Jo=Symbol("apply");function N0(e){try{return e.apply}catch{return}}function j0(e,t,n){const r=e;r[Jo]=$p;const i=r[Jo](t,n);return delete r[Jo],i}function Z(e,t,n){return N0(e)===$p?e.apply(t,n):j0(e,t,n)}const Mp=Array,F=BigInt,F0=BigInt64Array,R0=BigUint64Array,Op=Boolean,Fi=Date,U=Error,Pp=Float32Array,Np=Float64Array,L0=Int8Array,D0=Int16Array,B0=Int32Array,Ht=Number,et=String,vt=Set,U0=Uint8Array,V0=Uint8ClampedArray,q0=Uint16Array,W0=Uint32Array,z0=encodeURIComponent,Yt=Map,Si=Symbol,Sl=Array.prototype.forEach,El=Array.prototype.indexOf,Tl=Array.prototype.join,vl=Array.prototype.map,Al=Array.prototype.flat,Il=Array.prototype.filter,kl=Array.prototype.push,Cl=Array.prototype.pop,_l=Array.prototype.splice,$l=Array.prototype.slice,Ml=Array.prototype.sort,Ol=Array.prototype.every;function G0(e){try{return e.forEach}catch{return}}function K0(e){try{return e.indexOf}catch{return}}function H0(e){try{return e.join}catch{return}}function Y0(e){try{return e.map}catch{return}}function J0(e){try{return e.flat}catch{return}}function X0(e){try{return e.filter}catch{return}}function Z0(e){try{return e.push}catch{return}}function Q0(e){try{return e.pop}catch{return}}function ew(e){try{return e.splice}catch{return}}function tw(e){try{return e.slice}catch{return}}function nw(e){try{return e.sort}catch{return}}function rw(e){try{return e.every}catch{return}}function jp(e,t){return G0(e)===Sl?e.forEach(t):Z(Sl,e,[t])}function vr(e,...t){return K0(e)===El?e.indexOf(...t):Z(El,e,t)}function Se(e,...t){return H0(e)===Tl?e.join(...t):Z(Tl,e,t)}function Q(e,t){return Y0(e)===vl?e.map(t):Z(vl,e,[t])}function iw(e,t){return J0(e)===Al?e.flat(t):Z(Al,e,[t])}function ow(e,t){return X0(e)===Il?e.filter(t):Z(Il,e,[t])}function N(e,...t){return Z0(e)===kl?e.push(...t):Z(kl,e,t)}function Fp(e){return Q0(e)===Cl?e.pop():Z(Cl,e,[])}function Rp(e,...t){return ew(e)===_l?e.splice(...t):Z(_l,e,t)}function De(e,...t){return tw(e)===$l?e.slice(...t):Z($l,e,t)}function Lp(e,...t){return nw(e)===Ml?e.sort(...t):Z(Ml,e,t)}function Dp(e,...t){return rw(e)===Ol?e.every(...t):Z(Ol,e,t)}const Pl=Date.prototype.getTime,Nl=Date.prototype.toISOString;function sw(e){try{return e.getTime}catch{return}}function aw(e){try{return e.toISOString}catch{return}}function Ri(e){return sw(e)===Pl?e.getTime():Z(Pl,e,[])}function cw(e){return aw(e)===Nl?e.toISOString():Z(Nl,e,[])}const jl=Set.prototype.add,Fl=Set.prototype.has;function uw(e){try{return e.add}catch{return}}function lw(e){try{return e.has}catch{return}}function Ar(e,t){return uw(e)===jl?e.add(t):Z(jl,e,[t])}function ln(e,t){return lw(e)===Fl?e.has(t):Z(Fl,e,[t])}const Rl=WeakMap.prototype.set,Ll=WeakMap.prototype.get;function fw(e){try{return e.set}catch{return}}function hw(e){try{return e.get}catch{return}}function dw(e,t,n){return fw(e)===Rl?e.set(t,n):Z(Rl,e,[t,n])}function pw(e,t){return hw(e)===Ll?e.get(t):Z(Ll,e,[t])}const Dl=Map.prototype.set,Bl=Map.prototype.get,Ul=Map.prototype.has;function mw(e){try{return e.set}catch{return}}function gw(e){try{return e.get}catch{return}}function yw(e){try{return e.has}catch{return}}function Et(e,t,n){return mw(e)===Dl?e.set(t,n):Z(Dl,e,[t,n])}function dt(e,t){return gw(e)===Bl?e.get(t):Z(Bl,e,[t])}function bw(e,t){return yw(e)===Ul?e.has(t):Z(Ul,e,[t])}const Vl=String.prototype.split,ql=String.prototype.startsWith,Wl=String.prototype.endsWith,zl=String.prototype.substring,Gl=String.prototype.toLowerCase,Kl=String.prototype.toUpperCase,Hl=String.prototype.padStart,Yl=String.prototype.charCodeAt,Jl=String.prototype.normalize,Xl=String.prototype.replace;function ww(e){try{return e.split}catch{return}}function xw(e){try{return e.startsWith}catch{return}}function Sw(e){try{return e.endsWith}catch{return}}function Ew(e){try{return e.substring}catch{return}}function Tw(e){try{return e.toLowerCase}catch{return}}function vw(e){try{return e.toUpperCase}catch{return}}function Aw(e){try{return e.padStart}catch{return}}function Iw(e){try{return e.charCodeAt}catch{return}}function kw(e){try{return e.normalize}catch{return}}function Cw(e){try{return e.replace}catch{return}}function tt(e,...t){return ww(e)===Vl?e.split(...t):Z(Vl,e,t)}function _w(e,...t){return xw(e)===ql?e.startsWith(...t):Z(ql,e,t)}function $w(e,...t){return Sw(e)===Wl?e.endsWith(...t):Z(Wl,e,t)}function Te(e,...t){return Ew(e)===zl?e.substring(...t):Z(zl,e,t)}function ia(e){return Tw(e)===Gl?e.toLowerCase():Z(Gl,e,[])}function rc(e){return vw(e)===Kl?e.toUpperCase():Z(Kl,e,[])}function Mw(e,...t){return Aw(e)===Hl?e.padStart(...t):Z(Hl,e,t)}function Gn(e,t){return Iw(e)===Yl?e.charCodeAt(t):Z(Yl,e,[t])}function Ow(e,t){return kw(e)===Jl?e.normalize(t):Z(Jl,e,[t])}function Pw(e,t,n){return Cw(e)===Xl?e.replace(t,n):Z(Xl,e,[t,n])}const Zl=Number.prototype.toString;function Nw(e){try{return e.toString}catch{return}}function Ir(e,...t){return Nw(e)===Zl?e.toString(...t):Z(Zl,e,t)}const jw=Object.prototype.hasOwnProperty,Fw=Object.prototype.toString;function Bp(e,t){return Z(jw,e,[t])}function oa(e){return Z(Fw,e,[])}const Rw=Error.prototype.toString;function Lw(e){return Z(Rw,e,[])}var Dw=class{constructor(e){this.producer=e}[Symbol.iterator](){return this.it===void 0&&(this.it=this.producer()),this.it}next(){return this.it===void 0&&(this.it=this.producer()),this.it.next()}};function fn(e){return new Dw(e)}const Up=Array.isArray,Bw=Object.defineProperty;function ic(e,t,n){return Bw(e,Fe,{value:()=>{const r=[];for(let i=0;i!==n.length;++i){let o=n[i];o===void 0&&(o=new L(e[i],t[i])),N(r,o.value)}return ic(r,t,n),r}})}function Vp(e,t,n){const r=[],i=Up(n)?n:[];for(let o=0;o!==e.length;++o)N(r,fn(()=>e[o].shrink(t[o],i[o]).map(s=>{let c=!1;const a=[],u=[],l=[];for(let f=0;f!==e.length;++f){const h=f===o?s:new L(Sn(t[f]),i[f]);h.hasToBeCloned&&(c=!0,l[f]=h),N(a,h.value),N(u,h.context)}return c&&ic(a,u,l),new L(a,u)})));return J.nil().join(...r)}var Uw=class extends xe{constructor(e){super(),this.arbs=e;for(let t=0;t!==e.length;++t){const n=e[t];if(n==null||n.generate===null||n.generate===void 0)throw new Error(`Invalid parameter encountered at index ${t}: expecting an Arbitrary`)}}generate(e,t){let n=!1;const r=[],i=[],o=[];for(let s=0;s!==this.arbs.length;++s){const c=this.arbs[s].generate(e,t);c.hasToBeCloned&&(n=!0,o[s]=c),N(r,c.value),N(i,c.context)}return n&&ic(r,i,o),new L(r,i)}canShrinkWithoutContext(e){if(!Up(e)||e.length!==this.arbs.length)return!1;for(let t=0;t!==this.arbs.length;++t)if(!this.arbs[t].canShrinkWithoutContext(e[t]))return!1;return!0}shrink(e,t){return Vp(this.arbs,e,t)}};function H(...e){return new Uw(e)}const Vw=Math.log;function qp(e){return 2+~~(Vw(e+1)*.4342944819032518)}let oc={};function Wp(e){oc=e}function yt(){return oc}function zp(){oc={}}const kr=Symbol("UndefinedContextPlaceholder");function Kn(e){return e.context!==void 0?e:e.hasToBeCloned?new L(e.value_,kr,()=>e.value):new L(e.value_,kr)}const Ql=()=>{};var qw=class{constructor(e,t){this.arb=e,this.predicate=t;const{asyncBeforeEach:n,asyncAfterEach:r,beforeEach:i,afterEach:o}=yt()||{};if(n!==void 0&&i!==void 0)throw U(`Global "asyncBeforeEach" and "beforeEach" parameters can't be set at the same time when running async properties`);if(r!==void 0&&o!==void 0)throw U(`Global "asyncAfterEach" and "afterEach" parameters can't be set at the same time when running async properties`);this.beforeEachHook=n||i||Ql,this.afterEachHook=r||o||Ql}isAsync(){return!0}generate(e,t){return Kn(this.arb.generate(e,t!==void 0?qp(t):void 0))}shrink(e){if(e.context===void 0&&!this.arb.canShrinkWithoutContext(e.value_))return J.nil();const t=e.context!==kr?e.context:void 0;return this.arb.shrink(e.value_,t).map(Kn)}async runBeforeEach(){await this.beforeEachHook()}async runAfterEach(){await this.afterEachHook()}async run(e){try{const t=await this.predicate(e);return t===void 0||t===!0?null:{error:new U("Property failed by returning false")}}catch(t){return Zt.isFailure(t)?t:{error:t}}}beforeEach(e){const t=this.beforeEachHook;return this.beforeEachHook=()=>e(t),this}afterEach(e){const t=this.afterEachHook;return this.afterEachHook=()=>e(t),this}},Gp=class extends xe{constructor(e){super(),this.arb=e}generate(e,t){return Kn(this.arb.generate(e,t))}canShrinkWithoutContext(e){return!0}shrink(e,t){if(t===void 0&&!this.arb.canShrinkWithoutContext(e))return J.nil();const n=t!==kr?t:void 0;return this.arb.shrink(e,n).map(Kn)}};function sc(...e){if(e.length<2)throw new Error("asyncProperty expects at least two parameters");const t=De(e,0,e.length-1),n=e[e.length-1];return jp(t,_p),new qw(H(...Q(t,r=>new Gp(r))),r=>n(...r))}const ef=()=>{};var Kp=class{constructor(e,t){this.arb=e,this.predicate=t;const{beforeEach:n=ef,afterEach:r=ef,asyncBeforeEach:i,asyncAfterEach:o}=yt()||{};if(i!==void 0)throw U(`"asyncBeforeEach" can't be set when running synchronous properties`);if(o!==void 0)throw U(`"asyncAfterEach" can't be set when running synchronous properties`);this.beforeEachHook=n,this.afterEachHook=r}isAsync(){return!1}generate(e,t){return Kn(this.arb.generate(e,t!==void 0?qp(t):void 0))}shrink(e){if(e.context===void 0&&!this.arb.canShrinkWithoutContext(e.value_))return J.nil();const t=e.context!==kr?e.context:void 0;return this.arb.shrink(e.value_,t).map(Kn)}runBeforeEach(){this.beforeEachHook()}runAfterEach(){this.afterEachHook()}run(e){try{const t=this.predicate(e);return t===void 0||t===!0?null:{error:new U("Property failed by returning false")}}catch(t){return Zt.isFailure(t)?t:{error:t}}}beforeEach(e){const t=this.beforeEachHook;return this.beforeEachHook=()=>e(t),this}afterEach(e){const t=this.afterEachHook;return this.afterEachHook=()=>e(t),this}};function Lr(...e){if(e.length<2)throw new Error("property expects at least two parameters");const t=De(e,0,e.length-1),n=e[e.length-1];return jp(t,_p),new Kp(H(...Q(t,r=>new Gp(r))),r=>n(...r))}let Hp=(function(e){return e[e.None=0]="None",e[e.Verbose=1]="Verbose",e[e.VeryVerbose=2]="VeryVerbose",e})({});function sa(e){return"unsafeNext"in e?e.unsafeJump===void 0?{clone:()=>sa(e),next:()=>e.unsafeNext(),getState:()=>e.getState()}:{clone:()=>sa(e),next:()=>e.unsafeNext(),jump:()=>e.unsafeJump(),getState:()=>e.getState()}:e}function Yp(e){return"jump"in e&&typeof e.jump=="function"?e:{clone:()=>Yp(e),next:()=>e.next(),jump:()=>f0(e,42),getState:()=>e.getState()}}function oo(e){return Yp(sa(e))}const Ww=Date.now,zw=Math.min,Gw=Math.random;var Kw=class{constructor(e){const t=e||{};this.seed=Hw(t),this.randomType=Yw(t),this.numRuns=Jw(t),this.verbose=Xw(t),this.maxSkipsPerRun=t.maxSkipsPerRun!==void 0?t.maxSkipsPerRun:100,this.timeout=Zo(t.timeout),this.skipAllAfterTimeLimit=Zo(t.skipAllAfterTimeLimit),this.interruptAfterTimeLimit=Zo(t.interruptAfterTimeLimit),this.markInterruptAsFailure=t.markInterruptAsFailure===!0,this.skipEqualValues=t.skipEqualValues===!0,this.ignoreEqualValues=t.ignoreEqualValues===!0,this.logger=t.logger!==void 0?t.logger:n=>{console.log(n)},this.path=t.path!==void 0?t.path:"",this.unbiased=t.unbiased===!0,this.examples=t.examples!==void 0?t.examples:[],this.endOnFailure=t.endOnFailure===!0,this.reporter=t.reporter,this.asyncReporter=t.asyncReporter,this.includeErrorInReport=t.includeErrorInReport===!0}toParameters(){return{seed:this.seed,randomType:this.randomType,numRuns:this.numRuns,maxSkipsPerRun:this.maxSkipsPerRun,timeout:this.timeout,skipAllAfterTimeLimit:this.skipAllAfterTimeLimit,interruptAfterTimeLimit:this.interruptAfterTimeLimit,markInterruptAsFailure:this.markInterruptAsFailure,skipEqualValues:this.skipEqualValues,ignoreEqualValues:this.ignoreEqualValues,path:this.path,logger:this.logger,unbiased:this.unbiased,verbose:this.verbose,examples:this.examples,endOnFailure:this.endOnFailure,reporter:this.reporter,asyncReporter:this.asyncReporter,includeErrorInReport:this.includeErrorInReport}}};function Xo(e){return t=>oo(e(t))}function Hw(e){if(e.seed===void 0)return Ww()^Gw()*4294967296;const t=e.seed|0;return e.seed===t?t:t^(e.seed-t)*4294967296}function Yw(e){if(e.randomType===void 0)return ml;if(typeof e.randomType=="string")switch(e.randomType){case"mersenne":return Xo(o0);case"congruential":case"congruential32":return Xo(Hb);case"xorshift128plus":return ml;case"xoroshiro128plus":return l0;default:throw new Error(`Invalid random specified: '${e.randomType}'`)}const t=e.randomType(0);if("min"in t&&t.min!==-2147483648)throw new Error(`Invalid random number generator: min must equal -0x80000000, got ${String(t.min)}`);if("max"in t&&t.max!==2147483647)throw new Error(`Invalid random number generator: max must equal 0x7fffffff, got ${String(t.max)}`);return t===oo(t)?e.randomType:Xo(e.randomType)}function Jw(e){return e.numRuns!==void 0?e.numRuns:e.num_runs!==void 0?e.num_runs:100}function Xw(e){return e.verbose===void 0?0:typeof e.verbose=="boolean"?e.verbose===!0?1:0:e.verbose<=0?0:e.verbose>=2?2:e.verbose|0}function Zo(e){if(e!==void 0)return zw(e,2147483647)}function ac(e){return new Kw(e)}function Zw(e,t,n){let r=null;return{clear:()=>n(r),promise:new Promise(i=>{r=t(()=>{i(new Zt(!0))},e)})}}var tf=class{constructor(e,t,n,r,i,o){this.property=e,this.getTime=t,this.interruptExecution=r,this.setTimeoutSafe=i,this.clearTimeoutSafe=o,this.skipAfterTime=this.getTime()+n}isAsync(){return this.property.isAsync()}generate(e,t){return this.property.generate(e,t)}shrink(e){return this.property.shrink(e)}run(e){const t=this.skipAfterTime-this.getTime();if(t<=0){const n=new Zt(this.interruptExecution);return this.isAsync()?Promise.resolve(n):n}if(this.interruptExecution&&this.isAsync()){const n=Zw(t,this.setTimeoutSafe,this.clearTimeoutSafe),r=Promise.race([this.property.run(e),n.promise]);return r.then(n.clear,n.clear),r}return this.property.run(e)}runBeforeEach(){return this.property.runBeforeEach()}runAfterEach(){return this.property.runAfterEach()}};const Qw=(e,t,n)=>{let r=null;return{clear:()=>n(r),promise:new Promise(i=>{r=t(()=>{i({error:new U(`Property timeout: exceeded limit of ${e} milliseconds`)})},e)})}};var e2=class{constructor(e,t,n,r){this.property=e,this.timeMs=t,this.setTimeoutSafe=n,this.clearTimeoutSafe=r}isAsync(){return!0}generate(e,t){return this.property.generate(e,t)}shrink(e){return this.property.shrink(e)}async run(e){const t=Qw(this.timeMs,this.setTimeoutSafe,this.clearTimeoutSafe),n=Promise.race([this.property.run(e),t.promise]);return n.then(t.clear,t.clear),n}runBeforeEach(){return Promise.resolve(this.property.runBeforeEach())}runAfterEach(){return Promise.resolve(this.property.runAfterEach())}},Jp=class{constructor(e){this.property=e}isAsync(){return this.property.isAsync()}generate(e,t){return this.property.generate(e,void 0)}shrink(e){return this.property.shrink(e)}run(e){return this.property.run(e)}runBeforeEach(){return this.property.runBeforeEach()}runAfterEach(){return this.property.runAfterEach()}};const nf=Array.from,rf=typeof Buffer<"u"?Buffer.isBuffer:void 0,Nn=JSON.stringify,of=Number.isNaN,t2=Object.keys,n2=Object.getOwnPropertySymbols,r2=Object.getOwnPropertyDescriptor,sf=Object.getPrototypeOf,af=Number.NEGATIVE_INFINITY,i2=Number.POSITIVE_INFINITY,bt=Symbol.for("fast-check/toStringMethod");function so(e){return e!==null&&(typeof e=="object"||typeof e=="function")&&bt in e&&typeof e[bt]=="function"}const Lt=Symbol.for("fast-check/asyncToStringMethod");function ao(e){return e!==null&&(typeof e=="object"||typeof e=="function")&&Lt in e&&typeof e[Lt]=="function"}const o2=/^Symbol\((.*)\)$/;function s2(e){if(e.description!==void 0)return e.description;const t=o2.exec(et(e));return t&&t[1].length?t[1]:null}function cf(e){switch(e){case 0:return 1/e===af?"-0":"0";case af:return"Number.NEGATIVE_INFINITY";case i2:return"Number.POSITIVE_INFINITY";default:return e===e?et(e):"Number.NaN"}}function a2(e){let t=-1;for(const n in e){const r=Number(n);if(r!==t+1)return!0;t=r}return t+1!==e.length}function lt(e,t,n){const r=[...t,e];if(typeof e=="object"&&vr(t,e)!==-1)return"[cyclic]";if(ao(e)){const i=n(e);if(i.state==="fulfilled")return i.value}if(so(e))try{return e[bt]()}catch{}switch(oa(e)){case"[object Array]":{const i=e;if(i.length>=50&&a2(i)){const s=[];for(const c in i)of(Number(c))||N(s,`${c}:${lt(i[c],r,n)}`);return s.length!==0?`Object.assign(Array(${i.length}),{${Se(s,",")}})`:`Array(${i.length})`}const o=Se(Q(i,s=>lt(s,r,n)),",");return i.length===0||i.length-1 in i?`[${o}]`:`[${o},]`}case"[object BigInt]":return`${e}n`;case"[object Boolean]":{const i=e==!0?"true":"false";return typeof e=="boolean"?i:`new Boolean(${i})`}case"[object Date]":{const i=e;return of(Ri(i))?"new Date(NaN)":`new Date(${Nn(cw(i))})`}case"[object Map]":return`new Map(${lt(Array.from(e),r,n)})`;case"[object Null]":return"null";case"[object Number]":return typeof e=="number"?cf(e):`new Number(${cf(Number(e))})`;case"[object Object]":{try{const o=e.toString;if(typeof o=="function"&&o!==Object.prototype.toString)return e.toString()}catch{return"[object Object]"}const i=o=>`${o==="__proto__"?'["__proto__"]':typeof o=="symbol"?`[${lt(o,r,n)}]`:Nn(o)}:${lt(e[o],r,n)}`;return"{"+Se([...sf(e)===null?["__proto__:null"]:[],...Q(t2(e),i),...Q(ow(n2(e),o=>{const s=r2(e,o);return s&&s.enumerable}),i)],",")+"}"}case"[object Set]":return`new Set(${lt(Array.from(e),r,n)})`;case"[object String]":return typeof e=="string"?Nn(e):`new String(${Nn(e)})`;case"[object Symbol]":{const i=e;if(Si.keyFor(i)!==void 0)return`Symbol.for(${Nn(Si.keyFor(i))})`;const o=s2(i);return o===null?"Symbol()":i===(o.startsWith("Symbol.")&&Si[o.substring(7)])?o:`Symbol(${Nn(o)})`}case"[object Promise]":{const i=n(e);switch(i.state){case"fulfilled":return`Promise.resolve(${lt(i.value,r,n)})`;case"rejected":return`Promise.reject(${lt(i.value,r,n)})`;case"pending":return"new Promise(() => {/*pending*/})";default:return"new Promise(() => {/*unknown*/})"}}case"[object Error]":if(e instanceof Error)return`new Error(${lt(e.message,r,n)})`;break;case"[object Undefined]":return"undefined";case"[object Int8Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Int16Array]":case"[object Uint16Array]":case"[object Int32Array]":case"[object Uint32Array]":case"[object Float32Array]":case"[object Float64Array]":case"[object BigInt64Array]":case"[object BigUint64Array]":{if(typeof rf=="function"&&rf(e))return`Buffer.from(${e.buffer.detached?"/*detached ArrayBuffer*/":lt(nf(e.values()),r,n)})`;const i=sf(e),o=i&&i.constructor&&i.constructor.name;if(typeof o=="string"){const s=e;if(s.buffer.detached)return`${o}.from(/*detached ArrayBuffer*/)`;const c=s.values();return`${o}.from(${lt(nf(c),r,n)})`}break}}try{return e.toString()}catch{return oa(e)}}function ke(e){return lt(e,[],()=>({state:"unknown",value:void 0}))}function Xp(e){const t=Si(),n=[],r=new Yt;function i(){let a=null;const u=()=>{a!==null&&clearTimeout(a)};return{delay:new Promise(l=>{a=setTimeout(()=>{a=null,l(t)},0)}),cancel:u}}const o={state:"unknown",value:void 0},s=function(u){const l=u;if(r.has(l))return r.get(l);const f=i(),h=Lt in u?Promise.resolve().then(()=>u[Lt]()):u;return h.catch(()=>{}),n.push(Promise.race([h,f.delay]).then(d=>{d===t?r.set(l,{state:"pending",value:void 0}):r.set(l,{state:"fulfilled",value:d}),f.cancel()},d=>{r.set(l,{state:"rejected",value:d}),f.cancel()})),r.set(l,o),o};function c(){const a=lt(e,[],s);return n.length===0?a:Promise.all(n.splice(0)).then(c)}return c()}async function co(e){return Promise.resolve(Xp(e))}function uf(e){return e===null?new Zt:e}function c2(...e){return e[1]?e[0].then(uf):uf(e[0])}function u2(e,t){return c2(e,t)}var lf=class{constructor(e,t){this.property=e,this.skipRuns=t,this.coveredCases=new Map}isAsync(){return this.property.isAsync()}generate(e,t){return this.property.generate(e,t)}shrink(e){return this.property.shrink(e)}run(e){const t=ke(e);if(this.coveredCases.has(t)){const r=this.coveredCases.get(t);return this.skipRuns?u2(r,this.property.isAsync()):r}const n=this.property.run(e);return this.coveredCases.set(t,n),n}runBeforeEach(){return this.property.runBeforeEach()}runAfterEach(){return this.property.runAfterEach()}};const ff=Date.now,Qo=setTimeout,es=clearTimeout;function l2(e,t){let n=e;return e.isAsync()&&t.timeout!==void 0&&(n=new e2(n,t.timeout,Qo,es)),t.unbiased&&(n=new Jp(n)),t.skipAllAfterTimeLimit!==void 0&&(n=new tf(n,ff,t.skipAllAfterTimeLimit,!1,Qo,es)),t.interruptAfterTimeLimit!==void 0&&(n=new tf(n,ff,t.interruptAfterTimeLimit,!0,Qo,es)),t.skipEqualValues&&(n=new lf(n,!0)),t.ignoreEqualValues&&(n=new lf(n,!1)),n}let Zp=(function(e){return e[e.Success=0]="Success",e[e.Skipped=-1]="Skipped",e[e.Failure=1]="Failure",e})({});var f2=class Qp{constructor(t,n){this.verbosity=t,this.interruptedAsFailure=n,this.rootExecutionTrees=[],this.currentLevelExecutionTrees=this.rootExecutionTrees,this.failure=null,this.numSkips=0,this.numSuccesses=0,this.interrupted=!1}appendExecutionTree(t,n){const r={status:t,value:n,children:[]};return this.currentLevelExecutionTrees.push(r),r}fail(t,n,r){if(this.verbosity>=1){const i=this.appendExecutionTree(1,t);this.currentLevelExecutionTrees=i.children}this.pathToFailure===void 0?this.pathToFailure=`${n}`:this.pathToFailure+=`:${n}`,this.value=t,this.failure=r}skip(t){this.verbosity>=2&&this.appendExecutionTree(-1,t),this.pathToFailure===void 0&&++this.numSkips}success(t){this.verbosity>=2&&this.appendExecutionTree(0,t),this.pathToFailure===void 0&&++this.numSuccesses}interrupt(){this.interrupted=!0}isSuccess(){return this.pathToFailure===void 0}firstFailure(){return this.pathToFailure!==void 0?+tt(this.pathToFailure,":")[0]:-1}numShrinks(){return this.pathToFailure!==void 0?tt(this.pathToFailure,":").length-1:0}extractFailures(){if(this.isSuccess())return[];const t=[];let n=this.rootExecutionTrees;for(;n.length>0&&n[n.length-1].status===1;){const r=n[n.length-1];t.push(r.value),n=r.children}return t}static mergePaths(t,n){if(t.length===0)return n;const r=t.split(":"),i=n.split(":"),o=+r[r.length-1]+ +i[0];return[...r.slice(0,r.length-1),`${o}`,...i.slice(1)].join(":")}toRunDetails(t,n,r,i){if(!this.isSuccess())return{failed:!0,interrupted:this.interrupted,numRuns:this.firstFailure()+1-this.numSkips,numSkips:this.numSkips,numShrinks:this.numShrinks(),seed:t,counterexample:this.value,counterexamplePath:Qp.mergePaths(n,this.pathToFailure),errorInstance:this.failure.error,failures:this.extractFailures(),executionSummary:this.rootExecutionTrees,verbose:this.verbosity,runConfiguration:i.toParameters()};const o=this.interruptedAsFailure||this.numSuccesses===0;return{failed:this.numSkips>r||this.interrupted&&o,interrupted:this.interrupted,numRuns:this.numSuccesses,numSkips:this.numSkips,numShrinks:0,seed:t,counterexample:null,counterexamplePath:null,error:null,errorInstance:null,failures:[],executionSummary:this.rootExecutionTrees,verbose:this.verbosity,runConfiguration:i.toParameters()}}},em=class{constructor(e,t,n,r){this.sourceValues=e,this.shrink=t,this.runExecution=new f2(n,r),this.currentIdx=-1,this.nextValues=e}[Symbol.iterator](){return this}next(){const e=this.nextValues.next();return e.done||this.runExecution.interrupted?{done:!0,value:void 0}:(this.currentValue=e.value,++this.currentIdx,{done:!1,value:e.value.value_})}handleResult(e){e!==null&&typeof e=="object"&&!Zt.isFailure(e)?(this.runExecution.fail(this.currentValue.value_,this.currentIdx,e),this.currentIdx=-1,this.nextValues=this.shrink(this.currentValue)):e!==null?e.interruptExecution?this.runExecution.interrupt():(this.runExecution.skip(this.currentValue.value_),this.sourceValues.skippedOne()):this.runExecution.success(this.currentValue.value_)}},h2=class{constructor(e,t,n){this.initialValues=e,this.maxInitialIterations=t,this.remainingSkips=n}[Symbol.iterator](){return this}next(){if(--this.maxInitialIterations!==-1&&this.remainingSkips>=0){const e=this.initialValues.next();if(!e.done)return{value:e.value,done:!1}}return{value:void 0,done:!0}}skippedOne(){--this.remainingSkips,++this.maxInitialIterations}};const d2=-2147483648,p2=2147483647,m2=Math.pow(2,27),g2=Math.pow(2,-53);var uo=class tm{constructor(t){this.internalRng=oo(t.clone())}clone(){return new tm(this.internalRng)}next(t){return Yo(this.internalRng,0,(1<<t)-1)}nextBoolean(){return Yo(this.internalRng,0,1)===1}nextInt(t,n){return Yo(this.internalRng,t===void 0?d2:t,n===void 0?p2:n)}nextBigInt(t,n){return d0(this.internalRng,t,n)}nextDouble(){const t=this.next(26),n=this.next(27);return(t*m2+n)*g2}getState(){if("getState"in this.internalRng&&typeof this.internalRng.getState=="function")return this.internalRng.getState()}};function y2(e,t,n){return t.jump(),e.generate(new uo(t),n)}function*nm(e,t,n,r){for(let i=0;i!==r.length;++i)yield new L(r[i],void 0);for(let i=0,o=n(t);;++i)yield y2(e,o,i)}function b2(e,t,n){return()=>e.generate(new uo(t),n)}function*rm(e,t,n,r){yield*Q(r,s=>()=>new L(s,void 0));let i=0;const o=oo(n(t));for(;;)o.jump(),yield b2(e,o,i++)}function hf(e){return e()}function im(e,t,n){const r=t,i=e.split(":").map(s=>+s);if(i.length===0)return r.map(hf);if(!i.every(s=>!Number.isNaN(s)))throw new Error(`Unable to replay, got invalid path=${e}`);let o=r.drop(i[0]).map(hf);for(const s of i.slice(1)){const c=o.getNthOrLast(0);if(c===null)throw new Error(`Unable to replay, got wrong path=${e}`);o=n(c).drop(s)}return o}const w2=Object.assign;function x2(e){return e.length===1?`Hint: ${e[0]}`:e.map((t,n)=>`Hint (${n+1}): ${t}`).join(`
|
|
2
|
-
`)}function
|
|
1
|
+
"use strict";var n0=Object.defineProperty;var r0=(e,t,n)=>t in e?n0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var R=(e,t,n)=>r0(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i0=require("react"),He=require("react/jsx-runtime"),qe=require("@testing-library/react");var xl=Object.defineProperty,o0=(e,t)=>{let n={};for(var r in e)xl(n,r,{get:e[r],enumerable:!0});return xl(n,Symbol.toStringTag,{value:"Module"}),n};const s0=214013,a0=2531011,c0=4294967295,Ho=-2147483649,u0=-1443076087,l0=505908858,f0=1170746341,h0=-755606699,d0=1994129409,p0=916127744;var m0=class Mp{constructor(t){this.seed=t}clone(){return new Mp(this.seed)}next(){const t=this.seed,n=Math.imul(t,s0)+a0|0,r=Math.imul(t,u0)+l0|0,i=Math.imul(t,f0)+h0|0;this.seed=i;const o=(n&Ho)>>16,s=(r&Ho)>>16;return(i&Ho)>>16|s<<15|o<<30}jump(){this.seed=Math.imul(this.seed,d0)+p0&c0}getState(){return[this.seed]}};function g0(e){return new m0(e)}const Ge=624,ri=397,Yo=2567483615,y0=1812433253,b0=11,w0=7,x0=2636928640,S0=15,E0=4022730752,T0=18,Jo=2147483647,Xo=2147483648,v0="SUSgbA\\W`E[]KN2RUSo8XVU?HKBFRl11E\\KoWOg5B]XEWG;BE;1:oVK[`B^Z9Qd23^XTnhL>]Unda4f[X;_j9H5QD=cN<5H`3bW>9bk1mjoI2fK0obmAAINOV:>Mek_V9dd<hZ\\gC3?Fm7FEk07QH_3PLm^@?^i\\QMkgP<]oLHmFnlecg5F@7U^@4jhZ?WZS0k@GHehmM36:5^9;>Hmm`co>k:KOSkSbIINb1VFf>LXgP>GUAQTD>Ci>XMGkUflLlb?_FaFUk@?5N7i70@;1o68ah@I<HFH7R2^J:G][Gf962ITWID9GWK8ElD2G5=DcHcL]cA]P2n7A=[<bInM;IHDQnJMReRXDWbVldnGEIPij`E08Xdci3@0c:IBbD4:Nk]?lEN9j^;T`0blZX7eiWE8c`<ak7j05FZi>AjUDh?M1B?^??FAXKThf<aBOXZf7jXYGK>R<;NHk3S9YhM7STJ6`:MIE`S@7298X8W>PNK=@;lLX<i\\TXLL<W@X[X54H]in8M;;n?kkQbajgAMY=Tf9b;ZKf0QUB2FHYWfnfkDoU9YkcLd95T>lK6GM1YL\\lid:J>KYS=iJ]Y>QlF>?R5_[5QeYC=66;A32Ac>OHk_ne^0g>bK:g;KFPgbGUcPR_Z=TX3H9d03bKZ2IhEPKBo>LSGWd0iFdV8C<Y:<>T[O6lC\\blaZ>GoAYP4clf^j1IfnZJ]QeDe2X<HE[LJNWnaCg[P]Co^:IRbWPY?97UePBlZNNHY6LOBM8P>=h?Ye:_f_Sb9Ki5GDYBF4dWeMfdg^ccPllNWM7G1\\UMdoYeOOD5^e@foA22G?ADYo5:FVG[bWo96;>3kc_c1Ab30>30;1@4F8g2hY?DJ4[LOL;ZLLKo2]jo>[KMDUcR279N_kF=3WL@Dd620bMTdA\\U9k``ef2iD9JgJ8CZBHS>F^Uk;<laeaeHS<15OSeS`PcSSKBRBFY]aQ=EgUXGNg=?d56`KA@2BejY0^[_DCX`L=CGMT=BW^6S1i@2ATBVk>3_ocRA>2U:4GPQ6o>5jX2HIcV3S@On6KB<[SKB?FC_AAji9agbBFkAi\\;4I\\UJ]c36Ub@[;gQACVGY<V]SDJBUU]La\\_a@JdOO8gm2T0DJMa:8Hf7>E]noQ[1Kambn??QQ]S?1i0oMGOijb\\aGY6lQ^CJ?9bFle8<eH4UUjBINX;n8@VOA5ah^URV49B[A?ONHhHAC1J5;;h0SXYlG^0W=eJdHh^K4SGe=1HZLLam;D<Q3AOdbPcdX``82\\jo0En8jRVGC73WMCF9`d:0heS?80?C188cSn7H9<daZ]MgS4Pb^1HkA:1PU^5>^h_g[RQV@PnYBRI_]`B]Bh@Uk03eXGY`I16L76H28X`R>IROMeNVUdU[:lghLhPCQZ:4a<30YBZCYnXe[?;jc8gKI2QH2MjnWBm4nGCZW`aVU2a;P<AMI25mlW_Nm][2?b6o851X@lAm]YZ`bWRF1g<Ga:T]1NXH5Veja5P9S9>:aNg:Th1Y=5o78K>LQ8hW@5S?I83Lk5Xk;j5@I3o[d:4RjE^oS30:WP9gC\\i8aSI>QRE@4lP:7lDg8g2`Ql[2I8aBU\\BQ?B4_clL9Q]S;^e1Ob5[>3JER2`c7B=o]fPOWO<DGi;Niba1PoWPPE_Q3aX0OB0mZej\\f_M[J4Y6]1`h2MkF[GiW8Q^d3^_=<I1N2Q7]2<2j[iP7V3V821FaI]A`93bC^Z\\G=WJ;^Ih?B97_iIF@\\Dl<eK1je8SNTWo_=XFMZH<<JYLZ^YQMPgYOV45K_:]kSI8^XlO0]GY=VUfe_C_F6TOcoAlVUH:o=WhhT@K`2KFhe<3\\KXQ>W:M?S_4S5d@J^`[AGA7@3]DnGSCO`\\?E8HT75^d9\\:m\\m1egIfk8cd6bD9\\eU8\\n[Pb0Cgd^S0n9kGJHb]i5XodlKHc34Fhi9K>0U5WK`>7Ff2^KL=WC6:kc?e5C^a1T1:4:^S5flXlGNIj08AfO?Dh7T7dWO>E]NI9?ob7B7P_h[4TEP[EU;GllFTnSmg9:\\[N]<SAoKP_kPlG56A:I3T6EG8Hj=XnUE`KT5U@OQ?]7[N^MFN1_NU4KO_3::Le`8IL9[1Z1H1;V3SC\\N3]S@4U[F2mhT5dYM7[4Pg_Na0_8WTH0`bgceQS8]EG;XgD4Ib4iLTP@kE79Mn>AYRJA1U5^Blhgno:aHVYc03c3J0Vc9FjEV^M75Zfd8kVC9>iJDk`AJ[6f7DK2D^DL\\AX:6b5h31XH;RQB\\N<ZSM=J;6L[`UW^eOIFc1Y]6_dfedIe4ARh72mTXC0WND_IDHVCZRDE0eODARCEETQI5TPUQE=jEH5bS?LP[ai`F5ABRYDo2o\\@=]GT?_9;hc4Lm:\\SF9k1T<0E@fX9BG[]g0nY7k[Qmi@la8`PF0j6@Q?Ii7bLkXQ<lLHf]`:DCh@9JY5>hEVLTdhL\\b1EB0lLh<=WaO@F<;8g<d:@e:LA:cFIEdmQh7hNHfSRToW?8N4:Z1K;XEDRO;OIDh<UdVln?bjgL>?VE98[B\\K<BVjkG8LiSX;fb>jf?DUK00Aih<WY6QD6cEnHBZ8iN_fd<G8Ci`11RUW2QlW]IXV:m?;J0GXXHfGNQ>:D`=fLPbO?VOTEYLj^cNj5PM>jKB5HVjJ4U7lXaTQNL9<@\\1`m\\Ug@VQHd7>jW=ca0`miF7;N0F=GjoQ`RFchKMGTmn8cF@Oh4GGCm7m2`U9j93Tb>=kSERjE_J939F01I1;`<ijk_=_Vn=7RVAI6fnQI5KlF:C44bN<<8K=Z<2TP<1]5?<dB>^LA=ebloE2Y2:9lkh0\\<YKbHD97iE`<C5oj^1>X:??`H6BXF2hG1Q[dF0Q=>W=J?7C\\k1T?<;R44oW?1hY^G8Zm]ZKnfOf0eCFYo6?=D8?<`6HU5SXh1;=:23LmV_FSi;OJfV<^?GkIDPISeHg1LaGE:V3Y3K3H<QJfbY?=;ldZRhnhQT_mGXDLFXXhSONE6Do_0iNZagB:BPGOTH;VhHUTd6LhQm^[;dO]5Hlkg<R:F<Kn\\:I:EGojgWZ2X@SYO_dlH;G8S<>oEKabY`:oU;=JW7ig?S?EYb86b7n8ce\\]IRa]koiWY<RfO;5kUI;7lVeC?[@ZaXDiF04B8R]bg@>O<mQDoUcBLcf^f>m2kMBUloD>Ze@NN^Z11TM`inXYhE_I=kA`:ZF4d\\>`L@;ZP[`ENU5cL[BV6\\Z?Di76:jg3hE6oG6jFc8kP=[GS1;WSedYQW1:U4\\OF32GgmMC<AjO]872bdBb`bKAA?8j78b>T3VfcUB2m4J^CPRU;8dScI]LU]^bBYA5_3:Y0N5i^?200000";var A0=class Op{constructor(t,n){this.states=t,this.index=n}clone(){return new Op(this.states.slice(),this.index)}next(){let t=this.states[this.index];return t^=t>>>b0,t^=t<<w0&x0,t^=t<<S0&E0,t^=t>>>T0,this.index=vi(this.states,this.index),t}getState(){return[this.index,...this.states]}jump(){const t=this.states.slice(),n=this.index;this.index=vi(this.states,this.index);for(let r=19932;r>0;--r)v0.charCodeAt(r/6|0)-48&1<<r%6&&Sl(this.states,this.index,t,n),this.index=vi(this.states,this.index);Sl(this.states,this.index,t,n)}};function Sl(e,t,n,r){let i=0;if(r>=t){for(;i<Ge-r;i++)e[i+t]^=n[i+r];for(;i<Ge-t;i++)e[i+t]^=n[i+r-Ge];for(;i<Ge;i++)e[i+t-Ge]^=n[i+r-Ge]}else{for(;i<Ge-t;i++)e[i+t]^=n[i+r];for(;i<Ge-r;i++)e[i+t-Ge]^=n[i+r];for(;i<Ge;i++)e[i+t-Ge]^=n[i+r-Ge]}}function vi(e,t){if(t<Ge-ri){const n=e[t]&Xo|e[t+1]&Jo;return e[t]=e[t+ri]^n>>>1^-(n&1)&Yo,t+1}else if(t<Ge-1){const n=e[t]&Xo|e[t+1]&Jo;return e[t]=e[t+ri-Ge]^n>>>1^-(n&1)&Yo,t+1}else{const n=e[t]&Xo|e[0]&Jo;return e[t]=e[ri-1]^n>>>1^-(n&1)&Yo,0}}function k0(e){for(let t=0;t!==Ge;++t)vi(e,t)}function I0(e){const t=[e|0];for(let n=1;n!==Ge;++n){const r=t[n-1]^t[n-1]>>>30;t.push(Math.imul(y0,r)+n|0)}return k0(t),new A0(t,0)}const C0=[1667051007,2321340297,1548169110,304075285];var _0=class Pp{constructor(t,n,r,i){this.s01=t,this.s00=n,this.s11=r,this.s10=i}clone(){return new Pp(this.s01,this.s00,this.s11,this.s10)}next(){const t=this.s00^this.s00<<23,n=this.s01^(this.s01<<23|this.s00>>>9),r=this.s10,i=this.s11,o=this.s00+r|0;return this.s01=i,this.s00=r,this.s11=n^i^n>>>18^i>>>5,this.s10=t^r^(t>>>18|n<<14)^(r>>>5|i<<27),o}jump(){let t=0,n=0,r=0,i=0,o=this.s01,s=this.s00,c=this.s11,a=this.s10;for(let u=0;u!==4;++u){const l=C0[u];for(let f=1;f;f<<=1){l&f&&(t^=o,n^=s,r^=c,i^=a);const h=s^s<<23,d=o^(o<<23|s>>>9);o=c,s=a,a=h^a^(h>>>18|d<<14)^(a>>>5|c<<27),c=d^c^d>>>18^c>>>5}}this.s01=t,this.s00=n,this.s11=r,this.s10=i}getState(){return[this.s01,this.s00,this.s11,this.s10]}};function El(e){return new _0(-1,~e,e|0,0)}const $0=[3639956645,3750757012,1261568508,386426335];var M0=class Np{constructor(t,n,r,i){this.s01=t,this.s00=n,this.s11=r,this.s10=i}clone(){return new Np(this.s01,this.s00,this.s11,this.s10)}next(){const t=this.s00+this.s10|0,n=this.s10^this.s00,r=this.s11^this.s01,i=this.s00,o=this.s01;return this.s00=i<<24^o>>>8^n^n<<16,this.s01=o<<24^i>>>8^r^(r<<16|n>>>16),this.s10=r<<5^n>>>27,this.s11=n<<5^r>>>27,t}jump(){let t=0,n=0,r=0,i=0,o=this.s01,s=this.s00,c=this.s11,a=this.s10;for(let u=0;u!==4;++u){const l=$0[u];for(let f=1;f;f<<=1){l&f&&(t^=o,n^=s,r^=c,i^=a);const h=a^s,d=c^o,m=s,p=o;s=m<<24^p>>>8^h^h<<16,o=p<<24^m>>>8^d^(d<<16|h>>>16),a=d<<5^h>>>27,c=h<<5^d>>>27}}this.s01=t,this.s00=n,this.s11=r,this.s10=i}getState(){return[this.s01,this.s00,this.s11,this.s10]}};function O0(e){return new M0(-1,~e,e|0,0)}function P0(e,t){for(let n=0;n!==t;++n)e.next()}const Tl=BigInt,N0=4294967296n;function j0(e,t,n){const r=n-t+1n;let i=N0,o=1;for(;i<r;)i<<=32n,++o;let s=vl(o,e);if(s<r)return s+t;if(s+r<i)return s%r+t;const c=i-i%r;for(;s>=c;)s=vl(o,e);return s%r+t}function vl(e,t){let n=Tl(t.next()+2147483648);for(let r=1;r<e;++r){const i=t.next();n=(n<<32n)+Tl(i+2147483648)}return n}function wr(e,t){const n=t>2?~~(4294967296/t)*t:4294967296;let r=e.next()+2147483648;for(;r>=n;)r=e.next()+2147483648;return r%t}function Zo(e,t){if(t<0){const n=-t;e.sign=-1,e.data[0]=~~(n/4294967296),e.data[1]=n>>>0}else e.sign=1,e.data[0]=~~(t/4294967296),e.data[1]=t>>>0;return e}function F0(e,t,n){const r=t.data[1],i=t.data[0],o=t.sign,s=n.data[1],c=n.data[0],a=n.sign;if(e.sign=1,o===1&&a===-1){const p=r+s,y=i+c+(p>4294967295?1:0);return e.data[0]=y>>>0,e.data[1]=p>>>0,e}let u=r,l=i,f=s,h=c;o===-1&&(u=s,l=c,f=r,h=i);let d=0,m=u-f;return m<0&&(d=1,m=m>>>0),e.data[0]=l-h-d,e.data[1]=m,e}function R0(e,t,n){const r=n[0]+1;for(t[0]=wr(e,r),t[1]=wr(e,4294967296);t[0]>=n[0]&&(t[0]!==n[0]||t[1]>=n[1]);)t[0]=wr(e,r),t[1]=wr(e,4294967296);return t}const L0=Number.MAX_SAFE_INTEGER,D0={sign:1,data:[0,0]},B0={sign:1,data:[0,0]},Al={sign:1,data:[0,0]},Qo=[0,0];function U0(e,t,n,r){const i=r<=L0?Zo(Al,r):F0(Al,Zo(D0,n),Zo(B0,t));return i.data[1]===4294967295?(i.data[0]+=1,i.data[1]=0):i.data[1]+=1,R0(e,Qo,i.data),Qo[0]*4294967296+Qo[1]+t}function es(e,t,n){const r=n-t;return r<=4294967295?wr(e,r+1)+t:U0(e,t,n,r)}const kl=Symbol.for("fast-check/PreconditionFailure");var gt=class extends Error{constructor(e=!1){super(),this.interruptExecution=e,this.footprint=kl}static isFailure(e){return e!=null&&e.footprint===kl}};function jp(e){if(!e)throw new gt}var V0=class{[Symbol.iterator](){return this}next(e){return{value:e,done:!0}}};const q0=new V0;function W0(){return q0}function*z0(e,t){for(const n of e)yield t(n)}function*G0(e,t){for(const n of e)yield*t(n)}function*K0(e,t){for(const n of e)t(n)&&(yield n)}function*H0(e,t){for(let n=0;n<t;++n){const r=e.next();if(r.done)break;yield r.value}}function*Y0(e,t){let n=e.next();for(;!n.done&&t(n.value);)yield n.value,n=e.next()}function*J0(e,t){for(let n=e.next();!n.done;n=e.next())yield n.value;for(const n of t)for(let r=n.next();!r.done;r=n.next())yield r.value}const X0=Symbol.iterator;var J=class Kt{static nil(){return new Kt(W0())}static of(...t){return new Kt(t[X0]())}constructor(t){this.g=t}next(){return this.g.next()}[Symbol.iterator](){return this.g}map(t){return new Kt(z0(this.g,t))}flatMap(t){return new Kt(G0(this.g,t))}dropWhile(t){let n=!1;function*r(i){(n||!t(i))&&(n=!0,yield i)}return this.flatMap(r)}drop(t){if(t<=0)return this;let n=0;function r(){return n++<t}return this.dropWhile(r)}takeWhile(t){return new Kt(Y0(this.g,t))}take(t){return new Kt(H0(this.g,t))}filter(t){return new Kt(K0(this.g,t))}every(t){for(const n of this.g)if(!t(n))return!1;return!0}has(t){for(const n of this.g)if(t(n))return[!0,n];return[!1,null]}join(...t){return new Kt(J0(this.g,t))}getNthOrLast(t){let n=t,r=null;for(const i of this.g){if(n--===0)return i;r=i}return r}};function Qt(e){return new J(e)}const Fe=Symbol.for("fast-check/cloneMethod");function yn(e){return e!==null&&(typeof e=="object"||typeof e=="function")&&Fe in e&&typeof e[Fe]=="function"}function Tn(e){return yn(e)?e[Fe]():e}const Z0=Object.defineProperty;var L=class{constructor(e,t,n){this.value_=e,this.context=t,this.hasToBeCloned=n!==void 0||yn(e),this.readOnce=!1,this.value=e,this.hasToBeCloned&&Z0(this,"value",{get:n!==void 0?n:this.getValue,enumerable:!1,configurable:!1})}getValue(){return this.hasToBeCloned?this.readOnce?this.value_[Fe]():(this.readOnce=!0,this.value_):this.value_}},xe=class{filter(e){return new tw(this,e)}map(e,t){return new ew(this,e,t)}chain(e){return new Q0(this,e)}},Q0=class extends xe{constructor(e,t){super(),this.arb=e,this.chainer=t}generate(e,t){const n=e.clone(),r=this.arb.generate(e,t);return this.valueChainer(r,e,n,t)}canShrinkWithoutContext(e){return!1}shrink(e,t){return this.isSafeContext(t)?(t.stoppedForOriginal?J.nil():this.arb.shrink(t.originalValue,t.originalContext).map(n=>this.valueChainer(n,t.clonedMrng.clone(),t.clonedMrng,t.originalBias))).join(t.chainedArbitrary.shrink(e,t.chainedContext).map(n=>{const r={...t,chainedContext:n.context,stoppedForOriginal:!0};return new L(n.value_,r)})):J.nil()}valueChainer(e,t,n,r){const i=this.chainer(e.value_),o=i.generate(t,r),s={originalBias:r,originalValue:e.value_,originalContext:e.context,stoppedForOriginal:!1,chainedArbitrary:i,chainedContext:o.context,clonedMrng:n};return new L(o.value_,s)}isSafeContext(e){return e!=null&&typeof e=="object"&&"originalBias"in e&&"originalValue"in e&&"originalContext"in e&&"stoppedForOriginal"in e&&"chainedArbitrary"in e&&"chainedContext"in e&&"clonedMrng"in e}};function Fp(e,t){const n=e.value,r=t(n);return e.hasToBeCloned&&(typeof r=="object"&&r!==null||typeof r=="function")&&Object.isExtensible(r)&&!yn(r)&&Object.defineProperty(r,Fe,{get:()=>()=>Fp(e,t)[0]}),[r,n]}function Il(e,t){const[n,r]=Fp(e,t);return new L(n,{originalValue:r,originalContext:e.context})}var ew=class extends xe{constructor(e,t,n){super(),this.arb=e,this.mapper=t,this.unmapper=n,this.bindValueMapper=r=>Il(r,t)}generate(e,t){const n=this.arb.generate(e,t);if(!n.hasToBeCloned){const r=n.value;return new L(this.mapper(r),{originalValue:r,originalContext:n.context})}return Il(n,this.mapper)}canShrinkWithoutContext(e){if(this.unmapper!==void 0)try{const t=this.unmapper(e);return this.arb.canShrinkWithoutContext(t)}catch{return!1}return!1}shrink(e,t){if(this.isSafeContext(t))return this.arb.shrink(t.originalValue,t.originalContext).map(this.bindValueMapper);if(this.unmapper!==void 0){const n=this.unmapper(e);return this.arb.shrink(n,void 0).map(this.bindValueMapper)}return J.nil()}isSafeContext(e){return e!=null&&typeof e=="object"&&"originalValue"in e&&"originalContext"in e}},tw=class extends xe{constructor(e,t){super(),this.arb=e,this.refinement=t,this.bindRefinementOnValue=n=>this.refinementOnValue(n)}generate(e,t){for(;;){const n=this.arb.generate(e,t);if(this.refinementOnValue(n))return n}}canShrinkWithoutContext(e){return this.arb.canShrinkWithoutContext(e)&&this.refinement(e)}shrink(e,t){return this.arb.shrink(e,t).filter(this.bindRefinementOnValue)}refinementOnValue(e){return this.refinement(e.value)}};function Rp(e){return typeof e=="object"&&e!==null&&"generate"in e&&"shrink"in e&&"canShrinkWithoutContext"in e}function Lp(e){if(!Rp(e))throw new Error("Unexpected value received: not an instance of Arbitrary")}const Dp=Function.prototype.apply,ts=Symbol("apply");function nw(e){try{return e.apply}catch{return}}function rw(e,t,n){const r=e;r[ts]=Dp;const i=r[ts](t,n);return delete r[ts],i}function Z(e,t,n){return nw(e)===Dp?e.apply(t,n):rw(e,t,n)}const Bp=Array,F=BigInt,iw=BigInt64Array,ow=BigUint64Array,Up=Boolean,Bi=Date,D=Error,Vp=Float32Array,qp=Float64Array,sw=Int8Array,aw=Int16Array,cw=Int32Array,Xt=Number,nt=String,It=Set,uw=Uint8Array,lw=Uint8ClampedArray,fw=Uint16Array,hw=Uint32Array,dw=encodeURIComponent,Zt=Map,Ai=Symbol,Cl=Array.prototype.forEach,_l=Array.prototype.indexOf,$l=Array.prototype.join,Ml=Array.prototype.map,Ol=Array.prototype.flat,Pl=Array.prototype.filter,Nl=Array.prototype.push,jl=Array.prototype.pop,Fl=Array.prototype.splice,Rl=Array.prototype.slice,Ll=Array.prototype.sort,Dl=Array.prototype.every;function pw(e){try{return e.forEach}catch{return}}function mw(e){try{return e.indexOf}catch{return}}function gw(e){try{return e.join}catch{return}}function yw(e){try{return e.map}catch{return}}function bw(e){try{return e.flat}catch{return}}function ww(e){try{return e.filter}catch{return}}function xw(e){try{return e.push}catch{return}}function Sw(e){try{return e.pop}catch{return}}function Ew(e){try{return e.splice}catch{return}}function Tw(e){try{return e.slice}catch{return}}function vw(e){try{return e.sort}catch{return}}function Aw(e){try{return e.every}catch{return}}function Wp(e,t){return pw(e)===Cl?e.forEach(t):Z(Cl,e,[t])}function Ir(e,...t){return mw(e)===_l?e.indexOf(...t):Z(_l,e,t)}function Se(e,...t){return gw(e)===$l?e.join(...t):Z($l,e,t)}function Q(e,t){return yw(e)===Ml?e.map(t):Z(Ml,e,[t])}function kw(e,t){return bw(e)===Ol?e.flat(t):Z(Ol,e,[t])}function Iw(e,t){return ww(e)===Pl?e.filter(t):Z(Pl,e,[t])}function N(e,...t){return xw(e)===Nl?e.push(...t):Z(Nl,e,t)}function zp(e){return Sw(e)===jl?e.pop():Z(jl,e,[])}function Gp(e,...t){return Ew(e)===Fl?e.splice(...t):Z(Fl,e,t)}function Be(e,...t){return Tw(e)===Rl?e.slice(...t):Z(Rl,e,t)}function Kp(e,...t){return vw(e)===Ll?e.sort(...t):Z(Ll,e,t)}function Hp(e,...t){return Aw(e)===Dl?e.every(...t):Z(Dl,e,t)}const Bl=Date.prototype.getTime,Ul=Date.prototype.toISOString;function Cw(e){try{return e.getTime}catch{return}}function _w(e){try{return e.toISOString}catch{return}}function Ui(e){return Cw(e)===Bl?e.getTime():Z(Bl,e,[])}function $w(e){return _w(e)===Ul?e.toISOString():Z(Ul,e,[])}const Vl=Set.prototype.add,ql=Set.prototype.has;function Mw(e){try{return e.add}catch{return}}function Ow(e){try{return e.has}catch{return}}function Cr(e,t){return Mw(e)===Vl?e.add(t):Z(Vl,e,[t])}function hn(e,t){return Ow(e)===ql?e.has(t):Z(ql,e,[t])}const Wl=WeakMap.prototype.set,zl=WeakMap.prototype.get;function Pw(e){try{return e.set}catch{return}}function Nw(e){try{return e.get}catch{return}}function jw(e,t,n){return Pw(e)===Wl?e.set(t,n):Z(Wl,e,[t,n])}function Fw(e,t){return Nw(e)===zl?e.get(t):Z(zl,e,[t])}const Gl=Map.prototype.set,Kl=Map.prototype.get,Hl=Map.prototype.has;function Rw(e){try{return e.set}catch{return}}function Lw(e){try{return e.get}catch{return}}function Dw(e){try{return e.has}catch{return}}function At(e,t,n){return Rw(e)===Gl?e.set(t,n):Z(Gl,e,[t,n])}function mt(e,t){return Lw(e)===Kl?e.get(t):Z(Kl,e,[t])}function Bw(e,t){return Dw(e)===Hl?e.has(t):Z(Hl,e,[t])}const Yl=String.prototype.split,Jl=String.prototype.startsWith,Xl=String.prototype.endsWith,Zl=String.prototype.substring,Ql=String.prototype.toLowerCase,ef=String.prototype.toUpperCase,tf=String.prototype.padStart,nf=String.prototype.charCodeAt,rf=String.prototype.normalize,of=String.prototype.replace;function Uw(e){try{return e.split}catch{return}}function Vw(e){try{return e.startsWith}catch{return}}function qw(e){try{return e.endsWith}catch{return}}function Ww(e){try{return e.substring}catch{return}}function zw(e){try{return e.toLowerCase}catch{return}}function Gw(e){try{return e.toUpperCase}catch{return}}function Kw(e){try{return e.padStart}catch{return}}function Hw(e){try{return e.charCodeAt}catch{return}}function Yw(e){try{return e.normalize}catch{return}}function Jw(e){try{return e.replace}catch{return}}function rt(e,...t){return Uw(e)===Yl?e.split(...t):Z(Yl,e,t)}function Xw(e,...t){return Vw(e)===Jl?e.startsWith(...t):Z(Jl,e,t)}function Zw(e,...t){return qw(e)===Xl?e.endsWith(...t):Z(Xl,e,t)}function Te(e,...t){return Ww(e)===Zl?e.substring(...t):Z(Zl,e,t)}function la(e){return zw(e)===Ql?e.toLowerCase():Z(Ql,e,[])}function lc(e){return Gw(e)===ef?e.toUpperCase():Z(ef,e,[])}function Qw(e,...t){return Kw(e)===tf?e.padStart(...t):Z(tf,e,t)}function Hn(e,t){return Hw(e)===nf?e.charCodeAt(t):Z(nf,e,[t])}function e2(e,t){return Yw(e)===rf?e.normalize(t):Z(rf,e,[t])}function t2(e,t,n){return Jw(e)===of?e.replace(t,n):Z(of,e,[t,n])}const sf=Number.prototype.toString;function n2(e){try{return e.toString}catch{return}}function _r(e,...t){return n2(e)===sf?e.toString(...t):Z(sf,e,t)}const r2=Object.prototype.hasOwnProperty,i2=Object.prototype.toString;function Yp(e,t){return Z(r2,e,[t])}function fa(e){return Z(i2,e,[])}const o2=Error.prototype.toString;function s2(e){return Z(o2,e,[])}var a2=class{constructor(e){this.producer=e}[Symbol.iterator](){return this.it===void 0&&(this.it=this.producer()),this.it}next(){return this.it===void 0&&(this.it=this.producer()),this.it.next()}};function dn(e){return new a2(e)}const Jp=Array.isArray,c2=Object.defineProperty;function fc(e,t,n){return c2(e,Fe,{value:()=>{const r=[];for(let i=0;i!==n.length;++i){let o=n[i];o===void 0&&(o=new L(e[i],t[i])),N(r,o.value)}return fc(r,t,n),r}})}function Xp(e,t,n){const r=[],i=Jp(n)?n:[];for(let o=0;o!==e.length;++o)N(r,dn(()=>e[o].shrink(t[o],i[o]).map(s=>{let c=!1;const a=[],u=[],l=[];for(let f=0;f!==e.length;++f){const h=f===o?s:new L(Tn(t[f]),i[f]);h.hasToBeCloned&&(c=!0,l[f]=h),N(a,h.value),N(u,h.context)}return c&&fc(a,u,l),new L(a,u)})));return J.nil().join(...r)}var u2=class extends xe{constructor(e){super(),this.arbs=e;for(let t=0;t!==e.length;++t){const n=e[t];if(n==null||n.generate===null||n.generate===void 0)throw new Error(`Invalid parameter encountered at index ${t}: expecting an Arbitrary`)}}generate(e,t){let n=!1;const r=[],i=[],o=[];for(let s=0;s!==this.arbs.length;++s){const c=this.arbs[s].generate(e,t);c.hasToBeCloned&&(n=!0,o[s]=c),N(r,c.value),N(i,c.context)}return n&&fc(r,i,o),new L(r,i)}canShrinkWithoutContext(e){if(!Jp(e)||e.length!==this.arbs.length)return!1;for(let t=0;t!==this.arbs.length;++t)if(!this.arbs[t].canShrinkWithoutContext(e[t]))return!1;return!0}shrink(e,t){return Xp(this.arbs,e,t)}};function H(...e){return new u2(e)}const l2=Math.log;function Zp(e){return 2+~~(l2(e+1)*.4342944819032518)}let hc={};function Qp(e){hc=e}function xt(){return hc}function em(){hc={}}const $r=Symbol("UndefinedContextPlaceholder");function Yn(e){return e.context!==void 0?e:e.hasToBeCloned?new L(e.value_,$r,()=>e.value):new L(e.value_,$r)}const af=()=>{};var f2=class{constructor(e,t){this.arb=e,this.predicate=t;const{asyncBeforeEach:n,asyncAfterEach:r,beforeEach:i,afterEach:o}=xt()||{};if(n!==void 0&&i!==void 0)throw D(`Global "asyncBeforeEach" and "beforeEach" parameters can't be set at the same time when running async properties`);if(r!==void 0&&o!==void 0)throw D(`Global "asyncAfterEach" and "afterEach" parameters can't be set at the same time when running async properties`);this.beforeEachHook=n||i||af,this.afterEachHook=r||o||af}isAsync(){return!0}generate(e,t){return Yn(this.arb.generate(e,t!==void 0?Zp(t):void 0))}shrink(e){if(e.context===void 0&&!this.arb.canShrinkWithoutContext(e.value_))return J.nil();const t=e.context!==$r?e.context:void 0;return this.arb.shrink(e.value_,t).map(Yn)}async runBeforeEach(){await this.beforeEachHook()}async runAfterEach(){await this.afterEachHook()}async run(e){try{const t=await this.predicate(e);return t===void 0||t===!0?null:{error:new D("Property failed by returning false")}}catch(t){return gt.isFailure(t)?t:{error:t}}}beforeEach(e){const t=this.beforeEachHook;return this.beforeEachHook=()=>e(t),this}afterEach(e){const t=this.afterEachHook;return this.afterEachHook=()=>e(t),this}},tm=class extends xe{constructor(e){super(),this.arb=e}generate(e,t){return Yn(this.arb.generate(e,t))}canShrinkWithoutContext(e){return!0}shrink(e,t){if(t===void 0&&!this.arb.canShrinkWithoutContext(e))return J.nil();const n=t!==$r?t:void 0;return this.arb.shrink(e,n).map(Yn)}};function dc(...e){if(e.length<2)throw new Error("asyncProperty expects at least two parameters");const t=Be(e,0,e.length-1),n=e[e.length-1];return Wp(t,Lp),new f2(H(...Q(t,r=>new tm(r))),r=>n(...r))}const cf=()=>{};var nm=class{constructor(e,t){this.arb=e,this.predicate=t;const{beforeEach:n=cf,afterEach:r=cf,asyncBeforeEach:i,asyncAfterEach:o}=xt()||{};if(i!==void 0)throw D(`"asyncBeforeEach" can't be set when running synchronous properties`);if(o!==void 0)throw D(`"asyncAfterEach" can't be set when running synchronous properties`);this.beforeEachHook=n,this.afterEachHook=r}isAsync(){return!1}generate(e,t){return Yn(this.arb.generate(e,t!==void 0?Zp(t):void 0))}shrink(e){if(e.context===void 0&&!this.arb.canShrinkWithoutContext(e.value_))return J.nil();const t=e.context!==$r?e.context:void 0;return this.arb.shrink(e.value_,t).map(Yn)}runBeforeEach(){this.beforeEachHook()}runAfterEach(){this.afterEachHook()}run(e){try{const t=this.predicate(e);return t===void 0||t===!0?null:{error:new D("Property failed by returning false")}}catch(t){return gt.isFailure(t)?t:{error:t}}}beforeEach(e){const t=this.beforeEachHook;return this.beforeEachHook=()=>e(t),this}afterEach(e){const t=this.afterEachHook;return this.afterEachHook=()=>e(t),this}};function Ur(...e){if(e.length<2)throw new Error("property expects at least two parameters");const t=Be(e,0,e.length-1),n=e[e.length-1];return Wp(t,Lp),new nm(H(...Q(t,r=>new tm(r))),r=>n(...r))}let rm=(function(e){return e[e.None=0]="None",e[e.Verbose=1]="Verbose",e[e.VeryVerbose=2]="VeryVerbose",e})({});function ha(e){return"unsafeNext"in e?e.unsafeJump===void 0?{clone:()=>ha(e),next:()=>e.unsafeNext(),getState:()=>e.getState()}:{clone:()=>ha(e),next:()=>e.unsafeNext(),jump:()=>e.unsafeJump(),getState:()=>e.getState()}:e}function im(e){return"jump"in e&&typeof e.jump=="function"?e:{clone:()=>im(e),next:()=>e.next(),jump:()=>P0(e,42),getState:()=>e.getState()}}function lo(e){return im(ha(e))}const h2=Date.now,d2=Math.min,p2=Math.random;var m2=class{constructor(e){const t=e||{};this.seed=g2(t),this.randomType=y2(t),this.numRuns=b2(t),this.verbose=w2(t),this.maxSkipsPerRun=t.maxSkipsPerRun!==void 0?t.maxSkipsPerRun:100,this.timeout=rs(t.timeout),this.skipAllAfterTimeLimit=rs(t.skipAllAfterTimeLimit),this.interruptAfterTimeLimit=rs(t.interruptAfterTimeLimit),this.markInterruptAsFailure=t.markInterruptAsFailure===!0,this.skipEqualValues=t.skipEqualValues===!0,this.ignoreEqualValues=t.ignoreEqualValues===!0,this.logger=t.logger!==void 0?t.logger:n=>{console.log(n)},this.path=t.path!==void 0?t.path:"",this.unbiased=t.unbiased===!0,this.examples=t.examples!==void 0?t.examples:[],this.endOnFailure=t.endOnFailure===!0,this.reporter=t.reporter,this.asyncReporter=t.asyncReporter,this.includeErrorInReport=t.includeErrorInReport===!0,this.plugins=t.plugins!==void 0?t.plugins:[]}toParameters(){return{seed:this.seed,randomType:this.randomType,numRuns:this.numRuns,maxSkipsPerRun:this.maxSkipsPerRun,timeout:this.timeout,skipAllAfterTimeLimit:this.skipAllAfterTimeLimit,interruptAfterTimeLimit:this.interruptAfterTimeLimit,markInterruptAsFailure:this.markInterruptAsFailure,skipEqualValues:this.skipEqualValues,ignoreEqualValues:this.ignoreEqualValues,path:this.path,logger:this.logger,unbiased:this.unbiased,verbose:this.verbose,examples:this.examples,endOnFailure:this.endOnFailure,reporter:this.reporter,asyncReporter:this.asyncReporter,includeErrorInReport:this.includeErrorInReport,plugins:this.plugins}}};function ns(e){return t=>lo(e(t))}function g2(e){if(e.seed===void 0)return h2()^p2()*4294967296;const t=e.seed|0;return e.seed===t?t:t^(e.seed-t)*4294967296}function y2(e){if(e.randomType===void 0)return El;if(typeof e.randomType=="string")switch(e.randomType){case"mersenne":return ns(I0);case"congruential":case"congruential32":return ns(g0);case"xorshift128plus":return El;case"xoroshiro128plus":return O0;default:throw new Error(`Invalid random specified: '${e.randomType}'`)}const t=e.randomType(0);if("min"in t&&t.min!==-2147483648)throw new Error(`Invalid random number generator: min must equal -0x80000000, got ${String(t.min)}`);if("max"in t&&t.max!==2147483647)throw new Error(`Invalid random number generator: max must equal 0x7fffffff, got ${String(t.max)}`);return t===lo(t)?e.randomType:ns(e.randomType)}function b2(e){return e.numRuns!==void 0?e.numRuns:e.num_runs!==void 0?e.num_runs:100}function w2(e){return e.verbose===void 0?0:typeof e.verbose=="boolean"?e.verbose===!0?1:0:e.verbose<=0?0:e.verbose>=2?2:e.verbose|0}function rs(e){if(e!==void 0)return d2(e,2147483647)}function pc(e){return new m2(e)}function x2(e,t,n){let r=null;return{clear:()=>n(r),promise:new Promise(i=>{r=t(()=>{i(new gt(!0))},e)})}}var uf=class{constructor(e,t,n,r,i,o){this.property=e,this.getTime=t,this.interruptExecution=r,this.setTimeoutSafe=i,this.clearTimeoutSafe=o,this.skipAfterTime=this.getTime()+n}isAsync(){return this.property.isAsync()}generate(e,t){return this.property.generate(e,t)}shrink(e){return this.property.shrink(e)}run(e){const t=this.skipAfterTime-this.getTime();if(t<=0){const n=new gt(this.interruptExecution);return this.isAsync()?Promise.resolve(n):n}if(this.interruptExecution&&this.isAsync()){const n=x2(t,this.setTimeoutSafe,this.clearTimeoutSafe),r=Promise.race([this.property.run(e),n.promise]);return r.then(n.clear,n.clear),r}return this.property.run(e)}runBeforeEach(){return this.property.runBeforeEach()}runAfterEach(){return this.property.runAfterEach()}};const S2=(e,t,n)=>{let r=null;return{clear:()=>n(r),promise:new Promise(i=>{r=t(()=>{i({error:new D(`Property timeout: exceeded limit of ${e} milliseconds`)})},e)})}};var E2=class{constructor(e,t,n,r){this.property=e,this.timeMs=t,this.setTimeoutSafe=n,this.clearTimeoutSafe=r}isAsync(){return!0}generate(e,t){return this.property.generate(e,t)}shrink(e){return this.property.shrink(e)}async run(e){const t=S2(this.timeMs,this.setTimeoutSafe,this.clearTimeoutSafe),n=Promise.race([this.property.run(e),t.promise]);return n.then(t.clear,t.clear),n}runBeforeEach(){return Promise.resolve(this.property.runBeforeEach())}runAfterEach(){return Promise.resolve(this.property.runAfterEach())}},om=class{constructor(e){this.property=e}isAsync(){return this.property.isAsync()}generate(e,t){return this.property.generate(e,void 0)}shrink(e){return this.property.shrink(e)}run(e){return this.property.run(e)}runBeforeEach(){return this.property.runBeforeEach()}runAfterEach(){return this.property.runAfterEach()}};const lf=Array.from,ff=typeof Buffer<"u"?Buffer.isBuffer:void 0,Fn=JSON.stringify,hf=Number.isNaN,T2=Object.keys,v2=Object.getOwnPropertySymbols,A2=Object.getOwnPropertyDescriptor,df=Object.getPrototypeOf,pf=Number.NEGATIVE_INFINITY,k2=Number.POSITIVE_INFINITY,St=Symbol.for("fast-check/toStringMethod");function fo(e){return e!==null&&(typeof e=="object"||typeof e=="function")&&St in e&&typeof e[St]=="function"}const Ut=Symbol.for("fast-check/asyncToStringMethod");function ho(e){return e!==null&&(typeof e=="object"||typeof e=="function")&&Ut in e&&typeof e[Ut]=="function"}const I2=/^Symbol\((.*)\)$/;function C2(e){if(e.description!==void 0)return e.description;const t=I2.exec(nt(e));return t&&t[1].length?t[1]:null}function mf(e){switch(e){case 0:return 1/e===pf?"-0":"0";case pf:return"Number.NEGATIVE_INFINITY";case k2:return"Number.POSITIVE_INFINITY";default:return e===e?nt(e):"Number.NaN"}}function _2(e){let t=-1;for(const n in e){const r=Number(n);if(r!==t+1)return!0;t=r}return t+1!==e.length}function ht(e,t,n){const r=[...t,e];if(typeof e=="object"&&Ir(t,e)!==-1)return"[cyclic]";if(ho(e)){const i=n(e);if(i.state==="fulfilled")return i.value}if(fo(e))try{return e[St]()}catch{}switch(fa(e)){case"[object Array]":{const i=e;if(i.length>=50&&_2(i)){const s=[];for(const c in i)hf(Number(c))||N(s,`${c}:${ht(i[c],r,n)}`);return s.length!==0?`Object.assign(Array(${i.length}),{${Se(s,",")}})`:`Array(${i.length})`}const o=Se(Q(i,s=>ht(s,r,n)),",");return i.length===0||i.length-1 in i?`[${o}]`:`[${o},]`}case"[object BigInt]":return`${e}n`;case"[object Boolean]":{const i=e==!0?"true":"false";return typeof e=="boolean"?i:`new Boolean(${i})`}case"[object Date]":{const i=e;return hf(Ui(i))?"new Date(NaN)":`new Date(${Fn($w(i))})`}case"[object Map]":return`new Map(${ht(Array.from(e),r,n)})`;case"[object Null]":return"null";case"[object Number]":return typeof e=="number"?mf(e):`new Number(${mf(Number(e))})`;case"[object Object]":{try{const o=e.toString;if(typeof o=="function"&&o!==Object.prototype.toString)return e.toString()}catch{return"[object Object]"}const i=o=>`${o==="__proto__"?'["__proto__"]':typeof o=="symbol"?`[${ht(o,r,n)}]`:Fn(o)}:${ht(e[o],r,n)}`;return"{"+Se([...df(e)===null?["__proto__:null"]:[],...Q(T2(e),i),...Q(Iw(v2(e),o=>{const s=A2(e,o);return s&&s.enumerable}),i)],",")+"}"}case"[object Set]":return`new Set(${ht(Array.from(e),r,n)})`;case"[object String]":return typeof e=="string"?Fn(e):`new String(${Fn(e)})`;case"[object Symbol]":{const i=e;if(Ai.keyFor(i)!==void 0)return`Symbol.for(${Fn(Ai.keyFor(i))})`;const o=C2(i);return o===null?"Symbol()":i===(o.startsWith("Symbol.")&&Ai[o.substring(7)])?o:`Symbol(${Fn(o)})`}case"[object Promise]":{const i=n(e);switch(i.state){case"fulfilled":return`Promise.resolve(${ht(i.value,r,n)})`;case"rejected":return`Promise.reject(${ht(i.value,r,n)})`;case"pending":return"new Promise(() => {/*pending*/})";default:return"new Promise(() => {/*unknown*/})"}}case"[object Error]":if(e instanceof Error)return`new Error(${ht(e.message,r,n)})`;break;case"[object Undefined]":return"undefined";case"[object Int8Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Int16Array]":case"[object Uint16Array]":case"[object Int32Array]":case"[object Uint32Array]":case"[object Float32Array]":case"[object Float64Array]":case"[object BigInt64Array]":case"[object BigUint64Array]":{if(typeof ff=="function"&&ff(e))return`Buffer.from(${e.buffer.detached?"/*detached ArrayBuffer*/":ht(lf(e.values()),r,n)})`;const i=df(e),o=i&&i.constructor&&i.constructor.name;if(typeof o=="string"){const s=e;if(s.buffer.detached)return`${o}.from(/*detached ArrayBuffer*/)`;const c=s.values();return`${o}.from(${ht(lf(c),r,n)})`}break}}try{return e.toString()}catch{return fa(e)}}function ve(e){return ht(e,[],()=>({state:"unknown",value:void 0}))}function sm(e){const t=Ai(),n=[],r=new Zt;function i(){let a=null;const u=()=>{a!==null&&clearTimeout(a)};return{delay:new Promise(l=>{a=setTimeout(()=>{a=null,l(t)},0)}),cancel:u}}const o={state:"unknown",value:void 0},s=function(u){const l=u;if(r.has(l))return r.get(l);const f=i(),h=Ut in u?Promise.resolve().then(()=>u[Ut]()):u;return h.catch(()=>{}),n.push(Promise.race([h,f.delay]).then(d=>{d===t?r.set(l,{state:"pending",value:void 0}):r.set(l,{state:"fulfilled",value:d}),f.cancel()},d=>{r.set(l,{state:"rejected",value:d}),f.cancel()})),r.set(l,o),o};function c(){const a=ht(e,[],s);return n.length===0?a:Promise.all(n.splice(0)).then(c)}return c()}async function po(e){return Promise.resolve(sm(e))}function gf(e){return e===null?new gt:e}function $2(...e){return e[1]?e[0].then(gf):gf(e[0])}function M2(e,t){return $2(e,t)}var yf=class{constructor(e,t){this.property=e,this.skipRuns=t,this.coveredCases=new Map}isAsync(){return this.property.isAsync()}generate(e,t){return this.property.generate(e,t)}shrink(e){return this.property.shrink(e)}run(e){const t=ve(e);if(this.coveredCases.has(t)){const r=this.coveredCases.get(t);return this.skipRuns?M2(r,this.property.isAsync()):r}const n=this.property.run(e);return this.coveredCases.set(t,n),n}runBeforeEach(){return this.property.runBeforeEach()}runAfterEach(){return this.property.runAfterEach()}};const bf=Date.now,is=setTimeout,os=clearTimeout;function O2(e,t){let n=e;return e.isAsync()&&t.timeout!==void 0&&(n=new E2(n,t.timeout,is,os)),t.unbiased&&(n=new om(n)),t.skipAllAfterTimeLimit!==void 0&&(n=new uf(n,bf,t.skipAllAfterTimeLimit,!1,is,os)),t.interruptAfterTimeLimit!==void 0&&(n=new uf(n,bf,t.interruptAfterTimeLimit,!0,is,os)),t.skipEqualValues&&(n=new yf(n,!0)),t.ignoreEqualValues&&(n=new yf(n,!1)),n}let am=(function(e){return e[e.Success=0]="Success",e[e.Skipped=-1]="Skipped",e[e.Failure=1]="Failure",e})({});var P2=class cm{constructor(t,n){this.verbosity=t,this.interruptedAsFailure=n,this.rootExecutionTrees=[],this.currentLevelExecutionTrees=this.rootExecutionTrees,this.failure=null,this.numSkips=0,this.numSuccesses=0,this.interrupted=!1}appendExecutionTree(t,n){const r={status:t,value:n,children:[]};return this.currentLevelExecutionTrees.push(r),r}fail(t,n,r){if(this.verbosity>=1){const i=this.appendExecutionTree(1,t);this.currentLevelExecutionTrees=i.children}this.pathToFailure===void 0?this.pathToFailure=`${n}`:this.pathToFailure+=`:${n}`,this.value=t,this.failure=r}skip(t){this.verbosity>=2&&this.appendExecutionTree(-1,t),this.pathToFailure===void 0&&++this.numSkips}success(t){this.verbosity>=2&&this.appendExecutionTree(0,t),this.pathToFailure===void 0&&++this.numSuccesses}interrupt(){this.interrupted=!0}isSuccess(){return this.pathToFailure===void 0}firstFailure(){return this.pathToFailure!==void 0?+rt(this.pathToFailure,":")[0]:-1}numShrinks(){return this.pathToFailure!==void 0?rt(this.pathToFailure,":").length-1:0}extractFailures(){if(this.isSuccess())return[];const t=[];let n=this.rootExecutionTrees;for(;n.length>0&&n[n.length-1].status===1;){const r=n[n.length-1];t.push(r.value),n=r.children}return t}static mergePaths(t,n){if(t.length===0)return n;const r=t.split(":"),i=n.split(":"),o=+r[r.length-1]+ +i[0];return[...r.slice(0,r.length-1),`${o}`,...i.slice(1)].join(":")}toRunDetails(t,n,r,i){if(!this.isSuccess())return{failed:!0,interrupted:this.interrupted,numRuns:this.firstFailure()+1-this.numSkips,numSkips:this.numSkips,numShrinks:this.numShrinks(),seed:t,counterexample:this.value,counterexamplePath:cm.mergePaths(n,this.pathToFailure),errorInstance:this.failure.error,failures:this.extractFailures(),executionSummary:this.rootExecutionTrees,verbose:this.verbosity,runConfiguration:i.toParameters()};const o=this.interruptedAsFailure||this.numSuccesses===0;return{failed:this.numSkips>r||this.interrupted&&o,interrupted:this.interrupted,numRuns:this.numSuccesses,numSkips:this.numSkips,numShrinks:0,seed:t,counterexample:null,counterexamplePath:null,error:null,errorInstance:null,failures:[],executionSummary:this.rootExecutionTrees,verbose:this.verbosity,runConfiguration:i.toParameters()}}},um=class{constructor(e,t,n,r){this.sourceValues=e,this.shrink=t,this.runExecution=new P2(n,r),this.currentIdx=-1,this.nextValues=e}[Symbol.iterator](){return this}next(){const e=this.nextValues.next();return e.done||this.runExecution.interrupted?{done:!0,value:void 0}:(this.currentValue=e.value,++this.currentIdx,{done:!1,value:e.value.value_})}handleResult(e){e!==null&&typeof e=="object"&&!gt.isFailure(e)?(this.runExecution.fail(this.currentValue.value_,this.currentIdx,e),this.currentIdx=-1,this.nextValues=this.shrink(this.currentValue)):e!==null?e.interruptExecution?this.runExecution.interrupt():(this.runExecution.skip(this.currentValue.value_),this.sourceValues.skippedOne()):this.runExecution.success(this.currentValue.value_)}},N2=class{constructor(e,t,n){this.initialValues=e,this.maxInitialIterations=t,this.remainingSkips=n}[Symbol.iterator](){return this}next(){if(--this.maxInitialIterations!==-1&&this.remainingSkips>=0){const e=this.initialValues.next();if(!e.done)return{value:e.value,done:!1}}return{value:void 0,done:!0}}skippedOne(){--this.remainingSkips,++this.maxInitialIterations}};const j2=-2147483648,F2=2147483647,R2=Math.pow(2,27),L2=Math.pow(2,-53);var mo=class lm{constructor(t){this.internalRng=lo(t.clone())}clone(){return new lm(this.internalRng)}next(t){return es(this.internalRng,0,(1<<t)-1)}nextBoolean(){return es(this.internalRng,0,1)===1}nextInt(t,n){return es(this.internalRng,t===void 0?j2:t,n===void 0?F2:n)}nextBigInt(t,n){return j0(this.internalRng,t,n)}nextDouble(){const t=this.next(26),n=this.next(27);return(t*R2+n)*L2}getState(){if("getState"in this.internalRng&&typeof this.internalRng.getState=="function")return this.internalRng.getState()}};function D2(e,t,n){return t.jump(),e.generate(new mo(t),n)}function*fm(e,t,n,r){for(let i=0;i!==r.length;++i)yield new L(r[i],void 0);for(let i=0,o=n(t);;++i)yield D2(e,o,i)}function B2(e,t,n){return()=>e.generate(new mo(t),n)}function*hm(e,t,n,r){yield*Q(r,s=>()=>new L(s,void 0));let i=0;const o=lo(n(t));for(;;)o.jump(),yield B2(e,o,i++)}function wf(e){return e()}function dm(e,t,n){const r=t,i=e.split(":").map(s=>+s);if(i.length===0)return r.map(wf);if(!i.every(s=>!Number.isNaN(s)))throw new Error(`Unable to replay, got invalid path=${e}`);let o=r.drop(i[0]).map(wf);for(const s of i.slice(1)){const c=o.getNthOrLast(0);if(c===null)throw new Error(`Unable to replay, got wrong path=${e}`);o=n(c).drop(s)}return o}const U2=Object.assign;function V2(e){return e.length===1?`Hint: ${e[0]}`:e.map((t,n)=>`Hint (${n+1}): ${t}`).join(`
|
|
2
|
+
`)}function q2(e,t){return`Encountered failures were:
|
|
3
3
|
- ${e.map(t).join(`
|
|
4
|
-
- `)}`}function
|
|
4
|
+
- `)}`}function mc(e,t){const n=[],r=[];for(let i=e.length-1;i>=0;--i)r.push({depth:1,tree:e[i]});for(;r.length!==0;){const i=r.pop(),o=i.tree,s=i.depth,c=o.status===0?"\x1B[32m√\x1B[0m":o.status===1?"\x1B[31m×\x1B[0m":"\x1B[33m!\x1B[0m",a=s!==0?". ".repeat(s-1):"";n.push(`${a}${c} ${t(o.value)}`);for(let u=o.children.length-1;u>=0;--u)r.push({depth:s+1,tree:o.children[u]})}return`Execution summary:
|
|
5
5
|
${n.join(`
|
|
6
|
-
`)}`}function
|
|
6
|
+
`)}`}function W2(e,t){const n=`Failed to run property, too many pre-condition failures encountered
|
|
7
7
|
{ seed: ${e.seed} }
|
|
8
8
|
|
|
9
9
|
Ran ${e.numRuns} time(s)
|
|
10
|
-
Skipped ${e.numSkips} time(s)`;let r=null;const i=["Try to reduce the number of rejected values by combining map, chain and built-in arbitraries","Increase failure tolerance by setting maxSkipsPerRun to an higher value"];return e.verbose>=2?r=
|
|
11
|
-
Got ${
|
|
10
|
+
Skipped ${e.numSkips} time(s)`;let r=null;const i=["Try to reduce the number of rejected values by combining map, chain and built-in arbitraries","Increase failure tolerance by setting maxSkipsPerRun to an higher value"];return e.verbose>=2?r=mc(e.executionSummary,t):N(i,"Enable verbose mode at level VeryVerbose in order to check all generated values and their associated status"),{message:n,details:r,hints:i}}function z2(e){if(e instanceof D&&e.stack!==void 0)return e.stack;try{return nt(e)}catch{}if(e instanceof D)try{return s2(e)}catch{}if(e!==null&&typeof e=="object")try{return fa(e)}catch{}return"Failed to serialize errorInstance"}function G2(e,t){const n=e.runConfiguration.includeErrorInReport?`
|
|
11
|
+
Got ${t2(z2(e.errorInstance),/^Error: /,"error: ")}`:"",r=`Property failed after ${e.numRuns} tests
|
|
12
12
|
{ seed: ${e.seed}, path: "${e.counterexamplePath}", endOnFailure: true }
|
|
13
13
|
Counterexample: ${t(e.counterexample)}
|
|
14
|
-
Shrunk ${e.numShrinks} time(s)${n}`;let i=null;const o=[];return e.verbose>=2?i=
|
|
15
|
-
{ seed: ${e.seed} }`;let r=null;const i=[];return e.verbose>=2?r=
|
|
14
|
+
Shrunk ${e.numShrinks} time(s)${n}`;let i=null;const o=[];return e.verbose>=2?i=mc(e.executionSummary,t):e.verbose===1?i=q2(e.failures,t):N(o,"Enable verbose mode in order to have the list of all failing values encountered during the run"),{message:r,details:i,hints:o}}function K2(e,t){const n=`Property interrupted after ${e.numRuns} tests
|
|
15
|
+
{ seed: ${e.seed} }`;let r=null;const i=[];return e.verbose>=2?r=mc(e.executionSummary,t):N(i,"Enable verbose mode at level VeryVerbose in order to check all generated values and their associated status"),{message:n,details:r,hints:i}}function da(e,t){if(!e.failed)return;const{message:n,details:r,hints:i}=e.counterexamplePath===null?e.interrupted?K2(e,t):W2(e,t):G2(e,t);let o=n;return r!==null&&(o+=`
|
|
16
16
|
|
|
17
17
|
${r}`),i.length>0&&(o+=`
|
|
18
18
|
|
|
19
|
-
${x2(i)}`),o}function uc(e){return aa(e,ke)}async function lc(e){const t=[];function n(s){const c=Xp(s);return typeof c=="string"?c:(t.push(Promise.all([s,c])),"…")}const r=aa(e,n);if(t.length===0)return r;const i=new Yt(await Promise.all(t));function o(s){const c=dt(i,s);return c!==void 0?c:ke(s)}return aa(e,o)}function om(e,t){if(t.runConfiguration.includeErrorInReport)throw new U(e);const n=new U(e,{cause:t.errorInstance});return"cause"in n||w2(n,{cause:t.errorInstance}),n}function I2(e){if(e.failed)throw om(uc(e),e)}async function k2(e){if(e.failed)throw om(await lc(e),e)}function C2(e){return e.runConfiguration.asyncReporter?e.runConfiguration.asyncReporter(e):e.runConfiguration.reporter?e.runConfiguration.reporter(e):I2(e)}async function _2(e){return e.runConfiguration.asyncReporter?e.runConfiguration.asyncReporter(e):e.runConfiguration.reporter?e.runConfiguration.reporter(e):k2(e)}function $2(e,t,n,r,i){const o=new em(n,t,r,i);for(const s of o){e.runBeforeEach();const c=e.run(s);e.runAfterEach(),o.handleResult(c)}return o.runExecution}async function M2(e,t,n,r,i){const o=new em(n,t,r,i);for(const s of o){await e.runBeforeEach();const c=await e.run(s);await e.runAfterEach(),o.handleResult(c)}return o.runExecution}function lo(e,t){if(e==null||e.generate===null||e.generate===void 0)throw new Error("Invalid property encountered, please use a valid property");if(e.run===null||e.run===void 0)throw new Error("Invalid property encountered, please use a valid property not an arbitrary");const n=ac({...yt(),...t});if(n.reporter!==void 0&&n.asyncReporter!==void 0)throw new Error("Invalid parameters encountered, reporter and asyncReporter cannot be specified together");if(n.asyncReporter!==void 0&&!e.isAsync())throw new Error("Invalid parameters encountered, only asyncProperty can be used when asyncReporter specified");const r=l2(e,n),i=n.path.length===0||n.path.indexOf(":")===-1?n.numRuns:-1,o=n.numRuns*n.maxSkipsPerRun,s=(...u)=>r.shrink(...u),c=new h2(n.path.length===0?nm(r,n.seed,n.randomType,n.examples):im(n.path,Jt(rm(r,n.seed,n.randomType,n.examples)),s),i,o),a=n.endOnFailure?J.nil:s;return r.isAsync()?M2(r,a,c,n.verbose,n.markInterruptAsFailure).then(u=>u.toRunDetails(n.seed,n.path,o,n)):$2(r,a,c,n.verbose,n.markInterruptAsFailure).toRunDetails(n.seed,n.path,o,n)}function Dr(e,t){const n=lo(e,t);if(e.isAsync())return n.then(_2);C2(n)}function O2(e,t){const n=Object.prototype.hasOwnProperty.call(e,"isAsync")?e:new Kp(e,()=>!0);return t.unbiased===!0?new Jp(n):n}function sm(e,t){const n=ac(typeof t=="number"?{...yt(),numRuns:t}:{...yt(),...t}),r=O2(e,n),i=r.shrink.bind(r);return(n.path.length===0?Jt(nm(r,n.seed,n.randomType,n.examples)):im(n.path,Jt(rm(r,n.seed,n.randomType,n.examples)),i)).take(n.numRuns).map(o=>o.value_)}function am(e,t){return[...sm(e,t)]}function P2(e){return(Math.round(e*100)/100).toFixed(2)}function cm(e,t,n){const r=ac(typeof n=="number"?{...yt(),numRuns:n}:{...yt(),...n}),i={};for(const a of sm(e,n)){const u=t(a),l=Array.isArray(u)?u:[u];for(const f of l)i[f]=(i[f]||0)+1}const o=Object.entries(i).sort((a,u)=>u[1]-a[1]).map(a=>[a[0],`${P2(a[1]*100/r.numRuns)}%`]),s=o.map(a=>a[0].length).reduce((a,u)=>Math.max(a,u),0),c=o.map(a=>a[1].length).reduce((a,u)=>Math.max(a,u),0);for(const a of o)r.logger(`${a[0].padEnd(s,".")}..${a[1].padStart(c,".")}`)}const N2=Object.assign;function ca(e,t,n,r){const i=n();let o=e.clone();const s={mrng:e.clone(),biasFactor:t,history:[]},c=u=>{const l=i[s.history.length];if(l!==void 0&&l.arb===u){const h=l.value;return N(s.history,{arb:u,value:h,context:l.context,mrng:l.mrng}),o=l.mrng.clone(),h}const f=u.generate(o,t);return N(s.history,{arb:u,value:f.value_,context:f.context,mrng:o.clone()}),f.value},a=(u,...l)=>c(r(u,l));return new L(N2(a,{values(){return Q(s.history,u=>u.value)},[Fe](){return ca(e,t,n,r).value},[bt](){return ke(Q(s.history,u=>u.value))}}),s)}const ts=Array.isArray,df=Object.keys,j2=Object.is;function F2(e){const t=new Yt;return function(r,i){const o=dt(t,r);if(o===void 0){const a=r(...i);return Et(t,r,[{args:i,value:a}]),a}const s=o;for(const a of s)if(e(i,a.args))return a.value;const c=r(...i);return N(s,{args:i,value:c}),c}}function um(e,t){if(e!==null&&typeof e=="object"&&t!==null&&typeof t=="object"){if(ts(e)){if(!ts(t)||e.length!==t.length)return!1}else if(ts(t))return!1;if(df(e).length!==df(t).length)return!1;for(const n in e)if(!(n in t)||!um(e[n],t[n]))return!1;return!0}else return j2(e,t)}var R2=class extends xe{constructor(...e){super(...e),this.arbitraryCache=F2(um)}generate(e,t){return ca(e,t,()=>[],this.arbitraryCache)}canShrinkWithoutContext(e){return!1}shrink(e,t){if(t===void 0)return J.nil();const n=t,r=n.mrng,i=n.biasFactor,o=n.history;return Vp(o.map(s=>s.arb),o.map(s=>s.value),o.map(s=>s.context)).map(s=>{function c(){const a=s.value,u=s.context;return Q(o,(l,f)=>({arb:l.arb,value:a[f],context:u[f],mrng:l.mrng}))}return ca(r,i,c,this.arbitraryCache)})}};function lm(){return new R2}const L2=Math.floor,pf=Math.log;function D2(e){return L2(pf(e)/pf(2))}function B2(e){return e===F(0)?F(0):F(et(e).length)}function fm(e,t,n){if(e===t)return[{min:e,max:t}];if(e<0&&t>0){const s=n(-e),c=n(t);return[{min:-s,max:c},{min:t-c,max:t},{min:e,max:e+s}]}const r=n(t-e),i={min:e,max:e+r},o={min:t-r,max:t};return e<0?[o,i]:[i,o]}const U2=Math.ceil,V2=Math.floor;function mf(e){return V2(e/2)}function gf(e){return U2(e/2)}function yf(e,t,n){const r=e-t;function*i(){let s=n?void 0:t;const c=n?r:mf(r);for(let a=c;a>0;a=mf(a)){const u=a===r?t:e-a;yield new L(u,s),s=u}}function*o(){let s=n?void 0:t;const c=n?r:gf(r);for(let a=c;a<0;a=gf(a)){const u=a===r?t:e-a;yield new L(u,s),s=u}}return r>0?Jt(i()):Jt(o())}const bf=Math.sign,q2=Number.isInteger,W2=Object.is;var Hn=class hm extends xe{constructor(t,n){super(),this.min=t,this.max=n,this.ranges=fm(t,n,D2)}generate(t,n){if(n===void 0||t.nextInt(1,n)!==1)return new L(t.nextInt(this.min,this.max),void 0);const r=this.ranges;if(r.length===1){const s=r[0];return new L(t.nextInt(s.min,s.max),void 0)}const i=t.nextInt(-2*(r.length-1),r.length-2),o=i<0?r[0]:r[i+1];return new L(t.nextInt(o.min,o.max),void 0)}canShrinkWithoutContext(t){return typeof t=="number"&&q2(t)&&!W2(t,-0)&&this.min<=t&&t<=this.max}shrink(t,n){return hm.isValidContext(t,n)?this.isLastChanceTry(t,n)?J.of(new L(n,void 0)):yf(t,n,!1):yf(t,this.min<=0&&this.max>=0?0:this.min<0?this.max:this.min,!0)}isLastChanceTry(t,n){return t>0?t===n+1&&t>this.min:t<0?t===n-1&&t<this.max:!1}static isValidContext(t,n){if(n===void 0)return!1;if(typeof n!="number")throw new Error("Invalid context type passed to IntegerArbitrary (#1)");if(n!==0&&bf(t)!==bf(n))throw new Error("Invalid context value passed to IntegerArbitrary (#2)");return!0}};const wf=Number.isInteger;function z2(e){return{min:e.min!==void 0?e.min:-2147483648,max:e.max!==void 0?e.max:2147483647}}function W(e={}){const t=z2(e);if(t.min>t.max)throw new Error("fc.integer maximum value should be equal or greater than the minimum one");if(!wf(t.min))throw new Error("fc.integer minimum value should be an integer");if(!wf(t.max))throw new Error("fc.integer maximum value should be an integer");return new Hn(t.min,t.max)}const xf=new Map;function fo(e){if(e===void 0)return{depth:0};if(typeof e!="string")return e;const t=dt(xf,e);if(t!==void 0)return t;const n={depth:0};return Et(xf,e,n),n}function ho(){return{depth:0}}var G2=class{constructor(e,t,n){this.arb=e,this.mrng=t,this.biasFactor=n}attemptExact(){}next(){return this.arb.generate(this.mrng,this.biasFactor)}};const K2=Math.min,H2=Math.max;var Y2=class{constructor(e,t,n,r){this.arb=e,this.mrng=t,this.slices=n,this.biasFactor=r,this.activeSliceIndex=0,this.nextIndexInSlice=0,this.lastIndexInSlice=-1}attemptExact(e){if(e!==0&&this.mrng.nextInt(1,this.biasFactor)===1){const t=[];for(let n=0;n!==this.slices.length;++n)this.slices[n].length===e&&N(t,n);if(t.length===0)return;this.activeSliceIndex=t[this.mrng.nextInt(0,t.length-1)],this.nextIndexInSlice=0,this.lastIndexInSlice=e-1}}next(){if(this.nextIndexInSlice<=this.lastIndexInSlice)return new L(this.slices[this.activeSliceIndex][this.nextIndexInSlice++],void 0);if(this.mrng.nextInt(1,this.biasFactor)!==1)return this.arb.generate(this.mrng,this.biasFactor);this.activeSliceIndex=this.mrng.nextInt(0,this.slices.length-1);const e=this.slices[this.activeSliceIndex];if(this.mrng.nextInt(1,this.biasFactor)!==1)return this.nextIndexInSlice=1,this.lastIndexInSlice=e.length-1,new L(e[0],void 0);const t=this.mrng.nextInt(0,e.length-1),n=this.mrng.nextInt(0,e.length-1);return this.nextIndexInSlice=K2(t,n),this.lastIndexInSlice=H2(t,n),new L(e[this.nextIndexInSlice++],void 0)}};function Sf(e,t,n,r){return r===void 0||n.length===0||t.nextInt(1,r)!==1?new G2(e,t,r):new Y2(e,t,n,r)}const J2=Math.floor,Ef=Math.log,X2=Array.isArray;function Z2(e,t){return e===t?e:e+J2(Ef(t-e)/Ef(2))}var dm=class pm extends xe{constructor(t,n,r,i,o,s,c){super(),this.arb=t,this.minLength=n,this.maxGeneratedLength=r,this.maxLength=i,this.setBuilder=s,this.customSlices=c,this.lengthArb=W({min:n,max:r}),this.depthContext=fo(o),this.cachedBiasedMaxLength=Z2(n,r)}preFilter(t){if(this.setBuilder===void 0)return t;const n=this.setBuilder();for(let r=0;r!==t.length;++r)n.tryAdd(t[r]);return n.getData()}static makeItCloneable(t,n){return t[Fe]=()=>{const r=[];for(let i=0;i!==n.length;++i)N(r,n[i].value);return this.makeItCloneable(r,n),r},t}generateNItemsNoDuplicates(t,n,r,i){let o=0;const s=t(),c=Sf(this.arb,r,this.customSlices,i);for(;s.size()<n&&o<this.maxGeneratedLength;){const a=c.next();s.tryAdd(a)?o=0:o+=1}return s.getData()}safeGenerateNItemsNoDuplicates(t,n,r,i){const o=n-this.cachedBiasedMaxLength;if(o<=0)return this.generateNItemsNoDuplicates(t,n,r,i);this.depthContext.depth+=o;try{return this.generateNItemsNoDuplicates(t,n,r,i)}finally{this.depthContext.depth-=o}}generateNItems(t,n,r){const i=[],o=Sf(this.arb,n,this.customSlices,r);o.attemptExact(t);for(let s=0;s!==t;++s)N(i,o.next());return i}safeGenerateNItems(t,n,r){const i=t-this.cachedBiasedMaxLength;if(i<=0)return this.generateNItems(t,n,r);this.depthContext.depth+=i;try{return this.generateNItems(t,n,r)}finally{this.depthContext.depth-=i}}wrapper(t,n,r,i){const o=n?this.preFilter(t):t;let s=!1;const c=[],a=[];for(let u=0;u!==o.length;++u){const l=o[u];s=s||l.hasToBeCloned,N(c,l.value),N(a,l.context)}return s&&pm.makeItCloneable(c,o),new L(c,{shrunkOnce:n,lengthContext:t.length===o.length&&r!==void 0?r:void 0,itemsContexts:a,startIndex:i})}generate(t,n){let r,i;if(n===void 0)r=this.lengthArb.generate(t,void 0).value;else if(this.minLength===this.maxGeneratedLength)r=this.lengthArb.generate(t,void 0).value,i=n;else if(t.nextInt(1,n)!==1)r=this.lengthArb.generate(t,void 0).value;else if(t.nextInt(1,n)!==1)r=this.lengthArb.generate(t,void 0).value,i=n;else{const s=this.cachedBiasedMaxLength;r=W({min:this.minLength,max:s}).generate(t,void 0).value,i=n}const o=this.setBuilder!==void 0?this.safeGenerateNItemsNoDuplicates(this.setBuilder,r,t,i):this.safeGenerateNItems(r,t,i);return this.wrapper(o,!1,void 0,0)}canShrinkWithoutContext(t){if(!X2(t)||this.minLength>t.length||t.length>this.maxLength)return!1;for(let n=0;n!==t.length;++n)if(!(n in t)||!this.arb.canShrinkWithoutContext(t[n]))return!1;return this.preFilter(Q(t,n=>new L(n,void 0))).length===t.length}shrinkItemByItem(t,n,r){const i=[];for(let o=n.startIndex;o<r;++o)N(i,fn(()=>this.arb.shrink(t[o],n.itemsContexts[o]).map(s=>{const c=Q(De(t,0,o),(u,l)=>new L(Sn(u),n.itemsContexts[l])),a=Q(De(t,o+1),(u,l)=>new L(Sn(u),n.itemsContexts[l+o+1]));return[[...c,s,...a],void 0,o]})));return J.nil().join(...i)}shrinkImpl(t,n){if(t.length===0)return J.nil();const r=n!==void 0?n:{shrunkOnce:!1,lengthContext:void 0,itemsContexts:[],startIndex:0};return this.lengthArb.shrink(t.length,r.lengthContext).drop(r.shrunkOnce&&r.lengthContext===void 0&&t.length>this.minLength+1?1:0).map(i=>{const o=t.length-i.value;return[Q(De(t,o),(s,c)=>new L(Sn(s),r.itemsContexts[c+o])),i.context,0]}).join(fn(()=>t.length>this.minLength?this.shrinkItemByItem(t,r,1):this.shrinkItemByItem(t,r,t.length))).join(t.length>this.minLength?fn(()=>{const i={shrunkOnce:!1,lengthContext:void 0,itemsContexts:De(r.itemsContexts,1),startIndex:0};return this.shrinkImpl(De(t,1),i).filter(o=>this.minLength<=o[0].length+1).map(o=>[[new L(Sn(t[0]),r.itemsContexts[0]),...o[0]],void 0,0])}):J.nil())}shrink(t,n){return this.shrinkImpl(t,n).map(r=>this.wrapper(r[0],!0,r[1],r[2]))}};const Q2=Math.floor,ex=Math.min,_n=2147483647,jn=["xsmall","small","medium","large","xlarge"],tx=["-4","-3","-2","-1","=","+1","+2","+3","+4"],fc="small";function nx(e,t){switch(t){case"xsmall":return Q2(1.1*e)+1;case"small":return 2*e+10;case"medium":return 11*e+100;case"large":return 101*e+1e3;case"xlarge":return 1001*e+1e4;default:throw new Error(`Unable to compute lengths based on received size: ${t}`)}}function Br(e,t){const n=vr(tx,e);if(n===-1)return e;const r=vr(jn,t);if(r===-1)throw new Error(`Unable to offset size based on the unknown defaulted one: ${t}`);const i=r+n-4;return i<0?jn[0]:i>=jn.length?jn[jn.length-1]:jn[i]}function Cr(e,t,n,r){const{baseSize:i=fc,defaultSizeToMaxWhenMaxSpecified:o}=yt()||{},s=e!==void 0?e:r&&o?"max":i;if(s==="max")return n;const c=Br(s,i);return ex(nx(t,c),n)}function rx(e,t){if(typeof e=="number")return 1/e;const{baseSize:n=fc,defaultSizeToMaxWhenMaxSpecified:r}=yt()||{},i=e!==void 0?e:t&&r?"max":n;if(i==="max")return 0;switch(Br(i,n)){case"xsmall":return 1;case"small":return .5;case"medium":return .25;case"large":return .125;case"xlarge":return .0625}}function hc(e){const{baseSize:t=fc}=yt()||{};return e===void 0?t:Br(e,t)}function ae(e,t={}){const n=t.size,r=t.minLength||0,i=t.maxLength,o=t.depthIdentifier,s=i!==void 0?i:_n;return new dm(e,r,Cr(n,r,s,i!==void 0),s,o,void 0,t.experimentalCustomSlices||[])}function ti(e){return e/F(2)}function Tf(e,t,n){const r=e-t;function*i(){let s=n?void 0:t;const c=n?r:ti(r);for(let a=c;a>0;a=ti(a)){const u=e-a;yield new L(u,s),s=u}}function*o(){let s=n?void 0:t;const c=n?r:ti(r);for(let a=c;a<0;a=ti(a)){const u=e-a;yield new L(u,s),s=u}}return r>0?Jt(i()):Jt(o())}var ix=class mm extends xe{constructor(t,n){super(),this.min=t,this.max=n}generate(t,n){const r=this.computeGenerateRange(t,n);return new L(t.nextBigInt(r.min,r.max),void 0)}computeGenerateRange(t,n){if(n===void 0||t.nextInt(1,n)!==1)return{min:this.min,max:this.max};const r=fm(this.min,this.max,B2);if(r.length===1)return r[0];const i=t.nextInt(-2*(r.length-1),r.length-2);return i<0?r[0]:r[i+1]}canShrinkWithoutContext(t){return typeof t=="bigint"&&this.min<=t&&t<=this.max}shrink(t,n){return mm.isValidContext(t,n)?this.isLastChanceTry(t,n)?J.of(new L(n,void 0)):Tf(t,n,!1):Tf(t,this.defaultTarget(),!0)}defaultTarget(){return this.min<=0&&this.max>=0?F(0):this.min<0?this.max:this.min}isLastChanceTry(t,n){return t>0?t===n+F(1)&&t>this.min:t<0?t===n-F(1)&&t<this.max:!1}static isValidContext(t,n){if(n===void 0)return!1;if(typeof n!="bigint")throw new Error("Invalid context type passed to BigIntArbitrary (#1)");const r=t>0&&n<0||t<0&&n>0;if(n!==F(0)&&r)throw new Error("Invalid context value passed to BigIntArbitrary (#2)");return!0}};function ox(e){const n=F(-1)<<F(255),r=(F(1)<<F(255))-F(1),i=e.min,o=e.max;return{min:i!==void 0?i:n-(o!==void 0&&o<F(0)?o*o:F(0)),max:o!==void 0?o:r+(i!==void 0&&i>F(0)?i*i:F(0))}}function sx(e){return e[0]===void 0?{}:e[1]===void 0?e[0]:{min:e[0],max:e[1]}}function Xt(...e){const t=ox(sx(e));if(t.min>t.max)throw new Error("fc.bigInt expects max to be greater than or equal to min");return new ix(t.min,t.max)}const ax=Object.getPrototypeOf;var ur=class extends xe{constructor(e){super(),this.arb=e}generate(e,t){return this.arb.generate(e,void 0)}canShrinkWithoutContext(e){return this.arb.canShrinkWithoutContext(e)}shrink(e,t){return this.arb.shrink(e,t)}};function _r(e){return ax(e)===ur.prototype&&e.generate===ur.prototype.generate&&e.canShrinkWithoutContext===ur.prototype.canShrinkWithoutContext&&e.shrink===ur.prototype.shrink?e:new ur(e)}function cx(e){return e===1}function ux(e){if(typeof e!="boolean")throw new Error("Unsupported input type");return e===!0?1:0}function Ft(){return _r(W({min:0,max:1}).map(cx,ux))}const br=Object.is;var lx=class{constructor(e){this.values=e,this.fastValues=new vt(this.values);let t=!1,n=!1;if(ln(this.fastValues,0))for(let r=0;r!==this.values.length;++r){const i=this.values[r];t=t||br(i,-0),n=n||br(i,0)}this.hasMinusZero=t,this.hasPlusZero=n}has(e){return e===0?br(e,0)?this.hasPlusZero:this.hasMinusZero:ln(this.fastValues,e)}},gm=class extends xe{constructor(e){super(),this.values=e}generate(e,t){const n=this.values.length===1?0:e.nextInt(0,this.values.length-1),r=this.values[n];return mn(r)?new L(r,n,()=>r[Fe]()):new L(r,n)}canShrinkWithoutContext(e){return this.values.length===1?br(this.values[0],e):(this.fastValues===void 0&&(this.fastValues=new lx(this.values)),this.fastValues.has(e))}shrink(e,t){return t===0||br(e,this.values[0])?J.nil():J.of(new L(this.values[0],0))}};function je(...e){if(e.length===0)throw new Error("fc.constantFrom expects at least one parameter");return new gm(e)}function ym(e){return!e||!e.withBigInt?je(!1,null,void 0,0,"",NaN):je(!1,null,void 0,0,"",NaN,F(0))}function we(e){return new gm([e])}var fx=class bm{constructor(){this.receivedLogs=[]}log(t){this.receivedLogs.push(t)}size(){return this.receivedLogs.length}toString(){return JSON.stringify({logs:this.receivedLogs})}[Fe](){return new bm}};function wm(){return we(new fx)}const hx=NaN,dx=Number.isNaN;function xm(e){return new Fi(e)}function Sm(e){if(!(e instanceof Fi)||e.constructor!==Fi)throw new U("Not a valid value for date unmapper");return Ri(e)}function px(e){return t=>t===e?new Fi(hx):xm(t)}function mx(e){return t=>{const n=Sm(t);return dx(n)?e:n}}const vf=Number.isNaN;function po(e={}){const t=e.min!==void 0?Ri(e.min):-864e13,n=e.max!==void 0?Ri(e.max):864e13,r=e.noInvalidDate;if(vf(t))throw new Error("fc.date min must be valid instance of Date");if(vf(n))throw new Error("fc.date max must be valid instance of Date");if(t>n)throw new Error("fc.date max must be greater or equal to min");if(r)return W({min:t,max:n}).map(xm,Sm);const i=n+1;return W({min:t,max:n+1}).map(px(i),mx(i))}var gx=class extends xe{constructor(e,t){super(),this.startArb=e,this.chainer=t}generate(e,t){const n=[],r=e.clone();let i=this.startArb.generate(e,t);for(n.push({arbitrary:this.startArb,value:i.value_,context:i.context,clonedMrng:r});;){const s=this.chainer(i.value_);if(s===void 0)break;const c=e.clone();i=s.generate(e,t),n.push({arbitrary:s,value:i.value_,context:i.context,clonedMrng:c})}const o={biasFactor:t,entries:n,currentShrinkLevel:0};return new L(i.value_,o)}canShrinkWithoutContext(e){return!1}shrink(e,t){return this.isSafeContext(t)?new J(this.shrinkIterator(t)):J.nil()}*shrinkIterator(e){const{entries:t,currentShrinkLevel:n,biasFactor:r}=e;for(let i=n;i<t.length;++i){const o=t[i],s=o.arbitrary.shrink(o.value,o.context);for(const c of s){const a=t.slice(0,i);a.push({arbitrary:o.arbitrary,value:c.value_,context:c.context,clonedMrng:o.clonedMrng});let u=c;const l=o.clonedMrng.clone();for(;;){const d=this.chainer(u.value_);if(d===void 0)break;const m=l.clone(),p=d.generate(l,r);a.push({arbitrary:d,value:p.value_,context:p.context,clonedMrng:m}),u=p}const f=a[a.length-1],h={biasFactor:r,entries:a,currentShrinkLevel:i};yield new L(f.value,h)}}}isSafeContext(e){return e!=null&&typeof e=="object"&&"biasFactor"in e&&"entries"in e&&"currentShrinkLevel"in e}};function dc(e,t){return new gx(e,t)}const yx=Symbol.iterator,bx=Array.isArray,wx=Object.is;var xx=class Em extends xe{constructor(t,n){super(),this.arb=t,this.numValues=n}generate(t,n){const r=[];if(this.numValues<=0)return this.wrapper(r);for(let i=0;i!==this.numValues-1;++i)N(r,this.arb.generate(t.clone(),n));return N(r,this.arb.generate(t,n)),this.wrapper(r)}canShrinkWithoutContext(t){if(!bx(t)||t.length!==this.numValues)return!1;if(t.length===0)return!0;for(let n=1;n<t.length;++n)if(!wx(t[0],t[n]))return!1;return this.arb.canShrinkWithoutContext(t[0])}shrink(t,n){return t.length===0?J.nil():new J(this.shrinkImpl(t,n!==void 0?n:[])).map(r=>this.wrapper(r))}*shrinkImpl(t,n){const r=Q(t,(o,s)=>this.arb.shrink(o,n[s])[yx]());let i=Q(r,o=>o.next());for(;!i[0].done;)yield Q(i,o=>o.value),i=Q(r,o=>o.next())}static makeItCloneable(t,n){return t[Fe]=()=>{const r=[];for(let i=0;i!==n.length;++i)N(r,n[i].value);return this.makeItCloneable(r,n),r},t}wrapper(t){let n=!1;const r=[],i=[];for(let o=0;o!==t.length;++o){const s=t[o];n=n||s.hasToBeCloned,N(r,s.value),N(i,s.context)}return n&&Em.makeItCloneable(r,t),new L(r,i)}};function Tm(e,t){return new xx(e,t)}var Af=class{constructor(e){this.isEqual=e,this.data=[]}tryAdd(e){for(let t=0;t!==this.data.length;++t)if(this.isEqual(this.data[t],e))return!1;return N(this.data,e),!0}size(){return this.data.length}getData(){return this.data}};const Sx=Number.isNaN;var Ex=class{constructor(e){this.selector=e,this.selectedItemsExceptNaN=new vt,this.data=[]}tryAdd(e){const t=this.selector(e);if(Sx(t))return N(this.data,e),!0;const n=this.selectedItemsExceptNaN.size;return Ar(this.selectedItemsExceptNaN,t),n!==this.selectedItemsExceptNaN.size?(N(this.data,e),!0):!1}size(){return this.data.length}getData(){return this.data}};const Tx=Object.is;var vx=class{constructor(e){this.selector=e,this.selectedItemsExceptMinusZero=new vt,this.data=[],this.hasMinusZero=!1}tryAdd(e){const t=this.selector(e);if(Tx(t,-0))return this.hasMinusZero?!1:(N(this.data,e),this.hasMinusZero=!0,!0);const n=this.selectedItemsExceptMinusZero.size;return Ar(this.selectedItemsExceptMinusZero,t),n!==this.selectedItemsExceptMinusZero.size?(N(this.data,e),!0):!1}size(){return this.data.length}getData(){return this.data}},Ax=class{constructor(e){this.selector=e,this.selectedItems=new vt,this.data=[]}tryAdd(e){const t=this.selector(e),n=this.selectedItems.size;return Ar(this.selectedItems,t),n!==this.selectedItems.size?(N(this.data,e),!0):!1}size(){return this.data.length}getData(){return this.data}};function Ix(e){if(typeof e.comparator=="function"){if(e.selector===void 0){const c=e.comparator,a=(u,l)=>c(u.value_,l.value_);return()=>new Af(a)}const r=e.comparator,i=e.selector,o=c=>i(c.value_),s=(c,a)=>r(o(c),o(a));return()=>new Af(s)}const t=e.selector||(r=>r),n=r=>t(r.value_);switch(e.comparator){case"IsStrictlyEqual":return()=>new Ex(n);case"SameValueZero":return()=>new Ax(n);case"SameValue":case void 0:return()=>new vx(n)}}function Qt(e,t={}){const n=t.minLength!==void 0?t.minLength:0,r=t.maxLength!==void 0?t.maxLength:_n,i=Cr(t.size,n,r,t.maxLength!==void 0),o=t.depthIdentifier,s=new dm(e,n,i,r,o,Ix(t),[]);return n===0?s:s.filter(c=>c.length>=n)}const kx=Object.create,Cx=Object.defineProperty,_x=Object.getOwnPropertyDescriptor,If=Object.getPrototypeOf,$x=Object.prototype,Mx=Reflect.ownKeys;function Ox(e){const t=e[1]?kx(null):{},n=e[0];for(let r=0;r!==n.length;++r){const i=n[r][0];i==="__proto__"?Cx(t,i,{enumerable:!0,configurable:!0,writable:!0,value:n[r][1]}):t[i]=n[r][1]}return t}function Px(e){return e!==void 0&&!!e.configurable&&!!e.enumerable&&!!e.writable&&e.get===void 0&&e.set===void 0}function Nx(e){if(typeof e!="object"||e===null)throw new U("Incompatible instance received: should be a non-null object");const t=If(e)===null,n=If(e)===$x;if(!t&&!n)throw new U("Incompatible instance received: should be of exact type Object");const r=Q(Mx(e),i=>[i,_x(e,i)]);if(!Dp(r,([,i])=>Px(i)))throw new U("Incompatible instance received: should contain only c/e/w properties without get/set");return[Q(r,([i,o])=>[i,o.value]),t]}function jx(e){return e[0]}function mo(e,t,n={}){const r=!!n.noNullPrototype;return H(Qt(H(e,t),{minLength:n.minKeys,maxLength:n.maxKeys,size:n.size,selector:jx,depthIdentifier:n.depthIdentifier}),r?we(!1):Ft()).map(Ox,Nx)}const Fx=Number.POSITIVE_INFINITY,Rx=Number.MAX_SAFE_INTEGER,Lx=Number.isInteger,Dx=Math.floor,Bx=Math.pow,Ux=Math.min;var ua=class vm extends xe{static from(t,n,r){if(t.length===0)throw new Error(`${r} expects at least one weighted arbitrary`);let i=0;for(let s=0;s!==t.length;++s){if(t[s].arbitrary===void 0)throw new Error(`${r} expects arbitraries to be specified`);const c=t[s].weight;if(i+=c,!Lx(c))throw new Error(`${r} expects weights to be integer values`);if(c<0)throw new Error(`${r} expects weights to be superior or equal to 0`)}if(i<=0)throw new Error(`${r} expects the sum of weights to be strictly superior to 0`);const o={depthBias:rx(n.depthSize,n.maxDepth!==void 0),maxDepth:n.maxDepth!==void 0?n.maxDepth:Fx,withCrossShrink:!!n.withCrossShrink};return new vm(t,o,fo(n.depthIdentifier))}constructor(t,n,r){super(),this.warbs=t,this.constraints=n,this.context=r;let i=0;this.cumulatedWeights=[];for(let o=0;o!==t.length;++o)i+=t[o].weight,N(this.cumulatedWeights,i);this.totalWeight=i}generate(t,n){if(this.mustGenerateFirst())return this.safeGenerateForIndex(t,0,n);const r=t.nextInt(this.computeNegDepthBenefit(),this.totalWeight-1);for(let i=0;i!==this.cumulatedWeights.length;++i)if(r<this.cumulatedWeights[i])return this.safeGenerateForIndex(t,i,n);throw new Error("Unable to generate from fc.frequency")}canShrinkWithoutContext(t){return this.canShrinkWithoutContextIndex(t)!==-1}shrink(t,n){if(n!==void 0){const i=n,o=i.selectedIndex,s=i.originalBias,c=this.warbs[o].arbitrary.shrink(t,i.originalContext).map(a=>this.mapIntoValue(o,a,null,s));if(i.clonedMrngForFallbackFirst!==null){i.cachedGeneratedForFirst===void 0&&(i.cachedGeneratedForFirst=this.safeGenerateForIndex(i.clonedMrngForFallbackFirst,0,s));const a=i.cachedGeneratedForFirst;return J.of(a).join(c)}return c}const r=this.canShrinkWithoutContextIndex(t);return r===-1?J.nil():this.defaultShrinkForFirst(r).join(this.warbs[r].arbitrary.shrink(t,void 0).map(i=>this.mapIntoValue(r,i,null,void 0)))}defaultShrinkForFirst(t){++this.context.depth;try{if(!this.mustFallbackToFirstInShrink(t)||this.warbs[0].fallbackValue===void 0)return J.nil()}finally{--this.context.depth}const n=new L(this.warbs[0].fallbackValue.default,void 0);return J.of(this.mapIntoValue(0,n,null,void 0))}canShrinkWithoutContextIndex(t){if(this.mustGenerateFirst())return this.warbs[0].arbitrary.canShrinkWithoutContext(t)?0:-1;try{++this.context.depth;for(let n=0;n!==this.warbs.length;++n){const r=this.warbs[n];if(r.weight!==0&&r.arbitrary.canShrinkWithoutContext(t))return n}return-1}finally{--this.context.depth}}mapIntoValue(t,n,r,i){const o={selectedIndex:t,originalBias:i,originalContext:n.context,clonedMrngForFallbackFirst:r};return new L(n.value,o)}safeGenerateForIndex(t,n,r){++this.context.depth;try{const i=this.warbs[n].arbitrary.generate(t,r),o=this.mustFallbackToFirstInShrink(n)?t.clone():null;return this.mapIntoValue(n,i,o,r)}finally{--this.context.depth}}mustGenerateFirst(){return this.constraints.maxDepth<=this.context.depth}mustFallbackToFirstInShrink(t){return t!==0&&this.constraints.withCrossShrink&&this.warbs[0].weight!==0}computeNegDepthBenefit(){const t=this.constraints.depthBias;if(t<=0||this.warbs[0].weight===0)return 0;const n=Dx(Bx(1+t,this.context.depth))-1;return-Ux(this.totalWeight*n,Rx)||0}};function Vx(e){return e!=null&&typeof e=="object"&&!("generate"in e)&&!("arbitrary"in e)&&!("weight"in e)}function kf(e){return Cp(e)?{arbitrary:e,weight:1}:e}function Ce(...e){const t=e[0];if(Vx(t)){const r=Q(De(e,1),kf);return ua.from(r,t,"fc.oneof")}const n=Q(e,kf);return ua.from(n,{},"fc.oneof")}const qx=Number.isInteger;function Kt(e){const t=typeof e=="number"?e:e&&e.max!==void 0?e.max:2147483647;if(t<0)throw new Error("fc.nat value should be greater than or equal to 0");if(!qx(t))throw new Error("fc.nat maximum value should be an integer");return new Hn(0,t)}const Wx=Object.is;function zx(e){let t=0;const n=[];for(const r of e){const i=t;t=i+r.num;const o=t-1;n.push({from:i,to:o,entry:r})}return n}function Gx(e,t){let n=0,r=e.length;for(;r-n>1;){const i=~~((n+r)/2);t<e[i].from?r=i:n=i}return e[n]}function Kx(e){const t=zx(e);return function(r){const i=Gx(t,r);return i.entry.build(r-i.from)}}function Hx(e){const t={mapping:new Yt,negativeZeroIndex:void 0};let n=0;for(let r=0;r!==e.length;++r){const i=e[r];for(let o=0;o!==i.num;++o){const s=i.build(o);s===0&&1/s===Ht.NEGATIVE_INFINITY?t.negativeZeroIndex=n:Et(t.mapping,s,n),++n}}return t}function Yx(e){let t=null;return function(r){t===null&&(t=Hx(e));const i=Wx(r,-0)?t.negativeZeroIndex:dt(t.mapping,r);if(i===void 0)throw new U("Unknown value encountered cannot be built using this mapToConstant");return i}}function Jx(e){if(e.length===0)throw new U("fc.mapToConstant expects at least one option");let t=0;for(let n=0;n!==e.length;++n){if(e[n].num<0)throw new U("fc.mapToConstant expects all options to have a number of entries greater or equal to zero");t+=e[n].num}if(t===0)throw new U("fc.mapToConstant expects at least one choice among options");return t}function $n(...e){return Kt({max:Jx(e)-1}).map(Kx(e),Yx(e))}function Am(e,t,n,r){if(t.length===0)return n>0?void 0:[];if(r<=0)return;const i=[{endIndexChunks:0,nextStartIndex:1,chunks:[]}];for(;i.length>0;){const o=Fp(i);for(let s=o.nextStartIndex;s<=t.length;++s){const c=Te(t,o.endIndexChunks,s);if(e.canShrinkWithoutContext(c)){const a=[...o.chunks,c];if(s===t.length){if(a.length<n)break;return a}N(i,{endIndexChunks:o.endIndexChunks,nextStartIndex:s+1,chunks:o.chunks}),a.length<r&&N(i,{endIndexChunks:s,nextStartIndex:s+1,chunks:a});break}}}}function Xx(e){return Se(e,"")}function Im(e){return e.minLength!==void 0?e.minLength:0}function km(e){return e.maxLength!==void 0?e.maxLength:_n}function Zx(e,t){return Im(t)<=e.length&&e.length<=km(t)}function Qx(e,t){return function(r){if(typeof r!="string")throw new U("Unsupported value");const i=Am(e,r,Im(t),km(t));if(i===void 0)throw new U("Unable to unmap received string");return i}}const Cm=["__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__","__proto__","constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf","apply","arguments","bind","call","caller","length","name","prototype","key","ref"];function eS(e,t,n){let r;try{r=n(e)}catch{return}for(const i of r)if(!t.canShrinkWithoutContext(i))return;return r}function tS(e,t){const n=[];for(const r of Cm){const i=eS(r,e,t);i!==void 0&&N(n,i)}return n}const Cf=new WeakMap;function nS(e){const t=[];for(const n of Cm){const r=Am(e,n,0,_n);r!==void 0&&N(t,r)}return t}function rS(e,t){let n=pw(Cf,e);n===void 0&&(n=nS(e),dw(Cf,e,n));const r=[];for(const i of n)Zx(i,t)&&N(r,i);return r}const iS=[[0,127]],oS=[[0,55295],[57344,1114111]],sS=[[32,126],[160,172],[174,767],[880,887],[890,895],[900,906],[908],[910,929],[931,1154],[1162,1327],[1329,1366],[1369,1418],[1421,1423],[1470],[1472],[1475],[1478],[1488,1514],[1519,1524],[1542,1551],[1563],[1565,1610],[1632,1647],[1649,1749],[1758],[1765,1766],[1769],[1774,1805],[1808],[1810,1839],[1869,1957],[1969],[1984,2026],[2036,2042],[2046,2069],[2074],[2084],[2088],[2096,2110],[2112,2136],[2142],[2144,2154],[2160,2190],[2208,2249],[2308,2361],[2365],[2384],[2392,2401],[2404,2432],[2437,2444],[2447,2448],[2451,2472],[2474,2480],[2482],[2486,2489],[2493],[2510],[2524,2525],[2527,2529],[2534,2557],[2565,2570],[2575,2576],[2579,2600],[2602,2608],[2610,2611],[2613,2614],[2616,2617],[2649,2652],[2654],[2662,2671],[2674,2676],[2678],[2693,2701],[2703,2705],[2707,2728],[2730,2736],[2738,2739],[2741,2745],[2749],[2768],[2784,2785],[2790,2801],[2809],[2821,2828],[2831,2832],[2835,2856],[2858,2864],[2866,2867],[2869,2873],[2877],[2908,2909],[2911,2913],[2918,2935],[2947],[2949,2954],[2958,2960],[2962,2965],[2969,2970],[2972],[2974,2975],[2979,2980],[2984,2986],[2990,3001],[3024],[3046,3066],[3077,3084],[3086,3088],[3090,3112],[3114,3129],[3133],[3160,3162],[3165],[3168,3169],[3174,3183],[3191,3200],[3204,3212],[3214,3216],[3218,3240],[3242,3251],[3253,3257],[3261],[3293,3294],[3296,3297],[3302,3311],[3313,3314],[3332,3340],[3342,3344],[3346,3386],[3389],[3407],[3412,3414],[3416,3425],[3430,3455],[3461,3478],[3482,3505],[3507,3515],[3517],[3520,3526],[3558,3567],[3572],[3585,3632],[3634],[3647,3654],[3663,3675],[3713,3714],[3716],[3718,3722],[3724,3747],[3749],[3751,3760],[3762],[3773],[3776,3780],[3782],[3792,3801],[3804,3807],[3840,3863],[3866,3892],[3894],[3896],[3898,3901],[3904,3911],[3913,3948],[3973],[3976,3980],[4030,4037],[4039,4044],[4046,4058],[4096,4138],[4159,4181],[4186,4189],[4193],[4197,4198],[4206,4208],[4213,4225],[4238],[4240,4249],[4254,4293],[4295],[4301],[4304,4351],[4608,4680],[4682,4685],[4688,4694],[4696],[4698,4701],[4704,4744],[4746,4749],[4752,4784],[4786,4789],[4792,4798],[4800],[4802,4805],[4808,4822],[4824,4880],[4882,4885],[4888,4954],[4960,4988],[4992,5017],[5024,5109],[5112,5117],[5120,5788],[5792,5880],[5888,5905],[5919,5937],[5941,5942],[5952,5969],[5984,5996],[5998,6e3],[6016,6067],[6100,6108],[6112,6121],[6128,6137],[6144,6154],[6160,6169],[6176,6264],[6272,6276],[6279,6312],[6314],[6320,6389],[6400,6430],[6464],[6468,6509],[6512,6516],[6528,6571],[6576,6601],[6608,6618],[6622,6678],[6686,6740],[6784,6793],[6800,6809],[6816,6829],[6917,6963],[6981,6988],[6992,7018],[7028,7038],[7043,7072],[7086,7141],[7164,7203],[7227,7241],[7245,7304],[7312,7354],[7357,7367],[7379],[7401,7404],[7406,7411],[7413,7414],[7418],[7424,7615],[7680,7957],[7960,7965],[7968,8005],[8008,8013],[8016,8023],[8025],[8027],[8029],[8031,8061],[8064,8116],[8118,8132],[8134,8147],[8150,8155],[8157,8175],[8178,8180],[8182,8190],[8192,8202],[8208,8233],[8239,8287],[8304,8305],[8308,8334],[8336,8348],[8352,8384],[8448,8587],[8592,9254],[9280,9290],[9312,11123],[11126,11157],[11159,11502],[11506,11507],[11513,11557],[11559],[11565],[11568,11623],[11631,11632],[11648,11670],[11680,11686],[11688,11694],[11696,11702],[11704,11710],[11712,11718],[11720,11726],[11728,11734],[11736,11742],[11776,11869],[11904,11929],[11931,12019],[12032,12245],[12272,12329],[12336,12351],[12353,12438],[12443,12543],[12549,12591],[12593,12686],[12688,12771],[12783,12830],[12832,13312],[19903,19968],[40959,42124],[42128,42182],[42192,42539],[42560,42606],[42611],[42622,42653],[42656,42735],[42738,42743],[42752,42954],[42960,42961],[42963],[42965,42969],[42994,43009],[43011,43013],[43015,43018],[43020,43042],[43048,43051],[43056,43065],[43072,43127],[43138,43187],[43214,43225],[43250,43262],[43264,43301],[43310,43334],[43359],[43396,43442],[43457,43469],[43471,43481],[43486,43492],[43494,43518],[43520,43560],[43584,43586],[43588,43595],[43600,43609],[43612,43642],[43646,43695],[43697],[43701,43702],[43705,43709],[43712],[43714],[43739,43754],[43760,43764],[43777,43782],[43785,43790],[43793,43798],[43808,43814],[43816,43822],[43824,43883],[43888,44002],[44011],[44016,44025],[44032],[55203],[63744,64109],[64112,64217],[64256,64262],[64275,64279],[64285],[64287,64310],[64312,64316],[64318],[64320,64321],[64323,64324],[64326,64450],[64467,64911],[64914,64967],[64975],[65008,65023],[65040,65049],[65072,65106],[65108,65126],[65128,65131],[65136,65140],[65142,65276],[65281,65437],[65440,65470],[65474,65479],[65482,65487],[65490,65495],[65498,65500],[65504,65510],[65512,65518],[65532,65533],[65536,65547],[65549,65574],[65576,65594],[65596,65597],[65599,65613],[65616,65629],[65664,65786],[65792,65794],[65799,65843],[65847,65934],[65936,65948],[65952],[66e3,66044],[66176,66204],[66208,66256],[66273,66299],[66304,66339],[66349,66378],[66384,66421],[66432,66461],[66463,66499],[66504,66517],[66560,66717],[66720,66729],[66736,66771],[66776,66811],[66816,66855],[66864,66915],[66927,66938],[66940,66954],[66956,66962],[66964,66965],[66967,66977],[66979,66993],[66995,67001],[67003,67004],[67072,67382],[67392,67413],[67424,67431],[67456,67461],[67463,67504],[67506,67514],[67584,67589],[67592],[67594,67637],[67639,67640],[67644],[67647,67669],[67671,67742],[67751,67759],[67808,67826],[67828,67829],[67835,67867],[67871,67897],[67903],[67968,68023],[68028,68047],[68050,68096],[68112,68115],[68117,68119],[68121,68149],[68160,68168],[68176,68184],[68192,68255],[68288,68324],[68331,68342],[68352,68405],[68409,68437],[68440,68466],[68472,68497],[68505,68508],[68521,68527],[68608,68680],[68736,68786],[68800,68850],[68858,68899],[68912,68921],[69216,69246],[69248,69289],[69293],[69296,69297],[69376,69415],[69424,69445],[69457,69465],[69488,69505],[69510,69513],[69552,69579],[69600,69622],[69635,69687],[69703,69709],[69714,69743],[69745,69746],[69749],[69763,69807],[69819,69820],[69822,69825],[69840,69864],[69872,69881],[69891,69926],[69942,69956],[69959],[69968,70002],[70004,70006],[70019,70066],[70081],[70084,70088],[70093],[70096,70111],[70113,70132],[70144,70161],[70163,70187],[70200,70205],[70207,70208],[70272,70278],[70280],[70282,70285],[70287,70301],[70303,70313],[70320,70366],[70384,70393],[70405,70412],[70415,70416],[70419,70440],[70442,70448],[70450,70451],[70453,70457],[70461],[70480],[70493,70497],[70656,70708],[70727,70747],[70749],[70751,70753],[70784,70831],[70852,70855],[70864,70873],[71040,71086],[71105,71131],[71168,71215],[71233,71236],[71248,71257],[71264,71276],[71296,71338],[71352,71353],[71360,71369],[71424,71450],[71472,71494],[71680,71723],[71739],[71840,71922],[71935,71942],[71945],[71948,71955],[71957,71958],[71960,71983],[72004,72006],[72016,72025],[72096,72103],[72106,72144],[72161,72163],[72192],[72203,72242],[72255,72262],[72272],[72284,72323],[72346,72354],[72368,72440],[72448,72457],[72704,72712],[72714,72750],[72768,72773],[72784,72812],[72816,72847],[72960,72966],[72968,72969],[72971,73008],[73040,73049],[73056,73061],[73063,73064],[73066,73097],[73112],[73120,73129],[73440,73458],[73463,73464],[73476,73488],[73490,73523],[73539,73561],[73648],[73664,73713],[73727,74649],[74752,74862],[74864,74868],[74880,75075],[77712,77810],[77824,78895],[78913,78918],[82944,83526],[92160,92728],[92736,92766],[92768,92777],[92782,92862],[92864,92873],[92880,92909],[92917],[92928,92975],[92983,92997],[93008,93017],[93019,93025],[93027,93047],[93053,93071],[93760,93850],[93952,94026],[94032],[94099,94111],[94176,94179],[94208],[100343],[100352,101589],[101632],[101640],[110576,110579],[110581,110587],[110589,110590],[110592,110882],[110898],[110928,110930],[110933],[110948,110951],[110960,111355],[113664,113770],[113776,113788],[113792,113800],[113808,113817],[113820],[113823],[118608,118723],[118784,119029],[119040,119078],[119081,119140],[119146,119148],[119171,119172],[119180,119209],[119214,119274],[119296,119361],[119365],[119488,119507],[119520,119539],[119552,119638],[119648,119672],[119808,119892],[119894,119964],[119966,119967],[119970],[119973,119974],[119977,119980],[119982,119993],[119995],[119997,120003],[120005,120069],[120071,120074],[120077,120084],[120086,120092],[120094,120121],[120123,120126],[120128,120132],[120134],[120138,120144],[120146,120485],[120488,120779],[120782,121343],[121399,121402],[121453,121460],[121462,121475],[121477,121483],[122624,122654],[122661,122666],[122928,122989],[123136,123180],[123191,123197],[123200,123209],[123214,123215],[123536,123565],[123584,123627],[123632,123641],[123647],[124112,124139],[124144,124153],[124896,124902],[124904,124907],[124909,124910],[124912,124926],[124928,125124],[125127,125135],[125184,125251],[125259],[125264,125273],[125278,125279],[126065,126132],[126209,126269],[126464,126467],[126469,126495],[126497,126498],[126500],[126503],[126505,126514],[126516,126519],[126521],[126523],[126530],[126535],[126537],[126539],[126541,126543],[126545,126546],[126548],[126551],[126553],[126555],[126557],[126559],[126561,126562],[126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[126704,126705],[126976,127019],[127024,127123],[127136,127150],[127153,127167],[127169,127183],[127185,127221],[127232,127405],[127488,127490],[127504,127547],[127552,127560],[127568,127569],[127584,127589],[127744,127994],[128e3,128727],[128732,128748],[128752,128764],[128768,128886],[128891,128985],[128992,129003],[129008],[129024,129035],[129040,129095],[129104,129113],[129120,129159],[129168,129197],[129200,129201],[129280,129619],[129632,129645],[129648,129660],[129664,129672],[129680,129725],[129727,129733],[129742,129755],[129760,129768],[129776,129784],[129792,129938],[129940,129994],[130032,130041],[131072],[173791],[173824],[177977],[177984],[178205],[178208],[183969],[183984],[191456],[191472],[192093],[194560,195101],[196608],[201546],[201552],[205743]],aS=[[192,197],[199,207],[209,214],[217,221],[224,229],[231,239],[241,246],[249,253],[255,271],[274,293],[296,304],[308,311],[313,318],[323,328],[332,337],[340,357],[360,382],[416,417],[431,432],[461,476],[478,483],[486,496],[500,501],[504,539],[542,543],[550,563],[901,902],[904,906],[908],[910,912],[938,944],[970,974],[979,980],[1024,1025],[1027],[1031],[1036,1038],[1049],[1081],[1104,1105],[1107],[1111],[1116,1118],[1142,1143],[1217,1218],[1232,1235],[1238,1239],[1242,1247],[1250,1255],[1258,1269],[1272,1273],[1570,1574],[1728],[1730],[1747],[2345],[2353],[2356],[2392,2399],[2524,2525],[2527],[2611],[2614],[2649,2651],[2654],[2908,2909],[2964],[3907],[3917],[3922],[3927],[3932],[3945],[4134],[6918],[6920],[6922],[6924],[6926],[6930],[7680,7833],[7835],[7840,7929],[7936,7957],[7960,7965],[7968,8005],[8008,8013],[8016,8023],[8025],[8027],[8029],[8031,8048],[8050],[8052],[8054],[8056],[8058],[8060],[8064,8116],[8118,8122],[8124],[8129,8132],[8134,8136],[8138],[8140,8146],[8150,8154],[8157,8162],[8164,8170],[8172,8173],[8178,8180],[8182,8184],[8186],[8188],[8602,8603],[8622],[8653,8655],[8708],[8713],[8716],[8740],[8742],[8769],[8772],[8775],[8777],[8800],[8802],[8813,8817],[8820,8821],[8824,8825],[8832,8833],[8836,8837],[8840,8841],[8876,8879],[8928,8931],[8938,8941],[10972],[12364],[12366],[12368],[12370],[12372],[12374],[12376],[12378],[12380],[12382],[12384],[12386],[12389],[12391],[12393],[12400,12401],[12403,12404],[12406,12407],[12409,12410],[12412,12413],[12436],[12446],[12460],[12462],[12464],[12466],[12468],[12470],[12472],[12474],[12476],[12478],[12480],[12482],[12485],[12487],[12489],[12496,12497],[12499,12500],[12502,12503],[12505,12506],[12508,12509],[12532],[12535,12538],[12542],[44032],[55203],[64285],[64287],[64298,64310],[64312,64316],[64318],[64320,64321],[64323,64324],[64326,64334],[69786],[69788],[69803],[119134,119140],[119227,119232]],_f=String.fromCodePoint,cS=Math.min,uS=Math.max;function la(e){if(e.length===1){const n=_f(e[0]);return{num:1,build:()=>n}}const t=e[0];return{num:e[1]-e[0]+1,build:n=>_f(t+n)}}function $f(e,t){const n=[];let r=0,i=0;for(;r<e.length&&i<t.length;){const o=e[r],s=o[0],c=o.length===1?o[0]:o[1],a=t[i],u=a[0],l=a.length===1?a[0]:a[1];if(c<u)r+=1;else if(l<s)i+=1;else{let f=uS(s,u);const h=cS(c,l);if(n.length>=1){const d=n[n.length-1];(d.length===1?d[0]:d[1])+1===f&&(f=d[0],Fp(n))}N(n,f===h?[f]:[f,h]),c<=h&&(r+=1),l<=h&&(i+=1)}}return n}const Mf=Object.create(null);function lS(e){switch(e){case"full":return oS;case"ascii":return iS}}function fS(e,t){const n=`${e}:${t}`,r=Mf[n];if(r!==void 0)return r;const i=lS(t),o=e==="binary"?i:$f(i,sS),s=[];for(const a of o)N(s,la(a));if(e==="grapheme"){const a=$f(i,aS);for(const u of a){const l=la(u);N(s,{num:l.num,build:f=>Ow(l.build(f),"NFD")})}}const c=$n(...s);return Mf[n]=c,c}function lr(e,t){return fS(e,t)}function hS(e){if(typeof e.unit=="object")return e.unit;switch(e.unit){case"grapheme":return lr("grapheme","full");case"grapheme-composite":return lr("composite","full");case"grapheme-ascii":case void 0:return lr("grapheme","ascii");case"binary":return lr("binary","full");case"binary-ascii":return lr("binary","ascii")}}function be(e={}){const t=hS(e),n=Qx(t,e),r=rS(t,e);return ae(t,{...e,experimentalCustomSlices:r}).map(Xx,n)}const _m=Map,pc=String.fromCharCode,mc={num:26,build:e=>pc(e+97)},dS={num:26,build:e=>pc(e+65)},$m={num:10,build:e=>pc(e+48)};function pS(e){const t=z0(e);return e!==t?t:`%${Ir(Gn(e,0),16)}`}function mS(e){if(typeof e!="string")throw new Error("Unsupported");return decodeURIComponent(e)}const gS=()=>be({unit:"binary",minLength:1,maxLength:1}).map(pS,mS);let ns;function yS(){return ns===void 0&&(ns=$n(mc)),ns}let ni;function fa(e){ni===void 0&&(ni=new _m);let t=dt(ni,e);return t===void 0&&(t=$n(mc,$m,{num:e.length,build:n=>e[n]}),Et(ni,e,t)),t}function bS(e){return $n(mc,dS,$m,{num:e.length,build:t=>e[t]})}let ri;function gc(e){ri===void 0&&(ri=new _m);let t=dt(ri,e);return t===void 0&&(t=Ce({weight:10,arbitrary:bS(e)},{weight:1,arbitrary:gS()}),Et(ri,e,t)),t}function At(e,t={}){const n=t.freq===void 0?6:t.freq,r=Bp(t,"nil")?t.nil:null,i=[{arbitrary:we(r),weight:1,fallbackValue:{default:r}},{arbitrary:e,weight:n-1}],o={withCrossShrink:!0,depthSize:t.depthSize,maxDepth:t.maxDepth,depthIdentifier:t.depthIdentifier};return ua.from(i,o,"fc.option")}function wS(e){return e.length>63?!1:e.length<4||e[0]!=="x"||e[1]!=="n"||e[2]!=="-"||e[3]!=="-"}const Mm=Symbol("adapted-value");function xS(e,t){const n=t(e.value_);return n.adapted?new L(n.value,Mm):e}var SS=class extends xe{constructor(e,t){super(),this.sourceArb=e,this.adapter=t,this.adaptValue=n=>xS(n,t)}generate(e,t){const n=this.sourceArb.generate(e,t);return this.adaptValue(n)}canShrinkWithoutContext(e){return this.sourceArb.canShrinkWithoutContext(e)&&!this.adapter(e).adapted}shrink(e,t){return t===Mm?this.sourceArb.canShrinkWithoutContext(e)?this.sourceArb.shrink(e,void 0).map(this.adaptValue):J.nil():this.sourceArb.shrink(e,t).map(this.adaptValue)}};function Om(e,t){return new SS(e,t)}function ES([e,t]){return t===null?e:`${e}${t[0]}${t[1]}`}function TS(e){if(typeof e!="string"||e.length===0)throw new Error("Unsupported");return e.length===1?[e[0],null]:[e[0],[Te(e,1,e.length-1),e[e.length-1]]]}function vS(e){const t=fa("");return H(t,At(H(be({unit:fa("-"),size:e,maxLength:61}),t))).map(ES,TS).filter(wS)}function AS(e){return`${Se(e[0],".")}.${e[1]}`}function IS(e){if(typeof e!="string")throw new Error("Unsupported type");const t=e.lastIndexOf(".");return[tt(Te(e,0,t),"."),Te(e,t+1)]}function kS(e){const[t,n]=e;let r=n.length;for(let i=0;i!==t.length;++i)if(r+=1+t[i].length,r>255)return{adapted:!0,value:[De(t,0,i),n]};return{adapted:!1,value:e}}function go(e={}){const t=hc(e.size),n=Br("-1",t),r=be({unit:yS(),minLength:2,maxLength:63,size:n});return Om(H(ae(vS(t),{size:n,minLength:1,maxLength:127}),r),kS).map(AS,IS)}function CS(e){let t=e[0].length;for(let n=1;n!==e.length;++n)if(t+=1+e[n].length,t>64)return{adapted:!0,value:De(e,0,n)};return{adapted:!1,value:e}}function _S(e){return Se(e,".")}function $S(e){if(typeof e!="string")throw new Error("Unsupported");return tt(e,".")}function MS(e){return`${e[0]}@${e[1]}`}function OS(e){if(typeof e!="string")throw new Error("Unsupported");return tt(e,"@",2)}function yc(e={}){return H(Om(ae(be({unit:fa("!#$%&'*+-/=?^_`{|}~"),minLength:1,maxLength:64,size:e.size}),{minLength:1,maxLength:32,size:e.size}),CS).map(_S,$S),go({size:e.size})).map(MS,OS)}const PS=Ht.NEGATIVE_INFINITY,ha=Ht.POSITIVE_INFINITY,Pm=Ht.EPSILON,bc=F(2146435072)*F(4294967296),NS=-bc-F(1),Of=4503599627370496,jS=F(0xfffffffffffff),Pf=F("9007199254740992"),da=new Float64Array(1),Nf=new Uint32Array(da.buffer,da.byteOffset);function FS(e){return da[0]=e,[Nf[1],Nf[0]]}function RS(e){const{0:t,1:n}=FS(e),r=t>>>31,i=t>>>20&2047,o=(t&1048575)*4294967296+n,s=i===0?-1022:i-1023;let c=i===0?0:1;return c+=o*Pm,c*=r===0?1:-1,{exponent:s,significand:c}}function jf(e,t){return e===-1022?F(t*Of):F((t-1)*Of)+(F(e+1023)<<F(52))}function wc(e){if(e===ha)return bc;if(e===PS)return NS;const t=RS(e),n=t.exponent,r=t.significand;return e>0||e===0&&1/e===ha?jf(n,r):-jf(n,-r)-F(1)}function pa(e){if(e<0)return-pa(-e-F(1));if(e===bc)return ha;if(e<Pf)return Ht(e)*2**-1074;const t=e-Pf,n=-1021+Ht(t>>F(52));return(1+Ht(t&jS)*Pm)*2**n}const Ff=Number.isInteger,Rf=Object.is,rs=Number.NEGATIVE_INFINITY,is=Number.POSITIVE_INFINITY;function Nm(e,t,n,r){const{noDefaultInfinity:i=!1,minExcluded:o=!1,maxExcluded:s=!1,min:c=i?-t:rs,max:a=i?t:is}=e,u=o?c<-n?-r:Math.max(c,-n):c===rs?Math.max(c,-r):Math.max(c,-n),l=s?a>n?r:Math.min(a,n):a===is?Math.min(a,r):Math.min(a,n);return{noDefaultInfinity:!1,minExcluded:o||(c!==rs||o)&&Ff(u),maxExcluded:s||(a!==is||s)&&Ff(l),min:Rf(u,-0)?0:u,max:Rf(l,0)?-0:l,noNaN:e.noNaN||!1}}const jm=Number.NEGATIVE_INFINITY,Fm=Number.POSITIVE_INFINITY,LS=Number.MAX_VALUE,DS=45035996273704955e-1,Rm=4503599627370496;function BS(e){return Nm(e,LS,DS,Rm)}function US(e){return e===4503599627370496?Fm:e===-4503599627370496?jm:e}function VS(e){if(typeof e!="number")throw new Error("Unsupported type");return e===Fm?Rm:e===jm?-4503599627370496:e}const qS=Number.isInteger,Lm=Number.isNaN,WS=Number.NEGATIVE_INFINITY,zS=Number.POSITIVE_INFINITY,Lf=Number.MAX_VALUE,GS=NaN;function Df(e,t){if(Lm(e))throw new Error("fc.double constraints."+t+" must be a 64-bit float");return wc(e)}function KS(e){if(typeof e!="number")throw new Error("Unsupported type");return wc(e)}function HS(e){return!qS(e)}function Bf(e){const{noDefaultInfinity:t=!1,noNaN:n=!1,minExcluded:r=!1,maxExcluded:i=!1,min:o=t?-Lf:WS,max:s=t?Lf:zS}=e,c=Df(o,"min"),a=r?c+F(1):c,u=Df(s,"max"),l=i?u-F(1):u;if(l<a)throw new Error("fc.double constraints.min must be smaller or equal to constraints.max");if(n)return Xt({min:a,max:l}).map(pa,KS);const f=l>F(0),h=f?a:a-F(1),d=f?l+F(1):l;return Xt({min:h,max:d}).map(m=>l<m||m<a?GS:pa(m),m=>{if(typeof m!="number")throw new Error("Unsupported type");return Lm(m)?l!==d?d:h:wc(m)})}function Ur(e={}){return e.noInteger?Bf(BS(e)).map(US,VS).filter(HS):Bf(e)}const YS=Number.NEGATIVE_INFINITY,ma=Number.POSITIVE_INFINITY,JS=Math.imul,ga=2**127*(1+(2**23-1)/2**23),Dm=2139095040,XS=-2139095041,ya=new Float32Array(1),ZS=new Uint32Array(ya.buffer,ya.byteOffset);function QS(e){return ya[0]=e,ZS[0]}function eE(e){const t=QS(e),n=t>>>31,r=t>>>23&255,i=t&8388607,o=r===0?-126:r-127;let s=r===0?0:1;return s+=i/2**23,s*=n===0?1:-1,{exponent:o,significand:s}}function Uf(e,t){return e===-126?t*8388608:JS(e+127,8388608)+(t-1)*8388608}function xc(e){if(e===ma)return Dm;if(e===YS)return XS;const t=eE(e),n=t.exponent,r=t.significand;return e>0||e===0&&1/e===ma?Uf(n,r):-Uf(n,-r)-1}function ba(e){if(e<0)return-ba(-e-1);if(e===Dm)return ma;if(e<16777216)return e*2**-149;const t=e-16777216,n=-125+(t>>23);return(1+(t&8388607)/8388608)*2**n}const Bm=Number.NEGATIVE_INFINITY,Um=Number.POSITIVE_INFINITY,tE=ga,nE=83886075e-1,Vm=8388608;function rE(e){return Nm(e,tE,nE,Vm)}function iE(e){return e===8388608?Um:e===-8388608?Bm:e}function oE(e){if(typeof e!="number")throw new Error("Unsupported type");return e===Um?Vm:e===Bm?-8388608:e}const sE=Number.isInteger,qm=Number.isNaN,aE=Math.fround,cE=Number.NEGATIVE_INFINITY,uE=Number.POSITIVE_INFINITY,lE=NaN;function Vf(e,t){const n="fc.float constraints."+t+" must be a 32-bit float - you can convert any double to a 32-bit float by using `Math.fround(myDouble)`";if(qm(e)||aE(e)!==e)throw new Error(n);return xc(e)}function fE(e){if(typeof e!="number")throw new Error("Unsupported type");return xc(e)}function hE(e){return!sE(e)}function qf(e){const{noDefaultInfinity:t=!1,noNaN:n=!1,minExcluded:r=!1,maxExcluded:i=!1,min:o=t?-ga:cE,max:s=t?ga:uE}=e,c=Vf(o,"min"),a=r?c+1:c,u=Vf(s,"max"),l=i?u-1:u;if(a>l)throw new Error("fc.float constraints.min must be smaller or equal to constraints.max");if(n)return W({min:a,max:l}).map(ba,fE);const f=l>0?a:a-1,h=l>0?l+1:l;return W({min:f,max:h}).map(d=>d>l||d<a?lE:ba(d),d=>{if(typeof d!="number")throw new Error("Unsupported type");return qm(d)?l!==h?h:f:xc(d)})}function yo(e={}){return e.noInteger?qf(rE(e)).map(iE,oE).filter(hE):qf(e)}function dE(e){return e.replace(/([$`\\])/g,"\\$1").replace(/\r/g,"\\r")}function Wm(e){return e.replace(/\*\//g,"*\\/")}const ct=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];function $r(e){let t=4294967295;for(let n=0;n<e.length;++n){const r=Gn(e,n);if(r<128)t=ct[t&255^r]^t>>8;else if(r<2048)t=ct[t&255^(192|r>>6&31)]^t>>8,t=ct[t&255^(128|r&63)]^t>>8;else if(r>=55296&&r<57344){const i=Gn(e,++n);if(r>=56320||i<56320||i>57343||Number.isNaN(i))n-=1,t=ct[t&255^239]^t>>8,t=ct[t&255^191]^t>>8,t=ct[t&255^189]^t>>8;else{const o=(r&1023)+64,s=i&1023;t=ct[t&255^(240|o>>8&7)]^t>>8,t=ct[t&255^(128|o>>2&63)]^t>>8,t=ct[t&255^(128|s>>6&15|(o&3)<<4)]^t>>8,t=ct[t&255^(128|s&63)]^t>>8}}else t=ct[t&255^(224|r>>12&15)]^t>>8,t=ct[t&255^(128|r>>6&63)]^t>>8,t=ct[t&255^(128|r&63)]^t>>8}return(t|0)+2147483648}const pE=Object.getPrototypeOf;var fr=class extends xe{constructor(e){super(),this.arb=e}generate(e,t){return this.arb.generate(e,t)}canShrinkWithoutContext(e){return this.arb.canShrinkWithoutContext(e)}shrink(e,t){return J.nil()}};function Mr(e){return pE(e)===fr.prototype&&e.generate===fr.prototype.generate&&e.canShrinkWithoutContext===fr.prototype.canShrinkWithoutContext&&e.shrink===fr.prototype.shrink?e:new fr(e)}const mE=Object.assign,gE=Object.keys;function zm(e){return H(Mr(W()),Mr(W({min:1,max:4294967295}))).map(([t,n])=>{const r=()=>{const i={};return mE((s,c)=>{const a=ke(s),u=ke(c),l=e($r(`${t}${a}`)%n,$r(`${t}${u}`)%n);return i[`[${a},${u}]`]=l,l},{toString:()=>{const s=gE(i).sort().map(c=>`${c} => ${ke(i[c])}`).map(c=>`/* ${Wm(c)} */`);return`function(a, b) {
|
|
19
|
+
${V2(i)}`),o}function gc(e){return da(e,ve)}async function yc(e){const t=[];function n(s){const c=sm(s);return typeof c=="string"?c:(t.push(Promise.all([s,c])),"…")}const r=da(e,n);if(t.length===0)return r;const i=new Zt(await Promise.all(t));function o(s){const c=mt(i,s);return c!==void 0?c:ve(s)}return da(e,o)}function pm(e,t){if(t.runConfiguration.includeErrorInReport)throw new D(e);const n=new D(e,{cause:t.errorInstance});return"cause"in n||U2(n,{cause:t.errorInstance}),n}function H2(e){if(e.failed)throw pm(gc(e),e)}async function Y2(e){if(e.failed)throw pm(await yc(e),e)}function mm(e){return e.runConfiguration.asyncReporter?e.runConfiguration.asyncReporter(e):e.runConfiguration.reporter?e.runConfiguration.reporter(e):H2(e)}async function J2(e){return e.runConfiguration.asyncReporter?e.runConfiguration.asyncReporter(e):e.runConfiguration.reporter?e.runConfiguration.reporter(e):Y2(e)}const gm=[];function ym(e){gm.push(e)}function X2(){return gm}const Z2=Map;function Q2(e,t,n,r,i){const o=new um(n,t,r,i);for(const s of o){const c=e(s);o.handleResult(c)}return o.runExecution}function ex(e,t){e.runBeforeEach();const n=e.run(t);return e.runAfterEach(),n}async function tx(e,t,n,r,i){const o=new um(n,t,r,i);for(const s of o){const c=await e(s);o.handleResult(c)}return o.runExecution}async function nx(e,t){await e.runBeforeEach();const n=await e.run(t);return await e.runAfterEach(),n}function rx(e,t){let n=!1,r;for(let i=0;i!==e.length;++i){const o=e[i];if(o.onAllRunsComplete!==void 0)try{o.onAllRunsComplete(t)}catch(s){n||(n=!0,r=s)}}for(let i=e.length-1;i>=0;--i){const o=e[i];if(o.afterAll!==void 0)try{o.afterAll()}catch(s){n||(n=!0,r=s)}}if(n)throw r}function ix(e,t){const n=[];for(let r=0;r!==e.length;++r){const i=e[r];i.onAllRunsComplete!==void 0&&n.push(o=>i.onAllRunsComplete(o))}for(let r=e.length-1;r>=0;--r){const i=e[r];i.afterAll!==void 0&&n.push(()=>i.afterAll())}return n.length===0?t:t.then(async r=>{let i=!1,o;for(const s of n)try{const c=s(r);c!==void 0&&await c}catch(c){i||(i=!0,o=c)}if(i)throw o;return r})}function go(e,t){if(e==null||e.generate===null||e.generate===void 0)throw new Error("Invalid property encountered, please use a valid property");if(e.run===null||e.run===void 0)throw new Error("Invalid property encountered, please use a valid property not an arbitrary");const n=pc({...xt(),...t});if(n.reporter!==void 0&&n.asyncReporter!==void 0)throw new Error("Invalid parameters encountered, reporter and asyncReporter cannot be specified together");if(n.asyncReporter!==void 0&&!e.isAsync())throw new Error("Invalid parameters encountered, only asyncProperty can be used when asyncReporter specified");const r=O2(e,n),i=X2(),o=n.plugins,s=new Z2,c=[];for(let x=0;x!==i.length;++x)c.push(i[x](x,s));for(let x=0;x!==o.length;++x)c.push(o[x](i.length+x,s));let a,u=r.isAsync()?async x=>nx(r,x):x=>ex(r,x);for(let x=c.length-1;x>=0;--x){const E=c[x];E.decorateGenerate!==void 0&&(a===void 0&&(a=($,I)=>r.generate($,I)),a=E.decorateGenerate(a)),E.decorateRun!==void 0&&(u=E.decorateRun(u))}const l=a===void 0?r:{generate:a},f=n.path.length===0||n.path.indexOf(":")===-1?n.numRuns:-1,h=n.numRuns*n.maxSkipsPerRun,d=(...x)=>r.shrink(...x),m=new N2(n.path.length===0?fm(l,n.seed,n.randomType,n.examples):dm(n.path,Qt(hm(l,n.seed,n.randomType,n.examples)),d),f,h),p=n.endOnFailure?J.nil:d;if(r.isAsync())return ix(c,tx(u,p,m,n.verbose,n.markInterruptAsFailure).then(x=>x.toRunDetails(n.seed,n.path,h,n)));const y=Q2(u,p,m,n.verbose,n.markInterruptAsFailure).toRunDetails(n.seed,n.path,h,n);return rx(c,y),y}function Vr(e,t){const n=go(e,t);if(e.isAsync())return n.then(J2);mm(n)}function ox(e,t){const n=Object.prototype.hasOwnProperty.call(e,"isAsync")?e:new nm(e,()=>!0);return t.unbiased===!0?new om(n):n}function bm(e,t){const n=pc(typeof t=="number"?{...xt(),numRuns:t}:{...xt(),...t}),r=ox(e,n),i=r.shrink.bind(r);return(n.path.length===0?Qt(fm(r,n.seed,n.randomType,n.examples)):dm(n.path,Qt(hm(r,n.seed,n.randomType,n.examples)),i)).take(n.numRuns).map(o=>o.value_)}function wm(e,t){return[...bm(e,t)]}function sx(e){return(Math.round(e*100)/100).toFixed(2)}function xm(e,t,n){const r=pc(typeof n=="number"?{...xt(),numRuns:n}:{...xt(),...n}),i={};for(const a of bm(e,n)){const u=t(a),l=Array.isArray(u)?u:[u];for(const f of l)i[f]=(i[f]||0)+1}const o=Object.entries(i).sort((a,u)=>u[1]-a[1]).map(a=>[a[0],`${sx(a[1]*100/r.numRuns)}%`]),s=o.map(a=>a[0].length).reduce((a,u)=>Math.max(a,u),0),c=o.map(a=>a[1].length).reduce((a,u)=>Math.max(a,u),0);for(const a of o)r.logger(`${a[0].padEnd(s,".")}..${a[1].padStart(c,".")}`)}const ax=Object.assign;function pa(e,t,n,r){const i=n();let o=e.clone();const s={mrng:e.clone(),biasFactor:t,history:[]},c=u=>{const l=i[s.history.length];if(l!==void 0&&l.arb===u){const h=l.value;return N(s.history,{arb:u,value:h,context:l.context,mrng:l.mrng}),o=l.mrng.clone(),h}const f=u.generate(o,t);return N(s.history,{arb:u,value:f.value_,context:f.context,mrng:o.clone()}),f.value},a=(u,...l)=>c(r(u,l));return new L(ax(a,{values(){return Q(s.history,u=>u.value)},[Fe](){return pa(e,t,n,r).value},[St](){return ve(Q(s.history,u=>u.value))}}),s)}const ss=Array.isArray,xf=Object.keys,cx=Object.is;function ux(e){const t=new Zt;return function(r,i){const o=mt(t,r);if(o===void 0){const a=r(...i);return At(t,r,[{args:i,value:a}]),a}const s=o;for(const a of s)if(e(i,a.args))return a.value;const c=r(...i);return N(s,{args:i,value:c}),c}}function Sm(e,t){if(e!==null&&typeof e=="object"&&t!==null&&typeof t=="object"){if(ss(e)){if(!ss(t)||e.length!==t.length)return!1}else if(ss(t))return!1;if(xf(e).length!==xf(t).length)return!1;for(const n in e)if(!(n in t)||!Sm(e[n],t[n]))return!1;return!0}else return cx(e,t)}var lx=class extends xe{constructor(...e){super(...e),this.arbitraryCache=ux(Sm)}generate(e,t){return pa(e,t,()=>[],this.arbitraryCache)}canShrinkWithoutContext(e){return!1}shrink(e,t){if(t===void 0)return J.nil();const n=t,r=n.mrng,i=n.biasFactor,o=n.history;return Xp(o.map(s=>s.arb),o.map(s=>s.value),o.map(s=>s.context)).map(s=>{function c(){const a=s.value,u=s.context;return Q(o,(l,f)=>({arb:l.arb,value:a[f],context:u[f],mrng:l.mrng}))}return pa(r,i,c,this.arbitraryCache)})}};function Em(){return new lx}const fx=Math.floor,Sf=Math.log;function hx(e){return fx(Sf(e)/Sf(2))}function dx(e){return e===F(0)?F(0):F(nt(e).length)}function Tm(e,t,n){if(e===t)return[{min:e,max:t}];if(e<0&&t>0){const s=n(-e),c=n(t);return[{min:-s,max:c},{min:t-c,max:t},{min:e,max:e+s}]}const r=n(t-e),i={min:e,max:e+r},o={min:t-r,max:t};return e<0?[o,i]:[i,o]}const px=Math.ceil,mx=Math.floor;function Ef(e){return mx(e/2)}function Tf(e){return px(e/2)}function vf(e,t,n){const r=e-t;function*i(){let s=n?void 0:t;const c=n?r:Ef(r);for(let a=c;a>0;a=Ef(a)){const u=a===r?t:e-a;yield new L(u,s),s=u}}function*o(){let s=n?void 0:t;const c=n?r:Tf(r);for(let a=c;a<0;a=Tf(a)){const u=a===r?t:e-a;yield new L(u,s),s=u}}return r>0?Qt(i()):Qt(o())}const Af=Math.sign,gx=Number.isInteger,yx=Object.is;var Jn=class vm extends xe{constructor(t,n){super(),this.min=t,this.max=n,this.ranges=Tm(t,n,hx)}generate(t,n){if(n===void 0||t.nextInt(1,n)!==1)return new L(t.nextInt(this.min,this.max),void 0);const r=this.ranges;if(r.length===1){const s=r[0];return new L(t.nextInt(s.min,s.max),void 0)}const i=t.nextInt(-2*(r.length-1),r.length-2),o=i<0?r[0]:r[i+1];return new L(t.nextInt(o.min,o.max),void 0)}canShrinkWithoutContext(t){return typeof t=="number"&&gx(t)&&!yx(t,-0)&&this.min<=t&&t<=this.max}shrink(t,n){return vm.isValidContext(t,n)?this.isLastChanceTry(t,n)?J.of(new L(n,void 0)):vf(t,n,!1):vf(t,this.min<=0&&this.max>=0?0:this.min<0?this.max:this.min,!0)}isLastChanceTry(t,n){return t>0?t===n+1&&t>this.min:t<0?t===n-1&&t<this.max:!1}static isValidContext(t,n){if(n===void 0)return!1;if(typeof n!="number")throw new Error("Invalid context type passed to IntegerArbitrary (#1)");if(n!==0&&Af(t)!==Af(n))throw new Error("Invalid context value passed to IntegerArbitrary (#2)");return!0}};const kf=Number.isInteger;function bx(e){return{min:e.min!==void 0?e.min:-2147483648,max:e.max!==void 0?e.max:2147483647}}function W(e={}){const t=bx(e);if(t.min>t.max)throw new Error("fc.integer maximum value should be equal or greater than the minimum one");if(!kf(t.min))throw new Error("fc.integer minimum value should be an integer");if(!kf(t.max))throw new Error("fc.integer maximum value should be an integer");return new Jn(t.min,t.max)}const If=new Map;function yo(e){if(e===void 0)return{depth:0};if(typeof e!="string")return e;const t=mt(If,e);if(t!==void 0)return t;const n={depth:0};return At(If,e,n),n}function bo(){return{depth:0}}var wx=class{constructor(e,t,n){this.arb=e,this.mrng=t,this.biasFactor=n}attemptExact(){}next(){return this.arb.generate(this.mrng,this.biasFactor)}};const xx=Math.min,Sx=Math.max;var Ex=class{constructor(e,t,n,r){this.arb=e,this.mrng=t,this.slices=n,this.biasFactor=r,this.activeSliceIndex=0,this.nextIndexInSlice=0,this.lastIndexInSlice=-1}attemptExact(e){if(e!==0&&this.mrng.nextInt(1,this.biasFactor)===1){const t=[];for(let n=0;n!==this.slices.length;++n)this.slices[n].length===e&&N(t,n);if(t.length===0)return;this.activeSliceIndex=t[this.mrng.nextInt(0,t.length-1)],this.nextIndexInSlice=0,this.lastIndexInSlice=e-1}}next(){if(this.nextIndexInSlice<=this.lastIndexInSlice)return new L(this.slices[this.activeSliceIndex][this.nextIndexInSlice++],void 0);if(this.mrng.nextInt(1,this.biasFactor)!==1)return this.arb.generate(this.mrng,this.biasFactor);this.activeSliceIndex=this.mrng.nextInt(0,this.slices.length-1);const e=this.slices[this.activeSliceIndex];if(this.mrng.nextInt(1,this.biasFactor)!==1)return this.nextIndexInSlice=1,this.lastIndexInSlice=e.length-1,new L(e[0],void 0);const t=this.mrng.nextInt(0,e.length-1),n=this.mrng.nextInt(0,e.length-1);return this.nextIndexInSlice=xx(t,n),this.lastIndexInSlice=Sx(t,n),new L(e[this.nextIndexInSlice++],void 0)}};function Cf(e,t,n,r){return r===void 0||n.length===0||t.nextInt(1,r)!==1?new wx(e,t,r):new Ex(e,t,n,r)}const Tx=Math.floor,_f=Math.log,vx=Array.isArray;function Ax(e,t){return e===t?e:e+Tx(_f(t-e)/_f(2))}var Am=class km extends xe{constructor(t,n,r,i,o,s,c){super(),this.arb=t,this.minLength=n,this.maxGeneratedLength=r,this.maxLength=i,this.setBuilder=s,this.customSlices=c,this.lengthArb=W({min:n,max:r}),this.depthContext=yo(o),this.cachedBiasedMaxLength=Ax(n,r)}preFilter(t){if(this.setBuilder===void 0)return t;const n=this.setBuilder();for(let r=0;r!==t.length;++r)n.tryAdd(t[r]);return n.getData()}static makeItCloneable(t,n){return t[Fe]=()=>{const r=[];for(let i=0;i!==n.length;++i)N(r,n[i].value);return this.makeItCloneable(r,n),r},t}generateNItemsNoDuplicates(t,n,r,i){let o=0;const s=t(),c=Cf(this.arb,r,this.customSlices,i);for(;s.size()<n&&o<this.maxGeneratedLength;){const a=c.next();s.tryAdd(a)?o=0:o+=1}return s.getData()}safeGenerateNItemsNoDuplicates(t,n,r,i){const o=n-this.cachedBiasedMaxLength;if(o<=0)return this.generateNItemsNoDuplicates(t,n,r,i);this.depthContext.depth+=o;try{return this.generateNItemsNoDuplicates(t,n,r,i)}finally{this.depthContext.depth-=o}}generateNItems(t,n,r){const i=[],o=Cf(this.arb,n,this.customSlices,r);o.attemptExact(t);for(let s=0;s!==t;++s)N(i,o.next());return i}safeGenerateNItems(t,n,r){const i=t-this.cachedBiasedMaxLength;if(i<=0)return this.generateNItems(t,n,r);this.depthContext.depth+=i;try{return this.generateNItems(t,n,r)}finally{this.depthContext.depth-=i}}wrapper(t,n,r,i){const o=n?this.preFilter(t):t;let s=!1;const c=[],a=[];for(let u=0;u!==o.length;++u){const l=o[u];s=s||l.hasToBeCloned,N(c,l.value),N(a,l.context)}return s&&km.makeItCloneable(c,o),new L(c,{shrunkOnce:n,lengthContext:t.length===o.length&&r!==void 0?r:void 0,itemsContexts:a,startIndex:i})}generate(t,n){let r,i;if(n===void 0)r=this.lengthArb.generate(t,void 0).value;else if(this.minLength===this.maxGeneratedLength)r=this.lengthArb.generate(t,void 0).value,i=n;else if(t.nextInt(1,n)!==1)r=this.lengthArb.generate(t,void 0).value;else if(t.nextInt(1,n)!==1)r=this.lengthArb.generate(t,void 0).value,i=n;else{const s=this.cachedBiasedMaxLength;r=W({min:this.minLength,max:s}).generate(t,void 0).value,i=n}const o=this.setBuilder!==void 0?this.safeGenerateNItemsNoDuplicates(this.setBuilder,r,t,i):this.safeGenerateNItems(r,t,i);return this.wrapper(o,!1,void 0,0)}canShrinkWithoutContext(t){if(!vx(t)||this.minLength>t.length||t.length>this.maxLength)return!1;for(let n=0;n!==t.length;++n)if(!(n in t)||!this.arb.canShrinkWithoutContext(t[n]))return!1;return this.preFilter(Q(t,n=>new L(n,void 0))).length===t.length}shrinkItemByItem(t,n,r){const i=[];for(let o=n.startIndex;o<r;++o)N(i,dn(()=>this.arb.shrink(t[o],n.itemsContexts[o]).map(s=>{const c=Q(Be(t,0,o),(u,l)=>new L(Tn(u),n.itemsContexts[l])),a=Q(Be(t,o+1),(u,l)=>new L(Tn(u),n.itemsContexts[l+o+1]));return[[...c,s,...a],void 0,o]})));return J.nil().join(...i)}shrinkImpl(t,n){if(t.length===0)return J.nil();const r=n!==void 0?n:{shrunkOnce:!1,lengthContext:void 0,itemsContexts:[],startIndex:0};return this.lengthArb.shrink(t.length,r.lengthContext).drop(r.shrunkOnce&&r.lengthContext===void 0&&t.length>this.minLength+1?1:0).map(i=>{const o=t.length-i.value;return[Q(Be(t,o),(s,c)=>new L(Tn(s),r.itemsContexts[c+o])),i.context,0]}).join(dn(()=>t.length>this.minLength?this.shrinkItemByItem(t,r,1):this.shrinkItemByItem(t,r,t.length))).join(t.length>this.minLength?dn(()=>{const i={shrunkOnce:!1,lengthContext:void 0,itemsContexts:Be(r.itemsContexts,1),startIndex:0};return this.shrinkImpl(Be(t,1),i).filter(o=>this.minLength<=o[0].length+1).map(o=>[[new L(Tn(t[0]),r.itemsContexts[0]),...o[0]],void 0,0])}):J.nil())}shrink(t,n){return this.shrinkImpl(t,n).map(r=>this.wrapper(r[0],!0,r[1],r[2]))}};const kx=Math.floor,Ix=Math.min,Mn=2147483647,Rn=["xsmall","small","medium","large","xlarge"],Cx=["-4","-3","-2","-1","=","+1","+2","+3","+4"],bc="small";function _x(e,t){switch(t){case"xsmall":return kx(1.1*e)+1;case"small":return 2*e+10;case"medium":return 11*e+100;case"large":return 101*e+1e3;case"xlarge":return 1001*e+1e4;default:throw new Error(`Unable to compute lengths based on received size: ${t}`)}}function qr(e,t){const n=Ir(Cx,e);if(n===-1)return e;const r=Ir(Rn,t);if(r===-1)throw new Error(`Unable to offset size based on the unknown defaulted one: ${t}`);const i=r+n-4;return i<0?Rn[0]:i>=Rn.length?Rn[Rn.length-1]:Rn[i]}function Mr(e,t,n,r){const{baseSize:i=bc,defaultSizeToMaxWhenMaxSpecified:o}=xt()||{},s=e!==void 0?e:r&&o?"max":i;if(s==="max")return n;const c=qr(s,i);return Ix(_x(t,c),n)}function $x(e,t){if(typeof e=="number")return 1/e;const{baseSize:n=bc,defaultSizeToMaxWhenMaxSpecified:r}=xt()||{},i=e!==void 0?e:t&&r?"max":n;if(i==="max")return 0;switch(qr(i,n)){case"xsmall":return 1;case"small":return .5;case"medium":return .25;case"large":return .125;case"xlarge":return .0625}}function wc(e){const{baseSize:t=bc}=xt()||{};return e===void 0?t:qr(e,t)}function ae(e,t={}){const n=t.size,r=t.minLength||0,i=t.maxLength,o=t.depthIdentifier,s=i!==void 0?i:Mn;return new Am(e,r,Mr(n,r,s,i!==void 0),s,o,void 0,t.experimentalCustomSlices||[])}function ii(e){return e/F(2)}function $f(e,t,n){const r=e-t;function*i(){let s=n?void 0:t;const c=n?r:ii(r);for(let a=c;a>0;a=ii(a)){const u=e-a;yield new L(u,s),s=u}}function*o(){let s=n?void 0:t;const c=n?r:ii(r);for(let a=c;a<0;a=ii(a)){const u=e-a;yield new L(u,s),s=u}}return r>0?Qt(i()):Qt(o())}var Mx=class Im extends xe{constructor(t,n){super(),this.min=t,this.max=n}generate(t,n){const r=this.computeGenerateRange(t,n);return new L(t.nextBigInt(r.min,r.max),void 0)}computeGenerateRange(t,n){if(n===void 0||t.nextInt(1,n)!==1)return{min:this.min,max:this.max};const r=Tm(this.min,this.max,dx);if(r.length===1)return r[0];const i=t.nextInt(-2*(r.length-1),r.length-2);return i<0?r[0]:r[i+1]}canShrinkWithoutContext(t){return typeof t=="bigint"&&this.min<=t&&t<=this.max}shrink(t,n){return Im.isValidContext(t,n)?this.isLastChanceTry(t,n)?J.of(new L(n,void 0)):$f(t,n,!1):$f(t,this.defaultTarget(),!0)}defaultTarget(){return this.min<=0&&this.max>=0?F(0):this.min<0?this.max:this.min}isLastChanceTry(t,n){return t>0?t===n+F(1)&&t>this.min:t<0?t===n-F(1)&&t<this.max:!1}static isValidContext(t,n){if(n===void 0)return!1;if(typeof n!="bigint")throw new Error("Invalid context type passed to BigIntArbitrary (#1)");const r=t>0&&n<0||t<0&&n>0;if(n!==F(0)&&r)throw new Error("Invalid context value passed to BigIntArbitrary (#2)");return!0}};function Ox(e){const t=F(-1)<<F(255),n=(F(1)<<F(255))-F(1),r=e.min,i=e.max;return{min:r!==void 0?r:t-(i!==void 0&&i<F(0)?i*i:F(0)),max:i!==void 0?i:n+(r!==void 0&&r>F(0)?r*r:F(0))}}function Px(e){return e[0]===void 0?{}:e[1]===void 0?e[0]:{min:e[0],max:e[1]}}function en(...e){const t=Ox(Px(e));if(t.min>t.max)throw new Error("fc.bigInt expects max to be greater than or equal to min");return new Mx(t.min,t.max)}const Nx=Object.getPrototypeOf;var fr=class extends xe{constructor(e){super(),this.arb=e}generate(e,t){return this.arb.generate(e,void 0)}canShrinkWithoutContext(e){return this.arb.canShrinkWithoutContext(e)}shrink(e,t){return this.arb.shrink(e,t)}};function Or(e){return Nx(e)===fr.prototype&&e.generate===fr.prototype.generate&&e.canShrinkWithoutContext===fr.prototype.canShrinkWithoutContext&&e.shrink===fr.prototype.shrink?e:new fr(e)}function jx(e){return e===1}function Fx(e){if(typeof e!="boolean")throw new Error("Unsupported input type");return e===!0?1:0}function Dt(){return Or(W({min:0,max:1}).map(jx,Fx))}const Sr=Object.is;var Rx=class{constructor(e){this.values=e,this.fastValues=new It(this.values);let t=!1,n=!1;if(hn(this.fastValues,0))for(let r=0;r!==this.values.length;++r){const i=this.values[r];t=t||Sr(i,-0),n=n||Sr(i,0)}this.hasMinusZero=t,this.hasPlusZero=n}has(e){return e===0?Sr(e,0)?this.hasPlusZero:this.hasMinusZero:hn(this.fastValues,e)}},Cm=class extends xe{constructor(e){super(),this.values=e}generate(e,t){const n=this.values.length===1?0:e.nextInt(0,this.values.length-1),r=this.values[n];return yn(r)?new L(r,n,()=>r[Fe]()):new L(r,n)}canShrinkWithoutContext(e){return this.values.length===1?Sr(this.values[0],e):(this.fastValues===void 0&&(this.fastValues=new Rx(this.values)),this.fastValues.has(e))}shrink(e,t){return t===0||Sr(e,this.values[0])?J.nil():J.of(new L(this.values[0],0))}};function je(...e){if(e.length===0)throw new Error("fc.constantFrom expects at least one parameter");return new Cm(e)}function _m(e){return!e||!e.withBigInt?je(!1,null,void 0,0,"",NaN):je(!1,null,void 0,0,"",NaN,F(0))}function we(e){return new Cm([e])}var Lx=class $m{constructor(){this.receivedLogs=[]}log(t){this.receivedLogs.push(t)}size(){return this.receivedLogs.length}toString(){return JSON.stringify({logs:this.receivedLogs})}[Fe](){return new $m}};function Mm(){return we(new Lx)}const Dx=NaN,Bx=Number.isNaN;function Om(e){return new Bi(e)}function Pm(e){if(!(e instanceof Bi)||e.constructor!==Bi)throw new D("Not a valid value for date unmapper");return Ui(e)}function Ux(e){return t=>t===e?new Bi(Dx):Om(t)}function Vx(e){return t=>{const n=Pm(t);return Bx(n)?e:n}}const Mf=Number.isNaN;function wo(e={}){const t=e.min!==void 0?Ui(e.min):-864e13,n=e.max!==void 0?Ui(e.max):864e13,r=e.noInvalidDate;if(Mf(t))throw new Error("fc.date min must be valid instance of Date");if(Mf(n))throw new Error("fc.date max must be valid instance of Date");if(t>n)throw new Error("fc.date max must be greater or equal to min");if(r)return W({min:t,max:n}).map(Om,Pm);const i=n+1;return W({min:t,max:n+1}).map(Ux(i),Vx(i))}var qx=class extends xe{constructor(e,t){super(),this.startArb=e,this.chainer=t}generate(e,t){const n=[],r=e.clone();let i=this.startArb.generate(e,t);for(n.push({arbitrary:this.startArb,value:i.value_,context:i.context,clonedMrng:r});;){const s=this.chainer(i.value_);if(s===void 0)break;const c=e.clone();i=s.generate(e,t),n.push({arbitrary:s,value:i.value_,context:i.context,clonedMrng:c})}const o={biasFactor:t,entries:n,currentShrinkLevel:0};return new L(i.value_,o)}canShrinkWithoutContext(e){return!1}shrink(e,t){return this.isSafeContext(t)?new J(this.shrinkIterator(t)):J.nil()}*shrinkIterator(e){const{entries:t,currentShrinkLevel:n,biasFactor:r}=e;for(let i=n;i<t.length;++i){const o=t[i],s=o.arbitrary.shrink(o.value,o.context);for(const c of s){const a=t.slice(0,i);a.push({arbitrary:o.arbitrary,value:c.value_,context:c.context,clonedMrng:o.clonedMrng});let u=c;const l=o.clonedMrng.clone();for(;;){const d=this.chainer(u.value_);if(d===void 0)break;const m=l.clone(),p=d.generate(l,r);a.push({arbitrary:d,value:p.value_,context:p.context,clonedMrng:m}),u=p}const f=a[a.length-1],h={biasFactor:r,entries:a,currentShrinkLevel:i};yield new L(f.value,h)}}}isSafeContext(e){return e!=null&&typeof e=="object"&&"biasFactor"in e&&"entries"in e&&"currentShrinkLevel"in e}};function xc(e,t){return new qx(e,t)}const Wx=Symbol.iterator,zx=Array.isArray,Gx=Object.is;var Kx=class Nm extends xe{constructor(t,n){super(),this.arb=t,this.numValues=n}generate(t,n){const r=[];if(this.numValues<=0)return this.wrapper(r);for(let i=0;i!==this.numValues-1;++i)N(r,this.arb.generate(t.clone(),n));return N(r,this.arb.generate(t,n)),this.wrapper(r)}canShrinkWithoutContext(t){if(!zx(t)||t.length!==this.numValues)return!1;if(t.length===0)return!0;for(let n=1;n<t.length;++n)if(!Gx(t[0],t[n]))return!1;return this.arb.canShrinkWithoutContext(t[0])}shrink(t,n){return t.length===0?J.nil():new J(this.shrinkImpl(t,n!==void 0?n:[])).map(r=>this.wrapper(r))}*shrinkImpl(t,n){const r=Q(t,(o,s)=>this.arb.shrink(o,n[s])[Wx]());let i=Q(r,o=>o.next());for(;!i[0].done;)yield Q(i,o=>o.value),i=Q(r,o=>o.next())}static makeItCloneable(t,n){return t[Fe]=()=>{const r=[];for(let i=0;i!==n.length;++i)N(r,n[i].value);return this.makeItCloneable(r,n),r},t}wrapper(t){let n=!1;const r=[],i=[];for(let o=0;o!==t.length;++o){const s=t[o];n=n||s.hasToBeCloned,N(r,s.value),N(i,s.context)}return n&&Nm.makeItCloneable(r,t),new L(r,i)}};function jm(e,t){return new Kx(e,t)}var Of=class{constructor(e){this.isEqual=e,this.data=[]}tryAdd(e){for(let t=0;t!==this.data.length;++t)if(this.isEqual(this.data[t],e))return!1;return N(this.data,e),!0}size(){return this.data.length}getData(){return this.data}};const Hx=Number.isNaN;var Yx=class{constructor(e){this.selector=e,this.selectedItemsExceptNaN=new It,this.data=[]}tryAdd(e){const t=this.selector(e);if(Hx(t))return N(this.data,e),!0;const n=this.selectedItemsExceptNaN.size;return Cr(this.selectedItemsExceptNaN,t),n!==this.selectedItemsExceptNaN.size?(N(this.data,e),!0):!1}size(){return this.data.length}getData(){return this.data}};const Jx=Object.is;var Xx=class{constructor(e){this.selector=e,this.selectedItemsExceptMinusZero=new It,this.data=[],this.hasMinusZero=!1}tryAdd(e){const t=this.selector(e);if(Jx(t,-0))return this.hasMinusZero?!1:(N(this.data,e),this.hasMinusZero=!0,!0);const n=this.selectedItemsExceptMinusZero.size;return Cr(this.selectedItemsExceptMinusZero,t),n!==this.selectedItemsExceptMinusZero.size?(N(this.data,e),!0):!1}size(){return this.data.length}getData(){return this.data}},Zx=class{constructor(e){this.selector=e,this.selectedItems=new It,this.data=[]}tryAdd(e){const t=this.selector(e),n=this.selectedItems.size;return Cr(this.selectedItems,t),n!==this.selectedItems.size?(N(this.data,e),!0):!1}size(){return this.data.length}getData(){return this.data}};function Qx(e){if(typeof e.comparator=="function"){if(e.selector===void 0){const c=e.comparator,a=(u,l)=>c(u.value_,l.value_);return()=>new Of(a)}const r=e.comparator,i=e.selector,o=c=>i(c.value_),s=(c,a)=>r(o(c),o(a));return()=>new Of(s)}const t=e.selector||(r=>r),n=r=>t(r.value_);switch(e.comparator){case"IsStrictlyEqual":return()=>new Yx(n);case"SameValueZero":return()=>new Zx(n);case"SameValue":case void 0:return()=>new Xx(n)}}function tn(e,t={}){const n=t.minLength!==void 0?t.minLength:0,r=t.maxLength!==void 0?t.maxLength:Mn,i=Mr(t.size,n,r,t.maxLength!==void 0),o=t.depthIdentifier,s=new Am(e,n,i,r,o,Qx(t),[]);return n===0?s:s.filter(c=>c.length>=n)}const eS=Object.create,tS=Object.defineProperty,nS=Object.getOwnPropertyDescriptor,Pf=Object.getPrototypeOf,rS=Object.prototype,iS=Reflect.ownKeys;function oS(e){const t=e[1]?eS(null):{},n=e[0];for(let r=0;r!==n.length;++r){const i=n[r][0];i==="__proto__"?tS(t,i,{enumerable:!0,configurable:!0,writable:!0,value:n[r][1]}):t[i]=n[r][1]}return t}function sS(e){return e!==void 0&&!!e.configurable&&!!e.enumerable&&!!e.writable&&e.get===void 0&&e.set===void 0}function aS(e){if(typeof e!="object"||e===null)throw new D("Incompatible instance received: should be a non-null object");const t=Pf(e)===null,n=Pf(e)===rS;if(!t&&!n)throw new D("Incompatible instance received: should be of exact type Object");const r=Q(iS(e),i=>[i,nS(e,i)]);if(!Hp(r,([,i])=>sS(i)))throw new D("Incompatible instance received: should contain only c/e/w properties without get/set");return[Q(r,([i,o])=>[i,o.value]),t]}function cS(e){return e[0]}function xo(e,t,n={}){const r=!!n.noNullPrototype;return H(tn(H(e,t),{minLength:n.minKeys,maxLength:n.maxKeys,size:n.size,selector:cS,depthIdentifier:n.depthIdentifier}),r?we(!1):Dt()).map(oS,aS)}const uS=Number.POSITIVE_INFINITY,lS=Number.MAX_SAFE_INTEGER,fS=Number.isInteger,hS=Math.floor,dS=Math.pow,pS=Math.min;var ma=class Fm extends xe{static from(t,n,r){if(t.length===0)throw new Error(`${r} expects at least one weighted arbitrary`);let i=0;for(let s=0;s!==t.length;++s){if(t[s].arbitrary===void 0)throw new Error(`${r} expects arbitraries to be specified`);const c=t[s].weight;if(i+=c,!fS(c))throw new Error(`${r} expects weights to be integer values`);if(c<0)throw new Error(`${r} expects weights to be superior or equal to 0`)}if(i<=0)throw new Error(`${r} expects the sum of weights to be strictly superior to 0`);const o={depthBias:$x(n.depthSize,n.maxDepth!==void 0),maxDepth:n.maxDepth!==void 0?n.maxDepth:uS,withCrossShrink:!!n.withCrossShrink};return new Fm(t,o,yo(n.depthIdentifier))}constructor(t,n,r){super(),this.warbs=t,this.constraints=n,this.context=r;let i=0;this.cumulatedWeights=[];for(let o=0;o!==t.length;++o)i+=t[o].weight,N(this.cumulatedWeights,i);this.totalWeight=i}generate(t,n){if(this.mustGenerateFirst())return this.safeGenerateForIndex(t,0,n);const r=t.nextInt(this.computeNegDepthBenefit(),this.totalWeight-1);for(let i=0;i!==this.cumulatedWeights.length;++i)if(r<this.cumulatedWeights[i])return this.safeGenerateForIndex(t,i,n);throw new Error("Unable to generate from fc.frequency")}canShrinkWithoutContext(t){return this.canShrinkWithoutContextIndex(t)!==-1}shrink(t,n){if(n!==void 0){const i=n,o=i.selectedIndex,s=i.originalBias,c=this.warbs[o].arbitrary.shrink(t,i.originalContext).map(a=>this.mapIntoValue(o,a,null,s));if(i.clonedMrngForFallbackFirst!==null){i.cachedGeneratedForFirst===void 0&&(i.cachedGeneratedForFirst=this.safeGenerateForIndex(i.clonedMrngForFallbackFirst,0,s));const a=i.cachedGeneratedForFirst;return J.of(a).join(c)}return c}const r=this.canShrinkWithoutContextIndex(t);return r===-1?J.nil():this.defaultShrinkForFirst(r).join(this.warbs[r].arbitrary.shrink(t,void 0).map(i=>this.mapIntoValue(r,i,null,void 0)))}defaultShrinkForFirst(t){++this.context.depth;try{if(!this.mustFallbackToFirstInShrink(t)||this.warbs[0].fallbackValue===void 0)return J.nil()}finally{--this.context.depth}const n=new L(this.warbs[0].fallbackValue.default,void 0);return J.of(this.mapIntoValue(0,n,null,void 0))}canShrinkWithoutContextIndex(t){if(this.mustGenerateFirst())return this.warbs[0].arbitrary.canShrinkWithoutContext(t)?0:-1;try{++this.context.depth;for(let n=0;n!==this.warbs.length;++n){const r=this.warbs[n];if(r.weight!==0&&r.arbitrary.canShrinkWithoutContext(t))return n}return-1}finally{--this.context.depth}}mapIntoValue(t,n,r,i){const o={selectedIndex:t,originalBias:i,originalContext:n.context,clonedMrngForFallbackFirst:r};return new L(n.value,o)}safeGenerateForIndex(t,n,r){++this.context.depth;try{const i=this.warbs[n].arbitrary.generate(t,r),o=this.mustFallbackToFirstInShrink(n)?t.clone():null;return this.mapIntoValue(n,i,o,r)}finally{--this.context.depth}}mustGenerateFirst(){return this.constraints.maxDepth<=this.context.depth}mustFallbackToFirstInShrink(t){return t!==0&&this.constraints.withCrossShrink&&this.warbs[0].weight!==0}computeNegDepthBenefit(){const t=this.constraints.depthBias;if(t<=0||this.warbs[0].weight===0)return 0;const n=hS(dS(1+t,this.context.depth))-1;return-pS(this.totalWeight*n,lS)||0}};function mS(e){return e!=null&&typeof e=="object"&&!("generate"in e)&&!("arbitrary"in e)&&!("weight"in e)}function Nf(e){return Rp(e)?{arbitrary:e,weight:1}:e}function Ce(...e){const t=e[0];if(mS(t)){const r=Q(Be(e,1),Nf);return ma.from(r,t,"fc.oneof")}const n=Q(e,Nf);return ma.from(n,{},"fc.oneof")}const gS=Number.isInteger;function Jt(e){const t=typeof e=="number"?e:e&&e.max!==void 0?e.max:2147483647;if(t<0)throw new Error("fc.nat value should be greater than or equal to 0");if(!gS(t))throw new Error("fc.nat maximum value should be an integer");return new Jn(0,t)}const yS=Object.is;function bS(e){let t=0;const n=[];for(const r of e){const i=t;t=i+r.num;const o=t-1;n.push({from:i,to:o,entry:r})}return n}function wS(e,t){let n=0,r=e.length;for(;r-n>1;){const i=~~((n+r)/2);t<e[i].from?r=i:n=i}return e[n]}function xS(e){const t=bS(e);return function(r){const i=wS(t,r);return i.entry.build(r-i.from)}}function SS(e){const t={mapping:new Zt,negativeZeroIndex:void 0};let n=0;for(let r=0;r!==e.length;++r){const i=e[r];for(let o=0;o!==i.num;++o){const s=i.build(o);s===0&&1/s===Xt.NEGATIVE_INFINITY?t.negativeZeroIndex=n:At(t.mapping,s,n),++n}}return t}function ES(e){let t=null;return function(r){t===null&&(t=SS(e));const i=yS(r,-0)?t.negativeZeroIndex:mt(t.mapping,r);if(i===void 0)throw new D("Unknown value encountered cannot be built using this mapToConstant");return i}}function TS(e){if(e.length===0)throw new D("fc.mapToConstant expects at least one option");let t=0;for(let n=0;n!==e.length;++n){if(e[n].num<0)throw new D("fc.mapToConstant expects all options to have a number of entries greater or equal to zero");t+=e[n].num}if(t===0)throw new D("fc.mapToConstant expects at least one choice among options");return t}function On(...e){return Jt({max:TS(e)-1}).map(xS(e),ES(e))}function Rm(e,t,n,r){if(t.length===0)return n>0?void 0:[];if(r<=0)return;const i=[{endIndexChunks:0,nextStartIndex:1,chunks:[]}];for(;i.length>0;){const o=zp(i);for(let s=o.nextStartIndex;s<=t.length;++s){const c=Te(t,o.endIndexChunks,s);if(e.canShrinkWithoutContext(c)){const a=[...o.chunks,c];if(s===t.length){if(a.length<n)break;return a}N(i,{endIndexChunks:o.endIndexChunks,nextStartIndex:s+1,chunks:o.chunks}),a.length<r&&N(i,{endIndexChunks:s,nextStartIndex:s+1,chunks:a});break}}}}function vS(e){return Se(e,"")}function Lm(e){return e.minLength!==void 0?e.minLength:0}function Dm(e){return e.maxLength!==void 0?e.maxLength:Mn}function AS(e,t){return Lm(t)<=e.length&&e.length<=Dm(t)}function kS(e,t){return function(r){if(typeof r!="string")throw new D("Unsupported value");const i=Rm(e,r,Lm(t),Dm(t));if(i===void 0)throw new D("Unable to unmap received string");return i}}const Bm=["__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__","__proto__","constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf","apply","arguments","bind","call","caller","length","name","prototype","key","ref"];function IS(e,t,n){let r;try{r=n(e)}catch{return}for(const i of r)if(!t.canShrinkWithoutContext(i))return;return r}function CS(e,t){const n=[];for(const r of Bm){const i=IS(r,e,t);i!==void 0&&N(n,i)}return n}const jf=new WeakMap;function _S(e){const t=[];for(const n of Bm){const r=Rm(e,n,0,Mn);r!==void 0&&N(t,r)}return t}function $S(e,t){let n=Fw(jf,e);n===void 0&&(n=_S(e),jw(jf,e,n));const r=[];for(const i of n)AS(i,t)&&N(r,i);return r}const MS=[[0,127]],OS=[[0,55295],[57344,1114111]],PS=[[32,126],[160,172],[174,767],[880,887],[890,895],[900,906],[908],[910,929],[931,1154],[1162,1327],[1329,1366],[1369,1418],[1421,1423],[1470],[1472],[1475],[1478],[1488,1514],[1519,1524],[1542,1551],[1563],[1565,1610],[1632,1647],[1649,1749],[1758],[1765,1766],[1769],[1774,1805],[1808],[1810,1839],[1869,1957],[1969],[1984,2026],[2036,2042],[2046,2069],[2074],[2084],[2088],[2096,2110],[2112,2136],[2142],[2144,2154],[2160,2190],[2208,2249],[2308,2361],[2365],[2384],[2392,2401],[2404,2432],[2437,2444],[2447,2448],[2451,2472],[2474,2480],[2482],[2486,2489],[2493],[2510],[2524,2525],[2527,2529],[2534,2557],[2565,2570],[2575,2576],[2579,2600],[2602,2608],[2610,2611],[2613,2614],[2616,2617],[2649,2652],[2654],[2662,2671],[2674,2676],[2678],[2693,2701],[2703,2705],[2707,2728],[2730,2736],[2738,2739],[2741,2745],[2749],[2768],[2784,2785],[2790,2801],[2809],[2821,2828],[2831,2832],[2835,2856],[2858,2864],[2866,2867],[2869,2873],[2877],[2908,2909],[2911,2913],[2918,2935],[2947],[2949,2954],[2958,2960],[2962,2965],[2969,2970],[2972],[2974,2975],[2979,2980],[2984,2986],[2990,3001],[3024],[3046,3066],[3077,3084],[3086,3088],[3090,3112],[3114,3129],[3133],[3160,3162],[3165],[3168,3169],[3174,3183],[3191,3200],[3204,3212],[3214,3216],[3218,3240],[3242,3251],[3253,3257],[3261],[3293,3294],[3296,3297],[3302,3311],[3313,3314],[3332,3340],[3342,3344],[3346,3386],[3389],[3407],[3412,3414],[3416,3425],[3430,3455],[3461,3478],[3482,3505],[3507,3515],[3517],[3520,3526],[3558,3567],[3572],[3585,3632],[3634],[3647,3654],[3663,3675],[3713,3714],[3716],[3718,3722],[3724,3747],[3749],[3751,3760],[3762],[3773],[3776,3780],[3782],[3792,3801],[3804,3807],[3840,3863],[3866,3892],[3894],[3896],[3898,3901],[3904,3911],[3913,3948],[3973],[3976,3980],[4030,4037],[4039,4044],[4046,4058],[4096,4138],[4159,4181],[4186,4189],[4193],[4197,4198],[4206,4208],[4213,4225],[4238],[4240,4249],[4254,4293],[4295],[4301],[4304,4351],[4608,4680],[4682,4685],[4688,4694],[4696],[4698,4701],[4704,4744],[4746,4749],[4752,4784],[4786,4789],[4792,4798],[4800],[4802,4805],[4808,4822],[4824,4880],[4882,4885],[4888,4954],[4960,4988],[4992,5017],[5024,5109],[5112,5117],[5120,5788],[5792,5880],[5888,5905],[5919,5937],[5941,5942],[5952,5969],[5984,5996],[5998,6e3],[6016,6067],[6100,6108],[6112,6121],[6128,6137],[6144,6154],[6160,6169],[6176,6264],[6272,6276],[6279,6312],[6314],[6320,6389],[6400,6430],[6464],[6468,6509],[6512,6516],[6528,6571],[6576,6601],[6608,6618],[6622,6678],[6686,6740],[6784,6793],[6800,6809],[6816,6829],[6917,6963],[6981,6988],[6992,7018],[7028,7038],[7043,7072],[7086,7141],[7164,7203],[7227,7241],[7245,7304],[7312,7354],[7357,7367],[7379],[7401,7404],[7406,7411],[7413,7414],[7418],[7424,7615],[7680,7957],[7960,7965],[7968,8005],[8008,8013],[8016,8023],[8025],[8027],[8029],[8031,8061],[8064,8116],[8118,8132],[8134,8147],[8150,8155],[8157,8175],[8178,8180],[8182,8190],[8192,8202],[8208,8233],[8239,8287],[8304,8305],[8308,8334],[8336,8348],[8352,8384],[8448,8587],[8592,9254],[9280,9290],[9312,11123],[11126,11157],[11159,11502],[11506,11507],[11513,11557],[11559],[11565],[11568,11623],[11631,11632],[11648,11670],[11680,11686],[11688,11694],[11696,11702],[11704,11710],[11712,11718],[11720,11726],[11728,11734],[11736,11742],[11776,11869],[11904,11929],[11931,12019],[12032,12245],[12272,12329],[12336,12351],[12353,12438],[12443,12543],[12549,12591],[12593,12686],[12688,12771],[12783,12830],[12832,13312],[19903,19968],[40959,42124],[42128,42182],[42192,42539],[42560,42606],[42611],[42622,42653],[42656,42735],[42738,42743],[42752,42954],[42960,42961],[42963],[42965,42969],[42994,43009],[43011,43013],[43015,43018],[43020,43042],[43048,43051],[43056,43065],[43072,43127],[43138,43187],[43214,43225],[43250,43262],[43264,43301],[43310,43334],[43359],[43396,43442],[43457,43469],[43471,43481],[43486,43492],[43494,43518],[43520,43560],[43584,43586],[43588,43595],[43600,43609],[43612,43642],[43646,43695],[43697],[43701,43702],[43705,43709],[43712],[43714],[43739,43754],[43760,43764],[43777,43782],[43785,43790],[43793,43798],[43808,43814],[43816,43822],[43824,43883],[43888,44002],[44011],[44016,44025],[44032],[55203],[63744,64109],[64112,64217],[64256,64262],[64275,64279],[64285],[64287,64310],[64312,64316],[64318],[64320,64321],[64323,64324],[64326,64450],[64467,64911],[64914,64967],[64975],[65008,65023],[65040,65049],[65072,65106],[65108,65126],[65128,65131],[65136,65140],[65142,65276],[65281,65437],[65440,65470],[65474,65479],[65482,65487],[65490,65495],[65498,65500],[65504,65510],[65512,65518],[65532,65533],[65536,65547],[65549,65574],[65576,65594],[65596,65597],[65599,65613],[65616,65629],[65664,65786],[65792,65794],[65799,65843],[65847,65934],[65936,65948],[65952],[66e3,66044],[66176,66204],[66208,66256],[66273,66299],[66304,66339],[66349,66378],[66384,66421],[66432,66461],[66463,66499],[66504,66517],[66560,66717],[66720,66729],[66736,66771],[66776,66811],[66816,66855],[66864,66915],[66927,66938],[66940,66954],[66956,66962],[66964,66965],[66967,66977],[66979,66993],[66995,67001],[67003,67004],[67072,67382],[67392,67413],[67424,67431],[67456,67461],[67463,67504],[67506,67514],[67584,67589],[67592],[67594,67637],[67639,67640],[67644],[67647,67669],[67671,67742],[67751,67759],[67808,67826],[67828,67829],[67835,67867],[67871,67897],[67903],[67968,68023],[68028,68047],[68050,68096],[68112,68115],[68117,68119],[68121,68149],[68160,68168],[68176,68184],[68192,68255],[68288,68324],[68331,68342],[68352,68405],[68409,68437],[68440,68466],[68472,68497],[68505,68508],[68521,68527],[68608,68680],[68736,68786],[68800,68850],[68858,68899],[68912,68921],[69216,69246],[69248,69289],[69293],[69296,69297],[69376,69415],[69424,69445],[69457,69465],[69488,69505],[69510,69513],[69552,69579],[69600,69622],[69635,69687],[69703,69709],[69714,69743],[69745,69746],[69749],[69763,69807],[69819,69820],[69822,69825],[69840,69864],[69872,69881],[69891,69926],[69942,69956],[69959],[69968,70002],[70004,70006],[70019,70066],[70081],[70084,70088],[70093],[70096,70111],[70113,70132],[70144,70161],[70163,70187],[70200,70205],[70207,70208],[70272,70278],[70280],[70282,70285],[70287,70301],[70303,70313],[70320,70366],[70384,70393],[70405,70412],[70415,70416],[70419,70440],[70442,70448],[70450,70451],[70453,70457],[70461],[70480],[70493,70497],[70656,70708],[70727,70747],[70749],[70751,70753],[70784,70831],[70852,70855],[70864,70873],[71040,71086],[71105,71131],[71168,71215],[71233,71236],[71248,71257],[71264,71276],[71296,71338],[71352,71353],[71360,71369],[71424,71450],[71472,71494],[71680,71723],[71739],[71840,71922],[71935,71942],[71945],[71948,71955],[71957,71958],[71960,71983],[72004,72006],[72016,72025],[72096,72103],[72106,72144],[72161,72163],[72192],[72203,72242],[72255,72262],[72272],[72284,72323],[72346,72354],[72368,72440],[72448,72457],[72704,72712],[72714,72750],[72768,72773],[72784,72812],[72816,72847],[72960,72966],[72968,72969],[72971,73008],[73040,73049],[73056,73061],[73063,73064],[73066,73097],[73112],[73120,73129],[73440,73458],[73463,73464],[73476,73488],[73490,73523],[73539,73561],[73648],[73664,73713],[73727,74649],[74752,74862],[74864,74868],[74880,75075],[77712,77810],[77824,78895],[78913,78918],[82944,83526],[92160,92728],[92736,92766],[92768,92777],[92782,92862],[92864,92873],[92880,92909],[92917],[92928,92975],[92983,92997],[93008,93017],[93019,93025],[93027,93047],[93053,93071],[93760,93850],[93952,94026],[94032],[94099,94111],[94176,94179],[94208],[100343],[100352,101589],[101632],[101640],[110576,110579],[110581,110587],[110589,110590],[110592,110882],[110898],[110928,110930],[110933],[110948,110951],[110960,111355],[113664,113770],[113776,113788],[113792,113800],[113808,113817],[113820],[113823],[118608,118723],[118784,119029],[119040,119078],[119081,119140],[119146,119148],[119171,119172],[119180,119209],[119214,119274],[119296,119361],[119365],[119488,119507],[119520,119539],[119552,119638],[119648,119672],[119808,119892],[119894,119964],[119966,119967],[119970],[119973,119974],[119977,119980],[119982,119993],[119995],[119997,120003],[120005,120069],[120071,120074],[120077,120084],[120086,120092],[120094,120121],[120123,120126],[120128,120132],[120134],[120138,120144],[120146,120485],[120488,120779],[120782,121343],[121399,121402],[121453,121460],[121462,121475],[121477,121483],[122624,122654],[122661,122666],[122928,122989],[123136,123180],[123191,123197],[123200,123209],[123214,123215],[123536,123565],[123584,123627],[123632,123641],[123647],[124112,124139],[124144,124153],[124896,124902],[124904,124907],[124909,124910],[124912,124926],[124928,125124],[125127,125135],[125184,125251],[125259],[125264,125273],[125278,125279],[126065,126132],[126209,126269],[126464,126467],[126469,126495],[126497,126498],[126500],[126503],[126505,126514],[126516,126519],[126521],[126523],[126530],[126535],[126537],[126539],[126541,126543],[126545,126546],[126548],[126551],[126553],[126555],[126557],[126559],[126561,126562],[126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[126704,126705],[126976,127019],[127024,127123],[127136,127150],[127153,127167],[127169,127183],[127185,127221],[127232,127405],[127488,127490],[127504,127547],[127552,127560],[127568,127569],[127584,127589],[127744,127994],[128e3,128727],[128732,128748],[128752,128764],[128768,128886],[128891,128985],[128992,129003],[129008],[129024,129035],[129040,129095],[129104,129113],[129120,129159],[129168,129197],[129200,129201],[129280,129619],[129632,129645],[129648,129660],[129664,129672],[129680,129725],[129727,129733],[129742,129755],[129760,129768],[129776,129784],[129792,129938],[129940,129994],[130032,130041],[131072],[173791],[173824],[177977],[177984],[178205],[178208],[183969],[183984],[191456],[191472],[192093],[194560,195101],[196608],[201546],[201552],[205743]],NS=[[192,197],[199,207],[209,214],[217,221],[224,229],[231,239],[241,246],[249,253],[255,271],[274,293],[296,304],[308,311],[313,318],[323,328],[332,337],[340,357],[360,382],[416,417],[431,432],[461,476],[478,483],[486,496],[500,501],[504,539],[542,543],[550,563],[901,902],[904,906],[908],[910,912],[938,944],[970,974],[979,980],[1024,1025],[1027],[1031],[1036,1038],[1049],[1081],[1104,1105],[1107],[1111],[1116,1118],[1142,1143],[1217,1218],[1232,1235],[1238,1239],[1242,1247],[1250,1255],[1258,1269],[1272,1273],[1570,1574],[1728],[1730],[1747],[2345],[2353],[2356],[2392,2399],[2524,2525],[2527],[2611],[2614],[2649,2651],[2654],[2908,2909],[2964],[3907],[3917],[3922],[3927],[3932],[3945],[4134],[6918],[6920],[6922],[6924],[6926],[6930],[7680,7833],[7835],[7840,7929],[7936,7957],[7960,7965],[7968,8005],[8008,8013],[8016,8023],[8025],[8027],[8029],[8031,8048],[8050],[8052],[8054],[8056],[8058],[8060],[8064,8116],[8118,8122],[8124],[8129,8132],[8134,8136],[8138],[8140,8146],[8150,8154],[8157,8162],[8164,8170],[8172,8173],[8178,8180],[8182,8184],[8186],[8188],[8602,8603],[8622],[8653,8655],[8708],[8713],[8716],[8740],[8742],[8769],[8772],[8775],[8777],[8800],[8802],[8813,8817],[8820,8821],[8824,8825],[8832,8833],[8836,8837],[8840,8841],[8876,8879],[8928,8931],[8938,8941],[10972],[12364],[12366],[12368],[12370],[12372],[12374],[12376],[12378],[12380],[12382],[12384],[12386],[12389],[12391],[12393],[12400,12401],[12403,12404],[12406,12407],[12409,12410],[12412,12413],[12436],[12446],[12460],[12462],[12464],[12466],[12468],[12470],[12472],[12474],[12476],[12478],[12480],[12482],[12485],[12487],[12489],[12496,12497],[12499,12500],[12502,12503],[12505,12506],[12508,12509],[12532],[12535,12538],[12542],[44032],[55203],[64285],[64287],[64298,64310],[64312,64316],[64318],[64320,64321],[64323,64324],[64326,64334],[69786],[69788],[69803],[119134,119140],[119227,119232]],Ff=String.fromCodePoint,jS=Math.min,FS=Math.max;function ga(e){if(e.length===1){const n=Ff(e[0]);return{num:1,build:()=>n}}const t=e[0];return{num:e[1]-e[0]+1,build:n=>Ff(t+n)}}function Rf(e,t){const n=[];let r=0,i=0;for(;r<e.length&&i<t.length;){const o=e[r],s=o[0],c=o.length===1?o[0]:o[1],a=t[i],u=a[0],l=a.length===1?a[0]:a[1];if(c<u)r+=1;else if(l<s)i+=1;else{let f=FS(s,u);const h=jS(c,l);if(n.length>=1){const d=n[n.length-1];(d.length===1?d[0]:d[1])+1===f&&(f=d[0],zp(n))}N(n,f===h?[f]:[f,h]),c<=h&&(r+=1),l<=h&&(i+=1)}}return n}const Lf=Object.create(null);function RS(e){switch(e){case"full":return OS;case"ascii":return MS}}function LS(e,t){const n=`${e}:${t}`,r=Lf[n];if(r!==void 0)return r;const i=RS(t),o=e==="binary"?i:Rf(i,PS),s=[];for(const a of o)N(s,ga(a));if(e==="grapheme"){const a=Rf(i,NS);for(const u of a){const l=ga(u);N(s,{num:l.num,build:f=>e2(l.build(f),"NFD")})}}const c=On(...s);return Lf[n]=c,c}function hr(e,t){return LS(e,t)}function DS(e){if(typeof e.unit=="object")return e.unit;switch(e.unit){case"grapheme":return hr("grapheme","full");case"grapheme-composite":return hr("composite","full");case"grapheme-ascii":case void 0:return hr("grapheme","ascii");case"binary":return hr("binary","full");case"binary-ascii":return hr("binary","ascii")}}function be(e={}){const t=DS(e),n=kS(t,e),r=$S(t,e);return ae(t,{...e,experimentalCustomSlices:r}).map(vS,n)}const Um=Map,Sc=String.fromCharCode,Ec={num:26,build:e=>Sc(e+97)},BS={num:26,build:e=>Sc(e+65)},Vm={num:10,build:e=>Sc(e+48)};function US(e){const t=dw(e);return e!==t?t:`%${_r(Hn(e,0),16)}`}function VS(e){if(typeof e!="string")throw new Error("Unsupported");return decodeURIComponent(e)}const qS=()=>be({unit:"binary",minLength:1,maxLength:1}).map(US,VS);let as;function WS(){return as===void 0&&(as=On(Ec)),as}let oi;function ya(e){oi===void 0&&(oi=new Um);let t=mt(oi,e);return t===void 0&&(t=On(Ec,Vm,{num:e.length,build:n=>e[n]}),At(oi,e,t)),t}function zS(e){return On(Ec,BS,Vm,{num:e.length,build:t=>e[t]})}let si;function Tc(e){si===void 0&&(si=new Um);let t=mt(si,e);return t===void 0&&(t=Ce({weight:10,arbitrary:zS(e)},{weight:1,arbitrary:qS()}),At(si,e,t)),t}function Ct(e,t={}){const n=t.freq===void 0?6:t.freq,r=Yp(t,"nil")?t.nil:null,i=[{arbitrary:we(r),weight:1,fallbackValue:{default:r}},{arbitrary:e,weight:n-1}],o={withCrossShrink:!0,depthSize:t.depthSize,maxDepth:t.maxDepth,depthIdentifier:t.depthIdentifier};return ma.from(i,o,"fc.option")}function GS(e){return e.length>63?!1:e.length<4||e[0]!=="x"||e[1]!=="n"||e[2]!=="-"||e[3]!=="-"}const qm=Symbol("adapted-value");function KS(e,t){const n=t(e.value_);return n.adapted?new L(n.value,qm):e}var HS=class extends xe{constructor(e,t){super(),this.sourceArb=e,this.adapter=t,this.adaptValue=n=>KS(n,t)}generate(e,t){const n=this.sourceArb.generate(e,t);return this.adaptValue(n)}canShrinkWithoutContext(e){return this.sourceArb.canShrinkWithoutContext(e)&&!this.adapter(e).adapted}shrink(e,t){return t===qm?this.sourceArb.canShrinkWithoutContext(e)?this.sourceArb.shrink(e,void 0).map(this.adaptValue):J.nil():this.sourceArb.shrink(e,t).map(this.adaptValue)}};function Wm(e,t){return new HS(e,t)}function YS([e,t]){return t===null?e:`${e}${t[0]}${t[1]}`}function JS(e){if(typeof e!="string"||e.length===0)throw new Error("Unsupported");return e.length===1?[e[0],null]:[e[0],[Te(e,1,e.length-1),e[e.length-1]]]}function XS(e){const t=ya("");return H(t,Ct(H(be({unit:ya("-"),size:e,maxLength:61}),t))).map(YS,JS).filter(GS)}function ZS(e){return`${Se(e[0],".")}.${e[1]}`}function QS(e){if(typeof e!="string")throw new Error("Unsupported type");const t=e.lastIndexOf(".");return[rt(Te(e,0,t),"."),Te(e,t+1)]}function eE(e){const[t,n]=e;let r=n.length;for(let i=0;i!==t.length;++i)if(r+=1+t[i].length,r>255)return{adapted:!0,value:[Be(t,0,i),n]};return{adapted:!1,value:e}}function So(e={}){const t=wc(e.size),n=qr("-1",t),r=be({unit:WS(),minLength:2,maxLength:63,size:n});return Wm(H(ae(XS(t),{size:n,minLength:1,maxLength:127}),r),eE).map(ZS,QS)}function tE(e){let t=e[0].length;for(let n=1;n!==e.length;++n)if(t+=1+e[n].length,t>64)return{adapted:!0,value:Be(e,0,n)};return{adapted:!1,value:e}}function nE(e){return Se(e,".")}function rE(e){if(typeof e!="string")throw new Error("Unsupported");return rt(e,".")}function iE(e){return`${e[0]}@${e[1]}`}function oE(e){if(typeof e!="string")throw new Error("Unsupported");return rt(e,"@",2)}function vc(e={}){return H(Wm(ae(be({unit:ya("!#$%&'*+-/=?^_`{|}~"),minLength:1,maxLength:64,size:e.size}),{minLength:1,maxLength:32,size:e.size}),tE).map(nE,rE),So({size:e.size})).map(iE,oE)}const sE=Xt.NEGATIVE_INFINITY,ba=Xt.POSITIVE_INFINITY,zm=Xt.EPSILON,Ac=F(2146435072)*F(4294967296),aE=-Ac-F(1),Df=4503599627370496,cE=F(0xfffffffffffff),Bf=F("9007199254740992"),wa=new Float64Array(1),Uf=new Uint32Array(wa.buffer,wa.byteOffset);function uE(e){return wa[0]=e,[Uf[1],Uf[0]]}function lE(e){const{0:t,1:n}=uE(e),r=t>>>31,i=t>>>20&2047,o=(t&1048575)*4294967296+n,s=i===0?-1022:i-1023;let c=i===0?0:1;return c+=o*zm,c*=r===0?1:-1,{exponent:s,significand:c}}function Vf(e,t){return e===-1022?F(t*Df):F((t-1)*Df)+(F(e+1023)<<F(52))}function kc(e){if(e===ba)return Ac;if(e===sE)return aE;const t=lE(e),n=t.exponent,r=t.significand;return e>0||e===0&&1/e===ba?Vf(n,r):-Vf(n,-r)-F(1)}function xa(e){if(e<0)return-xa(-e-F(1));if(e===Ac)return ba;if(e<Bf)return Xt(e)*2**-1074;const t=e-Bf,n=-1021+Xt(t>>F(52));return(1+Xt(t&cE)*zm)*2**n}const qf=Number.isInteger,Wf=Object.is,cs=Number.NEGATIVE_INFINITY,us=Number.POSITIVE_INFINITY;function Gm(e,t,n,r){const{noDefaultInfinity:i=!1,minExcluded:o=!1,maxExcluded:s=!1,min:c=i?-t:cs,max:a=i?t:us}=e,u=o?c<-n?-r:Math.max(c,-n):c===cs?Math.max(c,-r):Math.max(c,-n),l=s?a>n?r:Math.min(a,n):a===us?Math.min(a,r):Math.min(a,n);return{noDefaultInfinity:!1,minExcluded:o||(c!==cs||o)&&qf(u),maxExcluded:s||(a!==us||s)&&qf(l),min:Wf(u,-0)?0:u,max:Wf(l,0)?-0:l,noNaN:e.noNaN||!1}}const Km=Number.NEGATIVE_INFINITY,Hm=Number.POSITIVE_INFINITY,fE=Number.MAX_VALUE,hE=45035996273704955e-1,Ym=4503599627370496;function dE(e){return Gm(e,fE,hE,Ym)}function pE(e){return e===4503599627370496?Hm:e===-4503599627370496?Km:e}function mE(e){if(typeof e!="number")throw new Error("Unsupported type");return e===Hm?Ym:e===Km?-4503599627370496:e}const gE=Number.isInteger,Jm=Number.isNaN,yE=Number.NEGATIVE_INFINITY,bE=Number.POSITIVE_INFINITY,zf=Number.MAX_VALUE,wE=NaN;function Gf(e,t){if(Jm(e))throw new Error("fc.double constraints."+t+" must be a 64-bit float");return kc(e)}function xE(e){if(typeof e!="number")throw new Error("Unsupported type");return kc(e)}function SE(e){return!gE(e)}function Kf(e){const{noDefaultInfinity:t=!1,noNaN:n=!1,minExcluded:r=!1,maxExcluded:i=!1,min:o=t?-zf:yE,max:s=t?zf:bE}=e,c=Gf(o,"min"),a=r?c+F(1):c,u=Gf(s,"max"),l=i?u-F(1):u;if(l<a)throw new Error("fc.double constraints.min must be smaller or equal to constraints.max");if(n)return en({min:a,max:l}).map(xa,xE);const f=l>F(0),h=f?a:a-F(1),d=f?l+F(1):l;return en({min:h,max:d}).map(m=>l<m||m<a?wE:xa(m),m=>{if(typeof m!="number")throw new Error("Unsupported type");return Jm(m)?l!==d?d:h:kc(m)})}function Wr(e={}){return e.noInteger?Kf(dE(e)).map(pE,mE).filter(SE):Kf(e)}const EE=Number.NEGATIVE_INFINITY,Sa=Number.POSITIVE_INFINITY,TE=Math.imul,Ea=2**127*(1+(2**23-1)/2**23),Xm=2139095040,vE=-2139095041,Ta=new Float32Array(1),AE=new Uint32Array(Ta.buffer,Ta.byteOffset);function kE(e){return Ta[0]=e,AE[0]}function IE(e){const t=kE(e),n=t>>>31,r=t>>>23&255,i=t&8388607,o=r===0?-126:r-127;let s=r===0?0:1;return s+=i/2**23,s*=n===0?1:-1,{exponent:o,significand:s}}function Hf(e,t){return e===-126?t*8388608:TE(e+127,8388608)+(t-1)*8388608}function Ic(e){if(e===Sa)return Xm;if(e===EE)return vE;const t=IE(e),n=t.exponent,r=t.significand;return e>0||e===0&&1/e===Sa?Hf(n,r):-Hf(n,-r)-1}function va(e){if(e<0)return-va(-e-1);if(e===Xm)return Sa;if(e<16777216)return e*2**-149;const t=e-16777216,n=-125+(t>>23);return(1+(t&8388607)/8388608)*2**n}const Zm=Number.NEGATIVE_INFINITY,Qm=Number.POSITIVE_INFINITY,CE=Ea,_E=83886075e-1,eg=8388608;function $E(e){return Gm(e,CE,_E,eg)}function ME(e){return e===8388608?Qm:e===-8388608?Zm:e}function OE(e){if(typeof e!="number")throw new Error("Unsupported type");return e===Qm?eg:e===Zm?-8388608:e}const PE=Number.isInteger,tg=Number.isNaN,NE=Math.fround,jE=Number.NEGATIVE_INFINITY,FE=Number.POSITIVE_INFINITY,RE=NaN;function Yf(e,t){const n="fc.float constraints."+t+" must be a 32-bit float - you can convert any double to a 32-bit float by using `Math.fround(myDouble)`";if(tg(e)||NE(e)!==e)throw new Error(n);return Ic(e)}function LE(e){if(typeof e!="number")throw new Error("Unsupported type");return Ic(e)}function DE(e){return!PE(e)}function Jf(e){const{noDefaultInfinity:t=!1,noNaN:n=!1,minExcluded:r=!1,maxExcluded:i=!1,min:o=t?-Ea:jE,max:s=t?Ea:FE}=e,c=Yf(o,"min"),a=r?c+1:c,u=Yf(s,"max"),l=i?u-1:u;if(a>l)throw new Error("fc.float constraints.min must be smaller or equal to constraints.max");if(n)return W({min:a,max:l}).map(va,LE);const f=l>0?a:a-1,h=l>0?l+1:l;return W({min:f,max:h}).map(d=>d>l||d<a?RE:va(d),d=>{if(typeof d!="number")throw new Error("Unsupported type");return tg(d)?l!==h?h:f:Ic(d)})}function Eo(e={}){return e.noInteger?Jf($E(e)).map(ME,OE).filter(DE):Jf(e)}function BE(e){return e.replace(/([$`\\])/g,"\\$1").replace(/\r/g,"\\r")}function ng(e){return e.replace(/\*\//g,"*\\/")}const lt=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];function Pr(e){let t=4294967295;for(let n=0;n<e.length;++n){const r=Hn(e,n);if(r<128)t=lt[t&255^r]^t>>8;else if(r<2048)t=lt[t&255^(192|r>>6&31)]^t>>8,t=lt[t&255^(128|r&63)]^t>>8;else if(r>=55296&&r<57344){const i=Hn(e,++n);if(r>=56320||i<56320||i>57343||Number.isNaN(i))n-=1,t=lt[t&255^239]^t>>8,t=lt[t&255^191]^t>>8,t=lt[t&255^189]^t>>8;else{const o=(r&1023)+64,s=i&1023;t=lt[t&255^(240|o>>8&7)]^t>>8,t=lt[t&255^(128|o>>2&63)]^t>>8,t=lt[t&255^(128|s>>6&15|(o&3)<<4)]^t>>8,t=lt[t&255^(128|s&63)]^t>>8}}else t=lt[t&255^(224|r>>12&15)]^t>>8,t=lt[t&255^(128|r>>6&63)]^t>>8,t=lt[t&255^(128|r&63)]^t>>8}return(t|0)+2147483648}const UE=Object.getPrototypeOf;var dr=class extends xe{constructor(e){super(),this.arb=e}generate(e,t){return this.arb.generate(e,t)}canShrinkWithoutContext(e){return this.arb.canShrinkWithoutContext(e)}shrink(e,t){return J.nil()}};function Nr(e){return UE(e)===dr.prototype&&e.generate===dr.prototype.generate&&e.canShrinkWithoutContext===dr.prototype.canShrinkWithoutContext&&e.shrink===dr.prototype.shrink?e:new dr(e)}const VE=Object.assign,qE=Object.keys;function rg(e){return H(Nr(W()),Nr(W({min:1,max:4294967295}))).map(([t,n])=>{const r=()=>{const i={};return VE((s,c)=>{const a=ve(s),u=ve(c),l=e(Pr(`${t}${a}`)%n,Pr(`${t}${u}`)%n);return i[`[${a},${u}]`]=l,l},{toString:()=>{const s=qE(i).sort().map(c=>`${c} => ${ve(i[c])}`).map(c=>`/* ${ng(c)} */`);return`function(a, b) {
|
|
20
20
|
// With hash and stringify coming from fast-check${s.length!==0?`
|
|
21
21
|
${Se(s,`
|
|
22
22
|
`)}`:""}
|
|
@@ -24,18 +24,18 @@ ${x2(i)}`),o}function uc(e){return aa(e,ke)}async function lc(e){const t=[];func
|
|
|
24
24
|
const hA = hash('${t}' + stringify(a)) % ${n};
|
|
25
25
|
const hB = hash('${t}' + stringify(b)) % ${n};
|
|
26
26
|
return cmp(hA, hB);
|
|
27
|
-
}`},[Fe]:r})};return r()})}const
|
|
27
|
+
}`},[Fe]:r})};return r()})}const WE=Object.assign;function ig(){return rg(WE((e,t)=>e<t,{toString(){return"(hA, hB) => hA < hB"}}))}const zE=Object.assign;function og(){return rg(zE((e,t)=>e-t,{toString(){return"(hA, hB) => hA - hB"}}))}const GE=Object.defineProperties,KE=Object.keys;function sg(e){return H(ae(e,{minLength:1}),Nr(W())).map(([t,n])=>{const r=()=>{const i={},o=(...c)=>{const a=ve(c),u=t[Pr(`${n}${a}`)%t.length];return i[a]=u,yn(u)?u[Fe]():u};function s(c){const a=Q(Q(Kp(KE(i)),u=>`${u} => ${ve(i[u])}`),u=>`/* ${ng(u)} */`);return`function(...args) {
|
|
28
28
|
// With hash and stringify coming from fast-check${a.length!==0?`
|
|
29
29
|
${a.join(`
|
|
30
30
|
`)}`:""}
|
|
31
31
|
const outs = ${c};
|
|
32
32
|
return outs[hash('${n}' + stringify(args)) % outs.length];
|
|
33
|
-
}`}return wE(o,{toString:{value:()=>s(ke(t))},[bt]:{value:()=>s(ke(t))},[Lt]:{value:async()=>s(await co(t))},[Fe]:{value:r,configurable:!0}})};return r()})}const SE=Number.MIN_SAFE_INTEGER,EE=Number.MAX_SAFE_INTEGER;function Sc(){return new Hn(SE,EE)}const TE=Number.MAX_SAFE_INTEGER;function Ym(){return new Hn(0,TE)}const vE=Number.parseInt;function AE(e){const[t,n]=e;switch(t){case"oct":return`0${Ir(n,8)}`;case"hex":return`0x${Ir(n,16)}`;default:return`${n}`}}function Ei(e,t){const n=vE(e,t);if(Ir(n,t)!==e)throw new Error("Invalid value");return n}function IE(e){if(typeof e!="string")throw new Error("Invalid type");return e.length>=2&&e[0]==="0"?e[1]==="x"?["hex",Ei(Te(e,2),16)]:["oct",Ei(Te(e,1),8)]:["dec",Ei(e,10)]}function kE(e){return Se(e,".")}function CE(e){if(typeof e!="string")throw new Error("Invalid type");return Q(tt(e,"."),t=>Ei(t,10))}function bo(){return H(Kt(255),Kt(255),Kt(255),Kt(255)).map(kE,CE)}function Pt(e){return H(je("dec","oct","hex"),Kt(e)).map(AE,IE)}function os(e){return Se(e,".")}function ss(e){if(typeof e!="string")throw new Error("Invalid type");return tt(e,".")}function Ec(){return Ce(H(Pt(255),Pt(255),Pt(255),Pt(255)).map(os,ss),H(Pt(255),Pt(255),Pt(65535)).map(os,ss),H(Pt(255),Pt(16777215)).map(os,ss),Pt(4294967295))}function Tc(e){return e.length===0?[]:tt(e,":")}function vc(e){const t=tt(e,":");return t.length>=2&&t[t.length-1].length<=4?[De(t,0,t.length-2),`${t[t.length-2]}:${t[t.length-1]}`]:[De(t,0,t.length-1),t[t.length-1]]}function _E(e){return`${Se(e[0],":")}:${e[1]}`}function $E(e){if(typeof e!="string")throw new Error("Invalid type");return vc(e)}function ME(e){return`::${Se(e[0],":")}:${e[1]}`}function OE(e){if(typeof e!="string")throw new Error("Invalid type");if(!_w(e,"::"))throw new Error("Invalid value");return vc(Te(e,2))}function Ti(e){return`${Se(e[0],":")}::${Se(e[1],":")}:${e[2]}`}function vi(e){if(typeof e!="string")throw new Error("Invalid type");const[t,n]=tt(e,"::",2),[r,i]=vc(n);return[Tc(t),r,i]}function PE(e){return Ti([e[0],[e[1]],e[2]])}function NE(e){const t=vi(e);return[t[0],Se(t[1],":"),t[2]]}function Wf(e){return`${Se(e[0],":")}::${e[1]}`}function zf(e){if(typeof e!="string")throw new Error("Invalid type");const[t,n]=tt(e,"::",2);return[Tc(t),n]}function jE(e){return`${Se(e[0],":")}::`}function FE(e){if(typeof e!="string")throw new Error("Invalid type");if(!$w(e,"::"))throw new Error("Invalid value");return[Tc(Te(e,0,e.length-2))]}function RE([e,t]){return`${e}:${t}`}function LE(e){if(typeof e!="string")throw new U("Invalid type");if(!e.includes(":"))throw new U("Invalid value");return e.split(":",2)}const DE="0123456789abcdef";let as;function BE(){return as===void 0&&(as=W({min:0,max:15}).map(e=>DE[e],e=>{if(typeof e!="string")throw new U("Not a string");if(e.length!==1)throw new U("Invalid length");const t=Gn(e,0);if(t<=57)return t-48;if(t<97)throw new U("Invalid character");return t-87})),as}function Ac(){const e=be({unit:BE(),minLength:1,maxLength:4,size:"max"}),t=Ce(H(e,e).map(RE,LE),bo());return Ce(H(ae(e,{minLength:6,maxLength:6,size:"max"}),t).map(_E,$E),H(ae(e,{minLength:5,maxLength:5,size:"max"}),t).map(ME,OE),H(ae(e,{minLength:0,maxLength:1,size:"max"}),ae(e,{minLength:4,maxLength:4,size:"max"}),t).map(Ti,vi),H(ae(e,{minLength:0,maxLength:2,size:"max"}),ae(e,{minLength:3,maxLength:3,size:"max"}),t).map(Ti,vi),H(ae(e,{minLength:0,maxLength:3,size:"max"}),ae(e,{minLength:2,maxLength:2,size:"max"}),t).map(Ti,vi),H(ae(e,{minLength:0,maxLength:4,size:"max"}),e,t).map(PE,NE),H(ae(e,{minLength:0,maxLength:5,size:"max"}),t).map(Wf,zf),H(ae(e,{minLength:0,maxLength:6,size:"max"}),e).map(Wf,zf),H(ae(e,{minLength:0,maxLength:7,size:"max"})).map(jE,FE))}var UE=class extends xe{constructor(e){super(),this.name=e,this.underlying=null}generate(e,t){if(this.underlying===null)throw new Error(`Lazy arbitrary ${JSON.stringify(this.name)} not correctly initialized`);return this.underlying.generate(e,t)}canShrinkWithoutContext(e){if(this.underlying===null)throw new Error(`Lazy arbitrary ${JSON.stringify(this.name)} not correctly initialized`);return this.underlying.canShrinkWithoutContext(e)}shrink(e,t){if(this.underlying===null)throw new Error(`Lazy arbitrary ${JSON.stringify(this.name)} not correctly initialized`);return this.underlying.shrink(e,t)}};const VE=Object.getOwnPropertyNames;function qE(){const e=new Yt;return n=>{let r=dt(e,n);return r!==void 0||(r=new UE(String(n)),Et(e,n,r)),r}}function Ic(e){const t=qE(),n=e(t),r=VE(n);for(const i of r){const o=t(i);o.underlying=n[i]}return n}function WE(e,t){for(const n of e){const r=t[n]||{};if(r.maxLength===void 0||r.maxLength>0)return!0}return!1}function zE(e,t){if(e.length===0)return we([]);if(!WE(e,t))throw new U("Contraints on pool must accept at least one entity, maxLength cannot sum to 0");return H(...e.map(n=>ae(we(n),t[n]))).map(n=>iw(n)).filter(n=>n.length>0)}const Gf=Object.assign,Ai=Object.create,Jm=Object.defineProperty,Kf=Object.getPrototypeOf,GE=Object.prototype;function KE(e){return Jm(Ai(null),bt,{configurable:!1,enumerable:!1,writable:!1,value:()=>e})}function Hf(e,t){return KE(`<${et(e)}#${t}>`)}function HE(e,t){const n=Ai(GE);for(const r in e){const i=e[r],o=[];for(const s of i){const c=Gf(Ai(Kf(s)),s);o.push(c)}n[r]=o}for(const r in t){const i=t[r];for(let o=0;o!==i.length;++o){const s=i[o],c=n[r][o];for(const a in s){const u=s[a];c[a]=u.index===void 0?void 0:typeof u.index=="number"?n[u.type][u.index]:Q(u.index,l=>n[u.type][l])}Jm(c,bt,{configurable:!1,enumerable:!1,writable:!1,value:()=>{const a=e[r][o],u=Gf(Ai(Kf(a)),a);for(const l in s){const f=s[l];u[l]=f.index===void 0?void 0:typeof f.index=="number"?Hf(f.type,f.index):Q(f.index,h=>Hf(f.type,h))}return ke(u)}})}}return n}function YE(e){let t=0;const n=new Yt;for(const i in e){const o=e[i];for(const s in o){const c=o[s];if(c.arity!=="inverse")continue;let a=dt(n,c.type);if(a===void 0&&(a=new Yt,Et(n,c.type,a)),bw(a,c.forwardRelationship))throw new U(`Cannot declare multiple inverse relationships for the same forward relationship ${et(c.forwardRelationship)} on type ${et(c.type)}`);Et(a,c.forwardRelationship,{type:i,property:s}),t+=1}}const r=new Yt;if(t===0)return r;for(const i in e){const o=e[i],s=dt(n,i);if(s!==void 0)for(const c in o){const a=o[c];if(a.arity==="inverse")continue;const u=dt(s,c);if(u!==void 0){if(u.type!==a.type)throw new U(`Inverse relationship ${et(u.property)} on type ${et(u.type)} references forward relationship ${et(c)} but types do not match`);Et(r,a,u)}}}if(r.size!==t)throw new U("Some inverse relationships could not be matched with their corresponding forward relationships");return r}const Yf=Object.assign,Li=Object.create;function JE(e,t,n){switch(e){case"exclusive":return we(n);case"successor":return _r(W({min:t!==void 0?t+1:0,max:n}));case"any":return _r(W({min:0,max:n}))}}function XE(e,t,n,r,i){const o=JE(t,n,r);switch(e){case"0-1":return At(o,{nil:void 0,depthIdentifier:i});case"1":return o;case"many":{let s=0;return At(Qt(o,{depthIdentifier:i,selector:c=>c===r?c+ ++s:c,minLength:1}),{nil:[],depthIdentifier:i}).map(c=>{let a=0;return Q(c,u=>u===r?u+a++:u)})}}}function Xm(e,t){const n=Li(null),r=e[t];for(const i in r){const o=r[i];o.arity==="inverse"&&(n[i]={type:o.type,index:[]})}return n}function ZE(e){const t=new vt,n=new vt;for(const r in e){const i=e[r];for(const o in i){const s=i[o];if(s.arity!=="inverse"){if(s.strategy==="exclusive"){if(ln(t,s.type))throw new U(`Cannot mix exclusive with other strategies for type ${et(s.type)}`);Ar(n,s.type)}else{if(ln(n,s.type))throw new U(`Cannot mix exclusive with other strategies for type ${et(s.type)}`);Ar(t,s.type)}if(s.strategy==="successor"&&s.type!==r)throw new U("Cannot mix types for the strategy successor");if(s.strategy==="successor"&&s.arity==="1")throw new U("Cannot use an arity of 1 for the strategy successor")}}}}function QE(e,t){const{producedLinks:n,toBeProducedEntities:r}=e,i=e.nextIndex+t,o=Yf(Li(null),n);function s(f){return o[f]===n[f]&&(o[f]=De(n[f])),o[f]}function c(f,h){const d=s(f);return d[h]===n[f][h]&&(d[h]=Yf(Li(null),n[f][h])),d[h]}function a(f,h,d){const m=c(f,h),p=n[f][h];if(p!==void 0&&m[d]===p[d]){const y=m[d];m[d]={type:y.type,index:typeof y.index=="object"?De(y.index):y.index}}return m[d]}let u;const l=r[i];return{setOutboundLink:(f,h)=>{const d=c(l.type,l.indexInType);d[f]=h},enqueueNewEntity:(f,h)=>{const d=s(h),m=d.length;return u===void 0&&(u=De(r)),N(u,{type:h,indexInType:m,depth:l.depth+1}),N(d,Xm(f,h)),m},appendBackReference:(f,h,d)=>{const m=a(f,h,d).index;N(m,l.indexInType)},commit:()=>({producedLinks:o,toBeProducedEntities:u!==void 0?u:r,nextIndex:i+1})}}function eT(e,t){const n=Li(null);for(const i in e)n[i]=[];const r=[];for(const i of t)N(r,{type:i,indexInType:n[i].length,depth:0}),N(n[i],Xm(e,i));return{producedLinks:n,toBeProducedEntities:r,nextIndex:0}}function tT(e,t,n,r){const i=n.producedLinks,o=n.toBeProducedEntities[n.nextIndex+r],s=e[o.type],c=ho();c.depth=o.depth;const a=[],u=[];for(const l in s){const f=s[l];if(f.arity==="inverse")continue;const h=f.type,d=i[h].length;N(a,XE(f.arity,f.strategy||"any",h===o.type?o.indexInType:void 0,d,c)),N(u,{name:l,relation:f,sentinelLinkIndex:d})}if(a.length!==0)return H(...a).map(l=>{const f=QE(n,r);for(let h=0;h!==l.length;++h){const d=l[h],{name:m,relation:p,sentinelLinkIndex:y}=u[h],x=[],T=d===void 0?[]:typeof d=="number"?[d]:d;for(const O of T){let k;O>=y?k=f.enqueueNewEntity(e,p.type):k=O,N(x,k);const _=dt(t,p);_!==void 0&&f.appendBackReference(p.type,k,_.property)}f.setOutboundLink(m,{type:p.type,index:d===void 0?void 0:typeof d=="number"?x[0]:x})}return f.commit()})}function nT(e,t){ZE(e);const n=YE(e);return dc(we(eT(e,t)),r=>{if(r.nextIndex>=r.toBeProducedEntities.length)return;let i=0,o;for(;o===void 0&&r.nextIndex+i<r.toBeProducedEntities.length;)o=tT(e,n,r,i),i+=1;return o}).map(r=>r.producedLinks)}const rT=Object.keys,iT=Object.getOwnPropertySymbols,oT=Object.getOwnPropertyDescriptor;function sT(e){const t=rT(e),n=iT(e);for(let r=0;r!==n.length;++r){const i=n[r],o=oT(e,i);o&&o.enumerable&&t.push(i)}return t}const aT=Object.create,cT=Object.defineProperty,uT=Object.getOwnPropertyDescriptor,lT=Object.getOwnPropertyNames,fT=Object.getOwnPropertySymbols;function hT(e,t){return function(r){const i=r[r.length-1]?aT(null):{};for(let o=0;o!==e.length;++o){const s=r[o];if(s!==t){const c=e[o];c==="__proto__"?cT(i,c,{value:s,configurable:!0,enumerable:!0,writable:!0}):i[c]=s}}return i}}function dT(e,t){return function(r){if(typeof r!="object"||r===null)throw new Error("Incompatible instance received: should be a non-null object");const i=Object.getPrototypeOf(r)===null,o="constructor"in r&&r.constructor===Object;if(!i&&!o)throw new Error("Incompatible instance received: should be of exact type Object");let s=0;const c=[];for(let l=0;l!==e.length;++l){const f=uT(r,e[l]);if(f!==void 0){if(!f.configurable||!f.enumerable||!f.writable)throw new Error("Incompatible instance received: should contain only c/e/w properties");if(f.get!==void 0||f.set!==void 0)throw new Error("Incompatible instance received: should contain only no get/set properties");++s,N(c,f.value)}else N(c,t)}const a=lT(r).length,u=fT(r).length;if(s!==a+u)throw new Error("Incompatible instance received: should not contain extra properties");return[...c,i]}}const cs=Symbol("no-key");function us(e,t,n){const r=sT(e),i=[];for(let o=0;o!==r.length;++o){const s=r[o],c=e[s];t===void 0||vr(t,s)!==-1?N(i,c):N(i,At(c,{nil:cs}))}return H(...i,n?we(!1):Ft()).map(hT(r,cs),dT(r,cs))}function zt(e,t){const n=t!==void 0&&!!t.noNullPrototype;if(t===void 0||!("requiredKeys"in t&&t.requiredKeys!==void 0))return us(e,void 0,n);const r=("requiredKeys"in t?t.requiredKeys:void 0)||[];for(let i=0;i!==r.length;++i){const o=Object.getOwnPropertyDescriptor(e,r[i]);if(o===void 0)throw new Error("requiredKeys cannot reference keys that have not been defined in recordModel");if(!o.enumerable)throw new Error("requiredKeys cannot reference keys that are not enumerable in recordModel")}return us(e,r,n)}const pT=Object.create;function mT(e,t,n,r){const i=pT(null);for(const o in e){const s=e[o],c=zt(s,r),a=t(o),u=n(o),l={minLength:a,maxLength:a};i[o]=u!==void 0?Qt(c,{...l,selector:u}):ae(c,l)}return zt(i)}const Jf=Object.create,gT=Object.keys;function Zm(e,t,n={}){const r=gT(e),i=n.initialPoolConstraints||Jf(null),o=n.unicityConstraints||Jf(null),s={noNullPrototype:n.noNullPrototype};return zE(r,i).chain(c=>nT(t,c).chain(a=>mT(e,u=>a[u].length,u=>o[u],s).map(u=>HE(u,a))))}function yT(e){return Se(Q(e,t=>t[t.length-1]===","?Te(t,0,t.length-1):t)," ")}function bT(e){return function(n){if(typeof n!="string")throw new Error("Unsupported type");const r=[];for(const i of tt(n," "))if(e.canShrinkWithoutContext(i))N(r,i);else if(e.canShrinkWithoutContext(i+","))N(r,i+",");else throw new Error("Unsupported word");return r}}function wT(e){let t=Se(e," ");return t[t.length-1]===","&&(t=Te(t,0,t.length-1)),rc(t[0])+Te(t,1)+"."}function xT(e){return function(n){if(typeof n!="string")throw new Error("Unsupported type");if(n.length<2||n[n.length-1]!=="."||n[n.length-2]===","||rc(ia(n[0]))!==n[0])throw new Error("Unsupported value");const r=ia(n[0])+Te(n,1,n.length-1),i=[],o=tt(r," ");for(let s=0;s!==o.length;++s){const c=o[s];if(e.canShrinkWithoutContext(c))N(i,c);else if(s===o.length-1&&e.canShrinkWithoutContext(c+","))N(i,c+",");else throw new Error("Unsupported word")}return i}}function ST(e){return Se(e," ")}function ET(e){if(typeof e!="string")throw new Error("Unsupported type");const t=tt(e,". ");for(let n=0;n<t.length-1;++n)t[n]+=".";return t}const I=(e,t)=>({arbitrary:we(e),weight:t});function TT(){return Ce(I("non",6),I("adipiscing",5),I("ligula",5),I("enim",5),I("pellentesque",5),I("in",5),I("augue",5),I("et",5),I("nulla",5),I("lorem",4),I("sit",4),I("sed",4),I("diam",4),I("fermentum",4),I("ut",4),I("eu",4),I("aliquam",4),I("mauris",4),I("vitae",4),I("felis",4),I("ipsum",3),I("dolor",3),I("amet,",3),I("elit",3),I("euismod",3),I("mi",3),I("orci",3),I("erat",3),I("praesent",3),I("egestas",3),I("leo",3),I("vel",3),I("sapien",3),I("integer",3),I("curabitur",3),I("convallis",3),I("purus",3),I("risus",2),I("suspendisse",2),I("lectus",2),I("nec,",2),I("ultricies",2),I("sed,",2),I("cras",2),I("elementum",2),I("ultrices",2),I("maecenas",2),I("massa,",2),I("varius",2),I("a,",2),I("semper",2),I("proin",2),I("nec",2),I("nisl",2),I("amet",2),I("duis",2),I("congue",2),I("libero",2),I("vestibulum",2),I("pede",2),I("blandit",2),I("sodales",2),I("ante",2),I("nibh",2),I("ac",2),I("aenean",2),I("massa",2),I("suscipit",2),I("sollicitudin",2),I("fusce",2),I("tempus",2),I("aliquam,",2),I("nunc",2),I("ullamcorper",2),I("rhoncus",2),I("metus",2),I("faucibus,",2),I("justo",2),I("magna",2),I("at",2),I("tincidunt",2),I("consectetur",1),I("tortor,",1),I("dignissim",1),I("congue,",1),I("non,",1),I("porttitor,",1),I("nonummy",1),I("molestie,",1),I("est",1),I("eleifend",1),I("mi,",1),I("arcu",1),I("scelerisque",1),I("vitae,",1),I("consequat",1),I("in,",1),I("pretium",1),I("volutpat",1),I("pharetra",1),I("tempor",1),I("bibendum",1),I("odio",1),I("dui",1),I("primis",1),I("faucibus",1),I("luctus",1),I("posuere",1),I("cubilia",1),I("curae,",1),I("hendrerit",1),I("velit",1),I("mauris,",1),I("gravida",1),I("ornare",1),I("ut,",1),I("pulvinar",1),I("varius,",1),I("turpis",1),I("nibh,",1),I("eros",1),I("id",1),I("aliquet",1),I("quis",1),I("lobortis",1),I("consectetuer",1),I("morbi",1),I("vehicula",1),I("tortor",1),I("tellus,",1),I("id,",1),I("eu,",1),I("quam",1),I("feugiat,",1),I("posuere,",1),I("iaculis",1),I("lectus,",1),I("tristique",1),I("mollis,",1),I("nisl,",1),I("vulputate",1),I("sem",1),I("vivamus",1),I("placerat",1),I("imperdiet",1),I("cursus",1),I("rutrum",1),I("iaculis,",1),I("augue,",1),I("lacus",1))}function Qm(e={}){const{maxCount:t,mode:n="words",size:r}=e;if(t!==void 0&&t<1)throw new Error("lorem has to produce at least one word/sentence");const i=TT();return n==="sentences"?ae(ae(i,{minLength:1,size:"small"}).map(wT,xT(i)),{minLength:1,maxLength:t,size:r}).map(ST,ET):ae(i,{minLength:1,maxLength:t,size:r}).map(yT,bT(i))}function vT(e){return new Map(e)}function AT(e){if(typeof e!="object"||e===null)throw new Error("Incompatible instance received: should be a non-null object");if(!("constructor"in e)||e.constructor!==Map)throw new Error("Incompatible instance received: should be of exact type Map");return Array.from(e)}function IT(e){return e[0]}function Di(e,t,n={}){return Qt(H(e,t),{minLength:n.minKeys,maxLength:n.maxKeys,size:n.size,selector:IT,depthIdentifier:n.depthIdentifier,comparator:"SameValueZero"}).map(vT,AT)}let ii=10;function eg(e){const t={};return(n=>{const r=n!==void 0?n:ii;if(!Bp(t,r)){const i=ii;ii=r-1,t[r]=e(r),ii=i}return t[r]})}function kT(e){let t=0;for(;e>F(0);)e&F(1)&&++t,e>>=F(1);return t}function CT(e,t){const n=(F(1)<<F(t))-F(1),r=e&n;let i=kT(e-r),o=r;for(let s=F(1);s<=n&&i!==0;s<<=F(1))o&s||(o|=s,--i);return o}function oi(e,t){const n=[];for(let r=e.length-1;r!==-1;--r)t(e[r])!==e[r]&&N(n,r);return n}function _T(e,t,n){let r=F(0);for(let i=0,o=F(1);i!==n.length;++i,o<<=F(1))e[n[i]]!==t[n[i]]&&(r|=o);return r}function ls(e,t,n,r){for(let i=0,o=F(1);i!==n.length;++i,o<<=F(1))t&o&&(e[n[i]]=r(e[n[i]]))}var $T=class extends xe{constructor(e,t,n){super(),this.stringArb=e,this.toggleCase=t,this.untoggleAll=n}buildContextFor(e,t){return{rawString:e.value,rawStringContext:e.context,flags:t.value,flagsContext:t.context}}generate(e,t){const n=this.stringArb.generate(e,t),r=[...n.value],i=oi(r,this.toggleCase),o=Xt(F(0),(F(1)<<F(i.length))-F(1)).generate(e,void 0);return ls(r,o.value,i,this.toggleCase),new L(Se(r,""),this.buildContextFor(n,o))}canShrinkWithoutContext(e){return typeof e!="string"?!1:this.untoggleAll!==void 0?this.stringArb.canShrinkWithoutContext(this.untoggleAll(e)):this.stringArb.canShrinkWithoutContext(e)}shrink(e,t){let n;if(t!==void 0)n=t;else if(this.untoggleAll!==void 0){const o=this.untoggleAll(e),s=[...e],c=[...o];n={rawString:o,rawStringContext:void 0,flags:_T(c,s,oi(c,this.toggleCase)),flagsContext:void 0}}else n={rawString:e,rawStringContext:void 0,flags:F(0),flagsContext:void 0};const r=n.rawString,i=n.flags;return this.stringArb.shrink(r,n.rawStringContext).map(o=>{const s=[...o.value],c=oi(s,this.toggleCase),a=CT(i,c.length);return ls(s,a,c,this.toggleCase),new L(Se(s,""),this.buildContextFor(o,new L(a,void 0)))}).join(fn(()=>{const o=[...r],s=oi(o,this.toggleCase);return Xt(F(0),(F(1)<<F(s.length))-F(1)).shrink(i,n.flagsContext).map(c=>{const a=De(o);return ls(a,c.value,s,this.toggleCase),new L(Se(a,""),this.buildContextFor(new L(r,n.rawStringContext),c))})}))}};function MT(e){const t=rc(e);return t!==e?t:ia(e)}function tg(e,t){return new $T(e,t&&t.toggleCase||MT,t&&t.untoggleAll)}function OT(e){return Pp.from(e)}function PT(e){if(!(e instanceof Pp))throw new Error("Unexpected type");return[...e]}function kc(e={}){return ae(yo(e),e).map(OT,PT)}function NT(e){return Np.from(e)}function jT(e){if(!(e instanceof Np))throw new Error("Unexpected type");return[...e]}function Cc(e={}){return ae(Ur(e),e).map(NT,jT)}function en(e,t,n,r,i){const o=r.name,{min:s=t,max:c=n,...a}=e;if(s>c)throw new Error(`Invalid range passed to ${o}: min must be lower than or equal to max`);if(s<t)throw new Error(`Invalid min value passed to ${o}: min must be greater than or equal to ${t}`);if(c>n)throw new Error(`Invalid max value passed to ${o}: max must be lower than or equal to ${n}`);return ae(i({min:s,max:c}),a).map(u=>r.from(u),u=>{if(!(u instanceof r))throw new Error("Invalid type");return[...u]})}function _c(e={}){return en(e,-32768,32767,D0,W)}function $c(e={}){return en(e,-2147483648,2147483647,B0,W)}function Mc(e={}){return en(e,-128,127,L0,W)}function Oc(e={}){return en(e,0,65535,q0,W)}function Pc(e={}){return en(e,0,4294967295,W0,W)}function Nc(e={}){return en(e,0,255,U0,W)}function jc(e={}){return en(e,0,255,V0,W)}function FT(e){return e!==void 0}function Xf(e){return e.hasToBeCloned?new L(e.value_,{generatorContext:e.context},()=>e.value):new L(e.value_,{generatorContext:e.context})}function Zf(e){return e.hasToBeCloned?new L(e.value_,{shrinkerContext:e.context},()=>e.value):new L(e.value_,{shrinkerContext:e.context})}var RT=class extends xe{constructor(e,t){super(),this.generatorArbitrary=e,this.shrinkerArbitrary=t}generate(e,t){return Xf(this.generatorArbitrary.generate(e,t))}canShrinkWithoutContext(e){return this.shrinkerArbitrary.canShrinkWithoutContext(e)}shrink(e,t){return FT(t)?"generatorContext"in t?this.generatorArbitrary.shrink(e,t.generatorContext).map(Xf):this.shrinkerArbitrary.shrink(e,t.shrinkerContext).map(Zf):this.shrinkerArbitrary.shrink(e,void 0).map(Zf)}};function wa(e,t,n){const r=W({min:e,max:t});return t===n?r:new RT(r,W({min:e,max:n}))}const LT=Math.min,xa=Math.max,Qf=Mp.isArray,DT=Object.entries;function BT(e){let t=-1;for(let n=0;n!==e.length;++n)t=xa(t,e[n][0]);return t}function UT(e,t){const n=Mp(e);for(let r=0;r!==t.length;++r){const i=t[r];i[0]<e&&(n[i[0]]=i[1])}return n}function Fc(e,t={}){const{size:n,minNumElements:r=0,maxLength:i=_n,maxNumElements:o=i,noTrailingHole:s,depthIdentifier:c}=t,a=Cr(n,Cr(n,r,o,t.maxNumElements!==void 0),i,t.maxLength!==void 0);if(r>i)throw new Error("The minimal number of non-hole elements cannot be higher than the maximal length of the array");if(r>o)throw new Error("The minimal number of non-hole elements cannot be higher than the maximal number of non-holes");const u=LT(o,i),l=t.maxNumElements!==void 0||n!==void 0?n:"=",f=Qt(H(wa(0,xa(a-1,0),xa(i-1,0)),e),{size:l,minLength:r,maxLength:u,selector:h=>h[0],depthIdentifier:c}).map(h=>UT(BT(h)+1,h),h=>{if(!Qf(h))throw new Error("Not supported entry type");if(s&&h.length!==0&&!(h.length-1 in h))throw new Error("No trailing hole");return Q(DT(h),d=>[Number(d[0]),d[1]])});return s||i===r?f:H(f,wa(r,a,i)).map(h=>{const d=h[0],m=h[1];if(d.length>=m)return d;const p=De(d);return p.length=m,p},h=>{if(!Qf(h))throw new Error("Not supported entry type");return[h,h.length]})}function VT(e){return new Set(e)}function qT(e){if(typeof e!="object"||e===null)throw new Error("Incompatible instance received: should be a non-null object");if(!("constructor"in e)||e.constructor!==Set)throw new Error("Incompatible instance received: should be of exact type Set");return Array.from(e)}function Rc(e,t={}){return Qt(e,{minLength:t.minLength,maxLength:t.maxLength,size:t.size,depthIdentifier:t.depthIdentifier,comparator:"SameValueZero"}).map(VT,qT)}function WT(e,t,n,r,i,o){return mo(e,t,{maxKeys:n,noNullPrototype:!o,size:r,depthIdentifier:i})}function zT(e){return Ce(Mc(e),Nc(e),jc(e),_c(e),Oc(e),$c(e),Pc(e),kc(e),Cc(e))}function ng(e){const t=e.values,n=e.depthSize,r=ho(),i=e.maxDepth,o=e.maxKeys,s=e.size,c=Ce(...t,...e.withBigInt?[Xt()]:[],...e.withDate?[po()]:[]);return Ic(a=>({anything:Ce({maxDepth:i,depthSize:n,depthIdentifier:r},c,a("array"),a("object"),...e.withMap?[a("map")]:[],...e.withSet?[a("set")]:[],...e.withObjectString?[a("anything").map(u=>ke(u))]:[],...e.withTypedArray?[zT({maxLength:o,size:s})]:[],...e.withSparseArray?[Fc(a("anything"),{maxNumElements:o,size:s,depthIdentifier:r})]:[]),keys:e.withObjectString?Ce({arbitrary:e.key,weight:10},{arbitrary:a("anything").map(u=>ke(u)),weight:1}):e.key,array:ae(a("anything"),{maxLength:o,size:s,depthIdentifier:r}),set:Rc(a("anything"),{maxLength:o,size:s,depthIdentifier:r}),map:Ce(Di(a("keys"),a("anything"),{maxKeys:o,size:s,depthIdentifier:r}),Di(a("anything"),a("anything"),{maxKeys:o,size:s,depthIdentifier:r})),object:WT(a("keys"),a("anything"),o,s,r,e.withNullPrototype)})).anything}function GT(e){switch(typeof e){case"boolean":return new Op(e);case"number":return new Ht(e);case"string":return new et(e);default:return e}}function KT(e){return typeof e!="object"||e===null||!("constructor"in e)?e:e.constructor===Op||e.constructor===Ht||e.constructor===et?e.valueOf():e}function HT(e){return e.map(GT,KT)}function YT(e,t){return[Ft(),Sc(),Ur(),t(e),Ce(t(e),we(null),we(void 0))]}function JT(e){return e.map(t=>HT(t))}function XT(e,t){return t?JT(e).concat(e):e}function rg(e={}){const t={size:e.size,unit:"stringUnit"in e?e.stringUnit:e.withUnicodeString?"binary":void 0};return{key:e.key!==void 0?e.key:be(t),values:XT(e.values!==void 0?e.values:YT(t,be),e.withBoxedValues===!0),depthSize:e.depthSize,maxDepth:e.maxDepth,maxKeys:e.maxKeys,size:e.size,withSet:e.withSet===!0,withMap:e.withMap===!0,withObjectString:e.withObjectString===!0,withNullPrototype:e.withNullPrototype===!0,withBigInt:e.withBigInt===!0,withDate:e.withDate===!0,withTypedArray:e.withTypedArray===!0,withSparseArray:e.withSparseArray===!0}}function ZT(e){return mo(e.key,ng(e),{maxKeys:e.maxKeys,noNullPrototype:!e.withNullPrototype,size:e.size})}function ig(e){return ZT(rg(e))}function QT(e,t){const{depthSize:n,maxDepth:r}=t;return{key:e,values:[Ft(),Ur({noDefaultInfinity:!0,noNaN:!0}),e,we(null)],depthSize:n,maxDepth:r}}function Lc(e){return ng(rg(e))}function Dc(e={}){const t=e.noUnicodeString===void 0||e.noUnicodeString===!0;return Lc(QT("stringUnit"in e?be({unit:e.stringUnit}):t?be():be({unit:"binary"}),e))}const ev=JSON.stringify,tv=JSON.parse;function nv(e){if(typeof e!="string")throw new U("Cannot unmap the passed value");return tv(e)}function og(e={}){return Dc(e).map(ev,nv)}const rv=Object.defineProperties;function fs(e,t){return`Stream(${t!==void 0?`${Se(t,",")}…`:`${e} emitted`})`}var iv=class extends xe{constructor(e,t){super(),this.arb=e,this.history=t}generate(e,t){const n=t!==void 0&&e.nextInt(1,t)===1?t:void 0,r=()=>{const i=this.history?[]:null;let o=0;const s=function*(a,u){for(;;){const l=a.generate(u,n).value;o++,i!==null&&N(i,l),yield l}},c=new J(s(this.arb,e.clone()));return rv(c,{toString:{value:()=>fs(o,i!==null?i.map(ke):void 0)},[bt]:{value:()=>fs(o,i!==null?i.map(ke):void 0)},[Lt]:{value:async()=>fs(o,i!==null?await Promise.all(i.map(co)):void 0)},[Fe]:{value:r,enumerable:!0}})};return new L(r(),void 0)}canShrinkWithoutContext(e){return!1}shrink(e,t){return J.nil()}};function sg(e,t){return new iv(e,t!==void 0&&typeof t=="object"&&"noHistory"in t?!t.noHistory:!0)}function ov(e){return Se(e,"")}function eh(e){if(typeof e!="string")throw new Error("Cannot unmap the passed value");return[...e]}function sv(e){switch(e.length%4){case 0:return e;case 3:return`${e}=`;case 2:return`${e}==`;default:return Te(e,1)}}function av(e){if(typeof e!="string"||e.length%4!==0)throw new Error("Invalid string received");const t=e.indexOf("=");if(t===-1)return e;if(e.length-t>2)throw new Error("Cannot unmap the passed value");return Te(e,0,t)}const hs=String.fromCharCode;function cv(e){return e<26?hs(e+65):e<52?hs(e+97-26):e<62?hs(e+48-52):e===62?"+":"/"}function uv(e){if(typeof e!="string"||e.length!==1)throw new U("Invalid entry");const t=Gn(e,0);return t>=65&&t<=90?t-65:t>=97&&t<=122?t-97+26:t>=48&&t<=57?t-48+52:t===43?62:t===47?63:-1}function lv(){return W({min:0,max:63}).map(cv,uv)}function ag(e={}){const{minLength:t=0,maxLength:n=_n,size:r}=e,i=t+3-(t+3)%4,o=n-n%4,s=e.maxLength===void 0&&r===void 0?"=":r;if(i>o)throw new U("Minimal length should be inferior or equal to maximal length");if(i%4!==0)throw new U("Minimal length of base64 strings must be a multiple of 4");if(o%4!==0)throw new U("Maximal length of base64 strings must be a multiple of 4");const c=lv();return ae(c,{minLength:i,maxLength:o,size:s,experimentalCustomSlices:tS(c,eh)}).map(ov,eh).map(sv,av)}const th=Object.is;function fv(e,t){const n=new Yt;let r=0;for(const i of e)th(i,-0)?++r:Et(n,i,(dt(n,i)||0)+1);for(let i=0;i!==t.length;++i){if(!(i in t))return!1;const o=t[i];if(th(o,-0)){if(r===0)return!1;--r}else{const s=dt(n,o)||0;if(s===0)return!1;Et(n,o,s-1)}}return!0}const hv=Math.floor,nh=Math.log,dv=Array.isArray;var cg=class extends xe{constructor(e,t,n,r){if(super(),this.originalArray=e,this.isOrdered=t,this.minLength=n,this.maxLength=r,n<0||n>e.length)throw new Error("fc.*{s|S}ubarrayOf expects the minimal length to be between 0 and the size of the original array");if(r<0||r>e.length)throw new Error("fc.*{s|S}ubarrayOf expects the maximal length to be between 0 and the size of the original array");if(n>r)throw new Error("fc.*{s|S}ubarrayOf expects the minimal length to be inferior or equal to the maximal length");this.lengthArb=new Hn(n,r),this.biasedLengthArb=n!==r?new Hn(n,n+hv(nh(r-n)/nh(2))):this.lengthArb}generate(e,t){const n=(t!==void 0&&e.nextInt(1,t)===1?this.biasedLengthArb:this.lengthArb).generate(e,void 0),r=n.value,i=Q(this.originalArray,(s,c)=>c),o=[];for(let s=0;s!==r;++s){const c=e.nextInt(0,i.length-1);N(o,i[c]),Rp(i,c,1)}return this.isOrdered&&Lp(o,(s,c)=>s-c),new L(Q(o,s=>this.originalArray[s]),n.context)}canShrinkWithoutContext(e){return!dv(e)||!this.lengthArb.canShrinkWithoutContext(e.length)?!1:fv(this.originalArray,e)}shrink(e,t){return e.length===0?J.nil():this.lengthArb.shrink(e.length,t).map(n=>new L(De(e,e.length-n.value),n.context)).join(e.length>this.minLength?fn(()=>this.shrink(De(e,1),void 0).filter(n=>this.minLength<=n.value.length+1).map(n=>new L([e[0],...n.value],void 0))):J.nil())}};function ug(e,t={}){const{minLength:n=0,maxLength:r=e.length}=t;return new cg(e,!0,n,r)}function lg(e,t={}){const{minLength:n=0,maxLength:r=e.length}=t;return new cg(e,!1,n,r)}const pv={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F",16:"G",17:"H",18:"J",19:"K",20:"M",21:"N",22:"P",23:"Q",24:"R",25:"S",26:"T",27:"V",28:"W",29:"X",30:"Y",31:"Z"},mv={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,G:16,H:17,J:18,K:19,M:20,N:21,P:22,Q:23,R:24,S:25,T:26,V:27,W:28,X:29,Y:30,Z:31};function gv(e){return e<10?et(e):pv[e]}function rh(e,t){let n="";for(;e.length+n.length<t;)n+="0";return n+e}function ih(e){let t="";for(let n=e;n!==0;){const r=n>>5;t=gv(n-(r<<5))+t,n=r}return t}function yv(e,t){const n=~~(e/1073741824),r=e&1073741823;return rh(ih(n),t-6)+rh(ih(r),6)}function fg(e){return function(n){return yv(n,e)}}function ds(e){if(typeof e!="string")throw new U("Unsupported type");let t=0,n=1;for(let r=e.length-1;r>=0;--r){const i=e[r],o=mv[i];if(o===void 0)throw new U("Unsupported type");t+=o*n,n*=32}return t}const bv=fg(10),oh=fg(8);function wv(e){return bv(e[0])+oh(e[1])+oh(e[2])}function xv(e){if(typeof e!="string"||e.length!==26)throw new Error("Unsupported type");return[ds(e.slice(0,10)),ds(e.slice(10,18)),ds(e.slice(18))]}function hg(){return H(W({min:0,max:0xffffffffffff}),W({min:0,max:0xffffffffff}),W({min:0,max:0xffffffffff})).map(wv,xv)}function dg(e){return Mw(Ir(e,16),8,"0")}function Sv(e){if(typeof e!="string")throw new Error("Unsupported type");if(e.length!==8)throw new Error("Unsupported value: invalid length");const t=parseInt(e,16);if(e!==dg(t))throw new Error("Unsupported value: invalid content");return t}function ps(e,t){return W({min:e,max:t}).map(dg,Sv)}function Ev(e){return`${e[0]}-${Te(e[1],4)}-${Te(e[1],0,4)}-${Te(e[2],0,4)}-${Te(e[2],4)}${e[3]}`}const Tv=/^([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/;function vv(e){if(typeof e!="string")throw new Error("Unsupported type");const t=Tv.exec(e);if(t===null)throw new Error("Unsupported type");return[t[1],t[3]+t[2],t[4]+Te(t[5],0,4),Te(t[5],4)]}const sh="0123456789abcdef";function Av(e){const t={},n={};for(let o=0;o!==e.length;++o){const s=sh[o],c=sh[e[o]];t[s]=c,n[c]=s}function r(o){return t[o[0]]+Te(o,1)}function i(o){if(typeof o!="string")throw new U("Cannot produce non-string values");const s=n[o[0]];if(s===void 0)throw new U("Cannot produce strings not starting by the version in hexa code");return s+Te(o,1)}return{versionsApplierMapper:r,versionsApplierUnmapper:i}}function Iv(e){const t={};for(const n of e){if(t[n])throw new U(`Version ${n} has been requested at least twice for uuid`);if(t[n]=!0,n<1||n>15)throw new U(`Version must be a value in [1-15] for uuid, but received ${n}`);if(~~n!==n)throw new U(`Version must be an integer value for uuid, but received ${n}`)}if(e.length===0)throw new U("Must provide at least one version for uuid")}function Bi(e={}){const t=ps(0,4294967295),n=e.version!==void 0?typeof e.version=="number"?[e.version]:e.version:[1,2,3,4,5,6,7,8];Iv(n);const{versionsApplierMapper:r,versionsApplierUnmapper:i}=Av(n);return H(t,ps(0,268435456*n.length-1).map(r,i),ps(2147483648,3221225471),t).map(Ev,vv)}function kv(e){return be({unit:gc("-._~!$&'()*+,;=:"),size:e})}function Cv([e,t,n]){return(e===null?"":`${e}@`)+t+(n===null?"":`:${n}`)}function _v(e){if(typeof e!="string")throw new Error("Unsupported");const t=e.indexOf("@"),n=t!==-1?e.substring(0,t):null,r=/:(\d+)$/.exec(e),i=r!==null?Number(r[1]):null;return[n,r!==null?e.substring(t+1,e.length-r[1].length-1):e.substring(t+1),i]}function $v(e){return`[${e}]`}function Mv(e){if(typeof e!="string"||e[0]!=="["||e[e.length-1]!=="]")throw new Error("Unsupported");return e.substring(1,e.length-1)}function Bc(e){const t=e||{},n=t.size,r=[go({size:n}),...t.withIPv4===!0?[bo()]:[],...t.withIPv6===!0?[Ac().map($v,Mv)]:[],...t.withIPv4Extended===!0?[Ec()]:[]];return H(t.withUserInfo===!0?At(kv(n)):we(null),Ce(...r),t.withPort===!0?At(Kt(65535)):we(null)).map(Cv,_v)}function pg(e){return be({unit:gc("-._~!$&'()*+,;=:@/?"),size:e})}function Uc(e={}){return pg(e.size)}function Vc(e={}){return be({unit:gc("-._~!$&'()*+,;=:@"),size:e.size})}function Ov(e){let t="";for(let n=0;n!==e.length;++n)t+="/"+e[n];return t}function Pv(e){if(typeof e!="string")throw new Error("Incompatible value received: type");if(e.length!==0&&e[0]!=="/")throw new Error("Incompatible value received: start");return Rp(tt(e,"/"),1)}function Nv(e){switch(e){case"xsmall":return["xsmall","xsmall"];case"small":return["small","xsmall"];case"medium":return["small","small"];case"large":return["medium","small"];case"xlarge":return["medium","medium"]}}function ms(e,t){return ae(Vc({size:e}),{size:t}).map(Ov,Pv)}function jv(e){const[t,n]=Nv(e);return t===n?ms(t,n):Ce(ms(t,n),ms(n,t))}function qc(e){return jv(hc((e||{}).size))}function Wc(e={}){return pg(e.size)}function Fv(e){const[t,n,r]=e;return`${t}://${n}${r}${e[3]===null?"":`?${e[3]}`}${e[4]===null?"":`#${e[4]}`}`}const Rv=/^([[A-Za-z][A-Za-z0-9+.-]*):\/\/([^/?#]*)([^?#]*)(\?[A-Za-z0-9\-._~!$&'()*+,;=:@/?%]*)?(#[A-Za-z0-9\-._~!$&'()*+,;=:@/?%]*)?$/;function Lv(e){if(typeof e!="string")throw new Error("Incompatible value received: type");const t=Rv.exec(e);if(t===null)throw new Error("Incompatible value received");const n=t[1],r=t[2],i=t[3],o=t[4],s=t[5];return[n,r,i,o!==void 0?o.substring(1):null,s!==void 0?s.substring(1):null]}function zc(e){const t=e||{},n=hc(t.size),r=t.authoritySettings!==void 0&&t.authoritySettings.size!==void 0?Br(t.authoritySettings.size,n):n,i={...t.authoritySettings,size:r};return H(je(...t.validSchemes||["http","https"]),Bc(i),qc({size:n}),t.withQueryParameters===!0?At(Wc({size:n})):we(null),t.withFragments===!0?At(Uc({size:n})):we(null)).map(Fv,Lv)}var Dv=class mg{constructor(t,n){this.commands=t,this.metadataForReplay=n,this[Fe]=function(){return new mg(this.commands.map(r=>r.clone()),this.metadataForReplay)}}[Symbol.iterator](){return this.commands[Symbol.iterator]()}toString(){const t=this.commands.filter(r=>r.hasRan).map(r=>r.toString()).join(","),n=this.metadataForReplay();return n.length!==0?`${t} /*${n}*/`:t}},Bv=class Sa{constructor(t){if(this.cmd=t,this.hasRan=!1,so(t)){const n=t[bt];this[bt]=function(){return n.call(t)}}if(ao(t)){const n=t[Lt];this[Lt]=function(){return n.call(t)}}}check(t){return this.cmd.check(t)}run(t,n){return this.hasRan=!0,this.cmd.run(t,n)}clone(){return mn(this.cmd)?new Sa(this.cmd[Fe]()):new Sa(this.cmd)}toString(){return this.cmd.toString()}},ah=class{static parse(e){const[t,n]=e.split(":"),r=this.parseCounts(t),i=this.parseChanges(n);return this.parseOccurences(r,i)}static stringify(e){const t=this.countOccurences(e);return`${this.stringifyCounts(t)}:${this.stringifyChanges(t)}`}static intToB64(e){return e<26?String.fromCharCode(e+65):e<52?String.fromCharCode(e+97-26):e<62?String.fromCharCode(e+48-52):String.fromCharCode(e===62?43:47)}static b64ToInt(e){return e>="a"?e.charCodeAt(0)-97+26:e>="A"?e.charCodeAt(0)-65:e>="0"?e.charCodeAt(0)-48+52:e==="+"?62:63}static countOccurences(e){return e.reduce((t,n)=>(t.length===0||t[t.length-1].count===64||t[t.length-1].value!==n?t.push({value:n,count:1}):t[t.length-1].count+=1,t),[])}static parseOccurences(e,t){const n=[];for(let r=0;r!==e.length;++r){const i=e[r],o=t[r];for(let s=0;s!==i;++s)n.push(o)}return n}static stringifyChanges(e){let t="";for(let n=0;n<e.length;n+=6){const r=e.slice(n,n+6).reduceRight((i,o)=>(i<<1)+(o.value?1:0),0);t+=this.intToB64(r)}return t}static parseChanges(e){const t=e.split("").map(r=>this.b64ToInt(r)),n=[];for(let r=0;r!==t.length;++r){let i=t[r];for(let o=0;o!==6;++o,i>>=1)n.push(i%2===1)}return n}static stringifyCounts(e){return e.map(({count:t})=>this.intToB64(t-1)).join("")}static parseCounts(e){return e.split("").map(t=>this.b64ToInt(t)+1)}},Uv=class extends xe{constructor(e,t,n,r,i){super(),this.sourceReplayPath=r,this.disableReplayLog=i,this.oneCommandArb=Ce(...e).map(o=>new Bv(o)),this.lengthArb=wa(0,t,n),this.replayPath=[],this.replayPathPosition=0}metadataForReplay(){return this.disableReplayLog?"":`replayPath=${JSON.stringify(ah.stringify(this.replayPath))}`}buildValueFor(e,t){const n=e.map(i=>i.value_),r={shrunkOnce:t,items:e};return new L(new Dv(n,()=>this.metadataForReplay()),r)}generate(e){const t=this.lengthArb.generate(e,void 0).value,n=Array(t);for(let r=0;r!==t;++r)n[r]=this.oneCommandArb.generate(e,void 0);return this.replayPathPosition=0,this.buildValueFor(n,!1)}canShrinkWithoutContext(e){return!1}filterOnExecution(e){const t=[];for(const n of e)n.value_.hasRan?(this.replayPath.push(!0),t.push(n)):this.replayPath.push(!1);return t}filterOnReplay(e){return e.filter((t,n)=>{const r=this.replayPath[this.replayPathPosition+n];if(r===void 0)throw new Error("Too short replayPath");if(!r&&t.value_.hasRan)throw new Error("Mismatch between replayPath and real execution");return r})}filterForShrinkImpl(e){this.replayPathPosition===0&&(this.replayPath=this.sourceReplayPath!==null?ah.parse(this.sourceReplayPath):[]);const t=this.replayPathPosition<this.replayPath.length?this.filterOnReplay(e):this.filterOnExecution(e);return this.replayPathPosition+=e.length,t}shrink(e,t){if(t===void 0)return J.nil();const n=t,r=n.shrunkOnce,i=n.items,o=this.filterForShrinkImpl(i);if(o.length===0)return J.nil();const s=r?J.nil():new J([[]][Symbol.iterator]()),c=[];for(let a=0;a!==o.length;++a)c.push(fn(()=>{const u=o.slice(0,a);return this.lengthArb.shrink(o.length-1-a,void 0).map(l=>u.concat(o.slice(o.length-(l.value+1))))}));for(let a=0;a!==o.length;++a)c.push(fn(()=>this.oneCommandArb.shrink(o[a].value_,o[a].context).map(u=>o.slice(0,a).concat([u],o.slice(a+1)))));return s.join(...c).map(a=>this.buildValueFor(a.map(u=>new L(u.value_.clone(),u.context)),!0))}};function gg(e,t={}){const{size:n,maxCommands:r=_n,disableReplayLog:i=!1,replayPath:o=null}=t;return new Uv(e,Cr(n,0,r,t.maxCommands!==void 0),r,o,i)}var Vv=class{constructor(e,t){this.s=e,this.cmd=t}async check(e){let t=null,n=!1;if((await this.s.scheduleSequence([{label:`check@${this.cmd.toString()}`,builder:async()=>{try{n=await Promise.resolve(this.cmd.check(e))}catch(r){throw t=r,r}}}]).task).faulty)throw t;return n}async run(e,t){let n=null;if((await this.s.scheduleSequence([{label:`run@${this.cmd.toString()}`,builder:async()=>{try{await this.cmd.run(e,t)}catch(r){throw n=r,r}}}]).task).faulty)throw n}};const qv=function*(e,t){for(const n of t)yield new Vv(e,n)},yg=(e,t,n,r,i)=>e.then(o=>{const{model:s,real:c}=o;let a=n;for(const u of t)a=i(a,()=>r(u,s,c));return a}),Wv=(e,t)=>yg({then:o=>{o(e())}},t,void 0,(o,s,c)=>{o.check(s)&&o.run(s,c)},(o,s)=>s()),zv=e=>typeof e.then=="function",bg=async(e,t,n=Promise.resolve())=>await yg({then:s=>{const c=e();return zv(c)?c.then(s):s(c)}},t,n,async(s,c,a)=>{await s.check(c)&&await s.run(c,a)},(s,c)=>s.then(c));function wg(e,t){Wv(e,t)}async function xg(e,t){await bg(e,t)}async function Sg(e,t,n){const r=qv(e,n),i=bg(t,r,e.schedule(Promise.resolve(),"startModel"));await e.waitFor(i),await e.waitAll()}const si=e=>e();var Eg=class Ea{constructor(t,n){this.act=t,this.taskSelector=n,this.lastTaskId=0,this.sourceTaskSelector=n.clone(),this.scheduledTasks=[],this.triggeredTasks=[],this.scheduledWatchers=[],this[Fe]=function(){return new Ea(this.act,this.sourceTaskSelector)}}static buildLog(t){return`[task\${${t.taskId}}] ${t.label.length!==0?`${t.schedulingType}::${t.label}`:t.schedulingType} ${t.status}${t.outputValue!==void 0?` with value ${dE(t.outputValue)}`:""}`}log(t,n,r,i,o,s){this.triggeredTasks.push({status:o,schedulingType:t,taskId:n,label:r,metadata:i,outputValue:s!==void 0?ke(s):void 0})}scheduleInternal(t,n,r,i,o,s){const c=++this.lastTaskId;let a;const u=new Promise((l,f)=>{a=()=>{const h=Promise.resolve(s!==void 0?r.then(()=>s()):r);return h.then(d=>{this.log(t,c,n,i,"resolved",d),l(d)},d=>{this.log(t,c,n,i,"rejected",d),f(d)}),h}});return this.scheduledTasks.push({original:r,trigger:a,schedulingType:t,taskId:c,label:n,metadata:i,customAct:o}),this.scheduledWatchers.length!==0&&this.scheduledWatchers[0](),u}schedule(t,n,r,i){return this.scheduleInternal("promise",n||"",t,r,i||si)}scheduleFunction(t,n){return(...r)=>this.scheduleInternal("function",`${t.name}(${r.map(ke).join(",")})`,t(...r),void 0,n||si)}scheduleSequence(t,n){const r={done:!1,faulty:!1},i={then:l=>l()};let o=()=>{};const s=new Promise(l=>{o=()=>l({done:r.done,faulty:r.faulty})}),c=()=>{r.faulty=!0,o()},a=()=>{r.done=!0,o()},u=(l,f)=>{if(l>=t.length){f.then(a,c);return}f.then(()=>{const h=t[l],[d,m,p]=typeof h=="function"?[h,h.name,void 0]:[h.builder,h.label,h.metadata],y=this.scheduleInternal("sequence",m,i,p,n||si,()=>d());u(l+1,y)},c)};return u(0,i),Object.assign(r,{task:s})}count(){return this.scheduledTasks.length}internalWaitOne(){if(this.scheduledTasks.length===0)throw new Error("No task scheduled");const t=this.taskSelector.nextTaskIndex(this.scheduledTasks),[n]=this.scheduledTasks.splice(t,1);return n.customAct(()=>n.trigger().catch(r=>{}))}waitOne(t){const n=t||si;return this.act(()=>n(()=>this.internalWaitOne()))}async waitAll(t){for(;this.scheduledTasks.length>0;)await this.waitOne(t)}async internalWaitFor(t,n){let r=!1;const i=n.customAct,o=n.onWaitStart,s=n.onWaitIdle,c=n.launchAwaiterOnInit;let a,u,l=0,f=null,h=null;const d=async()=>{for(l=50,l=50;!r&&l>0;--l)await Promise.resolve();if(!r&&this.scheduledTasks.length>0)return o!==void 0&&o(),h=this.waitOne(i),h.then(()=>(h=null,d()),x=>{throw h=null,r=!0,u(x),x});!r&&s!==void 0&&s(),f=null},m=()=>{if(f!==null){l=51;return}f=d().catch(()=>{})},p=()=>{const x=this.scheduledWatchers.indexOf(m);x!==-1&&this.scheduledWatchers.splice(x,1),x===0&&this.scheduledWatchers.length!==0&&this.scheduledWatchers[0]()},y=new Promise((x,T)=>{a=O=>{p(),x(O)},u=O=>{p(),T(O)}});return t.then(x=>{r=!0,h===null?a(x):h.then(()=>a(x),T=>u(T))},x=>{r=!0,h===null?u(x):h.then(()=>u(x),()=>u(x))}),(this.scheduledTasks.length>0||c)&&this.scheduledWatchers.length===0&&m(),this.scheduledWatchers.push(m),y}waitNext(t,n){let r,i=t;const o=i<=0?Promise.resolve():new Promise(s=>{r=()=>{--i<=0&&s()}});return this.internalWaitFor(o,{customAct:n,onWaitStart:r,onWaitIdle:void 0,launchAwaiterOnInit:!1})}waitIdle(t){let n;const r=new Promise(i=>n=i);return this.internalWaitFor(r,{customAct:t,onWaitStart:void 0,onWaitIdle:n,launchAwaiterOnInit:!0})}waitFor(t,n){return this.internalWaitFor(t,{customAct:n,onWaitStart:void 0,onWaitIdle:void 0,launchAwaiterOnInit:!1})}report(){return[...this.triggeredTasks,...this.scheduledTasks.map(t=>({status:"pending",schedulingType:t.schedulingType,taskId:t.taskId,label:t.label,metadata:t.metadata}))]}toString(){return"schedulerFor()`\n"+this.report().map(Ea.buildLog).map(t=>`-> ${t}`).join(`
|
|
34
|
-
`)+"`"}};function Tg(e){let t=0;return{clone:()=>Tg(e),nextTaskIndex:n=>{if(e.length<=t)throw new Error("Invalid schedulerFor defined: too many tasks have been scheduled");const r=n.findIndex(i=>i.taskId===e[t]);if(r===-1)throw new Error("Invalid schedulerFor defined: unable to find next task");return++t,r}}}function ch(e,t){return new Eg(e,Tg(t))}function vg(e){const t=e.clone();return{clone:()=>vg(t),nextTaskIndex:n=>e.nextInt(0,n.length-1)}}var Gv=class extends xe{constructor(e){super(),this.act=e}generate(e,t){return new L(new Eg(this.act,vg(e.clone())),void 0)}canShrinkWithoutContext(e){return!1}shrink(e,t){return J.nil()}};function Ag(e){const{act:t=n=>n()}=e||{};return new Gv(t)}function Ig(e,t){const{act:n=r=>r()}=Array.isArray(e)?t||{}:e||{};return Array.isArray(e)?ch(n,e):function(r,...i){return ch(n,i)}}function kg(e={}){return en(e,F("-9223372036854775808"),F("9223372036854775807"),F0,Xt)}function Cg(e={}){return en(e,F(0),F("18446744073709551615"),R0,Xt)}function Kv(e,t){return t}const gs=Math.floor,Hv=Math.min;function pt(e,t){switch(e.type){case"Char":return{astNode:e,minLength:1};case"Repetition":switch(e.quantifier.kind){case"*":{const n=pt(e.expression,t);return{astNode:{type:"Repetition",quantifier:{...e.quantifier,kind:"Range",from:0,to:t},expression:n.astNode},minLength:0}}case"+":{const n=pt(e.expression,t),r=n.minLength>1?n.minLength:1;return{astNode:{type:"Repetition",quantifier:{...e.quantifier,kind:"Range",from:1,to:gs(t/r)},expression:n.astNode},minLength:n.minLength}}case"?":{const n=pt(e.expression,t);return t<n.minLength?{astNode:{type:"Repetition",quantifier:{...e.quantifier,kind:"Range",from:0,to:0},expression:n.astNode},minLength:0}:{astNode:{...e,expression:n.astNode},minLength:0}}case"Range":{const n=e.quantifier.from>1?gs(t/e.quantifier.from):t,r=pt(e.expression,n),i=r.minLength>1?r.minLength:1;return e.quantifier.to===void 0||e.quantifier.to*i>t?{astNode:{type:"Repetition",quantifier:{...e.quantifier,kind:"Range",to:gs(t/i)},expression:r.astNode},minLength:e.quantifier.from*r.minLength}:{astNode:{...e,expression:r.astNode},minLength:e.quantifier.from*r.minLength}}default:return Kv(e.quantifier,{astNode:e,minLength:0})}case"Quantifier":return{astNode:e,minLength:0};case"Alternative":{let n=0;const r=[];for(let o=0;o!==e.expressions.length;++o){const s=t-n,c=pt(e.expressions[o],s);n+=c.minLength,N(r,{value:c,allowance:s})}const i=[];for(let o=0;o!==r.length;++o){const s=r[o].value,c=r[o].allowance,a=t-n+s.minLength;N(i,(a!==c?pt(s.astNode,a):s).astNode)}return{astNode:{...e,expressions:i},minLength:n}}case"CharacterClass":return{astNode:e,minLength:1};case"ClassRange":return{astNode:e,minLength:1};case"Group":{const n=pt(e.expression,t);return{astNode:{...e,expression:n.astNode},minLength:n.minLength}}case"Disjunction":{if(e.left===null){if(e.right===null)return{astNode:e,minLength:0};const i=pt(e.right,t),o=i.minLength>t?null:i.astNode;return{astNode:{...e,left:null,right:o},minLength:0}}if(e.right===null){const i=pt(e.left,t),o=i.minLength>t?null:i.astNode;return{astNode:{...e,left:o,right:null},minLength:0}}const n=pt(e.left,t),r=pt(e.right,t);return n.minLength>t?r:r.minLength>t?n:{astNode:{...e,left:n.astNode,right:r.astNode},minLength:Hv(n.minLength,r.minLength)}}case"Assertion":return{astNode:e,minLength:0};case"Backreference":return{astNode:e,minLength:0};case"UnicodeProperty":return{astNode:e,minLength:1}}}function Yv(e,t){return pt(e,t).astNode}function Jv(e){return new Error(`Unsupported AST node! Received: ${ke(e)}`)}function Ii(e,t,n){if(!t&&!n)return e;const r={hasStart:!1,hasEnd:!1},i=_g(e,t,n,r),o=t&&!r.hasStart,s=n&&!r.hasEnd;if(!o&&!s)return i;const c=[];return o&&(c.push({type:"Assertion",kind:"^"}),c.push({type:"Repetition",quantifier:{type:"Quantifier",kind:"*",greedy:!0},expression:{type:"Char",kind:"meta",symbol:".",value:".",codePoint:NaN}})),c.push(i),s&&(c.push({type:"Repetition",quantifier:{type:"Quantifier",kind:"*",greedy:!0},expression:{type:"Char",kind:"meta",symbol:".",value:".",codePoint:NaN}}),c.push({type:"Assertion",kind:"$"})),{type:"Group",capturing:!1,expression:{type:"Alternative",expressions:c}}}function _g(e,t,n,r){switch(e.type){case"Char":return e;case"Repetition":return e;case"Quantifier":throw new Error("Wrongly defined AST tree, Quantifier nodes not supposed to be scanned!");case"Alternative":return r.hasStart=!0,r.hasEnd=!0,{...e,expressions:e.expressions.map((i,o)=>Ii(i,t&&o===0,n&&o===e.expressions.length-1))};case"CharacterClass":return e;case"ClassRange":return e;case"Group":return{...e,expression:_g(e.expression,t,n,r)};case"Disjunction":return r.hasStart=!0,r.hasEnd=!0,{...e,left:e.left!==null?Ii(e.left,t,n):null,right:e.right!==null?Ii(e.right,t,n):null};case"Assertion":if(e.kind==="^"||e.kind==="Lookahead")return r.hasStart=!0,e;if(e.kind==="$"||e.kind==="Lookbehind")return r.hasEnd=!0,e;throw new Error(`Assertions of kind ${e.kind} not implemented yet!`);case"Backreference":return e;case"UnicodeProperty":return e;default:throw Jv(e)}}function Xv(e){return Ii(e,!0,!0)}function uh(e,t){return e[t]>="\uD800"&&e[t]<="\uDBFF"&&e[t+1]>="\uDC00"&&e[t+1]<="\uDFFF"?2:1}function Oe(e){return e>="0"&&e<="9"||e>="a"&&e<="f"||e>="A"&&e<="F"}function Ta(e){return e>="0"&&e<="9"}function $g(e,t){for(let n=t;n!==e.length;++n){const r=e[n];if(r==="\\")n+=1;else if(r==="]")return n}throw new Error("Missing closing ']'")}function Zv(e,t){let n=0;for(let r=t;r!==e.length;++r){const i=e[r];if(i==="\\")r+=1;else if(i===")"){if(n===0)return r;n-=1}else i==="["?r=$g(e,r):i==="("&&(n+=1)}throw new Error("Missing closing ')'")}function Qv(e,t){let n=!1;for(let r=t;r!==e.length;++r){const i=e[r];if(!Ta(i)){if(t===r)return-1;if(i===","){if(n)return-1;n=!0}else return i==="}"?r:-1}}return-1}function e6(e,t,n,r){switch(e[t]){case"[":return r===1?t+1:$g(e,t+1)+1;case"{":{if(r===1)return t+1;const i=Qv(e,t+1);return i===-1?t+1:i+1}case"(":return r===1?t+1:Zv(e,t+1)+1;case"]":case"}":case")":return t+1;case"\\":{const i=e[t+1];switch(i){case"x":if(Oe(e[t+2])&&Oe(e[t+3]))return t+4;throw new Error(`Unexpected token '${e.substring(t,t+4)}' found`);case"u":if(e[t+2]==="{"){if(!n)return t+2;if(e[t+4]==="}"){if(Oe(e[t+3]))return t+5;throw new Error(`Unexpected token '${e.substring(t,t+5)}' found`)}if(e[t+5]==="}"){if(Oe(e[t+3])&&Oe(e[t+4]))return t+6;throw new Error(`Unexpected token '${e.substring(t,t+6)}' found`)}if(e[t+6]==="}"){if(Oe(e[t+3])&&Oe(e[t+4])&&Oe(e[t+5]))return t+7;throw new Error(`Unexpected token '${e.substring(t,t+7)}' found`)}if(e[t+7]==="}"){if(Oe(e[t+3])&&Oe(e[t+4])&&Oe(e[t+5])&&Oe(e[t+6]))return t+8;throw new Error(`Unexpected token '${e.substring(t,t+8)}' found`)}if(e[t+8]==="}"&&Oe(e[t+3])&&Oe(e[t+4])&&Oe(e[t+5])&&Oe(e[t+6])&&Oe(e[t+7]))return t+9;throw new Error(`Unexpected token '${e.substring(t,t+9)}' found`)}if(Oe(e[t+2])&&Oe(e[t+3])&&Oe(e[t+4])&&Oe(e[t+5]))return t+6;throw new Error(`Unexpected token '${e.substring(t,t+6)}' found`);case"p":case"P":{if(!n)return t+2;let o=t+2;for(;o<e.length&&e[o]!=="}";o+=e[o]==="\\"?2:1);if(e[o]!=="}")throw new Error("Invalid \\P definition");return o+1}case"k":{let o=t+2;for(;o<e.length&&e[o]!==">";++o);if(e[o]!==">"){if(!n)return t+2;throw new Error("Invalid \\k definition")}return o+1}default:if(Ta(i)){const o=n?e.length:Math.min(t+4,e.length);let s=t+2;for(;s<o&&Ta(e[s]);++s);return s}return t+(n?uh(e,t+1):1)+1}}default:return t+(n?uh(e,t):1)}}function ai(e,t,n,r){const i=e6(e,t,n,r);return e.substring(t,i)}const lh={gc:"General_Category",sc:"Script",scx:"Script_Extensions"},wo={ASCII:"ASCII",ASCII_Hex_Digit:"AHex",Alphabetic:"Alpha",Any:"Any",Assigned:"Assigned",Bidi_Control:"Bidi_C",Bidi_Mirrored:"Bidi_M",Case_Ignorable:"CI",Cased:"Cased",Changes_When_Casefolded:"CWCF",Changes_When_Casemapped:"CWCM",Changes_When_Lowercased:"CWL",Changes_When_NFKC_Casefolded:"CWKCF",Changes_When_Titlecased:"CWT",Changes_When_Uppercased:"CWU",Dash:"Dash",Default_Ignorable_Code_Point:"DI",Deprecated:"Dep",Diacritic:"Dia",Emoji:"Emoji",Emoji_Component:"Emoji_Component",Emoji_Modifier:"Emoji_Modifier",Emoji_Modifier_Base:"Emoji_Modifier_Base",Emoji_Presentation:"Emoji_Presentation",Extended_Pictographic:"Extended_Pictographic",Extender:"Ext",Grapheme_Base:"Gr_Base",Grapheme_Extend:"Gr_Ext",Hex_Digit:"Hex",IDS_Binary_Operator:"IDSB",IDS_Trinary_Operator:"IDST",ID_Continue:"IDC",ID_Start:"IDS",Ideographic:"Ideo",Join_Control:"Join_C",Logical_Order_Exception:"LOE",Lowercase:"Lower",Math:"Math",Noncharacter_Code_Point:"NChar",Pattern_Syntax:"Pat_Syn",Pattern_White_Space:"Pat_WS",Quotation_Mark:"QMark",Radical:"Radical",Regional_Indicator:"RI",Sentence_Terminal:"STerm",Soft_Dotted:"SD",Terminal_Punctuation:"Term",Unified_Ideograph:"UIdeo",Uppercase:"Upper",Variation_Selector:"VS",White_Space:"space",XID_Continue:"XIDC",XID_Start:"XIDS"},Or=Kc(wo),Gc={Cased_Letter:"LC",Close_Punctuation:"Pe",Connector_Punctuation:"Pc",Control:["Cc","cntrl"],Currency_Symbol:"Sc",Dash_Punctuation:"Pd",Decimal_Number:["Nd","digit"],Enclosing_Mark:"Me",Final_Punctuation:"Pf",Format:"Cf",Initial_Punctuation:"Pi",Letter:"L",Letter_Number:"Nl",Line_Separator:"Zl",Lowercase_Letter:"Ll",Mark:["M","Combining_Mark"],Math_Symbol:"Sm",Modifier_Letter:"Lm",Modifier_Symbol:"Sk",Nonspacing_Mark:"Mn",Number:"N",Open_Punctuation:"Ps",Other:"C",Other_Letter:"Lo",Other_Number:"No",Other_Punctuation:"Po",Other_Symbol:"So",Paragraph_Separator:"Zp",Private_Use:"Co",Punctuation:["P","punct"],Separator:"Z",Space_Separator:"Zs",Spacing_Mark:"Mc",Surrogate:"Cs",Symbol:"S",Titlecase_Letter:"Lt",Unassigned:"Cn",Uppercase_Letter:"Lu"},va=Kc(Gc),Mg={Adlam:"Adlm",Ahom:"Ahom",Anatolian_Hieroglyphs:"Hluw",Arabic:"Arab",Armenian:"Armn",Avestan:"Avst",Balinese:"Bali",Bamum:"Bamu",Bassa_Vah:"Bass",Batak:"Batk",Bengali:"Beng",Bhaiksuki:"Bhks",Bopomofo:"Bopo",Brahmi:"Brah",Braille:"Brai",Buginese:"Bugi",Buhid:"Buhd",Canadian_Aboriginal:"Cans",Carian:"Cari",Caucasian_Albanian:"Aghb",Chakma:"Cakm",Cham:"Cham",Cherokee:"Cher",Common:"Zyyy",Coptic:["Copt","Qaac"],Cuneiform:"Xsux",Cypriot:"Cprt",Cyrillic:"Cyrl",Deseret:"Dsrt",Devanagari:"Deva",Dogra:"Dogr",Duployan:"Dupl",Egyptian_Hieroglyphs:"Egyp",Elbasan:"Elba",Ethiopic:"Ethi",Georgian:"Geor",Glagolitic:"Glag",Gothic:"Goth",Grantha:"Gran",Greek:"Grek",Gujarati:"Gujr",Gunjala_Gondi:"Gong",Gurmukhi:"Guru",Han:"Hani",Hangul:"Hang",Hanifi_Rohingya:"Rohg",Hanunoo:"Hano",Hatran:"Hatr",Hebrew:"Hebr",Hiragana:"Hira",Imperial_Aramaic:"Armi",Inherited:["Zinh","Qaai"],Inscriptional_Pahlavi:"Phli",Inscriptional_Parthian:"Prti",Javanese:"Java",Kaithi:"Kthi",Kannada:"Knda",Katakana:"Kana",Kayah_Li:"Kali",Kharoshthi:"Khar",Khmer:"Khmr",Khojki:"Khoj",Khudawadi:"Sind",Lao:"Laoo",Latin:"Latn",Lepcha:"Lepc",Limbu:"Limb",Linear_A:"Lina",Linear_B:"Linb",Lisu:"Lisu",Lycian:"Lyci",Lydian:"Lydi",Mahajani:"Mahj",Makasar:"Maka",Malayalam:"Mlym",Mandaic:"Mand",Manichaean:"Mani",Marchen:"Marc",Medefaidrin:"Medf",Masaram_Gondi:"Gonm",Meetei_Mayek:"Mtei",Mende_Kikakui:"Mend",Meroitic_Cursive:"Merc",Meroitic_Hieroglyphs:"Mero",Miao:"Plrd",Modi:"Modi",Mongolian:"Mong",Mro:"Mroo",Multani:"Mult",Myanmar:"Mymr",Nabataean:"Nbat",New_Tai_Lue:"Talu",Newa:"Newa",Nko:"Nkoo",Nushu:"Nshu",Ogham:"Ogam",Ol_Chiki:"Olck",Old_Hungarian:"Hung",Old_Italic:"Ital",Old_North_Arabian:"Narb",Old_Permic:"Perm",Old_Persian:"Xpeo",Old_Sogdian:"Sogo",Old_South_Arabian:"Sarb",Old_Turkic:"Orkh",Oriya:"Orya",Osage:"Osge",Osmanya:"Osma",Pahawh_Hmong:"Hmng",Palmyrene:"Palm",Pau_Cin_Hau:"Pauc",Phags_Pa:"Phag",Phoenician:"Phnx",Psalter_Pahlavi:"Phlp",Rejang:"Rjng",Runic:"Runr",Samaritan:"Samr",Saurashtra:"Saur",Sharada:"Shrd",Shavian:"Shaw",Siddham:"Sidd",SignWriting:"Sgnw",Sinhala:"Sinh",Sogdian:"Sogd",Sora_Sompeng:"Sora",Soyombo:"Soyo",Sundanese:"Sund",Syloti_Nagri:"Sylo",Syriac:"Syrc",Tagalog:"Tglg",Tagbanwa:"Tagb",Tai_Le:"Tale",Tai_Tham:"Lana",Tai_Viet:"Tavt",Takri:"Takr",Tamil:"Taml",Tangut:"Tang",Telugu:"Telu",Thaana:"Thaa",Thai:"Thai",Tibetan:"Tibt",Tifinagh:"Tfng",Tirhuta:"Tirh",Ugaritic:"Ugar",Vai:"Vaii",Warang_Citi:"Wara",Yi:"Yiii",Zanabazar_Square:"Zanb"},fh=Kc(Mg);function Kc(e){const t={};for(const n of Object.keys(e)){const r=e[n];if(Array.isArray(r))for(let i=0;i!==r.length;++i)t[r[i]]=n;else t[r]=n}return t}function t6(e){return e in Gc||e in va}function n6(e){return e in wo||e in Or}function hh(e){if(e in lh)return lh[e];if(e in Or)return Or[e];if(e in wo||e==="General_Category"||e==="Script"||e==="Script_Extensions")return e;throw new Error(`Unknown Unicode property name: ${e}`)}function dh(e){if(e in va)return va[e];if(e in fh)return fh[e];if(e in Or)return Or[e];if(e in Gc||e in Mg||e in wo)return e;throw new Error(`Unknown Unicode property value: ${e}`)}function r6(e,t){const n=e.indexOf("=");if(n!==-1){const r=e.substring(0,n),i=e.substring(n+1);return{type:"UnicodeProperty",name:r,value:i,negative:t,shorthand:!1,binary:!1,canonicalName:hh(r),canonicalValue:dh(i)}}if(t6(e))return{type:"UnicodeProperty",name:"General_Category",value:e,negative:t,shorthand:!0,binary:!1,canonicalName:"General_Category",canonicalValue:dh(e)};if(n6(e)){const r=hh(e);return{type:"UnicodeProperty",name:e,value:e,negative:t,shorthand:!1,binary:!0,canonicalName:r,canonicalValue:r}}throw new Error(`Invalid Unicode property: ${e}`)}const ys=String.fromCodePoint;function bs(e){const t=e.pop();if(t===void 0)throw new Error("Unable to extract token preceeding the currently parsed one");return t}function Og(e){return e>="0"&&e<="9"}function ki(e,t){return{type:"Char",kind:"simple",symbol:e,value:e,codePoint:e.codePointAt(0)||-1,escaped:t}}function Fn(e,t){return{type:"Char",kind:"meta",symbol:t,value:e,codePoint:t.codePointAt(0)||-1}}function rn(e,t){if(e.length>1)return{type:"Alternative",expressions:e};if(!t&&e.length===0)throw new Error("Unsupported no token");return e[0]}function ws(e){if(e[0]==="\\"){const t=e[1];switch(t){case"x":{const n=e.substring(2),r=Number.parseInt(n,16);return{type:"Char",kind:"hex",symbol:ys(r),value:e,codePoint:r}}case"u":{if(e==="\\u")return ki("u",!0);const n=e[2]==="{"?e.substring(3,e.length-1):e.substring(2),r=Number.parseInt(n,16);return{type:"Char",kind:"unicode",symbol:ys(r),value:e,codePoint:r}}case"0":return Fn(e,"\0");case"n":return Fn(e,`
|
|
35
|
-
`);case"f":return
|
|
36
|
-
\v\f`],
|
|
37
|
-
`],Fg=[...""],f6=[...Aa,...Fg],h6=new vt(Pg),d6=new vt(Ng),p6=new vt(jg),m6=new vt(Fg),g6=new vt(f6),bn=()=>be({unit:"grapheme-ascii",minLength:1,maxLength:1});function gh(e){return new U(`Unsupported AST node! Received: ${ke(e)}`)}function wn(e,t,n){switch(e.type){case"Char":if(e.kind==="meta")switch(e.value){case"\\w":return je(...Pg);case"\\W":return bn().filter(r=>!ln(h6,r));case"\\d":return je(...Ng);case"\\D":return bn().filter(r=>!ln(d6,r));case"\\s":return je(...jg);case"\\S":return bn().filter(r=>!ln(p6,r));case"\\b":case"\\B":throw new U(`Meta character ${e.value} not implemented yet!`);case".":{const r=n.dotAll?m6:g6;return bn().filter(i=>!ln(r,i))}}if(e.symbol===void 0)throw new U(`Unexpected undefined symbol received for non-meta Char! Received: ${ke(e)}`);return we(e.symbol);case"Repetition":{const r=wn(e.expression,t,n);switch(e.quantifier.kind){case"*":return be({...t,unit:r});case"+":return be({...t,minLength:1,unit:r});case"?":return be({...t,minLength:0,maxLength:1,unit:r});case"Range":return be({...t,minLength:e.quantifier.from,maxLength:e.quantifier.to,unit:r});default:throw gh(e.quantifier)}}case"Quantifier":throw new U("Wrongly defined AST tree, Quantifier nodes not supposed to be scanned!");case"Alternative":{const r=[];let i="";for(const o of e.expressions)o.type==="Char"&&o.kind!=="meta"&&o.symbol!==void 0?i+=o.symbol:(n.multiline||o.type!=="Assertion"||o.kind!=="^"&&o.kind!=="$")&&(i!==""&&(N(r,we(i)),i=""),N(r,wn(o,t,n)));return i!==""&&N(r,we(i)),r.length===0?we(""):r.length===1?r[0]:H(...r).map(o=>Se(o,""))}case"CharacterClass":if(e.negative){const r=Q(e.expressions,i=>wn(i,t,n));return bn().filter(i=>Dp(r,o=>!o.canShrinkWithoutContext(i)))}return Ce(...Q(e.expressions,r=>wn(r,t,n)));case"ClassRange":{const r=e.from.codePoint,i=e.to.codePoint;return W({min:r,max:i}).map(o=>l6(o),o=>{if(typeof o!="string")throw new U("Invalid type");if([...o].length!==1)throw new U("Invalid length");return Gn(o,0)})}case"Group":return wn(e.expression,t,n);case"Disjunction":{const r=[e.left,e.right],i=[];for(let o=0;o!==r.length;++o){const s=r[o];s===null?N(i,we("")):s.type==="Disjunction"?(N(r,s.left),N(r,s.right)):N(i,wn(s,t,n))}return Ce(...i)}case"Assertion":if(e.kind==="^"||e.kind==="$")return n.multiline?e.kind==="^"?Ce(we(""),H(be({unit:bn()}),je(...Aa)).map(r=>`${r[0]}${r[1]}`,r=>{if(typeof r!="string"||r.length===0)throw new U("Invalid type");return[Te(r,0,r.length-1),r[r.length-1]]})):Ce(we(""),H(je(...Aa),be({unit:bn()})).map(r=>`${r[0]}${r[1]}`,r=>{if(typeof r!="string"||r.length===0)throw new U("Invalid type");return[r[0],Te(r,1)]})):we("");throw new U(`Assertions of kind ${e.kind} not implemented yet!`);case"Backreference":throw new U("Backreference nodes not implemented yet!");case"UnicodeProperty":return u6(e);default:throw gh(e)}}function Rg(e,t={}){for(const c of e.flags)if(c!=="d"&&c!=="g"&&c!=="m"&&c!=="s"&&c!=="u")throw new U(`Unable to use "stringMatching" against a regex using the flag ${c}`);const n=t.maxLength,r={size:t.size,maxLength:n},i={multiline:e.multiline,dotAll:e.dotAll};let o=Xv(i6(e));n!==void 0&&(o=Yv(o,n));const s=wn(o,r,i);return n!==void 0?s.filter(c=>[...c].length<=n):s}function y6(e){const t=[];for(let n=0;n!==e.length;++n)t.push(e[n].next());return t}function b6(e,t){for(let n=0;n!==e.length;++n)t[n]=e[n].next()}function w6(e){for(let t=0;t!==e.length;++t)if(e[t].done)return!0;return!1}function*x6(...e){const t=y6(e);for(;!w6(t);)yield t.map(n=>n.value),b6(e,t)}function*S6(e){let t=e;for(;;)yield t,++t}var E6=class extends xe{constructor(e,t){super(),this.arb=e,this.maxShrinks=t}generate(e,t){const n=this.arb.generate(e,t);return this.valueMapper(n,0)}canShrinkWithoutContext(e){return this.arb.canShrinkWithoutContext(e)}shrink(e,t){return this.isSafeContext(t)?this.safeShrink(e,t.originalContext,t.length):this.safeShrink(e,void 0,0)}safeShrink(e,t,n){const r=this.maxShrinks-n;return r<=0?J.nil():new J(x6(this.arb.shrink(e,t),S6(n+1))).take(r).map(i=>this.valueMapper(i[0],i[1]))}valueMapper(e,t){const n={originalContext:e.context,length:t};return new L(e.value,n)}isSafeContext(e){return e!=null&&typeof e=="object"&&"originalContext"in e&&"length"in e}};function Lg(e,t){return new E6(e,t)}var T6=Rb({Arbitrary:()=>xe,ExecutionStatus:()=>Zp,PreconditionFailure:()=>Zt,Random:()=>uo,Stream:()=>J,Value:()=>L,VerbosityLevel:()=>Hp,__commitHash:()=>Ug,__type:()=>Dg,__version:()=>Bg,anything:()=>Lc,array:()=>ae,assert:()=>Dr,asyncDefaultReportMessage:()=>lc,asyncModelRun:()=>xg,asyncProperty:()=>sc,asyncStringify:()=>co,asyncToStringMethod:()=>Lt,base64String:()=>ag,bigInt:()=>Xt,bigInt64Array:()=>kg,bigUint64Array:()=>Cg,boolean:()=>Ft,chainUntil:()=>dc,check:()=>lo,clone:()=>Tm,cloneIfNeeded:()=>Sn,cloneMethod:()=>Fe,commands:()=>gg,compareBooleanFunc:()=>Gm,compareFunc:()=>Km,configureGlobal:()=>Wp,constant:()=>we,constantFrom:()=>je,context:()=>wm,createDepthIdentifier:()=>ho,date:()=>po,defaultReportMessage:()=>uc,dictionary:()=>mo,domain:()=>go,double:()=>Ur,emailAddress:()=>yc,entityGraph:()=>Zm,falsy:()=>ym,float:()=>yo,float32Array:()=>kc,float64Array:()=>Cc,func:()=>Hm,gen:()=>lm,getDepthContextFor:()=>fo,hasAsyncToStringMethod:()=>ao,hasCloneMethod:()=>mn,hasToStringMethod:()=>so,hash:()=>$r,infiniteStream:()=>sg,int16Array:()=>_c,int32Array:()=>$c,int8Array:()=>Mc,integer:()=>W,ipV4:()=>bo,ipV4Extended:()=>Ec,ipV6:()=>Ac,json:()=>og,jsonValue:()=>Dc,letrec:()=>Ic,limitShrink:()=>Lg,lorem:()=>Qm,map:()=>Di,mapToConstant:()=>$n,maxSafeInteger:()=>Sc,maxSafeNat:()=>Ym,memo:()=>eg,mixedCase:()=>tg,modelRun:()=>wg,nat:()=>Kt,noBias:()=>_r,noShrink:()=>Mr,object:()=>ig,oneof:()=>Ce,option:()=>At,pre:()=>Ip,property:()=>Lr,readConfigureGlobal:()=>yt,record:()=>zt,resetConfigureGlobal:()=>zp,sample:()=>am,scheduledModelRun:()=>Sg,scheduler:()=>Ag,schedulerFor:()=>Ig,set:()=>Rc,shuffledSubarray:()=>lg,sparseArray:()=>Fc,statistics:()=>cm,stream:()=>Jt,string:()=>be,stringMatching:()=>Rg,stringify:()=>ke,subarray:()=>ug,toStringMethod:()=>bt,tuple:()=>H,uint16Array:()=>Oc,uint32Array:()=>Pc,uint8Array:()=>Nc,uint8ClampedArray:()=>jc,ulid:()=>hg,uniqueArray:()=>Qt,uuid:()=>Bi,webAuthority:()=>Bc,webFragments:()=>Uc,webPath:()=>qc,webQueryParameters:()=>Wc,webSegment:()=>Vc,webUrl:()=>zc});const Dg="module",Bg="4.9.0",Ug="0d3c2547dce556f72413607849377530d18ea283";var v6=T6;const A6=Object.freeze(Object.defineProperty({__proto__:null,Arbitrary:xe,ExecutionStatus:Zp,PreconditionFailure:Zt,Random:uo,Stream:J,Value:L,VerbosityLevel:Hp,__commitHash:Ug,__type:Dg,__version:Bg,anything:Lc,array:ae,assert:Dr,asyncDefaultReportMessage:lc,asyncModelRun:xg,asyncProperty:sc,asyncStringify:co,asyncToStringMethod:Lt,base64String:ag,bigInt:Xt,bigInt64Array:kg,bigUint64Array:Cg,boolean:Ft,chainUntil:dc,check:lo,clone:Tm,cloneIfNeeded:Sn,cloneMethod:Fe,commands:gg,compareBooleanFunc:Gm,compareFunc:Km,configureGlobal:Wp,constant:we,constantFrom:je,context:wm,createDepthIdentifier:ho,date:po,default:v6,defaultReportMessage:uc,dictionary:mo,domain:go,double:Ur,emailAddress:yc,entityGraph:Zm,falsy:ym,float:yo,float32Array:kc,float64Array:Cc,func:Hm,gen:lm,getDepthContextFor:fo,hasAsyncToStringMethod:ao,hasCloneMethod:mn,hasToStringMethod:so,hash:$r,infiniteStream:sg,int16Array:_c,int32Array:$c,int8Array:Mc,integer:W,ipV4:bo,ipV4Extended:Ec,ipV6:Ac,json:og,jsonValue:Dc,letrec:Ic,limitShrink:Lg,lorem:Qm,map:Di,mapToConstant:$n,maxSafeInteger:Sc,maxSafeNat:Ym,memo:eg,mixedCase:tg,modelRun:wg,nat:Kt,noBias:_r,noShrink:Mr,object:ig,oneof:Ce,option:At,pre:Ip,property:Lr,readConfigureGlobal:yt,record:zt,resetConfigureGlobal:zp,sample:am,scheduledModelRun:Sg,scheduler:Ag,schedulerFor:Ig,set:Rc,shuffledSubarray:lg,sparseArray:Fc,statistics:cm,stream:Jt,string:be,stringMatching:Rg,stringify:ke,subarray:ug,toStringMethod:bt,tuple:H,uint16Array:Oc,uint32Array:Pc,uint8Array:Nc,uint8ClampedArray:jc,ulid:hg,uniqueArray:Qt,uuid:Bi,webAuthority:Bc,webFragments:Uc,webPath:qc,webQueryParameters:Wc,webSegment:Vc,webUrl:zc},Symbol.toStringTag,{value:"Module"}));var yh={reset:[0,0],bold:[1,22,"\x1B[22m\x1B[1m"],dim:[2,22,"\x1B[22m\x1B[2m"],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]};function Hc(e){return String(e)}Hc.open="";Hc.close="";function I6(){let e=typeof process<"u"?process:void 0,t=(e==null?void 0:e.env)||{},n=t.FORCE_TTY!=="false",r=(e==null?void 0:e.argv)||[];return!("NO_COLOR"in t||r.includes("--no-color"))&&("FORCE_COLOR"in t||r.includes("--color")||(e==null?void 0:e.platform)==="win32"||n&&t.TERM!=="dumb"||"CI"in t)||typeof window<"u"&&!!window.chrome}function k6({force:e}={}){let t=e||I6(),n=(s,c,a,u)=>{let l="",f=0;do l+=s.substring(f,u)+a,f=u+c.length,u=s.indexOf(c,f);while(~u);return l+s.substring(f)},r=(s,c,a=s)=>{let u=l=>{let f=String(l),h=f.indexOf(c,s.length);return~h?s+n(f,c,a,h)+c:s+f+c};return u.open=s,u.close=c,u},i={isColorSupported:t},o=s=>`\x1B[${s}m`;for(let s in yh){let c=yh[s];i[s]=t?r(o(c[0]),o(c[1]),c[2]):Hc}return i}var C6=k6(),Me=C6;function Vg(e,t){return t.forEach(function(n){n&&typeof n!="string"&&!Array.isArray(n)&&Object.keys(n).forEach(function(r){if(r!=="default"&&!(r in e)){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}})}),Object.freeze(e)}function _6(e,t){const n=Object.keys(e),r=t===null?n:n.sort(t);if(Object.getOwnPropertySymbols)for(const i of Object.getOwnPropertySymbols(e))Object.getOwnPropertyDescriptor(e,i).enumerable&&r.push(i);return r}function Vr(e,t,n,r,i,o,s=": "){let c="",a=0,u=e.next();if(!u.done){c+=t.spacingOuter;const l=n+t.indent;for(;!u.done;){if(c+=l,a++===t.maxWidth){c+="…";break}const f=o(u.value[0],t,l,r,i),h=o(u.value[1],t,l,r,i);c+=f+s+h,u=e.next(),u.done?t.min||(c+=","):c+=`,${t.spacingInner}`}c+=t.spacingOuter+n}return c}function Yc(e,t,n,r,i,o){let s="",c=0,a=e.next();if(!a.done){s+=t.spacingOuter;const u=n+t.indent;for(;!a.done;){if(s+=u,c++===t.maxWidth){s+="…";break}s+=o(a.value,t,u,r,i),a=e.next(),a.done?t.min||(s+=","):s+=`,${t.spacingInner}`}s+=t.spacingOuter+n}return s}function Ui(e,t,n,r,i,o){let s="";e=e instanceof ArrayBuffer?new DataView(e):e;const c=u=>u instanceof DataView,a=c(e)?e.byteLength:e.length;if(a>0){s+=t.spacingOuter;const u=n+t.indent;for(let l=0;l<a;l++){if(s+=u,l===t.maxWidth){s+="…";break}(c(e)||l in e)&&(s+=o(c(e)?e.getInt8(l):e[l],t,u,r,i)),l<a-1?s+=`,${t.spacingInner}`:t.min||(s+=",")}s+=t.spacingOuter+n}return s}function Jc(e,t,n,r,i,o){let s="";const c=_6(e,t.compareKeys);if(c.length>0){s+=t.spacingOuter;const a=n+t.indent;for(let u=0;u<c.length;u++){const l=c[u],f=o(l,t,a,r,i),h=o(e[l],t,a,r,i);s+=`${a+f}: ${h}`,u<c.length-1?s+=`,${t.spacingInner}`:t.min||(s+=",")}s+=t.spacingOuter+n}return s}const $6=typeof Symbol=="function"&&Symbol.for?Symbol.for("jest.asymmetricMatcher"):1267621,ci=" ",M6=(e,t,n,r,i,o)=>{const s=e.toString();if(s==="ArrayContaining"||s==="ArrayNotContaining")return++r>t.maxDepth?`[${s}]`:`${s+ci}[${Ui(e.sample,t,n,r,i,o)}]`;if(s==="ObjectContaining"||s==="ObjectNotContaining")return++r>t.maxDepth?`[${s}]`:`${s+ci}{${Jc(e.sample,t,n,r,i,o)}}`;if(s==="StringMatching"||s==="StringNotMatching"||s==="StringContaining"||s==="StringNotContaining")return s+ci+o(e.sample,t,n,r,i);if(typeof e.toAsymmetricMatcher!="function")throw new TypeError(`Asymmetric matcher ${e.constructor.name} does not implement toAsymmetricMatcher()`);return e.toAsymmetricMatcher()},O6=e=>e&&e.$$typeof===$6,P6={serialize:M6,test:O6},N6=" ",qg=new Set(["DOMStringMap","NamedNodeMap"]),j6=/^(?:HTML\w*Collection|NodeList)$/;function F6(e){return qg.has(e)||j6.test(e)}const R6=e=>e&&e.constructor&&!!e.constructor.name&&F6(e.constructor.name);function L6(e){return e.constructor.name==="NamedNodeMap"}const D6=(e,t,n,r,i,o)=>{const s=e.constructor.name;return++r>t.maxDepth?`[${s}]`:(t.min?"":s+N6)+(qg.has(s)?`{${Jc(L6(e)?[...e].reduce((c,a)=>(c[a.name]=a.value,c),{}):{...e},t,n,r,i,o)}}`:`[${Ui([...e],t,n,r,i,o)}]`)},B6={serialize:D6,test:R6};function Wg(e){return e.replaceAll("<","<").replaceAll(">",">")}function Xc(e,t,n,r,i,o,s){const c=r+n.indent,a=n.colors;return e.map(u=>{const l=t[u];if(typeof l=="string"&&l[0]==="_"&&l.startsWith("__vitest_")&&l.match(/__vitest_\d+__/))return"";let f=s(l,n,c,i,o);return typeof l!="string"&&(f.includes(`
|
|
38
|
-
`)&&(f=n.spacingOuter+c+f+n.spacingOuter+r),f=`{${f}}`),`${n.spacingInner+r+a.prop.open+u+a.prop.close}=${a.value.open}${f}${a.value.close}`}).join("")}function
|
|
33
|
+
}`}return GE(o,{toString:{value:()=>s(ve(t))},[St]:{value:()=>s(ve(t))},[Ut]:{value:async()=>s(await po(t))},[Fe]:{value:r,configurable:!0}})};return r()})}const HE=Number.MIN_SAFE_INTEGER,YE=Number.MAX_SAFE_INTEGER;function Cc(){return new Jn(HE,YE)}const JE=Number.MAX_SAFE_INTEGER;function ag(){return new Jn(0,JE)}const XE=Number.parseInt;function ZE(e){const[t,n]=e;switch(t){case"oct":return`0${_r(n,8)}`;case"hex":return`0x${_r(n,16)}`;default:return`${n}`}}function ki(e,t){const n=XE(e,t);if(_r(n,t)!==e)throw new Error("Invalid value");return n}function QE(e){if(typeof e!="string")throw new Error("Invalid type");return e.length>=2&&e[0]==="0"?e[1]==="x"?["hex",ki(Te(e,2),16)]:["oct",ki(Te(e,1),8)]:["dec",ki(e,10)]}function eT(e){return Se(e,".")}function tT(e){if(typeof e!="string")throw new Error("Invalid type");return Q(rt(e,"."),t=>ki(t,10))}function To(){return H(Jt(255),Jt(255),Jt(255),Jt(255)).map(eT,tT)}function Ft(e){return H(je("dec","oct","hex"),Jt(e)).map(ZE,QE)}function ls(e){return Se(e,".")}function fs(e){if(typeof e!="string")throw new Error("Invalid type");return rt(e,".")}function _c(){return Ce(H(Ft(255),Ft(255),Ft(255),Ft(255)).map(ls,fs),H(Ft(255),Ft(255),Ft(65535)).map(ls,fs),H(Ft(255),Ft(16777215)).map(ls,fs),Ft(4294967295))}function $c(e){return e.length===0?[]:rt(e,":")}function Mc(e){const t=rt(e,":");return t.length>=2&&t[t.length-1].length<=4?[Be(t,0,t.length-2),`${t[t.length-2]}:${t[t.length-1]}`]:[Be(t,0,t.length-1),t[t.length-1]]}function nT(e){return`${Se(e[0],":")}:${e[1]}`}function rT(e){if(typeof e!="string")throw new Error("Invalid type");return Mc(e)}function iT(e){return`::${Se(e[0],":")}:${e[1]}`}function oT(e){if(typeof e!="string")throw new Error("Invalid type");if(!Xw(e,"::"))throw new Error("Invalid value");return Mc(Te(e,2))}function Ii(e){return`${Se(e[0],":")}::${Se(e[1],":")}:${e[2]}`}function Ci(e){if(typeof e!="string")throw new Error("Invalid type");const[t,n]=rt(e,"::",2),[r,i]=Mc(n);return[$c(t),r,i]}function sT(e){return Ii([e[0],[e[1]],e[2]])}function aT(e){const t=Ci(e);return[t[0],Se(t[1],":"),t[2]]}function Xf(e){return`${Se(e[0],":")}::${e[1]}`}function Zf(e){if(typeof e!="string")throw new Error("Invalid type");const[t,n]=rt(e,"::",2);return[$c(t),n]}function cT(e){return`${Se(e[0],":")}::`}function uT(e){if(typeof e!="string")throw new Error("Invalid type");if(!Zw(e,"::"))throw new Error("Invalid value");return[$c(Te(e,0,e.length-2))]}function lT([e,t]){return`${e}:${t}`}function fT(e){if(typeof e!="string")throw new D("Invalid type");if(!e.includes(":"))throw new D("Invalid value");return e.split(":",2)}const hT="0123456789abcdef";let hs;function dT(){return hs===void 0&&(hs=W({min:0,max:15}).map(e=>hT[e],e=>{if(typeof e!="string")throw new D("Not a string");if(e.length!==1)throw new D("Invalid length");const t=Hn(e,0);if(t<=57)return t-48;if(t<97)throw new D("Invalid character");return t-87})),hs}function Oc(){const e=be({unit:dT(),minLength:1,maxLength:4,size:"max"}),t=Ce(H(e,e).map(lT,fT),To());return Ce(H(ae(e,{minLength:6,maxLength:6,size:"max"}),t).map(nT,rT),H(ae(e,{minLength:5,maxLength:5,size:"max"}),t).map(iT,oT),H(ae(e,{minLength:0,maxLength:1,size:"max"}),ae(e,{minLength:4,maxLength:4,size:"max"}),t).map(Ii,Ci),H(ae(e,{minLength:0,maxLength:2,size:"max"}),ae(e,{minLength:3,maxLength:3,size:"max"}),t).map(Ii,Ci),H(ae(e,{minLength:0,maxLength:3,size:"max"}),ae(e,{minLength:2,maxLength:2,size:"max"}),t).map(Ii,Ci),H(ae(e,{minLength:0,maxLength:4,size:"max"}),e,t).map(sT,aT),H(ae(e,{minLength:0,maxLength:5,size:"max"}),t).map(Xf,Zf),H(ae(e,{minLength:0,maxLength:6,size:"max"}),e).map(Xf,Zf),H(ae(e,{minLength:0,maxLength:7,size:"max"})).map(cT,uT))}var pT=class extends xe{constructor(e){super(),this.name=e,this.underlying=null}generate(e,t){if(this.underlying===null)throw new Error(`Lazy arbitrary ${JSON.stringify(this.name)} not correctly initialized`);return this.underlying.generate(e,t)}canShrinkWithoutContext(e){if(this.underlying===null)throw new Error(`Lazy arbitrary ${JSON.stringify(this.name)} not correctly initialized`);return this.underlying.canShrinkWithoutContext(e)}shrink(e,t){if(this.underlying===null)throw new Error(`Lazy arbitrary ${JSON.stringify(this.name)} not correctly initialized`);return this.underlying.shrink(e,t)}};const mT=Object.getOwnPropertyNames;function gT(){const e=new Zt;return n=>{let r=mt(e,n);return r!==void 0||(r=new pT(String(n)),At(e,n,r)),r}}function Pc(e){const t=gT(),n=e(t),r=mT(n);for(const i of r){const o=t(i);o.underlying=n[i]}return n}function yT(e,t){for(const n of e){const r=t[n]||{};if(r.maxLength===void 0||r.maxLength>0)return!0}return!1}function bT(e,t){if(e.length===0)return we([]);if(!yT(e,t))throw new D("Contraints on pool must accept at least one entity, maxLength cannot sum to 0");return H(...e.map(n=>ae(we(n),t[n]))).map(n=>kw(n)).filter(n=>n.length>0)}const Qf=Object.assign,_i=Object.create,cg=Object.defineProperty,eh=Object.getPrototypeOf,wT=Object.prototype;function xT(e){return cg(_i(null),St,{configurable:!1,enumerable:!1,writable:!1,value:()=>e})}function th(e,t){return xT(`<${nt(e)}#${t}>`)}function ST(e,t){const n=_i(wT);for(const r in e){const i=e[r],o=[];for(const s of i){const c=Qf(_i(eh(s)),s);o.push(c)}n[r]=o}for(const r in t){const i=t[r];for(let o=0;o!==i.length;++o){const s=i[o],c=n[r][o];for(const a in s){const u=s[a];c[a]=u.index===void 0?void 0:typeof u.index=="number"?n[u.type][u.index]:Q(u.index,l=>n[u.type][l])}cg(c,St,{configurable:!1,enumerable:!1,writable:!1,value:()=>{const a=e[r][o],u=Qf(_i(eh(a)),a);for(const l in s){const f=s[l];u[l]=f.index===void 0?void 0:typeof f.index=="number"?th(f.type,f.index):Q(f.index,h=>th(f.type,h))}return ve(u)}})}}return n}function ET(e){let t=0;const n=new Zt;for(const i in e){const o=e[i];for(const s in o){const c=o[s];if(c.arity!=="inverse")continue;let a=mt(n,c.type);if(a===void 0&&(a=new Zt,At(n,c.type,a)),Bw(a,c.forwardRelationship))throw new D(`Cannot declare multiple inverse relationships for the same forward relationship ${nt(c.forwardRelationship)} on type ${nt(c.type)}`);At(a,c.forwardRelationship,{type:i,property:s}),t+=1}}const r=new Zt;if(t===0)return r;for(const i in e){const o=e[i],s=mt(n,i);if(s!==void 0)for(const c in o){const a=o[c];if(a.arity==="inverse")continue;const u=mt(s,c);if(u!==void 0){if(u.type!==a.type)throw new D(`Inverse relationship ${nt(u.property)} on type ${nt(u.type)} references forward relationship ${nt(c)} but types do not match`);At(r,a,u)}}}if(r.size!==t)throw new D("Some inverse relationships could not be matched with their corresponding forward relationships");return r}const nh=Object.assign,Vi=Object.create;function TT(e,t,n){switch(e){case"exclusive":return we(n);case"successor":return Or(W({min:t!==void 0?t+1:0,max:n}));case"any":return Or(W({min:0,max:n}))}}function vT(e,t,n,r,i){const o=TT(t,n,r);switch(e){case"0-1":return Ct(o,{nil:void 0,depthIdentifier:i});case"1":return o;case"many":{let s=0;return Ct(tn(o,{depthIdentifier:i,selector:c=>c===r?c+ ++s:c,minLength:1}),{nil:[],depthIdentifier:i}).map(c=>{let a=0;return Q(c,u=>u===r?u+a++:u)})}}}function ug(e,t){const n=Vi(null),r=e[t];for(const i in r){const o=r[i];o.arity==="inverse"&&(n[i]={type:o.type,index:[]})}return n}function AT(e){const t=new It,n=new It;for(const r in e){const i=e[r];for(const o in i){const s=i[o];if(s.arity!=="inverse"){if(s.strategy==="exclusive"){if(hn(t,s.type))throw new D(`Cannot mix exclusive with other strategies for type ${nt(s.type)}`);Cr(n,s.type)}else{if(hn(n,s.type))throw new D(`Cannot mix exclusive with other strategies for type ${nt(s.type)}`);Cr(t,s.type)}if(s.strategy==="successor"&&s.type!==r)throw new D("Cannot mix types for the strategy successor");if(s.strategy==="successor"&&s.arity==="1")throw new D("Cannot use an arity of 1 for the strategy successor")}}}}function kT(e,t){const{producedLinks:n,toBeProducedEntities:r}=e,i=e.nextIndex+t,o=nh(Vi(null),n);function s(f){return o[f]===n[f]&&(o[f]=Be(n[f])),o[f]}function c(f,h){const d=s(f);return d[h]===n[f][h]&&(d[h]=nh(Vi(null),n[f][h])),d[h]}function a(f,h,d){const m=c(f,h),p=n[f][h];if(p!==void 0&&m[d]===p[d]){const y=m[d];m[d]={type:y.type,index:typeof y.index=="object"?Be(y.index):y.index}}return m[d]}let u;const l=r[i];return{setOutboundLink:(f,h)=>{const d=c(l.type,l.indexInType);d[f]=h},enqueueNewEntity:(f,h)=>{const d=s(h),m=d.length;return u===void 0&&(u=Be(r)),N(u,{type:h,indexInType:m,depth:l.depth+1}),N(d,ug(f,h)),m},appendBackReference:(f,h,d)=>{const m=a(f,h,d).index;N(m,l.indexInType)},commit:()=>({producedLinks:o,toBeProducedEntities:u!==void 0?u:r,nextIndex:i+1})}}function IT(e,t){const n=Vi(null);for(const i in e)n[i]=[];const r=[];for(const i of t)N(r,{type:i,indexInType:n[i].length,depth:0}),N(n[i],ug(e,i));return{producedLinks:n,toBeProducedEntities:r,nextIndex:0}}function CT(e,t,n,r){const i=n.producedLinks,o=n.toBeProducedEntities[n.nextIndex+r],s=e[o.type],c=bo();c.depth=o.depth;const a=[],u=[];for(const l in s){const f=s[l];if(f.arity==="inverse")continue;const h=f.type,d=i[h].length;N(a,vT(f.arity,f.strategy||"any",h===o.type?o.indexInType:void 0,d,c)),N(u,{name:l,relation:f,sentinelLinkIndex:d})}if(a.length!==0)return H(...a).map(l=>{const f=kT(n,r);for(let h=0;h!==l.length;++h){const d=l[h],{name:m,relation:p,sentinelLinkIndex:y}=u[h],x=[],E=d===void 0?[]:typeof d=="number"?[d]:d;for(const $ of E){let I;$>=y?I=f.enqueueNewEntity(e,p.type):I=$,N(x,I);const _=mt(t,p);_!==void 0&&f.appendBackReference(p.type,I,_.property)}f.setOutboundLink(m,{type:p.type,index:d===void 0?void 0:typeof d=="number"?x[0]:x})}return f.commit()})}function _T(e,t){AT(e);const n=ET(e);return xc(we(IT(e,t)),r=>{if(r.nextIndex>=r.toBeProducedEntities.length)return;let i=0,o;for(;o===void 0&&r.nextIndex+i<r.toBeProducedEntities.length;)o=CT(e,n,r,i),i+=1;return o}).map(r=>r.producedLinks)}const $T=Object.keys,MT=Object.getOwnPropertySymbols,OT=Object.getOwnPropertyDescriptor;function PT(e){const t=$T(e),n=MT(e);for(let r=0;r!==n.length;++r){const i=n[r],o=OT(e,i);o&&o.enumerable&&t.push(i)}return t}const NT=Object.create,jT=Object.defineProperty,FT=Object.getOwnPropertyDescriptor,RT=Object.getOwnPropertyNames,LT=Object.getOwnPropertySymbols;function DT(e,t){return function(r){const i=r[r.length-1]?NT(null):{};for(let o=0;o!==e.length;++o){const s=r[o];if(s!==t){const c=e[o];c==="__proto__"?jT(i,c,{value:s,configurable:!0,enumerable:!0,writable:!0}):i[c]=s}}return i}}function BT(e,t){return function(r){if(typeof r!="object"||r===null)throw new Error("Incompatible instance received: should be a non-null object");const i=Object.getPrototypeOf(r)===null,o="constructor"in r&&r.constructor===Object;if(!i&&!o)throw new Error("Incompatible instance received: should be of exact type Object");let s=0;const c=[];for(let l=0;l!==e.length;++l){const f=FT(r,e[l]);if(f!==void 0){if(!f.configurable||!f.enumerable||!f.writable)throw new Error("Incompatible instance received: should contain only c/e/w properties");if(f.get!==void 0||f.set!==void 0)throw new Error("Incompatible instance received: should contain only no get/set properties");++s,N(c,f.value)}else N(c,t)}const a=RT(r).length,u=LT(r).length;if(s!==a+u)throw new Error("Incompatible instance received: should not contain extra properties");return[...c,i]}}const ds=Symbol("no-key");function ps(e,t,n){const r=PT(e),i=[];for(let o=0;o!==r.length;++o){const s=r[o],c=e[s];t===void 0||Ir(t,s)!==-1?N(i,c):N(i,Ct(c,{nil:ds}))}return H(...i,n?we(!1):Dt()).map(DT(r,ds),BT(r,ds))}function Ht(e,t){const n=t!==void 0&&!!t.noNullPrototype;if(t===void 0||!("requiredKeys"in t&&t.requiredKeys!==void 0))return ps(e,void 0,n);const r=("requiredKeys"in t?t.requiredKeys:void 0)||[];for(let i=0;i!==r.length;++i){const o=Object.getOwnPropertyDescriptor(e,r[i]);if(o===void 0)throw new Error("requiredKeys cannot reference keys that have not been defined in recordModel");if(!o.enumerable)throw new Error("requiredKeys cannot reference keys that are not enumerable in recordModel")}return ps(e,r,n)}const UT=Object.create;function VT(e,t,n,r){const i=UT(null);for(const o in e){const s=e[o],c=Ht(s,r),a=t(o),u=n(o),l={minLength:a,maxLength:a};i[o]=u!==void 0?tn(c,{...l,selector:u}):ae(c,l)}return Ht(i)}const rh=Object.create,qT=Object.keys;function lg(e,t,n={}){const r=qT(e),i=n.initialPoolConstraints||rh(null),o=n.unicityConstraints||rh(null),s={noNullPrototype:n.noNullPrototype};return bT(r,i).chain(c=>_T(t,c).chain(a=>VT(e,u=>a[u].length,u=>o[u],s).map(u=>ST(u,a))))}function WT(e){return Se(Q(e,t=>t[t.length-1]===","?Te(t,0,t.length-1):t)," ")}function zT(e){return function(n){if(typeof n!="string")throw new Error("Unsupported type");const r=[];for(const i of rt(n," "))if(e.canShrinkWithoutContext(i))N(r,i);else if(e.canShrinkWithoutContext(i+","))N(r,i+",");else throw new Error("Unsupported word");return r}}function GT(e){let t=Se(e," ");return t[t.length-1]===","&&(t=Te(t,0,t.length-1)),lc(t[0])+Te(t,1)+"."}function KT(e){return function(n){if(typeof n!="string")throw new Error("Unsupported type");if(n.length<2||n[n.length-1]!=="."||n[n.length-2]===","||lc(la(n[0]))!==n[0])throw new Error("Unsupported value");const r=la(n[0])+Te(n,1,n.length-1),i=[],o=rt(r," ");for(let s=0;s!==o.length;++s){const c=o[s];if(e.canShrinkWithoutContext(c))N(i,c);else if(s===o.length-1&&e.canShrinkWithoutContext(c+","))N(i,c+",");else throw new Error("Unsupported word")}return i}}function HT(e){return Se(e," ")}function YT(e){if(typeof e!="string")throw new Error("Unsupported type");const t=rt(e,". ");for(let n=0;n<t.length-1;++n)t[n]+=".";return t}const k=(e,t)=>({arbitrary:we(e),weight:t});function JT(){return Ce(k("non",6),k("adipiscing",5),k("ligula",5),k("enim",5),k("pellentesque",5),k("in",5),k("augue",5),k("et",5),k("nulla",5),k("lorem",4),k("sit",4),k("sed",4),k("diam",4),k("fermentum",4),k("ut",4),k("eu",4),k("aliquam",4),k("mauris",4),k("vitae",4),k("felis",4),k("ipsum",3),k("dolor",3),k("amet,",3),k("elit",3),k("euismod",3),k("mi",3),k("orci",3),k("erat",3),k("praesent",3),k("egestas",3),k("leo",3),k("vel",3),k("sapien",3),k("integer",3),k("curabitur",3),k("convallis",3),k("purus",3),k("risus",2),k("suspendisse",2),k("lectus",2),k("nec,",2),k("ultricies",2),k("sed,",2),k("cras",2),k("elementum",2),k("ultrices",2),k("maecenas",2),k("massa,",2),k("varius",2),k("a,",2),k("semper",2),k("proin",2),k("nec",2),k("nisl",2),k("amet",2),k("duis",2),k("congue",2),k("libero",2),k("vestibulum",2),k("pede",2),k("blandit",2),k("sodales",2),k("ante",2),k("nibh",2),k("ac",2),k("aenean",2),k("massa",2),k("suscipit",2),k("sollicitudin",2),k("fusce",2),k("tempus",2),k("aliquam,",2),k("nunc",2),k("ullamcorper",2),k("rhoncus",2),k("metus",2),k("faucibus,",2),k("justo",2),k("magna",2),k("at",2),k("tincidunt",2),k("consectetur",1),k("tortor,",1),k("dignissim",1),k("congue,",1),k("non,",1),k("porttitor,",1),k("nonummy",1),k("molestie,",1),k("est",1),k("eleifend",1),k("mi,",1),k("arcu",1),k("scelerisque",1),k("vitae,",1),k("consequat",1),k("in,",1),k("pretium",1),k("volutpat",1),k("pharetra",1),k("tempor",1),k("bibendum",1),k("odio",1),k("dui",1),k("primis",1),k("faucibus",1),k("luctus",1),k("posuere",1),k("cubilia",1),k("curae,",1),k("hendrerit",1),k("velit",1),k("mauris,",1),k("gravida",1),k("ornare",1),k("ut,",1),k("pulvinar",1),k("varius,",1),k("turpis",1),k("nibh,",1),k("eros",1),k("id",1),k("aliquet",1),k("quis",1),k("lobortis",1),k("consectetuer",1),k("morbi",1),k("vehicula",1),k("tortor",1),k("tellus,",1),k("id,",1),k("eu,",1),k("quam",1),k("feugiat,",1),k("posuere,",1),k("iaculis",1),k("lectus,",1),k("tristique",1),k("mollis,",1),k("nisl,",1),k("vulputate",1),k("sem",1),k("vivamus",1),k("placerat",1),k("imperdiet",1),k("cursus",1),k("rutrum",1),k("iaculis,",1),k("augue,",1),k("lacus",1))}function fg(e={}){const{maxCount:t,mode:n="words",size:r}=e;if(t!==void 0&&t<1)throw new Error("lorem has to produce at least one word/sentence");const i=JT();return n==="sentences"?ae(ae(i,{minLength:1,size:"small"}).map(GT,KT(i)),{minLength:1,maxLength:t,size:r}).map(HT,YT):ae(i,{minLength:1,maxLength:t,size:r}).map(WT,zT(i))}function XT(e){return new Map(e)}function ZT(e){if(typeof e!="object"||e===null)throw new Error("Incompatible instance received: should be a non-null object");if(!("constructor"in e)||e.constructor!==Map)throw new Error("Incompatible instance received: should be of exact type Map");return Array.from(e)}function QT(e){return e[0]}function qi(e,t,n={}){return tn(H(e,t),{minLength:n.minKeys,maxLength:n.maxKeys,size:n.size,selector:QT,depthIdentifier:n.depthIdentifier,comparator:"SameValueZero"}).map(XT,ZT)}let ai=10;function hg(e){const t={};return(n=>{const r=n!==void 0?n:ai;if(!Yp(t,r)){const i=ai;ai=r-1,t[r]=e(r),ai=i}return t[r]})}function ev(e){let t=0;for(;e>F(0);)e&F(1)&&++t,e>>=F(1);return t}function tv(e,t){const n=(F(1)<<F(t))-F(1),r=e&n;let i=ev(e-r),o=r;for(let s=F(1);s<=n&&i!==0;s<<=F(1))o&s||(o|=s,--i);return o}function ci(e,t){const n=[];for(let r=e.length-1;r!==-1;--r)t(e[r])!==e[r]&&N(n,r);return n}function nv(e,t,n){let r=F(0);for(let i=0,o=F(1);i!==n.length;++i,o<<=F(1))e[n[i]]!==t[n[i]]&&(r|=o);return r}function ms(e,t,n,r){for(let i=0,o=F(1);i!==n.length;++i,o<<=F(1))t&o&&(e[n[i]]=r(e[n[i]]))}var rv=class extends xe{constructor(e,t,n){super(),this.stringArb=e,this.toggleCase=t,this.untoggleAll=n}buildContextFor(e,t){return{rawString:e.value,rawStringContext:e.context,flags:t.value,flagsContext:t.context}}generate(e,t){const n=this.stringArb.generate(e,t),r=[...n.value],i=ci(r,this.toggleCase),o=en(F(0),(F(1)<<F(i.length))-F(1)).generate(e,void 0);return ms(r,o.value,i,this.toggleCase),new L(Se(r,""),this.buildContextFor(n,o))}canShrinkWithoutContext(e){return typeof e!="string"?!1:this.untoggleAll!==void 0?this.stringArb.canShrinkWithoutContext(this.untoggleAll(e)):this.stringArb.canShrinkWithoutContext(e)}shrink(e,t){let n;if(t!==void 0)n=t;else if(this.untoggleAll!==void 0){const o=this.untoggleAll(e),s=[...e],c=[...o];n={rawString:o,rawStringContext:void 0,flags:nv(c,s,ci(c,this.toggleCase)),flagsContext:void 0}}else n={rawString:e,rawStringContext:void 0,flags:F(0),flagsContext:void 0};const r=n.rawString,i=n.flags;return this.stringArb.shrink(r,n.rawStringContext).map(o=>{const s=[...o.value],c=ci(s,this.toggleCase),a=tv(i,c.length);return ms(s,a,c,this.toggleCase),new L(Se(s,""),this.buildContextFor(o,new L(a,void 0)))}).join(dn(()=>{const o=[...r],s=ci(o,this.toggleCase);return en(F(0),(F(1)<<F(s.length))-F(1)).shrink(i,n.flagsContext).map(c=>{const a=Be(o);return ms(a,c.value,s,this.toggleCase),new L(Se(a,""),this.buildContextFor(new L(r,n.rawStringContext),c))})}))}};function iv(e){const t=lc(e);return t!==e?t:la(e)}function dg(e,t){return new rv(e,t&&t.toggleCase||iv,t&&t.untoggleAll)}function ov(e){return Vp.from(e)}function sv(e){if(!(e instanceof Vp))throw new Error("Unexpected type");return[...e]}function Nc(e={}){return ae(Eo(e),e).map(ov,sv)}function av(e){return qp.from(e)}function cv(e){if(!(e instanceof qp))throw new Error("Unexpected type");return[...e]}function jc(e={}){return ae(Wr(e),e).map(av,cv)}function nn(e,t,n,r,i){const o=r.name,{min:s=t,max:c=n,...a}=e;if(s>c)throw new Error(`Invalid range passed to ${o}: min must be lower than or equal to max`);if(s<t)throw new Error(`Invalid min value passed to ${o}: min must be greater than or equal to ${t}`);if(c>n)throw new Error(`Invalid max value passed to ${o}: max must be lower than or equal to ${n}`);return ae(i({min:s,max:c}),a).map(u=>r.from(u),u=>{if(!(u instanceof r))throw new Error("Invalid type");return[...u]})}function Fc(e={}){return nn(e,-32768,32767,aw,W)}function Rc(e={}){return nn(e,-2147483648,2147483647,cw,W)}function Lc(e={}){return nn(e,-128,127,sw,W)}function Dc(e={}){return nn(e,0,65535,fw,W)}function Bc(e={}){return nn(e,0,4294967295,hw,W)}function Uc(e={}){return nn(e,0,255,uw,W)}function Vc(e={}){return nn(e,0,255,lw,W)}function uv(e){return e!==void 0}function ih(e){return e.hasToBeCloned?new L(e.value_,{generatorContext:e.context},()=>e.value):new L(e.value_,{generatorContext:e.context})}function oh(e){return e.hasToBeCloned?new L(e.value_,{shrinkerContext:e.context},()=>e.value):new L(e.value_,{shrinkerContext:e.context})}var lv=class extends xe{constructor(e,t){super(),this.generatorArbitrary=e,this.shrinkerArbitrary=t}generate(e,t){return ih(this.generatorArbitrary.generate(e,t))}canShrinkWithoutContext(e){return this.shrinkerArbitrary.canShrinkWithoutContext(e)}shrink(e,t){return uv(t)?"generatorContext"in t?this.generatorArbitrary.shrink(e,t.generatorContext).map(ih):this.shrinkerArbitrary.shrink(e,t.shrinkerContext).map(oh):this.shrinkerArbitrary.shrink(e,void 0).map(oh)}};function Aa(e,t,n){const r=W({min:e,max:t});return t===n?r:new lv(r,W({min:e,max:n}))}const fv=Math.min,ka=Math.max,sh=Bp.isArray,hv=Object.entries;function dv(e){let t=-1;for(let n=0;n!==e.length;++n)t=ka(t,e[n][0]);return t}function pv(e,t){const n=Bp(e);for(let r=0;r!==t.length;++r){const i=t[r];i[0]<e&&(n[i[0]]=i[1])}return n}function qc(e,t={}){const{size:n,minNumElements:r=0,maxLength:i=Mn,maxNumElements:o=i,noTrailingHole:s,depthIdentifier:c}=t,a=Mr(n,Mr(n,r,o,t.maxNumElements!==void 0),i,t.maxLength!==void 0);if(r>i)throw new Error("The minimal number of non-hole elements cannot be higher than the maximal length of the array");if(r>o)throw new Error("The minimal number of non-hole elements cannot be higher than the maximal number of non-holes");const u=fv(o,i),l=t.maxNumElements!==void 0||n!==void 0?n:"=",f=tn(H(Aa(0,ka(a-1,0),ka(i-1,0)),e),{size:l,minLength:r,maxLength:u,selector:h=>h[0],depthIdentifier:c}).map(h=>pv(dv(h)+1,h),h=>{if(!sh(h))throw new Error("Not supported entry type");if(s&&h.length!==0&&!(h.length-1 in h))throw new Error("No trailing hole");return Q(hv(h),d=>[Number(d[0]),d[1]])});return s||i===r?f:H(f,Aa(r,a,i)).map(h=>{const d=h[0],m=h[1];if(d.length>=m)return d;const p=Be(d);return p.length=m,p},h=>{if(!sh(h))throw new Error("Not supported entry type");return[h,h.length]})}function mv(e){return new Set(e)}function gv(e){if(typeof e!="object"||e===null)throw new Error("Incompatible instance received: should be a non-null object");if(!("constructor"in e)||e.constructor!==Set)throw new Error("Incompatible instance received: should be of exact type Set");return Array.from(e)}function Wc(e,t={}){return tn(e,{minLength:t.minLength,maxLength:t.maxLength,size:t.size,depthIdentifier:t.depthIdentifier,comparator:"SameValueZero"}).map(mv,gv)}function yv(e,t,n,r,i,o){return xo(e,t,{maxKeys:n,noNullPrototype:!o,size:r,depthIdentifier:i})}function bv(e){return Ce(Lc(e),Uc(e),Vc(e),Fc(e),Dc(e),Rc(e),Bc(e),Nc(e),jc(e))}function pg(e){const t=e.values,n=e.depthSize,r=bo(),i=e.maxDepth,o=e.maxKeys,s=e.size,c=Ce(...t,...e.withBigInt?[en()]:[],...e.withDate?[wo()]:[]);return Pc(a=>({anything:Ce({maxDepth:i,depthSize:n,depthIdentifier:r},c,a("array"),a("object"),...e.withMap?[a("map")]:[],...e.withSet?[a("set")]:[],...e.withObjectString?[a("anything").map(u=>ve(u))]:[],...e.withTypedArray?[bv({maxLength:o,size:s})]:[],...e.withSparseArray?[qc(a("anything"),{maxNumElements:o,size:s,depthIdentifier:r})]:[]),keys:e.withObjectString?Ce({arbitrary:e.key,weight:10},{arbitrary:a("anything").map(u=>ve(u)),weight:1}):e.key,array:ae(a("anything"),{maxLength:o,size:s,depthIdentifier:r}),set:Wc(a("anything"),{maxLength:o,size:s,depthIdentifier:r}),map:Ce(qi(a("keys"),a("anything"),{maxKeys:o,size:s,depthIdentifier:r}),qi(a("anything"),a("anything"),{maxKeys:o,size:s,depthIdentifier:r})),object:yv(a("keys"),a("anything"),o,s,r,e.withNullPrototype)})).anything}function wv(e){switch(typeof e){case"boolean":return new Up(e);case"number":return new Xt(e);case"string":return new nt(e);default:return e}}function xv(e){return typeof e!="object"||e===null||!("constructor"in e)?e:e.constructor===Up||e.constructor===Xt||e.constructor===nt?e.valueOf():e}function Sv(e){return e.map(wv,xv)}function Ev(e,t){return[Dt(),Cc(),Wr(),t(e),Ce(t(e),we(null),we(void 0))]}function Tv(e){return e.map(t=>Sv(t))}function vv(e,t){return t?Tv(e).concat(e):e}function mg(e={}){const t={size:e.size,unit:"stringUnit"in e?e.stringUnit:e.withUnicodeString?"binary":void 0};return{key:e.key!==void 0?e.key:be(t),values:vv(e.values!==void 0?e.values:Ev(t,be),e.withBoxedValues===!0),depthSize:e.depthSize,maxDepth:e.maxDepth,maxKeys:e.maxKeys,size:e.size,withSet:e.withSet===!0,withMap:e.withMap===!0,withObjectString:e.withObjectString===!0,withNullPrototype:e.withNullPrototype===!0,withBigInt:e.withBigInt===!0,withDate:e.withDate===!0,withTypedArray:e.withTypedArray===!0,withSparseArray:e.withSparseArray===!0}}function Av(e){return xo(e.key,pg(e),{maxKeys:e.maxKeys,noNullPrototype:!e.withNullPrototype,size:e.size})}function gg(e){return Av(mg(e))}function kv(e,t){const{depthSize:n,maxDepth:r}=t;return{key:e,values:[Dt(),Wr({noDefaultInfinity:!0,noNaN:!0}),e,we(null)],depthSize:n,maxDepth:r}}function zc(e){return pg(mg(e))}function Gc(e={}){const t=e.noUnicodeString===void 0||e.noUnicodeString===!0;return zc(kv("stringUnit"in e?be({unit:e.stringUnit}):t?be():be({unit:"binary"}),e))}const Iv=JSON.stringify,Cv=JSON.parse;function _v(e){if(typeof e!="string")throw new D("Cannot unmap the passed value");return Cv(e)}function yg(e={}){return Gc(e).map(Iv,_v)}const $v=Object.defineProperties;function gs(e,t){return`Stream(${t!==void 0?`${Se(t,",")}…`:`${e} emitted`})`}var Mv=class extends xe{constructor(e,t){super(),this.arb=e,this.history=t}generate(e,t){const n=t!==void 0&&e.nextInt(1,t)===1?t:void 0,r=()=>{const i=this.history?[]:null;let o=0;const s=function*(a,u){for(;;){const l=a.generate(u,n).value;o++,i!==null&&N(i,l),yield l}},c=new J(s(this.arb,e.clone()));return $v(c,{toString:{value:()=>gs(o,i!==null?i.map(ve):void 0)},[St]:{value:()=>gs(o,i!==null?i.map(ve):void 0)},[Ut]:{value:async()=>gs(o,i!==null?await Promise.all(i.map(po)):void 0)},[Fe]:{value:r,enumerable:!0}})};return new L(r(),void 0)}canShrinkWithoutContext(e){return!1}shrink(e,t){return J.nil()}};function bg(e,t){return new Mv(e,t!==void 0&&typeof t=="object"&&"noHistory"in t?!t.noHistory:!0)}function Ov(e){return Se(e,"")}function ah(e){if(typeof e!="string")throw new Error("Cannot unmap the passed value");return[...e]}function Pv(e){switch(e.length%4){case 0:return e;case 3:return`${e}=`;case 2:return`${e}==`;default:return Te(e,1)}}function Nv(e){if(typeof e!="string"||e.length%4!==0)throw new Error("Invalid string received");const t=e.indexOf("=");if(t===-1)return e;if(e.length-t>2)throw new Error("Cannot unmap the passed value");return Te(e,0,t)}const ys=String.fromCharCode;function jv(e){return e<26?ys(e+65):e<52?ys(e+97-26):e<62?ys(e+48-52):e===62?"+":"/"}function Fv(e){if(typeof e!="string"||e.length!==1)throw new D("Invalid entry");const t=Hn(e,0);return t>=65&&t<=90?t-65:t>=97&&t<=122?t-97+26:t>=48&&t<=57?t-48+52:t===43?62:t===47?63:-1}function Rv(){return W({min:0,max:63}).map(jv,Fv)}function wg(e={}){const{minLength:t=0,maxLength:n=Mn,size:r}=e,i=t+3-(t+3)%4,o=n-n%4,s=e.maxLength===void 0&&r===void 0?"=":r;if(i>o)throw new D("Minimal length should be inferior or equal to maximal length");if(i%4!==0)throw new D("Minimal length of base64 strings must be a multiple of 4");if(o%4!==0)throw new D("Maximal length of base64 strings must be a multiple of 4");const c=Rv();return ae(c,{minLength:i,maxLength:o,size:s,experimentalCustomSlices:CS(c,ah)}).map(Ov,ah).map(Pv,Nv)}const ch=Object.is;function Lv(e,t){const n=new Zt;let r=0;for(const i of e)ch(i,-0)?++r:At(n,i,(mt(n,i)||0)+1);for(let i=0;i!==t.length;++i){if(!(i in t))return!1;const o=t[i];if(ch(o,-0)){if(r===0)return!1;--r}else{const s=mt(n,o)||0;if(s===0)return!1;At(n,o,s-1)}}return!0}const Dv=Math.floor,uh=Math.log,Bv=Array.isArray;var xg=class extends xe{constructor(e,t,n,r){if(super(),this.originalArray=e,this.isOrdered=t,this.minLength=n,this.maxLength=r,n<0||n>e.length)throw new Error("fc.*{s|S}ubarrayOf expects the minimal length to be between 0 and the size of the original array");if(r<0||r>e.length)throw new Error("fc.*{s|S}ubarrayOf expects the maximal length to be between 0 and the size of the original array");if(n>r)throw new Error("fc.*{s|S}ubarrayOf expects the minimal length to be inferior or equal to the maximal length");this.lengthArb=new Jn(n,r),this.biasedLengthArb=n!==r?new Jn(n,n+Dv(uh(r-n)/uh(2))):this.lengthArb}generate(e,t){const n=(t!==void 0&&e.nextInt(1,t)===1?this.biasedLengthArb:this.lengthArb).generate(e,void 0),r=n.value,i=Q(this.originalArray,(s,c)=>c),o=[];for(let s=0;s!==r;++s){const c=e.nextInt(0,i.length-1);N(o,i[c]),Gp(i,c,1)}return this.isOrdered&&Kp(o,(s,c)=>s-c),new L(Q(o,s=>this.originalArray[s]),n.context)}canShrinkWithoutContext(e){return!Bv(e)||!this.lengthArb.canShrinkWithoutContext(e.length)?!1:Lv(this.originalArray,e)}shrink(e,t){return e.length===0?J.nil():this.lengthArb.shrink(e.length,t).map(n=>new L(Be(e,e.length-n.value),n.context)).join(e.length>this.minLength?dn(()=>this.shrink(Be(e,1),void 0).filter(n=>this.minLength<=n.value.length+1).map(n=>new L([e[0],...n.value],void 0))):J.nil())}};function Sg(e,t={}){const{minLength:n=0,maxLength:r=e.length}=t;return new xg(e,!0,n,r)}function Eg(e,t={}){const{minLength:n=0,maxLength:r=e.length}=t;return new xg(e,!1,n,r)}const Uv={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F",16:"G",17:"H",18:"J",19:"K",20:"M",21:"N",22:"P",23:"Q",24:"R",25:"S",26:"T",27:"V",28:"W",29:"X",30:"Y",31:"Z"},Vv={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,G:16,H:17,J:18,K:19,M:20,N:21,P:22,Q:23,R:24,S:25,T:26,V:27,W:28,X:29,Y:30,Z:31};function qv(e){return e<10?nt(e):Uv[e]}function lh(e,t){let n="";for(;e.length+n.length<t;)n+="0";return n+e}function fh(e){let t="";for(let n=e;n!==0;){const r=n>>5;t=qv(n-(r<<5))+t,n=r}return t}function Wv(e,t){const n=~~(e/1073741824),r=e&1073741823;return lh(fh(n),t-6)+lh(fh(r),6)}function Tg(e){return function(n){return Wv(n,e)}}function bs(e){if(typeof e!="string")throw new D("Unsupported type");let t=0,n=1;for(let r=e.length-1;r>=0;--r){const i=e[r],o=Vv[i];if(o===void 0)throw new D("Unsupported type");t+=o*n,n*=32}return t}const zv=Tg(10),hh=Tg(8);function Gv(e){return zv(e[0])+hh(e[1])+hh(e[2])}function Kv(e){if(typeof e!="string"||e.length!==26)throw new Error("Unsupported type");return[bs(e.slice(0,10)),bs(e.slice(10,18)),bs(e.slice(18))]}function vg(){return H(W({min:0,max:0xffffffffffff}),W({min:0,max:0xffffffffff}),W({min:0,max:0xffffffffff})).map(Gv,Kv)}function Ag(e){return Qw(_r(e,16),8,"0")}function Hv(e){if(typeof e!="string")throw new Error("Unsupported type");if(e.length!==8)throw new Error("Unsupported value: invalid length");const t=parseInt(e,16);if(e!==Ag(t))throw new Error("Unsupported value: invalid content");return t}function ws(e,t){return W({min:e,max:t}).map(Ag,Hv)}function Yv(e){return`${e[0]}-${Te(e[1],4)}-${Te(e[1],0,4)}-${Te(e[2],0,4)}-${Te(e[2],4)}${e[3]}`}const Jv=/^([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/;function Xv(e){if(typeof e!="string")throw new Error("Unsupported type");const t=Jv.exec(e);if(t===null)throw new Error("Unsupported type");return[t[1],t[3]+t[2],t[4]+Te(t[5],0,4),Te(t[5],4)]}const dh="0123456789abcdef";function Zv(e){const t={},n={};for(let o=0;o!==e.length;++o){const s=dh[o],c=dh[e[o]];t[s]=c,n[c]=s}function r(o){return t[o[0]]+Te(o,1)}function i(o){if(typeof o!="string")throw new D("Cannot produce non-string values");const s=n[o[0]];if(s===void 0)throw new D("Cannot produce strings not starting by the version in hexa code");return s+Te(o,1)}return{versionsApplierMapper:r,versionsApplierUnmapper:i}}function Qv(e){const t={};for(const n of e){if(t[n])throw new D(`Version ${n} has been requested at least twice for uuid`);if(t[n]=!0,n<1||n>15)throw new D(`Version must be a value in [1-15] for uuid, but received ${n}`);if(~~n!==n)throw new D(`Version must be an integer value for uuid, but received ${n}`)}if(e.length===0)throw new D("Must provide at least one version for uuid")}function Wi(e={}){const t=ws(0,4294967295),n=e.version!==void 0?typeof e.version=="number"?[e.version]:e.version:[1,2,3,4,5,6,7,8];Qv(n);const{versionsApplierMapper:r,versionsApplierUnmapper:i}=Zv(n);return H(t,ws(0,268435456*n.length-1).map(r,i),ws(2147483648,3221225471),t).map(Yv,Xv)}function e6(e){return be({unit:Tc("-._~!$&'()*+,;=:"),size:e})}function t6([e,t,n]){return(e===null?"":`${e}@`)+t+(n===null?"":`:${n}`)}function n6(e){if(typeof e!="string")throw new Error("Unsupported");const t=e.indexOf("@"),n=t!==-1?e.substring(0,t):null,r=/:(\d+)$/.exec(e),i=r!==null?Number(r[1]):null;return[n,r!==null?e.substring(t+1,e.length-r[1].length-1):e.substring(t+1),i]}function r6(e){return`[${e}]`}function i6(e){if(typeof e!="string"||e[0]!=="["||e[e.length-1]!=="]")throw new Error("Unsupported");return e.substring(1,e.length-1)}function Kc(e){const t=e||{},n=t.size,r=[So({size:n}),...t.withIPv4===!0?[To()]:[],...t.withIPv6===!0?[Oc().map(r6,i6)]:[],...t.withIPv4Extended===!0?[_c()]:[]];return H(t.withUserInfo===!0?Ct(e6(n)):we(null),Ce(...r),t.withPort===!0?Ct(Jt(65535)):we(null)).map(t6,n6)}function kg(e){return be({unit:Tc("-._~!$&'()*+,;=:@/?"),size:e})}function Hc(e={}){return kg(e.size)}function Yc(e={}){return be({unit:Tc("-._~!$&'()*+,;=:@"),size:e.size})}function o6(e){let t="";for(let n=0;n!==e.length;++n)t+="/"+e[n];return t}function s6(e){if(typeof e!="string")throw new Error("Incompatible value received: type");if(e.length!==0&&e[0]!=="/")throw new Error("Incompatible value received: start");return Gp(rt(e,"/"),1)}function a6(e){switch(e){case"xsmall":return["xsmall","xsmall"];case"small":return["small","xsmall"];case"medium":return["small","small"];case"large":return["medium","small"];case"xlarge":return["medium","medium"]}}function xs(e,t){return ae(Yc({size:e}),{size:t}).map(o6,s6)}function c6(e){const[t,n]=a6(e);return t===n?xs(t,n):Ce(xs(t,n),xs(n,t))}function Jc(e){return c6(wc((e||{}).size))}function Xc(e={}){return kg(e.size)}function u6(e){const[t,n,r]=e;return`${t}://${n}${r}${e[3]===null?"":`?${e[3]}`}${e[4]===null?"":`#${e[4]}`}`}const l6=/^([[A-Za-z][A-Za-z0-9+.-]*):\/\/([^/?#]*)([^?#]*)(\?[A-Za-z0-9\-._~!$&'()*+,;=:@/?%]*)?(#[A-Za-z0-9\-._~!$&'()*+,;=:@/?%]*)?$/;function f6(e){if(typeof e!="string")throw new Error("Incompatible value received: type");const t=l6.exec(e);if(t===null)throw new Error("Incompatible value received");const n=t[1],r=t[2],i=t[3],o=t[4],s=t[5];return[n,r,i,o!==void 0?o.substring(1):null,s!==void 0?s.substring(1):null]}function Zc(e){const t=e||{},n=wc(t.size),r=t.authoritySettings!==void 0&&t.authoritySettings.size!==void 0?qr(t.authoritySettings.size,n):n,i={...t.authoritySettings,size:r};return H(je(...t.validSchemes||["http","https"]),Kc(i),Jc({size:n}),t.withQueryParameters===!0?Ct(Xc({size:n})):we(null),t.withFragments===!0?Ct(Hc({size:n})):we(null)).map(u6,f6)}var h6=class Ig{constructor(t,n){this.commands=t,this.metadataForReplay=n,this[Fe]=function(){return new Ig(this.commands.map(r=>r.clone()),this.metadataForReplay)}}[Symbol.iterator](){return this.commands[Symbol.iterator]()}toString(){const t=this.commands.filter(r=>r.hasRan).map(r=>r.toString()).join(","),n=this.metadataForReplay();return n.length!==0?`${t} /*${n}*/`:t}},d6=class Ia{constructor(t){if(this.cmd=t,this.hasRan=!1,fo(t)){const n=t[St];this[St]=function(){return n.call(t)}}if(ho(t)){const n=t[Ut];this[Ut]=function(){return n.call(t)}}}check(t){return this.cmd.check(t)}run(t,n){return this.hasRan=!0,this.cmd.run(t,n)}clone(){return yn(this.cmd)?new Ia(this.cmd[Fe]()):new Ia(this.cmd)}toString(){return this.cmd.toString()}},ph=class{static parse(e){const[t,n]=e.split(":"),r=this.parseCounts(t),i=this.parseChanges(n);return this.parseOccurences(r,i)}static stringify(e){const t=this.countOccurences(e);return`${this.stringifyCounts(t)}:${this.stringifyChanges(t)}`}static intToB64(e){return e<26?String.fromCharCode(e+65):e<52?String.fromCharCode(e+97-26):e<62?String.fromCharCode(e+48-52):String.fromCharCode(e===62?43:47)}static b64ToInt(e){return e>="a"?e.charCodeAt(0)-97+26:e>="A"?e.charCodeAt(0)-65:e>="0"?e.charCodeAt(0)-48+52:e==="+"?62:63}static countOccurences(e){return e.reduce((t,n)=>(t.length===0||t[t.length-1].count===64||t[t.length-1].value!==n?t.push({value:n,count:1}):t[t.length-1].count+=1,t),[])}static parseOccurences(e,t){const n=[];for(let r=0;r!==e.length;++r){const i=e[r],o=t[r];for(let s=0;s!==i;++s)n.push(o)}return n}static stringifyChanges(e){let t="";for(let n=0;n<e.length;n+=6){const r=e.slice(n,n+6).reduceRight((i,o)=>(i<<1)+(o.value?1:0),0);t+=this.intToB64(r)}return t}static parseChanges(e){const t=e.split("").map(r=>this.b64ToInt(r)),n=[];for(let r=0;r!==t.length;++r){let i=t[r];for(let o=0;o!==6;++o,i>>=1)n.push(i%2===1)}return n}static stringifyCounts(e){return e.map(({count:t})=>this.intToB64(t-1)).join("")}static parseCounts(e){return e.split("").map(t=>this.b64ToInt(t)+1)}},p6=class extends xe{constructor(e,t,n,r,i){super(),this.sourceReplayPath=r,this.disableReplayLog=i,this.oneCommandArb=Ce(...e).map(o=>new d6(o)),this.lengthArb=Aa(0,t,n),this.replayPath=[],this.replayPathPosition=0}metadataForReplay(){return this.disableReplayLog?"":`replayPath=${JSON.stringify(ph.stringify(this.replayPath))}`}buildValueFor(e,t){const n=e.map(i=>i.value_),r={shrunkOnce:t,items:e};return new L(new h6(n,()=>this.metadataForReplay()),r)}generate(e){const t=this.lengthArb.generate(e,void 0).value,n=Array(t);for(let r=0;r!==t;++r){const i=this.oneCommandArb.generate(e,void 0);n[r]=i}return this.replayPathPosition=0,this.buildValueFor(n,!1)}canShrinkWithoutContext(e){return!1}filterOnExecution(e){const t=[];for(const n of e)n.value_.hasRan?(this.replayPath.push(!0),t.push(n)):this.replayPath.push(!1);return t}filterOnReplay(e){return e.filter((t,n)=>{const r=this.replayPath[this.replayPathPosition+n];if(r===void 0)throw new Error("Too short replayPath");if(!r&&t.value_.hasRan)throw new Error("Mismatch between replayPath and real execution");return r})}filterForShrinkImpl(e){this.replayPathPosition===0&&(this.replayPath=this.sourceReplayPath!==null?ph.parse(this.sourceReplayPath):[]);const t=this.replayPathPosition<this.replayPath.length?this.filterOnReplay(e):this.filterOnExecution(e);return this.replayPathPosition+=e.length,t}shrink(e,t){if(t===void 0)return J.nil();const n=t,r=n.shrunkOnce,i=n.items,o=this.filterForShrinkImpl(i);if(o.length===0)return J.nil();const s=r?J.nil():new J([[]][Symbol.iterator]()),c=[];for(let a=0;a!==o.length;++a)c.push(dn(()=>{const u=o.slice(0,a);return this.lengthArb.shrink(o.length-1-a,void 0).map(l=>u.concat(o.slice(o.length-(l.value+1))))}));for(let a=0;a!==o.length;++a)c.push(dn(()=>this.oneCommandArb.shrink(o[a].value_,o[a].context).map(u=>o.slice(0,a).concat([u],o.slice(a+1)))));return s.join(...c).map(a=>this.buildValueFor(a.map(u=>new L(u.value_.clone(),u.context)),!0))}};function Cg(e,t={}){const{size:n,maxCommands:r=Mn,disableReplayLog:i=!1,replayPath:o=null}=t;return new p6(e,Mr(n,0,r,t.maxCommands!==void 0),r,o,i)}var m6=class{constructor(e,t){this.s=e,this.cmd=t}async check(e){let t=null,n=!1;if((await this.s.scheduleSequence([{label:`check@${this.cmd.toString()}`,builder:async()=>{try{n=await Promise.resolve(this.cmd.check(e))}catch(r){throw t=r,r}}}]).task).faulty)throw t;return n}async run(e,t){let n=null;if((await this.s.scheduleSequence([{label:`run@${this.cmd.toString()}`,builder:async()=>{try{await this.cmd.run(e,t)}catch(r){throw n=r,r}}}]).task).faulty)throw n}};const g6=function*(e,t){for(const n of t)yield new m6(e,n)},_g=(e,t,n,r,i)=>e.then(o=>{const{model:s,real:c}=o;let a=n;for(const u of t)a=i(a,()=>r(u,s,c));return a}),y6=(e,t)=>_g({then:o=>{o(e())}},t,void 0,(o,s,c)=>{o.check(s)&&o.run(s,c)},(o,s)=>s()),b6=e=>typeof e.then=="function",$g=async(e,t,n=Promise.resolve())=>await _g({then:s=>{const c=e();return b6(c)?c.then(s):s(c)}},t,n,async(s,c,a)=>{await s.check(c)&&await s.run(c,a)},(s,c)=>s.then(c));function Mg(e,t){y6(e,t)}async function Og(e,t){await $g(e,t)}async function Pg(e,t,n){const r=g6(e,n),i=$g(t,r,e.schedule(Promise.resolve(),"startModel"));await e.waitFor(i),await e.waitAll()}const ui=e=>e();var Ng=class Ca{constructor(t,n){this.act=t,this.taskSelector=n,this.lastTaskId=0,this.sourceTaskSelector=n.clone(),this.scheduledTasks=[],this.triggeredTasks=[],this.scheduledWatchers=[],this[Fe]=function(){return new Ca(this.act,this.sourceTaskSelector)}}static buildLog(t){return`[task\${${t.taskId}}] ${t.label.length!==0?`${t.schedulingType}::${t.label}`:t.schedulingType} ${t.status}${t.outputValue!==void 0?` with value ${BE(t.outputValue)}`:""}`}log(t,n,r,i,o,s){this.triggeredTasks.push({status:o,schedulingType:t,taskId:n,label:r,metadata:i,outputValue:s!==void 0?ve(s):void 0})}scheduleInternal(t,n,r,i,o,s){const c=++this.lastTaskId;let a;const u=new Promise((l,f)=>{a=()=>{const h=Promise.resolve(s!==void 0?r.then(()=>s()):r);return h.then(d=>{this.log(t,c,n,i,"resolved",d),l(d)},d=>{this.log(t,c,n,i,"rejected",d),f(d)}),h}});return this.scheduledTasks.push({original:r,trigger:a,schedulingType:t,taskId:c,label:n,metadata:i,customAct:o}),this.scheduledWatchers.length!==0&&this.scheduledWatchers[0](),u}schedule(t,n,r,i){return this.scheduleInternal("promise",n||"",t,r,i||ui)}scheduleFunction(t,n){return(...r)=>this.scheduleInternal("function",`${t.name}(${r.map(ve).join(",")})`,t(...r),void 0,n||ui)}scheduleSequence(t,n){const r={done:!1,faulty:!1},i={then:l=>l()};let o=()=>{};const s=new Promise(l=>{o=()=>l({done:r.done,faulty:r.faulty})}),c=()=>{r.faulty=!0,o()},a=()=>{r.done=!0,o()},u=(l,f)=>{if(l>=t.length){f.then(a,c);return}f.then(()=>{const h=t[l],[d,m,p]=typeof h=="function"?[h,h.name,void 0]:[h.builder,h.label,h.metadata],y=this.scheduleInternal("sequence",m,i,p,n||ui,()=>d());u(l+1,y)},c)};return u(0,i),Object.assign(r,{task:s})}count(){return this.scheduledTasks.length}internalWaitOne(){if(this.scheduledTasks.length===0)throw new Error("No task scheduled");const t=this.taskSelector.nextTaskIndex(this.scheduledTasks),[n]=this.scheduledTasks.splice(t,1);return n.customAct(()=>n.trigger().catch(r=>{}))}waitOne(t){const n=t||ui;return this.act(()=>n(()=>this.internalWaitOne()))}async waitAll(t){for(;this.scheduledTasks.length>0;)await this.waitOne(t)}async internalWaitFor(t,n){let r=!1;const i=n.customAct,o=n.onWaitStart,s=n.onWaitIdle,c=n.launchAwaiterOnInit;let a,u,l=0,f=null,h=null;const d=async()=>{for(l=50,l=50;!r&&l>0;--l)await Promise.resolve();if(!r&&this.scheduledTasks.length>0)return o!==void 0&&o(),h=this.waitOne(i),h.then(()=>(h=null,d()),x=>{throw h=null,r=!0,u(x),x});!r&&s!==void 0&&s(),f=null},m=()=>{if(f!==null){l=51;return}f=d().catch(()=>{})},p=()=>{const x=this.scheduledWatchers.indexOf(m);x!==-1&&this.scheduledWatchers.splice(x,1),x===0&&this.scheduledWatchers.length!==0&&this.scheduledWatchers[0]()},y=new Promise((x,E)=>{a=$=>{p(),x($)},u=$=>{p(),E($)}});return t.then(x=>{r=!0,h===null?a(x):h.then(()=>a(x),E=>u(E))},x=>{r=!0,h===null?u(x):h.then(()=>u(x),()=>u(x))}),(this.scheduledTasks.length>0||c)&&this.scheduledWatchers.length===0&&m(),this.scheduledWatchers.push(m),y}waitNext(t,n){let r,i=t;const o=i<=0?Promise.resolve():new Promise(s=>{r=()=>{--i<=0&&s()}});return this.internalWaitFor(o,{customAct:n,onWaitStart:r,onWaitIdle:void 0,launchAwaiterOnInit:!1})}waitIdle(t){let n;const r=new Promise(i=>n=i);return this.internalWaitFor(r,{customAct:t,onWaitStart:void 0,onWaitIdle:n,launchAwaiterOnInit:!0})}waitFor(t,n){return this.internalWaitFor(t,{customAct:n,onWaitStart:void 0,onWaitIdle:void 0,launchAwaiterOnInit:!1})}report(){return[...this.triggeredTasks,...this.scheduledTasks.map(t=>({status:"pending",schedulingType:t.schedulingType,taskId:t.taskId,label:t.label,metadata:t.metadata}))]}toString(){return"schedulerFor()`\n"+this.report().map(Ca.buildLog).map(t=>`-> ${t}`).join(`
|
|
34
|
+
`)+"`"}};function jg(e){let t=0;return{clone:()=>jg(e),nextTaskIndex:n=>{if(e.length<=t)throw new Error("Invalid schedulerFor defined: too many tasks have been scheduled");const r=n.findIndex(i=>i.taskId===e[t]);if(r===-1)throw new Error("Invalid schedulerFor defined: unable to find next task");return++t,r}}}function mh(e,t){return new Ng(e,jg(t))}function Fg(e){const t=e.clone();return{clone:()=>Fg(t),nextTaskIndex:n=>e.nextInt(0,n.length-1)}}var w6=class extends xe{constructor(e){super(),this.act=e}generate(e,t){return new L(new Ng(this.act,Fg(e.clone())),void 0)}canShrinkWithoutContext(e){return!1}shrink(e,t){return J.nil()}};function Rg(e){const{act:t=n=>n()}=e||{};return new w6(t)}function Lg(e,t){const{act:n=r=>r()}=Array.isArray(e)?t||{}:e||{};return Array.isArray(e)?mh(n,e):function(r,...i){return mh(n,i)}}function Dg(e={}){return nn(e,F("-9223372036854775808"),F("9223372036854775807"),iw,en)}function Bg(e={}){return nn(e,F(0),F("18446744073709551615"),ow,en)}function x6(e,t){return t}const Ss=Math.floor,S6=Math.min;function yt(e,t){switch(e.type){case"Char":return{astNode:e,minLength:1};case"Repetition":switch(e.quantifier.kind){case"*":{const n=yt(e.expression,t);return{astNode:{type:"Repetition",quantifier:{...e.quantifier,kind:"Range",from:0,to:t},expression:n.astNode},minLength:0}}case"+":{const n=yt(e.expression,t),r=n.minLength>1?n.minLength:1;return{astNode:{type:"Repetition",quantifier:{...e.quantifier,kind:"Range",from:1,to:Ss(t/r)},expression:n.astNode},minLength:n.minLength}}case"?":{const n=yt(e.expression,t);return t<n.minLength?{astNode:{type:"Repetition",quantifier:{...e.quantifier,kind:"Range",from:0,to:0},expression:n.astNode},minLength:0}:{astNode:{...e,expression:n.astNode},minLength:0}}case"Range":{const n=e.quantifier.from>1?Ss(t/e.quantifier.from):t,r=yt(e.expression,n),i=r.minLength>1?r.minLength:1;return e.quantifier.to===void 0||e.quantifier.to*i>t?{astNode:{type:"Repetition",quantifier:{...e.quantifier,kind:"Range",to:Ss(t/i)},expression:r.astNode},minLength:e.quantifier.from*r.minLength}:{astNode:{...e,expression:r.astNode},minLength:e.quantifier.from*r.minLength}}default:return x6(e.quantifier,{astNode:e,minLength:0})}case"Quantifier":return{astNode:e,minLength:0};case"Alternative":{let n=0;const r=[];for(let o=0;o!==e.expressions.length;++o){const s=t-n,c=yt(e.expressions[o],s);n+=c.minLength,N(r,{value:c,allowance:s})}const i=[];for(let o=0;o!==r.length;++o){const s=r[o].value,c=r[o].allowance,a=t-n+s.minLength;N(i,(a!==c?yt(s.astNode,a):s).astNode)}return{astNode:{...e,expressions:i},minLength:n}}case"CharacterClass":return{astNode:e,minLength:1};case"ClassRange":return{astNode:e,minLength:1};case"Group":{const n=yt(e.expression,t);return{astNode:{...e,expression:n.astNode},minLength:n.minLength}}case"Disjunction":{if(e.left===null){if(e.right===null)return{astNode:e,minLength:0};const i=yt(e.right,t),o=i.minLength>t?null:i.astNode;return{astNode:{...e,left:null,right:o},minLength:0}}if(e.right===null){const i=yt(e.left,t),o=i.minLength>t?null:i.astNode;return{astNode:{...e,left:o,right:null},minLength:0}}const n=yt(e.left,t),r=yt(e.right,t);return n.minLength>t?r:r.minLength>t?n:{astNode:{...e,left:n.astNode,right:r.astNode},minLength:S6(n.minLength,r.minLength)}}case"Assertion":return{astNode:e,minLength:0};case"Backreference":return{astNode:e,minLength:0};case"UnicodeProperty":return{astNode:e,minLength:1}}}function E6(e,t){return yt(e,t).astNode}function T6(e){return new Error(`Unsupported AST node! Received: ${ve(e)}`)}function $i(e,t,n){if(!t&&!n)return e;const r={hasStart:!1,hasEnd:!1},i=Ug(e,t,n,r),o=t&&!r.hasStart,s=n&&!r.hasEnd;if(!o&&!s)return i;const c=[];return o&&(c.push({type:"Assertion",kind:"^"}),c.push({type:"Repetition",quantifier:{type:"Quantifier",kind:"*",greedy:!0},expression:{type:"Char",kind:"meta",symbol:".",value:".",codePoint:NaN}})),c.push(i),s&&(c.push({type:"Repetition",quantifier:{type:"Quantifier",kind:"*",greedy:!0},expression:{type:"Char",kind:"meta",symbol:".",value:".",codePoint:NaN}}),c.push({type:"Assertion",kind:"$"})),{type:"Group",capturing:!1,expression:{type:"Alternative",expressions:c}}}function Ug(e,t,n,r){switch(e.type){case"Char":return e;case"Repetition":return e;case"Quantifier":throw new Error("Wrongly defined AST tree, Quantifier nodes not supposed to be scanned!");case"Alternative":return r.hasStart=!0,r.hasEnd=!0,{...e,expressions:e.expressions.map((i,o)=>$i(i,t&&o===0,n&&o===e.expressions.length-1))};case"CharacterClass":return e;case"ClassRange":return e;case"Group":return{...e,expression:Ug(e.expression,t,n,r)};case"Disjunction":return r.hasStart=!0,r.hasEnd=!0,{...e,left:e.left!==null?$i(e.left,t,n):null,right:e.right!==null?$i(e.right,t,n):null};case"Assertion":if(e.kind==="^"||e.kind==="Lookahead")return r.hasStart=!0,e;if(e.kind==="$"||e.kind==="Lookbehind")return r.hasEnd=!0,e;throw new Error(`Assertions of kind ${e.kind} not implemented yet!`);case"Backreference":return e;case"UnicodeProperty":return e;default:throw T6(e)}}function v6(e){return $i(e,!0,!0)}function gh(e,t){return e[t]>="\uD800"&&e[t]<="\uDBFF"&&e[t+1]>="\uDC00"&&e[t+1]<="\uDFFF"?2:1}function Oe(e){return e>="0"&&e<="9"||e>="a"&&e<="f"||e>="A"&&e<="F"}function _a(e){return e>="0"&&e<="9"}function Vg(e,t){for(let n=t;n!==e.length;++n){const r=e[n];if(r==="\\")n+=1;else if(r==="]")return n}throw new Error("Missing closing ']'")}function A6(e,t){let n=0;for(let r=t;r!==e.length;++r){const i=e[r];if(i==="\\")r+=1;else if(i===")"){if(n===0)return r;n-=1}else i==="["?r=Vg(e,r):i==="("&&(n+=1)}throw new Error("Missing closing ')'")}function k6(e,t){let n=!1;for(let r=t;r!==e.length;++r){const i=e[r];if(!_a(i)){if(t===r)return-1;if(i===","){if(n)return-1;n=!0}else return i==="}"?r:-1}}return-1}function I6(e,t,n,r){switch(e[t]){case"[":return r===1?t+1:Vg(e,t+1)+1;case"{":{if(r===1)return t+1;const i=k6(e,t+1);return i===-1?t+1:i+1}case"(":return r===1?t+1:A6(e,t+1)+1;case"]":case"}":case")":return t+1;case"\\":{const i=e[t+1];switch(i){case"x":if(Oe(e[t+2])&&Oe(e[t+3]))return t+4;throw new Error(`Unexpected token '${e.substring(t,t+4)}' found`);case"u":if(e[t+2]==="{"){if(!n)return t+2;if(e[t+4]==="}"){if(Oe(e[t+3]))return t+5;throw new Error(`Unexpected token '${e.substring(t,t+5)}' found`)}if(e[t+5]==="}"){if(Oe(e[t+3])&&Oe(e[t+4]))return t+6;throw new Error(`Unexpected token '${e.substring(t,t+6)}' found`)}if(e[t+6]==="}"){if(Oe(e[t+3])&&Oe(e[t+4])&&Oe(e[t+5]))return t+7;throw new Error(`Unexpected token '${e.substring(t,t+7)}' found`)}if(e[t+7]==="}"){if(Oe(e[t+3])&&Oe(e[t+4])&&Oe(e[t+5])&&Oe(e[t+6]))return t+8;throw new Error(`Unexpected token '${e.substring(t,t+8)}' found`)}if(e[t+8]==="}"&&Oe(e[t+3])&&Oe(e[t+4])&&Oe(e[t+5])&&Oe(e[t+6])&&Oe(e[t+7]))return t+9;throw new Error(`Unexpected token '${e.substring(t,t+9)}' found`)}if(Oe(e[t+2])&&Oe(e[t+3])&&Oe(e[t+4])&&Oe(e[t+5]))return t+6;throw new Error(`Unexpected token '${e.substring(t,t+6)}' found`);case"p":case"P":{if(!n)return t+2;let o=t+2;for(;o<e.length&&e[o]!=="}";o+=e[o]==="\\"?2:1);if(e[o]!=="}")throw new Error("Invalid \\P definition");return o+1}case"k":{let o=t+2;for(;o<e.length&&e[o]!==">";++o);if(e[o]!==">"){if(!n)return t+2;throw new Error("Invalid \\k definition")}return o+1}default:if(_a(i)){const o=n?e.length:Math.min(t+4,e.length);let s=t+2;for(;s<o&&_a(e[s]);++s);return s}return t+(n?gh(e,t+1):1)+1}}default:return t+(n?gh(e,t):1)}}function li(e,t,n,r){const i=I6(e,t,n,r);return e.substring(t,i)}const yh={gc:"General_Category",sc:"Script",scx:"Script_Extensions"},vo={ASCII:"ASCII",ASCII_Hex_Digit:"AHex",Alphabetic:"Alpha",Any:"Any",Assigned:"Assigned",Bidi_Control:"Bidi_C",Bidi_Mirrored:"Bidi_M",Case_Ignorable:"CI",Cased:"Cased",Changes_When_Casefolded:"CWCF",Changes_When_Casemapped:"CWCM",Changes_When_Lowercased:"CWL",Changes_When_NFKC_Casefolded:"CWKCF",Changes_When_Titlecased:"CWT",Changes_When_Uppercased:"CWU",Dash:"Dash",Default_Ignorable_Code_Point:"DI",Deprecated:"Dep",Diacritic:"Dia",Emoji:"Emoji",Emoji_Component:"Emoji_Component",Emoji_Modifier:"Emoji_Modifier",Emoji_Modifier_Base:"Emoji_Modifier_Base",Emoji_Presentation:"Emoji_Presentation",Extended_Pictographic:"Extended_Pictographic",Extender:"Ext",Grapheme_Base:"Gr_Base",Grapheme_Extend:"Gr_Ext",Hex_Digit:"Hex",IDS_Binary_Operator:"IDSB",IDS_Trinary_Operator:"IDST",ID_Continue:"IDC",ID_Start:"IDS",Ideographic:"Ideo",Join_Control:"Join_C",Logical_Order_Exception:"LOE",Lowercase:"Lower",Math:"Math",Noncharacter_Code_Point:"NChar",Pattern_Syntax:"Pat_Syn",Pattern_White_Space:"Pat_WS",Quotation_Mark:"QMark",Radical:"Radical",Regional_Indicator:"RI",Sentence_Terminal:"STerm",Soft_Dotted:"SD",Terminal_Punctuation:"Term",Unified_Ideograph:"UIdeo",Uppercase:"Upper",Variation_Selector:"VS",White_Space:"space",XID_Continue:"XIDC",XID_Start:"XIDS"},jr=eu(vo),Qc={Cased_Letter:"LC",Close_Punctuation:"Pe",Connector_Punctuation:"Pc",Control:["Cc","cntrl"],Currency_Symbol:"Sc",Dash_Punctuation:"Pd",Decimal_Number:["Nd","digit"],Enclosing_Mark:"Me",Final_Punctuation:"Pf",Format:"Cf",Initial_Punctuation:"Pi",Letter:"L",Letter_Number:"Nl",Line_Separator:"Zl",Lowercase_Letter:"Ll",Mark:["M","Combining_Mark"],Math_Symbol:"Sm",Modifier_Letter:"Lm",Modifier_Symbol:"Sk",Nonspacing_Mark:"Mn",Number:"N",Open_Punctuation:"Ps",Other:"C",Other_Letter:"Lo",Other_Number:"No",Other_Punctuation:"Po",Other_Symbol:"So",Paragraph_Separator:"Zp",Private_Use:"Co",Punctuation:["P","punct"],Separator:"Z",Space_Separator:"Zs",Spacing_Mark:"Mc",Surrogate:"Cs",Symbol:"S",Titlecase_Letter:"Lt",Unassigned:"Cn",Uppercase_Letter:"Lu"},$a=eu(Qc),qg={Adlam:"Adlm",Ahom:"Ahom",Anatolian_Hieroglyphs:"Hluw",Arabic:"Arab",Armenian:"Armn",Avestan:"Avst",Balinese:"Bali",Bamum:"Bamu",Bassa_Vah:"Bass",Batak:"Batk",Bengali:"Beng",Bhaiksuki:"Bhks",Bopomofo:"Bopo",Brahmi:"Brah",Braille:"Brai",Buginese:"Bugi",Buhid:"Buhd",Canadian_Aboriginal:"Cans",Carian:"Cari",Caucasian_Albanian:"Aghb",Chakma:"Cakm",Cham:"Cham",Cherokee:"Cher",Common:"Zyyy",Coptic:["Copt","Qaac"],Cuneiform:"Xsux",Cypriot:"Cprt",Cyrillic:"Cyrl",Deseret:"Dsrt",Devanagari:"Deva",Dogra:"Dogr",Duployan:"Dupl",Egyptian_Hieroglyphs:"Egyp",Elbasan:"Elba",Ethiopic:"Ethi",Georgian:"Geor",Glagolitic:"Glag",Gothic:"Goth",Grantha:"Gran",Greek:"Grek",Gujarati:"Gujr",Gunjala_Gondi:"Gong",Gurmukhi:"Guru",Han:"Hani",Hangul:"Hang",Hanifi_Rohingya:"Rohg",Hanunoo:"Hano",Hatran:"Hatr",Hebrew:"Hebr",Hiragana:"Hira",Imperial_Aramaic:"Armi",Inherited:["Zinh","Qaai"],Inscriptional_Pahlavi:"Phli",Inscriptional_Parthian:"Prti",Javanese:"Java",Kaithi:"Kthi",Kannada:"Knda",Katakana:"Kana",Kayah_Li:"Kali",Kharoshthi:"Khar",Khmer:"Khmr",Khojki:"Khoj",Khudawadi:"Sind",Lao:"Laoo",Latin:"Latn",Lepcha:"Lepc",Limbu:"Limb",Linear_A:"Lina",Linear_B:"Linb",Lisu:"Lisu",Lycian:"Lyci",Lydian:"Lydi",Mahajani:"Mahj",Makasar:"Maka",Malayalam:"Mlym",Mandaic:"Mand",Manichaean:"Mani",Marchen:"Marc",Medefaidrin:"Medf",Masaram_Gondi:"Gonm",Meetei_Mayek:"Mtei",Mende_Kikakui:"Mend",Meroitic_Cursive:"Merc",Meroitic_Hieroglyphs:"Mero",Miao:"Plrd",Modi:"Modi",Mongolian:"Mong",Mro:"Mroo",Multani:"Mult",Myanmar:"Mymr",Nabataean:"Nbat",New_Tai_Lue:"Talu",Newa:"Newa",Nko:"Nkoo",Nushu:"Nshu",Ogham:"Ogam",Ol_Chiki:"Olck",Old_Hungarian:"Hung",Old_Italic:"Ital",Old_North_Arabian:"Narb",Old_Permic:"Perm",Old_Persian:"Xpeo",Old_Sogdian:"Sogo",Old_South_Arabian:"Sarb",Old_Turkic:"Orkh",Oriya:"Orya",Osage:"Osge",Osmanya:"Osma",Pahawh_Hmong:"Hmng",Palmyrene:"Palm",Pau_Cin_Hau:"Pauc",Phags_Pa:"Phag",Phoenician:"Phnx",Psalter_Pahlavi:"Phlp",Rejang:"Rjng",Runic:"Runr",Samaritan:"Samr",Saurashtra:"Saur",Sharada:"Shrd",Shavian:"Shaw",Siddham:"Sidd",SignWriting:"Sgnw",Sinhala:"Sinh",Sogdian:"Sogd",Sora_Sompeng:"Sora",Soyombo:"Soyo",Sundanese:"Sund",Syloti_Nagri:"Sylo",Syriac:"Syrc",Tagalog:"Tglg",Tagbanwa:"Tagb",Tai_Le:"Tale",Tai_Tham:"Lana",Tai_Viet:"Tavt",Takri:"Takr",Tamil:"Taml",Tangut:"Tang",Telugu:"Telu",Thaana:"Thaa",Thai:"Thai",Tibetan:"Tibt",Tifinagh:"Tfng",Tirhuta:"Tirh",Ugaritic:"Ugar",Vai:"Vaii",Warang_Citi:"Wara",Yi:"Yiii",Zanabazar_Square:"Zanb"},bh=eu(qg);function eu(e){const t={};for(const n of Object.keys(e)){const r=e[n];if(Array.isArray(r))for(let i=0;i!==r.length;++i)t[r[i]]=n;else t[r]=n}return t}function C6(e){return e in Qc||e in $a}function _6(e){return e in vo||e in jr}function wh(e){if(e in yh)return yh[e];if(e in jr)return jr[e];if(e in vo||e==="General_Category"||e==="Script"||e==="Script_Extensions")return e;throw new Error(`Unknown Unicode property name: ${e}`)}function xh(e){if(e in $a)return $a[e];if(e in bh)return bh[e];if(e in jr)return jr[e];if(e in Qc||e in qg||e in vo)return e;throw new Error(`Unknown Unicode property value: ${e}`)}function $6(e,t){const n=e.indexOf("=");if(n!==-1){const r=e.substring(0,n),i=e.substring(n+1);return{type:"UnicodeProperty",name:r,value:i,negative:t,shorthand:!1,binary:!1,canonicalName:wh(r),canonicalValue:xh(i)}}if(C6(e))return{type:"UnicodeProperty",name:"General_Category",value:e,negative:t,shorthand:!0,binary:!1,canonicalName:"General_Category",canonicalValue:xh(e)};if(_6(e)){const r=wh(e);return{type:"UnicodeProperty",name:e,value:e,negative:t,shorthand:!1,binary:!0,canonicalName:r,canonicalValue:r}}throw new Error(`Invalid Unicode property: ${e}`)}const Es=String.fromCodePoint;function Ts(e){const t=e.pop();if(t===void 0)throw new Error("Unable to extract token preceeding the currently parsed one");return t}function Wg(e){return e>="0"&&e<="9"}function Mi(e,t){return{type:"Char",kind:"simple",symbol:e,value:e,codePoint:e.codePointAt(0)||-1,escaped:t}}function Ln(e,t){return{type:"Char",kind:"meta",symbol:t,value:e,codePoint:t.codePointAt(0)||-1}}function sn(e,t){if(e.length>1)return{type:"Alternative",expressions:e};if(!t&&e.length===0)throw new Error("Unsupported no token");return e[0]}function vs(e){if(e[0]==="\\"){const t=e[1];switch(t){case"x":{const n=e.substring(2),r=Number.parseInt(n,16);return{type:"Char",kind:"hex",symbol:Es(r),value:e,codePoint:r}}case"u":{if(e==="\\u")return Mi("u",!0);const n=e[2]==="{"?e.substring(3,e.length-1):e.substring(2),r=Number.parseInt(n,16);return{type:"Char",kind:"unicode",symbol:Es(r),value:e,codePoint:r}}case"0":return Ln(e,"\0");case"n":return Ln(e,`
|
|
35
|
+
`);case"f":return Ln(e,"\f");case"r":return Ln(e,"\r");case"t":return Ln(e," ");case"v":return Ln(e,"\v");case"w":case"W":case"d":case"D":case"s":case"S":case"b":case"B":return{type:"Char",kind:"meta",symbol:void 0,value:e,codePoint:NaN};default:if(Wg(t)){const n=e.substring(1),r=Number(n);return{type:"Char",kind:"decimal",symbol:Es(r),value:e,codePoint:r}}if(e.length>2&&(t==="p"||t==="P")){const n=t==="P";return $6(e.substring(3,e.length-1),n)}return Mi(e.substring(1),!0)}}return Mi(e)}function Vn(e,t,n,r){let i=null;for(let o=0,s=li(t,o,n,0);o!==t.length;o+=s.length,s=li(t,o,n,0)){const c=s[0];switch(c){case"|":i===null&&(i=[]),i.push(sn(e.splice(0),!0)||null);break;case".":e.push({type:"Char",kind:"meta",symbol:s,value:s,codePoint:NaN});break;case"*":case"+":{const a=Ts(e);e.push({type:"Repetition",expression:a,quantifier:{type:"Quantifier",kind:c,greedy:!0}});break}case"?":{const a=Ts(e);a.type==="Repetition"?(a.quantifier.greedy=!1,e.push(a)):e.push({type:"Repetition",expression:a,quantifier:{type:"Quantifier",kind:c,greedy:!0}});break}case"{":{if(s==="{"){e.push(Mi(s));break}const a=Ts(e),u=s.substring(1,s.length-1).split(","),l=Number(u[0]),f=u.length===1?l:u[1].length!==0?Number(u[1]):void 0;e.push({type:"Repetition",expression:a,quantifier:{type:"Quantifier",kind:"Range",greedy:!0,from:l,to:f}});break}case"[":{const a=s.substring(1,s.length-1),u=[];let l,f=!1;for(let h=0,d=li(a,h,n,1);h!==a.length;h+=d.length,d=li(a,h,n,1)){if(h===0&&d==="^"){l=!0;continue}const m=vs(d);if(d==="-")u.push(m),f=!0;else{const p=u.length>=2?u[u.length-2]:void 0;f&&p!==void 0&&p.type==="Char"&&m.type==="Char"?(u.pop(),u.pop(),u.push({type:"ClassRange",from:p,to:m})):u.push(m),f=!1}}e.push({type:"CharacterClass",expressions:u,negative:l});break}case"(":{const a=s.substring(1,s.length-1),u=[];if(a[0]==="?")if(a[1]===":")Vn(u,a.substring(2),n,r),e.push({type:"Group",capturing:!1,expression:sn(u)});else if(a[1]==="="||a[1]==="!")Vn(u,a.substring(2),n,r),e.push({type:"Assertion",kind:"Lookahead",negative:a[1]==="!"?!0:void 0,assertion:sn(u)});else if(a[1]==="<"&&(a[2]==="="||a[2]==="!"))Vn(u,a.substring(3),n,r),e.push({type:"Assertion",kind:"Lookbehind",negative:a[2]==="!"?!0:void 0,assertion:sn(u)});else{const l=a.split(">");if(l.length<2||l[0][1]!=="<")throw new Error(`Unsupported regex content found at ${JSON.stringify(s)}`);const f=++r.lastIndex,h=l[0].substring(2);r.named.set(h,f),Vn(u,l.slice(1).join(">"),n,r),e.push({type:"Group",capturing:!0,nameRaw:h,name:h,number:f,expression:sn(u)})}else{const l=++r.lastIndex;Vn(u,a,n,r),e.push({type:"Group",capturing:!0,number:l,expression:sn(u)})}break}default:if(s==="^")e.push({type:"Assertion",kind:s});else if(s==="$")e.push({type:"Assertion",kind:s});else if(s[0]==="\\"&&Wg(s[1])){const a=Number(s.substring(1));n||a<=r.lastIndex?e.push({type:"Backreference",kind:"number",number:a,reference:a}):e.push(vs(s))}else if(s[0]==="\\"&&s[1]==="k"&&s.length!==2){const a=s.substring(3,s.length-1);e.push({type:"Backreference",kind:"name",number:r.named.get(a)||0,referenceRaw:a,reference:a})}else e.push(vs(s))}}if(i!==null){i.push(sn(e.splice(0),!0)||null);let o={type:"Disjunction",left:i[0],right:i[1]};for(let s=2;s<i.length;++s)o={type:"Disjunction",left:o,right:i[s]};e.push(o)}}function M6(e){const t=Ir([...e.flags],"u")!==-1,n=e.source,r=[];return Vn(r,n,t,{lastIndex:0,named:new Map}),sn(r)}const O6=String.fromCodePoint;function P6(e){return e.binary||e.shorthand?e.canonicalValue:`${e.canonicalName}=${e.canonicalValue}`}function Sh(e,t,n,r){let i=-1;for(let o=t;o<=n;++o)if(e.test(O6(o)))i===-1&&(i=o);else if(i!==-1){const s=o-1;r.push(i===s?[s]:[i,s]),i=-1}i!==-1&&r.push(i===n?[n]:[i,n])}function N6(e,t){const n=new RegExp(`^\\${t?"P":"p"}{${e}}$`,"u"),r=[];return Sh(n,0,55295,r),Sh(n,57344,1114111,r),r}const Eh=new Map;function j6(e,t){const n=`${t?"P":"p"}:${e}`,r=Eh.get(n);if(r!==void 0)return r;const i=N6(e,t);return Eh.set(n,i),i}function F6(e){return On(...Q(j6(P6(e),e.negative),t=>ga(t)))}const R6=String.fromCodePoint,zg=[..."abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"],Gg=[..."0123456789"],Kg=[...` \r
|
|
36
|
+
\v\f`],Ma=[...`\r
|
|
37
|
+
`],Hg=[...""],L6=[...Ma,...Hg],D6=new It(zg),B6=new It(Gg),U6=new It(Kg),V6=new It(Hg),q6=new It(L6),xn=()=>be({unit:"grapheme-ascii",minLength:1,maxLength:1});function Th(e){return new D(`Unsupported AST node! Received: ${ve(e)}`)}function Sn(e,t,n){switch(e.type){case"Char":if(e.kind==="meta")switch(e.value){case"\\w":return je(...zg);case"\\W":return xn().filter(r=>!hn(D6,r));case"\\d":return je(...Gg);case"\\D":return xn().filter(r=>!hn(B6,r));case"\\s":return je(...Kg);case"\\S":return xn().filter(r=>!hn(U6,r));case"\\b":case"\\B":throw new D(`Meta character ${e.value} not implemented yet!`);case".":{const r=n.dotAll?V6:q6;return xn().filter(i=>!hn(r,i))}}if(e.symbol===void 0)throw new D(`Unexpected undefined symbol received for non-meta Char! Received: ${ve(e)}`);return we(e.symbol);case"Repetition":{const r=Sn(e.expression,t,n);switch(e.quantifier.kind){case"*":return be({...t,unit:r});case"+":return be({...t,minLength:1,unit:r});case"?":return be({...t,minLength:0,maxLength:1,unit:r});case"Range":return be({...t,minLength:e.quantifier.from,maxLength:e.quantifier.to,unit:r});default:throw Th(e.quantifier)}}case"Quantifier":throw new D("Wrongly defined AST tree, Quantifier nodes not supposed to be scanned!");case"Alternative":{const r=[];let i="";for(const o of e.expressions)o.type==="Char"&&o.kind!=="meta"&&o.symbol!==void 0?i+=o.symbol:(n.multiline||o.type!=="Assertion"||o.kind!=="^"&&o.kind!=="$")&&(i!==""&&(N(r,we(i)),i=""),N(r,Sn(o,t,n)));return i!==""&&N(r,we(i)),r.length===0?we(""):r.length===1?r[0]:H(...r).map(o=>Se(o,""))}case"CharacterClass":if(e.negative){const r=Q(e.expressions,i=>Sn(i,t,n));return xn().filter(i=>Hp(r,o=>!o.canShrinkWithoutContext(i)))}return Ce(...Q(e.expressions,r=>Sn(r,t,n)));case"ClassRange":{const r=e.from.codePoint,i=e.to.codePoint;return W({min:r,max:i}).map(o=>R6(o),o=>{if(typeof o!="string")throw new D("Invalid type");if([...o].length!==1)throw new D("Invalid length");return Hn(o,0)})}case"Group":return Sn(e.expression,t,n);case"Disjunction":{const r=[e.left,e.right],i=[];for(let o=0;o!==r.length;++o){const s=r[o];s===null?N(i,we("")):s.type==="Disjunction"?(N(r,s.left),N(r,s.right)):N(i,Sn(s,t,n))}return Ce(...i)}case"Assertion":if(e.kind==="^"||e.kind==="$")return n.multiline?e.kind==="^"?Ce(we(""),H(be({unit:xn()}),je(...Ma)).map(r=>`${r[0]}${r[1]}`,r=>{if(typeof r!="string"||r.length===0)throw new D("Invalid type");return[Te(r,0,r.length-1),r[r.length-1]]})):Ce(we(""),H(je(...Ma),be({unit:xn()})).map(r=>`${r[0]}${r[1]}`,r=>{if(typeof r!="string"||r.length===0)throw new D("Invalid type");return[r[0],Te(r,1)]})):we("");throw new D(`Assertions of kind ${e.kind} not implemented yet!`);case"Backreference":throw new D("Backreference nodes not implemented yet!");case"UnicodeProperty":return F6(e);default:throw Th(e)}}function Yg(e,t={}){for(const c of e.flags)if(c!=="d"&&c!=="g"&&c!=="m"&&c!=="s"&&c!=="u")throw new D(`Unable to use "stringMatching" against a regex using the flag ${c}`);const n=t.maxLength,r={size:t.size,maxLength:n},i={multiline:e.multiline,dotAll:e.dotAll};let o=v6(M6(e));n!==void 0&&(o=E6(o,n));const s=Sn(o,r,i);return n!==void 0?s.filter(c=>[...c].length<=n):s}function W6(e){const t=[];for(let n=0;n!==e.length;++n)t.push(e[n].next());return t}function z6(e,t){for(let n=0;n!==e.length;++n)t[n]=e[n].next()}function G6(e){for(let t=0;t!==e.length;++t)if(e[t].done)return!0;return!1}function*K6(...e){const t=W6(e);for(;!G6(t);)yield t.map(n=>n.value),z6(e,t)}function*H6(e){let t=e;for(;;)yield t,++t}var Y6=class extends xe{constructor(e,t){super(),this.arb=e,this.maxShrinks=t}generate(e,t){const n=this.arb.generate(e,t);return this.valueMapper(n,0)}canShrinkWithoutContext(e){return this.arb.canShrinkWithoutContext(e)}shrink(e,t){return this.isSafeContext(t)?this.safeShrink(e,t.originalContext,t.length):this.safeShrink(e,void 0,0)}safeShrink(e,t,n){const r=this.maxShrinks-n;return r<=0?J.nil():new J(K6(this.arb.shrink(e,t),H6(n+1))).take(r).map(i=>this.valueMapper(i[0],i[1]))}valueMapper(e,t){const n={originalContext:e.context,length:t};return new L(e.value,n)}isSafeContext(e){return e!=null&&typeof e=="object"&&"originalContext"in e&&"length"in e}};function Jg(e,t){return new Y6(e,t)}const zi=Symbol.for("fast-check/plugin/life-cycle");function vh(e,t){if(e.length===0)return t.afterHooks;if(t.afterHooks.length===0)return e.map(r=>r.fn);const n=[];for(const r of e){const{index:i,fn:o}=r;n.push({index:t.beforeHooksIndices[i],fn:o})}for(let r=0;r!==t.afterHooks.length;++r)n.push({index:t.afterHooksIndices[r],fn:t.afterHooks[r]});return n.sort((r,i)=>r.index-i.index),n.map(r=>r.fn)}function Xg(e,t,n){let r=null,i;const o=[];if(e.beforeHooks.length!==0)try{for(let s=0;s!==e.beforeHooks.length;++s){const c=e.beforeHooks[s];if(i===void 0){const a=c();typeof a=="function"&&o.push({index:s,fn:a}),typeof a=="object"&&(i=a.then(u=>(u!==void 0&&o.push({index:s,fn:u}),null)))}else i=i.then(()=>{const a=c();return a===void 0?null:typeof a=="function"?(o.push({index:s,fn:a}),null):a.then(u=>(u!==void 0&&o.push({index:s,fn:u}),null))})}}catch(s){r={error:s}}if(r===null)if(i===void 0){const s=t(n);s!==null&&"then"in s?i=s:r=s}else i=i.then(()=>t(n),s=>({error:s}));if(i===void 0){const s=vh(o,e);for(let c=s.length-1;c>=0;--c){const a=s[c];if(i===void 0)try{const u=a();typeof u=="object"&&(i=u.then(()=>r,l=>r||{error:l}))}catch(u){r={error:u}}else i=i.then(u=>{try{const l=a();return typeof l=="object"?l.then(()=>u,f=>u||{error:f}):u}catch(l){return u||{error:l}}})}}else i=i.then(s=>{const c=vh(o,e);if(c.length===0)return s;let a=Promise.resolve(s);for(let u=c.length-1;u>=0;--u){const l=c[u];a=a.then(f=>{try{const h=l();return h===void 0?f:h.then(()=>f,d=>f||{error:d})}catch(h){return f||{error:h}}})}return a});return i===void 0?r:i}function Zg(e){return(t,n)=>{let r=n.get(zi);return r!==void 0&&r.lastPluginIndex===t-1?(r.lastPluginIndex=t,r.beforeHooks.push(e),r.beforeHooksIndices.push(t),{}):(r={lastPluginIndex:t,beforeHooks:[e],beforeHooksIndices:[t],afterHooks:[],afterHooksIndices:[]},n.set(zi,r),{decorateRun:i=>o=>Xg(r,i,o)})}}function Qg(e){return(t,n)=>{let r=n.get(zi);return r!==void 0&&r.lastPluginIndex===t-1?(r.lastPluginIndex=t,r.afterHooks.push(e),r.afterHooksIndices.push(t),{}):(r={lastPluginIndex:t,beforeHooks:[],beforeHooksIndices:[],afterHooks:[e],afterHooksIndices:[t]},n.set(zi,r),{decorateRun:i=>o=>Xg(r,i,o)})}}function ey(){return()=>({decorateGenerate:e=>(t,n)=>e(t,void 0)})}function J6(e){return e===null?new gt:e}function X6(e){return e!==null?"then"in e?e.then(J6):e:new gt}function ty(e,t,n,r){const i=ve(n);if(e.has(i)){const s=e.get(i);return r?X6(s):s}const o=t(n);return e.set(i,o),o}function ny(){return()=>{const e=new Map;return{decorateRun:t=>n=>ty(e,t,n,!1)}}}function ry(){return()=>{const e=new Map;return{decorateRun:t=>n=>ty(e,t,n,!0)}}}const Z6=setTimeout,Q6=clearTimeout,Ah=typeof performance<"u"?performance.now.bind(performance):Date.now.bind(Date);function eA(e,t){const n=Ah()+e;let r;return{expired:()=>Ah()>=n,clear:()=>Q6(r),promise:new Promise(i=>{r=Z6(()=>{t.running&&(t.interruptedWhileRunning=!0),i(new gt(!0))},e)})}}function tA(e,t,n,r){if(r.running=!0,e.expired())return r.interruptedWhileRunning=!0,r.running=!1,new gt(!0);const i=t(n);return i===null||!("then"in i)?(r.running=!1,i):(i.finally(()=>r.running=!1),Promise.race([i,e.promise]))}function iy(e,t={}){return()=>{const n={interruptedWhileRunning:!1,running:!1},r=eA(e,n);return{decorateRun:i=>o=>tA(r,i,o,n),onAllRunsComplete:i=>{if(r.clear(),t.failOnInterrupt&&!i.failed&&i.interrupted&&n.interruptedWhileRunning)return mm({...i,failed:!0})}}}}const nA=setTimeout,rA=clearTimeout;function iA(e){let t;return{clear:()=>rA(t),promise:new Promise(n=>{t=nA(()=>{n({error:new D(`Property timeout: exceeded limit of ${e} milliseconds`)})},e)})}}function oA(e,t,n){const r=iA(e),i=t(n);if(i===null||!("then"in i))return r.clear(),i;const o=Promise.race([i,r.promise]);return o.then(r.clear,r.clear),o}function oy(e){return()=>({decorateRun:t=>n=>oA(e,t,n)})}var sA=o0({Arbitrary:()=>xe,ExecutionStatus:()=>am,PreconditionFailure:()=>gt,Random:()=>mo,Stream:()=>J,Value:()=>L,VerbosityLevel:()=>rm,__commitHash:()=>cy,__type:()=>sy,__version:()=>ay,afterEach:()=>Qg,anything:()=>zc,array:()=>ae,assert:()=>Vr,asyncDefaultReportMessage:()=>yc,asyncModelRun:()=>Og,asyncProperty:()=>dc,asyncStringify:()=>po,asyncToStringMethod:()=>Ut,base64String:()=>wg,beforeEach:()=>Zg,bigInt:()=>en,bigInt64Array:()=>Dg,bigUint64Array:()=>Bg,boolean:()=>Dt,chainUntil:()=>xc,check:()=>go,clone:()=>jm,cloneIfNeeded:()=>Tn,cloneMethod:()=>Fe,commands:()=>Cg,compareBooleanFunc:()=>ig,compareFunc:()=>og,configureGlobal:()=>Qp,constant:()=>we,constantFrom:()=>je,context:()=>Mm,createDepthIdentifier:()=>bo,date:()=>wo,defaultReportMessage:()=>gc,dictionary:()=>xo,domain:()=>So,double:()=>Wr,emailAddress:()=>vc,entityGraph:()=>lg,falsy:()=>_m,float:()=>Eo,float32Array:()=>Nc,float64Array:()=>jc,func:()=>sg,gen:()=>Em,getDepthContextFor:()=>yo,hasAsyncToStringMethod:()=>ho,hasCloneMethod:()=>yn,hasToStringMethod:()=>fo,hash:()=>Pr,ignoreEqualValues:()=>ny,infiniteStream:()=>bg,installGlobalPlugin:()=>ym,int16Array:()=>Fc,int32Array:()=>Rc,int8Array:()=>Lc,integer:()=>W,interruptAfterTimeLimit:()=>iy,ipV4:()=>To,ipV4Extended:()=>_c,ipV6:()=>Oc,json:()=>yg,jsonValue:()=>Gc,letrec:()=>Pc,limitShrink:()=>Jg,lorem:()=>fg,map:()=>qi,mapToConstant:()=>On,maxSafeInteger:()=>Cc,maxSafeNat:()=>ag,memo:()=>hg,mixedCase:()=>dg,modelRun:()=>Mg,nat:()=>Jt,noBias:()=>Or,noShrink:()=>Nr,object:()=>gg,oneof:()=>Ce,option:()=>Ct,pre:()=>jp,property:()=>Ur,readConfigureGlobal:()=>xt,record:()=>Ht,resetConfigureGlobal:()=>em,sample:()=>wm,scheduledModelRun:()=>Pg,scheduler:()=>Rg,schedulerFor:()=>Lg,set:()=>Wc,shuffledSubarray:()=>Eg,skipEqualValues:()=>ry,sparseArray:()=>qc,statistics:()=>xm,stream:()=>Qt,string:()=>be,stringMatching:()=>Yg,stringify:()=>ve,subarray:()=>Sg,timeout:()=>oy,toStringMethod:()=>St,tuple:()=>H,uint16Array:()=>Dc,uint32Array:()=>Bc,uint8Array:()=>Uc,uint8ClampedArray:()=>Vc,ulid:()=>vg,unbiased:()=>ey,uniqueArray:()=>tn,uuid:()=>Wi,webAuthority:()=>Kc,webFragments:()=>Hc,webPath:()=>Jc,webQueryParameters:()=>Xc,webSegment:()=>Yc,webUrl:()=>Zc});const sy="module",ay="4.10.2",cy="c77afa8277a67250d798c52e61343b8ed5fd268b";var aA=sA;const cA=Object.freeze(Object.defineProperty({__proto__:null,Arbitrary:xe,ExecutionStatus:am,PreconditionFailure:gt,Random:mo,Stream:J,Value:L,VerbosityLevel:rm,__commitHash:cy,__type:sy,__version:ay,afterEach:Qg,anything:zc,array:ae,assert:Vr,asyncDefaultReportMessage:yc,asyncModelRun:Og,asyncProperty:dc,asyncStringify:po,asyncToStringMethod:Ut,base64String:wg,beforeEach:Zg,bigInt:en,bigInt64Array:Dg,bigUint64Array:Bg,boolean:Dt,chainUntil:xc,check:go,clone:jm,cloneIfNeeded:Tn,cloneMethod:Fe,commands:Cg,compareBooleanFunc:ig,compareFunc:og,configureGlobal:Qp,constant:we,constantFrom:je,context:Mm,createDepthIdentifier:bo,date:wo,default:aA,defaultReportMessage:gc,dictionary:xo,domain:So,double:Wr,emailAddress:vc,entityGraph:lg,falsy:_m,float:Eo,float32Array:Nc,float64Array:jc,func:sg,gen:Em,getDepthContextFor:yo,hasAsyncToStringMethod:ho,hasCloneMethod:yn,hasToStringMethod:fo,hash:Pr,ignoreEqualValues:ny,infiniteStream:bg,installGlobalPlugin:ym,int16Array:Fc,int32Array:Rc,int8Array:Lc,integer:W,interruptAfterTimeLimit:iy,ipV4:To,ipV4Extended:_c,ipV6:Oc,json:yg,jsonValue:Gc,letrec:Pc,limitShrink:Jg,lorem:fg,map:qi,mapToConstant:On,maxSafeInteger:Cc,maxSafeNat:ag,memo:hg,mixedCase:dg,modelRun:Mg,nat:Jt,noBias:Or,noShrink:Nr,object:gg,oneof:Ce,option:Ct,pre:jp,property:Ur,readConfigureGlobal:xt,record:Ht,resetConfigureGlobal:em,sample:wm,scheduledModelRun:Pg,scheduler:Rg,schedulerFor:Lg,set:Wc,shuffledSubarray:Eg,skipEqualValues:ry,sparseArray:qc,statistics:xm,stream:Qt,string:be,stringMatching:Yg,stringify:ve,subarray:Sg,timeout:oy,toStringMethod:St,tuple:H,uint16Array:Dc,uint32Array:Bc,uint8Array:Uc,uint8ClampedArray:Vc,ulid:vg,unbiased:ey,uniqueArray:tn,uuid:Wi,webAuthority:Kc,webFragments:Hc,webPath:Jc,webQueryParameters:Xc,webSegment:Yc,webUrl:Zc},Symbol.toStringTag,{value:"Module"}));var Oa=e=>String(e);Oa.open=Oa.close="";var pr=()=>Oa,Le="\x1B[39m",Ue="\x1B[49m",uA=(e,t,n,r,i)=>{let o="",s=0;do o+=e.substring(s,r)+n,s=r+i,r=e.indexOf(t,s);while(~r);return o+e.substring(s)},uy=(e,t,n=e,r=e.length)=>{let i=t.length,o=s=>{let c=s+"",a=c.indexOf(t,r);return~a?e+uA(c,t,n,a,i)+t:e+c+t};return o.open=e,o.close=t,o},fi=(e,t)=>uy(e,t,e,5),kh=e=>{let t=e.charCodeAt(0)===35?e.slice(1):e,n=parseInt(t,16)||0;return t.length<6?`${(n>>8&15)*17};${(n>>4&15)*17};${(n&15)*17}`:`${n>>16&255};${n>>8&255};${n&255}`};function lA(e){let t=e?uy:pr;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m",Le),red:t("\x1B[31m",Le),green:t("\x1B[32m",Le),yellow:t("\x1B[33m",Le),blue:t("\x1B[34m",Le),magenta:t("\x1B[35m",Le),cyan:t("\x1B[36m",Le),white:t("\x1B[37m",Le),gray:t("\x1B[90m",Le),bgBlack:t("\x1B[40m",Ue),bgRed:t("\x1B[41m",Ue),bgGreen:t("\x1B[42m",Ue),bgYellow:t("\x1B[43m",Ue),bgBlue:t("\x1B[44m",Ue),bgMagenta:t("\x1B[45m",Ue),bgCyan:t("\x1B[46m",Ue),bgWhite:t("\x1B[47m",Ue),blackBright:t("\x1B[90m",Le),redBright:t("\x1B[91m",Le),greenBright:t("\x1B[92m",Le),yellowBright:t("\x1B[93m",Le),blueBright:t("\x1B[94m",Le),magentaBright:t("\x1B[95m",Le),cyanBright:t("\x1B[96m",Le),whiteBright:t("\x1B[97m",Le),bgBlackBright:t("\x1B[100m",Ue),bgRedBright:t("\x1B[101m",Ue),bgGreenBright:t("\x1B[102m",Ue),bgYellowBright:t("\x1B[103m",Ue),bgBlueBright:t("\x1B[104m",Ue),bgMagentaBright:t("\x1B[105m",Ue),bgCyanBright:t("\x1B[106m",Ue),bgWhiteBright:t("\x1B[107m",Ue),rgb:e?(n,r,i)=>fi(`\x1B[38;2;${n};${r};${i}m`,Le):pr,bgRgb:e?(n,r,i)=>fi(`\x1B[48;2;${n};${r};${i}m`,Ue):pr,hex:e?n=>fi(`\x1B[38;2;${kh(n)}m`,Le):pr,bgHex:e?n=>fi(`\x1B[48;2;${kh(n)}m`,Ue):pr}}function fA(){let e=typeof process<"u"?process:void 0,t=(e==null?void 0:e.env)||{},n=t.FORCE_TTY!=="false",r=(e==null?void 0:e.argv)||[];return!("NO_COLOR"in t||r.includes("--no-color"))&&("FORCE_COLOR"in t||r.includes("--color")||(e==null?void 0:e.platform)==="win32"||n&&t.TERM!=="dumb"||"CI"in t)||typeof window<"u"&&!!window.chrome}function hA({force:e}={}){let t=e||fA();return lA(t)}var dA=hA(),Me=dA;function ly(e,t){return t.forEach(function(n){n&&typeof n!="string"&&!Array.isArray(n)&&Object.keys(n).forEach(function(r){if(r!=="default"&&!(r in e)){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}})}),Object.freeze(e)}function pA(e,t){const n=Object.keys(e),r=t===null?n:n.sort(t);if(Object.getOwnPropertySymbols)for(const i of Object.getOwnPropertySymbols(e))Object.getOwnPropertyDescriptor(e,i).enumerable&&r.push(i);return r}function zr(e,t,n,r,i,o,s=": "){let c="",a=0,u=e.next();if(!u.done){c+=t.spacingOuter;const l=n+t.indent;for(;!u.done;){if(c+=l,a++===t.maxWidth){c+="…";break}const f=o(u.value[0],t,l,r,i),h=o(u.value[1],t,l,r,i);c+=f+s+h,u=e.next(),u.done?t.min||(c+=","):c+=`,${t.spacingInner}`}c+=t.spacingOuter+n}return c}function tu(e,t,n,r,i,o){let s="",c=0,a=e.next();if(!a.done){s+=t.spacingOuter;const u=n+t.indent;for(;!a.done;){if(s+=u,c++===t.maxWidth){s+="…";break}s+=o(a.value,t,u,r,i),a=e.next(),a.done?t.min||(s+=","):s+=`,${t.spacingInner}`}s+=t.spacingOuter+n}return s}function Gi(e,t,n,r,i,o){let s="";e=e instanceof ArrayBuffer?new DataView(e):e;const c=u=>u instanceof DataView,a=c(e)?e.byteLength:e.length;if(a>0){s+=t.spacingOuter;const u=n+t.indent;for(let l=0;l<a;l++){if(s+=u,l===t.maxWidth){s+="…";break}(c(e)||l in e)&&(s+=o(c(e)?e.getInt8(l):e[l],t,u,r,i)),l<a-1?s+=`,${t.spacingInner}`:t.min||(s+=",")}s+=t.spacingOuter+n}return s}function nu(e,t,n,r,i,o){let s="";const c=pA(e,t.compareKeys);if(c.length>0){s+=t.spacingOuter;const a=n+t.indent;for(let u=0;u<c.length;u++){const l=c[u],f=o(l,t,a,r,i),h=o(e[l],t,a,r,i);s+=`${a+f}: ${h}`,u<c.length-1?s+=`,${t.spacingInner}`:t.min||(s+=",")}s+=t.spacingOuter+n}return s}const mA=typeof Symbol=="function"&&Symbol.for?Symbol.for("jest.asymmetricMatcher"):1267621,hi=" ",gA=(e,t,n,r,i,o)=>{const s=e.toString();if(s==="ArrayContaining"||s==="ArrayNotContaining")return++r>t.maxDepth?`[${s}]`:`${s+hi}[${Gi(e.sample,t,n,r,i,o)}]`;if(s==="ObjectContaining"||s==="ObjectNotContaining")return++r>t.maxDepth?`[${s}]`:`${s+hi}{${nu(e.sample,t,n,r,i,o)}}`;if(s==="StringMatching"||s==="StringNotMatching"||s==="StringContaining"||s==="StringNotContaining")return s+hi+o(e.sample,t,n,r,i);if(typeof e.toAsymmetricMatcher!="function")throw new TypeError(`Asymmetric matcher ${e.constructor.name} does not implement toAsymmetricMatcher()`);return e.toAsymmetricMatcher()},yA=e=>e&&e.$$typeof===mA,bA={serialize:gA,test:yA},wA=" ",fy=new Set(["DOMStringMap","NamedNodeMap"]),xA=/^(?:HTML\w*Collection|NodeList)$/;function SA(e){return fy.has(e)||xA.test(e)}const EA=e=>e&&e.constructor&&!!e.constructor.name&&SA(e.constructor.name);function TA(e){return e.constructor.name==="NamedNodeMap"}const vA=(e,t,n,r,i,o)=>{const s=e.constructor.name;return++r>t.maxDepth?`[${s}]`:(t.min?"":s+wA)+(fy.has(s)?`{${nu(TA(e)?[...e].reduce((c,a)=>(c[a.name]=a.value,c),{}):{...e},t,n,r,i,o)}}`:`[${Gi([...e],t,n,r,i,o)}]`)},AA={serialize:vA,test:EA};function hy(e){return e.replaceAll("<","<").replaceAll(">",">")}function ru(e,t,n,r,i,o,s){const c=r+n.indent,a=n.colors;return e.map(u=>{const l=t[u];if(typeof l=="string"&&l[0]==="_"&&l.startsWith("__vitest_")&&l.match(/__vitest_\d+__/))return"";let f=s(l,n,c,i,o);return typeof l!="string"&&(f.includes(`
|
|
38
|
+
`)&&(f=n.spacingOuter+c+f+n.spacingOuter+r),f=`{${f}}`),`${n.spacingInner+r+a.prop.open+u+a.prop.close}=${a.value.open}${f}${a.value.close}`}).join("")}function Ao(e,t,n,r,i,o){return e.map(s=>t.spacingOuter+n+(typeof s=="string"?dy(s,t):o(s,t,n,r,i))).join("")}function kA(e,t,n,r,i,o){return t.printShadowRoot===!1?"":[`${t.spacingOuter+n}#shadow-root`,Ao(e,t,n+t.indent,r,i,o)].join("")}function dy(e,t){const n=t.colors.content;return n.open+hy(e)+n.close}function IA(e,t){const n=t.colors.comment;return`${n.open}<!--${hy(e)}-->${n.close}`}function iu(e,t,n,r,i){const o=r.colors.tag;return`${o.open}<${e}${t&&o.close+t+r.spacingOuter+i+o.open}${n?`>${o.close}${n}${r.spacingOuter}${i}${o.open}</${e}`:`${t&&!r.min?"":" "}/`}>${o.close}`}function ou(e,t){const n=t.colors.tag;return`${n.open}<${e}${n.close} …${n.open} />${n.close}`}const CA=1,su=3,py=8,my=11,_A=/^(?:(?:HTML|SVG)\w*)?Element$/;function $A(e){try{return typeof e.hasAttribute=="function"&&e.hasAttribute("is")}catch{return!1}}function MA(e){const t=e.constructor.name,{nodeType:n,tagName:r}=e,i=typeof r=="string"&&r.includes("-")||$A(e);return n===CA&&(_A.test(t)||i)||n===su&&t==="Text"||n===py&&t==="Comment"||n===my&&t==="DocumentFragment"}const gy=e=>{var t;return((t=e==null?void 0:e.constructor)==null?void 0:t.name)&&MA(e)};function OA(e){return e.nodeType===su}function PA(e){return e.nodeType===py}function di(e){return e.nodeType===my}function Ih(e,t){let n=e.filter(r=>r.nodeType===su?(r.data||"").trim().length>0:!0);return t&&(n=n.filter(t)),n}function yy(e,t,n,r,i,o,s){if(OA(e))return dy(e.data,t);if(PA(e))return IA(e.data,t);const c=di(e)?"DocumentFragment":e.tagName.toLowerCase();if(++r>t.maxDepth)return ou(c,t);const a=Array.prototype.slice.call(e.childNodes||e.children),u=di(e)||!e.shadowRoot?[]:Array.prototype.slice.call(e.shadowRoot.children),l=s?Ih(a,s):a,f=s?Ih(u,s):u;return iu(c,ru(di(e)?[]:Array.from(e.attributes,h=>h.name).sort(),di(e)?{}:[...e.attributes].reduce((h,d)=>(h[d.name]=d.value,h),{}),t,n+t.indent,r,i,o),(f.length>0?kA(f,t,n+t.indent,r,i,o):"")+Ao(l,t,n+t.indent,r,i,o),t,n)}const NA=(e,t,n,r,i,o)=>yy(e,t,n,r,i,o);function jA(e){return{test:gy,serialize:(t,n,r,i,o,s)=>yy(t,n,r,i,o,s,e)}}const FA={serialize:NA,test:gy},RA="@@__IMMUTABLE_ITERABLE__@@",LA="@@__IMMUTABLE_LIST__@@",DA="@@__IMMUTABLE_KEYED__@@",BA="@@__IMMUTABLE_MAP__@@",Ch="@@__IMMUTABLE_ORDERED__@@",UA="@@__IMMUTABLE_RECORD__@@",VA="@@__IMMUTABLE_SEQ__@@",qA="@@__IMMUTABLE_SET__@@",WA="@@__IMMUTABLE_STACK__@@",Xn=e=>`Immutable.${e}`,ko=e=>`[${e}]`,Fr=" ",_h="…";function zA(e,t,n,r,i,o,s){return++r>t.maxDepth?ko(Xn(s)):`${Xn(s)+Fr}{${zr(e.entries(),t,n,r,i,o)}}`}function GA(e){let t=0;return{next(){if(t<e._keys.length){const n=e._keys[t++];return{done:!1,value:[n,e.get(n)]}}return{done:!0,value:void 0}}}}function KA(e,t,n,r,i,o){const s=Xn(e._name||"Record");return++r>t.maxDepth?ko(s):`${s+Fr}{${zr(GA(e),t,n,r,i,o)}}`}function HA(e,t,n,r,i,o){const s=Xn("Seq");return++r>t.maxDepth?ko(s):e[DA]?`${s+Fr}{${e._iter||e._object?zr(e.entries(),t,n,r,i,o):_h}}`:`${s+Fr}[${e._iter||e._array||e._collection||e._iterable?tu(e.values(),t,n,r,i,o):_h}]`}function As(e,t,n,r,i,o,s){return++r>t.maxDepth?ko(Xn(s)):`${Xn(s)+Fr}[${tu(e.values(),t,n,r,i,o)}]`}const YA=(e,t,n,r,i,o)=>e[BA]?zA(e,t,n,r,i,o,e[Ch]?"OrderedMap":"Map"):e[LA]?As(e,t,n,r,i,o,"List"):e[qA]?As(e,t,n,r,i,o,e[Ch]?"OrderedSet":"Set"):e[WA]?As(e,t,n,r,i,o,"Stack"):e[VA]?HA(e,t,n,r,i,o):KA(e,t,n,r,i,o),JA=e=>e&&(e[RA]===!0||e[UA]===!0),XA={serialize:YA,test:JA};function by(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ks={exports:{}},pe={};/**
|
|
39
39
|
* @license React
|
|
40
40
|
* react-is.production.js
|
|
41
41
|
*
|
|
@@ -43,7 +43,7 @@ ${x2(i)}`),o}function uc(e){return aa(e,ke)}async function lc(e){const t=[];func
|
|
|
43
43
|
*
|
|
44
44
|
* This source code is licensed under the MIT license found in the
|
|
45
45
|
* LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/var
|
|
46
|
+
*/var $h;function ZA(){if($h)return pe;$h=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),a=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),l=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),d=Symbol.for("react.client.reference");function m(p){if(typeof p=="object"&&p!==null){var y=p.$$typeof;switch(y){case e:switch(p=p.type,p){case n:case i:case r:case a:case u:case h:return p;default:switch(p=p&&p.$$typeof,p){case s:case c:case f:case l:return p;case o:return p;default:return y}}case t:return y}}}return pe.ContextConsumer=o,pe.ContextProvider=s,pe.Element=e,pe.ForwardRef=c,pe.Fragment=n,pe.Lazy=f,pe.Memo=l,pe.Portal=t,pe.Profiler=i,pe.StrictMode=r,pe.Suspense=a,pe.SuspenseList=u,pe.isContextConsumer=function(p){return m(p)===o},pe.isContextProvider=function(p){return m(p)===s},pe.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===e},pe.isForwardRef=function(p){return m(p)===c},pe.isFragment=function(p){return m(p)===n},pe.isLazy=function(p){return m(p)===f},pe.isMemo=function(p){return m(p)===l},pe.isPortal=function(p){return m(p)===t},pe.isProfiler=function(p){return m(p)===i},pe.isStrictMode=function(p){return m(p)===r},pe.isSuspense=function(p){return m(p)===a},pe.isSuspenseList=function(p){return m(p)===u},pe.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===n||p===i||p===r||p===a||p===u||typeof p=="object"&&p!==null&&(p.$$typeof===f||p.$$typeof===l||p.$$typeof===s||p.$$typeof===o||p.$$typeof===c||p.$$typeof===d||p.getModuleId!==void 0)},pe.typeOf=m,pe}var Mh;function QA(){return Mh||(Mh=1,ks.exports=ZA()),ks.exports}var wy=QA(),ek=by(wy),tk=ly({__proto__:null,default:ek},[wy]),Is={exports:{}},ue={};/**
|
|
47
47
|
* @license React
|
|
48
48
|
* react-is.production.min.js
|
|
49
49
|
*
|
|
@@ -51,75 +51,75 @@ ${x2(i)}`),o}function uc(e){return aa(e,ke)}async function lc(e){const t=[];func
|
|
|
51
51
|
*
|
|
52
52
|
* This source code is licensed under the MIT license found in the
|
|
53
53
|
* LICENSE file in the root directory of this source tree.
|
|
54
|
-
*/var
|
|
55
|
-
${a}`)},{edgeSpacing:n.spacingOuter,min:n.min,spacing:n.spacingInner},n.colors)}catch(c){throw new
|
|
54
|
+
*/var Oh;function nk(){if(Oh)return ue;Oh=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.server_context"),a=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),d=Symbol.for("react.offscreen"),m;m=Symbol.for("react.module.reference");function p(y){if(typeof y=="object"&&y!==null){var x=y.$$typeof;switch(x){case e:switch(y=y.type,y){case n:case i:case r:case u:case l:return y;default:switch(y=y&&y.$$typeof,y){case c:case s:case a:case h:case f:case o:return y;default:return x}}case t:return x}}}return ue.ContextConsumer=s,ue.ContextProvider=o,ue.Element=e,ue.ForwardRef=a,ue.Fragment=n,ue.Lazy=h,ue.Memo=f,ue.Portal=t,ue.Profiler=i,ue.StrictMode=r,ue.Suspense=u,ue.SuspenseList=l,ue.isAsyncMode=function(){return!1},ue.isConcurrentMode=function(){return!1},ue.isContextConsumer=function(y){return p(y)===s},ue.isContextProvider=function(y){return p(y)===o},ue.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===e},ue.isForwardRef=function(y){return p(y)===a},ue.isFragment=function(y){return p(y)===n},ue.isLazy=function(y){return p(y)===h},ue.isMemo=function(y){return p(y)===f},ue.isPortal=function(y){return p(y)===t},ue.isProfiler=function(y){return p(y)===i},ue.isStrictMode=function(y){return p(y)===r},ue.isSuspense=function(y){return p(y)===u},ue.isSuspenseList=function(y){return p(y)===l},ue.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===n||y===i||y===r||y===u||y===l||y===d||typeof y=="object"&&y!==null&&(y.$$typeof===h||y.$$typeof===f||y.$$typeof===o||y.$$typeof===s||y.$$typeof===a||y.$$typeof===m||y.getModuleId!==void 0)},ue.typeOf=p,ue}var Ph;function rk(){return Ph||(Ph=1,Is.exports=nk()),Is.exports}var xy=rk(),ik=by(xy),ok=ly({__proto__:null,default:ik},[xy]);const sk=["isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isProfiler","isStrictMode","isSuspense","isSuspenseList","isValidElementType"],En=Object.fromEntries(sk.map(e=>[e,t=>ok[e](t)||tk[e](t)]));function Sy(e,t=[]){if(Array.isArray(e))for(const n of e)Sy(n,t);else e!=null&&e!==!1&&e!==""&&t.push(e);return t}function Nh(e){const t=e.type;if(typeof t=="string")return t;if(typeof t=="function")return t.displayName||t.name||"Unknown";if(En.isFragment(e))return"React.Fragment";if(En.isSuspense(e))return"React.Suspense";if(typeof t=="object"&&t!==null){if(En.isContextProvider(e))return"Context.Provider";if(En.isContextConsumer(e))return"Context.Consumer";if(En.isForwardRef(e)){if(t.displayName)return t.displayName;const n=t.render.displayName||t.render.name||"";return n===""?"ForwardRef":`ForwardRef(${n})`}if(En.isMemo(e)){const n=t.displayName||t.type.displayName||t.type.name||"";return n===""?"Memo":`Memo(${n})`}}return"UNDEFINED"}function ak(e){const{props:t}=e;return Object.keys(t).filter(n=>n!=="children"&&t[n]!==void 0).sort()}const ck=(e,t,n,r,i,o)=>++r>t.maxDepth?ou(Nh(e),t):iu(Nh(e),ru(ak(e),e.props,t,n+t.indent,r,i,o),Ao(Sy(e.props.children),t,n+t.indent,r,i,o),t,n),uk=e=>e!=null&&En.isElement(e),lk={serialize:ck,test:uk},fk=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.test.json"):245830487;function hk(e){const{props:t}=e;return t?Object.keys(t).filter(n=>t[n]!==void 0).sort():[]}const dk=(e,t,n,r,i,o)=>++r>t.maxDepth?ou(e.type,t):iu(e.type,e.props?ru(hk(e),e.props,t,n+t.indent,r,i,o):"",e.children?Ao(e.children,t,n+t.indent,r,i,o):"",t,n),pk=e=>e&&e.$$typeof===fk,mk={serialize:dk,test:pk},Ey=Object.prototype.toString,gk=Date.prototype.toISOString,yk=Error.prototype.toString,jh=RegExp.prototype.toString;function Oi(e){return typeof e.constructor=="function"&&e.constructor.name||"Object"}function bk(e){return typeof window<"u"&&e===window}const wk=/^Symbol\((.*)\)(.*)$/,xk=/\n/g;class Ty extends Error{constructor(t,n){super(t),this.stack=n,this.name=this.constructor.name}}function Sk(e){return e==="[object Array]"||e==="[object ArrayBuffer]"||e==="[object DataView]"||e==="[object Float32Array]"||e==="[object Float64Array]"||e==="[object Int8Array]"||e==="[object Int16Array]"||e==="[object Int32Array]"||e==="[object Uint8Array]"||e==="[object Uint8ClampedArray]"||e==="[object Uint16Array]"||e==="[object Uint32Array]"}function Ek(e){return Object.is(e,-0)?"-0":String(e)}function Tk(e){return`${e}n`}function Fh(e,t){return t?`[Function ${e.name||"anonymous"}]`:"[Function]"}function Rh(e){return String(e).replace(wk,"Symbol($1)")}function Lh(e){return`[${yk.call(e)}]`}function vy(e,t,n,r){if(e===!0||e===!1)return`${e}`;if(e===void 0)return"undefined";if(e===null)return"null";const i=typeof e;if(i==="number")return Ek(e);if(i==="bigint")return Tk(e);if(i==="string")return r?`"${e.replaceAll(/"|\\/g,"\\$&")}"`:`"${e}"`;if(i==="function")return Fh(e,t);if(i==="symbol")return Rh(e);const o=Ey.call(e);return o==="[object WeakMap]"?"WeakMap {}":o==="[object WeakSet]"?"WeakSet {}":o==="[object Function]"||o==="[object GeneratorFunction]"?Fh(e,t):o==="[object Symbol]"?Rh(e):o==="[object Date]"?Number.isNaN(+e)?"Date { NaN }":gk.call(e):o==="[object Error]"?Lh(e):o==="[object RegExp]"?n?jh.call(e).replaceAll(/[$()*+.?[\\\]^{|}]/g,"\\$&"):jh.call(e):e instanceof Error?Lh(e):null}function Ay(e,t,n,r,i,o){if(i.includes(e))return"[Circular]";i=[...i],i.push(e);const s=++r>t.maxDepth,c=t.min;if(t.callToJSON&&!s&&e.toJSON&&typeof e.toJSON=="function"&&!o)return un(e.toJSON(),t,n,r,i,!0);const a=Ey.call(e);return a==="[object Arguments]"?s?"[Arguments]":`${c?"":"Arguments "}[${Gi(e,t,n,r,i,un)}]`:Sk(a)?s?`[${e.constructor.name}]`:`${c||!t.printBasicPrototype&&e.constructor.name==="Array"?"":`${e.constructor.name} `}[${Gi(e,t,n,r,i,un)}]`:a==="[object Map]"?s?"[Map]":`Map {${zr(e.entries(),t,n,r,i,un," => ")}}`:a==="[object Set]"?s?"[Set]":`Set {${tu(e.values(),t,n,r,i,un)}}`:s||bk(e)?`[${Oi(e)}]`:`${c||!t.printBasicPrototype&&Oi(e)==="Object"?"":`${Oi(e)} `}{${nu(e,t,n,r,i,un)}}`}const vk={test:e=>e&&e instanceof Error,serialize(e,t,n,r,i,o){if(i.includes(e))return"[Circular]";i=[...i,e];const s=++r>t.maxDepth,{message:c,cause:a,...u}=e,l={message:c,...typeof a<"u"?{cause:a}:{},...e instanceof AggregateError?{errors:e.errors}:{},...u},f=e.name!=="Error"?e.name:Oi(e);return s?`[${f}]`:`${f} {${zr(Object.entries(l).values(),t,n,r,i,o)}}`}};function Ak(e){return e.serialize!=null}function ky(e,t,n,r,i,o){let s;try{s=Ak(e)?e.serialize(t,n,r,i,o,un):e.print(t,c=>un(c,n,r,i,o),c=>{const a=r+n.indent;return a+c.replaceAll(xk,`
|
|
55
|
+
${a}`)},{edgeSpacing:n.spacingOuter,min:n.min,spacing:n.spacingInner},n.colors)}catch(c){throw new Ty(c.message,c.stack)}if(typeof s!="string")throw new TypeError(`pretty-format: Plugin must return type "string" but instead returned "${typeof s}".`);return s}function Iy(e,t){for(const n of e)try{if(n.test(t))return n}catch(r){throw new Ty(r.message,r.stack)}return null}function un(e,t,n,r,i,o){var a;let s;const c=Iy(t.plugins,e);if(c!==null)s=ky(c,e,t,n,r,i);else{const u=vy(e,t.printFunctionName,t.escapeRegex,t.escapeString);u!==null?s=u:s=Ay(e,t,n,r,i,o)}return(a=t._outputLengthPerDepth)[r]??(a[r]=0),t._outputLengthPerDepth[r]+=s.length,t._outputLengthPerDepth[r]>t.maxOutputLength&&(t.maxDepth=0),s}const au={comment:"gray",content:"reset",prop:"yellow",tag:"cyan",value:"green"},Cy=Object.keys(au),bt={callToJSON:!0,compareKeys:void 0,escapeRegex:!1,escapeString:!0,highlight:!1,indent:2,maxDepth:Number.POSITIVE_INFINITY,maxOutputLength:1e6,maxWidth:Number.POSITIVE_INFINITY,min:!1,plugins:[],printBasicPrototype:!0,printFunctionName:!0,printShadowRoot:!0,theme:au};function kk(e){for(const t of Object.keys(e))if(!Object.hasOwn(bt,t))throw new Error(`pretty-format: Unknown option "${t}".`);if(e.min&&e.indent!==void 0&&e.indent!==0)throw new Error('pretty-format: Options "min" and "indent" cannot be used together.')}function Ik(){return Cy.reduce((e,t)=>{const n=au[t],r=n&&Me[n];if(r&&typeof r.close=="string"&&typeof r.open=="string")e[t]=r;else throw new Error(`pretty-format: Option "theme" has a key "${t}" whose value "${n}" is undefined in ansi-styles.`);return e},Object.create(null))}function Ck(){return Cy.reduce((e,t)=>(e[t]={close:"",open:""},e),Object.create(null))}function _y(e){return(e==null?void 0:e.printFunctionName)??bt.printFunctionName}function $y(e){return(e==null?void 0:e.escapeRegex)??bt.escapeRegex}function My(e){return(e==null?void 0:e.escapeString)??bt.escapeString}function Dh(e){return{callToJSON:(e==null?void 0:e.callToJSON)??bt.callToJSON,colors:e!=null&&e.highlight?Ik():Ck(),compareKeys:typeof(e==null?void 0:e.compareKeys)=="function"||(e==null?void 0:e.compareKeys)===null?e.compareKeys:bt.compareKeys,escapeRegex:$y(e),escapeString:My(e),indent:e!=null&&e.min?"":_k((e==null?void 0:e.indent)??bt.indent),maxDepth:(e==null?void 0:e.maxDepth)??bt.maxDepth,maxWidth:(e==null?void 0:e.maxWidth)??bt.maxWidth,min:(e==null?void 0:e.min)??bt.min,plugins:(e==null?void 0:e.plugins)??bt.plugins,printBasicPrototype:(e==null?void 0:e.printBasicPrototype)??!0,printFunctionName:_y(e),printShadowRoot:(e==null?void 0:e.printShadowRoot)??!0,spacingInner:e!=null&&e.min?" ":`
|
|
56
56
|
`,spacingOuter:e!=null&&e.min?"":`
|
|
57
|
-
`,maxOutputLength:(e==null?void 0:e.maxOutputLength)??
|
|
58
|
-
`)}function
|
|
59
|
-
`&&(n="none"):n==="multiline"?e[r-1]==="*"&&e[r]==="/"&&(n="none"):n==="none"&&(e[r]==="/"&&e[r+1]==="/"?n="singleline":e[r]==="/"&&e[r+1]==="*"?(n="multiline",r+=2):t.push(e[r]));return t.join("")}function Vi(e){return e==null&&(e=[]),Array.isArray(e)?e:[e]}function Rt(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}function CI(e){return e===Object.prototype||e===Function.prototype||e===RegExp.prototype}function jr(e){return Object.prototype.toString.apply(e).slice(8,-1)}function _I(e,t){const n=typeof t=="function"?t:r=>t.add(r);Object.getOwnPropertyNames(e).forEach(n),Object.getOwnPropertySymbols(e).forEach(n)}function wy(e){const t=new Set;return CI(e)?[]:(_I(e,t),Array.from(t))}const xy={forceWritable:!1};function Uh(e,t=xy){return ka(e,new WeakMap,t)}function ka(e,t,n=xy){let r,i;if(t.has(e))return t.get(e);if(Array.isArray(e)){for(i=Array.from({length:r=e.length}),t.set(e,i);r--;)i[r]=ka(e[r],t,n);return i}if(Object.prototype.toString.call(e)==="[object Object]"){i=Object.create(Object.getPrototypeOf(e)),t.set(e,i);const o=wy(e);for(const s of o){const c=Object.getOwnPropertyDescriptor(e,s);if(!c)continue;const a=ka(e[s],t,n);n.forceWritable?Object.defineProperty(i,s,{enumerable:c.enumerable,configurable:!0,writable:!0,value:a}):"get"in c?Object.defineProperty(i,s,{...c,get(){return a}}):Object.defineProperty(i,s,{...c,value:a})}return i}return e}function Sy(){}function Vh(e,t,n=void 0){const r=t.replace(/\[(\d+)\]/g,".$1").split(".");let i=e;for(const o of r)if(i=new Object(i)[o],i===void 0)return n;return i}function qh(){let e=null,t=null;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n}function $I(e){let t=-1,n=null,r=0,i=0,o=null;for(;t<=e.length;){o=e[t],t++;const s=e[t];if((s==='"'||s==="'"||s==="`")&&o!=="\\"&&(n===s?n=null:n||(n=s)),n||(s==="("&&r++,s===")"&&i++),r&&i&&r===i)return t}return null}function MI(e){if(!Number.isNaN(e))return!1;const t=new Float64Array(1);return t[0]=e,new Uint32Array(t.buffer)[1]>>>31===1}function En(e){const t=e%10,n=e%100;return t===1&&n!==11?`${e}st`:t===2&&n!==12?`${e}nd`:t===3&&n!==13?`${e}rd`:`${e}th`}function Wh(e){return Array.from(new Set(e))}const Xe=-1,ze=1,$e=0;class Ie{constructor(t,n){R(this,0);R(this,1);this[0]=t,this[1]=n}}function OI(e,t){if(!e||!t||e.charAt(0)!==t.charAt(0))return 0;let n=0,r=Math.min(e.length,t.length),i=r,o=0;for(;n<i;)e.substring(o,i)===t.substring(o,i)?(n=i,o=n):r=i,i=Math.floor((r-n)/2+n);return i}function Ey(e,t){if(!e||!t||e.charAt(e.length-1)!==t.charAt(t.length-1))return 0;let n=0,r=Math.min(e.length,t.length),i=r,o=0;for(;n<i;)e.substring(e.length-i,e.length-o)===t.substring(t.length-i,t.length-o)?(n=i,o=n):r=i,i=Math.floor((r-n)/2+n);return i}function zh(e,t){const n=e.length,r=t.length;if(n===0||r===0)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));const i=Math.min(n,r);if(e===t)return i;let o=0,s=1;for(;;){const c=e.substring(i-s),a=t.indexOf(c);if(a===-1)return o;s+=a,(a===0||e.substring(i-s)===t.substring(0,s))&&(o=s,s++)}}function PI(e){let t=!1;const n=[];let r=0,i=null,o=0,s=0,c=0,a=0,u=0;for(;o<e.length;)e[o][0]===$e?(n[r++]=o,s=a,c=u,a=0,u=0,i=e[o][1]):(e[o][0]===ze?a+=e[o][1].length:u+=e[o][1].length,i&&i.length<=Math.max(s,c)&&i.length<=Math.max(a,u)&&(e.splice(n[r-1],0,new Ie(Xe,i)),e[n[r-1]+1][0]=ze,r--,r--,o=r>0?n[r-1]:-1,s=0,c=0,a=0,u=0,i=null,t=!0)),o++;for(t&&Ty(e),FI(e),o=1;o<e.length;){if(e[o-1][0]===Xe&&e[o][0]===ze){const l=e[o-1][1],f=e[o][1],h=zh(l,f),d=zh(f,l);h>=d?(h>=l.length/2||h>=f.length/2)&&(e.splice(o,0,new Ie($e,f.substring(0,h))),e[o-1][1]=l.substring(0,l.length-h),e[o+1][1]=f.substring(h),o++):(d>=l.length/2||d>=f.length/2)&&(e.splice(o,0,new Ie($e,l.substring(0,d))),e[o-1][0]=ze,e[o-1][1]=f.substring(0,f.length-d),e[o+1][0]=Xe,e[o+1][1]=l.substring(d),o++),o++}o++}}const Gh=/[^a-z0-9]/i,Kh=/\s/,Hh=/[\r\n]/,NI=/\n\r?\n$/,jI=/^\r?\n\r?\n/;function FI(e){let t=1;for(;t<e.length-1;){if(e[t-1][0]===$e&&e[t+1][0]===$e){let n=e[t-1][1],r=e[t][1],i=e[t+1][1];const o=Ey(n,r);if(o){const l=r.substring(r.length-o);n=n.substring(0,n.length-o),r=l+r.substring(0,r.length-o),i=l+i}let s=n,c=r,a=i,u=li(n,r)+li(r,i);for(;r.charAt(0)===i.charAt(0);){n+=r.charAt(0),r=r.substring(1)+i.charAt(0),i=i.substring(1);const l=li(n,r)+li(r,i);l>=u&&(u=l,s=n,c=r,a=i)}e[t-1][1]!==s&&(s?e[t-1][1]=s:(e.splice(t-1,1),t--),e[t][1]=c,a?e[t+1][1]=a:(e.splice(t+1,1),t--))}t++}}function Ty(e){var a;e.push(new Ie($e,""));let t=0,n=0,r=0,i="",o="",s;for(;t<e.length;)switch(e[t][0]){case ze:r++,o+=e[t][1],t++;break;case Xe:n++,i+=e[t][1],t++;break;case $e:n+r>1?(n!==0&&r!==0&&(s=OI(o,i),s!==0&&(t-n-r>0&&e[t-n-r-1][0]===$e?e[t-n-r-1][1]+=o.substring(0,s):(e.splice(0,0,new Ie($e,o.substring(0,s))),t++),o=o.substring(s),i=i.substring(s)),s=Ey(o,i),s!==0&&(e[t][1]=o.substring(o.length-s)+e[t][1],o=o.substring(0,o.length-s),i=i.substring(0,i.length-s))),t-=n+r,e.splice(t,n+r),i.length&&(e.splice(t,0,new Ie(Xe,i)),t++),o.length&&(e.splice(t,0,new Ie(ze,o)),t++),t++):t!==0&&e[t-1][0]===$e?(e[t-1][1]+=e[t][1],e.splice(t,1)):t++,r=0,n=0,i="",o="";break}((a=e.at(-1))==null?void 0:a[1])===""&&e.pop();let c=!1;for(t=1;t<e.length-1;)e[t-1][0]===$e&&e[t+1][0]===$e&&(e[t][1].substring(e[t][1].length-e[t-1][1].length)===e[t-1][1]?(e[t][1]=e[t-1][1]+e[t][1].substring(0,e[t][1].length-e[t-1][1].length),e[t+1][1]=e[t-1][1]+e[t+1][1],e.splice(t-1,1),c=!0):e[t][1].substring(0,e[t+1][1].length)===e[t+1][1]&&(e[t-1][1]+=e[t+1][1],e[t][1]=e[t][1].substring(e[t+1][1].length)+e[t+1][1],e.splice(t+1,1),c=!0)),t++;c&&Ty(e)}function li(e,t){if(!e||!t)return 6;const n=e.charAt(e.length-1),r=t.charAt(0),i=n.match(Gh),o=r.match(Gh),s=i&&n.match(Kh),c=o&&r.match(Kh),a=s&&n.match(Hh),u=c&&r.match(Hh),l=a&&e.match(NI),f=u&&t.match(jI);return l||f?5:a||u?4:i&&!s&&c?3:s||c?2:i||o?1:0}const vy="Compared values have no visual difference.",RI="Compared values serialize to the same structure.\nPrinting internal object structure without calling `toJSON` instead.";function LI(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var fi={},Yh;function DI(){if(Yh)return fi;Yh=1,Object.defineProperty(fi,"__esModule",{value:!0}),fi.default=h;const e="diff-sequences",t=0,n=(d,m,p,y,x)=>{let T=0;for(;d<m&&p<y&&x(d,p);)d+=1,p+=1,T+=1;return T},r=(d,m,p,y,x)=>{let T=0;for(;d<=m&&p<=y&&x(m,y);)m-=1,y-=1,T+=1;return T},i=(d,m,p,y,x,T,O)=>{let k=0,_=-d,$=T[k],C=$;T[k]+=n($+1,m,y+$-_+1,p,x);const z=d<O?d:O;for(k+=1,_+=2;k<=z;k+=1,_+=2){if(k!==d&&C<T[k])$=T[k];else if($=C+1,m<=$)return k-1;C=T[k],T[k]=$+n($+1,m,y+$-_+1,p,x)}return O},o=(d,m,p,y,x,T,O)=>{let k=0,_=d,$=T[k],C=$;T[k]-=r(m,$-1,p,y+$-_-1,x);const z=d<O?d:O;for(k+=1,_-=2;k<=z;k+=1,_-=2){if(k!==d&&T[k]<C)$=T[k];else if($=C-1,$<m)return k-1;C=T[k],T[k]=$-r(m,$-1,p,y+$-_-1,x)}return O},s=(d,m,p,y,x,T,O,k,_,$,C)=>{const z=y-m,le=p-m,X=x-y-le,ie=-X-(d-1),ve=-X+(d-1);let ye=t;const fe=d<k?d:k;for(let ee=0,he=-d;ee<=fe;ee+=1,he+=2){const Ke=ee===0||ee!==d&&ye<O[ee],_e=Ke?O[ee]:ye,oe=Ke?_e:_e+1,Ee=z+oe-he,Re=n(oe+1,p,Ee+1,x,T),Ve=oe+Re;if(ye=O[ee],O[ee]=Ve,ie<=he&&he<=ve){const Ct=(d-1-(he+X))/2;if(Ct<=$&&_[Ct]-1<=Ve){const Ze=z+_e-(Ke?he+1:he-1),He=r(m,_e,y,Ze,T),nt=_e-He,On=Ze-He,_t=nt+1,sr=On+1;C.nChangePreceding=d-1,d-1===_t+sr-m-y?(C.aEndPreceding=m,C.bEndPreceding=y):(C.aEndPreceding=_t,C.bEndPreceding=sr),C.nCommonPreceding=He,He!==0&&(C.aCommonPreceding=_t,C.bCommonPreceding=sr),C.nCommonFollowing=Re,Re!==0&&(C.aCommonFollowing=oe+1,C.bCommonFollowing=Ee+1);const Ye=Ve+1,$t=Ee+Re+1;return C.nChangeFollowing=d-1,d-1===p+x-Ye-$t?(C.aStartFollowing=p,C.bStartFollowing=x):(C.aStartFollowing=Ye,C.bStartFollowing=$t),!0}}}return!1},c=(d,m,p,y,x,T,O,k,_,$,C)=>{const z=x-p,le=p-m,X=x-y-le,ie=X-d,ve=X+d;let ye=t;const fe=d<$?d:$;for(let ee=0,he=d;ee<=fe;ee+=1,he-=2){const Ke=ee===0||ee!==d&&_[ee]<ye,_e=Ke?_[ee]:ye,oe=Ke?_e:_e-1,Ee=z+oe-he,Re=r(m,oe-1,y,Ee-1,T),Ve=oe-Re;if(ye=_[ee],_[ee]=Ve,ie<=he&&he<=ve){const Ct=(d+(he-X))/2;if(Ct<=k&&Ve-1<=O[Ct]){const Ze=Ee-Re;if(C.nChangePreceding=d,d===Ve+Ze-m-y?(C.aEndPreceding=m,C.bEndPreceding=y):(C.aEndPreceding=Ve,C.bEndPreceding=Ze),C.nCommonPreceding=Re,Re!==0&&(C.aCommonPreceding=Ve,C.bCommonPreceding=Ze),C.nChangeFollowing=d-1,d===1)C.nCommonFollowing=0,C.aStartFollowing=p,C.bStartFollowing=x;else{const He=z+_e-(Ke?he-1:he+1),nt=n(_e,p,He,x,T);C.nCommonFollowing=nt,nt!==0&&(C.aCommonFollowing=_e,C.bCommonFollowing=He);const On=_e+nt,_t=He+nt;d-1===p+x-On-_t?(C.aStartFollowing=p,C.bStartFollowing=x):(C.aStartFollowing=On,C.bStartFollowing=_t)}return!0}}}return!1},a=(d,m,p,y,x,T,O,k,_)=>{const $=y-m,C=x-p,z=p-m,le=x-y,D=le-z;let X=z,ie=z;if(O[0]=m-1,k[0]=p,D%2===0){const ve=(d||D)/2,ye=(z+le)/2;for(let fe=1;fe<=ye;fe+=1)if(X=i(fe,p,x,$,T,O,X),fe<ve)ie=o(fe,m,y,C,T,k,ie);else if(c(fe,m,p,y,x,T,O,X,k,ie,_))return}else{const ve=((d||D)+1)/2,ye=(z+le+1)/2;let fe=1;for(X=i(fe,p,x,$,T,O,X),fe+=1;fe<=ye;fe+=1)if(ie=o(fe-1,m,y,C,T,k,ie),fe<ve)X=i(fe,p,x,$,T,O,X);else if(s(fe,m,p,y,x,T,O,X,k,ie,_))return}throw new Error(`${e}: no overlap aStart=${m} aEnd=${p} bStart=${y} bEnd=${x}`)},u=(d,m,p,y,x,T,O,k,_,$)=>{if(x-y<p-m){if(T=!T,T&&O.length===1){const{foundSubsequence:Ve,isCommon:Ct}=O[0];O[1]={foundSubsequence:(Ze,He,nt)=>{Ve(Ze,nt,He)},isCommon:(Ze,He)=>Ct(He,Ze)}}const Ee=m,Re=p;m=y,p=x,y=Ee,x=Re}const{foundSubsequence:C,isCommon:z}=O[T?1:0];a(d,m,p,y,x,z,k,_,$);const{nChangePreceding:le,aEndPreceding:D,bEndPreceding:X,nCommonPreceding:ie,aCommonPreceding:ve,bCommonPreceding:ye,nCommonFollowing:fe,aCommonFollowing:ee,bCommonFollowing:he,nChangeFollowing:Ke,aStartFollowing:_e,bStartFollowing:oe}=$;m<D&&y<X&&u(le,m,D,y,X,T,O,k,_,$),ie!==0&&C(ie,ve,ye),fe!==0&&C(fe,ee,he),_e<p&&oe<x&&u(Ke,_e,p,oe,x,T,O,k,_,$)},l=(d,m)=>{if(typeof m!="number")throw new TypeError(`${e}: ${d} typeof ${typeof m} is not a number`);if(!Number.isSafeInteger(m))throw new RangeError(`${e}: ${d} value ${m} is not a safe integer`);if(m<0)throw new RangeError(`${e}: ${d} value ${m} is a negative integer`)},f=(d,m)=>{const p=typeof m;if(p!=="function")throw new TypeError(`${e}: ${d} typeof ${p} is not a function`)};function h(d,m,p,y){l("aLength",d),l("bLength",m),f("isCommon",p),f("foundSubsequence",y);const x=n(0,d,0,m,p);if(x!==0&&y(x,0,0),d!==x||m!==x){const T=x,O=x,k=r(T,d-1,O,m-1,p),_=d-k,$=m-k,C=x+k;d!==C&&m!==C&&u(0,T,_,O,$,!1,[{foundSubsequence:y,isCommon:p}],[t],[t],{aCommonFollowing:t,aCommonPreceding:t,aEndPreceding:t,aStartFollowing:t,bCommonFollowing:t,bCommonPreceding:t,bEndPreceding:t,bStartFollowing:t,nChangeFollowing:t,nChangePreceding:t,nCommonFollowing:t,nCommonPreceding:t}),k!==0&&y(k,_,$)}}return fi}var BI=DI(),Ay=LI(BI);function UI(e,t){return e.replace(/\s+$/,n=>t(n))}function nu(e,t,n,r,i,o){return e.length!==0?n(`${r} ${UI(e,i)}`):r!==" "?n(r):t&&o.length!==0?n(`${r} ${o}`):""}function Iy(e,t,{aColor:n,aIndicator:r,changeLineTrailingSpaceColor:i,emptyFirstOrLastLinePlaceholder:o}){return nu(e,t,n,r,i,o)}function ky(e,t,{bColor:n,bIndicator:r,changeLineTrailingSpaceColor:i,emptyFirstOrLastLinePlaceholder:o}){return nu(e,t,n,r,i,o)}function Cy(e,t,{commonColor:n,commonIndicator:r,commonLineTrailingSpaceColor:i,emptyFirstOrLastLinePlaceholder:o}){return nu(e,t,n,r,i,o)}function Jh(e,t,n,r,{patchColor:i}){return i(`@@ -${e+1},${t-e} +${n+1},${r-n} @@`)}function VI(e,t){const n=e.length,r=t.contextLines,i=r+r;let o=n,s=!1,c=0,a=0;for(;a!==n;){const k=a;for(;a!==n&&e[a][0]===$e;)a+=1;if(k!==a)if(k===0)a>r&&(o-=a-r,s=!0);else if(a===n){const _=a-k;_>r&&(o-=_-r,s=!0)}else{const _=a-k;_>i&&(o-=_-i,c+=1)}for(;a!==n&&e[a][0]!==$e;)a+=1}const u=c!==0||s;c!==0?o+=c+1:s&&(o+=1);const l=o-1,f=[];let h=0;u&&f.push("");let d=0,m=0,p=0,y=0;const x=k=>{const _=f.length;f.push(Cy(k,_===0||_===l,t)),p+=1,y+=1},T=k=>{const _=f.length;f.push(Iy(k,_===0||_===l,t)),p+=1},O=k=>{const _=f.length;f.push(ky(k,_===0||_===l,t)),y+=1};for(a=0;a!==n;){let k=a;for(;a!==n&&e[a][0]===$e;)a+=1;if(k!==a)if(k===0){a>r&&(k=a-r,d=k,m=k,p=d,y=m);for(let _=k;_!==a;_+=1)x(e[_][1])}else if(a===n){const _=a-k>r?k+r:a;for(let $=k;$!==_;$+=1)x(e[$][1])}else{const _=a-k;if(_>i){const $=k+r;for(let z=k;z!==$;z+=1)x(e[z][1]);f[h]=Jh(d,p,m,y,t),h=f.length,f.push("");const C=_-i;d=p+C,m=y+C,p=d,y=m;for(let z=a-r;z!==a;z+=1)x(e[z][1])}else for(let $=k;$!==a;$+=1)x(e[$][1])}for(;a!==n&&e[a][0]===Xe;)T(e[a][1]),a+=1;for(;a!==n&&e[a][0]===ze;)O(e[a][1]),a+=1}return u&&(f[h]=Jh(d,p,m,y,t)),f.join(`
|
|
60
|
-
`)}function
|
|
61
|
-
`)}const
|
|
57
|
+
`,maxOutputLength:(e==null?void 0:e.maxOutputLength)??bt.maxOutputLength,_outputLengthPerDepth:[]}}function _k(e){return Array.from({length:e+1}).join(" ")}function wt(e,t){if(t&&(kk(t),t.plugins)){const r=Iy(t.plugins,e);if(r!==null)return ky(r,e,Dh(t),"",0,[])}const n=vy(e,_y(t),$y(t),My(t));return n!==null?n:Ay(e,Dh(t),"",0,[])}const Io={AsymmetricMatcher:bA,DOMCollection:AA,DOMElement:FA,Immutable:XA,ReactElement:lk,ReactTestComponent:mk,Error:vk},Bh={bold:["1","22"],dim:["2","22"],italic:["3","23"],underline:["4","24"],inverse:["7","27"],hidden:["8","28"],strike:["9","29"],black:["30","39"],red:["31","39"],green:["32","39"],yellow:["33","39"],blue:["34","39"],magenta:["35","39"],cyan:["36","39"],white:["37","39"],brightblack:["30;1","39"],brightred:["31;1","39"],brightgreen:["32;1","39"],brightyellow:["33;1","39"],brightblue:["34;1","39"],brightmagenta:["35;1","39"],brightcyan:["36;1","39"],brightwhite:["37;1","39"],grey:["90","39"]},$k={special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:"red"},Zn="…";function Mk(e,t){const n=Bh[$k[t]]||Bh[t]||"";return n?`\x1B[${n[0]}m${String(e)}\x1B[${n[1]}m`:String(e)}function Ok({showHidden:e=!1,depth:t=2,colors:n=!1,customInspect:r=!0,showProxy:i=!1,maxArrayLength:o=1/0,breakLength:s=1/0,seen:c=[],truncate:a=1/0,stylize:u=String}={},l){const f={showHidden:!!e,depth:Number(t),colors:!!n,customInspect:!!r,showProxy:!!i,maxArrayLength:Number(o),breakLength:Number(s),truncate:Number(a),seen:c,inspect:l,stylize:u};return f.colors&&(f.stylize=Mk),f}function Pk(e){return e>="\uD800"&&e<="\uDBFF"}function bn(e,t,n=Zn){e=String(e);const r=n.length,i=e.length;if(r>t&&i>r)return n;if(i>t&&i>r){let o=t-r;return o>0&&Pk(e[o-1])&&(o=o-1),`${e.slice(0,o)}${n}`}return e}function _t(e,t,n,r=", "){n=n||t.inspect;const i=e.length;if(i===0)return"";const o=t.truncate;let s="",c="",a="";for(let u=0;u<i;u+=1){const l=u+1===e.length,f=u+2===e.length;a=`${Zn}(${e.length-u})`;const h=e[u];t.truncate=o-s.length-(l?0:r.length);const d=c||n(h,t)+(l?"":r),m=s.length+d.length,p=m+a.length;if(l&&m>o&&s.length+a.length<=o||!l&&!f&&p>o||(c=l?"":n(e[u+1],t)+(f?"":r),!l&&f&&p>o&&m+c.length>o))break;if(s+=d,!l&&!f&&m+c.length>=o){a=`${Zn}(${e.length-u-1})`;break}a=""}return`${s}${a}`}function Nk(e){return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?e:JSON.stringify(e).replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'")}function Rr([e,t],n){return n.truncate-=2,typeof e=="string"?e=Nk(e):typeof e!="number"&&(e=`[${n.inspect(e,n)}]`),n.truncate-=e.length,t=n.inspect(t,n),`${e}: ${t}`}function jk(e,t){const n=Object.keys(e).slice(e.length);if(!e.length&&!n.length)return"[]";t.truncate-=4;const r=_t(e,t);t.truncate-=r.length;let i="";return n.length&&(i=_t(n.map(o=>[o,e[o]]),t,Rr)),`[ ${r}${i?`, ${i}`:""} ]`}const Fk=e=>typeof Buffer=="function"&&e instanceof Buffer?"Buffer":e[Symbol.toStringTag]?e[Symbol.toStringTag]:e.constructor.name;function Gt(e,t){const n=Fk(e);t.truncate-=n.length+4;const r=Object.keys(e).slice(e.length);if(!e.length&&!r.length)return`${n}[]`;let i="";for(let s=0;s<e.length;s++){const c=`${t.stylize(bn(e[s],t.truncate),"number")}${s===e.length-1?"":", "}`;if(t.truncate-=c.length,e[s]!==e.length&&t.truncate<=3){i+=`${Zn}(${e.length-e[s]+1})`;break}i+=c}let o="";return r.length&&(o=_t(r.map(s=>[s,e[s]]),t,Rr)),`${n}[ ${i}${o?`, ${o}`:""} ]`}function Rk(e,t){const n=e.toJSON();if(n===null)return"Invalid Date";const r=n.split("T"),i=r[0];return t.stylize(`${i}T${bn(r[1],t.truncate-i.length-1)}`,"date")}function Uh(e,t){const n=e[Symbol.toStringTag]||"Function",r=e.name;return r?t.stylize(`[${n} ${bn(r,t.truncate-11)}]`,"special"):t.stylize(`[${n}]`,"special")}function Lk([e,t],n){return n.truncate-=4,e=n.inspect(e,n),n.truncate-=e.length,t=n.inspect(t,n),`${e} => ${t}`}function Dk(e){const t=[];return e.forEach((n,r)=>{t.push([r,n])}),t}function Bk(e,t){return e.size===0?"Map{}":(t.truncate-=7,`Map{ ${_t(Dk(e),t,Lk)} }`)}const Uk=Number.isNaN||(e=>e!==e);function Vh(e,t){return Uk(e)?t.stylize("NaN","number"):e===1/0?t.stylize("Infinity","number"):e===-1/0?t.stylize("-Infinity","number"):e===0?t.stylize(1/e===1/0?"+0":"-0","number"):t.stylize(bn(String(e),t.truncate),"number")}function qh(e,t){let n=bn(e.toString(),t.truncate-1);return n!==Zn&&(n+="n"),t.stylize(n,"bigint")}function Vk(e,t){const n=e.toString().split("/")[2],r=t.truncate-(2+n.length),i=e.source;return t.stylize(`/${bn(i,r)}/${n}`,"regexp")}function qk(e){const t=[];return e.forEach(n=>{t.push(n)}),t}function Wk(e,t){return e.size===0?"Set{}":(t.truncate-=7,`Set{ ${_t(qk(e),t)} }`)}const Wh=new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]","g"),zk={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","'":"\\'","\\":"\\\\"},Gk=16;function Kk(e){return zk[e]||`\\u${`0000${e.charCodeAt(0).toString(Gk)}`.slice(-4)}`}function zh(e,t){return Wh.test(e)&&(e=e.replace(Wh,Kk)),t.stylize(`'${bn(e,t.truncate-2)}'`,"string")}function Gh(e){return"description"in Symbol.prototype?e.description?`Symbol(${e.description})`:"Symbol()":e.toString()}const Hk=()=>"Promise{…}";function Pi(e,t){const n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[];if(n.length===0&&r.length===0)return"{}";if(t.truncate-=4,t.seen=t.seen||[],t.seen.includes(e))return"[Circular]";t.seen.push(e);const i=_t(n.map(c=>[c,e[c]]),t,Rr),o=_t(r.map(c=>[c,e[c]]),t,Rr);t.seen.pop();let s="";return i&&o&&(s=", "),`{ ${i}${s}${o} }`}const Cs=typeof Symbol<"u"&&Symbol.toStringTag?Symbol.toStringTag:!1;function Yk(e,t){let n="";return Cs&&Cs in e&&(n=e[Cs]),n=n||e.constructor.name,(!n||n==="_class")&&(n="<Anonymous Class>"),t.truncate-=n.length,`${n}${Pi(e,t)}`}function Jk(e,t){return e.length===0?"Arguments[]":(t.truncate-=13,`Arguments[ ${_t(e,t)} ]`)}const Xk=["stack","line","column","name","message","fileName","lineNumber","columnNumber","number","description","cause"];function Zk(e,t){const n=Object.getOwnPropertyNames(e).filter(s=>Xk.indexOf(s)===-1),r=e.name;t.truncate-=r.length;let i="";if(typeof e.message=="string"?i=bn(e.message,t.truncate):n.unshift("message"),i=i?`: ${i}`:"",t.truncate-=i.length+5,t.seen=t.seen||[],t.seen.includes(e))return"[Circular]";t.seen.push(e);const o=_t(n.map(s=>[s,e[s]]),t,Rr);return`${r}${i}${o?` { ${o} }`:""}`}function Qk([e,t],n){return n.truncate-=3,t?`${n.stylize(String(e),"yellow")}=${n.stylize(`"${t}"`,"string")}`:`${n.stylize(String(e),"yellow")}`}function Pa(e,t){return _t(e,t,eI,`
|
|
58
|
+
`)}function eI(e,t){switch(e.nodeType){case 1:return Oy(e,t);case 3:return t.inspect(e.data,t);default:return t.inspect(e,t)}}function Oy(e,t){const n=e.getAttributeNames(),r=e.tagName.toLowerCase(),i=t.stylize(`<${r}`,"special"),o=t.stylize(">","special"),s=t.stylize(`</${r}>`,"special");t.truncate-=r.length*2+5;let c="";n.length>0&&(c+=" ",c+=_t(n.map(l=>[l,e.getAttribute(l)]),t,Qk," ")),t.truncate-=c.length;const a=t.truncate;let u=Pa(e.children,t);return u&&u.length>a&&(u=`${Zn}(${e.children.length})`),`${i}${c}${o}${u}${s}`}const tI=typeof Symbol=="function"&&typeof Symbol.for=="function",_s=tI?Symbol.for("chai/inspect"):"@@chai/inspect",$s=Symbol.for("nodejs.util.inspect.custom"),Kh=new WeakMap,Hh={},Yh={undefined:(e,t)=>t.stylize("undefined","undefined"),null:(e,t)=>t.stylize("null","null"),boolean:(e,t)=>t.stylize(String(e),"boolean"),Boolean:(e,t)=>t.stylize(String(e),"boolean"),number:Vh,Number:Vh,bigint:qh,BigInt:qh,string:zh,String:zh,function:Uh,Function:Uh,symbol:Gh,Symbol:Gh,Array:jk,Date:Rk,Map:Bk,Set:Wk,RegExp:Vk,Promise:Hk,WeakSet:(e,t)=>t.stylize("WeakSet{…}","special"),WeakMap:(e,t)=>t.stylize("WeakMap{…}","special"),Arguments:Jk,Int8Array:Gt,Uint8Array:Gt,Uint8ClampedArray:Gt,Int16Array:Gt,Uint16Array:Gt,Int32Array:Gt,Uint32Array:Gt,Float32Array:Gt,Float64Array:Gt,Generator:()=>"",DataView:()=>"",ArrayBuffer:()=>"",Error:Zk,HTMLCollection:Pa,NodeList:Pa},nI=(e,t,n,r)=>_s in e&&typeof e[_s]=="function"?e[_s](t):$s in e&&typeof e[$s]=="function"?e[$s](t.depth,t,r):"inspect"in e&&typeof e.inspect=="function"?e.inspect(t.depth,t):"constructor"in e&&Kh.has(e.constructor)?Kh.get(e.constructor)(e,t):Hh[n]?Hh[n](e,t):"",rI=Object.prototype.toString;function Ni(e,t={}){const n=Ok(t,Ni),{customInspect:r}=n;let i=e===null?"null":typeof e;if(i==="object"&&(i=rI.call(e).slice(8,-1)),i in Yh)return Yh[i](e,n);if(r&&e){const s=nI(e,n,i,Ni);if(s)return typeof s=="string"?s:Ni(s,n)}const o=e?Object.getPrototypeOf(e):!1;return o===Object.prototype||o===null?Pi(e,n):e&&typeof HTMLElement=="function"&&e instanceof HTMLElement?Oy(e,n):"constructor"in e?e.constructor!==Object?Yk(e,n):Pi(e,n):e===Object(e)?Pi(e,n):n.stylize(String(e),i)}const{AsymmetricMatcher:Py,DOMCollection:Ny,DOMElement:iI,Immutable:jy,ReactElement:Fy,ReactTestComponent:Ry}=Io,oI=[Ry,Fy,iI,Ny,jy,Py];function Tt(e,t=10,{maxLength:n,filterNode:r,...i}={}){const o=n??1e4;let s;const c=typeof r=="string"?sI(r):r,a=c?[Ry,Fy,jA(c),Ny,jy,Py]:oI;try{s=wt(e,{maxDepth:t,escapeString:!1,plugins:a,...i})}catch{s=wt(e,{callToJSON:!1,maxDepth:t,escapeString:!1,plugins:a,...i})}return s.length>=o&&t>1?Tt(e,Math.floor(Math.min(t,Number.MAX_SAFE_INTEGER)/2),{maxLength:n,filterNode:r,...i}):s}function sI(e){return r=>{if(r.nodeType===8)return!1;if(r.nodeType===1&&r.matches)try{return!r.matches(e)}catch{return!0}return!0}}const Ly=/%[sdjifoOc%]/g;function aI(e,t={}){const n=(c,a)=>t.prettifyObject?Tt(c,void 0,{printBasicPrototype:!1,escapeString:!1}):Dy(c,a);if(typeof e[0]!="string"){const c=[];for(let a=0;a<e.length;a++)c.push(n(e[a],{depth:0,colors:!1}));return c.join(" ")}const r=e.length;let i=1;const o=e[0];let s=String(o).replace(Ly,c=>{if(c==="%%")return"%";if(i>=r)return c;switch(c){case"%s":{const a=e[i++];return typeof a=="bigint"?`${a.toString()}n`:typeof a=="number"&&a===0&&1/a<0?"-0":typeof a=="object"&&a!==null?typeof a.toString=="function"&&a.toString!==Object.prototype.toString?a.toString():n(a,{depth:0,colors:!1}):String(a)}case"%d":{const a=e[i++];return typeof a=="bigint"?`${a.toString()}n`:typeof a=="symbol"?"NaN":Number(a).toString()}case"%i":{const a=e[i++];return typeof a=="bigint"?`${a.toString()}n`:Number.parseInt(String(a)).toString()}case"%f":return Number.parseFloat(String(e[i++])).toString();case"%o":return n(e[i++],{showHidden:!0,showProxy:!0});case"%O":return n(e[i++]);case"%c":return i++,"";case"%j":try{return JSON.stringify(e[i++])}catch(a){const u=a.message;if(u.includes("circular structure")||u.includes("cyclic structures")||u.includes("cyclic object"))return"[Circular]";throw a}default:return c}});for(let c=e[i];i<r;c=e[++i])c===null||typeof c!="object"?s+=` ${typeof c=="symbol"?c.toString():c}`:s+=` ${n(c)}`;return s}function cI(...e){return aI(e)}function Dy(e,t={}){return t.truncate===0&&(t.truncate=Number.POSITIVE_INFINITY),Ni(e,t)}function uI(e,t={}){typeof t.truncate>"u"&&(t.truncate=40);const n=Dy(e,t),r=Object.prototype.toString.call(e);if(t.truncate&&n.length>=t.truncate)if(r==="[object Function]"){const i=e;return i.name?`[Function: ${i.name}]`:"[Function]"}else{if(r==="[object Array]")return`[ Array(${e.length}) ]`;if(r==="[object Object]"){const i=Object.keys(e);return`{ Object (${i.length>2?`${i.splice(0,2).join(", ")}, ...`:i.join(", ")}) }`}else return n}return n}function lI(e){const{message:t="$$stack trace error",stackTraceLimit:n=1}=e||{},r=Error.stackTraceLimit,i=Error.prepareStackTrace;Error.stackTraceLimit=n,Error.prepareStackTrace=c=>c.stack;const s=new Error(t).stack||"";return Error.prepareStackTrace=i,Error.stackTraceLimit=r,s}function By(e){return e!=null}function Ze(e,t,n){const r=typeof e;if(!n.includes(r))throw new TypeError(`${t} value must be ${n.join(" or ")}, received "${r}"`)}function fI(e){return e===null||typeof e!="function"&&typeof e!="object"}function hI(e){const t=[];let n="none";for(let r=0;r<e.length;++r)n==="singleline"?e[r]===`
|
|
59
|
+
`&&(n="none"):n==="multiline"?e[r-1]==="*"&&e[r]==="/"&&(n="none"):n==="none"&&(e[r]==="/"&&e[r+1]==="/"?n="singleline":e[r]==="/"&&e[r+1]==="*"?(n="multiline",r+=2):t.push(e[r]));return t.join("")}function Ki(e){return e==null&&(e=[]),Array.isArray(e)?e:[e]}function Bt(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}function dI(e){return e===Object.prototype||e===Function.prototype||e===RegExp.prototype}function Lr(e){return Object.prototype.toString.apply(e).slice(8,-1)}function pI(e,t){const n=typeof t=="function"?t:r=>t.add(r);Object.getOwnPropertyNames(e).forEach(n),Object.getOwnPropertySymbols(e).forEach(n)}function Uy(e){const t=new Set;return dI(e)?[]:(pI(e,t),Array.from(t))}const Vy={forceWritable:!1};function Jh(e,t=Vy){return Na(e,new WeakMap,t)}function Na(e,t,n=Vy){let r,i;if(t.has(e))return t.get(e);if(Array.isArray(e)){for(i=Array.from({length:r=e.length}),t.set(e,i);r--;)i[r]=Na(e[r],t,n);return i}if(Object.prototype.toString.call(e)==="[object Object]"){i=Object.create(Object.getPrototypeOf(e)),t.set(e,i);const o=Uy(e);for(const s of o){const c=Object.getOwnPropertyDescriptor(e,s);if(!c)continue;const a=Na(e[s],t,n);n.forceWritable?Object.defineProperty(i,s,{enumerable:c.enumerable,configurable:!0,writable:!0,value:a}):"get"in c?Object.defineProperty(i,s,{...c,get(){return a}}):Object.defineProperty(i,s,{...c,value:a})}return i}return e}function qy(){}function Xh(e,t,n=void 0){const r=t.replace(/\[(\d+)\]/g,".$1").split(".");let i=e;for(const o of r)if(i=new Object(i)[o],i===void 0)return n;return i}function Zh(){let e=null,t=null;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n}function mI(e){let t=-1,n=null,r=0,i=0,o=null;for(;t<=e.length;){o=e[t],t++;const s=e[t];if((s==='"'||s==="'"||s==="`")&&o!=="\\"&&(n===s?n=null:n||(n=s)),n||(s==="("&&r++,s===")"&&i++),r&&i&&r===i)return t}return null}function gI(e){if(!Number.isNaN(e))return!1;const t=new Float64Array(1);return t[0]=e,new Uint32Array(t.buffer)[1]>>>31===1}function vn(e){const t=e%10,n=e%100;return t===1&&n!==11?`${e}st`:t===2&&n!==12?`${e}nd`:t===3&&n!==13?`${e}rd`:`${e}th`}function Qh(e){return Array.from(new Set(e))}const Qe=-1,Ke=1,$e=0;class Ie{constructor(t,n){R(this,0);R(this,1);this[0]=t,this[1]=n}}function yI(e,t){if(!e||!t||e.charAt(0)!==t.charAt(0))return 0;let n=0,r=Math.min(e.length,t.length),i=r,o=0;for(;n<i;)e.substring(o,i)===t.substring(o,i)?(n=i,o=n):r=i,i=Math.floor((r-n)/2+n);return i}function Wy(e,t){if(!e||!t||e.charAt(e.length-1)!==t.charAt(t.length-1))return 0;let n=0,r=Math.min(e.length,t.length),i=r,o=0;for(;n<i;)e.substring(e.length-i,e.length-o)===t.substring(t.length-i,t.length-o)?(n=i,o=n):r=i,i=Math.floor((r-n)/2+n);return i}function ed(e,t){const n=e.length,r=t.length;if(n===0||r===0)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));const i=Math.min(n,r);if(e===t)return i;let o=0,s=1;for(;;){const c=e.substring(i-s),a=t.indexOf(c);if(a===-1)return o;s+=a,(a===0||e.substring(i-s)===t.substring(0,s))&&(o=s,s++)}}function bI(e){let t=!1;const n=[];let r=0,i=null,o=0,s=0,c=0,a=0,u=0;for(;o<e.length;)e[o][0]===$e?(n[r++]=o,s=a,c=u,a=0,u=0,i=e[o][1]):(e[o][0]===Ke?a+=e[o][1].length:u+=e[o][1].length,i&&i.length<=Math.max(s,c)&&i.length<=Math.max(a,u)&&(e.splice(n[r-1],0,new Ie(Qe,i)),e[n[r-1]+1][0]=Ke,r--,r--,o=r>0?n[r-1]:-1,s=0,c=0,a=0,u=0,i=null,t=!0)),o++;for(t&&zy(e),SI(e),o=1;o<e.length;){if(e[o-1][0]===Qe&&e[o][0]===Ke){const l=e[o-1][1],f=e[o][1],h=ed(l,f),d=ed(f,l);h>=d?(h>=l.length/2||h>=f.length/2)&&(e.splice(o,0,new Ie($e,f.substring(0,h))),e[o-1][1]=l.substring(0,l.length-h),e[o+1][1]=f.substring(h),o++):(d>=l.length/2||d>=f.length/2)&&(e.splice(o,0,new Ie($e,l.substring(0,d))),e[o-1][0]=Ke,e[o-1][1]=f.substring(0,f.length-d),e[o+1][0]=Qe,e[o+1][1]=l.substring(d),o++),o++}o++}}const td=/[^a-z0-9]/i,nd=/\s/,rd=/[\r\n]/,wI=/\n\r?\n$/,xI=/^\r?\n\r?\n/;function SI(e){let t=1;for(;t<e.length-1;){if(e[t-1][0]===$e&&e[t+1][0]===$e){let n=e[t-1][1],r=e[t][1],i=e[t+1][1];const o=Wy(n,r);if(o){const l=r.substring(r.length-o);n=n.substring(0,n.length-o),r=l+r.substring(0,r.length-o),i=l+i}let s=n,c=r,a=i,u=pi(n,r)+pi(r,i);for(;r.charAt(0)===i.charAt(0);){n+=r.charAt(0),r=r.substring(1)+i.charAt(0),i=i.substring(1);const l=pi(n,r)+pi(r,i);l>=u&&(u=l,s=n,c=r,a=i)}e[t-1][1]!==s&&(s?e[t-1][1]=s:(e.splice(t-1,1),t--),e[t][1]=c,a?e[t+1][1]=a:(e.splice(t+1,1),t--))}t++}}function zy(e){var a;e.push(new Ie($e,""));let t=0,n=0,r=0,i="",o="",s;for(;t<e.length;)switch(e[t][0]){case Ke:r++,o+=e[t][1],t++;break;case Qe:n++,i+=e[t][1],t++;break;case $e:n+r>1?(n!==0&&r!==0&&(s=yI(o,i),s!==0&&(t-n-r>0&&e[t-n-r-1][0]===$e?e[t-n-r-1][1]+=o.substring(0,s):(e.splice(0,0,new Ie($e,o.substring(0,s))),t++),o=o.substring(s),i=i.substring(s)),s=Wy(o,i),s!==0&&(e[t][1]=o.substring(o.length-s)+e[t][1],o=o.substring(0,o.length-s),i=i.substring(0,i.length-s))),t-=n+r,e.splice(t,n+r),i.length&&(e.splice(t,0,new Ie(Qe,i)),t++),o.length&&(e.splice(t,0,new Ie(Ke,o)),t++),t++):t!==0&&e[t-1][0]===$e?(e[t-1][1]+=e[t][1],e.splice(t,1)):t++,r=0,n=0,i="",o="";break}((a=e.at(-1))==null?void 0:a[1])===""&&e.pop();let c=!1;for(t=1;t<e.length-1;)e[t-1][0]===$e&&e[t+1][0]===$e&&(e[t][1].substring(e[t][1].length-e[t-1][1].length)===e[t-1][1]?(e[t][1]=e[t-1][1]+e[t][1].substring(0,e[t][1].length-e[t-1][1].length),e[t+1][1]=e[t-1][1]+e[t+1][1],e.splice(t-1,1),c=!0):e[t][1].substring(0,e[t+1][1].length)===e[t+1][1]&&(e[t-1][1]+=e[t+1][1],e[t][1]=e[t][1].substring(e[t+1][1].length)+e[t+1][1],e.splice(t+1,1),c=!0)),t++;c&&zy(e)}function pi(e,t){if(!e||!t)return 6;const n=e.charAt(e.length-1),r=t.charAt(0),i=n.match(td),o=r.match(td),s=i&&n.match(nd),c=o&&r.match(nd),a=s&&n.match(rd),u=c&&r.match(rd),l=a&&e.match(wI),f=u&&t.match(xI);return l||f?5:a||u?4:i&&!s&&c?3:s||c?2:i||o?1:0}const Gy="Compared values have no visual difference.",EI="Compared values serialize to the same structure.\nPrinting internal object structure without calling `toJSON` instead.";function TI(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var mi={},id;function vI(){if(id)return mi;id=1,Object.defineProperty(mi,"__esModule",{value:!0}),mi.default=h;const e="diff-sequences",t=0,n=(d,m,p,y,x)=>{let E=0;for(;d<m&&p<y&&x(d,p);)d+=1,p+=1,E+=1;return E},r=(d,m,p,y,x)=>{let E=0;for(;d<=m&&p<=y&&x(m,y);)m-=1,y-=1,E+=1;return E},i=(d,m,p,y,x,E,$)=>{let I=0,_=-d,M=E[I],C=M;E[I]+=n(M+1,m,y+M-_+1,p,x);const z=d<$?d:$;for(I+=1,_+=2;I<=z;I+=1,_+=2){if(I!==d&&C<E[I])M=E[I];else if(M=C+1,m<=M)return I-1;C=E[I],E[I]=M+n(M+1,m,y+M-_+1,p,x)}return $},o=(d,m,p,y,x,E,$)=>{let I=0,_=d,M=E[I],C=M;E[I]-=r(m,M-1,p,y+M-_-1,x);const z=d<$?d:$;for(I+=1,_-=2;I<=z;I+=1,_-=2){if(I!==d&&E[I]<C)M=E[I];else if(M=C-1,M<m)return I-1;C=E[I],E[I]=M-r(m,M-1,p,y+M-_-1,x)}return $},s=(d,m,p,y,x,E,$,I,_,M,C)=>{const z=y-m,le=p-m,X=x-y-le,ie=-X-(d-1),Ae=-X+(d-1);let ye=t;const fe=d<I?d:I;for(let ee=0,he=-d;ee<=fe;ee+=1,he+=2){const Ye=ee===0||ee!==d&&ye<$[ee],_e=Ye?$[ee]:ye,oe=Ye?_e:_e+1,Ee=z+oe-he,Re=n(oe+1,p,Ee+1,x,E),We=oe+Re;if(ye=$[ee],$[ee]=We,ie<=he&&he<=Ae){const Mt=(d-1-(he+X))/2;if(Mt<=M&&_[Mt]-1<=We){const et=z+_e-(Ye?he+1:he-1),Je=r(m,_e,y,et,E),it=_e-Je,Nn=et-Je,Ot=it+1,cr=Nn+1;C.nChangePreceding=d-1,d-1===Ot+cr-m-y?(C.aEndPreceding=m,C.bEndPreceding=y):(C.aEndPreceding=Ot,C.bEndPreceding=cr),C.nCommonPreceding=Je,Je!==0&&(C.aCommonPreceding=Ot,C.bCommonPreceding=cr),C.nCommonFollowing=Re,Re!==0&&(C.aCommonFollowing=oe+1,C.bCommonFollowing=Ee+1);const Xe=We+1,Pt=Ee+Re+1;return C.nChangeFollowing=d-1,d-1===p+x-Xe-Pt?(C.aStartFollowing=p,C.bStartFollowing=x):(C.aStartFollowing=Xe,C.bStartFollowing=Pt),!0}}}return!1},c=(d,m,p,y,x,E,$,I,_,M,C)=>{const z=x-p,le=p-m,X=x-y-le,ie=X-d,Ae=X+d;let ye=t;const fe=d<M?d:M;for(let ee=0,he=d;ee<=fe;ee+=1,he-=2){const Ye=ee===0||ee!==d&&_[ee]<ye,_e=Ye?_[ee]:ye,oe=Ye?_e:_e-1,Ee=z+oe-he,Re=r(m,oe-1,y,Ee-1,E),We=oe-Re;if(ye=_[ee],_[ee]=We,ie<=he&&he<=Ae){const Mt=(d+(he-X))/2;if(Mt<=I&&We-1<=$[Mt]){const et=Ee-Re;if(C.nChangePreceding=d,d===We+et-m-y?(C.aEndPreceding=m,C.bEndPreceding=y):(C.aEndPreceding=We,C.bEndPreceding=et),C.nCommonPreceding=Re,Re!==0&&(C.aCommonPreceding=We,C.bCommonPreceding=et),C.nChangeFollowing=d-1,d===1)C.nCommonFollowing=0,C.aStartFollowing=p,C.bStartFollowing=x;else{const Je=z+_e-(Ye?he-1:he+1),it=n(_e,p,Je,x,E);C.nCommonFollowing=it,it!==0&&(C.aCommonFollowing=_e,C.bCommonFollowing=Je);const Nn=_e+it,Ot=Je+it;d-1===p+x-Nn-Ot?(C.aStartFollowing=p,C.bStartFollowing=x):(C.aStartFollowing=Nn,C.bStartFollowing=Ot)}return!0}}}return!1},a=(d,m,p,y,x,E,$,I,_)=>{const M=y-m,C=x-p,z=p-m,le=x-y,B=le-z;let X=z,ie=z;if($[0]=m-1,I[0]=p,B%2===0){const Ae=(d||B)/2,ye=(z+le)/2;for(let fe=1;fe<=ye;fe+=1)if(X=i(fe,p,x,M,E,$,X),fe<Ae)ie=o(fe,m,y,C,E,I,ie);else if(c(fe,m,p,y,x,E,$,X,I,ie,_))return}else{const Ae=((d||B)+1)/2,ye=(z+le+1)/2;let fe=1;for(X=i(fe,p,x,M,E,$,X),fe+=1;fe<=ye;fe+=1)if(ie=o(fe-1,m,y,C,E,I,ie),fe<Ae)X=i(fe,p,x,M,E,$,X);else if(s(fe,m,p,y,x,E,$,X,I,ie,_))return}throw new Error(`${e}: no overlap aStart=${m} aEnd=${p} bStart=${y} bEnd=${x}`)},u=(d,m,p,y,x,E,$,I,_,M)=>{if(x-y<p-m){if(E=!E,E&&$.length===1){const{foundSubsequence:We,isCommon:Mt}=$[0];$[1]={foundSubsequence:(et,Je,it)=>{We(et,it,Je)},isCommon:(et,Je)=>Mt(Je,et)}}const Ee=m,Re=p;m=y,p=x,y=Ee,x=Re}const{foundSubsequence:C,isCommon:z}=$[E?1:0];a(d,m,p,y,x,z,I,_,M);const{nChangePreceding:le,aEndPreceding:B,bEndPreceding:X,nCommonPreceding:ie,aCommonPreceding:Ae,bCommonPreceding:ye,nCommonFollowing:fe,aCommonFollowing:ee,bCommonFollowing:he,nChangeFollowing:Ye,aStartFollowing:_e,bStartFollowing:oe}=M;m<B&&y<X&&u(le,m,B,y,X,E,$,I,_,M),ie!==0&&C(ie,Ae,ye),fe!==0&&C(fe,ee,he),_e<p&&oe<x&&u(Ye,_e,p,oe,x,E,$,I,_,M)},l=(d,m)=>{if(typeof m!="number")throw new TypeError(`${e}: ${d} typeof ${typeof m} is not a number`);if(!Number.isSafeInteger(m))throw new RangeError(`${e}: ${d} value ${m} is not a safe integer`);if(m<0)throw new RangeError(`${e}: ${d} value ${m} is a negative integer`)},f=(d,m)=>{const p=typeof m;if(p!=="function")throw new TypeError(`${e}: ${d} typeof ${p} is not a function`)};function h(d,m,p,y){l("aLength",d),l("bLength",m),f("isCommon",p),f("foundSubsequence",y);const x=n(0,d,0,m,p);if(x!==0&&y(x,0,0),d!==x||m!==x){const E=x,$=x,I=r(E,d-1,$,m-1,p),_=d-I,M=m-I,C=x+I;d!==C&&m!==C&&u(0,E,_,$,M,!1,[{foundSubsequence:y,isCommon:p}],[t],[t],{aCommonFollowing:t,aCommonPreceding:t,aEndPreceding:t,aStartFollowing:t,bCommonFollowing:t,bCommonPreceding:t,bEndPreceding:t,bStartFollowing:t,nChangeFollowing:t,nChangePreceding:t,nCommonFollowing:t,nCommonPreceding:t}),I!==0&&y(I,_,M)}}return mi}var AI=vI(),Ky=TI(AI);function kI(e,t){return e.replace(/\s+$/,n=>t(n))}function cu(e,t,n,r,i,o){return e.length!==0?n(`${r} ${kI(e,i)}`):r!==" "?n(r):t&&o.length!==0?n(`${r} ${o}`):""}function Hy(e,t,{aColor:n,aIndicator:r,changeLineTrailingSpaceColor:i,emptyFirstOrLastLinePlaceholder:o}){return cu(e,t,n,r,i,o)}function Yy(e,t,{bColor:n,bIndicator:r,changeLineTrailingSpaceColor:i,emptyFirstOrLastLinePlaceholder:o}){return cu(e,t,n,r,i,o)}function Jy(e,t,{commonColor:n,commonIndicator:r,commonLineTrailingSpaceColor:i,emptyFirstOrLastLinePlaceholder:o}){return cu(e,t,n,r,i,o)}function od(e,t,n,r,{patchColor:i}){return i(`@@ -${e+1},${t-e} +${n+1},${r-n} @@`)}function II(e,t){const n=e.length,r=t.contextLines,i=r+r;let o=n,s=!1,c=0,a=0;for(;a!==n;){const I=a;for(;a!==n&&e[a][0]===$e;)a+=1;if(I!==a)if(I===0)a>r&&(o-=a-r,s=!0);else if(a===n){const _=a-I;_>r&&(o-=_-r,s=!0)}else{const _=a-I;_>i&&(o-=_-i,c+=1)}for(;a!==n&&e[a][0]!==$e;)a+=1}const u=c!==0||s;c!==0?o+=c+1:s&&(o+=1);const l=o-1,f=[];let h=0;u&&f.push("");let d=0,m=0,p=0,y=0;const x=I=>{const _=f.length;f.push(Jy(I,_===0||_===l,t)),p+=1,y+=1},E=I=>{const _=f.length;f.push(Hy(I,_===0||_===l,t)),p+=1},$=I=>{const _=f.length;f.push(Yy(I,_===0||_===l,t)),y+=1};for(a=0;a!==n;){let I=a;for(;a!==n&&e[a][0]===$e;)a+=1;if(I!==a)if(I===0){a>r&&(I=a-r,d=I,m=I,p=d,y=m);for(let _=I;_!==a;_+=1)x(e[_][1])}else if(a===n){const _=a-I>r?I+r:a;for(let M=I;M!==_;M+=1)x(e[M][1])}else{const _=a-I;if(_>i){const M=I+r;for(let z=I;z!==M;z+=1)x(e[z][1]);f[h]=od(d,p,m,y,t),h=f.length,f.push("");const C=_-i;d=p+C,m=y+C,p=d,y=m;for(let z=a-r;z!==a;z+=1)x(e[z][1])}else for(let M=I;M!==a;M+=1)x(e[M][1])}for(;a!==n&&e[a][0]===Qe;)E(e[a][1]),a+=1;for(;a!==n&&e[a][0]===Ke;)$(e[a][1]),a+=1}return u&&(f[h]=od(d,p,m,y,t)),f.join(`
|
|
60
|
+
`)}function CI(e,t){return e.map((n,r,i)=>{const o=n[1],s=r===0||r===i.length-1;switch(n[0]){case Qe:return Hy(o,s,t);case Ke:return Yy(o,s,t);default:return Jy(o,s,t)}}).join(`
|
|
61
|
+
`)}const Ms=e=>e,Xy=5,_I=0;function $I(){return{aAnnotation:"Expected",aColor:Me.green,aIndicator:"-",bAnnotation:"Received",bColor:Me.red,bIndicator:"+",changeColor:Me.inverse,changeLineTrailingSpaceColor:Ms,commonColor:Me.dim,commonIndicator:" ",commonLineTrailingSpaceColor:Ms,compareKeys:void 0,contextLines:Xy,emptyFirstOrLastLinePlaceholder:"",expand:!1,includeChangeCounts:!1,omitAnnotationLines:!1,patchColor:Me.yellow,printBasicPrototype:!1,truncateThreshold:_I,truncateAnnotation:"... Diff result is truncated",truncateAnnotationColor:Ms}}function MI(e){return e&&typeof e=="function"?e:void 0}function OI(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>=0?e:Xy}function Pn(e={}){return{...$I(),...e,compareKeys:MI(e.compareKeys),contextLines:OI(e.contextLines)}}function qn(e){return e.length===1&&e[0].length===0}function PI(e){let t=0,n=0;return e.forEach(r=>{switch(r[0]){case Qe:t+=1;break;case Ke:n+=1;break}}),{a:t,b:n}}function NI({aAnnotation:e,aColor:t,aIndicator:n,bAnnotation:r,bColor:i,bIndicator:o,includeChangeCounts:s,omitAnnotationLines:c},a){if(c)return"";let u="",l="";if(s){const d=String(a.a),m=String(a.b),p=r.length-e.length,y=" ".repeat(Math.max(0,p)),x=" ".repeat(Math.max(0,-p)),E=m.length-d.length,$=" ".repeat(Math.max(0,E)),I=" ".repeat(Math.max(0,-E));u=`${y} ${n} ${$}${d}`,l=`${x} ${o} ${I}${m}`}const f=`${n} ${e}${u}`,h=`${o} ${r}${l}`;return`${t(f)}
|
|
62
62
|
${i(h)}
|
|
63
63
|
|
|
64
|
-
`}function
|
|
65
|
-
${n.truncateAnnotation}`):"")}function
|
|
64
|
+
`}function uu(e,t,n){return NI(n,PI(e))+(n.expand?CI(e,n):II(e,n))+(t?n.truncateAnnotationColor(`
|
|
65
|
+
${n.truncateAnnotation}`):"")}function Co(e,t,n){const r=Pn(n),[i,o]=Zy(qn(e)?[]:e,qn(t)?[]:t,r);return uu(i,o,r)}function jI(e,t,n,r,i){if(qn(e)&&qn(n)&&(e=[],n=[]),qn(t)&&qn(r)&&(t=[],r=[]),e.length!==n.length||t.length!==r.length)return Co(e,t,i);const[o,s]=Zy(n,r,i);let c=0,a=0;return o.forEach(u=>{switch(u[0]){case Qe:u[1]=e[c],c+=1;break;case Ke:u[1]=t[a],a+=1;break;default:u[1]=t[a],c+=1,a+=1}}),uu(o,s,Pn(i))}function Zy(e,t,n){const r=(n==null?void 0:n.truncateThreshold)??!1,i=Math.max(Math.floor((n==null?void 0:n.truncateThreshold)??0),0),o=r?Math.min(e.length,i):e.length,s=r?Math.min(t.length,i):t.length,c=o!==e.length||s!==t.length,a=(d,m)=>e[d]===t[m],u=[];let l=0,f=0;for(Ky(o,s,a,(d,m,p)=>{for(;l!==m;l+=1)u.push(new Ie(Qe,e[l]));for(;f!==p;f+=1)u.push(new Ie(Ke,t[f]));for(;d!==0;d-=1,l+=1,f+=1)u.push(new Ie($e,t[f]))});l!==o;l+=1)u.push(new Ie(Qe,e[l]));for(;f!==s;f+=1)u.push(new Ie(Ke,t[f]));return[u,c]}function sd(e){if(e===void 0)return"undefined";if(e===null)return"null";if(Array.isArray(e))return"array";if(typeof e=="boolean")return"boolean";if(typeof e=="function")return"function";if(typeof e=="number")return"number";if(typeof e=="string")return"string";if(typeof e=="bigint")return"bigint";if(typeof e=="object"){if(e!=null){if(e.constructor===RegExp)return"regexp";if(e.constructor===Map)return"map";if(e.constructor===Set)return"set";if(e.constructor===Date)return"date"}return"object"}else if(typeof e=="symbol")return"symbol";throw new Error(`value of unknown type: ${e}`)}function ad(e){return e.includes(`\r
|
|
66
66
|
`)?`\r
|
|
67
67
|
`:`
|
|
68
|
-
`}function
|
|
68
|
+
`}function FI(e,t,n){const r=(n==null?void 0:n.truncateThreshold)??!1,i=Math.max(Math.floor((n==null?void 0:n.truncateThreshold)??0),0);let o=e.length,s=t.length;if(r){const d=e.includes(`
|
|
69
69
|
`),m=t.includes(`
|
|
70
|
-
`),p=
|
|
71
|
-
`:e,
|
|
72
|
-
`:t;o=x.length,s=
|
|
70
|
+
`),p=ad(e),y=ad(t),x=d?`${e.split(p,i).join(p)}
|
|
71
|
+
`:e,E=m?`${t.split(y,i).join(y)}
|
|
72
|
+
`:t;o=x.length,s=E.length}const c=o!==e.length||s!==t.length,a=(d,m)=>e[d]===t[m];let u=0,l=0;const f=[];return Ky(o,s,a,(d,m,p)=>{u!==m&&f.push(new Ie(Qe,e.slice(u,m))),l!==p&&f.push(new Ie(Ke,t.slice(l,p))),u=m+d,l=p+d,f.push(new Ie($e,t.slice(p,l)))}),u!==o&&f.push(new Ie(Qe,e.slice(u))),l!==s&&f.push(new Ie(Ke,t.slice(l))),[f,c]}function RI(e,t,n){return t.reduce((r,i)=>r+(i[0]===$e?i[1]:i[0]===e&&i[1].length!==0?n(i[1]):""),"")}class cd{constructor(t,n){R(this,"op");R(this,"line");R(this,"lines");R(this,"changeColor");this.op=t,this.line=[],this.lines=[],this.changeColor=n}pushSubstring(t){this.pushDiff(new Ie(this.op,t))}pushLine(){this.lines.push(this.line.length!==1?new Ie(this.op,RI(this.op,this.line,this.changeColor)):this.line[0][0]===this.op?this.line[0]:new Ie(this.op,this.line[0][1])),this.line.length=0}isLineEmpty(){return this.line.length===0}pushDiff(t){this.line.push(t)}align(t){const n=t[1];if(n.includes(`
|
|
73
73
|
`)){const r=n.split(`
|
|
74
|
-
`),i=r.length-1;r.forEach((o,s)=>{s<i?(this.pushSubstring(o),this.pushLine()):o.length!==0&&this.pushSubstring(o)})}else this.pushDiff(t)}moveLinesTo(t){this.isLineEmpty()||this.pushLine(),t.push(...this.lines),this.lines.length=0}}class
|
|
74
|
+
`),i=r.length-1;r.forEach((o,s)=>{s<i?(this.pushSubstring(o),this.pushLine()):o.length!==0&&this.pushSubstring(o)})}else this.pushDiff(t)}moveLinesTo(t){this.isLineEmpty()||this.pushLine(),t.push(...this.lines),this.lines.length=0}}class LI{constructor(t,n){R(this,"deleteBuffer");R(this,"insertBuffer");R(this,"lines");this.deleteBuffer=t,this.insertBuffer=n,this.lines=[]}pushDiffCommonLine(t){this.lines.push(t)}pushDiffChangeLines(t){const n=t[1].length===0;(!n||this.deleteBuffer.isLineEmpty())&&this.deleteBuffer.pushDiff(t),(!n||this.insertBuffer.isLineEmpty())&&this.insertBuffer.pushDiff(t)}flushChangeLines(){this.deleteBuffer.moveLinesTo(this.lines),this.insertBuffer.moveLinesTo(this.lines)}align(t){const n=t[0],r=t[1];if(r.includes(`
|
|
75
75
|
`)){const i=r.split(`
|
|
76
|
-
`),o=i.length-1;i.forEach((s,c)=>{if(c===0){const a=new Ie(n,s);this.deleteBuffer.isLineEmpty()&&this.insertBuffer.isLineEmpty()?(this.flushChangeLines(),this.pushDiffCommonLine(a)):(this.pushDiffChangeLines(a),this.flushChangeLines())}else c<o?this.pushDiffCommonLine(new Ie(n,s)):s.length!==0&&this.pushDiffChangeLines(new Ie(n,s))})}else this.pushDiffChangeLines(t)}getLines(){return this.flushChangeLines(),this.lines}}function
|
|
77
|
-
`))}return e.some(n=>n[0]===$e)}function
|
|
76
|
+
`),o=i.length-1;i.forEach((s,c)=>{if(c===0){const a=new Ie(n,s);this.deleteBuffer.isLineEmpty()&&this.insertBuffer.isLineEmpty()?(this.flushChangeLines(),this.pushDiffCommonLine(a)):(this.pushDiffChangeLines(a),this.flushChangeLines())}else c<o?this.pushDiffCommonLine(new Ie(n,s)):s.length!==0&&this.pushDiffChangeLines(new Ie(n,s))})}else this.pushDiffChangeLines(t)}getLines(){return this.flushChangeLines(),this.lines}}function DI(e,t){const n=new cd(Qe,t),r=new cd(Ke,t),i=new LI(n,r);return e.forEach(o=>{switch(o[0]){case Qe:n.align(o);break;case Ke:r.align(o);break;default:i.align(o)}}),i.getLines()}function BI(e,t){if(t){const n=e.length-1;return e.some((r,i)=>r[0]===$e&&(i!==n||r[1]!==`
|
|
77
|
+
`))}return e.some(n=>n[0]===$e)}function UI(e,t,n){if(e!==t&&e.length!==0&&t.length!==0){const r=e.includes(`
|
|
78
78
|
`)||t.includes(`
|
|
79
|
-
`),[i,o]=
|
|
79
|
+
`),[i,o]=Qy(r?`${e}
|
|
80
80
|
`:e,r?`${t}
|
|
81
|
-
`:t,!0,n);if(
|
|
81
|
+
`:t,!0,n);if(BI(i,r)){const s=Pn(n),c=DI(i,s.changeColor);return uu(c,o,s)}}return Co(e.split(`
|
|
82
82
|
`),t.split(`
|
|
83
|
-
`),n)}function
|
|
84
|
-
${m}
|
|
85
|
-
${p}`;return`${
|
|
83
|
+
`),n)}function Qy(e,t,n,r){const[i,o]=FI(e,t,r);return bI(i),[i,o]}function ja(e,t){const{commonColor:n}=Pn(t);return n(e)}const{AsymmetricMatcher:VI,DOMCollection:qI,DOMElement:WI,Immutable:zI,ReactElement:GI,ReactTestComponent:KI}=Io,e1=[KI,GI,WI,qI,zI,VI,Io.Error],Hi={maxDepth:20,plugins:e1},t1={callToJSON:!1,maxDepth:8,plugins:e1},Gr=(e,t)=>t;function rr(e,t,n,r=Gr){if(Object.is(e,t))return"";const i=sd(e);let o=i,s=!1;if(i==="object"&&typeof e.asymmetricMatch=="function"){if(e.$$typeof!==Symbol.for("jest.asymmetricMatcher")||typeof e.getExpectedType!="function")return;o=e.getExpectedType(),s=o==="string"}if(o!==sd(t)){let x=function(I){return I.length<=y?I:`${I.slice(0,y)}...`};const{aAnnotation:c,aColor:a,aIndicator:u,bAnnotation:l,bColor:f,bIndicator:h}=Pn(n),d=Yi(t1,n);let m=wt(e,d),p=wt(t,d);const y=1e5;m=r("expected",x(m)),p=r("actual",x(p));const E=`${a(`${u} ${c}:`)}
|
|
84
|
+
${m}`,$=`${f(`${h} ${l}:`)}
|
|
85
|
+
${p}`;return`${E}
|
|
86
86
|
|
|
87
|
-
${
|
|
87
|
+
${$}`}if(!s)switch(i){case"string":return Co(e.split(`
|
|
88
88
|
`),t.split(`
|
|
89
|
-
`),n);case"boolean":case"number":return
|
|
89
|
+
`),n);case"boolean":case"number":return YI(e,t,n,r);case"map":return Os(ud(e),ud(t),n,r);case"set":return Os(ld(e),ld(t),n,r);default:return Os(e,t,n,r)}}function HI(e){return(t,n)=>(e[t]=n,n)}function YI(e,t,n,r=Gr){const i=r("expected",wt(e,Hi)),o=r("actual",wt(t,Hi));return i===o?"":Co(i.split(`
|
|
90
90
|
`),o.split(`
|
|
91
|
-
`),n)}function
|
|
91
|
+
`),n)}function ud(e){return new Map(Array.from(e.entries()).sort())}function ld(e){return new Set(Array.from(e.values()).sort())}function Os(e,t,n,r=Gr){let i,o=!1;try{const c=Yi(Hi,n);i=fd(e,t,c,n,r)}catch{o=!0}const s=ja(Gy,n);if(i===void 0||i===s){const c=Yi(t1,n);i=fd(e,t,c,n,r),i!==s&&!o&&(i=`${ja(EI,n)}
|
|
92
92
|
|
|
93
|
-
${i}`)}return i}function
|
|
93
|
+
${i}`)}return i}function JI(e){return Yi(Hi,e)}function Yi(e,t){const{compareKeys:n,printBasicPrototype:r,maxDepth:i}=Pn(t);return{...e,compareKeys:n,printBasicPrototype:r,maxDepth:i??e.maxDepth}}function fd(e,t,n,r,i=Gr){const o={...n,indent:0},s=wt(e,o),c=wt(t,o);if(s===c)return ja(Gy,r);{const a=i("expected",wt(e,n)),u=i("actual",wt(t,n));return jI(a.split(`
|
|
94
94
|
`),u.split(`
|
|
95
95
|
`),s.split(`
|
|
96
96
|
`),c.split(`
|
|
97
|
-
`),r)}}const
|
|
97
|
+
`),r)}}const hd=2e4;function dd(e){return Lr(e)==="Object"&&typeof e.asymmetricMatch=="function"}function gi(e,t){const n=Lr(e),r=Lr(t);return n===r&&(n==="Object"||n==="Array")}function n1(e,t,n,r){const{aAnnotation:i,bAnnotation:o}=Pn(n);if(typeof t=="string"&&typeof e=="string"&&t.length>0&&e.length>0&&t.length<=hd&&e.length<=hd&&t!==e){if(t.includes(`
|
|
98
98
|
`)||e.includes(`
|
|
99
|
-
`))return
|
|
100
|
-
${y}`}const s=
|
|
101
|
-
Inner error message: ${r==null?void 0:r.message}`))}}function
|
|
102
|
-
`).map(t=>
|
|
103
|
-
`).map(t=>
|
|
104
|
-
If you used internal "suite" task as the first argument previously, access it in the second argument instead. See https://vitest.dev/guide/test-context#suite-level-hooks`);throw n&&(o.stack=(i=n.stack)==null?void 0:i.replace(n.message,o.message)),o}}const
|
|
105
|
-
`).slice(1);for(const r of n){const i=
|
|
99
|
+
`))return UI(t,e,n);const[h]=Qy(t,e),d=h.some(x=>x[0]===$e),m=XI(i,o),p=m(i)+e4(pd(h,Qe,d)),y=m(o)+QI(pd(h,Ke,d));return`${p}
|
|
100
|
+
${y}`}const s=Jh(t,{forceWritable:!0}),c=Jh(e,{forceWritable:!0}),{replacedExpected:a,replacedActual:u}=ji(c,s),l=r?HI(r):Gr;return rr(a,u,n,l)}function ji(e,t,n=new WeakSet,r=new WeakSet){return e instanceof Error&&t instanceof Error&&typeof e.cause<"u"&&typeof t.cause>"u"?(delete e.cause,{replacedActual:e,replacedExpected:t}):gi(e,t)?n.has(e)||r.has(t)?{replacedActual:e,replacedExpected:t}:(n.add(e),r.add(t),Uy(t).forEach(i=>{const o=t[i],s=e[i];if(dd(o)){if(o.asymmetricMatch(s))t[i]=s;else if("sample"in o&&o.sample!==void 0&&gi(s,o.sample)){const c=ji(s,o.sample,n,r);e[i]=c.replacedActual,t[i]=c.replacedExpected}}else if(dd(s)){if(s.asymmetricMatch(o))e[i]=o;else if("sample"in s&&s.sample!==void 0&&gi(s.sample,o)){const c=ji(s.sample,o,n,r);e[i]=c.replacedActual,t[i]=c.replacedExpected}}else if(gi(s,o)){const c=ji(s,o,n,r);e[i]=c.replacedActual,t[i]=c.replacedExpected}}),{replacedActual:e,replacedExpected:t}):{replacedActual:e,replacedExpected:t}}function XI(...e){const t=e.reduce((n,r)=>r.length>n?r.length:n,0);return n=>`${n}: ${" ".repeat(t-n.length)}`}const ZI="·";function r1(e){return e.replace(/\s+$/gm,t=>ZI.repeat(t.length))}function QI(e){return Me.red(r1(Tt(e)))}function e4(e){return Me.green(r1(Tt(e)))}function pd(e,t,n){return e.reduce((r,i)=>r+(i[0]===$e?i[1]:i[0]===t?n?Me.inverse(i[1]):i[1]:""),"")}const t4="@@__IMMUTABLE_RECORD__@@",n4="@@__IMMUTABLE_ITERABLE__@@";function r4(e){return e&&(e[n4]||e[t4])}const i4=Object.getPrototypeOf({});function md(e){return e instanceof Error?`<unserializable>: ${e.message}`:typeof e=="string"?`<unserializable>: ${e}`:"<unserializable>"}function ln(e,t=new WeakMap){if(!e||typeof e=="string")return e;if(e instanceof Error&&"toJSON"in e&&typeof e.toJSON=="function"){const n=e.toJSON();return n&&n!==e&&typeof n=="object"&&(typeof e.message=="string"&&mr(()=>n.message??(n.message=gd(e.message))),typeof e.stack=="string"&&mr(()=>n.stack??(n.stack=e.stack)),typeof e.name=="string"&&mr(()=>n.name??(n.name=e.name)),e.cause!=null&&mr(()=>n.cause??(n.cause=ln(e.cause,t)))),ln(n,t)}if(typeof e=="function")return`Function<${e.name||"anonymous"}>`;if(typeof e=="symbol")return e.toString();if(typeof e!="object")return e;if(typeof Buffer<"u"&&e instanceof Buffer)return`<Buffer(${e.length}) ...>`;if(typeof Uint8Array<"u"&&e instanceof Uint8Array)return`<Uint8Array(${e.length}) ...>`;if(r4(e))return ln(e.toJSON(),t);if(e instanceof Promise||e.constructor&&e.constructor.prototype==="AsyncFunction")return"Promise";if(typeof Element<"u"&&e instanceof Element)return e.tagName;if(typeof e.toJSON=="function")return ln(e.toJSON(),t);if(t.has(e))return t.get(e);if(Array.isArray(e)){const n=new Array(e.length);return t.set(e,n),e.forEach((r,i)=>{try{n[i]=ln(r,t)}catch(o){n[i]=md(o)}}),n}else{const n=Object.create(null);t.set(e,n);let r=e;for(;r&&r!==i4;)Object.getOwnPropertyNames(r).forEach(i=>{if(!(i in n))try{n[i]=ln(e[i],t)}catch(o){delete n[i],n[i]=md(o)}}),r=Object.getPrototypeOf(r);return e instanceof Error&&mr(()=>n.message=gd(e.message)),n}}function mr(e){try{return e()}catch{}}function gd(e){return e.replace(/\(0\s?,\s?__vite_ssr_import_\d+__.(\w+)\)/g,"$1").replace(/__(vite_ssr_import|vi_import)_\d+__\./g,"").replace(/getByTestId('__vitest_\d+__')/g,"page")}function i1(e,t,n=new WeakSet){if(!e||typeof e!="object")return{message:String(e)};const r=e;if(r.showDiff||r.showDiff===void 0&&r.expected!==void 0&&r.actual!==void 0){const i={...t,...r.diffOptions};r.diff=n1(r.actual,r.expected,i,r),r.expected=yd(r.expected,i),r.actual=yd(r.actual,i)}try{!n.has(r)&&typeof r.cause=="object"&&(n.add(r),r.cause=i1(r.cause,t,n))}catch{}try{return ln(r)}catch(i){return ln(new Error(`Failed to fully serialize error: ${i==null?void 0:i.message}
|
|
101
|
+
Inner error message: ${r==null?void 0:r.message}`))}}function yd(e,t){return typeof e!="string"?wt(e,JI(t)):e}const bd=Symbol("vitest:SAFE_TIMERS");function ir(){const{setTimeout:e,setInterval:t,clearInterval:n,clearTimeout:r,setImmediate:i,clearImmediate:o,queueMicrotask:s}=globalThis[bd]||globalThis,{nextTick:c}=globalThis[bd]||globalThis.process||{};return{nextTick:c,setTimeout:e,setInterval:t,clearInterval:n,clearTimeout:r,setImmediate:i,clearImmediate:o,queueMicrotask:s}}function o4(e,t=setTimeout){return new Promise(n=>t(n,e))}const s4=/^[A-Za-z]:\//;function a4(e=""){return e&&e.replace(/\\/g,"/").replace(s4,t=>t.toUpperCase())}const c4=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;function u4(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}const o1=function(...e){e=e.map(r=>a4(r));let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const i=r>=0?e[r]:u4();!i||i.length===0||(t=`${i}/${t}`,n=wd(i))}return t=l4(t,!n),n&&!wd(t)?`/${t}`:t.length>0?t:"."};function l4(e,t){let n="",r=0,i=-1,o=0,s=null;for(let c=0;c<=e.length;++c){if(c<e.length)s=e[c];else{if(s==="/")break;s="/"}if(s==="/"){if(!(i===c-1||o===1))if(o===2){if(n.length<2||r!==2||n[n.length-1]!=="."||n[n.length-2]!=="."){if(n.length>2){const a=n.lastIndexOf("/");a===-1?(n="",r=0):(n=n.slice(0,a),r=n.length-1-n.lastIndexOf("/")),i=c,o=0;continue}else if(n.length>0){n="",r=0,i=c,o=0;continue}}t&&(n+=n.length>0?"/..":"..",r=2)}else n.length>0?n+=`/${e.slice(i+1,c)}`:n=e.slice(i+1,c),r=c-i-1;i=c,o=0}else s==="."&&o!==-1?++o:o=-1}return n}const wd=function(e){return c4.test(e)};var f4=44,xd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h4=new Uint8Array(64),s1=new Uint8Array(128);for(let e=0;e<xd.length;e++){const t=xd.charCodeAt(e);h4[e]=t,s1[t]=e}function gr(e,t){let n=0,r=0,i=0;do{const s=e.next();i=s1[s],n|=(i&31)<<r,r+=5}while(i&32);const o=n&1;return n>>>=1,o&&(n=-2147483648|-n),t+n}function Sd(e,t){return e.pos>=t?!1:e.peek()!==f4}var d4=class{constructor(e){this.pos=0,this.buffer=e}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(e){const{buffer:t,pos:n}=this,r=t.indexOf(e,n);return r===-1?t.length:r}};function p4(e){const{length:t}=e,n=new d4(e),r=[];let i=0,o=0,s=0,c=0,a=0;do{const u=n.indexOf(";"),l=[];let f=!0,h=0;for(i=0;n.pos<u;){let d;i=gr(n,i),i<h&&(f=!1),h=i,Sd(n,u)?(o=gr(n,o),s=gr(n,s),c=gr(n,c),Sd(n,u)?(a=gr(n,a),d=[i,o,s,c,a]):d=[i,o,s,c]):d=[i],l.push(d),n.pos++}f||m4(l),r.push(l),n.pos=u+1}while(n.pos<=t);return r}function m4(e){e.sort(g4)}function g4(e,t){return e[0]-t[0]}var _o=0,y4=1,b4=2,w4=3,x4=4,Ji=!1;function S4(e,t,n,r){for(;n<=r;){const i=n+(r-n>>1),o=e[i][_o]-t;if(o===0)return Ji=!0,i;o<0?n=i+1:r=i-1}return Ji=!1,n-1}function E4(e,t,n){for(let r=n+1;r<e.length&&e[r][_o]===t;n=r++);return n}function T4(e,t,n){for(let r=n-1;r>=0&&e[r][_o]===t;n=r--);return n}function v4(e,t,n,r){const{lastKey:i,lastNeedle:o,lastIndex:s}=n;let c=0,a=e.length-1;if(r===i){if(t===o)return Ji=s!==-1&&e[s][_o]===t,s;t>=o?c=s===-1?0:s:a=s}return n.lastKey=r,n.lastNeedle=t,n.lastIndex=S4(e,t,c,a)}var A4="`line` must be greater than 0 (lines start at line 1)",k4="`column` must be greater than or equal to 0 (columns start at column 0)",Ed=-1,I4=1;function C4(e){var t;return(t=e)._decoded||(t._decoded=p4(e._encoded))}function _4(e,t){let{line:n,column:r,bias:i}=t;if(n--,n<0)throw new Error(A4);if(r<0)throw new Error(k4);const o=C4(e);if(n>=o.length)return yi(null,null,null,null);const s=o[n],c=$4(s,e._decodedMemo,n,r,i||I4);if(c===-1)return yi(null,null,null,null);const a=s[c];if(a.length===1)return yi(null,null,null,null);const{names:u,resolvedSources:l}=e;return yi(l[a[y4]],a[b4]+1,a[w4],a.length===5?u[a[x4]]:null)}function yi(e,t,n,r){return{source:e,line:t,column:n,name:r}}function $4(e,t,n,r,i){let o=v4(e,r,t,n);return Ji?o=(i===Ed?E4:T4)(e,r,o):i===Ed&&o++,o===-1||o===e.length?-1:o}const lu=/^\s*at .*(?:\S:\d+|\(native\))/m,M4=/^(?:eval@)?(?:\[native code\])?$/,O4=["node:internal",/\/packages\/\w+\/dist\//,/\/@vitest\/\w+\/dist\//,"/vitest/dist/","/vitest/src/","/node_modules/chai/","/node_modules/tinyspy/","/vite/dist/node/module-runner","/rolldown-vite/dist/node/module-runner","/deps/chunk-","/deps/@vitest","/deps/loupe","/deps/chai","/browser-playwright/dist/locators.js","/browser-webdriverio/dist/locators.js","/browser-preview/dist/locators.js",/node:\w+/,/__vitest_test__/,/__vitest_browser__/,"/@id/__x00__vitest/browser",/\/deps\/vitest_/],P4=Date.now().toString().length,N4=new RegExp(`vitest=\\d{${P4}}`);function a1(e){if(!e.includes(":"))return[e];const n=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/^\(|\)$/g,""));if(!n)return[e];let r=n[1];if(r.startsWith("async ")&&(r=r.slice(6)),r.startsWith("http:")||r.startsWith("https:")){const i=new URL(r);i.searchParams.delete("import"),i.searchParams.delete("browserv"),r=i.pathname+i.hash+i.search}if(r.startsWith("/@fs/")){const i=/^\/@fs\/[a-zA-Z]:\//.test(r);r=r.slice(i?5:4)}return r.includes("vitest=")&&(r=r.replace(N4,"").replace(/[?&]$/,"")),[r,n[2]||void 0,n[3]||void 0]}function c1(e){let t=e.trim();if(M4.test(t)||(t.includes(" > eval")&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!t.includes("@")))return null;let n=-1,r="",i;for(let a=0;a<t.length;a++)if(t[a]==="@"){const u=t.slice(a+1);if(u.includes(":")&&u.length>=3){n=a,r=u,i=a>0?t.slice(0,a):void 0;break}}if(n===-1||!r.includes(":")||r.length<3)return null;const[o,s,c]=a1(r);return!o||!s||!c?null:{file:o,method:i||"",line:Number.parseInt(s),column:Number.parseInt(c)}}function u1(e){const t=e.trim();return lu.test(t)?l1(t):c1(t)}function l1(e){let t=e.trim();if(!lu.test(t))return null;t.includes("(eval ")&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let n=t.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,"");const r=n.match(/ (\(.+\)$)/);n=r?n.replace(r[0],""):n;const[i,o,s]=a1(r?r[1]:n);let c=r&&n||"",a=i&&["eval","<anonymous>"].includes(i)?void 0:i;return!a||!o||!s?null:(c.startsWith("async ")&&(c=c.slice(6)),a.startsWith("file://")&&(a=a.slice(7)),a=a.startsWith("node:")||a.startsWith("internal:")?a:o1(a),c&&(c=c.replace(/\(0\s?,\s?__vite_ssr_import_\d+__.(\w+)\)/g,"$1").replace(/__(vite_ssr_import|vi_import)_\d+__\./g,"").replace(/(Object\.)?__vite_ssr_export_default__\s?/g,"")),{method:c,file:a,line:Number.parseInt(o),column:Number.parseInt(s)})}function Ps(e,t={}){const{ignoreStackEntries:n=O4}=t;let r=lu.test(e)?F4(e):j4(e);const i=r.findLastIndex(o=>o.method.includes("__VITEST_HELPER__"));return i>=0&&(r=r.slice(i+1)),r.map(o=>{var m;t.getUrlId&&(o.file=t.getUrlId(o.file));const s=(m=t.getSourceMap)==null?void 0:m.call(t,o.file);if(!s||typeof s!="object"||!s.version)return Td(n,o.file)?null:o;const c=new L4(s,o.file),a=B4(c,o);if(!a)return o;const{line:u,column:l,source:f,name:h}=a;let d=f||o.file;return d.match(/\/\w:\//)&&(d=d.slice(1)),Td(n,d)?null:u!=null&&l!=null?{line:u,column:l,file:d,method:h||o.method}:o}).filter(o=>o!=null)}function Td(e,t){return e.some(n=>t.match(n))}function j4(e){return e.split(`
|
|
102
|
+
`).map(t=>c1(t)).filter(By)}function F4(e){return e.split(`
|
|
103
|
+
`).map(t=>l1(t)).filter(By)}function R4(e,t={}){if(!e||fI(e))return[];if("stacks"in e&&e.stacks)return e.stacks;const n=e.stack||"";let r=typeof n=="string"?Ps(n,t):[];if(!r.length){const i=e;i.fileName!=null&&i.lineNumber!=null&&i.columnNumber!=null&&(r=Ps(`${i.fileName}:${i.lineNumber}:${i.columnNumber}`,t)),i.sourceURL!=null&&i.line!=null&&i._column!=null&&(r=Ps(`${i.sourceURL}:${i.line}:${i.column}`,t))}return t.frameFilter&&(r=r.filter(i=>t.frameFilter(e,i)!==!1)),e.stacks=r,r}class L4{constructor(t,n){R(this,"_encoded");R(this,"_decoded");R(this,"_decodedMemo");R(this,"url");R(this,"version");R(this,"names",[]);R(this,"resolvedSources");this.map=t;const{mappings:r,names:i,sources:o}=t;this.version=t.version,this.names=i||[],this._encoded=r||"",this._decodedMemo=D4(),this.url=n,this.resolvedSources=(o||[]).map(s=>o1(n,"..",s||""))}}function D4(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function B4(e,t){const n=_4(e,t);return n.column==null?null:n}class U4 extends Error{constructor(n,r,i){super(n);R(this,"code","VITEST_PENDING");R(this,"taskId");this.message=n,this.note=i,this.taskId=r.id}}class an extends Error{constructor(){super(...arguments);R(this,"name","FixtureDependencyError")}}class V4 extends Error{constructor(){super(...arguments);R(this,"name","FixtureAccessError")}}class vd extends Error{constructor(){super(...arguments);R(this,"name","FixtureParseError")}}const q4=new WeakMap,f1=new WeakMap,h1=new WeakMap;function W4(e,t){q4.set(e,t)}function z4(e,t){f1.set(e,t)}function G4(e){return f1.get(e)}function K4(e,t){h1.set(e,t)}function H4(e){return h1.get(e)}const Fi=Symbol.for("VITEST_FIXTURE_STACK_TRACE"),Pe=class Pe{constructor(t){R(this,"_suiteContexts");R(this,"_overrides",new WeakMap);R(this,"_registrations");this._registrations=t??new Map,this._suiteContexts=new WeakMap,Pe._definitions.push(this)}static clearDefinitions(){Pe._definitions.length=0}static getWorkerContexts(){return Pe._definitions.map(t=>t.getWorkerContext())}static getFileContexts(t){return Pe._definitions.map(n=>n.getFileContext(t))}static isFixtureOptions(t){return Bt(t)&&Object.keys(t).some(n=>Pe._fixtureOptionKeys.includes(n))}extend(t,n){const{suite:r}=Vt(),i=!r||r.file===r,o=this.parseUserFixtures(t,n,i);return new Pe(o)}get(t){let n=t;for(;n;){const r=this._overrides.get(n);if(r)return r;if(n===n.file)break;n=n.suite||n.file}return this._registrations}override(t,n){const{suite:r,file:i}=Vt(),o=r||i,s=!r||r.file===r,c=new Map(this.get(o)),a=this.parseUserFixtures(t,n,s,c);s?this._registrations=a:this._overrides.set(o,a)}getFileContext(t){return this._suiteContexts.has(t)||this._suiteContexts.set(t,Object.create(null)),this._suiteContexts.get(t)}getWorkerContext(){return this._suiteContexts.has(Pe._workerContextSuite)||this._suiteContexts.set(Pe._workerContextSuite,Object.create(null)),this._suiteContexts.get(Pe._workerContextSuite)}parseUserFixtures(t,n,r,i=new Map(this._registrations)){const o=[];Object.entries(n).forEach(([s,c])=>{var m;let a,u,l;Array.isArray(c)&&c.length>=2&&Pe.isFixtureOptions(c[1])?(l=c[1],a={auto:l.auto??!1,scope:l.scope??"test",injected:l.injected??!1},u=a.injected?((m=t.injectValue)==null?void 0:m.call(t,s))??c[0]:c[0]):u=c;const f=i.get(s);f&&a?(f.scope!==a.scope&&o.push(new an(`The "${s}" fixture was already registered with a "${a.scope}" scope.`)),f.auto!==a.auto&&o.push(new an(`The "${s}" fixture was already registered as { auto: ${a.auto} }.`))):f?a={auto:f.auto,scope:f.scope,injected:f.injected}:a||(a={auto:!1,injected:!1,scope:"test"}),a.scope&&!Pe._fixtureScopes.includes(a.scope)&&o.push(new an(`The "${s}" fixture has unknown scope "${a.scope}".`)),!r&&a.scope!=="test"&&o.push(new an(`The "${s}" fixture cannot be defined with a ${a.scope} scope${!(l!=null&&l.scope)&&(f!=null&&f.scope)?" (inherited from the base fixture)":""} inside the describe block. Define it at the top level of the file instead.`));const h=Br(u)?fu(u):new Set,d={name:s,value:u,auto:a.auto??!1,injected:a.injected??!1,scope:a.scope??"test",deps:h,parent:f};Br(u)&&Object.assign(u,{[Fi]:new Error("STACK_TRACE_ERROR")}),i.set(s,d),d.scope==="worker"&&(t.pool==="vmThreads"||t.pool==="vmForks")&&(d.scope="file")});for(const s of i.values())for(const c of s.deps){if(Pe._builtinFixtures.includes(c))continue;const a=i.get(c);if(!a){o.push(new an(`The "${s.name}" fixture depends on unknown fixture "${c}".`));continue}if(c===s.name&&!s.parent){o.push(new an(`The "${s.name}" fixture depends on itself, but does not have a base implementation.`));continue}if(Pe._fixtureScopes.indexOf(s.scope)>Pe._fixtureScopes.indexOf(a.scope)){o.push(new an(`The ${s.scope} "${s.name}" fixture cannot depend on a ${a.scope} fixture "${a.name}".`));continue}}if(o.length===1)throw o[0];if(o.length>1)throw new AggregateError(o,"Cannot resolve user fixtures. See errors for more information.");return i}};R(Pe,"_definitions",[]),R(Pe,"_builtinFixtures",["task","signal","onTestFailed","onTestFinished","skip","annotate"]),R(Pe,"_fixtureOptionKeys",["auto","injected","scope"]),R(Pe,"_fixtureScopes",["test","file","worker"]),R(Pe,"_workerContextSuite",{type:"worker"});let Dr=Pe;const zn=new WeakMap,Ns=new WeakMap;function Kr(e,t){const n=Vt(),r=(t==null?void 0:t.suite)||n.suite||n.file;return async i=>{var d;const o=i||(t==null?void 0:t.context);if(!o)return t!=null&&t.suiteHook&&Z4(e,t.suiteHook,t.stackTraceError),e({});const s=(t==null?void 0:t.fixtures)||G4(o);if(!s)return e(o);const c=s.get(r);if(!c.size)return e(o);const a=[],u=fu(e);for(const m of c.values())(Y4(m,t)||u.has(m.name))&&a.push(m);if(!a.length)return e(o);zn.has(o)||zn.set(o,[]);const l=zn.get(o),f=p1(a,c);if(!f.length)return e(o);if(t!=null&&t.suiteHook){const m=f.filter(p=>p.scope==="test");if(m.length>0){const p=m.map(E=>`"${E.name}"`).join(", "),y={aroundAll:"aroundEach",beforeAll:"beforeEach",afterAll:"afterEach"},x=new an(`Test-scoped fixtures cannot be used inside ${t.suiteHook} hook. The following fixtures are test-scoped: ${p}. Use { scope: 'file' } or { scope: 'worker' } fixtures instead, or move the logic to ${y[t.suiteHook]} hook.`);throw(d=t.stackTraceError)!=null&&d.stack&&(x.stack=x.message+t.stackTraceError.stack.replace(t.stackTraceError.message,"")),x}}Ns.has(o)||Ns.set(o,new WeakSet);const h=Ns.get(o);for(const m of f)if(m.scope==="test"){if(h.has(m))continue;h.add(m);const p=await J4(m,o,l);o[m.name]=p,l.push(()=>{h.delete(m)})}else{const p=await X4(s,r,m);o[m.name]=p}return e(o)}}function Y4(e,t){return!(!e.auto||t!=null&&t.suiteHook&&e.scope==="test")}function Br(e){return typeof e=="function"}function J4(e,t,n){return Br(e.value)?d1(e.value,e.name,t,n):e.value}const bi=new WeakMap;async function X4(e,t,n){const r=e.getWorkerContext(),i=e.getFileContext(t.file),o=n.scope==="worker"?r:i;if(!Br(n.value))return o[n.name]=n.value,n.value;if(n.name in o)return o[n.name];if(bi.has(n))return bi.get(n);zn.has(o)||zn.set(o,[]);const s=zn.get(o),c=d1(n.value,n.name,n.scope==="file"?{...r,...i}:o,s).then(a=>(o[n.name]=a,bi.delete(n),a));return bi.set(n,c),c}async function d1(e,t,n,r){const i=Zh(),o=Fi in e&&e[Fi]instanceof Error?e[Fi]:void 0;let s=!1;const c=e(n,async a=>{s=!0,i.resolve(a);const u=Zh();r.push(async()=>{u.resolve(),await c}),await u}).then(()=>{if(!s){const a=new Error(`Fixture "${t}" returned without calling "use". Make sure to call "use" in every code path of the fixture function.`);o!=null&&o.stack&&(a.stack=a.message+o.stack.replace(o.message,"")),i.reject(a)}}).catch(a=>{if(!s){i.reject(a);return}throw a});return i}function p1(e,t,n=new Set,r=[]){return e.forEach(i=>{if(!r.includes(i)){if(!Br(i.value)||!i.deps){r.push(i);return}if(n.has(i))if(i.parent)i=i.parent;else throw new Error(`Circular fixture dependency detected: ${i.name} <- ${[...n].reverse().map(o=>o.name).join(" <- ")}`);n.add(i),p1([...i.deps].map(o=>o===i.name?i.parent:t.get(o)).filter(o=>!!o),t,n,r),r.push(i),n.clear()}}),r}function Z4(e,t,n){var i;const r=fu(e,{sourceError:n,suiteHook:t});if(r.size){const o=new V4(`The ${t} hook uses fixtures "${[...r].join('", "')}", but has no access to context. Did you forget to call it as "test.${t}()" instead of "${t}()"?
|
|
104
|
+
If you used internal "suite" task as the first argument previously, access it in the second argument instead. See https://vitest.dev/guide/test-context#suite-level-hooks`);throw n&&(o.stack=(i=n.stack)==null?void 0:i.replace(n.message,o.message)),o}}const Fa=Symbol("$vitest:fixture-props"),Ra=Symbol("$vitest:fixture-prop-names");function Xi(e,t){Object.defineProperty(e,Fa,{value:t,enumerable:!1})}function wi(e,t){return e[Ra]=t,t}function fu(e,{sourceError:t,suiteHook:n}={}){var h,d;if(Ra in e)return e[Ra];const{index:r=0,original:i=e}=Fa in e?e[Fa]:{};let o=hI(i.toString());/__async\((?:this|null), (?:null|arguments|\[[_0-9, ]*\]), function\*/.test(o)&&(o=o.split(/__async\((?:this|null),/)[1]);const s=o.match(/[^(]*\(([^)]*)/);if(!s)return wi(e,new Set);const c=Ad(s[1]);if(!c.length)return wi(e,new Set);const a=c[r];if(!a)return wi(e,new Set);if(!(a[0]==="{"&&a.endsWith("}"))){const m=vn(r+1),p=new vd(`The ${m} argument inside a fixture must use object destructuring pattern, e.g. ({ task } => {}). Instead, received "${a}".${n?` If you used internal "suite" task as the ${m} argument previously, access it in the ${vn(r+2)} argument instead.`:""}`);throw t&&(p.stack=(h=t.stack)==null?void 0:h.replace(t.message,p.message)),p}const u=a.slice(1,-1).replace(/\s/g,""),l=Ad(u).map(m=>m.replace(/:.*|=.*/g,"")),f=l.at(-1);if(f&&f.startsWith("...")){const m=new vd(`Rest parameters are not supported in fixtures, received "${f}".`);throw t&&(m.stack=(d=t.stack)==null?void 0:d.replace(t.message,m.message)),m}return wi(e,new Set(l))}function Ad(e){const t=[],n=[];let r=0;for(let o=0;o<e.length;o++)if(e[o]==="{"||e[o]==="[")n.push(e[o]==="{"?"}":"]");else if(e[o]===n.at(-1))n.pop();else if(!n.length&&e[o]===","){const s=e.substring(r,o).trim();s&&t.push(s),r=o+1}const i=e.substring(r).trim();return i&&t.push(i),t}let Q4;function hu(){return Q4}const m1=Symbol("kChainableContext");function Yt(e){return e==null?void 0:e[m1]}function g1(e,t,n){function r(o){const s=function(...c){return t.apply(o,c)};Object.assign(s,t),Object.defineProperty(s,m1,{value:{withContext:()=>s.bind(o),getFixtures:()=>o.fixtures,setContext:(c,a)=>{o[c]=a},mergeContext:c=>{Object.assign(o,c)}},enumerable:!1});for(const c of e)Object.defineProperty(s,c,{get(){return r({...o,[c]:!0})}});return s}const i=r(n??{});return Object.defineProperty(i,"fn",{value:t,enumerable:!1}),i}function Cn(){return pu().config.hookTimeout}const y1=Symbol.for("VITEST_CLEANUP_TIMEOUT"),b1=Symbol.for("VITEST_CLEANUP_STACK_TRACE"),w1=Symbol.for("VITEST_AROUND_TIMEOUT"),x1=Symbol.for("VITEST_AROUND_STACK_TRACE");function e3(e,t=Cn()){Ze(e,'"beforeAll" callback',["function"]);const n=new Error("STACK_TRACE_ERROR"),r=Yt(this);return Vt().on("beforeAll",Object.assign(_n(du("beforeAll",e,r,n),t,!0,n),{[y1]:t,[b1]:n}))}function t3(e,t){Ze(e,'"afterAll" callback',["function"]);const n=Yt(this),r=new Error("STACK_TRACE_ERROR");return Vt().on("afterAll",_n(du("afterAll",e,n,r),t??Cn(),!0,r))}function n3(e,t=Cn()){Ze(e,'"beforeEach" callback',["function"]);const n=new Error("STACK_TRACE_ERROR"),r=(i,o)=>Kr(e,{suite:o})(i);return Vt().on("beforeEach",Object.assign(_n(r,t??Cn(),!0,n,gu),{[y1]:t,[b1]:n}))}function r3(e,t){Ze(e,'"afterEach" callback',["function"]);const n=(r,i)=>Kr(e,{suite:i})(r);return Vt().on("afterEach",_n(n,t??Cn(),!0,new Error("STACK_TRACE_ERROR"),gu))}function i3(e,t){Ze(e,'"aroundAll" callback',["function"]);const n=new Error("STACK_TRACE_ERROR"),r=t??Cn(),i=Yt(this);return Vt().on("aroundAll",Object.assign(du("aroundAll",e,i,n,1),{[w1]:r,[x1]:n}))}function o3(e,t){Ze(e,'"aroundEach" callback',["function"]);const n=new Error("STACK_TRACE_ERROR"),r=t??Cn(),i=(o,s,c)=>{const a=l=>e(o,l,c);return Xi(a,{index:1,original:e}),Kr(a,{suite:c})(s)};return Vt().on("aroundEach",Object.assign(i,{[w1]:r,[x1]:n}))}function du(e,t,n,r,i=0){return(...o)=>{const s=o.at(-1),c=o.slice(0,-1),a=h=>t(...c,h,s);Xi(a,{index:i,original:t});const u=n==null?void 0:n.getFixtures(),l=u==null?void 0:u.getFileContext(s.file);return Kr(a,{suiteHook:e,fixtures:u,context:l,stackTraceError:r})()}}function S1(e,t){const n=t.split(`
|
|
105
|
+
`).slice(1);for(const r of n){const i=u1(r);if(i&&i.file===e)return i}}function s3(e,t){if(!e.strictTags)return;const n=new Set(e.tags.map(r=>r.name));for(const r of t)if(!n.has(r))throw E1(e.tags,r)}function E1(e,t,n="tag"){throw e.length?new Error(`The ${n} "${t}" is not defined in the configuration. Available tags are:
|
|
106
106
|
${e.map(r=>`- ${r.name}${r.description?`: ${r.description}`:""}`).join(`
|
|
107
|
-
`)}`):new Error(`The Vitest config does't define any "tags", cannot apply "${t}" ${n} for this test. See: https://vitest.dev/guide/test-tags`)}function
|
|
107
|
+
`)}`):new Error(`The Vitest config does't define any "tags", cannot apply "${t}" ${n} for this test. See: https://vitest.dev/guide/test-tags`)}function a3(e){const t=[e.name];let n=e;for(;n!=null&&n.suite;)n=n.suite,n!=null&&n.name&&t.unshift(n.name);return n!==e.file&&t.unshift(e.file.name),t}function xi(e,t=" > "){return e.filter(n=>n!==void 0).join(t)}const fn=h3(),rn=mu(function(e,t,n){if(hu())throw new Error('Calling the test function inside another test function is not allowed. Please put it inside "describe" or "suite" so it can be properly collected.');Vt().test.fn.call(this,pn(e),t,n)}),$o=fn;let De,T1,c3;function v1(e,t){if(!e)throw new Error(`Vitest failed to find ${t}. One of the following is possible:
|
|
108
108
|
- "vitest" is imported directly without running "vitest" command
|
|
109
109
|
- "vitest" is imported inside "globalSetup" (to fix this, use "setupFiles" instead, because "globalSetup" runs in a different context)
|
|
110
110
|
- "vitest" is imported inside Vite / Vitest config file
|
|
111
111
|
- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues
|
|
112
|
-
`)}function
|
|
113
|
-
`).map(i=>i.split("|"))[0],r=[];for(let i=0;i<Math.floor(t.length/n.length);i++){const o={};for(let s=0;s<n.length;s++)o[n[s]]=t[i*n.length+s];r.push(o)}return r}const
|
|
114
|
-
If this is a long-running ${e?"hook":"test"}, pass a timeout value as the last argument or configure it globally with "${e?"hookTimeout":"testTimeout"}".`,i=new Error(r);return n!=null&&n.stack&&(i.stack=n.stack.replace(i.message,n.message)),i}globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now;globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now;
|
|
112
|
+
`)}function pu(){return v1(De,"the runner"),De}function Vt(){const e=st.currentSuite||T1;return v1(e,"the current suite"),e}function u3(){return{beforeAll:[],afterAll:[],beforeEach:[],afterEach:[],aroundEach:[],aroundAll:[]}}const kd=Number.POSITIVE_INFINITY;function Gn(e,t){if(t!=null&&typeof t=="object")throw new TypeError('Signature "test(name, fn, { ... })" was deprecated in Vitest 3 and removed in Vitest 4. Please, provide options as a second argument instead.');let n={},r;if(typeof t=="number"?n={timeout:t}:typeof e=="object"&&(n=e),typeof e=="function"){if(typeof t=="function")throw new TypeError("Cannot use two functions as arguments. Please use the second argument for options.");r=e}else typeof t=="function"&&(r=t);return{options:n,handler:r}}function l3(e,t=()=>{},n,r,i){const o=[];let s;f();const c=function(m="",p={}){var fe,ee,he,Ye,_e;const y=(fe=st.currentSuite)==null?void 0:fe.suite,x=y??((ee=st.currentSuite)==null?void 0:ee.file),E=(x==null?void 0:x.tags)||[],$=Qh([...E,...Ki(p.tags)]),I=$.map(oe=>{var Re;const Ee=(Re=De.config.tags)==null?void 0:Re.find(We=>We.name===oe);if(!Ee&&De.config.strictTags)throw E1(De.config.tags,oe);return Ee}).filter(oe=>oe!=null).sort((oe,Ee)=>(Ee.priority??kd)-(oe.priority??kd)).reduce((oe,Ee)=>{const{name:Re,description:We,priority:Mt,meta:et,...Je}=Ee;return Object.assign(oe,Je),et&&(oe.meta=Object.assign(oe.meta??Object.create(null),et)),oe},{}),_=p.meta;p={...I,...p};const M=p.timeout??De.config.testTimeout,C=y==null?void 0:y.meta,z=I.meta,le=Object.create(null);z&&Object.assign(le,z),C&&Object.assign(le,C),_&&Object.assign(le,_);const B={id:"",name:m,fullName:xi([(y==null?void 0:y.fullName)??((Ye=(he=st.currentSuite)==null?void 0:he.file)==null?void 0:Ye.fullName),m]),fullTestName:xi([y==null?void 0:y.fullTestName,m]),suite:y,each:p.each,fails:p.fails,context:void 0,type:"test",file:(y==null?void 0:y.file)??((_e=st.currentSuite)==null?void 0:_e.file),timeout:M,retry:p.retry??De.config.retry,repeats:p.repeats,mode:p.only?"only":p.skip?"skip":p.todo?"todo":"run",meta:le,annotations:[],artifacts:[],tags:$},X=p.handler;B.mode==="run"&&!X&&(B.mode="todo"),(p.concurrent??(!p.sequential&&De.config.sequence.concurrent))&&(B.concurrent=!0),B.shuffle=i==null?void 0:i.shuffle;const ie=w3(B,De);Object.defineProperty(B,"context",{value:ie,enumerable:!1}),z4(ie,p.fixtures??new Dr);const Ae=Error.stackTraceLimit;Error.stackTraceLimit=10;const ye=new Error("STACK_TRACE_ERROR");if(Error.stackTraceLimit=Ae,X&&W4(B,_n(y3(f3(Kr(X,{context:ie}),B),B.context.signal),M,!1,ye,(oe,Ee)=>gu([ie],Ee))),De.config.includeTaskLocation){const oe=ye.stack,Ee=S1(c3,oe);Ee&&(B.location={line:Ee.line,column:Ee.column})}return o.push(B),B},a=mu(function(m,p,y){let{options:x,handler:E}=Gn(p,y);typeof i=="object"&&(x=Object.assign({},i,x));const $=this.concurrent??(!this.sequential&&(x==null?void 0:x.concurrent));x.concurrent!=null&&$!=null&&(x.concurrent=$);const I=this.sequential??(!this.concurrent&&(x==null?void 0:x.sequential));x.sequential!=null&&I!=null&&(x.sequential=I);const _=c(pn(m),{...this,...x,handler:E});_.type="test"}),u={type:"collector",name:e,mode:n,suite:s,options:i,test:a,file:s.file,tasks:o,collect:d,task:c,clear:h,on:l};function l(m,...p){H4(s)[m].push(...p)}function f(m){var E,$,I,_,M;typeof i=="number"&&(i={timeout:i});const p=(E=st.currentSuite)==null?void 0:E.suite,y=p??(($=st.currentSuite)==null?void 0:$.file),x=Ki(i==null?void 0:i.tags);s3(De.config,x),s={id:"",type:"suite",name:e,fullName:xi([(p==null?void 0:p.fullName)??((_=(I=st.currentSuite)==null?void 0:I.file)==null?void 0:_.fullName),e]),fullTestName:xi([p==null?void 0:p.fullTestName,e]),suite:p,mode:n,each:r,file:(p==null?void 0:p.file)??((M=st.currentSuite)==null?void 0:M.file),shuffle:i==null?void 0:i.shuffle,tasks:[],meta:(i==null?void 0:i.meta)??Object.create(null),concurrent:i==null?void 0:i.concurrent,tags:Qh([...(y==null?void 0:y.tags)||[],...x])},K4(s,u3())}function h(){o.length=0,f()}async function d(m){if(!m)throw new TypeError("File is required to collect tasks.");t&&await g3(u,()=>t(a));const p=[];for(const y of o)p.push(y.type==="collector"?await y.collect(m):y);return s.tasks=p,s}return m3(u),u}function f3(e,t){return(async(...n)=>{const r=await e(...n);if(t.promises){const o=(await Promise.allSettled(t.promises)).map(s=>s.status==="rejected"?s.reason:void 0).filter(Boolean);if(o.length)throw o}return r})}function h3(){function e(t,n,r){var p;if(hu())throw new Error("Calling the suite function inside test function is not allowed. It can be only called at the top level or inside another suite function.");const i=st.currentSuite||T1;let{options:o,handler:s}=Gn(n,r);const c=o.concurrent||this.concurrent||o.sequential===!1,a=o.sequential||this.sequential||o.concurrent===!1,{meta:u,...l}=(i==null?void 0:i.options)||{};o={...l,...o};const f=this.shuffle??o.shuffle??((p=i==null?void 0:i.options)==null?void 0:p.shuffle)??(De==null?void 0:De.config.sequence.shuffle);f!=null&&(o.shuffle=f);let h=this.only??o.only?"only":this.skip??o.skip?"skip":this.todo??o.todo?"todo":"run";h==="run"&&!s&&(h="todo");const d=c||o.concurrent&&!a,m=a||o.sequential&&!c;return d!=null&&(o.concurrent=d&&!m),m!=null&&(o.sequential=m&&!d),u&&(o.meta=Object.assign(Object.create(null),u,o.meta)),l3(pn(t),s,h,this.each,o)}return e.each=function(t,...n){const r=Yt(this),i=r.withContext();return r.setContext("each",!0),Array.isArray(t)&&n.length&&(t=Zi(t,n)),(o,s,c)=>{const a=pn(o),u=t.every(Array.isArray),{options:l,handler:f}=Gn(s,c),h=typeof s=="function";t.forEach((d,m)=>{const p=Array.isArray(d)?d:[d];h?u?i(Lt(a,p,m),f?()=>f(...p):void 0,l.timeout):i(Lt(a,p,m),f?()=>f(d):void 0,l.timeout):u?i(Lt(a,p,m),l,f?()=>f(...p):void 0):i(Lt(a,p,m),l,f?()=>f(d):void 0)}),r.setContext("each",void 0)}},e.for=function(t,...n){return Array.isArray(t)&&n.length&&(t=Zi(t,n)),(r,i,o)=>{const s=pn(r),{options:c,handler:a}=Gn(i,o);t.forEach((u,l)=>{fn(Lt(s,Ki(u),l),c,a?()=>a(u):void 0)})}},e.skipIf=t=>t?fn.skip:fn,e.runIf=t=>t?fn:fn.skip,g1(["concurrent","sequential","shuffle","skip","only","todo"],e)}function d3(e){const t=e;t.each=function(i,...o){const s=Yt(this),c=s.withContext();return s.setContext("each",!0),Array.isArray(i)&&o.length&&(i=Zi(i,o)),(a,u,l)=>{const f=pn(a),h=i.every(Array.isArray),{options:d,handler:m}=Gn(u,l),p=typeof u=="function";i.forEach((y,x)=>{const E=Array.isArray(y)?y:[y];p?h?c(Lt(f,E,x),m?()=>m(...E):void 0,d.timeout):c(Lt(f,E,x),m?()=>m(y):void 0,d.timeout):h?c(Lt(f,E,x),d,m?()=>m(...E):void 0):c(Lt(f,E,x),d,m?()=>m(y):void 0)}),s.setContext("each",void 0)}},t.for=function(i,...o){const c=Yt(this).withContext();return Array.isArray(i)&&o.length&&(i=Zi(i,o)),(a,u,l)=>{const f=pn(a),{options:h,handler:d}=Gn(u,l);i.forEach((m,p)=>{const y=d?x=>d(m,x):void 0;y&&Xi(y,{index:1,original:d}),c(Lt(f,Ki(m),p),h,y)})}},t.skipIf=function(i){return i?this.skip:this},t.runIf=function(i){return i?this:this.skip};function n(i,o,s){if(typeof i!="string")return i;const c=i;let a,u;if(s!==void 0?(a=o,u=s):o!==null&&typeof o=="object"&&!Array.isArray(o)&&Dr.isFixtureOptions(o)?(a=o,u={}):(a=void 0,u=o),typeof u=="function"){const l=u,f=async(h,d)=>{let m;const y=await l(h,{onCleanup:x=>{if(m!==void 0)throw new Error("onCleanup can only be called once per fixture. Define separate fixtures if you need multiple cleanup functions.");m=x}});await d(y),m&&await m()};return Xi(f,{original:l}),a?{[c]:[f,a]}:{[c]:f}}return a?{[c]:[u,a]}:{[c]:u}}return t.override=function(i,o,s){const c=n(i,o,s);return Yt(this).getFixtures().override(De,c),this},t.scoped=function(i){return console.warn("test.scoped() is deprecated and will be removed in future versions. Please use test.override() instead."),this.override(i)},t.extend=function(i,o,s){const c=n(i,o,s),a=Yt(this).getFixtures().extend(De,c),u=mu(function(l,f,h){e.call(this,pn(l),f,h)});return Yt(u).mergeContext({fixtures:a}),u},t.describe=fn,t.suite=fn,t.beforeEach=n3,t.afterEach=r3,t.beforeAll=e3,t.afterAll=t3,t.aroundEach=o3,t.aroundAll=i3,g1(["concurrent","sequential","skip","only","todo","fails"],t,{fixtures:new Dr})}function mu(e){return d3(e)}function pn(e){return typeof e=="string"?e:typeof e=="function"?e.name||"<anonymous>":String(e)}function Lt(e,t,n){(e.includes("%#")||e.includes("%$"))&&(e=e.replace(/%%/g,"__vitest_escaped_%__").replace(/%#/g,`${n}`).replace(/%\$/g,`${n+1}`).replace(/__vitest_escaped_%__/g,"%%"));const r=e.split("%").length-1;e.includes("%f")&&(e.match(/%f/g)||[]).forEach((u,l)=>{if(gI(t[l])||Object.is(t[l],-0)){let f=0;e=e.replace(/%f/g,h=>(f++,f===l+1?"-%f":h))}});const i=Bt(t[0]);function o(a){return a.replace(/\$([$\w.]+)/g,(u,l)=>{var m,p;const f=/^\d+$/.test(l);if(!i&&!f)return`$${l}`;const h=f?Xh(t,l):void 0,d=i?Xh(t[0],l,h):h;return uI(d,{truncate:(p=(m=De==null?void 0:De.config)==null?void 0:m.chaiConfig)==null?void 0:p.truncateThreshold})})}let s="",c=0;return p3(e,Ly,a=>{c<r?s+=cI(a[0],t[c++]):s+=a[0]},a=>{s+=o(a)}),s}function p3(e,t,n,r){let i=0;for(const o of e.matchAll(t))i<o.index&&r(e.slice(i,o.index)),n(o),i=o.index+o[0].length;i<e.length&&r(e.slice(i))}function Zi(e,t){const n=e.join("").trim().replace(/ /g,"").split(`
|
|
113
|
+
`).map(i=>i.split("|"))[0],r=[];for(let i=0;i<Math.floor(t.length/n.length);i++){const o={};for(let s=0;s<n.length;s++)o[n[s]]=t[i*n.length+s];r.push(o)}return r}const Id=globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now,st={currentSuite:null};function m3(e){var t;(t=st.currentSuite)==null||t.tasks.push(e)}async function g3(e,t){const n=st.currentSuite;st.currentSuite=e,await t(),st.currentSuite=n}function _n(e,t,n=!1,r,i){if(t<=0||t===Number.POSITIVE_INFINITY)return e;const{setTimeout:o,clearTimeout:s}=ir();return(function(...a){const u=Id(),l=pu();return l._currentTaskStartTime=u,l._currentTaskTimeout=t,new Promise((f,h)=>{var x;const d=o(()=>{s(d),m()},t);(x=d.unref)==null||x.call(d);function m(){const E=x3(n,t,r);i==null||i(a,E),h(E)}function p(E){if(l._currentTaskStartTime=void 0,l._currentTaskTimeout=void 0,s(d),Id()-u>=t){m();return}f(E)}function y(E){l._currentTaskStartTime=void 0,l._currentTaskTimeout=void 0,s(d),h(E)}try{const E=e(...a);typeof E=="object"&&E!=null&&typeof E.then=="function"?E.then(p,y):p(E)}catch(E){y(E)}})})}function y3(e,t){return(function(...r){return new Promise((i,o)=>{t.addEventListener("abort",()=>o(t.reason));try{const s=e(...r);typeof s=="object"&&s!=null&&typeof s.then=="function"?s.then(i,o):i(s)}catch(s){o(s)}})})}const La=new WeakMap;function gu([e],t){e&&b3(e,t)}function b3(e,t){const n=La.get(e);n==null||n.abort(t)}function w3(e,t){var i;const n=function(){throw new Error("done() callback is deprecated, use promise instead")};let r=La.get(n);return r||(r=new AbortController,La.set(n,r)),n.signal=r.signal,n.task=e,n.skip=(o,s)=>{if(o!==!1)throw e.result??(e.result={state:"skip"}),e.result.pending=!0,new U4("test is skipped; abort execution",e,typeof o=="string"?o:s)},n.annotate=((o,s,c)=>{if(e.result&&e.result.state!=="run")throw new Error(`Cannot annotate tests outside of the test run. The test "${e.name}" finished running with the "${e.result.state}" state already.`);const a={message:o,type:typeof s=="object"||s===void 0?"notice":s},u=typeof s=="object"?s:c;return u&&(a.attachment=u,k1(a.attachment)),v3(e,E3(e,{type:"internal:annotation",annotation:a}).then(async({annotation:l})=>{if(!t.onTestAnnotate)throw new Error("Test runner doesn't support test annotations.");await A1(t);const f=await t.onTestAnnotate(e,l);return e.annotations.push(f),f}))}),n.onTestFailed=(o,s)=>{e.onFailed||(e.onFailed=[]),e.onFailed.push(_n(o,s??t.config.hookTimeout,!0,new Error("STACK_TRACE_ERROR"),(c,a)=>r.abort(a)))},n.onTestFinished=(o,s)=>{e.onFinished||(e.onFinished=[]),e.onFinished.push(_n(o,s??t.config.hookTimeout,!0,new Error("STACK_TRACE_ERROR"),(c,a)=>r.abort(a)))},((i=t.extendTaskContext)==null?void 0:i.call(t,n))||n}function x3(e,t,n){const r=`${e?"Hook":"Test"} timed out in ${t}ms.
|
|
114
|
+
If this is a long-running ${e?"hook":"test"}, pass a timeout value as the last argument or configure it globally with "${e?"hookTimeout":"testTimeout"}".`,i=new Error(r);return n!=null&&n.stack&&(i.stack=n.stack.replace(i.message,n.message)),i}globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now;globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now;ir();const js=new Map,Cd=[],Ri=[];function S3(e){var t;if(js.size){const n=Array.from(js).map(([i,o])=>[i,o[0],o[1]]),r=(t=e.onTaskUpdate)==null?void 0:t.call(e,n,Cd);r&&(Ri.push(r),r.then(()=>Ri.splice(Ri.indexOf(r),1),()=>{})),Cd.length=0,js.clear()}}async function A1(e){S3(e),await Promise.all(Ri)}async function E3(e,t){const n=pu(),r=S1(e.file.filepath,new Error("STACK_TRACE").stack);if(r&&(t.location={file:r.file,line:r.line,column:r.column},t.type==="internal:annotation"&&(t.annotation.location=t.location)),Array.isArray(t.attachments))for(const o of t.attachments)k1(o);if(t.type==="internal:annotation")return t;if(!n.onTestArtifactRecord)throw new Error("Test runner doesn't support test artifacts.");await A1(n);const i=await n.onTestArtifactRecord(e,t);return e.artifacts.push(i),i}const pt=[];for(let e=65;e<91;e++)pt.push(String.fromCharCode(e));for(let e=97;e<123;e++)pt.push(String.fromCharCode(e));for(let e=0;e<10;e++)pt.push(e.toString(10));pt.push("+","/");function T3(e){let t="";const n=e.byteLength;for(let r=0;r<n;r+=3)if(n===r+1){const i=(e[r]&252)>>2,o=(e[r]&3)<<4;t+=pt[i],t+=pt[o],t+="=="}else if(n===r+2){const i=(e[r]&252)>>2,o=(e[r]&3)<<4|(e[r+1]&240)>>4,s=(e[r+1]&15)<<2;t+=pt[i],t+=pt[o],t+=pt[s],t+="="}else{const i=(e[r]&252)>>2,o=(e[r]&3)<<4|(e[r+1]&240)>>4,s=(e[r+1]&15)<<2|(e[r+2]&192)>>6,c=e[r+2]&63;t+=pt[i],t+=pt[o],t+=pt[s],t+=pt[c]}return t}function v3(e,t){return t=t.finally(()=>{if(!e.promises)return;const n=e.promises.indexOf(t);n!==-1&&e.promises.splice(n,1)}),e.promises||(e.promises=[]),e.promises.push(t),t}function k1(e){if(e.body==null&&!e.path)throw new TypeError('Test attachment requires "body" or "path" to be set. Both are missing.');if(e.body&&e.path)throw new TypeError('Test attachment requires only one of "body" or "path" to be set. Both are specified.');if(e.path&&e.bodyEncoding)throw new TypeError('Test attachment with "path" should not have "bodyEncoding" specified.');e.body instanceof Uint8Array&&(e.body=T3(e.body)),e.body!=null&&(e.bodyEncoding??(e.bodyEncoding="base64"))}const A3="__vitest_worker__";function Hr(){const e=globalThis[A3];if(!e)throw new Error(`Vitest failed to access its internal state.
|
|
115
115
|
|
|
116
116
|
One of the following is possible:
|
|
117
117
|
- "vitest" is imported directly without running "vitest" command
|
|
118
118
|
- "vitest" is imported inside "globalSetup" (to fix this, use "setupFiles" instead, because "globalSetup" runs in a different context)
|
|
119
119
|
- "vitest" is imported inside Vite / Vitest config file
|
|
120
120
|
- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues
|
|
121
|
-
`);return e}function o1(){return typeof process<"u"&&!!process.send}function Bk(e,t=!1){const n=[/\/vitest\/dist\//,/vitest-virtual-\w+\/dist/,/@vitest\/dist/,...t?[]:[/^mock:/]];e.idToModuleMap.forEach((r,i)=>{n.some(o=>o.test(i))||(r.promise=void 0,r.exports=void 0,r.evaluated=!1,r.importers.clear())})}function Uk(){const{setTimeout:e}=nr();return new Promise(t=>e(t,0))}async function s1(){await Uk();const e=zr(),t=[],n=e.resolvingModules.size;for(const[r,i]of e.evaluatedModules.idToModuleMap)i.promise&&!i.evaluated&&t.push(i.promise);!t.length&&!n||(await Promise.allSettled(t),await s1())}function Tn(e){return typeof e=="function"&&"_isMockFunction"in e&&e._isMockFunction===!0}const Oa=new Set,lu=new Set,a1=new WeakMap;function fu(e={}){var l;const{originalImplementation:t,restore:n,mockImplementation:r,resetToMockImplementation:i,resetToMockName:o}=e;n&&Oa.add(n);const s=t3(t),c=n3(),a=zk({config:s,state:c,...e}),u=((l=r||t)==null?void 0:l.length)??0;return Object.defineProperty(a,"length",{writable:!0,enumerable:!1,value:u,configurable:!0}),o&&(s.mockName=a.name||"vi.fn()"),a1.set(a,s),lu.add(a),a._isMockFunction=!0,a.getMockImplementation=()=>s.onceMockImplementations[0]||s.mockImplementation,Object.defineProperty(a,"mock",{configurable:!1,enumerable:!0,writable:!1,value:c}),a.mockImplementation=function(h){return s.mockImplementation=h,a},a.mockImplementationOnce=function(h){return s.onceMockImplementations.push(h),a},a.withImplementation=function(h,d){const m=s.mockImplementation,p=s.onceMockImplementations,y=()=>{s.mockImplementation=m,s.onceMockImplementations=p};s.mockImplementation=h,s.onceMockImplementations=[];const x=d();return typeof x=="object"&&typeof(x==null?void 0:x.then)=="function"?x.then(()=>(y(),a)):(y(),a)},a.mockReturnThis=function(){return a.mockImplementation(function(){return this})},a.mockReturnValue=function(h){return a.mockImplementation(function(){return new.target&&Rn("mockReturnValue"),h})},a.mockReturnValueOnce=function(h){return a.mockImplementationOnce(function(){return new.target&&Rn("mockReturnValueOnce"),h})},a.mockThrow=function(h){return a.mockImplementation(function(){throw h})},a.mockThrowOnce=function(h){return a.mockImplementationOnce(function(){throw h})},a.mockResolvedValue=function(h){return a.mockImplementation(function(){return new.target&&Rn("mockResolvedValue"),Promise.resolve(h)})},a.mockResolvedValueOnce=function(h){return a.mockImplementationOnce(function(){return new.target&&Rn("mockResolvedValueOnce"),Promise.resolve(h)})},a.mockRejectedValue=function(h){return a.mockImplementation(function(){return new.target&&Rn("mockRejectedValue"),Promise.reject(h)})},a.mockRejectedValueOnce=function(h){return a.mockImplementationOnce(function(){return new.target&&Rn("mockRejectedValueOnce"),Promise.reject(h)})},a.mockClear=function(){return c.calls=[],c.contexts=[],c.instances=[],c.invocationCallOrder=[],c.results=[],c.settledResults=[],a},a.mockReset=function(){return a.mockClear(),s.mockImplementation=i?r:void 0,s.mockName=o&&a.name||"vi.fn()",s.onceMockImplementations=[],a},a.mockRestore=function(){return a.mockReset(),n==null?void 0:n()},a.mockName=function(h){return typeof h=="string"&&(s.mockName=h),a},a.getMockName=function(){return s.mockName||"vi.fn()"},Symbol.dispose&&(a[Symbol.dispose]=()=>a.mockRestore()),r&&a.mockImplementation(r),a}function Vk(e){return e!=null&&Tn(e)?e:fu({mockImplementation:e,resetToMockImplementation:!0})}function qk(e,t,n){yi(e!=null,"The vi.spyOn() function could not find an object to spy upon. The first argument must be defined."),yi(typeof e=="object"||typeof e=="function","Vitest cannot spy on a primitive value.");const[r,i]=c1(e,t)||[];yi(i||t in e,`The property "${String(t)}" is not defined on the ${typeof e}.`);let o=n||"value",s=!1;o==="value"&&i&&i.value==null&&i.get&&(o="get",s=!0);let c;i?(c=i[o],c==null&&o==="value"&&(c=e[t])):o!=="value"?c=()=>e[t]:c=e[t];const a=s&&c?c():c,u=typeof a;if(yi(u==="function"||o!=="value"&&c==null,`vi.spyOn() can only spy on a function. Received ${u}.`),Tn(a))return a;const l=d=>{const{value:m,...p}=i||{configurable:!0,writable:!0};o!=="value"&&delete p.writable,p[o]=d,Object.defineProperty(e,t,p)},h=fu({restore:()=>{r!==e?Reflect.deleteProperty(e,t):i&&!c?Object.defineProperty(e,t,i):l(c)},originalImplementation:a,resetToMockName:!0});try{l(s?()=>h:h)}catch(d){throw d instanceof TypeError&&Symbol.toStringTag&&e[Symbol.toStringTag]==="Module"&&(d.message.includes("Cannot redefine property")||d.message.includes("Cannot replace module namespace")||d.message.includes("can't redefine non-configurable property"))?new TypeError(`Cannot spy on export "${String(t)}". Module namespace is not configurable in ESM. See: https://vitest.dev/guide/browser/#limitations`,{cause:d}):d}return h}function c1(e,t){const n=Object.getOwnPropertyDescriptor(e,t);if(n)return[e,n];let r=Object.getPrototypeOf(e);for(;r!==null;){const i=Object.getOwnPropertyDescriptor(r,t);if(i)return[r,i];r=Object.getPrototypeOf(r)}}function yi(e,t){if(!e)throw new Error(t)}let Wk=1;function zk({state:e,config:t,name:n,prototypeState:r,prototypeConfig:i,keepMembersImplementation:o,mockImplementation:s,prototypeMembers:c=[]}){const a=t.mockOriginal,u=s,l=n||(a==null?void 0:a.name)||"Mock",f={[l]:(function(...m){Gk(m,e,r),Kk(Wk++,e,r);const p={type:"incomplete",value:void 0},y={type:"incomplete",value:void 0};Hk(p,e,r),Yk(y,e,r);const x=new.target?void 0:this,[T,O]=Jk(x,e,r),[k,_]=Xk(x,e,r),$=t.onceMockImplementations.shift()||t.mockImplementation||(i==null?void 0:i.onceMockImplementations.shift())||(i==null?void 0:i.mockImplementation)||a||function(){};let C,z,le=!1;try{if(new.target){C=Reflect.construct($,m,new.target);for(const D of c){const X=C[D];if(X!==h.prototype[D])continue;const ie=Tn(X),ve=ie?X.mock:void 0,ye=ie?a1.get(X):void 0;C[D]=fu({originalImplementation:o?ye==null?void 0:ye.mockOriginal:void 0,prototypeState:ve,prototypeConfig:ye,keepMembersImplementation:o})}}else C=$.apply(this,m)}catch(D){throw z=D,le=!0,D instanceof TypeError&&D.message.includes("is not a constructor")&&console.warn(`[vitest] The ${f[l].getMockName()} mock did not use 'function' or 'class' in its implementation, see https://vitest.dev/api/vi#vi-spyon for examples.`),D}finally{le?(p.type="throw",p.value=z,y.type="rejected",y.value=z):(p.type="return",p.value=C,new.target&&(e.contexts[k-1]=C,e.instances[T-1]=C,_!=null&&r&&(r.contexts[_-1]=C),O!=null&&r&&(r.instances[O-1]=C)),C instanceof Promise?C.then(D=>{y.type="fulfilled",y.value=D},D=>{y.type="rejected",y.value=D}):(y.type="fulfilled",y.value=C))}return C})},h=f[l],d=a||u;return d&&Zk(h,d),h}function Gk(e,t,n){t.calls.push(e),n==null||n.calls.push(e)}function Kk(e,t,n){t.invocationCallOrder.push(e),n==null||n.invocationCallOrder.push(e)}function Hk(e,t,n){t.results.push(e),n==null||n.results.push(e)}function Yk(e,t,n){t.settledResults.push(e),n==null||n.settledResults.push(e)}function Jk(e,t,n){const r=t.instances.push(e),i=n==null?void 0:n.instances.push(e);return[r,i]}function Xk(e,t,n){const r=t.contexts.push(e),i=n==null?void 0:n.contexts.push(e);return[r,i]}function Zk(e,t){const{properties:n,descriptors:r}=e3(t);for(const i of n){const o=r[i];c1(e,i)||Object.defineProperty(e,i,o)}}const Qk=new Set(["length","name","prototype",Symbol.for("nodejs.util.promisify.custom")]);function e3(e){const t=new Set,n={};for(;e&&e!==Object.prototype&&e!==Function.prototype;){const r=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const i of r)n[i]||Qk.has(i)||(t.add(i),n[i]=Object.getOwnPropertyDescriptor(e,i));e=Object.getPrototypeOf(e)}return{properties:t,descriptors:n}}function t3(e){return{mockImplementation:void 0,mockOriginal:e,mockName:"vi.fn()",onceMockImplementations:[]}}function n3(){const e={calls:[],contexts:[],instances:[],invocationCallOrder:[],settledResults:[],results:[],get lastCall(){return e.calls.at(-1)}};return e}function r3(){for(const e of Oa)e();Oa.clear()}function i3(){lu.forEach(e=>e.mockClear())}function o3(){lu.forEach(e=>e.mockReset())}function Rn(e){throw new TypeError(`Cannot use \`${e}\` when called with \`new\`. Use \`mockImplementation\` with a \`class\` keyword instead. See https://vitest.dev/api/mock#class-support for more information.`)}var hu=Object.defineProperty,s3=(e,t,n)=>t in e?hu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,v=(e,t)=>hu(e,"name",{value:t,configurable:!0}),du=(e,t)=>{for(var n in t)hu(e,n,{get:t[n],enumerable:!0})},u1=(e,t,n)=>s3(e,typeof t!="symbol"?t+"":t,n),me={};du(me,{addChainableMethod:()=>Iu,addLengthGuard:()=>Hr,addMethod:()=>Tu,addProperty:()=>Eu,checkError:()=>ft,compareByInspect:()=>Ji,eql:()=>L1,events:()=>_o,expectTypes:()=>b1,flag:()=>Y,getActual:()=>ko,getMessage:()=>gu,getName:()=>$o,getOperator:()=>$u,getOwnEnumerableProperties:()=>_u,getOwnEnumerablePropertySymbols:()=>Cu,getPathInfo:()=>xu,hasProperty:()=>Co,inspect:()=>ne,isNaN:()=>Xi,isNumeric:()=>Be,isProxyEnabled:()=>Kr,isRegExp:()=>Zi,objDisplay:()=>vn,overwriteChainableMethod:()=>ku,overwriteMethod:()=>Au,overwriteProperty:()=>vu,proxify:()=>rr,test:()=>pu,transferFlags:()=>kt,type:()=>ge});var ft={};du(ft,{compatibleConstructor:()=>h1,compatibleInstance:()=>f1,compatibleMessage:()=>d1,getConstructorName:()=>p1,getMessage:()=>m1});function Io(e){return e instanceof Error||Object.prototype.toString.call(e)==="[object Error]"}v(Io,"isErrorInstance");function l1(e){return Object.prototype.toString.call(e)==="[object RegExp]"}v(l1,"isRegExp");function f1(e,t){return Io(t)&&e===t}v(f1,"compatibleInstance");function h1(e,t){return Io(t)?e.constructor===t.constructor||e instanceof t.constructor:(typeof t=="object"||typeof t=="function")&&t.prototype?e.constructor===t||e instanceof t:!1}v(h1,"compatibleConstructor");function d1(e,t){const n=typeof e=="string"?e:e.message;return l1(t)?t.test(n):typeof t=="string"?n.indexOf(t)!==-1:!1}v(d1,"compatibleMessage");function p1(e){let t=e;return Io(e)?t=e.constructor.name:typeof e=="function"&&(t=e.name,t===""&&(t=new e().name||t)),t}v(p1,"getConstructorName");function m1(e){let t="";return e&&e.message?t=e.message:typeof e=="string"&&(t=e),t}v(m1,"getMessage");function Y(e,t,n){let r=e.__flags||(e.__flags=Object.create(null));if(arguments.length===3)r[t]=n;else return r[t]}v(Y,"flag");function pu(e,t){let n=Y(e,"negate"),r=t[0];return n?!r:r}v(pu,"test");function ge(e){if(typeof e>"u")return"undefined";if(e===null)return"null";const t=e[Symbol.toStringTag];return typeof t=="string"?t:Object.prototype.toString.call(e).slice(8,-1)}v(ge,"type");var a3="captureStackTrace"in Error,g1=class y1 extends Error{constructor(t="Unspecified AssertionError",n,r){super(t),u1(this,"message"),this.message=t,a3&&Error.captureStackTrace(this,r||y1);for(const i in n)i in this||(this[i]=n[i])}get name(){return"AssertionError"}get ok(){return!1}toJSON(t){return{...this,name:this.name,message:this.message,ok:!1,stack:t!==!1?this.stack:void 0}}};v(g1,"AssertionError");var re=g1;function b1(e,t){let n=Y(e,"message"),r=Y(e,"ssfi");n=n?n+": ":"",e=Y(e,"object"),t=t.map(function(s){return s.toLowerCase()}),t.sort();let i=t.map(function(s,c){let a=~["a","e","i","o","u"].indexOf(s.charAt(0))?"an":"a";return(t.length>1&&c===t.length-1?"or ":"")+a+" "+s}).join(", "),o=ge(e).toLowerCase();if(!t.some(function(s){return o===s}))throw new re(n+"object tested must be "+i+", but "+o+" given",void 0,r)}v(b1,"expectTypes");function ko(e,t){return t.length>4?t[4]:e._obj}v(ko,"getActual");var xd={bold:["1","22"],dim:["2","22"],italic:["3","23"],underline:["4","24"],inverse:["7","27"],hidden:["8","28"],strike:["9","29"],black:["30","39"],red:["31","39"],green:["32","39"],yellow:["33","39"],blue:["34","39"],magenta:["35","39"],cyan:["36","39"],white:["37","39"],brightblack:["30;1","39"],brightred:["31;1","39"],brightgreen:["32;1","39"],brightyellow:["33;1","39"],brightblue:["34;1","39"],brightmagenta:["35;1","39"],brightcyan:["36;1","39"],brightwhite:["37;1","39"],grey:["90","39"]},c3={special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:"red"},Xn="…";function w1(e,t){const n=xd[c3[t]]||xd[t]||"";return n?`\x1B[${n[0]}m${String(e)}\x1B[${n[1]}m`:String(e)}v(w1,"colorise");function x1({showHidden:e=!1,depth:t=2,colors:n=!1,customInspect:r=!0,showProxy:i=!1,maxArrayLength:o=1/0,breakLength:s=1/0,seen:c=[],truncate:a=1/0,stylize:u=String}={},l){const f={showHidden:!!e,depth:Number(t),colors:!!n,customInspect:!!r,showProxy:!!i,maxArrayLength:Number(o),breakLength:Number(s),truncate:Number(a),seen:c,inspect:l,stylize:u};return f.colors&&(f.stylize=w1),f}v(x1,"normaliseOptions");function S1(e){return e>="\uD800"&&e<="\uDBFF"}v(S1,"isHighSurrogate");function nn(e,t,n=Xn){e=String(e);const r=n.length,i=e.length;if(r>t&&i>r)return n;if(i>t&&i>r){let o=t-r;return o>0&&S1(e[o-1])&&(o=o-1),`${e.slice(0,o)}${n}`}return e}v(nn,"truncate");function wt(e,t,n,r=", "){n=n||t.inspect;const i=e.length;if(i===0)return"";const o=t.truncate;let s="",c="",a="";for(let u=0;u<i;u+=1){const l=u+1===e.length,f=u+2===e.length;a=`${Xn}(${e.length-u})`;const h=e[u];t.truncate=o-s.length-(l?0:r.length);const d=c||n(h,t)+(l?"":r),m=s.length+d.length,p=m+a.length;if(l&&m>o&&s.length+a.length<=o||!l&&!f&&p>o||(c=l?"":n(e[u+1],t)+(f?"":r),!l&&f&&p>o&&m+c.length>o))break;if(s+=d,!l&&!f&&m+c.length>=o){a=`${Xn}(${e.length-u-1})`;break}a=""}return`${s}${a}`}v(wt,"inspectList");function E1(e){return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?e:JSON.stringify(e).replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'")}v(E1,"quoteComplexKey");function Zn([e,t],n){return n.truncate-=2,typeof e=="string"?e=E1(e):typeof e!="number"&&(e=`[${n.inspect(e,n)}]`),n.truncate-=e.length,t=n.inspect(t,n),`${e}: ${t}`}v(Zn,"inspectProperty");function T1(e,t){const n=Object.keys(e).slice(e.length);if(!e.length&&!n.length)return"[]";t.truncate-=4;const r=wt(e,t);t.truncate-=r.length;let i="";return n.length&&(i=wt(n.map(o=>[o,e[o]]),t,Zn)),`[ ${r}${i?`, ${i}`:""} ]`}v(T1,"inspectArray");var u3=v(e=>typeof Buffer=="function"&&e instanceof Buffer?"Buffer":e[Symbol.toStringTag]?e[Symbol.toStringTag]:e.constructor.name,"getArrayName");function Nt(e,t){const n=u3(e);t.truncate-=n.length+4;const r=Object.keys(e).slice(e.length);if(!e.length&&!r.length)return`${n}[]`;let i="";for(let s=0;s<e.length;s++){const c=`${t.stylize(nn(e[s],t.truncate),"number")}${s===e.length-1?"":", "}`;if(t.truncate-=c.length,e[s]!==e.length&&t.truncate<=3){i+=`${Xn}(${e.length-e[s]+1})`;break}i+=c}let o="";return r.length&&(o=wt(r.map(s=>[s,e[s]]),t,Zn)),`${n}[ ${i}${o?`, ${o}`:""} ]`}v(Nt,"inspectTypedArray");function v1(e,t){const n=e.toJSON();if(n===null)return"Invalid Date";const r=n.split("T"),i=r[0];return t.stylize(`${i}T${nn(r[1],t.truncate-i.length-1)}`,"date")}v(v1,"inspectDate");function Pa(e,t){const n=e[Symbol.toStringTag]||"Function",r=e.name;return r?t.stylize(`[${n} ${nn(r,t.truncate-11)}]`,"special"):t.stylize(`[${n}]`,"special")}v(Pa,"inspectFunction");function A1([e,t],n){return n.truncate-=4,e=n.inspect(e,n),n.truncate-=e.length,t=n.inspect(t,n),`${e} => ${t}`}v(A1,"inspectMapEntry");function I1(e){const t=[];return e.forEach((n,r)=>{t.push([r,n])}),t}v(I1,"mapToEntries");function k1(e,t){return e.size===0?"Map{}":(t.truncate-=7,`Map{ ${wt(I1(e),t,A1)} }`)}v(k1,"inspectMap");var l3=Number.isNaN||(e=>e!==e);function Na(e,t){return l3(e)?t.stylize("NaN","number"):e===1/0?t.stylize("Infinity","number"):e===-1/0?t.stylize("-Infinity","number"):e===0?t.stylize(1/e===1/0?"+0":"-0","number"):t.stylize(nn(String(e),t.truncate),"number")}v(Na,"inspectNumber");function ja(e,t){let n=nn(e.toString(),t.truncate-1);return n!==Xn&&(n+="n"),t.stylize(n,"bigint")}v(ja,"inspectBigInt");function C1(e,t){const n=e.toString().split("/")[2],r=t.truncate-(2+n.length),i=e.source;return t.stylize(`/${nn(i,r)}/${n}`,"regexp")}v(C1,"inspectRegExp");function _1(e){const t=[];return e.forEach(n=>{t.push(n)}),t}v(_1,"arrayFromSet");function $1(e,t){return e.size===0?"Set{}":(t.truncate-=7,`Set{ ${wt(_1(e),t)} }`)}v($1,"inspectSet");var Sd=new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]","g"),f3={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","'":"\\'","\\":"\\\\"},h3=16;function M1(e){return f3[e]||`\\u${`0000${e.charCodeAt(0).toString(h3)}`.slice(-4)}`}v(M1,"escape");function Fa(e,t){return Sd.test(e)&&(e=e.replace(Sd,M1)),t.stylize(`'${nn(e,t.truncate-2)}'`,"string")}v(Fa,"inspectString");function Ra(e){return"description"in Symbol.prototype?e.description?`Symbol(${e.description})`:"Symbol()":e.toString()}v(Ra,"inspectSymbol");var d3=v(()=>"Promise{…}","getPromiseValue"),p3=d3;function wr(e,t){const n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[];if(n.length===0&&r.length===0)return"{}";if(t.truncate-=4,t.seen=t.seen||[],t.seen.includes(e))return"[Circular]";t.seen.push(e);const i=wt(n.map(c=>[c,e[c]]),t,Zn),o=wt(r.map(c=>[c,e[c]]),t,Zn);t.seen.pop();let s="";return i&&o&&(s=", "),`{ ${i}${s}${o} }`}v(wr,"inspectObject");var Ms=typeof Symbol<"u"&&Symbol.toStringTag?Symbol.toStringTag:!1;function O1(e,t){let n="";return Ms&&Ms in e&&(n=e[Ms]),n=n||e.constructor.name,(!n||n==="_class")&&(n="<Anonymous Class>"),t.truncate-=n.length,`${n}${wr(e,t)}`}v(O1,"inspectClass");function P1(e,t){return e.length===0?"Arguments[]":(t.truncate-=13,`Arguments[ ${wt(e,t)} ]`)}v(P1,"inspectArguments");var m3=["stack","line","column","name","message","fileName","lineNumber","columnNumber","number","description","cause"];function N1(e,t){const n=Object.getOwnPropertyNames(e).filter(s=>m3.indexOf(s)===-1),r=e.name;t.truncate-=r.length;let i="";if(typeof e.message=="string"?i=nn(e.message,t.truncate):n.unshift("message"),i=i?`: ${i}`:"",t.truncate-=i.length+5,t.seen=t.seen||[],t.seen.includes(e))return"[Circular]";t.seen.push(e);const o=wt(n.map(s=>[s,e[s]]),t,Zn);return`${r}${i}${o?` { ${o} }`:""}`}v(N1,"inspectObject");function j1([e,t],n){return n.truncate-=3,t?`${n.stylize(String(e),"yellow")}=${n.stylize(`"${t}"`,"string")}`:`${n.stylize(String(e),"yellow")}`}v(j1,"inspectAttribute");function Hi(e,t){return wt(e,t,F1,`
|
|
122
|
-
`)}v(Hi,"inspectNodeCollection");function F1(e,t){switch(e.nodeType){case 1:return mu(e,t);case 3:return t.inspect(e.data,t);default:return t.inspect(e,t)}}v(F1,"inspectNode");function mu(e,t){const n=e.getAttributeNames(),r=e.tagName.toLowerCase(),i=t.stylize(`<${r}`,"special"),o=t.stylize(">","special"),s=t.stylize(`</${r}>`,"special");t.truncate-=r.length*2+5;let c="";n.length>0&&(c+=" ",c+=wt(n.map(l=>[l,e.getAttribute(l)]),t,j1," ")),t.truncate-=c.length;const a=t.truncate;let u=Hi(e.children,t);return u&&u.length>a&&(u=`${Xn}(${e.children.length})`),`${i}${c}${o}${u}${s}`}v(mu,"inspectHTML");var g3=typeof Symbol=="function"&&typeof Symbol.for=="function",Os=g3?Symbol.for("chai/inspect"):"@@chai/inspect",Ps=Symbol.for("nodejs.util.inspect.custom"),Ed=new WeakMap,Td={},vd={undefined:v((e,t)=>t.stylize("undefined","undefined"),"undefined"),null:v((e,t)=>t.stylize("null","null"),"null"),boolean:v((e,t)=>t.stylize(String(e),"boolean"),"boolean"),Boolean:v((e,t)=>t.stylize(String(e),"boolean"),"Boolean"),number:Na,Number:Na,bigint:ja,BigInt:ja,string:Fa,String:Fa,function:Pa,Function:Pa,symbol:Ra,Symbol:Ra,Array:T1,Date:v1,Map:k1,Set:$1,RegExp:C1,Promise:p3,WeakSet:v((e,t)=>t.stylize("WeakSet{…}","special"),"WeakSet"),WeakMap:v((e,t)=>t.stylize("WeakMap{…}","special"),"WeakMap"),Arguments:P1,Int8Array:Nt,Uint8Array:Nt,Uint8ClampedArray:Nt,Int16Array:Nt,Uint16Array:Nt,Int32Array:Nt,Uint32Array:Nt,Float32Array:Nt,Float64Array:Nt,Generator:v(()=>"","Generator"),DataView:v(()=>"","DataView"),ArrayBuffer:v(()=>"","ArrayBuffer"),Error:N1,HTMLCollection:Hi,NodeList:Hi},y3=v((e,t,n,r)=>Os in e&&typeof e[Os]=="function"?e[Os](t):Ps in e&&typeof e[Ps]=="function"?e[Ps](t.depth,t,r):"inspect"in e&&typeof e.inspect=="function"?e.inspect(t.depth,t):"constructor"in e&&Ed.has(e.constructor)?Ed.get(e.constructor)(e,t):Td[n]?Td[n](e,t):"","inspectCustom"),b3=Object.prototype.toString;function xr(e,t={}){const n=x1(t,xr),{customInspect:r}=n;let i=e===null?"null":typeof e;if(i==="object"&&(i=b3.call(e).slice(8,-1)),i in vd)return vd[i](e,n);if(r&&e){const s=y3(e,n,i,xr);if(s)return typeof s=="string"?s:xr(s,n)}const o=e?Object.getPrototypeOf(e):!1;return o===Object.prototype||o===null?wr(e,n):e&&typeof HTMLElement=="function"&&e instanceof HTMLElement?mu(e,n):"constructor"in e?e.constructor!==Object?O1(e,n):wr(e,n):e===Object(e)?wr(e,n):n.stylize(String(e),i)}v(xr,"inspect");var Qe={includeStack:!1,showDiff:!0,truncateThreshold:40,useProxy:!0,proxyExcludedKeys:["then","catch","inspect","toJSON"],deepEqual:null};function ne(e,t,n,r){let i={colors:r,depth:typeof n>"u"?2:n,showHidden:t,truncate:Qe.truncateThreshold?Qe.truncateThreshold:1/0};return xr(e,i)}v(ne,"inspect");function vn(e){let t=ne(e),n=Object.prototype.toString.call(e);if(Qe.truncateThreshold&&t.length>=Qe.truncateThreshold){if(n==="[object Function]")return!e.name||e.name===""?"[Function]":"[Function: "+e.name+"]";if(n==="[object Array]")return"[ Array("+e.length+") ]";if(n==="[object Object]"){let r=Object.keys(e);return"{ Object ("+(r.length>2?r.splice(0,2).join(", ")+", ...":r.join(", "))+") }"}else return t}else return t}v(vn,"objDisplay");function gu(e,t){let n=Y(e,"negate"),r=Y(e,"object"),i=t[3],o=ko(e,t),s=n?t[2]:t[1],c=Y(e,"message");return typeof s=="function"&&(s=s()),s=s||"",s=s.replace(/#\{this\}/g,function(){return vn(r)}).replace(/#\{act\}/g,function(){return vn(o)}).replace(/#\{exp\}/g,function(){return vn(i)}),c?c+": "+s:s}v(gu,"getMessage");function kt(e,t,n){let r=e.__flags||(e.__flags=Object.create(null));t.__flags||(t.__flags=Object.create(null)),n=arguments.length===3?n:!0;for(let i in r)(n||i!=="object"&&i!=="ssfi"&&i!=="lockSsfi"&&i!="message")&&(t.__flags[i]=r[i])}v(kt,"transferFlags");function La(e){if(typeof e>"u")return"undefined";if(e===null)return"null";const t=e[Symbol.toStringTag];return typeof t=="string"?t:Object.prototype.toString.call(e).slice(8,-1)}v(La,"type");function yu(){this._key="chai/deep-eql__"+Math.random()+Date.now()}v(yu,"FakeMap");yu.prototype={get:v(function(t){return t[this._key]},"get"),set:v(function(t,n){Object.isExtensible(t)&&Object.defineProperty(t,this._key,{value:n,configurable:!0})},"set")};var R1=typeof WeakMap=="function"?WeakMap:yu;function Da(e,t,n){if(!n||Cn(e)||Cn(t))return null;var r=n.get(e);if(r){var i=r.get(t);if(typeof i=="boolean")return i}return null}v(Da,"memoizeCompare");function yr(e,t,n,r){if(!(!n||Cn(e)||Cn(t))){var i=n.get(e);i?i.set(t,r):(i=new R1,i.set(t,r),n.set(e,i))}}v(yr,"memoizeSet");var L1=Gr;function Gr(e,t,n){if(n&&n.comparator)return Ba(e,t,n);var r=bu(e,t);return r!==null?r:Ba(e,t,n)}v(Gr,"deepEqual");function bu(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t?!0:Cn(e)||Cn(t)?!1:null}v(bu,"simpleEqual");function Ba(e,t,n){n=n||{},n.memoize=n.memoize===!1?!1:n.memoize||new R1;var r=n&&n.comparator,i=Da(e,t,n.memoize);if(i!==null)return i;var o=Da(t,e,n.memoize);if(o!==null)return o;if(r){var s=r(e,t);if(s===!1||s===!0)return yr(e,t,n.memoize,s),s;var c=bu(e,t);if(c!==null)return c}var a=La(e);if(a!==La(t))return yr(e,t,n.memoize,!1),!1;yr(e,t,n.memoize,!0);var u=D1(e,t,a,n);return yr(e,t,n.memoize,u),u}v(Ba,"extensiveDeepEqual");function D1(e,t,n,r){switch(n){case"String":case"Number":case"Boolean":case"Date":return Gr(e.valueOf(),t.valueOf());case"Promise":case"Symbol":case"function":case"WeakMap":case"WeakSet":return e===t;case"Error":return wu(e,t,["name","message","code"],r);case"Arguments":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"Array":return dn(e,t,r);case"RegExp":return B1(e,t);case"Generator":return U1(e,t,r);case"DataView":return dn(new Uint8Array(e.buffer),new Uint8Array(t.buffer),r);case"ArrayBuffer":return dn(new Uint8Array(e),new Uint8Array(t),r);case"Set":return Ua(e,t,r);case"Map":return Ua(e,t,r);case"Temporal.PlainDate":case"Temporal.PlainTime":case"Temporal.PlainDateTime":case"Temporal.Instant":case"Temporal.ZonedDateTime":case"Temporal.PlainYearMonth":case"Temporal.PlainMonthDay":return e.equals(t);case"Temporal.Duration":return e.total("nanoseconds")===t.total("nanoseconds");case"Temporal.TimeZone":case"Temporal.Calendar":return e.toString()===t.toString();default:return q1(e,t,r)}}v(D1,"extensiveDeepEqualByType");function B1(e,t){return e.toString()===t.toString()}v(B1,"regexpEqual");function Ua(e,t,n){try{if(e.size!==t.size)return!1;if(e.size===0)return!0}catch{return!1}var r=[],i=[];return e.forEach(v(function(s,c){r.push([s,c])},"gatherEntries")),t.forEach(v(function(s,c){i.push([s,c])},"gatherEntries")),dn(r.sort(),i.sort(),n)}v(Ua,"entriesEqual");function dn(e,t,n){var r=e.length;if(r!==t.length)return!1;if(r===0)return!0;for(var i=-1;++i<r;)if(Gr(e[i],t[i],n)===!1)return!1;return!0}v(dn,"iterableEqual");function U1(e,t,n){return dn(Yi(e),Yi(t),n)}v(U1,"generatorEqual");function V1(e){return typeof Symbol<"u"&&typeof e=="object"&&typeof Symbol.iterator<"u"&&typeof e[Symbol.iterator]=="function"}v(V1,"hasIteratorFunction");function Va(e){if(V1(e))try{return Yi(e[Symbol.iterator]())}catch{return[]}return[]}v(Va,"getIteratorEntries");function Yi(e){for(var t=e.next(),n=[t.value];t.done===!1;)t=e.next(),n.push(t.value);return n}v(Yi,"getGeneratorEntries");function qa(e){var t=[];for(var n in e)t.push(n);return t}v(qa,"getEnumerableKeys");function Wa(e){for(var t=[],n=Object.getOwnPropertySymbols(e),r=0;r<n.length;r+=1){var i=n[r];Object.getOwnPropertyDescriptor(e,i).enumerable&&t.push(i)}return t}v(Wa,"getEnumerableSymbols");function wu(e,t,n,r){var i=n.length;if(i===0)return!0;for(var o=0;o<i;o+=1)if(Gr(e[n[o]],t[n[o]],r)===!1)return!1;return!0}v(wu,"keysEqual");function q1(e,t,n){var r=qa(e),i=qa(t),o=Wa(e),s=Wa(t);if(r=r.concat(o),i=i.concat(s),r.length&&r.length===i.length)return dn(za(r).sort(),za(i).sort())===!1?!1:wu(e,t,r,n);var c=Va(e),a=Va(t);return c.length&&c.length===a.length?(c.sort(),a.sort(),dn(c,a,n)):r.length===0&&c.length===0&&i.length===0&&a.length===0}v(q1,"objectEqual");function Cn(e){return e===null||typeof e!="object"}v(Cn,"isPrimitive");function za(e){return e.map(v(function(n){return typeof n=="symbol"?n.toString():n},"mapSymbol"))}v(za,"mapSymbols");function Co(e,t){return typeof e>"u"||e===null?!1:t in Object(e)}v(Co,"hasProperty");function W1(e){return e.replace(/([^\\])\[/g,"$1.[").match(/(\\\.|[^.]+?)+/g).map(r=>{if(r==="constructor"||r==="__proto__"||r==="prototype")return{};const o=/^\[(\d+)\]$/.exec(r);let s=null;return o?s={i:parseFloat(o[1])}:s={p:r.replace(/\\([.[\]])/g,"$1")},s})}v(W1,"parsePath");function Ga(e,t,n){let r=e,i=null;n=typeof n>"u"?t.length:n;for(let o=0;o<n;o++){const s=t[o];r&&(typeof s.p>"u"?r=r[s.i]:r=r[s.p],o===n-1&&(i=r))}return i}v(Ga,"internalGetPathValue");function xu(e,t){const n=W1(t),r=n[n.length-1],i={parent:n.length>1?Ga(e,n,n.length-1):e,name:r.p||r.i,value:Ga(e,n)};return i.exists=Co(i.parent,i.name),i}v(xu,"getPathInfo");var z1=class G1{constructor(t,n,r,i){return u1(this,"__flags",{}),Y(this,"ssfi",r||G1),Y(this,"lockSsfi",i),Y(this,"object",t),Y(this,"message",n),Y(this,"eql",Qe.deepEqual||L1),rr(this)}static get includeStack(){return console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),Qe.includeStack}static set includeStack(t){console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),Qe.includeStack=t}static get showDiff(){return console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),Qe.showDiff}static set showDiff(t){console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),Qe.showDiff=t}static addProperty(t,n){Eu(this.prototype,t,n)}static addMethod(t,n){Tu(this.prototype,t,n)}static addChainableMethod(t,n,r){Iu(this.prototype,t,n,r)}static overwriteProperty(t,n){vu(this.prototype,t,n)}static overwriteMethod(t,n){Au(this.prototype,t,n)}static overwriteChainableMethod(t,n,r){ku(this.prototype,t,n,r)}assert(t,n,r,i,o,s){const c=pu(this,arguments);if(s!==!1&&(s=!0),i===void 0&&o===void 0&&(s=!1),Qe.showDiff!==!0&&(s=!1),!c){n=gu(this,arguments);const u={actual:ko(this,arguments),expected:i,showDiff:s},l=$u(this,arguments);throw l&&(u.operator=l),new re(n,u,Qe.includeStack?this.assert:Y(this,"ssfi"))}}get _obj(){return Y(this,"object")}set _obj(t){Y(this,"object",t)}};v(z1,"Assertion");var b=z1,_o=new EventTarget,K1=class extends Event{constructor(t,n,r){super(t),this.name=String(n),this.fn=r}};v(K1,"PluginEvent");var Su=K1;function Kr(){return Qe.useProxy&&typeof Proxy<"u"&&typeof Reflect<"u"}v(Kr,"isProxyEnabled");function Eu(e,t,n){n=n===void 0?function(){}:n,Object.defineProperty(e,t,{get:v(function r(){!Kr()&&!Y(this,"lockSsfi")&&Y(this,"ssfi",r);let i=n.call(this);if(i!==void 0)return i;let o=new b;return kt(this,o),o},"propertyGetter"),configurable:!0}),_o.dispatchEvent(new Su("addProperty",t,n))}v(Eu,"addProperty");var w3=Object.getOwnPropertyDescriptor(function(){},"length");function Hr(e,t,n){return w3.configurable&&Object.defineProperty(e,"length",{get:v(function(){throw Error(n?"Invalid Chai property: "+t+'.length. Due to a compatibility issue, "length" cannot directly follow "'+t+'". Use "'+t+'.lengthOf" instead.':"Invalid Chai property: "+t+'.length. See docs for proper usage of "'+t+'".')},"get")}),e}v(Hr,"addLengthGuard");function H1(e){let t=Object.getOwnPropertyNames(e);function n(i){t.indexOf(i)===-1&&t.push(i)}v(n,"addProperty");let r=Object.getPrototypeOf(e);for(;r!==null;)Object.getOwnPropertyNames(r).forEach(n),r=Object.getPrototypeOf(r);return t}v(H1,"getProperties");var Ad=["__flags","__methods","_obj","assert"];function rr(e,t){return Kr()?new Proxy(e,{get:v(function n(r,i){if(typeof i=="string"&&Qe.proxyExcludedKeys.indexOf(i)===-1&&!Reflect.has(r,i)){if(t)throw Error("Invalid Chai property: "+t+"."+i+'. See docs for proper usage of "'+t+'".');let o=null,s=4;throw H1(r).forEach(function(c){if(!Object.prototype.hasOwnProperty(c)&&Ad.indexOf(c)===-1){let a=Y1(i,c,s);a<s&&(o=c,s=a)}}),Error(o!==null?"Invalid Chai property: "+i+'. Did you mean "'+o+'"?':"Invalid Chai property: "+i)}return Ad.indexOf(i)===-1&&!Y(r,"lockSsfi")&&Y(r,"ssfi",n),Reflect.get(r,i)},"proxyGetter")}):e}v(rr,"proxify");function Y1(e,t,n){if(Math.abs(e.length-t.length)>=n)return n;let r=[];for(let i=0;i<=e.length;i++)r[i]=Array(t.length+1).fill(0),r[i][0]=i;for(let i=0;i<t.length;i++)r[0][i]=i;for(let i=1;i<=e.length;i++){let o=e.charCodeAt(i-1);for(let s=1;s<=t.length;s++){if(Math.abs(i-s)>=n){r[i][s]=n;continue}r[i][s]=Math.min(r[i-1][s]+1,r[i][s-1]+1,r[i-1][s-1]+(o===t.charCodeAt(s-1)?0:1))}}return r[e.length][t.length]}v(Y1,"stringDistanceCapped");function Tu(e,t,n){let r=v(function(){Y(this,"lockSsfi")||Y(this,"ssfi",r);let i=n.apply(this,arguments);if(i!==void 0)return i;let o=new b;return kt(this,o),o},"methodWrapper");Hr(r,t,!1),e[t]=rr(r,t),_o.dispatchEvent(new Su("addMethod",t,n))}v(Tu,"addMethod");function vu(e,t,n){let r=Object.getOwnPropertyDescriptor(e,t),i=v(function(){},"_super");r&&typeof r.get=="function"&&(i=r.get),Object.defineProperty(e,t,{get:v(function o(){!Kr()&&!Y(this,"lockSsfi")&&Y(this,"ssfi",o);let s=Y(this,"lockSsfi");Y(this,"lockSsfi",!0);let c=n(i).call(this);if(Y(this,"lockSsfi",s),c!==void 0)return c;let a=new b;return kt(this,a),a},"overwritingPropertyGetter"),configurable:!0})}v(vu,"overwriteProperty");function Au(e,t,n){let r=e[t],i=v(function(){throw new Error(t+" is not a function")},"_super");r&&typeof r=="function"&&(i=r);let o=v(function(){Y(this,"lockSsfi")||Y(this,"ssfi",o);let s=Y(this,"lockSsfi");Y(this,"lockSsfi",!0);let c=n(i).apply(this,arguments);if(Y(this,"lockSsfi",s),c!==void 0)return c;let a=new b;return kt(this,a),a},"overwritingMethodWrapper");Hr(o,t,!1),e[t]=rr(o,t)}v(Au,"overwriteMethod");var x3=typeof Object.setPrototypeOf=="function",Id=v(function(){},"testFn"),S3=Object.getOwnPropertyNames(Id).filter(function(e){let t=Object.getOwnPropertyDescriptor(Id,e);return typeof t!="object"?!0:!t.configurable}),E3=Function.prototype.call,T3=Function.prototype.apply,J1=class extends Su{constructor(t,n,r,i){super(t,n,r),this.chainingBehavior=i}};v(J1,"PluginAddChainableMethodEvent");var v3=J1;function Iu(e,t,n,r){typeof r!="function"&&(r=v(function(){},"chainingBehavior"));let i={method:n,chainingBehavior:r};e.__methods||(e.__methods={}),e.__methods[t]=i,Object.defineProperty(e,t,{get:v(function(){i.chainingBehavior.call(this);let s=v(function(){Y(this,"lockSsfi")||Y(this,"ssfi",s);let c=i.method.apply(this,arguments);if(c!==void 0)return c;let a=new b;return kt(this,a),a},"chainableMethodWrapper");if(Hr(s,t,!0),x3){let c=Object.create(this);c.call=E3,c.apply=T3,Object.setPrototypeOf(s,c)}else Object.getOwnPropertyNames(e).forEach(function(a){if(S3.indexOf(a)!==-1)return;let u=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(s,a,u)});return kt(this,s),rr(s)},"chainableMethodGetter"),configurable:!0}),_o.dispatchEvent(new v3("addChainableMethod",t,n,r))}v(Iu,"addChainableMethod");function ku(e,t,n,r){let i=e.__methods[t],o=i.chainingBehavior;i.chainingBehavior=v(function(){let a=r(o).call(this);if(a!==void 0)return a;let u=new b;return kt(this,u),u},"overwritingChainableMethodGetter");let s=i.method;i.method=v(function(){let a=n(s).apply(this,arguments);if(a!==void 0)return a;let u=new b;return kt(this,u),u},"overwritingChainableMethodWrapper")}v(ku,"overwriteChainableMethod");function Ji(e,t){return ne(e)<ne(t)?-1:1}v(Ji,"compareByInspect");function Cu(e){return typeof Object.getOwnPropertySymbols!="function"?[]:Object.getOwnPropertySymbols(e).filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})}v(Cu,"getOwnEnumerablePropertySymbols");function _u(e){return Object.keys(e).concat(Cu(e))}v(_u,"getOwnEnumerableProperties");var Xi=Number.isNaN;function X1(e){let t=ge(e);return["Array","Object","Function"].indexOf(t)!==-1}v(X1,"isObjectType");function $u(e,t){let n=Y(e,"operator"),r=Y(e,"negate"),i=t[3],o=r?t[2]:t[1];if(n)return n;if(typeof o=="function"&&(o=o()),o=o||"",!o||/\shave\s/.test(o))return;let s=X1(i);return/\snot\s/.test(o)?s?"notDeepStrictEqual":"notStrictEqual":s?"deepStrictEqual":"strictEqual"}v($u,"getOperator");function $o(e){return e.name}v($o,"getName");function Zi(e){return Object.prototype.toString.call(e)==="[object RegExp]"}v(Zi,"isRegExp");function Be(e){return["Number","BigInt"].includes(ge(e))}v(Be,"isNumeric");var{flag:S}=me;["to","be","been","is","and","has","have","with","that","which","at","of","same","but","does","still","also"].forEach(function(e){b.addProperty(e)});b.addProperty("not",function(){S(this,"negate",!0)});b.addProperty("deep",function(){S(this,"deep",!0)});b.addProperty("nested",function(){S(this,"nested",!0)});b.addProperty("own",function(){S(this,"own",!0)});b.addProperty("ordered",function(){S(this,"ordered",!0)});b.addProperty("any",function(){S(this,"any",!0),S(this,"all",!1)});b.addProperty("all",function(){S(this,"all",!0),S(this,"any",!1)});var kd={function:["function","asyncfunction","generatorfunction","asyncgeneratorfunction"],asyncfunction:["asyncfunction","asyncgeneratorfunction"],generatorfunction:["generatorfunction","asyncgeneratorfunction"],asyncgeneratorfunction:["asyncgeneratorfunction"]};function Mu(e,t){t&&S(this,"message",t),e=e.toLowerCase();let n=S(this,"object"),r=~["a","e","i","o","u"].indexOf(e.charAt(0))?"an ":"a ";const i=ge(n).toLowerCase();kd.function.includes(e)?this.assert(kd[e].includes(i),"expected #{this} to be "+r+e,"expected #{this} not to be "+r+e):this.assert(e===i,"expected #{this} to be "+r+e,"expected #{this} not to be "+r+e)}v(Mu,"an");b.addChainableMethod("an",Mu);b.addChainableMethod("a",Mu);function Z1(e,t){return Xi(e)&&Xi(t)||e===t}v(Z1,"SameValueZero");function Yr(){S(this,"contains",!0)}v(Yr,"includeChainingBehavior");function Jr(e,t){t&&S(this,"message",t);let n=S(this,"object"),r=ge(n).toLowerCase(),i=S(this,"message"),o=S(this,"negate"),s=S(this,"ssfi"),c=S(this,"deep"),a=c?"deep ":"",u=c?S(this,"eql"):Z1;i=i?i+": ":"";let l=!1;switch(r){case"string":l=n.indexOf(e)!==-1;break;case"weakset":if(c)throw new re(i+"unable to use .deep.include with WeakSet",void 0,s);l=n.has(e);break;case"map":n.forEach(function(f){l=l||u(f,e)});break;case"set":c?n.forEach(function(f){l=l||u(f,e)}):l=n.has(e);break;case"array":c?l=n.some(function(f){return u(f,e)}):l=n.indexOf(e)!==-1;break;default:{if(e!==Object(e))throw new re(i+"the given combination of arguments ("+r+" and "+ge(e).toLowerCase()+") is invalid for this assertion. You can use an array, a map, an object, a set, a string, or a weakset instead of a "+ge(e).toLowerCase(),void 0,s);let f=Object.keys(e),h=null,d=0;if(f.forEach(function(m){let p=new b(n);if(kt(this,p,!0),S(p,"lockSsfi",!0),!o||f.length===1){p.property(m,e[m]);return}try{p.property(m,e[m])}catch(y){if(!ft.compatibleConstructor(y,re))throw y;h===null&&(h=y),d++}},this),o&&f.length>1&&d===f.length)throw h;return}}this.assert(l,"expected #{this} to "+a+"include "+ne(e),"expected #{this} to not "+a+"include "+ne(e))}v(Jr,"include");b.addChainableMethod("include",Jr,Yr);b.addChainableMethod("contain",Jr,Yr);b.addChainableMethod("contains",Jr,Yr);b.addChainableMethod("includes",Jr,Yr);b.addProperty("ok",function(){this.assert(S(this,"object"),"expected #{this} to be truthy","expected #{this} to be falsy")});b.addProperty("true",function(){this.assert(S(this,"object")===!0,"expected #{this} to be true","expected #{this} to be false",!S(this,"negate"))});b.addProperty("numeric",function(){const e=S(this,"object");this.assert(["Number","BigInt"].includes(ge(e)),"expected #{this} to be numeric","expected #{this} to not be numeric",!S(this,"negate"))});b.addProperty("callable",function(){const e=S(this,"object"),t=S(this,"ssfi"),n=S(this,"message"),r=n?`${n}: `:"",i=S(this,"negate"),o=i?`${r}expected ${ne(e)} not to be a callable function`:`${r}expected ${ne(e)} to be a callable function`,s=["Function","AsyncFunction","GeneratorFunction","AsyncGeneratorFunction"].includes(ge(e));if(s&&i||!s&&!i)throw new re(o,void 0,t)});b.addProperty("false",function(){this.assert(S(this,"object")===!1,"expected #{this} to be false","expected #{this} to be true",!!S(this,"negate"))});b.addProperty("null",function(){this.assert(S(this,"object")===null,"expected #{this} to be null","expected #{this} not to be null")});b.addProperty("undefined",function(){this.assert(S(this,"object")===void 0,"expected #{this} to be undefined","expected #{this} not to be undefined")});b.addProperty("NaN",function(){this.assert(Xi(S(this,"object")),"expected #{this} to be NaN","expected #{this} not to be NaN")});function Ou(){let e=S(this,"object");this.assert(e!=null,"expected #{this} to exist","expected #{this} to not exist")}v(Ou,"assertExist");b.addProperty("exist",Ou);b.addProperty("exists",Ou);b.addProperty("empty",function(){let e=S(this,"object"),t=S(this,"ssfi"),n=S(this,"message"),r;switch(n=n?n+": ":"",ge(e).toLowerCase()){case"array":case"string":r=e.length;break;case"map":case"set":r=e.size;break;case"weakmap":case"weakset":throw new re(n+".empty was passed a weak collection",void 0,t);case"function":{const i=n+".empty was passed a function "+$o(e);throw new re(i.trim(),void 0,t)}default:if(e!==Object(e))throw new re(n+".empty was passed non-string primitive "+ne(e),void 0,t);r=Object.keys(e).length}this.assert(r===0,"expected #{this} to be empty","expected #{this} not to be empty")});function Pu(){let e=S(this,"object"),t=ge(e);this.assert(t==="Arguments","expected #{this} to be arguments but got "+t,"expected #{this} to not be arguments")}v(Pu,"checkArguments");b.addProperty("arguments",Pu);b.addProperty("Arguments",Pu);function Mo(e,t){t&&S(this,"message",t);let n=S(this,"object");if(S(this,"deep")){let r=S(this,"lockSsfi");S(this,"lockSsfi",!0),this.eql(e),S(this,"lockSsfi",r)}else this.assert(e===n,"expected #{this} to equal #{exp}","expected #{this} to not equal #{exp}",e,this._obj,!0)}v(Mo,"assertEqual");b.addMethod("equal",Mo);b.addMethod("equals",Mo);b.addMethod("eq",Mo);function Nu(e,t){t&&S(this,"message",t);let n=S(this,"eql");this.assert(n(e,S(this,"object")),"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",e,this._obj,!0)}v(Nu,"assertEql");b.addMethod("eql",Nu);b.addMethod("eqls",Nu);function Oo(e,t){t&&S(this,"message",t);let n=S(this,"object"),r=S(this,"doLength"),i=S(this,"message"),o=i?i+": ":"",s=S(this,"ssfi"),c=ge(n).toLowerCase(),a=ge(e).toLowerCase();if(r&&c!=="map"&&c!=="set"&&new b(n,i,s,!0).to.have.property("length"),!r&&c==="date"&&a!=="date")throw new re(o+"the argument to above must be a date",void 0,s);if(!Be(e)&&(r||Be(n)))throw new re(o+"the argument to above must be a number",void 0,s);if(!r&&c!=="date"&&!Be(n)){let u=c==="string"?"'"+n+"'":n;throw new re(o+"expected "+u+" to be a number or a date",void 0,s)}if(r){let u="length",l;c==="map"||c==="set"?(u="size",l=n.size):l=n.length,this.assert(l>e,"expected #{this} to have a "+u+" above #{exp} but got #{act}","expected #{this} to not have a "+u+" above #{exp}",e,l)}else this.assert(n>e,"expected #{this} to be above #{exp}","expected #{this} to be at most #{exp}",e)}v(Oo,"assertAbove");b.addMethod("above",Oo);b.addMethod("gt",Oo);b.addMethod("greaterThan",Oo);function Po(e,t){t&&S(this,"message",t);let n=S(this,"object"),r=S(this,"doLength"),i=S(this,"message"),o=i?i+": ":"",s=S(this,"ssfi"),c=ge(n).toLowerCase(),a=ge(e).toLowerCase(),u,l=!0;if(r&&c!=="map"&&c!=="set"&&new b(n,i,s,!0).to.have.property("length"),!r&&c==="date"&&a!=="date")u=o+"the argument to least must be a date";else if(!Be(e)&&(r||Be(n)))u=o+"the argument to least must be a number";else if(!r&&c!=="date"&&!Be(n)){let f=c==="string"?"'"+n+"'":n;u=o+"expected "+f+" to be a number or a date"}else l=!1;if(l)throw new re(u,void 0,s);if(r){let f="length",h;c==="map"||c==="set"?(f="size",h=n.size):h=n.length,this.assert(h>=e,"expected #{this} to have a "+f+" at least #{exp} but got #{act}","expected #{this} to have a "+f+" below #{exp}",e,h)}else this.assert(n>=e,"expected #{this} to be at least #{exp}","expected #{this} to be below #{exp}",e)}v(Po,"assertLeast");b.addMethod("least",Po);b.addMethod("gte",Po);b.addMethod("greaterThanOrEqual",Po);function No(e,t){t&&S(this,"message",t);let n=S(this,"object"),r=S(this,"doLength"),i=S(this,"message"),o=i?i+": ":"",s=S(this,"ssfi"),c=ge(n).toLowerCase(),a=ge(e).toLowerCase(),u,l=!0;if(r&&c!=="map"&&c!=="set"&&new b(n,i,s,!0).to.have.property("length"),!r&&c==="date"&&a!=="date")u=o+"the argument to below must be a date";else if(!Be(e)&&(r||Be(n)))u=o+"the argument to below must be a number";else if(!r&&c!=="date"&&!Be(n)){let f=c==="string"?"'"+n+"'":n;u=o+"expected "+f+" to be a number or a date"}else l=!1;if(l)throw new re(u,void 0,s);if(r){let f="length",h;c==="map"||c==="set"?(f="size",h=n.size):h=n.length,this.assert(h<e,"expected #{this} to have a "+f+" below #{exp} but got #{act}","expected #{this} to not have a "+f+" below #{exp}",e,h)}else this.assert(n<e,"expected #{this} to be below #{exp}","expected #{this} to be at least #{exp}",e)}v(No,"assertBelow");b.addMethod("below",No);b.addMethod("lt",No);b.addMethod("lessThan",No);function jo(e,t){t&&S(this,"message",t);let n=S(this,"object"),r=S(this,"doLength"),i=S(this,"message"),o=i?i+": ":"",s=S(this,"ssfi"),c=ge(n).toLowerCase(),a=ge(e).toLowerCase(),u,l=!0;if(r&&c!=="map"&&c!=="set"&&new b(n,i,s,!0).to.have.property("length"),!r&&c==="date"&&a!=="date")u=o+"the argument to most must be a date";else if(!Be(e)&&(r||Be(n)))u=o+"the argument to most must be a number";else if(!r&&c!=="date"&&!Be(n)){let f=c==="string"?"'"+n+"'":n;u=o+"expected "+f+" to be a number or a date"}else l=!1;if(l)throw new re(u,void 0,s);if(r){let f="length",h;c==="map"||c==="set"?(f="size",h=n.size):h=n.length,this.assert(h<=e,"expected #{this} to have a "+f+" at most #{exp} but got #{act}","expected #{this} to have a "+f+" above #{exp}",e,h)}else this.assert(n<=e,"expected #{this} to be at most #{exp}","expected #{this} to be above #{exp}",e)}v(jo,"assertMost");b.addMethod("most",jo);b.addMethod("lte",jo);b.addMethod("lessThanOrEqual",jo);b.addMethod("within",function(e,t,n){n&&S(this,"message",n);let r=S(this,"object"),i=S(this,"doLength"),o=S(this,"message"),s=o?o+": ":"",c=S(this,"ssfi"),a=ge(r).toLowerCase(),u=ge(e).toLowerCase(),l=ge(t).toLowerCase(),f,h=!0,d=u==="date"&&l==="date"?e.toISOString()+".."+t.toISOString():e+".."+t;if(i&&a!=="map"&&a!=="set"&&new b(r,o,c,!0).to.have.property("length"),!i&&a==="date"&&(u!=="date"||l!=="date"))f=s+"the arguments to within must be dates";else if((!Be(e)||!Be(t))&&(i||Be(r)))f=s+"the arguments to within must be numbers";else if(!i&&a!=="date"&&!Be(r)){let m=a==="string"?"'"+r+"'":r;f=s+"expected "+m+" to be a number or a date"}else h=!1;if(h)throw new re(f,void 0,c);if(i){let m="length",p;a==="map"||a==="set"?(m="size",p=r.size):p=r.length,this.assert(p>=e&&p<=t,"expected #{this} to have a "+m+" within "+d,"expected #{this} to not have a "+m+" within "+d)}else this.assert(r>=e&&r<=t,"expected #{this} to be within "+d,"expected #{this} to not be within "+d)});function ju(e,t){t&&S(this,"message",t);let n=S(this,"object"),r=S(this,"ssfi"),i=S(this,"message"),o;try{o=n instanceof e}catch(c){throw c instanceof TypeError?(i=i?i+": ":"",new re(i+"The instanceof assertion needs a constructor but "+ge(e)+" was given.",void 0,r)):c}let s=$o(e);s==null&&(s="an unnamed constructor"),this.assert(o,"expected #{this} to be an instance of "+s,"expected #{this} to not be an instance of "+s)}v(ju,"assertInstanceOf");b.addMethod("instanceof",ju);b.addMethod("instanceOf",ju);function Fu(e,t,n){n&&S(this,"message",n);let r=S(this,"nested"),i=S(this,"own"),o=S(this,"message"),s=S(this,"object"),c=S(this,"ssfi"),a=typeof e;if(o=o?o+": ":"",r){if(a!=="string")throw new re(o+"the argument to property must be a string when using nested syntax",void 0,c)}else if(a!=="string"&&a!=="number"&&a!=="symbol")throw new re(o+"the argument to property must be a string, number, or symbol",void 0,c);if(r&&i)throw new re(o+'The "nested" and "own" flags cannot be combined.',void 0,c);if(s==null)throw new re(o+"Target cannot be null or undefined.",void 0,c);let u=S(this,"deep"),l=S(this,"negate"),f=r?xu(s,e):null,h=r?f.value:s[e],d=u?S(this,"eql"):(y,x)=>y===x,m="";u&&(m+="deep "),i&&(m+="own "),r&&(m+="nested "),m+="property ";let p;i?p=Object.prototype.hasOwnProperty.call(s,e):r?p=f.exists:p=Co(s,e),(!l||arguments.length===1)&&this.assert(p,"expected #{this} to have "+m+ne(e),"expected #{this} to not have "+m+ne(e)),arguments.length>1&&this.assert(p&&d(t,h),"expected #{this} to have "+m+ne(e)+" of #{exp}, but got #{act}","expected #{this} to not have "+m+ne(e)+" of #{act}",t,h),S(this,"object",h)}v(Fu,"assertProperty");b.addMethod("property",Fu);function Ru(e,t,n){S(this,"own",!0),Fu.apply(this,arguments)}v(Ru,"assertOwnProperty");b.addMethod("ownProperty",Ru);b.addMethod("haveOwnProperty",Ru);function Lu(e,t,n){typeof t=="string"&&(n=t,t=null),n&&S(this,"message",n);let r=S(this,"object"),i=Object.getOwnPropertyDescriptor(Object(r),e),o=S(this,"eql");i&&t?this.assert(o(t,i),"expected the own property descriptor for "+ne(e)+" on #{this} to match "+ne(t)+", got "+ne(i),"expected the own property descriptor for "+ne(e)+" on #{this} to not match "+ne(t),t,i,!0):this.assert(i,"expected #{this} to have an own property descriptor for "+ne(e),"expected #{this} to not have an own property descriptor for "+ne(e)),S(this,"object",i)}v(Lu,"assertOwnPropertyDescriptor");b.addMethod("ownPropertyDescriptor",Lu);b.addMethod("haveOwnPropertyDescriptor",Lu);function Du(){S(this,"doLength",!0)}v(Du,"assertLengthChain");function Bu(e,t){t&&S(this,"message",t);let n=S(this,"object"),r=ge(n).toLowerCase(),i=S(this,"message"),o=S(this,"ssfi"),s="length",c;switch(r){case"map":case"set":s="size",c=n.size;break;default:new b(n,i,o,!0).to.have.property("length"),c=n.length}this.assert(c==e,"expected #{this} to have a "+s+" of #{exp} but got #{act}","expected #{this} to not have a "+s+" of #{act}",e,c)}v(Bu,"assertLength");b.addChainableMethod("length",Bu,Du);b.addChainableMethod("lengthOf",Bu,Du);function Uu(e,t){t&&S(this,"message",t);let n=S(this,"object");this.assert(e.exec(n),"expected #{this} to match "+e,"expected #{this} not to match "+e)}v(Uu,"assertMatch");b.addMethod("match",Uu);b.addMethod("matches",Uu);b.addMethod("string",function(e,t){t&&S(this,"message",t);let n=S(this,"object"),r=S(this,"message"),i=S(this,"ssfi");new b(n,r,i,!0).is.a("string"),this.assert(~n.indexOf(e),"expected #{this} to contain "+ne(e),"expected #{this} to not contain "+ne(e))});function Vu(e){let t=S(this,"object"),n=ge(t),r=ge(e),i=S(this,"ssfi"),o=S(this,"deep"),s,c="",a,u=!0,l=S(this,"message");l=l?l+": ":"";let f=l+"when testing keys against an object or an array you must give a single Array|Object|String argument or multiple String arguments";if(n==="Map"||n==="Set")c=o?"deeply ":"",a=[],t.forEach(function(x,T){a.push(T)}),r!=="Array"&&(e=Array.prototype.slice.call(arguments));else{switch(a=_u(t),r){case"Array":if(arguments.length>1)throw new re(f,void 0,i);break;case"Object":if(arguments.length>1)throw new re(f,void 0,i);e=Object.keys(e);break;default:e=Array.prototype.slice.call(arguments)}e=e.map(function(x){return typeof x=="symbol"?x:String(x)})}if(!e.length)throw new re(l+"keys required",void 0,i);let h=e.length,d=S(this,"any"),m=S(this,"all"),p=e,y=o?S(this,"eql"):(x,T)=>x===T;if(!d&&!m&&(m=!0),d&&(u=p.some(function(x){return a.some(function(T){return y(x,T)})})),m&&(u=p.every(function(x){return a.some(function(T){return y(x,T)})}),S(this,"contains")||(u=u&&e.length==a.length)),h>1){e=e.map(function(T){return ne(T)});let x=e.pop();m&&(s=e.join(", ")+", and "+x),d&&(s=e.join(", ")+", or "+x)}else s=ne(e[0]);s=(h>1?"keys ":"key ")+s,s=(S(this,"contains")?"contain ":"have ")+s,this.assert(u,"expected #{this} to "+c+s,"expected #{this} to not "+c+s,p.slice(0).sort(Ji),a.sort(Ji),!0)}v(Vu,"assertKeys");b.addMethod("keys",Vu);b.addMethod("key",Vu);function Fo(e,t,n){n&&S(this,"message",n);let r=S(this,"object"),i=S(this,"ssfi"),o=S(this,"message"),s=S(this,"negate")||!1;new b(r,o,i,!0).is.a("function"),(Zi(e)||typeof e=="string")&&(t=e,e=null);let c,a=!1;try{r()}catch(d){a=!0,c=d}let u=e===void 0&&t===void 0,l=!!(e&&t),f=!1,h=!1;if(u||!u&&!s){let d="an error";e instanceof Error?d="#{exp}":e&&(d=ft.getConstructorName(e));let m=c;if(c instanceof Error)m=c.toString();else if(typeof c=="string")m=c;else if(c&&(typeof c=="object"||typeof c=="function"))try{m=ft.getConstructorName(c)}catch{}this.assert(a,"expected #{this} to throw "+d,"expected #{this} to not throw an error but #{act} was thrown",e&&e.toString(),m)}if(e&&c&&(e instanceof Error&&ft.compatibleInstance(c,e)===s&&(l&&s?f=!0:this.assert(s,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(c&&!s?" but #{act} was thrown":""),e.toString(),c.toString())),ft.compatibleConstructor(c,e)===s&&(l&&s?f=!0:this.assert(s,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(c?" but #{act} was thrown":""),e instanceof Error?e.toString():e&&ft.getConstructorName(e),c instanceof Error?c.toString():c&&ft.getConstructorName(c)))),c&&t!==void 0&&t!==null){let d="including";Zi(t)&&(d="matching"),ft.compatibleMessage(c,t)===s&&(l&&s?h=!0:this.assert(s,"expected #{this} to throw error "+d+" #{exp} but got #{act}","expected #{this} to throw error not "+d+" #{exp}",t,ft.getMessage(c)))}f&&h&&this.assert(s,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(c?" but #{act} was thrown":""),e instanceof Error?e.toString():e&&ft.getConstructorName(e),c instanceof Error?c.toString():c&&ft.getConstructorName(c)),S(this,"object",c)}v(Fo,"assertThrows");b.addMethod("throw",Fo);b.addMethod("throws",Fo);b.addMethod("Throw",Fo);function qu(e,t){t&&S(this,"message",t);let n=S(this,"object"),r=S(this,"itself"),i=typeof n=="function"&&!r?n.prototype[e]:n[e];this.assert(typeof i=="function","expected #{this} to respond to "+ne(e),"expected #{this} to not respond to "+ne(e))}v(qu,"respondTo");b.addMethod("respondTo",qu);b.addMethod("respondsTo",qu);b.addProperty("itself",function(){S(this,"itself",!0)});function Wu(e,t){t&&S(this,"message",t);let n=S(this,"object"),r=e(n);this.assert(r,"expected #{this} to satisfy "+vn(e),"expected #{this} to not satisfy"+vn(e),!S(this,"negate"),r)}v(Wu,"satisfy");b.addMethod("satisfy",Wu);b.addMethod("satisfies",Wu);function zu(e,t,n){n&&S(this,"message",n);let r=S(this,"object"),i=S(this,"message"),o=S(this,"ssfi");new b(r,i,o,!0).is.numeric;let s="A `delta` value is required for `closeTo`";if(t==null)throw new re(i?`${i}: ${s}`:s,void 0,o);if(new b(t,i,o,!0).is.numeric,s="A `expected` value is required for `closeTo`",e==null)throw new re(i?`${i}: ${s}`:s,void 0,o);new b(e,i,o,!0).is.numeric;const c=v(u=>u<0?-u:u,"abs"),a=v(u=>parseFloat(parseFloat(u).toPrecision(12)),"strip");this.assert(a(c(r-e))<=t,"expected #{this} to be close to "+e+" +/- "+t,"expected #{this} not to be close to "+e+" +/- "+t)}v(zu,"closeTo");b.addMethod("closeTo",zu);b.addMethod("approximately",zu);function Q1(e,t,n,r,i){let o=Array.from(t),s=Array.from(e);if(!r){if(s.length!==o.length)return!1;o=o.slice()}return s.every(function(c,a){if(i)return n?n(c,o[a]):c===o[a];if(!n){let u=o.indexOf(c);return u===-1?!1:(r||o.splice(u,1),!0)}return o.some(function(u,l){return n(c,u)?(r||o.splice(l,1),!0):!1})})}v(Q1,"isSubsetOf");b.addMethod("members",function(e,t){t&&S(this,"message",t);let n=S(this,"object"),r=S(this,"message"),i=S(this,"ssfi");new b(n,r,i,!0).to.be.iterable,new b(e,r,i,!0).to.be.iterable;let o=S(this,"contains"),s=S(this,"ordered"),c,a,u;o?(c=s?"an ordered superset":"a superset",a="expected #{this} to be "+c+" of #{exp}",u="expected #{this} to not be "+c+" of #{exp}"):(c=s?"ordered members":"members",a="expected #{this} to have the same "+c+" as #{exp}",u="expected #{this} to not have the same "+c+" as #{exp}");let l=S(this,"deep")?S(this,"eql"):void 0;this.assert(Q1(e,n,l,o,s),a,u,e,n,!0)});b.addProperty("iterable",function(e){e&&S(this,"message",e);let t=S(this,"object");this.assert(t!=null&&t[Symbol.iterator],"expected #{this} to be an iterable","expected #{this} to not be an iterable",t)});function eb(e,t){t&&S(this,"message",t);let n=S(this,"object"),r=S(this,"message"),i=S(this,"ssfi"),o=S(this,"contains"),s=S(this,"deep"),c=S(this,"eql");new b(e,r,i,!0).to.be.an("array"),o?this.assert(e.some(function(a){return n.indexOf(a)>-1}),"expected #{this} to contain one of #{exp}","expected #{this} to not contain one of #{exp}",e,n):s?this.assert(e.some(function(a){return c(n,a)}),"expected #{this} to deeply equal one of #{exp}","expected #{this} to deeply equal one of #{exp}",e,n):this.assert(e.indexOf(n)>-1,"expected #{this} to be one of #{exp}","expected #{this} to not be one of #{exp}",e,n)}v(eb,"oneOf");b.addMethod("oneOf",eb);function Gu(e,t,n){n&&S(this,"message",n);let r=S(this,"object"),i=S(this,"message"),o=S(this,"ssfi");new b(r,i,o,!0).is.a("function");let s;t?(new b(e,i,o,!0).to.have.property(t),s=e[t]):(new b(e,i,o,!0).is.a("function"),s=e()),r();let c=t==null?e():e[t],a=t==null?s:"."+t;S(this,"deltaMsgObj",a),S(this,"initialDeltaValue",s),S(this,"finalDeltaValue",c),S(this,"deltaBehavior","change"),S(this,"realDelta",c!==s),this.assert(s!==c,"expected "+a+" to change","expected "+a+" to not change")}v(Gu,"assertChanges");b.addMethod("change",Gu);b.addMethod("changes",Gu);function Ku(e,t,n){n&&S(this,"message",n);let r=S(this,"object"),i=S(this,"message"),o=S(this,"ssfi");new b(r,i,o,!0).is.a("function");let s;t?(new b(e,i,o,!0).to.have.property(t),s=e[t]):(new b(e,i,o,!0).is.a("function"),s=e()),new b(s,i,o,!0).is.a("number"),r();let c=t==null?e():e[t],a=t==null?s:"."+t;S(this,"deltaMsgObj",a),S(this,"initialDeltaValue",s),S(this,"finalDeltaValue",c),S(this,"deltaBehavior","increase"),S(this,"realDelta",c-s),this.assert(c-s>0,"expected "+a+" to increase","expected "+a+" to not increase")}v(Ku,"assertIncreases");b.addMethod("increase",Ku);b.addMethod("increases",Ku);function Hu(e,t,n){n&&S(this,"message",n);let r=S(this,"object"),i=S(this,"message"),o=S(this,"ssfi");new b(r,i,o,!0).is.a("function");let s;t?(new b(e,i,o,!0).to.have.property(t),s=e[t]):(new b(e,i,o,!0).is.a("function"),s=e()),new b(s,i,o,!0).is.a("number"),r();let c=t==null?e():e[t],a=t==null?s:"."+t;S(this,"deltaMsgObj",a),S(this,"initialDeltaValue",s),S(this,"finalDeltaValue",c),S(this,"deltaBehavior","decrease"),S(this,"realDelta",s-c),this.assert(c-s<0,"expected "+a+" to decrease","expected "+a+" to not decrease")}v(Hu,"assertDecreases");b.addMethod("decrease",Hu);b.addMethod("decreases",Hu);function tb(e,t){t&&S(this,"message",t);let n=S(this,"deltaMsgObj"),r=S(this,"initialDeltaValue"),i=S(this,"finalDeltaValue"),o=S(this,"deltaBehavior"),s=S(this,"realDelta"),c;o==="change"?c=Math.abs(i-r)===Math.abs(e):c=s===Math.abs(e),this.assert(c,"expected "+n+" to "+o+" by "+e,"expected "+n+" to not "+o+" by "+e)}v(tb,"assertDelta");b.addMethod("by",tb);b.addProperty("extensible",function(){let e=S(this,"object"),t=e===Object(e)&&Object.isExtensible(e);this.assert(t,"expected #{this} to be extensible","expected #{this} to not be extensible")});b.addProperty("sealed",function(){let e=S(this,"object"),t=e===Object(e)?Object.isSealed(e):!0;this.assert(t,"expected #{this} to be sealed","expected #{this} to not be sealed")});b.addProperty("frozen",function(){let e=S(this,"object"),t=e===Object(e)?Object.isFrozen(e):!0;this.assert(t,"expected #{this} to be frozen","expected #{this} to not be frozen")});b.addProperty("finite",function(e){let t=S(this,"object");this.assert(typeof t=="number"&&isFinite(t),"expected #{this} to be a finite number","expected #{this} to not be a finite number")});function Qi(e,t){return e===t?!0:typeof t!=typeof e?!1:typeof e!="object"||e===null?e===t:t?Array.isArray(e)?Array.isArray(t)?e.every(function(n){return t.some(function(r){return Qi(n,r)})}):!1:e instanceof Date?t instanceof Date?e.getTime()===t.getTime():!1:Object.keys(e).every(function(n){let r=e[n],i=t[n];return typeof r=="object"&&r!==null&&i!==null?Qi(r,i):typeof r=="function"?r(i):i===r}):!1}v(Qi,"compareSubset");b.addMethod("containSubset",function(e){const t=Y(this,"object"),n=Qe.showDiff;this.assert(Qi(e,t),"expected #{act} to contain subset #{exp}","expected #{act} to not contain subset #{exp}",e,t,n)});function An(e,t){return new b(e,t)}v(An,"expect");An.fail=function(e,t,n,r){throw arguments.length<2&&(n=e,e=void 0),n=n||"expect.fail()",new re(n,{actual:e,expected:t,operator:r},An.fail)};var nb={};du(nb,{Should:()=>I3,should:()=>A3});function Yu(){function e(){return this instanceof String||this instanceof Number||this instanceof Boolean||typeof Symbol=="function"&&this instanceof Symbol||typeof BigInt=="function"&&this instanceof BigInt?new b(this.valueOf(),null,e):new b(this,null,e)}v(e,"shouldGetter");function t(r){Object.defineProperty(this,"should",{value:r,enumerable:!0,configurable:!0,writable:!0})}v(t,"shouldSetter"),Object.defineProperty(Object.prototype,"should",{set:t,get:e,configurable:!0});let n={};return n.fail=function(r,i,o,s){throw arguments.length<2&&(o=r,r=void 0),o=o||"should.fail()",new re(o,{actual:r,expected:i,operator:s},n.fail)},n.equal=function(r,i,o){new b(r,o).to.equal(i)},n.Throw=function(r,i,o,s){new b(r,s).to.Throw(i,o)},n.exist=function(r,i){new b(r,i).to.exist},n.not={},n.not.equal=function(r,i,o){new b(r,o).to.not.equal(i)},n.not.Throw=function(r,i,o,s){new b(r,s).to.not.Throw(i,o)},n.not.exist=function(r,i){new b(r,i).to.not.exist},n.throw=n.Throw,n.not.throw=n.not.Throw,n}v(Yu,"loadShould");var A3=Yu,I3=Yu;function g(e,t){new b(null,null,g,!0).assert(e,t,"[ negation message unavailable ]")}v(g,"assert");g.fail=function(e,t,n,r){throw arguments.length<2&&(n=e,e=void 0),n=n||"assert.fail()",new re(n,{actual:e,expected:t,operator:r},g.fail)};g.isOk=function(e,t){new b(e,t,g.isOk,!0).is.ok};g.isNotOk=function(e,t){new b(e,t,g.isNotOk,!0).is.not.ok};g.equal=function(e,t,n){let r=new b(e,n,g.equal,!0);r.assert(t==Y(r,"object"),"expected #{this} to equal #{exp}","expected #{this} to not equal #{act}",t,e,!0)};g.notEqual=function(e,t,n){let r=new b(e,n,g.notEqual,!0);r.assert(t!=Y(r,"object"),"expected #{this} to not equal #{exp}","expected #{this} to equal #{act}",t,e,!0)};g.strictEqual=function(e,t,n){new b(e,n,g.strictEqual,!0).to.equal(t)};g.notStrictEqual=function(e,t,n){new b(e,n,g.notStrictEqual,!0).to.not.equal(t)};g.deepEqual=g.deepStrictEqual=function(e,t,n){new b(e,n,g.deepEqual,!0).to.eql(t)};g.notDeepEqual=function(e,t,n){new b(e,n,g.notDeepEqual,!0).to.not.eql(t)};g.isAbove=function(e,t,n){new b(e,n,g.isAbove,!0).to.be.above(t)};g.isAtLeast=function(e,t,n){new b(e,n,g.isAtLeast,!0).to.be.least(t)};g.isBelow=function(e,t,n){new b(e,n,g.isBelow,!0).to.be.below(t)};g.isAtMost=function(e,t,n){new b(e,n,g.isAtMost,!0).to.be.most(t)};g.isTrue=function(e,t){new b(e,t,g.isTrue,!0).is.true};g.isNotTrue=function(e,t){new b(e,t,g.isNotTrue,!0).to.not.equal(!0)};g.isFalse=function(e,t){new b(e,t,g.isFalse,!0).is.false};g.isNotFalse=function(e,t){new b(e,t,g.isNotFalse,!0).to.not.equal(!1)};g.isNull=function(e,t){new b(e,t,g.isNull,!0).to.equal(null)};g.isNotNull=function(e,t){new b(e,t,g.isNotNull,!0).to.not.equal(null)};g.isNaN=function(e,t){new b(e,t,g.isNaN,!0).to.be.NaN};g.isNotNaN=function(e,t){new b(e,t,g.isNotNaN,!0).not.to.be.NaN};g.exists=function(e,t){new b(e,t,g.exists,!0).to.exist};g.notExists=function(e,t){new b(e,t,g.notExists,!0).to.not.exist};g.isUndefined=function(e,t){new b(e,t,g.isUndefined,!0).to.equal(void 0)};g.isDefined=function(e,t){new b(e,t,g.isDefined,!0).to.not.equal(void 0)};g.isCallable=function(e,t){new b(e,t,g.isCallable,!0).is.callable};g.isNotCallable=function(e,t){new b(e,t,g.isNotCallable,!0).is.not.callable};g.isObject=function(e,t){new b(e,t,g.isObject,!0).to.be.a("object")};g.isNotObject=function(e,t){new b(e,t,g.isNotObject,!0).to.not.be.a("object")};g.isArray=function(e,t){new b(e,t,g.isArray,!0).to.be.an("array")};g.isNotArray=function(e,t){new b(e,t,g.isNotArray,!0).to.not.be.an("array")};g.isString=function(e,t){new b(e,t,g.isString,!0).to.be.a("string")};g.isNotString=function(e,t){new b(e,t,g.isNotString,!0).to.not.be.a("string")};g.isNumber=function(e,t){new b(e,t,g.isNumber,!0).to.be.a("number")};g.isNotNumber=function(e,t){new b(e,t,g.isNotNumber,!0).to.not.be.a("number")};g.isNumeric=function(e,t){new b(e,t,g.isNumeric,!0).is.numeric};g.isNotNumeric=function(e,t){new b(e,t,g.isNotNumeric,!0).is.not.numeric};g.isFinite=function(e,t){new b(e,t,g.isFinite,!0).to.be.finite};g.isBoolean=function(e,t){new b(e,t,g.isBoolean,!0).to.be.a("boolean")};g.isNotBoolean=function(e,t){new b(e,t,g.isNotBoolean,!0).to.not.be.a("boolean")};g.typeOf=function(e,t,n){new b(e,n,g.typeOf,!0).to.be.a(t)};g.notTypeOf=function(e,t,n){new b(e,n,g.notTypeOf,!0).to.not.be.a(t)};g.instanceOf=function(e,t,n){new b(e,n,g.instanceOf,!0).to.be.instanceOf(t)};g.notInstanceOf=function(e,t,n){new b(e,n,g.notInstanceOf,!0).to.not.be.instanceOf(t)};g.include=function(e,t,n){new b(e,n,g.include,!0).include(t)};g.notInclude=function(e,t,n){new b(e,n,g.notInclude,!0).not.include(t)};g.deepInclude=function(e,t,n){new b(e,n,g.deepInclude,!0).deep.include(t)};g.notDeepInclude=function(e,t,n){new b(e,n,g.notDeepInclude,!0).not.deep.include(t)};g.nestedInclude=function(e,t,n){new b(e,n,g.nestedInclude,!0).nested.include(t)};g.notNestedInclude=function(e,t,n){new b(e,n,g.notNestedInclude,!0).not.nested.include(t)};g.deepNestedInclude=function(e,t,n){new b(e,n,g.deepNestedInclude,!0).deep.nested.include(t)};g.notDeepNestedInclude=function(e,t,n){new b(e,n,g.notDeepNestedInclude,!0).not.deep.nested.include(t)};g.ownInclude=function(e,t,n){new b(e,n,g.ownInclude,!0).own.include(t)};g.notOwnInclude=function(e,t,n){new b(e,n,g.notOwnInclude,!0).not.own.include(t)};g.deepOwnInclude=function(e,t,n){new b(e,n,g.deepOwnInclude,!0).deep.own.include(t)};g.notDeepOwnInclude=function(e,t,n){new b(e,n,g.notDeepOwnInclude,!0).not.deep.own.include(t)};g.match=function(e,t,n){new b(e,n,g.match,!0).to.match(t)};g.notMatch=function(e,t,n){new b(e,n,g.notMatch,!0).to.not.match(t)};g.property=function(e,t,n){new b(e,n,g.property,!0).to.have.property(t)};g.notProperty=function(e,t,n){new b(e,n,g.notProperty,!0).to.not.have.property(t)};g.propertyVal=function(e,t,n,r){new b(e,r,g.propertyVal,!0).to.have.property(t,n)};g.notPropertyVal=function(e,t,n,r){new b(e,r,g.notPropertyVal,!0).to.not.have.property(t,n)};g.deepPropertyVal=function(e,t,n,r){new b(e,r,g.deepPropertyVal,!0).to.have.deep.property(t,n)};g.notDeepPropertyVal=function(e,t,n,r){new b(e,r,g.notDeepPropertyVal,!0).to.not.have.deep.property(t,n)};g.ownProperty=function(e,t,n){new b(e,n,g.ownProperty,!0).to.have.own.property(t)};g.notOwnProperty=function(e,t,n){new b(e,n,g.notOwnProperty,!0).to.not.have.own.property(t)};g.ownPropertyVal=function(e,t,n,r){new b(e,r,g.ownPropertyVal,!0).to.have.own.property(t,n)};g.notOwnPropertyVal=function(e,t,n,r){new b(e,r,g.notOwnPropertyVal,!0).to.not.have.own.property(t,n)};g.deepOwnPropertyVal=function(e,t,n,r){new b(e,r,g.deepOwnPropertyVal,!0).to.have.deep.own.property(t,n)};g.notDeepOwnPropertyVal=function(e,t,n,r){new b(e,r,g.notDeepOwnPropertyVal,!0).to.not.have.deep.own.property(t,n)};g.nestedProperty=function(e,t,n){new b(e,n,g.nestedProperty,!0).to.have.nested.property(t)};g.notNestedProperty=function(e,t,n){new b(e,n,g.notNestedProperty,!0).to.not.have.nested.property(t)};g.nestedPropertyVal=function(e,t,n,r){new b(e,r,g.nestedPropertyVal,!0).to.have.nested.property(t,n)};g.notNestedPropertyVal=function(e,t,n,r){new b(e,r,g.notNestedPropertyVal,!0).to.not.have.nested.property(t,n)};g.deepNestedPropertyVal=function(e,t,n,r){new b(e,r,g.deepNestedPropertyVal,!0).to.have.deep.nested.property(t,n)};g.notDeepNestedPropertyVal=function(e,t,n,r){new b(e,r,g.notDeepNestedPropertyVal,!0).to.not.have.deep.nested.property(t,n)};g.lengthOf=function(e,t,n){new b(e,n,g.lengthOf,!0).to.have.lengthOf(t)};g.hasAnyKeys=function(e,t,n){new b(e,n,g.hasAnyKeys,!0).to.have.any.keys(t)};g.hasAllKeys=function(e,t,n){new b(e,n,g.hasAllKeys,!0).to.have.all.keys(t)};g.containsAllKeys=function(e,t,n){new b(e,n,g.containsAllKeys,!0).to.contain.all.keys(t)};g.doesNotHaveAnyKeys=function(e,t,n){new b(e,n,g.doesNotHaveAnyKeys,!0).to.not.have.any.keys(t)};g.doesNotHaveAllKeys=function(e,t,n){new b(e,n,g.doesNotHaveAllKeys,!0).to.not.have.all.keys(t)};g.hasAnyDeepKeys=function(e,t,n){new b(e,n,g.hasAnyDeepKeys,!0).to.have.any.deep.keys(t)};g.hasAllDeepKeys=function(e,t,n){new b(e,n,g.hasAllDeepKeys,!0).to.have.all.deep.keys(t)};g.containsAllDeepKeys=function(e,t,n){new b(e,n,g.containsAllDeepKeys,!0).to.contain.all.deep.keys(t)};g.doesNotHaveAnyDeepKeys=function(e,t,n){new b(e,n,g.doesNotHaveAnyDeepKeys,!0).to.not.have.any.deep.keys(t)};g.doesNotHaveAllDeepKeys=function(e,t,n){new b(e,n,g.doesNotHaveAllDeepKeys,!0).to.not.have.all.deep.keys(t)};g.throws=function(e,t,n,r){(typeof t=="string"||t instanceof RegExp)&&(n=t,t=null);let i=new b(e,r,g.throws,!0).to.throw(t,n);return Y(i,"object")};g.doesNotThrow=function(e,t,n,r){(typeof t=="string"||t instanceof RegExp)&&(n=t,t=null),new b(e,r,g.doesNotThrow,!0).to.not.throw(t,n)};g.operator=function(e,t,n,r){let i;switch(t){case"==":i=e==n;break;case"===":i=e===n;break;case">":i=e>n;break;case">=":i=e>=n;break;case"<":i=e<n;break;case"<=":i=e<=n;break;case"!=":i=e!=n;break;case"!==":i=e!==n;break;default:throw r=r&&r+": ",new re(r+'Invalid operator "'+t+'"',void 0,g.operator)}let o=new b(i,r,g.operator,!0);o.assert(Y(o,"object")===!0,"expected "+ne(e)+" to be "+t+" "+ne(n),"expected "+ne(e)+" to not be "+t+" "+ne(n))};g.closeTo=function(e,t,n,r){new b(e,r,g.closeTo,!0).to.be.closeTo(t,n)};g.approximately=function(e,t,n,r){new b(e,r,g.approximately,!0).to.be.approximately(t,n)};g.sameMembers=function(e,t,n){new b(e,n,g.sameMembers,!0).to.have.same.members(t)};g.notSameMembers=function(e,t,n){new b(e,n,g.notSameMembers,!0).to.not.have.same.members(t)};g.sameDeepMembers=function(e,t,n){new b(e,n,g.sameDeepMembers,!0).to.have.same.deep.members(t)};g.notSameDeepMembers=function(e,t,n){new b(e,n,g.notSameDeepMembers,!0).to.not.have.same.deep.members(t)};g.sameOrderedMembers=function(e,t,n){new b(e,n,g.sameOrderedMembers,!0).to.have.same.ordered.members(t)};g.notSameOrderedMembers=function(e,t,n){new b(e,n,g.notSameOrderedMembers,!0).to.not.have.same.ordered.members(t)};g.sameDeepOrderedMembers=function(e,t,n){new b(e,n,g.sameDeepOrderedMembers,!0).to.have.same.deep.ordered.members(t)};g.notSameDeepOrderedMembers=function(e,t,n){new b(e,n,g.notSameDeepOrderedMembers,!0).to.not.have.same.deep.ordered.members(t)};g.includeMembers=function(e,t,n){new b(e,n,g.includeMembers,!0).to.include.members(t)};g.notIncludeMembers=function(e,t,n){new b(e,n,g.notIncludeMembers,!0).to.not.include.members(t)};g.includeDeepMembers=function(e,t,n){new b(e,n,g.includeDeepMembers,!0).to.include.deep.members(t)};g.notIncludeDeepMembers=function(e,t,n){new b(e,n,g.notIncludeDeepMembers,!0).to.not.include.deep.members(t)};g.includeOrderedMembers=function(e,t,n){new b(e,n,g.includeOrderedMembers,!0).to.include.ordered.members(t)};g.notIncludeOrderedMembers=function(e,t,n){new b(e,n,g.notIncludeOrderedMembers,!0).to.not.include.ordered.members(t)};g.includeDeepOrderedMembers=function(e,t,n){new b(e,n,g.includeDeepOrderedMembers,!0).to.include.deep.ordered.members(t)};g.notIncludeDeepOrderedMembers=function(e,t,n){new b(e,n,g.notIncludeDeepOrderedMembers,!0).to.not.include.deep.ordered.members(t)};g.oneOf=function(e,t,n){new b(e,n,g.oneOf,!0).to.be.oneOf(t)};g.isIterable=function(e,t){if(e==null||!e[Symbol.iterator])throw t=t?`${t} expected ${ne(e)} to be an iterable`:`expected ${ne(e)} to be an iterable`,new re(t,void 0,g.isIterable)};g.changes=function(e,t,n,r){arguments.length===3&&typeof t=="function"&&(r=n,n=null),new b(e,r,g.changes,!0).to.change(t,n)};g.changesBy=function(e,t,n,r,i){if(arguments.length===4&&typeof t=="function"){let o=r;r=n,i=o}else arguments.length===3&&(r=n,n=null);new b(e,i,g.changesBy,!0).to.change(t,n).by(r)};g.doesNotChange=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new b(e,r,g.doesNotChange,!0).to.not.change(t,n)};g.changesButNotBy=function(e,t,n,r,i){if(arguments.length===4&&typeof t=="function"){let o=r;r=n,i=o}else arguments.length===3&&(r=n,n=null);new b(e,i,g.changesButNotBy,!0).to.change(t,n).but.not.by(r)};g.increases=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new b(e,r,g.increases,!0).to.increase(t,n)};g.increasesBy=function(e,t,n,r,i){if(arguments.length===4&&typeof t=="function"){let o=r;r=n,i=o}else arguments.length===3&&(r=n,n=null);new b(e,i,g.increasesBy,!0).to.increase(t,n).by(r)};g.doesNotIncrease=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new b(e,r,g.doesNotIncrease,!0).to.not.increase(t,n)};g.increasesButNotBy=function(e,t,n,r,i){if(arguments.length===4&&typeof t=="function"){let o=r;r=n,i=o}else arguments.length===3&&(r=n,n=null);new b(e,i,g.increasesButNotBy,!0).to.increase(t,n).but.not.by(r)};g.decreases=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new b(e,r,g.decreases,!0).to.decrease(t,n)};g.decreasesBy=function(e,t,n,r,i){if(arguments.length===4&&typeof t=="function"){let o=r;r=n,i=o}else arguments.length===3&&(r=n,n=null);new b(e,i,g.decreasesBy,!0).to.decrease(t,n).by(r)};g.doesNotDecrease=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new b(e,r,g.doesNotDecrease,!0).to.not.decrease(t,n)};g.doesNotDecreaseBy=function(e,t,n,r,i){if(arguments.length===4&&typeof t=="function"){let o=r;r=n,i=o}else arguments.length===3&&(r=n,n=null);return new b(e,i,g.doesNotDecreaseBy,!0).to.not.decrease(t,n).by(r)};g.decreasesButNotBy=function(e,t,n,r,i){if(arguments.length===4&&typeof t=="function"){let o=r;r=n,i=o}else arguments.length===3&&(r=n,n=null);new b(e,i,g.decreasesButNotBy,!0).to.decrease(t,n).but.not.by(r)};g.ifError=function(e){if(e)throw e};g.isExtensible=function(e,t){new b(e,t,g.isExtensible,!0).to.be.extensible};g.isNotExtensible=function(e,t){new b(e,t,g.isNotExtensible,!0).to.not.be.extensible};g.isSealed=function(e,t){new b(e,t,g.isSealed,!0).to.be.sealed};g.isNotSealed=function(e,t){new b(e,t,g.isNotSealed,!0).to.not.be.sealed};g.isFrozen=function(e,t){new b(e,t,g.isFrozen,!0).to.be.frozen};g.isNotFrozen=function(e,t){new b(e,t,g.isNotFrozen,!0).to.not.be.frozen};g.isEmpty=function(e,t){new b(e,t,g.isEmpty,!0).to.be.empty};g.isNotEmpty=function(e,t){new b(e,t,g.isNotEmpty,!0).to.not.be.empty};g.containsSubset=function(e,t,n){new b(e,n).to.containSubset(t)};g.doesNotContainSubset=function(e,t,n){new b(e,n).to.not.containSubset(t)};var k3=[["isOk","ok"],["isNotOk","notOk"],["throws","throw"],["throws","Throw"],["isExtensible","extensible"],["isNotExtensible","notExtensible"],["isSealed","sealed"],["isNotSealed","notSealed"],["isFrozen","frozen"],["isNotFrozen","notFrozen"],["isEmpty","empty"],["isNotEmpty","notEmpty"],["isCallable","isFunction"],["isNotCallable","isNotFunction"],["containsSubset","containSubset"]];for(const[e,t]of k3)g[t]=g[e];var Cd=[];function yn(e){const t={use:yn,AssertionError:re,util:me,config:Qe,expect:An,assert:g,Assertion:b,...nb};return~Cd.indexOf(e)||(e(t,me),Cd.push(e)),t}v(yn,"use");const C3=(e,t)=>{function n(o,s){t.addProperty(e.Assertion.prototype,o,function(){const c=e.Assertion.prototype[s];if(!c)throw new Error(`Cannot delegate to ${String(s)}: method not found. Ensure JestChaiExpect plugin is loaded first.`);return c.call(this)})}function r(o,s,...c){t.addProperty(e.Assertion.prototype,o,function(){const a=e.Assertion.prototype[s];if(!a)throw new Error(`Cannot delegate to ${String(s)}: method not found. Ensure JestChaiExpect plugin is loaded first.`);return a.call(this,...c)})}function i(o,s){t.addMethod(e.Assertion.prototype,o,function(...c){const a=e.Assertion.prototype[s];if(!a)throw new Error(`Cannot delegate to ${String(s)}: method not found. Ensure JestChaiExpect plugin is loaded first.`);return a.call(this,...c)})}n("called","toHaveBeenCalled"),n("calledOnce","toHaveBeenCalledOnce"),r("calledTwice","toHaveBeenCalledTimes",2),r("calledThrice","toHaveBeenCalledTimes",3),i("callCount","toHaveBeenCalledTimes"),i("calledWith","toHaveBeenCalledWith"),i("calledOnceWith","toHaveBeenCalledExactlyOnceWith"),i("lastCalledWith","toHaveBeenLastCalledWith"),i("nthCalledWith","toHaveBeenNthCalledWith"),i("returned","toHaveReturned"),i("returnedWith","toHaveReturnedWith"),i("returnedTimes","toHaveReturnedTimes"),i("lastReturnedWith","toHaveLastReturnedWith"),i("nthReturnedWith","toHaveNthReturnedWith"),i("calledBefore","toHaveBeenCalledBefore"),i("calledAfter","toHaveBeenCalledAfter")},eo=Symbol.for("matchers-object"),Xr=Symbol.for("$$jest-matchers-object"),Ro=Symbol.for("expect-global"),Ju=Symbol.for("asymmetric-matchers-object"),_3={toSatisfy(e,t,n){const{printReceived:r,printExpected:i,matcherHint:o}=this.utils,s=t(e);return{pass:s,message:()=>s?`${o(".not.toSatisfy","received","")}
|
|
121
|
+
`);return e}function I1(){return typeof process<"u"&&!!process.send}function k3(e,t=!1){const n=[/\/vitest\/dist\//,/vitest-virtual-\w+\/dist/,/@vitest\/dist/,...t?[]:[/^mock:/]];e.idToModuleMap.forEach((r,i)=>{n.some(o=>o.test(i))||(r.promise=void 0,r.exports=void 0,r.evaluated=!1,r.importers.clear())})}function I3(){const{setTimeout:e}=ir();return new Promise(t=>e(t,0))}async function C1(){await I3();const e=Hr(),t=[],n=e.resolvingModules.size;for(const[r,i]of e.evaluatedModules.idToModuleMap)i.promise&&!i.evaluated&&t.push(i.promise);!t.length&&!n||(await Promise.allSettled(t),await C1())}function An(e){return typeof e=="function"&&"_isMockFunction"in e&&e._isMockFunction===!0}const Da=new Set,yu=new Set,_1=new WeakMap;function bu(e={}){var l;const{originalImplementation:t,restore:n,mockImplementation:r,resetToMockImplementation:i,resetToMockName:o}=e;n&&Da.add(n);const s=U3(t),c=V3(),a=M3({config:s,state:c,...e}),u=((l=r||t)==null?void 0:l.length)??0;return Object.defineProperty(a,"length",{writable:!0,enumerable:!1,value:u,configurable:!0}),o&&(s.mockName=a.name||"vi.fn()"),_1.set(a,s),yu.add(a),a._isMockFunction=!0,a.getMockImplementation=()=>s.onceMockImplementations[0]||s.mockImplementation,Object.defineProperty(a,"mock",{configurable:!1,enumerable:!0,writable:!1,value:c}),a.mockImplementation=function(h){return s.mockImplementation=h,a},a.mockImplementationOnce=function(h){return s.onceMockImplementations.push(h),a},a.withImplementation=function(h,d){const m=s.mockImplementation,p=s.onceMockImplementations,y=()=>{s.mockImplementation=m,s.onceMockImplementations=p};s.mockImplementation=h,s.onceMockImplementations=[];const x=d();return typeof x=="object"&&typeof(x==null?void 0:x.then)=="function"?x.then(()=>(y(),a)):(y(),a)},a.mockReturnThis=function(){return a.mockImplementation(function(){return this})},a.mockReturnValue=function(h){return a.mockImplementation(function(){return new.target&&Dn("mockReturnValue"),h})},a.mockReturnValueOnce=function(h){return a.mockImplementationOnce(function(){return new.target&&Dn("mockReturnValueOnce"),h})},a.mockThrow=function(h){return a.mockImplementation(function(){throw h})},a.mockThrowOnce=function(h){return a.mockImplementationOnce(function(){throw h})},a.mockResolvedValue=function(h){return a.mockImplementation(function(){return new.target&&Dn("mockResolvedValue"),Promise.resolve(h)})},a.mockResolvedValueOnce=function(h){return a.mockImplementationOnce(function(){return new.target&&Dn("mockResolvedValueOnce"),Promise.resolve(h)})},a.mockRejectedValue=function(h){return a.mockImplementation(function(){return new.target&&Dn("mockRejectedValue"),Promise.reject(h)})},a.mockRejectedValueOnce=function(h){return a.mockImplementationOnce(function(){return new.target&&Dn("mockRejectedValueOnce"),Promise.reject(h)})},a.mockClear=function(){return c.calls=[],c.contexts=[],c.instances=[],c.invocationCallOrder=[],c.results=[],c.settledResults=[],a},a.mockReset=function(){return a.mockClear(),s.mockImplementation=i?r:void 0,s.mockName=o&&a.name||"vi.fn()",s.onceMockImplementations=[],a},a.mockRestore=function(){return a.mockReset(),n==null?void 0:n()},a.mockName=function(h){return typeof h=="string"&&(s.mockName=h),a},a.getMockName=function(){return s.mockName||"vi.fn()"},Symbol.dispose&&(a[Symbol.dispose]=()=>a.mockRestore()),r&&a.mockImplementation(r),a}function C3(e){return e!=null&&An(e)?e:bu({mockImplementation:e,resetToMockImplementation:!0})}function _3(e,t,n){Si(e!=null,"The vi.spyOn() function could not find an object to spy upon. The first argument must be defined."),Si(typeof e=="object"||typeof e=="function","Vitest cannot spy on a primitive value.");const[r,i]=$1(e,t)||[];Si(i||t in e,`The property "${String(t)}" is not defined on the ${typeof e}.`);let o=n||"value",s=!1;o==="value"&&i&&i.value==null&&i.get&&(o="get",s=!0);let c;i?(c=i[o],c==null&&o==="value"&&(c=e[t])):o!=="value"?c=()=>e[t]:c=e[t];const a=s&&c?c():c,u=typeof a;if(Si(u==="function"||o!=="value"&&c==null,`vi.spyOn() can only spy on a function. Received ${u}.`),An(a))return a;const l=d=>{const{value:m,...p}=i||{configurable:!0,writable:!0};o!=="value"&&delete p.writable,p[o]=d,Object.defineProperty(e,t,p)},h=bu({restore:()=>{r!==e?Reflect.deleteProperty(e,t):i&&!c?Object.defineProperty(e,t,i):l(c)},originalImplementation:a,resetToMockName:!0});try{l(s?()=>h:h)}catch(d){throw d instanceof TypeError&&Symbol.toStringTag&&e[Symbol.toStringTag]==="Module"&&(d.message.includes("Cannot redefine property")||d.message.includes("Cannot replace module namespace")||d.message.includes("can't redefine non-configurable property"))?new TypeError(`Cannot spy on export "${String(t)}". Module namespace is not configurable in ESM. See: https://vitest.dev/guide/browser/#limitations`,{cause:d}):d}return h}function $1(e,t){const n=Object.getOwnPropertyDescriptor(e,t);if(n)return[e,n];let r=Object.getPrototypeOf(e);for(;r!==null;){const i=Object.getOwnPropertyDescriptor(r,t);if(i)return[r,i];r=Object.getPrototypeOf(r)}}function Si(e,t){if(!e)throw new Error(t)}let $3=1;function M3({state:e,config:t,name:n,prototypeState:r,prototypeConfig:i,keepMembersImplementation:o,mockImplementation:s,prototypeMembers:c=[]}){const a=t.mockOriginal,u=s,l=n||(a==null?void 0:a.name)||"Mock",f={[l]:(function(...m){O3(m,e,r),P3($3++,e,r);const p={type:"incomplete",value:void 0},y={type:"incomplete",value:void 0};N3(p,e,r),j3(y,e,r);const x=new.target?void 0:this,[E,$]=F3(x,e,r),[I,_]=R3(x,e,r),M=t.onceMockImplementations.shift()||t.mockImplementation||(i==null?void 0:i.onceMockImplementations.shift())||(i==null?void 0:i.mockImplementation)||a||function(){};let C,z,le=!1;try{if(new.target){C=Reflect.construct(M,m,new.target);for(const B of c){const X=C[B];if(X!==h.prototype[B])continue;const ie=An(X),Ae=ie?X.mock:void 0,ye=ie?_1.get(X):void 0;C[B]=bu({originalImplementation:o?ye==null?void 0:ye.mockOriginal:void 0,prototypeState:Ae,prototypeConfig:ye,keepMembersImplementation:o})}}else C=M.apply(this,m)}catch(B){throw z=B,le=!0,B instanceof TypeError&&B.message.includes("is not a constructor")&&console.warn(`[vitest] The ${f[l].getMockName()} mock did not use 'function' or 'class' in its implementation, see https://vitest.dev/api/vi#vi-spyon for examples.`),B}finally{le?(p.type="throw",p.value=z,y.type="rejected",y.value=z):(p.type="return",p.value=C,new.target&&(e.contexts[I-1]=C,e.instances[E-1]=C,_!=null&&r&&(r.contexts[_-1]=C),$!=null&&r&&(r.instances[$-1]=C)),C instanceof Promise?C.then(B=>{y.type="fulfilled",y.value=B},B=>{y.type="rejected",y.value=B}):(y.type="fulfilled",y.value=C))}return C})},h=f[l],d=a||u;return d&&L3(h,d),h}function O3(e,t,n){t.calls.push(e),n==null||n.calls.push(e)}function P3(e,t,n){t.invocationCallOrder.push(e),n==null||n.invocationCallOrder.push(e)}function N3(e,t,n){t.results.push(e),n==null||n.results.push(e)}function j3(e,t,n){t.settledResults.push(e),n==null||n.settledResults.push(e)}function F3(e,t,n){const r=t.instances.push(e),i=n==null?void 0:n.instances.push(e);return[r,i]}function R3(e,t,n){const r=t.contexts.push(e),i=n==null?void 0:n.contexts.push(e);return[r,i]}function L3(e,t){const{properties:n,descriptors:r}=B3(t);for(const i of n){const o=r[i];$1(e,i)||Object.defineProperty(e,i,o)}}const D3=new Set(["length","name","prototype",Symbol.for("nodejs.util.promisify.custom")]);function B3(e){const t=new Set,n={};for(;e&&e!==Object.prototype&&e!==Function.prototype;){const r=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const i of r)n[i]||D3.has(i)||(t.add(i),n[i]=Object.getOwnPropertyDescriptor(e,i));e=Object.getPrototypeOf(e)}return{properties:t,descriptors:n}}function U3(e){return{mockImplementation:void 0,mockOriginal:e,mockName:"vi.fn()",onceMockImplementations:[]}}function V3(){const e={calls:[],contexts:[],instances:[],invocationCallOrder:[],settledResults:[],results:[],get lastCall(){return e.calls.at(-1)}};return e}function q3(){for(const e of Da)e();Da.clear()}function W3(){yu.forEach(e=>e.mockClear())}function z3(){yu.forEach(e=>e.mockReset())}function Dn(e){throw new TypeError(`Cannot use \`${e}\` when called with \`new\`. Use \`mockImplementation\` with a \`class\` keyword instead. See https://vitest.dev/api/mock#class-support for more information.`)}var wu=Object.defineProperty,G3=(e,t,n)=>t in e?wu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,v=(e,t)=>wu(e,"name",{value:t,configurable:!0}),xu=(e,t)=>{for(var n in t)wu(e,n,{get:t[n],enumerable:!0})},M1=(e,t,n)=>G3(e,typeof t!="symbol"?t+"":t,n),me={};xu(me,{addChainableMethod:()=>Pu,addLengthGuard:()=>Xr,addMethod:()=>$u,addProperty:()=>_u,checkError:()=>dt,compareByInspect:()=>to,eql:()=>sb,events:()=>No,expectTypes:()=>B1,flag:()=>Y,getActual:()=>Oo,getMessage:()=>Tu,getName:()=>jo,getOperator:()=>Ru,getOwnEnumerableProperties:()=>Fu,getOwnEnumerablePropertySymbols:()=>ju,getPathInfo:()=>Iu,hasProperty:()=>Po,inspect:()=>ne,isNaN:()=>no,isNumeric:()=>Ve,isProxyEnabled:()=>Jr,isRegExp:()=>ro,objDisplay:()=>kn,overwriteChainableMethod:()=>Nu,overwriteMethod:()=>Ou,overwriteProperty:()=>Mu,proxify:()=>or,test:()=>Su,transferFlags:()=>$t,type:()=>ge});var dt={};xu(dt,{compatibleConstructor:()=>N1,compatibleInstance:()=>P1,compatibleMessage:()=>j1,getConstructorName:()=>F1,getMessage:()=>R1});function Mo(e){return e instanceof Error||Object.prototype.toString.call(e)==="[object Error]"}v(Mo,"isErrorInstance");function O1(e){return Object.prototype.toString.call(e)==="[object RegExp]"}v(O1,"isRegExp");function P1(e,t){return Mo(t)&&e===t}v(P1,"compatibleInstance");function N1(e,t){return Mo(t)?e.constructor===t.constructor||e instanceof t.constructor:(typeof t=="object"||typeof t=="function")&&t.prototype?e.constructor===t||e instanceof t:!1}v(N1,"compatibleConstructor");function j1(e,t){const n=typeof e=="string"?e:e.message;return n===void 0?!1:O1(t)?t.test(n):typeof t=="string"?n.indexOf(t)!==-1:!1}v(j1,"compatibleMessage");function F1(e){let t=e;return Mo(e)?t=e.constructor.name:typeof e=="function"&&(t=e.name,t===""&&(t=new e().name||t)),t}v(F1,"getConstructorName");function R1(e){let t="";return e&&e.message?t=e.message:typeof e=="string"&&(t=e),t}v(R1,"getMessage");function Y(e,t,n){let r=e.__flags||(e.__flags=Object.create(null));if(arguments.length===3)r[t]=n;else return r[t]}v(Y,"flag");function Su(e,t){let n=Y(e,"negate"),r=t[0];return n?!r:r}v(Su,"test");function ge(e){if(typeof e>"u")return"undefined";if(e===null)return"null";const t=e[Symbol.toStringTag];return typeof t=="string"?t:Object.prototype.toString.call(e).slice(8,-1)}v(ge,"type");var K3="captureStackTrace"in Error,L1=class D1 extends Error{constructor(t="Unspecified AssertionError",n,r){super(t),M1(this,"message"),this.message=t,K3&&Error.captureStackTrace(this,r||D1);for(const i in n)i in this||(this[i]=n[i])}get name(){return"AssertionError"}get ok(){return!1}toJSON(t){return{...this,name:this.name,message:this.message,ok:!1,stack:t!==!1?this.stack:void 0}}};v(L1,"AssertionError");var re=L1;function B1(e,t){let n=Y(e,"message"),r=Y(e,"ssfi");n=n?n+": ":"",e=Y(e,"object"),t=t.map(function(s){return s.toLowerCase()}),t.sort();let i=t.map(function(s,c){let a=~["a","e","i","o","u"].indexOf(s.charAt(0))?"an":"a";return(t.length>1&&c===t.length-1?"or ":"")+a+" "+s}).join(", "),o=ge(e).toLowerCase();if(!t.some(function(s){return o===s}))throw new re(n+"object tested must be "+i+", but "+o+" given",void 0,r)}v(B1,"expectTypes");function Oo(e,t){return t.length>4?t[4]:e._obj}v(Oo,"getActual");var _d={bold:["1","22"],dim:["2","22"],italic:["3","23"],underline:["4","24"],inverse:["7","27"],hidden:["8","28"],strike:["9","29"],black:["30","39"],red:["31","39"],green:["32","39"],yellow:["33","39"],blue:["34","39"],magenta:["35","39"],cyan:["36","39"],white:["37","39"],brightblack:["30;1","39"],brightred:["31;1","39"],brightgreen:["32;1","39"],brightyellow:["33;1","39"],brightblue:["34;1","39"],brightmagenta:["35;1","39"],brightcyan:["36;1","39"],brightwhite:["37;1","39"],grey:["90","39"]},H3={special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:"red"},Qn="…";function U1(e,t){const n=_d[H3[t]]||_d[t]||"";return n?`\x1B[${n[0]}m${String(e)}\x1B[${n[1]}m`:String(e)}v(U1,"colorise");function V1({showHidden:e=!1,depth:t=2,colors:n=!1,customInspect:r=!0,showProxy:i=!1,maxArrayLength:o=1/0,breakLength:s=1/0,seen:c=[],truncate:a=1/0,stylize:u=String}={},l){const f={showHidden:!!e,depth:Number(t),colors:!!n,customInspect:!!r,showProxy:!!i,maxArrayLength:Number(o),breakLength:Number(s),truncate:Number(a),seen:c,inspect:l,stylize:u};return f.colors&&(f.stylize=U1),f}v(V1,"normaliseOptions");function q1(e){return e>="\uD800"&&e<="\uDBFF"}v(q1,"isHighSurrogate");function on(e,t,n=Qn){e=String(e);const r=n.length,i=e.length;if(r>t&&i>r)return n;if(i>t&&i>r){let o=t-r;return o>0&&q1(e[o-1])&&(o=o-1),`${e.slice(0,o)}${n}`}return e}v(on,"truncate");function Et(e,t,n,r=", "){n=n||t.inspect;const i=e.length;if(i===0)return"";const o=t.truncate;let s="",c="",a="";for(let u=0;u<i;u+=1){const l=u+1===e.length,f=u+2===e.length;a=`${Qn}(${e.length-u})`;const h=e[u];t.truncate=o-s.length-(l?0:r.length);const d=c||n(h,t)+(l?"":r),m=s.length+d.length,p=m+a.length;if(l&&m>o&&s.length+a.length<=o||!l&&!f&&p>o||(c=l?"":n(e[u+1],t)+(f?"":r),!l&&f&&p>o&&m+c.length>o))break;if(s+=d,!l&&!f&&m+c.length>=o){a=`${Qn}(${e.length-u-1})`;break}a=""}return`${s}${a}`}v(Et,"inspectList");function W1(e){return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?e:JSON.stringify(e).replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'")}v(W1,"quoteComplexKey");function er([e,t],n){return n.truncate-=2,typeof e=="string"?e=W1(e):typeof e!="number"&&(e=`[${n.inspect(e,n)}]`),n.truncate-=e.length,t=n.inspect(t,n),`${e}: ${t}`}v(er,"inspectProperty");function z1(e,t){const n=Object.keys(e).slice(e.length);if(!e.length&&!n.length)return"[]";t.truncate-=4;const r=Et(e,t);t.truncate-=r.length;let i="";return n.length&&(i=Et(n.map(o=>[o,e[o]]),t,er)),`[ ${r}${i?`, ${i}`:""} ]`}v(z1,"inspectArray");var Y3=v(e=>typeof Buffer=="function"&&e instanceof Buffer?"Buffer":e[Symbol.toStringTag]?e[Symbol.toStringTag]:e.constructor.name,"getArrayName");function Rt(e,t){const n=Y3(e);t.truncate-=n.length+4;const r=Object.keys(e).slice(e.length);if(!e.length&&!r.length)return`${n}[]`;let i="";for(let s=0;s<e.length;s++){const c=`${t.stylize(on(e[s],t.truncate),"number")}${s===e.length-1?"":", "}`;if(t.truncate-=c.length,e[s]!==e.length&&t.truncate<=3){i+=`${Qn}(${e.length-e[s]+1})`;break}i+=c}let o="";return r.length&&(o=Et(r.map(s=>[s,e[s]]),t,er)),`${n}[ ${i}${o?`, ${o}`:""} ]`}v(Rt,"inspectTypedArray");function G1(e,t){const n=e.toJSON();if(n===null)return"Invalid Date";const r=n.split("T"),i=r[0];return t.stylize(`${i}T${on(r[1],t.truncate-i.length-1)}`,"date")}v(G1,"inspectDate");function Ba(e,t){const n=e[Symbol.toStringTag]||"Function",r=e.name;return r?t.stylize(`[${n} ${on(r,t.truncate-11)}]`,"special"):t.stylize(`[${n}]`,"special")}v(Ba,"inspectFunction");function K1([e,t],n){return n.truncate-=4,e=n.inspect(e,n),n.truncate-=e.length,t=n.inspect(t,n),`${e} => ${t}`}v(K1,"inspectMapEntry");function H1(e){const t=[];return e.forEach((n,r)=>{t.push([r,n])}),t}v(H1,"mapToEntries");function Y1(e,t){return e.size===0?"Map{}":(t.truncate-=7,`Map{ ${Et(H1(e),t,K1)} }`)}v(Y1,"inspectMap");var J3=Number.isNaN||(e=>e!==e);function Ua(e,t){return J3(e)?t.stylize("NaN","number"):e===1/0?t.stylize("Infinity","number"):e===-1/0?t.stylize("-Infinity","number"):e===0?t.stylize(1/e===1/0?"+0":"-0","number"):t.stylize(on(String(e),t.truncate),"number")}v(Ua,"inspectNumber");function Va(e,t){let n=on(e.toString(),t.truncate-1);return n!==Qn&&(n+="n"),t.stylize(n,"bigint")}v(Va,"inspectBigInt");function J1(e,t){const n=e.toString().split("/")[2],r=t.truncate-(2+n.length),i=e.source;return t.stylize(`/${on(i,r)}/${n}`,"regexp")}v(J1,"inspectRegExp");function X1(e){const t=[];return e.forEach(n=>{t.push(n)}),t}v(X1,"arrayFromSet");function Z1(e,t){return e.size===0?"Set{}":(t.truncate-=7,`Set{ ${Et(X1(e),t)} }`)}v(Z1,"inspectSet");var $d=new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]","g"),X3={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","'":"\\'","\\":"\\\\"},Z3=16;function Q1(e){return X3[e]||`\\u${`0000${e.charCodeAt(0).toString(Z3)}`.slice(-4)}`}v(Q1,"escape");function qa(e,t){return $d.test(e)&&(e=e.replace($d,Q1)),t.stylize(`'${on(e,t.truncate-2)}'`,"string")}v(qa,"inspectString");function Wa(e){return"description"in Symbol.prototype?e.description?`Symbol(${e.description})`:"Symbol()":e.toString()}v(Wa,"inspectSymbol");var Q3=v(()=>"Promise{…}","getPromiseValue"),eC=Q3;function Er(e,t){const n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[];if(n.length===0&&r.length===0)return"{}";if(t.truncate-=4,t.seen=t.seen||[],t.seen.includes(e))return"[Circular]";t.seen.push(e);const i=Et(n.map(c=>[c,e[c]]),t,er),o=Et(r.map(c=>[c,e[c]]),t,er);t.seen.pop();let s="";return i&&o&&(s=", "),`{ ${i}${s}${o} }`}v(Er,"inspectObject");var Fs=typeof Symbol<"u"&&Symbol.toStringTag?Symbol.toStringTag:!1;function eb(e,t){let n="";return Fs&&Fs in e&&(n=e[Fs]),n=n||e.constructor.name,(!n||n==="_class")&&(n="<Anonymous Class>"),t.truncate-=n.length,`${n}${Er(e,t)}`}v(eb,"inspectClass");function tb(e,t){return e.length===0?"Arguments[]":(t.truncate-=13,`Arguments[ ${Et(e,t)} ]`)}v(tb,"inspectArguments");var tC=["stack","line","column","name","message","fileName","lineNumber","columnNumber","number","description","cause"];function nb(e,t){const n=Object.getOwnPropertyNames(e).filter(s=>tC.indexOf(s)===-1),r=e.name;t.truncate-=r.length;let i="";if(typeof e.message=="string"?i=on(e.message,t.truncate):n.unshift("message"),i=i?`: ${i}`:"",t.truncate-=i.length+5,t.seen=t.seen||[],t.seen.includes(e))return"[Circular]";t.seen.push(e);const o=Et(n.map(s=>[s,e[s]]),t,er);return`${r}${i}${o?` { ${o} }`:""}`}v(nb,"inspectObject");function rb([e,t],n){return n.truncate-=3,t?`${n.stylize(String(e),"yellow")}=${n.stylize(`"${t}"`,"string")}`:`${n.stylize(String(e),"yellow")}`}v(rb,"inspectAttribute");function Qi(e,t){return Et(e,t,ib,`
|
|
122
|
+
`)}v(Qi,"inspectNodeCollection");function ib(e,t){switch(e.nodeType){case 1:return Eu(e,t);case 3:return t.inspect(e.data,t);default:return t.inspect(e,t)}}v(ib,"inspectNode");function Eu(e,t){const n=e.getAttributeNames(),r=e.tagName.toLowerCase(),i=t.stylize(`<${r}`,"special"),o=t.stylize(">","special"),s=t.stylize(`</${r}>`,"special");t.truncate-=r.length*2+5;let c="";n.length>0&&(c+=" ",c+=Et(n.map(l=>[l,e.getAttribute(l)]),t,rb," ")),t.truncate-=c.length;const a=t.truncate;let u=Qi(e.children,t);return u&&u.length>a&&(u=`${Qn}(${e.children.length})`),`${i}${c}${o}${u}${s}`}v(Eu,"inspectHTML");var nC=typeof Symbol=="function"&&typeof Symbol.for=="function",Rs=nC?Symbol.for("chai/inspect"):"@@chai/inspect",Ls=Symbol.for("nodejs.util.inspect.custom"),Md=new WeakMap,Od={},Pd={undefined:v((e,t)=>t.stylize("undefined","undefined"),"undefined"),null:v((e,t)=>t.stylize("null","null"),"null"),boolean:v((e,t)=>t.stylize(String(e),"boolean"),"boolean"),Boolean:v((e,t)=>t.stylize(String(e),"boolean"),"Boolean"),number:Ua,Number:Ua,bigint:Va,BigInt:Va,string:qa,String:qa,function:Ba,Function:Ba,symbol:Wa,Symbol:Wa,Array:z1,Date:G1,Map:Y1,Set:Z1,RegExp:J1,Promise:eC,WeakSet:v((e,t)=>t.stylize("WeakSet{…}","special"),"WeakSet"),WeakMap:v((e,t)=>t.stylize("WeakMap{…}","special"),"WeakMap"),Arguments:tb,Int8Array:Rt,Uint8Array:Rt,Uint8ClampedArray:Rt,Int16Array:Rt,Uint16Array:Rt,Int32Array:Rt,Uint32Array:Rt,Float32Array:Rt,Float64Array:Rt,Generator:v(()=>"","Generator"),DataView:v(()=>"","DataView"),ArrayBuffer:v(()=>"","ArrayBuffer"),Error:nb,HTMLCollection:Qi,NodeList:Qi},rC=v((e,t,n,r)=>Rs in e&&typeof e[Rs]=="function"?e[Rs](t):Ls in e&&typeof e[Ls]=="function"?e[Ls](t.depth,t,r):"inspect"in e&&typeof e.inspect=="function"?e.inspect(t.depth,t):"constructor"in e&&Md.has(e.constructor)?Md.get(e.constructor)(e,t):Od[n]?Od[n](e,t):"","inspectCustom"),iC=Object.prototype.toString;function Tr(e,t={}){const n=V1(t,Tr),{customInspect:r}=n;let i=e===null?"null":typeof e;if(i==="object"&&(i=iC.call(e).slice(8,-1)),i in Pd)return Pd[i](e,n);if(r&&e){const s=rC(e,n,i,Tr);if(s)return typeof s=="string"?s:Tr(s,n)}const o=e?Object.getPrototypeOf(e):!1;return o===Object.prototype||o===null?Er(e,n):e&&typeof HTMLElement=="function"&&e instanceof HTMLElement?Eu(e,n):"constructor"in e?e.constructor!==Object?eb(e,n):Er(e,n):e===Object(e)?Er(e,n):n.stylize(String(e),i)}v(Tr,"inspect");var tt={includeStack:!1,showDiff:!0,truncateThreshold:40,useProxy:!0,proxyExcludedKeys:["then","catch","inspect","toJSON"],deepEqual:null};function ne(e,t,n,r){let i={colors:r,depth:typeof n>"u"?2:n,showHidden:t,truncate:tt.truncateThreshold?tt.truncateThreshold:1/0};return Tr(e,i)}v(ne,"inspect");function kn(e){let t=ne(e),n=Object.prototype.toString.call(e);if(tt.truncateThreshold&&t.length>=tt.truncateThreshold)if(n==="[object Function]"){const r=e;return!r.name||r.name===""?"[Function]":"[Function: "+r.name+"]"}else{if(n==="[object Array]")return"[ Array("+e.length+") ]";if(n==="[object Object]"){let i=Object.keys(e);return"{ Object ("+(i.length>2?i.splice(0,2).join(", ")+", ...":i.join(", "))+") }"}else return t}else return t}v(kn,"objDisplay");function Tu(e,t){let n=Y(e,"negate"),r=Y(e,"object"),i=t[3],o=Oo(e,t),s=n?t[2]:t[1],c=Y(e,"message");typeof s=="function"&&(s=s());const u=(s||"").replace(/#\{(this|act|exp)\}/g,function(l,f){return kn(f==="this"?r:f==="act"?o:i)});return c?c+": "+u:u}v(Tu,"getMessage");function $t(e,t,n){const r=e,i=t;let o=r.__flags||(r.__flags=Object.create(null));const s=i.__flags||(i.__flags=Object.create(null));n=arguments.length===3?n:!0;for(let c in o)(n||c!=="object"&&c!=="ssfi"&&c!=="lockSsfi"&&c!="message")&&(s[c]=o[c])}v($t,"transferFlags");function za(e){if(typeof e>"u")return"undefined";if(e===null)return"null";const t=e[Symbol.toStringTag];return typeof t=="string"?t:Object.prototype.toString.call(e).slice(8,-1)}v(za,"type");function vu(){this._key="chai/deep-eql__"+Math.random()+Date.now()}v(vu,"FakeMap");vu.prototype={get:v(function(t){return t[this._key]},"get"),set:v(function(t,n){Object.isExtensible(t)&&Object.defineProperty(t,this._key,{value:n,configurable:!0})},"set")};var ob=typeof WeakMap=="function"?WeakMap:vu;function Ga(e,t,n){if(!n||$n(e)||$n(t))return null;var r=n.get(e);if(r){var i=r.get(t);if(typeof i=="boolean")return i}return null}v(Ga,"memoizeCompare");function xr(e,t,n,r){if(!(!n||$n(e)||$n(t))){var i=n.get(e);i?i.set(t,r):(i=new ob,i.set(t,r),n.set(e,i))}}v(xr,"memoizeSet");var sb=Yr;function Yr(e,t,n){if(n&&n.comparator)return Ka(e,t,n);var r=Au(e,t);return r!==null?r:Ka(e,t,n)}v(Yr,"deepEqual");function Au(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t?!0:$n(e)||$n(t)?!1:null}v(Au,"simpleEqual");function Ka(e,t,n){n=n||{},n.memoize=n.memoize===!1?!1:n.memoize||new ob;var r=n&&n.comparator,i=Ga(e,t,n.memoize);if(i!==null)return i;var o=Ga(t,e,n.memoize);if(o!==null)return o;if(r){var s=r(e,t);if(s===!1||s===!0)return xr(e,t,n.memoize,s),s;var c=Au(e,t);if(c!==null)return c}var a=za(e);if(a!==za(t))return xr(e,t,n.memoize,!1),!1;xr(e,t,n.memoize,!0);var u=ab(e,t,a,n);return xr(e,t,n.memoize,u),u}v(Ka,"extensiveDeepEqual");function ab(e,t,n,r){switch(n){case"String":case"Number":case"Boolean":case"Date":return Yr(e.valueOf(),t.valueOf());case"Promise":case"Symbol":case"function":case"WeakMap":case"WeakSet":return e===t;case"Error":return ku(e,t,["name","message","code"],r);case"Arguments":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"Array":return mn(e,t,r);case"RegExp":return cb(e,t);case"Generator":return ub(e,t,r);case"DataView":return mn(new Uint8Array(e.buffer),new Uint8Array(t.buffer),r);case"ArrayBuffer":return mn(new Uint8Array(e),new Uint8Array(t),r);case"Set":return Ha(e,t,r);case"Map":return Ha(e,t,r);case"Temporal.PlainDate":case"Temporal.PlainTime":case"Temporal.PlainDateTime":case"Temporal.Instant":case"Temporal.ZonedDateTime":case"Temporal.PlainYearMonth":case"Temporal.PlainMonthDay":return e.equals(t);case"Temporal.Duration":return e.total("nanoseconds")===t.total("nanoseconds");case"Temporal.TimeZone":case"Temporal.Calendar":return e.toString()===t.toString();default:return fb(e,t,r)}}v(ab,"extensiveDeepEqualByType");function cb(e,t){return e.toString()===t.toString()}v(cb,"regexpEqual");function Ha(e,t,n){try{if(e.size!==t.size)return!1;if(e.size===0)return!0}catch{return!1}var r=[],i=[];return e.forEach(v(function(s,c){r.push([s,c])},"gatherEntries")),t.forEach(v(function(s,c){i.push([s,c])},"gatherEntries")),mn(r.sort(),i.sort(),n)}v(Ha,"entriesEqual");function mn(e,t,n){var r=e.length;if(r!==t.length)return!1;if(r===0)return!0;for(var i=-1;++i<r;)if(Yr(e[i],t[i],n)===!1)return!1;return!0}v(mn,"iterableEqual");function ub(e,t,n){return mn(eo(e),eo(t),n)}v(ub,"generatorEqual");function lb(e){return typeof Symbol<"u"&&typeof e=="object"&&typeof Symbol.iterator<"u"&&typeof e[Symbol.iterator]=="function"}v(lb,"hasIteratorFunction");function Ya(e){if(lb(e))try{return eo(e[Symbol.iterator]())}catch{return[]}return[]}v(Ya,"getIteratorEntries");function eo(e){for(var t=e.next(),n=[t.value];t.done===!1;)t=e.next(),n.push(t.value);return n}v(eo,"getGeneratorEntries");function Ja(e){var t=[];for(var n in e)t.push(n);return t}v(Ja,"getEnumerableKeys");function Xa(e){for(var t=[],n=Object.getOwnPropertySymbols(e),r=0;r<n.length;r+=1){var i=n[r];Object.getOwnPropertyDescriptor(e,i).enumerable&&t.push(i)}return t}v(Xa,"getEnumerableSymbols");function ku(e,t,n,r){var i=n.length;if(i===0)return!0;for(var o=0;o<i;o+=1)if(Yr(e[n[o]],t[n[o]],r)===!1)return!1;return!0}v(ku,"keysEqual");function fb(e,t,n){var r=Ja(e),i=Ja(t),o=Xa(e),s=Xa(t);if(r=r.concat(o),i=i.concat(s),r.length&&r.length===i.length)return mn(Za(r).sort(),Za(i).sort())===!1?!1:ku(e,t,r,n);var c=Ya(e),a=Ya(t);return c.length&&c.length===a.length?(c.sort(),a.sort(),mn(c,a,n)):r.length===0&&c.length===0&&i.length===0&&a.length===0}v(fb,"objectEqual");function $n(e){return e===null||typeof e!="object"}v($n,"isPrimitive");function Za(e){return e.map(v(function(n){return typeof n=="symbol"?n.toString():n},"mapSymbol"))}v(Za,"mapSymbols");function Po(e,t){return typeof e>"u"||e===null?!1:t in Object(e)}v(Po,"hasProperty");function hb(e){return e.replace(/([^\\])\[/g,"$1.[").match(/(\\\.|[^.]+?)+/g).map(r=>{if(r==="constructor"||r==="__proto__"||r==="prototype")return{};const o=/^\[(\d+)\]$/.exec(r);let s=null;return o?s={i:parseFloat(o[1])}:s={p:r.replace(/\\([.[\]])/g,"$1")},s})}v(hb,"parsePath");function Qa(e,t,n){let r=e,i=null;n=typeof n>"u"?t.length:n;for(let o=0;o<n;o++){const s=t[o];r&&(typeof s.p>"u"?r=r[s.i]:r=r[s.p],o===n-1&&(i=r))}return i}v(Qa,"internalGetPathValue");function Iu(e,t){const n=hb(t),r=n[n.length-1],i={parent:n.length>1?Qa(e,n,n.length-1):e,name:r.p||r.i,value:Qa(e,n)};return i.exists=Po(i.parent,i.name),i}v(Iu,"getPathInfo");var db=class pb{constructor(t,n,r,i){return M1(this,"__flags",{}),Y(this,"ssfi",r||pb),Y(this,"lockSsfi",i),Y(this,"object",t),Y(this,"message",n),Y(this,"eql",tt.deepEqual||sb),or(this)}static get includeStack(){return console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),tt.includeStack}static set includeStack(t){console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),tt.includeStack=t}static get showDiff(){return console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),tt.showDiff}static set showDiff(t){console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),tt.showDiff=t}static addProperty(t,n){_u(this.prototype,t,n)}static addMethod(t,n){$u(this.prototype,t,n)}static addChainableMethod(t,n,r){Pu(this.prototype,t,n,r)}static overwriteProperty(t,n){Mu(this.prototype,t,n)}static overwriteMethod(t,n){Ou(this.prototype,t,n)}static overwriteChainableMethod(t,n,r){Nu(this.prototype,t,n,r)}assert(t,n,r,i,o,s){const c=Su(this,arguments);if(s!==!1&&(s=!0),i===void 0&&o===void 0&&(s=!1),tt.showDiff!==!0&&(s=!1),!c){n=Tu(this,arguments);const u={actual:Oo(this,arguments),expected:i,showDiff:s},l=Ru(this,arguments);throw l&&(u.operator=l),new re(n,u,tt.includeStack?this.assert:Y(this,"ssfi"))}}get _obj(){return Y(this,"object")}set _obj(t){Y(this,"object",t)}};v(db,"Assertion");var b=db,No=new EventTarget,mb=class extends Event{constructor(t,n,r){super(t),this.name=String(n),this.fn=r}};v(mb,"PluginEvent");var Cu=mb;function Jr(){return tt.useProxy&&typeof Proxy<"u"&&typeof Reflect<"u"}v(Jr,"isProxyEnabled");function _u(e,t,n){n=n===void 0?function(){}:n,Object.defineProperty(e,t,{get:v(function r(){!Jr()&&!Y(this,"lockSsfi")&&Y(this,"ssfi",r);let i=n.call(this);if(i!==void 0)return i;let o=new b;return $t(this,o),o},"propertyGetter"),configurable:!0}),No.dispatchEvent(new Cu("addProperty",t,n))}v(_u,"addProperty");var Ds=Object.getOwnPropertyDescriptor(function(){},"length");function Xr(e,t,n){return Ds!=null&&Ds.configurable&&Object.defineProperty(e,"length",{get:v(function(){throw Error(n?"Invalid Chai property: "+t+'.length. Due to a compatibility issue, "length" cannot directly follow "'+t+'". Use "'+t+'.lengthOf" instead.':"Invalid Chai property: "+t+'.length. See docs for proper usage of "'+t+'".')},"get")}),e}v(Xr,"addLengthGuard");function gb(e){let t=Object.getOwnPropertyNames(e);function n(i){t.indexOf(i)===-1&&t.push(i)}v(n,"addProperty");let r=Object.getPrototypeOf(e);for(;r!==null;)Object.getOwnPropertyNames(r).forEach(n),r=Object.getPrototypeOf(r);return t}v(gb,"getProperties");var Nd=["__flags","__methods","_obj","assert"];function or(e,t){return Jr()?new Proxy(e,{get:v(function n(r,i){if(typeof i=="string"&&tt.proxyExcludedKeys.indexOf(i)===-1&&!Reflect.has(r,i)){if(t)throw Error("Invalid Chai property: "+String(t)+"."+i+'. See docs for proper usage of "'+String(t)+'".');let o=null,s=4;throw gb(r).forEach(function(c){if(!Object.prototype.hasOwnProperty(c)&&Nd.indexOf(c)===-1){let a=yb(i,c,s);a<s&&(o=c,s=a)}}),Error(o!==null?"Invalid Chai property: "+i+'. Did you mean "'+o+'"?':"Invalid Chai property: "+i)}return Nd.indexOf(i)===-1&&!Y(r,"lockSsfi")&&Y(r,"ssfi",n),Reflect.get(r,i)},"proxyGetter")}):e}v(or,"proxify");function yb(e,t,n){if(Math.abs(e.length-t.length)>=n)return n;let r=[];for(let i=0;i<=e.length;i++)r[i]=Array(t.length+1).fill(0),r[i][0]=i;for(let i=0;i<t.length;i++)r[0][i]=i;for(let i=1;i<=e.length;i++){let o=e.charCodeAt(i-1);for(let s=1;s<=t.length;s++){if(Math.abs(i-s)>=n){r[i][s]=n;continue}r[i][s]=Math.min(r[i-1][s]+1,r[i][s-1]+1,r[i-1][s-1]+(o===t.charCodeAt(s-1)?0:1))}}return r[e.length][t.length]}v(yb,"stringDistanceCapped");function $u(e,t,n){let r=v(function(){Y(this,"lockSsfi")||Y(this,"ssfi",r);let i=n.apply(this,arguments);if(i!==void 0)return i;let o=new b;return $t(this,o),o},"methodWrapper");Xr(r,t,!1),e[t]=or(r,t),No.dispatchEvent(new Cu("addMethod",t,n))}v($u,"addMethod");function Mu(e,t,n){let r=Object.getOwnPropertyDescriptor(e,t),i=v(function(){},"_super");r&&typeof r.get=="function"&&(i=r.get),Object.defineProperty(e,t,{get:v(function o(){!Jr()&&!Y(this,"lockSsfi")&&Y(this,"ssfi",o);let s=Y(this,"lockSsfi");Y(this,"lockSsfi",!0);let c=n(i).call(this);if(Y(this,"lockSsfi",s),c!==void 0)return c;let a=new b;return $t(this,a),a},"overwritingPropertyGetter"),configurable:!0})}v(Mu,"overwriteProperty");function Ou(e,t,n){let r=e[t],i=v(function(){throw new Error(String(t)+" is not a function")},"_super");r&&typeof r=="function"&&(i=r);function o(){Y(this,"lockSsfi")||Y(this,"ssfi",o);let s=Y(this,"lockSsfi");Y(this,"lockSsfi",!0);let c=n(i).apply(this,arguments);if(Y(this,"lockSsfi",s),c!==void 0)return c;let a=new b;return $t(this,a),a}v(o,"overwritingMethodWrapper"),Xr(o,String(t),!1),e[t]=or(o,t)}v(Ou,"overwriteMethod");var oC=typeof Object.setPrototypeOf=="function",jd=v(function(){},"testFn"),sC=Object.getOwnPropertyNames(jd).filter(function(e){let t=Object.getOwnPropertyDescriptor(jd,e);return typeof t!="object"?!0:!t.configurable}),aC=Function.prototype.call,cC=Function.prototype.apply,bb=class extends Cu{constructor(t,n,r,i){super(t,n,r),this.chainingBehavior=i}};v(bb,"PluginAddChainableMethodEvent");var uC=bb;function Pu(e,t,n,r){const i=e;typeof r!="function"&&(r=v(function(){},"chainingBehavior"));let o={method:n,chainingBehavior:r};i.__methods||(i.__methods={}),i.__methods[t]=o,Object.defineProperty(e,t,{get:v(function(){o.chainingBehavior.call(this);function c(...a){Y(this,"lockSsfi")||Y(this,"ssfi",c);let u=o.method.apply(this,a);if(u!==void 0)return u;let l=new b;return $t(this,l),l}if(v(c,"chainableMethodWrapper"),Xr(c,t,!0),oC){let a=Object.create(this);a.call=aC,a.apply=cC,Object.setPrototypeOf(c,a)}else Object.getOwnPropertyNames(e).forEach(function(u){if(sC.indexOf(u)!==-1)return;let l=Object.getOwnPropertyDescriptor(e,u);l&&Object.defineProperty(c,u,l)});return $t(this,c),or(c)},"chainableMethodGetter"),configurable:!0}),No.dispatchEvent(new uC("addChainableMethod",t,n,r))}v(Pu,"addChainableMethod");function Nu(e,t,n,r){let i=e.__methods[t],o=i.chainingBehavior;i.chainingBehavior=v(function(){let a=r(o).call(this);if(a!==void 0)return a;let u=new b;return $t(this,u),u},"overwritingChainableMethodGetter");let s=i.method;i.method=v(function(){let a=n(s).apply(this,arguments);if(a!==void 0)return a;let u=new b;return $t(this,u),u},"overwritingChainableMethodWrapper")}v(Nu,"overwriteChainableMethod");function to(e,t){return ne(e)<ne(t)?-1:1}v(to,"compareByInspect");function ju(e){return typeof Object.getOwnPropertySymbols!="function"?[]:Object.getOwnPropertySymbols(e).filter(function(t){var n;return(n=Object.getOwnPropertyDescriptor(e,t))==null?void 0:n.enumerable})}v(ju,"getOwnEnumerablePropertySymbols");function Fu(e){return Object.keys(e).concat(ju(e))}v(Fu,"getOwnEnumerableProperties");var no=Number.isNaN;function wb(e){let t=ge(e);return["Array","Object","Function"].indexOf(t)!==-1}v(wb,"isObjectType");function Ru(e,t){let n=Y(e,"operator"),r=Y(e,"negate"),i=t[3],o=r?t[2]:t[1];if(n)return String(n);if(typeof o=="function"&&(o=o()),o=o||"",!o)return;const s=String(o);if(/\shave\s/.test(s))return;let c=wb(i);return/\snot\s/.test(s)?c?"notDeepStrictEqual":"notStrictEqual":c?"deepStrictEqual":"strictEqual"}v(Ru,"getOperator");function jo(e){return e.name}v(jo,"getName");function ro(e){return Object.prototype.toString.call(e)==="[object RegExp]"}v(ro,"isRegExp");function Ve(e){return["Number","BigInt"].includes(ge(e))}v(Ve,"isNumeric");var{flag:S}=me;["to","be","been","is","and","has","have","with","that","which","at","of","same","but","does","still","also"].forEach(function(e){b.addProperty(e)});b.addProperty("not",function(){S(this,"negate",!0)});b.addProperty("deep",function(){S(this,"deep",!0)});b.addProperty("nested",function(){S(this,"nested",!0)});b.addProperty("own",function(){S(this,"own",!0)});b.addProperty("ordered",function(){S(this,"ordered",!0)});b.addProperty("any",function(){S(this,"any",!0),S(this,"all",!1)});b.addProperty("all",function(){S(this,"all",!0),S(this,"any",!1)});var Fd={function:["function","asyncfunction","generatorfunction","asyncgeneratorfunction"],asyncfunction:["asyncfunction","asyncgeneratorfunction"],generatorfunction:["generatorfunction","asyncgeneratorfunction"],asyncgeneratorfunction:["asyncgeneratorfunction"]};function Lu(e,t){t&&S(this,"message",t),e=e.toLowerCase();let n=S(this,"object"),r=~["a","e","i","o","u"].indexOf(e.charAt(0))?"an ":"a ";const i=ge(n).toLowerCase();Fd.function.includes(e)?this.assert(Fd[e].includes(i),"expected #{this} to be "+r+e,"expected #{this} not to be "+r+e):this.assert(e===i,"expected #{this} to be "+r+e,"expected #{this} not to be "+r+e)}v(Lu,"an");b.addChainableMethod("an",Lu);b.addChainableMethod("a",Lu);function xb(e,t){return no(e)&&no(t)||e===t}v(xb,"SameValueZero");function Zr(){S(this,"contains",!0)}v(Zr,"includeChainingBehavior");function Qr(e,t){t&&S(this,"message",t);let n=S(this,"object"),r=ge(n).toLowerCase(),i=S(this,"message"),o=S(this,"negate"),s=S(this,"ssfi"),c=S(this,"deep"),a=c?"deep ":"",u=c?S(this,"eql"):xb;i=i?i+": ":"";let l=!1;switch(r){case"string":l=n.indexOf(e)!==-1;break;case"weakset":if(c)throw new re(i+"unable to use .deep.include with WeakSet",void 0,s);l=n.has(e);break;case"map":n.forEach(function(f){l=l||u(f,e)});break;case"set":c?n.forEach(function(f){l=l||u(f,e)}):l=n.has(e);break;case"array":c?l=n.some(function(f){return u(f,e)}):l=n.indexOf(e)!==-1;break;default:{if(e!==Object(e))throw new re(i+"the given combination of arguments ("+r+" and "+ge(e).toLowerCase()+") is invalid for this assertion. You can use an array, a map, an object, a set, a string, or a weakset instead of a "+ge(e).toLowerCase(),void 0,s);let f=Object.keys(e),h=null,d=0;if(f.forEach(function(m){let p=new b(n);if($t(this,p,!0),S(p,"lockSsfi",!0),!o||f.length===1){p.property(m,e[m]);return}try{p.property(m,e[m])}catch(y){if(!dt.compatibleConstructor(y,re))throw y;h===null&&(h=y),d++}},this),o&&f.length>1&&d===f.length)throw h;return}}this.assert(l,"expected #{this} to "+a+"include "+ne(e),"expected #{this} to not "+a+"include "+ne(e))}v(Qr,"include");b.addChainableMethod("include",Qr,Zr);b.addChainableMethod("contain",Qr,Zr);b.addChainableMethod("contains",Qr,Zr);b.addChainableMethod("includes",Qr,Zr);b.addProperty("ok",function(){this.assert(S(this,"object"),"expected #{this} to be truthy","expected #{this} to be falsy")});b.addProperty("true",function(){this.assert(S(this,"object")===!0,"expected #{this} to be true","expected #{this} to be false",!S(this,"negate"))});b.addProperty("numeric",function(){const e=S(this,"object");this.assert(["Number","BigInt"].includes(ge(e)),"expected #{this} to be numeric","expected #{this} to not be numeric",!S(this,"negate"))});b.addProperty("callable",function(){const e=S(this,"object"),t=S(this,"ssfi"),n=S(this,"message"),r=n?`${n}: `:"",i=S(this,"negate"),o=i?`${r}expected ${ne(e)} not to be a callable function`:`${r}expected ${ne(e)} to be a callable function`,s=["Function","AsyncFunction","GeneratorFunction","AsyncGeneratorFunction"].includes(ge(e));if(s&&i||!s&&!i)throw new re(o,void 0,t)});b.addProperty("false",function(){this.assert(S(this,"object")===!1,"expected #{this} to be false","expected #{this} to be true",!!S(this,"negate"))});b.addProperty("null",function(){this.assert(S(this,"object")===null,"expected #{this} to be null","expected #{this} not to be null")});b.addProperty("undefined",function(){this.assert(S(this,"object")===void 0,"expected #{this} to be undefined","expected #{this} not to be undefined")});b.addProperty("NaN",function(){this.assert(no(S(this,"object")),"expected #{this} to be NaN","expected #{this} not to be NaN")});function Du(){let e=S(this,"object");this.assert(e!=null,"expected #{this} to exist","expected #{this} to not exist")}v(Du,"assertExist");b.addProperty("exist",Du);b.addProperty("exists",Du);b.addProperty("empty",function(){let e=S(this,"object"),t=S(this,"ssfi"),n=S(this,"message"),r;switch(n=n?n+": ":"",ge(e).toLowerCase()){case"array":case"string":r=e.length;break;case"map":case"set":r=e.size;break;case"weakmap":case"weakset":throw new re(n+".empty was passed a weak collection",void 0,t);case"function":{const i=n+".empty was passed a function "+jo(e);throw new re(i.trim(),void 0,t)}default:if(e!==Object(e))throw new re(n+".empty was passed non-string primitive "+ne(e),void 0,t);r=Object.keys(e).length}this.assert(r===0,"expected #{this} to be empty","expected #{this} not to be empty")});function Bu(){let e=S(this,"object"),t=ge(e);this.assert(t==="Arguments","expected #{this} to be arguments but got "+t,"expected #{this} to not be arguments")}v(Bu,"checkArguments");b.addProperty("arguments",Bu);b.addProperty("Arguments",Bu);function Fo(e,t){t&&S(this,"message",t);let n=S(this,"object");if(S(this,"deep")){let r=S(this,"lockSsfi");S(this,"lockSsfi",!0),this.eql(e),S(this,"lockSsfi",r)}else this.assert(e===n,"expected #{this} to equal #{exp}","expected #{this} to not equal #{exp}",e,this._obj,!0)}v(Fo,"assertEqual");b.addMethod("equal",Fo);b.addMethod("equals",Fo);b.addMethod("eq",Fo);function Uu(e,t){t&&S(this,"message",t);let n=S(this,"eql");this.assert(n(e,S(this,"object")),"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",e,this._obj,!0)}v(Uu,"assertEql");b.addMethod("eql",Uu);b.addMethod("eqls",Uu);function Ro(e,t){t&&S(this,"message",t);let n=S(this,"object"),r=S(this,"doLength"),i=S(this,"message"),o=i?i+": ":"",s=S(this,"ssfi"),c=ge(n).toLowerCase(),a=ge(e).toLowerCase();if(r&&c!=="map"&&c!=="set"&&new b(n,i,s,!0).to.have.property("length"),!r&&c==="date"&&a!=="date")throw new re(o+"the argument to above must be a date",void 0,s);if(!Ve(e)&&(r||Ve(n)))throw new re(o+"the argument to above must be a number",void 0,s);if(!r&&c!=="date"&&!Ve(n)){let u=c==="string"?"'"+n+"'":n;throw new re(o+"expected "+u+" to be a number or a date",void 0,s)}if(r){let u="length",l;c==="map"||c==="set"?(u="size",l=n.size):l=n.length,this.assert(l>e,"expected #{this} to have a "+u+" above #{exp} but got #{act}","expected #{this} to not have a "+u+" above #{exp}",e,l)}else this.assert(n>e,"expected #{this} to be above #{exp}","expected #{this} to be at most #{exp}",e)}v(Ro,"assertAbove");b.addMethod("above",Ro);b.addMethod("gt",Ro);b.addMethod("greaterThan",Ro);function Lo(e,t){t&&S(this,"message",t);let n=S(this,"object"),r=S(this,"doLength"),i=S(this,"message"),o=i?i+": ":"",s=S(this,"ssfi"),c=ge(n).toLowerCase(),a=ge(e).toLowerCase(),u,l=!0;if(r&&c!=="map"&&c!=="set"&&new b(n,i,s,!0).to.have.property("length"),!r&&c==="date"&&a!=="date")u=o+"the argument to least must be a date";else if(!Ve(e)&&(r||Ve(n)))u=o+"the argument to least must be a number";else if(!r&&c!=="date"&&!Ve(n)){let f=c==="string"?"'"+n+"'":n;u=o+"expected "+f+" to be a number or a date"}else l=!1;if(l)throw new re(u,void 0,s);if(r){let f="length",h;c==="map"||c==="set"?(f="size",h=n.size):h=n.length,this.assert(h>=e,"expected #{this} to have a "+f+" at least #{exp} but got #{act}","expected #{this} to have a "+f+" below #{exp}",e,h)}else this.assert(n>=e,"expected #{this} to be at least #{exp}","expected #{this} to be below #{exp}",e)}v(Lo,"assertLeast");b.addMethod("least",Lo);b.addMethod("gte",Lo);b.addMethod("greaterThanOrEqual",Lo);function Do(e,t){t&&S(this,"message",t);let n=S(this,"object"),r=S(this,"doLength"),i=S(this,"message"),o=i?i+": ":"",s=S(this,"ssfi"),c=ge(n).toLowerCase(),a=ge(e).toLowerCase(),u,l=!0;if(r&&c!=="map"&&c!=="set"&&new b(n,i,s,!0).to.have.property("length"),!r&&c==="date"&&a!=="date")u=o+"the argument to below must be a date";else if(!Ve(e)&&(r||Ve(n)))u=o+"the argument to below must be a number";else if(!r&&c!=="date"&&!Ve(n)){let f=c==="string"?"'"+n+"'":n;u=o+"expected "+f+" to be a number or a date"}else l=!1;if(l)throw new re(u,void 0,s);if(r){let f="length",h;c==="map"||c==="set"?(f="size",h=n.size):h=n.length,this.assert(h<e,"expected #{this} to have a "+f+" below #{exp} but got #{act}","expected #{this} to not have a "+f+" below #{exp}",e,h)}else this.assert(n<e,"expected #{this} to be below #{exp}","expected #{this} to be at least #{exp}",e)}v(Do,"assertBelow");b.addMethod("below",Do);b.addMethod("lt",Do);b.addMethod("lessThan",Do);function Bo(e,t){t&&S(this,"message",t);let n=S(this,"object"),r=S(this,"doLength"),i=S(this,"message"),o=i?i+": ":"",s=S(this,"ssfi"),c=ge(n).toLowerCase(),a=ge(e).toLowerCase(),u,l=!0;if(r&&c!=="map"&&c!=="set"&&new b(n,i,s,!0).to.have.property("length"),!r&&c==="date"&&a!=="date")u=o+"the argument to most must be a date";else if(!Ve(e)&&(r||Ve(n)))u=o+"the argument to most must be a number";else if(!r&&c!=="date"&&!Ve(n)){let f=c==="string"?"'"+n+"'":n;u=o+"expected "+f+" to be a number or a date"}else l=!1;if(l)throw new re(u,void 0,s);if(r){let f="length",h;c==="map"||c==="set"?(f="size",h=n.size):h=n.length,this.assert(h<=e,"expected #{this} to have a "+f+" at most #{exp} but got #{act}","expected #{this} to have a "+f+" above #{exp}",e,h)}else this.assert(n<=e,"expected #{this} to be at most #{exp}","expected #{this} to be above #{exp}",e)}v(Bo,"assertMost");b.addMethod("most",Bo);b.addMethod("lte",Bo);b.addMethod("lessThanOrEqual",Bo);b.addMethod("within",function(e,t,n){n&&S(this,"message",n);let r=S(this,"object"),i=S(this,"doLength"),o=S(this,"message"),s=o?o+": ":"",c=S(this,"ssfi"),a=ge(r).toLowerCase(),u=ge(e).toLowerCase(),l=ge(t).toLowerCase(),f,h=!0,d=u==="date"&&l==="date"?e.toISOString()+".."+t.toISOString():e+".."+t;if(i&&a!=="map"&&a!=="set"&&new b(r,o,c,!0).to.have.property("length"),!i&&a==="date"&&(u!=="date"||l!=="date"))f=s+"the arguments to within must be dates";else if((!Ve(e)||!Ve(t))&&(i||Ve(r)))f=s+"the arguments to within must be numbers";else if(!i&&a!=="date"&&!Ve(r)){let m=a==="string"?"'"+r+"'":r;f=s+"expected "+m+" to be a number or a date"}else h=!1;if(h)throw new re(f,void 0,c);if(i){let m="length",p;a==="map"||a==="set"?(m="size",p=r.size):p=r.length,this.assert(p>=e&&p<=t,"expected #{this} to have a "+m+" within "+d,"expected #{this} to not have a "+m+" within "+d)}else this.assert(r>=e&&r<=t,"expected #{this} to be within "+d,"expected #{this} to not be within "+d)});function Vu(e,t){t&&S(this,"message",t);let n=S(this,"object"),r=S(this,"ssfi"),i=S(this,"message"),o;try{o=n instanceof e}catch(c){throw c instanceof TypeError?(i=i?i+": ":"",new re(i+"The instanceof assertion needs a constructor but "+ge(e)+" was given.",void 0,r)):c}let s=jo(e);s==null&&(s="an unnamed constructor"),this.assert(o,"expected #{this} to be an instance of "+s,"expected #{this} to not be an instance of "+s)}v(Vu,"assertInstanceOf");b.addMethod("instanceof",Vu);b.addMethod("instanceOf",Vu);function qu(e,t,n){n&&S(this,"message",n);let r=S(this,"nested"),i=S(this,"own"),o=S(this,"message"),s=S(this,"object"),c=S(this,"ssfi"),a=typeof e;if(o=o?o+": ":"",r){if(a!=="string")throw new re(o+"the argument to property must be a string when using nested syntax",void 0,c)}else if(a!=="string"&&a!=="number"&&a!=="symbol")throw new re(o+"the argument to property must be a string, number, or symbol",void 0,c);if(r&&i)throw new re(o+'The "nested" and "own" flags cannot be combined.',void 0,c);if(s==null)throw new re(o+"Target cannot be null or undefined.",void 0,c);let u=S(this,"deep"),l=S(this,"negate"),f=r?Iu(s,e):null,h=r?f.value:s[e],d=u?S(this,"eql"):(y,x)=>y===x,m="";u&&(m+="deep "),i&&(m+="own "),r&&(m+="nested "),m+="property ";let p;i?p=Object.prototype.hasOwnProperty.call(s,e):r?p=f.exists:p=Po(s,e),(!l||arguments.length===1)&&this.assert(p,"expected #{this} to have "+m+ne(e),"expected #{this} to not have "+m+ne(e)),arguments.length>1&&this.assert(p&&d(t,h),"expected #{this} to have "+m+ne(e)+" of #{exp}, but got #{act}","expected #{this} to not have "+m+ne(e)+" of #{act}",t,h),S(this,"object",h)}v(qu,"assertProperty");b.addMethod("property",qu);function Wu(e,t,n){S(this,"own",!0),qu.apply(this,arguments)}v(Wu,"assertOwnProperty");b.addMethod("ownProperty",Wu);b.addMethod("haveOwnProperty",Wu);function zu(e,t,n){typeof t=="string"&&(n=t,t=null),n&&S(this,"message",n);let r=S(this,"object"),i=Object.getOwnPropertyDescriptor(Object(r),e),o=S(this,"eql");i&&t?this.assert(o(t,i),"expected the own property descriptor for "+ne(e)+" on #{this} to match "+ne(t)+", got "+ne(i),"expected the own property descriptor for "+ne(e)+" on #{this} to not match "+ne(t),t,i,!0):this.assert(i,"expected #{this} to have an own property descriptor for "+ne(e),"expected #{this} to not have an own property descriptor for "+ne(e)),S(this,"object",i)}v(zu,"assertOwnPropertyDescriptor");b.addMethod("ownPropertyDescriptor",zu);b.addMethod("haveOwnPropertyDescriptor",zu);function Gu(){S(this,"doLength",!0)}v(Gu,"assertLengthChain");function Ku(e,t){t&&S(this,"message",t);let n=S(this,"object"),r=ge(n).toLowerCase(),i=S(this,"message"),o=S(this,"ssfi"),s="length",c;switch(r){case"map":case"set":s="size",c=n.size;break;default:new b(n,i,o,!0).to.have.property("length"),c=n.length}this.assert(c==e,"expected #{this} to have a "+s+" of #{exp} but got #{act}","expected #{this} to not have a "+s+" of #{act}",e,c)}v(Ku,"assertLength");b.addChainableMethod("length",Ku,Gu);b.addChainableMethod("lengthOf",Ku,Gu);function Hu(e,t){t&&S(this,"message",t);let n=S(this,"object");this.assert(e.exec(n),"expected #{this} to match "+e,"expected #{this} not to match "+e)}v(Hu,"assertMatch");b.addMethod("match",Hu);b.addMethod("matches",Hu);b.addMethod("string",function(e,t){t&&S(this,"message",t);let n=S(this,"object"),r=S(this,"message"),i=S(this,"ssfi");new b(n,r,i,!0).is.a("string"),this.assert(~n.indexOf(e),"expected #{this} to contain "+ne(e),"expected #{this} to not contain "+ne(e))});function Yu(e){let t=S(this,"object"),n=ge(t),r=ge(e),i=S(this,"ssfi"),o=S(this,"deep"),s,c="",a,u=!0,l=S(this,"message");l=l?l+": ":"";let f=l+"when testing keys against an object or an array you must give a single Array|Object|String argument or multiple String arguments";if(n==="Map"||n==="Set")c=o?"deeply ":"",a=[],t.forEach(function(E,$){a.push($)}),r!=="Array"&&(e=Array.prototype.slice.call(arguments));else{switch(a=Fu(t),r){case"Array":if(arguments.length>1)throw new re(f,void 0,i);break;case"Object":if(arguments.length>1)throw new re(f,void 0,i);e=Object.keys(e);break;default:e=Array.prototype.slice.call(arguments)}e=e.map(function(E){return typeof E=="symbol"?E:String(E)})}if(!e.length)throw new re(l+"keys required",void 0,i);let h=e.length,d=S(this,"any"),m=S(this,"all"),p=e,y=o?S(this,"eql"):(E,$)=>E===$;!d&&!m&&(m=!0);const x=[...new Set(p)];if(d&&(u=x.some(function(E){return a.some(function($){return y(E,$)})})),m&&(u=x.every(function(E){return a.some(function($){return y(E,$)})}),S(this,"contains")||(u=u&&x.length==a.length)),h>1){e=e.map(function($){return ne($)});let E=e.pop();m&&(s=e.join(", ")+", and "+E),d&&(s=e.join(", ")+", or "+E)}else s=ne(e[0]);s=(h>1?"keys ":"key ")+s,s=(S(this,"contains")?"contain ":"have ")+s,this.assert(u,"expected #{this} to "+c+s,"expected #{this} to not "+c+s,p.slice(0).sort(to),a.sort(to),!0)}v(Yu,"assertKeys");b.addMethod("keys",Yu);b.addMethod("key",Yu);function Uo(e,t,n){n&&S(this,"message",n);let r=S(this,"object"),i=S(this,"ssfi"),o=S(this,"message"),s=S(this,"negate")||!1;new b(r,o,i,!0).is.a("function"),(ro(e)||typeof e=="string")&&(t=e,e=null);let c,a=!1;try{r()}catch(d){a=!0,c=d}let u=e===void 0&&t===void 0,l=!!(e&&t),f=!1,h=!1;if(u||!u&&!s){let d="an error";e instanceof Error?d="#{exp}":e&&(d=dt.getConstructorName(e));let m=c;if(c instanceof Error)m=c.toString();else if(typeof c=="string")m=c;else if(c&&(typeof c=="object"||typeof c=="function"))try{m=dt.getConstructorName(c)}catch{}this.assert(a,"expected #{this} to throw "+d,"expected #{this} to not throw an error but #{act} was thrown",e&&e.toString(),m)}if(e&&c&&(e instanceof Error&&dt.compatibleInstance(c,e)===s&&(l&&s?f=!0:this.assert(s,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(c&&!s?" but #{act} was thrown":""),e.toString(),c.toString())),dt.compatibleConstructor(c,e)===s&&(l&&s?f=!0:this.assert(s,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(c?" but #{act} was thrown":""),e instanceof Error?e.toString():e&&dt.getConstructorName(e),c instanceof Error?c.toString():c&&dt.getConstructorName(c)))),c&&t!==void 0&&t!==null){let d="including";ro(t)&&(d="matching"),dt.compatibleMessage(c,t)===s&&(l&&s?h=!0:this.assert(s,"expected #{this} to throw error "+d+" #{exp} but got #{act}","expected #{this} to throw error not "+d+" #{exp}",t,dt.getMessage(c)))}f&&h&&this.assert(s,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(c?" but #{act} was thrown":""),e instanceof Error?e.toString():e&&dt.getConstructorName(e),c instanceof Error?c.toString():c&&dt.getConstructorName(c)),S(this,"object",c)}v(Uo,"assertThrows");b.addMethod("throw",Uo);b.addMethod("throws",Uo);b.addMethod("Throw",Uo);function Ju(e,t){t&&S(this,"message",t);let n=S(this,"object"),r=S(this,"itself"),i=typeof n=="function"&&!r?n.prototype[e]:n[e];this.assert(typeof i=="function","expected #{this} to respond to "+ne(e),"expected #{this} to not respond to "+ne(e))}v(Ju,"respondTo");b.addMethod("respondTo",Ju);b.addMethod("respondsTo",Ju);b.addProperty("itself",function(){S(this,"itself",!0)});function Xu(e,t){t&&S(this,"message",t);let n=S(this,"object"),r=e(n);this.assert(r,"expected #{this} to satisfy "+kn(e),"expected #{this} to not satisfy"+kn(e),!S(this,"negate"),r)}v(Xu,"satisfy");b.addMethod("satisfy",Xu);b.addMethod("satisfies",Xu);function Zu(e,t,n){n&&S(this,"message",n);let r=S(this,"object"),i=S(this,"message"),o=S(this,"ssfi");new b(r,i,o,!0).is.numeric;let s="A `delta` value is required for `closeTo`";if(t==null)throw new re(i?`${i}: ${s}`:s,void 0,o);if(new b(t,i,o,!0).is.numeric,s="A `expected` value is required for `closeTo`",e==null)throw new re(i?`${i}: ${s}`:s,void 0,o);new b(e,i,o,!0).is.numeric;const c=v(u=>u<0?-u:u,"abs"),a=v(u=>parseFloat(parseFloat(u).toPrecision(12)),"strip");this.assert(a(c(r-e))<=t,"expected #{this} to be close to "+e+" +/- "+t,"expected #{this} not to be close to "+e+" +/- "+t)}v(Zu,"closeTo");b.addMethod("closeTo",Zu);b.addMethod("approximately",Zu);function Sb(e,t,n,r,i){let o=Array.from(t),s=Array.from(e);if(!r){if(s.length!==o.length)return!1;o=o.slice()}return s.every(function(c,a){if(i)return n?n(c,o[a]):c===o[a];if(!n){let u=o.indexOf(c);return u===-1?!1:(r||o.splice(u,1),!0)}return o.some(function(u,l){return n(c,u)?(r||o.splice(l,1),!0):!1})})}v(Sb,"isSubsetOf");b.addMethod("members",function(e,t){t&&S(this,"message",t);let n=S(this,"object"),r=S(this,"message"),i=S(this,"ssfi");new b(n,r,i,!0).to.be.iterable,new b(e,r,i,!0).to.be.iterable;let o=S(this,"contains"),s=S(this,"ordered"),c,a,u;o?(c=s?"an ordered superset":"a superset",a="expected #{this} to be "+c+" of #{exp}",u="expected #{this} to not be "+c+" of #{exp}"):(c=s?"ordered members":"members",a="expected #{this} to have the same "+c+" as #{exp}",u="expected #{this} to not have the same "+c+" as #{exp}");let l=S(this,"deep")?S(this,"eql"):void 0;this.assert(Sb(e,n,l,o,s),a,u,e,n,!0)});b.addProperty("iterable",function(e){e&&S(this,"message",e);let t=S(this,"object");this.assert(t!=null&&typeof t[Symbol.iterator]=="function","expected #{this} to be an iterable","expected #{this} to not be an iterable",t)});function Eb(e,t){t&&S(this,"message",t);let n=S(this,"object"),r=S(this,"message"),i=S(this,"ssfi"),o=S(this,"contains"),s=S(this,"deep"),c=S(this,"eql");new b(e,r,i,!0).to.be.an("array"),o?this.assert(e.some(function(a){return n.indexOf(a)>-1||s&&Array.isArray(n)&&n.some(function(u){return c(u,a)})}),"expected #{this} to "+(s?"deeply ":"")+"contain one of #{exp}","expected #{this} to not "+(s?"deeply ":"")+"contain one of #{exp}",e,n):s?this.assert(e.some(function(a){return c(n,a)}),"expected #{this} to deeply equal one of #{exp}","expected #{this} to not deeply equal one of #{exp}",e,n):this.assert(e.indexOf(n)>-1,"expected #{this} to be one of #{exp}","expected #{this} to not be one of #{exp}",e,n)}v(Eb,"oneOf");b.addMethod("oneOf",Eb);function Qu(e,t,n){n&&S(this,"message",n);const r=S(this,"object"),i=S(this,"message"),o=S(this,"ssfi");new b(r,i,o,!0).is.a("function");let s;t==null?(new b(e,i,o,!0).is.a("function"),s=e()):(new b(e,i,o,!0).to.have.property(t),s=e[t]),r();let c=t==null?e():e[t],a=t==null?s:"."+t;S(this,"deltaMsgObj",a),S(this,"initialDeltaValue",s),S(this,"finalDeltaValue",c),S(this,"deltaBehavior","change"),S(this,"realDelta",c!==s),this.assert(s!==c,"expected "+a+" to change","expected "+a+" to not change")}v(Qu,"assertChanges");b.addMethod("change",Qu);b.addMethod("changes",Qu);function el(e,t,n){n&&S(this,"message",n);const r=S(this,"object"),i=S(this,"message"),o=S(this,"ssfi");new b(r,i,o,!0).is.a("function");let s;t==null?(new b(e,i,o,!0).is.a("function"),s=e()):(new b(e,i,o,!0).to.have.property(t),s=e[t]),new b(s,i,o,!0).is.a("number"),r();let c=t==null?e():e[t],a=t==null?s:"."+t;S(this,"deltaMsgObj",a),S(this,"initialDeltaValue",s),S(this,"finalDeltaValue",c),S(this,"deltaBehavior","increase"),S(this,"realDelta",c-s),this.assert(c-s>0,"expected "+a+" to increase","expected "+a+" to not increase")}v(el,"assertIncreases");b.addMethod("increase",el);b.addMethod("increases",el);function tl(e,t,n){n&&S(this,"message",n);const r=S(this,"object"),i=S(this,"message"),o=S(this,"ssfi");new b(r,i,o,!0).is.a("function");let s;t==null?(new b(e,i,o,!0).is.a("function"),s=e()):(new b(e,i,o,!0).to.have.property(t),s=e[t]),new b(s,i,o,!0).is.a("number"),r();let c=t==null?e():e[t],a=t==null?s:"."+t;S(this,"deltaMsgObj",a),S(this,"initialDeltaValue",s),S(this,"finalDeltaValue",c),S(this,"deltaBehavior","decrease"),S(this,"realDelta",s-c),this.assert(c-s<0,"expected "+a+" to decrease","expected "+a+" to not decrease")}v(tl,"assertDecreases");b.addMethod("decrease",tl);b.addMethod("decreases",tl);function Tb(e,t){t&&S(this,"message",t);let n=S(this,"deltaMsgObj"),r=S(this,"initialDeltaValue"),i=S(this,"finalDeltaValue"),o=S(this,"deltaBehavior"),s=S(this,"realDelta"),c;o==="change"?c=Math.abs(i-r)===Math.abs(e):c=s===Math.abs(e),this.assert(c,"expected "+n+" to "+o+" by "+e,"expected "+n+" to not "+o+" by "+e)}v(Tb,"assertDelta");b.addMethod("by",Tb);b.addProperty("extensible",function(){let e=S(this,"object"),t=e===Object(e)&&Object.isExtensible(e);this.assert(t,"expected #{this} to be extensible","expected #{this} to not be extensible")});b.addProperty("sealed",function(){let e=S(this,"object"),t=e===Object(e)?Object.isSealed(e):!0;this.assert(t,"expected #{this} to be sealed","expected #{this} to not be sealed")});b.addProperty("frozen",function(){let e=S(this,"object"),t=e===Object(e)?Object.isFrozen(e):!0;this.assert(t,"expected #{this} to be frozen","expected #{this} to not be frozen")});b.addProperty("finite",function(e){let t=S(this,"object");this.assert(typeof t=="number"&&isFinite(t),"expected #{this} to be a finite number","expected #{this} to not be a finite number")});function io(e,t){return e===t?!0:typeof t!=typeof e?!1:typeof e!="object"||e===null?e===t:t?Array.isArray(e)?Array.isArray(t)?e.every(function(n){return t.some(function(r){return io(n,r)})}):!1:e instanceof Date?t instanceof Date?e.getTime()===t.getTime():!1:Object.keys(e).every(function(n){let r=e[n],i=t[n];return typeof r=="object"&&r!==null&&i!==null?io(r,i):typeof r=="function"?r(i):i===r}):!1}v(io,"compareSubset");b.addMethod("containSubset",function(e){const t=Y(this,"object"),n=tt.showDiff;this.assert(io(e,t),"expected #{act} to contain subset #{exp}","expected #{act} to not contain subset #{exp}",e,t,n)});function In(e,t){return new b(e,t)}v(In,"expect");In.fail=function(e,t,n,r){let i=n;throw arguments.length<2&&(i=e,e=void 0),new re(i||"expect.fail()",{actual:e,expected:t,operator:r},In.fail)};var vb={};xu(vb,{Should:()=>fC,should:()=>lC});function nl(){function e(){return this instanceof String||this instanceof Number||this instanceof Boolean||typeof Symbol=="function"&&this instanceof Symbol||typeof BigInt=="function"&&this instanceof BigInt?new b(this.valueOf(),null,e):new b(this,null,e)}v(e,"shouldGetter");function t(r){Object.defineProperty(this,"should",{value:r,enumerable:!0,configurable:!0,writable:!0})}v(t,"shouldSetter"),Object.defineProperty(Object.prototype,"should",{set:t,get:e,configurable:!0});let n={};return n.fail=function(r,i,o,s){throw arguments.length<2&&(o=r,r=void 0),o=o||"should.fail()",new re(o,{actual:r,expected:i,operator:s},n.fail)},n.equal=function(r,i,o){new b(r,o).to.equal(i)},n.Throw=function(r,i,o,s){new b(r,s).to.Throw(i,o)},n.exist=function(r,i){new b(r,i).to.exist},n.not={},n.not.equal=function(r,i,o){new b(r,o).to.not.equal(i)},n.not.Throw=function(r,i,o,s){new b(r,s).to.not.Throw(i,o)},n.not.exist=function(r,i){new b(r,i).to.not.exist},n.throw=n.Throw,n.not.throw=n.not.Throw,n}v(nl,"loadShould");var lC=nl,fC=nl;function g(e,t){new b(null,null,g,!0).assert(e,t,"[ negation message unavailable ]")}v(g,"assert");g.fail=function(e,t,n,r){throw arguments.length<2&&(n=e,e=void 0),n=n||"assert.fail()",new re(n,{actual:e,expected:t,operator:r},g.fail)};g.isOk=function(e,t){new b(e,t,g.isOk,!0).is.ok};g.isNotOk=function(e,t){new b(e,t,g.isNotOk,!0).is.not.ok};g.equal=function(e,t,n){let r=new b(e,n,g.equal,!0);r.assert(t==Y(r,"object"),"expected #{this} to equal #{exp}","expected #{this} to not equal #{act}",t,e,!0)};g.notEqual=function(e,t,n){let r=new b(e,n,g.notEqual,!0);r.assert(t!=Y(r,"object"),"expected #{this} to not equal #{exp}","expected #{this} to equal #{act}",t,e,!0)};g.strictEqual=function(e,t,n){new b(e,n,g.strictEqual,!0).to.equal(t)};g.notStrictEqual=function(e,t,n){new b(e,n,g.notStrictEqual,!0).to.not.equal(t)};g.deepEqual=g.deepStrictEqual=function(e,t,n){new b(e,n,g.deepEqual,!0).to.eql(t)};g.notDeepEqual=function(e,t,n){new b(e,n,g.notDeepEqual,!0).to.not.eql(t)};g.isAbove=function(e,t,n){new b(e,n,g.isAbove,!0).to.be.above(t)};g.isAtLeast=function(e,t,n){new b(e,n,g.isAtLeast,!0).to.be.least(t)};g.isBelow=function(e,t,n){new b(e,n,g.isBelow,!0).to.be.below(t)};g.isAtMost=function(e,t,n){new b(e,n,g.isAtMost,!0).to.be.most(t)};g.isTrue=function(e,t){new b(e,t,g.isTrue,!0).is.true};g.isNotTrue=function(e,t){new b(e,t,g.isNotTrue,!0).to.not.equal(!0)};g.isFalse=function(e,t){new b(e,t,g.isFalse,!0).is.false};g.isNotFalse=function(e,t){new b(e,t,g.isNotFalse,!0).to.not.equal(!1)};g.isNull=function(e,t){new b(e,t,g.isNull,!0).to.equal(null)};g.isNotNull=function(e,t){new b(e,t,g.isNotNull,!0).to.not.equal(null)};g.isNaN=function(e,t){new b(e,t,g.isNaN,!0).to.be.NaN};g.isNotNaN=function(e,t){new b(e,t,g.isNotNaN,!0).not.to.be.NaN};g.exists=function(e,t){new b(e,t,g.exists,!0).to.exist};g.notExists=function(e,t){new b(e,t,g.notExists,!0).to.not.exist};g.isUndefined=function(e,t){new b(e,t,g.isUndefined,!0).to.equal(void 0)};g.isDefined=function(e,t){new b(e,t,g.isDefined,!0).to.not.equal(void 0)};g.isCallable=function(e,t){new b(e,t,g.isCallable,!0).is.callable};g.isNotCallable=function(e,t){new b(e,t,g.isNotCallable,!0).is.not.callable};g.isObject=function(e,t){new b(e,t,g.isObject,!0).to.be.a("object")};g.isNotObject=function(e,t){new b(e,t,g.isNotObject,!0).to.not.be.a("object")};g.isArray=function(e,t){new b(e,t,g.isArray,!0).to.be.an("array")};g.isNotArray=function(e,t){new b(e,t,g.isNotArray,!0).to.not.be.an("array")};g.isString=function(e,t){new b(e,t,g.isString,!0).to.be.a("string")};g.isNotString=function(e,t){new b(e,t,g.isNotString,!0).to.not.be.a("string")};g.isNumber=function(e,t){new b(e,t,g.isNumber,!0).to.be.a("number")};g.isNotNumber=function(e,t){new b(e,t,g.isNotNumber,!0).to.not.be.a("number")};g.isNumeric=function(e,t){new b(e,t,g.isNumeric,!0).is.numeric};g.isNotNumeric=function(e,t){new b(e,t,g.isNotNumeric,!0).is.not.numeric};g.isFinite=function(e,t){new b(e,t,g.isFinite,!0).to.be.finite};g.isBoolean=function(e,t){new b(e,t,g.isBoolean,!0).to.be.a("boolean")};g.isNotBoolean=function(e,t){new b(e,t,g.isNotBoolean,!0).to.not.be.a("boolean")};g.typeOf=function(e,t,n){new b(e,n,g.typeOf,!0).to.be.a(t)};g.notTypeOf=function(e,t,n){new b(e,n,g.notTypeOf,!0).to.not.be.a(t)};g.instanceOf=function(e,t,n){new b(e,n,g.instanceOf,!0).to.be.instanceOf(t)};g.notInstanceOf=function(e,t,n){new b(e,n,g.notInstanceOf,!0).to.not.be.instanceOf(t)};g.include=function(e,t,n){new b(e,n,g.include,!0).include(t)};g.notInclude=function(e,t,n){new b(e,n,g.notInclude,!0).not.include(t)};g.deepInclude=function(e,t,n){new b(e,n,g.deepInclude,!0).deep.include(t)};g.notDeepInclude=function(e,t,n){new b(e,n,g.notDeepInclude,!0).not.deep.include(t)};g.nestedInclude=function(e,t,n){new b(e,n,g.nestedInclude,!0).nested.include(t)};g.notNestedInclude=function(e,t,n){new b(e,n,g.notNestedInclude,!0).not.nested.include(t)};g.deepNestedInclude=function(e,t,n){new b(e,n,g.deepNestedInclude,!0).deep.nested.include(t)};g.notDeepNestedInclude=function(e,t,n){new b(e,n,g.notDeepNestedInclude,!0).not.deep.nested.include(t)};g.ownInclude=function(e,t,n){new b(e,n,g.ownInclude,!0).own.include(t)};g.notOwnInclude=function(e,t,n){new b(e,n,g.notOwnInclude,!0).not.own.include(t)};g.deepOwnInclude=function(e,t,n){new b(e,n,g.deepOwnInclude,!0).deep.own.include(t)};g.notDeepOwnInclude=function(e,t,n){new b(e,n,g.notDeepOwnInclude,!0).not.deep.own.include(t)};g.match=function(e,t,n){new b(e,n,g.match,!0).to.match(t)};g.notMatch=function(e,t,n){new b(e,n,g.notMatch,!0).to.not.match(t)};g.property=function(e,t,n){new b(e,n,g.property,!0).to.have.property(t)};g.notProperty=function(e,t,n){new b(e,n,g.notProperty,!0).to.not.have.property(t)};g.propertyVal=function(e,t,n,r){new b(e,r,g.propertyVal,!0).to.have.property(t,n)};g.notPropertyVal=function(e,t,n,r){new b(e,r,g.notPropertyVal,!0).to.not.have.property(t,n)};g.deepPropertyVal=function(e,t,n,r){new b(e,r,g.deepPropertyVal,!0).to.have.deep.property(t,n)};g.notDeepPropertyVal=function(e,t,n,r){new b(e,r,g.notDeepPropertyVal,!0).to.not.have.deep.property(t,n)};g.ownProperty=function(e,t,n){new b(e,n,g.ownProperty,!0).to.have.own.property(t)};g.notOwnProperty=function(e,t,n){new b(e,n,g.notOwnProperty,!0).to.not.have.own.property(t)};g.ownPropertyVal=function(e,t,n,r){new b(e,r,g.ownPropertyVal,!0).to.have.own.property(t,n)};g.notOwnPropertyVal=function(e,t,n,r){new b(e,r,g.notOwnPropertyVal,!0).to.not.have.own.property(t,n)};g.deepOwnPropertyVal=function(e,t,n,r){new b(e,r,g.deepOwnPropertyVal,!0).to.have.deep.own.property(t,n)};g.notDeepOwnPropertyVal=function(e,t,n,r){new b(e,r,g.notDeepOwnPropertyVal,!0).to.not.have.deep.own.property(t,n)};g.nestedProperty=function(e,t,n){new b(e,n,g.nestedProperty,!0).to.have.nested.property(t)};g.notNestedProperty=function(e,t,n){new b(e,n,g.notNestedProperty,!0).to.not.have.nested.property(t)};g.nestedPropertyVal=function(e,t,n,r){new b(e,r,g.nestedPropertyVal,!0).to.have.nested.property(t,n)};g.notNestedPropertyVal=function(e,t,n,r){new b(e,r,g.notNestedPropertyVal,!0).to.not.have.nested.property(t,n)};g.deepNestedPropertyVal=function(e,t,n,r){new b(e,r,g.deepNestedPropertyVal,!0).to.have.deep.nested.property(t,n)};g.notDeepNestedPropertyVal=function(e,t,n,r){new b(e,r,g.notDeepNestedPropertyVal,!0).to.not.have.deep.nested.property(t,n)};g.lengthOf=function(e,t,n){new b(e,n,g.lengthOf,!0).to.have.lengthOf(t)};g.hasAnyKeys=function(e,t,n){new b(e,n,g.hasAnyKeys,!0).to.have.any.keys(t)};g.hasAllKeys=function(e,t,n){new b(e,n,g.hasAllKeys,!0).to.have.all.keys(t)};g.containsAllKeys=function(e,t,n){new b(e,n,g.containsAllKeys,!0).to.contain.all.keys(t)};g.doesNotHaveAnyKeys=function(e,t,n){new b(e,n,g.doesNotHaveAnyKeys,!0).to.not.have.any.keys(t)};g.doesNotHaveAllKeys=function(e,t,n){new b(e,n,g.doesNotHaveAllKeys,!0).to.not.have.all.keys(t)};g.hasAnyDeepKeys=function(e,t,n){new b(e,n,g.hasAnyDeepKeys,!0).to.have.any.deep.keys(t)};g.hasAllDeepKeys=function(e,t,n){new b(e,n,g.hasAllDeepKeys,!0).to.have.all.deep.keys(t)};g.containsAllDeepKeys=function(e,t,n){new b(e,n,g.containsAllDeepKeys,!0).to.contain.all.deep.keys(t)};g.doesNotHaveAnyDeepKeys=function(e,t,n){new b(e,n,g.doesNotHaveAnyDeepKeys,!0).to.not.have.any.deep.keys(t)};g.doesNotHaveAllDeepKeys=function(e,t,n){new b(e,n,g.doesNotHaveAllDeepKeys,!0).to.not.have.all.deep.keys(t)};g.throws=function(e,t,n,r){(typeof t=="string"||t instanceof RegExp)&&(n=t,t=null);let i=new b(e,r,g.throws,!0).to.throw(t,n);return Y(i,"object")};g.doesNotThrow=function(e,t,n,r){(typeof t=="string"||t instanceof RegExp)&&(n=t,t=null),new b(e,r,g.doesNotThrow,!0).to.not.throw(t,n)};g.operator=function(e,t,n,r){let i;switch(t){case"==":i=e==n;break;case"===":i=e===n;break;case">":i=e>n;break;case">=":i=e>=n;break;case"<":i=e<n;break;case"<=":i=e<=n;break;case"!=":i=e!=n;break;case"!==":i=e!==n;break;default:throw r=r&&r+": ",new re(r+'Invalid operator "'+t+'"',void 0,g.operator)}let o=new b(i,r,g.operator,!0);o.assert(Y(o,"object")===!0,"expected "+ne(e)+" to be "+t+" "+ne(n),"expected "+ne(e)+" to not be "+t+" "+ne(n))};g.closeTo=function(e,t,n,r){new b(e,r,g.closeTo,!0).to.be.closeTo(t,n)};g.approximately=function(e,t,n,r){new b(e,r,g.approximately,!0).to.be.approximately(t,n)};g.sameMembers=function(e,t,n){new b(e,n,g.sameMembers,!0).to.have.same.members(t)};g.notSameMembers=function(e,t,n){new b(e,n,g.notSameMembers,!0).to.not.have.same.members(t)};g.sameDeepMembers=function(e,t,n){new b(e,n,g.sameDeepMembers,!0).to.have.same.deep.members(t)};g.notSameDeepMembers=function(e,t,n){new b(e,n,g.notSameDeepMembers,!0).to.not.have.same.deep.members(t)};g.sameOrderedMembers=function(e,t,n){new b(e,n,g.sameOrderedMembers,!0).to.have.same.ordered.members(t)};g.notSameOrderedMembers=function(e,t,n){new b(e,n,g.notSameOrderedMembers,!0).to.not.have.same.ordered.members(t)};g.sameDeepOrderedMembers=function(e,t,n){new b(e,n,g.sameDeepOrderedMembers,!0).to.have.same.deep.ordered.members(t)};g.notSameDeepOrderedMembers=function(e,t,n){new b(e,n,g.notSameDeepOrderedMembers,!0).to.not.have.same.deep.ordered.members(t)};g.includeMembers=function(e,t,n){new b(e,n,g.includeMembers,!0).to.include.members(t)};g.notIncludeMembers=function(e,t,n){new b(e,n,g.notIncludeMembers,!0).to.not.include.members(t)};g.includeDeepMembers=function(e,t,n){new b(e,n,g.includeDeepMembers,!0).to.include.deep.members(t)};g.notIncludeDeepMembers=function(e,t,n){new b(e,n,g.notIncludeDeepMembers,!0).to.not.include.deep.members(t)};g.includeOrderedMembers=function(e,t,n){new b(e,n,g.includeOrderedMembers,!0).to.include.ordered.members(t)};g.notIncludeOrderedMembers=function(e,t,n){new b(e,n,g.notIncludeOrderedMembers,!0).to.not.include.ordered.members(t)};g.includeDeepOrderedMembers=function(e,t,n){new b(e,n,g.includeDeepOrderedMembers,!0).to.include.deep.ordered.members(t)};g.notIncludeDeepOrderedMembers=function(e,t,n){new b(e,n,g.notIncludeDeepOrderedMembers,!0).to.not.include.deep.ordered.members(t)};g.oneOf=function(e,t,n){new b(e,n,g.oneOf,!0).to.be.oneOf(t)};g.isIterable=function(e,t){if(e==null||typeof e[Symbol.iterator]!="function")throw t=t?`${t} expected ${ne(e)} to be an iterable`:`expected ${ne(e)} to be an iterable`,new re(t,void 0,g.isIterable)};g.changes=function(e,t,n,r){arguments.length===3&&typeof t=="function"&&(r=n,n=null),new b(e,r,g.changes,!0).to.change(t,n)};g.changesBy=function(e,t,n,r,i){if(arguments.length===4&&typeof t=="function"){let o=r;r=n,i=o}else arguments.length===3&&(r=n,n=null);new b(e,i,g.changesBy,!0).to.change(t,n).by(r)};g.doesNotChange=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new b(e,r,g.doesNotChange,!0).to.not.change(t,n)};g.changesButNotBy=function(e,t,n,r,i){if(arguments.length===4&&typeof t=="function"){let o=r;r=n,i=o}else arguments.length===3&&(r=n,n=null);new b(e,i,g.changesButNotBy,!0).to.change(t,n).but.not.by(r)};g.increases=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new b(e,r,g.increases,!0).to.increase(t,n)};g.increasesBy=function(e,t,n,r,i){if(arguments.length===4&&typeof t=="function"){let o=r;r=n,i=o}else arguments.length===3&&(r=n,n=null);new b(e,i,g.increasesBy,!0).to.increase(t,n).by(r)};g.doesNotIncrease=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new b(e,r,g.doesNotIncrease,!0).to.not.increase(t,n)};g.increasesButNotBy=function(e,t,n,r,i){if(arguments.length===4&&typeof t=="function"){let o=r;r=n,i=o}else arguments.length===3&&(r=n,n=null);new b(e,i,g.increasesButNotBy,!0).to.increase(t,n).but.not.by(r)};g.decreases=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new b(e,r,g.decreases,!0).to.decrease(t,n)};g.decreasesBy=function(e,t,n,r,i){if(arguments.length===4&&typeof t=="function"){let o=r;r=n,i=o}else arguments.length===3&&(r=n,n=null);new b(e,i,g.decreasesBy,!0).to.decrease(t,n).by(r)};g.doesNotDecrease=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new b(e,r,g.doesNotDecrease,!0).to.not.decrease(t,n)};g.doesNotDecreaseBy=function(e,t,n,r,i){if(arguments.length===4&&typeof t=="function"){let o=r;r=n,i=o}else arguments.length===3&&(r=n,n=null);return new b(e,i,g.doesNotDecreaseBy,!0).to.not.decrease(t,n).by(r)};g.decreasesButNotBy=function(e,t,n,r,i){if(arguments.length===4&&typeof t=="function"){let o=r;r=n,i=o}else arguments.length===3&&(r=n,n=null);new b(e,i,g.decreasesButNotBy,!0).to.decrease(t,n).but.not.by(r)};g.ifError=function(e){if(e)throw e};g.isExtensible=function(e,t){new b(e,t,g.isExtensible,!0).to.be.extensible};g.isNotExtensible=function(e,t){new b(e,t,g.isNotExtensible,!0).to.not.be.extensible};g.isSealed=function(e,t){new b(e,t,g.isSealed,!0).to.be.sealed};g.isNotSealed=function(e,t){new b(e,t,g.isNotSealed,!0).to.not.be.sealed};g.isFrozen=function(e,t){new b(e,t,g.isFrozen,!0).to.be.frozen};g.isNotFrozen=function(e,t){new b(e,t,g.isNotFrozen,!0).to.not.be.frozen};g.isEmpty=function(e,t){new b(e,t,g.isEmpty,!0).to.be.empty};g.isNotEmpty=function(e,t){new b(e,t,g.isNotEmpty,!0).to.not.be.empty};g.containsSubset=function(e,t,n){new b(e,n).to.containSubset(t)};g.doesNotContainSubset=function(e,t,n){new b(e,n).to.not.containSubset(t)};var hC=[["isOk","ok"],["isNotOk","notOk"],["throws","throw"],["throws","Throw"],["isExtensible","extensible"],["isNotExtensible","notExtensible"],["isSealed","sealed"],["isNotSealed","notSealed"],["isFrozen","frozen"],["isNotFrozen","notFrozen"],["isEmpty","empty"],["isNotEmpty","notEmpty"],["isCallable","isFunction"],["isNotCallable","isNotFunction"],["containsSubset","containSubset"]];for(const[e,t]of hC)g[t]=g[e];var Rd=[];function wn(e){const t={use:wn,AssertionError:re,util:me,config:tt,expect:In,assert:g,Assertion:b,...vb};return~Rd.indexOf(e)||(e(t,me),Rd.push(e)),t}v(wn,"use");const dC=(e,t)=>{function n(o,s){t.addProperty(e.Assertion.prototype,o,function(){const c=e.Assertion.prototype[s];if(!c)throw new Error(`Cannot delegate to ${String(s)}: method not found. Ensure JestChaiExpect plugin is loaded first.`);return c.call(this)})}function r(o,s,...c){t.addProperty(e.Assertion.prototype,o,function(){const a=e.Assertion.prototype[s];if(!a)throw new Error(`Cannot delegate to ${String(s)}: method not found. Ensure JestChaiExpect plugin is loaded first.`);return a.call(this,...c)})}function i(o,s){t.addMethod(e.Assertion.prototype,o,function(...c){const a=e.Assertion.prototype[s];if(!a)throw new Error(`Cannot delegate to ${String(s)}: method not found. Ensure JestChaiExpect plugin is loaded first.`);return a.call(this,...c)})}n("called","toHaveBeenCalled"),n("calledOnce","toHaveBeenCalledOnce"),r("calledTwice","toHaveBeenCalledTimes",2),r("calledThrice","toHaveBeenCalledTimes",3),i("callCount","toHaveBeenCalledTimes"),i("calledWith","toHaveBeenCalledWith"),i("calledOnceWith","toHaveBeenCalledExactlyOnceWith"),i("lastCalledWith","toHaveBeenLastCalledWith"),i("nthCalledWith","toHaveBeenNthCalledWith"),i("returned","toHaveReturned"),i("returnedWith","toHaveReturnedWith"),i("returnedTimes","toHaveReturnedTimes"),i("lastReturnedWith","toHaveLastReturnedWith"),i("nthReturnedWith","toHaveNthReturnedWith"),i("calledBefore","toHaveBeenCalledBefore"),i("calledAfter","toHaveBeenCalledAfter")},oo=Symbol.for("matchers-object"),ei=Symbol.for("$$jest-matchers-object"),Vo=Symbol.for("expect-global"),rl=Symbol.for("asymmetric-matchers-object"),pC={toSatisfy(e,t,n){const{printReceived:r,printExpected:i,matcherHint:o}=this.utils,s=t(e);return{pass:s,message:()=>s?`${o(".not.toSatisfy","received","")}
|
|
123
123
|
|
|
124
124
|
Expected value to not satisfy:
|
|
125
125
|
${n||i(t)}
|
|
@@ -141,76 +141,76 @@ Expected value to be one of:
|
|
|
141
141
|
${o(t)}
|
|
142
142
|
|
|
143
143
|
Received:
|
|
144
|
-
${i(e)}`}}},
|
|
145
|
-
`:"",o=`${e} has value: ${n(t)}`;return i+o}function
|
|
144
|
+
${i(e)}`}}},so=Me.green,il=Me.red,mC=Me.inverse,gC=Me.bold,cn=Me.dim;function yC(e,t="received",n="expected",r={}){const{comment:i="",isDirectExpectCall:o=!1,isNot:s=!1,promise:c="",secondArgument:a="",expectedColor:u=so,receivedColor:l=il,secondArgumentColor:f=so}=r;let h="",d="expect";return!o&&t!==""&&(h+=cn(`${d}(`)+l(t),d=")"),c!==""&&(h+=cn(`${d}.`)+c,d=""),s&&(h+=`${cn(`${d}.`)}not`,d=""),e.includes(".")?d+=e:(h+=cn(`${d}.`)+e,d=""),n===""?d+="()":(h+=cn(`${d}(`)+u(n),a&&(h+=cn(", ")+f(a)),d=")"),i!==""&&(d+=` // ${i}`),d!==""&&(h+=cn(d)),h}const bC="·";function Ab(e){return e.replace(/\s+$/gm,t=>bC.repeat(t.length))}function wC(e){return il(Ab(Tt(e)))}function xC(e){return so(Ab(Tt(e)))}function kb(){return{EXPECTED_COLOR:so,RECEIVED_COLOR:il,INVERTED_COLOR:mC,BOLD_WEIGHT:gC,DIM_COLOR:cn,diff:rr,matcherHint:yC,printReceived:wC,printExpected:xC,printDiffOrStringify:n1,printWithType:SC}}function SC(e,t,n){const r=Lr(t),i=r!=="null"&&r!=="undefined"?`${e} has type: ${r}
|
|
145
|
+
`:"",o=`${e} has value: ${n(t)}`;return i+o}function EC(e){if(!Array.isArray(e))throw new TypeError(`expect.customEqualityTesters: Must be set to an array of Testers. Was given "${Lr(e)}"`);globalThis[ei].customEqualityTesters.push(...e)}function ol(){return globalThis[ei].customEqualityTesters}function te(e,t,n,r){return n=n||[],vr(e,t,[],[],n,r?Ib:AC)}function Ld(e){return!!e&&typeof e=="object"&&"asymmetricMatch"in e&&kt("Function",e.asymmetricMatch)}function TC(e,t,n){const r=Ld(e),i=Ld(t);if(!(r&&i)){if(r)return e.asymmetricMatch(t,n);if(i)return t.asymmetricMatch(e,n)}}function Kn(e){if(typeof Error.isError=="function")return Error.isError(e);switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return e instanceof Error}}function vr(e,t,n,r,i,o){let s=!0;const c=TC(e,t,i);if(c!==void 0)return c;const a={equals:te};for(let m=0;m<i.length;m++){const p=i[m].call(a,e,t,i);if(p!==void 0)return p}if(typeof URL=="function"&&e instanceof URL&&t instanceof URL)return e.href===t.href;if(Object.is(e,t))return!0;if(e===null||t===null)return e===t;const u=Object.prototype.toString.call(e);if(u!==Object.prototype.toString.call(t))return!1;switch(u){case"[object Boolean]":case"[object String]":case"[object Number]":return typeof e!=typeof t?!1:typeof e!="object"&&typeof t!="object"?Object.is(e,t):Object.is(e.valueOf(),t.valueOf());case"[object Date]":{const m=+e,p=+t;return m===p||Number.isNaN(m)&&Number.isNaN(p)}case"[object RegExp]":return e.source===t.source&&e.flags===t.flags;case"[object Temporal.Instant]":case"[object Temporal.ZonedDateTime]":case"[object Temporal.PlainDateTime]":case"[object Temporal.PlainDate]":case"[object Temporal.PlainTime]":case"[object Temporal.PlainYearMonth]":case"[object Temporal.PlainMonthDay]":return e.equals(t);case"[object Temporal.Duration]":return e.toString()===t.toString()}if(typeof e!="object"||typeof t!="object")return!1;if(Bd(e)&&Bd(t))return e.isEqualNode(t);let l=n.length;for(;l--;){if(n[l]===e)return r[l]===t;if(r[l]===t)return!1}if(n.push(e),r.push(t),u==="[object Array]"&&e.length!==t.length)return!1;if(Kn(e)&&Kn(t))try{return vC(e,t,n,r,i,o)}finally{n.pop(),r.pop()}const f=Dd(e,o);let h,d=f.length;if(Dd(t,o).length!==d)return!1;for(;d--;)if(h=f[d],s=o(t,h)&&vr(e[h],t[h],n,r,i,o),!s)return!1;return n.pop(),r.pop(),s}function vC(e,t,n,r,i,o){let s=Object.prototype.toString.call(e)===Object.prototype.toString.call(t)&&e.name===t.name&&e.message===t.message;return typeof t.cause<"u"&&s&&(s=vr(e.cause,t.cause,n,r,i,o)),e instanceof AggregateError&&t instanceof AggregateError&&s&&(s=vr(e.errors,t.errors,n,r,i,o)),s&&(s=vr({...e},{...t},n,r,i,o)),s}function Dd(e,t){const n=[];for(const r in e)t(e,r)&&n.push(r);return n.concat(Object.getOwnPropertySymbols(e).filter(r=>Object.getOwnPropertyDescriptor(e,r).enumerable))}function AC(e,t){return Ib(e,t)&&e[t]!==void 0}function Ib(e,t){return Object.hasOwn(e,t)}function kt(e,t){return Object.prototype.toString.apply(t)===`[object ${e}]`}function Bd(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"&&"nodeName"in e&&typeof e.nodeName=="string"&&"isEqualNode"in e&&typeof e.isEqualNode=="function"}const Cb="@@__IMMUTABLE_KEYED__@@",_b="@@__IMMUTABLE_SET__@@",kC="@@__IMMUTABLE_LIST__@@",qo="@@__IMMUTABLE_ORDERED__@@",IC="@@__IMMUTABLE_RECORD__@@";function CC(e){return!!(e&&e[Cb]&&!e[qo])}function _C(e){return!!(e&&e[_b]&&!e[qo])}function Wo(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}function $C(e){return!!(e&&Wo(e)&&e[kC])}function MC(e){return!!(e&&Wo(e)&&e[Cb]&&e[qo])}function OC(e){return!!(e&&Wo(e)&&e[_b]&&e[qo])}function PC(e){return!!(e&&Wo(e)&&e[IC])}const $b=Symbol.iterator;function Ud(e){return!!(e!=null&&e[$b])}function at(e,t,n=[],r=[],i=[]){if(typeof e!="object"||typeof t!="object"||Array.isArray(e)||Array.isArray(t)||!Ud(e)||!Ud(t))return;if(e.constructor!==t.constructor)return!1;let o=r.length;for(;o--;)if(r[o]===e)return i[o]===t;r.push(e),i.push(t);const s=[...n.filter(u=>u!==at),c];function c(u,l){return at(u,l,[...n],[...r],[...i])}if(e.size!==void 0){if(e.size!==t.size)return!1;if(kt("Set",e)||_C(e)){let u=!0;for(const l of e)if(!t.has(l)){let f=!1;for(const h of t)te(l,h,s)===!0&&(f=!0);if(f===!1){u=!1;break}}return r.pop(),i.pop(),u}else if(kt("Map",e)||CC(e)){let u=!0;for(const l of e)if(!t.has(l[0])||!te(l[1],t.get(l[0]),s)){let f=!1;for(const h of t){const d=te(l[0],h[0],s);let m=!1;d===!0&&(m=te(l[1],h[1],s)),m===!0&&(f=!0)}if(f===!1){u=!1;break}}return r.pop(),i.pop(),u}}const a=t[$b]();for(const u of e){const l=a.next();if(l.done||!te(u,l.value,s))return!1}if(!a.next().done)return!1;if(!$C(e)&&!MC(e)&&!OC(e)&&!PC(e)){const u=Object.entries(e),l=Object.entries(t);if(!te(u,l,s))return!1}return r.pop(),i.pop(),!0}function sl(e,t){return!e||typeof e!="object"||e===Object.prototype?!1:Object.hasOwn(e,t)||sl(Object.getPrototypeOf(e),t)}function NC(e){return Bt(e)&&!Kn(e)&&!Array.isArray(e)&&!(e instanceof Date)&&!(e instanceof Set)&&!(e instanceof Map)}function sr(e,t,n=[]){const r=n.filter(o=>o!==sr),i=(o=new WeakMap)=>(s,c)=>{if(NC(c))return Object.keys(c).every(a=>{if(c[a]!=null&&typeof c[a]=="object"){if(o.has(c[a]))return te(s[a],c[a],r);o.set(c[a],!0)}const u=s!=null&&sl(s,a)&&te(s[a],c[a],[...r,i(o)]);return o.delete(c[a]),u})};return i()(e,t)}function Vd(e,t){if(!(e==null||t==null||e.constructor===t.constructor))return!1}function qd(e,t){let n=e,r=t;if(!(e instanceof DataView&&t instanceof DataView)){if(!(e instanceof ArrayBuffer)||!(t instanceof ArrayBuffer))return;try{n=new DataView(e),r=new DataView(t)}catch{return}}if(n.byteLength!==r.byteLength)return!1;for(let i=0;i<n.byteLength;i++)if(n.getUint8(i)!==r.getUint8(i))return!1;return!0}function ec(e,t,n=[]){if(!Array.isArray(e)||!Array.isArray(t))return;const r=Object.keys(e),i=Object.keys(t),o=n.filter(s=>s!==ec);return te(e,t,o,!0)&&te(r,i)}function jC(e,t="#{this}",n="#{exp}"){const r=`expected ${t} to be ${n} // Object.is equality`;return["toStrictEqual","toEqual"].includes(e)?`${r}
|
|
146
146
|
|
|
147
147
|
If it should pass with deep equality, replace "toBe" with "${e}"
|
|
148
148
|
|
|
149
149
|
Expected: ${t}
|
|
150
150
|
Received: serializes to the same string
|
|
151
|
-
`:r}function
|
|
152
|
-
`,u].join(""))}}),{then(c,a){return s=!0,t.then(c,a)},catch(c){return s=!0,t.catch(c)},finally(c){return s=!0,t.finally(c)},[Symbol.toStringTag]:"Promise"}}return t}function
|
|
153
|
-
(${m} matching ${m===1?"property":"properties"} omitted from actual)`;throw new n(y,{showDiff:!0,expected:u,actual:d})}}),i("toMatch",function(u){const l=this._obj;if(typeof l!="string")throw new TypeError(`.toMatch() expects to receive a string, but got ${typeof l}`);return this.assert(typeof u=="string"?l.includes(u):l.match(u),"expected #{this} to match #{exp}","expected #{this} not to match #{exp}",u,l)}),i("toContain",function(u){const l=this._obj;if(typeof Node<"u"&&l instanceof Node){if(!(u instanceof Node))throw new TypeError(`toContain() expected a DOM node as the argument, but got ${typeof u}`);return this.assert(l.contains(u),"expected #{this} to contain element #{exp}","expected #{this} not to contain element #{exp}",u,l)}if(typeof DOMTokenList<"u"&&l instanceof DOMTokenList){Je(u,"class name",["string"]);const h=t.flag(this,"negate")?l.value.replace(u,"").trim():`${l.value} ${u}`;return this.assert(l.contains(u),`expected "${l.value}" to contain "${u}"`,`expected "${l.value}" not to contain "${u}"`,h,l.value)}return typeof l=="string"&&typeof u=="string"?this.assert(l.includes(u),"expected #{this} to contain #{exp}","expected #{this} not to contain #{exp}",u,l):(l!=null&&typeof l!="string"&&t.flag(this,"object",Array.from(l)),this.contain(u))}),i("toContainEqual",function(u){const l=t.flag(this,"object"),f=Array.from(l).findIndex(h=>te(h,u,r));this.assert(f!==-1,"expected #{this} to deep equally contain #{exp}","expected #{this} to not deep equally contain #{exp}",u)}),i("toBeTruthy",function(){const u=t.flag(this,"object");this.assert(!!u,"expected #{this} to be truthy","expected #{this} to not be truthy",!0,u)}),i("toBeFalsy",function(){const u=t.flag(this,"object");this.assert(!u,"expected #{this} to be falsy","expected #{this} to not be falsy",!1,u)}),i("toBeGreaterThan",function(u){const l=this._obj;return Je(l,"actual",["number","bigint"]),Je(u,"expected",["number","bigint"]),this.assert(l>u,`expected ${l} to be greater than ${u}`,`expected ${l} to be not greater than ${u}`,u,l,!1)}),i("toBeGreaterThanOrEqual",function(u){const l=this._obj;return Je(l,"actual",["number","bigint"]),Je(u,"expected",["number","bigint"]),this.assert(l>=u,`expected ${l} to be greater than or equal to ${u}`,`expected ${l} to be not greater than or equal to ${u}`,u,l,!1)}),i("toBeLessThan",function(u){const l=this._obj;return Je(l,"actual",["number","bigint"]),Je(u,"expected",["number","bigint"]),this.assert(l<u,`expected ${l} to be less than ${u}`,`expected ${l} to be not less than ${u}`,u,l,!1)}),i("toBeLessThanOrEqual",function(u){const l=this._obj;return Je(l,"actual",["number","bigint"]),Je(u,"expected",["number","bigint"]),this.assert(l<=u,`expected ${l} to be less than or equal to ${u}`,`expected ${l} to be not less than or equal to ${u}`,u,l,!1)}),i("toBeNaN",function(){const u=t.flag(this,"object");this.assert(Number.isNaN(u),"expected #{this} to be NaN","expected #{this} not to be NaN",Number.NaN,u)}),i("toBeUndefined",function(){const u=t.flag(this,"object");this.assert(u===void 0,"expected #{this} to be undefined","expected #{this} not to be undefined",void 0,u)}),i("toBeNull",function(){const u=t.flag(this,"object");this.assert(u===null,"expected #{this} to be null","expected #{this} not to be null",null,u)}),i("toBeNullable",function(){const u=t.flag(this,"object");this.assert(u==null,"expected #{this} to be nullish","expected #{this} not to be nullish",null,u)}),i("toBeDefined",function(){const u=t.flag(this,"object");this.assert(typeof u<"u","expected #{this} to be defined","expected #{this} to be undefined",u)}),i("toBeTypeOf",function(u){const l=typeof this._obj,f=u===l;return this.assert(f,"expected #{this} to be type of #{exp}","expected #{this} not to be type of #{exp}",u,l)}),i("toBeInstanceOf",function(u){return this.instanceOf(u)}),i("toHaveLength",function(u){return this.have.length(u)}),i("toHaveProperty",function(...u){Array.isArray(u[0])&&(u[0]=u[0].map(T=>String(T).replace(/([.[\]])/g,"\\$1")).join("."));const l=this._obj,[f,h]=u,d=()=>Object.hasOwn(l,f)?{value:l[f],exists:!0}:t.getPathInfo(l,f),{value:m,exists:p}=d(),y=p&&(u.length===1||te(h,m,r)),x=u.length===1?"":` with value ${t.objDisplay(h)}`;return this.assert(y,`expected #{this} to have property "${f}"${x}`,`expected #{this} to not have property "${f}"${x}`,h,p?m:void 0)}),i("toBeCloseTo",function(u,l=2){const f=this._obj;let h=!1,d=0,m=0;return u===Number.POSITIVE_INFINITY&&f===Number.POSITIVE_INFINITY||u===Number.NEGATIVE_INFINITY&&f===Number.NEGATIVE_INFINITY?h=!0:(d=10**-l/2,m=Math.abs(f-u),h=m<d),this.assert(h,`expected #{this} to be close to #{exp}, received difference is ${m}, but expected ${d}`,`expected #{this} to not be close to #{exp}, received difference is ${m}, but expected ${d}`,u,f,!1)});function o(u){if(!Tn(u._obj))throw new TypeError(`${t.inspect(u._obj)} is not a spy or a call to a spy!`)}function s(u){return o(u),u._obj}i(["toHaveBeenCalledTimes","toBeCalledTimes"],function(u){const l=s(this),f=l.getMockName(),h=l.mock.calls.length;return this.assert(h===u,`expected "${f}" to be called #{exp} times, but got ${h} times`,`expected "${f}" to not be called #{exp} times`,u,h,!1)}),i("toHaveBeenCalledOnce",function(){const u=s(this),l=u.getMockName(),f=u.mock.calls.length;return this.assert(f===1,`expected "${l}" to be called once, but got ${f} times`,`expected "${l}" to not be called once`,1,f,!1)}),i(["toHaveBeenCalled","toBeCalled"],function(){const u=s(this),l=u.getMockName(),f=u.mock.calls.length,h=f>0,d=t.flag(this,"negate");let m=t.getMessage(this,[h,`expected "${l}" to be called at least once`,`expected "${l}" to not be called at all, but actually been called ${f} times`,!0,h]);if(h&&d&&(m=Fs(u,m)),h&&d||!h&&!d)throw new n(m)});function c(u,l){return u.length===l.length&&u.every((f,h)=>te(f,l[h],[...r,ot]))}i(["toHaveBeenCalledWith","toBeCalledWith"],function(...u){const l=s(this),f=l.getMockName(),h=l.mock.calls.some(p=>c(p,u)),d=t.flag(this,"negate"),m=t.getMessage(this,[h,`expected "${f}" to be called with arguments: #{exp}`,`expected "${f}" to not be called with arguments: #{exp}`,u]);if(h&&d||!h&&!d)throw new n(Fs(l,m,u))}),i("toHaveBeenCalledExactlyOnceWith",function(...u){const l=s(this),f=l.getMockName(),h=l.mock.calls.length,m=l.mock.calls.some(x=>c(x,u))&&h===1,p=t.flag(this,"negate"),y=t.getMessage(this,[m,`expected "${f}" to be called once with arguments: #{exp}`,`expected "${f}" to not be called once with arguments: #{exp}`,u]);if(m&&p||!m&&!p)throw new n(Fs(l,y,u))}),i("toHaveBeenNthCalledWith",function(u,...l){const f=s(this),h=f.getMockName(),d=f.mock.calls[u-1],m=f.mock.calls.length,p=u<=m;this.assert(d&&c(d,l),`expected ${En(u)} "${h}" call to have been called with #{exp}${p?"":`, but called only ${m} times`}`,`expected ${En(u)} "${h}" call to not have been called with #{exp}`,l,d,p)}),i("toHaveBeenLastCalledWith",function(...u){const l=s(this),f=l.getMockName(),h=l.mock.calls.at(-1);this.assert(h&&c(h,u),`expected last "${f}" call to have been called with #{exp}`,`expected last "${f}" call to not have been called with #{exp}`,u,h)});function a(u,l,f){const h=u.mock.invocationCallOrder,d=l.mock.invocationCallOrder;return h.length===0?!f:d.length===0?!1:h[0]<d[0]}i(["toHaveBeenCalledBefore"],function(u,l=!0){const f=s(this);if(!Tn(u))throw new TypeError(`${t.inspect(u)} is not a spy or a call to a spy`);this.assert(a(f,u,l),`expected "${f.getMockName()}" to have been called before "${u.getMockName()}"`,`expected "${f.getMockName()}" to not have been called before "${u.getMockName()}"`,u,f)}),i(["toHaveBeenCalledAfter"],function(u,l=!0){const f=s(this);if(!Tn(u))throw new TypeError(`${t.inspect(u)} is not a spy or a call to a spy`);this.assert(a(u,f,l),`expected "${f.getMockName()}" to have been called after "${u.getMockName()}"`,`expected "${f.getMockName()}" to not have been called after "${u.getMockName()}"`,u,f)}),i(["toThrow","toThrowError"],function(u){if(typeof u=="string"||typeof u>"u"||u instanceof RegExp)return this.throws(u===""?/^$/:u);const l=this._obj,f=t.flag(this,"promise"),h=t.flag(this,"negate");let d=null;if(f==="rejects")d=l;else if(f==="resolves"&&typeof l!="function"){if(h)return;{const p=t.flag(this,"message")||"expected promise to throw an error, but it didn't",y={showDiff:!1};throw new n(p,y,t.flag(this,"ssfi"))}}else{let p=!1;try{l()}catch(y){p=!0,d=y}if(!p&&!h){const y=t.flag(this,"message")||"expected function to throw an error, but it didn't",x={showDiff:!1};throw new n(y,x,t.flag(this,"ssfi"))}}if(typeof u=="function"){const p=u.name||u.prototype.constructor.name;return this.assert(d&&d instanceof u,`expected error to be instance of ${p}`,`expected error not to be instance of ${p}`,u,d)}if(zn(u)){const p=te(d,u,[...r,ot]);return this.assert(p,"expected a thrown error to be #{exp}","expected a thrown error not to be #{exp}",u,d)}if(typeof u=="object"&&"asymmetricMatch"in u&&typeof u.asymmetricMatch=="function"){const p=u;return this.assert(d&&p.asymmetricMatch(d),"expected error to match asymmetric matcher","expected error not to match asymmetric matcher",p,d)}const m=te(d,u,[...r,ot]);return this.assert(m,"expected a thrown value to equal #{exp}","expected a thrown value not to equal #{exp}",u,d)}),[{name:"toHaveResolved",condition:u=>u.mock.settledResults.length>0&&u.mock.settledResults.some(({type:l})=>l==="fulfilled"),action:"resolved"},{name:["toHaveReturned","toReturn"],condition:u=>u.mock.calls.length>0&&u.mock.results.some(({type:l})=>l!=="throw"),action:"called"}].forEach(({name:u,condition:l,action:f})=>{i(u,function(){const h=s(this),d=h.getMockName(),m=l(h);this.assert(m,`expected "${d}" to be successfully ${f} at least once`,`expected "${d}" to not be successfully ${f}`,m,!m,!1)})}),[{name:"toHaveResolvedTimes",condition:(u,l)=>u.mock.settledResults.reduce((f,{type:h})=>h==="fulfilled"?++f:f,0)===l,action:"resolved"},{name:["toHaveReturnedTimes","toReturnTimes"],condition:(u,l)=>u.mock.results.reduce((f,{type:h})=>h==="throw"?f:++f,0)===l,action:"called"}].forEach(({name:u,condition:l,action:f})=>{i(u,function(h){const d=s(this),m=d.getMockName(),p=l(d,h);this.assert(p,`expected "${m}" to be successfully ${f} ${h} times`,`expected "${m}" to not be successfully ${f} ${h} times`,`expected resolved times: ${h}`,`received resolved times: ${p}`,!1)})}),[{name:"toHaveResolvedWith",condition:(u,l)=>u.mock.settledResults.some(({type:f,value:h})=>f==="fulfilled"&&te(l,h)),action:"resolve"},{name:["toHaveReturnedWith","toReturnWith"],condition:(u,l)=>u.mock.results.some(({type:f,value:h})=>f==="return"&&te(l,h)),action:"return"}].forEach(({name:u,condition:l,action:f})=>{i(u,function(h){const d=s(this),m=l(d,h),p=t.flag(this,"negate");if(m&&p||!m&&!p){const y=d.getMockName(),x=t.getMessage(this,[m,`expected "${y}" to ${f} with: #{exp} at least once`,`expected "${y}" to not ${f} with: #{exp}`,h]),T=f==="return"?d.mock.results:d.mock.settledResults;throw new n(iC(d,T,x,h))}})}),[{name:"toHaveLastResolvedWith",condition:(u,l)=>{const f=u.mock.settledResults.at(-1);return!!(f&&f.type==="fulfilled"&&te(f.value,l))},action:"resolve"},{name:"toHaveLastReturnedWith",condition:(u,l)=>{const f=u.mock.results.at(-1);return!!(f&&f.type==="return"&&te(f.value,l))},action:"return"}].forEach(({name:u,condition:l,action:f})=>{i(u,function(h){const d=s(this),p=(f==="return"?d.mock.results:d.mock.settledResults).at(-1),y=d.getMockName();this.assert(l(d,h),`expected last "${y}" call to ${f} #{exp}`,`expected last "${y}" call to not ${f} #{exp}`,h,p==null?void 0:p.value)})}),[{name:"toHaveNthResolvedWith",condition:(u,l,f)=>{const h=u.mock.settledResults[l-1];return h&&h.type==="fulfilled"&&te(h.value,f)},action:"resolve"},{name:"toHaveNthReturnedWith",condition:(u,l,f)=>{const h=u.mock.results[l-1];return h&&h.type==="return"&&te(h.value,f)},action:"return"}].forEach(({name:u,condition:l,action:f})=>{i(u,function(h,d){const m=s(this),p=m.getMockName(),x=(f==="return"?m.mock.results:m.mock.settledResults)[h-1],T=`${En(h)} call`;this.assert(l(m,h,d),`expected ${T} "${p}" call to ${f} #{exp}`,`expected ${T} "${p}" call to not ${f} #{exp}`,d,x==null?void 0:x.value)})}),i("withContext",function(u){for(const l in u)t.flag(this,l,u[l]);return this}),t.addProperty(e.Assertion.prototype,"resolves",function(){const l=new Error("resolves");t.flag(this,"promise","resolves"),t.flag(this,"error",l);const f=t.flag(this,"vitest-test"),h=t.flag(this,"object");if(t.flag(this,"poll"))throw new SyntaxError("expect.poll() is not supported in combination with .resolves");if(typeof(h==null?void 0:h.then)!="function")throw new TypeError(`You must provide a Promise to expect() when using .resolves, not '${typeof h}'.`);const d=new Proxy(this,{get:(m,p,y)=>{const x=Reflect.get(m,p,y);return typeof x!="function"?x instanceof e.Assertion?d:x:(...T)=>{t.flag(this,"_name",p);const O=Promise.resolve(h).then(k=>(t.flag(this,"object",k),x.call(this,...T)),k=>{const _=new n(`promise rejected "${t.inspect(k)}" instead of resolving`,{showDiff:!1});throw _.cause=k,_}).catch(k=>{throw zn(k)&&l.stack&&(k.stack=l.stack.replace(l.message,k.message)),k});return Ya(f,O,Ha(t,this,!!T.length),l,t.flag(this,"soft"))}}});return d}),t.addProperty(e.Assertion.prototype,"rejects",function(){const l=new Error("rejects");t.flag(this,"promise","rejects"),t.flag(this,"error",l);const f=t.flag(this,"vitest-test"),h=t.flag(this,"object"),d=typeof h=="function"?h():h;if(t.flag(this,"poll"))throw new SyntaxError("expect.poll() is not supported in combination with .rejects");if(typeof(d==null?void 0:d.then)!="function")throw new TypeError(`You must provide a Promise to expect() when using .rejects, not '${typeof d}'.`);const m=new Proxy(this,{get:(p,y,x)=>{const T=Reflect.get(p,y,x);return typeof T!="function"?T instanceof e.Assertion?m:T:(...O)=>{t.flag(this,"_name",y);const k=Promise.resolve(d).then(_=>{throw new n(`promise resolved "${t.inspect(_)}" instead of rejecting`,{showDiff:!0,expected:new Error("rejected promise"),actual:_})},_=>(t.flag(this,"object",_),T.call(this,...O))).catch(_=>{throw zn(_)&&l.stack&&(_.stack=l.stack.replace(l.message,_.message)),_});return Ya(f,k,Ha(t,this,!!O.length),l,t.flag(this,"soft"))}}});return m})};function Fs(e,t,n){return e.mock.calls.length&&(t+=Me.gray(`
|
|
151
|
+
`:r}function FC(e,t){return`${t} ${e}${t===1?"":"s"}`}function Bs(e){return[...Object.keys(e),...Object.getOwnPropertySymbols(e).filter(t=>{var n;return(n=Object.getOwnPropertyDescriptor(e,t))==null?void 0:n.enumerable})]}function RC(e,t,n){let r=0;const i=(o=new WeakMap)=>(s,c)=>{if(Array.isArray(s)){if(Array.isArray(c)&&c.length===s.length)return c.map((a,u)=>i(o)(s[u],a))}else{if(s instanceof Date)return s;if(Bt(s)&&Bt(c)){if(te(s,c,[...n,at,sr]))return c;const a={};o.set(s,a),typeof s.constructor=="function"&&typeof s.constructor.name=="string"&&Object.defineProperty(a,"constructor",{enumerable:!1,value:s.constructor});for(const u of Bs(s))sl(c,u)?a[u]=o.has(s[u])?o.get(s[u]):i(o)(s[u],c[u]):o.has(s[u])||(r+=1,Bt(s[u])&&(r+=Bs(s[u]).length),i(o)(s[u],c[u]));if(Bs(a).length>0)return a}}return s};return{subset:i()(e,t),stripped:r}}function LC(e){return!!e&&(typeof e=="object"||typeof e=="function")&&e["~standard"]&&typeof e["~standard"].validate=="function"}if(!Object.hasOwn(globalThis,oo)){const e=new WeakMap,t=Object.create(null),n=[],r=Object.create(null);Object.defineProperty(globalThis,oo,{get:()=>e}),Object.defineProperty(globalThis,ei,{configurable:!0,get:()=>({state:e.get(globalThis[Vo]),matchers:t,customEqualityTesters:n})}),Object.defineProperty(globalThis,rl,{get:()=>r})}function Ar(e){return globalThis[oo].get(e)}function Us(e,t){const n=globalThis[oo],r=n.get(t)||{},i=Object.defineProperties(r,{...Object.getOwnPropertyDescriptors(r),...Object.getOwnPropertyDescriptors(e)});n.set(t,i)}let Wt=class{constructor(t,n=!1){R(this,"$$typeof",Symbol.for("jest.asymmetricMatcher"));this.sample=t,this.inverse=n}getMatcherContext(t){return{...Ar(t||globalThis[Vo]),equals:te,isNot:this.inverse,customTesters:ol(),utils:{...kb(),diff:rr,stringify:Tt,iterableEquality:at,subsetEquality:sr}}}};Wt.prototype[Symbol.for("chai/inspect")]=function(e){const t=Tt(this,e.depth,{min:!0});return t.length<=e.truncate?t:`${this.toString()}{…}`};class Wd extends Wt{constructor(t,n=!1){if(!kt("String",t))throw new Error("Expected is not a string");super(t,n)}asymmetricMatch(t){const n=kt("String",t)&&t.includes(this.sample);return this.inverse?!n:n}toString(){return`String${this.inverse?"Not":""}Containing`}getExpectedType(){return"string"}}class DC extends Wt{asymmetricMatch(t){return t!=null}toString(){return"Anything"}toAsymmetricMatcher(){return"Anything"}}class zd extends Wt{constructor(t,n=!1){super(t,n)}getPrototype(t){return Object.getPrototypeOf?Object.getPrototypeOf(t):t.constructor.prototype===t?null:t.constructor.prototype}hasProperty(t,n){return t?Object.hasOwn(t,n)?!0:this.hasProperty(this.getPrototype(t),n):!1}getProperties(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t).filter(n=>{var r;return(r=Object.getOwnPropertyDescriptor(t,n))==null?void 0:r.enumerable})]}asymmetricMatch(t,n){if(typeof this.sample!="object")throw new TypeError(`You must provide an object to ${this.toString()}, not '${typeof this.sample}'.`);let r=!0;const i=this.getProperties(this.sample);for(const o of i){if(!this.hasProperty(t,o)){r=!1;break}const s=this.sample[o],c=t[o];if(!te(s,c,n)){r=!1;break}}return this.inverse?!r:r}toString(){return`Object${this.inverse?"Not":""}Containing`}getExpectedType(){return"object"}}class Gd extends Wt{constructor(t,n=!1){super(t,n)}asymmetricMatch(t,n){if(!Array.isArray(this.sample))throw new TypeError(`You must provide an array to ${this.toString()}, not '${typeof this.sample}'.`);const r=this.sample.length===0||Array.isArray(t)&&this.sample.every(i=>t.some(o=>te(i,o,n)));return this.inverse?!r:r}toString(){return`Array${this.inverse?"Not":""}Containing`}getExpectedType(){return"array"}}class BC extends Wt{constructor(t){if(typeof t>"u")throw new TypeError("any() expects to be passed a constructor function. Please pass one or use anything() to match any object.");super(t)}fnNameFor(t){if(t.name)return t.name;const r=Function.prototype.toString.call(t).match(/^(?:async)?\s*function\s*(?:\*\s*)?([\w$]+)\s*\(/);return r?r[1]:"<anonymous>"}asymmetricMatch(t){return this.sample===String?typeof t=="string"||t instanceof String:this.sample===Number?typeof t=="number"||t instanceof Number:this.sample===Function?typeof t=="function"||typeof t=="function":this.sample===Boolean?typeof t=="boolean"||t instanceof Boolean:this.sample===BigInt?typeof t=="bigint"||t instanceof BigInt:this.sample===Symbol?typeof t=="symbol"||t instanceof Symbol:this.sample===Object?typeof t=="object":t instanceof this.sample}toString(){return"Any"}getExpectedType(){return this.sample===String?"string":this.sample===Number?"number":this.sample===Function?"function":this.sample===Object?"object":this.sample===Boolean?"boolean":this.fnNameFor(this.sample)}toAsymmetricMatcher(){return`Any<${this.fnNameFor(this.sample)}>`}}class Kd extends Wt{constructor(t,n=!1){if(!kt("String",t)&&!kt("RegExp",t))throw new Error("Expected is not a String or a RegExp");super(new RegExp(t),n)}asymmetricMatch(t){const n=kt("String",t)&&this.sample.test(t);return this.inverse?!n:n}toString(){return`String${this.inverse?"Not":""}Matching`}getExpectedType(){return"string"}}class Hd extends Wt{constructor(n,r=2,i=!1){if(!kt("Number",n))throw new Error("Expected is not a Number");if(!kt("Number",r))throw new Error("Precision is not a Number");super(n);R(this,"precision");this.inverse=i,this.precision=r}asymmetricMatch(n){if(!kt("Number",n))return!1;let r=!1;return n===Number.POSITIVE_INFINITY&&this.sample===Number.POSITIVE_INFINITY||n===Number.NEGATIVE_INFINITY&&this.sample===Number.NEGATIVE_INFINITY?r=!0:r=Math.abs(this.sample-n)<10**-this.precision/2,this.inverse?!r:r}toString(){return`Number${this.inverse?"Not":""}CloseTo`}getExpectedType(){return"number"}toAsymmetricMatcher(){return[this.toString(),this.sample,`(${FC("digit",this.precision)})`].join(" ")}}class Yd extends Wt{constructor(n,r=!1){if(!LC(n))throw new TypeError("SchemaMatching expected to receive a Standard Schema.");super(n,r);R(this,"result")}asymmetricMatch(n){const r=this.sample["~standard"].validate(n);if(r instanceof Promise)throw new TypeError("Async schema validation is not supported in asymmetric matchers.");this.result=r;const i=!this.result.issues||this.result.issues.length===0;return this.inverse?!i:i}toString(){return`Schema${this.inverse?"Not":""}Matching`}getExpectedType(){return"object"}toAsymmetricMatcher(){var i;const{utils:n}=this.getMatcherContext();return(((i=this.result)==null?void 0:i.issues)||[]).length>0?`${this.toString()} ${n.stringify(this.result,void 0,{printBasicPrototype:!1})}`:this.toString()}}const UC=(e,t)=>{t.addMethod(e.expect,"anything",()=>new DC),t.addMethod(e.expect,"any",n=>new BC(n)),t.addMethod(e.expect,"stringContaining",n=>new Wd(n)),t.addMethod(e.expect,"objectContaining",n=>new zd(n)),t.addMethod(e.expect,"arrayContaining",n=>new Gd(n)),t.addMethod(e.expect,"stringMatching",n=>new Kd(n)),t.addMethod(e.expect,"closeTo",(n,r)=>new Hd(n,r)),t.addMethod(e.expect,"schemaMatching",n=>new Yd(n)),e.expect.not={stringContaining:n=>new Wd(n,!0),objectContaining:n=>new zd(n,!0),arrayContaining:n=>new Gd(n,!0),stringMatching:n=>new Kd(n,!0),closeTo:(n,r)=>new Hd(n,r,!0),schemaMatching:n=>new Yd(n,!0)}};function tc(e,t,n){const r=e.flag(t,"soft")?".soft":"",i=e.flag(t,"negate")?"not.":"",o=`${e.flag(t,"_name")}(${n?"expected":""})`,s=e.flag(t,"promise"),c=s?`.${s}`:"";return`expect${r}(actual)${c}.${i}${o}`}function nc(e,t,n,r,i){const o=e;if(o&&t instanceof Promise){t=t.finally(()=>{if(!o.promises)return;const c=o.promises.indexOf(t);c!==-1&&o.promises.splice(c,1)}),o.promises||(o.promises=[]),i&&(t=t.then(qy,c=>{rc(o,c)})),o.promises.push(t);let s=!1;return o.onFinished??(o.onFinished=[]),o.onFinished.push(()=>{var c;if(!s){const u=(((c=globalThis.__vitest_worker__)==null?void 0:c.onFilterStackTrace)||(l=>l||""))(r.stack);console.warn([`Promise returned by \`${n}\` was not awaited. `,"Vitest currently auto-awaits hanging assertions at the end of the test, but this will cause the test to fail in the next Vitest major. ",`Please remember to await the assertion.
|
|
152
|
+
`,u].join(""))}}),{then(c,a){return s=!0,t.then(c,a)},catch(c){return s=!0,t.catch(c)},finally(c){return s=!0,t.finally(c)},[Symbol.toStringTag]:"Promise"}}return t}function rc(e,t){var n;e.result||(e.result={state:"fail"}),e.result.state="fail",(n=e.result).errors||(n.errors=[]),e.result.errors.push(i1(t))}function Wn(e,t,n){return function(...r){if(t!=="withTest"&&e.flag(this,"_name",t),!e.flag(this,"soft"))try{return n.apply(this,r)}finally{}const i=e.flag(this,"vitest-test");if(!i)throw new Error("expect.soft() can only be used inside a test");try{const o=n.apply(this,r);return o&&typeof o=="object"&&typeof o.then=="function"?o.then(qy,s=>{rc(i,s)}):o}catch(o){rc(i,o)}}}const VC=(e,t)=>{const{AssertionError:n}=e,r=ol();function i(u,l){const f=h=>{const d=Wn(t,h,l);t.addMethod(e.Assertion.prototype,h,d),t.addMethod(globalThis[ei].matchers,h,d)};Array.isArray(u)?u.forEach(h=>f(h)):f(u)}["throw","throws","Throw"].forEach(u=>{t.overwriteMethod(e.Assertion.prototype,u,l=>function(...f){const h=t.flag(this,"promise"),d=t.flag(this,"object"),m=t.flag(this,"negate");if(h==="rejects")t.flag(this,"object",()=>{throw d});else if(h==="resolves"&&typeof d!="function"){if(m)return;{const p=t.flag(this,"message")||"expected promise to throw an error, but it didn't",y={showDiff:!1};throw new n(p,y,t.flag(this,"ssfi"))}}l.apply(this,f)})}),i("withTest",function(u){return t.flag(this,"vitest-test",u),this}),i("toEqual",function(u){const l=t.flag(this,"object"),f=te(l,u,[...r,at]);return this.assert(f,"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",u,l)}),i("toStrictEqual",function(u){const l=t.flag(this,"object"),f=te(l,u,[...r,at,Vd,ec,qd],!0);return this.assert(f,"expected #{this} to strictly equal #{exp}","expected #{this} to not strictly equal #{exp}",u,l)}),i("toBe",function(u){const l=this._obj,f=Object.is(l,u);let h="";return f||(te(l,u,[...r,at,Vd,ec,qd],!0)?h="toStrictEqual":te(l,u,[...r,at])&&(h="toEqual")),this.assert(f,jC(h),"expected #{this} not to be #{exp} // Object.is equality",u,l)}),i("toMatchObject",function(u){const l=this._obj,f=te(l,u,[...r,at,sr]),h=t.flag(this,"negate"),{subset:d,stripped:m}=RC(l,u,r);if(f&&h||!f&&!h){const p=t.getMessage(this,[f,"expected #{this} to match object #{exp}","expected #{this} to not match object #{exp}",u,d,!1]),y=m===0?p:`${p}
|
|
153
|
+
(${m} matching ${m===1?"property":"properties"} omitted from actual)`;throw new n(y,{showDiff:!0,expected:u,actual:d})}}),i("toMatch",function(u){const l=this._obj;if(typeof l!="string")throw new TypeError(`.toMatch() expects to receive a string, but got ${typeof l}`);return this.assert(typeof u=="string"?l.includes(u):l.match(u),"expected #{this} to match #{exp}","expected #{this} not to match #{exp}",u,l)}),i("toContain",function(u){const l=this._obj;if(typeof Node<"u"&&l instanceof Node){if(!(u instanceof Node))throw new TypeError(`toContain() expected a DOM node as the argument, but got ${typeof u}`);return this.assert(l.contains(u),"expected #{this} to contain element #{exp}","expected #{this} not to contain element #{exp}",u,l)}if(typeof DOMTokenList<"u"&&l instanceof DOMTokenList){Ze(u,"class name",["string"]);const h=t.flag(this,"negate")?l.value.replace(u,"").trim():`${l.value} ${u}`;return this.assert(l.contains(u),`expected "${l.value}" to contain "${u}"`,`expected "${l.value}" not to contain "${u}"`,h,l.value)}return typeof l=="string"&&typeof u=="string"?this.assert(l.includes(u),"expected #{this} to contain #{exp}","expected #{this} not to contain #{exp}",u,l):(l!=null&&typeof l!="string"&&t.flag(this,"object",Array.from(l)),this.contain(u))}),i("toContainEqual",function(u){const l=t.flag(this,"object"),f=Array.from(l).findIndex(h=>te(h,u,r));this.assert(f!==-1,"expected #{this} to deep equally contain #{exp}","expected #{this} to not deep equally contain #{exp}",u)}),i("toBeTruthy",function(){const u=t.flag(this,"object");this.assert(!!u,"expected #{this} to be truthy","expected #{this} to not be truthy",!0,u)}),i("toBeFalsy",function(){const u=t.flag(this,"object");this.assert(!u,"expected #{this} to be falsy","expected #{this} to not be falsy",!1,u)}),i("toBeGreaterThan",function(u){const l=this._obj;return Ze(l,"actual",["number","bigint"]),Ze(u,"expected",["number","bigint"]),this.assert(l>u,`expected ${l} to be greater than ${u}`,`expected ${l} to be not greater than ${u}`,u,l,!1)}),i("toBeGreaterThanOrEqual",function(u){const l=this._obj;return Ze(l,"actual",["number","bigint"]),Ze(u,"expected",["number","bigint"]),this.assert(l>=u,`expected ${l} to be greater than or equal to ${u}`,`expected ${l} to be not greater than or equal to ${u}`,u,l,!1)}),i("toBeLessThan",function(u){const l=this._obj;return Ze(l,"actual",["number","bigint"]),Ze(u,"expected",["number","bigint"]),this.assert(l<u,`expected ${l} to be less than ${u}`,`expected ${l} to be not less than ${u}`,u,l,!1)}),i("toBeLessThanOrEqual",function(u){const l=this._obj;return Ze(l,"actual",["number","bigint"]),Ze(u,"expected",["number","bigint"]),this.assert(l<=u,`expected ${l} to be less than or equal to ${u}`,`expected ${l} to be not less than or equal to ${u}`,u,l,!1)}),i("toBeNaN",function(){const u=t.flag(this,"object");this.assert(Number.isNaN(u),"expected #{this} to be NaN","expected #{this} not to be NaN",Number.NaN,u)}),i("toBeUndefined",function(){const u=t.flag(this,"object");this.assert(u===void 0,"expected #{this} to be undefined","expected #{this} not to be undefined",void 0,u)}),i("toBeNull",function(){const u=t.flag(this,"object");this.assert(u===null,"expected #{this} to be null","expected #{this} not to be null",null,u)}),i("toBeNullable",function(){const u=t.flag(this,"object");this.assert(u==null,"expected #{this} to be nullish","expected #{this} not to be nullish",null,u)}),i("toBeDefined",function(){const u=t.flag(this,"object");this.assert(typeof u<"u","expected #{this} to be defined","expected #{this} to be undefined",u)}),i("toBeTypeOf",function(u){const l=typeof this._obj,f=u===l;return this.assert(f,"expected #{this} to be type of #{exp}","expected #{this} not to be type of #{exp}",u,l)}),i("toBeInstanceOf",function(u){return this.instanceOf(u)}),i("toHaveLength",function(u){return this.have.length(u)}),i("toHaveProperty",function(...u){Array.isArray(u[0])&&(u[0]=u[0].map(E=>String(E).replace(/([.[\]])/g,"\\$1")).join("."));const l=this._obj,[f,h]=u,d=()=>Object.hasOwn(l,f)?{value:l[f],exists:!0}:t.getPathInfo(l,f),{value:m,exists:p}=d(),y=p&&(u.length===1||te(h,m,r)),x=u.length===1?"":` with value ${t.objDisplay(h)}`;return this.assert(y,`expected #{this} to have property "${f}"${x}`,`expected #{this} to not have property "${f}"${x}`,h,p?m:void 0)}),i("toBeCloseTo",function(u,l=2){const f=this._obj;let h=!1,d=0,m=0;return u===Number.POSITIVE_INFINITY&&f===Number.POSITIVE_INFINITY||u===Number.NEGATIVE_INFINITY&&f===Number.NEGATIVE_INFINITY?h=!0:(d=10**-l/2,m=Math.abs(f-u),h=m<d),this.assert(h,`expected #{this} to be close to #{exp}, received difference is ${m}, but expected ${d}`,`expected #{this} to not be close to #{exp}, received difference is ${m}, but expected ${d}`,u,f,!1)});function o(u){if(!An(u._obj))throw new TypeError(`${t.inspect(u._obj)} is not a spy or a call to a spy!`)}function s(u){return o(u),u._obj}i(["toHaveBeenCalledTimes","toBeCalledTimes"],function(u){const l=s(this),f=l.getMockName(),h=l.mock.calls.length;return this.assert(h===u,`expected "${f}" to be called #{exp} times, but got ${h} times`,`expected "${f}" to not be called #{exp} times`,u,h,!1)}),i("toHaveBeenCalledOnce",function(){const u=s(this),l=u.getMockName(),f=u.mock.calls.length;return this.assert(f===1,`expected "${l}" to be called once, but got ${f} times`,`expected "${l}" to not be called once`,1,f,!1)}),i(["toHaveBeenCalled","toBeCalled"],function(){const u=s(this),l=u.getMockName(),f=u.mock.calls.length,h=f>0,d=t.flag(this,"negate");let m=t.getMessage(this,[h,`expected "${l}" to be called at least once`,`expected "${l}" to not be called at all, but actually been called ${f} times`,!0,h]);if(h&&d&&(m=Vs(u,m)),h&&d||!h&&!d)throw new n(m)});function c(u,l){return u.length===l.length&&u.every((f,h)=>te(f,l[h],[...r,at]))}i(["toHaveBeenCalledWith","toBeCalledWith"],function(...u){const l=s(this),f=l.getMockName(),h=l.mock.calls.some(p=>c(p,u)),d=t.flag(this,"negate"),m=t.getMessage(this,[h,`expected "${f}" to be called with arguments: #{exp}`,`expected "${f}" to not be called with arguments: #{exp}`,u]);if(h&&d||!h&&!d)throw new n(Vs(l,m,u))}),i("toHaveBeenCalledExactlyOnceWith",function(...u){const l=s(this),f=l.getMockName(),h=l.mock.calls.length,m=l.mock.calls.some(x=>c(x,u))&&h===1,p=t.flag(this,"negate"),y=t.getMessage(this,[m,`expected "${f}" to be called once with arguments: #{exp}`,`expected "${f}" to not be called once with arguments: #{exp}`,u]);if(m&&p||!m&&!p)throw new n(Vs(l,y,u))}),i("toHaveBeenNthCalledWith",function(u,...l){const f=s(this),h=f.getMockName(),d=f.mock.calls[u-1],m=f.mock.calls.length,p=u<=m;this.assert(d&&c(d,l),`expected ${vn(u)} "${h}" call to have been called with #{exp}${p?"":`, but called only ${m} times`}`,`expected ${vn(u)} "${h}" call to not have been called with #{exp}`,l,d,p)}),i("toHaveBeenLastCalledWith",function(...u){const l=s(this),f=l.getMockName(),h=l.mock.calls.at(-1);this.assert(h&&c(h,u),`expected last "${f}" call to have been called with #{exp}`,`expected last "${f}" call to not have been called with #{exp}`,u,h)});function a(u,l,f){const h=u.mock.invocationCallOrder,d=l.mock.invocationCallOrder;return h.length===0?!f:d.length===0?!1:h[0]<d[0]}i(["toHaveBeenCalledBefore"],function(u,l=!0){const f=s(this);if(!An(u))throw new TypeError(`${t.inspect(u)} is not a spy or a call to a spy`);this.assert(a(f,u,l),`expected "${f.getMockName()}" to have been called before "${u.getMockName()}"`,`expected "${f.getMockName()}" to not have been called before "${u.getMockName()}"`,u,f)}),i(["toHaveBeenCalledAfter"],function(u,l=!0){const f=s(this);if(!An(u))throw new TypeError(`${t.inspect(u)} is not a spy or a call to a spy`);this.assert(a(u,f,l),`expected "${f.getMockName()}" to have been called after "${u.getMockName()}"`,`expected "${f.getMockName()}" to not have been called after "${u.getMockName()}"`,u,f)}),i(["toThrow","toThrowError"],function(u){if(typeof u=="string"||typeof u>"u"||u instanceof RegExp)return this.throws(u===""?/^$/:u);const l=this._obj,f=t.flag(this,"promise"),h=t.flag(this,"negate");let d=null;if(f==="rejects")d=l;else if(f==="resolves"&&typeof l!="function"){if(h)return;{const p=t.flag(this,"message")||"expected promise to throw an error, but it didn't",y={showDiff:!1};throw new n(p,y,t.flag(this,"ssfi"))}}else{let p=!1;try{l()}catch(y){p=!0,d=y}if(!p&&!h){const y=t.flag(this,"message")||"expected function to throw an error, but it didn't",x={showDiff:!1};throw new n(y,x,t.flag(this,"ssfi"))}}if(typeof u=="function"){const p=u.name||u.prototype.constructor.name;return this.assert(d&&d instanceof u,`expected error to be instance of ${p}`,`expected error not to be instance of ${p}`,u,d)}if(Kn(u)){const p=te(d,u,[...r,at]);return this.assert(p,"expected a thrown error to be #{exp}","expected a thrown error not to be #{exp}",u,d)}if(typeof u=="object"&&"asymmetricMatch"in u&&typeof u.asymmetricMatch=="function"){const p=u;return this.assert(d&&p.asymmetricMatch(d),"expected error to match asymmetric matcher","expected error not to match asymmetric matcher",p,d)}const m=te(d,u,[...r,at]);return this.assert(m,"expected a thrown value to equal #{exp}","expected a thrown value not to equal #{exp}",u,d)}),[{name:"toHaveResolved",condition:u=>u.mock.settledResults.length>0&&u.mock.settledResults.some(({type:l})=>l==="fulfilled"),action:"resolved"},{name:["toHaveReturned","toReturn"],condition:u=>u.mock.calls.length>0&&u.mock.results.some(({type:l})=>l!=="throw"),action:"called"}].forEach(({name:u,condition:l,action:f})=>{i(u,function(){const h=s(this),d=h.getMockName(),m=l(h);this.assert(m,`expected "${d}" to be successfully ${f} at least once`,`expected "${d}" to not be successfully ${f}`,m,!m,!1)})}),[{name:"toHaveResolvedTimes",condition:(u,l)=>u.mock.settledResults.reduce((f,{type:h})=>h==="fulfilled"?++f:f,0)===l,action:"resolved"},{name:["toHaveReturnedTimes","toReturnTimes"],condition:(u,l)=>u.mock.results.reduce((f,{type:h})=>h==="throw"?f:++f,0)===l,action:"called"}].forEach(({name:u,condition:l,action:f})=>{i(u,function(h){const d=s(this),m=d.getMockName(),p=l(d,h);this.assert(p,`expected "${m}" to be successfully ${f} ${h} times`,`expected "${m}" to not be successfully ${f} ${h} times`,`expected resolved times: ${h}`,`received resolved times: ${p}`,!1)})}),[{name:"toHaveResolvedWith",condition:(u,l)=>u.mock.settledResults.some(({type:f,value:h})=>f==="fulfilled"&&te(l,h)),action:"resolve"},{name:["toHaveReturnedWith","toReturnWith"],condition:(u,l)=>u.mock.results.some(({type:f,value:h})=>f==="return"&&te(l,h)),action:"return"}].forEach(({name:u,condition:l,action:f})=>{i(u,function(h){const d=s(this),m=l(d,h),p=t.flag(this,"negate");if(m&&p||!m&&!p){const y=d.getMockName(),x=t.getMessage(this,[m,`expected "${y}" to ${f} with: #{exp} at least once`,`expected "${y}" to not ${f} with: #{exp}`,h]),E=f==="return"?d.mock.results:d.mock.settledResults;throw new n(qC(d,E,x,h))}})}),[{name:"toHaveLastResolvedWith",condition:(u,l)=>{const f=u.mock.settledResults.at(-1);return!!(f&&f.type==="fulfilled"&&te(f.value,l))},action:"resolve"},{name:"toHaveLastReturnedWith",condition:(u,l)=>{const f=u.mock.results.at(-1);return!!(f&&f.type==="return"&&te(f.value,l))},action:"return"}].forEach(({name:u,condition:l,action:f})=>{i(u,function(h){const d=s(this),p=(f==="return"?d.mock.results:d.mock.settledResults).at(-1),y=d.getMockName();this.assert(l(d,h),`expected last "${y}" call to ${f} #{exp}`,`expected last "${y}" call to not ${f} #{exp}`,h,p==null?void 0:p.value)})}),[{name:"toHaveNthResolvedWith",condition:(u,l,f)=>{const h=u.mock.settledResults[l-1];return h&&h.type==="fulfilled"&&te(h.value,f)},action:"resolve"},{name:"toHaveNthReturnedWith",condition:(u,l,f)=>{const h=u.mock.results[l-1];return h&&h.type==="return"&&te(h.value,f)},action:"return"}].forEach(({name:u,condition:l,action:f})=>{i(u,function(h,d){const m=s(this),p=m.getMockName(),x=(f==="return"?m.mock.results:m.mock.settledResults)[h-1],E=`${vn(h)} call`;this.assert(l(m,h,d),`expected ${E} "${p}" call to ${f} #{exp}`,`expected ${E} "${p}" call to not ${f} #{exp}`,d,x==null?void 0:x.value)})}),i("withContext",function(u){for(const l in u)t.flag(this,l,u[l]);return this}),t.addProperty(e.Assertion.prototype,"resolves",function(){const l=new Error("resolves");t.flag(this,"promise","resolves"),t.flag(this,"error",l);const f=t.flag(this,"vitest-test"),h=t.flag(this,"object");if(t.flag(this,"poll"))throw new SyntaxError("expect.poll() is not supported in combination with .resolves");if(typeof(h==null?void 0:h.then)!="function")throw new TypeError(`You must provide a Promise to expect() when using .resolves, not '${typeof h}'.`);const d=new Proxy(this,{get:(m,p,y)=>{const x=Reflect.get(m,p,y);return typeof x!="function"?x instanceof e.Assertion?d:x:(...E)=>{t.flag(this,"_name",p);const $=Promise.resolve(h).then(I=>(t.flag(this,"object",I),x.call(this,...E)),I=>{const _=new n(`promise rejected "${t.inspect(I)}" instead of resolving`,{showDiff:!1});throw _.cause=I,_}).catch(I=>{throw Kn(I)&&l.stack&&(I.stack=l.stack.replace(l.message,I.message)),I});return nc(f,$,tc(t,this,!!E.length),l,t.flag(this,"soft"))}}});return d}),t.addProperty(e.Assertion.prototype,"rejects",function(){const l=new Error("rejects");t.flag(this,"promise","rejects"),t.flag(this,"error",l);const f=t.flag(this,"vitest-test"),h=t.flag(this,"object"),d=typeof h=="function"?h():h;if(t.flag(this,"poll"))throw new SyntaxError("expect.poll() is not supported in combination with .rejects");if(typeof(d==null?void 0:d.then)!="function")throw new TypeError(`You must provide a Promise to expect() when using .rejects, not '${typeof d}'.`);const m=new Proxy(this,{get:(p,y,x)=>{const E=Reflect.get(p,y,x);return typeof E!="function"?E instanceof e.Assertion?m:E:(...$)=>{t.flag(this,"_name",y);const I=Promise.resolve(d).then(_=>{throw new n(`promise resolved "${t.inspect(_)}" instead of rejecting`,{showDiff:!0,expected:new Error("rejected promise"),actual:_})},_=>(t.flag(this,"object",_),E.call(this,...$))).catch(_=>{throw Kn(_)&&l.stack&&(_.stack=l.stack.replace(l.message,_.message)),_});return nc(f,I,tc(t,this,!!$.length),l,t.flag(this,"soft"))}}});return m})};function Vs(e,t,n){return e.mock.calls.length&&(t+=Me.gray(`
|
|
154
154
|
|
|
155
155
|
Received:
|
|
156
156
|
|
|
157
|
-
${e.mock.calls.map((r,i)=>{let o=Me.bold(` ${
|
|
157
|
+
${e.mock.calls.map((r,i)=>{let o=Me.bold(` ${vn(i+1)} ${e.getMockName()} call:
|
|
158
158
|
|
|
159
|
-
`);return n?o+=
|
|
159
|
+
`);return n?o+=rr(n,r,{omitAnnotationLines:!0}):o+=Tt(r).split(`
|
|
160
160
|
`).map(s=>` ${s}`).join(`
|
|
161
161
|
`),o+=`
|
|
162
162
|
`,o}).join(`
|
|
163
163
|
`)}`)),t+=Me.gray(`
|
|
164
164
|
|
|
165
165
|
Number of calls: ${Me.bold(e.mock.calls.length)}
|
|
166
|
-
`),t}function
|
|
166
|
+
`),t}function qC(e,t,n,r){return t.length&&(n+=Me.gray(`
|
|
167
167
|
|
|
168
168
|
Received:
|
|
169
169
|
|
|
170
|
-
${t.map((i,o)=>{let s=Me.bold(` ${
|
|
170
|
+
${t.map((i,o)=>{let s=Me.bold(` ${vn(o+1)} ${e.getMockName()} call return:
|
|
171
171
|
|
|
172
|
-
`);return r?s+=
|
|
172
|
+
`);return r?s+=rr(r,i.value,{omitAnnotationLines:!0}):s+=Tt(i).split(`
|
|
173
173
|
`).map(c=>` ${c}`).join(`
|
|
174
174
|
`),s+=`
|
|
175
175
|
`,s}).join(`
|
|
176
176
|
`)}`)),n+=Me.gray(`
|
|
177
177
|
|
|
178
178
|
Number of calls: ${Me.bold(e.mock.calls.length)}
|
|
179
|
-
`),n}function
|
|
179
|
+
`),n}function WC(e,t){const n=e._obj,r=me.flag(e,"negate"),i=me.flag(e,"promise")||"",o=me.flag(e,"message"),s={...kb(),diff:rr,stringify:Tt,iterableEquality:at,subsetEquality:sr};let c=me.flag(e,"vitest-test");const a=(c==null?void 0:c.fullTestName)??"";(c==null?void 0:c.type)!=="test"&&(c=void 0);const u={...Ar(t),currentTestName:a,customTesters:ol(),isNot:r,utils:s,promise:i,equals:te,suppressedErrors:[],soft:me.flag(e,"soft"),poll:me.flag(e,"poll"),assertion:e};return Object.assign(u,{task:c}),{state:u,isNot:r,obj:n,customMessage:o}}class Jd extends Error{constructor(t,n,r,i){super(t),this.actual=n,this.expected=r,this.__vitest_error_context__=i}}function zC(e,t,n){return(r,i)=>{Object.entries(n).forEach(([o,s])=>{function c(...f){const{state:h,isNot:d,obj:m,customMessage:p}=WC(this,t),y=s.call(h,m,...f);if(y&&typeof y=="object"&&typeof y.then=="function")return y.then(({pass:C,message:z,actual:le,expected:B,meta:X})=>{if(C&&d||!C&&!d){const ie=(p?`${p}: `:"")+z();throw new Jd(ie,le,B,{assertionName:o,meta:X})}});const{pass:x,message:E,actual:$,expected:I,meta:_}=y;if(x&&d||!x&&!d){const M=(p?`${p}: `:"")+E();throw new Jd(M,$,I,{assertionName:o,meta:_})}}const a=Wn(i,o,c);if(i.addMethod(globalThis[ei].matchers,o,a),i.addMethod(e.Assertion.prototype,o,a),s.__vitest_poll_takeover__){const f=e.Assertion.prototype[o];Object.defineProperty(f,"__vitest_poll_takeover__",{value:!0})}class u extends Wt{constructor(h=!1,...d){super(d,h)}asymmetricMatch(h){const{pass:d}=s.call(this.getMatcherContext(t),h,...this.sample);return this.inverse?!d:d}toString(){return`${this.inverse?"not.":""}${o}`}getExpectedType(){return"any"}toAsymmetricMatcher(){return`${this.toString()}<${this.sample.map(h=>Tt(h)).join(", ")}>`}}const l=(...f)=>new u(!1,...f);Object.defineProperty(t,o,{configurable:!0,enumerable:!0,value:l,writable:!0}),Object.defineProperty(t.not,o,{configurable:!0,enumerable:!0,value:(...f)=>new u(!0,...f),writable:!0}),Object.defineProperty(globalThis[rl],o,{configurable:!0,enumerable:!0,value:l,writable:!0})})}}const GC=(e,t)=>{t.addMethod(e.expect,"extend",(n,r)=>{wn(zC(e,n,r))})},al=/\r?\n/;function KC(e,t,n){const r=e.split(al),i=/\r\n/.test(e)?2:1;let o=0;if(t>r.length)return e.length;for(let s=0;s<t-1;s++)o+=r[s].length+i;return o+n}function HC(e,t){if(t>e.length)throw new Error(`offset is longer than source length! offset ${t} > length ${e.length}`);const n=e.split(al),r=/\r\n/.test(e)?2:1;let i=0,o=0;for(;o<n.length;o++){const s=n[o].length+r;if(i+s>=t)break;i+=s}return o+1}var ic=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};const vt=Date;let oc=null;class gn extends vt{constructor(t,n,r,i,o,s,c){super();let a;switch(arguments.length){case 0:oc!==null?a=new vt(oc.valueOf()):a=new vt;break;case 1:a=new vt(t);break;default:r=typeof r>"u"?1:r,i=i||0,o=o||0,s=s||0,c=c||0,a=new vt(t,n,r,i,o,s,c);break}return Object.setPrototypeOf(a,gn.prototype),a}}gn.UTC=vt.UTC;gn.now=function(){return new gn().valueOf()};gn.parse=function(e){return vt.parse(e)};gn.toString=function(){return vt.toString()};function YC(e){const t=new vt(e.valueOf());if(Number.isNaN(t.getTime()))throw new TypeError(`mockdate: The time set is an invalid date: ${e}`);globalThis.Date=gn,oc=t.valueOf()}function Xd(){globalThis.Date=vt}function JC(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qs={exports:{}},Zd;function XC(){if(Zd)return qs.exports;Zd=1;/*
|
|
180
180
|
* @version 1.4.0
|
|
181
181
|
* @date 2015-10-26
|
|
182
182
|
* @stability 3 - Stable
|
|
183
183
|
* @author Lauri Rooden (https://github.com/litejs/natural-compare-lite)
|
|
184
184
|
* @license MIT License
|
|
185
|
-
*/var e=function(t,n){var r,i,o=1,s=0,c=0,a=String.alphabet;function u(l,f,h){if(h){for(r=f;h=u(l,r),h<76&&h>65;)++r;return+l.slice(f-1,r)}return h=a&&a.indexOf(l.charAt(f)),h>-1?h+76:(h=l.charCodeAt(f)||0,h<45||h>127?h:h<46?65:h<48?h-1:h<58?h+18:h<65?h-11:h<91?h+11:h<97?h-37:h<123?h+5:h-63)}if((t+="")!=(n+="")){for(;o;)if(i=u(t,s++),o=u(n,c++),i<76&&o<76&&i>66&&o>66&&(i=u(t,s,s),o=u(n,c,s=r),c=r),i!=o)return i<o?-1:1}return 0};try{
|
|
185
|
+
*/var e=function(t,n){var r,i,o=1,s=0,c=0,a=String.alphabet;function u(l,f,h){if(h){for(r=f;h=u(l,r),h<76&&h>65;)++r;return+l.slice(f-1,r)}return h=a&&a.indexOf(l.charAt(f)),h>-1?h+76:(h=l.charCodeAt(f)||0,h<45||h>127?h:h<46?65:h<48?h-1:h<58?h+18:h<65?h-11:h<91?h+11:h<97?h-37:h<123?h+5:h-63)}if((t+="")!=(n+="")){for(;o;)if(i=u(t,s++),o=u(n,c++),i<76&&o<76&&i>66&&o>66&&(i=u(t,s,s),o=u(n,c,s=r),c=r),i!=o)return i<o?-1:1}return 0};try{qs.exports=e}catch{String.naturalCompare=e}return qs.exports}var ZC=XC(),QC=JC(ZC);const e_=(e,t,n,r,i,o)=>{const s=e.getMockName(),c=s==="vi.fn()"?"":` ${s}`;let a="";if(e.mock.calls.length!==0){const u=n+t.indent;a=` {${t.spacingOuter}${u}"calls": ${o(e.mock.calls,t,u,r,i)}${t.min?", ":","}${t.spacingOuter}${u}"results": ${o(e.mock.results,t,u,r,i)}${t.min?"":","}${t.spacingOuter}${n}}`}return`[MockFunction${c}]${a}`},t_=e=>e&&!!e._isMockFunction,n_={serialize:e_,test:t_},{DOMCollection:r_,DOMElement:i_,Immutable:o_,ReactElement:s_,ReactTestComponent:a_,AsymmetricMatcher:c_}=Io;let sc=[a_,s_,i_,r_,o_,c_,n_];function u_(e){sc=[e].concat(sc)}function l_(){return sc}function Qd(e,t){return`${e} ${t}`}function f_(e){if(!/ \d+$/.test(e))throw new Error("Snapshot keys must end with a number.");return e.replace(/ \d+$/,"")}function h_(e,t){const n=t.updateSnapshot,r=Object.create(null);let i="",o=!1;if(e!=null)try{i=e,new Function("exports",i)(r)}catch{}return(n==="all"||n==="new")&&i&&(o=!0),{data:r,dirty:o}}function d_(e){return e.includes(`
|
|
186
186
|
`)?`
|
|
187
187
|
${e}
|
|
188
|
-
`:e}function
|
|
188
|
+
`:e}function Ei(e){return e.length>2&&e[0]===`
|
|
189
189
|
`&&e.endsWith(`
|
|
190
|
-
`)?e.slice(1,-1):e}const
|
|
191
|
-
`)}async function
|
|
190
|
+
`)?e.slice(1,-1):e}const p_=!0,m_=!1;function g_(e,t=2,n={}){return cl(wt(e,{escapeRegex:p_,indent:t,plugins:l_(),printFunctionName:m_,...n}))}function y_(e){return e.replace(/`|\\|\$\{/g,"\\$&")}function ep(e){return`\`${y_(e)}\``}function cl(e){return e.replace(/\r\n|\r/g,`
|
|
191
|
+
`)}async function b_(e,t,n){const r=Object.keys(t).sort(QC).map(c=>`exports[${ep(c)}] = ${ep(cl(t[c]))};`),i=`${e.getHeader()}
|
|
192
192
|
|
|
193
193
|
${r.join(`
|
|
194
194
|
|
|
195
195
|
`)}
|
|
196
|
-
`,o=await e.readSnapshotFile(n);o!=null&&o===i||await e.saveSnapshotFile(n,i)}function
|
|
196
|
+
`,o=await e.readSnapshotFile(n);o!=null&&o===i||await e.saveSnapshotFile(n,i)}function ac(e=[],t=[]){const n=Array.from(e);return t.forEach((r,i)=>{const o=n[i];Array.isArray(e[i])?n[i]=ac(e[i],r):Bt(o)?n[i]=ul(e[i],r):n[i]=r}),n}function ul(e,t){if(Bt(e)&&Bt(t)){const n={...e};return Object.keys(t).forEach(r=>{Bt(t[r])&&!t[r].$$typeof?r in e?n[r]=ul(e[r],t[r]):Object.assign(n,{[r]:t[r]}):Array.isArray(t[r])?n[r]=ac(e[r],t[r]):Object.assign(n,{[r]:t[r]})}),n}else if(Array.isArray(e)&&Array.isArray(t))return ac(e,t);return e}class Mb extends Map{constructor(t,n){super(n),this.defaultFn=t}get(t){return this.has(t)||this.set(t,this.defaultFn(t)),super.get(t)}}class yr extends Mb{constructor(){super(()=>0);R(this,"_total")}valueOf(){return this._total=this.total()}increment(n){typeof this._total<"u"&&this._total++,this.set(n,this.get(n)+1)}total(){if(typeof this._total<"u")return this._total;let n=0;for(const r of this.values())n+=r;return n}}function Ob(e){const t=new Map;return n=>(t.has(n)||t.set(n,e(n)),t.get(n))}async function w_(e,t){const n=(await Promise.resolve().then(()=>require("./magic-string.es-CegzckYA.cjs"))).default,r=new Set(t.map(i=>i.file));await Promise.all(Array.from(r).map(async i=>{const o=t.filter(u=>u.file===i),s=await e.readSnapshotFile(i);if(s==null)throw new Error(`cannot read ${i} when saving inline snapshot`);const c=new n(s);for(const u of o){const l=KC(s,u.line,u.column);k_(s,c,l,u.snapshot,u.assertionName)}const a=c.toString();a!==s&&await e.saveSnapshotFile(i,a)}))}const Pb=/(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*\{/;function ll(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const x_=Ob(e=>{const t=Pb.source.replace("toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot",ll(e));return new RegExp(t)});function S_(e,t,n,r,i){let o=e.slice(n);const c=(i?x_(i):Pb).exec(o);if(!c)return!1;o=o.slice(c.index);let a=mI(o);if(a===null)return!1;a+=n+c.index;const u=n+c.index+c[0].length,l=E_(e,u),f=`, ${Nb(r,e,n)}`;return l===a?t.appendLeft(a,f):t.overwrite(l,a,f),!0}function E_(e,t){let n=1,r=0;for(;n!==r&&t<e.length;){const i=e[t++];i==="{"?n++:i==="}"&&r++}return t}function Nb(e,t,n){const r=HC(t,n),o=t.split(al)[r-1].match(/^\s*/)[0]||"",s=o.includes(" ")?`${o} `:`${o} `,c=e.trim().replace(/\\/g,"\\\\").split(/\n/g),a=c.length<=1,u="`";return a?`${u}${c.join(`
|
|
197
197
|
`).replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}${u}`:`${u}
|
|
198
198
|
${c.map(l=>l?s+l:"").join(`
|
|
199
199
|
`).replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}
|
|
200
|
-
${o}${u}`}const
|
|
201
|
-
`),e}async function
|
|
200
|
+
${o}${u}`}const T_=["toMatchInlineSnapshot","toThrowErrorMatchingInlineSnapshot"];function v_(e,t,n){for(const r of n){const i=t-r.length;if(i>=0&&e.slice(i,t)===r)return{code:e.slice(i),index:i}}return{code:e.slice(t),index:t}}const jb=/(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*[\w$]*(['"`)])/,A_=Ob(e=>{const t=jb.source.replace("toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot",ll(e));return new RegExp(t)});function k_(e,t,n,r,i){const o=i?[i]:T_,{code:s,index:c}=v_(e,n,o),u=(i?A_(i):jb).exec(s),f=(i?new RegExp(ll(i)):/toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot/).exec(s);if(!u||u.index!==(f==null?void 0:f.index))return S_(e,t,c,r,i);const h=u[1],d=c+u.index+u[0].length,m=Nb(r,e,c);if(h===")")return t.appendRight(d-1,m),!0;const y=new RegExp(`(?:^|[^\\\\])${h}`).exec(e.slice(d));if(!y)return!1;const x=d+y.index+y[0].length;return t.overwrite(d-1,x,m),!0}const I_=/^([^\S\n]*)\S/m;function tp(e){var i;const t=e.match(I_);if(!t||!t[1])return e;const n=t[1],r=e.split(/\n/g);if(r.length<=2||r[0].trim()!==""||((i=r.at(-1))==null?void 0:i.trim())!=="")return e;for(let o=1;o<r.length-1;o++)if(r[o]!==""){if(r[o].indexOf(n)!==0)return e;r[o]=r[o].substring(n.length)}return r[r.length-1]="",e=r.join(`
|
|
201
|
+
`),e}async function C_(e,t){await Promise.all(t.map(async n=>{n.readonly||await e.saveSnapshotFile(n.file,n.snapshot)}))}function np(e,t){return e.file===t.file&&e.column===t.column&&e.line===t.line}class fl{constructor(t,n,r,i){R(this,"_counters",new yr);R(this,"_dirty");R(this,"_updateSnapshot");R(this,"_snapshotData");R(this,"_initialData");R(this,"_inlineSnapshots");R(this,"_inlineSnapshotStacks");R(this,"_testIdToKeys",new Mb(()=>[]));R(this,"_rawSnapshots");R(this,"_uncheckedKeys");R(this,"_snapshotFormat");R(this,"_environment");R(this,"_fileExists");R(this,"expand");R(this,"_added",new yr);R(this,"_matched",new yr);R(this,"_unmatched",new yr);R(this,"_updated",new yr);this.testFilePath=t,this.snapshotPath=n;const{data:o,dirty:s}=h_(r,i);this._fileExists=r!=null,this._initialData={...o},this._snapshotData={...o},this._dirty=s,this._inlineSnapshots=[],this._inlineSnapshotStacks=[],this._rawSnapshots=[],this._uncheckedKeys=new Set(Object.keys(this._snapshotData)),this.expand=i.expand||!1,this._updateSnapshot=i.updateSnapshot,this._snapshotFormat={printBasicPrototype:!1,escapeString:!1,maxOutputLength:2**27,...i.snapshotFormat},this._environment=i.snapshotEnvironment}get added(){return this._added}set added(t){this._added._total=t}get matched(){return this._matched}set matched(t){this._matched._total=t}get unmatched(){return this._unmatched}set unmatched(t){this._unmatched._total=t}get updated(){return this._updated}set updated(t){this._updated._total=t}static async create(t,n){const r=await n.snapshotEnvironment.resolvePath(t),i=await n.snapshotEnvironment.readSnapshotFile(r);return new fl(t,r,i,n)}get snapshotUpdateState(){return this._updateSnapshot}get environment(){return this._environment}markSnapshotsAsCheckedForTest(t){this._uncheckedKeys.forEach(n=>{/ \d+$| > /.test(n.slice(t.length))&&this._uncheckedKeys.delete(n)})}clearTest(t){this._inlineSnapshots=this._inlineSnapshots.filter(n=>n.testId!==t),this._inlineSnapshotStacks=this._inlineSnapshotStacks.filter(n=>n.testId!==t);for(const n of this._testIdToKeys.get(t)){const r=f_(n),i=this._counters.get(r);i>0&&((n in this._snapshotData||n in this._initialData)&&(this._snapshotData[n]=this._initialData[n]),this._counters.set(r,i-1))}this._testIdToKeys.delete(t),this.added.delete(t),this.updated.delete(t),this.matched.delete(t),this.unmatched.delete(t)}_inferInlineSnapshotStack(t){const n=t.findIndex(s=>s.method.match(/__VITEST_(RESOLVES|REJECTS)__/));if(n!==-1)return t[n+3];const r=t.findIndex(s=>s.method.match(/__VITEST_POLL_CHAIN__/));if(r!==-1)return t[r+1];for(let s=0;s<t.length;s++){const c=t[s].method.match(/__INLINE_SNAPSHOT_OFFSET_(\d+)__/);if(c)return t[s+Number(c[1])]??null}const i=t.findIndex(s=>s.method.includes("__VITEST_EXTEND_ASSERTION__"));if(i!==-1)return t[i+3]??null;const o=t.findIndex(s=>s.method.includes("__INLINE_SNAPSHOT__"));return o!==-1?t[o+2]:null}_addSnapshot(t,n,r){this._dirty=!0,r.stack?this._inlineSnapshots.push({...r.stack,snapshot:n,testId:r.testId,assertionName:r.assertionName}):r.rawSnapshot?this._rawSnapshots.push({...r.rawSnapshot,snapshot:n}):this._snapshotData[t]=n}_resolveKey(t,n,r){this._counters.increment(n);const i=this._counters.get(n);return r||(r=Qd(n,i)),this._testIdToKeys.get(t).push(r),{key:r,count:i}}_resolveInlineStack(t){var l,f;const{testId:n,snapshot:r,assertionName:i,error:o}=t,s=R4(o,{ignoreStackEntries:[]}),c=this._inferInlineSnapshotStack(s);if(!c){const h=s.map(d=>` ${d.file}:${d.line}:${d.column}${d.method?` (${d.method})`:""}`).join(`
|
|
202
202
|
`);throw new Error(`@vitest/snapshot: Couldn't infer stack frame for inline snapshot.
|
|
203
|
-
${h}`)}const a=((f=(l=this.environment).processStackTrace)==null?void 0:f.call(l,c))||c;a.column--;const u=this._inlineSnapshotStacks.filter(h=>Kd(h,a));if(u.length>0){this._inlineSnapshots=this._inlineSnapshots.filter(d=>!Kd(d,a));const h=u.find(d=>d.snapshot!==r);if(h)throw Object.assign(new Error(`${i} with different snapshots cannot be called at the same location`),{actual:r,expected:h.snapshot})}return this._inlineSnapshotStacks.push({...a,testId:n,snapshot:r}),a}_reconcile(t){return t.hasSnapshot&&this._updateSnapshot==="all"||(!t.hasSnapshot||!t.snapshotIsPersisted)&&(this._updateSnapshot==="new"||this._updateSnapshot==="all")?(this._updateSnapshot==="all"?t.pass?this.matched.increment(t.testId):(t.hasSnapshot?this.updated.increment(t.testId):this.added.increment(t.testId),this._addSnapshot(t.key,t.addValue,{stack:t.stack,testId:t.testId,rawSnapshot:t.rawSnapshot,assertionName:t.assertionName})):(this._addSnapshot(t.key,t.addValue,{stack:t.stack,testId:t.testId,rawSnapshot:t.rawSnapshot,assertionName:t.assertionName}),this.added.increment(t.testId)),{actual:"",count:t.count,expected:"",key:t.key,pass:!0}):t.pass?(this.matched.increment(t.testId),{actual:"",count:t.count,expected:"",key:t.key,pass:!0}):(this.unmatched.increment(t.testId),{actual:t.actualDisplay,count:t.count,expected:t.expectedDisplay,key:t.key,pass:!1})}async save(){const t=Object.keys(this._snapshotData).length,n=this._inlineSnapshots.length,r=this._rawSnapshots.length,i=!t&&!n&&!r,o={deleted:!1,saved:!1};return(this._dirty||this._uncheckedKeys.size)&&!i?(t&&(await PC(this._environment,this._snapshotData,this.snapshotPath),this._fileExists=!0),n&&await NC(this._environment,this._inlineSnapshots),r&&await qC(this._environment,this._rawSnapshots),o.saved=!0):!t&&this._fileExists&&(this._updateSnapshot==="all"&&(await this._environment.removeSnapshotFile(this.snapshotPath),this._fileExists=!1),o.deleted=!0),o}getUncheckedCount(){return this._uncheckedKeys.size||0}getUncheckedKeys(){return Array.from(this._uncheckedKeys)}removeUncheckedKeys(){this._updateSnapshot==="all"&&this._uncheckedKeys.size&&(this._dirty=!0,this._uncheckedKeys.forEach(t=>delete this._snapshotData[t]),this._uncheckedKeys.clear())}probeExpectedSnapshot(t){const n=this._counters.get(t.testName)+1,r=Wd(t.testName,n);return{key:r,count:n,data:t!=null&&t.isInline?t.inlineSnapshot:this._snapshotData[r],markAsChecked:()=>{this._counters.increment(t.testName),this._testIdToKeys.get(t.testId).push(r),this._uncheckedKeys.delete(r)}}}match({testId:t,testName:n,received:r,key:i,inlineSnapshot:o,isInline:s,error:c,rawSnapshot:a,assertionName:u}){const l=this._resolveKey(t,n,i);i=l.key;const f=l.count;s&&this._snapshotData[i]!==void 0||this._uncheckedKeys.delete(i);let h=a&&typeof r=="string"?r:MC(r,void 0,this._snapshotFormat);a||(h=CC(h)),a&&a.content&&a.content.match(/\r\n/)&&!h.match(/\r\n/)&&(a.content=tl(a.content));const d=s?o:a?a.content:this._snapshotData[i],m=a?d:d==null?void 0:d.trim(),p=m===(a?h:h.trim()),y=d!==void 0,x=s||this._fileExists||a&&a.content!=null;p&&!s&&!a&&(this._snapshotData[i]=h);const T=s?this._resolveInlineStack({testId:t,snapshot:h,assertionName:u||"toMatchInlineSnapshot",error:c||new Error("snapshot")}):void 0;return this._reconcile({testId:t,key:i,count:f,pass:p,hasSnapshot:y,snapshotIsPersisted:!!x,addValue:h,actualDisplay:a?h:bi(h),expectedDisplay:m!==void 0?a?m:bi(m):void 0,stack:T,rawSnapshot:a,assertionName:u})}processDomainSnapshot({testId:t,received:n,expectedSnapshot:r,matchResult:i,isInline:o,error:s,assertionName:c}){const a=o?this._resolveInlineStack({testId:t,snapshot:n,assertionName:c,error:s||new Error("STACK_TRACE_ERROR")}):void 0,u=(i==null?void 0:i.resolved)??n,l=(i==null?void 0:i.expected)??r.data;return this._reconcile({testId:t,key:r.key,count:r.count,pass:(i==null?void 0:i.pass)??!1,hasSnapshot:!!r.data,snapshotIsPersisted:o?!0:this._fileExists,addValue:u,actualDisplay:bi(u),expectedDisplay:l!==void 0?bi(l):void 0,stack:a,assertionName:c})}async pack(){const t={filepath:this.testFilePath,added:0,fileDeleted:!1,matched:0,unchecked:0,uncheckedKeys:[],unmatched:0,updated:0},n=this.getUncheckedCount(),r=this.getUncheckedKeys();n&&this.removeUncheckedKeys();const i=await this.save();return t.fileDeleted=i.deleted,t.added=this.added.total(),t.matched=this.matched.total(),t.unmatched=this.unmatched.total(),t.updated=this.updated.total(),t.unchecked=i.deleted?0:n,t.uncheckedKeys=Array.from(r),t}}function WC(e,t,n,r){const i=new Error(e);return Object.defineProperty(i,"actual",{value:n,enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(i,"expected",{value:r,enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(i,"diffOptions",{value:{expand:t}}),i}class zC{constructor(t={}){R(this,"snapshotStateMap",new Map);this.options=t}async setup(t,n){this.snapshotStateMap.has(t)||this.snapshotStateMap.set(t,await il.create(t,n))}async finish(t){const r=await this.getSnapshotState(t).pack();return this.snapshotStateMap.delete(t),r}skipTest(t,n){this.getSnapshotState(t).markSnapshotsAsCheckedForTest(n)}clearTest(t,n){this.getSnapshotState(t).clearTest(n)}getSnapshotState(t){const n=this.snapshotStateMap.get(t);if(!n)throw new Error(`The snapshot state for '${t}' is not found. Did you call 'SnapshotClient.setup()'?`);return n}match(t){var _,$;const{filepath:n,name:r,testId:i=r,message:o,isInline:s=!1,properties:c,inlineSnapshot:a,error:u,errorMessage:l,rawSnapshot:f,assertionName:h}=t;let{received:d}=t;if(!n)throw new Error("Snapshot cannot be used outside of test");const m=this.getSnapshotState(n),p=[r,...o?[o]:[]].join(" > "),y=m.probeExpectedSnapshot({testName:p,testId:i,isInline:s,inlineSnapshot:a});if(typeof c=="object"){if(typeof d!="object"||!d)throw y.markAsChecked(),new Error("Received value must be an object when the matcher has properties");let C;try{C=(($=(_=this.options).isEqual)==null?void 0:$.call(_,d,c))??!1}catch(z){throw y.markAsChecked(),z}if(!C)return y.markAsChecked(),{pass:!1,message:()=>l||"Snapshot properties mismatched",actual:d,expected:c};d=nl(d,c)}const{actual:x,expected:T,key:O,pass:k}=m.match({testId:i,testName:p,received:d,isInline:s,error:u,inlineSnapshot:a,rawSnapshot:f,assertionName:h});return{pass:k,message:()=>`Snapshot \`${O||"unknown"}\` mismatched`,actual:f?x:x==null?void 0:x.trim(),expected:f?T:T==null?void 0:T.trim()}}assert(t){const n=this.match(t);if(!n.pass){const r=this.getSnapshotState(t.filepath);throw WC(n.message(),r.expand,n.actual,n.expected)}}matchDomain(t){const{received:n,filepath:r,name:i,testId:o=i,message:s,adapter:c,isInline:a=!1,inlineSnapshot:u,error:l}=t;if(!r)throw new Error("Snapshot cannot be used outside of test");const f=c.capture(n),h=c.render(f),d=this.getSnapshotState(r),m=[i,...s?[s]:[]].join(" > "),p=d.probeExpectedSnapshot({testName:m,testId:o,isInline:a,inlineSnapshot:u});p.markAsChecked();const y=p.data?c.match(f,c.parseExpected(p.data)):void 0,{actual:x,expected:T,key:O,pass:k}=d.processDomainSnapshot({testId:o,received:h,expectedSnapshot:p,matchResult:y,isInline:a,error:l,assertionName:t.assertionName});return{pass:k,message:()=>`Snapshot \`${O}\` mismatched`,actual:x==null?void 0:x.trim(),expected:T==null?void 0:T.trim()}}async pollMatchDomain(t){const{poll:n,filepath:r,name:i,testId:o=i,message:s,adapter:c,isInline:a=!1,inlineSnapshot:u,error:l,timeout:f=1e3,interval:h=50}=t;if(!r)throw new Error("Snapshot cannot be used outside of test");const d=this.getSnapshotState(r),m=[i,...s?[s]:[]].join(" > "),p=d.probeExpectedSnapshot({testName:m,testId:o,isInline:a,inlineSnapshot:u}),y=p.data&&d.snapshotUpdateState!=="all"?c.parseExpected(p.data):void 0,x=f>0?new Promise(z=>setTimeout(z,f)):void 0,T=await GC({adapter:c,poll:n,interval:h,timedOut:x,match:y?z=>c.match(z,y).pass:void 0});if(p.markAsChecked(),!(T!=null&&T.rendered)){if(T!=null&&T.lastPollError)throw T.lastPollError;return{pass:!1,message:()=>"poll() did not produce a stable snapshot within the timeout"}}const O=p.data?c.match(T.captured,c.parseExpected(p.data)):void 0,{actual:k,expected:_,key:$,pass:C}=d.processDomainSnapshot({testId:o,received:T.rendered,expectedSnapshot:p,matchResult:O,isInline:a,error:l,assertionName:t.assertionName});return{pass:C,message:()=>`Snapshot \`${$}\` mismatched`,actual:k==null?void 0:k.trim(),expected:_==null?void 0:_.trim()}}async assertRaw(t){if(!t.rawSnapshot)throw new Error("Raw snapshot is required");const{filepath:n,rawSnapshot:r}=t;if(r.content==null){if(!n)throw new Error("Snapshot cannot be used outside of test");const i=this.getSnapshotState(n);t.filepath||(t.filepath=n),r.file=await i.environment.resolveRawPath(n,r.file),r.content=await i.environment.readSnapshotFile(r.file)??void 0}return this.assert(t)}clear(){this.snapshotStateMap.clear()}}async function GC({adapter:e,poll:t,interval:n,timedOut:r,match:i}){let o,s,c;for(;;){try{const u=await Hd(Promise.resolve(t()),r);if(!u.ok)break;const l=e.capture(u.value),f=e.render(l);if(o!==void 0&&f===o){if(c={captured:l,rendered:f},!i||i(l))break}else o=f,c=void 0}catch(u){o=void 0,c=void 0,s=u}if(!(await Hd(new Promise(u=>setTimeout(u,n)),r)).ok)break}return{...c,lastPollError:s}}function Hd(e,t){const n=e.then(r=>({ok:!0,value:r}));return t?Promise.race([n,t.then(r=>({ok:!1,value:r}))]):n}var Ln={},Ls,Yd;function KC(){if(Yd)return Ls;Yd=1;var e;return typeof Xa<"u"?e=Xa:typeof window<"u"?e=window:e=self,Ls=e,Ls}var Ds,Jd;function HC(){if(Jd)return Ds;Jd=1;let e;try{({}).__proto__,e=!1}catch{e=!0}return Ds=e,Ds}var Bs,Xd;function or(){if(Xd)return Bs;Xd=1;var e=Function.call,t=HC(),n=["size","caller","callee","arguments"];return t&&n.push("__proto__"),Bs=function(i){return Object.getOwnPropertyNames(i).reduce(function(o,s){return n.includes(s)||typeof i[s]!="function"||(o[s]=e.bind(i[s])),o},Object.create(null))},Bs}var Us,Zd;function no(){if(Zd)return Us;Zd=1;var e=or();return Us=e(Array.prototype),Us}var Vs,Qd;function YC(){if(Qd)return Vs;Qd=1;var e=no().every;function t(i,o){return i[o.id]===void 0&&(i[o.id]=0),i[o.id]<o.callCount}function n(i,o,s,c){var a=!0;return s!==c.length-1&&(a=o.calledBefore(c[s+1])),t(i,o)&&a?(i[o.id]+=1,!0):!1}function r(i){var o={},s=arguments.length>1?arguments:i;return e(s,n.bind(null,o))}return Vs=r,Vs}var qs,ep;function JC(){if(ep)return qs;ep=1;function e(t){return t.constructor&&t.constructor.name||null}return qs=e,qs}var Ws={},tp;function XC(){return tp||(tp=1,(function(e){e.wrap=function(t,n){var r=function(){return e.printWarning(n),t.apply(this,arguments)};return t.prototype&&(r.prototype=t.prototype),r},e.defaultMsg=function(t,n){return`${t}.${n} is deprecated and will be removed from the public API in a future version of ${t}.`},e.printWarning=function(t){typeof process=="object"&&process.emitWarning?process.emitWarning(t):console.info?console.info(t):console.log(t)}})(Ws)),Ws}var zs,np;function ZC(){return np||(np=1,zs=function(t,n){var r=!0;try{t.forEach(function(){if(!n.apply(this,arguments))throw new Error})}catch{r=!1}return r}),zs}var Gs,rp;function QC(){return rp||(rp=1,Gs=function(t){if(!t)return"";try{return t.displayName||t.name||(String(t).match(/function ([^\s(]+)/)||[])[1]}catch{return""}}),Gs}var Ks,ip;function e_(){if(ip)return Ks;ip=1;var e=no().sort,t=no().slice;function n(i,o){var s=i.getCall(0),c=o.getCall(0),a=s&&s.callId||-1,u=c&&c.callId||-1;return a<u?-1:1}function r(i){return e(t(i),n)}return Ks=r,Ks}var Hs,op;function t_(){if(op)return Hs;op=1;var e=or();return Hs=e(Function.prototype),Hs}var Ys,sp;function n_(){if(sp)return Ys;sp=1;var e=or();return Ys=e(Map.prototype),Ys}var Js,ap;function r_(){if(ap)return Js;ap=1;var e=or();return Js=e(Object.prototype),Js}var Xs,cp;function i_(){if(cp)return Xs;cp=1;var e=or();return Xs=e(Set.prototype),Xs}var Zs,up;function o_(){if(up)return Zs;up=1;var e=or();return Zs=e(String.prototype),Zs}var Qs,lp;function s_(){return lp||(lp=1,Qs={array:no(),function:t_(),map:n_(),object:r_(),set:i_(),string:o_()}),Qs}var Ni={exports:{}},a_=Ni.exports,fp;function c_(){return fp||(fp=1,(function(e,t){(function(n,r){e.exports=r()})(a_,(function(){var n=typeof Promise=="function",r=typeof self=="object"?self:Xa,i=typeof Symbol<"u",o=typeof Map<"u",s=typeof Set<"u",c=typeof WeakMap<"u",a=typeof WeakSet<"u",u=typeof DataView<"u",l=i&&typeof Symbol.iterator<"u",f=i&&typeof Symbol.toStringTag<"u",h=s&&typeof Set.prototype.entries=="function",d=o&&typeof Map.prototype.entries=="function",m=h&&Object.getPrototypeOf(new Set().entries()),p=d&&Object.getPrototypeOf(new Map().entries()),y=l&&typeof Array.prototype[Symbol.iterator]=="function",x=y&&Object.getPrototypeOf([][Symbol.iterator]()),T=l&&typeof String.prototype[Symbol.iterator]=="function",O=T&&Object.getPrototypeOf(""[Symbol.iterator]()),k=8,_=-1;function $(C){var z=typeof C;if(z!=="object")return z;if(C===null)return"null";if(C===r)return"global";if(Array.isArray(C)&&(f===!1||!(Symbol.toStringTag in C)))return"Array";if(typeof window=="object"&&window!==null){if(typeof window.location=="object"&&C===window.location)return"Location";if(typeof window.document=="object"&&C===window.document)return"Document";if(typeof window.navigator=="object"){if(typeof window.navigator.mimeTypes=="object"&&C===window.navigator.mimeTypes)return"MimeTypeArray";if(typeof window.navigator.plugins=="object"&&C===window.navigator.plugins)return"PluginArray"}if((typeof window.HTMLElement=="function"||typeof window.HTMLElement=="object")&&C instanceof window.HTMLElement){if(C.tagName==="BLOCKQUOTE")return"HTMLQuoteElement";if(C.tagName==="TD")return"HTMLTableDataCellElement";if(C.tagName==="TH")return"HTMLTableHeaderCellElement"}}var le=f&&C[Symbol.toStringTag];if(typeof le=="string")return le;var D=Object.getPrototypeOf(C);return D===RegExp.prototype?"RegExp":D===Date.prototype?"Date":n&&D===Promise.prototype?"Promise":s&&D===Set.prototype?"Set":o&&D===Map.prototype?"Map":a&&D===WeakSet.prototype?"WeakSet":c&&D===WeakMap.prototype?"WeakMap":u&&D===DataView.prototype?"DataView":o&&D===p?"Map Iterator":s&&D===m?"Set Iterator":y&&D===x?"Array Iterator":T&&D===O?"String Iterator":D===null?"Object":Object.prototype.toString.call(C).slice(k,_)}return $}))})(Ni)),Ni.exports}var ea,hp;function u_(){if(hp)return ea;hp=1;var e=c_();return ea=function(n){return e(n).toLowerCase()},ea}var ta,dp;function l_(){if(dp)return ta;dp=1;function e(t){return t&&t.toString?t.toString():String(t)}return ta=e,ta}var na,pp;function f_(){return pp||(pp=1,na={global:KC(),calledInOrder:YC(),className:JC(),deprecated:XC(),every:ZC(),functionName:QC(),orderByFirstCall:e_(),prototypes:s_(),typeOf:u_(),valueToString:l_()}),na}var mp;function h_(){if(mp)return Ln;mp=1;const e=f_().global;let t,n;if(typeof __vitest_required__<"u"){try{t=__vitest_required__.timers}catch{}try{n=__vitest_required__.timersPromises}catch{}}function r(o){const s=Math.pow(2,31)-1,c=1e12,a=function(){},u=function(){return[]},l={};let f,h=!1;o.setTimeout&&(l.setTimeout=!0,f=o.setTimeout(a,0),h=typeof f=="object"),l.clearTimeout=!!o.clearTimeout,l.setInterval=!!o.setInterval,l.clearInterval=!!o.clearInterval,l.hrtime=o.process&&typeof o.process.hrtime=="function",l.hrtimeBigint=l.hrtime&&typeof o.process.hrtime.bigint=="function",l.nextTick=o.process&&typeof o.process.nextTick=="function";const d=o.process&&o.__vitest_required__&&o.__vitest_required__.util.promisify;l.performance=o.performance&&typeof o.performance.now=="function";const m=o.Performance&&(typeof o.Performance).match(/^(function|object)$/),p=o.performance&&o.performance.constructor&&o.performance.constructor.prototype;l.queueMicrotask=o.hasOwnProperty("queueMicrotask"),l.requestAnimationFrame=o.requestAnimationFrame&&typeof o.requestAnimationFrame=="function",l.cancelAnimationFrame=o.cancelAnimationFrame&&typeof o.cancelAnimationFrame=="function",l.requestIdleCallback=o.requestIdleCallback&&typeof o.requestIdleCallback=="function",l.cancelIdleCallbackPresent=o.cancelIdleCallback&&typeof o.cancelIdleCallback=="function",l.setImmediate=o.setImmediate&&typeof o.setImmediate=="function",l.clearImmediate=o.clearImmediate&&typeof o.clearImmediate=="function",l.Intl=o.Intl&&typeof o.Intl=="object",o.clearTimeout&&o.clearTimeout(f);const y=o.Date,x=l.Intl?Object.defineProperties(Object.create(null),Object.getOwnPropertyDescriptors(o.Intl)):void 0;let T=c;if(y===void 0)throw new Error("The global scope doesn't have a `Date` object (see https://github.com/sinonjs/sinon/issues/1852#issuecomment-419622780)");l.Date=!0;class O{constructor(A,M,B,w){this.name=A,this.entryType=M,this.startTime=B,this.duration=w}toJSON(){return JSON.stringify({...this})}}function k(E){return Number.isFinite?Number.isFinite(E):isFinite(E)}let _=!1;function $(E,A){E.loopLimit&&A===E.loopLimit-1&&(_=!0)}function C(){_=!1}function z(E){if(!E)return 0;const A=E.split(":"),M=A.length;let B=M,w=0,G;if(M>3||!/^(\d\d:){0,2}\d\d?$/.test(E))throw new Error("tick only understands numbers, 'm:s' and 'h:m:s'. Each part must be two digits");for(;B--;){if(G=parseInt(A[B],10),G>=60)throw new Error(`Invalid time ${E}`);w+=G*Math.pow(60,M-B-1)}return w*1e3}function le(E){const M=E*1e6%1e6,B=M<0?M+1e6:M;return Math.floor(B)}function D(E){if(!E)return 0;if(typeof E.getTime=="function")return E.getTime();if(typeof E=="number")return E;throw new TypeError("now should be milliseconds since UNIX epoch")}function X(E,A,M){return M&&M.callAt>=E&&M.callAt<=A}function ie(E,A){const M=new Error(`Aborting after running ${E.loopLimit} timers, assuming an infinite loop!`);if(!A.error)return M;const B=/target\.*[<|(|[].*?[>|\]|)]\s*/;let w=new RegExp(String(Object.keys(E).join("|")));h&&(w=new RegExp(`\\s+at (Object\\.)?(?:${Object.keys(E).join("|")})\\s+`));let G=-1;A.error.stack.split(`
|
|
204
|
-
`).some(function(se,de){return se.match(
|
|
203
|
+
${h}`)}const a=((f=(l=this.environment).processStackTrace)==null?void 0:f.call(l,c))||c;a.column--;const u=this._inlineSnapshotStacks.filter(h=>np(h,a));if(u.length>0){this._inlineSnapshots=this._inlineSnapshots.filter(d=>!np(d,a));const h=u.find(d=>d.snapshot!==r);if(h)throw Object.assign(new Error(`${i} with different snapshots cannot be called at the same location`),{actual:r,expected:h.snapshot})}return this._inlineSnapshotStacks.push({...a,testId:n,snapshot:r}),a}_reconcile(t){return t.hasSnapshot&&this._updateSnapshot==="all"||(!t.hasSnapshot||!t.snapshotIsPersisted)&&(this._updateSnapshot==="new"||this._updateSnapshot==="all")?(this._updateSnapshot==="all"?t.pass?this.matched.increment(t.testId):(t.hasSnapshot?this.updated.increment(t.testId):this.added.increment(t.testId),this._addSnapshot(t.key,t.addValue,{stack:t.stack,testId:t.testId,rawSnapshot:t.rawSnapshot,assertionName:t.assertionName})):(this._addSnapshot(t.key,t.addValue,{stack:t.stack,testId:t.testId,rawSnapshot:t.rawSnapshot,assertionName:t.assertionName}),this.added.increment(t.testId)),{actual:"",count:t.count,expected:"",key:t.key,pass:!0}):t.pass?(this.matched.increment(t.testId),{actual:"",count:t.count,expected:"",key:t.key,pass:!0}):(this.unmatched.increment(t.testId),{actual:t.actualDisplay,count:t.count,expected:t.expectedDisplay,key:t.key,pass:!1})}async save(){const t=Object.keys(this._snapshotData).length,n=this._inlineSnapshots.length,r=this._rawSnapshots.length,i=!t&&!n&&!r,o={deleted:!1,saved:!1};return(this._dirty||this._uncheckedKeys.size)&&!i?(t&&(await b_(this._environment,this._snapshotData,this.snapshotPath),this._fileExists=!0),n&&await w_(this._environment,this._inlineSnapshots),r&&await C_(this._environment,this._rawSnapshots),o.saved=!0):!t&&this._fileExists&&(this._updateSnapshot==="all"&&(await this._environment.removeSnapshotFile(this.snapshotPath),this._fileExists=!1),o.deleted=!0),o}getUncheckedCount(){return this._uncheckedKeys.size||0}getUncheckedKeys(){return Array.from(this._uncheckedKeys)}removeUncheckedKeys(){this._updateSnapshot==="all"&&this._uncheckedKeys.size&&(this._dirty=!0,this._uncheckedKeys.forEach(t=>delete this._snapshotData[t]),this._uncheckedKeys.clear())}probeExpectedSnapshot(t){const n=this._counters.get(t.testName)+1,r=Qd(t.testName,n);return{key:r,count:n,data:t!=null&&t.isInline?t.inlineSnapshot:this._snapshotData[r],markAsChecked:()=>{this._counters.increment(t.testName),this._testIdToKeys.get(t.testId).push(r),this._uncheckedKeys.delete(r)}}}match({testId:t,testName:n,received:r,key:i,inlineSnapshot:o,isInline:s,error:c,rawSnapshot:a,assertionName:u}){const l=this._resolveKey(t,n,i);i=l.key;const f=l.count;s&&this._snapshotData[i]!==void 0||this._uncheckedKeys.delete(i);let h=a&&typeof r=="string"?r:g_(r,void 0,this._snapshotFormat);a||(h=d_(h)),a&&a.content&&a.content.match(/\r\n/)&&!h.match(/\r\n/)&&(a.content=cl(a.content));const d=s?o:a?a.content:this._snapshotData[i],m=a?d:d==null?void 0:d.trim(),p=m===(a?h:h.trim()),y=d!==void 0,x=s||this._fileExists||a&&a.content!=null;p&&!s&&!a&&(this._snapshotData[i]=h);const E=s?this._resolveInlineStack({testId:t,snapshot:h,assertionName:u||"toMatchInlineSnapshot",error:c||new Error("snapshot")}):void 0;return this._reconcile({testId:t,key:i,count:f,pass:p,hasSnapshot:y,snapshotIsPersisted:!!x,addValue:h,actualDisplay:a?h:Ei(h),expectedDisplay:m!==void 0?a?m:Ei(m):void 0,stack:E,rawSnapshot:a,assertionName:u})}processDomainSnapshot({testId:t,received:n,expectedSnapshot:r,matchResult:i,isInline:o,error:s,assertionName:c}){const a=o?this._resolveInlineStack({testId:t,snapshot:n,assertionName:c,error:s||new Error("STACK_TRACE_ERROR")}):void 0,u=(i==null?void 0:i.resolved)??n,l=(i==null?void 0:i.expected)??r.data;return this._reconcile({testId:t,key:r.key,count:r.count,pass:(i==null?void 0:i.pass)??!1,hasSnapshot:!!r.data,snapshotIsPersisted:o?!0:this._fileExists,addValue:u,actualDisplay:Ei(u),expectedDisplay:l!==void 0?Ei(l):void 0,stack:a,assertionName:c})}async pack(){const t={filepath:this.testFilePath,added:0,fileDeleted:!1,matched:0,unchecked:0,uncheckedKeys:[],unmatched:0,updated:0},n=this.getUncheckedCount(),r=this.getUncheckedKeys();n&&this.removeUncheckedKeys();const i=await this.save();return t.fileDeleted=i.deleted,t.added=this.added.total(),t.matched=this.matched.total(),t.unmatched=this.unmatched.total(),t.updated=this.updated.total(),t.unchecked=i.deleted?0:n,t.uncheckedKeys=Array.from(r),t}}function __(e,t,n,r){const i=new Error(e);return Object.defineProperty(i,"actual",{value:n,enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(i,"expected",{value:r,enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(i,"diffOptions",{value:{expand:t}}),i}class $_{constructor(t={}){R(this,"snapshotStateMap",new Map);this.options=t}async setup(t,n){this.snapshotStateMap.has(t)||this.snapshotStateMap.set(t,await fl.create(t,n))}async finish(t){const r=await this.getSnapshotState(t).pack();return this.snapshotStateMap.delete(t),r}skipTest(t,n){this.getSnapshotState(t).markSnapshotsAsCheckedForTest(n)}clearTest(t,n){this.getSnapshotState(t).clearTest(n)}getSnapshotState(t){const n=this.snapshotStateMap.get(t);if(!n)throw new Error(`The snapshot state for '${t}' is not found. Did you call 'SnapshotClient.setup()'?`);return n}match(t){var _,M;const{filepath:n,name:r,testId:i=r,message:o,isInline:s=!1,properties:c,inlineSnapshot:a,error:u,errorMessage:l,rawSnapshot:f,assertionName:h}=t;let{received:d}=t;if(!n)throw new Error("Snapshot cannot be used outside of test");const m=this.getSnapshotState(n),p=[r,...o?[o]:[]].join(" > "),y=m.probeExpectedSnapshot({testName:p,testId:i,isInline:s,inlineSnapshot:a});if(typeof c=="object"){if(typeof d!="object"||!d)throw y.markAsChecked(),new Error("Received value must be an object when the matcher has properties");let C;try{C=((M=(_=this.options).isEqual)==null?void 0:M.call(_,d,c))??!1}catch(z){throw y.markAsChecked(),z}if(!C)return y.markAsChecked(),{pass:!1,message:()=>l||"Snapshot properties mismatched",actual:d,expected:c};d=ul(d,c)}const{actual:x,expected:E,key:$,pass:I}=m.match({testId:i,testName:p,received:d,isInline:s,error:u,inlineSnapshot:a,rawSnapshot:f,assertionName:h});return{pass:I,message:()=>`Snapshot \`${$||"unknown"}\` mismatched`,actual:f?x:x==null?void 0:x.trim(),expected:f?E:E==null?void 0:E.trim()}}assert(t){const n=this.match(t);if(!n.pass){const r=this.getSnapshotState(t.filepath);throw __(n.message(),r.expand,n.actual,n.expected)}}matchDomain(t){const{received:n,filepath:r,name:i,testId:o=i,message:s,adapter:c,isInline:a=!1,inlineSnapshot:u,error:l}=t;if(!r)throw new Error("Snapshot cannot be used outside of test");const f=c.capture(n),h=c.render(f),d=this.getSnapshotState(r),m=[i,...s?[s]:[]].join(" > "),p=d.probeExpectedSnapshot({testName:m,testId:o,isInline:a,inlineSnapshot:u});p.markAsChecked();const y=p.data?c.match(f,c.parseExpected(p.data)):void 0,{actual:x,expected:E,key:$,pass:I}=d.processDomainSnapshot({testId:o,received:h,expectedSnapshot:p,matchResult:y,isInline:a,error:l,assertionName:t.assertionName});return{pass:I,message:()=>`Snapshot \`${$}\` mismatched`,actual:x==null?void 0:x.trim(),expected:E==null?void 0:E.trim()}}async pollMatchDomain(t){const{poll:n,filepath:r,name:i,testId:o=i,message:s,adapter:c,isInline:a=!1,inlineSnapshot:u,error:l,timeout:f=1e3,interval:h=50}=t;if(!r)throw new Error("Snapshot cannot be used outside of test");const d=this.getSnapshotState(r),m=[i,...s?[s]:[]].join(" > "),p=d.probeExpectedSnapshot({testName:m,testId:o,isInline:a,inlineSnapshot:u}),y=p.data&&d.snapshotUpdateState!=="all"?c.parseExpected(p.data):void 0,x=f>0?new Promise(z=>setTimeout(z,f)):void 0,E=await M_({adapter:c,poll:n,interval:h,timedOut:x,match:y?z=>c.match(z,y).pass:void 0});if(p.markAsChecked(),!(E!=null&&E.rendered)){if(E!=null&&E.lastPollError)throw E.lastPollError;return{pass:!1,message:()=>"poll() did not produce a stable snapshot within the timeout"}}const $=p.data?c.match(E.captured,c.parseExpected(p.data)):void 0,{actual:I,expected:_,key:M,pass:C}=d.processDomainSnapshot({testId:o,received:E.rendered,expectedSnapshot:p,matchResult:$,isInline:a,error:l,assertionName:t.assertionName});return{pass:C,message:()=>`Snapshot \`${M}\` mismatched`,actual:I==null?void 0:I.trim(),expected:_==null?void 0:_.trim()}}async assertRaw(t){if(!t.rawSnapshot)throw new Error("Raw snapshot is required");const{filepath:n,rawSnapshot:r}=t;if(r.content==null){if(!n)throw new Error("Snapshot cannot be used outside of test");const i=this.getSnapshotState(n);t.filepath||(t.filepath=n),r.file=await i.environment.resolveRawPath(n,r.file),r.content=await i.environment.readSnapshotFile(r.file)??void 0}return this.assert(t)}clear(){this.snapshotStateMap.clear()}}async function M_({adapter:e,poll:t,interval:n,timedOut:r,match:i}){let o,s,c;for(;;){try{const u=await rp(Promise.resolve(t()),r);if(!u.ok)break;const l=e.capture(u.value),f=e.render(l);if(o!==void 0&&f===o){if(c={captured:l,rendered:f},!i||i(l))break}else o=f,c=void 0}catch(u){o=void 0,c=void 0,s=u}if(!(await rp(new Promise(u=>setTimeout(u,n)),r)).ok)break}return{...c,lastPollError:s}}function rp(e,t){const n=e.then(r=>({ok:!0,value:r}));return t?Promise.race([n,t.then(r=>({ok:!1,value:r}))]):n}var Bn={},Ws,ip;function O_(){if(ip)return Ws;ip=1;var e;return typeof ic<"u"?e=ic:typeof window<"u"?e=window:e=self,Ws=e,Ws}var zs,op;function P_(){if(op)return zs;op=1;let e;try{({}).__proto__,e=!1}catch{e=!0}return zs=e,zs}var Gs,sp;function ar(){if(sp)return Gs;sp=1;var e=Function.call,t=P_(),n=["size","caller","callee","arguments"];return t&&n.push("__proto__"),Gs=function(i){return Object.getOwnPropertyNames(i).reduce(function(o,s){return n.includes(s)||typeof i[s]!="function"||(o[s]=e.bind(i[s])),o},Object.create(null))},Gs}var Ks,ap;function ao(){if(ap)return Ks;ap=1;var e=ar();return Ks=e(Array.prototype),Ks}var Hs,cp;function N_(){if(cp)return Hs;cp=1;var e=ao().every;function t(i,o){return i[o.id]===void 0&&(i[o.id]=0),i[o.id]<o.callCount}function n(i,o,s,c){var a=!0;return s!==c.length-1&&(a=o.calledBefore(c[s+1])),t(i,o)&&a?(i[o.id]+=1,!0):!1}function r(i){var o={},s=arguments.length>1?arguments:i;return e(s,n.bind(null,o))}return Hs=r,Hs}var Ys,up;function j_(){if(up)return Ys;up=1;function e(t){return t.constructor&&t.constructor.name||null}return Ys=e,Ys}var Js={},lp;function F_(){return lp||(lp=1,(function(e){e.wrap=function(t,n){var r=function(){return e.printWarning(n),t.apply(this,arguments)};return t.prototype&&(r.prototype=t.prototype),r},e.defaultMsg=function(t,n){return`${t}.${n} is deprecated and will be removed from the public API in a future version of ${t}.`},e.printWarning=function(t){typeof process=="object"&&process.emitWarning?process.emitWarning(t):console.info?console.info(t):console.log(t)}})(Js)),Js}var Xs,fp;function R_(){return fp||(fp=1,Xs=function(t,n){var r=!0;try{t.forEach(function(){if(!n.apply(this,arguments))throw new Error})}catch{r=!1}return r}),Xs}var Zs,hp;function L_(){return hp||(hp=1,Zs=function(t){if(!t)return"";try{return t.displayName||t.name||(String(t).match(/function ([^\s(]+)/)||[])[1]}catch{return""}}),Zs}var Qs,dp;function D_(){if(dp)return Qs;dp=1;var e=ao().sort,t=ao().slice;function n(i,o){var s=i.getCall(0),c=o.getCall(0),a=s&&s.callId||-1,u=c&&c.callId||-1;return a<u?-1:1}function r(i){return e(t(i),n)}return Qs=r,Qs}var ea,pp;function B_(){if(pp)return ea;pp=1;var e=ar();return ea=e(Function.prototype),ea}var ta,mp;function U_(){if(mp)return ta;mp=1;var e=ar();return ta=e(Map.prototype),ta}var na,gp;function V_(){if(gp)return na;gp=1;var e=ar();return na=e(Object.prototype),na}var ra,yp;function q_(){if(yp)return ra;yp=1;var e=ar();return ra=e(Set.prototype),ra}var ia,bp;function W_(){if(bp)return ia;bp=1;var e=ar();return ia=e(String.prototype),ia}var oa,wp;function z_(){return wp||(wp=1,oa={array:ao(),function:B_(),map:U_(),object:V_(),set:q_(),string:W_()}),oa}var Li={exports:{}},G_=Li.exports,xp;function K_(){return xp||(xp=1,(function(e,t){(function(n,r){e.exports=r()})(G_,(function(){var n=typeof Promise=="function",r=typeof self=="object"?self:ic,i=typeof Symbol<"u",o=typeof Map<"u",s=typeof Set<"u",c=typeof WeakMap<"u",a=typeof WeakSet<"u",u=typeof DataView<"u",l=i&&typeof Symbol.iterator<"u",f=i&&typeof Symbol.toStringTag<"u",h=s&&typeof Set.prototype.entries=="function",d=o&&typeof Map.prototype.entries=="function",m=h&&Object.getPrototypeOf(new Set().entries()),p=d&&Object.getPrototypeOf(new Map().entries()),y=l&&typeof Array.prototype[Symbol.iterator]=="function",x=y&&Object.getPrototypeOf([][Symbol.iterator]()),E=l&&typeof String.prototype[Symbol.iterator]=="function",$=E&&Object.getPrototypeOf(""[Symbol.iterator]()),I=8,_=-1;function M(C){var z=typeof C;if(z!=="object")return z;if(C===null)return"null";if(C===r)return"global";if(Array.isArray(C)&&(f===!1||!(Symbol.toStringTag in C)))return"Array";if(typeof window=="object"&&window!==null){if(typeof window.location=="object"&&C===window.location)return"Location";if(typeof window.document=="object"&&C===window.document)return"Document";if(typeof window.navigator=="object"){if(typeof window.navigator.mimeTypes=="object"&&C===window.navigator.mimeTypes)return"MimeTypeArray";if(typeof window.navigator.plugins=="object"&&C===window.navigator.plugins)return"PluginArray"}if((typeof window.HTMLElement=="function"||typeof window.HTMLElement=="object")&&C instanceof window.HTMLElement){if(C.tagName==="BLOCKQUOTE")return"HTMLQuoteElement";if(C.tagName==="TD")return"HTMLTableDataCellElement";if(C.tagName==="TH")return"HTMLTableHeaderCellElement"}}var le=f&&C[Symbol.toStringTag];if(typeof le=="string")return le;var B=Object.getPrototypeOf(C);return B===RegExp.prototype?"RegExp":B===Date.prototype?"Date":n&&B===Promise.prototype?"Promise":s&&B===Set.prototype?"Set":o&&B===Map.prototype?"Map":a&&B===WeakSet.prototype?"WeakSet":c&&B===WeakMap.prototype?"WeakMap":u&&B===DataView.prototype?"DataView":o&&B===p?"Map Iterator":s&&B===m?"Set Iterator":y&&B===x?"Array Iterator":E&&B===$?"String Iterator":B===null?"Object":Object.prototype.toString.call(C).slice(I,_)}return M}))})(Li)),Li.exports}var sa,Sp;function H_(){if(Sp)return sa;Sp=1;var e=K_();return sa=function(n){return e(n).toLowerCase()},sa}var aa,Ep;function Y_(){if(Ep)return aa;Ep=1;function e(t){return t&&t.toString?t.toString():String(t)}return aa=e,aa}var ca,Tp;function J_(){return Tp||(Tp=1,ca={global:O_(),calledInOrder:N_(),className:j_(),deprecated:F_(),every:R_(),functionName:L_(),orderByFirstCall:D_(),prototypes:z_(),typeOf:H_(),valueToString:Y_()}),ca}var vp;function X_(){if(vp)return Bn;vp=1;const e=J_().global;let t,n;if(typeof __vitest_required__<"u"){try{t=__vitest_required__.timers}catch{}try{n=__vitest_required__.timersPromises}catch{}}function r(o){const s=Math.pow(2,31)-1,c=1e12,a=function(){},u=function(){return[]},l={};let f,h=!1;o.setTimeout&&(l.setTimeout=!0,f=o.setTimeout(a,0),h=typeof f=="object"),l.clearTimeout=!!o.clearTimeout,l.setInterval=!!o.setInterval,l.clearInterval=!!o.clearInterval,l.hrtime=o.process&&typeof o.process.hrtime=="function",l.hrtimeBigint=l.hrtime&&typeof o.process.hrtime.bigint=="function",l.nextTick=o.process&&typeof o.process.nextTick=="function";const d=o.process&&o.__vitest_required__&&o.__vitest_required__.util.promisify;l.performance=o.performance&&typeof o.performance.now=="function";const m=o.Performance&&(typeof o.Performance).match(/^(function|object)$/),p=o.performance&&o.performance.constructor&&o.performance.constructor.prototype;l.queueMicrotask=o.hasOwnProperty("queueMicrotask"),l.requestAnimationFrame=o.requestAnimationFrame&&typeof o.requestAnimationFrame=="function",l.cancelAnimationFrame=o.cancelAnimationFrame&&typeof o.cancelAnimationFrame=="function",l.requestIdleCallback=o.requestIdleCallback&&typeof o.requestIdleCallback=="function",l.cancelIdleCallbackPresent=o.cancelIdleCallback&&typeof o.cancelIdleCallback=="function",l.setImmediate=o.setImmediate&&typeof o.setImmediate=="function",l.clearImmediate=o.clearImmediate&&typeof o.clearImmediate=="function",l.Intl=o.Intl&&typeof o.Intl=="object",o.clearTimeout&&o.clearTimeout(f);const y=o.Date,x=l.Intl?Object.defineProperties(Object.create(null),Object.getOwnPropertyDescriptors(o.Intl)):void 0;let E=c;if(y===void 0)throw new Error("The global scope doesn't have a `Date` object (see https://github.com/sinonjs/sinon/issues/1852#issuecomment-419622780)");l.Date=!0;class ${constructor(A,O,U,w){this.name=A,this.entryType=O,this.startTime=U,this.duration=w}toJSON(){return JSON.stringify({...this})}}function I(T){return Number.isFinite?Number.isFinite(T):isFinite(T)}let _=!1;function M(T,A){T.loopLimit&&A===T.loopLimit-1&&(_=!0)}function C(){_=!1}function z(T){if(!T)return 0;const A=T.split(":"),O=A.length;let U=O,w=0,G;if(O>3||!/^(\d\d:){0,2}\d\d?$/.test(T))throw new Error("tick only understands numbers, 'm:s' and 'h:m:s'. Each part must be two digits");for(;U--;){if(G=parseInt(A[U],10),G>=60)throw new Error(`Invalid time ${T}`);w+=G*Math.pow(60,O-U-1)}return w*1e3}function le(T){const O=T*1e6%1e6,U=O<0?O+1e6:O;return Math.floor(U)}function B(T){if(!T)return 0;if(typeof T.getTime=="function")return T.getTime();if(typeof T=="number")return T;throw new TypeError("now should be milliseconds since UNIX epoch")}function X(T,A,O){return O&&O.callAt>=T&&O.callAt<=A}function ie(T,A){const O=new Error(`Aborting after running ${T.loopLimit} timers, assuming an infinite loop!`);if(!A.error)return O;const U=/target\.*[<|(|[].*?[>|\]|)]\s*/;let w=new RegExp(String(Object.keys(T).join("|")));h&&(w=new RegExp(`\\s+at (Object\\.)?(?:${Object.keys(T).join("|")})\\s+`));let G=-1;A.error.stack.split(`
|
|
204
|
+
`).some(function(se,de){return se.match(U)?(G=de,!0):se.match(w)?(G=de,!1):G>=0});const K=`${O}
|
|
205
205
|
${A.type||"Microtask"} - ${A.func.name||"anonymous"}
|
|
206
206
|
${A.error.stack.split(`
|
|
207
207
|
`).slice(G+1).join(`
|
|
208
|
-
`)}`;try{Object.defineProperty(
|
|
209
|
-
To automatically clean-up native timers, use \`shouldClearNativeTimers\`.`)}if(E.timers.hasOwnProperty(B)){const w=E.timers[B];if(w.type===M||w.type==="Timeout"&&M==="Interval"||w.type==="Interval"&&M==="Timeout")delete E.timers[B];else{const G=Ve(M),K=Ct(w.type);throw new Error(`Cannot clear timer: timer created with ${K}() but cleared with ${G}()`)}}}function On(E){let A,M,B;const w="_hrtime",G="_nextTick";for(M=0,B=E.methods.length;M<B;M++){if(A=E.methods[M],A==="hrtime"&&o.process)o.process.hrtime=E[w];else if(A==="nextTick"&&o.process)o.process.nextTick=E[G];else if(A==="performance"){const K=Object.getOwnPropertyDescriptor(E,`_${A}`);K&&K.get&&!K.set?Object.defineProperty(o,A,K):K.configurable&&(o[A]=E[`_${A}`])}else if(o[A]&&o[A].hadOwnProperty)o[A]=E[`_${A}`];else try{delete o[A]}catch{}if(E.timersModuleMethods!==void 0)for(let K=0;K<E.timersModuleMethods.length;K++){const se=E.timersModuleMethods[K];t[se.methodName]=se.original}if(E.timersPromisesModuleMethods!==void 0)for(let K=0;K<E.timersPromisesModuleMethods.length;K++){const se=E.timersPromisesModuleMethods[K];n[se.methodName]=se.original}}E.setTickMode("manual"),E.methods=[];for(const[K,se]of E.abortListenerMap.entries())se.removeEventListener("abort",K),E.abortListenerMap.delete(K);return E.timers?Object.keys(E.timers).map(function(se){return E.timers[se]}):[]}function _t(E,A,M){if(M[A].hadOwnProperty=Object.prototype.hasOwnProperty.call(E,A),M[`_${A}`]=E[A],A==="Date")E[A]=M[A];else if(A==="Intl")E[A]=M[A];else if(A==="performance"){const B=Object.getOwnPropertyDescriptor(E,A);if(B&&B.get&&!B.set){Object.defineProperty(M,`_${A}`,B);const w=Object.getOwnPropertyDescriptor(M,A);Object.defineProperty(E,A,w)}else E[A]=M[A]}else E[A]=function(){return M[A].apply(M,arguments)},Object.defineProperties(E[A],Object.getOwnPropertyDescriptors(M[A]));E[A].clock=M}function sr(E,A){E.tick(A)}const Ye={setTimeout:o.setTimeout,clearTimeout:o.clearTimeout,setInterval:o.setInterval,clearInterval:o.clearInterval,Date:o.Date};l.setImmediate&&(Ye.setImmediate=o.setImmediate),l.clearImmediate&&(Ye.clearImmediate=o.clearImmediate),l.hrtime&&(Ye.hrtime=o.process.hrtime),l.nextTick&&(Ye.nextTick=o.process.nextTick),l.performance&&(Ye.performance=o.performance),l.requestAnimationFrame&&(Ye.requestAnimationFrame=o.requestAnimationFrame),l.queueMicrotask&&(Ye.queueMicrotask=o.queueMicrotask),l.cancelAnimationFrame&&(Ye.cancelAnimationFrame=o.cancelAnimationFrame),l.requestIdleCallback&&(Ye.requestIdleCallback=o.requestIdleCallback),l.cancelIdleCallback&&(Ye.cancelIdleCallback=o.cancelIdleCallback),l.Intl&&(Ye.Intl=x);const $t=o.setImmediate||o.setTimeout,$b=o.clearInterval,Mb=o.setInterval;function ll(E,A){E=Math.floor(D(E)),A=A||1e3;let M=0;const B=[0,0],w={now:E,Date:ve(),loopLimit:A,tickMode:{mode:"manual",counter:0,delta:void 0}};w.Date.clock=w;function G(){return 16-(w.now-E)%16}function K(j){const P=w.now-B[0]-E,V=Math.floor(P/1e3),q=(P-V*1e3)*1e6+M-B[1];if(Array.isArray(j)){if(j[1]>1e9)throw new TypeError("Number of nanoseconds can't exceed a billion");const ce=j[0];let Ae=q-j[1],rt=V-ce;return Ae<0&&(Ae+=1e9,rt-=1),[rt,Ae]}return[V,q]}function se(){const j=K();return j[0]*1e3+j[1]/1e6}l.hrtimeBigint&&(K.bigint=function(){const j=K();return BigInt(j[0])*BigInt(1e9)+BigInt(j[1])}),l.Intl&&(w.Intl=ye(),w.Intl.clock=w),w.setTickMode=function(j){const{mode:P,delta:V}=j,{mode:q,delta:ce}=w.tickMode;P===q&&V===ce||(q==="interval"&&$b(w.attachedInterval),w.tickMode={counter:w.tickMode.counter+1,mode:P,delta:V},P==="nextAsync"?de():P==="interval"&&Ob(w,V||20))};async function de(){async function j(){const V=new MessageChannel;await new Promise(q=>{V.port1.onmessage=()=>{q(),V.port1.close()},V.port2.postMessage(void 0)}),V.port1.close(),V.port2.close(),await new Promise(q=>{$t(q)})}const{counter:P}=w.tickMode;for(;w.tickMode.counter===P;){if(await j(),w.tickMode.counter!==P)return;w.next()}}function st(j){return w.tickMode.mode!=="nextAsync"?j:(w.setTickMode({mode:"manual"}),j.finally(()=>{w.setTickMode({mode:"nextAsync"})}))}w.requestIdleCallback=function(P,V){let q=0;w.countTimers()>0&&(q=50);const ce=he(w,{func:P,args:Array.prototype.slice.call(arguments,2),delay:typeof V>"u"?q:Math.min(V,q),idleCallback:!0});return Number(ce)},w.cancelIdleCallback=function(P){return nt(w,P,"IdleCallback")},w.setTimeout=function(P,V){return he(w,{func:P,args:Array.prototype.slice.call(arguments,2),delay:V})},typeof o.Promise<"u"&&d&&(w.setTimeout[d.custom]=function(P,V){return new o.Promise(function(ce){he(w,{func:ce,args:[V],delay:P})})}),w.clearTimeout=function(P){return nt(w,P,"Timeout")},w.nextTick=function(P){return fe(w,{func:P,args:Array.prototype.slice.call(arguments,1),error:_?new Error:null})},w.queueMicrotask=function(P){return w.nextTick(P)},w.setInterval=function(P,V){return V=parseInt(V,10),he(w,{func:P,args:Array.prototype.slice.call(arguments,2),delay:V,interval:V})},w.clearInterval=function(P){return nt(w,P,"Interval")},l.setImmediate&&(w.setImmediate=function(P){return he(w,{func:P,args:Array.prototype.slice.call(arguments,1),immediate:!0})},typeof o.Promise<"u"&&d&&(w.setImmediate[d.custom]=function(P){return new o.Promise(function(q){he(w,{func:q,args:[P],immediate:!0})})}),w.clearImmediate=function(P){return nt(w,P,"Immediate")}),w.countTimers=function(){return Object.keys(w.timers||{}).length+(w.jobs||[]).length},w.requestAnimationFrame=function(P){const V=he(w,{func:P,delay:G(),get args(){return[se()]},animation:!0});return Number(V)},w.cancelAnimationFrame=function(P){return nt(w,P,"AnimationFrame")},w.runMicrotasks=function(){ee(w)};function Ne(j,P,V,q){const ce=typeof j=="number"?j:z(j),Ae=Math.floor(ce),rt=le(ce);let Mt=M+rt,qe=w.now+Ae;if(ce<0)throw new TypeError("Negative ticks are not supported");Mt>=1e6&&(qe+=1,Mt-=1e6),M=Mt;let Ot=w.now,ar=w.now,Vt,Pn,at,fl,Uo,Vo;w.duringTick=!0,at=w.now,ee(w),at!==w.now&&(Ot+=w.now-at,qe+=w.now-at);function hl(){for(Vt=_e(w,Ot,qe);Vt&&Ot<=qe;){if(w.timers[Vt.id]){Ot=Vt.callAt,w.now=Vt.callAt,at=w.now;try{ee(w),Re(w,Vt)}catch(cr){Pn=Pn||cr}if(P){$t(fl);return}Uo()}Vo()}if(at=w.now,ee(w),at!==w.now&&(Ot+=w.now-at,qe+=w.now-at),w.duringTick=!1,Vt=_e(w,Ot,qe),Vt)try{w.tick(qe-w.now)}catch(cr){Pn=Pn||cr}else w.now=qe,M=Mt;if(Pn)throw Pn;if(P)V(w.now);else return w.now}return fl=P&&function(){try{Uo(),Vo(),hl()}catch(cr){q(cr)}},Uo=function(){at!==w.now&&(Ot+=w.now-at,qe+=w.now-at,ar+=w.now-at)},Vo=function(){Vt=_e(w,ar,qe),ar=Ot},hl()}return w.tick=function(P){return Ne(P,!1)},typeof o.Promise<"u"&&(w.tickAsync=function(P){return st(new o.Promise(function(V,q){$t(function(){try{Ne(P,!0,V,q)}catch(ce){q(ce)}})}))}),w.next=function(){ee(w);const P=oe(w);if(!P)return w.now;w.duringTick=!0;try{return w.now=P.callAt,Re(w,P),ee(w),w.now}finally{w.duringTick=!1}},typeof o.Promise<"u"&&(w.nextAsync=function(){return st(new o.Promise(function(P,V){$t(function(){try{const q=oe(w);if(!q){P(w.now);return}let ce;w.duringTick=!0,w.now=q.callAt;try{Re(w,q)}catch(Ae){ce=Ae}w.duringTick=!1,$t(function(){ce?V(ce):P(w.now)})}catch(q){V(q)}})}))}),w.runAll=function(){let P,V;for(ee(w),V=0;V<w.loopLimit;V++){if(!w.timers||(P=Object.keys(w.timers).length,P===0))return C(),w.now;w.next(),$(w,V)}const q=oe(w);throw ie(w,q)},w.runToFrame=function(){return w.tick(G())},typeof o.Promise<"u"&&(w.runAllAsync=function(){return st(new o.Promise(function(P,V){let q=0;function ce(){$t(function(){try{ee(w);let Ae;if(q<w.loopLimit){if(!w.timers){C(),P(w.now);return}if(Ae=Object.keys(w.timers).length,Ae===0){C(),P(w.now);return}w.next(),q++,ce(),$(w,q);return}const rt=oe(w);V(ie(w,rt))}catch(Ae){V(Ae)}})}ce()}))}),w.runToLast=function(){const P=Ee(w);return P?w.tick(P.callAt-w.now):(ee(w),w.now)},typeof o.Promise<"u"&&(w.runToLastAsync=function(){return st(new o.Promise(function(P,V){$t(function(){try{const q=Ee(w);q||(ee(w),P(w.now)),P(w.tickAsync(q.callAt-w.now))}catch(q){V(q)}})}))}),w.reset=function(){M=0,w.timers={},w.jobs=[],w.now=E},w.setSystemTime=function(P){const V=D(P),q=V-w.now;let ce,Ae;B[0]=B[0]+q,B[1]=B[1]+M,w.now=V,M=0;for(ce in w.timers)w.timers.hasOwnProperty(ce)&&(Ae=w.timers[ce],Ae.createdAt+=q,Ae.callAt+=q)},w.jump=function(P){const V=typeof P=="number"?P:z(P),q=Math.floor(V);for(const ce of Object.values(w.timers))w.now+q>ce.callAt&&(ce.callAt=w.now+q);w.tick(q)},l.performance&&(w.performance=Object.create(null),w.performance.now=se),l.hrtime&&(w.hrtime=K),w}function Ob(E,A){const M=sr.bind(null,E,A),B=Mb(M,A);E.attachedInterval=B}function Pb(E){if(arguments.length>1||E instanceof Date||Array.isArray(E)||typeof E=="number")throw new TypeError(`FakeTimers.install called with ${String(E)} install requires an object parameter`);if(o.Date.isFake===!0)throw new TypeError("Can't install fake timers twice on the same global object.");if(E=typeof E<"u"?E:{},E.shouldAdvanceTime=E.shouldAdvanceTime||!1,E.advanceTimeDelta=E.advanceTimeDelta||20,E.shouldClearNativeTimers=E.shouldClearNativeTimers||!1,E.target)throw new TypeError("config.target is no longer supported. Use `withGlobal(target)` instead.");function A(G){if(!E.ignoreMissingTimers)throw new ReferenceError(`non-existent timers and/or objects cannot be faked: '${G}'`)}let M,B;const w=ll(E.now,E.loopLimit);if(w.shouldClearNativeTimers=E.shouldClearNativeTimers,w.uninstall=function(){return On(w)},w.abortListenerMap=new Map,w.methods=E.toFake||[],w.methods.length===0&&(w.methods=Object.keys(Ye)),E.shouldAdvanceTime===!0&&w.setTickMode({mode:"interval",delta:E.advanceTimeDelta}),w.methods.includes("performance")){const G=(()=>{if(p)return o.performance.constructor.prototype;if(m)return o.Performance.prototype})();if(G)Object.getOwnPropertyNames(G).forEach(function(K){K!=="now"&&(w.performance[K]=K.indexOf("getEntries")===0?u:a)}),w.performance.mark=K=>new O(K,"mark",0,0),w.performance.measure=K=>new O(K,"measure",0,100),w.performance.timeOrigin=D(E.now);else if((E.toFake||[]).includes("performance"))return A("performance")}for(o===e&&t&&(w.timersModuleMethods=[]),o===e&&n&&(w.timersPromisesModuleMethods=[]),M=0,B=w.methods.length;M<B;M++){const G=w.methods[M];if(!l[G]){A(G);continue}if(G==="hrtime"?o.process&&typeof o.process.hrtime=="function"&&_t(o.process,G,w):G==="nextTick"?o.process&&typeof o.process.nextTick=="function"&&_t(o.process,G,w):_t(o,G,w),w.timersModuleMethods!==void 0&&t[G]){const K=t[G];w.timersModuleMethods.push({methodName:G,original:K}),t[G]=o[G]}w.timersPromisesModuleMethods!==void 0&&(G==="setTimeout"?(w.timersPromisesModuleMethods.push({methodName:"setTimeout",original:n.setTimeout}),n.setTimeout=(K,se,de={})=>new Promise((st,Ne)=>{const j=()=>{de.signal.removeEventListener("abort",j),w.abortListenerMap.delete(j),w.clearTimeout(P),Ne(de.signal.reason)},P=w.setTimeout(()=>{de.signal&&(de.signal.removeEventListener("abort",j),w.abortListenerMap.delete(j)),st(se)},K);de.signal&&(de.signal.aborted?j():(de.signal.addEventListener("abort",j),w.abortListenerMap.set(j,de.signal)))})):G==="setImmediate"?(w.timersPromisesModuleMethods.push({methodName:"setImmediate",original:n.setImmediate}),n.setImmediate=(K,se={})=>new Promise((de,st)=>{const Ne=()=>{se.signal.removeEventListener("abort",Ne),w.abortListenerMap.delete(Ne),w.clearImmediate(j),st(se.signal.reason)},j=w.setImmediate(()=>{se.signal&&(se.signal.removeEventListener("abort",Ne),w.abortListenerMap.delete(Ne)),de(K)});se.signal&&(se.signal.aborted?Ne():(se.signal.addEventListener("abort",Ne),w.abortListenerMap.set(Ne,se.signal)))})):G==="setInterval"&&(w.timersPromisesModuleMethods.push({methodName:"setInterval",original:n.setInterval}),n.setInterval=(K,se,de={})=>({[Symbol.asyncIterator]:()=>{const st=()=>{let rt,Mt;const qe=new Promise((Ot,ar)=>{rt=Ot,Mt=ar});return qe.resolve=rt,qe.reject=Mt,qe};let Ne=!1,j=!1,P,V=0;const q=[],ce=w.setInterval(()=>{q.length>0?q.shift().resolve():V++},K),Ae=()=>{de.signal.removeEventListener("abort",Ae),w.abortListenerMap.delete(Ae),w.clearInterval(ce),Ne=!0;for(const rt of q)rt.resolve()};return de.signal&&(de.signal.aborted?Ne=!0:(de.signal.addEventListener("abort",Ae),w.abortListenerMap.set(Ae,de.signal))),{next:async()=>{var Mt,qe;if((Mt=de.signal)!=null&&Mt.aborted&&!j)throw j=!0,de.signal.reason;if(Ne)return{done:!0,value:void 0};if(V>0)return V--,{done:!1,value:se};const rt=st();if(q.push(rt),await rt,P&&q.length===0&&P.resolve(),(qe=de.signal)!=null&&qe.aborted&&!j)throw j=!0,de.signal.reason;return Ne?{done:!0,value:void 0}:{done:!1,value:se}},return:async()=>Ne?{done:!0,value:void 0}:(q.length>0&&(P=st(),await P),w.clearInterval(ce),Ne=!0,de.signal&&(de.signal.removeEventListener("abort",Ae),w.abortListenerMap.delete(Ae)),{done:!0,value:void 0})}}})))}return w}return{timers:Ye,createClock:ll,install:Pb,withGlobal:r}}const i=r(e);return Ln.timers=i.timers,Ln.createClock=i.createClock,Ln.install=i.install,Ln.withGlobal=r,Ln}var d_=h_();class p_{constructor({global:t,config:n}){R(this,"_global");R(this,"_clock");R(this,"_fakingTime");R(this,"_fakingDate");R(this,"_fakeTimers");R(this,"_userConfig");R(this,"_now",St.now);this._userConfig=n,this._fakingDate=null,this._fakingTime=!1,this._fakeTimers=d_.withGlobal(t),this._global=t}clearAllTimers(){this._fakingTime&&this._clock.reset()}dispose(){this.useRealTimers()}runAllTimers(){this._checkFakeTimers()&&this._clock.runAll()}async runAllTimersAsync(){this._checkFakeTimers()&&await this._clock.runAllAsync()}runOnlyPendingTimers(){this._checkFakeTimers()&&this._clock.runToLast()}async runOnlyPendingTimersAsync(){this._checkFakeTimers()&&await this._clock.runToLastAsync()}advanceTimersToNextTimer(t=1){if(this._checkFakeTimers())for(let n=t;n>0&&(this._clock.next(),this._clock.tick(0),this._clock.countTimers()!==0);n--);}async advanceTimersToNextTimerAsync(t=1){if(this._checkFakeTimers())for(let n=t;n>0&&(await this._clock.nextAsync(),this._clock.tick(0),this._clock.countTimers()!==0);n--);}advanceTimersByTime(t){this._checkFakeTimers()&&this._clock.tick(t)}async advanceTimersByTimeAsync(t){this._checkFakeTimers()&&await this._clock.tickAsync(t)}advanceTimersToNextFrame(){this._checkFakeTimers()&&this._clock.runToFrame()}runAllTicks(){this._checkFakeTimers()&&this._clock.runMicrotasks()}useRealTimers(){this._fakingDate&&(Vd(),this._fakingDate=null),this._fakingTime&&(this._clock.uninstall(),this._fakingTime=!1)}useFakeTimers(){var r,i,o;const t=this._fakingDate||Date.now();this._fakingDate&&(Vd(),this._fakingDate=null),this._fakingTime&&this._clock.uninstall();const n=Object.keys(this._fakeTimers.timers).filter(s=>s!=="nextTick"&&s!=="queueMicrotask");if((i=(r=this._userConfig)==null?void 0:r.toFake)!=null&&i.includes("nextTick")&&o1())throw new Error("process.nextTick cannot be mocked inside child_process");this._clock=this._fakeTimers.install({now:t,...this._userConfig,toFake:((o=this._userConfig)==null?void 0:o.toFake)||n,ignoreMissingTimers:!0}),this._fakingTime=!0}reset(){if(this._checkFakeTimers()){const{now:t}=this._clock;this._clock.reset(),this._clock.setSystemTime(t)}}setSystemTime(t){const n=typeof t>"u"||t instanceof Date?t:new Date(t);this._fakingTime?this._clock.setSystemTime(n):(this._fakingDate=n??new Date(this.getRealSystemTime()),lC(this._fakingDate))}getMockedSystemTime(){return this._fakingTime?new Date(this._clock.now):this._fakingDate}getRealSystemTime(){return this._now()}getTimerCount(){return this._checkFakeTimers()?this._clock.countTimers():0}setTimerTickMode(t,n){if(this._checkFakeTimers())if(t==="manual")this._clock.setTickMode({mode:"manual"});else if(t==="nextTimerAsync")this._clock.setTickMode({mode:"nextAsync"});else if(t==="interval")this._clock.setTickMode({mode:"interval",delta:n});else throw new Error(`Invalid tick mode: ${t}`)}configure(t){this._userConfig=t}isFakeTimers(){return this._fakingTime}_checkFakeTimers(){if(!this._fakingTime)throw new Error("A function to advance timers was called but the timers APIs are not mocked. Call `vi.useFakeTimers()` in the test file first.");return this._fakingTime}}function pb(e,t){return t.stack!==void 0&&(e.stack=t.stack.replace(t.message,e.message)),e}function m_(e,t={}){const{setTimeout:n,setInterval:r,clearTimeout:i,clearInterval:o}=nr(),{interval:s=50,timeout:c=1e3}=typeof t=="number"?{timeout:t}:t,a=new Error("STACK_TRACE_ERROR");return new Promise((u,l)=>{let f,h="idle",d,m;const p=T=>{d&&i(d),m&&o(m),u(T)},y=()=>{m&&o(m);let T=f;T||(T=pb(new Error("Timed out in waitFor!"),a)),l(T)},x=()=>{if(Qn.isFakeTimers()&&Qn.advanceTimersByTime(s),h!=="pending")try{const T=e();if(T!==null&&typeof T=="object"&&typeof T.then=="function"){const O=T;h="pending",O.then(k=>{h="resolved",p(k)},k=>{h="rejected",f=k})}else return p(T),!0}catch(T){f=T}};x()!==!0&&(d=n(y,c),m=r(x,s))})}function g_(e,t={}){const{setTimeout:n,setInterval:r,clearTimeout:i,clearInterval:o}=nr(),{interval:s=50,timeout:c=1e3}=typeof t=="number"?{timeout:t}:t,a=new Error("STACK_TRACE_ERROR");return new Promise((u,l)=>{let f="idle",h,d;const m=x=>{d&&o(d),x||(x=pb(new Error("Timed out in waitUntil!"),a)),l(x)},p=x=>{if(x)return h&&i(h),d&&o(d),u(x),!0},y=()=>{if(Qn.isFakeTimers()&&Qn.advanceTimersByTime(s),f!=="pending")try{const x=e();if(x!==null&&typeof x=="object"&&typeof x.then=="function"){const T=x;f="pending",T.then(O=>{f="resolved",p(O)},O=>{f="rejected",m(O)})}else return p(x)}catch(x){m(x)}};y()!==!0&&(h=n(m,c),d=r(y,s))})}function y_(){let e=null;const t=()=>zr();let n;const r=()=>n||(n=new p_({global:globalThis,config:t().config.fakeTimers})),i=new Map,o=new Map,s=["PROD","DEV","SSR"],c={useFakeTimers(a){var u,l,f,h;if(o1()&&((u=a==null?void 0:a.toFake)!=null&&u.includes("nextTick")||(h=(f=(l=t().config)==null?void 0:l.fakeTimers)==null?void 0:f.toFake)!=null&&h.includes("nextTick")))throw new Error('vi.useFakeTimers({ toFake: ["nextTick"] }) is not supported in node:child_process. Use --pool=threads if mocking nextTick is required.');return a?r().configure({...t().config.fakeTimers,...a}):r().configure(t().config.fakeTimers),r().useFakeTimers(),c},isFakeTimers(){return r().isFakeTimers()},useRealTimers(){return r().useRealTimers(),c},runOnlyPendingTimers(){return r().runOnlyPendingTimers(),c},async runOnlyPendingTimersAsync(){return await r().runOnlyPendingTimersAsync(),c},runAllTimers(){return r().runAllTimers(),c},async runAllTimersAsync(){return await r().runAllTimersAsync(),c},runAllTicks(){return r().runAllTicks(),c},advanceTimersByTime(a){return r().advanceTimersByTime(a),c},async advanceTimersByTimeAsync(a){return await r().advanceTimersByTimeAsync(a),c},advanceTimersToNextTimer(){return r().advanceTimersToNextTimer(),c},async advanceTimersToNextTimerAsync(){return await r().advanceTimersToNextTimerAsync(),c},advanceTimersToNextFrame(){return r().advanceTimersToNextFrame(),c},getTimerCount(){return r().getTimerCount()},setSystemTime(a){return r().setSystemTime(a),c},getMockedSystemTime(){return r().getMockedSystemTime()},getRealSystemTime(){return r().getRealSystemTime()},clearAllTimers(){return r().clearAllTimers(),c},setTimerTickMode(a,u){return r().setTimerTickMode(a,u),c},spyOn:qk,fn:Vk,waitFor:m_,waitUntil:g_,defineHelper:a=>function(...l){const f=a.apply(this,l);return f&&typeof f=="object"&&typeof f.then=="function"?(async function(){return await f})():f},hoisted(a){return Je(a,'"vi.hoisted" factory',["function"]),a()},mock(a,u){if(typeof a!="string")throw new TypeError(`vi.mock() expects a string path, but received a ${typeof a}`);const l=Dn("mock");ut().queueMock(a,l,typeof u=="function"?()=>u(()=>ut().importActual(a,l,ut().getMockContext().callstack)):u)},unmock(a){if(typeof a!="string")throw new TypeError(`vi.unmock() expects a string path, but received a ${typeof a}`);ut().queueUnmock(a,Dn("unmock"))},doMock(a,u){if(typeof a!="string")throw new TypeError(`vi.doMock() expects a string path, but received a ${typeof a}`);const l=Dn("doMock");ut().queueMock(a,l,typeof u=="function"?()=>u(()=>ut().importActual(a,l,ut().getMockContext().callstack)):u);const f={};return Symbol.dispose&&(f[Symbol.dispose]=()=>{ut().queueUnmock(a,l)}),f},doUnmock(a){if(typeof a!="string")throw new TypeError(`vi.doUnmock() expects a string path, but received a ${typeof a}`);const u=Dn("doUnmock");ut().queueUnmock(a,u)},async importActual(a){const u=Dn("importActual");return ut().importActual(a,u,ut().getMockContext().callstack)},async importMock(a){const u=Dn("importMock");return ut().importMock(a,u)},mockObject(a,u){return ut().mockObject({value:a},void 0,u!=null&&u.spy?"autospy":"automock").value},mocked(a,u={}){return a},isMockFunction(a){return Tn(a)},clearAllMocks(){return i3(),c},resetAllMocks(){return o3(),c},restoreAllMocks(){return r3(),c},stubGlobal(a,u){return i.has(a)||i.set(a,Object.getOwnPropertyDescriptor(globalThis,a)),Object.defineProperty(globalThis,a,{value:u,writable:!0,configurable:!0,enumerable:!0}),c},stubEnv(a,u){const l=t().metaEnv;return o.has(a)||o.set(a,l[a]),s.includes(a)?l[a]=u?"1":"":u===void 0?delete l[a]:l[a]=String(u),c},unstubAllGlobals(){return i.forEach((a,u)=>{a?Object.defineProperty(globalThis,u,a):Reflect.deleteProperty(globalThis,u)}),i.clear(),c},unstubAllEnvs(){const a=t().metaEnv;return o.forEach((u,l)=>{u===void 0?delete a[l]:a[l]=u}),o.clear(),c},resetModules(){return Bk(t().evaluatedModules),c},async dynamicImportSettled(){return s1()},setConfig(a){e||(e={...t().config}),Object.assign(t().config,a)},resetConfig(){e&&Object.assign(t().config,e)}};return c}const b_=y_(),Qn=b_;function ut(){return typeof __vitest_mocker__<"u"?__vitest_mocker__:new Proxy({},{get(e,t){throw new Error(`Vitest mocker was not initialized in this environment. vi.${String(t)}() is forbidden.`)}})}function Dn(e){var n;const t=AI({stackTraceLimit:5}).split(`
|
|
210
|
-
`);return((n=
|
|
208
|
+
`)}`;try{Object.defineProperty(O,"stack",{value:K})}catch{}return O}function Ae(){class T extends y{constructor(U,w,G,K,se,de,ct){arguments.length===0?super(T.clock.now):super(...arguments),Object.defineProperty(this,"constructor",{value:y,enumerable:!1})}static[Symbol.hasInstance](U){return U instanceof y}}return T.isFake=!0,y.now&&(T.now=function(){return T.clock.now}),y.toSource&&(T.toSource=function(){return y.toSource()}),T.toString=function(){return y.toString()},new Proxy(T,{apply(){if(this instanceof T)throw new TypeError("A Proxy should only capture `new` calls with the `construct` handler. This is not supposed to be possible, so check the logic.");return new y(T.clock.now).toString()}})}function ye(){const T={};return Object.getOwnPropertyNames(x).forEach(A=>T[A]=x[A]),T.DateTimeFormat=function(...A){const O=new x.DateTimeFormat(...A),U={};return["formatRange","formatRangeToParts","resolvedOptions"].forEach(w=>{U[w]=O[w].bind(O)}),["format","formatToParts"].forEach(w=>{U[w]=function(G){return O[w](G||T.clock.now)}}),U},T.DateTimeFormat.prototype=Object.create(x.DateTimeFormat.prototype),T.DateTimeFormat.supportedLocalesOf=x.DateTimeFormat.supportedLocalesOf,T}function fe(T,A){T.jobs||(T.jobs=[]),T.jobs.push(A)}function ee(T){if(T.jobs){for(let A=0;A<T.jobs.length;A++){const O=T.jobs[A];if(O.func.apply(null,O.args),M(T,A),T.loopLimit&&A>T.loopLimit)throw ie(T,O)}C(),T.jobs=[]}}function he(T,A){if(A.func===void 0)throw new Error("Callback must be provided to timer calls");if(h&&typeof A.func!="function")throw new TypeError(`[ERR_INVALID_CALLBACK]: Callback must be a function. Received ${A.func} of type ${typeof A.func}`);if(_&&(A.error=new Error),A.type=A.immediate?"Immediate":"Timeout",A.hasOwnProperty("delay")&&(typeof A.delay!="number"&&(A.delay=parseInt(A.delay,10)),I(A.delay)||(A.delay=0),A.delay=A.delay>s?1:A.delay,A.delay=Math.max(0,A.delay)),A.hasOwnProperty("interval")&&(A.type="Interval",A.interval=A.interval>s?1:A.interval),A.hasOwnProperty("animation")&&(A.type="AnimationFrame",A.animation=!0),A.hasOwnProperty("idleCallback")&&(A.type="IdleCallback",A.idleCallback=!0),T.timers||(T.timers={}),A.id=E++,A.createdAt=T.now,A.callAt=T.now+(parseInt(A.delay)||(T.duringTick?1:0)),T.timers[A.id]=A,h){const O={refed:!0,ref:function(){return this.refed=!0,O},unref:function(){return this.refed=!1,O},hasRef:function(){return this.refed},refresh:function(){return A.callAt=T.now+(parseInt(A.delay)||(T.duringTick?1:0)),T.timers[A.id]=A,O},[Symbol.toPrimitive]:function(){return A.id}};return O}return A.id}function Ye(T,A){if(T.callAt<A.callAt)return-1;if(T.callAt>A.callAt)return 1;if(T.immediate&&!A.immediate)return-1;if(!T.immediate&&A.immediate)return 1;if(T.createdAt<A.createdAt)return-1;if(T.createdAt>A.createdAt)return 1;if(T.id<A.id)return-1;if(T.id>A.id)return 1}function _e(T,A,O){const U=T.timers;let w=null,G,K;for(G in U)U.hasOwnProperty(G)&&(K=X(A,O,U[G]),K&&(!w||Ye(w,U[G])===1)&&(w=U[G]));return w}function oe(T){const A=T.timers;let O=null,U;for(U in A)A.hasOwnProperty(U)&&(!O||Ye(O,A[U])===1)&&(O=A[U]);return O}function Ee(T){const A=T.timers;let O=null,U;for(U in A)A.hasOwnProperty(U)&&(!O||Ye(O,A[U])===-1)&&(O=A[U]);return O}function Re(T,A){if(typeof A.interval=="number"?T.timers[A.id].callAt+=A.interval:delete T.timers[A.id],typeof A.func=="function")A.func.apply(null,A.args);else{const O=eval;(function(){O(A.func)})()}}function We(T){return T==="IdleCallback"||T==="AnimationFrame"?`cancel${T}`:`clear${T}`}function Mt(T){return T==="IdleCallback"||T==="AnimationFrame"?`request${T}`:`set${T}`}function et(){let T=0;return function(A){!T++&&console.warn(A)}}const Je=et();function it(T,A,O){if(!A)return;T.timers||(T.timers={});const U=Number(A);if(Number.isNaN(U)||U<c){const w=We(O);if(T.shouldClearNativeTimers===!0){const G=T[`_${w}`];return typeof G=="function"?G(A):void 0}Je(`FakeTimers: ${w} was invoked to clear a native timer instead of one created by this library.
|
|
209
|
+
To automatically clean-up native timers, use \`shouldClearNativeTimers\`.`)}if(T.timers.hasOwnProperty(U)){const w=T.timers[U];if(w.type===O||w.type==="Timeout"&&O==="Interval"||w.type==="Interval"&&O==="Timeout")delete T.timers[U];else{const G=We(O),K=Mt(w.type);throw new Error(`Cannot clear timer: timer created with ${K}() but cleared with ${G}()`)}}}function Nn(T){let A,O,U;const w="_hrtime",G="_nextTick";for(O=0,U=T.methods.length;O<U;O++){if(A=T.methods[O],A==="hrtime"&&o.process)o.process.hrtime=T[w];else if(A==="nextTick"&&o.process)o.process.nextTick=T[G];else if(A==="performance"){const K=Object.getOwnPropertyDescriptor(T,`_${A}`);K&&K.get&&!K.set?Object.defineProperty(o,A,K):K.configurable&&(o[A]=T[`_${A}`])}else if(o[A]&&o[A].hadOwnProperty)o[A]=T[`_${A}`];else try{delete o[A]}catch{}if(T.timersModuleMethods!==void 0)for(let K=0;K<T.timersModuleMethods.length;K++){const se=T.timersModuleMethods[K];t[se.methodName]=se.original}if(T.timersPromisesModuleMethods!==void 0)for(let K=0;K<T.timersPromisesModuleMethods.length;K++){const se=T.timersPromisesModuleMethods[K];n[se.methodName]=se.original}}T.setTickMode("manual"),T.methods=[];for(const[K,se]of T.abortListenerMap.entries())se.removeEventListener("abort",K),T.abortListenerMap.delete(K);return T.timers?Object.keys(T.timers).map(function(se){return T.timers[se]}):[]}function Ot(T,A,O){if(O[A].hadOwnProperty=Object.prototype.hasOwnProperty.call(T,A),O[`_${A}`]=T[A],A==="Date")T[A]=O[A];else if(A==="Intl")T[A]=O[A];else if(A==="performance"){const U=Object.getOwnPropertyDescriptor(T,A);if(U&&U.get&&!U.set){Object.defineProperty(O,`_${A}`,U);const w=Object.getOwnPropertyDescriptor(O,A);Object.defineProperty(T,A,w)}else T[A]=O[A]}else T[A]=function(){return O[A].apply(O,arguments)},Object.defineProperties(T[A],Object.getOwnPropertyDescriptors(O[A]));T[A].clock=O}function cr(T,A){T.tick(A)}const Xe={setTimeout:o.setTimeout,clearTimeout:o.clearTimeout,setInterval:o.setInterval,clearInterval:o.clearInterval,Date:o.Date};l.setImmediate&&(Xe.setImmediate=o.setImmediate),l.clearImmediate&&(Xe.clearImmediate=o.clearImmediate),l.hrtime&&(Xe.hrtime=o.process.hrtime),l.nextTick&&(Xe.nextTick=o.process.nextTick),l.performance&&(Xe.performance=o.performance),l.requestAnimationFrame&&(Xe.requestAnimationFrame=o.requestAnimationFrame),l.queueMicrotask&&(Xe.queueMicrotask=o.queueMicrotask),l.cancelAnimationFrame&&(Xe.cancelAnimationFrame=o.cancelAnimationFrame),l.requestIdleCallback&&(Xe.requestIdleCallback=o.requestIdleCallback),l.cancelIdleCallback&&(Xe.cancelIdleCallback=o.cancelIdleCallback),l.Intl&&(Xe.Intl=x);const Pt=o.setImmediate||o.setTimeout,Zb=o.clearInterval,Qb=o.setInterval;function yl(T,A){T=Math.floor(B(T)),A=A||1e3;let O=0;const U=[0,0],w={now:T,Date:Ae(),loopLimit:A,tickMode:{mode:"manual",counter:0,delta:void 0}};w.Date.clock=w;function G(){return 16-(w.now-T)%16}function K(j){const P=w.now-U[0]-T,V=Math.floor(P/1e3),q=(P-V*1e3)*1e6+O-U[1];if(Array.isArray(j)){if(j[1]>1e9)throw new TypeError("Number of nanoseconds can't exceed a billion");const ce=j[0];let ke=q-j[1],ot=V-ce;return ke<0&&(ke+=1e9,ot-=1),[ot,ke]}return[V,q]}function se(){const j=K();return j[0]*1e3+j[1]/1e6}l.hrtimeBigint&&(K.bigint=function(){const j=K();return BigInt(j[0])*BigInt(1e9)+BigInt(j[1])}),l.Intl&&(w.Intl=ye(),w.Intl.clock=w),w.setTickMode=function(j){const{mode:P,delta:V}=j,{mode:q,delta:ce}=w.tickMode;P===q&&V===ce||(q==="interval"&&Zb(w.attachedInterval),w.tickMode={counter:w.tickMode.counter+1,mode:P,delta:V},P==="nextAsync"?de():P==="interval"&&e0(w,V||20))};async function de(){async function j(){const V=new MessageChannel;await new Promise(q=>{V.port1.onmessage=()=>{q(),V.port1.close()},V.port2.postMessage(void 0)}),V.port1.close(),V.port2.close(),await new Promise(q=>{Pt(q)})}const{counter:P}=w.tickMode;for(;w.tickMode.counter===P;){if(await j(),w.tickMode.counter!==P)return;w.next()}}function ct(j){return w.tickMode.mode!=="nextAsync"?j:(w.setTickMode({mode:"manual"}),j.finally(()=>{w.setTickMode({mode:"nextAsync"})}))}w.requestIdleCallback=function(P,V){let q=0;w.countTimers()>0&&(q=50);const ce=he(w,{func:P,args:Array.prototype.slice.call(arguments,2),delay:typeof V>"u"?q:Math.min(V,q),idleCallback:!0});return Number(ce)},w.cancelIdleCallback=function(P){return it(w,P,"IdleCallback")},w.setTimeout=function(P,V){return he(w,{func:P,args:Array.prototype.slice.call(arguments,2),delay:V})},typeof o.Promise<"u"&&d&&(w.setTimeout[d.custom]=function(P,V){return new o.Promise(function(ce){he(w,{func:ce,args:[V],delay:P})})}),w.clearTimeout=function(P){return it(w,P,"Timeout")},w.nextTick=function(P){return fe(w,{func:P,args:Array.prototype.slice.call(arguments,1),error:_?new Error:null})},w.queueMicrotask=function(P){return w.nextTick(P)},w.setInterval=function(P,V){return V=parseInt(V,10),he(w,{func:P,args:Array.prototype.slice.call(arguments,2),delay:V,interval:V})},w.clearInterval=function(P){return it(w,P,"Interval")},l.setImmediate&&(w.setImmediate=function(P){return he(w,{func:P,args:Array.prototype.slice.call(arguments,1),immediate:!0})},typeof o.Promise<"u"&&d&&(w.setImmediate[d.custom]=function(P){return new o.Promise(function(q){he(w,{func:q,args:[P],immediate:!0})})}),w.clearImmediate=function(P){return it(w,P,"Immediate")}),w.countTimers=function(){return Object.keys(w.timers||{}).length+(w.jobs||[]).length},w.requestAnimationFrame=function(P){const V=he(w,{func:P,delay:G(),get args(){return[se()]},animation:!0});return Number(V)},w.cancelAnimationFrame=function(P){return it(w,P,"AnimationFrame")},w.runMicrotasks=function(){ee(w)};function Ne(j,P,V,q){const ce=typeof j=="number"?j:z(j),ke=Math.floor(ce),ot=le(ce);let Nt=O+ot,ze=w.now+ke;if(ce<0)throw new TypeError("Negative ticks are not supported");Nt>=1e6&&(ze+=1,Nt-=1e6),O=Nt;let jt=w.now,ur=w.now,zt,jn,ut,bl,Go,Ko;w.duringTick=!0,ut=w.now,ee(w),ut!==w.now&&(jt+=w.now-ut,ze+=w.now-ut);function wl(){for(zt=_e(w,jt,ze);zt&&jt<=ze;){if(w.timers[zt.id]){jt=zt.callAt,w.now=zt.callAt,ut=w.now;try{ee(w),Re(w,zt)}catch(lr){jn=jn||lr}if(P){Pt(bl);return}Go()}Ko()}if(ut=w.now,ee(w),ut!==w.now&&(jt+=w.now-ut,ze+=w.now-ut),w.duringTick=!1,zt=_e(w,jt,ze),zt)try{w.tick(ze-w.now)}catch(lr){jn=jn||lr}else w.now=ze,O=Nt;if(jn)throw jn;if(P)V(w.now);else return w.now}return bl=P&&function(){try{Go(),Ko(),wl()}catch(lr){q(lr)}},Go=function(){ut!==w.now&&(jt+=w.now-ut,ze+=w.now-ut,ur+=w.now-ut)},Ko=function(){zt=_e(w,ur,ze),ur=jt},wl()}return w.tick=function(P){return Ne(P,!1)},typeof o.Promise<"u"&&(w.tickAsync=function(P){return ct(new o.Promise(function(V,q){Pt(function(){try{Ne(P,!0,V,q)}catch(ce){q(ce)}})}))}),w.next=function(){ee(w);const P=oe(w);if(!P)return w.now;w.duringTick=!0;try{return w.now=P.callAt,Re(w,P),ee(w),w.now}finally{w.duringTick=!1}},typeof o.Promise<"u"&&(w.nextAsync=function(){return ct(new o.Promise(function(P,V){Pt(function(){try{const q=oe(w);if(!q){P(w.now);return}let ce;w.duringTick=!0,w.now=q.callAt;try{Re(w,q)}catch(ke){ce=ke}w.duringTick=!1,Pt(function(){ce?V(ce):P(w.now)})}catch(q){V(q)}})}))}),w.runAll=function(){let P,V;for(ee(w),V=0;V<w.loopLimit;V++){if(!w.timers||(P=Object.keys(w.timers).length,P===0))return C(),w.now;w.next(),M(w,V)}const q=oe(w);throw ie(w,q)},w.runToFrame=function(){return w.tick(G())},typeof o.Promise<"u"&&(w.runAllAsync=function(){return ct(new o.Promise(function(P,V){let q=0;function ce(){Pt(function(){try{ee(w);let ke;if(q<w.loopLimit){if(!w.timers){C(),P(w.now);return}if(ke=Object.keys(w.timers).length,ke===0){C(),P(w.now);return}w.next(),q++,ce(),M(w,q);return}const ot=oe(w);V(ie(w,ot))}catch(ke){V(ke)}})}ce()}))}),w.runToLast=function(){const P=Ee(w);return P?w.tick(P.callAt-w.now):(ee(w),w.now)},typeof o.Promise<"u"&&(w.runToLastAsync=function(){return ct(new o.Promise(function(P,V){Pt(function(){try{const q=Ee(w);q||(ee(w),P(w.now)),P(w.tickAsync(q.callAt-w.now))}catch(q){V(q)}})}))}),w.reset=function(){O=0,w.timers={},w.jobs=[],w.now=T},w.setSystemTime=function(P){const V=B(P),q=V-w.now;let ce,ke;U[0]=U[0]+q,U[1]=U[1]+O,w.now=V,O=0;for(ce in w.timers)w.timers.hasOwnProperty(ce)&&(ke=w.timers[ce],ke.createdAt+=q,ke.callAt+=q)},w.jump=function(P){const V=typeof P=="number"?P:z(P),q=Math.floor(V);for(const ce of Object.values(w.timers))w.now+q>ce.callAt&&(ce.callAt=w.now+q);w.tick(q)},l.performance&&(w.performance=Object.create(null),w.performance.now=se),l.hrtime&&(w.hrtime=K),w}function e0(T,A){const O=cr.bind(null,T,A),U=Qb(O,A);T.attachedInterval=U}function t0(T){if(arguments.length>1||T instanceof Date||Array.isArray(T)||typeof T=="number")throw new TypeError(`FakeTimers.install called with ${String(T)} install requires an object parameter`);if(o.Date.isFake===!0)throw new TypeError("Can't install fake timers twice on the same global object.");if(T=typeof T<"u"?T:{},T.shouldAdvanceTime=T.shouldAdvanceTime||!1,T.advanceTimeDelta=T.advanceTimeDelta||20,T.shouldClearNativeTimers=T.shouldClearNativeTimers||!1,T.target)throw new TypeError("config.target is no longer supported. Use `withGlobal(target)` instead.");function A(G){if(!T.ignoreMissingTimers)throw new ReferenceError(`non-existent timers and/or objects cannot be faked: '${G}'`)}let O,U;const w=yl(T.now,T.loopLimit);if(w.shouldClearNativeTimers=T.shouldClearNativeTimers,w.uninstall=function(){return Nn(w)},w.abortListenerMap=new Map,w.methods=T.toFake||[],w.methods.length===0&&(w.methods=Object.keys(Xe)),T.shouldAdvanceTime===!0&&w.setTickMode({mode:"interval",delta:T.advanceTimeDelta}),w.methods.includes("performance")){const G=(()=>{if(p)return o.performance.constructor.prototype;if(m)return o.Performance.prototype})();if(G)Object.getOwnPropertyNames(G).forEach(function(K){K!=="now"&&(w.performance[K]=K.indexOf("getEntries")===0?u:a)}),w.performance.mark=K=>new $(K,"mark",0,0),w.performance.measure=K=>new $(K,"measure",0,100),w.performance.timeOrigin=B(T.now);else if((T.toFake||[]).includes("performance"))return A("performance")}for(o===e&&t&&(w.timersModuleMethods=[]),o===e&&n&&(w.timersPromisesModuleMethods=[]),O=0,U=w.methods.length;O<U;O++){const G=w.methods[O];if(!l[G]){A(G);continue}if(G==="hrtime"?o.process&&typeof o.process.hrtime=="function"&&Ot(o.process,G,w):G==="nextTick"?o.process&&typeof o.process.nextTick=="function"&&Ot(o.process,G,w):Ot(o,G,w),w.timersModuleMethods!==void 0&&t[G]){const K=t[G];w.timersModuleMethods.push({methodName:G,original:K}),t[G]=o[G]}w.timersPromisesModuleMethods!==void 0&&(G==="setTimeout"?(w.timersPromisesModuleMethods.push({methodName:"setTimeout",original:n.setTimeout}),n.setTimeout=(K,se,de={})=>new Promise((ct,Ne)=>{const j=()=>{de.signal.removeEventListener("abort",j),w.abortListenerMap.delete(j),w.clearTimeout(P),Ne(de.signal.reason)},P=w.setTimeout(()=>{de.signal&&(de.signal.removeEventListener("abort",j),w.abortListenerMap.delete(j)),ct(se)},K);de.signal&&(de.signal.aborted?j():(de.signal.addEventListener("abort",j),w.abortListenerMap.set(j,de.signal)))})):G==="setImmediate"?(w.timersPromisesModuleMethods.push({methodName:"setImmediate",original:n.setImmediate}),n.setImmediate=(K,se={})=>new Promise((de,ct)=>{const Ne=()=>{se.signal.removeEventListener("abort",Ne),w.abortListenerMap.delete(Ne),w.clearImmediate(j),ct(se.signal.reason)},j=w.setImmediate(()=>{se.signal&&(se.signal.removeEventListener("abort",Ne),w.abortListenerMap.delete(Ne)),de(K)});se.signal&&(se.signal.aborted?Ne():(se.signal.addEventListener("abort",Ne),w.abortListenerMap.set(Ne,se.signal)))})):G==="setInterval"&&(w.timersPromisesModuleMethods.push({methodName:"setInterval",original:n.setInterval}),n.setInterval=(K,se,de={})=>({[Symbol.asyncIterator]:()=>{const ct=()=>{let ot,Nt;const ze=new Promise((jt,ur)=>{ot=jt,Nt=ur});return ze.resolve=ot,ze.reject=Nt,ze};let Ne=!1,j=!1,P,V=0;const q=[],ce=w.setInterval(()=>{q.length>0?q.shift().resolve():V++},K),ke=()=>{de.signal.removeEventListener("abort",ke),w.abortListenerMap.delete(ke),w.clearInterval(ce),Ne=!0;for(const ot of q)ot.resolve()};return de.signal&&(de.signal.aborted?Ne=!0:(de.signal.addEventListener("abort",ke),w.abortListenerMap.set(ke,de.signal))),{next:async()=>{var Nt,ze;if((Nt=de.signal)!=null&&Nt.aborted&&!j)throw j=!0,de.signal.reason;if(Ne)return{done:!0,value:void 0};if(V>0)return V--,{done:!1,value:se};const ot=ct();if(q.push(ot),await ot,P&&q.length===0&&P.resolve(),(ze=de.signal)!=null&&ze.aborted&&!j)throw j=!0,de.signal.reason;return Ne?{done:!0,value:void 0}:{done:!1,value:se}},return:async()=>Ne?{done:!0,value:void 0}:(q.length>0&&(P=ct(),await P),w.clearInterval(ce),Ne=!0,de.signal&&(de.signal.removeEventListener("abort",ke),w.abortListenerMap.delete(ke)),{done:!0,value:void 0})}}})))}return w}return{timers:Xe,createClock:yl,install:t0,withGlobal:r}}const i=r(e);return Bn.timers=i.timers,Bn.createClock=i.createClock,Bn.install=i.install,Bn.withGlobal=r,Bn}var Z_=X_();class Q_{constructor({global:t,config:n}){R(this,"_global");R(this,"_clock");R(this,"_fakingTime");R(this,"_fakingDate");R(this,"_fakeTimers");R(this,"_userConfig");R(this,"_now",vt.now);this._userConfig=n,this._fakingDate=null,this._fakingTime=!1,this._fakeTimers=Z_.withGlobal(t),this._global=t}clearAllTimers(){this._fakingTime&&this._clock.reset()}dispose(){this.useRealTimers()}runAllTimers(){this._checkFakeTimers()&&this._clock.runAll()}async runAllTimersAsync(){this._checkFakeTimers()&&await this._clock.runAllAsync()}runOnlyPendingTimers(){this._checkFakeTimers()&&this._clock.runToLast()}async runOnlyPendingTimersAsync(){this._checkFakeTimers()&&await this._clock.runToLastAsync()}advanceTimersToNextTimer(t=1){if(this._checkFakeTimers())for(let n=t;n>0&&(this._clock.next(),this._clock.tick(0),this._clock.countTimers()!==0);n--);}async advanceTimersToNextTimerAsync(t=1){if(this._checkFakeTimers())for(let n=t;n>0&&(await this._clock.nextAsync(),this._clock.tick(0),this._clock.countTimers()!==0);n--);}advanceTimersByTime(t){this._checkFakeTimers()&&this._clock.tick(t)}async advanceTimersByTimeAsync(t){this._checkFakeTimers()&&await this._clock.tickAsync(t)}advanceTimersToNextFrame(){this._checkFakeTimers()&&this._clock.runToFrame()}runAllTicks(){this._checkFakeTimers()&&this._clock.runMicrotasks()}useRealTimers(){this._fakingDate&&(Xd(),this._fakingDate=null),this._fakingTime&&(this._clock.uninstall(),this._fakingTime=!1)}useFakeTimers(){var r,i,o;const t=this._fakingDate||Date.now();this._fakingDate&&(Xd(),this._fakingDate=null),this._fakingTime&&this._clock.uninstall();const n=Object.keys(this._fakeTimers.timers).filter(s=>s!=="nextTick"&&s!=="queueMicrotask");if((i=(r=this._userConfig)==null?void 0:r.toFake)!=null&&i.includes("nextTick")&&I1())throw new Error("process.nextTick cannot be mocked inside child_process");this._clock=this._fakeTimers.install({now:t,...this._userConfig,toFake:((o=this._userConfig)==null?void 0:o.toFake)||n,ignoreMissingTimers:!0}),this._fakingTime=!0}reset(){if(this._checkFakeTimers()){const{now:t}=this._clock;this._clock.reset(),this._clock.setSystemTime(t)}}setSystemTime(t){const n=typeof t>"u"||t instanceof Date?t:new Date(t);this._fakingTime?this._clock.setSystemTime(n):(this._fakingDate=n??new Date(this.getRealSystemTime()),YC(this._fakingDate))}getMockedSystemTime(){return this._fakingTime?new Date(this._clock.now):this._fakingDate}getRealSystemTime(){return this._now()}getTimerCount(){return this._checkFakeTimers()?this._clock.countTimers():0}setTimerTickMode(t,n){if(this._checkFakeTimers())if(t==="manual")this._clock.setTickMode({mode:"manual"});else if(t==="nextTimerAsync")this._clock.setTickMode({mode:"nextAsync"});else if(t==="interval")this._clock.setTickMode({mode:"interval",delta:n});else throw new Error(`Invalid tick mode: ${t}`)}configure(t){this._userConfig=t}isFakeTimers(){return this._fakingTime}_checkFakeTimers(){if(!this._fakingTime)throw new Error("A function to advance timers was called but the timers APIs are not mocked. Call `vi.useFakeTimers()` in the test file first.");return this._fakingTime}}function Fb(e,t){return t.stack!==void 0&&(e.stack=t.stack.replace(t.message,e.message)),e}function e$(e,t={}){const{setTimeout:n,setInterval:r,clearTimeout:i,clearInterval:o}=ir(),{interval:s=50,timeout:c=1e3}=typeof t=="number"?{timeout:t}:t,a=new Error("STACK_TRACE_ERROR");return new Promise((u,l)=>{let f,h="idle",d,m;const p=E=>{d&&i(d),m&&o(m),u(E)},y=()=>{m&&o(m);let E=f;E||(E=Fb(new Error("Timed out in waitFor!"),a)),l(E)},x=()=>{if(tr.isFakeTimers()&&tr.advanceTimersByTime(s),h!=="pending")try{const E=e();if(E!==null&&typeof E=="object"&&typeof E.then=="function"){const $=E;h="pending",$.then(I=>{h="resolved",p(I)},I=>{h="rejected",f=I})}else return p(E),!0}catch(E){f=E}};x()!==!0&&(d=n(y,c),m=r(x,s))})}function t$(e,t={}){const{setTimeout:n,setInterval:r,clearTimeout:i,clearInterval:o}=ir(),{interval:s=50,timeout:c=1e3}=typeof t=="number"?{timeout:t}:t,a=new Error("STACK_TRACE_ERROR");return new Promise((u,l)=>{let f="idle",h,d;const m=x=>{d&&o(d),x||(x=Fb(new Error("Timed out in waitUntil!"),a)),l(x)},p=x=>{if(x)return h&&i(h),d&&o(d),u(x),!0},y=()=>{if(tr.isFakeTimers()&&tr.advanceTimersByTime(s),f!=="pending")try{const x=e();if(x!==null&&typeof x=="object"&&typeof x.then=="function"){const E=x;f="pending",E.then($=>{f="resolved",p($)},$=>{f="rejected",m($)})}else return p(x)}catch(x){m(x)}};y()!==!0&&(h=n(m,c),d=r(y,s))})}function n$(){let e=null;const t=()=>Hr();let n;const r=()=>n||(n=new Q_({global:globalThis,config:t().config.fakeTimers})),i=new Map,o=new Map,s=["PROD","DEV","SSR"],c={useFakeTimers(a){var u,l,f,h;if(I1()&&((u=a==null?void 0:a.toFake)!=null&&u.includes("nextTick")||(h=(f=(l=t().config)==null?void 0:l.fakeTimers)==null?void 0:f.toFake)!=null&&h.includes("nextTick")))throw new Error('vi.useFakeTimers({ toFake: ["nextTick"] }) is not supported in node:child_process. Use --pool=threads if mocking nextTick is required.');return a?r().configure({...t().config.fakeTimers,...a}):r().configure(t().config.fakeTimers),r().useFakeTimers(),c},isFakeTimers(){return r().isFakeTimers()},useRealTimers(){return r().useRealTimers(),c},runOnlyPendingTimers(){return r().runOnlyPendingTimers(),c},async runOnlyPendingTimersAsync(){return await r().runOnlyPendingTimersAsync(),c},runAllTimers(){return r().runAllTimers(),c},async runAllTimersAsync(){return await r().runAllTimersAsync(),c},runAllTicks(){return r().runAllTicks(),c},advanceTimersByTime(a){return r().advanceTimersByTime(a),c},async advanceTimersByTimeAsync(a){return await r().advanceTimersByTimeAsync(a),c},advanceTimersToNextTimer(){return r().advanceTimersToNextTimer(),c},async advanceTimersToNextTimerAsync(){return await r().advanceTimersToNextTimerAsync(),c},advanceTimersToNextFrame(){return r().advanceTimersToNextFrame(),c},getTimerCount(){return r().getTimerCount()},setSystemTime(a){return r().setSystemTime(a),c},getMockedSystemTime(){return r().getMockedSystemTime()},getRealSystemTime(){return r().getRealSystemTime()},clearAllTimers(){return r().clearAllTimers(),c},setTimerTickMode(a,u){return r().setTimerTickMode(a,u),c},spyOn:_3,fn:C3,waitFor:e$,waitUntil:t$,defineHelper:a=>function(...l){const f=a.apply(this,l);return f&&typeof f=="object"&&typeof f.then=="function"?(async function(){return await f})():f},hoisted(a){return Ze(a,'"vi.hoisted" factory',["function"]),a()},mock(a,u){if(typeof a!="string")throw new TypeError(`vi.mock() expects a string path, but received a ${typeof a}`);const l=Un("mock");ft().queueMock(a,l,typeof u=="function"?()=>u(()=>ft().importActual(a,l,ft().getMockContext().callstack)):u)},unmock(a){if(typeof a!="string")throw new TypeError(`vi.unmock() expects a string path, but received a ${typeof a}`);ft().queueUnmock(a,Un("unmock"))},doMock(a,u){if(typeof a!="string")throw new TypeError(`vi.doMock() expects a string path, but received a ${typeof a}`);const l=Un("doMock");ft().queueMock(a,l,typeof u=="function"?()=>u(()=>ft().importActual(a,l,ft().getMockContext().callstack)):u);const f={};return Symbol.dispose&&(f[Symbol.dispose]=()=>{ft().queueUnmock(a,l)}),f},doUnmock(a){if(typeof a!="string")throw new TypeError(`vi.doUnmock() expects a string path, but received a ${typeof a}`);const u=Un("doUnmock");ft().queueUnmock(a,u)},async importActual(a){const u=Un("importActual");return ft().importActual(a,u,ft().getMockContext().callstack)},async importMock(a){const u=Un("importMock");return ft().importMock(a,u)},mockObject(a,u){return ft().mockObject({value:a},void 0,u!=null&&u.spy?"autospy":"automock").value},mocked(a,u={}){return a},isMockFunction(a){return An(a)},clearAllMocks(){return W3(),c},resetAllMocks(){return z3(),c},restoreAllMocks(){return q3(),c},stubGlobal(a,u){return i.has(a)||i.set(a,Object.getOwnPropertyDescriptor(globalThis,a)),Object.defineProperty(globalThis,a,{value:u,writable:!0,configurable:!0,enumerable:!0}),c},stubEnv(a,u){const l=t().metaEnv;return o.has(a)||o.set(a,l[a]),s.includes(a)?l[a]=u?"1":"":u===void 0?delete l[a]:l[a]=String(u),c},unstubAllGlobals(){return i.forEach((a,u)=>{a?Object.defineProperty(globalThis,u,a):Reflect.deleteProperty(globalThis,u)}),i.clear(),c},unstubAllEnvs(){const a=t().metaEnv;return o.forEach((u,l)=>{u===void 0?delete a[l]:a[l]=u}),o.clear(),c},resetModules(){return k3(t().evaluatedModules),c},async dynamicImportSettled(){return C1()},setConfig(a){e||(e={...t().config}),Object.assign(t().config,a)},resetConfig(){e&&Object.assign(t().config,e)}};return c}const r$=n$(),tr=r$;function ft(){return typeof __vitest_mocker__<"u"?__vitest_mocker__:new Proxy({},{get(e,t){throw new Error(`Vitest mocker was not initialized in this environment. vi.${String(t)}() is forbidden.`)}})}function Un(e){var n;const t=lI({stackTraceLimit:5}).split(`
|
|
210
|
+
`);return((n=u1(t[t.findLastIndex(r=>r.includes(` at Object.${e}`)||r.includes(`${e}@`)||r.includes(` at ${e} (`))+1]))==null?void 0:n.file)||""}const i$=["matchSnapshot","toMatchSnapshot","toMatchInlineSnapshot","toThrowErrorMatchingSnapshot","toThrowErrorMatchingInlineSnapshot","throws","Throw","throw","toThrow","toThrowError"];function Ap(e,t){throw e.cause==null&&(e.cause=new Error("Matcher did not succeed in time.")),Rb(e,t)}function o$(e){return function(n,r={}){var f;const i=((f=Hr().config.expect)==null?void 0:f.poll)??{},{interval:o=i.interval??50,timeout:s=i.timeout??1e3,message:c}=r,a=e(null,c).withContext({poll:!0});n=n.bind(a),me.flag(a,"_poll.fn",n),me.flag(a,"_poll.timeout",s),me.flag(a,"_poll.interval",o);const u=me.flag(a,"vitest-test");if(!u)throw new Error("expect.poll() must be called inside a test");const l=new Proxy(a,{get(h,d,m){const p=Reflect.get(h,d,m);if(typeof p!="function")return p instanceof b?l:p;if(d==="assert")return p;if(typeof d=="string"&&i$.includes(d))throw new SyntaxError(`expect.poll() is not supported in combination with .${d}(). Use vi.waitFor() if your assertion condition is unstable.`);return function(...x){const E=new Error("STACK_TRACE_ERROR"),$=async()=>{var ie;me.flag(a,"_name",d),me.flag(a,"error",E);const M=me.flag(a,"_poll.onSettled");if((ie=Object.getOwnPropertyDescriptor(p,"__vitest_poll_takeover__"))!=null&&ie.value)try{const Ae=await p.call(a,...x);return await(M==null?void 0:M({assertion:a,status:"pass"})),Ae}catch(Ae){await(M==null?void 0:M({assertion:a,status:"fail"})),Ap(Ae,E)}const{setTimeout:C,clearTimeout:z}=ir();let le="fn",B=!1;const X=C(()=>{B=!0},s);try{for(;;){const Ae=B;Ae&&me.flag(a,"_isLastPollAttempt",!0);try{le="fn";const ye=await n();me.flag(a,"object",ye),le="assertion";const fe=await p.call(a,...x);return await(M==null?void 0:M({assertion:a,status:"pass"})),fe}catch(ye){(Ae||le==="assertion"&&me.flag(a,"_poll.assert_once"))&&(await(M==null?void 0:M({assertion:a,status:"fail"})),Ap(ye,E)),await o4(o,C),tr.isFakeTimers()&&tr.advanceTimersByTime(o)}}}finally{z(X)}};let I=!1;u.onFinished??(u.onFinished=[]),u.onFinished.push(()=>{if(!I){const M=me.flag(a,"negate")?"not.":"",C=`expect.${me.flag(a,"_poll.element")?"element(locator)":"poll(assertion)"}.${M}${String(d)}()`;throw Rb(new Error(`${C} was not awaited. This assertion is asynchronous and must be awaited; otherwise, it is not executed to avoid unhandled rejections:
|
|
211
211
|
|
|
212
212
|
await ${C}
|
|
213
|
-
`),T)}});let _;return{then($,C){return k=!0,(_||(_=O())).then($,C)},catch($){return k=!0,(_||(_=O())).catch($)},finally($){return k=!0,(_||(_=O())).finally($)},[Symbol.toStringTag]:"Promise"}}}});return l}}function mb(e,t){return t.stack!==void 0&&(e.stack=t.stack.replace(t.message,e.message)),e}let ra;function tc(){return ra||(ra=new zC({isEqual:(e,t)=>te(e,t,[ot,ir])})),ra}function yp(e,t){if(typeof e!="function"){if(!t)throw new Error(`expected must be a function, received ${typeof e}`);return e}try{e()}catch(n){return n}throw new Error("snapshot function didn't throw")}function gb(e){return{filepath:e.file.filepath,name:Sk(e).slice(1).join(" > "),testId:e.id}}function ol(e){const t=me.flag(e,"_name");if(!t)throw new Error("Assertion name is not set. This is a bug in Vitest. Please, open a new issue with reproduction.");return t}function sl(e){const t=me.flag(e,"vitest-test");if(!t)throw new Error(`'${ol(e)}' cannot be used without test context`);return t}function Tr(e){if(me.flag(e,"negate"))throw new Error(`${ol(e)} cannot be used with "not"`)}const S_=(e,t)=>{for(const n of["matchSnapshot","toMatchSnapshot"])t.addMethod(e.Assertion.prototype,n,Vn(t,n,function(r,i){return mr(wi({assertion:this,received:t.flag(this,"object"),...bp(r,i)}),e.util.flag(this,"message"))}));t.addMethod(e.Assertion.prototype,"toMatchFileSnapshot",function(n,r){t.flag(this,"_name","toMatchFileSnapshot"),Tr(this);const i=E_({assertion:this,received:t.flag(this,"object"),filepath:n,hint:r}).then(o=>mr(o,e.util.flag(this,"message")));return Ya(sl(this),i,Ha(t,this,!0),new Error("resolves"),t.flag(this,"soft"))}),t.addMethod(e.Assertion.prototype,"toMatchInlineSnapshot",Vn(t,"toMatchInlineSnapshot",function(r,i,o){return mr(wi({assertion:this,received:t.flag(this,"object"),isInline:!0,...wp(r,i,o)}),e.util.flag(this,"message"))})),t.addMethod(e.Assertion.prototype,"toThrowErrorMatchingSnapshot",Vn(t,"toThrowErrorMatchingSnapshot",function(n,r){Tr(this);const i=t.flag(this,"object"),o=t.flag(this,"promise");return mr(wi({assertion:this,received:yp(i,o),...bp(n,r)}),e.util.flag(this,"message"))})),t.addMethod(e.Assertion.prototype,"toThrowErrorMatchingInlineSnapshot",Vn(t,"toThrowErrorMatchingInlineSnapshot",function(r,i){Tr(this);const o=t.flag(this,"object"),s=t.flag(this,"promise");return mr(wi({assertion:this,received:yp(o,s),isInline:!0,...wp(void 0,r,i)}),e.util.flag(this,"message"))})),t.addMethod(e.expect,"addSnapshotSerializer",vC)};function bp(e,t){return typeof e=="string"?{hint:e}:{properties:e,hint:t}}function wp(e,t,n){let r;return typeof e=="string"?(r=Gd(e),{inlineSnapshot:r,hint:t}):(t&&(r=Gd(t)),{properties:e,inlineSnapshot:r,hint:n})}function wi(e){const{assertion:t}=e;Tr(t);const n=ol(t),r=sl(t);return tc().match({received:e.received,properties:e.properties,message:e.hint,isInline:e.isInline,inlineSnapshot:e.inlineSnapshot,assertionName:n,error:me.flag(t,"error"),...gb(r)})}async function E_(e){const{assertion:t}=e;Tr(t);const n=gb(sl(t)),r=tc().getSnapshotState(n.filepath),i=await r.environment.resolveRawPath(n.filepath,e.filepath),o=await r.environment.readSnapshotFile(i);return tc().match({received:e.received,message:e.hint,rawSnapshot:{file:i,content:o??void 0},...n})}function mr(e,t){if(!e.pass){const n=(t?`${t}: `:"")+e.message();throw Object.assign(new Error(n),{actual:e.actual,expected:e.expected,diffOptions:{expand:zr().config.snapshotOptions.expand}})}}yn(aC);yn(rC);yn(C3);yn(S_);yn(nC);function T_(e){const t=((o,s)=>{const{assertionCalls:c}=Er(t);return js({assertionCalls:c+1},t),An(o,s)});Object.assign(t,An),Object.assign(t,globalThis[Ju]),t.getState=()=>Er(t),t.setState=o=>js(o,t);const n=Er(globalThis[Ro])||{};js({...n,assertionCalls:0,isExpectingAssertions:!1,isExpectingAssertionsError:null,expectedAssertionsNumber:null,expectedAssertionsNumberErrorGen:null,get testPath(){return zr().filepath},currentTestName:n.currentTestName},t),t.assert=g,t.extend=o=>An.extend(t,o),t.addEqualityTesters=o=>R3(o),t.soft=(...o)=>t(...o).withContext({soft:!0}),t.poll=x_(t),t.unreachable=o=>{g.fail(`expected${o?` "${o}" `:" "}not to be reached`)};function r(o){const s=()=>new Error(`expected number of assertions to be ${o}, but got ${t.getState().assertionCalls}`);Error.captureStackTrace&&Error.captureStackTrace(s(),r),t.setState({expectedAssertionsNumber:o,expectedAssertionsNumberErrorGen:s})}function i(){const o=new Error("expected any number of assertion, but got none");Error.captureStackTrace&&Error.captureStackTrace(o,i),t.setState({isExpectingAssertions:!0,isExpectingAssertionsError:o})}return me.addMethod(t,"assertions",r),me.addMethod(t,"hasAssertions",i),t.extend(_3),t}const Bt=T_();Object.defineProperty(globalThis,Ro,{value:Bt,writable:!0,configurable:!0});const Bo={numRuns:100,timeout:1e3,verbose:!1};function yb(e,t,n,r){const i={...Bo,...r};tn(e,async()=>{await Dr(sc(...t,async(...o)=>{await n(...o)}),{numRuns:i.numRuns,seed:i.seed,verbose:i.verbose,examples:i.examples})})}function v_(e,t,n,r){const i={...Bo,...r};tn(e,()=>{Dr(Lr(...t,(...o)=>{n(...o)}),{numRuns:i.numRuns,seed:i.seed,verbose:i.verbose,examples:i.examples})})}const A_={nonEmptyString:()=>be({minLength:1}),nonEmptyArray:e=>ae(e,{minLength:1}),uniqueArray:e=>Qt(e),hexColor:()=>{const e=je(..."0123456789abcdef".split(""));return Ce(be({unit:e,minLength:6,maxLength:6}).map(t=>`#${t}`),be({unit:e,minLength:3,maxLength:3}).map(t=>`#${t}`))},rgbColor:()=>zt({r:W({min:0,max:255}),g:W({min:0,max:255}),b:W({min:0,max:255})}),hslColor:()=>zt({h:W({min:0,max:360}),s:W({min:0,max:100}),l:W({min:0,max:100})}),cssSize:()=>H(yo({min:0,max:1e3,noNaN:!0}),je("px","rem","em","%","vh","vw")).map(([e,t])=>`${e}${t}`),cssSpacing:()=>W({min:0,max:100}).map(e=>`${e}px`),borderRadius:()=>Ce(W({min:0,max:50}).map(e=>`${e}px`),W({min:0,max:50}).map(e=>`${e}%`)),zIndex:()=>W({min:-10,max:9999}),viewport:()=>zt({width:W({min:320,max:3840}),height:W({min:480,max:2160})}),gridColumns:()=>W({min:1,max:12}),flexDirection:()=>je("row","column","row-reverse","column-reverse"),justifyContent:()=>je("flex-start","flex-end","center","space-between","space-around","space-evenly"),alignItems:()=>je("flex-start","flex-end","center","stretch","baseline"),htmlTag:()=>je("div","span","button","a","input","label","p","h1","h2","h3","section","article","main","nav","footer","header"),ariaRole:()=>je("button","checkbox","dialog","gridcell","link","menuitem","option","progressbar","radio","slider","spinbutton","tab","tabpanel","textbox","listbox"),eventHandler:()=>je("onClick","onMouseEnter","onMouseLeave","onFocus","onBlur","onKeyDown","onKeyUp","onChange","onSubmit"),email:()=>yc(),uuid:()=>Bi(),url:()=>zc(),isoDate:()=>po().map(e=>e.toISOString()),timestamp:()=>W({min:0,max:Date.now()+365*24*60*60*1e3}),phone:()=>H(W({min:100,max:999}),W({min:100,max:999}),W({min:1e3,max:9999})).map(([e,t,n])=>`${e}-${t}-${n}`),fieldValue:()=>Ce(be(),W(),Ft()),validationState:()=>zt({valid:Ft(),error:At(be(),{nil:void 0}),touched:Ft(),dirty:Ft()}),tableRow:e=>zt({id:Bi(),...e}),tableData:(e,t)=>ae(e,t),duration:()=>W({min:0,max:5e3}),easing:()=>je("linear","ease","ease-in","ease-out","ease-in-out","cubic-bezier(0.4, 0, 0.2, 1)"),delay:()=>W({min:0,max:2e3})};function I_(e,t,n){const r={...Bo,...n};Dr(Lr(...e,(...i)=>t(...i)),{numRuns:r.numRuns,seed:r.seed,verbose:r.verbose})}function k_(e,t,n){const r={...Bo,...n};return lo(Lr(...e,(...i)=>(t(...i),!0)),{numRuns:r.numRuns,seed:r.seed,verbose:r.verbose})}function C_(e,t,n,r,i){yb(e,[r],async o=>{const s=t(),c=n();for(const a of o)a.check(s)&&await a.run(s,c)},i)}const bb=[["mobile",375],["tablet",768],["desktop",1024],["wide",1440]];function __(e,t={}){const{name:n,wrapper:r}=t;tn(n||"renders correctly",()=>{const{container:o}=r?Ue.render(Ge.jsx(r,{children:e})):Ue.render(e);Bt(o.firstChild).toMatchSnapshot()})}function $_(e,t,n,r={}){const{wrapper:i}=r;Object.entries(n).forEach(([o,s])=>{Ao(`${o} variants`,()=>{s.forEach(c=>{const a={...t,[o]:c},u=Ge.jsx(e,{...a});tn(`${o}=${JSON.stringify(c)}`,()=>{const{container:l}=i?Ue.render(Ge.jsx(i,{children:u})):Ue.render(u);Bt(l.firstChild).toMatchSnapshot()})})})})}const Zr=["display","position","width","height","margin","padding","flex-direction","justify-content","align-items","gap","background-color","color","border","border-radius","box-shadow","font-family","font-size","font-weight","line-height","text-align","transition","transform","opacity"];function M_(e,t={}){const{name:n,wrapper:r,properties:i=Zr,pseudo:o}=t;tn(n||"has expected styles",()=>{const{container:c}=r?Ue.render(Ge.jsx(r,{children:e})):Ue.render(e),a=c.firstChild;if(!a)throw new Error("No element rendered");const u=window.getComputedStyle(a,o||null),l={};i.forEach(f=>{l[f]=u.getPropertyValue(f)}),Bt(l).toMatchSnapshot()})}function O_(e,t,n,r={}){const{properties:i=Zr,wrapper:o}=r;Ao("state styles",()=>{Object.entries(n).forEach(([s,c])=>{tn(`${s} state`,()=>{const a={...t,...c.props||{}},u=Ge.jsx(e,{...a}),{container:l}=o?Ue.render(Ge.jsx(o,{children:u})):Ue.render(u),f=l.firstChild;if(!f)throw new Error("No element rendered");const h=window.getComputedStyle(f,c.pseudo||null),d={};i.forEach(m=>{d[m]=h.getPropertyValue(m)}),Bt(d).toMatchSnapshot()})})})}function P_(e,t,n,r={}){const{properties:i=Zr}=r;Ao("theme snapshots",()=>{n.forEach(({name:o,theme:s})=>{tn(`${o} theme`,()=>{const{container:c}=Ue.render(Ge.jsx(t,{theme:s,children:e})),a=c.firstChild;if(!a)throw new Error("No element rendered");Bt(c.firstChild).toMatchSnapshot(`${o}-structure`);const u=window.getComputedStyle(a),l={};i.filter(f=>["background","color","border"].some(h=>f.includes(h))).forEach(f=>{l[f]=u.getPropertyValue(f)}),Bt(l).toMatchSnapshot(`${o}-styles`)})})})}function N_(e,t={}){const{wrapper:n,breakpoints:r=bb}=t;Ao("responsive snapshots",()=>{r.forEach(([i,o])=>{tn(`at ${i} (${o}px)`,()=>{const s=window.matchMedia;window.matchMedia=a=>{var l;return{matches:a.includes(`max-width: ${o}px`)?!0:a.includes("min-width")?o>=parseInt(((l=a.match(/\d+/))==null?void 0:l[0])||"0"):!1,media:a,onchange:null,addListener:()=>{},removeListener:()=>{},addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!0}},Object.defineProperty(window,"innerWidth",{writable:!0,configurable:!0,value:o});const{container:c}=n?Ue.render(Ge.jsx(n,{children:e})):Ue.render(e);Bt(c.firstChild).toMatchSnapshot(),window.matchMedia=s})})})}function j_(e,t={}){const{wrapper:n}=t,{container:r}=n?Ue.render(Ge.jsx(n,{children:e})):Ue.render(e);return r.innerHTML}function F_(e,t=Zr,n={}){const{wrapper:r}=n,{container:i}=r?Ue.render(Ge.jsx(r,{children:e})):Ue.render(e),o=i.firstChild;if(!o)return{};const s=window.getComputedStyle(o),c={};return t.forEach(a=>{const u=s.getPropertyValue(a);u&&(c[a]=u)}),c}function R_(e,t={}){const{name:n,wrapper:r}=t;tn(n||"has expected accessibility attributes",()=>{const{container:o}=r?Ue.render(Ge.jsx(r,{children:e})):Ue.render(e),s=o.firstChild;if(!s)throw new Error("No element rendered");const c={role:s.getAttribute("role"),"aria-label":s.getAttribute("aria-label"),"aria-labelledby":s.getAttribute("aria-labelledby"),"aria-describedby":s.getAttribute("aria-describedby"),"aria-hidden":s.getAttribute("aria-hidden"),"aria-disabled":s.getAttribute("aria-disabled"),"aria-expanded":s.getAttribute("aria-expanded"),"aria-selected":s.getAttribute("aria-selected"),"aria-checked":s.getAttribute("aria-checked"),"aria-pressed":s.getAttribute("aria-pressed"),"aria-haspopup":s.getAttribute("aria-haspopup"),"aria-controls":s.getAttribute("aria-controls"),"aria-live":s.getAttribute("aria-live"),tabIndex:s.getAttribute("tabindex")},a=Object.fromEntries(Object.entries(c).filter(([,u])=>u!==null));Bt(a).toMatchSnapshot()})}const ro={mobile:{width:375,height:667},mobileLarge:{width:414,height:896},tablet:{width:768,height:1024},tabletLandscape:{width:1024,height:768},desktop:{width:1280,height:800},desktopLarge:{width:1440,height:900},ultrawide:{width:1920,height:1080}},al={light:{name:"light",className:"theme-light",background:"#ffffff"},dark:{name:"dark",className:"theme-dark",background:"#1a1a1a"},highContrast:{name:"high-contrast",className:"theme-high-contrast",background:"#000000"}},io={mobile:{viewport:{width:375,height:667}},tablet:{viewport:{width:768,height:1024}},desktop:{viewport:{width:1280,height:800}},wide:{viewport:{width:1920,height:1080}},light:{theme:"light",backgrounds:{value:"#ffffff"}},dark:{theme:"dark",backgrounds:{value:"#1a1a1a"}},highContrast:{theme:"high-contrast",backgrounds:{value:"#000000"}},rtl:{globals:{direction:"rtl"}}},Qr={viewports:[375,768,1280],diffThreshold:.05,delay:300,pauseAnimationAtEnd:!0};function L_(){return function(t,n){const r=n.globals.theme||"light",i=al[r];return Ge.jsx("div",{className:(i==null?void 0:i.className)||"theme-light",style:{background:(i==null?void 0:i.background)||"#ffffff",minHeight:"100vh",padding:"1rem"},children:Ge.jsx(t,{})})}}function D_(){return function(t,n){const r=n.globals.direction||"ltr";return Ge.jsx("div",{dir:r,style:{direction:r},children:Ge.jsx(t,{})})}}function B_(){return function(t,n){const r=n.globals.theme||"light",i=n.globals.direction||"ltr",o=n.globals.reducedMotion||!1,s=al[r];return Ge.jsx("div",{className:(s==null?void 0:s.className)||"theme-light",dir:i,style:{background:(s==null?void 0:s.background)||"#ffffff",direction:i},"data-reduced-motion":o,children:Ge.jsx(t,{})})}}function U_(e,t){const r=(t||["mobile","tablet","desktop"]).map(i=>ro[i].width);return{...e,parameters:{...e.parameters||{},chromatic:{...Qr,viewports:r}}}}function V_(e,t){const n=t||["light","dark"];return{...e,parameters:{...e.parameters||{},chromatic:{...Qr,modes:Object.fromEntries(n.map(r=>[r,io[r]]))}}}}function q_(e){return{...e,parameters:{...e.parameters||{},chromatic:{...Qr,modes:{ltr:{globals:{direction:"ltr"}},rtl:{globals:{direction:"rtl"}}}}}}}function W_(e,t){const{viewports:n=["mobile","desktop"],themes:r=["light","dark"],rtl:i=!0}=t||{},o={};return n.forEach(s=>{o[`viewport-${s}`]={viewport:{width:ro[s].width,height:ro[s].height}}}),r.forEach(s=>{o[`theme-${s}`]=io[s]}),i&&(o.rtl=io.rtl),{...e,parameters:{...e.parameters||{},chromatic:{...Qr,modes:o}}}}const z_={theme:{name:"Theme",description:"Global theme for components",defaultValue:"light",toolbar:{icon:"paintbrush",items:[{value:"light",title:"Light"},{value:"dark",title:"Dark"},{value:"highContrast",title:"High Contrast"}],showName:!0}},direction:{name:"Direction",description:"Text direction",defaultValue:"ltr",toolbar:{icon:"paragraph",items:[{value:"ltr",title:"LTR"},{value:"rtl",title:"RTL"}],showName:!0}},reducedMotion:{name:"Reduced Motion",description:"Reduce animations",defaultValue:!1,toolbar:{icon:"accessibility",items:[{value:!1,title:"Full Motion"},{value:!0,title:"Reduced Motion"}],showName:!0}}},G_={version:2,snapshot:{widths:[375,768,1280,1920],minHeight:1024,percyCSS:`
|
|
213
|
+
`),E)}});let _;return{then(M,C){return I=!0,(_||(_=$())).then(M,C)},catch(M){return I=!0,(_||(_=$())).catch(M)},finally(M){return I=!0,(_||(_=$())).finally(M)},[Symbol.toStringTag]:"Promise"}}}});return l}}function Rb(e,t){return t.stack!==void 0&&(e.stack=t.stack.replace(t.message,e.message)),e}let ua;function cc(){return ua||(ua=new $_({isEqual:(e,t)=>te(e,t,[at,sr])})),ua}function kp(e,t){if(typeof e!="function"){if(!t)throw new Error(`expected must be a function, received ${typeof e}`);return e}try{e()}catch(n){return n}throw new Error("snapshot function didn't throw")}function Lb(e){return{filepath:e.file.filepath,name:a3(e).slice(1).join(" > "),testId:e.id}}function hl(e){const t=me.flag(e,"_name");if(!t)throw new Error("Assertion name is not set. This is a bug in Vitest. Please, open a new issue with reproduction.");return t}function dl(e){const t=me.flag(e,"vitest-test");if(!t)throw new Error(`'${hl(e)}' cannot be used without test context`);return t}function kr(e){if(me.flag(e,"negate"))throw new Error(`${hl(e)} cannot be used with "not"`)}const s$=(e,t)=>{for(const n of["matchSnapshot","toMatchSnapshot"])t.addMethod(e.Assertion.prototype,n,Wn(t,n,function(r,i){return br(Ti({assertion:this,received:t.flag(this,"object"),...Ip(r,i)}),e.util.flag(this,"message"))}));t.addMethod(e.Assertion.prototype,"toMatchFileSnapshot",function(n,r){t.flag(this,"_name","toMatchFileSnapshot"),kr(this);const i=a$({assertion:this,received:t.flag(this,"object"),filepath:n,hint:r}).then(o=>br(o,e.util.flag(this,"message")));return nc(dl(this),i,tc(t,this,!0),new Error("resolves"),t.flag(this,"soft"))}),t.addMethod(e.Assertion.prototype,"toMatchInlineSnapshot",Wn(t,"toMatchInlineSnapshot",function(r,i,o){return br(Ti({assertion:this,received:t.flag(this,"object"),isInline:!0,...Cp(r,i,o)}),e.util.flag(this,"message"))})),t.addMethod(e.Assertion.prototype,"toThrowErrorMatchingSnapshot",Wn(t,"toThrowErrorMatchingSnapshot",function(n,r){kr(this);const i=t.flag(this,"object"),o=t.flag(this,"promise");return br(Ti({assertion:this,received:kp(i,o),...Ip(n,r)}),e.util.flag(this,"message"))})),t.addMethod(e.Assertion.prototype,"toThrowErrorMatchingInlineSnapshot",Wn(t,"toThrowErrorMatchingInlineSnapshot",function(r,i){kr(this);const o=t.flag(this,"object"),s=t.flag(this,"promise");return br(Ti({assertion:this,received:kp(o,s),isInline:!0,...Cp(void 0,r,i)}),e.util.flag(this,"message"))})),t.addMethod(e.expect,"addSnapshotSerializer",u_)};function Ip(e,t){return typeof e=="string"?{hint:e}:{properties:e,hint:t}}function Cp(e,t,n){let r;return typeof e=="string"?(r=tp(e),{inlineSnapshot:r,hint:t}):(t&&(r=tp(t)),{properties:e,inlineSnapshot:r,hint:n})}function Ti(e){const{assertion:t}=e;kr(t);const n=hl(t),r=dl(t);return cc().match({received:e.received,properties:e.properties,message:e.hint,isInline:e.isInline,inlineSnapshot:e.inlineSnapshot,assertionName:n,error:me.flag(t,"error"),...Lb(r)})}async function a$(e){const{assertion:t}=e;kr(t);const n=Lb(dl(t)),r=cc().getSnapshotState(n.filepath),i=await r.environment.resolveRawPath(n.filepath,e.filepath),o=await r.environment.readSnapshotFile(i);return cc().match({received:e.received,message:e.hint,rawSnapshot:{file:i,content:o??void 0},...n})}function br(e,t){if(!e.pass){const n=(t?`${t}: `:"")+e.message();throw Object.assign(new Error(n),{actual:e.actual,expected:e.expected,diffOptions:{expand:Hr().config.snapshotOptions.expand}})}}wn(GC);wn(VC);wn(dC);wn(s$);wn(UC);function c$(e){const t=((o,s)=>{const{assertionCalls:c}=Ar(t);Us({assertionCalls:c+1},t);const a=In(o,s),u=hu();return u?a.withTest(u):a});Object.assign(t,In),Object.assign(t,globalThis[rl]),t.getState=()=>Ar(t),t.setState=o=>Us(o,t);const n=Ar(globalThis[Vo])||{};Us({...n,assertionCalls:0,isExpectingAssertions:!1,isExpectingAssertionsError:null,expectedAssertionsNumber:null,expectedAssertionsNumberErrorGen:null,get testPath(){return Hr().filepath},currentTestName:n.currentTestName},t),t.assert=g,t.extend=o=>In.extend(t,o),t.addEqualityTesters=o=>EC(o),t.soft=(...o)=>t(...o).withContext({soft:!0}),t.poll=o$(t),t.unreachable=o=>{g.fail(`expected${o?` "${o}" `:" "}not to be reached`)};function r(o){const s=()=>new Error(`expected number of assertions to be ${o}, but got ${t.getState().assertionCalls}`);Error.captureStackTrace&&Error.captureStackTrace(s(),r),t.setState({expectedAssertionsNumber:o,expectedAssertionsNumberErrorGen:s})}function i(){const o=new Error("expected any number of assertion, but got none");Error.captureStackTrace&&Error.captureStackTrace(o,i),t.setState({isExpectingAssertions:!0,isExpectingAssertionsError:o})}return me.addMethod(t,"assertions",r),me.addMethod(t,"hasAssertions",i),t.extend(pC),t}const qt=c$();Object.defineProperty(globalThis,Vo,{value:qt,writable:!0,configurable:!0});const zo={numRuns:100,timeout:1e3,verbose:!1};function Db(e,t,n,r){const i={...zo,...r};rn(e,async()=>{await Vr(dc(...t,async(...o)=>{await n(...o)}),{numRuns:i.numRuns,seed:i.seed,verbose:i.verbose,examples:i.examples})})}function u$(e,t,n,r){const i={...zo,...r};rn(e,()=>{Vr(Ur(...t,(...o)=>{n(...o)}),{numRuns:i.numRuns,seed:i.seed,verbose:i.verbose,examples:i.examples})})}const l$={nonEmptyString:()=>be({minLength:1}),nonEmptyArray:e=>ae(e,{minLength:1}),uniqueArray:e=>tn(e),hexColor:()=>{const e=je(..."0123456789abcdef".split(""));return Ce(be({unit:e,minLength:6,maxLength:6}).map(t=>`#${t}`),be({unit:e,minLength:3,maxLength:3}).map(t=>`#${t}`))},rgbColor:()=>Ht({r:W({min:0,max:255}),g:W({min:0,max:255}),b:W({min:0,max:255})}),hslColor:()=>Ht({h:W({min:0,max:360}),s:W({min:0,max:100}),l:W({min:0,max:100})}),cssSize:()=>H(Eo({min:0,max:1e3,noNaN:!0}),je("px","rem","em","%","vh","vw")).map(([e,t])=>`${e}${t}`),cssSpacing:()=>W({min:0,max:100}).map(e=>`${e}px`),borderRadius:()=>Ce(W({min:0,max:50}).map(e=>`${e}px`),W({min:0,max:50}).map(e=>`${e}%`)),zIndex:()=>W({min:-10,max:9999}),viewport:()=>Ht({width:W({min:320,max:3840}),height:W({min:480,max:2160})}),gridColumns:()=>W({min:1,max:12}),flexDirection:()=>je("row","column","row-reverse","column-reverse"),justifyContent:()=>je("flex-start","flex-end","center","space-between","space-around","space-evenly"),alignItems:()=>je("flex-start","flex-end","center","stretch","baseline"),htmlTag:()=>je("div","span","button","a","input","label","p","h1","h2","h3","section","article","main","nav","footer","header"),ariaRole:()=>je("button","checkbox","dialog","gridcell","link","menuitem","option","progressbar","radio","slider","spinbutton","tab","tabpanel","textbox","listbox"),eventHandler:()=>je("onClick","onMouseEnter","onMouseLeave","onFocus","onBlur","onKeyDown","onKeyUp","onChange","onSubmit"),email:()=>vc(),uuid:()=>Wi(),url:()=>Zc(),isoDate:()=>wo().map(e=>e.toISOString()),timestamp:()=>W({min:0,max:Date.now()+365*24*60*60*1e3}),phone:()=>H(W({min:100,max:999}),W({min:100,max:999}),W({min:1e3,max:9999})).map(([e,t,n])=>`${e}-${t}-${n}`),fieldValue:()=>Ce(be(),W(),Dt()),validationState:()=>Ht({valid:Dt(),error:Ct(be(),{nil:void 0}),touched:Dt(),dirty:Dt()}),tableRow:e=>Ht({id:Wi(),...e}),tableData:(e,t)=>ae(e,t),duration:()=>W({min:0,max:5e3}),easing:()=>je("linear","ease","ease-in","ease-out","ease-in-out","cubic-bezier(0.4, 0, 0.2, 1)"),delay:()=>W({min:0,max:2e3})};function f$(e,t,n){const r={...zo,...n};Vr(Ur(...e,(...i)=>t(...i)),{numRuns:r.numRuns,seed:r.seed,verbose:r.verbose})}function h$(e,t,n){const r={...zo,...n};return go(Ur(...e,(...i)=>(t(...i),!0)),{numRuns:r.numRuns,seed:r.seed,verbose:r.verbose})}function d$(e,t,n,r,i){Db(e,[r],async o=>{const s=t(),c=n();for(const a of o)a.check(s)&&await a.run(s,c)},i)}const Bb=[["mobile",375],["tablet",768],["desktop",1024],["wide",1440]];function p$(e,t={}){const{name:n,wrapper:r}=t;rn(n||"renders correctly",()=>{const{container:o}=r?qe.render(He.jsx(r,{children:e})):qe.render(e);qt(o.firstChild).toMatchSnapshot()})}function m$(e,t,n,r={}){const{wrapper:i}=r;Object.entries(n).forEach(([o,s])=>{$o(`${o} variants`,()=>{s.forEach(c=>{const a={...t,[o]:c},u=He.jsx(e,{...a});rn(`${o}=${JSON.stringify(c)}`,()=>{const{container:l}=i?qe.render(He.jsx(i,{children:u})):qe.render(u);qt(l.firstChild).toMatchSnapshot()})})})})}const ti=["display","position","width","height","margin","padding","flex-direction","justify-content","align-items","gap","background-color","color","border","border-radius","box-shadow","font-family","font-size","font-weight","line-height","text-align","transition","transform","opacity"];function g$(e,t={}){const{name:n,wrapper:r,properties:i=ti,pseudo:o}=t;rn(n||"has expected styles",()=>{const{container:c}=r?qe.render(He.jsx(r,{children:e})):qe.render(e),a=c.firstChild;if(!a)throw new Error("No element rendered");const u=window.getComputedStyle(a,o||null),l={};i.forEach(f=>{l[f]=u.getPropertyValue(f)}),qt(l).toMatchSnapshot()})}function y$(e,t,n,r={}){const{properties:i=ti,wrapper:o}=r;$o("state styles",()=>{Object.entries(n).forEach(([s,c])=>{rn(`${s} state`,()=>{const a={...t,...c.props||{}},u=He.jsx(e,{...a}),{container:l}=o?qe.render(He.jsx(o,{children:u})):qe.render(u),f=l.firstChild;if(!f)throw new Error("No element rendered");const h=window.getComputedStyle(f,c.pseudo||null),d={};i.forEach(m=>{d[m]=h.getPropertyValue(m)}),qt(d).toMatchSnapshot()})})})}function b$(e,t,n,r={}){const{properties:i=ti}=r;$o("theme snapshots",()=>{n.forEach(({name:o,theme:s})=>{rn(`${o} theme`,()=>{const{container:c}=qe.render(He.jsx(t,{theme:s,children:e})),a=c.firstChild;if(!a)throw new Error("No element rendered");qt(c.firstChild).toMatchSnapshot(`${o}-structure`);const u=window.getComputedStyle(a),l={};i.filter(f=>["background","color","border"].some(h=>f.includes(h))).forEach(f=>{l[f]=u.getPropertyValue(f)}),qt(l).toMatchSnapshot(`${o}-styles`)})})})}function w$(e,t={}){const{wrapper:n,breakpoints:r=Bb}=t;$o("responsive snapshots",()=>{r.forEach(([i,o])=>{rn(`at ${i} (${o}px)`,()=>{const s=window.matchMedia;window.matchMedia=a=>{var l;return{matches:a.includes(`max-width: ${o}px`)?!0:a.includes("min-width")?o>=parseInt(((l=a.match(/\d+/))==null?void 0:l[0])||"0"):!1,media:a,onchange:null,addListener:()=>{},removeListener:()=>{},addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!0}},Object.defineProperty(window,"innerWidth",{writable:!0,configurable:!0,value:o});const{container:c}=n?qe.render(He.jsx(n,{children:e})):qe.render(e);qt(c.firstChild).toMatchSnapshot(),window.matchMedia=s})})})}function x$(e,t={}){const{wrapper:n}=t,{container:r}=n?qe.render(He.jsx(n,{children:e})):qe.render(e);return r.innerHTML}function S$(e,t=ti,n={}){const{wrapper:r}=n,{container:i}=r?qe.render(He.jsx(r,{children:e})):qe.render(e),o=i.firstChild;if(!o)return{};const s=window.getComputedStyle(o),c={};return t.forEach(a=>{const u=s.getPropertyValue(a);u&&(c[a]=u)}),c}function E$(e,t={}){const{name:n,wrapper:r}=t;rn(n||"has expected accessibility attributes",()=>{const{container:o}=r?qe.render(He.jsx(r,{children:e})):qe.render(e),s=o.firstChild;if(!s)throw new Error("No element rendered");const c={role:s.getAttribute("role"),"aria-label":s.getAttribute("aria-label"),"aria-labelledby":s.getAttribute("aria-labelledby"),"aria-describedby":s.getAttribute("aria-describedby"),"aria-hidden":s.getAttribute("aria-hidden"),"aria-disabled":s.getAttribute("aria-disabled"),"aria-expanded":s.getAttribute("aria-expanded"),"aria-selected":s.getAttribute("aria-selected"),"aria-checked":s.getAttribute("aria-checked"),"aria-pressed":s.getAttribute("aria-pressed"),"aria-haspopup":s.getAttribute("aria-haspopup"),"aria-controls":s.getAttribute("aria-controls"),"aria-live":s.getAttribute("aria-live"),tabIndex:s.getAttribute("tabindex")},a=Object.fromEntries(Object.entries(c).filter(([,u])=>u!==null));qt(a).toMatchSnapshot()})}const co={mobile:{width:375,height:667},mobileLarge:{width:414,height:896},tablet:{width:768,height:1024},tabletLandscape:{width:1024,height:768},desktop:{width:1280,height:800},desktopLarge:{width:1440,height:900},ultrawide:{width:1920,height:1080}},pl={light:{name:"light",className:"theme-light",background:"#ffffff"},dark:{name:"dark",className:"theme-dark",background:"#1a1a1a"},highContrast:{name:"high-contrast",className:"theme-high-contrast",background:"#000000"}},uo={mobile:{viewport:{width:375,height:667}},tablet:{viewport:{width:768,height:1024}},desktop:{viewport:{width:1280,height:800}},wide:{viewport:{width:1920,height:1080}},light:{theme:"light",backgrounds:{value:"#ffffff"}},dark:{theme:"dark",backgrounds:{value:"#1a1a1a"}},highContrast:{theme:"high-contrast",backgrounds:{value:"#000000"}},rtl:{globals:{direction:"rtl"}}},ni={viewports:[375,768,1280],diffThreshold:.05,delay:300,pauseAnimationAtEnd:!0};function T$(){return function(t,n){const r=n.globals.theme||"light",i=pl[r];return He.jsx("div",{className:(i==null?void 0:i.className)||"theme-light",style:{background:(i==null?void 0:i.background)||"#ffffff",minHeight:"100vh",padding:"1rem"},children:He.jsx(t,{})})}}function v$(){return function(t,n){const r=n.globals.direction||"ltr";return He.jsx("div",{dir:r,style:{direction:r},children:He.jsx(t,{})})}}function A$(){return function(t,n){const r=n.globals.theme||"light",i=n.globals.direction||"ltr",o=n.globals.reducedMotion||!1,s=pl[r];return He.jsx("div",{className:(s==null?void 0:s.className)||"theme-light",dir:i,style:{background:(s==null?void 0:s.background)||"#ffffff",direction:i},"data-reduced-motion":o,children:He.jsx(t,{})})}}function k$(e,t){const r=(t||["mobile","tablet","desktop"]).map(i=>co[i].width);return{...e,parameters:{...e.parameters||{},chromatic:{...ni,viewports:r}}}}function I$(e,t){const n=t||["light","dark"];return{...e,parameters:{...e.parameters||{},chromatic:{...ni,modes:Object.fromEntries(n.map(r=>[r,uo[r]]))}}}}function C$(e){return{...e,parameters:{...e.parameters||{},chromatic:{...ni,modes:{ltr:{globals:{direction:"ltr"}},rtl:{globals:{direction:"rtl"}}}}}}}function _$(e,t){const{viewports:n=["mobile","desktop"],themes:r=["light","dark"],rtl:i=!0}=t||{},o={};return n.forEach(s=>{o[`viewport-${s}`]={viewport:{width:co[s].width,height:co[s].height}}}),r.forEach(s=>{o[`theme-${s}`]=uo[s]}),i&&(o.rtl=uo.rtl),{...e,parameters:{...e.parameters||{},chromatic:{...ni,modes:o}}}}const $$={theme:{name:"Theme",description:"Global theme for components",defaultValue:"light",toolbar:{icon:"paintbrush",items:[{value:"light",title:"Light"},{value:"dark",title:"Dark"},{value:"highContrast",title:"High Contrast"}],showName:!0}},direction:{name:"Direction",description:"Text direction",defaultValue:"ltr",toolbar:{icon:"paragraph",items:[{value:"ltr",title:"LTR"},{value:"rtl",title:"RTL"}],showName:!0}},reducedMotion:{name:"Reduced Motion",description:"Reduce animations",defaultValue:!1,toolbar:{icon:"accessibility",items:[{value:!1,title:"Full Motion"},{value:!0,title:"Reduced Motion"}],showName:!0}}},M$={version:2,snapshot:{widths:[375,768,1280,1920],minHeight:1024,percyCSS:`
|
|
214
214
|
/* Hide dynamic content */
|
|
215
215
|
[data-percy-hide] { visibility: hidden !important; }
|
|
216
216
|
/* Disable animations */
|
|
@@ -218,7 +218,7 @@ await ${C}
|
|
|
218
218
|
animation-duration: 0s !important;
|
|
219
219
|
transition-duration: 0s !important;
|
|
220
220
|
}
|
|
221
|
-
`},discovery:{networkIdleTimeout:250,allowedHostnames:["fonts.googleapis.com","fonts.gstatic.com"]}};function
|
|
221
|
+
`},discovery:{networkIdleTimeout:250,allowedHostnames:["fonts.googleapis.com","fonts.gstatic.com"]}};function O$(e,t){return{name:e,...t}}const Ub=["@storybook/addon-essentials","@storybook/addon-a11y","@storybook/addon-viewport","@storybook/addon-themes","storybook-addon-rtl"],Vb={mobile:{name:"Mobile (375px)",styles:{width:"375px",height:"667px"},type:"mobile"},mobileLarge:{name:"Mobile Large (414px)",styles:{width:"414px",height:"896px"},type:"mobile"},tablet:{name:"Tablet (768px)",styles:{width:"768px",height:"1024px"},type:"tablet"},desktop:{name:"Desktop (1280px)",styles:{width:"1280px",height:"800px"},type:"desktop"},desktopLarge:{name:"Desktop Large (1440px)",styles:{width:"1440px",height:"900px"},type:"desktop"},ultrawide:{name:"Ultrawide (1920px)",styles:{width:"1920px",height:"1080px"},type:"desktop"}},P$={viewport:{viewports:Vb,defaultViewport:"desktop"},chromatic:{viewports:[375,768,1280],diffThreshold:.05,pauseAnimationAtEnd:!0,delay:300},a11y:{element:"#storybook-root",config:{},options:{},manual:!1},layout:"fullscreen"},N$={addons:Ub,core:{disableTelemetry:!0},docs:{autodocs:"tag"},staticDirs:["../public"]};function j$(){return`
|
|
222
222
|
import type { Preview } from '@storybook/react';
|
|
223
223
|
import { visualTestingParameters, visualTestingGlobalTypes } from '@nice2dev/testing';
|
|
224
224
|
import { createVisualTestDecorator } from '@nice2dev/testing';
|
|
@@ -238,10 +238,10 @@ const preview: Preview = {
|
|
|
238
238
|
};
|
|
239
239
|
|
|
240
240
|
export default preview;
|
|
241
|
-
`}const
|
|
241
|
+
`}const F$={projectToken:process.env.CHROMATIC_PROJECT_TOKEN,buildScriptName:"build-storybook",exitZeroOnChanges:!1,exitOnceUploaded:!1,onlyChanged:!0,externals:["**/*.md"],skip:"@(renovate|dependabot)/**",traceChanged:"expanded",modes:{light:{theme:"light"},dark:{theme:"dark"}}};function R$(e){const{onlyChanged:t=!0,exitZeroOnChanges:n=!1}=e||{};return["npx chromatic","--project-token=$CHROMATIC_PROJECT_TOKEN",t?"--only-changed":"",n?"--exit-zero-on-changes":"","--trace-changed=expanded"].filter(Boolean).join(" ")}const L$={"iPhone 13":{viewport:{width:390,height:844},userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.0 Mobile/15E148 Safari/604.1",deviceScaleFactor:3,isMobile:!0,hasTouch:!0},"iPhone 14 Pro Max":{viewport:{width:430,height:932},userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Mobile/15E148 Safari/604.1",deviceScaleFactor:3,isMobile:!0,hasTouch:!0},"iPad Pro":{viewport:{width:1024,height:1366},userAgent:"Mozilla/5.0 (iPad; CPU OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.0 Mobile/15E148 Safari/604.1",deviceScaleFactor:2,isMobile:!0,hasTouch:!0},"Pixel 7":{viewport:{width:412,height:915},userAgent:"Mozilla/5.0 (Linux; Android 13; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Mobile Safari/537.36",deviceScaleFactor:2.625,isMobile:!0,hasTouch:!0},"Samsung Galaxy S23":{viewport:{width:360,height:780},userAgent:"Mozilla/5.0 (Linux; Android 13; SM-S911B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Mobile Safari/537.36",deviceScaleFactor:3,isMobile:!0,hasTouch:!0}},D$={chromium:{name:"chromium",channel:void 0},chrome:{name:"chromium",channel:"chrome"},firefox:{name:"firefox"},webkit:{name:"webkit"},edge:{name:"chromium",channel:"msedge"}};class qb{constructor(t){this.page=t,this.dataGrid={waitForLoad:async(n='[data-testid="nice-datagrid"]')=>{await this.page.waitForSelector(n),await this.page.waitForSelector(`${n} [data-loaded="true"]`,{timeout:1e4})},selectRow:async(n,r='[data-testid="nice-datagrid"]')=>{await this.page.locator(`${r} [data-testid="nice-datagrid-row-${n}"]`).click()},sortByColumn:async(n,r='[data-testid="nice-datagrid"]')=>{await this.page.locator(`${r} [data-testid="nice-datagrid-header-${n}"]`).click()},filterColumn:async(n,r,i='[data-testid="nice-datagrid"]')=>{await this.page.locator(`${i} [data-testid="nice-datagrid-filter-${n}"]`).fill(r)},getRowCount:async(n='[data-testid="nice-datagrid"]')=>this.page.locator(`${n} [data-testid^="nice-datagrid-row-"]`).count(),getCellValue:async(n,r,i='[data-testid="nice-datagrid"]')=>this.page.locator(`${i} [data-testid="nice-datagrid-cell-${n}-${r}"]`).textContent()},this.form={fillField:async(n,r)=>{await this.page.locator(`[name="${n}"]`).fill(r)},submit:async(n="form")=>{await this.page.locator(n).evaluate(r=>{r.requestSubmit()})},getErrors:async(n="form")=>this.page.locator(`${n} [data-error="true"]`).allTextContents(),waitForReady:async(n="form")=>{await this.page.waitForSelector(`${n}:not([data-loading="true"])`)}},this.modal={waitForOpen:async(n='[data-testid="nice-modal"]')=>{await this.page.waitForSelector(`${n}[data-state="open"]`)},waitForClose:async(n='[data-testid="nice-modal"]')=>{await this.page.waitForSelector(`${n}[data-state="closed"]`,{state:"hidden"})},close:async(n='[data-testid="nice-modal"]')=>{await this.page.locator(`${n} [data-testid="nice-modal-close"]`).click(),await this.modal.waitForClose(n)},clickAction:async(n,r='[data-testid="nice-modal"]')=>{await this.page.locator(`${r} [data-testid="nice-modal-${n}"]`).click()}},this.navigation={navigateToRoute:async n=>{await this.page.locator(`[data-testid="nice-nav-link"][href="${n}"]`).click(),await this.page.waitForURL(`**${n}`)},openMenu:async()=>{await this.page.locator('[data-testid="nice-nav-menu-toggle"]').click(),await this.page.waitForSelector('[data-testid="nice-nav-menu"][data-open="true"]')},getActiveRoute:async()=>this.page.locator('[data-testid="nice-nav-link"][aria-current="page"]').getAttribute("href")},this.keyboard={tabThrough:async n=>{for(let r=0;r<n;r++)await this.page.keyboard.press("Tab")},shiftTabThrough:async n=>{for(let r=0;r<n;r++)await this.page.keyboard.press("Shift+Tab")},activate:async()=>{await this.page.keyboard.press("Enter")},escape:async()=>{await this.page.keyboard.press("Escape")},arrow:async n=>{await this.page.keyboard.press(`Arrow${n}`)}}}}async function ml(e,t){await e.addScriptTag({url:"https://cdnjs.cloudflare.com/ajax/libs/axe-core/4.7.2/axe.min.js"});const n=await e.evaluate(r=>window.axe.run(document,{rules:r==null?void 0:r.rules,runOnly:r!=null&&r.tags?{type:"tag",values:r.tags}:void 0,include:r==null?void 0:r.include,exclude:r==null?void 0:r.exclude}),t);return{violations:n.violations.map(r=>({id:r.id,impact:r.impact,description:r.description,help:r.help,helpUrl:r.helpUrl,nodes:r.nodes.map(i=>({html:i.html,target:i.target,failureSummary:i.failureSummary}))})),passes:n.passes.length,incomplete:n.incomplete.length}}async function B$(e){const{violations:t}=await ml(e);if(t.length>0){const n=t.map(r=>`${r.id} (${r.impact}): ${r.help}
|
|
242
242
|
${r.helpUrl}`);throw new Error(`Accessibility violations found:
|
|
243
243
|
${n.join(`
|
|
244
244
|
|
|
245
|
-
`)}`)}}async function
|
|
245
|
+
`)}`)}}async function Wb(e,t){for(const n of t)await e.route(n.url,async r=>{if(n.method&&r.request().method()!==n.method)return r.continue();n.delay&&await new Promise(i=>setTimeout(i,n.delay)),await r.fulfill({status:n.status||200,contentType:"application/json",body:JSON.stringify(n.body||{})})})}async function zb(e,t,n){await e.route(t,async r=>{const o=r.request().postDataJSON(),s=o==null?void 0:o.operationName;s&&n[s]?await r.fulfill({status:200,contentType:"application/json",body:JSON.stringify({data:n[s]})}):await r.continue()})}async function U$(e,t,n){return await e.addInitScript(r=>{window.__signalRMock={handlers:r.handlers,messages:[]},window.signalR={HubConnectionBuilder:class{withUrl(){return this}withAutomaticReconnect(){return this}build(){return{start:()=>Promise.resolve(),stop:()=>Promise.resolve(),on:(i,o)=>{window.__signalRMock.handlers[i]=o},invoke:(i,...o)=>(window.__signalRMock.messages.push({method:i,args:o}),Promise.resolve())}}}}},{handlers:n,hubUrl:t}),{send:async(r,...i)=>{await e.evaluate(({method:o,args:s})=>{const c=window.__signalRMock.handlers[o];c&&c(...s)},{method:r,args:i})}}}async function Gb(e){const t=await e.evaluate(()=>{const r=performance,i=r.getEntriesByType("navigation")[0],s=r.getEntriesByType("paint").find(c=>c.name==="first-contentful-paint");return{ttfb:(i==null?void 0:i.responseStart)||0,fcp:(s==null?void 0:s.startTime)||0,domContentLoaded:(i==null?void 0:i.domContentLoadedEventEnd)-(i==null?void 0:i.domContentLoadedEventStart)||0,load:(i==null?void 0:i.loadEventEnd)-(i==null?void 0:i.loadEventStart)||0}}),n=await e.evaluate(()=>new Promise(r=>{new PerformanceObserver(i=>{const o=i.getEntries(),s=o[o.length-1];r((s==null?void 0:s.startTime)||0)}).observe({entryTypes:["largest-contentful-paint"]}),setTimeout(()=>r(0),5e3)}));return{fcp:t.fcp,lcp:n,cls:0,ttfb:t.ttfb,tti:t.domContentLoaded}}function V$(e,t){return{page:e,context:t,helpers:new qb(e),axe:()=>ml(e),mockAPI:n=>Wb(e,n),mockGraphQL:(n,r)=>zb(e,n,r),performance:()=>Gb(e)}}const _p={south:0,east:1,west:2,north:3,leftBumper:4,rightBumper:5,leftTrigger:6,rightTrigger:7,select:8,start:9,leftStick:10,rightStick:11,dpadUp:12,dpadDown:13,dpadLeft:14,dpadRight:15,home:16,A:0,B:1,X:2,Y:3,LB:4,RB:5,LT:6,RT:7,View:8,Menu:9,LS:10,RS:11},q$={xbox:"Xbox Wireless Controller (STANDARD GAMEPAD Vendor: 045e Product: 0b13)",playstation:"DualSense Wireless Controller (STANDARD GAMEPAD Vendor: 054c Product: 0ce6)",nintendo:"Pro Controller (STANDARD GAMEPAD Vendor: 057e Product: 2009)",steam:"Steam Deck Controller (STANDARD GAMEPAD Vendor: 28de Product: 1205)",generic:"USB Gamepad (STANDARD GAMEPAD Vendor: 0079 Product: 0006)"};class W${constructor(t){this.win=t,this.slots=[],this.now=0,this.frames=new Map,this.nextFrame=1,this.restoreFns=[];const n=t.navigator,r=Object.getOwnPropertyDescriptor(n,"getGamepads");Object.defineProperty(n,"getGamepads",{configurable:!0,value:()=>this.slots.map(s=>s&&s.connected?s:null)}),this.restoreFns.push(()=>{r?Object.defineProperty(n,"getGamepads",r):delete n.getGamepads});const i=t.requestAnimationFrame,o=t.cancelAnimationFrame;t.requestAnimationFrame=s=>{const c=this.nextFrame++;return this.frames.set(c,s),c},t.cancelAnimationFrame=s=>{this.frames.delete(s)},this.restoreFns.push(()=>{t.requestAnimationFrame=i,t.cancelAnimationFrame=o})}tick(t){const n=this.now+t;do{this.now=Math.min(n,this.now+16);const r=[...this.frames.values()];this.frames.clear(),r.forEach(i=>i(this.now))}while(this.now<n)}get pendingFrames(){return this.frames.size}freeIndex(){const t=this.slots.findIndex(n=>n===null);return t<0?this.slots.length:t}restore(){this.restoreFns.splice(0).forEach(t=>t()),nr.delete(this.win)}}const nr=new Map;function z$(e=window){let t=nr.get(e);return t||(t=new W$(e),nr.set(e,t)),t}function gl(e={}){const t=z$(),n=e.family??"xbox",r={id:e.id??q$[n],index:e.index??t.freeIndex(),connected:!1,mapping:e.mapping??"standard",timestamp:0,buttons:Array.from({length:17},()=>({pressed:!1,touched:!1,value:0})),axes:[0,0,0,0],vibrationActuator:null};t.slots[r.index]=r;const i=()=>{r.timestamp=t.now},o=c=>{const a=new Event(c);Object.defineProperty(a,"gamepad",{value:r}),window.dispatchEvent(a)},s={index:r.index,id:r.id,connect(){r.connected=!0,t.slots[r.index]=r,o("gamepadconnected")},disconnect(){r.connected=!1,t.slots[r.index]=null,o("gamepaddisconnected")},press(c,a=1){const u=r.buttons[_p[c]];u.pressed=!0,u.touched=!0,u.value=a,i()},release(c){const a=r.buttons[_p[c]];a.pressed=!1,a.touched=!1,a.value=0,i()},tap(c){s.press(c),t.tick(32),s.release(c),t.tick(16)},hold(c,a){s.press(c),t.tick(a),s.release(c),t.tick(16)},tilt(c,a,u){const l=c==="left"?0:2;r.axes[l]=a,r.axes[l+1]=u,i()},center(c){s.tilt(c,0,0)},tick(c=16){t.tick(c)}};return e.connect!==!1&&s.connect(),s}function G$(){var e;return((e=nr.get(window))==null?void 0:e.pendingFrames)??0}function Kb(){const e=nr.get(window);e&&(e.slots.forEach(t=>{if(t!=null&&t.connected){t.connected=!1;const n=new Event("gamepaddisconnected");Object.defineProperty(n,"gamepad",{value:t}),window.dispatchEvent(n)}}),e.restore())}function Hb(e,t){const n={x:t.left,y:t.top,left:t.left,top:t.top,width:t.width,height:t.height,right:t.left+t.width,bottom:t.top+t.height,toJSON(){return{...t}}};Object.defineProperty(e,"getBoundingClientRect",{configurable:!0,value:()=>n}),Object.defineProperty(e,"getClientRects",{configurable:!0,value:()=>[n]})}function K$(e,t){const{columns:n,size:r=[100,40],gap:i=8,origin:o=[0,0]}=t;Array.from(e).forEach((s,c)=>{const a=c%n,u=Math.floor(c/n);Hb(s,{left:o[0]+a*(r[0]+i),top:o[1]+u*(r[1]+i),width:r[0],height:r[1]})})}function uc(e,t={}){const{target:n,...r}=t,i=n??document.activeElement??document.body,o=new KeyboardEvent("keydown",{key:e,bubbles:!0,cancelable:!0,...r});return i.dispatchEvent(o),i.dispatchEvent(new KeyboardEvent("keyup",{key:e,bubbles:!0,cancelable:!0,...r})),o.defaultPrevented}const H$={navigate:["ArrowDown"],activate:["Enter"],back:["Escape"],secondary:["F10",{shiftKey:!0}],menu:["k",{ctrlKey:!0}],view:["F6"],sectionPrev:["PageUp",{ctrlKey:!0}],sectionNext:["PageDown",{ctrlKey:!0}],pagePrev:["PageUp"],pageNext:["PageDown"],first:["Home"],last:["End"],toggleHints:["?",{shiftKey:!0}]},Y$={up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight"},J$={up:"dpadUp",down:"dpadDown",left:"dpadLeft",right:"dpadRight"};function X$(e,t){const n=t==="nintendo";switch(e){case"activate":return n?"east":"south";case"back":return n?"south":"east";case"secondary":return"west";case"tertiary":return"north";case"menu":return"start";case"view":return"select";case"sectionPrev":return"leftBumper";case"sectionNext":return"rightBumper";case"pagePrev":return"leftTrigger";case"pageNext":return"rightTrigger";case"toggleHints":return"leftStick";default:return null}}let Di=null;function Yb(e,t={}){const{device:n="keyboard",direction:r="down"}=t;if(n==="keyboard"){if(e==="navigate"){uc(Y$[r],{target:t.target});return}const s=H$[e];if(!s)throw new Error(`pressIntent: "${e}" has no default key; press the control's own with pressKey()`);uc(s[0],{...s[1],target:t.target});return}let i=t.pad;if(i||((!Di||!nr.get(window))&&(Di=gl({family:t.family??"xbox"})),i=Di),e==="navigate"){i.tap(J$[r]);return}const o=X$(e,t.family??"xbox");if(!o)throw new Error(`pressIntent: "${e}" has no default gamepad button`);i.tap(o)}function $p(e){var n;if(!e)return"nothing";const t=e.getAttribute("aria-label")??((n=e.textContent)==null?void 0:n.trim().slice(0,30))??"";return`<${e.tagName.toLowerCase()}${e.id?`#${e.id}`:""}${t?` "${t}"`:""}>`}function Jb(e,t){var o;const n=[],r=e.render();let i;try{t==="gamepad"&&(i=gl({family:e.family??"xbox"}),i.tick(32)),(o=e.setup)==null||o.call(e),e.steps.forEach((s,c)=>{var l;if(s.only&&s.only!==t)return;qe.act(()=>{Yb(s.intent,{device:t,direction:s.direction,pad:i,family:e.family})});const a=document.activeElement,u=`step ${c+1} (${s.intent}${s.direction?` ${s.direction}`:""})`;if(typeof s.expectFocus=="string"){const f=document.querySelector(s.expectFocus);a!==f&&n.push(`${u}: focus on ${$p(a)}, expected ${s.expectFocus}`)}else s.expectFocus&&!s.expectFocus(a)&&n.push(`${u}: focus on ${$p(a)} failed the check`);try{(l=s.expect)==null||l.call(s)}catch(f){n.push(`${u}: ${f instanceof Error?f.message:String(f)}`)}})}finally{i==null||i.disconnect(),Kb(),Di=null,typeof r=="function"&&r()}return n}function Z$(e,t,n){n.describe(`${e} — input contract`,()=>{for(const r of t.devices??["keyboard","gamepad"])n.it(r,()=>{const i=Jb(t,r);if(i.length>0)throw new Error(`${e} (${r}):
|
|
246
246
|
${i.join(`
|
|
247
|
-
`)}`)})})}function
|
|
247
|
+
`)}`)})})}function Q$(...e){return e.join("-")}const eM={button:e=>e?`nice-button-${e}`:"nice-button",textInput:e=>e?`nice-text-input-${e}`:"nice-text-input",numberInput:e=>e?`nice-number-input-${e}`:"nice-number-input",select:e=>e?`nice-select-${e}`:"nice-select",checkbox:e=>e?`nice-checkbox-${e}`:"nice-checkbox",toggle:e=>e?`nice-toggle-${e}`:"nice-toggle",datePicker:e=>e?`nice-date-picker-${e}`:"nice-date-picker",dataGrid:e=>e?`nice-datagrid-${e}`:"nice-datagrid",table:e=>e?`nice-table-${e}`:"nice-table",list:e=>e?`nice-list-${e}`:"nice-list",treeView:e=>e?`nice-tree-${e}`:"nice-tree",modal:e=>e?`nice-modal-${e}`:"nice-modal",drawer:e=>e?`nice-drawer-${e}`:"nice-drawer",form:e=>e?`nice-form-${e}`:"nice-form",tabs:e=>e?`nice-tabs-${e}`:"nice-tabs",menu:e=>e?`nice-menu-${e}`:"nice-menu",chart:e=>e?`nice-chart-${e}`:"nice-chart",scheduler:e=>e?`nice-scheduler-${e}`:"nice-scheduler",gantt:e=>e?`nice-gantt-${e}`:"nice-gantt",diagram:e=>e?`nice-diagram-${e}`:"nice-diagram",toast:e=>e?`nice-toast-${e}`:"nice-toast",alert:e=>e?`nice-alert-${e}`:"nice-alert",badge:e=>e?`nice-badge-${e}`:"nice-badge",avatar:e=>e?`nice-avatar-${e}`:"nice-avatar",progress:e=>e?`nice-progress-${e}`:"nice-progress",skeleton:e=>e?`nice-skeleton-${e}`:"nice-skeleton",spinner:e=>e?`nice-spinner-${e}`:"nice-spinner",card:e=>e?`nice-card-${e}`:"nice-card",accordion:e=>e?`nice-accordion-${e}`:"nice-accordion",breadcrumb:e=>e?`nice-breadcrumb-${e}`:"nice-breadcrumb",pagination:e=>e?`nice-pagination-${e}`:"nice-pagination",toolbar:e=>e?`nice-toolbar-${e}`:"nice-toolbar"},Xb=({children:e,direction:t="ltr"})=>i0.createElement("div",{dir:t,"data-testid":"nice-test-root",style:{direction:t}},e);process.env.NODE_ENV!=="production"&&(Xb.displayName="NiceTestWrapper");function tM(e,t,n){const r=new KeyboardEvent("keydown",{key:t,bubbles:!0,cancelable:!0,...n});e.dispatchEvent(r)}function nM(e,t){var r,i;const n=((r=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:r.set)||((i=Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype,"value"))==null?void 0:i.set);n&&n.call(e,t),e.dispatchEvent(new Event("input",{bubbles:!0})),e.dispatchEvent(new Event("change",{bubbles:!0}))}function rM(e,t){const n=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window,...t});e.dispatchEvent(n)}function iM(e){const{data:t,delay:n=0,keyField:r="id"}=e;let i=[...t];return{key:r,load:async()=>(n>0&&await new Promise(o=>setTimeout(o,n)),{data:[...i],totalCount:i.length}),insert:async o=>(i.push(o),o),update:async(o,s)=>{const c=i.findIndex(a=>a[r]===o);c>=0&&(i[c]={...i[c],...s})},remove:async o=>{i=i.filter(s=>s[r]!==o)},getData:()=>[...i],reset:()=>{i=[...t]}}}function oM(e){const t=[];return e.querySelectorAll('button, input, select, textarea, [role="button"], [role="link"], [role="checkbox"], [role="radio"]').forEach(o=>{var c;o.getAttribute("aria-label")||o.getAttribute("aria-labelledby")||((c=o.textContent)==null?void 0:c.trim())||o.getAttribute("title")||t.push(`${o.tagName.toLowerCase()}${o.id?"#"+o.id:""} missing accessible name`)}),e.querySelectorAll("img").forEach(o=>{!o.alt&&o.getAttribute("role")!=="presentation"&&t.push(`img${o.src?'[src="'+o.src.substring(0,40)+'..."]':""} missing alt text`)}),e.querySelectorAll('input:not([type="hidden"]), select, textarea').forEach(o=>{const s=o.id&&e.querySelector(`label[for="${o.id}"]`),c=o.getAttribute("aria-label")||o.getAttribute("aria-labelledby");!s&&!c&&t.push(`${o.tagName.toLowerCase()}${o.name?'[name="'+o.name+'"]':""} missing label`)}),t}function sM(e){return["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])','[contenteditable="true"]'].some(n=>e.matches(n))}function aM(e){const t=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])','[contenteditable="true"]'].join(", ");return Array.from(e.querySelectorAll(t))}async function cM(e,t=document.body,n=3e3){const r=Date.now();for(;Date.now()-r<n;){const i=t.querySelector(e);if(i)return i;await new Promise(o=>setTimeout(o,50))}return null}async function uM(e,t=3e3){const n=Date.now();for(;Date.now()-n<t;){if(await e())return;await new Promise(r=>setTimeout(r,50))}throw new Error("Timeout waiting for condition")}function lM(e){return e.replace(/id="[^"]+"/g,'id="[id]"').replace(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/g,"[timestamp]").replace(/style="[^"]+"/g,'style="[styles]"')}function fM(e){return e.getAttribute("aria-busy")==="true"||e.classList.contains("loading")||e.querySelector('[data-loading="true"]')!==null}function hM(e){return e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"||e.classList.contains("disabled")}function dM(e){return e.getAttribute("aria-expanded")==="true"||e.classList.contains("expanded")}function pM(e){return e instanceof HTMLInputElement?e.checked:e.getAttribute("aria-checked")==="true"||e.classList.contains("checked")}exports.BROWSER_CONFIGS=D$;exports.DEFAULT_BREAKPOINTS=Bb;exports.DEFAULT_STYLE_PROPERTIES=ti;exports.DEVICE_CONFIGS=L$;exports.NiceTestHelpers=qb;exports.NiceTestWrapper=Xb;exports.VISUAL_BREAKPOINTS=co;exports.VISUAL_THEMES=pl;exports.arbitraries=l$;exports.axeCheck=ml;exports.checkAriaCompliance=oM;exports.checkWithStats=h$;exports.chromaticCIConfig=F$;exports.chromaticDefaults=ni;exports.chromaticModes=uo;exports.cleanHtmlForSnapshot=lM;exports.createMockDataSource=iM;exports.createRTLDecorator=v$;exports.createTestContext=V$;exports.createThemeDecorator=T$;exports.createVisualPreviewConfig=j$;exports.createVisualTestDecorator=A$;exports.describeInputContract=Z$;exports.expect=qt;exports.expectNoA11yViolations=B$;exports.fc=cA;exports.forAll=f$;exports.getChromaticCommand=R$;exports.getFocusableElements=aM;exports.getStylesSnapshot=S$;exports.isChecked=pM;exports.isDisabled=hM;exports.isExpanded=dM;exports.isFocusable=sM;exports.isLoading=fM;exports.measurePerformance=Gb;exports.mockAPI=Wb;exports.mockGamepad=gl;exports.mockGraphQL=zb;exports.mockSignalR=U$;exports.niceSelectors=eM;exports.pendingAnimationFrames=G$;exports.percyConfig=M$;exports.percySnapshot=O$;exports.pressIntent=Yb;exports.pressKey=uc;exports.renderToSnapshot=x$;exports.resetMockGamepads=Kb;exports.runInputContract=Jb;exports.simulateClick=rM;exports.simulateKeyboard=tM;exports.simulateType=nM;exports.snapshotA11y=E$;exports.snapshotComponent=p$;exports.snapshotResponsive=w$;exports.snapshotStateStyles=y$;exports.snapshotStyles=g$;exports.snapshotThemes=b$;exports.snapshotVariants=m$;exports.stubGridLayout=K$;exports.stubLayout=Hb;exports.testId=Q$;exports.testModel=d$;exports.testProperty=Db;exports.testPropertySync=u$;exports.visualTestingAddons=Ub;exports.visualTestingGlobalTypes=$$;exports.visualTestingParameters=P$;exports.visualTestingPreset=N$;exports.visualTestingViewports=Vb;exports.waitFor=uM;exports.waitForElement=cM;exports.withFullVisualTesting=_$;exports.withRTLTesting=C$;exports.withVisualThemes=I$;exports.withVisualViewports=k$;
|