"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const pe=require("react"),Y=require("react/jsx-runtime"),ce=require("framer"),Bwe=require("react-dom"),Wot=require("framer-motion");function Vwe(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const qe=Vwe(pe),Not=Vwe(Bwe);var jot=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r1?e(t[1],t[0]):function(r){return e(r)(t[0])}}}function Ae(e,t,n,r,i,a,o,u,c){switch(arguments.length){case 1:return e;case 2:return function(){return t(e.apply(this,arguments))};case 3:return function(){return n(t(e.apply(this,arguments)))};case 4:return function(){return r(n(t(e.apply(this,arguments))))};case 5:return function(){return i(r(n(t(e.apply(this,arguments)))))};case 6:return function(){return a(i(r(n(t(e.apply(this,arguments))))))};case 7:return function(){return o(a(i(r(n(t(e.apply(this,arguments)))))))};case 8:return function(){return u(o(a(i(r(n(t(e.apply(this,arguments))))))))};case 9:return function(){return c(u(o(a(i(r(n(t(e.apply(this,arguments)))))))))}}}function ix(){for(var e=[],t=0;t=e}:e;return function(){var r=Array.from(arguments);return n(arguments)?t.apply(this,r):function(i){return t.apply(void 0,jot([i],r,!1))}}};const Xwe=Object.freeze(Object.defineProperty({__proto__:null,SK:au,absurd:Zwe,apply:kot,constFalse:Hwe,constNull:Jwe,constTrue:vJ,constUndefined:mJ,constVoid:Ywe,constant:Mo,decrement:xot,dual:Pe,flip:Uot,flow:Ae,getBooleanAlgebra:zwe,getEndomorphismMonoid:zot,getMonoid:Kwe,getRing:Gwe,getSemigroup:pJ,getSemiring:hJ,hole:Bot,identity:Re,increment:qot,not:Vot,pipe:R,tuple:ix,tupled:Dot,unsafeCoerce:rx,untupled:Lot},Symbol.toStringTag,{value:"Module"}));var Kot=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r0},Rc=function(e){return e[0]},uS=function(e){return e.slice(1)},Pa=[],Yi={},mr=Object.prototype.hasOwnProperty,ax=function(e){return Kot([e[0]],e.slice(1),!0)},cS=function(e){return function(t,n){return function(){for(var r=[],i=0;i-1?t:n}},eMe=function(e){var t=vx(e),n=mx(e);return function(r,i){return function(a){return n(t(a,i),r)}}},tft=function(e){var t=XAe(e),n=QAe(e);return function(r,i){return function(a){return!(t(a,r)||n(a,i))}}},nft=HAe,rft=xJ,ift=ZAe;function aft(e,t){return et?1:0}var LJ={equals:rg.equals,compare:aft},oft=LJ,uft=LJ,F2=LJ,cft=R(F2,hx(function(e){return e.valueOf()}));const fft=Object.freeze(Object.defineProperty({__proto__:null,Contravariant:ZAe,URI:JAe,between:tft,clamp:eMe,contramap:hx,equals:Xct,equalsDefault:GAe,fromCompare:Jb,geq:eft,getDualOrd:rft,getMonoid:DJ,getSemigroup:YAe,getTupleOrd:nft,gt:QAe,leq:Qct,lt:XAe,max:mx,min:vx,ord:ift,ordBoolean:oft,ordDate:cft,ordNumber:F2,ordString:uft,reverse:xJ,trivial:Vu,tuple:HAe},Symbol.toStringTag,{value:"Module"}));var tMe=function(e){return{concat:function(t,n){return e.concat(n,t)}}},sft=function(e){return function(t){return{concat:function(n,r){return e(n)?t.concat(n,r):r}}}},lft=function(e){return function(t){return{concat:function(n,r){return e(r)?t.concat(n,r):n}}}},dft=function(e){return function(t){return{concat:function(n,r){return t.concat(e(n),e(r))}}}},nMe=function(e){return function(t){return function(n){return n.reduce(function(r,i){return e.concat(r,i)},t)}}};const pft=Object.freeze(Object.defineProperty({__proto__:null,concatAll:nMe,endo:dft,filterFirst:sft,filterSecond:lft,reverse:tMe},Symbol.toStringTag,{value:"Module"}));var gx=function(e){return{concat:vx(e)}},yx=function(e){return{concat:mx(e)}},BJ=function(e){return{concat:function(){return e}}},VJ=tMe,zJ=function(e){return{concat:function(t,n){var r={};for(var i in e)mr.call(e,i)&&(r[i]=e[i].concat(t[i],n[i]));return r}}},KJ=function(){for(var e=[],t=0;t=t.length},JJ=function(e){return function(t){return _E([e],t,!0)}},hI=JJ,YJ=function(e){return function(t){return _E(_E([],t,!0),[e],!1)}},$x=YJ,Ix=function(e,t,n){if(sd(n)){var r=ax(n);return r.splice(e,0,t),r}return[t]},ZJ=function(e,t,n){if(n[e]===t)return n;var r=ax(n);return r[e]=t,r},XJ=function(e){return function(t){if(t.length===1)return t;for(var n=[Co(t)],r=Is(t),i=function(c){n.every(function(f){return!e.equals(f,c)})&&n.push(c)},a=0,o=r;a=t.length?[t,xT]:[R(t.slice(1,n),hI(Co(t))),t.slice(n)]}},$Me=function(e){return rY(Ax(e))},js=function(e,t){return R(e,sY(t))},iY=function(e,t){return R(e,lY(t))},LT=function(e,t){return R(e,MMe(t))},IMe=function(e,t){return R(e,fY(t))},BT=function(e,t,n){return R(e,dY(t,n))},VT=function(e){var t=pY(e);return function(n,r){return R(n,t(r))}},zT=function(e,t,n){return R(e,hY(t,n))},aY=function(e){var t=RMe(e);return function(n,r){return R(n,t(r))}},_Me=function(e,t){return R(e,AMe(t))},oY=function(e,t,n){return R(e,Mx(t,n))},uY=function(e){var t=vY(e);return function(n,r){return R(n,t(r))}},cY=function(e,t,n){return R(e,Rx(t,n))},SMe=function(e){var t=Ex(e);return function(n,r){return R(n,t(r))}},ag=AT,wMe=function(e){return function(t){return R(t,hMe(e()))}},AMe=wMe,MMe=function(e){return Yb(function(t){return R(e,sY(t))})},Yb=Pe(2,function(e,t){return R(e,bMe(function(n,r){return t(r,n)}))}),fY=function(e){return function(t){for(var n=Is(t),r=[e(t)];sd(n);)r.push(e(n)),n=Is(n);return r}},Cft=fY(Re),Pft=Yb(Re),sY=function(e){return lY(function(t,n){return e(n)})},lY=function(e){return function(t){for(var n=[e(0,Co(t))],r=1;rn.length?It:mt(Ix(e,t,n))}},sst=wx,lst=Fx,dst={URI:cu,of:ag,map:js,mapWithIndex:iY,ap:LT,chain:Yb,extend:IMe,extract:Tx,reduce:BT,foldMap:VT,reduceRight:zT,traverse:aY,sequence:Ox,reduceWithIndex:oY,foldMapWithIndex:uY,reduceRightWithIndex:cY,traverseWithIndex:SMe,alt:_Me};const kMe=Object.freeze(Object.defineProperty({__proto__:null,Alt:Gft,Applicative:xft,Apply:Px,Chain:mY,Comonad:Hft,Do:Jft,Foldable:Bft,FoldableWithIndex:Vft,Functor:Cx,FunctorWithIndex:kft,Monad:Lft,Pointed:jft,Traversable:zft,TraversableWithIndex:Kft,URI:cu,alt:AMe,altW:wMe,ap:MMe,apFirst:Uft,apS:Qft,apSecond:qft,append:$x,appendW:YJ,bind:Xft,bindTo:Yft,chain:ist,chainFirst:Dft,chainWithIndex:bMe,chop:rY,chunksOf:$Me,concat:DT,concatAll:Fx,concatW:hMe,cons:NMe,duplicate:Cft,empty:xT,extend:fY,extract:Tx,filter:ost,filterWithIndex:WMe,flap:Nft,flatMap:Yb,flatten:Pft,fold:lst,foldMap:pY,foldMapWithIndex:vY,fromArray:Mft,fromReadonlyArray:_x,getEq:EMe,getSemigroup:Fft,getShow:OMe,getUnionSemigroup:Wft,group:vMe,groupBy:Oft,groupSort:ast,head:Co,init:bS,insertAt:fst,intercalate:gY,intersperse:nY,isNonEmpty:sd,isOutOfBound:bx,last:og,let:Zft,makeBy:Sx,map:sY,mapWithIndex:lY,matchLeft:est,matchRight:tst,max:CMe,min:TMe,modifyAt:mMe,modifyHead:PMe,modifyLast:FMe,of:ag,prepend:hI,prependAll:wx,prependToAll:sst,prependW:JJ,range:lMe,readonlyNonEmptyArray:dst,reduce:dY,reduceRight:hY,reduceRightWithIndex:Rx,reduceWithIndex:Mx,replicate:Aft,reverse:Rft,rotate:eY,sequence:Ox,snoc:jMe,sort:tY,sortBy:sMe,splitAt:Ax,tail:Is,traverse:RMe,traverseWithIndex:Ex,unappend:pMe,uncons:ust,union:QJ,uniq:XJ,unprepend:dMe,unsafeInsertAt:Ix,unsafeUpdateAt:ZJ,unsnoc:cst,unzip:Tft,updateAt:Eft,updateHead:nst,updateLast:rst,zip:yMe,zipWith:gMe},Symbol.toStringTag,{value:"Module"}));var SE=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r0},Wx=function(e,t){return e<0||e>=t.length},yY=function(e){return function(t){return SE([e],t,!0)}},vI=yY,bY=function(e){return function(t){return SE(SE([],t,!0),[e],!1)}},KT=bY,$Y=function(e,t,n){if(vh(n)){var r=GT(n);return r.splice(e,0,t),r}return[t]},IY=function(e,t,n){var r=GT(n);return r[e]=t,r},_Y=function(e){return function(t){if(t.length===1)return $S(t);for(var n=[wf(t)],r=_s(t),i=function(c){n.every(function(f){return!e.equals(f,c)})&&n.push(c)},a=0,o=r;an.length?It:mt($Y(e,t,n))}},gst=function(e,t){return zMe(e,function(){return t})},zMe=function(e,t){return function(n){return Wx(e,n)?It:mt(IY(e,t(n[e]),n))}},$S=GT,ug=function(e){return[e]},KMe=function(e,t,n){for(var r=[n(e[0],t[0])],i=Math.min(e.length,t.length),a=1;a=t.length?[$S(t),[]]:[R(t.slice(1,n),vI(wf(t))),t.slice(n)]}},XMe=function(e){return MY(Ux(e))},ks=function(e,t){return R(e,FY(t))},RY=function(e,t){return R(e,WY(t))},HT=function(e,t){return R(e,iRe(t))},QMe=function(e,t){return R(e,PY(t))},JT=function(e,t,n){return R(e,aRe(t,n))},YT=function(e){var t=YMe(e);return function(n,r){return R(n,t(r))}},ZT=function(e,t,n){return R(e,uRe(t,n))},OY=function(e){var t=fRe(e);return function(n,r){return R(n,t(r))}},eRe=function(e,t){return R(e,rRe(t))},EY=function(e,t,n){return R(e,oRe(t,n))},TY=function(e){var t=JMe(e);return function(n,r){return R(n,t(r))}},CY=function(e,t,n){return R(e,cRe(t,n))},tRe=function(e){var t=xx(e);return function(n,r){return R(n,t(r))}},nRe=function(e){return function(t){return R(t,BMe(e()))}},rRe=nRe,iRe=function(e){return Zb(function(t){return R(e,FY(t))})},Zb=Pe(2,function(e,t){return R(e,ZMe(function(n,r){return t(r,n)}))}),PY=function(e){return function(t){for(var n=_s(t),r=[e(t)];vh(n);)r.push(e(n)),n=_s(n);return r}},bst=PY(Re),$st=Zb(Re),FY=function(e){return WY(function(t,n){return e(n)})},WY=function(e){return function(t){for(var n=[e(0,wf(t))],r=1;rt?1:0}},ult={equals:tu.equals,compare:Bx.compare,top:1/0,bottom:-1/0},lm={show:function(e){return JSON.stringify(e)}},mRe={concat:function(e,t){return e-t}},kY={concat:function(e,t){return e+t}},UY={concat:function(e,t){return e*t}},clt={concat:kY.concat,empty:0},flt={concat:UY.concat,empty:1},slt={add:kY.concat,zero:0,mul:UY.concat,one:1,sub:mRe.concat,degree:function(e){return 1},div:function(e,t){return e/t},mod:function(e,t){return e%t}};const llt=Object.freeze(Object.defineProperty({__proto__:null,Bounded:ult,Eq:tu,Field:slt,MagmaSub:mRe,MonoidProduct:flt,MonoidSum:clt,Ord:Bx,SemigroupProduct:UY,SemigroupSum:kY,Show:lm,isNumber:olt},Symbol.toStringTag,{value:"Module"}));function SS(e,t){return function(n){return n?t.of(void 0):e.zero()}}const dlt=Object.freeze(Object.defineProperty({__proto__:null,guard:SS},Symbol.toStringTag,{value:"Module"}));var plt=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r=0;a--)i[a]=t(n[a],i[a+1]);return i}},Slt=function(e){return e.length},wS=bx;function fb(e,t){return t===void 0?function(n){return fb(e,n)}:wS(e,t)?It:mt(t[e])}var MRe=function(e){return Jn(e)?mt(Co(e)):It},RRe=function(e){return Jn(e)?mt(og(e)):It},wlt=function(e){return Jn(e)?mt(Is(e)):It},Alt=function(e){return Jn(e)?mt(bS(e)):It},ORe=function(e){return function(t){return wS(e,t)?t:e===0?ir:t.slice(0,e)}},Mlt=function(e){return function(t){return wS(e,t)?t:e===0?ir:t.slice(-e)}};function J9(e){return function(t){for(var n=[],r=0,i=t;r=t.length?ir:t.slice(e,t.length)}},Elt=function(e){return function(t){return e<=0||Wu(t)?t:e>=t.length?ir:t.slice(0,t.length-e)}};function Tlt(e){return function(t){var n=ERe(t,e);return n===0?t:n===t.length?ir:t.slice(n)}}var Vx=function(e){return function(t){for(var n=0;n=0;n--)if(e(t[n]))return mt(t[n]);return It}}var PRe=function(e){return function(t){for(var n=t.length-1;n>=0;n--){var r=e(t[n]);if(Kr(r))return r}return It}},FRe=function(e){return function(t){for(var n=t.length-1;n>=0;n--)if(e(t[n]))return mt(n);return It}},Clt=function(e,t){return function(n){return e<0||e>n.length?It:mt(Ix(e,t,n))}},Plt=function(e,t){return WRe(e,function(){return t})},Flt=function(e){return function(t){return wS(e,t)?It:mt(fOe(e,t))}},WRe=function(e,t){return function(n){return wS(e,n)?It:mt(r3(e,t(n[e]),n))}},Wlt=function(e){return e.length<=1?e:e.slice().reverse()},Nlt=function(e){for(var t=[],n=0;n=1&&Jn(t)?Ax(e)(t):Wu(t)?[t,ir]:[ir,t]}},Blt=function(e){var t=$Me(e);return function(n){return Jn(n)?t(n):ir}},Vlt=function(e){return function(){for(var t=[],n=0;n0;){var i=n.shift();ya(i)?n.unshift.apply(n,e(i.left)):r.push(i.right)}return r}},hdt={URI:Sr,map:Ha,ap:cg,chain:dd,chainRec:zY},aZ=function(e){return function(t){var n=e(t),r=[],i=[];function a(f){ya(f)?e(f.left).forEach(function(s){return r.push(s)}):i.push(f.right)}for(var o=0,u=n;o0;)a(r.shift());return i}},vdt={URI:Sr,map:Ha,ap:cg,chain:dd,chainRec:KY},oZ=Ws(rZ,nZ),uZ=Fs(rZ,nZ),uOe={URI:Sr,map:Ha,compact:TS,separate:ES,filter:Gx,filterMap:Hx,partition:Jx,partitionMap:Yx,reduce:Xb,foldMap:MS,reduceRight:RS,traverse:Zx,sequence:eC,wither:oZ,wilt:uZ},mdt=RJ(uOe),cOe={URI:Sr,fromEither:yRe},gdt=Oc(cOe),ydt=Ix,r3=function(e,t,n){return Jn(n)?ZJ(e,t,n):n},fOe=function(e,t){var n=t.slice();return n.splice(e,1),n},nI=function(e){return e.slice()},bdt=function(e){return Wu(e)?ir:e.slice()},ir=xT;function cZ(e){return function(t){return t.every(e)}}var sOe=function(e){return function(t){return t.some(e)}},$dt=sOe,lOe=function(e){var t=gY(e);return function(n){return $Re(function(){return e.empty},t(n))}},Idt=ld(Yi),_dt=oi(t3),Sdt=Oi(t3),wdt=ci(tZ),Adt=ai(n3),wE=dd,Mdt=lMe,Rdt=NMe,Odt=jMe,Edt=kRe,Tdt={URI:Sr,compact:TS,separate:ES,map:Ha,ap:cg,of:ld,chain:dd,filter:Gx,filterMap:Hx,partition:Jx,partitionMap:Yx,mapWithIndex:Kx,partitionMapWithIndex:LRe,partitionWithIndex:DRe,filterMapWithIndex:BRe,filterWithIndex:VRe,alt:DY,zero:OS,unfold:eZ,reduce:Xb,foldMap:MS,reduceRight:RS,traverse:Zx,sequence:eC,reduceWithIndex:LY,foldMapWithIndex:BY,reduceRightWithIndex:VY,traverseWithIndex:KRe,extend:zRe,wither:oZ,wilt:uZ};const dOe=Object.freeze(Object.defineProperty({__proto__:null,Alt:odt,Alternative:cdt,Applicative:ndt,Apply:n3,Chain:tZ,ChainRecBreadthFirst:vdt,ChainRecDepthFirst:hdt,Compactable:nZ,Do:Idt,Extend:fdt,Filterable:sdt,FilterableWithIndex:ldt,Foldable:gI,FoldableWithIndex:ddt,FromEither:cOe,Functor:t3,FunctorWithIndex:Qlt,Monad:rdt,Pointed:aOe,Traversable:rZ,TraversableWithIndex:pdt,URI:Sr,Unfoldable:adt,Witherable:uOe,Zero:oOe,_chainRecBreadthFirst:KY,_chainRecDepthFirst:zY,alt:HRe,altW:GRe,ap:JRe,apFirst:edt,apS:Adt,apSecond:tdt,append:mI,appendW:mlt,bind:wdt,bindTo:_dt,chain:wE,chainFirst:idt,chainRecBreadthFirst:aZ,chainRecDepthFirst:iZ,chainWithIndex:ARe,chop:Llt,chunksOf:Blt,compact:TS,comprehension:zlt,concat:Dl,concatW:xRe,cons:Rdt,deleteAt:Flt,difference:zx,dropLeft:Olt,dropLeftWhile:Tlt,dropRight:Elt,duplicate:Klt,elem:AS,empty:ir,every:cZ,exists:$dt,extend:YY,filter:Nu,filterE:mdt,filterMap:Xx,filterMapWithIndex:GY,filterWithIndex:eOe,findFirst:sb,findFirstMap:TRe,findIndex:Vx,findLast:CRe,findLastIndex:FRe,findLastMap:PRe,flap:Xlt,flatMap:dd,flatten:YRe,foldLeft:blt,foldMap:ZY,foldMapWithIndex:Qx,foldRight:$lt,fromArray:bdt,fromEither:yRe,fromEitherK:gdt,fromOption:oE,fromOptionK:Vlt,fromPredicate:ylt,getDifferenceMagma:Zlt,getEq:tC,getIntersectionSemigroup:Ylt,getMonoid:rOe,getOrd:iOe,getSemigroup:nOe,getShow:CS,getUnionMonoid:Jlt,getUnionSemigroup:nC,guard:udt,head:MRe,init:Alt,insertAt:Clt,intercalate:lOe,intersection:xY,intersperse:qlt,isEmpty:Wu,isNonEmpty:Jn,isOutOfBound:wS,last:RRe,lefts:jlt,let:Sdt,lookup:fb,makeBy:gRe,map:dt,mapWithIndex:ZRe,match:$Re,matchLeft:_Re,matchLeftW:IRe,matchRight:wRe,matchRightW:SRe,matchW:bRe,modifyAt:WRe,of:ld,partition:XRe,partitionMap:QRe,partitionMapWithIndex:JY,partitionWithIndex:HY,prepend:hlt,prependAll:kRe,prependToAll:Edt,prependW:vlt,range:Mdt,readonlyArray:Tdt,reduce:XT,reduceRight:XY,reduceRightWithIndex:e3,reduceWithIndex:QT,replicate:glt,reverse:Wlt,rights:Nlt,rotate:xlt,scanLeft:Ilt,scanRight:_lt,separate:ES,sequence:eC,size:Slt,snoc:Odt,some:sOe,sort:klt,sortBy:Dlt,spanLeft:Rlt,splitAt:qRe,tail:wlt,takeLeft:ORe,takeLeftWhile:J9,takeRight:Mlt,toArray:nI,traverse:tOe,traverseWithIndex:QY,unfold:eZ,union:qY,uniq:URe,unsafeDeleteAt:fOe,unsafeInsertAt:ydt,unsafeUpdateAt:r3,unzip:Ult,updateAt:Plt,wilt:Hlt,wither:Glt,zero:OS,zip:jRe,zipWith:NRe},Symbol.toStringTag,{value:"Module"}));var Em=function(e){return e.length===0},Vi=vh,Cdt=vI,Pdt=yY,i3=KT,Fdt=bY,pOe=function(e,t){return e<=0?[]:Nx(t)(e)},Wdt=function(e,t){return pOe(e,function(){return t})};function Ndt(e){return function(t){return e(t)?[t]:[]}}var hOe=function(e){return Mi(e)?[]:[e.value]},vOe=function(e){return ya(e)?[]:[e.right]},mOe=function(e,t){return function(n){return Vi(n)?t(n):e()}},jdt=mOe,gOe=function(e,t){return function(n){return Vi(n)?t(wf(n),_s(n)):e()}},yOe=gOe,kdt=yOe,bOe=function(e,t){return function(n){return Vi(n)?t(_S(n),IS(n)):e()}},$Oe=bOe,Udt=$Oe,IOe=function(e){return function(t){for(var n=[],r=0;r=0;a--)i[a]=t(n[a],i[a+1]);return i}},Ddt=function(e){return e.length},rC=Wx,Ldt=fb,Bdt=MRe,Vdt=RRe,zdt=function(e){return Vi(e)?mt(_s(e)):It},Kdt=function(e){return Vi(e)?mt(_S(e)):It},Gdt=function(e){return function(t){return rC(e,t)?_o(t):t.slice(0,e)}},Hdt=function(e){return function(t){return rC(e,t)?_o(t):e===0?[]:t.slice(-e)}};function Jdt(e){return function(t){for(var n=[],r=0,i=t;r=t.length?[]:t.slice(e,t.length)}},Xdt=function(e){return function(t){return e<=0||Em(t)?_o(t):e>=t.length?[]:t.slice(0,t.length-e)}};function Qdt(e){return function(t){return t.slice(_Oe(t,e))}}var ept=Vx;function tpt(e){return sb(e)}var npt=TRe;function rpt(e){return CRe(e)}var ipt=PRe,apt=FRe,_o=function(e){return e.slice()},opt=function(e,t){return function(n){return e<0||e>n.length?It:mt(nEe(e,t,n))}},upt=function(e,t){return SOe(e,function(){return t})},cpt=function(e){return function(t){return rC(e,t)?It:mt(iEe(e,t))}},SOe=function(e,t){return function(n){return rC(e,n)?It:mt(rEe(e,t(n[e]),n))}},fpt=function(e){return Em(e)?[]:e.slice().reverse()},spt=function(e){for(var t=[],n=0;n=1&&Vi(t)?Ux(e)(t):Em(t)?[_o(t),[]]:[[],_o(t)]}},bpt=function(e){var t=XMe(e);return function(n){return Vi(n)?t(n):[]}},$pt=function(e){return function(){for(var t=[],n=0;nR(t,mS(n=>(e(n)(),n)))}const uE=mht;function u2(e){return t=>R(t,P2,uE(e),P2)}var ght=function(e,t){return R(e,cEe(t))},cEe=function(e){return function(t){return Ae(e,t)}},fEe="Predicate",sEe=function(){return{concat:function(e,t){return R(e,dEe(t))}}},yht=function(){return{concat:sEe().concat,empty:Hwe}},lEe=function(){return{concat:function(e,t){return R(e,pEe(t))}}},bht=function(){return{concat:lEe().concat,empty:vJ}},$ht={URI:fEe,contramap:ght},yI=function(e){return function(t){return!e(t)}},dEe=function(e){return function(t){return function(n){return t(n)||e(n)}}},pEe=function(e){return function(t){return function(n){return t(n)&&e(n)}}};const Iht=Object.freeze(Object.defineProperty({__proto__:null,Contravariant:$ht,URI:fEe,and:pEe,contramap:cEe,getMonoidAll:bht,getMonoidAny:yht,getSemigroupAll:lEe,getSemigroupAny:sEe,not:yI,or:dEe},Symbol.toStringTag,{value:"Module"}));var Ht=It,cn=mt;function mh(e){return function(t){return e(t)?cn(t):Ht}}var m3=function(e){return e._tag==="Right"?Ht:cn(e.left)},aC=function(e){return e._tag==="Left"?Ht:cn(e.right)},Ec=function(e,t){return R(e,So(t))},e0=function(e,t){return R(e,mEe(t))},g3=function(e,t,n){return R(e,yEe(t,n))},y3=function(e){var t=bEe(e);return function(n,r){return R(n,t(r))}},b3=function(e,t,n){return R(e,$Ee(t,n))},TZ=function(e){var t=MEe(e);return function(n,r){return R(n,t(r))}},CZ=function(e,t){return R(e,IEe(t))},AE=function(e,t){return R(e,I3(t))},PZ=function(e,t){return R(e,SEe(t))},hEe=function(e,t){return R(e,UZ(t))},FZ=function(e,t){return R(e,wEe(t))},WZ=function(e,t){return R(e,AEe(t))},Xi="Option",_ht=function(e){return{show:function(t){return on(t)?"none":"some(".concat(e.show(t.value),")")}}},NZ=function(e){return{equals:function(t,n){return t===n||(on(t)?on(n):on(n)?!1:e.equals(t.value,n.value))}}},Sht=function(e){return{equals:NZ(e).equals,compare:function(t,n){return t===n?0:Tm(t)?Tm(n)?e.compare(t.value,n.value):1:-1}}},jZ=function(e){return{concat:function(t,n){return on(t)?n:on(n)?t:cn(e.concat(t.value,n.value))},empty:Ht}},So=function(e){return function(t){return on(t)?Ht:cn(e(t.value))}},gh={URI:Xi,map:Ec},wht=Pe(2,ou(gh)),Aht=Bu(gh),yh=cn,vEe={URI:Xi,of:yh},mEe=function(e){return function(t){return on(t)||on(e)?Ht:cn(t.value(e.value))}},kS={URI:Xi,map:Ec,ap:e0},gEe={URI:Xi,map:Ec,ap:e0,of:yh},t0=Pe(2,function(e,t){return on(e)?Ht:t(e.value)}),oC={URI:Xi,map:Ec,ap:e0,chain:t0},Mht={URI:Xi,map:Ec,ap:e0,of:yh,chain:t0},yEe=function(e,t){return function(n){return on(n)?e:t(e,n.value)}},bEe=function(e){return function(t){return function(n){return on(n)?e.empty:t(n.value)}}},$Ee=function(e,t){return function(n){return on(n)?e:t(n.value,e)}},Rht={URI:Xi,reduce:g3,foldMap:y3,reduceRight:b3},kZ=Pe(2,function(e,t){return on(e)?t():e}),Oht=kZ,IEe=kZ,Eht={URI:Xi,map:Ec,alt:CZ},$3=function(){return Ht},_Ee={URI:Xi,zero:$3},Tht=SS(_Ee,vEe),Cht={URI:Xi,map:Ec,ap:e0,of:yh,alt:CZ,zero:$3},UZ=function(e){return function(t){return on(t)?Ht:cn(e(t))}},Pht={URI:Xi,map:Ec,extend:hEe},US=t0(Re),Fht=jt(Ht,Ht),qS=function(e){return on(e)?Fht:jt(m3(e.value),aC(e.value))},n0={URI:Xi,compact:US,separate:qS},I3=function(e){return function(t){return on(t)?Ht:e(t.value)?t:Ht}},SEe=function(e){return function(t){return on(t)?Ht:e(t.value)}},wEe=function(e){return function(t){return jt(AE(t,yI(e)),AE(t,e))}},AEe=function(e){return Ae(So(e),qS)},bh={URI:Xi,map:Ec,compact:US,separate:qS,filter:AE,filterMap:PZ,partition:FZ,partitionMap:WZ},MEe=function(e){return function(t){return function(n){return on(n)?e.of(Ht):e.map(t(n.value),cn)}}},_3=function(e){return function(t){return on(t)?e.of(Ht):e.map(t.value,cn)}},qZ={URI:Xi,map:Ec,reduce:g3,foldMap:y3,reduceRight:b3,traverse:TZ,sequence:_3},xZ=Ws(qZ,n0),DZ=Fs(qZ,n0),Wht=function(e){var t=xZ(e);return function(n){return function(r){return t(r,n)}}},Nht=function(e){var t=DZ(e);return function(n){return function(r){return t(r,n)}}},jht={URI:Xi,map:Ec,reduce:g3,foldMap:y3,reduceRight:b3,traverse:TZ,sequence:_3,compact:US,separate:qS,filter:AE,filterMap:PZ,partition:FZ,partitionMap:WZ,wither:xZ,wilt:DZ},LZ=function(){return Ht},kht={URI:Xi,map:Ec,ap:e0,of:yh,chain:t0,throwError:LZ},xS=aC,S3={URI:Xi,fromEither:xS},Tm=Kr,on=function(e){return e._tag==="None"},BZ=function(e,t){return function(n){return on(n)?e():t(n.value)}},Uht=BZ,Af=BZ,Mf=Af,REe=function(e){return function(t){return on(t)?e():t.value}},Zl=REe,qht=en(gh),xht=Gr(kS),Dht=Hr(kS),Lht=US,OEe=Pe(2,ui(oC)),EEe=Pe(2,cd(S3,oC)),Bht=UZ(Re),Vht=Oc(S3),zht=AJ(S3,oC),Kht=EEe,$h=function(e){return e==null?Ht:cn(e)},TEe=function(e){try{return cn(e())}catch{return Ht}},Ght=function(e){return function(){for(var t=[],n=0;n0&&a[a.length-1])&&(f[0]===6||f[0]===2)){n=0;continue}if(f[0]===3&&(!a||f[1]>a[0]&&f[1](on(t)&&e()(),t)}function vC(e){return Ae(cn,e.of)}function mC(e){return Mo(e.of(Ht))}function N3(e){return function(t){return e.map(t,cn)}}function j3(e){return Ae($h,e.of)}function k3(e){var t=j3(e);return function(n){return Ae(n,t)}}function vX(e){var t=B3(e),n=k3(e);return function(r){return t(n(r))}}function U3(e){return function(t){return Ae(t,e.of)}}function hTe(e){var t=B3(e),n=U3(e);return function(r){return t(n(r))}}function mX(e){return function(t){return function(n){return e.of(mh(t)(n))}}}function gX(e){return Ae(xS,e.of)}function yX(e){return function(t,n){return function(r){return e.map(r,Af(t,n))}}}function q3(e){return function(t,n){return function(r){return e.chain(r,Af(t,n))}}}function x3(e){return function(t){return function(n){return e.chain(n,Af(t,e.of))}}}function D3(e){return dS(e,gh)}function L3(e){return ph(e,kS)}function B3(e){var t=V3(e);return function(n){return function(r){return t(r,n)}}}function V3(e){var t=mC(e);return function(n,r){return e.chain(n,Af(function(){return t()},r))}}function z3(e){var t=vC(e);return function(n){return function(r){return e.chain(r,Af(n,t))}}}function zmt(e){var t=L3(e),n=D3(e),r=B3(e),i=z3(e),a=q3(e),o=x3(e),u=mC(e);return{map:function(c,f){return R(c,n(f))},ap:function(c,f){return R(c,t(f))},of:vC(e),chain:function(c,f){return R(c,r(f))},alt:function(c,f){return R(c,i(f))},fold:function(c,f,s){return R(c,a(f,s))},getOrElse:function(c,f){return R(c,o(f))},fromM:N3(e),none:function(){return u()}}}const Kmt=Object.freeze(Object.defineProperty({__proto__:null,alt:z3,ap:L3,chain:B3,chainNullableK:vX,chainOptionK:hTe,flatMap:V3,fromEither:gX,fromF:N3,fromNullable:j3,fromNullableK:k3,fromOptionK:U3,fromPredicate:mX,getOptionM:zmt,getOrElse:x3,map:D3,match:yX,matchE:q3,some:vC,zero:mC},Symbol.toStringTag,{value:"Module"}));var Gmt=globalThis&&globalThis.__awaiter||function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function u(s){try{f(r.next(s))}catch(l){o(l)}}function c(s){try{f(r.throw(s))}catch(l){o(l)}}function f(s){s.done?a(s.value):i(s.value).then(u,c)}f((r=r.apply(e,t||[])).next())})},Hmt=globalThis&&globalThis.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(f){return function(s){return c([f,s])}}function c(f){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,f[0]&&(n=0)),n;)try{if(r=1,i&&(a=f[0]&2?i.return:f[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,f[1])).done)return a;switch(i=0,a&&(f=[f[0]&2,a.value]),f[0]){case 0:case 1:a=f;break;case 4:return n.label++,{value:f[1],done:!1};case 5:n.label++,i=f[1],f=[0];continue;case 7:f=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(f[0]===6||f[0]===2)){n=0;continue}if(f[0]===3&&(!a||f[1]>a[0]&&f[1]=0;c--){var f=o[c];a=r(f,i.get(f),a)}return a}}},YQ=function(e){var t=uD(e),n=cD(e),r=fD(e),i=sD(e);return{URI:Of,_E:void 0,reduce:t.reduce,foldMap:t.foldMap,reduceRight:t.reduceRight,reduceWithIndex:function(a,o,u){return R(a,n(o,u))},foldMapWithIndex:function(a){var o=r(a);return function(u,c){return R(u,o(c))}},reduceRightWithIndex:function(a,o,u){return R(a,i(o,u))}}},a$t=function(e){var t=ZQ(e),n=uD(e);return{URI:Of,_E:void 0,map:Th,reduce:n.reduce,foldMap:n.foldMap,reduceRight:n.reduceRight,traverse:t.traverse,sequence:t.sequence}},ZQ=function(e){var t=YQ(e),n=mg(e),r=function(o){return function(u,c){for(var f=o.of(new Map),s=n(u),l=s.length,d=function(v){var h=s[v],$=u.get(h);f=o.ap(o.map(f,function(b){return function(y){return b.set(h,y)}}),c(h,$))},p=0;p(t,n,r)=>i=>R(i,AC(e)(t,r),Zl(()=>R(i,iD(e)(t,n()))));var K$t="Endomorphism",JPe=function(){return{concat:function(e,t){return Ae(e,t)}}},ree=function(){return{concat:JPe().concat,empty:Re}};const G$t=Object.freeze(Object.defineProperty({__proto__:null,URI:K$t,getMonoid:ree,getSemigroup:JPe},Symbol.toStringTag,{value:"Module"}));var YPe=function(e){return{concat:gx(e).concat,empty:e.top}},ZPe=function(e){return{concat:yx(e).concat,empty:e.bottom}},iee=function(e){return{concat:VJ(e).concat,empty:e.empty}},XPe=function(e){var t={};for(var n in e)mr.call(e,n)&&(t[n]=e[n].empty);return{concat:zJ(e).concat,empty:t}},QPe=function(){for(var e=[],t=0;tArray.isArray(e);function vD(e){return o1t(e)?e:[e]}function Br(e){return To((t,n)=>t.length===n.length&&R(t,XT(cn(n),(r,i)=>R(r,A3(a=>R(a,zx(e)([i]),mh(o=>o.length!==a.length))))),I3(Wu),Tm))}var He={equals:function(e,t){return e===t}},rFe={concat:function(e,t){return e+t}},iFe="",u1t={concat:rFe.concat,empty:iFe},Ve={equals:He.equals,compare:function(e,t){return et?1:0}},_i={show:function(e){return JSON.stringify(e)}},c1t=function(e){return typeof e=="string"},f1t=function(e){return e.toUpperCase()},s1t=function(e){return e.toLowerCase()},l1t=function(e,t){return function(n){return n.replace(e,t)}},d1t=function(e){return e.trim()},p1t=function(e){return e.trimLeft()},h1t=function(e){return e.trimRight()},v1t=function(e,t){return function(n){return n.slice(e,t)}},m1t=function(e){return e.length===0},g1t=function(e){return e.length},y1t=function(e){return function(t){var n=t.split(e);return sd(n)?n:[t]}},b1t=function(e,t){return function(n){return n.includes(e,t)}},$1t=function(e,t){return function(n){return n.startsWith(e,t)}},I1t=function(e,t){return function(n){return n.endsWith(e,t)}};const _1t=Object.freeze(Object.defineProperty({__proto__:null,Eq:He,Monoid:u1t,Ord:Ve,Semigroup:rFe,Show:_i,empty:iFe,endsWith:I1t,includes:b1t,isEmpty:m1t,isString:c1t,replace:l1t,size:g1t,slice:v1t,split:y1t,startsWith:$1t,toLowerCase:s1t,toUpperCase:f1t,trim:d1t,trimLeft:p1t,trimRight:h1t},Symbol.toStringTag,{value:"Module"}));var S1t=function(e){return Object.assign({},e)},w1t=function(e){return Object.assign({},e)},aFe=function(e){return Object.keys(e).length},Ql=function(e){for(var t in e)if(mr.call(e,t))return!1;return!0},dw=function(e){return function(t){return Object.keys(t).sort(e.compare)}},A1t=dw(Ve);function mD(e){if(typeof e=="function")return mD(Ve)(e);var t=dw(e);return function(n){return function(r){for(var i=[],a=0,o=t(r);a=0;f--){var s=u[f];o=i(s,a[s],o)}return o}}}var oFe=function(e,t){var n;return n={},n[e]=t,n};function uFe(e){var t=jC(Ve)(e);return function(n){return function(r){return t(r,n)}}}function bD(e){var t=gd(Ve)(e);return function(n){return function(r){return t(r,n)}}}function pw(e){return NC(Ve)(e)}var T1t=function(e){var t=bD(e);return function(n){return function(r){return e.map(R(r,t(n)),Ph)}}},C1t=function(e){var t=bD(e);return function(n){return function(r){return e.map(R(r,t(n)),Fh)}}};function $D(e){return function(t){var n={},r={};for(var i in t)if(mr.call(t,i)){var a=e(i,t[i]);switch(a._tag){case"Left":n[i]=a.left;break;case"Right":r[i]=a.right;break}}return jt(n,r)}}function ID(e){return function(t){var n={},r={};for(var i in t)if(mr.call(t,i)){var a=t[i];e(i,a)?r[i]=a:n[i]=a}return jt(n,r)}}function _D(e){return function(t){var n={};for(var r in t)if(mr.call(t,r)){var i=e(r,t[r]);Kr(i)&&(n[r]=i.value)}return n}}function SD(e){return function(t){var n={},r=!1;for(var i in t)if(mr.call(t,i)){var a=t[i];e(i,a)?n[i]=a:r=!0}return r?n:t}}function cFe(e,t){var n=see(e,t);return function(r){return n(r,Re)}}function see(e,t){return function(n,r){return t.reduce(n,{},function(i,a){var o=r(a),u=o[0],c=o[1];return i[u]=mr.call(i,u)?e.concat(i[u],c):c,i})}}var P1t=oee,F1t=function(e){for(var t={},n=0,r=e;n{const r=t==null,i=n==null;return r&&i||!r&&!i&&e.equals(t,n)})}function Ls(){const e=t=>({equals:(n,r)=>{for(const[i,a]of t)if(i(n)&&i(r))return a.equals(n,r);return!1},with:(n,r)=>e([...t,[n,r]])});return e([])}var YIt=function(e){return typeof e=="boolean"},UFe=function(e,t){return function(n){return n?t():e()}},qFe=UFe,xFe=qFe,ZIt=xFe,fr={equals:function(e,t){return e===t}},XIt={meet:function(e,t){return e&&t},join:function(e,t){return e||t},zero:!1,one:!0,implies:function(e,t){return!e||t},not:function(e){return!e}},DFe={concat:function(e,t){return e&&t}},LFe={concat:function(e,t){return e||t}},QIt={concat:DFe.concat,empty:!0},e_t={concat:LFe.concat,empty:!1},t_t={equals:fr.equals,compare:function(e,t){return et?1:0}},rI={show:function(e){return JSON.stringify(e)}};const n_t=Object.freeze(Object.defineProperty({__proto__:null,BooleanAlgebra:XIt,Eq:fr,MonoidAll:QIt,MonoidAny:e_t,Ord:t_t,SemigroupAll:DFe,SemigroupAny:LFe,Show:rI,fold:ZIt,foldW:qFe,isBoolean:YIt,match:xFe,matchW:UFe},Symbol.toStringTag,{value:"Module"}));var r_t=function(e){return function(t){return Kr(e(t))}},i_t=function(e){return function(t){return gJ(e(t))}},BFe=function(){return function(e){return!0}},a_t=function(e){return function(t){return!e(t)}},o_t=function(e){return function(t){return function(n){return t(n)||e(n)}}},u_t=function(e){return function(t){return function(n){return t(n)&&e(n)}}},c_t=function(){return function(e){return!1}},f_t=function(e){return function(t){return function(n){return t(n)&&e(n)}}};const s_t=Object.freeze(Object.defineProperty({__proto__:null,and:u_t,compose:f_t,fromEitherK:i_t,fromOptionK:r_t,id:BFe,not:a_t,or:o_t,zero:c_t},Symbol.toStringTag,{value:"Module"})),Mu=Symbol.for("@ts-pattern/matcher"),VFe=Symbol.for("@ts-pattern/isVariadic"),U2="@ts-pattern/anonymous-select-key",X9=e=>!!(e&&typeof e=="object"),c2=e=>e&&!!e[Mu],qa=(e,t,n)=>{if(c2(e)){const r=e[Mu](),{matched:i,selections:a}=r.match(t);return i&&a&&Object.keys(a).forEach(o=>n(o,a[o])),i}if(X9(e)){if(!X9(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let r=[],i=[],a=[];for(const o of e.keys()){const u=e[o];c2(u)&&u[VFe]?a.push(u):a.length?i.push(u):r.push(u)}if(a.length){if(a.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.lengthqa(f,o[s],n))&&i.every((f,s)=>qa(f,u[s],n))&&(a.length===0||qa(a[0],c,n))}return e.length===t.length&&e.every((o,u)=>qa(o,t[u],n))}return Reflect.ownKeys(e).every(r=>{const i=e[r];return(r in t||c2(a=i)&&a[Mu]().matcherType==="optional")&&qa(i,t[r],n);var a})}return Object.is(t,e)},cc=e=>{var t,n,r;return X9(e)?c2(e)?(t=(n=(r=e[Mu]()).getSelectionKeys)==null?void 0:n.call(r))!=null?t:[]:Array.isArray(e)?WE(e,cc):WE(Object.values(e),cc):[]},WE=(e,t)=>e.reduce((n,r)=>n.concat(t(r)),[]);function l_t(...e){if(e.length===1){const[t]=e;return n=>qa(t,n,()=>{})}if(e.length===2){const[t,n]=e;return qa(t,n,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function xa(e){return Object.assign(e,{optional:()=>Eee(e),and:t=>dr(e,t),or:t=>zFe(e,t),select:t=>t===void 0?NE(e):NE(t,e)})}function Q9(e){return Object.assign((t=>Object.assign(t,{[Symbol.iterator](){let n=0;const r=[{value:Object.assign(t,{[VFe]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var i;return(i=r[n++])!=null?i:r.at(-1)}}}}))(e),{optional:()=>Q9(Eee(e)),select:t=>Q9(t===void 0?NE(e):NE(t,e))})}function Eee(e){return xa({[Mu]:()=>({match:t=>{let n={};const r=(i,a)=>{n[i]=a};return t===void 0?(cc(e).forEach(i=>r(i,void 0)),{matched:!0,selections:n}):{matched:qa(e,t,r),selections:n}},getSelectionKeys:()=>cc(e),matcherType:"optional"})})}const d_t=(e,t)=>{for(const n of e)if(!t(n))return!1;return!0},p_t=(e,t)=>{for(const[n,r]of e.entries())if(!t(r,n))return!1;return!0};function dr(...e){return xa({[Mu]:()=>({match:t=>{let n={};const r=(i,a)=>{n[i]=a};return{matched:e.every(i=>qa(i,t,r)),selections:n}},getSelectionKeys:()=>WE(e,cc),matcherType:"and"})})}function zFe(...e){return xa({[Mu]:()=>({match:t=>{let n={};const r=(i,a)=>{n[i]=a};return WE(e,cc).forEach(i=>r(i,void 0)),{matched:e.some(i=>qa(i,t,r)),selections:n}},getSelectionKeys:()=>WE(e,cc),matcherType:"or"})})}function rn(e){return{[Mu]:()=>({match:t=>({matched:!!e(t)})})}}function NE(...e){const t=typeof e[0]=="string"?e[0]:void 0,n=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return xa({[Mu]:()=>({match:r=>{let i={[t??U2]:r};return{matched:n===void 0||qa(n,r,(a,o)=>{i[a]=o}),selections:i}},getSelectionKeys:()=>[t??U2].concat(n===void 0?[]:cc(n))})})}function Fl(e){return typeof e=="number"}function Jv(e){return typeof e=="string"}function Yv(e){return typeof e=="bigint"}const KFe=xa(rn(function(e){return!0})),h_t=KFe,Zv=e=>Object.assign(xa(e),{startsWith:t=>{return Zv(dr(e,(n=t,rn(r=>Jv(r)&&r.startsWith(n)))));var n},endsWith:t=>{return Zv(dr(e,(n=t,rn(r=>Jv(r)&&r.endsWith(n)))));var n},minLength:t=>Zv(dr(e,(n=>rn(r=>Jv(r)&&r.length>=n))(t))),length:t=>Zv(dr(e,(n=>rn(r=>Jv(r)&&r.length===n))(t))),maxLength:t=>Zv(dr(e,(n=>rn(r=>Jv(r)&&r.length<=n))(t))),includes:t=>{return Zv(dr(e,(n=t,rn(r=>Jv(r)&&r.includes(n)))));var n},regex:t=>{return Zv(dr(e,(n=t,rn(r=>Jv(r)&&!!r.match(n)))));var n}}),v_t=Zv(rn(Jv)),Wl=e=>Object.assign(xa(e),{between:(t,n)=>Wl(dr(e,((r,i)=>rn(a=>Fl(a)&&r<=a&&i>=a))(t,n))),lt:t=>Wl(dr(e,(n=>rn(r=>Fl(r)&&rWl(dr(e,(n=>rn(r=>Fl(r)&&r>n))(t))),lte:t=>Wl(dr(e,(n=>rn(r=>Fl(r)&&r<=n))(t))),gte:t=>Wl(dr(e,(n=>rn(r=>Fl(r)&&r>=n))(t))),int:()=>Wl(dr(e,rn(t=>Fl(t)&&Number.isInteger(t)))),finite:()=>Wl(dr(e,rn(t=>Fl(t)&&Number.isFinite(t)))),positive:()=>Wl(dr(e,rn(t=>Fl(t)&&t>0))),negative:()=>Wl(dr(e,rn(t=>Fl(t)&&t<0)))}),m_t=Wl(rn(Fl)),Xv=e=>Object.assign(xa(e),{between:(t,n)=>Xv(dr(e,((r,i)=>rn(a=>Yv(a)&&r<=a&&i>=a))(t,n))),lt:t=>Xv(dr(e,(n=>rn(r=>Yv(r)&&rXv(dr(e,(n=>rn(r=>Yv(r)&&r>n))(t))),lte:t=>Xv(dr(e,(n=>rn(r=>Yv(r)&&r<=n))(t))),gte:t=>Xv(dr(e,(n=>rn(r=>Yv(r)&&r>=n))(t))),positive:()=>Xv(dr(e,rn(t=>Yv(t)&&t>0))),negative:()=>Xv(dr(e,rn(t=>Yv(t)&&t<0)))}),g_t=Xv(rn(Yv)),y_t=xa(rn(function(e){return typeof e=="boolean"})),b_t=xa(rn(function(e){return typeof e=="symbol"})),$_t=xa(rn(function(e){return e==null})),I_t=xa(rn(function(e){return e!=null}));var vb={__proto__:null,matcher:Mu,optional:Eee,array:function(...e){return Q9({[Mu]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const n=e[0];let r={};if(t.length===0)return cc(n).forEach(a=>{r[a]=[]}),{matched:!0,selections:r};const i=(a,o)=>{r[a]=(r[a]||[]).concat([o])};return{matched:t.every(a=>qa(n,a,i)),selections:r}},getSelectionKeys:()=>e.length===0?[]:cc(e[0])})})},set:function(...e){return xa({[Mu]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let n={};if(t.size===0)return{matched:!0,selections:n};if(e.length===0)return{matched:!0};const r=(a,o)=>{n[a]=(n[a]||[]).concat([o])},i=e[0];return{matched:d_t(t,a=>qa(i,a,r)),selections:n}},getSelectionKeys:()=>e.length===0?[]:cc(e[0])})})},map:function(...e){return xa({[Mu]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let n={};if(t.size===0)return{matched:!0,selections:n};const r=(u,c)=>{n[u]=(n[u]||[]).concat([c])};if(e.length===0)return{matched:!0};var i;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(i=e[0])==null?void 0:i.toString()}`);const[a,o]=e;return{matched:p_t(t,(u,c)=>{const f=qa(a,c,r),s=qa(o,u,r);return f&&s}),selections:n}},getSelectionKeys:()=>e.length===0?[]:[...cc(e[0]),...cc(e[1])]})})},intersection:dr,union:zFe,not:function(e){return xa({[Mu]:()=>({match:t=>({matched:!qa(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:rn,select:NE,any:KFe,_:h_t,string:v_t,number:m_t,bigint:g_t,boolean:y_t,symbol:b_t,nullish:$_t,nonNullable:I_t,instanceOf:function(e){return xa(rn(function(t){return n=>n instanceof t}(e)))},shape:function(e){return xa(rn(l_t(e)))}};let __t=class extends Error{constructor(t){let n;try{n=JSON.stringify(t)}catch{n=t}super(`Pattern matching error: no pattern matches value ${n}`),this.input=void 0,this.input=t}};const eG={matched:!1,value:void 0};function Ft(e){return new S_t(e,eG)}let S_t=class tG{constructor(t,n){this.input=void 0,this.state=void 0,this.input=t,this.state=n}with(...t){if(this.state.matched)return this;const n=t[t.length-1],r=[t[0]];let i;t.length===3&&typeof t[1]=="function"?i=t[1]:t.length>2&&r.push(...t.slice(1,t.length-1));let a=!1,o={};const u=(f,s)=>{a=!0,o[f]=s},c=!r.some(f=>qa(f,this.input,u))||i&&!i(this.input)?eG:{matched:!0,value:n(a?U2 in o?o[U2]:o:this.input,this.input)};return new tG(this.input,c)}when(t,n){if(this.state.matched)return this;const r=!!t(this.input);return new tG(this.input,r?{matched:!0,value:n(this.input,this.input)}:eG)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(){if(this.state.matched)return this.state.value;throw new __t(this.input)}run(){return this.exhaustive()}returnType(){return this}};function w_t(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}function A_t(){const e=w_t();if(e.__xstate__)return e.__xstate__}const M_t=e=>{if(typeof window>"u")return;const t=A_t();t&&t.register(e)};let lve=class{constructor(t){this._process=t,this._active=!1,this._current=null,this._last=null}start(){this._active=!0,this.flush()}clear(){this._current&&(this._current.next=null,this._last=this._current)}enqueue(t){const n={value:t,next:null};if(this._current){this._last.next=n,this._last=n;return}this._current=n,this._last=n,this._active&&this.flush()}flush(){for(;this._current;){const t=this._current;this._process(t.value),this._current=t.next}this._last=null}};const GFe=".",R_t="",HFe="",O_t="#",E_t="*",JFe="xstate.init",T_t="xstate.error",q2="xstate.stop";function C_t(e,t){return{type:`xstate.after.${e}.${t}`}}function nG(e,t){return{type:`xstate.done.state.${e}`,output:t}}function P_t(e,t){return{type:`xstate.done.actor.${e}`,output:t,actorId:e}}function YFe(e,t){return{type:`xstate.error.actor.${e}`,error:t,actorId:e}}function ZFe(e){return{type:JFe,input:e}}function _p(e){setTimeout(()=>{throw e})}const F_t=(()=>typeof Symbol=="function"&&Symbol.observable||"@@observable")();function XFe(e,t){const n=dve(e),r=dve(t);return typeof r=="string"?typeof n=="string"?r===n:!1:typeof n=="string"?n in r:Object.keys(n).every(i=>i in r?XFe(n[i],r[i]):!1)}function Tee(e){if(eWe(e))return e;let t=[],n="";for(let r=0;rtypeof t>"u"||typeof t=="string"?{target:t}:t)}function tWe(e){if(!(e===void 0||e===R_t))return vm(e)}function iG(e,t,n){var a,o,u;const r=typeof e=="object",i=r?e:void 0;return{next:(a=r?e.next:e)==null?void 0:a.bind(i),error:(o=r?e.error:t)==null?void 0:o.bind(i),complete:(u=r?e.complete:n)==null?void 0:u.bind(i)}}function hve(e,t){return`${t}.${e}`}function Cee(e,t){const n=t.match(/^xstate\.invoke\.(\d+)\.(.*)/);if(!n)return e.implementations.actors[t];const[,r,i]=n,o=e.getStateNodeById(i).config.invoke;return(Array.isArray(o)?o[r]:o).src}function vve(e,t){return`${e.sessionId}.${t}`}let j_t=0;function k_t(e,t){const n=new Map,r=new Map,i=new WeakMap,a=new Set,o={},{clock:u,logger:c}=t,f={schedule:(d,p,v,h,$=Math.random().toString(36).slice(2))=>{const b={source:d,target:p,event:v,delay:h,id:$,startedAt:Date.now()},y=vve(d,$);l._snapshot._scheduledEvents[y]=b;const m=u.setTimeout(()=>{delete o[y],delete l._snapshot._scheduledEvents[y],l._relay(d,p,v)},h);o[y]=m},cancel:(d,p)=>{const v=vve(d,p),h=o[v];delete o[v],delete l._snapshot._scheduledEvents[v],h!==void 0&&u.clearTimeout(h)},cancelAll:d=>{for(const p in l._snapshot._scheduledEvents){const v=l._snapshot._scheduledEvents[p];v.source===d&&f.cancel(d,v.id)}}},s=d=>{if(!a.size)return;const p={...d,rootId:e.sessionId};a.forEach(v=>{var h;return(h=v.next)==null?void 0:h.call(v,p)})},l={_snapshot:{_scheduledEvents:((t==null?void 0:t.snapshot)&&t.snapshot.scheduler)??{}},_bookId:()=>`x:${j_t++}`,_register:(d,p)=>(n.set(d,p),d),_unregister:d=>{n.delete(d.sessionId);const p=i.get(d);p!==void 0&&(r.delete(p),i.delete(d))},get:d=>r.get(d),_set:(d,p)=>{const v=r.get(d);if(v&&v!==p)throw new Error(`Actor with system ID '${d}' already exists.`);r.set(d,p),i.set(p,d)},inspect:d=>{const p=iG(d);return a.add(p),{unsubscribe(){a.delete(p)}}},_sendInspectionEvent:s,_relay:(d,p,v)=>{l._sendInspectionEvent({type:"@xstate.event",sourceRef:d,actorRef:p,event:v}),p._send(v)},scheduler:f,getSnapshot:()=>({_scheduledEvents:{...l._snapshot._scheduledEvents}}),start:()=>{const d=l._snapshot._scheduledEvents;l._snapshot._scheduledEvents={};for(const p in d){const{source:v,target:h,event:$,delay:b,id:y}=d[p];f.schedule(v,h,$,b,y)}},_clock:u,_logger:c};return l}const Pee=1;let Ho=function(e){return e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped",e}({});const U_t={clock:{setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e)},logger:console.log.bind(console),devTools:!1};let q_t=class{constructor(t,n){this.logic=t,this._snapshot=void 0,this.clock=void 0,this.options=void 0,this.id=void 0,this.mailbox=new lve(this._process.bind(this)),this.observers=new Set,this.eventListeners=new Map,this.logger=void 0,this._processingStatus=Ho.NotStarted,this._parent=void 0,this._syncSnapshot=void 0,this.ref=void 0,this._actorScope=void 0,this._systemId=void 0,this.sessionId=void 0,this.system=void 0,this._doneEvent=void 0,this.src=void 0,this._deferred=[];const r={...U_t,...n},{clock:i,logger:a,parent:o,syncSnapshot:u,id:c,systemId:f,inspect:s}=r;this.system=o?o.system:k_t(this,{clock:i,logger:a}),s&&!o&&this.system.inspect(iG(s)),this.sessionId=this.system._bookId(),this.id=c??this.sessionId,this.logger=(n==null?void 0:n.logger)??this.system._logger,this.clock=(n==null?void 0:n.clock)??this.system._clock,this._parent=o,this._syncSnapshot=u,this.options=r,this.src=r.src??t,this.ref=this,this._actorScope={self:this,id:this.id,sessionId:this.sessionId,logger:this.logger,defer:l=>{this._deferred.push(l)},system:this.system,stopChild:l=>{if(l._parent!==this)throw new Error(`Cannot stop child actor ${l.id} of ${this.id} because it is not a child`);l._stop()},emit:l=>{const d=this.eventListeners.get(l.type),p=this.eventListeners.get("*");if(!d&&!p)return;const v=new Set([...d?d.values():[],...p?p.values():[]]);for(const h of Array.from(v))h(l)}},this.send=this.send.bind(this),this.system._sendInspectionEvent({type:"@xstate.actor",actorRef:this}),f&&(this._systemId=f,this.system._set(f,this)),this._initState((n==null?void 0:n.snapshot)??(n==null?void 0:n.state)),f&&this._snapshot.status!=="active"&&this.system._unregister(this)}_initState(t){var n;try{this._snapshot=t?this.logic.restoreSnapshot?this.logic.restoreSnapshot(t,this._actorScope):t:this.logic.getInitialSnapshot(this._actorScope,(n=this.options)==null?void 0:n.input)}catch(r){this._snapshot={status:"error",output:void 0,error:r}}}update(t,n){var i,a;this._snapshot=t;let r;for(;r=this._deferred.shift();)try{r()}catch(o){this._deferred.length=0,this._snapshot={...t,status:"error",error:o}}switch(this._snapshot.status){case"active":for(const o of this.observers)try{(i=o.next)==null||i.call(o,t)}catch(u){_p(u)}break;case"done":for(const o of this.observers)try{(a=o.next)==null||a.call(o,t)}catch(u){_p(u)}this._stopProcedure(),this._complete(),this._doneEvent=P_t(this.id,this._snapshot.output),this._parent&&this.system._relay(this,this._parent,this._doneEvent);break;case"error":this._error(this._snapshot.error);break}this.system._sendInspectionEvent({type:"@xstate.snapshot",actorRef:this,event:n,snapshot:t})}subscribe(t,n,r){var a;const i=iG(t,n,r);if(this._processingStatus!==Ho.Stopped)this.observers.add(i);else switch(this._snapshot.status){case"done":try{(a=i.complete)==null||a.call(i)}catch(o){_p(o)}break;case"error":{const o=this._snapshot.error;if(!i.error)_p(o);else try{i.error(o)}catch(u){_p(u)}break}}return{unsubscribe:()=>{this.observers.delete(i)}}}on(t,n){let r=this.eventListeners.get(t);r||(r=new Set,this.eventListeners.set(t,r));const i=n.bind(void 0);return r.add(i),{unsubscribe:()=>{r.delete(i)}}}start(){if(this._processingStatus===Ho.Running)return this;this._syncSnapshot&&this.subscribe({next:r=>{r.status==="active"&&this.system._relay(this,this._parent,{type:`xstate.snapshot.${this.id}`,snapshot:r})},error:()=>{}}),this.system._register(this.sessionId,this),this._systemId&&this.system._set(this._systemId,this),this._processingStatus=Ho.Running;const t=ZFe(this.options.input);switch(this.system._sendInspectionEvent({type:"@xstate.event",sourceRef:this._parent,actorRef:this,event:t}),this._snapshot.status){case"done":return this.update(this._snapshot,t),this;case"error":return this._error(this._snapshot.error),this}if(this._parent||this.system.start(),this.logic.start)try{this.logic.start(this._snapshot,this._actorScope)}catch(r){return this._snapshot={...this._snapshot,status:"error",error:r},this._error(r),this}return this.update(this._snapshot,t),this.options.devTools&&this.attachDevTools(),this.mailbox.start(),this}_process(t){let n,r;try{n=this.logic.transition(this._snapshot,t,this._actorScope)}catch(i){r={err:i}}if(r){const{err:i}=r;this._snapshot={...this._snapshot,status:"error",error:i},this._error(i);return}this.update(n,t),t.type===q2&&(this._stopProcedure(),this._complete())}_stop(){return this._processingStatus===Ho.Stopped?this:(this.mailbox.clear(),this._processingStatus===Ho.NotStarted?(this._processingStatus=Ho.Stopped,this):(this.mailbox.enqueue({type:q2}),this))}stop(){if(this._parent)throw new Error("A non-root actor cannot be stopped directly.");return this._stop()}_complete(){var t;for(const n of this.observers)try{(t=n.complete)==null||t.call(n)}catch(r){_p(r)}this.observers.clear()}_reportError(t){if(!this.observers.size){this._parent||_p(t);return}let n=!1;for(const r of this.observers){const i=r.error;n||(n=!i);try{i==null||i(t)}catch(a){_p(a)}}this.observers.clear(),n&&_p(t)}_error(t){this._stopProcedure(),this._reportError(t),this._parent&&this.system._relay(this,this._parent,YFe(this.id,t))}_stopProcedure(){return this._processingStatus!==Ho.Running?this:(this.system.scheduler.cancelAll(this),this.mailbox.clear(),this.mailbox=new lve(this._process.bind(this)),this._processingStatus=Ho.Stopped,this.system._unregister(this),this)}_send(t){this._processingStatus!==Ho.Stopped&&this.mailbox.enqueue(t)}send(t){this.system._relay(void 0,this,t)}attachDevTools(){const{devTools:t}=this.options;t&&(typeof t=="function"?t:M_t)(this)}toJSON(){return{xstate$$type:Pee,id:this.id}}getPersistedSnapshot(t){return this.logic.getPersistedSnapshot(this._snapshot,t)}[F_t](){return this}getSnapshot(){return this._snapshot}};function MI(e,...[t]){return new q_t(e,t)}function x_t(e,t,n,r,{sendId:i}){const a=typeof i=="function"?i(n,r):i;return[t,a]}function D_t(e,t){e.defer(()=>{e.system.scheduler.cancel(e.self,t)})}function nWe(e){function t(n,r){}return t.type="xstate.cancel",t.sendId=e,t.resolve=x_t,t.execute=D_t,t}function L_t(e,t,n,r,{id:i,systemId:a,src:o,input:u,syncSnapshot:c}){const f=typeof o=="string"?Cee(t.machine,o):o,s=typeof i=="function"?i(n):i;let l;return f&&(l=MI(f,{id:s,src:o,parent:e.self,syncSnapshot:c,systemId:a,input:typeof u=="function"?u({context:t.context,event:n.event,self:e.self}):u})),[mb(t,{children:{...t.children,[s]:l}}),{id:i,actorRef:l}]}function B_t(e,{id:t,actorRef:n}){n&&e.defer(()=>{n._processingStatus!==Ho.Stopped&&n.start()})}function rWe(...[e,{id:t,systemId:n,input:r,syncSnapshot:i=!1}={}]){function a(o,u){}return a.type="snapshot.spawnChild",a.id=t,a.systemId=n,a.src=e,a.input=r,a.syncSnapshot=i,a.resolve=L_t,a.execute=B_t,a}function V_t(e,t,n,r,{actorRef:i}){const a=typeof i=="function"?i(n,r):i,o=typeof a=="string"?t.children[a]:a;let u=t.children;return o&&(u={...u},delete u[o.id]),[mb(t,{children:u}),o]}function z_t(e,t){if(t){if(e.system._unregister(t),t._processingStatus!==Ho.Running){e.stopChild(t);return}e.defer(()=>{e.stopChild(t)})}}function Fee(e){function t(n,r){}return t.type="xstate.stopChild",t.actorRef=e,t.resolve=V_t,t.execute=z_t,t}function OD(e,t,n,r){const{machine:i}=r,a=typeof e=="function",o=a?e:i.implementations.guards[typeof e=="string"?e:e.type];if(!a&&!o)throw new Error(`Guard '${typeof e=="string"?e:e.type}' is not implemented.'.`);if(typeof o!="function")return OD(o,t,n,r);const u={context:t,event:n},c=a||typeof e=="string"?void 0:"params"in e?typeof e.params=="function"?e.params({context:t,event:n}):e.params:void 0;return"check"in o?o.check(r,u,o):o(u,c)}const Wee=e=>e.type==="atomic"||e.type==="final";function RI(e){return Object.values(e.states).filter(t=>t.type!=="history")}function KC(e,t){const n=[];if(t===e)return n;let r=e.parent;for(;r&&r!==t;)n.push(r),r=r.parent;return n}function x2(e){const t=new Set(e),n=aWe(t);for(const r of t)if(r.type==="compound"&&(!n.get(r)||!n.get(r).length))mve(r).forEach(i=>t.add(i));else if(r.type==="parallel"){for(const i of RI(r))if(i.type!=="history"&&!t.has(i)){const a=mve(i);for(const o of a)t.add(o)}}for(const r of t){let i=r.parent;for(;i;)t.add(i),i=i.parent}return t}function iWe(e,t){const n=t.get(e);if(!n)return{};if(e.type==="compound"){const i=n[0];if(i){if(Wee(i))return i.key}else return{}}const r={};for(const i of n)r[i.key]=iWe(i,t);return r}function aWe(e){const t=new Map;for(const n of e)t.has(n)||t.set(n,[]),n.parent&&(t.has(n.parent)||t.set(n.parent,[]),t.get(n.parent).push(n));return t}function oWe(e,t){const n=x2(t);return iWe(e,aWe(n))}function Nee(e,t){return t.type==="compound"?RI(t).some(n=>n.type==="final"&&e.has(n)):t.type==="parallel"?RI(t).every(n=>Nee(e,n)):t.type==="final"}const ED=e=>e[0]===O_t;function K_t(e,t){return e.transitions.get(t)||[...e.transitions.keys()].filter(r=>{if(r===E_t)return!0;if(!r.endsWith(".*"))return!1;const i=r.split("."),a=t.split(".");for(let o=0;oi.length-r.length).flatMap(r=>e.transitions.get(r))}function G_t(e){const t=e.config.after;if(!t)return[];const n=(i,a)=>{const o=C_t(i,e.id),u=o.type;return e.entry.push(hWe(o,{id:u,delay:i})),e.exit.push(nWe(u)),u};return Object.keys(t).flatMap((i,a)=>{const o=t[i],u=typeof o=="string"?{target:o}:o,c=Number.isNaN(+i)?i:+i,f=n(c);return vm(u).map(s=>({...s,event:f,delay:c}))}).map(i=>{const{delay:a}=i;return{...zy(e,i.event,i),delay:a}})}function zy(e,t,n){const r=tWe(n.target),i=n.reenter??!1,a=Y_t(e,r),o={...n,actions:vm(n.actions),guard:n.guard,target:a,source:e,reenter:i,eventType:t,toJSON:()=>({...o,source:`#${e.id}`,target:a?a.map(u=>`#${u.id}`):void 0})};return o}function H_t(e){const t=new Map;if(e.config.on)for(const n of Object.keys(e.config.on)){if(n===HFe)throw new Error('Null events ("") cannot be specified as a transition key. Use `always: { ... }` instead.');const r=e.config.on[n];t.set(n,x1(r).map(i=>zy(e,n,i)))}if(e.config.onDone){const n=`xstate.done.state.${e.id}`;t.set(n,x1(e.config.onDone).map(r=>zy(e,n,r)))}for(const n of e.invoke){if(n.onDone){const r=`xstate.done.actor.${n.id}`;t.set(r,x1(n.onDone).map(i=>zy(e,r,i)))}if(n.onError){const r=`xstate.error.actor.${n.id}`;t.set(r,x1(n.onError).map(i=>zy(e,r,i)))}if(n.onSnapshot){const r=`xstate.snapshot.${n.id}`;t.set(r,x1(n.onSnapshot).map(i=>zy(e,r,i)))}}for(const n of e.after){let r=t.get(n.eventType);r||(r=[],t.set(n.eventType,r)),r.push(n)}return t}function J_t(e,t){const n=typeof t=="string"?e.states[t]:t?e.states[t.target]:void 0;if(!n&&t)throw new Error(`Initial state node "${t}" not found on parent state node #${e.id}`);const r={source:e,actions:!t||typeof t=="string"?[]:vm(t.actions),eventType:null,reenter:!1,target:n?[n]:[],toJSON:()=>({...r,source:`#${e.id}`,target:n?[`#${n.id}`]:[]})};return r}function Y_t(e,t){if(t!==void 0)return t.map(n=>{if(typeof n!="string")return n;if(ED(n))return e.machine.getStateNodeById(n);const r=n[0]===GFe;if(r&&!e.parent)return D2(e,n.slice(1));const i=r?e.key+n:n;if(e.parent)try{return D2(e.parent,i)}catch(a){throw new Error(`Invalid transition definition for state node '${e.id}': ${a.message}`)}else throw new Error(`Invalid target: "${n}" is not a valid target from the root node. Did you mean ".${n}"?`)})}function uWe(e){const t=tWe(e.config.target);return t?{target:t.map(n=>typeof n=="string"?D2(e.parent,n):n)}:e.parent.initial}function Hy(e){return e.type==="history"}function mve(e){const t=cWe(e);for(const n of t)for(const r of KC(n,e))t.add(r);return t}function cWe(e){const t=new Set;function n(r){if(!t.has(r)){if(t.add(r),r.type==="compound")n(r.initial.target[0]);else if(r.type==="parallel")for(const i of RI(r))n(i)}}return n(e),t}function OI(e,t){if(ED(t))return e.machine.getStateNodeById(t);if(!e.states)throw new Error(`Unable to retrieve child state '${t}' from '${e.id}'; no child states exist.`);const n=e.states[t];if(!n)throw new Error(`Child state '${t}' does not exist on '${e.id}'`);return n}function D2(e,t){if(typeof t=="string"&&ED(t))try{return e.machine.getStateNodeById(t)}catch{}const n=Tee(t).slice();let r=e;for(;n.length;){const i=n.shift();if(!i.length)break;r=OI(r,i)}return r}function L2(e,t){if(typeof t=="string"){const i=e.states[t];if(!i)throw new Error(`State '${t}' does not exist on '${e.id}'`);return[e,i]}const n=Object.keys(t),r=n.map(i=>OI(e,i)).filter(Boolean);return[e.machine.root,e].concat(r,n.reduce((i,a)=>{const o=OI(e,a);if(!o)return i;const u=L2(o,t[a]);return i.concat(u)},[]))}function Z_t(e,t,n,r){const a=OI(e,t).next(n,r);return!a||!a.length?e.next(n,r):a}function X_t(e,t,n,r){const i=Object.keys(t),a=OI(e,i[0]),o=jee(a,t[i[0]],n,r);return!o||!o.length?e.next(n,r):o}function Q_t(e,t,n,r){const i=[];for(const a of Object.keys(t)){const o=t[a];if(!o)continue;const u=OI(e,a),c=jee(u,o,n,r);c&&i.push(...c)}return i.length?i:e.next(n,r)}function jee(e,t,n,r){return typeof t=="string"?Z_t(e,t,n,r):Object.keys(t).length===1?X_t(e,t,n,r):Q_t(e,t,n,r)}function eSt(e){return Object.keys(e.states).map(t=>e.states[t]).filter(t=>t.type==="history")}function Pm(e,t){let n=e;for(;n.parent&&n.parent!==t;)n=n.parent;return n.parent===t}function tSt(e,t){const n=new Set(e),r=new Set(t);for(const i of n)if(r.has(i))return!0;for(const i of r)if(n.has(i))return!0;return!1}function fWe(e,t,n){const r=new Set;for(const i of e){let a=!1;const o=new Set;for(const u of r)if(tSt(aG([i],t,n),aG([u],t,n)))if(Pm(i.source,u.source))o.add(u);else{a=!0;break}if(!a){for(const u of o)r.delete(u);r.add(i)}}return Array.from(r)}function nSt(e){const[t,...n]=e;for(const r of KC(t,void 0))if(n.every(i=>Pm(i,r)))return r}function kee(e,t){if(!e.target)return[];const n=new Set;for(const r of e.target)if(Hy(r))if(t[r.id])for(const i of t[r.id])n.add(i);else for(const i of kee(uWe(r),t))n.add(i);else n.add(r);return[...n]}function sWe(e,t){const n=kee(e,t);if(!n)return;if(!e.reenter&&n.every(i=>i===e.source||Pm(i,e.source)))return e.source;const r=nSt(n.concat(e.source));if(r)return r;if(!e.reenter)return e.source.machine.root}function aG(e,t,n){var i;const r=new Set;for(const a of e)if((i=a.target)!=null&&i.length){const o=sWe(a,n);a.reenter&&a.source===o&&r.add(o);for(const u of t)Pm(u,o)&&r.add(u)}return[...r]}function rSt(e,t){if(e.length!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function oG(e,t,n,r,i,a){if(!e.length)return t;const o=new Set(t._nodes);let u=t.historyValue;const c=fWe(e,o,u);let f=t;i||([f,u]=uSt(f,r,n,c,o,u,a)),f=EI(f,r,n,c.flatMap(l=>l.actions),a),f=aSt(f,r,n,c,o,a,u,i);const s=[...o];f.status==="done"&&(f=EI(f,r,n,s.sort((l,d)=>d.order-l.order).flatMap(l=>l.exit),a));try{return u===t.historyValue&&rSt(t._nodes,o)?f:mb(f,{_nodes:s,historyValue:u})}catch(l){throw l}}function iSt(e,t,n,r,i){if(r.output===void 0)return;const a=nG(i.id,i.output!==void 0&&i.parent?rG(i.output,e.context,t,n.self):void 0);return rG(r.output,e.context,a,n.self)}function aSt(e,t,n,r,i,a,o,u){let c=e;const f=new Set,s=new Set;oSt(r,o,s,f),u&&s.add(e.machine.root);const l=new Set;for(const d of[...f].sort((p,v)=>p.order-v.order)){i.add(d);const p=[];p.push(...d.entry);for(const v of d.invoke)p.push(rWe(v.src,{...v,syncSnapshot:!!v.onSnapshot}));if(s.has(d)){const v=d.initial.actions;p.push(...v)}if(c=EI(c,t,n,p,a,d.invoke.map(v=>v.id)),d.type==="final"){const v=d.parent;let h=(v==null?void 0:v.type)==="parallel"?v:v==null?void 0:v.parent,$=h||d;for((v==null?void 0:v.type)==="compound"&&a.push(nG(v.id,d.output!==void 0?rG(d.output,c.context,t,n.self):void 0));(h==null?void 0:h.type)==="parallel"&&!l.has(h)&&Nee(i,h);)l.add(h),a.push(nG(h.id)),$=h,h=h.parent;if(h)continue;c=mb(c,{status:"done",output:iSt(c,t,n,c.machine.root,$)})}}return c}function oSt(e,t,n,r){for(const i of e){const a=sWe(i,t);for(const u of i.target||[])!Hy(u)&&(i.source!==u||i.source!==a||i.reenter)&&(r.add(u),n.add(u)),G1(u,t,n,r);const o=kee(i,t);for(const u of o){const c=KC(u,a);(a==null?void 0:a.type)==="parallel"&&c.push(a),lWe(r,t,n,c,!i.source.parent&&i.reenter?void 0:a)}}}function G1(e,t,n,r){var i;if(Hy(e))if(t[e.id]){const a=t[e.id];for(const o of a)r.add(o),G1(o,t,n,r);for(const o of a)A8(o,e.parent,r,t,n)}else{const a=uWe(e);for(const o of a.target)r.add(o),a===((i=e.parent)==null?void 0:i.initial)&&n.add(e.parent),G1(o,t,n,r);for(const o of a.target)A8(o,e.parent,r,t,n)}else if(e.type==="compound"){const[a]=e.initial.target;Hy(a)||(r.add(a),n.add(a)),G1(a,t,n,r),A8(a,e,r,t,n)}else if(e.type==="parallel")for(const a of RI(e).filter(o=>!Hy(o)))[...r].some(o=>Pm(o,a))||(Hy(a)||(r.add(a),n.add(a)),G1(a,t,n,r))}function lWe(e,t,n,r,i){for(const a of r)if((!i||Pm(a,i))&&e.add(a),a.type==="parallel")for(const o of RI(a).filter(u=>!Hy(u)))[...e].some(u=>Pm(u,o))||(e.add(o),G1(o,t,n,e))}function A8(e,t,n,r,i){lWe(n,r,i,KC(e,t))}function uSt(e,t,n,r,i,a,o){let u=e;const c=aG(r,i,a);c.sort((s,l)=>l.order-s.order);let f;for(const s of c)for(const l of eSt(s)){let d;l.history==="deep"?d=p=>Wee(p)&&Pm(p,s):d=p=>p.parent===s,f??(f={...a}),f[l.id]=Array.from(i).filter(d)}for(const s of c)u=EI(u,t,n,[...s.exit,...s.invoke.map(l=>Fee(l.id))],o),i.delete(s);return[u,f||a]}let gve=!1;function dWe(e,t,n,r,i,a){const{machine:o}=e;let u=e;for(const c of r){let p=function(){n.system._sendInspectionEvent({type:"@xstate.action",actorRef:n.self,action:{type:typeof c=="string"?c:typeof c=="object"?c.type:c.name||"(anonymous)",params:d}});try{gve=s,s(l,d)}finally{gve=!1}};const f=typeof c=="function",s=f?c:o.implementations.actions[typeof c=="string"?c:c.type];if(!s)continue;const l={context:u.context,event:t,self:n.self,system:n.system},d=f||typeof c=="string"?void 0:"params"in c?typeof c.params=="function"?c.params({context:u.context,event:t}):c.params:void 0;if(!("resolve"in s)){n.self._processingStatus===Ho.Running?p():n.defer(()=>{p()});continue}const v=s,[h,$,b]=v.resolve(n,u,l,d,s,i);u=h,"retryResolve"in v&&(a==null||a.push([v,$])),"execute"in v&&(n.self._processingStatus===Ho.Running?v.execute(n,$):n.defer(v.execute.bind(null,n,$))),b&&(u=dWe(u,t,n,b,i,a))}return u}function EI(e,t,n,r,i,a){const o=a?[]:void 0,u=dWe(e,t,n,r,{internalQueue:i,deferredActorIds:a},o);return o==null||o.forEach(([c,f])=>{c.retryResolve(n,u,f)}),u}function M8(e,t,n,r=[]){let i=e;const a=[];function o(f,s,l){n.system._sendInspectionEvent({type:"@xstate.microstep",actorRef:n.self,event:s,snapshot:f,_transitions:l}),a.push(f)}if(t.type===q2)return i=mb(yve(i,t,n),{status:"stopped"}),o(i,t,[]),{snapshot:i,microstates:a};let u=t;if(u.type!==JFe){const f=u,s=N_t(f),l=bve(f,i);if(s&&!l.length)return i=mb(e,{status:"error",error:f.error}),o(i,f,[]),{snapshot:i,microstates:a};i=oG(l,e,n,u,!1,r),o(i,f,l)}let c=!0;for(;i.status==="active";){let f=c?cSt(i,u):[];const s=f.length?i:void 0;if(!f.length){if(!r.length)break;u=r.shift(),f=bve(u,i)}i=oG(f,i,n,u,!1,r),c=i!==s,o(i,u,f)}return i.status!=="active"&&yve(i,u,n),{snapshot:i,microstates:a}}function yve(e,t,n){return EI(e,t,n,Object.values(e.children).map(r=>Fee(r)),[])}function bve(e,t){return t.machine.getTransitionData(t,e)}function cSt(e,t){const n=new Set,r=e._nodes.filter(Wee);for(const i of r)e:for(const a of[i].concat(KC(i,void 0)))if(a.always){for(const o of a.always)if(o.guard===void 0||OD(o.guard,e.context,t,e)){n.add(o);break e}}return fWe(Array.from(n),new Set(e._nodes),e.historyValue)}function fSt(e,t){const n=x2(L2(e,t));return oWe(e,[...n])}function sSt(e){return!!e&&typeof e=="object"&&"machine"in e&&"value"in e}const lSt=function(t){return XFe(t,this.value)},dSt=function(t){return this.tags.has(t)},pSt=function(t){const n=this.machine.getTransitionData(this,t);return!!(n!=null&&n.length)&&n.some(r=>r.target!==void 0||r.actions.length)},hSt=function(){const{_nodes:t,tags:n,machine:r,getMeta:i,toJSON:a,can:o,hasTag:u,matches:c,...f}=this;return{...f,tags:Array.from(n)}},vSt=function(){return this._nodes.reduce((t,n)=>(n.meta!==void 0&&(t[n.id]=n.meta),t),{})};function f2(e,t){return{status:e.status,output:e.output,error:e.error,machine:t,context:e.context,_nodes:e._nodes,value:oWe(t.root,e._nodes),tags:new Set(e._nodes.flatMap(n=>n.tags)),children:e.children,historyValue:e.historyValue||{},matches:lSt,hasTag:dSt,can:pSt,getMeta:vSt,toJSON:hSt}}function mb(e,t={}){return f2({...e,...t},e.machine)}function mSt(e,t){const{_nodes:n,tags:r,machine:i,children:a,context:o,can:u,hasTag:c,matches:f,getMeta:s,toJSON:l,...d}=e,p={};for(const h in a){const $=a[h];p[h]={snapshot:$.getPersistedSnapshot(t),src:$.src,systemId:$._systemId,syncSnapshot:$._syncSnapshot}}return{...d,context:pWe(o),children:p}}function pWe(e){let t;for(const n in e){const r=e[n];if(r&&typeof r=="object")if("sessionId"in r&&"send"in r&&"ref"in r)t??(t=Array.isArray(e)?e.slice():{...e}),t[n]={xstate$$type:Pee,id:r.id};else{const i=pWe(r);i!==r&&(t??(t=Array.isArray(e)?e.slice():{...e}),t[n]=i)}}return t??e}function gSt(e,t,n,r,{event:i,id:a,delay:o},{internalQueue:u}){const c=t.machine.implementations.delays;if(typeof i=="string")throw new Error(`Only event objects may be used with raise; use raise({ type: "${i}" }) instead`);const f=typeof i=="function"?i(n,r):i;let s;if(typeof o=="string"){const l=c&&c[o];s=typeof l=="function"?l(n,r):l}else s=typeof o=="function"?o(n,r):o;return typeof s!="number"&&u.push(f),[t,{event:f,id:a,delay:s}]}function ySt(e,t){const{event:n,delay:r,id:i}=t;if(typeof r=="number"){e.defer(()=>{const a=e.self;e.system.scheduler.schedule(a,a,n,r,i)});return}}function hWe(e,t){function n(r,i){}return n.type="xstate.raise",n.event=e,n.id=t==null?void 0:t.id,n.delay=t==null?void 0:t.delay,n.resolve=gSt,n.execute=ySt,n}const $ve="xstate.promise.resolve",Ive="xstate.promise.reject",Gk=new WeakMap;function Uee(e){return{config:e,transition:(n,r,i)=>{var a;if(n.status!=="active")return n;switch(r.type){case $ve:{const o=r.data;return{...n,status:"done",output:o,input:void 0}}case Ive:return{...n,status:"error",error:r.data,input:void 0};case q2:return(a=Gk.get(i.self))==null||a.abort(),{...n,status:"stopped",input:void 0};default:return n}},start:(n,{self:r,system:i,emit:a})=>{if(n.status!=="active")return;const o=new AbortController;Gk.set(r,o),Promise.resolve(e({input:n.input,system:i,self:r,signal:o.signal,emit:a})).then(c=>{r.getSnapshot().status==="active"&&(Gk.delete(r),i._relay(r,r,{type:$ve,data:c}))},c=>{r.getSnapshot().status==="active"&&(Gk.delete(r),i._relay(r,r,{type:Ive,data:c}))})},getInitialSnapshot:(n,r)=>({status:"active",output:void 0,error:void 0,input:r}),getPersistedSnapshot:n=>n,restoreSnapshot:n=>n}}function bSt(e,{machine:t,context:n},r,i){const a=(o,u={})=>{const{systemId:c,input:f}=u;if(typeof o=="string"){const s=Cee(t,o);if(!s)throw new Error(`Actor logic '${o}' not implemented in machine '${t.id}'`);const l=MI(s,{id:u.id,parent:e.self,syncSnapshot:u.syncSnapshot,input:typeof f=="function"?f({context:n,event:r,self:e.self}):f,src:o,systemId:c});return i[l.id]=l,l}else return MI(o,{id:u.id,parent:e.self,syncSnapshot:u.syncSnapshot,input:u.input,src:o,systemId:c})};return(o,u)=>{const c=a(o,u);return i[c.id]=c,e.defer(()=>{c._processingStatus!==Ho.Stopped&&c.start()}),c}}function $St(e,t,n,r,{assignment:i}){if(!t.context)throw new Error("Cannot assign to undefined `context`. Ensure that `context` is defined in the machine config.");const a={},o={context:t.context,event:n.event,spawn:bSt(e,t,n.event,a),self:e.self,system:e.system};let u={};if(typeof i=="function")u=i(o,r);else for(const f of Object.keys(i)){const s=i[f];u[f]=typeof s=="function"?s(o,r):s}const c=Object.assign({},t.context,u);return[mb(t,{context:c,children:Object.keys(a).length?{...t.children,...a}:t.children})]}function TI(e){function t(n,r){}return t.type="xstate.assign",t.assignment=e,t.resolve=$St,t}function ISt(e,t,n,r,{event:i}){const a=typeof i=="function"?i(n,r):i;return[t,{event:a}]}function _St(e,{event:t}){e.defer(()=>e.emit(t))}function SSt(e){function t(n,r){}return t.type="xstate.emit",t.event=e,t.resolve=ISt,t.execute=_St,t}let uG=function(e){return e.Parent="#_parent",e.Internal="#_internal",e}({});function wSt(e,t,n,r,{to:i,event:a,id:o,delay:u},c){var v;const f=t.machine.implementations.delays;if(typeof a=="string")throw new Error(`Only event objects may be used with sendTo; use sendTo({ type: "${a}" }) instead`);const s=typeof a=="function"?a(n,r):a;let l;if(typeof u=="string"){const h=f&&f[u];l=typeof h=="function"?h(n,r):h}else l=typeof u=="function"?u(n,r):u;const d=typeof i=="function"?i(n,r):i;let p;if(typeof d=="string"){if(d===uG.Parent?p=e.self._parent:d===uG.Internal?p=e.self:d.startsWith("#_")?p=t.children[d.slice(2)]:p=(v=c.deferredActorIds)!=null&&v.includes(d)?d:t.children[d],!p)throw new Error(`Unable to send event to actor '${d}' from machine '${t.machine.id}'.`)}else p=d||e.self;return[t,{to:p,event:s,id:o,delay:l}]}function ASt(e,t,n){typeof n.to=="string"&&(n.to=t.children[n.to])}function MSt(e,t){e.defer(()=>{const{to:n,event:r,delay:i,id:a}=t;if(typeof i=="number"){e.system.scheduler.schedule(e.self,n,r,i,a);return}e.system._relay(e.self,n,r.type===T_t?YFe(e.self.id,r.data):r)})}function vWe(e,t,n){function r(i,a){}return r.type="xsnapshot.sendTo",r.to=e,r.event=t,r.id=n==null?void 0:n.id,r.delay=n==null?void 0:n.delay,r.resolve=wSt,r.retryResolve=ASt,r.execute=MSt,r}function RSt(e,t){return vWe(uG.Parent,e,t)}function OSt(e,t,n,r,{collect:i}){const a=[],o=function(c){a.push(c)};return o.assign=(...u)=>{a.push(TI(...u))},o.cancel=(...u)=>{a.push(nWe(...u))},o.raise=(...u)=>{a.push(hWe(...u))},o.sendTo=(...u)=>{a.push(vWe(...u))},o.sendParent=(...u)=>{a.push(RSt(...u))},o.spawnChild=(...u)=>{a.push(rWe(...u))},o.stopChild=(...u)=>{a.push(Fee(...u))},o.emit=(...u)=>{a.push(SSt(...u))},i({context:n.context,event:n.event,enqueue:o,check:u=>OD(u,t.context,n.event,t),self:e.self,system:e.system},r),[t,void 0,a]}function af(e){function t(n,r){}return t.type="xstate.enqueueActions",t.collect=e,t.resolve=OSt,t}function ESt(e,t,n,r,{value:i,label:a}){return[t,{value:typeof i=="function"?i(n,r):i,label:a}]}function TSt({logger:e},{value:t,label:n}){n?e(n,t):e(t)}function eE(e=({context:n,event:r})=>({context:n,event:r}),t){function n(r,i){}return n.type="xstate.log",n.value=e,n.label=t,n.resolve=ESt,n.execute=TSt,n}const _ve=new WeakMap;function I1(e,t,n){let r=_ve.get(e);return r?t in r||(r[t]=n()):(r={[t]:n()},_ve.set(e,r)),r[t]}const CSt={},bR=e=>typeof e=="string"?{type:e}:typeof e=="function"?"resolve"in e?{type:e.type}:{type:e.name}:e;let PSt=class mWe{constructor(t,n){if(this.config=t,this.key=void 0,this.id=void 0,this.type=void 0,this.path=void 0,this.states=void 0,this.history=void 0,this.entry=void 0,this.exit=void 0,this.parent=void 0,this.machine=void 0,this.meta=void 0,this.output=void 0,this.order=-1,this.description=void 0,this.tags=[],this.transitions=void 0,this.always=void 0,this.parent=n._parent,this.key=n._key,this.machine=n._machine,this.path=this.parent?this.parent.path.concat(this.key):[],this.id=this.config.id||[this.machine.id,...this.path].join(GFe),this.type=this.config.type||(this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.description=this.config.description,this.order=this.machine.idMap.size,this.machine.idMap.set(this.id,this),this.states=this.config.states?pve(this.config.states,(r,i)=>new mWe(r,{_parent:this,_key:i,_machine:this.machine})):CSt,this.type==="compound"&&!this.config.initial)throw new Error(`No initial state specified for compound state node "#${this.id}". Try adding { initial: "${Object.keys(this.states)[0]}" } to the state config.`);this.history=this.config.history===!0?"shallow":this.config.history||!1,this.entry=vm(this.config.entry).slice(),this.exit=vm(this.config.exit).slice(),this.meta=this.config.meta,this.output=this.type==="final"||!this.parent?this.config.output:void 0,this.tags=vm(t.tags).slice()}_initialize(){this.transitions=H_t(this),this.config.always&&(this.always=x1(this.config.always).map(t=>zy(this,HFe,t))),Object.keys(this.states).forEach(t=>{this.states[t]._initialize()})}get definition(){return{id:this.id,key:this.key,version:this.machine.version,type:this.type,initial:this.initial?{target:this.initial.target,source:this,actions:this.initial.actions.map(bR),eventType:null,reenter:!1,toJSON:()=>({target:this.initial.target.map(t=>`#${t.id}`),source:`#${this.id}`,actions:this.initial.actions.map(bR),eventType:null})}:void 0,history:this.history,states:pve(this.states,t=>t.definition),on:this.on,transitions:[...this.transitions.values()].flat().map(t=>({...t,actions:t.actions.map(bR)})),entry:this.entry.map(bR),exit:this.exit.map(bR),meta:this.meta,order:this.order||-1,output:this.output,invoke:this.invoke,description:this.description,tags:this.tags}}toJSON(){return this.definition}get invoke(){return I1(this,"invoke",()=>vm(this.config.invoke).map((t,n)=>{const{src:r,systemId:i}=t,a=t.id??hve(this.id,n),o=typeof r=="string"?r:`xstate.invoke.${hve(this.id,n)}`;return{...t,src:o,id:a,systemId:i,toJSON(){const{onDone:u,onError:c,...f}=t;return{...f,type:"xstate.invoke",src:o,id:a}}}}))}get on(){return I1(this,"on",()=>[...this.transitions].flatMap(([n,r])=>r.map(i=>[n,i])).reduce((n,[r,i])=>(n[r]=n[r]||[],n[r].push(i),n),{}))}get after(){return I1(this,"delayedTransitions",()=>G_t(this))}get initial(){return I1(this,"initial",()=>J_t(this,this.config.initial))}next(t,n){const r=n.type,i=[];let a;const o=I1(this,`candidates-${r}`,()=>K_t(this,r));for(const u of o){const{guard:c}=u,f=t.context;let s=!1;try{s=!c||OD(c,f,n,t)}catch(l){const d=typeof c=="string"?c:typeof c=="object"?c.type:void 0;throw new Error(`Unable to evaluate guard ${d?`'${d}' `:""}in transition for event '${r}' in state node '${this.id}': ${l.message}`)}if(s){i.push(...u.actions),a=u;break}}return a?[a]:void 0}get events(){return I1(this,"events",()=>{const{states:t}=this,n=new Set(this.ownEvents);if(t)for(const r of Object.keys(t)){const i=t[r];if(i.states)for(const a of i.events)n.add(`${a}`)}return Array.from(n)})}get ownEvents(){const t=new Set([...this.transitions.keys()].filter(n=>this.transitions.get(n).some(r=>!(!r.target&&!r.actions.length&&!r.reenter))));return Array.from(t)}};const FSt="#";let WSt=class gWe{constructor(t,n){this.config=t,this.version=void 0,this.schemas=void 0,this.implementations=void 0,this.__xstatenode=!0,this.idMap=new Map,this.root=void 0,this.id=void 0,this.states=void 0,this.events=void 0,this.id=t.id||"(machine)",this.implementations={actors:(n==null?void 0:n.actors)??{},actions:(n==null?void 0:n.actions)??{},delays:(n==null?void 0:n.delays)??{},guards:(n==null?void 0:n.guards)??{}},this.version=this.config.version,this.schemas=this.config.schemas,this.transition=this.transition.bind(this),this.getInitialSnapshot=this.getInitialSnapshot.bind(this),this.getPersistedSnapshot=this.getPersistedSnapshot.bind(this),this.restoreSnapshot=this.restoreSnapshot.bind(this),this.start=this.start.bind(this),this.root=new PSt(t,{_key:this.id,_machine:this}),this.root._initialize(),this.states=this.root.states,this.events=this.root.events}provide(t){const{actions:n,guards:r,actors:i,delays:a}=this.implementations;return new gWe(this.config,{actions:{...n,...t.actions},guards:{...r,...t.guards},actors:{...i,...t.actors},delays:{...a,...t.delays}})}resolveState(t){const n=fSt(this.root,t.value),r=x2(L2(this.root,n));return f2({_nodes:[...r],context:t.context||{},children:{},status:Nee(r,this.root)?"done":t.status||"active",output:t.output,error:t.error,historyValue:t.historyValue},this)}transition(t,n,r){return M8(t,n,r).snapshot}microstep(t,n,r){return M8(t,n,r).microstates}getTransitionData(t,n){return jee(this.root,t.value,t,n)||[]}getPreInitialState(t,n,r){const{context:i}=this.config,a=f2({context:typeof i!="function"&&i?i:{},_nodes:[this.root],children:{},status:"active"},this);return typeof i=="function"?EI(a,n,t,[TI(({spawn:u,event:c,self:f})=>i({spawn:u,input:c.input,self:f}))],r):a}getInitialSnapshot(t,n){const r=ZFe(n),i=[],a=this.getPreInitialState(t,r,i),o=oG([{target:[...cWe(this.root)],source:this.root,reenter:!0,actions:[],eventType:null,toJSON:null}],a,t,r,!0,i),{snapshot:u}=M8(o,r,t,i);return u}start(t){Object.values(t.children).forEach(n=>{n.getSnapshot().status==="active"&&n.start()})}getStateNodeById(t){const n=Tee(t),r=n.slice(1),i=ED(n[0])?n[0].slice(FSt.length):n[0],a=this.idMap.get(i);if(!a)throw new Error(`Child state node '#${i}' does not exist on machine '${this.id}'`);return D2(a,r)}get definition(){return this.root.definition}toJSON(){return this.definition}getPersistedSnapshot(t,n){return mSt(t,n)}restoreSnapshot(t,n){const r={},i=t.children;Object.keys(i).forEach(c=>{const f=i[c],s=f.snapshot,l=f.src,d=typeof l=="string"?Cee(this,l):l;if(!d)return;const p=MI(d,{id:c,parent:n.self,syncSnapshot:f.syncSnapshot,snapshot:s,src:l,systemId:f.systemId});r[c]=p});const a=f2({...t,children:r,_nodes:Array.from(x2(L2(this.root,t.value)))},this);let o=new Set;function u(c,f){if(!o.has(c)){o.add(c);for(let s in c){const l=c[s];if(l&&typeof l=="object"){if("xstate$$type"in l&&l.xstate$$type===Pee){c[s]=f[l.id];continue}u(l,f)}}}}return u(a.context,r),a}};function NSt(e,t){return new WSt(e,t)}function yWe({schemas:e,actors:t,actions:n,guards:r,delays:i}){return{createMachine:a=>NSt({...a,schemas:e},{actors:t,actions:n,guards:r,delays:i})}}const jSt={timeout:1/0};function kSt(e,t,n){const r={...jSt,...n};return new Promise((i,a)=>{const{signal:o}=r;if(o!=null&&o.aborted){a(o.reason);return}let u=!1;const c=r.timeout===1/0?void 0:setTimeout(()=>{f(),a(new Error(`Timeout of ${r.timeout} ms exceeded`))},r.timeout),f=()=>{clearTimeout(c),u=!0,d==null||d.unsubscribe(),l&&o.removeEventListener("abort",l)};function s(p){t(p)&&(f(),i(p))}let l,d;s(e.getSnapshot()),!u&&(o&&(l=()=>{f(),a(o.reason)},o.addEventListener("abort",l)),d=e.subscribe({next:s,error:p=>{f(),a(p)},complete:()=>{f(),a(new Error("Actor terminated without satisfying predicate"))}}),u&&d.unsubscribe())})}function bWe(e){return function(t){return function(n){return e.map(n,t)}}}function $We(e){return function(t){return function(n){return e.contramap(n,t)}}}function IWe(e){return function(t){return function(n){return e.mapWithIndex(n,t)}}}function _We(e){return function(t){return function(n){return e.ap(n,t)}}}function SWe(e){return function(t){return function(n){return e.chain(n,t)}}}function wWe(e){return function(t,n){return function(r){return e.bimap(r,t,n)}}}function AWe(e){return function(t){return function(n){return e.mapLeft(n,t)}}}function MWe(e){return function(t){return function(n){return e.extend(n,t)}}}function RWe(e){return function(t,n){return function(r){return e.reduce(r,t,n)}}}function OWe(e){return function(t){var n=e.foldMap(t);return function(r){return function(i){return n(i,r)}}}}function EWe(e){return function(t,n){return function(r){return e.reduceRight(r,t,n)}}}function TWe(e){return function(t,n){return function(r){return e.reduceWithIndex(r,t,n)}}}function CWe(e){return function(t){var n=e.foldMapWithIndex(t);return function(r){return function(i){return n(i,r)}}}}function PWe(e){return function(t,n){return function(r){return e.reduceRightWithIndex(r,t,n)}}}function FWe(e){return function(t){return function(n){return e.alt(n,t)}}}function WWe(e){return function(t){return function(n){return e.filter(n,t)}}}function NWe(e){return function(t){return function(n){return e.filterMap(n,t)}}}function jWe(e){return function(t){return function(n){return e.partition(n,t)}}}function kWe(e){return function(t){return function(n){return e.partitionMap(n,t)}}}function UWe(e){return function(t){return function(n){return e.filterWithIndex(n,t)}}}function qWe(e){return function(t){return function(n){return e.filterMapWithIndex(n,t)}}}function xWe(e){return function(t){return function(n){return e.partitionWithIndex(n,t)}}}function DWe(e){return function(t){return function(n){return e.partitionMapWithIndex(n,t)}}}function LWe(e){return function(t,n){return function(r){return e.promap(r,t,n)}}}function BWe(e){return function(t){return function(n){return e.compose(n,t)}}}var USt=function(e){return typeof e.map=="function"},qSt=function(e){return typeof e.contramap=="function"},xSt=function(e){return typeof e.mapWithIndex=="function"},DSt=function(e){return typeof e.ap=="function"},LSt=function(e){return typeof e.chain=="function"},BSt=function(e){return typeof e.bimap=="function"},VSt=function(e){return typeof e.extend=="function"},zSt=function(e){return typeof e.reduce=="function"},KSt=function(e){return typeof e.reduceWithIndex=="function"},GSt=function(e){return typeof e.alt=="function"},HSt=function(e){return typeof e.compact=="function"},JSt=function(e){return typeof e.filter=="function"},YSt=function(e){return typeof e.filterWithIndex=="function"},ZSt=function(e){return typeof e.promap=="function"},XSt=function(e){return typeof e.compose=="function"},QSt=function(e){return typeof e.throwError=="function"};function ewt(e){var t={};if(USt(e)&&(t.map=bWe(e)),qSt(e)&&(t.contramap=$We(e)),xSt(e)&&(t.mapWithIndex=IWe(e)),DSt(e)&&(t.ap=_We(e),t.apFirst=Gr(e),t.apSecond=Hr(e)),LSt(e)&&(t.chain=SWe(e),t.chainFirst=Db(e),t.flatten=t.chain(Re)),BSt(e)&&(t.bimap=wWe(e),t.mapLeft=AWe(e)),VSt(e)&&(t.extend=MWe(e),t.duplicate=t.extend(Re)),zSt(e)&&(t.reduce=RWe(e),t.foldMap=OWe(e),t.reduceRight=EWe(e)),KSt(e)&&(t.reduceWithIndex=TWe(e),t.foldMapWithIndex=CWe(e),t.reduceRightWithIndex=PWe(e)),GSt(e)&&(t.alt=FWe(e)),HSt(e)&&(t.compact=e.compact,t.separate=e.separate),JSt(e)&&(t.filter=WWe(e),t.filterMap=NWe(e),t.partition=jWe(e),t.partitionMap=kWe(e)),YSt(e)&&(t.filterWithIndex=UWe(e),t.filterMapWithIndex=qWe(e),t.partitionWithIndex=xWe(e),t.partitionMapWithIndex=DWe(e)),ZSt(e)&&(t.promap=LWe(e)),XSt(e)&&(t.compose=BWe(e)),QSt(e)){var n=function(o){return function(u){return u._tag==="None"?e.throwError(o()):e.of(u.value)}},r=function(o){return o._tag==="Left"?e.throwError(o.left):e.of(o.right)},i=function(o,u){return function(c){return o(c)?e.of(c):e.throwError(u(c))}},a=function(o,u){return function(c){return e.chain(c,function(f){return o(f)?e.of(f):e.throwError(u(f))})}};t.fromOption=n,t.fromEither=r,t.fromPredicate=i,t.filterOrElse=a}return t}var tt=R;const VWe=Object.freeze(Object.defineProperty({__proto__:null,alt:FWe,ap:_We,bimap:wWe,chain:SWe,compose:BWe,contramap:$We,extend:MWe,filter:WWe,filterMap:NWe,filterMapWithIndex:qWe,filterWithIndex:UWe,foldMap:OWe,foldMapWithIndex:CWe,map:bWe,mapLeft:AWe,mapWithIndex:IWe,partition:jWe,partitionMap:kWe,partitionMapWithIndex:DWe,partitionWithIndex:xWe,pipe:tt,pipeable:ewt,promap:LWe,reduce:RWe,reduceRight:EWe,reduceRightWithIndex:PWe,reduceWithIndex:TWe},Symbol.toStringTag,{value:"Module"}));var K=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function TD(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Et(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var zWe={exports:{}};(function(e,t){(function(n){e.exports=n()})(function(n){var r=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function i(b,y){var m=b[0],g=b[1],_=b[2],I=b[3];m+=(g&_|~g&I)+y[0]-680876936|0,m=(m<<7|m>>>25)+g|0,I+=(m&g|~m&_)+y[1]-389564586|0,I=(I<<12|I>>>20)+m|0,_+=(I&m|~I&g)+y[2]+606105819|0,_=(_<<17|_>>>15)+I|0,g+=(_&I|~_&m)+y[3]-1044525330|0,g=(g<<22|g>>>10)+_|0,m+=(g&_|~g&I)+y[4]-176418897|0,m=(m<<7|m>>>25)+g|0,I+=(m&g|~m&_)+y[5]+1200080426|0,I=(I<<12|I>>>20)+m|0,_+=(I&m|~I&g)+y[6]-1473231341|0,_=(_<<17|_>>>15)+I|0,g+=(_&I|~_&m)+y[7]-45705983|0,g=(g<<22|g>>>10)+_|0,m+=(g&_|~g&I)+y[8]+1770035416|0,m=(m<<7|m>>>25)+g|0,I+=(m&g|~m&_)+y[9]-1958414417|0,I=(I<<12|I>>>20)+m|0,_+=(I&m|~I&g)+y[10]-42063|0,_=(_<<17|_>>>15)+I|0,g+=(_&I|~_&m)+y[11]-1990404162|0,g=(g<<22|g>>>10)+_|0,m+=(g&_|~g&I)+y[12]+1804603682|0,m=(m<<7|m>>>25)+g|0,I+=(m&g|~m&_)+y[13]-40341101|0,I=(I<<12|I>>>20)+m|0,_+=(I&m|~I&g)+y[14]-1502002290|0,_=(_<<17|_>>>15)+I|0,g+=(_&I|~_&m)+y[15]+1236535329|0,g=(g<<22|g>>>10)+_|0,m+=(g&I|_&~I)+y[1]-165796510|0,m=(m<<5|m>>>27)+g|0,I+=(m&_|g&~_)+y[6]-1069501632|0,I=(I<<9|I>>>23)+m|0,_+=(I&g|m&~g)+y[11]+643717713|0,_=(_<<14|_>>>18)+I|0,g+=(_&m|I&~m)+y[0]-373897302|0,g=(g<<20|g>>>12)+_|0,m+=(g&I|_&~I)+y[5]-701558691|0,m=(m<<5|m>>>27)+g|0,I+=(m&_|g&~_)+y[10]+38016083|0,I=(I<<9|I>>>23)+m|0,_+=(I&g|m&~g)+y[15]-660478335|0,_=(_<<14|_>>>18)+I|0,g+=(_&m|I&~m)+y[4]-405537848|0,g=(g<<20|g>>>12)+_|0,m+=(g&I|_&~I)+y[9]+568446438|0,m=(m<<5|m>>>27)+g|0,I+=(m&_|g&~_)+y[14]-1019803690|0,I=(I<<9|I>>>23)+m|0,_+=(I&g|m&~g)+y[3]-187363961|0,_=(_<<14|_>>>18)+I|0,g+=(_&m|I&~m)+y[8]+1163531501|0,g=(g<<20|g>>>12)+_|0,m+=(g&I|_&~I)+y[13]-1444681467|0,m=(m<<5|m>>>27)+g|0,I+=(m&_|g&~_)+y[2]-51403784|0,I=(I<<9|I>>>23)+m|0,_+=(I&g|m&~g)+y[7]+1735328473|0,_=(_<<14|_>>>18)+I|0,g+=(_&m|I&~m)+y[12]-1926607734|0,g=(g<<20|g>>>12)+_|0,m+=(g^_^I)+y[5]-378558|0,m=(m<<4|m>>>28)+g|0,I+=(m^g^_)+y[8]-2022574463|0,I=(I<<11|I>>>21)+m|0,_+=(I^m^g)+y[11]+1839030562|0,_=(_<<16|_>>>16)+I|0,g+=(_^I^m)+y[14]-35309556|0,g=(g<<23|g>>>9)+_|0,m+=(g^_^I)+y[1]-1530992060|0,m=(m<<4|m>>>28)+g|0,I+=(m^g^_)+y[4]+1272893353|0,I=(I<<11|I>>>21)+m|0,_+=(I^m^g)+y[7]-155497632|0,_=(_<<16|_>>>16)+I|0,g+=(_^I^m)+y[10]-1094730640|0,g=(g<<23|g>>>9)+_|0,m+=(g^_^I)+y[13]+681279174|0,m=(m<<4|m>>>28)+g|0,I+=(m^g^_)+y[0]-358537222|0,I=(I<<11|I>>>21)+m|0,_+=(I^m^g)+y[3]-722521979|0,_=(_<<16|_>>>16)+I|0,g+=(_^I^m)+y[6]+76029189|0,g=(g<<23|g>>>9)+_|0,m+=(g^_^I)+y[9]-640364487|0,m=(m<<4|m>>>28)+g|0,I+=(m^g^_)+y[12]-421815835|0,I=(I<<11|I>>>21)+m|0,_+=(I^m^g)+y[15]+530742520|0,_=(_<<16|_>>>16)+I|0,g+=(_^I^m)+y[2]-995338651|0,g=(g<<23|g>>>9)+_|0,m+=(_^(g|~I))+y[0]-198630844|0,m=(m<<6|m>>>26)+g|0,I+=(g^(m|~_))+y[7]+1126891415|0,I=(I<<10|I>>>22)+m|0,_+=(m^(I|~g))+y[14]-1416354905|0,_=(_<<15|_>>>17)+I|0,g+=(I^(_|~m))+y[5]-57434055|0,g=(g<<21|g>>>11)+_|0,m+=(_^(g|~I))+y[12]+1700485571|0,m=(m<<6|m>>>26)+g|0,I+=(g^(m|~_))+y[3]-1894986606|0,I=(I<<10|I>>>22)+m|0,_+=(m^(I|~g))+y[10]-1051523|0,_=(_<<15|_>>>17)+I|0,g+=(I^(_|~m))+y[1]-2054922799|0,g=(g<<21|g>>>11)+_|0,m+=(_^(g|~I))+y[8]+1873313359|0,m=(m<<6|m>>>26)+g|0,I+=(g^(m|~_))+y[15]-30611744|0,I=(I<<10|I>>>22)+m|0,_+=(m^(I|~g))+y[6]-1560198380|0,_=(_<<15|_>>>17)+I|0,g+=(I^(_|~m))+y[13]+1309151649|0,g=(g<<21|g>>>11)+_|0,m+=(_^(g|~I))+y[4]-145523070|0,m=(m<<6|m>>>26)+g|0,I+=(g^(m|~_))+y[11]-1120210379|0,I=(I<<10|I>>>22)+m|0,_+=(m^(I|~g))+y[2]+718787259|0,_=(_<<15|_>>>17)+I|0,g+=(I^(_|~m))+y[9]-343485551|0,g=(g<<21|g>>>11)+_|0,b[0]=m+b[0]|0,b[1]=g+b[1]|0,b[2]=_+b[2]|0,b[3]=I+b[3]|0}function a(b){var y=[],m;for(m=0;m<64;m+=4)y[m>>2]=b.charCodeAt(m)+(b.charCodeAt(m+1)<<8)+(b.charCodeAt(m+2)<<16)+(b.charCodeAt(m+3)<<24);return y}function o(b){var y=[],m;for(m=0;m<64;m+=4)y[m>>2]=b[m]+(b[m+1]<<8)+(b[m+2]<<16)+(b[m+3]<<24);return y}function u(b){var y=b.length,m=[1732584193,-271733879,-1732584194,271733878],g,_,I,A,E,N;for(g=64;g<=y;g+=64)i(m,a(b.substring(g-64,g)));for(b=b.substring(g-64),_=b.length,I=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],g=0;g<_;g+=1)I[g>>2]|=b.charCodeAt(g)<<(g%4<<3);if(I[g>>2]|=128<<(g%4<<3),g>55)for(i(m,I),g=0;g<16;g+=1)I[g]=0;return A=y*8,A=A.toString(16).match(/(.*?)(.{0,8})$/),E=parseInt(A[2],16),N=parseInt(A[1],16)||0,I[14]=E,I[15]=N,i(m,I),m}function c(b){var y=b.length,m=[1732584193,-271733879,-1732584194,271733878],g,_,I,A,E,N;for(g=64;g<=y;g+=64)i(m,o(b.subarray(g-64,g)));for(b=g-64>2]|=b[g]<<(g%4<<3);if(I[g>>2]|=128<<(g%4<<3),g>55)for(i(m,I),g=0;g<16;g+=1)I[g]=0;return A=y*8,A=A.toString(16).match(/(.*?)(.{0,8})$/),E=parseInt(A[2],16),N=parseInt(A[1],16)||0,I[14]=E,I[15]=N,i(m,I),m}function f(b){var y="",m;for(m=0;m<4;m+=1)y+=r[b>>m*8+4&15]+r[b>>m*8&15];return y}function s(b){var y;for(y=0;yI?new ArrayBuffer(0):(A=I-_,E=new ArrayBuffer(A),N=new Uint8Array(E),U=new Uint8Array(this,_,A),N.set(U),E)}}();function l(b){return/[\u0080-\uFFFF]/.test(b)&&(b=unescape(encodeURIComponent(b))),b}function d(b,y){var m=b.length,g=new ArrayBuffer(m),_=new Uint8Array(g),I;for(I=0;I>2]|=y.charCodeAt(g)<<(g%4<<3);return this._finish(_,m),I=s(this._hash),b&&(I=h(I)),this.reset(),I},$.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},$.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},$.prototype.setState=function(b){return this._buff=b.buff,this._length=b.length,this._hash=b.hash,this},$.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},$.prototype._finish=function(b,y){var m=y,g,_,I;if(b[m>>2]|=128<<(m%4<<3),m>55)for(i(this._hash,b),m=0;m<16;m+=1)b[m]=0;g=this._length*8,g=g.toString(16).match(/(.*?)(.{0,8})$/),_=parseInt(g[2],16),I=parseInt(g[1],16)||0,b[14]=_,b[15]=I,i(this._hash,b)},$.hash=function(b,y){return $.hashBinary(l(b),y)},$.hashBinary=function(b,y){var m=u(b),g=s(m);return y?h(g):g},$.ArrayBuffer=function(){this.reset()},$.ArrayBuffer.prototype.append=function(b){var y=v(this._buff.buffer,b,!0),m=y.length,g;for(this._length+=b.byteLength,g=64;g<=m;g+=64)i(this._hash,o(y.subarray(g-64,g)));return this._buff=g-64>2]|=y[_]<<(_%4<<3);return this._finish(g,m),I=s(this._hash),b&&(I=h(I)),this.reset(),I},$.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},$.ArrayBuffer.prototype.getState=function(){var b=$.prototype.getState.call(this);return b.buff=p(b.buff),b},$.ArrayBuffer.prototype.setState=function(b){return b.buff=d(b.buff,!0),$.prototype.setState.call(this,b)},$.ArrayBuffer.prototype.destroy=$.prototype.destroy,$.ArrayBuffer.prototype._finish=$.prototype._finish,$.ArrayBuffer.hash=function(b,y){var m=c(new Uint8Array(b)),g=s(m);return y?h(g):g},$})})(zWe);var twt=zWe.exports;const nwt=TD(twt);var df=function(e){return{show:function(t){var n="{";for(var r in e)mr.call(e,r)&&(n+=" ".concat(r,": ").concat(e[r].show(t[r]),","));return n.length>1&&(n=n.slice(0,-1)+" "),n+="}",n}}},KWe=function(){for(var e=[],t=0;t0;)if(!n(e[i],t[i],r))return!1;return!0}function dwt(e,t,n,r){var i=e.size===t.size;if(i&&e.size){var a={};e.forEach(function(o,u){if(i){var c=!1,f=0;t.forEach(function(s,l){!c&&!a[f]&&(c=n(u,l,r)&&n(o,s,r),c&&(a[f]=!0)),f++}),i=c}})}return i}var pwt="_owner",hwt=Function.prototype.bind.call(Function.prototype.call,Object.prototype.hasOwnProperty);function Rve(e,t,n,r){var i=Sve(e),a=i.length;if(Sve(t).length!==a)return!1;if(a)for(var o=void 0;a-- >0;){if(o=i[a],o===pwt){var u=Mve(e),c=Mve(t);if((u||c)&&u!==c)return!1}if(!hwt(t,o)||!n(e[o],t[o],r))return!1}return!0}function vwt(e,t){return e.source===t.source&&e.global===t.global&&e.ignoreCase===t.ignoreCase&&e.multiline===t.multiline&&e.unicode===t.unicode&&e.sticky===t.sticky&&e.lastIndex===t.lastIndex}function mwt(e,t,n,r){var i=e.size===t.size;if(i&&e.size){var a={};e.forEach(function(o){if(i){var u=!1,c=0;t.forEach(function(f){!u&&!a[c]&&(u=n(o,f,r),u&&(a[c]=!0)),c++}),i=u}})}return i}var gwt=typeof Map=="function",ywt=typeof Set=="function";function GC(e){var t=typeof e=="function"?e(n):n;function n(r,i,a){if(r===i)return!0;if(r&&i&&typeof r=="object"&&typeof i=="object"){if(wve(r)&&wve(i))return Rve(r,i,t,a);var o=Array.isArray(r),u=Array.isArray(i);return o||u?o===u&&lwt(r,i,t,a):(o=r instanceof Date,u=i instanceof Date,o||u?o===u&&CD(r.getTime(),i.getTime()):(o=r instanceof RegExp,u=i instanceof RegExp,o||u?o===u&&vwt(r,i):Ave(r)||Ave(i)?r===i:gwt&&(o=r instanceof Map,u=i instanceof Map,o||u)?o===u&&dwt(r,i,t,a):ywt&&(o=r instanceof Set,u=i instanceof Set,o||u)?o===u&&mwt(r,i,t,a):Rve(r,i,t,a)))}return r!==r&&i!==i}return n}var JWe=GC(),bwt=GC(function(){return CD}),$wt=GC(HWe()),Iwt=GC(HWe(CD));const _wt=Object.freeze(Object.defineProperty({__proto__:null,circularDeepEqual:$wt,circularShallowEqual:Iwt,createCustomEqual:GC,deepEqual:JWe,sameValueZeroEqual:CD,shallowEqual:bwt},Symbol.toStringTag,{value:"Module"}));function Np(e,t){var n=0,r,i;t=t||{};function a(){var o=r,u=arguments.length,c,f;e:for(;o;){if(o.args.length!==arguments.length){o=o.next;continue}for(f=0;f{e.resolve=t,e.reject=n}),e}var HC={},gb={};Object.defineProperty(gb,"__esModule",{value:!0});gb.isGuid=gb.guid=void 0;var Swt=function(e){e===void 0&&(e=2);for(var t=(Date.now()*3).toString(16),n=new Date().getTimezoneOffset(),r=Number("".concat(n<0?"7":"6").concat(Math.abs(n))).toString(16),i=e*9+3+15,a="",o=0;o=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function eNe(e,t){return function(n,r){t(n,r,e)}}function tNe(e,t,n,r,i,a){function o(b){if(b!==void 0&&typeof b!="function")throw new TypeError("Function expected");return b}for(var u=r.kind,c=u==="getter"?"get":u==="setter"?"set":"value",f=!t&&e?r.static?e:e.prototype:null,s=t||(f?Object.getOwnPropertyDescriptor(f,r.name):{}),l,d=!1,p=n.length-1;p>=0;p--){var v={};for(var h in r)v[h]=h==="access"?{}:r[h];for(var h in r.access)v.access[h]=r.access[h];v.addInitializer=function(b){if(d)throw new TypeError("Cannot add initializers after decoration has completed");a.push(o(b||null))};var $=(0,n[p])(u==="accessor"?{get:s.get,set:s.set}:s[c],v);if(u==="accessor"){if($===void 0)continue;if($===null||typeof $!="object")throw new TypeError("Object expected");(l=o($.get))&&(s.get=l),(l=o($.set))&&(s.set=l),(l=o($.init))&&i.unshift(l)}else(l=o($))&&(u==="field"?i.unshift(l):s[c]=l)}f&&Object.defineProperty(f,r.name,s),d=!0}function nNe(e,t,n){for(var r=arguments.length>2,i=0;i0&&a[a.length-1])&&(f[0]===6||f[0]===2)){n=0;continue}if(f[0]===3&&(!a||f[1]>a[0]&&f[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function xee(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(u){o={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function fNe(){for(var e=[],t=0;t1||c(p,h)})},v&&(i[p]=v(i[p])))}function c(p,v){try{f(r[p](v))}catch(h){d(a[0][3],h)}}function f(p){p.value instanceof PI?Promise.resolve(p.value.v).then(s,l):d(a[0][2],p)}function s(p){c("next",p)}function l(p){c("throw",p)}function d(p,v){p(v),a.shift(),a.length&&c(a[0][0],a[0][1])}}function pNe(e){var t,n;return t={},r("next"),r("throw",function(i){throw i}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(i,a){t[i]=e[i]?function(o){return(n=!n)?{value:PI(e[i](o)),done:!1}:a?a(o):o}:a}}function hNe(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof V2=="function"?V2(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(a){n[a]=e[a]&&function(o){return new Promise(function(u,c){o=e[a](o),i(u,c,o.done,o.value)})}}function i(a,o,u,c){Promise.resolve(c).then(function(f){a({value:f,done:u})},o)}}function vNe(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var Cwt=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},fG=function(e){return fG=Object.getOwnPropertyNames||function(t){var n=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[n.length]=r);return n},fG(e)};function mNe(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=fG(e),r=0;r1?A(E[1],E[0]):function(U){return A(U)(E[0])}}}function l(A,E,N,U,te,Ie,je,J,ee){switch(arguments.length){case 1:return A;case 2:return function(){return E(A.apply(this,arguments))};case 3:return function(){return N(E(A.apply(this,arguments)))};case 4:return function(){return U(N(E(A.apply(this,arguments))))};case 5:return function(){return te(U(N(E(A.apply(this,arguments)))))};case 6:return function(){return Ie(te(U(N(E(A.apply(this,arguments))))))};case 7:return function(){return je(Ie(te(U(N(E(A.apply(this,arguments)))))))};case 8:return function(){return J(je(Ie(te(U(N(E(A.apply(this,arguments))))))))};case 9:return function(){return ee(J(je(Ie(te(U(N(E(A.apply(this,arguments)))))))))}}}function d(){for(var A=[],E=0;E=A}:A;return function(){var U=Array.from(arguments);return N(arguments)?E.apply(this,U):function(te){return E.apply(void 0,t([te],U,!1))}}};e.dual=I})(Ln);var jve;function WNe(){if(jve)return RR;jve=1,Object.defineProperty(RR,"__esModule",{value:!0}),RR.eqNewtypeInterpreter=void 0;var e=nt,t=Ln,n=yd(),r=Ia,i=function(a){return a};return RR.eqNewtypeInterpreter=e.memo(function(){return{_F:r.EqURI,newtype:function(){return function(a,o){return function(u){return t.pipe(i(a(u).eq),function(c){return new r.EqType(n.eqApplyConfig(o)(c,u,{eq:c}))})}}},newtypeIso:function(a,o,u,c){return function(f){return t.pipe(o(f).eq,function(s){return new r.EqType(n.eqApplyConfig(c)({equals:function(l,d){return s.equals(a.reverseGet(l),a.reverseGet(d))}},f,{eq:s}))})}},newtypePrism:function(a,o,u,c){return function(f){return t.pipe(o(f).eq,function(s){return new r.EqType(n.eqApplyConfig(c)({equals:function(l,d){return s.equals(a.reverseGet(l),a.reverseGet(d))}},f,{eq:s}))})}}}}),RR}var OR={},kve;function NNe(){if(kve)return OR;kve=1,Object.defineProperty(OR,"__esModule",{value:!0}),OR.eqRefinedInterpreter=void 0;var e=nt,t=Ln,n=yd(),r=Ia;return OR.eqRefinedInterpreter=e.memo(function(){return{_F:r.EqURI,refined:function(i,a,o,u){return function(c){return t.pipe(i(c).eq,function(f){return new r.EqType(n.eqApplyConfig(u)(f,c,{eq:f}))})}},constrained:function(i,a,o,u){return function(c){return t.pipe(i(c).eq,function(f){return new r.EqType(n.eqApplyConfig(u)(f,c,{eq:f}))})}}}}),OR}var Uve;function Hwt(){return Uve||(Uve=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=ea;t.__exportStar(MNe(),e),t.__exportStar(jNe(),e),t.__exportStar(RNe(),e),t.__exportStar(ONe(),e),t.__exportStar(ENe(),e),t.__exportStar(TNe(),e),t.__exportStar(PNe(),e),t.__exportStar(FNe(),e),t.__exportStar(WNe(),e),t.__exportStar(NNe(),e)}(O8)),O8}var qve;function yd(){return qve||(qve=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.eqApplyConfig=e.EqURI=void 0;var t=ea,n=w0,r=Ia;Object.defineProperty(e,"EqURI",{enumerable:!0,get:function(){return r.EqURI}}),t.__exportStar(Hwt(),e),e.eqApplyConfig=n.getApplyConfig(r.EqURI)}(R8)),R8}var xve;function jNe(){if(xve)return $R;xve=1,Object.defineProperty($R,"__esModule",{value:!0}),$R.eqIntersectionInterpreter=void 0;var e=nt,t=Bwt,n=Ia,r=yd();return $R.eqIntersectionInterpreter=e.memo(function(){return{_F:n.EqURI,intersection:function(){for(var i=[],a=0;aaAt.Stream.nil(),r=void 0){this.value_=t,this.shrink=n,this.hasToBeCloned=r!==void 0||(0,T8.hasCloneMethod)(t),this.readOnce=!1,this.hasToBeCloned?Object.defineProperty(this,"value",{get:r!==void 0?r:this.getValue}):this.value=t}getValue(){return this.readOnce?this.value_[T8.cloneMethod]():(this.readOnce=!0,this.value_)}applyMapper(t){if(this.hasToBeCloned){const n=t(this.value);return n instanceof Object&&(n[T8.cloneMethod]=()=>this.applyMapper(t)),n}return t(this.value)}map(t){return new pG(this.applyMapper(t),()=>this.shrink().map(n=>n.map(t)))}filter(t){const n=r=>t(r.value_);return new pG(this.value,()=>this.shrink().filter(n).map(r=>r.filter(t)))}};Nh.Shrinkable=oAt;Object.defineProperty(Hp,"__esModule",{value:!0});Hp.assertIsArbitrary=Hp.Arbitrary=void 0;const DNe=Nh;let mw=class{filter(t){return new fAt(this,t)}map(t){return new cAt(this,t)}chain(t){return new uAt(this,t)}noShrink(){return new sAt(this)}withBias(t){return this}noBias(){return new lAt(this)}};Hp.Arbitrary=mw;let uAt=class hG extends mw{constructor(t,n){super(),this.arb=t,this.fmapper=n}generate(t){const n=t.clone(),r=this.arb.generate(t),i=this.fmapper(r.value).generate(t);return hG.shrinkChain(n,r,i,this.fmapper)}withBias(t){return this.arb.withBias(t).chain(n=>this.fmapper(n).withBias(t))}static shrinkChain(t,n,r,i){return new DNe.Shrinkable(r.value,()=>n.shrink().map(a=>hG.shrinkChain(t.clone(),a,i(a.value).generate(t.clone()),i)).join(r.shrink()))}},cAt=class extends mw{constructor(t,n){super(),this.arb=t,this.mapper=n}generate(t){return this.arb.generate(t).map(this.mapper)}withBias(t){return this.arb.withBias(t).map(this.mapper)}},fAt=class extends mw{constructor(t,n){super(),this.arb=t,this.refinement=n}generate(t){let n=this.arb.generate(t);for(;!this.refinementOnShrinkable(n);)n=this.arb.generate(t);return n.filter(this.refinement)}withBias(t){return this.arb.withBias(t).filter(this.refinement)}refinementOnShrinkable(t){return this.refinement(t.value)}},sAt=class extends mw{constructor(t){super(),this.arb=t}generate(t){return new DNe.Shrinkable(this.arb.generate(t).value)}withBias(t){return this.arb.withBias(t).noShrink()}},lAt=class extends mw{constructor(t){super(),this.arb=t}generate(t){return this.arb.generate(t)}};function dAt(e){if(typeof e!="object"||e===null||!("generate"in e))throw new Error("Unexpected value received: not an instance of Arbitrary")}Hp.assertIsArbitrary=dAt;var TR={},YC={};Object.defineProperty(YC,"__esModule",{value:!0});YC.ArbitraryWithContextualShrink=void 0;const pAt=Hp,Bve=Nh;function hAt(e){return e[0]}let vAt=class extends pAt.Arbitrary{contextualShrinkableFor(t,n){return new Bve.Shrinkable(t,()=>this.contextualShrink(t,n).map(r=>this.contextualShrinkableFor(r[0],r[1])))}shrink(t,n){const r=n===!0?this.shrunkOnceContext():void 0;return this.contextualShrink(t,r).map(hAt)}shrinkableFor(t,n){return new Bve.Shrinkable(t,()=>this.shrink(t,n).map(r=>this.shrinkableFor(r,!0)))}};YC.ArbitraryWithContextualShrink=vAt;var My={},gr={},Ar={};Object.defineProperty(Ar,"__esModule",{value:!0});Ar.NextValue=void 0;const Vve=Po;let mAt=class{constructor(t,n,r=void 0){this.value_=t,this.context=n,this.hasToBeCloned=r!==void 0||(0,Vve.hasCloneMethod)(t),this.readOnce=!1,this.hasToBeCloned?Object.defineProperty(this,"value",{get:r!==void 0?r:this.getValue}):this.value=t}getValue(){return this.hasToBeCloned?this.readOnce?this.value_[Vve.cloneMethod]():(this.readOnce=!0,this.value_):this.value_}};Ar.NextValue=mAt;Object.defineProperty(gr,"__esModule",{value:!0});gr.assertIsNextArbitrary=gr.NextArbitrary=void 0;const z2=Mn,zve=Po,vG=Ar;let gw=class{filter(t){return new bAt(this,t)}map(t,n){return new yAt(this,t,n)}chain(t){return new gAt(this,t)}noShrink(){return new $At(this)}noBias(){return new IAt(this)}};gr.NextArbitrary=gw;let gAt=class extends gw{constructor(t,n){super(),this.arb=t,this.chainer=n}generate(t,n){const r=t.clone(),i=this.arb.generate(t,n);return this.valueChainer(i,t,r,n)}canShrinkWithoutContext(t){return!1}shrink(t,n){return this.isSafeContext(n)?(n.stoppedForOriginal?z2.Stream.nil():this.arb.shrink(n.originalValue,n.originalContext).map(r=>this.valueChainer(r,n.clonedMrng.clone(),n.clonedMrng,n.originalBias))).join(n.chainedArbitrary.shrink(t,n.chainedContext).map(r=>{const i=Object.assign(Object.assign({},n),{chainedContext:r.context,stoppedForOriginal:!0});return new vG.NextValue(r.value_,i)})):z2.Stream.nil()}valueChainer(t,n,r,i){const a=this.chainer(t.value_),o=a.generate(n,i),u={originalBias:i,originalValue:t.value_,originalContext:t.context,stoppedForOriginal:!1,chainedArbitrary:a,chainedContext:o.context,clonedMrng:r};return new vG.NextValue(o.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}},yAt=class extends gw{constructor(t,n,r){super(),this.arb=t,this.mapper=n,this.unmapper=r,this.bindValueMapper=this.valueMapper.bind(this)}generate(t,n){const r=this.arb.generate(t,n);return this.valueMapper(r)}canShrinkWithoutContext(t){if(this.unmapper!==void 0)try{const n=this.unmapper(t);return this.arb.canShrinkWithoutContext(n)}catch{return!1}return!1}shrink(t,n){if(this.isSafeContext(n))return this.arb.shrink(n.originalValue,n.originalContext).map(this.bindValueMapper);if(this.unmapper!==void 0){const r=this.unmapper(t);return this.arb.shrink(r,void 0).map(this.bindValueMapper)}return z2.Stream.nil()}mapperWithCloneIfNeeded(t){const n=t.value,r=this.mapper(n);return t.hasToBeCloned&&(typeof r=="object"&&r!==null||typeof r=="function")&&Object.isExtensible(r)&&!(0,zve.hasCloneMethod)(r)&&Object.defineProperty(r,zve.cloneMethod,{get:()=>()=>this.mapperWithCloneIfNeeded(t)[0]}),[r,n]}valueMapper(t){const[n,r]=this.mapperWithCloneIfNeeded(t),i={originalValue:r,originalContext:t.context};return new vG.NextValue(n,i)}isSafeContext(t){return t!=null&&typeof t=="object"&&"originalValue"in t&&"originalContext"in t}},bAt=class extends gw{constructor(t,n){super(),this.arb=t,this.refinement=n,this.bindRefinementOnValue=this.refinementOnValue.bind(this)}generate(t,n){for(;;){const r=this.arb.generate(t,n);if(this.refinementOnValue(r))return r}}canShrinkWithoutContext(t){return this.arb.canShrinkWithoutContext(t)&&this.refinement(t)}shrink(t,n){return this.arb.shrink(t,n).filter(this.bindRefinementOnValue)}refinementOnValue(t){return this.refinement(t.value)}},$At=class extends gw{constructor(t){super(),this.arb=t}generate(t,n){return this.arb.generate(t,n)}canShrinkWithoutContext(t){return this.arb.canShrinkWithoutContext(t)}shrink(t,n){return z2.Stream.nil()}noShrink(){return this}},IAt=class extends gw{constructor(t){super(),this.arb=t}generate(t,n){return this.arb.generate(t,void 0)}canShrinkWithoutContext(t){return this.arb.canShrinkWithoutContext(t)}shrink(t,n){return this.arb.shrink(t,n)}noBias(){return this}};function _At(e){if(typeof e!="object"||e===null||!("generate"in e)||!("shrink"in e)||"shrinkableFor"in e)throw new Error("Unexpected value received: not an instance of NextArbitrary")}gr.assertIsNextArbitrary=_At;var Kve;function Lee(){if(Kve)return My;Kve=1;var e;Object.defineProperty(My,"__esModule",{value:!0}),My.ConverterToNext=My.fromShrinkableToNextValue=void 0;const t=Mn,n=LNe(),r=gr,i=Ar,a="__ConverterToNext__";function o(c){return c.hasToBeCloned?new i.NextValue(c.value_,c,()=>c.value):new i.NextValue(c.value_,c)}My.fromShrinkableToNextValue=o;class u extends r.NextArbitrary{constructor(f){super(),this.arb=f,this[e]=!0}static isConverterToNext(f){return a in f}static convertIfNeeded(f){return n.ConverterFromNext.isConverterFromNext(f)?f.arb:new u(f)}generate(f,s){const l=s!==void 0?this.arb.withBias(s).generate(f):this.arb.generate(f);return o(l)}canShrinkWithoutContext(f){return!1}shrink(f,s){return this.isSafeContext(s)?s.shrink().map(o):t.Stream.nil()}isSafeContext(f){return f!=null&&typeof f=="object"&&"value"in f&&"shrink"in f}filter(f){return u.convertIfNeeded(this.arb.filter(f))}map(f){return u.convertIfNeeded(this.arb.map(f))}chain(f){return u.convertIfNeeded(this.arb.chain(s=>{const l=f(s);return u.isConverterToNext(l)?l.arb:new n.ConverterFromNext(l)}))}noShrink(){return u.convertIfNeeded(this.arb.noShrink())}noBias(){return u.convertIfNeeded(this.arb.noBias())}}return My.ConverterToNext=u,e=a,My}var Gve;function LNe(){if(Gve)return TR;Gve=1;var e;Object.defineProperty(TR,"__esModule",{value:!0}),TR.ConverterFromNext=void 0;const t=YC,n=Lee(),r=Nh,i="__ConverterFromNext__";function a(u){return function c(f){const s=f.value_,l=()=>u.shrink(s,f.context).map(c);return f.hasToBeCloned?new r.Shrinkable(s,l,()=>f.value):new r.Shrinkable(s,l)}}class o extends t.ArbitraryWithContextualShrink{constructor(c,f,s=void 0){super(),this.arb=c,this.legacyShrunkOnceContext=f,this.biasFactor=s,this[e]=!0,this.toShrinkable=a(c)}static isConverterFromNext(c){return i in c}static convertIfNeeded(c){return n.ConverterToNext.isConverterToNext(c)?c.arb:new o(c)}generate(c){const f=this.arb.generate(c,this.biasFactor);return this.toShrinkable(f)}contextualShrink(c,f){return this.arb.shrink(c,f).map(s=>[s.value_,s.context])}shrunkOnceContext(){return this.legacyShrunkOnceContext}filter(c){return o.convertIfNeeded(this.arb.filter(c))}map(c){return o.convertIfNeeded(this.arb.map(c))}chain(c){return o.convertIfNeeded(this.arb.chain(f=>{const s=c(f);return o.isConverterFromNext(s)?s.arb:new n.ConverterToNext(s)}))}noShrink(){return o.convertIfNeeded(this.arb.noShrink())}withBias(c){return new o(this.arb,this.legacyShrunkOnceContext,c)}noBias(){return o.convertIfNeeded(this.arb.noBias())}}return TR.ConverterFromNext=o,e=i,TR}Object.defineProperty(Je,"__esModule",{value:!0});Je.convertToNext=Je.convertFromNextWithShrunkOnce=Je.convertFromNext=void 0;const SAt=Hp,Bee=LNe(),Vee=Lee(),BNe=gr;function wAt(e){return Vee.ConverterToNext.isConverterToNext(e)?e.arb:((0,BNe.assertIsNextArbitrary)(e),new Bee.ConverterFromNext(e))}Je.convertFromNext=wAt;function AAt(e,t){if(Vee.ConverterToNext.isConverterToNext(e)){if(!("contextualShrink"in e.arb)||!("contextualShrinkableFor"in e.arb)||!("shrunkOnceContext"in e.arb)||!("shrink"in e.arb)||!("shrinkableFor"in e.arb))throw new Error("Conversion rejected: Underlying arbitrary is not compatible with ArbitraryWithContextualShrink");return e.arb}return(0,BNe.assertIsNextArbitrary)(e),new Bee.ConverterFromNext(e,t)}Je.convertFromNextWithShrunkOnce=AAt;function MAt(e){return Bee.ConverterFromNext.isConverterFromNext(e)?e.arb:((0,SAt.assertIsArbitrary)(e),new Vee.ConverterToNext(e))}Je.convertToNext=MAt;var ZC={};Object.defineProperty(ZC,"__esModule",{value:!0});ZC.TupleArbitrary=void 0;const RAt=Mn,Hve=Po,OAt=gr,Jve=Ar;let EAt=class tE extends OAt.NextArbitrary{constructor(t){super(),this.arbs=t;for(let n=0;n!==t.length;++n){const r=t[n];if(r==null||r.generate==null)throw new Error(`Invalid parameter encountered at index ${n}: expecting an Arbitrary`)}}static makeItCloneable(t,n){return Object.defineProperty(t,Hve.cloneMethod,{value:()=>{const r=[];for(let i=0;i!==n.length;++i)r.push(n[i].value);return tE.makeItCloneable(r,n),r}})}static wrapper(t){let n=!1;const r=[],i=[];for(let a=0;a!==t.length;++a){const o=t[a];n=n||o.hasToBeCloned,r.push(o.value),i.push(o.context)}return n&&tE.makeItCloneable(r,t),new Jve.NextValue(r,i)}generate(t,n){return tE.wrapper(this.arbs.map(r=>r.generate(t,n)))}canShrinkWithoutContext(t){if(!Array.isArray(t)||t.length!==this.arbs.length)return!1;for(let n=0;n!==this.arbs.length;++n)if(!this.arbs[n].canShrinkWithoutContext(t[n]))return!1;return!0}shrink(t,n){let r=RAt.Stream.nil();const i=Array.isArray(n)?n:[];for(let a=0;a!==this.arbs.length;++a){const o=this.arbs[a].shrink(t[a],i[a]).map(u=>{const c=t.map((f,s)=>new Jve.NextValue((0,Hve.cloneIfNeeded)(f),i[s]));return c.slice(0,a).concat([u]).concat(c.slice(a+1))}).map(u=>tE.wrapper(u));r=r.join(o)}return r}};ZC.TupleArbitrary=EAt;Object.defineProperty(vw,"__esModule",{value:!0});vw.genericTuple=void 0;const Yve=Je,TAt=ZC;function CAt(e){const t=e.map(n=>(0,Yve.convertToNext)(n));return(0,Yve.convertFromNext)(new TAt.TupleArbitrary(t))}vw.genericTuple=CAt;var lc={},qD={},VNe;Object.defineProperty(qD,"__esModule",{value:!0});qD.ConverterFromNextProperty=void 0;const Zve=Nh,zNe="__ConverterFromNextProperty__";function PAt(e){return function t(n){const r=()=>e.shrink(n).map(t);return n.hasToBeCloned?new Zve.Shrinkable(n.value_,r,()=>n.value):new Zve.Shrinkable(n.value_,r)}}let FAt=class{constructor(t){this.property=t,this[VNe]=!0,this.toShrinkable=PAt(t)}static isConverterFromNext(t){return zNe in t}isAsync(){return this.property.isAsync()}generate(t,n){const r=this.property.generate(t,n);return this.toShrinkable(r)}run(t){return this.property.run(t)}};qD.ConverterFromNextProperty=FAt;VNe=zNe;var xD={},KNe;Object.defineProperty(xD,"__esModule",{value:!0});xD.ConverterToNextProperty=void 0;const WAt=Mn,Xve=Lee(),GNe="__ConverterToNextProperty__";let NAt=class{constructor(t){this.property=t,this[KNe]=!0}static isConverterToNext(t){return GNe in t}isAsync(){return this.property.isAsync()}generate(t,n){const r=this.property.generate(t,n);return(0,Xve.fromShrinkableToNextValue)(r)}shrink(t){return this.isSafeContext(t.context)?t.context.shrink().map(Xve.fromShrinkableToNextValue):WAt.Stream.nil()}isSafeContext(t){return t!=null&&typeof t=="object"&&"value"in t&&"shrink"in t}run(t){return this.property.run(t)}};xD.ConverterToNextProperty=NAt;KNe=GNe;Object.defineProperty(lc,"__esModule",{value:!0});lc.convertFromNextAsyncPropertyWithHooks=lc.convertFromNextPropertyWithHooks=lc.convertToNextProperty=lc.convertFromNextProperty=void 0;const HNe=qD,JNe=xD;function zee(e){return JNe.ConverterToNextProperty.isConverterToNext(e)?e.property:new HNe.ConverterFromNextProperty(e)}lc.convertFromNextProperty=zee;function jAt(e){return HNe.ConverterFromNextProperty.isConverterFromNext(e)?e.property:new JNe.ConverterToNextProperty(e)}lc.convertToNextProperty=jAt;function kAt(e){const t=zee(e);return Object.assign(t,{beforeEach(r){return e.beforeEach(r),t},afterEach(r){return e.afterEach(r),t}})}lc.convertFromNextPropertyWithHooks=kAt;function UAt(e){const t=zee(e);return Object.assign(t,{beforeEach(r){return e.beforeEach(r),t},afterEach(r){return e.afterEach(r),t}})}lc.convertFromNextAsyncPropertyWithHooks=UAt;var DD={},XC={};Object.defineProperty(XC,"__esModule",{value:!0});XC.runIdToFrequency=void 0;const qAt=e=>2+Math.floor(Math.log(e+1)/Math.log(10));XC.runIdToFrequency=qAt;var mc={};Object.defineProperty(mc,"__esModule",{value:!0});mc.resetConfigureGlobal=mc.readConfigureGlobal=mc.configureGlobal=void 0;let Kee={};function xAt(e){Kee=e}mc.configureGlobal=xAt;function DAt(){return Kee}mc.readConfigureGlobal=DAt;function LAt(){Kee={}}mc.resetConfigureGlobal=LAt;var LD={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.noUndefinedAsContext=e.UndefinedContextPlaceholder=void 0;const t=Ar;e.UndefinedContextPlaceholder=Symbol("UndefinedContextPlaceholder");function n(r){return r.context!==void 0?r:r.hasToBeCloned?new t.NextValue(r.value_,e.UndefinedContextPlaceholder,()=>r.value):new t.NextValue(r.value_,e.UndefinedContextPlaceholder)}e.noUndefinedAsContext=n})(LD);Object.defineProperty(DD,"__esModule",{value:!0});DD.AsyncProperty=void 0;const BAt=Wh,VAt=XC,zAt=mc,KAt=Mn,GAt=Je,C8=LD;let YNe=class mG{constructor(t,n){this.predicate=n;const{asyncBeforeEach:r,asyncAfterEach:i,beforeEach:a,afterEach:o}=(0,zAt.readConfigureGlobal)()||{};if(r!==void 0&&a!==void 0)throw Error(`Global "asyncBeforeEach" and "beforeEach" parameters can't be set at the same time when running async properties`);if(i!==void 0&&o!==void 0)throw Error(`Global "asyncAfterEach" and "afterEach" parameters can't be set at the same time when running async properties`);this.beforeEachHook=r||a||mG.dummyHook,this.afterEachHook=i||o||mG.dummyHook,this.arb=(0,GAt.convertToNext)(t)}isAsync(){return!0}generate(t,n){const r=this.arb.generate(t,n!=null?(0,VAt.runIdToFrequency)(n):void 0);return(0,C8.noUndefinedAsContext)(r)}shrink(t){if(t.context===void 0&&!this.arb.canShrinkWithoutContext(t.value_))return KAt.Stream.nil();const n=t.context!==C8.UndefinedContextPlaceholder?t.context:void 0;return this.arb.shrink(t.value_,n).map(C8.noUndefinedAsContext)}async run(t){await this.beforeEachHook();try{const n=await this.predicate(t);return n==null||n===!0?null:"Property failed by returning false"}catch(n){return BAt.PreconditionFailure.isFailure(n)?n:n instanceof Error&&n.stack?`${n} Stack trace: ${n.stack}`:`${n}`}finally{await this.afterEachHook()}}beforeEach(t){const n=this.beforeEachHook;return this.beforeEachHook=()=>t(n),this}afterEach(t){const n=this.afterEachHook;return this.afterEachHook=()=>t(n),this}};DD.AsyncProperty=YNe;YNe.dummyHook=()=>{};var QC={};Object.defineProperty(QC,"__esModule",{value:!0});QC.AlwaysShrinkableArbitrary=void 0;const HAt=gr,JAt=Mn,P8=LD;let YAt=class extends HAt.NextArbitrary{constructor(t){super(),this.arb=t}generate(t,n){const r=this.arb.generate(t,n);return(0,P8.noUndefinedAsContext)(r)}canShrinkWithoutContext(t){return!0}shrink(t,n){if(n===void 0&&!this.arb.canShrinkWithoutContext(t))return JAt.Stream.nil();const r=n!==P8.UndefinedContextPlaceholder?n:void 0;return this.arb.shrink(t,r).map(P8.noUndefinedAsContext)}};QC.AlwaysShrinkableArbitrary=YAt;Object.defineProperty(UD,"__esModule",{value:!0});UD.asyncProperty=void 0;const ZAt=vw,XAt=lc,QAt=DD,eMt=QC,Qve=Je;function tMt(...e){if(e.length<2)throw new Error("asyncProperty expects at least two parameters");const t=e.slice(0,e.length-1),n=e[e.length-1];return(0,XAt.convertFromNextAsyncPropertyWithHooks)(new QAt.AsyncProperty((0,ZAt.genericTuple)(t.map(r=>(0,Qve.convertFromNext)(new eMt.AlwaysShrinkableArbitrary((0,Qve.convertToNext)(r))))),r=>n(...r)))}UD.asyncProperty=tMt;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.asyncProperty=void 0;const t=UD;Object.defineProperty(e,"asyncProperty",{enumerable:!0,get:function(){return t.asyncProperty}})})(qNe);var ZNe={},BD={},eP={};Object.defineProperty(eP,"__esModule",{value:!0});eP.Property=void 0;const nMt=Wh,rMt=XC,iMt=mc,aMt=Je,oMt=Mn,F8=LD;let XNe=class gG{constructor(t,n){this.predicate=n;const{beforeEach:r=gG.dummyHook,afterEach:i=gG.dummyHook,asyncBeforeEach:a,asyncAfterEach:o}=(0,iMt.readConfigureGlobal)()||{};if(a!==void 0)throw Error(`"asyncBeforeEach" can't be set when running synchronous properties`);if(o!==void 0)throw Error(`"asyncAfterEach" can't be set when running synchronous properties`);this.beforeEachHook=r,this.afterEachHook=i,this.arb=(0,aMt.convertToNext)(t)}isAsync(){return!1}generate(t,n){const r=this.arb.generate(t,n!=null?(0,rMt.runIdToFrequency)(n):void 0);return(0,F8.noUndefinedAsContext)(r)}shrink(t){if(t.context===void 0&&!this.arb.canShrinkWithoutContext(t.value_))return oMt.Stream.nil();const n=t.context!==F8.UndefinedContextPlaceholder?t.context:void 0;return this.arb.shrink(t.value_,n).map(F8.noUndefinedAsContext)}run(t){this.beforeEachHook();try{const n=this.predicate(t);return n==null||n===!0?null:"Property failed by returning false"}catch(n){return nMt.PreconditionFailure.isFailure(n)?n:n instanceof Error&&n.stack?`${n} Stack trace: ${n.stack}`:`${n}`}finally{this.afterEachHook()}}beforeEach(t){const n=this.beforeEachHook;return this.beforeEachHook=()=>t(n),this}afterEach(t){const n=this.afterEachHook;return this.afterEachHook=()=>t(n),this}};eP.Property=XNe;XNe.dummyHook=()=>{};Object.defineProperty(BD,"__esModule",{value:!0});BD.property=void 0;const uMt=vw,cMt=lc,fMt=eP,sMt=QC,eme=Je;function lMt(...e){if(e.length<2)throw new Error("property expects at least two parameters");const t=e.slice(0,e.length-1),n=e[e.length-1];return(0,cMt.convertFromNextPropertyWithHooks)(new fMt.Property((0,uMt.genericTuple)(t.map(r=>(0,eme.convertFromNext)(new sMt.AlwaysShrinkableArbitrary((0,eme.convertToNext)(r))))),r=>n(...r)))}BD.property=lMt;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.property=void 0;const t=BD;Object.defineProperty(e,"property",{enumerable:!0,get:function(){return t.property}})})(ZNe);var FI={},tP={},VD={},qt={},Kl={};Kl.__esModule=!0;Kl.skipN=Kl.unsafeSkipN=Kl.generateN=Kl.unsafeGenerateN=void 0;function QNe(e,t){for(var n=[],r=0;r!=t;++r)n.push(e.unsafeNext());return n}Kl.unsafeGenerateN=QNe;function dMt(e,t){var n=e.clone(),r=QNe(n,t);return[r,n]}Kl.generateN=dMt;function eje(e,t){for(var n=0;n!=t;++n)e.unsafeNext()}Kl.unsafeSkipN=eje;function pMt(e,t){var n=e.clone();return eje(n,t),n}Kl.skipN=pMt;var WI={};WI.__esModule=!0;WI.congruential32=WI.congruential=void 0;var hMt=214013,vMt=2531011,mMt=4294967295,gMt=(1<<31)-1,s2=function(e){return e*hMt+vMt&mMt},l2=function(e){return(e&gMt)>>16},yMt=function(){function e(t){this.seed=t}return e.prototype.min=function(){return e.min},e.prototype.max=function(){return e.max},e.prototype.clone=function(){return new e(this.seed)},e.prototype.next=function(){var t=new e(this.seed),n=t.unsafeNext();return[n,t]},e.prototype.unsafeNext=function(){return this.seed=s2(this.seed),l2(this.seed)},e.min=0,e.max=Math.pow(2,15)-1,e}(),bMt=function(){function e(t){this.seed=t}return e.prototype.min=function(){return e.min},e.prototype.max=function(){return e.max},e.prototype.clone=function(){return new e(this.seed)},e.prototype.next=function(){var t=new e(this.seed),n=t.unsafeNext();return[n,t]},e.prototype.unsafeNext=function(){var t=s2(this.seed),n=l2(t),r=s2(t),i=l2(r);this.seed=s2(r);var a=l2(this.seed),o=a+(i+(n<<15)<<15);return(o+2147483648|0)+2147483648},e.min=0,e.max=4294967295,e}(),$Mt=function(e){return new yMt(e)};WI.congruential=$Mt;var IMt=function(e){return new bMt(e)};WI.congruential32=IMt;var tje={};(function(e){e.__esModule=!0;var t=function(){function r(i,a){this.states=i,this.index=a}return r.twist=function(i){for(var a=i.slice(),o=0;o!==r.N-r.M;++o){var u=(a[o]&r.MASK_UPPER)+(a[o+1]&r.MASK_LOWER);a[o]=a[o+r.M]^u>>>1^-(u&1)&r.A}for(var o=r.N-r.M;o!==r.N-1;++o){var c=(a[o]&r.MASK_UPPER)+(a[o+1]&r.MASK_LOWER);a[o]=a[o+r.M-r.N]^c>>>1^-(c&1)&r.A}var f=(a[r.N-1]&r.MASK_UPPER)+(a[0]&r.MASK_LOWER);return a[r.N-1]=a[r.M-1]^f>>>1^-(f&1)&r.A,a},r.seeded=function(i){var a=Array(r.N);a[0]=i;for(var o=1;o!==r.N;++o){var u=a[o-1]^a[o-1]>>>30;a[o]=Math.imul(r.F,u)+o|0}return a},r.from=function(i){return new r(r.twist(r.seeded(i)),0)},r.prototype.min=function(){return r.min},r.prototype.max=function(){return r.max},r.prototype.clone=function(){return new r(this.states,this.index)},r.prototype.next=function(){var i=new r(this.states,this.index),a=i.unsafeNext();return[a,i]},r.prototype.unsafeNext=function(){var i=this.states[this.index];return i^=this.states[this.index]>>>r.U,i^=i<>>r.L,++this.index>=r.N&&(this.states=r.twist(this.states),this.index=0),i>>>0},r.min=0,r.max=4294967295,r.N=624,r.M=397,r.R=31,r.A=2567483615,r.F=1812433253,r.U=11,r.S=7,r.B=2636928640,r.T=15,r.C=4022730752,r.L=18,r.MASK_LOWER=Math.pow(2,r.R)-1,r.MASK_UPPER=Math.pow(2,r.R),r}();function n(r){return t.from(r)}e.default=n})(tje);var zD={};zD.__esModule=!0;zD.xorshift128plus=void 0;var _Mt=function(){function e(t,n,r,i){this.s01=t,this.s00=n,this.s11=r,this.s10=i}return e.prototype.min=function(){return-2147483648},e.prototype.max=function(){return 2147483647},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),n=t.unsafeNext();return[n,t]},e.prototype.unsafeNext=function(){var t=this.s00^this.s00<<23,n=this.s01^(this.s01<<23|this.s00>>>9),r=t^this.s10^(t>>>18|n<<14)^(this.s10>>>5|this.s11<<27),i=n^this.s11^n>>>18^this.s11>>>5,a=this.s00+this.s10|0;return this.s01=this.s11,this.s00=this.s10,this.s11=i,this.s10=r,a},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,n=0,r=0,i=0,a=[1667051007,2321340297,1548169110,304075285],o=0;o!==4;++o)for(var u=1;u;u<<=1)a[o]&u&&(t^=this.s01,n^=this.s00,r^=this.s11,i^=this.s10),this.unsafeNext();this.s01=t,this.s00=n,this.s11=r,this.s10=i},e}(),SMt=function(e){return new _Mt(-1,~e,e|0,0)};zD.xorshift128plus=SMt;var KD={};KD.__esModule=!0;KD.xoroshiro128plus=void 0;var wMt=function(){function e(t,n,r,i){this.s01=t,this.s00=n,this.s11=r,this.s10=i}return e.prototype.min=function(){return-2147483648},e.prototype.max=function(){return 2147483647},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),n=t.unsafeNext();return[n,t]},e.prototype.unsafeNext=function(){var t=this.s00+this.s10|0,n=this.s10^this.s00,r=this.s11^this.s01,i=this.s00,a=this.s01;return this.s00=i<<24^a>>>8^n^n<<16,this.s01=a<<24^i>>>8^r^(r<<16|n>>>16),this.s10=r<<5^n>>>27,this.s11=n<<5^r>>>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,n=0,r=0,i=0,a=[3639956645,3750757012,1261568508,386426335],o=0;o!==4;++o)for(var u=1;u;u<<=1)a[o]&u&&(t^=this.s01,n^=this.s00,r^=this.s11,i^=this.s10),this.unsafeNext();this.s01=t,this.s00=n,this.s11=r,this.s10=i},e}(),AMt=function(e){return new wMt(-1,~e,e|0,0)};KD.xoroshiro128plus=AMt;var GD={},nP={},Yo={};Yo.__esModule=!0;Yo.substractArrayInt64=Yo.fromNumberToArrayInt64=Yo.trimArrayIntInplace=Yo.substractArrayIntToNew=Yo.addOneToPositiveArrayInt=Yo.addArrayIntToNew=void 0;function nje(e,t){if(e.sign!==t.sign)return Gee(e,{sign:-t.sign,data:t.data});for(var n=[],r=0,i=e.data,a=t.data,o=i.length-1,u=a.length-1;o>=0||u>=0;--o,--u){var c=o>=0?i[o]:0,f=u>=0?a[u]:0,s=c+f+r;n.push(s>>>0),r=~~(s/4294967296)}return r!==0&&n.push(r),{sign:e.sign,data:n.reverse()}}Yo.addArrayIntToNew=nje;function MMt(e){e.sign=1;for(var t=e.data,n=t.length-1;n>=0;--n)if(t[n]===4294967295)t[n]=0;else return t[n]+=1,e;return t.unshift(1),e}Yo.addOneToPositiveArrayInt=MMt;function RMt(e,t){for(var n=Math.max(e.length,t.length),r=0;r=0?e[i]:0,u=a>=0?t[a]:0;if(ou)return!1}return!1}function Gee(e,t){if(e.sign!==t.sign)return nje(e,{sign:-t.sign,data:t.data});var n=e.data,r=t.data;if(RMt(n,r)){var i=Gee(t,e);return i.sign=-i.sign,i}for(var a=[],o=0,u=n.length-1,c=r.length-1;u>=0||c>=0;--u,--c){var f=u>=0?n[u]:0,s=c>=0?r[c]:0,l=f-s-o;a.push(l>>>0),o=l<0?1:0}return{sign:e.sign,data:a.reverse()}}Yo.substractArrayIntToNew=Gee;function OMt(e){for(var t=e.data,n=0;n!==t.length&&t[n]===0;++n);return n===t.length?(e.sign=1,e.data=[0],e):(t.splice(0,n),e)}Yo.trimArrayIntInplace=OMt;function EMt(e,t){if(t<0){var n=-t;e.sign=-1,e.data[0]=~~(n/4294967296),e.data[1]=n>>>0}else e.sign=1,e.data[0]=~~(t/4294967296),e.data[1]=t>>>0;return e}Yo.fromNumberToArrayInt64=EMt;function TMt(e,t,n){var r=t.data[1],i=t.data[0],a=t.sign,o=n.data[1],u=n.data[0],c=n.sign;if(e.sign=1,a===1&&c===-1){var f=r+o,s=i+u+(f>4294967295?1:0);return e.data[0]=s>>>0,e.data[1]=f>>>0,e}var l=r,d=i,p=o,v=u;a===-1&&(l=o,d=u,p=r,v=i);var h=0,$=l-p;return $<0&&(h=1,$=$>>>0),e.data[0]=d-v-h,e.data[1]=$,e}Yo.substractArrayInt64=TMt;var rP={},iP={};iP.__esModule=!0;iP.unsafeUniformIntDistributionInternal=void 0;function CMt(e,t){var n=t.min(),r=t.max()-t.min()+1;if(e<=r)for(var i=t,a=r-r%e;;){var o=i.unsafeNext(),u=o-n;if(uc)break}}}rP.unsafeUniformArrayIntDistributionInternal=FMt;nP.__esModule=!0;nP.unsafeUniformArrayIntDistribution=void 0;var CR=Yo,WMt=rP;function NMt(e,t,n){var r=(0,CR.trimArrayIntInplace)((0,CR.addOneToPositiveArrayInt)((0,CR.substractArrayIntToNew)(t,e))),i=r.data.slice(0),a=(0,WMt.unsafeUniformArrayIntDistributionInternal)(i,r.data,n);return(0,CR.trimArrayIntInplace)((0,CR.addArrayIntToNew)({sign:1,data:a},e))}nP.unsafeUniformArrayIntDistribution=NMt;GD.__esModule=!0;GD.uniformArrayIntDistribution=void 0;var tme=nP;function jMt(e,t,n){if(n!=null){var r=n.clone();return[(0,tme.unsafeUniformArrayIntDistribution)(e,t,r),r]}return function(i){var a=i.clone();return[(0,tme.unsafeUniformArrayIntDistribution)(e,t,a),a]}}GD.uniformArrayIntDistribution=jMt;var HD={},aP={};aP.__esModule=!0;aP.unsafeUniformBigIntDistribution=void 0;var Ry=typeof BigInt<"u"?BigInt:void 0;function kMt(e,t,n){for(var r=t-e+Ry(1),i=Ry(n.min()),a=Ry(n.max()-n.min()+1),o=a,u=Ry(1);o{console.log(r)}),this.path=Ni.readOrDefault(n,"path",""),this.unbiased=Ni.readBoolean(n,"unbiased"),this.examples=Ni.readOrDefault(n,"examples",[]),this.endOnFailure=Ni.readBoolean(n,"endOnFailure"),this.reporter=Ni.readOrDefault(n,"reporter",null),this.asyncReporter=Ni.readOrDefault(n,"asyncReporter",null)}toParameters(){const t=n=>n!==null?n:void 0;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)}}static read(t){return new Ni(t)}};tP.QualifiedParameters=A0;A0.readSeed=e=>{if(e.seed==null)return Date.now()^Math.random()*4294967296;const t=e.seed|0;if(e.seed===t)return t;const n=e.seed-t;return t^n*4294967296};A0.readRandomType=e=>{if(e.randomType==null)return _1.default.xorshift128plus;if(typeof e.randomType=="string")switch(e.randomType){case"mersenne":return _1.default.mersenne;case"congruential":return _1.default.congruential;case"congruential32":return _1.default.congruential32;case"xorshift128plus":return _1.default.xorshift128plus;case"xoroshiro128plus":return _1.default.xoroshiro128plus;default:throw new Error(`Invalid random specified: '${e.randomType}'`)}return e.randomType};A0.readNumRuns=e=>e.numRuns!=null?e.numRuns:e.num_runs!=null?e.num_runs:100;A0.readVerbose=e=>e.verbose==null?Oy.VerbosityLevel.None:typeof e.verbose=="boolean"?e.verbose===!0?Oy.VerbosityLevel.Verbose:Oy.VerbosityLevel.None:e.verbose<=Oy.VerbosityLevel.None?Oy.VerbosityLevel.None:e.verbose>=Oy.VerbosityLevel.VeryVerbose?Oy.VerbosityLevel.VeryVerbose:e.verbose|0;A0.readBoolean=(e,t)=>e[t]===!0;A0.readOrDefault=(e,t,n)=>{const r=e[t];return r??n};var ZD={},XD={};Object.defineProperty(XD,"__esModule",{value:!0});XD.SkipAfterProperty=void 0;const aRt=Wh;let oRt=class{constructor(t,n,r,i){this.property=t,this.getTime=n,this.interruptExecution=i,this.skipAfterTime=this.getTime()+r}isAsync(){return this.property.isAsync()}generate(t,n){return this.property.generate(t,n)}shrink(t){return this.property.shrink(t)}run(t){if(this.getTime()>=this.skipAfterTime){const n=new aRt.PreconditionFailure(this.interruptExecution);return this.isAsync()?Promise.resolve(n):n}return this.property.run(t)}};XD.SkipAfterProperty=oRt;var QD={};Object.defineProperty(QD,"__esModule",{value:!0});QD.TimeoutProperty=void 0;const uRt=e=>{let t=null;const n=new Promise(r=>{t=setTimeout(()=>{r(`Property timeout: exceeded limit of ${e} milliseconds`)},e)});return{clear:()=>clearTimeout(t),promise:n}};let cRt=class{constructor(t,n){this.property=t,this.timeMs=n}isAsync(){return!0}generate(t,n){return this.property.generate(t,n)}shrink(t){return this.property.shrink(t)}async run(t){const n=uRt(this.timeMs),r=Promise.race([this.property.run(t),n.promise]);return r.then(n.clear,n.clear),r}};QD.TimeoutProperty=cRt;var cP={};Object.defineProperty(cP,"__esModule",{value:!0});cP.UnbiasedProperty=void 0;let fRt=class{constructor(t){this.property=t}isAsync(){return this.property.isAsync()}generate(t,n){return this.property.generate(t,void 0)}shrink(t){return this.property.shrink(t)}run(t){return this.property.run(t)}};cP.UnbiasedProperty=fRt;var eL={},$d={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.asyncStringify=e.possiblyAsyncStringify=e.stringify=e.stringifyInternal=e.hasAsyncToStringMethod=e.asyncToStringMethod=e.hasToStringMethod=e.toStringMethod=void 0,e.toStringMethod=Symbol("fast-check/toStringMethod");function t(l){return l!==null&&(typeof l=="object"||typeof l=="function")&&e.toStringMethod in l&&typeof l[e.toStringMethod]=="function"}e.hasToStringMethod=t,e.asyncToStringMethod=Symbol("fast-check/asyncToStringMethod");function n(l){return l!==null&&(typeof l=="object"||typeof l=="function")&&e.asyncToStringMethod in l&&typeof l[e.asyncToStringMethod]=="function"}e.hasAsyncToStringMethod=n;const r=/^Symbol\((.*)\)$/;function i(l){if(l.description!==void 0)return l.description;const d=r.exec(String(l));return d&&d[1].length?d[1]:null}function a(l){switch(l){case 0:return 1/l===Number.NEGATIVE_INFINITY?"-0":"0";case Number.NEGATIVE_INFINITY:return"Number.NEGATIVE_INFINITY";case Number.POSITIVE_INFINITY:return"Number.POSITIVE_INFINITY";default:return l===l?String(l):"Number.NaN"}}function o(l){let d=-1;for(const p in l){const v=Number(p);if(v!==d+1)return!0;d=v}return d+1!==l.length}function u(l,d,p){const v=d.concat([l]);if(typeof l=="object"&&d.indexOf(l)!==-1)return"[cyclic]";if(n(l)){const h=p(l);if(h.state==="fulfilled")return h.value}if(t(l))try{return l[e.toStringMethod]()}catch{}switch(Object.prototype.toString.call(l)){case"[object Array]":{const h=l;if(h.length>=50&&o(h)){const b=[];for(const y in h)Number.isNaN(Number(y))||b.push(`${y}:${u(h[y],v,p)}`);return b.length!==0?`Object.assign(Array(${h.length}),{${b.join(",")}})`:`Array(${h.length})`}const $=h.map(b=>u(b,v,p)).join(",");return h.length===0||h.length-1 in h?`[${$}]`:`[${$},]`}case"[object BigInt]":return`${l}n`;case"[object Boolean]":return typeof l=="boolean"?JSON.stringify(l):`new Boolean(${JSON.stringify(l)})`;case"[object Date]":{const h=l;return Number.isNaN(h.getTime())?"new Date(NaN)":`new Date(${JSON.stringify(h.toISOString())})`}case"[object Map]":return`new Map(${u(Array.from(l),v,p)})`;case"[object Null]":return"null";case"[object Number]":return typeof l=="number"?a(l):`new Number(${a(Number(l))})`;case"[object Object]":{try{const y=l.toString;if(typeof y=="function"&&y!==Object.prototype.toString)return l.toString()}catch{return"[object Object]"}const h=y=>`${y==="__proto__"?'["__proto__"]':typeof y=="symbol"?`[${u(y,v,p)}]`:JSON.stringify(y)}:${u(l[y],v,p)}`,b="{"+[...Object.keys(l).map(h),...Object.getOwnPropertySymbols(l).filter(y=>{const m=Object.getOwnPropertyDescriptor(l,y);return m&&m.enumerable}).map(h)].join(",")+"}";return Object.getPrototypeOf(l)===null?b==="{}"?"Object.create(null)":`Object.assign(Object.create(null),${b})`:b}case"[object Set]":return`new Set(${u(Array.from(l),v,p)})`;case"[object String]":return typeof l=="string"?JSON.stringify(l):`new String(${JSON.stringify(l)})`;case"[object Symbol]":{const h=l;if(Symbol.keyFor(h)!==void 0)return`Symbol.for(${JSON.stringify(Symbol.keyFor(h))})`;const $=i(h);if($===null)return"Symbol()";const b=$.startsWith("Symbol.")&&Symbol[$.substring(7)];return h===b?$:`Symbol(${JSON.stringify($)})`}case"[object Promise]":{const h=p(l);switch(h.state){case"fulfilled":return`Promise.resolve(${u(h.value,v,p)})`;case"rejected":return`Promise.reject(${u(h.value,v,p)})`;case"pending":return"new Promise(() => {/*pending*/})";case"unknown":default:return"new Promise(() => {/*unknown*/})"}}case"[object Error]":if(l instanceof Error)return`new Error(${u(l.message,v,p)})`;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 Buffer<"u"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(l))return`Buffer.from(${u(Array.from(l.values()),v,p)})`;const h=Object.getPrototypeOf(l),$=h&&h.constructor&&h.constructor.name;if(typeof $=="string"){const y=l.values();return`${$}.from(${u(Array.from(y),v,p)})`}break}}try{return l.toString()}catch{return Object.prototype.toString.call(l)}}e.stringifyInternal=u;function c(l){return u(l,[],()=>({state:"unknown",value:void 0}))}e.stringify=c;function f(l){const d=Symbol(),p=[],v=new Map;function h(){let m=null;const g=()=>{m!==null&&clearTimeout(m)};return{delay:new Promise(I=>{m=setTimeout(()=>{m=null,I(d)},0)}),cancel:g}}const $={state:"unknown",value:void 0},b=function(g){const _=g;if(v.has(_))return v.get(_);const I=h(),A=e.asyncToStringMethod in g?Promise.resolve().then(()=>g[e.asyncToStringMethod]()):g;return A.catch(()=>{}),p.push(Promise.race([A,I.delay]).then(E=>{E===d?v.set(_,{state:"pending",value:void 0}):v.set(_,{state:"fulfilled",value:E}),I.cancel()},E=>{v.set(_,{state:"rejected",value:E}),I.cancel()})),v.set(_,$),$};function y(){const m=u(l,[],b);return p.length===0?m:Promise.all(p.splice(0)).then(y)}return y()}e.possiblyAsyncStringify=f;async function s(l){return Promise.resolve(f(l))}e.asyncStringify=s})($d);Object.defineProperty(eL,"__esModule",{value:!0});eL.IgnoreEqualValuesProperty=void 0;const sRt=$d,lRt=Wh;function ame(e){return e===null?new lRt.PreconditionFailure:e}function dRt(...e){return e[1]?e[0].then(ame):ame(e[0])}function pRt(e,t){return dRt(e,t)}let hRt=class{constructor(t,n){this.property=t,this.skipRuns=n,this.coveredCases=new Map}isAsync(){return this.property.isAsync()}generate(t,n){return this.property.generate(t,n)}shrink(t){return this.property.shrink(t)}run(t){const n=(0,sRt.stringify)(t);if(this.coveredCases.has(n)){const i=this.coveredCases.get(n);return this.skipRuns?pRt(i,this.property.isAsync()):i}const r=this.property.run(t);return this.coveredCases.set(n,r),r}};eL.IgnoreEqualValuesProperty=hRt;Object.defineProperty(ZD,"__esModule",{value:!0});ZD.decorateProperty=void 0;const ome=XD,vRt=QD,mRt=cP,ume=eL,gRt=lc;function yRt(e,t){let n=(0,gRt.convertToNextProperty)(e);return e.isAsync()&&t.timeout!=null&&(n=new vRt.TimeoutProperty(n,t.timeout)),t.unbiased&&(n=new mRt.UnbiasedProperty(n)),t.skipAllAfterTimeLimit!=null&&(n=new ome.SkipAfterProperty(n,Date.now,t.skipAllAfterTimeLimit,!1)),t.interruptAfterTimeLimit!=null&&(n=new ome.SkipAfterProperty(n,Date.now,t.interruptAfterTimeLimit,!0)),t.skipEqualValues&&(n=new ume.IgnoreEqualValuesProperty(n,!0)),t.ignoreEqualValues&&(n=new ume.IgnoreEqualValuesProperty(n,!1)),n}ZD.decorateProperty=yRt;var tL={},nL={},rL={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ExecutionStatus=void 0,function(t){t[t.Success=0]="Success",t[t.Skipped=-1]="Skipped",t[t.Failure=1]="Failure"}(e.ExecutionStatus||(e.ExecutionStatus={}))})(rL);Object.defineProperty(nL,"__esModule",{value:!0});nL.RunExecution=void 0;const N8=uP,Jk=rL;let ije=class aje{constructor(t,n){this.verbosity=t,this.interruptedAsFailure=n,this.isSuccess=()=>this.pathToFailure==null,this.firstFailure=()=>this.pathToFailure?+this.pathToFailure.split(":")[0]:-1,this.numShrinks=()=>this.pathToFailure?this.pathToFailure.split(":").length-1:0,this.rootExecutionTrees=[],this.currentLevelExecutionTrees=this.rootExecutionTrees,this.failure=null,this.numSkips=0,this.numSuccesses=0,this.interrupted=!1}appendExecutionTree(t,n){const r={status:t,value:n,children:[]};return this.currentLevelExecutionTrees.push(r),r}fail(t,n,r){if(this.verbosity>=N8.VerbosityLevel.Verbose){const i=this.appendExecutionTree(Jk.ExecutionStatus.Failure,t);this.currentLevelExecutionTrees=i.children}this.pathToFailure==null?this.pathToFailure=`${n}`:this.pathToFailure+=`:${n}`,this.value=t,this.failure=r}skip(t){this.verbosity>=N8.VerbosityLevel.VeryVerbose&&this.appendExecutionTree(Jk.ExecutionStatus.Skipped,t),this.pathToFailure==null&&++this.numSkips}success(t){this.verbosity>=N8.VerbosityLevel.VeryVerbose&&this.appendExecutionTree(Jk.ExecutionStatus.Success,t),this.pathToFailure==null&&++this.numSuccesses}interrupt(){this.interrupted=!0}extractFailures(){if(this.isSuccess())return[];const t=[];let n=this.rootExecutionTrees;for(;n.length>0&&n[n.length-1].status===Jk.ExecutionStatus.Failure;){const r=n[n.length-1];t.push(r.value),n=r.children}return t}toRunDetails(t,n,r,i){return this.isSuccess()?{failed:this.numSkips>r||this.interrupted&&this.interruptedAsFailure,interrupted:this.interrupted,numRuns:this.numSuccesses,numSkips:this.numSkips,numShrinks:0,seed:t,counterexample:null,counterexamplePath:null,error:null,failures:[],executionSummary:this.rootExecutionTrees,verbose:this.verbosity,runConfiguration:i.toParameters()}:{failed:!0,interrupted:this.interrupted,numRuns:this.firstFailure()+1-this.numSkips,numSkips:this.numSkips,numShrinks:this.numShrinks(),seed:t,counterexample:this.value,counterexamplePath:aje.mergePaths(n,this.pathToFailure),error:this.failure,failures:this.extractFailures(),executionSummary:this.rootExecutionTrees,verbose:this.verbosity,runConfiguration:i.toParameters()}}};nL.RunExecution=ije;ije.mergePaths=(e,t)=>{if(e.length===0)return t;const n=e.split(":"),r=t.split(":"),i=+n[n.length-1]+ +r[0];return[...n.slice(0,n.length-1),`${i}`,...r.slice(1)].join(":")};Object.defineProperty(tL,"__esModule",{value:!0});tL.RunnerIterator=void 0;const bRt=nL;let $Rt=class{constructor(t,n,r,i){this.sourceValues=t,this.shrink=n,this.runExecution=new bRt.RunExecution(r,i),this.currentIdx=-1,this.nextValues=t}[Symbol.iterator](){return this}next(){const 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=="string"?(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_)}};tL.RunnerIterator=$Rt;var iL={};Object.defineProperty(iL,"__esModule",{value:!0});iL.SourceValuesIterator=void 0;let IRt=class{constructor(t,n,r){this.initialValues=t,this.maxInitialIterations=n,this.remainingSkips=r}[Symbol.iterator](){return this}next(){if(--this.maxInitialIterations!==-1&&this.remainingSkips>=0){const t=this.initialValues.next();if(!t.done)return{value:t.value(),done:!1}}return{value:void 0,done:!0}}skippedOne(){--this.remainingSkips,++this.maxInitialIterations}};iL.SourceValuesIterator=IRt;var fP={},sP={},lP={};Object.defineProperty(lP,"__esModule",{value:!0});lP.convertToRandomGenerator=void 0;let _Rt=class d2{constructor(t){this.rng=t,typeof this.rng.jump=="function"&&(this.jump=function(){const r=this.jump();return new d2(r)},this.unsafeJump=function(){const r=this.jump();this.rng=r})}min(){return this.rng.min()}max(){return this.rng.max()}clone(){return new d2(this.rng)}next(){const t=this.rng.next();return[t[0],new d2(t[1])]}unsafeNext(){const t=this.rng.next();return this.rng=t[1],t[0]}};function SRt(e){return"clone"in e&&"unsafeNext"in e?e:new _Rt(e)}lP.convertToRandomGenerator=SRt;Object.defineProperty(sP,"__esModule",{value:!0});sP.Random=void 0;const PR=VD,wRt=lP;let dP=class D1{constructor(t){this.internalRng=(0,wRt.convertToRandomGenerator)(t).clone()}clone(){return new D1(this.internalRng)}next(t){return(0,PR.unsafeUniformIntDistribution)(0,(1<e.generate(new MRt.Random(t),n)}function*TRt(e,t,n,r){yield*r.map(o=>()=>new ORt.NextValue(o,void 0));let i=0,a=(0,RRt.convertToRandomGenerator)(n(t));for(;;)a=a.jump?a.jump():(0,ARt.skipN)(a,42),yield ERt(e,a,i++)}fP.toss=TRt;var pP={};Object.defineProperty(pP,"__esModule",{value:!0});pP.pathWalk=void 0;const CRt=Mn;function PRt(e,t,n){let r=(0,CRt.stream)(t);const i=e.split(":").map(a=>+a);if(i.length===0)return r;if(!i.every(a=>!Number.isNaN(a)))throw new Error(`Unable to replay, got invalid path=${e}`);r=r.drop(i[0]);for(const a of i.slice(1)){const o=r.getNthOrLast(0);if(o==null)throw new Error(`Unable to replay, got wrong path=${e}`);r=n(o).drop(a)}return r}pP.pathWalk=PRt;var ps={};Object.defineProperty(ps,"__esModule",{value:!0});ps.asyncDefaultReportMessage=ps.defaultReportMessage=ps.asyncReportRunDetails=ps.reportRunDetails=void 0;const yG=$d,K2=uP,cme=rL;function FRt(e){return e.length===1?`Hint: ${e[0]}`:e.map((t,n)=>`Hint (${n+1}): ${t}`).join(` `)}function WRt(e,t){return`Encountered failures were: - ${e.map(t).join(` - `)}`}function Hee(e,t){const n=[],r=[];for(const i of e.slice().reverse())r.push({depth:1,tree:i});for(;r.length!==0;){const i=r.pop(),a=i.tree,o=i.depth,u=a.status===cme.ExecutionStatus.Success?"\x1B[32m√\x1B[0m":a.status===cme.ExecutionStatus.Failure?"\x1B[31m×\x1B[0m":"\x1B[33m!\x1B[0m",c=Array(o).join(". ");n.push(`${c}${u} ${t(a.value)}`);for(const f of a.children.slice().reverse())r.push({depth:o+1,tree:f})}return`Execution summary: ${n.join(` `)}`}function NRt(e,t){const n=`Failed to run property, too many pre-condition failures encountered { seed: ${e.seed} } Ran ${e.numRuns} time(s) Skipped ${e.numSkips} time(s)`;let r=null;const i=["Try to reduce the number of rejected values by combining map, flatMap and built-in arbitraries","Increase failure tolerance by setting maxSkipsPerRun to an higher value"];return e.verbose>=K2.VerbosityLevel.VeryVerbose?r=Hee(e.executionSummary,t):i.push("Enable verbose mode at level VeryVerbose in order to check all generated values and their associated status"),{message:n,details:r,hints:i}}function jRt(e,t){const n=`Property failed after ${e.numRuns} tests { seed: ${e.seed}, path: "${e.counterexamplePath}", endOnFailure: true } Counterexample: ${t(e.counterexample)} Shrunk ${e.numShrinks} time(s) Got error: ${e.error}`;let r=null;const i=[];return e.verbose>=K2.VerbosityLevel.VeryVerbose?r=Hee(e.executionSummary,t):e.verbose===K2.VerbosityLevel.Verbose?r=WRt(e.failures,t):i.push("Enable verbose mode in order to have the list of all failing values encountered during the run"),{message:n,details:r,hints:i}}function kRt(e,t){const n=`Property interrupted after ${e.numRuns} tests { seed: ${e.seed} }`;let r=null;const i=[];return e.verbose>=K2.VerbosityLevel.VeryVerbose?r=Hee(e.executionSummary,t):i.push("Enable verbose mode at level VeryVerbose in order to check all generated values and their associated status"),{message:n,details:r,hints:i}}function bG(e,t){if(!e.failed)return;const{message:n,details:r,hints:i}=e.counterexamplePath===null?e.interrupted?kRt(e,t):NRt(e,t):jRt(e,t);let a=n;return r!=null&&(a+=` ${r}`),i.length>0&&(a+=` ${FRt(i)}`),a}function oje(e){return bG(e,yG.stringify)}ps.defaultReportMessage=oje;async function uje(e){const t=[];function n(o){const u=(0,yG.possiblyAsyncStringify)(o);return typeof u=="string"?u:(t.push(Promise.all([o,u])),"…")}const r=bG(e,n);if(t.length===0)return r;const i=new Map(await Promise.all(t));function a(o){const u=i.get(o);return u!==void 0?u:(0,yG.stringify)(o)}return bG(e,a)}ps.asyncDefaultReportMessage=uje;function URt(e){if(e.failed)throw new Error(oje(e))}async function qRt(e){if(e.failed)throw new Error(await uje(e))}function xRt(e){return e.runConfiguration.asyncReporter?e.runConfiguration.asyncReporter(e):e.runConfiguration.reporter?e.runConfiguration.reporter(e):URt(e)}ps.reportRunDetails=xRt;async function DRt(e){return e.runConfiguration.asyncReporter?e.runConfiguration.asyncReporter(e):e.runConfiguration.reporter?e.runConfiguration.reporter(e):qRt(e)}ps.asyncReportRunDetails=DRt;Object.defineProperty(FI,"__esModule",{value:!0});FI.assert=FI.check=void 0;const G2=Mn,LRt=mc,BRt=tP,VRt=ZD,cje=tL,zRt=iL,KRt=fP,GRt=pP,fme=ps;function HRt(e,t,n,r,i){const a=new cje.RunnerIterator(n,t,r,i);for(const o of a){const u=e.run(o);a.handleResult(u)}return a.runExecution}async function JRt(e,t,n,r,i){const a=new cje.RunnerIterator(n,t,r,i);for(const o of a){const u=await e.run(o);a.handleResult(u)}return a.runExecution}function YRt(e,t,n){const r=n.split(":"),i=(0,G2.stream)(e).drop(r.length>0?+r[0]:0).map(o=>o()),a=["0",...r.slice(1)].join(":");return(0,G2.stream)((0,GRt.pathWalk)(a,i,t)).map(o=>()=>o)}function ZRt(e,t,n){return n.path.length===0?(0,G2.stream)(e):YRt(e,t,n.path)}function fje(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");const n=BRt.QualifiedParameters.read(Object.assign(Object.assign({},(0,LRt.readConfigureGlobal)()),t));if(n.reporter!==null&&n.asyncReporter!==null)throw new Error("Invalid parameters encountered, reporter and asyncReporter cannot be specified together");if(n.asyncReporter!==null&&!e.isAsync())throw new Error("Invalid parameters encountered, only asyncProperty can be used when asyncReporter specified");const r=(0,VRt.decorateProperty)(e,n),i=(0,KRt.toss)(r,n.seed,n.randomType,n.examples),a=n.path.indexOf(":")===-1?n.numRuns:-1,o=n.numRuns*n.maxSkipsPerRun,u=r.shrink.bind(r),c=ZRt(i,u,n),f=new zRt.SourceValuesIterator(c,a,o),s=n.endOnFailure?G2.Stream.nil:u;return r.isAsync()?JRt(r,s,f,n.verbose,n.markInterruptAsFailure).then(l=>l.toRunDetails(n.seed,n.path,o,n)):HRt(r,s,f,n.verbose,n.markInterruptAsFailure).toRunDetails(n.seed,n.path,o,n)}FI.check=fje;function XRt(e,t){const n=fje(e,t);if(e.isAsync())return n.then(fme.asyncReportRunDetails);(0,fme.reportRunDetails)(n)}FI.assert=XRt;var NI={};Object.defineProperty(NI,"__esModule",{value:!0});NI.statistics=NI.sample=void 0;const sme=Mn,QRt=lc,eOt=eP,tOt=cP,H2=mc,sje=tP,nOt=fP,rOt=pP;function iOt(e,t){const n=Object.prototype.hasOwnProperty.call(e,"isAsync")?(0,QRt.convertToNextProperty)(e):new eOt.Property(e,()=>!0);return t.unbiased===!0?new tOt.UnbiasedProperty(n):n}function lje(e,t){const n=typeof t=="number"?Object.assign(Object.assign({},(0,H2.readConfigureGlobal)()),{numRuns:t}):Object.assign(Object.assign({},(0,H2.readConfigureGlobal)()),t),r=sje.QualifiedParameters.read(n),i=iOt(e,r),a=i.shrink.bind(i),o=(0,sme.stream)((0,nOt.toss)(i,r.seed,r.randomType,r.examples));return r.path.length===0?o.take(r.numRuns).map(u=>u().value_):(0,sme.stream)((0,rOt.pathWalk)(r.path,o.map(u=>u()),a)).take(r.numRuns).map(u=>u.value_)}function aOt(e,t){return[...lje(e,t)]}NI.sample=aOt;function oOt(e,t,n){const r=typeof n=="number"?Object.assign(Object.assign({},(0,H2.readConfigureGlobal)()),{numRuns:n}):Object.assign(Object.assign({},(0,H2.readConfigureGlobal)()),n),i=sje.QualifiedParameters.read(r),a={};for(const f of lje(e,n)){const s=t(f),l=Array.isArray(s)?s:[s];for(const d of l)a[d]=(a[d]||0)+1}const o=Object.entries(a).sort((f,s)=>s[1]-f[1]).map(f=>[f[0],`${(f[1]*100/i.numRuns).toFixed(2)}%`]),u=o.map(f=>f[0].length).reduce((f,s)=>Math.max(f,s),0),c=o.map(f=>f[1].length).reduce((f,s)=>Math.max(f,s),0);for(const f of o)i.logger(`${f[0].padEnd(u,".")}..${f[1].padStart(c,".")}`)}NI.statistics=oOt;var si={},yw={},li={},bg={},Lp={};Object.defineProperty(Lp,"__esModule",{value:!0});Lp.biasNumericRange=Lp.bigIntLogLike=Lp.integerLogLike=void 0;function uOt(e){return Math.floor(Math.log(e)/Math.log(2))}Lp.integerLogLike=uOt;function cOt(e){return e===BigInt(0)?BigInt(0):BigInt(e.toString().length)}Lp.bigIntLogLike=cOt;function fOt(e,t,n){if(e===t)return[{min:e,max:t}];if(e<0&&t>0){const o=n(-e),u=n(t);return[{min:-o,max:u},{min:t-u,max:t},{min:e,max:e+o}]}const r=n(t-e),i={min:e,max:e+r},a={min:t-r,max:t};return e<0?[a,i]:[i,a]}Lp.biasNumericRange=fOt;var aL={};Object.defineProperty(aL,"__esModule",{value:!0});aL.shrinkInteger=void 0;const lme=Ar,dme=Mn;function pme(e){return Math.floor(e/2)}function hme(e){return Math.ceil(e/2)}function sOt(e,t,n){const r=e-t;function*i(){let o=n?void 0:t;const u=n?r:pme(r);for(let c=u;c>0;c=pme(c)){const f=c===r?t:e-c;yield new lme.NextValue(f,o),o=f}}function*a(){let o=n?void 0:t;const u=n?r:hme(r);for(let c=u;c<0;c=hme(c)){const f=c===r?t:e-c;yield new lme.NextValue(f,o),o=f}}return r>0?(0,dme.stream)(i()):(0,dme.stream)(a())}aL.shrinkInteger=sOt;Object.defineProperty(bg,"__esModule",{value:!0});bg.IntegerArbitrary=void 0;const lOt=gr,vme=Ar,dOt=Mn,mme=Lp,gme=aL;let pOt=class dje extends lOt.NextArbitrary{constructor(t,n){super(),this.min=t,this.max=n}generate(t,n){const r=this.computeGenerateRange(t,n);return new vme.NextValue(t.nextInt(r.min,r.max),void 0)}canShrinkWithoutContext(t){return typeof t=="number"&&Number.isInteger(t)&&!Object.is(t,-0)&&this.min<=t&&t<=this.max}shrink(t,n){if(!dje.isValidContext(t,n)){const r=this.defaultTarget();return(0,gme.shrinkInteger)(t,r,!0)}return this.isLastChanceTry(t,n)?dOt.Stream.of(new vme.NextValue(n,void 0)):(0,gme.shrinkInteger)(t,n,!1)}defaultTarget(){return this.min<=0&&this.max>=0?0:this.min<0?this.max:this.min}computeGenerateRange(t,n){if(n===void 0||t.nextInt(1,n)!==1)return{min:this.min,max:this.max};const r=(0,mme.biasNumericRange)(this.min,this.max,mme.integerLogLike);if(r.length===1)return r[0];const i=t.nextInt(-2*(r.length-1),r.length-2);return i<0?r[0]:r[i+1]}isLastChanceTry(t,n){return t>0?t===n+1&&t>this.min:t<0?t===n-1&&tt.max)throw new Error("fc.integer maximum value should be equal or greater than the minimum one");if(!Number.isInteger(t.min))throw new Error("fc.integer minimum value should be an integer");if(!Number.isInteger(t.max))throw new Error("fc.integer maximum value should be an integer");const n=new vOt.IntegerArbitrary(t.min,t.max);return(0,hOt.convertFromNextWithShrunkOnce)(n,n.defaultTarget())}li.integer=yOt;var M0={};Object.defineProperty(M0,"__esModule",{value:!0});M0.makeLazy=void 0;let bOt=class{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 $Ot(e){return new bOt(e)}M0.makeLazy=$Ot;var Jp={};Object.defineProperty(Jp,"__esModule",{value:!0});Jp.createDepthIdentifier=Jp.getDepthContextFor=void 0;const yme=new Map;function IOt(e){if(e===void 0)return{depth:0};if(typeof e!="string")return e;const t=yme.get(e);if(t!==void 0)return t;const n={depth:0};return yme.set(e,n),n}Jp.getDepthContextFor=IOt;function _Ot(){return{depth:0}}Jp.createDepthIdentifier=_Ot;Object.defineProperty(yw,"__esModule",{value:!0});yw.ArrayArbitrary=void 0;const j8=Mn,FR=Po,bme=li,k8=M0,SOt=gr,$me=Je,S1=Ar,wOt=Jp;function U8(e,t){return e===t?e:e+Math.floor(Math.log(t-e)/Math.log(2))}let AOt=class pje extends SOt.NextArbitrary{constructor(t,n,r,i,a,o){super(),this.arb=t,this.minLength=n,this.maxGeneratedLength=r,this.maxLength=i,this.setBuilder=o,this.lengthArb=(0,$me.convertToNext)((0,bme.integer)(n,r)),this.depthContext=(0,wOt.getDepthContextFor)(a)}preFilter(t){if(this.setBuilder===void 0)return t;const n=this.setBuilder();for(let r=0;r!==t.length;++r)n.tryAdd(t[r]);return n.getData()}static makeItCloneable(t,n){return t[FR.cloneMethod]=()=>{const r=[];for(let i=0;i!==n.length;++i)r.push(n[i].value);return this.makeItCloneable(r,n),r},t}generateNItemsNoDuplicates(t,n,r,i){let a=0;const o=t();for(;o.size()t.length||t.length>this.maxLength)return!1;for(let r=0;r!==t.length;++r)if(!(r in t)||!this.arb.canShrinkWithoutContext(t[r]))return!1;return this.preFilter(t.map(r=>new S1.NextValue(r,void 0))).length===t.length}shrinkItemByItem(t,n,r){let i=j8.Stream.nil();for(let a=n.startIndex;athis.arb.shrink(t[a],n.itemsContexts[a]).map(o=>{const u=t.slice(0,a).map((f,s)=>new S1.NextValue((0,FR.cloneIfNeeded)(f),n.itemsContexts[s])),c=t.slice(a+1).map((f,s)=>new S1.NextValue((0,FR.cloneIfNeeded)(f),n.itemsContexts[s+a+1]));return[u.concat(o).concat(c),void 0,a]})));return i}shrinkImpl(t,n){if(t.length===0)return j8.Stream.nil();const r=n!==void 0?n:{shrunkOnce:!1,lengthContext:void 0,itemsContexts:[],startIndex:0};return this.lengthArb.shrink(t.length,r.lengthContext).drop(r.shrunkOnce&&r.lengthContext===void 0&&t.length>this.minLength+1?1:0).map(i=>{const a=t.length-i.value;return[t.slice(a).map((o,u)=>new S1.NextValue((0,FR.cloneIfNeeded)(o),r.itemsContexts[u+a])),i.context,0]}).join((0,k8.makeLazy)(()=>t.length>this.minLength?this.shrinkItemByItem(t,r,1):this.shrinkItemByItem(t,r,t.length))).join(t.length>this.minLength?(0,k8.makeLazy)(()=>{const i={shrunkOnce:!1,lengthContext:void 0,itemsContexts:r.itemsContexts.slice(1),startIndex:0};return this.shrinkImpl(t.slice(1),i).filter(a=>this.minLength<=a[0].length+1).map(a=>[[new S1.NextValue((0,FR.cloneIfNeeded)(t[0]),r.itemsContexts[0])].concat(a[0]),void 0,0])}):j8.Stream.nil())}shrink(t,n){return this.shrinkImpl(t,n).map(r=>this.wrapper(r[0],!0,r[1],r[2]))}};yw.ArrayArbitrary=AOt;var Bs={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSize=e.depthFactorFromSizeForArbitrary=e.maxGeneratedLengthFromSizeForArbitrary=e.relativeSizeToSize=e.maxLengthFromMinLength=e.DefaultSize=e.MaxLengthUpperBound=void 0;const t=mc;e.MaxLengthUpperBound=2147483647;const n=["xsmall","small","medium","large","xlarge"],r=["-4","-3","-2","-1","=","+1","+2","+3","+4"];e.DefaultSize="small";function i(f,s){switch(s){case"xsmall":return Math.floor(1.1*f)+1;case"small":return 2*f+10;case"medium":return 11*f+100;case"large":return 101*f+1e3;case"xlarge":return 1001*f+1e4;default:throw new Error(`Unable to compute lengths based on received size: ${s}`)}}e.maxLengthFromMinLength=i;function a(f,s){const l=r.indexOf(f);if(l===-1)return f;const d=n.indexOf(s);if(d===-1)throw new Error(`Unable to offset size based on the unknown defaulted one: ${s}`);const p=d+l-4;return p<0?n[0]:p>=n.length?n[n.length-1]:n[p]}e.relativeSizeToSize=a;function o(f,s,l,d){const{baseSize:p=e.DefaultSize,defaultSizeToMaxWhenMaxSpecified:v=!0}=(0,t.readConfigureGlobal)()||{},h=f!==void 0?f:d&&v?"max":p;if(h==="max")return l;const $=a(h,p);return Math.min(i(s,$),l)}e.maxGeneratedLengthFromSizeForArbitrary=o;function u(f){if(typeof f=="number")return f;const{baseSize:s}=(0,t.readConfigureGlobal)()||{};if(f===void 0&&s===void 0)return 0;const l=s!==void 0?s:e.DefaultSize;switch(a(f!==void 0?f:l,l)){case"xsmall":return 1;case"small":return .5;case"medium":return .25;case"large":return .125;case"xlarge":return .0625}}e.depthFactorFromSizeForArbitrary=u;function c(f){const{baseSize:s=e.DefaultSize}=(0,t.readConfigureGlobal)()||{};return f===void 0?s:a(f,s)}e.resolveSize=c})(Bs);Object.defineProperty(si,"__esModule",{value:!0});si.array=void 0;const hje=Je,MOt=yw,Ime=Bs;function Yk(e,t,n,r,i){const a=r!==void 0?r:Ime.MaxLengthUpperBound,o=r!==void 0,u=(0,Ime.maxGeneratedLengthFromSizeForArbitrary)(t,n,a,o);return(0,hje.convertFromNext)(new MOt.ArrayArbitrary(e,n,u,a,i))}function ROt(e,...t){const n=(0,hje.convertToNext)(e);return t[0]===void 0?Yk(n,void 0,0,void 0,void 0):typeof t[0]=="object"?Yk(n,t[0].size,t[0].minLength||0,t[0].maxLength,t[0].depthIdentifier):t[1]!==void 0?Yk(n,void 0,t[0],t[1],void 0):Yk(n,void 0,0,t[0],void 0)}si.array=ROt;var hP={},R0={},oL={};Object.defineProperty(oL,"__esModule",{value:!0});oL.shrinkBigInt=void 0;const _me=Mn,Sme=Ar;function Zk(e){return e/BigInt(2)}function OOt(e,t,n){const r=e-t;function*i(){let o=n?void 0:t;const u=n?r:Zk(r);for(let c=u;c>0;c=Zk(c)){const f=e-c;yield new Sme.NextValue(f,o),o=f}}function*a(){let o=n?void 0:t;const u=n?r:Zk(r);for(let c=u;c<0;c=Zk(c)){const f=e-c;yield new Sme.NextValue(f,o),o=f}}return r>0?(0,_me.stream)(i()):(0,_me.stream)(a())}oL.shrinkBigInt=OOt;Object.defineProperty(R0,"__esModule",{value:!0});R0.BigIntArbitrary=void 0;const EOt=Mn,TOt=gr,wme=Ar,Ame=Lp,Mme=oL;let COt=class vje extends TOt.NextArbitrary{constructor(t,n){super(),this.min=t,this.max=n}generate(t,n){const r=this.computeGenerateRange(t,n);return new wme.NextValue(t.nextBigInt(r.min,r.max),void 0)}computeGenerateRange(t,n){if(n===void 0||t.nextInt(1,n)!==1)return{min:this.min,max:this.max};const r=(0,Ame.biasNumericRange)(this.min,this.max,Ame.bigIntLogLike);if(r.length===1)return r[0];const i=t.nextInt(-2*(r.length-1),r.length-2);return i<0?r[0]:r[i+1]}canShrinkWithoutContext(t){return typeof t=="bigint"&&this.min<=t&&t<=this.max}shrink(t,n){if(!vje.isValidContext(t,n)){const r=this.defaultTarget();return(0,Mme.shrinkBigInt)(t,r,!0)}return this.isLastChanceTry(t,n)?EOt.Stream.of(new wme.NextValue(n,void 0)):(0,Mme.shrinkBigInt)(t,n,!1)}defaultTarget(){return this.min<=0&&this.max>=0?BigInt(0):this.min<0?this.max:this.min}isLastChanceTry(t,n){return t>0?t===n+BigInt(1)&&t>this.min:t<0?t===n-BigInt(1)&&t0&&n<0||t<0&&n>0;if(n!==BigInt(0)&&r)throw new Error("Invalid context value passed to BigIntArbitrary (#2)");return!0}};R0.BigIntArbitrary=COt;Object.defineProperty(hP,"__esModule",{value:!0});hP.bigInt=void 0;const POt=Je,FOt=R0;function WOt(e){const n=BigInt(-1)<BigInt(0)?i*i:BigInt(0))}}function NOt(e){return e[0]===void 0?{}:e[1]===void 0?e[0]:{min:e[0],max:e[1]}}function jOt(...e){const t=WOt(NOt(e));if(t.min>t.max)throw new Error("fc.bigInt expects max to be greater than or equal to min");const n=new FOt.BigIntArbitrary(t.min,t.max);return(0,POt.convertFromNextWithShrunkOnce)(n,n.defaultTarget())}hP.bigInt=jOt;var uL={};Object.defineProperty(uL,"__esModule",{value:!0});uL.bigIntN=void 0;const kOt=Je,UOt=R0;function qOt(e){if(e<1)throw new Error("fc.bigIntN expects requested number of bits to be superior or equal to 1");const t=BigInt(-1)<i[Eme.cloneMethod]()):new q8.NextValue(i,r)}canShrinkWithoutContext(t){for(let n=0;n!==this.values.length;++n)if(Object.is(this.values[n],t))return!0;return!1}shrink(t,n){return n===0||Object.is(t,this.values[0])?Ome.Stream.nil():Ome.Stream.of(new q8.NextValue(this.values[0],0))}};mP.ConstantArbitrary=XOt;Object.defineProperty(O0,"__esModule",{value:!0});O0.constantFrom=void 0;const QOt=Je,eEt=mP;function tEt(...e){if(e.length===0)throw new Error("fc.constantFrom expects at least one parameter");return(0,QOt.convertFromNext)(new eEt.ConstantArbitrary(e))}O0.constantFrom=tEt;Object.defineProperty(fL,"__esModule",{value:!0});fL.falsy=void 0;const Tme=O0;function nEt(e){return!e||!e.withBigInt?(0,Tme.constantFrom)(!1,null,void 0,0,"",NaN):(0,Tme.constantFrom)(!1,null,void 0,0,"",NaN,BigInt(0))}fL.falsy=nEt;var gP={},Id={},jI={};Object.defineProperty(jI,"__esModule",{value:!0});jI.indexToCharStringUnmapper=jI.indexToCharStringMapper=void 0;jI.indexToCharStringMapper=String.fromCodePoint;function rEt(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");const t=e.charCodeAt(0);if(e.length===1)return t;const n=e.charCodeAt(1);if(t<55296||t>56319||n<56320||n>57343)throw new Error("Cannot unmap invalid surrogate pairs");return e.codePointAt(0)}jI.indexToCharStringUnmapper=rEt;Object.defineProperty(Id,"__esModule",{value:!0});Id.buildCharacterArbitrary=void 0;const Cme=Je,iEt=li,Pme=jI;function aEt(e,t,n,r){return(0,Cme.convertFromNext)((0,Cme.convertToNext)((0,iEt.integer)(e,t)).map(i=>(0,Pme.indexToCharStringMapper)(n(i)),i=>r((0,Pme.indexToCharStringUnmapper)(i))))}Id.buildCharacterArbitrary=aEt;var Yp={};Object.defineProperty(Yp,"__esModule",{value:!0});Yp.indexToPrintableIndexUnmapper=Yp.indexToPrintableIndexMapper=void 0;function oEt(e){return e<95?e+32:e<=126?e-95:e}Yp.indexToPrintableIndexMapper=oEt;function uEt(e){return e>=32&&e<=126?e-32:e>=0&&e<=31?e+95:e}Yp.indexToPrintableIndexUnmapper=uEt;Object.defineProperty(gP,"__esModule",{value:!0});gP.ascii=void 0;const cEt=Id,Fme=Yp;function fEt(){return(0,cEt.buildCharacterArbitrary)(0,127,Fme.indexToPrintableIndexMapper,Fme.indexToPrintableIndexUnmapper)}gP.ascii=fEt;var yP={};Object.defineProperty(yP,"__esModule",{value:!0});yP.base64=void 0;const sEt=Id;function lEt(e){return e<26?e+65:e<52?e+97-26:e<62?e+48-52:e===62?43:47}function dEt(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}function pEt(){return(0,sEt.buildCharacterArbitrary)(0,63,lEt,dEt)}yP.base64=pEt;var bP={};Object.defineProperty(bP,"__esModule",{value:!0});bP.char=void 0;const hEt=Id;function Wme(e){return e}function vEt(){return(0,hEt.buildCharacterArbitrary)(32,126,Wme,Wme)}bP.char=vEt;var $P={};Object.defineProperty($P,"__esModule",{value:!0});$P.char16bits=void 0;const mEt=Id,Nme=Yp;function gEt(){return(0,mEt.buildCharacterArbitrary)(0,65535,Nme.indexToPrintableIndexMapper,Nme.indexToPrintableIndexUnmapper)}$P.char16bits=gEt;var $w={};Object.defineProperty($w,"__esModule",{value:!0});$w.fullUnicode=void 0;const yEt=Id,mje=Yp,Jee=57343+1-55296;function bEt(e){return e<55296?(0,mje.indexToPrintableIndexMapper)(e):e+Jee}function $Et(e){return e<55296?(0,mje.indexToPrintableIndexUnmapper)(e):e<=57343?-1:e-Jee}function IEt(){return(0,yEt.buildCharacterArbitrary)(0,1114111-Jee,bEt,$Et)}$w.fullUnicode=IEt;var IP={};Object.defineProperty(IP,"__esModule",{value:!0});IP.hexa=void 0;const _Et=Id;function SEt(e){return e<10?e+48:e+97-10}function wEt(e){return e<58?e-48:e>=97&&e<103?e-97+10:-1}function AEt(){return(0,_Et.buildCharacterArbitrary)(0,15,SEt,wEt)}IP.hexa=AEt;var _P={};Object.defineProperty(_P,"__esModule",{value:!0});_P.unicode=void 0;const MEt=Id,gje=Yp,Yee=57343+1-55296;function REt(e){return e<55296?(0,gje.indexToPrintableIndexMapper)(e):e+Yee}function OEt(e){return e<55296?(0,gje.indexToPrintableIndexUnmapper)(e):e<=57343?-1:e-Yee}function EEt(){return(0,MEt.buildCharacterArbitrary)(0,65535-Yee,REt,OEt)}_P.unicode=EEt;var sL={},Ef={};Object.defineProperty(Ef,"__esModule",{value:!0});Ef.constant=void 0;const TEt=Je,CEt=mP;function PEt(e){return(0,TEt.convertFromNext)(new CEt.ConstantArbitrary([e]))}Ef.constant=PEt;Object.defineProperty(sL,"__esModule",{value:!0});sL.clonedConstant=void 0;const FEt=Ef;sL.clonedConstant=FEt.constant;var lL={};Object.defineProperty(lL,"__esModule",{value:!0});lL.context=void 0;const WEt=Po,NEt=Ef;let jEt=class yje{constructor(){this.receivedLogs=[]}log(t){this.receivedLogs.push(t)}size(){return this.receivedLogs.length}toString(){return JSON.stringify({logs:this.receivedLogs})}[WEt.cloneMethod](){return new yje}};function kEt(){return(0,NEt.constant)(new jEt)}lL.context=kEt;var SP={},kI={};Object.defineProperty(kI,"__esModule",{value:!0});kI.timeToDateUnmapper=kI.timeToDateMapper=void 0;function UEt(e){return new Date(e)}kI.timeToDateMapper=UEt;function qEt(e){if(!(e instanceof Date)||e.constructor!==Date)throw new Error("Not a valid value for date unmapper");return e.getTime()}kI.timeToDateUnmapper=qEt;Object.defineProperty(SP,"__esModule",{value:!0});SP.date=void 0;const jme=Je,xEt=li,kme=kI;function DEt(e){const t=e&&e.min!==void 0?e.min.getTime():-864e13,n=e&&e.max!==void 0?e.max.getTime():864e13;if(Number.isNaN(t))throw new Error("fc.date min must be valid instance of Date");if(Number.isNaN(n))throw new Error("fc.date max must be valid instance of Date");if(t>n)throw new Error("fc.date max must be greater or equal to min");return(0,jme.convertFromNext)((0,jme.convertToNext)((0,xEt.integer)(t,n)).map(kme.timeToDateMapper,kme.timeToDateUnmapper))}SP.date=DEt;var wP={},dL={};Object.defineProperty(dL,"__esModule",{value:!0});dL.CloneArbitrary=void 0;const LEt=gr,BEt=Ar,VEt=Po,Ume=Mn;let zEt=class bje extends LEt.NextArbitrary{constructor(t,n){super(),this.arb=t,this.numValues=n}generate(t,n){const r=[];if(this.numValues<=0)return this.wrapper(r);for(let i=0;i!==this.numValues-1;++i)r.push(this.arb.generate(t.clone(),n));return r.push(this.arb.generate(t,n)),this.wrapper(r)}canShrinkWithoutContext(t){if(!Array.isArray(t)||t.length!==this.numValues)return!1;if(t.length===0)return!0;for(let n=1;nthis.wrapper(r))}*shrinkImpl(t,n){const r=t.map((a,o)=>this.arb.shrink(a,n[o])[Symbol.iterator]());let i=r.map(a=>a.next());for(;!i[0].done;)yield i.map(a=>a.value),i=r.map(a=>a.next())}static makeItCloneable(t,n){return t[VEt.cloneMethod]=()=>{const r=[];for(let i=0;i!==n.length;++i)r.push(n[i].value);return this.makeItCloneable(r,n),r},t}wrapper(t){let n=!1;const r=[],i=[];for(let a=0;a!==t.length;++a){const o=t[a];n=n||o.hasToBeCloned,r.push(o.value),i.push(o.context)}return n&&bje.makeItCloneable(r,t),new BEt.NextValue(r,i)}};dL.CloneArbitrary=zEt;Object.defineProperty(wP,"__esModule",{value:!0});wP.clone=void 0;const qme=Je,KEt=dL;function GEt(e,t){return(0,qme.convertFromNext)(new KEt.CloneArbitrary((0,qme.convertToNext)(e),t))}wP.clone=GEt;var pL={};Object.defineProperty(pL,"__esModule",{value:!0});pL.dedup=void 0;const HEt=wP;pL.dedup=HEt.clone;var AP={},Ei={};Object.defineProperty(Ei,"__esModule",{value:!0});Ei.tuple=void 0;const xme=Je,JEt=ZC;function YEt(...e){const t=e.map(n=>(0,xme.convertToNext)(n));return(0,xme.convertFromNext)(new JEt.TupleArbitrary(t))}Ei.tuple=YEt;var E0={},MP={};Object.defineProperty(MP,"__esModule",{value:!0});MP.CustomEqualSet=void 0;let ZEt=class{constructor(t){this.isEqual=t,this.data=[]}tryAdd(t){for(let n=0;n!==this.data.length;++n)if(this.isEqual(this.data[n],t))return!1;return this.data.push(t),!0}size(){return this.data.length}getData(){return this.data.slice()}};MP.CustomEqualSet=ZEt;var RP={};Object.defineProperty(RP,"__esModule",{value:!0});RP.StrictlyEqualSet=void 0;let XEt=class{constructor(t){this.selector=t,this.selectedItemsExceptNaN=new Set,this.data=[]}tryAdd(t){const n=this.selector(t);if(Number.isNaN(n))return this.data.push(t),!0;const r=this.selectedItemsExceptNaN.size;return this.selectedItemsExceptNaN.add(n),r!==this.selectedItemsExceptNaN.size?(this.data.push(t),!0):!1}size(){return this.data.length}getData(){return this.data}};RP.StrictlyEqualSet=XEt;var OP={};Object.defineProperty(OP,"__esModule",{value:!0});OP.SameValueSet=void 0;let QEt=class{constructor(t){this.selector=t,this.selectedItemsExceptMinusZero=new Set,this.data=[],this.hasMinusZero=!1}tryAdd(t){const n=this.selector(t);if(Object.is(n,-0))return this.hasMinusZero?!1:(this.data.push(t),this.hasMinusZero=!0,!0);const r=this.selectedItemsExceptMinusZero.size;return this.selectedItemsExceptMinusZero.add(n),r!==this.selectedItemsExceptMinusZero.size?(this.data.push(t),!0):!1}size(){return this.data.length}getData(){return this.data}};OP.SameValueSet=QEt;var EP={};Object.defineProperty(EP,"__esModule",{value:!0});EP.SameValueZeroSet=void 0;let eTt=class{constructor(t){this.selector=t,this.selectedItems=new Set,this.data=[]}tryAdd(t){const n=this.selector(t),r=this.selectedItems.size;return this.selectedItems.add(n),r!==this.selectedItems.size?(this.data.push(t),!0):!1}size(){return this.data.length}getData(){return this.data}};EP.SameValueZeroSet=eTt;Object.defineProperty(E0,"__esModule",{value:!0});E0.uniqueArray=void 0;const tTt=yw,Dme=Je,Lme=Bs,Bme=MP,nTt=RP,rTt=OP,iTt=EP;function aTt(e){if(typeof e.comparator=="function"){if(e.selector===void 0){const u=e.comparator,c=(f,s)=>u(f.value_,s.value_);return()=>new Bme.CustomEqualSet(c)}const r=e.comparator,i=e.selector,a=u=>i(u.value_),o=(u,c)=>r(a(u),a(c));return()=>new Bme.CustomEqualSet(o)}const t=e.selector||(r=>r),n=r=>t(r.value_);switch(e.comparator){case"IsStrictlyEqual":return()=>new nTt.StrictlyEqualSet(n);case"SameValueZero":return()=>new iTt.SameValueZeroSet(n);case"SameValue":case void 0:return()=>new rTt.SameValueSet(n)}}function oTt(e,t={}){const n=t.minLength!==void 0?t.minLength:0,r=t.maxLength!==void 0?t.maxLength:Lme.MaxLengthUpperBound,i=(0,Lme.maxGeneratedLengthFromSizeForArbitrary)(t.size,n,r,t.maxLength!==void 0),a=t.depthIdentifier,o=aTt(t),u=(0,Dme.convertToNext)(e),c=(0,Dme.convertFromNext)(new tTt.ArrayArbitrary(u,n,i,r,a,o));return n===0?c:c.filter(f=>f.length>=n)}E0.uniqueArray=oTt;var yb={};Object.defineProperty(yb,"__esModule",{value:!0});yb.keyValuePairsToObjectUnmapper=yb.keyValuePairsToObjectMapper=void 0;function uTt(e){const t={};for(const n of e)t[n[0]]=n[1];return t}yb.keyValuePairsToObjectMapper=uTt;function cTt(e){return function(n){const r=Object.getOwnPropertyDescriptor(e,n);return r===void 0||!r.configurable||!r.enumerable||!r.writable||r.get!==void 0||r.set!==void 0}}function fTt(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!==Object)throw new Error("Incompatible instance received: should be of exact type Object");if(Object.getOwnPropertySymbols(e).length>0)throw new Error("Incompatible instance received: should contain symbols");if(Object.getOwnPropertyNames(e).find(cTt(e))!==void 0)throw new Error("Incompatible instance received: should contain only c/e/w properties without get/set");return Object.entries(e)}yb.keyValuePairsToObjectUnmapper=fTt;Object.defineProperty(AP,"__esModule",{value:!0});AP.dictionary=void 0;const Vme=Je,sTt=Ei,lTt=E0,zme=yb;function dTt(e){return e[0]}function pTt(e,t,n={}){return(0,Vme.convertFromNext)((0,Vme.convertToNext)((0,lTt.uniqueArray)((0,sTt.tuple)(e,t),{minLength:n.minKeys,maxLength:n.maxKeys,size:n.size,selector:dTt})).map(zme.keyValuePairsToObjectMapper,zme.keyValuePairsToObjectUnmapper))}AP.dictionary=pTt;var hL={},Iw={},T0={},_w={};Object.defineProperty(_w,"__esModule",{value:!0});_w.FrequencyArbitrary=void 0;const Xk=Mn,Kme=Je,hTt=gr,Gme=Ar,vTt=Jp,mTt=Bs;let gTt=class $G extends hTt.NextArbitrary{constructor(t,n,r){super(),this.warbs=t,this.constraints=n,this.context=r;let i=0;this.cumulatedWeights=[];for(let a=0;a!==t.length;++a)i+=t[a].weight,this.cumulatedWeights.push(i);this.totalWeight=i}static fromOld(t,n,r){return(0,Kme.convertFromNext)($G.from(t.map(i=>Object.assign(Object.assign({},i),{arbitrary:(0,Kme.convertToNext)(i.arbitrary)})),n,r))}static from(t,n,r){if(t.length===0)throw new Error(`${r} expects at least one weighted arbitrary`);let i=0;for(let o=0;o!==t.length;++o){if(t[o].arbitrary===void 0)throw new Error(`${r} expects arbitraries to be specified`);const c=t[o].weight;if(i+=c,!Number.isInteger(c))throw new Error(`${r} expects weights to be integer values`);if(c<0)throw new Error(`${r} expects weights to be superior or equal to 0`)}if(i<=0)throw new Error(`${r} expects the sum of weights to be strictly superior to 0`);const a={depthFactor:(0,mTt.depthFactorFromSizeForArbitrary)(n.depthFactor),depthIdentifier:n.depthIdentifier,maxDepth:n.maxDepth,withCrossShrink:n.withCrossShrink};return new $G(t,a,(0,vTt.getDepthContextFor)(n.depthIdentifier))}generate(t,n){if(this.mustGenerateFirst())return this.safeGenerateForIndex(t,0,n);const r=t.nextInt(this.computeNegDepthBenefit(),this.totalWeight-1);for(let i=0;i!==this.cumulatedWeights.length;++i)if(rthis.mapIntoNextValue(a,f,null,o));if(i.clonedMrngForFallbackFirst!==null){i.cachedGeneratedForFirst===void 0&&(i.cachedGeneratedForFirst=this.safeGenerateForIndex(i.clonedMrngForFallbackFirst,0,o));const f=i.cachedGeneratedForFirst;return Xk.Stream.of(f).join(c)}return c}const r=this.canShrinkWithoutContextIndex(t);return r===-1?Xk.Stream.nil():this.defaultShrinkForFirst(r).join(this.warbs[r].arbitrary.shrink(t,void 0).map(i=>this.mapIntoNextValue(r,i,null,void 0)))}defaultShrinkForFirst(t){++this.context.depth;try{if(!this.mustFallbackToFirstInShrink(t)||this.warbs[0].fallbackValue===void 0)return Xk.Stream.nil()}finally{--this.context.depth}const n=new Gme.NextValue(this.warbs[0].fallbackValue.default,void 0);return Xk.Stream.of(this.mapIntoNextValue(0,n,null,void 0))}canShrinkWithoutContextIndex(t){if(this.mustGenerateFirst())return this.warbs[0].arbitrary.canShrinkWithoutContext(t)?0:-1;try{++this.context.depth;for(let n=0;n!==this.warbs.length;++n){const r=this.warbs[n];if(r.weight!==0&&r.arbitrary.canShrinkWithoutContext(t))return n}return-1}finally{--this.context.depth}}mapIntoNextValue(t,n,r,i){const a={selectedIndex:t,originalBias:i,originalContext:n.context,clonedMrngForFallbackFirst:r};return new Gme.NextValue(n.value,a)}safeGenerateForIndex(t,n,r){++this.context.depth;try{const i=this.warbs[n].arbitrary.generate(t,r),a=this.mustFallbackToFirstInShrink(n)?t.clone():null;return this.mapIntoNextValue(n,i,a,r)}finally{--this.context.depth}}mustGenerateFirst(){return this.constraints.maxDepth!==void 0&&this.constraints.maxDepth<=this.context.depth}mustFallbackToFirstInShrink(t){return t!==0&&!!this.constraints.withCrossShrink&&this.warbs[0].weight!==0}computeNegDepthBenefit(){const t=this.constraints.depthFactor;if(t===void 0||t<=0||this.warbs[0].weight===0)return 0;const n=Math.floor(Math.pow(1+t,this.context.depth))-1;return-Math.min(this.totalWeight*n,Number.MAX_SAFE_INTEGER)||0}};_w.FrequencyArbitrary=gTt;Object.defineProperty(T0,"__esModule",{value:!0});T0.frequency=void 0;const Hme=_w;function yTt(e){return e!=null&&typeof e=="object"&&!("arbitrary"in e)}function bTt(...e){const t="fc.frequency",n=e[0];return yTt(n)?Hme.FrequencyArbitrary.fromOld(e.slice(1),n,t):Hme.FrequencyArbitrary.fromOld(e,{},t)}T0.frequency=bTt;var TP={},$g={};Object.defineProperty($g,"__esModule",{value:!0});$g.nat=void 0;const $Tt=Je,ITt=bg;function _Tt(e){const t=typeof e=="number"?e:e&&e.max!==void 0?e.max:2147483647;if(t<0)throw new Error("fc.nat value should be greater than or equal to 0");if(!Number.isInteger(t))throw new Error("fc.nat maximum value should be an integer");const n=new ITt.IntegerArbitrary(0,t);return(0,$Tt.convertFromNextWithShrunkOnce)(n,n.defaultTarget())}$g.nat=_Tt;var UI={};Object.defineProperty(UI,"__esModule",{value:!0});UI.indexToMappedConstantUnmapperFor=UI.indexToMappedConstantMapperFor=void 0;function STt(e){return function(n){let r=-1,i=0;for(;n>=i;)i+=e[++r].num;return e[r].build(n-i+e[r].num)}}UI.indexToMappedConstantMapperFor=STt;function wTt(e){const t={mapping:new Map,negativeZeroIndex:void 0};let n=0;for(let r=0;r!==e.length;++r){const i=e[r];for(let a=0;a!==i.num;++a){const o=i.build(a);o===0&&1/o===Number.NEGATIVE_INFINITY?t.negativeZeroIndex=n:t.mapping.set(o,n),++n}}return t}function ATt(e){let t=null;return function(r){t===null&&(t=wTt(e));const i=Object.is(r,-0)?t.negativeZeroIndex:t.mapping.get(r);if(i===void 0)throw new Error("Unknown value encountered cannot be built using this mapToConstant");return i}}UI.indexToMappedConstantUnmapperFor=ATt;Object.defineProperty(TP,"__esModule",{value:!0});TP.mapToConstant=void 0;const Jme=Je,MTt=$g,Yme=UI;function RTt(e){if(e.length===0)throw new Error("fc.mapToConstant expects at least one option");let t=0;for(let n=0;n!==e.length;++n){if(e[n].num<0)throw new Error("fc.mapToConstant expects all options to have a number of entries greater or equal to zero");t+=e[n].num}if(t===0)throw new Error("fc.mapToConstant expects at least one choice among options");return t}function OTt(...e){const t=RTt(e);return(0,Jme.convertFromNext)((0,Jme.convertToNext)((0,MTt.nat)({max:t-1})).map((0,Yme.indexToMappedConstantMapperFor)(e),(0,Yme.indexToMappedConstantUnmapperFor)(e)))}TP.mapToConstant=OTt;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.buildAlphaNumericPercentArbitrary=e.buildAlphaNumericArbitrary=e.buildLowerAlphaNumericArbitrary=e.buildLowerAlphaArbitrary=void 0;const t=$w,n=T0,r=TP,i=Je,a={num:26,build:h=>String.fromCharCode(h+97)},o={num:26,build:h=>String.fromCharCode(h+65)},u={num:10,build:h=>String.fromCharCode(h+48)};function c(h){const $=encodeURIComponent(h);return h!==$?$:`%${h.charCodeAt(0).toString(16)}`}function f(h){if(typeof h!="string")throw new Error("Unsupported");return decodeURIComponent(h)}const s=(0,i.convertFromNext)((0,i.convertToNext)((0,t.fullUnicode)()).map(c,f)),l=h=>(0,r.mapToConstant)(a,{num:h.length,build:$=>h[$]});e.buildLowerAlphaArbitrary=l;const d=h=>(0,r.mapToConstant)(a,u,{num:h.length,build:$=>h[$]});e.buildLowerAlphaNumericArbitrary=d;const p=h=>(0,r.mapToConstant)(a,o,u,{num:h.length,build:$=>h[$]});e.buildAlphaNumericArbitrary=p;const v=h=>(0,n.frequency)({weight:10,arbitrary:(0,e.buildAlphaNumericArbitrary)(h)},{weight:1,arbitrary:s});e.buildAlphaNumericPercentArbitrary=v})(Iw);var Sw={},Ig={};Object.defineProperty(Ig,"__esModule",{value:!0});Ig.option=void 0;const ETt=Ef,TTt=_w;function CTt(e){return typeof e=="number"?{freq:e}:e||{}}function PTt(e,t){const n=CTt(t),r=n.freq==null?5:n.freq,i=Object.prototype.hasOwnProperty.call(n,"nil")?n.nil:null,o=[{arbitrary:(0,ETt.constant)(i),weight:1,fallbackValue:{default:i}},{arbitrary:e,weight:r}],u={withCrossShrink:!0,depthFactor:n.depthFactor,maxDepth:n.maxDepth,depthIdentifier:n.depthIdentifier};return TTt.FrequencyArbitrary.fromOld(o,u,"fc.option")}Ig.option=PTt;var jh={},Vs={};Object.defineProperty(Vs,"__esModule",{value:!0});Vs.extractStringConstraints=void 0;function FTt(e){return e[0]!==void 0?typeof e[0]=="number"?typeof e[1]=="number"?{minLength:e[0],maxLength:e[1]}:{maxLength:e[0]}:e[0]:{}}Vs.extractStringConstraints=FTt;var qI={};Object.defineProperty(qI,"__esModule",{value:!0});qI.patternsToStringUnmapperFor=qI.patternsToStringMapper=void 0;const WTt=Bs;function NTt(e){return e.join("")}qI.patternsToStringMapper=NTt;function jTt(e,t){return function(r){if(typeof r!="string")throw new Error("Unsupported value");const i=t.minLength!==void 0?t.minLength:0,a=t.maxLength!==void 0?t.maxLength:WTt.MaxLengthUpperBound;if(r.length===0){if(i>0)throw new Error("Unable to unmap received string");return[]}const o=[{endIndexChunks:0,nextStartIndex:1,chunks:[]}];for(;o.length>0;){const u=o.pop();for(let c=u.nextStartIndex;c<=r.length;++c){const f=r.substring(u.endIndexChunks,c);if(e.canShrinkWithoutContext(f)){const s=u.chunks.concat([f]);if(c===r.length){if(s.lengtha)break;return s}o.push({endIndexChunks:u.endIndexChunks,nextStartIndex:c+1,chunks:u.chunks}),o.push({endIndexChunks:c,nextStartIndex:c+1,chunks:s});break}}}throw new Error("Unable to unmap received string")}}qI.patternsToStringUnmapperFor=jTt;Object.defineProperty(jh,"__esModule",{value:!0});jh.stringOf=void 0;const x8=Je,kTt=si,UTt=Vs,Zme=qI;function qTt(e,...t){const n=(0,UTt.extractStringConstraints)(t);return(0,x8.convertFromNext)((0,x8.convertToNext)((0,kTt.array)(e,n)).map(Zme.patternsToStringMapper,(0,Zme.patternsToStringUnmapperFor)((0,x8.convertToNext)(e),n)))}jh.stringOf=qTt;var vL={};Object.defineProperty(vL,"__esModule",{value:!0});vL.filterInvalidSubdomainLabel=void 0;function xTt(e){return e.length>63?!1:e.length<4||e[0]!=="x"||e[1]!=="n"||e[2]!=="-"||e[3]!=="-"}vL.filterInvalidSubdomainLabel=xTt;var CP={};Object.defineProperty(CP,"__esModule",{value:!0});CP.adapter=void 0;const DTt=gr,LTt=Ar,BTt=Mn,$je=Symbol("adapted-value");function VTt(e,t){const n=t(e.value_);return n.adapted?new LTt.NextValue(n.value,$je):e}let zTt=class extends DTt.NextArbitrary{constructor(t,n){super(),this.sourceArb=t,this.adapter=n,this.adaptNextValue=r=>VTt(r,n)}generate(t,n){const r=this.sourceArb.generate(t,n);return this.adaptNextValue(r)}canShrinkWithoutContext(t){return this.sourceArb.canShrinkWithoutContext(t)&&!this.adapter(t).adapted}shrink(t,n){return n===$je?this.sourceArb.canShrinkWithoutContext(t)?this.sourceArb.shrink(t,void 0).map(this.adaptNextValue):BTt.Stream.nil():this.sourceArb.shrink(t,n).map(this.adaptNextValue)}};function KTt(e,t){return new zTt(e,t)}CP.adapter=KTt;Object.defineProperty(Sw,"__esModule",{value:!0});Sw.domain=void 0;const GTt=si,IG=Iw,HTt=Ig,Ije=jh,_G=Ei,JTt=vL,J2=Je,Xme=Bs,YTt=CP;function ZTt([e,t]){return t===null?e:`${e}${t[0]}${t[1]}`}function XTt(e){if(typeof e!="string"||e.length===0)throw new Error("Unsupported");return e.length===1?[e[0],null]:[e[0],[e.substring(1,e.length-1),e[e.length-1]]]}function QTt(e){const t=(0,IG.buildLowerAlphaNumericArbitrary)([]),n=(0,IG.buildLowerAlphaNumericArbitrary)(["-"]);return(0,J2.convertFromNext)((0,J2.convertToNext)((0,_G.tuple)(t,(0,HTt.option)((0,_G.tuple)((0,Ije.stringOf)(n,{size:e,maxLength:61}),t)))).map(ZTt,XTt).filter(JTt.filterInvalidSubdomainLabel))}function eCt(e){return`${e[0].join(".")}.${e[1]}`}function tCt(e){if(typeof e!="string")throw new Error("Unsupported type");const t=e.lastIndexOf(".");return[e.substring(0,t).split("."),e.substring(t+1)]}function nCt(e){const[t,n]=e;let r=n.length;for(let i=0;i!==t.length;++i)if(r+=1+t[i].length,r>255)return{adapted:!0,value:[t.slice(0,i),n]};return{adapted:!1,value:e}}function rCt(e={}){const t=(0,Xme.resolveSize)(e.size),n=(0,Xme.relativeSizeToSize)("-1",t),r=(0,IG.buildLowerAlphaArbitrary)([]),i=(0,Ije.stringOf)(r,{minLength:2,maxLength:63,size:n});return(0,J2.convertFromNext)((0,YTt.adapter)((0,J2.convertToNext)((0,_G.tuple)((0,GTt.array)(QTt(t),{size:n,minLength:1,maxLength:127}),i)),nCt).map(eCt,tCt))}Sw.domain=rCt;Object.defineProperty(hL,"__esModule",{value:!0});hL.emailAddress=void 0;const iCt=si,aCt=Iw,oCt=Sw,uCt=jh,cCt=Ei,Qk=Je,fCt=CP;function sCt(e){let t=e[0].length;for(let n=1;n!==e.length;++n)if(t+=1+e[n].length,t>64)return{adapted:!0,value:e.slice(0,n)};return{adapted:!1,value:e}}function lCt(e){return e.join(".")}function dCt(e){if(typeof e!="string")throw new Error("Unsupported");return e.split(".")}function pCt(e){return`${e[0]}@${e[1]}`}function hCt(e){if(typeof e!="string")throw new Error("Unsupported");return e.split("@",2)}function vCt(e={}){const t=["!","#","$","%","&","'","*","+","-","/","=","?","^","_","`","{","|","}","~"],n=(0,aCt.buildLowerAlphaNumericArbitrary)(t),r=(0,Qk.convertFromNext)((0,fCt.adapter)((0,Qk.convertToNext)((0,iCt.array)((0,uCt.stringOf)(n,{minLength:1,maxLength:64,size:e.size}),{minLength:1,maxLength:32,size:e.size})),sCt).map(lCt,dCt));return(0,Qk.convertFromNext)((0,Qk.convertToNext)((0,cCt.tuple)(r,(0,oCt.domain)({size:e.size}))).map(pCt,hCt))}hL.emailAddress=vCt;var C0={},mL={},gL={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.logLike64=e.halve64=e.add64=e.negative64=e.substract64=e.clone64=e.isStrictlySmaller64=e.isEqual64=e.isStrictlyPositive64=e.isStrictlyNegative64=e.isZero64=e.Unit64=e.Zero64=void 0,e.Zero64={sign:1,data:[0,0]},e.Unit64={sign:1,data:[0,1]};function t(h){return h.data[0]===0&&h.data[1]===0}e.isZero64=t;function n(h){return h.sign===-1&&!t(h)}e.isStrictlyNegative64=n;function r(h){return h.sign===1&&!t(h)}e.isStrictlyPositive64=r;function i(h,$){return h.data[0]===$.data[0]&&h.data[1]===$.data[1]?h.sign===$.sign||h.data[0]===0&&h.data[1]===0:!1}e.isEqual64=i;function a(h,$){return h[0]<$[0]||h[0]===$[0]&&h[1]<$[1]}function o(h,$){return h.sign===$.sign?h.sign===1?a(h.data,$.data):a($.data,h.data):h.sign===-1&&(!t(h)||!t($))}e.isStrictlySmaller64=o;function u(h){return{sign:h.sign,data:[h.data[0],h.data[1]]}}e.clone64=u;function c(h,$){let b=0,y=h[1]-$[1];return y<0&&(b=1,y=y>>>0),[h[0]-$[0]-b,y]}function f(h,$){if(h.sign===1&&$.sign===-1){const b=h.data[1]+$.data[1];return{sign:1,data:[h.data[0]+$.data[0]+(b>4294967295?1:0)>>>0,b>>>0]}}return{sign:1,data:h.sign===1?c(h.data,$.data):c($.data,h.data)}}function s(h,$){if(o(h,$)){const b=f($,h);return b.sign=-1,b}return f(h,$)}e.substract64=s;function l(h){return{sign:-h.sign,data:[h.data[0],h.data[1]]}}e.negative64=l;function d(h,$){return t($)?t(h)?u(e.Zero64):u(h):s(h,l($))}e.add64=d;function p(h){return{sign:h.sign,data:[Math.floor(h.data[0]/2),(h.data[0]%2===1?2147483648:0)+Math.floor(h.data[1]/2)]}}e.halve64=p;function v(h){return{sign:h.sign,data:[0,Math.floor(Math.log(h.data[0]*4294967296+h.data[1])/Math.log(2))]}}e.logLike64=v})(gL);var yL={};Object.defineProperty(yL,"__esModule",{value:!0});yL.arrayInt64=void 0;const Qme=Mn,mCt=Je,gCt=gr,D8=Ar,Zt=gL;let yCt=class _je extends gCt.NextArbitrary{constructor(t,n){super(),this.min=t,this.max=n,this.biasedRanges=null}generate(t,n){const r=this.computeGenerateRange(t,n),i=t.nextArrayInt(r.min,r.max);return i.data.length===1&&i.data.unshift(0),new D8.NextValue(i,void 0)}computeGenerateRange(t,n){if(n===void 0||t.nextInt(1,n)!==1)return{min:this.min,max:this.max};const r=this.retrieveBiasedRanges();if(r.length===1)return r[0];const i=t.nextInt(-2*(r.length-1),r.length-2);return i<0?r[0]:r[i+1]}canShrinkWithoutContext(t){const n=t;return typeof t=="object"&&t!==null&&(n.sign===-1||n.sign===1)&&Array.isArray(n.data)&&n.data.length===2&&((0,Zt.isStrictlySmaller64)(this.min,n)&&(0,Zt.isStrictlySmaller64)(n,this.max)||(0,Zt.isEqual64)(this.min,n)||(0,Zt.isEqual64)(this.max,n))}shrinkArrayInt64(t,n,r){const i=(0,Zt.substract64)(t,n);function*a(){let o=r?void 0:n;const u=r?i:(0,Zt.halve64)(i);for(let c=u;!(0,Zt.isZero64)(c);c=(0,Zt.halve64)(c)){const f=(0,Zt.substract64)(t,c);yield new D8.NextValue(f,o),o=f}}return(0,Qme.stream)(a())}shrink(t,n){if(!_je.isValidContext(t,n)){const r=this.defaultTarget();return this.shrinkArrayInt64(t,r,!0)}return this.isLastChanceTry(t,n)?Qme.Stream.of(new D8.NextValue(n,void 0)):this.shrinkArrayInt64(t,n,!1)}defaultTarget(){return!(0,Zt.isStrictlyPositive64)(this.min)&&!(0,Zt.isStrictlyNegative64)(this.max)?Zt.Zero64:(0,Zt.isStrictlyNegative64)(this.min)?this.max:this.min}isLastChanceTry(t,n){return(0,Zt.isZero64)(t)?!1:t.sign===1?(0,Zt.isEqual64)(t,(0,Zt.add64)(n,Zt.Unit64))&&(0,Zt.isStrictlyPositive64)((0,Zt.substract64)(t,this.min)):(0,Zt.isEqual64)(t,(0,Zt.substract64)(n,Zt.Unit64))&&(0,Zt.isStrictlyNegative64)((0,Zt.substract64)(t,this.max))}static isValidContext(t,n){if(n===void 0)return!1;if(typeof n!="object"||n===null||!("sign"in n)||!("data"in n))throw new Error("Invalid context type passed to ArrayInt64Arbitrary (#1)");return!0}retrieveBiasedRanges(){if(this.biasedRanges!=null)return this.biasedRanges;if((0,Zt.isEqual64)(this.min,this.max))return this.biasedRanges=[{min:this.min,max:this.max}],this.biasedRanges;const t=(0,Zt.isStrictlyNegative64)(this.min),n=(0,Zt.isStrictlyPositive64)(this.max);if(t&&n){const r=(0,Zt.logLike64)(this.min),i=(0,Zt.logLike64)(this.max);this.biasedRanges=[{min:r,max:i},{min:(0,Zt.substract64)(this.max,i),max:this.max},{min:this.min,max:(0,Zt.substract64)(this.min,r)}]}else{const r=(0,Zt.logLike64)((0,Zt.substract64)(this.max,this.min)),i={min:this.min,max:(0,Zt.add64)(this.min,r)},a={min:(0,Zt.substract64)(this.max,r),max:this.max};this.biasedRanges=t?[a,i]:[i,a]}return this.biasedRanges}};function bCt(e,t){const n=new yCt(e,t);return(0,mCt.convertFromNextWithShrunkOnce)(n,n.defaultTarget())}yL.arrayInt64=bCt;var bm={};Object.defineProperty(bm,"__esModule",{value:!0});bm.indexToDouble=bm.doubleToIndex=bm.decomposeDouble=void 0;const SG=gL,Sje={sign:1,data:[2146435072,0]},$Ct={sign:-1,data:[2146435072,1]};function wje(e){const t=2-Number.EPSILON;for(let n=-1022;n!==1024;++n){const r=2**n,i=t*r;if(Math.abs(e)<=i)return{exponent:n,significand:e/r}}return{exponent:Number.NaN,significand:Number.NaN}}bm.decomposeDouble=wje;function ege(e){return[~~(e/4294967296),e>>>0]}function tge(e,t){if(e===-1022){const a=t*4503599627370496;return ege(a)}const n=(t-1)*2**52,r=(e+1023)*2**20,i=ege(n);return i[0]+=r,i}function ICt(e){if(e===Number.POSITIVE_INFINITY)return(0,SG.clone64)(Sje);if(e===Number.NEGATIVE_INFINITY)return(0,SG.clone64)($Ct);const t=wje(e),n=t.exponent,r=t.significand;if(e>0||e===0&&1/e===Number.POSITIVE_INFINITY)return{sign:1,data:tge(n,r)};{const i=tge(n,-r);return i[1]===4294967295?(i[0]+=1,i[1]=0):i[1]+=1,{sign:-1,data:i}}}bm.doubleToIndex=ICt;function Aje(e){if(e.sign===-1){const 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,-Aje(i)}if((0,SG.isEqual64)(e,Sje))return Number.POSITIVE_INFINITY;if(e.data[0]<2097152)return(e.data[0]*4294967296+e.data[1])*2**-1074;const t=e.data[0]-2097152,n=-1021+(t>>20);return(1+((t&1048575)*2**32+e.data[1])*Number.EPSILON)*2**n}bm.indexToDouble=Aje;Object.defineProperty(mL,"__esModule",{value:!0});mL.doubleNext=void 0;const Sp=gL,nge=yL,cE=bm,eU=Je;function rge(e,t){if(Number.isNaN(e))throw new Error("fc.doubleNext constraints."+t+" must be a 32-bit float");return(0,cE.doubleToIndex)(e)}function _Ct(e){if(typeof e!="number")throw new Error("Unsupported type");return(0,cE.doubleToIndex)(e)}function SCt(e={}){const{noDefaultInfinity:t=!1,noNaN:n=!1,min:r=t?-Number.MAX_VALUE:Number.NEGATIVE_INFINITY,max:i=t?Number.MAX_VALUE:Number.POSITIVE_INFINITY}=e,a=rge(r,"min"),o=rge(i,"max");if((0,Sp.isStrictlySmaller64)(o,a))throw new Error("fc.doubleNext constraints.min must be smaller or equal to constraints.max");if(n)return(0,eU.convertFromNext)((0,eU.convertToNext)((0,nge.arrayInt64)(a,o)).map(cE.indexToDouble,_Ct));const u=(0,Sp.isStrictlyPositive64)(o),c=u?a:(0,Sp.substract64)(a,Sp.Unit64),f=u?(0,Sp.add64)(o,Sp.Unit64):o;return(0,eU.convertFromNext)((0,eU.convertToNext)((0,nge.arrayInt64)(c,f)).map(s=>(0,Sp.isStrictlySmaller64)(o,s)||(0,Sp.isStrictlySmaller64)(s,a)?Number.NaN:(0,cE.indexToDouble)(s),s=>{if(typeof s!="number")throw new Error("Unsupported type");return Number.isNaN(s)?(0,Sp.isEqual64)(o,f)?c:f:(0,cE.doubleToIndex)(s)}))}mL.doubleNext=SCt;Object.defineProperty(C0,"__esModule",{value:!0});C0.double=void 0;const wCt=li,ACt=Ei,MCt=mL;function ige(e){return(0,wCt.integer)(0,(1<(0,ACt.tuple)(ige(26),ige(27)).map(e=>(e[0]*RCt+e[1])*OCt);function ECt(...e){if(typeof e[0]=="object"){if(e[0].next)return(0,MCt.doubleNext)(e[0]);const t=e[0].min!==void 0?e[0].min:0,n=e[0].max!==void 0?e[0].max:1;return tU().map(r=>t+r*(n-t)).filter(r=>r!==n||r===t)}else{const t=e[0],n=e[1];return t===void 0?tU():n===void 0?tU().map(r=>r*t).filter(r=>r!==t||r===0):tU().map(r=>t+r*(n-t)).filter(r=>r!==n||r===t)}}C0.double=ECt;var PP={},bL={},_u={};Object.defineProperty(_u,"__esModule",{value:!0});_u.indexToFloat=_u.floatToIndex=_u.decomposeFloat=_u.EPSILON_32=_u.MAX_VALUE_32=_u.MIN_VALUE_32=void 0;_u.MIN_VALUE_32=2**-126*2**-23;_u.MAX_VALUE_32=2**127*(1+(2**23-1)/2**23);_u.EPSILON_32=2**-23;const Mje=2139095040,TCt=-2139095041;function Rje(e){const t=1.9999998807907104;for(let n=-126;n!==128;++n){const r=2**n,i=t*r;if(Math.abs(e)<=i)return{exponent:n,significand:e/r}}return{exponent:Number.NaN,significand:Number.NaN}}_u.decomposeFloat=Rje;function age(e,t){return e===-126?t*8388608:(e+127)*8388608+(t-1)*8388608}function CCt(e){if(e===Number.POSITIVE_INFINITY)return Mje;if(e===Number.NEGATIVE_INFINITY)return TCt;const t=Rje(e),n=t.exponent,r=t.significand;return Number.isNaN(n)||Number.isNaN(r)||!Number.isInteger(r*8388608)?Number.NaN:e>0||e===0&&1/e===Number.POSITIVE_INFINITY?age(n,r):-age(n,-r)-1}_u.floatToIndex=CCt;function Oje(e){if(e<0)return-Oje(-e-1);if(e===Mje)return Number.POSITIVE_INFINITY;if(e<16777216)return e*2**-149;const t=e-16777216,n=-125+(t>>23);return(1+(t&8388607)/8388608)*2**n}_u.indexToFloat=Oje;Object.defineProperty(bL,"__esModule",{value:!0});bL.floatNext=void 0;const oge=li,kp=_u,nU=Je;function uge(e,t){const n="you can convert any double to a 32-bit float by using `new Float32Array([myDouble])[0]`",r="fc.floatNext constraints."+t+" must be a 32-bit float - "+n;if(Number.isNaN(e)||Number.isFinite(e)&&(e<-kp.MAX_VALUE_32||e>kp.MAX_VALUE_32))throw new Error(r);const i=(0,kp.floatToIndex)(e);if(!Number.isInteger(i))throw new Error(r);return i}function PCt(e){if(typeof e!="number")throw new Error("Unsupported type");return(0,kp.floatToIndex)(e)}function FCt(e={}){const{noDefaultInfinity:t=!1,noNaN:n=!1,min:r=t?-kp.MAX_VALUE_32:Number.NEGATIVE_INFINITY,max:i=t?kp.MAX_VALUE_32:Number.POSITIVE_INFINITY}=e,a=uge(r,"min"),o=uge(i,"max");if(a>o)throw new Error("fc.floatNext constraints.min must be smaller or equal to constraints.max");if(n)return(0,nU.convertFromNext)((0,nU.convertToNext)((0,oge.integer)({min:a,max:o})).map(kp.indexToFloat,PCt));const u=o>0?a:a-1,c=o>0?o+1:o;return(0,nU.convertFromNext)((0,nU.convertToNext)((0,oge.integer)({min:u,max:c})).map(f=>f>o||f{if(typeof f!="number")throw new Error("Unsupported type");return Number.isNaN(f)?o!==c?c:u:(0,kp.floatToIndex)(f)}))}bL.floatNext=FCt;Object.defineProperty(PP,"__esModule",{value:!0});PP.float=void 0;const WCt=bL,NCt=li;function jCt(e){return(0,NCt.integer)(0,(1<jCt(24).map(e=>e/(1<<24));function kCt(...e){if(typeof e[0]=="object"){if(e[0].next)return(0,WCt.floatNext)(e[0]);const t=e[0].min!==void 0?e[0].min:0,n=e[0].max!==void 0?e[0].max:1;return rU().map(r=>t+r*(n-t)).filter(r=>r!==n||r===t)}else{const t=e[0],n=e[1];return t===void 0?rU():n===void 0?rU().map(r=>r*t).filter(r=>r!==t||r===0):rU().map(r=>t+r*(n-t)).filter(r=>r!==n||r===t)}}PP.float=kCt;var $L={},FP={},Fm={};Object.defineProperty(Fm,"__esModule",{value:!0});Fm.escapeForMultilineComments=Fm.escapeForTemplateString=void 0;function UCt(e){return e.replace(/([$`\\])/g,"\\$1").replace(/\r/g,"\\r")}Fm.escapeForTemplateString=UCt;function qCt(e){return e.replace(/\*\//g,"*\\/")}Fm.escapeForMultilineComments=qCt;var ww={};Object.defineProperty(ww,"__esModule",{value:!0});ww.hash=void 0;const ac=[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 xCt(e){let t=4294967295;for(let n=0;n>8;else if(r<2048)t=ac[t&255^(192|r>>6&31)]^t>>8,t=ac[t&255^(128|r&63)]^t>>8;else if(r>=55296&&r<57344){const i=e.charCodeAt(++n);if(r>=56320||i<56320||i>57343||Number.isNaN(i))n-=1,t=ac[t&255^239]^t>>8,t=ac[t&255^191]^t>>8,t=ac[t&255^189]^t>>8;else{const a=(r&1023)+64,o=i&1023;t=ac[t&255^(240|a>>8&7)]^t>>8,t=ac[t&255^(128|a>>2&63)]^t>>8,t=ac[t&255^(128|o>>6&15|(a&3)<<4)]^t>>8,t=ac[t&255^(128|o&63)]^t>>8}}else t=ac[t&255^(224|r>>12&15)]^t>>8,t=ac[t&255^(128|r>>6&63)]^t>>8,t=ac[t&255^(128|r&63)]^t>>8}return(t|0)+2147483648}ww.hash=xCt;Object.defineProperty(FP,"__esModule",{value:!0});FP.buildCompareFunctionArbitrary=void 0;const DCt=Fm,LCt=Po,cge=ww,L8=$d,fge=li,BCt=Ei;function VCt(e){return(0,BCt.tuple)((0,fge.integer)().noShrink(),(0,fge.integer)(1,4294967295).noShrink()).map(([t,n])=>{const r=()=>{const i={};return Object.assign((o,u)=>{const c=(0,L8.stringify)(o),f=(0,L8.stringify)(u),s=(0,cge.hash)(`${t}${c}`)%n,l=(0,cge.hash)(`${t}${f}`)%n,d=e(s,l);return i[`[${c},${f}]`]=d,d},{toString:()=>{const o=Object.keys(i).sort().map(u=>`${u} => ${(0,L8.stringify)(i[u])}`).map(u=>`/* ${(0,DCt.escapeForMultilineComments)(u)} */`);return`function(a, b) { // With hash and stringify coming from fast-check${o.length!==0?` ${o.join(` `)}`:""} const cmp = ${e}; const hA = hash('${t}' + stringify(a)) % ${n}; const hB = hash('${t}' + stringify(b)) % ${n}; return cmp(hA, hB); }`},[LCt.cloneMethod]:r})};return r()})}FP.buildCompareFunctionArbitrary=VCt;Object.defineProperty($L,"__esModule",{value:!0});$L.compareBooleanFunc=void 0;const zCt=FP;function KCt(){return(0,zCt.buildCompareFunctionArbitrary)(Object.assign((e,t)=>e hA < hB"}}))}$L.compareBooleanFunc=KCt;var IL={};Object.defineProperty(IL,"__esModule",{value:!0});IL.compareFunc=void 0;const GCt=FP;function HCt(){return(0,GCt.buildCompareFunctionArbitrary)(Object.assign((e,t)=>e-t,{toString(){return"(hA, hB) => hA - hB"}}))}IL.compareFunc=HCt;var _L={};Object.defineProperty(_L,"__esModule",{value:!0});_L.func=void 0;const JCt=ww,Ey=$d,B8=Po,YCt=si,ZCt=li,XCt=Ei,QCt=Fm;function ePt(e){return(0,XCt.tuple)((0,YCt.array)(e,{minLength:1}),(0,ZCt.integer)().noShrink()).map(([t,n])=>{const r=()=>{const i={},a=(...u)=>{const c=(0,Ey.stringify)(u),f=t[(0,JCt.hash)(`${n}${c}`)%t.length];return i[c]=f,(0,B8.hasCloneMethod)(f)?f[B8.cloneMethod]():f};function o(u){const c=Object.keys(i).sort().map(f=>`${f} => ${(0,Ey.stringify)(i[f])}`).map(f=>`/* ${(0,QCt.escapeForMultilineComments)(f)} */`);return`function(...args) { // With hash and stringify coming from fast-check${c.length!==0?` ${c.join(` `)}`:""} const outs = ${u}; return outs[hash('${n}' + stringify(args)) % outs.length]; }`}return Object.defineProperties(a,{toString:{value:()=>o((0,Ey.stringify)(t))},[Ey.toStringMethod]:{value:()=>o((0,Ey.stringify)(t))},[Ey.asyncToStringMethod]:{value:async()=>o(await(0,Ey.asyncStringify)(t))},[B8.cloneMethod]:{value:r,configurable:!0}})};return r()})}_L.func=ePt;var WP={};Object.defineProperty(WP,"__esModule",{value:!0});WP.maxSafeInteger=void 0;const tPt=Je,nPt=bg;function rPt(){const e=new nPt.IntegerArbitrary(Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER);return(0,tPt.convertFromNextWithShrunkOnce)(e,e.defaultTarget())}WP.maxSafeInteger=rPt;var SL={};Object.defineProperty(SL,"__esModule",{value:!0});SL.maxSafeNat=void 0;const iPt=Je,aPt=bg;function oPt(){const e=new aPt.IntegerArbitrary(0,Number.MAX_SAFE_INTEGER);return(0,iPt.convertFromNextWithShrunkOnce)(e,e.defaultTarget())}SL.maxSafeNat=oPt;var Aw={},Bp={};Object.defineProperty(Bp,"__esModule",{value:!0});Bp.natToStringifiedNatUnmapper=Bp.tryParseStringifiedNat=Bp.natToStringifiedNatMapper=void 0;function uPt(e){const[t,n]=e;switch(t){case"oct":return`0${Number(n).toString(8)}`;case"hex":return`0x${Number(n).toString(16)}`;case"dec":default:return`${n}`}}Bp.natToStringifiedNatMapper=uPt;function p2(e,t){const n=Number.parseInt(e,t);if(n.toString(t)!==e)throw new Error("Invalid value");return n}Bp.tryParseStringifiedNat=p2;function cPt(e){if(typeof e!="string")throw new Error("Invalid type");return e.length>=2&&e[0]==="0"?e[1]==="x"?["hex",p2(e.substr(2),16)]:["oct",p2(e.substr(1),8)]:["dec",p2(e,10)]}Bp.natToStringifiedNatUnmapper=cPt;Object.defineProperty(Aw,"__esModule",{value:!0});Aw.ipV4=void 0;const sge=Je,iU=$g,fPt=Ei,sPt=Bp;function lPt(e){return e.join(".")}function dPt(e){if(typeof e!="string")throw new Error("Invalid type");return e.split(".").map(t=>(0,sPt.tryParseStringifiedNat)(t,10))}function pPt(){return(0,sge.convertFromNext)((0,sge.convertToNext)((0,fPt.tuple)((0,iU.nat)(255),(0,iU.nat)(255),(0,iU.nat)(255),(0,iU.nat)(255))).map(lPt,dPt))}Aw.ipV4=pPt;var NP={},_d={};Object.defineProperty(_d,"__esModule",{value:!0});_d.oneof=void 0;const lge=_w;function hPt(e){return e!=null&&typeof e=="object"&&!("generate"in e)}function vPt(...e){const t=e[0];if(hPt(t)){const r=e.slice(1).map(i=>({arbitrary:i,weight:1}));return lge.FrequencyArbitrary.fromOld(r,t,"fc.oneof")}const n=e.map(r=>({arbitrary:r,weight:1}));return lge.FrequencyArbitrary.fromOld(n,{},"fc.oneof")}_d.oneof=vPt;var wL={};Object.defineProperty(wL,"__esModule",{value:!0});wL.buildStringifiedNatArbitrary=void 0;const dge=Je,mPt=O0,gPt=$g,yPt=Ei,pge=Bp;function bPt(e){return(0,dge.convertFromNext)((0,dge.convertToNext)((0,yPt.tuple)((0,mPt.constantFrom)("dec","oct","hex"),(0,gPt.nat)(e))).map(pge.natToStringifiedNatMapper,pge.natToStringifiedNatUnmapper))}wL.buildStringifiedNatArbitrary=bPt;Object.defineProperty(NP,"__esModule",{value:!0});NP.ipV4Extended=void 0;const $Pt=_d,V8=Ei,El=wL,w1=Je;function z8(e){return e.join(".")}function K8(e){if(typeof e!="string")throw new Error("Invalid type");return e.split(".")}function IPt(){return(0,$Pt.oneof)((0,w1.convertFromNext)((0,w1.convertToNext)((0,V8.tuple)((0,El.buildStringifiedNatArbitrary)(255),(0,El.buildStringifiedNatArbitrary)(255),(0,El.buildStringifiedNatArbitrary)(255),(0,El.buildStringifiedNatArbitrary)(255))).map(z8,K8)),(0,w1.convertFromNext)((0,w1.convertToNext)((0,V8.tuple)((0,El.buildStringifiedNatArbitrary)(255),(0,El.buildStringifiedNatArbitrary)(255),(0,El.buildStringifiedNatArbitrary)(65535))).map(z8,K8)),(0,w1.convertFromNext)((0,w1.convertToNext)((0,V8.tuple)((0,El.buildStringifiedNatArbitrary)(255),(0,El.buildStringifiedNatArbitrary)(16777215))).map(z8,K8)),(0,El.buildStringifiedNatArbitrary)(4294967295))}NP.ipV4Extended=IPt;var jP={},kP={},Ss={};Object.defineProperty(Ss,"__esModule",{value:!0});Ss.codePointsToStringUnmapper=Ss.codePointsToStringMapper=void 0;function _Pt(e){return e.join("")}Ss.codePointsToStringMapper=_Pt;function SPt(e){if(typeof e!="string")throw new Error("Cannot unmap the passed value");return[...e]}Ss.codePointsToStringUnmapper=SPt;Object.defineProperty(kP,"__esModule",{value:!0});kP.hexaString=void 0;const hge=Je,wPt=si,APt=IP,MPt=Vs,vge=Ss;function RPt(...e){const t=(0,MPt.extractStringConstraints)(e);return(0,hge.convertFromNext)((0,hge.convertToNext)((0,wPt.array)((0,APt.hexa)(),t)).map(vge.codePointsToStringMapper,vge.codePointsToStringUnmapper))}kP.hexaString=RPt;var ur={};Object.defineProperty(ur,"__esModule",{value:!0});ur.noTrailingUnmapper=ur.noTrailingMapper=ur.singleTrailingUnmapper=ur.singleTrailingMapper=ur.multiTrailingUnmapperOne=ur.multiTrailingMapperOne=ur.multiTrailingUnmapper=ur.multiTrailingMapper=ur.onlyTrailingUnmapper=ur.onlyTrailingMapper=ur.fullySpecifiedUnmapper=ur.fullySpecifiedMapper=void 0;function Zee(e){return e.length===0?[]:e.split(":")}function Xee(e){const t=e.split(":");return t.length>=2&&t[t.length-1].length<=4?[t.slice(0,t.length-2),`${t[t.length-2]}:${t[t.length-1]}`]:[t.slice(0,t.length-1),t[t.length-1]]}function OPt(e){return`${e[0].join(":")}:${e[1]}`}ur.fullySpecifiedMapper=OPt;function EPt(e){if(typeof e!="string")throw new Error("Invalid type");return Xee(e)}ur.fullySpecifiedUnmapper=EPt;function TPt(e){return`::${e[0].join(":")}:${e[1]}`}ur.onlyTrailingMapper=TPt;function CPt(e){if(typeof e!="string")throw new Error("Invalid type");if(!e.startsWith("::"))throw new Error("Invalid value");return Xee(e.substring(2))}ur.onlyTrailingUnmapper=CPt;function Eje(e){return`${e[0].join(":")}::${e[1].join(":")}:${e[2]}`}ur.multiTrailingMapper=Eje;function Tje(e){if(typeof e!="string")throw new Error("Invalid type");const[t,n]=e.split("::",2),[r,i]=Xee(n);return[Zee(t),r,i]}ur.multiTrailingUnmapper=Tje;function PPt(e){return Eje([e[0],[e[1]],e[2]])}ur.multiTrailingMapperOne=PPt;function FPt(e){const t=Tje(e);return[t[0],t[1].join(":"),t[2]]}ur.multiTrailingUnmapperOne=FPt;function WPt(e){return`${e[0].join(":")}::${e[1]}`}ur.singleTrailingMapper=WPt;function NPt(e){if(typeof e!="string")throw new Error("Invalid type");const[t,n]=e.split("::",2);return[Zee(t),n]}ur.singleTrailingUnmapper=NPt;function jPt(e){return`${e[0].join(":")}::`}ur.noTrailingMapper=jPt;function kPt(e){if(typeof e!="string")throw new Error("Invalid type");if(!e.endsWith("::"))throw new Error("Invalid value");return[Zee(e.substring(0,e.length-2))]}ur.noTrailingUnmapper=kPt;Object.defineProperty(jP,"__esModule",{value:!0});jP.ipV6=void 0;const nf=si,Fi=Je,mge=_d,UPt=kP,Tl=Ei,qPt=Aw,sa=ur;function xPt([e,t]){return`${e}:${t}`}function DPt(e){if(typeof e!="string")throw new Error("Invalid type");if(!e.includes(":"))throw new Error("Invalid value");return e.split(":",2)}function LPt(){const e=(0,UPt.hexaString)({minLength:1,maxLength:4,size:"max"}),t=(0,mge.oneof)((0,Fi.convertFromNext)((0,Fi.convertToNext)((0,Tl.tuple)(e,e)).map(xPt,DPt)),(0,qPt.ipV4)());return(0,mge.oneof)((0,Fi.convertFromNext)((0,Fi.convertToNext)((0,Tl.tuple)((0,nf.array)(e,{minLength:6,maxLength:6,size:"max"}),t)).map(sa.fullySpecifiedMapper,sa.fullySpecifiedUnmapper)),(0,Fi.convertFromNext)((0,Fi.convertToNext)((0,Tl.tuple)((0,nf.array)(e,{minLength:5,maxLength:5,size:"max"}),t)).map(sa.onlyTrailingMapper,sa.onlyTrailingUnmapper)),(0,Fi.convertFromNext)((0,Fi.convertToNext)((0,Tl.tuple)((0,nf.array)(e,{minLength:0,maxLength:1,size:"max"}),(0,nf.array)(e,{minLength:4,maxLength:4,size:"max"}),t)).map(sa.multiTrailingMapper,sa.multiTrailingUnmapper)),(0,Fi.convertFromNext)((0,Fi.convertToNext)((0,Tl.tuple)((0,nf.array)(e,{minLength:0,maxLength:2,size:"max"}),(0,nf.array)(e,{minLength:3,maxLength:3,size:"max"}),t)).map(sa.multiTrailingMapper,sa.multiTrailingUnmapper)),(0,Fi.convertFromNext)((0,Fi.convertToNext)((0,Tl.tuple)((0,nf.array)(e,{minLength:0,maxLength:3,size:"max"}),(0,nf.array)(e,{minLength:2,maxLength:2,size:"max"}),t)).map(sa.multiTrailingMapper,sa.multiTrailingUnmapper)),(0,Fi.convertFromNext)((0,Fi.convertToNext)((0,Tl.tuple)((0,nf.array)(e,{minLength:0,maxLength:4,size:"max"}),e,t)).map(sa.multiTrailingMapperOne,sa.multiTrailingUnmapperOne)),(0,Fi.convertFromNext)((0,Fi.convertToNext)((0,Tl.tuple)((0,nf.array)(e,{minLength:0,maxLength:5,size:"max"}),t)).map(sa.singleTrailingMapper,sa.singleTrailingUnmapper)),(0,Fi.convertFromNext)((0,Fi.convertToNext)((0,Tl.tuple)((0,nf.array)(e,{minLength:0,maxLength:6,size:"max"}),e)).map(sa.singleTrailingMapper,sa.singleTrailingUnmapper)),(0,Fi.convertFromNext)((0,Fi.convertToNext)((0,Tl.tuple)((0,nf.array)(e,{minLength:0,maxLength:7,size:"max"}))).map(sa.noTrailingMapper,sa.noTrailingUnmapper)))}jP.ipV6=LPt;var UP={},AL={};Object.defineProperty(AL,"__esModule",{value:!0});AL.LazyArbitrary=void 0;const BPt=gr;let VPt=class extends BPt.NextArbitrary{constructor(t){super(),this.name=t,this.underlying=null}generate(t,n){if(!this.underlying)throw new Error(`Lazy arbitrary ${JSON.stringify(this.name)} not correctly initialized`);return this.underlying.generate(t,n)}canShrinkWithoutContext(t){if(!this.underlying)throw new Error(`Lazy arbitrary ${JSON.stringify(this.name)} not correctly initialized`);return this.underlying.canShrinkWithoutContext(t)}shrink(t,n){if(!this.underlying)throw new Error(`Lazy arbitrary ${JSON.stringify(this.name)} not correctly initialized`);return this.underlying.shrink(t,n)}};AL.LazyArbitrary=VPt;Object.defineProperty(UP,"__esModule",{value:!0});UP.letrec=void 0;const gge=AL,yge=Je;function zPt(e){const t=Object.create(null),r=e(i=>(Object.prototype.hasOwnProperty.call(t,i)||(t[i]=new gge.LazyArbitrary(String(i))),(0,yge.convertFromNext)(t[i])));for(const i in r){if(!Object.prototype.hasOwnProperty.call(r,i))continue;const a=t[i],o=a!==void 0?a:new gge.LazyArbitrary(i);o.underlying=(0,yge.convertToNext)(r[i]),t[i]=o}return r}UP.letrec=zPt;var ML={},Su={};Object.defineProperty(Su,"__esModule",{value:!0});Su.sentencesToParagraphUnmapper=Su.sentencesToParagraphMapper=Su.wordsToSentenceUnmapperFor=Su.wordsToSentenceMapper=Su.wordsToJoinedStringUnmapperFor=Su.wordsToJoinedStringMapper=void 0;function KPt(e){return e.map(t=>t[t.length-1]===","?t.substr(0,t.length-1):t).join(" ")}Su.wordsToJoinedStringMapper=KPt;function GPt(e){return function(n){if(typeof n!="string")throw new Error("Unsupported type");const r=[];for(const i of n.split(" "))if(e.canShrinkWithoutContext(i))r.push(i);else if(e.canShrinkWithoutContext(i+","))r.push(i+",");else throw new Error("Unsupported word");return r}}Su.wordsToJoinedStringUnmapperFor=GPt;function HPt(e){let t=e.join(" ");return t[t.length-1]===","&&(t=t.substr(0,t.length-1)),t[0].toUpperCase()+t.substring(1)+"."}Su.wordsToSentenceMapper=HPt;function JPt(e){return function(n){if(typeof n!="string")throw new Error("Unsupported type");if(n.length<2||n[n.length-1]!=="."||n[n.length-2]===","||n[0].toLowerCase().toUpperCase()!==n[0])throw new Error("Unsupported value");const r=n[0].toLowerCase()+n.substring(1,n.length-1),i=[],a=r.split(" ");for(let o=0;o!==a.length;++o){const u=a[o];if(e.canShrinkWithoutContext(u))i.push(u);else if(o===a.length-1&&e.canShrinkWithoutContext(u+","))i.push(u+",");else throw new Error("Unsupported word")}return i}}Su.wordsToSentenceUnmapperFor=JPt;function YPt(e){return e.join(" ")}Su.sentencesToParagraphMapper=YPt;function ZPt(e){if(typeof e!="string")throw new Error("Unsupported type");const t=e.split(". ");for(let n=0;n({arbitrary:(0,XPt.constant)(e),weight:t});function eFt(){return(0,QPt.frequency)(be("non",6),be("adipiscing",5),be("ligula",5),be("enim",5),be("pellentesque",5),be("in",5),be("augue",5),be("et",5),be("nulla",5),be("lorem",4),be("sit",4),be("sed",4),be("diam",4),be("fermentum",4),be("ut",4),be("eu",4),be("aliquam",4),be("mauris",4),be("vitae",4),be("felis",4),be("ipsum",3),be("dolor",3),be("amet,",3),be("elit",3),be("euismod",3),be("mi",3),be("orci",3),be("erat",3),be("praesent",3),be("egestas",3),be("leo",3),be("vel",3),be("sapien",3),be("integer",3),be("curabitur",3),be("convallis",3),be("purus",3),be("risus",2),be("suspendisse",2),be("lectus",2),be("nec,",2),be("ultricies",2),be("sed,",2),be("cras",2),be("elementum",2),be("ultrices",2),be("maecenas",2),be("massa,",2),be("varius",2),be("a,",2),be("semper",2),be("proin",2),be("nec",2),be("nisl",2),be("amet",2),be("duis",2),be("congue",2),be("libero",2),be("vestibulum",2),be("pede",2),be("blandit",2),be("sodales",2),be("ante",2),be("nibh",2),be("ac",2),be("aenean",2),be("massa",2),be("suscipit",2),be("sollicitudin",2),be("fusce",2),be("tempus",2),be("aliquam,",2),be("nunc",2),be("ullamcorper",2),be("rhoncus",2),be("metus",2),be("faucibus,",2),be("justo",2),be("magna",2),be("at",2),be("tincidunt",2),be("consectetur",1),be("tortor,",1),be("dignissim",1),be("congue,",1),be("non,",1),be("porttitor,",1),be("nonummy",1),be("molestie,",1),be("est",1),be("eleifend",1),be("mi,",1),be("arcu",1),be("scelerisque",1),be("vitae,",1),be("consequat",1),be("in,",1),be("pretium",1),be("volutpat",1),be("pharetra",1),be("tempor",1),be("bibendum",1),be("odio",1),be("dui",1),be("primis",1),be("faucibus",1),be("luctus",1),be("posuere",1),be("cubilia",1),be("curae,",1),be("hendrerit",1),be("velit",1),be("mauris,",1),be("gravida",1),be("ornare",1),be("ut,",1),be("pulvinar",1),be("varius,",1),be("turpis",1),be("nibh,",1),be("eros",1),be("id",1),be("aliquet",1),be("quis",1),be("lobortis",1),be("consectetuer",1),be("morbi",1),be("vehicula",1),be("tortor",1),be("tellus,",1),be("id,",1),be("eu,",1),be("quam",1),be("feugiat,",1),be("posuere,",1),be("iaculis",1),be("lectus,",1),be("tristique",1),be("mollis,",1),be("nisl,",1),be("vulputate",1),be("sem",1),be("vivamus",1),be("placerat",1),be("imperdiet",1),be("cursus",1),be("rutrum",1),be("iaculis,",1),be("augue,",1),be("lacus",1))}function tFt(...e){const t=typeof e[0]=="object"?e[0].maxCount:e[0],n=typeof e[0]=="object"?e[0].mode==="sentences":e[1],r=typeof e[0]=="object"?e[0].size:void 0,i=t!==void 0?t:5;if(i<1)throw new Error("lorem has to produce at least one word/sentence");const a=eFt(),o=(0,Ty.convertToNext)(a);if(n){const u=(0,Ty.convertToNext)((0,G8.array)(a,{minLength:1,size:"small"})).map(A1.wordsToSentenceMapper,(0,A1.wordsToSentenceUnmapperFor)(o));return(0,Ty.convertFromNext)((0,Ty.convertToNext)((0,G8.array)((0,Ty.convertFromNext)(u),{minLength:1,maxLength:i,size:r})).map(A1.sentencesToParagraphMapper,A1.sentencesToParagraphUnmapper))}else return(0,Ty.convertFromNext)((0,Ty.convertToNext)((0,G8.array)(a,{minLength:1,maxLength:i,size:r})).map(A1.wordsToJoinedStringMapper,(0,A1.wordsToJoinedStringUnmapperFor)(o)))}ML.lorem=tFt;var RL={};Object.defineProperty(RL,"__esModule",{value:!0});RL.memo=void 0;let aU=10;function nFt(e){const t={};return n=>{const r=n!==void 0?n:aU;if(!Object.prototype.hasOwnProperty.call(t,r)){const i=aU;aU=r-1,t[r]=e(r),aU=i}return t[r]}}RL.memo=nFt;var OL={},EL={},uf={};Object.defineProperty(uf,"__esModule",{value:!0});uf.applyFlagsOnChars=uf.computeFlagsFromChars=uf.computeTogglePositions=uf.computeNextFlags=uf.countToggledBits=void 0;function Cje(e){let t=0;for(;e>BigInt(0);)e&BigInt(1)&&++t,e>>=BigInt(1);return t}uf.countToggledBits=Cje;function rFt(e,t){const n=(BigInt(1)<{const u=[...o.value],c=(0,wp.computeTogglePositions)(u,this.toggleCase),f=(0,wp.computeNextFlags)(a,c.length);return(0,wp.applyFlagsOnChars)(u,f,c,this.toggleCase),new WR.NextValue(u.join(""),this.buildContextFor(o,new WR.NextValue(f,void 0)))}).join((0,cFt.makeLazy)(()=>{const o=[...i],u=(0,wp.computeTogglePositions)(o,this.toggleCase);return(0,$ge.convertToNext)((0,bge.bigUintN)(u.length)).shrink(a,r.flagsContext).map(c=>{const f=o.slice();return(0,wp.applyFlagsOnChars)(f,c.value,u,this.toggleCase),new WR.NextValue(f.join(""),this.buildContextFor(new WR.NextValue(i,r.rawStringContext),c))})}))}};EL.MixedCaseArbitrary=fFt;Object.defineProperty(OL,"__esModule",{value:!0});OL.mixedCase=void 0;const Ige=Je,sFt=EL;function lFt(e){const t=e.toUpperCase();return t!==e?t:e.toLowerCase()}function dFt(e,t){if(typeof BigInt>"u")throw new Error("mixedCase requires BigInt support");const n=t&&t.toggleCase||lFt,r=t&&t.untoggleAll;return(0,Ige.convertFromNext)(new sFt.MixedCaseArbitrary((0,Ige.convertToNext)(e),n,r))}OL.mixedCase=dFt;var TL={},qP={},xP={};Object.defineProperty(xP,"__esModule",{value:!0});xP.float32Array=void 0;const pFt=PP,hFt=si,_ge=Je;function vFt(e){return Float32Array.from(e)}function mFt(e){if(!(e instanceof Float32Array))throw new Error("Unexpected type");return[...e]}function gFt(e={}){return(0,_ge.convertFromNext)((0,_ge.convertToNext)((0,hFt.array)((0,pFt.float)(Object.assign(Object.assign({},e),{next:!0})),e)).map(vFt,mFt))}xP.float32Array=gFt;var DP={};Object.defineProperty(DP,"__esModule",{value:!0});DP.float64Array=void 0;const yFt=C0,bFt=si,Sge=Je;function $Ft(e){return Float64Array.from(e)}function IFt(e){if(!(e instanceof Float64Array))throw new Error("Unexpected type");return[...e]}function _Ft(e={}){return(0,Sge.convertFromNext)((0,Sge.convertToNext)((0,bFt.array)((0,yFt.double)(Object.assign(Object.assign({},e),{next:!0})),e)).map($Ft,IFt))}DP.float64Array=_Ft;var LP={},Sd={},SFt=K&&K.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iu)throw new Error(`Invalid range passed to ${a}: min must be lower than or equal to max`);if(on)throw new Error(`Invalid max value passed to ${a}: max must be lower than or equal to ${n}`);return(0,wge.convertFromNext)((0,wge.convertToNext)((0,wFt.array)(i({min:o,max:u}),c)).map(f=>r.from(f),f=>{if(!(f instanceof r))throw new Error("Invalid type");return[...f]}))}Sd.typedIntArrayArbitraryArbitraryBuilder=AFt;Object.defineProperty(LP,"__esModule",{value:!0});LP.int16Array=void 0;const MFt=li,RFt=Sd;function OFt(e={}){return(0,RFt.typedIntArrayArbitraryArbitraryBuilder)(e,-32768,32767,Int16Array,MFt.integer)}LP.int16Array=OFt;var BP={};Object.defineProperty(BP,"__esModule",{value:!0});BP.int32Array=void 0;const EFt=li,TFt=Sd;function CFt(e={}){return(0,TFt.typedIntArrayArbitraryArbitraryBuilder)(e,-2147483648,2147483647,Int32Array,EFt.integer)}BP.int32Array=CFt;var VP={};Object.defineProperty(VP,"__esModule",{value:!0});VP.int8Array=void 0;const PFt=li,FFt=Sd;function WFt(e={}){return(0,FFt.typedIntArrayArbitraryArbitraryBuilder)(e,-128,127,Int8Array,PFt.integer)}VP.int8Array=WFt;var zP={};Object.defineProperty(zP,"__esModule",{value:!0});zP.uint16Array=void 0;const NFt=li,jFt=Sd;function kFt(e={}){return(0,jFt.typedIntArrayArbitraryArbitraryBuilder)(e,0,65535,Uint16Array,NFt.integer)}zP.uint16Array=kFt;var KP={};Object.defineProperty(KP,"__esModule",{value:!0});KP.uint32Array=void 0;const UFt=li,qFt=Sd;function xFt(e={}){return(0,qFt.typedIntArrayArbitraryArbitraryBuilder)(e,0,4294967295,Uint32Array,UFt.integer)}KP.uint32Array=xFt;var GP={};Object.defineProperty(GP,"__esModule",{value:!0});GP.uint8Array=void 0;const DFt=li,LFt=Sd;function BFt(e={}){return(0,LFt.typedIntArrayArbitraryArbitraryBuilder)(e,0,255,Uint8Array,DFt.integer)}GP.uint8Array=BFt;var HP={};Object.defineProperty(HP,"__esModule",{value:!0});HP.uint8ClampedArray=void 0;const VFt=li,zFt=Sd;function KFt(e={}){return(0,zFt.typedIntArrayArbitraryArbitraryBuilder)(e,0,255,Uint8ClampedArray,VFt.integer)}HP.uint8ClampedArray=KFt;var JP={},YP={},CL={};Object.defineProperty(CL,"__esModule",{value:!0});CL.WithShrinkFromOtherArbitrary=void 0;const GFt=gr,Y2=Ar;function HFt(e){return e!==void 0}function Age(e){return e.hasToBeCloned?new Y2.NextValue(e.value_,{generatorContext:e.context},()=>e.value):new Y2.NextValue(e.value_,{generatorContext:e.context})}function Mge(e){return e.hasToBeCloned?new Y2.NextValue(e.value_,{shrinkerContext:e.context},()=>e.value):new Y2.NextValue(e.value_,{shrinkerContext:e.context})}let JFt=class extends GFt.NextArbitrary{constructor(t,n){super(),this.generatorArbitrary=t,this.shrinkerArbitrary=n}generate(t,n){return Age(this.generatorArbitrary.generate(t,n))}canShrinkWithoutContext(t){return this.shrinkerArbitrary.canShrinkWithoutContext(t)}shrink(t,n){return HFt(n)?"generatorContext"in n?this.generatorArbitrary.shrink(t,n.generatorContext).map(Age):this.shrinkerArbitrary.shrink(t,n.shrinkerContext).map(Mge):this.shrinkerArbitrary.shrink(t,void 0).map(Mge)}};CL.WithShrinkFromOtherArbitrary=JFt;Object.defineProperty(YP,"__esModule",{value:!0});YP.restrictedIntegerArbitraryBuilder=void 0;const oU=Je,Rge=li,YFt=CL;function ZFt(e,t,n){const r=(0,oU.convertToNext)((0,Rge.integer)({min:e,max:t}));if(t===n)return(0,oU.convertFromNext)(r);const i=(0,oU.convertToNext)((0,Rge.integer)({min:e,max:n}));return(0,oU.convertFromNext)(new YFt.WithShrinkFromOtherArbitrary(r,i))}YP.restrictedIntegerArbitraryBuilder=ZFt;Object.defineProperty(JP,"__esModule",{value:!0});JP.sparseArray=void 0;const uU=Je,Oge=Ei,XFt=E0,Ege=YP,H8=Bs;function QFt(e){let t=-1;for(let n=0;n!==e.length;++n)t=Math.max(t,e[n][0]);return t}function eWt(e,t){const n=Array(e);for(let r=0;r!==t.length;++r){const i=t[r];i[0]i)throw new Error("The minimal number of non-hole elements cannot be higher than the maximal length of the array");if(r>a)throw new Error("The minimal number of non-hole elements cannot be higher than the maximal number of non-holes");const s=Math.min(a,i),l=t.maxNumElements!==void 0||n!==void 0?n:"=",d=Math.max(f-1,0),p=Math.max(i-1,0),v=(0,uU.convertFromNext)((0,uU.convertToNext)((0,XFt.uniqueArray)((0,Oge.tuple)((0,Ege.restrictedIntegerArbitraryBuilder)(0,d,p),e),{size:l,minLength:r,maxLength:s,selector:h=>h[0],depthIdentifier:u})).map(h=>{const $=QFt(h);return eWt($+1,h)},h=>{if(!Array.isArray(h))throw new Error("Not supported entry type");if(o&&h.length!==0&&!(h.length-1 in h))throw new Error("No trailing hole");return Object.entries(h).map($=>[Number($[0]),$[1]])}));return o||i===r?v:(0,uU.convertFromNext)((0,uU.convertToNext)((0,Oge.tuple)(v,(0,Ege.restrictedIntegerArbitraryBuilder)(r,f,i))).map(h=>{const $=h[0],b=h[1];if($.length>=b)return $;const y=$.slice();return y.length=b,y},h=>{if(!Array.isArray(h))throw new Error("Not supported entry type");return[h,h.length]}))}JP.sparseArray=tWt;var xI={};Object.defineProperty(xI,"__esModule",{value:!0});xI.arrayToMapUnmapper=xI.arrayToMapMapper=void 0;function nWt(e){return new Map(e)}xI.arrayToMapMapper=nWt;function rWt(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)}xI.arrayToMapUnmapper=rWt;var DI={};Object.defineProperty(DI,"__esModule",{value:!0});DI.arrayToSetUnmapper=DI.arrayToSetMapper=void 0;function iWt(e){return new Set(e)}DI.arrayToSetMapper=iWt;function aWt(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)}DI.arrayToSetUnmapper=aWt;var LI={};Object.defineProperty(LI,"__esModule",{value:!0});LI.objectToPrototypeLessUnmapper=LI.objectToPrototypeLessMapper=void 0;function oWt(e){return Object.assign(Object.create(null),e)}LI.objectToPrototypeLessMapper=oWt;function uWt(e){if(typeof e!="object"||e===null)throw new Error("Incompatible instance received: should be a non-null object");if("__proto__"in e)throw new Error("Incompatible instance received: should not have any __proto__");return Object.assign({},e)}LI.objectToPrototypeLessUnmapper=uWt;Object.defineProperty(qP,"__esModule",{value:!0});qP.anyArbitraryBuilder=void 0;const Tge=$d,cWt=si,fWt=T0,h2=_d,sWt=Ei,lWt=hP,dWt=SP,pWt=xP,hWt=DP,vWt=LP,mWt=BP,gWt=VP,yWt=zP,bWt=KP,$Wt=GP,IWt=HP,_Wt=JP,Cge=yb,bb=Je,Pge=xI,Fge=DI,Wge=LI,SWt=UP,Pje=E0,wWt=Jp;function Fje(e,t,n,r,i){return(0,bb.convertToNext)((0,Pje.uniqueArray)((0,sWt.tuple)(e,t),{maxLength:n,size:r,comparator:"SameValueZero",selector:a=>a[0],depthIdentifier:i}))}function Nge(e,t,n,r,i){return(0,bb.convertFromNext)(Fje(e,t,n,r,i).map(Pge.arrayToMapMapper,Pge.arrayToMapUnmapper))}function AWt(e,t,n,r,i){return(0,bb.convertFromNext)(Fje(e,t,n,r,i).map(Cge.keyValuePairsToObjectMapper,Cge.keyValuePairsToObjectUnmapper))}function MWt(e,t,n,r){return(0,bb.convertFromNext)((0,bb.convertToNext)((0,Pje.uniqueArray)(e,{maxLength:t,size:n,comparator:"SameValueZero",depthIdentifier:r})).map(Fge.arrayToSetMapper,Fge.arrayToSetUnmapper))}function RWt(e){return(0,bb.convertFromNext)((0,bb.convertToNext)(e).map(Wge.objectToPrototypeLessMapper,Wge.objectToPrototypeLessUnmapper))}function OWt(e){return(0,h2.oneof)((0,gWt.int8Array)(e),(0,$Wt.uint8Array)(e),(0,IWt.uint8ClampedArray)(e),(0,vWt.int16Array)(e),(0,yWt.uint16Array)(e),(0,mWt.int32Array)(e),(0,bWt.uint32Array)(e),(0,pWt.float32Array)(e),(0,hWt.float64Array)(e))}function EWt(e){const t=e.values,n=e.depthFactor,r=(0,wWt.createDepthIdentifier)(),i=e.maxDepth,a=e.maxKeys,o=e.size,u=(0,h2.oneof)(...t,...e.withBigInt?[(0,lWt.bigInt)()]:[],...e.withDate?[(0,dWt.date)()]:[]);return(0,SWt.letrec)(c=>({anything:(0,h2.oneof)({maxDepth:i,depthFactor:n,depthIdentifier:r},u,c("array"),c("object"),...e.withMap?[c("map")]:[],...e.withSet?[c("set")]:[],...e.withObjectString?[c("anything").map(f=>(0,Tge.stringify)(f))]:[],...e.withNullPrototype?[RWt(c("object"))]:[],...e.withTypedArray?[OWt({maxLength:a,size:o})]:[],...e.withSparseArray?[(0,_Wt.sparseArray)(c("anything"),{maxNumElements:a,size:o,depthIdentifier:r})]:[]),keys:e.withObjectString?(0,fWt.frequency)({arbitrary:e.key,weight:10},{arbitrary:c("anything").map(f=>(0,Tge.stringify)(f)),weight:1}):e.key,array:(0,cWt.array)(c("anything"),{maxLength:a,size:o,depthIdentifier:r}),set:MWt(c("anything"),a,o,r),map:(0,h2.oneof)(Nge(c("keys"),c("anything"),a,o,r),Nge(c("anything"),c("anything"),a,o,r)),object:AWt(c("keys"),c("anything"),a,o,r)})).anything}qP.anyArbitraryBuilder=EWt;var ZP={},Mw={};Object.defineProperty(Mw,"__esModule",{value:!0});Mw.string=void 0;const jge=Je,TWt=si,CWt=bP,PWt=Vs,kge=Ss;function FWt(...e){const t=(0,PWt.extractStringConstraints)(e);return(0,jge.convertFromNext)((0,jge.convertToNext)((0,TWt.array)((0,CWt.char)(),t)).map(kge.codePointsToStringMapper,kge.codePointsToStringUnmapper))}Mw.string=FWt;var PL={},BI={};Object.defineProperty(BI,"__esModule",{value:!0});BI.unboxedToBoxedUnmapper=BI.unboxedToBoxedMapper=void 0;function WWt(e){switch(typeof e){case"boolean":return new Boolean(e);case"number":return new Number(e);case"string":return new String(e);default:return e}}BI.unboxedToBoxedMapper=WWt;function NWt(e){return typeof e!="object"||e===null||!("constructor"in e)?e:e.constructor===Boolean||e.constructor===Number||e.constructor===String?e.valueOf():e}BI.unboxedToBoxedUnmapper=NWt;Object.defineProperty(PL,"__esModule",{value:!0});PL.boxedArbitraryBuilder=void 0;const Uge=Je,qge=BI;function jWt(e){return(0,Uge.convertFromNext)((0,Uge.convertToNext)(e).map(qge.unboxedToBoxedMapper,qge.unboxedToBoxedUnmapper))}PL.boxedArbitraryBuilder=jWt;Object.defineProperty(ZP,"__esModule",{value:!0});ZP.toQualifiedObjectConstraints=void 0;const kWt=bw,xge=Ef,UWt=C0,qWt=WP,xWt=_d,wG=Mw,DWt=PL;function LWt(e){return[(0,kWt.boolean)(),(0,qWt.maxSafeInteger)(),(0,UWt.double)({next:!0}),(0,wG.string)(e),(0,xWt.oneof)((0,wG.string)(e),(0,xge.constant)(null),(0,xge.constant)(void 0))]}function BWt(e){return e.map(t=>(0,DWt.boxedArbitraryBuilder)(t))}function VWt(e,t){return t?BWt(e).concat(e):e}function zWt(e={}){function t(r,i){return r!==void 0?r:i}const n={size:e.size};return{key:t(e.key,(0,wG.string)(n)),values:VWt(t(e.values,LWt(n)),t(e.withBoxedValues,!1)),depthFactor:t(e.depthFactor,"="),maxDepth:t(e.maxDepth,2),maxKeys:t(e.maxKeys,5),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)}}ZP.toQualifiedObjectConstraints=zWt;Object.defineProperty(TL,"__esModule",{value:!0});TL.object=void 0;const KWt=AP,GWt=qP,HWt=ZP;function JWt(e){return(0,KWt.dictionary)(e.key,(0,GWt.anyArbitraryBuilder)(e),{maxKeys:e.maxKeys,size:e.size})}function YWt(e){return JWt((0,HWt.toQualifiedObjectConstraints)(e))}TL.object=YWt;var FL={},Rw={},XP={};Object.defineProperty(XP,"__esModule",{value:!0});XP.jsonConstraintsBuilder=void 0;const ZWt=bw,XWt=Ef,QWt=C0;function eNt(e,t){const{depthFactor:n,maxDepth:r}=t,i=e,a=[(0,ZWt.boolean)(),(0,QWt.double)({next:!0,noDefaultInfinity:!0,noNaN:!0}),e,(0,XWt.constant)(null)];return{key:i,values:a,depthFactor:n,maxDepth:r}}XP.jsonConstraintsBuilder=eNt;var Ow={};Object.defineProperty(Ow,"__esModule",{value:!0});Ow.anything=void 0;const tNt=qP,nNt=ZP;function rNt(e){return(0,tNt.anyArbitraryBuilder)((0,nNt.toQualifiedObjectConstraints)(e))}Ow.anything=rNt;Object.defineProperty(Rw,"__esModule",{value:!0});Rw.jsonValue=void 0;const iNt=Mw,aNt=XP,oNt=Ow;function uNt(e={}){return(0,oNt.anything)((0,aNt.jsonConstraintsBuilder)((0,iNt.string)(),e))}Rw.jsonValue=uNt;Object.defineProperty(FL,"__esModule",{value:!0});FL.json=void 0;const Dge=Rw;function cNt(e){return(e!=null?(0,Dge.jsonValue)(e):(0,Dge.jsonValue)()).map(JSON.stringify)}FL.json=cNt;var WL={},Ew={},QP={};Object.defineProperty(QP,"__esModule",{value:!0});QP.unicodeString=void 0;const Lge=Je,fNt=si,sNt=_P,lNt=Vs,Bge=Ss;function dNt(...e){const t=(0,lNt.extractStringConstraints)(e);return(0,Lge.convertFromNext)((0,Lge.convertToNext)((0,fNt.array)((0,sNt.unicode)(),t)).map(Bge.codePointsToStringMapper,Bge.codePointsToStringUnmapper))}QP.unicodeString=dNt;Object.defineProperty(Ew,"__esModule",{value:!0});Ew.unicodeJsonValue=void 0;const pNt=QP,hNt=XP,vNt=Ow;function mNt(e={}){return(0,vNt.anything)((0,hNt.jsonConstraintsBuilder)((0,pNt.unicodeString)(),e))}Ew.unicodeJsonValue=mNt;Object.defineProperty(WL,"__esModule",{value:!0});WL.unicodeJsonObject=void 0;const Vge=Ew;function gNt(e){return typeof e=="number"?(0,Vge.unicodeJsonValue)({maxDepth:e}):(0,Vge.unicodeJsonValue)(e)}WL.unicodeJsonObject=gNt;var NL={};Object.defineProperty(NL,"__esModule",{value:!0});NL.jsonObject=void 0;const zge=Rw;function yNt(e){return typeof e=="number"?(0,zge.jsonValue)({maxDepth:e}):(0,zge.jsonValue)(e)}NL.jsonObject=yNt;var jL={};Object.defineProperty(jL,"__esModule",{value:!0});jL.unicodeJson=void 0;const Kge=Ew;function bNt(e){return(e!=null?(0,Kge.unicodeJsonValue)(e):(0,Kge.unicodeJsonValue)()).map(JSON.stringify)}jL.unicodeJson=bNt;var kL={},UL={},qL={};Object.defineProperty(qL,"__esModule",{value:!0});qL.extractEnumerableKeys=void 0;function $Nt(e){const t=Object.keys(e),n=Object.getOwnPropertySymbols(e);for(let r=0;r!==n.length;++r){const i=n[r],a=Object.getOwnPropertyDescriptor(e,i);a&&a.enumerable&&t.push(i)}return t}qL.extractEnumerableKeys=$Nt;var VI={};Object.defineProperty(VI,"__esModule",{value:!0});VI.buildValuesAndSeparateKeysToObjectUnmapper=VI.buildValuesAndSeparateKeysToObjectMapper=void 0;function INt(e,t){return function(r){const i={};for(let a=0;a!==e.length;++a){const o=r[a];o!==t&&(i[e[a]]=o)}return i}}VI.buildValuesAndSeparateKeysToObjectMapper=INt;function _Nt(e,t){return function(r){if(typeof r!="object"||r===null)throw new Error("Incompatible instance received: should be a non-null object");if(!("constructor"in r)||r.constructor!==Object)throw new Error("Incompatible instance received: should be of exact type Object");let i=0;const a=[];for(let c=0;c!==e.length;++c){const f=Object.getOwnPropertyDescriptor(r,e[c]);if(f!==void 0){if(!f.configurable||!f.enumerable||!f.writable)throw new Error("Incompatible instance received: should contain only c/e/w properties");if(f.get!==void 0||f.set!==void 0)throw new Error("Incompatible instance received: should contain only no get/set properties");++i,a.push(f.value)}else a.push(t)}const o=Object.getOwnPropertyNames(r).length,u=Object.getOwnPropertySymbols(r).length;if(i!==o+u)throw new Error("Incompatible instance received: should not contain extra properties");return a}}VI.buildValuesAndSeparateKeysToObjectUnmapper=_Nt;Object.defineProperty(UL,"__esModule",{value:!0});UL.buildPartialRecordArbitrary=void 0;const Gge=Je,SNt=Ig,wNt=Ei,ANt=qL,Hge=VI,J8=Symbol("no-key");function MNt(e,t){const n=(0,ANt.extractEnumerableKeys)(e),r=[];for(let i=0;i!==n.length;++i){const a=n[i],o=e[a];t===void 0||t.indexOf(a)!==-1?r.push(o):r.push((0,SNt.option)(o,{nil:J8}))}return(0,Gge.convertFromNext)((0,Gge.convertToNext)((0,wNt.tuple)(...r)).map((0,Hge.buildValuesAndSeparateKeysToObjectMapper)(n,J8),(0,Hge.buildValuesAndSeparateKeysToObjectUnmapper)(n,J8)))}UL.buildPartialRecordArbitrary=MNt;Object.defineProperty(kL,"__esModule",{value:!0});kL.record=void 0;const Y8=UL;function RNt(e,t){if(t==null)return(0,Y8.buildPartialRecordArbitrary)(e,void 0);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(0,Y8.buildPartialRecordArbitrary)(e,void 0);const r=("requiredKeys"in t?t.requiredKeys:void 0)||[];for(let i=0;i!==r.length;++i){const a=Object.getOwnPropertyDescriptor(e,r[i]);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(0,Y8.buildPartialRecordArbitrary)(e,r)}kL.record=RNt;var xL={};Object.defineProperty(xL,"__esModule",{value:!0});xL.set=void 0;const ONt=yw,Jge=Je,Yge=Bs,ENt=MP,TNt=RP,CNt=OP,PNt=EP;function FNt(e){const t=e.compare||{};if(typeof t=="function"){const i=(a,o)=>t(a.value_,o.value_);return()=>new ENt.CustomEqualSet(i)}const n=t.selector||(i=>i),r=i=>n(i.value_);switch(t.type){case"SameValue":return()=>new CNt.SameValueSet(r);case"SameValueZero":return()=>new PNt.SameValueZeroSet(r);case"IsStrictlyEqual":case void 0:return()=>new TNt.StrictlyEqualSet(r)}}function WNt(e){const t=e.minLength!==void 0?e.minLength:0,n=e.maxLength!==void 0?e.maxLength:Yge.MaxLengthUpperBound,r=(0,Yge.maxGeneratedLengthFromSizeForArbitrary)(e.size,t,n,e.maxLength!==void 0),i=e.depthIdentifier,a=FNt(e);return{minLength:t,maxGeneratedLength:r,maxLength:n,depthIdentifier:i,setBuilder:a}}function NNt(e){if(e[0]===void 0)return{};if(e[1]===void 0){const n=e;return typeof n[0]=="number"?{maxLength:n[0]}:typeof n[0]=="function"?{compare:n[0]}:n[0]}if(e[2]===void 0){const n=e;return typeof n[1]=="number"?{minLength:n[0],maxLength:n[1]}:{maxLength:n[0],compare:n[1]}}const t=e;return{minLength:t[0],maxLength:t[1],compare:t[2]}}function jNt(e,...t){const n=WNt(NNt(t)),r=n.minLength,i=n.maxLength,a=n.maxGeneratedLength,o=n.depthIdentifier,u=n.setBuilder,c=(0,Jge.convertToNext)(e),f=(0,Jge.convertFromNext)(new ONt.ArrayArbitrary(c,r,a,i,o,u));return r===0?f:f.filter(s=>s.length>=r)}xL.set=jNt;var DL={},LL={};Object.defineProperty(LL,"__esModule",{value:!0});LL.StreamArbitrary=void 0;const kNt=gr,UNt=Ar,qNt=Po,Zge=Mn,NR=$d;function Z8(e){return`Stream(${e.join(",")}…)`}let xNt=class extends kNt.NextArbitrary{constructor(t){super(),this.arb=t}generate(t,n){const r=n!==void 0&&t.nextInt(1,n)===1?n:void 0,i=()=>{const a=[],o=function*(c,f){for(;;){const s=c.generate(f,r).value;a.push(s),yield s}},u=new Zge.Stream(o(this.arb,t.clone()));return Object.defineProperties(u,{toString:{value:()=>Z8(a.map(NR.stringify))},[NR.toStringMethod]:{value:()=>Z8(a.map(NR.stringify))},[NR.asyncToStringMethod]:{value:async()=>Z8(await Promise.all(a.map(NR.asyncStringify)))},[qNt.cloneMethod]:{value:i,enumerable:!0}})};return new UNt.NextValue(i(),void 0)}canShrinkWithoutContext(t){return!1}shrink(t,n){return Zge.Stream.nil()}};LL.StreamArbitrary=xNt;Object.defineProperty(DL,"__esModule",{value:!0});DL.infiniteStream=void 0;const Xge=Je,DNt=LL;function LNt(e){return(0,Xge.convertFromNext)(new DNt.StreamArbitrary((0,Xge.convertToNext)(e)))}DL.infiniteStream=LNt;var BL={};Object.defineProperty(BL,"__esModule",{value:!0});BL.asciiString=void 0;const Qge=Je,BNt=si,VNt=gP,zNt=Vs,eye=Ss;function KNt(...e){const t=(0,zNt.extractStringConstraints)(e);return(0,Qge.convertFromNext)((0,Qge.convertToNext)((0,BNt.array)((0,VNt.ascii)(),t)).map(eye.codePointsToStringMapper,eye.codePointsToStringUnmapper))}BL.asciiString=KNt;var VL={},zI={};Object.defineProperty(zI,"__esModule",{value:!0});zI.stringToBase64Unmapper=zI.stringToBase64Mapper=void 0;function GNt(e){switch(e.length%4){case 0:return e;case 3:return`${e}=`;case 2:return`${e}==`;default:return e.slice(1)}}zI.stringToBase64Mapper=GNt;function HNt(e){if(typeof e!="string"||e.length%4!==0)throw new Error("Invalid string received");const t=e.indexOf("=");if(t===-1)return e;if(e.length-t>2)throw new Error("Cannot unmap the passed value");return e.substring(0,t)}zI.stringToBase64Unmapper=HNt;Object.defineProperty(VL,"__esModule",{value:!0});VL.base64String=void 0;const tye=Je,JNt=si,YNt=yP,ZNt=Bs,XNt=Vs,nye=Ss,rye=zI;function QNt(...e){const t=(0,XNt.extractStringConstraints)(e),{minLength:n=0,maxLength:r=ZNt.MaxLengthUpperBound,size:i}=t,a=n+3-(n+3)%4,o=r-r%4,u=t.maxLength===void 0&&i===void 0?"=":i;if(a>o)throw new Error("Minimal length should be inferior or equal to maximal length");if(a%4!==0)throw new Error("Minimal length of base64 strings must be a multiple of 4");if(o%4!==0)throw new Error("Maximal length of base64 strings must be a multiple of 4");return(0,tye.convertFromNext)((0,tye.convertToNext)((0,JNt.array)((0,YNt.base64)(),{minLength:a,maxLength:o,size:u})).map(nye.codePointsToStringMapper,nye.codePointsToStringUnmapper).map(rye.stringToBase64Mapper,rye.stringToBase64Unmapper))}VL.base64String=QNt;var zL={};Object.defineProperty(zL,"__esModule",{value:!0});zL.fullUnicodeString=void 0;const iye=Je,ejt=si,tjt=$w,njt=Vs,aye=Ss;function rjt(...e){const t=(0,njt.extractStringConstraints)(e);return(0,iye.convertFromNext)((0,iye.convertToNext)((0,ejt.array)((0,tjt.fullUnicode)(),t)).map(aye.codePointsToStringMapper,aye.codePointsToStringUnmapper))}zL.fullUnicodeString=rjt;var KL={},KI={};Object.defineProperty(KI,"__esModule",{value:!0});KI.charsToStringUnmapper=KI.charsToStringMapper=void 0;function ijt(e){return e.join("")}KI.charsToStringMapper=ijt;function ajt(e){if(typeof e!="string")throw new Error("Cannot unmap the passed value");return e.split("")}KI.charsToStringUnmapper=ajt;Object.defineProperty(KL,"__esModule",{value:!0});KL.string16bits=void 0;const oye=Je,ojt=si,ujt=$P,cjt=Vs,uye=KI;function fjt(...e){const t=(0,cjt.extractStringConstraints)(e);return(0,oye.convertFromNext)((0,oye.convertToNext)((0,ojt.array)((0,ujt.char16bits)(),t)).map(uye.charsToStringMapper,uye.charsToStringUnmapper))}KL.string16bits=fjt;var GL={},eF={},HL={};Object.defineProperty(HL,"__esModule",{value:!0});HL.isSubarrayOf=void 0;function sjt(e,t){const n=new Map;let r=0;for(const i of e)if(Object.is(i,-0))++r;else{const a=n.get(i)||0;n.set(i,a+1)}for(let i=0;i!==t.length;++i){if(!(i in t))return!1;const a=t[i];if(Object.is(a,-0)){if(r===0)return!1;--r}else{const o=n.get(a)||0;if(o===0)return!1;n.set(a,o-1)}}return!0}HL.isSubarrayOf=sjt;Object.defineProperty(eF,"__esModule",{value:!0});eF.SubarrayArbitrary=void 0;const ljt=gr,X8=Ar,djt=M0,cye=Mn,pjt=HL,fye=bg;let hjt=class extends ljt.NextArbitrary{constructor(t,n,r,i){if(super(),this.originalArray=t,this.isOrdered=n,this.minLength=r,this.maxLength=i,r<0||r>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(r>i)throw new Error("fc.*{s|S}ubarrayOf expects the minimal length to be inferior or equal to the maximal length");this.lengthArb=new fye.IntegerArbitrary(r,i),this.biasedLengthArb=r!==i?new fye.IntegerArbitrary(r,r+Math.floor(Math.log(i-r)/Math.log(2))):this.lengthArb}generate(t,n){const i=(n!==void 0&&t.nextInt(1,n)===1?this.biasedLengthArb:this.lengthArb).generate(t,void 0),a=i.value,o=this.originalArray.map((c,f)=>f),u=[];for(let c=0;c!==a;++c){const f=t.nextInt(0,o.length-1);u.push(o[f]),o.splice(f,1)}return this.isOrdered&&u.sort((c,f)=>c-f),new X8.NextValue(u.map(c=>this.originalArray[c]),i.context)}canShrinkWithoutContext(t){return!Array.isArray(t)||!this.lengthArb.canShrinkWithoutContext(t.length)?!1:(0,pjt.isSubarrayOf)(this.originalArray,t)}shrink(t,n){return t.length===0?cye.Stream.nil():this.lengthArb.shrink(t.length,n).map(r=>new X8.NextValue(t.slice(t.length-r.value),r.context)).join(t.length>this.minLength?(0,djt.makeLazy)(()=>this.shrink(t.slice(1),void 0).filter(r=>this.minLength<=r.value.length+1).map(r=>new X8.NextValue([t[0]].concat(r.value),void 0))):cye.Stream.nil())}};eF.SubarrayArbitrary=hjt;Object.defineProperty(GL,"__esModule",{value:!0});GL.subarray=void 0;const sye=Je,lye=eF;function vjt(e,...t){if(typeof t[0]=="number"&&typeof t[1]=="number")return(0,sye.convertFromNext)(new lye.SubarrayArbitrary(e,!0,t[0],t[1]));const n=t[0],r=n!==void 0&&n.minLength!==void 0?n.minLength:0,i=n!==void 0&&n.maxLength!==void 0?n.maxLength:e.length;return(0,sye.convertFromNext)(new lye.SubarrayArbitrary(e,!0,r,i))}GL.subarray=vjt;var JL={};Object.defineProperty(JL,"__esModule",{value:!0});JL.shuffledSubarray=void 0;const dye=Je,pye=eF;function mjt(e,...t){if(typeof t[0]=="number"&&typeof t[1]=="number")return(0,dye.convertFromNext)(new pye.SubarrayArbitrary(e,!1,t[0],t[1]));const n=t[0],r=n!==void 0&&n.minLength!==void 0?n.minLength:0,i=n!==void 0&&n.maxLength!==void 0?n.maxLength:e.length;return(0,dye.convertFromNext)(new pye.SubarrayArbitrary(e,!1,r,i))}JL.shuffledSubarray=mjt;var YL={},tF={},GI={};Object.defineProperty(GI,"__esModule",{value:!0});GI.numberToPaddedEightUnmapper=GI.numberToPaddedEightMapper=void 0;function Wje(e){return e.toString(16).padStart(8,"0")}GI.numberToPaddedEightMapper=Wje;function gjt(e){if(typeof e!="string")throw new Error("Unsupported type");if(e.length!==8)throw new Error("Unsupported value: invalid length");const t=parseInt(e,16);if(e!==Wje(t))throw new Error("Unsupported value: invalid content");return t}GI.numberToPaddedEightUnmapper=gjt;Object.defineProperty(tF,"__esModule",{value:!0});tF.buildPaddedNumberArbitrary=void 0;const hye=Je,yjt=li,vye=GI;function bjt(e,t){return(0,hye.convertFromNext)((0,hye.convertToNext)((0,yjt.integer)({min:e,max:t})).map(vye.numberToPaddedEightMapper,vye.numberToPaddedEightUnmapper))}tF.buildPaddedNumberArbitrary=bjt;var $b={};Object.defineProperty($b,"__esModule",{value:!0});$b.paddedEightsToUuidUnmapper=$b.paddedEightsToUuidMapper=void 0;function $jt(e){return`${e[0]}-${e[1].substring(4)}-${e[1].substring(0,4)}-${e[2].substring(0,4)}-${e[2].substring(4)}${e[3]}`}$b.paddedEightsToUuidMapper=$jt;const Ijt=/^([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/;function _jt(e){if(typeof e!="string")throw new Error("Unsupported type");const t=Ijt.exec(e);if(t===null)throw new Error("Unsupported type");return[t[1],t[3]+t[2],t[4]+t[5].substring(0,4),t[5].substring(4)]}$b.paddedEightsToUuidUnmapper=_jt;Object.defineProperty(YL,"__esModule",{value:!0});YL.uuid=void 0;const mye=Je,Sjt=Ei,Q8=tF,gye=$b;function wjt(){const e=(0,Q8.buildPaddedNumberArbitrary)(0,4294967295),t=(0,Q8.buildPaddedNumberArbitrary)(268435456,1610612735),n=(0,Q8.buildPaddedNumberArbitrary)(2147483648,3221225471);return(0,mye.convertFromNext)((0,mye.convertToNext)((0,Sjt.tuple)(e,t,n,e)).map(gye.paddedEightsToUuidMapper,gye.paddedEightsToUuidUnmapper))}YL.uuid=wjt;var ZL={};Object.defineProperty(ZL,"__esModule",{value:!0});ZL.uuidV=void 0;const yye=Je,Ajt=Ei,e7=tF,bye=$b;function Mjt(e){const t=(0,e7.buildPaddedNumberArbitrary)(0,4294967295),n=e*268435456,r=(0,e7.buildPaddedNumberArbitrary)(n,n+268435455),i=(0,e7.buildPaddedNumberArbitrary)(2147483648,3221225471);return(0,yye.convertFromNext)((0,yye.convertToNext)((0,Ajt.tuple)(t,r,i,t)).map(bye.paddedEightsToUuidMapper,bye.paddedEightsToUuidUnmapper))}ZL.uuidV=Mjt;var nF={};Object.defineProperty(nF,"__esModule",{value:!0});nF.webAuthority=void 0;const Rjt=Iw,$ye=Ef,Ojt=Sw,Ejt=Aw,Tjt=NP,Cjt=jP,Pjt=$g,Fjt=_d,Iye=Ig,Wjt=jh,Njt=Ei,cU=Je;function jjt(e){const t=["-",".","_","~","!","$","&","'","(",")","*","+",",",";","=",":"];return(0,Wjt.stringOf)((0,Rjt.buildAlphaNumericPercentArbitrary)(t),{size:e})}function kjt([e,t,n]){return(e===null?"":`${e}@`)+t+(n===null?"":`:${n}`)}function Ujt(e){if(typeof e!="string")throw new Error("Unsupported");const t=e.indexOf("@"),n=t!==-1?e.substring(0,t):null,i=/:(\d+)$/.exec(e),a=i!==null?Number(i[1]):null,o=i!==null?e.substring(t+1,e.length-i[1].length-1):e.substring(t+1);return[n,o,a]}function qjt(e){return`[${e}]`}function xjt(e){if(typeof e!="string"||e[0]!=="["||e[e.length-1]!=="]")throw new Error("Unsupported");return e.substring(1,e.length-1)}function Djt(e){const t=e||{},n=t.size,r=[(0,Ojt.domain)({size:n})].concat(t.withIPv4===!0?[(0,Ejt.ipV4)()]:[]).concat(t.withIPv6===!0?[(0,cU.convertFromNext)((0,cU.convertToNext)((0,Cjt.ipV6)()).map(qjt,xjt))]:[]).concat(t.withIPv4Extended===!0?[(0,Tjt.ipV4Extended)()]:[]);return(0,cU.convertFromNext)((0,cU.convertToNext)((0,Njt.tuple)(t.withUserInfo===!0?(0,Iye.option)(jjt(n)):(0,$ye.constant)(null),(0,Fjt.oneof)(...r),t.withPort===!0?(0,Iye.option)((0,Pjt.nat)(65535)):(0,$ye.constant)(null))).map(kjt,Ujt))}nF.webAuthority=Djt;var rF={},iF={};Object.defineProperty(iF,"__esModule",{value:!0});iF.buildUriQueryOrFragmentArbitrary=void 0;const Ljt=Iw,Bjt=jh;function Vjt(e){const t=["-",".","_","~","!","$","&","'","(",")","*","+",",",";","=",":","@","/","?"];return(0,Bjt.stringOf)((0,Ljt.buildAlphaNumericPercentArbitrary)(t),{size:e})}iF.buildUriQueryOrFragmentArbitrary=Vjt;Object.defineProperty(rF,"__esModule",{value:!0});rF.webFragments=void 0;const zjt=iF;function Kjt(e={}){return(0,zjt.buildUriQueryOrFragmentArbitrary)(e.size)}rF.webFragments=Kjt;var aF={};Object.defineProperty(aF,"__esModule",{value:!0});aF.webQueryParameters=void 0;const Gjt=iF;function Hjt(e={}){return(0,Gjt.buildUriQueryOrFragmentArbitrary)(e.size)}aF.webQueryParameters=Hjt;var oF={};Object.defineProperty(oF,"__esModule",{value:!0});oF.webSegment=void 0;const Jjt=Iw,Yjt=jh;function Zjt(e={}){const t=["-",".","_","~","!","$","&","'","(",")","*","+",",",";","=",":","@"];return(0,Yjt.stringOf)((0,Jjt.buildAlphaNumericPercentArbitrary)(t),{size:e.size})}oF.webSegment=Zjt;var XL={},HI={};Object.defineProperty(HI,"__esModule",{value:!0});HI.partsToUrlUnmapper=HI.partsToUrlMapper=void 0;function Xjt(e){const[t,n,r]=e,i=e[3]===null?"":`?${e[3]}`,a=e[4]===null?"":`#${e[4]}`;return`${t}://${n}${r}${i}${a}`}HI.partsToUrlMapper=Xjt;const Qjt=/^([[A-Za-z][A-Za-z0-9+.-]*):\/\/([^/?#]*)([^?#]*)(\?[A-Za-z0-9\-._~!$&'()*+,;=:@/?%]*)?(#[A-Za-z0-9\-._~!$&'()*+,;=:@/?%]*)?$/;function ekt(e){if(typeof e!="string")throw new Error("Incompatible value received: type");const t=Qjt.exec(e);if(t===null)throw new Error("Incompatible value received");const n=t[1],r=t[2],i=t[3],a=t[4],o=t[5];return[n,r,i,a!==void 0?a.substring(1):null,o!==void 0?o.substring(1):null]}HI.partsToUrlUnmapper=ekt;var QL={},JI={};Object.defineProperty(JI,"__esModule",{value:!0});JI.segmentsToPathUnmapper=JI.segmentsToPathMapper=void 0;function tkt(e){return e.map(t=>`/${t}`).join("")}JI.segmentsToPathMapper=tkt;function nkt(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 e.split("/").splice(1)}JI.segmentsToPathUnmapper=nkt;Object.defineProperty(QL,"__esModule",{value:!0});QL.buildUriPathArbitrary=void 0;const _ye=Je,rkt=oF,ikt=si,Sye=JI;function akt(e){switch(e){case"xsmall":return["xsmall","xsmall"];case"small":return["small","xsmall"];case"medium":return["small","small"];case"large":return["medium","small"];case"xlarge":return["medium","medium"]}}function okt(e){const[t,n]=akt(e);return(0,_ye.convertFromNext)((0,_ye.convertToNext)((0,ikt.array)((0,rkt.webSegment)({size:t}),{size:n})).map(Sye.segmentsToPathMapper,Sye.segmentsToPathUnmapper))}QL.buildUriPathArbitrary=okt;Object.defineProperty(XL,"__esModule",{value:!0});XL.webUrl=void 0;const ukt=O0,wye=Ef,Aye=Ig,ckt=Ei,fkt=aF,skt=rF,lkt=nF,Mye=Je,Rye=HI,Oye=Bs,dkt=QL;function pkt(e){const t=e||{},n=(0,Oye.resolveSize)(t.size),r=t.authoritySettings!==void 0&&t.authoritySettings.size!==void 0?(0,Oye.relativeSizeToSize)(t.authoritySettings.size,n):n,i=Object.assign(Object.assign({},t.authoritySettings),{size:r}),a=t.validSchemes||["http","https"],o=(0,ukt.constantFrom)(...a),u=(0,lkt.webAuthority)(i),c=(0,dkt.buildUriPathArbitrary)(n);return(0,Mye.convertFromNext)((0,Mye.convertToNext)((0,ckt.tuple)(o,u,c,t.withQueryParameters===!0?(0,Aye.option)((0,fkt.webQueryParameters)({size:n})):(0,wye.constant)(null),t.withFragments===!0?(0,Aye.option)((0,skt.webFragments)({size:n})):(0,wye.constant)(null))).map(Rye.partsToUrlMapper,Rye.partsToUrlUnmapper))}XL.webUrl=pkt;var e4={},t4={},n4={};Object.defineProperty(n4,"__esModule",{value:!0});n4.CommandsIterable=void 0;const hkt=Po;let vkt=class Nje{constructor(t,n){this.commands=t,this.metadataForReplay=n}[Symbol.iterator](){return this.commands[Symbol.iterator]()}[hkt.cloneMethod](){return new Nje(this.commands.map(t=>t.clone()),this.metadataForReplay)}toString(){const t=this.commands.filter(r=>r.hasRan).map(r=>r.toString()).join(","),n=this.metadataForReplay();return n.length!==0?`${t} /*${n}*/`:t}};n4.CommandsIterable=vkt;var r4={};Object.defineProperty(r4,"__esModule",{value:!0});r4.CommandWrapper=void 0;const M1=$d,Eye=Po;let mkt=class AG{constructor(t){if(this.cmd=t,this.hasRan=!1,(0,M1.hasToStringMethod)(t)){const n=t[M1.toStringMethod];this[M1.toStringMethod]=function(){return n.call(t)}}if((0,M1.hasAsyncToStringMethod)(t)){const n=t[M1.asyncToStringMethod];this[M1.asyncToStringMethod]=function(){return n.call(t)}}}check(t){return this.cmd.check(t)}run(t,n){return this.hasRan=!0,this.cmd.run(t,n)}clone(){return(0,Eye.hasCloneMethod)(this.cmd)?new AG(this.cmd[Eye.cloneMethod]()):new AG(this.cmd)}toString(){return this.cmd.toString()}};r4.CommandWrapper=mkt;var i4={};Object.defineProperty(i4,"__esModule",{value:!0});i4.ReplayPath=void 0;let gkt=class{static parse(t){const[n,r]=t.split(":"),i=this.parseCounts(n),a=this.parseChanges(r);return this.parseOccurences(i,a)}static stringify(t){const n=this.countOccurences(t),r=this.stringifyCounts(n),i=this.stringifyChanges(n);return`${r}:${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((n,r)=>(n.length===0||n[n.length-1].count===64||n[n.length-1].value!==r?n.push({value:r,count:1}):n[n.length-1].count+=1,n),[])}static parseOccurences(t,n){const r=[];for(let i=0;i!==t.length;++i){const a=t[i],o=n[i];for(let u=0;u!==a;++u)r.push(o)}return r}static stringifyChanges(t){let n="";for(let r=0;ra*2+(o.value?1:0),0);n+=this.intToB64(i)}return n}static parseChanges(t){const n=t.split("").map(i=>this.b64ToInt(i)),r=[];for(let i=0;i!==n.length;++i){let a=n[i];for(let o=0;o!==6;++o,a>>=1)r.push(a%2===1)}return r}static stringifyCounts(t){return t.map(({count:n})=>this.intToB64(n-1)).join("")}static parseCounts(t){return t.split("").map(n=>this.b64ToInt(n)+1)}};i4.ReplayPath=gkt;Object.defineProperty(t4,"__esModule",{value:!0});t4.CommandsArbitrary=void 0;const Tye=Je,ykt=gr,Cye=Ar,bkt=n4,$kt=r4,Pye=i4,Fye=M0,fU=Mn,Ikt=_d,_kt=YP;let Skt=class extends ykt.NextArbitrary{constructor(t,n,r,i,a){super(),this.sourceReplayPath=i,this.disableReplayLog=a,this.oneCommandArb=(0,Tye.convertToNext)((0,Ikt.oneof)(...t).map(o=>new $kt.CommandWrapper(o))),this.lengthArb=(0,Tye.convertToNext)((0,_kt.restrictedIntegerArbitraryBuilder)(0,n,r)),this.replayPath=[],this.replayPathPosition=0}metadataForReplay(){return this.disableReplayLog?"":`replayPath=${JSON.stringify(Pye.ReplayPath.stringify(this.replayPath))}`}buildNextValueFor(t,n){const r=t.map(a=>a.value_),i={shrunkOnce:n,items:t};return new Cye.NextValue(new bkt.CommandsIterable(r,()=>this.metadataForReplay()),i)}generate(t){const r=this.lengthArb.generate(t,void 0).value,i=Array(r);for(let a=0;a!==r;++a){const o=this.oneCommandArb.generate(t,void 0);i[a]=o}return this.replayPathPosition=0,this.buildNextValueFor(i,!1)}canShrinkWithoutContext(t){return!1}filterOnExecution(t){const n=[];for(const r of t)r.value_.hasRan?(this.replayPath.push(!0),n.push(r)):this.replayPath.push(!1);return n}filterOnReplay(t){return t.filter((n,r)=>{const i=this.replayPath[this.replayPathPosition+r];if(i===void 0)throw new Error("Too short replayPath");if(!i&&n.value_.hasRan)throw new Error("Mismatch between replayPath and real execution");return i})}filterForShrinkImpl(t){this.replayPathPosition===0&&(this.replayPath=this.sourceReplayPath!==null?Pye.ReplayPath.parse(this.sourceReplayPath):[]);const n=this.replayPathPosition{const s=o.slice(0,f);return this.lengthArb.shrink(o.length-1-f,void 0).map(l=>s.concat(o.slice(o.length-(l.value+1))))}));for(let f=0;f!==o.length;++f)c.push((0,Fye.makeLazy)(()=>this.oneCommandArb.shrink(o[f].value_,o[f].context).map(s=>o.slice(0,f).concat([s],o.slice(f+1)))));return u.join(...c).map(f=>this.buildNextValueFor(f.map(s=>new Cye.NextValue(s.value_.clone(),s.context)),!0))}};t4.CommandsArbitrary=Skt;Object.defineProperty(e4,"__esModule",{value:!0});e4.commands=void 0;const wkt=Je,Akt=t4,Wye=Bs;function Mkt(e,t){const n=t==null?{}:typeof t=="number"?{maxCommands:t}:t,r=n.size,i=n.maxCommands!==void 0?n.maxCommands:Wye.MaxLengthUpperBound,a=n.maxCommands!==void 0,o=(0,Wye.maxGeneratedLengthFromSizeForArbitrary)(r,0,i,a);return(0,wkt.convertFromNext)(new Akt.CommandsArbitrary(e,o,i,n.replayPath!=null?n.replayPath:null,!!n.disableReplayLog))}e4.commands=Mkt;var $m={},YI={};Object.defineProperty(YI,"__esModule",{value:!0});YI.scheduleCommands=YI.ScheduledCommand=void 0;let jje=class{constructor(t,n){this.s=t,this.cmd=n}async check(t){let n=null,r=!1;if((await this.s.scheduleSequence([{label:`check@${this.cmd.toString()}`,builder:async()=>{try{r=await Promise.resolve(this.cmd.check(t))}catch(a){throw n=a,a}}}]).task).faulty)throw n;return r}async run(t,n){let r=null;if((await this.s.scheduleSequence([{label:`run@${this.cmd.toString()}`,builder:async()=>{try{await this.cmd.run(t,n)}catch(a){throw r=a,a}}}]).task).faulty)throw r}};YI.ScheduledCommand=jje;const Rkt=function*(e,t){for(const n of t)yield new jje(e,n)};YI.scheduleCommands=Rkt;Object.defineProperty($m,"__esModule",{value:!0});$m.scheduledModelRun=$m.asyncModelRun=$m.modelRun=void 0;const Okt=YI,kje=(e,t,n,r,i)=>e.then(a=>{const{model:o,real:u}=a;let c=n;for(const f of t)c=i(c,()=>r(f,o,u));return c}),Ekt=(e,t)=>kje({then:a=>{a(e())}},t,void 0,(a,o,u)=>{a.check(o)&&a.run(o,u)},(a,o)=>o()),Tkt=e=>typeof e.then=="function",Uje=async(e,t,n=Promise.resolve())=>await kje({then:o=>{const u=e();return Tkt(u)?u.then(o):o(u)}},t,n,async(o,u,c)=>{await o.check(u)&&await o.run(u,c)},(o,u)=>o.then(u));function Ckt(e,t){Ekt(e,t)}$m.modelRun=Ckt;async function Pkt(e,t){await Uje(e,t)}$m.asyncModelRun=Pkt;async function Fkt(e,t,n){const r=(0,Okt.scheduleCommands)(e,n),i=Uje(t,r,e.schedule(Promise.resolve(),"startModel"));await e.waitAll(),await i}$m.scheduledModelRun=Fkt;var ZI={},a4={},uF={};Object.defineProperty(uF,"__esModule",{value:!0});uF.SchedulerImplem=void 0;const Wkt=Fm,Nkt=Po,Nye=$d;let jkt=class MG{constructor(t,n){this.act=t,this.taskSelector=n,this.lastTaskId=0,this.sourceTaskSelector=n.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 ${(0,Wkt.escapeForTemplateString)(t.outputValue)}`:""}`}log(t,n,r,i,a,o){this.triggeredTasks.push({status:a,schedulingType:t,taskId:n,label:r,metadata:i,outputValue:o!==void 0?(0,Nye.stringify)(o):void 0})}scheduleInternal(t,n,r,i,a){let o=null;const u=++this.lastTaskId,c=new Promise((f,s)=>{o=()=>{(a?r.then(()=>a()):r).then(l=>(this.log(t,u,n,i,"resolved",l),f(l)),l=>(this.log(t,u,n,i,"rejected",l),s(l)))}});return this.scheduledTasks.push({original:r,scheduled:c,trigger:o,schedulingType:t,taskId:u,label:n,metadata:i}),this.scheduledWatchers.length!==0&&this.scheduledWatchers[0](),c}schedule(t,n,r){return this.scheduleInternal("promise",n||"",t,r)}scheduleFunction(t){return(...n)=>this.scheduleInternal("function",`${t.name}(${n.map(Nye.stringify).join(",")})`,t(...n),void 0)}scheduleSequence(t){const n={done:!1,faulty:!1},r={then:o=>o()};let i=()=>{};const a=new Promise(o=>i=o);return t.reduce((o,u)=>{const[c,f,s]=typeof u=="function"?[u,u.name,void 0]:[u.builder,u.label,u.metadata];return o.then(()=>{const l=this.scheduleInternal("sequence",f,r,s,()=>c());return l.catch(()=>{n.faulty=!0,i()}),l})},r).then(()=>{n.done=!0,i()},()=>{}),Object.assign(n,{task:Promise.resolve(a).then(()=>({done:n.done,faulty:n.faulty}))})}count(){return this.scheduledTasks.length}async internalWaitOne(){if(this.scheduledTasks.length===0)throw new Error("No task scheduled");const t=this.taskSelector.nextTaskIndex(this.scheduledTasks),[n]=this.scheduledTasks.splice(t,1);n.trigger();try{await n.scheduled}catch{}}async waitOne(){await this.act(async()=>await this.internalWaitOne())}async waitAll(){for(;this.scheduledTasks.length>0;)await this.waitOne()}async waitFor(t){let n=!1,r=null;const i=async()=>{for(;!n&&this.scheduledTasks.length>0;)await this.waitOne();r=null},a=()=>{r===null&&(r=Promise.resolve().then(i))},o=()=>{const c=this.scheduledWatchers.indexOf(a);c!==-1&&this.scheduledWatchers.splice(c,1),c===0&&this.scheduledWatchers.length!==0&&this.scheduledWatchers[0]()},u=t.then(c=>(n=!0,r===null?(o(),c):r.then(()=>(o(),c))),c=>{if(n=!0,r===null)throw o(),c;return r.then(()=>{throw o(),c})});return this.scheduledTasks.length>0&&this.scheduledWatchers.length===0&&a(),this.scheduledWatchers.push(a),u}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(MG.buildLog).map(t=>`-> ${t}`).join(` `)+"`"}[Nkt.cloneMethod](){return new MG(this.act,this.sourceTaskSelector)}};uF.SchedulerImplem=jkt;Object.defineProperty(a4,"__esModule",{value:!0});a4.buildSchedulerFor=void 0;const kkt=uF;function qje(e){let t=0;return{clone:()=>qje(e),nextTaskIndex:n=>{if(e.length<=t)throw new Error("Invalid schedulerFor defined: too many tasks have been scheduled");const r=n.findIndex(i=>i.taskId===e[t]);if(r===-1)throw new Error("Invalid schedulerFor defined: unable to find next task");return++t,r}}}function Ukt(e,t){return new kkt.SchedulerImplem(e,qje(t))}a4.buildSchedulerFor=Ukt;var o4={};Object.defineProperty(o4,"__esModule",{value:!0});o4.SchedulerArbitrary=void 0;const qkt=gr,xkt=Ar,Dkt=Mn,Lkt=uF;function xje(e){const t=e.clone();return{clone:()=>xje(t),nextTaskIndex:n=>e.nextInt(0,n.length-1)}}let Bkt=class extends qkt.NextArbitrary{constructor(t){super(),this.act=t}generate(t,n){return new xkt.NextValue(new Lkt.SchedulerImplem(this.act,xje(t.clone())),void 0)}canShrinkWithoutContext(t){return!1}shrink(t,n){return Dkt.Stream.nil()}};o4.SchedulerArbitrary=Bkt;Object.defineProperty(ZI,"__esModule",{value:!0});ZI.schedulerFor=ZI.scheduler=void 0;const Vkt=Je,jye=a4,zkt=o4;function Kkt(e){const{act:t=n=>n()}=e||{};return(0,Vkt.convertFromNext)(new zkt.SchedulerArbitrary(t))}ZI.scheduler=Kkt;function Gkt(e,t){const{act:n=r=>r()}=Array.isArray(e)?t||{}:e||{};return Array.isArray(e)?(0,jye.buildSchedulerFor)(n,e):function(r,...i){return(0,jye.buildSchedulerFor)(n,i)}}ZI.schedulerFor=Gkt;var u4={};Object.defineProperty(u4,"__esModule",{value:!0});u4.ArbitraryWithShrink=void 0;const Hkt=Hp,Jkt=Nh;let Ykt=class extends Hkt.Arbitrary{shrinkableFor(t,n){return new Jkt.Shrinkable(t,()=>this.shrink(t,n===!0).map(r=>this.shrinkableFor(r,!0)))}};u4.ArbitraryWithShrink=Ykt;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.shuffledSubarray=e.dedup=e.clone=e.frequency=e.oneof=e.option=e.mapToConstant=e.clonedConstant=e.constantFrom=e.constant=e.lorem=e.base64String=e.hexaString=e.fullUnicodeString=e.unicodeString=e.stringOf=e.string16bits=e.asciiString=e.string=e.mixedCase=e.base64=e.hexa=e.fullUnicode=e.unicode=e.char16bits=e.ascii=e.char=e.bigUint=e.bigInt=e.bigUintN=e.bigIntN=e.maxSafeNat=e.maxSafeInteger=e.nat=e.integer=e.double=e.float=e.falsy=e.boolean=e.asyncProperty=e.property=e.PreconditionFailure=e.pre=e.assert=e.check=e.statistics=e.sample=e.__commitHash=e.__version=e.__type=void 0,e.commands=e.scheduledModelRun=e.modelRun=e.asyncModelRun=e.float64Array=e.float32Array=e.uint32Array=e.int32Array=e.uint16Array=e.int16Array=e.uint8ClampedArray=e.uint8Array=e.int8Array=e.uuidV=e.uuid=e.emailAddress=e.webUrl=e.webQueryParameters=e.webFragments=e.webSegment=e.webAuthority=e.domain=e.ipV6=e.ipV4Extended=e.ipV4=e.date=e.context=e.func=e.compareFunc=e.compareBooleanFunc=e.memo=e.letrec=e.unicodeJsonValue=e.unicodeJsonObject=e.unicodeJson=e.jsonValue=e.jsonObject=e.json=e.object=e.anything=e.dictionary=e.record=e.genericTuple=e.tuple=e.uniqueArray=e.set=e.infiniteStream=e.sparseArray=e.array=e.subarray=void 0,e.createDepthIdentifier=e.stream=e.Stream=e.Random=e.ExecutionStatus=e.resetConfigureGlobal=e.readConfigureGlobal=e.configureGlobal=e.VerbosityLevel=e.hash=e.asyncDefaultReportMessage=e.defaultReportMessage=e.asyncStringify=e.stringify=e.getDepthContextFor=e.hasAsyncToStringMethod=e.asyncToStringMethod=e.hasToStringMethod=e.toStringMethod=e.convertToNext=e.convertFromNextWithShrunkOnce=e.convertFromNext=e.hasCloneMethod=e.cloneIfNeeded=e.cloneMethod=e.NextValue=e.Shrinkable=e.ArbitraryWithContextualShrink=e.ArbitraryWithShrink=e.NextArbitrary=e.Arbitrary=e.schedulerFor=e.scheduler=void 0;const t=kD;Object.defineProperty(e,"pre",{enumerable:!0,get:function(){return t.pre}});const n=qNe;Object.defineProperty(e,"asyncProperty",{enumerable:!0,get:function(){return n.asyncProperty}});const r=ZNe;Object.defineProperty(e,"property",{enumerable:!0,get:function(){return r.property}});const i=FI;Object.defineProperty(e,"assert",{enumerable:!0,get:function(){return i.assert}}),Object.defineProperty(e,"check",{enumerable:!0,get:function(){return i.check}});const a=NI;Object.defineProperty(e,"sample",{enumerable:!0,get:function(){return a.sample}}),Object.defineProperty(e,"statistics",{enumerable:!0,get:function(){return a.statistics}});const o=si;Object.defineProperty(e,"array",{enumerable:!0,get:function(){return o.array}});const u=hP;Object.defineProperty(e,"bigInt",{enumerable:!0,get:function(){return u.bigInt}});const c=uL;Object.defineProperty(e,"bigIntN",{enumerable:!0,get:function(){return c.bigIntN}});const f=cL;Object.defineProperty(e,"bigUint",{enumerable:!0,get:function(){return f.bigUint}});const s=vP;Object.defineProperty(e,"bigUintN",{enumerable:!0,get:function(){return s.bigUintN}});const l=bw;Object.defineProperty(e,"boolean",{enumerable:!0,get:function(){return l.boolean}});const d=fL;Object.defineProperty(e,"falsy",{enumerable:!0,get:function(){return d.falsy}});const p=gP;Object.defineProperty(e,"ascii",{enumerable:!0,get:function(){return p.ascii}});const v=yP;Object.defineProperty(e,"base64",{enumerable:!0,get:function(){return v.base64}});const h=bP;Object.defineProperty(e,"char",{enumerable:!0,get:function(){return h.char}});const $=$P;Object.defineProperty(e,"char16bits",{enumerable:!0,get:function(){return $.char16bits}});const b=$w;Object.defineProperty(e,"fullUnicode",{enumerable:!0,get:function(){return b.fullUnicode}});const y=IP;Object.defineProperty(e,"hexa",{enumerable:!0,get:function(){return y.hexa}});const m=_P;Object.defineProperty(e,"unicode",{enumerable:!0,get:function(){return m.unicode}});const g=sL;Object.defineProperty(e,"clonedConstant",{enumerable:!0,get:function(){return g.clonedConstant}});const _=Ef;Object.defineProperty(e,"constant",{enumerable:!0,get:function(){return _.constant}});const I=O0;Object.defineProperty(e,"constantFrom",{enumerable:!0,get:function(){return I.constantFrom}});const A=lL;Object.defineProperty(e,"context",{enumerable:!0,get:function(){return A.context}});const E=SP;Object.defineProperty(e,"date",{enumerable:!0,get:function(){return E.date}});const N=wP;Object.defineProperty(e,"clone",{enumerable:!0,get:function(){return N.clone}});const U=pL;Object.defineProperty(e,"dedup",{enumerable:!0,get:function(){return U.dedup}});const te=Hp;Object.defineProperty(e,"Arbitrary",{enumerable:!0,get:function(){return te.Arbitrary}});const Ie=Nh;Object.defineProperty(e,"Shrinkable",{enumerable:!0,get:function(){return Ie.Shrinkable}});const je=AP;Object.defineProperty(e,"dictionary",{enumerable:!0,get:function(){return je.dictionary}});const J=hL;Object.defineProperty(e,"emailAddress",{enumerable:!0,get:function(){return J.emailAddress}});const ee=C0;Object.defineProperty(e,"double",{enumerable:!0,get:function(){return ee.double}});const fe=PP;Object.defineProperty(e,"float",{enumerable:!0,get:function(){return fe.float}});const ae=T0;Object.defineProperty(e,"frequency",{enumerable:!0,get:function(){return ae.frequency}});const he=$L;Object.defineProperty(e,"compareBooleanFunc",{enumerable:!0,get:function(){return he.compareBooleanFunc}});const _e=IL;Object.defineProperty(e,"compareFunc",{enumerable:!0,get:function(){return _e.compareFunc}});const Z=_L;Object.defineProperty(e,"func",{enumerable:!0,get:function(){return Z.func}});const ve=Sw;Object.defineProperty(e,"domain",{enumerable:!0,get:function(){return ve.domain}});const Ee=li;Object.defineProperty(e,"integer",{enumerable:!0,get:function(){return Ee.integer}});const H=WP;Object.defineProperty(e,"maxSafeInteger",{enumerable:!0,get:function(){return H.maxSafeInteger}});const re=SL;Object.defineProperty(e,"maxSafeNat",{enumerable:!0,get:function(){return re.maxSafeNat}});const oe=$g;Object.defineProperty(e,"nat",{enumerable:!0,get:function(){return oe.nat}});const ie=Aw;Object.defineProperty(e,"ipV4",{enumerable:!0,get:function(){return ie.ipV4}});const le=NP;Object.defineProperty(e,"ipV4Extended",{enumerable:!0,get:function(){return le.ipV4Extended}});const me=jP;Object.defineProperty(e,"ipV6",{enumerable:!0,get:function(){return me.ipV6}});const ye=UP;Object.defineProperty(e,"letrec",{enumerable:!0,get:function(){return ye.letrec}});const We=ML;Object.defineProperty(e,"lorem",{enumerable:!0,get:function(){return We.lorem}});const Ke=TP;Object.defineProperty(e,"mapToConstant",{enumerable:!0,get:function(){return Ke.mapToConstant}});const Ne=RL;Object.defineProperty(e,"memo",{enumerable:!0,get:function(){return Ne.memo}});const ct=OL;Object.defineProperty(e,"mixedCase",{enumerable:!0,get:function(){return ct.mixedCase}});const $t=TL;Object.defineProperty(e,"object",{enumerable:!0,get:function(){return $t.object}});const yt=FL;Object.defineProperty(e,"json",{enumerable:!0,get:function(){return yt.json}});const Mt=Ow;Object.defineProperty(e,"anything",{enumerable:!0,get:function(){return Mt.anything}});const Ut=WL;Object.defineProperty(e,"unicodeJsonObject",{enumerable:!0,get:function(){return Ut.unicodeJsonObject}});const fn=Ew;Object.defineProperty(e,"unicodeJsonValue",{enumerable:!0,get:function(){return fn.unicodeJsonValue}});const sn=NL;Object.defineProperty(e,"jsonObject",{enumerable:!0,get:function(){return sn.jsonObject}});const Vt=Rw;Object.defineProperty(e,"jsonValue",{enumerable:!0,get:function(){return Vt.jsonValue}});const Yt=jL;Object.defineProperty(e,"unicodeJson",{enumerable:!0,get:function(){return Yt.unicodeJson}});const ln=_d;Object.defineProperty(e,"oneof",{enumerable:!0,get:function(){return ln.oneof}});const yn=Ig;Object.defineProperty(e,"option",{enumerable:!0,get:function(){return yn.option}});const Zn=kL;Object.defineProperty(e,"record",{enumerable:!0,get:function(){return Zn.record}});const Xn=xL;Object.defineProperty(e,"set",{enumerable:!0,get:function(){return Xn.set}});const Qn=E0;Object.defineProperty(e,"uniqueArray",{enumerable:!0,get:function(){return Qn.uniqueArray}});const dn=DL;Object.defineProperty(e,"infiniteStream",{enumerable:!0,get:function(){return dn.infiniteStream}});const zt=BL;Object.defineProperty(e,"asciiString",{enumerable:!0,get:function(){return zt.asciiString}});const bn=VL;Object.defineProperty(e,"base64String",{enumerable:!0,get:function(){return bn.base64String}});const st=zL;Object.defineProperty(e,"fullUnicodeString",{enumerable:!0,get:function(){return st.fullUnicodeString}});const D=kP;Object.defineProperty(e,"hexaString",{enumerable:!0,get:function(){return D.hexaString}});const q=Mw;Object.defineProperty(e,"string",{enumerable:!0,get:function(){return q.string}});const G=KL;Object.defineProperty(e,"string16bits",{enumerable:!0,get:function(){return G.string16bits}});const xe=jh;Object.defineProperty(e,"stringOf",{enumerable:!0,get:function(){return xe.stringOf}});const ut=QP;Object.defineProperty(e,"unicodeString",{enumerable:!0,get:function(){return ut.unicodeString}});const x=GL;Object.defineProperty(e,"subarray",{enumerable:!0,get:function(){return x.subarray}});const V=JL;Object.defineProperty(e,"shuffledSubarray",{enumerable:!0,get:function(){return V.shuffledSubarray}});const ue=vw;Object.defineProperty(e,"genericTuple",{enumerable:!0,get:function(){return ue.genericTuple}});const ze=Ei;Object.defineProperty(e,"tuple",{enumerable:!0,get:function(){return ze.tuple}});const ke=YL;Object.defineProperty(e,"uuid",{enumerable:!0,get:function(){return ke.uuid}});const Tt=ZL;Object.defineProperty(e,"uuidV",{enumerable:!0,get:function(){return Tt.uuidV}});const Rt=nF;Object.defineProperty(e,"webAuthority",{enumerable:!0,get:function(){return Rt.webAuthority}});const kn=rF;Object.defineProperty(e,"webFragments",{enumerable:!0,get:function(){return kn.webFragments}});const Un=aF;Object.defineProperty(e,"webQueryParameters",{enumerable:!0,get:function(){return Un.webQueryParameters}});const qn=oF;Object.defineProperty(e,"webSegment",{enumerable:!0,get:function(){return qn.webSegment}});const er=XL;Object.defineProperty(e,"webUrl",{enumerable:!0,get:function(){return er.webUrl}});const Ur=e4;Object.defineProperty(e,"commands",{enumerable:!0,get:function(){return Ur.commands}});const tr=$m;Object.defineProperty(e,"asyncModelRun",{enumerable:!0,get:function(){return tr.asyncModelRun}}),Object.defineProperty(e,"modelRun",{enumerable:!0,get:function(){return tr.modelRun}}),Object.defineProperty(e,"scheduledModelRun",{enumerable:!0,get:function(){return tr.scheduledModelRun}});const F=sP;Object.defineProperty(e,"Random",{enumerable:!0,get:function(){return F.Random}});const j=mc;Object.defineProperty(e,"configureGlobal",{enumerable:!0,get:function(){return j.configureGlobal}}),Object.defineProperty(e,"readConfigureGlobal",{enumerable:!0,get:function(){return j.readConfigureGlobal}}),Object.defineProperty(e,"resetConfigureGlobal",{enumerable:!0,get:function(){return j.resetConfigureGlobal}});const z=uP;Object.defineProperty(e,"VerbosityLevel",{enumerable:!0,get:function(){return z.VerbosityLevel}});const ne=rL;Object.defineProperty(e,"ExecutionStatus",{enumerable:!0,get:function(){return ne.ExecutionStatus}});const Ue=Po;Object.defineProperty(e,"cloneMethod",{enumerable:!0,get:function(){return Ue.cloneMethod}}),Object.defineProperty(e,"cloneIfNeeded",{enumerable:!0,get:function(){return Ue.cloneIfNeeded}}),Object.defineProperty(e,"hasCloneMethod",{enumerable:!0,get:function(){return Ue.hasCloneMethod}});const Be=Mn;Object.defineProperty(e,"Stream",{enumerable:!0,get:function(){return Be.Stream}}),Object.defineProperty(e,"stream",{enumerable:!0,get:function(){return Be.stream}});const ht=ww;Object.defineProperty(e,"hash",{enumerable:!0,get:function(){return ht.hash}});const At=$d;Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return At.stringify}}),Object.defineProperty(e,"asyncStringify",{enumerable:!0,get:function(){return At.asyncStringify}}),Object.defineProperty(e,"toStringMethod",{enumerable:!0,get:function(){return At.toStringMethod}}),Object.defineProperty(e,"hasToStringMethod",{enumerable:!0,get:function(){return At.hasToStringMethod}}),Object.defineProperty(e,"asyncToStringMethod",{enumerable:!0,get:function(){return At.asyncToStringMethod}}),Object.defineProperty(e,"hasAsyncToStringMethod",{enumerable:!0,get:function(){return At.hasAsyncToStringMethod}});const xn=ZI;Object.defineProperty(e,"scheduler",{enumerable:!0,get:function(){return xn.scheduler}}),Object.defineProperty(e,"schedulerFor",{enumerable:!0,get:function(){return xn.schedulerFor}});const nr=ps;Object.defineProperty(e,"defaultReportMessage",{enumerable:!0,get:function(){return nr.defaultReportMessage}}),Object.defineProperty(e,"asyncDefaultReportMessage",{enumerable:!0,get:function(){return nr.asyncDefaultReportMessage}});const bi=u4;Object.defineProperty(e,"ArbitraryWithShrink",{enumerable:!0,get:function(){return bi.ArbitraryWithShrink}});const P=YC;Object.defineProperty(e,"ArbitraryWithContextualShrink",{enumerable:!0,get:function(){return P.ArbitraryWithContextualShrink}});const W=Wh;Object.defineProperty(e,"PreconditionFailure",{enumerable:!0,get:function(){return W.PreconditionFailure}});const B=VP;Object.defineProperty(e,"int8Array",{enumerable:!0,get:function(){return B.int8Array}});const X=LP;Object.defineProperty(e,"int16Array",{enumerable:!0,get:function(){return X.int16Array}});const Te=BP;Object.defineProperty(e,"int32Array",{enumerable:!0,get:function(){return Te.int32Array}});const De=GP;Object.defineProperty(e,"uint8Array",{enumerable:!0,get:function(){return De.uint8Array}});const bt=HP;Object.defineProperty(e,"uint8ClampedArray",{enumerable:!0,get:function(){return bt.uint8ClampedArray}});const Dn=zP;Object.defineProperty(e,"uint16Array",{enumerable:!0,get:function(){return Dn.uint16Array}});const $i=KP;Object.defineProperty(e,"uint32Array",{enumerable:!0,get:function(){return $i.uint32Array}});const Li=xP;Object.defineProperty(e,"float32Array",{enumerable:!0,get:function(){return Li.float32Array}});const ns=DP;Object.defineProperty(e,"float64Array",{enumerable:!0,get:function(){return ns.float64Array}});const rs=JP;Object.defineProperty(e,"sparseArray",{enumerable:!0,get:function(){return rs.sparseArray}});const is=gr;Object.defineProperty(e,"NextArbitrary",{enumerable:!0,get:function(){return is.NextArbitrary}});const as=Ar;Object.defineProperty(e,"NextValue",{enumerable:!0,get:function(){return as.NextValue}});const zo=Je;Object.defineProperty(e,"convertFromNext",{enumerable:!0,get:function(){return zo.convertFromNext}}),Object.defineProperty(e,"convertFromNextWithShrunkOnce",{enumerable:!0,get:function(){return zo.convertFromNextWithShrunkOnce}}),Object.defineProperty(e,"convertToNext",{enumerable:!0,get:function(){return zo.convertToNext}});const ic=Jp;Object.defineProperty(e,"createDepthIdentifier",{enumerable:!0,get:function(){return ic.createDepthIdentifier}}),Object.defineProperty(e,"getDepthContextFor",{enumerable:!0,get:function(){return ic.getDepthContextFor}});const os="commonjs";e.__type=os;const us="2.25.0";e.__version=us;const cs="4c36a82eca7402fb502db7d227b192eb458b2f15";e.__commitHash=cs})(sG);(function(e){var t=K&&K.__createBinding||(Object.create?function(i,a,o,u){u===void 0&&(u=o);var c=Object.getOwnPropertyDescriptor(a,o);(!c||("get"in c?!a.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return a[o]}}),Object.defineProperty(i,u,c)}:function(i,a,o,u){u===void 0&&(u=o),i[u]=a[o]}),n=K&&K.__exportStar||function(i,a){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(a,o)&&t(a,i,o)};Object.defineProperty(e,"__esModule",{value:!0});const r=sG;e.default=r,n(sG,e)})(bd);var _a={};Object.defineProperty(_a,"__esModule",{value:!0});_a.FastCheckType=_a.FastCheckURI=void 0;_a.FastCheckURI="FastCheckURI";var Zkt=function(){function e(t){this.arb=t}return e}();_a.FastCheckType=Zkt;var t7={},n7={},jR={};const Xkt=Et(vRe);var kye;function Dje(){if(kye)return jR;kye=1,Object.defineProperty(jR,"__esModule",{value:!0}),jR.fastCheckPrimitiveInterpreter=void 0;var e=nt,t=bd,n=JC,r=Ln,i=Xkt,a=ND,o=wd(),u=_a;return jR.fastCheckPrimitiveInterpreter=e.memo(function(){return{_F:u.FastCheckURI,date:function(c){return function(f){return new u.FastCheckType(o.fastCheckApplyConfig(c)(t.integer().map(function(s){return new Date(s)}),f,{}))}},boolean:function(c){return function(f){return new u.FastCheckType(o.fastCheckApplyConfig(c)(t.boolean(),f,{}))}},string:function(c){return function(f){return new u.FastCheckType(o.fastCheckApplyConfig(c)(t.string(),f,{}))}},number:function(c){return function(f){return new u.FastCheckType(o.fastCheckApplyConfig(c)(t.float(),f,{}))}},bigint:function(c){return function(f){return new u.FastCheckType(o.fastCheckApplyConfig(c)(t.bigInt(),f,{}))}},stringLiteral:function(c,f){return function(s){return new u.FastCheckType(o.fastCheckApplyConfig(f)(t.constant(c),s,{}))}},numberLiteral:function(c,f){return function(s){return new u.FastCheckType(o.fastCheckApplyConfig(f)(t.constant(c),s,{}))}},oneOfLiterals:function(c,f){return function(s){return new u.FastCheckType(o.fastCheckApplyConfig(f)(t.oneof.apply(void 0,c.map(t.constant)),s,{}))}},tag:function(c,f){return function(s){return new u.FastCheckType(o.fastCheckApplyConfig(f)(t.constant(c),s,{}))}},keysOf:function(c,f){return function(s){return new u.FastCheckType(o.fastCheckApplyConfig(f)(t.oneof.apply(void 0,Object.keys(c).map(t.constant)),s,{}))}},nullable:function(c,f){return function(s){return r.pipe(c(s).arb,function(l){return new u.FastCheckType(o.fastCheckApplyConfig(f)(t.option(l).map(a.fromNullable),s,{arb:l}))})}},optional:function(c,f){return function(s){return r.pipe(c(s).arb,function(l){return new u.FastCheckType(o.fastCheckApplyConfig(f)(t.option(l).map(function(d){return d===null?void 0:d}),s,{arb:l}))})}},mutable:function(c,f){return function(s){return r.pipe(c(s).arb,function(l){return new u.FastCheckType(o.fastCheckApplyConfig(f)(l,s,{arb:l}))})}},array:function(c,f){return function(s){return r.pipe(c(s).arb,function(l){return new u.FastCheckType(o.fastCheckApplyConfig(f)(t.array(l),s,{arb:l}))})}},nonEmptyArray:function(c,f){return function(s){return r.pipe(c(s).arb,function(l){return new u.FastCheckType(o.fastCheckApplyConfig(f)(t.array(l).chain(function(d){return l.map(function(p){return i.cons(p,d)})}),s,{arb:l}))})}},uuid:function(c){return function(f){return r.pipe(t.uuid(),function(s){return new u.FastCheckType(o.fastCheckApplyConfig(c)(s,f,{arb:s}))})}},either:function(c,f,s){return function(l){return function(d,p){return new u.FastCheckType(o.fastCheckApplyConfig(s)(t.oneof(d.map(n.left),p.map(n.right)),l,{left:d,right:p}))}(c(l).arb,f(l).arb)}},option:function(c,f){return function(s){return r.pipe(c(s).arb,function(l){return new u.FastCheckType(o.fastCheckApplyConfig(f)(t.oneof(l.map(a.some),t.constant(a.none)),s,{arb:l}))})}},unknownE:function(c,f){return function(s){return new u.FastCheckType(o.fastCheckApplyConfig(f)(c(s).arb,s,{}))}}}}),jR}var kR={},Uye;function Lje(){if(Uye)return kR;Uye=1,Object.defineProperty(kR,"__esModule",{value:!0}),kR.fastCheckObjectInterpreter=void 0;var e=ea,t=nt,n=bd,r=wd(),i=_a;return kR.fastCheckObjectInterpreter=t.memo(function(){return{_F:i.FastCheckURI,partial:function(a,o,u){return function(c){var f=t.projectFieldWithEnv(a,c)("arb");return new i.FastCheckType(r.fastCheckApplyConfig(u)(n.record(f,{withDeletedKeys:!0}),c,{arbs:f}))}},interface:function(a,o,u){return function(c){var f=t.projectFieldWithEnv(a,c)("arb");return new i.FastCheckType(r.fastCheckApplyConfig(u)(n.record(f),c,{arbs:f}))}},both:function(a,o,u,c){return function(f){var s=t.projectFieldWithEnv(a,f)("arb"),l=t.projectFieldWithEnv(o,f)("arb");return new i.FastCheckType(r.fastCheckApplyConfig(c)(n.record(s).chain(function(d){return n.record(l,{withDeletedKeys:!0}).map(function(p){return e.__assign(e.__assign({},d),p)})}),f,{arbs:s,partialArbs:l}))}}}}),kR}var UR={},qye;function Bje(){if(qye)return UR;qye=1,Object.defineProperty(UR,"__esModule",{value:!0}),UR.fastCheckTaggedUnionInterpreter=void 0;var e=nt,t=bd,n=wd(),r=_a;return UR.fastCheckTaggedUnionInterpreter=e.memo(function(){return{_F:r.FastCheckURI,taggedUnion:function(i,a,o,u){return function(c){return new r.FastCheckType(n.fastCheckApplyConfig(u)(t.oneof.apply(void 0,e.collect(a,function(f,s){return s(c).arb})),c,{}))}}}}),UR}var cF={};Object.defineProperty(cF,"__esModule",{value:!0});cF.fastCheckUnionInterpreter=void 0;var Qkt=nt,eUt=bd,xye=_a;cF.fastCheckUnionInterpreter=Qkt.memo(function(){return{_F:xye.FastCheckURI,union:function(e){return function(t,n){return function(r){return new xye.FastCheckType(eUt.oneof.apply(void 0,e.map(function(i){return i(r).arb})))}}}}});var qR={},Dye;function Vje(){if(Dye)return qR;Dye=1,Object.defineProperty(qR,"__esModule",{value:!0}),qR.fastCheckRecursiveInterpreter=void 0;var e=nt,t=bd,n=wd(),r=_a;return qR.fastCheckRecursiveInterpreter=e.memo(function(){return{_F:r.FastCheckURI,recursive:function(i,a,o){var u=e.memo(function(){return i(c)}),c=function(f){return new r.FastCheckType(n.fastCheckApplyConfig(o)(t.constant(null).chain(function(s){return u()(f).arb}),f,{}))};return c}}}),qR}var xR={};const zje=Et(uEe),tUt=Et(HJ);var Lye;function Kje(){if(Lye)return xR;Lye=1,Object.defineProperty(xR,"__esModule",{value:!0}),xR.fastCheckStrMapInterpreter=void 0;var e=nt,t=bd,n=zje,r=lu,i=S0,a=tUt,o=wd(),u=_a,c=function(){return i.fromFoldable(a.getFirstSemigroup(),n.array)};return xR.fastCheckStrMapInterpreter=e.memo(function(){return{_F:u.FastCheckURI,strMap:function(f,s){return function(l){return r.pipe(f(l).arb,function(d){return new u.FastCheckType(o.fastCheckApplyConfig(s)(t.array(t.tuple(t.string(),d)).map(c()),l,{arb:d}))})}},record:function(f,s,l){return function(d){return function(p,v){return new u.FastCheckType(o.fastCheckApplyConfig(l)(t.array(t.tuple(p,v)).map(c()),d,{domainArb:p,codomainArb:v}))}(f(d).arb,s(d).arb)}}}}),xR}var DR={};const nUt=Et(lCe);var Bye;function Gje(){if(Bye)return DR;Bye=1,Object.defineProperty(DR,"__esModule",{value:!0}),DR.fastCheckSetInterpreter=void 0;var e=nt,t=bd,n=lu,r=nUt,i=wd(),a=_a;return DR.fastCheckSetInterpreter=e.memo(function(){return{_F:a.FastCheckURI,set:function(o,u,c){return function(f){return n.pipe(o(f).arb,function(s){return new a.FastCheckType(i.fastCheckApplyConfig(c)(t.set(s).map(r.fromArray(u)),f,{arb:s}))})}}}}),DR}var LR={},Vye;function Hje(){if(Vye)return LR;Vye=1,Object.defineProperty(LR,"__esModule",{value:!0}),LR.fastCheckUnknownInterpreter=void 0;var e=nt,t=bd,n=lu,r=wd(),i=_a;return LR.fastCheckUnknownInterpreter=e.memo(function(){return{_F:i.FastCheckURI,unknown:function(a){return function(o){return n.pipe(t.anything(),function(u){return new i.FastCheckType(r.fastCheckApplyConfig(a)(u,o,{arb:u}))})}}}}),LR}var BR={},zye;function Jje(){if(zye)return BR;zye=1,Object.defineProperty(BR,"__esModule",{value:!0}),BR.fastCheckNewtypeInterpreter=void 0;var e=nt,t=Ln,n=wd(),r=_a;return BR.fastCheckNewtypeInterpreter=e.memo(function(){return{_F:r.FastCheckURI,newtype:function(){return function(i,a){return function(o){return t.pipe(i(o).arb,function(u){return new r.FastCheckType(n.fastCheckApplyConfig(a)(u,o,{arb:u}))})}}},newtypeIso:function(i,a,o,u){return function(c){return t.pipe(a(c).arb,function(f){return new r.FastCheckType(n.fastCheckApplyConfig(u)(f.map(i.get),c,{arb:f}))})}},newtypePrism:function(i,a,o,u){return function(c){return t.pipe(a(c).arb,function(f){return new r.FastCheckType(n.fastCheckApplyConfig(u)(f.filter(function(s){return i.getOption(s)._tag==="Some"}).map(function(s){return i.getOption(s).value}),c,{arb:f}))})}}}}),BR}var VR={},Kye;function Yje(){if(Kye)return VR;Kye=1,Object.defineProperty(VR,"__esModule",{value:!0}),VR.fastCheckRefinedInterpreter=void 0;var e=nt,t=Ln,n=wd(),r=_a;return VR.fastCheckRefinedInterpreter=e.memo(function(){return{_F:r.FastCheckURI,refined:function(i,a,o,u){return function(c){return t.pipe(i(c).arb,function(f){return new r.FastCheckType(n.fastCheckApplyConfig(u)(f.filter(a),c,{arb:f}))})}},constrained:function(i,a,o,u){return function(c){return t.pipe(i(c).arb,function(f){return new r.FastCheckType(n.fastCheckApplyConfig(u)(i(c).arb.filter(a),c,{arb:f}))})}}}}),VR}var Gye;function rUt(){return Gye||(Gye=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=ea;t.__exportStar(Dje(),e),t.__exportStar(Zje(),e),t.__exportStar(Lje(),e),t.__exportStar(Bje(),e),t.__exportStar(cF,e),t.__exportStar(Vje(),e),t.__exportStar(Kje(),e),t.__exportStar(Gje(),e),t.__exportStar(Hje(),e),t.__exportStar(Jje(),e),t.__exportStar(Yje(),e)}(n7)),n7}var Hye;function wd(){return Hye||(Hye=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.fastCheckApplyConfig=e.FastCheckURI=void 0;var t=ea,n=w0,r=_a;Object.defineProperty(e,"FastCheckURI",{enumerable:!0,get:function(){return r.FastCheckURI}}),t.__exportStar(rUt(),e),e.fastCheckApplyConfig=n.getApplyConfig(r.FastCheckURI)}(t7)),t7}var Jye;function Zje(){if(Jye)return ER;Jye=1,Object.defineProperty(ER,"__esModule",{value:!0}),ER.fastCheckIntersectionInterpreter=void 0;var e=ea,t=nt,n=bd,r=_a,i=wd();return ER.fastCheckIntersectionInterpreter=t.memo(function(){return{_F:r.FastCheckURI,intersection:function(){for(var a=[],o=0;o")}function aUt(e,t){return{key:e,type:t}}function ed(e,t,n,r){for(var i=e.length,a=Array(i+1),o=0;o")}function oUt(e,t,n,r){r===void 0&&(r="{ [K in ".concat(t.name,"]: ").concat(n.name," }"));for(var i=e.length,a={},o=0;o0?kh(o):yr(f?a:r)}return Xye(t)&&Array.isArray(r)?yr(r):Qa(r,i)},e.encode===wn&&t.encode===wn?function(r){return Yye(r,e)}:function(r){for(var i={},a=Object.keys(Yye(r,e)),o=a.length,u=0;u")}function fUt(e){return e.length>0}var Ru={};function rke(e,t){for(var n=[],r=0,i=e;r")),new _ke(t,function(n){return QI.is(n)&&n.every(e.is)},function(n,r){var i=QI.validate(n,r);if(Qe(i))return i;for(var a=i.right,o=a.length,u=a,c=[],f=0;f0?kh(c):yr(u)},e.encode===wn?wn:function(n){return n.map(e.encode)},e)}var wke=function(e){Fn(t,e);function t(n,r,i,a,o){var u=e.call(this,n,r,i,a)||this;return u.props=o,u._tag="InterfaceType",u}return t}(Wn);function TG(e,t){t===void 0&&(t=eke(e));var n=Object.keys(e),r=n.map(function(a){return e[a]}),i=n.length;return new wke(t,function(a){if($c.is(a)){for(var o=0;o0?kh(s):yr(f)},jE(r)?wn:function(a){for(var o=XI({},a),u=0;u0?kh(s):yr(f)},jE(r)?wn:function(a){for(var o=XI({},a),u=0;u0){var r=n[0],i=n[1],a=i.length,o=function(u){for(var c=0;c0?kh(o):yr(OG(r,a))},e.length===0?wn:function(r){return OG(r,e.map(function(i){return i.encode(r)}))},e)}var Eke=function(e){Fn(t,e);function t(n,r,i,a,o){var u=e.call(this,n,r,i,a)||this;return u.types=o,u._tag="TupleType",u}return t}(Wn);function OUt(e,t){t===void 0&&(t="[".concat(e.map(function(r){return r.name}).join(", "),"]"));var n=e.length;return new Eke(t,function(r){return QI.is(r)&&r.length===n&&e.every(function(i,a){return i.is(r[a])})},function(r,i){var a=QI.validate(r,i);if(Qe(a))return a;for(var o=a.right,u=o.length>n?o.slice(0,n):o,c=[],f=0;f0?kh(c):yr(u)},jE(e)?wn:function(r){return e.map(function(i,a){return i.encode(r[a])})},e)}var Tke=function(e){Fn(t,e);function t(n,r,i,a,o){var u=e.call(this,n,r,i,a)||this;return u.type=o,u._tag="ReadonlyType",u}return t}(Wn);function EUt(e,t){return t===void 0&&(t="Readonly<".concat(e.name,">")),new Tke(t,e.is,e.validate,e.encode,e)}var Cke=function(e){Fn(t,e);function t(n,r,i,a,o){var u=e.call(this,n,r,i,a)||this;return u.type=o,u._tag="ReadonlyArrayType",u}return t}(Wn);function TUt(e,t){t===void 0&&(t="ReadonlyArray<".concat(e.name,">"));var n=Ske(e);return new Cke(t,n.is,n.validate,n.encode,e)}var Pke=function(e,t){return Wke(TG(e),t)},Fke=function(e){Fn(t,e);function t(n,r,i,a,o){var u=e.call(this,n,r,i,a)||this;return u.type=o,u._tag="ExactType",u}return t}(Wn);function Wke(e,t){t===void 0&&(t=cUt(e));var n=EG(e);return new Fke(t,e.is,function(r,i){var a=$c.validate(r,i);if(Qe(a))return a;var o=e.validate(r,i);return Qe(o)?o:Qt(Zye(o.right,n))},function(r){return e.encode(Zye(r,n))},e)}var Nke=function(e){Fn(t,e);function t(){var n=e.call(this,"Function",function(r){return typeof r=="function"},function(r,i){return n.is(r)?yr(r):Qa(r,i)},wn)||this;return n._tag="FunctionType",n}return t}(Wn),CUt=new Nke,jke=function(e){Fn(t,e);function t(){var n=e.call(this,"never",function(r){return!1},function(r,i){return Qa(r,i)},function(){throw new Error("cannot encode never")})||this;return n._tag="NeverType",n}return t}(Wn),PUt=new jke,kke=function(e){Fn(t,e);function t(){var n=e.call(this,"any",function(r){return!0},yr,wn)||this;return n._tag="AnyType",n}return t}(Wn),FUt=new kke;function ate(e,t,n){return n===void 0&&(n="(".concat(e.name," | ").concat(Qje(t),")")),new $ke(n,function(r){return e.is(r)&&t(r)},function(r,i){var a=e.validate(r,i);if(Qe(a))return a;var o=a.right;return t(o)?yr(o):Qa(o,i)},e.encode,e,t)}var WUt=ate(tte,Number.isInteger,"Integer"),X2=function(e){Fn(t,e);function t(n,r,i,a,o,u){var c=e.call(this,n,r,i,a,o)||this;return c.tag=u,c}return t}(ite),NUt=function(e,t,n){n===void 0&&(n=nke(t));var r=Rke(t,n);return r instanceof X2?r:(console.warn("[io-ts] Cannot build a tagged union for ".concat(n,", returning a de-optimized union")),new X2(n,r.is,r.validate,r.encode,t,e))},jUt=function(e,t){return{value:e,context:t}},kUt=function(e){return[{key:"",type:e}]},UUt=$c,Uke=function(e){Fn(t,e);function t(){var n=e.call(this,"object",function(r){return r!==null&&typeof r=="object"},function(r,i){return n.is(r)?yr(r):Qa(r,i)},wn)||this;return n._tag="ObjectType",n}return t}(Wn),qUt=new Uke,xUt=Mke,DUt=function(e){Fn(t,e);function t(n,r,i,a,o){var u=e.call(this,n,r,i,a)||this;return u.props=o,u._tag="StrictType",u}return t}(Wn);function LUt(e){return e}function BUt(e){return function(){return e}}const VUt=Object.freeze(Object.defineProperty({__proto__:null,AnyArrayType:mke,AnyDictionaryType:gke,AnyType:kke,Array:QI,ArrayType:_ke,BigIntType:hke,BooleanType:vke,Dictionary:UUt,DictionaryType:rte,ExactType:Fke,Function:CUt,FunctionType:Nke,Int:wUt,Integer:WUt,InterfaceType:wke,IntersectionType:Oke,KeyofType:bke,LiteralType:yke,NeverType:jke,NullType:cke,NumberType:pke,ObjectType:Uke,PartialType:Ake,ReadonlyArrayType:Cke,ReadonlyType:Tke,RecursiveType:nte,RefinementType:$ke,StrictType:DUt,StringType:dke,TaggedUnionType:X2,TupleType:Eke,Type:Wn,UndefinedType:fke,UnionType:ite,UnknownArray:QI,UnknownRecord:$c,UnknownType:lke,VoidType:ske,alias:BUt,any:FUt,appendContext:ed,array:Ske,bigint:$Ut,boolean:IUt,brand:Ike,clean:LUt,dictionary:xUt,emptyTags:Ru,exact:Wke,failure:Qa,failures:kh,getContextEntry:aUt,getDefaultContext:kUt,getDomainKeys:Qee,getFunctionName:Qje,getIndex:uke,getTags:dm,getValidationError:jUt,identity:wn,interface:TG,intersection:RUt,keyof:SUt,literal:_Ut,mergeAll:OG,never:PUt,null:Qye,nullType:Qye,number:tte,object:qUt,partial:MUt,readonly:EUt,readonlyArray:TUt,record:Mke,recursion:AUt,refinement:ate,strict:Pke,string:ete,success:yr,taggedUnion:NUt,tuple:OUt,type:TG,undefined:Z2,union:Rke,unknown:bUt,void:ebe,voidType:ebe},Symbol.toStringTag,{value:"Module"})),eo=Et(VUt);var Sa={};Object.defineProperty(Sa,"__esModule",{value:!0});Sa.IOTSType=Sa.IoTsURI=void 0;var zUt=JC;Sa.IoTsURI="IoTsURI";var KUt=function(){function e(t){var n=this;this.type=t,this.create=function(r){return zUt.map(function(i){return i})(n.type.decode(n.type.encode(r)))}}return e}();Sa.IOTSType=KUt;var i7={},a7={},o7={},c4={},pn={},Fo={},zs={};(function(e){var t=K&&K.__spreadArray||function(A,E,N){if(N||arguments.length===2)for(var U=0,te=E.length,Ie;U0};e.isNonEmpty=l;var d=function(A){return A[0]};e.head=d;var p=function(A){return A.slice(1)};e.tail=p,e.emptyReadonlyArray=[],e.emptyRecord={},e.has=Object.prototype.hasOwnProperty;var v=function(A){return t([A[0]],A.slice(1),!0)};e.fromReadonlyNonEmptyArray=v;var h=function(A){return function(E,N){return function(){for(var U=[],te=0;te"),fE.union([fE.strict({_tag:uqt,left:e},"Left<"+e.name+">"),fE.strict({_tag:cqt,right:t},"Right<"+e.name+">")],n)}s4.either=fqt;var lF={},sqt=K&&K.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),lqt=K&&K.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),dqt=K&&K.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.hasOwnProperty.call(e,n)&&sqt(t,e,n);return lqt(t,e),t};Object.defineProperty(lF,"__esModule",{value:!0});lF.option=void 0;var kE=dqt(eo),pqt=kE.strict({_tag:kE.literal("None")},"None"),hqt=kE.literal("Some");function vqt(e,t){return t===void 0&&(t="Option<"+e.name+">"),kE.union([pqt,kE.strict({_tag:hqt,value:e},"Some<"+e.name+">")],t)}lF.option=vqt;var l4={},cte={},fte={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.and=e.or=e.not=e.Contravariant=e.getMonoidAll=e.getSemigroupAll=e.getMonoidAny=e.getSemigroupAny=e.URI=e.contramap=void 0;var t=Ln,n=function(l,d){return(0,t.pipe)(l,(0,e.contramap)(d))},r=function(l){return function(d){return(0,t.flow)(l,d)}};e.contramap=r,e.URI="Predicate";var i=function(){return{concat:function(l,d){return(0,t.pipe)(l,(0,e.or)(d))}}};e.getSemigroupAny=i;var a=function(){return{concat:(0,e.getSemigroupAny)().concat,empty:t.constFalse}};e.getMonoidAny=a;var o=function(){return{concat:function(l,d){return(0,t.pipe)(l,(0,e.and)(d))}}};e.getSemigroupAll=o;var u=function(){return{concat:(0,e.getSemigroupAll)().concat,empty:t.constTrue}};e.getMonoidAll=u,e.Contravariant={URI:e.URI,contramap:n};var c=function(l){return function(d){return!l(d)}};e.not=c;var f=function(l){return function(d){return function(p){return d(p)||l(p)}}};e.or=f;var s=function(l){return function(d){return function(p){return d(p)&&l(p)}}};e.and=s})(fte);var ste={},cf={};Object.defineProperty(cf,"__esModule",{value:!0});cf.concatAll=cf.endo=cf.filterSecond=cf.filterFirst=cf.reverse=void 0;var mqt=function(e){return{concat:function(t,n){return e.concat(n,t)}}};cf.reverse=mqt;var gqt=function(e){return function(t){return{concat:function(n,r){return e(n)?t.concat(n,r):r}}}};cf.filterFirst=gqt;var yqt=function(e){return function(t){return{concat:function(n,r){return e(r)?t.concat(n,r):n}}}};cf.filterSecond=yqt;var bqt=function(e){return function(t){return{concat:function(n,r){return t.concat(e(n),e(r))}}}};cf.endo=bqt;var $qt=function(e){return function(t){return function(n){return n.reduce(function(r,i){return e.concat(r,i)},t)}}};cf.concatAll=$qt;var dF={},pF={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.eqDate=e.eqNumber=e.eqString=e.eqBoolean=e.eq=e.strictEqual=e.getStructEq=e.getTupleEq=e.Contravariant=e.getMonoid=e.getSemigroup=e.eqStrict=e.URI=e.contramap=e.tuple=e.struct=e.fromEquals=void 0;var t=Ln,n=function(s){return{equals:function(l,d){return l===d||s(l,d)}}};e.fromEquals=n;var r=function(s){return(0,e.fromEquals)(function(l,d){for(var p in s)if(!s[p].equals(l[p],d[p]))return!1;return!0})};e.struct=r;var i=function(){for(var s=[],l=0;l-1?A:E}};e.max=b;var y=function(I){var A=(0,e.min)(I),E=(0,e.max)(I);return function(N,U){return function(te){return E(A(te,U),N)}}};e.clamp=y;var m=function(I){var A=(0,e.lt)(I),E=(0,e.gt)(I);return function(N,U){return function(te){return!(A(te,N)||E(te,U))}}};e.between=m,e.getTupleOrd=e.tuple,e.getDualOrd=e.reverse,e.ord=e.Contravariant;function g(I,A){return IA?1:0}var _={equals:t.eqStrict.equals,compare:g};e.ordBoolean=_,e.ordString=_,e.ordNumber=_,e.ordDate=(0,n.pipe)(e.ordNumber,(0,e.contramap)(function(I){return I.valueOf()}))})(dF);(function(e){var t=K&&K.__createBinding||(Object.create?function(y,m,g,_){_===void 0&&(_=g);var I=Object.getOwnPropertyDescriptor(m,g);(!I||("get"in I?!m.__esModule:I.writable||I.configurable))&&(I={enumerable:!0,get:function(){return m[g]}}),Object.defineProperty(y,_,I)}:function(y,m,g,_){_===void 0&&(_=g),y[_]=m[g]}),n=K&&K.__setModuleDefault||(Object.create?function(y,m){Object.defineProperty(y,"default",{enumerable:!0,value:m})}:function(y,m){y.default=m}),r=K&&K.__importStar||function(y){if(y&&y.__esModule)return y;var m={};if(y!=null)for(var g in y)g!=="default"&&Object.prototype.hasOwnProperty.call(y,g)&&t(m,y,g);return n(m,y),m};Object.defineProperty(e,"__esModule",{value:!0}),e.semigroupProduct=e.semigroupSum=e.semigroupString=e.getFunctionSemigroup=e.semigroupAny=e.semigroupAll=e.getIntercalateSemigroup=e.getMeetSemigroup=e.getJoinSemigroup=e.getDualSemigroup=e.getStructSemigroup=e.getTupleSemigroup=e.getFirstSemigroup=e.getLastSemigroup=e.getObjectSemigroup=e.semigroupVoid=e.concatAll=e.last=e.first=e.intercalate=e.tuple=e.struct=e.reverse=e.constant=e.max=e.min=void 0,e.fold=b;var i=Ln,a=r(zs),o=r(cf),u=r(dF),c=function(y){return{concat:u.min(y)}};e.min=c;var f=function(y){return{concat:u.max(y)}};e.max=f;var s=function(y){return{concat:function(){return y}}};e.constant=s,e.reverse=o.reverse;var l=function(y){return{concat:function(m,g){var _={};for(var I in y)a.has.call(y,I)&&(_[I]=y[I].concat(m[I],g[I]));return _}}};e.struct=l;var d=function(){for(var y=[],m=0;m"),new ibe.Type(t,Aqt.option(e).is,function(n,r){return n==null?ibe.success(lU.none):rbe.pipe(e.validate(n,r),wqt.map(lU.some))},function(n){return lU.toNullable(rbe.pipe(n,lU.map(e.encode)))})}l4.optionFromNullable=Mqt;var d4={},p4={},lte={},dte={};(function(e){var t=K&&K.__createBinding||(Object.create?function(P,W,B,X){X===void 0&&(X=B);var Te=Object.getOwnPropertyDescriptor(W,B);(!Te||("get"in Te?!W.__esModule:Te.writable||Te.configurable))&&(Te={enumerable:!0,get:function(){return W[B]}}),Object.defineProperty(P,X,Te)}:function(P,W,B,X){X===void 0&&(X=B),P[X]=W[B]}),n=K&&K.__setModuleDefault||(Object.create?function(P,W){Object.defineProperty(P,"default",{enumerable:!0,value:W})}:function(P,W){P.default=W}),r=K&&K.__importStar||function(P){if(P&&P.__esModule)return P;var W={};if(P!=null)for(var B in P)B!=="default"&&Object.prototype.hasOwnProperty.call(P,B)&&t(W,P,B);return n(W,P),W},i=K&&K.__spreadArray||function(P,W,B){if(B||arguments.length===2)for(var X=0,Te=W.length,De;X=W.length};e.isOutOfBound=p;var v=function(P){return function(W){return i([P],W,!0)}};e.prependW=v,e.prepend=e.prependW;var h=function(P){return function(W){return i(i([],W,!0),[P],!1)}};e.appendW=h,e.append=e.appendW;var $=function(P,W,B){if((0,e.isNonEmpty)(B)){var X=s.fromReadonlyNonEmptyArray(B);return X.splice(P,0,W),X}return[W]};e.unsafeInsertAt=$;var b=function(P,W,B){if(B[P]===W)return B;var X=s.fromReadonlyNonEmptyArray(B);return X[P]=W,X};e.unsafeUpdateAt=b;var y=function(P){return function(W){if(W.length===1)return W;for(var B=[(0,e.head)(W)],X=(0,e.tail)(W),Te=function($i){B.every(function(Li){return!P.equals(Li,$i)})&&B.push($i)},De=0,bt=X;De=W.length?[W,e.empty]:[(0,c.pipe)(W.slice(1,B),(0,e.prepend)((0,e.head)(W))),W.slice(B)]}};e.splitAt=me;var ye=function(P){return(0,e.chop)((0,e.splitAt)(P))};e.chunksOf=ye;var We=function(P,W){return(0,c.pipe)(P,(0,e.map)(W))},Ke=function(P,W){return(0,c.pipe)(P,(0,e.mapWithIndex)(W))},Ne=function(P,W){return(0,c.pipe)(P,(0,e.ap)(W))},ct=function(P,W){return(0,c.pipe)(P,(0,e.extend)(W))},$t=function(P,W,B){return(0,c.pipe)(P,(0,e.reduce)(W,B))},yt=function(P){var W=(0,e.foldMap)(P);return function(B,X){return(0,c.pipe)(B,W(X))}},Mt=function(P,W,B){return(0,c.pipe)(P,(0,e.reduceRight)(W,B))},Ut=function(P){var W=(0,e.traverse)(P);return function(B,X){return(0,c.pipe)(B,W(X))}},fn=function(P,W){return(0,c.pipe)(P,(0,e.alt)(W))},sn=function(P,W,B){return(0,c.pipe)(P,(0,e.reduceWithIndex)(W,B))},Vt=function(P){var W=(0,e.foldMapWithIndex)(P);return function(B,X){return(0,c.pipe)(B,W(X))}},Yt=function(P,W,B){return(0,c.pipe)(P,(0,e.reduceRightWithIndex)(W,B))},ln=function(P){var W=(0,e.traverseWithIndex)(P);return function(B,X){return(0,c.pipe)(B,W(X))}};e.of=s.singleton;var yn=function(P){return function(W){return(0,c.pipe)(W,je(P()))}};e.altW=yn,e.alt=e.altW;var Zn=function(P){return(0,e.flatMap)(function(W){return(0,c.pipe)(P,(0,e.map)(W))})};e.ap=Zn,e.flatMap=(0,c.dual)(2,function(P,W){return(0,c.pipe)(P,(0,e.chainWithIndex)(function(B,X){return W(X,B)}))});var Xn=function(P){return function(W){for(var B=(0,e.tail)(W),X=[P(W)];(0,e.isNonEmpty)(B);)X.push(P(B)),B=(0,e.tail)(B);return X}};e.extend=Xn,e.duplicate=(0,e.extend)(c.identity),e.flatten=(0,e.flatMap)(c.identity);var Qn=function(P){return(0,e.mapWithIndex)(function(W,B){return P(B)})};e.map=Qn;var dn=function(P){return function(W){for(var B=[P(0,(0,e.head)(W))],X=1;XB.length?s.none:s.some((0,e.unsafeInsertAt)(P,W,B))}};e.insertAt=bi,e.prependToAll=e.prependAll,e.fold=e.concatAll,e.readonlyNonEmptyArray={URI:e.URI,of:e.of,map:We,mapWithIndex:Ke,ap:Ne,chain:e.flatMap,extend:ct,extract:e.extract,reduce:$t,foldMap:yt,reduceRight:Mt,traverse:Ut,sequence:e.sequence,reduceWithIndex:sn,foldMapWithIndex:Vt,reduceRightWithIndex:Yt,traverseWithIndex:ln,alt:fn}})(dte);(function(e){var t=K&&K.__createBinding||(Object.create?function(F,j,z,ne){ne===void 0&&(ne=z);var Ue=Object.getOwnPropertyDescriptor(j,z);(!Ue||("get"in Ue?!j.__esModule:Ue.writable||Ue.configurable))&&(Ue={enumerable:!0,get:function(){return j[z]}}),Object.defineProperty(F,ne,Ue)}:function(F,j,z,ne){ne===void 0&&(ne=z),F[ne]=j[z]}),n=K&&K.__setModuleDefault||(Object.create?function(F,j){Object.defineProperty(F,"default",{enumerable:!0,value:j})}:function(F,j){F.default=j}),r=K&&K.__importStar||function(F){if(F&&F.__esModule)return F;var j={};if(F!=null)for(var z in F)z!=="default"&&Object.prototype.hasOwnProperty.call(F,z)&&t(j,F,z);return n(j,F),j},i=K&&K.__spreadArray||function(F,j,z){if(z||arguments.length===2)for(var ne=0,Ue=j.length,Be;ne0};e.isNonEmpty=d;var p=function(F,j){return F<0||F>=j.length};e.isOutOfBound=p;var v=function(F){return function(j){return i([F],j,!0)}};e.prependW=v,e.prepend=e.prependW;var h=function(F){return function(j){return i(i([],j,!0),[F],!1)}};e.appendW=h,e.append=e.appendW;var $=function(F,j,z){if((0,e.isNonEmpty)(z)){var ne=(0,e.fromReadonlyNonEmptyArray)(z);return ne.splice(F,0,j),ne}return[j]};e.unsafeInsertAt=$;var b=function(F,j,z){var ne=(0,e.fromReadonlyNonEmptyArray)(z);return ne[F]=j,ne};e.unsafeUpdateAt=b;var y=function(F){return function(j){if(j.length===1)return(0,e.copy)(j);for(var z=[(0,e.head)(j)],ne=(0,e.tail)(j),Ue=function(xn){z.every(function(nr){return!F.equals(nr,xn)})&&z.push(xn)},Be=0,ht=ne;Bez.length?f.none:f.some((0,e.unsafeInsertAt)(F,j,z))}};e.insertAt=he;var _e=function(F,j){return(0,e.modifyAt)(F,function(){return j})};e.updateAt=_e;var Z=function(F,j){return function(z){return(0,e.isOutOfBound)(F,z)?f.none:f.some((0,e.unsafeUpdateAt)(F,j(z[F]),z))}};e.modifyAt=Z,e.copy=e.fromReadonlyNonEmptyArray;var ve=function(F){return[F]};e.of=ve;var Ee=function(F,j,z){for(var ne=[z(F[0],j[0])],Ue=Math.min(F.length,j.length),Be=1;Be=j.length?[(0,e.copy)(j),[]]:[(0,u.pipe)(j.slice(1,z),(0,e.prepend)((0,e.head)(j))),j.slice(z)]}};e.splitAt=ye;var We=function(F){return(0,e.chop)((0,e.splitAt)(F))};e.chunksOf=We;var Ke=function(F,j){return(0,u.pipe)(F,(0,e.map)(j))},Ne=function(F,j){return(0,u.pipe)(F,(0,e.mapWithIndex)(j))},ct=function(F,j){return(0,u.pipe)(F,(0,e.ap)(j))},$t=function(F,j){return(0,u.pipe)(F,(0,e.extend)(j))},yt=function(F,j,z){return(0,u.pipe)(F,(0,e.reduce)(j,z))},Mt=function(F){var j=(0,e.foldMap)(F);return function(z,ne){return(0,u.pipe)(z,j(ne))}},Ut=function(F,j,z){return(0,u.pipe)(F,(0,e.reduceRight)(j,z))},fn=function(F){var j=(0,e.traverse)(F);return function(z,ne){return(0,u.pipe)(z,j(ne))}},sn=function(F,j){return(0,u.pipe)(F,(0,e.alt)(j))},Vt=function(F,j,z){return(0,u.pipe)(F,(0,e.reduceWithIndex)(j,z))},Yt=function(F){var j=(0,e.foldMapWithIndex)(F);return function(z,ne){return(0,u.pipe)(z,j(ne))}},ln=function(F,j,z){return(0,u.pipe)(F,(0,e.reduceRightWithIndex)(j,z))},yn=function(F){var j=(0,e.traverseWithIndex)(F);return function(z,ne){return(0,u.pipe)(z,j(ne))}},Zn=function(F){return function(j){return(0,u.pipe)(j,Ie(F()))}};e.altW=Zn,e.alt=e.altW;var Xn=function(F){return(0,e.flatMap)(function(j){return(0,u.pipe)(F,(0,e.map)(j))})};e.ap=Xn,e.flatMap=(0,u.dual)(2,function(F,j){return(0,u.pipe)(F,(0,e.chainWithIndex)(function(z,ne){return j(ne,z)}))});var Qn=function(F){return function(j){for(var z=(0,e.tail)(j),ne=[F(j)];(0,e.isNonEmpty)(z);)ne.push(F(z)),z=(0,e.tail)(z);return ne}};e.extend=Qn,e.duplicate=(0,e.extend)(u.identity),e.flatten=(0,e.flatMap)(u.identity);var dn=function(F){return(0,e.mapWithIndex)(function(j,z){return F(z)})};e.map=dn;var zt=function(F){return function(j){for(var z=[F(0,(0,e.head)(j))],ne=1;ner?1:0}},e.Bounded={equals:e.Eq.equals,compare:e.Ord.compare,top:1/0,bottom:-1/0},e.Show={show:function(n){return JSON.stringify(n)}},e.MagmaSub={concat:function(n,r){return n-r}},e.SemigroupSum={concat:function(n,r){return n+r}},e.SemigroupProduct={concat:function(n,r){return n*r}},e.MonoidSum={concat:e.SemigroupSum.concat,empty:0},e.MonoidProduct={concat:e.SemigroupProduct.concat,empty:1},e.Field={add:e.SemigroupSum.concat,zero:0,mul:e.SemigroupProduct.concat,one:1,sub:e.MagmaSub.concat,degree:function(n){return 1},div:function(n,r){return n/r},mod:function(n,r){return n%r}}})(IUe);(function(e){var t=K&&K.__createBinding||(Object.create?function(S,w,T,L){L===void 0&&(L=T);var de=Object.getOwnPropertyDescriptor(w,T);(!de||("get"in de?!w.__esModule:de.writable||de.configurable))&&(de={enumerable:!0,get:function(){return w[T]}}),Object.defineProperty(S,L,de)}:function(S,w,T,L){L===void 0&&(L=T),S[L]=w[T]}),n=K&&K.__setModuleDefault||(Object.create?function(S,w){Object.defineProperty(S,"default",{enumerable:!0,value:w})}:function(S,w){S.default=w}),r=K&&K.__importStar||function(S){if(S&&S.__esModule)return S;var w={};if(S!=null)for(var T in S)T!=="default"&&Object.prototype.hasOwnProperty.call(S,T)&&t(w,S,T);return n(w,S),w},i=K&&K.__spreadArray||function(S,w,T){if(T||arguments.length===2)for(var L=0,de=w.length,ge;L=0;ge--)de[ge]=w(T[ge],de[ge+1]);return de}};e.scanRight=je;var J=function(S){return S.length};e.size=J,e.isOutOfBound=v.isOutOfBound;function ee(S,w){return w===void 0?function(T){return ee(S,T)}:(0,e.isOutOfBound)(S,w)?l.none:l.some(w[S])}var fe=function(S){return(0,e.isNonEmpty)(S)?l.some(v.head(S)):l.none};e.head=fe;var ae=function(S){return(0,e.isNonEmpty)(S)?l.some(v.last(S)):l.none};e.last=ae;var he=function(S){return(0,e.isNonEmpty)(S)?l.some(v.tail(S)):l.none};e.tail=he;var _e=function(S){return(0,e.isNonEmpty)(S)?l.some(v.init(S)):l.none};e.init=_e;var Z=function(S){return function(w){return(0,e.isOutOfBound)(S,w)?w:S===0?e.empty:w.slice(0,S)}};e.takeLeft=Z;var ve=function(S){return function(w){return(0,e.isOutOfBound)(S,w)?w:S===0?e.empty:w.slice(-S)}};e.takeRight=ve;function Ee(S){return function(w){for(var T=[],L=0,de=w;L=w.length?e.empty:w.slice(S,w.length)}};e.dropLeft=oe;var ie=function(S){return function(w){return S<=0||(0,e.isEmpty)(w)?w:S>=w.length?e.empty:w.slice(0,w.length-S)}};e.dropRight=ie;function le(S){return function(w){var T=H(w,S);return T===0?w:T===w.length?e.empty:w.slice(T)}}var me=function(S){return function(w){for(var T=0;T=0;T--)if(S(w[T]))return l.some(w[T]);return l.none}}var Ne=function(S){return function(w){for(var T=w.length-1;T>=0;T--){var L=S(w[T]);if(l.isSome(L))return L}return l.none}};e.findLastMap=Ne;var ct=function(S){return function(w){for(var T=w.length-1;T>=0;T--)if(S(w[T]))return l.some(T);return l.none}};e.findLastIndex=ct;var $t=function(S,w){return function(T){return S<0||S>T.length?l.none:l.some(v.unsafeInsertAt(S,w,T))}};e.insertAt=$t;var yt=function(S,w){return(0,e.modifyAt)(S,function(){return w})};e.updateAt=yt;var Mt=function(S){return function(w){return(0,e.isOutOfBound)(S,w)?l.none:l.some((0,e.unsafeDeleteAt)(S,w))}};e.deleteAt=Mt;var Ut=function(S,w){return function(T){return(0,e.isOutOfBound)(S,T)?l.none:l.some((0,e.unsafeUpdateAt)(S,w(T[S]),T))}};e.modifyAt=Ut;var fn=function(S){return S.length<=1?S:S.slice().reverse()};e.reverse=fn;var sn=function(S){for(var w=[],T=0;T=1&&(0,e.isNonEmpty)(w)?v.splitAt(S)(w):(0,e.isEmpty)(w)?[w,e.empty]:[e.empty,w]}};e.splitAt=q;var G=function(S){var w=v.chunksOf(S);return function(T){return(0,e.isNonEmpty)(T)?w(T):e.empty}};e.chunksOf=G;var xe=function(S){return function(){for(var w=[],T=0;T0;){var de=T.shift();l.isLeft(de)?T.unshift.apply(T,S(de.left)):L.push(de.right)}return L}};e.chainRecDepthFirst=d8,e.ChainRecDepthFirst={URI:e.URI,map:ke,ap:Rt,chain:e.flatMap,chainRec:e._chainRecDepthFirst};var p8=function(S){return function(w){var T=S(w),L=[],de=[];function ge(wy){l.isLeft(wy)?S(wy.left).forEach(function(S8){return L.push(S8)}):de.push(wy.right)}for(var Ot=0,Go=T;Ot0;)ge(L.shift());return de}};e.chainRecBreadthFirst=p8,e.ChainRecBreadthFirst={URI:e.URI,map:ke,ap:Rt,chain:e.flatMap,chainRec:e._chainRecBreadthFirst};var _y=(0,$.witherDefault)(e.Traversable,e.Compactable),Sy=(0,$.wiltDefault)(e.Traversable,e.Compactable);e.Witherable={URI:e.URI,map:ke,compact:e.compact,separate:e.separate,filter:kn,filterMap:Un,partition:qn,partitionMap:er,reduce:j,foldMap:z,reduceRight:ne,traverse:bi,sequence:e.sequence,wither:_y,wilt:Sy},e.filterE=(0,$.filterE)(e.Witherable),e.FromEither={URI:e.URI,fromEither:e.fromEither},e.fromEitherK=(0,c.fromEitherK)(e.FromEither),e.unsafeInsertAt=v.unsafeInsertAt;var h8=function(S,w,T){return(0,e.isNonEmpty)(T)?v.unsafeUpdateAt(S,w,T):T};e.unsafeUpdateAt=h8;var v8=function(S,w){var T=w.slice();return T.splice(S,1),T};e.unsafeDeleteAt=v8;var m8=function(S){return S.slice()};e.toArray=m8;var g8=function(S){return(0,e.isEmpty)(S)?e.empty:S.slice()};e.fromArray=g8,e.empty=v.empty;function y8(S){return function(w){return w.every(S)}}var b8=function(S){return function(w){return w.some(S)}};e.some=b8,e.exists=e.some;var $8=function(S){var w=v.intercalate(S);return function(T){return(0,e.match)(function(){return S.empty},w(T))}};e.intercalate=$8,e.Do=(0,e.of)(l.emptyRecord),e.bindTo=(0,s.bindTo)(e.Functor);var I8=(0,s.let)(e.Functor);e.let=I8,e.bind=(0,o.bind)(e.Chain),e.apS=(0,a.apS)(e.Apply),e.chain=e.flatMap,e.range=v.range,e.cons=v.cons,e.snoc=v.snoc,e.prependToAll=e.prependAll,e.readonlyArray={URI:e.URI,compact:e.compact,separate:e.separate,map:ke,ap:Rt,of:e.of,chain:e.flatMap,filter:kn,filterMap:Un,partition:qn,partitionMap:er,mapWithIndex:Tt,partitionMapWithIndex:tr,partitionWithIndex:Ur,filterMapWithIndex:At,filterWithIndex:xn,alt:F,zero:e.zero,unfold:e.unfold,reduce:j,foldMap:z,reduceRight:ne,traverse:bi,sequence:e.sequence,reduceWithIndex:Ue,foldMapWithIndex:Be,reduceRightWithIndex:ht,traverseWithIndex:P,extend:nr,wither:_y,wilt:Sy}})($Ue);(function(e){var t=K&&K.__createBinding||(Object.create?function(O,C,k,Q){Q===void 0&&(Q=k);var Me=Object.getOwnPropertyDescriptor(C,k);(!Me||("get"in Me?!C.__esModule:Me.writable||Me.configurable))&&(Me={enumerable:!0,get:function(){return C[k]}}),Object.defineProperty(O,Q,Me)}:function(O,C,k,Q){Q===void 0&&(Q=k),O[Q]=C[k]}),n=K&&K.__setModuleDefault||(Object.create?function(O,C){Object.defineProperty(O,"default",{enumerable:!0,value:C})}:function(O,C){O.default=C}),r=K&&K.__importStar||function(O){if(O&&O.__esModule)return O;var C={};if(O!=null)for(var k in O)k!=="default"&&Object.prototype.hasOwnProperty.call(O,k)&&t(C,O,k);return n(C,O),C};Object.defineProperty(e,"__esModule",{value:!0}),e.rotate=e.intersperse=e.prependAll=e.unzip=e.zipWith=e.sort=e.lefts=e.rights=e.reverse=e.modifyAt=e.deleteAt=e.updateAt=e.insertAt=e.copy=e.findLastIndex=e.findLastMap=e.findFirstMap=e.findIndex=e.dropRight=e.dropLeft=e.takeRight=e.takeLeft=e.init=e.tail=e.last=e.head=e.lookup=e.isOutOfBound=e.size=e.scanRight=e.scanLeft=e.chainWithIndex=e.foldRight=e.matchRight=e.matchRightW=e.foldLeft=e.matchLeft=e.matchLeftW=e.match=e.matchW=e.fromEither=e.fromOption=e.replicate=e.makeBy=e.appendW=e.append=e.prependW=e.prepend=e.isNonEmpty=e.isEmpty=void 0,e.getUnionMonoid=e.getUnionSemigroup=e.getOrd=e.getEq=e.getMonoid=e.getSemigroup=e.getShow=e.URI=e.unfold=e.wilt=e.wither=e.traverseWithIndex=e.sequence=e.traverse=e.reduceRightWithIndex=e.reduceRight=e.reduceWithIndex=e.reduce=e.foldMapWithIndex=e.foldMap=e.duplicate=e.extend=e.filterWithIndex=e.alt=e.altW=e.partitionMapWithIndex=e.partitionMap=e.partitionWithIndex=e.partition=e.filter=e.separate=e.compact=e.filterMap=e.filterMapWithIndex=e.mapWithIndex=e.flatten=e.flatMap=e.ap=e.map=e.zero=e.of=e.concat=e.concatW=e.fromOptionK=e.chunksOf=e.splitAt=e.chop=e.sortBy=e.uniq=e.elem=void 0,e.cons=e.empty=e.range=e.chain=e.apS=e.bind=e.let=e.bindTo=e.Do=e.intercalate=e.exists=e.some=e.every=e.unsafeDeleteAt=e.unsafeUpdateAt=e.unsafeInsertAt=e.fromEitherK=e.FromEither=e.filterE=e.ChainRecBreadthFirst=e.chainRecBreadthFirst=e.ChainRecDepthFirst=e.chainRecDepthFirst=e.Witherable=e.TraversableWithIndex=e.Traversable=e.FoldableWithIndex=e.Foldable=e.FilterableWithIndex=e.Filterable=e.Compactable=e.Extend=e.Alternative=e.guard=e.Zero=e.Alt=e.Unfoldable=e.Monad=e.chainFirst=e.Chain=e.Applicative=e.apSecond=e.apFirst=e.Apply=e.FunctorWithIndex=e.Pointed=e.flap=e.Functor=e.getDifferenceMagma=e.getIntersectionSemigroup=void 0,e.array=e.prependToAll=e.snoc=void 0,e.fromPredicate=y,e.takeLeftWhile=fe,e.spanLeft=he,e.dropLeftWhile=ve,e.findFirst=Ee,e.findLast=H,e.zip=$t,e.comprehension=Xn,e.union=dn,e.intersection=zt,e.difference=bn;var i=Fo,a=Tf,o=Gu,u=Ln,c=Wo,f=r(zs),s=r(lte),l=r($Ue),d=F0,p=_g,v=hF,h=function(O){return O.length===0};e.isEmpty=h,e.isNonEmpty=s.isNonEmpty,e.prepend=s.prepend,e.prependW=s.prependW,e.append=s.append,e.appendW=s.appendW;var $=function(O,C){return O<=0?[]:s.makeBy(C)(O)};e.makeBy=$;var b=function(O,C){return(0,e.makeBy)(O,function(){return C})};e.replicate=b;function y(O){return function(C){return O(C)?[C]:[]}}var m=function(O){return f.isNone(O)?[]:[O.value]};e.fromOption=m;var g=function(O){return f.isLeft(O)?[]:[O.right]};e.fromEither=g;var _=function(O,C){return function(k){return(0,e.isNonEmpty)(k)?C(k):O()}};e.matchW=_,e.match=e.matchW;var I=function(O,C){return function(k){return(0,e.isNonEmpty)(k)?C(s.head(k),s.tail(k)):O()}};e.matchLeftW=I,e.matchLeft=e.matchLeftW,e.foldLeft=e.matchLeft;var A=function(O,C){return function(k){return(0,e.isNonEmpty)(k)?C(s.init(k),s.last(k)):O()}};e.matchRightW=A,e.matchRight=e.matchRightW,e.foldRight=e.matchRight;var E=function(O){return function(C){for(var k=[],Q=0;Q=0;Ce--)Me[Ce]=C(k[Ce],Me[Ce+1]);return Me}};e.scanRight=U;var te=function(O){return O.length};e.size=te,e.isOutOfBound=s.isOutOfBound,e.lookup=l.lookup,e.head=l.head,e.last=l.last;var Ie=function(O){return(0,e.isNonEmpty)(O)?f.some(s.tail(O)):f.none};e.tail=Ie;var je=function(O){return(0,e.isNonEmpty)(O)?f.some(s.init(O)):f.none};e.init=je;var J=function(O){return function(C){return(0,e.isOutOfBound)(O,C)?(0,e.copy)(C):C.slice(0,O)}};e.takeLeft=J;var ee=function(O){return function(C){return(0,e.isOutOfBound)(O,C)?(0,e.copy)(C):O===0?[]:C.slice(-O)}};e.takeRight=ee;function fe(O){return function(C){for(var k=[],Q=0,Me=C;Q=C.length?[]:C.slice(O,C.length)}};e.dropLeft=_e;var Z=function(O){return function(C){return O<=0||(0,e.isEmpty)(C)?(0,e.copy)(C):O>=C.length?[]:C.slice(0,C.length-O)}};e.dropRight=Z;function ve(O){return function(C){return C.slice(ae(C,O))}}e.findIndex=l.findIndex;function Ee(O){return l.findFirst(O)}e.findFirstMap=l.findFirstMap;function H(O){return l.findLast(O)}e.findLastMap=l.findLastMap,e.findLastIndex=l.findLastIndex;var re=function(O){return O.slice()};e.copy=re;var oe=function(O,C){return function(k){return O<0||O>k.length?f.none:f.some((0,e.unsafeInsertAt)(O,C,k))}};e.insertAt=oe;var ie=function(O,C){return(0,e.modifyAt)(O,function(){return C})};e.updateAt=ie;var le=function(O){return function(C){return(0,e.isOutOfBound)(O,C)?f.none:f.some((0,e.unsafeDeleteAt)(O,C))}};e.deleteAt=le;var me=function(O,C){return function(k){return(0,e.isOutOfBound)(O,k)?f.none:f.some((0,e.unsafeUpdateAt)(O,C(k[O]),k))}};e.modifyAt=me;var ye=function(O){return(0,e.isEmpty)(O)?[]:O.slice().reverse()};e.reverse=ye;var We=function(O){for(var C=[],k=0;k=1&&(0,e.isNonEmpty)(C)?s.splitAt(O)(C):(0,e.isEmpty)(C)?[(0,e.copy)(C),[]]:[[],(0,e.copy)(C)]}};e.splitAt=ln;var yn=function(O){var C=s.chunksOf(O);return function(k){return(0,e.isNonEmpty)(k)?C(k):[]}};e.chunksOf=yn;var Zn=function(O){return function(){for(var C=[],k=0;k");var n=dU.array(e);return new dU.Type(t,function(r){return n.is(r)&&Tqt.isNonEmpty(r)},function(r,i){return Cqt.pipe(n.validate(r,i),Pqt.chain(function(a){var o=abe.fromArray(a);return Fqt.isNone(o)?dU.failure(r,i):dU.success(o.value)}))},abe.map(e.encode))}p4.nonEmptyArray=Wqt;Object.defineProperty(d4,"__esModule",{value:!0});d4.readonlyNonEmptyArray=void 0;var Nqt=p4;function jqt(e,t){return t===void 0&&(t="ReadonlyNonEmptyArray<"+e.name+">"),Nqt.nonEmptyArray(e,t)}d4.readonlyNonEmptyArray=jqt;var h4={},kqt=K&&K.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),Uqt=K&&K.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),qqt=K&&K.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.hasOwnProperty.call(e,n)&&kqt(t,e,n);return Uqt(t,e),t};Object.defineProperty(h4,"__esModule",{value:!0});h4.UUID=void 0;var obe=qqt(eo),xqt=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;h4.UUID=obe.brand(obe.string,function(e){return xqt.test(e)},"UUID");var ube;function _Ue(){return ube||(ube=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ioTsPrimitiveInterpreter=e.BigIntString=void 0;var t=nt,n=JC,r=Ln,i=eo,a=c4,o=s4,u=lF,c=l4,f=d4,s=h4,l=Wd(),d=Sa;e.BigIntString=new i.Type("BigIntString",function(v){return v!=null&&typeof v=="bigint"},function(v,h){return n.either.chain(i.string.validate(v,h),function($){try{var b=BigInt($);return i.success(b)}catch{return i.failure(v,h)}})},function(v){return v.toString(10)});var p=function(v){return new i.Type(v,function(h){return h===v},function(h,$){return i.success(v)},function(h){})};e.ioTsPrimitiveInterpreter=t.memo(function(){return{_F:d.IoTsURI,date:function(v){return function(h){return new d.IOTSType(l.iotsApplyConfig(v)(a.DateFromISOString,h,{}))}},boolean:function(v){return function(h){return new d.IOTSType(l.iotsApplyConfig(v)(i.boolean,h,{}))}},string:function(v){return function(h){return new d.IOTSType(l.iotsApplyConfig(v)(i.string,h,{}))}},number:function(v){return function(h){return new d.IOTSType(l.iotsApplyConfig(v)(i.number,h,{}))}},bigint:function(v){return function(h){return new d.IOTSType(l.iotsApplyConfig(v)(e.BigIntString,h,{}))}},stringLiteral:function(v,h){return function($){return new d.IOTSType(l.iotsApplyConfig(h)(i.literal(v,v),$,{}))}},numberLiteral:function(v,h){return function($){return new d.IOTSType(l.iotsApplyConfig(h)(i.literal(v,""+v),$,{}))}},oneOfLiterals:function(v,h){return function($){return new d.IOTSType(l.iotsApplyConfig(h)(i.union(v.map(function(b){return i.literal(b)})),$,{}))}},tag:function(v,h){return function($){return new d.IOTSType(l.iotsApplyConfig(h)(p(v),$,{}))}},keysOf:function(v,h){return function($){return new d.IOTSType(l.iotsApplyConfig(h)(i.keyof(v),$,{}))}},nullable:function(v,h){return function($){return r.pipe(v($).type,function(b){return new d.IOTSType(l.iotsApplyConfig(h)(c.optionFromNullable(b),$,{type:b}))})}},optional:function(v,h){return function($){return r.pipe(v($).type,function(b){return new d.IOTSType(l.iotsApplyConfig(h)(i.union([b,i.undefined]),$,{type:b}))})}},mutable:function(v,h){return function($){return r.pipe(v($).type,function(b){return new d.IOTSType(l.iotsApplyConfig(h)(b,$,{type:b}))})}},array:function(v,h){return function($){return r.pipe(v($).type,function(b){return new d.IOTSType(l.iotsApplyConfig(h)(i.readonlyArray(b),$,{type:b}))})}},nonEmptyArray:function(v,h){return function($){return r.pipe(v($).type,function(b){return new d.IOTSType(l.iotsApplyConfig(h)(f.readonlyNonEmptyArray(b),$,{type:b}))})}},uuid:function(v){return function(h){return new d.IOTSType(l.iotsApplyConfig(v)(s.UUID,h,{}))}},either:function(v,h,$){return function(b){return function(y,m){return new d.IOTSType(l.iotsApplyConfig($)(o.either(y,m),b,{left:y,right:m}))}(v(b).type,h(b).type)}},option:function(v,h){return function($){return r.pipe(v($).type,function(b){return new d.IOTSType(l.iotsApplyConfig(h)(u.option(b),$,{type:b}))})}},unknownE:function(v,h){return function($){return new d.IOTSType(l.iotsApplyConfig(h)(v($).type,$,{}))}}}})}(o7)),o7}var Cy={},cbe;function SUe(){if(cbe)return Cy;cbe=1,Object.defineProperty(Cy,"__esModule",{value:!0}),Cy.ioTsStrictObjectInterpreter=Cy.ioTsNonStrictObjectInterpreter=void 0;var e=nt,t=eo,n=Wd(),r=Sa;return Cy.ioTsNonStrictObjectInterpreter=e.memo(function(){return{_F:r.IoTsURI,interface:function(i,a,o){return function(u){var c=e.projectFieldWithEnv(i,u)("type");return new r.IOTSType(n.iotsApplyConfig(o)(t.type(c,a),u,{types:c}))}},partial:function(i,a,o){return function(u){var c=e.projectFieldWithEnv(i,u)("type");return new r.IOTSType(n.iotsApplyConfig(o)(t.partial(c,a),u,{types:c}))}},both:function(i,a,o,u){return function(c){var f=e.projectFieldWithEnv(i,c)("type"),s=e.projectFieldWithEnv(a,c)("type");return new r.IOTSType(n.iotsApplyConfig(u)(t.intersection([t.interface(f),t.partial(s)],o),c,{types:f,partialTypes:s}))}}}}),Cy.ioTsStrictObjectInterpreter=e.memo(function(){return{_F:r.IoTsURI,interface:function(i,a,o){return function(u){var c=e.projectFieldWithEnv(i,u)("type");return new r.IOTSType(n.iotsApplyConfig(o)(t.strict(c,a),u,{types:c}))}},partial:function(i,a,o){return function(u){var c=e.projectFieldWithEnv(i,u)("type");return new r.IOTSType(n.iotsApplyConfig(o)(t.exact(t.partial(c,a)),u,{types:c}))}},both:function(i,a,o,u){return function(c){var f=e.projectFieldWithEnv(i,c)("type"),s=e.projectFieldWithEnv(a,c)("type");return new r.IOTSType(n.iotsApplyConfig(u)(t.exact(t.intersection([t.interface(f),t.partial(s)],o)),c,{types:f,typesPartial:s}))}}}}),Cy}var vF={};Object.defineProperty(vF,"__esModule",{value:!0});vF.ioTsUnionInterpreter=void 0;var Dqt=nt,Lqt=eo,fbe=Sa;vF.ioTsUnionInterpreter=Dqt.memo(function(){return{_F:fbe.IoTsURI,union:function(e){return function(t,n){return function(r){return new fbe.IOTSType(Lqt.union(e.map(function(i){return i(r).type}),n))}}}}});var KR={},sbe;function wUe(){if(sbe)return KR;sbe=1,Object.defineProperty(KR,"__esModule",{value:!0}),KR.ioTsTaggedUnionInterpreter=void 0;var e=nt,t=eo,n=Wd(),r=Sa,i=function(a){return a};return KR.ioTsTaggedUnionInterpreter=e.memo(function(){return{_F:r.IoTsURI,taggedUnion:function(a,o,u,c){return function(f){return new r.IOTSType(n.iotsApplyConfig(c)(t.union(i(e.collect(o,function(s,l){return l(f).type})),u),f,{}))}}}}),KR}var GR={},lbe;function AUe(){if(lbe)return GR;lbe=1,Object.defineProperty(GR,"__esModule",{value:!0}),GR.ioTsStrMapInterpreter=void 0;var e=nt,t=lu,n=eo,r=Wd(),i=Sa;return GR.ioTsStrMapInterpreter=e.memo(function(){return{_F:i.IoTsURI,strMap:function(a,o){return function(u){return t.pipe(a(u).type,function(c){return new i.IOTSType(r.iotsApplyConfig(o)(n.record(n.string,c),u,{type:c}))})}},record:function(a,o,u){return function(c){return function(f,s){return new i.IOTSType(r.iotsApplyConfig(u)(n.record(f,s),c,{domainType:f,codomainType:s}))}(a(c).type,o(c).type)}}}}),GR}var HR={},v4={},m4={},MUe={},RUe={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.fromArray=e.getDifferenceMagma=e.getIntersectionSemigroup=e.getUnionMonoid=e.getUnionSemigroup=e.URI=e.toReadonlyArray=e.some=e.size=e.isEmpty=e.empty=e.compact=e.toggle=e.remove=e.reduceRight=e.fromReadonlyArray=e.singleton=e.fromSet=void 0,e.toSet=c,e.map=f,e.chain=s,e.filter=l,e.partition=d,e.union=p,e.intersection=v,e.partitionMap=h,e.difference=$,e.reduce=b,e.foldMap=y,e.insert=g,e.separate=E,e.filterMap=N,e.every=je,e.isSubset=J,e.elem=ee,e.getShow=ae,e.getEq=he;var t=pF,n=Ln,r=fte,i=F0,a=function(H){return new Set(H)};e.fromSet=a;var o=function(H){return new Set([H])};e.singleton=o;var u=function(H){return function(re){for(var oe=re.length,ie=new Set,le=ee(H),me=0;me");var r=pU.array(e),i=c7.toArray(t),a=c7.fromArray(t);return new pU.Type(n,function(o){return o instanceof Set&&c7.every(e.is)(o)},function(o,u){return Kqt.pipe(r.validate(o,u),Gqt.chain(function(c){var f=a(c);return f.size!==c.length?pU.failure(o,u):pU.success(f)}))},function(o){return r.encode(i(o))})}m4.setFromArray=Hqt;Object.defineProperty(v4,"__esModule",{value:!0});v4.readonlySetFromArray=void 0;var Jqt=m4;function Yqt(e,t,n){return n===void 0&&(n="ReadonlySet<"+e.name+">"),Jqt.setFromArray(e,t,n)}v4.readonlySetFromArray=Yqt;var dbe;function OUe(){if(dbe)return HR;dbe=1,Object.defineProperty(HR,"__esModule",{value:!0}),HR.ioTsSetInterpreter=void 0;var e=nt,t=lu,n=v4,r=Sa,i=Wd();return HR.ioTsSetInterpreter=e.memo(function(){return{_F:r.IoTsURI,set:function(a,o,u){return function(c){return t.pipe(a(c).type,function(f){return new r.IOTSType(i.iotsApplyConfig(u)(n.readonlySetFromArray(f,o),c,{type:f}))})}}}}),HR}var JR={},pbe;function EUe(){if(pbe)return JR;pbe=1,Object.defineProperty(JR,"__esModule",{value:!0}),JR.ioTsRecursiveInterpreter=void 0;var e=nt,t=eo,n=Sa,r=Wd();return JR.ioTsRecursiveInterpreter=e.memo(function(){return{_F:n.IoTsURI,recursive:function(i,a,o){return function(u){return new n.IOTSType(r.iotsApplyConfig(o)(t.recursion("recursive",function(c){return i(function(f){return new n.IOTSType(c)})(u).type}),u,{}))}}}}),JR}var YR={},hbe;function TUe(){if(hbe)return YR;hbe=1,Object.defineProperty(YR,"__esModule",{value:!0}),YR.ioTsUnknownInterpreter=void 0;var e=nt,t=lu,n=eo,r=Wd(),i=Sa;return YR.ioTsUnknownInterpreter=e.memo(function(){return{_F:i.IoTsURI,unknown:function(a){return function(o){return t.pipe(n.unknown,function(u){return new i.IOTSType(r.iotsApplyConfig(a)(u,o,{type:u}))})}}}}),YR}var ZR={};function CUe(e){return function(t){return function(n){return n.reduce(function(r,i){return e.alt(r,function(){return i})},t)}}}const Zqt=Object.freeze(Object.defineProperty({__proto__:null,altAll:CUe},Symbol.toStringTag,{value:"Module"}));function Xqt(e){return CUe(e)(e.zero())}function Qqt(e){var t=Zi(e);return function(n){var r=t(n);return{concat:function(i,a){return e.alt(r.concat(i,a),function(){return e.alt(i,function(){return a})})},empty:e.zero()}}}const ext=Object.freeze(Object.defineProperty({__proto__:null,altAll:Xqt,getAlternativeMonoid:Qqt},Symbol.toStringTag,{value:"Module"})),txt=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var PUe=function(e){return{meet:function(t,n){return e.join(t,n)},join:function(t,n){return e.meet(t,n)},zero:e.one,one:e.zero,implies:function(t,n){return e.join(e.not(t),n)},not:e.not}},nxt={meet:function(){},join:function(){},zero:void 0,one:void 0,implies:function(){},not:function(){}},rxt=PUe,ixt={meet:function(e,t){return e&&t},join:function(e,t){return e||t},zero:!1,one:!0,implies:function(e,t){return!e||t},not:function(e){return!e}},axt=zwe;const oxt=Object.freeze(Object.defineProperty({__proto__:null,booleanAlgebraBoolean:ixt,booleanAlgebraVoid:nxt,getDualBooleanAlgebra:rxt,getFunctionBooleanAlgebra:axt,reverse:PUe},Symbol.toStringTag,{value:"Module"}));var uxt=function(e){return eMe(e)(e.bottom,e.top)},cxt=function(e){var t=xJ(e);return{equals:t.equals,compare:t.compare,top:e.bottom,bottom:e.top}},fxt={equals:F2.equals,compare:F2.compare,top:1/0,bottom:-1/0};const sxt=Object.freeze(Object.defineProperty({__proto__:null,boundedNumber:fxt,clamp:uxt,reverse:cxt},Symbol.toStringTag,{value:"Module"}));function FUe(e){return{meet:vx(e),join:mx(e)}}const lxt=Object.freeze(Object.defineProperty({__proto__:null,getMinMaxDistributiveLattice:FUe},Symbol.toStringTag,{value:"Module"}));function dxt(e){var t=FUe(e);return function(n,r){return{join:t.join,meet:t.meet,zero:n,one:r}}}const pxt=Object.freeze(Object.defineProperty({__proto__:null,getMinMaxBoundedDistributiveLattice:dxt},Symbol.toStringTag,{value:"Module"})),hxt=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),vxt=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),mxt=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),gxt=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function pte(e,t){return function(n,r){return t.compose(e.right(r),e.left(n))}}function WUe(e,t){var n=pte(e,t);return function(r,i){return t.compose(e.promap(t.id(),function(a){return a._tag==="Left"?a.left:a.right},Re),n(r,i))}}function yxt(e){return pte(e,e)}function bxt(e){return WUe(e,e)}const $xt=Object.freeze(Object.defineProperty({__proto__:null,fanIn:WUe,fanin:bxt,split:pte,splitChoice:yxt},Symbol.toStringTag,{value:"Module"})),Ixt=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var _xt=function(e){return function(){return console.log(e)}},Sxt=function(e){return function(){return console.warn(e)}},wxt=function(e){return function(){return console.error(e)}},Axt=function(e){return function(){return console.info(e)}};const Mxt=Object.freeze(Object.defineProperty({__proto__:null,error:wxt,info:Axt,log:_xt,warn:Sxt},Symbol.toStringTag,{value:"Module"}));var W0=rx;function Rxt(e){return{show:function(t){return"make(".concat(e.show(t),")")}}}var Oxt=Re,Ext=Re,Txt=Re,Cxt=Re,Pxt=Re,Fxt=Re,Wxt=Re,Nxt=Re,jxt=Re;function NUe(e){return{URI:N0,_E:void 0,map:vte,ap:function(t,n){return W0(e.concat(t,n))}}}function hte(e){var t=NUe(e);return{URI:N0,_E:void 0,map:t.map,ap:t.ap,of:function(){return W0(e.empty)}}}var jUe=function(e,t){return R(e,qUe())},vte=function(e,t){return R(e,xUe())},kUe=function(e,t,n){return R(e,DUe(t))},UUe=function(e,t){return R(e,LUe(t))},qUe=function(){return rx},xUe=function(){return rx},DUe=function(e){return function(t){return W0(e(t))}},LUe=function(e){return function(t){return W0(e(t))}},N0="Const",BUe={URI:N0,map:vte},kxt=en(BUe),Uxt={URI:N0,contramap:jUe},qxt={URI:N0,bimap:kUe,mapLeft:UUe},xxt={URI:N0,map:vte,contramap:jUe,bimap:kUe,mapLeft:UUe};const Dxt=Object.freeze(Object.defineProperty({__proto__:null,Bifunctor:qxt,Contravariant:Uxt,Functor:BUe,URI:N0,bimap:DUe,const_:xxt,contramap:qUe,flap:kxt,getApplicative:hte,getApply:NUe,getBooleanAlgebra:jxt,getBounded:Txt,getEq:Oxt,getHeytingAlgebra:Nxt,getMonoid:Pxt,getOrd:Ext,getRing:Wxt,getSemigroup:Cxt,getSemiring:Fxt,getShow:Rxt,make:W0,map:xUe,mapLeft:LUe},Symbol.toStringTag,{value:"Module"})),Lxt=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var Bxt={equals:function(e,t){return e.valueOf()===t.valueOf()}},Vxt={equals:function(e,t){return e.getDate()===t.getDate()}},zxt={equals:function(e,t){return e.getMonth()===t.getMonth()}},Kxt={equals:function(e,t){return e.getFullYear()===t.getFullYear()}},Gxt=R(Bx,hx(function(e){return e.valueOf()})),Hxt=function(){return new Date},Jxt=function(){return new Date().getTime()};const Yxt=Object.freeze(Object.defineProperty({__proto__:null,Eq:Bxt,Ord:Gxt,create:Hxt,eqDate:Vxt,eqMonth:zxt,eqYear:Kxt,now:Jxt},Symbol.toStringTag,{value:"Module"})),Zxt=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function VUe(e,t){var n=t.zero,r=function(i,a){return e.equals(a,n)?i:r(a,t.mod(i,a))};return r}function Xxt(e,t){var n=t.zero,r=VUe(e,t);return function(i,a){return e.equals(i,n)||e.equals(a,n)?n:t.div(t.mul(i,a),r(i,a))}}var Qxt={add:function(e,t){return e+t},zero:0,mul:function(e,t){return e*t},one:1,sub:function(e,t){return e-t},degree:function(e){return 1},div:function(e,t){return e/t},mod:function(e,t){return e%t}};const e3t=Object.freeze(Object.defineProperty({__proto__:null,fieldNumber:Qxt,gcd:VUe,lcm:Xxt},Symbol.toStringTag,{value:"Module"})),t3t=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function zUe(e,t){return function(n,r){return function(i){return e.reduce(i,n,function(a,o){return t.reduce(o,a,r)})}}}function KUe(e,t){return function(n){var r=e.foldMap(n),i=t.foldMap(n);return function(a){return function(o){return r(o,function(u){return i(u,a)})}}}}function GUe(e,t){return function(n,r){return function(i){return e.reduceRight(i,n,function(a,o){return t.reduceRight(a,o,r)})}}}function n3t(e,t){return function(n,r){return function(i){return t.reduce(i,e.of(n),function(a,o){return e.chain(a,function(u){return r(u,o)})})}}}function r3t(e,t){return function(n,r){var i=function(a,o){var u=a.init,c=a.acc;return u?{init:!1,acc:o}:{init:!1,acc:e.concat(e.concat(c,n),o)}};return t.reduce(r,{init:!0,acc:e.empty},i).acc}}function HUe(e){return function(t){return e.reduce(t,[],function(n,r){return n.push(r),n})}}function i3t(e,t){var n=function(i,a){return e.ap(e.map(i,Mo),a)},r=e.of(void 0);return function(i,a){return t.reduce(i,r,function(o,u){return n(o,a(u))})}}function a3t(e,t){return function(n,r,i){return t.reduce(n,e.of(r),function(a,o){return e.chain(a,function(u){return i(u,o)})})}}var o3t=HUe;function mte(e,t){var n=zUe(e,t),r=KUe(e,t),i=GUe(e,t);return{reduce:function(a,o,u){return R(a,n(o,u))},foldMap:function(a){var o=r(a);return function(u,c){return R(u,o(c))}},reduceRight:function(a,o,u){return R(a,i(o,u))}}}const u3t=Object.freeze(Object.defineProperty({__proto__:null,foldM:a3t,foldMap:KUe,getFoldableComposition:mte,intercalate:r3t,reduce:zUe,reduceM:n3t,reduceRight:GUe,toArray:o3t,toReadonlyArray:HUe,traverse_:i3t},Symbol.toStringTag,{value:"Module"}));function JUe(e,t){return function(n,r){return function(i){return e.reduceWithIndex(i,n,function(a,o,u){return t.reduceWithIndex(u,o,function(c,f,s){return r([a,c],f,s)})})}}}function YUe(e,t){return function(n){var r=e.foldMapWithIndex(n),i=t.foldMapWithIndex(n);return function(a){return function(o){return r(o,function(u,c){return i(c,function(f,s){return a([u,f],s)})})}}}}function ZUe(e,t){return function(n,r){return function(i){return e.reduceRightWithIndex(i,n,function(a,o,u){return t.reduceRightWithIndex(o,u,function(c,f,s){return r([a,c],f,s)})})}}}function c3t(e,t){var n=mte(e,t),r=JUe(e,t),i=YUe(e,t),a=ZUe(e,t);return{reduce:n.reduce,foldMap:n.foldMap,reduceRight:n.reduceRight,reduceWithIndex:function(o,u,c){return R(o,r(u,c))},foldMapWithIndex:function(o){var u=i(o);return function(c,f){return R(c,u(f))}},reduceRightWithIndex:function(o,u,c){return R(o,a(u,c))}}}const f3t=Object.freeze(Object.defineProperty({__proto__:null,foldMapWithIndex:YUe,getFoldableWithIndexComposition:c3t,reduceRightWithIndex:ZUe,reduceWithIndex:JUe},Symbol.toStringTag,{value:"Module"}));var XUe=function(){return Re},s3t=Re,Tw=function(e){return function(t){return function(n){return t(e(n))}}},Cw=function(e){return function(t){return e(t)(t)}},l3t=Cw,Uh=function(e,t){return R(e,qh(t))},mF=function(e,t){return R(e,t2e(t))},QUe=function(e,t){return R(e,r2e(t))},g4=function(e,t,n){return R(e,i2e(t,n))},qh=function(e){return function(t){return function(n){return e(t(n))}}},e2e=function(e){return function(t){return function(n){return t(n)(e(n))}}},t2e=e2e,Ks=Mo,j0=Pe(2,function(e,t){return function(n){return t(e(n))(n)}}),n2e=j0(Re),d3t=n2e,r2e=function(e){return function(t){return Ae(e,t)}},i2e=function(e,t){return function(n){return function(r){return t(n(e(r)))}}},gte=function(){return Re},yte=function(e){return function(t){var n=t[0],r=t[1];return[e(n),r]}},bte=function(e){return function(t){var n=t[0],r=t[1];return[n,e(r)]}},$te=function(e){return NJ(function(t){return bs(e(t))},Qt)},Ite=function(e){return NJ(In,function(t){return ad(e(t))})},Cf="Reader",va={URI:Cf,map:Uh},p3t=en(va),_te={URI:Cf,of:Ks},xh={URI:Cf,map:Uh,ap:mF},a2e=Gr(xh),h3t=a2e,o2e=Hr(xh),v3t=o2e,u2e={URI:Cf,map:Uh,ap:mF,of:Ks},Ste={URI:Cf,map:Uh,ap:mF,chain:j0},Dh={URI:Cf,map:Uh,of:Ks,ap:mF,chain:j0},wte=Pe(2,ui(Ste)),m3t={URI:Cf,map:Uh,promap:g4},g3t={URI:Cf,compose:QUe,id:gte},y3t={URI:Cf,map:Uh,promap:g4,first:yte,second:bte},b3t={URI:Cf,map:Uh,promap:g4,left:$te,right:Ite},$3t=oi(va),I3t=Oi(va),c2e=ci(Ste),_3t=c2e,S3t=Ks(Yi),f2e=ai(xh),w3t=f2e,s2e=Ks(Pa),Sg=function(e){return function(t){return function(n){for(var r=[e(0,Rc(t))(n)],i=1;i=1?1:0},c6t=Pqe,f6t=Yte,s6t=Fqe,l6t=Wqe;const d6t=Object.freeze(Object.defineProperty({__proto__:null,Eq:Fqe,Monoid:Wqe,Semigroup:Yte,eqOrdering:s6t,invert:c6t,match:o6t,matchW:Cqe,monoidOrdering:l6t,reverse:Pqe,semigroupOrdering:f6t,sign:u6t},Symbol.toStringTag,{value:"Module"})),p6t=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),h6t=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var O4=function(){return Math.random()};function Nqe(e,t){return R(O4,Ad(function(n){return Math.floor((t-e+1)*n+e)}))}function v6t(e,t){return R(O4,Ad(function(n){return(t-e)*n+e}))}var m6t=R(O4,Ad(function(e){return e<.5})),g6t=function(e){return R(Nqe(0,e.length-1),Ad(function(t){return e[t]}))};const y6t=Object.freeze(Object.defineProperty({__proto__:null,random:O4,randomBool:m6t,randomElem:g6t,randomInt:Nqe,randomRange:v6t},Symbol.toStringTag,{value:"Module"}));var Zte=DS(_te),jqe=r0(_te),kqe=LS(va),b6t=BS(va),Uqe=Ks,qqe=kqe,xqe=cC(va),$6t=xqe,Xte=YS(Dh),I6t=Xte,Dqe=Xte,_6t=Dqe,Lqe=ZS(Dh),S6t=Lqe,w6t=sC(va),A6t=Tw,Bqe=Cw,M6t=Bqe,Vqe=i0(Dh),R6t=Vqe,Qte=Pe(2,XS(Dh)),zqe=fC(Dh),O6t=zqe,E6t=QS(va),Wf=function(e,t){return R(e,Gqe(t))},Uw=function(e,t){return R(e,ene(t))},Kqe=function(e,t){return R(e,tne(t))},Gqe=VS(va),MF=Pe(3,HS(va)),T6t=MF,RF=Pe(2,JS(va)),C6t=RF,ene=zS(xh),P6t=ene,Rd=jqe,Od=Pe(2,KS(Dh)),Hqe=Od(Re),F6t=Hqe,tne=GS(Dh),W6t=tne,nne=Zte,Wa="ReaderEither",Jqe=function(e){var t=Gb(e);return{URI:Wa,_E:void 0,compact:hd(va,t),separate:Ih(va,t,Ns)}};function N6t(e){var t=vS(e),n=Jqe(e),r=_h(va,t),i=Sh(va,t),a=lg(va,t),o=dg(va,t);return{URI:Wa,_E:void 0,map:Wf,compact:n.compact,separate:n.separate,filter:function(u,c){return R(u,r(c))},filterMap:function(u,c){return R(u,i(c))},partition:function(u,c){return R(u,a(c))},partitionMap:function(u,c){return R(u,o(c))}}}function Yqe(e){var t=ph(xh,tg(e));return{URI:Wa,_E:void 0,map:Wf,ap:function(n,r){return R(n,t(r))},of:Rd}}function Zqe(e){var t=uC(Dh,e);return{URI:Wa,_E:void 0,map:Wf,alt:function(n,r){return R(n,t(r))}}}var qw={URI:Wa,map:Wf},j6t=Pe(2,ou(qw)),k6t=Bu(qw),U6t=en(qw),q6t={URI:Wa,of:Rd},OF={URI:Wa,map:Wf,ap:Uw},Xqe=Gr(OF),x6t=Xqe,Qqe=Hr(OF),D6t=Qqe,exe={URI:Wa,map:Wf,ap:Uw,of:Rd},D0={URI:Wa,map:Wf,ap:Uw,chain:Od},L6t={URI:Wa,map:Wf,ap:Uw,of:Rd,chain:Od},Gh={URI:Wa,fromEither:Uqe},xw={URI:Wa,fromReader:qqe},rne=Pe(2,ui(D0)),ine=Pe(2,cd(Gh,D0)),ane=Pe(2,U0(xw,D0)),B6t={URI:Wa,bimap:MF,mapLeft:RF},V6t={URI:Wa,map:Wf,alt:Kqe},z6t=Pw(xw),K6t=Fw(xw),G6t=k0(xw),H6t=ane,J6t=ane,Y6t={URI:Wa,map:Wf,ap:Uw,of:Rd,chain:Od,throwError:nne},Z6t=od(Gh),X6t=ud(Gh),txe=Vb(Gh,D0),Q6t=txe,EF={fromEither:Gh.fromEither},e5t={fromReader:xw.fromReader},t5t=cS(EF),n5t=fS(EF),E4={flatMap:Od},r5t=MT(EF,E4),i5t=sS(EF,E4),one=lS(EF,E4),une=OT(e5t,E4),a5t=one,o5t=one,u5t=ine,c5t=ine,f5t=une,s5t=une,l5t=hh(Gh),nxe=zb(Gh,D0),d5t=nxe,p5t=Oc(Gh),h5t=Rd(Yi),v5t=oi(qw),m5t=Oi(qw),rxe=ci(D0),g5t=rxe,ixe=ai(OF),y5t=ixe,axe=Rd(Pa),oxe=function(e){return Ae(Sg(e),qh(UT(au)))},cne=function(e){var t=oxe(e);return function(n){return _r(n)?t(n):axe}},b5t=cne,uxe=function(e){return cne(function(t,n){return e(n)})},$5t=uxe(Re),I5t=Od,_5t=Od,S5t=rne,w5t=rne,A5t=Qte,M5t=Qte,R5t={URI:Wa,bimap:MF,mapLeft:RF,map:Wf,of:Rd,ap:Uw,chain:Od,alt:Kqe,throwError:Zte},O5t=Zi(OF),E5t=If(exe),T5t=function(e){return Zi(xh)(NT(e))};function C5t(e){var t=Yqe(e),n=Zqe(e);return{URI:Wa,_E:void 0,map:Wf,ap:t.ap,of:Rd,chain:Od,bimap:MF,mapLeft:RF,alt:n.alt,throwError:nne}}const P5t=Object.freeze(Object.defineProperty({__proto__:null,Alt:V6t,ApT:axe,Applicative:exe,Apply:OF,Bifunctor:B6t,Chain:D0,Do:h5t,FromEither:Gh,FromReader:xw,Functor:qw,Monad:L6t,MonadThrow:Y6t,Pointed:q6t,URI:Wa,alt:tne,altW:W6t,ap:ene,apFirst:Xqe,apFirstW:x6t,apS:ixe,apSW:y5t,apSecond:Qqe,apSecondW:D6t,apW:P6t,as:j6t,asUnit:k6t,ask:z6t,asks:K6t,asksReaderEither:M6t,asksReaderEitherW:Bqe,bimap:T6t,bind:rxe,bindTo:v5t,bindW:g5t,chain:I5t,chainEitherK:a5t,chainEitherKW:o5t,chainFirst:S5t,chainFirstEitherK:u5t,chainFirstEitherKW:c5t,chainFirstReaderK:H6t,chainFirstReaderKW:J6t,chainFirstW:w5t,chainOptionK:txe,chainOptionKW:Q6t,chainReaderK:f5t,chainReaderKW:s5t,chainW:_5t,filterOrElse:nxe,filterOrElseW:d5t,flap:U6t,flatMap:Od,flatMapEither:one,flatMapNullable:r5t,flatMapOption:i5t,flatMapReader:une,flatten:F6t,flattenW:Hqe,fold:I6t,foldW:_6t,fromEither:Uqe,fromEitherK:p5t,fromOption:Z6t,fromOptionK:X6t,fromPredicate:l5t,fromReader:qqe,fromReaderK:G6t,getAltReaderValidation:Zqe,getApplicativeReaderValidation:Yqe,getApplyMonoid:E5t,getApplySemigroup:O5t,getCompactable:Jqe,getFilterable:N6t,getOrElse:Lqe,getOrElseW:S6t,getReaderValidation:C5t,getSemigroup:T5t,left:Zte,leftReader:b6t,let:m5t,liftNullable:t5t,liftOption:n5t,local:A6t,map:Gqe,mapBoth:MF,mapError:RF,mapLeft:C6t,match:xqe,matchE:Xte,matchEW:Dqe,matchW:$6t,of:Rd,orElse:Vqe,orElseFirst:A5t,orElseFirstW:M5t,orElseW:R6t,orLeft:zqe,orLeftW:O6t,readerEither:R5t,right:jqe,rightReader:kqe,sequenceArray:$5t,swap:E6t,tap:rne,tapEither:ine,tapError:Qte,tapReader:ane,throwError:nne,toUnion:w6t,traverseArray:uxe,traverseArrayWithIndex:b5t,traverseReadonlyArrayWithIndex:cne,traverseReadonlyNonEmptyArrayWithIndex:oxe},Symbol.toStringTag,{value:"Module"}));function T4(e){return function(t){return function(){return e.of(t)}}}function C4(e){return function(t){return function(n){return function(r){return e.map(n(r),t)}}}}function P4(e){return function(t){return function(n){return function(r){return e.ap(n(r),t(r))}}}}function cxe(e){var t=F4(e);return function(n){return function(r){return t(r,n)}}}function F4(e){return function(t,n){return function(r){return e.chain(t(r),function(i){return n(i)(r)})}}}function W4(e){return function(t){return Ae(t,e.of)}}function F5t(e){return function(t){return Ae(t,e)}}function W5t(e){var t=P4(e),n=C4(e),r=cxe(e);return{map:function(i,a){return R(i,n(a))},ap:function(i,a){return R(i,t(a))},of:T4(e),chain:function(i,a){return R(i,r(a))},ask:function(){return e.of},asks:function(i){return Ae(i,e.of)},local:function(i,a){return function(o){return i(a(o))}},fromReader:W4(e),fromM:function(i){return function(){return i}}}}const N5t=Object.freeze(Object.defineProperty({__proto__:null,ap:P4,chain:cxe,flatMap:F4,fromNaturalTransformation:F5t,fromReader:W4,getReaderM:W5t,map:C4,of:T4},Symbol.toStringTag,{value:"Module"}));var fne=W4(Pf),sne=Ks,j5t=Tw,fxe=Cw,k5t=fxe,Dw=function(e,t){return R(e,sxe(t))},TF=function(e,t){return R(e,lne(t))},sxe=C4(Cn),lne=P4(Md),U5t=lne,L0=T4(Pf),Rg=Pe(2,F4(Hu)),lxe=Rg(Re),q5t=lxe,Ed="ReaderIO",CF={URI:Ed,map:Dw},x5t=Pe(2,ou(CF)),D5t=Bu(CF),L5t=en(CF),B5t={URI:Ed,of:L0},N4={URI:Ed,map:Dw,ap:TF},V5t=Gr(N4),z5t=Hr(N4),K5t={URI:Ed,map:Dw,ap:TF,of:L0},PF={URI:Ed,map:Dw,ap:TF,chain:Rg},G5t={URI:Ed,map:Dw,of:L0,ap:TF,chain:Rg},H5t={URI:Ed,map:Dw,of:L0,ap:TF,chain:Rg,fromIO:sne},j4={URI:Ed,fromIO:sne},FF={URI:Ed,fromReader:fne},dxe={flatMap:Rg},J5t={fromIO:j4.fromIO},Y5t={fromReader:fne},pxe=dh(J5t,dxe),dne=OT(Y5t,dxe),pne=Pe(2,ui(PF)),hxe=Pe(2,Ts(j4,PF)),hne=Pe(2,U0(FF,PF)),Z5t=Es(j4),X5t=pxe,Q5t=hxe,eBt=Pw(FF),tBt=Fw(FF),nBt=k0(FF),rBt=dne,iBt=dne,aBt=hne,oBt=hne,uBt=L0(Yi),cBt=oi(CF),vxe=ci(PF),fBt=vxe,mxe=ai(N4),sBt=mxe,gxe=L0(Pa),yxe=function(e){return Ae(Sg(e),qh($F(au)))},vne=function(e){var t=yxe(e);return function(n){return _r(n)?t(n):gxe}},lBt=vne,bxe=function(e){return vne(function(t,n){return e(n)})},dBt=bxe(Re),pBt=Rg,hBt=Rg,vBt=pne,mBt=pne;const gBt=Object.freeze(Object.defineProperty({__proto__:null,ApT:gxe,Applicative:K5t,Apply:N4,Chain:PF,Do:uBt,FromIO:j4,FromReader:FF,Functor:CF,Monad:G5t,MonadIO:H5t,Pointed:B5t,URI:Ed,ap:lne,apFirst:V5t,apS:mxe,apSW:sBt,apSecond:z5t,apW:U5t,as:x5t,asUnit:D5t,ask:eBt,asks:tBt,asksReaderIO:k5t,asksReaderIOW:fxe,bind:vxe,bindTo:cBt,bindW:fBt,chain:pBt,chainFirst:vBt,chainFirstIOK:Q5t,chainFirstReaderK:aBt,chainFirstReaderKW:oBt,chainFirstW:mBt,chainIOK:X5t,chainReaderK:rBt,chainReaderKW:iBt,chainW:hBt,flap:L5t,flatMap:Rg,flatMapIO:pxe,flatMapReader:dne,flatten:q5t,flattenW:lxe,fromIO:sne,fromIOK:Z5t,fromReader:fne,fromReaderK:nBt,local:j5t,map:sxe,of:L0,sequenceArray:dBt,tap:pne,tapIO:hxe,tapReader:hne,traverseArray:bxe,traverseArrayWithIndex:lBt,traverseReadonlyArrayWithIndex:vne,traverseReadonlyNonEmptyArrayWithIndex:yxe},Symbol.toStringTag,{value:"Module"}));var mne=W4(Ga),B0=Ks,V0=Ae(Ro,B0),$xe=qh(Ro),yBt=Tw,Ixe=Cw,bBt=Ixe,Js=function(e,t){return R(e,yne(t))},z0=function(e,t){return R(e,bne(t))},gne=function(e,t){return Uc(e,function(n){return R(t,yne(n))})},yne=C4(Dt),bne=P4(Bb),$Bt=bne,Nf=T4(Ga),Uc=Pe(2,F4(Fa)),_xe=Uc(Re),IBt=_xe,No="ReaderTask",ki={URI:No,map:Js},_Bt=Pe(2,ou(ki)),SBt=Bu(ki),wBt=en(ki),WF={URI:No,of:Nf},NF={URI:No,map:Js,ap:z0},ABt=Gr(NF),MBt=Hr(NF),RBt={URI:No,map:Js,ap:z0,of:Nf},$ne={URI:No,map:Js,ap:gne},Sxe={URI:No,map:Js,ap:gne,of:Nf},K0={URI:No,map:Js,ap:z0,chain:Uc},Hh={URI:No,map:Js,of:Nf,ap:z0,chain:Uc},OBt={URI:No,map:Js,of:Nf,ap:z0,chain:Uc,fromIO:V0},EBt={URI:No,map:Js,of:Nf,ap:z0,chain:Uc,fromIO:V0,fromTask:B0},k4={URI:No,fromIO:V0},Ine={URI:No,fromIO:V0,fromTask:B0},jF={URI:No,fromReader:mne},_ne={flatMap:Uc},TBt={fromIO:k4.fromIO},CBt={fromTask:B0},PBt={fromReader:mne},wxe=dh(TBt,_ne),Axe=RT(CBt,_ne),Sne=OT(PBt,_ne),wne=Pe(2,function(e,t){return Uc(e,Rne(t))}),U4=Pe(2,ui(K0)),Mxe=Pe(2,Ts(k4,K0)),Ane=Pe(2,U0(jF,K0)),Rxe=Pe(2,o0(Ine,K0)),Mne=Pe(2,function(e,t){return U4(e,Rne(t))}),FBt=Es(k4),WBt=wxe,NBt=Mxe,jBt=Pw(jF),kBt=Fw(jF),UBt=k0(jF),qBt=Sne,xBt=Sne,DBt=Ane,LBt=Ane,Rne=function(e){return function(){for(var t=[],n=0;n1&&!o?"│ ":" "),i.forest)}return n};function aDe(e){return iDe(` `,e)}function $7t(e){return e.value+aDe(e.forest)}function oDe(e,t){var n=t(e),r=n[0],i=n[1];return{value:r,forest:uDe(i,t)}}function uDe(e,t){return e.map(function(n){return oDe(n,t)})}function cDe(e){var t=fDe(e);return function(n,r){return e.chain(r(n),function(i){var a=i[0],o=i[1];return e.map(t(o,r),function(u){return{value:a,forest:u}})})}}function fDe(e){var t=p3(e);return function(n,r){return R(n,t(function(i){return cDe(e)(i,r)}))}}function I7t(e){var t=function(n){return e(n.value,n.forest.map(t))};return t}var Pg=function(e,t){return R(e,G4(t))},Gw=function(e,t){return Fg(e,function(n){return R(t,G4(n))})},Lre=function(e,t,n){return R(e,H4(t,n))},Bre=function(e){var t=dDe(e);return function(n,r){return R(n,t(r))}},Vre=function(e,t,n){return R(e,zre(t,n))},sDe=function(e,t){return R(e,K4(t))},lDe=function(e){var t=Gre(e);return function(n,r){return R(n,t(r))}},_7t=function(e){return function(t){return Gw(t,e)}},Fg=Pe(2,function(e,t){var n=t(e.value),r=n.value,i=n.forest,a=wZ().concat;return{value:r,forest:a(i,e.forest.map(Fg(t)))}}),K4=function(e){return function(t){return{value:e(t),forest:t.forest.map(K4(e))}}},S7t=K4(Re),w7t=Fg(Re),G4=function(e){return function(t){return{value:e(t.value),forest:t.forest.map(G4(e))}}},H4=function(e,t){return function(n){for(var r=t(e,n.value),i=n.forest.length,a=0;a=0;a--)r=R(n.forest[a],zre(r,t));return t(n.value,r)}},Kre=function(e){return e.value},Gre=function(e){var t=p3(e),n=function(r){return function(i){return e.ap(e.map(r(i.value),function(a){return function(o){return{value:a,forest:o}}}),R(i.forest,t(n(r))))}};return n},Hre=function(e){return Gre(e)(Re)},Hw=function(e){return rDe(e)},Xs="Tree",J4={URI:Xs,map:Pg},A7t=en(J4),M7t={URI:Xs,of:Hw},Y4={URI:Xs,map:Pg,ap:Gw},R7t=Gr(Y4),O7t=Hr(Y4),E7t={URI:Xs,map:Pg,ap:Gw,of:Hw},Jre={URI:Xs,map:Pg,ap:Gw,chain:Fg},T7t={URI:Xs,map:Pg,ap:Gw,of:Hw,chain:Fg},C7t=Db(Jre),P7t={URI:Xs,reduce:Lre,foldMap:Bre,reduceRight:Vre},F7t={URI:Xs,map:Pg,reduce:Lre,foldMap:Bre,reduceRight:Vre,traverse:lDe,sequence:Hre},W7t={URI:Xs,map:Pg,extend:sDe,extract:Kre},N7t=Hw(Yi),j7t=oi(J4),k7t=Oi(J4),U7t=ci(Jre),q7t=ai(Y4);function x7t(e){var t=function(n,r){return e.equals(n,r.value)||r.forest.some(function(i){return t(n,i)})};return t}var pDe=function(e){return function(t){return e(t.value)||t.forest.some(pDe(e))}},D7t=Fg,L7t={URI:Xs,map:Pg,of:Hw,ap:Gw,chain:Fg,reduce:Lre,foldMap:Bre,reduceRight:Vre,traverse:lDe,sequence:Hre,extract:Kre,extend:sDe};const B7t=Object.freeze(Object.defineProperty({__proto__:null,Applicative:E7t,Apply:Y4,Chain:Jre,Comonad:W7t,Do:N7t,Foldable:P7t,Functor:J4,Monad:T7t,Pointed:M7t,Traversable:F7t,URI:Xs,ap:_7t,apFirst:R7t,apS:q7t,apSecond:O7t,bind:U7t,bindTo:j7t,chain:D7t,chainFirst:C7t,drawForest:aDe,drawTree:$7t,duplicate:S7t,elem:x7t,exists:pDe,extend:K4,extract:Kre,flap:A7t,flatMap:Fg,flatten:w7t,fold:I7t,foldMap:dDe,getEq:b7t,getShow:y7t,let:k7t,make:rDe,map:G4,of:Hw,reduce:H4,reduceRight:zre,sequence:Hre,traverse:Gre,tree:L7t,unfoldForest:uDe,unfoldForestM:fDe,unfoldTree:oDe,unfoldTreeM:cDe},Symbol.toStringTag,{value:"Module"})),V7t=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function z7t(e,t){var n=eAe(t,tg(e));return{map:n.map,ap:n.ap,of:n.of,chain:function(r,i){return t.chain(r,function(a){return ya(a)?t.of(bs(a.left)):i(a.right)})},alt:function(r,i){return t.chain(r,function(a){return gJ(a)?t.of(a):t.map(i(),function(o){return ya(o)?bs(e.concat(a.left,o.left)):o})})}}}const K7t=Object.freeze(Object.defineProperty({__proto__:null,getValidationM:z7t},Symbol.toStringTag,{value:"Module"}));var hDe=BJ(void 0),G7t={concat:hDe.concat,empty:void 0};const H7t=Object.freeze(Object.defineProperty({__proto__:null,Monoid:G7t,Semigroup:hDe},Symbol.toStringTag,{value:"Module"}));var J7t=function(e){return function(){return[void 0,e]}},Y7t=function(e){return function(){var t=e(),n=t[0],r=t[1];return[[n,r],r]}},Z7t=function(e){return function(){var t=e(),n=t[0],r=n[0],i=n[1],a=t[1];return[r,i(a)]}},X7t=function(e){return function(t){return function(){var n=t(),r=n[0],i=n[1];return[[r,e(i)],i]}}},Q7t=function(e){return function(t){return function(){var n=t(),r=n[0],i=n[1];return[r,e(i)]}}},BF=function(e,t){return R(e,vDe(t))},vDe=function(e){return function(t){return function(){var n=t(),r=n[0],i=n[1];return[e(r),i]}}},Y0="Writer",mDe=function(e){return{URI:Y0,_E:void 0,of:function(t){return function(){return[t,e.empty]}}}},Yre=function(e){return{URI:Y0,_E:void 0,map:BF,ap:function(t,n){return function(){var r=t(),i=r[0],a=r[1],o=n(),u=o[0],c=o[1];return[i(u),e.concat(a,c)]}}}},gDe=function(e){var t=Yre(e),n=mDe(e);return{URI:Y0,_E:void 0,map:BF,ap:t.ap,of:n.of}};function yDe(e){var t=Yre(e);return{URI:Y0,_E:void 0,map:BF,ap:t.ap,chain:function(n,r){return function(){var i=n(),a=i[0],o=i[1],u=r(a)(),c=u[0],f=u[1];return[c,e.concat(o,f)]}}}}function e9t(e){var t=gDe(e),n=yDe(e);return{URI:Y0,_E:void 0,map:BF,ap:t.ap,of:t.of,chain:n.chain}}var Zre={URI:Y0,map:BF},t9t=en(Zre),n9t=function(e){return e()[0]},r9t=function(e){return e()[1]},i9t=function(e){return e()[0]},a9t=function(e){return e()[1]},o9t=Zre;const u9t=Object.freeze(Object.defineProperty({__proto__:null,Functor:Zre,URI:Y0,censor:Q7t,evalWriter:i9t,evaluate:n9t,execWriter:a9t,execute:r9t,flap:t9t,getApplicative:gDe,getApply:Yre,getChain:yDe,getMonad:e9t,getPointed:mDe,listen:Y7t,listens:X7t,map:vDe,pass:Z7t,tell:J7t,writer:o9t},Symbol.toStringTag,{value:"Module"}));function c9t(e){var t=function(n,r){return function(){return e.map(n(),function(i){var a=i[0],o=i[1];return[r(a),o]})}};return{map:t,evalWriter:function(n){return e.map(n(),function(r){var i=r[0];return i})},execWriter:function(n){return e.map(n(),function(r){r[0];var i=r[1];return i})},tell:function(n){return function(){return e.of([void 0,n])}},listen:function(n){return function(){return e.map(n(),function(r){var i=r[0],a=r[1];return[[i,a],a]})}},pass:function(n){return function(){return e.map(n(),function(r){var i=r[0],a=i[0],o=i[1],u=r[1];return[a,o(u)]})}},listens:function(n,r){return function(){return e.map(n(),function(i){var a=i[0],o=i[1];return[[a,r(o)],o]})}},censor:function(n,r){return function(){return e.map(n(),function(i){var a=i[0],o=i[1];return[a,r(o)]})}},getMonad:function(n){return{_E:void 0,map:t,of:function(r){return function(){return e.of([r,n.empty])}},ap:function(r,i){return function(){return e.chain(r(),function(a){var o=a[0],u=a[1];return e.map(i(),function(c){var f=c[0],s=c[1];return[o(f),n.concat(u,s)]})})}},chain:function(r,i){return function(){return e.chain(r(),function(a){var o=a[0],u=a[1];return e.map(i(o)(),function(c){var f=c[0],s=c[1];return[f,n.concat(u,s)]})})}}}}}}const f9t=Object.freeze(Object.defineProperty({__proto__:null,getWriterM:c9t},Symbol.toStringTag,{value:"Module"})),s9t=Object.freeze(Object.defineProperty({__proto__:null,alt:Zqt,alternative:ext,applicative:Xot,apply:Yot,array:uEe,bifunctor:txt,boolean:n_t,booleanAlgebra:oxt,bounded:sxt,boundedDistributiveLattice:pxt,boundedJoinSemilattice:hxt,boundedLattice:vxt,boundedMeetSemilattice:mxt,category:gxt,chain:Qot,chainRec:Wut,choice:$xt,comonad:Ixt,compactable:svt,console:Mxt,const:Dxt,contravariant:Lxt,date:Yxt,distributiveLattice:lxt,either:LAe,eitherT:pvt,endomorphism:G$t,eq:KAe,extend:Zxt,field:e3t,filterable:vvt,filterableWithIndex:t3t,foldable:u3t,foldableWithIndex:f3t,fromEither:jut,fromIO:nut,fromReader:k3t,fromState:aDt,fromTask:yvt,fromThese:Ubt,function:Xwe,functor:Zot,functorWithIndex:uDt,group:cDt,heytingAlgebra:fDt,hkt:sDt,identity:Syt,invariant:lDt,io:WDt,ioEither:YLt,ioOption:K4t,ioRef:H4t,joinSemilattice:J4t,json:X4t,lattice:Q4t,magma:pft,map:V$t,meetSemilattice:e6t,monad:t6t,monadIO:n6t,monadTask:r6t,monadThrow:i6t,monoid:nFe,naturalTransformation:a6t,nonEmptyArray:vRe,number:llt,option:UEe,optionT:Kmt,ord:fft,ordering:d6t,pipeable:VWe,pointed:p6t,predicate:Iht,profunctor:h6t,random:y6t,reader:W3t,readerEither:P5t,readerIO:gBt,readerT:N5t,readerTask:hVt,readerTaskEither:uKt,readonlyArray:dOe,readonlyMap:c$t,readonlyNonEmptyArray:kMe,readonlyRecord:Y1t,readonlySet:oCe,readonlyTuple:M0t,record:kFe,refinement:s_t,ring:lKt,semigroup:HJ,semigroupoid:dKt,semiring:hKt,separated:Lut,set:lCe,show:GWe,state:iDt,stateReaderTaskEither:z8t,stateT:mKt,store:e7t,string:_1t,strong:r7t,struct:o7t,task:Fut,taskEither:Vmt,taskOption:Qgt,taskThese:l0t,these:kbt,theseT:xbt,traced:h7t,traversable:m7t,traversableWithIndex:g7t,tree:B7t,tuple:D0t,unfoldable:V7t,validationT:K7t,void:H7t,witherable:But,writer:u9t,writerT:f9t,zero:dlt},Symbol.toStringTag,{value:"Module"})),l9t=Et(s9t);var vbe;function bDe(){if(vbe)return ZR;vbe=1,Object.defineProperty(ZR,"__esModule",{value:!0}),ZR.ioTsNewtypeInterpreter=void 0;var e=nt,t=l9t,n=Ln,r=eo,i=Wd(),a=Sa,o=function(u){return u};return ZR.ioTsNewtypeInterpreter=e.memo(function(){return{_F:a.IoTsURI,newtype:function(){return function(u,c){return function(f){return n.pipe(u(f).type,function(s){return new a.IOTSType(i.iotsApplyConfig(c)(o(s),f,{type:s}))})}}},newtypeIso:function(u,c,f,s){return function(l){return n.pipe(c(l).type,function(d){var p=function(v){return d.is(v)};return new a.IOTSType(i.iotsApplyConfig(s)(new r.Type(f,p,function(v,h){return n.pipe(d.validate(v,h),t.either.map(u.get))},function(v){return d.encode(u.reverseGet(v))}),l,{type:d}))})}},newtypePrism:function(u,c,f,s){return function(l){return n.pipe(c(l).type,function(d){var p=function(v){return d.is(v)};return new a.IOTSType(i.iotsApplyConfig(s)(new r.Type(f,p,function(v,h){return n.pipe(d.validate(v,h),t.either.chain(function($){var b=u.getOption($);return b._tag==="None"?r.failure(v,h,"newtype doesn't satisfy prism conditions"):r.success(b.value)}))},function(v){return d.encode(u.reverseGet(v))}),l,{type:d}))})}}}}),ZR}var f7={},mbe;function $De(){return mbe||(mbe=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ioTsRefinedInterpreter=e.predicate=e.refinement=void 0;var t=nt,n=lu,r=eo,i=Wd(),a=Sa,o=function(c,f,s){return new r.Type(s,function(l){return c.is(l)&&f(l)},function(l,d){var p=c.decode(l);if(p._tag==="Left")return p;var v=p.right;return f(v)?r.success(v):r.failure(l,d)},c.encode)};e.refinement=o;var u=function(c,f,s){return new r.Type(s,function(l){return c.is(l)&&f(l)},function(l,d){var p=c.decode(l);if(p._tag==="Left")return p;var v=p.right;return f(v)?r.success(v):r.failure(l,d)},c.encode)};e.predicate=u,e.ioTsRefinedInterpreter=t.memo(function(){return{_F:a.IoTsURI,refined:function(c,f,s,l){return function(d){return n.pipe(c(d).type,function(p){return new a.IOTSType(i.iotsApplyConfig(l)(e.refinement(p,f,s),d,{type:p}))})}},constrained:function(c,f,s,l){return function(d){return n.pipe(c(d).type,function(p){return new a.IOTSType(i.iotsApplyConfig(l)(e.predicate(p,f,s),d,{type:p}))})}}}})}(f7)),f7}var gbe;function d9t(){return gbe||(gbe=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=ea;t.__exportStar(_Ue(),e),t.__exportStar(SUe(),e),t.__exportStar(IDe(),e),t.__exportStar(vF,e),t.__exportStar(wUe(),e),t.__exportStar(AUe(),e),t.__exportStar(OUe(),e),t.__exportStar(EUe(),e),t.__exportStar(TUe(),e),t.__exportStar(bDe(),e),t.__exportStar($De(),e)}(a7)),a7}var ybe;function Wd(){return ybe||(ybe=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.iotsApplyConfig=e.IoTsURI=void 0;var t=ea,n=w0,r=Sa;Object.defineProperty(e,"IoTsURI",{enumerable:!0,get:function(){return r.IoTsURI}}),t.__exportStar(d9t(),e),e.iotsApplyConfig=n.getApplyConfig(r.IoTsURI)}(i7)),i7}var bbe;function IDe(){if(bbe)return zR;bbe=1,Object.defineProperty(zR,"__esModule",{value:!0}),zR.ioTsIntersectionInterpreter=void 0;var e=nt,t=eo,n=Sa,r=Wd();return zR.ioTsIntersectionInterpreter=e.memo(function(){return{_F:n.IoTsURI,intersection:function(){for(var i=[],a=0;a":l.show(d)}}};return QR.showPrimitiveInterpreter=e.memo(function(){return{_F:c.ShowURI,date:function(l){return function(d){return new c.ShowType(u.showApplyConfig(l)({show:function(p){return p.toISOString()}},d,{}))}},boolean:function(l){return function(d){return new c.ShowType(u.showApplyConfig(l)(o.showBoolean,d,{}))}},string:function(l){return function(d){return new c.ShowType(u.showApplyConfig(l)(o.showString,d,{}))}},number:function(l){return function(d){return new c.ShowType(u.showApplyConfig(l)(o.showNumber,d,{}))}},bigint:function(l){return function(d){return new c.ShowType(u.showApplyConfig(l)({show:function(p){return JSON.stringify(p)}},d,{}))}},stringLiteral:function(l,d){return function(p){return new c.ShowType(u.showApplyConfig(d)(o.showString,p,{}))}},numberLiteral:function(l,d){return function(p){return new c.ShowType(u.showApplyConfig(d)(o.showNumber,p,{}))}},oneOfLiterals:function(l,d){return function(p){return new c.ShowType(u.showApplyConfig(d)(f,p,{}))}},tag:function(l,d){return function(p){return new c.ShowType(u.showApplyConfig(d)(o.showString,p,{}))}},keysOf:function(l,d){return function(p){return new c.ShowType(u.showApplyConfig(d)(o.showString,p,{}))}},nullable:function(l,d){return function(p){return n.pipe(l(p).show,function(v){return new c.ShowType(u.showApplyConfig(d)(r.getShow(v),p,{show:v}))})}},optional:function(l,d){return function(p){return n.pipe(l(p).show,function(v){return new c.ShowType(u.showApplyConfig(d)(s(v),p,{show:v}))})}},mutable:function(l,d){return function(p){return n.pipe(l(p).show,function(v){return new c.ShowType(u.showApplyConfig(d)(v,p,{show:v}))})}},array:function(l,d){return function(p){return n.pipe(l(p).show,function(v){return new c.ShowType(u.showApplyConfig(d)(i.getShow(v),p,{show:v}))})}},nonEmptyArray:function(l,d){return function(p){return n.pipe(l(p).show,function(v){return new c.ShowType(u.showApplyConfig(d)(a.getShow(v),p,{show:v}))})}},uuid:function(l){return function(d){return new c.ShowType(u.showApplyConfig(l)(o.showString,d,{}))}},either:function(l,d,p){return function(v){return function(h,$){return new c.ShowType(u.showApplyConfig(p)(t.getShow(h,$),v,{left:h,right:$}))}(l(v).show,d(v).show)}},option:function(l,d){return function(p){return n.pipe(l(p).show,function(v){return new c.ShowType(u.showApplyConfig(d)(r.getShow(v),p,{show:v}))})}},unknownE:function(l,d){return function(p){return n.pipe(l(p).show,function(v){return new c.ShowType(u.showApplyConfig(d)(v,p,{show:v}))})}}}}),QR}var eO={},Ibe;function ADe(){if(Ibe)return eO;Ibe=1,Object.defineProperty(eO,"__esModule",{value:!0}),eO.showObjectInterpreter=void 0;var e=ea,t=nt,n=SDe,r=Nd(),i=wa,a=function(u){return u},o=function(u){return{show:function(c){return c===void 0?"undefined":u.show(c)}}};return eO.showObjectInterpreter=t.memo(function(){return{_F:i.ShowURI,interface:function(u,c,f){return function(s){var l=t.projectFieldWithEnv(u,s)("show");return new i.ShowType(r.showApplyConfig(f)(n.getStructShow(l),s,{shows:l}))}},partial:function(u,c,f){return function(s){var l=t.mapRecord(t.projectFieldWithEnv(u,s)("show"),o);return new i.ShowType(r.showApplyConfig(f)(a(n.getStructShow(l)),s,{shows:l}))}},both:function(u,c,f,s){return function(l){var d=t.projectFieldWithEnv(u,l)("show"),p=t.mapRecord(t.projectFieldWithEnv(c,l)("show"),o);return new i.ShowType(r.showApplyConfig(s)(n.getStructShow(e.__assign(e.__assign({},d),p)),l,{shows:d,showsPartial:p}))}}}}),eO}var tO={},_be;function MDe(){if(_be)return tO;_be=1,Object.defineProperty(tO,"__esModule",{value:!0}),tO.showTaggedUnionInterpreter=void 0;var e=nt,t=Nd(),n=wa;return tO.showTaggedUnionInterpreter=e.memo(function(){return{_F:n.ShowURI,taggedUnion:function(r,i,a,o){return function(u){var c=e.mapRecord(i,function(f){return f(u).show.show});return new n.ShowType(t.showApplyConfig(o)({show:function(f){return c[f[r]](f)}},u,{}))}}}}),tO}var nO={},Sbe;function RDe(){if(Sbe)return nO;Sbe=1,Object.defineProperty(nO,"__esModule",{value:!0}),nO.showRecursiveInterpreter=void 0;var e=nt,t=wa,n=Nd();return nO.showRecursiveInterpreter=e.memo(function(){return{_F:t.ShowURI,recursive:function(r,i,a){var o=e.memo(function(){return r(u)}),u=function(c){return new t.ShowType(n.showApplyConfig(a)({show:function(f){return o()(c).show.show(f)}},c,{}))};return u}}}),nO}var rO={},wbe;function ODe(){if(wbe)return rO;wbe=1,Object.defineProperty(rO,"__esModule",{value:!0}),rO.showSetInterpreter=void 0;var e=nt,t=lu,n=CNe,r=wa,i=Nd();return rO.showSetInterpreter=e.memo(function(){return{_F:r.ShowURI,set:function(a,o,u){return function(c){return t.pipe(a(c).show,function(f){return new r.ShowType(i.showApplyConfig(u)(n.getShow(f),c,{show:f}))})}}}}),rO}var iO={},Abe;function EDe(){if(Abe)return iO;Abe=1,Object.defineProperty(iO,"__esModule",{value:!0}),iO.showStrMapInterpreter=void 0;var e=nt,t=lu,n=S0,r=Nd(),i=wa;return iO.showStrMapInterpreter=e.memo(function(){return{_F:i.ShowURI,strMap:function(a,o){return function(u){return t.pipe(a(u).show,function(c){return new i.ShowType(r.showApplyConfig(o)(n.getShow(c),u,{show:c}))})}},record:function(a,o,u){return function(c){return function(f,s){return new i.ShowType(r.showApplyConfig(u)(n.getShow(s),c,{domainShow:f,codomainShow:s}))}(a(c).show,o(c).show)}}}}),iO}var aO={},Mbe;function TDe(){if(Mbe)return aO;Mbe=1,Object.defineProperty(aO,"__esModule",{value:!0}),aO.showUnknownInterpreter=void 0;var e=nt,t=lu,n=Nd(),r=wa;return aO.showUnknownInterpreter=e.memo(function(){return{_F:r.ShowURI,unknown:function(i){return function(a){return t.pipe({show:function(o){return""}},function(o){return new r.ShowType(n.showApplyConfig(i)(o,a,{show:o}))})}}}}),aO}var oO={},Rbe;function CDe(){if(Rbe)return oO;Rbe=1,Object.defineProperty(oO,"__esModule",{value:!0}),oO.showNewtypeInterpreter=void 0;var e=nt,t=Ln,n=Nd(),r=wa,i=function(a){return a};return oO.showNewtypeInterpreter=e.memo(function(){return{_F:r.ShowURI,newtype:function(a){return function(o,u){return function(c){return t.pipe(o(c).show,function(f){return new r.ShowType(n.showApplyConfig(u)(i({show:function(s){return"<"+a+">("+f.show(s)+")"}}),c,{show:f}))})}}},newtypeIso:function(a,o,u,c){return function(f){return t.pipe(o(f).show,function(s){return new r.ShowType(n.showApplyConfig(c)({show:function(l){return"<"+u+">("+s.show(a.reverseGet(l))+")"}},f,{show:s}))})}},newtypePrism:function(a,o,u,c){return function(f){return t.pipe(o(f).show,function(s){return new r.ShowType(n.showApplyConfig(c)({show:function(l){return"<"+u+">("+s.show(a.reverseGet(l))+")"}},f,{show:s}))})}}}}),oO}var uO={},Obe;function PDe(){if(Obe)return uO;Obe=1,Object.defineProperty(uO,"__esModule",{value:!0}),uO.showRefinedInterpreter=void 0;var e=nt,t=lu,n=Nd(),r=wa;return uO.showRefinedInterpreter=e.memo(function(){return{_F:r.ShowURI,refined:function(i,a,o,u){return function(c){return t.pipe(i(c).show,function(f){return new r.ShowType({show:function(s){return"<"+o+">("+n.showApplyConfig(u)(f,c,{show:f}).show(s)+")"}})})}},constrained:function(i,a,o,u){return function(c){return t.pipe(i(c).show,function(f){return new r.ShowType({show:function(s){return"<"+o+">("+n.showApplyConfig(u)(f,c,{show:f}).show(s)+")"}})})}}}}),uO}var Ebe;function h9t(){return Ebe||(Ebe=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=ea;t.__exportStar(wDe(),e),t.__exportStar(FDe(),e),t.__exportStar(ADe(),e),t.__exportStar(MDe(),e),t.__exportStar(RDe(),e),t.__exportStar(ODe(),e),t.__exportStar(EDe(),e),t.__exportStar(TDe(),e),t.__exportStar(CDe(),e),t.__exportStar(PDe(),e)}(l7)),l7}var Tbe;function Nd(){return Tbe||(Tbe=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.showApplyConfig=e.ShowURI=void 0;var t=ea,n=w0,r=wa;Object.defineProperty(e,"ShowURI",{enumerable:!0,get:function(){return r.ShowURI}}),t.__exportStar(h9t(),e),e.showApplyConfig=n.getApplyConfig(r.ShowURI)}(s7)),s7}var Cbe;function FDe(){if(Cbe)return XR;Cbe=1,Object.defineProperty(XR,"__esModule",{value:!0}),XR.showIntersectionInterpreter=void 0;var e=nt,t=wa,n=Nd();return XR.showIntersectionInterpreter=e.memo(function(){return{_F:t.ShowURI,intersection:function(){for(var r=[],i=0;i({lensFromProp:iI.fromProp(),lensFromProps:iI.fromProps(),lensFromPath:iI.fromPath(),indexFromAt:$ie.fromAt,optionalFromOptionProp:eq.fromOptionProp(),optionalFromNullableProp:eq.fromNullableProp(),prism:xE.some(),prismFromPredicate:xE.fromPredicate}),LHt=DHt(),BHt=()=>LHt,yLe=e=>e,bLe=e=>()=>t=>t,$Le=(e,t)=>Object.assign((...r)=>e(...r),t),ILe=(e,t)=>$Le(e,Object.assign({},e,t)),_Le=e=>t=>e(t),VHt=e=>e,zHt=e=>e;function KHt(e,t){return zHt(VHt($Le(_Le(e),t(e))))}function GHt(e,t){const n=KHt(e,t);return ILe(n,Object.assign(Object.assign({},BHt()),{derive:yLe(n)}))}var SLe={},s6={};Object.defineProperty(s6,"__esModule",{value:!0});s6.Ctors=void 0;var jbe=ea,HHt=S0,JHt=function(e){return function(t){var n=HHt.mapWithIndex(function(r,i){return function(a){var o;return jbe.__assign(jbe.__assign({},a),(o={},o[e]=r,o))}})(t);return{of:n,as:n,make:function(r){return r},tag:e}}};s6.Ctors=JHt;var l6={};const wLe=Et(xHt);Object.defineProperty(l6,"__esModule",{value:!0});l6.Matchers=void 0;var YHt=ND,kbe=wLe,ZHt=function(e){return function(t){var n=function(c,f){return function(s){return(c[s[e]]||f)(s)}},r=function(c){return new kbe.Lens(function(f){return c[f[e]].get(f)},function(f){return function(s){return c[s[e]].set(f)(s)}})},i=function(c){return new kbe.Optional(function(f){var s=c[f[e]];return s!==void 0?s.getOption(f):YHt.none},function(f){return function(s){var l=c[s[e]];return l!==void 0?l.set(f)(s):s}})},a=function(c){return function(f){var s=c[f[e]];return s?s(f):f}},o=function(c){return c},u=function(c){return function(f,s){var l=n(f,s||function(d){return function(p){return p}});return function(d,p){var v=d===void 0?c:d;return p[e]in t?l(p)(v):v}}};return{matchStrict:n,match:n,transform:a,fold:o,createReducer:u,createPartialReducer:u,strict:function(c){return c},matchLens:r,matchOptional:i}}};l6.Matchers=ZHt;var d6={};Object.defineProperty(d6,"__esModule",{value:!0});d6.MonocleFor=void 0;var Kv=wLe,XHt=function(){return{lensFromProp:Kv.Lens.fromProp(),lensFromProps:Kv.Lens.fromProps(),lensFromPath:Kv.Lens.fromPath(),indexFromAt:Kv.Index.fromAt,optionalFromOptionProp:Kv.Optional.fromOptionProp(),optionalFromNullableProp:Kv.Optional.fromNullableProp(),prism:Kv.Prism.some(),prismFromPredicate:Kv.Prism.fromPredicate}},QHt=XHt(),eJt=function(){return QHt};d6.MonocleFor=eJt;var p6={};Object.defineProperty(p6,"__esModule",{value:!0});p6.Predicates=void 0;var tJt=S0,nJt=function(e){return function(t){return{is:tJt.mapWithIndex(function(n,r){return function(i){return i[e]===n}})(t),verified:function(n){return n[e]in t},isAnyOf:function(n){return function(r){return n.indexOf(r[e])!==-1}}}}};p6.Predicates=nJt;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.makeADT=e.ofType=e.intersectADT=e.unionADT=void 0;var t=ea,n=zje,r=Dee,i=lu,a=S0,o=s6,u=l6,c=d6,f=p6,s=function(g,_){return t.__assign(t.__assign({},g),_)},l=a.fromFoldable({concat:i.identity},n.array),d=function(g){return i.tuple(g,null)},p=function(g,_){return l(n.intersection(r.eqString)(Object.keys(g),Object.keys(_)).map(d))},v=function(g,_){return l(n.difference(r.eqString)(Object.keys(g),_).map(d))},h=function(g,_){return l(n.intersection(r.eqString)(Object.keys(g),_).map(d))},$=function(g){var _=n.reduceRight(g[0].keys,function(I,A){return s(I.keys,A)})(g);return e.makeADT(g[0].tag)(_)};e.unionADT=$;var b=function(g,_){return e.makeADT(g.tag)(p(g.keys,_.keys))};e.intersectADT=b;var y=function(){return 1};e.ofType=y;var m=function(g){return function(_){var I=_,A=o.Ctors(g)(I),E=f.Predicates(g)(I),N=c.MonocleFor(),U=u.Matchers(g)(I),te=function(J){return e.makeADT(g)(h(I,J))},Ie=function(J){return e.makeADT(g)(v(I,J))},je=t.__assign(t.__assign(t.__assign(t.__assign(t.__assign({},A),E),N),U),{tag:g,keys:I,select:te,exclude:Ie});return je}};e.makeADT=m})(SLe);const ALe=Mee({concat:Re},oEe),rJt=(e,t)=>ALe(a3(qJ)(Object.keys(e),t).map(n=>ix(n,e[n]))),iJt=(e,t)=>ALe(o3(qJ)(Object.keys(e),t).map(n=>ix(n,e[n])));function _ie(e){return t=>n=>{const r=e(f=>f.taggedUnion(t,SFe((s,l)=>l(f))(n))),i=SLe.makeADT(t)(n),a=_ie(e)(t),o=f=>a(rJt(n,f)),u=f=>a(iJt(n,f));return ILe(_Le(r),Object.assign(Object.assign(Object.assign({},r),i),{selectMorph:o,excludeMorph:u}))}}function aJt(e,t){const n=a=>GHt(e(a),t),r=_ie(n),i=bLe()();return{summon:n,tagged:r,define:i}}const oJt=Object.freeze(Object.defineProperty({__proto__:null,defineFor:bLe,interpretable:yLe,makeSummoner:aJt,makeTagged:_ie},Symbol.toStringTag,{value:"Module"})),uJt=Et(oJt);Object.defineProperty(tb,"__esModule",{value:!0});var Sie=tb.summonFor=tb.AsUOpaque=tb.AsOpaque=void 0,cJt=PD,fJt=YWe,sJt=kNe,Ube=Xje,lJt=_De,dJt=uJt,pJt=function(){return function(e){return e}};tb.AsOpaque=pJt;var hJt=function(){return function(e){return e}};tb.AsUOpaque=hJt;var vJt=function(e){return dJt.makeSummoner(cJt.cacheUnaryFunction,function(t){var n=t(Ube.modelIoTsNonStrictInterpreter())(e),r=n.create,i=n.type;return{build:function(a){return a},eq:t(fJt.modelEqInterpreter())(e).eq,show:t(lJt.modelShowInterpreter())(e).show,arb:t(sJt.modelFastCheckInterpreter())(e).arb,strictType:t(Ube.modelIoTsStrictInterpreter())(e).type,type:i,create:r}})};Sie=tb.summonFor=vJt;var wt=(e=>(e.RequestTimeout="RequestTimeout",e.RequestFailure="RequestFailure",e.SerializationError="SerializationError",e.MissingTenantIdClaim="MissingTenantIdClaim",e.MissingSessionIdClaim="MissingSessionIdClaim",e.TenantAccessForbidden="TenantAccessForbidden",e.SessionIdInvalid="SessionIdInvalid",e.AuthenticationFailure="AuthenticationFailure",e.SideLoadingForbidden="SideLoadingForbidden",e.UsageRuleRestriction="UsageRuleRestriction",e.ConfigurationModelInvalid="ConfigurationModelInvalid",e.SolutionNotFeasible="SolutionNotFeasible",e.ConfigurationModelNotFound="ConfigurationModelNotFound",e.SolverInitializationFailure="SolverInitializationFailure",e.ConfigurationModelLoadFailure="ConfigurationModelLoadFailure",e.ConfigurationInitializationFailure="ConfigurationInitializationFailure",e.SolverPoolInitializationFailure="SolverPoolInitializationFailure",e.SetDecisionConflict="SetDecisionConflict",e.SolveOperationTimeout="SolveOperationTimeout",e.ExplainConflict="ExplainConflict",e.ExplainFailure="ExplainFailure",e.SnapshotInvalid="SnapshotInvalid",e.SnapshotNotFound="SnapshotNotFound",e.ConfigurationModelNotFeasible="ConfigurationModelNotFeasible",e.MakeManyDecisionsConflict="MakeManyDecisionsConflict",e.SpecifiedDeploymentForbidden="SpecifiedDeploymentForbidden",e.AttributeNotFound="AttributeNotFound",e.ChoiceAttributeNotFound="ChoiceAttributeNotFound",e.ComponentAttributeNotFound="ComponentAttributeNotFound",e.NumericAttributeNotFound="NumericAttributeNotFound",e.BooleanAttributeNotFound="BooleanAttributeNotFound",e.ChoiceValueNotFound="ChoiceValueNotFound",e.NumericDecisionOutOfRange="NumericDecisionOutOfRange",e.ConflictWithConsequence="ConflictWithConsequence",e.DecisionsToRespectInvalid="DecisionsToRespectInvalid",e.SessionNotFound="SessionNotFound",e.ServerError="ServerError",e.ConnectionError="ConnectionError",e.TaskCancelled="TaskCancelled",e.SessionClosed="SessionClosed",e.StoredConfigurationInvalid="StoredConfigurationInvalid",e))(wt||{}),go=(e=>(e.whyIsNotSatisfied="why-is-not-satisfied",e.whyIsStateNotPossible="why-is-state-not-possible",e))(go||{}),Wr=(e=>(e.choiceValue="choice-value",e.component="component",e.boolean="boolean",e.numeric="numeric",e.configuration="configuration",e.attribute="attribute",e))(Wr||{}),Im=(e=>(e.all="all",e.none="none",e.specific="specific",e))(Im||{}),r_=(e=>(e.Channel="Channel",e.Package="Package",e))(r_||{}),we=(e=>(e.Boolean="Boolean",e.Numeric="Numeric",e.Choice="Choice",e.Component="Component",e))(we||{}),wo=(e=>(e.Included="Included",e.Excluded="Excluded",e))(wo||{}),qu=(e=>(e.Included="Included",e.Excluded="Excluded",e))(qu||{}),ti=(e=>(e.Implicit="Implicit",e.Explicit="Explicit",e))(ti||{}),rb=(e=>(e.Mandatory="Mandatory",e.Optional="Optional",e))(rb||{}),DE=(e=>(e.Always="Always",e.Optional="Optional",e))(DE||{});const mJt=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),wie=e=>e.type===we.Boolean,Aie=e=>e.type===we.Choice,Mie=e=>e.type===we.Numeric,Rie=e=>e.type===we.Component,QF=Object.freeze(Object.defineProperty({__proto__:null,booleanAttributeRefinement:wie,choiceAttributeRefinement:Aie,componentAttributeRefinement:Rie,numericAttributeRefinement:Mie},Symbol.toStringTag,{value:"Module"}));function tl(e){const t=[...e.sharedConfigurationModelId?["shared",e.sharedConfigurationModelId]:["root"],...e.componentPath??[],e.localId];return R(t,dt(n=>n.replace("::","|::|")),n=>n.join("::"))}function gJt(e,t,n){return R(e,Rh(Vu),dt(([r,i])=>i),Nu(r=>{if(r.id.sharedConfigurationModelId!=t.sharedConfigurationModelId)return!1;const i=[...t.componentPath??[],t.localId],a=R(r.id.componentPath??[],n?ORe(i.length):Re);return tC(He).equals(i,a)}))}function yJt(e,t,n){return R(e,Rh(Vu),dt(([r,i])=>i),Nu(r=>r.id.sharedConfigurationModelId==t&&(n||Wu(r.id.componentPath??[]))))}function bJt(e){return R(e,Rh(Vu),dt(([t,n])=>n),Nu(t=>t.id.sharedConfigurationModelId==null&&Wu(t.id.componentPath??[])))}function h6(e){return t=>R(t.attributes,oD(e),Rh(Vu),dt(([n,r])=>r))}function $Jt(e){return h6(Aie)(e)}function IJt(e){return h6(Rie)(e)}function _Jt(e){return h6(Mie)(e)}function SJt(e){return h6(wie)(e)}function eW(e,t,n){const r=typeof t=="string"?t:tl(t),i=e.attributes.get(r);return i&&(n??BFe)(i)?i:void 0}function MLe(e,t){return eW(e,t,Aie)}function wJt(e,t,n){const r=MLe(e,t);return((r==null?void 0:r.values)??nu).get(n)}function AJt(e,t){return eW(e,t,Mie)}function MJt(e,t){return eW(e,t,wie)}function RJt(e,t){return eW(e,t,Rie)}const OJt=Object.freeze(Object.defineProperty({__proto__:null,getAttribute:eW,getAttributesOfComponentAttribute:gJt,getAttributesOfRootConfigurationModel:bJt,getAttributesOfSharedConfigurationModel:yJt,getBooleanAttribute:MJt,getBooleanAttributes:SJt,getChoiceAttribute:MLe,getChoiceAttributes:$Jt,getChoiceValue:wJt,getComponentAttribute:RJt,getComponentAttributes:IJt,getNumericAttribute:AJt,getNumericAttributes:_Jt},Symbol.toStringTag,{value:"Module"}));function Oie(e){return e.possibleDecisionStates.includes(wo.Included)}function RLe(e){return!Oie(e)}const PG=Object.freeze(Object.defineProperty({__proto__:null,isAllowed:Oie,isBlocked:RLe},Symbol.toStringTag,{value:"Module"}));function EJt(e){return Ft(e).with({type:we.Choice},t=>t.cardinality.lowerBound>0).with({type:we.Boolean},t=>t.selection===rb.Mandatory).with({type:we.Numeric},t=>t.selection===rb.Mandatory).with({type:we.Component},t=>t.inclusion===DE.Optional&&t.selection===rb.Mandatory).exhaustive()}function TJt(e){return e.cardinality.upperBound>1}function CJt(e){return R(e.values,Rh(Vu),dt(([t,n])=>n),Nu(Oie))}function PJt(e){return R(e.values,Rh(Vu),dt(([t,n])=>n),Nu(RLe))}function FJt(e){return R(e.values,oD(t=>{var n;return((n=t.decision)==null?void 0:n.state)===wo.Included}),Rh(Vu),dt(([t,n])=>n))}const H1=Object.freeze(Object.defineProperty({__proto__:null,getAllowedChoiceValues:CJt,getBlockedChoiceValues:PJt,getIncludedChoiceValues:FJt,isChoiceAttributeMultiSelect:TJt,isMandatory:EJt},Symbol.toStringTag,{value:"Module"})),Eie={whyIsNotSatisfied:{configuration:{question:go.whyIsNotSatisfied,subject:Wr.configuration},attribute:e=>({question:go.whyIsNotSatisfied,subject:Wr.attribute,attributeId:e})},whyIsStateNotPossible:{choice:e=>({choiceValue:t=>({state:n=>({question:go.whyIsStateNotPossible,subject:Wr.choiceValue,attributeId:e,choiceValueId:t,state:n})})}),boolean:e=>({state:t=>({question:go.whyIsStateNotPossible,subject:Wr.boolean,attributeId:e,state:t})}),numeric:e=>({state:t=>({question:go.whyIsStateNotPossible,subject:Wr.numeric,attributeId:e,state:t})}),component:e=>({state:t=>({question:go.whyIsStateNotPossible,subject:Wr.component,attributeId:e,state:t})})}},WJt=Object.freeze(Object.defineProperty({__proto__:null,explainQuestionBuilder:Eie},Symbol.toStringTag,{value:"Module"})),NJt=e=>e.attributeType===we.Boolean,jJt=e=>e.attributeType===we.Numeric,kJt=e=>e.attributeType===we.Component,UJt=e=>e.attributeType===we.Choice,OLe=e=>e.kind===ti.Explicit,ELe=e=>e.kind===ti.Implicit,qJt=Object.freeze(Object.defineProperty({__proto__:null,collectedBooleanDecisionRefinement:NJt,collectedChoiceDecisionRefinement:UJt,collectedComponentDecisionRefinement:kJt,collectedExplicitDecisionRefinement:OLe,collectedImplicitDecisionRefinement:ELe,collectedNumericDecisionRefinement:jJt},Symbol.toStringTag,{value:"Module"}));var xp=(e=>(e.Included="Included",e.Excluded="Excluded",e))(xp||{}),FG=(e=>(e.Mandatory="Mandatory",e.Optional="Optional",e))(FG||{}),WG=(e=>(e.Always="Always",e.Optional="Optional",e))(WG||{}),NG=(e=>(e.Implicit="Implicit",e.Explicit="Explicit",e))(NG||{}),Xo=(e=>(e.Included="Included",e.Excluded="Excluded",e.Undefined="Undefined",e))(Xo||{});let xJt=class{constructor(t={}){this.baseUrl="https://spc.cloud.ceventis.de/hca/api/engine",this.securityData=null,this.abortControllers=new Map,this.customFetch=(...n)=>fetch(...n),this.baseApiParams={credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"},this.setSecurityData=n=>{this.securityData=n},this.contentFormatters={"application/json":n=>n!==null&&(typeof n=="object"||typeof n=="string")?JSON.stringify(n):n,"text/plain":n=>n!==null&&typeof n!="string"?JSON.stringify(n):n,"multipart/form-data":n=>Object.keys(n||{}).reduce((r,i)=>{const a=n[i];return r.append(i,a instanceof Blob?a:typeof a=="object"&&a!==null?JSON.stringify(a):`${a}`),r},new FormData),"application/x-www-form-urlencoded":n=>this.toQueryString(n)},this.createAbortSignal=n=>{if(this.abortControllers.has(n)){const i=this.abortControllers.get(n);return i?i.signal:void 0}const r=new AbortController;return this.abortControllers.set(n,r),r.signal},this.abortRequest=n=>{const r=this.abortControllers.get(n);r&&(r.abort(),this.abortControllers.delete(n))},this.request=async({body:n,secure:r,path:i,type:a,query:o,format:u,baseUrl:c,cancelToken:f,...s})=>{const l=(typeof r=="boolean"?r:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},d=this.mergeRequestParams(s,l),p=o&&this.toQueryString(o),v=this.contentFormatters[a||"application/json"],h=u||d.format;return this.customFetch(`${c||this.baseUrl||""}${i}${p?`?${p}`:""}`,{...d,headers:{...d.headers||{},...a&&a!=="multipart/form-data"?{"Content-Type":a}:{}},signal:(f?this.createAbortSignal(f):d.signal)||null,body:typeof n>"u"||n===null?null:v(n)}).then(async $=>{const b=$;b.data=null,b.error=null;const y=h?await $[h]().then(m=>(b.ok?b.data=m:b.error=m,b)).catch(m=>(b.error=m,b)):b;if(f&&this.abortControllers.delete(f),!$.ok)throw y;return y})},Object.assign(this,t)}encodeQueryParam(t,n){return`${encodeURIComponent(t)}=${encodeURIComponent(typeof n=="number"?n:`${n}`)}`}addQueryParam(t,n){return this.encodeQueryParam(n,t[n])}addArrayQueryParam(t,n){return t[n].map(r=>this.encodeQueryParam(n,r)).join("&")}toQueryString(t){const n=t||{};return Object.keys(n).filter(r=>typeof n[r]<"u").map(r=>Array.isArray(n[r])?this.addArrayQueryParam(n,r):this.addQueryParam(n,r)).join("&")}addQueryParams(t){const n=this.toQueryString(t);return n?`?${n}`:""}mergeRequestParams(t,n){return{...this.baseApiParams,...t,...n||{},headers:{...this.baseApiParams.headers||{},...t.headers||{},...n&&n.headers||{}}}}};/** * @title Viamedici.Spc.Engine.ConfigurationEngine.RestApi.Service * @version v2 * @license © 2024 Viamedici - All rights reserved (https://viamedici.de) * @termsOfService None * @baseUrl https://spc.cloud.ceventis.de/hca/api/engine * @contact Viamedici Software GmbH (https://viamedici.de) */let TLe=class extends xJt{constructor(){super(...arguments),this.consequence={consequenceGet:(t={})=>this.request({path:"/v2/session/configuration/consequence",method:"GET",secure:!0,format:"json",...t})},this.decision={decisionPutDecision:(t,n={})=>this.request({path:"/v2/session/configuration/decision",method:"PUT",body:t,secure:!0,type:"application/json",format:"json",...n}),decisionGetAllDecisions:(t={})=>this.request({path:"/v2/session/configuration/decision",method:"GET",secure:!0,format:"json",...t}),decisionPutMany:(t,n={})=>this.request({path:"/v2/session/configuration/decision/many",method:"PUT",body:t,secure:!0,type:"application/json",format:"json",...n})},this.explain={explainWhyNotSatisfied:(t,n={})=>this.request({path:"/v2/session/configuration/consequence/explain/why-not-satisfied",method:"POST",body:t,secure:!0,type:"application/json",format:"json",...n}),explainWhyNotSatisfiedDecisions:(t,n={})=>this.request({path:"/v2/session/configuration/consequence/explain/why-not-satisfied/answer/decisions",method:"POST",body:t,secure:!0,type:"application/json",format:"json",...n}),explainWhyNotSatisfiedRules:(t,n={})=>this.request({path:"/v2/session/configuration/consequence/explain/why-not-satisfied/answer/constraints",method:"POST",body:t,secure:!0,type:"application/json",format:"json",...n}),explainWhyStateNotPossible:(t,n={})=>this.request({path:"/v2/session/configuration/consequence/explain/why-state-not-possible",method:"POST",body:t,secure:!0,type:"application/json",format:"json",...n}),explainWhyStateNotPossibleDecisions:(t,n={})=>this.request({path:"/v2/session/configuration/consequence/explain/why-state-not-possible/answer/decisions",method:"POST",body:t,secure:!0,type:"application/json",format:"json",...n}),explainWhyStateNotPossibleRules:(t,n={})=>this.request({path:"/v2/session/configuration/consequence/explain/why-state-not-possible/answer/constraints",method:"POST",body:t,secure:!0,type:"application/json",format:"json",...n})},this.meta={metaGetConfigurationModel:(t={})=>this.request({path:"/v2/session/configuration/meta/configuration-model",method:"GET",secure:!0,format:"json",...t}),metaGet:(t={})=>this.request({path:"/v2/session/configuration/meta",method:"GET",secure:!0,format:"json",...t})},this.session={sessionPost:(t,n={})=>this.request({path:"/v2/session",method:"POST",body:t,secure:!0,type:"application/json",format:"json",...n}),sessionDelete:(t,n={})=>this.request({path:`/v2/session/${t}`,method:"DELETE",secure:!0,...n}),sessionClose:(t,n={})=>this.request({path:"/v2/session/close",method:"POST",body:t,secure:!0,type:"application/json",...n})}}};const DJt="https://spc.cloud.ceventis.de/hca/api/engine",qbe=new Map,xbe=new Map;function tW(e){const t=e??DJt;let n=qbe.get(t);return n||(n=new TLe({baseUrl:t}),qbe.set(t,n)),n}function LJt(e){const t=(...r)=>typeof r[0]=="string"?fetch(e,r[1]):fetch(...r);let n=xbe.get(e);return n||(n=new TLe({customFetch:t}),xbe.set(e,n)),n.session.sessionPost}function hs(e){return{sharedConfigurationModelId:e.sharedConfigurationModelId,componentPath:e.componentPath!=null?nI(e.componentPath):void 0,localId:e.localId}}function CLe(e){return{type:"Choice",attributeId:hs(e.attributeId),choiceValueId:e.choiceValueId,state:Ft(e.state).with(vb.nullish,()=>Xo.Undefined).with(wo.Included,()=>Xo.Included).with(wo.Excluded,()=>Xo.Excluded).exhaustive()}}function PLe(e){return{type:"Component",attributeId:hs(e.attributeId),state:Ft(e.state).with(vb.nullish,()=>Xo.Undefined).with(qu.Included,()=>Xo.Included).with(qu.Excluded,()=>Xo.Excluded).exhaustive()}}function FLe(e){return{type:"Numeric",attributeId:hs(e.attributeId),state:e.state}}function WLe(e){return{type:"Boolean",attributeId:hs(e.attributeId),state:e.state}}function BJt(e){return Ft(e).with({type:we.Choice},CLe).with({type:we.Component},PLe).with({type:we.Boolean},WLe).with({type:we.Numeric},FLe).exhaustive()}function VJt(e){const t=Ft(e.configurationModelSource).returnType().with({type:r_.Channel},a=>({type:"Channel",deploymentName:a.deploymentName,channel:a.channel})).with({type:r_.Package},a=>({type:"Package",configurationModelPackage:a.configurationModelPackage})).exhaustive(),n=()=>{var a;const o=(a=e.allowedInExplain)!=null&&a.rules?Ft(e.allowedInExplain.rules).returnType().with({type:Im.all},()=>({type:"AllowedRulesAll"})).with({type:Im.none},()=>({type:"AllowedRulesNone"})).with({type:Im.specific},u=>({type:"AllowedRulesSpecific",rules:R(u.rules,dt(c=>({configurationModelId:c.configurationModelId,localId:c.localId})),nI)})).exhaustive():void 0;if(o)return{rules:o}},r=e.attributeRelations?R(e.attributeRelations,dt(a=>({attributeId:hs(a.attributeId),decisions:R(a.decisions,dt(hs),nI)})),nI):void 0,i=e.usageRuleParameters?e.usageRuleParameters:void 0;return{configurationModelSource:t,allowedInExplain:n(),attributeRelations:r,usageRuleParameters:i}}function zJt(e,t){const n=(c,f)=>R(e,Nu(c),dt(f),nI),r=n(c=>c.type===we.Boolean,WLe),i=n(c=>c.type===we.Numeric,FLe),a=n(c=>c.type===we.Component,PLe),o=n(c=>c.type===we.Choice,CLe),u=Ft(t).with({type:"DropExistingDecisions"},c=>({type:"DropExistingDecisions",conflictResolution:Ft(c.conflictHandling).with({type:"Automatic"},()=>({type:"Automatic"})).with({type:"Manual"},f=>({type:"Manual",includeConstraintsInConflictExplanation:f.includeConstraintsInConflictExplanation})).exhaustive()})).with({type:"KeepExistingDecisions"},()=>({type:"KeepExistingDecisions"})).exhaustive();return{booleanDecisions:r,componentDecisions:a,numericDecisions:i,choiceDecisions:o,mode:u}}function KJt(e){return Ft(e).returnType().with({subject:Wr.configuration},()=>({type:"Configuration"})).with({subject:Wr.attribute},t=>({type:"Attribute",attributeId:hs(t.attributeId)})).exhaustive()}function GJt(e){return Ft(e).returnType().with({subject:Wr.boolean},t=>({type:"Boolean",attributeId:hs(t.attributeId),state:t.state})).with({subject:Wr.numeric},t=>({type:"Numeric",attributeId:hs(t.attributeId),state:t.state})).with({subject:Wr.component},t=>({type:"Component",attributeId:hs(t.attributeId),state:Ft(t.state).with(qu.Included,()=>xp.Included).with(qu.Excluded,()=>xp.Excluded).exhaustive()})).with({subject:Wr.choiceValue},t=>({type:"ChoiceValue",attributeId:hs(t.attributeId),choiceValueId:t.choiceValueId,state:Ft(t.state).with(wo.Included,()=>xp.Included).with(wo.Excluded,()=>xp.Excluded).exhaustive()})).exhaustive()}const hU={type:wt.ServerError};function HJt(e){return Ft(e).returnType().with({type:"ConfigurationModelNotFeasible"},JJt).with({type:"SpecifiedDeploymentForbidden"},YJt).with({type:"AttributeNotFound"},ZJt).with({type:"ChoiceAttributeNotFound"},XJt).with({type:"ComponentAttributeNotFound"},QJt).with({type:"NumericAttributeNotFound"},eYt).with({type:"BooleanAttributeNotFound"},tYt).with({type:"ChoiceValueNotFound"},nYt).with({type:"NumericDecisionOutOfRange"},rYt).with({type:"ConflictWithConsequence"},iYt).with({type:"DecisionsToRespectInvalid"},aYt).with({type:"SessionNotFound"},oYt).with({type:"PutManyDecisionsConflict"},()=>hU).with({type:"AssignedChannelNotFound"},()=>hU).with({type:"InternalServerError"},()=>hU).with({type:"RequestTimeout"},t=>qr(t,wt.RequestTimeout)).with({type:"RequestFailure"},t=>qr(t,wt.RequestFailure)).with({type:"SerializationError"},t=>qr(t,wt.SerializationError)).with({type:"MissingTenantIdClaim"},t=>qr(t,wt.MissingTenantIdClaim)).with({type:"MissingSessionIdClaim"},t=>qr(t,wt.MissingSessionIdClaim)).with({type:"TenantAccessForbidden"},t=>qr(t,wt.TenantAccessForbidden)).with({type:"SessionIdInvalid"},t=>qr(t,wt.SessionIdInvalid)).with({type:"AuthenticationFailure"},t=>qr(t,wt.AuthenticationFailure)).with({type:"SideLoadingForbidden"},t=>qr(t,wt.SideLoadingForbidden)).with({type:"UsageRuleRestriction"},t=>qr(t,wt.UsageRuleRestriction)).with({type:"ConfigurationModelInvalid"},t=>qr(t,wt.ConfigurationModelInvalid)).with({type:"SolutionNotFeasible"},t=>qr(t,wt.SolutionNotFeasible)).with({type:"ConfigurationModelNotFound"},t=>qr(t,wt.ConfigurationModelNotFound)).with({type:"SolverInitializationFailure"},t=>qr(t,wt.SolverInitializationFailure)).with({type:"ConfigurationModelLoadFailure"},t=>qr(t,wt.ConfigurationModelLoadFailure)).with({type:"ConfigurationInitializationFailure"},t=>qr(t,wt.ConfigurationInitializationFailure)).with({type:"SolverPoolInitializationFailure"},t=>qr(t,wt.SolverPoolInitializationFailure)).with({type:"SetDecisionConflict"},t=>qr(t,wt.SetDecisionConflict)).with({type:"SolveOperationTimeout"},t=>qr(t,wt.SolveOperationTimeout)).with({type:"ExplainConflict"},t=>qr(t,wt.ExplainConflict)).with({type:"ExplainFailure"},t=>qr(t,wt.ExplainFailure)).with({type:"SnapshotInvalid"},t=>qr(t,wt.SnapshotInvalid)).with({type:"SnapshotNotFound"},t=>qr(t,wt.SnapshotNotFound)).otherwise(()=>hU)}function qr(e,t){return{...e,type:t}}function JJt(e){return{...e,type:wt.ConfigurationModelNotFeasible,constraintExplanations:R(e.constraintExplanations??[],dt(Tie))}}function YJt(e){return{...e,type:wt.SpecifiedDeploymentForbidden}}function ZJt(e){return{...e,type:wt.AttributeNotFound,globalAttributeId:ni(e.globalAttributeId)}}function XJt(e){return{...e,type:wt.ChoiceAttributeNotFound,globalAttributeId:ni(e.globalAttributeId)}}function QJt(e){return{...e,type:wt.ComponentAttributeNotFound,globalAttributeId:ni(e.globalAttributeId)}}function eYt(e){return{...e,type:wt.NumericAttributeNotFound,globalAttributeId:ni(e.globalAttributeId)}}function tYt(e){return{...e,type:wt.BooleanAttributeNotFound,globalAttributeId:ni(e.globalAttributeId)}}function nYt(e){const{globalChoiceValueId:t,...n}=e;return{...n,type:wt.ChoiceValueNotFound,globalAttributeId:ni(t.attributeId),choiceValueId:t.choiceValueId}}function rYt(e){return{...e,type:wt.NumericDecisionOutOfRange,globalAttributeId:ni(e.globalAttributeId)}}function iYt(e){return{...e,type:wt.ConflictWithConsequence,globalAttributeId:ni(e.globalAttributeId)}}function aYt(e){return{...e,type:wt.DecisionsToRespectInvalid,globalAttributeId:ni(e.globalAttributeId)}}function oYt(){return{type:wt.SessionNotFound}}function uYt(e){const t=R(e.causedByBooleanDecisions,dt(a=>({type:we.Boolean,attributeId:ni(a.attributeId),state:a.state}))),n=R(e.causedByNumericDecisions,dt(a=>({type:we.Numeric,attributeId:ni(a.attributeId),state:a.state}))),r=R(e.causedByComponentDecisions,dt(a=>({type:we.Component,attributeId:ni(a.attributeId),state:NLe(a.state)}))),i=R(e.causedByChoiceDecisions,dt(a=>({type:we.Choice,attributeId:ni(a.attributeId),choiceValueId:a.choiceValueId,state:jLe(a.state)})));return{causedByBooleanDecisions:t,causedByNumericDecisions:n,causedByComponentDecisions:r,causedByChoiceValueDecisions:i}}function Tie(e){const t=R(e.causedByCardinalities,dt(r=>ni(r.attributeId))),n=R(e.causedByRules,dt(r=>cYt(r.constraintId)));return{causedByCardinalities:t,causedByRules:n}}function ni(e){const t=e.sharedConfigurationModelId!=null?e.sharedConfigurationModelId:void 0,n=e.componentPath!=null&&Jn(e.componentPath)?e.componentPath:void 0;return{localId:e.localId,componentPath:n,sharedConfigurationModelId:t}}function cYt(e){return{localId:e.localId,configurationModelId:e.configurationModelId}}function NLe(e){return Ft(e).with(xp.Included,()=>qu.Included).with(xp.Excluded,()=>qu.Excluded).exhaustive()}function jLe(e){return Ft(e).with(xp.Included,()=>wo.Included).with(xp.Excluded,()=>wo.Excluded).exhaustive()}function v6(e){return Ft(e).with(NG.Explicit,()=>ti.Explicit).with(NG.Implicit,()=>ti.Implicit).exhaustive()}function kLe({state:e,kind:t}){return e!=null?{state:e,kind:v6(t)}:null}function ULe({state:e,kind:t}){return e!=null?{state:e,kind:v6(t)}:null}function qLe({state:e,kind:t}){return e===Xo.Included||e===Xo.Excluded?{state:Ft(e).with(Xo.Included,()=>qu.Included).with(Xo.Excluded,()=>qu.Excluded).exhaustive(),kind:v6(t)}:null}function xLe({state:e,kind:t}){return e===Xo.Included||e===Xo.Excluded?{state:Ft(e).with(Xo.Included,()=>wo.Included).with(Xo.Excluded,()=>wo.Excluded).exhaustive(),kind:v6(t)}:null}function d7(e){return Ft(e).with(FG.Mandatory,()=>rb.Mandatory).with(FG.Optional,()=>rb.Optional).exhaustive()}function fYt(e){return Ft(e).with(WG.Always,()=>DE.Always).with(WG.Optional,()=>DE.Optional).exhaustive()}function sYt(e){const t=R(e.componentDecisions,dt(a=>{var o;return{type:we.Component,attributeId:ni(a.attributeId),state:(o=qLe(a))==null?void 0:o.state}})),n=R(e.booleanDecisions,dt(a=>{var o;return{type:we.Boolean,attributeId:ni(a.attributeId),state:(o=kLe(a))==null?void 0:o.state}})),r=R(e.numericDecisions,dt(a=>{var o;return{type:we.Numeric,attributeId:ni(a.attributeId),state:(o=ULe(a))==null?void 0:o.state}})),i=R(e.choiceValueDecisions,dt(a=>{var o;return{type:we.Choice,attributeId:ni(a.attributeId),choiceValueId:a.choiceValueId,state:(o=xLe(a))==null?void 0:o.state}}));return R(i,Dl(t),Dl(r),Dl(n))}var DLe=function(e,t){return{get:e,set:t}},lYt=function(){return DLe(Re,Mo)},dYt=function(e){return function(t){return DLe(function(n){return t.get(n)[e]},function(n){return function(r){var i,a=t.get(r);return n===a[e]?r:t.set(Object.assign({},a,(i={},i[e]=n,i)))(r)}})}},pYt=lYt,hYt=function(e){return function(t){return function(n){var r=t.get(n),i=e(r);return r===i?n:t.set(i)(n)}}},vYt=dYt;const mYt=e=>e.hash!=null;function km(e){const t=new WeakMap;return{show:n=>{const r=t.get(n);if(r!=null)return r;const i=e.show(n);return t.set(n,i),i}}}const gYt=CS(_i),m6=e=>({show:t=>t==null?"":e.show(t)}),yYt={show:e=>e!=null&&Jn(e)?gYt.show(e):""},bYt=km(df({localId:_i,componentPath:yYt,sharedConfigurationModelId:m6(_i)})),$Yt=_i,IYt=R(df({localId:_i,configurationModel:_i}),km,m6),Um=e=>R(df({kind:_i,state:e}),km,m6),g6={id:bYt,key:$Yt,type:_i,sourceId:IYt,isSatisfied:rI,canContributeToConfigurationSatisfaction:rI},_Yt=df({...g6,decision:Um(rI),nonOptimisticDecision:Um(rI),possibleDecisionStates:km(CS(rI)),selection:_i}),SYt=df({...g6,decision:Um(lm),nonOptimisticDecision:Um(lm),selection:_i,range:km(df({max:lm,min:lm})),decimalPlaces:lm}),wYt=df({...g6,decision:Um(_i),nonOptimisticDecision:Um(_i),possibleDecisionStates:km(CS(_i)),selection:m6(_i),inclusion:_i}),AYt=df({...g6,cardinality:km(df({upperBound:lm,lowerBound:lm})),values:zQ(_i,df({id:_i,decision:Um(_i),nonOptimisticDecision:Um(_i),possibleDecisionStates:km(CS(_i))}))}),MYt={show:e=>Ft(e).with({type:we.Choice},AYt.show).with({type:we.Component},wYt.show).with({type:we.Boolean},_Yt.show).with({type:we.Numeric},SYt.show).exhaustive()},RYt=Ae(MYt.show,yC(e=>nwt.hash(e)));function OYt(e){return{...e,hash:RYt(e)}}function Cie(e){return aee(ree())(e)}const Hn=He,qi=at({localId:He,componentPath:R(tC(He),qT(e=>e??[])),sharedConfigurationModelId:Vn(He)}),Pie=at({localId:He,configurationModelId:He}),EYt=at({type:He,includeConstraintsInConflictExplanation:fr}),TYt=at({type:He}),CYt=Ls().with(e=>e.type==="Automatic",TYt).with(e=>e.type==="Manual",EYt),PYt=at({type:He,conflictHandling:CYt}),FYt=at({type:He}),WYt=Ls().with(e=>e.type==="DropExistingDecisions",PYt).with(e=>e.type==="KeepExistingDecisions",FYt),NYt=at({type:He,attributeId:qi,state:Vn(fr)}),jYt=at({type:He,attributeId:qi,state:Vn(tu)}),kYt=at({type:He,attributeId:qi,state:Vn(He)}),UYt=at({type:He,attributeId:qi,choiceValueId:He,state:Vn(He)}),Fie=Ls().with(e=>e.type===we.Boolean,NYt).with(e=>e.type===we.Numeric,jYt).with(e=>e.type===we.Component,kYt).with(e=>e.type===we.Choice,UYt),LLe=R(at({attributeId:qi,choiceValueId:NZ(He)}),qT(e=>Ft(e).with({type:we.Choice},t=>({attributeId:t.attributeId,choiceValueId:cn(t.choiceValueId)})).otherwise(t=>({attributeId:t.attributeId,choiceValueId:Ht})))),qYt=at({mode:WYt,decisions:Br(Fie)}),BLe=at({causedByDecisions:Br(Fie),solution:qYt}),VLe=at({causedByCardinalities:Br(qi),causedByRules:Br(Pie)}),xYt=at({key:Hn,sourceId:at({configurationModel:He,localId:He})}),tq=Vn(at({state:fr,kind:He})),DYt=at({type:He,id:qi,key:Hn,decision:tq,nonOptimisticDecision:tq}),nq=Vn(at({state:tu,kind:He})),LYt=at({type:He,id:qi,key:Hn,decision:nq,nonOptimisticDecision:nq}),rq=Vn(at({state:He,kind:He})),BYt=at({type:He,id:qi,key:Hn,decision:rq,nonOptimisticDecision:rq}),iq=Vn(at({state:He,kind:He})),VYt=at({type:He,id:qi,key:Hn,values:Br(at({id:He,decision:iq,nonOptimisticDecision:iq}))}),zYt=Ls().with(e=>e.type===we.Boolean,DYt).with(e=>e.type===we.Numeric,LYt).with(e=>e.type===we.Component,BYt).with(e=>e.type===we.Choice,VYt),KYt=at({type:He,id:qi,key:Hn,possibleDecisionStates:Br(fr),selection:He,isSatisfied:fr}),GYt=at({type:He,id:qi,key:Hn,range:at({max:tu,min:tu}),isSatisfied:fr,selection:He,decimalPlaces:tu}),HYt=at({type:He,id:qi,key:Hn,possibleDecisionStates:Br(He),isSatisfied:fr,inclusion:He,selection:Vn(He)}),JYt=at({type:He,id:qi,key:Hn,isSatisfied:fr,cardinality:at({upperBound:tu,lowerBound:tu}),values:Br(at({id:He,possibleDecisionStates:Br(He)}))}),YYt=Ls().with(e=>e.type===we.Boolean,KYt).with(e=>e.type===we.Numeric,GYt).with(e=>e.type===we.Component,HYt).with(e=>e.type===we.Choice,JYt),y6={type:He,id:qi,key:Hn,sourceId:Vn(at({configurationModel:He,localId:He})),canContributeToConfigurationSatisfaction:fr,isSatisfied:fr},ZYt=at({...y6,selection:He,possibleDecisionStates:Br(fr),decision:tq,nonOptimisticDecision:tq}),XYt=at({...y6,selection:He,range:at({max:tu,min:tu}),decimalPlaces:tu,decision:nq,nonOptimisticDecision:nq}),QYt=at({...y6,inclusion:He,selection:Vn(He),possibleDecisionStates:Br(He),decision:rq,nonOptimisticDecision:rq}),eZt=at({...y6,cardinality:at({upperBound:tu,lowerBound:tu}),values:ym(He,at({id:He,possibleDecisionStates:Br(He),decision:iq,nonOptimisticDecision:iq}))}),jG=Ls().with(e=>e.type===we.Boolean,ZYt).with(e=>e.type===we.Numeric,XYt).with(e=>e.type===we.Component,QYt).with(e=>e.type===we.Choice,eZt),tZt=To((e,t)=>e.hash===t.hash);at({isSatisfied:fr,attributes:ym(Hn,jG)});at({isSatisfied:fr,attributes:ym(Hn,tZt)});at({decisionExplanations:Br(BLe),constraintExplanations:Br(VLe)});at({type:He,title:He,detail:He,decisionExplanations:Br(BLe),constraintExplanations:Br(VLe)});const nZt=Ls().with(e=>e.accessToken!=null,at({accessToken:He})).with(e=>e.sessionCreateUrl!=null,at({sessionCreateUrl:He})),rZt=at({rules:Vn(Ls().with(e=>e.type===Im.none,at({type:He})).with(e=>e.type===Im.all,at({type:He})).with(e=>e.type===Im.specific,at({type:He,rules:Br(Pie)})))}),iZt=at({attributeId:qi,decisions:Br(qi)}),aZt=Ls().with(e=>e.type===r_.Channel,at({type:He,channel:He,deploymentName:He})).with(e=>e.type===r_.Package,at({type:He,configurationModelPackage:To(JWe)})),oZt=at({apiBaseUrl:Vn(He),sessionInitialisationOptions:nZt,configurationModelSource:aZt,provideSourceId:Vn(fr),optimisticDecisionOptions:Vn(at({restoreConfiguration:Vn(fr),applySolution:Vn(fr),makeDecision:Vn(fr),makeManyDecisions:Vn(fr)})),allowedInExplain:Vn(rZt),usageRuleParameters:Vn(bee(He)),attributeRelations:Vn(Br(iZt))});at({isSatisfied:fr,canContributeToSatisfaction:Br(Hn),meta:ym(Hn,xYt),decisions:ym(Hn,zYt),consequences:ym(Hn,YYt)});const uZt=at({isSatisfied:Vn(fr),attributes:at({added:Br(jG),changed:Br(jG),removed:Br(qi)})});let zLe="error";const cZt=Np(e=>{switch(e){case"debug":return["debug","info","warning","error"];case"info":return["info","warning","error"];case"warning":return["warning","error"];case"error":return["error"];case"silent":return[]}}),vU=e=>(...t)=>{if(cZt(zLe).includes(e))switch(e){case"debug":console.debug(...t);break;case"info":console.info(...t);break;case"warning":console.warn(...t);break;case"error":console.error(...t);break}},bo={setLogLevel:e=>{zLe=e},debug:vU("debug"),info:vU("info"),warn:vU("warning"),error:vU("error")},fZt=R(pYt(),vYt("attributes"));function Wie(e){const t=R(e.attributes,$I(n=>mYt(n)?n:OYt(n)));return{isSatisfied:e.isSatisfied,attributes:t}}function sZt(e){return R([...e.consequences.values()],dt(t=>Ft(t).returnType().with({type:we.Boolean},n=>({...n,canContributeToConfigurationSatisfaction:!1,decision:null,nonOptimisticDecision:null})).with({type:we.Numeric},n=>({...n,canContributeToConfigurationSatisfaction:!1,decision:null,nonOptimisticDecision:null})).with({type:we.Component},n=>({...n,canContributeToConfigurationSatisfaction:!1,decision:null,nonOptimisticDecision:null})).with({type:we.Choice},n=>({...n,canContributeToConfigurationSatisfaction:!1,values:R(n.values,dt(r=>({...r,decision:null,nonOptimisticDecision:null})),dt(r=>[r.id,r]),bI(He,IE(),gI))})).exhaustive()),dt(t=>[t.key,t]),bI(Hn,IE(),gI),t=>({attributes:t,isSatisfied:e.isSatisfied}),KLe(e),Wie)}function KLe(e){const t=n=>LE(lZt(r=>{const i=R(n,AS(Hn)(r.key));return i!=r.canContributeToConfigurationSatisfaction?cn({...r,canContributeToConfigurationSatisfaction:i}):Ht}));return n=>R({...n,isSatisfied:e.isSatisfied??n.isSatisfied},dZt([...(e.meta??nu).values(),...(e.decisions??nu).values(),...(e.consequences??nu).values()]),e.canContributeToSatisfaction?t(e.canContributeToSatisfaction):Re)}function LE(e){return R(fZt,hYt(R(e,vD,Cie)))}function GLe(e,t){return n=>R(n,AC(Hn)(e,r=>{const i=t(r);return i!=r?HLe(i):r}),pTe(()=>()=>{bo.warn("Didn't found attribute while tying to update it. GlobalAttributeIdKey",e)}),Zl(()=>n))}function lZt(e){return t=>R(t,$I(n=>R(e(n),I3(r=>r!=n),So(HLe),Zl(()=>n))))}function dZt(e){return R(e,vD,dt(pZt),LE)}function pZt(e){return GLe(e.key,t=>"type"in e?t.type===we.Choice&&e.type===we.Choice?{...t,...e,values:R(e.values,XT(t.values,(n,r)=>R(n,AC(He)(r.id,i=>({...i,...r})),pTe(()=>()=>{bo.warn("Didn't found choice value while tying to update it. GlobalAttributeIdKey:",e.key,"Choice Value id:",r.id)}),Zl(()=>n))))}:t.type===we.Boolean&&e.type===we.Boolean?{...t,...e}:t.type===we.Numeric&&e.type===we.Numeric?{...t,...e}:t.type===we.Component&&e.type===we.Component?{...t,...e}:(bo.warn("Types of attribute and partial attribute mismatch. AttributeType:",t.type,"PartialAttributeType",e.type),t):{...t,...e})}function HLe(e){const t={...e};return delete t.hash,t}const JLe=R(He,qT(e=>e.id)),hZt={concat:(e,t)=>({...t,values:nC(JLe).concat(t.values,e.values)})},vZt={concat:(e,t)=>({...t,values:nC(JLe).concat(t.values,e.values)})},p7=ig(),h7=ig(),YLe={concat:(e,t)=>Ft({x:e,y:t}).with({x:{type:we.Numeric},y:{type:we.Numeric}},({x:n,y:r})=>p7.concat(n,r)).with({x:{type:we.Boolean},y:{type:we.Boolean}},({x:n,y:r})=>p7.concat(n,r)).with({x:{type:we.Component},y:{type:we.Component}},({x:n,y:r})=>p7.concat(n,r)).with({x:{type:we.Choice},y:{type:we.Choice}},({x:n,y:r})=>hZt.concat(n,r)).otherwise(()=>t)},ZLe={concat:(e,t)=>Ft({x:e,y:t}).with({x:{type:we.Numeric},y:{type:we.Numeric}},({x:n,y:r})=>h7.concat(n,r)).with({x:{type:we.Boolean},y:{type:we.Boolean}},({x:n,y:r})=>h7.concat(n,r)).with({x:{type:we.Component},y:{type:we.Component}},({x:n,y:r})=>h7.concat(n,r)).with({x:{type:we.Choice},y:{type:we.Choice}},({x:n,y:r})=>vZt.concat(n,r)).otherwise(()=>t)},mZt=ig(),gZt=TC(Hn,ig()),yZt=TC(Hn,YLe),bZt=TC(Hn,ZLe);function XLe(e){return R(e,ni,tl)}function QLe(e,t){const n=t4e(t.consequences),r=e4e(t.affectedDecisions),i={isSatisfied:t.consequences.isConfigurationSatisfied,canContributeToSatisfaction:R(t.consequences.canAttributeContributeToConfigurationSatisfaction,dt(XLe)),decisions:r,consequences:n};return{configuration:R(e,KLe(i),Wie),rawData:i}}function $Zt(e,t,n){const r=IZt(n),i=t4e(t),a=e4e(e),o={isSatisfied:t.isConfigurationSatisfied,canContributeToSatisfaction:R(t.canAttributeContributeToConfigurationSatisfaction,dt(XLe)),meta:r,decisions:a,consequences:i};return{configuration:sZt(o),rawData:o}}function e4e(e){const t=(o,u,c)=>R(o??[],dt(f=>({attributeId:ni(f.attributeId),decision:f})),dt(({attributeId:f,decision:s})=>({id:f,key:tl(f),...c(u(s),s)}))),n=t(e.booleanDecisions,kLe,o=>({type:we.Boolean,decision:o,nonOptimisticDecision:o})),r=t(e.numericDecisions,ULe,o=>({type:we.Numeric,decision:o,nonOptimisticDecision:o})),i=t(e.componentDecisions,qLe,o=>({type:we.Component,decision:o,nonOptimisticDecision:o})),a=t(e.choiceValueDecisions,xLe,(o,u)=>({type:we.Choice,values:ld({id:u.choiceValueId,decision:o,nonOptimisticDecision:o})}));return R([...n,...r,...i,...a],dt(o=>[o.key,o]),bI(Hn,YLe,gI))}function t4e(e){const t=(o,u)=>R(o??[],dt(c=>({attributeId:ni(c.attributeId),consequence:c})),dt(({attributeId:c,consequence:f})=>({id:c,key:tl(c),...u(f)}))),n=t(e.booleanConsequences,o=>({type:we.Boolean,isSatisfied:o.isSatisfied,possibleDecisionStates:o.possibleDecisionStates,selection:d7(o.selection)})),r=t(e.numericConsequences,o=>({type:we.Numeric,isSatisfied:o.isSatisfied,selection:d7(o.selection),range:{max:o.range.max,min:o.range.min},decimalPlaces:o.decimalPlaces})),i=t(e.componentConsequences,o=>({type:we.Component,isSatisfied:o.isSatisfied,possibleDecisionStates:R(o.possibleDecisionStates,dt(NLe)),inclusion:fYt(o.inclusion),selection:o.selection?d7(o.selection):null})),a=t(e.choiceConsequences,o=>({type:we.Choice,isSatisfied:o.isSatisfied,cardinality:{lowerBound:o.cardinality.lowerBound,upperBound:o.cardinality.upperBound},values:R(o.values??[],dt(u=>({id:u.choiceValueId,possibleDecisionStates:R(u.possibleDecisionStates,dt(jLe))})))}));return R([...n,...r,...i,...a],dt(o=>[o.key,o]),bI(Hn,ZLe,gI))}function IZt(e){return R((e==null?void 0:e.configurationModels)??[],wE(t=>R(t.globalAttributeIds,dt(n=>({key:tl(ni(n)),sourceId:{localId:n.localId,configurationModel:t.configurationModelId}})))),dt(t=>[t.key,t]),bI(Hn,mZt,gI))}function _Zt(e,t){const{configuration:n,rawData:r}=QLe(e,t),i=sYt(t.rejectedDecisions);return{configuration:n,rawData:r,result:{rejectedDecisions:i}}}function SZt(e,t){return n=>{if(n.type!=="PutManyDecisionsConflict")return Ht;const r=R(n.constraintExplanations??[],dt(Tie)),i=i4e(n.decisionExplanations??[],e,t);return cn({type:wt.MakeManyDecisionsConflict,title:n.title??"",detail:n.detail??"",decisionExplanations:i,constraintExplanations:r})}}function wZt(e){const t=n4e(e);return n=>({...t(n.decisionExplanations),...r4e(n.constraintExplanations)})}function n4e(e){const t=Ft(e).returnType().with({question:go.whyIsStateNotPossible,subject:Wr.boolean},n=>({type:we.Boolean,attributeId:n.attributeId,state:n.state})).with({question:go.whyIsStateNotPossible,subject:Wr.numeric},n=>({type:we.Numeric,attributeId:n.attributeId,state:n.state})).with({question:go.whyIsStateNotPossible,subject:Wr.component},n=>({type:we.Component,attributeId:n.attributeId,state:n.state})).with({question:go.whyIsStateNotPossible,subject:Wr.choiceValue},n=>({type:we.Choice,attributeId:n.attributeId,choiceValueId:n.choiceValueId,state:n.state})).otherwise(()=>null);return n=>({decisionExplanations:i4e(n,t??[],{type:"KeepExistingDecisions"})})}function r4e(e){return{constraintExplanations:R(e,dt(Tie))}}function i4e(e,t,n){return R(e,dt(uYt),dt(r=>{const i=R(r.causedByBooleanDecisions,dt(l=>({type:we.Boolean,attributeId:l.attributeId,state:null}))),a=R(r.causedByNumericDecisions,dt(l=>({type:we.Numeric,attributeId:l.attributeId,state:null}))),o=R(r.causedByComponentDecisions,dt(l=>({type:we.Component,attributeId:l.attributeId,state:null}))),u=R(r.causedByChoiceValueDecisions,dt(l=>({type:we.Choice,attributeId:l.attributeId,choiceValueId:l.choiceValueId,state:null}))),c=R(r.causedByBooleanDecisions,Dl(r.causedByNumericDecisions),Dl(r.causedByComponentDecisions),Dl(r.causedByChoiceValueDecisions)),f=R(i,Dl(a),Dl(o),Dl(u)),s=nC(LLe).concat(f,vD(t));return{causedByDecisions:c,solution:{mode:n,decisions:s}}}))}function a4e(e,t){return R({isSatisfied:t.isSatisfied??e.isSatisfied,canContributeToSatisfaction:t.canContributeToSatisfaction??e.canContributeToSatisfaction,meta:t.meta?gZt.concat(e.meta,t.meta):e.meta,decisions:t.decisions?yZt.concat(e.decisions,t.decisions):e.decisions,consequences:t.consequences?bZt.concat(e.consequences,t.consequences):e.consequences},AZt)}function AZt(e){const t=R(e.decisions,APe(n=>n.type===we.Choice?R({...n,values:R(n.values,Nu(r=>r.decision!=null))},mh(r=>Jn(r.values))):n.decision!=null?cn(n):Ht));return{...e,decisions:t}}function MZt(e){return[...e.decisions.values()].some(t=>{var n;return t.type===we.Choice?t.values.some(r=>{var i;return((i=r.decision)==null?void 0:i.kind)===ti.Explicit}):((n=t.decision)==null?void 0:n.kind)===ti.Explicit})}function RZt(e){const t=(n,r,i)=>r?[{attributeType:n.type,attributeId:n.id,attributeKey:n.key,kind:r.kind,state:r.state,...i}]:[];return R(e.decisions,wC(Vu),wE(n=>Ft(n).returnType().with({type:we.Boolean},r=>t(r,r.decision,{})).with({type:we.Numeric},r=>t(r,r.decision,{})).with({type:we.Component},r=>t(r,r.decision,{})).with({type:we.Choice},r=>R(r.values,wE(i=>t(r,i.decision,{choiceValueId:i.id})))).exhaustive()))}function OZt(e){return R(e.decisions,wC(Vu),wE(o4e))}function o4e(e){return Ft(e).returnType().with({type:we.Boolean},Ae(EZt,oE)).with({type:we.Numeric},Ae(TZt,oE)).with({type:we.Component},Ae(CZt,oE)).with({type:we.Choice},PZt).exhaustive()}function EZt(e){var t;return((t=e.decision)==null?void 0:t.kind)===ti.Explicit?cn({type:we.Boolean,attributeId:e.id,state:e.decision.state}):Ht}function TZt(e){var t;return((t=e.decision)==null?void 0:t.kind)===ti.Explicit?cn({type:we.Numeric,attributeId:e.id,state:e.decision.state}):Ht}function CZt(e){var t;return((t=e.decision)==null?void 0:t.kind)===ti.Explicit?cn({type:we.Component,attributeId:e.id,state:e.decision.state}):Ht}function PZt(e){return R(e.values,Nu(t=>{var n;return((n=t.decision)==null?void 0:n.kind)===ti.Explicit}),dt(t=>({type:we.Choice,attributeId:e.id,choiceValueId:t.id,state:t.decision.state})))}function FZt(e,t){const n=t.decisions.get(tl(e.attributeId)),r=n?o4e(n):[];return R(r,sb(i=>LLe.equals(i,e)),Af(()=>e.state==null,i=>Fie.equals(i,e)))}function WZt(e,t){return Wu(e)&&t==="KeepExistingDecisions"}const u4e={Accept:"application/json"};function c4e(e){const t=tW(e.apiBaseUrl),n=(r,i)=>Gl(()=>r(VJt(e),{headers:{...u4e,...i??{}}}));return R(Ft(e.sessionInitialisationOptions).with({accessToken:vb.string},r=>n(t.session.sessionPost,{Authorization:`Bearer ${r.accessToken}`})).with({sessionCreateUrl:vb.string},r=>n(LJt(r.sessionCreateUrl))).exhaustive(),Fu(r=>({sessionContext:e,sessionId:r.sessionId})),W3(r=>{const i=Gl(()=>t.decision.decisionGetAllDecisions({headers:aI(r)})),a=Gl(()=>t.consequence.consequenceGet({headers:aI(r)})),o=r.sessionContext.provideSourceId??!1?Gl(()=>t.meta.metaGet({headers:aI(r)})):u0(null);return R(Qwe(XEe)({decisions:i,consequences:a,meta:o}),Fu(u=>$Zt(u.decisions,u.consequences,u.meta)),Fu(u=>({...r,configuration:u.configuration,configurationRawData:u.rawData})))}))}function f4e(e,t){const n=zJt(e,t);return r=>{if(WZt(e,t.type))return u0({sessionState:r,result:{rejectedDecisions:[]}});const i=tW(r.sessionContext.apiBaseUrl);return R(Gl(()=>i.decision.decisionPutMany(n,{headers:aI(r)}),SZt(e,t)),Fu(a=>R(_Zt(r.configuration,a),yC(o=>({sessionState:{...r,configurationRawData:a4e(r.configurationRawData,o.rawData),configuration:o.configuration},result:o.result})))))}}function NZt(e){const t=BJt(e);return n=>{if(FZt(e,n.configurationRawData))return u0(n);const r=tW(n.sessionContext.apiBaseUrl);return R(Gl(()=>r.decision.decisionPutDecision(t,{headers:aI(n)})),Fu(i=>{const{configuration:a,rawData:o}=QLe(n.configuration,i);return{...n,configuration:a,configurationRawData:a4e(n.configurationRawData,o)}}))}}function jZt(e,t){const n=(i,a,o,u,c)=>{const f=a(i);return(s,l)=>Ft(t).with("decisions",()=>R(Gl(()=>o(s.explain)(f,l)),Fu(n4e(i)))).with("constraints",()=>R(Gl(()=>u(s.explain)(f,l)),Fu(r4e))).with("full",()=>R(Gl(()=>c(s.explain)(f,l)),Fu(wZt(i)))).exhaustive()},r=Ft(e).with({question:go.whyIsNotSatisfied},i=>n(i,KJt,a=>a.explainWhyNotSatisfiedDecisions,a=>a.explainWhyNotSatisfiedRules,a=>a.explainWhyNotSatisfied)).with({question:go.whyIsStateNotPossible},i=>n(i,GJt,a=>a.explainWhyStateNotPossibleDecisions,a=>a.explainWhyStateNotPossibleRules,a=>a.explainWhyStateNotPossible)).exhaustive();return i=>{const a=tW(i.sessionContext.apiBaseUrl);return r(a,{headers:aI(i)})}}function s4e(e){const t=tW(e.sessionContext.apiBaseUrl);return Gl(()=>t.session.sessionDelete(e.sessionId))}function kZt(e){return t=>l4e({...t,sessionContext:e})}function l4e(e){return e.sessionId&&s4e({...e,sessionId:e.sessionId})(),R({...e,sessionId:void 0},yC(t=>R(d4e(t.sessionContext,t.configurationRawData),nw(n=>({error:n,sessionState:t})))))}function d4e(e,t){return R(c4e(e),W3(n=>{const r=OZt(t);return Jn(r)?R(n,f4e(r,{type:"DropExistingDecisions",conflictHandling:{type:"Automatic"}}),Fu(i=>i.sessionState)):u0(n)}))}function Gl(e,t){return R(lb(e,n=>n),ZZ(Re,Re),Ps(n=>{if(n==null||n.data==null&&n.error==null)return In({type:wt.ConnectionError});if(n.data!=null)return Qt(n.data);if(n.error!=null){const r=(t==null?void 0:t(n.error))??Ht;if(Tm(r))return In(r.value);if(n.error.type!=null&&n.error.title!=null&&n.error.detail!=null)return R(n.error,HJt,In)}return bo.error("Received unknown error format:",n.error),In({type:wt.ServerError})}))}function aI(e){return{...u4e,"X-SESSION-ID":e.sessionId}}function UZt(e){return LE(p4e(e))}function qZt(e,t){const n=()=>LE($I(r=>Ft(r).returnType().with({type:we.Boolean},i=>({...i,decision:null})).with({type:we.Numeric},i=>({...i,decision:null})).with({type:we.Component},i=>({...i,decision:null})).with({type:we.Choice},i=>({...i,values:R(i.values,$I(a=>({...a,decision:null})))})).exhaustive()));return R([t.type==="DropExistingDecisions"?n():Re,R(e,dt(p4e),LE)],Cie)}function p4e(e){const t=n=>n!=null?{state:n,kind:ti.Explicit}:null;return GLe(tl(e.attributeId),n=>Ft({attribute:n,decision:e}).returnType().with({attribute:{type:we.Boolean},decision:{type:we.Boolean}},({attribute:r,decision:i})=>({...r,decision:t(i.state)})).with({attribute:{type:we.Numeric},decision:{type:we.Numeric}},({attribute:r,decision:i})=>({...r,decision:t(i.state)})).with({attribute:{type:we.Component},decision:{type:we.Component}},({attribute:r,decision:i})=>({...r,decision:t(i.state)})).with({attribute:{type:we.Choice},decision:{type:we.Choice}},({attribute:r,decision:i})=>({...r,values:R(r.values,$I(a=>({...a,decision:a.id===i.choiceValueId?t(i.state):r.cardinality.upperBound!==1?a.decision:null})))})).otherwise(()=>n))}const xZt=O3({type:wt.SessionNotFound});function nW(e,t,n){return(...r)=>{const i=e(...r),a=t?t(...r):null;return o=>({type:"StateMutating",itemId:HC.guid(),allowSimultaneouslyTermination:n,deferredPromise:qee(),execute:Ae(i,nw(u=>({...u,type:"ErrorWithSessionState"}))),optimisticAttributeUpdater:o&&a?R(a,vD,Cie):null})}}function DZt(e){return(...t)=>{const n=e(...t);return{type:"StatePreserving",itemId:HC.guid(),deferredPromise:qee(),execute:Ae(n,nw(r=>({type:"PureError",error:r})))}}}function b6(e){return(...t)=>{const n=e(...t);return(r,i)=>Ft(r).with({sessionId:vb.not(vb.nullish)},a=>n(a,i)).otherwise(()=>xZt)}}function Nie(e){return(...t)=>{const n=e(...t);return(r,i)=>R(n(r,i),Fu(a=>({sessionState:a,result:void 0})))}}function jie(e){return(...t)=>{const n=e(...t);return(r,i)=>R(n(r,i),nw(a=>({error:a,sessionState:null})))}}const LZt=R(NZt,b6,Nie,jie,e=>nW(e,UZt,!0)),mU=R(f4e,b6,jie,e=>nW(e,qZt,!0)),BZt=R(kZt,Nie,e=>nW(e,null,!1)),VZt=R(()=>l4e,Nie,e=>nW(e,null,!1)),zZt=R(jZt,b6,DZt),KZt=e=>{const t=R(()=>(n,r)=>()=>e&&e.aborted?Promise.reject(e.reason):Promise.resolve(Qt({sessionState:n,result:{pendingTasks:r.queuedWork-1}})),b6,jie,n=>nW(n,null,!1))()(!1);if(e){const n=()=>{t.deferredPromise.reject(e.reason),e.removeEventListener("abort",n)};e.addEventListener("abort",n)}return t},GZt=e=>{e.forEach(t=>{R(t.result,uE(n=>()=>{t.deferredPromise.resolve(n)}),u2(n=>()=>{t.deferredPromise.reject(n)}))})},HZt=Uee(({input:e})=>R(ng(e.run,t=>t),C3,W3(t=>lb(t,n=>n)),Ps(t=>({workItemId:e.workItemId,result:t})))()),JZt=e=>e.type==="StatePreserving",Dbe=e=>e.type==="StateMutating",Lbe={type:wt.SessionNotFound},YZt={type:wt.TaskCancelled},ZZt=yWe({types:{input:{},context:{},events:{},emitted:{}},guards:{isSessionNotFoundProblem:({},{result:e})=>R(e,$s(()=>!1,$s(t=>t.error.type==="SessionNotFound",()=>!1)))},actors:{runTask:HZt,createSessionWithData:Uee(({input:e})=>d4e(e.sessionContext,e.configurationRawData)())},actions:{emitState:af(({context:e,enqueue:t})=>{const n=Wie(e.work.filter(Dbe).reduce((r,i)=>i.optimisticAttributeUpdater?i.optimisticAttributeUpdater(r):r,e.sessionState.configuration));t.assign({deferredPromiseCompletions:ir}),t.emit({type:"MachineState",sessionState:{...e.sessionState,configuration:n},deferredPromiseCompletions:e.deferredPromiseCompletions})}),spawnWork:af(({context:e,enqueue:t})=>{const n=R(e.work,_x,So(i=>R(i,Co,mh(Dbe),So(ld),Zl(()=>R(i,J9(JZt))))),Zl(()=>ir)),r={queuedWork:e.work.length,currentlyRunningWork:n.length};n.forEach(i=>{SC(He)(i.itemId,e.runningWork)||t.assign({workExecutionAttemptAmount:({context:a})=>R(a.workExecutionAttemptAmount,z$t(He)(i.itemId,()=>1,o=>o+1)),runningWork:({context:a,spawn:o})=>R(a.runningWork,iD(He)(i.itemId,o("runTask",{input:{workItemId:i.itemId,run:()=>i.execute(a.sessionState,r)}})))})})}),answerAndRemoveWork:af(({context:e,enqueue:t},n)=>{const r=R(e.work,sb(i=>i.itemId===n.workItemId),W2);t.assign({work:({context:i})=>R(i.work,Nu(a=>a.itemId!==n.workItemId)),runningWork:({context:i})=>R(i.runningWork,OE(He)(n.workItemId)),workExecutionAttemptAmount:({context:i})=>R(i.workExecutionAttemptAmount,OE(He)(n.workItemId))}),r&&t.assign({deferredPromiseCompletions:({context:i})=>R(i.deferredPromiseCompletions,mI({deferredPromise:r.deferredPromise,result:n.result}))})}),cancelAllRunningWork:af(({context:e,enqueue:t})=>{e.runningWork.size>0&&t(eE(`Cancelling ${e.runningWork.size} running work${e.runningWork.size!==1?"s":""}`)),e.runningWork.forEach(n=>{t.stopChild(n)}),t.assign({runningWork:nu})})}}).createMachine({context:({input:e})=>({sessionState:e.sessionState,work:ir,runningWork:nu,workExecutionAttemptAmount:nu,deferredPromiseCompletions:ir}),entry:["emitState"],on:{EnqueueWork:{actions:[TI({work:({context:e,event:t})=>mI(t.workItem)(e.work)}),"emitState"]},Shutdown:{target:"#shutdown"}},initial:"processing",states:{processing:{always:{actions:["spawnWork"]},on:{"xstate.done.actor.*":[{target:"restoreSession",guard:{type:"isSessionNotFoundProblem",params:({event:e})=>e.output},actions:[eE("Work resulted in SessionNotFound"),"cancelAllRunningWork",af(({enqueue:e,event:t})=>{const{result:n}=t.output;R(n,uE(r=>()=>R(r,u2(i=>()=>{i.type==="ErrorWithSessionState"&&i.sessionState&&e.assign({sessionState:i.sessionState})}))))})]},{actions:[af(({context:e,enqueue:t,event:n})=>{const r=n.output,i=R(e.work,sb(o=>o.itemId===r.workItemId),W2),a=e.runningWork.get(r.workItemId);if(i&&a&&n.actorId===a.id)if(Qe(r.result))t({type:"answerAndRemoveWork",params:{workItemId:i.itemId,result:In(r.result.left)}});else{const o=r.result.right;if(i.type==="StateMutating"){const u=o;R(u,uE(c=>()=>{t.assign({sessionState:c.sessionState})}),u2(c=>()=>{c.sessionState&&t.assign({sessionState:c.sessionState})})),t({type:"answerAndRemoveWork",params:{workItemId:i.itemId,result:R(u,mS(c=>c.result),pI(c=>c.error))}})}else{const u=o;t({type:"answerAndRemoveWork",params:{workItemId:i.itemId,result:R(u,pI(c=>c.error))}})}}t("emitState")})]}]}},restoreSession:{entry:[TI({sessionState:({context:e})=>({...e.sessionState,sessionId:void 0})}),af(({context:e,enqueue:t})=>{R(e.workExecutionAttemptAmount,oD(n=>n>1),mg(Vu)).forEach(n=>{t({type:"answerAndRemoveWork",params:{workItemId:n,result:In(Lbe)}})})}),"emitState"],invoke:{src:"createSessionWithData",input:({context:e})=>e.sessionState,onDone:{target:"processing",actions:[af(({context:e,event:t,enqueue:n})=>{R(t.output,uE(r=>()=>{n.assign({sessionState:r})}),u2(r=>()=>{n(eE("Can't restore session because of error: "+JSON.stringify(r))),R(e.work,J9(i=>i.type==="StatePreserving"||i.allowSimultaneouslyTermination)).forEach(i=>{n({type:"answerAndRemoveWork",params:{workItemId:i.itemId,result:In(Lbe)}})})}))}),"emitState"]},onError:{target:"processing",actions:[eE("An unexpected error occurred while trying to restore the session.")]}}},shutdown:{type:"final",id:"shutdown",entry:["cancelAllRunningWork",af(({context:e,enqueue:t})=>{const n=In(YZt);if(e.work.forEach(r=>{t({type:"answerAndRemoveWork",params:{workItemId:r.itemId,result:n}})}),e.sessionState.sessionId){const r={...e.sessionState,sessionId:e.sessionState.sessionId};t(()=>{s4e(r)().then(()=>{},()=>{})})}}),"emitState"]}}});function XZt(e){return MI(ZZt,{input:{sessionState:e}})}const{summon:r$}=Sie({}),$6=r$(e=>e.interface({localId:e.string(),componentPath:e.optional(e.array(e.string())),sharedConfigurationModelId:e.optional(e.string())},"GlobalAttributeId")),QZt=r$(e=>e.interface({type:e.stringLiteral("Numeric"),attributeId:$6(e),state:e.number()},"NumericDecision")),eXt=r$(e=>e.interface({type:e.stringLiteral("Boolean"),attributeId:$6(e),state:e.boolean()},"NumericDecision")),tXt=r$(e=>e.interface({type:e.stringLiteral("Choice"),attributeId:$6(e),choiceValueId:e.string(),state:e.keysOf({Included:null,Excluded:null})},"ChoiceDecision")),nXt=r$(e=>e.interface({type:e.stringLiteral("Component"),attributeId:$6(e),state:e.keysOf({Included:null,Excluded:null})},"ComponentDecision")),rXt=r$(e=>e.taggedUnion("type",{Numeric:QZt(e),Boolean:eXt(e),Choice:tXt(e),Component:nXt(e)},"Decision")),iXt=r$(e=>e.interface({schemaVersion:e.numberLiteral(1),explicitDecisions:e.array(rXt(e))},"StoredConfigurationV1")),{summon:aXt}=Sie({}),oXt=aXt(e=>e.taggedUnion("type",{1:iXt(e)},"StoredConfiguration"));function uXt(e){return{schemaVersion:1,explicitDecisions:R(e,dt(t=>{const n={localId:t.attributeId.localId,componentPath:t.attributeId.componentPath!=null&&Jn(t.attributeId.componentPath)?t.attributeId.componentPath:void 0,sharedConfigurationModelId:t.attributeId.sharedConfigurationModelId??void 0};return Ft(t).returnType().with({attributeType:we.Numeric},r=>({type:"Numeric",attributeId:n,state:r.state})).with({attributeType:we.Boolean},r=>({type:"Boolean",attributeId:n,state:r.state})).with({attributeType:we.Component},r=>({type:"Component",attributeId:n,state:Ft(r.state).returnType().with(qu.Included,()=>"Included").with(qu.Excluded,()=>"Excluded").exhaustive()})).with({attributeType:we.Choice},r=>({type:"Choice",attributeId:n,choiceValueId:r.choiceValueId,state:Ft(r.state).returnType().with(wo.Included,()=>"Included").with(wo.Excluded,()=>"Excluded").exhaustive()})).exhaustive()}))}}function cXt(e){return Qe(oXt.create(e))?In({type:wt.StoredConfigurationInvalid}):R(e.explicitDecisions,dt(t=>{const n={localId:t.attributeId.localId,componentPath:t.attributeId.componentPath!=null&&Jn(t.attributeId.componentPath)?t.attributeId.componentPath:void 0,sharedConfigurationModelId:t.attributeId.sharedConfigurationModelId??void 0};return Ft(t).returnType().with({type:"Numeric"},r=>({type:we.Numeric,attributeId:n,state:r.state})).with({type:"Boolean"},r=>({type:we.Boolean,attributeId:n,state:r.state})).with({type:"Component"},r=>({type:we.Component,attributeId:n,state:Ft(r.state).with("Included",()=>qu.Included).with("Excluded",()=>qu.Excluded).exhaustive()})).with({type:"Choice"},r=>({type:we.Choice,attributeId:n,choiceValueId:r.choiceValueId,state:Ft(r.state).with("Included",()=>wo.Included).with("Excluded",()=>wo.Excluded).exhaustive()})).exhaustive()}),Qt)}let h4e=class{constructor(t){this.previousValue=null,this.currentValue=null,this.calculateChangeSetFn=Np(t)}setValue(t){this.currentValue=t}clearChanges(){this.previousValue=this.currentValue}getChanges(){return this.calculateChangeSetFn(this.previousValue,this.currentValue)}},R1=class{constructor(t){this.listeners=new Map,this.currentValue=null,this.calculateChangeSetFn=Np(t),this.changesHandler=new h4e(t)}addListener(t){const n=HC.guid();this.listeners.set(n,t);const r=this.calculateChangeSetFn(null,this.currentValue);return Tm(r)&&t(...r.value),{unsubscribe:()=>{this.listeners.delete(n)}}}notifyListeners(t){if(this.currentValue=t,this.changesHandler.setValue(t),this.listeners.size>0){const n=this.changesHandler.getChanges();Tm(n)&&this.listeners.forEach(r=>r(...n.value))}this.changesHandler.clearChanges()}unsubscribeAllListeners(){this.listeners.clear()}};const v4e={isSatisfied:null,attributes:{added:[],changed:[],removed:[]}};function fXt(e){return uZt.equals(v4e,e)}function sXt(e){return(t,n)=>{const r=t?e(t):null,i=n?e(n):null;return i!=null&&i!==r?cn([i]):Ht}}function lXt(e,t){const n=mg(Vu);if(t==null)return Ht;const r=(e==null?void 0:e.attributes)??nu,i=R([...n(t.attributes),...n(r)],URe(Hn)),a=[],o=[],u=[];return i.forEach(c=>{const f=t.attributes.get(c),s=r.get(c);f!=null&&s==null&&a.push(f),f==null&&s!=null&&u.push(s.id),f!=null&&s!=null&&f.hash!=s.hash&&o.push(f)}),R({isSatisfied:t.isSatisfied!=(e==null?void 0:e.isSatisfied)?t.isSatisfied:null,attributes:{added:a,changed:o,removed:u}},mh(yI(fXt)),So(c=>[t,c]))}function dXt(e){return m4e(e)}function v7(e){return m4e(e)}function m4e(e){return(t,n)=>{if(n==null||t===n)return Ht;const r=e(n);return cn([r])}}let pXt=class{constructor(t){this.canResetConfigurationMemo=Np(MZt,{maxSize:5}),this.calculateConfigurationChangedHandlerMemo=Np(lXt,{maxSize:5}),this.getCollectedDecisionsMemo=Np(RZt),this.getCollectedImplicitDecisionsMemo=Np(Ae(this.getCollectedDecisionsMemo.bind(this),Nu(ELe))),this.getCollectedExplicitDecisionsMemo=Np(Ae(this.getCollectedDecisionsMemo.bind(this),Nu(OLe))),this.getStoredConfigurationMemo=Np(Ae(this.getCollectedExplicitDecisionsMemo.bind(this),uXt)),this.sessionChangesHandler=new h4e(this.calculateConfigurationChangedHandlerMemo.bind(this)),this.configurationChangedSubscriptionHandler=new R1(this.calculateConfigurationChangedHandlerMemo.bind(this)),this.canResetConfigurationSubscriptionHandler=new R1(sXt(this.canResetConfigurationMemo.bind(this))),this.storedConfigurationSubscriptionHandler=new R1(dXt(this.getStoredConfigurationMemo.bind(this))),this.decisionsSubscriptionHandler=new R1(v7(this.getCollectedDecisionsMemo.bind(this))),this.explicitDecisionsSubscriptionHandler=new R1(v7(this.getCollectedExplicitDecisionsMemo.bind(this))),this.implicitDecisionsSubscriptionHandler=new R1(v7(this.getCollectedImplicitDecisionsMemo.bind(this))),this.hashedConfigurationInputHandler=[this.sessionChangesHandler.setValue.bind(this.sessionChangesHandler),this.configurationChangedSubscriptionHandler.notifyListeners.bind(this.configurationChangedSubscriptionHandler)],this.rawDataInputHandlers=[this.canResetConfigurationSubscriptionHandler,this.storedConfigurationSubscriptionHandler,this.decisionsSubscriptionHandler,this.explicitDecisionsSubscriptionHandler,this.implicitDecisionsSubscriptionHandler],this.sessionState=null,this.handleActorUpdate({sessionState:t,deferredPromiseCompletions:ir}),this.actor=XZt(t),this.subscription=this.actor.on("MachineState",n=>{this.handleActorUpdate(n)}),this.actor.start()}getDecisions(t,n){const r=o=>(this.throwIfSessionClosed(),Ft(o).with(ti.Explicit,()=>this.getCollectedExplicitDecisionsMemo.bind(this)).with(ti.Implicit,()=>this.getCollectedImplicitDecisionsMemo.bind(this)).with(vb.nullish,()=>this.getCollectedDecisionsMemo.bind(this)).exhaustive()(this.sessionState.configurationRawData)),i=typeof t=="string"?t:void 0,a=typeof t=="boolean"?t:n;return this.executeMaybeQueued(a===!0,()=>r(i))}async storeConfiguration(){return this.executeMaybeQueued(!0,()=>(this.throwIfSessionClosed(),this.getStoredConfigurationMemo(this.sessionState.configurationRawData)))}async restoreConfiguration(t,n){var r;this.throwIfSessionClosed();const i=cXt(t);if(Qe(i))throw i.left;const a=R(mU(i.right,n),Pp(((r=this.sessionState.sessionContext.optimisticDecisionOptions)==null?void 0:r.restoreConfiguration)??!1));return this.actor.send({type:"EnqueueWork",workItem:a}),await a.deferredPromise.promise}canResetConfiguration(t){return this.executeMaybeQueued(t===!0,()=>(this.throwIfSessionClosed(),this.canResetConfigurationMemo(this.sessionState.configurationRawData)))}async resetConfiguration(){var t;this.throwIfSessionClosed();const n=R(mU([],{type:"DropExistingDecisions",conflictHandling:{type:"Automatic"}}),Pp(((t=this.sessionState.sessionContext.optimisticDecisionOptions)==null?void 0:t.resetConfiguration)??!1));this.actor.send({type:"EnqueueWork",workItem:n}),await n.deferredPromise.promise}addConfigurationChangedListener(t){return this.throwIfSessionClosed(),this.configurationChangedSubscriptionHandler.addListener(t)}addCanResetConfigurationChangedListener(t){return this.throwIfSessionClosed(),this.canResetConfigurationSubscriptionHandler.addListener(t)}addStoredConfigurationChangedListener(t){return this.throwIfSessionClosed(),this.storedConfigurationSubscriptionHandler.addListener(t)}addDecisionsChangedListener(t,n){this.throwIfSessionClosed();const r=typeof t=="string"?t:void 0,i=typeof t!="string"?t:n;if(i==null)throw new Error("The handler is null or undefined");return r===ti.Explicit?this.explicitDecisionsSubscriptionHandler.addListener(i):r===ti.Implicit?this.implicitDecisionsSubscriptionHandler.addListener(i):this.decisionsSubscriptionHandler.addListener(i)}getSessionContext(t){return this.executeMaybeQueued(t===!0,()=>(this.throwIfSessionClosed(),this.sessionState.sessionContext))}getConfiguration(t){return this.executeMaybeQueued(t===!0,()=>(this.throwIfSessionClosed(),this.sessionState.configuration))}getConfigurationChanges(){return this.throwIfSessionClosed(),R(this.sessionChangesHandler.getChanges(),So(za),Zl(()=>v4e))}clearConfigurationChanges(){this.throwIfSessionClosed(),this.sessionChangesHandler.clearChanges()}async makeDecision(t){var n;this.throwIfSessionClosed();const r=R(t,LZt,Pp(((n=this.sessionState.sessionContext.optimisticDecisionOptions)==null?void 0:n.makeDecision)??!0));this.actor.send({type:"EnqueueWork",workItem:r}),await r.deferredPromise.promise}async applySolution(t){var n;this.throwIfSessionClosed();const r=R(mU(t.decisions,t.mode),Pp(((n=this.sessionState.sessionContext.optimisticDecisionOptions)==null?void 0:n.applySolution)??!0));return this.actor.send({type:"EnqueueWork",workItem:r}),await r.deferredPromise.promise}setMany(t,n){return this.makeManyDecisions(t,n)}async makeManyDecisions(t,n){var r;this.throwIfSessionClosed();const i=R(mU(t,n),Pp(((r=this.sessionState.sessionContext.optimisticDecisionOptions)==null?void 0:r.makeManyDecisions)??!0));return this.actor.send({type:"EnqueueWork",workItem:i}),await i.deferredPromise.promise}async setSessionContext(t){this.throwIfSessionClosed();const n=R(t,BZt,Pp(!1));this.actor.send({type:"EnqueueWork",workItem:n}),await n.deferredPromise.promise}async reinitialize(){this.throwIfSessionClosed();const t=R(VZt(),Pp(!1));this.actor.send({type:"EnqueueWork",workItem:t}),await t.deferredPromise.promise}async explain(t,n){this.throwIfSessionClosed();const r=typeof t=="function"?t(Eie):t,i=zZt(r,n);return this.actor.send({type:"EnqueueWork",workItem:i}),await i.deferredPromise.promise}async close(){this.actor.getSnapshot().status==="active"&&(this.subscription.unsubscribe(),this.actor.send({type:"Shutdown"}),await kSt(this.actor,t=>t.status!=="active"),this.configurationChangedSubscriptionHandler.unsubscribeAllListeners())}async scheduleTask(t){this.throwIfSessionClosed();const n=KZt(t);return this.actor.send({type:"EnqueueWork",workItem:n}),await n.deferredPromise.promise}executeMaybeQueued(t,n,r){return this.throwIfSessionClosed(),t?this.scheduleTask(r).then(()=>n()):n()}handleActorUpdate(t){this.sessionState=t.sessionState,this.hashedConfigurationInputHandler.forEach(n=>n(this.sessionState.configuration)),this.rawDataInputHandlers.forEach(n=>n.notifyListeners(this.sessionState.configurationRawData)),GZt(t.deferredPromiseCompletions)}throwIfSessionClosed(){if(this.actor.getSnapshot().status!=="active")throw{type:wt.SessionClosed}}};const g4e={async createSession(e){return R(c4e(e),Fu(t=>new pXt(t)),fAe($s(t=>()=>Promise.reject(t),t=>()=>Promise.resolve(t))))()}},hXt=Object.freeze(Object.defineProperty({__proto__:null,AllowedRulesInExplainType:Im,AttributeInterpreter:H1,AttributeRefinements:QF,AttributeType:we,ChoiceValueDecisionState:wo,ChoiceValueInterpreter:PG,CollectedDecisionRefinements:qJt,ComponentDecisionState:qu,ConfigurationInterpreter:OJt,ConfigurationModelSourceType:r_,ConfiguratorErrorType:wt,DecisionKind:ti,ExplainQuestionBuilderModule:WJt,ExplainQuestionSubject:Wr,ExplainQuestionType:go,GlobalAttributeIdKeyBuilder:tl,Inclusion:DE,Logger:bo,Selection:rb,SessionFactory:g4e,StoredConfigurationV1:mJt,explainQuestionBuilder:Eie,globalAttributeIdEq:qi,globalAttributeIdKeyEq:Hn,globalConstraintIdEq:Pie,sessionContextEq:oZt},Symbol.toStringTag,{value:"Module"}));let vXt=0;function mn(e,t){const n=`atom${++vXt}`,r={toString(){return n}};return typeof e=="function"?r.read=e:(r.init=e,r.read=mXt,r.write=gXt),t&&(r.write=t),r}function mXt(e){return e(this)}function gXt(e,t,n){return t(this,typeof n=="function"?n(e(this)):n)}const Bbe=(e,t)=>e.unstable_is?e.unstable_is(t):t===e,Vbe=e=>"init"in e,zbe=e=>!!e.write,aq=new WeakMap,kG=e=>{var t;return UG(e)&&!((t=aq.get(e))!=null&&t[1])},yXt=(e,t)=>{const n=aq.get(e);n&&(n[1]=!0,n[0].forEach(r=>r(t)))},bXt=e=>{if(aq.has(e))return;const t=[new Set,!1];aq.set(e,t);const n=()=>{t[1]=!0};e.then(n,n),e.onCancel=r=>{t[0].add(r)}},UG=e=>typeof(e==null?void 0:e.then)=="function",Kbe=e=>"v"in e||"e"in e,gU=e=>{if("e"in e)throw e.e;return e.v},y4e=(e,t,n)=>{n.p.has(e)||(n.p.add(e),t.then(()=>{n.p.delete(e)},()=>{n.p.delete(e)}))},Gbe=(e,t,n,r,i)=>{var a;n.d.set(r,i.n),kG(n.v)&&y4e(t,n.v,i),(a=i.m)==null||a.t.add(t),e&&$Xt(e,r,t)},cO=()=>[new Map,new Map,new Set],Hbe=(e,t,n)=>{e[0].has(t)||e[0].set(t,new Set),e[1].set(t,n)},$Xt=(e,t,n)=>{const r=e[0].get(t);r&&r.add(n)},IXt=(e,t)=>e[0].get(t),Jbe=(e,t)=>{e[2].add(t)},O1=e=>{for(;e[1].size||e[2].size;){e[0].clear();const t=new Set(e[1].values());e[1].clear();const n=new Set(e[2]);e[2].clear(),t.forEach(r=>{var i;return(i=r.m)==null?void 0:i.l.forEach(a=>a())}),n.forEach(r=>r())}},b4e=e=>{let t;const n=(h,$,b)=>{const y="v"in $,m=$.v,g=kG($.v)?$.v:null;if(UG(b)){bXt(b);for(const _ of $.d.keys())y4e(h,b,e(_,$));$.v=b,delete $.e}else $.v=b,delete $.e;(!y||!Object.is(m,$.v))&&(++$.n,g&&yXt(g,b))},r=(h,$,b,y)=>{var m;if(Kbe(b)&&(b.m&&!(y!=null&&y.has($))||Array.from(b.d).every(([N,U])=>r(h,N,e(N,b),y).n===U)))return b;b.d.clear();let g=!0;const _=N=>{if(Bbe($,N)){const te=e(N,b);if(!Kbe(te))if(Vbe(N))n(N,te,N.init);else throw new Error("no atom init");return gU(te)}const U=r(h,N,e(N,b),y);if(g)Gbe(h,$,b,N,U);else{const te=cO();Gbe(te,$,b,N,U),f(te,$,b),O1(te)}return gU(U)};let I,A;const E={get signal(){return I||(I=new AbortController),I.signal},get setSelf(){return!A&&zbe($)&&(A=(...N)=>{if(!g)return c($,...N)}),A}};try{const N=$.read(_,E);if(n($,b,N),UG(N)){(m=N.onCancel)==null||m.call(N,()=>I==null?void 0:I.abort());const U=()=>{if(b.m){const te=cO();f(te,$,b),O1(te)}};N.then(U,U)}return b}catch(N){return delete b.v,b.e=N,++b.n,b}finally{g=!1}},i=h=>gU(r(void 0,h,e(h))),a=(h,$,b)=>{var y,m;const g=new Map;for(const _ of((y=b.m)==null?void 0:y.t)||[])g.set(_,e(_,b));for(const _ of b.p)g.set(_,e(_,b));return(m=IXt(h,$))==null||m.forEach(_=>{g.set(_,e(_,b))}),g},o=(h,$,b)=>{const y=[],m=new Set,g=(I,A)=>{if(!m.has(I)){m.add(I);for(const[E,N]of a(h,I,A))I!==E&&g(E,N);y.push([I,A,A.n])}};g($,b);const _=new Set([$]);for(let I=y.length-1;I>=0;--I){const[A,E,N]=y[I];let U=!1;for(const te of E.d.keys())if(te!==A&&_.has(te)){U=!0;break}U&&(r(h,A,E,m),f(h,A,E),N!==E.n&&(Hbe(h,A,E),_.add(A))),m.delete(A)}},u=(h,$,b,...y)=>{const m=I=>gU(r(h,I,e(I,b))),g=(I,...A)=>{const E=e(I,b);let N;if(Bbe($,I)){if(!Vbe(I))throw new Error("atom not writable");const U="v"in E,te=E.v,Ie=A[0];n(I,E,Ie),f(h,I,E),(!U||!Object.is(te,E.v))&&(Hbe(h,I,E),o(h,I,E))}else N=u(h,I,E,...A);return O1(h),N};return $.write(m,g,...y)},c=(h,...$)=>{const b=cO(),y=u(b,h,e(h),...$);return O1(b),y},f=(h,$,b)=>{if(b.m&&!kG(b.v)){for(const y of b.d.keys())b.m.d.has(y)||(s(h,y,e(y,b)).t.add($),b.m.d.add(y));for(const y of b.m.d||[])if(!b.d.has(y)){b.m.d.delete(y);const m=l(h,y,e(y,b));m==null||m.t.delete($)}}},s=(h,$,b)=>{if(!b.m){r(h,$,b);for(const y of b.d.keys())s(h,y,e(y,b)).t.add($);if(b.m={l:new Set,d:new Set(b.d.keys()),t:new Set},zbe($)&&$.onMount){const y=b.m,{onMount:m}=$;Jbe(h,()=>{const g=m((..._)=>u(h,$,b,..._));g&&(y.u=g)})}}return b.m},l=(h,$,b)=>{if(b.m&&!b.m.l.size&&!Array.from(b.m.t).some(y=>{var m;return(m=e(y,b).m)==null?void 0:m.d.has($)})){const y=b.m.u;y&&Jbe(h,y),delete b.m;for(const m of b.d.keys()){const g=l(h,m,e(m,b));g==null||g.t.delete($)}return}return b.m};return{get:i,set:c,sub:(h,$)=>{const b=cO(),y=e(h),m=s(b,h,y);O1(b);const g=m.l;return g.add($),()=>{g.delete($);const _=cO();l(_,h,y),O1(_)}},unstable_derive:h=>b4e(...h(e))}},$4e=()=>{const e=new WeakMap;return b4e(n=>{let r=e.get(n);return r||(r={d:new Map,p:new Set,n:0},e.set(n,r)),r})};let m7;const I4e=()=>(m7||(m7=$4e()),m7),_4e=pe.createContext(void 0),S4e=e=>{const t=pe.useContext(_4e);return(e==null?void 0:e.store)||t||I4e()},_Xt=({children:e,store:t})=>{const n=pe.useRef();return!t&&!n.current&&(n.current=$4e()),pe.createElement(_4e.Provider,{value:t||n.current},e)},qG=e=>typeof(e==null?void 0:e.then)=="function",w4e=e=>{e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t})},SXt=pe.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(w4e(e),e)}),g7=new WeakMap,Ybe=e=>{let t=g7.get(e);return t||(t=new Promise((n,r)=>{let i=e;const a=c=>f=>{i===c&&n(f)},o=c=>f=>{i===c&&r(f)},u=c=>{"onCancel"in c&&typeof c.onCancel=="function"&&c.onCancel(f=>{qG(f)?(g7.set(f,t),i=f,f.then(a(f),o(f)),u(f)):n(f)})};e.then(a(e),o(e)),u(e)}),g7.set(e,t)),t};function I6(e,t){const n=S4e(t),[[r,i,a],o]=pe.useReducer(f=>{const s=n.get(e);return Object.is(f[0],s)&&f[1]===n&&f[2]===e?f:[s,n,e]},void 0,()=>[n.get(e),n,e]);let u=r;(i!==n||a!==e)&&(o(),u=n.get(e));const c=t==null?void 0:t.delay;if(pe.useEffect(()=>{const f=n.sub(e,()=>{if(typeof c=="number"){const s=n.get(e);qG(s)&&w4e(Ybe(s)),setTimeout(o,c);return}o()});return o(),f},[n,e,c]),pe.useDebugValue(u),qG(u)){const f=Ybe(u);return SXt(f)}return u}function kie(e,t){const n=S4e(t);return pe.useCallback((...i)=>n.set(e,...i),[n,e])}function yU(e,t){return[I6(e,t),kie(e,t)]}var wXt=function(e,t,n){var r=pe.useRef(),i=pe.useRef(0);return r.current==null&&(r.current=e),t.equals(e,r.current)||(n&&n.debug&&process.env.NODE_ENV!=="production"&&console.info("Stable hook update triggered:",{prev:r.current,value:e}),r.current=e,i.current+=1),[i.current]},AXt=function(e,t,n,r){return pe.useMemo(e,wXt(t,n,r))};function J1(e,t){let n=null;const r=new Map,i=new Set,a=u=>{let c;if(t===void 0)c=r.get(u);else for(const[s,l]of r)if(t(s,u)){c=l;break}if(c!==void 0)if(n!=null&&n(c[1],u))a.remove(u);else return c[0];const f=e(u);return r.set(u,[f,Date.now()]),o("CREATE",u,f),f};function o(u,c,f){for(const s of i)s({type:u,param:c,atom:f})}return a.unstable_listen=u=>(i.add(u),()=>{i.delete(u)}),a.getParams=()=>r.keys(),a.remove=u=>{if(t===void 0){if(!r.has(u))return;const[c]=r.get(u);r.delete(u),o("REMOVE",u,c)}else for(const[c,[f]]of r)if(t(c,u)){r.delete(c),o("REMOVE",c,f);break}},a.setShouldRemove=u=>{if(n=u,!!n)for(const[c,[f,s]]of r)n(s,c)&&(r.delete(c),o("REMOVE",c,f))},a}const y7=(e,t,n)=>(t.has(n)?t:t.set(n,e())).get(n),MXt=new WeakMap,RXt=(e,t,n,r)=>{const i=y7(()=>new WeakMap,MXt,t),a=y7(()=>new WeakMap,i,n);return y7(e,a,r)};function A4e(e,t,n=Object.is){return RXt(()=>{const r=Symbol(),i=([o,u])=>{if(u===r)return t(o);const c=t(o,u);return n(u,c)?u:c},a=mn(o=>{const u=o(a),c=o(e);return i([c,u])});return a.init=r,a},e,t,n)}const OXt=e=>typeof(e==null?void 0:e.then)=="function";function EXt(e=()=>{try{return window.localStorage}catch{return}},t){var n;let r,i;const a={getItem:(c,f)=>{var s,l;const d=v=>{if(v=v||"",r!==v){try{i=JSON.parse(v,t==null?void 0:t.reviver)}catch{return f}r=v}return i},p=(l=(s=e())==null?void 0:s.getItem(c))!=null?l:null;return OXt(p)?p.then(d):d(p)},setItem:(c,f)=>{var s;return(s=e())==null?void 0:s.setItem(c,JSON.stringify(f,t==null?void 0:t.replacer))},removeItem:c=>{var f;return(f=e())==null?void 0:f.removeItem(c)}},o=c=>(f,s,l)=>c(f,d=>{let p;try{p=JSON.parse(d||"")}catch{p=l}s(p)});let u;try{u=(n=e())==null?void 0:n.subscribe}catch{}return!u&&typeof window<"u"&&typeof window.addEventListener=="function"&&window.Storage&&(u=(c,f)=>{if(!(e()instanceof window.Storage))return()=>{};const s=l=>{l.storageArea===e()&&l.key===c&&f(l.newValue)};return window.addEventListener("storage",s),()=>{window.removeEventListener("storage",s)}}),u&&(a.subscribe=o(u)),a}EXt();function _6(e){const t=mn(()=>({mounted:!1,inProgress:0,promise:void 0,cleanup:void 0,fromCleanup:!1,recursing:!1,refresh:()=>{},refreshing:!1,get:()=>{},set:()=>{},pendingError:null})),n=mn(0),r=mn(null,(a,o)=>{const u=a(t);return u.mounted=!0,u.get=a,u.set=o,u.refresh=()=>{try{u.refreshing=!0,o(n,c=>c+1)}finally{u.refreshing=!1}},o(n,c=>c+1),()=>{u.mounted=!1,Zbe(u),u.cleanup==null||u.cleanup(),u.cleanup=void 0}});r.onMount=a=>a();const i=mn(a=>{a(n);const o=a(t);if(!o.mounted||o.recursing||o.inProgress&&!o.refreshing)return o.promise;Zbe(o);const u=new Map,c=l=>{const d=a(l);return u.set(l,d),d};c.peek=l=>o.get(l);const f=(...l)=>{try{return++o.inProgress,o.set(...l)}finally{Array.from(u.keys(),a),--o.inProgress}};f.recurse=(l,...d)=>{if(o.fromCleanup)process.env.NODE_ENV!=="production"&&console.warn("cannot recurse inside cleanup");else try{return o.recursing=!0,o.set(l,...d)}finally{o.recursing=!1,Array.from(u).some(([p,v])=>a(p)!==v)&&o.refresh()}},++o.inProgress;const s=()=>{try{if(o.refreshing=!1,!o.mounted)return;try{o.fromCleanup=!0,o.cleanup==null||o.cleanup()}finally{o.fromCleanup=!1}o.cleanup=e(c,f)}catch(l){o.pendingError=l,o.refresh()}finally{o.promise=void 0,--o.inProgress}};return o.refreshing?s():o.promise=Promise.resolve().then(s)});return process.env.NODE_ENV!=="production"&&(t.debugPrivate=!0,n.debugPrivate=!0,r.debugPrivate=!0,i.debugPrivate=!0),mn(a=>{a(r),a(i)})}function Zbe(e){if(e.pendingError!==null){const t=e.pendingError;throw e.pendingError=null,t}}const TXt=Symbol();function CXt(e,t){const n=mn(null);process.env.NODE_ENV!=="production"&&(n.debugPrivate=!0);const r=mn(f=>{const s=f(n);if(s)return s;let l=!0;const d=(...E)=>{if(l)return f(...E);throw new Error("get not allowed after initialization")},p=Xbe(e)?e(d):e,v=Xbe(t)?t(d):t;l=!1;const{guards:h,actions:$,actors:b,delays:y,context:m,...g}=v||{},_={guards:h??{},actions:$??{},actors:b??{},delays:y??{},context:m??{}},I=p.provide({..._}),A=MI(I,g);return{machine:I,actor:A}},(f,s)=>{s(n,f(r)),s(o)});r.onMount=f=>{f()};const i=mn(null);process.env.NODE_ENV!=="production"&&(i.debugPrivate=!0);const a=mn(null),o=mn(f=>{const s=f(a);return s||{unsubscribe(){}}},(f,s)=>{const l=f(o);l&&l.unsubscribe();const{actor:d}=f(r),p=d.subscribe(v=>{s(i,v)});s(a,p)}),u=mn(f=>{var s;return f(o),(s=f(i))!==null&&s!==void 0?s:f(r).actor.getSnapshot()},(f,s,l)=>{const{actor:d}=f(r);d.start(),l(()=>{const{actor:p}=f(r);p.stop(),s(a,null),s(i,null),s(n,null)})});return u.onMount=f=>{let s;return f(l=>{s===!1?l():s=l}),()=>{s&&s(),s=!1}},process.env.NODE_ENV!=="production"&&(u.debugPrivate=!0),process.env.NODE_ENV!=="production"&&(u.debugPrivate=!0),mn(f=>f(u),(f,s,l)=>{const{actor:d}=f(r);if(l===TXt){d.stop(),s(a,null),s(i,null),s(n,null),s(r),s(o);const{actor:p}=f(r);p.start()}else d.send(l)})}const Xbe=e=>typeof e=="function",ds="ConfigurationUninitialized";function Ud(e){return mn(t=>{try{return e(t,r=>{const i=t(r);if(i===ds)throw ds;return i})??ds}catch(n){if(n===ds)return ds;throw n}})}function xG(e){const{guardedConfigurationAtom:t,guardedAttributesAtom:n}=e;function r(i,a){const o=i==="all"?"all":R(i,dt(u=>typeof u=="string"?u:tl(u)));return Ud((u,c)=>{if(o==="all")return R(t,c,s=>s.attributes,wC(Vu));const f=c(n);return R(o,dt(s=>u(f(s))),a?Xx($h):Re)})}return r}const Uie=window.configuratorReactContexts??{AtomsContext:pe.createContext(null),StoreContext:pe.createContext(I4e())};window.configuratorReactContexts=Uie;const M4e=Uie.AtomsContext,R4e=Uie.StoreContext,uA=()=>pe.useContext(M4e),rW=()=>pe.useContext(R4e);function qie(e,t,n){const r=yS(Vn(fr),n);return(i,...a)=>{const o=uA(),u=rW(),c=kie(o.selectors.subscriberAtom,{store:u}),f=AXt(()=>i??!0?t(o,...a):e(o,...a),[i,a],r),s=pe.useMemo(()=>c(f),[c,f]);return pe.useEffect(()=>()=>{s.unsubscribe()},[s]),I6(f,{store:u})}}function xc(e,t){const n=qie(i=>e(i.selectors),i=>t(i.suspended),yS());function r(i){return n(i)}return r}function S6(e,t){const n=qie((i,a)=>e(i.selectors)(a),(i,a)=>t(i.suspended)(a),yS(He));function r(i,a){const o=pe.useMemo(()=>typeof i=="string"?i:tl(i),[i]);return n(a,o)}return r}function da(e){const t=A4e(e,(n,r)=>{if(n!==ds)return(r==null?void 0:r.deferredPromise)!=null?(r.deferredPromise.resolve(n),{deferredPromise:null,result:r.deferredPromise.promise}):{deferredPromise:null,result:n};const i=(r==null?void 0:r.deferredPromise)??qee();return{deferredPromise:i,result:i.promise}});return mn(n=>n(t).result)}const PXt=Ls().with(e=>typeof e=="string",Hn).with(e=>typeof e=="object",qi),FXt=Ls().with(e=>e==="all",He).with(e=>Array.isArray(e),tC(PXt)),WXt=qie((e,t,n)=>xG(e.selectors)(t,n),(e,t,n)=>da(xG(e.selectors)(t,n)),yS(FXt,Vn(fr)));function NXt(e,t,n){const r=e=="all"?t:n,i=e=="all"?void 0:t;return WXt(r,e,i)}const jXt=S6(e=>e.choiceAttributeAtomFamily,e=>e.choiceAttributeAtomFamily),kXt=S6(e=>e.numericAttributeAtomFamily,e=>e.numericAttributeAtomFamily),UXt=S6(e=>e.booleanAttributeAtomFamily,e=>e.booleanAttributeAtomFamily),qXt=S6(e=>e.componentAttributeAtomFamily,e=>e.componentAttributeAtomFamily);function xXt(){const{effects:e}=uA(),{addSessionListenersEffect:t,cleanupAtomFamiliesEffect:n,atomSubscriberEffect:r,atomSubscriptionCleanupEffect:i}=e;return yU(t),yU(n),yU(r),yU(i),null}const DXt=30*1e3,LXt=WeakRef!=null?e=>new WeakRef(e):e=>({deref:()=>e});function BXt(){return mn(nu)}function VXt(e){return mn(null,(t,n,r)=>{const i=HC.guid();bo.debug("AtomSubscription:","Creating subscription with id",i);const a={unsubscribe:()=>{n(e.subscriptionsAtom,o=>{const u=o.get(r);if(u==null)return o;const c=new Map(u);c.delete(i);const f=new Map(o);return f.set(r,c),f})}};return n(e.subscriptionsAtom,o=>{const u=new Map(o.get(r)??nu);u.set(i,LXt(a));const c=new Map(o);return c.set(r,u),c}),a})}function zXt(e){return _6(t=>{const n=[...t(e.subscriptionsAtom).keys()];bo.debug("AtomSubscriber:","There are",n.length,"Atoms to subscribe to.");for(const r of n)t(r)})}function KXt(e){return _6((t,n)=>{const r=setInterval(()=>{bo.info("AtomSubscriptionCleanup:","Running cleanup");let i=!1;n(e.subscriptionsAtom,a=>{const o=new Map(a);for(const u of[...o.keys()]){const c=new Map(o.get(u)??nu);for(const f of[...c.keys()]){const s=c.get(f);(s===void 0||s.deref()===void 0)&&(bo.debug("AtomSubscriptionCleanup:","Deleting subscription",f,"because it got garbage collected."),c.delete(f),i=!0)}o.set(u,c),c.size===0&&(bo.debug("AtomSubscriptionCleanup:","Delete Atom with 0 subscriptions."),o.delete(u),i=!0)}return bo.debug("AtomSubscriptionCleanup:","There are",o.size,"Atoms with",[...o.values(),YRe].length,"subscriptions left."),i?o:a})},DXt);return()=>{clearInterval(r)}})}const GXt=Uee(({input:e})=>R(e.session,Af(()=>()=>g4e.createSession(e.sessionContext),t=>async()=>(await t.setSessionContext(e.sessionContext),t)),t=>lb(t,n=>n),nw(t=>({sessionContext:e.sessionContext,configurationError:t})))()),HXt=yWe({types:{context:{},events:{}},actors:{createOrUpdateSession:GXt},guards:{shallProcess:({context:e})=>(e.sessionCreateOrUpdateError==null||e.sessionCreateOrUpdateError.sessionContext!==e.desiredSessionContext)&&(e.configurationSession==null&&e.desiredSessionContext!=null||e.configurationSession!=null&&e.configurationSession.getSessionContext()!==e.desiredSessionContext),shallDispose:({context:e})=>e.configurationSession!=null&&e.desiredSessionContext==null}}).createMachine({context:{desiredSessionContext:null,configurationSession:null,sessionCreateOrUpdateError:null},on:{Retry:{actions:[TI({sessionCreateOrUpdateError:()=>null})]},SessionContextChanged:{actions:[eE("SessionContextChanged"),TI({desiredSessionContext:({event:e})=>e.sessionContext})]},Shutdown:{target:"#shutdown"}},initial:"Idle",states:{Idle:{always:[{target:"DisposeSession",guard:"shallDispose"},{target:"Processing",guard:"shallProcess"}]},Processing:{invoke:{src:"createOrUpdateSession",input:({context:e})=>({sessionContext:e.desiredSessionContext,session:$h(e.configurationSession)}),onDone:{target:"Idle",actions:[af(({event:e,enqueue:t})=>{dx(e.output)?t.assign({configurationSession:e.output.right}):t.assign({sessionCreateOrUpdateError:e.output.left})})]}}},DisposeSession:{always:[{target:"Idle",actions:[af(({enqueue:e,context:t})=>{lb(async()=>{var n;return await((n=t.configurationSession)==null?void 0:n.close())},Re)(),e.assign({configurationSession:()=>null,sessionCreateOrUpdateError:()=>null})})]}]},Shutdown:{type:"final",id:"shutdown",entry:[af(({context:e,enqueue:t})=>{e.configurationSession&&lb(async()=>{var n;return await((n=e.configurationSession)==null?void 0:n.close())},Re)(),t.assign({configurationSession:()=>null,desiredSessionContext:()=>null,sessionCreateOrUpdateError:()=>null})})]}}});function JXt(){return CXt(HXt)}function YXt(e){return mn(t=>t(e.sessionManagementMachineAtom).context.configurationSession)}function ZXt(e){const t=mn((i,a)=>{var o;const u=i(e.sessionManagementMachineAtom),c=u.matches("Processing"),f=u.context.configurationSession!=null,s=(o=u.context.sessionCreateOrUpdateError)!=null&&o.configurationError?{...u.context.sessionCreateOrUpdateError.configurationError,retry:()=>{a.setSelf()}}:null;return{isProcessing:c,hasSession:f,error:s}},(i,a)=>{a(e.sessionManagementMachineAtom,{type:"Retry"})}),n=mn(i=>{const{hasSession:a,error:o,isProcessing:u}=i(t);return{isInitializing:!a&&u,error:!a&&o?o:void 0}}),r=mn(i=>{const{hasSession:a,error:o,isProcessing:u}=i(t);return{isUpdating:a&&u,error:a&&o?o:void 0}});return{sessionInitializationAtom:n,sessionUpdatingAtom:r}}const XXt=()=>J1(()=>mn()),QXt=()=>mn(),eQt=()=>mn(),tQt=()=>mn(),nQt=()=>mn();function rQt(e,t){const{attributesAtom:n,configurationAtom:r,isSatisfiedAtom:i,canResetAtom:a}=e,{configurationSessionAtom:o}=t;return _6((u,c)=>{const f=u(o);if(!f){c(r,void 0),c(i,void 0),c(n,void 0),c(a,void 0);return}const s=f.addConfigurationChangedListener((d,p)=>{bo.debug("SessionSubscription:","Received ConfigurationChanged"),c(r,d),p.isSatisfied!=null&&c(i,p.isSatisfied);const v=u.peek(n),h=v??XXt();p.attributes.added.forEach($=>{c(h($.key),$)}),p.attributes.changed.forEach($=>{c(h($.key),$)}),p.attributes.removed.forEach($=>{c(h(tl($)),void 0)}),v==null&&c(n,()=>h)}),l=f.addCanResetConfigurationChangedListener(d=>{bo.debug("SessionSubscription:","Received CanResetConfigurationChanged"),c(a,d)});return()=>{s.unsubscribe(),l.unsubscribe()}})}function w6(e,t,n){const r=mn(i=>{const a=i(e);if(!a)return;const o=mn();return o.onMount=u=>{const c=t(a,(...f)=>{u(f)});return()=>{u(void 0),c.unsubscribe()}},o});return mn(i=>{const a=i(r);if(a==null)return;const o=i(a);if(o!=null)return n(...o)})}function iQt(e){return w6(e,(t,n)=>t.addStoredConfigurationChangedListener(n),t=>t)}function aQt(e){return w6(e,(t,n)=>t.addDecisionsChangedListener(n),t=>t)}function oQt(e){return w6(e,(t,n)=>t.addDecisionsChangedListener(ti.Explicit,n),t=>t)}function uQt(e){return w6(e,(t,n)=>t.addDecisionsChangedListener(ti.Implicit,n),t=>t)}const cQt=()=>({sessionManagementMachineAtom:JXt(),configurationAtom:QXt(),isSatisfiedAtom:eQt(),canResetAtom:tQt(),attributesAtom:nQt(),subscriptionsAtom:BXt()});function fQt(e,t){return Ud((n,r)=>{const i=r(e);return{canResetConfiguration:r(t),resetConfiguration:i.resetConfiguration.bind(i)}})}function sQt(e){return Ud((t,n)=>{const r=n(e);return{explain:r.explain.bind(r),applySolution:r.applySolution.bind(r)}})}function lQt(e){return R(e.values,wC(Vu),Nu(t=>{var n;return((n=t.decision)==null?void 0:n.kind)===ti.Explicit}),dt(t=>({type:we.Choice,attributeId:e.id,choiceValueId:t.id,state:null})))}const Eu=Symbol.for("@ts-pattern/matcher"),O4e=Symbol.for("@ts-pattern/isVariadic"),oq="@ts-pattern/anonymous-select-key",DG=e=>!!(e&&typeof e=="object"),v2=e=>e&&!!e[Eu],Da=(e,t,n)=>{if(v2(e)){const r=e[Eu](),{matched:i,selections:a}=r.match(t);return i&&a&&Object.keys(a).forEach(o=>n(o,a[o])),i}if(DG(e)){if(!DG(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let r=[],i=[],a=[];for(const o of e.keys()){const u=e[o];v2(u)&&u[O4e]?a.push(u):a.length?i.push(u):r.push(u)}if(a.length){if(a.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.lengthDa(f,o[s],n))&&i.every((f,s)=>Da(f,u[s],n))&&(a.length===0||Da(a[0],c,n))}return e.length===t.length&&e.every((o,u)=>Da(o,t[u],n))}return Reflect.ownKeys(e).every(r=>{const i=e[r];return(r in t||v2(a=i)&&a[Eu]().matcherType==="optional")&&Da(i,t[r],n);var a})}return Object.is(t,e)},fc=e=>{var t,n,r;return DG(e)?v2(e)?(t=(n=(r=e[Eu]()).getSelectionKeys)==null?void 0:n.call(r))!=null?t:[]:Array.isArray(e)?BE(e,fc):BE(Object.values(e),fc):[]},BE=(e,t)=>e.reduce((n,r)=>n.concat(t(r)),[]);function dQt(...e){if(e.length===1){const[t]=e;return n=>Da(t,n,()=>{})}if(e.length===2){const[t,n]=e;return Da(t,n,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function La(e){return Object.assign(e,{optional:()=>xie(e),and:t=>pr(e,t),or:t=>E4e(e,t),select:t=>t===void 0?VE(e):VE(t,e)})}function LG(e){return Object.assign((t=>Object.assign(t,{[Symbol.iterator](){let n=0;const r=[{value:Object.assign(t,{[O4e]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var i;return(i=r[n++])!=null?i:r.at(-1)}}}}))(e),{optional:()=>LG(xie(e)),select:t=>LG(t===void 0?VE(e):VE(t,e))})}function xie(e){return La({[Eu]:()=>({match:t=>{let n={};const r=(i,a)=>{n[i]=a};return t===void 0?(fc(e).forEach(i=>r(i,void 0)),{matched:!0,selections:n}):{matched:Da(e,t,r),selections:n}},getSelectionKeys:()=>fc(e),matcherType:"optional"})})}const pQt=(e,t)=>{for(const n of e)if(!t(n))return!1;return!0},hQt=(e,t)=>{for(const[n,r]of e.entries())if(!t(r,n))return!1;return!0};function pr(...e){return La({[Eu]:()=>({match:t=>{let n={};const r=(i,a)=>{n[i]=a};return{matched:e.every(i=>Da(i,t,r)),selections:n}},getSelectionKeys:()=>BE(e,fc),matcherType:"and"})})}function E4e(...e){return La({[Eu]:()=>({match:t=>{let n={};const r=(i,a)=>{n[i]=a};return BE(e,fc).forEach(i=>r(i,void 0)),{matched:e.some(i=>Da(i,t,r)),selections:n}},getSelectionKeys:()=>BE(e,fc),matcherType:"or"})})}function an(e){return{[Eu]:()=>({match:t=>({matched:!!e(t)})})}}function VE(...e){const t=typeof e[0]=="string"?e[0]:void 0,n=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return La({[Eu]:()=>({match:r=>{let i={[t??oq]:r};return{matched:n===void 0||Da(n,r,(a,o)=>{i[a]=o}),selections:i}},getSelectionKeys:()=>[t??oq].concat(n===void 0?[]:fc(n))})})}function Nl(e){return typeof e=="number"}function Qv(e){return typeof e=="string"}function em(e){return typeof e=="bigint"}const T4e=La(an(function(e){return!0})),vQt=T4e,tm=e=>Object.assign(La(e),{startsWith:t=>{return tm(pr(e,(n=t,an(r=>Qv(r)&&r.startsWith(n)))));var n},endsWith:t=>{return tm(pr(e,(n=t,an(r=>Qv(r)&&r.endsWith(n)))));var n},minLength:t=>tm(pr(e,(n=>an(r=>Qv(r)&&r.length>=n))(t))),length:t=>tm(pr(e,(n=>an(r=>Qv(r)&&r.length===n))(t))),maxLength:t=>tm(pr(e,(n=>an(r=>Qv(r)&&r.length<=n))(t))),includes:t=>{return tm(pr(e,(n=t,an(r=>Qv(r)&&r.includes(n)))));var n},regex:t=>{return tm(pr(e,(n=t,an(r=>Qv(r)&&!!r.match(n)))));var n}}),mQt=tm(an(Qv)),jl=e=>Object.assign(La(e),{between:(t,n)=>jl(pr(e,((r,i)=>an(a=>Nl(a)&&r<=a&&i>=a))(t,n))),lt:t=>jl(pr(e,(n=>an(r=>Nl(r)&&rjl(pr(e,(n=>an(r=>Nl(r)&&r>n))(t))),lte:t=>jl(pr(e,(n=>an(r=>Nl(r)&&r<=n))(t))),gte:t=>jl(pr(e,(n=>an(r=>Nl(r)&&r>=n))(t))),int:()=>jl(pr(e,an(t=>Nl(t)&&Number.isInteger(t)))),finite:()=>jl(pr(e,an(t=>Nl(t)&&Number.isFinite(t)))),positive:()=>jl(pr(e,an(t=>Nl(t)&&t>0))),negative:()=>jl(pr(e,an(t=>Nl(t)&&t<0)))}),gQt=jl(an(Nl)),nm=e=>Object.assign(La(e),{between:(t,n)=>nm(pr(e,((r,i)=>an(a=>em(a)&&r<=a&&i>=a))(t,n))),lt:t=>nm(pr(e,(n=>an(r=>em(r)&&rnm(pr(e,(n=>an(r=>em(r)&&r>n))(t))),lte:t=>nm(pr(e,(n=>an(r=>em(r)&&r<=n))(t))),gte:t=>nm(pr(e,(n=>an(r=>em(r)&&r>=n))(t))),positive:()=>nm(pr(e,an(t=>em(t)&&t>0))),negative:()=>nm(pr(e,an(t=>em(t)&&t<0)))}),yQt=nm(an(em)),bQt=La(an(function(e){return typeof e=="boolean"})),$Qt=La(an(function(e){return typeof e=="symbol"})),IQt=La(an(function(e){return e==null})),_Qt=La(an(function(e){return e!=null}));var SQt={__proto__:null,matcher:Eu,optional:xie,array:function(...e){return LG({[Eu]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const n=e[0];let r={};if(t.length===0)return fc(n).forEach(a=>{r[a]=[]}),{matched:!0,selections:r};const i=(a,o)=>{r[a]=(r[a]||[]).concat([o])};return{matched:t.every(a=>Da(n,a,i)),selections:r}},getSelectionKeys:()=>e.length===0?[]:fc(e[0])})})},set:function(...e){return La({[Eu]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let n={};if(t.size===0)return{matched:!0,selections:n};if(e.length===0)return{matched:!0};const r=(a,o)=>{n[a]=(n[a]||[]).concat([o])},i=e[0];return{matched:pQt(t,a=>Da(i,a,r)),selections:n}},getSelectionKeys:()=>e.length===0?[]:fc(e[0])})})},map:function(...e){return La({[Eu]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let n={};if(t.size===0)return{matched:!0,selections:n};const r=(u,c)=>{n[u]=(n[u]||[]).concat([c])};if(e.length===0)return{matched:!0};var i;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(i=e[0])==null?void 0:i.toString()}`);const[a,o]=e;return{matched:hQt(t,(u,c)=>{const f=Da(a,c,r),s=Da(o,u,r);return f&&s}),selections:n}},getSelectionKeys:()=>e.length===0?[]:[...fc(e[0]),...fc(e[1])]})})},intersection:pr,union:E4e,not:function(e){return La({[Eu]:()=>({match:t=>({matched:!Da(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:an,select:VE,any:T4e,_:vQt,string:mQt,number:gQt,bigint:yQt,boolean:bQt,symbol:$Qt,nullish:IQt,nonNullable:_Qt,instanceOf:function(e){return La(an(function(t){return n=>n instanceof t}(e)))},shape:function(e){return La(an(dQt(e)))}};let wQt=class extends Error{constructor(t){let n;try{n=JSON.stringify(t)}catch{n=t}super(`Pattern matching error: no pattern matches value ${n}`),this.input=void 0,this.input=t}};const BG={matched:!1,value:void 0};function uq(e){return new AQt(e,BG)}let AQt=class VG{constructor(t,n){this.input=void 0,this.state=void 0,this.input=t,this.state=n}with(...t){if(this.state.matched)return this;const n=t[t.length-1],r=[t[0]];let i;t.length===3&&typeof t[1]=="function"?i=t[1]:t.length>2&&r.push(...t.slice(1,t.length-1));let a=!1,o={};const u=(f,s)=>{a=!0,o[f]=s},c=!r.some(f=>Da(f,this.input,u))||i&&!i(this.input)?BG:{matched:!0,value:n(a?oq in o?o[oq]:o:this.input,this.input)};return new VG(this.input,c)}when(t,n){if(this.state.matched)return this;const r=!!t(this.input);return new VG(this.input,r?{matched:!0,value:n(this.input,this.input)}:BG)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(){if(this.state.matched)return this.state.value;throw new wQt(this.input)}run(){return this.exhaustive()}returnType(){return this}};function xy(e,t){var n=0,r,i;t=t||{};function a(){var o=r,u=arguments.length,c,f;e:for(;o;){if(o.args.length!==arguments.length){o=o.next;continue}for(f=0;f{const{makeDecision:o,makeManyDecisions:u}=a(t);return{makeDecision:(c,f)=>o({type:we.Choice,attributeId:r.id,choiceValueId:c,state:f}),clearDecisions:()=>R(r,lQt,mh(Jn),Af(()=>()=>Promise.resolve(),c=>R(()=>u(c,{type:"KeepExistingDecisions"}),Ps(Ywe))))(),isMultiSelect:xy(()=>H1.isChoiceAttributeMultiSelect(r)),getAllowedChoiceValues:xy(()=>H1.getAllowedChoiceValues(r)),getIncludedChoiceValues:xy(()=>H1.getIncludedChoiceValues(r)),getBlockedChoiceValues:xy(()=>H1.getBlockedChoiceValues(r)),isChoiceValueAllowed:xy(c=>PG.isAllowed(c)),isChoiceValueBlocked:xy(c=>PG.isBlocked(c))}})}function RQt(e,t,n){return A6(e,n,QF.numericAttributeRefinement,Wr.numeric,(r,i,a)=>{const{makeDecision:o}=a(t);return{makeDecision:u=>o({type:we.Numeric,attributeId:r.id,state:u})}})}function OQt(e,t,n){return A6(e,n,QF.booleanAttributeRefinement,Wr.boolean,(r,i,a)=>{const{makeDecision:o}=a(t);return{makeDecision:u=>o({type:we.Boolean,attributeId:r.id,state:u})}})}function EQt(e,t,n){return A6(e,n,QF.componentAttributeRefinement,Wr.component,(r,i,a)=>{const{makeDecision:o}=a(t);return{makeDecision:u=>o({type:we.Component,attributeId:r.id,state:u})}})}function A6(e,t,n,r,i){return J1(a=>Ud((o,u)=>{const c=u(e),f=o(c(a));if(!f||!n(f))return;const{explain:s,applySolution:l}=u(t),d=i(f,o,u);return d===ds?ds:{attribute:f,isMandatory:xy(()=>H1.isMandatory(f)),explain:(p,v)=>{const h=uq(p.question).with(go.whyIsNotSatisfied,()=>Wr.attribute).otherwise(()=>r),$={...p,subject:h,attributeId:f.id};return uq(v).with("decisions",b=>s($,b)).with("constraints",b=>s($,b)).with("full",b=>s($,b)).exhaustive()},applySolution:l,...d}}))}function C4e(e,t){const n=A4e(e,Re,t.equals);return"write"in e?mn(r=>r(n),(r,i,...a)=>i(e,...a)):n}const TQt=at({isInitializing:fr,error:Vn(rg)});function CQt(e,t,n,r,i,a){const o=[t,n,r,i,a],u=mn(c=>{const f=R(o,cZ(l=>c(l)!==ds)),s=c(e);return{isInitializing:!(!s.isInitializing&&f),error:s.error}});return C4e(u,TQt)}const PQt=at({isUpdating:fr,error:Vn(rg)});function FQt(e){return C4e(e,PQt)}function WQt(e){return Ud((t,n)=>{const r=n(e);return{storeConfiguration:r.storeConfiguration.bind(r),restoreConfiguration:r.restoreConfiguration.bind(r)}})}function NQt(e,t){const n={question:go.whyIsNotSatisfied,subject:Wr.configuration};return Ud((r,i)=>{const a=i(e);return{isSatisfied:i(t),explain:o=>uq(o).with("full",u=>a.explain(n,u)).with("decisions",u=>a.explain(n,u)).with("constraints",u=>a.explain(n,u)).exhaustive()}})}function jQt(e){return Ud((t,n)=>{const r=n(e);return{reinitializeSession:r.reinitialize.bind(r)}})}function kQt(e){return Ud((t,n)=>{const r=n(e);return{scheduleTask:r.scheduleTask.bind(r)}})}function UQt(e){return Ud((t,n)=>{const r=n(e);return{getDecisions:r.getDecisions.bind(r)}})}function qQt(e){return Ud((t,n)=>{const r=n(e);return{makeDecision:r.makeDecision.bind(r),makeManyDecisions:r.makeManyDecisions.bind(r)}})}function Ap(e){return mn(t=>t(e)??ds)}function xQt(e){const{sessionInitializationAtom:t,sessionUpdatingAtom:n}=ZXt(e),r=YXt(e),i={guardedConfigurationSessionAtom:Ap(r),guardedConfigurationAtom:Ap(e.configurationAtom),guardedIsSatisfiedAtom:Ap(e.isSatisfiedAtom),guardedCanResetAtom:Ap(e.canResetAtom),guardedAttributesAtom:Ap(e.attributesAtom),guardedStoredConfigurationAtom:Ap(iQt(r)),guardedDecisionsAtom:Ap(aQt(r)),guardedExplicitDecisionsAtom:Ap(oQt(r)),guardedImplicitDecisionsAtom:Ap(uQt(r))},a=qQt(i.guardedConfigurationSessionAtom),o=sQt(i.guardedConfigurationSessionAtom);return{...i,configurationSessionAtom:r,sessionInitializationAtom:t,sessionUpdatingAtom:n,configurationInitializationAtom:CQt(t,i.guardedConfigurationSessionAtom,i.guardedConfigurationAtom,i.guardedCanResetAtom,i.guardedIsSatisfiedAtom,i.guardedAttributesAtom),configurationUpdatingAtom:FQt(n),makeDecisionAtom:a,explainAtom:o,decisionQueriesAtom:UQt(i.guardedConfigurationSessionAtom),taskSchedulingAtom:kQt(i.guardedConfigurationSessionAtom),configurationSatisfactionAtom:NQt(i.guardedConfigurationSessionAtom,i.guardedIsSatisfiedAtom),configurationStoringAtom:WQt(i.guardedConfigurationSessionAtom),configurationResetAtom:fQt(i.guardedConfigurationSessionAtom,i.guardedCanResetAtom),sessionReinitializationAtom:jQt(i.guardedConfigurationSessionAtom),choiceAttributeAtomFamily:MQt(i.guardedAttributesAtom,a,o),numericAttributeAtomFamily:RQt(i.guardedAttributesAtom,a,o),booleanAttributeAtomFamily:OQt(i.guardedAttributesAtom,a,o),componentAttributeAtomFamily:EQt(i.guardedAttributesAtom,a,o),subscriberAtom:VXt(e)}}const DQt=30*1e3;function LQt(e,t,n){const r=[t.choiceAttributeAtomFamily,t.booleanAttributeAtomFamily,t.numericAttributeAtomFamily,t.componentAttributeAtomFamily,n.choiceAttributeAtomFamily,n.booleanAttributeAtomFamily,n.numericAttributeAtomFamily,n.componentAttributeAtomFamily];return _6(i=>{i(e.configurationAtom);const a=i(e.attributesAtom);if(a==null)return;bo.debug("Scheduling atomFamily cleanup");const o=setTimeout(()=>{bo.debug("Cleaning up atomFamilies");for(const c of[...a.getParams()]){const f=a(c);i.peek(f)==null&&(bo.debug("Removing attribute from attributes family because it is nullish",c),a.remove(c))}const u=[...a.getParams()];for(const c of r)for(const f of[...c.getParams()])u.includes(f)||c.remove(f)},DQt);return()=>{clearTimeout(o)}})}function BQt(e,t,n){return{addSessionListenersEffect:rQt(e,t),cleanupAtomFamiliesEffect:LQt(e,t,n),atomSubscriberEffect:zXt(e),atomSubscriptionCleanupEffect:KXt(e)}}function VQt(e){return{configurationAtom:da(e.guardedConfigurationAtom),configurationStoringAtom:da(e.configurationStoringAtom),configurationSatisfactionAtom:da(e.configurationSatisfactionAtom),storedConfigurationAtom:da(e.guardedStoredConfigurationAtom),decisionsAtom:da(e.guardedDecisionsAtom),explicitDecisionsAtom:da(e.guardedExplicitDecisionsAtom),implicitDecisionsAtom:da(e.guardedImplicitDecisionsAtom),makeDecisionAtom:da(e.makeDecisionAtom),decisionQueriesAtom:da(e.decisionQueriesAtom),configurationResetAtom:da(e.configurationResetAtom),sessionReinitializationAtom:da(e.sessionReinitializationAtom),explainAtom:da(e.explainAtom),taskSchedulingAtom:da(e.taskSchedulingAtom),choiceAttributeAtomFamily:J1(t=>da(e.choiceAttributeAtomFamily(t))),numericAttributeAtomFamily:J1(t=>da(e.numericAttributeAtomFamily(t))),booleanAttributeAtomFamily:J1(t=>da(e.booleanAttributeAtomFamily(t))),componentAttributeAtomFamily:J1(t=>da(e.componentAttributeAtomFamily(t)))}}function zQt(){const e=cQt(),t=xQt(e),n=VQt(t);return{primitives:e,selectors:t,suspended:n,effects:BQt(e,t,n)}}const KQt="The session context is null or undefined. This will dispose the session that may exist. If this was not intended, make sure you pass valid session context data.";function GQt(e){const{primitives:{sessionManagementMachineAtom:t}}=uA(),n=kie(t);return pe.useEffect(()=>{n({type:"SessionContextChanged",sessionContext:e.sessionContext}),e.sessionContext||console.warn(KQt)},[e.sessionContext]),pe.useEffect(()=>()=>{n({type:"Shutdown"})},[]),null}function HQt(e){const t=pe.useMemo(()=>zQt(),[]);return Y.jsx(Y.Fragment,{children:Y.jsx(M4e.Provider,{value:t,children:Y.jsx(JQt,{jotaiStore:e.jotaiStore,children:Y.jsxs(YQt,{children:[Y.jsx(GQt,{sessionContext:e.sessionContext}),Y.jsx(xXt,{}),e.children]})})})})}function JQt(e){return e.jotaiStore?Y.jsx(R4e.Provider,{value:e.jotaiStore,children:e.children}):Y.jsx(Y.Fragment,{children:e.children})}function YQt(e){const t=rW();return Y.jsx(_Xt,{store:t,children:e.children})}function ZQt(){const{selectors:{configurationInitializationAtom:e}}=uA(),t=rW();return I6(e,{store:t})}function XQt(){const{selectors:{configurationUpdatingAtom:e}}=uA(),t=rW();return I6(e,{store:t})}const QQt=xc(e=>e.explainAtom,e=>e.explainAtom),een=xc(e=>e.guardedConfigurationAtom,e=>e.configurationAtom),ten=xc(e=>e.configurationSatisfactionAtom,e=>e.configurationSatisfactionAtom),nen=xc(e=>e.configurationStoringAtom,e=>e.configurationStoringAtom),ren=xc(e=>e.configurationResetAtom,e=>e.configurationResetAtom),ien=xc(e=>e.sessionReinitializationAtom,e=>e.sessionReinitializationAtom),aen=xc(e=>e.taskSchedulingAtom,e=>e.taskSchedulingAtom),oen=xc(e=>e.guardedStoredConfigurationAtom,e=>e.storedConfigurationAtom),uen=xc(e=>e.makeDecisionAtom,e=>e.makeDecisionAtom),cen=xc(e=>e.decisionQueriesAtom,e=>e.decisionQueriesAtom),fen=xc(e=>e.guardedDecisionsAtom,e=>e.decisionsAtom),sen=xc(e=>e.guardedExplicitDecisionsAtom,e=>e.explicitDecisionsAtom),len=xc(e=>e.guardedImplicitDecisionsAtom,e=>e.implicitDecisionsAtom);function den(e,t){const n=typeof e=="string"?e:void 0,r=typeof e=="boolean"?e:t,i=pe.useMemo(()=>uq(n).returnType().with(SQt.nullish,()=>fen).with(ti.Explicit,()=>sen).with(ti.Implicit,()=>len).exhaustive(),[n]);return r===!1?i(!1):i()}function pen(){const{selectors:e}=uA();return pe.useMemo(()=>({getConfigurationInitializationAtom:e.configurationInitializationAtom,getConfigurationUpdatingAtom:e.configurationUpdatingAtom,createAttributesAtom:xG(e),getChoiceAttributeAtomFamily:e.choiceAttributeAtomFamily,getNumericAttributeAtomFamily:e.numericAttributeAtomFamily,getBooleanAttributeAtomFamily:e.booleanAttributeAtomFamily,getComponentAttributeAtomFamily:e.componentAttributeAtomFamily,getConfigurationAtom:e.guardedConfigurationAtom,getConfigurationSatisfactionAtom:e.configurationSatisfactionAtom,getConfigurationStoringAtom:e.configurationStoringAtom,getMakeDecisionAtom:e.makeDecisionAtom,getDecisionQueriesAtom:e.decisionQueriesAtom,getConfigurationResetAtom:e.configurationResetAtom,getSessionReinitializationAtom:e.sessionReinitializationAtom,getExplainAtom:e.explainAtom,getTaskSchedulingAtom:e.taskSchedulingAtom,getStoredConfigurationAtom:e.guardedStoredConfigurationAtom,getDecisionsAtom:e.guardedDecisionsAtom,getExplicitDecisionsAtom:e.guardedExplicitDecisionsAtom,getImplicitDecisionsAtom:e.guardedImplicitDecisionsAtom}),[e])}const hen=Object.freeze(Object.defineProperty({__proto__:null,Configuration:HQt,ConfigurationUninitialized:ds,useAttributes:NXt,useBooleanAttribute:UXt,useChoiceAttribute:jXt,useComponentAttribute:qXt,useConfiguration:een,useConfigurationInitialization:ZQt,useConfigurationReset:ren,useConfigurationSatisfaction:ten,useConfigurationStoring:nen,useConfigurationUpdating:XQt,useConfiguratorStore:rW,useDecisionQueries:cen,useDecisions:den,useExplain:QQt,useJotaiAtoms:pen,useMakeDecision:uen,useNumericAttribute:kXt,useSessionReinitialization:ien,useStoredConfiguration:oen,useTaskScheduling:aen},Symbol.toStringTag,{value:"Module"}));var ven=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r1?e(t[1],t[0]):function(r){return e(r)(t[0])}}}function Se(e,t,n,r,i,a,o,u,c){switch(arguments.length){case 1:return e;case 2:return function(){return t(e.apply(this,arguments))};case 3:return function(){return n(t(e.apply(this,arguments)))};case 4:return function(){return r(n(t(e.apply(this,arguments))))};case 5:return function(){return i(r(n(t(e.apply(this,arguments)))))};case 6:return function(){return a(i(r(n(t(e.apply(this,arguments))))))};case 7:return function(){return o(a(i(r(n(t(e.apply(this,arguments)))))))};case 8:return function(){return u(o(a(i(r(n(t(e.apply(this,arguments))))))))};case 9:return function(){return c(u(o(a(i(r(n(t(e.apply(this,arguments)))))))))}}}function R6(){for(var e=[],t=0;t=e}:e;return function(){var r=Array.from(arguments);return n(arguments)?t.apply(this,r):function(i){return t.apply(void 0,ven([i],r,!1))}}};const q4e=Object.freeze(Object.defineProperty({__proto__:null,SK:pu,absurd:U4e,apply:men,constFalse:N4e,constNull:j4e,constTrue:Bie,constUndefined:Vie,constVoid:k4e,constant:jo,decrement:ben,dual:Fe,flip:gen,flow:Se,getBooleanAlgebra:P4e,getEndomorphismMonoid:wen,getMonoid:F4e,getRing:W4e,getSemigroup:Die,getSemiring:Lie,hole:_en,identity:Oe,increment:yen,not:Sen,pipe:M,tuple:R6,tupled:$en,unsafeCoerce:M6,untupled:Ien},Symbol.toStringTag,{value:"Module"}));var Aen=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r0},Dc=function(e){return e[0]},cA=function(e){return e.slice(1)},Na=[],ra={},br=Object.prototype.hasOwnProperty,O6=function(e){return Aen([e[0]],e.slice(1),!0)},fA=function(e){return function(t,n){return function(){for(var r=[],i=0;i-1?t:n}},D6e=function(e){var t=k6(e),n=U6(e);return function(r,i){return function(a){return n(t(a,i),r)}}},Wnn=function(e){var t=q6e(e),n=x6e(e);return function(r,i){return function(a){return!(t(a,r)||n(a,i))}}},Nnn=N6e,jnn=qm,knn=U6e;function Unn(e,t){return et?1:0}var hae={equals:kg.equals,compare:Unn},qnn=hae,xnn=hae,fq=hae,Dnn=M(fq,Ic(function(e){return e.valueOf()}));const Lnn=Object.freeze(Object.defineProperty({__proto__:null,Contravariant:U6e,URI:j6e,between:Wnn,clamp:D6e,contramap:Ic,equals:Cnn,equalsDefault:W6e,fromCompare:iv,geq:Fnn,getDualOrd:jnn,getMonoid:bW,getSemigroup:k6e,getTupleOrd:Nnn,gt:x6e,leq:Pnn,lt:q6e,max:U6,min:k6,ord:knn,ordBoolean:qnn,ordDate:Dnn,ordNumber:fq,ordString:xnn,reverse:qm,trivial:fl,tuple:N6e},Symbol.toStringTag,{value:"Module"}));var L6e=function(e){return{concat:function(t,n){return e.concat(n,t)}}},Bnn=function(e){return function(t){return{concat:function(n,r){return e(n)?t.concat(n,r):r}}}},Vnn=function(e){return function(t){return{concat:function(n,r){return e(r)?t.concat(n,r):n}}}},znn=function(e){return function(t){return{concat:function(n,r){return t.concat(e(n),e(r))}}}},B6e=function(e){return function(t){return function(n){return n.reduce(function(r,i){return e.concat(r,i)},t)}}};const Knn=Object.freeze(Object.defineProperty({__proto__:null,concatAll:B6e,endo:znn,filterFirst:Bnn,filterSecond:Vnn,reverse:L6e},Symbol.toStringTag,{value:"Module"}));var q6=function(e){return{concat:k6(e)}},x6=function(e){return{concat:U6(e)}},vae=function(e){return{concat:function(){return e}}},mae=L6e,gae=function(e){return{concat:function(t,n){var r={};for(var i in e)br.call(e,i)&&(r[i]=e[i].concat(t[i],n[i]));return r}}},yae=function(){for(var e=[],t=0;t=t.length},Iae=function(e){return function(t){return KE([e],t,!0)}},a_=Iae,_ae=function(e){return function(t){return KE(KE([],t,!0),[e],!1)}},L6=_ae,B6=function(e,t,n){if(Vd(n)){var r=O6(n);return r.splice(e,0,t),r}return[t]},Sae=function(e,t,n){if(n[e]===t)return n;var r=O6(n);return r[e]=t,r},wae=function(e){return function(t){if(t.length===1)return t;for(var n=[io(t)],r=Ms(t),i=function(c){n.every(function(f){return!e.equals(f,c)})&&n.push(c)},a=0,o=r;a=t.length?[t,$W]:[M(t.slice(1,n),a_(io(t))),t.slice(n)]}},u5e=function(e){return Tae(G6(e))},sl=function(e,t){return M(e,kae(t))},Cae=function(e,t){return M(e,Uae(t))},_W=function(e,t){return M(e,p5e(t))},c5e=function(e,t){return M(e,jae(t))},SW=function(e,t,n){return M(e,qae(t,n))},wW=function(e){var t=xae(e);return function(n,r){return M(n,t(r))}},AW=function(e,t,n){return M(e,Dae(t,n))},Pae=function(e){var t=h5e(e);return function(n,r){return M(n,t(r))}},f5e=function(e,t){return M(e,d5e(t))},Fae=function(e,t,n){return M(e,H6(t,n))},Wae=function(e){var t=Lae(e);return function(n,r){return M(n,t(r))}},Nae=function(e,t,n){return M(e,J6(t,n))},s5e=function(e){var t=Z6(e);return function(n,r){return M(n,t(r))}},qg=iW,l5e=function(e){return function(t){return M(t,t5e(e()))}},d5e=l5e,p5e=function(e){return d$(function(t){return M(e,kae(t))})},d$=Fe(2,function(e,t){return M(e,o5e(function(n,r){return t(r,n)}))}),jae=function(e){return function(t){for(var n=Ms(t),r=[e(t)];Vd(n);)r.push(e(n)),n=Ms(n);return r}},frn=jae(Oe),srn=d$(Oe),kae=function(e){return Uae(function(t,n){return e(n)})},Uae=function(e){return function(t){for(var n=[e(0,io(t))],r=1;rn.length?_t:gt(B6(e,t,n))}},Lrn=K6,Brn=t5,Vrn={URI:mu,of:qg,map:sl,mapWithIndex:Cae,ap:_W,chain:d$,extend:c5e,extract:X6,reduce:SW,foldMap:wW,reduceRight:AW,traverse:Pae,sequence:Y6,reduceWithIndex:Fae,foldMapWithIndex:Wae,reduceRightWithIndex:Nae,traverseWithIndex:s5e,alt:f5e};const w5e=Object.freeze(Object.defineProperty({__proto__:null,Alt:Arn,Applicative:yrn,Apply:e5,Chain:Bae,Comonad:Mrn,Do:Rrn,Foldable:Irn,FoldableWithIndex:_rn,Functor:Q6,FunctorWithIndex:vrn,Monad:$rn,Pointed:hrn,Traversable:Srn,TraversableWithIndex:wrn,URI:mu,alt:d5e,altW:l5e,ap:p5e,apFirst:mrn,apS:Crn,apSecond:grn,append:L6,appendW:_ae,bind:Trn,bindTo:Orn,chain:jrn,chainFirst:brn,chainWithIndex:o5e,chop:Tae,chunksOf:u5e,concat:IW,concatAll:t5,concatW:t5e,cons:_5e,duplicate:frn,empty:$W,extend:jae,extract:X6,filter:Urn,filterWithIndex:I5e,flap:prn,flatMap:d$,flatten:srn,fold:Brn,foldMap:xae,foldMapWithIndex:Lae,fromArray:arn,fromReadonlyArray:V6,getEq:m5e,getSemigroup:lrn,getShow:v5e,getUnionSemigroup:drn,group:n5e,groupBy:Rae,groupSort:krn,head:io,init:$A,insertAt:Drn,intercalate:Vae,intersperse:Eae,isNonEmpty:Vd,isOutOfBound:D6,last:xg,let:Ern,makeBy:z6,map:kae,mapWithIndex:Uae,matchLeft:Prn,matchRight:Frn,max:y5e,min:g5e,modifyAt:r5e,modifyHead:b5e,modifyLast:$5e,of:qg,prepend:a_,prependAll:K6,prependToAll:Lrn,prependW:Iae,range:X6e,readonlyNonEmptyArray:Vrn,reduce:qae,reduceRight:Dae,reduceRightWithIndex:J6,reduceWithIndex:H6,replicate:irn,reverse:orn,rotate:Mae,sequence:Y6,snoc:S5e,sort:Oae,sortBy:Z6e,splitAt:G6,tail:Ms,traverse:h5e,traverseWithIndex:Z6,unappend:e5e,uncons:qrn,union:Aae,uniq:wae,unprepend:Q6e,unsafeInsertAt:B6,unsafeUpdateAt:Sae,unsnoc:xrn,unzip:crn,updateAt:urn,updateHead:Wrn,updateLast:Nrn,zip:a5e,zipWith:i5e},Symbol.toStringTag,{value:"Module"}));var GE=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r0},n5=function(e,t){return e<0||e>=t.length},zae=function(e){return function(t){return GE([e],t,!0)}},o_=zae,Kae=function(e){return function(t){return GE(GE([],t,!0),[e],!1)}},MW=Kae,Gae=function(e,t,n){if(av(n)){var r=RW(n);return r.splice(e,0,t),r}return[t]},Hae=function(e,t,n){var r=RW(n);return r[e]=t,r},Jae=function(e){return function(t){if(t.length===1)return IA(t);for(var n=[xf(t)],r=Rs(t),i=function(c){n.every(function(f){return!e.equals(f,c)})&&n.push(c)},a=0,o=r;an.length?_t:gt(Gae(e,t,n))}},Jrn=function(e,t){return P5e(e,function(){return t})},P5e=function(e,t){return function(n){return n5(e,n)?_t:gt(Hae(e,t(n[e]),n))}},IA=RW,Dg=function(e){return[e]},F5e=function(e,t,n){for(var r=[n(e[0],t[0])],i=Math.min(e.length,t.length),a=1;a=t.length?[IA(t),[]]:[M(t.slice(1,n),o_(xf(t))),t.slice(n)]}},q5e=function(e){return Qae(o5(e))},ll=function(e,t){return M(e,ooe(t))},eoe=function(e,t){return M(e,uoe(t))},OW=function(e,t){return M(e,z5e(t))},x5e=function(e,t){return M(e,aoe(t))},EW=function(e,t,n){return M(e,K5e(t,n))},TW=function(e){var t=k5e(e);return function(n,r){return M(n,t(r))}},CW=function(e,t,n){return M(e,H5e(t,n))},toe=function(e){var t=Y5e(e);return function(n,r){return M(n,t(r))}},D5e=function(e,t){return M(e,V5e(t))},noe=function(e,t,n){return M(e,G5e(t,n))},roe=function(e){var t=j5e(e);return function(n,r){return M(n,t(r))}},ioe=function(e,t,n){return M(e,J5e(t,n))},L5e=function(e){var t=c5(e);return function(n,r){return M(n,t(r))}},B5e=function(e){return function(t){return M(t,T5e(e()))}},V5e=B5e,z5e=function(e){return p$(function(t){return M(e,ooe(t))})},p$=Fe(2,function(e,t){return M(e,U5e(function(n,r){return t(r,n)}))}),aoe=function(e){return function(t){for(var n=Rs(t),r=[e(t)];av(n);)r.push(e(n)),n=Rs(n);return r}},Zrn=aoe(Oe),Xrn=p$(Oe),ooe=function(e){return uoe(function(t,n){return e(n)})},uoe=function(e){return function(t){for(var n=[e(0,xf(t))],r=1;rt?1:0}},qin={equals:ru.equals,compare:h$.compare,top:1/0,bottom:-1/0},pm={show:function(e){return JSON.stringify(e)}},rBe={concat:function(e,t){return e-t}},soe={concat:function(e,t){return e+t}},loe={concat:function(e,t){return e*t}},xin={concat:soe.concat,empty:0},Din={concat:loe.concat,empty:1},Lin={add:soe.concat,zero:0,mul:loe.concat,one:1,sub:rBe.concat,degree:function(e){return 1},div:function(e,t){return e/t},mod:function(e,t){return e%t}};const Bin=Object.freeze(Object.defineProperty({__proto__:null,Bounded:qin,Eq:ru,Field:Lin,MagmaSub:rBe,MonoidProduct:Din,MonoidSum:xin,Ord:h$,SemigroupProduct:loe,SemigroupSum:soe,Show:pm,isNumber:Uin},Symbol.toStringTag,{value:"Module"}));function wA(e,t){return function(n){return n?t.of(void 0):e.zero()}}const Vin=Object.freeze(Object.defineProperty({__proto__:null,guard:wA},Symbol.toStringTag,{value:"Module"}));var zin=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r=0;a--)i[a]=t(n[a],i[a+1]);return i}},tan=function(e){return e.length},AA=D6;function Xp(e,t){return t===void 0?function(n){return Xp(e,n)}:AA(e,t)?_t:gt(t[e])}var pBe=function(e){return Yn(e)?gt(io(e)):_t},hBe=function(e){return Yn(e)?gt(xg(e)):_t},nan=function(e){return Yn(e)?gt(Ms(e)):_t},ran=function(e){return Yn(e)?gt($A(e)):_t},ian=function(e){return function(t){return AA(e,t)?t:e===0?ar:t.slice(0,e)}},aan=function(e){return function(t){return AA(e,t)?t:e===0?ar:t.slice(-e)}};function KG(e){return function(t){for(var n=[],r=0,i=t;r=t.length?ar:t.slice(e,t.length)}},can=function(e){return function(t){return e<=0||vf(t)?t:e>=t.length?ar:t.slice(0,t.length-e)}};function fan(e){return function(t){var n=vBe(t,e);return n===0?t:n===t.length?ar:t.slice(n)}}var PW=function(e){return function(t){for(var n=0;n=0;n--)if(e(t[n]))return gt(t[n]);return _t}}var yBe=function(e){return function(t){for(var n=t.length-1;n>=0;n--){var r=e(t[n]);if(Jr(r))return r}return _t}},bBe=function(e){return function(t){for(var n=t.length-1;n>=0;n--)if(e(t[n]))return gt(n);return _t}},san=function(e,t){return function(n){return e<0||e>n.length?_t:gt(B6(e,t,n))}},lan=function(e,t){return $Be(e,function(){return t})},dan=function(e){return function(t){return AA(e,t)?_t:gt(JBe(e,t))}},$Be=function(e,t){return function(n){return AA(e,n)?_t:gt(w5(e,t(n[e]),n))}},pan=function(e){return e.length<=1?e:e.slice().reverse()},han=function(e){for(var t=[],n=0;n=1&&Yn(t)?G6(e)(t):vf(t)?[t,ar]:[ar,t]}},$an=function(e){var t=u5e(e);return function(n){return Yn(n)?t(n):ar}},Ian=function(e){return function(){for(var t=[],n=0;n0;){var i=n.shift();Aa(i)?n.unshift.apply(n,e(i.left)):r.push(i.right)}return r}},zan={URI:Or,map:ao,ap:Lg,chain:Kd,chainRec:yoe},Poe=function(e){return function(t){var n=e(t),r=[],i=[];function a(f){Aa(f)?e(f.left).forEach(function(s){return r.push(s)}):i.push(f.right)}for(var o=0,u=n;o0;)a(r.shift());return i}},Kan={URI:Or,map:ao,ap:Lg,chain:Kd,chainRec:boe},Foe=ul(Toe,Eoe),Woe=ol(Toe,Eoe),GBe={URI:Or,map:ao,compact:CA,separate:TA,filter:p5,filterMap:h5,partition:v5,partitionMap:m5,reduce:v$,foldMap:RA,reduceRight:OA,traverse:g5,sequence:kW,wither:Foe,wilt:Woe},Gan=tae(GBe),HBe={URI:Or,fromEither:aBe},Han=Lc(HBe),Jan=B6,w5=function(e,t,n){return Yn(n)?Sae(e,t,n):n},JBe=function(e,t){var n=t.slice();return n.splice(e,1),n},oI=function(e){return e.slice()},Yan=function(e){return vf(e)?ar:e.slice()},ar=$W;function Noe(e){return function(t){return t.every(e)}}var YBe=function(e){return function(t){return t.some(e)}},Zan=YBe,ZBe=function(e){var t=Vae(e);return function(n){return uBe(function(){return e.empty},t(n))}},Xan=zd(ra),Qan=pi(_5),eon=Ti(_5),ton=vi(Ooe),non=di(S5),HE=Kd,ron=X6e,ion=_5e,aon=S5e,oon=SBe,uon={URI:Or,compact:CA,separate:TA,map:ao,ap:Lg,of:zd,chain:Kd,filter:p5,filterMap:h5,partition:v5,partitionMap:m5,mapWithIndex:d5,partitionMapWithIndex:EBe,partitionWithIndex:OBe,filterMapWithIndex:TBe,filterWithIndex:CBe,alt:hoe,zero:EA,unfold:Roe,reduce:v$,foldMap:RA,reduceRight:OA,traverse:g5,sequence:kW,reduceWithIndex:voe,foldMapWithIndex:moe,reduceRightWithIndex:goe,traverseWithIndex:FBe,extend:PBe,wither:Foe,wilt:Woe};const XBe=Object.freeze(Object.defineProperty({__proto__:null,Alt:kan,Alternative:qan,Applicative:Fan,Apply:S5,Chain:Ooe,ChainRecBreadthFirst:Kan,ChainRecDepthFirst:zan,Compactable:Eoe,Do:Xan,Extend:xan,Filterable:Dan,FilterableWithIndex:Lan,Foldable:u_,FoldableWithIndex:Ban,FromEither:HBe,Functor:_5,FunctorWithIndex:Tan,Monad:Wan,Pointed:zBe,Traversable:Toe,TraversableWithIndex:Van,URI:Or,Unfoldable:jan,Witherable:GBe,Zero:KBe,_chainRecBreadthFirst:boe,_chainRecDepthFirst:yoe,alt:NBe,altW:WBe,ap:jBe,apFirst:Can,apS:non,apSecond:Pan,append:Sb,appendW:Hin,bind:ton,bindTo:Qan,chain:HE,chainFirst:Nan,chainRecBreadthFirst:Poe,chainRecDepthFirst:Coe,chainWithIndex:dBe,chop:ban,chunksOf:$an,compact:CA,comprehension:_an,concat:Ll,concatW:RBe,cons:ion,deleteAt:dan,difference:l5,dropLeft:uan,dropLeftWhile:fan,dropRight:can,duplicate:San,elem:MA,empty:ar,every:Noe,exists:Zan,extend:Soe,filter:gf,filterE:Gan,filterMap:y5,filterMapWithIndex:$oe,filterWithIndex:xBe,findFirst:mf,findFirstMap:mBe,findIndex:PW,findLast:gBe,findLastIndex:bBe,findLastMap:yBe,flap:Ean,flatMap:Kd,flatten:WW,foldLeft:Zin,foldMap:woe,foldMapWithIndex:b5,foldRight:Xin,fromArray:Yan,fromEither:aBe,fromEitherK:Han,fromOption:_m,fromOptionK:Ian,fromPredicate:Yin,getDifferenceMagma:Oan,getEq:I5,getIntersectionSemigroup:Ran,getMonoid:BBe,getOrd:VBe,getSemigroup:LBe,getShow:PA,getUnionMonoid:Man,getUnionSemigroup:UW,guard:Uan,head:pBe,init:ran,insertAt:san,intercalate:ZBe,intersection:poe,intersperse:gan,isEmpty:vf,isNonEmpty:Yn,isOutOfBound:AA,last:hBe,lefts:van,let:eon,lookup:Xp,makeBy:iBe,map:pt,mapWithIndex:kBe,match:uBe,matchLeft:fBe,matchLeftW:cBe,matchRight:lBe,matchRightW:sBe,matchW:oBe,modifyAt:$Be,of:zd,partition:UBe,partitionMap:qBe,partitionMapWithIndex:_oe,partitionWithIndex:Ioe,prepend:Kin,prependAll:SBe,prependToAll:oon,prependW:Gin,range:ron,readonlyArray:uon,reduce:NW,reduceRight:Aoe,reduceRightWithIndex:$5,reduceWithIndex:jW,replicate:Jin,reverse:pan,rights:han,rotate:yan,scanLeft:Qin,scanRight:ean,separate:TA,sequence:kW,size:tan,snoc:aon,some:YBe,sort:FW,sortBy:ABe,spanLeft:oan,splitAt:MBe,tail:nan,takeLeft:ian,takeLeftWhile:KG,takeRight:aan,toArray:oI,traverse:DBe,traverseWithIndex:Moe,unfold:Roe,union:doe,uniq:wBe,unsafeDeleteAt:JBe,unsafeInsertAt:Jan,unsafeUpdateAt:w5,unzip:man,updateAt:lan,wilt:Aan,wither:wan,zero:EA,zip:_Be,zipWith:IBe},Symbol.toStringTag,{value:"Module"}));var xm=function(e){return e.length===0},zi=av,con=o_,fon=zae,A5=MW,son=Kae,QBe=function(e,t){return e<=0?[]:r5(t)(e)},lon=function(e,t){return QBe(e,function(){return t})};function don(e){return function(t){return e(t)?[t]:[]}}var eVe=function(e){return Ri(e)?[]:[e.value]},tVe=function(e){return Aa(e)?[]:[e.right]},nVe=function(e,t){return function(n){return zi(n)?t(n):e()}},pon=nVe,rVe=function(e,t){return function(n){return zi(n)?t(xf(n),Rs(n)):e()}},iVe=rVe,hon=iVe,aVe=function(e,t){return function(n){return zi(n)?t(SA(n),_A(n)):e()}},oVe=aVe,von=oVe,uVe=function(e){return function(t){for(var n=[],r=0;r=0;a--)i[a]=t(n[a],i[a+1]);return i}},yon=function(e){return e.length},qW=n5,bon=Xp,$on=pBe,Ion=hBe,_on=function(e){return zi(e)?gt(Rs(e)):_t},Son=function(e){return zi(e)?gt(SA(e)):_t},won=function(e){return function(t){return qW(e,t)?Ao(t):t.slice(0,e)}},Aon=function(e){return function(t){return qW(e,t)?Ao(t):e===0?[]:t.slice(-e)}};function Mon(e){return function(t){for(var n=[],r=0,i=t;r=t.length?[]:t.slice(e,t.length)}},Eon=function(e){return function(t){return e<=0||xm(t)?Ao(t):e>=t.length?[]:t.slice(0,t.length-e)}};function Ton(e){return function(t){return t.slice(cVe(t,e))}}var Con=PW;function Pon(e){return mf(e)}var Fon=mBe;function Won(e){return gBe(e)}var Non=yBe,jon=bBe,Ao=function(e){return e.slice()},kon=function(e,t){return function(n){return e<0||e>n.length?_t:gt(LVe(e,t,n))}},Uon=function(e,t){return fVe(e,function(){return t})},qon=function(e){return function(t){return qW(e,t)?_t:gt(VVe(e,t))}},fVe=function(e,t){return function(n){return qW(e,n)?_t:gt(BVe(e,t(n[e]),n))}},xon=function(e){return xm(e)?[]:e.slice().reverse()},Don=function(e){for(var t=[],n=0;n=1&&zi(t)?o5(e)(t):xm(t)?[Ao(t),[]]:[[],Ao(t)]}},Yon=function(e){var t=q5e(e);return function(n){return zi(n)?t(n):[]}},Zon=function(e){return function(){for(var t=[],n=0;nM(t,gA(n=>(e(n)(),n)))}const lE=Gun;function m2(e){return t=>M(t,cq,lE(e),cq)}var Hun=function(e,t){return M(e,HVe(t))},HVe=function(e){return function(t){return Se(e,t)}},JVe="Predicate",YVe=function(){return{concat:function(e,t){return M(e,XVe(t))}}},Jun=function(){return{concat:YVe().concat,empty:N4e}},ZVe=function(){return{concat:function(e,t){return M(e,QVe(t))}}},Yun=function(){return{concat:ZVe().concat,empty:Bie}},Zun={URI:JVe,contramap:Hun},c_=function(e){return function(t){return!e(t)}},XVe=function(e){return function(t){return function(n){return t(n)||e(n)}}},QVe=function(e){return function(t){return function(n){return t(n)&&e(n)}}};const Xun=Object.freeze(Object.defineProperty({__proto__:null,Contravariant:Zun,URI:JVe,and:QVe,contramap:HVe,getMonoidAll:Yun,getMonoidAny:Jun,getSemigroupAll:ZVe,getSemigroupAny:YVe,not:c_,or:XVe},Symbol.toStringTag,{value:"Module"}));var Bt=_t,nn=gt;function ov(e){return function(t){return e(t)?nn(t):Bt}}var k5=function(e){return e._tag==="Right"?Bt:nn(e.left)},DW=function(e){return e._tag==="Left"?Bt:nn(e.right)},Bc=function(e,t){return M(e,Nr(t))},g$=function(e,t){return M(e,nze(t))},U5=function(e,t,n){return M(e,ize(t,n))},q5=function(e){var t=aze(e);return function(n,r){return M(n,t(r))}},x5=function(e,t,n){return M(e,oze(t,n))},rue=function(e){var t=lze(e);return function(n,r){return M(n,t(r))}},iue=function(e,t){return M(e,lue(t))},JE=function(e,t){return M(e,ib(t))},aue=function(e,t){return M(e,cze(t))},eze=function(e,t){return M(e,due(t))},oue=function(e,t){return M(e,fze(t))},uue=function(e,t){return M(e,sze(t))},aa="Option",Qun=function(e){return{show:function(t){return un(t)?"none":"some(".concat(e.show(t.value),")")}}},cue=function(e){return{equals:function(t,n){return t===n||(un(t)?un(n):un(n)?!1:e.equals(t.value,n.value))}}},fue=function(e){return{equals:cue(e).equals,compare:function(t,n){return t===n?0:Qp(t)?Qp(n)?e.compare(t.value,n.value):1:-1}}},sue=function(e){return{concat:function(t,n){return un(t)?n:un(n)?t:nn(e.concat(t.value,n.value))},empty:Bt}},Nr=function(e){return function(t){return un(t)?Bt:nn(e(t.value))}},uv={URI:aa,map:Bc},ecn=Fe(2,hu(uv)),tcn=Zu(uv),cv=nn,tze={URI:aa,of:cv},nze=function(e){return function(t){return un(t)||un(e)?Bt:nn(t.value(e.value))}},UA={URI:aa,map:Bc,ap:g$},rze={URI:aa,map:Bc,ap:g$,of:cv},y$=Fe(2,function(e,t){return un(e)?Bt:t(e.value)}),LW={URI:aa,map:Bc,ap:g$,chain:y$},ncn={URI:aa,map:Bc,ap:g$,of:cv,chain:y$},ize=function(e,t){return function(n){return un(n)?e:t(e,n.value)}},aze=function(e){return function(t){return function(n){return un(n)?e.empty:t(n.value)}}},oze=function(e,t){return function(n){return un(n)?e:t(n.value,e)}},rcn={URI:aa,reduce:U5,foldMap:q5,reduceRight:x5},D5=Fe(2,function(e,t){return un(e)?t():e}),icn=D5,lue=D5,acn={URI:aa,map:Bc,alt:iue},L5=function(){return Bt},uze={URI:aa,zero:L5},ocn=wA(uze,tze),ucn={URI:aa,map:Bc,ap:g$,of:cv,alt:iue,zero:L5},due=function(e){return function(t){return un(t)?Bt:nn(e(t))}},ccn={URI:aa,map:Bc,extend:eze},qA=y$(Oe),fcn=kt(Bt,Bt),xA=function(e){return un(e)?fcn:kt(k5(e.value),DW(e.value))},b$={URI:aa,compact:qA,separate:xA},ib=function(e){return function(t){return un(t)?Bt:e(t.value)?t:Bt}},cze=function(e){return function(t){return un(t)?Bt:e(t.value)}},fze=function(e){return function(t){return kt(JE(t,c_(e)),JE(t,e))}},sze=function(e){return Se(Nr(e),xA)},fv={URI:aa,map:Bc,compact:qA,separate:xA,filter:JE,filterMap:aue,partition:oue,partitionMap:uue},lze=function(e){return function(t){return function(n){return un(n)?e.of(Bt):e.map(t(n.value),nn)}}},B5=function(e){return function(t){return un(t)?e.of(Bt):e.map(t.value,nn)}},pue={URI:aa,map:Bc,reduce:U5,foldMap:q5,reduceRight:x5,traverse:rue,sequence:B5},hue=ul(pue,b$),vue=ol(pue,b$),scn=function(e){var t=hue(e);return function(n){return function(r){return t(r,n)}}},lcn=function(e){var t=vue(e);return function(n){return function(r){return t(r,n)}}},dcn={URI:aa,map:Bc,reduce:U5,foldMap:q5,reduceRight:x5,traverse:rue,sequence:B5,compact:qA,separate:xA,filter:JE,filterMap:aue,partition:oue,partitionMap:uue,wither:hue,wilt:vue},mue=function(){return Bt},pcn={URI:aa,map:Bc,ap:g$,of:cv,chain:y$,throwError:mue},DA=DW,V5={URI:aa,fromEither:DA},Qp=Jr,un=function(e){return e._tag==="None"},gue=function(e,t){return function(n){return un(n)?e():t(n.value)}},hcn=gue,Df=gue,Lf=Df,dze=function(e){return function(t){return un(t)?e():t.value}},_c=dze,vcn=tn(uv),mcn=Yr(UA),gcn=Zr(UA),ycn=qA,pze=Fe(2,hi(LW)),hze=Fe(2,Ld(V5,LW)),bcn=due(Oe),$cn=Lc(V5),Icn=Qie(V5,LW),_cn=hze,pc=function(e){return e==null?Bt:nn(e)},yue=function(e){try{return nn(e())}catch{return Bt}},Scn=function(e){return function(){for(var t=[],n=0;n0&&a[a.length-1])&&(f[0]===6||f[0]===2)){n=0;continue}if(f[0]===3&&(!a||f[1]>a[0]&&f[1]M(t,$o(n=>(e(n)(),n)))}const $sn=bsn;function Isn(e){return t=>M(t,GG,$sn(e),GG)}function Jze(e){return t=>(un(t)&&e()(),t)}function ZW(e){return Se(nn,e.of)}function XW(e){return jo(e.of(Bt))}function nB(e){return function(t){return e.map(t,nn)}}function rB(e){return Se(pc,e.of)}function iB(e){var t=rB(e);return function(n){return Se(n,t)}}function Kue(e){var t=sB(e),n=iB(e);return function(r){return t(n(r))}}function aB(e){return function(t){return Se(t,e.of)}}function Yze(e){var t=sB(e),n=aB(e);return function(r){return t(n(r))}}function Gue(e){return function(t){return function(n){return e.of(ov(t)(n))}}}function Hue(e){return Se(DA,e.of)}function Jue(e){return function(t,n){return function(r){return e.map(r,Df(t,n))}}}function oB(e){return function(t,n){return function(r){return e.chain(r,Df(t,n))}}}function uB(e){return function(t){return function(n){return e.chain(n,Df(t,e.of))}}}function cB(e){return pA(e,uv)}function fB(e){return tv(e,UA)}function sB(e){var t=lB(e);return function(n){return function(r){return t(r,n)}}}function lB(e){var t=XW(e);return function(n,r){return e.chain(n,Df(function(){return t()},r))}}function dB(e){var t=ZW(e);return function(n){return function(r){return e.chain(r,Df(n,t))}}}function _sn(e){var t=fB(e),n=cB(e),r=sB(e),i=dB(e),a=oB(e),o=uB(e),u=XW(e);return{map:function(c,f){return M(c,n(f))},ap:function(c,f){return M(c,t(f))},of:ZW(e),chain:function(c,f){return M(c,r(f))},alt:function(c,f){return M(c,i(f))},fold:function(c,f,s){return M(c,a(f,s))},getOrElse:function(c,f){return M(c,o(f))},fromM:nB(e),none:function(){return u()}}}const Ssn=Object.freeze(Object.defineProperty({__proto__:null,alt:dB,ap:fB,chain:sB,chainNullableK:Kue,chainOptionK:Yze,flatMap:lB,fromEither:Hue,fromF:nB,fromNullable:rB,fromNullableK:iB,fromOptionK:aB,fromPredicate:Gue,getOptionM:_sn,getOrElse:uB,map:cB,match:Jue,matchE:oB,some:ZW,zero:XW},Symbol.toStringTag,{value:"Module"}));var wsn=globalThis&&globalThis.__awaiter||function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function u(s){try{f(r.next(s))}catch(l){o(l)}}function c(s){try{f(r.throw(s))}catch(l){o(l)}}function f(s){s.done?a(s.value):i(s.value).then(u,c)}f((r=r.apply(e,t||[])).next())})},Asn=globalThis&&globalThis.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(f){return function(s){return c([f,s])}}function c(f){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,f[0]&&(n=0)),n;)try{if(r=1,i&&(a=f[0]&2?i.return:f[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,f[1])).done)return a;switch(i=0,a&&(f=[f[0]&2,a.value]),f[0]){case 0:case 1:a=f;break;case 4:return n.label++,{value:f[1],done:!1};case 5:n.label++,i=f[1],f=[0];continue;case 7:f=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(f[0]===6||f[0]===2)){n=0;continue}if(f[0]===3&&(!a||f[1]>a[0]&&f[1]=0;c--){var f=o[c];a=r(f,i.get(f),a)}return a}}},Ofe=function(e){var t=RB(e),n=OB(e),r=EB(e),i=TB(e);return{URI:Vf,_E:void 0,reduce:t.reduce,foldMap:t.foldMap,reduceRight:t.reduceRight,reduceWithIndex:function(a,o,u){return M(a,n(o,u))},foldMapWithIndex:function(a){var o=r(a);return function(u,c){return M(u,o(c))}},reduceRightWithIndex:function(a,o,u){return M(a,i(o,u))}}},Whn=function(e){var t=Efe(e),n=RB(e);return{URI:Vf,_E:void 0,map:yv,reduce:n.reduce,foldMap:n.foldMap,reduceRight:n.reduceRight,traverse:t.traverse,sequence:t.sequence}},Efe=function(e){var t=Ofe(e),n=Yg(e),r=function(o){return function(u,c){for(var f=o.of(new Map),s=n(u),l=s.length,d=function(v){var h=s[v],$=u.get(h);f=o.ap(o.map(f,function(b){return function(y){return b.set(h,y)}}),c(h,$))},p=0;p(t,n,r)=>i=>M(i,cN(e)(t,r),_c(()=>M(i,AB(e)(t,n()))));var Ivn="Endomorphism",F7e=function(){return{concat:function(e,t){return Se(e,t)}}},Nfe=function(){return{concat:F7e().concat,empty:Oe}};const _vn=Object.freeze(Object.defineProperty({__proto__:null,URI:Ivn,getMonoid:Nfe,getSemigroup:F7e},Symbol.toStringTag,{value:"Module"}));var W7e=function(e){return{concat:q6(e).concat,empty:e.top}},N7e=function(e){return{concat:x6(e).concat,empty:e.bottom}},jfe=function(e){return{concat:mae(e).concat,empty:e.empty}},j7e=function(e){var t={};for(var n in e)br.call(e,n)&&(t[n]=e[n].empty);return{concat:gae(e).concat,empty:t}},k7e=function(){for(var e=[],t=0;tArray.isArray(e);function NB(e){return Nvn(e)?e:[e]}function Vr(e){return xo((t,n)=>t.length===n.length&&M(t,NW(nn(n),(r,i)=>M(r,LA(a=>M(a,l5(e)([i]),ov(o=>o.length!==a.length))))),ib(vf),Qp))}var Ge={equals:function(e,t){return e===t}},D7e={concat:function(e,t){return e+t}},L7e="",jvn={concat:D7e.concat,empty:L7e},Le={equals:Ge.equals,compare:function(e,t){return et?1:0}},Si={show:function(e){return JSON.stringify(e)}},kvn=function(e){return typeof e=="string"},Uvn=function(e){return e.toUpperCase()},qvn=function(e){return e.toLowerCase()},B7e=function(e,t){return function(n){return n.replace(e,t)}},xvn=function(e){return e.trim()},Dvn=function(e){return e.trimLeft()},Lvn=function(e){return e.trimRight()},Bvn=function(e,t){return function(n){return n.slice(e,t)}},Vvn=function(e){return e.length===0},zvn=function(e){return e.length},Kvn=function(e){return function(t){var n=t.split(e);return Vd(n)?n:[t]}},Gvn=function(e,t){return function(n){return n.includes(e,t)}},Hvn=function(e,t){return function(n){return n.startsWith(e,t)}},Jvn=function(e,t){return function(n){return n.endsWith(e,t)}};const Yvn=Object.freeze(Object.defineProperty({__proto__:null,Eq:Ge,Monoid:jvn,Ord:Le,Semigroup:D7e,Show:Si,empty:L7e,endsWith:Jvn,includes:Gvn,isEmpty:Vvn,isString:kvn,replace:B7e,size:zvn,slice:Bvn,split:Kvn,startsWith:Hvn,toLowerCase:qvn,toUpperCase:Uvn,trim:xvn,trimLeft:Dvn,trimRight:Lvn},Symbol.toStringTag,{value:"Module"}));var Zvn=function(e){return Object.assign({},e)},Xvn=function(e){return Object.assign({},e)},V7e=function(e){return Object.keys(e).length},nd=function(e){for(var t in e)if(br.call(e,t))return!1;return!0},hM=function(e){return function(t){return Object.keys(t).sort(e.compare)}},Qvn=hM(Le);function vM(e){if(typeof e=="function")return vM(Le)(e);var t=hM(e);return function(n){return function(r){for(var i=[],a=0,o=t(r);a=0;f--){var s=u[f];o=i(s,a[s],o)}return o}}}var z7e=function(e,t){var n;return n={},n[e]=t,n};function K7e(e){var t=bN(Le)(e);return function(n){return function(r){return t(r,n)}}}function UB(e){var t=Zd(Le)(e);return function(n){return function(r){return t(r,n)}}}function mM(e){return yN(Le)(e)}var imn=function(e){var t=UB(e);return function(n){return function(r){return e.map(M(r,t(n)),$v)}}},amn=function(e){var t=UB(e);return function(n){return function(r){return e.map(M(r,t(n)),Iv)}}};function qB(e){return function(t){var n={},r={};for(var i in t)if(br.call(t,i)){var a=e(i,t[i]);switch(a._tag){case"Left":n[i]=a.left;break;case"Right":r[i]=a.right;break}}return kt(n,r)}}function xB(e){return function(t){var n={},r={};for(var i in t)if(br.call(t,i)){var a=t[i];e(i,a)?r[i]=a:n[i]=a}return kt(n,r)}}function DB(e){return function(t){var n={};for(var r in t)if(br.call(t,r)){var i=e(r,t[r]);Jr(i)&&(n[r]=i.value)}return n}}function LB(e){return function(t){var n={},r=!1;for(var i in t)if(br.call(t,i)){var a=t[i];e(i,a)?n[i]=a:r=!0}return r?n:t}}function G7e(e,t){var n=Dfe(e,t);return function(r){return n(r,Oe)}}function Dfe(e,t){return function(n,r){return t.reduce(n,{},function(i,a){var o=r(a),u=o[0],c=o[1];return i[u]=br.call(i,u)?e.concat(i[u],c):c,i})}}var omn=kfe,umn=function(e){for(var t={},n=0,r=e;n{const r=t==null,i=n==null;return r&&i||!r&&!i&&e.equals(t,n)})}function ml(){const e=t=>({equals:(n,r)=>{for(const[i,a]of t)if(i(n)&&i(r))return a.equals(n,r);return!1},with:(n,r)=>e([...t,[n,r]])});return e([])}var wgn=function(e){return typeof e=="boolean"},S9e=function(e,t){return function(n){return n?t():e()}},w9e=S9e,A9e=w9e,Agn=A9e,sr={equals:function(e,t){return e===t}},Mgn={meet:function(e,t){return e&&t},join:function(e,t){return e||t},zero:!1,one:!0,implies:function(e,t){return!e||t},not:function(e){return!e}},M9e={concat:function(e,t){return e&&t}},R9e={concat:function(e,t){return e||t}},Rgn={concat:M9e.concat,empty:!0},Ogn={concat:R9e.concat,empty:!1},ose={equals:sr.equals,compare:function(e,t){return et?1:0}},uI={show:function(e){return JSON.stringify(e)}};const Egn=Object.freeze(Object.defineProperty({__proto__:null,BooleanAlgebra:Mgn,Eq:sr,MonoidAll:Rgn,MonoidAny:Ogn,Ord:ose,SemigroupAll:M9e,SemigroupAny:R9e,Show:uI,fold:Agn,foldW:w9e,isBoolean:wgn,match:A9e,matchW:S9e},Symbol.toStringTag,{value:"Module"}));function Tgn(e){const t=parseFloat(e);return isNaN(t)?Bt:nn(t)}var Cgn=function(e){return function(t){return Jr(e(t))}},Pgn=function(e){return function(t){return zie(e(t))}},Fgn=function(){return function(e){return!0}},Wgn=function(e){return function(t){return!e(t)}},Ngn=function(e){return function(t){return function(n){return t(n)||e(n)}}},jgn=function(e){return function(t){return function(n){return t(n)&&e(n)}}},kgn=function(){return function(e){return!1}},Ugn=function(e){return function(t){return function(n){return t(n)&&e(n)}}};const qgn=Object.freeze(Object.defineProperty({__proto__:null,and:jgn,compose:Ugn,fromEitherK:Pgn,fromOptionK:Cgn,id:Fgn,not:Wgn,or:Ngn,zero:kgn},Symbol.toStringTag,{value:"Module"})),Tu=Symbol.for("@ts-pattern/matcher"),O9e=Symbol.for("@ts-pattern/isVariadic"),pq="@ts-pattern/anonymous-select-key",YG=e=>!!(e&&typeof e=="object"),g2=e=>e&&!!e[Tu],Va=(e,t,n)=>{if(g2(e)){const r=e[Tu](),{matched:i,selections:a}=r.match(t);return i&&a&&Object.keys(a).forEach(o=>n(o,a[o])),i}if(YG(e)){if(!YG(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let r=[],i=[],a=[];for(const o of e.keys()){const u=e[o];g2(u)&&u[O9e]?a.push(u):a.length?i.push(u):r.push(u)}if(a.length){if(a.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.lengthVa(f,o[s],n))&&i.every((f,s)=>Va(f,u[s],n))&&(a.length===0||Va(a[0],c,n))}return e.length===t.length&&e.every((o,u)=>Va(o,t[u],n))}return Object.keys(e).every(r=>{const i=e[r];return(r in t||g2(a=i)&&a[Tu]().matcherType==="optional")&&Va(i,t[r],n);var a})}return Object.is(t,e)},sc=e=>{var t,n,r;return YG(e)?g2(e)?(t=(n=(r=e[Tu]()).getSelectionKeys)==null?void 0:n.call(r))!=null?t:[]:Array.isArray(e)?iT(e,sc):iT(Object.values(e),sc):[]},iT=(e,t)=>e.reduce((n,r)=>n.concat(t(r)),[]);function xgn(...e){if(e.length===1){const[t]=e;return n=>Va(t,n,()=>{})}if(e.length===2){const[t,n]=e;return Va(t,n,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function yo(e){return Object.assign(e,{optional:()=>use(e),and:t=>Pr(e,t),or:t=>E9e(e,t),select:t=>t===void 0?aT(e):aT(t,e)})}function ZG(e){return Object.assign((t=>Object.assign(t,{*[Symbol.iterator](){yield Object.assign(t,{[O9e]:!0})}}))(e),{optional:()=>ZG(use(e)),select:t=>ZG(t===void 0?aT(e):aT(t,e))})}function use(e){return yo({[Tu]:()=>({match:t=>{let n={};const r=(i,a)=>{n[i]=a};return t===void 0?(sc(e).forEach(i=>r(i,void 0)),{matched:!0,selections:n}):{matched:Va(e,t,r),selections:n}},getSelectionKeys:()=>sc(e),matcherType:"optional"})})}const Dgn=(e,t)=>{for(const n of e)if(!t(n))return!1;return!0},Lgn=(e,t)=>{for(const[n,r]of e.entries())if(!t(r,n))return!1;return!0};function Pr(...e){return yo({[Tu]:()=>({match:t=>{let n={};const r=(i,a)=>{n[i]=a};return{matched:e.every(i=>Va(i,t,r)),selections:n}},getSelectionKeys:()=>iT(e,sc),matcherType:"and"})})}function E9e(...e){return yo({[Tu]:()=>({match:t=>{let n={};const r=(i,a)=>{n[i]=a};return iT(e,sc).forEach(i=>r(i,void 0)),{matched:e.some(i=>Va(i,t,r)),selections:n}},getSelectionKeys:()=>iT(e,sc),matcherType:"or"})})}function vn(e){return{[Tu]:()=>({match:t=>({matched:!!e(t)})})}}function aT(...e){const t=typeof e[0]=="string"?e[0]:void 0,n=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return yo({[Tu]:()=>({match:r=>{let i={[t??pq]:r};return{matched:n===void 0||Va(n,r,(a,o)=>{i[a]=o}),selections:i}},getSelectionKeys:()=>[t??pq].concat(n===void 0?[]:sc(n))})})}function kl(e){return typeof e=="number"}function Dy(e){return typeof e=="string"}function rm(e){return typeof e=="bigint"}const T9e=yo(vn(function(e){return!0})),Bgn=T9e,Ly=e=>Object.assign(yo(e),{startsWith:t=>{return Ly(Pr(e,(n=t,vn(r=>Dy(r)&&r.startsWith(n)))));var n},endsWith:t=>{return Ly(Pr(e,(n=t,vn(r=>Dy(r)&&r.endsWith(n)))));var n},minLength:t=>Ly(Pr(e,(n=>vn(r=>Dy(r)&&r.length>=n))(t))),maxLength:t=>Ly(Pr(e,(n=>vn(r=>Dy(r)&&r.length<=n))(t))),includes:t=>{return Ly(Pr(e,(n=t,vn(r=>Dy(r)&&r.includes(n)))));var n},regex:t=>{return Ly(Pr(e,(n=t,vn(r=>Dy(r)&&!!r.match(n)))));var n}}),Vgn=Ly(vn(Dy)),Ul=e=>Object.assign(yo(e),{between:(t,n)=>Ul(Pr(e,((r,i)=>vn(a=>kl(a)&&r<=a&&i>=a))(t,n))),lt:t=>Ul(Pr(e,(n=>vn(r=>kl(r)&&rUl(Pr(e,(n=>vn(r=>kl(r)&&r>n))(t))),lte:t=>Ul(Pr(e,(n=>vn(r=>kl(r)&&r<=n))(t))),gte:t=>Ul(Pr(e,(n=>vn(r=>kl(r)&&r>=n))(t))),int:()=>Ul(Pr(e,vn(t=>kl(t)&&Number.isInteger(t)))),finite:()=>Ul(Pr(e,vn(t=>kl(t)&&Number.isFinite(t)))),positive:()=>Ul(Pr(e,vn(t=>kl(t)&&t>0))),negative:()=>Ul(Pr(e,vn(t=>kl(t)&&t<0)))}),zgn=Ul(vn(kl)),im=e=>Object.assign(yo(e),{between:(t,n)=>im(Pr(e,((r,i)=>vn(a=>rm(a)&&r<=a&&i>=a))(t,n))),lt:t=>im(Pr(e,(n=>vn(r=>rm(r)&&rim(Pr(e,(n=>vn(r=>rm(r)&&r>n))(t))),lte:t=>im(Pr(e,(n=>vn(r=>rm(r)&&r<=n))(t))),gte:t=>im(Pr(e,(n=>vn(r=>rm(r)&&r>=n))(t))),positive:()=>im(Pr(e,vn(t=>rm(t)&&t>0))),negative:()=>im(Pr(e,vn(t=>rm(t)&&t<0)))}),Kgn=im(vn(rm)),Ggn=yo(vn(function(e){return typeof e=="boolean"})),Hgn=yo(vn(function(e){return typeof e=="symbol"})),Jgn=yo(vn(function(e){return e==null}));var Bi={__proto__:null,matcher:Tu,optional:use,array:function(...e){return ZG({[Tu]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const n=e[0];let r={};if(t.length===0)return sc(n).forEach(a=>{r[a]=[]}),{matched:!0,selections:r};const i=(a,o)=>{r[a]=(r[a]||[]).concat([o])};return{matched:t.every(a=>Va(n,a,i)),selections:r}},getSelectionKeys:()=>e.length===0?[]:sc(e[0])})})},set:function(...e){return yo({[Tu]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let n={};if(t.size===0)return{matched:!0,selections:n};if(e.length===0)return{matched:!0};const r=(a,o)=>{n[a]=(n[a]||[]).concat([o])},i=e[0];return{matched:Dgn(t,a=>Va(i,a,r)),selections:n}},getSelectionKeys:()=>e.length===0?[]:sc(e[0])})})},map:function(...e){return yo({[Tu]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let n={};if(t.size===0)return{matched:!0,selections:n};const r=(u,c)=>{n[u]=(n[u]||[]).concat([c])};if(e.length===0)return{matched:!0};var i;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(i=e[0])==null?void 0:i.toString()}`);const[a,o]=e;return{matched:Lgn(t,(u,c)=>{const f=Va(a,c,r),s=Va(o,u,r);return f&&s}),selections:n}},getSelectionKeys:()=>e.length===0?[]:[...sc(e[0]),...sc(e[1])]})})},intersection:Pr,union:E9e,not:function(e){return yo({[Tu]:()=>({match:t=>({matched:!Va(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:vn,select:aT,any:T9e,_:Bgn,string:Vgn,number:zgn,bigint:Kgn,boolean:Ggn,symbol:Hgn,nullish:Jgn,instanceOf:function(e){return yo(vn(function(t){return n=>n instanceof t}(e)))},shape:function(e){return yo(vn(xgn(e)))}};const XG={matched:!1,value:void 0};function Ze(e){return new Ygn(e,XG)}let Ygn=class QG{constructor(t,n){this.input=void 0,this.state=void 0,this.input=t,this.state=n}with(...t){if(this.state.matched)return this;const n=t[t.length-1],r=[t[0]];let i;t.length===3&&typeof t[1]=="function"?i=t[1]:t.length>2&&r.push(...t.slice(1,t.length-1));let a=!1,o={};const u=(f,s)=>{a=!0,o[f]=s},c=!r.some(f=>Va(f,this.input,u))||i&&!i(this.input)?XG:{matched:!0,value:n(a?pq in o?o[pq]:o:this.input,this.input)};return new QG(this.input,c)}when(t,n){if(this.state.matched)return this;const r=!!t(this.input);return new QG(this.input,r?{matched:!0,value:n(this.input,this.input)}:XG)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(){if(this.state.matched)return this.state.value;let t;try{t=JSON.stringify(this.input)}catch{t=this.input}throw new Error(`Pattern matching error: no pattern matches value ${t}`)}run(){return this.exhaustive()}returnType(){return this}};function Zgn(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}function Xgn(){const e=Zgn();if(e.__xstate__)return e.__xstate__}const Qgn=e=>{if(typeof window>"u")return;const t=Xgn();t&&t.register(e)};class Qbe{constructor(t){this._process=t,this._active=!1,this._current=null,this._last=null}start(){this._active=!0,this.flush()}clear(){this._current&&(this._current.next=null,this._last=this._current)}enqueue(t){const n={value:t,next:null};if(this._current){this._last.next=n,this._last=n;return}this._current=n,this._last=n,this._active&&this.flush()}flush(){for(;this._current;){const t=this._current;this._process(t.value),this._current=t.next}this._last=null}}const C9e=".",eyn="",P9e="",tyn="#",nyn="*",F9e="xstate.init",ryn="xstate.error",hq="xstate.stop";function iyn(e,t){return{type:`xstate.after.${e}.${t}`}}function eH(e,t){return{type:`xstate.done.state.${e}`,output:t}}function ayn(e,t){return{type:`xstate.done.actor.${e}`,output:t,actorId:e}}function W9e(e,t){return{type:`xstate.error.actor.${e}`,error:t,actorId:e}}function N9e(e){return{type:F9e,input:e}}function Mp(e){setTimeout(()=>{throw e})}const oyn=(()=>typeof Symbol=="function"&&Symbol.observable||"@@observable")();function j9e(e,t){const n=e0e(e),r=e0e(t);return typeof r=="string"?typeof n=="string"?r===n:!1:typeof n=="string"?n in r:Object.keys(n).every(i=>i in r?j9e(n[i],r[i]):!1)}function cse(e){if(U9e(e))return e;let t=[],n="";for(let r=0;rtypeof t>"u"||typeof t=="string"?{target:t}:t)}function q9e(e){if(!(e===void 0||e===eyn))return mm(e)}function nH(e,t,n){var a,o,u;const r=typeof e=="object",i=r?e:void 0;return{next:(a=r?e.next:e)==null?void 0:a.bind(i),error:(o=r?e.error:t)==null?void 0:o.bind(i),complete:(u=r?e.complete:n)==null?void 0:u.bind(i)}}function n0e(e,t){return`${t}.${e}`}function fse(e,t){const n=t.match(/^xstate\.invoke\.(\d+)\.(.*)/);if(!n)return e.implementations.actors[t];const[,r,i]=n,o=e.getStateNodeById(i).config.invoke;return(Array.isArray(o)?o[r]:o).src}function r0e(e,t){return`${e.sessionId}.${t}`}let fyn=0;function syn(e,t){const n=new Map,r=new Map,i=new WeakMap,a=new Set,o={},{clock:u,logger:c}=t,f={schedule:(d,p,v,h,$=Math.random().toString(36).slice(2))=>{const b={source:d,target:p,event:v,delay:h,id:$,startedAt:Date.now()},y=r0e(d,$);l._snapshot._scheduledEvents[y]=b;const m=u.setTimeout(()=>{delete o[y],delete l._snapshot._scheduledEvents[y],l._relay(d,p,v)},h);o[y]=m},cancel:(d,p)=>{const v=r0e(d,p),h=o[v];delete o[v],delete l._snapshot._scheduledEvents[v],h!==void 0&&u.clearTimeout(h)},cancelAll:d=>{for(const p in l._snapshot._scheduledEvents){const v=l._snapshot._scheduledEvents[p];v.source===d&&f.cancel(d,v.id)}}},s=d=>{if(!a.size)return;const p={...d,rootId:e.sessionId};a.forEach(v=>{var h;return(h=v.next)==null?void 0:h.call(v,p)})},l={_snapshot:{_scheduledEvents:((t==null?void 0:t.snapshot)&&t.snapshot.scheduler)??{}},_bookId:()=>`x:${fyn++}`,_register:(d,p)=>(n.set(d,p),d),_unregister:d=>{n.delete(d.sessionId);const p=i.get(d);p!==void 0&&(r.delete(p),i.delete(d))},get:d=>r.get(d),_set:(d,p)=>{const v=r.get(d);if(v&&v!==p)throw new Error(`Actor with system ID '${d}' already exists.`);r.set(d,p),i.set(p,d)},inspect:d=>{const p=nH(d);return a.add(p),{unsubscribe(){a.delete(p)}}},_sendInspectionEvent:s,_relay:(d,p,v)=>{l._sendInspectionEvent({type:"@xstate.event",sourceRef:d,actorRef:p,event:v}),p._send(v)},scheduler:f,getSnapshot:()=>({_scheduledEvents:{...l._snapshot._scheduledEvents}}),start:()=>{const d=l._snapshot._scheduledEvents;l._snapshot._scheduledEvents={};for(const p in d){const{source:v,target:h,event:$,delay:b,id:y}=d[p];f.schedule(v,h,$,b,y)}},_clock:u,_logger:c};return l}const sse=1;let Jo=function(e){return e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped",e}({});const lyn={clock:{setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e)},logger:console.log.bind(console),devTools:!1};class dyn{constructor(t,n){this.logic=t,this._snapshot=void 0,this.clock=void 0,this.options=void 0,this.id=void 0,this.mailbox=new Qbe(this._process.bind(this)),this.observers=new Set,this.eventListeners=new Map,this.logger=void 0,this._processingStatus=Jo.NotStarted,this._parent=void 0,this._syncSnapshot=void 0,this.ref=void 0,this._actorScope=void 0,this._systemId=void 0,this.sessionId=void 0,this.system=void 0,this._doneEvent=void 0,this.src=void 0,this._deferred=[];const r={...lyn,...n},{clock:i,logger:a,parent:o,syncSnapshot:u,id:c,systemId:f,inspect:s}=r;this.system=o?o.system:syn(this,{clock:i,logger:a}),s&&!o&&this.system.inspect(nH(s)),this.sessionId=this.system._bookId(),this.id=c??this.sessionId,this.logger=(n==null?void 0:n.logger)??this.system._logger,this.clock=(n==null?void 0:n.clock)??this.system._clock,this._parent=o,this._syncSnapshot=u,this.options=r,this.src=r.src??t,this.ref=this,this._actorScope={self:this,id:this.id,sessionId:this.sessionId,logger:this.logger,defer:l=>{this._deferred.push(l)},system:this.system,stopChild:l=>{if(l._parent!==this)throw new Error(`Cannot stop child actor ${l.id} of ${this.id} because it is not a child`);l._stop()},emit:l=>{const d=this.eventListeners.get(l.type),p=this.eventListeners.get("*");if(!d&&!p)return;const v=new Set([...d?d.values():[],...p?p.values():[]]);for(const h of Array.from(v))h(l)}},this.send=this.send.bind(this),this.system._sendInspectionEvent({type:"@xstate.actor",actorRef:this}),f&&(this._systemId=f,this.system._set(f,this)),this._initState((n==null?void 0:n.snapshot)??(n==null?void 0:n.state)),f&&this._snapshot.status!=="active"&&this.system._unregister(this)}_initState(t){var n;try{this._snapshot=t?this.logic.restoreSnapshot?this.logic.restoreSnapshot(t,this._actorScope):t:this.logic.getInitialSnapshot(this._actorScope,(n=this.options)==null?void 0:n.input)}catch(r){this._snapshot={status:"error",output:void 0,error:r}}}update(t,n){var i,a;this._snapshot=t;let r;for(;r=this._deferred.shift();)try{r()}catch(o){this._deferred.length=0,this._snapshot={...t,status:"error",error:o}}switch(this._snapshot.status){case"active":for(const o of this.observers)try{(i=o.next)==null||i.call(o,t)}catch(u){Mp(u)}break;case"done":for(const o of this.observers)try{(a=o.next)==null||a.call(o,t)}catch(u){Mp(u)}this._stopProcedure(),this._complete(),this._doneEvent=ayn(this.id,this._snapshot.output),this._parent&&this.system._relay(this,this._parent,this._doneEvent);break;case"error":this._error(this._snapshot.error);break}this.system._sendInspectionEvent({type:"@xstate.snapshot",actorRef:this,event:n,snapshot:t})}subscribe(t,n,r){var a;const i=nH(t,n,r);if(this._processingStatus!==Jo.Stopped)this.observers.add(i);else switch(this._snapshot.status){case"done":try{(a=i.complete)==null||a.call(i)}catch(o){Mp(o)}break;case"error":{const o=this._snapshot.error;if(!i.error)Mp(o);else try{i.error(o)}catch(u){Mp(u)}break}}return{unsubscribe:()=>{this.observers.delete(i)}}}on(t,n){let r=this.eventListeners.get(t);r||(r=new Set,this.eventListeners.set(t,r));const i=n.bind(void 0);return r.add(i),{unsubscribe:()=>{r.delete(i)}}}start(){if(this._processingStatus===Jo.Running)return this;this._syncSnapshot&&this.subscribe({next:r=>{r.status==="active"&&this.system._relay(this,this._parent,{type:`xstate.snapshot.${this.id}`,snapshot:r})},error:()=>{}}),this.system._register(this.sessionId,this),this._systemId&&this.system._set(this._systemId,this),this._processingStatus=Jo.Running;const t=N9e(this.options.input);switch(this.system._sendInspectionEvent({type:"@xstate.event",sourceRef:this._parent,actorRef:this,event:t}),this._snapshot.status){case"done":return this.update(this._snapshot,t),this;case"error":return this._error(this._snapshot.error),this}if(this._parent||this.system.start(),this.logic.start)try{this.logic.start(this._snapshot,this._actorScope)}catch(r){return this._snapshot={...this._snapshot,status:"error",error:r},this._error(r),this}return this.update(this._snapshot,t),this.options.devTools&&this.attachDevTools(),this.mailbox.start(),this}_process(t){let n,r;try{n=this.logic.transition(this._snapshot,t,this._actorScope)}catch(i){r={err:i}}if(r){const{err:i}=r;this._snapshot={...this._snapshot,status:"error",error:i},this._error(i);return}this.update(n,t),t.type===hq&&(this._stopProcedure(),this._complete())}_stop(){return this._processingStatus===Jo.Stopped?this:(this.mailbox.clear(),this._processingStatus===Jo.NotStarted?(this._processingStatus=Jo.Stopped,this):(this.mailbox.enqueue({type:hq}),this))}stop(){if(this._parent)throw new Error("A non-root actor cannot be stopped directly.");return this._stop()}_complete(){var t;for(const n of this.observers)try{(t=n.complete)==null||t.call(n)}catch(r){Mp(r)}this.observers.clear()}_reportError(t){if(!this.observers.size){this._parent||Mp(t);return}let n=!1;for(const r of this.observers){const i=r.error;n||(n=!i);try{i==null||i(t)}catch(a){Mp(a)}}this.observers.clear(),n&&Mp(t)}_error(t){this._stopProcedure(),this._reportError(t),this._parent&&this.system._relay(this,this._parent,W9e(this.id,t))}_stopProcedure(){return this._processingStatus!==Jo.Running?this:(this.system.scheduler.cancelAll(this),this.mailbox.clear(),this.mailbox=new Qbe(this._process.bind(this)),this._processingStatus=Jo.Stopped,this.system._unregister(this),this)}_send(t){this._processingStatus!==Jo.Stopped&&this.mailbox.enqueue(t)}send(t){this.system._relay(void 0,this,t)}attachDevTools(){const{devTools:t}=this.options;t&&(typeof t=="function"?t:Qgn)(this)}toJSON(){return{xstate$$type:sse,id:this.id}}getPersistedSnapshot(t){return this.logic.getPersistedSnapshot(this._snapshot,t)}[oyn](){return this}getSnapshot(){return this._snapshot}}function g_(e,...[t]){return new dyn(e,t)}function pyn(e,t,n,r,{sendId:i}){const a=typeof i=="function"?i(n,r):i;return[t,a]}function hyn(e,t){e.defer(()=>{e.system.scheduler.cancel(e.self,t)})}function x9e(e){function t(n,r){}return t.type="xstate.cancel",t.sendId=e,t.resolve=pyn,t.execute=hyn,t}function vyn(e,t,n,r,{id:i,systemId:a,src:o,input:u,syncSnapshot:c}){const f=typeof o=="string"?fse(t.machine,o):o,s=typeof i=="function"?i(n):i;let l;return f&&(l=g_(f,{id:s,src:o,parent:e.self,syncSnapshot:c,systemId:a,input:typeof u=="function"?u({context:t.context,event:n.event,self:e.self}):u})),[Ob(t,{children:{...t.children,[s]:l}}),{id:i,actorRef:l}]}function myn(e,{id:t,actorRef:n}){n&&e.defer(()=>{n._processingStatus!==Jo.Stopped&&n.start()})}function D9e(...[e,{id:t,systemId:n,input:r,syncSnapshot:i=!1}={}]){function a(o,u){}return a.type="snapshot.spawnChild",a.id=t,a.systemId=n,a.src=e,a.input=r,a.syncSnapshot=i,a.resolve=vyn,a.execute=myn,a}function gyn(e,t,n,r,{actorRef:i}){const a=typeof i=="function"?i(n,r):i,o=typeof a=="string"?t.children[a]:a;let u=t.children;return o&&(u={...u},delete u[o.id]),[Ob(t,{children:u}),o]}function yyn(e,t){if(t){if(e.system._unregister(t),t._processingStatus!==Jo.Running){e.stopChild(t);return}e.defer(()=>{e.stopChild(t)})}}function lse(e){function t(n,r){}return t.type="xstate.stopChild",t.actorRef=e,t.resolve=gyn,t.execute=yyn,t}function GB(e,t,n,r){const{machine:i}=r,a=typeof e=="function",o=a?e:i.implementations.guards[typeof e=="string"?e:e.type];if(!a&&!o)throw new Error(`Guard '${typeof e=="string"?e:e.type}' is not implemented.'.`);if(typeof o!="function")return GB(o,t,n,r);const u={context:t,event:n},c=a||typeof e=="string"?void 0:"params"in e?typeof e.params=="function"?e.params({context:t,event:n}):e.params:void 0;return"check"in o?o.check(r,u,o):o(u,c)}const dse=e=>e.type==="atomic"||e.type==="final";function y_(e){return Object.values(e.states).filter(t=>t.type!=="history")}function EN(e,t){const n=[];if(t===e)return n;let r=e.parent;for(;r&&r!==t;)n.push(r),r=r.parent;return n}function vq(e){const t=new Set(e),n=B9e(t);for(const r of t)if(r.type==="compound"&&(!n.get(r)||!n.get(r).length))i0e(r).forEach(i=>t.add(i));else if(r.type==="parallel"){for(const i of y_(r))if(i.type!=="history"&&!t.has(i)){const a=i0e(i);for(const o of a)t.add(o)}}for(const r of t){let i=r.parent;for(;i;)t.add(i),i=i.parent}return t}function L9e(e,t){const n=t.get(e);if(!n)return{};if(e.type==="compound"){const i=n[0];if(i){if(dse(i))return i.key}else return{}}const r={};for(const i of n)r[i.key]=L9e(i,t);return r}function B9e(e){const t=new Map;for(const n of e)t.has(n)||t.set(n,[]),n.parent&&(t.has(n.parent)||t.set(n.parent,[]),t.get(n.parent).push(n));return t}function V9e(e,t){const n=vq(t);return L9e(e,B9e(n))}function pse(e,t){return t.type==="compound"?y_(t).some(n=>n.type==="final"&&e.has(n)):t.type==="parallel"?y_(t).every(n=>pse(e,n)):t.type==="final"}const HB=e=>e[0]===tyn;function byn(e,t){return e.transitions.get(t)||[...e.transitions.keys()].filter(r=>{if(r===nyn)return!0;if(!r.endsWith(".*"))return!1;const i=r.split("."),a=t.split(".");for(let o=0;oi.length-r.length).flatMap(r=>e.transitions.get(r))}function $yn(e){const t=e.config.after;if(!t)return[];const n=(i,a)=>{const o=iyn(i,e.id),u=o.type;return e.entry.push(X9e(o,{id:u,delay:i})),e.exit.push(x9e(u)),u};return Object.keys(t).flatMap((i,a)=>{const o=t[i],u=typeof o=="string"?{target:o}:o,c=Number.isNaN(+i)?i:+i,f=n(c);return mm(u).map(s=>({...s,event:f,delay:c}))}).map(i=>{const{delay:a}=i;return{...Ky(e,i.event,i),delay:a}})}function Ky(e,t,n){const r=q9e(n.target),i=n.reenter??!1,a=Syn(e,r),o={...n,actions:mm(n.actions),guard:n.guard,target:a,source:e,reenter:i,eventType:t,toJSON:()=>({...o,source:`#${e.id}`,target:a?a.map(u=>`#${u.id}`):void 0})};return o}function Iyn(e){const t=new Map;if(e.config.on)for(const n of Object.keys(e.config.on)){if(n===P9e)throw new Error('Null events ("") cannot be specified as a transition key. Use `always: { ... }` instead.');const r=e.config.on[n];t.set(n,L1(r).map(i=>Ky(e,n,i)))}if(e.config.onDone){const n=`xstate.done.state.${e.id}`;t.set(n,L1(e.config.onDone).map(r=>Ky(e,n,r)))}for(const n of e.invoke){if(n.onDone){const r=`xstate.done.actor.${n.id}`;t.set(r,L1(n.onDone).map(i=>Ky(e,r,i)))}if(n.onError){const r=`xstate.error.actor.${n.id}`;t.set(r,L1(n.onError).map(i=>Ky(e,r,i)))}if(n.onSnapshot){const r=`xstate.snapshot.${n.id}`;t.set(r,L1(n.onSnapshot).map(i=>Ky(e,r,i)))}}for(const n of e.after){let r=t.get(n.eventType);r||(r=[],t.set(n.eventType,r)),r.push(n)}return t}function _yn(e,t){const n=typeof t=="string"?e.states[t]:t?e.states[t.target]:void 0;if(!n&&t)throw new Error(`Initial state node "${t}" not found on parent state node #${e.id}`);const r={source:e,actions:!t||typeof t=="string"?[]:mm(t.actions),eventType:null,reenter:!1,target:n?[n]:[],toJSON:()=>({...r,source:`#${e.id}`,target:n?[`#${n.id}`]:[]})};return r}function Syn(e,t){if(t!==void 0)return t.map(n=>{if(typeof n!="string")return n;if(HB(n))return e.machine.getStateNodeById(n);const r=n[0]===C9e;if(r&&!e.parent)return mq(e,n.slice(1));const i=r?e.key+n:n;if(e.parent)try{return mq(e.parent,i)}catch(a){throw new Error(`Invalid transition definition for state node '${e.id}': ${a.message}`)}else throw new Error(`Invalid target: "${n}" is not a valid target from the root node. Did you mean ".${n}"?`)})}function z9e(e){const t=q9e(e.config.target);return t?{target:t.map(n=>typeof n=="string"?mq(e.parent,n):n)}:e.parent.initial}function Yy(e){return e.type==="history"}function i0e(e){const t=K9e(e);for(const n of t)for(const r of EN(n,e))t.add(r);return t}function K9e(e){const t=new Set;function n(r){if(!t.has(r)){if(t.add(r),r.type==="compound")n(r.initial.target[0]);else if(r.type==="parallel")for(const i of y_(r))n(i)}}return n(e),t}function b_(e,t){if(HB(t))return e.machine.getStateNodeById(t);if(!e.states)throw new Error(`Unable to retrieve child state '${t}' from '${e.id}'; no child states exist.`);const n=e.states[t];if(!n)throw new Error(`Child state '${t}' does not exist on '${e.id}'`);return n}function mq(e,t){if(typeof t=="string"&&HB(t))try{return e.machine.getStateNodeById(t)}catch{}const n=cse(t).slice();let r=e;for(;n.length;){const i=n.shift();if(!i.length)break;r=b_(r,i)}return r}function gq(e,t){if(typeof t=="string"){const i=e.states[t];if(!i)throw new Error(`State '${t}' does not exist on '${e.id}'`);return[e,i]}const n=Object.keys(t),r=n.map(i=>b_(e,i)).filter(Boolean);return[e.machine.root,e].concat(r,n.reduce((i,a)=>{const o=b_(e,a);if(!o)return i;const u=gq(o,t[a]);return i.concat(u)},[]))}function wyn(e,t,n,r){const a=b_(e,t).next(n,r);return!a||!a.length?e.next(n,r):a}function Ayn(e,t,n,r){const i=Object.keys(t),a=b_(e,i[0]),o=hse(a,t[i[0]],n,r);return!o||!o.length?e.next(n,r):o}function Myn(e,t,n,r){const i=[];for(const a of Object.keys(t)){const o=t[a];if(!o)continue;const u=b_(e,a),c=hse(u,o,n,r);c&&i.push(...c)}return i.length?i:e.next(n,r)}function hse(e,t,n,r){return typeof t=="string"?wyn(e,t,n,r):Object.keys(t).length===1?Ayn(e,t,n,r):Myn(e,t,n,r)}function Ryn(e){return Object.keys(e.states).map(t=>e.states[t]).filter(t=>t.type==="history")}function Lm(e,t){let n=e;for(;n.parent&&n.parent!==t;)n=n.parent;return n.parent===t}function Oyn(e,t){const n=new Set(e),r=new Set(t);for(const i of n)if(r.has(i))return!0;for(const i of r)if(n.has(i))return!0;return!1}function G9e(e,t,n){const r=new Set;for(const i of e){let a=!1;const o=new Set;for(const u of r)if(Oyn(rH([i],t,n),rH([u],t,n)))if(Lm(i.source,u.source))o.add(u);else{a=!0;break}if(!a){for(const u of o)r.delete(u);r.add(i)}}return Array.from(r)}function Eyn(e){const[t,...n]=e;for(const r of EN(t,void 0))if(n.every(i=>Lm(i,r)))return r}function vse(e,t){if(!e.target)return[];const n=new Set;for(const r of e.target)if(Yy(r))if(t[r.id])for(const i of t[r.id])n.add(i);else for(const i of vse(z9e(r),t))n.add(i);else n.add(r);return[...n]}function H9e(e,t){const n=vse(e,t);if(!n)return;if(!e.reenter&&n.every(i=>i===e.source||Lm(i,e.source)))return e.source;const r=Eyn(n.concat(e.source));if(r)return r;if(!e.reenter)return e.source.machine.root}function rH(e,t,n){var i;const r=new Set;for(const a of e)if((i=a.target)!=null&&i.length){const o=H9e(a,n);a.reenter&&a.source===o&&r.add(o);for(const u of t)Lm(u,o)&&r.add(u)}return[...r]}function Tyn(e,t){if(e.length!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function iH(e,t,n,r,i,a){if(!e.length)return t;const o=new Set(t._nodes);let u=t.historyValue;const c=G9e(e,o,u);let f=t;i||([f,u]=Wyn(f,r,n,c,o,u,a)),f=$_(f,r,n,c.flatMap(l=>l.actions),a),f=Pyn(f,r,n,c,o,a,u,i);const s=[...o];f.status==="done"&&(f=$_(f,r,n,s.sort((l,d)=>d.order-l.order).flatMap(l=>l.exit),a));try{return u===t.historyValue&&Tyn(t._nodes,o)?f:Ob(f,{_nodes:s,historyValue:u})}catch(l){throw l}}function Cyn(e,t,n,r,i){if(r.output===void 0)return;const a=eH(i.id,i.output!==void 0&&i.parent?tH(i.output,e.context,t,n.self):void 0);return tH(r.output,e.context,a,n.self)}function Pyn(e,t,n,r,i,a,o,u){let c=e;const f=new Set,s=new Set;Fyn(r,o,s,f),u&&s.add(e.machine.root);const l=new Set;for(const d of[...f].sort((p,v)=>p.order-v.order)){i.add(d);const p=[];p.push(...d.entry);for(const v of d.invoke)p.push(D9e(v.src,{...v,syncSnapshot:!!v.onSnapshot}));if(s.has(d)){const v=d.initial.actions;p.push(...v)}if(c=$_(c,t,n,p,a,d.invoke.map(v=>v.id)),d.type==="final"){const v=d.parent;let h=(v==null?void 0:v.type)==="parallel"?v:v==null?void 0:v.parent,$=h||d;for((v==null?void 0:v.type)==="compound"&&a.push(eH(v.id,d.output!==void 0?tH(d.output,c.context,t,n.self):void 0));(h==null?void 0:h.type)==="parallel"&&!l.has(h)&&pse(i,h);)l.add(h),a.push(eH(h.id)),$=h,h=h.parent;if(h)continue;c=Ob(c,{status:"done",output:Cyn(c,t,n,c.machine.root,$)})}}return c}function Fyn(e,t,n,r){for(const i of e){const a=H9e(i,t);for(const u of i.target||[])!Yy(u)&&(i.source!==u||i.source!==a||i.reenter)&&(r.add(u),n.add(u)),Y1(u,t,n,r);const o=vse(i,t);for(const u of o){const c=EN(u,a);(a==null?void 0:a.type)==="parallel"&&c.push(a),J9e(r,t,n,c,!i.source.parent&&i.reenter?void 0:a)}}}function Y1(e,t,n,r){var i;if(Yy(e))if(t[e.id]){const a=t[e.id];for(const o of a)r.add(o),Y1(o,t,n,r);for(const o of a)$7(o,e.parent,r,t,n)}else{const a=z9e(e);for(const o of a.target)r.add(o),a===((i=e.parent)==null?void 0:i.initial)&&n.add(e.parent),Y1(o,t,n,r);for(const o of a.target)$7(o,e.parent,r,t,n)}else if(e.type==="compound"){const[a]=e.initial.target;Yy(a)||(r.add(a),n.add(a)),Y1(a,t,n,r),$7(a,e,r,t,n)}else if(e.type==="parallel")for(const a of y_(e).filter(o=>!Yy(o)))[...r].some(o=>Lm(o,a))||(Yy(a)||(r.add(a),n.add(a)),Y1(a,t,n,r))}function J9e(e,t,n,r,i){for(const a of r)if((!i||Lm(a,i))&&e.add(a),a.type==="parallel")for(const o of y_(a).filter(u=>!Yy(u)))[...e].some(u=>Lm(u,o))||(e.add(o),Y1(o,t,n,e))}function $7(e,t,n,r,i){J9e(n,r,i,EN(e,t))}function Wyn(e,t,n,r,i,a,o){let u=e;const c=rH(r,i,a);c.sort((s,l)=>l.order-s.order);let f;for(const s of c)for(const l of Ryn(s)){let d;l.history==="deep"?d=p=>dse(p)&&Lm(p,s):d=p=>p.parent===s,f??(f={...a}),f[l.id]=Array.from(i).filter(d)}for(const s of c)u=$_(u,t,n,[...s.exit,...s.invoke.map(l=>lse(l.id))],o),i.delete(s);return[u,f||a]}let a0e=!1;function Y9e(e,t,n,r,i,a){const{machine:o}=e;let u=e;for(const c of r){let p=function(){n.system._sendInspectionEvent({type:"@xstate.action",actorRef:n.self,action:{type:typeof c=="string"?c:typeof c=="object"?c.type:c.name||"(anonymous)",params:d}});try{a0e=s,s(l,d)}finally{a0e=!1}};const f=typeof c=="function",s=f?c:o.implementations.actions[typeof c=="string"?c:c.type];if(!s)continue;const l={context:u.context,event:t,self:n.self,system:n.system},d=f||typeof c=="string"?void 0:"params"in c?typeof c.params=="function"?c.params({context:u.context,event:t}):c.params:void 0;if(!("resolve"in s)){n.self._processingStatus===Jo.Running?p():n.defer(()=>{p()});continue}const v=s,[h,$,b]=v.resolve(n,u,l,d,s,i);u=h,"retryResolve"in v&&(a==null||a.push([v,$])),"execute"in v&&(n.self._processingStatus===Jo.Running?v.execute(n,$):n.defer(v.execute.bind(null,n,$))),b&&(u=Y9e(u,t,n,b,i,a))}return u}function $_(e,t,n,r,i,a){const o=a?[]:void 0,u=Y9e(e,t,n,r,{internalQueue:i,deferredActorIds:a},o);return o==null||o.forEach(([c,f])=>{c.retryResolve(n,u,f)}),u}function I7(e,t,n,r=[]){let i=e;const a=[];function o(f,s,l){n.system._sendInspectionEvent({type:"@xstate.microstep",actorRef:n.self,event:s,snapshot:f,_transitions:l}),a.push(f)}if(t.type===hq)return i=Ob(o0e(i,t,n),{status:"stopped"}),o(i,t,[]),{snapshot:i,microstates:a};let u=t;if(u.type!==F9e){const f=u,s=cyn(f),l=u0e(f,i);if(s&&!l.length)return i=Ob(e,{status:"error",error:f.error}),o(i,f,[]),{snapshot:i,microstates:a};i=iH(l,e,n,u,!1,r),o(i,f,l)}let c=!0;for(;i.status==="active";){let f=c?Nyn(i,u):[];const s=f.length?i:void 0;if(!f.length){if(!r.length)break;u=r.shift(),f=u0e(u,i)}i=iH(f,i,n,u,!1,r),c=i!==s,o(i,u,f)}return i.status!=="active"&&o0e(i,u,n),{snapshot:i,microstates:a}}function o0e(e,t,n){return $_(e,t,n,Object.values(e.children).map(r=>lse(r)),[])}function u0e(e,t){return t.machine.getTransitionData(t,e)}function Nyn(e,t){const n=new Set,r=e._nodes.filter(dse);for(const i of r)e:for(const a of[i].concat(EN(i,void 0)))if(a.always){for(const o of a.always)if(o.guard===void 0||GB(o.guard,e.context,t,e)){n.add(o);break e}}return G9e(Array.from(n),new Set(e._nodes),e.historyValue)}function jyn(e,t){const n=vq(gq(e,t));return V9e(e,[...n])}function kyn(e){return!!e&&typeof e=="object"&&"machine"in e&&"value"in e}const Uyn=function(t){return j9e(t,this.value)},qyn=function(t){return this.tags.has(t)},xyn=function(t){const n=this.machine.getTransitionData(this,t);return!!(n!=null&&n.length)&&n.some(r=>r.target!==void 0||r.actions.length)},Dyn=function(){const{_nodes:t,tags:n,machine:r,getMeta:i,toJSON:a,can:o,hasTag:u,matches:c,...f}=this;return{...f,tags:Array.from(n)}},Lyn=function(){return this._nodes.reduce((t,n)=>(n.meta!==void 0&&(t[n.id]=n.meta),t),{})};function y2(e,t){return{status:e.status,output:e.output,error:e.error,machine:t,context:e.context,_nodes:e._nodes,value:V9e(t.root,e._nodes),tags:new Set(e._nodes.flatMap(n=>n.tags)),children:e.children,historyValue:e.historyValue||{},matches:Uyn,hasTag:qyn,can:xyn,getMeta:Lyn,toJSON:Dyn}}function Ob(e,t={}){return y2({...e,...t},e.machine)}function Byn(e,t){const{_nodes:n,tags:r,machine:i,children:a,context:o,can:u,hasTag:c,matches:f,getMeta:s,toJSON:l,...d}=e,p={};for(const h in a){const $=a[h];p[h]={snapshot:$.getPersistedSnapshot(t),src:$.src,systemId:$._systemId,syncSnapshot:$._syncSnapshot}}return{...d,context:Z9e(o),children:p}}function Z9e(e){let t;for(const n in e){const r=e[n];if(r&&typeof r=="object")if("sessionId"in r&&"send"in r&&"ref"in r)t??(t=Array.isArray(e)?e.slice():{...e}),t[n]={xstate$$type:sse,id:r.id};else{const i=Z9e(r);i!==r&&(t??(t=Array.isArray(e)?e.slice():{...e}),t[n]=i)}}return t??e}function Vyn(e,t,n,r,{event:i,id:a,delay:o},{internalQueue:u}){const c=t.machine.implementations.delays;if(typeof i=="string")throw new Error(`Only event objects may be used with raise; use raise({ type: "${i}" }) instead`);const f=typeof i=="function"?i(n,r):i;let s;if(typeof o=="string"){const l=c&&c[o];s=typeof l=="function"?l(n,r):l}else s=typeof o=="function"?o(n,r):o;return typeof s!="number"&&u.push(f),[t,{event:f,id:a,delay:s}]}function zyn(e,t){const{event:n,delay:r,id:i}=t;if(typeof r=="number"){e.defer(()=>{const a=e.self;e.system.scheduler.schedule(a,a,n,r,i)});return}}function X9e(e,t){function n(r,i){}return n.type="xstate.raise",n.event=e,n.id=t==null?void 0:t.id,n.delay=t==null?void 0:t.delay,n.resolve=Vyn,n.execute=zyn,n}const c0e="xstate.promise.resolve",f0e="xstate.promise.reject",bU=new WeakMap;function mse(e){return{config:e,transition:(n,r,i)=>{var a;if(n.status!=="active")return n;switch(r.type){case c0e:{const o=r.data;return{...n,status:"done",output:o,input:void 0}}case f0e:return{...n,status:"error",error:r.data,input:void 0};case hq:return(a=bU.get(i.self))==null||a.abort(),{...n,status:"stopped",input:void 0};default:return n}},start:(n,{self:r,system:i,emit:a})=>{if(n.status!=="active")return;const o=new AbortController;bU.set(r,o),Promise.resolve(e({input:n.input,system:i,self:r,signal:o.signal,emit:a})).then(c=>{r.getSnapshot().status==="active"&&(bU.delete(r),i._relay(r,r,{type:c0e,data:c}))},c=>{r.getSnapshot().status==="active"&&(bU.delete(r),i._relay(r,r,{type:f0e,data:c}))})},getInitialSnapshot:(n,r)=>({status:"active",output:void 0,error:void 0,input:r}),getPersistedSnapshot:n=>n,restoreSnapshot:n=>n}}function Kyn(e,{machine:t,context:n},r,i){const a=(o,u={})=>{const{systemId:c,input:f}=u;if(typeof o=="string"){const s=fse(t,o);if(!s)throw new Error(`Actor logic '${o}' not implemented in machine '${t.id}'`);const l=g_(s,{id:u.id,parent:e.self,syncSnapshot:u.syncSnapshot,input:typeof f=="function"?f({context:n,event:r,self:e.self}):f,src:o,systemId:c});return i[l.id]=l,l}else return g_(o,{id:u.id,parent:e.self,syncSnapshot:u.syncSnapshot,input:u.input,src:o,systemId:c})};return(o,u)=>{const c=a(o,u);return i[c.id]=c,e.defer(()=>{c._processingStatus!==Jo.Stopped&&c.start()}),c}}function Gyn(e,t,n,r,{assignment:i}){if(!t.context)throw new Error("Cannot assign to undefined `context`. Ensure that `context` is defined in the machine config.");const a={},o={context:t.context,event:n.event,spawn:Kyn(e,t,n.event,a),self:e.self,system:e.system};let u={};if(typeof i=="function")u=i(o,r);else for(const f of Object.keys(i)){const s=i[f];u[f]=typeof s=="function"?s(o,r):s}const c=Object.assign({},t.context,u);return[Ob(t,{context:c,children:Object.keys(a).length?{...t.children,...a}:t.children})]}function I_(e){function t(n,r){}return t.type="xstate.assign",t.assignment=e,t.resolve=Gyn,t}function Hyn(e,t,n,r,{event:i}){const a=typeof i=="function"?i(n,r):i;return[t,{event:a}]}function Jyn(e,{event:t}){e.defer(()=>e.emit(t))}function Yyn(e){function t(n,r){}return t.type="xstate.emit",t.event=e,t.resolve=Hyn,t.execute=Jyn,t}let aH=function(e){return e.Parent="#_parent",e.Internal="#_internal",e}({});function Zyn(e,t,n,r,{to:i,event:a,id:o,delay:u},c){var v;const f=t.machine.implementations.delays;if(typeof a=="string")throw new Error(`Only event objects may be used with sendTo; use sendTo({ type: "${a}" }) instead`);const s=typeof a=="function"?a(n,r):a;let l;if(typeof u=="string"){const h=f&&f[u];l=typeof h=="function"?h(n,r):h}else l=typeof u=="function"?u(n,r):u;const d=typeof i=="function"?i(n,r):i;let p;if(typeof d=="string"){if(d===aH.Parent?p=e.self._parent:d===aH.Internal?p=e.self:d.startsWith("#_")?p=t.children[d.slice(2)]:p=(v=c.deferredActorIds)!=null&&v.includes(d)?d:t.children[d],!p)throw new Error(`Unable to send event to actor '${d}' from machine '${t.machine.id}'.`)}else p=d||e.self;return[t,{to:p,event:s,id:o,delay:l}]}function Xyn(e,t,n){typeof n.to=="string"&&(n.to=t.children[n.to])}function Qyn(e,t){e.defer(()=>{const{to:n,event:r,delay:i,id:a}=t;if(typeof i=="number"){e.system.scheduler.schedule(e.self,n,r,i,a);return}e.system._relay(e.self,n,r.type===ryn?W9e(e.self.id,r.data):r)})}function Q9e(e,t,n){function r(i,a){}return r.type="xsnapshot.sendTo",r.to=e,r.event=t,r.id=n==null?void 0:n.id,r.delay=n==null?void 0:n.delay,r.resolve=Zyn,r.retryResolve=Xyn,r.execute=Qyn,r}function ebn(e,t){return Q9e(aH.Parent,e,t)}function tbn(e,t,n,r,{collect:i}){const a=[],o=function(c){a.push(c)};return o.assign=(...u)=>{a.push(I_(...u))},o.cancel=(...u)=>{a.push(x9e(...u))},o.raise=(...u)=>{a.push(X9e(...u))},o.sendTo=(...u)=>{a.push(Q9e(...u))},o.sendParent=(...u)=>{a.push(ebn(...u))},o.spawnChild=(...u)=>{a.push(D9e(...u))},o.stopChild=(...u)=>{a.push(lse(...u))},o.emit=(...u)=>{a.push(Yyn(...u))},i({context:n.context,event:n.event,enqueue:o,check:u=>GB(u,t.context,n.event,t),self:e.self,system:e.system},r),[t,void 0,a]}function of(e){function t(n,r){}return t.type="xstate.enqueueActions",t.collect=e,t.resolve=tbn,t}function nbn(e,t,n,r,{value:i,label:a}){return[t,{value:typeof i=="function"?i(n,r):i,label:a}]}function rbn({logger:e},{value:t,label:n}){n?e(n,t):e(t)}function nE(e=({context:n,event:r})=>({context:n,event:r}),t){function n(r,i){}return n.type="xstate.log",n.value=e,n.label=t,n.resolve=nbn,n.execute=rbn,n}const s0e=new WeakMap;function E1(e,t,n){let r=s0e.get(e);return r?t in r||(r[t]=n()):(r={[t]:n()},s0e.set(e,r)),r[t]}const ibn={},fO=e=>typeof e=="string"?{type:e}:typeof e=="function"?"resolve"in e?{type:e.type}:{type:e.name}:e;class gse{constructor(t,n){if(this.config=t,this.key=void 0,this.id=void 0,this.type=void 0,this.path=void 0,this.states=void 0,this.history=void 0,this.entry=void 0,this.exit=void 0,this.parent=void 0,this.machine=void 0,this.meta=void 0,this.output=void 0,this.order=-1,this.description=void 0,this.tags=[],this.transitions=void 0,this.always=void 0,this.parent=n._parent,this.key=n._key,this.machine=n._machine,this.path=this.parent?this.parent.path.concat(this.key):[],this.id=this.config.id||[this.machine.id,...this.path].join(C9e),this.type=this.config.type||(this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.description=this.config.description,this.order=this.machine.idMap.size,this.machine.idMap.set(this.id,this),this.states=this.config.states?t0e(this.config.states,(r,i)=>new gse(r,{_parent:this,_key:i,_machine:this.machine})):ibn,this.type==="compound"&&!this.config.initial)throw new Error(`No initial state specified for compound state node "#${this.id}". Try adding { initial: "${Object.keys(this.states)[0]}" } to the state config.`);this.history=this.config.history===!0?"shallow":this.config.history||!1,this.entry=mm(this.config.entry).slice(),this.exit=mm(this.config.exit).slice(),this.meta=this.config.meta,this.output=this.type==="final"||!this.parent?this.config.output:void 0,this.tags=mm(t.tags).slice()}_initialize(){this.transitions=Iyn(this),this.config.always&&(this.always=L1(this.config.always).map(t=>Ky(this,P9e,t))),Object.keys(this.states).forEach(t=>{this.states[t]._initialize()})}get definition(){return{id:this.id,key:this.key,version:this.machine.version,type:this.type,initial:this.initial?{target:this.initial.target,source:this,actions:this.initial.actions.map(fO),eventType:null,reenter:!1,toJSON:()=>({target:this.initial.target.map(t=>`#${t.id}`),source:`#${this.id}`,actions:this.initial.actions.map(fO),eventType:null})}:void 0,history:this.history,states:t0e(this.states,t=>t.definition),on:this.on,transitions:[...this.transitions.values()].flat().map(t=>({...t,actions:t.actions.map(fO)})),entry:this.entry.map(fO),exit:this.exit.map(fO),meta:this.meta,order:this.order||-1,output:this.output,invoke:this.invoke,description:this.description,tags:this.tags}}toJSON(){return this.definition}get invoke(){return E1(this,"invoke",()=>mm(this.config.invoke).map((t,n)=>{const{src:r,systemId:i}=t,a=t.id??n0e(this.id,n),o=typeof r=="string"?r:`xstate.invoke.${n0e(this.id,n)}`;return{...t,src:o,id:a,systemId:i,toJSON(){const{onDone:u,onError:c,...f}=t;return{...f,type:"xstate.invoke",src:o,id:a}}}}))}get on(){return E1(this,"on",()=>[...this.transitions].flatMap(([n,r])=>r.map(i=>[n,i])).reduce((n,[r,i])=>(n[r]=n[r]||[],n[r].push(i),n),{}))}get after(){return E1(this,"delayedTransitions",()=>$yn(this))}get initial(){return E1(this,"initial",()=>_yn(this,this.config.initial))}next(t,n){const r=n.type,i=[];let a;const o=E1(this,`candidates-${r}`,()=>byn(this,r));for(const u of o){const{guard:c}=u,f=t.context;let s=!1;try{s=!c||GB(c,f,n,t)}catch(l){const d=typeof c=="string"?c:typeof c=="object"?c.type:void 0;throw new Error(`Unable to evaluate guard ${d?`'${d}' `:""}in transition for event '${r}' in state node '${this.id}': ${l.message}`)}if(s){i.push(...u.actions),a=u;break}}return a?[a]:void 0}get events(){return E1(this,"events",()=>{const{states:t}=this,n=new Set(this.ownEvents);if(t)for(const r of Object.keys(t)){const i=t[r];if(i.states)for(const a of i.events)n.add(`${a}`)}return Array.from(n)})}get ownEvents(){const t=new Set([...this.transitions.keys()].filter(n=>this.transitions.get(n).some(r=>!(!r.target&&!r.actions.length&&!r.reenter))));return Array.from(t)}}const abn="#";class yse{constructor(t,n){this.config=t,this.version=void 0,this.schemas=void 0,this.implementations=void 0,this.__xstatenode=!0,this.idMap=new Map,this.root=void 0,this.id=void 0,this.states=void 0,this.events=void 0,this.id=t.id||"(machine)",this.implementations={actors:(n==null?void 0:n.actors)??{},actions:(n==null?void 0:n.actions)??{},delays:(n==null?void 0:n.delays)??{},guards:(n==null?void 0:n.guards)??{}},this.version=this.config.version,this.schemas=this.config.schemas,this.transition=this.transition.bind(this),this.getInitialSnapshot=this.getInitialSnapshot.bind(this),this.getPersistedSnapshot=this.getPersistedSnapshot.bind(this),this.restoreSnapshot=this.restoreSnapshot.bind(this),this.start=this.start.bind(this),this.root=new gse(t,{_key:this.id,_machine:this}),this.root._initialize(),this.states=this.root.states,this.events=this.root.events}provide(t){const{actions:n,guards:r,actors:i,delays:a}=this.implementations;return new yse(this.config,{actions:{...n,...t.actions},guards:{...r,...t.guards},actors:{...i,...t.actors},delays:{...a,...t.delays}})}resolveState(t){const n=jyn(this.root,t.value),r=vq(gq(this.root,n));return y2({_nodes:[...r],context:t.context||{},children:{},status:pse(r,this.root)?"done":t.status||"active",output:t.output,error:t.error,historyValue:t.historyValue},this)}transition(t,n,r){return I7(t,n,r).snapshot}microstep(t,n,r){return I7(t,n,r).microstates}getTransitionData(t,n){return hse(this.root,t.value,t,n)||[]}getPreInitialState(t,n,r){const{context:i}=this.config,a=y2({context:typeof i!="function"&&i?i:{},_nodes:[this.root],children:{},status:"active"},this);return typeof i=="function"?$_(a,n,t,[I_(({spawn:u,event:c,self:f})=>i({spawn:u,input:c.input,self:f}))],r):a}getInitialSnapshot(t,n){const r=N9e(n),i=[],a=this.getPreInitialState(t,r,i),o=iH([{target:[...K9e(this.root)],source:this.root,reenter:!0,actions:[],eventType:null,toJSON:null}],a,t,r,!0,i),{snapshot:u}=I7(o,r,t,i);return u}start(t){Object.values(t.children).forEach(n=>{n.getSnapshot().status==="active"&&n.start()})}getStateNodeById(t){const n=cse(t),r=n.slice(1),i=HB(n[0])?n[0].slice(abn.length):n[0],a=this.idMap.get(i);if(!a)throw new Error(`Child state node '#${i}' does not exist on machine '${this.id}'`);return mq(a,r)}get definition(){return this.root.definition}toJSON(){return this.definition}getPersistedSnapshot(t,n){return Byn(t,n)}restoreSnapshot(t,n){const r={},i=t.children;Object.keys(i).forEach(c=>{const f=i[c],s=f.snapshot,l=f.src,d=typeof l=="string"?fse(this,l):l;if(!d)return;const p=g_(d,{id:c,parent:n.self,syncSnapshot:f.syncSnapshot,snapshot:s,src:l,systemId:f.systemId});r[c]=p});const a=y2({...t,children:r,_nodes:Array.from(vq(gq(this.root,t.value)))},this);let o=new Set;function u(c,f){if(!o.has(c)){o.add(c);for(let s in c){const l=c[s];if(l&&typeof l=="object"){if("xstate$$type"in l&&l.xstate$$type===sse){c[s]=f[l.id];continue}u(l,f)}}}}return u(a.context,r),a}}function obn(e,t){return new yse(e,t)}function eGe({schemas:e,actors:t,actions:n,guards:r,delays:i}){return{createMachine:a=>obn({...a,schemas:e},{actors:t,actions:n,guards:r,delays:i})}}const ubn={timeout:1/0};function cbn(e,t,n){const r={...ubn,...n};return new Promise((i,a)=>{const{signal:o}=r;if(o!=null&&o.aborted){a(o.reason);return}let u=!1;const c=r.timeout===1/0?void 0:setTimeout(()=>{f(),a(new Error(`Timeout of ${r.timeout} ms exceeded`))},r.timeout),f=()=>{clearTimeout(c),u=!0,d==null||d.unsubscribe(),l&&o.removeEventListener("abort",l)};function s(p){t(p)&&(f(),i(p))}let l,d;s(e.getSnapshot()),!u&&(o&&(l=()=>{f(),a(o.reason)},o.addEventListener("abort",l)),d=e.subscribe({next:s,error:p=>{f(),a(p)},complete:()=>{f(),a(new Error("Actor terminated without satisfying predicate"))}}),u&&d.unsubscribe())})}function tGe(e){return function(t){return function(n){return e.map(n,t)}}}function nGe(e){return function(t){return function(n){return e.contramap(n,t)}}}function rGe(e){return function(t){return function(n){return e.mapWithIndex(n,t)}}}function iGe(e){return function(t){return function(n){return e.ap(n,t)}}}function aGe(e){return function(t){return function(n){return e.chain(n,t)}}}function oGe(e){return function(t,n){return function(r){return e.bimap(r,t,n)}}}function uGe(e){return function(t){return function(n){return e.mapLeft(n,t)}}}function cGe(e){return function(t){return function(n){return e.extend(n,t)}}}function fGe(e){return function(t,n){return function(r){return e.reduce(r,t,n)}}}function sGe(e){return function(t){var n=e.foldMap(t);return function(r){return function(i){return n(i,r)}}}}function lGe(e){return function(t,n){return function(r){return e.reduceRight(r,t,n)}}}function dGe(e){return function(t,n){return function(r){return e.reduceWithIndex(r,t,n)}}}function pGe(e){return function(t){var n=e.foldMapWithIndex(t);return function(r){return function(i){return n(i,r)}}}}function hGe(e){return function(t,n){return function(r){return e.reduceRightWithIndex(r,t,n)}}}function vGe(e){return function(t){return function(n){return e.alt(n,t)}}}function mGe(e){return function(t){return function(n){return e.filter(n,t)}}}function gGe(e){return function(t){return function(n){return e.filterMap(n,t)}}}function yGe(e){return function(t){return function(n){return e.partition(n,t)}}}function bGe(e){return function(t){return function(n){return e.partitionMap(n,t)}}}function $Ge(e){return function(t){return function(n){return e.filterWithIndex(n,t)}}}function IGe(e){return function(t){return function(n){return e.filterMapWithIndex(n,t)}}}function _Ge(e){return function(t){return function(n){return e.partitionWithIndex(n,t)}}}function SGe(e){return function(t){return function(n){return e.partitionMapWithIndex(n,t)}}}function wGe(e){return function(t,n){return function(r){return e.promap(r,t,n)}}}function AGe(e){return function(t){return function(n){return e.compose(n,t)}}}var fbn=function(e){return typeof e.map=="function"},sbn=function(e){return typeof e.contramap=="function"},lbn=function(e){return typeof e.mapWithIndex=="function"},dbn=function(e){return typeof e.ap=="function"},pbn=function(e){return typeof e.chain=="function"},hbn=function(e){return typeof e.bimap=="function"},vbn=function(e){return typeof e.extend=="function"},mbn=function(e){return typeof e.reduce=="function"},gbn=function(e){return typeof e.reduceWithIndex=="function"},ybn=function(e){return typeof e.alt=="function"},bbn=function(e){return typeof e.compact=="function"},$bn=function(e){return typeof e.filter=="function"},Ibn=function(e){return typeof e.filterWithIndex=="function"},_bn=function(e){return typeof e.promap=="function"},Sbn=function(e){return typeof e.compose=="function"},wbn=function(e){return typeof e.throwError=="function"};function Abn(e){var t={};if(fbn(e)&&(t.map=tGe(e)),sbn(e)&&(t.contramap=nGe(e)),lbn(e)&&(t.mapWithIndex=rGe(e)),dbn(e)&&(t.ap=iGe(e),t.apFirst=Yr(e),t.apSecond=Zr(e)),pbn(e)&&(t.chain=aGe(e),t.chainFirst=i$(e),t.flatten=t.chain(Oe)),hbn(e)&&(t.bimap=oGe(e),t.mapLeft=uGe(e)),vbn(e)&&(t.extend=cGe(e),t.duplicate=t.extend(Oe)),mbn(e)&&(t.reduce=fGe(e),t.foldMap=sGe(e),t.reduceRight=lGe(e)),gbn(e)&&(t.reduceWithIndex=dGe(e),t.foldMapWithIndex=pGe(e),t.reduceRightWithIndex=hGe(e)),ybn(e)&&(t.alt=vGe(e)),bbn(e)&&(t.compact=e.compact,t.separate=e.separate),$bn(e)&&(t.filter=mGe(e),t.filterMap=gGe(e),t.partition=yGe(e),t.partitionMap=bGe(e)),Ibn(e)&&(t.filterWithIndex=$Ge(e),t.filterMapWithIndex=IGe(e),t.partitionWithIndex=_Ge(e),t.partitionMapWithIndex=SGe(e)),_bn(e)&&(t.promap=wGe(e)),Sbn(e)&&(t.compose=AGe(e)),wbn(e)){var n=function(o){return function(u){return u._tag==="None"?e.throwError(o()):e.of(u.value)}},r=function(o){return o._tag==="Left"?e.throwError(o.left):e.of(o.right)},i=function(o,u){return function(c){return o(c)?e.of(c):e.throwError(u(c))}},a=function(o,u){return function(c){return e.chain(c,function(f){return o(f)?e.of(f):e.throwError(u(f))})}};t.fromOption=n,t.fromEither=r,t.fromPredicate=i,t.filterOrElse=a}return t}var rt=M;const MGe=Object.freeze(Object.defineProperty({__proto__:null,alt:vGe,ap:iGe,bimap:oGe,chain:aGe,compose:AGe,contramap:nGe,extend:cGe,filter:mGe,filterMap:gGe,filterMapWithIndex:IGe,filterWithIndex:$Ge,foldMap:sGe,foldMapWithIndex:pGe,map:tGe,mapLeft:uGe,mapWithIndex:rGe,partition:yGe,partitionMap:bGe,partitionMapWithIndex:SGe,partitionWithIndex:_Ge,pipe:rt,pipeable:Abn,promap:wGe,reduce:fGe,reduceRight:lGe,reduceRightWithIndex:hGe,reduceWithIndex:dGe},Symbol.toStringTag,{value:"Module"}));var RGe={exports:{}};(function(e,t){(function(n){e.exports=n()})(function(n){var r=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function i(b,y){var m=b[0],g=b[1],_=b[2],I=b[3];m+=(g&_|~g&I)+y[0]-680876936|0,m=(m<<7|m>>>25)+g|0,I+=(m&g|~m&_)+y[1]-389564586|0,I=(I<<12|I>>>20)+m|0,_+=(I&m|~I&g)+y[2]+606105819|0,_=(_<<17|_>>>15)+I|0,g+=(_&I|~_&m)+y[3]-1044525330|0,g=(g<<22|g>>>10)+_|0,m+=(g&_|~g&I)+y[4]-176418897|0,m=(m<<7|m>>>25)+g|0,I+=(m&g|~m&_)+y[5]+1200080426|0,I=(I<<12|I>>>20)+m|0,_+=(I&m|~I&g)+y[6]-1473231341|0,_=(_<<17|_>>>15)+I|0,g+=(_&I|~_&m)+y[7]-45705983|0,g=(g<<22|g>>>10)+_|0,m+=(g&_|~g&I)+y[8]+1770035416|0,m=(m<<7|m>>>25)+g|0,I+=(m&g|~m&_)+y[9]-1958414417|0,I=(I<<12|I>>>20)+m|0,_+=(I&m|~I&g)+y[10]-42063|0,_=(_<<17|_>>>15)+I|0,g+=(_&I|~_&m)+y[11]-1990404162|0,g=(g<<22|g>>>10)+_|0,m+=(g&_|~g&I)+y[12]+1804603682|0,m=(m<<7|m>>>25)+g|0,I+=(m&g|~m&_)+y[13]-40341101|0,I=(I<<12|I>>>20)+m|0,_+=(I&m|~I&g)+y[14]-1502002290|0,_=(_<<17|_>>>15)+I|0,g+=(_&I|~_&m)+y[15]+1236535329|0,g=(g<<22|g>>>10)+_|0,m+=(g&I|_&~I)+y[1]-165796510|0,m=(m<<5|m>>>27)+g|0,I+=(m&_|g&~_)+y[6]-1069501632|0,I=(I<<9|I>>>23)+m|0,_+=(I&g|m&~g)+y[11]+643717713|0,_=(_<<14|_>>>18)+I|0,g+=(_&m|I&~m)+y[0]-373897302|0,g=(g<<20|g>>>12)+_|0,m+=(g&I|_&~I)+y[5]-701558691|0,m=(m<<5|m>>>27)+g|0,I+=(m&_|g&~_)+y[10]+38016083|0,I=(I<<9|I>>>23)+m|0,_+=(I&g|m&~g)+y[15]-660478335|0,_=(_<<14|_>>>18)+I|0,g+=(_&m|I&~m)+y[4]-405537848|0,g=(g<<20|g>>>12)+_|0,m+=(g&I|_&~I)+y[9]+568446438|0,m=(m<<5|m>>>27)+g|0,I+=(m&_|g&~_)+y[14]-1019803690|0,I=(I<<9|I>>>23)+m|0,_+=(I&g|m&~g)+y[3]-187363961|0,_=(_<<14|_>>>18)+I|0,g+=(_&m|I&~m)+y[8]+1163531501|0,g=(g<<20|g>>>12)+_|0,m+=(g&I|_&~I)+y[13]-1444681467|0,m=(m<<5|m>>>27)+g|0,I+=(m&_|g&~_)+y[2]-51403784|0,I=(I<<9|I>>>23)+m|0,_+=(I&g|m&~g)+y[7]+1735328473|0,_=(_<<14|_>>>18)+I|0,g+=(_&m|I&~m)+y[12]-1926607734|0,g=(g<<20|g>>>12)+_|0,m+=(g^_^I)+y[5]-378558|0,m=(m<<4|m>>>28)+g|0,I+=(m^g^_)+y[8]-2022574463|0,I=(I<<11|I>>>21)+m|0,_+=(I^m^g)+y[11]+1839030562|0,_=(_<<16|_>>>16)+I|0,g+=(_^I^m)+y[14]-35309556|0,g=(g<<23|g>>>9)+_|0,m+=(g^_^I)+y[1]-1530992060|0,m=(m<<4|m>>>28)+g|0,I+=(m^g^_)+y[4]+1272893353|0,I=(I<<11|I>>>21)+m|0,_+=(I^m^g)+y[7]-155497632|0,_=(_<<16|_>>>16)+I|0,g+=(_^I^m)+y[10]-1094730640|0,g=(g<<23|g>>>9)+_|0,m+=(g^_^I)+y[13]+681279174|0,m=(m<<4|m>>>28)+g|0,I+=(m^g^_)+y[0]-358537222|0,I=(I<<11|I>>>21)+m|0,_+=(I^m^g)+y[3]-722521979|0,_=(_<<16|_>>>16)+I|0,g+=(_^I^m)+y[6]+76029189|0,g=(g<<23|g>>>9)+_|0,m+=(g^_^I)+y[9]-640364487|0,m=(m<<4|m>>>28)+g|0,I+=(m^g^_)+y[12]-421815835|0,I=(I<<11|I>>>21)+m|0,_+=(I^m^g)+y[15]+530742520|0,_=(_<<16|_>>>16)+I|0,g+=(_^I^m)+y[2]-995338651|0,g=(g<<23|g>>>9)+_|0,m+=(_^(g|~I))+y[0]-198630844|0,m=(m<<6|m>>>26)+g|0,I+=(g^(m|~_))+y[7]+1126891415|0,I=(I<<10|I>>>22)+m|0,_+=(m^(I|~g))+y[14]-1416354905|0,_=(_<<15|_>>>17)+I|0,g+=(I^(_|~m))+y[5]-57434055|0,g=(g<<21|g>>>11)+_|0,m+=(_^(g|~I))+y[12]+1700485571|0,m=(m<<6|m>>>26)+g|0,I+=(g^(m|~_))+y[3]-1894986606|0,I=(I<<10|I>>>22)+m|0,_+=(m^(I|~g))+y[10]-1051523|0,_=(_<<15|_>>>17)+I|0,g+=(I^(_|~m))+y[1]-2054922799|0,g=(g<<21|g>>>11)+_|0,m+=(_^(g|~I))+y[8]+1873313359|0,m=(m<<6|m>>>26)+g|0,I+=(g^(m|~_))+y[15]-30611744|0,I=(I<<10|I>>>22)+m|0,_+=(m^(I|~g))+y[6]-1560198380|0,_=(_<<15|_>>>17)+I|0,g+=(I^(_|~m))+y[13]+1309151649|0,g=(g<<21|g>>>11)+_|0,m+=(_^(g|~I))+y[4]-145523070|0,m=(m<<6|m>>>26)+g|0,I+=(g^(m|~_))+y[11]-1120210379|0,I=(I<<10|I>>>22)+m|0,_+=(m^(I|~g))+y[2]+718787259|0,_=(_<<15|_>>>17)+I|0,g+=(I^(_|~m))+y[9]-343485551|0,g=(g<<21|g>>>11)+_|0,b[0]=m+b[0]|0,b[1]=g+b[1]|0,b[2]=_+b[2]|0,b[3]=I+b[3]|0}function a(b){var y=[],m;for(m=0;m<64;m+=4)y[m>>2]=b.charCodeAt(m)+(b.charCodeAt(m+1)<<8)+(b.charCodeAt(m+2)<<16)+(b.charCodeAt(m+3)<<24);return y}function o(b){var y=[],m;for(m=0;m<64;m+=4)y[m>>2]=b[m]+(b[m+1]<<8)+(b[m+2]<<16)+(b[m+3]<<24);return y}function u(b){var y=b.length,m=[1732584193,-271733879,-1732584194,271733878],g,_,I,A,E,N;for(g=64;g<=y;g+=64)i(m,a(b.substring(g-64,g)));for(b=b.substring(g-64),_=b.length,I=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],g=0;g<_;g+=1)I[g>>2]|=b.charCodeAt(g)<<(g%4<<3);if(I[g>>2]|=128<<(g%4<<3),g>55)for(i(m,I),g=0;g<16;g+=1)I[g]=0;return A=y*8,A=A.toString(16).match(/(.*?)(.{0,8})$/),E=parseInt(A[2],16),N=parseInt(A[1],16)||0,I[14]=E,I[15]=N,i(m,I),m}function c(b){var y=b.length,m=[1732584193,-271733879,-1732584194,271733878],g,_,I,A,E,N;for(g=64;g<=y;g+=64)i(m,o(b.subarray(g-64,g)));for(b=g-64>2]|=b[g]<<(g%4<<3);if(I[g>>2]|=128<<(g%4<<3),g>55)for(i(m,I),g=0;g<16;g+=1)I[g]=0;return A=y*8,A=A.toString(16).match(/(.*?)(.{0,8})$/),E=parseInt(A[2],16),N=parseInt(A[1],16)||0,I[14]=E,I[15]=N,i(m,I),m}function f(b){var y="",m;for(m=0;m<4;m+=1)y+=r[b>>m*8+4&15]+r[b>>m*8&15];return y}function s(b){var y;for(y=0;yI?new ArrayBuffer(0):(A=I-_,E=new ArrayBuffer(A),N=new Uint8Array(E),U=new Uint8Array(this,_,A),N.set(U),E)}}();function l(b){return/[\u0080-\uFFFF]/.test(b)&&(b=unescape(encodeURIComponent(b))),b}function d(b,y){var m=b.length,g=new ArrayBuffer(m),_=new Uint8Array(g),I;for(I=0;I>2]|=y.charCodeAt(g)<<(g%4<<3);return this._finish(_,m),I=s(this._hash),b&&(I=h(I)),this.reset(),I},$.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},$.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},$.prototype.setState=function(b){return this._buff=b.buff,this._length=b.length,this._hash=b.hash,this},$.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},$.prototype._finish=function(b,y){var m=y,g,_,I;if(b[m>>2]|=128<<(m%4<<3),m>55)for(i(this._hash,b),m=0;m<16;m+=1)b[m]=0;g=this._length*8,g=g.toString(16).match(/(.*?)(.{0,8})$/),_=parseInt(g[2],16),I=parseInt(g[1],16)||0,b[14]=_,b[15]=I,i(this._hash,b)},$.hash=function(b,y){return $.hashBinary(l(b),y)},$.hashBinary=function(b,y){var m=u(b),g=s(m);return y?h(g):g},$.ArrayBuffer=function(){this.reset()},$.ArrayBuffer.prototype.append=function(b){var y=v(this._buff.buffer,b,!0),m=y.length,g;for(this._length+=b.byteLength,g=64;g<=m;g+=64)i(this._hash,o(y.subarray(g-64,g)));return this._buff=g-64>2]|=y[_]<<(_%4<<3);return this._finish(g,m),I=s(this._hash),b&&(I=h(I)),this.reset(),I},$.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},$.ArrayBuffer.prototype.getState=function(){var b=$.prototype.getState.call(this);return b.buff=p(b.buff),b},$.ArrayBuffer.prototype.setState=function(b){return b.buff=d(b.buff,!0),$.prototype.setState.call(this,b)},$.ArrayBuffer.prototype.destroy=$.prototype.destroy,$.ArrayBuffer.prototype._finish=$.prototype._finish,$.ArrayBuffer.hash=function(b,y){var m=c(new Uint8Array(b)),g=s(m);return y?h(g):g},$})})(RGe);var Mbn=RGe.exports;const Rbn=TD(Mbn);var pf=function(e){return{show:function(t){var n="{";for(var r in e)br.call(e,r)&&(n+=" ".concat(r,": ").concat(e[r].show(t[r]),","));return n.length>1&&(n=n.slice(0,-1)+" "),n+="}",n}}},OGe=function(){for(var e=[],t=0;t0;)if(!n(e[i],t[i],r))return!1;return!0}function kbn(e,t,n,r){var i=e.size===t.size;if(i&&e.size){var a={};e.forEach(function(o,u){if(i){var c=!1,f=0;t.forEach(function(s,l){!c&&!a[f]&&(c=n(u,l,r)&&n(o,s,r),c&&(a[f]=!0)),f++}),i=c}})}return i}var Ubn="_owner",qbn=Function.prototype.bind.call(Function.prototype.call,Object.prototype.hasOwnProperty);function v0e(e,t,n,r){var i=l0e(e),a=i.length;if(l0e(t).length!==a)return!1;if(a)for(var o=void 0;a-- >0;){if(o=i[a],o===Ubn){var u=h0e(e),c=h0e(t);if((u||c)&&u!==c)return!1}if(!qbn(t,o)||!n(e[o],t[o],r))return!1}return!0}function xbn(e,t){return e.source===t.source&&e.global===t.global&&e.ignoreCase===t.ignoreCase&&e.multiline===t.multiline&&e.unicode===t.unicode&&e.sticky===t.sticky&&e.lastIndex===t.lastIndex}function Dbn(e,t,n,r){var i=e.size===t.size;if(i&&e.size){var a={};e.forEach(function(o){if(i){var u=!1,c=0;t.forEach(function(f){!u&&!a[c]&&(u=n(o,f,r),u&&(a[c]=!0)),c++}),i=u}})}return i}var Lbn=typeof Map=="function",Bbn=typeof Set=="function";function TN(e){var t=typeof e=="function"?e(n):n;function n(r,i,a){if(r===i)return!0;if(r&&i&&typeof r=="object"&&typeof i=="object"){if(d0e(r)&&d0e(i))return v0e(r,i,t,a);var o=Array.isArray(r),u=Array.isArray(i);return o||u?o===u&&jbn(r,i,t,a):(o=r instanceof Date,u=i instanceof Date,o||u?o===u&&JB(r.getTime(),i.getTime()):(o=r instanceof RegExp,u=i instanceof RegExp,o||u?o===u&&xbn(r,i):p0e(r)||p0e(i)?r===i:Lbn&&(o=r instanceof Map,u=i instanceof Map,o||u)?o===u&&kbn(r,i,t,a):Bbn&&(o=r instanceof Set,u=i instanceof Set,o||u)?o===u&&Dbn(r,i,t,a):v0e(r,i,t,a)))}return r!==r&&i!==i}return n}var CGe=TN(),Vbn=TN(function(){return JB}),zbn=TN(TGe()),Kbn=TN(TGe(JB));const Gbn=Object.freeze(Object.defineProperty({__proto__:null,circularDeepEqual:zbn,circularShallowEqual:Kbn,createCustomEqual:TN,deepEqual:CGe,sameValueZeroEqual:JB,shallowEqual:Vbn},Symbol.toStringTag,{value:"Module"}));function jp(e,t){var n=0,r,i;t=t||{};function a(){var o=r,u=arguments.length,c,f;e:for(;o;){if(o.args.length!==arguments.length){o=o.next;continue}for(f=0;f{e.resolve=t,e.reject=n}),e}var yM={},Eb={};Object.defineProperty(Eb,"__esModule",{value:!0});Eb.isGuid=Eb.guid=void 0;var Hbn=function(e){e===void 0&&(e=2);for(var t=(Date.now()*3).toString(16),n=new Date().getTimezoneOffset(),r=Number("".concat(n<0?"7":"6").concat(Math.abs(n))).toString(16),i=e*9+3+15,a="",o=0;o=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function jGe(e,t){return function(n,r){t(n,r,e)}}function kGe(e,t,n,r,i,a){function o(b){if(b!==void 0&&typeof b!="function")throw new TypeError("Function expected");return b}for(var u=r.kind,c=u==="getter"?"get":u==="setter"?"set":"value",f=!t&&e?r.static?e:e.prototype:null,s=t||(f?Object.getOwnPropertyDescriptor(f,r.name):{}),l,d=!1,p=n.length-1;p>=0;p--){var v={};for(var h in r)v[h]=h==="access"?{}:r[h];for(var h in r.access)v.access[h]=r.access[h];v.addInitializer=function(b){if(d)throw new TypeError("Cannot add initializers after decoration has completed");a.push(o(b||null))};var $=(0,n[p])(u==="accessor"?{get:s.get,set:s.set}:s[c],v);if(u==="accessor"){if($===void 0)continue;if($===null||typeof $!="object")throw new TypeError("Object expected");(l=o($.get))&&(s.get=l),(l=o($.set))&&(s.set=l),(l=o($.init))&&i.unshift(l)}else(l=o($))&&(u==="field"?i.unshift(l):s[c]=l)}f&&Object.defineProperty(f,r.name,s),d=!0}function UGe(e,t,n){for(var r=arguments.length>2,i=0;i0&&a[a.length-1])&&(f[0]===6||f[0]===2)){n=0;continue}if(f[0]===3&&(!a||f[1]>a[0]&&f[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function XB(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(u){o={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function zGe(){for(var e=[],t=0;t1||c(p,h)})},v&&(i[p]=v(i[p])))}function c(p,v){try{f(r[p](v))}catch(h){d(a[0][3],h)}}function f(p){p.value instanceof S_?Promise.resolve(p.value.v).then(s,l):d(a[0][2],p)}function s(p){c("next",p)}function l(p){c("throw",p)}function d(p,v){p(v),a.shift(),a.length&&c(a[0][0],a[0][1])}}function HGe(e){var t,n;return t={},r("next"),r("throw",function(i){throw i}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(i,a){t[i]=e[i]?function(o){return(n=!n)?{value:S_(e[i](o)),done:!1}:a?a(o):o}:a}}function JGe(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof yq=="function"?yq(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(a){n[a]=e[a]&&function(o){return new Promise(function(u,c){o=e[a](o),i(u,c,o.done,o.value)})}}function i(a,o,u,c){Promise.resolve(c).then(function(f){a({value:f,done:u})},o)}}function YGe(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var n0n=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function ZGe(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&ZB(t,e,n);return n0n(t,e),t}function XGe(e){return e&&e.__esModule?e:{default:e}}function QGe(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)}function eHe(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n}function tHe(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function nHe(e,t,n){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var r,i;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(r===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(i=r)}if(typeof r!="function")throw new TypeError("Object not disposable.");i&&(r=function(){try{i.call(this)}catch(a){return Promise.reject(a)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}var r0n=typeof SuppressedError=="function"?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function rHe(e){function t(a){e.error=e.hasError?new r0n(a,e.error,"An error was suppressed during disposal."):a,e.hasError=!0}var n,r=0;function i(){for(;n=e.stack.pop();)try{if(!n.async&&r===1)return r=0,e.stack.push(n),Promise.resolve().then(i);if(n.dispose){var a=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(a).then(i,function(o){return t(o),i()})}else r|=1}catch(o){t(o)}if(r===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return i()}function iHe(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(n,r,i,a,o){return r?t?".jsx":".js":i&&(!a||!o)?n:i+a+"."+o.toLowerCase()+"js"}):e}const i0n={__extends:FGe,__assign:ma,__rest:WGe,__decorate:NGe,__param:jGe,__esDecorate:kGe,__runInitializers:UGe,__propKey:qGe,__setFunctionName:xGe,__metadata:DGe,__awaiter:LGe,__generator:BGe,__createBinding:ZB,__exportStar:VGe,__values:yq,__read:XB,__spread:zGe,__spreadArrays:KGe,__spreadArray:nh,__await:S_,__asyncGenerator:GGe,__asyncDelegator:HGe,__asyncValues:JGe,__makeTemplateObject:YGe,__importStar:ZGe,__importDefault:XGe,__classPrivateFieldGet:QGe,__classPrivateFieldSet:eHe,__classPrivateFieldIn:tHe,__addDisposableResource:nHe,__disposeResources:rHe,__rewriteRelativeImportExtension:iHe},a0n=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:nHe,get __assign(){return ma},__asyncDelegator:HGe,__asyncGenerator:GGe,__asyncValues:JGe,__await:S_,__awaiter:LGe,__classPrivateFieldGet:QGe,__classPrivateFieldIn:tHe,__classPrivateFieldSet:eHe,__createBinding:ZB,__decorate:NGe,__disposeResources:rHe,__esDecorate:kGe,__exportStar:VGe,__extends:FGe,__generator:BGe,__importDefault:XGe,__importStar:ZGe,__makeTemplateObject:YGe,__metadata:DGe,__param:jGe,__propKey:qGe,__read:XB,__rest:WGe,__rewriteRelativeImportExtension:iHe,__runInitializers:UGe,__setFunctionName:xGe,__spread:zGe,__spreadArray:nh,__spreadArrays:KGe,__values:yq,default:i0n},Symbol.toStringTag,{value:"Module"})),ua=Et(a0n);var it={};const D$=Et(_9e);Object.defineProperty(it,"__esModule",{value:!0});it.getGuardId=it.memo=it.collect=it.merge=it.projectFieldWithEnv=it.projectField=it.mapRecord=void 0;var o0n=ua,QB=D$,u0n=function(e,t){return QB.record.map(e,t)};it.mapRecord=u0n;var c0n=function(e){return function(t){return QB.record.map(e,function(n){return n[t]})}};it.projectField=c0n;var f0n=function(e,t){return function(n){return QB.record.map(e,function(r){return r(t)[n]})}};it.projectFieldWithEnv=f0n;var s0n=function(){for(var e=[],t=0;t1?A(E[1],E[0]):function(U){return A(U)(E[0])}}}function l(A,E,N,U,te,Ie,je,J,ee){switch(arguments.length){case 1:return A;case 2:return function(){return E(A.apply(this,arguments))};case 3:return function(){return N(E(A.apply(this,arguments)))};case 4:return function(){return U(N(E(A.apply(this,arguments))))};case 5:return function(){return te(U(N(E(A.apply(this,arguments)))))};case 6:return function(){return Ie(te(U(N(E(A.apply(this,arguments))))))};case 7:return function(){return je(Ie(te(U(N(E(A.apply(this,arguments)))))))};case 8:return function(){return J(je(Ie(te(U(N(E(A.apply(this,arguments))))))))};case 9:return function(){return ee(J(je(Ie(te(U(N(E(A.apply(this,arguments)))))))))}}}function d(){for(var A=[],E=0;E=A}:A;return function(){var U=Array.from(arguments);return N(arguments)?E.apply(this,U):function(te){return E.apply(void 0,t([te],U,!1))}}};e.dual=I})(Bn);var w0e;function vHe(){if(w0e)return gO;w0e=1,Object.defineProperty(gO,"__esModule",{value:!0}),gO.eqNewtypeInterpreter=void 0;var e=it,t=Bn,n=Xd(),r=Oa,i=function(a){return a};return gO.eqNewtypeInterpreter=e.memo(function(){return{_F:r.EqURI,newtype:function(){return function(a,o){return function(u){return t.pipe(i(a(u).eq),function(c){return new r.EqType(n.eqApplyConfig(o)(c,u,{eq:c}))})}}},newtypeIso:function(a,o,u,c){return function(f){return t.pipe(o(f).eq,function(s){return new r.EqType(n.eqApplyConfig(c)({equals:function(l,d){return s.equals(a.reverseGet(l),a.reverseGet(d))}},f,{eq:s}))})}},newtypePrism:function(a,o,u,c){return function(f){return t.pipe(o(f).eq,function(s){return new r.EqType(n.eqApplyConfig(c)({equals:function(l,d){return s.equals(a.reverseGet(l),a.reverseGet(d))}},f,{eq:s}))})}}}}),gO}var yO={},A0e;function mHe(){if(A0e)return yO;A0e=1,Object.defineProperty(yO,"__esModule",{value:!0}),yO.eqRefinedInterpreter=void 0;var e=it,t=Bn,n=Xd(),r=Oa;return yO.eqRefinedInterpreter=e.memo(function(){return{_F:r.EqURI,refined:function(i,a,o,u){return function(c){return t.pipe(i(c).eq,function(f){return new r.EqType(n.eqApplyConfig(u)(f,c,{eq:f}))})}},constrained:function(i,a,o,u){return function(c){return t.pipe(i(c).eq,function(f){return new r.EqType(n.eqApplyConfig(u)(f,c,{eq:f}))})}}}}),yO}var M0e;function b0n(){return M0e||(M0e=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=ua;t.__exportStar(uHe(),e),t.__exportStar(gHe(),e),t.__exportStar(cHe(),e),t.__exportStar(fHe(),e),t.__exportStar(sHe(),e),t.__exportStar(lHe(),e),t.__exportStar(pHe(),e),t.__exportStar(hHe(),e),t.__exportStar(vHe(),e),t.__exportStar(mHe(),e)}(S7)),S7}var R0e;function Xd(){return R0e||(R0e=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.eqApplyConfig=e.EqURI=void 0;var t=ua,n=L$,r=Oa;Object.defineProperty(e,"EqURI",{enumerable:!0,get:function(){return r.EqURI}}),t.__exportStar(b0n(),e),e.eqApplyConfig=n.getApplyConfig(r.EqURI)}(_7)),_7}var O0e;function gHe(){if(O0e)return sO;O0e=1,Object.defineProperty(sO,"__esModule",{value:!0}),sO.eqIntersectionInterpreter=void 0;var e=it,t=h0n,n=Oa,r=Xd();return sO.eqIntersectionInterpreter=e.memo(function(){return{_F:n.EqURI,intersection:function(){for(var i=[],a=0;aT0n.Stream.nil(),r=void 0){this.value_=t,this.shrink=n,this.hasToBeCloned=r!==void 0||(0,A7.hasCloneMethod)(t),this.readOnce=!1,this.hasToBeCloned?Object.defineProperty(this,"value",{get:r!==void 0?r:this.getValue}):this.value=t}getValue(){return this.readOnce?this.value_[A7.cloneMethod]():(this.readOnce=!0,this.value_)}applyMapper(t){if(this.hasToBeCloned){const n=t(this.value);return n instanceof Object&&(n[A7.cloneMethod]=()=>this.applyMapper(t)),n}return t(this.value)}map(t){return new bq(this.applyMapper(t),()=>this.shrink().map(n=>n.map(t)))}filter(t){const n=r=>t(r.value_);return new bq(this.value,()=>this.shrink().filter(n).map(r=>r.filter(t)))}}Sv.Shrinkable=bq;Object.defineProperty(rh,"__esModule",{value:!0});rh.assertIsArbitrary=rh.Arbitrary=void 0;const $He=Sv;class $M{filter(t){return new F0n(this,t)}map(t){return new P0n(this,t)}chain(t){return new C0n(this,t)}noShrink(){return new W0n(this)}withBias(t){return this}noBias(){return new N0n(this)}}rh.Arbitrary=$M;let C0n=class fH extends $M{constructor(t,n){super(),this.arb=t,this.fmapper=n}generate(t){const n=t.clone(),r=this.arb.generate(t),i=this.fmapper(r.value).generate(t);return fH.shrinkChain(n,r,i,this.fmapper)}withBias(t){return this.arb.withBias(t).chain(n=>this.fmapper(n).withBias(t))}static shrinkChain(t,n,r,i){return new $He.Shrinkable(r.value,()=>n.shrink().map(a=>fH.shrinkChain(t.clone(),a,i(a.value).generate(t.clone()),i)).join(r.shrink()))}},P0n=class extends $M{constructor(t,n){super(),this.arb=t,this.mapper=n}generate(t){return this.arb.generate(t).map(this.mapper)}withBias(t){return this.arb.withBias(t).map(this.mapper)}},F0n=class extends $M{constructor(t,n){super(),this.arb=t,this.refinement=n}generate(t){let n=this.arb.generate(t);for(;!this.refinementOnShrinkable(n);)n=this.arb.generate(t);return n.filter(this.refinement)}withBias(t){return this.arb.withBias(t).filter(this.refinement)}refinementOnShrinkable(t){return this.refinement(t.value)}},W0n=class extends $M{constructor(t){super(),this.arb=t}generate(t){return new $He.Shrinkable(this.arb.generate(t).value)}withBias(t){return this.arb.withBias(t).noShrink()}},N0n=class extends $M{constructor(t){super(),this.arb=t}generate(t){return this.arb.generate(t)}};function j0n(e){if(typeof e!="object"||e===null||!("generate"in e))throw new Error("Unexpected value received: not an instance of Arbitrary")}rh.assertIsArbitrary=j0n;var $O={},PN={};Object.defineProperty(PN,"__esModule",{value:!0});PN.ArbitraryWithContextualShrink=void 0;const k0n=rh,C0e=Sv;function U0n(e){return e[0]}class q0n extends k0n.Arbitrary{contextualShrinkableFor(t,n){return new C0e.Shrinkable(t,()=>this.contextualShrink(t,n).map(r=>this.contextualShrinkableFor(r[0],r[1])))}shrink(t,n){const r=n===!0?this.shrunkOnceContext():void 0;return this.contextualShrink(t,r).map(U0n)}shrinkableFor(t,n){return new C0e.Shrinkable(t,()=>this.shrink(t,n).map(r=>this.shrinkableFor(r,!0)))}}PN.ArbitraryWithContextualShrink=q0n;var Fy={},$r={},Tr={};Object.defineProperty(Tr,"__esModule",{value:!0});Tr.NextValue=void 0;const P0e=Do;class x0n{constructor(t,n,r=void 0){this.value_=t,this.context=n,this.hasToBeCloned=r!==void 0||(0,P0e.hasCloneMethod)(t),this.readOnce=!1,this.hasToBeCloned?Object.defineProperty(this,"value",{get:r!==void 0?r:this.getValue}):this.value=t}getValue(){return this.hasToBeCloned?this.readOnce?this.value_[P0e.cloneMethod]():(this.readOnce=!0,this.value_):this.value_}}Tr.NextValue=x0n;Object.defineProperty($r,"__esModule",{value:!0});$r.assertIsNextArbitrary=$r.NextArbitrary=void 0;const $q=Rn,F0e=Do,sH=Tr;class IM{filter(t){return new B0n(this,t)}map(t,n){return new L0n(this,t,n)}chain(t){return new D0n(this,t)}noShrink(){return new V0n(this)}noBias(){return new z0n(this)}}$r.NextArbitrary=IM;class D0n extends IM{constructor(t,n){super(),this.arb=t,this.chainer=n}generate(t,n){const r=t.clone(),i=this.arb.generate(t,n);return this.valueChainer(i,t,r,n)}canShrinkWithoutContext(t){return!1}shrink(t,n){return this.isSafeContext(n)?(n.stoppedForOriginal?$q.Stream.nil():this.arb.shrink(n.originalValue,n.originalContext).map(r=>this.valueChainer(r,n.clonedMrng.clone(),n.clonedMrng,n.originalBias))).join(n.chainedArbitrary.shrink(t,n.chainedContext).map(r=>{const i=Object.assign(Object.assign({},n),{chainedContext:r.context,stoppedForOriginal:!0});return new sH.NextValue(r.value_,i)})):$q.Stream.nil()}valueChainer(t,n,r,i){const a=this.chainer(t.value_),o=a.generate(n,i),u={originalBias:i,originalValue:t.value_,originalContext:t.context,stoppedForOriginal:!1,chainedArbitrary:a,chainedContext:o.context,clonedMrng:r};return new sH.NextValue(o.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}}class L0n extends IM{constructor(t,n,r){super(),this.arb=t,this.mapper=n,this.unmapper=r,this.bindValueMapper=this.valueMapper.bind(this)}generate(t,n){const r=this.arb.generate(t,n);return this.valueMapper(r)}canShrinkWithoutContext(t){if(this.unmapper!==void 0)try{const n=this.unmapper(t);return this.arb.canShrinkWithoutContext(n)}catch{return!1}return!1}shrink(t,n){if(this.isSafeContext(n))return this.arb.shrink(n.originalValue,n.originalContext).map(this.bindValueMapper);if(this.unmapper!==void 0){const r=this.unmapper(t);return this.arb.shrink(r,void 0).map(this.bindValueMapper)}return $q.Stream.nil()}mapperWithCloneIfNeeded(t){const n=t.value,r=this.mapper(n);return t.hasToBeCloned&&(typeof r=="object"&&r!==null||typeof r=="function")&&Object.isExtensible(r)&&!(0,F0e.hasCloneMethod)(r)&&Object.defineProperty(r,F0e.cloneMethod,{get:()=>()=>this.mapperWithCloneIfNeeded(t)[0]}),[r,n]}valueMapper(t){const[n,r]=this.mapperWithCloneIfNeeded(t),i={originalValue:r,originalContext:t.context};return new sH.NextValue(n,i)}isSafeContext(t){return t!=null&&typeof t=="object"&&"originalValue"in t&&"originalContext"in t}}class B0n extends IM{constructor(t,n){super(),this.arb=t,this.refinement=n,this.bindRefinementOnValue=this.refinementOnValue.bind(this)}generate(t,n){for(;;){const r=this.arb.generate(t,n);if(this.refinementOnValue(r))return r}}canShrinkWithoutContext(t){return this.arb.canShrinkWithoutContext(t)&&this.refinement(t)}shrink(t,n){return this.arb.shrink(t,n).filter(this.bindRefinementOnValue)}refinementOnValue(t){return this.refinement(t.value)}}class V0n extends IM{constructor(t){super(),this.arb=t}generate(t,n){return this.arb.generate(t,n)}canShrinkWithoutContext(t){return this.arb.canShrinkWithoutContext(t)}shrink(t,n){return $q.Stream.nil()}noShrink(){return this}}class z0n extends IM{constructor(t){super(),this.arb=t}generate(t,n){return this.arb.generate(t,void 0)}canShrinkWithoutContext(t){return this.arb.canShrinkWithoutContext(t)}shrink(t,n){return this.arb.shrink(t,n)}noBias(){return this}}function K0n(e){if(typeof e!="object"||e===null||!("generate"in e)||!("shrink"in e)||"shrinkableFor"in e)throw new Error("Unexpected value received: not an instance of NextArbitrary")}$r.assertIsNextArbitrary=K0n;var W0e;function Ise(){if(W0e)return Fy;W0e=1;var e;Object.defineProperty(Fy,"__esModule",{value:!0}),Fy.ConverterToNext=Fy.fromShrinkableToNextValue=void 0;const t=Rn,n=IHe(),r=$r,i=Tr,a="__ConverterToNext__";function o(c){return c.hasToBeCloned?new i.NextValue(c.value_,c,()=>c.value):new i.NextValue(c.value_,c)}Fy.fromShrinkableToNextValue=o;let u=class am extends r.NextArbitrary{constructor(f){super(),this.arb=f,this[e]=!0}static isConverterToNext(f){return a in f}static convertIfNeeded(f){return n.ConverterFromNext.isConverterFromNext(f)?f.arb:new am(f)}generate(f,s){const l=s!==void 0?this.arb.withBias(s).generate(f):this.arb.generate(f);return o(l)}canShrinkWithoutContext(f){return!1}shrink(f,s){return this.isSafeContext(s)?s.shrink().map(o):t.Stream.nil()}isSafeContext(f){return f!=null&&typeof f=="object"&&"value"in f&&"shrink"in f}filter(f){return am.convertIfNeeded(this.arb.filter(f))}map(f){return am.convertIfNeeded(this.arb.map(f))}chain(f){return am.convertIfNeeded(this.arb.chain(s=>{const l=f(s);return am.isConverterToNext(l)?l.arb:new n.ConverterFromNext(l)}))}noShrink(){return am.convertIfNeeded(this.arb.noShrink())}noBias(){return am.convertIfNeeded(this.arb.noBias())}};return Fy.ConverterToNext=u,e=a,Fy}var N0e;function IHe(){if(N0e)return $O;N0e=1;var e;Object.defineProperty($O,"__esModule",{value:!0}),$O.ConverterFromNext=void 0;const t=PN,n=Ise(),r=Sv,i="__ConverterFromNext__";function a(u){return function c(f){const s=f.value_,l=()=>u.shrink(s,f.context).map(c);return f.hasToBeCloned?new r.Shrinkable(s,l,()=>f.value):new r.Shrinkable(s,l)}}let o=class Cp extends t.ArbitraryWithContextualShrink{constructor(c,f,s=void 0){super(),this.arb=c,this.legacyShrunkOnceContext=f,this.biasFactor=s,this[e]=!0,this.toShrinkable=a(c)}static isConverterFromNext(c){return i in c}static convertIfNeeded(c){return n.ConverterToNext.isConverterToNext(c)?c.arb:new Cp(c)}generate(c){const f=this.arb.generate(c,this.biasFactor);return this.toShrinkable(f)}contextualShrink(c,f){return this.arb.shrink(c,f).map(s=>[s.value_,s.context])}shrunkOnceContext(){return this.legacyShrunkOnceContext}filter(c){return Cp.convertIfNeeded(this.arb.filter(c))}map(c){return Cp.convertIfNeeded(this.arb.map(c))}chain(c){return Cp.convertIfNeeded(this.arb.chain(f=>{const s=c(f);return Cp.isConverterFromNext(s)?s.arb:new n.ConverterToNext(s)}))}noShrink(){return Cp.convertIfNeeded(this.arb.noShrink())}withBias(c){return new Cp(this.arb,this.legacyShrunkOnceContext,c)}noBias(){return Cp.convertIfNeeded(this.arb.noBias())}};return $O.ConverterFromNext=o,e=i,$O}Object.defineProperty(Ye,"__esModule",{value:!0});Ye.convertToNext=Ye.convertFromNextWithShrunkOnce=Ye.convertFromNext=void 0;const G0n=rh,_se=IHe(),Sse=Ise(),_He=$r;function H0n(e){return Sse.ConverterToNext.isConverterToNext(e)?e.arb:((0,_He.assertIsNextArbitrary)(e),new _se.ConverterFromNext(e))}Ye.convertFromNext=H0n;function J0n(e,t){if(Sse.ConverterToNext.isConverterToNext(e)){if(!("contextualShrink"in e.arb)||!("contextualShrinkableFor"in e.arb)||!("shrunkOnceContext"in e.arb)||!("shrink"in e.arb)||!("shrinkableFor"in e.arb))throw new Error("Conversion rejected: Underlying arbitrary is not compatible with ArbitraryWithContextualShrink");return e.arb}return(0,_He.assertIsNextArbitrary)(e),new _se.ConverterFromNext(e,t)}Ye.convertFromNextWithShrunkOnce=J0n;function Y0n(e){return _se.ConverterFromNext.isConverterFromNext(e)?e.arb:((0,G0n.assertIsArbitrary)(e),new Sse.ConverterToNext(e))}Ye.convertToNext=Y0n;var FN={};Object.defineProperty(FN,"__esModule",{value:!0});FN.TupleArbitrary=void 0;const Z0n=Rn,j0e=Do,X0n=$r,k0e=Tr;class Z1 extends X0n.NextArbitrary{constructor(t){super(),this.arbs=t;for(let n=0;n!==t.length;++n){const r=t[n];if(r==null||r.generate==null)throw new Error(`Invalid parameter encountered at index ${n}: expecting an Arbitrary`)}}static makeItCloneable(t,n){return Object.defineProperty(t,j0e.cloneMethod,{value:()=>{const r=[];for(let i=0;i!==n.length;++i)r.push(n[i].value);return Z1.makeItCloneable(r,n),r}})}static wrapper(t){let n=!1;const r=[],i=[];for(let a=0;a!==t.length;++a){const o=t[a];n=n||o.hasToBeCloned,r.push(o.value),i.push(o.context)}return n&&Z1.makeItCloneable(r,t),new k0e.NextValue(r,i)}generate(t,n){return Z1.wrapper(this.arbs.map(r=>r.generate(t,n)))}canShrinkWithoutContext(t){if(!Array.isArray(t)||t.length!==this.arbs.length)return!1;for(let n=0;n!==this.arbs.length;++n)if(!this.arbs[n].canShrinkWithoutContext(t[n]))return!1;return!0}shrink(t,n){let r=Z0n.Stream.nil();const i=Array.isArray(n)?n:[];for(let a=0;a!==this.arbs.length;++a){const o=this.arbs[a].shrink(t[a],i[a]).map(u=>{const c=t.map((f,s)=>new k0e.NextValue((0,j0e.cloneIfNeeded)(f),i[s]));return c.slice(0,a).concat([u]).concat(c.slice(a+1))}).map(u=>Z1.wrapper(u));r=r.join(o)}return r}}FN.TupleArbitrary=Z1;Object.defineProperty(bM,"__esModule",{value:!0});bM.genericTuple=void 0;const U0e=Ye,Q0n=FN;function e$n(e){const t=e.map(n=>(0,U0e.convertToNext)(n));return(0,U0e.convertFromNext)(new Q0n.TupleArbitrary(t))}bM.genericTuple=e$n;var hc={},iV={},SHe;Object.defineProperty(iV,"__esModule",{value:!0});iV.ConverterFromNextProperty=void 0;const q0e=Sv,wHe="__ConverterFromNextProperty__";function t$n(e){return function t(n){const r=()=>e.shrink(n).map(t);return n.hasToBeCloned?new q0e.Shrinkable(n.value_,r,()=>n.value):new q0e.Shrinkable(n.value_,r)}}class n$n{constructor(t){this.property=t,this[SHe]=!0,this.toShrinkable=t$n(t)}static isConverterFromNext(t){return wHe in t}isAsync(){return this.property.isAsync()}generate(t,n){const r=this.property.generate(t,n);return this.toShrinkable(r)}run(t){return this.property.run(t)}}iV.ConverterFromNextProperty=n$n;SHe=wHe;var aV={},AHe;Object.defineProperty(aV,"__esModule",{value:!0});aV.ConverterToNextProperty=void 0;const r$n=Rn,x0e=Ise(),MHe="__ConverterToNextProperty__";class i$n{constructor(t){this.property=t,this[AHe]=!0}static isConverterToNext(t){return MHe in t}isAsync(){return this.property.isAsync()}generate(t,n){const r=this.property.generate(t,n);return(0,x0e.fromShrinkableToNextValue)(r)}shrink(t){return this.isSafeContext(t.context)?t.context.shrink().map(x0e.fromShrinkableToNextValue):r$n.Stream.nil()}isSafeContext(t){return t!=null&&typeof t=="object"&&"value"in t&&"shrink"in t}run(t){return this.property.run(t)}}aV.ConverterToNextProperty=i$n;AHe=MHe;Object.defineProperty(hc,"__esModule",{value:!0});hc.convertFromNextAsyncPropertyWithHooks=hc.convertFromNextPropertyWithHooks=hc.convertToNextProperty=hc.convertFromNextProperty=void 0;const RHe=iV,OHe=aV;function wse(e){return OHe.ConverterToNextProperty.isConverterToNext(e)?e.property:new RHe.ConverterFromNextProperty(e)}hc.convertFromNextProperty=wse;function a$n(e){return RHe.ConverterFromNextProperty.isConverterFromNext(e)?e.property:new OHe.ConverterToNextProperty(e)}hc.convertToNextProperty=a$n;function o$n(e){const t=wse(e);return Object.assign(t,{beforeEach(r){return e.beforeEach(r),t},afterEach(r){return e.afterEach(r),t}})}hc.convertFromNextPropertyWithHooks=o$n;function u$n(e){const t=wse(e);return Object.assign(t,{beforeEach(r){return e.beforeEach(r),t},afterEach(r){return e.afterEach(r),t}})}hc.convertFromNextAsyncPropertyWithHooks=u$n;var oV={},WN={};Object.defineProperty(WN,"__esModule",{value:!0});WN.runIdToFrequency=void 0;const c$n=e=>2+Math.floor(Math.log(e+1)/Math.log(10));WN.runIdToFrequency=c$n;var gc={};Object.defineProperty(gc,"__esModule",{value:!0});gc.resetConfigureGlobal=gc.readConfigureGlobal=gc.configureGlobal=void 0;let Ase={};function f$n(e){Ase=e}gc.configureGlobal=f$n;function s$n(){return Ase}gc.readConfigureGlobal=s$n;function l$n(){Ase={}}gc.resetConfigureGlobal=l$n;var uV={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.noUndefinedAsContext=e.UndefinedContextPlaceholder=void 0;const t=Tr;e.UndefinedContextPlaceholder=Symbol("UndefinedContextPlaceholder");function n(r){return r.context!==void 0?r:r.hasToBeCloned?new t.NextValue(r.value_,e.UndefinedContextPlaceholder,()=>r.value):new t.NextValue(r.value_,e.UndefinedContextPlaceholder)}e.noUndefinedAsContext=n})(uV);Object.defineProperty(oV,"__esModule",{value:!0});oV.AsyncProperty=void 0;const d$n=_v,p$n=WN,h$n=gc,v$n=Rn,m$n=Ye,M7=uV;class uT{constructor(t,n){this.predicate=n;const{asyncBeforeEach:r,asyncAfterEach:i,beforeEach:a,afterEach:o}=(0,h$n.readConfigureGlobal)()||{};if(r!==void 0&&a!==void 0)throw Error(`Global "asyncBeforeEach" and "beforeEach" parameters can't be set at the same time when running async properties`);if(i!==void 0&&o!==void 0)throw Error(`Global "asyncAfterEach" and "afterEach" parameters can't be set at the same time when running async properties`);this.beforeEachHook=r||a||uT.dummyHook,this.afterEachHook=i||o||uT.dummyHook,this.arb=(0,m$n.convertToNext)(t)}isAsync(){return!0}generate(t,n){const r=this.arb.generate(t,n!=null?(0,p$n.runIdToFrequency)(n):void 0);return(0,M7.noUndefinedAsContext)(r)}shrink(t){if(t.context===void 0&&!this.arb.canShrinkWithoutContext(t.value_))return v$n.Stream.nil();const n=t.context!==M7.UndefinedContextPlaceholder?t.context:void 0;return this.arb.shrink(t.value_,n).map(M7.noUndefinedAsContext)}async run(t){await this.beforeEachHook();try{const n=await this.predicate(t);return n==null||n===!0?null:"Property failed by returning false"}catch(n){return d$n.PreconditionFailure.isFailure(n)?n:n instanceof Error&&n.stack?`${n} Stack trace: ${n.stack}`:`${n}`}finally{await this.afterEachHook()}}beforeEach(t){const n=this.beforeEachHook;return this.beforeEachHook=()=>t(n),this}afterEach(t){const n=this.afterEachHook;return this.afterEachHook=()=>t(n),this}}oV.AsyncProperty=uT;uT.dummyHook=()=>{};var NN={};Object.defineProperty(NN,"__esModule",{value:!0});NN.AlwaysShrinkableArbitrary=void 0;const g$n=$r,y$n=Rn,R7=uV;class b$n extends g$n.NextArbitrary{constructor(t){super(),this.arb=t}generate(t,n){const r=this.arb.generate(t,n);return(0,R7.noUndefinedAsContext)(r)}canShrinkWithoutContext(t){return!0}shrink(t,n){if(n===void 0&&!this.arb.canShrinkWithoutContext(t))return y$n.Stream.nil();const r=n!==R7.UndefinedContextPlaceholder?n:void 0;return this.arb.shrink(t,r).map(R7.noUndefinedAsContext)}}NN.AlwaysShrinkableArbitrary=b$n;Object.defineProperty(rV,"__esModule",{value:!0});rV.asyncProperty=void 0;const $$n=bM,I$n=hc,_$n=oV,S$n=NN,D0e=Ye;function w$n(...e){if(e.length<2)throw new Error("asyncProperty expects at least two parameters");const t=e.slice(0,e.length-1),n=e[e.length-1];return(0,I$n.convertFromNextAsyncPropertyWithHooks)(new _$n.AsyncProperty((0,$$n.genericTuple)(t.map(r=>(0,D0e.convertFromNext)(new S$n.AlwaysShrinkableArbitrary((0,D0e.convertToNext)(r))))),r=>n(...r)))}rV.asyncProperty=w$n;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.asyncProperty=void 0;const t=rV;Object.defineProperty(e,"asyncProperty",{enumerable:!0,get:function(){return t.asyncProperty}})})(bHe);var EHe={},cV={},jN={};Object.defineProperty(jN,"__esModule",{value:!0});jN.Property=void 0;const A$n=_v,M$n=WN,R$n=gc,O$n=Ye,E$n=Rn,O7=uV;class cT{constructor(t,n){this.predicate=n;const{beforeEach:r=cT.dummyHook,afterEach:i=cT.dummyHook,asyncBeforeEach:a,asyncAfterEach:o}=(0,R$n.readConfigureGlobal)()||{};if(a!==void 0)throw Error(`"asyncBeforeEach" can't be set when running synchronous properties`);if(o!==void 0)throw Error(`"asyncAfterEach" can't be set when running synchronous properties`);this.beforeEachHook=r,this.afterEachHook=i,this.arb=(0,O$n.convertToNext)(t)}isAsync(){return!1}generate(t,n){const r=this.arb.generate(t,n!=null?(0,M$n.runIdToFrequency)(n):void 0);return(0,O7.noUndefinedAsContext)(r)}shrink(t){if(t.context===void 0&&!this.arb.canShrinkWithoutContext(t.value_))return E$n.Stream.nil();const n=t.context!==O7.UndefinedContextPlaceholder?t.context:void 0;return this.arb.shrink(t.value_,n).map(O7.noUndefinedAsContext)}run(t){this.beforeEachHook();try{const n=this.predicate(t);return n==null||n===!0?null:"Property failed by returning false"}catch(n){return A$n.PreconditionFailure.isFailure(n)?n:n instanceof Error&&n.stack?`${n} Stack trace: ${n.stack}`:`${n}`}finally{this.afterEachHook()}}beforeEach(t){const n=this.beforeEachHook;return this.beforeEachHook=()=>t(n),this}afterEach(t){const n=this.afterEachHook;return this.afterEachHook=()=>t(n),this}}jN.Property=cT;cT.dummyHook=()=>{};Object.defineProperty(cV,"__esModule",{value:!0});cV.property=void 0;const T$n=bM,C$n=hc,P$n=jN,F$n=NN,L0e=Ye;function W$n(...e){if(e.length<2)throw new Error("property expects at least two parameters");const t=e.slice(0,e.length-1),n=e[e.length-1];return(0,C$n.convertFromNextPropertyWithHooks)(new P$n.Property((0,T$n.genericTuple)(t.map(r=>(0,L0e.convertFromNext)(new F$n.AlwaysShrinkableArbitrary((0,L0e.convertToNext)(r))))),r=>n(...r)))}cV.property=W$n;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.property=void 0;const t=cV;Object.defineProperty(e,"property",{enumerable:!0,get:function(){return t.property}})})(EHe);var w_={},kN={},fV={},xt={},Hl={};Hl.__esModule=!0;Hl.skipN=Hl.unsafeSkipN=Hl.generateN=Hl.unsafeGenerateN=void 0;function THe(e,t){for(var n=[],r=0;r!=t;++r)n.push(e.unsafeNext());return n}Hl.unsafeGenerateN=THe;function N$n(e,t){var n=e.clone(),r=THe(n,t);return[r,n]}Hl.generateN=N$n;function CHe(e,t){for(var n=0;n!=t;++n)e.unsafeNext()}Hl.unsafeSkipN=CHe;function j$n(e,t){var n=e.clone();return CHe(n,t),n}Hl.skipN=j$n;var A_={};A_.__esModule=!0;A_.congruential32=A_.congruential=void 0;var k$n=214013,U$n=2531011,q$n=4294967295,x$n=(1<<31)-1,b2=function(e){return e*k$n+U$n&q$n},$2=function(e){return(e&x$n)>>16},D$n=function(){function e(t){this.seed=t}return e.prototype.min=function(){return e.min},e.prototype.max=function(){return e.max},e.prototype.clone=function(){return new e(this.seed)},e.prototype.next=function(){var t=new e(this.seed),n=t.unsafeNext();return[n,t]},e.prototype.unsafeNext=function(){return this.seed=b2(this.seed),$2(this.seed)},e.min=0,e.max=Math.pow(2,15)-1,e}(),L$n=function(){function e(t){this.seed=t}return e.prototype.min=function(){return e.min},e.prototype.max=function(){return e.max},e.prototype.clone=function(){return new e(this.seed)},e.prototype.next=function(){var t=new e(this.seed),n=t.unsafeNext();return[n,t]},e.prototype.unsafeNext=function(){var t=b2(this.seed),n=$2(t),r=b2(t),i=$2(r);this.seed=b2(r);var a=$2(this.seed),o=a+(i+(n<<15)<<15);return(o+2147483648|0)+2147483648},e.min=0,e.max=4294967295,e}(),B$n=function(e){return new D$n(e)};A_.congruential=B$n;var V$n=function(e){return new L$n(e)};A_.congruential32=V$n;var PHe={};(function(e){e.__esModule=!0;var t=function(){function r(i,a){this.states=i,this.index=a}return r.twist=function(i){for(var a=i.slice(),o=0;o!==r.N-r.M;++o){var u=(a[o]&r.MASK_UPPER)+(a[o+1]&r.MASK_LOWER);a[o]=a[o+r.M]^u>>>1^-(u&1)&r.A}for(var o=r.N-r.M;o!==r.N-1;++o){var c=(a[o]&r.MASK_UPPER)+(a[o+1]&r.MASK_LOWER);a[o]=a[o+r.M-r.N]^c>>>1^-(c&1)&r.A}var f=(a[r.N-1]&r.MASK_UPPER)+(a[0]&r.MASK_LOWER);return a[r.N-1]=a[r.M-1]^f>>>1^-(f&1)&r.A,a},r.seeded=function(i){var a=Array(r.N);a[0]=i;for(var o=1;o!==r.N;++o){var u=a[o-1]^a[o-1]>>>30;a[o]=Math.imul(r.F,u)+o|0}return a},r.from=function(i){return new r(r.twist(r.seeded(i)),0)},r.prototype.min=function(){return r.min},r.prototype.max=function(){return r.max},r.prototype.clone=function(){return new r(this.states,this.index)},r.prototype.next=function(){var i=new r(this.states,this.index),a=i.unsafeNext();return[a,i]},r.prototype.unsafeNext=function(){var i=this.states[this.index];return i^=this.states[this.index]>>>r.U,i^=i<>>r.L,++this.index>=r.N&&(this.states=r.twist(this.states),this.index=0),i>>>0},r.min=0,r.max=4294967295,r.N=624,r.M=397,r.R=31,r.A=2567483615,r.F=1812433253,r.U=11,r.S=7,r.B=2636928640,r.T=15,r.C=4022730752,r.L=18,r.MASK_LOWER=Math.pow(2,r.R)-1,r.MASK_UPPER=Math.pow(2,r.R),r}();function n(r){return t.from(r)}e.default=n})(PHe);var sV={};sV.__esModule=!0;sV.xorshift128plus=void 0;var z$n=function(){function e(t,n,r,i){this.s01=t,this.s00=n,this.s11=r,this.s10=i}return e.prototype.min=function(){return-2147483648},e.prototype.max=function(){return 2147483647},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),n=t.unsafeNext();return[n,t]},e.prototype.unsafeNext=function(){var t=this.s00^this.s00<<23,n=this.s01^(this.s01<<23|this.s00>>>9),r=t^this.s10^(t>>>18|n<<14)^(this.s10>>>5|this.s11<<27),i=n^this.s11^n>>>18^this.s11>>>5,a=this.s00+this.s10|0;return this.s01=this.s11,this.s00=this.s10,this.s11=i,this.s10=r,a},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,n=0,r=0,i=0,a=[1667051007,2321340297,1548169110,304075285],o=0;o!==4;++o)for(var u=1;u;u<<=1)a[o]&u&&(t^=this.s01,n^=this.s00,r^=this.s11,i^=this.s10),this.unsafeNext();this.s01=t,this.s00=n,this.s11=r,this.s10=i},e}(),K$n=function(e){return new z$n(-1,~e,e|0,0)};sV.xorshift128plus=K$n;var lV={};lV.__esModule=!0;lV.xoroshiro128plus=void 0;var G$n=function(){function e(t,n,r,i){this.s01=t,this.s00=n,this.s11=r,this.s10=i}return e.prototype.min=function(){return-2147483648},e.prototype.max=function(){return 2147483647},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),n=t.unsafeNext();return[n,t]},e.prototype.unsafeNext=function(){var t=this.s00+this.s10|0,n=this.s10^this.s00,r=this.s11^this.s01,i=this.s00,a=this.s01;return this.s00=i<<24^a>>>8^n^n<<16,this.s01=a<<24^i>>>8^r^(r<<16|n>>>16),this.s10=r<<5^n>>>27,this.s11=n<<5^r>>>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,n=0,r=0,i=0,a=[3639956645,3750757012,1261568508,386426335],o=0;o!==4;++o)for(var u=1;u;u<<=1)a[o]&u&&(t^=this.s01,n^=this.s00,r^=this.s11,i^=this.s10),this.unsafeNext();this.s01=t,this.s00=n,this.s11=r,this.s10=i},e}(),H$n=function(e){return new G$n(-1,~e,e|0,0)};lV.xoroshiro128plus=H$n;var dV={},UN={},Zo={};Zo.__esModule=!0;Zo.substractArrayInt64=Zo.fromNumberToArrayInt64=Zo.trimArrayIntInplace=Zo.substractArrayIntToNew=Zo.addOneToPositiveArrayInt=Zo.addArrayIntToNew=void 0;function FHe(e,t){if(e.sign!==t.sign)return Mse(e,{sign:-t.sign,data:t.data});for(var n=[],r=0,i=e.data,a=t.data,o=i.length-1,u=a.length-1;o>=0||u>=0;--o,--u){var c=o>=0?i[o]:0,f=u>=0?a[u]:0,s=c+f+r;n.push(s>>>0),r=~~(s/4294967296)}return r!==0&&n.push(r),{sign:e.sign,data:n.reverse()}}Zo.addArrayIntToNew=FHe;function J$n(e){e.sign=1;for(var t=e.data,n=t.length-1;n>=0;--n)if(t[n]===4294967295)t[n]=0;else return t[n]+=1,e;return t.unshift(1),e}Zo.addOneToPositiveArrayInt=J$n;function Y$n(e,t){for(var n=Math.max(e.length,t.length),r=0;r=0?e[i]:0,u=a>=0?t[a]:0;if(ou)return!1}return!1}function Mse(e,t){if(e.sign!==t.sign)return FHe(e,{sign:-t.sign,data:t.data});var n=e.data,r=t.data;if(Y$n(n,r)){var i=Mse(t,e);return i.sign=-i.sign,i}for(var a=[],o=0,u=n.length-1,c=r.length-1;u>=0||c>=0;--u,--c){var f=u>=0?n[u]:0,s=c>=0?r[c]:0,l=f-s-o;a.push(l>>>0),o=l<0?1:0}return{sign:e.sign,data:a.reverse()}}Zo.substractArrayIntToNew=Mse;function Z$n(e){for(var t=e.data,n=0;n!==t.length&&t[n]===0;++n);return n===t.length?(e.sign=1,e.data=[0],e):(t.splice(0,n),e)}Zo.trimArrayIntInplace=Z$n;function X$n(e,t){if(t<0){var n=-t;e.sign=-1,e.data[0]=~~(n/4294967296),e.data[1]=n>>>0}else e.sign=1,e.data[0]=~~(t/4294967296),e.data[1]=t>>>0;return e}Zo.fromNumberToArrayInt64=X$n;function Q$n(e,t,n){var r=t.data[1],i=t.data[0],a=t.sign,o=n.data[1],u=n.data[0],c=n.sign;if(e.sign=1,a===1&&c===-1){var f=r+o,s=i+u+(f>4294967295?1:0);return e.data[0]=s>>>0,e.data[1]=f>>>0,e}var l=r,d=i,p=o,v=u;a===-1&&(l=o,d=u,p=r,v=i);var h=0,$=l-p;return $<0&&(h=1,$=$>>>0),e.data[0]=d-v-h,e.data[1]=$,e}Zo.substractArrayInt64=Q$n;var qN={},xN={};xN.__esModule=!0;xN.unsafeUniformIntDistributionInternal=void 0;function e1n(e,t){var n=t.min(),r=t.max()-t.min()+1;if(e<=r)for(var i=t,a=r-r%e;;){var o=i.unsafeNext(),u=o-n;if(uc)break}}}qN.unsafeUniformArrayIntDistributionInternal=n1n;UN.__esModule=!0;UN.unsafeUniformArrayIntDistribution=void 0;var IO=Zo,r1n=qN;function i1n(e,t,n){var r=(0,IO.trimArrayIntInplace)((0,IO.addOneToPositiveArrayInt)((0,IO.substractArrayIntToNew)(t,e))),i=r.data.slice(0),a=(0,r1n.unsafeUniformArrayIntDistributionInternal)(i,r.data,n);return(0,IO.trimArrayIntInplace)((0,IO.addArrayIntToNew)({sign:1,data:a},e))}UN.unsafeUniformArrayIntDistribution=i1n;dV.__esModule=!0;dV.uniformArrayIntDistribution=void 0;var B0e=UN;function a1n(e,t,n){if(n!=null){var r=n.clone();return[(0,B0e.unsafeUniformArrayIntDistribution)(e,t,r),r]}return function(i){var a=i.clone();return[(0,B0e.unsafeUniformArrayIntDistribution)(e,t,a),a]}}dV.uniformArrayIntDistribution=a1n;var pV={},DN={};DN.__esModule=!0;DN.unsafeUniformBigIntDistribution=void 0;var Wy=typeof BigInt<"u"?BigInt:void 0;function o1n(e,t,n){for(var r=t-e+Wy(1),i=Wy(n.min()),a=Wy(n.max()-n.min()+1),o=a,u=Wy(1);o{console.log(r)}),this.path=rr.readOrDefault(n,"path",""),this.unbiased=rr.readBoolean(n,"unbiased"),this.examples=rr.readOrDefault(n,"examples",[]),this.endOnFailure=rr.readBoolean(n,"endOnFailure"),this.reporter=rr.readOrDefault(n,"reporter",null),this.asyncReporter=rr.readOrDefault(n,"asyncReporter",null)}toParameters(){const t=n=>n!==null?n:void 0;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)}}static read(t){return new rr(t)}}kN.QualifiedParameters=rr;rr.readSeed=e=>{if(e.seed==null)return Date.now()^Math.random()*4294967296;const t=e.seed|0;if(e.seed===t)return t;const n=e.seed-t;return t^n*4294967296};rr.readRandomType=e=>{if(e.randomType==null)return T1.default.xorshift128plus;if(typeof e.randomType=="string")switch(e.randomType){case"mersenne":return T1.default.mersenne;case"congruential":return T1.default.congruential;case"congruential32":return T1.default.congruential32;case"xorshift128plus":return T1.default.xorshift128plus;case"xoroshiro128plus":return T1.default.xoroshiro128plus;default:throw new Error(`Invalid random specified: '${e.randomType}'`)}return e.randomType};rr.readNumRuns=e=>e.numRuns!=null?e.numRuns:e.num_runs!=null?e.num_runs:100;rr.readVerbose=e=>e.verbose==null?Ny.VerbosityLevel.None:typeof e.verbose=="boolean"?e.verbose===!0?Ny.VerbosityLevel.Verbose:Ny.VerbosityLevel.None:e.verbose<=Ny.VerbosityLevel.None?Ny.VerbosityLevel.None:e.verbose>=Ny.VerbosityLevel.VeryVerbose?Ny.VerbosityLevel.VeryVerbose:e.verbose|0;rr.readBoolean=(e,t)=>e[t]===!0;rr.readOrDefault=(e,t,n)=>{const r=e[t];return r??n};var mV={},gV={};Object.defineProperty(gV,"__esModule",{value:!0});gV.SkipAfterProperty=void 0;const O1n=_v;class E1n{constructor(t,n,r,i){this.property=t,this.getTime=n,this.interruptExecution=i,this.skipAfterTime=this.getTime()+r}isAsync(){return this.property.isAsync()}generate(t,n){return this.property.generate(t,n)}shrink(t){return this.property.shrink(t)}run(t){if(this.getTime()>=this.skipAfterTime){const n=new O1n.PreconditionFailure(this.interruptExecution);return this.isAsync()?Promise.resolve(n):n}return this.property.run(t)}}gV.SkipAfterProperty=E1n;var yV={};Object.defineProperty(yV,"__esModule",{value:!0});yV.TimeoutProperty=void 0;const T1n=e=>{let t=null;const n=new Promise(r=>{t=setTimeout(()=>{r(`Property timeout: exceeded limit of ${e} milliseconds`)},e)});return{clear:()=>clearTimeout(t),promise:n}};class C1n{constructor(t,n){this.property=t,this.timeMs=n}isAsync(){return!0}generate(t,n){return this.property.generate(t,n)}shrink(t){return this.property.shrink(t)}async run(t){const n=T1n(this.timeMs),r=Promise.race([this.property.run(t),n.promise]);return r.then(n.clear,n.clear),r}}yV.TimeoutProperty=C1n;var VN={};Object.defineProperty(VN,"__esModule",{value:!0});VN.UnbiasedProperty=void 0;class P1n{constructor(t){this.property=t}isAsync(){return this.property.isAsync()}generate(t,n){return this.property.generate(t,void 0)}shrink(t){return this.property.shrink(t)}run(t){return this.property.run(t)}}VN.UnbiasedProperty=P1n;var bV={},ep={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.asyncStringify=e.possiblyAsyncStringify=e.stringify=e.stringifyInternal=e.hasAsyncToStringMethod=e.asyncToStringMethod=e.hasToStringMethod=e.toStringMethod=void 0,e.toStringMethod=Symbol("fast-check/toStringMethod");function t(l){return l!==null&&(typeof l=="object"||typeof l=="function")&&e.toStringMethod in l&&typeof l[e.toStringMethod]=="function"}e.hasToStringMethod=t,e.asyncToStringMethod=Symbol("fast-check/asyncToStringMethod");function n(l){return l!==null&&(typeof l=="object"||typeof l=="function")&&e.asyncToStringMethod in l&&typeof l[e.asyncToStringMethod]=="function"}e.hasAsyncToStringMethod=n;const r=/^Symbol\((.*)\)$/;function i(l){if(l.description!==void 0)return l.description;const d=r.exec(String(l));return d&&d[1].length?d[1]:null}function a(l){switch(l){case 0:return 1/l===Number.NEGATIVE_INFINITY?"-0":"0";case Number.NEGATIVE_INFINITY:return"Number.NEGATIVE_INFINITY";case Number.POSITIVE_INFINITY:return"Number.POSITIVE_INFINITY";default:return l===l?String(l):"Number.NaN"}}function o(l){let d=-1;for(const p in l){const v=Number(p);if(v!==d+1)return!0;d=v}return d+1!==l.length}function u(l,d,p){const v=d.concat([l]);if(typeof l=="object"&&d.indexOf(l)!==-1)return"[cyclic]";if(n(l)){const h=p(l);if(h.state==="fulfilled")return h.value}if(t(l))try{return l[e.toStringMethod]()}catch{}switch(Object.prototype.toString.call(l)){case"[object Array]":{const h=l;if(h.length>=50&&o(h)){const b=[];for(const y in h)Number.isNaN(Number(y))||b.push(`${y}:${u(h[y],v,p)}`);return b.length!==0?`Object.assign(Array(${h.length}),{${b.join(",")}})`:`Array(${h.length})`}const $=h.map(b=>u(b,v,p)).join(",");return h.length===0||h.length-1 in h?`[${$}]`:`[${$},]`}case"[object BigInt]":return`${l}n`;case"[object Boolean]":return typeof l=="boolean"?JSON.stringify(l):`new Boolean(${JSON.stringify(l)})`;case"[object Date]":{const h=l;return Number.isNaN(h.getTime())?"new Date(NaN)":`new Date(${JSON.stringify(h.toISOString())})`}case"[object Map]":return`new Map(${u(Array.from(l),v,p)})`;case"[object Null]":return"null";case"[object Number]":return typeof l=="number"?a(l):`new Number(${a(Number(l))})`;case"[object Object]":{try{const y=l.toString;if(typeof y=="function"&&y!==Object.prototype.toString)return l.toString()}catch{return"[object Object]"}const h=y=>`${y==="__proto__"?'["__proto__"]':typeof y=="symbol"?`[${u(y,v,p)}]`:JSON.stringify(y)}:${u(l[y],v,p)}`,b="{"+[...Object.keys(l).map(h),...Object.getOwnPropertySymbols(l).filter(y=>{const m=Object.getOwnPropertyDescriptor(l,y);return m&&m.enumerable}).map(h)].join(",")+"}";return Object.getPrototypeOf(l)===null?b==="{}"?"Object.create(null)":`Object.assign(Object.create(null),${b})`:b}case"[object Set]":return`new Set(${u(Array.from(l),v,p)})`;case"[object String]":return typeof l=="string"?JSON.stringify(l):`new String(${JSON.stringify(l)})`;case"[object Symbol]":{const h=l;if(Symbol.keyFor(h)!==void 0)return`Symbol.for(${JSON.stringify(Symbol.keyFor(h))})`;const $=i(h);if($===null)return"Symbol()";const b=$.startsWith("Symbol.")&&Symbol[$.substring(7)];return h===b?$:`Symbol(${JSON.stringify($)})`}case"[object Promise]":{const h=p(l);switch(h.state){case"fulfilled":return`Promise.resolve(${u(h.value,v,p)})`;case"rejected":return`Promise.reject(${u(h.value,v,p)})`;case"pending":return"new Promise(() => {/*pending*/})";case"unknown":default:return"new Promise(() => {/*unknown*/})"}}case"[object Error]":if(l instanceof Error)return`new Error(${u(l.message,v,p)})`;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 Buffer<"u"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(l))return`Buffer.from(${u(Array.from(l.values()),v,p)})`;const h=Object.getPrototypeOf(l),$=h&&h.constructor&&h.constructor.name;if(typeof $=="string"){const y=l.values();return`${$}.from(${u(Array.from(y),v,p)})`}break}}try{return l.toString()}catch{return Object.prototype.toString.call(l)}}e.stringifyInternal=u;function c(l){return u(l,[],()=>({state:"unknown",value:void 0}))}e.stringify=c;function f(l){const d=Symbol(),p=[],v=new Map;function h(){let m=null;const g=()=>{m!==null&&clearTimeout(m)};return{delay:new Promise(I=>{m=setTimeout(()=>{m=null,I(d)},0)}),cancel:g}}const $={state:"unknown",value:void 0},b=function(g){const _=g;if(v.has(_))return v.get(_);const I=h(),A=e.asyncToStringMethod in g?Promise.resolve().then(()=>g[e.asyncToStringMethod]()):g;return A.catch(()=>{}),p.push(Promise.race([A,I.delay]).then(E=>{E===d?v.set(_,{state:"pending",value:void 0}):v.set(_,{state:"fulfilled",value:E}),I.cancel()},E=>{v.set(_,{state:"rejected",value:E}),I.cancel()})),v.set(_,$),$};function y(){const m=u(l,[],b);return p.length===0?m:Promise.all(p.splice(0)).then(y)}return y()}e.possiblyAsyncStringify=f;async function s(l){return Promise.resolve(f(l))}e.asyncStringify=s})(ep);Object.defineProperty(bV,"__esModule",{value:!0});bV.IgnoreEqualValuesProperty=void 0;const F1n=ep,W1n=_v;function G0e(e){return e===null?new W1n.PreconditionFailure:e}function N1n(...e){return e[1]?e[0].then(G0e):G0e(e[0])}function j1n(e,t){return N1n(e,t)}class k1n{constructor(t,n){this.property=t,this.skipRuns=n,this.coveredCases=new Map}isAsync(){return this.property.isAsync()}generate(t,n){return this.property.generate(t,n)}shrink(t){return this.property.shrink(t)}run(t){const n=(0,F1n.stringify)(t);if(this.coveredCases.has(n)){const i=this.coveredCases.get(n);return this.skipRuns?j1n(i,this.property.isAsync()):i}const r=this.property.run(t);return this.coveredCases.set(n,r),r}}bV.IgnoreEqualValuesProperty=k1n;Object.defineProperty(mV,"__esModule",{value:!0});mV.decorateProperty=void 0;const H0e=gV,U1n=yV,q1n=VN,J0e=bV,x1n=hc;function D1n(e,t){let n=(0,x1n.convertToNextProperty)(e);return e.isAsync()&&t.timeout!=null&&(n=new U1n.TimeoutProperty(n,t.timeout)),t.unbiased&&(n=new q1n.UnbiasedProperty(n)),t.skipAllAfterTimeLimit!=null&&(n=new H0e.SkipAfterProperty(n,Date.now,t.skipAllAfterTimeLimit,!1)),t.interruptAfterTimeLimit!=null&&(n=new H0e.SkipAfterProperty(n,Date.now,t.interruptAfterTimeLimit,!0)),t.skipEqualValues&&(n=new J0e.IgnoreEqualValuesProperty(n,!0)),t.ignoreEqualValues&&(n=new J0e.IgnoreEqualValuesProperty(n,!1)),n}mV.decorateProperty=D1n;var $V={},IV={},_V={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ExecutionStatus=void 0,function(t){t[t.Success=0]="Success",t[t.Skipped=-1]="Skipped",t[t.Failure=1]="Failure"}(e.ExecutionStatus||(e.ExecutionStatus={}))})(_V);Object.defineProperty(IV,"__esModule",{value:!0});IV.RunExecution=void 0;const T7=BN,IU=_V;class SV{constructor(t,n){this.verbosity=t,this.interruptedAsFailure=n,this.isSuccess=()=>this.pathToFailure==null,this.firstFailure=()=>this.pathToFailure?+this.pathToFailure.split(":")[0]:-1,this.numShrinks=()=>this.pathToFailure?this.pathToFailure.split(":").length-1:0,this.rootExecutionTrees=[],this.currentLevelExecutionTrees=this.rootExecutionTrees,this.failure=null,this.numSkips=0,this.numSuccesses=0,this.interrupted=!1}appendExecutionTree(t,n){const r={status:t,value:n,children:[]};return this.currentLevelExecutionTrees.push(r),r}fail(t,n,r){if(this.verbosity>=T7.VerbosityLevel.Verbose){const i=this.appendExecutionTree(IU.ExecutionStatus.Failure,t);this.currentLevelExecutionTrees=i.children}this.pathToFailure==null?this.pathToFailure=`${n}`:this.pathToFailure+=`:${n}`,this.value=t,this.failure=r}skip(t){this.verbosity>=T7.VerbosityLevel.VeryVerbose&&this.appendExecutionTree(IU.ExecutionStatus.Skipped,t),this.pathToFailure==null&&++this.numSkips}success(t){this.verbosity>=T7.VerbosityLevel.VeryVerbose&&this.appendExecutionTree(IU.ExecutionStatus.Success,t),this.pathToFailure==null&&++this.numSuccesses}interrupt(){this.interrupted=!0}extractFailures(){if(this.isSuccess())return[];const t=[];let n=this.rootExecutionTrees;for(;n.length>0&&n[n.length-1].status===IU.ExecutionStatus.Failure;){const r=n[n.length-1];t.push(r.value),n=r.children}return t}toRunDetails(t,n,r,i){return this.isSuccess()?{failed:this.numSkips>r||this.interrupted&&this.interruptedAsFailure,interrupted:this.interrupted,numRuns:this.numSuccesses,numSkips:this.numSkips,numShrinks:0,seed:t,counterexample:null,counterexamplePath:null,error:null,failures:[],executionSummary:this.rootExecutionTrees,verbose:this.verbosity,runConfiguration:i.toParameters()}:{failed:!0,interrupted:this.interrupted,numRuns:this.firstFailure()+1-this.numSkips,numSkips:this.numSkips,numShrinks:this.numShrinks(),seed:t,counterexample:this.value,counterexamplePath:SV.mergePaths(n,this.pathToFailure),error:this.failure,failures:this.extractFailures(),executionSummary:this.rootExecutionTrees,verbose:this.verbosity,runConfiguration:i.toParameters()}}}IV.RunExecution=SV;SV.mergePaths=(e,t)=>{if(e.length===0)return t;const n=e.split(":"),r=t.split(":"),i=+n[n.length-1]+ +r[0];return[...n.slice(0,n.length-1),`${i}`,...r.slice(1)].join(":")};Object.defineProperty($V,"__esModule",{value:!0});$V.RunnerIterator=void 0;const L1n=IV;class B1n{constructor(t,n,r,i){this.sourceValues=t,this.shrink=n,this.runExecution=new L1n.RunExecution(r,i),this.currentIdx=-1,this.nextValues=t}[Symbol.iterator](){return this}next(){const 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=="string"?(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_)}}$V.RunnerIterator=B1n;var wV={};Object.defineProperty(wV,"__esModule",{value:!0});wV.SourceValuesIterator=void 0;class V1n{constructor(t,n,r){this.initialValues=t,this.maxInitialIterations=n,this.remainingSkips=r}[Symbol.iterator](){return this}next(){if(--this.maxInitialIterations!==-1&&this.remainingSkips>=0){const t=this.initialValues.next();if(!t.done)return{value:t.value(),done:!1}}return{value:void 0,done:!0}}skippedOne(){--this.remainingSkips,++this.maxInitialIterations}}wV.SourceValuesIterator=V1n;var zN={},KN={},GN={};Object.defineProperty(GN,"__esModule",{value:!0});GN.convertToRandomGenerator=void 0;class dE{constructor(t){this.rng=t,typeof this.rng.jump=="function"&&(this.jump=function(){const r=this.jump();return new dE(r)},this.unsafeJump=function(){const r=this.jump();this.rng=r})}min(){return this.rng.min()}max(){return this.rng.max()}clone(){return new dE(this.rng)}next(){const t=this.rng.next();return[t[0],new dE(t[1])]}unsafeNext(){const t=this.rng.next();return this.rng=t[1],t[0]}}function z1n(e){return"clone"in e&&"unsafeNext"in e?e:new dE(e)}GN.convertToRandomGenerator=z1n;Object.defineProperty(KN,"__esModule",{value:!0});KN.Random=void 0;const _O=fV,K1n=GN;let HN=class B1{constructor(t){this.internalRng=(0,K1n.convertToRandomGenerator)(t).clone()}clone(){return new B1(this.internalRng)}next(t){return(0,_O.unsafeUniformIntDistribution)(0,(1<e.generate(new H1n.Random(t),n)}function*X1n(e,t,n,r){yield*r.map(o=>()=>new Y1n.NextValue(o,void 0));let i=0,a=(0,J1n.convertToRandomGenerator)(n(t));for(;;)a=a.jump?a.jump():(0,G1n.skipN)(a,42),yield Z1n(e,a,i++)}zN.toss=X1n;var JN={};Object.defineProperty(JN,"__esModule",{value:!0});JN.pathWalk=void 0;const Q1n=Rn;function eIn(e,t,n){let r=(0,Q1n.stream)(t);const i=e.split(":").map(a=>+a);if(i.length===0)return r;if(!i.every(a=>!Number.isNaN(a)))throw new Error(`Unable to replay, got invalid path=${e}`);r=r.drop(i[0]);for(const a of i.slice(1)){const o=r.getNthOrLast(0);if(o==null)throw new Error(`Unable to replay, got wrong path=${e}`);r=n(o).drop(a)}return r}JN.pathWalk=eIn;var vs={};Object.defineProperty(vs,"__esModule",{value:!0});vs.asyncDefaultReportMessage=vs.defaultReportMessage=vs.asyncReportRunDetails=vs.reportRunDetails=void 0;const lH=ep,Iq=BN,Y0e=_V;function tIn(e){return e.length===1?`Hint: ${e[0]}`:e.map((t,n)=>`Hint (${n+1}): ${t}`).join(` `)}function nIn(e,t){return`Encountered failures were: - ${e.map(t).join(` - `)}`}function Rse(e,t){const n=[],r=[];for(const i of e.slice().reverse())r.push({depth:1,tree:i});for(;r.length!==0;){const i=r.pop(),a=i.tree,o=i.depth,u=a.status===Y0e.ExecutionStatus.Success?"\x1B[32m√\x1B[0m":a.status===Y0e.ExecutionStatus.Failure?"\x1B[31m×\x1B[0m":"\x1B[33m!\x1B[0m",c=Array(o).join(". ");n.push(`${c}${u} ${t(a.value)}`);for(const f of a.children.slice().reverse())r.push({depth:o+1,tree:f})}return`Execution summary: ${n.join(` `)}`}function rIn(e,t){const n=`Failed to run property, too many pre-condition failures encountered { seed: ${e.seed} } Ran ${e.numRuns} time(s) Skipped ${e.numSkips} time(s)`;let r=null;const i=["Try to reduce the number of rejected values by combining map, flatMap and built-in arbitraries","Increase failure tolerance by setting maxSkipsPerRun to an higher value"];return e.verbose>=Iq.VerbosityLevel.VeryVerbose?r=Rse(e.executionSummary,t):i.push("Enable verbose mode at level VeryVerbose in order to check all generated values and their associated status"),{message:n,details:r,hints:i}}function iIn(e,t){const n=`Property failed after ${e.numRuns} tests { seed: ${e.seed}, path: "${e.counterexamplePath}", endOnFailure: true } Counterexample: ${t(e.counterexample)} Shrunk ${e.numShrinks} time(s) Got error: ${e.error}`;let r=null;const i=[];return e.verbose>=Iq.VerbosityLevel.VeryVerbose?r=Rse(e.executionSummary,t):e.verbose===Iq.VerbosityLevel.Verbose?r=nIn(e.failures,t):i.push("Enable verbose mode in order to have the list of all failing values encountered during the run"),{message:n,details:r,hints:i}}function aIn(e,t){const n=`Property interrupted after ${e.numRuns} tests { seed: ${e.seed} }`;let r=null;const i=[];return e.verbose>=Iq.VerbosityLevel.VeryVerbose?r=Rse(e.executionSummary,t):i.push("Enable verbose mode at level VeryVerbose in order to check all generated values and their associated status"),{message:n,details:r,hints:i}}function dH(e,t){if(!e.failed)return;const{message:n,details:r,hints:i}=e.counterexamplePath===null?e.interrupted?aIn(e,t):rIn(e,t):iIn(e,t);let a=n;return r!=null&&(a+=` ${r}`),i.length>0&&(a+=` ${tIn(i)}`),a}function NHe(e){return dH(e,lH.stringify)}vs.defaultReportMessage=NHe;async function jHe(e){const t=[];function n(o){const u=(0,lH.possiblyAsyncStringify)(o);return typeof u=="string"?u:(t.push(Promise.all([o,u])),"…")}const r=dH(e,n);if(t.length===0)return r;const i=new Map(await Promise.all(t));function a(o){const u=i.get(o);return u!==void 0?u:(0,lH.stringify)(o)}return dH(e,a)}vs.asyncDefaultReportMessage=jHe;function oIn(e){if(e.failed)throw new Error(NHe(e))}async function uIn(e){if(e.failed)throw new Error(await jHe(e))}function cIn(e){return e.runConfiguration.asyncReporter?e.runConfiguration.asyncReporter(e):e.runConfiguration.reporter?e.runConfiguration.reporter(e):oIn(e)}vs.reportRunDetails=cIn;async function fIn(e){return e.runConfiguration.asyncReporter?e.runConfiguration.asyncReporter(e):e.runConfiguration.reporter?e.runConfiguration.reporter(e):uIn(e)}vs.asyncReportRunDetails=fIn;Object.defineProperty(w_,"__esModule",{value:!0});w_.assert=w_.check=void 0;const _q=Rn,sIn=gc,lIn=kN,dIn=mV,kHe=$V,pIn=wV,hIn=zN,vIn=JN,Z0e=vs;function mIn(e,t,n,r,i){const a=new kHe.RunnerIterator(n,t,r,i);for(const o of a){const u=e.run(o);a.handleResult(u)}return a.runExecution}async function gIn(e,t,n,r,i){const a=new kHe.RunnerIterator(n,t,r,i);for(const o of a){const u=await e.run(o);a.handleResult(u)}return a.runExecution}function yIn(e,t,n){const r=n.split(":"),i=(0,_q.stream)(e).drop(r.length>0?+r[0]:0).map(o=>o()),a=["0",...r.slice(1)].join(":");return(0,_q.stream)((0,vIn.pathWalk)(a,i,t)).map(o=>()=>o)}function bIn(e,t,n){return n.path.length===0?(0,_q.stream)(e):yIn(e,t,n.path)}function UHe(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");const n=lIn.QualifiedParameters.read(Object.assign(Object.assign({},(0,sIn.readConfigureGlobal)()),t));if(n.reporter!==null&&n.asyncReporter!==null)throw new Error("Invalid parameters encountered, reporter and asyncReporter cannot be specified together");if(n.asyncReporter!==null&&!e.isAsync())throw new Error("Invalid parameters encountered, only asyncProperty can be used when asyncReporter specified");const r=(0,dIn.decorateProperty)(e,n),i=(0,hIn.toss)(r,n.seed,n.randomType,n.examples),a=n.path.indexOf(":")===-1?n.numRuns:-1,o=n.numRuns*n.maxSkipsPerRun,u=r.shrink.bind(r),c=bIn(i,u,n),f=new pIn.SourceValuesIterator(c,a,o),s=n.endOnFailure?_q.Stream.nil:u;return r.isAsync()?gIn(r,s,f,n.verbose,n.markInterruptAsFailure).then(l=>l.toRunDetails(n.seed,n.path,o,n)):mIn(r,s,f,n.verbose,n.markInterruptAsFailure).toRunDetails(n.seed,n.path,o,n)}w_.check=UHe;function $In(e,t){const n=UHe(e,t);if(e.isAsync())return n.then(Z0e.asyncReportRunDetails);(0,Z0e.reportRunDetails)(n)}w_.assert=$In;var M_={};Object.defineProperty(M_,"__esModule",{value:!0});M_.statistics=M_.sample=void 0;const X0e=Rn,IIn=hc,_In=jN,SIn=VN,Sq=gc,qHe=kN,wIn=zN,AIn=JN;function MIn(e,t){const n=Object.prototype.hasOwnProperty.call(e,"isAsync")?(0,IIn.convertToNextProperty)(e):new _In.Property(e,()=>!0);return t.unbiased===!0?new SIn.UnbiasedProperty(n):n}function xHe(e,t){const n=typeof t=="number"?Object.assign(Object.assign({},(0,Sq.readConfigureGlobal)()),{numRuns:t}):Object.assign(Object.assign({},(0,Sq.readConfigureGlobal)()),t),r=qHe.QualifiedParameters.read(n),i=MIn(e,r),a=i.shrink.bind(i),o=(0,X0e.stream)((0,wIn.toss)(i,r.seed,r.randomType,r.examples));return r.path.length===0?o.take(r.numRuns).map(u=>u().value_):(0,X0e.stream)((0,AIn.pathWalk)(r.path,o.map(u=>u()),a)).take(r.numRuns).map(u=>u.value_)}function RIn(e,t){return[...xHe(e,t)]}M_.sample=RIn;function OIn(e,t,n){const r=typeof n=="number"?Object.assign(Object.assign({},(0,Sq.readConfigureGlobal)()),{numRuns:n}):Object.assign(Object.assign({},(0,Sq.readConfigureGlobal)()),n),i=qHe.QualifiedParameters.read(r),a={};for(const f of xHe(e,n)){const s=t(f),l=Array.isArray(s)?s:[s];for(const d of l)a[d]=(a[d]||0)+1}const o=Object.entries(a).sort((f,s)=>s[1]-f[1]).map(f=>[f[0],`${(f[1]*100/i.numRuns).toFixed(2)}%`]),u=o.map(f=>f[0].length).reduce((f,s)=>Math.max(f,s),0),c=o.map(f=>f[1].length).reduce((f,s)=>Math.max(f,s),0);for(const f of o)i.logger(`${f[0].padEnd(u,".")}..${f[1].padStart(c,".")}`)}M_.statistics=OIn;var gi={},_M={},yi={},Qg={},Vp={};Object.defineProperty(Vp,"__esModule",{value:!0});Vp.biasNumericRange=Vp.bigIntLogLike=Vp.integerLogLike=void 0;function EIn(e){return Math.floor(Math.log(e)/Math.log(2))}Vp.integerLogLike=EIn;function TIn(e){return e===BigInt(0)?BigInt(0):BigInt(e.toString().length)}Vp.bigIntLogLike=TIn;function CIn(e,t,n){if(e===t)return[{min:e,max:t}];if(e<0&&t>0){const o=n(-e),u=n(t);return[{min:-o,max:u},{min:t-u,max:t},{min:e,max:e+o}]}const r=n(t-e),i={min:e,max:e+r},a={min:t-r,max:t};return e<0?[a,i]:[i,a]}Vp.biasNumericRange=CIn;var AV={};Object.defineProperty(AV,"__esModule",{value:!0});AV.shrinkInteger=void 0;const Q0e=Tr,e$e=Rn;function t$e(e){return Math.floor(e/2)}function n$e(e){return Math.ceil(e/2)}function PIn(e,t,n){const r=e-t;function*i(){let o=n?void 0:t;const u=n?r:t$e(r);for(let c=u;c>0;c=t$e(c)){const f=c===r?t:e-c;yield new Q0e.NextValue(f,o),o=f}}function*a(){let o=n?void 0:t;const u=n?r:n$e(r);for(let c=u;c<0;c=n$e(c)){const f=c===r?t:e-c;yield new Q0e.NextValue(f,o),o=f}}return r>0?(0,e$e.stream)(i()):(0,e$e.stream)(a())}AV.shrinkInteger=PIn;Object.defineProperty(Qg,"__esModule",{value:!0});Qg.IntegerArbitrary=void 0;const FIn=$r,r$e=Tr,WIn=Rn,i$e=Vp,a$e=AV;class Ose extends FIn.NextArbitrary{constructor(t,n){super(),this.min=t,this.max=n}generate(t,n){const r=this.computeGenerateRange(t,n);return new r$e.NextValue(t.nextInt(r.min,r.max),void 0)}canShrinkWithoutContext(t){return typeof t=="number"&&Number.isInteger(t)&&!Object.is(t,-0)&&this.min<=t&&t<=this.max}shrink(t,n){if(!Ose.isValidContext(t,n)){const r=this.defaultTarget();return(0,a$e.shrinkInteger)(t,r,!0)}return this.isLastChanceTry(t,n)?WIn.Stream.of(new r$e.NextValue(n,void 0)):(0,a$e.shrinkInteger)(t,n,!1)}defaultTarget(){return this.min<=0&&this.max>=0?0:this.min<0?this.max:this.min}computeGenerateRange(t,n){if(n===void 0||t.nextInt(1,n)!==1)return{min:this.min,max:this.max};const r=(0,i$e.biasNumericRange)(this.min,this.max,i$e.integerLogLike);if(r.length===1)return r[0];const i=t.nextInt(-2*(r.length-1),r.length-2);return i<0?r[0]:r[i+1]}isLastChanceTry(t,n){return t>0?t===n+1&&t>this.min:t<0?t===n-1&&tt.max)throw new Error("fc.integer maximum value should be equal or greater than the minimum one");if(!Number.isInteger(t.min))throw new Error("fc.integer minimum value should be an integer");if(!Number.isInteger(t.max))throw new Error("fc.integer maximum value should be an integer");const n=new jIn.IntegerArbitrary(t.min,t.max);return(0,NIn.convertFromNextWithShrunkOnce)(n,n.defaultTarget())}yi.integer=qIn;var B$={};Object.defineProperty(B$,"__esModule",{value:!0});B$.makeLazy=void 0;class xIn{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 DIn(e){return new xIn(e)}B$.makeLazy=DIn;var ih={};Object.defineProperty(ih,"__esModule",{value:!0});ih.createDepthIdentifier=ih.getDepthContextFor=void 0;const o$e=new Map;function LIn(e){if(e===void 0)return{depth:0};if(typeof e!="string")return e;const t=o$e.get(e);if(t!==void 0)return t;const n={depth:0};return o$e.set(e,n),n}ih.getDepthContextFor=LIn;function BIn(){return{depth:0}}ih.createDepthIdentifier=BIn;Object.defineProperty(_M,"__esModule",{value:!0});_M.ArrayArbitrary=void 0;const C7=Rn,SO=Do,u$e=yi,P7=B$,VIn=$r,c$e=Ye,C1=Tr,zIn=ih;function F7(e,t){return e===t?e:e+Math.floor(Math.log(t-e)/Math.log(2))}class Ese extends VIn.NextArbitrary{constructor(t,n,r,i,a,o){super(),this.arb=t,this.minLength=n,this.maxGeneratedLength=r,this.maxLength=i,this.setBuilder=o,this.lengthArb=(0,c$e.convertToNext)((0,u$e.integer)(n,r)),this.depthContext=(0,zIn.getDepthContextFor)(a)}preFilter(t){if(this.setBuilder===void 0)return t;const n=this.setBuilder();for(let r=0;r!==t.length;++r)n.tryAdd(t[r]);return n.getData()}static makeItCloneable(t,n){return t[SO.cloneMethod]=()=>{const r=[];for(let i=0;i!==n.length;++i)r.push(n[i].value);return this.makeItCloneable(r,n),r},t}generateNItemsNoDuplicates(t,n,r,i){let a=0;const o=t();for(;o.size()t.length||t.length>this.maxLength)return!1;for(let r=0;r!==t.length;++r)if(!(r in t)||!this.arb.canShrinkWithoutContext(t[r]))return!1;return this.preFilter(t.map(r=>new C1.NextValue(r,void 0))).length===t.length}shrinkItemByItem(t,n,r){let i=C7.Stream.nil();for(let a=n.startIndex;athis.arb.shrink(t[a],n.itemsContexts[a]).map(o=>{const u=t.slice(0,a).map((f,s)=>new C1.NextValue((0,SO.cloneIfNeeded)(f),n.itemsContexts[s])),c=t.slice(a+1).map((f,s)=>new C1.NextValue((0,SO.cloneIfNeeded)(f),n.itemsContexts[s+a+1]));return[u.concat(o).concat(c),void 0,a]})));return i}shrinkImpl(t,n){if(t.length===0)return C7.Stream.nil();const r=n!==void 0?n:{shrunkOnce:!1,lengthContext:void 0,itemsContexts:[],startIndex:0};return this.lengthArb.shrink(t.length,r.lengthContext).drop(r.shrunkOnce&&r.lengthContext===void 0&&t.length>this.minLength+1?1:0).map(i=>{const a=t.length-i.value;return[t.slice(a).map((o,u)=>new C1.NextValue((0,SO.cloneIfNeeded)(o),r.itemsContexts[u+a])),i.context,0]}).join((0,P7.makeLazy)(()=>t.length>this.minLength?this.shrinkItemByItem(t,r,1):this.shrinkItemByItem(t,r,t.length))).join(t.length>this.minLength?(0,P7.makeLazy)(()=>{const i={shrunkOnce:!1,lengthContext:void 0,itemsContexts:r.itemsContexts.slice(1),startIndex:0};return this.shrinkImpl(t.slice(1),i).filter(a=>this.minLength<=a[0].length+1).map(a=>[[new C1.NextValue((0,SO.cloneIfNeeded)(t[0]),r.itemsContexts[0])].concat(a[0]),void 0,0])}):C7.Stream.nil())}shrink(t,n){return this.shrinkImpl(t,n).map(r=>this.wrapper(r[0],!0,r[1],r[2]))}}_M.ArrayArbitrary=Ese;var gl={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSize=e.depthFactorFromSizeForArbitrary=e.maxGeneratedLengthFromSizeForArbitrary=e.relativeSizeToSize=e.maxLengthFromMinLength=e.DefaultSize=e.MaxLengthUpperBound=void 0;const t=gc;e.MaxLengthUpperBound=2147483647;const n=["xsmall","small","medium","large","xlarge"],r=["-4","-3","-2","-1","=","+1","+2","+3","+4"];e.DefaultSize="small";function i(f,s){switch(s){case"xsmall":return Math.floor(1.1*f)+1;case"small":return 2*f+10;case"medium":return 11*f+100;case"large":return 101*f+1e3;case"xlarge":return 1001*f+1e4;default:throw new Error(`Unable to compute lengths based on received size: ${s}`)}}e.maxLengthFromMinLength=i;function a(f,s){const l=r.indexOf(f);if(l===-1)return f;const d=n.indexOf(s);if(d===-1)throw new Error(`Unable to offset size based on the unknown defaulted one: ${s}`);const p=d+l-4;return p<0?n[0]:p>=n.length?n[n.length-1]:n[p]}e.relativeSizeToSize=a;function o(f,s,l,d){const{baseSize:p=e.DefaultSize,defaultSizeToMaxWhenMaxSpecified:v=!0}=(0,t.readConfigureGlobal)()||{},h=f!==void 0?f:d&&v?"max":p;if(h==="max")return l;const $=a(h,p);return Math.min(i(s,$),l)}e.maxGeneratedLengthFromSizeForArbitrary=o;function u(f){if(typeof f=="number")return f;const{baseSize:s}=(0,t.readConfigureGlobal)()||{};if(f===void 0&&s===void 0)return 0;const l=s!==void 0?s:e.DefaultSize;switch(a(f!==void 0?f:l,l)){case"xsmall":return 1;case"small":return .5;case"medium":return .25;case"large":return .125;case"xlarge":return .0625}}e.depthFactorFromSizeForArbitrary=u;function c(f){const{baseSize:s=e.DefaultSize}=(0,t.readConfigureGlobal)()||{};return f===void 0?s:a(f,s)}e.resolveSize=c})(gl);Object.defineProperty(gi,"__esModule",{value:!0});gi.array=void 0;const DHe=Ye,KIn=_M,f$e=gl;function _U(e,t,n,r,i){const a=r!==void 0?r:f$e.MaxLengthUpperBound,o=r!==void 0,u=(0,f$e.maxGeneratedLengthFromSizeForArbitrary)(t,n,a,o);return(0,DHe.convertFromNext)(new KIn.ArrayArbitrary(e,n,u,a,i))}function GIn(e,...t){const n=(0,DHe.convertToNext)(e);return t[0]===void 0?_U(n,void 0,0,void 0,void 0):typeof t[0]=="object"?_U(n,t[0].size,t[0].minLength||0,t[0].maxLength,t[0].depthIdentifier):t[1]!==void 0?_U(n,void 0,t[0],t[1],void 0):_U(n,void 0,0,t[0],void 0)}gi.array=GIn;var YN={},V$={},MV={};Object.defineProperty(MV,"__esModule",{value:!0});MV.shrinkBigInt=void 0;const s$e=Rn,l$e=Tr;function SU(e){return e/BigInt(2)}function HIn(e,t,n){const r=e-t;function*i(){let o=n?void 0:t;const u=n?r:SU(r);for(let c=u;c>0;c=SU(c)){const f=e-c;yield new l$e.NextValue(f,o),o=f}}function*a(){let o=n?void 0:t;const u=n?r:SU(r);for(let c=u;c<0;c=SU(c)){const f=e-c;yield new l$e.NextValue(f,o),o=f}}return r>0?(0,s$e.stream)(i()):(0,s$e.stream)(a())}MV.shrinkBigInt=HIn;Object.defineProperty(V$,"__esModule",{value:!0});V$.BigIntArbitrary=void 0;const JIn=Rn,YIn=$r,d$e=Tr,p$e=Vp,h$e=MV;class Tse extends YIn.NextArbitrary{constructor(t,n){super(),this.min=t,this.max=n}generate(t,n){const r=this.computeGenerateRange(t,n);return new d$e.NextValue(t.nextBigInt(r.min,r.max),void 0)}computeGenerateRange(t,n){if(n===void 0||t.nextInt(1,n)!==1)return{min:this.min,max:this.max};const r=(0,p$e.biasNumericRange)(this.min,this.max,p$e.bigIntLogLike);if(r.length===1)return r[0];const i=t.nextInt(-2*(r.length-1),r.length-2);return i<0?r[0]:r[i+1]}canShrinkWithoutContext(t){return typeof t=="bigint"&&this.min<=t&&t<=this.max}shrink(t,n){if(!Tse.isValidContext(t,n)){const r=this.defaultTarget();return(0,h$e.shrinkBigInt)(t,r,!0)}return this.isLastChanceTry(t,n)?JIn.Stream.of(new d$e.NextValue(n,void 0)):(0,h$e.shrinkBigInt)(t,n,!1)}defaultTarget(){return this.min<=0&&this.max>=0?BigInt(0):this.min<0?this.max:this.min}isLastChanceTry(t,n){return t>0?t===n+BigInt(1)&&t>this.min:t<0?t===n-BigInt(1)&&t0&&n<0||t<0&&n>0;if(n!==BigInt(0)&&r)throw new Error("Invalid context value passed to BigIntArbitrary (#2)");return!0}}V$.BigIntArbitrary=Tse;Object.defineProperty(YN,"__esModule",{value:!0});YN.bigInt=void 0;const ZIn=Ye,XIn=V$;function QIn(e){const n=BigInt(-1)<BigInt(0)?i*i:BigInt(0))}}function e_n(e){return e[0]===void 0?{}:e[1]===void 0?e[0]:{min:e[0],max:e[1]}}function t_n(...e){const t=QIn(e_n(e));if(t.min>t.max)throw new Error("fc.bigInt expects max to be greater than or equal to min");const n=new XIn.BigIntArbitrary(t.min,t.max);return(0,ZIn.convertFromNextWithShrunkOnce)(n,n.defaultTarget())}YN.bigInt=t_n;var RV={};Object.defineProperty(RV,"__esModule",{value:!0});RV.bigIntN=void 0;const n_n=Ye,r_n=V$;function i_n(e){if(e<1)throw new Error("fc.bigIntN expects requested number of bits to be superior or equal to 1");const t=BigInt(-1)<i[g$e.cloneMethod]()):new W7.NextValue(i,r)}canShrinkWithoutContext(t){for(let n=0;n!==this.values.length;++n)if(Object.is(this.values[n],t))return!0;return!1}shrink(t,n){return n===0||Object.is(t,this.values[0])?m$e.Stream.nil():m$e.Stream.of(new W7.NextValue(this.values[0],0))}}XN.ConstantArbitrary=g_n;Object.defineProperty(z$,"__esModule",{value:!0});z$.constantFrom=void 0;const y_n=Ye,b_n=XN;function $_n(...e){if(e.length===0)throw new Error("fc.constantFrom expects at least one parameter");return(0,y_n.convertFromNext)(new b_n.ConstantArbitrary(e))}z$.constantFrom=$_n;Object.defineProperty(EV,"__esModule",{value:!0});EV.falsy=void 0;const y$e=z$;function I_n(e){return!e||!e.withBigInt?(0,y$e.constantFrom)(!1,null,void 0,0,"",NaN):(0,y$e.constantFrom)(!1,null,void 0,0,"",NaN,BigInt(0))}EV.falsy=I_n;var QN={},tp={},R_={};Object.defineProperty(R_,"__esModule",{value:!0});R_.indexToCharStringUnmapper=R_.indexToCharStringMapper=void 0;R_.indexToCharStringMapper=String.fromCodePoint;function __n(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");const t=e.charCodeAt(0);if(e.length===1)return t;const n=e.charCodeAt(1);if(t<55296||t>56319||n<56320||n>57343)throw new Error("Cannot unmap invalid surrogate pairs");return e.codePointAt(0)}R_.indexToCharStringUnmapper=__n;Object.defineProperty(tp,"__esModule",{value:!0});tp.buildCharacterArbitrary=void 0;const b$e=Ye,S_n=yi,$$e=R_;function w_n(e,t,n,r){return(0,b$e.convertFromNext)((0,b$e.convertToNext)((0,S_n.integer)(e,t)).map(i=>(0,$$e.indexToCharStringMapper)(n(i)),i=>r((0,$$e.indexToCharStringUnmapper)(i))))}tp.buildCharacterArbitrary=w_n;var ah={};Object.defineProperty(ah,"__esModule",{value:!0});ah.indexToPrintableIndexUnmapper=ah.indexToPrintableIndexMapper=void 0;function A_n(e){return e<95?e+32:e<=126?e-95:e}ah.indexToPrintableIndexMapper=A_n;function M_n(e){return e>=32&&e<=126?e-32:e>=0&&e<=31?e+95:e}ah.indexToPrintableIndexUnmapper=M_n;Object.defineProperty(QN,"__esModule",{value:!0});QN.ascii=void 0;const R_n=tp,I$e=ah;function O_n(){return(0,R_n.buildCharacterArbitrary)(0,127,I$e.indexToPrintableIndexMapper,I$e.indexToPrintableIndexUnmapper)}QN.ascii=O_n;var ej={};Object.defineProperty(ej,"__esModule",{value:!0});ej.base64=void 0;const E_n=tp;function T_n(e){return e<26?e+65:e<52?e+97-26:e<62?e+48-52:e===62?43:47}function C_n(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}function P_n(){return(0,E_n.buildCharacterArbitrary)(0,63,T_n,C_n)}ej.base64=P_n;var tj={};Object.defineProperty(tj,"__esModule",{value:!0});tj.char=void 0;const F_n=tp;function _$e(e){return e}function W_n(){return(0,F_n.buildCharacterArbitrary)(32,126,_$e,_$e)}tj.char=W_n;var nj={};Object.defineProperty(nj,"__esModule",{value:!0});nj.char16bits=void 0;const N_n=tp,S$e=ah;function j_n(){return(0,N_n.buildCharacterArbitrary)(0,65535,S$e.indexToPrintableIndexMapper,S$e.indexToPrintableIndexUnmapper)}nj.char16bits=j_n;var wM={};Object.defineProperty(wM,"__esModule",{value:!0});wM.fullUnicode=void 0;const k_n=tp,LHe=ah,Cse=57343+1-55296;function U_n(e){return e<55296?(0,LHe.indexToPrintableIndexMapper)(e):e+Cse}function q_n(e){return e<55296?(0,LHe.indexToPrintableIndexUnmapper)(e):e<=57343?-1:e-Cse}function x_n(){return(0,k_n.buildCharacterArbitrary)(0,1114111-Cse,U_n,q_n)}wM.fullUnicode=x_n;var rj={};Object.defineProperty(rj,"__esModule",{value:!0});rj.hexa=void 0;const D_n=tp;function L_n(e){return e<10?e+48:e+97-10}function B_n(e){return e<58?e-48:e>=97&&e<103?e-97+10:-1}function V_n(){return(0,D_n.buildCharacterArbitrary)(0,15,L_n,B_n)}rj.hexa=V_n;var ij={};Object.defineProperty(ij,"__esModule",{value:!0});ij.unicode=void 0;const z_n=tp,BHe=ah,Pse=57343+1-55296;function K_n(e){return e<55296?(0,BHe.indexToPrintableIndexMapper)(e):e+Pse}function G_n(e){return e<55296?(0,BHe.indexToPrintableIndexUnmapper)(e):e<=57343?-1:e-Pse}function H_n(){return(0,z_n.buildCharacterArbitrary)(0,65535-Pse,K_n,G_n)}ij.unicode=H_n;var TV={},zf={};Object.defineProperty(zf,"__esModule",{value:!0});zf.constant=void 0;const J_n=Ye,Y_n=XN;function Z_n(e){return(0,J_n.convertFromNext)(new Y_n.ConstantArbitrary([e]))}zf.constant=Z_n;Object.defineProperty(TV,"__esModule",{value:!0});TV.clonedConstant=void 0;const X_n=zf;TV.clonedConstant=X_n.constant;var CV={};Object.defineProperty(CV,"__esModule",{value:!0});CV.context=void 0;const Q_n=Do,eSn=zf;class Fse{constructor(){this.receivedLogs=[]}log(t){this.receivedLogs.push(t)}size(){return this.receivedLogs.length}toString(){return JSON.stringify({logs:this.receivedLogs})}[Q_n.cloneMethod](){return new Fse}}function tSn(){return(0,eSn.constant)(new Fse)}CV.context=tSn;var aj={},O_={};Object.defineProperty(O_,"__esModule",{value:!0});O_.timeToDateUnmapper=O_.timeToDateMapper=void 0;function nSn(e){return new Date(e)}O_.timeToDateMapper=nSn;function rSn(e){if(!(e instanceof Date)||e.constructor!==Date)throw new Error("Not a valid value for date unmapper");return e.getTime()}O_.timeToDateUnmapper=rSn;Object.defineProperty(aj,"__esModule",{value:!0});aj.date=void 0;const w$e=Ye,iSn=yi,A$e=O_;function aSn(e){const t=e&&e.min!==void 0?e.min.getTime():-864e13,n=e&&e.max!==void 0?e.max.getTime():864e13;if(Number.isNaN(t))throw new Error("fc.date min must be valid instance of Date");if(Number.isNaN(n))throw new Error("fc.date max must be valid instance of Date");if(t>n)throw new Error("fc.date max must be greater or equal to min");return(0,w$e.convertFromNext)((0,w$e.convertToNext)((0,iSn.integer)(t,n)).map(A$e.timeToDateMapper,A$e.timeToDateUnmapper))}aj.date=aSn;var oj={},PV={};Object.defineProperty(PV,"__esModule",{value:!0});PV.CloneArbitrary=void 0;const oSn=$r,uSn=Tr,cSn=Do,M$e=Rn;class Wse extends oSn.NextArbitrary{constructor(t,n){super(),this.arb=t,this.numValues=n}generate(t,n){const r=[];if(this.numValues<=0)return this.wrapper(r);for(let i=0;i!==this.numValues-1;++i)r.push(this.arb.generate(t.clone(),n));return r.push(this.arb.generate(t,n)),this.wrapper(r)}canShrinkWithoutContext(t){if(!Array.isArray(t)||t.length!==this.numValues)return!1;if(t.length===0)return!0;for(let n=1;nthis.wrapper(r))}*shrinkImpl(t,n){const r=t.map((a,o)=>this.arb.shrink(a,n[o])[Symbol.iterator]());let i=r.map(a=>a.next());for(;!i[0].done;)yield i.map(a=>a.value),i=r.map(a=>a.next())}static makeItCloneable(t,n){return t[cSn.cloneMethod]=()=>{const r=[];for(let i=0;i!==n.length;++i)r.push(n[i].value);return this.makeItCloneable(r,n),r},t}wrapper(t){let n=!1;const r=[],i=[];for(let a=0;a!==t.length;++a){const o=t[a];n=n||o.hasToBeCloned,r.push(o.value),i.push(o.context)}return n&&Wse.makeItCloneable(r,t),new uSn.NextValue(r,i)}}PV.CloneArbitrary=Wse;Object.defineProperty(oj,"__esModule",{value:!0});oj.clone=void 0;const R$e=Ye,fSn=PV;function sSn(e,t){return(0,R$e.convertFromNext)(new fSn.CloneArbitrary((0,R$e.convertToNext)(e),t))}oj.clone=sSn;var FV={};Object.defineProperty(FV,"__esModule",{value:!0});FV.dedup=void 0;const lSn=oj;FV.dedup=lSn.clone;var uj={},Ci={};Object.defineProperty(Ci,"__esModule",{value:!0});Ci.tuple=void 0;const O$e=Ye,dSn=FN;function pSn(...e){const t=e.map(n=>(0,O$e.convertToNext)(n));return(0,O$e.convertFromNext)(new dSn.TupleArbitrary(t))}Ci.tuple=pSn;var K$={},cj={};Object.defineProperty(cj,"__esModule",{value:!0});cj.CustomEqualSet=void 0;class hSn{constructor(t){this.isEqual=t,this.data=[]}tryAdd(t){for(let n=0;n!==this.data.length;++n)if(this.isEqual(this.data[n],t))return!1;return this.data.push(t),!0}size(){return this.data.length}getData(){return this.data.slice()}}cj.CustomEqualSet=hSn;var fj={};Object.defineProperty(fj,"__esModule",{value:!0});fj.StrictlyEqualSet=void 0;class vSn{constructor(t){this.selector=t,this.selectedItemsExceptNaN=new Set,this.data=[]}tryAdd(t){const n=this.selector(t);if(Number.isNaN(n))return this.data.push(t),!0;const r=this.selectedItemsExceptNaN.size;return this.selectedItemsExceptNaN.add(n),r!==this.selectedItemsExceptNaN.size?(this.data.push(t),!0):!1}size(){return this.data.length}getData(){return this.data}}fj.StrictlyEqualSet=vSn;var sj={};Object.defineProperty(sj,"__esModule",{value:!0});sj.SameValueSet=void 0;class mSn{constructor(t){this.selector=t,this.selectedItemsExceptMinusZero=new Set,this.data=[],this.hasMinusZero=!1}tryAdd(t){const n=this.selector(t);if(Object.is(n,-0))return this.hasMinusZero?!1:(this.data.push(t),this.hasMinusZero=!0,!0);const r=this.selectedItemsExceptMinusZero.size;return this.selectedItemsExceptMinusZero.add(n),r!==this.selectedItemsExceptMinusZero.size?(this.data.push(t),!0):!1}size(){return this.data.length}getData(){return this.data}}sj.SameValueSet=mSn;var lj={};Object.defineProperty(lj,"__esModule",{value:!0});lj.SameValueZeroSet=void 0;class gSn{constructor(t){this.selector=t,this.selectedItems=new Set,this.data=[]}tryAdd(t){const n=this.selector(t),r=this.selectedItems.size;return this.selectedItems.add(n),r!==this.selectedItems.size?(this.data.push(t),!0):!1}size(){return this.data.length}getData(){return this.data}}lj.SameValueZeroSet=gSn;Object.defineProperty(K$,"__esModule",{value:!0});K$.uniqueArray=void 0;const ySn=_M,E$e=Ye,T$e=gl,C$e=cj,bSn=fj,$Sn=sj,ISn=lj;function _Sn(e){if(typeof e.comparator=="function"){if(e.selector===void 0){const u=e.comparator,c=(f,s)=>u(f.value_,s.value_);return()=>new C$e.CustomEqualSet(c)}const r=e.comparator,i=e.selector,a=u=>i(u.value_),o=(u,c)=>r(a(u),a(c));return()=>new C$e.CustomEqualSet(o)}const t=e.selector||(r=>r),n=r=>t(r.value_);switch(e.comparator){case"IsStrictlyEqual":return()=>new bSn.StrictlyEqualSet(n);case"SameValueZero":return()=>new ISn.SameValueZeroSet(n);case"SameValue":case void 0:return()=>new $Sn.SameValueSet(n)}}function SSn(e,t={}){const n=t.minLength!==void 0?t.minLength:0,r=t.maxLength!==void 0?t.maxLength:T$e.MaxLengthUpperBound,i=(0,T$e.maxGeneratedLengthFromSizeForArbitrary)(t.size,n,r,t.maxLength!==void 0),a=t.depthIdentifier,o=_Sn(t),u=(0,E$e.convertToNext)(e),c=(0,E$e.convertFromNext)(new ySn.ArrayArbitrary(u,n,i,r,a,o));return n===0?c:c.filter(f=>f.length>=n)}K$.uniqueArray=SSn;var Tb={};Object.defineProperty(Tb,"__esModule",{value:!0});Tb.keyValuePairsToObjectUnmapper=Tb.keyValuePairsToObjectMapper=void 0;function wSn(e){const t={};for(const n of e)t[n[0]]=n[1];return t}Tb.keyValuePairsToObjectMapper=wSn;function ASn(e){return function(n){const r=Object.getOwnPropertyDescriptor(e,n);return r===void 0||!r.configurable||!r.enumerable||!r.writable||r.get!==void 0||r.set!==void 0}}function MSn(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!==Object)throw new Error("Incompatible instance received: should be of exact type Object");if(Object.getOwnPropertySymbols(e).length>0)throw new Error("Incompatible instance received: should contain symbols");if(Object.getOwnPropertyNames(e).find(ASn(e))!==void 0)throw new Error("Incompatible instance received: should contain only c/e/w properties without get/set");return Object.entries(e)}Tb.keyValuePairsToObjectUnmapper=MSn;Object.defineProperty(uj,"__esModule",{value:!0});uj.dictionary=void 0;const P$e=Ye,RSn=Ci,OSn=K$,F$e=Tb;function ESn(e){return e[0]}function TSn(e,t,n={}){return(0,P$e.convertFromNext)((0,P$e.convertToNext)((0,OSn.uniqueArray)((0,RSn.tuple)(e,t),{minLength:n.minKeys,maxLength:n.maxKeys,size:n.size,selector:ESn})).map(F$e.keyValuePairsToObjectMapper,F$e.keyValuePairsToObjectUnmapper))}uj.dictionary=TSn;var WV={},AM={},G$={},MM={};Object.defineProperty(MM,"__esModule",{value:!0});MM.FrequencyArbitrary=void 0;const wU=Rn,W$e=Ye,CSn=$r,N$e=Tr,PSn=ih,FSn=gl;class wq extends CSn.NextArbitrary{constructor(t,n,r){super(),this.warbs=t,this.constraints=n,this.context=r;let i=0;this.cumulatedWeights=[];for(let a=0;a!==t.length;++a)i+=t[a].weight,this.cumulatedWeights.push(i);this.totalWeight=i}static fromOld(t,n,r){return(0,W$e.convertFromNext)(wq.from(t.map(i=>Object.assign(Object.assign({},i),{arbitrary:(0,W$e.convertToNext)(i.arbitrary)})),n,r))}static from(t,n,r){if(t.length===0)throw new Error(`${r} expects at least one weighted arbitrary`);let i=0;for(let o=0;o!==t.length;++o){if(t[o].arbitrary===void 0)throw new Error(`${r} expects arbitraries to be specified`);const c=t[o].weight;if(i+=c,!Number.isInteger(c))throw new Error(`${r} expects weights to be integer values`);if(c<0)throw new Error(`${r} expects weights to be superior or equal to 0`)}if(i<=0)throw new Error(`${r} expects the sum of weights to be strictly superior to 0`);const a={depthFactor:(0,FSn.depthFactorFromSizeForArbitrary)(n.depthFactor),depthIdentifier:n.depthIdentifier,maxDepth:n.maxDepth,withCrossShrink:n.withCrossShrink};return new wq(t,a,(0,PSn.getDepthContextFor)(n.depthIdentifier))}generate(t,n){if(this.mustGenerateFirst())return this.safeGenerateForIndex(t,0,n);const r=t.nextInt(this.computeNegDepthBenefit(),this.totalWeight-1);for(let i=0;i!==this.cumulatedWeights.length;++i)if(rthis.mapIntoNextValue(a,f,null,o));if(i.clonedMrngForFallbackFirst!==null){i.cachedGeneratedForFirst===void 0&&(i.cachedGeneratedForFirst=this.safeGenerateForIndex(i.clonedMrngForFallbackFirst,0,o));const f=i.cachedGeneratedForFirst;return wU.Stream.of(f).join(c)}return c}const r=this.canShrinkWithoutContextIndex(t);return r===-1?wU.Stream.nil():this.defaultShrinkForFirst(r).join(this.warbs[r].arbitrary.shrink(t,void 0).map(i=>this.mapIntoNextValue(r,i,null,void 0)))}defaultShrinkForFirst(t){++this.context.depth;try{if(!this.mustFallbackToFirstInShrink(t)||this.warbs[0].fallbackValue===void 0)return wU.Stream.nil()}finally{--this.context.depth}const n=new N$e.NextValue(this.warbs[0].fallbackValue.default,void 0);return wU.Stream.of(this.mapIntoNextValue(0,n,null,void 0))}canShrinkWithoutContextIndex(t){if(this.mustGenerateFirst())return this.warbs[0].arbitrary.canShrinkWithoutContext(t)?0:-1;try{++this.context.depth;for(let n=0;n!==this.warbs.length;++n){const r=this.warbs[n];if(r.weight!==0&&r.arbitrary.canShrinkWithoutContext(t))return n}return-1}finally{--this.context.depth}}mapIntoNextValue(t,n,r,i){const a={selectedIndex:t,originalBias:i,originalContext:n.context,clonedMrngForFallbackFirst:r};return new N$e.NextValue(n.value,a)}safeGenerateForIndex(t,n,r){++this.context.depth;try{const i=this.warbs[n].arbitrary.generate(t,r),a=this.mustFallbackToFirstInShrink(n)?t.clone():null;return this.mapIntoNextValue(n,i,a,r)}finally{--this.context.depth}}mustGenerateFirst(){return this.constraints.maxDepth!==void 0&&this.constraints.maxDepth<=this.context.depth}mustFallbackToFirstInShrink(t){return t!==0&&!!this.constraints.withCrossShrink&&this.warbs[0].weight!==0}computeNegDepthBenefit(){const t=this.constraints.depthFactor;if(t===void 0||t<=0||this.warbs[0].weight===0)return 0;const n=Math.floor(Math.pow(1+t,this.context.depth))-1;return-Math.min(this.totalWeight*n,Number.MAX_SAFE_INTEGER)||0}}MM.FrequencyArbitrary=wq;Object.defineProperty(G$,"__esModule",{value:!0});G$.frequency=void 0;const j$e=MM;function WSn(e){return e!=null&&typeof e=="object"&&!("arbitrary"in e)}function NSn(...e){const t="fc.frequency",n=e[0];return WSn(n)?j$e.FrequencyArbitrary.fromOld(e.slice(1),n,t):j$e.FrequencyArbitrary.fromOld(e,{},t)}G$.frequency=NSn;var dj={},ey={};Object.defineProperty(ey,"__esModule",{value:!0});ey.nat=void 0;const jSn=Ye,kSn=Qg;function USn(e){const t=typeof e=="number"?e:e&&e.max!==void 0?e.max:2147483647;if(t<0)throw new Error("fc.nat value should be greater than or equal to 0");if(!Number.isInteger(t))throw new Error("fc.nat maximum value should be an integer");const n=new kSn.IntegerArbitrary(0,t);return(0,jSn.convertFromNextWithShrunkOnce)(n,n.defaultTarget())}ey.nat=USn;var E_={};Object.defineProperty(E_,"__esModule",{value:!0});E_.indexToMappedConstantUnmapperFor=E_.indexToMappedConstantMapperFor=void 0;function qSn(e){return function(n){let r=-1,i=0;for(;n>=i;)i+=e[++r].num;return e[r].build(n-i+e[r].num)}}E_.indexToMappedConstantMapperFor=qSn;function xSn(e){const t={mapping:new Map,negativeZeroIndex:void 0};let n=0;for(let r=0;r!==e.length;++r){const i=e[r];for(let a=0;a!==i.num;++a){const o=i.build(a);o===0&&1/o===Number.NEGATIVE_INFINITY?t.negativeZeroIndex=n:t.mapping.set(o,n),++n}}return t}function DSn(e){let t=null;return function(r){t===null&&(t=xSn(e));const i=Object.is(r,-0)?t.negativeZeroIndex:t.mapping.get(r);if(i===void 0)throw new Error("Unknown value encountered cannot be built using this mapToConstant");return i}}E_.indexToMappedConstantUnmapperFor=DSn;Object.defineProperty(dj,"__esModule",{value:!0});dj.mapToConstant=void 0;const k$e=Ye,LSn=ey,U$e=E_;function BSn(e){if(e.length===0)throw new Error("fc.mapToConstant expects at least one option");let t=0;for(let n=0;n!==e.length;++n){if(e[n].num<0)throw new Error("fc.mapToConstant expects all options to have a number of entries greater or equal to zero");t+=e[n].num}if(t===0)throw new Error("fc.mapToConstant expects at least one choice among options");return t}function VSn(...e){const t=BSn(e);return(0,k$e.convertFromNext)((0,k$e.convertToNext)((0,LSn.nat)({max:t-1})).map((0,U$e.indexToMappedConstantMapperFor)(e),(0,U$e.indexToMappedConstantUnmapperFor)(e)))}dj.mapToConstant=VSn;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.buildAlphaNumericPercentArbitrary=e.buildAlphaNumericArbitrary=e.buildLowerAlphaNumericArbitrary=e.buildLowerAlphaArbitrary=void 0;const t=wM,n=G$,r=dj,i=Ye,a={num:26,build:h=>String.fromCharCode(h+97)},o={num:26,build:h=>String.fromCharCode(h+65)},u={num:10,build:h=>String.fromCharCode(h+48)};function c(h){const $=encodeURIComponent(h);return h!==$?$:`%${h.charCodeAt(0).toString(16)}`}function f(h){if(typeof h!="string")throw new Error("Unsupported");return decodeURIComponent(h)}const s=(0,i.convertFromNext)((0,i.convertToNext)((0,t.fullUnicode)()).map(c,f)),l=h=>(0,r.mapToConstant)(a,{num:h.length,build:$=>h[$]});e.buildLowerAlphaArbitrary=l;const d=h=>(0,r.mapToConstant)(a,u,{num:h.length,build:$=>h[$]});e.buildLowerAlphaNumericArbitrary=d;const p=h=>(0,r.mapToConstant)(a,o,u,{num:h.length,build:$=>h[$]});e.buildAlphaNumericArbitrary=p;const v=h=>(0,n.frequency)({weight:10,arbitrary:(0,e.buildAlphaNumericArbitrary)(h)},{weight:1,arbitrary:s});e.buildAlphaNumericPercentArbitrary=v})(AM);var RM={},ty={};Object.defineProperty(ty,"__esModule",{value:!0});ty.option=void 0;const zSn=zf,KSn=MM;function GSn(e){return typeof e=="number"?{freq:e}:e||{}}function HSn(e,t){const n=GSn(t),r=n.freq==null?5:n.freq,i=Object.prototype.hasOwnProperty.call(n,"nil")?n.nil:null,o=[{arbitrary:(0,zSn.constant)(i),weight:1,fallbackValue:{default:i}},{arbitrary:e,weight:r}],u={withCrossShrink:!0,depthFactor:n.depthFactor,maxDepth:n.maxDepth,depthIdentifier:n.depthIdentifier};return KSn.FrequencyArbitrary.fromOld(o,u,"fc.option")}ty.option=HSn;var wv={},yl={};Object.defineProperty(yl,"__esModule",{value:!0});yl.extractStringConstraints=void 0;function JSn(e){return e[0]!==void 0?typeof e[0]=="number"?typeof e[1]=="number"?{minLength:e[0],maxLength:e[1]}:{maxLength:e[0]}:e[0]:{}}yl.extractStringConstraints=JSn;var T_={};Object.defineProperty(T_,"__esModule",{value:!0});T_.patternsToStringUnmapperFor=T_.patternsToStringMapper=void 0;const YSn=gl;function ZSn(e){return e.join("")}T_.patternsToStringMapper=ZSn;function XSn(e,t){return function(r){if(typeof r!="string")throw new Error("Unsupported value");const i=t.minLength!==void 0?t.minLength:0,a=t.maxLength!==void 0?t.maxLength:YSn.MaxLengthUpperBound;if(r.length===0){if(i>0)throw new Error("Unable to unmap received string");return[]}const o=[{endIndexChunks:0,nextStartIndex:1,chunks:[]}];for(;o.length>0;){const u=o.pop();for(let c=u.nextStartIndex;c<=r.length;++c){const f=r.substring(u.endIndexChunks,c);if(e.canShrinkWithoutContext(f)){const s=u.chunks.concat([f]);if(c===r.length){if(s.lengtha)break;return s}o.push({endIndexChunks:u.endIndexChunks,nextStartIndex:c+1,chunks:u.chunks}),o.push({endIndexChunks:c,nextStartIndex:c+1,chunks:s});break}}}throw new Error("Unable to unmap received string")}}T_.patternsToStringUnmapperFor=XSn;Object.defineProperty(wv,"__esModule",{value:!0});wv.stringOf=void 0;const N7=Ye,QSn=gi,ewn=yl,q$e=T_;function twn(e,...t){const n=(0,ewn.extractStringConstraints)(t);return(0,N7.convertFromNext)((0,N7.convertToNext)((0,QSn.array)(e,n)).map(q$e.patternsToStringMapper,(0,q$e.patternsToStringUnmapperFor)((0,N7.convertToNext)(e),n)))}wv.stringOf=twn;var NV={};Object.defineProperty(NV,"__esModule",{value:!0});NV.filterInvalidSubdomainLabel=void 0;function nwn(e){return e.length>63?!1:e.length<4||e[0]!=="x"||e[1]!=="n"||e[2]!=="-"||e[3]!=="-"}NV.filterInvalidSubdomainLabel=nwn;var pj={};Object.defineProperty(pj,"__esModule",{value:!0});pj.adapter=void 0;const rwn=$r,iwn=Tr,awn=Rn,VHe=Symbol("adapted-value");function own(e,t){const n=t(e.value_);return n.adapted?new iwn.NextValue(n.value,VHe):e}class uwn extends rwn.NextArbitrary{constructor(t,n){super(),this.sourceArb=t,this.adapter=n,this.adaptNextValue=r=>own(r,n)}generate(t,n){const r=this.sourceArb.generate(t,n);return this.adaptNextValue(r)}canShrinkWithoutContext(t){return this.sourceArb.canShrinkWithoutContext(t)&&!this.adapter(t).adapted}shrink(t,n){return n===VHe?this.sourceArb.canShrinkWithoutContext(t)?this.sourceArb.shrink(t,void 0).map(this.adaptNextValue):awn.Stream.nil():this.sourceArb.shrink(t,n).map(this.adaptNextValue)}}function cwn(e,t){return new uwn(e,t)}pj.adapter=cwn;Object.defineProperty(RM,"__esModule",{value:!0});RM.domain=void 0;const fwn=gi,pH=AM,swn=ty,zHe=wv,hH=Ci,lwn=NV,Aq=Ye,x$e=gl,dwn=pj;function pwn([e,t]){return t===null?e:`${e}${t[0]}${t[1]}`}function hwn(e){if(typeof e!="string"||e.length===0)throw new Error("Unsupported");return e.length===1?[e[0],null]:[e[0],[e.substring(1,e.length-1),e[e.length-1]]]}function vwn(e){const t=(0,pH.buildLowerAlphaNumericArbitrary)([]),n=(0,pH.buildLowerAlphaNumericArbitrary)(["-"]);return(0,Aq.convertFromNext)((0,Aq.convertToNext)((0,hH.tuple)(t,(0,swn.option)((0,hH.tuple)((0,zHe.stringOf)(n,{size:e,maxLength:61}),t)))).map(pwn,hwn).filter(lwn.filterInvalidSubdomainLabel))}function mwn(e){return`${e[0].join(".")}.${e[1]}`}function gwn(e){if(typeof e!="string")throw new Error("Unsupported type");const t=e.lastIndexOf(".");return[e.substring(0,t).split("."),e.substring(t+1)]}function ywn(e){const[t,n]=e;let r=n.length;for(let i=0;i!==t.length;++i)if(r+=1+t[i].length,r>255)return{adapted:!0,value:[t.slice(0,i),n]};return{adapted:!1,value:e}}function bwn(e={}){const t=(0,x$e.resolveSize)(e.size),n=(0,x$e.relativeSizeToSize)("-1",t),r=(0,pH.buildLowerAlphaArbitrary)([]),i=(0,zHe.stringOf)(r,{minLength:2,maxLength:63,size:n});return(0,Aq.convertFromNext)((0,dwn.adapter)((0,Aq.convertToNext)((0,hH.tuple)((0,fwn.array)(vwn(t),{size:n,minLength:1,maxLength:127}),i)),ywn).map(mwn,gwn))}RM.domain=bwn;Object.defineProperty(WV,"__esModule",{value:!0});WV.emailAddress=void 0;const $wn=gi,Iwn=AM,_wn=RM,Swn=wv,wwn=Ci,AU=Ye,Awn=pj;function Mwn(e){let t=e[0].length;for(let n=1;n!==e.length;++n)if(t+=1+e[n].length,t>64)return{adapted:!0,value:e.slice(0,n)};return{adapted:!1,value:e}}function Rwn(e){return e.join(".")}function Own(e){if(typeof e!="string")throw new Error("Unsupported");return e.split(".")}function Ewn(e){return`${e[0]}@${e[1]}`}function Twn(e){if(typeof e!="string")throw new Error("Unsupported");return e.split("@",2)}function Cwn(e={}){const t=["!","#","$","%","&","'","*","+","-","/","=","?","^","_","`","{","|","}","~"],n=(0,Iwn.buildLowerAlphaNumericArbitrary)(t),r=(0,AU.convertFromNext)((0,Awn.adapter)((0,AU.convertToNext)((0,$wn.array)((0,Swn.stringOf)(n,{minLength:1,maxLength:64,size:e.size}),{minLength:1,maxLength:32,size:e.size})),Mwn).map(Rwn,Own));return(0,AU.convertFromNext)((0,AU.convertToNext)((0,wwn.tuple)(r,(0,_wn.domain)({size:e.size}))).map(Ewn,Twn))}WV.emailAddress=Cwn;var H$={},jV={},kV={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.logLike64=e.halve64=e.add64=e.negative64=e.substract64=e.clone64=e.isStrictlySmaller64=e.isEqual64=e.isStrictlyPositive64=e.isStrictlyNegative64=e.isZero64=e.Unit64=e.Zero64=void 0,e.Zero64={sign:1,data:[0,0]},e.Unit64={sign:1,data:[0,1]};function t(h){return h.data[0]===0&&h.data[1]===0}e.isZero64=t;function n(h){return h.sign===-1&&!t(h)}e.isStrictlyNegative64=n;function r(h){return h.sign===1&&!t(h)}e.isStrictlyPositive64=r;function i(h,$){return h.data[0]===$.data[0]&&h.data[1]===$.data[1]?h.sign===$.sign||h.data[0]===0&&h.data[1]===0:!1}e.isEqual64=i;function a(h,$){return h[0]<$[0]||h[0]===$[0]&&h[1]<$[1]}function o(h,$){return h.sign===$.sign?h.sign===1?a(h.data,$.data):a($.data,h.data):h.sign===-1&&(!t(h)||!t($))}e.isStrictlySmaller64=o;function u(h){return{sign:h.sign,data:[h.data[0],h.data[1]]}}e.clone64=u;function c(h,$){let b=0,y=h[1]-$[1];return y<0&&(b=1,y=y>>>0),[h[0]-$[0]-b,y]}function f(h,$){if(h.sign===1&&$.sign===-1){const b=h.data[1]+$.data[1];return{sign:1,data:[h.data[0]+$.data[0]+(b>4294967295?1:0)>>>0,b>>>0]}}return{sign:1,data:h.sign===1?c(h.data,$.data):c($.data,h.data)}}function s(h,$){if(o(h,$)){const b=f($,h);return b.sign=-1,b}return f(h,$)}e.substract64=s;function l(h){return{sign:-h.sign,data:[h.data[0],h.data[1]]}}e.negative64=l;function d(h,$){return t($)?t(h)?u(e.Zero64):u(h):s(h,l($))}e.add64=d;function p(h){return{sign:h.sign,data:[Math.floor(h.data[0]/2),(h.data[0]%2===1?2147483648:0)+Math.floor(h.data[1]/2)]}}e.halve64=p;function v(h){return{sign:h.sign,data:[0,Math.floor(Math.log(h.data[0]*4294967296+h.data[1])/Math.log(2))]}}e.logLike64=v})(kV);var UV={};Object.defineProperty(UV,"__esModule",{value:!0});UV.arrayInt64=void 0;const D$e=Rn,Pwn=Ye,Fwn=$r,j7=Tr,Xt=kV;class Nse extends Fwn.NextArbitrary{constructor(t,n){super(),this.min=t,this.max=n,this.biasedRanges=null}generate(t,n){const r=this.computeGenerateRange(t,n),i=t.nextArrayInt(r.min,r.max);return i.data.length===1&&i.data.unshift(0),new j7.NextValue(i,void 0)}computeGenerateRange(t,n){if(n===void 0||t.nextInt(1,n)!==1)return{min:this.min,max:this.max};const r=this.retrieveBiasedRanges();if(r.length===1)return r[0];const i=t.nextInt(-2*(r.length-1),r.length-2);return i<0?r[0]:r[i+1]}canShrinkWithoutContext(t){const n=t;return typeof t=="object"&&t!==null&&(n.sign===-1||n.sign===1)&&Array.isArray(n.data)&&n.data.length===2&&((0,Xt.isStrictlySmaller64)(this.min,n)&&(0,Xt.isStrictlySmaller64)(n,this.max)||(0,Xt.isEqual64)(this.min,n)||(0,Xt.isEqual64)(this.max,n))}shrinkArrayInt64(t,n,r){const i=(0,Xt.substract64)(t,n);function*a(){let o=r?void 0:n;const u=r?i:(0,Xt.halve64)(i);for(let c=u;!(0,Xt.isZero64)(c);c=(0,Xt.halve64)(c)){const f=(0,Xt.substract64)(t,c);yield new j7.NextValue(f,o),o=f}}return(0,D$e.stream)(a())}shrink(t,n){if(!Nse.isValidContext(t,n)){const r=this.defaultTarget();return this.shrinkArrayInt64(t,r,!0)}return this.isLastChanceTry(t,n)?D$e.Stream.of(new j7.NextValue(n,void 0)):this.shrinkArrayInt64(t,n,!1)}defaultTarget(){return!(0,Xt.isStrictlyPositive64)(this.min)&&!(0,Xt.isStrictlyNegative64)(this.max)?Xt.Zero64:(0,Xt.isStrictlyNegative64)(this.min)?this.max:this.min}isLastChanceTry(t,n){return(0,Xt.isZero64)(t)?!1:t.sign===1?(0,Xt.isEqual64)(t,(0,Xt.add64)(n,Xt.Unit64))&&(0,Xt.isStrictlyPositive64)((0,Xt.substract64)(t,this.min)):(0,Xt.isEqual64)(t,(0,Xt.substract64)(n,Xt.Unit64))&&(0,Xt.isStrictlyNegative64)((0,Xt.substract64)(t,this.max))}static isValidContext(t,n){if(n===void 0)return!1;if(typeof n!="object"||n===null||!("sign"in n)||!("data"in n))throw new Error("Invalid context type passed to ArrayInt64Arbitrary (#1)");return!0}retrieveBiasedRanges(){if(this.biasedRanges!=null)return this.biasedRanges;if((0,Xt.isEqual64)(this.min,this.max))return this.biasedRanges=[{min:this.min,max:this.max}],this.biasedRanges;const t=(0,Xt.isStrictlyNegative64)(this.min),n=(0,Xt.isStrictlyPositive64)(this.max);if(t&&n){const r=(0,Xt.logLike64)(this.min),i=(0,Xt.logLike64)(this.max);this.biasedRanges=[{min:r,max:i},{min:(0,Xt.substract64)(this.max,i),max:this.max},{min:this.min,max:(0,Xt.substract64)(this.min,r)}]}else{const r=(0,Xt.logLike64)((0,Xt.substract64)(this.max,this.min)),i={min:this.min,max:(0,Xt.add64)(this.min,r)},a={min:(0,Xt.substract64)(this.max,r),max:this.max};this.biasedRanges=t?[a,i]:[i,a]}return this.biasedRanges}}function Wwn(e,t){const n=new Nse(e,t);return(0,Pwn.convertFromNextWithShrunkOnce)(n,n.defaultTarget())}UV.arrayInt64=Wwn;var wm={};Object.defineProperty(wm,"__esModule",{value:!0});wm.indexToDouble=wm.doubleToIndex=wm.decomposeDouble=void 0;const vH=kV,KHe={sign:1,data:[2146435072,0]},Nwn={sign:-1,data:[2146435072,1]};function GHe(e){const t=2-Number.EPSILON;for(let n=-1022;n!==1024;++n){const r=2**n,i=t*r;if(Math.abs(e)<=i)return{exponent:n,significand:e/r}}return{exponent:Number.NaN,significand:Number.NaN}}wm.decomposeDouble=GHe;function L$e(e){return[~~(e/4294967296),e>>>0]}function B$e(e,t){if(e===-1022){const a=t*4503599627370496;return L$e(a)}const n=(t-1)*2**52,r=(e+1023)*2**20,i=L$e(n);return i[0]+=r,i}function jwn(e){if(e===Number.POSITIVE_INFINITY)return(0,vH.clone64)(KHe);if(e===Number.NEGATIVE_INFINITY)return(0,vH.clone64)(Nwn);const t=GHe(e),n=t.exponent,r=t.significand;if(e>0||e===0&&1/e===Number.POSITIVE_INFINITY)return{sign:1,data:B$e(n,r)};{const i=B$e(n,-r);return i[1]===4294967295?(i[0]+=1,i[1]=0):i[1]+=1,{sign:-1,data:i}}}wm.doubleToIndex=jwn;function HHe(e){if(e.sign===-1){const 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,-HHe(i)}if((0,vH.isEqual64)(e,KHe))return Number.POSITIVE_INFINITY;if(e.data[0]<2097152)return(e.data[0]*4294967296+e.data[1])*2**-1074;const t=e.data[0]-2097152,n=-1021+(t>>20);return(1+((t&1048575)*2**32+e.data[1])*Number.EPSILON)*2**n}wm.indexToDouble=HHe;Object.defineProperty(jV,"__esModule",{value:!0});jV.doubleNext=void 0;const Rp=kV,V$e=UV,pE=wm,MU=Ye;function z$e(e,t){if(Number.isNaN(e))throw new Error("fc.doubleNext constraints."+t+" must be a 32-bit float");return(0,pE.doubleToIndex)(e)}function kwn(e){if(typeof e!="number")throw new Error("Unsupported type");return(0,pE.doubleToIndex)(e)}function Uwn(e={}){const{noDefaultInfinity:t=!1,noNaN:n=!1,min:r=t?-Number.MAX_VALUE:Number.NEGATIVE_INFINITY,max:i=t?Number.MAX_VALUE:Number.POSITIVE_INFINITY}=e,a=z$e(r,"min"),o=z$e(i,"max");if((0,Rp.isStrictlySmaller64)(o,a))throw new Error("fc.doubleNext constraints.min must be smaller or equal to constraints.max");if(n)return(0,MU.convertFromNext)((0,MU.convertToNext)((0,V$e.arrayInt64)(a,o)).map(pE.indexToDouble,kwn));const u=(0,Rp.isStrictlyPositive64)(o),c=u?a:(0,Rp.substract64)(a,Rp.Unit64),f=u?(0,Rp.add64)(o,Rp.Unit64):o;return(0,MU.convertFromNext)((0,MU.convertToNext)((0,V$e.arrayInt64)(c,f)).map(s=>(0,Rp.isStrictlySmaller64)(o,s)||(0,Rp.isStrictlySmaller64)(s,a)?Number.NaN:(0,pE.indexToDouble)(s),s=>{if(typeof s!="number")throw new Error("Unsupported type");return Number.isNaN(s)?(0,Rp.isEqual64)(o,f)?c:f:(0,pE.doubleToIndex)(s)}))}jV.doubleNext=Uwn;Object.defineProperty(H$,"__esModule",{value:!0});H$.double=void 0;const qwn=yi,xwn=Ci,Dwn=jV;function K$e(e){return(0,qwn.integer)(0,(1<(0,xwn.tuple)(K$e(26),K$e(27)).map(e=>(e[0]*Lwn+e[1])*Bwn);function Vwn(...e){if(typeof e[0]=="object"){if(e[0].next)return(0,Dwn.doubleNext)(e[0]);const t=e[0].min!==void 0?e[0].min:0,n=e[0].max!==void 0?e[0].max:1;return RU().map(r=>t+r*(n-t)).filter(r=>r!==n||r===t)}else{const t=e[0],n=e[1];return t===void 0?RU():n===void 0?RU().map(r=>r*t).filter(r=>r!==t||r===0):RU().map(r=>t+r*(n-t)).filter(r=>r!==n||r===t)}}H$.double=Vwn;var hj={},qV={},wu={};Object.defineProperty(wu,"__esModule",{value:!0});wu.indexToFloat=wu.floatToIndex=wu.decomposeFloat=wu.EPSILON_32=wu.MAX_VALUE_32=wu.MIN_VALUE_32=void 0;wu.MIN_VALUE_32=2**-126*2**-23;wu.MAX_VALUE_32=2**127*(1+(2**23-1)/2**23);wu.EPSILON_32=2**-23;const JHe=2139095040,zwn=-2139095041;function YHe(e){const t=1.9999998807907104;for(let n=-126;n!==128;++n){const r=2**n,i=t*r;if(Math.abs(e)<=i)return{exponent:n,significand:e/r}}return{exponent:Number.NaN,significand:Number.NaN}}wu.decomposeFloat=YHe;function G$e(e,t){return e===-126?t*8388608:(e+127)*8388608+(t-1)*8388608}function Kwn(e){if(e===Number.POSITIVE_INFINITY)return JHe;if(e===Number.NEGATIVE_INFINITY)return zwn;const t=YHe(e),n=t.exponent,r=t.significand;return Number.isNaN(n)||Number.isNaN(r)||!Number.isInteger(r*8388608)?Number.NaN:e>0||e===0&&1/e===Number.POSITIVE_INFINITY?G$e(n,r):-G$e(n,-r)-1}wu.floatToIndex=Kwn;function ZHe(e){if(e<0)return-ZHe(-e-1);if(e===JHe)return Number.POSITIVE_INFINITY;if(e<16777216)return e*2**-149;const t=e-16777216,n=-125+(t>>23);return(1+(t&8388607)/8388608)*2**n}wu.indexToFloat=ZHe;Object.defineProperty(qV,"__esModule",{value:!0});qV.floatNext=void 0;const H$e=yi,Up=wu,OU=Ye;function J$e(e,t){const n="you can convert any double to a 32-bit float by using `new Float32Array([myDouble])[0]`",r="fc.floatNext constraints."+t+" must be a 32-bit float - "+n;if(Number.isNaN(e)||Number.isFinite(e)&&(e<-Up.MAX_VALUE_32||e>Up.MAX_VALUE_32))throw new Error(r);const i=(0,Up.floatToIndex)(e);if(!Number.isInteger(i))throw new Error(r);return i}function Gwn(e){if(typeof e!="number")throw new Error("Unsupported type");return(0,Up.floatToIndex)(e)}function Hwn(e={}){const{noDefaultInfinity:t=!1,noNaN:n=!1,min:r=t?-Up.MAX_VALUE_32:Number.NEGATIVE_INFINITY,max:i=t?Up.MAX_VALUE_32:Number.POSITIVE_INFINITY}=e,a=J$e(r,"min"),o=J$e(i,"max");if(a>o)throw new Error("fc.floatNext constraints.min must be smaller or equal to constraints.max");if(n)return(0,OU.convertFromNext)((0,OU.convertToNext)((0,H$e.integer)({min:a,max:o})).map(Up.indexToFloat,Gwn));const u=o>0?a:a-1,c=o>0?o+1:o;return(0,OU.convertFromNext)((0,OU.convertToNext)((0,H$e.integer)({min:u,max:c})).map(f=>f>o||f{if(typeof f!="number")throw new Error("Unsupported type");return Number.isNaN(f)?o!==c?c:u:(0,Up.floatToIndex)(f)}))}qV.floatNext=Hwn;Object.defineProperty(hj,"__esModule",{value:!0});hj.float=void 0;const Jwn=qV,Ywn=yi;function Zwn(e){return(0,Ywn.integer)(0,(1<Zwn(24).map(e=>e/(1<<24));function Xwn(...e){if(typeof e[0]=="object"){if(e[0].next)return(0,Jwn.floatNext)(e[0]);const t=e[0].min!==void 0?e[0].min:0,n=e[0].max!==void 0?e[0].max:1;return EU().map(r=>t+r*(n-t)).filter(r=>r!==n||r===t)}else{const t=e[0],n=e[1];return t===void 0?EU():n===void 0?EU().map(r=>r*t).filter(r=>r!==t||r===0):EU().map(r=>t+r*(n-t)).filter(r=>r!==n||r===t)}}hj.float=Xwn;var xV={},vj={},Bm={};Object.defineProperty(Bm,"__esModule",{value:!0});Bm.escapeForMultilineComments=Bm.escapeForTemplateString=void 0;function Qwn(e){return e.replace(/([$`\\])/g,"\\$1").replace(/\r/g,"\\r")}Bm.escapeForTemplateString=Qwn;function eAn(e){return e.replace(/\*\//g,"*\\/")}Bm.escapeForMultilineComments=eAn;var OM={};Object.defineProperty(OM,"__esModule",{value:!0});OM.hash=void 0;const oc=[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 tAn(e){let t=4294967295;for(let n=0;n>8;else if(r<2048)t=oc[t&255^(192|r>>6&31)]^t>>8,t=oc[t&255^(128|r&63)]^t>>8;else if(r>=55296&&r<57344){const i=e.charCodeAt(++n);if(r>=56320||i<56320||i>57343||Number.isNaN(i))n-=1,t=oc[t&255^239]^t>>8,t=oc[t&255^191]^t>>8,t=oc[t&255^189]^t>>8;else{const a=(r&1023)+64,o=i&1023;t=oc[t&255^(240|a>>8&7)]^t>>8,t=oc[t&255^(128|a>>2&63)]^t>>8,t=oc[t&255^(128|o>>6&15|(a&3)<<4)]^t>>8,t=oc[t&255^(128|o&63)]^t>>8}}else t=oc[t&255^(224|r>>12&15)]^t>>8,t=oc[t&255^(128|r>>6&63)]^t>>8,t=oc[t&255^(128|r&63)]^t>>8}return(t|0)+2147483648}OM.hash=tAn;Object.defineProperty(vj,"__esModule",{value:!0});vj.buildCompareFunctionArbitrary=void 0;const nAn=Bm,rAn=Do,Y$e=OM,k7=ep,Z$e=yi,iAn=Ci;function aAn(e){return(0,iAn.tuple)((0,Z$e.integer)().noShrink(),(0,Z$e.integer)(1,4294967295).noShrink()).map(([t,n])=>{const r=()=>{const i={};return Object.assign((o,u)=>{const c=(0,k7.stringify)(o),f=(0,k7.stringify)(u),s=(0,Y$e.hash)(`${t}${c}`)%n,l=(0,Y$e.hash)(`${t}${f}`)%n,d=e(s,l);return i[`[${c},${f}]`]=d,d},{toString:()=>{const o=Object.keys(i).sort().map(u=>`${u} => ${(0,k7.stringify)(i[u])}`).map(u=>`/* ${(0,nAn.escapeForMultilineComments)(u)} */`);return`function(a, b) { // With hash and stringify coming from fast-check${o.length!==0?` ${o.join(` `)}`:""} const cmp = ${e}; const hA = hash('${t}' + stringify(a)) % ${n}; const hB = hash('${t}' + stringify(b)) % ${n}; return cmp(hA, hB); }`},[rAn.cloneMethod]:r})};return r()})}vj.buildCompareFunctionArbitrary=aAn;Object.defineProperty(xV,"__esModule",{value:!0});xV.compareBooleanFunc=void 0;const oAn=vj;function uAn(){return(0,oAn.buildCompareFunctionArbitrary)(Object.assign((e,t)=>e hA < hB"}}))}xV.compareBooleanFunc=uAn;var DV={};Object.defineProperty(DV,"__esModule",{value:!0});DV.compareFunc=void 0;const cAn=vj;function fAn(){return(0,cAn.buildCompareFunctionArbitrary)(Object.assign((e,t)=>e-t,{toString(){return"(hA, hB) => hA - hB"}}))}DV.compareFunc=fAn;var LV={};Object.defineProperty(LV,"__esModule",{value:!0});LV.func=void 0;const sAn=OM,jy=ep,U7=Do,lAn=gi,dAn=yi,pAn=Ci,hAn=Bm;function vAn(e){return(0,pAn.tuple)((0,lAn.array)(e,{minLength:1}),(0,dAn.integer)().noShrink()).map(([t,n])=>{const r=()=>{const i={},a=(...u)=>{const c=(0,jy.stringify)(u),f=t[(0,sAn.hash)(`${n}${c}`)%t.length];return i[c]=f,(0,U7.hasCloneMethod)(f)?f[U7.cloneMethod]():f};function o(u){const c=Object.keys(i).sort().map(f=>`${f} => ${(0,jy.stringify)(i[f])}`).map(f=>`/* ${(0,hAn.escapeForMultilineComments)(f)} */`);return`function(...args) { // With hash and stringify coming from fast-check${c.length!==0?` ${c.join(` `)}`:""} const outs = ${u}; return outs[hash('${n}' + stringify(args)) % outs.length]; }`}return Object.defineProperties(a,{toString:{value:()=>o((0,jy.stringify)(t))},[jy.toStringMethod]:{value:()=>o((0,jy.stringify)(t))},[jy.asyncToStringMethod]:{value:async()=>o(await(0,jy.asyncStringify)(t))},[U7.cloneMethod]:{value:r,configurable:!0}})};return r()})}LV.func=vAn;var mj={};Object.defineProperty(mj,"__esModule",{value:!0});mj.maxSafeInteger=void 0;const mAn=Ye,gAn=Qg;function yAn(){const e=new gAn.IntegerArbitrary(Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER);return(0,mAn.convertFromNextWithShrunkOnce)(e,e.defaultTarget())}mj.maxSafeInteger=yAn;var BV={};Object.defineProperty(BV,"__esModule",{value:!0});BV.maxSafeNat=void 0;const bAn=Ye,$An=Qg;function IAn(){const e=new $An.IntegerArbitrary(0,Number.MAX_SAFE_INTEGER);return(0,bAn.convertFromNextWithShrunkOnce)(e,e.defaultTarget())}BV.maxSafeNat=IAn;var EM={},zp={};Object.defineProperty(zp,"__esModule",{value:!0});zp.natToStringifiedNatUnmapper=zp.tryParseStringifiedNat=zp.natToStringifiedNatMapper=void 0;function _An(e){const[t,n]=e;switch(t){case"oct":return`0${Number(n).toString(8)}`;case"hex":return`0x${Number(n).toString(16)}`;case"dec":default:return`${n}`}}zp.natToStringifiedNatMapper=_An;function I2(e,t){const n=Number.parseInt(e,t);if(n.toString(t)!==e)throw new Error("Invalid value");return n}zp.tryParseStringifiedNat=I2;function SAn(e){if(typeof e!="string")throw new Error("Invalid type");return e.length>=2&&e[0]==="0"?e[1]==="x"?["hex",I2(e.substr(2),16)]:["oct",I2(e.substr(1),8)]:["dec",I2(e,10)]}zp.natToStringifiedNatUnmapper=SAn;Object.defineProperty(EM,"__esModule",{value:!0});EM.ipV4=void 0;const X$e=Ye,TU=ey,wAn=Ci,AAn=zp;function MAn(e){return e.join(".")}function RAn(e){if(typeof e!="string")throw new Error("Invalid type");return e.split(".").map(t=>(0,AAn.tryParseStringifiedNat)(t,10))}function OAn(){return(0,X$e.convertFromNext)((0,X$e.convertToNext)((0,wAn.tuple)((0,TU.nat)(255),(0,TU.nat)(255),(0,TU.nat)(255),(0,TU.nat)(255))).map(MAn,RAn))}EM.ipV4=OAn;var gj={},np={};Object.defineProperty(np,"__esModule",{value:!0});np.oneof=void 0;const Q$e=MM;function EAn(e){return e!=null&&typeof e=="object"&&!("generate"in e)}function TAn(...e){const t=e[0];if(EAn(t)){const r=e.slice(1).map(i=>({arbitrary:i,weight:1}));return Q$e.FrequencyArbitrary.fromOld(r,t,"fc.oneof")}const n=e.map(r=>({arbitrary:r,weight:1}));return Q$e.FrequencyArbitrary.fromOld(n,{},"fc.oneof")}np.oneof=TAn;var VV={};Object.defineProperty(VV,"__esModule",{value:!0});VV.buildStringifiedNatArbitrary=void 0;const e1e=Ye,CAn=z$,PAn=ey,FAn=Ci,t1e=zp;function WAn(e){return(0,e1e.convertFromNext)((0,e1e.convertToNext)((0,FAn.tuple)((0,CAn.constantFrom)("dec","oct","hex"),(0,PAn.nat)(e))).map(t1e.natToStringifiedNatMapper,t1e.natToStringifiedNatUnmapper))}VV.buildStringifiedNatArbitrary=WAn;Object.defineProperty(gj,"__esModule",{value:!0});gj.ipV4Extended=void 0;const NAn=np,q7=Ci,Cl=VV,P1=Ye;function x7(e){return e.join(".")}function D7(e){if(typeof e!="string")throw new Error("Invalid type");return e.split(".")}function jAn(){return(0,NAn.oneof)((0,P1.convertFromNext)((0,P1.convertToNext)((0,q7.tuple)((0,Cl.buildStringifiedNatArbitrary)(255),(0,Cl.buildStringifiedNatArbitrary)(255),(0,Cl.buildStringifiedNatArbitrary)(255),(0,Cl.buildStringifiedNatArbitrary)(255))).map(x7,D7)),(0,P1.convertFromNext)((0,P1.convertToNext)((0,q7.tuple)((0,Cl.buildStringifiedNatArbitrary)(255),(0,Cl.buildStringifiedNatArbitrary)(255),(0,Cl.buildStringifiedNatArbitrary)(65535))).map(x7,D7)),(0,P1.convertFromNext)((0,P1.convertToNext)((0,q7.tuple)((0,Cl.buildStringifiedNatArbitrary)(255),(0,Cl.buildStringifiedNatArbitrary)(16777215))).map(x7,D7)),(0,Cl.buildStringifiedNatArbitrary)(4294967295))}gj.ipV4Extended=jAn;var yj={},bj={},Os={};Object.defineProperty(Os,"__esModule",{value:!0});Os.codePointsToStringUnmapper=Os.codePointsToStringMapper=void 0;function kAn(e){return e.join("")}Os.codePointsToStringMapper=kAn;function UAn(e){if(typeof e!="string")throw new Error("Cannot unmap the passed value");return[...e]}Os.codePointsToStringUnmapper=UAn;Object.defineProperty(bj,"__esModule",{value:!0});bj.hexaString=void 0;const n1e=Ye,qAn=gi,xAn=rj,DAn=yl,r1e=Os;function LAn(...e){const t=(0,DAn.extractStringConstraints)(e);return(0,n1e.convertFromNext)((0,n1e.convertToNext)((0,qAn.array)((0,xAn.hexa)(),t)).map(r1e.codePointsToStringMapper,r1e.codePointsToStringUnmapper))}bj.hexaString=LAn;var cr={};Object.defineProperty(cr,"__esModule",{value:!0});cr.noTrailingUnmapper=cr.noTrailingMapper=cr.singleTrailingUnmapper=cr.singleTrailingMapper=cr.multiTrailingUnmapperOne=cr.multiTrailingMapperOne=cr.multiTrailingUnmapper=cr.multiTrailingMapper=cr.onlyTrailingUnmapper=cr.onlyTrailingMapper=cr.fullySpecifiedUnmapper=cr.fullySpecifiedMapper=void 0;function jse(e){return e.length===0?[]:e.split(":")}function kse(e){const t=e.split(":");return t.length>=2&&t[t.length-1].length<=4?[t.slice(0,t.length-2),`${t[t.length-2]}:${t[t.length-1]}`]:[t.slice(0,t.length-1),t[t.length-1]]}function BAn(e){return`${e[0].join(":")}:${e[1]}`}cr.fullySpecifiedMapper=BAn;function VAn(e){if(typeof e!="string")throw new Error("Invalid type");return kse(e)}cr.fullySpecifiedUnmapper=VAn;function zAn(e){return`::${e[0].join(":")}:${e[1]}`}cr.onlyTrailingMapper=zAn;function KAn(e){if(typeof e!="string")throw new Error("Invalid type");if(!e.startsWith("::"))throw new Error("Invalid value");return kse(e.substring(2))}cr.onlyTrailingUnmapper=KAn;function XHe(e){return`${e[0].join(":")}::${e[1].join(":")}:${e[2]}`}cr.multiTrailingMapper=XHe;function QHe(e){if(typeof e!="string")throw new Error("Invalid type");const[t,n]=e.split("::",2),[r,i]=kse(n);return[jse(t),r,i]}cr.multiTrailingUnmapper=QHe;function GAn(e){return XHe([e[0],[e[1]],e[2]])}cr.multiTrailingMapperOne=GAn;function HAn(e){const t=QHe(e);return[t[0],t[1].join(":"),t[2]]}cr.multiTrailingUnmapperOne=HAn;function JAn(e){return`${e[0].join(":")}::${e[1]}`}cr.singleTrailingMapper=JAn;function YAn(e){if(typeof e!="string")throw new Error("Invalid type");const[t,n]=e.split("::",2);return[jse(t),n]}cr.singleTrailingUnmapper=YAn;function ZAn(e){return`${e[0].join(":")}::`}cr.noTrailingMapper=ZAn;function XAn(e){if(typeof e!="string")throw new Error("Invalid type");if(!e.endsWith("::"))throw new Error("Invalid value");return[jse(e.substring(0,e.length-2))]}cr.noTrailingUnmapper=XAn;Object.defineProperty(yj,"__esModule",{value:!0});yj.ipV6=void 0;const rf=gi,Wi=Ye,i1e=np,QAn=bj,Pl=Ci,eMn=EM,la=cr;function tMn([e,t]){return`${e}:${t}`}function nMn(e){if(typeof e!="string")throw new Error("Invalid type");if(!e.includes(":"))throw new Error("Invalid value");return e.split(":",2)}function rMn(){const e=(0,QAn.hexaString)({minLength:1,maxLength:4,size:"max"}),t=(0,i1e.oneof)((0,Wi.convertFromNext)((0,Wi.convertToNext)((0,Pl.tuple)(e,e)).map(tMn,nMn)),(0,eMn.ipV4)());return(0,i1e.oneof)((0,Wi.convertFromNext)((0,Wi.convertToNext)((0,Pl.tuple)((0,rf.array)(e,{minLength:6,maxLength:6,size:"max"}),t)).map(la.fullySpecifiedMapper,la.fullySpecifiedUnmapper)),(0,Wi.convertFromNext)((0,Wi.convertToNext)((0,Pl.tuple)((0,rf.array)(e,{minLength:5,maxLength:5,size:"max"}),t)).map(la.onlyTrailingMapper,la.onlyTrailingUnmapper)),(0,Wi.convertFromNext)((0,Wi.convertToNext)((0,Pl.tuple)((0,rf.array)(e,{minLength:0,maxLength:1,size:"max"}),(0,rf.array)(e,{minLength:4,maxLength:4,size:"max"}),t)).map(la.multiTrailingMapper,la.multiTrailingUnmapper)),(0,Wi.convertFromNext)((0,Wi.convertToNext)((0,Pl.tuple)((0,rf.array)(e,{minLength:0,maxLength:2,size:"max"}),(0,rf.array)(e,{minLength:3,maxLength:3,size:"max"}),t)).map(la.multiTrailingMapper,la.multiTrailingUnmapper)),(0,Wi.convertFromNext)((0,Wi.convertToNext)((0,Pl.tuple)((0,rf.array)(e,{minLength:0,maxLength:3,size:"max"}),(0,rf.array)(e,{minLength:2,maxLength:2,size:"max"}),t)).map(la.multiTrailingMapper,la.multiTrailingUnmapper)),(0,Wi.convertFromNext)((0,Wi.convertToNext)((0,Pl.tuple)((0,rf.array)(e,{minLength:0,maxLength:4,size:"max"}),e,t)).map(la.multiTrailingMapperOne,la.multiTrailingUnmapperOne)),(0,Wi.convertFromNext)((0,Wi.convertToNext)((0,Pl.tuple)((0,rf.array)(e,{minLength:0,maxLength:5,size:"max"}),t)).map(la.singleTrailingMapper,la.singleTrailingUnmapper)),(0,Wi.convertFromNext)((0,Wi.convertToNext)((0,Pl.tuple)((0,rf.array)(e,{minLength:0,maxLength:6,size:"max"}),e)).map(la.singleTrailingMapper,la.singleTrailingUnmapper)),(0,Wi.convertFromNext)((0,Wi.convertToNext)((0,Pl.tuple)((0,rf.array)(e,{minLength:0,maxLength:7,size:"max"}))).map(la.noTrailingMapper,la.noTrailingUnmapper)))}yj.ipV6=rMn;var $j={},zV={};Object.defineProperty(zV,"__esModule",{value:!0});zV.LazyArbitrary=void 0;const iMn=$r;class aMn extends iMn.NextArbitrary{constructor(t){super(),this.name=t,this.underlying=null}generate(t,n){if(!this.underlying)throw new Error(`Lazy arbitrary ${JSON.stringify(this.name)} not correctly initialized`);return this.underlying.generate(t,n)}canShrinkWithoutContext(t){if(!this.underlying)throw new Error(`Lazy arbitrary ${JSON.stringify(this.name)} not correctly initialized`);return this.underlying.canShrinkWithoutContext(t)}shrink(t,n){if(!this.underlying)throw new Error(`Lazy arbitrary ${JSON.stringify(this.name)} not correctly initialized`);return this.underlying.shrink(t,n)}}zV.LazyArbitrary=aMn;Object.defineProperty($j,"__esModule",{value:!0});$j.letrec=void 0;const a1e=zV,o1e=Ye;function oMn(e){const t=Object.create(null),r=e(i=>(Object.prototype.hasOwnProperty.call(t,i)||(t[i]=new a1e.LazyArbitrary(String(i))),(0,o1e.convertFromNext)(t[i])));for(const i in r){if(!Object.prototype.hasOwnProperty.call(r,i))continue;const a=t[i],o=a!==void 0?a:new a1e.LazyArbitrary(i);o.underlying=(0,o1e.convertToNext)(r[i]),t[i]=o}return r}$j.letrec=oMn;var KV={},Au={};Object.defineProperty(Au,"__esModule",{value:!0});Au.sentencesToParagraphUnmapper=Au.sentencesToParagraphMapper=Au.wordsToSentenceUnmapperFor=Au.wordsToSentenceMapper=Au.wordsToJoinedStringUnmapperFor=Au.wordsToJoinedStringMapper=void 0;function uMn(e){return e.map(t=>t[t.length-1]===","?t.substr(0,t.length-1):t).join(" ")}Au.wordsToJoinedStringMapper=uMn;function cMn(e){return function(n){if(typeof n!="string")throw new Error("Unsupported type");const r=[];for(const i of n.split(" "))if(e.canShrinkWithoutContext(i))r.push(i);else if(e.canShrinkWithoutContext(i+","))r.push(i+",");else throw new Error("Unsupported word");return r}}Au.wordsToJoinedStringUnmapperFor=cMn;function fMn(e){let t=e.join(" ");return t[t.length-1]===","&&(t=t.substr(0,t.length-1)),t[0].toUpperCase()+t.substring(1)+"."}Au.wordsToSentenceMapper=fMn;function sMn(e){return function(n){if(typeof n!="string")throw new Error("Unsupported type");if(n.length<2||n[n.length-1]!=="."||n[n.length-2]===","||n[0].toLowerCase().toUpperCase()!==n[0])throw new Error("Unsupported value");const r=n[0].toLowerCase()+n.substring(1,n.length-1),i=[],a=r.split(" ");for(let o=0;o!==a.length;++o){const u=a[o];if(e.canShrinkWithoutContext(u))i.push(u);else if(o===a.length-1&&e.canShrinkWithoutContext(u+","))i.push(u+",");else throw new Error("Unsupported word")}return i}}Au.wordsToSentenceUnmapperFor=sMn;function lMn(e){return e.join(" ")}Au.sentencesToParagraphMapper=lMn;function dMn(e){if(typeof e!="string")throw new Error("Unsupported type");const t=e.split(". ");for(let n=0;n({arbitrary:(0,pMn.constant)(e),weight:t});function vMn(){return(0,hMn.frequency)($e("non",6),$e("adipiscing",5),$e("ligula",5),$e("enim",5),$e("pellentesque",5),$e("in",5),$e("augue",5),$e("et",5),$e("nulla",5),$e("lorem",4),$e("sit",4),$e("sed",4),$e("diam",4),$e("fermentum",4),$e("ut",4),$e("eu",4),$e("aliquam",4),$e("mauris",4),$e("vitae",4),$e("felis",4),$e("ipsum",3),$e("dolor",3),$e("amet,",3),$e("elit",3),$e("euismod",3),$e("mi",3),$e("orci",3),$e("erat",3),$e("praesent",3),$e("egestas",3),$e("leo",3),$e("vel",3),$e("sapien",3),$e("integer",3),$e("curabitur",3),$e("convallis",3),$e("purus",3),$e("risus",2),$e("suspendisse",2),$e("lectus",2),$e("nec,",2),$e("ultricies",2),$e("sed,",2),$e("cras",2),$e("elementum",2),$e("ultrices",2),$e("maecenas",2),$e("massa,",2),$e("varius",2),$e("a,",2),$e("semper",2),$e("proin",2),$e("nec",2),$e("nisl",2),$e("amet",2),$e("duis",2),$e("congue",2),$e("libero",2),$e("vestibulum",2),$e("pede",2),$e("blandit",2),$e("sodales",2),$e("ante",2),$e("nibh",2),$e("ac",2),$e("aenean",2),$e("massa",2),$e("suscipit",2),$e("sollicitudin",2),$e("fusce",2),$e("tempus",2),$e("aliquam,",2),$e("nunc",2),$e("ullamcorper",2),$e("rhoncus",2),$e("metus",2),$e("faucibus,",2),$e("justo",2),$e("magna",2),$e("at",2),$e("tincidunt",2),$e("consectetur",1),$e("tortor,",1),$e("dignissim",1),$e("congue,",1),$e("non,",1),$e("porttitor,",1),$e("nonummy",1),$e("molestie,",1),$e("est",1),$e("eleifend",1),$e("mi,",1),$e("arcu",1),$e("scelerisque",1),$e("vitae,",1),$e("consequat",1),$e("in,",1),$e("pretium",1),$e("volutpat",1),$e("pharetra",1),$e("tempor",1),$e("bibendum",1),$e("odio",1),$e("dui",1),$e("primis",1),$e("faucibus",1),$e("luctus",1),$e("posuere",1),$e("cubilia",1),$e("curae,",1),$e("hendrerit",1),$e("velit",1),$e("mauris,",1),$e("gravida",1),$e("ornare",1),$e("ut,",1),$e("pulvinar",1),$e("varius,",1),$e("turpis",1),$e("nibh,",1),$e("eros",1),$e("id",1),$e("aliquet",1),$e("quis",1),$e("lobortis",1),$e("consectetuer",1),$e("morbi",1),$e("vehicula",1),$e("tortor",1),$e("tellus,",1),$e("id,",1),$e("eu,",1),$e("quam",1),$e("feugiat,",1),$e("posuere,",1),$e("iaculis",1),$e("lectus,",1),$e("tristique",1),$e("mollis,",1),$e("nisl,",1),$e("vulputate",1),$e("sem",1),$e("vivamus",1),$e("placerat",1),$e("imperdiet",1),$e("cursus",1),$e("rutrum",1),$e("iaculis,",1),$e("augue,",1),$e("lacus",1))}function mMn(...e){const t=typeof e[0]=="object"?e[0].maxCount:e[0],n=typeof e[0]=="object"?e[0].mode==="sentences":e[1],r=typeof e[0]=="object"?e[0].size:void 0,i=t!==void 0?t:5;if(i<1)throw new Error("lorem has to produce at least one word/sentence");const a=vMn(),o=(0,ky.convertToNext)(a);if(n){const u=(0,ky.convertToNext)((0,L7.array)(a,{minLength:1,size:"small"})).map(F1.wordsToSentenceMapper,(0,F1.wordsToSentenceUnmapperFor)(o));return(0,ky.convertFromNext)((0,ky.convertToNext)((0,L7.array)((0,ky.convertFromNext)(u),{minLength:1,maxLength:i,size:r})).map(F1.sentencesToParagraphMapper,F1.sentencesToParagraphUnmapper))}else return(0,ky.convertFromNext)((0,ky.convertToNext)((0,L7.array)(a,{minLength:1,maxLength:i,size:r})).map(F1.wordsToJoinedStringMapper,(0,F1.wordsToJoinedStringUnmapperFor)(o)))}KV.lorem=mMn;var GV={};Object.defineProperty(GV,"__esModule",{value:!0});GV.memo=void 0;let CU=10;function gMn(e){const t={};return n=>{const r=n!==void 0?n:CU;if(!Object.prototype.hasOwnProperty.call(t,r)){const i=CU;CU=r-1,t[r]=e(r),CU=i}return t[r]}}GV.memo=gMn;var HV={},JV={},ff={};Object.defineProperty(ff,"__esModule",{value:!0});ff.applyFlagsOnChars=ff.computeFlagsFromChars=ff.computeTogglePositions=ff.computeNextFlags=ff.countToggledBits=void 0;function eJe(e){let t=0;for(;e>BigInt(0);)e&BigInt(1)&&++t,e>>=BigInt(1);return t}ff.countToggledBits=eJe;function yMn(e,t){const n=(BigInt(1)<{const u=[...o.value],c=(0,Op.computeTogglePositions)(u,this.toggleCase),f=(0,Op.computeNextFlags)(a,c.length);return(0,Op.applyFlagsOnChars)(u,f,c,this.toggleCase),new wO.NextValue(u.join(""),this.buildContextFor(o,new wO.NextValue(f,void 0)))}).join((0,SMn.makeLazy)(()=>{const o=[...i],u=(0,Op.computeTogglePositions)(o,this.toggleCase);return(0,c1e.convertToNext)((0,u1e.bigUintN)(u.length)).shrink(a,r.flagsContext).map(c=>{const f=o.slice();return(0,Op.applyFlagsOnChars)(f,c.value,u,this.toggleCase),new wO.NextValue(f.join(""),this.buildContextFor(new wO.NextValue(i,r.rawStringContext),c))})}))}}JV.MixedCaseArbitrary=wMn;Object.defineProperty(HV,"__esModule",{value:!0});HV.mixedCase=void 0;const f1e=Ye,AMn=JV;function MMn(e){const t=e.toUpperCase();return t!==e?t:e.toLowerCase()}function RMn(e,t){if(typeof BigInt>"u")throw new Error("mixedCase requires BigInt support");const n=t&&t.toggleCase||MMn,r=t&&t.untoggleAll;return(0,f1e.convertFromNext)(new AMn.MixedCaseArbitrary((0,f1e.convertToNext)(e),n,r))}HV.mixedCase=RMn;var YV={},Ij={},_j={};Object.defineProperty(_j,"__esModule",{value:!0});_j.float32Array=void 0;const OMn=hj,EMn=gi,s1e=Ye;function TMn(e){return Float32Array.from(e)}function CMn(e){if(!(e instanceof Float32Array))throw new Error("Unexpected type");return[...e]}function PMn(e={}){return(0,s1e.convertFromNext)((0,s1e.convertToNext)((0,EMn.array)((0,OMn.float)(Object.assign(Object.assign({},e),{next:!0})),e)).map(TMn,CMn))}_j.float32Array=PMn;var Sj={};Object.defineProperty(Sj,"__esModule",{value:!0});Sj.float64Array=void 0;const FMn=H$,WMn=gi,l1e=Ye;function NMn(e){return Float64Array.from(e)}function jMn(e){if(!(e instanceof Float64Array))throw new Error("Unexpected type");return[...e]}function kMn(e={}){return(0,l1e.convertFromNext)((0,l1e.convertToNext)((0,WMn.array)((0,FMn.double)(Object.assign(Object.assign({},e),{next:!0})),e)).map(NMn,jMn))}Sj.float64Array=kMn;var wj={},rp={},UMn=K&&K.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iu)throw new Error(`Invalid range passed to ${a}: min must be lower than or equal to max`);if(on)throw new Error(`Invalid max value passed to ${a}: max must be lower than or equal to ${n}`);return(0,d1e.convertFromNext)((0,d1e.convertToNext)((0,qMn.array)(i({min:o,max:u}),c)).map(f=>r.from(f),f=>{if(!(f instanceof r))throw new Error("Invalid type");return[...f]}))}rp.typedIntArrayArbitraryArbitraryBuilder=xMn;Object.defineProperty(wj,"__esModule",{value:!0});wj.int16Array=void 0;const DMn=yi,LMn=rp;function BMn(e={}){return(0,LMn.typedIntArrayArbitraryArbitraryBuilder)(e,-32768,32767,Int16Array,DMn.integer)}wj.int16Array=BMn;var Aj={};Object.defineProperty(Aj,"__esModule",{value:!0});Aj.int32Array=void 0;const VMn=yi,zMn=rp;function KMn(e={}){return(0,zMn.typedIntArrayArbitraryArbitraryBuilder)(e,-2147483648,2147483647,Int32Array,VMn.integer)}Aj.int32Array=KMn;var Mj={};Object.defineProperty(Mj,"__esModule",{value:!0});Mj.int8Array=void 0;const GMn=yi,HMn=rp;function JMn(e={}){return(0,HMn.typedIntArrayArbitraryArbitraryBuilder)(e,-128,127,Int8Array,GMn.integer)}Mj.int8Array=JMn;var Rj={};Object.defineProperty(Rj,"__esModule",{value:!0});Rj.uint16Array=void 0;const YMn=yi,ZMn=rp;function XMn(e={}){return(0,ZMn.typedIntArrayArbitraryArbitraryBuilder)(e,0,65535,Uint16Array,YMn.integer)}Rj.uint16Array=XMn;var Oj={};Object.defineProperty(Oj,"__esModule",{value:!0});Oj.uint32Array=void 0;const QMn=yi,eRn=rp;function tRn(e={}){return(0,eRn.typedIntArrayArbitraryArbitraryBuilder)(e,0,4294967295,Uint32Array,QMn.integer)}Oj.uint32Array=tRn;var Ej={};Object.defineProperty(Ej,"__esModule",{value:!0});Ej.uint8Array=void 0;const nRn=yi,rRn=rp;function iRn(e={}){return(0,rRn.typedIntArrayArbitraryArbitraryBuilder)(e,0,255,Uint8Array,nRn.integer)}Ej.uint8Array=iRn;var Tj={};Object.defineProperty(Tj,"__esModule",{value:!0});Tj.uint8ClampedArray=void 0;const aRn=yi,oRn=rp;function uRn(e={}){return(0,oRn.typedIntArrayArbitraryArbitraryBuilder)(e,0,255,Uint8ClampedArray,aRn.integer)}Tj.uint8ClampedArray=uRn;var Cj={},Pj={},ZV={};Object.defineProperty(ZV,"__esModule",{value:!0});ZV.WithShrinkFromOtherArbitrary=void 0;const cRn=$r,Mq=Tr;function fRn(e){return e!==void 0}function p1e(e){return e.hasToBeCloned?new Mq.NextValue(e.value_,{generatorContext:e.context},()=>e.value):new Mq.NextValue(e.value_,{generatorContext:e.context})}function h1e(e){return e.hasToBeCloned?new Mq.NextValue(e.value_,{shrinkerContext:e.context},()=>e.value):new Mq.NextValue(e.value_,{shrinkerContext:e.context})}class sRn extends cRn.NextArbitrary{constructor(t,n){super(),this.generatorArbitrary=t,this.shrinkerArbitrary=n}generate(t,n){return p1e(this.generatorArbitrary.generate(t,n))}canShrinkWithoutContext(t){return this.shrinkerArbitrary.canShrinkWithoutContext(t)}shrink(t,n){return fRn(n)?"generatorContext"in n?this.generatorArbitrary.shrink(t,n.generatorContext).map(p1e):this.shrinkerArbitrary.shrink(t,n.shrinkerContext).map(h1e):this.shrinkerArbitrary.shrink(t,void 0).map(h1e)}}ZV.WithShrinkFromOtherArbitrary=sRn;Object.defineProperty(Pj,"__esModule",{value:!0});Pj.restrictedIntegerArbitraryBuilder=void 0;const PU=Ye,v1e=yi,lRn=ZV;function dRn(e,t,n){const r=(0,PU.convertToNext)((0,v1e.integer)({min:e,max:t}));if(t===n)return(0,PU.convertFromNext)(r);const i=(0,PU.convertToNext)((0,v1e.integer)({min:e,max:n}));return(0,PU.convertFromNext)(new lRn.WithShrinkFromOtherArbitrary(r,i))}Pj.restrictedIntegerArbitraryBuilder=dRn;Object.defineProperty(Cj,"__esModule",{value:!0});Cj.sparseArray=void 0;const FU=Ye,m1e=Ci,pRn=K$,g1e=Pj,B7=gl;function hRn(e){let t=-1;for(let n=0;n!==e.length;++n)t=Math.max(t,e[n][0]);return t}function vRn(e,t){const n=Array(e);for(let r=0;r!==t.length;++r){const i=t[r];i[0]i)throw new Error("The minimal number of non-hole elements cannot be higher than the maximal length of the array");if(r>a)throw new Error("The minimal number of non-hole elements cannot be higher than the maximal number of non-holes");const s=Math.min(a,i),l=t.maxNumElements!==void 0||n!==void 0?n:"=",d=Math.max(f-1,0),p=Math.max(i-1,0),v=(0,FU.convertFromNext)((0,FU.convertToNext)((0,pRn.uniqueArray)((0,m1e.tuple)((0,g1e.restrictedIntegerArbitraryBuilder)(0,d,p),e),{size:l,minLength:r,maxLength:s,selector:h=>h[0],depthIdentifier:u})).map(h=>{const $=hRn(h);return vRn($+1,h)},h=>{if(!Array.isArray(h))throw new Error("Not supported entry type");if(o&&h.length!==0&&!(h.length-1 in h))throw new Error("No trailing hole");return Object.entries(h).map($=>[Number($[0]),$[1]])}));return o||i===r?v:(0,FU.convertFromNext)((0,FU.convertToNext)((0,m1e.tuple)(v,(0,g1e.restrictedIntegerArbitraryBuilder)(r,f,i))).map(h=>{const $=h[0],b=h[1];if($.length>=b)return $;const y=$.slice();return y.length=b,y},h=>{if(!Array.isArray(h))throw new Error("Not supported entry type");return[h,h.length]}))}Cj.sparseArray=mRn;var C_={};Object.defineProperty(C_,"__esModule",{value:!0});C_.arrayToMapUnmapper=C_.arrayToMapMapper=void 0;function gRn(e){return new Map(e)}C_.arrayToMapMapper=gRn;function yRn(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)}C_.arrayToMapUnmapper=yRn;var P_={};Object.defineProperty(P_,"__esModule",{value:!0});P_.arrayToSetUnmapper=P_.arrayToSetMapper=void 0;function bRn(e){return new Set(e)}P_.arrayToSetMapper=bRn;function $Rn(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)}P_.arrayToSetUnmapper=$Rn;var F_={};Object.defineProperty(F_,"__esModule",{value:!0});F_.objectToPrototypeLessUnmapper=F_.objectToPrototypeLessMapper=void 0;function IRn(e){return Object.assign(Object.create(null),e)}F_.objectToPrototypeLessMapper=IRn;function _Rn(e){if(typeof e!="object"||e===null)throw new Error("Incompatible instance received: should be a non-null object");if("__proto__"in e)throw new Error("Incompatible instance received: should not have any __proto__");return Object.assign({},e)}F_.objectToPrototypeLessUnmapper=_Rn;Object.defineProperty(Ij,"__esModule",{value:!0});Ij.anyArbitraryBuilder=void 0;const y1e=ep,SRn=gi,wRn=G$,_2=np,ARn=Ci,MRn=YN,RRn=aj,ORn=_j,ERn=Sj,TRn=wj,CRn=Aj,PRn=Mj,FRn=Rj,WRn=Oj,NRn=Ej,jRn=Tj,kRn=Cj,b1e=Tb,Cb=Ye,$1e=C_,I1e=P_,_1e=F_,URn=$j,tJe=K$,qRn=ih;function nJe(e,t,n,r,i){return(0,Cb.convertToNext)((0,tJe.uniqueArray)((0,ARn.tuple)(e,t),{maxLength:n,size:r,comparator:"SameValueZero",selector:a=>a[0],depthIdentifier:i}))}function S1e(e,t,n,r,i){return(0,Cb.convertFromNext)(nJe(e,t,n,r,i).map($1e.arrayToMapMapper,$1e.arrayToMapUnmapper))}function xRn(e,t,n,r,i){return(0,Cb.convertFromNext)(nJe(e,t,n,r,i).map(b1e.keyValuePairsToObjectMapper,b1e.keyValuePairsToObjectUnmapper))}function DRn(e,t,n,r){return(0,Cb.convertFromNext)((0,Cb.convertToNext)((0,tJe.uniqueArray)(e,{maxLength:t,size:n,comparator:"SameValueZero",depthIdentifier:r})).map(I1e.arrayToSetMapper,I1e.arrayToSetUnmapper))}function LRn(e){return(0,Cb.convertFromNext)((0,Cb.convertToNext)(e).map(_1e.objectToPrototypeLessMapper,_1e.objectToPrototypeLessUnmapper))}function BRn(e){return(0,_2.oneof)((0,PRn.int8Array)(e),(0,NRn.uint8Array)(e),(0,jRn.uint8ClampedArray)(e),(0,TRn.int16Array)(e),(0,FRn.uint16Array)(e),(0,CRn.int32Array)(e),(0,WRn.uint32Array)(e),(0,ORn.float32Array)(e),(0,ERn.float64Array)(e))}function VRn(e){const t=e.values,n=e.depthFactor,r=(0,qRn.createDepthIdentifier)(),i=e.maxDepth,a=e.maxKeys,o=e.size,u=(0,_2.oneof)(...t,...e.withBigInt?[(0,MRn.bigInt)()]:[],...e.withDate?[(0,RRn.date)()]:[]);return(0,URn.letrec)(c=>({anything:(0,_2.oneof)({maxDepth:i,depthFactor:n,depthIdentifier:r},u,c("array"),c("object"),...e.withMap?[c("map")]:[],...e.withSet?[c("set")]:[],...e.withObjectString?[c("anything").map(f=>(0,y1e.stringify)(f))]:[],...e.withNullPrototype?[LRn(c("object"))]:[],...e.withTypedArray?[BRn({maxLength:a,size:o})]:[],...e.withSparseArray?[(0,kRn.sparseArray)(c("anything"),{maxNumElements:a,size:o,depthIdentifier:r})]:[]),keys:e.withObjectString?(0,wRn.frequency)({arbitrary:e.key,weight:10},{arbitrary:c("anything").map(f=>(0,y1e.stringify)(f)),weight:1}):e.key,array:(0,SRn.array)(c("anything"),{maxLength:a,size:o,depthIdentifier:r}),set:DRn(c("anything"),a,o,r),map:(0,_2.oneof)(S1e(c("keys"),c("anything"),a,o,r),S1e(c("anything"),c("anything"),a,o,r)),object:xRn(c("keys"),c("anything"),a,o,r)})).anything}Ij.anyArbitraryBuilder=VRn;var Fj={},TM={};Object.defineProperty(TM,"__esModule",{value:!0});TM.string=void 0;const w1e=Ye,zRn=gi,KRn=tj,GRn=yl,A1e=Os;function HRn(...e){const t=(0,GRn.extractStringConstraints)(e);return(0,w1e.convertFromNext)((0,w1e.convertToNext)((0,zRn.array)((0,KRn.char)(),t)).map(A1e.codePointsToStringMapper,A1e.codePointsToStringUnmapper))}TM.string=HRn;var XV={},W_={};Object.defineProperty(W_,"__esModule",{value:!0});W_.unboxedToBoxedUnmapper=W_.unboxedToBoxedMapper=void 0;function JRn(e){switch(typeof e){case"boolean":return new Boolean(e);case"number":return new Number(e);case"string":return new String(e);default:return e}}W_.unboxedToBoxedMapper=JRn;function YRn(e){return typeof e!="object"||e===null||!("constructor"in e)?e:e.constructor===Boolean||e.constructor===Number||e.constructor===String?e.valueOf():e}W_.unboxedToBoxedUnmapper=YRn;Object.defineProperty(XV,"__esModule",{value:!0});XV.boxedArbitraryBuilder=void 0;const M1e=Ye,R1e=W_;function ZRn(e){return(0,M1e.convertFromNext)((0,M1e.convertToNext)(e).map(R1e.unboxedToBoxedMapper,R1e.unboxedToBoxedUnmapper))}XV.boxedArbitraryBuilder=ZRn;Object.defineProperty(Fj,"__esModule",{value:!0});Fj.toQualifiedObjectConstraints=void 0;const XRn=SM,O1e=zf,QRn=H$,eOn=mj,tOn=np,mH=TM,nOn=XV;function rOn(e){return[(0,XRn.boolean)(),(0,eOn.maxSafeInteger)(),(0,QRn.double)({next:!0}),(0,mH.string)(e),(0,tOn.oneof)((0,mH.string)(e),(0,O1e.constant)(null),(0,O1e.constant)(void 0))]}function iOn(e){return e.map(t=>(0,nOn.boxedArbitraryBuilder)(t))}function aOn(e,t){return t?iOn(e).concat(e):e}function oOn(e={}){function t(r,i){return r!==void 0?r:i}const n={size:e.size};return{key:t(e.key,(0,mH.string)(n)),values:aOn(t(e.values,rOn(n)),t(e.withBoxedValues,!1)),depthFactor:t(e.depthFactor,"="),maxDepth:t(e.maxDepth,2),maxKeys:t(e.maxKeys,5),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)}}Fj.toQualifiedObjectConstraints=oOn;Object.defineProperty(YV,"__esModule",{value:!0});YV.object=void 0;const uOn=uj,cOn=Ij,fOn=Fj;function sOn(e){return(0,uOn.dictionary)(e.key,(0,cOn.anyArbitraryBuilder)(e),{maxKeys:e.maxKeys,size:e.size})}function lOn(e){return sOn((0,fOn.toQualifiedObjectConstraints)(e))}YV.object=lOn;var QV={},CM={},Wj={};Object.defineProperty(Wj,"__esModule",{value:!0});Wj.jsonConstraintsBuilder=void 0;const dOn=SM,pOn=zf,hOn=H$;function vOn(e,t){const{depthFactor:n,maxDepth:r}=t,i=e,a=[(0,dOn.boolean)(),(0,hOn.double)({next:!0,noDefaultInfinity:!0,noNaN:!0}),e,(0,pOn.constant)(null)];return{key:i,values:a,depthFactor:n,maxDepth:r}}Wj.jsonConstraintsBuilder=vOn;var PM={};Object.defineProperty(PM,"__esModule",{value:!0});PM.anything=void 0;const mOn=Ij,gOn=Fj;function yOn(e){return(0,mOn.anyArbitraryBuilder)((0,gOn.toQualifiedObjectConstraints)(e))}PM.anything=yOn;Object.defineProperty(CM,"__esModule",{value:!0});CM.jsonValue=void 0;const bOn=TM,$On=Wj,IOn=PM;function _On(e={}){return(0,IOn.anything)((0,$On.jsonConstraintsBuilder)((0,bOn.string)(),e))}CM.jsonValue=_On;Object.defineProperty(QV,"__esModule",{value:!0});QV.json=void 0;const E1e=CM;function SOn(e){return(e!=null?(0,E1e.jsonValue)(e):(0,E1e.jsonValue)()).map(JSON.stringify)}QV.json=SOn;var ez={},FM={},Nj={};Object.defineProperty(Nj,"__esModule",{value:!0});Nj.unicodeString=void 0;const T1e=Ye,wOn=gi,AOn=ij,MOn=yl,C1e=Os;function ROn(...e){const t=(0,MOn.extractStringConstraints)(e);return(0,T1e.convertFromNext)((0,T1e.convertToNext)((0,wOn.array)((0,AOn.unicode)(),t)).map(C1e.codePointsToStringMapper,C1e.codePointsToStringUnmapper))}Nj.unicodeString=ROn;Object.defineProperty(FM,"__esModule",{value:!0});FM.unicodeJsonValue=void 0;const OOn=Nj,EOn=Wj,TOn=PM;function COn(e={}){return(0,TOn.anything)((0,EOn.jsonConstraintsBuilder)((0,OOn.unicodeString)(),e))}FM.unicodeJsonValue=COn;Object.defineProperty(ez,"__esModule",{value:!0});ez.unicodeJsonObject=void 0;const P1e=FM;function POn(e){return typeof e=="number"?(0,P1e.unicodeJsonValue)({maxDepth:e}):(0,P1e.unicodeJsonValue)(e)}ez.unicodeJsonObject=POn;var tz={};Object.defineProperty(tz,"__esModule",{value:!0});tz.jsonObject=void 0;const F1e=CM;function FOn(e){return typeof e=="number"?(0,F1e.jsonValue)({maxDepth:e}):(0,F1e.jsonValue)(e)}tz.jsonObject=FOn;var nz={};Object.defineProperty(nz,"__esModule",{value:!0});nz.unicodeJson=void 0;const W1e=FM;function WOn(e){return(e!=null?(0,W1e.unicodeJsonValue)(e):(0,W1e.unicodeJsonValue)()).map(JSON.stringify)}nz.unicodeJson=WOn;var rz={},iz={},az={};Object.defineProperty(az,"__esModule",{value:!0});az.extractEnumerableKeys=void 0;function NOn(e){const t=Object.keys(e),n=Object.getOwnPropertySymbols(e);for(let r=0;r!==n.length;++r){const i=n[r],a=Object.getOwnPropertyDescriptor(e,i);a&&a.enumerable&&t.push(i)}return t}az.extractEnumerableKeys=NOn;var N_={};Object.defineProperty(N_,"__esModule",{value:!0});N_.buildValuesAndSeparateKeysToObjectUnmapper=N_.buildValuesAndSeparateKeysToObjectMapper=void 0;function jOn(e,t){return function(r){const i={};for(let a=0;a!==e.length;++a){const o=r[a];o!==t&&(i[e[a]]=o)}return i}}N_.buildValuesAndSeparateKeysToObjectMapper=jOn;function kOn(e,t){return function(r){if(typeof r!="object"||r===null)throw new Error("Incompatible instance received: should be a non-null object");if(!("constructor"in r)||r.constructor!==Object)throw new Error("Incompatible instance received: should be of exact type Object");let i=0;const a=[];for(let c=0;c!==e.length;++c){const f=Object.getOwnPropertyDescriptor(r,e[c]);if(f!==void 0){if(!f.configurable||!f.enumerable||!f.writable)throw new Error("Incompatible instance received: should contain only c/e/w properties");if(f.get!==void 0||f.set!==void 0)throw new Error("Incompatible instance received: should contain only no get/set properties");++i,a.push(f.value)}else a.push(t)}const o=Object.getOwnPropertyNames(r).length,u=Object.getOwnPropertySymbols(r).length;if(i!==o+u)throw new Error("Incompatible instance received: should not contain extra properties");return a}}N_.buildValuesAndSeparateKeysToObjectUnmapper=kOn;Object.defineProperty(iz,"__esModule",{value:!0});iz.buildPartialRecordArbitrary=void 0;const N1e=Ye,UOn=ty,qOn=Ci,xOn=az,j1e=N_,V7=Symbol("no-key");function DOn(e,t){const n=(0,xOn.extractEnumerableKeys)(e),r=[];for(let i=0;i!==n.length;++i){const a=n[i],o=e[a];t===void 0||t.indexOf(a)!==-1?r.push(o):r.push((0,UOn.option)(o,{nil:V7}))}return(0,N1e.convertFromNext)((0,N1e.convertToNext)((0,qOn.tuple)(...r)).map((0,j1e.buildValuesAndSeparateKeysToObjectMapper)(n,V7),(0,j1e.buildValuesAndSeparateKeysToObjectUnmapper)(n,V7)))}iz.buildPartialRecordArbitrary=DOn;Object.defineProperty(rz,"__esModule",{value:!0});rz.record=void 0;const z7=iz;function LOn(e,t){if(t==null)return(0,z7.buildPartialRecordArbitrary)(e,void 0);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(0,z7.buildPartialRecordArbitrary)(e,void 0);const r=("requiredKeys"in t?t.requiredKeys:void 0)||[];for(let i=0;i!==r.length;++i){const a=Object.getOwnPropertyDescriptor(e,r[i]);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(0,z7.buildPartialRecordArbitrary)(e,r)}rz.record=LOn;var oz={};Object.defineProperty(oz,"__esModule",{value:!0});oz.set=void 0;const BOn=_M,k1e=Ye,U1e=gl,VOn=cj,zOn=fj,KOn=sj,GOn=lj;function HOn(e){const t=e.compare||{};if(typeof t=="function"){const i=(a,o)=>t(a.value_,o.value_);return()=>new VOn.CustomEqualSet(i)}const n=t.selector||(i=>i),r=i=>n(i.value_);switch(t.type){case"SameValue":return()=>new KOn.SameValueSet(r);case"SameValueZero":return()=>new GOn.SameValueZeroSet(r);case"IsStrictlyEqual":case void 0:return()=>new zOn.StrictlyEqualSet(r)}}function JOn(e){const t=e.minLength!==void 0?e.minLength:0,n=e.maxLength!==void 0?e.maxLength:U1e.MaxLengthUpperBound,r=(0,U1e.maxGeneratedLengthFromSizeForArbitrary)(e.size,t,n,e.maxLength!==void 0),i=e.depthIdentifier,a=HOn(e);return{minLength:t,maxGeneratedLength:r,maxLength:n,depthIdentifier:i,setBuilder:a}}function YOn(e){if(e[0]===void 0)return{};if(e[1]===void 0){const n=e;return typeof n[0]=="number"?{maxLength:n[0]}:typeof n[0]=="function"?{compare:n[0]}:n[0]}if(e[2]===void 0){const n=e;return typeof n[1]=="number"?{minLength:n[0],maxLength:n[1]}:{maxLength:n[0],compare:n[1]}}const t=e;return{minLength:t[0],maxLength:t[1],compare:t[2]}}function ZOn(e,...t){const n=JOn(YOn(t)),r=n.minLength,i=n.maxLength,a=n.maxGeneratedLength,o=n.depthIdentifier,u=n.setBuilder,c=(0,k1e.convertToNext)(e),f=(0,k1e.convertFromNext)(new BOn.ArrayArbitrary(c,r,a,i,o,u));return r===0?f:f.filter(s=>s.length>=r)}oz.set=ZOn;var uz={},cz={};Object.defineProperty(cz,"__esModule",{value:!0});cz.StreamArbitrary=void 0;const XOn=$r,QOn=Tr,eEn=Do,q1e=Rn,AO=ep;function K7(e){return`Stream(${e.join(",")}…)`}class tEn extends XOn.NextArbitrary{constructor(t){super(),this.arb=t}generate(t,n){const r=n!==void 0&&t.nextInt(1,n)===1?n:void 0,i=()=>{const a=[],o=function*(c,f){for(;;){const s=c.generate(f,r).value;a.push(s),yield s}},u=new q1e.Stream(o(this.arb,t.clone()));return Object.defineProperties(u,{toString:{value:()=>K7(a.map(AO.stringify))},[AO.toStringMethod]:{value:()=>K7(a.map(AO.stringify))},[AO.asyncToStringMethod]:{value:async()=>K7(await Promise.all(a.map(AO.asyncStringify)))},[eEn.cloneMethod]:{value:i,enumerable:!0}})};return new QOn.NextValue(i(),void 0)}canShrinkWithoutContext(t){return!1}shrink(t,n){return q1e.Stream.nil()}}cz.StreamArbitrary=tEn;Object.defineProperty(uz,"__esModule",{value:!0});uz.infiniteStream=void 0;const x1e=Ye,nEn=cz;function rEn(e){return(0,x1e.convertFromNext)(new nEn.StreamArbitrary((0,x1e.convertToNext)(e)))}uz.infiniteStream=rEn;var fz={};Object.defineProperty(fz,"__esModule",{value:!0});fz.asciiString=void 0;const D1e=Ye,iEn=gi,aEn=QN,oEn=yl,L1e=Os;function uEn(...e){const t=(0,oEn.extractStringConstraints)(e);return(0,D1e.convertFromNext)((0,D1e.convertToNext)((0,iEn.array)((0,aEn.ascii)(),t)).map(L1e.codePointsToStringMapper,L1e.codePointsToStringUnmapper))}fz.asciiString=uEn;var sz={},j_={};Object.defineProperty(j_,"__esModule",{value:!0});j_.stringToBase64Unmapper=j_.stringToBase64Mapper=void 0;function cEn(e){switch(e.length%4){case 0:return e;case 3:return`${e}=`;case 2:return`${e}==`;default:return e.slice(1)}}j_.stringToBase64Mapper=cEn;function fEn(e){if(typeof e!="string"||e.length%4!==0)throw new Error("Invalid string received");const t=e.indexOf("=");if(t===-1)return e;if(e.length-t>2)throw new Error("Cannot unmap the passed value");return e.substring(0,t)}j_.stringToBase64Unmapper=fEn;Object.defineProperty(sz,"__esModule",{value:!0});sz.base64String=void 0;const B1e=Ye,sEn=gi,lEn=ej,dEn=gl,pEn=yl,V1e=Os,z1e=j_;function hEn(...e){const t=(0,pEn.extractStringConstraints)(e),{minLength:n=0,maxLength:r=dEn.MaxLengthUpperBound,size:i}=t,a=n+3-(n+3)%4,o=r-r%4,u=t.maxLength===void 0&&i===void 0?"=":i;if(a>o)throw new Error("Minimal length should be inferior or equal to maximal length");if(a%4!==0)throw new Error("Minimal length of base64 strings must be a multiple of 4");if(o%4!==0)throw new Error("Maximal length of base64 strings must be a multiple of 4");return(0,B1e.convertFromNext)((0,B1e.convertToNext)((0,sEn.array)((0,lEn.base64)(),{minLength:a,maxLength:o,size:u})).map(V1e.codePointsToStringMapper,V1e.codePointsToStringUnmapper).map(z1e.stringToBase64Mapper,z1e.stringToBase64Unmapper))}sz.base64String=hEn;var lz={};Object.defineProperty(lz,"__esModule",{value:!0});lz.fullUnicodeString=void 0;const K1e=Ye,vEn=gi,mEn=wM,gEn=yl,G1e=Os;function yEn(...e){const t=(0,gEn.extractStringConstraints)(e);return(0,K1e.convertFromNext)((0,K1e.convertToNext)((0,vEn.array)((0,mEn.fullUnicode)(),t)).map(G1e.codePointsToStringMapper,G1e.codePointsToStringUnmapper))}lz.fullUnicodeString=yEn;var dz={},k_={};Object.defineProperty(k_,"__esModule",{value:!0});k_.charsToStringUnmapper=k_.charsToStringMapper=void 0;function bEn(e){return e.join("")}k_.charsToStringMapper=bEn;function $En(e){if(typeof e!="string")throw new Error("Cannot unmap the passed value");return e.split("")}k_.charsToStringUnmapper=$En;Object.defineProperty(dz,"__esModule",{value:!0});dz.string16bits=void 0;const H1e=Ye,IEn=gi,_En=nj,SEn=yl,J1e=k_;function wEn(...e){const t=(0,SEn.extractStringConstraints)(e);return(0,H1e.convertFromNext)((0,H1e.convertToNext)((0,IEn.array)((0,_En.char16bits)(),t)).map(J1e.charsToStringMapper,J1e.charsToStringUnmapper))}dz.string16bits=wEn;var pz={},jj={},hz={};Object.defineProperty(hz,"__esModule",{value:!0});hz.isSubarrayOf=void 0;function AEn(e,t){const n=new Map;let r=0;for(const i of e)if(Object.is(i,-0))++r;else{const a=n.get(i)||0;n.set(i,a+1)}for(let i=0;i!==t.length;++i){if(!(i in t))return!1;const a=t[i];if(Object.is(a,-0)){if(r===0)return!1;--r}else{const o=n.get(a)||0;if(o===0)return!1;n.set(a,o-1)}}return!0}hz.isSubarrayOf=AEn;Object.defineProperty(jj,"__esModule",{value:!0});jj.SubarrayArbitrary=void 0;const MEn=$r,G7=Tr,REn=B$,Y1e=Rn,OEn=hz,Z1e=Qg;class EEn extends MEn.NextArbitrary{constructor(t,n,r,i){if(super(),this.originalArray=t,this.isOrdered=n,this.minLength=r,this.maxLength=i,r<0||r>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(r>i)throw new Error("fc.*{s|S}ubarrayOf expects the minimal length to be inferior or equal to the maximal length");this.lengthArb=new Z1e.IntegerArbitrary(r,i),this.biasedLengthArb=r!==i?new Z1e.IntegerArbitrary(r,r+Math.floor(Math.log(i-r)/Math.log(2))):this.lengthArb}generate(t,n){const i=(n!==void 0&&t.nextInt(1,n)===1?this.biasedLengthArb:this.lengthArb).generate(t,void 0),a=i.value,o=this.originalArray.map((c,f)=>f),u=[];for(let c=0;c!==a;++c){const f=t.nextInt(0,o.length-1);u.push(o[f]),o.splice(f,1)}return this.isOrdered&&u.sort((c,f)=>c-f),new G7.NextValue(u.map(c=>this.originalArray[c]),i.context)}canShrinkWithoutContext(t){return!Array.isArray(t)||!this.lengthArb.canShrinkWithoutContext(t.length)?!1:(0,OEn.isSubarrayOf)(this.originalArray,t)}shrink(t,n){return t.length===0?Y1e.Stream.nil():this.lengthArb.shrink(t.length,n).map(r=>new G7.NextValue(t.slice(t.length-r.value),r.context)).join(t.length>this.minLength?(0,REn.makeLazy)(()=>this.shrink(t.slice(1),void 0).filter(r=>this.minLength<=r.value.length+1).map(r=>new G7.NextValue([t[0]].concat(r.value),void 0))):Y1e.Stream.nil())}}jj.SubarrayArbitrary=EEn;Object.defineProperty(pz,"__esModule",{value:!0});pz.subarray=void 0;const X1e=Ye,Q1e=jj;function TEn(e,...t){if(typeof t[0]=="number"&&typeof t[1]=="number")return(0,X1e.convertFromNext)(new Q1e.SubarrayArbitrary(e,!0,t[0],t[1]));const n=t[0],r=n!==void 0&&n.minLength!==void 0?n.minLength:0,i=n!==void 0&&n.maxLength!==void 0?n.maxLength:e.length;return(0,X1e.convertFromNext)(new Q1e.SubarrayArbitrary(e,!0,r,i))}pz.subarray=TEn;var vz={};Object.defineProperty(vz,"__esModule",{value:!0});vz.shuffledSubarray=void 0;const eIe=Ye,tIe=jj;function CEn(e,...t){if(typeof t[0]=="number"&&typeof t[1]=="number")return(0,eIe.convertFromNext)(new tIe.SubarrayArbitrary(e,!1,t[0],t[1]));const n=t[0],r=n!==void 0&&n.minLength!==void 0?n.minLength:0,i=n!==void 0&&n.maxLength!==void 0?n.maxLength:e.length;return(0,eIe.convertFromNext)(new tIe.SubarrayArbitrary(e,!1,r,i))}vz.shuffledSubarray=CEn;var mz={},kj={},U_={};Object.defineProperty(U_,"__esModule",{value:!0});U_.numberToPaddedEightUnmapper=U_.numberToPaddedEightMapper=void 0;function rJe(e){return e.toString(16).padStart(8,"0")}U_.numberToPaddedEightMapper=rJe;function PEn(e){if(typeof e!="string")throw new Error("Unsupported type");if(e.length!==8)throw new Error("Unsupported value: invalid length");const t=parseInt(e,16);if(e!==rJe(t))throw new Error("Unsupported value: invalid content");return t}U_.numberToPaddedEightUnmapper=PEn;Object.defineProperty(kj,"__esModule",{value:!0});kj.buildPaddedNumberArbitrary=void 0;const nIe=Ye,FEn=yi,rIe=U_;function WEn(e,t){return(0,nIe.convertFromNext)((0,nIe.convertToNext)((0,FEn.integer)({min:e,max:t})).map(rIe.numberToPaddedEightMapper,rIe.numberToPaddedEightUnmapper))}kj.buildPaddedNumberArbitrary=WEn;var Pb={};Object.defineProperty(Pb,"__esModule",{value:!0});Pb.paddedEightsToUuidUnmapper=Pb.paddedEightsToUuidMapper=void 0;function NEn(e){return`${e[0]}-${e[1].substring(4)}-${e[1].substring(0,4)}-${e[2].substring(0,4)}-${e[2].substring(4)}${e[3]}`}Pb.paddedEightsToUuidMapper=NEn;const jEn=/^([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/;function kEn(e){if(typeof e!="string")throw new Error("Unsupported type");const t=jEn.exec(e);if(t===null)throw new Error("Unsupported type");return[t[1],t[3]+t[2],t[4]+t[5].substring(0,4),t[5].substring(4)]}Pb.paddedEightsToUuidUnmapper=kEn;Object.defineProperty(mz,"__esModule",{value:!0});mz.uuid=void 0;const iIe=Ye,UEn=Ci,H7=kj,aIe=Pb;function qEn(){const e=(0,H7.buildPaddedNumberArbitrary)(0,4294967295),t=(0,H7.buildPaddedNumberArbitrary)(268435456,1610612735),n=(0,H7.buildPaddedNumberArbitrary)(2147483648,3221225471);return(0,iIe.convertFromNext)((0,iIe.convertToNext)((0,UEn.tuple)(e,t,n,e)).map(aIe.paddedEightsToUuidMapper,aIe.paddedEightsToUuidUnmapper))}mz.uuid=qEn;var gz={};Object.defineProperty(gz,"__esModule",{value:!0});gz.uuidV=void 0;const oIe=Ye,xEn=Ci,J7=kj,uIe=Pb;function DEn(e){const t=(0,J7.buildPaddedNumberArbitrary)(0,4294967295),n=e*268435456,r=(0,J7.buildPaddedNumberArbitrary)(n,n+268435455),i=(0,J7.buildPaddedNumberArbitrary)(2147483648,3221225471);return(0,oIe.convertFromNext)((0,oIe.convertToNext)((0,xEn.tuple)(t,r,i,t)).map(uIe.paddedEightsToUuidMapper,uIe.paddedEightsToUuidUnmapper))}gz.uuidV=DEn;var Uj={};Object.defineProperty(Uj,"__esModule",{value:!0});Uj.webAuthority=void 0;const LEn=AM,cIe=zf,BEn=RM,VEn=EM,zEn=gj,KEn=yj,GEn=ey,HEn=np,fIe=ty,JEn=wv,YEn=Ci,WU=Ye;function ZEn(e){const t=["-",".","_","~","!","$","&","'","(",")","*","+",",",";","=",":"];return(0,JEn.stringOf)((0,LEn.buildAlphaNumericPercentArbitrary)(t),{size:e})}function XEn([e,t,n]){return(e===null?"":`${e}@`)+t+(n===null?"":`:${n}`)}function QEn(e){if(typeof e!="string")throw new Error("Unsupported");const t=e.indexOf("@"),n=t!==-1?e.substring(0,t):null,i=/:(\d+)$/.exec(e),a=i!==null?Number(i[1]):null,o=i!==null?e.substring(t+1,e.length-i[1].length-1):e.substring(t+1);return[n,o,a]}function eTn(e){return`[${e}]`}function tTn(e){if(typeof e!="string"||e[0]!=="["||e[e.length-1]!=="]")throw new Error("Unsupported");return e.substring(1,e.length-1)}function nTn(e){const t=e||{},n=t.size,r=[(0,BEn.domain)({size:n})].concat(t.withIPv4===!0?[(0,VEn.ipV4)()]:[]).concat(t.withIPv6===!0?[(0,WU.convertFromNext)((0,WU.convertToNext)((0,KEn.ipV6)()).map(eTn,tTn))]:[]).concat(t.withIPv4Extended===!0?[(0,zEn.ipV4Extended)()]:[]);return(0,WU.convertFromNext)((0,WU.convertToNext)((0,YEn.tuple)(t.withUserInfo===!0?(0,fIe.option)(ZEn(n)):(0,cIe.constant)(null),(0,HEn.oneof)(...r),t.withPort===!0?(0,fIe.option)((0,GEn.nat)(65535)):(0,cIe.constant)(null))).map(XEn,QEn))}Uj.webAuthority=nTn;var qj={},xj={};Object.defineProperty(xj,"__esModule",{value:!0});xj.buildUriQueryOrFragmentArbitrary=void 0;const rTn=AM,iTn=wv;function aTn(e){const t=["-",".","_","~","!","$","&","'","(",")","*","+",",",";","=",":","@","/","?"];return(0,iTn.stringOf)((0,rTn.buildAlphaNumericPercentArbitrary)(t),{size:e})}xj.buildUriQueryOrFragmentArbitrary=aTn;Object.defineProperty(qj,"__esModule",{value:!0});qj.webFragments=void 0;const oTn=xj;function uTn(e={}){return(0,oTn.buildUriQueryOrFragmentArbitrary)(e.size)}qj.webFragments=uTn;var Dj={};Object.defineProperty(Dj,"__esModule",{value:!0});Dj.webQueryParameters=void 0;const cTn=xj;function fTn(e={}){return(0,cTn.buildUriQueryOrFragmentArbitrary)(e.size)}Dj.webQueryParameters=fTn;var Lj={};Object.defineProperty(Lj,"__esModule",{value:!0});Lj.webSegment=void 0;const sTn=AM,lTn=wv;function dTn(e={}){const t=["-",".","_","~","!","$","&","'","(",")","*","+",",",";","=",":","@"];return(0,lTn.stringOf)((0,sTn.buildAlphaNumericPercentArbitrary)(t),{size:e.size})}Lj.webSegment=dTn;var yz={},q_={};Object.defineProperty(q_,"__esModule",{value:!0});q_.partsToUrlUnmapper=q_.partsToUrlMapper=void 0;function pTn(e){const[t,n,r]=e,i=e[3]===null?"":`?${e[3]}`,a=e[4]===null?"":`#${e[4]}`;return`${t}://${n}${r}${i}${a}`}q_.partsToUrlMapper=pTn;const hTn=/^([[A-Za-z][A-Za-z0-9+.-]*):\/\/([^/?#]*)([^?#]*)(\?[A-Za-z0-9\-._~!$&'()*+,;=:@/?%]*)?(#[A-Za-z0-9\-._~!$&'()*+,;=:@/?%]*)?$/;function vTn(e){if(typeof e!="string")throw new Error("Incompatible value received: type");const t=hTn.exec(e);if(t===null)throw new Error("Incompatible value received");const n=t[1],r=t[2],i=t[3],a=t[4],o=t[5];return[n,r,i,a!==void 0?a.substring(1):null,o!==void 0?o.substring(1):null]}q_.partsToUrlUnmapper=vTn;var bz={},x_={};Object.defineProperty(x_,"__esModule",{value:!0});x_.segmentsToPathUnmapper=x_.segmentsToPathMapper=void 0;function mTn(e){return e.map(t=>`/${t}`).join("")}x_.segmentsToPathMapper=mTn;function gTn(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 e.split("/").splice(1)}x_.segmentsToPathUnmapper=gTn;Object.defineProperty(bz,"__esModule",{value:!0});bz.buildUriPathArbitrary=void 0;const sIe=Ye,yTn=Lj,bTn=gi,lIe=x_;function $Tn(e){switch(e){case"xsmall":return["xsmall","xsmall"];case"small":return["small","xsmall"];case"medium":return["small","small"];case"large":return["medium","small"];case"xlarge":return["medium","medium"]}}function ITn(e){const[t,n]=$Tn(e);return(0,sIe.convertFromNext)((0,sIe.convertToNext)((0,bTn.array)((0,yTn.webSegment)({size:t}),{size:n})).map(lIe.segmentsToPathMapper,lIe.segmentsToPathUnmapper))}bz.buildUriPathArbitrary=ITn;Object.defineProperty(yz,"__esModule",{value:!0});yz.webUrl=void 0;const _Tn=z$,dIe=zf,pIe=ty,STn=Ci,wTn=Dj,ATn=qj,MTn=Uj,hIe=Ye,vIe=q_,mIe=gl,RTn=bz;function OTn(e){const t=e||{},n=(0,mIe.resolveSize)(t.size),r=t.authoritySettings!==void 0&&t.authoritySettings.size!==void 0?(0,mIe.relativeSizeToSize)(t.authoritySettings.size,n):n,i=Object.assign(Object.assign({},t.authoritySettings),{size:r}),a=t.validSchemes||["http","https"],o=(0,_Tn.constantFrom)(...a),u=(0,MTn.webAuthority)(i),c=(0,RTn.buildUriPathArbitrary)(n);return(0,hIe.convertFromNext)((0,hIe.convertToNext)((0,STn.tuple)(o,u,c,t.withQueryParameters===!0?(0,pIe.option)((0,wTn.webQueryParameters)({size:n})):(0,dIe.constant)(null),t.withFragments===!0?(0,pIe.option)((0,ATn.webFragments)({size:n})):(0,dIe.constant)(null))).map(vIe.partsToUrlMapper,vIe.partsToUrlUnmapper))}yz.webUrl=OTn;var $z={},Iz={},_z={};Object.defineProperty(_z,"__esModule",{value:!0});_z.CommandsIterable=void 0;const ETn=Do;class Use{constructor(t,n){this.commands=t,this.metadataForReplay=n}[Symbol.iterator](){return this.commands[Symbol.iterator]()}[ETn.cloneMethod](){return new Use(this.commands.map(t=>t.clone()),this.metadataForReplay)}toString(){const t=this.commands.filter(r=>r.hasRan).map(r=>r.toString()).join(","),n=this.metadataForReplay();return n.length!==0?`${t} /*${n}*/`:t}}_z.CommandsIterable=Use;var Sz={};Object.defineProperty(Sz,"__esModule",{value:!0});Sz.CommandWrapper=void 0;const W1=ep,gIe=Do;class Rq{constructor(t){if(this.cmd=t,this.hasRan=!1,(0,W1.hasToStringMethod)(t)){const n=t[W1.toStringMethod];this[W1.toStringMethod]=function(){return n.call(t)}}if((0,W1.hasAsyncToStringMethod)(t)){const n=t[W1.asyncToStringMethod];this[W1.asyncToStringMethod]=function(){return n.call(t)}}}check(t){return this.cmd.check(t)}run(t,n){return this.hasRan=!0,this.cmd.run(t,n)}clone(){return(0,gIe.hasCloneMethod)(this.cmd)?new Rq(this.cmd[gIe.cloneMethod]()):new Rq(this.cmd)}toString(){return this.cmd.toString()}}Sz.CommandWrapper=Rq;var wz={};Object.defineProperty(wz,"__esModule",{value:!0});wz.ReplayPath=void 0;class TTn{static parse(t){const[n,r]=t.split(":"),i=this.parseCounts(n),a=this.parseChanges(r);return this.parseOccurences(i,a)}static stringify(t){const n=this.countOccurences(t),r=this.stringifyCounts(n),i=this.stringifyChanges(n);return`${r}:${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((n,r)=>(n.length===0||n[n.length-1].count===64||n[n.length-1].value!==r?n.push({value:r,count:1}):n[n.length-1].count+=1,n),[])}static parseOccurences(t,n){const r=[];for(let i=0;i!==t.length;++i){const a=t[i],o=n[i];for(let u=0;u!==a;++u)r.push(o)}return r}static stringifyChanges(t){let n="";for(let r=0;ra*2+(o.value?1:0),0);n+=this.intToB64(i)}return n}static parseChanges(t){const n=t.split("").map(i=>this.b64ToInt(i)),r=[];for(let i=0;i!==n.length;++i){let a=n[i];for(let o=0;o!==6;++o,a>>=1)r.push(a%2===1)}return r}static stringifyCounts(t){return t.map(({count:n})=>this.intToB64(n-1)).join("")}static parseCounts(t){return t.split("").map(n=>this.b64ToInt(n)+1)}}wz.ReplayPath=TTn;Object.defineProperty(Iz,"__esModule",{value:!0});Iz.CommandsArbitrary=void 0;const yIe=Ye,CTn=$r,bIe=Tr,PTn=_z,FTn=Sz,$Ie=wz,IIe=B$,NU=Rn,WTn=np,NTn=Pj;class jTn extends CTn.NextArbitrary{constructor(t,n,r,i,a){super(),this.sourceReplayPath=i,this.disableReplayLog=a,this.oneCommandArb=(0,yIe.convertToNext)((0,WTn.oneof)(...t).map(o=>new FTn.CommandWrapper(o))),this.lengthArb=(0,yIe.convertToNext)((0,NTn.restrictedIntegerArbitraryBuilder)(0,n,r)),this.replayPath=[],this.replayPathPosition=0}metadataForReplay(){return this.disableReplayLog?"":`replayPath=${JSON.stringify($Ie.ReplayPath.stringify(this.replayPath))}`}buildNextValueFor(t,n){const r=t.map(a=>a.value_),i={shrunkOnce:n,items:t};return new bIe.NextValue(new PTn.CommandsIterable(r,()=>this.metadataForReplay()),i)}generate(t){const r=this.lengthArb.generate(t,void 0).value,i=Array(r);for(let a=0;a!==r;++a){const o=this.oneCommandArb.generate(t,void 0);i[a]=o}return this.replayPathPosition=0,this.buildNextValueFor(i,!1)}canShrinkWithoutContext(t){return!1}filterOnExecution(t){const n=[];for(const r of t)r.value_.hasRan?(this.replayPath.push(!0),n.push(r)):this.replayPath.push(!1);return n}filterOnReplay(t){return t.filter((n,r)=>{const i=this.replayPath[this.replayPathPosition+r];if(i===void 0)throw new Error("Too short replayPath");if(!i&&n.value_.hasRan)throw new Error("Mismatch between replayPath and real execution");return i})}filterForShrinkImpl(t){this.replayPathPosition===0&&(this.replayPath=this.sourceReplayPath!==null?$Ie.ReplayPath.parse(this.sourceReplayPath):[]);const n=this.replayPathPosition{const s=o.slice(0,f);return this.lengthArb.shrink(o.length-1-f,void 0).map(l=>s.concat(o.slice(o.length-(l.value+1))))}));for(let f=0;f!==o.length;++f)c.push((0,IIe.makeLazy)(()=>this.oneCommandArb.shrink(o[f].value_,o[f].context).map(s=>o.slice(0,f).concat([s],o.slice(f+1)))));return u.join(...c).map(f=>this.buildNextValueFor(f.map(s=>new bIe.NextValue(s.value_.clone(),s.context)),!0))}}Iz.CommandsArbitrary=jTn;Object.defineProperty($z,"__esModule",{value:!0});$z.commands=void 0;const kTn=Ye,UTn=Iz,_Ie=gl;function qTn(e,t){const n=t==null?{}:typeof t=="number"?{maxCommands:t}:t,r=n.size,i=n.maxCommands!==void 0?n.maxCommands:_Ie.MaxLengthUpperBound,a=n.maxCommands!==void 0,o=(0,_Ie.maxGeneratedLengthFromSizeForArbitrary)(r,0,i,a);return(0,kTn.convertFromNext)(new UTn.CommandsArbitrary(e,o,i,n.replayPath!=null?n.replayPath:null,!!n.disableReplayLog))}$z.commands=qTn;var Am={},D_={};Object.defineProperty(D_,"__esModule",{value:!0});D_.scheduleCommands=D_.ScheduledCommand=void 0;class iJe{constructor(t,n){this.s=t,this.cmd=n}async check(t){let n=null,r=!1;if((await this.s.scheduleSequence([{label:`check@${this.cmd.toString()}`,builder:async()=>{try{r=await Promise.resolve(this.cmd.check(t))}catch(a){throw n=a,a}}}]).task).faulty)throw n;return r}async run(t,n){let r=null;if((await this.s.scheduleSequence([{label:`run@${this.cmd.toString()}`,builder:async()=>{try{await this.cmd.run(t,n)}catch(a){throw r=a,a}}}]).task).faulty)throw r}}D_.ScheduledCommand=iJe;const xTn=function*(e,t){for(const n of t)yield new iJe(e,n)};D_.scheduleCommands=xTn;Object.defineProperty(Am,"__esModule",{value:!0});Am.scheduledModelRun=Am.asyncModelRun=Am.modelRun=void 0;const DTn=D_,aJe=(e,t,n,r,i)=>e.then(a=>{const{model:o,real:u}=a;let c=n;for(const f of t)c=i(c,()=>r(f,o,u));return c}),LTn=(e,t)=>aJe({then:a=>{a(e())}},t,void 0,(a,o,u)=>{a.check(o)&&a.run(o,u)},(a,o)=>o()),BTn=e=>typeof e.then=="function",oJe=async(e,t,n=Promise.resolve())=>await aJe({then:o=>{const u=e();return BTn(u)?u.then(o):o(u)}},t,n,async(o,u,c)=>{await o.check(u)&&await o.run(u,c)},(o,u)=>o.then(u));function VTn(e,t){LTn(e,t)}Am.modelRun=VTn;async function zTn(e,t){await oJe(e,t)}Am.asyncModelRun=zTn;async function KTn(e,t,n){const r=(0,DTn.scheduleCommands)(e,n),i=oJe(t,r,e.schedule(Promise.resolve(),"startModel"));await e.waitAll(),await i}Am.scheduledModelRun=KTn;var L_={},Az={},Bj={};Object.defineProperty(Bj,"__esModule",{value:!0});Bj.SchedulerImplem=void 0;const GTn=Bm,HTn=Do,SIe=ep;class Oq{constructor(t,n){this.act=t,this.taskSelector=n,this.lastTaskId=0,this.sourceTaskSelector=n.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 ${(0,GTn.escapeForTemplateString)(t.outputValue)}`:""}`}log(t,n,r,i,a,o){this.triggeredTasks.push({status:a,schedulingType:t,taskId:n,label:r,metadata:i,outputValue:o!==void 0?(0,SIe.stringify)(o):void 0})}scheduleInternal(t,n,r,i,a){let o=null;const u=++this.lastTaskId,c=new Promise((f,s)=>{o=()=>{(a?r.then(()=>a()):r).then(l=>(this.log(t,u,n,i,"resolved",l),f(l)),l=>(this.log(t,u,n,i,"rejected",l),s(l)))}});return this.scheduledTasks.push({original:r,scheduled:c,trigger:o,schedulingType:t,taskId:u,label:n,metadata:i}),this.scheduledWatchers.length!==0&&this.scheduledWatchers[0](),c}schedule(t,n,r){return this.scheduleInternal("promise",n||"",t,r)}scheduleFunction(t){return(...n)=>this.scheduleInternal("function",`${t.name}(${n.map(SIe.stringify).join(",")})`,t(...n),void 0)}scheduleSequence(t){const n={done:!1,faulty:!1},r={then:o=>o()};let i=()=>{};const a=new Promise(o=>i=o);return t.reduce((o,u)=>{const[c,f,s]=typeof u=="function"?[u,u.name,void 0]:[u.builder,u.label,u.metadata];return o.then(()=>{const l=this.scheduleInternal("sequence",f,r,s,()=>c());return l.catch(()=>{n.faulty=!0,i()}),l})},r).then(()=>{n.done=!0,i()},()=>{}),Object.assign(n,{task:Promise.resolve(a).then(()=>({done:n.done,faulty:n.faulty}))})}count(){return this.scheduledTasks.length}async internalWaitOne(){if(this.scheduledTasks.length===0)throw new Error("No task scheduled");const t=this.taskSelector.nextTaskIndex(this.scheduledTasks),[n]=this.scheduledTasks.splice(t,1);n.trigger();try{await n.scheduled}catch{}}async waitOne(){await this.act(async()=>await this.internalWaitOne())}async waitAll(){for(;this.scheduledTasks.length>0;)await this.waitOne()}async waitFor(t){let n=!1,r=null;const i=async()=>{for(;!n&&this.scheduledTasks.length>0;)await this.waitOne();r=null},a=()=>{r===null&&(r=Promise.resolve().then(i))},o=()=>{const c=this.scheduledWatchers.indexOf(a);c!==-1&&this.scheduledWatchers.splice(c,1),c===0&&this.scheduledWatchers.length!==0&&this.scheduledWatchers[0]()},u=t.then(c=>(n=!0,r===null?(o(),c):r.then(()=>(o(),c))),c=>{if(n=!0,r===null)throw o(),c;return r.then(()=>{throw o(),c})});return this.scheduledTasks.length>0&&this.scheduledWatchers.length===0&&a(),this.scheduledWatchers.push(a),u}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(Oq.buildLog).map(t=>`-> ${t}`).join(` `)+"`"}[HTn.cloneMethod](){return new Oq(this.act,this.sourceTaskSelector)}}Bj.SchedulerImplem=Oq;Object.defineProperty(Az,"__esModule",{value:!0});Az.buildSchedulerFor=void 0;const JTn=Bj;function uJe(e){let t=0;return{clone:()=>uJe(e),nextTaskIndex:n=>{if(e.length<=t)throw new Error("Invalid schedulerFor defined: too many tasks have been scheduled");const r=n.findIndex(i=>i.taskId===e[t]);if(r===-1)throw new Error("Invalid schedulerFor defined: unable to find next task");return++t,r}}}function YTn(e,t){return new JTn.SchedulerImplem(e,uJe(t))}Az.buildSchedulerFor=YTn;var Mz={};Object.defineProperty(Mz,"__esModule",{value:!0});Mz.SchedulerArbitrary=void 0;const ZTn=$r,XTn=Tr,QTn=Rn,eCn=Bj;function cJe(e){const t=e.clone();return{clone:()=>cJe(t),nextTaskIndex:n=>e.nextInt(0,n.length-1)}}class tCn extends ZTn.NextArbitrary{constructor(t){super(),this.act=t}generate(t,n){return new XTn.NextValue(new eCn.SchedulerImplem(this.act,cJe(t.clone())),void 0)}canShrinkWithoutContext(t){return!1}shrink(t,n){return QTn.Stream.nil()}}Mz.SchedulerArbitrary=tCn;Object.defineProperty(L_,"__esModule",{value:!0});L_.schedulerFor=L_.scheduler=void 0;const nCn=Ye,wIe=Az,rCn=Mz;function iCn(e){const{act:t=n=>n()}=e||{};return(0,nCn.convertFromNext)(new rCn.SchedulerArbitrary(t))}L_.scheduler=iCn;function aCn(e,t){const{act:n=r=>r()}=Array.isArray(e)?t||{}:e||{};return Array.isArray(e)?(0,wIe.buildSchedulerFor)(n,e):function(r,...i){return(0,wIe.buildSchedulerFor)(n,i)}}L_.schedulerFor=aCn;var Rz={};Object.defineProperty(Rz,"__esModule",{value:!0});Rz.ArbitraryWithShrink=void 0;const oCn=rh,uCn=Sv;class cCn extends oCn.Arbitrary{shrinkableFor(t,n){return new uCn.Shrinkable(t,()=>this.shrink(t,n===!0).map(r=>this.shrinkableFor(r,!0)))}}Rz.ArbitraryWithShrink=cCn;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.shuffledSubarray=e.dedup=e.clone=e.frequency=e.oneof=e.option=e.mapToConstant=e.clonedConstant=e.constantFrom=e.constant=e.lorem=e.base64String=e.hexaString=e.fullUnicodeString=e.unicodeString=e.stringOf=e.string16bits=e.asciiString=e.string=e.mixedCase=e.base64=e.hexa=e.fullUnicode=e.unicode=e.char16bits=e.ascii=e.char=e.bigUint=e.bigInt=e.bigUintN=e.bigIntN=e.maxSafeNat=e.maxSafeInteger=e.nat=e.integer=e.double=e.float=e.falsy=e.boolean=e.asyncProperty=e.property=e.PreconditionFailure=e.pre=e.assert=e.check=e.statistics=e.sample=e.__commitHash=e.__version=e.__type=void 0,e.commands=e.scheduledModelRun=e.modelRun=e.asyncModelRun=e.float64Array=e.float32Array=e.uint32Array=e.int32Array=e.uint16Array=e.int16Array=e.uint8ClampedArray=e.uint8Array=e.int8Array=e.uuidV=e.uuid=e.emailAddress=e.webUrl=e.webQueryParameters=e.webFragments=e.webSegment=e.webAuthority=e.domain=e.ipV6=e.ipV4Extended=e.ipV4=e.date=e.context=e.func=e.compareFunc=e.compareBooleanFunc=e.memo=e.letrec=e.unicodeJsonValue=e.unicodeJsonObject=e.unicodeJson=e.jsonValue=e.jsonObject=e.json=e.object=e.anything=e.dictionary=e.record=e.genericTuple=e.tuple=e.uniqueArray=e.set=e.infiniteStream=e.sparseArray=e.array=e.subarray=void 0,e.createDepthIdentifier=e.stream=e.Stream=e.Random=e.ExecutionStatus=e.resetConfigureGlobal=e.readConfigureGlobal=e.configureGlobal=e.VerbosityLevel=e.hash=e.asyncDefaultReportMessage=e.defaultReportMessage=e.asyncStringify=e.stringify=e.getDepthContextFor=e.hasAsyncToStringMethod=e.asyncToStringMethod=e.hasToStringMethod=e.toStringMethod=e.convertToNext=e.convertFromNextWithShrunkOnce=e.convertFromNext=e.hasCloneMethod=e.cloneIfNeeded=e.cloneMethod=e.NextValue=e.Shrinkable=e.ArbitraryWithContextualShrink=e.ArbitraryWithShrink=e.NextArbitrary=e.Arbitrary=e.schedulerFor=e.scheduler=void 0;const t=nV;Object.defineProperty(e,"pre",{enumerable:!0,get:function(){return t.pre}});const n=bHe;Object.defineProperty(e,"asyncProperty",{enumerable:!0,get:function(){return n.asyncProperty}});const r=EHe;Object.defineProperty(e,"property",{enumerable:!0,get:function(){return r.property}});const i=w_;Object.defineProperty(e,"assert",{enumerable:!0,get:function(){return i.assert}}),Object.defineProperty(e,"check",{enumerable:!0,get:function(){return i.check}});const a=M_;Object.defineProperty(e,"sample",{enumerable:!0,get:function(){return a.sample}}),Object.defineProperty(e,"statistics",{enumerable:!0,get:function(){return a.statistics}});const o=gi;Object.defineProperty(e,"array",{enumerable:!0,get:function(){return o.array}});const u=YN;Object.defineProperty(e,"bigInt",{enumerable:!0,get:function(){return u.bigInt}});const c=RV;Object.defineProperty(e,"bigIntN",{enumerable:!0,get:function(){return c.bigIntN}});const f=OV;Object.defineProperty(e,"bigUint",{enumerable:!0,get:function(){return f.bigUint}});const s=ZN;Object.defineProperty(e,"bigUintN",{enumerable:!0,get:function(){return s.bigUintN}});const l=SM;Object.defineProperty(e,"boolean",{enumerable:!0,get:function(){return l.boolean}});const d=EV;Object.defineProperty(e,"falsy",{enumerable:!0,get:function(){return d.falsy}});const p=QN;Object.defineProperty(e,"ascii",{enumerable:!0,get:function(){return p.ascii}});const v=ej;Object.defineProperty(e,"base64",{enumerable:!0,get:function(){return v.base64}});const h=tj;Object.defineProperty(e,"char",{enumerable:!0,get:function(){return h.char}});const $=nj;Object.defineProperty(e,"char16bits",{enumerable:!0,get:function(){return $.char16bits}});const b=wM;Object.defineProperty(e,"fullUnicode",{enumerable:!0,get:function(){return b.fullUnicode}});const y=rj;Object.defineProperty(e,"hexa",{enumerable:!0,get:function(){return y.hexa}});const m=ij;Object.defineProperty(e,"unicode",{enumerable:!0,get:function(){return m.unicode}});const g=TV;Object.defineProperty(e,"clonedConstant",{enumerable:!0,get:function(){return g.clonedConstant}});const _=zf;Object.defineProperty(e,"constant",{enumerable:!0,get:function(){return _.constant}});const I=z$;Object.defineProperty(e,"constantFrom",{enumerable:!0,get:function(){return I.constantFrom}});const A=CV;Object.defineProperty(e,"context",{enumerable:!0,get:function(){return A.context}});const E=aj;Object.defineProperty(e,"date",{enumerable:!0,get:function(){return E.date}});const N=oj;Object.defineProperty(e,"clone",{enumerable:!0,get:function(){return N.clone}});const U=FV;Object.defineProperty(e,"dedup",{enumerable:!0,get:function(){return U.dedup}});const te=rh;Object.defineProperty(e,"Arbitrary",{enumerable:!0,get:function(){return te.Arbitrary}});const Ie=Sv;Object.defineProperty(e,"Shrinkable",{enumerable:!0,get:function(){return Ie.Shrinkable}});const je=uj;Object.defineProperty(e,"dictionary",{enumerable:!0,get:function(){return je.dictionary}});const J=WV;Object.defineProperty(e,"emailAddress",{enumerable:!0,get:function(){return J.emailAddress}});const ee=H$;Object.defineProperty(e,"double",{enumerable:!0,get:function(){return ee.double}});const fe=hj;Object.defineProperty(e,"float",{enumerable:!0,get:function(){return fe.float}});const ae=G$;Object.defineProperty(e,"frequency",{enumerable:!0,get:function(){return ae.frequency}});const he=xV;Object.defineProperty(e,"compareBooleanFunc",{enumerable:!0,get:function(){return he.compareBooleanFunc}});const _e=DV;Object.defineProperty(e,"compareFunc",{enumerable:!0,get:function(){return _e.compareFunc}});const Z=LV;Object.defineProperty(e,"func",{enumerable:!0,get:function(){return Z.func}});const ve=RM;Object.defineProperty(e,"domain",{enumerable:!0,get:function(){return ve.domain}});const Ee=yi;Object.defineProperty(e,"integer",{enumerable:!0,get:function(){return Ee.integer}});const H=mj;Object.defineProperty(e,"maxSafeInteger",{enumerable:!0,get:function(){return H.maxSafeInteger}});const re=BV;Object.defineProperty(e,"maxSafeNat",{enumerable:!0,get:function(){return re.maxSafeNat}});const oe=ey;Object.defineProperty(e,"nat",{enumerable:!0,get:function(){return oe.nat}});const ie=EM;Object.defineProperty(e,"ipV4",{enumerable:!0,get:function(){return ie.ipV4}});const le=gj;Object.defineProperty(e,"ipV4Extended",{enumerable:!0,get:function(){return le.ipV4Extended}});const me=yj;Object.defineProperty(e,"ipV6",{enumerable:!0,get:function(){return me.ipV6}});const ye=$j;Object.defineProperty(e,"letrec",{enumerable:!0,get:function(){return ye.letrec}});const We=KV;Object.defineProperty(e,"lorem",{enumerable:!0,get:function(){return We.lorem}});const Ke=dj;Object.defineProperty(e,"mapToConstant",{enumerable:!0,get:function(){return Ke.mapToConstant}});const Ne=GV;Object.defineProperty(e,"memo",{enumerable:!0,get:function(){return Ne.memo}});const ct=HV;Object.defineProperty(e,"mixedCase",{enumerable:!0,get:function(){return ct.mixedCase}});const $t=YV;Object.defineProperty(e,"object",{enumerable:!0,get:function(){return $t.object}});const yt=QV;Object.defineProperty(e,"json",{enumerable:!0,get:function(){return yt.json}});const Mt=PM;Object.defineProperty(e,"anything",{enumerable:!0,get:function(){return Mt.anything}});const Ut=ez;Object.defineProperty(e,"unicodeJsonObject",{enumerable:!0,get:function(){return Ut.unicodeJsonObject}});const fn=FM;Object.defineProperty(e,"unicodeJsonValue",{enumerable:!0,get:function(){return fn.unicodeJsonValue}});const sn=tz;Object.defineProperty(e,"jsonObject",{enumerable:!0,get:function(){return sn.jsonObject}});const Vt=CM;Object.defineProperty(e,"jsonValue",{enumerable:!0,get:function(){return Vt.jsonValue}});const Yt=nz;Object.defineProperty(e,"unicodeJson",{enumerable:!0,get:function(){return Yt.unicodeJson}});const ln=np;Object.defineProperty(e,"oneof",{enumerable:!0,get:function(){return ln.oneof}});const yn=ty;Object.defineProperty(e,"option",{enumerable:!0,get:function(){return yn.option}});const Zn=rz;Object.defineProperty(e,"record",{enumerable:!0,get:function(){return Zn.record}});const Xn=oz;Object.defineProperty(e,"set",{enumerable:!0,get:function(){return Xn.set}});const Qn=K$;Object.defineProperty(e,"uniqueArray",{enumerable:!0,get:function(){return Qn.uniqueArray}});const dn=uz;Object.defineProperty(e,"infiniteStream",{enumerable:!0,get:function(){return dn.infiniteStream}});const zt=fz;Object.defineProperty(e,"asciiString",{enumerable:!0,get:function(){return zt.asciiString}});const bn=sz;Object.defineProperty(e,"base64String",{enumerable:!0,get:function(){return bn.base64String}});const st=lz;Object.defineProperty(e,"fullUnicodeString",{enumerable:!0,get:function(){return st.fullUnicodeString}});const D=bj;Object.defineProperty(e,"hexaString",{enumerable:!0,get:function(){return D.hexaString}});const q=TM;Object.defineProperty(e,"string",{enumerable:!0,get:function(){return q.string}});const G=dz;Object.defineProperty(e,"string16bits",{enumerable:!0,get:function(){return G.string16bits}});const xe=wv;Object.defineProperty(e,"stringOf",{enumerable:!0,get:function(){return xe.stringOf}});const ut=Nj;Object.defineProperty(e,"unicodeString",{enumerable:!0,get:function(){return ut.unicodeString}});const x=pz;Object.defineProperty(e,"subarray",{enumerable:!0,get:function(){return x.subarray}});const V=vz;Object.defineProperty(e,"shuffledSubarray",{enumerable:!0,get:function(){return V.shuffledSubarray}});const ue=bM;Object.defineProperty(e,"genericTuple",{enumerable:!0,get:function(){return ue.genericTuple}});const ze=Ci;Object.defineProperty(e,"tuple",{enumerable:!0,get:function(){return ze.tuple}});const ke=mz;Object.defineProperty(e,"uuid",{enumerable:!0,get:function(){return ke.uuid}});const Tt=gz;Object.defineProperty(e,"uuidV",{enumerable:!0,get:function(){return Tt.uuidV}});const Rt=Uj;Object.defineProperty(e,"webAuthority",{enumerable:!0,get:function(){return Rt.webAuthority}});const kn=qj;Object.defineProperty(e,"webFragments",{enumerable:!0,get:function(){return kn.webFragments}});const Un=Dj;Object.defineProperty(e,"webQueryParameters",{enumerable:!0,get:function(){return Un.webQueryParameters}});const qn=Lj;Object.defineProperty(e,"webSegment",{enumerable:!0,get:function(){return qn.webSegment}});const er=yz;Object.defineProperty(e,"webUrl",{enumerable:!0,get:function(){return er.webUrl}});const Ur=$z;Object.defineProperty(e,"commands",{enumerable:!0,get:function(){return Ur.commands}});const tr=Am;Object.defineProperty(e,"asyncModelRun",{enumerable:!0,get:function(){return tr.asyncModelRun}}),Object.defineProperty(e,"modelRun",{enumerable:!0,get:function(){return tr.modelRun}}),Object.defineProperty(e,"scheduledModelRun",{enumerable:!0,get:function(){return tr.scheduledModelRun}});const F=KN;Object.defineProperty(e,"Random",{enumerable:!0,get:function(){return F.Random}});const j=gc;Object.defineProperty(e,"configureGlobal",{enumerable:!0,get:function(){return j.configureGlobal}}),Object.defineProperty(e,"readConfigureGlobal",{enumerable:!0,get:function(){return j.readConfigureGlobal}}),Object.defineProperty(e,"resetConfigureGlobal",{enumerable:!0,get:function(){return j.resetConfigureGlobal}});const z=BN;Object.defineProperty(e,"VerbosityLevel",{enumerable:!0,get:function(){return z.VerbosityLevel}});const ne=_V;Object.defineProperty(e,"ExecutionStatus",{enumerable:!0,get:function(){return ne.ExecutionStatus}});const Ue=Do;Object.defineProperty(e,"cloneMethod",{enumerable:!0,get:function(){return Ue.cloneMethod}}),Object.defineProperty(e,"cloneIfNeeded",{enumerable:!0,get:function(){return Ue.cloneIfNeeded}}),Object.defineProperty(e,"hasCloneMethod",{enumerable:!0,get:function(){return Ue.hasCloneMethod}});const Be=Rn;Object.defineProperty(e,"Stream",{enumerable:!0,get:function(){return Be.Stream}}),Object.defineProperty(e,"stream",{enumerable:!0,get:function(){return Be.stream}});const ht=OM;Object.defineProperty(e,"hash",{enumerable:!0,get:function(){return ht.hash}});const At=ep;Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return At.stringify}}),Object.defineProperty(e,"asyncStringify",{enumerable:!0,get:function(){return At.asyncStringify}}),Object.defineProperty(e,"toStringMethod",{enumerable:!0,get:function(){return At.toStringMethod}}),Object.defineProperty(e,"hasToStringMethod",{enumerable:!0,get:function(){return At.hasToStringMethod}}),Object.defineProperty(e,"asyncToStringMethod",{enumerable:!0,get:function(){return At.asyncToStringMethod}}),Object.defineProperty(e,"hasAsyncToStringMethod",{enumerable:!0,get:function(){return At.hasAsyncToStringMethod}});const xn=L_;Object.defineProperty(e,"scheduler",{enumerable:!0,get:function(){return xn.scheduler}}),Object.defineProperty(e,"schedulerFor",{enumerable:!0,get:function(){return xn.schedulerFor}});const nr=vs;Object.defineProperty(e,"defaultReportMessage",{enumerable:!0,get:function(){return nr.defaultReportMessage}}),Object.defineProperty(e,"asyncDefaultReportMessage",{enumerable:!0,get:function(){return nr.asyncDefaultReportMessage}});const bi=Rz;Object.defineProperty(e,"ArbitraryWithShrink",{enumerable:!0,get:function(){return bi.ArbitraryWithShrink}});const P=PN;Object.defineProperty(e,"ArbitraryWithContextualShrink",{enumerable:!0,get:function(){return P.ArbitraryWithContextualShrink}});const W=_v;Object.defineProperty(e,"PreconditionFailure",{enumerable:!0,get:function(){return W.PreconditionFailure}});const B=Mj;Object.defineProperty(e,"int8Array",{enumerable:!0,get:function(){return B.int8Array}});const X=wj;Object.defineProperty(e,"int16Array",{enumerable:!0,get:function(){return X.int16Array}});const Te=Aj;Object.defineProperty(e,"int32Array",{enumerable:!0,get:function(){return Te.int32Array}});const De=Ej;Object.defineProperty(e,"uint8Array",{enumerable:!0,get:function(){return De.uint8Array}});const bt=Tj;Object.defineProperty(e,"uint8ClampedArray",{enumerable:!0,get:function(){return bt.uint8ClampedArray}});const Dn=Rj;Object.defineProperty(e,"uint16Array",{enumerable:!0,get:function(){return Dn.uint16Array}});const $i=Oj;Object.defineProperty(e,"uint32Array",{enumerable:!0,get:function(){return $i.uint32Array}});const Li=_j;Object.defineProperty(e,"float32Array",{enumerable:!0,get:function(){return Li.float32Array}});const ns=Sj;Object.defineProperty(e,"float64Array",{enumerable:!0,get:function(){return ns.float64Array}});const rs=Cj;Object.defineProperty(e,"sparseArray",{enumerable:!0,get:function(){return rs.sparseArray}});const is=$r;Object.defineProperty(e,"NextArbitrary",{enumerable:!0,get:function(){return is.NextArbitrary}});const as=Tr;Object.defineProperty(e,"NextValue",{enumerable:!0,get:function(){return as.NextValue}});const zo=Ye;Object.defineProperty(e,"convertFromNext",{enumerable:!0,get:function(){return zo.convertFromNext}}),Object.defineProperty(e,"convertFromNextWithShrunkOnce",{enumerable:!0,get:function(){return zo.convertFromNextWithShrunkOnce}}),Object.defineProperty(e,"convertToNext",{enumerable:!0,get:function(){return zo.convertToNext}});const ic=ih;Object.defineProperty(e,"createDepthIdentifier",{enumerable:!0,get:function(){return ic.createDepthIdentifier}}),Object.defineProperty(e,"getDepthContextFor",{enumerable:!0,get:function(){return ic.getDepthContextFor}});const os="commonjs";e.__type=os;const us="2.25.0";e.__version=us;const cs="4c36a82eca7402fb502db7d227b192eb458b2f15";e.__commitHash=cs})(uH);(function(e){var t=K&&K.__createBinding||(Object.create?function(i,a,o,u){u===void 0&&(u=o);var c=Object.getOwnPropertyDescriptor(a,o);(!c||("get"in c?!a.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return a[o]}}),Object.defineProperty(i,u,c)}:function(i,a,o,u){u===void 0&&(u=o),i[u]=a[o]}),n=K&&K.__exportStar||function(i,a){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(a,o)&&t(a,i,o)};Object.defineProperty(e,"__esModule",{value:!0});const r=uH;e.default=r,n(uH,e)})(Qd);var Ea={};Object.defineProperty(Ea,"__esModule",{value:!0});Ea.FastCheckType=Ea.FastCheckURI=void 0;Ea.FastCheckURI="FastCheckURI";var fCn=function(){function e(t){this.arb=t}return e}();Ea.FastCheckType=fCn;var Y7={},Z7={},MO={};const sCn=Et(nBe);var AIe;function fJe(){if(AIe)return MO;AIe=1,Object.defineProperty(MO,"__esModule",{value:!0}),MO.fastCheckPrimitiveInterpreter=void 0;var e=it,t=Qd,n=CN,r=Bn,i=sCn,a=eV,o=ip(),u=Ea;return MO.fastCheckPrimitiveInterpreter=e.memo(function(){return{_F:u.FastCheckURI,date:function(c){return function(f){return new u.FastCheckType(o.fastCheckApplyConfig(c)(t.integer().map(function(s){return new Date(s)}),f,{}))}},boolean:function(c){return function(f){return new u.FastCheckType(o.fastCheckApplyConfig(c)(t.boolean(),f,{}))}},string:function(c){return function(f){return new u.FastCheckType(o.fastCheckApplyConfig(c)(t.string(),f,{}))}},number:function(c){return function(f){return new u.FastCheckType(o.fastCheckApplyConfig(c)(t.float(),f,{}))}},bigint:function(c){return function(f){return new u.FastCheckType(o.fastCheckApplyConfig(c)(t.bigInt(),f,{}))}},stringLiteral:function(c,f){return function(s){return new u.FastCheckType(o.fastCheckApplyConfig(f)(t.constant(c),s,{}))}},numberLiteral:function(c,f){return function(s){return new u.FastCheckType(o.fastCheckApplyConfig(f)(t.constant(c),s,{}))}},oneOfLiterals:function(c,f){return function(s){return new u.FastCheckType(o.fastCheckApplyConfig(f)(t.oneof.apply(void 0,c.map(t.constant)),s,{}))}},tag:function(c,f){return function(s){return new u.FastCheckType(o.fastCheckApplyConfig(f)(t.constant(c),s,{}))}},keysOf:function(c,f){return function(s){return new u.FastCheckType(o.fastCheckApplyConfig(f)(t.oneof.apply(void 0,Object.keys(c).map(t.constant)),s,{}))}},nullable:function(c,f){return function(s){return r.pipe(c(s).arb,function(l){return new u.FastCheckType(o.fastCheckApplyConfig(f)(t.option(l).map(a.fromNullable),s,{arb:l}))})}},optional:function(c,f){return function(s){return r.pipe(c(s).arb,function(l){return new u.FastCheckType(o.fastCheckApplyConfig(f)(t.option(l).map(function(d){return d===null?void 0:d}),s,{arb:l}))})}},mutable:function(c,f){return function(s){return r.pipe(c(s).arb,function(l){return new u.FastCheckType(o.fastCheckApplyConfig(f)(l,s,{arb:l}))})}},array:function(c,f){return function(s){return r.pipe(c(s).arb,function(l){return new u.FastCheckType(o.fastCheckApplyConfig(f)(t.array(l),s,{arb:l}))})}},nonEmptyArray:function(c,f){return function(s){return r.pipe(c(s).arb,function(l){return new u.FastCheckType(o.fastCheckApplyConfig(f)(t.array(l).chain(function(d){return l.map(function(p){return i.cons(p,d)})}),s,{arb:l}))})}},uuid:function(c){return function(f){return r.pipe(t.uuid(),function(s){return new u.FastCheckType(o.fastCheckApplyConfig(c)(s,f,{arb:s}))})}},either:function(c,f,s){return function(l){return function(d,p){return new u.FastCheckType(o.fastCheckApplyConfig(s)(t.oneof(d.map(n.left),p.map(n.right)),l,{left:d,right:p}))}(c(l).arb,f(l).arb)}},option:function(c,f){return function(s){return r.pipe(c(s).arb,function(l){return new u.FastCheckType(o.fastCheckApplyConfig(f)(t.oneof(l.map(a.some),t.constant(a.none)),s,{arb:l}))})}},unknownE:function(c,f){return function(s){return new u.FastCheckType(o.fastCheckApplyConfig(f)(c(s).arb,s,{}))}}}}),MO}var RO={},MIe;function sJe(){if(MIe)return RO;MIe=1,Object.defineProperty(RO,"__esModule",{value:!0}),RO.fastCheckObjectInterpreter=void 0;var e=ua,t=it,n=Qd,r=ip(),i=Ea;return RO.fastCheckObjectInterpreter=t.memo(function(){return{_F:i.FastCheckURI,partial:function(a,o,u){return function(c){var f=t.projectFieldWithEnv(a,c)("arb");return new i.FastCheckType(r.fastCheckApplyConfig(u)(n.record(f,{withDeletedKeys:!0}),c,{arbs:f}))}},interface:function(a,o,u){return function(c){var f=t.projectFieldWithEnv(a,c)("arb");return new i.FastCheckType(r.fastCheckApplyConfig(u)(n.record(f),c,{arbs:f}))}},both:function(a,o,u,c){return function(f){var s=t.projectFieldWithEnv(a,f)("arb"),l=t.projectFieldWithEnv(o,f)("arb");return new i.FastCheckType(r.fastCheckApplyConfig(c)(n.record(s).chain(function(d){return n.record(l,{withDeletedKeys:!0}).map(function(p){return e.__assign(e.__assign({},d),p)})}),f,{arbs:s,partialArbs:l}))}}}}),RO}var OO={},RIe;function lJe(){if(RIe)return OO;RIe=1,Object.defineProperty(OO,"__esModule",{value:!0}),OO.fastCheckTaggedUnionInterpreter=void 0;var e=it,t=Qd,n=ip(),r=Ea;return OO.fastCheckTaggedUnionInterpreter=e.memo(function(){return{_F:r.FastCheckURI,taggedUnion:function(i,a,o,u){return function(c){return new r.FastCheckType(n.fastCheckApplyConfig(u)(t.oneof.apply(void 0,e.collect(a,function(f,s){return s(c).arb})),c,{}))}}}}),OO}var Vj={};Object.defineProperty(Vj,"__esModule",{value:!0});Vj.fastCheckUnionInterpreter=void 0;var lCn=it,dCn=Qd,OIe=Ea;Vj.fastCheckUnionInterpreter=lCn.memo(function(){return{_F:OIe.FastCheckURI,union:function(e){return function(t,n){return function(r){return new OIe.FastCheckType(dCn.oneof.apply(void 0,e.map(function(i){return i(r).arb})))}}}}});var EO={},EIe;function dJe(){if(EIe)return EO;EIe=1,Object.defineProperty(EO,"__esModule",{value:!0}),EO.fastCheckRecursiveInterpreter=void 0;var e=it,t=Qd,n=ip(),r=Ea;return EO.fastCheckRecursiveInterpreter=e.memo(function(){return{_F:r.FastCheckURI,recursive:function(i,a,o){var u=e.memo(function(){return i(c)}),c=function(f){return new r.FastCheckType(n.fastCheckApplyConfig(o)(t.constant(null).chain(function(s){return u()(f).arb}),f,{}))};return c}}}),EO}var TO={};const pJe=Et(GVe),pCn=Et($ae);var TIe;function hJe(){if(TIe)return TO;TIe=1,Object.defineProperty(TO,"__esModule",{value:!0}),TO.fastCheckStrMapInterpreter=void 0;var e=it,t=Qd,n=pJe,r=bu,i=D$,a=pCn,o=ip(),u=Ea,c=function(){return i.fromFoldable(a.getFirstSemigroup(),n.array)};return TO.fastCheckStrMapInterpreter=e.memo(function(){return{_F:u.FastCheckURI,strMap:function(f,s){return function(l){return r.pipe(f(l).arb,function(d){return new u.FastCheckType(o.fastCheckApplyConfig(s)(t.array(t.tuple(t.string(),d)).map(c()),l,{arb:d}))})}},record:function(f,s,l){return function(d){return function(p,v){return new u.FastCheckType(o.fastCheckApplyConfig(l)(t.array(t.tuple(p,v)).map(c()),d,{domainArb:p,codomainArb:v}))}(f(d).arb,s(d).arb)}}}}),TO}var CO={};const hCn=Et(HKe);var CIe;function vJe(){if(CIe)return CO;CIe=1,Object.defineProperty(CO,"__esModule",{value:!0}),CO.fastCheckSetInterpreter=void 0;var e=it,t=Qd,n=bu,r=hCn,i=ip(),a=Ea;return CO.fastCheckSetInterpreter=e.memo(function(){return{_F:a.FastCheckURI,set:function(o,u,c){return function(f){return n.pipe(o(f).arb,function(s){return new a.FastCheckType(i.fastCheckApplyConfig(c)(t.set(s).map(r.fromArray(u)),f,{arb:s}))})}}}}),CO}var PO={},PIe;function mJe(){if(PIe)return PO;PIe=1,Object.defineProperty(PO,"__esModule",{value:!0}),PO.fastCheckUnknownInterpreter=void 0;var e=it,t=Qd,n=bu,r=ip(),i=Ea;return PO.fastCheckUnknownInterpreter=e.memo(function(){return{_F:i.FastCheckURI,unknown:function(a){return function(o){return n.pipe(t.anything(),function(u){return new i.FastCheckType(r.fastCheckApplyConfig(a)(u,o,{arb:u}))})}}}}),PO}var FO={},FIe;function gJe(){if(FIe)return FO;FIe=1,Object.defineProperty(FO,"__esModule",{value:!0}),FO.fastCheckNewtypeInterpreter=void 0;var e=it,t=Bn,n=ip(),r=Ea;return FO.fastCheckNewtypeInterpreter=e.memo(function(){return{_F:r.FastCheckURI,newtype:function(){return function(i,a){return function(o){return t.pipe(i(o).arb,function(u){return new r.FastCheckType(n.fastCheckApplyConfig(a)(u,o,{arb:u}))})}}},newtypeIso:function(i,a,o,u){return function(c){return t.pipe(a(c).arb,function(f){return new r.FastCheckType(n.fastCheckApplyConfig(u)(f.map(i.get),c,{arb:f}))})}},newtypePrism:function(i,a,o,u){return function(c){return t.pipe(a(c).arb,function(f){return new r.FastCheckType(n.fastCheckApplyConfig(u)(f.filter(function(s){return i.getOption(s)._tag==="Some"}).map(function(s){return i.getOption(s).value}),c,{arb:f}))})}}}}),FO}var WO={},WIe;function yJe(){if(WIe)return WO;WIe=1,Object.defineProperty(WO,"__esModule",{value:!0}),WO.fastCheckRefinedInterpreter=void 0;var e=it,t=Bn,n=ip(),r=Ea;return WO.fastCheckRefinedInterpreter=e.memo(function(){return{_F:r.FastCheckURI,refined:function(i,a,o,u){return function(c){return t.pipe(i(c).arb,function(f){return new r.FastCheckType(n.fastCheckApplyConfig(u)(f.filter(a),c,{arb:f}))})}},constrained:function(i,a,o,u){return function(c){return t.pipe(i(c).arb,function(f){return new r.FastCheckType(n.fastCheckApplyConfig(u)(i(c).arb.filter(a),c,{arb:f}))})}}}}),WO}var NIe;function vCn(){return NIe||(NIe=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=ua;t.__exportStar(fJe(),e),t.__exportStar(bJe(),e),t.__exportStar(sJe(),e),t.__exportStar(lJe(),e),t.__exportStar(Vj,e),t.__exportStar(dJe(),e),t.__exportStar(hJe(),e),t.__exportStar(vJe(),e),t.__exportStar(mJe(),e),t.__exportStar(gJe(),e),t.__exportStar(yJe(),e)}(Z7)),Z7}var jIe;function ip(){return jIe||(jIe=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.fastCheckApplyConfig=e.FastCheckURI=void 0;var t=ua,n=L$,r=Ea;Object.defineProperty(e,"FastCheckURI",{enumerable:!0,get:function(){return r.FastCheckURI}}),t.__exportStar(vCn(),e),e.fastCheckApplyConfig=n.getApplyConfig(r.FastCheckURI)}(Y7)),Y7}var kIe;function bJe(){if(kIe)return bO;kIe=1,Object.defineProperty(bO,"__esModule",{value:!0}),bO.fastCheckIntersectionInterpreter=void 0;var e=ua,t=it,n=Qd,r=Ea,i=ip();return bO.fastCheckIntersectionInterpreter=t.memo(function(){return{_F:r.FastCheckURI,intersection:function(){for(var a=[],o=0;o")}function gCn(e,t){return{key:e,type:t}}function rd(e,t,n,r){for(var i=e.length,a=Array(i+1),o=0;o")}function yCn(e,t,n,r){r===void 0&&(r="{ [K in ".concat(t.name,"]: ").concat(n.name," }"));for(var i=e.length,a={},o=0;o0?Av(o):Ir(f?a:r)}return xIe(t)&&Array.isArray(r)?Ir(r):so(r,i)},e.encode===An&&t.encode===An?function(r){return UIe(r,e)}:function(r){for(var i={},a=Object.keys(UIe(r,e)),o=a.length,u=0;u")}function ICn(e){return e.length>0}var Cu={};function AJe(e,t){for(var n=[],r=0,i=e;r")),new VJe(t,function(n){return V_.is(n)&&n.every(e.is)},function(n,r){var i=V_.validate(n,r);if(et(i))return i;for(var a=i.right,o=a.length,u=a,c=[],f=0;f0?Av(c):Ir(u)},e.encode===An?An:function(n){return n.map(e.encode)},e)}var KJe=function(e){Nn(t,e);function t(n,r,i,a,o){var u=e.call(this,n,r,i,a)||this;return u.props=o,u._tag="InterfaceType",u}return t}(jn);function $H(e,t){t===void 0&&(t=_Je(e));var n=Object.keys(e),r=n.map(function(a){return e[a]}),i=n.length;return new KJe(t,function(a){if(wc.is(a)){for(var o=0;o0?Av(s):Ir(f)},fT(r)?An:function(a){for(var o=B_({},a),u=0;u0?Av(s):Ir(f)},fT(r)?An:function(a){for(var o=B_({},a),u=0;u0){var r=n[0],i=n[1],a=i.length,o=function(u){for(var c=0;c0?Av(o):Ir(yH(r,a))},e.length===0?An:function(r){return yH(r,e.map(function(i){return i.encode(r)}))},e)}var ZJe=function(e){Nn(t,e);function t(n,r,i,a,o){var u=e.call(this,n,r,i,a)||this;return u.types=o,u._tag="TupleType",u}return t}(jn);function xCn(e,t){t===void 0&&(t="[".concat(e.map(function(r){return r.name}).join(", "),"]"));var n=e.length;return new ZJe(t,function(r){return V_.is(r)&&r.length===n&&e.every(function(i,a){return i.is(r[a])})},function(r,i){var a=V_.validate(r,i);if(et(a))return a;for(var o=a.right,u=o.length>n?o.slice(0,n):o,c=[],f=0;f0?Av(c):Ir(u)},fT(e)?An:function(r){return e.map(function(i,a){return i.encode(r[a])})},e)}var XJe=function(e){Nn(t,e);function t(n,r,i,a,o){var u=e.call(this,n,r,i,a)||this;return u.type=o,u._tag="ReadonlyType",u}return t}(jn);function DCn(e,t){return t===void 0&&(t="Readonly<".concat(e.name,">")),new XJe(t,e.is,e.validate,e.encode,e)}var QJe=function(e){Nn(t,e);function t(n,r,i,a,o){var u=e.call(this,n,r,i,a)||this;return u.type=o,u._tag="ReadonlyArrayType",u}return t}(jn);function LCn(e,t){t===void 0&&(t="ReadonlyArray<".concat(e.name,">"));var n=zJe(e);return new QJe(t,n.is,n.validate,n.encode,e)}var eYe=function(e,t){return nYe($H(e),t)},tYe=function(e){Nn(t,e);function t(n,r,i,a,o){var u=e.call(this,n,r,i,a)||this;return u.type=o,u._tag="ExactType",u}return t}(jn);function nYe(e,t){t===void 0&&(t=$Cn(e));var n=bH(e);return new tYe(t,e.is,function(r,i){var a=wc.validate(r,i);if(et(a))return a;var o=e.validate(r,i);return et(o)?o:Gt(qIe(o.right,n))},function(r){return e.encode(qIe(r,n))},e)}var rYe=function(e){Nn(t,e);function t(){var n=e.call(this,"Function",function(r){return typeof r=="function"},function(r,i){return n.is(r)?Ir(r):so(r,i)},An)||this;return n._tag="FunctionType",n}return t}(jn),BCn=new rYe,iYe=function(e){Nn(t,e);function t(){var n=e.call(this,"never",function(r){return!1},function(r,i){return so(r,i)},function(){throw new Error("cannot encode never")})||this;return n._tag="NeverType",n}return t}(jn),VCn=new iYe,aYe=function(e){Nn(t,e);function t(){var n=e.call(this,"any",function(r){return!0},Ir,An)||this;return n._tag="AnyType",n}return t}(jn),zCn=new aYe;function zse(e,t,n){return n===void 0&&(n="(".concat(e.name," | ").concat(IJe(t),")")),new LJe(n,function(r){return e.is(r)&&t(r)},function(r,i){var a=e.validate(r,i);if(et(a))return a;var o=a.right;return t(o)?Ir(o):so(o,i)},e.encode,e,t)}var KCn=zse(Dse,Number.isInteger,"Integer"),Tq=function(e){Nn(t,e);function t(n,r,i,a,o,u){var c=e.call(this,n,r,i,a,o)||this;return c.tag=u,c}return t}(Vse),GCn=function(e,t,n){n===void 0&&(n=wJe(t));var r=JJe(t,n);return r instanceof Tq?r:(console.warn("[io-ts] Cannot build a tagged union for ".concat(n,", returning a de-optimized union")),new Tq(n,r.is,r.validate,r.encode,t,e))},HCn=function(e,t){return{value:e,context:t}},JCn=function(e){return[{key:"",type:e}]},YCn=wc,oYe=function(e){Nn(t,e);function t(){var n=e.call(this,"object",function(r){return r!==null&&typeof r=="object"},function(r,i){return n.is(r)?Ir(r):so(r,i)},An)||this;return n._tag="ObjectType",n}return t}(jn),ZCn=new oYe,XCn=HJe,QCn=function(e){Nn(t,e);function t(n,r,i,a,o){var u=e.call(this,n,r,i,a)||this;return u.props=o,u._tag="StrictType",u}return t}(jn);function ePn(e){return e}function tPn(e){return function(){return e}}const nPn=Object.freeze(Object.defineProperty({__proto__:null,AnyArrayType:UJe,AnyDictionaryType:qJe,AnyType:aYe,Array:V_,ArrayType:VJe,BigIntType:jJe,BooleanType:kJe,Dictionary:YCn,DictionaryType:Bse,ExactType:tYe,Function:BCn,FunctionType:rYe,Int:jCn,Integer:KCn,InterfaceType:KJe,IntersectionType:YJe,KeyofType:DJe,LiteralType:xJe,NeverType:iYe,NullType:TJe,NumberType:NJe,ObjectType:oYe,PartialType:GJe,ReadonlyArrayType:QJe,ReadonlyType:XJe,RecursiveType:Lse,RefinementType:LJe,StrictType:QCn,StringType:WJe,TaggedUnionType:Tq,TupleType:ZJe,Type:jn,UndefinedType:CJe,UnionType:Vse,UnknownArray:V_,UnknownRecord:wc,UnknownType:FJe,VoidType:PJe,alias:tPn,any:zCn,appendContext:rd,array:zJe,bigint:PCn,boolean:FCn,brand:BJe,clean:ePn,dictionary:XCn,emptyTags:Cu,exact:nYe,failure:so,failures:Av,getContextEntry:gCn,getDefaultContext:JCn,getDomainKeys:qse,getFunctionName:IJe,getIndex:EJe,getTags:hm,getValidationError:HCn,identity:An,interface:$H,intersection:qCn,keyof:NCn,literal:WCn,mergeAll:yH,never:VCn,null:DIe,nullType:DIe,number:Dse,object:ZCn,partial:UCn,readonly:DCn,readonlyArray:LCn,record:HJe,recursion:kCn,refinement:zse,strict:eYe,string:xse,success:Ir,taggedUnion:GCn,tuple:xCn,type:$H,undefined:Eq,union:JJe,unknown:CCn,void:LIe,voidType:LIe},Symbol.toStringTag,{value:"Module"})),lo=Et(nPn);var Ta={};Object.defineProperty(Ta,"__esModule",{value:!0});Ta.IOTSType=Ta.IoTsURI=void 0;var rPn=CN;Ta.IoTsURI="IoTsURI";var iPn=function(){function e(t){var n=this;this.type=t,this.create=function(r){return rPn.map(function(i){return i})(n.type.decode(n.type.encode(r)))}}return e}();Ta.IOTSType=iPn;var Q7={},e9={},t9={},Oz={},hn={},Lo={},bl={};(function(e){var t=K&&K.__spreadArray||function(A,E,N){if(N||arguments.length===2)for(var U=0,te=E.length,Ie;U0};e.isNonEmpty=l;var d=function(A){return A[0]};e.head=d;var p=function(A){return A.slice(1)};e.tail=p,e.emptyReadonlyArray=[],e.emptyRecord={},e.has=Object.prototype.hasOwnProperty;var v=function(A){return t([A[0]],A.slice(1),!0)};e.fromReadonlyNonEmptyArray=v;var h=function(A){return function(E,N){return function(){for(var U=[],te=0;te"),hE.union([hE.strict({_tag:bFn,left:e},"Left<"+e.name+">"),hE.strict({_tag:$Fn,right:t},"Right<"+e.name+">")],n)}Tz.either=IFn;var Gj={},_Fn=K&&K.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),SFn=K&&K.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),wFn=K&&K.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.hasOwnProperty.call(e,n)&&_Fn(t,e,n);return SFn(t,e),t};Object.defineProperty(Gj,"__esModule",{value:!0});Gj.option=void 0;var sT=wFn(lo),AFn=sT.strict({_tag:sT.literal("None")},"None"),MFn=sT.literal("Some");function RFn(e,t){return t===void 0&&(t="Option<"+e.name+">"),sT.union([AFn,sT.strict({_tag:MFn,value:e},"Some<"+e.name+">")],t)}Gj.option=RFn;var Cz={},Hse={},Jse={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.and=e.or=e.not=e.Contravariant=e.getMonoidAll=e.getSemigroupAll=e.getMonoidAny=e.getSemigroupAny=e.URI=e.contramap=void 0;var t=Bn,n=function(l,d){return(0,t.pipe)(l,(0,e.contramap)(d))},r=function(l){return function(d){return(0,t.flow)(l,d)}};e.contramap=r,e.URI="Predicate";var i=function(){return{concat:function(l,d){return(0,t.pipe)(l,(0,e.or)(d))}}};e.getSemigroupAny=i;var a=function(){return{concat:(0,e.getSemigroupAny)().concat,empty:t.constFalse}};e.getMonoidAny=a;var o=function(){return{concat:function(l,d){return(0,t.pipe)(l,(0,e.and)(d))}}};e.getSemigroupAll=o;var u=function(){return{concat:(0,e.getSemigroupAll)().concat,empty:t.constTrue}};e.getMonoidAll=u,e.Contravariant={URI:e.URI,contramap:n};var c=function(l){return function(d){return!l(d)}};e.not=c;var f=function(l){return function(d){return function(p){return d(p)||l(p)}}};e.or=f;var s=function(l){return function(d){return function(p){return d(p)&&l(p)}}};e.and=s})(Jse);var Yse={},sf={};Object.defineProperty(sf,"__esModule",{value:!0});sf.concatAll=sf.endo=sf.filterSecond=sf.filterFirst=sf.reverse=void 0;var OFn=function(e){return{concat:function(t,n){return e.concat(n,t)}}};sf.reverse=OFn;var EFn=function(e){return function(t){return{concat:function(n,r){return e(n)?t.concat(n,r):r}}}};sf.filterFirst=EFn;var TFn=function(e){return function(t){return{concat:function(n,r){return e(r)?t.concat(n,r):n}}}};sf.filterSecond=TFn;var CFn=function(e){return function(t){return{concat:function(n,r){return t.concat(e(n),e(r))}}}};sf.endo=CFn;var PFn=function(e){return function(t){return function(n){return n.reduce(function(r,i){return e.concat(r,i)},t)}}};sf.concatAll=PFn;var Hj={},Jj={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.eqDate=e.eqNumber=e.eqString=e.eqBoolean=e.eq=e.strictEqual=e.getStructEq=e.getTupleEq=e.Contravariant=e.getMonoid=e.getSemigroup=e.eqStrict=e.URI=e.contramap=e.tuple=e.struct=e.fromEquals=void 0;var t=Bn,n=function(s){return{equals:function(l,d){return l===d||s(l,d)}}};e.fromEquals=n;var r=function(s){return(0,e.fromEquals)(function(l,d){for(var p in s)if(!s[p].equals(l[p],d[p]))return!1;return!0})};e.struct=r;var i=function(){for(var s=[],l=0;l-1?A:E}};e.max=b;var y=function(I){var A=(0,e.min)(I),E=(0,e.max)(I);return function(N,U){return function(te){return E(A(te,U),N)}}};e.clamp=y;var m=function(I){var A=(0,e.lt)(I),E=(0,e.gt)(I);return function(N,U){return function(te){return!(A(te,N)||E(te,U))}}};e.between=m,e.getTupleOrd=e.tuple,e.getDualOrd=e.reverse,e.ord=e.Contravariant;function g(I,A){return IA?1:0}var _={equals:t.eqStrict.equals,compare:g};e.ordBoolean=_,e.ordString=_,e.ordNumber=_,e.ordDate=(0,n.pipe)(e.ordNumber,(0,e.contramap)(function(I){return I.valueOf()}))})(Hj);(function(e){var t=K&&K.__createBinding||(Object.create?function(y,m,g,_){_===void 0&&(_=g);var I=Object.getOwnPropertyDescriptor(m,g);(!I||("get"in I?!m.__esModule:I.writable||I.configurable))&&(I={enumerable:!0,get:function(){return m[g]}}),Object.defineProperty(y,_,I)}:function(y,m,g,_){_===void 0&&(_=g),y[_]=m[g]}),n=K&&K.__setModuleDefault||(Object.create?function(y,m){Object.defineProperty(y,"default",{enumerable:!0,value:m})}:function(y,m){y.default=m}),r=K&&K.__importStar||function(y){if(y&&y.__esModule)return y;var m={};if(y!=null)for(var g in y)g!=="default"&&Object.prototype.hasOwnProperty.call(y,g)&&t(m,y,g);return n(m,y),m};Object.defineProperty(e,"__esModule",{value:!0}),e.semigroupProduct=e.semigroupSum=e.semigroupString=e.getFunctionSemigroup=e.semigroupAny=e.semigroupAll=e.getIntercalateSemigroup=e.getMeetSemigroup=e.getJoinSemigroup=e.getDualSemigroup=e.getStructSemigroup=e.getTupleSemigroup=e.getFirstSemigroup=e.getLastSemigroup=e.getObjectSemigroup=e.semigroupVoid=e.concatAll=e.last=e.first=e.intercalate=e.tuple=e.struct=e.reverse=e.constant=e.max=e.min=void 0,e.fold=b;var i=Bn,a=r(bl),o=r(sf),u=r(Hj),c=function(y){return{concat:u.min(y)}};e.min=c;var f=function(y){return{concat:u.max(y)}};e.max=f;var s=function(y){return{concat:function(){return y}}};e.constant=s,e.reverse=o.reverse;var l=function(y){return{concat:function(m,g){var _={};for(var I in y)a.has.call(y,I)&&(_[I]=y[I].concat(m[I],g[I]));return _}}};e.struct=l;var d=function(){for(var y=[],m=0;m"),new KIe.Type(t,kFn.option(e).is,function(n,r){return n==null?KIe.success(kU.none):zIe.pipe(e.validate(n,r),jFn.map(kU.some))},function(n){return kU.toNullable(zIe.pipe(n,kU.map(e.encode)))})}Cz.optionFromNullable=UFn;var Pz={},Fz={},Zse={},Xse={};(function(e){var t=K&&K.__createBinding||(Object.create?function(P,W,B,X){X===void 0&&(X=B);var Te=Object.getOwnPropertyDescriptor(W,B);(!Te||("get"in Te?!W.__esModule:Te.writable||Te.configurable))&&(Te={enumerable:!0,get:function(){return W[B]}}),Object.defineProperty(P,X,Te)}:function(P,W,B,X){X===void 0&&(X=B),P[X]=W[B]}),n=K&&K.__setModuleDefault||(Object.create?function(P,W){Object.defineProperty(P,"default",{enumerable:!0,value:W})}:function(P,W){P.default=W}),r=K&&K.__importStar||function(P){if(P&&P.__esModule)return P;var W={};if(P!=null)for(var B in P)B!=="default"&&Object.prototype.hasOwnProperty.call(P,B)&&t(W,P,B);return n(W,P),W},i=K&&K.__spreadArray||function(P,W,B){if(B||arguments.length===2)for(var X=0,Te=W.length,De;X=W.length};e.isOutOfBound=p;var v=function(P){return function(W){return i([P],W,!0)}};e.prependW=v,e.prepend=e.prependW;var h=function(P){return function(W){return i(i([],W,!0),[P],!1)}};e.appendW=h,e.append=e.appendW;var $=function(P,W,B){if((0,e.isNonEmpty)(B)){var X=s.fromReadonlyNonEmptyArray(B);return X.splice(P,0,W),X}return[W]};e.unsafeInsertAt=$;var b=function(P,W,B){if(B[P]===W)return B;var X=s.fromReadonlyNonEmptyArray(B);return X[P]=W,X};e.unsafeUpdateAt=b;var y=function(P){return function(W){if(W.length===1)return W;for(var B=[(0,e.head)(W)],X=(0,e.tail)(W),Te=function($i){B.every(function(Li){return!P.equals(Li,$i)})&&B.push($i)},De=0,bt=X;De=W.length?[W,e.empty]:[(0,c.pipe)(W.slice(1,B),(0,e.prepend)((0,e.head)(W))),W.slice(B)]}};e.splitAt=me;var ye=function(P){return(0,e.chop)((0,e.splitAt)(P))};e.chunksOf=ye;var We=function(P,W){return(0,c.pipe)(P,(0,e.map)(W))},Ke=function(P,W){return(0,c.pipe)(P,(0,e.mapWithIndex)(W))},Ne=function(P,W){return(0,c.pipe)(P,(0,e.ap)(W))},ct=function(P,W){return(0,c.pipe)(P,(0,e.extend)(W))},$t=function(P,W,B){return(0,c.pipe)(P,(0,e.reduce)(W,B))},yt=function(P){var W=(0,e.foldMap)(P);return function(B,X){return(0,c.pipe)(B,W(X))}},Mt=function(P,W,B){return(0,c.pipe)(P,(0,e.reduceRight)(W,B))},Ut=function(P){var W=(0,e.traverse)(P);return function(B,X){return(0,c.pipe)(B,W(X))}},fn=function(P,W){return(0,c.pipe)(P,(0,e.alt)(W))},sn=function(P,W,B){return(0,c.pipe)(P,(0,e.reduceWithIndex)(W,B))},Vt=function(P){var W=(0,e.foldMapWithIndex)(P);return function(B,X){return(0,c.pipe)(B,W(X))}},Yt=function(P,W,B){return(0,c.pipe)(P,(0,e.reduceRightWithIndex)(W,B))},ln=function(P){var W=(0,e.traverseWithIndex)(P);return function(B,X){return(0,c.pipe)(B,W(X))}};e.of=s.singleton;var yn=function(P){return function(W){return(0,c.pipe)(W,je(P()))}};e.altW=yn,e.alt=e.altW;var Zn=function(P){return(0,e.flatMap)(function(W){return(0,c.pipe)(P,(0,e.map)(W))})};e.ap=Zn,e.flatMap=(0,c.dual)(2,function(P,W){return(0,c.pipe)(P,(0,e.chainWithIndex)(function(B,X){return W(X,B)}))});var Xn=function(P){return function(W){for(var B=(0,e.tail)(W),X=[P(W)];(0,e.isNonEmpty)(B);)X.push(P(B)),B=(0,e.tail)(B);return X}};e.extend=Xn,e.duplicate=(0,e.extend)(c.identity),e.flatten=(0,e.flatMap)(c.identity);var Qn=function(P){return(0,e.mapWithIndex)(function(W,B){return P(B)})};e.map=Qn;var dn=function(P){return function(W){for(var B=[P(0,(0,e.head)(W))],X=1;XB.length?s.none:s.some((0,e.unsafeInsertAt)(P,W,B))}};e.insertAt=bi,e.prependToAll=e.prependAll,e.fold=e.concatAll,e.readonlyNonEmptyArray={URI:e.URI,of:e.of,map:We,mapWithIndex:Ke,ap:Ne,chain:e.flatMap,extend:ct,extract:e.extract,reduce:$t,foldMap:yt,reduceRight:Mt,traverse:Ut,sequence:e.sequence,reduceWithIndex:sn,foldMapWithIndex:Vt,reduceRightWithIndex:Yt,traverseWithIndex:ln,alt:fn}})(Xse);(function(e){var t=K&&K.__createBinding||(Object.create?function(F,j,z,ne){ne===void 0&&(ne=z);var Ue=Object.getOwnPropertyDescriptor(j,z);(!Ue||("get"in Ue?!j.__esModule:Ue.writable||Ue.configurable))&&(Ue={enumerable:!0,get:function(){return j[z]}}),Object.defineProperty(F,ne,Ue)}:function(F,j,z,ne){ne===void 0&&(ne=z),F[ne]=j[z]}),n=K&&K.__setModuleDefault||(Object.create?function(F,j){Object.defineProperty(F,"default",{enumerable:!0,value:j})}:function(F,j){F.default=j}),r=K&&K.__importStar||function(F){if(F&&F.__esModule)return F;var j={};if(F!=null)for(var z in F)z!=="default"&&Object.prototype.hasOwnProperty.call(F,z)&&t(j,F,z);return n(j,F),j},i=K&&K.__spreadArray||function(F,j,z){if(z||arguments.length===2)for(var ne=0,Ue=j.length,Be;ne0};e.isNonEmpty=d;var p=function(F,j){return F<0||F>=j.length};e.isOutOfBound=p;var v=function(F){return function(j){return i([F],j,!0)}};e.prependW=v,e.prepend=e.prependW;var h=function(F){return function(j){return i(i([],j,!0),[F],!1)}};e.appendW=h,e.append=e.appendW;var $=function(F,j,z){if((0,e.isNonEmpty)(z)){var ne=(0,e.fromReadonlyNonEmptyArray)(z);return ne.splice(F,0,j),ne}return[j]};e.unsafeInsertAt=$;var b=function(F,j,z){var ne=(0,e.fromReadonlyNonEmptyArray)(z);return ne[F]=j,ne};e.unsafeUpdateAt=b;var y=function(F){return function(j){if(j.length===1)return(0,e.copy)(j);for(var z=[(0,e.head)(j)],ne=(0,e.tail)(j),Ue=function(xn){z.every(function(nr){return!F.equals(nr,xn)})&&z.push(xn)},Be=0,ht=ne;Bez.length?f.none:f.some((0,e.unsafeInsertAt)(F,j,z))}};e.insertAt=he;var _e=function(F,j){return(0,e.modifyAt)(F,function(){return j})};e.updateAt=_e;var Z=function(F,j){return function(z){return(0,e.isOutOfBound)(F,z)?f.none:f.some((0,e.unsafeUpdateAt)(F,j(z[F]),z))}};e.modifyAt=Z,e.copy=e.fromReadonlyNonEmptyArray;var ve=function(F){return[F]};e.of=ve;var Ee=function(F,j,z){for(var ne=[z(F[0],j[0])],Ue=Math.min(F.length,j.length),Be=1;Be=j.length?[(0,e.copy)(j),[]]:[(0,u.pipe)(j.slice(1,z),(0,e.prepend)((0,e.head)(j))),j.slice(z)]}};e.splitAt=ye;var We=function(F){return(0,e.chop)((0,e.splitAt)(F))};e.chunksOf=We;var Ke=function(F,j){return(0,u.pipe)(F,(0,e.map)(j))},Ne=function(F,j){return(0,u.pipe)(F,(0,e.mapWithIndex)(j))},ct=function(F,j){return(0,u.pipe)(F,(0,e.ap)(j))},$t=function(F,j){return(0,u.pipe)(F,(0,e.extend)(j))},yt=function(F,j,z){return(0,u.pipe)(F,(0,e.reduce)(j,z))},Mt=function(F){var j=(0,e.foldMap)(F);return function(z,ne){return(0,u.pipe)(z,j(ne))}},Ut=function(F,j,z){return(0,u.pipe)(F,(0,e.reduceRight)(j,z))},fn=function(F){var j=(0,e.traverse)(F);return function(z,ne){return(0,u.pipe)(z,j(ne))}},sn=function(F,j){return(0,u.pipe)(F,(0,e.alt)(j))},Vt=function(F,j,z){return(0,u.pipe)(F,(0,e.reduceWithIndex)(j,z))},Yt=function(F){var j=(0,e.foldMapWithIndex)(F);return function(z,ne){return(0,u.pipe)(z,j(ne))}},ln=function(F,j,z){return(0,u.pipe)(F,(0,e.reduceRightWithIndex)(j,z))},yn=function(F){var j=(0,e.traverseWithIndex)(F);return function(z,ne){return(0,u.pipe)(z,j(ne))}},Zn=function(F){return function(j){return(0,u.pipe)(j,Ie(F()))}};e.altW=Zn,e.alt=e.altW;var Xn=function(F){return(0,e.flatMap)(function(j){return(0,u.pipe)(F,(0,e.map)(j))})};e.ap=Xn,e.flatMap=(0,u.dual)(2,function(F,j){return(0,u.pipe)(F,(0,e.chainWithIndex)(function(z,ne){return j(ne,z)}))});var Qn=function(F){return function(j){for(var z=(0,e.tail)(j),ne=[F(j)];(0,e.isNonEmpty)(z);)ne.push(F(z)),z=(0,e.tail)(z);return ne}};e.extend=Qn,e.duplicate=(0,e.extend)(u.identity),e.flatten=(0,e.flatMap)(u.identity);var dn=function(F){return(0,e.mapWithIndex)(function(j,z){return F(z)})};e.map=dn;var zt=function(F){return function(j){for(var z=[F(0,(0,e.head)(j))],ne=1;ner?1:0}},e.Bounded={equals:e.Eq.equals,compare:e.Ord.compare,top:1/0,bottom:-1/0},e.Show={show:function(n){return JSON.stringify(n)}},e.MagmaSub={concat:function(n,r){return n-r}},e.SemigroupSum={concat:function(n,r){return n+r}},e.SemigroupProduct={concat:function(n,r){return n*r}},e.MonoidSum={concat:e.SemigroupSum.concat,empty:0},e.MonoidProduct={concat:e.SemigroupProduct.concat,empty:1},e.Field={add:e.SemigroupSum.concat,zero:0,mul:e.SemigroupProduct.concat,one:1,sub:e.MagmaSub.concat,degree:function(n){return 1},div:function(n,r){return n/r},mod:function(n,r){return n%r}}})(BYe);(function(e){var t=K&&K.__createBinding||(Object.create?function(S,w,T,L){L===void 0&&(L=T);var de=Object.getOwnPropertyDescriptor(w,T);(!de||("get"in de?!w.__esModule:de.writable||de.configurable))&&(de={enumerable:!0,get:function(){return w[T]}}),Object.defineProperty(S,L,de)}:function(S,w,T,L){L===void 0&&(L=T),S[L]=w[T]}),n=K&&K.__setModuleDefault||(Object.create?function(S,w){Object.defineProperty(S,"default",{enumerable:!0,value:w})}:function(S,w){S.default=w}),r=K&&K.__importStar||function(S){if(S&&S.__esModule)return S;var w={};if(S!=null)for(var T in S)T!=="default"&&Object.prototype.hasOwnProperty.call(S,T)&&t(w,S,T);return n(w,S),w},i=K&&K.__spreadArray||function(S,w,T){if(T||arguments.length===2)for(var L=0,de=w.length,ge;L=0;ge--)de[ge]=w(T[ge],de[ge+1]);return de}};e.scanRight=je;var J=function(S){return S.length};e.size=J,e.isOutOfBound=v.isOutOfBound;function ee(S,w){return w===void 0?function(T){return ee(S,T)}:(0,e.isOutOfBound)(S,w)?l.none:l.some(w[S])}var fe=function(S){return(0,e.isNonEmpty)(S)?l.some(v.head(S)):l.none};e.head=fe;var ae=function(S){return(0,e.isNonEmpty)(S)?l.some(v.last(S)):l.none};e.last=ae;var he=function(S){return(0,e.isNonEmpty)(S)?l.some(v.tail(S)):l.none};e.tail=he;var _e=function(S){return(0,e.isNonEmpty)(S)?l.some(v.init(S)):l.none};e.init=_e;var Z=function(S){return function(w){return(0,e.isOutOfBound)(S,w)?w:S===0?e.empty:w.slice(0,S)}};e.takeLeft=Z;var ve=function(S){return function(w){return(0,e.isOutOfBound)(S,w)?w:S===0?e.empty:w.slice(-S)}};e.takeRight=ve;function Ee(S){return function(w){for(var T=[],L=0,de=w;L=w.length?e.empty:w.slice(S,w.length)}};e.dropLeft=oe;var ie=function(S){return function(w){return S<=0||(0,e.isEmpty)(w)?w:S>=w.length?e.empty:w.slice(0,w.length-S)}};e.dropRight=ie;function le(S){return function(w){var T=H(w,S);return T===0?w:T===w.length?e.empty:w.slice(T)}}var me=function(S){return function(w){for(var T=0;T=0;T--)if(S(w[T]))return l.some(w[T]);return l.none}}var Ne=function(S){return function(w){for(var T=w.length-1;T>=0;T--){var L=S(w[T]);if(l.isSome(L))return L}return l.none}};e.findLastMap=Ne;var ct=function(S){return function(w){for(var T=w.length-1;T>=0;T--)if(S(w[T]))return l.some(T);return l.none}};e.findLastIndex=ct;var $t=function(S,w){return function(T){return S<0||S>T.length?l.none:l.some(v.unsafeInsertAt(S,w,T))}};e.insertAt=$t;var yt=function(S,w){return(0,e.modifyAt)(S,function(){return w})};e.updateAt=yt;var Mt=function(S){return function(w){return(0,e.isOutOfBound)(S,w)?l.none:l.some((0,e.unsafeDeleteAt)(S,w))}};e.deleteAt=Mt;var Ut=function(S,w){return function(T){return(0,e.isOutOfBound)(S,T)?l.none:l.some((0,e.unsafeUpdateAt)(S,w(T[S]),T))}};e.modifyAt=Ut;var fn=function(S){return S.length<=1?S:S.slice().reverse()};e.reverse=fn;var sn=function(S){for(var w=[],T=0;T=1&&(0,e.isNonEmpty)(w)?v.splitAt(S)(w):(0,e.isEmpty)(w)?[w,e.empty]:[e.empty,w]}};e.splitAt=q;var G=function(S){var w=v.chunksOf(S);return function(T){return(0,e.isNonEmpty)(T)?w(T):e.empty}};e.chunksOf=G;var xe=function(S){return function(){for(var w=[],T=0;T0;){var de=T.shift();l.isLeft(de)?T.unshift.apply(T,S(de.left)):L.push(de.right)}return L}};e.chainRecDepthFirst=d8,e.ChainRecDepthFirst={URI:e.URI,map:ke,ap:Rt,chain:e.flatMap,chainRec:e._chainRecDepthFirst};var p8=function(S){return function(w){var T=S(w),L=[],de=[];function ge(wy){l.isLeft(wy)?S(wy.left).forEach(function(S8){return L.push(S8)}):de.push(wy.right)}for(var Ot=0,Go=T;Ot0;)ge(L.shift());return de}};e.chainRecBreadthFirst=p8,e.ChainRecBreadthFirst={URI:e.URI,map:ke,ap:Rt,chain:e.flatMap,chainRec:e._chainRecBreadthFirst};var _y=(0,$.witherDefault)(e.Traversable,e.Compactable),Sy=(0,$.wiltDefault)(e.Traversable,e.Compactable);e.Witherable={URI:e.URI,map:ke,compact:e.compact,separate:e.separate,filter:kn,filterMap:Un,partition:qn,partitionMap:er,reduce:j,foldMap:z,reduceRight:ne,traverse:bi,sequence:e.sequence,wither:_y,wilt:Sy},e.filterE=(0,$.filterE)(e.Witherable),e.FromEither={URI:e.URI,fromEither:e.fromEither},e.fromEitherK=(0,c.fromEitherK)(e.FromEither),e.unsafeInsertAt=v.unsafeInsertAt;var h8=function(S,w,T){return(0,e.isNonEmpty)(T)?v.unsafeUpdateAt(S,w,T):T};e.unsafeUpdateAt=h8;var v8=function(S,w){var T=w.slice();return T.splice(S,1),T};e.unsafeDeleteAt=v8;var m8=function(S){return S.slice()};e.toArray=m8;var g8=function(S){return(0,e.isEmpty)(S)?e.empty:S.slice()};e.fromArray=g8,e.empty=v.empty;function y8(S){return function(w){return w.every(S)}}var b8=function(S){return function(w){return w.some(S)}};e.some=b8,e.exists=e.some;var $8=function(S){var w=v.intercalate(S);return function(T){return(0,e.match)(function(){return S.empty},w(T))}};e.intercalate=$8,e.Do=(0,e.of)(l.emptyRecord),e.bindTo=(0,s.bindTo)(e.Functor);var I8=(0,s.let)(e.Functor);e.let=I8,e.bind=(0,o.bind)(e.Chain),e.apS=(0,a.apS)(e.Apply),e.chain=e.flatMap,e.range=v.range,e.cons=v.cons,e.snoc=v.snoc,e.prependToAll=e.prependAll,e.readonlyArray={URI:e.URI,compact:e.compact,separate:e.separate,map:ke,ap:Rt,of:e.of,chain:e.flatMap,filter:kn,filterMap:Un,partition:qn,partitionMap:er,mapWithIndex:Tt,partitionMapWithIndex:tr,partitionWithIndex:Ur,filterMapWithIndex:At,filterWithIndex:xn,alt:F,zero:e.zero,unfold:e.unfold,reduce:j,foldMap:z,reduceRight:ne,traverse:bi,sequence:e.sequence,reduceWithIndex:Ue,foldMapWithIndex:Be,reduceRightWithIndex:ht,traverseWithIndex:P,extend:nr,wither:_y,wilt:Sy}})(LYe);(function(e){var t=K&&K.__createBinding||(Object.create?function(O,C,k,Q){Q===void 0&&(Q=k);var Me=Object.getOwnPropertyDescriptor(C,k);(!Me||("get"in Me?!C.__esModule:Me.writable||Me.configurable))&&(Me={enumerable:!0,get:function(){return C[k]}}),Object.defineProperty(O,Q,Me)}:function(O,C,k,Q){Q===void 0&&(Q=k),O[Q]=C[k]}),n=K&&K.__setModuleDefault||(Object.create?function(O,C){Object.defineProperty(O,"default",{enumerable:!0,value:C})}:function(O,C){O.default=C}),r=K&&K.__importStar||function(O){if(O&&O.__esModule)return O;var C={};if(O!=null)for(var k in O)k!=="default"&&Object.prototype.hasOwnProperty.call(O,k)&&t(C,O,k);return n(C,O),C};Object.defineProperty(e,"__esModule",{value:!0}),e.rotate=e.intersperse=e.prependAll=e.unzip=e.zipWith=e.sort=e.lefts=e.rights=e.reverse=e.modifyAt=e.deleteAt=e.updateAt=e.insertAt=e.copy=e.findLastIndex=e.findLastMap=e.findFirstMap=e.findIndex=e.dropRight=e.dropLeft=e.takeRight=e.takeLeft=e.init=e.tail=e.last=e.head=e.lookup=e.isOutOfBound=e.size=e.scanRight=e.scanLeft=e.chainWithIndex=e.foldRight=e.matchRight=e.matchRightW=e.foldLeft=e.matchLeft=e.matchLeftW=e.match=e.matchW=e.fromEither=e.fromOption=e.replicate=e.makeBy=e.appendW=e.append=e.prependW=e.prepend=e.isNonEmpty=e.isEmpty=void 0,e.getUnionMonoid=e.getUnionSemigroup=e.getOrd=e.getEq=e.getMonoid=e.getSemigroup=e.getShow=e.URI=e.unfold=e.wilt=e.wither=e.traverseWithIndex=e.sequence=e.traverse=e.reduceRightWithIndex=e.reduceRight=e.reduceWithIndex=e.reduce=e.foldMapWithIndex=e.foldMap=e.duplicate=e.extend=e.filterWithIndex=e.alt=e.altW=e.partitionMapWithIndex=e.partitionMap=e.partitionWithIndex=e.partition=e.filter=e.separate=e.compact=e.filterMap=e.filterMapWithIndex=e.mapWithIndex=e.flatten=e.flatMap=e.ap=e.map=e.zero=e.of=e.concat=e.concatW=e.fromOptionK=e.chunksOf=e.splitAt=e.chop=e.sortBy=e.uniq=e.elem=void 0,e.cons=e.empty=e.range=e.chain=e.apS=e.bind=e.let=e.bindTo=e.Do=e.intercalate=e.exists=e.some=e.every=e.unsafeDeleteAt=e.unsafeUpdateAt=e.unsafeInsertAt=e.fromEitherK=e.FromEither=e.filterE=e.ChainRecBreadthFirst=e.chainRecBreadthFirst=e.ChainRecDepthFirst=e.chainRecDepthFirst=e.Witherable=e.TraversableWithIndex=e.Traversable=e.FoldableWithIndex=e.Foldable=e.FilterableWithIndex=e.Filterable=e.Compactable=e.Extend=e.Alternative=e.guard=e.Zero=e.Alt=e.Unfoldable=e.Monad=e.chainFirst=e.Chain=e.Applicative=e.apSecond=e.apFirst=e.Apply=e.FunctorWithIndex=e.Pointed=e.flap=e.Functor=e.getDifferenceMagma=e.getIntersectionSemigroup=void 0,e.array=e.prependToAll=e.snoc=void 0,e.fromPredicate=y,e.takeLeftWhile=fe,e.spanLeft=he,e.dropLeftWhile=ve,e.findFirst=Ee,e.findLast=H,e.zip=$t,e.comprehension=Xn,e.union=dn,e.intersection=zt,e.difference=bn;var i=Lo,a=Kf,o=ec,u=Bn,c=Bo,f=r(bl),s=r(Zse),l=r(LYe),d=Y$,p=ny,v=Yj,h=function(O){return O.length===0};e.isEmpty=h,e.isNonEmpty=s.isNonEmpty,e.prepend=s.prepend,e.prependW=s.prependW,e.append=s.append,e.appendW=s.appendW;var $=function(O,C){return O<=0?[]:s.makeBy(C)(O)};e.makeBy=$;var b=function(O,C){return(0,e.makeBy)(O,function(){return C})};e.replicate=b;function y(O){return function(C){return O(C)?[C]:[]}}var m=function(O){return f.isNone(O)?[]:[O.value]};e.fromOption=m;var g=function(O){return f.isLeft(O)?[]:[O.right]};e.fromEither=g;var _=function(O,C){return function(k){return(0,e.isNonEmpty)(k)?C(k):O()}};e.matchW=_,e.match=e.matchW;var I=function(O,C){return function(k){return(0,e.isNonEmpty)(k)?C(s.head(k),s.tail(k)):O()}};e.matchLeftW=I,e.matchLeft=e.matchLeftW,e.foldLeft=e.matchLeft;var A=function(O,C){return function(k){return(0,e.isNonEmpty)(k)?C(s.init(k),s.last(k)):O()}};e.matchRightW=A,e.matchRight=e.matchRightW,e.foldRight=e.matchRight;var E=function(O){return function(C){for(var k=[],Q=0;Q=0;Ce--)Me[Ce]=C(k[Ce],Me[Ce+1]);return Me}};e.scanRight=U;var te=function(O){return O.length};e.size=te,e.isOutOfBound=s.isOutOfBound,e.lookup=l.lookup,e.head=l.head,e.last=l.last;var Ie=function(O){return(0,e.isNonEmpty)(O)?f.some(s.tail(O)):f.none};e.tail=Ie;var je=function(O){return(0,e.isNonEmpty)(O)?f.some(s.init(O)):f.none};e.init=je;var J=function(O){return function(C){return(0,e.isOutOfBound)(O,C)?(0,e.copy)(C):C.slice(0,O)}};e.takeLeft=J;var ee=function(O){return function(C){return(0,e.isOutOfBound)(O,C)?(0,e.copy)(C):O===0?[]:C.slice(-O)}};e.takeRight=ee;function fe(O){return function(C){for(var k=[],Q=0,Me=C;Q=C.length?[]:C.slice(O,C.length)}};e.dropLeft=_e;var Z=function(O){return function(C){return O<=0||(0,e.isEmpty)(C)?(0,e.copy)(C):O>=C.length?[]:C.slice(0,C.length-O)}};e.dropRight=Z;function ve(O){return function(C){return C.slice(ae(C,O))}}e.findIndex=l.findIndex;function Ee(O){return l.findFirst(O)}e.findFirstMap=l.findFirstMap;function H(O){return l.findLast(O)}e.findLastMap=l.findLastMap,e.findLastIndex=l.findLastIndex;var re=function(O){return O.slice()};e.copy=re;var oe=function(O,C){return function(k){return O<0||O>k.length?f.none:f.some((0,e.unsafeInsertAt)(O,C,k))}};e.insertAt=oe;var ie=function(O,C){return(0,e.modifyAt)(O,function(){return C})};e.updateAt=ie;var le=function(O){return function(C){return(0,e.isOutOfBound)(O,C)?f.none:f.some((0,e.unsafeDeleteAt)(O,C))}};e.deleteAt=le;var me=function(O,C){return function(k){return(0,e.isOutOfBound)(O,k)?f.none:f.some((0,e.unsafeUpdateAt)(O,C(k[O]),k))}};e.modifyAt=me;var ye=function(O){return(0,e.isEmpty)(O)?[]:O.slice().reverse()};e.reverse=ye;var We=function(O){for(var C=[],k=0;k=1&&(0,e.isNonEmpty)(C)?s.splitAt(O)(C):(0,e.isEmpty)(C)?[(0,e.copy)(C),[]]:[[],(0,e.copy)(C)]}};e.splitAt=ln;var yn=function(O){var C=s.chunksOf(O);return function(k){return(0,e.isNonEmpty)(k)?C(k):[]}};e.chunksOf=yn;var Zn=function(O){return function(){for(var C=[],k=0;k");var n=UU.array(e);return new UU.Type(t,function(r){return n.is(r)&&LFn.isNonEmpty(r)},function(r,i){return BFn.pipe(n.validate(r,i),VFn.chain(function(a){var o=GIe.fromArray(a);return zFn.isNone(o)?UU.failure(r,i):UU.success(o.value)}))},GIe.map(e.encode))}Fz.nonEmptyArray=KFn;Object.defineProperty(Pz,"__esModule",{value:!0});Pz.readonlyNonEmptyArray=void 0;var GFn=Fz;function HFn(e,t){return t===void 0&&(t="ReadonlyNonEmptyArray<"+e.name+">"),GFn.nonEmptyArray(e,t)}Pz.readonlyNonEmptyArray=HFn;var Wz={},JFn=K&&K.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),YFn=K&&K.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),ZFn=K&&K.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.hasOwnProperty.call(e,n)&&JFn(t,e,n);return YFn(t,e),t};Object.defineProperty(Wz,"__esModule",{value:!0});Wz.UUID=void 0;var HIe=ZFn(lo),XFn=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;Wz.UUID=HIe.brand(HIe.string,function(e){return XFn.test(e)},"UUID");var JIe;function VYe(){return JIe||(JIe=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ioTsPrimitiveInterpreter=e.BigIntString=void 0;var t=it,n=CN,r=Bn,i=lo,a=Oz,o=Tz,u=Gj,c=Cz,f=Pz,s=Wz,l=hp(),d=Ta;e.BigIntString=new i.Type("BigIntString",function(v){return v!=null&&typeof v=="bigint"},function(v,h){return n.either.chain(i.string.validate(v,h),function($){try{var b=BigInt($);return i.success(b)}catch{return i.failure(v,h)}})},function(v){return v.toString(10)});var p=function(v){return new i.Type(v,function(h){return h===v},function(h,$){return i.success(v)},function(h){})};e.ioTsPrimitiveInterpreter=t.memo(function(){return{_F:d.IoTsURI,date:function(v){return function(h){return new d.IOTSType(l.iotsApplyConfig(v)(a.DateFromISOString,h,{}))}},boolean:function(v){return function(h){return new d.IOTSType(l.iotsApplyConfig(v)(i.boolean,h,{}))}},string:function(v){return function(h){return new d.IOTSType(l.iotsApplyConfig(v)(i.string,h,{}))}},number:function(v){return function(h){return new d.IOTSType(l.iotsApplyConfig(v)(i.number,h,{}))}},bigint:function(v){return function(h){return new d.IOTSType(l.iotsApplyConfig(v)(e.BigIntString,h,{}))}},stringLiteral:function(v,h){return function($){return new d.IOTSType(l.iotsApplyConfig(h)(i.literal(v,v),$,{}))}},numberLiteral:function(v,h){return function($){return new d.IOTSType(l.iotsApplyConfig(h)(i.literal(v,""+v),$,{}))}},oneOfLiterals:function(v,h){return function($){return new d.IOTSType(l.iotsApplyConfig(h)(i.union(v.map(function(b){return i.literal(b)})),$,{}))}},tag:function(v,h){return function($){return new d.IOTSType(l.iotsApplyConfig(h)(p(v),$,{}))}},keysOf:function(v,h){return function($){return new d.IOTSType(l.iotsApplyConfig(h)(i.keyof(v),$,{}))}},nullable:function(v,h){return function($){return r.pipe(v($).type,function(b){return new d.IOTSType(l.iotsApplyConfig(h)(c.optionFromNullable(b),$,{type:b}))})}},optional:function(v,h){return function($){return r.pipe(v($).type,function(b){return new d.IOTSType(l.iotsApplyConfig(h)(i.union([b,i.undefined]),$,{type:b}))})}},mutable:function(v,h){return function($){return r.pipe(v($).type,function(b){return new d.IOTSType(l.iotsApplyConfig(h)(b,$,{type:b}))})}},array:function(v,h){return function($){return r.pipe(v($).type,function(b){return new d.IOTSType(l.iotsApplyConfig(h)(i.readonlyArray(b),$,{type:b}))})}},nonEmptyArray:function(v,h){return function($){return r.pipe(v($).type,function(b){return new d.IOTSType(l.iotsApplyConfig(h)(f.readonlyNonEmptyArray(b),$,{type:b}))})}},uuid:function(v){return function(h){return new d.IOTSType(l.iotsApplyConfig(v)(s.UUID,h,{}))}},either:function(v,h,$){return function(b){return function(y,m){return new d.IOTSType(l.iotsApplyConfig($)(o.either(y,m),b,{left:y,right:m}))}(v(b).type,h(b).type)}},option:function(v,h){return function($){return r.pipe(v($).type,function(b){return new d.IOTSType(l.iotsApplyConfig(h)(u.option(b),$,{type:b}))})}},unknownE:function(v,h){return function($){return new d.IOTSType(l.iotsApplyConfig(h)(v($).type,$,{}))}}}})}(t9)),t9}var Uy={},YIe;function zYe(){if(YIe)return Uy;YIe=1,Object.defineProperty(Uy,"__esModule",{value:!0}),Uy.ioTsStrictObjectInterpreter=Uy.ioTsNonStrictObjectInterpreter=void 0;var e=it,t=lo,n=hp(),r=Ta;return Uy.ioTsNonStrictObjectInterpreter=e.memo(function(){return{_F:r.IoTsURI,interface:function(i,a,o){return function(u){var c=e.projectFieldWithEnv(i,u)("type");return new r.IOTSType(n.iotsApplyConfig(o)(t.type(c,a),u,{types:c}))}},partial:function(i,a,o){return function(u){var c=e.projectFieldWithEnv(i,u)("type");return new r.IOTSType(n.iotsApplyConfig(o)(t.partial(c,a),u,{types:c}))}},both:function(i,a,o,u){return function(c){var f=e.projectFieldWithEnv(i,c)("type"),s=e.projectFieldWithEnv(a,c)("type");return new r.IOTSType(n.iotsApplyConfig(u)(t.intersection([t.interface(f),t.partial(s)],o),c,{types:f,partialTypes:s}))}}}}),Uy.ioTsStrictObjectInterpreter=e.memo(function(){return{_F:r.IoTsURI,interface:function(i,a,o){return function(u){var c=e.projectFieldWithEnv(i,u)("type");return new r.IOTSType(n.iotsApplyConfig(o)(t.strict(c,a),u,{types:c}))}},partial:function(i,a,o){return function(u){var c=e.projectFieldWithEnv(i,u)("type");return new r.IOTSType(n.iotsApplyConfig(o)(t.exact(t.partial(c,a)),u,{types:c}))}},both:function(i,a,o,u){return function(c){var f=e.projectFieldWithEnv(i,c)("type"),s=e.projectFieldWithEnv(a,c)("type");return new r.IOTSType(n.iotsApplyConfig(u)(t.exact(t.intersection([t.interface(f),t.partial(s)],o)),c,{types:f,typesPartial:s}))}}}}),Uy}var Zj={};Object.defineProperty(Zj,"__esModule",{value:!0});Zj.ioTsUnionInterpreter=void 0;var QFn=it,eWn=lo,ZIe=Ta;Zj.ioTsUnionInterpreter=QFn.memo(function(){return{_F:ZIe.IoTsURI,union:function(e){return function(t,n){return function(r){return new ZIe.IOTSType(eWn.union(e.map(function(i){return i(r).type}),n))}}}}});var jO={},XIe;function KYe(){if(XIe)return jO;XIe=1,Object.defineProperty(jO,"__esModule",{value:!0}),jO.ioTsTaggedUnionInterpreter=void 0;var e=it,t=lo,n=hp(),r=Ta,i=function(a){return a};return jO.ioTsTaggedUnionInterpreter=e.memo(function(){return{_F:r.IoTsURI,taggedUnion:function(a,o,u,c){return function(f){return new r.IOTSType(n.iotsApplyConfig(c)(t.union(i(e.collect(o,function(s,l){return l(f).type})),u),f,{}))}}}}),jO}var kO={},QIe;function GYe(){if(QIe)return kO;QIe=1,Object.defineProperty(kO,"__esModule",{value:!0}),kO.ioTsStrMapInterpreter=void 0;var e=it,t=bu,n=lo,r=hp(),i=Ta;return kO.ioTsStrMapInterpreter=e.memo(function(){return{_F:i.IoTsURI,strMap:function(a,o){return function(u){return t.pipe(a(u).type,function(c){return new i.IOTSType(r.iotsApplyConfig(o)(n.record(n.string,c),u,{type:c}))})}},record:function(a,o,u){return function(c){return function(f,s){return new i.IOTSType(r.iotsApplyConfig(u)(n.record(f,s),c,{domainType:f,codomainType:s}))}(a(c).type,o(c).type)}}}}),kO}var UO={},Nz={},jz={},HYe={},JYe={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.fromArray=e.getDifferenceMagma=e.getIntersectionSemigroup=e.getUnionMonoid=e.getUnionSemigroup=e.URI=e.toReadonlyArray=e.some=e.size=e.isEmpty=e.empty=e.compact=e.toggle=e.remove=e.reduceRight=e.fromReadonlyArray=e.singleton=e.fromSet=void 0,e.toSet=c,e.map=f,e.chain=s,e.filter=l,e.partition=d,e.union=p,e.intersection=v,e.partitionMap=h,e.difference=$,e.reduce=b,e.foldMap=y,e.insert=g,e.separate=E,e.filterMap=N,e.every=je,e.isSubset=J,e.elem=ee,e.getShow=ae,e.getEq=he;var t=Jj,n=Bn,r=Jse,i=Y$,a=function(H){return new Set(H)};e.fromSet=a;var o=function(H){return new Set([H])};e.singleton=o;var u=function(H){return function(re){for(var oe=re.length,ie=new Set,le=ee(H),me=0;me");var r=qU.array(e),i=r9.toArray(t),a=r9.fromArray(t);return new qU.Type(n,function(o){return o instanceof Set&&r9.every(e.is)(o)},function(o,u){return iWn.pipe(r.validate(o,u),aWn.chain(function(c){var f=a(c);return f.size!==c.length?qU.failure(o,u):qU.success(f)}))},function(o){return r.encode(i(o))})}jz.setFromArray=oWn;Object.defineProperty(Nz,"__esModule",{value:!0});Nz.readonlySetFromArray=void 0;var uWn=jz;function cWn(e,t,n){return n===void 0&&(n="ReadonlySet<"+e.name+">"),uWn.setFromArray(e,t,n)}Nz.readonlySetFromArray=cWn;var e_e;function YYe(){if(e_e)return UO;e_e=1,Object.defineProperty(UO,"__esModule",{value:!0}),UO.ioTsSetInterpreter=void 0;var e=it,t=bu,n=Nz,r=Ta,i=hp();return UO.ioTsSetInterpreter=e.memo(function(){return{_F:r.IoTsURI,set:function(a,o,u){return function(c){return t.pipe(a(c).type,function(f){return new r.IOTSType(i.iotsApplyConfig(u)(n.readonlySetFromArray(f,o),c,{type:f}))})}}}}),UO}var qO={},t_e;function ZYe(){if(t_e)return qO;t_e=1,Object.defineProperty(qO,"__esModule",{value:!0}),qO.ioTsRecursiveInterpreter=void 0;var e=it,t=lo,n=Ta,r=hp();return qO.ioTsRecursiveInterpreter=e.memo(function(){return{_F:n.IoTsURI,recursive:function(i,a,o){return function(u){return new n.IOTSType(r.iotsApplyConfig(o)(t.recursion("recursive",function(c){return i(function(f){return new n.IOTSType(c)})(u).type}),u,{}))}}}}),qO}var xO={},n_e;function XYe(){if(n_e)return xO;n_e=1,Object.defineProperty(xO,"__esModule",{value:!0}),xO.ioTsUnknownInterpreter=void 0;var e=it,t=bu,n=lo,r=hp(),i=Ta;return xO.ioTsUnknownInterpreter=e.memo(function(){return{_F:i.IoTsURI,unknown:function(a){return function(o){return t.pipe(n.unknown,function(u){return new i.IOTSType(r.iotsApplyConfig(a)(u,o,{type:u}))})}}}}),xO}var DO={};function QYe(e){return function(t){return function(n){return n.reduce(function(r,i){return e.alt(r,function(){return i})},t)}}}const fWn=Object.freeze(Object.defineProperty({__proto__:null,altAll:QYe},Symbol.toStringTag,{value:"Module"}));function sWn(e){return QYe(e)(e.zero())}function lWn(e){var t=ia(e);return function(n){var r=t(n);return{concat:function(i,a){return e.alt(r.concat(i,a),function(){return e.alt(i,function(){return a})})},empty:e.zero()}}}const dWn=Object.freeze(Object.defineProperty({__proto__:null,altAll:sWn,getAlternativeMonoid:lWn},Symbol.toStringTag,{value:"Module"})),pWn=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var eZe=function(e){return{meet:function(t,n){return e.join(t,n)},join:function(t,n){return e.meet(t,n)},zero:e.one,one:e.zero,implies:function(t,n){return e.join(e.not(t),n)},not:e.not}},hWn={meet:function(){},join:function(){},zero:void 0,one:void 0,implies:function(){},not:function(){}},vWn=eZe,mWn={meet:function(e,t){return e&&t},join:function(e,t){return e||t},zero:!1,one:!0,implies:function(e,t){return!e||t},not:function(e){return!e}},gWn=P4e;const yWn=Object.freeze(Object.defineProperty({__proto__:null,booleanAlgebraBoolean:mWn,booleanAlgebraVoid:hWn,getDualBooleanAlgebra:vWn,getFunctionBooleanAlgebra:gWn,reverse:eZe},Symbol.toStringTag,{value:"Module"}));var bWn=function(e){return D6e(e)(e.bottom,e.top)},$Wn=function(e){var t=qm(e);return{equals:t.equals,compare:t.compare,top:e.bottom,bottom:e.top}},IWn={equals:fq.equals,compare:fq.compare,top:1/0,bottom:-1/0};const _Wn=Object.freeze(Object.defineProperty({__proto__:null,boundedNumber:IWn,clamp:bWn,reverse:$Wn},Symbol.toStringTag,{value:"Module"}));function tZe(e){return{meet:k6(e),join:U6(e)}}const SWn=Object.freeze(Object.defineProperty({__proto__:null,getMinMaxDistributiveLattice:tZe},Symbol.toStringTag,{value:"Module"}));function wWn(e){var t=tZe(e);return function(n,r){return{join:t.join,meet:t.meet,zero:n,one:r}}}const AWn=Object.freeze(Object.defineProperty({__proto__:null,getMinMaxBoundedDistributiveLattice:wWn},Symbol.toStringTag,{value:"Module"})),MWn=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),RWn=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),OWn=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),EWn=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function Qse(e,t){return function(n,r){return t.compose(e.right(r),e.left(n))}}function nZe(e,t){var n=Qse(e,t);return function(r,i){return t.compose(e.promap(t.id(),function(a){return a._tag==="Left"?a.left:a.right},Oe),n(r,i))}}function TWn(e){return Qse(e,e)}function CWn(e){return nZe(e,e)}const PWn=Object.freeze(Object.defineProperty({__proto__:null,fanIn:nZe,fanin:CWn,split:Qse,splitChoice:TWn},Symbol.toStringTag,{value:"Module"})),FWn=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var WWn=function(e){return function(){return console.log(e)}},NWn=function(e){return function(){return console.warn(e)}},jWn=function(e){return function(){return console.error(e)}},kWn=function(e){return function(){return console.info(e)}};const UWn=Object.freeze(Object.defineProperty({__proto__:null,error:jWn,info:kWn,log:WWn,warn:NWn},Symbol.toStringTag,{value:"Module"}));var Z$=M6;function qWn(e){return{show:function(t){return"make(".concat(e.show(t),")")}}}var xWn=Oe,DWn=Oe,LWn=Oe,BWn=Oe,VWn=Oe,zWn=Oe,KWn=Oe,GWn=Oe,HWn=Oe;function rZe(e){return{URI:X$,_E:void 0,map:tle,ap:function(t,n){return Z$(e.concat(t,n))}}}function ele(e){var t=rZe(e);return{URI:X$,_E:void 0,map:t.map,ap:t.ap,of:function(){return Z$(e.empty)}}}var iZe=function(e,t){return M(e,uZe())},tle=function(e,t){return M(e,cZe())},aZe=function(e,t,n){return M(e,fZe(t))},oZe=function(e,t){return M(e,sZe(t))},uZe=function(){return M6},cZe=function(){return M6},fZe=function(e){return function(t){return Z$(e(t))}},sZe=function(e){return function(t){return Z$(e(t))}},X$="Const",lZe={URI:X$,map:tle},JWn=tn(lZe),YWn={URI:X$,contramap:iZe},ZWn={URI:X$,bimap:aZe,mapLeft:oZe},XWn={URI:X$,map:tle,contramap:iZe,bimap:aZe,mapLeft:oZe};const QWn=Object.freeze(Object.defineProperty({__proto__:null,Bifunctor:ZWn,Contravariant:YWn,Functor:lZe,URI:X$,bimap:fZe,const_:XWn,contramap:uZe,flap:JWn,getApplicative:ele,getApply:rZe,getBooleanAlgebra:HWn,getBounded:LWn,getEq:xWn,getHeytingAlgebra:GWn,getMonoid:VWn,getOrd:DWn,getRing:KWn,getSemigroup:BWn,getSemiring:zWn,getShow:qWn,make:Z$,map:cZe,mapLeft:sZe},Symbol.toStringTag,{value:"Module"})),eNn=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var tNn={equals:function(e,t){return e.valueOf()===t.valueOf()}},nNn={equals:function(e,t){return e.getDate()===t.getDate()}},rNn={equals:function(e,t){return e.getMonth()===t.getMonth()}},iNn={equals:function(e,t){return e.getFullYear()===t.getFullYear()}},aNn=M(h$,Ic(function(e){return e.valueOf()})),oNn=function(){return new Date},uNn=function(){return new Date().getTime()};const cNn=Object.freeze(Object.defineProperty({__proto__:null,Eq:tNn,Ord:aNn,create:oNn,eqDate:nNn,eqMonth:rNn,eqYear:iNn,now:uNn},Symbol.toStringTag,{value:"Module"})),fNn=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function dZe(e,t){var n=t.zero,r=function(i,a){return e.equals(a,n)?i:r(a,t.mod(i,a))};return r}function sNn(e,t){var n=t.zero,r=dZe(e,t);return function(i,a){return e.equals(i,n)||e.equals(a,n)?n:t.div(t.mul(i,a),r(i,a))}}var lNn={add:function(e,t){return e+t},zero:0,mul:function(e,t){return e*t},one:1,sub:function(e,t){return e-t},degree:function(e){return 1},div:function(e,t){return e/t},mod:function(e,t){return e%t}};const dNn=Object.freeze(Object.defineProperty({__proto__:null,fieldNumber:lNn,gcd:dZe,lcm:sNn},Symbol.toStringTag,{value:"Module"})),pNn=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function pZe(e,t){return function(n,r){return function(i){return e.reduce(i,n,function(a,o){return t.reduce(o,a,r)})}}}function hZe(e,t){return function(n){var r=e.foldMap(n),i=t.foldMap(n);return function(a){return function(o){return r(o,function(u){return i(u,a)})}}}}function vZe(e,t){return function(n,r){return function(i){return e.reduceRight(i,n,function(a,o){return t.reduceRight(a,o,r)})}}}function hNn(e,t){return function(n,r){return function(i){return t.reduce(i,e.of(n),function(a,o){return e.chain(a,function(u){return r(u,o)})})}}}function vNn(e,t){return function(n,r){var i=function(a,o){var u=a.init,c=a.acc;return u?{init:!1,acc:o}:{init:!1,acc:e.concat(e.concat(c,n),o)}};return t.reduce(r,{init:!0,acc:e.empty},i).acc}}function mZe(e){return function(t){return e.reduce(t,[],function(n,r){return n.push(r),n})}}function mNn(e,t){var n=function(i,a){return e.ap(e.map(i,jo),a)},r=e.of(void 0);return function(i,a){return t.reduce(i,r,function(o,u){return n(o,a(u))})}}function gNn(e,t){return function(n,r,i){return t.reduce(n,e.of(r),function(a,o){return e.chain(a,function(u){return i(u,o)})})}}var yNn=mZe;function nle(e,t){var n=pZe(e,t),r=hZe(e,t),i=vZe(e,t);return{reduce:function(a,o,u){return M(a,n(o,u))},foldMap:function(a){var o=r(a);return function(u,c){return M(u,o(c))}},reduceRight:function(a,o,u){return M(a,i(o,u))}}}const bNn=Object.freeze(Object.defineProperty({__proto__:null,foldM:gNn,foldMap:hZe,getFoldableComposition:nle,intercalate:vNn,reduce:pZe,reduceM:hNn,reduceRight:vZe,toArray:yNn,toReadonlyArray:mZe,traverse_:mNn},Symbol.toStringTag,{value:"Module"}));function gZe(e,t){return function(n,r){return function(i){return e.reduceWithIndex(i,n,function(a,o,u){return t.reduceWithIndex(u,o,function(c,f,s){return r([a,c],f,s)})})}}}function yZe(e,t){return function(n){var r=e.foldMapWithIndex(n),i=t.foldMapWithIndex(n);return function(a){return function(o){return r(o,function(u,c){return i(c,function(f,s){return a([u,f],s)})})}}}}function bZe(e,t){return function(n,r){return function(i){return e.reduceRightWithIndex(i,n,function(a,o,u){return t.reduceRightWithIndex(o,u,function(c,f,s){return r([a,c],f,s)})})}}}function $Nn(e,t){var n=nle(e,t),r=gZe(e,t),i=yZe(e,t),a=bZe(e,t);return{reduce:n.reduce,foldMap:n.foldMap,reduceRight:n.reduceRight,reduceWithIndex:function(o,u,c){return M(o,r(u,c))},foldMapWithIndex:function(o){var u=i(o);return function(c,f){return M(c,u(f))}},reduceRightWithIndex:function(o,u,c){return M(o,a(u,c))}}}const INn=Object.freeze(Object.defineProperty({__proto__:null,foldMapWithIndex:yZe,getFoldableWithIndexComposition:$Nn,reduceRightWithIndex:bZe,reduceWithIndex:gZe},Symbol.toStringTag,{value:"Module"}));var $Ze=function(){return Oe},_Nn=Oe,WM=function(e){return function(t){return function(n){return t(e(n))}}},NM=function(e){return function(t){return e(t)(t)}},SNn=NM,Mv=function(e,t){return M(e,Rv(t))},Xj=function(e,t){return M(e,SZe(t))},IZe=function(e,t){return M(e,AZe(t))},kz=function(e,t,n){return M(e,MZe(t,n))},Rv=function(e){return function(t){return function(n){return e(t(n))}}},_Ze=function(e){return function(t){return function(n){return t(n)(e(n))}}},SZe=_Ze,$l=jo,Q$=Fe(2,function(e,t){return function(n){return t(e(n))(n)}}),wZe=Q$(Oe),wNn=wZe,AZe=function(e){return function(t){return Se(e,t)}},MZe=function(e,t){return function(n){return function(r){return t(n(e(r)))}}},rle=function(){return Oe},ile=function(e){return function(t){var n=t[0],r=t[1];return[e(n),r]}},ale=function(e){return function(t){var n=t[0],r=t[1];return[n,e(r)]}},ole=function(e){return fae(function(t){return ws(e(t))},Gt)},ule=function(e){return fae(Jt,function(t){return qd(e(t))})},Gf="Reader",ga={URI:Gf,map:Mv},ANn=tn(ga),cle={URI:Gf,of:$l},Ov={URI:Gf,map:Mv,ap:Xj},RZe=Yr(Ov),MNn=RZe,OZe=Zr(Ov),RNn=OZe,EZe={URI:Gf,map:Mv,ap:Xj,of:$l},fle={URI:Gf,map:Mv,ap:Xj,chain:Q$},Ev={URI:Gf,map:Mv,of:$l,ap:Xj,chain:Q$},sle=Fe(2,hi(fle)),ONn={URI:Gf,map:Mv,promap:kz},ENn={URI:Gf,compose:IZe,id:rle},TNn={URI:Gf,map:Mv,promap:kz,first:ile,second:ale},CNn={URI:Gf,map:Mv,promap:kz,left:ole,right:ule},PNn=pi(ga),FNn=Ti(ga),TZe=vi(fle),WNn=TZe,NNn=$l(ra),CZe=di(Ov),jNn=CZe,PZe=$l(Na),ry=function(e){return function(t){return function(n){for(var r=[e(0,Dc(t))(n)],i=1;i=1?1:0},$2n=eQe,I2n=jle,_2n=tQe,S2n=nQe;const w2n=Object.freeze(Object.defineProperty({__proto__:null,Eq:tQe,Monoid:nQe,Semigroup:jle,eqOrdering:_2n,invert:$2n,match:y2n,matchW:QXe,monoidOrdering:S2n,reverse:eQe,semigroupOrdering:I2n,sign:b2n},Symbol.toStringTag,{value:"Module"})),A2n=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),M2n=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var Hz=function(){return Math.random()};function rQe(e,t){return M(Hz,ap(function(n){return Math.floor((t-e+1)*n+e)}))}function R2n(e,t){return M(Hz,ap(function(n){return(t-e)*n+e}))}var O2n=M(Hz,ap(function(e){return e<.5})),E2n=function(e){return M(rQe(0,e.length-1),ap(function(t){return e[t]}))};const T2n=Object.freeze(Object.defineProperty({__proto__:null,random:Hz,randomBool:O2n,randomElem:E2n,randomInt:rQe,randomRange:R2n},Symbol.toStringTag,{value:"Module"}));var kle=BA(cle),iQe=$$(cle),aQe=VA(ga),C2n=zA(ga),oQe=$l,uQe=aQe,cQe=VW(ga),P2n=cQe,Ule=XA(Ev),F2n=Ule,fQe=Ule,W2n=fQe,sQe=QA(Ev),N2n=sQe,j2n=KW(ga),k2n=WM,lQe=NM,U2n=lQe,dQe=I$(Ev),q2n=dQe,qle=Fe(2,eM(Ev)),pQe=zW(Ev),x2n=pQe,D2n=tM(ga),Yf=function(e,t){return M(e,vQe(t))},LM=function(e,t){return M(e,xle(t))},hQe=function(e,t){return M(e,Dle(t))},vQe=KA(ga),ck=Fe(3,YA(ga)),L2n=ck,fk=Fe(2,ZA(ga)),B2n=fk,xle=GA(Ov),V2n=xle,up=iQe,cp=Fe(2,HA(Ev)),mQe=cp(Oe),z2n=mQe,Dle=JA(Ev),K2n=Dle,Lle=kle,ka="ReaderEither",gQe=function(e){var t=s$(e);return{URI:ka,_E:void 0,compact:Hd(ga,t),separate:sv(ga,t,cl)}};function G2n(e){var t=mA(e),n=gQe(e),r=lv(ga,t),i=dv(ga,t),a=zg(ga,t),o=Kg(ga,t);return{URI:ka,_E:void 0,map:Yf,compact:n.compact,separate:n.separate,filter:function(u,c){return M(u,r(c))},filterMap:function(u,c){return M(u,i(c))},partition:function(u,c){return M(u,a(c))},partitionMap:function(u,c){return M(u,o(c))}}}function yQe(e){var t=tv(Ov,jg(e));return{URI:ka,_E:void 0,map:Yf,ap:function(n,r){return M(n,t(r))},of:up}}function bQe(e){var t=BW(Ev,e);return{URI:ka,_E:void 0,map:Yf,alt:function(n,r){return M(n,t(r))}}}var BM={URI:ka,map:Yf},H2n=Fe(2,hu(BM)),J2n=Zu(BM),Y2n=tn(BM),Z2n={URI:ka,of:up},sk={URI:ka,map:Yf,ap:LM},$Qe=Yr(sk),X2n=$Qe,IQe=Zr(sk),Q2n=IQe,_Qe={URI:ka,map:Yf,ap:LM,of:up},i1={URI:ka,map:Yf,ap:LM,chain:cp},eqn={URI:ka,map:Yf,ap:LM,of:up,chain:cp},Nv={URI:ka,fromEither:oQe},VM={URI:ka,fromReader:uQe},Ble=Fe(2,hi(i1)),Vle=Fe(2,Ld(Nv,i1)),zle=Fe(2,t1(VM,i1)),tqn={URI:ka,bimap:ck,mapLeft:fk},nqn={URI:ka,map:Yf,alt:hQe},rqn=jM(VM),iqn=kM(VM),aqn=e1(VM),oqn=zle,uqn=zle,cqn={URI:ka,map:Yf,ap:LM,of:up,chain:cp,throwError:Lle},fqn=xd(Nv),sqn=Dd(Nv),SQe=u$(Nv,i1),lqn=SQe,lk={fromEither:Nv.fromEither},dqn={fromReader:VM.fromReader},pqn=fA(lk),hqn=sA(lk),Jz={flatMap:cp},vqn=aW(lk,Jz),mqn=lA(lk,Jz),Kle=dA(lk,Jz),Gle=uW(dqn,Jz),gqn=Kle,yqn=Kle,bqn=Vle,$qn=Vle,Iqn=Gle,_qn=Gle,Sqn=nv(Nv),wQe=c$(Nv,i1),wqn=wQe,Aqn=Lc(Nv),Mqn=up(ra),Rqn=pi(BM),Oqn=Ti(BM),AQe=vi(i1),Eqn=AQe,MQe=di(sk),Tqn=MQe,RQe=up(Na),OQe=function(e){return Se(ry(e),Rv(gW(pu)))},Hle=function(e){var t=OQe(e);return function(n){return Rr(n)?t(n):RQe}},Cqn=Hle,EQe=function(e){return Hle(function(t,n){return e(n)})},Pqn=EQe(Oe),Fqn=cp,Wqn=cp,Nqn=Ble,jqn=Ble,kqn=qle,Uqn=qle,qqn={URI:ka,bimap:ck,mapLeft:fk,map:Yf,of:up,ap:LM,chain:cp,alt:hQe,throwError:kle},xqn=ia(sk),Dqn=kf(_Qe),Lqn=function(e){return ia(Ov)(hW(e))};function Bqn(e){var t=yQe(e),n=bQe(e);return{URI:ka,_E:void 0,map:Yf,ap:t.ap,of:up,chain:cp,bimap:ck,mapLeft:fk,alt:n.alt,throwError:Lle}}const Vqn=Object.freeze(Object.defineProperty({__proto__:null,Alt:nqn,ApT:RQe,Applicative:_Qe,Apply:sk,Bifunctor:tqn,Chain:i1,Do:Mqn,FromEither:Nv,FromReader:VM,Functor:BM,Monad:eqn,MonadThrow:cqn,Pointed:Z2n,URI:ka,alt:Dle,altW:K2n,ap:xle,apFirst:$Qe,apFirstW:X2n,apS:MQe,apSW:Tqn,apSecond:IQe,apSecondW:Q2n,apW:V2n,as:H2n,asUnit:J2n,ask:rqn,asks:iqn,asksReaderEither:U2n,asksReaderEitherW:lQe,bimap:L2n,bind:AQe,bindTo:Rqn,bindW:Eqn,chain:Fqn,chainEitherK:gqn,chainEitherKW:yqn,chainFirst:Nqn,chainFirstEitherK:bqn,chainFirstEitherKW:$qn,chainFirstReaderK:oqn,chainFirstReaderKW:uqn,chainFirstW:jqn,chainOptionK:SQe,chainOptionKW:lqn,chainReaderK:Iqn,chainReaderKW:_qn,chainW:Wqn,filterOrElse:wQe,filterOrElseW:wqn,flap:Y2n,flatMap:cp,flatMapEither:Kle,flatMapNullable:vqn,flatMapOption:mqn,flatMapReader:Gle,flatten:z2n,flattenW:mQe,fold:F2n,foldW:W2n,fromEither:oQe,fromEitherK:Aqn,fromOption:fqn,fromOptionK:sqn,fromPredicate:Sqn,fromReader:uQe,fromReaderK:aqn,getAltReaderValidation:bQe,getApplicativeReaderValidation:yQe,getApplyMonoid:Dqn,getApplySemigroup:xqn,getCompactable:gQe,getFilterable:G2n,getOrElse:sQe,getOrElseW:N2n,getReaderValidation:Bqn,getSemigroup:Lqn,left:kle,leftReader:C2n,let:Oqn,liftNullable:pqn,liftOption:hqn,local:k2n,map:vQe,mapBoth:ck,mapError:fk,mapLeft:B2n,match:cQe,matchE:Ule,matchEW:fQe,matchW:P2n,of:up,orElse:dQe,orElseFirst:kqn,orElseFirstW:Uqn,orElseW:q2n,orLeft:pQe,orLeftW:x2n,readerEither:qqn,right:iQe,rightReader:aQe,sequenceArray:Pqn,swap:D2n,tap:Ble,tapEither:Vle,tapError:qle,tapReader:zle,throwError:Lle,toUnion:j2n,traverseArray:EQe,traverseArrayWithIndex:Cqn,traverseReadonlyArrayWithIndex:Hle,traverseReadonlyNonEmptyArrayWithIndex:OQe},Symbol.toStringTag,{value:"Module"}));function Yz(e){return function(t){return function(){return e.of(t)}}}function Zz(e){return function(t){return function(n){return function(r){return e.map(n(r),t)}}}}function Xz(e){return function(t){return function(n){return function(r){return e.ap(n(r),t(r))}}}}function TQe(e){var t=Qz(e);return function(n){return function(r){return t(r,n)}}}function Qz(e){return function(t,n){return function(r){return e.chain(t(r),function(i){return n(i)(r)})}}}function eK(e){return function(t){return Se(t,e.of)}}function zqn(e){return function(t){return Se(t,e)}}function Kqn(e){var t=Xz(e),n=Zz(e),r=TQe(e);return{map:function(i,a){return M(i,n(a))},ap:function(i,a){return M(i,t(a))},of:Yz(e),chain:function(i,a){return M(i,r(a))},ask:function(){return e.of},asks:function(i){return Se(i,e.of)},local:function(i,a){return function(o){return i(a(o))}},fromReader:eK(e),fromM:function(i){return function(){return i}}}}const Gqn=Object.freeze(Object.defineProperty({__proto__:null,ap:Xz,chain:TQe,flatMap:Qz,fromNaturalTransformation:zqn,fromReader:eK,getReaderM:Kqn,map:Zz,of:Yz},Symbol.toStringTag,{value:"Module"}));var Jle=eK(Hf),Yle=$l,Hqn=WM,CQe=NM,Jqn=CQe,zM=function(e,t){return M(e,PQe(t))},dk=function(e,t){return M(e,Zle(t))},PQe=Zz(Pn),Zle=Xz(op),Yqn=Zle,a1=Yz(Hf),uy=Fe(2,Qz(tc)),FQe=uy(Oe),Zqn=FQe,fp="ReaderIO",pk={URI:fp,map:zM},Xqn=Fe(2,hu(pk)),Qqn=Zu(pk),exn=tn(pk),txn={URI:fp,of:a1},tK={URI:fp,map:zM,ap:dk},nxn=Yr(tK),rxn=Zr(tK),ixn={URI:fp,map:zM,ap:dk,of:a1},hk={URI:fp,map:zM,ap:dk,chain:uy},axn={URI:fp,map:zM,of:a1,ap:dk,chain:uy},oxn={URI:fp,map:zM,of:a1,ap:dk,chain:uy,fromIO:Yle},nK={URI:fp,fromIO:Yle},vk={URI:fp,fromReader:Jle},WQe={flatMap:uy},uxn={fromIO:nK.fromIO},cxn={fromReader:Jle},NQe=ev(uxn,WQe),Xle=uW(cxn,WQe),Qle=Fe(2,hi(hk)),jQe=Fe(2,rl(nK,hk)),ede=Fe(2,t1(vk,hk)),fxn=nl(nK),sxn=NQe,lxn=jQe,dxn=jM(vk),pxn=kM(vk),hxn=e1(vk),vxn=Xle,mxn=Xle,gxn=ede,yxn=ede,bxn=a1(ra),$xn=pi(pk),kQe=vi(hk),Ixn=kQe,UQe=di(tK),_xn=UQe,qQe=a1(Na),xQe=function(e){return Se(ry(e),Rv(nk(pu)))},tde=function(e){var t=xQe(e);return function(n){return Rr(n)?t(n):qQe}},Sxn=tde,DQe=function(e){return tde(function(t,n){return e(n)})},wxn=DQe(Oe),Axn=uy,Mxn=uy,Rxn=Qle,Oxn=Qle;const Exn=Object.freeze(Object.defineProperty({__proto__:null,ApT:qQe,Applicative:ixn,Apply:tK,Chain:hk,Do:bxn,FromIO:nK,FromReader:vk,Functor:pk,Monad:axn,MonadIO:oxn,Pointed:txn,URI:fp,ap:Zle,apFirst:nxn,apS:UQe,apSW:_xn,apSecond:rxn,apW:Yqn,as:Xqn,asUnit:Qqn,ask:dxn,asks:pxn,asksReaderIO:Jqn,asksReaderIOW:CQe,bind:kQe,bindTo:$xn,bindW:Ixn,chain:Axn,chainFirst:Rxn,chainFirstIOK:lxn,chainFirstReaderK:gxn,chainFirstReaderKW:yxn,chainFirstW:Oxn,chainIOK:sxn,chainReaderK:vxn,chainReaderKW:mxn,chainW:Mxn,flap:exn,flatMap:uy,flatMapIO:NQe,flatMapReader:Xle,flatten:Zqn,flattenW:FQe,fromIO:Yle,fromIOK:fxn,fromReader:Jle,fromReaderK:hxn,local:Hqn,map:PQe,of:a1,sequenceArray:wxn,tap:Qle,tapIO:jQe,tapReader:ede,traverseArray:DQe,traverseArrayWithIndex:Sxn,traverseReadonlyArrayWithIndex:tde,traverseReadonlyNonEmptyArrayWithIndex:xQe},Symbol.toStringTag,{value:"Module"}));var nde=eK(ro),o1=$l,u1=Se(ko,o1),LQe=Rv(ko),Txn=WM,BQe=NM,Cxn=BQe,Sl=function(e,t){return M(e,ide(t))},c1=function(e,t){return M(e,ade(t))},rde=function(e,t){return Xc(e,function(n){return M(t,ide(n))})},ide=Zz(Lt),ade=Xz(o$),Pxn=ade,Zf=Yz(ro),Xc=Fe(2,Qz(ja)),VQe=Xc(Oe),Fxn=VQe,Vo="ReaderTask",Ui={URI:Vo,map:Sl},Wxn=Fe(2,hu(Ui)),Nxn=Zu(Ui),jxn=tn(Ui),mk={URI:Vo,of:Zf},gk={URI:Vo,map:Sl,ap:c1},kxn=Yr(gk),Uxn=Zr(gk),qxn={URI:Vo,map:Sl,ap:c1,of:Zf},ode={URI:Vo,map:Sl,ap:rde},zQe={URI:Vo,map:Sl,ap:rde,of:Zf},f1={URI:Vo,map:Sl,ap:c1,chain:Xc},jv={URI:Vo,map:Sl,of:Zf,ap:c1,chain:Xc},xxn={URI:Vo,map:Sl,of:Zf,ap:c1,chain:Xc,fromIO:u1},Dxn={URI:Vo,map:Sl,of:Zf,ap:c1,chain:Xc,fromIO:u1,fromTask:o1},rK={URI:Vo,fromIO:u1},ude={URI:Vo,fromIO:u1,fromTask:o1},yk={URI:Vo,fromReader:nde},cde={flatMap:Xc},Lxn={fromIO:rK.fromIO},Bxn={fromTask:o1},Vxn={fromReader:nde},KQe=ev(Lxn,cde),GQe=oW(Bxn,cde),fde=uW(Vxn,cde),sde=Fe(2,function(e,t){return Xc(e,pde(t))}),iK=Fe(2,hi(f1)),HQe=Fe(2,rl(rK,f1)),lde=Fe(2,t1(yk,f1)),JQe=Fe(2,S$(ude,f1)),dde=Fe(2,function(e,t){return iK(e,pde(t))}),zxn=nl(rK),Kxn=KQe,Gxn=HQe,Hxn=jM(yk),Jxn=kM(yk),Yxn=e1(yk),Zxn=fde,Xxn=fde,Qxn=lde,e3n=lde,pde=function(e){return function(){for(var t=[],n=0;n1&&!o?"│ ":" "),i.forest)}return n};function Ett(e){return Ott(` `,e)}function P6n(e){return e.value+Ett(e.forest)}function Ttt(e,t){var n=t(e),r=n[0],i=n[1];return{value:r,forest:Ctt(i,t)}}function Ctt(e,t){return e.map(function(n){return Ttt(n,t)})}function Ptt(e){var t=Ftt(e);return function(n,r){return e.chain(r(n),function(i){var a=i[0],o=i[1];return e.map(t(o,r),function(u){return{value:a,forest:u}})})}}function Ftt(e){var t=W5(e);return function(n,r){return M(n,t(function(i){return Ptt(e)(i,r)}))}}function F6n(e){var t=function(n){return e(n.value,n.forest.map(t))};return t}var dy=function(e,t){return M(e,pK(t))},ZM=function(e,t){return py(e,function(n){return M(t,pK(n))})},Ope=function(e,t,n){return M(e,hK(t,n))},Epe=function(e){var t=jtt(e);return function(n,r){return M(n,t(r))}},Tpe=function(e,t,n){return M(e,Cpe(t,n))},Wtt=function(e,t){return M(e,dK(t))},Ntt=function(e){var t=Fpe(e);return function(n,r){return M(n,t(r))}},W6n=function(e){return function(t){return ZM(t,e)}},py=Fe(2,function(e,t){var n=t(e.value),r=n.value,i=n.forest,a=Zoe().concat;return{value:r,forest:a(i,e.forest.map(py(t)))}}),dK=function(e){return function(t){return{value:e(t),forest:t.forest.map(dK(e))}}},N6n=dK(Oe),j6n=py(Oe),pK=function(e){return function(t){return{value:e(t.value),forest:t.forest.map(pK(e))}}},hK=function(e,t){return function(n){for(var r=t(e,n.value),i=n.forest.length,a=0;a=0;a--)r=M(n.forest[a],Cpe(r,t));return t(n.value,r)}},Ppe=function(e){return e.value},Fpe=function(e){var t=W5(e),n=function(r){return function(i){return e.ap(e.map(r(i.value),function(a){return function(o){return{value:a,forest:o}}}),M(i.forest,t(n(r))))}};return n},Wpe=function(e){return Fpe(e)(Oe)},XM=function(e){return Rtt(e)},Ml="Tree",vK={URI:Ml,map:dy},k6n=tn(vK),U6n={URI:Ml,of:XM},mK={URI:Ml,map:dy,ap:ZM},q6n=Yr(mK),x6n=Zr(mK),D6n={URI:Ml,map:dy,ap:ZM,of:XM},Npe={URI:Ml,map:dy,ap:ZM,chain:py},L6n={URI:Ml,map:dy,ap:ZM,of:XM,chain:py},B6n=i$(Npe),V6n={URI:Ml,reduce:Ope,foldMap:Epe,reduceRight:Tpe},z6n={URI:Ml,map:dy,reduce:Ope,foldMap:Epe,reduceRight:Tpe,traverse:Ntt,sequence:Wpe},K6n={URI:Ml,map:dy,extend:Wtt,extract:Ppe},G6n=XM(ra),H6n=pi(vK),J6n=Ti(vK),Y6n=vi(Npe),Z6n=di(mK);function X6n(e){var t=function(n,r){return e.equals(n,r.value)||r.forest.some(function(i){return t(n,i)})};return t}var ktt=function(e){return function(t){return e(t.value)||t.forest.some(ktt(e))}},Q6n=py,e5n={URI:Ml,map:dy,of:XM,ap:ZM,chain:py,reduce:Ope,foldMap:Epe,reduceRight:Tpe,traverse:Ntt,sequence:Wpe,extract:Ppe,extend:Wtt};const t5n=Object.freeze(Object.defineProperty({__proto__:null,Applicative:D6n,Apply:mK,Chain:Npe,Comonad:K6n,Do:G6n,Foldable:V6n,Functor:vK,Monad:L6n,Pointed:U6n,Traversable:z6n,URI:Ml,ap:W6n,apFirst:q6n,apS:Z6n,apSecond:x6n,bind:Y6n,bindTo:H6n,chain:Q6n,chainFirst:B6n,drawForest:Ett,drawTree:P6n,duplicate:N6n,elem:X6n,exists:ktt,extend:dK,extract:Ppe,flap:k6n,flatMap:py,flatten:j6n,fold:F6n,foldMap:jtt,getEq:C6n,getShow:T6n,let:J6n,make:Rtt,map:pK,of:XM,reduce:hK,reduceRight:Cpe,sequence:Wpe,traverse:Fpe,tree:e5n,unfoldForest:Ctt,unfoldForestM:Ftt,unfoldTree:Ttt,unfoldTreeM:Ptt},Symbol.toStringTag,{value:"Module"})),n5n=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function r5n(e,t){var n=D4e(t,jg(e));return{map:n.map,ap:n.ap,of:n.of,chain:function(r,i){return t.chain(r,function(a){return Aa(a)?t.of(ws(a.left)):i(a.right)})},alt:function(r,i){return t.chain(r,function(a){return zie(a)?t.of(a):t.map(i(),function(o){return Aa(o)?ws(e.concat(a.left,o.left)):o})})}}}const i5n=Object.freeze(Object.defineProperty({__proto__:null,getValidationM:r5n},Symbol.toStringTag,{value:"Module"}));var Utt=vae(void 0),a5n={concat:Utt.concat,empty:void 0};const o5n=Object.freeze(Object.defineProperty({__proto__:null,Monoid:a5n,Semigroup:Utt},Symbol.toStringTag,{value:"Module"}));var u5n=function(e){return function(){return[void 0,e]}},c5n=function(e){return function(){var t=e(),n=t[0],r=t[1];return[[n,r],r]}},f5n=function(e){return function(){var t=e(),n=t[0],r=n[0],i=n[1],a=t[1];return[r,i(a)]}},s5n=function(e){return function(t){return function(){var n=t(),r=n[0],i=n[1];return[[r,e(i)],i]}}},l5n=function(e){return function(t){return function(){var n=t(),r=n[0],i=n[1];return[r,e(i)]}}},Ak=function(e,t){return M(e,qtt(t))},qtt=function(e){return function(t){return function(){var n=t(),r=n[0],i=n[1];return[e(r),i]}}},p1="Writer",xtt=function(e){return{URI:p1,_E:void 0,of:function(t){return function(){return[t,e.empty]}}}},jpe=function(e){return{URI:p1,_E:void 0,map:Ak,ap:function(t,n){return function(){var r=t(),i=r[0],a=r[1],o=n(),u=o[0],c=o[1];return[i(u),e.concat(a,c)]}}}},Dtt=function(e){var t=jpe(e),n=xtt(e);return{URI:p1,_E:void 0,map:Ak,ap:t.ap,of:n.of}};function Ltt(e){var t=jpe(e);return{URI:p1,_E:void 0,map:Ak,ap:t.ap,chain:function(n,r){return function(){var i=n(),a=i[0],o=i[1],u=r(a)(),c=u[0],f=u[1];return[c,e.concat(o,f)]}}}}function d5n(e){var t=Dtt(e),n=Ltt(e);return{URI:p1,_E:void 0,map:Ak,ap:t.ap,of:t.of,chain:n.chain}}var kpe={URI:p1,map:Ak},p5n=tn(kpe),h5n=function(e){return e()[0]},v5n=function(e){return e()[1]},m5n=function(e){return e()[0]},g5n=function(e){return e()[1]},y5n=kpe;const b5n=Object.freeze(Object.defineProperty({__proto__:null,Functor:kpe,URI:p1,censor:l5n,evalWriter:m5n,evaluate:h5n,execWriter:g5n,execute:v5n,flap:p5n,getApplicative:Dtt,getApply:jpe,getChain:Ltt,getMonad:d5n,getPointed:xtt,listen:c5n,listens:s5n,map:qtt,pass:f5n,tell:u5n,writer:y5n},Symbol.toStringTag,{value:"Module"}));function $5n(e){var t=function(n,r){return function(){return e.map(n(),function(i){var a=i[0],o=i[1];return[r(a),o]})}};return{map:t,evalWriter:function(n){return e.map(n(),function(r){var i=r[0];return i})},execWriter:function(n){return e.map(n(),function(r){r[0];var i=r[1];return i})},tell:function(n){return function(){return e.of([void 0,n])}},listen:function(n){return function(){return e.map(n(),function(r){var i=r[0],a=r[1];return[[i,a],a]})}},pass:function(n){return function(){return e.map(n(),function(r){var i=r[0],a=i[0],o=i[1],u=r[1];return[a,o(u)]})}},listens:function(n,r){return function(){return e.map(n(),function(i){var a=i[0],o=i[1];return[[a,r(o)],o]})}},censor:function(n,r){return function(){return e.map(n(),function(i){var a=i[0],o=i[1];return[a,r(o)]})}},getMonad:function(n){return{_E:void 0,map:t,of:function(r){return function(){return e.of([r,n.empty])}},ap:function(r,i){return function(){return e.chain(r(),function(a){var o=a[0],u=a[1];return e.map(i(),function(c){var f=c[0],s=c[1];return[o(f),n.concat(u,s)]})})}},chain:function(r,i){return function(){return e.chain(r(),function(a){var o=a[0],u=a[1];return e.map(i(o)(),function(c){var f=c[0],s=c[1];return[f,n.concat(u,s)]})})}}}}}}const I5n=Object.freeze(Object.defineProperty({__proto__:null,getWriterM:$5n},Symbol.toStringTag,{value:"Module"})),_5n=Object.freeze(Object.defineProperty({__proto__:null,alt:fWn,alternative:dWn,applicative:Cen,apply:Een,array:GVe,bifunctor:pWn,boolean:Egn,booleanAlgebra:yWn,bounded:_Wn,boundedDistributiveLattice:AWn,boundedJoinSemilattice:MWn,boundedLattice:RWn,boundedMeetSemilattice:OWn,category:EWn,chain:Pen,chainRec:ptn,choice:PWn,comonad:FWn,compactable:xcn,console:UWn,const:QWn,contravariant:eNn,date:cNn,distributiveLattice:SWn,either:E6e,eitherT:Bcn,endomorphism:_vn,eq:F6e,extend:fNn,field:dNn,filterable:zcn,filterableWithIndex:pNn,foldable:bNn,foldableWithIndex:INn,fromEither:vtn,fromIO:Nen,fromReader:JNn,fromState:gjn,fromTask:Hcn,fromThese:hpn,function:q4e,functor:Ten,functorWithIndex:bjn,group:$jn,heytingAlgebra:Ijn,hkt:_jn,identity:Qln,invariant:Sjn,io:Kjn,ioEither:cUn,ioOption:i2n,ioRef:o2n,joinSemilattice:u2n,json:s2n,lattice:l2n,magma:Knn,map:bvn,meetSemilattice:d2n,monad:p2n,monadIO:h2n,monadTask:v2n,monadThrow:m2n,monoid:x7e,naturalTransformation:g2n,nonEmptyArray:nBe,number:Bin,option:$ze,optionT:Ssn,ord:Lnn,ordering:w2n,pipeable:MGe,pointed:A2n,predicate:Xun,profunctor:M2n,random:T2n,reader:KNn,readerEither:Vqn,readerIO:Exn,readerT:Gqn,readerTask:M3n,readerTaskEither:bLn,readonlyArray:XBe,readonlyMap:khn,readonlyNonEmptyArray:w5e,readonlyRecord:wmn,readonlySet:BKe,readonlyTuple:nhn,record:_9e,refinement:qgn,ring:SLn,semigroup:$ae,semigroupoid:wLn,semiring:MLn,separated:Itn,set:HKe,show:EGe,state:mjn,stateReaderTaskEither:r6n,stateT:OLn,store:d6n,string:Yvn,strong:v6n,struct:y6n,task:dtn,taskEither:ysn,taskOption:Eln,taskThese:Dpn,these:ppn,theseT:mpn,traced:M6n,traversable:O6n,traversableWithIndex:E6n,tree:t5n,tuple:ghn,unfoldable:n5n,validationT:i5n,void:o5n,witherable:_tn,writer:b5n,writerT:I5n,zero:Vin},Symbol.toStringTag,{value:"Module"})),S5n=Et(_5n);var r_e;function Btt(){if(r_e)return DO;r_e=1,Object.defineProperty(DO,"__esModule",{value:!0}),DO.ioTsNewtypeInterpreter=void 0;var e=it,t=S5n,n=Bn,r=lo,i=hp(),a=Ta,o=function(u){return u};return DO.ioTsNewtypeInterpreter=e.memo(function(){return{_F:a.IoTsURI,newtype:function(){return function(u,c){return function(f){return n.pipe(u(f).type,function(s){return new a.IOTSType(i.iotsApplyConfig(c)(o(s),f,{type:s}))})}}},newtypeIso:function(u,c,f,s){return function(l){return n.pipe(c(l).type,function(d){var p=function(v){return d.is(v)};return new a.IOTSType(i.iotsApplyConfig(s)(new r.Type(f,p,function(v,h){return n.pipe(d.validate(v,h),t.either.map(u.get))},function(v){return d.encode(u.reverseGet(v))}),l,{type:d}))})}},newtypePrism:function(u,c,f,s){return function(l){return n.pipe(c(l).type,function(d){var p=function(v){return d.is(v)};return new a.IOTSType(i.iotsApplyConfig(s)(new r.Type(f,p,function(v,h){return n.pipe(d.validate(v,h),t.either.chain(function($){var b=u.getOption($);return b._tag==="None"?r.failure(v,h,"newtype doesn't satisfy prism conditions"):r.success(b.value)}))},function(v){return d.encode(u.reverseGet(v))}),l,{type:d}))})}}}}),DO}var i9={},i_e;function Vtt(){return i_e||(i_e=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ioTsRefinedInterpreter=e.predicate=e.refinement=void 0;var t=it,n=bu,r=lo,i=hp(),a=Ta,o=function(c,f,s){return new r.Type(s,function(l){return c.is(l)&&f(l)},function(l,d){var p=c.decode(l);if(p._tag==="Left")return p;var v=p.right;return f(v)?r.success(v):r.failure(l,d)},c.encode)};e.refinement=o;var u=function(c,f,s){return new r.Type(s,function(l){return c.is(l)&&f(l)},function(l,d){var p=c.decode(l);if(p._tag==="Left")return p;var v=p.right;return f(v)?r.success(v):r.failure(l,d)},c.encode)};e.predicate=u,e.ioTsRefinedInterpreter=t.memo(function(){return{_F:a.IoTsURI,refined:function(c,f,s,l){return function(d){return n.pipe(c(d).type,function(p){return new a.IOTSType(i.iotsApplyConfig(l)(e.refinement(p,f,s),d,{type:p}))})}},constrained:function(c,f,s,l){return function(d){return n.pipe(c(d).type,function(p){return new a.IOTSType(i.iotsApplyConfig(l)(e.predicate(p,f,s),d,{type:p}))})}}}})}(i9)),i9}var a_e;function w5n(){return a_e||(a_e=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=ua;t.__exportStar(VYe(),e),t.__exportStar(zYe(),e),t.__exportStar(ztt(),e),t.__exportStar(Zj,e),t.__exportStar(KYe(),e),t.__exportStar(GYe(),e),t.__exportStar(YYe(),e),t.__exportStar(ZYe(),e),t.__exportStar(XYe(),e),t.__exportStar(Btt(),e),t.__exportStar(Vtt(),e)}(e9)),e9}var o_e;function hp(){return o_e||(o_e=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.iotsApplyConfig=e.IoTsURI=void 0;var t=ua,n=L$,r=Ta;Object.defineProperty(e,"IoTsURI",{enumerable:!0,get:function(){return r.IoTsURI}}),t.__exportStar(w5n(),e),e.iotsApplyConfig=n.getApplyConfig(r.IoTsURI)}(Q7)),Q7}var u_e;function ztt(){if(u_e)return NO;u_e=1,Object.defineProperty(NO,"__esModule",{value:!0}),NO.ioTsIntersectionInterpreter=void 0;var e=it,t=lo,n=Ta,r=hp();return NO.ioTsIntersectionInterpreter=e.memo(function(){return{_F:n.IoTsURI,intersection:function(){for(var i=[],a=0;a":l.show(d)}}};return BO.showPrimitiveInterpreter=e.memo(function(){return{_F:c.ShowURI,date:function(l){return function(d){return new c.ShowType(u.showApplyConfig(l)({show:function(p){return p.toISOString()}},d,{}))}},boolean:function(l){return function(d){return new c.ShowType(u.showApplyConfig(l)(o.showBoolean,d,{}))}},string:function(l){return function(d){return new c.ShowType(u.showApplyConfig(l)(o.showString,d,{}))}},number:function(l){return function(d){return new c.ShowType(u.showApplyConfig(l)(o.showNumber,d,{}))}},bigint:function(l){return function(d){return new c.ShowType(u.showApplyConfig(l)({show:function(p){return JSON.stringify(p)}},d,{}))}},stringLiteral:function(l,d){return function(p){return new c.ShowType(u.showApplyConfig(d)(o.showString,p,{}))}},numberLiteral:function(l,d){return function(p){return new c.ShowType(u.showApplyConfig(d)(o.showNumber,p,{}))}},oneOfLiterals:function(l,d){return function(p){return new c.ShowType(u.showApplyConfig(d)(f,p,{}))}},tag:function(l,d){return function(p){return new c.ShowType(u.showApplyConfig(d)(o.showString,p,{}))}},keysOf:function(l,d){return function(p){return new c.ShowType(u.showApplyConfig(d)(o.showString,p,{}))}},nullable:function(l,d){return function(p){return n.pipe(l(p).show,function(v){return new c.ShowType(u.showApplyConfig(d)(r.getShow(v),p,{show:v}))})}},optional:function(l,d){return function(p){return n.pipe(l(p).show,function(v){return new c.ShowType(u.showApplyConfig(d)(s(v),p,{show:v}))})}},mutable:function(l,d){return function(p){return n.pipe(l(p).show,function(v){return new c.ShowType(u.showApplyConfig(d)(v,p,{show:v}))})}},array:function(l,d){return function(p){return n.pipe(l(p).show,function(v){return new c.ShowType(u.showApplyConfig(d)(i.getShow(v),p,{show:v}))})}},nonEmptyArray:function(l,d){return function(p){return n.pipe(l(p).show,function(v){return new c.ShowType(u.showApplyConfig(d)(a.getShow(v),p,{show:v}))})}},uuid:function(l){return function(d){return new c.ShowType(u.showApplyConfig(l)(o.showString,d,{}))}},either:function(l,d,p){return function(v){return function(h,$){return new c.ShowType(u.showApplyConfig(p)(t.getShow(h,$),v,{left:h,right:$}))}(l(v).show,d(v).show)}},option:function(l,d){return function(p){return n.pipe(l(p).show,function(v){return new c.ShowType(u.showApplyConfig(d)(r.getShow(v),p,{show:v}))})}},unknownE:function(l,d){return function(p){return n.pipe(l(p).show,function(v){return new c.ShowType(u.showApplyConfig(d)(v,p,{show:v}))})}}}}),BO}var VO={},f_e;function Jtt(){if(f_e)return VO;f_e=1,Object.defineProperty(VO,"__esModule",{value:!0}),VO.showObjectInterpreter=void 0;var e=ua,t=it,n=Gtt,r=vp(),i=Ca,a=function(u){return u},o=function(u){return{show:function(c){return c===void 0?"undefined":u.show(c)}}};return VO.showObjectInterpreter=t.memo(function(){return{_F:i.ShowURI,interface:function(u,c,f){return function(s){var l=t.projectFieldWithEnv(u,s)("show");return new i.ShowType(r.showApplyConfig(f)(n.getStructShow(l),s,{shows:l}))}},partial:function(u,c,f){return function(s){var l=t.mapRecord(t.projectFieldWithEnv(u,s)("show"),o);return new i.ShowType(r.showApplyConfig(f)(a(n.getStructShow(l)),s,{shows:l}))}},both:function(u,c,f,s){return function(l){var d=t.projectFieldWithEnv(u,l)("show"),p=t.mapRecord(t.projectFieldWithEnv(c,l)("show"),o);return new i.ShowType(r.showApplyConfig(s)(n.getStructShow(e.__assign(e.__assign({},d),p)),l,{shows:d,showsPartial:p}))}}}}),VO}var zO={},s_e;function Ytt(){if(s_e)return zO;s_e=1,Object.defineProperty(zO,"__esModule",{value:!0}),zO.showTaggedUnionInterpreter=void 0;var e=it,t=vp(),n=Ca;return zO.showTaggedUnionInterpreter=e.memo(function(){return{_F:n.ShowURI,taggedUnion:function(r,i,a,o){return function(u){var c=e.mapRecord(i,function(f){return f(u).show.show});return new n.ShowType(t.showApplyConfig(o)({show:function(f){return c[f[r]](f)}},u,{}))}}}}),zO}var KO={},l_e;function Ztt(){if(l_e)return KO;l_e=1,Object.defineProperty(KO,"__esModule",{value:!0}),KO.showRecursiveInterpreter=void 0;var e=it,t=Ca,n=vp();return KO.showRecursiveInterpreter=e.memo(function(){return{_F:t.ShowURI,recursive:function(r,i,a){var o=e.memo(function(){return r(u)}),u=function(c){return new t.ShowType(n.showApplyConfig(a)({show:function(f){return o()(c).show.show(f)}},c,{}))};return u}}}),KO}var GO={},d_e;function Xtt(){if(d_e)return GO;d_e=1,Object.defineProperty(GO,"__esModule",{value:!0}),GO.showSetInterpreter=void 0;var e=it,t=bu,n=dHe,r=Ca,i=vp();return GO.showSetInterpreter=e.memo(function(){return{_F:r.ShowURI,set:function(a,o,u){return function(c){return t.pipe(a(c).show,function(f){return new r.ShowType(i.showApplyConfig(u)(n.getShow(f),c,{show:f}))})}}}}),GO}var HO={},p_e;function Qtt(){if(p_e)return HO;p_e=1,Object.defineProperty(HO,"__esModule",{value:!0}),HO.showStrMapInterpreter=void 0;var e=it,t=bu,n=D$,r=vp(),i=Ca;return HO.showStrMapInterpreter=e.memo(function(){return{_F:i.ShowURI,strMap:function(a,o){return function(u){return t.pipe(a(u).show,function(c){return new i.ShowType(r.showApplyConfig(o)(n.getShow(c),u,{show:c}))})}},record:function(a,o,u){return function(c){return function(f,s){return new i.ShowType(r.showApplyConfig(u)(n.getShow(s),c,{domainShow:f,codomainShow:s}))}(a(c).show,o(c).show)}}}}),HO}var JO={},h_e;function ent(){if(h_e)return JO;h_e=1,Object.defineProperty(JO,"__esModule",{value:!0}),JO.showUnknownInterpreter=void 0;var e=it,t=bu,n=vp(),r=Ca;return JO.showUnknownInterpreter=e.memo(function(){return{_F:r.ShowURI,unknown:function(i){return function(a){return t.pipe({show:function(o){return""}},function(o){return new r.ShowType(n.showApplyConfig(i)(o,a,{show:o}))})}}}}),JO}var YO={},v_e;function tnt(){if(v_e)return YO;v_e=1,Object.defineProperty(YO,"__esModule",{value:!0}),YO.showNewtypeInterpreter=void 0;var e=it,t=Bn,n=vp(),r=Ca,i=function(a){return a};return YO.showNewtypeInterpreter=e.memo(function(){return{_F:r.ShowURI,newtype:function(a){return function(o,u){return function(c){return t.pipe(o(c).show,function(f){return new r.ShowType(n.showApplyConfig(u)(i({show:function(s){return"<"+a+">("+f.show(s)+")"}}),c,{show:f}))})}}},newtypeIso:function(a,o,u,c){return function(f){return t.pipe(o(f).show,function(s){return new r.ShowType(n.showApplyConfig(c)({show:function(l){return"<"+u+">("+s.show(a.reverseGet(l))+")"}},f,{show:s}))})}},newtypePrism:function(a,o,u,c){return function(f){return t.pipe(o(f).show,function(s){return new r.ShowType(n.showApplyConfig(c)({show:function(l){return"<"+u+">("+s.show(a.reverseGet(l))+")"}},f,{show:s}))})}}}}),YO}var ZO={},m_e;function nnt(){if(m_e)return ZO;m_e=1,Object.defineProperty(ZO,"__esModule",{value:!0}),ZO.showRefinedInterpreter=void 0;var e=it,t=bu,n=vp(),r=Ca;return ZO.showRefinedInterpreter=e.memo(function(){return{_F:r.ShowURI,refined:function(i,a,o,u){return function(c){return t.pipe(i(c).show,function(f){return new r.ShowType({show:function(s){return"<"+o+">("+n.showApplyConfig(u)(f,c,{show:f}).show(s)+")"}})})}},constrained:function(i,a,o,u){return function(c){return t.pipe(i(c).show,function(f){return new r.ShowType({show:function(s){return"<"+o+">("+n.showApplyConfig(u)(f,c,{show:f}).show(s)+")"}})})}}}}),ZO}var g_e;function M5n(){return g_e||(g_e=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=ua;t.__exportStar(Htt(),e),t.__exportStar(rnt(),e),t.__exportStar(Jtt(),e),t.__exportStar(Ytt(),e),t.__exportStar(Ztt(),e),t.__exportStar(Xtt(),e),t.__exportStar(Qtt(),e),t.__exportStar(ent(),e),t.__exportStar(tnt(),e),t.__exportStar(nnt(),e)}(o9)),o9}var y_e;function vp(){return y_e||(y_e=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.showApplyConfig=e.ShowURI=void 0;var t=ua,n=L$,r=Ca;Object.defineProperty(e,"ShowURI",{enumerable:!0,get:function(){return r.ShowURI}}),t.__exportStar(M5n(),e),e.showApplyConfig=n.getApplyConfig(r.ShowURI)}(a9)),a9}var b_e;function rnt(){if(b_e)return LO;b_e=1,Object.defineProperty(LO,"__esModule",{value:!0}),LO.showIntersectionInterpreter=void 0;var e=it,t=Ca,n=vp();return LO.showIntersectionInterpreter=e.memo(function(){return{_F:t.ShowURI,intersection:function(){for(var r=[],i=0;i({lensFromProp:cI.fromProp(),lensFromProps:cI.fromProps(),lensFromPath:cI.fromPath(),indexFromAt:ohe.fromAt,optionalFromOptionProp:Pq.fromOptionProp(),optionalFromNullableProp:Pq.fromNullableProp(),prism:pT.some(),prismFromPredicate:pT.fromPredicate}),ezn=QVn(),tzn=()=>ezn,Lnt=e=>e,Bnt=e=>()=>t=>t,Vnt=(e,t)=>Object.assign((...r)=>e(...r),t),znt=(e,t)=>Vnt(e,Object.assign({},e,t)),Knt=e=>t=>e(t),nzn=e=>e,rzn=e=>e;function izn(e,t){return rzn(nzn(Vnt(Knt(e),t(e))))}function azn(e,t){const n=izn(e,t);return znt(n,Object.assign(Object.assign({},tzn()),{derive:Lnt(n)}))}var Gnt={},TK={};Object.defineProperty(TK,"__esModule",{value:!0});TK.Ctors=void 0;var w_e=ua,ozn=D$,uzn=function(e){return function(t){var n=ozn.mapWithIndex(function(r,i){return function(a){var o;return w_e.__assign(w_e.__assign({},a),(o={},o[e]=r,o))}})(t);return{of:n,as:n,make:function(r){return r},tag:e}}};TK.Ctors=uzn;var CK={};const Hnt=Et(XVn);Object.defineProperty(CK,"__esModule",{value:!0});CK.Matchers=void 0;var czn=eV,A_e=Hnt,fzn=function(e){return function(t){var n=function(c,f){return function(s){return(c[s[e]]||f)(s)}},r=function(c){return new A_e.Lens(function(f){return c[f[e]].get(f)},function(f){return function(s){return c[s[e]].set(f)(s)}})},i=function(c){return new A_e.Optional(function(f){var s=c[f[e]];return s!==void 0?s.getOption(f):czn.none},function(f){return function(s){var l=c[s[e]];return l!==void 0?l.set(f)(s):s}})},a=function(c){return function(f){var s=c[f[e]];return s?s(f):f}},o=function(c){return c},u=function(c){return function(f,s){var l=n(f,s||function(d){return function(p){return p}});return function(d,p){var v=d===void 0?c:d;return p[e]in t?l(p)(v):v}}};return{matchStrict:n,match:n,transform:a,fold:o,createReducer:u,createPartialReducer:u,strict:function(c){return c},matchLens:r,matchOptional:i}}};CK.Matchers=fzn;var PK={};Object.defineProperty(PK,"__esModule",{value:!0});PK.MonocleFor=void 0;var Gv=Hnt,szn=function(){return{lensFromProp:Gv.Lens.fromProp(),lensFromProps:Gv.Lens.fromProps(),lensFromPath:Gv.Lens.fromPath(),indexFromAt:Gv.Index.fromAt,optionalFromOptionProp:Gv.Optional.fromOptionProp(),optionalFromNullableProp:Gv.Optional.fromNullableProp(),prism:Gv.Prism.some(),prismFromPredicate:Gv.Prism.fromPredicate}},lzn=szn(),dzn=function(){return lzn};PK.MonocleFor=dzn;var FK={};Object.defineProperty(FK,"__esModule",{value:!0});FK.Predicates=void 0;var pzn=D$,hzn=function(e){return function(t){return{is:pzn.mapWithIndex(function(n,r){return function(i){return i[e]===n}})(t),verified:function(n){return n[e]in t},isAnyOf:function(n){return function(r){return n.indexOf(r[e])!==-1}}}}};FK.Predicates=hzn;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.makeADT=e.ofType=e.intersectADT=e.unionADT=void 0;var t=ua,n=pJe,r=$se,i=bu,a=D$,o=TK,u=CK,c=PK,f=FK,s=function(g,_){return t.__assign(t.__assign({},g),_)},l=a.fromFoldable({concat:i.identity},n.array),d=function(g){return i.tuple(g,null)},p=function(g,_){return l(n.intersection(r.eqString)(Object.keys(g),Object.keys(_)).map(d))},v=function(g,_){return l(n.difference(r.eqString)(Object.keys(g),_).map(d))},h=function(g,_){return l(n.intersection(r.eqString)(Object.keys(g),_).map(d))},$=function(g){var _=n.reduceRight(g[0].keys,function(I,A){return s(I.keys,A)})(g);return e.makeADT(g[0].tag)(_)};e.unionADT=$;var b=function(g,_){return e.makeADT(g.tag)(p(g.keys,_.keys))};e.intersectADT=b;var y=function(){return 1};e.ofType=y;var m=function(g){return function(_){var I=_,A=o.Ctors(g)(I),E=f.Predicates(g)(I),N=c.MonocleFor(),U=u.Matchers(g)(I),te=function(J){return e.makeADT(g)(h(I,J))},Ie=function(J){return e.makeADT(g)(v(I,J))},je=t.__assign(t.__assign(t.__assign(t.__assign(t.__assign({},A),E),N),U),{tag:g,keys:I,select:te,exclude:Ie});return je}};e.makeADT=m})(Gnt);const Jnt=rse({concat:Oe},KVe),vzn=(e,t)=>Jnt(M5(pae)(Object.keys(e),t).map(n=>R6(n,e[n]))),mzn=(e,t)=>Jnt(R5(pae)(Object.keys(e),t).map(n=>R6(n,e[n])));function che(e){return t=>n=>{const r=e(f=>f.taggedUnion(t,c9e((s,l)=>l(f))(n))),i=Gnt.makeADT(t)(n),a=che(e)(t),o=f=>a(vzn(n,f)),u=f=>a(mzn(n,f));return znt(Knt(r),Object.assign(Object.assign(Object.assign({},r),i),{selectMorph:o,excludeMorph:u}))}}function gzn(e,t){const n=a=>azn(e(a),t),r=che(n),i=Bnt()();return{summon:n,tagged:r,define:i}}const yzn=Object.freeze(Object.defineProperty({__proto__:null,defineFor:Bnt,interpretable:Lnt,makeSummoner:gzn,makeTagged:che},Symbol.toStringTag,{value:"Module"})),bzn=Et(yzn);Object.defineProperty(ab,"__esModule",{value:!0});var fhe=ab.summonFor=ab.AsUOpaque=ab.AsOpaque=void 0,$zn=YB,Izn=PGe,_zn=yHe,M_e=$Je,Szn=Ktt,wzn=bzn,Azn=function(){return function(e){return e}};ab.AsOpaque=Azn;var Mzn=function(){return function(e){return e}};ab.AsUOpaque=Mzn;var Rzn=function(e){return wzn.makeSummoner($zn.cacheUnaryFunction,function(t){var n=t(M_e.modelIoTsNonStrictInterpreter())(e),r=n.create,i=n.type;return{build:function(a){return a},eq:t(Izn.modelEqInterpreter())(e).eq,show:t(Szn.modelShowInterpreter())(e).show,arb:t(_zn.modelFastCheckInterpreter())(e).arb,strictType:t(M_e.modelIoTsStrictInterpreter())(e).type,type:i,create:r}})};fhe=ab.summonFor=Rzn;var lt=(e=>(e.RequestTimeout="RequestTimeout",e.RequestFailure="RequestFailure",e.SerializationError="SerializationError",e.MissingTenantIdClaim="MissingTenantIdClaim",e.MissingSessionIdClaim="MissingSessionIdClaim",e.TenantAccessForbidden="TenantAccessForbidden",e.SessionIdInvalid="SessionIdInvalid",e.AuthenticationFailure="AuthenticationFailure",e.SideLoadingForbidden="SideLoadingForbidden",e.UsageRuleRestriction="UsageRuleRestriction",e.ConfigurationModelInvalid="ConfigurationModelInvalid",e.SolutionNotFeasible="SolutionNotFeasible",e.ConfigurationModelNotFound="ConfigurationModelNotFound",e.SolverInitializationFailure="SolverInitializationFailure",e.ConfigurationModelLoadFailure="ConfigurationModelLoadFailure",e.ConfigurationInitializationFailure="ConfigurationInitializationFailure",e.SolverPoolInitializationFailure="SolverPoolInitializationFailure",e.SetDecisionConflict="SetDecisionConflict",e.SolveOperationTimeout="SolveOperationTimeout",e.ExplainConflict="ExplainConflict",e.ExplainFailure="ExplainFailure",e.SnapshotInvalid="SnapshotInvalid",e.SnapshotNotFound="SnapshotNotFound",e.ConfigurationModelNotFeasible="ConfigurationModelNotFeasible",e.MakeManyDecisionsConflict="MakeManyDecisionsConflict",e.SpecifiedDeploymentForbidden="SpecifiedDeploymentForbidden",e.AttributeNotFound="AttributeNotFound",e.ChoiceAttributeNotFound="ChoiceAttributeNotFound",e.ComponentAttributeNotFound="ComponentAttributeNotFound",e.NumericAttributeNotFound="NumericAttributeNotFound",e.BooleanAttributeNotFound="BooleanAttributeNotFound",e.ChoiceValueNotFound="ChoiceValueNotFound",e.NumericDecisionOutOfRange="NumericDecisionOutOfRange",e.ConflictWithConsequence="ConflictWithConsequence",e.DecisionsToRespectInvalid="DecisionsToRespectInvalid",e.SessionNotFound="SessionNotFound",e.ServerError="ServerError",e.ConnectionError="ConnectionError",e.TaskCancelled="TaskCancelled",e.SessionClosed="SessionClosed",e.StoredConfigurationInvalid="StoredConfigurationInvalid",e))(lt||{}),Qr=(e=>(e.whyIsNotSatisfied="why-is-not-satisfied",e.whyIsStateNotPossible="why-is-state-not-possible",e))(Qr||{}),Nt=(e=>(e.choiceValue="choice-value",e.component="component",e.boolean="boolean",e.numeric="numeric",e.configuration="configuration",e.attribute="attribute",e))(Nt||{}),Mm=(e=>(e.all="all",e.none="none",e.specific="specific",e))(Mm||{}),H_=(e=>(e.Channel="Channel",e.Package="Package",e))(H_||{}),se=(e=>(e.Boolean="Boolean",e.Numeric="Numeric",e.Choice="Choice",e.Component="Component",e))(se||{}),Ct=(e=>(e.Included="Included",e.Excluded="Excluded",e))(Ct||{}),Pt=(e=>(e.Included="Included",e.Excluded="Excluded",e))(Pt||{}),vt=(e=>(e.Implicit="Implicit",e.Explicit="Explicit",e))(vt||{}),fI=(e=>(e.Mandatory="Mandatory",e.Optional="Optional",e))(fI||{}),Fq=(e=>(e.Always="Always",e.Optional="Optional",e))(Fq||{});const Ozn=e=>e.type===se.Boolean,Ezn=e=>e.type===se.Choice,Tzn=e=>e.type===se.Numeric,Czn=e=>e.type===se.Component,WK=Object.freeze(Object.defineProperty({__proto__:null,booleanAttributeRefinement:Ozn,choiceAttributeRefinement:Ezn,componentAttributeRefinement:Czn,numericAttributeRefinement:Tzn},Symbol.toStringTag,{value:"Module"}));function Lv(e){const t=[...e.sharedConfigurationModelId?["shared",e.sharedConfigurationModelId]:["root"],...e.componentPath??[],e.localId];return M(t,pt(n=>n.replace("::","|::|")),n=>n.join("::"))}function she(e){return e.possibleDecisionStates.includes(Ct.Included)}function Ynt(e){return!she(e)}const R_e=Object.freeze(Object.defineProperty({__proto__:null,isAllowed:she,isBlocked:Ynt},Symbol.toStringTag,{value:"Module"}));function Pzn(e){return Ze(e).with({type:se.Choice},t=>t.cardinality.lowerBound>0).with({type:se.Boolean},t=>t.selection===fI.Mandatory).with({type:se.Numeric},t=>t.selection===fI.Mandatory).with({type:se.Component},t=>t.inclusion===Fq.Optional&&t.selection===fI.Mandatory).exhaustive()}function Fzn(e){return e.cardinality.upperBound>1}function Wzn(e){return M(e.values,uN(fl),pt(([t,n])=>n),gf(she))}function Nzn(e){return M(e.values,uN(fl),pt(([t,n])=>n),gf(Ynt))}function jzn(e){return M(e.values,wfe(t=>{var n;return((n=t.decision)==null?void 0:n.state)===Ct.Included}),uN(fl),pt(([t,n])=>n))}const rE=Object.freeze(Object.defineProperty({__proto__:null,getAllowedChoiceValues:Wzn,getBlockedChoiceValues:Nzn,getIncludedChoiceValues:jzn,isChoiceAttributeMultiSelect:Fzn,isMandatory:Pzn},Symbol.toStringTag,{value:"Module"})),Znt={whyIsNotSatisfied:{configuration:{question:Qr.whyIsNotSatisfied,subject:Nt.configuration},attribute:e=>({question:Qr.whyIsNotSatisfied,subject:Nt.attribute,attributeId:e})},whyIsStateNotPossible:{choice:e=>({choiceValue:t=>({state:n=>({question:Qr.whyIsStateNotPossible,subject:Nt.choiceValue,attributeId:e,choiceValueId:t,state:n})})}),boolean:e=>({state:t=>({question:Qr.whyIsStateNotPossible,subject:Nt.boolean,attributeId:e,state:t})}),numeric:e=>({state:t=>({question:Qr.whyIsStateNotPossible,subject:Nt.numeric,attributeId:e,state:t})}),component:e=>({state:t=>({question:Qr.whyIsStateNotPossible,subject:Nt.component,attributeId:e,state:t})})}},kzn=e=>e.kind===vt.Explicit,Uzn=e=>e.kind===vt.Implicit;var Dp=(e=>(e.Included="Included",e.Excluded="Excluded",e))(Dp||{}),_H=(e=>(e.Mandatory="Mandatory",e.Optional="Optional",e))(_H||{}),SH=(e=>(e.Always="Always",e.Optional="Optional",e))(SH||{}),wH=(e=>(e.Implicit="Implicit",e.Explicit="Explicit",e))(wH||{}),Qo=(e=>(e.Included="Included",e.Excluded="Excluded",e.Undefined="Undefined",e))(Qo||{});let qzn=class{constructor(t={}){this.baseUrl="https://spc.cloud.ceventis.de/hca/api/engine",this.securityData=null,this.abortControllers=new Map,this.customFetch=(...n)=>fetch(...n),this.baseApiParams={credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"},this.setSecurityData=n=>{this.securityData=n},this.contentFormatters={"application/json":n=>n!==null&&(typeof n=="object"||typeof n=="string")?JSON.stringify(n):n,"text/plain":n=>n!==null&&typeof n!="string"?JSON.stringify(n):n,"multipart/form-data":n=>Object.keys(n||{}).reduce((r,i)=>{const a=n[i];return r.append(i,a instanceof Blob?a:typeof a=="object"&&a!==null?JSON.stringify(a):`${a}`),r},new FormData),"application/x-www-form-urlencoded":n=>this.toQueryString(n)},this.createAbortSignal=n=>{if(this.abortControllers.has(n)){const i=this.abortControllers.get(n);return i?i.signal:void 0}const r=new AbortController;return this.abortControllers.set(n,r),r.signal},this.abortRequest=n=>{const r=this.abortControllers.get(n);r&&(r.abort(),this.abortControllers.delete(n))},this.request=async({body:n,secure:r,path:i,type:a,query:o,format:u,baseUrl:c,cancelToken:f,...s})=>{const l=(typeof r=="boolean"?r:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},d=this.mergeRequestParams(s,l),p=o&&this.toQueryString(o),v=this.contentFormatters[a||"application/json"],h=u||d.format;return this.customFetch(`${c||this.baseUrl||""}${i}${p?`?${p}`:""}`,{...d,headers:{...d.headers||{},...a&&a!=="multipart/form-data"?{"Content-Type":a}:{}},signal:(f?this.createAbortSignal(f):d.signal)||null,body:typeof n>"u"||n===null?null:v(n)}).then(async $=>{const b=$;b.data=null,b.error=null;const y=h?await $[h]().then(m=>(b.ok?b.data=m:b.error=m,b)).catch(m=>(b.error=m,b)):b;if(f&&this.abortControllers.delete(f),!$.ok)throw y;return y})},Object.assign(this,t)}encodeQueryParam(t,n){return`${encodeURIComponent(t)}=${encodeURIComponent(typeof n=="number"?n:`${n}`)}`}addQueryParam(t,n){return this.encodeQueryParam(n,t[n])}addArrayQueryParam(t,n){return t[n].map(r=>this.encodeQueryParam(n,r)).join("&")}toQueryString(t){const n=t||{};return Object.keys(n).filter(r=>typeof n[r]<"u").map(r=>Array.isArray(n[r])?this.addArrayQueryParam(n,r):this.addQueryParam(n,r)).join("&")}addQueryParams(t){const n=this.toQueryString(t);return n?`?${n}`:""}mergeRequestParams(t,n){return{...this.baseApiParams,...t,...n||{},headers:{...this.baseApiParams.headers||{},...t.headers||{},...n&&n.headers||{}}}}};/** * @title Viamedici.Spc.Engine.ConfigurationEngine.RestApi.Service * @version v2 * @license © 2024 Viamedici - All rights reserved (https://viamedici.de) * @termsOfService None * @baseUrl https://spc.cloud.ceventis.de/hca/api/engine * @contact Viamedici Software GmbH (https://viamedici.de) */let Xnt=class extends qzn{constructor(){super(...arguments),this.consequence={consequenceGet:(t={})=>this.request({path:"/v2/session/configuration/consequence",method:"GET",secure:!0,format:"json",...t})},this.decision={decisionPutDecision:(t,n={})=>this.request({path:"/v2/session/configuration/decision",method:"PUT",body:t,secure:!0,type:"application/json",format:"json",...n}),decisionGetAllDecisions:(t={})=>this.request({path:"/v2/session/configuration/decision",method:"GET",secure:!0,format:"json",...t}),decisionPutMany:(t,n={})=>this.request({path:"/v2/session/configuration/decision/many",method:"PUT",body:t,secure:!0,type:"application/json",format:"json",...n})},this.explain={explainWhyNotSatisfied:(t,n={})=>this.request({path:"/v2/session/configuration/consequence/explain/why-not-satisfied",method:"POST",body:t,secure:!0,type:"application/json",format:"json",...n}),explainWhyNotSatisfiedDecisions:(t,n={})=>this.request({path:"/v2/session/configuration/consequence/explain/why-not-satisfied/answer/decisions",method:"POST",body:t,secure:!0,type:"application/json",format:"json",...n}),explainWhyNotSatisfiedRules:(t,n={})=>this.request({path:"/v2/session/configuration/consequence/explain/why-not-satisfied/answer/constraints",method:"POST",body:t,secure:!0,type:"application/json",format:"json",...n}),explainWhyStateNotPossible:(t,n={})=>this.request({path:"/v2/session/configuration/consequence/explain/why-state-not-possible",method:"POST",body:t,secure:!0,type:"application/json",format:"json",...n}),explainWhyStateNotPossibleDecisions:(t,n={})=>this.request({path:"/v2/session/configuration/consequence/explain/why-state-not-possible/answer/decisions",method:"POST",body:t,secure:!0,type:"application/json",format:"json",...n}),explainWhyStateNotPossibleRules:(t,n={})=>this.request({path:"/v2/session/configuration/consequence/explain/why-state-not-possible/answer/constraints",method:"POST",body:t,secure:!0,type:"application/json",format:"json",...n})},this.meta={metaGetConfigurationModel:(t={})=>this.request({path:"/v2/session/configuration/meta/configuration-model",method:"GET",secure:!0,format:"json",...t}),metaGet:(t={})=>this.request({path:"/v2/session/configuration/meta",method:"GET",secure:!0,format:"json",...t})},this.session={sessionPost:(t,n={})=>this.request({path:"/v2/session",method:"POST",body:t,secure:!0,type:"application/json",format:"json",...n}),sessionDelete:(t,n={})=>this.request({path:`/v2/session/${t}`,method:"DELETE",secure:!0,...n}),sessionClose:(t,n={})=>this.request({path:"/v2/session/close",method:"POST",body:t,secure:!0,type:"application/json",...n})}}};const xzn="https://spc.cloud.ceventis.de/hca/api/engine",O_e=new Map,E_e=new Map;function Nk(e){const t=e??xzn;let n=O_e.get(t);return n||(n=new Xnt({baseUrl:t}),O_e.set(t,n)),n}function Dzn(e){const t=(...r)=>typeof r[0]=="string"?fetch(e,r[1]):fetch(...r);let n=E_e.get(e);return n||(n=new Xnt({customFetch:t}),E_e.set(e,n)),n.session.sessionPost}function ms(e){return{sharedConfigurationModelId:e.sharedConfigurationModelId,componentPath:e.componentPath!=null?oI(e.componentPath):void 0,localId:e.localId}}function Qnt(e){return{type:"Choice",attributeId:ms(e.attributeId),choiceValueId:e.choiceValueId,state:Ze(e.state).with(Bi.nullish,()=>Qo.Undefined).with(Ct.Included,()=>Qo.Included).with(Ct.Excluded,()=>Qo.Excluded).exhaustive()}}function ert(e){return{type:"Component",attributeId:ms(e.attributeId),state:Ze(e.state).with(Bi.nullish,()=>Qo.Undefined).with(Pt.Included,()=>Qo.Included).with(Pt.Excluded,()=>Qo.Excluded).exhaustive()}}function trt(e){return{type:"Numeric",attributeId:ms(e.attributeId),state:e.state}}function nrt(e){return{type:"Boolean",attributeId:ms(e.attributeId),state:e.state}}function Lzn(e){return Ze(e).with({type:se.Choice},Qnt).with({type:se.Component},ert).with({type:se.Boolean},nrt).with({type:se.Numeric},trt).exhaustive()}function Bzn(e){const t=Ze(e.configurationModelSource).returnType().with({type:H_.Channel},a=>({type:"Channel",deploymentName:a.deploymentName,channel:a.channel})).with({type:H_.Package},a=>({type:"Package",configurationModelPackage:a.configurationModelPackage})).exhaustive(),n=()=>{var a;const o=(a=e.allowedInExplain)!=null&&a.rules?Ze(e.allowedInExplain.rules).returnType().with({type:Mm.all},()=>({type:"AllowedRulesAll"})).with({type:Mm.none},()=>({type:"AllowedRulesNone"})).with({type:Mm.specific},u=>({type:"AllowedRulesSpecific",rules:M(u.rules,pt(c=>({configurationModelId:c.configurationModelId,localId:c.localId})),oI)})).exhaustive():void 0;if(o)return{rules:o}},r=e.attributeRelations?M(e.attributeRelations,pt(a=>({attributeId:ms(a.attributeId),decisions:M(a.decisions,pt(ms),oI)})),oI):void 0,i=e.usageRuleParameters?e.usageRuleParameters:void 0;return{configurationModelSource:t,allowedInExplain:n(),attributeRelations:r,usageRuleParameters:i}}function Vzn(e,t){const n=(c,f)=>M(e,gf(c),pt(f),oI),r=n(c=>c.type===se.Boolean,nrt),i=n(c=>c.type===se.Numeric,trt),a=n(c=>c.type===se.Component,ert),o=n(c=>c.type===se.Choice,Qnt),u=Ze(t).with({type:"DropExistingDecisions"},c=>({type:"DropExistingDecisions",conflictResolution:Ze(c.conflictHandling).with({type:"Automatic"},()=>({type:"Automatic"})).with({type:"Manual"},f=>({type:"Manual",includeConstraintsInConflictExplanation:f.includeConstraintsInConflictExplanation})).exhaustive()})).with({type:"KeepExistingDecisions"},()=>({type:"KeepExistingDecisions"})).exhaustive();return{booleanDecisions:r,componentDecisions:a,numericDecisions:i,choiceDecisions:o,mode:u}}function zzn(e){return Ze(e).returnType().with({subject:Nt.configuration},()=>({type:"Configuration"})).with({subject:Nt.attribute},t=>({type:"Attribute",attributeId:ms(t.attributeId)})).exhaustive()}function Kzn(e){return Ze(e).returnType().with({subject:Nt.boolean},t=>({type:"Boolean",attributeId:ms(t.attributeId),state:t.state})).with({subject:Nt.numeric},t=>({type:"Numeric",attributeId:ms(t.attributeId),state:t.state})).with({subject:Nt.component},t=>({type:"Component",attributeId:ms(t.attributeId),state:Ze(t.state).with(Pt.Included,()=>Dp.Included).with(Pt.Excluded,()=>Dp.Excluded).exhaustive()})).with({subject:Nt.choiceValue},t=>({type:"ChoiceValue",attributeId:ms(t.attributeId),choiceValueId:t.choiceValueId,state:Ze(t.state).with(Ct.Included,()=>Dp.Included).with(Ct.Excluded,()=>Dp.Excluded).exhaustive()})).exhaustive()}const xU={type:lt.ServerError};function Gzn(e){return Ze(e).returnType().with({type:"ConfigurationModelNotFeasible"},Hzn).with({type:"SpecifiedDeploymentForbidden"},Jzn).with({type:"AttributeNotFound"},Yzn).with({type:"ChoiceAttributeNotFound"},Zzn).with({type:"ComponentAttributeNotFound"},Xzn).with({type:"NumericAttributeNotFound"},Qzn).with({type:"BooleanAttributeNotFound"},eKn).with({type:"ChoiceValueNotFound"},tKn).with({type:"NumericDecisionOutOfRange"},nKn).with({type:"ConflictWithConsequence"},rKn).with({type:"DecisionsToRespectInvalid"},iKn).with({type:"SessionNotFound"},aKn).with({type:"PutManyDecisionsConflict"},()=>xU).with({type:"AssignedChannelNotFound"},()=>xU).with({type:"InternalServerError"},()=>xU).with({type:"RequestTimeout"},t=>xr(t,lt.RequestTimeout)).with({type:"RequestFailure"},t=>xr(t,lt.RequestFailure)).with({type:"SerializationError"},t=>xr(t,lt.SerializationError)).with({type:"MissingTenantIdClaim"},t=>xr(t,lt.MissingTenantIdClaim)).with({type:"MissingSessionIdClaim"},t=>xr(t,lt.MissingSessionIdClaim)).with({type:"TenantAccessForbidden"},t=>xr(t,lt.TenantAccessForbidden)).with({type:"SessionIdInvalid"},t=>xr(t,lt.SessionIdInvalid)).with({type:"AuthenticationFailure"},t=>xr(t,lt.AuthenticationFailure)).with({type:"SideLoadingForbidden"},t=>xr(t,lt.SideLoadingForbidden)).with({type:"UsageRuleRestriction"},t=>xr(t,lt.UsageRuleRestriction)).with({type:"ConfigurationModelInvalid"},t=>xr(t,lt.ConfigurationModelInvalid)).with({type:"SolutionNotFeasible"},t=>xr(t,lt.SolutionNotFeasible)).with({type:"ConfigurationModelNotFound"},t=>xr(t,lt.ConfigurationModelNotFound)).with({type:"SolverInitializationFailure"},t=>xr(t,lt.SolverInitializationFailure)).with({type:"ConfigurationModelLoadFailure"},t=>xr(t,lt.ConfigurationModelLoadFailure)).with({type:"ConfigurationInitializationFailure"},t=>xr(t,lt.ConfigurationInitializationFailure)).with({type:"SolverPoolInitializationFailure"},t=>xr(t,lt.SolverPoolInitializationFailure)).with({type:"SetDecisionConflict"},t=>xr(t,lt.SetDecisionConflict)).with({type:"SolveOperationTimeout"},t=>xr(t,lt.SolveOperationTimeout)).with({type:"ExplainConflict"},t=>xr(t,lt.ExplainConflict)).with({type:"ExplainFailure"},t=>xr(t,lt.ExplainFailure)).with({type:"SnapshotInvalid"},t=>xr(t,lt.SnapshotInvalid)).with({type:"SnapshotNotFound"},t=>xr(t,lt.SnapshotNotFound)).otherwise(()=>xU)}function xr(e,t){return{...e,type:t}}function Hzn(e){return{...e,type:lt.ConfigurationModelNotFeasible,constraintExplanations:M(e.constraintExplanations??[],pt(lhe))}}function Jzn(e){return{...e,type:lt.SpecifiedDeploymentForbidden}}function Yzn(e){return{...e,type:lt.AttributeNotFound,globalAttributeId:ii(e.globalAttributeId)}}function Zzn(e){return{...e,type:lt.ChoiceAttributeNotFound,globalAttributeId:ii(e.globalAttributeId)}}function Xzn(e){return{...e,type:lt.ComponentAttributeNotFound,globalAttributeId:ii(e.globalAttributeId)}}function Qzn(e){return{...e,type:lt.NumericAttributeNotFound,globalAttributeId:ii(e.globalAttributeId)}}function eKn(e){return{...e,type:lt.BooleanAttributeNotFound,globalAttributeId:ii(e.globalAttributeId)}}function tKn(e){const{globalChoiceValueId:t,...n}=e;return{...n,type:lt.ChoiceValueNotFound,globalAttributeId:ii(t.attributeId),choiceValueId:t.choiceValueId}}function nKn(e){return{...e,type:lt.NumericDecisionOutOfRange,globalAttributeId:ii(e.globalAttributeId)}}function rKn(e){return{...e,type:lt.ConflictWithConsequence,globalAttributeId:ii(e.globalAttributeId)}}function iKn(e){return{...e,type:lt.DecisionsToRespectInvalid,globalAttributeId:ii(e.globalAttributeId)}}function aKn(){return{type:lt.SessionNotFound}}function oKn(e){const t=M(e.causedByBooleanDecisions,pt(a=>({type:se.Boolean,attributeId:ii(a.attributeId),state:a.state}))),n=M(e.causedByNumericDecisions,pt(a=>({type:se.Numeric,attributeId:ii(a.attributeId),state:a.state}))),r=M(e.causedByComponentDecisions,pt(a=>({type:se.Component,attributeId:ii(a.attributeId),state:rrt(a.state)}))),i=M(e.causedByChoiceDecisions,pt(a=>({type:se.Choice,attributeId:ii(a.attributeId),choiceValueId:a.choiceValueId,state:irt(a.state)})));return{causedByBooleanDecisions:t,causedByNumericDecisions:n,causedByComponentDecisions:r,causedByChoiceValueDecisions:i}}function lhe(e){const t=M(e.causedByCardinalities,pt(r=>ii(r.attributeId))),n=M(e.causedByRules,pt(r=>uKn(r.constraintId)));return{causedByCardinalities:t,causedByRules:n}}function ii(e){const t=e.sharedConfigurationModelId!=null?e.sharedConfigurationModelId:void 0,n=e.componentPath!=null&&Yn(e.componentPath)?e.componentPath:void 0;return{localId:e.localId,componentPath:n,sharedConfigurationModelId:t}}function uKn(e){return{localId:e.localId,configurationModelId:e.configurationModelId}}function rrt(e){return Ze(e).with(Dp.Included,()=>Pt.Included).with(Dp.Excluded,()=>Pt.Excluded).exhaustive()}function irt(e){return Ze(e).with(Dp.Included,()=>Ct.Included).with(Dp.Excluded,()=>Ct.Excluded).exhaustive()}function NK(e){return Ze(e).with(wH.Explicit,()=>vt.Explicit).with(wH.Implicit,()=>vt.Implicit).exhaustive()}function art({state:e,kind:t}){return e!=null?{state:e,kind:NK(t)}:null}function ort({state:e,kind:t}){return e!=null?{state:e,kind:NK(t)}:null}function urt({state:e,kind:t}){return e===Qo.Included||e===Qo.Excluded?{state:Ze(e).with(Qo.Included,()=>Pt.Included).with(Qo.Excluded,()=>Pt.Excluded).exhaustive(),kind:NK(t)}:null}function crt({state:e,kind:t}){return e===Qo.Included||e===Qo.Excluded?{state:Ze(e).with(Qo.Included,()=>Ct.Included).with(Qo.Excluded,()=>Ct.Excluded).exhaustive(),kind:NK(t)}:null}function u9(e){return Ze(e).with(_H.Mandatory,()=>fI.Mandatory).with(_H.Optional,()=>fI.Optional).exhaustive()}function cKn(e){return Ze(e).with(SH.Always,()=>Fq.Always).with(SH.Optional,()=>Fq.Optional).exhaustive()}function fKn(e){const t=M(e.componentDecisions,pt(a=>{var o;return{type:se.Component,attributeId:ii(a.attributeId),state:(o=urt(a))==null?void 0:o.state}})),n=M(e.booleanDecisions,pt(a=>{var o;return{type:se.Boolean,attributeId:ii(a.attributeId),state:(o=art(a))==null?void 0:o.state}})),r=M(e.numericDecisions,pt(a=>{var o;return{type:se.Numeric,attributeId:ii(a.attributeId),state:(o=ort(a))==null?void 0:o.state}})),i=M(e.choiceValueDecisions,pt(a=>{var o;return{type:se.Choice,attributeId:ii(a.attributeId),choiceValueId:a.choiceValueId,state:(o=crt(a))==null?void 0:o.state}}));return M(i,Ll(t),Ll(r),Ll(n))}var frt=function(e,t){return{get:e,set:t}},sKn=function(){return frt(Oe,jo)},lKn=function(e){return function(t){return frt(function(n){return t.get(n)[e]},function(n){return function(r){var i,a=t.get(r);return n===a[e]?r:t.set(Object.assign({},a,(i={},i[e]=n,i)))(r)}})}},dKn=sKn,pKn=function(e){return function(t){return function(n){var r=t.get(n),i=e(r);return r===i?n:t.set(i)(n)}}},hKn=lKn;const vKn=e=>e.hash!=null;function Gm(e){const t=new WeakMap;return{show:n=>{const r=t.get(n);if(r!=null)return r;const i=e.show(n);return t.set(n,i),i}}}const mKn=PA(Si),jK=e=>({show:t=>t==null?"":e.show(t)}),gKn={show:e=>e!=null&&Yn(e)?mKn.show(e):""},yKn=Gm(pf({localId:Si,componentPath:gKn,sharedConfigurationModelId:jK(Si)})),bKn=Si,$Kn=M(pf({localId:Si,configurationModel:Si}),Gm,jK),Hm=e=>M(pf({kind:Si,state:e}),Gm,jK),kK={id:yKn,key:bKn,type:Si,sourceId:$Kn,isSatisfied:uI,canContributeToConfigurationSatisfaction:uI},IKn=pf({...kK,decision:Hm(uI),nonOptimisticDecision:Hm(uI),possibleDecisionStates:Gm(PA(uI)),selection:Si}),_Kn=pf({...kK,decision:Hm(pm),nonOptimisticDecision:Hm(pm),selection:Si,range:Gm(pf({max:pm,min:pm})),decimalPlaces:pm}),SKn=pf({...kK,decision:Hm(Si),nonOptimisticDecision:Hm(Si),possibleDecisionStates:Gm(PA(Si)),selection:jK(Si),inclusion:Si}),wKn=pf({...kK,cardinality:Gm(pf({upperBound:pm,lowerBound:pm})),values:_fe(Si,pf({id:Si,decision:Hm(Si),nonOptimisticDecision:Hm(Si),possibleDecisionStates:Gm(PA(Si))}))}),AKn={show:e=>Ze(e).with({type:se.Choice},wKn.show).with({type:se.Component},SKn.show).with({type:se.Boolean},IKn.show).with({type:se.Numeric},_Kn.show).exhaustive()},MKn=Se(AKn.show,eN(e=>Rbn.hash(e)));function RKn(e){return{...e,hash:MKn(e)}}function dhe(e){return pM(Nfe())(e)}const or=Ge,zr=ot({localId:Ge,componentPath:M(I5(Ge),yW(e=>e??[])),sharedConfigurationModelId:zn(Ge)}),srt=ot({localId:Ge,configurationModelId:Ge}),OKn=ot({type:Ge,includeConstraintsInConflictExplanation:sr}),EKn=ot({type:Ge}),TKn=ml().with(e=>e.type==="Automatic",EKn).with(e=>e.type==="Manual",OKn),CKn=ot({type:Ge,conflictHandling:TKn}),PKn=ot({type:Ge}),FKn=ml().with(e=>e.type==="DropExistingDecisions",CKn).with(e=>e.type==="KeepExistingDecisions",PKn),WKn=ot({type:Ge,attributeId:zr,state:zn(sr)}),NKn=ot({type:Ge,attributeId:zr,state:zn(ru)}),jKn=ot({type:Ge,attributeId:zr,state:zn(Ge)}),kKn=ot({type:Ge,attributeId:zr,choiceValueId:Ge,state:zn(Ge)}),phe=ml().with(e=>e.type===se.Boolean,WKn).with(e=>e.type===se.Numeric,NKn).with(e=>e.type===se.Component,jKn).with(e=>e.type===se.Choice,kKn),lrt=M(ot({attributeId:zr,choiceValueId:cue(Ge)}),yW(e=>Ze(e).with({type:se.Choice},t=>({attributeId:t.attributeId,choiceValueId:nn(t.choiceValueId)})).otherwise(t=>({attributeId:t.attributeId,choiceValueId:Bt})))),UKn=ot({mode:FKn,decisions:Vr(phe)}),drt=ot({causedByDecisions:Vr(phe),solution:UKn}),prt=ot({causedByCardinalities:Vr(zr),causedByRules:Vr(srt)}),qKn=ot({key:or,sourceId:ot({configurationModel:Ge,localId:Ge})}),Wq=zn(ot({state:sr,kind:Ge})),xKn=ot({type:Ge,id:zr,key:or,decision:Wq,nonOptimisticDecision:Wq}),Nq=zn(ot({state:ru,kind:Ge})),DKn=ot({type:Ge,id:zr,key:or,decision:Nq,nonOptimisticDecision:Nq}),jq=zn(ot({state:Ge,kind:Ge})),LKn=ot({type:Ge,id:zr,key:or,decision:jq,nonOptimisticDecision:jq}),kq=zn(ot({state:Ge,kind:Ge})),BKn=ot({type:Ge,id:zr,key:or,values:Vr(ot({id:Ge,decision:kq,nonOptimisticDecision:kq}))}),VKn=ml().with(e=>e.type===se.Boolean,xKn).with(e=>e.type===se.Numeric,DKn).with(e=>e.type===se.Component,LKn).with(e=>e.type===se.Choice,BKn),zKn=ot({type:Ge,id:zr,key:or,possibleDecisionStates:Vr(sr),selection:Ge,isSatisfied:sr}),KKn=ot({type:Ge,id:zr,key:or,range:ot({max:ru,min:ru}),isSatisfied:sr,selection:Ge,decimalPlaces:ru}),GKn=ot({type:Ge,id:zr,key:or,possibleDecisionStates:Vr(Ge),isSatisfied:sr,inclusion:Ge,selection:zn(Ge)}),HKn=ot({type:Ge,id:zr,key:or,isSatisfied:sr,cardinality:ot({upperBound:ru,lowerBound:ru}),values:Vr(ot({id:Ge,possibleDecisionStates:Vr(Ge)}))}),JKn=ml().with(e=>e.type===se.Boolean,zKn).with(e=>e.type===se.Numeric,KKn).with(e=>e.type===se.Component,GKn).with(e=>e.type===se.Choice,HKn),UK={type:Ge,id:zr,key:or,sourceId:zn(ot({configurationModel:Ge,localId:Ge})),canContributeToConfigurationSatisfaction:sr,isSatisfied:sr},YKn=ot({...UK,selection:Ge,possibleDecisionStates:Vr(sr),decision:Wq,nonOptimisticDecision:Wq}),ZKn=ot({...UK,selection:Ge,range:ot({max:ru,min:ru}),decimalPlaces:ru,decision:Nq,nonOptimisticDecision:Nq}),XKn=ot({...UK,inclusion:Ge,selection:zn(Ge),possibleDecisionStates:Vr(Ge),decision:jq,nonOptimisticDecision:jq}),QKn=ot({...UK,cardinality:ot({upperBound:ru,lowerBound:ru}),values:Sm(Ge,ot({id:Ge,possibleDecisionStates:Vr(Ge),decision:kq,nonOptimisticDecision:kq}))}),AH=ml().with(e=>e.type===se.Boolean,YKn).with(e=>e.type===se.Numeric,ZKn).with(e=>e.type===se.Component,XKn).with(e=>e.type===se.Choice,QKn),e8n=xo((e,t)=>e.hash===t.hash);ot({isSatisfied:sr,attributes:Sm(or,AH)});ot({isSatisfied:sr,attributes:Sm(or,e8n)});ot({decisionExplanations:Vr(drt),constraintExplanations:Vr(prt)});ot({type:Ge,title:Ge,detail:Ge,decisionExplanations:Vr(drt),constraintExplanations:Vr(prt)});const t8n=ml().with(e=>e.accessToken!=null,ot({accessToken:Ge})).with(e=>e.sessionCreateUrl!=null,ot({sessionCreateUrl:Ge})),n8n=ot({rules:zn(ml().with(e=>e.type===Mm.none,ot({type:Ge})).with(e=>e.type===Mm.all,ot({type:Ge})).with(e=>e.type===Mm.specific,ot({type:Ge,rules:Vr(srt)})))}),r8n=ot({attributeId:zr,decisions:Vr(zr)}),i8n=ml().with(e=>e.type===H_.Channel,ot({type:Ge,channel:Ge,deploymentName:Ge})).with(e=>e.type===H_.Package,ot({type:Ge,configurationModelPackage:xo(CGe)}));ot({apiBaseUrl:zn(Ge),sessionInitialisationOptions:t8n,configurationModelSource:i8n,provideSourceId:zn(sr),optimisticDecisionOptions:zn(ot({restoreConfiguration:zn(sr),applySolution:zn(sr),makeDecision:zn(sr),makeManyDecisions:zn(sr)})),allowedInExplain:zn(n8n),usageRuleParameters:zn(Yfe(Ge)),attributeRelations:zn(Vr(r8n))});ot({isSatisfied:sr,canContributeToSatisfaction:Vr(or),meta:Sm(or,qKn),decisions:Sm(or,VKn),consequences:Sm(or,JKn)});const a8n=ot({isSatisfied:zn(sr),attributes:ot({added:Vr(AH),changed:Vr(AH),removed:Vr(zr)})});let hrt="error";const o8n=jp(e=>{switch(e){case"debug":return["debug","info","warning","error"];case"info":return["info","warning","error"];case"warning":return["warning","error"];case"error":return["error"];case"silent":return[]}}),DU=e=>(...t)=>{if(o8n(hrt).includes(e))switch(e){case"debug":console.debug(...t);break;case"info":console.info(...t);break;case"warning":console.warn(...t);break;case"error":console.error(...t);break}},eu={setLogLevel:e=>{hrt=e},debug:DU("debug"),info:DU("info"),warn:DU("warning"),error:DU("error")},u8n=M(dKn(),hKn("attributes"));function hhe(e){const t=M(e.attributes,l_(n=>vKn(n)?n:RKn(n)));return{isSatisfied:e.isSatisfied,attributes:t}}function c8n(e){return M([...e.consequences.values()],pt(t=>Ze(t).returnType().with({type:se.Boolean},n=>({...n,canContributeToConfigurationSatisfaction:!1,decision:null,nonOptimisticDecision:null})).with({type:se.Numeric},n=>({...n,canContributeToConfigurationSatisfaction:!1,decision:null,nonOptimisticDecision:null})).with({type:se.Component},n=>({...n,canContributeToConfigurationSatisfaction:!1,decision:null,nonOptimisticDecision:null})).with({type:se.Choice},n=>({...n,canContributeToConfigurationSatisfaction:!1,values:M(n.values,pt(r=>({...r,decision:null,nonOptimisticDecision:null})),pt(r=>[r.id,r]),s_(Ge,zE(),u_))})).exhaustive()),pt(t=>[t.key,t]),s_(or,zE(),u_),t=>({attributes:t,isSatisfied:e.isSatisfied}),vrt(e),hhe)}function vrt(e){const t=n=>hT(f8n(r=>{const i=M(n,MA(or)(r.key));return i!=r.canContributeToConfigurationSatisfaction?nn({...r,canContributeToConfigurationSatisfaction:i}):Bt}));return n=>M({...n,isSatisfied:e.isSatisfied??n.isSatisfied},s8n([...(e.meta??Io).values(),...(e.decisions??Io).values(),...(e.consequences??Io).values()]),e.canContributeToSatisfaction?t(e.canContributeToSatisfaction):Oe)}function hT(e){return M(u8n,pKn(M(e,NB,dhe)))}function mrt(e,t){return n=>M(n,cN(or)(e,r=>{const i=t(r);return i!=r?grt(i):r}),Jze(()=>()=>{eu.warn("Didn't found attribute while tying to update it. GlobalAttributeIdKey",e)}),_c(()=>n))}function f8n(e){return t=>M(t,l_(n=>M(e(n),ib(r=>r!=n),Nr(grt),_c(()=>n))))}function s8n(e){return M(e,NB,pt(l8n),hT)}function l8n(e){return mrt(e.key,t=>"type"in e?t.type===se.Choice&&e.type===se.Choice?{...t,...e,values:M(e.values,NW(t.values,(n,r)=>M(n,cN(Ge)(r.id,i=>({...i,...r})),Jze(()=>()=>{eu.warn("Didn't found choice value while tying to update it. GlobalAttributeIdKey:",e.key,"Choice Value id:",r.id)}),_c(()=>n))))}:t.type===se.Boolean&&e.type===se.Boolean?{...t,...e}:t.type===se.Numeric&&e.type===se.Numeric?{...t,...e}:t.type===se.Component&&e.type===se.Component?{...t,...e}:(eu.warn("Types of attribute and partial attribute mismatch. AttributeType:",t.type,"PartialAttributeType",e.type),t):{...t,...e})}function grt(e){const t={...e};return delete t.hash,t}const yrt=M(Ge,yW(e=>e.id)),d8n={concat:(e,t)=>({...t,values:UW(yrt).concat(t.values,e.values)})},p8n={concat:(e,t)=>({...t,values:UW(yrt).concat(t.values,e.values)})},c9=Ug(),f9=Ug(),brt={concat:(e,t)=>Ze({x:e,y:t}).with({x:{type:se.Numeric},y:{type:se.Numeric}},({x:n,y:r})=>c9.concat(n,r)).with({x:{type:se.Boolean},y:{type:se.Boolean}},({x:n,y:r})=>c9.concat(n,r)).with({x:{type:se.Component},y:{type:se.Component}},({x:n,y:r})=>c9.concat(n,r)).with({x:{type:se.Choice},y:{type:se.Choice}},({x:n,y:r})=>d8n.concat(n,r)).otherwise(()=>t)},$rt={concat:(e,t)=>Ze({x:e,y:t}).with({x:{type:se.Numeric},y:{type:se.Numeric}},({x:n,y:r})=>f9.concat(n,r)).with({x:{type:se.Boolean},y:{type:se.Boolean}},({x:n,y:r})=>f9.concat(n,r)).with({x:{type:se.Component},y:{type:se.Component}},({x:n,y:r})=>f9.concat(n,r)).with({x:{type:se.Choice},y:{type:se.Choice}},({x:n,y:r})=>p8n.concat(n,r)).otherwise(()=>t)},h8n=Ug(),v8n=pN(or,Ug()),m8n=pN(or,brt),g8n=pN(or,$rt);function Irt(e){return M(e,ii,Lv)}function _rt(e,t){const n=wrt(t.consequences),r=Srt(t.affectedDecisions),i={isSatisfied:t.consequences.isConfigurationSatisfied,canContributeToSatisfaction:M(t.consequences.canAttributeContributeToConfigurationSatisfaction,pt(Irt)),decisions:r,consequences:n};return{configuration:M(e,vrt(i),hhe),rawData:i}}function y8n(e,t,n){const r=b8n(n),i=wrt(t),a=Srt(e),o={isSatisfied:t.isConfigurationSatisfied,canContributeToSatisfaction:M(t.canAttributeContributeToConfigurationSatisfaction,pt(Irt)),meta:r,decisions:a,consequences:i};return{configuration:c8n(o),rawData:o}}function Srt(e){const t=(o,u,c)=>M(o??[],pt(f=>({attributeId:ii(f.attributeId),decision:f})),pt(({attributeId:f,decision:s})=>({id:f,key:Lv(f),...c(u(s),s)}))),n=t(e.booleanDecisions,art,o=>({type:se.Boolean,decision:o,nonOptimisticDecision:o})),r=t(e.numericDecisions,ort,o=>({type:se.Numeric,decision:o,nonOptimisticDecision:o})),i=t(e.componentDecisions,urt,o=>({type:se.Component,decision:o,nonOptimisticDecision:o})),a=t(e.choiceValueDecisions,crt,(o,u)=>({type:se.Choice,values:zd({id:u.choiceValueId,decision:o,nonOptimisticDecision:o})}));return M([...n,...r,...i,...a],pt(o=>[o.key,o]),s_(or,brt,u_))}function wrt(e){const t=(o,u)=>M(o??[],pt(c=>({attributeId:ii(c.attributeId),consequence:c})),pt(({attributeId:c,consequence:f})=>({id:c,key:Lv(c),...u(f)}))),n=t(e.booleanConsequences,o=>({type:se.Boolean,isSatisfied:o.isSatisfied,possibleDecisionStates:o.possibleDecisionStates,selection:u9(o.selection)})),r=t(e.numericConsequences,o=>({type:se.Numeric,isSatisfied:o.isSatisfied,selection:u9(o.selection),range:{max:o.range.max,min:o.range.min},decimalPlaces:o.decimalPlaces})),i=t(e.componentConsequences,o=>({type:se.Component,isSatisfied:o.isSatisfied,possibleDecisionStates:M(o.possibleDecisionStates,pt(rrt)),inclusion:cKn(o.inclusion),selection:o.selection?u9(o.selection):null})),a=t(e.choiceConsequences,o=>({type:se.Choice,isSatisfied:o.isSatisfied,cardinality:{lowerBound:o.cardinality.lowerBound,upperBound:o.cardinality.upperBound},values:M(o.values??[],pt(u=>({id:u.choiceValueId,possibleDecisionStates:M(u.possibleDecisionStates,pt(irt))})))}));return M([...n,...r,...i,...a],pt(o=>[o.key,o]),s_(or,$rt,u_))}function b8n(e){return M((e==null?void 0:e.configurationModels)??[],HE(t=>M(t.globalAttributeIds,pt(n=>({key:Lv(ii(n)),sourceId:{localId:n.localId,configurationModel:t.configurationModelId}})))),pt(t=>[t.key,t]),s_(or,h8n,u_))}function $8n(e,t){const{configuration:n,rawData:r}=_rt(e,t),i=fKn(t.rejectedDecisions);return{configuration:n,rawData:r,result:{rejectedDecisions:i}}}function I8n(e,t){return n=>{if(n.type!=="PutManyDecisionsConflict")return Bt;const r=M(n.constraintExplanations??[],pt(lhe)),i=Rrt(n.decisionExplanations??[],e,t);return nn({type:lt.MakeManyDecisionsConflict,title:n.title??"",detail:n.detail??"",decisionExplanations:i,constraintExplanations:r})}}function _8n(e){const t=Art(e);return n=>({...t(n.decisionExplanations),...Mrt(n.constraintExplanations)})}function Art(e){const t=Ze(e).returnType().with({question:Qr.whyIsStateNotPossible,subject:Nt.boolean},n=>({type:se.Boolean,attributeId:n.attributeId,state:n.state})).with({question:Qr.whyIsStateNotPossible,subject:Nt.numeric},n=>({type:se.Numeric,attributeId:n.attributeId,state:n.state})).with({question:Qr.whyIsStateNotPossible,subject:Nt.component},n=>({type:se.Component,attributeId:n.attributeId,state:n.state})).with({question:Qr.whyIsStateNotPossible,subject:Nt.choiceValue},n=>({type:se.Choice,attributeId:n.attributeId,choiceValueId:n.choiceValueId,state:n.state})).otherwise(()=>null);return n=>({decisionExplanations:Rrt(n,t??[],{type:"KeepExistingDecisions"})})}function Mrt(e){return{constraintExplanations:M(e,pt(lhe))}}function Rrt(e,t,n){return M(e,pt(oKn),pt(r=>{const i=M(r.causedByBooleanDecisions,pt(l=>({type:se.Boolean,attributeId:l.attributeId,state:null}))),a=M(r.causedByNumericDecisions,pt(l=>({type:se.Numeric,attributeId:l.attributeId,state:null}))),o=M(r.causedByComponentDecisions,pt(l=>({type:se.Component,attributeId:l.attributeId,state:null}))),u=M(r.causedByChoiceValueDecisions,pt(l=>({type:se.Choice,attributeId:l.attributeId,choiceValueId:l.choiceValueId,state:null}))),c=M(r.causedByBooleanDecisions,Ll(r.causedByNumericDecisions),Ll(r.causedByComponentDecisions),Ll(r.causedByChoiceValueDecisions)),f=M(i,Ll(a),Ll(o),Ll(u)),s=UW(lrt).concat(f,NB(t));return{causedByDecisions:c,solution:{mode:n,decisions:s}}}))}function Ort(e,t){return M({isSatisfied:t.isSatisfied??e.isSatisfied,canContributeToSatisfaction:t.canContributeToSatisfaction??e.canContributeToSatisfaction,meta:t.meta?v8n.concat(e.meta,t.meta):e.meta,decisions:t.decisions?m8n.concat(e.decisions,t.decisions):e.decisions,consequences:t.consequences?g8n.concat(e.consequences,t.consequences):e.consequences},S8n)}function S8n(e){const t=M(e.decisions,c7e(n=>n.type===se.Choice?M({...n,values:M(n.values,gf(r=>r.decision!=null))},ov(r=>Yn(r.values))):n.decision!=null?nn(n):Bt));return{...e,decisions:t}}function w8n(e){return[...e.decisions.values()].some(t=>{var n;return t.type===se.Choice?t.values.some(r=>{var i;return((i=r.decision)==null?void 0:i.kind)===vt.Explicit}):((n=t.decision)==null?void 0:n.kind)===vt.Explicit})}function A8n(e){const t=(n,r,i)=>r?[{attributeType:n.type,attributeId:n.id,attributeKey:n.key,kind:r.kind,state:r.state,...i}]:[];return M(e.decisions,oN(fl),HE(n=>Ze(n).returnType().with({type:se.Boolean},r=>t(r,r.decision,{})).with({type:se.Numeric},r=>t(r,r.decision,{})).with({type:se.Component},r=>t(r,r.decision,{})).with({type:se.Choice},r=>M(r.values,HE(i=>t(r,i.decision,{choiceValueId:i.id})))).exhaustive()))}function M8n(e){return M(e.decisions,oN(fl),HE(Ert))}function Ert(e){return Ze(e).returnType().with({type:se.Boolean},Se(R8n,_m)).with({type:se.Numeric},Se(O8n,_m)).with({type:se.Component},Se(E8n,_m)).with({type:se.Choice},T8n).exhaustive()}function R8n(e){var t;return((t=e.decision)==null?void 0:t.kind)===vt.Explicit?nn({type:se.Boolean,attributeId:e.id,state:e.decision.state}):Bt}function O8n(e){var t;return((t=e.decision)==null?void 0:t.kind)===vt.Explicit?nn({type:se.Numeric,attributeId:e.id,state:e.decision.state}):Bt}function E8n(e){var t;return((t=e.decision)==null?void 0:t.kind)===vt.Explicit?nn({type:se.Component,attributeId:e.id,state:e.decision.state}):Bt}function T8n(e){return M(e.values,gf(t=>{var n;return((n=t.decision)==null?void 0:n.kind)===vt.Explicit}),pt(t=>({type:se.Choice,attributeId:e.id,choiceValueId:t.id,state:t.decision.state})))}function C8n(e,t){const n=t.decisions.get(Lv(e.attributeId)),r=n?Ert(n):[];return M(r,mf(i=>lrt.equals(i,e)),Df(()=>e.state==null,i=>phe.equals(i,e)))}function P8n(e,t){return vf(e)&&t==="KeepExistingDecisions"}const Trt={Accept:"application/json"};function Crt(e){const t=Nk(e.apiBaseUrl),n=(r,i)=>Jl(()=>r(Bzn(e),{headers:{...Trt,...i??{}}}));return M(Ze(e.sessionInitialisationOptions).with({accessToken:Bi.string},r=>n(t.session.sessionPost,{Authorization:`Bearer ${r.accessToken}`})).with({sessionCreateUrl:Bi.string},r=>n(Dzn(r.sessionCreateUrl))).exhaustive(),$o(r=>({sessionContext:e,sessionId:r.sessionId})),tB(r=>{const i=Jl(()=>t.decision.decisionGetAllDecisions({headers:sI(r)})),a=Jl(()=>t.consequence.consequenceGet({headers:sI(r)})),o=r.sessionContext.provideSourceId??!1?Jl(()=>t.meta.metaGet({headers:sI(r)})):w$(null);return M(x4e(Wze)({decisions:i,consequences:a,meta:o}),$o(u=>y8n(u.decisions,u.consequences,u.meta)),$o(u=>({...r,configuration:u.configuration,configurationRawData:u.rawData})))}))}function Prt(e,t){const n=Vzn(e,t);return r=>{if(P8n(e,t.type))return w$({sessionState:r,result:{rejectedDecisions:[]}});const i=Nk(r.sessionContext.apiBaseUrl);return M(Jl(()=>i.decision.decisionPutMany(n,{headers:sI(r)}),I8n(e,t)),$o(a=>M($8n(r.configuration,a),eN(o=>({sessionState:{...r,configurationRawData:Ort(r.configurationRawData,o.rawData),configuration:o.configuration},result:o.result})))))}}function F8n(e){const t=Lzn(e);return n=>{if(C8n(e,n.configurationRawData))return w$(n);const r=Nk(n.sessionContext.apiBaseUrl);return M(Jl(()=>r.decision.decisionPutDecision(t,{headers:sI(n)})),$o(i=>{const{configuration:a,rawData:o}=_rt(n.configuration,i);return{...n,configuration:a,configurationRawData:Ort(n.configurationRawData,o)}}))}}function W8n(e,t){const n=(i,a,o,u,c)=>{const f=a(i);return(s,l)=>Ze(t).with("decisions",()=>M(Jl(()=>o(s.explain)(f,l)),$o(Art(i)))).with("constraints",()=>M(Jl(()=>u(s.explain)(f,l)),$o(Mrt))).with("full",()=>M(Jl(()=>c(s.explain)(f,l)),$o(_8n(i)))).exhaustive()},r=Ze(e).with({question:Qr.whyIsNotSatisfied},i=>n(i,zzn,a=>a.explainWhyNotSatisfiedDecisions,a=>a.explainWhyNotSatisfiedRules,a=>a.explainWhyNotSatisfied)).with({question:Qr.whyIsStateNotPossible},i=>n(i,Kzn,a=>a.explainWhyStateNotPossibleDecisions,a=>a.explainWhyStateNotPossibleRules,a=>a.explainWhyStateNotPossible)).exhaustive();return i=>{const a=Nk(i.sessionContext.apiBaseUrl);return r(a,{headers:sI(i)})}}function Frt(e){const t=Nk(e.sessionContext.apiBaseUrl);return Jl(()=>t.session.sessionDelete(e.sessionId))}function N8n(e){return t=>Wrt({...t,sessionContext:e})}function Wrt(e){return e.sessionId&&Frt({...e,sessionId:e.sessionId})(),M({...e,sessionId:void 0},eN(t=>M(Nrt(t.sessionContext,t.configurationRawData),iM(n=>({error:n,sessionState:t})))))}function Nrt(e,t){return M(Crt(e),tB(n=>{const r=M8n(t);return Yn(r)?M(n,Prt(r,{type:"DropExistingDecisions",conflictHandling:{type:"Automatic"}}),$o(i=>i.sessionState)):w$(n)}))}function Jl(e,t){return M(wb(e,n=>n),Rue(Oe,Oe),al(n=>{if(n==null||n.data==null&&n.error==null)return Jt({type:lt.ConnectionError});if(n.data!=null)return Gt(n.data);if(n.error!=null){const r=(t==null?void 0:t(n.error))??Bt;if(Qp(r))return Jt(r.value);if(n.error.type!=null&&n.error.title!=null&&n.error.detail!=null)return M(n.error,Gzn,Jt)}return eu.error("Received unknown error format:",n.error),Jt({type:lt.ServerError})}))}function sI(e){return{...Trt,"X-SESSION-ID":e.sessionId}}function j8n(e){return hT(jrt(e))}function k8n(e,t){const n=()=>hT(l_(r=>Ze(r).returnType().with({type:se.Boolean},i=>({...i,decision:null})).with({type:se.Numeric},i=>({...i,decision:null})).with({type:se.Component},i=>({...i,decision:null})).with({type:se.Choice},i=>({...i,values:M(i.values,l_(a=>({...a,decision:null})))})).exhaustive()));return M([t.type==="DropExistingDecisions"?n():Oe,M(e,pt(jrt),hT)],dhe)}function jrt(e){const t=n=>n!=null?{state:n,kind:vt.Explicit}:null;return mrt(Lv(e.attributeId),n=>Ze({attribute:n,decision:e}).returnType().with({attribute:{type:se.Boolean},decision:{type:se.Boolean}},({attribute:r,decision:i})=>({...r,decision:t(i.state)})).with({attribute:{type:se.Numeric},decision:{type:se.Numeric}},({attribute:r,decision:i})=>({...r,decision:t(i.state)})).with({attribute:{type:se.Component},decision:{type:se.Component}},({attribute:r,decision:i})=>({...r,decision:t(i.state)})).with({attribute:{type:se.Choice},decision:{type:se.Choice}},({attribute:r,decision:i})=>({...r,values:M(r.values,l_(a=>({...a,decision:a.id===i.choiceValueId?t(i.state):r.cardinality.upperBound!==1?a.decision:null})))})).otherwise(()=>n))}const U8n=J5({type:lt.SessionNotFound});function jk(e,t,n){return(...r)=>{const i=e(...r),a=t?t(...r):null;return o=>({type:"StateMutating",itemId:yM.guid(),allowSimultaneouslyTermination:n,deferredPromise:bse(),execute:Se(i,iM(u=>({...u,type:"ErrorWithSessionState"}))),optimisticAttributeUpdater:o&&a?M(a,NB,dhe):null})}}function q8n(e){return(...t)=>{const n=e(...t);return{type:"StatePreserving",itemId:yM.guid(),deferredPromise:bse(),execute:Se(n,iM(r=>({type:"PureError",error:r})))}}}function qK(e){return(...t)=>{const n=e(...t);return(r,i)=>Ze(r).with({sessionId:Bi.not(Bi.nullish)},a=>n(a,i)).otherwise(()=>U8n)}}function vhe(e){return(...t)=>{const n=e(...t);return(r,i)=>M(n(r,i),$o(a=>({sessionState:a,result:void 0})))}}function mhe(e){return(...t)=>{const n=e(...t);return(r,i)=>M(n(r,i),iM(a=>({error:a,sessionState:null})))}}const x8n=M(F8n,qK,vhe,mhe,e=>jk(e,j8n,!0)),LU=M(Prt,qK,mhe,e=>jk(e,k8n,!0)),D8n=M(N8n,vhe,e=>jk(e,null,!1)),L8n=M(()=>Wrt,vhe,e=>jk(e,null,!1)),B8n=M(W8n,qK,q8n),V8n=e=>{const t=M(()=>(n,r)=>()=>e&&e.aborted?Promise.reject(e.reason):Promise.resolve(Gt({sessionState:n,result:{pendingTasks:r.queuedWork-1}})),qK,mhe,n=>jk(n,null,!1))()(!1);if(e){const n=()=>{t.deferredPromise.reject(e.reason),e.removeEventListener("abort",n)};e.addEventListener("abort",n)}return t},z8n=e=>{e.forEach(t=>{M(t.result,lE(n=>()=>{t.deferredPromise.resolve(n)}),m2(n=>()=>{t.deferredPromise.reject(n)}))})},K8n=mse(({input:e})=>M(rv(e.run,t=>t),X5,tB(t=>wb(t,n=>n)),al(t=>({workItemId:e.workItemId,result:t})))()),G8n=e=>e.type==="StatePreserving",T_e=e=>e.type==="StateMutating",C_e={type:lt.SessionNotFound},H8n={type:lt.TaskCancelled},J8n=eGe({types:{input:{},context:{},events:{},emitted:{}},guards:{isSessionNotFoundProblem:({},{result:e})=>M(e,As(()=>!1,As(t=>t.error.type==="SessionNotFound",()=>!1)))},actors:{runTask:K8n,createSessionWithData:mse(({input:e})=>Nrt(e.sessionContext,e.configurationRawData)())},actions:{emitState:of(({context:e,enqueue:t})=>{const n=hhe(e.work.filter(T_e).reduce((r,i)=>i.optimisticAttributeUpdater?i.optimisticAttributeUpdater(r):r,e.sessionState.configuration));t.assign({deferredPromiseCompletions:ar}),t.emit({type:"MachineState",sessionState:{...e.sessionState,configuration:n},deferredPromiseCompletions:e.deferredPromiseCompletions})}),spawnWork:of(({context:e,enqueue:t})=>{const n=M(e.work,V6,Nr(i=>M(i,io,ov(T_e),Nr(zd),_c(()=>M(i,KG(G8n))))),_c(()=>ar)),r={queuedWork:e.work.length,currentlyRunningWork:n.length};n.forEach(i=>{aN(Ge)(i.itemId,e.runningWork)||t.assign({workExecutionAttemptAmount:({context:a})=>M(a.workExecutionAttemptAmount,$vn(Ge)(i.itemId,()=>1,o=>o+1)),runningWork:({context:a,spawn:o})=>M(a.runningWork,AB(Ge)(i.itemId,o("runTask",{input:{workItemId:i.itemId,run:()=>i.execute(a.sessionState,r)}})))})})}),answerAndRemoveWork:of(({context:e,enqueue:t},n)=>{const r=M(e.work,mf(i=>i.itemId===n.workItemId),f_);t.assign({work:({context:i})=>M(i.work,gf(a=>a.itemId!==n.workItemId)),runningWork:({context:i})=>M(i.runningWork,XE(Ge)(n.workItemId)),workExecutionAttemptAmount:({context:i})=>M(i.workExecutionAttemptAmount,XE(Ge)(n.workItemId))}),r&&t.assign({deferredPromiseCompletions:({context:i})=>M(i.deferredPromiseCompletions,Sb({deferredPromise:r.deferredPromise,result:n.result}))})}),cancelAllRunningWork:of(({context:e,enqueue:t})=>{e.runningWork.size>0&&t(nE(`Cancelling ${e.runningWork.size} running work${e.runningWork.size!==1?"s":""}`)),e.runningWork.forEach(n=>{t.stopChild(n)}),t.assign({runningWork:Io})})}}).createMachine({context:({input:e})=>({sessionState:e.sessionState,work:ar,runningWork:Io,workExecutionAttemptAmount:Io,deferredPromiseCompletions:ar}),entry:["emitState"],on:{EnqueueWork:{actions:[I_({work:({context:e,event:t})=>Sb(t.workItem)(e.work)}),"emitState"]},Shutdown:{target:"#shutdown"}},initial:"processing",states:{processing:{always:{actions:["spawnWork"]},on:{"xstate.done.actor.*":[{target:"restoreSession",guard:{type:"isSessionNotFoundProblem",params:({event:e})=>e.output},actions:[nE("Work resulted in SessionNotFound"),"cancelAllRunningWork",of(({enqueue:e,event:t})=>{const{result:n}=t.output;M(n,lE(r=>()=>M(r,m2(i=>()=>{i.type==="ErrorWithSessionState"&&i.sessionState&&e.assign({sessionState:i.sessionState})}))))})]},{actions:[of(({context:e,enqueue:t,event:n})=>{const r=n.output,i=M(e.work,mf(o=>o.itemId===r.workItemId),f_),a=e.runningWork.get(r.workItemId);if(i&&a&&n.actorId===a.id)if(et(r.result))t({type:"answerAndRemoveWork",params:{workItemId:i.itemId,result:Jt(r.result.left)}});else{const o=r.result.right;if(i.type==="StateMutating"){const u=o;M(u,lE(c=>()=>{t.assign({sessionState:c.sessionState})}),m2(c=>()=>{c.sessionState&&t.assign({sessionState:c.sessionState})})),t({type:"answerAndRemoveWork",params:{workItemId:i.itemId,result:M(u,gA(c=>c.result),i_(c=>c.error))}})}else{const u=o;t({type:"answerAndRemoveWork",params:{workItemId:i.itemId,result:M(u,i_(c=>c.error))}})}}t("emitState")})]}]}},restoreSession:{entry:[I_({sessionState:({context:e})=>({...e.sessionState,sessionId:void 0})}),of(({context:e,enqueue:t})=>{M(e.workExecutionAttemptAmount,wfe(n=>n>1),Yg(fl)).forEach(n=>{t({type:"answerAndRemoveWork",params:{workItemId:n,result:Jt(C_e)}})})}),"emitState"],invoke:{src:"createSessionWithData",input:({context:e})=>e.sessionState,onDone:{target:"processing",actions:[of(({context:e,event:t,enqueue:n})=>{M(t.output,lE(r=>()=>{n.assign({sessionState:r})}),m2(r=>()=>{n(nE("Can't restore session because of error: "+JSON.stringify(r))),M(e.work,KG(i=>i.type==="StatePreserving"||i.allowSimultaneouslyTermination)).forEach(i=>{n({type:"answerAndRemoveWork",params:{workItemId:i.itemId,result:Jt(C_e)}})})}))}),"emitState"]},onError:{target:"processing",actions:[nE("An unexpected error occurred while trying to restore the session.")]}}},shutdown:{type:"final",id:"shutdown",entry:["cancelAllRunningWork",of(({context:e,enqueue:t})=>{const n=Jt(H8n);if(e.work.forEach(r=>{t({type:"answerAndRemoveWork",params:{workItemId:r.itemId,result:n}})}),e.sessionState.sessionId){const r={...e.sessionState,sessionId:e.sessionState.sessionId};t(()=>{Frt(r)().then(()=>{},()=>{})})}}),"emitState"]}}});function Y8n(e){return g_(J8n,{input:{sessionState:e}})}const{summon:$1}=fhe({}),xK=$1(e=>e.interface({localId:e.string(),componentPath:e.optional(e.array(e.string())),sharedConfigurationModelId:e.optional(e.string())},"GlobalAttributeId")),Z8n=$1(e=>e.interface({type:e.stringLiteral("Numeric"),attributeId:xK(e),state:e.number()},"NumericDecision")),X8n=$1(e=>e.interface({type:e.stringLiteral("Boolean"),attributeId:xK(e),state:e.boolean()},"NumericDecision")),Q8n=$1(e=>e.interface({type:e.stringLiteral("Choice"),attributeId:xK(e),choiceValueId:e.string(),state:e.keysOf({Included:null,Excluded:null})},"ChoiceDecision")),e7n=$1(e=>e.interface({type:e.stringLiteral("Component"),attributeId:xK(e),state:e.keysOf({Included:null,Excluded:null})},"ComponentDecision")),t7n=$1(e=>e.taggedUnion("type",{Numeric:Z8n(e),Boolean:X8n(e),Choice:Q8n(e),Component:e7n(e)},"Decision")),n7n=$1(e=>e.interface({schemaVersion:e.numberLiteral(1),explicitDecisions:e.array(t7n(e))},"StoredConfigurationV1")),{summon:r7n}=fhe({}),i7n=r7n(e=>e.taggedUnion("type",{1:n7n(e)},"StoredConfiguration"));function a7n(e){return{schemaVersion:1,explicitDecisions:M(e,pt(t=>{const n={localId:t.attributeId.localId,componentPath:t.attributeId.componentPath!=null&&Yn(t.attributeId.componentPath)?t.attributeId.componentPath:void 0,sharedConfigurationModelId:t.attributeId.sharedConfigurationModelId??void 0};return Ze(t).returnType().with({attributeType:se.Numeric},r=>({type:"Numeric",attributeId:n,state:r.state})).with({attributeType:se.Boolean},r=>({type:"Boolean",attributeId:n,state:r.state})).with({attributeType:se.Component},r=>({type:"Component",attributeId:n,state:Ze(r.state).returnType().with(Pt.Included,()=>"Included").with(Pt.Excluded,()=>"Excluded").exhaustive()})).with({attributeType:se.Choice},r=>({type:"Choice",attributeId:n,choiceValueId:r.choiceValueId,state:Ze(r.state).returnType().with(Ct.Included,()=>"Included").with(Ct.Excluded,()=>"Excluded").exhaustive()})).exhaustive()}))}}function o7n(e){return et(i7n.create(e))?Jt({type:lt.StoredConfigurationInvalid}):M(e.explicitDecisions,pt(t=>{const n={localId:t.attributeId.localId,componentPath:t.attributeId.componentPath!=null&&Yn(t.attributeId.componentPath)?t.attributeId.componentPath:void 0,sharedConfigurationModelId:t.attributeId.sharedConfigurationModelId??void 0};return Ze(t).returnType().with({type:"Numeric"},r=>({type:se.Numeric,attributeId:n,state:r.state})).with({type:"Boolean"},r=>({type:se.Boolean,attributeId:n,state:r.state})).with({type:"Component"},r=>({type:se.Component,attributeId:n,state:Ze(r.state).with("Included",()=>Pt.Included).with("Excluded",()=>Pt.Excluded).exhaustive()})).with({type:"Choice"},r=>({type:se.Choice,attributeId:n,choiceValueId:r.choiceValueId,state:Ze(r.state).with("Included",()=>Ct.Included).with("Excluded",()=>Ct.Excluded).exhaustive()})).exhaustive()}),Gt)}let krt=class{constructor(t){this.previousValue=null,this.currentValue=null,this.calculateChangeSetFn=jp(t)}setValue(t){this.currentValue=t}clearChanges(){this.previousValue=this.currentValue}getChanges(){return this.calculateChangeSetFn(this.previousValue,this.currentValue)}},N1=class{constructor(t){this.listeners=new Map,this.currentValue=null,this.calculateChangeSetFn=jp(t),this.changesHandler=new krt(t)}addListener(t){const n=yM.guid();this.listeners.set(n,t);const r=this.calculateChangeSetFn(null,this.currentValue);return Qp(r)&&t(...r.value),{unsubscribe:()=>{this.listeners.delete(n)}}}notifyListeners(t){if(this.currentValue=t,this.changesHandler.setValue(t),this.listeners.size>0){const n=this.changesHandler.getChanges();Qp(n)&&this.listeners.forEach(r=>r(...n.value))}this.changesHandler.clearChanges()}unsubscribeAllListeners(){this.listeners.clear()}};const Urt={isSatisfied:null,attributes:{added:[],changed:[],removed:[]}};function u7n(e){return a8n.equals(Urt,e)}function c7n(e){return(t,n)=>{const r=t?e(t):null,i=n?e(n):null;return i!=null&&i!==r?nn([i]):Bt}}function f7n(e,t){const n=Yg(fl);if(t==null)return Bt;const r=(e==null?void 0:e.attributes)??Io,i=M([...n(t.attributes),...n(r)],wBe(or)),a=[],o=[],u=[];return i.forEach(c=>{const f=t.attributes.get(c),s=r.get(c);f!=null&&s==null&&a.push(f),f==null&&s!=null&&u.push(s.id),f!=null&&s!=null&&f.hash!=s.hash&&o.push(f)}),M({isSatisfied:t.isSatisfied!=(e==null?void 0:e.isSatisfied)?t.isSatisfied:null,attributes:{added:a,changed:o,removed:u}},ov(c_(u7n)),Nr(c=>[t,c]))}function s7n(e){return qrt(e)}function s9(e){return qrt(e)}function qrt(e){return(t,n)=>{if(n==null||t===n)return Bt;const r=e(n);return nn([r])}}let l7n=class{constructor(t){this.canResetConfigurationMemo=jp(w8n,{maxSize:5}),this.calculateConfigurationChangedHandlerMemo=jp(f7n,{maxSize:5}),this.getCollectedDecisionsMemo=jp(A8n),this.getCollectedImplicitDecisionsMemo=jp(Se(this.getCollectedDecisionsMemo.bind(this),gf(Uzn))),this.getCollectedExplicitDecisionsMemo=jp(Se(this.getCollectedDecisionsMemo.bind(this),gf(kzn))),this.getStoredConfigurationMemo=jp(Se(this.getCollectedExplicitDecisionsMemo.bind(this),a7n)),this.sessionChangesHandler=new krt(this.calculateConfigurationChangedHandlerMemo.bind(this)),this.configurationChangedSubscriptionHandler=new N1(this.calculateConfigurationChangedHandlerMemo.bind(this)),this.canResetConfigurationSubscriptionHandler=new N1(c7n(this.canResetConfigurationMemo.bind(this))),this.storedConfigurationSubscriptionHandler=new N1(s7n(this.getStoredConfigurationMemo.bind(this))),this.decisionsSubscriptionHandler=new N1(s9(this.getCollectedDecisionsMemo.bind(this))),this.explicitDecisionsSubscriptionHandler=new N1(s9(this.getCollectedExplicitDecisionsMemo.bind(this))),this.implicitDecisionsSubscriptionHandler=new N1(s9(this.getCollectedImplicitDecisionsMemo.bind(this))),this.hashedConfigurationInputHandler=[this.sessionChangesHandler.setValue.bind(this.sessionChangesHandler),this.configurationChangedSubscriptionHandler.notifyListeners.bind(this.configurationChangedSubscriptionHandler)],this.rawDataInputHandlers=[this.canResetConfigurationSubscriptionHandler,this.storedConfigurationSubscriptionHandler,this.decisionsSubscriptionHandler,this.explicitDecisionsSubscriptionHandler,this.implicitDecisionsSubscriptionHandler],this.sessionState=null,this.handleActorUpdate({sessionState:t,deferredPromiseCompletions:ar}),this.actor=Y8n(t),this.subscription=this.actor.on("MachineState",n=>{this.handleActorUpdate(n)}),this.actor.start()}getDecisions(t,n){const r=o=>(this.throwIfSessionClosed(),Ze(o).with(vt.Explicit,()=>this.getCollectedExplicitDecisionsMemo.bind(this)).with(vt.Implicit,()=>this.getCollectedImplicitDecisionsMemo.bind(this)).with(Bi.nullish,()=>this.getCollectedDecisionsMemo.bind(this)).exhaustive()(this.sessionState.configurationRawData)),i=typeof t=="string"?t:void 0,a=typeof t=="boolean"?t:n;return this.executeMaybeQueued(a===!0,()=>r(i))}async storeConfiguration(){return this.executeMaybeQueued(!0,()=>(this.throwIfSessionClosed(),this.getStoredConfigurationMemo(this.sessionState.configurationRawData)))}async restoreConfiguration(t,n){var r;this.throwIfSessionClosed();const i=o7n(t);if(et(i))throw i.left;const a=M(LU(i.right,n),Fp(((r=this.sessionState.sessionContext.optimisticDecisionOptions)==null?void 0:r.restoreConfiguration)??!1));return this.actor.send({type:"EnqueueWork",workItem:a}),await a.deferredPromise.promise}canResetConfiguration(t){return this.executeMaybeQueued(t===!0,()=>(this.throwIfSessionClosed(),this.canResetConfigurationMemo(this.sessionState.configurationRawData)))}async resetConfiguration(){var t;this.throwIfSessionClosed();const n=M(LU([],{type:"DropExistingDecisions",conflictHandling:{type:"Automatic"}}),Fp(((t=this.sessionState.sessionContext.optimisticDecisionOptions)==null?void 0:t.resetConfiguration)??!1));this.actor.send({type:"EnqueueWork",workItem:n}),await n.deferredPromise.promise}addConfigurationChangedListener(t){return this.throwIfSessionClosed(),this.configurationChangedSubscriptionHandler.addListener(t)}addCanResetConfigurationChangedListener(t){return this.throwIfSessionClosed(),this.canResetConfigurationSubscriptionHandler.addListener(t)}addStoredConfigurationChangedListener(t){return this.throwIfSessionClosed(),this.storedConfigurationSubscriptionHandler.addListener(t)}addDecisionsChangedListener(t,n){this.throwIfSessionClosed();const r=typeof t=="string"?t:void 0,i=typeof t!="string"?t:n;if(i==null)throw new Error("The handler is null or undefined");return r===vt.Explicit?this.explicitDecisionsSubscriptionHandler.addListener(i):r===vt.Implicit?this.implicitDecisionsSubscriptionHandler.addListener(i):this.decisionsSubscriptionHandler.addListener(i)}getSessionContext(t){return this.executeMaybeQueued(t===!0,()=>(this.throwIfSessionClosed(),this.sessionState.sessionContext))}getConfiguration(t){return this.executeMaybeQueued(t===!0,()=>(this.throwIfSessionClosed(),this.sessionState.configuration))}getConfigurationChanges(){return this.throwIfSessionClosed(),M(this.sessionChangesHandler.getChanges(),Nr(Ka),_c(()=>Urt))}clearConfigurationChanges(){this.throwIfSessionClosed(),this.sessionChangesHandler.clearChanges()}async makeDecision(t){var n;this.throwIfSessionClosed();const r=M(t,x8n,Fp(((n=this.sessionState.sessionContext.optimisticDecisionOptions)==null?void 0:n.makeDecision)??!0));this.actor.send({type:"EnqueueWork",workItem:r}),await r.deferredPromise.promise}async applySolution(t){var n;this.throwIfSessionClosed();const r=M(LU(t.decisions,t.mode),Fp(((n=this.sessionState.sessionContext.optimisticDecisionOptions)==null?void 0:n.applySolution)??!0));return this.actor.send({type:"EnqueueWork",workItem:r}),await r.deferredPromise.promise}setMany(t,n){return this.makeManyDecisions(t,n)}async makeManyDecisions(t,n){var r;this.throwIfSessionClosed();const i=M(LU(t,n),Fp(((r=this.sessionState.sessionContext.optimisticDecisionOptions)==null?void 0:r.makeManyDecisions)??!0));return this.actor.send({type:"EnqueueWork",workItem:i}),await i.deferredPromise.promise}async setSessionContext(t){this.throwIfSessionClosed();const n=M(t,D8n,Fp(!1));this.actor.send({type:"EnqueueWork",workItem:n}),await n.deferredPromise.promise}async reinitialize(){this.throwIfSessionClosed();const t=M(L8n(),Fp(!1));this.actor.send({type:"EnqueueWork",workItem:t}),await t.deferredPromise.promise}async explain(t,n){this.throwIfSessionClosed();const r=typeof t=="function"?t(Znt):t,i=B8n(r,n);return this.actor.send({type:"EnqueueWork",workItem:i}),await i.deferredPromise.promise}async close(){this.actor.getSnapshot().status==="active"&&(this.subscription.unsubscribe(),this.actor.send({type:"Shutdown"}),await cbn(this.actor,t=>t.status!=="active"),this.configurationChangedSubscriptionHandler.unsubscribeAllListeners())}async scheduleTask(t){this.throwIfSessionClosed();const n=V8n(t);return this.actor.send({type:"EnqueueWork",workItem:n}),await n.deferredPromise.promise}executeMaybeQueued(t,n,r){return this.throwIfSessionClosed(),t?this.scheduleTask(r).then(()=>n()):n()}handleActorUpdate(t){this.sessionState=t.sessionState,this.hashedConfigurationInputHandler.forEach(n=>n(this.sessionState.configuration)),this.rawDataInputHandlers.forEach(n=>n.notifyListeners(this.sessionState.configurationRawData)),z8n(t.deferredPromiseCompletions)}throwIfSessionClosed(){if(this.actor.getSnapshot().status!=="active")throw{type:lt.SessionClosed}}};const d7n={async createSession(e){return M(Crt(e),$o(t=>new l7n(t)),Y4e(As(t=>()=>Promise.reject(t),t=>()=>Promise.resolve(t))))()}};let p7n=0;function gn(e,t){const n=`atom${++p7n}`,r={toString(){return n}};return typeof e=="function"?r.read=e:(r.init=e,r.read=h7n,r.write=v7n),t&&(r.write=t),r}function h7n(e){return e(this)}function v7n(e,t,n){return t(this,typeof n=="function"?n(e(this)):n)}const P_e=(e,t)=>e.unstable_is?e.unstable_is(t):t===e,F_e=e=>"init"in e,W_e=e=>!!e.write,Uq=new WeakMap,MH=e=>{var t;return RH(e)&&!((t=Uq.get(e))!=null&&t[1])},m7n=(e,t)=>{const n=Uq.get(e);n&&(n[1]=!0,n[0].forEach(r=>r(t)))},g7n=e=>{if(Uq.has(e))return;const t=[new Set,!1];Uq.set(e,t);const n=()=>{t[1]=!0};e.then(n,n),e.onCancel=r=>{t[0].add(r)}},RH=e=>typeof(e==null?void 0:e.then)=="function",N_e=e=>"v"in e||"e"in e,BU=e=>{if("e"in e)throw e.e;return e.v},xrt=(e,t,n)=>{n.p.has(e)||(n.p.add(e),t.then(()=>{n.p.delete(e)},()=>{n.p.delete(e)}))},j_e=(e,t,n,r,i)=>{var a;n.d.set(r,i.n),MH(n.v)&&xrt(t,n.v,i),(a=i.m)==null||a.t.add(t),e&&y7n(e,r,t)},XO=()=>[new Map,new Map,new Set],k_e=(e,t,n)=>{e[0].has(t)||e[0].set(t,new Set),e[1].set(t,n)},y7n=(e,t,n)=>{const r=e[0].get(t);r&&r.add(n)},b7n=(e,t)=>e[0].get(t),U_e=(e,t)=>{e[2].add(t)},j1=e=>{for(;e[1].size||e[2].size;){e[0].clear();const t=new Set(e[1].values());e[1].clear();const n=new Set(e[2]);e[2].clear(),t.forEach(r=>{var i;return(i=r.m)==null?void 0:i.l.forEach(a=>a())}),n.forEach(r=>r())}},Drt=e=>{let t;const n=(h,$,b)=>{const y="v"in $,m=$.v,g=MH($.v)?$.v:null;if(RH(b)){g7n(b);for(const _ of $.d.keys())xrt(h,b,e(_,$));$.v=b,delete $.e}else $.v=b,delete $.e;(!y||!Object.is(m,$.v))&&(++$.n,g&&m7n(g,b))},r=(h,$,b,y)=>{var m;if(N_e(b)&&(b.m&&!(y!=null&&y.has($))||Array.from(b.d).every(([N,U])=>r(h,N,e(N,b),y).n===U)))return b;b.d.clear();let g=!0;const _=N=>{if(P_e($,N)){const te=e(N,b);if(!N_e(te))if(F_e(N))n(N,te,N.init);else throw new Error("no atom init");return BU(te)}const U=r(h,N,e(N,b),y);if(g)j_e(h,$,b,N,U);else{const te=XO();j_e(te,$,b,N,U),f(te,$,b),j1(te)}return BU(U)};let I,A;const E={get signal(){return I||(I=new AbortController),I.signal},get setSelf(){return!A&&W_e($)&&(A=(...N)=>{if(!g)return c($,...N)}),A}};try{const N=$.read(_,E);if(n($,b,N),RH(N)){(m=N.onCancel)==null||m.call(N,()=>I==null?void 0:I.abort());const U=()=>{if(b.m){const te=XO();f(te,$,b),j1(te)}};N.then(U,U)}return b}catch(N){return delete b.v,b.e=N,++b.n,b}finally{g=!1}},i=h=>BU(r(void 0,h,e(h))),a=(h,$,b)=>{var y,m;const g=new Map;for(const _ of((y=b.m)==null?void 0:y.t)||[])g.set(_,e(_,b));for(const _ of b.p)g.set(_,e(_,b));return(m=b7n(h,$))==null||m.forEach(_=>{g.set(_,e(_,b))}),g},o=(h,$,b)=>{const y=[],m=new Set,g=(I,A)=>{if(!m.has(I)){m.add(I);for(const[E,N]of a(h,I,A))I!==E&&g(E,N);y.push([I,A,A.n])}};g($,b);const _=new Set([$]);for(let I=y.length-1;I>=0;--I){const[A,E,N]=y[I];let U=!1;for(const te of E.d.keys())if(te!==A&&_.has(te)){U=!0;break}U&&(r(h,A,E,m),f(h,A,E),N!==E.n&&(k_e(h,A,E),_.add(A))),m.delete(A)}},u=(h,$,b,...y)=>{const m=I=>BU(r(h,I,e(I,b))),g=(I,...A)=>{const E=e(I,b);let N;if(P_e($,I)){if(!F_e(I))throw new Error("atom not writable");const U="v"in E,te=E.v,Ie=A[0];n(I,E,Ie),f(h,I,E),(!U||!Object.is(te,E.v))&&(k_e(h,I,E),o(h,I,E))}else N=u(h,I,E,...A);return j1(h),N};return $.write(m,g,...y)},c=(h,...$)=>{const b=XO(),y=u(b,h,e(h),...$);return j1(b),y},f=(h,$,b)=>{if(b.m&&!MH(b.v)){for(const y of b.d.keys())b.m.d.has(y)||(s(h,y,e(y,b)).t.add($),b.m.d.add(y));for(const y of b.m.d||[])if(!b.d.has(y)){b.m.d.delete(y);const m=l(h,y,e(y,b));m==null||m.t.delete($)}}},s=(h,$,b)=>{if(!b.m){r(h,$,b);for(const y of b.d.keys())s(h,y,e(y,b)).t.add($);if(b.m={l:new Set,d:new Set(b.d.keys()),t:new Set},W_e($)&&$.onMount){const y=b.m,{onMount:m}=$;U_e(h,()=>{const g=m((..._)=>u(h,$,b,..._));g&&(y.u=g)})}}return b.m},l=(h,$,b)=>{if(b.m&&!b.m.l.size&&!Array.from(b.m.t).some(y=>{var m;return(m=e(y,b).m)==null?void 0:m.d.has($)})){const y=b.m.u;y&&U_e(h,y),delete b.m;for(const m of b.d.keys()){const g=l(h,m,e(m,b));g==null||g.t.delete($)}return}return b.m};return{get:i,set:c,sub:(h,$)=>{const b=XO(),y=e(h),m=s(b,h,y);j1(b);const g=m.l;return g.add($),()=>{g.delete($);const _=XO();l(_,h,y),j1(_)}},unstable_derive:h=>Drt(...h(e))}},Lrt=()=>{const e=new WeakMap;return Drt(n=>{let r=e.get(n);return r||(r={d:new Map,p:new Set,n:0},e.set(n,r)),r})};let l9;const Brt=()=>(l9||(l9=Lrt()),l9),Vrt=pe.createContext(void 0),zrt=e=>{const t=pe.useContext(Vrt);return(e==null?void 0:e.store)||t||Brt()},$7n=({children:e,store:t})=>{const n=pe.useRef();return!t&&!n.current&&(n.current=Lrt()),pe.createElement(Vrt.Provider,{value:t||n.current},e)},OH=e=>typeof(e==null?void 0:e.then)=="function",Krt=e=>{e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t})},I7n=pe.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(Krt(e),e)}),d9=new WeakMap,q_e=e=>{let t=d9.get(e);return t||(t=new Promise((n,r)=>{let i=e;const a=c=>f=>{i===c&&n(f)},o=c=>f=>{i===c&&r(f)},u=c=>{"onCancel"in c&&typeof c.onCancel=="function"&&c.onCancel(f=>{OH(f)?(d9.set(f,t),i=f,f.then(a(f),o(f)),u(f)):n(f)})};e.then(a(e),o(e)),u(e)}),d9.set(e,t)),t};function ghe(e,t){const n=zrt(t),[[r,i,a],o]=pe.useReducer(f=>{const s=n.get(e);return Object.is(f[0],s)&&f[1]===n&&f[2]===e?f:[s,n,e]},void 0,()=>[n.get(e),n,e]);let u=r;(i!==n||a!==e)&&(o(),u=n.get(e));const c=t==null?void 0:t.delay;if(pe.useEffect(()=>{const f=n.sub(e,()=>{if(typeof c=="number"){const s=n.get(e);OH(s)&&Krt(q_e(s)),setTimeout(o,c);return}o()});return o(),f},[n,e,c]),pe.useDebugValue(u),OH(u)){const f=q_e(u);return I7n(f)}return u}function yhe(e,t){const n=zrt(t);return pe.useCallback((...i)=>n.set(e,...i),[n,e])}function VU(e,t){return[ghe(e,t),yhe(e,t)]}var _7n=function(e,t,n){var r=pe.useRef(),i=pe.useRef(0);return r.current==null&&(r.current=e),t.equals(e,r.current)||(n&&n.debug&&process.env.NODE_ENV!=="production"&&console.info("Stable hook update triggered:",{prev:r.current,value:e}),r.current=e,i.current+=1),[i.current]},S7n=function(e,t,n,r){return pe.useMemo(e,_7n(t,n,r))};function X1(e,t){let n=null;const r=new Map,i=new Set,a=u=>{let c;if(t===void 0)c=r.get(u);else for(const[s,l]of r)if(t(s,u)){c=l;break}if(c!==void 0)if(n!=null&&n(c[1],u))a.remove(u);else return c[0];const f=e(u);return r.set(u,[f,Date.now()]),o("CREATE",u,f),f};function o(u,c,f){for(const s of i)s({type:u,param:c,atom:f})}return a.unstable_listen=u=>(i.add(u),()=>{i.delete(u)}),a.getParams=()=>r.keys(),a.remove=u=>{if(t===void 0){if(!r.has(u))return;const[c]=r.get(u);r.delete(u),o("REMOVE",u,c)}else for(const[c,[f]]of r)if(t(c,u)){r.delete(c),o("REMOVE",c,f);break}},a.setShouldRemove=u=>{if(n=u,!!n)for(const[c,[f,s]]of r)n(s,c)&&(r.delete(c),o("REMOVE",c,f))},a}const p9=(e,t,n)=>(t.has(n)?t:t.set(n,e())).get(n),w7n=new WeakMap,A7n=(e,t,n,r)=>{const i=p9(()=>new WeakMap,w7n,t),a=p9(()=>new WeakMap,i,n);return p9(e,a,r)};function Grt(e,t,n=Object.is){return A7n(()=>{const r=Symbol(),i=([o,u])=>{if(u===r)return t(o);const c=t(o,u);return n(u,c)?u:c},a=gn(o=>{const u=o(a),c=o(e);return i([c,u])});return a.init=r,a},e,t,n)}const M7n=e=>typeof(e==null?void 0:e.then)=="function";function R7n(e=()=>{try{return window.localStorage}catch{return}},t){var n;let r,i;const a={getItem:(c,f)=>{var s,l;const d=v=>{if(v=v||"",r!==v){try{i=JSON.parse(v,t==null?void 0:t.reviver)}catch{return f}r=v}return i},p=(l=(s=e())==null?void 0:s.getItem(c))!=null?l:null;return M7n(p)?p.then(d):d(p)},setItem:(c,f)=>{var s;return(s=e())==null?void 0:s.setItem(c,JSON.stringify(f,t==null?void 0:t.replacer))},removeItem:c=>{var f;return(f=e())==null?void 0:f.removeItem(c)}},o=c=>(f,s,l)=>c(f,d=>{let p;try{p=JSON.parse(d||"")}catch{p=l}s(p)});let u;try{u=(n=e())==null?void 0:n.subscribe}catch{}return!u&&typeof window<"u"&&typeof window.addEventListener=="function"&&window.Storage&&(u=(c,f)=>{if(!(e()instanceof window.Storage))return()=>{};const s=l=>{l.storageArea===e()&&l.key===c&&f(l.newValue)};return window.addEventListener("storage",s),()=>{window.removeEventListener("storage",s)}}),u&&(a.subscribe=o(u)),a}R7n();function DK(e){const t=gn(()=>({mounted:!1,inProgress:0,promise:void 0,cleanup:void 0,fromCleanup:!1,recursing:!1,refresh:()=>{},refreshing:!1,get:()=>{},set:()=>{},pendingError:null})),n=gn(0),r=gn(null,(a,o)=>{const u=a(t);return u.mounted=!0,u.get=a,u.set=o,u.refresh=()=>{try{u.refreshing=!0,o(n,c=>c+1)}finally{u.refreshing=!1}},o(n,c=>c+1),()=>{u.mounted=!1,x_e(u),u.cleanup==null||u.cleanup(),u.cleanup=void 0}});r.onMount=a=>a();const i=gn(a=>{a(n);const o=a(t);if(!o.mounted||o.recursing||o.inProgress&&!o.refreshing)return o.promise;x_e(o);const u=new Map,c=l=>{const d=a(l);return u.set(l,d),d};c.peek=l=>o.get(l);const f=(...l)=>{try{return++o.inProgress,o.set(...l)}finally{Array.from(u.keys(),a),--o.inProgress}};f.recurse=(l,...d)=>{if(o.fromCleanup)process.env.NODE_ENV!=="production"&&console.warn("cannot recurse inside cleanup");else try{return o.recursing=!0,o.set(l,...d)}finally{o.recursing=!1,Array.from(u).some(([p,v])=>a(p)!==v)&&o.refresh()}},++o.inProgress;const s=()=>{try{if(o.refreshing=!1,!o.mounted)return;try{o.fromCleanup=!0,o.cleanup==null||o.cleanup()}finally{o.fromCleanup=!1}o.cleanup=e(c,f)}catch(l){o.pendingError=l,o.refresh()}finally{o.promise=void 0,--o.inProgress}};return o.refreshing?s():o.promise=Promise.resolve().then(s)});return process.env.NODE_ENV!=="production"&&(t.debugPrivate=!0,n.debugPrivate=!0,r.debugPrivate=!0,i.debugPrivate=!0),gn(a=>{a(r),a(i)})}function x_e(e){if(e.pendingError!==null){const t=e.pendingError;throw e.pendingError=null,t}}const O7n=Symbol();function E7n(e,t){const n=gn(null);process.env.NODE_ENV!=="production"&&(n.debugPrivate=!0);const r=gn(f=>{const s=f(n);if(s)return s;let l=!0;const d=(...E)=>{if(l)return f(...E);throw new Error("get not allowed after initialization")},p=D_e(e)?e(d):e,v=D_e(t)?t(d):t;l=!1;const{guards:h,actions:$,actors:b,delays:y,context:m,...g}=v||{},_={guards:h??{},actions:$??{},actors:b??{},delays:y??{},context:m??{}},I=p.provide({..._}),A=g_(I,g);return{machine:I,actor:A}},(f,s)=>{s(n,f(r)),s(o)});r.onMount=f=>{f()};const i=gn(null);process.env.NODE_ENV!=="production"&&(i.debugPrivate=!0);const a=gn(null),o=gn(f=>{const s=f(a);return s||{unsubscribe(){}}},(f,s)=>{const l=f(o);l&&l.unsubscribe();const{actor:d}=f(r),p=d.subscribe(v=>{s(i,v)});s(a,p)}),u=gn(f=>{var s;return f(o),(s=f(i))!==null&&s!==void 0?s:f(r).actor.getSnapshot()},(f,s,l)=>{const{actor:d}=f(r);d.start(),l(()=>{const{actor:p}=f(r);p.stop(),s(a,null),s(i,null),s(n,null)})});return u.onMount=f=>{let s;return f(l=>{s===!1?l():s=l}),()=>{s&&s(),s=!1}},process.env.NODE_ENV!=="production"&&(u.debugPrivate=!0),process.env.NODE_ENV!=="production"&&(u.debugPrivate=!0),gn(f=>f(u),(f,s,l)=>{const{actor:d}=f(r);if(l===O7n){d.stop(),s(a,null),s(i,null),s(n,null),s(r),s(o);const{actor:p}=f(r);p.start()}else d.send(l)})}const D_e=e=>typeof e=="function",Vl="ConfigurationUninitialized";function yp(e){return gn(t=>{try{return e(t,r=>{const i=t(r);if(i===Vl)throw Vl;return i})??Vl}catch(n){if(n===Vl)return Vl;throw n}})}function L_e(e){const{guardedConfigurationAtom:t,guardedAttributesAtom:n}=e;function r(i,a){const o=i==="all"?"all":M(i,pt(u=>typeof u=="string"?u:Lv(u)));return yp((u,c)=>{if(o==="all")return M(t,c,s=>s.attributes,oN(fl));const f=c(n);return M(o,pt(s=>u(f(s))),a?y5(pc):Oe)})}return r}const bhe=window.configuratorReactContexts??{AtomsContext:pe.createContext(null),StoreContext:pe.createContext(Brt())};window.configuratorReactContexts=bhe;const Hrt=bhe.AtomsContext,Jrt=bhe.StoreContext,LK=()=>pe.useContext(Hrt),$he=()=>pe.useContext(Jrt);function Ihe(e,t,n){const r=bA(zn(sr),n);return(i,...a)=>{const o=LK(),u=$he(),c=yhe(o.selectors.subscriberAtom,{store:u}),f=S7n(()=>i??!0?t(o,...a):e(o,...a),[i,a],r),s=pe.useMemo(()=>c(f),[c,f]);return pe.useEffect(()=>()=>{s.unsubscribe()},[s]),ghe(f,{store:u})}}function ef(e,t){const n=Ihe(i=>e(i.selectors),i=>t(i.suspended),bA());function r(i){return n(i)}return r}function BK(e,t){const n=Ihe((i,a)=>e(i.selectors)(a),(i,a)=>t(i.suspended)(a),bA(Ge));function r(i,a){const o=pe.useMemo(()=>typeof i=="string"?i:Lv(i),[i]);return n(a,o)}return r}function pa(e){const t=Grt(e,(n,r)=>{if(n!==Vl)return(r==null?void 0:r.deferredPromise)!=null?(r.deferredPromise.resolve(n),{deferredPromise:null,result:r.deferredPromise.promise}):{deferredPromise:null,result:n};const i=(r==null?void 0:r.deferredPromise)??bse();return{deferredPromise:i,result:i.promise}});return gn(n=>n(t).result)}const T7n=ml().with(e=>typeof e=="string",or).with(e=>typeof e=="object",zr),C7n=ml().with(e=>e==="all",Ge).with(e=>Array.isArray(e),I5(T7n)),P7n=Ihe((e,t,n)=>L_e(e.selectors)(t,n),(e,t,n)=>pa(L_e(e.selectors)(t,n)),bA(C7n,zn(sr)));function lR(e,t,n){const r=e=="all"?t:n,i=e=="all"?void 0:t;return P7n(r,e,i)}const dR=BK(e=>e.choiceAttributeAtomFamily,e=>e.choiceAttributeAtomFamily),Yrt=BK(e=>e.numericAttributeAtomFamily,e=>e.numericAttributeAtomFamily),F7n=BK(e=>e.booleanAttributeAtomFamily,e=>e.booleanAttributeAtomFamily),W7n=BK(e=>e.componentAttributeAtomFamily,e=>e.componentAttributeAtomFamily);function N7n(){const{effects:e}=LK(),{addSessionListenersEffect:t,cleanupAtomFamiliesEffect:n,atomSubscriberEffect:r,atomSubscriptionCleanupEffect:i}=e;return VU(t),VU(n),VU(r),VU(i),null}const j7n=30*1e3,k7n=WeakRef!=null?e=>new WeakRef(e):e=>({deref:()=>e});function U7n(){return gn(Io)}function q7n(e){return gn(null,(t,n,r)=>{const i=yM.guid();eu.debug("AtomSubscription:","Creating subscription with id",i);const a={unsubscribe:()=>{n(e.subscriptionsAtom,o=>{const u=o.get(r);if(u==null)return o;const c=new Map(u);c.delete(i);const f=new Map(o);return f.set(r,c),f})}};return n(e.subscriptionsAtom,o=>{const u=new Map(o.get(r)??Io);u.set(i,k7n(a));const c=new Map(o);return c.set(r,u),c}),a})}function x7n(e){return DK(t=>{const n=[...t(e.subscriptionsAtom).keys()];eu.debug("AtomSubscriber:","There are",n.length,"Atoms to subscribe to.");for(const r of n)t(r)})}function D7n(e){return DK((t,n)=>{const r=setInterval(()=>{eu.info("AtomSubscriptionCleanup:","Running cleanup");let i=!1;n(e.subscriptionsAtom,a=>{const o=new Map(a);for(const u of[...o.keys()]){const c=new Map(o.get(u)??Io);for(const f of[...c.keys()]){const s=c.get(f);(s===void 0||s.deref()===void 0)&&(eu.debug("AtomSubscriptionCleanup:","Deleting subscription",f,"because it got garbage collected."),c.delete(f),i=!0)}o.set(u,c),c.size===0&&(eu.debug("AtomSubscriptionCleanup:","Delete Atom with 0 subscriptions."),o.delete(u),i=!0)}return eu.debug("AtomSubscriptionCleanup:","There are",o.size,"Atoms with",[...o.values(),WW].length,"subscriptions left."),i?o:a})},j7n);return()=>{clearInterval(r)}})}const L7n=mse(({input:e})=>M(e.session,Df(()=>()=>d7n.createSession(e.sessionContext),t=>async()=>(await t.setSessionContext(e.sessionContext),t)),t=>wb(t,n=>n),iM(t=>({sessionContext:e.sessionContext,configurationError:t})))()),B7n=eGe({types:{context:{},events:{}},actors:{createOrUpdateSession:L7n},guards:{shallProcess:({context:e})=>(e.sessionCreateOrUpdateError==null||e.sessionCreateOrUpdateError.sessionContext!==e.desiredSessionContext)&&(e.configurationSession==null&&e.desiredSessionContext!=null||e.configurationSession!=null&&e.configurationSession.getSessionContext()!==e.desiredSessionContext),shallDispose:({context:e})=>e.configurationSession!=null&&e.desiredSessionContext==null}}).createMachine({context:{desiredSessionContext:null,configurationSession:null,sessionCreateOrUpdateError:null},on:{Retry:{actions:[I_({sessionCreateOrUpdateError:()=>null})]},SessionContextChanged:{actions:[nE("SessionContextChanged"),I_({desiredSessionContext:({event:e})=>e.sessionContext})]},Shutdown:{target:"#shutdown"}},initial:"Idle",states:{Idle:{always:[{target:"DisposeSession",guard:"shallDispose"},{target:"Processing",guard:"shallProcess"}]},Processing:{invoke:{src:"createOrUpdateSession",input:({context:e})=>({sessionContext:e.desiredSessionContext,session:pc(e.configurationSession)}),onDone:{target:"Idle",actions:[of(({event:e,enqueue:t})=>{N6(e.output)?t.assign({configurationSession:e.output.right}):t.assign({sessionCreateOrUpdateError:e.output.left})})]}}},DisposeSession:{always:[{target:"Idle",actions:[of(({enqueue:e,context:t})=>{wb(async()=>{var n;return await((n=t.configurationSession)==null?void 0:n.close())},Oe)(),e.assign({configurationSession:()=>null,sessionCreateOrUpdateError:()=>null})})]}]},Shutdown:{type:"final",id:"shutdown",entry:[of(({context:e,enqueue:t})=>{e.configurationSession&&wb(async()=>{var n;return await((n=e.configurationSession)==null?void 0:n.close())},Oe)(),t.assign({configurationSession:()=>null,desiredSessionContext:()=>null,sessionCreateOrUpdateError:()=>null})})]}}});function V7n(){return E7n(B7n)}function z7n(e){return gn(t=>t(e.sessionManagementMachineAtom).context.configurationSession)}function K7n(e){const t=gn((i,a)=>{var o;const u=i(e.sessionManagementMachineAtom),c=u.matches("Processing"),f=u.context.configurationSession!=null,s=(o=u.context.sessionCreateOrUpdateError)!=null&&o.configurationError?{...u.context.sessionCreateOrUpdateError.configurationError,retry:()=>{a.setSelf()}}:null;return{isProcessing:c,hasSession:f,error:s}},(i,a)=>{a(e.sessionManagementMachineAtom,{type:"Retry"})}),n=gn(i=>{const{hasSession:a,error:o,isProcessing:u}=i(t);return{isInitializing:!a&&u,error:!a&&o?o:void 0}}),r=gn(i=>{const{hasSession:a,error:o,isProcessing:u}=i(t);return{isUpdating:a&&u,error:a&&o?o:void 0}});return{sessionInitializationAtom:n,sessionUpdatingAtom:r}}const G7n=()=>X1(()=>gn()),H7n=()=>gn(),J7n=()=>gn(),Y7n=()=>gn(),Z7n=()=>gn();function X7n(e,t){const{attributesAtom:n,configurationAtom:r,isSatisfiedAtom:i,canResetAtom:a}=e,{configurationSessionAtom:o}=t;return DK((u,c)=>{const f=u(o);if(!f){c(r,void 0),c(i,void 0),c(n,void 0),c(a,void 0);return}const s=f.addConfigurationChangedListener((d,p)=>{eu.debug("SessionSubscription:","Received ConfigurationChanged"),c(r,d),p.isSatisfied!=null&&c(i,p.isSatisfied);const v=u.peek(n),h=v??G7n();p.attributes.added.forEach($=>{c(h($.key),$)}),p.attributes.changed.forEach($=>{c(h($.key),$)}),p.attributes.removed.forEach($=>{c(h(Lv($)),void 0)}),v==null&&c(n,()=>h)}),l=f.addCanResetConfigurationChangedListener(d=>{eu.debug("SessionSubscription:","Received CanResetConfigurationChanged"),c(a,d)});return()=>{s.unsubscribe(),l.unsubscribe()}})}function VK(e,t,n){const r=gn(i=>{const a=i(e);if(!a)return;const o=gn();return o.onMount=u=>{const c=t(a,(...f)=>{u(f)});return()=>{u(void 0),c.unsubscribe()}},o});return gn(i=>{const a=i(r);if(a==null)return;const o=i(a);if(o!=null)return n(...o)})}function Q7n(e){return VK(e,(t,n)=>t.addStoredConfigurationChangedListener(n),t=>t)}function e9n(e){return VK(e,(t,n)=>t.addDecisionsChangedListener(n),t=>t)}function t9n(e){return VK(e,(t,n)=>t.addDecisionsChangedListener(vt.Explicit,n),t=>t)}function n9n(e){return VK(e,(t,n)=>t.addDecisionsChangedListener(vt.Implicit,n),t=>t)}const r9n=()=>({sessionManagementMachineAtom:V7n(),configurationAtom:H7n(),isSatisfiedAtom:J7n(),canResetAtom:Y7n(),attributesAtom:Z7n(),subscriptionsAtom:U7n()});function i9n(e,t){return yp((n,r)=>{const i=r(e);return{canResetConfiguration:r(t),resetConfiguration:i.resetConfiguration.bind(i)}})}function a9n(e){return yp((t,n)=>{const r=n(e);return{explain:r.explain.bind(r),applySolution:r.applySolution.bind(r)}})}function o9n(e){return M(e.values,oN(fl),gf(t=>{var n;return((n=t.decision)==null?void 0:n.kind)===vt.Explicit}),pt(t=>({type:se.Choice,attributeId:e.id,choiceValueId:t.id,state:null})))}const uh=Symbol.for("@ts-pattern/matcher"),u9n=Symbol.for("@ts-pattern/isVariadic"),qq="@ts-pattern/anonymous-select-key",EH=e=>!!(e&&typeof e=="object"),S2=e=>e&&!!e[uh],zl=(e,t,n)=>{if(S2(e)){const r=e[uh](),{matched:i,selections:a}=r.match(t);return i&&a&&Object.keys(a).forEach(o=>n(o,a[o])),i}if(EH(e)){if(!EH(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let r=[],i=[],a=[];for(const o of e.keys()){const u=e[o];S2(u)&&u[u9n]?a.push(u):a.length?i.push(u):r.push(u)}if(a.length){if(a.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.lengthzl(f,o[s],n))&&i.every((f,s)=>zl(f,u[s],n))&&(a.length===0||zl(a[0],c,n))}return e.length===t.length&&e.every((o,u)=>zl(o,t[u],n))}return Reflect.ownKeys(e).every(r=>{const i=e[r];return(r in t||S2(a=i)&&a[uh]().matcherType==="optional")&&zl(i,t[r],n);var a})}return Object.is(t,e)},Jm=e=>{var t,n,r;return EH(e)?S2(e)?(t=(n=(r=e[uh]()).getSelectionKeys)==null?void 0:n.call(r))!=null?t:[]:Array.isArray(e)?vT(e,Jm):vT(Object.values(e),Jm):[]},vT=(e,t)=>e.reduce((n,r)=>n.concat(t(r)),[]);function Qf(e){return Object.assign(e,{optional:()=>c9n(e),and:t=>Fr(e,t),or:t=>f9n(e,t),select:t=>t===void 0?B_e(e):B_e(t,e)})}function c9n(e){return Qf({[uh]:()=>({match:t=>{let n={};const r=(i,a)=>{n[i]=a};return t===void 0?(Jm(e).forEach(i=>r(i,void 0)),{matched:!0,selections:n}):{matched:zl(e,t,r),selections:n}},getSelectionKeys:()=>Jm(e),matcherType:"optional"})})}function Fr(...e){return Qf({[uh]:()=>({match:t=>{let n={};const r=(i,a)=>{n[i]=a};return{matched:e.every(i=>zl(i,t,r)),selections:n}},getSelectionKeys:()=>vT(e,Jm),matcherType:"and"})})}function f9n(...e){return Qf({[uh]:()=>({match:t=>{let n={};const r=(i,a)=>{n[i]=a};return vT(e,Jm).forEach(i=>r(i,void 0)),{matched:e.some(i=>zl(i,t,r)),selections:n}},getSelectionKeys:()=>vT(e,Jm),matcherType:"or"})})}function $n(e){return{[uh]:()=>({match:t=>({matched:!!e(t)})})}}function B_e(...e){const t=typeof e[0]=="string"?e[0]:void 0,n=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return Qf({[uh]:()=>({match:r=>{let i={[t??qq]:r};return{matched:n===void 0||zl(n,r,(a,o)=>{i[a]=o}),selections:i}},getSelectionKeys:()=>[t??qq].concat(n===void 0?[]:Jm(n))})})}function ql(e){return typeof e=="number"}function om(e){return typeof e=="string"}function um(e){return typeof e=="bigint"}Qf($n(function(e){return!0}));const cm=e=>Object.assign(Qf(e),{startsWith:t=>{return cm(Fr(e,(n=t,$n(r=>om(r)&&r.startsWith(n)))));var n},endsWith:t=>{return cm(Fr(e,(n=t,$n(r=>om(r)&&r.endsWith(n)))));var n},minLength:t=>cm(Fr(e,(n=>$n(r=>om(r)&&r.length>=n))(t))),length:t=>cm(Fr(e,(n=>$n(r=>om(r)&&r.length===n))(t))),maxLength:t=>cm(Fr(e,(n=>$n(r=>om(r)&&r.length<=n))(t))),includes:t=>{return cm(Fr(e,(n=t,$n(r=>om(r)&&r.includes(n)))));var n},regex:t=>{return cm(Fr(e,(n=t,$n(r=>om(r)&&!!r.match(n)))));var n}});cm($n(om));const xl=e=>Object.assign(Qf(e),{between:(t,n)=>xl(Fr(e,((r,i)=>$n(a=>ql(a)&&r<=a&&i>=a))(t,n))),lt:t=>xl(Fr(e,(n=>$n(r=>ql(r)&&rxl(Fr(e,(n=>$n(r=>ql(r)&&r>n))(t))),lte:t=>xl(Fr(e,(n=>$n(r=>ql(r)&&r<=n))(t))),gte:t=>xl(Fr(e,(n=>$n(r=>ql(r)&&r>=n))(t))),int:()=>xl(Fr(e,$n(t=>ql(t)&&Number.isInteger(t)))),finite:()=>xl(Fr(e,$n(t=>ql(t)&&Number.isFinite(t)))),positive:()=>xl(Fr(e,$n(t=>ql(t)&&t>0))),negative:()=>xl(Fr(e,$n(t=>ql(t)&&t<0)))});xl($n(ql));const fm=e=>Object.assign(Qf(e),{between:(t,n)=>fm(Fr(e,((r,i)=>$n(a=>um(a)&&r<=a&&i>=a))(t,n))),lt:t=>fm(Fr(e,(n=>$n(r=>um(r)&&rfm(Fr(e,(n=>$n(r=>um(r)&&r>n))(t))),lte:t=>fm(Fr(e,(n=>$n(r=>um(r)&&r<=n))(t))),gte:t=>fm(Fr(e,(n=>$n(r=>um(r)&&r>=n))(t))),positive:()=>fm(Fr(e,$n(t=>um(t)&&t>0))),negative:()=>fm(Fr(e,$n(t=>um(t)&&t<0)))});fm($n(um));Qf($n(function(e){return typeof e=="boolean"}));Qf($n(function(e){return typeof e=="symbol"}));Qf($n(function(e){return e==null}));Qf($n(function(e){return e!=null}));let s9n=class extends Error{constructor(t){let n;try{n=JSON.stringify(t)}catch{n=t}super(`Pattern matching error: no pattern matches value ${n}`),this.input=void 0,this.input=t}};const TH={matched:!1,value:void 0};function CH(e){return new l9n(e,TH)}let l9n=class PH{constructor(t,n){this.input=void 0,this.state=void 0,this.input=t,this.state=n}with(...t){if(this.state.matched)return this;const n=t[t.length-1],r=[t[0]];let i;t.length===3&&typeof t[1]=="function"?i=t[1]:t.length>2&&r.push(...t.slice(1,t.length-1));let a=!1,o={};const u=(f,s)=>{a=!0,o[f]=s},c=!r.some(f=>zl(f,this.input,u))||i&&!i(this.input)?TH:{matched:!0,value:n(a?qq in o?o[qq]:o:this.input,this.input)};return new PH(this.input,c)}when(t,n){if(this.state.matched)return this;const r=!!t(this.input);return new PH(this.input,r?{matched:!0,value:n(this.input,this.input)}:TH)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(){if(this.state.matched)return this.state.value;throw new s9n(this.input)}run(){return this.exhaustive()}returnType(){return this}};function By(e,t){var n=0,r,i;t=t||{};function a(){var o=r,u=arguments.length,c,f;e:for(;o;){if(o.args.length!==arguments.length){o=o.next;continue}for(f=0;f{const{makeDecision:o,makeManyDecisions:u}=a(t);return{makeDecision:(c,f)=>o({type:se.Choice,attributeId:r.id,choiceValueId:c,state:f}),clearDecisions:()=>M(r,o9n,ov(Yn),Df(()=>()=>Promise.resolve(),c=>M(()=>u(c,{type:"KeepExistingDecisions"}),al(k4e))))(),isMultiSelect:By(()=>rE.isChoiceAttributeMultiSelect(r)),getAllowedChoiceValues:By(()=>rE.getAllowedChoiceValues(r)),getIncludedChoiceValues:By(()=>rE.getIncludedChoiceValues(r)),getBlockedChoiceValues:By(()=>rE.getBlockedChoiceValues(r)),isChoiceValueAllowed:By(c=>R_e.isAllowed(c)),isChoiceValueBlocked:By(c=>R_e.isBlocked(c))}})}function p9n(e,t,n){return zK(e,n,WK.numericAttributeRefinement,Nt.numeric,(r,i,a)=>{const{makeDecision:o}=a(t);return{makeDecision:u=>o({type:se.Numeric,attributeId:r.id,state:u})}})}function h9n(e,t,n){return zK(e,n,WK.booleanAttributeRefinement,Nt.boolean,(r,i,a)=>{const{makeDecision:o}=a(t);return{makeDecision:u=>o({type:se.Boolean,attributeId:r.id,state:u})}})}function v9n(e,t,n){return zK(e,n,WK.componentAttributeRefinement,Nt.component,(r,i,a)=>{const{makeDecision:o}=a(t);return{makeDecision:u=>o({type:se.Component,attributeId:r.id,state:u})}})}function zK(e,t,n,r,i){return X1(a=>yp((o,u)=>{const c=u(e),f=o(c(a));if(!f||!n(f))return;const{explain:s,applySolution:l}=u(t),d=i(f,o,u);return d===Vl?Vl:{attribute:f,isMandatory:By(()=>rE.isMandatory(f)),explain:(p,v)=>{const h=CH(p.question).with(Qr.whyIsNotSatisfied,()=>Nt.attribute).otherwise(()=>r),$={...p,subject:h,attributeId:f.id};return CH(v).with("decisions",b=>s($,b)).with("constraints",b=>s($,b)).with("full",b=>s($,b)).exhaustive()},applySolution:l,...d}}))}function Zrt(e,t){const n=Grt(e,Oe,t.equals);return"write"in e?gn(r=>r(n),(r,i,...a)=>i(e,...a)):n}const m9n=ot({isInitializing:sr,error:zn(kg)});function g9n(e,t,n,r,i,a){const o=[t,n,r,i,a],u=gn(c=>{const f=M(o,Noe(l=>c(l)!==Vl)),s=c(e);return{isInitializing:!(!s.isInitializing&&f),error:s.error}});return Zrt(u,m9n)}const y9n=ot({isUpdating:sr,error:zn(kg)});function b9n(e){return Zrt(e,y9n)}function $9n(e){return yp((t,n)=>{const r=n(e);return{storeConfiguration:r.storeConfiguration.bind(r),restoreConfiguration:r.restoreConfiguration.bind(r)}})}function I9n(e,t){const n={question:Qr.whyIsNotSatisfied,subject:Nt.configuration};return yp((r,i)=>{const a=i(e);return{isSatisfied:i(t),explain:o=>CH(o).with("full",u=>a.explain(n,u)).with("decisions",u=>a.explain(n,u)).with("constraints",u=>a.explain(n,u)).exhaustive()}})}function _9n(e){return yp((t,n)=>{const r=n(e);return{reinitializeSession:r.reinitialize.bind(r)}})}function S9n(e){return yp((t,n)=>{const r=n(e);return{scheduleTask:r.scheduleTask.bind(r)}})}function w9n(e){return yp((t,n)=>{const r=n(e);return{getDecisions:r.getDecisions.bind(r)}})}function A9n(e){return yp((t,n)=>{const r=n(e);return{makeDecision:r.makeDecision.bind(r),makeManyDecisions:r.makeManyDecisions.bind(r)}})}function Ep(e){return gn(t=>t(e)??Vl)}function M9n(e){const{sessionInitializationAtom:t,sessionUpdatingAtom:n}=K7n(e),r=z7n(e),i={guardedConfigurationSessionAtom:Ep(r),guardedConfigurationAtom:Ep(e.configurationAtom),guardedIsSatisfiedAtom:Ep(e.isSatisfiedAtom),guardedCanResetAtom:Ep(e.canResetAtom),guardedAttributesAtom:Ep(e.attributesAtom),guardedStoredConfigurationAtom:Ep(Q7n(r)),guardedDecisionsAtom:Ep(e9n(r)),guardedExplicitDecisionsAtom:Ep(t9n(r)),guardedImplicitDecisionsAtom:Ep(n9n(r))},a=A9n(i.guardedConfigurationSessionAtom),o=a9n(i.guardedConfigurationSessionAtom);return{...i,configurationSessionAtom:r,sessionInitializationAtom:t,sessionUpdatingAtom:n,configurationInitializationAtom:g9n(t,i.guardedConfigurationSessionAtom,i.guardedConfigurationAtom,i.guardedCanResetAtom,i.guardedIsSatisfiedAtom,i.guardedAttributesAtom),configurationUpdatingAtom:b9n(n),makeDecisionAtom:a,explainAtom:o,decisionQueriesAtom:w9n(i.guardedConfigurationSessionAtom),taskSchedulingAtom:S9n(i.guardedConfigurationSessionAtom),configurationSatisfactionAtom:I9n(i.guardedConfigurationSessionAtom,i.guardedIsSatisfiedAtom),configurationStoringAtom:$9n(i.guardedConfigurationSessionAtom),configurationResetAtom:i9n(i.guardedConfigurationSessionAtom,i.guardedCanResetAtom),sessionReinitializationAtom:_9n(i.guardedConfigurationSessionAtom),choiceAttributeAtomFamily:d9n(i.guardedAttributesAtom,a,o),numericAttributeAtomFamily:p9n(i.guardedAttributesAtom,a,o),booleanAttributeAtomFamily:h9n(i.guardedAttributesAtom,a,o),componentAttributeAtomFamily:v9n(i.guardedAttributesAtom,a,o),subscriberAtom:q7n(e)}}const R9n=30*1e3;function O9n(e,t,n){const r=[t.choiceAttributeAtomFamily,t.booleanAttributeAtomFamily,t.numericAttributeAtomFamily,t.componentAttributeAtomFamily,n.choiceAttributeAtomFamily,n.booleanAttributeAtomFamily,n.numericAttributeAtomFamily,n.componentAttributeAtomFamily];return DK(i=>{i(e.configurationAtom);const a=i(e.attributesAtom);if(a==null)return;eu.debug("Scheduling atomFamily cleanup");const o=setTimeout(()=>{eu.debug("Cleaning up atomFamilies");for(const c of[...a.getParams()]){const f=a(c);i.peek(f)==null&&(eu.debug("Removing attribute from attributes family because it is nullish",c),a.remove(c))}const u=[...a.getParams()];for(const c of r)for(const f of[...c.getParams()])u.includes(f)||c.remove(f)},R9n);return()=>{clearTimeout(o)}})}function E9n(e,t,n){return{addSessionListenersEffect:X7n(e,t),cleanupAtomFamiliesEffect:O9n(e,t,n),atomSubscriberEffect:x7n(e),atomSubscriptionCleanupEffect:D7n(e)}}function T9n(e){return{configurationAtom:pa(e.guardedConfigurationAtom),configurationStoringAtom:pa(e.configurationStoringAtom),configurationSatisfactionAtom:pa(e.configurationSatisfactionAtom),storedConfigurationAtom:pa(e.guardedStoredConfigurationAtom),decisionsAtom:pa(e.guardedDecisionsAtom),explicitDecisionsAtom:pa(e.guardedExplicitDecisionsAtom),implicitDecisionsAtom:pa(e.guardedImplicitDecisionsAtom),makeDecisionAtom:pa(e.makeDecisionAtom),decisionQueriesAtom:pa(e.decisionQueriesAtom),configurationResetAtom:pa(e.configurationResetAtom),sessionReinitializationAtom:pa(e.sessionReinitializationAtom),explainAtom:pa(e.explainAtom),taskSchedulingAtom:pa(e.taskSchedulingAtom),choiceAttributeAtomFamily:X1(t=>pa(e.choiceAttributeAtomFamily(t))),numericAttributeAtomFamily:X1(t=>pa(e.numericAttributeAtomFamily(t))),booleanAttributeAtomFamily:X1(t=>pa(e.booleanAttributeAtomFamily(t))),componentAttributeAtomFamily:X1(t=>pa(e.componentAttributeAtomFamily(t)))}}function C9n(){const e=r9n(),t=M9n(e),n=T9n(t);return{primitives:e,selectors:t,suspended:n,effects:E9n(e,t,n)}}const P9n="The session context is null or undefined. This will dispose the session that may exist. If this was not intended, make sure you pass valid session context data.";function F9n(e){const{primitives:{sessionManagementMachineAtom:t}}=LK(),n=yhe(t);return pe.useEffect(()=>{n({type:"SessionContextChanged",sessionContext:e.sessionContext}),e.sessionContext||console.warn(P9n)},[e.sessionContext]),pe.useEffect(()=>()=>{n({type:"Shutdown"})},[]),null}function W9n(e){const t=pe.useMemo(()=>C9n(),[]);return Y.jsx(Y.Fragment,{children:Y.jsx(Hrt.Provider,{value:t,children:Y.jsx(N9n,{jotaiStore:e.jotaiStore,children:Y.jsxs(j9n,{children:[Y.jsx(F9n,{sessionContext:e.sessionContext}),Y.jsx(N7n,{}),e.children]})})})})}function N9n(e){return e.jotaiStore?Y.jsx(Jrt.Provider,{value:e.jotaiStore,children:e.children}):Y.jsx(Y.Fragment,{children:e.children})}function j9n(e){const t=$he();return Y.jsx($7n,{store:t,children:e.children})}function Xrt(){const{selectors:{configurationInitializationAtom:e}}=LK(),t=$he();return ghe(e,{store:t})}const k9n=ef(e=>e.explainAtom,e=>e.explainAtom);ef(e=>e.guardedConfigurationAtom,e=>e.configurationAtom);const U9n=ef(e=>e.configurationSatisfactionAtom,e=>e.configurationSatisfactionAtom),Qrt=ef(e=>e.configurationStoringAtom,e=>e.configurationStoringAtom),q9n=ef(e=>e.configurationResetAtom,e=>e.configurationResetAtom);ef(e=>e.sessionReinitializationAtom,e=>e.sessionReinitializationAtom);ef(e=>e.taskSchedulingAtom,e=>e.taskSchedulingAtom);ef(e=>e.guardedStoredConfigurationAtom,e=>e.storedConfigurationAtom);const _he=ef(e=>e.makeDecisionAtom,e=>e.makeDecisionAtom);ef(e=>e.decisionQueriesAtom,e=>e.decisionQueriesAtom);ef(e=>e.guardedDecisionsAtom,e=>e.decisionsAtom);ef(e=>e.guardedExplicitDecisionsAtom,e=>e.explicitDecisionsAtom);ef(e=>e.guardedImplicitDecisionsAtom,e=>e.implicitDecisionsAtom);function x9n(e){var t=[];if(e.length===0)return"";if(typeof e[0]!="string")throw new TypeError("Url must be a string. Received "+e[0]);if(e[0].match(/^[^/:]+:\/*$/)&&e.length>1){var n=e.shift();e[0]=n+e[0]}e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0]=e[0].replace(/^([^/:]+):\/*/,"$1://");for(var r=0;r0&&(i=i.replace(/^[\/]+/,"")),r0?"?":"")+o.join("&"),a}function D9n(){var e;return typeof arguments[0]=="object"?e=arguments[0]:e=[].slice.call(arguments),x9n(e)}const L9n=pe.createContext(null),h9={didCatch:!1,error:null};class B9n extends pe.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=h9}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,r,i=arguments.length,a=new Array(i),o=0;o0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}function z9n(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var K9n=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,G9n=z9n(function(e){return K9n.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),lr="-ms-",mE="-moz-",Tn="-webkit-",eit="comm",KK="rule",She="decl",H9n="@import",tit="@keyframes",J9n="@layer",Y9n=Math.abs,whe=String.fromCharCode,FH=Object.assign;function Z9n(e,t){return ha(e,0)^45?(((t<<2^ha(e,0))<<2^ha(e,1))<<2^ha(e,2))<<2^ha(e,3):0}function nit(e){return e.trim()}function Wp(e,t){return(e=t.exec(e))?e[0]:e}function Wt(e,t,n){return e.replace(t,n)}function w2(e,t){return e.indexOf(t)}function ha(e,t){return e.charCodeAt(t)|0}function J_(e,t,n){return e.slice(t,n)}function Bl(e){return e.length}function rit(e){return e.length}function iE(e,t){return t.push(e),e}function X9n(e,t){return e.map(t).join("")}function V_e(e,t){return e.filter(function(n){return!Wp(n,t)})}var GK=1,Y_=1,iit=0,bf=0,ji=0,pR="";function HK(e,t,n,r,i,a,o,u){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:GK,column:Y_,length:o,return:"",siblings:u}}function sm(e,t){return FH(HK("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function k1(e){for(;e.root;)e=sm(e.root,{children:[e]});iE(e,e.siblings)}function Q9n(){return ji}function eGn(){return ji=bf>0?ha(pR,--bf):0,Y_--,ji===10&&(Y_=1,GK--),ji}function ys(){return ji=bf2||WH(ji)>3?"":" "}function iGn(e,t){for(;--t&&ys()&&!(ji<48||ji>102||ji>57&&ji<65||ji>70&&ji<97););return JK(e,A2()+(t<6&&ub()==32&&ys()==32))}function NH(e){for(;ys();)switch(ji){case e:return bf;case 34:case 39:e!==34&&e!==39&&NH(ji);break;case 40:e===41&&NH(e);break;case 92:ys();break}return bf}function aGn(e,t){for(;ys()&&e+ji!==47+10;)if(e+ji===42+42&&ub()===47)break;return"/*"+JK(t,bf-1)+"*"+whe(e===47?e:ys())}function oGn(e){for(;!WH(ub());)ys();return JK(e,bf)}function uGn(e){return nGn(M2("",null,null,null,[""],e=tGn(e),0,[0],e))}function M2(e,t,n,r,i,a,o,u,c){for(var f=0,s=0,l=o,d=0,p=0,v=0,h=1,$=1,b=1,y=0,m="",g=i,_=a,I=r,A=m;$;)switch(v=y,y=ys()){case 40:if(v!=108&&ha(A,l-1)==58){w2(A+=Wt(v9(y),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:A+=v9(y);break;case 9:case 10:case 13:case 32:A+=rGn(v);break;case 92:A+=iGn(A2()-1,7);continue;case 47:switch(ub()){case 42:case 47:iE(cGn(aGn(ys(),A2()),t,n,c),c);break;default:A+="/"}break;case 123*h:u[f++]=Bl(A)*b;case 125*h:case 59:case 0:switch(y){case 0:case 125:$=0;case 59+s:b==-1&&(A=Wt(A,/\f/g,"")),p>0&&Bl(A)-l&&iE(p>32?K_e(A+";",r,n,l-1,c):K_e(Wt(A," ","")+";",r,n,l-2,c),c);break;case 59:A+=";";default:if(iE(I=z_e(A,t,n,f,s,i,u,m,g=[],_=[],l,a),a),y===123)if(s===0)M2(A,t,I,I,g,a,l,u,_);else switch(d===99&&ha(A,3)===110?100:d){case 100:case 108:case 109:case 115:M2(e,I,I,r&&iE(z_e(e,I,I,0,0,i,u,m,i,g=[],l,_),_),i,_,l,u,r?g:_);break;default:M2(A,I,I,I,[""],_,0,u,_)}}f=s=p=0,h=b=1,m=A="",l=o;break;case 58:l=1+Bl(A),p=v;default:if(h<1){if(y==123)--h;else if(y==125&&h++==0&&eGn()==125)continue}switch(A+=whe(y),y*h){case 38:b=s>0?1:(A+="\f",-1);break;case 44:u[f++]=(Bl(A)-1)*b,b=1;break;case 64:ub()===45&&(A+=v9(ys())),d=ub(),s=l=Bl(m=A+=oGn(A2())),y++;break;case 45:v===45&&Bl(A)==2&&(h=0)}}return a}function z_e(e,t,n,r,i,a,o,u,c,f,s,l){for(var d=i-1,p=i===0?a:[""],v=rit(p),h=0,$=0,b=0;h0?p[y]+" "+m:Wt(m,/&\f/g,p[y])))&&(c[b++]=g);return HK(e,t,n,i===0?KK:u,c,f,s,l)}function cGn(e,t,n,r){return HK(e,t,n,eit,whe(Q9n()),J_(e,2,-2),0,r)}function K_e(e,t,n,r,i){return HK(e,t,n,She,J_(e,0,r),J_(e,r+1,-1),r,i)}function ait(e,t,n){switch(Z9n(e,t)){case 5103:return Tn+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Tn+e+e;case 4789:return mE+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Tn+e+mE+e+lr+e+e;case 5936:switch(ha(e,t+11)){case 114:return Tn+e+lr+Wt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Tn+e+lr+Wt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Tn+e+lr+Wt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return Tn+e+lr+e+e;case 6165:return Tn+e+lr+"flex-"+e+e;case 5187:return Tn+e+Wt(e,/(\w+).+(:[^]+)/,Tn+"box-$1$2"+lr+"flex-$1$2")+e;case 5443:return Tn+e+lr+"flex-item-"+Wt(e,/flex-|-self/g,"")+(Wp(e,/flex-|baseline/)?"":lr+"grid-row-"+Wt(e,/flex-|-self/g,""))+e;case 4675:return Tn+e+lr+"flex-line-pack"+Wt(e,/align-content|flex-|-self/g,"")+e;case 5548:return Tn+e+lr+Wt(e,"shrink","negative")+e;case 5292:return Tn+e+lr+Wt(e,"basis","preferred-size")+e;case 6060:return Tn+"box-"+Wt(e,"-grow","")+Tn+e+lr+Wt(e,"grow","positive")+e;case 4554:return Tn+Wt(e,/([^-])(transform)/g,"$1"+Tn+"$2")+e;case 6187:return Wt(Wt(Wt(e,/(zoom-|grab)/,Tn+"$1"),/(image-set)/,Tn+"$1"),e,"")+e;case 5495:case 3959:return Wt(e,/(image-set\([^]*)/,Tn+"$1$`$1");case 4968:return Wt(Wt(e,/(.+:)(flex-)?(.*)/,Tn+"box-pack:$3"+lr+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Tn+e+e;case 4200:if(!Wp(e,/flex-|baseline/))return lr+"grid-column-align"+J_(e,t)+e;break;case 2592:case 3360:return lr+Wt(e,"template-","")+e;case 4384:case 3616:return n&&n.some(function(r,i){return t=i,Wp(r.props,/grid-\w+-end/)})?~w2(e+(n=n[t].value),"span")?e:lr+Wt(e,"-start","")+e+lr+"grid-row-span:"+(~w2(n,"span")?Wp(n,/\d+/):+Wp(n,/\d+/)-+Wp(e,/\d+/))+";":lr+Wt(e,"-start","")+e;case 4896:case 4128:return n&&n.some(function(r){return Wp(r.props,/grid-\w+-start/)})?e:lr+Wt(Wt(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Wt(e,/(.+)-inline(.+)/,Tn+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Bl(e)-1-t>6)switch(ha(e,t+1)){case 109:if(ha(e,t+4)!==45)break;case 102:return Wt(e,/(.+:)(.+)-([^]+)/,"$1"+Tn+"$2-$3$1"+mE+(ha(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~w2(e,"stretch")?ait(Wt(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return Wt(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(r,i,a,o,u,c,f){return lr+i+":"+a+f+(o?lr+i+"-span:"+(u?c:+c-+a)+f:"")+e});case 4949:if(ha(e,t+6)===121)return Wt(e,":",":"+Tn)+e;break;case 6444:switch(ha(e,ha(e,14)===45?18:11)){case 120:return Wt(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+Tn+(ha(e,14)===45?"inline-":"")+"box$3$1"+Tn+"$2$3$1"+lr+"$2box$3")+e;case 100:return Wt(e,":",":"+lr)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Wt(e,"scroll-","scroll-snap-")+e}return e}function xq(e,t){for(var n="",r=0;r-1&&!e.return)switch(e.type){case She:e.return=ait(e.value,e.length,n);return;case tit:return xq([sm(e,{value:Wt(e.value,"@","@"+Tn)})],r);case KK:if(e.length)return X9n(n=e.props,function(i){switch(Wp(i,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":k1(sm(e,{props:[Wt(i,/:(read-\w+)/,":"+mE+"$1")]})),k1(sm(e,{props:[i]})),FH(e,{props:V_e(n,r)});break;case"::placeholder":k1(sm(e,{props:[Wt(i,/:(plac\w+)/,":"+Tn+"input-$1")]})),k1(sm(e,{props:[Wt(i,/:(plac\w+)/,":"+mE+"$1")]})),k1(sm(e,{props:[Wt(i,/:(plac\w+)/,lr+"input-$1")]})),k1(sm(e,{props:[i]})),FH(e,{props:V_e(n,r)});break}return""})}}var pGn={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Nb=typeof process<"u"&&process.env!==void 0&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",Ahe=typeof window<"u"&&"HTMLElement"in window,hGn=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&process.env!==void 0&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==""?process.env.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&process.env.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&process.env!==void 0&&process.env.SC_DISABLE_SPEEDY!==void 0&&process.env.SC_DISABLE_SPEEDY!==""?process.env.SC_DISABLE_SPEEDY!=="false"&&process.env.SC_DISABLE_SPEEDY:process.env.NODE_ENV!=="production"),vGn={},G_e=/invalid hook call/i,zU=new Set,oit=function(e,t){if(process.env.NODE_ENV!=="production"){var n=t?' with the id of "'.concat(t,'"'):"",r="The component ".concat(e).concat(n,` has been created dynamically. `)+`You may see this warning because you've called styled inside another component. To resolve this only create new StyledComponents outside of any render method and function component.`,i=console.error;try{var a=!0;console.error=function(o){for(var u=[],c=1;c?@[\\\]^`{|}~-]+/g,gGn=/(^-|-$)/g;function H_e(e){return e.replace(mGn,"-").replace(gGn,"")}var yGn=/(a)(d)/gi,J_e=function(e){return String.fromCharCode(e+(e>25?39:97))};function kH(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=J_e(t%52)+n;return(J_e(t%52)+n).replace(yGn,"$1-$2")}var m9,Gy=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},cit=function(e){return Gy(5381,e)};function fit(e){return kH(cit(e)>>>0)}function sit(e){return process.env.NODE_ENV!=="production"&&typeof e=="string"&&e||e.displayName||e.name||"Component"}function g9(e){return typeof e=="string"&&(process.env.NODE_ENV==="production"||e.charAt(0)===e.charAt(0).toLowerCase())}var lit=typeof Symbol=="function"&&Symbol.for,dit=lit?Symbol.for("react.memo"):60115,bGn=lit?Symbol.for("react.forward_ref"):60112,$Gn={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},IGn={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},pit={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},_Gn=((m9={})[bGn]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},m9[dit]=pit,m9);function Y_e(e){return("type"in(t=e)&&t.type.$$typeof)===dit?pit:"$$typeof"in e?_Gn[e.$$typeof]:$Gn;var t}var SGn=Object.defineProperty,wGn=Object.getOwnPropertyNames,Z_e=Object.getOwnPropertySymbols,AGn=Object.getOwnPropertyDescriptor,MGn=Object.getPrototypeOf,X_e=Object.prototype;function hit(e,t,n){if(typeof t!="string"){if(X_e){var r=MGn(t);r&&r!==X_e&&hit(e,r,n)}var i=wGn(t);Z_e&&(i=i.concat(Z_e(t)));for(var a=Y_e(e),o=Y_e(t),u=0;u ({})}\n```\n\n',8:`ThemeProvider: Please make your "theme" prop an object. `,9:"Missing document ``\n\n",10:`Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021 `,11:`_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements. `,12:"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",13:`%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details. `,14:`ThemeProvider: "theme" prop is required. `,15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to ``, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:`Reached the limit of how many styled components may be created at group %s. You may only create up to 1,073,741,824 components. If you're creating components dynamically, as for instance in your render method then you may be running into this limitation. `,17:`CSSStyleSheet could not be found on HTMLStyleElement. Has styled-components' style tag been unmounted or altered by another script? `,18:"ThemeProvider: Please make sure your useTheme hook is within a ``"}:{};function OGn(){for(var e=[],t=0;t0?" Args: ".concat(t.join(", ")):"")):new Error(OGn.apply(void 0,nh([RGn[e]],t,!1)).trim())}var EGn=function(){function e(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t}return e.prototype.indexOfGroup=function(t){for(var n=0,r=0;r=this.groupSizes.length){for(var r=this.groupSizes,i=r.length,a=i;t>=a;)if((a<<=1)<0)throw hR(16,"".concat(t));this.groupSizes=new Uint32Array(a),this.groupSizes.set(r),this.length=a;for(var o=i;o=this.length||this.groupSizes[t]===0)return n;for(var r=this.groupSizes[t],i=this.indexOfGroup(t),a=i+r,o=i;o1073741824))throw hR(16,"".concat(t));return R2.set(e,t),Dq.set(t,e),t},TGn=function(e,t){O2=t+1,R2.set(e,t),Dq.set(t,e)},CGn="style[".concat(Nb,"][").concat("data-styled-version",'="').concat("6.1.1",'"]'),PGn=new RegExp("^".concat(Nb,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),FGn=function(e,t,n){for(var r,i=n.split(","),a=0,o=i.length;a=0){var r=document.createTextNode(n);return this.element.insertBefore(r,this.nodes[t]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(t){this.element.removeChild(this.nodes[t]),this.length--},e.prototype.getRule=function(t){return t0&&($+="".concat(b,","))}),c+="".concat(v).concat(h,'{content:"').concat($,'"}').concat(`/*!sc*/ `)},s=0;s0?".".concat(t):d},s=c.slice();s.push(function(d){d.type===KK&&d.value.includes("&")&&(d.props[0]=d.props[0].replace(xGn,n).replace(r,f))}),o.prefix&&s.push(dGn),s.push(fGn);var l=function(d,p,v,h){p===void 0&&(p=""),v===void 0&&(v=""),h===void 0&&(h="&"),t=h,n=p,r=new RegExp("\\".concat(n,"\\b"),"g");var $=d.replace(DGn,""),b=uGn(v||p?"".concat(v," ").concat(p," { ").concat($," }"):$);o.namespace&&(b=mit(b,o.namespace));var y=[];return xq(b,sGn(s.concat(lGn(function(m){return y.push(m)})))),y};return l.hash=c.length?c.reduce(function(d,p){return p.name||hR(15),Gy(d,p.name)},5381).toString():"",l}var BGn=new Lq,xH=LGn(),git=pe.createContext({shouldForwardProp:void 0,styleSheet:BGn,stylis:xH});git.Consumer;pe.createContext(void 0);function DH(){return pe.useContext(git)}var eSe=function(){function e(t,n){var r=this;this.inject=function(i,a){a===void 0&&(a=xH);var o=r.name+a.hash;i.hasNameForId(r.id,o)||i.insertRules(r.id,o,a(r.rules,o,"@keyframes"))},this.name=t,this.id="sc-keyframes-".concat(t),this.rules=n,Rhe(this,function(){throw hR(12,String(r.name))})}return e.prototype.getName=function(t){return t===void 0&&(t=xH),this.name+t.hash},e}(),VGn=function(e){return e>="A"&&e<="Z"};function tSe(e){for(var t="",n=0;n>>0);if(!n.hasNameForId(this.componentId,o)){var u=r(a,".".concat(o),void 0,this.componentId);n.insertRules(this.componentId,o,u)}i=Xy(i,o),this.staticRulesId=o}else{for(var c=Gy(this.baseHash,r.hash),f="",s=0;s>>0);n.hasNameForId(this.componentId,p)||n.insertRules(this.componentId,p,r(f,".".concat(p),void 0,this.componentId)),i=Xy(i,p)}}return i},e}(),Ohe=pe.createContext(void 0);Ohe.Consumer;var y9={},nSe=new Set;function GGn(e,t,n){var r=Mhe(e),i=e,a=!g9(e),o=t.attrs,u=o===void 0?YK:o,c=t.componentId,f=c===void 0?function(g,_){var I=typeof g!="string"?"sc":H_e(g);y9[I]=(y9[I]||0)+1;var A="".concat(I,"-").concat(fit("6.1.1"+I+y9[I]));return _?"".concat(_,"-").concat(A):A}(t.displayName,t.parentComponentId):c,s=t.displayName,l=s===void 0?function(g){return g9(g)?"styled.".concat(g):"Styled(".concat(sit(g),")")}(e):s,d=t.displayName&&t.componentId?"".concat(H_e(t.displayName),"-").concat(t.componentId):t.componentId||f,p=r&&i.attrs?i.attrs.concat(u).filter(Boolean):u,v=t.shouldForwardProp;if(r&&i.shouldForwardProp){var h=i.shouldForwardProp;if(t.shouldForwardProp){var $=t.shouldForwardProp;v=function(g,_){return h(g,_)&&$(g,_)}}else v=h}var b=new KGn(n,d,r?i.componentStyle:void 0);function y(g,_){return function(I,A,E){var N=I.attrs,U=I.componentStyle,te=I.defaultProps,Ie=I.foldedComponentIds,je=I.styledComponentId,J=I.target,ee=pe.useContext(Ohe),fe=DH(),ae=I.shouldForwardProp||fe.shouldForwardProp;process.env.NODE_ENV!=="production"&&pe.useDebugValue(je);var he=function(re,oe,ie){for(var le,me=ma(ma({},oe),{className:void 0,theme:ie}),ye=0;ye` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));var Ee=function(re,oe){var ie=DH(),le=re.generateAndInjectStyles(oe,ie.styleSheet,ie.stylis);return process.env.NODE_ENV!=="production"&&pe.useDebugValue(le),le}(U,he);process.env.NODE_ENV!=="production"&&I.warnTooManyClasses&&I.warnTooManyClasses(Ee);var H=Xy(Ie,je);return Ee&&(H+=" "+Ee),he.className&&(H+=" "+he.className),Z[g9(_e)&&!jH.has(_e)?"class":"className"]=H,Z.ref=E,pe.createElement(_e,Z)}(m,g,_)}y.displayName=l;var m=pe.forwardRef(y);return m.attrs=p,m.componentStyle=b,m.displayName=l,m.shouldForwardProp=v,m.foldedComponentIds=r?Xy(i.foldedComponentIds,i.styledComponentId):"",m.styledComponentId=d,m.target=r?i.target:e,Object.defineProperty(m,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(g){this._foldedDefaultProps=r?function(_){for(var I=[],A=1;A=200)){var N=_?' with the id of "'.concat(_,'"'):"";console.warn("Over ".concat(200," classes were generated for component ").concat(g).concat(N,`. `)+`Consider using the attrs method, together with a style object for frequently changed styles. Example: const Component = styled.div.attrs(props => ({ style: { background: props.background, }, }))\`width: 100%;\` `),A=!0,I={}}}}(l,d)),Rhe(m,function(){return".".concat(m.styledComponentId)}),a&&hit(m,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),m}function rSe(e,t){for(var n=[e[0]],r=0,i=t.length;r2&&Lq.registerId(this.componentId+t),this.removeStyles(t,r),this.createStyles(t,n,r,i)},e}();function kk(e){for(var t=[],n=1;n meta tag to the stylesheet, or simply embedding it manually in your index.html section for a simpler app."),f.styleSheet.server&&u(l,c,f.styleSheet,s,f.stylis),pe.useLayoutEffect(function(){if(!f.styleSheet.server)return u(l,c,f.styleSheet,s,f.stylis),function(){return a.removeStyles(l,f.styleSheet)}},[l,c,f.styleSheet,s,f.stylis]),null};function u(c,f,s,l,d){if(a.isStatic)a.renderStyles(c,vGn,s,d);else{var p=ma(ma({},f),{theme:uit(f,l,o.defaultProps)});a.renderStyles(c,p,s,d)}}return pe.memo(o)}process.env.NODE_ENV!=="production"&&typeof navigator<"u"&&navigator.product==="ReactNative"&&console.warn(`It looks like you've imported 'styled-components' on React Native. Perhaps you're looking to import 'styled-components/native'? Read more about this at https://www.styled-components.com/docs/basics#react-native`);var GU="__sc-".concat(Nb,"__");process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&typeof window<"u"&&(window[GU]||(window[GU]=0),window[GU]===1&&console.warn(`It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason. See https://s-c.sh/2BAXzed for more info.`),window[GU]+=1);var JGn={prefix:"fas",iconName:"minus",icon:[448,512,[8211,8722,10134,"subtract"],"f068","M432 256c0 17.7-14.3 32-32 32L48 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l352 0c17.7 0 32 14.3 32 32z"]},YGn={prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"]},_it={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]};function aSe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Xe(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1;i--){var a=n[i],o=(a.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(o)>-1&&(r=a)}return vr.head.insertBefore(t,r),e}}var IHn="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function $T(){for(var e=12,t="";e-- >0;)t+=IHn[Math.random()*62|0];return t}function vR(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function Nhe(e){return e.classList?vR(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(t){return t})}function Wit(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function _Hn(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(Wit(e[n]),'" ')},"").trim()}function ZK(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function jhe(e){return e.size!==Yl.size||e.x!==Yl.x||e.y!==Yl.y||e.rotate!==Yl.rotate||e.flipX||e.flipY}function SHn(e){var t=e.transform,n=e.containerWidth,r=e.iconWidth,i={transform:"translate(".concat(n/2," 256)")},a="translate(".concat(t.x*32,", ").concat(t.y*32,") "),o="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),u="rotate(".concat(t.rotate," 0 0)"),c={transform:"".concat(a," ").concat(o," ").concat(u)},f={transform:"translate(".concat(r/2*-1," -256)")};return{outer:i,inner:c,path:f}}function wHn(e){var t=e.transform,n=e.width,r=n===void 0?VH:n,i=e.height,a=i===void 0?VH:i,o=e.startCentered,u=o===void 0?!1:o,c="";return u&&Rit?c+="translate(".concat(t.x/Hv-r/2,"em, ").concat(t.y/Hv-a/2,"em) "):u?c+="translate(calc(-50% + ".concat(t.x/Hv,"em), calc(-50% + ").concat(t.y/Hv,"em)) "):c+="translate(".concat(t.x/Hv,"em, ").concat(t.y/Hv,"em) "),c+="scale(".concat(t.size/Hv*(t.flipX?-1:1),", ").concat(t.size/Hv*(t.flipY?-1:1),") "),c+="rotate(".concat(t.rotate,"deg) "),c}var AHn=`:root, :host { --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Solid"; --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Regular"; --fa-font-light: normal 300 1em/1 "Font Awesome 6 Light"; --fa-font-thin: normal 100 1em/1 "Font Awesome 6 Thin"; --fa-font-duotone: normal 900 1em/1 "Font Awesome 6 Duotone"; --fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 6 Sharp"; --fa-font-sharp-regular: normal 400 1em/1 "Font Awesome 6 Sharp"; --fa-font-sharp-light: normal 300 1em/1 "Font Awesome 6 Sharp"; --fa-font-sharp-thin: normal 100 1em/1 "Font Awesome 6 Sharp"; --fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands"; } svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa { overflow: visible; box-sizing: content-box; } .svg-inline--fa { display: var(--fa-display, inline-block); height: 1em; overflow: visible; vertical-align: -0.125em; } .svg-inline--fa.fa-2xs { vertical-align: 0.1em; } .svg-inline--fa.fa-xs { vertical-align: 0em; } .svg-inline--fa.fa-sm { vertical-align: -0.0714285705em; } .svg-inline--fa.fa-lg { vertical-align: -0.2em; } .svg-inline--fa.fa-xl { vertical-align: -0.25em; } .svg-inline--fa.fa-2xl { vertical-align: -0.3125em; } .svg-inline--fa.fa-pull-left { margin-right: var(--fa-pull-margin, 0.3em); width: auto; } .svg-inline--fa.fa-pull-right { margin-left: var(--fa-pull-margin, 0.3em); width: auto; } .svg-inline--fa.fa-li { width: var(--fa-li-width, 2em); top: 0.25em; } .svg-inline--fa.fa-fw { width: var(--fa-fw-width, 1.25em); } .fa-layers svg.svg-inline--fa { bottom: 0; left: 0; margin: auto; position: absolute; right: 0; top: 0; } .fa-layers-counter, .fa-layers-text { display: inline-block; position: absolute; text-align: center; } .fa-layers { display: inline-block; height: 1em; position: relative; text-align: center; vertical-align: -0.125em; width: 1em; } .fa-layers svg.svg-inline--fa { -webkit-transform-origin: center center; transform-origin: center center; } .fa-layers-text { left: 50%; top: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); -webkit-transform-origin: center center; transform-origin: center center; } .fa-layers-counter { background-color: var(--fa-counter-background-color, #ff253a); border-radius: var(--fa-counter-border-radius, 1em); box-sizing: border-box; color: var(--fa-inverse, #fff); line-height: var(--fa-counter-line-height, 1); max-width: var(--fa-counter-max-width, 5em); min-width: var(--fa-counter-min-width, 1.5em); overflow: hidden; padding: var(--fa-counter-padding, 0.25em 0.5em); right: var(--fa-right, 0); text-overflow: ellipsis; top: var(--fa-top, 0); -webkit-transform: scale(var(--fa-counter-scale, 0.25)); transform: scale(var(--fa-counter-scale, 0.25)); -webkit-transform-origin: top right; transform-origin: top right; } .fa-layers-bottom-right { bottom: var(--fa-bottom, 0); right: var(--fa-right, 0); top: auto; -webkit-transform: scale(var(--fa-layers-scale, 0.25)); transform: scale(var(--fa-layers-scale, 0.25)); -webkit-transform-origin: bottom right; transform-origin: bottom right; } .fa-layers-bottom-left { bottom: var(--fa-bottom, 0); left: var(--fa-left, 0); right: auto; top: auto; -webkit-transform: scale(var(--fa-layers-scale, 0.25)); transform: scale(var(--fa-layers-scale, 0.25)); -webkit-transform-origin: bottom left; transform-origin: bottom left; } .fa-layers-top-right { top: var(--fa-top, 0); right: var(--fa-right, 0); -webkit-transform: scale(var(--fa-layers-scale, 0.25)); transform: scale(var(--fa-layers-scale, 0.25)); -webkit-transform-origin: top right; transform-origin: top right; } .fa-layers-top-left { left: var(--fa-left, 0); right: auto; top: var(--fa-top, 0); -webkit-transform: scale(var(--fa-layers-scale, 0.25)); transform: scale(var(--fa-layers-scale, 0.25)); -webkit-transform-origin: top left; transform-origin: top left; } .fa-1x { font-size: 1em; } .fa-2x { font-size: 2em; } .fa-3x { font-size: 3em; } .fa-4x { font-size: 4em; } .fa-5x { font-size: 5em; } .fa-6x { font-size: 6em; } .fa-7x { font-size: 7em; } .fa-8x { font-size: 8em; } .fa-9x { font-size: 9em; } .fa-10x { font-size: 10em; } .fa-2xs { font-size: 0.625em; line-height: 0.1em; vertical-align: 0.225em; } .fa-xs { font-size: 0.75em; line-height: 0.0833333337em; vertical-align: 0.125em; } .fa-sm { font-size: 0.875em; line-height: 0.0714285718em; vertical-align: 0.0535714295em; } .fa-lg { font-size: 1.25em; line-height: 0.05em; vertical-align: -0.075em; } .fa-xl { font-size: 1.5em; line-height: 0.0416666682em; vertical-align: -0.125em; } .fa-2xl { font-size: 2em; line-height: 0.03125em; vertical-align: -0.1875em; } .fa-fw { text-align: center; width: 1.25em; } .fa-ul { list-style-type: none; margin-left: var(--fa-li-margin, 2.5em); padding-left: 0; } .fa-ul > li { position: relative; } .fa-li { left: calc(var(--fa-li-width, 2em) * -1); position: absolute; text-align: center; width: var(--fa-li-width, 2em); line-height: inherit; } .fa-border { border-color: var(--fa-border-color, #eee); border-radius: var(--fa-border-radius, 0.1em); border-style: var(--fa-border-style, solid); border-width: var(--fa-border-width, 0.08em); padding: var(--fa-border-padding, 0.2em 0.25em 0.15em); } .fa-pull-left { float: left; margin-right: var(--fa-pull-margin, 0.3em); } .fa-pull-right { float: right; margin-left: var(--fa-pull-margin, 0.3em); } .fa-beat { -webkit-animation-name: fa-beat; animation-name: fa-beat; -webkit-animation-delay: var(--fa-animation-delay, 0s); animation-delay: var(--fa-animation-delay, 0s); -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 1s); animation-duration: var(--fa-animation-duration, 1s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out); animation-timing-function: var(--fa-animation-timing, ease-in-out); } .fa-bounce { -webkit-animation-name: fa-bounce; animation-name: fa-bounce; -webkit-animation-delay: var(--fa-animation-delay, 0s); animation-delay: var(--fa-animation-delay, 0s); -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 1s); animation-duration: var(--fa-animation-duration, 1s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1)); animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1)); } .fa-fade { -webkit-animation-name: fa-fade; animation-name: fa-fade; -webkit-animation-delay: var(--fa-animation-delay, 0s); animation-delay: var(--fa-animation-delay, 0s); -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 1s); animation-duration: var(--fa-animation-duration, 1s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); } .fa-beat-fade { -webkit-animation-name: fa-beat-fade; animation-name: fa-beat-fade; -webkit-animation-delay: var(--fa-animation-delay, 0s); animation-delay: var(--fa-animation-delay, 0s); -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 1s); animation-duration: var(--fa-animation-duration, 1s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); } .fa-flip { -webkit-animation-name: fa-flip; animation-name: fa-flip; -webkit-animation-delay: var(--fa-animation-delay, 0s); animation-delay: var(--fa-animation-delay, 0s); -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 1s); animation-duration: var(--fa-animation-duration, 1s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out); animation-timing-function: var(--fa-animation-timing, ease-in-out); } .fa-shake { -webkit-animation-name: fa-shake; animation-name: fa-shake; -webkit-animation-delay: var(--fa-animation-delay, 0s); animation-delay: var(--fa-animation-delay, 0s); -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 1s); animation-duration: var(--fa-animation-duration, 1s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, linear); animation-timing-function: var(--fa-animation-timing, linear); } .fa-spin { -webkit-animation-name: fa-spin; animation-name: fa-spin; -webkit-animation-delay: var(--fa-animation-delay, 0s); animation-delay: var(--fa-animation-delay, 0s); -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 2s); animation-duration: var(--fa-animation-duration, 2s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, linear); animation-timing-function: var(--fa-animation-timing, linear); } .fa-spin-reverse { --fa-animation-direction: reverse; } .fa-pulse, .fa-spin-pulse { -webkit-animation-name: fa-spin; animation-name: fa-spin; -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 1s); animation-duration: var(--fa-animation-duration, 1s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, steps(8)); animation-timing-function: var(--fa-animation-timing, steps(8)); } @media (prefers-reduced-motion: reduce) { .fa-beat, .fa-bounce, .fa-fade, .fa-beat-fade, .fa-flip, .fa-pulse, .fa-shake, .fa-spin, .fa-spin-pulse { -webkit-animation-delay: -1ms; animation-delay: -1ms; -webkit-animation-duration: 1ms; animation-duration: 1ms; -webkit-animation-iteration-count: 1; animation-iteration-count: 1; -webkit-transition-delay: 0s; transition-delay: 0s; -webkit-transition-duration: 0s; transition-duration: 0s; } } @-webkit-keyframes fa-beat { 0%, 90% { -webkit-transform: scale(1); transform: scale(1); } 45% { -webkit-transform: scale(var(--fa-beat-scale, 1.25)); transform: scale(var(--fa-beat-scale, 1.25)); } } @keyframes fa-beat { 0%, 90% { -webkit-transform: scale(1); transform: scale(1); } 45% { -webkit-transform: scale(var(--fa-beat-scale, 1.25)); transform: scale(var(--fa-beat-scale, 1.25)); } } @-webkit-keyframes fa-bounce { 0% { -webkit-transform: scale(1, 1) translateY(0); transform: scale(1, 1) translateY(0); } 10% { -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); } 30% { -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); } 50% { -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); } 57% { -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); } 64% { -webkit-transform: scale(1, 1) translateY(0); transform: scale(1, 1) translateY(0); } 100% { -webkit-transform: scale(1, 1) translateY(0); transform: scale(1, 1) translateY(0); } } @keyframes fa-bounce { 0% { -webkit-transform: scale(1, 1) translateY(0); transform: scale(1, 1) translateY(0); } 10% { -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); } 30% { -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); } 50% { -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); } 57% { -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); } 64% { -webkit-transform: scale(1, 1) translateY(0); transform: scale(1, 1) translateY(0); } 100% { -webkit-transform: scale(1, 1) translateY(0); transform: scale(1, 1) translateY(0); } } @-webkit-keyframes fa-fade { 50% { opacity: var(--fa-fade-opacity, 0.4); } } @keyframes fa-fade { 50% { opacity: var(--fa-fade-opacity, 0.4); } } @-webkit-keyframes fa-beat-fade { 0%, 100% { opacity: var(--fa-beat-fade-opacity, 0.4); -webkit-transform: scale(1); transform: scale(1); } 50% { opacity: 1; -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125)); transform: scale(var(--fa-beat-fade-scale, 1.125)); } } @keyframes fa-beat-fade { 0%, 100% { opacity: var(--fa-beat-fade-opacity, 0.4); -webkit-transform: scale(1); transform: scale(1); } 50% { opacity: 1; -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125)); transform: scale(var(--fa-beat-fade-scale, 1.125)); } } @-webkit-keyframes fa-flip { 50% { -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); } } @keyframes fa-flip { 50% { -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); } } @-webkit-keyframes fa-shake { 0% { -webkit-transform: rotate(-15deg); transform: rotate(-15deg); } 4% { -webkit-transform: rotate(15deg); transform: rotate(15deg); } 8%, 24% { -webkit-transform: rotate(-18deg); transform: rotate(-18deg); } 12%, 28% { -webkit-transform: rotate(18deg); transform: rotate(18deg); } 16% { -webkit-transform: rotate(-22deg); transform: rotate(-22deg); } 20% { -webkit-transform: rotate(22deg); transform: rotate(22deg); } 32% { -webkit-transform: rotate(-12deg); transform: rotate(-12deg); } 36% { -webkit-transform: rotate(12deg); transform: rotate(12deg); } 40%, 100% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } } @keyframes fa-shake { 0% { -webkit-transform: rotate(-15deg); transform: rotate(-15deg); } 4% { -webkit-transform: rotate(15deg); transform: rotate(15deg); } 8%, 24% { -webkit-transform: rotate(-18deg); transform: rotate(-18deg); } 12%, 28% { -webkit-transform: rotate(18deg); transform: rotate(18deg); } 16% { -webkit-transform: rotate(-22deg); transform: rotate(-22deg); } 20% { -webkit-transform: rotate(22deg); transform: rotate(22deg); } 32% { -webkit-transform: rotate(-12deg); transform: rotate(-12deg); } 36% { -webkit-transform: rotate(12deg); transform: rotate(12deg); } 40%, 100% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } } @-webkit-keyframes fa-spin { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } @keyframes fa-spin { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } .fa-rotate-90 { -webkit-transform: rotate(90deg); transform: rotate(90deg); } .fa-rotate-180 { -webkit-transform: rotate(180deg); transform: rotate(180deg); } .fa-rotate-270 { -webkit-transform: rotate(270deg); transform: rotate(270deg); } .fa-flip-horizontal { -webkit-transform: scale(-1, 1); transform: scale(-1, 1); } .fa-flip-vertical { -webkit-transform: scale(1, -1); transform: scale(1, -1); } .fa-flip-both, .fa-flip-horizontal.fa-flip-vertical { -webkit-transform: scale(-1, -1); transform: scale(-1, -1); } .fa-rotate-by { -webkit-transform: rotate(var(--fa-rotate-angle, none)); transform: rotate(var(--fa-rotate-angle, none)); } .fa-stack { display: inline-block; vertical-align: middle; height: 2em; position: relative; width: 2.5em; } .fa-stack-1x, .fa-stack-2x { bottom: 0; left: 0; margin: auto; position: absolute; right: 0; top: 0; z-index: var(--fa-stack-z-index, auto); } .svg-inline--fa.fa-stack-1x { height: 1em; width: 1.25em; } .svg-inline--fa.fa-stack-2x { height: 2em; width: 2.5em; } .fa-inverse { color: var(--fa-inverse, #fff); } .sr-only, .fa-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; } .sr-only-focusable:not(:focus), .fa-sr-only-focusable:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; } .svg-inline--fa .fa-primary { fill: var(--fa-primary-color, currentColor); opacity: var(--fa-primary-opacity, 1); } .svg-inline--fa .fa-secondary { fill: var(--fa-secondary-color, currentColor); opacity: var(--fa-secondary-opacity, 0.4); } .svg-inline--fa.fa-swap-opacity .fa-primary { opacity: var(--fa-secondary-opacity, 0.4); } .svg-inline--fa.fa-swap-opacity .fa-secondary { opacity: var(--fa-primary-opacity, 1); } .svg-inline--fa mask .fa-primary, .svg-inline--fa mask .fa-secondary { fill: black; } .fad.fa-inverse, .fa-duotone.fa-inverse { color: var(--fa-inverse, #fff); }`;function Nit(){var e=Oit,t=Eit,n=ft.cssPrefix,r=ft.replacementClass,i=AHn;if(n!==e||r!==t){var a=new RegExp("\\.".concat(e,"\\-"),"g"),o=new RegExp("\\--".concat(e,"\\-"),"g"),u=new RegExp("\\.".concat(t),"g");i=i.replace(a,".".concat(n,"-")).replace(o,"--".concat(n,"-")).replace(u,".".concat(r))}return i}var dSe=!1;function b9(){ft.autoAddCss&&!dSe&&($Hn(Nit()),dSe=!0)}var MHn={mixout:function(){return{dom:{css:Nit,insertCss:b9}}},hooks:function(){return{beforeDOMElementCreation:function(){b9()},beforeI2svg:function(){b9()}}}},fh=Ym||{};fh[ch]||(fh[ch]={});fh[ch].styles||(fh[ch].styles={});fh[ch].hooks||(fh[ch].hooks={});fh[ch].shims||(fh[ch].shims=[]);var gs=fh[ch],jit=[],RHn=function e(){vr.removeEventListener("DOMContentLoaded",e),Vq=1,jit.map(function(t){return t()})},Vq=!1;Bv&&(Vq=(vr.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(vr.readyState),Vq||vr.addEventListener("DOMContentLoaded",RHn));function OHn(e){Bv&&(Vq?setTimeout(e,0):jit.push(e))}function xk(e){var t=e.tag,n=e.attributes,r=n===void 0?{}:n,i=e.children,a=i===void 0?[]:i;return typeof e=="string"?Wit(e):"<".concat(t," ").concat(_Hn(r),">").concat(a.map(xk).join(""),"")}function pSe(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}var EHn=function(t,n){return function(r,i,a,o){return t.call(n,r,i,a,o)}},$9=function(t,n,r,i){var a=Object.keys(t),o=a.length,u=i!==void 0?EHn(n,i):n,c,f,s;for(r===void 0?(c=1,s=t[a[0]]):(c=0,s=r);c=55296&&i<=56319&&n=55296&&r<=56319&&n>t+1&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}function hSe(e){return Object.keys(e).reduce(function(t,n){var r=e[n],i=!!r.icon;return i?t[r.iconName]=r.icon:t[n]=r,t},{})}function GH(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.skipHooks,i=r===void 0?!1:r,a=hSe(t);typeof gs.hooks.addPack=="function"&&!i?gs.hooks.addPack(e,hSe(t)):gs.styles[e]=Xe(Xe({},gs.styles[e]||{}),a),e==="fas"&&GH("fa",t)}var e2,t2,n2,Q1=gs.styles,PHn=gs.shims,FHn=(e2={},Hi(e2,hr,Object.values(yT[hr])),Hi(e2,Xr,Object.values(yT[Xr])),e2),khe=null,kit={},Uit={},qit={},xit={},Dit={},WHn=(t2={},Hi(t2,hr,Object.keys(mT[hr])),Hi(t2,Xr,Object.keys(mT[Xr])),t2);function NHn(e){return~vHn.indexOf(e)}function jHn(e,t){var n=t.split("-"),r=n[0],i=n.slice(1).join("-");return r===e&&i!==""&&!NHn(i)?i:null}var Lit=function(){var t=function(a){return $9(Q1,function(o,u,c){return o[c]=$9(u,a,{}),o},{})};kit=t(function(i,a,o){if(a[3]&&(i[a[3]]=o),a[2]){var u=a[2].filter(function(c){return typeof c=="number"});u.forEach(function(c){i[c.toString(16)]=o})}return i}),Uit=t(function(i,a,o){if(i[o]=o,a[2]){var u=a[2].filter(function(c){return typeof c=="string"});u.forEach(function(c){i[c]=o})}return i}),Dit=t(function(i,a,o){var u=a[2];return i[o]=o,u.forEach(function(c){i[c]=o}),i});var n="far"in Q1||ft.autoFetchSvg,r=$9(PHn,function(i,a){var o=a[0],u=a[1],c=a[2];return u==="far"&&!n&&(u="fas"),typeof o=="string"&&(i.names[o]={prefix:u,iconName:c}),typeof o=="number"&&(i.unicodes[o.toString(16)]={prefix:u,iconName:c}),i},{names:{},unicodes:{}});qit=r.names,xit=r.unicodes,khe=XK(ft.styleDefault,{family:ft.familyDefault})};bHn(function(e){khe=XK(e.styleDefault,{family:ft.familyDefault})});Lit();function Uhe(e,t){return(kit[e]||{})[t]}function kHn(e,t){return(Uit[e]||{})[t]}function eb(e,t){return(Dit[e]||{})[t]}function Bit(e){return qit[e]||{prefix:null,iconName:null}}function UHn(e){var t=xit[e],n=Uhe("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function Zm(){return khe}var qhe=function(){return{prefix:null,iconName:null,rest:[]}};function XK(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.family,r=n===void 0?hr:n,i=mT[r][e],a=gT[r][e]||gT[r][i],o=e in gs.styles?e:null;return a||o||null}var vSe=(n2={},Hi(n2,hr,Object.keys(yT[hr])),Hi(n2,Xr,Object.keys(yT[Xr])),n2);function QK(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.skipLookups,i=r===void 0?!1:r,a=(t={},Hi(t,hr,"".concat(ft.cssPrefix,"-").concat(hr)),Hi(t,Xr,"".concat(ft.cssPrefix,"-").concat(Xr)),t),o=null,u=hr;(e.includes(a[hr])||e.some(function(f){return vSe[hr].includes(f)}))&&(u=hr),(e.includes(a[Xr])||e.some(function(f){return vSe[Xr].includes(f)}))&&(u=Xr);var c=e.reduce(function(f,s){var l=jHn(ft.cssPrefix,s);if(Q1[s]?(s=FHn[u].includes(s)?fHn[u][s]:s,o=s,f.prefix=s):WHn[u].indexOf(s)>-1?(o=s,f.prefix=XK(s,{family:u})):l?f.iconName=l:s!==ft.replacementClass&&s!==a[hr]&&s!==a[Xr]&&f.rest.push(s),!i&&f.prefix&&f.iconName){var d=o==="fa"?Bit(f.iconName):{},p=eb(f.prefix,f.iconName);d.prefix&&(o=null),f.iconName=d.iconName||p||f.iconName,f.prefix=d.prefix||f.prefix,f.prefix==="far"&&!Q1.far&&Q1.fas&&!ft.autoFetchSvg&&(f.prefix="fas")}return f},qhe());return(e.includes("fa-brands")||e.includes("fab"))&&(c.prefix="fab"),(e.includes("fa-duotone")||e.includes("fad"))&&(c.prefix="fad"),!c.prefix&&u===Xr&&(Q1.fass||ft.autoFetchSvg)&&(c.prefix="fass",c.iconName=eb(c.prefix,c.iconName)||c.iconName),(c.prefix==="fa"||o==="fa")&&(c.prefix=Zm()||"fas"),c}var qHn=function(){function e(){ZGn(this,e),this.definitions={}}return XGn(e,[{key:"add",value:function(){for(var n=this,r=arguments.length,i=new Array(r),a=0;a0&&s.forEach(function(l){typeof l=="string"&&(n[u][l]=f)}),n[u][c]=f}),n}}]),e}(),mSe=[],eI={},lI={},xHn=Object.keys(lI);function DHn(e,t){var n=t.mixoutsTo;return mSe=e,eI={},Object.keys(lI).forEach(function(r){xHn.indexOf(r)===-1&&delete lI[r]}),mSe.forEach(function(r){var i=r.mixout?r.mixout():{};if(Object.keys(i).forEach(function(o){typeof i[o]=="function"&&(n[o]=i[o]),Bq(i[o])==="object"&&Object.keys(i[o]).forEach(function(u){n[o]||(n[o]={}),n[o][u]=i[o][u]})}),r.hooks){var a=r.hooks();Object.keys(a).forEach(function(o){eI[o]||(eI[o]=[]),eI[o].push(a[o])})}r.provides&&r.provides(lI)}),n}function HH(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i1?t-1:0),r=1;r0&&arguments[0]!==void 0?arguments[0]:{};return Bv?(kb("beforeI2svg",t),sh("pseudoElements2svg",t),sh("i2svg",t)):Promise.reject("Operation requires a DOM of some kind.")},watch:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot;ft.autoReplaceSvg===!1&&(ft.autoReplaceSvg=!0),ft.observeMutations=!0,OHn(function(){zHn({autoReplaceSvgRoot:n}),kb("watch",t)})}},VHn={icon:function(t){if(t===null)return null;if(Bq(t)==="object"&&t.prefix&&t.iconName)return{prefix:t.prefix,iconName:eb(t.prefix,t.iconName)||t.iconName};if(Array.isArray(t)&&t.length===2){var n=t[1].indexOf("fa-")===0?t[1].slice(3):t[1],r=XK(t[0]);return{prefix:r,iconName:eb(r,n)||n}}if(typeof t=="string"&&(t.indexOf("".concat(ft.cssPrefix,"-"))>-1||t.match(sHn))){var i=QK(t.split(" "),{skipLookups:!0});return{prefix:i.prefix||Zm(),iconName:eb(i.prefix,i.iconName)||i.iconName}}if(typeof t=="string"){var a=Zm();return{prefix:a,iconName:eb(a,t)||t}}}},tf={noAuto:LHn,config:ft,dom:BHn,parse:VHn,library:Vit,findIconDefinition:JH,toHtml:xk},zHn=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot,r=n===void 0?vr:n;(Object.keys(gs.styles).length>0||ft.autoFetchSvg)&&Bv&&ft.autoReplaceSvg&&tf.dom.i2svg({node:r})};function e8(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(r){return xk(r)})}}),Object.defineProperty(e,"node",{get:function(){if(Bv){var r=vr.createElement("div");return r.innerHTML=e.html,r.children}}}),e}function KHn(e){var t=e.children,n=e.main,r=e.mask,i=e.attributes,a=e.styles,o=e.transform;if(jhe(o)&&n.found&&!r.found){var u=n.width,c=n.height,f={x:u/c/2,y:.5};i.style=ZK(Xe(Xe({},a),{},{"transform-origin":"".concat(f.x+o.x/16,"em ").concat(f.y+o.y/16,"em")}))}return[{tag:"svg",attributes:i,children:t}]}function GHn(e){var t=e.prefix,n=e.iconName,r=e.children,i=e.attributes,a=e.symbol,o=a===!0?"".concat(t,"-").concat(ft.cssPrefix,"-").concat(n):a;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:Xe(Xe({},i),{},{id:o}),children:r}]}]}function xhe(e){var t=e.icons,n=t.main,r=t.mask,i=e.prefix,a=e.iconName,o=e.transform,u=e.symbol,c=e.title,f=e.maskId,s=e.titleId,l=e.extra,d=e.watchable,p=d===void 0?!1:d,v=r.found?r:n,h=v.width,$=v.height,b=i==="fak",y=[ft.replacementClass,a?"".concat(ft.cssPrefix,"-").concat(a):""].filter(function(N){return l.classes.indexOf(N)===-1}).filter(function(N){return N!==""||!!N}).concat(l.classes).join(" "),m={children:[],attributes:Xe(Xe({},l.attributes),{},{"data-prefix":i,"data-icon":a,class:y,role:l.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(h," ").concat($)})},g=b&&!~l.classes.indexOf("fa-fw")?{width:"".concat(h/$*16*.0625,"em")}:{};p&&(m.attributes[jb]=""),c&&(m.children.push({tag:"title",attributes:{id:m.attributes["aria-labelledby"]||"title-".concat(s||$T())},children:[c]}),delete m.attributes.title);var _=Xe(Xe({},m),{},{prefix:i,iconName:a,main:n,mask:r,maskId:f,transform:o,symbol:u,styles:Xe(Xe({},g),l.styles)}),I=r.found&&n.found?sh("generateAbstractMask",_)||{children:[],attributes:{}}:sh("generateAbstractIcon",_)||{children:[],attributes:{}},A=I.children,E=I.attributes;return _.children=A,_.attributes=E,u?GHn(_):KHn(_)}function gSe(e){var t=e.content,n=e.width,r=e.height,i=e.transform,a=e.title,o=e.extra,u=e.watchable,c=u===void 0?!1:u,f=Xe(Xe(Xe({},o.attributes),a?{title:a}:{}),{},{class:o.classes.join(" ")});c&&(f[jb]="");var s=Xe({},o.styles);jhe(i)&&(s.transform=wHn({transform:i,startCentered:!0,width:n,height:r}),s["-webkit-transform"]=s.transform);var l=ZK(s);l.length>0&&(f.style=l);var d=[];return d.push({tag:"span",attributes:f,children:[t]}),a&&d.push({tag:"span",attributes:{class:"sr-only"},children:[a]}),d}function HHn(e){var t=e.content,n=e.title,r=e.extra,i=Xe(Xe(Xe({},r.attributes),n?{title:n}:{}),{},{class:r.classes.join(" ")}),a=ZK(r.styles);a.length>0&&(i.style=a);var o=[];return o.push({tag:"span",attributes:i,children:[t]}),n&&o.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),o}var I9=gs.styles;function YH(e){var t=e[0],n=e[1],r=e.slice(4),i=The(r,1),a=i[0],o=null;return Array.isArray(a)?o={tag:"g",attributes:{class:"".concat(ft.cssPrefix,"-").concat(Qy.GROUP)},children:[{tag:"path",attributes:{class:"".concat(ft.cssPrefix,"-").concat(Qy.SECONDARY),fill:"currentColor",d:a[0]}},{tag:"path",attributes:{class:"".concat(ft.cssPrefix,"-").concat(Qy.PRIMARY),fill:"currentColor",d:a[1]}}]}:o={tag:"path",attributes:{fill:"currentColor",d:a}},{found:!0,width:t,height:n,icon:o}}var JHn={found:!1,width:512,height:512};function YHn(e,t){!Tit&&!ft.showMissingIcons&&e&&console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}function ZH(e,t){var n=t;return t==="fa"&&ft.styleDefault!==null&&(t=Zm()),new Promise(function(r,i){if(sh("missingIconAbstract"),n==="fa"){var a=Bit(e)||{};e=a.iconName||e,t=a.prefix||t}if(e&&t&&I9[t]&&I9[t][e]){var o=I9[t][e];return r(YH(o))}YHn(e,t),r(Xe(Xe({},JHn),{},{icon:ft.showMissingIcons&&e?sh("missingIconAbstract")||{}:{}}))})}var ySe=function(){},XH=ft.measurePerformance&&HU&&HU.mark&&HU.measure?HU:{mark:ySe,measure:ySe},aE='FA "6.5.1"',ZHn=function(t){return XH.mark("".concat(aE," ").concat(t," begins")),function(){return zit(t)}},zit=function(t){XH.mark("".concat(aE," ").concat(t," ends")),XH.measure("".concat(aE," ").concat(t),"".concat(aE," ").concat(t," begins"),"".concat(aE," ").concat(t," ends"))},Dhe={begin:ZHn,end:zit},E2=function(){};function bSe(e){var t=e.getAttribute?e.getAttribute(jb):null;return typeof t=="string"}function XHn(e){var t=e.getAttribute?e.getAttribute(Phe):null,n=e.getAttribute?e.getAttribute(Fhe):null;return t&&n}function QHn(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(ft.replacementClass)}function eJn(){if(ft.autoReplaceSvg===!0)return T2.replace;var e=T2[ft.autoReplaceSvg];return e||T2.replace}function tJn(e){return vr.createElementNS("http://www.w3.org/2000/svg",e)}function nJn(e){return vr.createElement(e)}function Kit(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.ceFn,r=n===void 0?e.tag==="svg"?tJn:nJn:n;if(typeof e=="string")return vr.createTextNode(e);var i=r(e.tag);Object.keys(e.attributes||[]).forEach(function(o){i.setAttribute(o,e.attributes[o])});var a=e.children||[];return a.forEach(function(o){i.appendChild(Kit(o,{ceFn:r}))}),i}function rJn(e){var t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}var T2={replace:function(t){var n=t[0];if(n.parentNode)if(t[1].forEach(function(i){n.parentNode.insertBefore(Kit(i),n)}),n.getAttribute(jb)===null&&ft.keepOriginalSource){var r=vr.createComment(rJn(n));n.parentNode.replaceChild(r,n)}else n.remove()},nest:function(t){var n=t[0],r=t[1];if(~Nhe(n).indexOf(ft.replacementClass))return T2.replace(t);var i=new RegExp("".concat(ft.cssPrefix,"-.*"));if(delete r[0].attributes.id,r[0].attributes.class){var a=r[0].attributes.class.split(" ").reduce(function(u,c){return c===ft.replacementClass||c.match(i)?u.toSvg.push(c):u.toNode.push(c),u},{toNode:[],toSvg:[]});r[0].attributes.class=a.toSvg.join(" "),a.toNode.length===0?n.removeAttribute("class"):n.setAttribute("class",a.toNode.join(" "))}var o=r.map(function(u){return xk(u)}).join(` `);n.setAttribute(jb,""),n.innerHTML=o}};function $Se(e){e()}function Git(e,t){var n=typeof t=="function"?t:E2;if(e.length===0)n();else{var r=$Se;ft.mutateApproach===uHn&&(r=Ym.requestAnimationFrame||$Se),r(function(){var i=eJn(),a=Dhe.begin("mutate");e.map(i),a(),n()})}}var Lhe=!1;function Hit(){Lhe=!0}function QH(){Lhe=!1}var zq=null;function ISe(e){if(sSe&&ft.observeMutations){var t=e.treeCallback,n=t===void 0?E2:t,r=e.nodeCallback,i=r===void 0?E2:r,a=e.pseudoElementsCallback,o=a===void 0?E2:a,u=e.observeMutationsRoot,c=u===void 0?vr:u;zq=new sSe(function(f){if(!Lhe){var s=Zm();vR(f).forEach(function(l){if(l.type==="childList"&&l.addedNodes.length>0&&!bSe(l.addedNodes[0])&&(ft.searchPseudoElements&&o(l.target),n(l.target)),l.type==="attributes"&&l.target.parentNode&&ft.searchPseudoElements&&o(l.target.parentNode),l.type==="attributes"&&bSe(l.target)&&~hHn.indexOf(l.attributeName))if(l.attributeName==="class"&&XHn(l.target)){var d=QK(Nhe(l.target)),p=d.prefix,v=d.iconName;l.target.setAttribute(Phe,p||s),v&&l.target.setAttribute(Fhe,v)}else QHn(l.target)&&i(l.target)})}}),Bv&&zq.observe(c,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function iJn(){zq&&zq.disconnect()}function aJn(e){var t=e.getAttribute("style"),n=[];return t&&(n=t.split(";").reduce(function(r,i){var a=i.split(":"),o=a[0],u=a.slice(1);return o&&u.length>0&&(r[o]=u.join(":").trim()),r},{})),n}function oJn(e){var t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=e.innerText!==void 0?e.innerText.trim():"",i=QK(Nhe(e));return i.prefix||(i.prefix=Zm()),t&&n&&(i.prefix=t,i.iconName=n),i.iconName&&i.prefix||(i.prefix&&r.length>0&&(i.iconName=kHn(i.prefix,e.innerText)||Uhe(i.prefix,KH(e.innerText))),!i.iconName&&ft.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=e.firstChild.data)),i}function uJn(e){var t=vR(e.attributes).reduce(function(i,a){return i.name!=="class"&&i.name!=="style"&&(i[a.name]=a.value),i},{}),n=e.getAttribute("title"),r=e.getAttribute("data-fa-title-id");return ft.autoA11y&&(n?t["aria-labelledby"]="".concat(ft.replacementClass,"-title-").concat(r||$T()):(t["aria-hidden"]="true",t.focusable="false")),t}function cJn(){return{iconName:null,title:null,titleId:null,prefix:null,transform:Yl,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function _Se(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},n=oJn(e),r=n.iconName,i=n.prefix,a=n.rest,o=uJn(e),u=HH("parseNodeAttributes",{},e),c=t.styleParser?aJn(e):[];return Xe({iconName:r,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:i,transform:Yl,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:a,styles:c,attributes:o}},u)}var fJn=gs.styles;function Jit(e){var t=ft.autoReplaceSvg==="nest"?_Se(e,{styleParser:!1}):_Se(e);return~t.extra.classes.indexOf(Cit)?sh("generateLayersText",e,t):sh("generateSvgReplacementMutation",e,t)}var Xm=new Set;Whe.map(function(e){Xm.add("fa-".concat(e))});Object.keys(mT[hr]).map(Xm.add.bind(Xm));Object.keys(mT[Xr]).map(Xm.add.bind(Xm));Xm=Uk(Xm);function SSe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!Bv)return Promise.resolve();var n=vr.documentElement.classList,r=function(l){return n.add("".concat(lSe,"-").concat(l))},i=function(l){return n.remove("".concat(lSe,"-").concat(l))},a=ft.autoFetchSvg?Xm:Whe.map(function(s){return"fa-".concat(s)}).concat(Object.keys(fJn));a.includes("fa")||a.push("fa");var o=[".".concat(Cit,":not([").concat(jb,"])")].concat(a.map(function(s){return".".concat(s,":not([").concat(jb,"])")})).join(", ");if(o.length===0)return Promise.resolve();var u=[];try{u=vR(e.querySelectorAll(o))}catch{}if(u.length>0)r("pending"),i("complete");else return Promise.resolve();var c=Dhe.begin("onTree"),f=u.reduce(function(s,l){try{var d=Jit(l);d&&s.push(d)}catch(p){Tit||p.name==="MissingIcon"&&console.error(p)}return s},[]);return new Promise(function(s,l){Promise.all(f).then(function(d){Git(d,function(){r("active"),r("complete"),i("pending"),typeof t=="function"&&t(),c(),s()})}).catch(function(d){c(),l(d)})})}function sJn(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;Jit(e).then(function(n){n&&Git([n],t)})}function lJn(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(t||{}).icon?t:JH(t||{}),i=n.mask;return i&&(i=(i||{}).icon?i:JH(i||{})),e(r,Xe(Xe({},n),{},{mask:i}))}}var dJn=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.transform,i=r===void 0?Yl:r,a=n.symbol,o=a===void 0?!1:a,u=n.mask,c=u===void 0?null:u,f=n.maskId,s=f===void 0?null:f,l=n.title,d=l===void 0?null:l,p=n.titleId,v=p===void 0?null:p,h=n.classes,$=h===void 0?[]:h,b=n.attributes,y=b===void 0?{}:b,m=n.styles,g=m===void 0?{}:m;if(t){var _=t.prefix,I=t.iconName,A=t.icon;return e8(Xe({type:"icon"},t),function(){return kb("beforeDOMElementCreation",{iconDefinition:t,params:n}),ft.autoA11y&&(d?y["aria-labelledby"]="".concat(ft.replacementClass,"-title-").concat(v||$T()):(y["aria-hidden"]="true",y.focusable="false")),xhe({icons:{main:YH(A),mask:c?YH(c.icon):{found:!1,width:null,height:null,icon:{}}},prefix:_,iconName:I,transform:Xe(Xe({},Yl),i),symbol:o,title:d,maskId:s,titleId:v,extra:{attributes:y,styles:g,classes:$}})})}},pJn={mixout:function(){return{icon:lJn(dJn)}},hooks:function(){return{mutationObserverCallbacks:function(n){return n.treeCallback=SSe,n.nodeCallback=sJn,n}}},provides:function(t){t.i2svg=function(n){var r=n.node,i=r===void 0?vr:r,a=n.callback,o=a===void 0?function(){}:a;return SSe(i,o)},t.generateSvgReplacementMutation=function(n,r){var i=r.iconName,a=r.title,o=r.titleId,u=r.prefix,c=r.transform,f=r.symbol,s=r.mask,l=r.maskId,d=r.extra;return new Promise(function(p,v){Promise.all([ZH(i,u),s.iconName?ZH(s.iconName,s.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(h){var $=The(h,2),b=$[0],y=$[1];p([n,xhe({icons:{main:b,mask:y},prefix:u,iconName:i,transform:c,symbol:f,maskId:l,title:a,titleId:o,extra:d,watchable:!0})])}).catch(v)})},t.generateAbstractIcon=function(n){var r=n.children,i=n.attributes,a=n.main,o=n.transform,u=n.styles,c=ZK(u);c.length>0&&(i.style=c);var f;return jhe(o)&&(f=sh("generateAbstractTransformGrouping",{main:a,transform:o,containerWidth:a.width,iconWidth:a.width})),r.push(f||a.icon),{children:r,attributes:i}}}},hJn={mixout:function(){return{layer:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.classes,a=i===void 0?[]:i;return e8({type:"layer"},function(){kb("beforeDOMElementCreation",{assembler:n,params:r});var o=[];return n(function(u){Array.isArray(u)?u.map(function(c){o=o.concat(c.abstract)}):o=o.concat(u.abstract)}),[{tag:"span",attributes:{class:["".concat(ft.cssPrefix,"-layers")].concat(Uk(a)).join(" ")},children:o}]})}}}},vJn={mixout:function(){return{counter:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.title,a=i===void 0?null:i,o=r.classes,u=o===void 0?[]:o,c=r.attributes,f=c===void 0?{}:c,s=r.styles,l=s===void 0?{}:s;return e8({type:"counter",content:n},function(){return kb("beforeDOMElementCreation",{content:n,params:r}),HHn({content:n.toString(),title:a,extra:{attributes:f,styles:l,classes:["".concat(ft.cssPrefix,"-layers-counter")].concat(Uk(u))}})})}}}},mJn={mixout:function(){return{text:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.transform,a=i===void 0?Yl:i,o=r.title,u=o===void 0?null:o,c=r.classes,f=c===void 0?[]:c,s=r.attributes,l=s===void 0?{}:s,d=r.styles,p=d===void 0?{}:d;return e8({type:"text",content:n},function(){return kb("beforeDOMElementCreation",{content:n,params:r}),gSe({content:n,transform:Xe(Xe({},Yl),a),title:u,extra:{attributes:l,styles:p,classes:["".concat(ft.cssPrefix,"-layers-text")].concat(Uk(f))}})})}}},provides:function(t){t.generateLayersText=function(n,r){var i=r.title,a=r.transform,o=r.extra,u=null,c=null;if(Rit){var f=parseInt(getComputedStyle(n).fontSize,10),s=n.getBoundingClientRect();u=s.width/f,c=s.height/f}return ft.autoA11y&&!i&&(o.attributes["aria-hidden"]="true"),Promise.resolve([n,gSe({content:n.innerHTML,width:u,height:c,transform:a,title:i,extra:o,watchable:!0})])}}},gJn=new RegExp('"',"ug"),wSe=[1105920,1112319];function yJn(e){var t=e.replace(gJn,""),n=CHn(t,0),r=n>=wSe[0]&&n<=wSe[1],i=t.length===2?t[0]===t[1]:!1;return{value:KH(i?t[0]:t),isSecondary:r||i}}function ASe(e,t){var n="".concat(oHn).concat(t.replace(":","-"));return new Promise(function(r,i){if(e.getAttribute(n)!==null)return r();var a=vR(e.children),o=a.filter(function(A){return A.getAttribute(zH)===t})[0],u=Ym.getComputedStyle(e,t),c=u.getPropertyValue("font-family").match(lHn),f=u.getPropertyValue("font-weight"),s=u.getPropertyValue("content");if(o&&!c)return e.removeChild(o),r();if(c&&s!=="none"&&s!==""){var l=u.getPropertyValue("content"),d=~["Sharp"].indexOf(c[2])?Xr:hr,p=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(c[2])?gT[d][c[2].toLowerCase()]:dHn[d][f],v=yJn(l),h=v.value,$=v.isSecondary,b=c[0].startsWith("FontAwesome"),y=Uhe(p,h),m=y;if(b){var g=UHn(h);g.iconName&&g.prefix&&(y=g.iconName,p=g.prefix)}if(y&&!$&&(!o||o.getAttribute(Phe)!==p||o.getAttribute(Fhe)!==m)){e.setAttribute(n,m),o&&e.removeChild(o);var _=cJn(),I=_.extra;I.attributes[zH]=t,ZH(y,p).then(function(A){var E=xhe(Xe(Xe({},_),{},{icons:{main:A,mask:qhe()},prefix:p,iconName:m,extra:I,watchable:!0})),N=vr.createElementNS("http://www.w3.org/2000/svg","svg");t==="::before"?e.insertBefore(N,e.firstChild):e.appendChild(N),N.outerHTML=E.map(function(U){return xk(U)}).join(` `),e.removeAttribute(n),r()}).catch(i)}else r()}else r()})}function bJn(e){return Promise.all([ASe(e,"::before"),ASe(e,"::after")])}function $Jn(e){return e.parentNode!==document.head&&!~cHn.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(zH)&&(!e.parentNode||e.parentNode.tagName!=="svg")}function MSe(e){if(Bv)return new Promise(function(t,n){var r=vR(e.querySelectorAll("*")).filter($Jn).map(bJn),i=Dhe.begin("searchPseudoElements");Hit(),Promise.all(r).then(function(){i(),QH(),t()}).catch(function(){i(),QH(),n()})})}var IJn={hooks:function(){return{mutationObserverCallbacks:function(n){return n.pseudoElementsCallback=MSe,n}}},provides:function(t){t.pseudoElements2svg=function(n){var r=n.node,i=r===void 0?vr:r;ft.searchPseudoElements&&MSe(i)}}},RSe=!1,_Jn={mixout:function(){return{dom:{unwatch:function(){Hit(),RSe=!0}}}},hooks:function(){return{bootstrap:function(){ISe(HH("mutationObserverCallbacks",{}))},noAuto:function(){iJn()},watch:function(n){var r=n.observeMutationsRoot;RSe?QH():ISe(HH("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},OSe=function(t){var n={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t.toLowerCase().split(" ").reduce(function(r,i){var a=i.toLowerCase().split("-"),o=a[0],u=a.slice(1).join("-");if(o&&u==="h")return r.flipX=!0,r;if(o&&u==="v")return r.flipY=!0,r;if(u=parseFloat(u),isNaN(u))return r;switch(o){case"grow":r.size=r.size+u;break;case"shrink":r.size=r.size-u;break;case"left":r.x=r.x-u;break;case"right":r.x=r.x+u;break;case"up":r.y=r.y-u;break;case"down":r.y=r.y+u;break;case"rotate":r.rotate=r.rotate+u;break}return r},n)},SJn={mixout:function(){return{parse:{transform:function(n){return OSe(n)}}}},hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-transform");return i&&(n.transform=OSe(i)),n}}},provides:function(t){t.generateAbstractTransformGrouping=function(n){var r=n.main,i=n.transform,a=n.containerWidth,o=n.iconWidth,u={transform:"translate(".concat(a/2," 256)")},c="translate(".concat(i.x*32,", ").concat(i.y*32,") "),f="scale(".concat(i.size/16*(i.flipX?-1:1),", ").concat(i.size/16*(i.flipY?-1:1),") "),s="rotate(".concat(i.rotate," 0 0)"),l={transform:"".concat(c," ").concat(f," ").concat(s)},d={transform:"translate(".concat(o/2*-1," -256)")},p={outer:u,inner:l,path:d};return{tag:"g",attributes:Xe({},p.outer),children:[{tag:"g",attributes:Xe({},p.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:Xe(Xe({},r.icon.attributes),p.path)}]}]}}}},_9={x:0,y:0,width:"100%",height:"100%"};function ESe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}function wJn(e){return e.tag==="g"?e.children:[e]}var AJn={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-mask"),a=i?QK(i.split(" ").map(function(o){return o.trim()})):qhe();return a.prefix||(a.prefix=Zm()),n.mask=a,n.maskId=r.getAttribute("data-fa-mask-id"),n}}},provides:function(t){t.generateAbstractMask=function(n){var r=n.children,i=n.attributes,a=n.main,o=n.mask,u=n.maskId,c=n.transform,f=a.width,s=a.icon,l=o.width,d=o.icon,p=SHn({transform:c,containerWidth:l,iconWidth:f}),v={tag:"rect",attributes:Xe(Xe({},_9),{},{fill:"white"})},h=s.children?{children:s.children.map(ESe)}:{},$={tag:"g",attributes:Xe({},p.inner),children:[ESe(Xe({tag:s.tag,attributes:Xe(Xe({},s.attributes),p.path)},h))]},b={tag:"g",attributes:Xe({},p.outer),children:[$]},y="mask-".concat(u||$T()),m="clip-".concat(u||$T()),g={tag:"mask",attributes:Xe(Xe({},_9),{},{id:y,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[v,b]},_={tag:"defs",children:[{tag:"clipPath",attributes:{id:m},children:wJn(d)},g]};return r.push(_,{tag:"rect",attributes:Xe({fill:"currentColor","clip-path":"url(#".concat(m,")"),mask:"url(#".concat(y,")")},_9)}),{children:r,attributes:i}}}},MJn={provides:function(t){var n=!1;Ym.matchMedia&&(n=Ym.matchMedia("(prefers-reduced-motion: reduce)").matches),t.missingIconAbstract=function(){var r=[],i={fill:"currentColor"},a={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};r.push({tag:"path",attributes:Xe(Xe({},i),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var o=Xe(Xe({},a),{},{attributeName:"opacity"}),u={tag:"circle",attributes:Xe(Xe({},i),{},{cx:"256",cy:"364",r:"28"}),children:[]};return n||u.children.push({tag:"animate",attributes:Xe(Xe({},a),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:Xe(Xe({},o),{},{values:"1;0;1;1;0;1;"})}),r.push(u),r.push({tag:"path",attributes:Xe(Xe({},i),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:n?[]:[{tag:"animate",attributes:Xe(Xe({},o),{},{values:"1;0;0;0;0;1;"})}]}),n||r.push({tag:"path",attributes:Xe(Xe({},i),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:Xe(Xe({},o),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},RJn={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-symbol"),a=i===null?!1:i===""?!0:i;return n.symbol=a,n}}}},OJn=[MHn,pJn,hJn,vJn,mJn,IJn,_Jn,SJn,AJn,MJn,RJn];DHn(OJn,{mixoutsTo:tf});tf.noAuto;tf.config;tf.library;tf.dom;var eJ=tf.parse;tf.findIconDefinition;tf.toHtml;var EJn=tf.icon;tf.layer;tf.text;tf.counter;var tJ={exports:{}},r2={exports:{}},On={};/** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var TSe;function TJn(){if(TSe)return On;TSe=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,s=e?Symbol.for("react.forward_ref"):60112,l=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,$=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function m(_){if(typeof _=="object"&&_!==null){var I=_.$$typeof;switch(I){case t:switch(_=_.type,_){case c:case f:case r:case a:case i:case l:return _;default:switch(_=_&&_.$$typeof,_){case u:case s:case v:case p:case o:return _;default:return I}}case n:return I}}}function g(_){return m(_)===f}return On.AsyncMode=c,On.ConcurrentMode=f,On.ContextConsumer=u,On.ContextProvider=o,On.Element=t,On.ForwardRef=s,On.Fragment=r,On.Lazy=v,On.Memo=p,On.Portal=n,On.Profiler=a,On.StrictMode=i,On.Suspense=l,On.isAsyncMode=function(_){return g(_)||m(_)===c},On.isConcurrentMode=g,On.isContextConsumer=function(_){return m(_)===u},On.isContextProvider=function(_){return m(_)===o},On.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===t},On.isForwardRef=function(_){return m(_)===s},On.isFragment=function(_){return m(_)===r},On.isLazy=function(_){return m(_)===v},On.isMemo=function(_){return m(_)===p},On.isPortal=function(_){return m(_)===n},On.isProfiler=function(_){return m(_)===a},On.isStrictMode=function(_){return m(_)===i},On.isSuspense=function(_){return m(_)===l},On.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===r||_===f||_===a||_===i||_===l||_===d||typeof _=="object"&&_!==null&&(_.$$typeof===v||_.$$typeof===p||_.$$typeof===o||_.$$typeof===u||_.$$typeof===s||_.$$typeof===$||_.$$typeof===b||_.$$typeof===y||_.$$typeof===h)},On.typeOf=m,On}var En={};/** @license React v16.13.1 * react-is.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var CSe;function CJn(){return CSe||(CSe=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,s=e?Symbol.for("react.forward_ref"):60112,l=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,$=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function m(Ne){return typeof Ne=="string"||typeof Ne=="function"||Ne===r||Ne===f||Ne===a||Ne===i||Ne===l||Ne===d||typeof Ne=="object"&&Ne!==null&&(Ne.$$typeof===v||Ne.$$typeof===p||Ne.$$typeof===o||Ne.$$typeof===u||Ne.$$typeof===s||Ne.$$typeof===$||Ne.$$typeof===b||Ne.$$typeof===y||Ne.$$typeof===h)}function g(Ne){if(typeof Ne=="object"&&Ne!==null){var ct=Ne.$$typeof;switch(ct){case t:var $t=Ne.type;switch($t){case c:case f:case r:case a:case i:case l:return $t;default:var yt=$t&&$t.$$typeof;switch(yt){case u:case s:case v:case p:case o:return yt;default:return ct}}case n:return ct}}}var _=c,I=f,A=u,E=o,N=t,U=s,te=r,Ie=v,je=p,J=n,ee=a,fe=i,ae=l,he=!1;function _e(Ne){return he||(he=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),Z(Ne)||g(Ne)===c}function Z(Ne){return g(Ne)===f}function ve(Ne){return g(Ne)===u}function Ee(Ne){return g(Ne)===o}function H(Ne){return typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===t}function re(Ne){return g(Ne)===s}function oe(Ne){return g(Ne)===r}function ie(Ne){return g(Ne)===v}function le(Ne){return g(Ne)===p}function me(Ne){return g(Ne)===n}function ye(Ne){return g(Ne)===a}function We(Ne){return g(Ne)===i}function Ke(Ne){return g(Ne)===l}En.AsyncMode=_,En.ConcurrentMode=I,En.ContextConsumer=A,En.ContextProvider=E,En.Element=N,En.ForwardRef=U,En.Fragment=te,En.Lazy=Ie,En.Memo=je,En.Portal=J,En.Profiler=ee,En.StrictMode=fe,En.Suspense=ae,En.isAsyncMode=_e,En.isConcurrentMode=Z,En.isContextConsumer=ve,En.isContextProvider=Ee,En.isElement=H,En.isForwardRef=re,En.isFragment=oe,En.isLazy=ie,En.isMemo=le,En.isPortal=me,En.isProfiler=ye,En.isStrictMode=We,En.isSuspense=Ke,En.isValidElementType=m,En.typeOf=g}()),En}var PSe;function Yit(){return PSe||(PSe=1,process.env.NODE_ENV==="production"?r2.exports=TJn():r2.exports=CJn()),r2.exports}/* object-assign (c) Sindre Sorhus @license MIT */var S9,FSe;function PJn(){if(FSe)return S9;FSe=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var o={},u=0;u<10;u++)o["_"+String.fromCharCode(u)]=u;var c=Object.getOwnPropertyNames(o).map(function(s){return o[s]});if(c.join("")!=="0123456789")return!1;var f={};return"abcdefghijklmnopqrst".split("").forEach(function(s){f[s]=s}),Object.keys(Object.assign({},f)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return S9=i()?Object.assign:function(a,o){for(var u,c=r(a),f,s=1;s1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),o;function ve(Ee,H,re,oe,ie){for(var le=Ee[H],me=0;me0?", expected one of type ["+ye.join(", ")+"]":"";return new h("Invalid "+le+" `"+me+"` supplied to "+("`"+ie+"`"+ct+"."))}return $(H)}function U(){function Z(ve,Ee,H,re,oe){return J(ve[Ee])?null:new h("Invalid "+re+" `"+oe+"` supplied to "+("`"+H+"`, expected a ReactNode."))}return $(Z)}function te(Z,ve,Ee,H,re){return new h((Z||"React class")+": "+ve+" type `"+Ee+"."+H+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+re+"`.")}function Ie(Z){function ve(Ee,H,re,oe,ie){var le=Ee[H],me=fe(le);if(me!=="object")return new h("Invalid "+oe+" `"+ie+"` of type `"+me+"` "+("supplied to `"+re+"`, expected `object`."));for(var ye in Z){var We=Z[ye];if(typeof We!="function")return te(re,oe,ie,ye,ae(We));var Ke=We(le,ye,re,oe,ie+"."+ye,n);if(Ke)return Ke}return null}return $(ve)}function je(Z){function ve(Ee,H,re,oe,ie){var le=Ee[H],me=fe(le);if(me!=="object")return new h("Invalid "+oe+" `"+ie+"` of type `"+me+"` "+("supplied to `"+re+"`, expected `object`."));var ye=t({},Ee[H],Z);for(var We in ye){var Ke=Z[We];if(r(Z,We)&&typeof Ke!="function")return te(re,oe,ie,We,ae(Ke));if(!Ke)return new h("Invalid "+oe+" `"+ie+"` key `"+We+"` supplied to `"+re+"`.\nBad object: "+JSON.stringify(Ee[H],null," ")+` Valid keys: `+JSON.stringify(Object.keys(Z),null," "));var Ne=Ke(le,We,re,oe,ie+"."+We,n);if(Ne)return Ne}return null}return $(ve)}function J(Z){switch(typeof Z){case"number":case"string":case"undefined":return!0;case"boolean":return!Z;case"object":if(Array.isArray(Z))return Z.every(J);if(Z===null||u(Z))return!0;var ve=l(Z);if(ve){var Ee=ve.call(Z),H;if(ve!==Z.entries){for(;!(H=Ee.next()).done;)if(!J(H.value))return!1}else for(;!(H=Ee.next()).done;){var re=H.value;if(re&&!J(re[1]))return!1}}else return!1;return!0;default:return!1}}function ee(Z,ve){return Z==="symbol"?!0:ve?ve["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&ve instanceof Symbol:!1}function fe(Z){var ve=typeof Z;return Array.isArray(Z)?"array":Z instanceof RegExp?"object":ee(ve,Z)?"symbol":ve}function ae(Z){if(typeof Z>"u"||Z===null)return""+Z;var ve=fe(Z);if(ve==="object"){if(Z instanceof Date)return"date";if(Z instanceof RegExp)return"regexp"}return ve}function he(Z){var ve=ae(Z);switch(ve){case"array":case"object":return"an "+ve;case"boolean":case"date":case"regexp":return"a "+ve;default:return ve}}function _e(Z){return!Z.constructor||!Z.constructor.name?d:Z.constructor.name}return p.checkPropTypes=i,p.resetWarningCache=i.resetWarningCache,p.PropTypes=p,p},R9}var O9,USe;function NJn(){if(USe)return O9;USe=1;var e=Bhe();function t(){}function n(){}return n.resetWarningCache=t,O9=function(){function r(o,u,c,f,s,l){if(l!==e){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}r.isRequired=r;function i(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},O9}if(process.env.NODE_ENV!=="production"){var jJn=Yit(),kJn=!0;tJ.exports=WJn()(jJn.isElement,kJn)}else tJ.exports=NJn()();var UJn=tJ.exports;const Kt=TD(UJn);function qSe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function gm(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function xJn(e,t){if(e==null)return{};var n=qJn(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function nJ(e){return DJn(e)||LJn(e)||BJn(e)||VJn()}function DJn(e){if(Array.isArray(e))return rJ(e)}function LJn(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function BJn(e,t){if(e){if(typeof e=="string")return rJ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rJ(e,t)}}function rJ(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&arguments[2]!==void 0?arguments[2]:{};if(typeof t=="string")return t;var r=(t.children||[]).map(function(c){return Qit(e,c)}),i=Object.keys(t.attributes||{}).reduce(function(c,f){var s=t.attributes[f];switch(f){case"class":c.attrs.className=s,delete t.attributes.class;break;case"style":c.attrs.style=JJn(s);break;default:f.indexOf("aria-")===0||f.indexOf("data-")===0?c.attrs[f.toLowerCase()]=s:c.attrs[Xit(f)]=s}return c},{attrs:{}}),a=n.style,o=a===void 0?{}:a,u=xJn(n,GJn);return i.attrs.style=gm(gm({},i.attrs.style),o),e.apply(void 0,[t.tag,gm(gm({},i.attrs),u)].concat(nJ(r)))}var eat=!1;try{eat=process.env.NODE_ENV==="production"}catch{}function YJn(){if(!eat&&console&&typeof console.error=="function"){var e;(e=console).error.apply(e,arguments)}}function xSe(e){if(e&&Kq(e)==="object"&&e.prefix&&e.iconName&&e.icon)return e;if(eJ.icon)return eJ.icon(e);if(e===null)return null;if(e&&Kq(e)==="object"&&e.prefix&&e.iconName)return e;if(Array.isArray(e)&&e.length===2)return{prefix:e[0],iconName:e[1]};if(typeof e=="string")return{prefix:"fas",iconName:e}}function E9(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?tI({},e,t):{}}var Qm=pe.forwardRef(function(e,t){var n=e.icon,r=e.mask,i=e.symbol,a=e.className,o=e.title,u=e.titleId,c=e.maskId,f=xSe(n),s=E9("classes",[].concat(nJ(zJn(e)),nJ(a.split(" ")))),l=E9("transform",typeof e.transform=="string"?eJ.transform(e.transform):e.transform),d=E9("mask",xSe(r)),p=EJn(f,gm(gm(gm(gm({},s),l),d),{},{symbol:i,title:o,titleId:u,maskId:c}));if(!p)return YJn("Could not find icon",f),null;var v=p.abstract,h={ref:t};return Object.keys(e).forEach(function($){Qm.defaultProps.hasOwnProperty($)||(h[$]=e[$])}),ZJn(v[0],h)});Qm.displayName="FontAwesomeIcon";Qm.propTypes={beat:Kt.bool,border:Kt.bool,beatFade:Kt.bool,bounce:Kt.bool,className:Kt.string,fade:Kt.bool,flash:Kt.bool,mask:Kt.oneOfType([Kt.object,Kt.array,Kt.string]),maskId:Kt.string,fixedWidth:Kt.bool,inverse:Kt.bool,flip:Kt.oneOf([!0,!1,"horizontal","vertical","both"]),icon:Kt.oneOfType([Kt.object,Kt.array,Kt.string]),listItem:Kt.bool,pull:Kt.oneOf(["right","left"]),pulse:Kt.bool,rotation:Kt.oneOf([0,90,180,270]),shake:Kt.bool,size:Kt.oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:Kt.bool,spinPulse:Kt.bool,spinReverse:Kt.bool,symbol:Kt.oneOfType([Kt.bool,Kt.string]),title:Kt.string,titleId:Kt.string,transform:Kt.oneOfType([Kt.string,Kt.object]),swapOpacity:Kt.bool};Qm.defaultProps={border:!1,className:"",mask:null,maskId:null,fixedWidth:!1,inverse:!1,flip:!1,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:null,transform:null,swapOpacity:!1};var ZJn=Qit.bind(null,pe.createElement);function tat(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t":">",'"':""","'":"'","/":"/","`":"`","=":"="};function fYn(e){return String(e).replace(/[&<>"'`=\/]/g,function(n){return cYn[n]})}var sYn=/\s*/,lYn=/\s+/,LSe=/\s*=/,dYn=/\s*\}/,pYn=/#|\^|\/|>|\{|&|=|!/;function hYn(e,t){if(!e)return[];var n=!1,r=[],i=[],a=[],o=!1,u=!1,c="",f=0;function s(){if(o&&!u)for(;a.length;)delete i[a.pop()];else a=[];o=!1,u=!1}var l,d,p;function v(E){if(typeof E=="string"&&(E=E.split(lYn,2)),!mR(E)||E.length!==2)throw new Error("Invalid tags: "+E);l=new RegExp(T9(E[0])+"\\s*"),d=new RegExp("\\s*"+T9(E[1])),p=new RegExp("\\s*"+T9("}"+E[1]))}v(t||$f.tags);for(var h=new Dk(e),$,b,y,m,g,_;!h.eos();){if($=h.pos,y=h.scanUntil(l),y)for(var I=0,A=y.length;I"?g=[b,y,$,h.pos,c,f,n]:g=[b,y,$,h.pos],f++,i.push(g),b==="#"||b==="^")r.push(g);else if(b==="/"){if(_=r.pop(),!_)throw new Error('Unopened section "'+y+'" at '+$);if(_[1]!==y)throw new Error('Unclosed section "'+_[1]+'" at '+$)}else b==="name"||b==="{"||b==="&"?u=!0:b==="="&&v(y)}if(s(),_=r.pop(),_)throw new Error('Unclosed section "'+_[1]+'" at '+h.pos);return mYn(vYn(i))}function vYn(e){for(var t=[],n,r,i=0,a=e.length;i0?r[r.length-1][4]:t;break;default:n.push(i)}return t}function Dk(e){this.string=e,this.tail=e,this.pos=0}Dk.prototype.eos=function(){return this.tail===""};Dk.prototype.scan=function(t){var n=this.tail.match(t);if(!n||n.index!==0)return"";var r=n[0];return this.tail=this.tail.substring(r.length),this.pos+=r.length,r};Dk.prototype.scanUntil=function(t){var n=this.tail.search(t),r;switch(n){case-1:r=this.tail,this.tail="";break;case 0:r="";break;default:r=this.tail.substring(0,n),this.tail=this.tail.substring(n)}return this.pos+=r.length,r};function tS(e,t){this.view=e,this.cache={".":this.view},this.parent=t}tS.prototype.push=function(t){return new tS(t,this)};tS.prototype.lookup=function(t){var n=this.cache,r;if(n.hasOwnProperty(t))r=n[t];else{for(var i=this,a,o,u,c=!1;i;){if(t.indexOf(".")>0)for(a=i.view,o=t.split("."),u=0;a!=null&&u"?f=this.renderPartial(u,n,r,a):c==="&"?f=this.unescapedValue(u,n):c==="name"?f=this.escapedValue(u,n,a):c==="text"&&(f=this.rawValue(u)),f!==void 0&&(o+=f);return o};Iu.prototype.renderSection=function(t,n,r,i,a){var o=this,u="",c=n.lookup(t[1]);function f(d){return o.render(d,n,r,a)}if(c){if(mR(c))for(var s=0,l=c.length;s0||!r)&&(a[o]=i+a[o]);return a.join(` `)};Iu.prototype.renderPartial=function(t,n,r,i){if(r){var a=this.getConfigTags(i),o=Vhe(r)?r(t[1]):r[t[1]];if(o!=null){var u=t[6],c=t[5],f=t[4],s=o;c==0&&f&&(s=this.indentPartial(o,f,u));var l=this.parse(s,a);return this.renderTokens(l,n,r,s,i)}}};Iu.prototype.unescapedValue=function(t,n){var r=n.lookup(t[1]);if(r!=null)return r};Iu.prototype.escapedValue=function(t,n,r){var i=this.getConfigEscape(r)||$f.escape,a=n.lookup(t[1]);if(a!=null)return typeof a=="number"&&i===$f.escape?String(a):i(a)};Iu.prototype.rawValue=function(t){return t[1]};Iu.prototype.getConfigTags=function(t){return mR(t)?t:t&&typeof t=="object"?t.tags:void 0};Iu.prototype.getConfigEscape=function(t){if(t&&typeof t=="object"&&!mR(t))return t.escape};var $f={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(e){IT.templateCache=e},get templateCache(){return IT.templateCache}},IT=new Iu;$f.clearCache=function(){return IT.clearCache()};$f.parse=function(t,n){return IT.parse(t,n)};$f.render=function(t,n,r,i){if(typeof t!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+nYn(t)+'" was given as the first argument for mustache#render(template, view, partials)');return IT.render(t,n,r,i)};$f.escape=fYn;$f.Scanner=Dk;$f.Context=tS;$f.Writer=Iu;function U1(){}function gYn(){return!0}function QO(e){return!!(e||"").match(/\d/)}function BSe(e){return e==null}function VSe(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function yYn(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function bYn(e,t,n){var r=yYn(n),i=e.search(/[1-9]/);return i=i===-1?e.length:i,e.substring(0,i)+e.substring(i,e.length).replace(r,"$1"+t)}function iJ(e,t){t===void 0&&(t=!0);var n=e[0]==="-",r=n&&t;e=e.replace("-","");var i=e.split("."),a=i[0],o=i[1]||"";return{beforeDecimal:a,afterDecimal:o,hasNagation:n,addNegation:r}}function $Yn(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var n=e.split("."),r=n[0].replace(/^0+/,"")||"0",i=n[1]||"";return(t?"-":"")+r+(i?"."+i:"")}function rat(e,t,n){for(var r="",i=n?"0":"",a=0;a<=t-1;a++)r+=e[a]||i;return r}function zSe(e,t){return Array(t+1).join(e)}function IYn(e){e+="";var t=e[0]==="-"?"-":"";t&&(e=e.substring(1));var n=e.split(/[eE]/g),r=n[0],i=n[1];if(i=Number(i),!i)return t+r;r=r.replace(".","");var a=1+i,o=r.length;return a<0?r="0."+zSe("0",Math.abs(a))+r:a>=o?r=r+zSe("0",a-o):r=(r.substring(0,a)||"0")+"."+r.substring(a),t+r}function _Yn(e,t,n){if(["","-"].indexOf(e)!==-1)return e;var r=e.indexOf(".")!==-1&&t,i=iJ(e),a=i.beforeDecimal,o=i.afterDecimal,u=i.hasNagation,c=parseFloat("0."+(o||"0")),f=o.length<=t?"0."+o:c.toFixed(t),s=f.split("."),l=a.split("").reverse().reduce(function(h,$,b){return h.length>b?(Number(h[0])+Number($)).toString()+h.substring(1,h.length):$+h},s[0]),d=rat(s[1]||"",Math.min(t,o.length),n),p=u?"-":"",v=r?".":"";return""+p+l+v+d}function KSe(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}function SYn(e,t){for(var n=0,r=0,i=e.length,a=t.length;e[n]===t[n]&&nn&&i-r>n;)r++;return{start:n,end:i-r}}function C9(e,t,n){return Math.min(Math.max(e,t),n)}function GSe(e){return Math.max(e.selectionStart,e.selectionEnd)}function wYn(e){return e||typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function AYn(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)===-1&&(n[r]=e[r]);return n}var MYn={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:U1,onChange:U1,onKeyDown:U1,onMouseUp:U1,onFocus:U1,onBlur:U1,isAllowed:gYn},iat=function(e){function t(n){e.call(this,n);var r=n.defaultValue;this.validateProps();var i=this.formatValueProp(r);this.state={value:i,numAsString:this.removeFormatting(i),mounted:!1},this.selectionBeforeInput={selectionStart:0,selectionEnd:0},this.onChange=this.onChange.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.componentDidMount=function(){this.setState({mounted:!0})},t.prototype.componentDidUpdate=function(r){this.updateValueIfRequired(r)},t.prototype.componentWillUnmount=function(){clearTimeout(this.focusTimeout),clearTimeout(this.caretPositionTimeout)},t.prototype.updateValueIfRequired=function(r){var i=this,a=i.props,o=i.state,u=i.focusedElm,c=o.value,f=o.numAsString;if(f===void 0&&(f=""),r!==a){this.validateProps();var s=this.formatNumString(f),l=BSe(a.value)?s:this.formatValueProp(),d=this.removeFormatting(l),p=parseFloat(d),v=parseFloat(f);((!isNaN(p)||!isNaN(v))&&p!==v||s!==c||u===null&&l!==c)&&this.updateValue({formattedValue:l,numAsString:d,input:u,source:"prop",event:null})}},t.prototype.getFloatString=function(r){r===void 0&&(r="");var i=this.props,a=i.decimalScale,o=this.getSeparators(),u=o.decimalSeparator,c=this.getNumberRegex(!0),f=r[0]==="-";f&&(r=r.replace("-","")),u&&a===0&&(r=r.split(u)[0]),r=(r.match(c)||[]).join("").replace(u,".");var s=r.indexOf(".");return s!==-1&&(r=r.substring(0,s)+"."+r.substring(s+1,r.length).replace(new RegExp(VSe(u),"g"),"")),f&&(r="-"+r),r},t.prototype.getNumberRegex=function(r,i){var a=this.props,o=a.format,u=a.decimalScale,c=a.customNumerals,f=this.getSeparators(),s=f.decimalSeparator;return new RegExp("[0-9"+(c?c.join(""):"")+"]"+(s&&u!==0&&!i&&!o?"|"+VSe(s):""),r?"g":void 0)},t.prototype.getSeparators=function(){var r=this.props,i=r.decimalSeparator,a=this.props,o=a.thousandSeparator,u=a.allowedDecimalSeparators;return o===!0&&(o=","),u||(u=[i,"."]),{decimalSeparator:i,thousandSeparator:o,allowedDecimalSeparators:u}},t.prototype.getMaskAtIndex=function(r){var i=this.props,a=i.mask;return a===void 0&&(a=" "),typeof a=="string"?a:a[r]||" "},t.prototype.getValueObject=function(r,i){var a=parseFloat(i);return{formattedValue:r,value:i,floatValue:isNaN(a)?void 0:a}},t.prototype.validateProps=function(){var r=this.props,i=r.mask,a=this.getSeparators(),o=a.decimalSeparator,u=a.thousandSeparator;if(o===u)throw new Error(` Decimal separator can't be same as thousand separator. thousandSeparator: `+u+` (thousandSeparator = {true} is same as thousandSeparator = ",") decimalSeparator: `+o+` (default value for decimalSeparator is .) `);if(i){var c=i==="string"?i:i.toString();if(c.match(/\d/g))throw new Error(` Mask `+i+` should not contain numeric character; `)}},t.prototype.setPatchedCaretPosition=function(r,i,a){KSe(r,i),this.caretPositionTimeout=setTimeout(function(){r.value===a&&KSe(r,i)},0)},t.prototype.correctCaretPosition=function(r,i,a){var o=this.props,u=o.prefix,c=o.suffix,f=o.format;if(r==="")return 0;if(i=C9(i,0,r.length),!f){var s=r[0]==="-";return C9(i,u.length+(s?1:0),r.length-c.length)}if(typeof f=="function"||f[i]==="#"&&QO(r[i])||f[i-1]==="#"&&QO(r[i-1]))return i;var l=f.indexOf("#"),d=f.lastIndexOf("#");i=C9(i,l,d+1);for(var p=f.substring(i,f.length).indexOf("#"),v=i,h=i+(p===-1?0:p);v>l&&(f[v]!=="#"||!QO(r[v]));)v-=1;var $=!QO(r[h])||a==="left"&&i!==l||i-v=i.length-c.length||f&&s&&i[r]===d))},t.prototype.correctInputValue=function(r,i,a){var o=this,u=this.props,c=u.format,f=u.allowNegative,s=u.prefix,l=u.suffix,d=u.decimalScale,p=this.getSeparators(),v=p.allowedDecimalSeparators,h=p.decimalSeparator,$=this.state.numAsString||"",b=this.selectionBeforeInput,y=b.selectionStart,m=b.selectionEnd,g=SYn(i,a),_=g.start,I=g.end;if(!c&&_===I&&v.indexOf(a[y])!==-1){var A=d===0?"":h;return a.substr(0,y)+A+a.substr(y+1,a.length)}var E=c?0:s.length,N=i.length-(c?0:l.length);if(a.length>i.length||!a.length||_===I||y===0&&m===i.length||_===0&&I===i.length||y===E&&m===N)return a;var U=i.substr(_,I-_),te=!![].concat(U).find(function(ve,Ee){return o.isCharacterAFormat(Ee+_,i)});if(te){var Ie=i.substr(_),je={},J=[];[].concat(Ie).forEach(function(ve,Ee){o.isCharacterAFormat(Ee+_,i)?je[Ee]=ve:Ee>U.length-1&&J.push(ve)}),Object.keys(je).forEach(function(ve){J.length>ve?J.splice(ve,0,je[ve]):J.push(je[ve])}),a=i.substr(0,_)+J.join("")}if(!c){var ee=this.removeFormatting(a),fe=iJ(ee,f),ae=fe.beforeDecimal,he=fe.afterDecimal,_e=fe.addNegation,Z=r"u"){var N=c.substring(1);this.updateValue({formattedValue:N,caretPos:_,input:i,event:r,source:"event"})}else if(!m.test(c[f])){for(;!y.test(c[_-1])&&_>I;)_--;_=this.correctCaretPosition(c,_,"left")}}(_!==f||fA)&&(r.preventDefault(),this.setPatchedCaretPosition(i,_,c)),r.isUnitTestRun&&this.setPatchedCaretPosition(i,_,c),$(r)},t.prototype.onMouseUp=function(r){var i=r.target,a=i.selectionStart,o=i.selectionEnd,u=i.value;if(u===void 0&&(u=""),a===o){var c=this.correctCaretPosition(u,a);c!==a&&this.setPatchedCaretPosition(i,c,u)}this.props.onMouseUp(r)},t.prototype.onFocus=function(r){var i=this;r.persist(),this.focusedElm=r.target,this.focusTimeout=setTimeout(function(){var a=r.target,o=a.selectionStart,u=a.selectionEnd,c=a.value;c===void 0&&(c="");var f=i.correctCaretPosition(c,o);f!==o&&!(o===0&&u===c.length)&&i.setPatchedCaretPosition(a,f,c),i.props.onFocus(r)},0)},t.prototype.render=function(){var r=this.props,i=r.type,a=r.displayType,o=r.customInput,u=r.renderText,c=r.getInputRef,f=r.format;r.thousandSeparator,r.decimalSeparator,r.allowedDecimalSeparators,r.thousandsGroupStyle,r.decimalScale,r.fixedDecimalScale,r.prefix,r.suffix,r.removeFormatting,r.mask,r.defaultValue,r.isNumericString,r.allowNegative,r.allowEmptyFormatting,r.allowLeadingZeros,r.onValueChange,r.isAllowed,r.customNumerals,r.onChange,r.onKeyDown,r.onMouseUp,r.onFocus,r.onBlur,r.value;var s=AYn(r,["type","displayType","customInput","renderText","getInputRef","format","thousandSeparator","decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","decimalScale","fixedDecimalScale","prefix","suffix","removeFormatting","mask","defaultValue","isNumericString","allowNegative","allowEmptyFormatting","allowLeadingZeros","onValueChange","isAllowed","customNumerals","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value"]),l=s,d=this.state,p=d.value,v=d.mounted,h=v&&wYn(f)?"numeric":void 0,$=Object.assign({inputMode:h},l,{type:i,value:p,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if(a==="text")return u?u(p,l)||null:pe.createElement("span",Object.assign({},l,{ref:c}),p);if(o){var b=o;return pe.createElement(b,Object.assign({},$,{ref:c}))}return pe.createElement("input",Object.assign({},$,{ref:c}))},t}(pe.Component);iat.defaultProps=MYn;function RYn(e,t,n){var r=this,i=pe.useRef(null),a=pe.useRef(0),o=pe.useRef(null),u=pe.useRef([]),c=pe.useRef(),f=pe.useRef(),s=pe.useRef(e),l=pe.useRef(!0);pe.useEffect(function(){s.current=e},[e]);var d=!t&&t!==0&&typeof window<"u";if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var p=!!(n=n||{}).leading,v=!("trailing"in n)||!!n.trailing,h="maxWait"in n,$=h?Math.max(+n.maxWait||0,t):null;pe.useEffect(function(){return l.current=!0,function(){l.current=!1}},[]);var b=pe.useMemo(function(){var y=function(E){var N=u.current,U=c.current;return u.current=c.current=null,a.current=E,f.current=s.current.apply(U,N)},m=function(E,N){d&&cancelAnimationFrame(o.current),o.current=d?requestAnimationFrame(E):setTimeout(E,N)},g=function(E){if(!l.current)return!1;var N=E-i.current;return!i.current||N>=t||N<0||h&&E-a.current>=$},_=function(E){return o.current=null,v&&u.current?y(E):(u.current=c.current=null,f.current)},I=function E(){var N=Date.now();if(g(N))return _(N);if(l.current){var U=t-(N-i.current),te=h?Math.min(U,$-(N-a.current)):U;m(E,te)}},A=function(){var E=Date.now(),N=g(E);if(u.current=[].slice.call(arguments),c.current=r,i.current=E,N){if(!o.current&&l.current)return a.current=i.current,m(I,t),p?y(i.current):f.current;if(h)return m(I,t),y(i.current)}return o.current||m(I,t),f.current};return A.cancel=function(){o.current&&(d?cancelAnimationFrame(o.current):clearTimeout(o.current)),a.current=0,u.current=i.current=c.current=o.current=null},A.isPending=function(){return!!o.current},A.flush=function(){return o.current?_(Date.now()):f.current},A},[p,h,t,$,v,d]);return b}var aat=function(){function e(t,n,r){this.r=0,this.g=0,this.b=0,this.set(t,n,r)}return e.prototype.set=function(t,n,r){this.r=this.clamp(t),this.g=this.clamp(n),this.b=this.clamp(r)},e.prototype.hueRotate=function(t){t===void 0&&(t=0),t=t/180*Math.PI;var n=Math.sin(t),r=Math.cos(t);this.multiply([.213+r*.787-n*.213,.715-r*.715-n*.715,.072-r*.072+n*.928,.213-r*.213+n*.143,.715+r*.285+n*.14,.072-r*.072-n*.283,.213-r*.213-n*.787,.715-r*.715+n*.715,.072+r*.928+n*.072])},e.prototype.grayscale=function(t){t===void 0&&(t=1),this.multiply([.2126+.7874*(1-t),.7152-.7152*(1-t),.0722-.0722*(1-t),.2126-.2126*(1-t),.7152+.2848*(1-t),.0722-.0722*(1-t),.2126-.2126*(1-t),.7152-.7152*(1-t),.0722+.9278*(1-t)])},e.prototype.sepia=function(t){t===void 0&&(t=1),this.multiply([.393+.607*(1-t),.769-.769*(1-t),.189-.189*(1-t),.349-.349*(1-t),.686+.314*(1-t),.168-.168*(1-t),.272-.272*(1-t),.534-.534*(1-t),.131+.869*(1-t)])},e.prototype.saturate=function(t){t===void 0&&(t=1),this.multiply([.213+.787*t,.715-.715*t,.072-.072*t,.213-.213*t,.715+.285*t,.072-.072*t,.213-.213*t,.715-.715*t,.072+.928*t])},e.prototype.multiply=function(t){var n=this.clamp(this.r*t[0]+this.g*t[1]+this.b*t[2]),r=this.clamp(this.r*t[3]+this.g*t[4]+this.b*t[5]),i=this.clamp(this.r*t[6]+this.g*t[7]+this.b*t[8]);this.r=n,this.g=r,this.b=i},e.prototype.brightness=function(t){t===void 0&&(t=1),this.linear(t)},e.prototype.contrast=function(t){t===void 0&&(t=1),this.linear(t,-(.5*t)+.5)},e.prototype.linear=function(t,n){t===void 0&&(t=1),n===void 0&&(n=0),this.r=this.clamp(this.r*t+n*255),this.g=this.clamp(this.g*t+n*255),this.b=this.clamp(this.b*t+n*255)},e.prototype.invert=function(t){t===void 0&&(t=1),this.r=this.clamp((t+this.r/255*(1-2*t))*255),this.g=this.clamp((t+this.g/255*(1-2*t))*255),this.b=this.clamp((t+this.b/255*(1-2*t))*255)},e.prototype.hsl=function(){var t=this.r/255,n=this.g/255,r=this.b/255,i=Math.max(t,n,r),a=Math.min(t,n,r),o=0,u=0,c=(i+a)/2;if(i===a)return{h:0,s:0,l:c*100};var f=i-a;return u=c>.5?f/(2-i-a):f/(i+a),i===t?o=(n-r)/f+(nthis.options.acceptanceLossPercentage;){var o=[50,20,3750,50,100,100],u=this.spsa({A:t,a:r,c:n,values:o,maxTriesInLoop:1e3});if(u.loss=this.options.maxChecks)break}return Object.assign({},i,{called:a})},e.prototype.solveNarrow=function(t){var n=t.loss,r=2,i=n+1,a=[.25*i,.25*i,i,.25*i,.2*i,.2*i];return this.spsa({A:n,a,c:r,values:t.values,maxTriesInLoop:500,called:t.called})},e.prototype.fixValueByFilterIDX=function(t,n){var r=100;return n===2?r=7500:(n===4||n===5)&&(r=200),n===3?t>r?t%=r:t<0&&(t=r+t%r):t<0?t=0:t>r&&(t=r),t},e.prototype.spsa=function(t){for(var n=t.A,r=t.a,i=t.c,a=t.values,o=t.maxTriesInLoop,u=o===void 0?500:o,c=t.called,f=c===void 0?0:c,s=1,l=.16666666666666666,d=null,p=1/0,v=new Array(6),h=new Array(6),$=new Array(6),b=6,y=0;y.5?1:-1,h[g]=a[g]+m*v[g],$[g]=a[g]-m*v[g];for(var _=this.loss(h)-this.loss($),g=0;g(n|t<<8|e<<16|1<<24).toString(16).slice(1)+r;function PYn(e,t,n,r){let i=(e+(r||"")).toString().includes("%");if(typeof e=="string"&&!t){const a=FYn(e);if(!a)throw new TypeError("Invalid or unsupported color format.");i=!1,[e,t,n,r]=a}else r!==void 0&&(r=Number.parseFloat(r));if(typeof e!="number"||typeof t!="number"||typeof n!="number"||e>255||t>255||n>255)throw new TypeError("Expected three numbers below 256");if(typeof r=="number"){if(!i&&r>=0&&r<=1)r=Math.round(255*r);else if(i&&r>=0&&r<=100)r=Math.round(255*r/100);else throw new TypeError(`Expected alpha value (${r}) as a fraction or percentage`);r=(r|256).toString(16).slice(1)}else r="";return CYn(e,t,n,r)}const FYn=e=>{const t=e.replace(/rgba?\(([^)]+)\)/,"$1").split(/[,\s/]+/).filter(Boolean);if(t.length<3)return;const n=(u,c)=>(u=u.trim(),u.endsWith("%")?Math.min(Number.parseFloat(u)*c/100,c):Math.min(Number.parseFloat(u),c)),r=n(t[0],255),i=n(t[1],255),a=n(t[2],255);let o;return t.length===4&&(o=n(t[3],1)),[r,i,a,o]},WYn=/[\p{Lu}]/u,NYn=/[\p{Ll}]/u,HSe=/^[\p{Lu}](?![\p{Lu}])/gu,oat=/([\p{Alpha}\p{N}_]|$)/u,zhe=/[_.\- ]+/,jYn=new RegExp("^"+zhe.source),JSe=new RegExp(zhe.source+oat.source,"gu"),YSe=new RegExp("\\d+"+oat.source,"gu"),kYn=(e,t,n,r)=>{let i=!1,a=!1,o=!1,u=!1;for(let c=0;c2?e[c-3]==="-":!0,i&&WYn.test(f)?(e=e.slice(0,c)+"-"+e.slice(c),i=!1,o=a,a=!0,c++):a&&o&&NYn.test(f)&&(!u||r)?(e=e.slice(0,c-1)+"-"+e.slice(c-1),o=a,a=!1,i=!0):(i=t(f)===f&&n(f)!==f,o=a,a=n(f)===f&&t(f)!==f)}return e},UYn=(e,t)=>(HSe.lastIndex=0,e.replaceAll(HSe,n=>t(n))),qYn=(e,t)=>(JSe.lastIndex=0,YSe.lastIndex=0,e.replaceAll(YSe,(n,r,i)=>["_","-"].includes(e.charAt(i+n.length))?n:t(n)).replaceAll(JSe,(n,r)=>t(r)));function xYn(e,t){if(!(typeof e=="string"||Array.isArray(e)))throw new TypeError("Expected the input to be `string | string[]`");if(t={pascalCase:!1,preserveConsecutiveUppercase:!1,...t},Array.isArray(e)?e=e.map(a=>a.trim()).filter(a=>a.length).join("-"):e=e.trim(),e.length===0)return"";const n=t.locale===!1?a=>a.toLowerCase():a=>a.toLocaleLowerCase(t.locale),r=t.locale===!1?a=>a.toUpperCase():a=>a.toLocaleUpperCase(t.locale);return e.length===1?zhe.test(e)?"":t.pascalCase?r(e):n(e):(e!==n(e)&&(e=kYn(e,n,r,t.preserveConsecutiveUppercase)),e=e.replace(jYn,""),e=t.preserveConsecutiveUppercase?UYn(e,n):n(e),t.pascalCase&&(e=r(e.charAt(0))+e.slice(1)),qYn(e,r))}function Pi(){return ce.RenderTarget.current()!==ce.RenderTarget.preview}function DYn(e){if(Pi())return null;const{error:t}=Xrt();if(!t)return null;switch(t.type){case lt.ConfigurationModelNotFound:return pe.Children.toArray(e.configurationModelNotFoundContent).length>0?e.configurationModelNotFoundContent:Y.jsx("span",{children:"Configuration Model not found for the specified deployment name."});case lt.AuthenticationFailure:return pe.Children.toArray(e.accessTokenInvalidContent).length>0?e.accessTokenInvalidContent:Y.jsx("span",{children:"The HCA access token is invalid."});case lt.SpecifiedDeploymentForbidden:return pe.Children.toArray(e.accessTokenRestrictionContent).length>0?e.accessTokenRestrictionContent:Y.jsx("span",{children:"The HCA access token does not permit using the specified Configuration Model."});case lt.DecisionsToRespectInvalid:return Y.jsx("span",{children:"The definition of Attribute Relations is invalid."});default:return pe.Children.toArray(e.errorContent).length>0?e.errorContent:Y.jsx("span",{children:"An error occurred while initializing the configuration."})}}function es(e){return pe.forwardRef((t,n)=>Y.jsx(B9n,{fallbackRender:()=>Y.jsx("span",{children:"Component crashed"}),children:Y.jsx(e,{...t,ref:n})}))}const LYn=kk` :root { --font-primary: var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif); --font-heading: "Inter-Medium", "Inter", "Inter Placeholder", sans-serif; } /* font sizes */ :root { --text-base-size: calc(var(--framer-font-size, 16px) * var(--framer-font-size-scale, 1)); --text-scale-ratio: 1.2; --text-xs: calc(1em / (var(--text-scale-ratio) * var(--text-scale-ratio))); --text-sm: calc(1em / var(--text-scale-ratio)); --text-md: calc(1em * var(--text-scale-ratio)); --text-lg: calc(1em * var(--text-scale-ratio) * var(--text-scale-ratio)); --text-xl: calc(1em * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio)); --text-xxl: calc(1em * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio)); --text-xxxl: calc(1em * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio)); } `,BYn=LYn,VYn=kk` :root { --space-unit: 1em; --space-xxs: calc(0.25 * var(--space-unit)); --space-xs: calc(0.5 * var(--space-unit)); --space-sm: calc(0.75 * var(--space-unit)); --space-md: calc(1.25 * var(--space-unit)); --space-lg: calc(2 * var(--space-unit)); --space-xl: calc(3.25 * var(--space-unit)); --space-xxl: calc(5.25 * var(--space-unit)); --space-unit-fixed: var(--text-base-size); --space-xxs-fixed: calc(0.25 * var(--space-unit-fixed)); --space-xs-fixed: calc(0.5 * var(--space-unit-fixed)); --space-sm-fixed: calc(0.75 * var(--space-unit-fixed)); --space-md-fixed: calc(1.25 * var(--space-unit-fixed)); --space-lg-fixed: calc(2 * var(--space-unit-fixed)); --space-xl-fixed: calc(3.25 * var(--space-unit-fixed)); --space-xxl-fixed: calc(5.25 * var(--space-unit-fixed)); } `,zYn=VYn,KYn=kk` :root { --shape-border-radius-xs: 5px; --shape-border-radius-sm: 7px; --shape-border-radius-md: 12px; --shape-border-radius-lg: 20px; } `,GYn=KYn,HYn=kk` :root { --shadows-popover: drop-shadow(5px 5px 10px rgba(0, 0, 0, 0.4)); --shadows-dialog: 0.2px 0.4px 2.3px rgba(0, 0, 0, 0.02), 0.6px 1px 5.7px rgba(0, 0, 0, 0.025), 1.2px 2.1px 10.6px rgba(0, 0, 0, 0.03), 2.3px 4px 17.2px rgba(0, 0, 0, 0.034), 4.2px 7.2px 25.9px rgba(0, 0, 0, 0.04), 7.6px 12.8px 37.7px rgba(0, 0, 0, 0.048), 13.9px 23.6px 54.7px rgba(0, 0, 0, 0.061), 40px 68px 96px rgba(0, 0, 0, 0.1); } `,JYn=HYn;function ZSe(){return Y.jsxs(Y.Fragment,{children:[Y.jsx(JYn,{}),Y.jsx(GYn,{}),Y.jsx(zYn,{}),Y.jsx(BYn,{})]})}const _T=pe.createContext(null);function Vv(){const{process:e,switchMode:t,applySolution:n,dismiss:r}=pe.useContext(_T);return e?{...e,switchMode:t,applySolution:n,dismiss:r}:null}function uat(e){const{explanation:t,...n}=e,r=Vv();return Y.jsx("button",{...n,onClick:()=>r.applySolution(t.solution),children:e.children})}function cat(e,t,n){return Ze(e).returnType().with({type:se.Choice},r=>t.get(r.choiceValueId)??r.choiceValueId).with({type:se.Boolean,state:!0},()=>n.booleanDecisionStateTrueLabel).with({type:se.Boolean,state:!1},()=>n.booleanDecisionStateFalseLabel).with({type:se.Component,state:Pt.Included},()=>n.componentDecisionStateIncludedLabel).with({type:se.Component,state:Pt.Excluded},()=>n.componentDecisionStateExcludedLabel).with({type:se.Numeric},r=>r.state.toString()).exhaustive()}const fat={applySolutionButtonCaption:{title:"Apply Solution Button Caption",type:ce.ControlType.String,defaultValue:"Apply Solution"},configurationSubjectTitle:{title:"Configuration Subject Title",type:ce.ControlType.String,defaultValue:"Configuration"},generalConflictTitle:{title:"General Conflict Title",type:ce.ControlType.String,defaultValue:"Conflict"},componentDecisionStateIncludedLabel:{title:"Component Decision State Included Label",type:ce.ControlType.String,defaultValue:"Included"},componentDecisionStateExcludedLabel:{title:"Component Decision State Excluded Label",type:ce.ControlType.String,defaultValue:"Excluded"},booleanDecisionStateTrueLabel:{title:"Boolean Decision State True Label",type:ce.ControlType.String,defaultValue:"Yes"},booleanDecisionStateFalseLabel:{title:"Boolean Decision State False Label",type:ce.ControlType.String,defaultValue:"No"},isBlockedSuffix:{title:"Is Blocked Suffix",type:ce.ControlType.String,defaultValue:"is blocked"},isNotSatisfiedSuffix:{title:"Is Not Satisfied Suffix",type:ce.ControlType.String,defaultValue:"is not satisfied"}},YYn={fill:{title:"Fill",type:ce.ControlType.Color,defaultValue:"#002134"},color:{title:"Color",type:ce.ControlType.Color,defaultValue:"white"},attributeValueFill:{title:"Attribute Value Fill",type:ce.ControlType.Color,defaultValue:"rgba(255, 255, 255, 0.2)"},attributeValueAddFill:{title:"Attribute Value Add Fill",type:ce.ControlType.Color,defaultValue:"rgba(47, 255, 0, 0.2)"},attributeValueAddColor:{title:"Attribute Value Add Color",type:ce.ControlType.Color,defaultValue:"#63e446"},attributeValueRemoveFill:{title:"Attribute Value Remove Fill",type:ce.ControlType.Color,defaultValue:"#ff00004a"},attributeValueRemoveColor:{title:"Attribute Value Remove Color",type:ce.ControlType.Color,defaultValue:"#ff6060"},headerValueColor:{title:"Header Value Color",type:ce.ControlType.Color,defaultValue:"rgb(0, 161, 230)"},closeButtonOutline:{title:"Close Button Outline",type:ce.ControlType.Color,defaultValue:"rgba(255, 255, 255, 0.8)"},listSeparator:{title:"List Separator",type:ce.ControlType.Color,defaultValue:"rgba(255, 255, 255, 0.3)"},applySolutionButtonFill:{title:"Apply Solution Button Fill",type:ce.ControlType.Color,defaultValue:"rgb(0, 161, 230)"},applySolutionButtonColor:{title:"Apply Solution Button Color",type:ce.ControlType.Color,defaultValue:"white"},applySolutionButtonOutline:{title:"Apply Solution Button Outline",type:ce.ControlType.Color,defaultValue:"rgba(255, 255, 255, 0.8)"},showMoreButtonOutline:{title:"Show More Button Outline",type:ce.ControlType.Color,defaultValue:"rgba(255, 255, 255, 0.8)"},solutionTitle:{title:"Solution Title",type:ce.ControlType.String,defaultValue:"Solution"},showMoreButtonCaption:{title:"Show More Button Caption",type:ce.ControlType.String,defaultValue:"Show more ({{amount}})"},showConstraintsButtonCaption:{title:"Show Constraints Button Caption",type:ce.ControlType.String,defaultValue:"Show Constraints"},...fat},Khe=pe.createContext(null),Ghe=()=>pe.useContext(Khe),ZYn={fill:{title:"Fill",type:ce.ControlType.Color,defaultValue:"rgba(255, 255, 255, 0.7)"},color:{title:"Color",type:ce.ControlType.Color,defaultValue:"#171717"},attributeValueFill:{title:"Attribute Value Fill",type:ce.ControlType.Color,defaultValue:"#efefef"},attributeValueAddFill:{title:"Attribute Value Add Fill",type:ce.ControlType.Color,defaultValue:"#cfefc7"},attributeValueAddColor:{title:"Attribute Value Add Color",type:ce.ControlType.Color,defaultValue:"#48c52b"},attributeValueRemoveFill:{title:"Attribute Value Remove Fill",type:ce.ControlType.Color,defaultValue:"#ffdada"},attributeValueRemoveColor:{title:"Attribute Value Remove Color",type:ce.ControlType.Color,defaultValue:"#c52b2b"},headerValueColor:{title:"Header Value Color",type:ce.ControlType.Color,defaultValue:"#00a1e6"},closeButtonOutline:{title:"Close Button Outline",type:ce.ControlType.Color,defaultValue:"#00a1e6"},applySolutionButtonFill:{title:"Apply Solution Button Fill",type:ce.ControlType.Color,defaultValue:"#F2F2F2"},applySolutionButtonColor:{title:"Apply Solution Button Color",type:ce.ControlType.Color,defaultValue:"#171717"},applySolutionButtonOutline:{title:"Apply Solution Button Outline",type:ce.ControlType.Color,defaultValue:"#00a1e6"},explanationCard:{title:"Explanation Card",type:ce.ControlType.Color,defaultValue:"white"},scrollShadowBorder:{title:"Scroll Shadow Border",type:ce.ControlType.Color,defaultValue:"rgba(0, 0, 0, 0.3)"},backdropFilter:{title:"Backdrop Filter",type:ce.ControlType.String,defaultValue:"blur(10px) saturate(200%)"},decisionExplanationSolutionsTitle:{title:"Decision Explanation Solutions Title",type:ce.ControlType.String,defaultValue:"Solutions"},constraintExplanationSolutionsTitle:{title:"Constraint Explanation Solutions Title",type:ce.ControlType.String,defaultValue:"Constraint Explanations"},...fat},Hhe=pe.createContext(null),sat=()=>pe.useContext(Hhe),XYn=()=>pe.useContext(Khe)||pe.useContext(Hhe),Jhe=XYn,QYn=St.div` display: flex; gap: var(--space-xs); align-items: center; background-color: var(--color-explain-attribute-value-fill); border-radius: 360px; padding-right: var(--space-sm); font-size: 0.9em; font-family: var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif); font-weight: 500; min-width: 0; `,eZn=St.div` display: grid; place-content: center; border-top-left-radius: 360px; border-bottom-left-radius: 360px; height: 1.5em; width: 1.5em; flex-shrink: 0; &.mode-add { background-color: var(--color-explain-attribute-value-add-fill); color: var(--color-explain-attribute-value-add-color); } &.mode-remove { background-color: var(--color-explain-attribute-value-remove-fill); color: var(--color-explain-attribute-value-remove-color); } `,tZn=St.div` white-space: nowrap; overflow: hidden; text-overflow: ellipsis; `;function nZn(e){const{decision:t,choiceValuesNames:n}=e,r=t.intention,i=Jhe(),a=cat(t,n,i);return Y.jsxs(QYn,{children:[Y.jsxs(eZn,{className:`mode-${r}`,children:[r==="remove"&&Y.jsx(Qm,{icon:JGn}),r==="add"&&Y.jsx(Qm,{icon:YGn})]}),Y.jsx(tZn,{children:a})]})}function Ji(e){var t;return{localId:e.attributeId,componentPath:e.componentPath===""?[]:((t=e.componentPath)==null?void 0:t.split(" -> "))??[],sharedConfigurationModelId:e.sharedConfigurationModel===""?null:e.sharedConfigurationModel}}const t8=pe.createContext(null);function n8(e){const{attributes:t}=pe.useContext(t8),{activeLocale:n}=ce.useLocaleInfo(),r=n.code;return pe.useMemo(()=>M(t,mf(i=>zr.equals(Ji(i),e)),Nr(i=>i.name),_m,WW,Yhe(r),z5),[t,r,e.localId,e.componentPath,e.sharedConfigurationModelId])}function Lk(e){const{choiceValues:t}=pe.useContext(t8),{activeLocale:n}=ce.useLocaleInfo(),r=dR(e);if(!r)return Io;const i=pe.useMemo(()=>M(t,gf(u=>zr.equals(Ji(u),e))),[t,e.localId,e.componentPath,e.sharedConfigurationModelId]),a=n.code,o=r.attribute.values;return pe.useMemo(()=>M(o,f7e((u,c)=>M(i,mf(f=>f.choiceValueId===u),Nr(f=>f.name),_m,WW,Yhe(a))),C$),[o,i,a])}function lat(e,t){const{choiceValues:n}=pe.useContext(t8),{activeLocale:r}=ce.useLocaleInfo(),i=r.code;return pe.useMemo(()=>M(n,mf(a=>zr.equals(Ji(a),e)&&a.choiceValueId===t),Nr(a=>a.name),_m,WW,Yhe(i),z5),[n,i,e.localId,e.componentPath,e.sharedConfigurationModelId,t])}function Yhe(e){return Se(mf(t=>t.localeCode.localeCompare(e,void 0,{sensitivity:"accent"})===0),Nr(t=>t.translation))}const rZn=St.div` display: grid; grid-template-columns: subgrid; grid-column: span 2; align-items: center; `,iZn=St.div` grid-area: name; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; `,aZn=St.div` grid-area: values; display: flex; flex-wrap: wrap; min-width: 0; gap: var(--space-xxs); `;function oZn(e){const{decisions:t}=e,n=t[0].attributeId,r=Lk(n),i=n8(n),a=Jhe(),o=M(Le,Ic(c=>cat(c,r,a))),u=M(t,FW(o));return Y.jsxs(rZn,{children:[Y.jsx(iZn,{children:i??n.localId}),Y.jsx(aZn,{children:u.map((c,f)=>Y.jsx(nZn,{decision:c,choiceValuesNames:r},f))})]})}function uZn(e){const t=e.sharedConfigurationModelId&&`shared::${e.sharedConfigurationModelId}`,n=(e.componentPath??[]).join("::");return[t,n,e.localId].filter(r=>(r==null?void 0:r.length)>0).join("::")}const cZn=M(Le,Ic(e=>e.attributeId.localId));function dat(e){const{blockingDecisions:t,desiredDecisions:n,...r}=e,i=M([...n.map(a=>({...a,intention:"add"})),...t.map(a=>({...a,intention:"remove"}))],Rae(a=>uZn(a.attributeId)),vM(fl)((a,o)=>({key:a,attributeId:io(o).attributeId,decisions:o})),FW(cZn));return Y.jsx("div",{...r,children:i.map(a=>Y.jsx(oZn,{decisions:a.decisions},a.key))})}const fZn=St.div` background-color: var(--color-explain-dialog-explanation-card); padding: var(--space-sm-fixed); box-shadow: 2px 1px 10px -5px rgba(0, 0, 0, 0.4); border-radius: var(--shape-border-radius-sm); `,pat=fZn,sZn=St(dat)` display: grid; grid-template-columns: [name] minmax(150px, auto) [values] minmax(0px, 1fr); gap: var(--space-sm); `,lZn=St(uat)` border-radius: var(--shape-border-radius-sm); background-color: var(--color-explain-dialog-apply-solution-button-fill); color: var(--color-explain-dialog-apply-solution-button-color); font-size: 0.9em; font-family: var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif); font-weight: 600; appearance: none; padding: 0.6em 1em; border: none; width: auto; margin-top: var(--space-md); &:focus { outline: 2px solid var(--color-explain-dialog-apply-solution-button-outline); outline-offset: 1px; } `;function dZn(e){const{explanation:t}=e,{applySolutionButtonCaption:n}=sat(),r=t.solution.decisions.filter(i=>i.state!=null);return Y.jsxs(pat,{children:[Y.jsx(sZn,{blockingDecisions:t.causedByDecisions,desiredDecisions:r}),Y.jsx(lZn,{explanation:t,children:n})]})}const pZn=St(pat)` ul { margin: 0; } line-height: 1.5em; `,hZn=St.ul` list-style-type: none; margin-inline-start: 0; padding-inline-start: 0; `,XSe=St.ul` list-style-type: disc; margin-inline-start: 0; padding-inline-start: var(--space-lg); `,QSe=St.li` font-size: 0.9em; font-family: var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif); font-weight: 500; `;function vZn(e){const{explanation:t}=e,n=t.causedByCardinalities,r=M(t.causedByRules,Rae(i=>i.configurationModelId),vM(Le)((i,a)=>({configurationModelId:i,rules:M(a,pt(o=>o.localId),FW(Le))})));return Y.jsx(pZn,{children:Y.jsxs(hZn,{children:[r.map(i=>Y.jsxs("li",{children:[Y.jsx("span",{children:i.configurationModelId}),Y.jsx(XSe,{children:i.rules.map(a=>Y.jsx(QSe,{children:a}))})]})),n.length>0&&Y.jsxs("li",{children:[Y.jsx("span",{children:"Cardinality"}),Y.jsx(XSe,{children:n.map(i=>Y.jsx(QSe,{children:i.localId}))})]})]})})}function hat(e){const{variant:t,...n}=e,{explainQuestion:r}=Vv(),i=Ze(r).returnType().with({question:Qr.whyIsStateNotPossible},()=>"why your selection is not possible").with({question:Qr.whyIsNotSatisfied,subject:Nt.configuration},()=>"why your configuration is not satisfied").with({question:Qr.whyIsNotSatisfied,subject:Nt.attribute},()=>"why your attribute is not satisfied").with(Bi.nullish,()=>"why your selections are not possible").exhaustive(),a=Ze(t).returnType().with("failedToExplain",()=>Y.jsxs(Y.Fragment,{children:["Failed to explain ",i,".",Y.jsx("br",{}),"Please check your internet connection and try again."]})).with("noExplanationFound",()=>Y.jsxs(Y.Fragment,{children:["There was no explanation found for ",i,"."]})).with("noSolutionFound",()=>Y.jsxs(Y.Fragment,{children:["There was no solution found for ",i,"."]})).exhaustive();return Y.jsx("div",{...n,children:a})}const ewe=St.div` font-weight: 500; font-family: var(--font-heading); margin-bottom: var(--space-xs); margin-left: var(--space-sm-fixed); `,twe=St.div` display: flex; flex-direction: column; gap: var(--space-xs); `,mZn=St.div` display: flex; flex-direction: column; gap: var(--space-md); `,nwe=St(hat)` width: min-content; min-width: 400px; margin: var(--space-sm-fixed) var(--space-md-fixed) var(--space-sm-fixed) var(--space-sm-fixed); `;function gZn(){const{decisionExplanations:e,constraintExplanations:t,hasError:n}=Vv(),{decisionExplanationSolutionsTitle:r,constraintExplanationSolutionsTitle:i}=sat();return n?Y.jsx(nwe,{variant:"failedToExplain"}):e.length===0&&t.length===0?Y.jsx(nwe,{variant:"noExplanationFound"}):Y.jsxs(mZn,{children:[e.length>0&&Y.jsxs("div",{children:[Y.jsx(ewe,{children:r}),Y.jsx(twe,{children:e.map(a=>Y.jsx(dZn,{explanation:a},e.indexOf(a)))})]}),t.length>0&&Y.jsxs("div",{children:[Y.jsx(ewe,{children:i}),Y.jsx(twe,{children:t.map(a=>Y.jsx(vZn,{explanation:a},t.indexOf(a)))})]})]})}function lh(e){return vat(e)?(e.nodeName||"").toLowerCase():"#document"}function yc(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function zv(e){var t;return(t=(vat(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function vat(e){return e instanceof Node||e instanceof yc(e).Node}function Ii(e){return e instanceof Element||e instanceof yc(e).Element}function iu(e){return e instanceof HTMLElement||e instanceof yc(e).HTMLElement}function aJ(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof yc(e).ShadowRoot}function Bk(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Ac(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function yZn(e){return["table","td","th"].includes(lh(e))}function Zhe(e){const t=Xhe(),n=Ac(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function mat(e){let t=Ub(e);for(;iu(t)&&!nS(t);){if(Zhe(t))return t;t=Ub(t)}return null}function Xhe(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function nS(e){return["html","body","#document"].includes(lh(e))}function Ac(e){return yc(e).getComputedStyle(e)}function r8(e){return Ii(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ub(e){if(lh(e)==="html")return e;const t=e.assignedSlot||e.parentNode||aJ(e)&&e.host||zv(e);return aJ(t)?t.host:t}function gat(e){const t=Ub(e);return nS(t)?e.ownerDocument?e.ownerDocument.body:e.body:iu(t)&&Bk(t)?t:gat(t)}function Om(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=gat(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=yc(i);return a?t.concat(o,o.visualViewport||[],Bk(i)?i:[],o.frameElement&&n?Om(o.frameElement):[]):t.concat(i,Om(i,[],n))}function V1(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function uc(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&aJ(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function yat(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function bat(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function bZn(e){return e.mozInputSource===0&&e.isTrusted?!0:oJ()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function $Zn(e){return _Zn()?!1:!oJ()&&e.width===0&&e.height===0||oJ()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function IZn(){return/apple/i.test(navigator.vendor)}function oJ(){const e=/android/i;return e.test(yat())||e.test(bat())}function _Zn(){return bat().includes("jsdom/")}function rwe(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function SZn(e){return"nativeEvent"in e}function wZn(e){return e.matches("html,body")}function qp(e){return(e==null?void 0:e.ownerDocument)||document}function W9(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function z1(e){return"composedPath"in e?e.composedPath()[0]:e.target}const AZn="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function $at(e){return iu(e)&&e.matches(AZn)}function N9(e){e.preventDefault(),e.stopPropagation()}function MZn(e){return e?e.getAttribute("role")==="combobox"&&$at(e):!1}const rS=Math.min,cb=Math.max,Hq=Math.round,i2=Math.floor,eg=e=>({x:e,y:e}),RZn={left:"right",right:"left",bottom:"top",top:"bottom"},OZn={start:"end",end:"start"};function uJ(e,t,n){return cb(e,rS(t,n))}function Vk(e,t){return typeof e=="function"?e(t):e}function qb(e){return e.split("-")[0]}function zk(e){return e.split("-")[1]}function Iat(e){return e==="x"?"y":"x"}function Qhe(e){return e==="y"?"height":"width"}function i8(e){return["top","bottom"].includes(qb(e))?"y":"x"}function eve(e){return Iat(i8(e))}function EZn(e,t,n){n===void 0&&(n=!1);const r=zk(e),i=eve(e),a=Qhe(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=Jq(o)),[o,Jq(o)]}function TZn(e){const t=Jq(e);return[cJ(e),t,cJ(t)]}function cJ(e){return e.replace(/start|end/g,t=>OZn[t])}function CZn(e,t,n){const r=["left","right"],i=["right","left"],a=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?a:o;default:return[]}}function PZn(e,t,n,r){const i=zk(e);let a=CZn(qb(e),n==="start",r);return i&&(a=a.map(o=>o+"-"+i),t&&(a=a.concat(a.map(cJ)))),a}function Jq(e){return e.replace(/left|right|bottom|top/g,t=>RZn[t])}function FZn(e){return{top:0,right:0,bottom:0,left:0,...e}}function _at(e){return typeof e!="number"?FZn(e):{top:e,right:e,bottom:e,left:e}}function Yq(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function iwe(e,t,n){let{reference:r,floating:i}=e;const a=i8(t),o=eve(t),u=Qhe(o),c=qb(t),f=a==="y",s=r.x+r.width/2-i.width/2,l=r.y+r.height/2-i.height/2,d=r[u]/2-i[u]/2;let p;switch(c){case"top":p={x:s,y:r.y-i.height};break;case"bottom":p={x:s,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:l};break;case"left":p={x:r.x-i.width,y:l};break;default:p={x:r.x,y:r.y}}switch(zk(t)){case"start":p[o]-=d*(n&&f?-1:1);break;case"end":p[o]+=d*(n&&f?-1:1);break}return p}const WZn=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,u=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let f=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:s,y:l}=iwe(f,r,c),d=r,p={},v=0;for(let h=0;h({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:a,platform:o,elements:u,middlewareData:c}=t,{element:f,padding:s=0}=Vk(e,t)||{};if(f==null)return{};const l=_at(s),d={x:n,y:r},p=eve(i),v=Qhe(p),h=await o.getDimensions(f),$=p==="y",b=$?"top":"left",y=$?"bottom":"right",m=$?"clientHeight":"clientWidth",g=a.reference[v]+a.reference[p]-d[p]-a.floating[v],_=d[p]-a.reference[p],I=await(o.getOffsetParent==null?void 0:o.getOffsetParent(f));let A=I?I[m]:0;(!A||!await(o.isElement==null?void 0:o.isElement(I)))&&(A=u.floating[m]||a.floating[v]);const E=g/2-_/2,N=A/2-h[v]/2-1,U=rS(l[b],N),te=rS(l[y],N),Ie=U,je=A-h[v]-te,J=A/2-h[v]/2+E,ee=uJ(Ie,J,je),fe=!c.arrow&&zk(i)!=null&&J!==ee&&a.reference[v]/2-(JIe<=0)){var N,U;const Ie=(((N=a.flip)==null?void 0:N.index)||0)+1,je=_[Ie];if(je)return{data:{index:Ie,overflows:E},reset:{placement:je}};let J=(U=E.filter(ee=>ee.overflows[0]<=0).sort((ee,fe)=>ee.overflows[1]-fe.overflows[1])[0])==null?void 0:U.placement;if(!J)switch(p){case"bestFit":{var te;const ee=(te=E.map(fe=>[fe.placement,fe.overflows.filter(ae=>ae>0).reduce((ae,he)=>ae+he,0)]).sort((fe,ae)=>fe[1]-ae[1])[0])==null?void 0:te[0];ee&&(J=ee);break}case"initialPlacement":J=u;break}if(i!==J)return{reset:{placement:J}}}return{}}}};async function kZn(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=qb(n),u=zk(n),c=i8(n)==="y",f=["left","top"].includes(o)?-1:1,s=a&&c?-1:1,l=Vk(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:v}=typeof l=="number"?{mainAxis:l,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...l};return u&&typeof v=="number"&&(p=u==="end"?v*-1:v),c?{x:p*s,y:d*f}:{x:d*f,y:p*s}}const UZn=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:o,middlewareData:u}=t,c=await kZn(t,e);return o===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:a+c.y,data:{...c,placement:o}}}}},qZn=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:u={fn:$=>{let{x:b,y}=$;return{x:b,y}}},...c}=Vk(e,t),f={x:n,y:r},s=await Sat(t,c),l=i8(qb(i)),d=Iat(l);let p=f[d],v=f[l];if(a){const $=d==="y"?"top":"left",b=d==="y"?"bottom":"right",y=p+s[$],m=p-s[b];p=uJ(y,p,m)}if(o){const $=l==="y"?"top":"left",b=l==="y"?"bottom":"right",y=v+s[$],m=v-s[b];v=uJ(y,v,m)}const h=u.fn({...t,[d]:p,[l]:v});return{...h,data:{x:h.x-n,y:h.y-r}}}}};function wat(e){const t=Ac(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=iu(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,u=Hq(n)!==a||Hq(r)!==o;return u&&(n=a,r=o),{width:n,height:r,$:u}}function tve(e){return Ii(e)?e:e.contextElement}function dI(e){const t=tve(e);if(!iu(t))return eg(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=wat(t);let o=(a?Hq(n.width):n.width)/r,u=(a?Hq(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!u||!Number.isFinite(u))&&(u=1),{x:o,y:u}}const xZn=eg(0);function Aat(e){const t=yc(e);return!Xhe()||!t.visualViewport?xZn:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function DZn(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==yc(e)?!1:t}function xb(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=tve(e);let o=eg(1);t&&(r?Ii(r)&&(o=dI(r)):o=dI(e));const u=DZn(a,n,r)?Aat(a):eg(0);let c=(i.left+u.x)/o.x,f=(i.top+u.y)/o.y,s=i.width/o.x,l=i.height/o.y;if(a){const d=yc(a),p=r&&Ii(r)?yc(r):r;let v=d.frameElement;for(;v&&r&&p!==d;){const h=dI(v),$=v.getBoundingClientRect(),b=Ac(v),y=$.left+(v.clientLeft+parseFloat(b.paddingLeft))*h.x,m=$.top+(v.clientTop+parseFloat(b.paddingTop))*h.y;c*=h.x,f*=h.y,s*=h.x,l*=h.y,c+=y,f+=m,v=yc(v).frameElement}}return Yq({width:s,height:l,x:c,y:f})}const LZn=[":popover-open",":modal"];function Mat(e){let t=!1,n=0,r=0;function i(a){try{t=t||e.matches(a)}catch{}}if(LZn.forEach(a=>{i(a)}),t){const a=mat(e);if(a){const o=a.getBoundingClientRect();n=o.x,r=o.y}}return[t,n,r]}function BZn(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=zv(r),[o]=t?Mat(t.floating):[!1];if(r===a||o)return n;let u={scrollLeft:0,scrollTop:0},c=eg(1);const f=eg(0),s=iu(r);if((s||!s&&i!=="fixed")&&((lh(r)!=="body"||Bk(a))&&(u=r8(r)),iu(r))){const l=xb(r);c=dI(r),f.x=l.x+r.clientLeft,f.y=l.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+f.x,y:n.y*c.y-u.scrollTop*c.y+f.y}}function VZn(e){return Array.from(e.getClientRects())}function Rat(e){return xb(zv(e)).left+r8(e).scrollLeft}function zZn(e){const t=zv(e),n=r8(e),r=e.ownerDocument.body,i=cb(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=cb(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Rat(e);const u=-n.scrollTop;return Ac(r).direction==="rtl"&&(o+=cb(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:u}}function KZn(e,t){const n=yc(e),r=zv(e),i=n.visualViewport;let a=r.clientWidth,o=r.clientHeight,u=0,c=0;if(i){a=i.width,o=i.height;const f=Xhe();(!f||f&&t==="fixed")&&(u=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:u,y:c}}function GZn(e,t){const n=xb(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=iu(e)?dI(e):eg(1),o=e.clientWidth*a.x,u=e.clientHeight*a.y,c=i*a.x,f=r*a.y;return{width:o,height:u,x:c,y:f}}function awe(e,t,n){let r;if(t==="viewport")r=KZn(e,n);else if(t==="document")r=zZn(zv(e));else if(Ii(t))r=GZn(t,n);else{const i=Aat(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return Yq(r)}function Oat(e,t){const n=Ub(e);return n===t||!Ii(n)||nS(n)?!1:Ac(n).position==="fixed"||Oat(n,t)}function HZn(e,t){const n=t.get(e);if(n)return n;let r=Om(e,[],!1).filter(u=>Ii(u)&&lh(u)!=="body"),i=null;const a=Ac(e).position==="fixed";let o=a?Ub(e):e;for(;Ii(o)&&!nS(o);){const u=Ac(o),c=Zhe(o);!c&&u.position==="fixed"&&(i=null),(a?!c&&!i:!c&&u.position==="static"&&i&&["absolute","fixed"].includes(i.position)||Bk(o)&&!c&&Oat(e,o))?r=r.filter(f=>f!==o):i=u,o=Ub(o)}return t.set(e,r),r}function JZn(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?HZn(t,this._c):[].concat(n),r],o=a[0],u=a.reduce((c,f)=>{const s=awe(t,f,i);return c.top=cb(s.top,c.top),c.right=rS(s.right,c.right),c.bottom=rS(s.bottom,c.bottom),c.left=cb(s.left,c.left),c},awe(t,o,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function YZn(e){const{width:t,height:n}=wat(e);return{width:t,height:n}}function ZZn(e,t,n,r){const i=iu(t),a=zv(t),o=n==="fixed",u=xb(e,!0,o,t);let c={scrollLeft:0,scrollTop:0};const f=eg(0);if(i||!i&&!o)if((lh(t)!=="body"||Bk(a))&&(c=r8(t)),i){const h=xb(t,!0,o,t);f.x=h.x+t.clientLeft,f.y=h.y+t.clientTop}else a&&(f.x=Rat(a));let s=u.left+c.scrollLeft-f.x,l=u.top+c.scrollTop-f.y;const[d,p,v]=Mat(r);return d&&(s+=p,l+=v,i&&(s+=t.clientLeft,l+=t.clientTop)),{x:s,y:l,width:u.width,height:u.height}}function owe(e,t){return!iu(e)||Ac(e).position==="fixed"?null:t?t(e):e.offsetParent}function Eat(e,t){const n=yc(e);if(!iu(e))return n;let r=owe(e,t);for(;r&&yZn(r)&&Ac(r).position==="static";)r=owe(r,t);return r&&(lh(r)==="html"||lh(r)==="body"&&Ac(r).position==="static"&&!Zhe(r))?n:r||mat(e)||n}const XZn=async function(e){const t=this.getOffsetParent||Eat,n=this.getDimensions;return{reference:ZZn(e.reference,await t(e.floating),e.strategy,e.floating),floating:{x:0,y:0,...await n(e.floating)}}};function QZn(e){return Ac(e).direction==="rtl"}const Tat={convertOffsetParentRelativeRectToViewportRelativeRect:BZn,getDocumentElement:zv,getClippingRect:JZn,getOffsetParent:Eat,getElementRects:XZn,getClientRects:VZn,getDimensions:YZn,getScale:dI,isElement:Ii,isRTL:QZn};function eXn(e,t){let n=null,r;const i=zv(e);function a(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function o(u,c){u===void 0&&(u=!1),c===void 0&&(c=1),a();const{left:f,top:s,width:l,height:d}=e.getBoundingClientRect();if(u||t(),!l||!d)return;const p=i2(s),v=i2(i.clientWidth-(f+l)),h=i2(i.clientHeight-(s+d)),$=i2(f),b={rootMargin:-p+"px "+-v+"px "+-h+"px "+-$+"px",threshold:cb(0,rS(1,c))||1};let y=!0;function m(g){const _=g[0].intersectionRatio;if(_!==c){if(!y)return o();_?o(!1,_):r=setTimeout(()=>{o(!1,1e-7)},100)}y=!1}try{n=new IntersectionObserver(m,{...b,root:i.ownerDocument})}catch{n=new IntersectionObserver(m,b)}n.observe(e)}return o(!0),a}function tXn(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,f=tve(e),s=i||a?[...f?Om(f):[],...Om(t)]:[];s.forEach(b=>{i&&b.addEventListener("scroll",n,{passive:!0}),a&&b.addEventListener("resize",n)});const l=f&&u?eXn(f,n):null;let d=-1,p=null;o&&(p=new ResizeObserver(b=>{let[y]=b;y&&y.target===f&&p&&(p.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var m;(m=p)==null||m.observe(t)})),n()}),f&&!c&&p.observe(f),p.observe(t));let v,h=c?xb(e):null;c&&$();function $(){const b=xb(e);h&&(b.x!==h.x||b.y!==h.y||b.width!==h.width||b.height!==h.height)&&n(),h=b,v=requestAnimationFrame($)}return n(),()=>{var b;s.forEach(y=>{i&&y.removeEventListener("scroll",n),a&&y.removeEventListener("resize",n)}),l==null||l(),(b=p)==null||b.disconnect(),p=null,c&&cancelAnimationFrame(v)}}const nXn=qZn,rXn=jZn,uwe=NZn,iXn=(e,t,n)=>{const r=new Map,i={platform:Tat,...n},a={...i.platform,_c:r};return WZn(e,t,{...i,platform:a})},aXn=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?uwe({element:r.current,padding:i}).fn(n):{}:r?uwe({element:r,padding:i}).fn(n):{}}}};var C2=typeof document<"u"?pe.useLayoutEffect:pe.useEffect;function Zq(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Zq(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!Zq(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Cat(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function cwe(e,t){const n=Cat(e);return Math.round(t*n)/n}function fwe(e){const t=qe.useRef(e);return C2(()=>{t.current=e}),t}function oXn(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:u=!0,whileElementsMounted:c,open:f}=e,[s,l]=qe.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,p]=qe.useState(r);Zq(d,r)||p(r);const[v,h]=qe.useState(null),[$,b]=qe.useState(null),y=qe.useCallback(ae=>{ae!==I.current&&(I.current=ae,h(ae))},[]),m=qe.useCallback(ae=>{ae!==A.current&&(A.current=ae,b(ae))},[]),g=a||v,_=o||$,I=qe.useRef(null),A=qe.useRef(null),E=qe.useRef(s),N=c!=null,U=fwe(c),te=fwe(i),Ie=qe.useCallback(()=>{if(!I.current||!A.current)return;const ae={placement:t,strategy:n,middleware:d};te.current&&(ae.platform=te.current),iXn(I.current,A.current,ae).then(he=>{const _e={...he,isPositioned:!0};je.current&&!Zq(E.current,_e)&&(E.current=_e,Not.flushSync(()=>{l(_e)}))})},[d,t,n,te]);C2(()=>{f===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,l(ae=>({...ae,isPositioned:!1})))},[f]);const je=qe.useRef(!1);C2(()=>(je.current=!0,()=>{je.current=!1}),[]),C2(()=>{if(g&&(I.current=g),_&&(A.current=_),g&&_){if(U.current)return U.current(g,_,Ie);Ie()}},[g,_,Ie,U,N]);const J=qe.useMemo(()=>({reference:I,floating:A,setReference:y,setFloating:m}),[y,m]),ee=qe.useMemo(()=>({reference:g,floating:_}),[g,_]),fe=qe.useMemo(()=>{const ae={position:n,left:0,top:0};if(!ee.floating)return ae;const he=cwe(ee.floating,s.x),_e=cwe(ee.floating,s.y);return u?{...ae,transform:"translate("+he+"px, "+_e+"px)",...Cat(ee.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:he,top:_e}},[n,u,ee.floating,s.x,s.y]);return qe.useMemo(()=>({...s,update:Ie,refs:J,elements:ee,floatingStyles:fe}),[s,Ie,J,ee,fe])}/*! * tabbable 6.2.0 * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE */var uXn=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],fJ=uXn.join(","),Pat=typeof Element>"u",ST=Pat?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Xq=!Pat&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Qq=function e(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),a=i===""||i==="true",o=a||n&&t&&e(t.parentNode);return o},cXn=function(e){var t,n=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return n===""||n==="true"},fXn=function(e,t,n){if(Qq(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(fJ));return t&&ST.call(e,fJ)&&r.unshift(e),r=r.filter(n),r},sXn=function e(t,n,r){for(var i=[],a=Array.from(t);a.length;){var o=a.shift();if(!Qq(o,!1))if(o.tagName==="SLOT"){var u=o.assignedElements(),c=u.length?u:o.children,f=e(c,!0,r);r.flatten?i.push.apply(i,f):i.push({scopeParent:o,candidates:f})}else{var s=ST.call(o,fJ);s&&r.filter(o)&&(n||!t.includes(o))&&i.push(o);var l=o.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(o),d=!Qq(l,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(o));if(l&&d){var p=e(l===!0?o.children:l.children,!0,r);r.flatten?i.push.apply(i,p):i.push({scopeParent:o,candidates:p})}else a.unshift.apply(a,o.children)}}return i},Fat=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Wat=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||cXn(e))&&!Fat(e)?0:e.tabIndex},lXn=function(e,t){var n=Wat(e);return n<0&&t&&!Fat(e)?0:n},dXn=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Nat=function(e){return e.tagName==="INPUT"},pXn=function(e){return Nat(e)&&e.type==="hidden"},hXn=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return t},vXn=function(e,t){for(var n=0;nsummary:first-of-type"),a=i?e.parentElement:e;if(ST.call(a,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="legacy-full"){if(typeof r=="function"){for(var o=e;e;){var u=e.parentElement,c=Xq(e);if(u&&!u.shadowRoot&&r(u)===!0)return swe(e);e.assignedSlot?e=e.assignedSlot:!u&&c!==e.ownerDocument?e=c.host:e=u}e=o}if(bXn(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return swe(e);return!1},IXn=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var n=0;n=0)},wXn=function e(t){var n=[],r=[];return t.forEach(function(i,a){var o=!!i.scopeParent,u=o?i.scopeParent:i,c=lXn(u,o),f=o?e(i.candidates):u;c===0?o?n.push.apply(n,f):n.push(u):r.push({documentOrder:a,tabIndex:c,item:i,isScope:o,content:f})}),r.sort(dXn).reduce(function(i,a){return a.isScope?i.push.apply(i,a.content):i.push(a.content),i},[]).concat(n)},nve=function(e,t){t=t||{};var n;return t.getShadowRoot?n=sXn([e],t.includeContainer,{filter:lwe.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:SXn}):n=fXn(e,t.includeContainer,lwe.bind(null,t)),wXn(n)};function rve(e){return qe.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const AXn=qe["useInsertionEffect".toString()],MXn=AXn||(e=>e());function K1(e){const t=qe.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return MXn(()=>{t.current=e}),qe.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;ie==null?void 0:e.focus({preventScroll:n});i?a():dwe=requestAnimationFrame(a)}var lf=typeof document<"u"?pe.useLayoutEffect:pe.useEffect;function iS(){return iS=Object.assign?Object.assign.bind():function(e){for(var t=1;t"floating-ui-"+RXn++;function OXn(){const[e,t]=qe.useState(()=>j9?pwe():void 0);return lf(()=>{e==null&&t(pwe())},[]),qe.useEffect(()=>{j9||(j9=!0)},[]),e}const EXn=qe["useId".toString()],a8=EXn||OXn,TXn=qe.forwardRef(function(e,t){let{context:{placement:n,elements:{floating:r},middlewareData:{arrow:i}},width:a=14,height:o=7,tipRadius:u=0,strokeWidth:c=0,staticOffset:f,stroke:s,d:l,style:{transform:d,...p}={},...v}=e;process.env.NODE_ENV!=="production"&&(t||console.warn("Floating UI: The `ref` prop is required for the `FloatingArrow`","component."));const h=a8();if(!r)return null;c*=2;const $=c/2,b=a/2*(u/-8+1),y=o/2*u/4,[m,g]=n.split("-"),_=Tat.isRTL(r),I=!!l,A=m==="top"||m==="bottom",E=f&&g==="end"?"bottom":"top";let N=f&&g==="end"?"right":"left";f&&_&&(N=g==="end"?"left":"right");const U=(i==null?void 0:i.x)!=null?f||i.x:"",te=(i==null?void 0:i.y)!=null?f||i.y:"",Ie=l||"M0,0"+(" H"+a)+(" L"+(a-b)+","+(o-y))+(" Q"+a/2+","+o+" "+b+","+(o-y))+" Z",je={top:I?"rotate(180deg)":"",left:I?"rotate(90deg)":"rotate(-90deg)",bottom:I?"":"rotate(180deg)",right:I?"rotate(-90deg)":"rotate(90deg)"}[m];return qe.createElement("svg",iS({},v,{"aria-hidden":!0,ref:t,width:I?a:a+c,height:a,viewBox:"0 0 "+a+" "+(o>a?o:a),style:{position:"absolute",pointerEvents:"none",[N]:U,[E]:te,[m]:A||I?"100%":"calc(100% - "+c/2+"px)",transform:""+je+(d??""),...p}}),c>0&&qe.createElement("path",{clipPath:"url(#"+h+")",fill:"none",stroke:s,strokeWidth:c+(l?0:1),d:Ie}),qe.createElement("path",{stroke:c&&!l?v.fill:"none",d:Ie}),qe.createElement("clipPath",{id:h},qe.createElement("rect",{x:-$,y:$*(I?-1:1),width:a+c,height:a})))});function CXn(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(i=>i!==n))||[])}}}const PXn=qe.createContext(null),FXn=qe.createContext(null),WXn=()=>{var e;return((e=qe.useContext(PXn))==null?void 0:e.id)||null},ive=()=>qe.useContext(FXn);function wT(e){return"data-floating-ui-"+e}function k9(e){const t=pe.useRef(e);return lf(()=>{t.current=e}),t}function NXn(e,t){var n;let r=[],i=(n=e.find(a=>a.id===t))==null?void 0:n.parentId;for(;i;){const a=e.find(o=>o.id===i);i=a==null?void 0:a.parentId,a&&(r=r.concat(a))}return r}function bE(e,t){let n=e.filter(i=>{var a;return i.parentId===t&&((a=i.context)==null?void 0:a.open)}),r=n;for(;r.length;)r=e.filter(i=>{var a;return(a=r)==null?void 0:a.some(o=>{var u;return i.parentId===o.id&&((u=i.context)==null?void 0:u.open)})}),n=n.concat(r);return n}let q1=new WeakMap,a2=new WeakSet,o2={},U9=0;const jXn=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,jat=e=>e&&(e.host||jat(e.parentNode)),kXn=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=jat(n);return e.contains(r)?r:null}).filter(n=>n!=null);function UXn(e,t,n,r){const i="data-floating-ui-inert",a=r?"inert":n?"aria-hidden":null,o=kXn(t,e),u=new Set,c=new Set(o),f=[];o2[i]||(o2[i]=new WeakMap);const s=o2[i];o.forEach(l),d(t),u.clear();function l(p){!p||u.has(p)||(u.add(p),p.parentNode&&l(p.parentNode))}function d(p){!p||c.has(p)||Array.prototype.forEach.call(p.children,v=>{if(u.has(v))d(v);else{const h=a?v.getAttribute(a):null,$=h!==null&&h!=="false",b=(q1.get(v)||0)+1,y=(s.get(v)||0)+1;q1.set(v,b),s.set(v,y),f.push(v),b===1&&$&&a2.add(v),y===1&&v.setAttribute(i,""),!$&&a&&v.setAttribute(a,"true")}})}return U9++,()=>{f.forEach(p=>{const v=(q1.get(p)||0)-1,h=(s.get(p)||0)-1;q1.set(p,v),s.set(p,h),v||(!a2.has(p)&&a&&p.removeAttribute(a),a2.delete(p)),h||p.removeAttribute(i)}),U9--,U9||(q1=new WeakMap,q1=new WeakMap,a2=new WeakSet,o2={})}}function hwe(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=qp(e[0]).body;return UXn(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const ave=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function kat(e,t){const n=nve(e,ave());t==="prev"&&n.reverse();const r=n.indexOf(V1(qp(e)));return n.slice(r+1)[0]}function Uat(){return kat(document.body,"next")}function qat(){return kat(document.body,"prev")}function $E(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!uc(n,r)}function qXn(e){nve(e,ave()).forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")})}function xXn(e){e.querySelectorAll("[data-tabindex]").forEach(t=>{const n=t.dataset.tabindex;delete t.dataset.tabindex,n?t.setAttribute("tabindex",n):t.removeAttribute("tabindex")})}const ove={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let DXn;function vwe(e){e.key==="Tab"&&(e.target,clearTimeout(DXn))}const ex=qe.forwardRef(function(e,t){const[n,r]=qe.useState();lf(()=>(IZn()&&r("button"),document.addEventListener("keydown",vwe),()=>{document.removeEventListener("keydown",vwe)}),[]);const i={ref:t,tabIndex:0,role:n,"aria-hidden":n?void 0:!0,[wT("focus-guard")]:"",style:ove};return qe.createElement("span",iS({},e,i))}),xat=qe.createContext(null),mwe=wT("portal");function LXn(e){let{id:t,root:n}=e===void 0?{}:e;const[r,i]=qe.useState(null),a=a8(),o=Lat(),u=qe.useRef(null);return lf(()=>()=>{r==null||r.remove(),queueMicrotask(()=>{u.current=null})},[r]),lf(()=>{if(u.current)return;const c=t?document.getElementById(t):null;if(!c)return;const f=document.createElement("div");f.id=a,f.setAttribute(mwe,""),c.appendChild(f),u.current=f,i(f)},[t,a]),lf(()=>{if(u.current)return;let c=n||(o==null?void 0:o.portalNode);c&&!Ii(c)&&(c=c.current),c=c||document.body;let f=null;t&&(f=document.createElement("div"),f.id=t,c.appendChild(f));const s=document.createElement("div");s.id=a,s.setAttribute(mwe,""),c=f||c,c.appendChild(s),u.current=s,i(s)},[t,n,a,o]),r}function Dat(e){let{children:t,id:n,root:r=null,preserveTabOrder:i=!0}=e;const a=LXn({id:n,root:r}),[o,u]=qe.useState(null),c=qe.useRef(null),f=qe.useRef(null),s=qe.useRef(null),l=qe.useRef(null),d=!!o&&!o.modal&&o.open&&i&&!!(r||a);return qe.useEffect(()=>{if(!a||!i||o!=null&&o.modal)return;function p(v){a&&$E(v)&&(v.type==="focusin"?xXn:qXn)(a)}return a.addEventListener("focusin",p,!0),a.addEventListener("focusout",p,!0),()=>{a.removeEventListener("focusin",p,!0),a.removeEventListener("focusout",p,!0)}},[a,i,o==null?void 0:o.modal]),qe.createElement(xat.Provider,{value:qe.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:c,afterOutsideRef:f,beforeInsideRef:s,afterInsideRef:l,portalNode:a,setFocusManagerState:u}),[i,a])},d&&a&&qe.createElement(ex,{"data-type":"outside",ref:c,onFocus:p=>{if($E(p,a)){var v;(v=s.current)==null||v.focus()}else{const h=qat()||(o==null?void 0:o.refs.domReference.current);h==null||h.focus()}}}),d&&a&&qe.createElement("span",{"aria-owns":a.id,style:ove}),a&&Bwe.createPortal(t,a),d&&a&&qe.createElement(ex,{"data-type":"outside",ref:f,onFocus:p=>{if($E(p,a)){var v;(v=l.current)==null||v.focus()}else{const h=Uat()||(o==null?void 0:o.refs.domReference.current);h==null||h.focus(),o!=null&&o.closeOnFocusOut&&(o==null||o.onOpenChange(!1,p.nativeEvent))}}}))}const Lat=()=>qe.useContext(xat),gwe=20;let Vy=[];function q9(e){Vy=Vy.filter(t=>t.isConnected),e&&lh(e)!=="body"&&(Vy.push(e),Vy.length>gwe&&(Vy=Vy.slice(-gwe)))}function ywe(){return Vy.slice().reverse().find(e=>e.isConnected)}const BXn=qe.forwardRef(function(e,t){return qe.createElement("button",iS({},e,{type:"button",ref:t,tabIndex:-1,style:ove}))});function Bat(e){const{context:t,children:n,disabled:r=!1,order:i=["content"],guards:a=!0,initialFocus:o=0,returnFocus:u=!0,modal:c=!0,visuallyHiddenDismiss:f=!1,closeOnFocusOut:s=!0}=e,{open:l,refs:d,nodeId:p,onOpenChange:v,events:h,dataRef:$,elements:{domReference:b,floating:y}}=t,m=typeof o=="number"&&o<0,g=MZn(b)&&m,_=jXn()?a:!0,I=k9(i),A=k9(o),E=k9(u),N=ive(),U=Lat(),te=qe.useRef(null),Ie=qe.useRef(null),je=qe.useRef(!1),J=qe.useRef(!1),ee=U!=null,fe=qe.useCallback(function(Z){return Z===void 0&&(Z=y),Z?nve(Z,ave()):[]},[y]),ae=qe.useCallback(Z=>{const ve=fe(Z);return I.current.map(Ee=>b&&Ee==="reference"?b:y&&Ee==="floating"?y:ve).filter(Boolean).flat()},[b,y,I,fe]);qe.useEffect(()=>{if(r||!c)return;function Z(Ee){if(Ee.key==="Tab"){uc(y,V1(qp(y)))&&fe().length===0&&!g&&N9(Ee);const H=ae(),re=z1(Ee);I.current[0]==="reference"&&re===b&&(N9(Ee),Ee.shiftKey?qy(H[H.length-1]):qy(H[1])),I.current[1]==="floating"&&re===y&&Ee.shiftKey&&(N9(Ee),qy(H[0]))}}const ve=qp(y);return ve.addEventListener("keydown",Z),()=>{ve.removeEventListener("keydown",Z)}},[r,b,y,c,I,g,fe,ae]),qe.useEffect(()=>{if(r||!s)return;function Z(){J.current=!0,setTimeout(()=>{J.current=!1})}function ve(Ee){const H=Ee.relatedTarget;queueMicrotask(()=>{const re=!(uc(b,H)||uc(y,H)||uc(H,y)||uc(U==null?void 0:U.portalNode,H)||H!=null&&H.hasAttribute(wT("focus-guard"))||N&&(bE(N.nodesRef.current,p).find(oe=>{var ie,le;return uc((ie=oe.context)==null?void 0:ie.elements.floating,H)||uc((le=oe.context)==null?void 0:le.elements.domReference,H)})||NXn(N.nodesRef.current,p).find(oe=>{var ie,le;return((ie=oe.context)==null?void 0:ie.elements.floating)===H||((le=oe.context)==null?void 0:le.elements.domReference)===H})));H&&re&&!J.current&&H!==ywe()&&(je.current=!0,v(!1,Ee))})}if(y&&iu(b))return b.addEventListener("focusout",ve),b.addEventListener("pointerdown",Z),!c&&y.addEventListener("focusout",ve),()=>{b.removeEventListener("focusout",ve),b.removeEventListener("pointerdown",Z),!c&&y.removeEventListener("focusout",ve)}},[r,b,y,c,p,N,U,v,s]),qe.useEffect(()=>{var Z;if(r)return;const ve=Array.from((U==null||(Z=U.portalNode)==null?void 0:Z.querySelectorAll("["+wT("portal")+"]"))||[]);if(y){const Ee=[y,...ve,te.current,Ie.current,I.current.includes("reference")||g?b:null].filter(re=>re!=null),H=c||g?hwe(Ee,_,!_):hwe(Ee);return()=>{H()}}},[r,b,y,c,I,U,g,_]),lf(()=>{if(r||!y)return;const Z=qp(y),ve=V1(Z);queueMicrotask(()=>{const Ee=ae(y),H=A.current,re=(typeof H=="number"?Ee[H]:H.current)||y,oe=uc(y,ve);!m&&!oe&&l&&qy(re,{preventScroll:re===y})})},[r,l,y,m,ae,A]),lf(()=>{if(r||!y)return;let Z=!1;const ve=qp(y),Ee=V1(ve),H=$.current;q9(Ee);function re(oe){let{reason:ie,event:le,nested:me}=oe;ie==="escape-key"&&d.domReference.current&&q9(d.domReference.current),ie==="hover"&&le.type==="mouseleave"&&(je.current=!0),ie==="outside-press"&&(me?(je.current=!1,Z=!0):je.current=!(bZn(le)||$Zn(le)))}return h.on("openchange",re),()=>{h.off("openchange",re);const oe=V1(ve),ie=uc(y,oe)||N&&bE(N.nodesRef.current,p).some(me=>{var ye;return uc((ye=me.context)==null?void 0:ye.elements.floating,oe)});(ie||H.openEvent&&["click","mousedown"].includes(H.openEvent.type))&&d.domReference.current&&q9(d.domReference.current);const le=ywe();E.current&&!je.current&&iu(le)&&(!(le!==oe&&oe!==ve.body)||ie)&&qy(le,{cancelPrevious:!1,preventScroll:Z})}},[r,y,E,$,d,h,N,p]),lf(()=>{if(!(r||!U))return U.setFocusManagerState({modal:c,closeOnFocusOut:s,open:l,onOpenChange:v,refs:d}),()=>{U.setFocusManagerState(null)}},[r,U,c,l,v,d,s]),lf(()=>{if(r||!y||typeof MutationObserver!="function"||m)return;const Z=()=>{const Ee=y.getAttribute("tabindex");I.current.includes("floating")||V1(qp(y))!==d.domReference.current&&fe().length===0?Ee!=="0"&&y.setAttribute("tabindex","0"):Ee!=="-1"&&y.setAttribute("tabindex","-1")};Z();const ve=new MutationObserver(Z);return ve.observe(y,{childList:!0,subtree:!0,attributes:!0}),()=>{ve.disconnect()}},[r,y,d,I,fe,m]);function he(Z){return r||!f||!c?null:qe.createElement(BXn,{ref:Z==="start"?te:Ie,onClick:ve=>v(!1,ve.nativeEvent)},typeof f=="string"?f:"Dismiss")}const _e=!r&&_&&(ee||c);return qe.createElement(qe.Fragment,null,_e&&qe.createElement(ex,{"data-type":"inside",ref:U==null?void 0:U.beforeInsideRef,onFocus:Z=>{if(c){const Ee=ae();qy(i[0]==="reference"?Ee[0]:Ee[Ee.length-1])}else if(U!=null&&U.preserveTabOrder&&U.portalNode)if(je.current=!1,$E(Z,U.portalNode)){const Ee=Uat()||b;Ee==null||Ee.focus()}else{var ve;(ve=U.beforeOutsideRef.current)==null||ve.focus()}}}),!g&&he("start"),n,he("end"),_e&&qe.createElement(ex,{"data-type":"inside",ref:U==null?void 0:U.afterInsideRef,onFocus:Z=>{if(c)qy(ae()[0]);else if(U!=null&&U.preserveTabOrder&&U.portalNode)if(s&&(je.current=!0),$E(Z,U.portalNode)){const Ee=qat()||b;Ee==null||Ee.focus()}else{var ve;(ve=U.afterOutsideRef.current)==null||ve.focus()}}}))}const x9=new Set,Vat=qe.forwardRef(function(e,t){let{lockScroll:n=!1,...r}=e;const i=a8();return lf(()=>{if(!n)return;x9.add(i);const a=/iP(hone|ad|od)|iOS/.test(yat()),o=document.body.style,u=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",c=window.innerWidth-document.documentElement.clientWidth,f=o.left?parseFloat(o.left):window.pageXOffset,s=o.top?parseFloat(o.top):window.pageYOffset;if(o.overflow="hidden",c&&(o[u]=c+"px"),a){var l,d;const p=((l=window.visualViewport)==null?void 0:l.offsetLeft)||0,v=((d=window.visualViewport)==null?void 0:d.offsetTop)||0;Object.assign(o,{position:"fixed",top:-(s-Math.floor(v))+"px",left:-(f-Math.floor(p))+"px",right:"0"})}return()=>{x9.delete(i),x9.size===0&&(Object.assign(o,{overflow:"",[u]:""}),a&&(Object.assign(o,{position:"",top:"",left:"",right:""}),window.scrollTo(f,s)))}},[i,n]),qe.createElement("div",iS({ref:t},r,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...r.style}}))});function bwe(e){return iu(e.target)&&e.target.tagName==="BUTTON"}function $we(e){return $at(e)}function zat(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:a}}=e,{enabled:o=!0,event:u="click",toggle:c=!0,ignoreMouse:f=!1,keyboardHandlers:s=!0}=t,l=qe.useRef(),d=qe.useRef(!1);return qe.useMemo(()=>o?{reference:{onPointerDown(p){l.current=p.pointerType},onMouseDown(p){p.button===0&&(rwe(l.current,!0)&&f||u!=="click"&&(n&&c&&(!i.current.openEvent||i.current.openEvent.type==="mousedown")?r(!1,p.nativeEvent,"click"):(p.preventDefault(),r(!0,p.nativeEvent,"click"))))},onClick(p){if(u==="mousedown"&&l.current){l.current=void 0;return}rwe(l.current,!0)&&f||(n&&c&&(!i.current.openEvent||i.current.openEvent.type==="click")?r(!1,p.nativeEvent,"click"):r(!0,p.nativeEvent,"click"))},onKeyDown(p){l.current=void 0,!(p.defaultPrevented||!s||bwe(p))&&(p.key===" "&&!$we(a)&&(p.preventDefault(),d.current=!0),p.key==="Enter"&&r(!(n&&c),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!s||bwe(p)||$we(a)||p.key===" "&&d.current&&(d.current=!1,r(!(n&&c),p.nativeEvent,"click"))}}}:{},[o,i,u,f,s,a,c,n,r])}const VXn={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},zXn={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Iwe=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function Kat(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,nodeId:i,elements:{reference:a,domReference:o,floating:u},dataRef:c}=e,{enabled:f=!0,escapeKey:s=!0,outsidePress:l=!0,outsidePressEvent:d="pointerdown",referencePress:p=!1,referencePressEvent:v="pointerdown",ancestorScroll:h=!1,bubbles:$,capture:b}=t,y=ive(),m=K1(typeof l=="function"?l:()=>!1),g=typeof l=="function"?m:l,_=qe.useRef(!1),I=qe.useRef(!1),{escapeKey:A,outsidePress:E}=Iwe($),{escapeKey:N,outsidePress:U}=Iwe(b),te=K1(ee=>{if(!n||!f||!s||ee.key!=="Escape")return;const fe=y?bE(y.nodesRef.current,i):[];if(!A&&(ee.stopPropagation(),fe.length>0)){let ae=!0;if(fe.forEach(he=>{var _e;if((_e=he.context)!=null&&_e.open&&!he.context.dataRef.current.__escapeKeyBubbles){ae=!1;return}}),!ae)return}r(!1,SZn(ee)?ee.nativeEvent:ee,"escape-key")}),Ie=K1(ee=>{var fe;const ae=()=>{var he;te(ee),(he=z1(ee))==null||he.removeEventListener("keydown",ae)};(fe=z1(ee))==null||fe.addEventListener("keydown",ae)}),je=K1(ee=>{const fe=_.current;_.current=!1;const ae=I.current;if(I.current=!1,d==="click"&&ae||fe||typeof g=="function"&&!g(ee))return;const he=z1(ee),_e="["+wT("inert")+"]",Z=qp(u).querySelectorAll(_e);let ve=Ii(he)?he:null;for(;ve&&!nS(ve);){const re=Ub(ve);if(nS(re)||!Ii(re))break;ve=re}if(Z.length&&Ii(he)&&!wZn(he)&&!uc(he,u)&&Array.from(Z).every(re=>!uc(ve,re)))return;if(iu(he)&&u){const re=he.clientWidth>0&&he.scrollWidth>he.clientWidth,oe=he.clientHeight>0&&he.scrollHeight>he.clientHeight;let ie=oe&&ee.offsetX>he.clientWidth;if(oe&&Ac(he).direction==="rtl"&&(ie=ee.offsetX<=he.offsetWidth-he.clientWidth),ie||re&&ee.offsetY>he.clientHeight)return}const Ee=y&&bE(y.nodesRef.current,i).some(re=>{var oe;return W9(ee,(oe=re.context)==null?void 0:oe.elements.floating)});if(W9(ee,u)||W9(ee,o)||Ee)return;const H=y?bE(y.nodesRef.current,i):[];if(H.length>0){let re=!0;if(H.forEach(oe=>{var ie;if((ie=oe.context)!=null&&ie.open&&!oe.context.dataRef.current.__outsidePressBubbles){re=!1;return}}),!re)return}r(!1,ee,"outside-press")}),J=K1(ee=>{var fe;const ae=()=>{var he;je(ee),(he=z1(ee))==null||he.removeEventListener(d,ae)};(fe=z1(ee))==null||fe.addEventListener(d,ae)});return qe.useEffect(()=>{if(!n||!f)return;c.current.__escapeKeyBubbles=A,c.current.__outsidePressBubbles=E;function ee(he){r(!1,he,"ancestor-scroll")}const fe=qp(u);s&&fe.addEventListener("keydown",N?Ie:te,N),g&&fe.addEventListener(d,U?J:je,U);let ae=[];return h&&(Ii(o)&&(ae=Om(o)),Ii(u)&&(ae=ae.concat(Om(u))),!Ii(a)&&a&&a.contextElement&&(ae=ae.concat(Om(a.contextElement)))),ae=ae.filter(he=>{var _e;return he!==((_e=fe.defaultView)==null?void 0:_e.visualViewport)}),ae.forEach(he=>{he.addEventListener("scroll",ee,{passive:!0})}),()=>{s&&fe.removeEventListener("keydown",N?Ie:te,N),g&&fe.removeEventListener(d,U?J:je,U),ae.forEach(he=>{he.removeEventListener("scroll",ee)})}},[c,u,o,a,s,g,d,n,r,h,f,A,E,te,N,Ie,je,U,J]),qe.useEffect(()=>{_.current=!1},[g,d]),qe.useMemo(()=>f?{reference:{onKeyDown:te,[VXn[v]]:ee=>{p&&r(!1,ee.nativeEvent,"reference-press")}},floating:{onKeyDown:te,onMouseDown(){I.current=!0},onMouseUp(){I.current=!0},[zXn[d]]:()=>{_.current=!0}}}:{},[f,p,d,v,r,te])}let sJ;process.env.NODE_ENV!=="production"&&(sJ=new Set);function Gat(e){var t;e===void 0&&(e={});const{open:n=!1,onOpenChange:r,nodeId:i}=e;if(process.env.NODE_ENV!=="production"){var a;const E="Floating UI: Cannot pass a virtual element to the `elements.reference` option, as it must be a real DOM element. Use `refs.setPositionReference` instead.";if((a=e.elements)!=null&&a.reference&&!Ii(e.elements.reference)){var o;if(!((o=sJ)!=null&&o.has(E))){var u;(u=sJ)==null||u.add(E),console.error(E)}}}const[c,f]=qe.useState(null),s=((t=e.elements)==null?void 0:t.reference)||c,l=oXn(e),d=ive(),p=WXn()!=null,v=K1((E,N,U)=>{E&&($.current.openEvent=N),b.emit("openchange",{open:E,event:N,reason:U,nested:p}),r==null||r(E,N,U)}),h=qe.useRef(null),$=qe.useRef({}),b=qe.useState(()=>CXn())[0],y=a8(),m=qe.useCallback(E=>{const N=Ii(E)?{getBoundingClientRect:()=>E.getBoundingClientRect(),contextElement:E}:E;l.refs.setReference(N)},[l.refs]),g=qe.useCallback(E=>{(Ii(E)||E===null)&&(h.current=E,f(E)),(Ii(l.refs.reference.current)||l.refs.reference.current===null||E!==null&&!Ii(E))&&l.refs.setReference(E)},[l.refs]),_=qe.useMemo(()=>({...l.refs,setReference:g,setPositionReference:m,domReference:h}),[l.refs,g,m]),I=qe.useMemo(()=>({...l.elements,domReference:s}),[l.elements,s]),A=qe.useMemo(()=>({...l,refs:_,elements:I,dataRef:$,nodeId:i,floatingId:y,events:b,open:n,onOpenChange:v}),[l,i,y,b,n,v,_,I]);return lf(()=>{const E=d==null?void 0:d.nodesRef.current.find(N=>N.id===i);E&&(E.context=A)}),qe.useMemo(()=>({...l,context:A,refs:_,elements:I}),[l,_,I,A])}const _we="active",Swe="selected";function D9(e,t,n){const r=new Map,i=n==="item";let a=e;if(i&&e){const{[_we]:o,[Swe]:u,...c}=e;a=c}return{...n==="floating"&&{tabIndex:-1},...a,...t.map(o=>{const u=o?o[n]:null;return typeof u=="function"?e?u(e):null:u}).concat(e).reduce((o,u)=>(u&&Object.entries(u).forEach(c=>{let[f,s]=c;if(!(i&&[_we,Swe].includes(f)))if(f.indexOf("on")===0){if(r.has(f)||r.set(f,[]),typeof s=="function"){var l;(l=r.get(f))==null||l.push(s),o[f]=function(){for(var d,p=arguments.length,v=new Array(p),h=0;h$(...v)).find($=>$!==void 0)}}}else o[f]=s}),o),{})}}function Hat(e){e===void 0&&(e=[]);const t=e,n=qe.useCallback(a=>D9(a,e,"reference"),t),r=qe.useCallback(a=>D9(a,e,"floating"),t),i=qe.useCallback(a=>D9(a,e,"item"),e.map(a=>a==null?void 0:a.item));return qe.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:i}),[n,r,i])}function KXn(e={}){const{initialOpen:t=!1,open:n,onOpenChange:r}=e,[i,a]=qe.useState(t),o=n??i,u=r??a,c=Gat({open:o,onOpenChange:u}),f=c.context,s=zat(f,{enabled:n==null}),l=Kat(f,{outsidePressEvent:"mousedown"}),d=Hat([s,l]);return qe.useMemo(()=>({open:o,setOpen:u,...d,...c}),[o,u,d,c])}const Jat=qe.createContext(null),Yat=()=>{const e=qe.useContext(Jat);if(e==null)throw new Error("Dialog components must be wrapped in ");return e};function GXn({children:e,...t}){const n=KXn(t);return Y.jsx(Jat.Provider,{value:n,children:e})}const Zat=Ehe` display: flex; justify-content: center; align-items: center; z-index: 100; padding: var(--space-md-fixed); `,HXn=St(Vat)` ${Zat}; `,JXn=pe.forwardRef((e,t)=>{const{style:n,children:r,components:i,...a}=e,o=Yat(),u=rve([o.refs.setFloating,t]),c=(i==null?void 0:i.Overlay)??HXn;return Y.jsx(Dat,{children:Y.jsx(c,{lockScroll:!0,children:Y.jsx(Bat,{context:o.context,children:Y.jsx("div",{ref:u,...o.getFloatingProps(a),children:r})})})})}),YXn=JXn;function Xat(e){const t=pe.useContext(_T),[n,r]=pe.useState(t);return Y.jsx(_T.Provider,{value:n,children:e.children})}const ZXn=pe.forwardRef((e,t)=>{const{setOpen:n}=Yat();return Y.jsx("button",{type:"button",...e,ref:t,onClick:r=>{var i;(i=e.onClick)==null||i.call(e,r),n(!1)}})}),XXn=ZXn,QXn=St.span` color: var(--color-explain-header-value-color); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; `;function Qat(e){const{explainQuestion:t}=Vv(),{configurationSubjectTitle:n,componentDecisionStateIncludedLabel:r,componentDecisionStateExcludedLabel:i,booleanDecisionStateFalseLabel:a,booleanDecisionStateTrueLabel:o,isBlockedSuffix:u,isNotSatisfiedSuffix:c,generalConflictTitle:f}=Jhe();if(!t)return Y.jsx("div",{...e,children:f});const s=Ze(t).returnType().with({subject:Nt.configuration},()=>n).with({subject:Nt.attribute},d=>n8(d.attributeId)??d.attributeId.localId).with({subject:Nt.choiceValue},d=>Lk(d.attributeId)[d.choiceValueId]??d.choiceValueId).with({subject:Nt.component,state:Pt.Included},()=>r).with({subject:Nt.component,state:Pt.Excluded},()=>i).with({subject:Nt.boolean,state:!0},()=>o).with({subject:Nt.boolean,state:!1},()=>a).with({subject:Nt.numeric},d=>d.state.toString()).exhaustive(),l=Ze(t).returnType().with({question:Qr.whyIsStateNotPossible},()=>u).with({question:Qr.whyIsNotSatisfied},()=>c).exhaustive();return Y.jsxs("div",{...e,children:[Y.jsx(QXn,{children:s})," ",l]})}const eQn=St.div` position: sticky; top: 0; transition: all 0.1s; border-top: 1px solid transparent; &.active { box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); border-color: var(--color-explain-dialog-scroll-shadow-border); } @media only screen and (min-resolution: 2dppx) { border-top-width: 0.5px; } `;function tQn(e){const[t,n]=pe.useState(!1),r=pe.useRef(null);return pe.useEffect(()=>{const i=new IntersectionObserver(([o])=>n(!o.isIntersecting),{root:null,threshold:1}),a=r.current;return a&&i.observe(a),()=>{a&&i.unobserve(a)}},[]),Y.jsxs(Y.Fragment,{children:[Y.jsx("div",{ref:r}),Y.jsx(eQn,{...nat(e,{className:XJn(t&&"active")})})]})}const nQn=St(ce.motion.div)` position: relative; background-color: var(--color-explain-dialog-fill); backdrop-filter: var(--backdrop-filter-explain-dialog); color: var(--color-explain-dialog-color); outline-offset: -1px; padding-top: 1.1em; border-radius: var(--shape-border-radius-md); box-shadow: var(--shadows-dialog); font-size: var(--text-base-size); font-family: var(--font-primary); display: grid; grid-template-rows: [header] auto [content] auto; grid-template-columns: [header content] 1fr; align-content: start; min-height: min(calc(100vh - var(--space-md) * 2), 350px); max-height: min(calc(100vh - var(--space-md) * 2), 700px); max-width: min(calc(100vw - var(--space-md) * 2), 700px); min-width: min(calc(100vw - var(--space-md) * 2), 500px); `,rQn=St.div` overflow-y: auto; grid-area: content; padding-left: var(--space-xs-fixed); padding-right: var(--space-xs-fixed); padding-bottom: var(--space-xs-fixed); `,iQn=St(tQn)` margin-left: calc(var(--space-xs-fixed) * -1); margin-right: calc(var(--space-xs-fixed) * -1); `,aQn=St(XXn)` position: absolute; right: var(--space-sm-fixed); top: var(--space-sm-fixed); border: none; background-color: transparent; color: inherit; font-size: var(--text-sm); cursor: pointer; border-radius: var(--shape-border-radius-xs); &:focus { outline: 2px solid var(--color-explain-dialog-close-button-outline); outline-offset: 1px; } `,oQn=St(Qat)` grid-area: header; font-size: var(--text-md); font-weight: 500; font-family: var(--font-heading); margin-bottom: var(--space-xs); overflow: hidden; display: flex; white-space: nowrap; text-overflow: ellipsis; margin-right: var(--space-md); margin-left: calc(var(--space-xs-fixed) + var(--space-sm-fixed)); `,uQn={initial:{opacity:0,scale:.5},open:{opacity:1,scale:1,transition:{type:"spring",stiffness:600,damping:40}},close:{opacity:0,scale:.7,transition:{duration:.1,ease:"cubicInOut"}}};function cQn(e){return Y.jsxs(nQn,{variants:uQn,initial:"initial",animate:"open",exit:"close",children:[Y.jsx(oQn,{}),Y.jsxs(rQn,{children:[Y.jsx(iQn,{}),e.children]}),Y.jsx(aQn,{children:Y.jsx(Qm,{icon:_it})})]})}const fQn=St(YXn)` --color-explain-attribute-value-fill: ${e=>e.attributeValueFill}; --color-explain-attribute-value-add-fill: ${e=>e.attributeValueAddFill}; --color-explain-attribute-value-add-color: ${e=>e.attributeValueAddColor}; --color-explain-attribute-value-remove-fill: ${e=>e.attributeValueRemoveFill}; --color-explain-attribute-value-remove-color: ${e=>e.attributeValueRemoveColor}; --color-explain-header-value-color: ${e=>e.headerValueColor}; --color-explain-dialog-fill: ${e=>e.fill}; --color-explain-dialog-color: ${e=>e.color}; --color-explain-dialog-close-button-outline: ${e=>e.closeButtonOutline}; --color-explain-dialog-apply-solution-button-fill: ${e=>e.applySolutionButtonFill}; --color-explain-dialog-apply-solution-button-color: ${e=>e.applySolutionButtonColor}; --color-explain-dialog-apply-solution-button-outline: ${e=>e.applySolutionButtonOutline}; --color-explain-dialog-explanation-card: ${e=>e.explanationCard}; --color-explain-dialog-scroll-shadow-border: ${e=>e.scrollShadowBorder}; --backdrop-filter-explain-dialog: ${e=>e.backdropFilter}; display: grid; &:focus { outline: none; } `;function sQn(e){const t=Vv(),n=(t==null?void 0:t.displayMode)==="dialog";return Y.jsx(GXn,{open:n,onOpenChange:r=>!r&&n&&(t==null?void 0:t.dismiss()),children:Y.jsx(lQn,{...e,isOpen:n,children:pe.Children.toArray(e.content)[0]??Y.jsx(cQn,{children:Y.jsx(gZn,{})})})})}function lQn(e){return Y.jsx(ce.AnimatePresence,{initial:!1,children:e.isOpen&&Y.jsx(Hhe.Provider,{value:e,children:Y.jsx(fQn,{...e,components:{Overlay:pQn},children:Y.jsx(Xat,{children:e.children})})})})}const dQn=St(ce.motion(Vat))` ${Zat} `;function pQn(e){return Y.jsx(dQn,{...e,initial:{backgroundColor:"rgba(0,0,0,0)"},animate:{backgroundColor:"rgba(0,0,0,0.1)"},exit:{backgroundColor:"rgba(0,0,0,0)"}})}function hQn(e){const[t,n]=pe.useState(null),{explain:r,applySolution:i}=k9n(),a=pe.useRef(null),o=pe.useCallback(async(p,v,h,$)=>{const b=yM.guid();a.current=b,n(null);try{const y=await p(),m=y,g=y,_=(m==null?void 0:m.decisionExplanations)??[],I=(g==null?void 0:g.constraintExplanations)??[];b==a.current&&n({controlId:$,displayMode:_.length===0&&I.length>0?"dialog":h,explainQuestion:v,hasError:!1,decisionExplanations:vQn(_),constraintExplanations:I})}catch{b==a.current&&n({controlId:$,displayMode:h,explainQuestion:v,hasError:!0,decisionExplanations:null,constraintExplanations:null})}},[]),u=pe.useCallback((p,v,h)=>{const $=typeof p=="function"?p(Znt):p;return o(()=>e.explainConstraints?r($,"full"):r($,"decisions"),$,v,h)},[e.explainConstraints,r,o]),c=pe.useCallback((p,v,h)=>o(()=>Promise.resolve(p),null,v,h),[o]),f=pe.useCallback(()=>{n(null)},[]),s=pe.useCallback(p=>(f(),i(p)),[i,f]),l=pe.useCallback(p=>{n(v=>v!=null?{...v,displayMode:p}:v)},[]),d=pe.useMemo(()=>({process:t,applySolution:s,explain:u,handleExplainAnswer:c,dismiss:f,switchMode:l}),[t,s,u,c,f,l]);return Y.jsx(_T.Provider,{value:d,children:e.children})}function vQn(e){const t=M(ose,Ic(r=>r.solution==null)),n=M(h$,Ic(r=>r.causedByDecisions.length));return M(e,ABe([t,n]))}const aS=new Map;function tx(e){const{singletonId:t,children:n}=e,[r,i]=pe.useState(!1),a=pe.useRef({chose:()=>i(!0)});return pe.useEffect(()=>(mQn(t,a.current),()=>gQn(t,a.current)),[]),r?Y.jsx(Y.Fragment,{children:n}):null}function mQn(e,t){bQn(e).candidates.add(t),eot(e)}function gQn(e,t){let n=aS.get(e);n!=null&&(n.candidates.delete(t),n.chosen===t&&(n.chosen=null),yQn(e),eot(e))}function eot(e){let t=aS.get(e);if(t==null||t.chosen!=null)return;const n=t.candidates.values().next().value;n!=null&&(t.chosen=n,n.chose())}function yQn(e){let t=aS.get(e);t==null||t.candidates.size>0||aS.delete(e)}function bQn(e){let t=aS.get(e);return t==null&&(t={chosen:null,candidates:new Set},aS.set(e,t)),t}const Mc={attributeId:{title:"Attribute Id",type:ce.ControlType.String},componentPath:{title:"Component Path",type:ce.ControlType.String},sharedConfigurationModel:{title:"Shared Configuration Model",type:ce.ControlType.String}},wwe={description:{title:"Description",type:ce.ControlType.String},regex:{title:"Regex",type:ce.ControlType.String},direction:{title:"Direction",type:ce.ControlType.Enum,defaultValue:"asc",options:["asc","desc"],displaySegmentedControl:!0},mode:{title:"Mode",type:ce.ControlType.Enum,defaultValue:"isMatch",options:["isMatch","string","numeric"]}},$Qn={choiceValueSorting:{title:"Choice Value Sorting",type:ce.ControlType.Object,defaultValue:null,buttonTitle:"Definition…",controls:{defaultRules:{title:"Default Rules",type:ce.ControlType.Array,control:{type:ce.ControlType.Object,controls:wwe}},attributes:{title:"Attribute",type:ce.ControlType.Array,control:{type:ce.ControlType.Object,controls:{...Mc,choiceValues:{title:"Choice Values",type:ce.ControlType.Array,control:{type:ce.ControlType.String}},rules:{title:"Rules",type:ce.ControlType.Array,control:{type:ce.ControlType.Object,controls:wwe}}}}},jsonDefinition:{title:"Definition – JSON",type:ce.ControlType.String,displayTextArea:!0}}}};function IQn(e,t){const n=[],r=(a,o)=>{const u=n.find(f=>e.equals(f.first,a)&&e.equals(f.second,o));if(u)return u.ordering;const c=t.compare(a,o);return n.push({first:a,second:o,ordering:c}),c},i=iv(r);return{cachedOrderings:n,...i}}function _Qn(){const e=[];return{getCache:(t,n)=>{const r=e.find(a=>a.eq===t&&a.ord===n);if(r)return r.ordCache;const i=IQn(t,n);return e.push({eq:t,ord:n,ordCache:i}),i}}}const tot=bW(),SQn=new Intl.Collator("en",{sensitivity:"base"}),wQn=new Intl.Collator("en",{sensitivity:"variant"}),AQn={regex:".*",direction:"asc",mode:"string"},MQn=M([SQn,wQn],pt(WQn),pM(bW())),RQn=M(ose,Ic(e=>Qp(e))),OQn=h$;function EQn(e,t){return M((t==null?void 0:t.attributes)??[],mf(n=>zr.equals(Ji(n),e)),Nr(n=>[TQn(n.choiceValues??[]),Awe(n.rules??[])]),_c(()=>[Awe((t==null?void 0:t.defaultRules)??[])]),Sb(not(AQn)),pM(tot))}function TQn(e){return M(h$,qm,fue,qm,Ic(t=>M(e,PW(n=>Ge.equals(t,n)))))}function Awe(e){return M(e,pt(not),pM(tot))}function not(e){const t=yue(()=>new RegExp(e.regex)),n=Ze(e.mode).returnType().with("string",()=>CQn(e.direction)).with("numeric",()=>PQn(e.direction)).with("isMatch",()=>FQn(e.direction)).exhaustive();return M(n,Ic(r=>M(t,bue(i=>(i.lastIndex=0,i[Symbol.match](r))),LA(i=>M(i,Xp(1),lue(()=>M(i,Xp(0))))))))}function CQn(e){return M(MQn,uve(e),rot)}function PQn(e){return M(OQn,uve(e),rot,Ic(LA(Tgn)))}function FQn(e){return M(RQn,uve(e))}function rot(e){return M(e,qm,fue,qm)}function uve(e){return t=>Ze(e).returnType().with("asc",()=>t).with("desc",()=>qm(t)).exhaustive()}function WQn(e){return iv((t,n)=>Ze(e.compare(t,n)).returnType().with(Bi.number.gt(0),()=>1).with(Bi.number.lt(0),()=>-1).otherwise(()=>0))}const NQn=_Qn(),iot=pe.createContext(null);function nx(e,t,n){const r=pe.useContext(iot),i=pe.useMemo(()=>M(EQn(e,r),o=>NQn.getCache(Ge,o),Ic(o=>t.get(o.id)??o.id)),[t]),{attribute:a}=dR(e);return M(n??(a==null?void 0:a.values)??[],FW(i))}const jQn={localization:{title:"Localization",type:ce.ControlType.Object,defaultValue:null,buttonTitle:"Definition…",controls:{jsonDefinition:{title:"Definition – JSON",type:ce.ControlType.String,displayTextArea:!0}}}},aot=es(e=>{const{hcaBaseUrl:t,sessionCreation:n,accessToken:r,sessionCreateUrl:i,sessionDeleteUrl:a,deploymentName:o,channel:u,children:c,explainDialogProps:f,explainPopoverProps:s,explainConstraints:l}=e,{activeLocale:d}=ce.useLocaleInfo(),p=d.code;if(pe.useEffect(()=>{console.info("Current locale code:",p)},[p]),Pi())return Y.jsxs(Y.Fragment,{children:[c,Y.jsx(tx,{singletonId:"Configuration",children:Y.jsx(ZSe,{})})]});const v=pe.useMemo(()=>{var y;return M(pc((y=e.attributeRelations)==null?void 0:y.jsonDefinition),ib(m=>m.length>0),Nr(m=>JSON.parse(m)),f_)},[e.attributeRelations]),h=pe.useMemo(()=>{var y;return M(pc((y=e.choiceValueSorting)==null?void 0:y.jsonDefinition),ib(m=>m.length>0),Nr(m=>JSON.parse(m)),D5(()=>pc(e.choiceValueSorting)),_c(()=>({attributes:[],defaultRules:[]})))},[e.choiceValueSorting]),$=pe.useMemo(()=>{var y;return M(pc((y=e.localization)==null?void 0:y.jsonDefinition),ib(m=>m.length>0),Nr(m=>JSON.parse(m)),_c(()=>({attributes:[],choiceValues:[]})))},[e.localization]),b=pe.useMemo(()=>({apiBaseUrl:D9n(t,"api","engine"),sessionInitialisationOptions:Ze(n).with("client-side",()=>({accessToken:r})).with("server-side",()=>({sessionCreateUrl:i})).exhaustive(),configurationModelSource:{type:H_.Channel,channel:u,deploymentName:o},attributeRelations:v,allowedInExplain:{rules:{type:Mm.all}}}),[t,n,r,i,a,u,o,v]);return Y.jsxs(Y.Fragment,{children:[Y.jsxs(W9n,{sessionContext:b,children:[Y.jsx(DYn,{...e}),Y.jsx(pe.Suspense,{children:Y.jsx(t8.Provider,{value:$,children:Y.jsxs(hQn,{explainConstraints:l,children:[Y.jsx(Khe.Provider,{value:s,children:Y.jsx(iot.Provider,{value:h,children:c})}),Y.jsx(sQn,{...f})]})})})]}),Y.jsx(tx,{singletonId:"Configuration",children:Y.jsx(ZSe,{})})]})}),kQn=aot;ce.addPropertyControls(aot,{children:{title:"Content",type:ce.ControlType.ComponentInstance},channel:{type:ce.ControlType.String,title:"Channel",defaultValue:"release"},deploymentName:{type:ce.ControlType.String,title:"Deployment Name"},hcaBaseUrl:{title:"HCA Base URL",type:ce.ControlType.String,defaultValue:"https://spc.cloud.ceventis.de/hca"},sessionCreation:{title:"Session Creation",type:ce.ControlType.Enum,displaySegmentedControl:!0,segmentedControlDirection:"horizontal",defaultValue:"client-side",options:["client-side","server-side"]},accessToken:{title:"HCA Access Token",type:ce.ControlType.String,obscured:!0,hidden:e=>e.sessionCreation!=="client-side"},sessionCreateUrl:{title:"Create Session URl",type:ce.ControlType.String,hidden:e=>e.sessionCreation!=="server-side"},sessionDeleteUrl:{title:"Close Session URl",type:ce.ControlType.String,hidden:e=>e.sessionCreation!=="server-side"},configurationModelNotFoundContent:{title:"Content – Configuration Model not found",type:ce.ControlType.ComponentInstance},errorContent:{title:"Content – Error",type:ce.ControlType.ComponentInstance},accessTokenInvalidContent:{title:"Content – HCA Access Token invalid",type:ce.ControlType.ComponentInstance},accessTokenRestrictionContent:{title:"Content – HCA Access Token restriction",type:ce.ControlType.ComponentInstance},explainDialogProps:{title:"Explain Dialog",type:ce.ControlType.Object,optional:!1,controls:ZYn,buttonTitle:"Props…"},explainPopoverProps:{title:"Explain Popover",type:ce.ControlType.Object,optional:!1,controls:YYn,buttonTitle:"Props…"},explainConstraints:{title:"Explain Constraints",type:ce.ControlType.Boolean,defaultValue:!1},attributeRelations:{title:"Attribute Relations",type:ce.ControlType.Object,defaultValue:null,buttonTitle:"Definition…",controls:{jsonDefinition:{title:"Definition – JSON",type:ce.ControlType.String,displayTextArea:!0}}},...$Qn,...jQn});const oot={padding:{type:ce.ControlType.FusedNumber,title:"Padding",toggleKey:"isMixedPadding",toggleTitles:["Padding","Padding per Side"],valueKeys:["paddingTop","paddingRight","paddingBottom","paddingLeft"],valueLabels:["Top","Right","Bottom","Left"],min:0,defaultValue:0}},UQn=e=>({paddingTop:e.isMixedPadding?e.paddingTop:e.padding,paddingRight:e.isMixedPadding?e.paddingRight:e.padding,paddingBottom:e.isMixedPadding?e.paddingBottom:e.padding,paddingLeft:e.isMixedPadding?e.paddingLeft:e.padding}),qQn={radius:{title:"Radius",type:ce.ControlType.Number,defaultValue:6},...oot,border:{title:"Border",type:ce.ControlType.Object,controls:{color:{type:ce.ControlType.Color,title:"Color"},width:{type:ce.ControlType.FusedNumber,title:"Width",toggleKey:"isMixedWidth",toggleTitles:["Width","Width per Side"],valueKeys:["widthTop","widthRight","widthBottom","widthLeft"],valueLabels:["Top","Right","Bottom","Left"],min:0,defaultValue:0}}}},xQn=e=>{var t,n,r,i,a,o,u,c,f,s,l,d,p;return{borderRadius:e.radius,borderColor:(t=e.border)==null?void 0:t.color,borderTopWidth:(n=e.border)!=null&&n.isMixedWidth?(r=e.border)==null?void 0:r.widthTop:(i=e.border)==null?void 0:i.width,borderRightWidth:(a=e.border)!=null&&a.isMixedWidth?(o=e.border)==null?void 0:o.widthRight:(u=e.border)==null?void 0:u.width,borderBottomWidth:(c=e.border)!=null&&c.isMixedWidth?(f=e.border)==null?void 0:f.widthBottom:(s=e.border)==null?void 0:s.width,borderLeftWidth:(l=e.border)!=null&&l.isMixedWidth?(d=e.border)==null?void 0:d.widthLeft:(p=e.border)==null?void 0:p.width}},DQn={fill:{title:"Fill",type:ce.ControlType.Color,defaultValue:"#EBEBEB"},...oot,...qQn},LQn=e=>({...UQn(e),...xQn(e),backgroundColor:e.fill}),BQn={color:{title:"Color",type:ce.ControlType.Color,defaultValue:"black"},text:{title:"Text",type:ce.ControlType.Font,controls:"basic",displayTextAlignment:!0,displayFontSize:!0}},VQn=e=>({...e.text,color:e.color}),gR={explain:{title:"Explain",type:ce.ControlType.Enum,defaultValue:"popover",options:["popover","dialog","disabled"]}},lJ={type:ce.ControlType.Object,optional:!0,controls:{fill:{title:"Fill",type:ce.ControlType.Color,optional:!0},color:{title:"Color",type:ce.ControlType.Color,optional:!0},borderColor:{title:"Border Color",type:ce.ControlType.Color,optional:!0}}},uot={...Mc,...BQn,...DQn,implicitLabelPrefix:{title:"Implicit Label Prefix",type:ce.ControlType.String,defaultValue:"Implicit: "},unsatisfiedColors:{...lJ,title:"Unsatisfied Colors"},implicitSelectedColors:{...lJ,title:"Implicit Selected Colors"},...gR},dJ=(e,t,n)=>{var r,i,a,o,u,c;const f=LQn(e),s=VQn(e);return{...f,...s,backgroundColor:Ze({isSatisfied:t,isImplicitSelected:n,unsatisfiedFill:(r=e.unsatisfiedColors)==null?void 0:r.fill,implicitSelectedFill:(i=e.implicitSelectedColors)==null?void 0:i.fill}).with({isSatisfied:!1,unsatisfiedFill:Bi.string.minLength(1)},l=>l.unsatisfiedFill).with({isImplicitSelected:!0,implicitSelectedFill:Bi.string.minLength(1)},l=>l.implicitSelectedFill).otherwise(()=>f.backgroundColor),borderColor:Ze({isSatisfied:t,isImplicitSelected:n,unsatisfiedBorderColor:(a=e.unsatisfiedColors)==null?void 0:a.borderColor,implicitSelectedBorderColor:(o=e.implicitSelectedColors)==null?void 0:o.borderColor}).with({isSatisfied:!1,unsatisfiedBorderColor:Bi.string.minLength(1)},l=>l.unsatisfiedBorderColor).with({isImplicitSelected:!0,implicitSelectedBorderColor:Bi.string.minLength(1)},l=>l.implicitSelectedBorderColor).otherwise(()=>f.borderColor),color:Ze({isSatisfied:t,isImplicitSelected:n,unsatisfiedColor:(u=e.unsatisfiedColors)==null?void 0:u.color,implicitSelectedColor:(c=e.implicitSelectedColors)==null?void 0:c.color}).with({isSatisfied:!1,unsatisfiedColor:Bi.string.minLength(1)},l=>l.unsatisfiedColor).with({isImplicitSelected:!0,implicitSelectedColor:Bi.string.minLength(1)},l=>l.implicitSelectedColor).otherwise(()=>s.color),...e.style}},cve={...uot,resetLabel:{title:"Reset Label",type:ce.ControlType.String,defaultValue:"Reset"},blockedLabel:{title:"Blocked Label",type:ce.ControlType.String,defaultValue:"Blocked"},appearance:{title:"Appearance",type:ce.ControlType.Enum,defaultValue:"auto",displaySegmentedControl:!0,segmentedControlDirection:"horizontal",options:["auto","none"]}},oS=(e,t,n)=>({...dJ(e,t,n),appearance:e.appearance});function bp(){const{explain:e,handleExplainAnswer:t}=pe.useContext(_T);return{explain:e,handleExplainAnswer:t}}function zQn(e={}){const{initialOpen:t=!1,placement:n="top",modal:r=!1,open:i,onOpenChange:a,arrow:o}=e,[u,c]=pe.useState(t),f=i??u,s=a??c,l=Gat({placement:n,open:f,onOpenChange:s,whileElementsMounted:tXn,middleware:[UZn(((o==null?void 0:o.height)??0)+5),rXn({crossAxis:n.includes("-"),fallbackAxisSideDirection:"end",padding:5}),nXn({padding:5}),...o?[aXn(o)]:[]]}),d=l.context,p=zat(d,{enabled:i==null}),v=Kat(d),h=Hat([p,v]);return pe.useMemo(()=>({open:f,setOpen:s,...h,...l,modal:r,arrow:o}),[f,s,h,l,r,o])}const cot=pe.createContext(null),Kk=()=>{const e=pe.useContext(cot);if(e==null)throw new Error("Popover components must be wrapped in ");return e};function KQn({children:e,...t}){const n=zQn(t);return Y.jsx(cot.Provider,{value:n,children:e})}const GQn=pe.forwardRef(function(e,t){const n=pe.Children.toArray(e.children)[0],r=Kk(),i=e.children.ref,a=rve([r.refs.setReference,t,i]);return pe.isValidElement(n)?pe.cloneElement(n,r.getReferenceProps({ref:a,...e,...n.props,"data-state":r.open?"open":"closed"})):Y.jsx("span",{children:"Not valid children for PopoverTrigger"})}),HQn=GQn,JQn=St.div` display: flex; justify-content: center; // The Webstorm formatter doesn't support container queries and would be break it. // @formatter:off @container explain-actions (min-width: 300px) { justify-content: start; } `,YQn=St.button` color: inherit; font-size: 0.9em; font-family: var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif); font-weight: 500; appearance: none; border: none; border-radius: var(--shape-border-radius-xs); margin-top: 0.9em; text-decoration: underline; cursor: pointer; background-color: transparent; &:focus { outline: 2px solid var(--color-explain-popover-show-more-button-outline); outline-offset: 1px; } `;function ZQn(){const{decisionExplanations:e,switchMode:t}=Vv(),{showConstraintsButtonCaption:n,showMoreButtonCaption:r}=Ghe(),i=e.length-1,a=pe.useMemo(()=>i>0&&$f.render(r,{amount:i}),[r,i]);return Y.jsx(JQn,{children:Y.jsxs(YQn,{onClick:()=>t("dialog"),children:[i>0&&Y.jsx("span",{children:a}),i===0&&Y.jsx("span",{children:n})]})})}const XQn=St.div` font-weight: 500; font-family: var(--font-heading); margin-bottom: var(--space-xs); `,Mwe=St.div` height: 1px; background-color: var(--color-explain-popover-list-separator); margin-left: -1.1em; margin-right: -1.1em; @media only screen and (min-resolution: 2dppx) { height: 0.5px; } `,QQn=St.div` container: explain-actions / inline-size; `,eer=St(dat)` display: grid; grid-template-columns: [name] minmax(100px, auto) [values] minmax(100px, 1fr); gap: var(--space-sm); padding-top: var(--space-xs); padding-bottom: var(--space-xs); padding-right: 1.1em; margin-right: -1.1em; overflow: auto; max-height: 200px; `,ter=St(uat)` border-radius: 360px; background-color: var(--color-explain-popover-apply-solution-button-fill); color: var(--color-explain-popover-apply-solution-button-color); font-size: 0.9em; font-family: var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif); font-weight: 600; appearance: none; padding: 0.6em 2em; border: none; width: 100%; margin-top: 1.1em; &:focus { outline: 2px solid var(--color-explain-popover-apply-solution-button-outline); outline-offset: 1px; } // The Webstorm formatter doesn't support container queries and would be break it. // @formatter:off @container explain-actions (min-width: 300px) { width: auto; } `,L9=St(hat)` width: min-content; min-width: 300px; `;function ner(){const{decisionExplanations:e,constraintExplanations:t,hasError:n}=Vv(),{solutionTitle:r,applySolutionButtonCaption:i}=Ghe();if(n)return Y.jsx(L9,{variant:"failedToExplain"});const a=e[0];if(!a)return Y.jsx(L9,{variant:"noExplanationFound"});if(!a.solution)return Y.jsx(L9,{variant:"noSolutionFound"});const o=a.solution.decisions.filter(u=>u.state!=null);return Y.jsxs(Y.Fragment,{children:[Y.jsx(XQn,{children:r}),Y.jsx(Mwe,{}),Y.jsx(eer,{blockingDecisions:a.causedByDecisions,desiredDecisions:o}),Y.jsx(Mwe,{}),Y.jsxs(QQn,{children:[Y.jsx(ter,{explanation:a,children:i}),(e.length>1||t.length>0)&&Y.jsx(ZQn,{})]})]})}const fot=pe.createContext(null),ts=()=>pe.useContext(fot);function fve(e){return pe.forwardRef((t,n)=>{const r=pe.useId();return Y.jsx(fot.Provider,{value:r,children:Y.jsx(e,{...t,ref:n})})})}const rer=pe.forwardRef((e,t)=>{const{style:n,children:r,...i}=e,a=Kk(),o=rve([a.refs.setFloating,t]);return Y.jsx(Dat,{children:Y.jsx(Bat,{context:a.context,modal:a.modal,children:Y.jsx("div",{ref:o,style:{...a.floatingStyles,...n},...a.getFloatingProps(i),children:r})})})}),ier=rer,aer=pe.forwardRef((e,t)=>{const{setOpen:n}=Kk();return Y.jsx("button",{type:"button",ref:t,...e,onClick:r=>{var i;(i=e.onClick)==null||i.call(e,r),n(!1)}})}),oer=aer,uer=St.div` position: relative; background-color: var(--color-explain-popover-fill); color: var(--color-explain-popover-color); outline-offset: -1px; padding: 1.1em; border-radius: var(--shape-border-radius-md); font-size: var(--text-base-size); font-family: var(--font-primary); min-width: 300px; max-width: 500px; `,cer=St(oer)` position: absolute; right: var(--space-sm-fixed); top: var(--space-sm-fixed); border: none; background-color: transparent; color: inherit; font-size: var(--text-sm); cursor: pointer; border-radius: var(--shape-border-radius-xs); &:focus { outline: 2px solid var(--color-explain-popover-close-button-outline); outline-offset: 1px; } `,fer=St(Qat)` font-size: var(--text-md); font-weight: 500; font-family: var(--font-heading); margin-bottom: var(--space-xs); overflow: hidden; display: flex; white-space: nowrap; text-overflow: ellipsis; margin-right: var(--space-md); `;function ser(e){return Y.jsxs(uer,{children:[Y.jsx(fer,{}),e.children,Y.jsx(cer,{children:Y.jsx(Qm,{icon:_it})})]})}const ler=St(ier)` --color-explain-attribute-value-fill: ${e=>e.attributeValueFill}; --color-explain-attribute-value-add-fill: ${e=>e.attributeValueAddFill}; --color-explain-attribute-value-add-color: ${e=>e.attributeValueAddColor}; --color-explain-attribute-value-remove-fill: ${e=>e.attributeValueRemoveFill}; --color-explain-attribute-value-remove-color: ${e=>e.attributeValueRemoveColor}; --color-explain-header-value-color: ${e=>e.headerValueColor}; --color-explain-popover-fill: ${e=>e.fill}; --color-explain-popover-color: ${e=>e.color}; --color-explain-popover-close-button-outline: ${e=>e.closeButtonOutline}; --color-explain-popover-list-separator: ${e=>e.listSeparator}; --color-explain-popover-apply-solution-button-fill: ${e=>e.applySolutionButtonFill}; --color-explain-popover-apply-solution-button-color: ${e=>e.applySolutionButtonColor}; --color-explain-popover-apply-solution-button-outline: ${e=>e.applySolutionButtonOutline}; --color-explain-popover-show-more-button-outline: ${e=>e.showMoreButtonOutline}; z-index: 10; filter: var(--shadows-popover); &:focus { outline: none; } `,der=St(TXn)` fill: var(--color-explain-popover-fill); `,per={initial:{opacity:0,scale:0},open:{opacity:1,scale:1,transition:{type:"spring",stiffness:600,damping:40}},close:{opacity:0,scale:0,transition:{duration:.2,ease:"cubicInOut"}}};function her(e){const t=Vv(),n=ts(),r=(t==null?void 0:t.displayMode)==="popover"&&(t==null?void 0:t.controlId)===n,i=pe.useRef(null);return Y.jsxs(KQn,{open:r,onOpenChange:a=>!a&&r&&(t==null?void 0:t.dismiss()),arrow:{width:20,height:10,padding:10,element:i},children:[Y.jsx(HQn,{children:e.children}),Y.jsxs(ver,{isOpen:r,children:[pe.Children.toArray(e.content)[0]??Y.jsx(ser,{children:Y.jsx(ner,{})}),Y.jsx(mer,{})]})]})}function ver(e){var t,n;const r=Ghe(),{middlewareData:i,arrow:a,placement:o}=Kk(),u=((t=i.arrow)==null?void 0:t.x)??0,c=((n=i.arrow)==null?void 0:n.y)??0,f=(a==null?void 0:a.height)??0,s=(a==null?void 0:a.width)??0,l=u+s/2,d=c+f,p=Ze(o).with("top",()=>`${l}px calc(100% + ${f+5}px)`).with("bottom",()=>`${l}px ${-f-5}px`).with("left",()=>`calc(100% + ${f}px) ${d}px`).with("right",()=>`${-f}px ${d}px`).otherwise(()=>"");return Y.jsx(ce.AnimatePresence,{initial:!1,children:e.isOpen&&Y.jsx(ler,{...r,children:Y.jsx(ce.motion.div,{variants:per,initial:"initial",animate:"open",exit:"close",style:{transformOrigin:p},children:Y.jsx(Xat,{children:e.children})})})})}function mer(){const{context:e,arrow:t}=Kk();return Y.jsx(der,{ref:t.element,context:e,width:t.width,height:t.height})}function ger(e){return pe.forwardRef((t,n)=>{const r=Pi();return t.explain!=="popover"||r?Y.jsx(e,{...t}):Y.jsx(her,{children:Y.jsx(e,{...t,ref:n})})})}function $p(e){return es(fve(ger(pe.forwardRef(e))))}function id(){alert(`Failed to apply your selection. Please check your internet connection and try again.`)}function yer(){alert(`Failed to reset your configuration. Please check your internet connection and try again.`)}const Rwe=St.select` color: inherit; cursor: inherit; `,Owe="",Ewe="",sot=$p((e,t)=>{if(Pi()){const N=oS(e,!0,!1);return Y.jsx(Rwe,{style:N})}const n=ts(),r=Ji(e),i=dR(r);if(!i)return Y.jsx("span",{children:"Choice Attribute not found"});const{explain:a}=bp(),o=Lk(r),{attribute:u,makeDecision:c,clearDecisions:f,isMultiSelect:s,getIncludedChoiceValues:l,getBlockedChoiceValues:d,getAllowedChoiceValues:p}=i,v=nx(r,o,p()),h=nx(r,o,d()),$=l(),b=$.map(N=>N.id),y=b[0]??Ewe,m=$.some(N=>{var U;return((U=N.decision)==null?void 0:U.kind)===vt.Explicit}),g=b.length>=1,_=$.some(N=>{var U;return((U=N.decision)==null?void 0:U.kind)===vt.Implicit}),I=v.length===0,A=async N=>{const U=e.explain,te=U!=="disabled"&&(()=>a(Ie=>Ie.whyIsStateNotPossible.choice(u.id).choiceValue(N).state(Ct.Included),U,n));if(N===Owe)try{await f()}catch{id()}else if(v.some(Ie=>Ie.id===N)){const Ie=b.some(je=>je===N)?void 0:Ct.Included;try{await c(N,Ie)}catch(je){if(je.type===lt.ConflictWithConsequence&&te){await te();return}id()}}else h.some(Ie=>Ie.id===N)&&te&&await te()},E=Ier(e,u.isSatisfied,_,I);return Y.jsxs(Rwe,{ref:t,value:s()?b:y,multiple:s(),onChange:N=>A(N.currentTarget.value),style:E,children:[!g&&!s()&&Y.jsx("option",{value:Ewe}),m&&Y.jsx("option",{value:Owe,children:e.resetLabel}),v.map(N=>{var U;return Y.jsxs("option",{value:N.id,children:[((U=N.decision)==null?void 0:U.kind)===vt.Implicit?e.implicitLabelPrefix:"",o.get(N.id)??N.id]},N.id)}),h.length>0&&Y.jsx("optgroup",{label:e.blockedLabel,children:h.map(N=>Y.jsx("option",{value:N.id,children:o.get(N.id)??N.id},N.id))})]})}),ber=sot,$er={...cve,noOptionsAvailableColors:{...lJ,title:"No Options Available Colors"}};ce.addPropertyControls(sot,$er);const Ier=(e,t,n,r)=>{var i,a,o;const u=oS(e,t,n);return{...u,backgroundColor:Ze({noOptionsAvailable:r,noOptionsAvailableFill:(i=e.noOptionsAvailableColors)==null?void 0:i.fill}).with({noOptionsAvailable:!0,noOptionsAvailableFill:Bi.string.minLength(1)},c=>c.noOptionsAvailableFill).otherwise(()=>u.backgroundColor),borderColor:Ze({noOptionsAvailable:r,noOptionsAvailableBorderColor:(a=e.noOptionsAvailableColors)==null?void 0:a.borderColor}).with({noOptionsAvailable:!0,noOptionsAvailableBorderColor:Bi.string.minLength(1)},c=>c.noOptionsAvailableBorderColor).otherwise(()=>u.borderColor),color:Ze({noOptionsAvailable:r,noOptionsAvailableColor:(o=e.noOptionsAvailableColors)==null?void 0:o.color}).with({noOptionsAvailable:!0,noOptionsAvailableColor:Bi.string.minLength(1)},c=>c.noOptionsAvailableColor).otherwise(()=>u.color)}},Twe=St.select` color: inherit; cursor: inherit; `,Cwe="",B9="",V9="yes",Pwe="no",lot=$p((e,t)=>{var n,r,i;if(Pi()){const g=oS(e,!0,!1);return Y.jsx(Twe,{style:g})}const a=ts(),o=Ji(e),u=F7n(o),{explain:c}=bp();if(!u)return Y.jsx("span",{children:"Boolean Attribute not found"});const{attribute:f,makeDecision:s}=u,l=async g=>{var _;const I=((_=f.decision)==null?void 0:_.kind)===vt.Explicit;if(g===Cwe&&I)try{await s(void 0)}catch{id()}else{const A=g===V9,E=f.possibleDecisionStates.includes(A),N=e.explain,U=N!=="disabled"&&(()=>c(te=>te.whyIsStateNotPossible.boolean(f.id).state(A),N,a));if(E)try{await s(A)}catch(te){if(te.type===lt.ConflictWithConsequence&&U){await U();return}id()}else U&&await U()}},d=Ze((n=f.decision)==null?void 0:n.state).with(!0,()=>V9).with(!1,()=>Pwe).otherwise(()=>B9),p=((r=f.decision)==null?void 0:r.kind)===vt.Explicit,v=((i=f.decision)==null?void 0:i.kind)===vt.Implicit,h=oS(e,f.isSatisfied,v),$=f.possibleDecisionStates.includes(!0),b=f.possibleDecisionStates.includes(!1),y=Y.jsxs("option",{value:V9,children:[Fwe(f,!0,e.implicitLabelPrefix),e.trueLabel]}),m=Y.jsxs("option",{value:Pwe,children:[Fwe(f,!1,e.implicitLabelPrefix),e.falseLabel]});return Y.jsxs(Twe,{ref:t,value:d,onChange:g=>l(g.currentTarget.value),style:h,children:[d===B9&&Y.jsx("option",{value:B9}),p&&Y.jsx("option",{value:Cwe,children:e.resetLabel}),$&&y,b&&m,(!$||!b)&&Y.jsxs("optgroup",{label:e.blockedLabel,children:[!$&&y,!b&&m]})]})}),_er=lot,Fwe=(e,t,n)=>{var r,i;return((r=e.decision)==null?void 0:r.kind)===vt.Implicit&&((i=e.decision)==null?void 0:i.state)===t?n:""},Ser={...cve,trueLabel:{title:"True Label",type:ce.ControlType.String,defaultValue:"Yes"},falseLabel:{title:"False Label",type:ce.ControlType.String,defaultValue:"No"}};ce.addPropertyControls(lot,Ser);const Wwe=St.select` color: inherit; cursor: inherit; `,Nwe="",z9="",K9="included",G9="excluded",dot=$p((e,t)=>{var n,r,i;if(Pi()){const _=oS(e,!0,!1);return Y.jsx(Wwe,{style:_})}const a=ts(),o=Ji(e),u=W7n(o),{explain:c}=bp();if(!u)return Y.jsx("span",{children:"Component Attribute not found"});const{attribute:f,makeDecision:s}=u,l=async _=>{const I=f.possibleDecisionStates.includes(_),A=e.explain,E=A!=="disabled"&&(()=>c(N=>N.whyIsStateNotPossible.component(f.id).state(_),A,a));if(I)try{await s(_)}catch(N){if(N.type===lt.ConflictWithConsequence&&E){await E();return}id()}else E&&await E()},d=async _=>{var I;const A=((I=f.decision)==null?void 0:I.kind)===vt.Explicit;_===Nwe&&A?await s(void 0):_===K9?await l(Pt.Included):_===G9&&await l(Pt.Excluded)},p=Ze((n=f.decision)==null?void 0:n.state).with(Pt.Included,()=>K9).with(Pt.Excluded,()=>G9).otherwise(()=>z9),v=((r=f.decision)==null?void 0:r.kind)===vt.Explicit,h=((i=f.decision)==null?void 0:i.kind)===vt.Implicit,$=oS(e,f.isSatisfied,h),b=f.possibleDecisionStates.includes(Pt.Included),y=f.possibleDecisionStates.includes(Pt.Excluded),m=Y.jsxs("option",{value:K9,children:[jwe(f,Pt.Included,e.implicitLabelPrefix),e.includedLabel]}),g=Y.jsxs("option",{value:G9,children:[jwe(f,Pt.Excluded,e.implicitLabelPrefix),e.excludedLabel]});return Y.jsxs(Wwe,{ref:t,value:p,onChange:_=>d(_.currentTarget.value),style:$,children:[p===z9&&Y.jsx("option",{value:z9}),v&&Y.jsx("option",{value:Nwe,children:e.resetLabel}),b&&m,y&&g,(!b||!y)&&Y.jsxs("optgroup",{label:e.blockedLabel,children:[!b&&m,!y&&g]})]})}),wer=dot,jwe=(e,t,n)=>{var r,i;return((r=e.decision)==null?void 0:r.kind)===vt.Implicit&&((i=e.decision)==null?void 0:i.state)===t?n:""},Aer={...cve,includedLabel:{title:"Included Label",type:ce.ControlType.String,defaultValue:"Included"},excludedLabel:{title:"Excluded Label",type:ce.ControlType.String,defaultValue:"Excluded"}};ce.addPropertyControls(dot,Aer);function pot(e,t,n,r,i=1e3){const[a]=Wot.useForceUpdate(),o=RYn(d=>{t(d),a()},i),u=pe.useRef(n),c=pe.useRef(e),f=o.isPending(),s=pe.useRef(f);pe.useEffect(()=>{e!==c.current&&(c.current=e,f&&(o.cancel(),a()),e!==n&&r(e)),n!==u.current&&(u.current=n,n!==e?(o(n),a()):f&&(o.cancel(),a())),f!==s.current&&(s.current=f,!f&&e!==n&&r(e))},[e,n,o,f]);const l=pe.useCallback(()=>{o.isPending()&&o.flush()},[o]);return pe.useEffect(()=>()=>l(),[l]),{flush:l}}const kwe=St(iat)` color: inherit; `,hot=$p((e,t)=>{var n,r;if(Pi()){const y=dJ(e,!0,!1);return Y.jsx(kwe,{style:y})}const i=ts(),a=Ji(e),o=Yrt(a),{explain:u}=bp();if(!o)return Y.jsx("span",{children:"Numeric Attribute not found"});const{attribute:c,makeDecision:f}=o,s=((n=c.decision)==null?void 0:n.kind)===vt.Implicit,l=dJ(e,c.isSatisfied,s),d=(r=c.decision)==null?void 0:r.state,[p,v]=pe.useState(d),{min:h,max:$}=c.range,b=pot(d,async y=>{if(y$){alert(`The value must be greater than or equal to ${$}.`);return}try{await f(y)}catch(m){m.type===lt.SetDecisionConflict?e.explain!=="disabled"&&await u(g=>g.whyIsStateNotPossible.numeric(c.id).state(y),e.explain,i):id()}},p,y=>v(y),e.wait);return Y.jsx(kwe,{getInputRef:t,thousandsGroupStyle:"thousand",decimalSeparator:e.decimalSeparator,thousandSeparator:e.thousandSeparator,allowNegative:!0,fixedDecimalScale:!0,decimalScale:c.decimalPlaces,allowEmptyFormatting:!1,displayType:"input",placeholder:e.placeholder,prefix:Rer(c,e.implicitLabelPrefix),onBlur:()=>{b.flush()},onKeyPress:y=>{y.key==="Enter"&&b.flush()},onValueChange:y=>v(y.floatValue),value:p??"",style:l})}),Mer=hot,Rer=(e,t)=>{var n;return((n=e.decision)==null?void 0:n.kind)===vt.Implicit?t:""},Oer={...uot,wait:{title:"Debounce Delay",type:ce.ControlType.Number,defaultValue:2e3,min:0,unit:"ms"},decimalSeparator:{title:"Decimal Separator",type:ce.ControlType.String,defaultValue:",",maxLength:1},thousandSeparator:{title:"Thousand Separator",type:ce.ControlType.String,defaultValue:".",maxLength:1},placeholder:{title:"Placeholder",type:ce.ControlType.String,defaultValue:""}};ce.addPropertyControls(hot,Oer);const yR={choiceValueId:{title:"Choice Value Id",type:ce.ControlType.String}};function Ip(e,t){return pe.Children.map(e,n=>{if(pe.isValidElement(n)){const r=nat(n.props,t);return pe.cloneElement(n,r)}return n})}const vot=$p((e,t)=>{if(Pi())return e.children;const n=ts(),{makeDecision:r}=_he(),i=Ji(e),a=e.choiceValueId??"",o=a.length>0,u=lR([i],!1)[0],{explain:c}=bp();if(!u)return Y.jsx("span",{children:"Attribute not found"});const f=u.type===se.Choice,s=u.type===se.Numeric,l=u.type===se.Boolean,d=u.type===se.Component;if(!f&&o)return Y.jsx("span",{children:"Attribute is not a Choice Attribute"});if(s)return Y.jsx("span",{children:"Numeric Attribute is not supported"});let p=f?u.values.get(a):null;if(o&&p==null)return Y.jsx("span",{children:"Choice Value not found"});const v=y=>Ze({state:y,attribute:u}).with({attribute:{type:se.Choice},state:"undefined"},()=>p.decision==null).with({attribute:{type:se.Choice},state:"included"},()=>{var m,g;return((m=p.decision)==null?void 0:m.state)===Ct.Included&&((g=p.decision)==null?void 0:g.kind)===vt.Explicit}).with({attribute:{type:se.Choice},state:"excluded"},()=>{var m,g;return((m=p.decision)==null?void 0:m.state)===Ct.Excluded&&((g=p.decision)==null?void 0:g.kind)===vt.Explicit}).with({attribute:{type:se.Boolean},state:"undefined"},{attribute:{type:se.Component},state:"undefined"},({attribute:m})=>m.decision==null).with({attribute:{type:se.Boolean},state:"true"},({attribute:m})=>{var g,_;return((g=m.decision)==null?void 0:g.state)===!0&&((_=m.decision)==null?void 0:_.kind)===vt.Explicit}).with({attribute:{type:se.Boolean},state:"false"},({attribute:m})=>{var g,_;return((g=m.decision)==null?void 0:g.state)===!1&&((_=m.decision)==null?void 0:_.kind)===vt.Explicit}).with({attribute:{type:se.Component},state:"included"},({attribute:m})=>{var g,_;return((g=m.decision)==null?void 0:g.state)===Pt.Included&&((_=m.decision)==null?void 0:_.kind)===vt.Explicit}).with({attribute:{type:se.Component},state:"excluded"},({attribute:m})=>{var g,_;return((g=m.decision)==null?void 0:g.state)===Pt.Excluded&&((_=m.decision)==null?void 0:_.kind)===vt.Explicit}).otherwise(()=>!1),h=y=>Ze({isChoiceAttribute:f,isBooleanAttribute:l,isComponentAttribute:d,state:y}).with({isChoiceAttribute:!0,state:"included"},()=>Ct.Included).with({isChoiceAttribute:!0,state:"excluded"},()=>Ct.Excluded).with({isBooleanAttribute:!0,state:"true"},()=>!0).with({isBooleanAttribute:!0,state:"false"},()=>!1).with({isComponentAttribute:!0,state:"included"},()=>Pt.Included).with({isComponentAttribute:!0,state:"excluded"},()=>Pt.Excluded).otherwise(()=>null);v(e.toggleFrom);const $=v(e.toggleTo),b=async()=>{const y=$?e.toggleFrom:e.toggleTo,m=h(y),g=d?u.possibleDecisionStates.includes(m):!1,_=l?u.possibleDecisionStates.includes(m):!1,I=(f?p.possibleDecisionStates.includes(m):!1)||_||g,A=e.explain,E=A!=="disabled"&&(async()=>{const N=Ze({isComponentAttribute:d,isBooleanAttribute:l,isChoiceAttribute:f}).returnType().with({isChoiceAttribute:!0},()=>Nt.choiceValue).with({isBooleanAttribute:!0},()=>Nt.boolean).with({isComponentAttribute:!0},()=>Nt.component).otherwise(()=>null);N&&await c({question:Qr.whyIsStateNotPossible,subject:N,attributeId:i,choiceValueId:a,state:m},A,n)});if(I||m==null)try{await r({type:u.type,attributeId:i,choiceValueId:a,state:m})}catch(N){if(N.type===lt.ConflictWithConsequence&&E){await E();return}id()}else E&&await E()};return Ip(e.children,{onClick:b,ref:t})}),Eer=vot,Ter={...Mc,...yR,children:{title:"Content",type:ce.ControlType.ComponentInstance},toggleFrom:{title:"Toggle From",type:ce.ControlType.Enum,defaultValue:"undefined",options:["undefined","included","excluded","true","false"]},toggleTo:{title:"Toggle To",type:ce.ControlType.Enum,defaultValue:"included",options:["undefined","included","excluded","true","false"]},...gR};ce.addPropertyControls(vot,Ter);const mot=$p((e,t)=>{if(Pi())return e.children;const n=ts(),{makeDecision:r}=_he(),i=Ji(e),a=e.choiceValueId??"",o=a.length>0,u=lR([i],!1)[0],c=dR(i),{explain:f}=bp();if(!u)return Y.jsx("span",{children:"Attribute not found"});const s=u.type===se.Choice,l=u.type===se.Numeric,d=u.type===se.Boolean,p=u.type===se.Component;if(!s&&o)return Y.jsx("span",{children:"Attribute is not a Choice Attribute"});let v=s?u.values.get(a):null;if(o&&v==null)return Y.jsx("span",{children:"Choice Value not found"});const h=()=>Ze({isChoiceAttribute:s,isBooleanAttribute:d,isComponentAttribute:p,isNumericAttribute:l,hasChoiceValueId:o,state:e.setSelection}).with({isChoiceAttribute:!0,hasChoiceValueId:!0,state:"included"},()=>Ct.Included).with({isChoiceAttribute:!0,hasChoiceValueId:!0,state:"excluded"},()=>Ct.Excluded).with({isBooleanAttribute:!0,state:"true"},()=>!0).with({isBooleanAttribute:!0,state:"false"},()=>!1).with({isComponentAttribute:!0,state:"included"},()=>Pt.Included).with({isComponentAttribute:!0,state:"excluded"},()=>Pt.Excluded).with({isNumericAttribute:!0,state:"numeric"},()=>e.numericValue).otherwise(()=>null),$=async()=>{if(s&&!o&&e.setSelection==="undefined")try{await c.clearDecisions()}catch{id()}else{const b=h(),y=p?u.possibleDecisionStates.includes(b):!1,m=d?u.possibleDecisionStates.includes(b):!1,g=(s?v.possibleDecisionStates.includes(b):!1)||m||y,_=e.explain,I=_!=="disabled"&&(async()=>{const A=Ze({isComponentAttribute:p,isBooleanAttribute:d,isChoiceAttribute:s,isNumericAttribute:l}).returnType().with({isChoiceAttribute:!0},()=>Nt.choiceValue).with({isBooleanAttribute:!0},()=>Nt.boolean).with({isComponentAttribute:!0},()=>Nt.component).with({isNumericAttribute:!0},()=>Nt.numeric).otherwise(()=>null);A&&await f({question:Qr.whyIsStateNotPossible,subject:A,attributeId:i,choiceValueId:a,state:b},_,n)});if(l||g||b==null)try{await r({type:u.type,attributeId:i,choiceValueId:a,state:b})}catch(A){const E=A;if((E.type===lt.ConflictWithConsequence||E.type===lt.SetDecisionConflict)&&I){await I();return}id()}else I&&await I()}};return Ip(e.children,{onClick:$,ref:t})}),Cer=mot,Per={...Mc,...yR,children:{title:"Content",type:ce.ControlType.ComponentInstance},setSelection:{title:"Set Selection To",type:ce.ControlType.Enum,defaultValue:"undefined",options:["undefined","included","excluded","true","false","numeric"]},numericValue:{title:"Numeric Value",type:ce.ControlType.Number,defaultValue:0},...gR};ce.addPropertyControls(mot,Per);const got=$p((e,t)=>{var n;if(Pi())return e.children;const r=ts(),{makeManyDecisions:i}=_he(),{handleExplainAnswer:a}=bp(),o=e.attributes.map(Ji),u=lR(o,!1).map((l,d)=>{if(!l)return{error:Y.jsx("span",{children:"Attribute not found"})};const p=e.attributes[d],v=p.choiceValueId??"",h=v.length>0,$=l.type===se.Choice,b=l.type===se.Numeric,y=l.type===se.Boolean,m=l.type===se.Component;if(!$&&h)return{error:Y.jsx("span",{children:"Attribute is not a Choice Attribute"})};let g=$?l.values.get(v):null;if(h&&g==null)return{error:Y.jsx("span",{children:"Choice Value not found"})};const _=()=>Ze({isChoiceAttribute:$,isBooleanAttribute:y,isComponentAttribute:m,isNumericAttribute:b,hasChoiceValueId:h,state:p.setSelection}).with({isChoiceAttribute:!0,hasChoiceValueId:!0,state:"included"},()=>Ct.Included).with({isChoiceAttribute:!0,hasChoiceValueId:!0,state:"excluded"},()=>Ct.Excluded).with({isBooleanAttribute:!0,state:"true"},()=>!0).with({isBooleanAttribute:!0,state:"false"},()=>!1).with({isComponentAttribute:!0,state:"included"},()=>Pt.Included).with({isComponentAttribute:!0,state:"excluded"},()=>Pt.Excluded).with({isNumericAttribute:!0,state:"numeric"},()=>p.numericValue).otherwise(()=>null);return{getDecisions:()=>$&&!h&&p.setSelection==="undefined"?[...l.values.values()].filter(I=>{var A;return((A=I.decision)==null?void 0:A.kind)===vt.Explicit}).map(I=>({type:l.type,attributeId:l.id,choiceValueId:I.id,state:null})):[{type:l.type,attributeId:l.id,choiceValueId:v,state:_()}]}}),c=(n=u.find(l=>l.error))==null?void 0:n.error;if(c)return c;const f=async()=>{const l=u.reduce((p,v)=>[...p,...v.getDecisions()],new Array),d=Ze(e.existingSelections).with("keep",()=>({type:"KeepExistingDecisions"})).with("drop",()=>({type:"DropExistingDecisions",conflictHandling:Ze(e.autoResolveConflicts).with(!1,()=>({type:"Manual",includeConstraintsInConflictExplanation:!1})).with(!0,()=>({type:"Automatic"})).exhaustive()})).exhaustive();try{await i(l,d)}catch(p){const v=p;if(console.debug("SetMany failed",v),(v==null?void 0:v.type)===lt.MakeManyDecisionsConflict&&v.decisionExplanations){e.explain!=="disabled"&&await a(v,e.explain,r);return}id();return}},s=()=>{e.trigger==="click"&&f()};return pe.useEffect(()=>{e.trigger==="auto"&&f()},[]),Ip(e.children,{onClick:s,ref:t})}),Fer=got,Wer={children:{title:"Content",type:ce.ControlType.ComponentInstance},attributes:{title:"Attributes",type:ce.ControlType.Array,control:{type:ce.ControlType.Object,controls:{...Mc,...yR,setSelection:{title:"Set Selection To",type:ce.ControlType.Enum,defaultValue:"undefined",options:["undefined","included","excluded","true","false","numeric"]},numericValue:{title:"Numeric Value",type:ce.ControlType.Number,defaultValue:0}}}},existingSelections:{title:"Existing Selections",type:ce.ControlType.Enum,defaultValue:"keep",options:["keep","drop"]},autoResolveConflicts:{title:"Auto Resolve Conflicts",type:ce.ControlType.Boolean,defaultValue:!0,hidden:e=>e.existingSelections!=="drop"},trigger:{title:"Trigger",type:ce.ControlType.Enum,defaultValue:"click",options:["click","auto"],displaySegmentedControl:!0,segmentedControlDirection:"horizontal"},...gR};ce.addPropertyControls(got,Wer);const yot=es(e=>{if(Pi())return e.enabledChildren;const{canResetConfiguration:t,resetConfiguration:n}=q9n(),r=async()=>{if(t)try{await n()}catch{yer()}},i=t?e.enabledChildren:e.disabledChildren;return Ip(i,{onClick:r})}),Ner=yot,jer={enabledChildren:{title:"Content – Enabled",type:ce.ControlType.ComponentInstance},disabledChildren:{title:"Content – Disabled",type:ce.ControlType.ComponentInstance}};ce.addPropertyControls(yot,jer);const bot=$p((e,t)=>{if(Pi())return e.unsatisfiedChildren;const n=ts(),{isSatisfied:r}=U9n(),{explain:i}=bp(),a=[...e.attributeId.length>0?[Ji(e)]:[],...e.attributes.map(Ji)],o=()=>{var c;const f=lR(a,!1).map(l=>l?{isSatisfied:l.isSatisfied}:{error:Y.jsx("span",{children:"Attribute not found"})});return((c=f.find(l=>l.error))==null?void 0:c.error)||f.every(l=>l.isSatisfied)},u=async()=>{e.explain!=="disabled"&&(a.length===0?await i(c=>c.whyIsNotSatisfied.configuration,e.explain,n):a.length===1&&await i(c=>c.whyIsNotSatisfied.attribute(a[0]),e.explain,n))};return(a.length>0?o():r)?e.satisfiedChildren:Ip(e.unsatisfiedChildren,{onClick:u,ref:t})}),ker=bot,Uer={satisfiedChildren:{title:"Content – Satisfied",type:ce.ControlType.ComponentInstance},unsatisfiedChildren:{title:"Content – Unsatisfied",type:ce.ControlType.ComponentInstance},...Mc,attributes:{title:"Attributes",type:ce.ControlType.Array,control:{type:ce.ControlType.Object,controls:{...Mc}}},...gR};ce.addPropertyControls(bot,Uer);const $ot=es(pe.forwardRef(function(e,t){const n=d=>Ze(d).with(1,()=>e.content1).with(2,()=>e.content2).with(3,()=>e.content3).with(4,()=>e.content4).with(5,()=>e.content5).with(6,()=>e.content6).with(7,()=>e.content7).with(8,()=>e.content8).with(9,()=>e.content9).with(10,()=>e.content10).otherwise(()=>null),r=e.variants.find(d=>d.useInDesignTime)||e.variants[0];if(Pi())return r&&n(r.content);const i=Ji(e),a=e.choiceValueId??"",o=a.length>0,u=lR([i],!1)[0];if(!u)return Y.jsx("span",{children:"Attribute not found"});const c=u.type===se.Choice;if(!c&&o)return Y.jsx("span",{children:"Attribute is not a Choice Attribute"});const f=c&&o?u.values.get(a):null;if(o&&f==null)return Y.jsx("span",{children:"Choice Value not found"});const s=d=>()=>f?d(f):[...u.values.values()].some(d),l=[...e.variants].find(({selection:d,condition:p})=>Ze({selection:d,condition:p,attribute:u}).with({attribute:{type:se.Choice},selection:"included",condition:"blocked"},s(v=>!v.possibleDecisionStates.includes(Ct.Included))).with({attribute:{type:se.Choice},selection:"included",condition:"implicit"},s(v=>{var h,$;return((h=v.decision)==null?void 0:h.state)===Ct.Included&&(($=v.decision)==null?void 0:$.kind)===vt.Implicit})).with({attribute:{type:se.Choice},selection:"included",condition:"explicit"},s(v=>{var h,$;return((h=v.decision)==null?void 0:h.state)===Ct.Included&&(($=v.decision)==null?void 0:$.kind)===vt.Explicit})).with({attribute:{type:se.Choice},selection:"included",condition:"none"},s(v=>{var h;return((h=v.decision)==null?void 0:h.state)===Ct.Included})).with({attribute:{type:se.Choice},selection:"excluded",condition:"blocked"},s(v=>!v.possibleDecisionStates.includes(Ct.Excluded))).with({attribute:{type:se.Choice},selection:"excluded",condition:"implicit"},s(v=>{var h,$;return((h=v.decision)==null?void 0:h.state)===Ct.Excluded&&(($=v.decision)==null?void 0:$.kind)===vt.Implicit})).with({attribute:{type:se.Choice},selection:"excluded",condition:"explicit"},s(v=>{var h,$;return((h=v.decision)==null?void 0:h.state)===Ct.Excluded&&(($=v.decision)==null?void 0:$.kind)===vt.Explicit})).with({attribute:{type:se.Choice},selection:"excluded",condition:"none"},s(v=>{var h;return((h=v.decision)==null?void 0:h.state)===Ct.Excluded})).with({attribute:{type:se.Boolean},selection:"true",condition:"blocked"},({attribute:v})=>!v.possibleDecisionStates.includes(!0)).with({attribute:{type:se.Boolean},selection:"true",condition:"implicit"},({attribute:v})=>{var h,$;return((h=v.decision)==null?void 0:h.state)===!0&&(($=v.decision)==null?void 0:$.kind)===vt.Implicit}).with({attribute:{type:se.Boolean},selection:"true",condition:"explicit"},({attribute:v})=>{var h,$;return((h=v.decision)==null?void 0:h.state)===!0&&(($=v.decision)==null?void 0:$.kind)===vt.Explicit}).with({attribute:{type:se.Boolean},selection:"true",condition:"none"},({attribute:v})=>{var h;return((h=v.decision)==null?void 0:h.state)===!0}).with({attribute:{type:se.Boolean},selection:"false",condition:"blocked"},({attribute:v})=>!v.possibleDecisionStates.includes(!1)).with({attribute:{type:se.Boolean},selection:"false",condition:"implicit"},({attribute:v})=>{var h,$;return((h=v.decision)==null?void 0:h.state)===!1&&(($=v.decision)==null?void 0:$.kind)===vt.Implicit}).with({attribute:{type:se.Boolean},selection:"false",condition:"explicit"},({attribute:v})=>{var h,$;return((h=v.decision)==null?void 0:h.state)===!1&&(($=v.decision)==null?void 0:$.kind)===vt.Explicit}).with({attribute:{type:se.Boolean},selection:"false",condition:"none"},({attribute:v})=>{var h;return((h=v.decision)==null?void 0:h.state)===!1}).with({attribute:{type:se.Component},selection:"included",condition:"blocked"},({attribute:v})=>!v.possibleDecisionStates.includes(Pt.Included)).with({attribute:{type:se.Component},selection:"included",condition:"implicit"},({attribute:v})=>{var h,$;return((h=v.decision)==null?void 0:h.state)===Pt.Included&&(($=v.decision)==null?void 0:$.kind)===vt.Implicit}).with({attribute:{type:se.Component},selection:"included",condition:"explicit"},({attribute:v})=>{var h,$;return((h=v.decision)==null?void 0:h.state)===Pt.Included&&(($=v.decision)==null?void 0:$.kind)===vt.Explicit}).with({attribute:{type:se.Component},selection:"included",condition:"none"},({attribute:v})=>{var h;return((h=v.decision)==null?void 0:h.state)===Pt.Included}).with({attribute:{type:se.Component},selection:"excluded",condition:"blocked"},({attribute:v})=>!v.possibleDecisionStates.includes(Pt.Excluded)).with({attribute:{type:se.Component},selection:"excluded",condition:"implicit"},({attribute:v})=>{var h,$;return((h=v.decision)==null?void 0:h.state)===Pt.Excluded&&(($=v.decision)==null?void 0:$.kind)===vt.Implicit}).with({attribute:{type:se.Component},selection:"excluded",condition:"explicit"},({attribute:v})=>{var h,$;return((h=v.decision)==null?void 0:h.state)===Pt.Excluded&&(($=v.decision)==null?void 0:$.kind)===vt.Explicit}).with({attribute:{type:se.Component},selection:"excluded",condition:"none"},({attribute:v})=>{var h;return((h=v.decision)==null?void 0:h.state)===Pt.Excluded}).with({attribute:{type:se.Numeric},selection:"numeric",condition:"implicit"},({attribute:v})=>{var h;return((h=v.decision)==null?void 0:h.kind)===vt.Implicit}).with({attribute:{type:se.Numeric},selection:"numeric",condition:"explicit"},({attribute:v})=>{var h;return((h=v.decision)==null?void 0:h.kind)===vt.Explicit}).with({attribute:{type:se.Numeric},selection:"numeric",condition:"none"},({attribute:v})=>v.decision!=null).with({attribute:{type:se.Choice},selection:"undefined"},()=>f.decision==null).with({attribute:{type:se.Boolean},selection:"undefined"},{attribute:{type:se.Component},selection:"undefined"},{attribute:{type:se.Numeric},selection:"undefined"},({attribute:v})=>v.decision==null).otherwise(()=>!1));return l&&Ip(n(l.content),{ref:t})})),qer=$ot,xer={...Mc,...yR,variants:{title:"Variants",type:ce.ControlType.Array,maxCount:10,control:{type:ce.ControlType.Object,controls:{selection:{title:"Selection",type:ce.ControlType.Enum,defaultValue:"undefined",options:["undefined","included","excluded","true","false","numeric"]},condition:{title:"Condition",type:ce.ControlType.Enum,defaultValue:"none",options:["none","explicit","implicit","blocked"]},content:{title:"Content",type:ce.ControlType.Enum,defaultValue:1,options:[1,2,3,4,5,6,7,8,9,10]},useInDesignTime:{title:"Design Time",type:ce.ControlType.Boolean,defaultValue:!1}}}},content1:{title:"Content 1",type:ce.ControlType.ComponentInstance},content2:{title:"Content 2",type:ce.ControlType.ComponentInstance},content3:{title:"Content 3",type:ce.ControlType.ComponentInstance},content4:{title:"Content 4",type:ce.ControlType.ComponentInstance},content5:{title:"Content 5",type:ce.ControlType.ComponentInstance},content6:{title:"Content 6",type:ce.ControlType.ComponentInstance},content7:{title:"Content 7",type:ce.ControlType.ComponentInstance},content8:{title:"Content 8",type:ce.ControlType.ComponentInstance},content9:{title:"Content 9",type:ce.ControlType.ComponentInstance},content10:{title:"Content 10",type:ce.ControlType.ComponentInstance}};ce.addPropertyControls($ot,xer);const Iot=es(e=>{const t=pe.useRef(),[n,r]=pe.useState(null),i=pe.useRef(n),a=pe.useMemo(()=>e.color.startsWith("var"),[e.color]),o=a?n:e.color,u=pe.useMemo(()=>{if(!o)return;const c=PYn(o);return TYn(`#${c}`,{acceptanceLossPercentage:1,maxChecks:30}).filter.replace(";","")},[o]);return pe.useLayoutEffect(()=>{if(a){const c=t.current&&getComputedStyle(t.current).color;c!=i.current&&(i.current=c,r(c))}}),Y.jsx("div",{ref:t,style:{...e.style,color:e.color,filter:u},children:e.children})}),Der=Iot,Ler={children:{title:"Content",type:ce.ControlType.ComponentInstance},color:{title:"Color",type:ce.ControlType.Color,defaultValue:"#0000ff"}};ce.addPropertyControls(Iot,Ler);const _ot=es(e=>{if(Pi())return e.children;const{error:t}=Xrt();return t?Ip(e.children,{onClick:t.retry}):null}),Ber=_ot,Ver={children:{title:"Content",type:ce.ControlType.ComponentInstance}};ce.addPropertyControls(_ot,Ver);function zer(e){return pe.forwardRef((t,n)=>{const r={...t.style,width:"100%",height:"100%"};return Y.jsx(e,{...t,ref:n,style:r})})}const Ker=St.div` width: 10px; height: 10px; background-color: greenyellow; `;function Sot(e){const t=pe.useRef(null);return pe.useEffect(()=>{if(!t.current)return;const n=setTimeout(()=>{t.current.scrollIntoView()},e.delay);return()=>clearTimeout(n)},[t.current]),Y.jsx(Ker,{ref:t})}const Ger={delay:{title:"Delay",type:ce.ControlType.Number,min:0,unit:"ms",defaultValue:0,step:1}};ce.addPropertyControls(Sot,Ger);const wot=St.div` display: contents; `,Her=kk` :root { *:has(> ${wot}) { display: contents !important; } } `,Aot=es(fve(e=>{const t=ts(),n=Pi(),r=(()=>{const l=d=>{var p;const v=pe.Children.toArray(d)[0],h=(p=v.props)==null?void 0:p.children;return h?l(h):v};return l(e.itemTemplate)})();if(!r)return Y.jsx("span",{children:"Choice Value Template not defined"});const i=(l,d)=>l.map(p=>pe.cloneElement(r,{key:p,layoutId:`${t}_${p}`,attributeId:e.attributeId,componentPath:e.componentPath,sharedConfigurationModel:e.sharedConfigurationModel,choiceValueId:p,choiceValueName:d.get(p)??p}));if(n)return Y.jsx(Uwe,{...e,children:i(["Choice Value 1","Choice Value 2","Choice Value 3"],Io)});const a=Ji(e),o=dR(a);if(!o)return Y.jsx("span",{children:"Choice Attribute not found"});const u=Lk(a),c=e.filter??new Array,f=[...o.attribute.values.values()].filter(l=>c.length===0||c.some(({selection:d,condition:p})=>Ze({selection:d,condition:p}).with({selection:"included",condition:"blocked"},()=>!l.possibleDecisionStates.includes(Ct.Included)).with({selection:"included",condition:"implicit"},()=>{var v,h;return((v=l.decision)==null?void 0:v.state)===Ct.Included&&((h=l.decision)==null?void 0:h.kind)===vt.Implicit}).with({selection:"included",condition:"explicit"},()=>{var v,h;return((v=l.decision)==null?void 0:v.state)===Ct.Included&&((h=l.decision)==null?void 0:h.kind)===vt.Explicit}).with({selection:"included",condition:"none"},()=>{var v;return((v=l.decision)==null?void 0:v.state)===Ct.Included}).with({selection:"excluded",condition:"blocked"},()=>!l.possibleDecisionStates.includes(Ct.Excluded)).with({selection:"excluded",condition:"implicit"},()=>{var v,h;return((v=l.decision)==null?void 0:v.state)===Ct.Excluded&&((h=l.decision)==null?void 0:h.kind)===vt.Implicit}).with({selection:"excluded",condition:"explicit"},()=>{var v,h;return((v=l.decision)==null?void 0:v.state)===Ct.Excluded&&((h=l.decision)==null?void 0:h.kind)===vt.Explicit}).with({selection:"excluded",condition:"none"},()=>{var v;return((v=l.decision)==null?void 0:v.state)===Ct.Excluded}).with({selection:"undefined"},()=>l.decision==null).otherwise(()=>!1))),s=nx(a,u,f).map(l=>l.id);return Y.jsx(Uwe,{...e,children:i(s,u)})}));function Uwe(e){return Y.jsxs(Y.Fragment,{children:[Y.jsx(tx,{singletonId:"ChoiceValueListRenderer",children:Y.jsx(Her,{})}),Y.jsx(wot,{style:e.style,children:e.children})]})}const Jer=Aot,Yer={...Mc,itemTemplate:{title:"Choice Value Template",type:ce.ControlType.ComponentInstance},filter:{title:"Filter",type:ce.ControlType.Array,control:{type:ce.ControlType.Object,controls:{selection:{title:"Selection",type:ce.ControlType.Enum,defaultValue:"undefined",options:["undefined","included","excluded"]},condition:{title:"Condition",type:ce.ControlType.Enum,defaultValue:"none",options:["none","explicit","implicit","blocked"]}}}}};ce.addPropertyControls(Aot,Yer);const{isValidElement:qwe,cloneElement:xwe}=qe;function Zer(e,t){return t?(Array.isArray(t)&&(t=t.map((n,r)=>qwe(n)&&typeof n.props=="object"?xwe(n,{...n.props,key:r}):n)),!e||Array.isArray(e)?t:qwe(e)?xwe(e,{...e.props,children:t}):e):e}const{isValidElement:Xer}=qe;function Mot(e,t,n){function r(a,o){return t.visit(a,n,o)}function i(a,o){return Mot(a,t,o||n)}if(Xer(e)){if(typeof e.type=="function")return"prototype"in e.type&&e.type.prototype.isReactComponent?e=new e.type(e.props).render():e=e.type(e.props),i(e);if(e.props&&"children"in e.props){const a=e.props.children;return r(e,o=>Array.isArray(a)?a.map(u=>i(u,o)):i(a,o))}}else if(Array.isArray(e)){const a=e;return r(e,o=>a.map(u=>i(u,o)))}return r(e)}const{isValidElement:Dwe}=qe;function Qer(e,t){let n;const{replace:r,updateState:i}=t;return"matchElement"in t?n=a=>Dwe(a)&&a.type===t.matchElement:"matchLiteral"in t?n=a=>!Array.isArray(a)&&!Dwe(a)&&t.matchLiteral(a):n=t.match,Mot(e,{visit(a,o,u){const c=i?i(o):o,f=u?u(c):void 0,s=Zer(a,f);return n(s,c)?r(s,c):s}},t.initialState)}function Lwe(e){return Y.jsx(Y.Fragment,{children:Qer(e.children,e)})}function etr(e){return M(e,B7e(/[\s\u2013]/g,"-"),xYn)}const ttr=es(e=>{const{children:t,mode:n,replaceString:r,propName:i,elementName:a,text:o}=e;return n==="replace"?Y.jsx(Lwe,{match:u=>typeof u=="string",replace:u=>u===r?o:u,children:t}):n==="set-prop"?Y.jsx(Lwe,{match:u=>{var c;return((c=u.type)==null?void 0:c.displayName)===a},replace:u=>pe.cloneElement(u,{[etr(i)]:o}),children:t}):t}),o8=ttr,sve=e=>({children:{title:"Content",type:ce.ControlType.ComponentInstance},mode:{title:"Mode",type:ce.ControlType.Enum,defaultValue:"replace",options:["replace","set-prop"],displaySegmentedControl:!0},replaceString:{title:"Replace Text",type:ce.ControlType.String,defaultValue:e,hidden:t=>t.mode!=="replace"},elementName:{title:"Element Name",type:ce.ControlType.String,hidden:t=>t.mode!=="set-prop"},propName:{title:"Property Name",type:ce.ControlType.String,hidden:t=>t.mode!=="set-prop"}}),Rot=es(e=>{const{attributeId:t,children:n,customName:r}=e,i=Ji(e),a=(r==null?void 0:r.length)>0,o=Pi(),u=a?r:o?t:(()=>lR([i],!1)[0]?n8(i)??t:"Attribute not found")();return Y.jsx(o8,{...e,text:u})}),ntr=Rot,rtr={...Mc,customName:{title:"Custom Name",type:ce.ControlType.String},...sve("")};ce.addPropertyControls(Rot,rtr);const Oot=es(e=>{const{choiceValueId:t,children:n,customName:r,mode:i,replaceString:a,propName:o,elementName:u}=e,c=Ji(e),f=r.length>0,s=t.length>0,l=Pi(),d=f?r:l?t.length>0?t:"Choice Value":(()=>{const p=dR(c);return p?s?p.attribute.values.get(t)==null?"Choice Value not found":lat(c,t)??t:"Choice Value Id missing":"Choice Attribute not found"})();return Y.jsx(o8,{...e,text:d})}),itr=Oot,atr={...Mc,...yR,customName:{title:"Custom Name",type:ce.ControlType.String},...sve("")};ce.addPropertyControls(Oot,atr);function Eot(e){return e.children}const otr={children:{title:"Content",type:ce.ControlType.ComponentInstance}};ce.addPropertyControls(Eot,otr);function Tot(e){const{children:t,fileExtension:n,fileName:r,target:i}=e;if(Pi())return t;const{storeConfiguration:a}=Qrt();return Ip(t,{onClick:async()=>{const o={type:"spc-stored-configuration",storedConfiguration:await a()};i==="file"?ctr(o,`${r}.${n}`):i==="clipboard"&&ftr(o)}})}const utr={children:{title:"Content",type:ce.ControlType.ComponentInstance},target:{title:"Target",type:ce.ControlType.Enum,defaultValue:"file",options:["file","clipboard"],optionTitles:["File","Clipboard"],displaySegmentedControl:!0,segmentedControlDirection:"vertical"},fileName:{title:"File Name",type:ce.ControlType.String,defaultValue:"configuration",hidden:e=>e.target!=="file"},fileExtension:{title:"File Extension",type:ce.ControlType.String,defaultValue:"json",hidden:e=>e.target!=="file"}};ce.addPropertyControls(Tot,utr);function ctr(e,t){const n=JSON.stringify(e),r=new Blob([n],{type:"application/json"}),i=window.URL.createObjectURL(r),a=document.createElement("a");a.href=i,a.download=t,document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(i)}function ftr(e){const t=JSON.stringify(e);navigator.clipboard.writeText(t).catch(n=>{alert("Failed to copy the configuration to clipboard: "+n)})}var Cot=(e=>(e[e.parseError=0]="parseError",e[e.noConfiguration=1]="noConfiguration",e[e.noFileSelected=2]="noFileSelected",e[e.fileReadError=3]="fileReadError",e[e.noClipboardData=4]="noClipboardData",e[e.clipboardReadError=5]="clipboardReadError",e))(Cot||{});const Pot=$p((e,t)=>{const{children:n,fileExtension:r,source:i}=e;if(Pi())return n;const a=ts(),{restoreConfiguration:o}=Qrt(),{handleExplainAnswer:u}=bp();return Ip(n,{onClick:async()=>{const c=M(await htr(i,r),f_);if(!c)return;const f={type:"DropExistingDecisions",conflictHandling:Ze(e.autoResolveConflicts).with(!1,()=>({type:"Manual",includeConstraintsInConflictExplanation:!1})).with(!0,()=>({type:"Automatic"})).exhaustive()};try{await o(c,f)}catch(s){const l=s;if(console.debug("Failed to restore stored configuration",l),l.type===lt.StoredConfigurationInvalid){alert("The specific configuration is not supported. Maybe the configuration was created with new application version than the current one.");return}if((l==null?void 0:l.type)===lt.MakeManyDecisionsConflict&&l.decisionExplanations){e.explain!=="disabled"&&await u(l,e.explain,a);return}alert("Failed to restore your configuration.");return}},ref:t})}),str=Pot,ltr={children:{title:"Content",type:ce.ControlType.ComponentInstance},source:{title:"Source",type:ce.ControlType.Enum,defaultValue:"file",options:["file","clipboard"],optionTitles:["File","Clipboard"],displaySegmentedControl:!0,segmentedControlDirection:"vertical"},fileExtension:{title:"File Extension",type:ce.ControlType.String,defaultValue:"json",hidden:e=>e.source!=="file"},autoResolveConflicts:{title:"Auto Resolve Conflicts",type:ce.ControlType.Boolean,defaultValue:!0},...gR};ce.addPropertyControls(Pot,ltr);function dtr(e){return()=>new Promise(t=>{const n=document.createElement("input");n.type="file",n.accept=`.${e}`,n.onchange=r=>{const i=r.target;if(!i.files||i.files.length===0){t(Jt(2));return}const a=i.files[0],o=new FileReader;o.onload=()=>{t(Gt(o.result))},o.onerror=()=>{t(Jt(3))},o.readAsText(a)},n.oncancel=()=>{t(Jt(2))},n.click()})}function ptr(){return()=>navigator.clipboard.readText().then(e=>e?Gt(e):Jt(4)).catch(()=>Jt(5))}function htr(e,t){return M(e==="file"?dtr(t):ptr(),Lze(n=>rv(()=>JSON.parse(n),()=>0)),que(n=>n.type==="spc-stored-configuration",()=>1),$o(n=>n.storedConfiguration),Isn(n=>()=>{console.debug(`Failed to load stored configuration: ${Cot[n]}`),n==3?alert("Failed to read the selected file. Maybe it is damaged."):n==1||n==0?e==="file"?alert("The selected file doesn't contain a valid configuration."):e==="clipboard"&&alert("The clipboard doesn't contain a valid configuration."):n==5?alert("Can't read the clipboard. Make to give a permission for reading the clipboard."):n==4&&alert("The clipboard doesn't contain a configuration.")}),Qze)()}const Fot=es(e=>{const{fallback:t}=e,n=Ji(e),r=Pi()?"0.0":(()=>{var i;const a=Yrt(n);if(!a)return"Numeric Attribute not found";const o=(i=a.attribute.decision)==null?void 0:i.state;return o!=null?o.toLocaleString():t})();return Y.jsx(o8,{...e,text:r})}),vtr=Fot,mtr={...Mc,fallback:{title:"Unselected Text",type:ce.ControlType.String,defaultValue:""},...sve("")};ce.addPropertyControls(Fot,mtr);const gtr=Object.freeze(Object.defineProperty({__proto__:null,AttributeName:ntr,BooleanSelect:_er,ChoiceSelect:ber,ChoiceValueListRenderer:Jer,ChoiceValueName:itr,Colorize:Der,ComponentSelect:wer,Configuration:kQn,InitializationRetry:Ber,NumericInput:Mer,ReplaceText:o8,ResetConfiguration:Ner,RestoreConfiguration:str,SatisfactionIndicator:ker,ScrollIntoView:Sot,SelectedNumericValue:vtr,SelectionIndicator:qer,SelectionToggle:Eer,SetSelection:Cer,SetSelections:Fer,Singleton:tx,Slot:Eot,StoreConfiguration:Tot,attributeIdPropertyControls:Mc,choiceValueIdPropertyControls:yR,cloneChildrenWithProps:Ip,explainableComponent:$p,parseGlobalAttributeId:Ji,useAttributeName:n8,useChoiceValueName:lat,useChoiceValueNames:Lk,useControlId:ts,useDebounceValue:pot,useExplain:bp,useExplainProcess:Vv,useRenderPlaceholder:Pi,useSortedChoiceValues:nx,withControlId:fve,withErrorBoundary:es,withFullSize:zer},Symbol.toStringTag,{value:"Module"}));exports.Configurator=hXt;exports.ConfiguratorFramer=gtr;exports.ConfiguratorReact=hen;