@nice2dev/testing 1.2.1 → 1.3.0
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 +89 -87
- package/dist/index.d.ts +144 -0
- package/dist/index.mjs +4561 -4236
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
"use strict";var vb=Object.defineProperty;var Ib=(e,t,n)=>t in e?vb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var R=(e,t,n)=>Ib(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const kb=require("react"),ze=require("react/jsx-runtime"),Ge=require("@testing-library/react");var ul=Object.defineProperty,Ab=(e,t)=>{let n={};for(var r in e)ul(n,r,{get:e[r],enumerable:!0});return ul(n,Symbol.toStringTag,{value:"Module"}),n};const Cb=214013,_b=2531011,Mb=4294967295,Uo=-2147483649,$b=-1443076087,Ob=505908858,Pb=1170746341,Nb=-755606699,jb=1994129409,Fb=916127744;var Rb=class gp{constructor(t){this.seed=t}clone(){return new gp(this.seed)}next(){const t=this.seed,n=Math.imul(t,Cb)+_b|0,r=Math.imul(t,$b)+Ob|0,i=Math.imul(t,Pb)+Nb|0;this.seed=i;const o=(n&Uo)>>16,s=(r&Uo)>>16;return(i&Uo)>>16|s<<15|o<<30}jump(){this.seed=Math.imul(this.seed,jb)+Fb&Mb}getState(){return[this.seed]}};function Lb(e){return new Rb(e)}const qe=624,Qr=397,Vo=2567483615,Db=1812433253,Bb=11,Ub=7,Vb=2636928640,qb=15,Wb=4022730752,zb=18,qo=2147483647,Wo=2147483648,Gb="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 Kb=class yp{constructor(t,n){this.states=t,this.index=n}clone(){return new yp(this.states.slice(),this.index)}next(){let t=this.states[this.index];return t^=t>>>Bb,t^=t<<Ub&Vb,t^=t<<qb&Wb,t^=t>>>zb,this.index=wi(this.states,this.index),t}getState(){return[this.index,...this.states]}jump(){const t=this.states.slice(),n=this.index;this.index=wi(this.states,this.index);for(let r=19932;r>0;--r)Gb.charCodeAt(r/6|0)-48&1<<r%6&&ll(this.states,this.index,t,n),this.index=wi(this.states,this.index);ll(this.states,this.index,t,n)}};function ll(e,t,n,r){let i=0;if(r>=t){for(;i<qe-r;i++)e[i+t]^=n[i+r];for(;i<qe-t;i++)e[i+t]^=n[i+r-qe];for(;i<qe;i++)e[i+t-qe]^=n[i+r-qe]}else{for(;i<qe-t;i++)e[i+t]^=n[i+r];for(;i<qe-r;i++)e[i+t-qe]^=n[i+r];for(;i<qe;i++)e[i+t-qe]^=n[i+r-qe]}}function wi(e,t){if(t<qe-Qr){const n=e[t]&Wo|e[t+1]&qo;return e[t]=e[t+Qr]^n>>>1^-(n&1)&Vo,t+1}else if(t<qe-1){const n=e[t]&Wo|e[t+1]&qo;return e[t]=e[t+Qr-qe]^n>>>1^-(n&1)&Vo,t+1}else{const n=e[t]&Wo|e[0]&qo;return e[t]=e[Qr-1]^n>>>1^-(n&1)&Vo,0}}function Hb(e){for(let t=0;t!==qe;++t)wi(e,t)}function Yb(e){const t=[e|0];for(let n=1;n!==qe;++n){const r=t[n-1]^t[n-1]>>>30;t.push(Math.imul(Db,r)+n|0)}return Hb(t),new Kb(t,0)}const Jb=[1667051007,2321340297,1548169110,304075285];var Xb=class bp{constructor(t,n,r,i){this.s01=t,this.s00=n,this.s11=r,this.s10=i}clone(){return new bp(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=Jb[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 fl(e){return new Xb(-1,~e,e|0,0)}const Zb=[3639956645,3750757012,1261568508,386426335];var Qb=class wp{constructor(t,n,r,i){this.s01=t,this.s00=n,this.s11=r,this.s10=i}clone(){return new wp(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=Zb[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 e0(e){return new Qb(-1,~e,e|0,0)}function t0(e,t){for(let n=0;n!==t;++n)e.next()}const hl=BigInt,n0=4294967296n;function r0(e,t,n){const r=n-t+1n;let i=n0,o=1;for(;i<r;)i<<=32n,++o;let s=dl(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=dl(o,e);return s%r+t}function dl(e,t){let n=hl(t.next()+2147483648);for(let r=1;r<e;++r){const i=t.next();n=(n<<32n)+hl(i+2147483648)}return n}function mr(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 i0(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 o0(e,t,n){const r=n[0]+1;for(t[0]=mr(e,r),t[1]=mr(e,4294967296);t[0]>=n[0]&&(t[0]!==n[0]||t[1]>=n[1]);)t[0]=mr(e,r),t[1]=mr(e,4294967296);return t}const s0=Number.MAX_SAFE_INTEGER,a0={sign:1,data:[0,0]},c0={sign:1,data:[0,0]},pl={sign:1,data:[0,0]},Go=[0,0];function u0(e,t,n,r){const i=r<=s0?zo(pl,r):i0(pl,zo(a0,n),zo(c0,t));return i.data[1]===4294967295?(i.data[0]+=1,i.data[1]=0):i.data[1]+=1,o0(e,Go,i.data),Go[0]*4294967296+Go[1]+t}function Ko(e,t,n){const r=n-t;return r<=4294967295?mr(e,r+1)+t:u0(e,t,n,r)}const ml=Symbol.for("fast-check/PreconditionFailure");var Zt=class extends Error{constructor(e=!1){super(),this.interruptExecution=e,this.footprint=ml}static isFailure(e){return e!=null&&e.footprint===ml}};function Sp(e){if(!e)throw new Zt}var l0=class{[Symbol.iterator](){return this}next(e){return{value:e,done:!0}}};const f0=new l0;function h0(){return f0}function*d0(e,t){for(const n of e)yield t(n)}function*p0(e,t){for(const n of e)yield*t(n)}function*m0(e,t){for(const n of e)t(n)&&(yield n)}function*g0(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*b0(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 w0=Symbol.iterator;var J=class Wt{static nil(){return new Wt(h0())}static of(...t){return new Wt(t[w0]())}constructor(t){this.g=t}next(){return this.g.next()}[Symbol.iterator](){return this.g}map(t){return new Wt(d0(this.g,t))}flatMap(t){return new Wt(p0(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(y0(this.g,t))}take(t){return new Wt(g0(this.g,t))}filter(t){return new Wt(m0(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(b0(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 xn(e){return mn(e)?e[Fe]():e}const S0=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&&S0(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_}},Se=class{filter(e){return new T0(this,e)}map(e,t){return new E0(this,e,t)}chain(e){return new x0(this,e)}},x0=class extends Se{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 xp(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:()=>()=>xp(e,t)[0]}),[r,n]}function gl(e,t){const[n,r]=xp(e,t);return new L(n,{originalValue:r,originalContext:e.context})}var E0=class extends Se{constructor(e,t,n){super(),this.arb=e,this.mapper=t,this.unmapper=n,this.bindValueMapper=r=>gl(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 gl(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}},T0=class extends Se{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 Ep(e){return typeof e=="object"&&e!==null&&"generate"in e&&"shrink"in e&&"canShrinkWithoutContext"in e}function Tp(e){if(!Ep(e))throw new Error("Unexpected value received: not an instance of Arbitrary")}const vp=Function.prototype.apply,Ho=Symbol("apply");function v0(e){try{return e.apply}catch{return}}function I0(e,t,n){const r=e;r[Ho]=vp;const i=r[Ho](t,n);return delete r[Ho],i}function Z(e,t,n){return v0(e)===vp?e.apply(t,n):I0(e,t,n)}const Ip=Array,F=BigInt,k0=BigInt64Array,A0=BigUint64Array,kp=Boolean,Ni=Date,U=Error,Ap=Float32Array,Cp=Float64Array,C0=Int8Array,_0=Int16Array,M0=Int32Array,Ht=Number,et=String,vt=Set,$0=Uint8Array,O0=Uint8ClampedArray,P0=Uint16Array,N0=Uint32Array,j0=encodeURIComponent,Yt=Map,Si=Symbol,yl=Array.prototype.forEach,bl=Array.prototype.indexOf,wl=Array.prototype.join,Sl=Array.prototype.map,xl=Array.prototype.flat,El=Array.prototype.filter,Tl=Array.prototype.push,vl=Array.prototype.pop,Il=Array.prototype.splice,kl=Array.prototype.slice,Al=Array.prototype.sort,Cl=Array.prototype.every;function F0(e){try{return e.forEach}catch{return}}function R0(e){try{return e.indexOf}catch{return}}function L0(e){try{return e.join}catch{return}}function D0(e){try{return e.map}catch{return}}function B0(e){try{return e.flat}catch{return}}function U0(e){try{return e.filter}catch{return}}function V0(e){try{return e.push}catch{return}}function q0(e){try{return e.pop}catch{return}}function W0(e){try{return e.splice}catch{return}}function z0(e){try{return e.slice}catch{return}}function G0(e){try{return e.sort}catch{return}}function K0(e){try{return e.every}catch{return}}function _p(e,t){return F0(e)===yl?e.forEach(t):Z(yl,e,[t])}function Tr(e,...t){return R0(e)===bl?e.indexOf(...t):Z(bl,e,t)}function xe(e,...t){return L0(e)===wl?e.join(...t):Z(wl,e,t)}function Q(e,t){return D0(e)===Sl?e.map(t):Z(Sl,e,[t])}function H0(e,t){return B0(e)===xl?e.flat(t):Z(xl,e,[t])}function Y0(e,t){return U0(e)===El?e.filter(t):Z(El,e,[t])}function N(e,...t){return V0(e)===Tl?e.push(...t):Z(Tl,e,t)}function Mp(e){return q0(e)===vl?e.pop():Z(vl,e,[])}function $p(e,...t){return W0(e)===Il?e.splice(...t):Z(Il,e,t)}function De(e,...t){return z0(e)===kl?e.slice(...t):Z(kl,e,t)}function Op(e,...t){return G0(e)===Al?e.sort(...t):Z(Al,e,t)}function Pp(e,...t){return K0(e)===Cl?e.every(...t):Z(Cl,e,t)}const _l=Date.prototype.getTime,Ml=Date.prototype.toISOString;function J0(e){try{return e.getTime}catch{return}}function X0(e){try{return e.toISOString}catch{return}}function ji(e){return J0(e)===_l?e.getTime():Z(_l,e,[])}function Z0(e){return X0(e)===Ml?e.toISOString():Z(Ml,e,[])}const $l=Set.prototype.add,Ol=Set.prototype.has;function Q0(e){try{return e.add}catch{return}}function ew(e){try{return e.has}catch{return}}function vr(e,t){return Q0(e)===$l?e.add(t):Z($l,e,[t])}function ln(e,t){return ew(e)===Ol?e.has(t):Z(Ol,e,[t])}const Pl=WeakMap.prototype.set,Nl=WeakMap.prototype.get;function tw(e){try{return e.set}catch{return}}function nw(e){try{return e.get}catch{return}}function rw(e,t,n){return tw(e)===Pl?e.set(t,n):Z(Pl,e,[t,n])}function iw(e,t){return nw(e)===Nl?e.get(t):Z(Nl,e,[t])}const jl=Map.prototype.set,Fl=Map.prototype.get,Rl=Map.prototype.has;function ow(e){try{return e.set}catch{return}}function sw(e){try{return e.get}catch{return}}function aw(e){try{return e.has}catch{return}}function Et(e,t,n){return ow(e)===jl?e.set(t,n):Z(jl,e,[t,n])}function dt(e,t){return sw(e)===Fl?e.get(t):Z(Fl,e,[t])}function cw(e,t){return aw(e)===Rl?e.has(t):Z(Rl,e,[t])}const Ll=String.prototype.split,Dl=String.prototype.startsWith,Bl=String.prototype.endsWith,Ul=String.prototype.substring,Vl=String.prototype.toLowerCase,ql=String.prototype.toUpperCase,Wl=String.prototype.padStart,zl=String.prototype.charCodeAt,Gl=String.prototype.normalize,Kl=String.prototype.replace;function uw(e){try{return e.split}catch{return}}function lw(e){try{return e.startsWith}catch{return}}function fw(e){try{return e.endsWith}catch{return}}function hw(e){try{return e.substring}catch{return}}function dw(e){try{return e.toLowerCase}catch{return}}function pw(e){try{return e.toUpperCase}catch{return}}function mw(e){try{return e.padStart}catch{return}}function gw(e){try{return e.charCodeAt}catch{return}}function yw(e){try{return e.normalize}catch{return}}function bw(e){try{return e.replace}catch{return}}function tt(e,...t){return uw(e)===Ll?e.split(...t):Z(Ll,e,t)}function ww(e,...t){return lw(e)===Dl?e.startsWith(...t):Z(Dl,e,t)}function Sw(e,...t){return fw(e)===Bl?e.endsWith(...t):Z(Bl,e,t)}function Te(e,...t){return hw(e)===Ul?e.substring(...t):Z(Ul,e,t)}function na(e){return dw(e)===Vl?e.toLowerCase():Z(Vl,e,[])}function ec(e){return pw(e)===ql?e.toUpperCase():Z(ql,e,[])}function xw(e,...t){return mw(e)===Wl?e.padStart(...t):Z(Wl,e,t)}function Gn(e,t){return gw(e)===zl?e.charCodeAt(t):Z(zl,e,[t])}function Ew(e,t){return yw(e)===Gl?e.normalize(t):Z(Gl,e,[t])}function Tw(e,t,n){return bw(e)===Kl?e.replace(t,n):Z(Kl,e,[t,n])}const Hl=Number.prototype.toString;function vw(e){try{return e.toString}catch{return}}function Ir(e,...t){return vw(e)===Hl?e.toString(...t):Z(Hl,e,t)}const Iw=Object.prototype.hasOwnProperty,kw=Object.prototype.toString;function Np(e,t){return Z(Iw,e,[t])}function ra(e){return Z(kw,e,[])}const Aw=Error.prototype.toString;function Cw(e){return Z(Aw,e,[])}var _w=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 _w(e)}const jp=Array.isArray,Mw=Object.defineProperty;function tc(e,t,n){return Mw(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 tc(r,t,n),r}})}function Fp(e,t,n){const r=[],i=jp(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(xn(t[f]),i[f]);h.hasToBeCloned&&(c=!0,l[f]=h),N(a,h.value),N(u,h.context)}return c&&tc(a,u,l),new L(a,u)})));return J.nil().join(...r)}var $w=class extends Se{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&&tc(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 Fp(this.arbs,e,t)}};function H(...e){return new $w(e)}const Ow=Math.log;function Rp(e){return 2+~~(Ow(e+1)*.4342944819032518)}let nc={};function Lp(e){nc=e}function yt(){return nc}function Dp(){nc={}}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 Yl=()=>{};var Pw=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||Yl,this.afterEachHook=r||o||Yl}isAsync(){return!0}generate(e,t){return Kn(this.arb.generate(e,t!==void 0?Rp(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}},Bp=class extends Se{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 rc(...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 _p(t,Tp),new Pw(H(...Q(t,r=>new Bp(r))),r=>n(...r))}const Jl=()=>{};var Up=class{constructor(e,t){this.arb=e,this.predicate=t;const{beforeEach:n=Jl,afterEach:r=Jl,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?Rp(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 Rr(...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 _p(t,Tp),new Up(H(...Q(t,r=>new Bp(r))),r=>n(...r))}let Vp=(function(e){return e[e.None=0]="None",e[e.Verbose=1]="Verbose",e[e.VeryVerbose=2]="VeryVerbose",e})({});function ia(e){return"unsafeNext"in e?e.unsafeJump===void 0?{clone:()=>ia(e),next:()=>e.unsafeNext(),getState:()=>e.getState()}:{clone:()=>ia(e),next:()=>e.unsafeNext(),jump:()=>e.unsafeJump(),getState:()=>e.getState()}:e}function qp(e){return"jump"in e&&typeof e.jump=="function"?e:{clone:()=>qp(e),next:()=>e.next(),jump:()=>t0(e,42),getState:()=>e.getState()}}function ro(e){return qp(ia(e))}const Nw=Date.now,jw=Math.min,Fw=Math.random;var Rw=class{constructor(e){const t=e||{};this.seed=Lw(t),this.randomType=Dw(t),this.numRuns=Bw(t),this.verbose=Uw(t),this.maxSkipsPerRun=t.maxSkipsPerRun!==void 0?t.maxSkipsPerRun:100,this.timeout=Jo(t.timeout),this.skipAllAfterTimeLimit=Jo(t.skipAllAfterTimeLimit),this.interruptAfterTimeLimit=Jo(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 Yo(e){return t=>ro(e(t))}function Lw(e){if(e.seed===void 0)return Nw()^Fw()*4294967296;const t=e.seed|0;return e.seed===t?t:t^(e.seed-t)*4294967296}function Dw(e){if(e.randomType===void 0)return fl;if(typeof e.randomType=="string")switch(e.randomType){case"mersenne":return Yo(Yb);case"congruential":case"congruential32":return Yo(Lb);case"xorshift128plus":return fl;case"xoroshiro128plus":return e0;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===ro(t)?e.randomType:Yo(e.randomType)}function Bw(e){return e.numRuns!==void 0?e.numRuns:e.num_runs!==void 0?e.num_runs:100}function Uw(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 Jo(e){if(e!==void 0)return jw(e,2147483647)}function ic(e){return new Rw(e)}function Vw(e,t,n){let r=null;return{clear:()=>n(r),promise:new Promise(i=>{r=t(()=>{i(new Zt(!0))},e)})}}var Xl=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=Vw(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 Ww=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())}},Wp=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 Zl=Array.from,Ql=typeof Buffer<"u"?Buffer.isBuffer:void 0,Nn=JSON.stringify,ef=Number.isNaN,zw=Object.keys,Gw=Object.getOwnPropertySymbols,Kw=Object.getOwnPropertyDescriptor,tf=Object.getPrototypeOf,nf=Number.NEGATIVE_INFINITY,Hw=Number.POSITIVE_INFINITY,bt=Symbol.for("fast-check/toStringMethod");function io(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 oo(e){return e!==null&&(typeof e=="object"||typeof e=="function")&&Lt in e&&typeof e[Lt]=="function"}const Yw=/^Symbol\((.*)\)$/;function Jw(e){if(e.description!==void 0)return e.description;const t=Yw.exec(et(e));return t&&t[1].length?t[1]:null}function rf(e){switch(e){case 0:return 1/e===nf?"-0":"0";case nf:return"Number.NEGATIVE_INFINITY";case Hw:return"Number.POSITIVE_INFINITY";default:return e===e?et(e):"Number.NaN"}}function Xw(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"&&Tr(t,e)!==-1)return"[cyclic]";if(oo(e)){const i=n(e);if(i.state==="fulfilled")return i.value}if(io(e))try{return e[bt]()}catch{}switch(ra(e)){case"[object Array]":{const i=e;if(i.length>=50&&Xw(i)){const s=[];for(const c in i)ef(Number(c))||N(s,`${c}:${lt(i[c],r,n)}`);return s.length!==0?`Object.assign(Array(${i.length}),{${xe(s,",")}})`:`Array(${i.length})`}const o=xe(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 ef(ji(i))?"new Date(NaN)":`new Date(${Nn(Z0(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"?rf(e):`new Number(${rf(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"{"+xe([...tf(e)===null?["__proto__:null"]:[],...Q(zw(e),i),...Q(Y0(Gw(e),o=>{const s=Kw(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=Jw(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 Ql=="function"&&Ql(e))return`Buffer.from(${e.buffer.detached?"/*detached ArrayBuffer*/":lt(Zl(e.values()),r,n)})`;const i=tf(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(Zl(c),r,n)})`}break}}try{return e.toString()}catch{return ra(e)}}function Ae(e){return lt(e,[],()=>({state:"unknown",value:void 0}))}function zp(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 so(e){return Promise.resolve(zp(e))}function of(e){return e===null?new Zt:e}function Zw(...e){return e[1]?e[0].then(of):of(e[0])}function Qw(e,t){return Zw(e,t)}var sf=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=Ae(e);if(this.coveredCases.has(t)){const r=this.coveredCases.get(t);return this.skipRuns?Qw(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 af=Date.now,Xo=setTimeout,Zo=clearTimeout;function e2(e,t){let n=e;return e.isAsync()&&t.timeout!==void 0&&(n=new Ww(n,t.timeout,Xo,Zo)),t.unbiased&&(n=new Wp(n)),t.skipAllAfterTimeLimit!==void 0&&(n=new Xl(n,af,t.skipAllAfterTimeLimit,!1,Xo,Zo)),t.interruptAfterTimeLimit!==void 0&&(n=new Xl(n,af,t.interruptAfterTimeLimit,!0,Xo,Zo)),t.skipEqualValues&&(n=new sf(n,!0)),t.ignoreEqualValues&&(n=new sf(n,!1)),n}let Gp=(function(e){return e[e.Success=0]="Success",e[e.Skipped=-1]="Skipped",e[e.Failure=1]="Failure",e})({});var t2=class Kp{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:Kp.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()}}},Hp=class{constructor(e,t,n,r){this.sourceValues=e,this.shrink=t,this.runExecution=new t2(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_)}},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 r2=-2147483648,i2=2147483647,o2=Math.pow(2,27),s2=Math.pow(2,-53);var ao=class Yp{constructor(t){this.internalRng=ro(t.clone())}clone(){return new Yp(this.internalRng)}next(t){return Ko(this.internalRng,0,(1<<t)-1)}nextBoolean(){return Ko(this.internalRng,0,1)===1}nextInt(t,n){return Ko(this.internalRng,t===void 0?r2:t,n===void 0?i2:n)}nextBigInt(t,n){return r0(this.internalRng,t,n)}nextDouble(){const t=this.next(26),n=this.next(27);return(t*o2+n)*s2}getState(){if("getState"in this.internalRng&&typeof this.internalRng.getState=="function")return this.internalRng.getState()}};function a2(e,t,n){return t.jump(),e.generate(new ao(t),n)}function*Jp(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 a2(e,o,i)}function c2(e,t,n){return()=>e.generate(new ao(t),n)}function*Xp(e,t,n,r){yield*Q(r,s=>()=>new L(s,void 0));let i=0;const o=ro(n(t));for(;;)o.jump(),yield c2(e,o,i++)}function cf(e){return e()}function Zp(e,t,n){const r=t,i=e.split(":").map(s=>+s);if(i.length===0)return r.map(cf);if(!i.every(s=>!Number.isNaN(s)))throw new Error(`Unable to replay, got invalid path=${e}`);let o=r.drop(i[0]).map(cf);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 l2(e){return e.length===1?`Hint: ${e[0]}`:e.map((t,n)=>`Hint (${n+1}): ${t}`).join(`
|
|
2
|
-
`)}function
|
|
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 S2(e,t){return`Encountered failures were:
|
|
3
3
|
- ${e.map(t).join(`
|
|
4
|
-
- `)}`}function
|
|
4
|
+
- `)}`}function cc(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 E2(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=cc(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 T2(e){if(e instanceof U&&e.stack!==void 0)return e.stack;try{return et(e)}catch{}if(e instanceof U)try{return Lw(e)}catch{}if(e!==null&&typeof e=="object")try{return oa(e)}catch{}return"Failed to serialize errorInstance"}function v2(e,t){const n=e.runConfiguration.includeErrorInReport?`
|
|
11
|
+
Got ${Pw(T2(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=cc(e.executionSummary,t):e.verbose===1?i=S2(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 A2(e,t){const n=`Property interrupted after ${e.numRuns} tests
|
|
15
|
+
{ seed: ${e.seed} }`;let r=null;const i=[];return e.verbose>=2?r=cc(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 aa(e,t){if(!e.failed)return;const{message:n,details:r,hints:i}=e.counterexamplePath===null?e.interrupted?A2(e,t):E2(e,t):v2(e,t);let o=n;return r!==null&&(o+=`
|
|
16
16
|
|
|
17
17
|
${r}`),i.length>0&&(o+=`
|
|
18
18
|
|
|
19
|
-
${l2(i)}`),o}function sc(e){return oa(e,Ae)}async function ac(e){const t=[];function n(s){const c=zp(s);return typeof c=="string"?c:(t.push(Promise.all([s,c])),"…")}const r=oa(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:Ae(s)}return oa(e,o)}function Qp(e,t){if(t.runConfiguration.includeErrorInReport)throw new U(e);const n=new U(e,{cause:t.errorInstance});return"cause"in n||u2(n,{cause:t.errorInstance}),n}function g2(e){if(e.failed)throw Qp(sc(e),e)}async function y2(e){if(e.failed)throw Qp(await ac(e),e)}function b2(e){return e.runConfiguration.asyncReporter?e.runConfiguration.asyncReporter(e):e.runConfiguration.reporter?e.runConfiguration.reporter(e):g2(e)}async function w2(e){return e.runConfiguration.asyncReporter?e.runConfiguration.asyncReporter(e):e.runConfiguration.reporter?e.runConfiguration.reporter(e):y2(e)}function S2(e,t,n,r,i){const o=new Hp(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 x2(e,t,n,r,i){const o=new Hp(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 co(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=ic({...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=e2(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 n2(n.path.length===0?Jp(r,n.seed,n.randomType,n.examples):Zp(n.path,Jt(Xp(r,n.seed,n.randomType,n.examples)),s),i,o),a=n.endOnFailure?J.nil:s;return r.isAsync()?x2(r,a,c,n.verbose,n.markInterruptAsFailure).then(u=>u.toRunDetails(n.seed,n.path,o,n)):S2(r,a,c,n.verbose,n.markInterruptAsFailure).toRunDetails(n.seed,n.path,o,n)}function Lr(e,t){const n=co(e,t);if(e.isAsync())return n.then(w2);b2(n)}function E2(e,t){const n=Object.prototype.hasOwnProperty.call(e,"isAsync")?e:new Up(e,()=>!0);return t.unbiased===!0?new Wp(n):n}function em(e,t){const n=ic(typeof t=="number"?{...yt(),numRuns:t}:{...yt(),...t}),r=E2(e,n),i=r.shrink.bind(r);return(n.path.length===0?Jt(Jp(r,n.seed,n.randomType,n.examples)):Zp(n.path,Jt(Xp(r,n.seed,n.randomType,n.examples)),i)).take(n.numRuns).map(o=>o.value_)}function tm(e,t){return[...em(e,t)]}function T2(e){return(Math.round(e*100)/100).toFixed(2)}function nm(e,t,n){const r=ic(typeof n=="number"?{...yt(),numRuns:n}:{...yt(),...n}),i={};for(const a of em(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],`${T2(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 v2=Object.assign;function sa(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(v2(a,{values(){return Q(s.history,u=>u.value)},[Fe](){return sa(e,t,n,r).value},[bt](){return Ae(Q(s.history,u=>u.value))}}),s)}const Qo=Array.isArray,uf=Object.keys,I2=Object.is;function k2(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 rm(e,t){if(e!==null&&typeof e=="object"&&t!==null&&typeof t=="object"){if(Qo(e)){if(!Qo(t)||e.length!==t.length)return!1}else if(Qo(t))return!1;if(uf(e).length!==uf(t).length)return!1;for(const n in e)if(!(n in t)||!rm(e[n],t[n]))return!1;return!0}else return I2(e,t)}var A2=class extends Se{constructor(...e){super(...e),this.arbitraryCache=k2(rm)}generate(e,t){return sa(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 Fp(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 sa(r,i,c,this.arbitraryCache)})}};function im(){return new A2}const C2=Math.floor,lf=Math.log;function _2(e){return C2(lf(e)/lf(2))}function M2(e){return e===F(0)?F(0):F(et(e).length)}function om(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 $2=Math.ceil,O2=Math.floor;function ff(e){return O2(e/2)}function hf(e){return $2(e/2)}function df(e,t,n){const r=e-t;function*i(){let s=n?void 0:t;const c=n?r:ff(r);for(let a=c;a>0;a=ff(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:hf(r);for(let a=c;a<0;a=hf(a)){const u=a===r?t:e-a;yield new L(u,s),s=u}}return r>0?Jt(i()):Jt(o())}const pf=Math.sign,P2=Number.isInteger,N2=Object.is;var Hn=class sm extends Se{constructor(t,n){super(),this.min=t,this.max=n,this.ranges=om(t,n,_2)}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"&&P2(t)&&!N2(t,-0)&&this.min<=t&&t<=this.max}shrink(t,n){return sm.isValidContext(t,n)?this.isLastChanceTry(t,n)?J.of(new L(n,void 0)):df(t,n,!1):df(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&&pf(t)!==pf(n))throw new Error("Invalid context value passed to IntegerArbitrary (#2)");return!0}};const mf=Number.isInteger;function j2(e){return{min:e.min!==void 0?e.min:-2147483648,max:e.max!==void 0?e.max:2147483647}}function W(e={}){const t=j2(e);if(t.min>t.max)throw new Error("fc.integer maximum value should be equal or greater than the minimum one");if(!mf(t.min))throw new Error("fc.integer minimum value should be an integer");if(!mf(t.max))throw new Error("fc.integer maximum value should be an integer");return new Hn(t.min,t.max)}const gf=new Map;function uo(e){if(e===void 0)return{depth:0};if(typeof e!="string")return e;const t=dt(gf,e);if(t!==void 0)return t;const n={depth:0};return Et(gf,e,n),n}function lo(){return{depth:0}}var F2=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 R2=Math.min,L2=Math.max;var D2=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=R2(t,n),this.lastIndexInSlice=L2(t,n),new L(e[this.nextIndexInSlice++],void 0)}};function yf(e,t,n,r){return r===void 0||n.length===0||t.nextInt(1,r)!==1?new F2(e,t,r):new D2(e,t,n,r)}const B2=Math.floor,bf=Math.log,U2=Array.isArray;function V2(e,t){return e===t?e:e+B2(bf(t-e)/bf(2))}var am=class cm extends Se{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=uo(o),this.cachedBiasedMaxLength=V2(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=yf(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=yf(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&&cm.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(!U2(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(xn(u),n.itemsContexts[l])),a=Q(De(t,o+1),(u,l)=>new L(xn(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(xn(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(xn(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,W2=Math.min,_n=2147483647,jn=["xsmall","small","medium","large","xlarge"],z2=["-4","-3","-2","-1","=","+1","+2","+3","+4"],cc="small";function G2(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 Dr(e,t){const n=Tr(z2,e);if(n===-1)return e;const r=Tr(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 Ar(e,t,n,r){const{baseSize:i=cc,defaultSizeToMaxWhenMaxSpecified:o}=yt()||{},s=e!==void 0?e:r&&o?"max":i;if(s==="max")return n;const c=Dr(s,i);return W2(G2(t,c),n)}function K2(e,t){if(typeof e=="number")return 1/e;const{baseSize:n=cc,defaultSizeToMaxWhenMaxSpecified:r}=yt()||{},i=e!==void 0?e:t&&r?"max":n;if(i==="max")return 0;switch(Dr(i,n)){case"xsmall":return 1;case"small":return .5;case"medium":return .25;case"large":return .125;case"xlarge":return .0625}}function uc(e){const{baseSize:t=cc}=yt()||{};return e===void 0?t:Dr(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 am(e,r,Ar(n,r,s,i!==void 0),s,o,void 0,t.experimentalCustomSlices||[])}function ei(e){return e/F(2)}function wf(e,t,n){const r=e-t;function*i(){let s=n?void 0:t;const c=n?r:ei(r);for(let a=c;a>0;a=ei(a)){const u=e-a;yield new L(u,s),s=u}}function*o(){let s=n?void 0:t;const c=n?r:ei(r);for(let a=c;a<0;a=ei(a)){const u=e-a;yield new L(u,s),s=u}}return r>0?Jt(i()):Jt(o())}var H2=class um extends Se{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=om(this.min,this.max,M2);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 um.isValidContext(t,n)?this.isLastChanceTry(t,n)?J.of(new L(n,void 0)):wf(t,n,!1):wf(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 Y2(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 J2(e){return e[0]===void 0?{}:e[1]===void 0?e[0]:{min:e[0],max:e[1]}}function Xt(...e){const t=Y2(J2(e));if(t.min>t.max)throw new Error("fc.bigInt expects max to be greater than or equal to min");return new H2(t.min,t.max)}const X2=Object.getPrototypeOf;var cr=class extends Se{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 Cr(e){return X2(e)===cr.prototype&&e.generate===cr.prototype.generate&&e.canShrinkWithoutContext===cr.prototype.canShrinkWithoutContext&&e.shrink===cr.prototype.shrink?e:new cr(e)}function Z2(e){return e===1}function Q2(e){if(typeof e!="boolean")throw new Error("Unsupported input type");return e===!0?1:0}function Ft(){return Cr(W({min:0,max:1}).map(Z2,Q2))}const yr=Object.is;var eS=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||yr(i,-0),n=n||yr(i,0)}this.hasMinusZero=t,this.hasPlusZero=n}has(e){return e===0?yr(e,0)?this.hasPlusZero:this.hasMinusZero:ln(this.fastValues,e)}},lm=class extends Se{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?yr(this.values[0],e):(this.fastValues===void 0&&(this.fastValues=new eS(this.values)),this.fastValues.has(e))}shrink(e,t){return t===0||yr(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 lm(e)}function fm(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 lm([e])}var tS=class hm{constructor(){this.receivedLogs=[]}log(t){this.receivedLogs.push(t)}size(){return this.receivedLogs.length}toString(){return JSON.stringify({logs:this.receivedLogs})}[Fe](){return new hm}};function dm(){return we(new tS)}const nS=NaN,rS=Number.isNaN;function pm(e){return new Ni(e)}function mm(e){if(!(e instanceof Ni)||e.constructor!==Ni)throw new U("Not a valid value for date unmapper");return ji(e)}function iS(e){return t=>t===e?new Ni(nS):pm(t)}function oS(e){return t=>{const n=mm(t);return rS(n)?e:n}}const Sf=Number.isNaN;function fo(e={}){const t=e.min!==void 0?ji(e.min):-864e13,n=e.max!==void 0?ji(e.max):864e13,r=e.noInvalidDate;if(Sf(t))throw new Error("fc.date min must be valid instance of Date");if(Sf(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(pm,mm);const i=n+1;return W({min:t,max:n+1}).map(iS(i),oS(i))}var sS=class extends Se{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 lc(e,t){return new sS(e,t)}const aS=Symbol.iterator,cS=Array.isArray,uS=Object.is;var lS=class gm extends Se{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(!cS(t)||t.length!==this.numValues)return!1;if(t.length===0)return!0;for(let n=1;n<t.length;++n)if(!uS(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])[aS]());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&&gm.makeItCloneable(r,t),new L(r,i)}};function ym(e,t){return new lS(e,t)}var xf=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 fS=Number.isNaN;var hS=class{constructor(e){this.selector=e,this.selectedItemsExceptNaN=new vt,this.data=[]}tryAdd(e){const t=this.selector(e);if(fS(t))return N(this.data,e),!0;const n=this.selectedItemsExceptNaN.size;return vr(this.selectedItemsExceptNaN,t),n!==this.selectedItemsExceptNaN.size?(N(this.data,e),!0):!1}size(){return this.data.length}getData(){return this.data}};const dS=Object.is;var pS=class{constructor(e){this.selector=e,this.selectedItemsExceptMinusZero=new vt,this.data=[],this.hasMinusZero=!1}tryAdd(e){const t=this.selector(e);if(dS(t,-0))return this.hasMinusZero?!1:(N(this.data,e),this.hasMinusZero=!0,!0);const n=this.selectedItemsExceptMinusZero.size;return vr(this.selectedItemsExceptMinusZero,t),n!==this.selectedItemsExceptMinusZero.size?(N(this.data,e),!0):!1}size(){return this.data.length}getData(){return this.data}},mS=class{constructor(e){this.selector=e,this.selectedItems=new vt,this.data=[]}tryAdd(e){const t=this.selector(e),n=this.selectedItems.size;return vr(this.selectedItems,t),n!==this.selectedItems.size?(N(this.data,e),!0):!1}size(){return this.data.length}getData(){return this.data}};function gS(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 xf(a)}const r=e.comparator,i=e.selector,o=c=>i(c.value_),s=(c,a)=>r(o(c),o(a));return()=>new xf(s)}const t=e.selector||(r=>r),n=r=>t(r.value_);switch(e.comparator){case"IsStrictlyEqual":return()=>new hS(n);case"SameValueZero":return()=>new mS(n);case"SameValue":case void 0:return()=>new pS(n)}}function Qt(e,t={}){const n=t.minLength!==void 0?t.minLength:0,r=t.maxLength!==void 0?t.maxLength:_n,i=Ar(t.size,n,r,t.maxLength!==void 0),o=t.depthIdentifier,s=new am(e,n,i,r,o,gS(t),[]);return n===0?s:s.filter(c=>c.length>=n)}const yS=Object.create,bS=Object.defineProperty,wS=Object.getOwnPropertyDescriptor,Ef=Object.getPrototypeOf,SS=Object.prototype,xS=Reflect.ownKeys;function ES(e){const t=e[1]?yS(null):{},n=e[0];for(let r=0;r!==n.length;++r){const i=n[r][0];i==="__proto__"?bS(t,i,{enumerable:!0,configurable:!0,writable:!0,value:n[r][1]}):t[i]=n[r][1]}return t}function TS(e){return e!==void 0&&!!e.configurable&&!!e.enumerable&&!!e.writable&&e.get===void 0&&e.set===void 0}function vS(e){if(typeof e!="object"||e===null)throw new U("Incompatible instance received: should be a non-null object");const t=Ef(e)===null,n=Ef(e)===SS;if(!t&&!n)throw new U("Incompatible instance received: should be of exact type Object");const r=Q(xS(e),i=>[i,wS(e,i)]);if(!Pp(r,([,i])=>TS(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 IS(e){return e[0]}function ho(e,t,n={}){const r=!!n.noNullPrototype;return H(Qt(H(e,t),{minLength:n.minKeys,maxLength:n.maxKeys,size:n.size,selector:IS,depthIdentifier:n.depthIdentifier}),r?we(!1):Ft()).map(ES,vS)}const kS=Number.POSITIVE_INFINITY,AS=Number.MAX_SAFE_INTEGER,CS=Number.isInteger,_S=Math.floor,MS=Math.pow,$S=Math.min;var aa=class bm extends Se{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,!CS(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:K2(n.depthSize,n.maxDepth!==void 0),maxDepth:n.maxDepth!==void 0?n.maxDepth:kS,withCrossShrink:!!n.withCrossShrink};return new bm(t,o,uo(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=_S(MS(1+t,this.context.depth))-1;return-$S(this.totalWeight*n,AS)||0}};function OS(e){return e!=null&&typeof e=="object"&&!("generate"in e)&&!("arbitrary"in e)&&!("weight"in e)}function Tf(e){return Ep(e)?{arbitrary:e,weight:1}:e}function Ce(...e){const t=e[0];if(OS(t)){const r=Q(De(e,1),Tf);return aa.from(r,t,"fc.oneof")}const n=Q(e,Tf);return aa.from(n,{},"fc.oneof")}const PS=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(!PS(t))throw new Error("fc.nat maximum value should be an integer");return new Hn(0,t)}const NS=Object.is;function jS(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 FS(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 RS(e){const t=jS(e);return function(r){const i=FS(t,r);return i.entry.build(r-i.from)}}function LS(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 DS(e){let t=null;return function(r){t===null&&(t=LS(e));const i=NS(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 BS(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 Mn(...e){return Kt({max:BS(e)-1}).map(RS(e),DS(e))}function wm(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=Mp(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 US(e){return xe(e,"")}function Sm(e){return e.minLength!==void 0?e.minLength:0}function xm(e){return e.maxLength!==void 0?e.maxLength:_n}function VS(e,t){return Sm(t)<=e.length&&e.length<=xm(t)}function qS(e,t){return function(r){if(typeof r!="string")throw new U("Unsupported value");const i=wm(e,r,Sm(t),xm(t));if(i===void 0)throw new U("Unable to unmap received string");return i}}const Em=["__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__","__proto__","constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf","apply","arguments","bind","call","caller","length","name","prototype","key","ref"];function WS(e,t,n){let r;try{r=n(e)}catch{return}for(const i of r)if(!t.canShrinkWithoutContext(i))return;return r}function zS(e,t){const n=[];for(const r of Em){const i=WS(r,e,t);i!==void 0&&N(n,i)}return n}const vf=new WeakMap;function GS(e){const t=[];for(const n of Em){const r=wm(e,n,0,_n);r!==void 0&&N(t,r)}return t}function KS(e,t){let n=iw(vf,e);n===void 0&&(n=GS(e),rw(vf,e,n));const r=[];for(const i of n)VS(i,t)&&N(r,i);return r}const HS=[[0,127]],YS=[[0,55295],[57344,1114111]],JS=[[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]],XS=[[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]],If=String.fromCodePoint,ZS=Math.min,QS=Math.max;function ca(e){if(e.length===1){const n=If(e[0]);return{num:1,build:()=>n}}const t=e[0];return{num:e[1]-e[0]+1,build:n=>If(t+n)}}function kf(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=QS(s,u);const h=ZS(c,l);if(n.length>=1){const d=n[n.length-1];(d.length===1?d[0]:d[1])+1===f&&(f=d[0],Mp(n))}N(n,f===h?[f]:[f,h]),c<=h&&(r+=1),l<=h&&(i+=1)}}return n}const Af=Object.create(null);function ex(e){switch(e){case"full":return YS;case"ascii":return HS}}function tx(e,t){const n=`${e}:${t}`,r=Af[n];if(r!==void 0)return r;const i=ex(t),o=e==="binary"?i:kf(i,JS),s=[];for(const a of o)N(s,ca(a));if(e==="grapheme"){const a=kf(i,XS);for(const u of a){const l=ca(u);N(s,{num:l.num,build:f=>Ew(l.build(f),"NFD")})}}const c=Mn(...s);return Af[n]=c,c}function ur(e,t){return tx(e,t)}function nx(e){if(typeof e.unit=="object")return e.unit;switch(e.unit){case"grapheme":return ur("grapheme","full");case"grapheme-composite":return ur("composite","full");case"grapheme-ascii":case void 0:return ur("grapheme","ascii");case"binary":return ur("binary","full");case"binary-ascii":return ur("binary","ascii")}}function be(e={}){const t=nx(e),n=qS(t,e),r=KS(t,e);return ae(t,{...e,experimentalCustomSlices:r}).map(US,n)}const Tm=Map,fc=String.fromCharCode,hc={num:26,build:e=>fc(e+97)},rx={num:26,build:e=>fc(e+65)},vm={num:10,build:e=>fc(e+48)};function ix(e){const t=j0(e);return e!==t?t:`%${Ir(Gn(e,0),16)}`}function ox(e){if(typeof e!="string")throw new Error("Unsupported");return decodeURIComponent(e)}const sx=()=>be({unit:"binary",minLength:1,maxLength:1}).map(ix,ox);let es;function ax(){return es===void 0&&(es=Mn(hc)),es}let ti;function ua(e){ti===void 0&&(ti=new Tm);let t=dt(ti,e);return t===void 0&&(t=Mn(hc,vm,{num:e.length,build:n=>e[n]}),Et(ti,e,t)),t}function cx(e){return Mn(hc,rx,vm,{num:e.length,build:t=>e[t]})}let ni;function dc(e){ni===void 0&&(ni=new Tm);let t=dt(ni,e);return t===void 0&&(t=Ce({weight:10,arbitrary:cx(e)},{weight:1,arbitrary:sx()}),Et(ni,e,t)),t}function It(e,t={}){const n=t.freq===void 0?6:t.freq,r=Np(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 aa.from(i,o,"fc.option")}function ux(e){return e.length>63?!1:e.length<4||e[0]!=="x"||e[1]!=="n"||e[2]!=="-"||e[3]!=="-"}const Im=Symbol("adapted-value");function lx(e,t){const n=t(e.value_);return n.adapted?new L(n.value,Im):e}var fx=class extends Se{constructor(e,t){super(),this.sourceArb=e,this.adapter=t,this.adaptValue=n=>lx(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===Im?this.sourceArb.canShrinkWithoutContext(e)?this.sourceArb.shrink(e,void 0).map(this.adaptValue):J.nil():this.sourceArb.shrink(e,t).map(this.adaptValue)}};function km(e,t){return new fx(e,t)}function hx([e,t]){return t===null?e:`${e}${t[0]}${t[1]}`}function dx(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 px(e){const t=ua("");return H(t,It(H(be({unit:ua("-"),size:e,maxLength:61}),t))).map(hx,dx).filter(ux)}function mx(e){return`${xe(e[0],".")}.${e[1]}`}function gx(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 yx(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 po(e={}){const t=uc(e.size),n=Dr("-1",t),r=be({unit:ax(),minLength:2,maxLength:63,size:n});return km(H(ae(px(t),{size:n,minLength:1,maxLength:127}),r),yx).map(mx,gx)}function bx(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 wx(e){return xe(e,".")}function Sx(e){if(typeof e!="string")throw new Error("Unsupported");return tt(e,".")}function xx(e){return`${e[0]}@${e[1]}`}function Ex(e){if(typeof e!="string")throw new Error("Unsupported");return tt(e,"@",2)}function pc(e={}){return H(km(ae(be({unit:ua("!#$%&'*+-/=?^_`{|}~"),minLength:1,maxLength:64,size:e.size}),{minLength:1,maxLength:32,size:e.size}),bx).map(wx,Sx),po({size:e.size})).map(xx,Ex)}const Tx=Ht.NEGATIVE_INFINITY,la=Ht.POSITIVE_INFINITY,Am=Ht.EPSILON,mc=F(2146435072)*F(4294967296),vx=-mc-F(1),Cf=4503599627370496,Ix=F(0xfffffffffffff),_f=F("9007199254740992"),fa=new Float64Array(1),Mf=new Uint32Array(fa.buffer,fa.byteOffset);function kx(e){return fa[0]=e,[Mf[1],Mf[0]]}function Ax(e){const{0:t,1:n}=kx(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*Am,c*=r===0?1:-1,{exponent:s,significand:c}}function $f(e,t){return e===-1022?F(t*Cf):F((t-1)*Cf)+(F(e+1023)<<F(52))}function gc(e){if(e===la)return mc;if(e===Tx)return vx;const t=Ax(e),n=t.exponent,r=t.significand;return e>0||e===0&&1/e===la?$f(n,r):-$f(n,-r)-F(1)}function ha(e){if(e<0)return-ha(-e-F(1));if(e===mc)return la;if(e<_f)return Ht(e)*2**-1074;const t=e-_f,n=-1021+Ht(t>>F(52));return(1+Ht(t&Ix)*Am)*2**n}const Of=Number.isInteger,Pf=Object.is,ts=Number.NEGATIVE_INFINITY,ns=Number.POSITIVE_INFINITY;function Cm(e,t,n,r){const{noDefaultInfinity:i=!1,minExcluded:o=!1,maxExcluded:s=!1,min:c=i?-t:ts,max:a=i?t:ns}=e,u=o?c<-n?-r:Math.max(c,-n):c===ts?Math.max(c,-r):Math.max(c,-n),l=s?a>n?r:Math.min(a,n):a===ns?Math.min(a,r):Math.min(a,n);return{noDefaultInfinity:!1,minExcluded:o||(c!==ts||o)&&Of(u),maxExcluded:s||(a!==ns||s)&&Of(l),min:Pf(u,-0)?0:u,max:Pf(l,0)?-0:l,noNaN:e.noNaN||!1}}const _m=Number.NEGATIVE_INFINITY,Mm=Number.POSITIVE_INFINITY,Cx=Number.MAX_VALUE,_x=45035996273704955e-1,$m=4503599627370496;function Mx(e){return Cm(e,Cx,_x,$m)}function $x(e){return e===4503599627370496?Mm:e===-4503599627370496?_m:e}function Ox(e){if(typeof e!="number")throw new Error("Unsupported type");return e===Mm?$m:e===_m?-4503599627370496:e}const Px=Number.isInteger,Om=Number.isNaN,Nx=Number.NEGATIVE_INFINITY,jx=Number.POSITIVE_INFINITY,Nf=Number.MAX_VALUE,Fx=NaN;function jf(e,t){if(Om(e))throw new Error("fc.double constraints."+t+" must be a 64-bit float");return gc(e)}function Rx(e){if(typeof e!="number")throw new Error("Unsupported type");return gc(e)}function Lx(e){return!Px(e)}function Ff(e){const{noDefaultInfinity:t=!1,noNaN:n=!1,minExcluded:r=!1,maxExcluded:i=!1,min:o=t?-Nf:Nx,max:s=t?Nf:jx}=e,c=jf(o,"min"),a=r?c+F(1):c,u=jf(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(ha,Rx);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?Fx:ha(m),m=>{if(typeof m!="number")throw new Error("Unsupported type");return Om(m)?l!==d?d:h:gc(m)})}function Br(e={}){return e.noInteger?Ff(Mx(e)).map($x,Ox).filter(Lx):Ff(e)}const Dx=Number.NEGATIVE_INFINITY,da=Number.POSITIVE_INFINITY,Bx=Math.imul,pa=2**127*(1+(2**23-1)/2**23),Pm=2139095040,Ux=-2139095041,ma=new Float32Array(1),Vx=new Uint32Array(ma.buffer,ma.byteOffset);function qx(e){return ma[0]=e,Vx[0]}function Wx(e){const t=qx(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 Rf(e,t){return e===-126?t*8388608:Bx(e+127,8388608)+(t-1)*8388608}function yc(e){if(e===da)return Pm;if(e===Dx)return Ux;const t=Wx(e),n=t.exponent,r=t.significand;return e>0||e===0&&1/e===da?Rf(n,r):-Rf(n,-r)-1}function ga(e){if(e<0)return-ga(-e-1);if(e===Pm)return da;if(e<16777216)return e*2**-149;const t=e-16777216,n=-125+(t>>23);return(1+(t&8388607)/8388608)*2**n}const Nm=Number.NEGATIVE_INFINITY,jm=Number.POSITIVE_INFINITY,zx=pa,Gx=83886075e-1,Fm=8388608;function Kx(e){return Cm(e,zx,Gx,Fm)}function Hx(e){return e===8388608?jm:e===-8388608?Nm:e}function Yx(e){if(typeof e!="number")throw new Error("Unsupported type");return e===jm?Fm:e===Nm?-8388608:e}const Jx=Number.isInteger,Rm=Number.isNaN,Xx=Math.fround,Zx=Number.NEGATIVE_INFINITY,Qx=Number.POSITIVE_INFINITY,eE=NaN;function Lf(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(Rm(e)||Xx(e)!==e)throw new Error(n);return yc(e)}function tE(e){if(typeof e!="number")throw new Error("Unsupported type");return yc(e)}function nE(e){return!Jx(e)}function Df(e){const{noDefaultInfinity:t=!1,noNaN:n=!1,minExcluded:r=!1,maxExcluded:i=!1,min:o=t?-pa:Zx,max:s=t?pa:Qx}=e,c=Lf(o,"min"),a=r?c+1:c,u=Lf(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(ga,tE);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?eE:ga(d),d=>{if(typeof d!="number")throw new Error("Unsupported type");return Rm(d)?l!==h?h:f:yc(d)})}function mo(e={}){return e.noInteger?Df(Kx(e)).map(Hx,Yx).filter(nE):Df(e)}function rE(e){return e.replace(/([$`\\])/g,"\\$1").replace(/\r/g,"\\r")}function Lm(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 iE=Object.getPrototypeOf;var lr=class extends Se{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 iE(e)===lr.prototype&&e.generate===lr.prototype.generate&&e.canShrinkWithoutContext===lr.prototype.canShrinkWithoutContext&&e.shrink===lr.prototype.shrink?e:new lr(e)}const oE=Object.assign,sE=Object.keys;function Dm(e){return H(Mr(W()),Mr(W({min:1,max:4294967295}))).map(([t,n])=>{const r=()=>{const i={};return oE((s,c)=>{const a=Ae(s),u=Ae(c),l=e(_r(`${t}${a}`)%n,_r(`${t}${u}`)%n);return i[`[${a},${u}]`]=l,l},{toString:()=>{const s=sE(i).sort().map(c=>`${c} => ${Ae(i[c])}`).map(c=>`/* ${Lm(c)} */`);return`function(a, b) {
|
|
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) {
|
|
20
20
|
// With hash and stringify coming from fast-check${s.length!==0?`
|
|
21
|
-
${
|
|
21
|
+
${Se(s,`
|
|
22
22
|
`)}`:""}
|
|
23
23
|
const cmp = ${e};
|
|
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 yE=Object.assign;function Gm(){return zm(yE((e,t)=>e<t,{toString(){return"(hA, hB) => hA < hB"}}))}const bE=Object.assign;function Km(){return zm(bE((e,t)=>e-t,{toString(){return"(hA, hB) => hA - hB"}}))}const wE=Object.defineProperties,xE=Object.keys;function Hm(e){return H(ae(e,{minLength:1}),Mr(W())).map(([t,n])=>{const r=()=>{const i={},o=(...c)=>{const a=ke(c),u=t[$r(`${n}${a}`)%t.length];return i[a]=u,mn(u)?u[Fe]():u};function s(c){const a=Q(Q(Lp(xE(i)),u=>`${u} => ${ke(i[u])}`),u=>`/* ${Wm(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 uE(o,{toString:{value:()=>s(Ae(t))},[bt]:{value:()=>s(Ae(t))},[Lt]:{value:async()=>s(await so(t))},[Fe]:{value:r,configurable:!0}})};return r()})}const fE=Number.MIN_SAFE_INTEGER,hE=Number.MAX_SAFE_INTEGER;function bc(){return new Hn(fE,hE)}const dE=Number.MAX_SAFE_INTEGER;function qm(){return new Hn(0,dE)}const pE=Number.parseInt;function mE(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 xi(e,t){const n=pE(e,t);if(Ir(n,t)!==e)throw new Error("Invalid value");return n}function gE(e){if(typeof e!="string")throw new Error("Invalid type");return e.length>=2&&e[0]==="0"?e[1]==="x"?["hex",xi(Te(e,2),16)]:["oct",xi(Te(e,1),8)]:["dec",xi(e,10)]}function yE(e){return xe(e,".")}function bE(e){if(typeof e!="string")throw new Error("Invalid type");return Q(tt(e,"."),t=>xi(t,10))}function go(){return H(Kt(255),Kt(255),Kt(255),Kt(255)).map(yE,bE)}function Pt(e){return H(je("dec","oct","hex"),Kt(e)).map(mE,gE)}function rs(e){return xe(e,".")}function is(e){if(typeof e!="string")throw new Error("Invalid type");return tt(e,".")}function wc(){return Ce(H(Pt(255),Pt(255),Pt(255),Pt(255)).map(rs,is),H(Pt(255),Pt(255),Pt(65535)).map(rs,is),H(Pt(255),Pt(16777215)).map(rs,is),Pt(4294967295))}function Sc(e){return e.length===0?[]:tt(e,":")}function xc(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 wE(e){return`${xe(e[0],":")}:${e[1]}`}function SE(e){if(typeof e!="string")throw new Error("Invalid type");return xc(e)}function xE(e){return`::${xe(e[0],":")}:${e[1]}`}function EE(e){if(typeof e!="string")throw new Error("Invalid type");if(!ww(e,"::"))throw new Error("Invalid value");return xc(Te(e,2))}function Ei(e){return`${xe(e[0],":")}::${xe(e[1],":")}:${e[2]}`}function Ti(e){if(typeof e!="string")throw new Error("Invalid type");const[t,n]=tt(e,"::",2),[r,i]=xc(n);return[Sc(t),r,i]}function TE(e){return Ei([e[0],[e[1]],e[2]])}function vE(e){const t=Ti(e);return[t[0],xe(t[1],":"),t[2]]}function Bf(e){return`${xe(e[0],":")}::${e[1]}`}function Uf(e){if(typeof e!="string")throw new Error("Invalid type");const[t,n]=tt(e,"::",2);return[Sc(t),n]}function IE(e){return`${xe(e[0],":")}::`}function kE(e){if(typeof e!="string")throw new Error("Invalid type");if(!Sw(e,"::"))throw new Error("Invalid value");return[Sc(Te(e,0,e.length-2))]}function AE([e,t]){return`${e}:${t}`}function CE(e){if(typeof e!="string")throw new U("Invalid type");if(!e.includes(":"))throw new U("Invalid value");return e.split(":",2)}const _E="0123456789abcdef";let os;function ME(){return os===void 0&&(os=W({min:0,max:15}).map(e=>_E[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})),os}function Ec(){const e=be({unit:ME(),minLength:1,maxLength:4,size:"max"}),t=Ce(H(e,e).map(AE,CE),go());return Ce(H(ae(e,{minLength:6,maxLength:6,size:"max"}),t).map(wE,SE),H(ae(e,{minLength:5,maxLength:5,size:"max"}),t).map(xE,EE),H(ae(e,{minLength:0,maxLength:1,size:"max"}),ae(e,{minLength:4,maxLength:4,size:"max"}),t).map(Ei,Ti),H(ae(e,{minLength:0,maxLength:2,size:"max"}),ae(e,{minLength:3,maxLength:3,size:"max"}),t).map(Ei,Ti),H(ae(e,{minLength:0,maxLength:3,size:"max"}),ae(e,{minLength:2,maxLength:2,size:"max"}),t).map(Ei,Ti),H(ae(e,{minLength:0,maxLength:4,size:"max"}),e,t).map(TE,vE),H(ae(e,{minLength:0,maxLength:5,size:"max"}),t).map(Bf,Uf),H(ae(e,{minLength:0,maxLength:6,size:"max"}),e).map(Bf,Uf),H(ae(e,{minLength:0,maxLength:7,size:"max"})).map(IE,kE))}var $E=class extends Se{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 OE=Object.getOwnPropertyNames;function PE(){const e=new Yt;return n=>{let r=dt(e,n);return r!==void 0||(r=new $E(String(n)),Et(e,n,r)),r}}function Tc(e){const t=PE(),n=e(t),r=OE(n);for(const i of r){const o=t(i);o.underlying=n[i]}return n}function NE(e,t){for(const n of e){const r=t[n]||{};if(r.maxLength===void 0||r.maxLength>0)return!0}return!1}function jE(e,t){if(e.length===0)return we([]);if(!NE(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=>H0(n)).filter(n=>n.length>0)}const Vf=Object.assign,vi=Object.create,Wm=Object.defineProperty,qf=Object.getPrototypeOf,FE=Object.prototype;function RE(e){return Wm(vi(null),bt,{configurable:!1,enumerable:!1,writable:!1,value:()=>e})}function Wf(e,t){return RE(`<${et(e)}#${t}>`)}function LE(e,t){const n=vi(FE);for(const r in e){const i=e[r],o=[];for(const s of i){const c=Vf(vi(qf(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])}Wm(c,bt,{configurable:!1,enumerable:!1,writable:!1,value:()=>{const a=e[r][o],u=Vf(vi(qf(a)),a);for(const l in s){const f=s[l];u[l]=f.index===void 0?void 0:typeof f.index=="number"?Wf(f.type,f.index):Q(f.index,h=>Wf(f.type,h))}return Ae(u)}})}}return n}function DE(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)),cw(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 zf=Object.assign,Fi=Object.create;function BE(e,t,n){switch(e){case"exclusive":return we(n);case"successor":return Cr(W({min:t!==void 0?t+1:0,max:n}));case"any":return Cr(W({min:0,max:n}))}}function UE(e,t,n,r,i){const o=BE(t,n,r);switch(e){case"0-1":return It(o,{nil:void 0,depthIdentifier:i});case"1":return o;case"many":{let s=0;return It(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 zm(e,t){const n=Fi(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 VE(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)}`);vr(n,s.type)}else{if(ln(n,s.type))throw new U(`Cannot mix exclusive with other strategies for type ${et(s.type)}`);vr(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=zf(Fi(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]=zf(Fi(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,zm(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 WE(e,t){const n=Fi(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],zm(e,i));return{producedLinks:n,toBeProducedEntities:r,nextIndex:0}}function zE(e,t,n,r){const i=n.producedLinks,o=n.toBeProducedEntities[n.nextIndex+r],s=e[o.type],c=lo();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,UE(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],S=[],T=d===void 0?[]:typeof d=="number"?[d]:d;for(const O of T){let A;O>=y?A=f.enqueueNewEntity(e,p.type):A=O,N(S,A);const _=dt(t,p);_!==void 0&&f.appendBackReference(p.type,A,_.property)}f.setOutboundLink(m,{type:p.type,index:d===void 0?void 0:typeof d=="number"?S[0]:S})}return f.commit()})}function GE(e,t){VE(e);const n=DE(e);return lc(we(WE(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=zE(e,n,r,i),i+=1;return o}).map(r=>r.producedLinks)}const KE=Object.keys,HE=Object.getOwnPropertySymbols,YE=Object.getOwnPropertyDescriptor;function JE(e){const t=KE(e),n=HE(e);for(let r=0;r!==n.length;++r){const i=n[r],o=YE(e,i);o&&o.enumerable&&t.push(i)}return t}const XE=Object.create,ZE=Object.defineProperty,QE=Object.getOwnPropertyDescriptor,eT=Object.getOwnPropertyNames,tT=Object.getOwnPropertySymbols;function nT(e,t){return function(r){const i=r[r.length-1]?XE(null):{};for(let o=0;o!==e.length;++o){const s=r[o];if(s!==t){const c=e[o];c==="__proto__"?ZE(i,c,{value:s,configurable:!0,enumerable:!0,writable:!0}):i[c]=s}}return i}}function rT(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=QE(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=eT(r).length,u=tT(r).length;if(s!==a+u)throw new Error("Incompatible instance received: should not contain extra properties");return[...c,i]}}const ss=Symbol("no-key");function as(e,t,n){const r=JE(e),i=[];for(let o=0;o!==r.length;++o){const s=r[o],c=e[s];t===void 0||Tr(t,s)!==-1?N(i,c):N(i,It(c,{nil:ss}))}return H(...i,n?we(!1):Ft()).map(nT(r,ss),rT(r,ss))}function zt(e,t){const n=t!==void 0&&!!t.noNullPrototype;if(t===void 0||!("requiredKeys"in t&&t.requiredKeys!==void 0))return as(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 as(e,r,n)}const iT=Object.create;function oT(e,t,n,r){const i=iT(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 Gf=Object.create,sT=Object.keys;function Gm(e,t,n={}){const r=sT(e),i=n.initialPoolConstraints||Gf(null),o=n.unicityConstraints||Gf(null),s={noNullPrototype:n.noNullPrototype};return jE(r,i).chain(c=>GE(t,c).chain(a=>oT(e,u=>a[u].length,u=>o[u],s).map(u=>LE(u,a))))}function aT(e){return xe(Q(e,t=>t[t.length-1]===","?Te(t,0,t.length-1):t)," ")}function cT(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 uT(e){let t=xe(e," ");return t[t.length-1]===","&&(t=Te(t,0,t.length-1)),ec(t[0])+Te(t,1)+"."}function lT(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]===","||ec(na(n[0]))!==n[0])throw new Error("Unsupported value");const r=na(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 fT(e){return xe(e," ")}function hT(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 k=(e,t)=>({arbitrary:we(e),weight:t});function dT(){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 Km(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=dT();return n==="sentences"?ae(ae(i,{minLength:1,size:"small"}).map(uT,lT(i)),{minLength:1,maxLength:t,size:r}).map(fT,hT):ae(i,{minLength:1,maxLength:t,size:r}).map(aT,cT(i))}function pT(e){return new Map(e)}function mT(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 gT(e){return e[0]}function Ri(e,t,n={}){return Qt(H(e,t),{minLength:n.minKeys,maxLength:n.maxKeys,size:n.size,selector:gT,depthIdentifier:n.depthIdentifier,comparator:"SameValueZero"}).map(pT,mT)}let ri=10;function Hm(e){const t={};return(n=>{const r=n!==void 0?n:ri;if(!Np(t,r)){const i=ri;ri=r-1,t[r]=e(r),ri=i}return t[r]})}function yT(e){let t=0;for(;e>F(0);)e&F(1)&&++t,e>>=F(1);return t}function bT(e,t){const n=(F(1)<<F(t))-F(1),r=e&n;let i=yT(e-r),o=r;for(let s=F(1);s<=n&&i!==0;s<<=F(1))o&s||(o|=s,--i);return o}function ii(e,t){const n=[];for(let r=e.length-1;r!==-1;--r)t(e[r])!==e[r]&&N(n,r);return n}function wT(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 cs(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 ST=class extends Se{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=ii(r,this.toggleCase),o=Xt(F(0),(F(1)<<F(i.length))-F(1)).generate(e,void 0);return cs(r,o.value,i,this.toggleCase),new L(xe(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:wT(c,s,ii(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=ii(s,this.toggleCase),a=bT(i,c.length);return cs(s,a,c,this.toggleCase),new L(xe(s,""),this.buildContextFor(o,new L(a,void 0)))}).join(fn(()=>{const o=[...r],s=ii(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 cs(a,c.value,s,this.toggleCase),new L(xe(a,""),this.buildContextFor(new L(r,n.rawStringContext),c))})}))}};function xT(e){const t=ec(e);return t!==e?t:na(e)}function Ym(e,t){return new ST(e,t&&t.toggleCase||xT,t&&t.untoggleAll)}function ET(e){return Ap.from(e)}function TT(e){if(!(e instanceof Ap))throw new Error("Unexpected type");return[...e]}function vc(e={}){return ae(mo(e),e).map(ET,TT)}function vT(e){return Cp.from(e)}function IT(e){if(!(e instanceof Cp))throw new Error("Unexpected type");return[...e]}function Ic(e={}){return ae(Br(e),e).map(vT,IT)}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 kc(e={}){return en(e,-32768,32767,_0,W)}function Ac(e={}){return en(e,-2147483648,2147483647,M0,W)}function Cc(e={}){return en(e,-128,127,C0,W)}function _c(e={}){return en(e,0,65535,P0,W)}function Mc(e={}){return en(e,0,4294967295,N0,W)}function $c(e={}){return en(e,0,255,$0,W)}function Oc(e={}){return en(e,0,255,O0,W)}function kT(e){return e!==void 0}function Kf(e){return e.hasToBeCloned?new L(e.value_,{generatorContext:e.context},()=>e.value):new L(e.value_,{generatorContext:e.context})}function Hf(e){return e.hasToBeCloned?new L(e.value_,{shrinkerContext:e.context},()=>e.value):new L(e.value_,{shrinkerContext:e.context})}var AT=class extends Se{constructor(e,t){super(),this.generatorArbitrary=e,this.shrinkerArbitrary=t}generate(e,t){return Kf(this.generatorArbitrary.generate(e,t))}canShrinkWithoutContext(e){return this.shrinkerArbitrary.canShrinkWithoutContext(e)}shrink(e,t){return kT(t)?"generatorContext"in t?this.generatorArbitrary.shrink(e,t.generatorContext).map(Kf):this.shrinkerArbitrary.shrink(e,t.shrinkerContext).map(Hf):this.shrinkerArbitrary.shrink(e,void 0).map(Hf)}};function ya(e,t,n){const r=W({min:e,max:t});return t===n?r:new AT(r,W({min:e,max:n}))}const CT=Math.min,ba=Math.max,Yf=Ip.isArray,_T=Object.entries;function MT(e){let t=-1;for(let n=0;n!==e.length;++n)t=ba(t,e[n][0]);return t}function $T(e,t){const n=Ip(e);for(let r=0;r!==t.length;++r){const i=t[r];i[0]<e&&(n[i[0]]=i[1])}return n}function Pc(e,t={}){const{size:n,minNumElements:r=0,maxLength:i=_n,maxNumElements:o=i,noTrailingHole:s,depthIdentifier:c}=t,a=Ar(n,Ar(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=CT(o,i),l=t.maxNumElements!==void 0||n!==void 0?n:"=",f=Qt(H(ya(0,ba(a-1,0),ba(i-1,0)),e),{size:l,minLength:r,maxLength:u,selector:h=>h[0],depthIdentifier:c}).map(h=>$T(MT(h)+1,h),h=>{if(!Yf(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(_T(h),d=>[Number(d[0]),d[1]])});return s||i===r?f:H(f,ya(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(!Yf(h))throw new Error("Not supported entry type");return[h,h.length]})}function OT(e){return new Set(e)}function PT(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 Nc(e,t={}){return Qt(e,{minLength:t.minLength,maxLength:t.maxLength,size:t.size,depthIdentifier:t.depthIdentifier,comparator:"SameValueZero"}).map(OT,PT)}function NT(e,t,n,r,i,o){return ho(e,t,{maxKeys:n,noNullPrototype:!o,size:r,depthIdentifier:i})}function jT(e){return Ce(Cc(e),$c(e),Oc(e),kc(e),_c(e),Ac(e),Mc(e),vc(e),Ic(e))}function Jm(e){const t=e.values,n=e.depthSize,r=lo(),i=e.maxDepth,o=e.maxKeys,s=e.size,c=Ce(...t,...e.withBigInt?[Xt()]:[],...e.withDate?[fo()]:[]);return Tc(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=>Ae(u))]:[],...e.withTypedArray?[jT({maxLength:o,size:s})]:[],...e.withSparseArray?[Pc(a("anything"),{maxNumElements:o,size:s,depthIdentifier:r})]:[]),keys:e.withObjectString?Ce({arbitrary:e.key,weight:10},{arbitrary:a("anything").map(u=>Ae(u)),weight:1}):e.key,array:ae(a("anything"),{maxLength:o,size:s,depthIdentifier:r}),set:Nc(a("anything"),{maxLength:o,size:s,depthIdentifier:r}),map:Ce(Ri(a("keys"),a("anything"),{maxKeys:o,size:s,depthIdentifier:r}),Ri(a("anything"),a("anything"),{maxKeys:o,size:s,depthIdentifier:r})),object:NT(a("keys"),a("anything"),o,s,r,e.withNullPrototype)})).anything}function FT(e){switch(typeof e){case"boolean":return new kp(e);case"number":return new Ht(e);case"string":return new et(e);default:return e}}function RT(e){return typeof e!="object"||e===null||!("constructor"in e)?e:e.constructor===kp||e.constructor===Ht||e.constructor===et?e.valueOf():e}function LT(e){return e.map(FT,RT)}function DT(e,t){return[Ft(),bc(),Br(),t(e),Ce(t(e),we(null),we(void 0))]}function BT(e){return e.map(t=>LT(t))}function UT(e,t){return t?BT(e).concat(e):e}function Xm(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:UT(e.values!==void 0?e.values:DT(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 VT(e){return ho(e.key,Jm(e),{maxKeys:e.maxKeys,noNullPrototype:!e.withNullPrototype,size:e.size})}function Zm(e){return VT(Xm(e))}function qT(e,t){const{depthSize:n,maxDepth:r}=t;return{key:e,values:[Ft(),Br({noDefaultInfinity:!0,noNaN:!0}),e,we(null)],depthSize:n,maxDepth:r}}function jc(e){return Jm(Xm(e))}function Fc(e={}){const t=e.noUnicodeString===void 0||e.noUnicodeString===!0;return jc(qT("stringUnit"in e?be({unit:e.stringUnit}):t?be():be({unit:"binary"}),e))}const WT=JSON.stringify,zT=JSON.parse;function GT(e){if(typeof e!="string")throw new U("Cannot unmap the passed value");return zT(e)}function Qm(e={}){return Fc(e).map(WT,GT)}const KT=Object.defineProperties;function us(e,t){return`Stream(${t!==void 0?`${xe(t,",")}…`:`${e} emitted`})`}var HT=class extends Se{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 KT(c,{toString:{value:()=>us(o,i!==null?i.map(Ae):void 0)},[bt]:{value:()=>us(o,i!==null?i.map(Ae):void 0)},[Lt]:{value:async()=>us(o,i!==null?await Promise.all(i.map(so)):void 0)},[Fe]:{value:r,enumerable:!0}})};return new L(r(),void 0)}canShrinkWithoutContext(e){return!1}shrink(e,t){return J.nil()}};function eg(e,t){return new HT(e,t!==void 0&&typeof t=="object"&&"noHistory"in t?!t.noHistory:!0)}function YT(e){return xe(e,"")}function Jf(e){if(typeof e!="string")throw new Error("Cannot unmap the passed value");return[...e]}function JT(e){switch(e.length%4){case 0:return e;case 3:return`${e}=`;case 2:return`${e}==`;default:return Te(e,1)}}function XT(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 ls=String.fromCharCode;function ZT(e){return e<26?ls(e+65):e<52?ls(e+97-26):e<62?ls(e+48-52):e===62?"+":"/"}function QT(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 ev(){return W({min:0,max:63}).map(ZT,QT)}function tg(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=ev();return ae(c,{minLength:i,maxLength:o,size:s,experimentalCustomSlices:zS(c,Jf)}).map(YT,Jf).map(JT,XT)}const Xf=Object.is;function tv(e,t){const n=new Yt;let r=0;for(const i of e)Xf(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(Xf(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 nv=Math.floor,Zf=Math.log,rv=Array.isArray;var ng=class extends Se{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+nv(Zf(r-n)/Zf(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]),$p(i,c,1)}return this.isOrdered&&Op(o,(s,c)=>s-c),new L(Q(o,s=>this.originalArray[s]),n.context)}canShrinkWithoutContext(e){return!rv(e)||!this.lengthArb.canShrinkWithoutContext(e.length)?!1:tv(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 rg(e,t={}){const{minLength:n=0,maxLength:r=e.length}=t;return new ng(e,!0,n,r)}function ig(e,t={}){const{minLength:n=0,maxLength:r=e.length}=t;return new ng(e,!1,n,r)}const iv={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"},ov={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 sv(e){return e<10?et(e):iv[e]}function Qf(e,t){let n="";for(;e.length+n.length<t;)n+="0";return n+e}function eh(e){let t="";for(let n=e;n!==0;){const r=n>>5;t=sv(n-(r<<5))+t,n=r}return t}function av(e,t){const n=~~(e/1073741824),r=e&1073741823;return Qf(eh(n),t-6)+Qf(eh(r),6)}function og(e){return function(n){return av(n,e)}}function fs(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=ov[i];if(o===void 0)throw new U("Unsupported type");t+=o*n,n*=32}return t}const cv=og(10),th=og(8);function uv(e){return cv(e[0])+th(e[1])+th(e[2])}function lv(e){if(typeof e!="string"||e.length!==26)throw new Error("Unsupported type");return[fs(e.slice(0,10)),fs(e.slice(10,18)),fs(e.slice(18))]}function sg(){return H(W({min:0,max:0xffffffffffff}),W({min:0,max:0xffffffffff}),W({min:0,max:0xffffffffff})).map(uv,lv)}function ag(e){return xw(Ir(e,16),8,"0")}function fv(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 hs(e,t){return W({min:e,max:t}).map(ag,fv)}function hv(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 dv=/^([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/;function pv(e){if(typeof e!="string")throw new Error("Unsupported type");const t=dv.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 nh="0123456789abcdef";function mv(e){const t={},n={};for(let o=0;o!==e.length;++o){const s=nh[o],c=nh[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 gv(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 Li(e={}){const t=hs(0,4294967295),n=e.version!==void 0?typeof e.version=="number"?[e.version]:e.version:[1,2,3,4,5,6,7,8];gv(n);const{versionsApplierMapper:r,versionsApplierUnmapper:i}=mv(n);return H(t,hs(0,268435456*n.length-1).map(r,i),hs(2147483648,3221225471),t).map(hv,pv)}function yv(e){return be({unit:dc("-._~!$&'()*+,;=:"),size:e})}function bv([e,t,n]){return(e===null?"":`${e}@`)+t+(n===null?"":`:${n}`)}function wv(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 Sv(e){return`[${e}]`}function xv(e){if(typeof e!="string"||e[0]!=="["||e[e.length-1]!=="]")throw new Error("Unsupported");return e.substring(1,e.length-1)}function Rc(e){const t=e||{},n=t.size,r=[po({size:n}),...t.withIPv4===!0?[go()]:[],...t.withIPv6===!0?[Ec().map(Sv,xv)]:[],...t.withIPv4Extended===!0?[wc()]:[]];return H(t.withUserInfo===!0?It(yv(n)):we(null),Ce(...r),t.withPort===!0?It(Kt(65535)):we(null)).map(bv,wv)}function cg(e){return be({unit:dc("-._~!$&'()*+,;=:@/?"),size:e})}function Lc(e={}){return cg(e.size)}function Dc(e={}){return be({unit:dc("-._~!$&'()*+,;=:@"),size:e.size})}function Ev(e){let t="";for(let n=0;n!==e.length;++n)t+="/"+e[n];return t}function Tv(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 $p(tt(e,"/"),1)}function vv(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 ds(e,t){return ae(Dc({size:e}),{size:t}).map(Ev,Tv)}function Iv(e){const[t,n]=vv(e);return t===n?ds(t,n):Ce(ds(t,n),ds(n,t))}function Bc(e){return Iv(uc((e||{}).size))}function Uc(e={}){return cg(e.size)}function kv(e){const[t,n,r]=e;return`${t}://${n}${r}${e[3]===null?"":`?${e[3]}`}${e[4]===null?"":`#${e[4]}`}`}const Av=/^([[A-Za-z][A-Za-z0-9+.-]*):\/\/([^/?#]*)([^?#]*)(\?[A-Za-z0-9\-._~!$&'()*+,;=:@/?%]*)?(#[A-Za-z0-9\-._~!$&'()*+,;=:@/?%]*)?$/;function Cv(e){if(typeof e!="string")throw new Error("Incompatible value received: type");const t=Av.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 Vc(e){const t=e||{},n=uc(t.size),r=t.authoritySettings!==void 0&&t.authoritySettings.size!==void 0?Dr(t.authoritySettings.size,n):n,i={...t.authoritySettings,size:r};return H(je(...t.validSchemes||["http","https"]),Rc(i),Bc({size:n}),t.withQueryParameters===!0?It(Uc({size:n})):we(null),t.withFragments===!0?It(Lc({size:n})):we(null)).map(kv,Cv)}var _v=class ug{constructor(t,n){this.commands=t,this.metadataForReplay=n,this[Fe]=function(){return new ug(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}},Mv=class wa{constructor(t){if(this.cmd=t,this.hasRan=!1,io(t)){const n=t[bt];this[bt]=function(){return n.call(t)}}if(oo(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 wa(this.cmd[Fe]()):new wa(this.cmd)}toString(){return this.cmd.toString()}},rh=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)}},$v=class extends Se{constructor(e,t,n,r,i){super(),this.sourceReplayPath=r,this.disableReplayLog=i,this.oneCommandArb=Ce(...e).map(o=>new Mv(o)),this.lengthArb=ya(0,t,n),this.replayPath=[],this.replayPathPosition=0}metadataForReplay(){return this.disableReplayLog?"":`replayPath=${JSON.stringify(rh.stringify(this.replayPath))}`}buildValueFor(e,t){const n=e.map(i=>i.value_),r={shrunkOnce:t,items:e};return new L(new _v(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?rh.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 lg(e,t={}){const{size:n,maxCommands:r=_n,disableReplayLog:i=!1,replayPath:o=null}=t;return new $v(e,Ar(n,0,r,t.maxCommands!==void 0),r,o,i)}var Ov=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 Pv=function*(e,t){for(const n of t)yield new Ov(e,n)},fg=(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}),Nv=(e,t)=>fg({then:o=>{o(e())}},t,void 0,(o,s,c)=>{o.check(s)&&o.run(s,c)},(o,s)=>s()),jv=e=>typeof e.then=="function",hg=async(e,t,n=Promise.resolve())=>await fg({then:s=>{const c=e();return jv(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 dg(e,t){Nv(e,t)}async function pg(e,t){await hg(e,t)}async function mg(e,t,n){const r=Pv(e,n),i=hg(t,r,e.schedule(Promise.resolve(),"startModel"));await e.waitFor(i),await e.waitAll()}const oi=e=>e();var gg=class Sa{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 Sa(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 ${rE(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?Ae(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||oi)}scheduleFunction(t,n){return(...r)=>this.scheduleInternal("function",`${t.name}(${r.map(Ae).join(",")})`,t(...r),void 0,n||oi)}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||oi,()=>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||oi;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()),S=>{throw h=null,r=!0,u(S),S});!r&&s!==void 0&&s(),f=null},m=()=>{if(f!==null){l=51;return}f=d().catch(()=>{})},p=()=>{const S=this.scheduledWatchers.indexOf(m);S!==-1&&this.scheduledWatchers.splice(S,1),S===0&&this.scheduledWatchers.length!==0&&this.scheduledWatchers[0]()},y=new Promise((S,T)=>{a=O=>{p(),S(O)},u=O=>{p(),T(O)}});return t.then(S=>{r=!0,h===null?a(S):h.then(()=>a(S),T=>u(T))},S=>{r=!0,h===null?u(S):h.then(()=>u(S),()=>u(S))}),(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(Sa.buildLog).map(t=>`-> ${t}`).join(`
|
|
34
|
-
`)+"`"}};function yg(e){let t=0;return{clone:()=>yg(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 ih(e,t){return new gg(e,yg(t))}function bg(e){const t=e.clone();return{clone:()=>bg(t),nextTaskIndex:n=>e.nextInt(0,n.length-1)}}var Fv=class extends Se{constructor(e){super(),this.act=e}generate(e,t){return new L(new gg(this.act,bg(e.clone())),void 0)}canShrinkWithoutContext(e){return!1}shrink(e,t){return J.nil()}};function wg(e){const{act:t=n=>n()}=e||{};return new Fv(t)}function Sg(e,t){const{act:n=r=>r()}=Array.isArray(e)?t||{}:e||{};return Array.isArray(e)?ih(n,e):function(r,...i){return ih(n,i)}}function xg(e={}){return en(e,F("-9223372036854775808"),F("9223372036854775807"),k0,Xt)}function Eg(e={}){return en(e,F(0),F("18446744073709551615"),A0,Xt)}function Rv(e,t){return t}const ps=Math.floor,Lv=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:ps(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?ps(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:ps(t/i)},expression:r.astNode},minLength:e.quantifier.from*r.minLength}:{astNode:{...e,expression:r.astNode},minLength:e.quantifier.from*r.minLength}}default:return Rv(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:Lv(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 Dv(e,t){return pt(e,t).astNode}function Bv(e){return new Error(`Unsupported AST node! Received: ${Ae(e)}`)}function Ii(e,t,n){if(!t&&!n)return e;const r={hasStart:!1,hasEnd:!1},i=Tg(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 Tg(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:Tg(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 Bv(e)}}function Uv(e){return Ii(e,!0,!0)}function oh(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 xa(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 Vv(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 qv(e,t){let n=!1;for(let r=t;r!==e.length;++r){const i=e[r];if(!xa(i)){if(t===r)return-1;if(i===","){if(n)return-1;n=!0}else return i==="}"?r:-1}}return-1}function Wv(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=qv(e,t+1);return i===-1?t+1:i+1}case"(":return r===1?t+1:Vv(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(xa(i)){const o=n?e.length:Math.min(t+4,e.length);let s=t+2;for(;s<o&&xa(e[s]);++s);return s}return t+(n?oh(e,t+1):1)+1}}default:return t+(n?oh(e,t):1)}}function si(e,t,n,r){const i=Wv(e,t,n,r);return e.substring(t,i)}const sh={gc:"General_Category",sc:"Script",scx:"Script_Extensions"},yo={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"},$r=Wc(yo),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"},Ea=Wc(qc),Ig={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"},ah=Wc(Ig);function Wc(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 zv(e){return e in qc||e in Ea}function Gv(e){return e in yo||e in $r}function ch(e){if(e in sh)return sh[e];if(e in $r)return $r[e];if(e in yo||e==="General_Category"||e==="Script"||e==="Script_Extensions")return e;throw new Error(`Unknown Unicode property name: ${e}`)}function uh(e){if(e in Ea)return Ea[e];if(e in ah)return ah[e];if(e in $r)return $r[e];if(e in qc||e in Ig||e in yo)return e;throw new Error(`Unknown Unicode property value: ${e}`)}function Kv(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:ch(r),canonicalValue:uh(i)}}if(zv(e))return{type:"UnicodeProperty",name:"General_Category",value:e,negative:t,shorthand:!0,binary:!1,canonicalName:"General_Category",canonicalValue:uh(e)};if(Gv(e)){const r=ch(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 ms=String.fromCodePoint;function gs(e){const t=e.pop();if(t===void 0)throw new Error("Unable to extract token preceeding the currently parsed one");return t}function kg(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 ys(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:ms(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:ms(r),value:e,codePoint:r}}case"0":return Fn(e,"\0");case"n":return Fn(e,`
|
|
35
|
-
`);case"f":return Fn(e,"\f");case"r":return Fn(e,"\r");case"t":return Fn(e," ");case"v":return Fn(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(
|
|
36
|
-
\v\f`],
|
|
37
|
-
`],Mg=[...""],t6=[...Ta,...Mg],n6=new vt(Ag),r6=new vt(Cg),i6=new vt(_g),o6=new vt(Mg),s6=new vt(t6),bn=()=>be({unit:"grapheme-ascii",minLength:1,maxLength:1});function hh(e){return new U(`Unsupported AST node! Received: ${Ae(e)}`)}function wn(e,t,n){switch(e.type){case"Char":if(e.kind==="meta")switch(e.value){case"\\w":return je(...Ag);case"\\W":return bn().filter(r=>!ln(n6,r));case"\\d":return je(...Cg);case"\\D":return bn().filter(r=>!ln(r6,r));case"\\s":return je(..._g);case"\\S":return bn().filter(r=>!ln(i6,r));case"\\b":case"\\B":throw new U(`Meta character ${e.value} not implemented yet!`);case".":{const r=n.dotAll?o6:s6;return bn().filter(i=>!ln(r,i))}}if(e.symbol===void 0)throw new U(`Unexpected undefined symbol received for non-meta Char! Received: ${Ae(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 hh(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=>xe(o,""))}case"CharacterClass":if(e.negative){const r=Q(e.expressions,i=>wn(i,t,n));return bn().filter(i=>Pp(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=>e6(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(...Ta)).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(...Ta),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 Qv(e);default:throw hh(e)}}function $g(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=Uv(Hv(e));n!==void 0&&(o=Dv(o,n));const s=wn(o,r,i);return n!==void 0?s.filter(c=>[...c].length<=n):s}function a6(e){const t=[];for(let n=0;n!==e.length;++n)t.push(e[n].next());return t}function c6(e,t){for(let n=0;n!==e.length;++n)t[n]=e[n].next()}function u6(e){for(let t=0;t!==e.length;++t)if(e[t].done)return!0;return!1}function*l6(...e){const t=a6(e);for(;!u6(t);)yield t.map(n=>n.value),c6(e,t)}function*f6(e){let t=e;for(;;)yield t,++t}var h6=class extends Se{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(l6(this.arb.shrink(e,t),f6(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 Og(e,t){return new h6(e,t)}var d6=Ab({Arbitrary:()=>Se,ExecutionStatus:()=>Gp,PreconditionFailure:()=>Zt,Random:()=>ao,Stream:()=>J,Value:()=>L,VerbosityLevel:()=>Vp,__commitHash:()=>jg,__type:()=>Pg,__version:()=>Ng,anything:()=>jc,array:()=>ae,assert:()=>Lr,asyncDefaultReportMessage:()=>ac,asyncModelRun:()=>pg,asyncProperty:()=>rc,asyncStringify:()=>so,asyncToStringMethod:()=>Lt,base64String:()=>tg,bigInt:()=>Xt,bigInt64Array:()=>xg,bigUint64Array:()=>Eg,boolean:()=>Ft,chainUntil:()=>lc,check:()=>co,clone:()=>ym,cloneIfNeeded:()=>xn,cloneMethod:()=>Fe,commands:()=>lg,compareBooleanFunc:()=>Bm,compareFunc:()=>Um,configureGlobal:()=>Lp,constant:()=>we,constantFrom:()=>je,context:()=>dm,createDepthIdentifier:()=>lo,date:()=>fo,defaultReportMessage:()=>sc,dictionary:()=>ho,domain:()=>po,double:()=>Br,emailAddress:()=>pc,entityGraph:()=>Gm,falsy:()=>fm,float:()=>mo,float32Array:()=>vc,float64Array:()=>Ic,func:()=>Vm,gen:()=>im,getDepthContextFor:()=>uo,hasAsyncToStringMethod:()=>oo,hasCloneMethod:()=>mn,hasToStringMethod:()=>io,hash:()=>_r,infiniteStream:()=>eg,int16Array:()=>kc,int32Array:()=>Ac,int8Array:()=>Cc,integer:()=>W,ipV4:()=>go,ipV4Extended:()=>wc,ipV6:()=>Ec,json:()=>Qm,jsonValue:()=>Fc,letrec:()=>Tc,limitShrink:()=>Og,lorem:()=>Km,map:()=>Ri,mapToConstant:()=>Mn,maxSafeInteger:()=>bc,maxSafeNat:()=>qm,memo:()=>Hm,mixedCase:()=>Ym,modelRun:()=>dg,nat:()=>Kt,noBias:()=>Cr,noShrink:()=>Mr,object:()=>Zm,oneof:()=>Ce,option:()=>It,pre:()=>Sp,property:()=>Rr,readConfigureGlobal:()=>yt,record:()=>zt,resetConfigureGlobal:()=>Dp,sample:()=>tm,scheduledModelRun:()=>mg,scheduler:()=>wg,schedulerFor:()=>Sg,set:()=>Nc,shuffledSubarray:()=>ig,sparseArray:()=>Pc,statistics:()=>nm,stream:()=>Jt,string:()=>be,stringMatching:()=>$g,stringify:()=>Ae,subarray:()=>rg,toStringMethod:()=>bt,tuple:()=>H,uint16Array:()=>_c,uint32Array:()=>Mc,uint8Array:()=>$c,uint8ClampedArray:()=>Oc,ulid:()=>sg,uniqueArray:()=>Qt,uuid:()=>Li,webAuthority:()=>Rc,webFragments:()=>Lc,webPath:()=>Bc,webQueryParameters:()=>Uc,webSegment:()=>Dc,webUrl:()=>Vc});const Pg="module",Ng="4.9.0",jg="0d3c2547dce556f72413607849377530d18ea283";var p6=d6;const m6=Object.freeze(Object.defineProperty({__proto__:null,Arbitrary:Se,ExecutionStatus:Gp,PreconditionFailure:Zt,Random:ao,Stream:J,Value:L,VerbosityLevel:Vp,__commitHash:jg,__type:Pg,__version:Ng,anything:jc,array:ae,assert:Lr,asyncDefaultReportMessage:ac,asyncModelRun:pg,asyncProperty:rc,asyncStringify:so,asyncToStringMethod:Lt,base64String:tg,bigInt:Xt,bigInt64Array:xg,bigUint64Array:Eg,boolean:Ft,chainUntil:lc,check:co,clone:ym,cloneIfNeeded:xn,cloneMethod:Fe,commands:lg,compareBooleanFunc:Bm,compareFunc:Um,configureGlobal:Lp,constant:we,constantFrom:je,context:dm,createDepthIdentifier:lo,date:fo,default:p6,defaultReportMessage:sc,dictionary:ho,domain:po,double:Br,emailAddress:pc,entityGraph:Gm,falsy:fm,float:mo,float32Array:vc,float64Array:Ic,func:Vm,gen:im,getDepthContextFor:uo,hasAsyncToStringMethod:oo,hasCloneMethod:mn,hasToStringMethod:io,hash:_r,infiniteStream:eg,int16Array:kc,int32Array:Ac,int8Array:Cc,integer:W,ipV4:go,ipV4Extended:wc,ipV6:Ec,json:Qm,jsonValue:Fc,letrec:Tc,limitShrink:Og,lorem:Km,map:Ri,mapToConstant:Mn,maxSafeInteger:bc,maxSafeNat:qm,memo:Hm,mixedCase:Ym,modelRun:dg,nat:Kt,noBias:Cr,noShrink:Mr,object:Zm,oneof:Ce,option:It,pre:Sp,property:Rr,readConfigureGlobal:yt,record:zt,resetConfigureGlobal:Dp,sample:tm,scheduledModelRun:mg,scheduler:wg,schedulerFor:Sg,set:Nc,shuffledSubarray:ig,sparseArray:Pc,statistics:nm,stream:Jt,string:be,stringMatching:$g,stringify:Ae,subarray:rg,toStringMethod:bt,tuple:H,uint16Array:_c,uint32Array:Mc,uint8Array:$c,uint8ClampedArray:Oc,ulid:sg,uniqueArray:Qt,uuid:Li,webAuthority:Rc,webFragments:Lc,webPath:Bc,webQueryParameters:Uc,webSegment:Dc,webUrl:Vc},Symbol.toStringTag,{value:"Module"}));var dh={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 zc(e){return String(e)}zc.open="";zc.close="";function g6(){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 y6({force:e}={}){let t=e||g6(),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 dh){let c=dh[s];i[s]=t?r(o(c[0]),o(c[1]),c[2]):zc}return i}var b6=y6(),$e=b6;function Fg(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 w6(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 Ur(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 Gc(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 Di(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 Kc(e,t,n,r,i,o){let s="";const c=w6(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 S6=typeof Symbol=="function"&&Symbol.for?Symbol.for("jest.asymmetricMatcher"):1267621,ai=" ",x6=(e,t,n,r,i,o)=>{const s=e.toString();if(s==="ArrayContaining"||s==="ArrayNotContaining")return++r>t.maxDepth?`[${s}]`:`${s+ai}[${Di(e.sample,t,n,r,i,o)}]`;if(s==="ObjectContaining"||s==="ObjectNotContaining")return++r>t.maxDepth?`[${s}]`:`${s+ai}{${Kc(e.sample,t,n,r,i,o)}}`;if(s==="StringMatching"||s==="StringNotMatching"||s==="StringContaining"||s==="StringNotContaining")return s+ai+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()},E6=e=>e&&e.$$typeof===S6,T6={serialize:x6,test:E6},v6=" ",Rg=new Set(["DOMStringMap","NamedNodeMap"]),I6=/^(?:HTML\w*Collection|NodeList)$/;function k6(e){return Rg.has(e)||I6.test(e)}const A6=e=>e&&e.constructor&&!!e.constructor.name&&k6(e.constructor.name);function C6(e){return e.constructor.name==="NamedNodeMap"}const _6=(e,t,n,r,i,o)=>{const s=e.constructor.name;return++r>t.maxDepth?`[${s}]`:(t.min?"":s+v6)+(Rg.has(s)?`{${Kc(C6(e)?[...e].reduce((c,a)=>(c[a.name]=a.value,c),{}):{...e},t,n,r,i,o)}}`:`[${Di([...e],t,n,r,i,o)}]`)},M6={serialize:_6,test:A6};function Lg(e){return e.replaceAll("<","<").replaceAll(">",">")}function Hc(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 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 Fn(e,"\f");case"r":return Fn(e,"\r");case"t":return Fn(e," ");case"v":return Fn(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(Og(t)){const n=e.substring(1),r=Number(n);return{type:"Char",kind:"decimal",symbol:ys(r),value:e,codePoint:r}}if(e.length>2&&(t==="p"||t==="P")){const n=t==="P";return r6(e.substring(3,e.length-1),n)}return ki(e.substring(1),!0)}}return ki(e)}function Bn(e,t,n,r){let i=null;for(let o=0,s=ai(t,o,n,0);o!==t.length;o+=s.length,s=ai(t,o,n,0)){const c=s[0];switch(c){case"|":i===null&&(i=[]),i.push(rn(e.splice(0),!0)||null);break;case".":e.push({type:"Char",kind:"meta",symbol:s,value:s,codePoint:NaN});break;case"*":case"+":{const a=bs(e);e.push({type:"Repetition",expression:a,quantifier:{type:"Quantifier",kind:c,greedy:!0}});break}case"?":{const a=bs(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(ki(s));break}const a=bs(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=ai(a,h,n,1);h!==a.length;h+=d.length,d=ai(a,h,n,1)){if(h===0&&d==="^"){l=!0;continue}const m=ws(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]===":")Bn(u,a.substring(2),n,r),e.push({type:"Group",capturing:!1,expression:rn(u)});else if(a[1]==="="||a[1]==="!")Bn(u,a.substring(2),n,r),e.push({type:"Assertion",kind:"Lookahead",negative:a[1]==="!"?!0:void 0,assertion:rn(u)});else if(a[1]==="<"&&(a[2]==="="||a[2]==="!"))Bn(u,a.substring(3),n,r),e.push({type:"Assertion",kind:"Lookbehind",negative:a[2]==="!"?!0:void 0,assertion:rn(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),Bn(u,l.slice(1).join(">"),n,r),e.push({type:"Group",capturing:!0,nameRaw:h,name:h,number:f,expression:rn(u)})}else{const l=++r.lastIndex;Bn(u,a,n,r),e.push({type:"Group",capturing:!0,number:l,expression:rn(u)})}break}default:if(s==="^")e.push({type:"Assertion",kind:s});else if(s==="$")e.push({type:"Assertion",kind:s});else if(s[0]==="\\"&&Og(s[1])){const a=Number(s.substring(1));n||a<=r.lastIndex?e.push({type:"Backreference",kind:"number",number:a,reference:a}):e.push(ws(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(ws(s));break}}if(i!==null){i.push(rn(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 i6(e){const t=vr([...e.flags],"u")!==-1,n=e.source,r=[];return Bn(r,n,t,{lastIndex:0,named:new Map}),rn(r)}const o6=String.fromCodePoint;function s6(e){return e.binary||e.shorthand?e.canonicalValue:`${e.canonicalName}=${e.canonicalValue}`}function ph(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 a6(e,t){const n=new RegExp(`^\\${t?"P":"p"}{${e}}$`,"u"),r=[];return ph(n,0,55295,r),ph(n,57344,1114111,r),r}const mh=new Map;function c6(e,t){const n=`${t?"P":"p"}:${e}`,r=mh.get(n);if(r!==void 0)return r;const i=a6(e,t);return mh.set(n,i),i}function u6(e){return $n(...Q(c6(s6(e),e.negative),t=>la(t)))}const l6=String.fromCodePoint,Pg=[..."abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"],Ng=[..."0123456789"],jg=[...` \r
|
|
36
|
+
\v\f`],Aa=[...`\r
|
|
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 xo(e,t,n,r,i,o){return e.map(s=>t.spacingOuter+n+(typeof s=="string"?zg(s,t):o(s,t,n,r,i))).join("")}function U6(e,t,n,r,i,o){return t.printShadowRoot===!1?"":[`${t.spacingOuter+n}#shadow-root`,xo(e,t,n+t.indent,r,i,o)].join("")}function zg(e,t){const n=t.colors.content;return n.open+Wg(e)+n.close}function V6(e,t){const n=t.colors.comment;return`${n.open}<!--${Wg(e)}-->${n.close}`}function Zc(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 Qc(e,t){const n=t.colors.tag;return`${n.open}<${e}${n.close} …${n.open} />${n.close}`}const q6=1,eu=3,Gg=8,Kg=11,W6=/^(?:(?:HTML|SVG)\w*)?Element$/;function z6(e){try{return typeof e.hasAttribute=="function"&&e.hasAttribute("is")}catch{return!1}}function G6(e){const t=e.constructor.name,{nodeType:n,tagName:r}=e,i=typeof r=="string"&&r.includes("-")||z6(e);return n===q6&&(W6.test(t)||i)||n===eu&&t==="Text"||n===Gg&&t==="Comment"||n===Kg&&t==="DocumentFragment"}const Hg=e=>{var t;return((t=e==null?void 0:e.constructor)==null?void 0:t.name)&&G6(e)};function K6(e){return e.nodeType===eu}function H6(e){return e.nodeType===Gg}function ui(e){return e.nodeType===Kg}function bh(e,t){let n=e.filter(r=>r.nodeType===eu?(r.data||"").trim().length>0:!0);return t&&(n=n.filter(t)),n}function Yg(e,t,n,r,i,o,s){if(K6(e))return zg(e.data,t);if(H6(e))return V6(e.data,t);const c=ui(e)?"DocumentFragment":e.tagName.toLowerCase();if(++r>t.maxDepth)return Qc(c,t);const a=Array.prototype.slice.call(e.childNodes||e.children),u=ui(e)||!e.shadowRoot?[]:Array.prototype.slice.call(e.shadowRoot.children),l=s?bh(a,s):a,f=s?bh(u,s):u;return Zc(c,Xc(ui(e)?[]:Array.from(e.attributes,h=>h.name).sort(),ui(e)?{}:[...e.attributes].reduce((h,d)=>(h[d.name]=d.value,h),{}),t,n+t.indent,r,i,o),(f.length>0?U6(f,t,n+t.indent,r,i,o):"")+xo(l,t,n+t.indent,r,i,o),t,n)}const Y6=(e,t,n,r,i,o)=>Yg(e,t,n,r,i,o);function J6(e){return{test:Hg,serialize:(t,n,r,i,o,s)=>Yg(t,n,r,i,o,s,e)}}const X6={serialize:Y6,test:Hg},Z6="@@__IMMUTABLE_ITERABLE__@@",Q6="@@__IMMUTABLE_LIST__@@",eA="@@__IMMUTABLE_KEYED__@@",tA="@@__IMMUTABLE_MAP__@@",wh="@@__IMMUTABLE_ORDERED__@@",nA="@@__IMMUTABLE_RECORD__@@",rA="@@__IMMUTABLE_SEQ__@@",iA="@@__IMMUTABLE_SET__@@",oA="@@__IMMUTABLE_STACK__@@",Yn=e=>`Immutable.${e}`,So=e=>`[${e}]`,Pr=" ",xh="…";function sA(e,t,n,r,i,o,s){return++r>t.maxDepth?So(Yn(s)):`${Yn(s)+Pr}{${Vr(e.entries(),t,n,r,i,o)}}`}function aA(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 cA(e,t,n,r,i,o){const s=Yn(e._name||"Record");return++r>t.maxDepth?So(s):`${s+Pr}{${Vr(aA(e),t,n,r,i,o)}}`}function uA(e,t,n,r,i,o){const s=Yn("Seq");return++r>t.maxDepth?So(s):e[eA]?`${s+Pr}{${e._iter||e._object?Vr(e.entries(),t,n,r,i,o):xh}}`:`${s+Pr}[${e._iter||e._array||e._collection||e._iterable?Yc(e.values(),t,n,r,i,o):xh}]`}function xs(e,t,n,r,i,o,s){return++r>t.maxDepth?So(Yn(s)):`${Yn(s)+Pr}[${Yc(e.values(),t,n,r,i,o)}]`}const lA=(e,t,n,r,i,o)=>e[tA]?sA(e,t,n,r,i,o,e[wh]?"OrderedMap":"Map"):e[Q6]?xs(e,t,n,r,i,o,"List"):e[iA]?xs(e,t,n,r,i,o,e[wh]?"OrderedSet":"Set"):e[oA]?xs(e,t,n,r,i,o,"Stack"):e[rA]?uA(e,t,n,r,i,o):cA(e,t,n,r,i,o),fA=e=>e&&(e[Z6]===!0||e[nA]===!0),hA={serialize:lA,test:fA};function Jg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ss={exports:{}},pe={};/**
|
|
39
39
|
* @license React
|
|
40
40
|
* react-is.production.js
|
|
41
41
|
*
|
|
@@ -43,7 +43,7 @@ ${l2(i)}`),o}function sc(e){return oa(e,Ae)}async function ac(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 Sh;function dA(){if(Sh)return pe;Sh=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 Eh;function pA(){return Eh||(Eh=1,Ss.exports=dA()),Ss.exports}var Xg=pA(),mA=Jg(Xg),gA=Vg({__proto__:null,default:mA},[Xg]),Es={exports:{}},ue={};/**
|
|
47
47
|
* @license React
|
|
48
48
|
* react-is.production.min.js
|
|
49
49
|
*
|
|
@@ -51,75 +51,75 @@ ${l2(i)}`),o}function sc(e){return oa(e,Ae)}async function ac(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 Th;function yA(){if(Th)return ue;Th=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 vh;function bA(){return vh||(vh=1,Es.exports=yA()),Es.exports}var Zg=bA(),wA=Jg(Zg),xA=Vg({__proto__:null,default:wA},[Zg]);const SA=["isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isProfiler","isStrictMode","isSuspense","isSuspenseList","isValidElementType"],xn=Object.fromEntries(SA.map(e=>[e,t=>xA[e](t)||gA[e](t)]));function Qg(e,t=[]){if(Array.isArray(e))for(const n of e)Qg(n,t);else e!=null&&e!==!1&&e!==""&&t.push(e);return t}function Ah(e){const t=e.type;if(typeof t=="string")return t;if(typeof t=="function")return t.displayName||t.name||"Unknown";if(xn.isFragment(e))return"React.Fragment";if(xn.isSuspense(e))return"React.Suspense";if(typeof t=="object"&&t!==null){if(xn.isContextProvider(e))return"Context.Provider";if(xn.isContextConsumer(e))return"Context.Consumer";if(xn.isForwardRef(e)){if(t.displayName)return t.displayName;const n=t.render.displayName||t.render.name||"";return n===""?"ForwardRef":`ForwardRef(${n})`}if(xn.isMemo(e)){const n=t.displayName||t.type.displayName||t.type.name||"";return n===""?"Memo":`Memo(${n})`}}return"UNDEFINED"}function EA(e){const{props:t}=e;return Object.keys(t).filter(n=>n!=="children"&&t[n]!==void 0).sort()}const TA=(e,t,n,r,i,o)=>++r>t.maxDepth?Qc(Ah(e),t):Zc(Ah(e),Xc(EA(e),e.props,t,n+t.indent,r,i,o),xo(Qg(e.props.children),t,n+t.indent,r,i,o),t,n),vA=e=>e!=null&&xn.isElement(e),AA={serialize:TA,test:vA},IA=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.test.json"):245830487;function kA(e){const{props:t}=e;return t?Object.keys(t).filter(n=>t[n]!==void 0).sort():[]}const CA=(e,t,n,r,i,o)=>++r>t.maxDepth?Qc(e.type,t):Zc(e.type,e.props?Xc(kA(e),e.props,t,n+t.indent,r,i,o):"",e.children?xo(e.children,t,n+t.indent,r,i,o):"",t,n),_A=e=>e&&e.$$typeof===IA,$A={serialize:CA,test:_A},ey=Object.prototype.toString,MA=Date.prototype.toISOString,OA=Error.prototype.toString,Ih=RegExp.prototype.toString;function Ci(e){return typeof e.constructor=="function"&&e.constructor.name||"Object"}function PA(e){return typeof window<"u"&&e===window}const NA=/^Symbol\((.*)\)(.*)$/,jA=/\n/g;class ty extends Error{constructor(t,n){super(t),this.stack=n,this.name=this.constructor.name}}function FA(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 RA(e){return Object.is(e,-0)?"-0":String(e)}function LA(e){return`${e}n`}function kh(e,t){return t?`[Function ${e.name||"anonymous"}]`:"[Function]"}function Ch(e){return String(e).replace(NA,"Symbol($1)")}function _h(e){return`[${OA.call(e)}]`}function ny(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 RA(e);if(i==="bigint")return LA(e);if(i==="string")return r?`"${e.replaceAll(/"|\\/g,"\\$&")}"`:`"${e}"`;if(i==="function")return kh(e,t);if(i==="symbol")return Ch(e);const o=ey.call(e);return o==="[object WeakMap]"?"WeakMap {}":o==="[object WeakSet]"?"WeakSet {}":o==="[object Function]"||o==="[object GeneratorFunction]"?kh(e,t):o==="[object Symbol]"?Ch(e):o==="[object Date]"?Number.isNaN(+e)?"Date { NaN }":MA.call(e):o==="[object Error]"?_h(e):o==="[object RegExp]"?n?Ih.call(e).replaceAll(/[$()*+.?[\\\]^{|}]/g,"\\$&"):Ih.call(e):e instanceof Error?_h(e):null}function ry(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 an(e.toJSON(),t,n,r,i,!0);const a=ey.call(e);return a==="[object Arguments]"?s?"[Arguments]":`${c?"":"Arguments "}[${Ui(e,t,n,r,i,an)}]`:FA(a)?s?`[${e.constructor.name}]`:`${c||!t.printBasicPrototype&&e.constructor.name==="Array"?"":`${e.constructor.name} `}[${Ui(e,t,n,r,i,an)}]`:a==="[object Map]"?s?"[Map]":`Map {${Vr(e.entries(),t,n,r,i,an," => ")}}`:a==="[object Set]"?s?"[Set]":`Set {${Yc(e.values(),t,n,r,i,an)}}`:s||PA(e)?`[${Ci(e)}]`:`${c||!t.printBasicPrototype&&Ci(e)==="Object"?"":`${Ci(e)} `}{${Jc(e,t,n,r,i,an)}}`}const DA={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:Ci(e);return s?`[${f}]`:`${f} {${Vr(Object.entries(l).values(),t,n,r,i,o)}}`}};function BA(e){return e.serialize!=null}function iy(e,t,n,r,i,o){let s;try{s=BA(e)?e.serialize(t,n,r,i,o,an):e.print(t,c=>an(c,n,r,i,o),c=>{const a=r+n.indent;return a+c.replaceAll(jA,`
|
|
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 oy(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 an(e,t,n,r,i,o){var a;let s;const c=oy(t.plugins,e);if(c!==null)s=iy(c,e,t,n,r,i);else{const u=ny(e,t.printFunctionName,t.escapeRegex,t.escapeString);u!==null?s=u:s=ry(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 tu={comment:"gray",content:"reset",prop:"yellow",tag:"cyan",value:"green"},sy=Object.keys(tu),mt={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:tu};function UA(e){for(const t of Object.keys(e))if(!Object.hasOwn(mt,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 VA(){return sy.reduce((e,t)=>{const n=tu[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 qA(){return sy.reduce((e,t)=>(e[t]={close:"",open:""},e),Object.create(null))}function ay(e){return(e==null?void 0:e.printFunctionName)??mt.printFunctionName}function cy(e){return(e==null?void 0:e.escapeRegex)??mt.escapeRegex}function uy(e){return(e==null?void 0:e.escapeString)??mt.escapeString}function $h(e){return{callToJSON:(e==null?void 0:e.callToJSON)??mt.callToJSON,colors:e!=null&&e.highlight?VA():qA(),compareKeys:typeof(e==null?void 0:e.compareKeys)=="function"||(e==null?void 0:e.compareKeys)===null?e.compareKeys:mt.compareKeys,escapeRegex:cy(e),escapeString:uy(e),indent:e!=null&&e.min?"":WA((e==null?void 0:e.indent)??mt.indent),maxDepth:(e==null?void 0:e.maxDepth)??mt.maxDepth,maxWidth:(e==null?void 0:e.maxWidth)??mt.maxWidth,min:(e==null?void 0:e.min)??mt.min,plugins:(e==null?void 0:e.plugins)??mt.plugins,printBasicPrototype:(e==null?void 0:e.printBasicPrototype)??!0,printFunctionName:ay(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)??mt.maxOutputLength,_outputLengthPerDepth:[]}}function
|
|
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 Bi(e){return e==null&&(e=[]),Array.isArray(e)?e:[e]}function Rt(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}function bI(e){return e===Object.prototype||e===Function.prototype||e===RegExp.prototype}function Nr(e){return Object.prototype.toString.apply(e).slice(8,-1)}function wI(e,t){const n=typeof t=="function"?t:r=>t.add(r);Object.getOwnPropertyNames(e).forEach(n),Object.getOwnPropertySymbols(e).forEach(n)}function dy(e){const t=new Set;return bI(e)?[]:(wI(e,t),Array.from(t))}const py={forceWritable:!1};function Rh(e,t=py){return Ia(e,new WeakMap,t)}function Ia(e,t,n=py){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]=Ia(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=dy(e);for(const s of o){const c=Object.getOwnPropertyDescriptor(e,s);if(!c)continue;const a=Ia(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 my(){}function Lh(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 Dh(){let e=null,t=null;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n}function SI(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 xI(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 Bh(e){return Array.from(new Set(e))}const Xe=-1,We=1,Me=0;class ke{constructor(t,n){R(this,0);R(this,1);this[0]=t,this[1]=n}}function EI(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 gy(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 Uh(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 TI(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]===Me?(n[r++]=o,s=a,c=u,a=0,u=0,i=e[o][1]):(e[o][0]===We?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 ke(Xe,i)),e[n[r-1]+1][0]=We,r--,r--,o=r>0?n[r-1]:-1,s=0,c=0,a=0,u=0,i=null,t=!0)),o++;for(t&&yy(e),kI(e),o=1;o<e.length;){if(e[o-1][0]===Xe&&e[o][0]===We){const l=e[o-1][1],f=e[o][1],h=Uh(l,f),d=Uh(f,l);h>=d?(h>=l.length/2||h>=f.length/2)&&(e.splice(o,0,new ke(Me,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 ke(Me,l.substring(0,d))),e[o-1][0]=We,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 Vh=/[^a-z0-9]/i,qh=/\s/,Wh=/[\r\n]/,vI=/\n\r?\n$/,II=/^\r?\n\r?\n/;function kI(e){let t=1;for(;t<e.length-1;){if(e[t-1][0]===Me&&e[t+1][0]===Me){let n=e[t-1][1],r=e[t][1],i=e[t+1][1];const o=gy(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=ui(n,r)+ui(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=ui(n,r)+ui(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 yy(e){var a;e.push(new ke(Me,""));let t=0,n=0,r=0,i="",o="",s;for(;t<e.length;)switch(e[t][0]){case We:r++,o+=e[t][1],t++;break;case Xe:n++,i+=e[t][1],t++;break;case Me:n+r>1?(n!==0&&r!==0&&(s=EI(o,i),s!==0&&(t-n-r>0&&e[t-n-r-1][0]===Me?e[t-n-r-1][1]+=o.substring(0,s):(e.splice(0,0,new ke(Me,o.substring(0,s))),t++),o=o.substring(s),i=i.substring(s)),s=gy(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 ke(Xe,i)),t++),o.length&&(e.splice(t,0,new ke(We,o)),t++),t++):t!==0&&e[t-1][0]===Me?(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]===Me&&e[t+1][0]===Me&&(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&&yy(e)}function ui(e,t){if(!e||!t)return 6;const n=e.charAt(e.length-1),r=t.charAt(0),i=n.match(Vh),o=r.match(Vh),s=i&&n.match(qh),c=o&&r.match(qh),a=s&&n.match(Wh),u=c&&r.match(Wh),l=a&&e.match(vI),f=u&&t.match(II);return l||f?5:a||u?4:i&&!s&&c?3:s||c?2:i||o?1:0}const by="Compared values have no visual difference.",AI="Compared values serialize to the same structure.\nPrinting internal object structure without calling `toJSON` instead.";function CI(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var li={},zh;function _I(){if(zh)return li;zh=1,Object.defineProperty(li,"__esModule",{value:!0}),li.default=h;const e="diff-sequences",t=0,n=(d,m,p,y,S)=>{let T=0;for(;d<m&&p<y&&S(d,p);)d+=1,p+=1,T+=1;return T},r=(d,m,p,y,S)=>{let T=0;for(;d<=m&&p<=y&&S(m,y);)m-=1,y-=1,T+=1;return T},i=(d,m,p,y,S,T,O)=>{let A=0,_=-d,M=T[A],C=M;T[A]+=n(M+1,m,y+M-_+1,p,S);const z=d<O?d:O;for(A+=1,_+=2;A<=z;A+=1,_+=2){if(A!==d&&C<T[A])M=T[A];else if(M=C+1,m<=M)return A-1;C=T[A],T[A]=M+n(M+1,m,y+M-_+1,p,S)}return O},o=(d,m,p,y,S,T,O)=>{let A=0,_=d,M=T[A],C=M;T[A]-=r(m,M-1,p,y+M-_-1,S);const z=d<O?d:O;for(A+=1,_-=2;A<=z;A+=1,_-=2){if(A!==d&&T[A]<C)M=T[A];else if(M=C-1,M<m)return A-1;C=T[A],T[A]=M-r(m,M-1,p,y+M-_-1,S)}return O},s=(d,m,p,y,S,T,O,A,_,M,C)=>{const z=y-m,le=p-m,X=S-y-le,ie=-X-(d-1),ve=-X+(d-1);let ye=t;const fe=d<A?d:A;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,S,T),Ue=oe+Re;if(ye=O[ee],O[ee]=Ue,ie<=he&&he<=ve){const Ct=(d-1-(he+X))/2;if(Ct<=M&&_[Ct]-1<=Ue){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,or=On+1;C.nChangePreceding=d-1,d-1===_t+or-m-y?(C.aEndPreceding=m,C.bEndPreceding=y):(C.aEndPreceding=_t,C.bEndPreceding=or),C.nCommonPreceding=He,He!==0&&(C.aCommonPreceding=_t,C.bCommonPreceding=or),C.nCommonFollowing=Re,Re!==0&&(C.aCommonFollowing=oe+1,C.bCommonFollowing=Ee+1);const Ye=Ue+1,Mt=Ee+Re+1;return C.nChangeFollowing=d-1,d-1===p+S-Ye-Mt?(C.aStartFollowing=p,C.bStartFollowing=S):(C.aStartFollowing=Ye,C.bStartFollowing=Mt),!0}}}return!1},c=(d,m,p,y,S,T,O,A,_,M,C)=>{const z=S-p,le=p-m,X=S-y-le,ie=X-d,ve=X+d;let ye=t;const fe=d<M?d:M;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),Ue=oe-Re;if(ye=_[ee],_[ee]=Ue,ie<=he&&he<=ve){const Ct=(d+(he-X))/2;if(Ct<=A&&Ue-1<=O[Ct]){const Ze=Ee-Re;if(C.nChangePreceding=d,d===Ue+Ze-m-y?(C.aEndPreceding=m,C.bEndPreceding=y):(C.aEndPreceding=Ue,C.bEndPreceding=Ze),C.nCommonPreceding=Re,Re!==0&&(C.aCommonPreceding=Ue,C.bCommonPreceding=Ze),C.nChangeFollowing=d-1,d===1)C.nCommonFollowing=0,C.aStartFollowing=p,C.bStartFollowing=S;else{const He=z+_e-(Ke?he-1:he+1),nt=n(_e,p,He,S,T);C.nCommonFollowing=nt,nt!==0&&(C.aCommonFollowing=_e,C.bCommonFollowing=He);const On=_e+nt,_t=He+nt;d-1===p+S-On-_t?(C.aStartFollowing=p,C.bStartFollowing=S):(C.aStartFollowing=On,C.bStartFollowing=_t)}return!0}}}return!1},a=(d,m,p,y,S,T,O,A,_)=>{const M=y-m,C=S-p,z=p-m,le=S-y,D=le-z;let X=z,ie=z;if(O[0]=m-1,A[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,S,M,T,O,X),fe<ve)ie=o(fe,m,y,C,T,A,ie);else if(c(fe,m,p,y,S,T,O,X,A,ie,_))return}else{const ve=((d||D)+1)/2,ye=(z+le+1)/2;let fe=1;for(X=i(fe,p,S,M,T,O,X),fe+=1;fe<=ye;fe+=1)if(ie=o(fe-1,m,y,C,T,A,ie),fe<ve)X=i(fe,p,S,M,T,O,X);else if(s(fe,m,p,y,S,T,O,X,A,ie,_))return}throw new Error(`${e}: no overlap aStart=${m} aEnd=${p} bStart=${y} bEnd=${S}`)},u=(d,m,p,y,S,T,O,A,_,M)=>{if(S-y<p-m){if(T=!T,T&&O.length===1){const{foundSubsequence:Ue,isCommon:Ct}=O[0];O[1]={foundSubsequence:(Ze,He,nt)=>{Ue(Ze,nt,He)},isCommon:(Ze,He)=>Ct(He,Ze)}}const Ee=m,Re=p;m=y,p=S,y=Ee,S=Re}const{foundSubsequence:C,isCommon:z}=O[T?1:0];a(d,m,p,y,S,z,A,_,M);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;m<D&&y<X&&u(le,m,D,y,X,T,O,A,_,M),ie!==0&&C(ie,ve,ye),fe!==0&&C(fe,ee,he),_e<p&&oe<S&&u(Ke,_e,p,oe,S,T,O,A,_,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 S=n(0,d,0,m,p);if(S!==0&&y(S,0,0),d!==S||m!==S){const T=S,O=S,A=r(T,d-1,O,m-1,p),_=d-A,M=m-A,C=S+A;d!==C&&m!==C&&u(0,T,_,O,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}),A!==0&&y(A,_,M)}}return li}var MI=_I(),wy=CI(MI);function $I(e,t){return e.replace(/\s+$/,n=>t(n))}function Qc(e,t,n,r,i,o){return e.length!==0?n(`${r} ${$I(e,i)}`):r!==" "?n(r):t&&o.length!==0?n(`${r} ${o}`):""}function Sy(e,t,{aColor:n,aIndicator:r,changeLineTrailingSpaceColor:i,emptyFirstOrLastLinePlaceholder:o}){return Qc(e,t,n,r,i,o)}function xy(e,t,{bColor:n,bIndicator:r,changeLineTrailingSpaceColor:i,emptyFirstOrLastLinePlaceholder:o}){return Qc(e,t,n,r,i,o)}function Ey(e,t,{commonColor:n,commonIndicator:r,commonLineTrailingSpaceColor:i,emptyFirstOrLastLinePlaceholder:o}){return Qc(e,t,n,r,i,o)}function Gh(e,t,n,r,{patchColor:i}){return i(`@@ -${e+1},${t-e} +${n+1},${r-n} @@`)}function OI(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 A=a;for(;a!==n&&e[a][0]===Me;)a+=1;if(A!==a)if(A===0)a>r&&(o-=a-r,s=!0);else if(a===n){const _=a-A;_>r&&(o-=_-r,s=!0)}else{const _=a-A;_>i&&(o-=_-i,c+=1)}for(;a!==n&&e[a][0]!==Me;)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 S=A=>{const _=f.length;f.push(Ey(A,_===0||_===l,t)),p+=1,y+=1},T=A=>{const _=f.length;f.push(Sy(A,_===0||_===l,t)),p+=1},O=A=>{const _=f.length;f.push(xy(A,_===0||_===l,t)),y+=1};for(a=0;a!==n;){let A=a;for(;a!==n&&e[a][0]===Me;)a+=1;if(A!==a)if(A===0){a>r&&(A=a-r,d=A,m=A,p=d,y=m);for(let _=A;_!==a;_+=1)S(e[_][1])}else if(a===n){const _=a-A>r?A+r:a;for(let M=A;M!==_;M+=1)S(e[M][1])}else{const _=a-A;if(_>i){const M=A+r;for(let z=A;z!==M;z+=1)S(e[z][1]);f[h]=Gh(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)S(e[z][1])}else for(let M=A;M!==a;M+=1)S(e[M][1])}for(;a!==n&&e[a][0]===Xe;)T(e[a][1]),a+=1;for(;a!==n&&e[a][0]===We;)O(e[a][1]),a+=1}return u&&(f[h]=Gh(d,p,m,y,t)),f.join(`
|
|
60
|
-
`)}function
|
|
61
|
-
`)}const
|
|
57
|
+
`,maxOutputLength:(e==null?void 0:e.maxOutputLength)??mt.maxOutputLength,_outputLengthPerDepth:[]}}function WA(e){return Array.from({length:e+1}).join(" ")}function gt(e,t){if(t&&(UA(t),t.plugins)){const r=oy(t.plugins,e);if(r!==null)return iy(r,e,$h(t),"",0,[])}const n=ny(e,ay(t),cy(t),uy(t));return n!==null?n:ry(e,$h(t),"",0,[])}const Eo={AsymmetricMatcher:P6,DOMCollection:B6,DOMElement:X6,Immutable:hA,ReactElement:AA,ReactTestComponent:$A,Error:DA},Mh={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"]},zA={special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:"red"},Jn="…";function GA(e,t){const n=Mh[zA[t]]||Mh[t]||"";return n?`\x1B[${n[0]}m${String(e)}\x1B[${n[1]}m`:String(e)}function KA({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=GA),f}function HA(e){return e>="\uD800"&&e<="\uDBFF"}function gn(e,t,n=Jn){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&&HA(e[o-1])&&(o=o-1),`${e.slice(0,o)}${n}`}return e}function It(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=`${Jn}(${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=`${Jn}(${e.length-u-1})`;break}a=""}return`${s}${a}`}function YA(e){return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?e:JSON.stringify(e).replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'")}function Nr([e,t],n){return n.truncate-=2,typeof e=="string"?e=YA(e):typeof e!="number"&&(e=`[${n.inspect(e,n)}]`),n.truncate-=e.length,t=n.inspect(t,n),`${e}: ${t}`}function JA(e,t){const n=Object.keys(e).slice(e.length);if(!e.length&&!n.length)return"[]";t.truncate-=4;const r=It(e,t);t.truncate-=r.length;let i="";return n.length&&(i=It(n.map(o=>[o,e[o]]),t,Nr)),`[ ${r}${i?`, ${i}`:""} ]`}const XA=e=>typeof Buffer=="function"&&e instanceof Buffer?"Buffer":e[Symbol.toStringTag]?e[Symbol.toStringTag]:e.constructor.name;function qt(e,t){const n=XA(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(gn(e[s],t.truncate),"number")}${s===e.length-1?"":", "}`;if(t.truncate-=c.length,e[s]!==e.length&&t.truncate<=3){i+=`${Jn}(${e.length-e[s]+1})`;break}i+=c}let o="";return r.length&&(o=It(r.map(s=>[s,e[s]]),t,Nr)),`${n}[ ${i}${o?`, ${o}`:""} ]`}function ZA(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${gn(r[1],t.truncate-i.length-1)}`,"date")}function Oh(e,t){const n=e[Symbol.toStringTag]||"Function",r=e.name;return r?t.stylize(`[${n} ${gn(r,t.truncate-11)}]`,"special"):t.stylize(`[${n}]`,"special")}function QA([e,t],n){return n.truncate-=4,e=n.inspect(e,n),n.truncate-=e.length,t=n.inspect(t,n),`${e} => ${t}`}function eI(e){const t=[];return e.forEach((n,r)=>{t.push([r,n])}),t}function tI(e,t){return e.size===0?"Map{}":(t.truncate-=7,`Map{ ${It(eI(e),t,QA)} }`)}const nI=Number.isNaN||(e=>e!==e);function Ph(e,t){return nI(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(gn(String(e),t.truncate),"number")}function Nh(e,t){let n=gn(e.toString(),t.truncate-1);return n!==Jn&&(n+="n"),t.stylize(n,"bigint")}function rI(e,t){const n=e.toString().split("/")[2],r=t.truncate-(2+n.length),i=e.source;return t.stylize(`/${gn(i,r)}/${n}`,"regexp")}function iI(e){const t=[];return e.forEach(n=>{t.push(n)}),t}function oI(e,t){return e.size===0?"Set{}":(t.truncate-=7,`Set{ ${It(iI(e),t)} }`)}const jh=new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]","g"),sI={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","'":"\\'","\\":"\\\\"},aI=16;function cI(e){return sI[e]||`\\u${`0000${e.charCodeAt(0).toString(aI)}`.slice(-4)}`}function Fh(e,t){return jh.test(e)&&(e=e.replace(jh,cI)),t.stylize(`'${gn(e,t.truncate-2)}'`,"string")}function Rh(e){return"description"in Symbol.prototype?e.description?`Symbol(${e.description})`:"Symbol()":e.toString()}const uI=()=>"Promise{…}";function _i(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=It(n.map(c=>[c,e[c]]),t,Nr),o=It(r.map(c=>[c,e[c]]),t,Nr);t.seen.pop();let s="";return i&&o&&(s=", "),`{ ${i}${s}${o} }`}const Ts=typeof Symbol<"u"&&Symbol.toStringTag?Symbol.toStringTag:!1;function lI(e,t){let n="";return Ts&&Ts in e&&(n=e[Ts]),n=n||e.constructor.name,(!n||n==="_class")&&(n="<Anonymous Class>"),t.truncate-=n.length,`${n}${_i(e,t)}`}function fI(e,t){return e.length===0?"Arguments[]":(t.truncate-=13,`Arguments[ ${It(e,t)} ]`)}const hI=["stack","line","column","name","message","fileName","lineNumber","columnNumber","number","description","cause"];function dI(e,t){const n=Object.getOwnPropertyNames(e).filter(s=>hI.indexOf(s)===-1),r=e.name;t.truncate-=r.length;let i="";if(typeof e.message=="string"?i=gn(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=It(n.map(s=>[s,e[s]]),t,Nr);return`${r}${i}${o?` { ${o} }`:""}`}function pI([e,t],n){return n.truncate-=3,t?`${n.stylize(String(e),"yellow")}=${n.stylize(`"${t}"`,"string")}`:`${n.stylize(String(e),"yellow")}`}function Ia(e,t){return It(e,t,mI,`
|
|
58
|
+
`)}function mI(e,t){switch(e.nodeType){case 1:return ly(e,t);case 3:return t.inspect(e.data,t);default:return t.inspect(e,t)}}function ly(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+=It(n.map(l=>[l,e.getAttribute(l)]),t,pI," ")),t.truncate-=c.length;const a=t.truncate;let u=Ia(e.children,t);return u&&u.length>a&&(u=`${Jn}(${e.children.length})`),`${i}${c}${o}${u}${s}`}const gI=typeof Symbol=="function"&&typeof Symbol.for=="function",vs=gI?Symbol.for("chai/inspect"):"@@chai/inspect",As=Symbol.for("nodejs.util.inspect.custom"),Lh=new WeakMap,Dh={},Bh={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:Ph,Number:Ph,bigint:Nh,BigInt:Nh,string:Fh,String:Fh,function:Oh,Function:Oh,symbol:Rh,Symbol:Rh,Array:JA,Date:ZA,Map:tI,Set:oI,RegExp:rI,Promise:uI,WeakSet:(e,t)=>t.stylize("WeakSet{…}","special"),WeakMap:(e,t)=>t.stylize("WeakMap{…}","special"),Arguments:fI,Int8Array:qt,Uint8Array:qt,Uint8ClampedArray:qt,Int16Array:qt,Uint16Array:qt,Int32Array:qt,Uint32Array:qt,Float32Array:qt,Float64Array:qt,Generator:()=>"",DataView:()=>"",ArrayBuffer:()=>"",Error:dI,HTMLCollection:Ia,NodeList:Ia},yI=(e,t,n,r)=>vs in e&&typeof e[vs]=="function"?e[vs](t):As in e&&typeof e[As]=="function"?e[As](t.depth,t,r):"inspect"in e&&typeof e.inspect=="function"?e.inspect(t.depth,t):"constructor"in e&&Lh.has(e.constructor)?Lh.get(e.constructor)(e,t):Dh[n]?Dh[n](e,t):"",bI=Object.prototype.toString;function $i(e,t={}){const n=KA(t,$i),{customInspect:r}=n;let i=e===null?"null":typeof e;if(i==="object"&&(i=bI.call(e).slice(8,-1)),i in Bh)return Bh[i](e,n);if(r&&e){const s=yI(e,n,i,$i);if(s)return typeof s=="string"?s:$i(s,n)}const o=e?Object.getPrototypeOf(e):!1;return o===Object.prototype||o===null?_i(e,n):e&&typeof HTMLElement=="function"&&e instanceof HTMLElement?ly(e,n):"constructor"in e?e.constructor!==Object?lI(e,n):_i(e,n):e===Object(e)?_i(e,n):n.stylize(String(e),i)}const{AsymmetricMatcher:fy,DOMCollection:hy,DOMElement:wI,Immutable:dy,ReactElement:py,ReactTestComponent:my}=Eo,xI=[my,py,wI,hy,dy,fy];function xt(e,t=10,{maxLength:n,filterNode:r,...i}={}){const o=n??1e4;let s;const c=typeof r=="string"?SI(r):r,a=c?[my,py,J6(c),hy,dy,fy]:xI;try{s=gt(e,{maxDepth:t,escapeString:!1,plugins:a,...i})}catch{s=gt(e,{callToJSON:!1,maxDepth:t,escapeString:!1,plugins:a,...i})}return s.length>=o&&t>1?xt(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 gy=/%[sdjifoOc%]/g;function EI(e,t={}){const n=(c,a)=>t.prettifyObject?xt(c,void 0,{printBasicPrototype:!1,escapeString:!1}):yy(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(gy,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 TI(...e){return EI(e)}function yy(e,t={}){return t.truncate===0&&(t.truncate=Number.POSITIVE_INFINITY),$i(e,t)}function vI(e,t={}){typeof t.truncate>"u"&&(t.truncate=40);const n=yy(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 AI(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 Je(e,t,n){const r=typeof e;if(!n.includes(r))throw new TypeError(`${t} value must be ${n.join(" or ")}, received "${r}"`)}function II(e){return e===null||typeof e!="function"&&typeof e!="object"}function kI(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 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 qI(e,t){return e.map((n,r,i)=>{const o=n[1],s=r===0||r===i.length-1;switch(n[0]){case Xe:return Iy(o,s,t);case ze:return ky(o,s,t);default:return Cy(o,s,t)}}).join(`
|
|
61
|
+
`)}const Is=e=>e,_y=5,WI=0;function zI(){return{aAnnotation:"Expected",aColor:Me.green,aIndicator:"-",bAnnotation:"Received",bColor:Me.red,bIndicator:"+",changeColor:Me.inverse,changeLineTrailingSpaceColor:Is,commonColor:Me.dim,commonIndicator:" ",commonLineTrailingSpaceColor:Is,compareKeys:void 0,contextLines:_y,emptyFirstOrLastLinePlaceholder:"",expand:!1,includeChangeCounts:!1,omitAnnotationLines:!1,patchColor:Me.yellow,printBasicPrototype:!1,truncateThreshold:WI,truncateAnnotation:"... Diff result is truncated",truncateAnnotationColor:Is}}function GI(e){return e&&typeof e=="function"?e:void 0}function KI(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>=0?e:_y}function Mn(e={}){return{...zI(),...e,compareKeys:GI(e.compareKeys),contextLines:KI(e.contextLines)}}function Un(e){return e.length===1&&e[0].length===0}function HI(e){let t=0,n=0;return e.forEach(r=>{switch(r[0]){case Xe:t+=1;break;case ze:n+=1;break}}),{a:t,b:n}}function YI({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)),T=m.length-d.length,O=" ".repeat(Math.max(0,T)),k=" ".repeat(Math.max(0,-T));u=`${y} ${n} ${O}${d}`,l=`${x} ${o} ${k}${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 ru(e,t,n){return YI(n,HI(e))+(n.expand?qI(e,n):VI(e,n))+(t?n.truncateAnnotationColor(`
|
|
65
|
+
${n.truncateAnnotation}`):"")}function To(e,t,n){const r=Mn(n),[i,o]=$y(Un(e)?[]:e,Un(t)?[]:t,r);return ru(i,o,r)}function JI(e,t,n,r,i){if(Un(e)&&Un(n)&&(e=[],n=[]),Un(t)&&Un(r)&&(t=[],r=[]),e.length!==n.length||t.length!==r.length)return To(e,t,i);const[o,s]=$y(n,r,i);let c=0,a=0;return o.forEach(u=>{switch(u[0]){case Xe:u[1]=e[c],c+=1;break;case ze:u[1]=t[a],a+=1;break;default:u[1]=t[a],c+=1,a+=1}}),ru(o,s,Mn(i))}function $y(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(Ay(o,s,a,(d,m,p)=>{for(;l!==m;l+=1)u.push(new Ie(Xe,e[l]));for(;f!==p;f+=1)u.push(new Ie(ze,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(Xe,e[l]));for(;f!==s;f+=1)u.push(new Ie(ze,t[f]));return[u,c]}function Xh(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 Zh(e){return e.includes(`\r
|
|
66
66
|
`)?`\r
|
|
67
67
|
`:`
|
|
68
|
-
`}function
|
|
68
|
+
`}function XI(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=
|
|
70
|
+
`),p=Zh(e),y=Zh(t),x=d?`${e.split(p,i).join(p)}
|
|
71
71
|
`:e,T=m?`${t.split(y,i).join(y)}
|
|
72
|
-
`:t;o=
|
|
72
|
+
`:t;o=x.length,s=T.length}const c=o!==e.length||s!==t.length,a=(d,m)=>e[d]===t[m];let u=0,l=0;const f=[];return Ay(o,s,a,(d,m,p)=>{u!==m&&f.push(new Ie(Xe,e.slice(u,m))),l!==p&&f.push(new Ie(ze,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(Xe,e.slice(u))),l!==s&&f.push(new Ie(ze,t.slice(l))),[f,c]}function ZI(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 Qh{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,ZI(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 QI{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
|
|
77
|
-
`))}return e.some(n=>n[0]
|
|
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 e4(e,t){const n=new Qh(Xe,t),r=new Qh(ze,t),i=new QI(n,r);return e.forEach(o=>{switch(o[0]){case Xe:n.align(o);break;case ze:r.align(o);break;default:i.align(o)}}),i.getLines()}function t4(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 n4(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]=My(r?`${e}
|
|
80
80
|
`:e,r?`${t}
|
|
81
|
-
`:t,!0,n);if(
|
|
81
|
+
`:t,!0,n);if(t4(i,r)){const s=Mn(n),c=e4(i,s.changeColor);return ru(c,o,s)}}return To(e.split(`
|
|
82
82
|
`),t.split(`
|
|
83
|
-
`),n)}function
|
|
83
|
+
`),n)}function My(e,t,n,r){const[i,o]=XI(e,t,r);return PI(i),[i,o]}function Ca(e,t){const{commonColor:n}=Mn(t);return n(e)}const{AsymmetricMatcher:r4,DOMCollection:i4,DOMElement:o4,Immutable:s4,ReactElement:a4,ReactTestComponent:c4}=Eo,Oy=[c4,a4,o4,i4,s4,r4,Eo.Error],qi={maxDepth:20,plugins:Oy},Py={callToJSON:!1,maxDepth:8,plugins:Oy},qr=(e,t)=>t;function tr(e,t,n,r=qr){if(Object.is(e,t))return"";const i=Xh(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!==Xh(t)){let x=function(k){return k.length<=y?k:`${k.slice(0,y)}...`};const{aAnnotation:c,aColor:a,aIndicator:u,bAnnotation:l,bColor:f,bIndicator:h}=Mn(n),d=Wi(Py,n);let m=gt(e,d),p=gt(t,d);const y=1e5;m=r("expected",x(m)),p=r("actual",x(p));const T=`${a(`${u} ${c}:`)}
|
|
84
84
|
${m}`,O=`${f(`${h} ${l}:`)}
|
|
85
85
|
${p}`;return`${T}
|
|
86
86
|
|
|
87
|
-
${O}`}if(!s)switch(i){case"string":return
|
|
87
|
+
${O}`}if(!s)switch(i){case"string":return To(e.split(`
|
|
88
88
|
`),t.split(`
|
|
89
|
-
`),n);case"boolean":case"number":return
|
|
89
|
+
`),n);case"boolean":case"number":return l4(e,t,n,r);case"map":return ks(ed(e),ed(t),n,r);case"set":return ks(td(e),td(t),n,r);default:return ks(e,t,n,r)}}function u4(e){return(t,n)=>(e[t]=n,n)}function l4(e,t,n,r=qr){const i=r("expected",gt(e,qi)),o=r("actual",gt(t,qi));return i===o?"":To(i.split(`
|
|
90
90
|
`),o.split(`
|
|
91
|
-
`),n)}function
|
|
91
|
+
`),n)}function ed(e){return new Map(Array.from(e.entries()).sort())}function td(e){return new Set(Array.from(e.values()).sort())}function ks(e,t,n,r=qr){let i,o=!1;try{const c=Wi(qi,n);i=nd(e,t,c,n,r)}catch{o=!0}const s=Ca(vy,n);if(i===void 0||i===s){const c=Wi(Py,n);i=nd(e,t,c,n,r),i!==s&&!o&&(i=`${Ca(RI,n)}
|
|
92
92
|
|
|
93
|
-
${i}`)}return i}function
|
|
93
|
+
${i}`)}return i}function f4(e){return Wi(qi,e)}function Wi(e,t){const{compareKeys:n,printBasicPrototype:r,maxDepth:i}=Mn(t);return{...e,compareKeys:n,printBasicPrototype:r,maxDepth:i??e.maxDepth}}function nd(e,t,n,r,i=qr){const o={...n,indent:0},s=gt(e,o),c=gt(t,o);if(s===c)return Ca(vy,r);{const a=i("expected",gt(e,n)),u=i("actual",gt(t,n));return JI(a.split(`
|
|
94
94
|
`),u.split(`
|
|
95
95
|
`),s.split(`
|
|
96
96
|
`),c.split(`
|
|
97
|
-
`),r)}}const
|
|
97
|
+
`),r)}}const rd=2e4;function id(e){return jr(e)==="Object"&&typeof e.asymmetricMatch=="function"}function hi(e,t){const n=jr(e),r=jr(t);return n===r&&(n==="Object"||n==="Array")}function Ny(e,t,n,r){const{aAnnotation:i,bAnnotation:o}=Mn(n);if(typeof t=="string"&&typeof e=="string"&&t.length>0&&e.length>0&&t.length<=rd&&e.length<=rd&&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 n4(t,e,n);const[h]=My(t,e),d=h.some(x=>x[0]===$e),m=h4(i,o),p=m(i)+m4(od(h,Xe,d)),y=m(o)+p4(od(h,ze,d));return`${p}
|
|
100
|
+
${y}`}const s=Uh(t,{forceWritable:!0}),c=Uh(e,{forceWritable:!0}),{replacedExpected:a,replacedActual:u}=Mi(c,s),l=r?u4(r):qr;return tr(a,u,n,l)}function Mi(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}):hi(e,t)?n.has(e)||r.has(t)?{replacedActual:e,replacedExpected:t}:(n.add(e),r.add(t),wy(t).forEach(i=>{const o=t[i],s=e[i];if(id(o)){if(o.asymmetricMatch(s))t[i]=s;else if("sample"in o&&o.sample!==void 0&&hi(s,o.sample)){const c=Mi(s,o.sample,n,r);e[i]=c.replacedActual,t[i]=c.replacedExpected}}else if(id(s)){if(s.asymmetricMatch(o))e[i]=o;else if("sample"in s&&s.sample!==void 0&&hi(s.sample,o)){const c=Mi(s.sample,o,n,r);e[i]=c.replacedActual,t[i]=c.replacedExpected}}else if(hi(s,o)){const c=Mi(s,o,n,r);e[i]=c.replacedActual,t[i]=c.replacedExpected}}),{replacedActual:e,replacedExpected:t}):{replacedActual:e,replacedExpected:t}}function h4(...e){const t=e.reduce((n,r)=>r.length>n?r.length:n,0);return n=>`${n}: ${" ".repeat(t-n.length)}`}const d4="·";function jy(e){return e.replace(/\s+$/gm,t=>d4.repeat(t.length))}function p4(e){return Me.red(jy(xt(e)))}function m4(e){return Me.green(jy(xt(e)))}function od(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 g4="@@__IMMUTABLE_RECORD__@@",y4="@@__IMMUTABLE_ITERABLE__@@";function b4(e){return e&&(e[y4]||e[g4])}const w4=Object.getPrototypeOf({});function sd(e){return e instanceof Error?`<unserializable>: ${e.message}`:typeof e=="string"?`<unserializable>: ${e}`:"<unserializable>"}function cn(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"&&hr(()=>n.message??(n.message=ad(e.message))),typeof e.stack=="string"&&hr(()=>n.stack??(n.stack=e.stack)),typeof e.name=="string"&&hr(()=>n.name??(n.name=e.name)),e.cause!=null&&hr(()=>n.cause??(n.cause=cn(e.cause,t)))),cn(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(b4(e))return cn(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 cn(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]=cn(r,t)}catch(o){n[i]=sd(o)}}),n}else{const n=Object.create(null);t.set(e,n);let r=e;for(;r&&r!==w4;)Object.getOwnPropertyNames(r).forEach(i=>{if(!(i in n))try{n[i]=cn(e[i],t)}catch(o){delete n[i],n[i]=sd(o)}}),r=Object.getPrototypeOf(r);return e instanceof Error&&hr(()=>n.message=ad(e.message)),n}}function hr(e){try{return e()}catch{}}function ad(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 Fy(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=Ny(r.actual,r.expected,i,r),r.expected=cd(r.expected,i),r.actual=cd(r.actual,i)}try{!n.has(r)&&typeof r.cause=="object"&&(n.add(r),r.cause=Fy(r.cause,t,n))}catch{}try{return cn(r)}catch(i){return cn(new Error(`Failed to fully serialize error: ${i==null?void 0:i.message}
|
|
101
|
+
Inner error message: ${r==null?void 0:r.message}`))}}function cd(e,t){return typeof e!="string"?gt(e,f4(t)):e}const ud=Symbol("vitest:SAFE_TIMERS");function nr(){const{setTimeout:e,setInterval:t,clearInterval:n,clearTimeout:r,setImmediate:i,clearImmediate:o,queueMicrotask:s}=globalThis[ud]||globalThis,{nextTick:c}=globalThis[ud]||globalThis.process||{};return{nextTick:c,setTimeout:e,setInterval:t,clearInterval:n,clearTimeout:r,setImmediate:i,clearImmediate:o,queueMicrotask:s}}function x4(e,t=setTimeout){return new Promise(n=>t(n,e))}const S4=/^[A-Za-z]:\//;function E4(e=""){return e&&e.replace(/\\/g,"/").replace(S4,t=>t.toUpperCase())}const T4=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;function v4(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}const Ry=function(...e){e=e.map(r=>E4(r));let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const i=r>=0?e[r]:v4();!i||i.length===0||(t=`${i}/${t}`,n=ld(i))}return t=A4(t,!n),n&&!ld(t)?`/${t}`:t.length>0?t:"."};function A4(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 ld=function(e){return T4.test(e)};var I4=44,fd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",k4=new Uint8Array(64),Ly=new Uint8Array(128);for(let e=0;e<fd.length;e++){const t=fd.charCodeAt(e);k4[e]=t,Ly[t]=e}function dr(e,t){let n=0,r=0,i=0;do{const s=e.next();i=Ly[s],n|=(i&31)<<r,r+=5}while(i&32);const o=n&1;return n>>>=1,o&&(n=-2147483648|-n),t+n}function hd(e,t){return e.pos>=t?!1:e.peek()!==I4}var C4=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 _4(e){const{length:t}=e,n=new C4(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=dr(n,i),i<h&&(f=!1),h=i,hd(n,u)?(o=dr(n,o),s=dr(n,s),c=dr(n,c),hd(n,u)?(a=dr(n,a),d=[i,o,s,c,a]):d=[i,o,s,c]):d=[i],l.push(d),n.pos++}f||$4(l),r.push(l),n.pos=u+1}while(n.pos<=t);return r}function $4(e){e.sort(M4)}function M4(e,t){return e[0]-t[0]}var vo=0,O4=1,P4=2,N4=3,j4=4,zi=!1;function F4(e,t,n,r){for(;n<=r;){const i=n+(r-n>>1),o=e[i][vo]-t;if(o===0)return zi=!0,i;o<0?n=i+1:r=i-1}return zi=!1,n-1}function R4(e,t,n){for(let r=n+1;r<e.length&&e[r][vo]===t;n=r++);return n}function L4(e,t,n){for(let r=n-1;r>=0&&e[r][vo]===t;n=r--);return n}function D4(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 zi=s!==-1&&e[s][vo]===t,s;t>=o?c=s===-1?0:s:a=s}return n.lastKey=r,n.lastNeedle=t,n.lastIndex=F4(e,t,c,a)}var B4="`line` must be greater than 0 (lines start at line 1)",U4="`column` must be greater than or equal to 0 (columns start at column 0)",dd=-1,V4=1;function q4(e){var t;return(t=e)._decoded||(t._decoded=_4(e._encoded))}function W4(e,t){let{line:n,column:r,bias:i}=t;if(n--,n<0)throw new Error(B4);if(r<0)throw new Error(U4);const o=q4(e);if(n>=o.length)return di(null,null,null,null);const s=o[n],c=z4(s,e._decodedMemo,n,r,i||V4);if(c===-1)return di(null,null,null,null);const a=s[c];if(a.length===1)return di(null,null,null,null);const{names:u,resolvedSources:l}=e;return di(l[a[O4]],a[P4]+1,a[N4],a.length===5?u[a[j4]]:null)}function di(e,t,n,r){return{source:e,line:t,column:n,name:r}}function z4(e,t,n,r,i){let o=D4(e,r,t,n);return zi?o=(i===dd?R4:L4)(e,r,o):i===dd&&o++,o===-1||o===e.length?-1:o}const iu=/^\s*at .*(?:\S:\d+|\(native\))/m,G4=/^(?:eval@)?(?:\[native code\])?$/,K4=["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_/],H4=Date.now().toString().length,Y4=new RegExp(`vitest=\\d{${H4}}`);function Dy(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(Y4,"").replace(/[?&]$/,"")),[r,n[2]||void 0,n[3]||void 0]}function By(e){let t=e.trim();if(G4.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]=Dy(r);return!o||!s||!c?null:{file:o,method:i||"",line:Number.parseInt(s),column:Number.parseInt(c)}}function Uy(e){const t=e.trim();return iu.test(t)?Vy(t):By(t)}function Vy(e){let t=e.trim();if(!iu.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]=Dy(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:Ry(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 Cs(e,t={}){const{ignoreStackEntries:n=K4}=t;let r=iu.test(e)?X4(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 pd(n,o.file)?null:o;const c=new Q4(s,o.file),a=tk(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)),pd(n,d)?null:u!=null&&l!=null?{line:u,column:l,file:d,method:h||o.method}:o}).filter(o=>o!=null)}function pd(e,t){return e.some(n=>t.match(n))}function J4(e){return e.split(`
|
|
102
|
+
`).map(t=>By(t)).filter(by)}function X4(e){return e.split(`
|
|
103
|
+
`).map(t=>Vy(t)).filter(by)}function Z4(e,t={}){if(!e||II(e))return[];if("stacks"in e&&e.stacks)return e.stacks;const n=e.stack||"";let r=typeof n=="string"?Cs(n,t):[];if(!r.length){const i=e;i.fileName!=null&&i.lineNumber!=null&&i.columnNumber!=null&&(r=Cs(`${i.fileName}:${i.lineNumber}:${i.columnNumber}`,t)),i.sourceURL!=null&&i.line!=null&&i._column!=null&&(r=Cs(`${i.sourceURL}:${i.line}:${i.column}`,t))}return t.frameFilter&&(r=r.filter(i=>t.frameFilter(e,i)!==!1)),e.stacks=r,r}class Q4{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=ek(),this.url=n,this.resolvedSources=(o||[]).map(s=>Ry(n,"..",s||""))}}function ek(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function tk(e,t){const n=W4(e,t);return n.column==null?null:n}class nk 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 on extends Error{constructor(){super(...arguments);R(this,"name","FixtureDependencyError")}}class rk extends Error{constructor(){super(...arguments);R(this,"name","FixtureAccessError")}}class md extends Error{constructor(){super(...arguments);R(this,"name","FixtureParseError")}}const ik=new WeakMap,qy=new WeakMap,Wy=new WeakMap;function ok(e,t){ik.set(e,t)}function sk(e,t){qy.set(e,t)}function ak(e){return qy.get(e)}function ck(e,t){Wy.set(e,t)}function uk(e){return Wy.get(e)}const Oi=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 Rt(t)&&Object.keys(t).some(n=>Pe._fixtureOptionKeys.includes(n))}extend(t,n){const{suite:r}=Dt(),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}=Dt(),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 on(`The "${s}" fixture was already registered with a "${a.scope}" scope.`)),f.auto!==a.auto&&o.push(new on(`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 on(`The "${s}" fixture has unknown scope "${a.scope}".`)),!r&&a.scope!=="test"&&o.push(new on(`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=Rr(u)?ou(u):new Set,d={name:s,value:u,auto:a.auto??!1,injected:a.injected??!1,scope:a.scope??"test",deps:h,parent:f};Rr(u)&&Object.assign(u,{[Oi]: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 on(`The "${s.name}" fixture depends on unknown fixture "${c}".`));continue}if(c===s.name&&!s.parent){o.push(new on(`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 on(`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 Fr=Pe;const qn=new WeakMap,_s=new WeakMap;function Wr(e,t){const n=Dt(),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&&dk(e,t.suiteHook,t.stackTraceError),e({});const s=(t==null?void 0:t.fixtures)||ak(o);if(!s)return e(o);const c=s.get(r);if(!c.size)return e(o);const a=[],u=ou(e);for(const m of c.values())(lk(m,t)||u.has(m.name))&&a.push(m);if(!a.length)return e(o);qn.has(o)||qn.set(o,[]);const l=qn.get(o),f=Gy(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(T=>`"${T.name}"`).join(", "),y={aroundAll:"aroundEach",beforeAll:"beforeEach",afterAll:"afterEach"},x=new on(`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}}_s.has(o)||_s.set(o,new WeakSet);const h=_s.get(o);for(const m of f)if(m.scope==="test"){if(h.has(m))continue;h.add(m);const p=await fk(m,o,l);o[m.name]=p,l.push(()=>{h.delete(m)})}else{const p=await hk(s,r,m);o[m.name]=p}return e(o)}}function lk(e,t){return!(!e.auto||t!=null&&t.suiteHook&&e.scope==="test")}function Rr(e){return typeof e=="function"}function fk(e,t,n){return Rr(e.value)?zy(e.value,e.name,t,n):e.value}const pi=new WeakMap;async function hk(e,t,n){const r=e.getWorkerContext(),i=e.getFileContext(t.file),o=n.scope==="worker"?r:i;if(!Rr(n.value))return o[n.name]=n.value,n.value;if(n.name in o)return o[n.name];if(pi.has(n))return pi.get(n);qn.has(o)||qn.set(o,[]);const s=qn.get(o),c=zy(n.value,n.name,n.scope==="file"?{...r,...i}:o,s).then(a=>(o[n.name]=a,pi.delete(n),a));return pi.set(n,c),c}async function zy(e,t,n,r){const i=qh(),o=Oi in e&&e[Oi]instanceof Error?e[Oi]:void 0;let s=!1;const c=e(n,async a=>{s=!0,i.resolve(a);const u=qh();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 Gy(e,t,n=new Set,r=[]){return e.forEach(i=>{if(!r.includes(i)){if(!Rr(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),Gy([...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 dk(e,t,n){var i;const r=ou(e,{sourceError:n,suiteHook:t});if(r.size){const o=new rk(`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 _a=Symbol("$vitest:fixture-props"),$a=Symbol("$vitest:fixture-prop-names");function Gi(e,t){Object.defineProperty(e,_a,{value:t,enumerable:!1})}function mi(e,t){return e[$a]=t,t}function ou(e,{sourceError:t,suiteHook:n}={}){var h,d;if($a in e)return e[$a];const{index:r=0,original:i=e}=_a in e?e[_a]:{};let o=kI(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 mi(e,new Set);const c=gd(s[1]);if(!c.length)return mi(e,new Set);const a=c[r];if(!a)return mi(e,new Set);if(!(a[0]==="{"&&a.endsWith("}"))){const m=En(r+1),p=new md(`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 ${En(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=gd(u).map(m=>m.replace(/:.*|=.*/g,"")),f=l.at(-1);if(f&&f.startsWith("...")){const m=new md(`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 mi(e,new Set(l))}function gd(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}const Ky=Symbol("kChainableContext");function Gt(e){return e==null?void 0:e[Ky]}function Hy(e,t,n){function r(o){const s=function(...c){return t.apply(o,c)};Object.assign(s,t),Object.defineProperty(s,Ky,{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 In(){return au().config.hookTimeout}const Yy=Symbol.for("VITEST_CLEANUP_TIMEOUT"),Jy=Symbol.for("VITEST_CLEANUP_STACK_TRACE"),Xy=Symbol.for("VITEST_AROUND_TIMEOUT"),Zy=Symbol.for("VITEST_AROUND_STACK_TRACE");function pk(e,t=In()){Je(e,'"beforeAll" callback',["function"]);const n=new Error("STACK_TRACE_ERROR"),r=Gt(this);return Dt().on("beforeAll",Object.assign(kn(su("beforeAll",e,r,n),t,!0,n),{[Yy]:t,[Jy]:n}))}function mk(e,t){Je(e,'"afterAll" callback',["function"]);const n=Gt(this),r=new Error("STACK_TRACE_ERROR");return Dt().on("afterAll",kn(su("afterAll",e,n,r),t??In(),!0,r))}function gk(e,t=In()){Je(e,'"beforeEach" callback',["function"]);const n=new Error("STACK_TRACE_ERROR"),r=(i,o)=>Wr(e,{suite:o})(i);return Dt().on("beforeEach",Object.assign(kn(r,t??In(),!0,n,uu),{[Yy]:t,[Jy]:n}))}function yk(e,t){Je(e,'"afterEach" callback',["function"]);const n=(r,i)=>Wr(e,{suite:i})(r);return Dt().on("afterEach",kn(n,t??In(),!0,new Error("STACK_TRACE_ERROR"),uu))}function bk(e,t){Je(e,'"aroundAll" callback',["function"]);const n=new Error("STACK_TRACE_ERROR"),r=t??In(),i=Gt(this);return Dt().on("aroundAll",Object.assign(su("aroundAll",e,i,n,1),{[Xy]:r,[Zy]:n}))}function wk(e,t){Je(e,'"aroundEach" callback',["function"]);const n=new Error("STACK_TRACE_ERROR"),r=t??In(),i=(o,s,c)=>{const a=l=>e(o,l,c);return Gi(a,{index:1,original:e}),Wr(a,{suite:c})(s)};return Dt().on("aroundEach",Object.assign(i,{[Xy]:r,[Zy]:n}))}function su(e,t,n,r,i=0){return(...o)=>{const s=o.at(-1),c=o.slice(0,-1),a=h=>t(...c,h,s);Gi(a,{index:i,original:t});const u=n==null?void 0:n.getFixtures(),l=u==null?void 0:u.getFileContext(s.file);return Wr(a,{suiteHook:e,fixtures:u,context:l,stackTraceError:r})()}}function Qy(e,t){const n=t.split(`
|
|
105
|
+
`).slice(1);for(const r of n){const i=Uy(r);if(i&&i.file===e)return i}}function xk(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 Sk(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 gi(e,t=" > "){return e.filter(n=>n!==void 0).join(t)}const un=Ik(),tn=cu(function(e,t,n){Dt().test.fn.call(this,hn(e),t,n)}),Ao=un;let Le,t1,Ek;function n1(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 au(){return n1(Le,"the runner"),Le}function Dt(){const e=it.currentSuite||t1;return n1(e,"the current suite"),e}function Tk(){return{beforeAll:[],afterAll:[],beforeEach:[],afterEach:[],aroundEach:[],aroundAll:[]}}const yd=Number.POSITIVE_INFINITY;function Wn(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 vk(e,t=()=>{},n,r,i){const o=[];let s;f();const c=function(m="",p={}){var fe,ee,he,Ke,_e;const y=(fe=it.currentSuite)==null?void 0:fe.suite,x=y??((ee=it.currentSuite)==null?void 0:ee.file),T=(x==null?void 0:x.tags)||[],O=Wh([...T,...Vi(p.tags)]),k=O.map(oe=>{var Re;const Ee=(Re=Le.config.tags)==null?void 0:Re.find(Ve=>Ve.name===oe);if(!Ee&&Le.config.strictTags)throw e1(Le.config.tags,oe);return Ee}).filter(oe=>oe!=null).sort((oe,Ee)=>(Ee.priority??yd)-(oe.priority??yd)).reduce((oe,Ee)=>{const{name:Re,description:Ve,priority:Ct,meta:Ze,...He}=Ee;return Object.assign(oe,He),Ze&&(oe.meta=Object.assign(oe.meta??Object.create(null),Ze)),oe},{}),_=p.meta;p={...k,...p};const $=p.timeout??Le.config.testTimeout,C=y==null?void 0:y.meta,z=k.meta,le=Object.create(null);z&&Object.assign(le,z),C&&Object.assign(le,C),_&&Object.assign(le,_);const D={id:"",name:m,fullName:gi([(y==null?void 0:y.fullName)??((Ke=(he=it.currentSuite)==null?void 0:he.file)==null?void 0:Ke.fullName),m]),fullTestName:gi([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=it.currentSuite)==null?void 0:_e.file),timeout:$,retry:p.retry??Le.config.retry,repeats:p.repeats,mode:p.only?"only":p.skip?"skip":p.todo?"todo":"run",meta:le,annotations:[],artifacts:[],tags:O},X=p.handler;D.mode==="run"&&!X&&(D.mode="todo"),(p.concurrent??(!p.sequential&&Le.config.sequence.concurrent))&&(D.concurrent=!0),D.shuffle=i==null?void 0:i.shuffle;const ie=Pk(D,Le);Object.defineProperty(D,"context",{value:ie,enumerable:!1}),sk(ie,p.fixtures??new Fr);const ve=Error.stackTraceLimit;Error.stackTraceLimit=10;const ye=new Error("STACK_TRACE_ERROR");if(Error.stackTraceLimit=ve,X&&ok(D,kn(Mk(Ak(Wr(X,{context:ie}),D),D.context.signal),$,!1,ye,(oe,Ee)=>uu([ie],Ee))),Le.config.includeTaskLocation){const oe=ye.stack,Ee=Qy(Ek,oe);Ee&&(D.location={line:Ee.line,column:Ee.column})}return o.push(D),D},a=cu(function(m,p,y){let{options:x,handler:T}=Wn(p,y);typeof i=="object"&&(x=Object.assign({},i,x));const O=this.concurrent??(!this.sequential&&(x==null?void 0:x.concurrent));x.concurrent!=null&&O!=null&&(x.concurrent=O);const k=this.sequential??(!this.concurrent&&(x==null?void 0:x.sequential));x.sequential!=null&&k!=null&&(x.sequential=k);const _=c(hn(m),{...this,...x,handler:T});_.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){uk(s)[m].push(...p)}function f(m){var T,O,k,_,$;typeof i=="number"&&(i={timeout:i});const p=(T=it.currentSuite)==null?void 0:T.suite,y=p??((O=it.currentSuite)==null?void 0:O.file),x=Vi(i==null?void 0:i.tags);xk(Le.config,x),s={id:"",type:"suite",name:e,fullName:gi([(p==null?void 0:p.fullName)??((_=(k=it.currentSuite)==null?void 0:k.file)==null?void 0:_.fullName),e]),fullTestName:gi([p==null?void 0:p.fullTestName,e]),suite:p,mode:n,each:r,file:(p==null?void 0:p.file)??(($=it.currentSuite)==null?void 0:$.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:Wh([...(y==null?void 0:y.tags)||[],...x])},ck(s,Tk())}function h(){o.length=0,f()}async function d(m){if(!m)throw new TypeError("File is required to collect tasks.");t&&await $k(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 _k(u),u}function Ak(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 Ik(){function e(t,n,r){var p;const i=it.currentSuite||t1;let{options:o,handler:s}=Wn(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)??(Le==null?void 0:Le.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)),vk(hn(t),s,h,this.each,o)}return e.each=function(t,...n){const r=Gt(this),i=r.withContext();return r.setContext("each",!0),Array.isArray(t)&&n.length&&(t=Ki(t,n)),(o,s,c)=>{const a=hn(o),u=t.every(Array.isArray),{options:l,handler:f}=Wn(s,c),h=typeof s=="function";t.forEach((d,m)=>{const p=Array.isArray(d)?d:[d];h?u?i(jt(a,p,m),f?()=>f(...p):void 0,l.timeout):i(jt(a,p,m),f?()=>f(d):void 0,l.timeout):u?i(jt(a,p,m),l,f?()=>f(...p):void 0):i(jt(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=Ki(t,n)),(r,i,o)=>{const s=hn(r),{options:c,handler:a}=Wn(i,o);t.forEach((u,l)=>{un(jt(s,Vi(u),l),c,a?()=>a(u):void 0)})}},e.skipIf=t=>t?un.skip:un,e.runIf=t=>t?un:un.skip,Hy(["concurrent","sequential","shuffle","skip","only","todo"],e)}function kk(e){const t=e;t.each=function(i,...o){const s=Gt(this),c=s.withContext();return s.setContext("each",!0),Array.isArray(i)&&o.length&&(i=Ki(i,o)),(a,u,l)=>{const f=hn(a),h=i.every(Array.isArray),{options:d,handler:m}=Wn(u,l),p=typeof u=="function";i.forEach((y,x)=>{const T=Array.isArray(y)?y:[y];p?h?c(jt(f,T,x),m?()=>m(...T):void 0,d.timeout):c(jt(f,T,x),m?()=>m(y):void 0,d.timeout):h?c(jt(f,T,x),d,m?()=>m(...T):void 0):c(jt(f,T,x),d,m?()=>m(y):void 0)}),s.setContext("each",void 0)}},t.for=function(i,...o){const c=Gt(this).withContext();return Array.isArray(i)&&o.length&&(i=Ki(i,o)),(a,u,l)=>{const f=hn(a),{options:h,handler:d}=Wn(u,l);i.forEach((m,p)=>{const y=d?x=>d(m,x):void 0;y&&Gi(y,{index:1,original:d}),c(jt(f,Vi(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)&&Fr.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 Gi(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 Gt(this).getFixtures().override(Le,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=Gt(this).getFixtures().extend(Le,c),u=cu(function(l,f,h){e.call(this,hn(l),f,h)});return Gt(u).mergeContext({fixtures:a}),u},t.describe=un,t.suite=un,t.beforeEach=gk,t.afterEach=yk,t.beforeAll=pk,t.afterAll=mk,t.aroundEach=wk,t.aroundAll=bk,Hy(["concurrent","sequential","skip","only","todo","fails"],t,{fixtures:new Fr})}function cu(e){return kk(e)}function hn(e){return typeof e=="string"?e:typeof e=="function"?e.name||"<anonymous>":String(e)}function jt(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(MI(t[l])||Object.is(t[l],-0)){let f=0;e=e.replace(/%f/g,h=>(f++,f===l+1?"-%f":h))}});const i=Rt(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?Vh(t,l):void 0,d=i?Vh(t[0],l,h):h;return vI(d,{truncate:(p=(m=Le==null?void 0:Le.config)==null?void 0:m.chaiConfig)==null?void 0:p.truncateThreshold})})}let s="",c=0;return Ck(e,gy,a=>{c<r?s+=TI(a[0],t[c++]):s+=a[0]},a=>{s+=o(a)}),s}function Ck(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 Ki(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 bd=globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now,it={currentSuite:null};function _k(e){var t;(t=it.currentSuite)==null||t.tasks.push(e)}async function $k(e,t){const n=it.currentSuite;it.currentSuite=e,await t(),it.currentSuite=n}function kn(e,t,n=!1,r,i){if(t<=0||t===Number.POSITIVE_INFINITY)return e;const{setTimeout:o,clearTimeout:s}=nr();return(function(...a){const u=bd(),l=au();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 T=Nk(n,t,r);i==null||i(a,T),h(T)}function p(T){if(l._currentTaskStartTime=void 0,l._currentTaskTimeout=void 0,s(d),bd()-u>=t){m();return}f(T)}function y(T){l._currentTaskStartTime=void 0,l._currentTaskTimeout=void 0,s(d),h(T)}try{const T=e(...a);typeof T=="object"&&T!=null&&typeof T.then=="function"?T.then(p,y):p(T)}catch(T){y(T)}})})}function Mk(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 Ma=new WeakMap;function uu([e],t){e&&Ok(e,t)}function Ok(e,t){const n=Ma.get(e);n==null||n.abort(t)}function Pk(e,t){var i;const n=function(){throw new Error("done() callback is deprecated, use promise instead")};let r=Ma.get(n);return r||(r=new AbortController,Ma.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 nk("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,i1(a.attachment)),Lk(e,Fk(e,{type:"internal:annotation",annotation:a}).then(async({annotation:l})=>{if(!t.onTestAnnotate)throw new Error("Test runner doesn't support test annotations.");await r1(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(kn(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(kn(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 Nk(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;nr();const $s=new Map,wd=[],Pi=[];function jk(e){var t;if($s.size){const n=Array.from($s).map(([i,o])=>[i,o[0],o[1]]),r=(t=e.onTaskUpdate)==null?void 0:t.call(e,n,wd);r&&(Pi.push(r),r.then(()=>Pi.splice(Pi.indexOf(r),1),()=>{})),wd.length=0,$s.clear()}}async function r1(e){jk(e),await Promise.all(Pi)}async function Fk(e,t){const n=au(),r=Qy(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)i1(o);if(t.type==="internal:annotation")return t;if(!n.onTestArtifactRecord)throw new Error("Test runner doesn't support test artifacts.");await r1(n);const i=await n.onTestArtifactRecord(e,t);return e.artifacts.push(i),i}const ht=[];for(let e=65;e<91;e++)ht.push(String.fromCharCode(e));for(let e=97;e<123;e++)ht.push(String.fromCharCode(e));for(let e=0;e<10;e++)ht.push(e.toString(10));ht.push("+","/");function Rk(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+=ht[i],t+=ht[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+=ht[i],t+=ht[o],t+=ht[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+=ht[i],t+=ht[o],t+=ht[s],t+=ht[c]}return t}function Lk(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 i1(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=Rk(e.body)),e.body!=null&&(e.bodyEncoding??(e.bodyEncoding="base64"))}const Dk="__vitest_worker__";function zr(){const e=globalThis[Dk];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 Qy(){return typeof process<"u"&&!!process.send}function Mk(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 $k(){const{setTimeout:e}=tr();return new Promise(t=>e(t,0))}async function e1(){await $k();const e=Wr(),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 e1())}function Tn(e){return typeof e=="function"&&"_isMockFunction"in e&&e._isMockFunction===!0}const Ma=new Set,au=new Set,t1=new WeakMap;function cu(e={}){var l;const{originalImplementation:t,restore:n,mockImplementation:r,resetToMockImplementation:i,resetToMockName:o}=e;n&&Ma.add(n);const s=zk(t),c=Gk(),a=jk({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()"),t1.set(a,s),au.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 S=d();return typeof S=="object"&&typeof(S==null?void 0:S.then)=="function"?S.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 Ok(e){return e!=null&&Tn(e)?e:cu({mockImplementation:e,resetToMockImplementation:!0})}function Pk(e,t,n){gi(e!=null,"The vi.spyOn() function could not find an object to spy upon. The first argument must be defined."),gi(typeof e=="object"||typeof e=="function","Vitest cannot spy on a primitive value.");const[r,i]=n1(e,t)||[];gi(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(gi(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=cu({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 n1(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 gi(e,t){if(!e)throw new Error(t)}let Nk=1;function jk({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){Fk(m,e,r),Rk(Nk++,e,r);const p={type:"incomplete",value:void 0},y={type:"incomplete",value:void 0};Lk(p,e,r),Dk(y,e,r);const S=new.target?void 0:this,[T,O]=Bk(S,e,r),[A,_]=Uk(S,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 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?t1.get(X):void 0;C[D]=cu({originalImplementation:o?ye==null?void 0:ye.mockOriginal:void 0,prototypeState:ve,prototypeConfig:ye,keepMembersImplementation:o})}}else C=M.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[A-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&&Vk(h,d),h}function Fk(e,t,n){t.calls.push(e),n==null||n.calls.push(e)}function Rk(e,t,n){t.invocationCallOrder.push(e),n==null||n.invocationCallOrder.push(e)}function Lk(e,t,n){t.results.push(e),n==null||n.results.push(e)}function Dk(e,t,n){t.settledResults.push(e),n==null||n.settledResults.push(e)}function Bk(e,t,n){const r=t.instances.push(e),i=n==null?void 0:n.instances.push(e);return[r,i]}function Uk(e,t,n){const r=t.contexts.push(e),i=n==null?void 0:n.contexts.push(e);return[r,i]}function Vk(e,t){const{properties:n,descriptors:r}=Wk(t);for(const i of n){const o=r[i];n1(e,i)||Object.defineProperty(e,i,o)}}const qk=new Set(["length","name","prototype",Symbol.for("nodejs.util.promisify.custom")]);function Wk(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 zk(e){return{mockImplementation:void 0,mockOriginal:e,mockName:"vi.fn()",onceMockImplementations:[]}}function Gk(){const e={calls:[],contexts:[],instances:[],invocationCallOrder:[],settledResults:[],results:[],get lastCall(){return e.calls.at(-1)}};return e}function Kk(){for(const e of Ma)e();Ma.clear()}function Hk(){au.forEach(e=>e.mockClear())}function Yk(){au.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 uu=Object.defineProperty,Jk=(e,t,n)=>t in e?uu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,v=(e,t)=>uu(e,"name",{value:t,configurable:!0}),lu=(e,t)=>{for(var n in t)uu(e,n,{get:t[n],enumerable:!0})},r1=(e,t,n)=>Jk(e,typeof t!="symbol"?t+"":t,n),me={};lu(me,{addChainableMethod:()=>Tu,addLengthGuard:()=>Kr,addMethod:()=>Su,addProperty:()=>wu,checkError:()=>ft,compareByInspect:()=>Hi,eql:()=>O1,events:()=>Ao,expectTypes:()=>h1,flag:()=>Y,getActual:()=>Io,getMessage:()=>du,getName:()=>Co,getOperator:()=>Au,getOwnEnumerableProperties:()=>ku,getOwnEnumerablePropertySymbols:()=>Iu,getPathInfo:()=>yu,hasProperty:()=>ko,inspect:()=>ne,isNaN:()=>Yi,isNumeric:()=>Be,isProxyEnabled:()=>Gr,isRegExp:()=>Ji,objDisplay:()=>vn,overwriteChainableMethod:()=>vu,overwriteMethod:()=>Eu,overwriteProperty:()=>xu,proxify:()=>nr,test:()=>fu,transferFlags:()=>At,type:()=>ge});var ft={};lu(ft,{compatibleConstructor:()=>s1,compatibleInstance:()=>o1,compatibleMessage:()=>a1,getConstructorName:()=>c1,getMessage:()=>u1});function vo(e){return e instanceof Error||Object.prototype.toString.call(e)==="[object Error]"}v(vo,"isErrorInstance");function i1(e){return Object.prototype.toString.call(e)==="[object RegExp]"}v(i1,"isRegExp");function o1(e,t){return vo(t)&&e===t}v(o1,"compatibleInstance");function s1(e,t){return vo(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(s1,"compatibleConstructor");function a1(e,t){const n=typeof e=="string"?e:e.message;return i1(t)?t.test(n):typeof t=="string"?n.indexOf(t)!==-1:!1}v(a1,"compatibleMessage");function c1(e){let t=e;return vo(e)?t=e.constructor.name:typeof e=="function"&&(t=e.name,t===""&&(t=new e().name||t)),t}v(c1,"getConstructorName");function u1(e){let t="";return e&&e.message?t=e.message:typeof e=="string"&&(t=e),t}v(u1,"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 fu(e,t){let n=Y(e,"negate"),r=t[0];return n?!r:r}v(fu,"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 Xk="captureStackTrace"in Error,l1=class f1 extends Error{constructor(t="Unspecified AssertionError",n,r){super(t),r1(this,"message"),this.message=t,Xk&&Error.captureStackTrace(this,r||f1);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 h1(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(h1,"expectTypes");function Io(e,t){return t.length>4?t[4]:e._obj}v(Io,"getActual");var gd={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"]},Zk={special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:"red"},Xn="…";function d1(e,t){const n=gd[Zk[t]]||gd[t]||"";return n?`\x1B[${n[0]}m${String(e)}\x1B[${n[1]}m`:String(e)}v(d1,"colorise");function p1({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=d1),f}v(p1,"normaliseOptions");function m1(e){return e>="\uD800"&&e<="\uDBFF"}v(m1,"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&&m1(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 g1(e){return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?e:JSON.stringify(e).replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'")}v(g1,"quoteComplexKey");function Zn([e,t],n){return n.truncate-=2,typeof e=="string"?e=g1(e):typeof e!="number"&&(e=`[${n.inspect(e,n)}]`),n.truncate-=e.length,t=n.inspect(t,n),`${e}: ${t}`}v(Zn,"inspectProperty");function y1(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(y1,"inspectArray");var Qk=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=Qk(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 b1(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(b1,"inspectDate");function $a(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($a,"inspectFunction");function w1([e,t],n){return n.truncate-=4,e=n.inspect(e,n),n.truncate-=e.length,t=n.inspect(t,n),`${e} => ${t}`}v(w1,"inspectMapEntry");function S1(e){const t=[];return e.forEach((n,r)=>{t.push([r,n])}),t}v(S1,"mapToEntries");function x1(e,t){return e.size===0?"Map{}":(t.truncate-=7,`Map{ ${wt(S1(e),t,w1)} }`)}v(x1,"inspectMap");var eA=Number.isNaN||(e=>e!==e);function Oa(e,t){return eA(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(Oa,"inspectNumber");function Pa(e,t){let n=nn(e.toString(),t.truncate-1);return n!==Xn&&(n+="n"),t.stylize(n,"bigint")}v(Pa,"inspectBigInt");function E1(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(E1,"inspectRegExp");function T1(e){const t=[];return e.forEach(n=>{t.push(n)}),t}v(T1,"arrayFromSet");function v1(e,t){return e.size===0?"Set{}":(t.truncate-=7,`Set{ ${wt(T1(e),t)} }`)}v(v1,"inspectSet");var yd=new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]","g"),tA={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","'":"\\'","\\":"\\\\"},nA=16;function I1(e){return tA[e]||`\\u${`0000${e.charCodeAt(0).toString(nA)}`.slice(-4)}`}v(I1,"escape");function Na(e,t){return yd.test(e)&&(e=e.replace(yd,I1)),t.stylize(`'${nn(e,t.truncate-2)}'`,"string")}v(Na,"inspectString");function ja(e){return"description"in Symbol.prototype?e.description?`Symbol(${e.description})`:"Symbol()":e.toString()}v(ja,"inspectSymbol");var rA=v(()=>"Promise{…}","getPromiseValue"),iA=rA;function br(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(br,"inspectObject");var _s=typeof Symbol<"u"&&Symbol.toStringTag?Symbol.toStringTag:!1;function k1(e,t){let n="";return _s&&_s in e&&(n=e[_s]),n=n||e.constructor.name,(!n||n==="_class")&&(n="<Anonymous Class>"),t.truncate-=n.length,`${n}${br(e,t)}`}v(k1,"inspectClass");function A1(e,t){return e.length===0?"Arguments[]":(t.truncate-=13,`Arguments[ ${wt(e,t)} ]`)}v(A1,"inspectArguments");var oA=["stack","line","column","name","message","fileName","lineNumber","columnNumber","number","description","cause"];function C1(e,t){const n=Object.getOwnPropertyNames(e).filter(s=>oA.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(C1,"inspectObject");function _1([e,t],n){return n.truncate-=3,t?`${n.stylize(String(e),"yellow")}=${n.stylize(`"${t}"`,"string")}`:`${n.stylize(String(e),"yellow")}`}v(_1,"inspectAttribute");function Gi(e,t){return wt(e,t,M1,`
|
|
122
|
-
`)}v(Gi,"inspectNodeCollection");function M1(e,t){switch(e.nodeType){case 1:return hu(e,t);case 3:return t.inspect(e.data,t);default:return t.inspect(e,t)}}v(M1,"inspectNode");function hu(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,_1," ")),t.truncate-=c.length;const a=t.truncate;let u=Gi(e.children,t);return u&&u.length>a&&(u=`${Xn}(${e.children.length})`),`${i}${c}${o}${u}${s}`}v(hu,"inspectHTML");var sA=typeof Symbol=="function"&&typeof Symbol.for=="function",Ms=sA?Symbol.for("chai/inspect"):"@@chai/inspect",$s=Symbol.for("nodejs.util.inspect.custom"),bd=new WeakMap,wd={},Sd={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:Oa,Number:Oa,bigint:Pa,BigInt:Pa,string:Na,String:Na,function:$a,Function:$a,symbol:ja,Symbol:ja,Array:y1,Date:b1,Map:x1,Set:v1,RegExp:E1,Promise:iA,WeakSet:v((e,t)=>t.stylize("WeakSet{…}","special"),"WeakSet"),WeakMap:v((e,t)=>t.stylize("WeakMap{…}","special"),"WeakMap"),Arguments:A1,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:C1,HTMLCollection:Gi,NodeList:Gi},aA=v((e,t,n,r)=>Ms in e&&typeof e[Ms]=="function"?e[Ms](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&&bd.has(e.constructor)?bd.get(e.constructor)(e,t):wd[n]?wd[n](e,t):"","inspectCustom"),cA=Object.prototype.toString;function wr(e,t={}){const n=p1(t,wr),{customInspect:r}=n;let i=e===null?"null":typeof e;if(i==="object"&&(i=cA.call(e).slice(8,-1)),i in Sd)return Sd[i](e,n);if(r&&e){const s=aA(e,n,i,wr);if(s)return typeof s=="string"?s:wr(s,n)}const o=e?Object.getPrototypeOf(e):!1;return o===Object.prototype||o===null?br(e,n):e&&typeof HTMLElement=="function"&&e instanceof HTMLElement?hu(e,n):"constructor"in e?e.constructor!==Object?k1(e,n):br(e,n):e===Object(e)?br(e,n):n.stylize(String(e),i)}v(wr,"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 wr(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 du(e,t){let n=Y(e,"negate"),r=Y(e,"object"),i=t[3],o=Io(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(du,"getMessage");function At(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(At,"transferFlags");function Fa(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(Fa,"type");function pu(){this._key="chai/deep-eql__"+Math.random()+Date.now()}v(pu,"FakeMap");pu.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 $1=typeof WeakMap=="function"?WeakMap:pu;function Ra(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(Ra,"memoizeCompare");function gr(e,t,n,r){if(!(!n||Cn(e)||Cn(t))){var i=n.get(e);i?i.set(t,r):(i=new $1,i.set(t,r),n.set(e,i))}}v(gr,"memoizeSet");var O1=zr;function zr(e,t,n){if(n&&n.comparator)return La(e,t,n);var r=mu(e,t);return r!==null?r:La(e,t,n)}v(zr,"deepEqual");function mu(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t?!0:Cn(e)||Cn(t)?!1:null}v(mu,"simpleEqual");function La(e,t,n){n=n||{},n.memoize=n.memoize===!1?!1:n.memoize||new $1;var r=n&&n.comparator,i=Ra(e,t,n.memoize);if(i!==null)return i;var o=Ra(t,e,n.memoize);if(o!==null)return o;if(r){var s=r(e,t);if(s===!1||s===!0)return gr(e,t,n.memoize,s),s;var c=mu(e,t);if(c!==null)return c}var a=Fa(e);if(a!==Fa(t))return gr(e,t,n.memoize,!1),!1;gr(e,t,n.memoize,!0);var u=P1(e,t,a,n);return gr(e,t,n.memoize,u),u}v(La,"extensiveDeepEqual");function P1(e,t,n,r){switch(n){case"String":case"Number":case"Boolean":case"Date":return zr(e.valueOf(),t.valueOf());case"Promise":case"Symbol":case"function":case"WeakMap":case"WeakSet":return e===t;case"Error":return gu(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 N1(e,t);case"Generator":return j1(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 Da(e,t,r);case"Map":return Da(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 R1(e,t,r)}}v(P1,"extensiveDeepEqualByType");function N1(e,t){return e.toString()===t.toString()}v(N1,"regexpEqual");function Da(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(Da,"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(zr(e[i],t[i],n)===!1)return!1;return!0}v(dn,"iterableEqual");function j1(e,t,n){return dn(Ki(e),Ki(t),n)}v(j1,"generatorEqual");function F1(e){return typeof Symbol<"u"&&typeof e=="object"&&typeof Symbol.iterator<"u"&&typeof e[Symbol.iterator]=="function"}v(F1,"hasIteratorFunction");function Ba(e){if(F1(e))try{return Ki(e[Symbol.iterator]())}catch{return[]}return[]}v(Ba,"getIteratorEntries");function Ki(e){for(var t=e.next(),n=[t.value];t.done===!1;)t=e.next(),n.push(t.value);return n}v(Ki,"getGeneratorEntries");function Ua(e){var t=[];for(var n in e)t.push(n);return t}v(Ua,"getEnumerableKeys");function Va(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(Va,"getEnumerableSymbols");function gu(e,t,n,r){var i=n.length;if(i===0)return!0;for(var o=0;o<i;o+=1)if(zr(e[n[o]],t[n[o]],r)===!1)return!1;return!0}v(gu,"keysEqual");function R1(e,t,n){var r=Ua(e),i=Ua(t),o=Va(e),s=Va(t);if(r=r.concat(o),i=i.concat(s),r.length&&r.length===i.length)return dn(qa(r).sort(),qa(i).sort())===!1?!1:gu(e,t,r,n);var c=Ba(e),a=Ba(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(R1,"objectEqual");function Cn(e){return e===null||typeof e!="object"}v(Cn,"isPrimitive");function qa(e){return e.map(v(function(n){return typeof n=="symbol"?n.toString():n},"mapSymbol"))}v(qa,"mapSymbols");function ko(e,t){return typeof e>"u"||e===null?!1:t in Object(e)}v(ko,"hasProperty");function L1(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(L1,"parsePath");function Wa(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(Wa,"internalGetPathValue");function yu(e,t){const n=L1(t),r=n[n.length-1],i={parent:n.length>1?Wa(e,n,n.length-1):e,name:r.p||r.i,value:Wa(e,n)};return i.exists=ko(i.parent,i.name),i}v(yu,"getPathInfo");var D1=class B1{constructor(t,n,r,i){return r1(this,"__flags",{}),Y(this,"ssfi",r||B1),Y(this,"lockSsfi",i),Y(this,"object",t),Y(this,"message",n),Y(this,"eql",Qe.deepEqual||O1),nr(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){wu(this.prototype,t,n)}static addMethod(t,n){Su(this.prototype,t,n)}static addChainableMethod(t,n,r){Tu(this.prototype,t,n,r)}static overwriteProperty(t,n){xu(this.prototype,t,n)}static overwriteMethod(t,n){Eu(this.prototype,t,n)}static overwriteChainableMethod(t,n,r){vu(this.prototype,t,n,r)}assert(t,n,r,i,o,s){const c=fu(this,arguments);if(s!==!1&&(s=!0),i===void 0&&o===void 0&&(s=!1),Qe.showDiff!==!0&&(s=!1),!c){n=du(this,arguments);const u={actual:Io(this,arguments),expected:i,showDiff:s},l=Au(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(D1,"Assertion");var b=D1,Ao=new EventTarget,U1=class extends Event{constructor(t,n,r){super(t),this.name=String(n),this.fn=r}};v(U1,"PluginEvent");var bu=U1;function Gr(){return Qe.useProxy&&typeof Proxy<"u"&&typeof Reflect<"u"}v(Gr,"isProxyEnabled");function wu(e,t,n){n=n===void 0?function(){}:n,Object.defineProperty(e,t,{get:v(function r(){!Gr()&&!Y(this,"lockSsfi")&&Y(this,"ssfi",r);let i=n.call(this);if(i!==void 0)return i;let o=new b;return At(this,o),o},"propertyGetter"),configurable:!0}),Ao.dispatchEvent(new bu("addProperty",t,n))}v(wu,"addProperty");var uA=Object.getOwnPropertyDescriptor(function(){},"length");function Kr(e,t,n){return uA.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(Kr,"addLengthGuard");function V1(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(V1,"getProperties");var xd=["__flags","__methods","_obj","assert"];function nr(e,t){return Gr()?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 V1(r).forEach(function(c){if(!Object.prototype.hasOwnProperty(c)&&xd.indexOf(c)===-1){let a=q1(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 xd.indexOf(i)===-1&&!Y(r,"lockSsfi")&&Y(r,"ssfi",n),Reflect.get(r,i)},"proxyGetter")}):e}v(nr,"proxify");function q1(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(q1,"stringDistanceCapped");function Su(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 At(this,o),o},"methodWrapper");Kr(r,t,!1),e[t]=nr(r,t),Ao.dispatchEvent(new bu("addMethod",t,n))}v(Su,"addMethod");function xu(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(){!Gr()&&!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 At(this,a),a},"overwritingPropertyGetter"),configurable:!0})}v(xu,"overwriteProperty");function Eu(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 At(this,a),a},"overwritingMethodWrapper");Kr(o,t,!1),e[t]=nr(o,t)}v(Eu,"overwriteMethod");var lA=typeof Object.setPrototypeOf=="function",Ed=v(function(){},"testFn"),fA=Object.getOwnPropertyNames(Ed).filter(function(e){let t=Object.getOwnPropertyDescriptor(Ed,e);return typeof t!="object"?!0:!t.configurable}),hA=Function.prototype.call,dA=Function.prototype.apply,W1=class extends bu{constructor(t,n,r,i){super(t,n,r),this.chainingBehavior=i}};v(W1,"PluginAddChainableMethodEvent");var pA=W1;function Tu(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 At(this,a),a},"chainableMethodWrapper");if(Kr(s,t,!0),lA){let c=Object.create(this);c.call=hA,c.apply=dA,Object.setPrototypeOf(s,c)}else Object.getOwnPropertyNames(e).forEach(function(a){if(fA.indexOf(a)!==-1)return;let u=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(s,a,u)});return At(this,s),nr(s)},"chainableMethodGetter"),configurable:!0}),Ao.dispatchEvent(new pA("addChainableMethod",t,n,r))}v(Tu,"addChainableMethod");function vu(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 At(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 At(this,u),u},"overwritingChainableMethodWrapper")}v(vu,"overwriteChainableMethod");function Hi(e,t){return ne(e)<ne(t)?-1:1}v(Hi,"compareByInspect");function Iu(e){return typeof Object.getOwnPropertySymbols!="function"?[]:Object.getOwnPropertySymbols(e).filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})}v(Iu,"getOwnEnumerablePropertySymbols");function ku(e){return Object.keys(e).concat(Iu(e))}v(ku,"getOwnEnumerableProperties");var Yi=Number.isNaN;function z1(e){let t=ge(e);return["Array","Object","Function"].indexOf(t)!==-1}v(z1,"isObjectType");function Au(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=z1(i);return/\snot\s/.test(o)?s?"notDeepStrictEqual":"notStrictEqual":s?"deepStrictEqual":"strictEqual"}v(Au,"getOperator");function Co(e){return e.name}v(Co,"getName");function Ji(e){return Object.prototype.toString.call(e)==="[object RegExp]"}v(Ji,"isRegExp");function Be(e){return["Number","BigInt"].includes(ge(e))}v(Be,"isNumeric");var{flag:x}=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(){x(this,"negate",!0)});b.addProperty("deep",function(){x(this,"deep",!0)});b.addProperty("nested",function(){x(this,"nested",!0)});b.addProperty("own",function(){x(this,"own",!0)});b.addProperty("ordered",function(){x(this,"ordered",!0)});b.addProperty("any",function(){x(this,"any",!0),x(this,"all",!1)});b.addProperty("all",function(){x(this,"all",!0),x(this,"any",!1)});var Td={function:["function","asyncfunction","generatorfunction","asyncgeneratorfunction"],asyncfunction:["asyncfunction","asyncgeneratorfunction"],generatorfunction:["generatorfunction","asyncgeneratorfunction"],asyncgeneratorfunction:["asyncgeneratorfunction"]};function Cu(e,t){t&&x(this,"message",t),e=e.toLowerCase();let n=x(this,"object"),r=~["a","e","i","o","u"].indexOf(e.charAt(0))?"an ":"a ";const i=ge(n).toLowerCase();Td.function.includes(e)?this.assert(Td[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(Cu,"an");b.addChainableMethod("an",Cu);b.addChainableMethod("a",Cu);function G1(e,t){return Yi(e)&&Yi(t)||e===t}v(G1,"SameValueZero");function Hr(){x(this,"contains",!0)}v(Hr,"includeChainingBehavior");function Yr(e,t){t&&x(this,"message",t);let n=x(this,"object"),r=ge(n).toLowerCase(),i=x(this,"message"),o=x(this,"negate"),s=x(this,"ssfi"),c=x(this,"deep"),a=c?"deep ":"",u=c?x(this,"eql"):G1;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(At(this,p,!0),x(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(Yr,"include");b.addChainableMethod("include",Yr,Hr);b.addChainableMethod("contain",Yr,Hr);b.addChainableMethod("contains",Yr,Hr);b.addChainableMethod("includes",Yr,Hr);b.addProperty("ok",function(){this.assert(x(this,"object"),"expected #{this} to be truthy","expected #{this} to be falsy")});b.addProperty("true",function(){this.assert(x(this,"object")===!0,"expected #{this} to be true","expected #{this} to be false",!x(this,"negate"))});b.addProperty("numeric",function(){const e=x(this,"object");this.assert(["Number","BigInt"].includes(ge(e)),"expected #{this} to be numeric","expected #{this} to not be numeric",!x(this,"negate"))});b.addProperty("callable",function(){const e=x(this,"object"),t=x(this,"ssfi"),n=x(this,"message"),r=n?`${n}: `:"",i=x(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(x(this,"object")===!1,"expected #{this} to be false","expected #{this} to be true",!!x(this,"negate"))});b.addProperty("null",function(){this.assert(x(this,"object")===null,"expected #{this} to be null","expected #{this} not to be null")});b.addProperty("undefined",function(){this.assert(x(this,"object")===void 0,"expected #{this} to be undefined","expected #{this} not to be undefined")});b.addProperty("NaN",function(){this.assert(Yi(x(this,"object")),"expected #{this} to be NaN","expected #{this} not to be NaN")});function _u(){let e=x(this,"object");this.assert(e!=null,"expected #{this} to exist","expected #{this} to not exist")}v(_u,"assertExist");b.addProperty("exist",_u);b.addProperty("exists",_u);b.addProperty("empty",function(){let e=x(this,"object"),t=x(this,"ssfi"),n=x(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 "+Co(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 Mu(){let e=x(this,"object"),t=ge(e);this.assert(t==="Arguments","expected #{this} to be arguments but got "+t,"expected #{this} to not be arguments")}v(Mu,"checkArguments");b.addProperty("arguments",Mu);b.addProperty("Arguments",Mu);function _o(e,t){t&&x(this,"message",t);let n=x(this,"object");if(x(this,"deep")){let r=x(this,"lockSsfi");x(this,"lockSsfi",!0),this.eql(e),x(this,"lockSsfi",r)}else this.assert(e===n,"expected #{this} to equal #{exp}","expected #{this} to not equal #{exp}",e,this._obj,!0)}v(_o,"assertEqual");b.addMethod("equal",_o);b.addMethod("equals",_o);b.addMethod("eq",_o);function $u(e,t){t&&x(this,"message",t);let n=x(this,"eql");this.assert(n(e,x(this,"object")),"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",e,this._obj,!0)}v($u,"assertEql");b.addMethod("eql",$u);b.addMethod("eqls",$u);function Mo(e,t){t&&x(this,"message",t);let n=x(this,"object"),r=x(this,"doLength"),i=x(this,"message"),o=i?i+": ":"",s=x(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(Mo,"assertAbove");b.addMethod("above",Mo);b.addMethod("gt",Mo);b.addMethod("greaterThan",Mo);function $o(e,t){t&&x(this,"message",t);let n=x(this,"object"),r=x(this,"doLength"),i=x(this,"message"),o=i?i+": ":"",s=x(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($o,"assertLeast");b.addMethod("least",$o);b.addMethod("gte",$o);b.addMethod("greaterThanOrEqual",$o);function Oo(e,t){t&&x(this,"message",t);let n=x(this,"object"),r=x(this,"doLength"),i=x(this,"message"),o=i?i+": ":"",s=x(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(Oo,"assertBelow");b.addMethod("below",Oo);b.addMethod("lt",Oo);b.addMethod("lessThan",Oo);function Po(e,t){t&&x(this,"message",t);let n=x(this,"object"),r=x(this,"doLength"),i=x(this,"message"),o=i?i+": ":"",s=x(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(Po,"assertMost");b.addMethod("most",Po);b.addMethod("lte",Po);b.addMethod("lessThanOrEqual",Po);b.addMethod("within",function(e,t,n){n&&x(this,"message",n);let r=x(this,"object"),i=x(this,"doLength"),o=x(this,"message"),s=o?o+": ":"",c=x(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 Ou(e,t){t&&x(this,"message",t);let n=x(this,"object"),r=x(this,"ssfi"),i=x(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=Co(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(Ou,"assertInstanceOf");b.addMethod("instanceof",Ou);b.addMethod("instanceOf",Ou);function Pu(e,t,n){n&&x(this,"message",n);let r=x(this,"nested"),i=x(this,"own"),o=x(this,"message"),s=x(this,"object"),c=x(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=x(this,"deep"),l=x(this,"negate"),f=r?yu(s,e):null,h=r?f.value:s[e],d=u?x(this,"eql"):(y,S)=>y===S,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=ko(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),x(this,"object",h)}v(Pu,"assertProperty");b.addMethod("property",Pu);function Nu(e,t,n){x(this,"own",!0),Pu.apply(this,arguments)}v(Nu,"assertOwnProperty");b.addMethod("ownProperty",Nu);b.addMethod("haveOwnProperty",Nu);function ju(e,t,n){typeof t=="string"&&(n=t,t=null),n&&x(this,"message",n);let r=x(this,"object"),i=Object.getOwnPropertyDescriptor(Object(r),e),o=x(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)),x(this,"object",i)}v(ju,"assertOwnPropertyDescriptor");b.addMethod("ownPropertyDescriptor",ju);b.addMethod("haveOwnPropertyDescriptor",ju);function Fu(){x(this,"doLength",!0)}v(Fu,"assertLengthChain");function Ru(e,t){t&&x(this,"message",t);let n=x(this,"object"),r=ge(n).toLowerCase(),i=x(this,"message"),o=x(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(Ru,"assertLength");b.addChainableMethod("length",Ru,Fu);b.addChainableMethod("lengthOf",Ru,Fu);function Lu(e,t){t&&x(this,"message",t);let n=x(this,"object");this.assert(e.exec(n),"expected #{this} to match "+e,"expected #{this} not to match "+e)}v(Lu,"assertMatch");b.addMethod("match",Lu);b.addMethod("matches",Lu);b.addMethod("string",function(e,t){t&&x(this,"message",t);let n=x(this,"object"),r=x(this,"message"),i=x(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 Du(e){let t=x(this,"object"),n=ge(t),r=ge(e),i=x(this,"ssfi"),o=x(this,"deep"),s,c="",a,u=!0,l=x(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(S,T){a.push(T)}),r!=="Array"&&(e=Array.prototype.slice.call(arguments));else{switch(a=ku(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(S){return typeof S=="symbol"?S:String(S)})}if(!e.length)throw new re(l+"keys required",void 0,i);let h=e.length,d=x(this,"any"),m=x(this,"all"),p=e,y=o?x(this,"eql"):(S,T)=>S===T;if(!d&&!m&&(m=!0),d&&(u=p.some(function(S){return a.some(function(T){return y(S,T)})})),m&&(u=p.every(function(S){return a.some(function(T){return y(S,T)})}),x(this,"contains")||(u=u&&e.length==a.length)),h>1){e=e.map(function(T){return ne(T)});let S=e.pop();m&&(s=e.join(", ")+", and "+S),d&&(s=e.join(", ")+", or "+S)}else s=ne(e[0]);s=(h>1?"keys ":"key ")+s,s=(x(this,"contains")?"contain ":"have ")+s,this.assert(u,"expected #{this} to "+c+s,"expected #{this} to not "+c+s,p.slice(0).sort(Hi),a.sort(Hi),!0)}v(Du,"assertKeys");b.addMethod("keys",Du);b.addMethod("key",Du);function No(e,t,n){n&&x(this,"message",n);let r=x(this,"object"),i=x(this,"ssfi"),o=x(this,"message"),s=x(this,"negate")||!1;new b(r,o,i,!0).is.a("function"),(Ji(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";Ji(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)),x(this,"object",c)}v(No,"assertThrows");b.addMethod("throw",No);b.addMethod("throws",No);b.addMethod("Throw",No);function Bu(e,t){t&&x(this,"message",t);let n=x(this,"object"),r=x(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(Bu,"respondTo");b.addMethod("respondTo",Bu);b.addMethod("respondsTo",Bu);b.addProperty("itself",function(){x(this,"itself",!0)});function Uu(e,t){t&&x(this,"message",t);let n=x(this,"object"),r=e(n);this.assert(r,"expected #{this} to satisfy "+vn(e),"expected #{this} to not satisfy"+vn(e),!x(this,"negate"),r)}v(Uu,"satisfy");b.addMethod("satisfy",Uu);b.addMethod("satisfies",Uu);function Vu(e,t,n){n&&x(this,"message",n);let r=x(this,"object"),i=x(this,"message"),o=x(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(Vu,"closeTo");b.addMethod("closeTo",Vu);b.addMethod("approximately",Vu);function K1(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(K1,"isSubsetOf");b.addMethod("members",function(e,t){t&&x(this,"message",t);let n=x(this,"object"),r=x(this,"message"),i=x(this,"ssfi");new b(n,r,i,!0).to.be.iterable,new b(e,r,i,!0).to.be.iterable;let o=x(this,"contains"),s=x(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=x(this,"deep")?x(this,"eql"):void 0;this.assert(K1(e,n,l,o,s),a,u,e,n,!0)});b.addProperty("iterable",function(e){e&&x(this,"message",e);let t=x(this,"object");this.assert(t!=null&&t[Symbol.iterator],"expected #{this} to be an iterable","expected #{this} to not be an iterable",t)});function H1(e,t){t&&x(this,"message",t);let n=x(this,"object"),r=x(this,"message"),i=x(this,"ssfi"),o=x(this,"contains"),s=x(this,"deep"),c=x(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(H1,"oneOf");b.addMethod("oneOf",H1);function qu(e,t,n){n&&x(this,"message",n);let r=x(this,"object"),i=x(this,"message"),o=x(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;x(this,"deltaMsgObj",a),x(this,"initialDeltaValue",s),x(this,"finalDeltaValue",c),x(this,"deltaBehavior","change"),x(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 Wu(e,t,n){n&&x(this,"message",n);let r=x(this,"object"),i=x(this,"message"),o=x(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;x(this,"deltaMsgObj",a),x(this,"initialDeltaValue",s),x(this,"finalDeltaValue",c),x(this,"deltaBehavior","increase"),x(this,"realDelta",c-s),this.assert(c-s>0,"expected "+a+" to increase","expected "+a+" to not increase")}v(Wu,"assertIncreases");b.addMethod("increase",Wu);b.addMethod("increases",Wu);function zu(e,t,n){n&&x(this,"message",n);let r=x(this,"object"),i=x(this,"message"),o=x(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;x(this,"deltaMsgObj",a),x(this,"initialDeltaValue",s),x(this,"finalDeltaValue",c),x(this,"deltaBehavior","decrease"),x(this,"realDelta",s-c),this.assert(c-s<0,"expected "+a+" to decrease","expected "+a+" to not decrease")}v(zu,"assertDecreases");b.addMethod("decrease",zu);b.addMethod("decreases",zu);function Y1(e,t){t&&x(this,"message",t);let n=x(this,"deltaMsgObj"),r=x(this,"initialDeltaValue"),i=x(this,"finalDeltaValue"),o=x(this,"deltaBehavior"),s=x(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(Y1,"assertDelta");b.addMethod("by",Y1);b.addProperty("extensible",function(){let e=x(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=x(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=x(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=x(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 Xi(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 Xi(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?Xi(r,i):typeof r=="function"?r(i):i===r}):!1}v(Xi,"compareSubset");b.addMethod("containSubset",function(e){const t=Y(this,"object"),n=Qe.showDiff;this.assert(Xi(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){throw arguments.length<2&&(n=e,e=void 0),n=n||"expect.fail()",new re(n,{actual:e,expected:t,operator:r},In.fail)};var J1={};lu(J1,{Should:()=>gA,should:()=>mA});function Gu(){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(Gu,"loadShould");var mA=Gu,gA=Gu;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 yA=[["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 yA)g[t]=g[e];var vd=[];function yn(e){const t={use:yn,AssertionError:re,util:me,config:Qe,expect:In,assert:g,Assertion:b,...J1};return~vd.indexOf(e)||(e(t,me),vd.push(e)),t}v(yn,"use");const bA=(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")},Zi=Symbol.for("matchers-object"),Jr=Symbol.for("$$jest-matchers-object"),jo=Symbol.for("expect-global"),Ku=Symbol.for("asymmetric-matchers-object"),wA={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 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","")}
|
|
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)}`}}},to=Me.green,Xu=Me.red,$3=Me.inverse,M3=Me.bold,sn=Me.dim;function O3(e,t="received",n="expected",r={}){const{comment:i="",isDirectExpectCall:o=!1,isNot:s=!1,promise:c="",secondArgument:a="",expectedColor:u=to,receivedColor:l=Xu,secondArgumentColor:f=to}=r;let h="",d="expect";return!o&&t!==""&&(h+=sn(`${d}(`)+l(t),d=")"),c!==""&&(h+=sn(`${d}.`)+c,d=""),s&&(h+=`${sn(`${d}.`)}not`,d=""),e.includes(".")?d+=e:(h+=sn(`${d}.`)+e,d=""),n===""?d+="()":(h+=sn(`${d}(`)+u(n),a&&(h+=sn(", ")+f(a)),d=")"),i!==""&&(d+=` // ${i}`),d!==""&&(h+=sn(d)),h}const P3="·";function rb(e){return e.replace(/\s+$/gm,t=>P3.repeat(t.length))}function N3(e){return Xu(rb(xt(e)))}function j3(e){return to(rb(xt(e)))}function ib(){return{EXPECTED_COLOR:to,RECEIVED_COLOR:Xu,INVERTED_COLOR:$3,BOLD_WEIGHT:M3,DIM_COLOR:sn,diff:tr,matcherHint:O3,printReceived:N3,printExpected:j3,printDiffOrStringify:Ny,printWithType:F3}}function F3(e,t,n){const r=jr(t),i=r!=="null"&&r!=="undefined"?`${e} has type: ${r}
|
|
145
|
+
`:"",o=`${e} has value: ${n(t)}`;return i+o}function R3(e){if(!Array.isArray(e))throw new TypeError(`expect.customEqualityTesters: Must be set to an array of Testers. Was given "${jr(e)}"`);globalThis[Xr].customEqualityTesters.push(...e)}function Zu(){return globalThis[Xr].customEqualityTesters}function te(e,t,n,r){return n=n||[],Sr(e,t,[],[],n,r?ob:B3)}function _d(e){return!!e&&typeof e=="object"&&"asymmetricMatch"in e&&Tt("Function",e.asymmetricMatch)}function L3(e,t,n){const r=_d(e),i=_d(t);if(!(r&&i)){if(r)return e.asymmetricMatch(t,n);if(i)return t.asymmetricMatch(e,n)}}function zn(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 Sr(e,t,n,r,i,o){let s=!0;const c=L3(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(Md(e)&&Md(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(zn(e)&&zn(t))try{return D3(e,t,n,r,i,o)}finally{n.pop(),r.pop()}const f=$d(e,o);let h,d=f.length;if($d(t,o).length!==d)return!1;for(;d--;)if(h=f[d],s=o(t,h)&&Sr(e[h],t[h],n,r,i,o),!s)return!1;return n.pop(),r.pop(),s}function D3(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=Sr(e.cause,t.cause,n,r,i,o)),e instanceof AggregateError&&t instanceof AggregateError&&s&&(s=Sr(e.errors,t.errors,n,r,i,o)),s&&(s=Sr({...e},{...t},n,r,i,o)),s}function $d(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 B3(e,t){return ob(e,t)&&e[t]!==void 0}function ob(e,t){return Object.hasOwn(e,t)}function Tt(e,t){return Object.prototype.toString.apply(t)===`[object ${e}]`}function Md(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 sb="@@__IMMUTABLE_KEYED__@@",ab="@@__IMMUTABLE_SET__@@",U3="@@__IMMUTABLE_LIST__@@",Lo="@@__IMMUTABLE_ORDERED__@@",V3="@@__IMMUTABLE_RECORD__@@";function q3(e){return!!(e&&e[sb]&&!e[Lo])}function W3(e){return!!(e&&e[ab]&&!e[Lo])}function Do(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}function z3(e){return!!(e&&Do(e)&&e[U3])}function G3(e){return!!(e&&Do(e)&&e[sb]&&e[Lo])}function K3(e){return!!(e&&Do(e)&&e[ab]&&e[Lo])}function H3(e){return!!(e&&Do(e)&&e[V3])}const cb=Symbol.iterator;function Od(e){return!!(e!=null&&e[cb])}function ot(e,t,n=[],r=[],i=[]){if(typeof e!="object"||typeof t!="object"||Array.isArray(e)||Array.isArray(t)||!Od(e)||!Od(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!==ot),c];function c(u,l){return ot(u,l,[...n],[...r],[...i])}if(e.size!==void 0){if(e.size!==t.size)return!1;if(Tt("Set",e)||W3(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(Tt("Map",e)||q3(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[cb]();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(!z3(e)&&!G3(e)&&!K3(e)&&!H3(e)){const u=Object.entries(e),l=Object.entries(t);if(!te(u,l,s))return!1}return r.pop(),i.pop(),!0}function Qu(e,t){return!e||typeof e!="object"||e===Object.prototype?!1:Object.hasOwn(e,t)||Qu(Object.getPrototypeOf(e),t)}function Y3(e){return Rt(e)&&!zn(e)&&!Array.isArray(e)&&!(e instanceof Date)&&!(e instanceof Set)&&!(e instanceof Map)}function ir(e,t,n=[]){const r=n.filter(o=>o!==ir),i=(o=new WeakMap)=>(s,c)=>{if(Y3(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&&Qu(s,a)&&te(s[a],c[a],[...r,i(o)]);return o.delete(c[a]),u})};return i()(e,t)}function Pd(e,t){if(!(e==null||t==null||e.constructor===t.constructor))return!1}function Nd(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 Ka(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!==Ka);return te(e,t,o,!0)&&te(r,i)}function J3(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)),S=u.length===1?"":` with value ${t.objDisplay(h)}`;return this.assert(y,`expected #{this} to have property "${f}"${S}`,`expected #{this} to not have property "${f}"${S}`,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=Ns(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(Ns(l,m,u))}),i("toHaveBeenCalledExactlyOnceWith",function(...u){const l=s(this),f=l.getMockName(),h=l.mock.calls.length,m=l.mock.calls.some(S=>c(S,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(Ns(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",S={showDiff:!1};throw new n(y,S,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(),S=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(HA(d,T,S,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(),S=(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,S==null?void 0:S.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 S=Reflect.get(m,p,y);return typeof S!="function"?S instanceof e.Assertion?d:S:(...T)=>{t.flag(this,"_name",p);const O=Promise.resolve(h).then(A=>(t.flag(this,"object",A),S.call(this,...T)),A=>{const _=new n(`promise rejected "${t.inspect(A)}" instead of resolving`,{showDiff:!1});throw _.cause=A,_}).catch(A=>{throw zn(A)&&l.stack&&(A.stack=l.stack.replace(l.message,A.message)),A});return Ka(f,O,Ga(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,S)=>{const T=Reflect.get(p,y,S);return typeof T!="function"?T instanceof e.Assertion?m:T:(...O)=>{t.flag(this,"_name",y);const A=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 Ka(f,A,Ga(t,this,!!O.length),l,t.flag(this,"soft"))}}});return m})};function Ns(e,t,n){return e.mock.calls.length&&(t+=$e.gray(`
|
|
151
|
+
`:r}function X3(e,t){return`${t} ${e}${t===1?"":"s"}`}function Ns(e){return[...Object.keys(e),...Object.getOwnPropertySymbols(e).filter(t=>{var n;return(n=Object.getOwnPropertyDescriptor(e,t))==null?void 0:n.enumerable})]}function Z3(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(Rt(s)&&Rt(c)){if(te(s,c,[...n,ot,ir]))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 Ns(s))Qu(c,u)?a[u]=o.has(s[u])?o.get(s[u]):i(o)(s[u],c[u]):o.has(s[u])||(r+=1,Rt(s[u])&&(r+=Ns(s[u]).length),i(o)(s[u],c[u]));if(Ns(a).length>0)return a}}return s};return{subset:i()(e,t),stripped:r}}function Q3(e){return!!e&&(typeof e=="object"||typeof e=="function")&&e["~standard"]&&typeof e["~standard"].validate=="function"}if(!Object.hasOwn(globalThis,eo)){const e=new WeakMap,t=Object.create(null),n=[],r=Object.create(null);Object.defineProperty(globalThis,eo,{get:()=>e}),Object.defineProperty(globalThis,Xr,{configurable:!0,get:()=>({state:e.get(globalThis[Ro]),matchers:t,customEqualityTesters:n})}),Object.defineProperty(globalThis,Ju,{get:()=>r})}function Er(e){return globalThis[eo].get(e)}function js(e,t){const n=globalThis[eo],r=n.get(t)||{},i=Object.defineProperties(r,{...Object.getOwnPropertyDescriptors(r),...Object.getOwnPropertyDescriptors(e)});n.set(t,i)}let Ut=class{constructor(t,n=!1){R(this,"$$typeof",Symbol.for("jest.asymmetricMatcher"));this.sample=t,this.inverse=n}getMatcherContext(t){return{...Er(t||globalThis[Ro]),equals:te,isNot:this.inverse,customTesters:Zu(),utils:{...ib(),diff:tr,stringify:xt,iterableEquality:ot,subsetEquality:ir}}}};Ut.prototype[Symbol.for("chai/inspect")]=function(e){const t=xt(this,e.depth,{min:!0});return t.length<=e.truncate?t:`${this.toString()}{…}`};class jd extends Ut{constructor(t,n=!1){if(!Tt("String",t))throw new Error("Expected is not a string");super(t,n)}asymmetricMatch(t){const n=Tt("String",t)&&t.includes(this.sample);return this.inverse?!n:n}toString(){return`String${this.inverse?"Not":""}Containing`}getExpectedType(){return"string"}}class eC extends Ut{asymmetricMatch(t){return t!=null}toString(){return"Anything"}toAsymmetricMatcher(){return"Anything"}}class Fd extends Ut{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 Rd extends Ut{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 tC extends Ut{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 Ld extends Ut{constructor(t,n=!1){if(!Tt("String",t)&&!Tt("RegExp",t))throw new Error("Expected is not a String or a RegExp");super(new RegExp(t),n)}asymmetricMatch(t){const n=Tt("String",t)&&this.sample.test(t);return this.inverse?!n:n}toString(){return`String${this.inverse?"Not":""}Matching`}getExpectedType(){return"string"}}class Dd extends Ut{constructor(n,r=2,i=!1){if(!Tt("Number",n))throw new Error("Expected is not a Number");if(!Tt("Number",r))throw new Error("Precision is not a Number");super(n);R(this,"precision");this.inverse=i,this.precision=r}asymmetricMatch(n){if(!Tt("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,`(${X3("digit",this.precision)})`].join(" ")}}class Bd extends Ut{constructor(n,r=!1){if(!Q3(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 nC=(e,t)=>{t.addMethod(e.expect,"anything",()=>new eC),t.addMethod(e.expect,"any",n=>new tC(n)),t.addMethod(e.expect,"stringContaining",n=>new jd(n)),t.addMethod(e.expect,"objectContaining",n=>new Fd(n)),t.addMethod(e.expect,"arrayContaining",n=>new Rd(n)),t.addMethod(e.expect,"stringMatching",n=>new Ld(n)),t.addMethod(e.expect,"closeTo",(n,r)=>new Dd(n,r)),t.addMethod(e.expect,"schemaMatching",n=>new Bd(n)),e.expect.not={stringContaining:n=>new jd(n,!0),objectContaining:n=>new Fd(n,!0),arrayContaining:n=>new Rd(n,!0),stringMatching:n=>new Ld(n,!0),closeTo:(n,r)=>new Dd(n,r,!0),schemaMatching:n=>new Bd(n,!0)}};function Ha(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 Ya(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(Sy,c=>{Ja(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 Ja(e,t){var n;e.result||(e.result={state:"fail"}),e.result.state="fail",(n=e.result).errors||(n.errors=[]),e.result.errors.push(Fy(t))}function Vn(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(Sy,s=>{Ja(i,s)}):o}catch(o){Ja(i,o)}}}const rC=(e,t)=>{const{AssertionError:n}=e,r=Zu();function i(u,l){const f=h=>{const d=Vn(t,h,l);t.addMethod(e.Assertion.prototype,h,d),t.addMethod(globalThis[Xr].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,ot]);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,ot,Pd,Ka,Nd],!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,ot,Pd,Ka,Nd],!0)?h="toStrictEqual":te(l,u,[...r,ot])&&(h="toEqual")),this.assert(f,J3(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,ot,ir]),h=t.flag(this,"negate"),{subset:d,stripped:m}=Z3(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){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(`
|
|
154
154
|
|
|
155
155
|
Received:
|
|
156
156
|
|
|
157
|
-
${e.mock.calls.map((r,i)=>{let o
|
|
157
|
+
${e.mock.calls.map((r,i)=>{let o=Me.bold(` ${En(i+1)} ${e.getMockName()} call:
|
|
158
158
|
|
|
159
|
-
`);return n?o+=
|
|
159
|
+
`);return n?o+=tr(n,r,{omitAnnotationLines:!0}):o+=xt(r).split(`
|
|
160
160
|
`).map(s=>` ${s}`).join(`
|
|
161
161
|
`),o+=`
|
|
162
162
|
`,o}).join(`
|
|
163
|
-
`)}`)),t
|
|
163
|
+
`)}`)),t+=Me.gray(`
|
|
164
164
|
|
|
165
|
-
Number of calls: ${
|
|
166
|
-
`),t}function
|
|
165
|
+
Number of calls: ${Me.bold(e.mock.calls.length)}
|
|
166
|
+
`),t}function iC(e,t,n,r){return t.length&&(n+=Me.gray(`
|
|
167
167
|
|
|
168
168
|
Received:
|
|
169
169
|
|
|
170
|
-
${t.map((i,o)=>{let s
|
|
170
|
+
${t.map((i,o)=>{let s=Me.bold(` ${En(o+1)} ${e.getMockName()} call return:
|
|
171
171
|
|
|
172
|
-
`);return r?s+=
|
|
172
|
+
`);return r?s+=tr(r,i.value,{omitAnnotationLines:!0}):s+=xt(i).split(`
|
|
173
173
|
`).map(c=>` ${c}`).join(`
|
|
174
174
|
`),s+=`
|
|
175
175
|
`,s}).join(`
|
|
176
|
-
`)}`)),n
|
|
176
|
+
`)}`)),n+=Me.gray(`
|
|
177
177
|
|
|
178
|
-
Number of calls: ${
|
|
179
|
-
`),n}function
|
|
178
|
+
Number of calls: ${Me.bold(e.mock.calls.length)}
|
|
179
|
+
`),n}function oC(e,t){const n=e._obj,r=me.flag(e,"negate"),i=me.flag(e,"promise")||"",o=me.flag(e,"message"),s={...ib(),diff:tr,stringify:xt,iterableEquality:ot,subsetEquality:ir};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={...Er(t),currentTestName:a,customTesters:Zu(),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 Ud extends Error{constructor(t,n,r,i){super(t),this.actual=n,this.expected=r,this.__vitest_error_context__=i}}function sC(e,t,n){return(r,i)=>{Object.entries(n).forEach(([o,s])=>{function c(...f){const{state:h,isNot:d,obj:m,customMessage:p}=oC(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:D,meta:X})=>{if(C&&d||!C&&!d){const ie=(p?`${p}: `:"")+z();throw new Ud(ie,le,D,{assertionName:o,meta:X})}});const{pass:x,message:T,actual:O,expected:k,meta:_}=y;if(x&&d||!x&&!d){const $=(p?`${p}: `:"")+T();throw new Ud($,O,k,{assertionName:o,meta:_})}}const a=Vn(i,o,c);if(i.addMethod(globalThis[Xr].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 Ut{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=>xt(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[Ju],o,{configurable:!0,enumerable:!0,value:l,writable:!0})})}}const aC=(e,t)=>{t.addMethod(e.expect,"extend",(n,r)=>{yn(sC(e,n,r))})},el=/\r?\n/;function cC(e,t,n){const r=e.split(el),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 uC(e,t){if(t>e.length)throw new Error(`offset is longer than source length! offset ${t} > length ${e.length}`);const n=e.split(el),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 Xa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};const St=Date;let Za=null;class pn extends St{constructor(t,n,r,i,o,s,c){super();let a;switch(arguments.length){case 0:Za!==null?a=new St(Za.valueOf()):a=new St;break;case 1:a=new St(t);break;default:r=typeof r>"u"?1:r,i=i||0,o=o||0,s=s||0,c=c||0,a=new St(t,n,r,i,o,s,c);break}return Object.setPrototypeOf(a,pn.prototype),a}}pn.UTC=St.UTC;pn.now=function(){return new pn().valueOf()};pn.parse=function(e){return St.parse(e)};pn.toString=function(){return St.toString()};function lC(e){const t=new St(e.valueOf());if(Number.isNaN(t.getTime()))throw new TypeError(`mockdate: The time set is an invalid date: ${e}`);globalThis.Date=pn,Za=t.valueOf()}function Vd(){globalThis.Date=St}function fC(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Rs={exports:{}},qd;function hC(){if(qd)return Rs.exports;qd=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{Rs.exports=e}catch{String.naturalCompare=e}return Rs.exports}var dC=hC(),pC=fC(dC);const mC=(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}`},gC=e=>e&&!!e._isMockFunction,yC={serialize:mC,test:gC},{DOMCollection:bC,DOMElement:wC,Immutable:xC,ReactElement:SC,ReactTestComponent:EC,AsymmetricMatcher:TC}=Eo;let Qa=[EC,SC,wC,bC,xC,TC,yC];function vC(e){Qa=[e].concat(Qa)}function AC(){return Qa}function Wd(e,t){return`${e} ${t}`}function IC(e){if(!/ \d+$/.test(e))throw new Error("Snapshot keys must end with a number.");return e.replace(/ \d+$/,"")}function kC(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 CC(e){return e.includes(`
|
|
186
186
|
`)?`
|
|
187
187
|
${e}
|
|
188
|
-
`:e}function
|
|
188
|
+
`:e}function bi(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 _C=!0,$C=!1;function MC(e,t=2,n={}){return tl(gt(e,{escapeRegex:_C,indent:t,plugins:AC(),printFunctionName:$C,...n}))}function OC(e){return e.replace(/`|\\|\$\{/g,"\\$&")}function zd(e){return`\`${OC(e)}\``}function tl(e){return e.replace(/\r\n|\r/g,`
|
|
191
|
+
`)}async function PC(e,t,n){const r=Object.keys(t).sort(pC).map(c=>`exports[${zd(c)}] = ${zd(tl(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 ec(e=[],t=[]){const n=Array.from(e);return t.forEach((r,i)=>{const o=n[i];Array.isArray(e[i])?n[i]=ec(e[i],r):Rt(o)?n[i]=nl(e[i],r):n[i]=r}),n}function nl(e,t){if(Rt(e)&&Rt(t)){const n={...e};return Object.keys(t).forEach(r=>{Rt(t[r])&&!t[r].$$typeof?r in e?n[r]=nl(e[r],t[r]):Object.assign(n,{[r]:t[r]}):Array.isArray(t[r])?n[r]=ec(e[r],t[r]):Object.assign(n,{[r]:t[r]})}),n}else if(Array.isArray(e)&&Array.isArray(t))return ec(e,t);return e}class ub 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 pr extends ub{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 lb(e){const t=new Map;return n=>(t.has(n)||t.set(n,e(n)),t.get(n))}async function NC(e,t){const n=(await Promise.resolve().then(()=>require("./magic-string.es-B81Zo59j.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=cC(s,u.line,u.column);UC(s,c,l,u.snapshot,u.assertionName)}const a=c.toString();a!==s&&await e.saveSnapshotFile(i,a)}))}const fb=/(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*\{/;function rl(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const jC=lb(e=>{const t=fb.source.replace("toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot",rl(e));return new RegExp(t)});function FC(e,t,n,r,i){let o=e.slice(n);const c=(i?jC(i):fb).exec(o);if(!c)return!1;o=o.slice(c.index);let a=$I(o);if(a===null)return!1;a+=n+c.index;const u=n+c.index+c[0].length,l=RC(e,u),f=`, ${hb(r,e,n)}`;return l===a?t.appendLeft(a,f):t.overwrite(l,a,f),!0}function RC(e,t){let n=1,r=0;for(;n!==r&&t<e.length;){const i=e[t++];i==="{"?n++:i==="}"&&r++}return t}function hb(e,t,n){const r=uC(t,n),o=t.split(el)[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 LC=["toMatchInlineSnapshot","toThrowErrorMatchingInlineSnapshot"];function DC(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 db=/(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*[\w$]*(['"`)])/,BC=lb(e=>{const t=db.source.replace("toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot",rl(e));return new RegExp(t)});function UC(e,t,n,r,i){const o=i?[i]:LC,{code:s,index:c}=DC(e,n,o),u=(i?BC(i):db).exec(s),f=(i?new RegExp(rl(i)):/toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot/).exec(s);if(!u||u.index!==(f==null?void 0:f.index))return FC(e,t,c,r,i);const h=u[1],d=c+u.index+u[0].length,m=hb(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 VC=/^([^\S\n]*)\S/m;function Gd(e){var i;const t=e.match(VC);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 qC(e,t){await Promise.all(t.map(async n=>{n.readonly||await e.saveSnapshotFile(n.file,n.snapshot)}))}function Kd(e,t){return e.file===t.file&&e.column===t.column&&e.line===t.line}class il{constructor(t,n,r,i){R(this,"_counters",new pr);R(this,"_dirty");R(this,"_updateSnapshot");R(this,"_snapshotData");R(this,"_initialData");R(this,"_inlineSnapshots");R(this,"_inlineSnapshotStacks");R(this,"_testIdToKeys",new ub(()=>[]));R(this,"_rawSnapshots");R(this,"_uncheckedKeys");R(this,"_snapshotFormat");R(this,"_environment");R(this,"_fileExists");R(this,"expand");R(this,"_added",new pr);R(this,"_matched",new pr);R(this,"_unmatched",new pr);R(this,"_updated",new pr);this.testFilePath=t,this.snapshotPath=n;const{data:o,dirty:s}=kC(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 il(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=IC(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=Wd(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=Z4(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=>qd(h,a));if(u.length>0){this._inlineSnapshots=this._inlineSnapshots.filter(d=>!qd(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 TC(this._environment,this._snapshotData,this.snapshotPath),this._fileExists=!0),n&&await vC(this._environment,this._inlineSnapshots),r&&await PC(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=Bd(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:xC(r,void 0,this._snapshotFormat);a||(h=bC(h)),a&&a.content&&a.content.match(/\r\n/)&&!h.match(/\r\n/)&&(a.content=Zu(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,S=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:!!S,addValue:h,actualDisplay:a?h:yi(h),expectedDisplay:m!==void 0?a?m:yi(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:yi(u),expectedDisplay:l!==void 0?yi(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 NC(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 jC{constructor(t={}){R(this,"snapshotStateMap",new Map);this.options=t}async setup(t,n){this.snapshotStateMap.has(t)||this.snapshotStateMap.set(t,await tl.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=Qu(d,c)}const{actual:S,expected:T,key:O,pass:A}=m.match({testId:i,testName:p,received:d,isInline:s,error:u,inlineSnapshot:a,rawSnapshot:f,assertionName:h});return{pass:A,message:()=>`Snapshot \`${O||"unknown"}\` mismatched`,actual:f?S:S==null?void 0:S.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 NC(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:S,expected:T,key:O,pass:A}=d.processDomainSnapshot({testId:o,received:h,expectedSnapshot:p,matchResult:y,isInline:a,error:l,assertionName:t.assertionName});return{pass:A,message:()=>`Snapshot \`${O}\` mismatched`,actual:S==null?void 0:S.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,S=f>0?new Promise(z=>setTimeout(z,f)):void 0,T=await FC({adapter:c,poll:n,interval:h,timedOut:S,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:A,expected:_,key:M,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 \`${M}\` mismatched`,actual:A==null?void 0:A.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 FC({adapter:e,poll:t,interval:n,timedOut:r,match:i}){let o,s,c;for(;;){try{const u=await Wd(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 Wd(new Promise(u=>setTimeout(u,n)),r)).ok)break}return{...c,lastPollError:s}}function Wd(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={},Fs,zd;function RC(){if(zd)return Fs;zd=1;var e;return typeof Ya<"u"?e=Ya:typeof window<"u"?e=window:e=self,Fs=e,Fs}var Rs,Gd;function LC(){if(Gd)return Rs;Gd=1;let e;try{({}).__proto__,e=!1}catch{e=!0}return Rs=e,Rs}var Ls,Kd;function ir(){if(Kd)return Ls;Kd=1;var e=Function.call,t=LC(),n=["size","caller","callee","arguments"];return t&&n.push("__proto__"),Ls=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))},Ls}var Ds,Hd;function eo(){if(Hd)return Ds;Hd=1;var e=ir();return Ds=e(Array.prototype),Ds}var Bs,Yd;function DC(){if(Yd)return Bs;Yd=1;var e=eo().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 Bs=r,Bs}var Us,Jd;function BC(){if(Jd)return Us;Jd=1;function e(t){return t.constructor&&t.constructor.name||null}return Us=e,Us}var Vs={},Xd;function UC(){return Xd||(Xd=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)}})(Vs)),Vs}var qs,Zd;function VC(){return Zd||(Zd=1,qs=function(t,n){var r=!0;try{t.forEach(function(){if(!n.apply(this,arguments))throw new Error})}catch{r=!1}return r}),qs}var Ws,Qd;function qC(){return Qd||(Qd=1,Ws=function(t){if(!t)return"";try{return t.displayName||t.name||(String(t).match(/function ([^\s(]+)/)||[])[1]}catch{return""}}),Ws}var zs,ep;function WC(){if(ep)return zs;ep=1;var e=eo().sort,t=eo().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 zs=r,zs}var Gs,tp;function zC(){if(tp)return Gs;tp=1;var e=ir();return Gs=e(Function.prototype),Gs}var Ks,np;function GC(){if(np)return Ks;np=1;var e=ir();return Ks=e(Map.prototype),Ks}var Hs,rp;function KC(){if(rp)return Hs;rp=1;var e=ir();return Hs=e(Object.prototype),Hs}var Ys,ip;function HC(){if(ip)return Ys;ip=1;var e=ir();return Ys=e(Set.prototype),Ys}var Js,op;function YC(){if(op)return Js;op=1;var e=ir();return Js=e(String.prototype),Js}var Xs,sp;function JC(){return sp||(sp=1,Xs={array:eo(),function:zC(),map:GC(),object:KC(),set:HC(),string:YC()}),Xs}var Pi={exports:{}},XC=Pi.exports,ap;function ZC(){return ap||(ap=1,(function(e,t){(function(n,r){e.exports=r()})(XC,(function(){var n=typeof Promise=="function",r=typeof self=="object"?self:Ya,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",S=y&&Object.getPrototypeOf([][Symbol.iterator]()),T=l&&typeof String.prototype[Symbol.iterator]=="function",O=T&&Object.getPrototypeOf(""[Symbol.iterator]()),A=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 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===S?"Array Iterator":T&&D===O?"String Iterator":D===null?"Object":Object.prototype.toString.call(C).slice(A,_)}return M}))})(Pi)),Pi.exports}var Zs,cp;function QC(){if(cp)return Zs;cp=1;var e=ZC();return Zs=function(n){return e(n).toLowerCase()},Zs}var Qs,up;function e_(){if(up)return Qs;up=1;function e(t){return t&&t.toString?t.toString():String(t)}return Qs=e,Qs}var ea,lp;function t_(){return lp||(lp=1,ea={global:RC(),calledInOrder:DC(),className:BC(),deprecated:UC(),every:VC(),functionName:qC(),orderByFirstCall:WC(),prototypes:JC(),typeOf:QC(),valueToString:e_()}),ea}var fp;function n_(){if(fp)return Ln;fp=1;const e=t_().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,S=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(I,$,B,w){this.name=I,this.entryType=$,this.startTime=B,this.duration=w}toJSON(){return JSON.stringify({...this})}}function A(E){return Number.isFinite?Number.isFinite(E):isFinite(E)}let _=!1;function M(E,I){E.loopLimit&&I===E.loopLimit-1&&(_=!0)}function C(){_=!1}function z(E){if(!E)return 0;const I=E.split(":"),$=I.length;let B=$,w=0,G;if($>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(I[B],10),G>=60)throw new Error(`Invalid time ${E}`);w+=G*Math.pow(60,$-B-1)}return w*1e3}function le(E){const $=E*1e6%1e6,B=$<0?$+1e6:$;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,I,$){return $&&$.callAt>=E&&$.callAt<=I}function ie(E,I){const $=new Error(`Aborting after running ${E.loopLimit} timers, assuming an infinite loop!`);if(!I.error)return $;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;I.error.stack.split(`
|
|
204
|
-
`).some(function(se,de){return se.match(B)?(G=de,!0):se.match(w)?(G=de,!1):G>=0});const K=`${
|
|
205
|
-
${
|
|
206
|
-
${
|
|
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(B)?(G=de,!0):se.match(w)?(G=de,!1):G>=0});const K=`${M}
|
|
205
|
+
${A.type||"Microtask"} - ${A.func.name||"anonymous"}
|
|
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===$||w.type==="Timeout"&&$==="Interval"||w.type==="Interval"&&$==="Timeout")delete E.timers[B];else{const G=Ue($),K=Ct(w.type);throw new Error(`Cannot clear timer: timer created with ${K}() but cleared with ${G}()`)}}}function On(E){let I,$,B;const w="_hrtime",G="_nextTick";for($=0,B=E.methods.length;$<B;$++){if(I=E.methods[$],I==="hrtime"&&o.process)o.process.hrtime=E[w];else if(I==="nextTick"&&o.process)o.process.nextTick=E[G];else if(I==="performance"){const K=Object.getOwnPropertyDescriptor(E,`_${I}`);K&&K.get&&!K.set?Object.defineProperty(o,I,K):K.configurable&&(o[I]=E[`_${I}`])}else if(o[I]&&o[I].hadOwnProperty)o[I]=E[`_${I}`];else try{delete o[I]}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,I,$){if($[I].hadOwnProperty=Object.prototype.hasOwnProperty.call(E,I),$[`_${I}`]=E[I],I==="Date")E[I]=$[I];else if(I==="Intl")E[I]=$[I];else if(I==="performance"){const B=Object.getOwnPropertyDescriptor(E,I);if(B&&B.get&&!B.set){Object.defineProperty($,`_${I}`,B);const w=Object.getOwnPropertyDescriptor($,I);Object.defineProperty(E,I,w)}else E[I]=$[I]}else E[I]=function(){return $[I].apply($,arguments)},Object.defineProperties(E[I],Object.getOwnPropertyDescriptors($[I]));E[I].clock=$}function or(E,I){E.tick(I)}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=S);const Mt=o.setImmediate||o.setTimeout,Sb=o.clearInterval,xb=o.setInterval;function sl(E,I){E=Math.floor(D(E)),I=I||1e3;let $=0;const B=[0,0],w={now:E,Date:ve(),loopLimit:I,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+$-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 Ie=q-j[1],rt=V-ce;return Ie<0&&(Ie+=1e9,rt-=1),[rt,Ie]}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"&&Sb(w.attachedInterval),w.tickMode={counter:w.tickMode.counter+1,mode:P,delta:V},P==="nextAsync"?de():P==="interval"&&Eb(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=>{Mt(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),Ie=Math.floor(ce),rt=le(ce);let $t=$+rt,Ve=w.now+Ie;if(ce<0)throw new TypeError("Negative ticks are not supported");$t>=1e6&&(Ve+=1,$t-=1e6),$=$t;let Ot=w.now,sr=w.now,Vt,Pn,at,al,Do,Bo;w.duringTick=!0,at=w.now,ee(w),at!==w.now&&(Ot+=w.now-at,Ve+=w.now-at);function cl(){for(Vt=_e(w,Ot,Ve);Vt&&Ot<=Ve;){if(w.timers[Vt.id]){Ot=Vt.callAt,w.now=Vt.callAt,at=w.now;try{ee(w),Re(w,Vt)}catch(ar){Pn=Pn||ar}if(P){Mt(al);return}Do()}Bo()}if(at=w.now,ee(w),at!==w.now&&(Ot+=w.now-at,Ve+=w.now-at),w.duringTick=!1,Vt=_e(w,Ot,Ve),Vt)try{w.tick(Ve-w.now)}catch(ar){Pn=Pn||ar}else w.now=Ve,$=$t;if(Pn)throw Pn;if(P)V(w.now);else return w.now}return al=P&&function(){try{Do(),Bo(),cl()}catch(ar){q(ar)}},Do=function(){at!==w.now&&(Ot+=w.now-at,Ve+=w.now-at,sr+=w.now-at)},Bo=function(){Vt=_e(w,sr,Ve),sr=Ot},cl()}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){Mt(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){Mt(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(Ie){ce=Ie}w.duringTick=!1,Mt(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 st(new o.Promise(function(P,V){let q=0;function ce(){Mt(function(){try{ee(w);let Ie;if(q<w.loopLimit){if(!w.timers){C(),P(w.now);return}if(Ie=Object.keys(w.timers).length,Ie===0){C(),P(w.now);return}w.next(),q++,ce(),M(w,q);return}const rt=oe(w);V(ie(w,rt))}catch(Ie){V(Ie)}})}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){Mt(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(){$=0,w.timers={},w.jobs=[],w.now=E},w.setSystemTime=function(P){const V=D(P),q=V-w.now;let ce,Ie;B[0]=B[0]+q,B[1]=B[1]+$,w.now=V,$=0;for(ce in w.timers)w.timers.hasOwnProperty(ce)&&(Ie=w.timers[ce],Ie.createdAt+=q,Ie.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 Eb(E,I){const $=or.bind(null,E,I),B=xb($,I);E.attachedInterval=B}function Tb(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 I(G){if(!E.ignoreMissingTimers)throw new ReferenceError(`non-existent timers and/or objects cannot be faked: '${G}'`)}let $,B;const w=sl(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 I("performance")}for(o===e&&t&&(w.timersModuleMethods=[]),o===e&&n&&(w.timersPromisesModuleMethods=[]),$=0,B=w.methods.length;$<B;$++){const G=w.methods[$];if(!l[G]){I(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,$t;const Ve=new Promise((Ot,sr)=>{rt=Ot,$t=sr});return Ve.resolve=rt,Ve.reject=$t,Ve};let Ne=!1,j=!1,P,V=0;const q=[],ce=w.setInterval(()=>{q.length>0?q.shift().resolve():V++},K),Ie=()=>{de.signal.removeEventListener("abort",Ie),w.abortListenerMap.delete(Ie),w.clearInterval(ce),Ne=!0;for(const rt of q)rt.resolve()};return de.signal&&(de.signal.aborted?Ne=!0:(de.signal.addEventListener("abort",Ie),w.abortListenerMap.set(Ie,de.signal))),{next:async()=>{var $t,Ve;if(($t=de.signal)!=null&&$t.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(),(Ve=de.signal)!=null&&Ve.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",Ie),w.abortListenerMap.delete(Ie)),{done:!0,value:void 0})}}})))}return w}return{timers:Ye,createClock:sl,install:Tb,withGlobal:r}}const i=r(e);return Ln.timers=i.timers,Ln.createClock=i.createClock,Ln.install=i.install,Ln.withGlobal=r,Ln}var r_=n_();class i_{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",xt.now);this._userConfig=n,this._fakingDate=null,this._fakingTime=!1,this._fakeTimers=r_.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&&(Ld(),this._fakingDate=null),this._fakingTime&&(this._clock.uninstall(),this._fakingTime=!1)}useFakeTimers(){var r,i,o;const t=this._fakingDate||Date.now();this._fakingDate&&(Ld(),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")&&Qy())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()),eC(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 cb(e,t){return t.stack!==void 0&&(e.stack=t.stack.replace(t.message,e.message)),e}function o_(e,t={}){const{setTimeout:n,setInterval:r,clearTimeout:i,clearInterval:o}=tr(),{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=cb(new Error("Timed out in waitFor!"),a)),l(T)},S=()=>{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(A=>{h="resolved",p(A)},A=>{h="rejected",f=A})}else return p(T),!0}catch(T){f=T}};S()!==!0&&(d=n(y,c),m=r(S,s))})}function s_(e,t={}){const{setTimeout:n,setInterval:r,clearTimeout:i,clearInterval:o}=tr(),{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=S=>{d&&o(d),S||(S=cb(new Error("Timed out in waitUntil!"),a)),l(S)},p=S=>{if(S)return h&&i(h),d&&o(d),u(S),!0},y=()=>{if(Qn.isFakeTimers()&&Qn.advanceTimersByTime(s),f!=="pending")try{const S=e();if(S!==null&&typeof S=="object"&&typeof S.then=="function"){const T=S;f="pending",T.then(O=>{f="resolved",p(O)},O=>{f="rejected",m(O)})}else return p(S)}catch(S){m(S)}};y()!==!0&&(h=n(m,c),d=r(y,s))})}function a_(){let e=null;const t=()=>Wr();let n;const r=()=>n||(n=new i_({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(Qy()&&((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:Pk,fn:Ok,waitFor:o_,waitUntil:s_,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 Hk(),c},resetAllMocks(){return Yk(),c},restoreAllMocks(){return Kk(),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 Mk(t().evaluatedModules),c},async dynamicImportSettled(){return e1()},setConfig(a){e||(e={...t().config}),Object.assign(t().config,a)},resetConfig(){e&&Object.assign(t().config,e)}};return c}const c_=a_(),Qn=c_;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=mI({stackTraceLimit:5}).split(`
|
|
210
|
-
`);return((n=
|
|
208
|
+
`)}`;try{Object.defineProperty(M,"stack",{value:K})}catch{}return M}function ve(){class E extends y{constructor(B,w,G,K,se,de,st){arguments.length===0?super(E.clock.now):super(...arguments),Object.defineProperty(this,"constructor",{value:y,enumerable:!1})}static[Symbol.hasInstance](B){return B instanceof y}}return E.isFake=!0,y.now&&(E.now=function(){return E.clock.now}),y.toSource&&(E.toSource=function(){return y.toSource()}),E.toString=function(){return y.toString()},new Proxy(E,{apply(){if(this instanceof E)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(E.clock.now).toString()}})}function ye(){const E={};return Object.getOwnPropertyNames(x).forEach(A=>E[A]=x[A]),E.DateTimeFormat=function(...A){const M=new x.DateTimeFormat(...A),B={};return["formatRange","formatRangeToParts","resolvedOptions"].forEach(w=>{B[w]=M[w].bind(M)}),["format","formatToParts"].forEach(w=>{B[w]=function(G){return M[w](G||E.clock.now)}}),B},E.DateTimeFormat.prototype=Object.create(x.DateTimeFormat.prototype),E.DateTimeFormat.supportedLocalesOf=x.DateTimeFormat.supportedLocalesOf,E}function fe(E,A){E.jobs||(E.jobs=[]),E.jobs.push(A)}function ee(E){if(E.jobs){for(let A=0;A<E.jobs.length;A++){const M=E.jobs[A];if(M.func.apply(null,M.args),$(E,A),E.loopLimit&&A>E.loopLimit)throw ie(E,M)}C(),E.jobs=[]}}function he(E,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)),k(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),E.timers||(E.timers={}),A.id=T++,A.createdAt=E.now,A.callAt=E.now+(parseInt(A.delay)||(E.duringTick?1:0)),E.timers[A.id]=A,h){const M={refed:!0,ref:function(){return this.refed=!0,M},unref:function(){return this.refed=!1,M},hasRef:function(){return this.refed},refresh:function(){return A.callAt=E.now+(parseInt(A.delay)||(E.duringTick?1:0)),E.timers[A.id]=A,M},[Symbol.toPrimitive]:function(){return A.id}};return M}return A.id}function Ke(E,A){if(E.callAt<A.callAt)return-1;if(E.callAt>A.callAt)return 1;if(E.immediate&&!A.immediate)return-1;if(!E.immediate&&A.immediate)return 1;if(E.createdAt<A.createdAt)return-1;if(E.createdAt>A.createdAt)return 1;if(E.id<A.id)return-1;if(E.id>A.id)return 1}function _e(E,A,M){const B=E.timers;let w=null,G,K;for(G in B)B.hasOwnProperty(G)&&(K=X(A,M,B[G]),K&&(!w||Ke(w,B[G])===1)&&(w=B[G]));return w}function oe(E){const A=E.timers;let M=null,B;for(B in A)A.hasOwnProperty(B)&&(!M||Ke(M,A[B])===1)&&(M=A[B]);return M}function Ee(E){const A=E.timers;let M=null,B;for(B in A)A.hasOwnProperty(B)&&(!M||Ke(M,A[B])===-1)&&(M=A[B]);return M}function Re(E,A){if(typeof A.interval=="number"?E.timers[A.id].callAt+=A.interval:delete E.timers[A.id],typeof A.func=="function")A.func.apply(null,A.args);else{const M=eval;(function(){M(A.func)})()}}function Ve(E){return E==="IdleCallback"||E==="AnimationFrame"?`cancel${E}`:`clear${E}`}function Ct(E){return E==="IdleCallback"||E==="AnimationFrame"?`request${E}`:`set${E}`}function Ze(){let E=0;return function(A){!E++&&console.warn(A)}}const He=Ze();function nt(E,A,M){if(!A)return;E.timers||(E.timers={});const B=Number(A);if(Number.isNaN(B)||B<c){const w=Ve(M);if(E.shouldClearNativeTimers===!0){const G=E[`_${w}`];return typeof G=="function"?G(A):void 0}He(`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(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=Uy(t[t.findLastIndex(r=>r.includes(` at Object.${e}`)||r.includes(`${e}@`)||r.includes(` at ${e} (`))+1]))==null?void 0:n.file)||""}const w_=["matchSnapshot","toMatchSnapshot","toMatchInlineSnapshot","toThrowErrorMatchingSnapshot","toThrowErrorMatchingInlineSnapshot","throws","Throw","throw","toThrow","toThrowError"];function gp(e,t){throw e.cause==null&&(e.cause=new Error("Matcher did not succeed in time.")),mb(e,t)}function x_(e){return function(n,r={}){var f;const i=((f=zr().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"&&w_.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 T=new Error("STACK_TRACE_ERROR"),O=async()=>{var ie;me.flag(a,"_name",d),me.flag(a,"error",T);const $=me.flag(a,"_poll.onSettled");if((ie=Object.getOwnPropertyDescriptor(p,"__vitest_poll_takeover__"))!=null&&ie.value)try{const ve=await p.call(a,...x);return await($==null?void 0:$({assertion:a,status:"pass"})),ve}catch(ve){await($==null?void 0:$({assertion:a,status:"fail"})),gp(ve,T)}const{setTimeout:C,clearTimeout:z}=nr();let le="fn",D=!1;const X=C(()=>{D=!0},s);try{for(;;){const ve=D;ve&&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($==null?void 0:$({assertion:a,status:"pass"})),fe}catch(ye){(ve||le==="assertion"&&me.flag(a,"_poll.assert_once"))&&(await($==null?void 0:$({assertion:a,status:"fail"})),gp(ye,T)),await x4(o,C),Qn.isFakeTimers()&&Qn.advanceTimersByTime(o)}}}finally{z(X)}};let k=!1;u.onFinished??(u.onFinished=[]),u.onFinished.push(()=>{if(!k){const $=me.flag(a,"negate")?"not.":"",C=`expect.${me.flag(a,"_poll.element")?"element(locator)":"poll(assertion)"}.${$}${String(d)}()`;throw mb(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(M,C){return A=!0,(_||(_=O())).then(M,C)},catch(M){return A=!0,(_||(_=O())).catch(M)},finally(M){return A=!0,(_||(_=O())).finally(M)},[Symbol.toStringTag]:"Promise"}}}});return l}}function ub(e,t){return t.stack!==void 0&&(e.stack=t.stack.replace(t.message,e.message)),e}let ta;function Qa(){return ta||(ta=new jC({isEqual:(e,t)=>te(e,t,[ot,rr])})),ta}function dp(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:fk(e).slice(1).join(" > "),testId:e.id}}function nl(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 rl(e){const t=me.flag(e,"vitest-test");if(!t)throw new Error(`'${nl(e)}' cannot be used without test context`);return t}function Er(e){if(me.flag(e,"negate"))throw new Error(`${nl(e)} cannot be used with "not"`)}const f_=(e,t)=>{for(const n of["matchSnapshot","toMatchSnapshot"])t.addMethod(e.Assertion.prototype,n,Vn(t,n,function(r,i){return pr(bi({assertion:this,received:t.flag(this,"object"),...pp(r,i)}),e.util.flag(this,"message"))}));t.addMethod(e.Assertion.prototype,"toMatchFileSnapshot",function(n,r){t.flag(this,"_name","toMatchFileSnapshot"),Er(this);const i=h_({assertion:this,received:t.flag(this,"object"),filepath:n,hint:r}).then(o=>pr(o,e.util.flag(this,"message")));return Ka(rl(this),i,Ga(t,this,!0),new Error("resolves"),t.flag(this,"soft"))}),t.addMethod(e.Assertion.prototype,"toMatchInlineSnapshot",Vn(t,"toMatchInlineSnapshot",function(r,i,o){return pr(bi({assertion:this,received:t.flag(this,"object"),isInline:!0,...mp(r,i,o)}),e.util.flag(this,"message"))})),t.addMethod(e.Assertion.prototype,"toThrowErrorMatchingSnapshot",Vn(t,"toThrowErrorMatchingSnapshot",function(n,r){Er(this);const i=t.flag(this,"object"),o=t.flag(this,"promise");return pr(bi({assertion:this,received:dp(i,o),...pp(n,r)}),e.util.flag(this,"message"))})),t.addMethod(e.Assertion.prototype,"toThrowErrorMatchingInlineSnapshot",Vn(t,"toThrowErrorMatchingInlineSnapshot",function(r,i){Er(this);const o=t.flag(this,"object"),s=t.flag(this,"promise");return pr(bi({assertion:this,received:dp(o,s),isInline:!0,...mp(void 0,r,i)}),e.util.flag(this,"message"))})),t.addMethod(e.expect,"addSnapshotSerializer",pC)};function pp(e,t){return typeof e=="string"?{hint:e}:{properties:e,hint:t}}function mp(e,t,n){let r;return typeof e=="string"?(r=Vd(e),{inlineSnapshot:r,hint:t}):(t&&(r=Vd(t)),{properties:e,inlineSnapshot:r,hint:n})}function bi(e){const{assertion:t}=e;Er(t);const n=nl(t),r=rl(t);return Qa().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 h_(e){const{assertion:t}=e;Er(t);const n=lb(rl(t)),r=Qa().getSnapshotState(n.filepath),i=await r.environment.resolveRawPath(n.filepath,e.filepath),o=await r.environment.readSnapshotFile(i);return Qa().match({received:e.received,message:e.hint,rawSnapshot:{file:i,content:o??void 0},...n})}function pr(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:Wr().config.snapshotOptions.expand}})}}yn(XA);yn(KA);yn(bA);yn(f_);yn(GA);function d_(e){const t=((o,s)=>{const{assertionCalls:c}=xr(t);return Ps({assertionCalls:c+1},t),In(o,s)});Object.assign(t,In),Object.assign(t,globalThis[Ku]),t.getState=()=>xr(t),t.setState=o=>Ps(o,t);const n=xr(globalThis[jo])||{};Ps({...n,assertionCalls:0,isExpectingAssertions:!1,isExpectingAssertionsError:null,expectedAssertionsNumber:null,expectedAssertionsNumberErrorGen:null,get testPath(){return Wr().filepath},currentTestName:n.currentTestName},t),t.assert=g,t.extend=o=>In.extend(t,o),t.addEqualityTesters=o=>AA(o),t.soft=(...o)=>t(...o).withContext({soft:!0}),t.poll=l_(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(wA),t}const Bt=d_();Object.defineProperty(globalThis,jo,{value:Bt,writable:!0,configurable:!0});const Lo={numRuns:100,timeout:1e3,verbose:!1};function fb(e,t,n,r){const i={...Lo,...r};tn(e,async()=>{await Lr(rc(...t,async(...o)=>{await n(...o)}),{numRuns:i.numRuns,seed:i.seed,verbose:i.verbose,examples:i.examples})})}function p_(e,t,n,r){const i={...Lo,...r};tn(e,()=>{Lr(Rr(...t,(...o)=>{n(...o)}),{numRuns:i.numRuns,seed:i.seed,verbose:i.verbose,examples:i.examples})})}const m_={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(mo({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:()=>pc(),uuid:()=>Li(),url:()=>Vc(),isoDate:()=>fo().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:It(be(),{nil:void 0}),touched:Ft(),dirty:Ft()}),tableRow:e=>zt({id:Li(),...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 g_(e,t,n){const r={...Lo,...n};Lr(Rr(...e,(...i)=>t(...i)),{numRuns:r.numRuns,seed:r.seed,verbose:r.verbose})}function y_(e,t,n){const r={...Lo,...n};return co(Rr(...e,(...i)=>(t(...i),!0)),{numRuns:r.numRuns,seed:r.seed,verbose:r.verbose})}function b_(e,t,n,r,i){fb(e,[r],async o=>{const s=t(),c=n();for(const a of o)a.check(s)&&await a.run(s,c)},i)}const hb=[["mobile",375],["tablet",768],["desktop",1024],["wide",1440]];function w_(e,t={}){const{name:n,wrapper:r}=t;tn(n||"renders correctly",()=>{const{container:o}=r?Ge.render(ze.jsx(r,{children:e})):Ge.render(e);Bt(o.firstChild).toMatchSnapshot()})}function S_(e,t,n,r={}){const{wrapper:i}=r;Object.entries(n).forEach(([o,s])=>{To(`${o} variants`,()=>{s.forEach(c=>{const a={...t,[o]:c},u=ze.jsx(e,{...a});tn(`${o}=${JSON.stringify(c)}`,()=>{const{container:l}=i?Ge.render(ze.jsx(i,{children:u})):Ge.render(u);Bt(l.firstChild).toMatchSnapshot()})})})})}const Xr=["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 x_(e,t={}){const{name:n,wrapper:r,properties:i=Xr,pseudo:o}=t;tn(n||"has expected styles",()=>{const{container:c}=r?Ge.render(ze.jsx(r,{children:e})):Ge.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 E_(e,t,n,r={}){const{properties:i=Xr,wrapper:o}=r;To("state styles",()=>{Object.entries(n).forEach(([s,c])=>{tn(`${s} state`,()=>{const a={...t,...c.props||{}},u=ze.jsx(e,{...a}),{container:l}=o?Ge.render(ze.jsx(o,{children:u})):Ge.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 T_(e,t,n,r={}){const{properties:i=Xr}=r;To("theme snapshots",()=>{n.forEach(({name:o,theme:s})=>{tn(`${o} theme`,()=>{const{container:c}=Ge.render(ze.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 v_(e,t={}){const{wrapper:n,breakpoints:r=hb}=t;To("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?Ge.render(ze.jsx(n,{children:e})):Ge.render(e);Bt(c.firstChild).toMatchSnapshot(),window.matchMedia=s})})})}function I_(e,t={}){const{wrapper:n}=t,{container:r}=n?Ge.render(ze.jsx(n,{children:e})):Ge.render(e);return r.innerHTML}function k_(e,t=Xr,n={}){const{wrapper:r}=n,{container:i}=r?Ge.render(ze.jsx(r,{children:e})):Ge.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 A_(e,t={}){const{name:n,wrapper:r}=t;tn(n||"has expected accessibility attributes",()=>{const{container:o}=r?Ge.render(ze.jsx(r,{children:e})):Ge.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 to={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}},il={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"}},no={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"}}},Zr={viewports:[375,768,1280],diffThreshold:.05,delay:300,pauseAnimationAtEnd:!0};function C_(){return function(t,n){const r=n.globals.theme||"light",i=il[r];return ze.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:ze.jsx(t,{})})}}function __(){return function(t,n){const r=n.globals.direction||"ltr";return ze.jsx("div",{dir:r,style:{direction:r},children:ze.jsx(t,{})})}}function M_(){return function(t,n){const r=n.globals.theme||"light",i=n.globals.direction||"ltr",o=n.globals.reducedMotion||!1,s=il[r];return ze.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:ze.jsx(t,{})})}}function $_(e,t){const r=(t||["mobile","tablet","desktop"]).map(i=>to[i].width);return{...e,parameters:{...e.parameters||{},chromatic:{...Zr,viewports:r}}}}function O_(e,t){const n=t||["light","dark"];return{...e,parameters:{...e.parameters||{},chromatic:{...Zr,modes:Object.fromEntries(n.map(r=>[r,no[r]]))}}}}function P_(e){return{...e,parameters:{...e.parameters||{},chromatic:{...Zr,modes:{ltr:{globals:{direction:"ltr"}},rtl:{globals:{direction:"rtl"}}}}}}}function N_(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:to[s].width,height:to[s].height}}}),r.forEach(s=>{o[`theme-${s}`]=no[s]}),i&&(o.rtl=no.rtl),{...e,parameters:{...e.parameters||{},chromatic:{...Zr,modes:o}}}}const j_={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}}},F_={version:2,snapshot:{widths:[375,768,1280,1920],minHeight:1024,percyCSS:`
|
|
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:`
|
|
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 K_(e,t){return{name:e,...t}}const wb=["@storybook/addon-essentials","@storybook/addon-a11y","@storybook/addon-viewport","@storybook/addon-themes","storybook-addon-rtl"],xb={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"}},H_={viewport:{viewports:xb,defaultViewport:"desktop"},chromatic:{viewports:[375,768,1280],diffThreshold:.05,pauseAnimationAtEnd:!0,delay:300},a11y:{element:"#storybook-root",config:{},options:{},manual:!1},layout:"fullscreen"},Y_={addons:wb,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,8 +238,10 @@ const preview: Preview = {
|
|
|
238
238
|
};
|
|
239
239
|
|
|
240
240
|
export default preview;
|
|
241
|
-
`}const
|
|
241
|
+
`}const X_={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 Z_(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 Q_={"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}},e$={chromium:{name:"chromium",channel:void 0},chrome:{name:"chromium",channel:"chrome"},firefox:{name:"firefox"},webkit:{name:"webkit"},edge:{name:"chromium",channel:"msedge"}};class Sb{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 cl(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 t$(e){const{violations:t}=await cl(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 Eb(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 Tb(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 n$(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 vb(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 r$(e,t){return{page:e,context:t,helpers:new Sb(e),axe:()=>cl(e),mockAPI:n=>Eb(e,n),mockGraphQL:(n,r)=>Tb(e,n,r),performance:()=>vb(e)}}const xp={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},i$={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 o${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()),er.delete(this.win)}}const er=new Map;function s$(e=window){let t=er.get(e);return t||(t=new o$(e),er.set(e,t)),t}function ul(e={}){const t=s$(),n=e.family??"xbox",r={id:e.id??i$[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[xp[c]];u.pressed=!0,u.touched=!0,u.value=a,i()},release(c){const a=r.buttons[xp[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 a$(){var e;return((e=er.get(window))==null?void 0:e.pendingFrames)??0}function Ab(){const e=er.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 Ib(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 c$(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);Ib(s,{left:o[0]+a*(r[0]+i),top:o[1]+u*(r[1]+i),width:r[0],height:r[1]})})}function nc(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 u$={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}]},l$={up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight"},f$={up:"dpadUp",down:"dpadDown",left:"dpadLeft",right:"dpadRight"};function h$(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 ji=null;function kb(e,t={}){const{device:n="keyboard",direction:r="down"}=t;if(n==="keyboard"){if(e==="navigate"){nc(l$[r],{target:t.target});return}const s=u$[e];if(!s)throw new Error(`pressIntent: "${e}" has no default key; press the control's own with pressKey()`);nc(s[0],{...s[1],target:t.target});return}let i=t.pad;if(i||((!ji||!er.get(window))&&(ji=ul({family:t.family??"xbox"})),i=ji),e==="navigate"){i.tap(f$[r]);return}const o=h$(e,t.family??"xbox");if(!o)throw new Error(`pressIntent: "${e}" has no default gamepad button`);i.tap(o)}function Sp(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 Cb(e,t){var o;const n=[],r=e.render();let i;try{t==="gamepad"&&(i=ul({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;Ue.act(()=>{kb(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 ${Sp(a)}, expected ${s.expectFocus}`)}else s.expectFocus&&!s.expectFocus(a)&&n.push(`${u}: focus on ${Sp(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(),Ab(),ji=null,typeof r=="function"&&r()}return n}function d$(e,t,n){n.describe(`${e} — input contract`,()=>{for(const r of t.devices??["keyboard","gamepad"])n.it(r,()=>{const i=Cb(t,r);if(i.length>0)throw new Error(`${e} (${r}):
|
|
246
|
+
${i.join(`
|
|
247
|
+
`)}`)})})}function p$(...e){return e.join("-")}const m$={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"},_b=({children:e,direction:t="ltr"})=>Fb.createElement("div",{dir:t,"data-testid":"nice-test-root",style:{direction:t}},e);process.env.NODE_ENV!=="production"&&(_b.displayName="NiceTestWrapper");function g$(e,t,n){const r=new KeyboardEvent("keydown",{key:t,bubbles:!0,cancelable:!0,...n});e.dispatchEvent(r)}function y$(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 b$(e,t){const n=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window,...t});e.dispatchEvent(n)}function w$(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 x$(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 S$(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 E$(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 T$(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 v$(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 A$(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 I$(e){return e.getAttribute("aria-busy")==="true"||e.classList.contains("loading")||e.querySelector('[data-loading="true"]')!==null}function k$(e){return e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"||e.classList.contains("disabled")}function C$(e){return e.getAttribute("aria-expanded")==="true"||e.classList.contains("expanded")}function _$(e){return e instanceof HTMLInputElement?e.checked:e.getAttribute("aria-checked")==="true"||e.classList.contains("checked")}exports.BROWSER_CONFIGS=e$;exports.DEFAULT_BREAKPOINTS=bb;exports.DEFAULT_STYLE_PROPERTIES=Zr;exports.DEVICE_CONFIGS=Q_;exports.NiceTestHelpers=Sb;exports.NiceTestWrapper=_b;exports.VISUAL_BREAKPOINTS=ro;exports.VISUAL_THEMES=al;exports.arbitraries=A_;exports.axeCheck=cl;exports.checkAriaCompliance=x$;exports.checkWithStats=k_;exports.chromaticCIConfig=X_;exports.chromaticDefaults=Qr;exports.chromaticModes=io;exports.cleanHtmlForSnapshot=A$;exports.createMockDataSource=w$;exports.createRTLDecorator=D_;exports.createTestContext=r$;exports.createThemeDecorator=L_;exports.createVisualPreviewConfig=J_;exports.createVisualTestDecorator=B_;exports.describeInputContract=d$;exports.expect=Bt;exports.expectNoA11yViolations=t$;exports.fc=A6;exports.forAll=I_;exports.getChromaticCommand=Z_;exports.getFocusableElements=E$;exports.getStylesSnapshot=F_;exports.isChecked=_$;exports.isDisabled=k$;exports.isExpanded=C$;exports.isFocusable=S$;exports.isLoading=I$;exports.measurePerformance=vb;exports.mockAPI=Eb;exports.mockGamepad=ul;exports.mockGraphQL=Tb;exports.mockSignalR=n$;exports.niceSelectors=m$;exports.pendingAnimationFrames=a$;exports.percyConfig=G_;exports.percySnapshot=K_;exports.pressIntent=kb;exports.pressKey=nc;exports.renderToSnapshot=j_;exports.resetMockGamepads=Ab;exports.runInputContract=Cb;exports.simulateClick=b$;exports.simulateKeyboard=g$;exports.simulateType=y$;exports.snapshotA11y=R_;exports.snapshotComponent=__;exports.snapshotResponsive=N_;exports.snapshotStateStyles=O_;exports.snapshotStyles=M_;exports.snapshotThemes=P_;exports.snapshotVariants=$_;exports.stubGridLayout=c$;exports.stubLayout=Ib;exports.testId=p$;exports.testModel=C_;exports.testProperty=yb;exports.testPropertySync=v_;exports.visualTestingAddons=wb;exports.visualTestingGlobalTypes=z_;exports.visualTestingParameters=H_;exports.visualTestingPreset=Y_;exports.visualTestingViewports=xb;exports.waitFor=v$;exports.waitForElement=T$;exports.withFullVisualTesting=W_;exports.withRTLTesting=q_;exports.withVisualThemes=V_;exports.withVisualViewports=U_;
|