invar-tools 1.16.0__py3-none-any.whl → 1.17.0__py3-none-any.whl
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.
- invar/core/format_strategies.py +3 -1
- invar/mcp/handlers.py +10 -1
- invar/node_tools/eslint-plugin/cli.js +55 -9
- invar/node_tools/fc-runner/bundle.js +77 -0
- invar/node_tools/fc-runner/cli.d.ts +12 -0
- invar/node_tools/fc-runner/cli.d.ts.map +1 -0
- invar/node_tools/fc-runner/cli.js +117 -45
- invar/node_tools/fc-runner/cli.js.map +1 -0
- invar/node_tools/fc-runner/index.d.ts +338 -0
- invar/node_tools/fc-runner/index.d.ts.map +1 -0
- invar/node_tools/fc-runner/index.js +260 -0
- invar/node_tools/fc-runner/index.js.map +1 -0
- invar/shell/prove/guard_ts.py +85 -5
- {invar_tools-1.16.0.dist-info → invar_tools-1.17.0.dist-info}/METADATA +1 -1
- {invar_tools-1.16.0.dist-info → invar_tools-1.17.0.dist-info}/RECORD +20 -12
- {invar_tools-1.16.0.dist-info → invar_tools-1.17.0.dist-info}/WHEEL +0 -0
- {invar_tools-1.16.0.dist-info → invar_tools-1.17.0.dist-info}/entry_points.txt +0 -0
- {invar_tools-1.16.0.dist-info → invar_tools-1.17.0.dist-info}/licenses/LICENSE +0 -0
- {invar_tools-1.16.0.dist-info → invar_tools-1.17.0.dist-info}/licenses/LICENSE-GPL +0 -0
- {invar_tools-1.16.0.dist-info → invar_tools-1.17.0.dist-info}/licenses/NOTICE +0 -0
|
@@ -1,41 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";var Ia=Object.defineProperty;var o=(e,t)=>Ia(e,"name",{value:t,configurable:!0});var Dn=(e,t)=>{for(var r in t)Ia(e,r,{get:t[r],enumerable:!0})};var Qe={};Dn(Qe,{Arbitrary:()=>C,ExecutionStatus:()=>Se,PreconditionFailure:()=>K,Random:()=>_e,Stream:()=>S,Value:()=>m,VerbosityLevel:()=>G,__commitHash:()=>qd,__type:()=>Wd,__version:()=>Gd,anything:()=>Pt,array:()=>k,ascii:()=>zr,asciiString:()=>Ls,assert:()=>Fo,asyncDefaultReportMessage:()=>si,asyncModelRun:()=>na,asyncProperty:()=>Io,asyncStringify:()=>At,asyncToStringMethod:()=>fe,base64:()=>Wr,base64String:()=>Bs,bigInt:()=>He,bigInt64Array:()=>ua,bigIntN:()=>Zo,bigUint:()=>Ho,bigUint64Array:()=>ca,bigUintN:()=>ur,boolean:()=>Me,char:()=>Gr,char16bits:()=>qr,check:()=>ir,clone:()=>ns,cloneIfNeeded:()=>Pe,cloneMethod:()=>F,commands:()=>ea,compareBooleanFunc:()=>Ss,compareFunc:()=>vs,configureGlobal:()=>So,constant:()=>L,constantFrom:()=>re,context:()=>es,createDepthIdentifier:()=>Dr,date:()=>Jr,default:()=>ix,defaultReportMessage:()=>oi,dictionary:()=>Ct,domain:()=>Mt,double:()=>Ye,emailAddress:()=>fs,falsy:()=>Ko,float:()=>nn,float32Array:()=>mn,float64Array:()=>xn,fullUnicode:()=>Tt,fullUnicodeString:()=>Ot,func:()=>Is,gen:()=>Lo,getDepthContextFor:()=>kt,hasAsyncToStringMethod:()=>nr,hasCloneMethod:()=>se,hasToStringMethod:()=>rr,hash:()=>ft,hexa:()=>Zr,hexaString:()=>un,infiniteStream:()=>Ds,int16Array:()=>gn,int32Array:()=>bn,int8Array:()=>yn,integer:()=>M,ipV4:()=>Nt,ipV4Extended:()=>an,ipV6:()=>dn,json:()=>Fs,jsonValue:()=>_n,letrec:()=>pn,limitShrink:()=>xa,lorem:()=>Ns,mapToConstant:()=>Je,maxSafeInteger:()=>on,maxSafeNat:()=>As,memo:()=>Os,mixedCase:()=>Ps,modelRun:()=>ra,nat:()=>pe,noBias:()=>Lr,noShrink:()=>dt,object:()=>Rs,oneof:()=>B,option:()=>Ie,pre:()=>no,property:()=>Pr,readConfigureGlobal:()=>Y,record:()=>En,resetConfigureGlobal:()=>vo,sample:()=>Uo,scheduledModelRun:()=>ia,scheduler:()=>sa,schedulerFor:()=>aa,shuffledSubarray:()=>qs,sparseArray:()=>kn,statistics:()=>Vo,stream:()=>te,string:()=>J,string16bits:()=>Ws,stringMatching:()=>ma,stringOf:()=>De,stringify:()=>$,subarray:()=>Gs,toStringMethod:()=>ie,tuple:()=>v,uint16Array:()=>wn,uint32Array:()=>Sn,uint8Array:()=>vn,uint8ClampedArray:()=>In,ulid:()=>Hs,unicode:()=>Hr,unicodeJson:()=>Us,unicodeJsonValue:()=>Cn,unicodeString:()=>Tn,uniqueArray:()=>Ue,uuid:()=>Ks,uuidV:()=>Ys,webAuthority:()=>Mn,webFragments:()=>Nn,webPath:()=>Pn,webQueryParameters:()=>jn,webSegment:()=>On,webUrl:()=>Xs});var ga={};Dn(ga,{Arbitrary:()=>C,ExecutionStatus:()=>Se,PreconditionFailure:()=>K,Random:()=>_e,Stream:()=>S,Value:()=>m,VerbosityLevel:()=>G,__commitHash:()=>qd,__type:()=>Wd,__version:()=>Gd,anything:()=>Pt,array:()=>k,ascii:()=>zr,asciiString:()=>Ls,assert:()=>Fo,asyncDefaultReportMessage:()=>si,asyncModelRun:()=>na,asyncProperty:()=>Io,asyncStringify:()=>At,asyncToStringMethod:()=>fe,base64:()=>Wr,base64String:()=>Bs,bigInt:()=>He,bigInt64Array:()=>ua,bigIntN:()=>Zo,bigUint:()=>Ho,bigUint64Array:()=>ca,bigUintN:()=>ur,boolean:()=>Me,char:()=>Gr,char16bits:()=>qr,check:()=>ir,clone:()=>ns,cloneIfNeeded:()=>Pe,cloneMethod:()=>F,commands:()=>ea,compareBooleanFunc:()=>Ss,compareFunc:()=>vs,configureGlobal:()=>So,constant:()=>L,constantFrom:()=>re,context:()=>es,createDepthIdentifier:()=>Dr,date:()=>Jr,defaultReportMessage:()=>oi,dictionary:()=>Ct,domain:()=>Mt,double:()=>Ye,emailAddress:()=>fs,falsy:()=>Ko,float:()=>nn,float32Array:()=>mn,float64Array:()=>xn,fullUnicode:()=>Tt,fullUnicodeString:()=>Ot,func:()=>Is,gen:()=>Lo,getDepthContextFor:()=>kt,hasAsyncToStringMethod:()=>nr,hasCloneMethod:()=>se,hasToStringMethod:()=>rr,hash:()=>ft,hexa:()=>Zr,hexaString:()=>un,infiniteStream:()=>Ds,int16Array:()=>gn,int32Array:()=>bn,int8Array:()=>yn,integer:()=>M,ipV4:()=>Nt,ipV4Extended:()=>an,ipV6:()=>dn,json:()=>Fs,jsonValue:()=>_n,letrec:()=>pn,limitShrink:()=>xa,lorem:()=>Ns,mapToConstant:()=>Je,maxSafeInteger:()=>on,maxSafeNat:()=>As,memo:()=>Os,mixedCase:()=>Ps,modelRun:()=>ra,nat:()=>pe,noBias:()=>Lr,noShrink:()=>dt,object:()=>Rs,oneof:()=>B,option:()=>Ie,pre:()=>no,property:()=>Pr,readConfigureGlobal:()=>Y,record:()=>En,resetConfigureGlobal:()=>vo,sample:()=>Uo,scheduledModelRun:()=>ia,scheduler:()=>sa,schedulerFor:()=>aa,shuffledSubarray:()=>qs,sparseArray:()=>kn,statistics:()=>Vo,stream:()=>te,string:()=>J,string16bits:()=>Ws,stringMatching:()=>ma,stringOf:()=>De,stringify:()=>$,subarray:()=>Gs,toStringMethod:()=>ie,tuple:()=>v,uint16Array:()=>wn,uint32Array:()=>Sn,uint8Array:()=>vn,uint8ClampedArray:()=>In,ulid:()=>Hs,unicode:()=>Hr,unicodeJson:()=>Us,unicodeJsonValue:()=>Cn,unicodeString:()=>Tn,uniqueArray:()=>Ue,uuid:()=>Ks,uuidV:()=>Ys,webAuthority:()=>Mn,webFragments:()=>Nn,webPath:()=>Pn,webQueryParameters:()=>jn,webSegment:()=>On,webUrl:()=>Xs});var K=class e extends Error{static{o(this,"PreconditionFailure")}constructor(t=!1){super(),this.interruptExecution=t,this.footprint=e.SharedFootPrint}static isFailure(t){return t!=null&&t.footprint===e.SharedFootPrint}};K.SharedFootPrint=Symbol.for("fast-check/PreconditionFailure");function no(e){if(!e)throw new K}o(no,"pre");var _r=class{static{o(this,"Nil")}[Symbol.iterator](){return this}next(t){return{value:t,done:!0}}};_r.nil=new _r;function Aa(){return _r.nil}o(Aa,"nilHelper");function*ka(e,t){for(let r of e)yield t(r)}o(ka,"mapHelper");function*_a(e,t){for(let r of e)yield*t(r)}o(_a,"flatMapHelper");function*Ta(e,t){for(let r of e)t(r)&&(yield r)}o(Ta,"filterHelper");function*Ca(e,t){for(let r=0;r<t;++r){let n=e.next();if(n.done)break;yield n.value}}o(Ca,"takeNHelper");function*Ea(e,t){let r=e.next();for(;!r.done&&t(r.value);)yield r.value,r=e.next()}o(Ea,"takeWhileHelper");function*Ma(e,t){for(let r=e.next();!r.done;r=e.next())yield r.value;for(let r of t)for(let n=r.next();!n.done;n=r.next())yield n.value}o(Ma,"joinHelper");var ol=Symbol.iterator,S=class e{static{o(this,"Stream")}static nil(){return new e(Aa())}static of(...t){return new e(t[ol]())}constructor(t){this.g=t}next(){return this.g.next()}[Symbol.iterator](){return this.g}map(t){return new e(ka(this.g,t))}flatMap(t){return new e(_a(this.g,t))}dropWhile(t){let r=!1;function*n(i){(r||!t(i))&&(r=!0,yield i)}return o(n,"helper"),this.flatMap(n)}drop(t){if(t<=0)return this;let r=0;function n(){return r++<t}return o(n,"helper"),this.dropWhile(n)}takeWhile(t){return new e(Ea(this.g,t))}take(t){return new e(Ca(this.g,t))}filter(t){return new e(Ta(this.g,t))}every(t){for(let r of this.g)if(!t(r))return!1;return!0}has(t){for(let r of this.g)if(t(r))return[!0,r];return[!1,null]}join(...t){return new e(Ma(this.g,t))}getNthOrLast(t){let r=t,n=null;for(let i of this.g){if(r--===0)return i;n=i}return n}};function te(e){return new S(e)}o(te,"stream");var F=Symbol.for("fast-check/cloneMethod");function se(e){return e!==null&&(typeof e=="object"||typeof e=="function")&&F in e&&typeof e[F]=="function"}o(se,"hasCloneMethod");function Pe(e){return se(e)?e[F]():e}o(Pe,"cloneIfNeeded");var sl=Object.defineProperty,m=class{static{o(this,"Value")}constructor(t,r,n=void 0){this.value_=t,this.context=r,this.hasToBeCloned=n!==void 0||se(t),this.readOnce=!1,this.hasToBeCloned?sl(this,"value",{get:n!==void 0?n:this.getValue}):this.value=t}getValue(){return this.hasToBeCloned?this.readOnce?this.value_[F]():(this.readOnce=!0,this.value_):this.value_}};var Na=Object.assign,C=class{static{o(this,"Arbitrary")}filter(t){return new so(this,t)}map(t,r){return new oo(this,t,r)}chain(t){return new io(this,t)}noShrink(){return new ao(this)}noBias(){return new uo(this)}},io=class extends C{static{o(this,"ChainArbitrary")}constructor(t,r){super(),this.arb=t,this.chainer=r}generate(t,r){let n=t.clone(),i=this.arb.generate(t,r);return this.valueChainer(i,t,n,r)}canShrinkWithoutContext(t){return!1}shrink(t,r){return this.isSafeContext(r)?(r.stoppedForOriginal?S.nil():this.arb.shrink(r.originalValue,r.originalContext).map(n=>this.valueChainer(n,r.clonedMrng.clone(),r.clonedMrng,r.originalBias))).join(r.chainedArbitrary.shrink(t,r.chainedContext).map(n=>{let i=Na(Na({},r),{chainedContext:n.context,stoppedForOriginal:!0});return new m(n.value_,i)})):S.nil()}valueChainer(t,r,n,i){let s=this.chainer(t.value_),a=s.generate(r,i),u={originalBias:i,originalValue:t.value_,originalContext:t.context,stoppedForOriginal:!1,chainedArbitrary:s,chainedContext:a.context,clonedMrng:n};return new m(a.value_,u)}isSafeContext(t){return t!=null&&typeof t=="object"&&"originalBias"in t&&"originalValue"in t&&"originalContext"in t&&"stoppedForOriginal"in t&&"chainedArbitrary"in t&&"chainedContext"in t&&"clonedMrng"in t}},oo=class extends C{static{o(this,"MapArbitrary")}constructor(t,r,n){super(),this.arb=t,this.mapper=r,this.unmapper=n,this.bindValueMapper=i=>this.valueMapper(i)}generate(t,r){let n=this.arb.generate(t,r);return this.valueMapper(n)}canShrinkWithoutContext(t){if(this.unmapper!==void 0)try{let r=this.unmapper(t);return this.arb.canShrinkWithoutContext(r)}catch{return!1}return!1}shrink(t,r){if(this.isSafeContext(r))return this.arb.shrink(r.originalValue,r.originalContext).map(this.bindValueMapper);if(this.unmapper!==void 0){let n=this.unmapper(t);return this.arb.shrink(n,void 0).map(this.bindValueMapper)}return S.nil()}mapperWithCloneIfNeeded(t){let r=t.value,n=this.mapper(r);return t.hasToBeCloned&&(typeof n=="object"&&n!==null||typeof n=="function")&&Object.isExtensible(n)&&!se(n)&&Object.defineProperty(n,F,{get:o(()=>()=>this.mapperWithCloneIfNeeded(t)[0],"get")}),[n,r]}valueMapper(t){let[r,n]=this.mapperWithCloneIfNeeded(t),i={originalValue:n,originalContext:t.context};return new m(r,i)}isSafeContext(t){return t!=null&&typeof t=="object"&&"originalValue"in t&&"originalContext"in t}},so=class extends C{static{o(this,"FilterArbitrary")}constructor(t,r){super(),this.arb=t,this.refinement=r,this.bindRefinementOnValue=n=>this.refinementOnValue(n)}generate(t,r){for(;;){let n=this.arb.generate(t,r);if(this.refinementOnValue(n))return n}}canShrinkWithoutContext(t){return this.arb.canShrinkWithoutContext(t)&&this.refinement(t)}shrink(t,r){return this.arb.shrink(t,r).filter(this.bindRefinementOnValue)}refinementOnValue(t){return this.refinement(t.value)}},ao=class extends C{static{o(this,"NoShrinkArbitrary")}constructor(t){super(),this.arb=t}generate(t,r){return this.arb.generate(t,r)}canShrinkWithoutContext(t){return this.arb.canShrinkWithoutContext(t)}shrink(t,r){return S.nil()}noShrink(){return this}},uo=class extends C{static{o(this,"NoBiasArbitrary")}constructor(t){super(),this.arb=t}generate(t,r){return this.arb.generate(t,void 0)}canShrinkWithoutContext(t){return this.arb.canShrinkWithoutContext(t)}shrink(t,r){return this.arb.shrink(t,r)}noBias(){return this}};function co(e){return typeof e=="object"&&e!==null&&"generate"in e&&"shrink"in e&&"canShrinkWithoutContext"in e}o(co,"isArbitrary");function Ln(e){if(!co(e))throw new Error("Unexpected value received: not an instance of Arbitrary")}o(Ln,"assertIsArbitrary");var Oa=Function.prototype.apply,fo=Symbol("apply");function al(e){try{return e.apply}catch{return}}o(al,"safeExtractApply");function ul(e,t,r){let n=e;n[fo]=Oa;let i=n[fo](t,r);return delete n[fo],i}o(ul,"safeApplyHacky");function U(e,t,r){return al(e)===Oa?e.apply(t,r):ul(e,t,r)}o(U,"safeApply");var lo=typeof Array<"u"?Array:void 0;var w=typeof BigInt<"u"?BigInt:void 0;var cu=typeof BigInt64Array<"u"?BigInt64Array:void 0;var fu=typeof BigUint64Array<"u"?BigUint64Array:void 0;var po=typeof Boolean<"u"?Boolean:void 0;var Tr=typeof Date<"u"?Date:void 0;var A=typeof Error<"u"?Error:void 0;var ho=typeof Float32Array<"u"?Float32Array:void 0;var mo=typeof Float64Array<"u"?Float64Array:void 0;var du=typeof Int8Array<"u"?Int8Array:void 0;var lu=typeof Int16Array<"u"?Int16Array:void 0;var pu=typeof Int32Array<"u"?Int32Array:void 0;var Cr=typeof Number<"u"?Number:void 0;var ae=typeof String<"u"?String:void 0;var nt=typeof Set<"u"?Set:void 0;var hu=typeof Uint8Array<"u"?Uint8Array:void 0;var mu=typeof Uint8ClampedArray<"u"?Uint8ClampedArray:void 0;var xu=typeof Uint16Array<"u"?Uint16Array:void 0;var gu=typeof Uint32Array<"u"?Uint32Array:void 0;var bu=typeof encodeURIComponent<"u"?encodeURIComponent:void 0;var je=Map;var Er=Symbol;var Pa=Array.prototype.forEach,ja=Array.prototype.indexOf,Ra=Array.prototype.join,Fa=Array.prototype.map,Ua=Array.prototype.filter,Va=Array.prototype.push,$a=Array.prototype.pop,Da=Array.prototype.splice,La=Array.prototype.slice,Ba=Array.prototype.sort,za=Array.prototype.every;function cl(e){try{return e.forEach}catch{return}}o(cl,"extractForEach");function fl(e){try{return e.indexOf}catch{return}}o(fl,"extractIndexOf");function dl(e){try{return e.join}catch{return}}o(dl,"extractJoin");function ll(e){try{return e.map}catch{return}}o(ll,"extractMap");function pl(e){try{return e.filter}catch{return}}o(pl,"extractFilter");function hl(e){try{return e.push}catch{return}}o(hl,"extractPush");function ml(e){try{return e.pop}catch{return}}o(ml,"extractPop");function xl(e){try{return e.splice}catch{return}}o(xl,"extractSplice");function gl(e){try{return e.slice}catch{return}}o(gl,"extractSlice");function bl(e){try{return e.sort}catch{return}}o(bl,"extractSort");function yl(e){try{return e.every}catch{return}}o(yl,"extractEvery");function Bn(e,t){return cl(e)===Pa?e.forEach(t):U(Pa,e,[t])}o(Bn,"safeForEach");function ue(e,...t){return fl(e)===ja?e.indexOf(...t):U(ja,e,t)}o(ue,"safeIndexOf");function N(e,...t){return dl(e)===Ra?e.join(...t):U(Ra,e,t)}o(N,"safeJoin");function E(e,t){return ll(e)===Fa?e.map(t):U(Fa,e,[t])}o(E,"safeMap");function yu(e,t){return pl(e)===Ua?e.filter(t):U(Ua,e,[t])}o(yu,"safeFilter");function g(e,...t){return hl(e)===Va?e.push(...t):U(Va,e,t)}o(g,"safePush");function zn(e){return ml(e)===$a?e.pop():U($a,e,[])}o(zn,"safePop");function Wn(e,...t){return xl(e)===Da?e.splice(...t):U(Da,e,t)}o(Wn,"safeSplice");function z(e,...t){return gl(e)===La?e.slice(...t):U(La,e,t)}o(z,"safeSlice");function Gn(e,...t){return bl(e)===Ba?e.sort(...t):U(Ba,e,t)}o(Gn,"safeSort");function qn(e,...t){return yl(e)===za?e.every(...t):U(za,e,t)}o(qn,"safeEvery");var Wa=Date.prototype.getTime,Ga=Date.prototype.toISOString;function wl(e){try{return e.getTime}catch{return}}o(wl,"extractGetTime");function Sl(e){try{return e.toISOString}catch{return}}o(Sl,"extractToISOString");function yt(e){return wl(e)===Wa?e.getTime():U(Wa,e,[])}o(yt,"safeGetTime");function wu(e){return Sl(e)===Ga?e.toISOString():U(Ga,e,[])}o(wu,"safeToISOString");var qa=Set.prototype.add,Za=Set.prototype.has;function vl(e){try{return e.add}catch{return}}o(vl,"extractAdd");function Il(e){try{return e.has}catch{return}}o(Il,"extractHas");function Yt(e,t){return vl(e)===qa?e.add(t):U(qa,e,[t])}o(Yt,"safeAdd");function xo(e,t){return Il(e)===Za?e.has(t):U(Za,e,[t])}o(xo,"safeHas");var Ha=WeakMap.prototype.set,Ja=WeakMap.prototype.get;function Al(e){try{return e.set}catch{return}}o(Al,"extractSet");function kl(e){try{return e.get}catch{return}}o(kl,"extractGet");function Su(e,t,r){return Al(e)===Ha?e.set(t,r):U(Ha,e,[t,r])}o(Su,"safeSet");function vu(e,t){return kl(e)===Ja?e.get(t):U(Ja,e,[t])}o(vu,"safeGet");var Ka=Map.prototype.set,Ya=Map.prototype.get;function _l(e){try{return e.set}catch{return}}o(_l,"extractMapSet");function Tl(e){try{return e.get}catch{return}}o(Tl,"extractMapGet");function ke(e,t,r){return _l(e)===Ka?e.set(t,r):U(Ka,e,[t,r])}o(ke,"safeMapSet");function ce(e,t){return Tl(e)===Ya?e.get(t):U(Ya,e,[t])}o(ce,"safeMapGet");var Qa=String.prototype.split,Xa=String.prototype.startsWith,eu=String.prototype.endsWith,tu=String.prototype.substring,ru=String.prototype.toLowerCase,nu=String.prototype.toUpperCase,iu=String.prototype.padStart,ou=String.prototype.charCodeAt,su=String.prototype.normalize,au=String.prototype.replace;function Cl(e){try{return e.split}catch{return}}o(Cl,"extractSplit");function El(e){try{return e.startsWith}catch{return}}o(El,"extractStartsWith");function Ml(e){try{return e.endsWith}catch{return}}o(Ml,"extractEndsWith");function Nl(e){try{return e.substring}catch{return}}o(Nl,"extractSubstring");function Ol(e){try{return e.toLowerCase}catch{return}}o(Ol,"extractToLowerCase");function Pl(e){try{return e.toUpperCase}catch{return}}o(Pl,"extractToUpperCase");function jl(e){try{return e.padStart}catch{return}}o(jl,"extractPadStart");function Rl(e){try{return e.charCodeAt}catch{return}}o(Rl,"extractCharCodeAt");function Fl(e){try{return e.normalize}catch{return}}o(Fl,"extractNormalize");function Ul(e){try{return e.replace}catch{return}}o(Ul,"extractReplace");function W(e,...t){return Cl(e)===Qa?e.split(...t):U(Qa,e,t)}o(W,"safeSplit");function Iu(e,...t){return El(e)===Xa?e.startsWith(...t):U(Xa,e,t)}o(Iu,"safeStartsWith");function Au(e,...t){return Ml(e)===eu?e.endsWith(...t):U(eu,e,t)}o(Au,"safeEndsWith");function V(e,...t){return Nl(e)===tu?e.substring(...t):U(tu,e,t)}o(V,"safeSubstring");function Mr(e){return Ol(e)===ru?e.toLowerCase():U(ru,e,[])}o(Mr,"safeToLowerCase");function Nr(e){return Pl(e)===nu?e.toUpperCase():U(nu,e,[])}o(Nr,"safeToUpperCase");function ku(e,...t){return jl(e)===iu?e.padStart(...t):U(iu,e,t)}o(ku,"safePadStart");function Re(e,t){return Rl(e)===ou?e.charCodeAt(t):U(ou,e,[t])}o(Re,"safeCharCodeAt");function _u(e,t){return Fl(e)===su?e.normalize(t):U(su,e,[t])}o(_u,"safeNormalize");function Tu(e,t,r){return Ul(e)===au?e.replace(t,r):U(au,e,[t,r])}o(Tu,"safeReplace");var uu=Number.prototype.toString;function Vl(e){try{return e.toString}catch{return}}o(Vl,"extractNumberToString");function it(e,...t){return Vl(e)===uu?e.toString(...t):U(uu,e,t)}o(it,"safeNumberToString");var $l=Object.prototype.hasOwnProperty,Dl=Object.prototype.toString;function wt(e,t){return U($l,e,[t])}o(wt,"safeHasOwnProperty");function go(e){return U(Dl,e,[])}o(go,"safeToString");var bo=class{static{o(this,"LazyIterableIterator")}constructor(t){this.producer=t}[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 ye(e){return new bo(e)}o(ye,"makeLazy");var Cu=Array.isArray,Ll=Object.defineProperty;function Eu(e,t){return Ll(e,F,{value:o(()=>{let r=[];for(let n=0;n!==t.length;++n)g(r,t[n].value);return Eu(r,t),r},"value")})}o(Eu,"tupleMakeItCloneable");function Mu(e){let t=!1,r=[],n=[];for(let i=0;i!==e.length;++i){let s=e[i];t=t||s.hasToBeCloned,g(r,s.value),g(n,s.context)}return t&&Eu(r,e),new m(r,n)}o(Mu,"tupleWrapper");function yo(e,t,r){let n=[],i=Cu(r)?r:[];for(let s=0;s!==e.length;++s)g(n,ye(()=>e[s].shrink(t[s],i[s]).map(a=>{let u=E(t,(c,f)=>new m(Pe(c),i[f]));return[...z(u,0,s),a,...z(u,s+1)]}).map(Mu)));return S.nil().join(...n)}o(yo,"tupleShrink");var Zn=class extends C{static{o(this,"TupleArbitrary")}constructor(t){super(),this.arbs=t;for(let r=0;r!==t.length;++r){let n=t[r];if(n==null||n.generate==null)throw new Error(`Invalid parameter encountered at index ${r}: expecting an Arbitrary`)}}generate(t,r){let n=[];for(let i=0;i!==this.arbs.length;++i)g(n,this.arbs[i].generate(t,r));return Mu(n)}canShrinkWithoutContext(t){if(!Cu(t)||t.length!==this.arbs.length)return!1;for(let r=0;r!==this.arbs.length;++r)if(!this.arbs[r].canShrinkWithoutContext(t[r]))return!1;return!0}shrink(t,r){return yo(this.arbs,t,r)}};function v(...e){return new Zn(e)}o(v,"tuple");var Bl=Math.log;function Hn(e){return 2+~~(Bl(e+1)*.4342944819032518)}o(Hn,"runIdToFrequency");var wo={};function So(e){wo=e}o(So,"configureGlobal");function Y(){return wo}o(Y,"readConfigureGlobal");function vo(){wo={}}o(vo,"resetConfigureGlobal");var ot=Symbol("UndefinedContextPlaceholder");function Ge(e){return e.context!==void 0?e:e.hasToBeCloned?new m(e.value_,ot,()=>e.value):new m(e.value_,ot)}o(Ge,"noUndefinedAsContext");var Or=class e{static{o(this,"AsyncProperty")}constructor(t,r){this.arb=t,this.predicate=r;let{asyncBeforeEach:n,asyncAfterEach:i,beforeEach:s,afterEach:a}=Y()||{};if(n!==void 0&&s!==void 0)throw A(`Global "asyncBeforeEach" and "beforeEach" parameters can't be set at the same time when running async properties`);if(i!==void 0&&a!==void 0)throw A(`Global "asyncAfterEach" and "afterEach" parameters can't be set at the same time when running async properties`);this.beforeEachHook=n||s||e.dummyHook,this.afterEachHook=i||a||e.dummyHook}isAsync(){return!0}generate(t,r){let n=this.arb.generate(t,r!=null?Hn(r):void 0);return Ge(n)}shrink(t){if(t.context===void 0&&!this.arb.canShrinkWithoutContext(t.value_))return S.nil();let r=t.context!==ot?t.context:void 0;return this.arb.shrink(t.value_,r).map(Ge)}async runBeforeEach(){await this.beforeEachHook()}async runAfterEach(){await this.afterEachHook()}async run(t,r){r||await this.beforeEachHook();try{let n=await this.predicate(t);return n==null||n===!0?null:{error:new A("Property failed by returning false"),errorMessage:"Error: Property failed by returning false"}}catch(n){return K.isFailure(n)?n:n instanceof A&&n.stack?{error:n,errorMessage:n.stack}:{error:n,errorMessage:ae(n)}}finally{r||await this.afterEachHook()}}beforeEach(t){let r=this.beforeEachHook;return this.beforeEachHook=()=>t(r),this}afterEach(t){let r=this.afterEachHook;return this.afterEachHook=()=>t(r),this}};Or.dummyHook=()=>{};var Qt=class extends C{static{o(this,"AlwaysShrinkableArbitrary")}constructor(t){super(),this.arb=t}generate(t,r){let n=this.arb.generate(t,r);return Ge(n)}canShrinkWithoutContext(t){return!0}shrink(t,r){if(r===void 0&&!this.arb.canShrinkWithoutContext(t))return S.nil();let n=r!==ot?r:void 0;return this.arb.shrink(t,n).map(Ge)}};function Io(...e){if(e.length<2)throw new Error("asyncProperty expects at least two parameters");let t=z(e,0,e.length-1),r=e[e.length-1];Bn(t,Ln);let n=E(t,i=>new Qt(i));return new Or(v(...n),i=>r(...i))}o(Io,"asyncProperty");var St=class e{static{o(this,"Property")}constructor(t,r){this.arb=t,this.predicate=r;let{beforeEach:n=e.dummyHook,afterEach:i=e.dummyHook,asyncBeforeEach:s,asyncAfterEach:a}=Y()||{};if(s!==void 0)throw A(`"asyncBeforeEach" can't be set when running synchronous properties`);if(a!==void 0)throw A(`"asyncAfterEach" can't be set when running synchronous properties`);this.beforeEachHook=n,this.afterEachHook=i}isAsync(){return!1}generate(t,r){let n=this.arb.generate(t,r!=null?Hn(r):void 0);return Ge(n)}shrink(t){if(t.context===void 0&&!this.arb.canShrinkWithoutContext(t.value_))return S.nil();let r=t.context!==ot?t.context:void 0;return this.arb.shrink(t.value_,r).map(Ge)}runBeforeEach(){this.beforeEachHook()}runAfterEach(){this.afterEachHook()}run(t,r){r||this.beforeEachHook();try{let n=this.predicate(t);return n==null||n===!0?null:{error:new A("Property failed by returning false"),errorMessage:"Error: Property failed by returning false"}}catch(n){return K.isFailure(n)?n:n instanceof A&&n.stack?{error:n,errorMessage:n.stack}:{error:n,errorMessage:ae(n)}}finally{r||this.afterEachHook()}}beforeEach(t){let r=this.beforeEachHook;return this.beforeEachHook=()=>t(r),this}afterEach(t){let r=this.afterEachHook;return this.afterEachHook=()=>t(r),this}};St.dummyHook=()=>{};function Pr(...e){if(e.length<2)throw new Error("property expects at least two parameters");let t=z(e,0,e.length-1),r=e[e.length-1];Bn(t,Ln);let n=E(t,i=>new Qt(i));return new St(v(...n),i=>r(...i))}o(Pr,"property");var Mo={};Dn(Mo,{__commitHash:()=>sp,__type:()=>ip,__version:()=>op,congruential32:()=>Pu,generateN:()=>Nu,mersenne:()=>Ru,skipN:()=>Jn,uniformArrayIntDistribution:()=>Bu,uniformBigIntDistribution:()=>zu,uniformIntDistribution:()=>Gu,unsafeGenerateN:()=>Ao,unsafeSkipN:()=>jr,unsafeUniformArrayIntDistribution:()=>vt,unsafeUniformBigIntDistribution:()=>It,unsafeUniformIntDistribution:()=>qe,xoroshiro128plus:()=>$u,xorshift128plus:()=>Uu});function Ao(e,t){for(var r=[],n=0;n!=t;++n)r.push(e.unsafeNext());return r}o(Ao,"unsafeGenerateN");function Nu(e,t){var r=e.clone(),n=Ao(r,t);return[n,r]}o(Nu,"generateN");function jr(e,t){for(var r=0;r!=t;++r)e.unsafeNext()}o(jr,"unsafeSkipN");function Jn(e,t){var r=e.clone();return jr(r,t),r}o(Jn,"skipN");var zl=214013,Wl=2531011,Gl=4294967295,ql=(1<<31)-1,ko=o(function(e){return e*zl+Wl&Gl},"computeNextSeed"),_o=o(function(e){return(e&ql)>>16},"computeValueFromNextSeed"),Ou=(function(){function e(t){this.seed=t}return o(e,"LinearCongruential32"),e.prototype.clone=function(){return new e(this.seed)},e.prototype.next=function(){var t=new e(this.seed),r=t.unsafeNext();return[r,t]},e.prototype.unsafeNext=function(){var t=ko(this.seed),r=_o(t),n=ko(t),i=_o(n);this.seed=ko(n);var s=_o(this.seed),a=s+(i+(r<<15)<<15);return a|0},e.prototype.getState=function(){return[this.seed]},e})();function Zl(e){var t=e.length===1;if(!t)throw new Error("The state must have been produced by a congruential32 RandomGenerator");return new Ou(e[0])}o(Zl,"fromState");var Pu=Object.assign(function(e){return new Ou(e)},{fromState:Zl});var Hl=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s},Jl=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},ju=(function(){function e(t,r){this.states=t,this.index=r}return o(e,"MersenneTwister"),e.twist=function(t){for(var r=t.slice(),n=0;n!==e.N-e.M;++n){var i=(r[n]&e.MASK_UPPER)+(r[n+1]&e.MASK_LOWER);r[n]=r[n+e.M]^i>>>1^-(i&1)&e.A}for(var n=e.N-e.M;n!==e.N-1;++n){var s=(r[n]&e.MASK_UPPER)+(r[n+1]&e.MASK_LOWER);r[n]=r[n+e.M-e.N]^s>>>1^-(s&1)&e.A}var a=(r[e.N-1]&e.MASK_UPPER)+(r[0]&e.MASK_LOWER);return r[e.N-1]=r[e.M-1]^a>>>1^-(a&1)&e.A,r},e.seeded=function(t){var r=Array(e.N);r[0]=t;for(var n=1;n!==e.N;++n){var i=r[n-1]^r[n-1]>>>30;r[n]=Math.imul(e.F,i)+n|0}return r},e.from=function(t){return new e(e.twist(e.seeded(t)),0)},e.prototype.clone=function(){return new e(this.states,this.index)},e.prototype.next=function(){var t=new e(this.states,this.index),r=t.unsafeNext();return[r,t]},e.prototype.unsafeNext=function(){var t=this.states[this.index];return t^=this.states[this.index]>>>e.U,t^=t<<e.S&e.B,t^=t<<e.T&e.C,t^=t>>>e.L,++this.index>=e.N&&(this.states=e.twist(this.states),this.index=0),t},e.prototype.getState=function(){return Jl([this.index],Hl(this.states),!1)},e.fromState=function(t){var r=t.length===e.N+1&&t[0]>=0&&t[0]<e.N;if(!r)throw new Error("The state must have been produced by a mersenne RandomGenerator");return new e(t.slice(1),t[0])},e.N=624,e.M=397,e.R=31,e.A=2567483615,e.F=1812433253,e.U=11,e.S=7,e.B=2636928640,e.T=15,e.C=4022730752,e.L=18,e.MASK_LOWER=Math.pow(2,e.R)-1,e.MASK_UPPER=Math.pow(2,e.R),e})();function Kl(e){return ju.fromState(e)}o(Kl,"fromState");var Ru=Object.assign(function(e){return ju.from(e)},{fromState:Kl});var Fu=(function(){function e(t,r,n,i){this.s01=t,this.s00=r,this.s11=n,this.s10=i}return o(e,"XorShift128Plus"),e.prototype.clone=function(){return new e(this.s01,this.s00,this.s11,this.s10)},e.prototype.next=function(){var t=new e(this.s01,this.s00,this.s11,this.s10),r=t.unsafeNext();return[r,t]},e.prototype.unsafeNext=function(){var t=this.s00^this.s00<<23,r=this.s01^(this.s01<<23|this.s00>>>9),n=t^this.s10^(t>>>18|r<<14)^(this.s10>>>5|this.s11<<27),i=r^this.s11^r>>>18^this.s11>>>5,s=this.s00+this.s10|0;return this.s01=this.s11,this.s00=this.s10,this.s11=i,this.s10=n,s},e.prototype.jump=function(){var t=new e(this.s01,this.s00,this.s11,this.s10);return t.unsafeJump(),t},e.prototype.unsafeJump=function(){for(var t=0,r=0,n=0,i=0,s=[1667051007,2321340297,1548169110,304075285],a=0;a!==4;++a)for(var u=1;u;u<<=1)s[a]&u&&(t^=this.s01,r^=this.s00,n^=this.s11,i^=this.s10),this.unsafeNext();this.s01=t,this.s00=r,this.s11=n,this.s10=i},e.prototype.getState=function(){return[this.s01,this.s00,this.s11,this.s10]},e})();function Yl(e){var t=e.length===4;if(!t)throw new Error("The state must have been produced by a xorshift128plus RandomGenerator");return new Fu(e[0],e[1],e[2],e[3])}o(Yl,"fromState");var Uu=Object.assign(function(e){return new Fu(-1,~e,e|0,0)},{fromState:Yl});var Vu=(function(){function e(t,r,n,i){this.s01=t,this.s00=r,this.s11=n,this.s10=i}return o(e,"XoroShiro128Plus"),e.prototype.clone=function(){return new e(this.s01,this.s00,this.s11,this.s10)},e.prototype.next=function(){var t=new e(this.s01,this.s00,this.s11,this.s10),r=t.unsafeNext();return[r,t]},e.prototype.unsafeNext=function(){var t=this.s00+this.s10|0,r=this.s10^this.s00,n=this.s11^this.s01,i=this.s00,s=this.s01;return this.s00=i<<24^s>>>8^r^r<<16,this.s01=s<<24^i>>>8^n^(n<<16|r>>>16),this.s10=n<<5^r>>>27,this.s11=r<<5^n>>>27,t},e.prototype.jump=function(){var t=new e(this.s01,this.s00,this.s11,this.s10);return t.unsafeJump(),t},e.prototype.unsafeJump=function(){for(var t=0,r=0,n=0,i=0,s=[3639956645,3750757012,1261568508,386426335],a=0;a!==4;++a)for(var u=1;u;u<<=1)s[a]&u&&(t^=this.s01,r^=this.s00,n^=this.s11,i^=this.s10),this.unsafeNext();this.s01=t,this.s00=r,this.s11=n,this.s10=i},e.prototype.getState=function(){return[this.s01,this.s00,this.s11,this.s10]},e})();function Ql(e){var t=e.length===4;if(!t)throw new Error("The state must have been produced by a xoroshiro128plus RandomGenerator");return new Vu(e[0],e[1],e[2],e[3])}o(Ql,"fromState");var $u=Object.assign(function(e){return new Vu(-1,~e,e|0,0)},{fromState:Ql});function To(e,t){if(e.sign!==t.sign)return Kn(e,{sign:-t.sign,data:t.data});for(var r=[],n=0,i=e.data,s=t.data,a=i.length-1,u=s.length-1;a>=0||u>=0;--a,--u){var c=a>=0?i[a]:0,f=u>=0?s[u]:0,l=c+f+n;r.push(l>>>0),n=~~(l/4294967296)}return n!==0&&r.push(n),{sign:e.sign,data:r.reverse()}}o(To,"addArrayIntToNew");function Du(e){e.sign=1;for(var t=e.data,r=t.length-1;r>=0;--r)if(t[r]===4294967295)t[r]=0;else return t[r]+=1,e;return t.unshift(1),e}o(Du,"addOneToPositiveArrayInt");function Xl(e,t){for(var r=Math.max(e.length,t.length),n=0;n<r;++n){var i=n+e.length-r,s=n+t.length-r,a=i>=0?e[i]:0,u=s>=0?t[s]:0;if(a<u)return!0;if(a>u)return!1}return!1}o(Xl,"isStrictlySmaller");function Kn(e,t){if(e.sign!==t.sign)return To(e,{sign:-t.sign,data:t.data});var r=e.data,n=t.data;if(Xl(r,n)){var i=Kn(t,e);return i.sign=-i.sign,i}for(var s=[],a=0,u=r.length-1,c=n.length-1;u>=0||c>=0;--u,--c){var f=u>=0?r[u]:0,l=c>=0?n[c]:0,h=f-l-a;s.push(h>>>0),a=h<0?1:0}return{sign:e.sign,data:s.reverse()}}o(Kn,"substractArrayIntToNew");function Co(e){for(var t=e.data,r=0;r!==t.length&&t[r]===0;++r);return r===t.length?(e.sign=1,e.data=[0],e):(t.splice(0,r),e)}o(Co,"trimArrayIntInplace");function Yn(e,t){if(t<0){var r=-t;e.sign=-1,e.data[0]=~~(r/4294967296),e.data[1]=r>>>0}else e.sign=1,e.data[0]=~~(t/4294967296),e.data[1]=t>>>0;return e}o(Yn,"fromNumberToArrayInt64");function Lu(e,t,r){var n=t.data[1],i=t.data[0],s=t.sign,a=r.data[1],u=r.data[0],c=r.sign;if(e.sign=1,s===1&&c===-1){var f=n+a,l=i+u+(f>4294967295?1:0);return e.data[0]=l>>>0,e.data[1]=f>>>0,e}var h=n,y=i,P=a,Z=u;s===-1&&(h=a,y=u,P=n,Z=i);var q=0,be=h-P;return be<0&&(q=1,be=be>>>0),e.data[0]=y-Z-q,e.data[1]=be,e}o(Lu,"substractArrayInt64");function Qn(e,t){for(var r=e>2?~~(4294967296/e)*e:4294967296,n=t.unsafeNext()+2147483648;n>=r;)n=t.unsafeNext()+2147483648;return n%e}o(Qn,"unsafeUniformIntDistributionInternal");function Xn(e,t,r){for(var n=t.length;;){for(var i=0;i!==n;++i){var s=i===0?t[0]+1:4294967296,a=Qn(s,r);e[i]=a}for(var i=0;i!==n;++i){var u=e[i],c=t[i];if(u<c)return e;if(u>c)break}}}o(Xn,"unsafeUniformArrayIntDistributionInternal");function vt(e,t,r){var n=Co(Du(Kn(t,e))),i=n.data.slice(0),s=Xn(i,n.data,r);return Co(To({sign:1,data:s},e))}o(vt,"unsafeUniformArrayIntDistribution");function Bu(e,t,r){if(r!=null){var n=r.clone();return[vt(e,t,n),n]}return function(i){var s=i.clone();return[vt(e,t,s),s]}}o(Bu,"uniformArrayIntDistribution");var Rr=typeof BigInt<"u"?BigInt:void 0;function It(e,t,r){for(var n=t-e+Rr(1),i=Rr(-2147483648),s=Rr(4294967296),a=s,u=1;a<n;)a*=s,++u;for(var c=a-a%n;;){for(var f=Rr(0),l=0;l!==u;++l){var h=r.unsafeNext();f=s*f+(Rr(h)-i)}if(f<c){var y=f%n;return y+e}}}o(It,"unsafeUniformBigIntDistribution");function zu(e,t,r){if(r!=null){var n=r.clone();return[It(e,t,n),n]}return function(i){var s=i.clone();return[It(e,t,s),s]}}o(zu,"uniformBigIntDistribution");var ep=Number.MAX_SAFE_INTEGER,tp={sign:1,data:[0,0]},rp={sign:1,data:[0,0]},Wu={sign:1,data:[0,0]},Eo=[0,0];function np(e,t,r,n){var i=r<=ep?Yn(Wu,r):Lu(Wu,Yn(tp,t),Yn(rp,e));return i.data[1]===4294967295?(i.data[0]+=1,i.data[1]=0):i.data[1]+=1,Xn(Eo,i.data,n),Eo[0]*4294967296+Eo[1]+e}o(np,"uniformLargeIntInternal");function qe(e,t,r){var n=t-e;if(n<=4294967295){var i=Qn(n+1,r);return i+e}return np(e,t,n,r)}o(qe,"unsafeUniformIntDistribution");function Gu(e,t,r){if(r!=null){var n=r.clone();return[qe(e,t,n),n]}return function(i){var s=i.clone();return[qe(e,t,s),s]}}o(Gu,"uniformIntDistribution");var ip="module",op="6.1.0",sp="a413dd2b721516be2ef29adffb515c5ae67bfbad";var Xt=Mo;var G;(function(e){e[e.None=0]="None",e[e.Verbose=1]="Verbose",e[e.VeryVerbose=2]="VeryVerbose"})(G||(G={}));var ap=Date.now,up=Math.min,cp=Math.random,Q=class e{static{o(this,"QualifiedParameters")}constructor(t){let r=t||{};this.seed=e.readSeed(r),this.randomType=e.readRandomType(r),this.numRuns=e.readNumRuns(r),this.verbose=e.readVerbose(r),this.maxSkipsPerRun=e.readOrDefault(r,"maxSkipsPerRun",100),this.timeout=e.safeTimeout(e.readOrDefault(r,"timeout",null)),this.skipAllAfterTimeLimit=e.safeTimeout(e.readOrDefault(r,"skipAllAfterTimeLimit",null)),this.interruptAfterTimeLimit=e.safeTimeout(e.readOrDefault(r,"interruptAfterTimeLimit",null)),this.markInterruptAsFailure=e.readBoolean(r,"markInterruptAsFailure"),this.skipEqualValues=e.readBoolean(r,"skipEqualValues"),this.ignoreEqualValues=e.readBoolean(r,"ignoreEqualValues"),this.logger=e.readOrDefault(r,"logger",n=>{console.log(n)}),this.path=e.readOrDefault(r,"path",""),this.unbiased=e.readBoolean(r,"unbiased"),this.examples=e.readOrDefault(r,"examples",[]),this.endOnFailure=e.readBoolean(r,"endOnFailure"),this.reporter=e.readOrDefault(r,"reporter",null),this.asyncReporter=e.readOrDefault(r,"asyncReporter",null),this.errorWithCause=e.readBoolean(r,"errorWithCause")}toParameters(){let t=o(n=>n!==null?n:void 0,"orUndefined");return{seed:this.seed,randomType:this.randomType,numRuns:this.numRuns,maxSkipsPerRun:this.maxSkipsPerRun,timeout:t(this.timeout),skipAllAfterTimeLimit:t(this.skipAllAfterTimeLimit),interruptAfterTimeLimit:t(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:t(this.reporter),asyncReporter:t(this.asyncReporter),errorWithCause:this.errorWithCause}}static read(t){return new e(t)}};Q.createQualifiedRandomGenerator=e=>t=>{let r=e(t);return r.unsafeJump===void 0&&(r.unsafeJump=()=>jr(r,42)),r};Q.readSeed=e=>{if(e.seed==null)return ap()^cp()*4294967296;let t=e.seed|0;if(e.seed===t)return t;let r=e.seed-t;return t^r*4294967296};Q.readRandomType=e=>{if(e.randomType==null)return Xt.xorshift128plus;if(typeof e.randomType=="string")switch(e.randomType){case"mersenne":return Q.createQualifiedRandomGenerator(Xt.mersenne);case"congruential":case"congruential32":return Q.createQualifiedRandomGenerator(Xt.congruential32);case"xorshift128plus":return Xt.xorshift128plus;case"xoroshiro128plus":return Xt.xoroshiro128plus;default:throw new Error(`Invalid random specified: '${e.randomType}'`)}let 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"unsafeJump"in t?e.randomType:Q.createQualifiedRandomGenerator(e.randomType)};Q.readNumRuns=e=>e.numRuns!=null?e.numRuns:e.num_runs!=null?e.num_runs:100;Q.readVerbose=e=>e.verbose==null?G.None:typeof e.verbose=="boolean"?e.verbose===!0?G.Verbose:G.None:e.verbose<=G.None?G.None:e.verbose>=G.VeryVerbose?G.VeryVerbose:e.verbose|0;Q.readBoolean=(e,t)=>e[t]===!0;Q.readOrDefault=(e,t,r)=>{let n=e[t];return n??r};Q.safeTimeout=e=>e===null?null:up(e,2147483647);function fp(e,t,r){let n=null,i=new Promise(s=>{n=t(()=>{let a=new K(!0);s(a)},e)});return{clear:o(()=>r(n),"clear"),promise:i}}o(fp,"interruptAfter");var Fr=class{static{o(this,"SkipAfterProperty")}constructor(t,r,n,i,s,a){this.property=t,this.getTime=r,this.interruptExecution=i,this.setTimeoutSafe=s,this.clearTimeoutSafe=a,this.skipAfterTime=this.getTime()+n,this.property.runBeforeEach!==void 0&&this.property.runAfterEach!==void 0&&(this.runBeforeEach=()=>this.property.runBeforeEach(),this.runAfterEach=()=>this.property.runAfterEach())}isAsync(){return this.property.isAsync()}generate(t,r){return this.property.generate(t,r)}shrink(t){return this.property.shrink(t)}run(t,r){let n=this.skipAfterTime-this.getTime();if(n<=0){let i=new K(this.interruptExecution);return this.isAsync()?Promise.resolve(i):i}if(this.interruptExecution&&this.isAsync()){let i=fp(n,this.setTimeoutSafe,this.clearTimeoutSafe),s=Promise.race([this.property.run(t,r),i.promise]);return s.then(i.clear,i.clear),s}return this.property.run(t,r)}};var dp=o((e,t,r)=>{let n=null,i=new Promise(s=>{n=t(()=>{s({error:new A(`Property timeout: exceeded limit of ${e} milliseconds`),errorMessage:`Property timeout: exceeded limit of ${e} milliseconds`})},e)});return{clear:o(()=>r(n),"clear"),promise:i}},"timeoutAfter"),ei=class{static{o(this,"TimeoutProperty")}constructor(t,r,n,i){this.property=t,this.timeMs=r,this.setTimeoutSafe=n,this.clearTimeoutSafe=i,this.property.runBeforeEach!==void 0&&this.property.runAfterEach!==void 0&&(this.runBeforeEach=()=>Promise.resolve(this.property.runBeforeEach()),this.runAfterEach=()=>Promise.resolve(this.property.runAfterEach()))}isAsync(){return!0}generate(t,r){return this.property.generate(t,r)}shrink(t){return this.property.shrink(t)}async run(t,r){let n=dp(this.timeMs,this.setTimeoutSafe,this.clearTimeoutSafe),i=Promise.race([this.property.run(t,r),n.promise]);return i.then(n.clear,n.clear),i}};var er=class{static{o(this,"UnbiasedProperty")}constructor(t){this.property=t,this.property.runBeforeEach!==void 0&&this.property.runAfterEach!==void 0&&(this.runBeforeEach=()=>this.property.runBeforeEach(),this.runAfterEach=()=>this.property.runAfterEach())}isAsync(){return this.property.isAsync()}generate(t,r){return this.property.generate(t,void 0)}shrink(t){return this.property.shrink(t)}run(t,r){return this.property.run(t,r)}};var qu=Array.from,Zu=typeof Buffer<"u"?Buffer.isBuffer:void 0,tr=JSON.stringify,Hu=Number.isNaN,lp=Object.keys,pp=Object.getOwnPropertySymbols,hp=Object.getOwnPropertyDescriptor,Ju=Object.getPrototypeOf,Ku=Number.NEGATIVE_INFINITY,mp=Number.POSITIVE_INFINITY,ie=Symbol.for("fast-check/toStringMethod");function rr(e){return e!==null&&(typeof e=="object"||typeof e=="function")&&ie in e&&typeof e[ie]=="function"}o(rr,"hasToStringMethod");var fe=Symbol.for("fast-check/asyncToStringMethod");function nr(e){return e!==null&&(typeof e=="object"||typeof e=="function")&&fe in e&&typeof e[fe]=="function"}o(nr,"hasAsyncToStringMethod");var xp=/^Symbol\((.*)\)$/;function gp(e){if(e.description!==void 0)return e.description;let t=xp.exec(ae(e));return t&&t[1].length?t[1]:null}o(gp,"getSymbolDescription");function Yu(e){switch(e){case 0:return 1/e===Ku?"-0":"0";case Ku:return"Number.NEGATIVE_INFINITY";case mp:return"Number.POSITIVE_INFINITY";default:return e===e?ae(e):"Number.NaN"}}o(Yu,"stringifyNumber");function bp(e){let t=-1;for(let r in e){let n=Number(r);if(n!==t+1)return!0;t=n}return t+1!==e.length}o(bp,"isSparseArray");function we(e,t,r){let n=[...t,e];if(typeof e=="object"&&ue(t,e)!==-1)return"[cyclic]";if(nr(e)){let i=r(e);if(i.state==="fulfilled")return i.value}if(rr(e))try{return e[ie]()}catch{}switch(go(e)){case"[object Array]":{let i=e;if(i.length>=50&&bp(i)){let a=[];for(let u in i)Hu(Number(u))||g(a,`${u}:${we(i[u],n,r)}`);return a.length!==0?`Object.assign(Array(${i.length}),{${N(a,",")}})`:`Array(${i.length})`}let s=N(E(i,a=>we(a,n,r)),",");return i.length===0||i.length-1 in i?`[${s}]`:`[${s},]`}case"[object BigInt]":return`${e}n`;case"[object Boolean]":{let i=e==!0?"true":"false";return typeof e=="boolean"?i:`new Boolean(${i})`}case"[object Date]":{let i=e;return Hu(yt(i))?"new Date(NaN)":`new Date(${tr(wu(i))})`}case"[object Map]":return`new Map(${we(Array.from(e),n,r)})`;case"[object Null]":return"null";case"[object Number]":return typeof e=="number"?Yu(e):`new Number(${Yu(Number(e))})`;case"[object Object]":{try{let u=e.toString;if(typeof u=="function"&&u!==Object.prototype.toString)return e.toString()}catch{return"[object Object]"}let i=o(u=>`${u==="__proto__"?'["__proto__"]':typeof u=="symbol"?`[${we(u,n,r)}]`:tr(u)}:${we(e[u],n,r)}`,"mapper"),s=[...E(lp(e),i),...E(yu(pp(e),u=>{let c=hp(e,u);return c&&c.enumerable}),i)],a="{"+N(s,",")+"}";return Ju(e)===null?a==="{}"?"Object.create(null)":`Object.assign(Object.create(null),${a})`:a}case"[object Set]":return`new Set(${we(Array.from(e),n,r)})`;case"[object String]":return typeof e=="string"?tr(e):`new String(${tr(e)})`;case"[object Symbol]":{let i=e;if(Er.keyFor(i)!==void 0)return`Symbol.for(${tr(Er.keyFor(i))})`;let s=gp(i);if(s===null)return"Symbol()";let a=s.startsWith("Symbol.")&&Er[s.substring(7)];return i===a?s:`Symbol(${tr(s)})`}case"[object Promise]":{let i=r(e);switch(i.state){case"fulfilled":return`Promise.resolve(${we(i.value,n,r)})`;case"rejected":return`Promise.reject(${we(i.value,n,r)})`;case"pending":return"new Promise(() => {/*pending*/})";default:return"new Promise(() => {/*unknown*/})"}}case"[object Error]":if(e instanceof Error)return`new Error(${we(e.message,n,r)})`;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 Zu=="function"&&Zu(e))return`Buffer.from(${we(qu(e.values()),n,r)})`;let i=Ju(e),s=i&&i.constructor&&i.constructor.name;if(typeof s=="string"){let u=e.values();return`${s}.from(${we(qu(u),n,r)})`}break}}try{return e.toString()}catch{return go(e)}}o(we,"stringifyInternal");function $(e){return we(e,[],()=>({state:"unknown",value:void 0}))}o($,"stringify");function No(e){let t=Er(),r=[],n=new je;function i(){let c=null,f=o(()=>{c!==null&&clearTimeout(c)},"cancel");return{delay:new Promise(h=>{c=setTimeout(()=>{c=null,h(t)},0)}),cancel:f}}o(i,"createDelay0");let s={state:"unknown",value:void 0},a=o(function(f){let l=f;if(n.has(l))return n.get(l);let h=i(),y=fe in f?Promise.resolve().then(()=>f[fe]()):f;return y.catch(()=>{}),r.push(Promise.race([y,h.delay]).then(P=>{P===t?n.set(l,{state:"pending",value:void 0}):n.set(l,{state:"fulfilled",value:P}),h.cancel()},P=>{n.set(l,{state:"rejected",value:P}),h.cancel()})),n.set(l,s),s},"getAsyncContent");function u(){let c=we(e,[],a);return r.length===0?c:Promise.all(r.splice(0)).then(u)}return o(u,"loop"),u()}o(No,"possiblyAsyncStringify");async function At(e){return Promise.resolve(No(e))}o(At,"asyncStringify");function Qu(e){return e===null?new K:e}o(Qu,"fromSyncCached");function yp(...e){return e[1]?e[0].then(Qu):Qu(e[0])}o(yp,"fromCached");function wp(e,t){return yp(e,t)}o(wp,"fromCachedUnsafe");var Ur=class{static{o(this,"IgnoreEqualValuesProperty")}constructor(t,r){this.property=t,this.skipRuns=r,this.coveredCases=new Map,this.property.runBeforeEach!==void 0&&this.property.runAfterEach!==void 0&&(this.runBeforeEach=()=>this.property.runBeforeEach(),this.runAfterEach=()=>this.property.runAfterEach())}isAsync(){return this.property.isAsync()}generate(t,r){return this.property.generate(t,r)}shrink(t){return this.property.shrink(t)}run(t,r){let n=$(t);if(this.coveredCases.has(n)){let s=this.coveredCases.get(n);return this.skipRuns?wp(s,this.property.isAsync()):s}let i=this.property.run(t,r);return this.coveredCases.set(n,i),i}};var Xu=Date.now,Oo=setTimeout,Po=clearTimeout;function ec(e,t){let r=e;return e.isAsync()&&t.timeout!=null&&(r=new ei(r,t.timeout,Oo,Po)),t.unbiased&&(r=new er(r)),t.skipAllAfterTimeLimit!=null&&(r=new Fr(r,Xu,t.skipAllAfterTimeLimit,!1,Oo,Po)),t.interruptAfterTimeLimit!=null&&(r=new Fr(r,Xu,t.interruptAfterTimeLimit,!0,Oo,Po)),t.skipEqualValues&&(r=new Ur(r,!0)),t.ignoreEqualValues&&(r=new Ur(r,!1)),r}o(ec,"decorateProperty");var Se;(function(e){e[e.Success=0]="Success",e[e.Skipped=-1]="Skipped",e[e.Failure=1]="Failure"})(Se||(Se={}));var Vr=class e{static{o(this,"RunExecution")}constructor(t,r){this.verbosity=t,this.interruptedAsFailure=r,this.isSuccess=()=>this.pathToFailure==null,this.firstFailure=()=>this.pathToFailure?+W(this.pathToFailure,":")[0]:-1,this.numShrinks=()=>this.pathToFailure?W(this.pathToFailure,":").length-1:0,this.rootExecutionTrees=[],this.currentLevelExecutionTrees=this.rootExecutionTrees,this.failure=null,this.numSkips=0,this.numSuccesses=0,this.interrupted=!1}appendExecutionTree(t,r){let n={status:t,value:r,children:[]};return this.currentLevelExecutionTrees.push(n),n}fail(t,r,n){if(this.verbosity>=G.Verbose){let i=this.appendExecutionTree(Se.Failure,t);this.currentLevelExecutionTrees=i.children}this.pathToFailure==null?this.pathToFailure=`${r}`:this.pathToFailure+=`:${r}`,this.value=t,this.failure=n}skip(t){this.verbosity>=G.VeryVerbose&&this.appendExecutionTree(Se.Skipped,t),this.pathToFailure==null&&++this.numSkips}success(t){this.verbosity>=G.VeryVerbose&&this.appendExecutionTree(Se.Success,t),this.pathToFailure==null&&++this.numSuccesses}interrupt(){this.interrupted=!0}extractFailures(){if(this.isSuccess())return[];let t=[],r=this.rootExecutionTrees;for(;r.length>0&&r[r.length-1].status===Se.Failure;){let n=r[r.length-1];t.push(n.value),r=n.children}return t}toRunDetails(t,r,n,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:e.mergePaths(r,this.pathToFailure),error:this.failure.errorMessage,errorInstance:this.failure.error,failures:this.extractFailures(),executionSummary:this.rootExecutionTrees,verbose:this.verbosity,runConfiguration:i.toParameters()};let s=this.interruptedAsFailure||this.numSuccesses===0;return{failed:this.numSkips>n||this.interrupted&&s,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()}}};Vr.mergePaths=(e,t)=>{if(e.length===0)return t;let r=e.split(":"),n=t.split(":"),i=+r[r.length-1]+ +n[0];return[...r.slice(0,r.length-1),`${i}`,...n.slice(1)].join(":")};var $r=class{static{o(this,"RunnerIterator")}constructor(t,r,n,i){this.sourceValues=t,this.shrink=r,this.runExecution=new Vr(n,i),this.currentIdx=-1,this.nextValues=t}[Symbol.iterator](){return this}next(){let t=this.nextValues.next();return t.done||this.runExecution.interrupted?{done:!0,value:void 0}:(this.currentValue=t.value,++this.currentIdx,{done:!1,value:t.value.value_})}handleResult(t){t!=null&&typeof t=="object"&&!K.isFailure(t)?(this.runExecution.fail(this.currentValue.value_,this.currentIdx,t),this.currentIdx=-1,this.nextValues=this.shrink(this.currentValue)):t!=null?t.interruptExecution?this.runExecution.interrupt():(this.runExecution.skip(this.currentValue.value_),this.sourceValues.skippedOne()):this.runExecution.success(this.currentValue.value_)}};var ti=class{static{o(this,"SourceValuesIterator")}constructor(t,r,n){this.initialValues=t,this.maxInitialIterations=r,this.remainingSkips=n}[Symbol.iterator](){return this}next(){if(--this.maxInitialIterations!==-1&&this.remainingSkips>=0){let t=this.initialValues.next();if(!t.done)return{value:t.value,done:!1}}return{value:void 0,done:!0}}skippedOne(){--this.remainingSkips,++this.maxInitialIterations}};var _e=class e{static{o(this,"Random")}constructor(t){this.internalRng=t.clone()}clone(){return new e(this.internalRng)}next(t){return qe(0,(1<<t)-1,this.internalRng)}nextBoolean(){return qe(0,1,this.internalRng)==1}nextInt(t,r){return qe(t??e.MIN_INT,r??e.MAX_INT,this.internalRng)}nextBigInt(t,r){return It(t,r,this.internalRng)}nextArrayInt(t,r){return vt(t,r,this.internalRng)}nextDouble(){let t=this.next(26),r=this.next(27);return(t*e.DBL_FACTOR+r)*e.DBL_DIVISOR}getState(){if("getState"in this.internalRng&&typeof this.internalRng.getState=="function")return this.internalRng.getState()}};_e.MIN_INT=-2147483648;_e.MAX_INT=2147483647;_e.DBL_FACTOR=Math.pow(2,27);_e.DBL_DIVISOR=Math.pow(2,-53);function Sp(e,t,r){return t.unsafeJump(),e.generate(new _e(t),r)}o(Sp,"tossNext");function*ri(e,t,r,n){for(let i=0;i!==n.length;++i)yield new m(n[i],void 0);for(let i=0,s=r(t);;++i)yield Sp(e,s,i)}o(ri,"toss");function vp(e,t,r){return()=>e.generate(new _e(t),r)}o(vp,"lazyGenerate");function*ni(e,t,r,n){yield*E(n,a=>()=>new m(a,void 0));let i=0,s=r(t);for(;;)s=s.jump?s.jump():Jn(s,42),yield vp(e,s,i++)}o(ni,"lazyToss");function tc(e){return e()}o(tc,"produce");function ii(e,t,r){let n=t,i=e.split(":").map(a=>+a);if(i.length===0)return n.map(tc);if(!i.every(a=>!Number.isNaN(a)))throw new Error(`Unable to replay, got invalid path=${e}`);let s=n.drop(i[0]).map(tc);for(let a of i.slice(1)){let u=s.getNthOrLast(0);if(u===null)throw new Error(`Unable to replay, got wrong path=${e}`);s=r(u).drop(a)}return s}o(ii,"pathWalk");var Ip=Object.assign;function Ap(e){return e.length===1?`Hint: ${e[0]}`:e.map((t,r)=>`Hint (${r+1}): ${t}`).join(`
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
Counterexample: ${t(e.counterexample)}
|
|
15
|
-
Shrunk ${e.numShrinks} time(s)${n}`,s=null,a=[];return e.verbose>=G.VeryVerbose?s=Ro(e.executionSummary,t):e.verbose===G.Verbose?s=kp(e.failures,t):g(a,"Enable verbose mode in order to have the list of all failing values encountered during the run"),{message:i,details:s,hints:a}}o(Tp,"preFormatFailure");function Cp(e,t){let r=`Property interrupted after ${e.numRuns} tests
|
|
16
|
-
{ seed: ${e.seed} }`,n=null,i=[];return e.verbose>=G.VeryVerbose?n=Ro(e.executionSummary,t):g(i,"Enable verbose mode at level VeryVerbose in order to check all generated values and their associated status"),{message:r,details:n,hints:i}}o(Cp,"preFormatEarlyInterrupted");function jo(e,t){if(!e.failed)return;let{message:r,details:n,hints:i}=e.counterexamplePath===null?e.interrupted?Cp(e,t):_p(e,t):Tp(e,t),s=r;return n!=null&&(s+=`
|
|
17
|
-
|
|
18
|
-
${n}`),i.length>0&&(s+=`
|
|
19
|
-
|
|
20
|
-
${Ap(i)}`),s}o(jo,"defaultReportMessageInternal");function oi(e){return jo(e,$)}o(oi,"defaultReportMessage");async function si(e){let t=[];function r(a){let u=No(a);return typeof u=="string"?u:(t.push(Promise.all([a,u])),"\u2026")}o(r,"stringifyOne");let n=jo(e,r);if(t.length===0)return n;let i=new je(await Promise.all(t));function s(a){let u=ce(i,a);return u!==void 0?u:$(a)}return o(s,"stringifySecond"),jo(e,s)}o(si,"asyncDefaultReportMessage");function rc(e,t){if(!t.runConfiguration.errorWithCause)throw new A(e);let r=A,n=new r(e,{cause:t.errorInstance});return"cause"in n||Ip(n,{cause:t.errorInstance}),n}o(rc,"buildError");function Ep(e){if(e.failed)throw rc(oi(e),e)}o(Ep,"throwIfFailed");async function Mp(e){if(e.failed)throw rc(await si(e),e)}o(Mp,"asyncThrowIfFailed");function nc(e){return e.runConfiguration.asyncReporter?e.runConfiguration.asyncReporter(e):e.runConfiguration.reporter?e.runConfiguration.reporter(e):Ep(e)}o(nc,"reportRunDetails");async function ic(e){return e.runConfiguration.asyncReporter?e.runConfiguration.asyncReporter(e):e.runConfiguration.reporter?e.runConfiguration.reporter(e):Mp(e)}o(ic,"asyncReportRunDetails");var oc=Object.assign;function Np(e,t,r,n,i){let s=e.runBeforeEach!==void 0&&e.runAfterEach!==void 0,a=new $r(r,t,n,i);for(let u of a){s&&e.runBeforeEach();let c=e.run(u,s);s&&e.runAfterEach(),a.handleResult(c)}return a.runExecution}o(Np,"runIt");async function Op(e,t,r,n,i){let s=e.runBeforeEach!==void 0&&e.runAfterEach!==void 0,a=new $r(r,t,n,i);for(let u of a){s&&await e.runBeforeEach();let c=await e.run(u,s);s&&await e.runAfterEach(),a.handleResult(c)}return a.runExecution}o(Op,"asyncRunIt");function ir(e,t){if(e==null||e.generate==null)throw new Error("Invalid property encountered, please use a valid property");if(e.run==null)throw new Error("Invalid property encountered, please use a valid property not an arbitrary");let r=Q.read(oc(oc({},Y()),t));if(r.reporter!==null&&r.asyncReporter!==null)throw new Error("Invalid parameters encountered, reporter and asyncReporter cannot be specified together");if(r.asyncReporter!==null&&!e.isAsync())throw new Error("Invalid parameters encountered, only asyncProperty can be used when asyncReporter specified");let n=ec(e,r),i=r.path.length===0||r.path.indexOf(":")===-1?r.numRuns:-1,s=r.numRuns*r.maxSkipsPerRun,a=o((...l)=>n.shrink(...l),"shrink"),u=r.path.length===0?ri(n,r.seed,r.randomType,r.examples):ii(r.path,te(ni(n,r.seed,r.randomType,r.examples)),a),c=new ti(u,i,s),f=r.endOnFailure?S.nil:a;return n.isAsync()?Op(n,f,c,r.verbose,r.markInterruptAsFailure).then(l=>l.toRunDetails(r.seed,r.path,s,r)):Np(n,f,c,r.verbose,r.markInterruptAsFailure).toRunDetails(r.seed,r.path,s,r)}o(ir,"check");function Fo(e,t){let r=ir(e,t);if(e.isAsync())return r.then(ic);nc(r)}o(Fo,"assert");function Pp(e,t){let r=Object.prototype.hasOwnProperty.call(e,"isAsync")?e:new St(e,()=>!0);return t.unbiased===!0?new er(r):r}o(Pp,"toProperty");function sc(e,t){let r=typeof t=="number"?Object.assign(Object.assign({},Y()),{numRuns:t}):Object.assign(Object.assign({},Y()),t),n=Q.read(r),i=Pp(e,n),s=i.shrink.bind(i);return(n.path.length===0?te(ri(i,n.seed,n.randomType,n.examples)):ii(n.path,te(ni(i,n.seed,n.randomType,n.examples)),s)).take(n.numRuns).map(u=>u.value_)}o(sc,"streamSample");function Uo(e,t){return[...sc(e,t)]}o(Uo,"sample");function jp(e){return(Math.round(e*100)/100).toFixed(2)}o(jp,"round2");function Vo(e,t,r){let n=typeof r=="number"?Object.assign(Object.assign({},Y()),{numRuns:r}):Object.assign(Object.assign({},Y()),r),i=Q.read(n),s={};for(let f of sc(e,r)){let l=t(f),h=Array.isArray(l)?l:[l];for(let y of h)s[y]=(s[y]||0)+1}let a=Object.entries(s).sort((f,l)=>l[1]-f[1]).map(f=>[f[0],`${jp(f[1]*100/i.numRuns)}%`]),u=a.map(f=>f[0].length).reduce((f,l)=>Math.max(f,l),0),c=a.map(f=>f[1].length).reduce((f,l)=>Math.max(f,l),0);for(let f of a)i.logger(`${f[0].padEnd(u,".")}..${f[1].padStart(c,".")}`)}o(Vo,"statistics");var Rp=Object.assign;function ai(e,t,r,n){let i=r(),s=e.clone(),a={mrng:e.clone(),biasFactor:t,history:[]},u=o(h=>{let y=i[a.history.length];if(y!==void 0&&y.arb===h){let Z=y.value;return g(a.history,{arb:h,value:Z,context:y.context,mrng:y.mrng}),s=y.mrng.clone(),Z}let P=h.generate(s,t);return g(a.history,{arb:h,value:P.value_,context:P.context,mrng:s.clone()}),P.value},"valueFunction"),c=o((h,...y)=>u(n(h,y)),"memoedValueFunction"),f={values(){return E(a.history,h=>h.value)},[F](){return ai(e,t,r,n).value},[ie](){return $(E(a.history,h=>h.value))}},l=Rp(c,f);return new m(l,a)}o(ai,"buildGeneratorValue");var $o=Array.isArray,ac=Object.keys,Fp=Object.is;function uc(e){let t=new je;return o(function(n,i){let s=ce(t,n);if(s===void 0){let c=n(...i);return ke(t,n,[{args:i,value:c}]),c}let a=s;for(let c of a)if(e(i,c.args))return c.value;let u=n(...i);return g(a,{args:i,value:u}),u},"stableArbitraryGeneratorCache")}o(uc,"buildStableArbitraryGeneratorCache");function Do(e,t){if(e!==null&&typeof e=="object"&&t!==null&&typeof t=="object"){if($o(e)){if(!$o(t)||e.length!==t.length)return!1}else if($o(t))return!1;if(ac(e).length!==ac(t).length)return!1;for(let r in e)if(!(r in t)||!Do(e[r],t[r]))return!1;return!0}else return Fp(e,t)}o(Do,"naiveIsEqual");var ui=class extends C{static{o(this,"GeneratorArbitrary")}constructor(){super(...arguments),this.arbitraryCache=uc(Do)}generate(t,r){return ai(t,r,()=>[],this.arbitraryCache)}canShrinkWithoutContext(t){return!1}shrink(t,r){if(r===void 0)return S.nil();let n=r,i=n.mrng,s=n.biasFactor,a=n.history;return yo(a.map(u=>u.arb),a.map(u=>u.value),a.map(u=>u.context)).map(u=>{function c(){let f=u.value,l=u.context;return E(a,(h,y)=>({arb:h.arb,value:f[y],context:l[y],mrng:h.mrng}))}return o(c,"computePreBuiltValues"),ai(i,s,c,this.arbitraryCache)})}};function Lo(){return new ui}o(Lo,"gen");var Up=Math.floor,cc=Math.log;function fc(e){return Up(cc(e)/cc(2))}o(fc,"integerLogLike");function dc(e){return e===w(0)?w(0):w(ae(e).length)}o(dc,"bigIntLogLike");function ci(e,t,r){if(e===t)return[{min:e,max:t}];if(e<0&&t>0){let a=r(-e),u=r(t);return[{min:-a,max:u},{min:t-u,max:t},{min:e,max:e+a}]}let n=r(t-e),i={min:e,max:e+n},s={min:t-n,max:t};return e<0?[s,i]:[i,s]}o(ci,"biasNumericRange");var Vp=Math.ceil,$p=Math.floor;function lc(e){return $p(e/2)}o(lc,"halvePosInteger");function pc(e){return Vp(e/2)}o(pc,"halveNegInteger");function Bo(e,t,r){let n=e-t;function*i(){let a=r?void 0:t,u=r?n:lc(n);for(let c=u;c>0;c=lc(c)){let f=c===n?t:e-c;yield new m(f,a),a=f}}o(i,"shrinkDecr");function*s(){let a=r?void 0:t,u=r?n:pc(n);for(let c=u;c<0;c=pc(c)){let f=c===n?t:e-c;yield new m(f,a),a=f}}return o(s,"shrinkIncr"),n>0?te(i()):te(s())}o(Bo,"shrinkInteger");var hc=Math.sign,Dp=Number.isInteger,Lp=Object.is,ve=class e extends C{static{o(this,"IntegerArbitrary")}constructor(t,r){super(),this.min=t,this.max=r}generate(t,r){let n=this.computeGenerateRange(t,r);return new m(t.nextInt(n.min,n.max),void 0)}canShrinkWithoutContext(t){return typeof t=="number"&&Dp(t)&&!Lp(t,-0)&&this.min<=t&&t<=this.max}shrink(t,r){if(!e.isValidContext(t,r)){let n=this.defaultTarget();return Bo(t,n,!0)}return this.isLastChanceTry(t,r)?S.of(new m(r,void 0)):Bo(t,r,!1)}defaultTarget(){return this.min<=0&&this.max>=0?0:this.min<0?this.max:this.min}computeGenerateRange(t,r){if(r===void 0||t.nextInt(1,r)!==1)return{min:this.min,max:this.max};let n=ci(this.min,this.max,fc);if(n.length===1)return n[0];let i=t.nextInt(-2*(n.length-1),n.length-2);return i<0?n[0]:n[i+1]}isLastChanceTry(t,r){return t>0?t===r+1&&t>this.min:t<0?t===r-1&&t<this.max:!1}static isValidContext(t,r){if(r===void 0)return!1;if(typeof r!="number")throw new Error("Invalid context type passed to IntegerArbitrary (#1)");if(r!==0&&hc(t)!==hc(r))throw new Error("Invalid context value passed to IntegerArbitrary (#2)");return!0}};var mc=Number.isInteger;function Bp(e){let t=e.min!==void 0?e.min:-2147483648,r=e.max!==void 0?e.max:2147483647;return{min:t,max:r}}o(Bp,"buildCompleteIntegerConstraints");function M(e={}){let t=Bp(e);if(t.min>t.max)throw new Error("fc.integer maximum value should be equal or greater than the minimum one");if(!mc(t.min))throw new Error("fc.integer minimum value should be an integer");if(!mc(t.max))throw new Error("fc.integer maximum value should be an integer");return new ve(t.min,t.max)}o(M,"integer");var xc=new Map;function kt(e){if(e===void 0)return{depth:0};if(typeof e!="string")return e;let t=ce(xc,e);if(t!==void 0)return t;let r={depth:0};return ke(xc,e,r),r}o(kt,"getDepthContextFor");function Dr(){return{depth:0}}o(Dr,"createDepthIdentifier");var fi=class{static{o(this,"NoopSlicedGenerator")}constructor(t,r,n){this.arb=t,this.mrng=r,this.biasFactor=n}attemptExact(){}next(){return this.arb.generate(this.mrng,this.biasFactor)}};var zp=Math.min,Wp=Math.max,di=class{static{o(this,"SlicedBasedGenerator")}constructor(t,r,n,i){this.arb=t,this.mrng=r,this.slices=n,this.biasFactor=i,this.activeSliceIndex=0,this.nextIndexInSlice=0,this.lastIndexInSlice=-1}attemptExact(t){if(t!==0&&this.mrng.nextInt(1,this.biasFactor)===1){let r=[];for(let n=0;n!==this.slices.length;++n)this.slices[n].length===t&&g(r,n);if(r.length===0)return;this.activeSliceIndex=r[this.mrng.nextInt(0,r.length-1)],this.nextIndexInSlice=0,this.lastIndexInSlice=t-1}}next(){if(this.nextIndexInSlice<=this.lastIndexInSlice)return new m(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);let t=this.slices[this.activeSliceIndex];if(this.mrng.nextInt(1,this.biasFactor)!==1)return this.nextIndexInSlice=1,this.lastIndexInSlice=t.length-1,new m(t[0],void 0);let r=this.mrng.nextInt(0,t.length-1),n=this.mrng.nextInt(0,t.length-1);return this.nextIndexInSlice=zp(r,n),this.lastIndexInSlice=Wp(r,n),new m(t[this.nextIndexInSlice++],void 0)}};function zo(e,t,r,n){return n===void 0||r.length===0||t.nextInt(1,n)!==1?new fi(e,t,n):new di(e,t,r,n)}o(zo,"buildSlicedGenerator");var Gp=Math.floor,gc=Math.log,bc=Math.max,qp=Array.isArray;function Wo(e,t){return e===t?e:e+Gp(gc(t-e)/gc(2))}o(Wo,"biasedMaxLength");var or=class e extends C{static{o(this,"ArrayArbitrary")}constructor(t,r,n,i,s,a,u){super(),this.arb=t,this.minLength=r,this.maxGeneratedLength=n,this.maxLength=i,this.setBuilder=a,this.customSlices=u,this.lengthArb=M({min:r,max:n}),this.depthContext=kt(s)}preFilter(t){if(this.setBuilder===void 0)return t;let r=this.setBuilder();for(let n=0;n!==t.length;++n)r.tryAdd(t[n]);return r.getData()}static makeItCloneable(t,r){return t[F]=()=>{let n=[];for(let i=0;i!==r.length;++i)g(n,r[i].value);return this.makeItCloneable(n,r),n},t}generateNItemsNoDuplicates(t,r,n,i){let s=0,a=t(),u=zo(this.arb,n,this.customSlices,i);for(;a.size()<r&&s<this.maxGeneratedLength;){let c=u.next();a.tryAdd(c)?s=0:s+=1}return a.getData()}safeGenerateNItemsNoDuplicates(t,r,n,i){let s=bc(0,r-Wo(this.minLength,this.maxGeneratedLength));this.depthContext.depth+=s;try{return this.generateNItemsNoDuplicates(t,r,n,i)}finally{this.depthContext.depth-=s}}generateNItems(t,r,n){let i=[],s=zo(this.arb,r,this.customSlices,n);s.attemptExact(t);for(let a=0;a!==t;++a){let u=s.next();g(i,u)}return i}safeGenerateNItems(t,r,n){let i=bc(0,t-Wo(this.minLength,this.maxGeneratedLength));this.depthContext.depth+=i;try{return this.generateNItems(t,r,n)}finally{this.depthContext.depth-=i}}wrapper(t,r,n,i){let s=r?this.preFilter(t):t,a=!1,u=[],c=[];for(let l=0;l!==s.length;++l){let h=s[l];a=a||h.hasToBeCloned,g(u,h.value),g(c,h.context)}a&&e.makeItCloneable(u,s);let f={shrunkOnce:r,lengthContext:t.length===s.length&&n!==void 0?n:void 0,itemsContexts:c,startIndex:i};return new m(u,f)}generate(t,r){let n=this.applyBias(t,r),i=n.size,s=this.setBuilder!==void 0?this.safeGenerateNItemsNoDuplicates(this.setBuilder,i,t,n.biasFactorItems):this.safeGenerateNItems(i,t,n.biasFactorItems);return this.wrapper(s,!1,void 0,0)}applyBias(t,r){if(r===void 0)return{size:this.lengthArb.generate(t,void 0).value};if(this.minLength===this.maxGeneratedLength)return{size:this.lengthArb.generate(t,void 0).value,biasFactorItems:r};if(t.nextInt(1,r)!==1)return{size:this.lengthArb.generate(t,void 0).value};if(t.nextInt(1,r)!==1||this.minLength===this.maxGeneratedLength)return{size:this.lengthArb.generate(t,void 0).value,biasFactorItems:r};let n=Wo(this.minLength,this.maxGeneratedLength);return{size:M({min:this.minLength,max:n}).generate(t,void 0).value,biasFactorItems:r}}canShrinkWithoutContext(t){if(!qp(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(E(t,n=>new m(n,void 0))).length===t.length}shrinkItemByItem(t,r,n){let i=[];for(let s=r.startIndex;s<n;++s)g(i,ye(()=>this.arb.shrink(t[s],r.itemsContexts[s]).map(a=>{let u=E(z(t,0,s),(f,l)=>new m(Pe(f),r.itemsContexts[l])),c=E(z(t,s+1),(f,l)=>new m(Pe(f),r.itemsContexts[l+s+1]));return[[...u,a,...c],void 0,s]})));return S.nil().join(...i)}shrinkImpl(t,r){if(t.length===0)return S.nil();let n=r!==void 0?r:{shrunkOnce:!1,lengthContext:void 0,itemsContexts:[],startIndex:0};return this.lengthArb.shrink(t.length,n.lengthContext).drop(n.shrunkOnce&&n.lengthContext===void 0&&t.length>this.minLength+1?1:0).map(i=>{let s=t.length-i.value;return[E(z(t,s),(a,u)=>new m(Pe(a),n.itemsContexts[u+s])),i.context,0]}).join(ye(()=>t.length>this.minLength?this.shrinkItemByItem(t,n,1):this.shrinkItemByItem(t,n,t.length))).join(t.length>this.minLength?ye(()=>{let i={shrunkOnce:!1,lengthContext:void 0,itemsContexts:z(n.itemsContexts,1),startIndex:0};return this.shrinkImpl(z(t,1),i).filter(s=>this.minLength<=s[0].length+1).map(s=>[[new m(Pe(t[0]),n.itemsContexts[0]),...s[0]],void 0,0])}):S.nil())}shrink(t,r){return this.shrinkImpl(t,r).map(n=>this.wrapper(n[0],!0,n[1],n[2]))}};var Zp=Math.floor,Hp=Math.min,de=2147483647,sr=["xsmall","small","medium","large","xlarge"],Jp=["-4","-3","-2","-1","=","+1","+2","+3","+4"],Go="small";function Kp(e,t){switch(t){case"xsmall":return Zp(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}`)}}o(Kp,"maxLengthFromMinLength");function _t(e,t){let r=ue(Jp,e);if(r===-1)return e;let n=ue(sr,t);if(n===-1)throw new Error(`Unable to offset size based on the unknown defaulted one: ${t}`);let i=n+r-4;return i<0?sr[0]:i>=sr.length?sr[sr.length-1]:sr[i]}o(_t,"relativeSizeToSize");function Ze(e,t,r,n){let{baseSize:i=Go,defaultSizeToMaxWhenMaxSpecified:s}=Y()||{},a=e!==void 0?e:n&&s?"max":i;if(a==="max")return r;let u=_t(a,i);return Hp(Kp(t,u),r)}o(Ze,"maxGeneratedLengthFromSizeForArbitrary");function yc(e,t){if(typeof e=="number")return 1/e;let{baseSize:r=Go,defaultSizeToMaxWhenMaxSpecified:n}=Y()||{},i=e!==void 0?e:t&&n?"max":r;if(i==="max")return 0;switch(_t(i,r)){case"xsmall":return 1;case"small":return .5;case"medium":return .25;case"large":return .125;case"xlarge":return .0625}}o(yc,"depthBiasFromSizeForArbitrary");function ar(e){let{baseSize:t=Go}=Y()||{};return e===void 0?t:_t(e,t)}o(ar,"resolveSize");function k(e,t={}){let r=t.size,n=t.minLength||0,i=t.maxLength,s=t.depthIdentifier,a=i!==void 0?i:de,c=Ze(r,n,a,i!==void 0),f=t.experimentalCustomSlices||[];return new or(e,n,c,a,s,void 0,f)}o(k,"array");function li(e){return e/w(2)}o(li,"halveBigInt");function qo(e,t,r){let n=e-t;function*i(){let a=r?void 0:t,u=r?n:li(n);for(let c=u;c>0;c=li(c)){let f=e-c;yield new m(f,a),a=f}}o(i,"shrinkDecr");function*s(){let a=r?void 0:t,u=r?n:li(n);for(let c=u;c<0;c=li(c)){let f=e-c;yield new m(f,a),a=f}}return o(s,"shrinkIncr"),n>0?te(i()):te(s())}o(qo,"shrinkBigInt");var Fe=class e extends C{static{o(this,"BigIntArbitrary")}constructor(t,r){super(),this.min=t,this.max=r}generate(t,r){let n=this.computeGenerateRange(t,r);return new m(t.nextBigInt(n.min,n.max),void 0)}computeGenerateRange(t,r){if(r===void 0||t.nextInt(1,r)!==1)return{min:this.min,max:this.max};let n=ci(this.min,this.max,dc);if(n.length===1)return n[0];let i=t.nextInt(-2*(n.length-1),n.length-2);return i<0?n[0]:n[i+1]}canShrinkWithoutContext(t){return typeof t=="bigint"&&this.min<=t&&t<=this.max}shrink(t,r){if(!e.isValidContext(t,r)){let n=this.defaultTarget();return qo(t,n,!0)}return this.isLastChanceTry(t,r)?S.of(new m(r,void 0)):qo(t,r,!1)}defaultTarget(){return this.min<=0&&this.max>=0?w(0):this.min<0?this.max:this.min}isLastChanceTry(t,r){return t>0?t===r+w(1)&&t>this.min:t<0?t===r-w(1)&&t<this.max:!1}static isValidContext(t,r){if(r===void 0)return!1;if(typeof r!="bigint")throw new Error("Invalid context type passed to BigIntArbitrary (#1)");let n=t>0&&r<0||t<0&&r>0;if(r!==w(0)&&n)throw new Error("Invalid context value passed to BigIntArbitrary (#2)");return!0}};function Yp(e){let r=w(-1)<<w(255),n=(w(1)<<w(255))-w(1),i=e.min,s=e.max;return{min:i!==void 0?i:r-(s!==void 0&&s<w(0)?s*s:w(0)),max:s!==void 0?s:n+(i!==void 0&&i>w(0)?i*i:w(0))}}o(Yp,"buildCompleteBigIntConstraints");function Qp(e){return e[0]===void 0?{}:e[1]===void 0?e[0]:{min:e[0],max:e[1]}}o(Qp,"extractBigIntConstraints");function He(...e){let t=Yp(Qp(e));if(t.min>t.max)throw new Error("fc.bigInt expects max to be greater than or equal to min");return new Fe(t.min,t.max)}o(He,"bigInt");function Zo(e){if(e<1)throw new Error("fc.bigIntN expects requested number of bits to be superior or equal to 1");let t=w(-1)<<w(e-1),r=(w(1)<<w(e-1))-w(1);return new Fe(t,r)}o(Zo,"bigIntN");function Xp(){return(w(1)<<w(256))-w(1)}o(Xp,"computeDefaultMax");function Ho(e){let t=typeof e=="object"?e.max:e,r=t!==void 0?t:Xp();if(r<0)throw new Error("fc.bigUint expects max to be greater than or equal to zero");return new Fe(w(0),r)}o(Ho,"bigUint");function ur(e){if(e<0)throw new Error("fc.bigUintN expects requested number of bits to be superior or equal to 0");let t=w(0),r=(w(1)<<w(e))-w(1);return new Fe(t,r)}o(ur,"bigUintN");function Lr(e){return e.noBias()}o(Lr,"noBias");function e0(e){return e===1}o(e0,"booleanMapper");function t0(e){if(typeof e!="boolean")throw new Error("Unsupported input type");return e===!0?1:0}o(t0,"booleanUnmapper");function Me(){return Lr(M({min:0,max:1}).map(e0,t0))}o(Me,"boolean");var Br=Object.is,cr=class extends C{static{o(this,"ConstantArbitrary")}constructor(t){super(),this.values=t}generate(t,r){let n=this.values.length===1?0:t.nextInt(0,this.values.length-1),i=this.values[n];return se(i)?new m(i,n,()=>i[F]()):new m(i,n)}canShrinkWithoutContext(t){return this.values.length===1?Br(this.values[0],t):(this.fastValues===void 0&&(this.fastValues=new Jo(this.values)),this.fastValues.has(t))}shrink(t,r){return r===0||Br(t,this.values[0])?S.nil():S.of(new m(this.values[0],0))}},Jo=class{static{o(this,"FastConstantValuesLookup")}constructor(t){this.values=t,this.fastValues=new nt(this.values);let r=!1,n=!1;if(xo(this.fastValues,0))for(let i=0;i!==this.values.length;++i){let s=this.values[i];r=r||Br(s,-0),n=n||Br(s,0)}this.hasMinusZero=r,this.hasPlusZero=n}has(t){return t===0?Br(t,0)?this.hasPlusZero:this.hasMinusZero:xo(this.fastValues,t)}};function re(...e){if(e.length===0)throw new Error("fc.constantFrom expects at least one parameter");return new cr(e)}o(re,"constantFrom");function Ko(e){return!e||!e.withBigInt?re(!1,null,void 0,0,"",NaN):re(!1,null,void 0,0,"",NaN,w(0))}o(Ko,"falsy");var wc=String.fromCodePoint;function Sc(e){if(typeof e!="string")throw new Error("Cannot unmap non-string");if(e.length===0||e.length>2)throw new Error("Cannot unmap string with more or less than one character");let t=Re(e,0);if(e.length===1)return t;let r=Re(e,1);if(t<55296||t>56319||r<56320||r>57343)throw new Error("Cannot unmap invalid surrogate pairs");return e.codePointAt(0)}o(Sc,"indexToCharStringUnmapper");function le(e,t,r,n){return M({min:e,max:t}).map(i=>wc(r(i)),i=>n(Sc(i)))}o(le,"buildCharacterArbitrary");function st(e){return e<95?e+32:e<=126?e-95:e}o(st,"indexToPrintableIndexMapper");function at(e){return e>=32&&e<=126?e-32:e>=0&&e<=31?e+95:e}o(at,"indexToPrintableIndexUnmapper");function zr(){return le(0,127,st,at)}o(zr,"ascii");function r0(e){return e<26?e+65:e<52?e+97-26:e<62?e+48-52:e===62?43:47}o(r0,"base64Mapper");function n0(e){return e>=65&&e<=90?e-65:e>=97&&e<=122?e-97+26:e>=48&&e<=57?e-48+52:e===43?62:e===47?63:-1}o(n0,"base64Unmapper");function Wr(){return le(0,63,r0,n0)}o(Wr,"base64");function vc(e){return e}o(vc,"identity");function Gr(){return le(32,126,vc,vc)}o(Gr,"char");function qr(){return le(0,65535,st,at)}o(qr,"char16bits");var Yo=2048;function i0(e){return e<55296?st(e):e+Yo}o(i0,"unicodeMapper");function o0(e){return e<55296?at(e):e<=57343?-1:e-Yo}o(o0,"unicodeUnmapper");function Tt(){return le(0,1114111-Yo,i0,o0)}o(Tt,"fullUnicode");function s0(e){return e<10?e+48:e+97-10}o(s0,"hexaMapper");function a0(e){return e<58?e-48:e>=97&&e<103?e-97+10:-1}o(a0,"hexaUnmapper");function Zr(){return le(0,15,s0,a0)}o(Zr,"hexa");var Qo=2048;function u0(e){return e<55296?st(e):e+Qo}o(u0,"unicodeMapper");function c0(e){return e<55296?at(e):e<=57343?-1:e-Qo}o(c0,"unicodeUnmapper");function Hr(){return le(0,65535-Qo,u0,c0)}o(Hr,"unicode");function L(e){return new cr([e])}o(L,"constant");var Xo=class e{static{o(this,"ContextImplem")}constructor(){this.receivedLogs=[]}log(t){this.receivedLogs.push(t)}size(){return this.receivedLogs.length}toString(){return JSON.stringify({logs:this.receivedLogs})}[F](){return new e}};function es(){return L(new Xo)}o(es,"context");var f0=Number.NaN,d0=Number.isNaN;function ts(e){return new Tr(e)}o(ts,"timeToDateMapper");function rs(e){if(!(e instanceof Tr)||e.constructor!==Tr)throw new A("Not a valid value for date unmapper");return yt(e)}o(rs,"timeToDateUnmapper");function Ic(e){return t=>t===e?new Tr(f0):ts(t)}o(Ic,"timeToDateMapperWithNaN");function Ac(e){return t=>{let r=rs(t);return d0(r)?e:r}}o(Ac,"timeToDateUnmapperWithNaN");var kc=Number.isNaN;function Jr(e={}){let t=e.min!==void 0?yt(e.min):-864e13,r=e.max!==void 0?yt(e.max):864e13,n=e.noInvalidDate===void 0||e.noInvalidDate;if(kc(t))throw new Error("fc.date min must be valid instance of Date");if(kc(r))throw new Error("fc.date max must be valid instance of Date");if(t>r)throw new Error("fc.date max must be greater or equal to min");if(n)return M({min:t,max:r}).map(ts,rs);let i=r+1;return M({min:t,max:r+1}).map(Ic(i),Ac(i))}o(Jr,"date");var l0=Symbol.iterator,p0=Array.isArray,h0=Object.is,pi=class e extends C{static{o(this,"CloneArbitrary")}constructor(t,r){super(),this.arb=t,this.numValues=r}generate(t,r){let n=[];if(this.numValues<=0)return this.wrapper(n);for(let i=0;i!==this.numValues-1;++i)g(n,this.arb.generate(t.clone(),r));return g(n,this.arb.generate(t,r)),this.wrapper(n)}canShrinkWithoutContext(t){if(!p0(t)||t.length!==this.numValues)return!1;if(t.length===0)return!0;for(let r=1;r<t.length;++r)if(!h0(t[0],t[r]))return!1;return this.arb.canShrinkWithoutContext(t[0])}shrink(t,r){return t.length===0?S.nil():new S(this.shrinkImpl(t,r!==void 0?r:[])).map(n=>this.wrapper(n))}*shrinkImpl(t,r){let n=E(t,(s,a)=>this.arb.shrink(s,r[a])[l0]()),i=E(n,s=>s.next());for(;!i[0].done;)yield E(i,s=>s.value),i=E(n,s=>s.next())}static makeItCloneable(t,r){return t[F]=()=>{let n=[];for(let i=0;i!==r.length;++i)g(n,r[i].value);return this.makeItCloneable(n,r),n},t}wrapper(t){let r=!1,n=[],i=[];for(let s=0;s!==t.length;++s){let a=t[s];r=r||a.hasToBeCloned,g(n,a.value),g(i,a.context)}return r&&e.makeItCloneable(n,t),new m(n,i)}};function ns(e,t){return new pi(e,t)}o(ns,"clone");var Kr=class{static{o(this,"CustomEqualSet")}constructor(t){this.isEqual=t,this.data=[]}tryAdd(t){for(let r=0;r!==this.data.length;++r)if(this.isEqual(this.data[r],t))return!1;return g(this.data,t),!0}size(){return this.data.length}getData(){return this.data}};var m0=Number.isNaN,hi=class{static{o(this,"StrictlyEqualSet")}constructor(t){this.selector=t,this.selectedItemsExceptNaN=new nt,this.data=[]}tryAdd(t){let r=this.selector(t);if(m0(r))return g(this.data,t),!0;let n=this.selectedItemsExceptNaN.size;return Yt(this.selectedItemsExceptNaN,r),n!==this.selectedItemsExceptNaN.size?(g(this.data,t),!0):!1}size(){return this.data.length}getData(){return this.data}};var x0=Object.is,mi=class{static{o(this,"SameValueSet")}constructor(t){this.selector=t,this.selectedItemsExceptMinusZero=new nt,this.data=[],this.hasMinusZero=!1}tryAdd(t){let r=this.selector(t);if(x0(r,-0))return this.hasMinusZero?!1:(g(this.data,t),this.hasMinusZero=!0,!0);let n=this.selectedItemsExceptMinusZero.size;return Yt(this.selectedItemsExceptMinusZero,r),n!==this.selectedItemsExceptMinusZero.size?(g(this.data,t),!0):!1}size(){return this.data.length}getData(){return this.data}};var xi=class{static{o(this,"SameValueZeroSet")}constructor(t){this.selector=t,this.selectedItems=new nt,this.data=[]}tryAdd(t){let r=this.selector(t),n=this.selectedItems.size;return Yt(this.selectedItems,r),n!==this.selectedItems.size?(g(this.data,t),!0):!1}size(){return this.data.length}getData(){return this.data}};function g0(e){if(typeof e.comparator=="function"){if(e.selector===void 0){let u=e.comparator,c=o((f,l)=>u(f.value_,l.value_),"isEqualForBuilder");return()=>new Kr(c)}let n=e.comparator,i=e.selector,s=o(u=>i(u.value_),"refinedSelector"),a=o((u,c)=>n(s(u),s(c)),"isEqualForBuilder");return()=>new Kr(a)}let t=e.selector||(n=>n),r=o(n=>t(n.value_),"refinedSelector");switch(e.comparator){case"IsStrictlyEqual":return()=>new hi(r);case"SameValueZero":return()=>new xi(r);case"SameValue":case void 0:return()=>new mi(r)}}o(g0,"buildUniqueArraySetBuilder");function Ue(e,t={}){let r=t.minLength!==void 0?t.minLength:0,n=t.maxLength!==void 0?t.maxLength:de,i=Ze(t.size,r,n,t.maxLength!==void 0),s=t.depthIdentifier,a=g0(t),u=new or(e,r,i,n,s,a,[]);return r===0?u:u.filter(c=>c.length>=r)}o(Ue,"uniqueArray");var b0=Object.create,y0=Object.defineProperty,w0=Object.getOwnPropertyDescriptor,S0=Object.getPrototypeOf,v0=Object.getOwnPropertySymbols,I0=Object.getOwnPropertyNames,A0=Object.entries;function _c(e){let t=e[1]?b0(null):{};for(let r of e[0])y0(t,r[0],{enumerable:!0,configurable:!0,writable:!0,value:r[1]});return t}o(_c,"keyValuePairsToObjectMapper");function k0(e){return o(function(r){let n=w0(e,r);return n!==void 0&&!!n.configurable&&!!n.enumerable&&!!n.writable&&n.get===void 0&&n.set===void 0},"isValidPropertyNameFilter")}o(k0,"buildIsValidPropertyNameFilter");function Tc(e){if(typeof e!="object"||e===null)throw new A("Incompatible instance received: should be a non-null object");let t=S0(e)===null,r="constructor"in e&&e.constructor===Object;if(!t&&!r)throw new A("Incompatible instance received: should be of exact type Object");if(v0(e).length>0)throw new A("Incompatible instance received: should contain symbols");if(!qn(I0(e),k0(e)))throw new A("Incompatible instance received: should contain only c/e/w properties without get/set");return[A0(e),t]}o(Tc,"keyValuePairsToObjectUnmapper");function _0(e){return e[0]}o(_0,"dictionaryKeyExtractor");function Ct(e,t,r={}){let n=r.noNullPrototype!==!1;return v(Ue(v(e,t),{minLength:r.minKeys,maxLength:r.maxKeys,size:r.size,selector:_0,depthIdentifier:r.depthIdentifier}),n?L(!1):Me()).map(_c,Tc)}o(Ct,"dictionary");var T0=Number.POSITIVE_INFINITY,C0=Number.MAX_SAFE_INTEGER,E0=Number.isInteger,M0=Math.floor,N0=Math.pow,O0=Math.min,Et=class e extends C{static{o(this,"FrequencyArbitrary")}static from(t,r,n){if(t.length===0)throw new Error(`${n} expects at least one weighted arbitrary`);let i=0;for(let a=0;a!==t.length;++a){if(t[a].arbitrary===void 0)throw new Error(`${n} expects arbitraries to be specified`);let c=t[a].weight;if(i+=c,!E0(c))throw new Error(`${n} expects weights to be integer values`);if(c<0)throw new Error(`${n} expects weights to be superior or equal to 0`)}if(i<=0)throw new Error(`${n} expects the sum of weights to be strictly superior to 0`);let s={depthBias:yc(r.depthSize,r.maxDepth!==void 0),maxDepth:r.maxDepth!=null?r.maxDepth:T0,withCrossShrink:!!r.withCrossShrink};return new e(t,s,kt(r.depthIdentifier))}constructor(t,r,n){super(),this.warbs=t,this.constraints=r,this.context=n;let i=0;this.cumulatedWeights=[];for(let s=0;s!==t.length;++s)i+=t[s].weight,g(this.cumulatedWeights,i);this.totalWeight=i}generate(t,r){if(this.mustGenerateFirst())return this.safeGenerateForIndex(t,0,r);let n=t.nextInt(this.computeNegDepthBenefit(),this.totalWeight-1);for(let i=0;i!==this.cumulatedWeights.length;++i)if(n<this.cumulatedWeights[i])return this.safeGenerateForIndex(t,i,r);throw new Error("Unable to generate from fc.frequency")}canShrinkWithoutContext(t){return this.canShrinkWithoutContextIndex(t)!==-1}shrink(t,r){if(r!==void 0){let i=r,s=i.selectedIndex,a=i.originalBias,c=this.warbs[s].arbitrary.shrink(t,i.originalContext).map(f=>this.mapIntoValue(s,f,null,a));if(i.clonedMrngForFallbackFirst!==null){i.cachedGeneratedForFirst===void 0&&(i.cachedGeneratedForFirst=this.safeGenerateForIndex(i.clonedMrngForFallbackFirst,0,a));let f=i.cachedGeneratedForFirst;return S.of(f).join(c)}return c}let n=this.canShrinkWithoutContextIndex(t);return n===-1?S.nil():this.defaultShrinkForFirst(n).join(this.warbs[n].arbitrary.shrink(t,void 0).map(i=>this.mapIntoValue(n,i,null,void 0)))}defaultShrinkForFirst(t){++this.context.depth;try{if(!this.mustFallbackToFirstInShrink(t)||this.warbs[0].fallbackValue===void 0)return S.nil()}finally{--this.context.depth}let r=new m(this.warbs[0].fallbackValue.default,void 0);return S.of(this.mapIntoValue(0,r,null,void 0))}canShrinkWithoutContextIndex(t){if(this.mustGenerateFirst())return this.warbs[0].arbitrary.canShrinkWithoutContext(t)?0:-1;try{++this.context.depth;for(let r=0;r!==this.warbs.length;++r){let n=this.warbs[r];if(n.weight!==0&&n.arbitrary.canShrinkWithoutContext(t))return r}return-1}finally{--this.context.depth}}mapIntoValue(t,r,n,i){let s={selectedIndex:t,originalBias:i,originalContext:r.context,clonedMrngForFallbackFirst:n};return new m(r.value,s)}safeGenerateForIndex(t,r,n){++this.context.depth;try{let i=this.warbs[r].arbitrary.generate(t,n),s=this.mustFallbackToFirstInShrink(r)?t.clone():null;return this.mapIntoValue(r,i,s,n)}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(){let t=this.constraints.depthBias;if(t<=0||this.warbs[0].weight===0)return 0;let r=M0(N0(1+t,this.context.depth))-1;return-O0(this.totalWeight*r,C0)||0}};function P0(e){return e!=null&&typeof e=="object"&&!("generate"in e)&&!("arbitrary"in e)&&!("weight"in e)}o(P0,"isOneOfContraints");function Cc(e){return co(e)?{arbitrary:e,weight:1}:e}o(Cc,"toWeightedArbitrary");function B(...e){let t=e[0];if(P0(t)){let n=E(z(e,1),Cc);return Et.from(n,t,"fc.oneof")}let r=E(e,Cc);return Et.from(r,{},"fc.oneof")}o(B,"oneof");var j0=Number.isInteger;function pe(e){let 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(!j0(t))throw new Error("fc.nat maximum value should be an integer");return new ve(0,t)}o(pe,"nat");var R0=Object.is;function F0(e){let t=0,r=[];for(let n of e){let i=t;t=i+n.num;let s=t-1;r.push({from:i,to:s,entry:n})}return r}o(F0,"buildDichotomyEntries");function U0(e,t){let r=0,n=e.length;for(;n-r>1;){let i=~~((r+n)/2);t<e[i].from?n=i:r=i}return e[r]}o(U0,"findDichotomyEntry");function Ec(e){let t=F0(e);return o(function(n){let i=U0(t,n);return i.entry.build(n-i.from)},"indexToMappedConstantMapper")}o(Ec,"indexToMappedConstantMapperFor");function V0(e){let t={mapping:new je,negativeZeroIndex:void 0},r=0;for(let n=0;n!==e.length;++n){let i=e[n];for(let s=0;s!==i.num;++s){let a=i.build(s);a===0&&1/a===Cr.NEGATIVE_INFINITY?t.negativeZeroIndex=r:ke(t.mapping,a,r),++r}}return t}o(V0,"buildReverseMapping");function Mc(e){let t=null;return o(function(n){t===null&&(t=V0(e));let i=R0(n,-0)?t.negativeZeroIndex:ce(t.mapping,n);if(i===void 0)throw new A("Unknown value encountered cannot be built using this mapToConstant");return i},"indexToMappedConstantUnmapper")}o(Mc,"indexToMappedConstantUnmapperFor");function $0(e){if(e.length===0)throw new A("fc.mapToConstant expects at least one option");let t=0;for(let r=0;r!==e.length;++r){if(e[r].num<0)throw new A("fc.mapToConstant expects all options to have a number of entries greater or equal to zero");t+=e[r].num}if(t===0)throw new A("fc.mapToConstant expects at least one choice among options");return t}o($0,"computeNumChoices");function Je(...e){let t=$0(e);return pe({max:t-1}).map(Ec(e),Mc(e))}o(Je,"mapToConstant");var Nc=Map,os=String.fromCharCode,ss={num:26,build:o(e=>os(e+97),"build")},D0={num:26,build:o(e=>os(e+65),"build")},Oc={num:10,build:o(e=>os(e+48),"build")};function L0(e){let t=bu(e);return e!==t?t:`%${it(Re(e,0),16)}`}o(L0,"percentCharArbMapper");function B0(e){if(typeof e!="string")throw new Error("Unsupported");return decodeURIComponent(e)}o(B0,"percentCharArbUnmapper");var z0=Tt().map(L0,B0),is;function Pc(){return is===void 0&&(is=Je(ss)),is}o(Pc,"getOrCreateLowerAlphaArbitrary");var gi;function Yr(e){gi===void 0&&(gi=new Nc);let t=ce(gi,e);return t===void 0&&(t=Je(ss,Oc,{num:e.length,build:o(r=>e[r],"build")}),ke(gi,e,t)),t}o(Yr,"getOrCreateLowerAlphaNumericArbitrary");function W0(e){return Je(ss,D0,Oc,{num:e.length,build:o(t=>e[t],"build")})}o(W0,"buildAlphaNumericArbitrary");var bi;function fr(e){bi===void 0&&(bi=new Nc);let t=ce(bi,e);return t===void 0&&(t=B({weight:10,arbitrary:W0(e)},{weight:1,arbitrary:z0}),ke(bi,e,t)),t}o(fr,"getOrCreateAlphaNumericPercentArbitrary");function Ie(e,t={}){let r=t.freq==null?5:t.freq,n=wt(t,"nil")?t.nil:null,s=[{arbitrary:L(n),weight:1,fallbackValue:{default:n}},{arbitrary:e,weight:r}],a={withCrossShrink:!0,depthSize:t.depthSize,maxDepth:t.maxDepth,depthIdentifier:t.depthIdentifier};return Et.from(s,a,"fc.option")}o(Ie,"option");function yi(e,t,r,n){if(t.length===0)return r>0?void 0:[];if(n<=0)return;let i=[{endIndexChunks:0,nextStartIndex:1,chunks:[]}];for(;i.length>0;){let s=zn(i);for(let a=s.nextStartIndex;a<=t.length;++a){let u=V(t,s.endIndexChunks,a);if(e.canShrinkWithoutContext(u)){let c=[...s.chunks,u];if(a===t.length){if(c.length<r)break;return c}g(i,{endIndexChunks:s.endIndexChunks,nextStartIndex:a+1,chunks:s.chunks}),c.length<n&&g(i,{endIndexChunks:a,nextStartIndex:a+1,chunks:c});break}}}}o(yi,"tokenizeString");function wi(e){return N(e,"")}o(wi,"patternsToStringMapper");function jc(e){return e.minLength!==void 0?e.minLength:0}o(jc,"minLengthFrom");function Rc(e){return e.maxLength!==void 0?e.maxLength:de}o(Rc,"maxLengthFrom");function Fc(e,t){return jc(t)<=e.length&&e.length<=Rc(t)}o(Fc,"patternsToStringUnmapperIsValidLength");function Si(e,t){return o(function(n){if(typeof n!="string")throw new A("Unsupported value");let i=yi(e,n,jc(t),Rc(t));if(i===void 0)throw new A("Unable to unmap received string");return i},"patternsToStringUnmapper")}o(Si,"patternsToStringUnmapperFor");var Vc=["__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__","__proto__","constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf","apply","arguments","bind","call","caller","length","name","prototype","key","ref"];function G0(e,t,r){let n;try{n=r(e)}catch{return}for(let i of n)if(!t.canShrinkWithoutContext(i))return;return n}o(G0,"computeCandidateStringLegacy");function he(e,t){let r=[];for(let n of Vc){let i=G0(n,e,t);i!==void 0&&g(r,i)}return r}o(he,"createSlicesForStringLegacy");var Uc=new WeakMap;function q0(e){let t=[];for(let r of Vc){let n=yi(e,r,0,de);n!==void 0&&g(t,n)}return t}o(q0,"createSlicesForStringNoConstraints");function $c(e,t){let r=vu(Uc,e);r===void 0&&(r=q0(e),Su(Uc,e,r));let n=[];for(let i of r)Fc(i,t)&&g(n,i);return n}o($c,"createSlicesForString");var Dc=[[0,127]],Lc=[[0,55295],[57344,1114111]],Bc=[[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]],zc=[[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]];var Wc=String.fromCodePoint,Z0=Math.min,H0=Math.max;function as(e){if(e.length===1){let r=Wc(e[0]);return{num:1,build:o(()=>r,"build")}}let t=e[0];return{num:e[1]-e[0]+1,build:o(r=>Wc(t+r),"build")}}o(as,"convertGraphemeRangeToMapToConstantEntry");function us(e,t){let r=[],n=0,i=0;for(;n<e.length&&i<t.length;){let s=e[n],a=s[0],u=s.length===1?s[0]:s[1],c=t[i],f=c[0],l=c.length===1?c[0]:c[1];if(u<f)n+=1;else if(l<a)i+=1;else{let h=H0(a,f),y=Z0(u,l);if(r.length>=1){let P=r[r.length-1];(P.length===1?P[0]:P[1])+1===h&&(h=P[0],zn(r))}g(r,h===y?[h]:[h,y]),u<=y&&(n+=1),l<=y&&(i+=1)}}return r}o(us,"intersectGraphemeRanges");var Gc=Object.create(null);function J0(e){switch(e){case"full":return Lc;case"ascii":return Dc}}o(J0,"getAlphabetRanges");function K0(e,t){let r=`${e}:${t}`,n=Gc[r];if(n!==void 0)return n;let i=J0(t),s=e==="binary"?i:us(i,Bc),a=[];for(let c of s)g(a,as(c));if(e==="grapheme"){let c=us(i,zc);for(let f of c){let l=as(f);g(a,{num:l.num,build:o(h=>_u(l.build(h),"NFD"),"build")})}}let u=Je(...a);return Gc[r]=u,u}o(K0,"getOrCreateStringUnitInstance");function dr(e,t){return K0(e,t)}o(dr,"stringUnit");var qc=Object.assign;function Y0(e){if(typeof e.unit=="object")return e.unit;switch(e.unit){case"grapheme":return dr("grapheme","full");case"grapheme-composite":return dr("composite","full");case"grapheme-ascii":case void 0:return dr("grapheme","ascii");case"binary":return dr("binary","full");case"binary-ascii":return dr("binary","ascii")}}o(Y0,"extractUnitArbitrary");function J(e={}){let t=Y0(e),r=Si(t,e),n=$c(t,e),i=qc(qc({},e),{experimentalCustomSlices:n});return k(t,i).map(wi,r)}o(J,"string");function Zc(e){return e.length>63?!1:e.length<4||e[0]!=="x"||e[1]!=="n"||e[2]!=="-"||e[3]!=="-"}o(Zc,"filterInvalidSubdomainLabel");var Hc=Symbol("adapted-value");function Q0(e,t){let r=t(e.value_);return r.adapted?new m(r.value,Hc):e}o(Q0,"toAdapterValue");var cs=class extends C{static{o(this,"AdapterArbitrary")}constructor(t,r){super(),this.sourceArb=t,this.adapter=r,this.adaptValue=n=>Q0(n,r)}generate(t,r){let n=this.sourceArb.generate(t,r);return this.adaptValue(n)}canShrinkWithoutContext(t){return this.sourceArb.canShrinkWithoutContext(t)&&!this.adapter(t).adapted}shrink(t,r){return r===Hc?this.sourceArb.canShrinkWithoutContext(t)?this.sourceArb.shrink(t,void 0).map(this.adaptValue):S.nil():this.sourceArb.shrink(t,r).map(this.adaptValue)}};function vi(e,t){return new cs(e,t)}o(vi,"adapter");function X0([e,t]){return t===null?e:`${e}${t[0]}${t[1]}`}o(X0,"toSubdomainLabelMapper");function eh(e){if(typeof e!="string"||e.length===0)throw new Error("Unsupported");return e.length===1?[e[0],null]:[e[0],[V(e,1,e.length-1),e[e.length-1]]]}o(eh,"toSubdomainLabelUnmapper");function th(e){let t=Yr(""),r=Yr("-");return v(t,Ie(v(J({unit:r,size:e,maxLength:61}),t))).map(X0,eh).filter(Zc)}o(th,"subdomainLabel");function rh(e){return`${N(e[0],".")}.${e[1]}`}o(rh,"labelsMapper");function nh(e){if(typeof e!="string")throw new Error("Unsupported type");let t=e.lastIndexOf(".");return[W(V(e,0,t),"."),V(e,t+1)]}o(nh,"labelsUnmapper");function ih(e){let[t,r]=e,n=r.length;for(let i=0;i!==t.length;++i)if(n+=1+t[i].length,n>255)return{adapted:!0,value:[z(t,0,i),r]};return{adapted:!1,value:e}}o(ih,"labelsAdapter");function Mt(e={}){let t=ar(e.size),r=_t("-1",t),n=Pc(),i=J({unit:n,minLength:2,maxLength:63,size:r});return vi(v(k(th(t),{size:r,minLength:1,maxLength:127}),i),ih).map(rh,nh)}o(Mt,"domain");function oh(e){let t=e[0].length;for(let r=1;r!==e.length;++r)if(t+=1+e[r].length,t>64)return{adapted:!0,value:z(e,0,r)};return{adapted:!1,value:e}}o(oh,"dotAdapter");function sh(e){return N(e,".")}o(sh,"dotMapper");function ah(e){if(typeof e!="string")throw new Error("Unsupported");return W(e,".")}o(ah,"dotUnmapper");function uh(e){return`${e[0]}@${e[1]}`}o(uh,"atMapper");function ch(e){if(typeof e!="string")throw new Error("Unsupported");return W(e,"@",2)}o(ch,"atUnmapper");function fs(e={}){let t=Yr("!#$%&'*+-/=?^_`{|}~"),r=vi(k(J({unit:t,minLength:1,maxLength:64,size:e.size}),{minLength:1,maxLength:32,size:e.size}),oh).map(sh,ah);return v(r,Mt({size:e.size})).map(uh,ch)}o(fs,"emailAddress");var ds={sign:1,data:[0,0]},ut={sign:1,data:[0,1]};function Ke(e){return e.data[0]===0&&e.data[1]===0}o(Ke,"isZero64");function Xr(e){return e.sign===-1&&!Ke(e)}o(Xr,"isStrictlyNegative64");function lr(e){return e.sign===1&&!Ke(e)}o(lr,"isStrictlyPositive64");function Ve(e,t){return e.data[0]===t.data[0]&&e.data[1]===t.data[1]?e.sign===t.sign||e.data[0]===0&&e.data[1]===0:!1}o(Ve,"isEqual64");function Jc(e,t){return e[0]<t[0]||e[0]===t[0]&&e[1]<t[1]}o(Jc,"isStrictlySmaller64Internal");function ct(e,t){return e.sign===t.sign?e.sign===1?Jc(e.data,t.data):Jc(t.data,e.data):e.sign===-1&&(!Ke(e)||!Ke(t))}o(ct,"isStrictlySmaller64");function Qr(e){return{sign:e.sign,data:[e.data[0],e.data[1]]}}o(Qr,"clone64");function Kc(e,t){let r=0,n=e[1]-t[1];return n<0&&(r=1,n=n>>>0),[e[0]-t[0]-r,n]}o(Kc,"substract64DataInternal");function Yc(e,t){if(e.sign===1&&t.sign===-1){let r=e.data[1]+t.data[1];return{sign:1,data:[e.data[0]+t.data[0]+(r>4294967295?1:0)>>>0,r>>>0]}}return{sign:1,data:e.sign===1?Kc(e.data,t.data):Kc(t.data,e.data)}}o(Yc,"substract64Internal");function me(e,t){if(ct(e,t)){let r=Yc(t,e);return r.sign=-1,r}return Yc(e,t)}o(me,"substract64");function fh(e){return{sign:-e.sign,data:[e.data[0],e.data[1]]}}o(fh,"negative64");function pr(e,t){return Ke(t)?Ke(e)?Qr(ds):Qr(e):me(e,fh(t))}o(pr,"add64");function ls(e){return{sign:e.sign,data:[Math.floor(e.data[0]/2),(e.data[0]%2===1?2147483648:0)+Math.floor(e.data[1]/2)]}}o(ls,"halve64");function Ii(e){return{sign:e.sign,data:[0,Math.floor(Math.log(e.data[0]*4294967296+e.data[1])/Math.log(2))]}}o(Ii,"logLike64");var ps=class e extends C{static{o(this,"ArrayInt64Arbitrary")}constructor(t,r){super(),this.min=t,this.max=r,this.biasedRanges=null}generate(t,r){let n=this.computeGenerateRange(t,r),i=t.nextArrayInt(n.min,n.max);return i.data.length===1&&i.data.unshift(0),new m(i,void 0)}computeGenerateRange(t,r){if(r===void 0||t.nextInt(1,r)!==1)return{min:this.min,max:this.max};let n=this.retrieveBiasedRanges();if(n.length===1)return n[0];let i=t.nextInt(-2*(n.length-1),n.length-2);return i<0?n[0]:n[i+1]}canShrinkWithoutContext(t){let r=t;return typeof t=="object"&&t!==null&&(r.sign===-1||r.sign===1)&&Array.isArray(r.data)&&r.data.length===2&&(ct(this.min,r)&&ct(r,this.max)||Ve(this.min,r)||Ve(this.max,r))}shrinkArrayInt64(t,r,n){let i=me(t,r);function*s(){let a=n?void 0:r,u=n?i:ls(i);for(let c=u;!Ke(c);c=ls(c)){let f=me(t,c);yield new m(f,a),a=f}}return o(s,"shrinkGen"),te(s())}shrink(t,r){if(!e.isValidContext(t,r)){let n=this.defaultTarget();return this.shrinkArrayInt64(t,n,!0)}return this.isLastChanceTry(t,r)?S.of(new m(r,void 0)):this.shrinkArrayInt64(t,r,!1)}defaultTarget(){return!lr(this.min)&&!Xr(this.max)?ds:Xr(this.min)?this.max:this.min}isLastChanceTry(t,r){return Ke(t)?!1:t.sign===1?Ve(t,pr(r,ut))&&lr(me(t,this.min)):Ve(t,me(r,ut))&&Xr(me(t,this.max))}static isValidContext(t,r){if(r===void 0)return!1;if(typeof r!="object"||r===null||!("sign"in r)||!("data"in r))throw new Error("Invalid context type passed to ArrayInt64Arbitrary (#1)");return!0}retrieveBiasedRanges(){if(this.biasedRanges!=null)return this.biasedRanges;if(Ve(this.min,this.max))return this.biasedRanges=[{min:this.min,max:this.max}],this.biasedRanges;let t=Xr(this.min),r=lr(this.max);if(t&&r){let n=Ii(this.min),i=Ii(this.max);this.biasedRanges=[{min:n,max:i},{min:me(this.max,i),max:this.max},{min:this.min,max:me(this.min,n)}]}else{let n=Ii(me(this.max,this.min)),i={min:this.min,max:pr(this.min,n)},s={min:me(this.max,n),max:this.max};this.biasedRanges=t?[s,i]:[i,s]}return this.biasedRanges}};function hs(e,t){return new ps(e,t)}o(hs,"arrayInt64");var dh=Number.NEGATIVE_INFINITY,ms=Number.POSITIVE_INFINITY,lh=Number.EPSILON,tf={sign:1,data:[2146435072,0]},ph={sign:-1,data:[2146435072,1]},xs=new Float64Array(1),Qc=new Uint32Array(xs.buffer,xs.byteOffset);function hh(e){return xs[0]=e,[Qc[1],Qc[0]]}o(hh,"bitCastDoubleToUInt64");function mh(e){let{0:t,1:r}=hh(e),n=t>>>31,i=t>>>20&2047,s=(t&1048575)*4294967296+r,a=i===0?-1022:i-1023,u=i===0?0:1;return u+=s/2**52,u*=n===0?1:-1,{exponent:a,significand:u}}o(mh,"decomposeDouble");function Xc(e){return[~~(e/4294967296),e>>>0]}o(Xc,"positiveNumberToInt64");function ef(e,t){if(e===-1022){let s=t*4503599627370496;return Xc(s)}let r=(t-1)*2**52,n=(e+1023)*2**20,i=Xc(r);return i[0]+=n,i}o(ef,"indexInDoubleFromDecomp");function Ai(e){if(e===ms)return Qr(tf);if(e===dh)return Qr(ph);let t=mh(e),r=t.exponent,n=t.significand;if(e>0||e===0&&1/e===ms)return{sign:1,data:ef(r,n)};{let i=ef(r,-n);return i[1]===4294967295?(i[0]+=1,i[1]=0):i[1]+=1,{sign:-1,data:i}}}o(Ai,"doubleToIndex");function ki(e){if(e.sign===-1){let i={sign:1,data:[e.data[0],e.data[1]]};return i.data[1]===0?(i.data[0]-=1,i.data[1]=4294967295):i.data[1]-=1,-ki(i)}if(Ve(e,tf))return ms;if(e.data[0]<2097152)return(e.data[0]*4294967296+e.data[1])*2**-1074;let t=e.data[0]-2097152,r=-1021+(t>>20);return(1+((t&1048575)*2**32+e.data[1])*lh)*2**r}o(ki,"indexToDouble");var rf=Number.isInteger,nf=Object.is,gs=Number.NEGATIVE_INFINITY,bs=Number.POSITIVE_INFINITY;function _i(e,t,r,n){let{noDefaultInfinity:i=!1,minExcluded:s=!1,maxExcluded:a=!1,min:u=i?-t:gs,max:c=i?t:bs}=e,f=s?u<-r?-n:Math.max(u,-r):u===gs?Math.max(u,-n):Math.max(u,-r),l=a?c>r?n:Math.min(c,r):c===bs?Math.min(c,n):Math.min(c,r);return{noDefaultInfinity:!1,minExcluded:s||(u!==gs||s)&&rf(f),maxExcluded:a||(c!==bs||a)&&rf(l),min:nf(f,-0)?0:f,max:nf(l,0)?-0:l,noNaN:e.noNaN||!1}}o(_i,"refineConstraintsForFloatingOnly");var of=Number.NEGATIVE_INFINITY,sf=Number.POSITIVE_INFINITY,xh=Number.MAX_VALUE,gh=45035996273704955e-1,en=4503599627370496;function af(e){return _i(e,xh,gh,en)}o(af,"refineConstraintsForDoubleOnly");function uf(e){return e===en?sf:e===-en?of:e}o(uf,"doubleOnlyMapper");function cf(e){if(typeof e!="number")throw new Error("Unsupported type");return e===sf?en:e===of?-en:e}o(cf,"doubleOnlyUnmapper");var bh=Number.isInteger,pf=Number.isNaN,yh=Number.NEGATIVE_INFINITY,wh=Number.POSITIVE_INFINITY,ff=Number.MAX_VALUE,Sh=Number.NaN;function df(e,t){if(pf(e))throw new Error("fc.double constraints."+t+" must be a 64-bit float");return Ai(e)}o(df,"safeDoubleToIndex");function vh(e){if(typeof e!="number")throw new Error("Unsupported type");return Ai(e)}o(vh,"unmapperDoubleToIndex");function Ih(e){return!bh(e)}o(Ih,"numberIsNotInteger");function lf(e){let{noDefaultInfinity:t=!1,noNaN:r=!1,minExcluded:n=!1,maxExcluded:i=!1,min:s=t?-ff:yh,max:a=t?ff:wh}=e,u=df(s,"min"),c=n?pr(u,ut):u,f=df(a,"max"),l=i?me(f,ut):f;if(ct(l,c))throw new Error("fc.double constraints.min must be smaller or equal to constraints.max");if(r)return hs(c,l).map(ki,vh);let h=lr(l),y=h?c:me(c,ut),P=h?pr(l,ut):l;return hs(y,P).map(Z=>ct(l,Z)||ct(Z,c)?Sh:ki(Z),Z=>{if(typeof Z!="number")throw new Error("Unsupported type");return pf(Z)?Ve(l,P)?y:P:Ai(Z)})}o(lf,"anyDouble");function Ye(e={}){return e.noInteger?lf(af(e)).map(uf,cf).filter(Ih):lf(e)}o(Ye,"double");var Ah=Number.NEGATIVE_INFINITY,ys=Number.POSITIVE_INFINITY,hk=2**-126*2**-23,tn=2**127*(1+(2**23-1)/2**23),mk=2**-23,mf=2139095040,kh=-2139095041,ws=new Float32Array(1),_h=new Uint32Array(ws.buffer,ws.byteOffset);function Th(e){return ws[0]=e,_h[0]}o(Th,"bitCastFloatToUInt32");function Ch(e){let t=Th(e),r=t>>>31,n=t>>>23&255,i=t&8388607,s=n===0?-126:n-127,a=n===0?0:1;return a+=i/2**23,a*=r===0?1:-1,{exponent:s,significand:a}}o(Ch,"decomposeFloat");function hf(e,t){return e===-126?t*8388608:(e+127)*8388608+(t-1)*8388608}o(hf,"indexInFloatFromDecomp");function Ti(e){if(e===ys)return mf;if(e===Ah)return kh;let t=Ch(e),r=t.exponent,n=t.significand;return e>0||e===0&&1/e===ys?hf(r,n):-hf(r,-n)-1}o(Ti,"floatToIndex");function Ci(e){if(e<0)return-Ci(-e-1);if(e===mf)return ys;if(e<16777216)return e*2**-149;let t=e-16777216,r=-125+(t>>23);return(1+(t&8388607)/8388608)*2**r}o(Ci,"indexToFloat");var xf=Number.NEGATIVE_INFINITY,gf=Number.POSITIVE_INFINITY,Eh=tn,Mh=83886075e-1,rn=8388608;function bf(e){return _i(e,Eh,Mh,rn)}o(bf,"refineConstraintsForFloatOnly");function yf(e){return e===rn?gf:e===-rn?xf:e}o(yf,"floatOnlyMapper");function wf(e){if(typeof e!="number")throw new Error("Unsupported type");return e===gf?rn:e===xf?-rn:e}o(wf,"floatOnlyUnmapper");var Nh=Number.isInteger,If=Number.isNaN,Oh=Math.fround,Ph=Number.NEGATIVE_INFINITY,jh=Number.POSITIVE_INFINITY,Rh=Number.NaN;function Sf(e,t){let 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(If(e)||Oh(e)!==e)throw new Error(n);return Ti(e)}o(Sf,"safeFloatToIndex");function Fh(e){if(typeof e!="number")throw new Error("Unsupported type");return Ti(e)}o(Fh,"unmapperFloatToIndex");function Uh(e){return!Nh(e)}o(Uh,"numberIsNotInteger");function vf(e){let{noDefaultInfinity:t=!1,noNaN:r=!1,minExcluded:n=!1,maxExcluded:i=!1,min:s=t?-tn:Ph,max:a=t?tn:jh}=e,u=Sf(s,"min"),c=n?u+1:u,f=Sf(a,"max"),l=i?f-1:f;if(c>l)throw new Error("fc.float constraints.min must be smaller or equal to constraints.max");if(r)return M({min:c,max:l}).map(Ci,Fh);let h=l>0?c:c-1,y=l>0?l+1:l;return M({min:h,max:y}).map(P=>P>l||P<c?Rh:Ci(P),P=>{if(typeof P!="number")throw new Error("Unsupported type");return If(P)?l!==y?y:h:Ti(P)})}o(vf,"anyFloat");function nn(e={}){return e.noInteger?vf(bf(e)).map(yf,wf).filter(Uh):vf(e)}o(nn,"float");function Af(e){return e.replace(/([$`\\])/g,"\\$1").replace(/\r/g,"\\r")}o(Af,"escapeForTemplateString");function Ei(e){return e.replace(/\*\//g,"*\\/")}o(Ei,"escapeForMultilineComments");var Ae=[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 ft(e){let t=4294967295;for(let r=0;r<e.length;++r){let n=Re(e,r);if(n<128)t=Ae[t&255^n]^t>>8;else if(n<2048)t=Ae[t&255^(192|n>>6&31)]^t>>8,t=Ae[t&255^(128|n&63)]^t>>8;else if(n>=55296&&n<57344){let i=Re(e,++r);if(n>=56320||i<56320||i>57343||Number.isNaN(i))r-=1,t=Ae[t&255^239]^t>>8,t=Ae[t&255^191]^t>>8,t=Ae[t&255^189]^t>>8;else{let s=(n&1023)+64,a=i&1023;t=Ae[t&255^(240|s>>8&7)]^t>>8,t=Ae[t&255^(128|s>>2&63)]^t>>8,t=Ae[t&255^(128|a>>6&15|(s&3)<<4)]^t>>8,t=Ae[t&255^(128|a&63)]^t>>8}}else t=Ae[t&255^(224|n>>12&15)]^t>>8,t=Ae[t&255^(128|n>>6&63)]^t>>8,t=Ae[t&255^(128|n&63)]^t>>8}return(t|0)+2147483648}o(ft,"hash");function dt(e){return e.noShrink()}o(dt,"noShrink");var Vh=Object.assign,$h=Object.keys;function Mi(e){return v(dt(M()),dt(M({min:1,max:4294967295}))).map(([t,r])=>{let n=o(()=>{let i={};return Vh(o((a,u)=>{let c=$(a),f=$(u),l=ft(`${t}${c}`)%r,h=ft(`${t}${f}`)%r,y=e(l,h);return i[`[${c},${f}]`]=y,y},"f"),{toString:o(()=>{let a=$h(i).sort().map(u=>`${u} => ${$(i[u])}`).map(u=>`/* ${Ei(u)} */`);return`function(a, b) {
|
|
21
|
-
// With hash and stringify coming from fast-check${a.length!==0?`
|
|
22
|
-
${N(a,`
|
|
23
|
-
`)}`:""}
|
|
24
|
-
const cmp = ${e};
|
|
25
|
-
const hA = hash('${t}' + stringify(a)) % ${r};
|
|
26
|
-
const hB = hash('${t}' + stringify(b)) % ${r};
|
|
27
|
-
return cmp(hA, hB);
|
|
28
|
-
}`},"toString"),[F]:n})},"producer");return n()})}o(Mi,"buildCompareFunctionArbitrary");var Dh=Object.assign;function Ss(){return Mi(Dh((e,t)=>e<t,{toString(){return"(hA, hB) => hA < hB"}}))}o(Ss,"compareBooleanFunc");var Lh=Object.assign;function vs(){return Mi(Lh((e,t)=>e-t,{toString(){return"(hA, hB) => hA - hB"}}))}o(vs,"compareFunc");var Bh=Object.defineProperties,zh=Object.keys;function Is(e){return v(k(e,{minLength:1}),dt(M())).map(([t,r])=>{let n=o(()=>{let i={},s=o((...u)=>{let c=$(u),f=t[ft(`${r}${c}`)%t.length];return i[c]=f,se(f)?f[F]():f},"f");function a(u){let c=E(E(Gn(zh(i)),f=>`${f} => ${$(i[f])}`),f=>`/* ${Ei(f)} */`);return`function(...args) {
|
|
29
|
-
// With hash and stringify coming from fast-check${c.length!==0?`
|
|
30
|
-
${c.join(`
|
|
31
|
-
`)}`:""}
|
|
32
|
-
const outs = ${u};
|
|
33
|
-
return outs[hash('${r}' + stringify(args)) % outs.length];
|
|
34
|
-
}`}return o(a,"prettyPrint"),Bh(s,{toString:{value:o(()=>a($(t)),"value")},[ie]:{value:o(()=>a($(t)),"value")},[fe]:{value:o(async()=>a(await At(t)),"value")},[F]:{value:n,configurable:!0}})},"producer");return n()})}o(Is,"func");var Wh=Number.MIN_SAFE_INTEGER,Gh=Number.MAX_SAFE_INTEGER;function on(){return new ve(Wh,Gh)}o(on,"maxSafeInteger");var qh=Number.MAX_SAFE_INTEGER;function As(){return new ve(0,qh)}o(As,"maxSafeNat");var Zh=Number.parseInt;function kf(e){let[t,r]=e;switch(t){case"oct":return`0${it(r,8)}`;case"hex":return`0x${it(r,16)}`;default:return`${r}`}}o(kf,"natToStringifiedNatMapper");function sn(e,t){let r=Zh(e,t);if(it(r,t)!==e)throw new Error("Invalid value");return r}o(sn,"tryParseStringifiedNat");function _f(e){if(typeof e!="string")throw new Error("Invalid type");return e.length>=2&&e[0]==="0"?e[1]==="x"?["hex",sn(V(e,2),16)]:["oct",sn(V(e,1),8)]:["dec",sn(e,10)]}o(_f,"natToStringifiedNatUnmapper");function Hh(e){return N(e,".")}o(Hh,"dotJoinerMapper");function Jh(e){if(typeof e!="string")throw new Error("Invalid type");return E(W(e,"."),t=>sn(t,10))}o(Jh,"dotJoinerUnmapper");function Nt(){return v(pe(255),pe(255),pe(255),pe(255)).map(Hh,Jh)}o(Nt,"ipV4");function Ne(e){return v(re("dec","oct","hex"),pe(e)).map(kf,_f)}o(Ne,"buildStringifiedNatArbitrary");function ks(e){return N(e,".")}o(ks,"dotJoinerMapper");function _s(e){if(typeof e!="string")throw new Error("Invalid type");return W(e,".")}o(_s,"dotJoinerUnmapper");function an(){return B(v(Ne(255),Ne(255),Ne(255),Ne(255)).map(ks,_s),v(Ne(255),Ne(255),Ne(65535)).map(ks,_s),v(Ne(255),Ne(16777215)).map(ks,_s),Ne(4294967295))}o(an,"ipV4Extended");function $e(e){return N(e,"")}o($e,"codePointsToStringMapper");function oe(e){if(typeof e!="string")throw new Error("Cannot unmap the passed value");return[...e]}o(oe,"codePointsToStringUnmapper");var Tf=Object.assign;function un(e={}){let t=Zr(),r=he(t,oe),n=Tf(Tf({},e),{experimentalCustomSlices:r});return k(t,n).map($e,oe)}o(un,"hexaString");function Ts(e){return e.length===0?[]:W(e,":")}o(Ts,"readBh");function Cs(e){let t=W(e,":");return t.length>=2&&t[t.length-1].length<=4?[z(t,0,t.length-2),`${t[t.length-2]}:${t[t.length-1]}`]:[z(t,0,t.length-1),t[t.length-1]]}o(Cs,"extractEhAndL");function Cf(e){return`${N(e[0],":")}:${e[1]}`}o(Cf,"fullySpecifiedMapper");function Ef(e){if(typeof e!="string")throw new Error("Invalid type");return Cs(e)}o(Ef,"fullySpecifiedUnmapper");function Mf(e){return`::${N(e[0],":")}:${e[1]}`}o(Mf,"onlyTrailingMapper");function Nf(e){if(typeof e!="string")throw new Error("Invalid type");if(!Iu(e,"::"))throw new Error("Invalid value");return Cs(V(e,2))}o(Nf,"onlyTrailingUnmapper");function cn(e){return`${N(e[0],":")}::${N(e[1],":")}:${e[2]}`}o(cn,"multiTrailingMapper");function fn(e){if(typeof e!="string")throw new Error("Invalid type");let[t,r]=W(e,"::",2),[n,i]=Cs(r);return[Ts(t),n,i]}o(fn,"multiTrailingUnmapper");function Of(e){return cn([e[0],[e[1]],e[2]])}o(Of,"multiTrailingMapperOne");function Pf(e){let t=fn(e);return[t[0],N(t[1],":"),t[2]]}o(Pf,"multiTrailingUnmapperOne");function Es(e){return`${N(e[0],":")}::${e[1]}`}o(Es,"singleTrailingMapper");function Ms(e){if(typeof e!="string")throw new Error("Invalid type");let[t,r]=W(e,"::",2);return[Ts(t),r]}o(Ms,"singleTrailingUnmapper");function jf(e){return`${N(e[0],":")}::`}o(jf,"noTrailingMapper");function Rf(e){if(typeof e!="string")throw new Error("Invalid type");if(!Au(e,"::"))throw new Error("Invalid value");return[Ts(V(e,0,e.length-2))]}o(Rf,"noTrailingUnmapper");function Kh([e,t]){return`${e}:${t}`}o(Kh,"h16sTol32Mapper");function Yh(e){if(typeof e!="string")throw new Error("Invalid type");if(!e.includes(":"))throw new Error("Invalid value");return e.split(":",2)}o(Yh,"h16sTol32Unmapper");function dn(){let e=un({minLength:1,maxLength:4,size:"max"}),t=B(v(e,e).map(Kh,Yh),Nt());return B(v(k(e,{minLength:6,maxLength:6,size:"max"}),t).map(Cf,Ef),v(k(e,{minLength:5,maxLength:5,size:"max"}),t).map(Mf,Nf),v(k(e,{minLength:0,maxLength:1,size:"max"}),k(e,{minLength:4,maxLength:4,size:"max"}),t).map(cn,fn),v(k(e,{minLength:0,maxLength:2,size:"max"}),k(e,{minLength:3,maxLength:3,size:"max"}),t).map(cn,fn),v(k(e,{minLength:0,maxLength:3,size:"max"}),k(e,{minLength:2,maxLength:2,size:"max"}),t).map(cn,fn),v(k(e,{minLength:0,maxLength:4,size:"max"}),e,t).map(Of,Pf),v(k(e,{minLength:0,maxLength:5,size:"max"}),t).map(Es,Ms),v(k(e,{minLength:0,maxLength:6,size:"max"}),e).map(Es,Ms),v(k(e,{minLength:0,maxLength:7,size:"max"})).map(jf,Rf))}o(dn,"ipV6");var ln=class extends C{static{o(this,"LazyArbitrary")}constructor(t){super(),this.name=t,this.underlying=null}generate(t,r){if(!this.underlying)throw new Error(`Lazy arbitrary ${JSON.stringify(this.name)} not correctly initialized`);return this.underlying.generate(t,r)}canShrinkWithoutContext(t){if(!this.underlying)throw new Error(`Lazy arbitrary ${JSON.stringify(this.name)} not correctly initialized`);return this.underlying.canShrinkWithoutContext(t)}shrink(t,r){if(!this.underlying)throw new Error(`Lazy arbitrary ${JSON.stringify(this.name)} not correctly initialized`);return this.underlying.shrink(t,r)}};var Qh=Object.create;function pn(e){let t=Qh(null),n=e(o(i=>(wt(t,i)||(t[i]=new ln(String(i))),t[i]),"tie"));for(let i in n){if(!wt(n,i))continue;let s=t[i],a=s!==void 0?s:new ln(i);a.underlying=n[i],t[i]=a}return n}o(pn,"letrec");function Ff(e){return N(E(e,t=>t[t.length-1]===","?V(t,0,t.length-1):t)," ")}o(Ff,"wordsToJoinedStringMapper");function Uf(e){return o(function(r){if(typeof r!="string")throw new Error("Unsupported type");let n=[];for(let i of W(r," "))if(e.canShrinkWithoutContext(i))g(n,i);else if(e.canShrinkWithoutContext(i+","))g(n,i+",");else throw new Error("Unsupported word");return n},"wordsToJoinedStringUnmapper")}o(Uf,"wordsToJoinedStringUnmapperFor");function Vf(e){let t=N(e," ");return t[t.length-1]===","&&(t=V(t,0,t.length-1)),Nr(t[0])+V(t,1)+"."}o(Vf,"wordsToSentenceMapper");function $f(e){return o(function(r){if(typeof r!="string")throw new Error("Unsupported type");if(r.length<2||r[r.length-1]!=="."||r[r.length-2]===","||Nr(Mr(r[0]))!==r[0])throw new Error("Unsupported value");let n=Mr(r[0])+V(r,1,r.length-1),i=[],s=W(n," ");for(let a=0;a!==s.length;++a){let u=s[a];if(e.canShrinkWithoutContext(u))g(i,u);else if(a===s.length-1&&e.canShrinkWithoutContext(u+","))g(i,u+",");else throw new Error("Unsupported word")}return i},"wordsToSentenceUnmapper")}o($f,"wordsToSentenceUnmapperFor");function Df(e){return N(e," ")}o(Df,"sentencesToParagraphMapper");function Lf(e){if(typeof e!="string")throw new Error("Unsupported type");let t=W(e,". ");for(let r=0;r<t.length-1;++r)t[r]+=".";return t}o(Lf,"sentencesToParagraphUnmapper");var d=o((e,t)=>({arbitrary:L(e),weight:t}),"h");function Xh(){return B(d("non",6),d("adipiscing",5),d("ligula",5),d("enim",5),d("pellentesque",5),d("in",5),d("augue",5),d("et",5),d("nulla",5),d("lorem",4),d("sit",4),d("sed",4),d("diam",4),d("fermentum",4),d("ut",4),d("eu",4),d("aliquam",4),d("mauris",4),d("vitae",4),d("felis",4),d("ipsum",3),d("dolor",3),d("amet,",3),d("elit",3),d("euismod",3),d("mi",3),d("orci",3),d("erat",3),d("praesent",3),d("egestas",3),d("leo",3),d("vel",3),d("sapien",3),d("integer",3),d("curabitur",3),d("convallis",3),d("purus",3),d("risus",2),d("suspendisse",2),d("lectus",2),d("nec,",2),d("ultricies",2),d("sed,",2),d("cras",2),d("elementum",2),d("ultrices",2),d("maecenas",2),d("massa,",2),d("varius",2),d("a,",2),d("semper",2),d("proin",2),d("nec",2),d("nisl",2),d("amet",2),d("duis",2),d("congue",2),d("libero",2),d("vestibulum",2),d("pede",2),d("blandit",2),d("sodales",2),d("ante",2),d("nibh",2),d("ac",2),d("aenean",2),d("massa",2),d("suscipit",2),d("sollicitudin",2),d("fusce",2),d("tempus",2),d("aliquam,",2),d("nunc",2),d("ullamcorper",2),d("rhoncus",2),d("metus",2),d("faucibus,",2),d("justo",2),d("magna",2),d("at",2),d("tincidunt",2),d("consectetur",1),d("tortor,",1),d("dignissim",1),d("congue,",1),d("non,",1),d("porttitor,",1),d("nonummy",1),d("molestie,",1),d("est",1),d("eleifend",1),d("mi,",1),d("arcu",1),d("scelerisque",1),d("vitae,",1),d("consequat",1),d("in,",1),d("pretium",1),d("volutpat",1),d("pharetra",1),d("tempor",1),d("bibendum",1),d("odio",1),d("dui",1),d("primis",1),d("faucibus",1),d("luctus",1),d("posuere",1),d("cubilia",1),d("curae,",1),d("hendrerit",1),d("velit",1),d("mauris,",1),d("gravida",1),d("ornare",1),d("ut,",1),d("pulvinar",1),d("varius,",1),d("turpis",1),d("nibh,",1),d("eros",1),d("id",1),d("aliquet",1),d("quis",1),d("lobortis",1),d("consectetuer",1),d("morbi",1),d("vehicula",1),d("tortor",1),d("tellus,",1),d("id,",1),d("eu,",1),d("quam",1),d("feugiat,",1),d("posuere,",1),d("iaculis",1),d("lectus,",1),d("tristique",1),d("mollis,",1),d("nisl,",1),d("vulputate",1),d("sem",1),d("vivamus",1),d("placerat",1),d("imperdiet",1),d("cursus",1),d("rutrum",1),d("iaculis,",1),d("augue,",1),d("lacus",1))}o(Xh,"loremWord");function Ns(e={}){let{maxCount:t,mode:r="words",size:n}=e;if(t!==void 0&&t<1)throw new Error("lorem has to produce at least one word/sentence");let i=Xh();if(r==="sentences"){let s=k(i,{minLength:1,size:"small"}).map(Vf,$f(i));return k(s,{minLength:1,maxLength:t,size:n}).map(Df,Lf)}else return k(i,{minLength:1,maxLength:t,size:n}).map(Ff,Uf(i))}o(Ns,"lorem");var Ni=10;function Os(e){let t={};return(r=>{let n=r!==void 0?r:Ni;if(!wt(t,n)){let i=Ni;Ni=n-1,t[n]=e(n),Ni=i}return t[n]})}o(Os,"memo");function em(e){let t=0;for(;e>w(0);)e&w(1)&&++t,e>>=w(1);return t}o(em,"countToggledBits");function Bf(e,t){let r=(w(1)<<w(t))-w(1),n=e&r,i=em(e-n),s=n;for(let a=w(1);a<=r&&i!==0;a<<=w(1))s&a||(s|=a,--i);return s}o(Bf,"computeNextFlags");function hn(e,t){let r=[];for(let n=e.length-1;n!==-1;--n)t(e[n])!==e[n]&&g(r,n);return r}o(hn,"computeTogglePositions");function zf(e,t,r){let n=w(0);for(let i=0,s=w(1);i!==r.length;++i,s<<=w(1))e[r[i]]!==t[r[i]]&&(n|=s);return n}o(zf,"computeFlagsFromChars");function Oi(e,t,r,n){for(let i=0,s=w(1);i!==r.length;++i,s<<=w(1))t&s&&(e[r[i]]=n(e[r[i]]))}o(Oi,"applyFlagsOnChars");var Pi=class extends C{static{o(this,"MixedCaseArbitrary")}constructor(t,r,n){super(),this.stringArb=t,this.toggleCase=r,this.untoggleAll=n}buildContextFor(t,r){return{rawString:t.value,rawStringContext:t.context,flags:r.value,flagsContext:r.context}}generate(t,r){let n=this.stringArb.generate(t,r),i=[...n.value],s=hn(i,this.toggleCase),u=ur(s.length).generate(t,void 0);return Oi(i,u.value,s,this.toggleCase),new m(N(i,""),this.buildContextFor(n,u))}canShrinkWithoutContext(t){return typeof t!="string"?!1:this.untoggleAll!==void 0?this.stringArb.canShrinkWithoutContext(this.untoggleAll(t)):this.stringArb.canShrinkWithoutContext(t)}shrink(t,r){let n;if(r!==void 0)n=r;else if(this.untoggleAll!==void 0){let a=this.untoggleAll(t),u=[...t],c=[...a],f=hn(c,this.toggleCase);n={rawString:a,rawStringContext:void 0,flags:zf(c,u,f),flagsContext:void 0}}else n={rawString:t,rawStringContext:void 0,flags:w(0),flagsContext:void 0};let i=n.rawString,s=n.flags;return this.stringArb.shrink(i,n.rawStringContext).map(a=>{let u=[...a.value],c=hn(u,this.toggleCase),f=Bf(s,c.length);return Oi(u,f,c,this.toggleCase),new m(N(u,""),this.buildContextFor(a,new m(f,void 0)))}).join(ye(()=>{let a=[...i],u=hn(a,this.toggleCase);return ur(u.length).shrink(s,n.flagsContext).map(c=>{let f=z(a);return Oi(f,c.value,u,this.toggleCase),new m(N(f,""),this.buildContextFor(new m(i,n.rawStringContext),c))})}))}};function tm(e){let t=Nr(e);return t!==e?t:Mr(e)}o(tm,"defaultToggleCase");function Ps(e,t){if(typeof w>"u")throw new A("mixedCase requires BigInt support");let r=t&&t.toggleCase||tm,n=t&&t.untoggleAll;return new Pi(e,r,n)}o(Ps,"mixedCase");function rm(e){return ho.from(e)}o(rm,"toTypedMapper");function nm(e){if(!(e instanceof ho))throw new Error("Unexpected type");return[...e]}o(nm,"fromTypedUnmapper");function mn(e={}){return k(nn(e),e).map(rm,nm)}o(mn,"float32Array");function im(e){return mo.from(e)}o(im,"toTypedMapper");function om(e){if(!(e instanceof mo))throw new Error("Unexpected type");return[...e]}o(om,"fromTypedUnmapper");function xn(e={}){return k(Ye(e),e).map(im,om)}o(xn,"float64Array");var sm=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};function X(e,t,r,n,i){let s=n.name,{min:a=t,max:u=r}=e,c=sm(e,["min","max"]);if(a>u)throw new Error(`Invalid range passed to ${s}: min must be lower than or equal to max`);if(a<t)throw new Error(`Invalid min value passed to ${s}: min must be greater than or equal to ${t}`);if(u>r)throw new Error(`Invalid max value passed to ${s}: max must be lower than or equal to ${r}`);return k(i({min:a,max:u}),c).map(f=>n.from(f),f=>{if(!(f instanceof n))throw new Error("Invalid type");return[...f]})}o(X,"typedIntArrayArbitraryArbitraryBuilder");function gn(e={}){return X(e,-32768,32767,lu,M)}o(gn,"int16Array");function bn(e={}){return X(e,-2147483648,2147483647,pu,M)}o(bn,"int32Array");function yn(e={}){return X(e,-128,127,du,M)}o(yn,"int8Array");function wn(e={}){return X(e,0,65535,xu,M)}o(wn,"uint16Array");function Sn(e={}){return X(e,0,4294967295,gu,M)}o(Sn,"uint32Array");function vn(e={}){return X(e,0,255,hu,M)}o(vn,"uint8Array");function In(e={}){return X(e,0,255,mu,M)}o(In,"uint8ClampedArray");function am(e){return e!==void 0}o(am,"isSafeContext");function Wf(e){return e.hasToBeCloned?new m(e.value_,{generatorContext:e.context},()=>e.value):new m(e.value_,{generatorContext:e.context})}o(Wf,"toGeneratorValue");function Gf(e){return e.hasToBeCloned?new m(e.value_,{shrinkerContext:e.context},()=>e.value):new m(e.value_,{shrinkerContext:e.context})}o(Gf,"toShrinkerValue");var ji=class extends C{static{o(this,"WithShrinkFromOtherArbitrary")}constructor(t,r){super(),this.generatorArbitrary=t,this.shrinkerArbitrary=r}generate(t,r){return Wf(this.generatorArbitrary.generate(t,r))}canShrinkWithoutContext(t){return this.shrinkerArbitrary.canShrinkWithoutContext(t)}shrink(t,r){return am(r)?"generatorContext"in r?this.generatorArbitrary.shrink(t,r.generatorContext).map(Wf):this.shrinkerArbitrary.shrink(t,r.shrinkerContext).map(Gf):this.shrinkerArbitrary.shrink(t,void 0).map(Gf)}};function An(e,t,r){let n=M({min:e,max:t});if(t===r)return n;let i=M({min:e,max:r});return new ji(n,i)}o(An,"restrictedIntegerArbitraryBuilder");var um=Math.min,js=Math.max,qf=lo.isArray,cm=Object.entries;function fm(e){let t=-1;for(let r=0;r!==e.length;++r)t=js(t,e[r][0]);return t}o(fm,"extractMaxIndex");function dm(e,t){let r=lo(e);for(let n=0;n!==t.length;++n){let i=t[n];i[0]<e&&(r[i[0]]=i[1])}return r}o(dm,"arrayFromItems");function kn(e,t={}){let{size:r,minNumElements:n=0,maxLength:i=de,maxNumElements:s=i,noTrailingHole:a,depthIdentifier:u}=t,c=Ze(r,n,s,t.maxNumElements!==void 0),f=Ze(r,c,i,t.maxLength!==void 0);if(n>i)throw new Error("The minimal number of non-hole elements cannot be higher than the maximal length of the array");if(n>s)throw new Error("The minimal number of non-hole elements cannot be higher than the maximal number of non-holes");let l=um(s,i),h=t.maxNumElements!==void 0||r!==void 0?r:"=",y=js(f-1,0),P=js(i-1,0),Z=Ue(v(An(0,y,P),e),{size:h,minLength:n,maxLength:l,selector:o(q=>q[0],"selector"),depthIdentifier:u}).map(q=>{let be=fm(q);return dm(be+1,q)},q=>{if(!qf(q))throw new Error("Not supported entry type");if(a&&q.length!==0&&!(q.length-1 in q))throw new Error("No trailing hole");return E(cm(q),be=>[Number(be[0]),be[1]])});return a||i===n?Z:v(Z,An(n,f,i)).map(q=>{let be=q[0],Sa=q[1];if(be.length>=Sa)return be;let va=z(be);return va.length=Sa,va},q=>{if(!qf(q))throw new Error("Not supported entry type");return[q,q.length]})}o(kn,"sparseArray");function Zf(e){return new Map(e)}o(Zf,"arrayToMapMapper");function Hf(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)}o(Hf,"arrayToMapUnmapper");function Jf(e){return new Set(e)}o(Jf,"arrayToSetMapper");function Kf(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)}o(Kf,"arrayToSetUnmapper");function Yf(e,t,r,n,i){return Ue(v(e,t),{maxLength:r,size:n,comparator:"SameValueZero",selector:o(s=>s[0],"selector"),depthIdentifier:i}).map(Zf,Hf)}o(Yf,"mapOf");function lm(e,t,r,n,i,s){return Ct(e,t,{maxKeys:r,noNullPrototype:!s,size:n,depthIdentifier:i})}o(lm,"dictOf");function pm(e,t,r,n){return Ue(e,{maxLength:t,size:r,comparator:"SameValueZero",depthIdentifier:n}).map(Jf,Kf)}o(pm,"setOf");function hm(e){return B(yn(e),vn(e),In(e),gn(e),wn(e),bn(e),Sn(e),mn(e),xn(e))}o(hm,"typedArray");function Ri(e){let t=e.values,r=e.depthSize,n=Dr(),i=e.maxDepth,s=e.maxKeys,a=e.size,u=B(...t,...e.withBigInt?[He()]:[],...e.withDate?[Jr()]:[]);return pn(c=>({anything:B({maxDepth:i,depthSize:r,depthIdentifier:n},u,c("array"),c("object"),...e.withMap?[c("map")]:[],...e.withSet?[c("set")]:[],...e.withObjectString?[c("anything").map(f=>$(f))]:[],...e.withTypedArray?[hm({maxLength:s,size:a})]:[],...e.withSparseArray?[kn(c("anything"),{maxNumElements:s,size:a,depthIdentifier:n})]:[]),keys:e.withObjectString?B({arbitrary:e.key,weight:10},{arbitrary:c("anything").map(f=>$(f)),weight:1}):e.key,array:k(c("anything"),{maxLength:s,size:a,depthIdentifier:n}),set:pm(c("anything"),s,a,n),map:B(Yf(c("keys"),c("anything"),s,a,n),Yf(c("anything"),c("anything"),s,a,n)),object:lm(c("keys"),c("anything"),s,a,n,e.withNullPrototype)})).anything}o(Ri,"anyArbitraryBuilder");var Qf=Object.assign;function Ot(e={}){let t=Tt(),r=he(t,oe),n=Qf(Qf({},e),{experimentalCustomSlices:r});return k(t,n).map($e,oe)}o(Ot,"fullUnicodeString");function Xf(e){switch(typeof e){case"boolean":return new po(e);case"number":return new Cr(e);case"string":return new ae(e);default:return e}}o(Xf,"unboxedToBoxedMapper");function ed(e){return typeof e!="object"||e===null||!("constructor"in e)?e:e.constructor===po||e.constructor===Cr||e.constructor===ae?e.valueOf():e}o(ed,"unboxedToBoxedUnmapper");function td(e){return e.map(Xf,ed)}o(td,"boxedArbitraryBuilder");function mm(e,t){return[Me(),on(),Ye(),t(e),B(t(e),L(null),L(void 0))]}o(mm,"defaultValues");function xm(e){return e.map(t=>td(t))}o(xm,"boxArbitraries");function gm(e,t){return t?xm(e).concat(e):e}o(gm,"boxArbitrariesIfNeeded");function Fi(e={}){function t(i,s){return i!==void 0?i:s}o(t,"orDefault");let r="stringUnit"in e?J:e.withUnicodeString?Ot:J,n={size:e.size,unit:e.stringUnit};return{key:t(e.key,r(n)),values:gm(t(e.values,mm(n,r)),t(e.withBoxedValues,!1)),depthSize:e.depthSize,maxDepth:e.maxDepth,maxKeys:e.maxKeys,size:e.size,withSet:t(e.withSet,!1),withMap:t(e.withMap,!1),withObjectString:t(e.withObjectString,!1),withNullPrototype:t(e.withNullPrototype,!1),withBigInt:t(e.withBigInt,!1),withDate:t(e.withDate,!1),withTypedArray:t(e.withTypedArray,!1),withSparseArray:t(e.withSparseArray,!1)}}o(Fi,"toQualifiedObjectConstraints");function bm(e){return Ct(e.key,Ri(e),{maxKeys:e.maxKeys,noNullPrototype:!e.withNullPrototype,size:e.size})}o(bm,"objectInternal");function Rs(e){return bm(Fi(e))}o(Rs,"object");function Ui(e,t){let{depthSize:r,maxDepth:n}=t,i=e,s=[Me(),Ye({noDefaultInfinity:!0,noNaN:!0}),e,L(null)];return{key:i,values:s,depthSize:r,maxDepth:n}}o(Ui,"jsonConstraintsBuilder");function Pt(e){return Ri(Fi(e))}o(Pt,"anything");function _n(e={}){let t=e.noUnicodeString===void 0||e.noUnicodeString===!0,r="stringUnit"in e?J({unit:e.stringUnit}):t?J():Ot();return Pt(Ui(r,e))}o(_n,"jsonValue");function Fs(e={}){return _n(e).map(JSON.stringify)}o(Fs,"json");var rd=Object.assign;function Tn(e={}){let t=Hr(),r=he(t,oe),n=rd(rd({},e),{experimentalCustomSlices:r});return k(t,n).map($e,oe)}o(Tn,"unicodeString");function Cn(e={}){return Pt(Ui(Tn(),e))}o(Cn,"unicodeJsonValue");function Us(e={}){return Cn(e).map(JSON.stringify)}o(Us,"unicodeJson");var ym=Object.keys,wm=Object.getOwnPropertySymbols,Sm=Object.getOwnPropertyDescriptor;function nd(e){let t=ym(e),r=wm(e);for(let n=0;n!==r.length;++n){let i=r[n],s=Sm(e,i);s&&s.enumerable&&t.push(i)}return t}o(nd,"extractEnumerableKeys");var vm=Object.create,Im=Object.defineProperty,Am=Object.getOwnPropertyDescriptor,km=Object.getOwnPropertyNames,_m=Object.getOwnPropertySymbols;function id(e,t){return o(function(n){let i=n[1]?vm(null):{};for(let s=0;s!==e.length;++s){let a=n[0][s];a!==t&&Im(i,e[s],{value:a,configurable:!0,enumerable:!0,writable:!0})}return i},"valuesAndSeparateKeysToObjectMapper")}o(id,"buildValuesAndSeparateKeysToObjectMapper");function od(e,t){return o(function(n){if(typeof n!="object"||n===null)throw new Error("Incompatible instance received: should be a non-null object");let i=Object.getPrototypeOf(n)===null,s="constructor"in n&&n.constructor===Object;if(!i&&!s)throw new Error("Incompatible instance received: should be of exact type Object");let a=0,u=[];for(let l=0;l!==e.length;++l){let h=Am(n,e[l]);if(h!==void 0){if(!h.configurable||!h.enumerable||!h.writable)throw new Error("Incompatible instance received: should contain only c/e/w properties");if(h.get!==void 0||h.set!==void 0)throw new Error("Incompatible instance received: should contain only no get/set properties");++a,g(u,h.value)}else g(u,t)}let c=km(n).length,f=_m(n).length;if(a!==c+f)throw new Error("Incompatible instance received: should not contain extra properties");return[u,i]},"valuesAndSeparateKeysToObjectUnmapper")}o(od,"buildValuesAndSeparateKeysToObjectUnmapper");var Vs=Symbol("no-key");function Vi(e,t,r){let n=nd(e),i=[];for(let s=0;s!==n.length;++s){let a=n[s],u=e[a];t===void 0||ue(t,a)!==-1?g(i,u):g(i,Ie(u,{nil:Vs}))}return v(v(...i),r?L(!1):Me()).map(id(n,Vs),od(n,Vs))}o(Vi,"buildPartialRecordArbitrary");function En(e,t){let r=t===void 0||t.noNullPrototype===void 0||t.noNullPrototype;if(t==null)return Vi(e,void 0,r);if("withDeletedKeys"in t&&"requiredKeys"in t)throw new Error("requiredKeys and withDeletedKeys cannot be used together in fc.record");if(!("requiredKeys"in t&&t.requiredKeys!==void 0||"withDeletedKeys"in t&&!!t.withDeletedKeys))return Vi(e,void 0,r);let i=("requiredKeys"in t?t.requiredKeys:void 0)||[];for(let s=0;s!==i.length;++s){let a=Object.getOwnPropertyDescriptor(e,i[s]);if(a===void 0)throw new Error("requiredKeys cannot reference keys that have not been defined in recordModel");if(!a.enumerable)throw new Error("requiredKeys cannot reference keys that have are enumerable in recordModel")}return Vi(e,i,r)}o(En,"record");var Tm=Object.defineProperties;function $s(e){return`Stream(${N(e,",")}\u2026)`}o($s,"prettyPrint");var $i=class extends C{static{o(this,"StreamArbitrary")}constructor(t){super(),this.arb=t}generate(t,r){let n=r!==void 0&&t.nextInt(1,r)===1?r:void 0,i=o(()=>{let s=[],a=o(function*(c,f){for(;;){let l=c.generate(f,n).value;g(s,l),yield l}},"g"),u=new S(a(this.arb,t.clone()));return Tm(u,{toString:{value:o(()=>$s(s.map($)),"value")},[ie]:{value:o(()=>$s(s.map($)),"value")},[fe]:{value:o(async()=>$s(await Promise.all(s.map(At))),"value")},[F]:{value:i,enumerable:!0}})},"enrichedProducer");return new m(i(),void 0)}canShrinkWithoutContext(t){return!1}shrink(t,r){return S.nil()}};function Ds(e){return new $i(e)}o(Ds,"infiniteStream");var sd=Object.assign;function Ls(e={}){let t=zr(),r=he(t,oe),n=sd(sd({},e),{experimentalCustomSlices:r});return k(t,n).map($e,oe)}o(Ls,"asciiString");function ad(e){switch(e.length%4){case 0:return e;case 3:return`${e}=`;case 2:return`${e}==`;default:return V(e,1)}}o(ad,"stringToBase64Mapper");function ud(e){if(typeof e!="string"||e.length%4!==0)throw new Error("Invalid string received");let t=e.indexOf("=");if(t===-1)return e;if(e.length-t>2)throw new Error("Cannot unmap the passed value");return V(e,0,t)}o(ud,"stringToBase64Unmapper");function Bs(e={}){let{minLength:t=0,maxLength:r=de,size:n}=e,i=t+3-(t+3)%4,s=r-r%4,a=e.maxLength===void 0&&n===void 0?"=":n;if(i>s)throw new Error("Minimal length should be inferior or equal to maximal length");if(i%4!==0)throw new Error("Minimal length of base64 strings must be a multiple of 4");if(s%4!==0)throw new Error("Maximal length of base64 strings must be a multiple of 4");let u=Wr(),c=he(u,oe);return k(u,{minLength:i,maxLength:s,size:a,experimentalCustomSlices:c}).map($e,oe).map(ad,ud)}o(Bs,"base64String");function cd(e){return N(e,"")}o(cd,"charsToStringMapper");function zs(e){if(typeof e!="string")throw new Error("Cannot unmap the passed value");return W(e,"")}o(zs,"charsToStringUnmapper");var fd=Object.assign;function Ws(e={}){let t=qr(),r=he(t,zs),n=fd(fd({},e),{experimentalCustomSlices:r});return k(t,n).map(cd,zs)}o(Ws,"string16bits");var dd=Object.assign;function De(e,t={}){let r=Si(e,t),n=he(e,r),i=dd(dd({},t),{experimentalCustomSlices:n});return k(e,i).map(wi,r)}o(De,"stringOf");var ld=Object.is;function pd(e,t){let r=new je,n=0;for(let i of e)if(ld(i,-0))++n;else{let s=ce(r,i)||0;ke(r,i,s+1)}for(let i=0;i!==t.length;++i){if(!(i in t))return!1;let s=t[i];if(ld(s,-0)){if(n===0)return!1;--n}else{let a=ce(r,s)||0;if(a===0)return!1;ke(r,s,a-1)}}return!0}o(pd,"isSubarrayOf");var Cm=Math.floor,hd=Math.log,Em=Array.isArray,hr=class extends C{static{o(this,"SubarrayArbitrary")}constructor(t,r,n,i){if(super(),this.originalArray=t,this.isOrdered=r,this.minLength=n,this.maxLength=i,n<0||n>t.length)throw new Error("fc.*{s|S}ubarrayOf expects the minimal length to be between 0 and the size of the original array");if(i<0||i>t.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>i)throw new Error("fc.*{s|S}ubarrayOf expects the minimal length to be inferior or equal to the maximal length");this.lengthArb=new ve(n,i),this.biasedLengthArb=n!==i?new ve(n,n+Cm(hd(i-n)/hd(2))):this.lengthArb}generate(t,r){let i=(r!==void 0&&t.nextInt(1,r)===1?this.biasedLengthArb:this.lengthArb).generate(t,void 0),s=i.value,a=E(this.originalArray,(c,f)=>f),u=[];for(let c=0;c!==s;++c){let f=t.nextInt(0,a.length-1);g(u,a[f]),Wn(a,f,1)}return this.isOrdered&&Gn(u,(c,f)=>c-f),new m(E(u,c=>this.originalArray[c]),i.context)}canShrinkWithoutContext(t){return!Em(t)||!this.lengthArb.canShrinkWithoutContext(t.length)?!1:pd(this.originalArray,t)}shrink(t,r){return t.length===0?S.nil():this.lengthArb.shrink(t.length,r).map(n=>new m(z(t,t.length-n.value),n.context)).join(t.length>this.minLength?ye(()=>this.shrink(z(t,1),void 0).filter(n=>this.minLength<=n.value.length+1).map(n=>new m([t[0],...n.value],void 0))):S.nil())}};function Gs(e,t={}){let{minLength:r=0,maxLength:n=e.length}=t;return new hr(e,!0,r,n)}o(Gs,"subarray");function qs(e,t={}){let{minLength:r=0,maxLength:n=e.length}=t;return new hr(e,!1,r,n)}o(qs,"shuffledSubarray");var Mm={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"},Nm={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 Om(e){return e<10?ae(e):Mm[e]}o(Om,"encodeSymbol");function md(e,t){let r="";for(;e.length+r.length<t;)r+="0";return r+e}o(md,"pad");function xd(e){let t="";for(let r=e;r!==0;){let n=r>>5,i=r-(n<<5);t=Om(i)+t,r=n}return t}o(xd,"smallUintToBase32StringMapper");function Pm(e,t){let r=~~(e/1073741824),n=e&1073741823;return md(xd(r),t-6)+md(xd(n),6)}o(Pm,"uintToBase32StringMapper");function Zs(e){return o(function(r){return Pm(r,e)},"padded")}o(Zs,"paddedUintToBase32StringMapper");function Di(e){if(typeof e!="string")throw new A("Unsupported type");let t=0,r=1;for(let n=e.length-1;n>=0;--n){let i=e[n],s=Nm[i];if(s===void 0)throw new A("Unsupported type");t+=s*r,r*=32}return t}o(Di,"uintToBase32StringUnmapper");var jm=Zs(10),gd=Zs(8);function Rm(e){return jm(e[0])+gd(e[1])+gd(e[2])}o(Rm,"ulidMapper");function Fm(e){if(typeof e!="string"||e.length!==26)throw new Error("Unsupported type");return[Di(e.slice(0,10)),Di(e.slice(10,18)),Di(e.slice(18))]}o(Fm,"ulidUnmapper");function Hs(){let e=M({min:0,max:0xffffffffffff}),t=M({min:0,max:0xffffffffff}),r=M({min:0,max:0xffffffffff});return v(e,t,r).map(Rm,Fm)}o(Hs,"ulid");function Js(e){return ku(it(e,16),8,"0")}o(Js,"numberToPaddedEightMapper");function bd(e){if(typeof e!="string")throw new Error("Unsupported type");if(e.length!==8)throw new Error("Unsupported value: invalid length");let t=parseInt(e,16);if(e!==Js(t))throw new Error("Unsupported value: invalid content");return t}o(bd,"numberToPaddedEightUnmapper");function lt(e,t){return M({min:e,max:t}).map(Js,bd)}o(lt,"buildPaddedNumberArbitrary");function Li(e){return`${e[0]}-${V(e[1],4)}-${V(e[1],0,4)}-${V(e[2],0,4)}-${V(e[2],4)}${e[3]}`}o(Li,"paddedEightsToUuidMapper");var Um=/^([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/;function Bi(e){if(typeof e!="string")throw new Error("Unsupported type");let t=Um.exec(e);if(t===null)throw new Error("Unsupported type");return[t[1],t[3]+t[2],t[4]+V(t[5],0,4),V(t[5],4)]}o(Bi,"paddedEightsToUuidUnmapper");var yd="0123456789abcdef";function wd(e){let t={},r={};for(let s=0;s!==e.length;++s){let a=yd[s],u=yd[e[s]];t[a]=u,r[u]=a}function n(s){return t[s[0]]+V(s,1)}o(n,"versionsApplierMapper");function i(s){if(typeof s!="string")throw new A("Cannot produce non-string values");let a=r[s[0]];if(a===void 0)throw new A("Cannot produce strings not starting by the version in hexa code");return a+V(s,1)}return o(i,"versionsApplierUnmapper"),{versionsApplierMapper:n,versionsApplierUnmapper:i}}o(wd,"buildVersionsAppliersForUuid");function Vm(e){let t={};for(let r of e){if(t[r])throw new A(`Version ${r} has been requested at least twice for uuid`);if(t[r]=!0,r<1||r>15)throw new A(`Version must be a value in [1-15] for uuid, but received ${r}`);if(~~r!==r)throw new A(`Version must be an integer value for uuid, but received ${r}`)}if(e.length===0)throw new A("Must provide at least one version for uuid")}o(Vm,"assertValidVersions");function Ks(e={}){let t=lt(0,4294967295),r=e.version!==void 0?typeof e.version=="number"?[e.version]:e.version:[1,2,3,4,5];Vm(r);let{versionsApplierMapper:n,versionsApplierUnmapper:i}=wd(r),s=lt(0,268435456*r.length-1).map(n,i),a=lt(2147483648,3221225471);return v(t,s,a,t).map(Li,Bi)}o(Ks,"uuid");function Ys(e){let t=lt(0,4294967295),r=e*268435456,n=lt(r,r+268435455),i=lt(2147483648,3221225471);return v(t,n,i,t).map(Li,Bi)}o(Ys,"uuidV");function $m(e){return J({unit:fr("-._~!$&'()*+,;=:"),size:e})}o($m,"hostUserInfo");function Dm([e,t,r]){return(e===null?"":`${e}@`)+t+(r===null?"":`:${r}`)}o(Dm,"userHostPortMapper");function Lm(e){if(typeof e!="string")throw new Error("Unsupported");let t=e.indexOf("@"),r=t!==-1?e.substring(0,t):null,i=/:(\d+)$/.exec(e),s=i!==null?Number(i[1]):null,a=i!==null?e.substring(t+1,e.length-i[1].length-1):e.substring(t+1);return[r,a,s]}o(Lm,"userHostPortUnmapper");function Bm(e){return`[${e}]`}o(Bm,"bracketedMapper");function zm(e){if(typeof e!="string"||e[0]!=="["||e[e.length-1]!=="]")throw new Error("Unsupported");return e.substring(1,e.length-1)}o(zm,"bracketedUnmapper");function Mn(e){let t=e||{},r=t.size,n=[Mt({size:r}),...t.withIPv4===!0?[Nt()]:[],...t.withIPv6===!0?[dn().map(Bm,zm)]:[],...t.withIPv4Extended===!0?[an()]:[]];return v(t.withUserInfo===!0?Ie($m(r)):L(null),B(...n),t.withPort===!0?Ie(pe(65535)):L(null)).map(Dm,Lm)}o(Mn,"webAuthority");function zi(e){return J({unit:fr("-._~!$&'()*+,;=:@/?"),size:e})}o(zi,"buildUriQueryOrFragmentArbitrary");function Nn(e={}){return zi(e.size)}o(Nn,"webFragments");function On(e={}){return J({unit:fr("-._~!$&'()*+,;=:@"),size:e.size})}o(On,"webSegment");function Sd(e){return N(E(e,t=>`/${t}`),"")}o(Sd,"segmentsToPathMapper");function vd(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 Wn(W(e,"/"),1)}o(vd,"segmentsToPathUnmapper");function Wm(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"]}}o(Wm,"sqrtSize");function Qs(e,t){return k(On({size:e}),{size:t}).map(Sd,vd)}o(Qs,"buildUriPathArbitraryInternal");function Id(e){let[t,r]=Wm(e);return t===r?Qs(t,r):B(Qs(t,r),Qs(r,t))}o(Id,"buildUriPathArbitrary");function Pn(e){let r=ar((e||{}).size);return Id(r)}o(Pn,"webPath");function jn(e={}){return zi(e.size)}o(jn,"webQueryParameters");function Ad(e){let[t,r,n]=e,i=e[3]===null?"":`?${e[3]}`,s=e[4]===null?"":`#${e[4]}`;return`${t}://${r}${n}${i}${s}`}o(Ad,"partsToUrlMapper");var Gm=/^([[A-Za-z][A-Za-z0-9+.-]*):\/\/([^/?#]*)([^?#]*)(\?[A-Za-z0-9\-._~!$&'()*+,;=:@/?%]*)?(#[A-Za-z0-9\-._~!$&'()*+,;=:@/?%]*)?$/;function kd(e){if(typeof e!="string")throw new Error("Incompatible value received: type");let t=Gm.exec(e);if(t===null)throw new Error("Incompatible value received");let r=t[1],n=t[2],i=t[3],s=t[4],a=t[5];return[r,n,i,s!==void 0?s.substring(1):null,a!==void 0?a.substring(1):null]}o(kd,"partsToUrlUnmapper");var _d=Object.assign;function Xs(e){let t=e||{},r=ar(t.size),n=t.authoritySettings!==void 0&&t.authoritySettings.size!==void 0?_t(t.authoritySettings.size,r):r,i=_d(_d({},t.authoritySettings),{size:n}),s=t.validSchemes||["http","https"],a=re(...s),u=Mn(i);return v(a,u,Pn({size:r}),t.withQueryParameters===!0?Ie(jn({size:r})):L(null),t.withFragments===!0?Ie(Nn({size:r})):L(null)).map(Ad,kd)}o(Xs,"webUrl");var Wi=class e{static{o(this,"CommandsIterable")}constructor(t,r){this.commands=t,this.metadataForReplay=r}[Symbol.iterator](){return this.commands[Symbol.iterator]()}[F](){return new e(this.commands.map(t=>t.clone()),this.metadataForReplay)}toString(){let t=this.commands.filter(n=>n.hasRan).map(n=>n.toString()).join(","),r=this.metadataForReplay();return r.length!==0?`${t} /*${r}*/`:t}};var Gi=class e{static{o(this,"CommandWrapper")}constructor(t){if(this.cmd=t,this.hasRan=!1,rr(t)){let r=t[ie];this[ie]=o(function(){return r.call(t)},"toStringMethod")}if(nr(t)){let r=t[fe];this[fe]=o(function(){return r.call(t)},"asyncToStringMethod")}}check(t){return this.cmd.check(t)}run(t,r){return this.hasRan=!0,this.cmd.run(t,r)}clone(){return se(this.cmd)?new e(this.cmd[F]()):new e(this.cmd)}toString(){return this.cmd.toString()}};var Rn=class{static{o(this,"ReplayPath")}static parse(t){let[r,n]=t.split(":"),i=this.parseCounts(r),s=this.parseChanges(n);return this.parseOccurences(i,s)}static stringify(t){let r=this.countOccurences(t),n=this.stringifyCounts(r),i=this.stringifyChanges(r);return`${n}:${i}`}static intToB64(t){return t<26?String.fromCharCode(t+65):t<52?String.fromCharCode(t+97-26):t<62?String.fromCharCode(t+48-52):String.fromCharCode(t===62?43:47)}static b64ToInt(t){return t>="a"?t.charCodeAt(0)-97+26:t>="A"?t.charCodeAt(0)-65:t>="0"?t.charCodeAt(0)-48+52:t==="+"?62:63}static countOccurences(t){return t.reduce((r,n)=>(r.length===0||r[r.length-1].count===64||r[r.length-1].value!==n?r.push({value:n,count:1}):r[r.length-1].count+=1,r),[])}static parseOccurences(t,r){let n=[];for(let i=0;i!==t.length;++i){let s=t[i],a=r[i];for(let u=0;u!==s;++u)n.push(a)}return n}static stringifyChanges(t){let r="";for(let n=0;n<t.length;n+=6){let i=t.slice(n,n+6).reduceRight((s,a)=>s*2+(a.value?1:0),0);r+=this.intToB64(i)}return r}static parseChanges(t){let r=t.split("").map(i=>this.b64ToInt(i)),n=[];for(let i=0;i!==r.length;++i){let s=r[i];for(let a=0;a!==6;++a,s>>=1)n.push(s%2===1)}return n}static stringifyCounts(t){return t.map(({count:r})=>this.intToB64(r-1)).join("")}static parseCounts(t){return t.split("").map(r=>this.b64ToInt(r)+1)}};var qi=class extends C{static{o(this,"CommandsArbitrary")}constructor(t,r,n,i,s){super(),this.sourceReplayPath=i,this.disableReplayLog=s,this.oneCommandArb=B(...t).map(a=>new Gi(a)),this.lengthArb=An(0,r,n),this.replayPath=[],this.replayPathPosition=0}metadataForReplay(){return this.disableReplayLog?"":`replayPath=${JSON.stringify(Rn.stringify(this.replayPath))}`}buildValueFor(t,r){let n=t.map(s=>s.value_),i={shrunkOnce:r,items:t};return new m(new Wi(n,()=>this.metadataForReplay()),i)}generate(t){let n=this.lengthArb.generate(t,void 0).value,i=Array(n);for(let s=0;s!==n;++s){let a=this.oneCommandArb.generate(t,void 0);i[s]=a}return this.replayPathPosition=0,this.buildValueFor(i,!1)}canShrinkWithoutContext(t){return!1}filterOnExecution(t){let r=[];for(let n of t)n.value_.hasRan?(this.replayPath.push(!0),r.push(n)):this.replayPath.push(!1);return r}filterOnReplay(t){return t.filter((r,n)=>{let i=this.replayPath[this.replayPathPosition+n];if(i===void 0)throw new Error("Too short replayPath");if(!i&&r.value_.hasRan)throw new Error("Mismatch between replayPath and real execution");return i})}filterForShrinkImpl(t){this.replayPathPosition===0&&(this.replayPath=this.sourceReplayPath!==null?Rn.parse(this.sourceReplayPath):[]);let r=this.replayPathPosition<this.replayPath.length?this.filterOnReplay(t):this.filterOnExecution(t);return this.replayPathPosition+=t.length,r}shrink(t,r){if(r===void 0)return S.nil();let n=r,i=n.shrunkOnce,s=n.items,a=this.filterForShrinkImpl(s);if(a.length===0)return S.nil();let u=i?S.nil():new S([[]][Symbol.iterator]()),c=[];for(let f=0;f!==a.length;++f)c.push(ye(()=>{let l=a.slice(0,f);return this.lengthArb.shrink(a.length-1-f,void 0).map(h=>l.concat(a.slice(a.length-(h.value+1))))}));for(let f=0;f!==a.length;++f)c.push(ye(()=>this.oneCommandArb.shrink(a[f].value_,a[f].context).map(l=>a.slice(0,f).concat([l],a.slice(f+1)))));return u.join(...c).map(f=>this.buildValueFor(f.map(l=>new m(l.value_.clone(),l.context)),!0))}};function ea(e,t={}){let{size:r,maxCommands:n=de,disableReplayLog:i=!1,replayPath:s=null}=t,a=t.maxCommands!==void 0,u=Ze(r,0,n,a);return new qi(e,u,n,s,i)}o(ea,"commands");var ta=class{static{o(this,"ScheduledCommand")}constructor(t,r){this.s=t,this.cmd=r}async check(t){let r=null,n=!1;if((await this.s.scheduleSequence([{label:`check@${this.cmd.toString()}`,builder:o(async()=>{try{n=await Promise.resolve(this.cmd.check(t))}catch(s){throw r=s,s}},"builder")}]).task).faulty)throw r;return n}async run(t,r){let n=null;if((await this.s.scheduleSequence([{label:`run@${this.cmd.toString()}`,builder:o(async()=>{try{await this.cmd.run(t,r)}catch(s){throw n=s,s}},"builder")}]).task).faulty)throw n}},Td=o(function*(e,t){for(let r of t)yield new ta(e,r)},"scheduleCommands");var Cd=o((e,t,r,n,i)=>e.then(s=>{let{model:a,real:u}=s,c=r;for(let f of t)c=i(c,()=>n(f,a,u));return c}),"genericModelRun"),qm=o((e,t)=>Cd({then:o(s=>{s(e())},"then")},t,void 0,o((s,a,u)=>{s.check(a)&&s.run(a,u)},"runSync"),o((s,a)=>a(),"then")),"internalModelRun"),Zm=o(e=>typeof e.then=="function","isAsyncSetup"),Ed=o(async(e,t,r=Promise.resolve())=>await Cd({then:o(a=>{let u=e();return Zm(u)?u.then(a):a(u)},"then")},t,r,o(async(a,u,c)=>{await a.check(u)&&await a.run(u,c)},"runAsync"),o((a,u)=>a.then(u),"then")),"internalAsyncModelRun");function ra(e,t){qm(e,t)}o(ra,"modelRun");async function na(e,t){await Ed(e,t)}o(na,"asyncModelRun");async function ia(e,t,r){let n=Td(e,r),i=Ed(t,n,e.schedule(Promise.resolve(),"startModel"));await e.waitFor(i),await e.waitAll()}o(ia,"scheduledModelRun");var Zi=o(e=>e(),"defaultSchedulerAct"),mr=class e{static{o(this,"SchedulerImplem")}constructor(t,r){this.act=t,this.taskSelector=r,this.lastTaskId=0,this.sourceTaskSelector=r.clone(),this.scheduledTasks=[],this.triggeredTasks=[],this.scheduledWatchers=[]}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 ${Af(t.outputValue)}`:""}`}log(t,r,n,i,s,a){this.triggeredTasks.push({status:s,schedulingType:t,taskId:r,label:n,metadata:i,outputValue:a!==void 0?$(a):void 0})}scheduleInternal(t,r,n,i,s,a){let u=null,c=++this.lastTaskId,f=new Promise((l,h)=>{u=o(()=>{(a?n.then(()=>a()):n).then(y=>(this.log(t,c,r,i,"resolved",y),l(y)),y=>(this.log(t,c,r,i,"rejected",y),h(y)))},"trigger")});return this.scheduledTasks.push({original:n,scheduled:f,trigger:u,schedulingType:t,taskId:c,label:r,metadata:i,customAct:s}),this.scheduledWatchers.length!==0&&this.scheduledWatchers[0](),f}schedule(t,r,n,i){return this.scheduleInternal("promise",r||"",t,n,i||Zi)}scheduleFunction(t,r){return(...n)=>this.scheduleInternal("function",`${t.name}(${n.map($).join(",")})`,t(...n),void 0,r||Zi)}scheduleSequence(t,r){let n={done:!1,faulty:!1},i={then:o(u=>u(),"then")},s=o(()=>{},"resolveSequenceTask"),a=new Promise(u=>s=u);return t.reduce((u,c)=>{let[f,l,h]=typeof c=="function"?[c,c.name,void 0]:[c.builder,c.label,c.metadata];return u.then(()=>{let y=this.scheduleInternal("sequence",l,i,h,r||Zi,()=>f());return y.catch(()=>{n.faulty=!0,s()}),y})},i).then(()=>{n.done=!0,s()},()=>{}),Object.assign(n,{task:Promise.resolve(a).then(()=>({done:n.done,faulty:n.faulty}))})}count(){return this.scheduledTasks.length}internalWaitOne(){if(this.scheduledTasks.length===0)throw new Error("No task scheduled");let t=this.taskSelector.nextTaskIndex(this.scheduledTasks),[r]=this.scheduledTasks.splice(t,1);return r.customAct(async()=>{r.trigger();try{await r.scheduled}catch{}})}async waitOne(t){let r=t||Zi;await this.act(()=>r(async()=>await this.internalWaitOne()))}async waitAll(t){for(;this.scheduledTasks.length>0;)await this.waitOne(t)}async waitFor(t,r){let n=!1,i=null,s=o(async()=>{for(;!n&&this.scheduledTasks.length>0;)await this.waitOne(r);i=null},"awaiter"),a=o(()=>{i===null&&(i=Promise.resolve().then(s))},"handleNotified"),u=o(()=>{let f=this.scheduledWatchers.indexOf(a);f!==-1&&this.scheduledWatchers.splice(f,1),f===0&&this.scheduledWatchers.length!==0&&this.scheduledWatchers[0]()},"clearAndReplaceWatcher"),c=t.then(f=>(n=!0,i===null?(u(),f):i.then(()=>(u(),f))),f=>{if(n=!0,i===null)throw u(),f;return i.then(()=>{throw u(),f})});return this.scheduledTasks.length>0&&this.scheduledWatchers.length===0&&a(),this.scheduledWatchers.push(a),c}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(e.buildLog).map(t=>`-> ${t}`).join(`
|
|
35
|
-
`)+"`"}[F](){return new e(this.act,this.sourceTaskSelector)}};function Md(e){let t=0;return{clone:o(()=>Md(e),"clone"),nextTaskIndex:o(r=>{if(e.length<=t)throw new Error("Invalid schedulerFor defined: too many tasks have been scheduled");let n=r.findIndex(i=>i.taskId===e[t]);if(n===-1)throw new Error("Invalid schedulerFor defined: unable to find next task");return++t,n},"nextTaskIndex")}}o(Md,"buildNextTaskIndex");function oa(e,t){return new mr(e,Md(t))}o(oa,"buildSchedulerFor");function Nd(e){let t=e.clone();return{clone:o(()=>Nd(t),"clone"),nextTaskIndex:o(r=>e.nextInt(0,r.length-1),"nextTaskIndex")}}o(Nd,"buildNextTaskIndex");var Hi=class extends C{static{o(this,"SchedulerArbitrary")}constructor(t){super(),this.act=t}generate(t,r){return new m(new mr(this.act,Nd(t.clone())),void 0)}canShrinkWithoutContext(t){return!1}shrink(t,r){return S.nil()}};function sa(e){let{act:t=o(r=>r(),"act")}=e||{};return new Hi(t)}o(sa,"scheduler");function aa(e,t){let{act:r=o(n=>n(),"act")}=Array.isArray(e)?t||{}:e||{};return Array.isArray(e)?oa(r,e):function(n,...i){return oa(r,i)}}o(aa,"schedulerFor");function ua(e={}){return X(e,w("-9223372036854775808"),w("9223372036854775807"),cu,He)}o(ua,"bigInt64Array");function ca(e={}){return X(e,w(0),w("18446744073709551615"),fu,He)}o(ca,"bigUint64Array");function Hm(e){return new Error(`Unsupported AST node! Received: ${$(e)}`)}o(Hm,"raiseUnsupportedASTNode");function Ji(e,t,r){if(!t&&!r)return e;let n={hasStart:!1,hasEnd:!1},i=Od(e,t,r,n),s=t&&!n.hasStart,a=r&&!n.hasEnd;if(!s&&!a)return i;let u=[];return s&&(u.push({type:"Assertion",kind:"^"}),u.push({type:"Repetition",quantifier:{type:"Quantifier",kind:"*",greedy:!0},expression:{type:"Char",kind:"meta",symbol:".",value:".",codePoint:Number.NaN}})),u.push(i),a&&(u.push({type:"Repetition",quantifier:{type:"Quantifier",kind:"*",greedy:!0},expression:{type:"Char",kind:"meta",symbol:".",value:".",codePoint:Number.NaN}}),u.push({type:"Assertion",kind:"$"})),{type:"Group",capturing:!1,expression:{type:"Alternative",expressions:u}}}o(Ji,"addMissingDotStarTraversalAddMissing");function Od(e,t,r,n){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 n.hasStart=!0,n.hasEnd=!0,Object.assign(Object.assign({},e),{expressions:e.expressions.map((i,s)=>Ji(i,t&&s===0,r&&s===e.expressions.length-1))});case"CharacterClass":return e;case"ClassRange":return e;case"Group":return Object.assign(Object.assign({},e),{expression:Od(e.expression,t,r,n)});case"Disjunction":return n.hasStart=!0,n.hasEnd=!0,Object.assign(Object.assign({},e),{left:e.left!==null?Ji(e.left,t,r):null,right:e.right!==null?Ji(e.right,t,r):null});case"Assertion":{if(e.kind==="^"||e.kind==="Lookahead")return n.hasStart=!0,e;if(e.kind==="$"||e.kind==="Lookbehind")return n.hasEnd=!0,e;throw new Error(`Assertions of kind ${e.kind} not implemented yet!`)}case"Backreference":return e;default:throw Hm(e)}}o(Od,"addMissingDotStarTraversal");function Pd(e){return Ji(e,!0,!0)}o(Pd,"addMissingDotStar");function jd(e,t){return e[t]>="\uD800"&&e[t]<="\uDBFF"&&e[t+1]>="\uDC00"&&e[t+1]<="\uDFFF"?2:1}o(jd,"charSizeAt");function H(e){return e>="0"&&e<="9"||e>="a"&&e<="f"||e>="A"&&e<="F"}o(H,"isHexaDigit");function fa(e){return e>="0"&&e<="9"}o(fa,"isDigit");function Rd(e,t){for(let r=t;r!==e.length;++r){let n=e[r];if(n==="\\")r+=1;else if(n==="]")return r}throw new Error("Missing closing ']'")}o(Rd,"squaredBracketBlockContentEndFrom");function Jm(e,t){let r=0;for(let n=t;n!==e.length;++n){let i=e[n];if(i==="\\")n+=1;else if(i===")"){if(r===0)return n;r-=1}else i==="["?n=Rd(e,n):i==="("&&(r+=1)}throw new Error("Missing closing ')'")}o(Jm,"parenthesisBlockContentEndFrom");function Km(e,t){let r=!1;for(let n=t;n!==e.length;++n){let i=e[n];if(!fa(i)){if(t===n)return-1;if(i===","){if(r)return-1;r=!0}else return i==="}"?n:-1}}return-1}o(Km,"curlyBracketBlockContentEndFrom");var Le;(function(e){e[e.Full=0]="Full",e[e.Character=1]="Character"})(Le||(Le={}));function Ym(e,t,r,n){switch(e[t]){case"[":return n===Le.Character?t+1:Rd(e,t+1)+1;case"{":{if(n===Le.Character)return t+1;let i=Km(e,t+1);return i===-1?t+1:i+1}case"(":return n===Le.Character?t+1:Jm(e,t+1)+1;case"]":case"}":case")":return t+1;case"\\":{let i=e[t+1];switch(i){case"x":if(H(e[t+2])&&H(e[t+3]))return t+4;throw new Error(`Unexpected token '${e.substring(t,t+4)}' found`);case"u":if(e[t+2]==="{"){if(!r)return t+2;if(e[t+4]==="}"){if(H(e[t+3]))return t+5;throw new Error(`Unexpected token '${e.substring(t,t+5)}' found`)}if(e[t+5]==="}"){if(H(e[t+3])&&H(e[t+4]))return t+6;throw new Error(`Unexpected token '${e.substring(t,t+6)}' found`)}if(e[t+6]==="}"){if(H(e[t+3])&&H(e[t+4])&&H(e[t+5]))return t+7;throw new Error(`Unexpected token '${e.substring(t,t+7)}' found`)}if(e[t+7]==="}"){if(H(e[t+3])&&H(e[t+4])&&H(e[t+5])&&H(e[t+6]))return t+8;throw new Error(`Unexpected token '${e.substring(t,t+8)}' found`)}if(e[t+8]==="}"&&H(e[t+3])&&H(e[t+4])&&H(e[t+5])&&H(e[t+6])&&H(e[t+7]))return t+9;throw new Error(`Unexpected token '${e.substring(t,t+9)}' found`)}if(H(e[t+2])&&H(e[t+3])&&H(e[t+4])&&H(e[t+5]))return t+6;throw new Error(`Unexpected token '${e.substring(t,t+6)}' found`);case"p":case"P":{if(!r)return t+2;let s=t+2;for(;s<e.length&&e[s]!=="}";s+=e[s]==="\\"?2:1);if(e[s]!=="}")throw new Error("Invalid \\P definition");return s+1}case"k":{let s=t+2;for(;s<e.length&&e[s]!==">";++s);if(e[s]!==">"){if(!r)return t+2;throw new Error("Invalid \\k definition")}return s+1}default:{if(fa(i)){let a=r?e.length:Math.min(t+4,e.length),u=t+2;for(;u<a&&fa(e[u]);++u);return u}let s=r?jd(e,t+1):1;return t+s+1}}}default:{let i=r?jd(e,t):1;return t+i}}}o(Ym,"blockEndFrom");function Fn(e,t,r,n){let i=Ym(e,t,r,n);return e.substring(t,i)}o(Fn,"readFrom");var da=String.fromCodePoint;function la(e){let t=e.pop();if(t===void 0)throw new Error("Unable to extract token preceeding the currently parsed one");return t}o(la,"safePop");function Fd(e){return e>="0"&&e<="9"}o(Fd,"isDigit");function Ki(e,t){return{type:"Char",kind:"simple",symbol:e,value:e,codePoint:e.codePointAt(0)||-1,escaped:t}}o(Ki,"simpleChar");function xr(e,t){return{type:"Char",kind:"meta",symbol:t,value:e,codePoint:t.codePointAt(0)||-1}}o(xr,"metaEscapedChar");function pt(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]}o(pt,"toSingleToken");function pa(e){if(e[0]==="\\"){let t=e[1];switch(t){case"x":{let r=e.substring(2),n=Number.parseInt(r,16);return{type:"Char",kind:"hex",symbol:da(n),value:e,codePoint:n}}case"u":{if(e==="\\u")return Ki("u",!0);let r=e[2]==="{"?e.substring(3,e.length-1):e.substring(2),n=Number.parseInt(r,16);return{type:"Char",kind:"unicode",symbol:da(n),value:e,codePoint:n}}case"0":return xr(e,"\0");case"n":return xr(e,`
|
|
36
|
-
`);case"f":return xr(e,"\f");case"r":return xr(e,"\r");case"t":return xr(e," ");case"v":return xr(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:Number.NaN};default:{if(Fd(t)){let n=e.substring(1),i=Number(n);return{type:"Char",kind:"decimal",symbol:da(i),value:e,codePoint:i}}if(e.length>2&&(t==="p"||t==="P"))throw new Error("UnicodeProperty not implemented yet!");let r=e.substring(1);return Ki(r,!0)}}}return Ki(e)}o(pa,"blockToCharToken");function gr(e,t,r,n){let i=null;for(let s=0,a=Fn(t,s,r,Le.Full);s!==t.length;s+=a.length,a=Fn(t,s,r,Le.Full)){let u=a[0];switch(u){case"|":{i===null&&(i=[]),i.push(pt(e.splice(0),!0)||null);break}case".":{e.push({type:"Char",kind:"meta",symbol:a,value:a,codePoint:Number.NaN});break}case"*":case"+":{let c=la(e);e.push({type:"Repetition",expression:c,quantifier:{type:"Quantifier",kind:u,greedy:!0}});break}case"?":{let c=la(e);c.type==="Repetition"?(c.quantifier.greedy=!1,e.push(c)):e.push({type:"Repetition",expression:c,quantifier:{type:"Quantifier",kind:u,greedy:!0}});break}case"{":{if(a==="{"){e.push(Ki(a));break}let c=la(e),l=a.substring(1,a.length-1).split(","),h=Number(l[0]),y=l.length===1?h:l[1].length!==0?Number(l[1]):void 0;e.push({type:"Repetition",expression:c,quantifier:{type:"Quantifier",kind:"Range",greedy:!0,from:h,to:y}});break}case"[":{let c=a.substring(1,a.length-1),f=[],l,h=!1;for(let y=0,P=Fn(c,y,r,Le.Character);y!==c.length;y+=P.length,P=Fn(c,y,r,Le.Character)){if(y===0&&P==="^"){l=!0;continue}let Z=pa(P);if(P==="-")f.push(Z),h=!0;else{let q=f.length>=2?f[f.length-2]:void 0;h&&q!==void 0&&q.type==="Char"?(f.pop(),f.pop(),f.push({type:"ClassRange",from:q,to:Z})):f.push(Z),h=!1}}e.push({type:"CharacterClass",expressions:f,negative:l});break}case"(":{let c=a.substring(1,a.length-1),f=[];if(c[0]==="?")if(c[1]===":")gr(f,c.substring(2),r,n),e.push({type:"Group",capturing:!1,expression:pt(f)});else if(c[1]==="="||c[1]==="!")gr(f,c.substring(2),r,n),e.push({type:"Assertion",kind:"Lookahead",negative:c[1]==="!"?!0:void 0,assertion:pt(f)});else if(c[1]==="<"&&(c[2]==="="||c[2]==="!"))gr(f,c.substring(3),r,n),e.push({type:"Assertion",kind:"Lookbehind",negative:c[2]==="!"?!0:void 0,assertion:pt(f)});else{let l=c.split(">");if(l.length<2||l[0][1]!=="<")throw new Error(`Unsupported regex content found at ${JSON.stringify(a)}`);let h=++n.lastIndex,y=l[0].substring(2);n.named.set(y,h),gr(f,l.slice(1).join(">"),r,n),e.push({type:"Group",capturing:!0,nameRaw:y,name:y,number:h,expression:pt(f)})}else{let l=++n.lastIndex;gr(f,c,r,n),e.push({type:"Group",capturing:!0,number:l,expression:pt(f)})}break}default:{if(a==="^")e.push({type:"Assertion",kind:a});else if(a==="$")e.push({type:"Assertion",kind:a});else if(a[0]==="\\"&&Fd(a[1])){let c=Number(a.substring(1));r||c<=n.lastIndex?e.push({type:"Backreference",kind:"number",number:c,reference:c}):e.push(pa(a))}else if(a[0]==="\\"&&a[1]==="k"&&a.length!==2){let c=a.substring(3,a.length-1);e.push({type:"Backreference",kind:"name",number:n.named.get(c)||0,referenceRaw:c,reference:c})}else e.push(pa(a));break}}}if(i!==null){i.push(pt(e.splice(0),!0)||null);let s={type:"Disjunction",left:i[0],right:i[1]};for(let a=2;a<i.length;++a)s={type:"Disjunction",left:s,right:i[a]};e.push(s)}}o(gr,"pushTokens");function Ud(e){let t=ue([...e.flags],"u")!==-1,r=e.source,n=[];return gr(n,r,t,{lastIndex:0,named:new Map}),pt(n)}o(Ud,"tokenizeRegex");var Qm=String.fromCodePoint,Vd=[..."abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"],$d=[..."0123456789"],Dd=[...` \r
|
|
37
|
-
\v\f`],ha=[...`\r
|
|
38
|
-
`],Bd=[...""],Xm=[...ha,...Bd],jt=Gr();function Ld(e){return new A(`Unsupported AST node! Received: ${$(e)}`)}o(Ld,"raiseUnsupportedASTNode");function ht(e,t,r){switch(e.type){case"Char":{if(e.kind==="meta")switch(e.value){case"\\w":return re(...Vd);case"\\W":return jt.filter(n=>ue(Vd,n)===-1);case"\\d":return re(...$d);case"\\D":return jt.filter(n=>ue($d,n)===-1);case"\\s":return re(...Dd);case"\\S":return jt.filter(n=>ue(Dd,n)===-1);case"\\b":case"\\B":throw new A(`Meta character ${e.value} not implemented yet!`);case".":{let n=r.dotAll?Bd:Xm;return jt.filter(i=>ue(n,i)===-1)}}if(e.symbol===void 0)throw new A(`Unexpected undefined symbol received for non-meta Char! Received: ${$(e)}`);return L(e.symbol)}case"Repetition":{let n=ht(e.expression,t,r);switch(e.quantifier.kind){case"*":return De(n,t);case"+":return De(n,Object.assign(Object.assign({},t),{minLength:1}));case"?":return De(n,Object.assign(Object.assign({},t),{minLength:0,maxLength:1}));case"Range":return De(n,Object.assign(Object.assign({},t),{minLength:e.quantifier.from,maxLength:e.quantifier.to}));default:throw Ld(e.quantifier)}}case"Quantifier":throw new A("Wrongly defined AST tree, Quantifier nodes not supposed to be scanned!");case"Alternative":return v(...E(e.expressions,n=>ht(n,t,r))).map(n=>N(n,""));case"CharacterClass":if(e.negative){let n=E(e.expressions,i=>ht(i,t,r));return jt.filter(i=>qn(n,s=>!s.canShrinkWithoutContext(i)))}return B(...E(e.expressions,n=>ht(n,t,r)));case"ClassRange":{let n=e.from.codePoint,i=e.to.codePoint;return M({min:n,max:i}).map(s=>Qm(s),s=>{if(typeof s!="string")throw new A("Invalid type");if([...s].length!==1)throw new A("Invalid length");return Re(s,0)})}case"Group":return ht(e.expression,t,r);case"Disjunction":{let n=e.left!==null?ht(e.left,t,r):L(""),i=e.right!==null?ht(e.right,t,r):L("");return B(n,i)}case"Assertion":{if(e.kind==="^"||e.kind==="$")return r.multiline?e.kind==="^"?B(L(""),v(De(jt),re(...ha)).map(n=>`${n[0]}${n[1]}`,n=>{if(typeof n!="string"||n.length===0)throw new A("Invalid type");return[V(n,0,n.length-1),n[n.length-1]]})):B(L(""),v(re(...ha),De(jt)).map(n=>`${n[0]}${n[1]}`,n=>{if(typeof n!="string"||n.length===0)throw new A("Invalid type");return[n[0],V(n,1)]})):L("");throw new A(`Assertions of kind ${e.kind} not implemented yet!`)}case"Backreference":throw new A("Backreference nodes not implemented yet!");default:throw Ld(e)}}o(ht,"toMatchingArbitrary");function ma(e,t={}){for(let s of e.flags)if(s!=="d"&&s!=="g"&&s!=="m"&&s!=="s"&&s!=="u")throw new A(`Unable to use "stringMatching" against a regex using the flag ${s}`);let r={size:t.size},n={multiline:e.multiline,dotAll:e.dotAll},i=Pd(Ud(e));return ht(i,r,n)}o(ma,"stringMatching");function ex(e){let t=[];for(let r=0;r!==e.length;++r)t.push(e[r].next());return t}o(ex,"initZippedValues");function tx(e,t){for(let r=0;r!==e.length;++r)t[r]=e[r].next()}o(tx,"nextZippedValues");function rx(e){for(let t=0;t!==e.length;++t)if(e[t].done)return!0;return!1}o(rx,"isDoneZippedValues");function*zd(...e){let t=ex(e);for(;!rx(t);)yield t.map(r=>r.value),tx(e,t)}o(zd,"zipIterableIterators");function*nx(e){let t=e;for(;;)yield t,++t}o(nx,"iotaFrom");var Yi=class extends C{static{o(this,"LimitedShrinkArbitrary")}constructor(t,r){super(),this.arb=t,this.maxShrinks=r}generate(t,r){let n=this.arb.generate(t,r);return this.valueMapper(n,0)}canShrinkWithoutContext(t){return this.arb.canShrinkWithoutContext(t)}shrink(t,r){return this.isSafeContext(r)?this.safeShrink(t,r.originalContext,r.length):this.safeShrink(t,void 0,0)}safeShrink(t,r,n){let i=this.maxShrinks-n;return i<=0?S.nil():new S(zd(this.arb.shrink(t,r),nx(n+1))).take(i).map(s=>this.valueMapper(s[0],s[1]))}valueMapper(t,r){let n={originalContext:t.context,length:r};return new m(t.value,n)}isSafeContext(t){return t!=null&&typeof t=="object"&&"originalContext"in t&&"length"in t}};function xa(e,t){return new Yi(e,t)}o(xa,"limitShrink");var Wd="module",Gd="3.23.2",qd="a4a600eaa08c833707067a877db144289a724b91";var ix=ga;var D={};Dn(D,{BRAND:()=>Mx,DIRTY:()=>Rt,EMPTY_PATH:()=>ux,INVALID:()=>_,NEVER:()=>h1,OK:()=>ne,ParseStatus:()=>ee,Schema:()=>j,ZodAny:()=>gt,ZodArray:()=>rt,ZodBigInt:()=>Ut,ZodBoolean:()=>Vt,ZodBranded:()=>Vn,ZodCatch:()=>Jt,ZodDate:()=>$t,ZodDefault:()=>Ht,ZodDiscriminatedUnion:()=>eo,ZodEffects:()=>Ee,ZodEnum:()=>qt,ZodError:()=>xe,ZodFirstPartyTypeKind:()=>T,ZodFunction:()=>ro,ZodIntersection:()=>zt,ZodIssueCode:()=>p,ZodLazy:()=>Wt,ZodLiteral:()=>Gt,ZodMap:()=>Ir,ZodNaN:()=>kr,ZodNativeEnum:()=>Zt,ZodNever:()=>Oe,ZodNull:()=>Lt,ZodNullable:()=>We,ZodNumber:()=>Ft,ZodObject:()=>ge,ZodOptional:()=>Te,ZodParsedType:()=>b,ZodPipeline:()=>$n,ZodPromise:()=>bt,ZodReadonly:()=>Kt,ZodRecord:()=>to,ZodSchema:()=>j,ZodSet:()=>Ar,ZodString:()=>xt,ZodSymbol:()=>Sr,ZodTransformer:()=>Ee,ZodTuple:()=>ze,ZodType:()=>j,ZodUndefined:()=>Dt,ZodUnion:()=>Bt,ZodUnknown:()=>tt,ZodVoid:()=>vr,addIssueToContext:()=>x,any:()=>$x,array:()=>zx,bigint:()=>jx,boolean:()=>nl,coerce:()=>p1,custom:()=>el,date:()=>Rx,datetimeRegex:()=>Qd,defaultErrorMap:()=>Xe,discriminatedUnion:()=>Zx,effect:()=>o1,enum:()=>r1,function:()=>Xx,getErrorMap:()=>br,getParsedType:()=>Be,instanceof:()=>Ox,intersection:()=>Hx,isAborted:()=>Qi,isAsync:()=>yr,isDirty:()=>Xi,isValid:()=>mt,late:()=>Nx,lazy:()=>e1,literal:()=>t1,makeIssue:()=>Un,map:()=>Yx,nan:()=>Px,nativeEnum:()=>n1,never:()=>Lx,null:()=>Vx,nullable:()=>a1,number:()=>rl,object:()=>Wx,objectUtil:()=>ba,oboolean:()=>l1,onumber:()=>d1,optional:()=>s1,ostring:()=>f1,pipeline:()=>c1,preprocess:()=>u1,promise:()=>i1,quotelessJson:()=>ox,record:()=>Kx,set:()=>Qx,setErrorMap:()=>ax,strictObject:()=>Gx,string:()=>tl,symbol:()=>Fx,transformer:()=>o1,tuple:()=>Jx,undefined:()=>Ux,union:()=>qx,unknown:()=>Dx,util:()=>R,void:()=>Bx});var R;(function(e){e.assertEqual=i=>{};function t(i){}o(t,"assertIs"),e.assertIs=t;function r(i){throw new Error}o(r,"assertNever"),e.assertNever=r,e.arrayToEnum=i=>{let s={};for(let a of i)s[a]=a;return s},e.getValidEnumValues=i=>{let s=e.objectKeys(i).filter(u=>typeof i[i[u]]!="number"),a={};for(let u of s)a[u]=i[u];return e.objectValues(a)},e.objectValues=i=>e.objectKeys(i).map(function(s){return i[s]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let s=[];for(let a in i)Object.prototype.hasOwnProperty.call(i,a)&&s.push(a);return s},e.find=(i,s)=>{for(let a of i)if(s(a))return a},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function n(i,s=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(s)}o(n,"joinValues"),e.joinValues=n,e.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(R||(R={}));var ba;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(ba||(ba={}));var b=R.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Be=o(e=>{switch(typeof e){case"undefined":return b.undefined;case"string":return b.string;case"number":return Number.isNaN(e)?b.nan:b.number;case"boolean":return b.boolean;case"function":return b.function;case"bigint":return b.bigint;case"symbol":return b.symbol;case"object":return Array.isArray(e)?b.array:e===null?b.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?b.promise:typeof Map<"u"&&e instanceof Map?b.map:typeof Set<"u"&&e instanceof Set?b.set:typeof Date<"u"&&e instanceof Date?b.date:b.object;default:return b.unknown}},"getParsedType");var p=R.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),ox=o(e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),"quotelessJson"),xe=class e extends Error{static{o(this,"ZodError")}get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(s){return s.message},n={_errors:[]},i=o(s=>{for(let a of s.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)n._errors.push(r(a));else{let u=n,c=0;for(;c<a.path.length;){let f=a.path[c];c===a.path.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(r(a))):u[f]=u[f]||{_errors:[]},u=u[f],c++}}},"processError");return i(this),n}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,R.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},n=[];for(let i of this.issues)if(i.path.length>0){let s=i.path[0];r[s]=r[s]||[],r[s].push(t(i))}else n.push(t(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};xe.create=e=>new xe(e);var sx=o((e,t)=>{let r;switch(e.code){case p.invalid_type:e.received===b.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case p.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,R.jsonStringifyReplacer)}`;break;case p.unrecognized_keys:r=`Unrecognized key(s) in object: ${R.joinValues(e.keys,", ")}`;break;case p.invalid_union:r="Invalid input";break;case p.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${R.joinValues(e.options)}`;break;case p.invalid_enum_value:r=`Invalid enum value. Expected ${R.joinValues(e.options)}, received '${e.received}'`;break;case p.invalid_arguments:r="Invalid function arguments";break;case p.invalid_return_type:r="Invalid function return type";break;case p.invalid_date:r="Invalid date";break;case p.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:R.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case p.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case p.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case p.custom:r="Invalid input";break;case p.invalid_intersection_types:r="Intersection results could not be merged";break;case p.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case p.not_finite:r="Number must be finite";break;default:r=t.defaultError,R.assertNever(e)}return{message:r}},"errorMap"),Xe=sx;var Zd=Xe;function ax(e){Zd=e}o(ax,"setErrorMap");function br(){return Zd}o(br,"getErrorMap");var Un=o(e=>{let{data:t,path:r,errorMaps:n,issueData:i}=e,s=[...r,...i.path||[]],a={...i,path:s};if(i.message!==void 0)return{...i,path:s,message:i.message};let u="",c=n.filter(f=>!!f).slice().reverse();for(let f of c)u=f(a,{data:t,defaultError:u}).message;return{...i,path:s,message:u}},"makeIssue"),ux=[];function x(e,t){let r=br(),n=Un({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Xe?void 0:Xe].filter(i=>!!i)});e.common.issues.push(n)}o(x,"addIssueToContext");var ee=class e{static{o(this,"ParseStatus")}constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let i of r){if(i.status==="aborted")return _;i.status==="dirty"&&t.dirty(),n.push(i.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let i of r){let s=await i.key,a=await i.value;n.push({key:s,value:a})}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let i of r){let{key:s,value:a}=i;if(s.status==="aborted"||a.status==="aborted")return _;s.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(n[s.value]=a.value)}return{status:t.value,value:n}}},_=Object.freeze({status:"aborted"}),Rt=o(e=>({status:"dirty",value:e}),"DIRTY"),ne=o(e=>({status:"valid",value:e}),"OK"),Qi=o(e=>e.status==="aborted","isAborted"),Xi=o(e=>e.status==="dirty","isDirty"),mt=o(e=>e.status==="valid","isValid"),yr=o(e=>typeof Promise<"u"&&e instanceof Promise,"isAsync");var I;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(I||(I={}));var Ce=class{static{o(this,"ParseInputLazyPath")}constructor(t,r,n,i){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Hd=o((e,t)=>{if(mt(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new xe(e.common.issues);return this._error=r,this._error}}},"handleResult");function O(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:o((a,u)=>{let{message:c}=e;return a.code==="invalid_enum_value"?{message:c??u.defaultError}:typeof u.data>"u"?{message:c??n??u.defaultError}:a.code!=="invalid_type"?{message:u.defaultError}:{message:c??r??u.defaultError}},"customMap"),description:i}}o(O,"processCreateParams");var j=class{static{o(this,"ZodType")}get description(){return this._def.description}_getType(t){return Be(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:Be(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ee,ctx:{common:t.parent.common,data:t.data,parsedType:Be(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(yr(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Be(t)},i=this._parseSync({data:t,path:n.path,parent:n});return Hd(n,i)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Be(t)};if(!this["~standard"].async)try{let n=this._parseSync({data:t,path:[],parent:r});return mt(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(n=>mt(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Be(t)},i=this._parse({data:t,path:n.path,parent:n}),s=await(yr(i)?i:Promise.resolve(i));return Hd(n,s)}refine(t,r){let n=o(i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r,"getIssueProperties");return this._refinement((i,s)=>{let a=t(i),u=o(()=>s.addIssue({code:p.custom,...n(i)}),"setError");return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(u(),!1)):a?!0:(u(),!1)})}refinement(t,r){return this._refinement((n,i)=>t(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(t){return new Ee({schema:this,typeName:T.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:o(r=>this["~validate"](r),"validate")}}optional(){return Te.create(this,this._def)}nullable(){return We.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return rt.create(this)}promise(){return bt.create(this,this._def)}or(t){return Bt.create([this,t],this._def)}and(t){return zt.create(this,t,this._def)}transform(t){return new Ee({...O(this._def),schema:this,typeName:T.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new Ht({...O(this._def),innerType:this,defaultValue:r,typeName:T.ZodDefault})}brand(){return new Vn({typeName:T.ZodBranded,type:this,...O(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new Jt({...O(this._def),innerType:this,catchValue:r,typeName:T.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return $n.create(this,t)}readonly(){return Kt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},cx=/^c[^\s-]{8,}$/i,fx=/^[0-9a-z]+$/,dx=/^[0-9A-HJKMNP-TV-Z]{26}$/i,lx=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,px=/^[a-z0-9_-]{21}$/i,hx=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,mx=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,xx=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,gx="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",ya,bx=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,yx=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,wx=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Sx=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,vx=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ix=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Kd="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Ax=new RegExp(`^${Kd}$`);function Yd(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}o(Yd,"timeRegexSource");function kx(e){return new RegExp(`^${Yd(e)}$`)}o(kx,"timeRegex");function Qd(e){let t=`${Kd}T${Yd(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}o(Qd,"datetimeRegex");function _x(e,t){return!!((t==="v4"||!t)&&bx.test(e)||(t==="v6"||!t)&&wx.test(e))}o(_x,"isValidIP");function Tx(e,t){if(!hx.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),i=JSON.parse(atob(n));return!(typeof i!="object"||i===null||"typ"in i&&i?.typ!=="JWT"||!i.alg||t&&i.alg!==t)}catch{return!1}}o(Tx,"isValidJWT");function Cx(e,t){return!!((t==="v4"||!t)&&yx.test(e)||(t==="v6"||!t)&&Sx.test(e))}o(Cx,"isValidCidr");var xt=class e extends j{static{o(this,"ZodString")}_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==b.string){let s=this._getOrReturnCtx(t);return x(s,{code:p.invalid_type,expected:b.string,received:s.parsedType}),_}let n=new ee,i;for(let s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(i=this._getOrReturnCtx(t,i),x(i,{code:p.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")t.data.length>s.value&&(i=this._getOrReturnCtx(t,i),x(i,{code:p.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){let a=t.data.length>s.value,u=t.data.length<s.value;(a||u)&&(i=this._getOrReturnCtx(t,i),a?x(i,{code:p.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):u&&x(i,{code:p.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")xx.test(t.data)||(i=this._getOrReturnCtx(t,i),x(i,{validation:"email",code:p.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")ya||(ya=new RegExp(gx,"u")),ya.test(t.data)||(i=this._getOrReturnCtx(t,i),x(i,{validation:"emoji",code:p.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")lx.test(t.data)||(i=this._getOrReturnCtx(t,i),x(i,{validation:"uuid",code:p.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")px.test(t.data)||(i=this._getOrReturnCtx(t,i),x(i,{validation:"nanoid",code:p.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")cx.test(t.data)||(i=this._getOrReturnCtx(t,i),x(i,{validation:"cuid",code:p.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")fx.test(t.data)||(i=this._getOrReturnCtx(t,i),x(i,{validation:"cuid2",code:p.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")dx.test(t.data)||(i=this._getOrReturnCtx(t,i),x(i,{validation:"ulid",code:p.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),x(i,{validation:"url",code:p.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),x(i,{validation:"regex",code:p.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(t,i),x(i,{code:p.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(i=this._getOrReturnCtx(t,i),x(i,{code:p.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(i=this._getOrReturnCtx(t,i),x(i,{code:p.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?Qd(s).test(t.data)||(i=this._getOrReturnCtx(t,i),x(i,{code:p.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?Ax.test(t.data)||(i=this._getOrReturnCtx(t,i),x(i,{code:p.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?kx(s).test(t.data)||(i=this._getOrReturnCtx(t,i),x(i,{code:p.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?mx.test(t.data)||(i=this._getOrReturnCtx(t,i),x(i,{validation:"duration",code:p.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?_x(t.data,s.version)||(i=this._getOrReturnCtx(t,i),x(i,{validation:"ip",code:p.invalid_string,message:s.message}),n.dirty()):s.kind==="jwt"?Tx(t.data,s.alg)||(i=this._getOrReturnCtx(t,i),x(i,{validation:"jwt",code:p.invalid_string,message:s.message}),n.dirty()):s.kind==="cidr"?Cx(t.data,s.version)||(i=this._getOrReturnCtx(t,i),x(i,{validation:"cidr",code:p.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?vx.test(t.data)||(i=this._getOrReturnCtx(t,i),x(i,{validation:"base64",code:p.invalid_string,message:s.message}),n.dirty()):s.kind==="base64url"?Ix.test(t.data)||(i=this._getOrReturnCtx(t,i),x(i,{validation:"base64url",code:p.invalid_string,message:s.message}),n.dirty()):R.assertNever(s);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(i=>t.test(i),{validation:r,code:p.invalid_string,...I.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...I.errToObj(t)})}url(t){return this._addCheck({kind:"url",...I.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...I.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...I.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...I.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...I.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...I.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...I.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...I.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...I.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...I.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...I.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...I.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...I.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...I.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...I.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...I.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...I.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...I.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...I.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...I.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...I.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...I.errToObj(r)})}nonempty(t){return this.min(1,I.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};xt.create=e=>new xt({checks:[],typeName:T.ZodString,coerce:e?.coerce??!1,...O(e)});function Ex(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n,s=Number.parseInt(e.toFixed(i).replace(".","")),a=Number.parseInt(t.toFixed(i).replace(".",""));return s%a/10**i}o(Ex,"floatSafeRemainder");var Ft=class e extends j{static{o(this,"ZodNumber")}constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==b.number){let s=this._getOrReturnCtx(t);return x(s,{code:p.invalid_type,expected:b.number,received:s.parsedType}),_}let n,i=new ee;for(let s of this._def.checks)s.kind==="int"?R.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),x(n,{code:p.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(n=this._getOrReturnCtx(t,n),x(n,{code:p.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(n=this._getOrReturnCtx(t,n),x(n,{code:p.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?Ex(t.data,s.value)!==0&&(n=this._getOrReturnCtx(t,n),x(n,{code:p.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),x(n,{code:p.not_finite,message:s.message}),i.dirty()):R.assertNever(s);return{status:i.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,I.toString(r))}gt(t,r){return this.setLimit("min",t,!1,I.toString(r))}lte(t,r){return this.setLimit("max",t,!0,I.toString(r))}lt(t,r){return this.setLimit("max",t,!1,I.toString(r))}setLimit(t,r,n,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:I.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:I.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:I.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:I.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:I.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:I.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:I.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:I.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:I.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:I.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&R.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}};Ft.create=e=>new Ft({checks:[],typeName:T.ZodNumber,coerce:e?.coerce||!1,...O(e)});var Ut=class e extends j{static{o(this,"ZodBigInt")}constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==b.bigint)return this._getInvalidInput(t);let n,i=new ee;for(let s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(n=this._getOrReturnCtx(t,n),x(n,{code:p.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(n=this._getOrReturnCtx(t,n),x(n,{code:p.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),x(n,{code:p.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):R.assertNever(s);return{status:i.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return x(r,{code:p.invalid_type,expected:b.bigint,received:r.parsedType}),_}gte(t,r){return this.setLimit("min",t,!0,I.toString(r))}gt(t,r){return this.setLimit("min",t,!1,I.toString(r))}lte(t,r){return this.setLimit("max",t,!0,I.toString(r))}lt(t,r){return this.setLimit("max",t,!1,I.toString(r))}setLimit(t,r,n,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:I.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:I.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:I.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:I.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:I.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:I.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Ut.create=e=>new Ut({checks:[],typeName:T.ZodBigInt,coerce:e?.coerce??!1,...O(e)});var Vt=class extends j{static{o(this,"ZodBoolean")}_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==b.boolean){let n=this._getOrReturnCtx(t);return x(n,{code:p.invalid_type,expected:b.boolean,received:n.parsedType}),_}return ne(t.data)}};Vt.create=e=>new Vt({typeName:T.ZodBoolean,coerce:e?.coerce||!1,...O(e)});var $t=class e extends j{static{o(this,"ZodDate")}_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==b.date){let s=this._getOrReturnCtx(t);return x(s,{code:p.invalid_type,expected:b.date,received:s.parsedType}),_}if(Number.isNaN(t.data.getTime())){let s=this._getOrReturnCtx(t);return x(s,{code:p.invalid_date}),_}let n=new ee,i;for(let s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(i=this._getOrReturnCtx(t,i),x(i,{code:p.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(i=this._getOrReturnCtx(t,i),x(i,{code:p.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):R.assertNever(s);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:I.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:I.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};$t.create=e=>new $t({checks:[],coerce:e?.coerce||!1,typeName:T.ZodDate,...O(e)});var Sr=class extends j{static{o(this,"ZodSymbol")}_parse(t){if(this._getType(t)!==b.symbol){let n=this._getOrReturnCtx(t);return x(n,{code:p.invalid_type,expected:b.symbol,received:n.parsedType}),_}return ne(t.data)}};Sr.create=e=>new Sr({typeName:T.ZodSymbol,...O(e)});var Dt=class extends j{static{o(this,"ZodUndefined")}_parse(t){if(this._getType(t)!==b.undefined){let n=this._getOrReturnCtx(t);return x(n,{code:p.invalid_type,expected:b.undefined,received:n.parsedType}),_}return ne(t.data)}};Dt.create=e=>new Dt({typeName:T.ZodUndefined,...O(e)});var Lt=class extends j{static{o(this,"ZodNull")}_parse(t){if(this._getType(t)!==b.null){let n=this._getOrReturnCtx(t);return x(n,{code:p.invalid_type,expected:b.null,received:n.parsedType}),_}return ne(t.data)}};Lt.create=e=>new Lt({typeName:T.ZodNull,...O(e)});var gt=class extends j{static{o(this,"ZodAny")}constructor(){super(...arguments),this._any=!0}_parse(t){return ne(t.data)}};gt.create=e=>new gt({typeName:T.ZodAny,...O(e)});var tt=class extends j{static{o(this,"ZodUnknown")}constructor(){super(...arguments),this._unknown=!0}_parse(t){return ne(t.data)}};tt.create=e=>new tt({typeName:T.ZodUnknown,...O(e)});var Oe=class extends j{static{o(this,"ZodNever")}_parse(t){let r=this._getOrReturnCtx(t);return x(r,{code:p.invalid_type,expected:b.never,received:r.parsedType}),_}};Oe.create=e=>new Oe({typeName:T.ZodNever,...O(e)});var vr=class extends j{static{o(this,"ZodVoid")}_parse(t){if(this._getType(t)!==b.undefined){let n=this._getOrReturnCtx(t);return x(n,{code:p.invalid_type,expected:b.void,received:n.parsedType}),_}return ne(t.data)}};vr.create=e=>new vr({typeName:T.ZodVoid,...O(e)});var rt=class e extends j{static{o(this,"ZodArray")}_parse(t){let{ctx:r,status:n}=this._processInputParams(t),i=this._def;if(r.parsedType!==b.array)return x(r,{code:p.invalid_type,expected:b.array,received:r.parsedType}),_;if(i.exactLength!==null){let a=r.data.length>i.exactLength.value,u=r.data.length<i.exactLength.value;(a||u)&&(x(r,{code:a?p.too_big:p.too_small,minimum:u?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(x(r,{code:p.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(x(r,{code:p.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((a,u)=>i.type._parseAsync(new Ce(r,a,r.path,u)))).then(a=>ee.mergeArray(n,a));let s=[...r.data].map((a,u)=>i.type._parseSync(new Ce(r,a,r.path,u)));return ee.mergeArray(n,s)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:I.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:I.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:I.toString(r)}})}nonempty(t){return this.min(1,t)}};rt.create=(e,t)=>new rt({type:e,minLength:null,maxLength:null,exactLength:null,typeName:T.ZodArray,...O(t)});function wr(e){if(e instanceof ge){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=Te.create(wr(n))}return new ge({...e._def,shape:o(()=>t,"shape")})}else return e instanceof rt?new rt({...e._def,type:wr(e.element)}):e instanceof Te?Te.create(wr(e.unwrap())):e instanceof We?We.create(wr(e.unwrap())):e instanceof ze?ze.create(e.items.map(t=>wr(t))):e}o(wr,"deepPartialify");var ge=class e extends j{static{o(this,"ZodObject")}constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=R.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==b.object){let f=this._getOrReturnCtx(t);return x(f,{code:p.invalid_type,expected:b.object,received:f.parsedType}),_}let{status:n,ctx:i}=this._processInputParams(t),{shape:s,keys:a}=this._getCached(),u=[];if(!(this._def.catchall instanceof Oe&&this._def.unknownKeys==="strip"))for(let f in i.data)a.includes(f)||u.push(f);let c=[];for(let f of a){let l=s[f],h=i.data[f];c.push({key:{status:"valid",value:f},value:l._parse(new Ce(i,h,i.path,f)),alwaysSet:f in i.data})}if(this._def.catchall instanceof Oe){let f=this._def.unknownKeys;if(f==="passthrough")for(let l of u)c.push({key:{status:"valid",value:l},value:{status:"valid",value:i.data[l]}});else if(f==="strict")u.length>0&&(x(i,{code:p.unrecognized_keys,keys:u}),n.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let f=this._def.catchall;for(let l of u){let h=i.data[l];c.push({key:{status:"valid",value:l},value:f._parse(new Ce(i,h,i.path,l)),alwaysSet:l in i.data})}}return i.common.async?Promise.resolve().then(async()=>{let f=[];for(let l of c){let h=await l.key,y=await l.value;f.push({key:h,value:y,alwaysSet:l.alwaysSet})}return f}).then(f=>ee.mergeObjectSync(n,f)):ee.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return I.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:o((r,n)=>{let i=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:I.errToObj(t).message??i}:{message:i}},"errorMap")}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:o(()=>({...this._def.shape(),...t}),"shape")})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:o(()=>({...this._def.shape(),...t._def.shape()}),"shape"),typeName:T.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let n of R.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new e({...this._def,shape:o(()=>r,"shape")})}omit(t){let r={};for(let n of R.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new e({...this._def,shape:o(()=>r,"shape")})}deepPartial(){return wr(this)}partial(t){let r={};for(let n of R.objectKeys(this.shape)){let i=this.shape[n];t&&!t[n]?r[n]=i:r[n]=i.optional()}return new e({...this._def,shape:o(()=>r,"shape")})}required(t){let r={};for(let n of R.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof Te;)s=s._def.innerType;r[n]=s}return new e({...this._def,shape:o(()=>r,"shape")})}keyof(){return Xd(R.objectKeys(this.shape))}};ge.create=(e,t)=>new ge({shape:o(()=>e,"shape"),unknownKeys:"strip",catchall:Oe.create(),typeName:T.ZodObject,...O(t)});ge.strictCreate=(e,t)=>new ge({shape:o(()=>e,"shape"),unknownKeys:"strict",catchall:Oe.create(),typeName:T.ZodObject,...O(t)});ge.lazycreate=(e,t)=>new ge({shape:e,unknownKeys:"strip",catchall:Oe.create(),typeName:T.ZodObject,...O(t)});var Bt=class extends j{static{o(this,"ZodUnion")}_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function i(s){for(let u of s)if(u.result.status==="valid")return u.result;for(let u of s)if(u.result.status==="dirty")return r.common.issues.push(...u.ctx.common.issues),u.result;let a=s.map(u=>new xe(u.ctx.common.issues));return x(r,{code:p.invalid_union,unionErrors:a}),_}if(o(i,"handleResults"),r.common.async)return Promise.all(n.map(async s=>{let a={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(i);{let s,a=[];for(let c of n){let f={...r,common:{...r.common,issues:[]},parent:null},l=c._parseSync({data:r.data,path:r.path,parent:f});if(l.status==="valid")return l;l.status==="dirty"&&!s&&(s={result:l,ctx:f}),f.common.issues.length&&a.push(f.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;let u=a.map(c=>new xe(c));return x(r,{code:p.invalid_union,unionErrors:u}),_}}get options(){return this._def.options}};Bt.create=(e,t)=>new Bt({options:e,typeName:T.ZodUnion,...O(t)});var et=o(e=>e instanceof Wt?et(e.schema):e instanceof Ee?et(e.innerType()):e instanceof Gt?[e.value]:e instanceof qt?e.options:e instanceof Zt?R.objectValues(e.enum):e instanceof Ht?et(e._def.innerType):e instanceof Dt?[void 0]:e instanceof Lt?[null]:e instanceof Te?[void 0,...et(e.unwrap())]:e instanceof We?[null,...et(e.unwrap())]:e instanceof Vn||e instanceof Kt?et(e.unwrap()):e instanceof Jt?et(e._def.innerType):[],"getDiscriminator"),eo=class e extends j{static{o(this,"ZodDiscriminatedUnion")}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==b.object)return x(r,{code:p.invalid_type,expected:b.object,received:r.parsedType}),_;let n=this.discriminator,i=r.data[n],s=this.optionsMap.get(i);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(x(r,{code:p.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),_)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let i=new Map;for(let s of r){let a=et(s.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let u of a){if(i.has(u))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(u)}`);i.set(u,s)}}return new e({typeName:T.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:i,...O(n)})}};function wa(e,t){let r=Be(e),n=Be(t);if(e===t)return{valid:!0,data:e};if(r===b.object&&n===b.object){let i=R.objectKeys(t),s=R.objectKeys(e).filter(u=>i.indexOf(u)!==-1),a={...e,...t};for(let u of s){let c=wa(e[u],t[u]);if(!c.valid)return{valid:!1};a[u]=c.data}return{valid:!0,data:a}}else if(r===b.array&&n===b.array){if(e.length!==t.length)return{valid:!1};let i=[];for(let s=0;s<e.length;s++){let a=e[s],u=t[s],c=wa(a,u);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return r===b.date&&n===b.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}o(wa,"mergeValues");var zt=class extends j{static{o(this,"ZodIntersection")}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),i=o((s,a)=>{if(Qi(s)||Qi(a))return _;let u=wa(s.value,a.value);return u.valid?((Xi(s)||Xi(a))&&r.dirty(),{status:r.value,value:u.data}):(x(n,{code:p.invalid_intersection_types}),_)},"handleParsed");return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,a])=>i(s,a)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};zt.create=(e,t,r)=>new zt({left:e,right:t,typeName:T.ZodIntersection,...O(r)});var ze=class e extends j{static{o(this,"ZodTuple")}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==b.array)return x(n,{code:p.invalid_type,expected:b.array,received:n.parsedType}),_;if(n.data.length<this._def.items.length)return x(n,{code:p.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),_;!this._def.rest&&n.data.length>this._def.items.length&&(x(n,{code:p.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let s=[...n.data].map((a,u)=>{let c=this._def.items[u]||this._def.rest;return c?c._parse(new Ce(n,a,n.path,u)):null}).filter(a=>!!a);return n.common.async?Promise.all(s).then(a=>ee.mergeArray(r,a)):ee.mergeArray(r,s)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};ze.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ze({items:e,typeName:T.ZodTuple,rest:null,...O(t)})};var to=class e extends j{static{o(this,"ZodRecord")}get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==b.object)return x(n,{code:p.invalid_type,expected:b.object,received:n.parsedType}),_;let i=[],s=this._def.keyType,a=this._def.valueType;for(let u in n.data)i.push({key:s._parse(new Ce(n,u,n.path,u)),value:a._parse(new Ce(n,n.data[u],n.path,u)),alwaysSet:u in n.data});return n.common.async?ee.mergeObjectAsync(r,i):ee.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof j?new e({keyType:t,valueType:r,typeName:T.ZodRecord,...O(n)}):new e({keyType:xt.create(),valueType:t,typeName:T.ZodRecord,...O(r)})}},Ir=class extends j{static{o(this,"ZodMap")}get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==b.map)return x(n,{code:p.invalid_type,expected:b.map,received:n.parsedType}),_;let i=this._def.keyType,s=this._def.valueType,a=[...n.data.entries()].map(([u,c],f)=>({key:i._parse(new Ce(n,u,n.path,[f,"key"])),value:s._parse(new Ce(n,c,n.path,[f,"value"]))}));if(n.common.async){let u=new Map;return Promise.resolve().then(async()=>{for(let c of a){let f=await c.key,l=await c.value;if(f.status==="aborted"||l.status==="aborted")return _;(f.status==="dirty"||l.status==="dirty")&&r.dirty(),u.set(f.value,l.value)}return{status:r.value,value:u}})}else{let u=new Map;for(let c of a){let f=c.key,l=c.value;if(f.status==="aborted"||l.status==="aborted")return _;(f.status==="dirty"||l.status==="dirty")&&r.dirty(),u.set(f.value,l.value)}return{status:r.value,value:u}}}};Ir.create=(e,t,r)=>new Ir({valueType:t,keyType:e,typeName:T.ZodMap,...O(r)});var Ar=class e extends j{static{o(this,"ZodSet")}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==b.set)return x(n,{code:p.invalid_type,expected:b.set,received:n.parsedType}),_;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(x(n,{code:p.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(x(n,{code:p.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());let s=this._def.valueType;function a(c){let f=new Set;for(let l of c){if(l.status==="aborted")return _;l.status==="dirty"&&r.dirty(),f.add(l.value)}return{status:r.value,value:f}}o(a,"finalizeSet");let u=[...n.data.values()].map((c,f)=>s._parse(new Ce(n,c,n.path,f)));return n.common.async?Promise.all(u).then(c=>a(c)):a(u)}min(t,r){return new e({...this._def,minSize:{value:t,message:I.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:I.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};Ar.create=(e,t)=>new Ar({valueType:e,minSize:null,maxSize:null,typeName:T.ZodSet,...O(t)});var ro=class e extends j{static{o(this,"ZodFunction")}constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==b.function)return x(r,{code:p.invalid_type,expected:b.function,received:r.parsedType}),_;function n(u,c){return Un({data:u,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,br(),Xe].filter(f=>!!f),issueData:{code:p.invalid_arguments,argumentsError:c}})}o(n,"makeArgsIssue");function i(u,c){return Un({data:u,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,br(),Xe].filter(f=>!!f),issueData:{code:p.invalid_return_type,returnTypeError:c}})}o(i,"makeReturnsIssue");let s={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof bt){let u=this;return ne(async function(...c){let f=new xe([]),l=await u._def.args.parseAsync(c,s).catch(P=>{throw f.addIssue(n(c,P)),f}),h=await Reflect.apply(a,this,l);return await u._def.returns._def.type.parseAsync(h,s).catch(P=>{throw f.addIssue(i(h,P)),f})})}else{let u=this;return ne(function(...c){let f=u._def.args.safeParse(c,s);if(!f.success)throw new xe([n(c,f.error)]);let l=Reflect.apply(a,this,f.data),h=u._def.returns.safeParse(l,s);if(!h.success)throw new xe([i(l,h.error)]);return h.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:ze.create(t).rest(tt.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new e({args:t||ze.create([]).rest(tt.create()),returns:r||tt.create(),typeName:T.ZodFunction,...O(n)})}},Wt=class extends j{static{o(this,"ZodLazy")}get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};Wt.create=(e,t)=>new Wt({getter:e,typeName:T.ZodLazy,...O(t)});var Gt=class extends j{static{o(this,"ZodLiteral")}_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return x(r,{received:r.data,code:p.invalid_literal,expected:this._def.value}),_}return{status:"valid",value:t.data}}get value(){return this._def.value}};Gt.create=(e,t)=>new Gt({value:e,typeName:T.ZodLiteral,...O(t)});function Xd(e,t){return new qt({values:e,typeName:T.ZodEnum,...O(t)})}o(Xd,"createZodEnum");var qt=class e extends j{static{o(this,"ZodEnum")}_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return x(r,{expected:R.joinValues(n),received:r.parsedType,code:p.invalid_type}),_}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return x(r,{received:r.data,code:p.invalid_enum_value,options:n}),_}return ne(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}};qt.create=Xd;var Zt=class extends j{static{o(this,"ZodNativeEnum")}_parse(t){let r=R.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==b.string&&n.parsedType!==b.number){let i=R.objectValues(r);return x(n,{expected:R.joinValues(i),received:n.parsedType,code:p.invalid_type}),_}if(this._cache||(this._cache=new Set(R.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let i=R.objectValues(r);return x(n,{received:n.data,code:p.invalid_enum_value,options:i}),_}return ne(t.data)}get enum(){return this._def.values}};Zt.create=(e,t)=>new Zt({values:e,typeName:T.ZodNativeEnum,...O(t)});var bt=class extends j{static{o(this,"ZodPromise")}unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==b.promise&&r.common.async===!1)return x(r,{code:p.invalid_type,expected:b.promise,received:r.parsedType}),_;let n=r.parsedType===b.promise?r.data:Promise.resolve(r.data);return ne(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};bt.create=(e,t)=>new bt({type:e,typeName:T.ZodPromise,...O(t)});var Ee=class extends j{static{o(this,"ZodEffects")}innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===T.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),i=this._def.effect||null,s={addIssue:o(a=>{x(n,a),a.fatal?r.abort():r.dirty()},"addIssue"),get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){let a=i.transform(n.data,s);if(n.common.async)return Promise.resolve(a).then(async u=>{if(r.value==="aborted")return _;let c=await this._def.schema._parseAsync({data:u,path:n.path,parent:n});return c.status==="aborted"?_:c.status==="dirty"?Rt(c.value):r.value==="dirty"?Rt(c.value):c});{if(r.value==="aborted")return _;let u=this._def.schema._parseSync({data:a,path:n.path,parent:n});return u.status==="aborted"?_:u.status==="dirty"?Rt(u.value):r.value==="dirty"?Rt(u.value):u}}if(i.type==="refinement"){let a=o(u=>{let c=i.refinement(u,s);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u},"executeRefinement");if(n.common.async===!1){let u=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return u.status==="aborted"?_:(u.status==="dirty"&&r.dirty(),a(u.value),{status:r.value,value:u.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(u=>u.status==="aborted"?_:(u.status==="dirty"&&r.dirty(),a(u.value).then(()=>({status:r.value,value:u.value}))))}if(i.type==="transform")if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!mt(a))return _;let u=i.transform(a.value,s);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:u}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>mt(a)?Promise.resolve(i.transform(a.value,s)).then(u=>({status:r.value,value:u})):_);R.assertNever(i)}};Ee.create=(e,t,r)=>new Ee({schema:e,typeName:T.ZodEffects,effect:t,...O(r)});Ee.createWithPreprocess=(e,t,r)=>new Ee({schema:t,effect:{type:"preprocess",transform:e},typeName:T.ZodEffects,...O(r)});var Te=class extends j{static{o(this,"ZodOptional")}_parse(t){return this._getType(t)===b.undefined?ne(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Te.create=(e,t)=>new Te({innerType:e,typeName:T.ZodOptional,...O(t)});var We=class extends j{static{o(this,"ZodNullable")}_parse(t){return this._getType(t)===b.null?ne(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};We.create=(e,t)=>new We({innerType:e,typeName:T.ZodNullable,...O(t)});var Ht=class extends j{static{o(this,"ZodDefault")}_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===b.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Ht.create=(e,t)=>new Ht({innerType:e,typeName:T.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...O(t)});var Jt=class extends j{static{o(this,"ZodCatch")}_parse(t){let{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return yr(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new xe(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new xe(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};Jt.create=(e,t)=>new Jt({innerType:e,typeName:T.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...O(t)});var kr=class extends j{static{o(this,"ZodNaN")}_parse(t){if(this._getType(t)!==b.nan){let n=this._getOrReturnCtx(t);return x(n,{code:p.invalid_type,expected:b.nan,received:n.parsedType}),_}return{status:"valid",value:t.data}}};kr.create=e=>new kr({typeName:T.ZodNaN,...O(e)});var Mx=Symbol("zod_brand"),Vn=class extends j{static{o(this,"ZodBranded")}_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},$n=class e extends j{static{o(this,"ZodPipeline")}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return o(async()=>{let s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?_:s.status==="dirty"?(r.dirty(),Rt(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})},"handleAsync")();{let i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?_:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(t,r){return new e({in:t,out:r,typeName:T.ZodPipeline})}},Kt=class extends j{static{o(this,"ZodReadonly")}_parse(t){let r=this._def.innerType._parse(t),n=o(i=>(mt(i)&&(i.value=Object.freeze(i.value)),i),"freeze");return yr(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};Kt.create=(e,t)=>new Kt({innerType:e,typeName:T.ZodReadonly,...O(t)});function Jd(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}o(Jd,"cleanParams");function el(e,t={},r){return e?gt.create().superRefine((n,i)=>{let s=e(n);if(s instanceof Promise)return s.then(a=>{if(!a){let u=Jd(t,n),c=u.fatal??r??!0;i.addIssue({code:"custom",...u,fatal:c})}});if(!s){let a=Jd(t,n),u=a.fatal??r??!0;i.addIssue({code:"custom",...a,fatal:u})}}):gt.create()}o(el,"custom");var Nx={object:ge.lazycreate},T;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(T||(T={}));var Ox=o((e,t={message:`Input not instance of ${e.name}`})=>el(r=>r instanceof e,t),"instanceOfType"),tl=xt.create,rl=Ft.create,Px=kr.create,jx=Ut.create,nl=Vt.create,Rx=$t.create,Fx=Sr.create,Ux=Dt.create,Vx=Lt.create,$x=gt.create,Dx=tt.create,Lx=Oe.create,Bx=vr.create,zx=rt.create,Wx=ge.create,Gx=ge.strictCreate,qx=Bt.create,Zx=eo.create,Hx=zt.create,Jx=ze.create,Kx=to.create,Yx=Ir.create,Qx=Ar.create,Xx=ro.create,e1=Wt.create,t1=Gt.create,r1=qt.create,n1=Zt.create,i1=bt.create,o1=Ee.create,s1=Te.create,a1=We.create,u1=Ee.createWithPreprocess,c1=$n.create,f1=o(()=>tl().optional(),"ostring"),d1=o(()=>rl().optional(),"onumber"),l1=o(()=>nl().optional(),"oboolean"),p1={string:o((e=>xt.create({...e,coerce:!0})),"string"),number:o((e=>Ft.create({...e,coerce:!0})),"number"),boolean:o((e=>Vt.create({...e,coerce:!0})),"boolean"),bigint:o((e=>Ut.create({...e,coerce:!0})),"bigint"),date:o((e=>$t.create({...e,coerce:!0})),"date")};var h1=_;var m1=D.enum(["boundary_violation","null_reference","type_coercion","floating_point","empty_collection","overflow","invalid_state","race_condition","unknown"]),x1=D.object({values:D.record(D.unknown()),shrunk:D.boolean(),shrinkSteps:D.number(),seed:D.number().optional()}),g1=D.object({failedAssertion:D.string(),actual:D.unknown().optional(),expected:D.unknown().optional(),rootCause:m1,suggestedFix:D.string()}),b1=D.object({name:D.string(),passed:D.boolean(),numRuns:D.number(),counterexample:x1.optional(),analysis:g1.optional(),duration_ms:D.number(),error:D.string().optional()}),LN=D.object({passed:D.boolean(),total:D.number(),failed:D.number(),duration_ms:D.number(),properties:D.array(b1),confidence:D.enum(["statistical","exhaustive"])}),y1=D.object({seed:D.number().optional(),numRuns:D.number().default(100),verbose:D.boolean().default(!1),endOnFailure:D.boolean().default(!1)});function w1(e,t){let r=String(e).toLowerCase();if(r.includes("null")||r.includes("undefined")||r.includes("cannot read"))return"null_reference";if(r.includes("type")||r.includes("nan")||r.includes("not a"))return"type_coercion";if(r.includes("index")||r.includes("bound")||r.includes("range"))return"boundary_violation";if(r.includes("overflow")||r.includes("infinity"))return"overflow";let n=Object.values(t);return n.some(i=>Array.isArray(i)&&i.length===0)?"empty_collection":n.some(i=>typeof i=="number"&&!Number.isInteger(i))&&(r.includes("precision")||r.includes("equal"))?"floating_point":n.some(i=>i===0||i===-1||i===1||i===Number.MAX_SAFE_INTEGER||i===Number.MIN_SAFE_INTEGER)?"boundary_violation":"unknown"}o(w1,"classifyRootCause");function S1(e,t){switch(e){case"boundary_violation":return"Add bounds checking: validate array indices and loop boundaries";case"null_reference":return"Add null check: use optional chaining (?.) or explicit null guard";case"type_coercion":return"Add type validation: use Zod schema or explicit type check";case"floating_point":return"Use Math.round() or Number.EPSILON for floating point comparison";case"empty_collection":return"Add empty check: validate collection length before access";case"overflow":return"Add overflow protection: use BigInt or clamp values";case"invalid_state":return"Add state validation: check preconditions before state transition";case"race_condition":return"Add synchronization: use mutex or atomic operations";default:return"Review the counterexample and add appropriate validation"}}o(S1,"suggestFix");function v1(e,t){let r=Date.now(),n=En(e.arbitraries);try{let i={numRuns:t.numRuns,verbose:t.verbose?G.Verbose:G.None,endOnFailure:t.endOnFailure};t.seed!==void 0&&(i.seed=t.seed);let s=Pr(n,u=>e.predicate(u)),a=ir(s,i);if(a.failed){let u=a.counterexample?.[0]??{},c={values:u,shrunk:(a.numShrinks??0)>0,shrinkSteps:a.numShrinks??0,seed:a.seed},f=w1(a.error,u),l={failedAssertion:e.name,actual:a.error,rootCause:f,suggestedFix:S1(f,u)};return{name:e.name,passed:!1,numRuns:a.numRuns,counterexample:c,analysis:l,duration_ms:Date.now()-r,error:String(a.error)}}return{name:e.name,passed:!0,numRuns:a.numRuns,duration_ms:Date.now()-r}}catch(i){return{name:e.name,passed:!1,numRuns:0,duration_ms:Date.now()-r,error:String(i)}}}o(v1,"runProperty");function il(e,t={}){let r=y1.parse(t),n=Date.now(),i=[];for(let a of e){let u=v1(a,r);if(i.push(u),!u.passed&&r.endOnFailure)break}let s=i.filter(a=>!a.passed).length;return{passed:s===0,total:i.length,failed:s,duration_ms:Date.now()-n,properties:i,confidence:"statistical"}}o(il,"runProperties");function I1(){console.log(`
|
|
2
|
+
/**
|
|
3
|
+
* CLI for @invar/fc-runner
|
|
4
|
+
*
|
|
5
|
+
* Note: This CLI is for running property tests defined in a config file.
|
|
6
|
+
* For programmatic use, import the library directly.
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* npx @invar/fc-runner [config-file] [options]
|
|
10
|
+
*/
|
|
11
|
+
import { runProperties, defineProperty, fc } from './index.js';
|
|
12
|
+
function printHelp() {
|
|
13
|
+
console.log(`
|
|
39
14
|
@invar/fc-runner - Property-based testing with rich failure analysis
|
|
40
15
|
|
|
41
16
|
Usage:
|
|
@@ -67,11 +42,108 @@ Example programmatic usage:
|
|
|
67
42
|
];
|
|
68
43
|
|
|
69
44
|
const result = runProperties(props, { numRuns: 1000 });
|
|
70
|
-
`)
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
45
|
+
`);
|
|
46
|
+
}
|
|
47
|
+
function formatPropertyResult(prop) {
|
|
48
|
+
const status = prop.passed ? '\u2713' : '\u2717';
|
|
49
|
+
let output = `${status} ${prop.name} (${prop.numRuns} runs, ${prop.duration_ms}ms)`;
|
|
50
|
+
if (!prop.passed && prop.counterexample) {
|
|
51
|
+
output += `\n Counterexample: ${JSON.stringify(prop.counterexample.values)}`;
|
|
52
|
+
if (prop.counterexample.shrunk) {
|
|
53
|
+
output += ` (shrunk in ${prop.counterexample.shrinkSteps} steps)`;
|
|
54
|
+
}
|
|
55
|
+
if (prop.analysis) {
|
|
56
|
+
output += `\n Root cause: ${prop.analysis.rootCause}`;
|
|
57
|
+
output += `\n Suggested fix: ${prop.analysis.suggestedFix}`;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return output;
|
|
61
|
+
}
|
|
62
|
+
function formatResult(result, json) {
|
|
63
|
+
if (json) {
|
|
64
|
+
return JSON.stringify(result, null, 2);
|
|
65
|
+
}
|
|
66
|
+
const lines = [];
|
|
67
|
+
const status = result.passed ? '\u2713 ALL PASSED' : '\u2717 FAILED';
|
|
68
|
+
lines.push(`\n=== Property Test Results ===\n`);
|
|
69
|
+
lines.push(`Status: ${status}`);
|
|
70
|
+
lines.push(`Total: ${result.total}, Failed: ${result.failed}`);
|
|
71
|
+
lines.push(`Duration: ${result.duration_ms}ms`);
|
|
72
|
+
lines.push(`Confidence: ${result.confidence}`);
|
|
73
|
+
lines.push('');
|
|
74
|
+
for (const prop of result.properties) {
|
|
75
|
+
lines.push(formatPropertyResult(prop));
|
|
76
|
+
}
|
|
77
|
+
return lines.join('\n');
|
|
78
|
+
}
|
|
79
|
+
function main() {
|
|
80
|
+
const args = process.argv.slice(2);
|
|
81
|
+
const options = {
|
|
82
|
+
seed: undefined,
|
|
83
|
+
numRuns: 100,
|
|
84
|
+
verbose: false,
|
|
85
|
+
json: false,
|
|
86
|
+
};
|
|
87
|
+
for (let i = 0; i < args.length; i++) {
|
|
88
|
+
const arg = args[i];
|
|
89
|
+
if (arg === '--help' || arg === '-h') {
|
|
90
|
+
printHelp();
|
|
91
|
+
process.exit(0);
|
|
92
|
+
}
|
|
93
|
+
else if (arg === '--json') {
|
|
94
|
+
options.json = true;
|
|
95
|
+
}
|
|
96
|
+
else if (arg === '--verbose') {
|
|
97
|
+
options.verbose = true;
|
|
98
|
+
}
|
|
99
|
+
else if (arg === '--seed' && args[i + 1]) {
|
|
100
|
+
const seed = parseInt(args[++i], 10);
|
|
101
|
+
if (isNaN(seed)) {
|
|
102
|
+
console.error(`Error: --seed requires a valid number, got "${args[i]}"`);
|
|
103
|
+
process.exit(1);
|
|
104
|
+
}
|
|
105
|
+
options.seed = seed;
|
|
106
|
+
}
|
|
107
|
+
else if (arg === '--num-runs' && args[i + 1]) {
|
|
108
|
+
const numRuns = parseInt(args[++i], 10);
|
|
109
|
+
if (isNaN(numRuns)) {
|
|
110
|
+
console.error(`Error: --num-runs requires a valid number, got "${args[i]}"`);
|
|
111
|
+
process.exit(1);
|
|
112
|
+
}
|
|
113
|
+
options.numRuns = numRuns;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
// Demo: run a simple built-in property using already imported modules
|
|
117
|
+
const demoProps = [
|
|
118
|
+
defineProperty({
|
|
119
|
+
name: 'demo: array concatenation length',
|
|
120
|
+
arbitraries: {
|
|
121
|
+
a: fc.array(fc.integer()),
|
|
122
|
+
b: fc.array(fc.integer()),
|
|
123
|
+
},
|
|
124
|
+
predicate: ({ a, b }) => {
|
|
125
|
+
return a.concat(b).length === a.length + b.length;
|
|
126
|
+
},
|
|
127
|
+
}),
|
|
128
|
+
defineProperty({
|
|
129
|
+
name: 'demo: string repeat',
|
|
130
|
+
arbitraries: {
|
|
131
|
+
s: fc.string({ maxLength: 10 }),
|
|
132
|
+
n: fc.integer({ min: 0, max: 5 }),
|
|
133
|
+
},
|
|
134
|
+
predicate: ({ s, n }) => {
|
|
135
|
+
return s.repeat(n).length === s.length * n;
|
|
136
|
+
},
|
|
137
|
+
}),
|
|
138
|
+
];
|
|
139
|
+
// Only show progress message in non-JSON mode
|
|
140
|
+
if (!options.json) {
|
|
141
|
+
console.log('Running demo properties...\n');
|
|
142
|
+
}
|
|
143
|
+
// Cast needed because TypeScript infers specific types for each property definition
|
|
144
|
+
const result = runProperties(demoProps, options);
|
|
145
|
+
console.log(formatResult(result, options.json));
|
|
146
|
+
process.exit(result.passed ? 0 : 1);
|
|
147
|
+
}
|
|
148
|
+
main();
|
|
149
|
+
//# sourceMappingURL=cli.js.map
|