moi-computer 0.9.1-next.1 → 0.9.1-next.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import"/chunk-pcnahct1.js";import{$ as Sd,Bc as c00,Ec as U00,Hb as b00,Hc as S00,Rb as T00,V as wd,W as bd,X as Td,Xa as C00,Y as yd,Yb as y00,Z as xd,_ as vd,aa as fd,ac as x00,b as c,ba as gd,c as KZ,cc as v00,d as F20,da as yQ,ga as E00,hb as P00,kb as I00,kc as PT,oc as L00,pa as A00,sb as w00,yc as F00,zc as IT}from"/chunk-5c19v3zr.js";import{Oc as m,Rc as l00}from"/chunk-zfz3b4xg.js";import{Sc as E,Tc as fQ,Uc as T7,Vc as gp}from"/chunk-zbeq02yc.js";var _y=fQ((F_,uX)=>{var n00=200,JD="__lodash_hash_undefined__",M_=1,lT=2,pT=9007199254740991,U_="[object Arguments]",nL="[object Array]",s00="[object AsyncFunction]",dT="[object Boolean]",iT="[object Date]",nT="[object Error]",sT="[object Function]",r00="[object GeneratorFunction]",V_="[object Map]",rT="[object Number]",a00="[object Null]",hX="[object Object]",TT="[object Promise]",o00="[object Proxy]",aT="[object RegExp]",N_="[object Set]",oT="[object String]",t00="[object Symbol]",e00="[object Undefined]",sL="[object WeakMap]",tT="[object ArrayBuffer]",B_="[object DataView]",J10="[object Float32Array]",Q10="[object Float64Array]",Z10="[object Int8Array]",q10="[object Int16Array]",X10="[object Int32Array]",K10="[object Uint8Array]",Y10="[object Uint8ClampedArray]",W10="[object Uint16Array]",z10="[object Uint32Array]",G10=/[\\^$.*+?()[\]{}|]/g,$10=/^\[object .+?Constructor\]$/,H10=/^(?:0|[1-9]\d*)$/,m4={};m4[J10]=m4[Q10]=m4[Z10]=m4[q10]=m4[X10]=m4[K10]=m4[Y10]=m4[W10]=m4[z10]=!0;m4[U_]=m4[nL]=m4[tT]=m4[dT]=m4[B_]=m4[iT]=m4[nT]=m4[sT]=m4[V_]=m4[rT]=m4[hX]=m4[aT]=m4[N_]=m4[oT]=m4[sL]=!1;var eT=typeof global=="object"&&global&&global.Object===Object&&global,_10=typeof self=="object"&&self&&self.Object===Object&&self,YJ=eT||_10||Function("return this")(),Jy=typeof F_=="object"&&F_&&!F_.nodeType&&F_,yT=Jy&&typeof uX=="object"&&uX&&!uX.nodeType&&uX,Qy=yT&&yT.exports===Jy,pL=Qy&&eT.process,xT=function(){try{return pL&&pL.binding&&pL.binding("util")}catch(J){}}(),vT=xT&&xT.isTypedArray;function F10(J,Q){var Z=-1,q=J==null?0:J.length,X=0,K=[];while(++Z<q){var Y=J[Z];if(Q(Y,Z,J))K[X++]=Y}return K}function U10(J,Q){var Z=-1,q=Q.length,X=J.length;while(++Z<q)J[X+Z]=Q[Z];return J}function V10(J,Q){var Z=-1,q=J==null?0:J.length;while(++Z<q)if(Q(J[Z],Z,J))return!0;return!1}function N10(J,Q){var Z=-1,q=Array(J);while(++Z<J)q[Z]=Q(Z);return q}function B10(J){return function(Q){return J(Q)}}function O10(J,Q){return J.has(Q)}function L10(J,Q){return J==null?void 0:J[Q]}function D10(J){var Q=-1,Z=Array(J.size);return J.forEach(function(q,X){Z[++Q]=[X,q]}),Z}function M10(J,Q){return function(Z){return J(Q(Z))}}function j10(J){var Q=-1,Z=Array(J.size);return J.forEach(function(q){Z[++Q]=q}),Z}var R10=Array.prototype,k10=Function.prototype,j_=Object.prototype,dL=YJ["__core-js_shared__"],Zy=k10.toString,_2=j_.hasOwnProperty,ST=function(){var J=/[^.]+$/.exec(dL&&dL.keys&&dL.keys.IE_PROTO||"");return J?"Symbol(src)_1."+J:""}(),qy=j_.toString,E10=RegExp("^"+Zy.call(_2).replace(G10,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),fT=Qy?YJ.Buffer:void 0,O_=YJ.Symbol,gT=YJ.Uint8Array,Xy=j_.propertyIsEnumerable,A10=R10.splice,Eq=O_?O_.toStringTag:void 0,hT=Object.getOwnPropertySymbols,C10=fT?fT.isBuffer:void 0,P10=M10(Object.keys,Object),rL=mX(YJ,"DataView"),wW=mX(YJ,"Map"),aL=mX(YJ,"Promise"),oL=mX(YJ,"Set"),tL=mX(YJ,"WeakMap"),bW=mX(Object,"create"),I10=Pq(rL),w10=Pq(wW),b10=Pq(aL),T10=Pq(oL),y10=Pq(tL),uT=O_?O_.prototype:void 0,iL=uT?uT.valueOf:void 0;function Aq(J){var Q=-1,Z=J==null?0:J.length;this.clear();while(++Q<Z){var q=J[Q];this.set(q[0],q[1])}}function x10(){this.__data__=bW?bW(null):{},this.size=0}function v10(J){var Q=this.has(J)&&delete this.__data__[J];return this.size-=Q?1:0,Q}function S10(J){var Q=this.__data__;if(bW){var Z=Q[J];return Z===JD?void 0:Z}return _2.call(Q,J)?Q[J]:void 0}function f10(J){var Q=this.__data__;return bW?Q[J]!==void 0:_2.call(Q,J)}function g10(J,Q){var Z=this.__data__;return this.size+=this.has(J)?0:1,Z[J]=bW&&Q===void 0?JD:Q,this}Aq.prototype.clear=x10;Aq.prototype.delete=v10;Aq.prototype.get=S10;Aq.prototype.has=f10;Aq.prototype.set=g10;function WJ(J){var Q=-1,Z=J==null?0:J.length;this.clear();while(++Q<Z){var q=J[Q];this.set(q[0],q[1])}}function h10(){this.__data__=[],this.size=0}function u10(J){var Q=this.__data__,Z=R_(Q,J);if(Z<0)return!1;var q=Q.length-1;if(Z==q)Q.pop();else A10.call(Q,Z,1);return--this.size,!0}function m10(J){var Q=this.__data__,Z=R_(Q,J);return Z<0?void 0:Q[Z][1]}function c10(J){return R_(this.__data__,J)>-1}function l10(J,Q){var Z=this.__data__,q=R_(Z,J);if(q<0)++this.size,Z.push([J,Q]);else Z[q][1]=Q;return this}WJ.prototype.clear=h10;WJ.prototype.delete=u10;WJ.prototype.get=m10;WJ.prototype.has=c10;WJ.prototype.set=l10;function Cq(J){var Q=-1,Z=J==null?0:J.length;this.clear();while(++Q<Z){var q=J[Q];this.set(q[0],q[1])}}function p10(){this.size=0,this.__data__={hash:new Aq,map:new(wW||WJ),string:new Aq}}function d10(J){var Q=k_(this,J).delete(J);return this.size-=Q?1:0,Q}function i10(J){return k_(this,J).get(J)}function n10(J){return k_(this,J).has(J)}function s10(J,Q){var Z=k_(this,J),q=Z.size;return Z.set(J,Q),this.size+=Z.size==q?0:1,this}Cq.prototype.clear=p10;Cq.prototype.delete=d10;Cq.prototype.get=i10;Cq.prototype.has=n10;Cq.prototype.set=s10;function L_(J){var Q=-1,Z=J==null?0:J.length;this.__data__=new Cq;while(++Q<Z)this.add(J[Q])}function r10(J){return this.__data__.set(J,JD),this}function a10(J){return this.__data__.has(J)}L_.prototype.add=L_.prototype.push=r10;L_.prototype.has=a10;function SQ(J){var Q=this.__data__=new WJ(J);this.size=Q.size}function o10(){this.__data__=new WJ,this.size=0}function t10(J){var Q=this.__data__,Z=Q.delete(J);return this.size=Q.size,Z}function e10(J){return this.__data__.get(J)}function J40(J){return this.__data__.has(J)}function Q40(J,Q){var Z=this.__data__;if(Z instanceof WJ){var q=Z.__data__;if(!wW||q.length<n00-1)return q.push([J,Q]),this.size=++Z.size,this;Z=this.__data__=new Cq(q)}return Z.set(J,Q),this.size=Z.size,this}SQ.prototype.clear=o10;SQ.prototype.delete=t10;SQ.prototype.get=e10;SQ.prototype.has=J40;SQ.prototype.set=Q40;function Z40(J,Q){var Z=D_(J),q=!Z&&B40(J),X=!Z&&!q&&eL(J),K=!Z&&!q&&!X&&Hy(J),Y=Z||q||X||K,W=Y?N10(J.length,String):[],z=W.length;for(var G in J)if((Q||_2.call(J,G))&&!(Y&&(G=="length"||X&&(G=="offset"||G=="parent")||K&&(G=="buffer"||G=="byteLength"||G=="byteOffset")||_40(G,z))))W.push(G);return W}function R_(J,Q){var Z=J.length;while(Z--)if(Wy(J[Z][0],Q))return Z;return-1}function q40(J,Q,Z){var q=Q(J);return D_(J)?q:U10(q,Z(J))}function yW(J){if(J==null)return J===void 0?e00:a00;return Eq&&Eq in Object(J)?$40(J):N40(J)}function mT(J){return TW(J)&&yW(J)==U_}function Ky(J,Q,Z,q,X){if(J===Q)return!0;if(J==null||Q==null||!TW(J)&&!TW(Q))return J!==J&&Q!==Q;return X40(J,Q,Z,q,Ky,X)}function X40(J,Q,Z,q,X,K){var Y=D_(J),W=D_(Q),z=Y?nL:vQ(J),G=W?nL:vQ(Q);z=z==U_?hX:z,G=G==U_?hX:G;var H=z==hX,$=G==hX,_=z==G;if(_&&eL(J)){if(!eL(Q))return!1;Y=!0,H=!1}if(_&&!H)return K||(K=new SQ),Y||Hy(J)?Yy(J,Q,Z,q,X,K):z40(J,Q,z,Z,q,X,K);if(!(Z&M_)){var F=H&&_2.call(J,"__wrapped__"),U=$&&_2.call(Q,"__wrapped__");if(F||U){var V=F?J.value():J,N=U?Q.value():Q;return K||(K=new SQ),X(V,N,Z,q,K)}}if(!_)return!1;return K||(K=new SQ),G40(J,Q,Z,q,X,K)}function K40(J){if(!$y(J)||U40(J))return!1;var Q=zy(J)?E10:$10;return Q.test(Pq(J))}function Y40(J){return TW(J)&&Gy(J.length)&&!!m4[yW(J)]}function W40(J){if(!V40(J))return P10(J);var Q=[];for(var Z in Object(J))if(_2.call(J,Z)&&Z!="constructor")Q.push(Z);return Q}function Yy(J,Q,Z,q,X,K){var Y=Z&M_,W=J.length,z=Q.length;if(W!=z&&!(Y&&z>W))return!1;var G=K.get(J);if(G&&K.get(Q))return G==Q;var H=-1,$=!0,_=Z&lT?new L_:void 0;K.set(J,Q),K.set(Q,J);while(++H<W){var F=J[H],U=Q[H];if(q)var V=Y?q(U,F,H,Q,J,K):q(F,U,H,J,Q,K);if(V!==void 0){if(V)continue;$=!1;break}if(_){if(!V10(Q,function(N,B){if(!O10(_,B)&&(F===N||X(F,N,Z,q,K)))return _.push(B)})){$=!1;break}}else if(!(F===U||X(F,U,Z,q,K))){$=!1;break}}return K.delete(J),K.delete(Q),$}function z40(J,Q,Z,q,X,K,Y){switch(Z){case B_:if(J.byteLength!=Q.byteLength||J.byteOffset!=Q.byteOffset)return!1;J=J.buffer,Q=Q.buffer;case tT:if(J.byteLength!=Q.byteLength||!K(new gT(J),new gT(Q)))return!1;return!0;case dT:case iT:case rT:return Wy(+J,+Q);case nT:return J.name==Q.name&&J.message==Q.message;case aT:case oT:return J==Q+"";case V_:var W=D10;case N_:var z=q&M_;if(W||(W=j10),J.size!=Q.size&&!z)return!1;var G=Y.get(J);if(G)return G==Q;q|=lT,Y.set(J,Q);var H=Yy(W(J),W(Q),q,X,K,Y);return Y.delete(J),H;case t00:if(iL)return iL.call(J)==iL.call(Q)}return!1}function G40(J,Q,Z,q,X,K){var Y=Z&M_,W=cT(J),z=W.length,G=cT(Q),H=G.length;if(z!=H&&!Y)return!1;var $=z;while($--){var _=W[$];if(!(Y?_ in Q:_2.call(Q,_)))return!1}var F=K.get(J);if(F&&K.get(Q))return F==Q;var U=!0;K.set(J,Q),K.set(Q,J);var V=Y;while(++$<z){_=W[$];var N=J[_],B=Q[_];if(q)var O=Y?q(B,N,_,Q,J,K):q(N,B,_,J,Q,K);if(!(O===void 0?N===B||X(N,B,Z,q,K):O)){U=!1;break}V||(V=_=="constructor")}if(U&&!V){var M=J.constructor,L=Q.constructor;if(M!=L&&(("constructor"in J)&&("constructor"in Q))&&!(typeof M=="function"&&M instanceof M&&typeof L=="function"&&L instanceof L))U=!1}return K.delete(J),K.delete(Q),U}function cT(J){return q40(J,D40,H40)}function k_(J,Q){var Z=J.__data__;return F40(Q)?Z[typeof Q=="string"?"string":"hash"]:Z.map}function mX(J,Q){var Z=L10(J,Q);return K40(Z)?Z:void 0}function $40(J){var Q=_2.call(J,Eq),Z=J[Eq];try{J[Eq]=void 0;var q=!0}catch(K){}var X=qy.call(J);if(q)if(Q)J[Eq]=Z;else delete J[Eq];return X}var H40=!hT?M40:function(J){if(J==null)return[];return J=Object(J),F10(hT(J),function(Q){return Xy.call(J,Q)})},vQ=yW;if(rL&&vQ(new rL(new ArrayBuffer(1)))!=B_||wW&&vQ(new wW)!=V_||aL&&vQ(aL.resolve())!=TT||oL&&vQ(new oL)!=N_||tL&&vQ(new tL)!=sL)vQ=function(J){var Q=yW(J),Z=Q==hX?J.constructor:void 0,q=Z?Pq(Z):"";if(q)switch(q){case I10:return B_;case w10:return V_;case b10:return TT;case T10:return N_;case y10:return sL}return Q};function _40(J,Q){return Q=Q==null?pT:Q,!!Q&&(typeof J=="number"||H10.test(J))&&(J>-1&&J%1==0&&J<Q)}function F40(J){var Q=typeof J;return Q=="string"||Q=="number"||Q=="symbol"||Q=="boolean"?J!=="__proto__":J===null}function U40(J){return!!ST&&ST in J}function V40(J){var Q=J&&J.constructor,Z=typeof Q=="function"&&Q.prototype||j_;return J===Z}function N40(J){return qy.call(J)}function Pq(J){if(J!=null){try{return Zy.call(J)}catch(Q){}try{return J+""}catch(Q){}}return""}function Wy(J,Q){return J===Q||J!==J&&Q!==Q}var B40=mT(function(){return arguments}())?mT:function(J){return TW(J)&&_2.call(J,"callee")&&!Xy.call(J,"callee")},D_=Array.isArray;function O40(J){return J!=null&&Gy(J.length)&&!zy(J)}var eL=C10||j40;function L40(J,Q){return Ky(J,Q)}function zy(J){if(!$y(J))return!1;var Q=yW(J);return Q==sT||Q==r00||Q==s00||Q==o00}function Gy(J){return typeof J=="number"&&J>-1&&J%1==0&&J<=pT}function $y(J){var Q=typeof J;return J!=null&&(Q=="object"||Q=="function")}function TW(J){return J!=null&&typeof J=="object"}var Hy=vT?B10(vT):Y40;function D40(J){return O40(J)?Z40(J):W40(J)}function M40(){return[]}function j40(){return!1}uX.exports=L40});var UD=fQ((E_,lX)=>{var R40=200,HD="__lodash_hash_undefined__",Ry=1,b_=2,ky=9007199254740991,A_="[object Arguments]",qD="[object Array]",Ey="[object Boolean]",Ay="[object Date]",Cy="[object Error]",Py="[object Function]",k40="[object GeneratorFunction]",C_="[object Map]",Iy="[object Number]",cX="[object Object]",Fy="[object Promise]",wy="[object RegExp]",P_="[object Set]",by="[object String]",E40="[object Symbol]",XD="[object WeakMap]",Ty="[object ArrayBuffer]",I_="[object DataView]",A40="[object Float32Array]",C40="[object Float64Array]",P40="[object Int8Array]",I40="[object Int16Array]",w40="[object Int32Array]",b40="[object Uint8Array]",T40="[object Uint8ClampedArray]",y40="[object Uint16Array]",x40="[object Uint32Array]",v40=/[\\^$.*+?()[\]{}|]/g,S40=/^\[object .+?Constructor\]$/,f40=/^(?:0|[1-9]\d*)$/,c4={};c4[A40]=c4[C40]=c4[P40]=c4[I40]=c4[w40]=c4[b40]=c4[T40]=c4[y40]=c4[x40]=!0;c4[A_]=c4[qD]=c4[Ty]=c4[Ey]=c4[I_]=c4[Ay]=c4[Cy]=c4[Py]=c4[C_]=c4[Iy]=c4[cX]=c4[wy]=c4[P_]=c4[by]=c4[XD]=!1;var yy=typeof global=="object"&&global&&global.Object===Object&&global,g40=typeof self=="object"&&self&&self.Object===Object&&self,uQ=yy||g40||Function("return this")(),xy=typeof E_=="object"&&E_&&!E_.nodeType&&E_,Uy=xy&&typeof lX=="object"&&lX&&!lX.nodeType&&lX,h40=Uy&&Uy.exports===xy,Vy=h40&&yy.process,Ny=function(){try{return Vy&&Vy.binding("util")}catch(J){}}(),By=Ny&&Ny.isTypedArray;function u40(J,Q){var Z=-1,q=J?J.length:0;while(++Z<q)if(Q(J[Z],Z,J))return!0;return!1}function m40(J,Q){var Z=-1,q=Array(J);while(++Z<J)q[Z]=Q(Z);return q}function c40(J){return function(Q){return J(Q)}}function l40(J,Q){return J==null?void 0:J[Q]}function KD(J){var Q=!1;if(J!=null&&typeof J.toString!="function")try{Q=!!(J+"")}catch(Z){}return Q}function p40(J){var Q=-1,Z=Array(J.size);return J.forEach(function(q,X){Z[++Q]=[X,q]}),Z}function d40(J,Q){return function(Z){return J(Q(Z))}}function i40(J){var Q=-1,Z=Array(J.size);return J.forEach(function(q){Z[++Q]=q}),Z}var n40=Array.prototype,s40=Function.prototype,T_=Object.prototype,QD=uQ["__core-js_shared__"],Oy=function(){var J=/[^.]+$/.exec(QD&&QD.keys&&QD.keys.IE_PROTO||"");return J?"Symbol(src)_1."+J:""}(),vy=s40.toString,zJ=T_.hasOwnProperty,SW=T_.toString,r40=RegExp("^"+vy.call(zJ).replace(v40,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ly=uQ.Symbol,Dy=uQ.Uint8Array,a40=T_.propertyIsEnumerable,o40=n40.splice,t40=d40(Object.keys,Object),YD=pX(uQ,"DataView"),xW=pX(uQ,"Map"),WD=pX(uQ,"Promise"),zD=pX(uQ,"Set"),GD=pX(uQ,"WeakMap"),vW=pX(Object,"create"),e40=bq(YD),J60=bq(xW),Q60=bq(WD),Z60=bq(zD),q60=bq(GD),My=Ly?Ly.prototype:void 0,ZD=My?My.valueOf:void 0;function Iq(J){var Q=-1,Z=J?J.length:0;this.clear();while(++Q<Z){var q=J[Q];this.set(q[0],q[1])}}function X60(){this.__data__=vW?vW(null):{}}function K60(J){return this.has(J)&&delete this.__data__[J]}function Y60(J){var Q=this.__data__;if(vW){var Z=Q[J];return Z===HD?void 0:Z}return zJ.call(Q,J)?Q[J]:void 0}function W60(J){var Q=this.__data__;return vW?Q[J]!==void 0:zJ.call(Q,J)}function z60(J,Q){var Z=this.__data__;return Z[J]=vW&&Q===void 0?HD:Q,this}Iq.prototype.clear=X60;Iq.prototype.delete=K60;Iq.prototype.get=Y60;Iq.prototype.has=W60;Iq.prototype.set=z60;function GJ(J){var Q=-1,Z=J?J.length:0;this.clear();while(++Q<Z){var q=J[Q];this.set(q[0],q[1])}}function G60(){this.__data__=[]}function $60(J){var Q=this.__data__,Z=y_(Q,J);if(Z<0)return!1;var q=Q.length-1;if(Z==q)Q.pop();else o40.call(Q,Z,1);return!0}function H60(J){var Q=this.__data__,Z=y_(Q,J);return Z<0?void 0:Q[Z][1]}function _60(J){return y_(this.__data__,J)>-1}function F60(J,Q){var Z=this.__data__,q=y_(Z,J);if(q<0)Z.push([J,Q]);else Z[q][1]=Q;return this}GJ.prototype.clear=G60;GJ.prototype.delete=$60;GJ.prototype.get=H60;GJ.prototype.has=_60;GJ.prototype.set=F60;function wq(J){var Q=-1,Z=J?J.length:0;this.clear();while(++Q<Z){var q=J[Q];this.set(q[0],q[1])}}function U60(){this.__data__={hash:new Iq,map:new(xW||GJ),string:new Iq}}function V60(J){return x_(this,J).delete(J)}function N60(J){return x_(this,J).get(J)}function B60(J){return x_(this,J).has(J)}function O60(J,Q){return x_(this,J).set(J,Q),this}wq.prototype.clear=U60;wq.prototype.delete=V60;wq.prototype.get=N60;wq.prototype.has=B60;wq.prototype.set=O60;function w_(J){var Q=-1,Z=J?J.length:0;this.__data__=new wq;while(++Q<Z)this.add(J[Q])}function L60(J){return this.__data__.set(J,HD),this}function D60(J){return this.__data__.has(J)}w_.prototype.add=w_.prototype.push=L60;w_.prototype.has=D60;function hQ(J){this.__data__=new GJ(J)}function M60(){this.__data__=new GJ}function j60(J){return this.__data__.delete(J)}function R60(J){return this.__data__.get(J)}function k60(J){return this.__data__.has(J)}function E60(J,Q){var Z=this.__data__;if(Z instanceof GJ){var q=Z.__data__;if(!xW||q.length<R40-1)return q.push([J,Q]),this;Z=this.__data__=new wq(q)}return Z.set(J,Q),this}hQ.prototype.clear=M60;hQ.prototype.delete=j60;hQ.prototype.get=R60;hQ.prototype.has=k60;hQ.prototype.set=E60;function A60(J,Q){var Z=$D(J)||g60(J)?m40(J.length,String):[],q=Z.length,X=!!q;for(var K in J)if((Q||zJ.call(J,K))&&!(X&&(K=="length"||x60(K,q))))Z.push(K);return Z}function y_(J,Q){var Z=J.length;while(Z--)if(gy(J[Z][0],Q))return Z;return-1}function C60(J){return SW.call(J)}function Sy(J,Q,Z,q,X){if(J===Q)return!0;if(J==null||Q==null||!_D(J)&&!FD(Q))return J!==J&&Q!==Q;return P60(J,Q,Sy,Z,q,X)}function P60(J,Q,Z,q,X,K){var Y=$D(J),W=$D(Q),z=qD,G=qD;if(!Y)z=gQ(J),z=z==A_?cX:z;if(!W)G=gQ(Q),G=G==A_?cX:G;var H=z==cX&&!KD(J),$=G==cX&&!KD(Q),_=z==G;if(_&&!H)return K||(K=new hQ),Y||m60(J)?fy(J,Q,Z,q,X,K):T60(J,Q,z,Z,q,X,K);if(!(X&b_)){var F=H&&zJ.call(J,"__wrapped__"),U=$&&zJ.call(Q,"__wrapped__");if(F||U){var V=F?J.value():J,N=U?Q.value():Q;return K||(K=new hQ),Z(V,N,q,X,K)}}if(!_)return!1;return K||(K=new hQ),y60(J,Q,Z,q,X,K)}function I60(J){if(!_D(J)||S60(J))return!1;var Q=uy(J)||KD(J)?r40:S40;return Q.test(bq(J))}function w60(J){return FD(J)&&my(J.length)&&!!c4[SW.call(J)]}function b60(J){if(!f60(J))return t40(J);var Q=[];for(var Z in Object(J))if(zJ.call(J,Z)&&Z!="constructor")Q.push(Z);return Q}function fy(J,Q,Z,q,X,K){var Y=X&b_,W=J.length,z=Q.length;if(W!=z&&!(Y&&z>W))return!1;var G=K.get(J);if(G&&K.get(Q))return G==Q;var H=-1,$=!0,_=X&Ry?new w_:void 0;K.set(J,Q),K.set(Q,J);while(++H<W){var F=J[H],U=Q[H];if(q)var V=Y?q(U,F,H,Q,J,K):q(F,U,H,J,Q,K);if(V!==void 0){if(V)continue;$=!1;break}if(_){if(!u40(Q,function(N,B){if(!_.has(B)&&(F===N||Z(F,N,q,X,K)))return _.add(B)})){$=!1;break}}else if(!(F===U||Z(F,U,q,X,K))){$=!1;break}}return K.delete(J),K.delete(Q),$}function T60(J,Q,Z,q,X,K,Y){switch(Z){case I_:if(J.byteLength!=Q.byteLength||J.byteOffset!=Q.byteOffset)return!1;J=J.buffer,Q=Q.buffer;case Ty:if(J.byteLength!=Q.byteLength||!q(new Dy(J),new Dy(Q)))return!1;return!0;case Ey:case Ay:case Iy:return gy(+J,+Q);case Cy:return J.name==Q.name&&J.message==Q.message;case wy:case by:return J==Q+"";case C_:var W=p40;case P_:var z=K&b_;if(W||(W=i40),J.size!=Q.size&&!z)return!1;var G=Y.get(J);if(G)return G==Q;K|=Ry,Y.set(J,Q);var H=fy(W(J),W(Q),q,X,K,Y);return Y.delete(J),H;case E40:if(ZD)return ZD.call(J)==ZD.call(Q)}return!1}function y60(J,Q,Z,q,X,K){var Y=X&b_,W=jy(J),z=W.length,G=jy(Q),H=G.length;if(z!=H&&!Y)return!1;var $=z;while($--){var _=W[$];if(!(Y?_ in Q:zJ.call(Q,_)))return!1}var F=K.get(J);if(F&&K.get(Q))return F==Q;var U=!0;K.set(J,Q),K.set(Q,J);var V=Y;while(++$<z){_=W[$];var N=J[_],B=Q[_];if(q)var O=Y?q(B,N,_,Q,J,K):q(N,B,_,J,Q,K);if(!(O===void 0?N===B||Z(N,B,q,X,K):O)){U=!1;break}V||(V=_=="constructor")}if(U&&!V){var M=J.constructor,L=Q.constructor;if(M!=L&&(("constructor"in J)&&("constructor"in Q))&&!(typeof M=="function"&&M instanceof M&&typeof L=="function"&&L instanceof L))U=!1}return K.delete(J),K.delete(Q),U}function x_(J,Q){var Z=J.__data__;return v60(Q)?Z[typeof Q=="string"?"string":"hash"]:Z.map}function pX(J,Q){var Z=l40(J,Q);return I60(Z)?Z:void 0}var gQ=C60;if(YD&&gQ(new YD(new ArrayBuffer(1)))!=I_||xW&&gQ(new xW)!=C_||WD&&gQ(WD.resolve())!=Fy||zD&&gQ(new zD)!=P_||GD&&gQ(new GD)!=XD)gQ=function(J){var Q=SW.call(J),Z=Q==cX?J.constructor:void 0,q=Z?bq(Z):void 0;if(q)switch(q){case e40:return I_;case J60:return C_;case Q60:return Fy;case Z60:return P_;case q60:return XD}return Q};function x60(J,Q){return Q=Q==null?ky:Q,!!Q&&(typeof J=="number"||f40.test(J))&&(J>-1&&J%1==0&&J<Q)}function v60(J){var Q=typeof J;return Q=="string"||Q=="number"||Q=="symbol"||Q=="boolean"?J!=="__proto__":J===null}function S60(J){return!!Oy&&Oy in J}function f60(J){var Q=J&&J.constructor,Z=typeof Q=="function"&&Q.prototype||T_;return J===Z}function bq(J){if(J!=null){try{return vy.call(J)}catch(Q){}try{return J+""}catch(Q){}}return""}function gy(J,Q){return J===Q||J!==J&&Q!==Q}function g60(J){return h60(J)&&zJ.call(J,"callee")&&(!a40.call(J,"callee")||SW.call(J)==A_)}var $D=Array.isArray;function hy(J){return J!=null&&my(J.length)&&!uy(J)}function h60(J){return FD(J)&&hy(J)}function u60(J,Q,Z){Z=typeof Z=="function"?Z:void 0;var q=Z?Z(J,Q):void 0;return q===void 0?Sy(J,Q,Z):!!q}function uy(J){var Q=_D(J)?SW.call(J):"";return Q==Py||Q==k40}function my(J){return typeof J=="number"&&J>-1&&J%1==0&&J<=ky}function _D(J){var Q=typeof J;return!!J&&(Q=="object"||Q=="function")}function FD(J){return!!J&&typeof J=="object"}var m60=By?c40(By):w60;function jy(J){return hy(J)?A60(J):b60(J)}lX.exports=u60});var iy=fQ((bB0,dy)=>{var py="Expected a function",cy=NaN,c60="[object Symbol]",l60=/^\s+|\s+$/g,p60=/^[-+]0x[0-9a-f]+$/i,d60=/^0b[01]+$/i,i60=/^0o[0-7]+$/i,n60=parseInt,s60=typeof global=="object"&&global&&global.Object===Object&&global,r60=typeof self=="object"&&self&&self.Object===Object&&self,a60=s60||r60||Function("return this")(),o60=Object.prototype,t60=o60.toString,e60=Math.max,J50=Math.min,VD=function(){return a60.Date.now()};function Q50(J,Q,Z){var q,X,K,Y,W,z,G=0,H=!1,$=!1,_=!0;if(typeof J!="function")throw TypeError(py);if(Q=ly(Q)||0,v_(Z))H=!!Z.leading,$="maxWait"in Z,K=$?e60(ly(Z.maxWait)||0,Q):K,_="trailing"in Z?!!Z.trailing:_;function F(k){var R=q,I=X;return q=X=void 0,G=k,Y=J.apply(I,R),Y}function U(k){return G=k,W=setTimeout(B,Q),H?F(k):Y}function V(k){var R=k-z,I=k-G,A=Q-R;return $?J50(A,K-I):A}function N(k){var R=k-z,I=k-G;return z===void 0||R>=Q||R<0||$&&I>=K}function B(){var k=VD();if(N(k))return O(k);W=setTimeout(B,V(k))}function O(k){if(W=void 0,_&&q)return F(k);return q=X=void 0,Y}function M(){if(W!==void 0)clearTimeout(W);G=0,q=z=X=W=void 0}function L(){return W===void 0?Y:O(VD())}function j(){var k=VD(),R=N(k);if(q=arguments,X=this,z=k,R){if(W===void 0)return U(z);if($)return W=setTimeout(B,Q),F(z)}if(W===void 0)W=setTimeout(B,Q);return Y}return j.cancel=M,j.flush=L,j}function Z50(J,Q,Z){var q=!0,X=!0;if(typeof J!="function")throw TypeError(py);if(v_(Z))q="leading"in Z?!!Z.leading:q,X="trailing"in Z?!!Z.trailing:X;return Q50(J,Q,{leading:q,maxWait:Q,trailing:X})}function v_(J){var Q=typeof J;return!!J&&(Q=="object"||Q=="function")}function q50(J){return!!J&&typeof J=="object"}function X50(J){return typeof J=="symbol"||q50(J)&&t60.call(J)==c60}function ly(J){if(typeof J=="number")return J;if(X50(J))return cy;if(v_(J)){var Q=typeof J.valueOf=="function"?J.valueOf():J;J=v_(Q)?Q+"":Q}if(typeof J!="string")return J===0?J:+J;J=J.replace(l60,"");var Z=d60.test(J);return Z||i60.test(J)?n60(J.slice(2),Z?2:8):p60.test(J)?cy:+J}dy.exports=Z50});var ey=fQ((TB0,ty)=>{var K50=200,OD="__lodash_hash_undefined__",Y50=1/0,W50="[object Function]",z50="[object GeneratorFunction]",G50=/[\\^$.*+?()[\]{}|]/g,$50=/^\[object .+?Constructor\]$/,H50=typeof global=="object"&&global&&global.Object===Object&&global,_50=typeof self=="object"&&self&&self.Object===Object&&self,LD=H50||_50||Function("return this")();function F50(J,Q){var Z=J?J.length:0;return!!Z&&N50(J,Q,0)>-1}function U50(J,Q,Z){var q=-1,X=J?J.length:0;while(++q<X)if(Z(Q,J[q]))return!0;return!1}function V50(J,Q,Z,q){var X=J.length,K=Z+(q?1:-1);while(q?K--:++K<X)if(Q(J[K],K,J))return K;return-1}function N50(J,Q,Z){if(Q!==Q)return V50(J,B50,Z);var q=Z-1,X=J.length;while(++q<X)if(J[q]===Q)return q;return-1}function B50(J){return J!==J}function O50(J,Q){return J.has(Q)}function L50(J,Q){return J==null?void 0:J[Q]}function D50(J){var Q=!1;if(J!=null&&typeof J.toString!="function")try{Q=!!(J+"")}catch(Z){}return Q}function sy(J){var Q=-1,Z=Array(J.size);return J.forEach(function(q){Z[++Q]=q}),Z}var M50=Array.prototype,j50=Function.prototype,ry=Object.prototype,ND=LD["__core-js_shared__"],ny=function(){var J=/[^.]+$/.exec(ND&&ND.keys&&ND.keys.IE_PROTO||"");return J?"Symbol(src)_1."+J:""}(),ay=j50.toString,DD=ry.hasOwnProperty,R50=ry.toString,k50=RegExp("^"+ay.call(DD).replace(G50,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),E50=M50.splice,A50=MD(LD,"Map"),BD=MD(LD,"Set"),fW=MD(Object,"create");function Tq(J){var Q=-1,Z=J?J.length:0;this.clear();while(++Q<Z){var q=J[Q];this.set(q[0],q[1])}}function C50(){this.__data__=fW?fW(null):{}}function P50(J){return this.has(J)&&delete this.__data__[J]}function I50(J){var Q=this.__data__;if(fW){var Z=Q[J];return Z===OD?void 0:Z}return DD.call(Q,J)?Q[J]:void 0}function w50(J){var Q=this.__data__;return fW?Q[J]!==void 0:DD.call(Q,J)}function b50(J,Q){var Z=this.__data__;return Z[J]=fW&&Q===void 0?OD:Q,this}Tq.prototype.clear=C50;Tq.prototype.delete=P50;Tq.prototype.get=I50;Tq.prototype.has=w50;Tq.prototype.set=b50;function dX(J){var Q=-1,Z=J?J.length:0;this.clear();while(++Q<Z){var q=J[Q];this.set(q[0],q[1])}}function T50(){this.__data__=[]}function y50(J){var Q=this.__data__,Z=f_(Q,J);if(Z<0)return!1;var q=Q.length-1;if(Z==q)Q.pop();else E50.call(Q,Z,1);return!0}function x50(J){var Q=this.__data__,Z=f_(Q,J);return Z<0?void 0:Q[Z][1]}function v50(J){return f_(this.__data__,J)>-1}function S50(J,Q){var Z=this.__data__,q=f_(Z,J);if(q<0)Z.push([J,Q]);else Z[q][1]=Q;return this}dX.prototype.clear=T50;dX.prototype.delete=y50;dX.prototype.get=x50;dX.prototype.has=v50;dX.prototype.set=S50;function iX(J){var Q=-1,Z=J?J.length:0;this.clear();while(++Q<Z){var q=J[Q];this.set(q[0],q[1])}}function f50(){this.__data__={hash:new Tq,map:new(A50||dX),string:new Tq}}function g50(J){return g_(this,J).delete(J)}function h50(J){return g_(this,J).get(J)}function u50(J){return g_(this,J).has(J)}function m50(J,Q){return g_(this,J).set(J,Q),this}iX.prototype.clear=f50;iX.prototype.delete=g50;iX.prototype.get=h50;iX.prototype.has=u50;iX.prototype.set=m50;function S_(J){var Q=-1,Z=J?J.length:0;this.__data__=new iX;while(++Q<Z)this.add(J[Q])}function c50(J){return this.__data__.set(J,OD),this}function l50(J){return this.__data__.has(J)}S_.prototype.add=S_.prototype.push=c50;S_.prototype.has=l50;function f_(J,Q){var Z=J.length;while(Z--)if(o50(J[Z][0],Q))return Z;return-1}function p50(J){if(!oy(J)||s50(J))return!1;var Q=t50(J)||D50(J)?k50:$50;return Q.test(r50(J))}function d50(J,Q,Z){var q=-1,X=F50,K=J.length,Y=!0,W=[],z=W;if(Z)Y=!1,X=U50;else if(K>=K50){var G=Q?null:i50(J);if(G)return sy(G);Y=!1,X=O50,z=new S_}else z=Q?[]:W;J:while(++q<K){var H=J[q],$=Q?Q(H):H;if(H=Z||H!==0?H:0,Y&&$===$){var _=z.length;while(_--)if(z[_]===$)continue J;if(Q)z.push($);W.push(H)}else if(!X(z,$,Z)){if(z!==W)z.push($);W.push(H)}}return W}var i50=!(BD&&1/sy(new BD([,-0]))[1]==Y50)?e50:function(J){return new BD(J)};function g_(J,Q){var Z=J.__data__;return n50(Q)?Z[typeof Q=="string"?"string":"hash"]:Z.map}function MD(J,Q){var Z=L50(J,Q);return p50(Z)?Z:void 0}function n50(J){var Q=typeof J;return Q=="string"||Q=="number"||Q=="symbol"||Q=="boolean"?J!=="__proto__":J===null}function s50(J){return!!ny&&ny in J}function r50(J){if(J!=null){try{return ay.call(J)}catch(Q){}try{return J+""}catch(Q){}}return""}function a50(J){return J&&J.length?d50(J):[]}function o50(J,Q){return J===Q||J!==J&&Q!==Q}function t50(J){var Q=oy(J)?R50.call(J):"";return Q==W50||Q==z50}function oy(J){var Q=typeof J;return!!J&&(Q=="object"||Q=="function")}function e50(){}ty.exports=a50});var c1=fQ((dP0,UF)=>{/*!
1
+ import"/chunk-pcnahct1.js";import{$ as Sd,Bc as c00,Ec as U00,Hb as b00,Hc as S00,Rb as T00,V as wd,W as bd,X as Td,Xa as C00,Y as yd,Yb as y00,Z as xd,_ as vd,aa as fd,ac as x00,b as c,ba as gd,c as KZ,cc as v00,d as F20,da as yQ,ga as E00,hb as P00,kb as I00,kc as PT,oc as L00,pa as A00,sb as w00,yc as F00,zc as IT}from"/chunk-ek6zde7t.js";import{Oc as m,Rc as l00}from"/chunk-zfz3b4xg.js";import{Sc as E,Tc as fQ,Uc as T7,Vc as gp}from"/chunk-zbeq02yc.js";var _y=fQ((F_,uX)=>{var n00=200,JD="__lodash_hash_undefined__",M_=1,lT=2,pT=9007199254740991,U_="[object Arguments]",nL="[object Array]",s00="[object AsyncFunction]",dT="[object Boolean]",iT="[object Date]",nT="[object Error]",sT="[object Function]",r00="[object GeneratorFunction]",V_="[object Map]",rT="[object Number]",a00="[object Null]",hX="[object Object]",TT="[object Promise]",o00="[object Proxy]",aT="[object RegExp]",N_="[object Set]",oT="[object String]",t00="[object Symbol]",e00="[object Undefined]",sL="[object WeakMap]",tT="[object ArrayBuffer]",B_="[object DataView]",J10="[object Float32Array]",Q10="[object Float64Array]",Z10="[object Int8Array]",q10="[object Int16Array]",X10="[object Int32Array]",K10="[object Uint8Array]",Y10="[object Uint8ClampedArray]",W10="[object Uint16Array]",z10="[object Uint32Array]",G10=/[\\^$.*+?()[\]{}|]/g,$10=/^\[object .+?Constructor\]$/,H10=/^(?:0|[1-9]\d*)$/,m4={};m4[J10]=m4[Q10]=m4[Z10]=m4[q10]=m4[X10]=m4[K10]=m4[Y10]=m4[W10]=m4[z10]=!0;m4[U_]=m4[nL]=m4[tT]=m4[dT]=m4[B_]=m4[iT]=m4[nT]=m4[sT]=m4[V_]=m4[rT]=m4[hX]=m4[aT]=m4[N_]=m4[oT]=m4[sL]=!1;var eT=typeof global=="object"&&global&&global.Object===Object&&global,_10=typeof self=="object"&&self&&self.Object===Object&&self,YJ=eT||_10||Function("return this")(),Jy=typeof F_=="object"&&F_&&!F_.nodeType&&F_,yT=Jy&&typeof uX=="object"&&uX&&!uX.nodeType&&uX,Qy=yT&&yT.exports===Jy,pL=Qy&&eT.process,xT=function(){try{return pL&&pL.binding&&pL.binding("util")}catch(J){}}(),vT=xT&&xT.isTypedArray;function F10(J,Q){var Z=-1,q=J==null?0:J.length,X=0,K=[];while(++Z<q){var Y=J[Z];if(Q(Y,Z,J))K[X++]=Y}return K}function U10(J,Q){var Z=-1,q=Q.length,X=J.length;while(++Z<q)J[X+Z]=Q[Z];return J}function V10(J,Q){var Z=-1,q=J==null?0:J.length;while(++Z<q)if(Q(J[Z],Z,J))return!0;return!1}function N10(J,Q){var Z=-1,q=Array(J);while(++Z<J)q[Z]=Q(Z);return q}function B10(J){return function(Q){return J(Q)}}function O10(J,Q){return J.has(Q)}function L10(J,Q){return J==null?void 0:J[Q]}function D10(J){var Q=-1,Z=Array(J.size);return J.forEach(function(q,X){Z[++Q]=[X,q]}),Z}function M10(J,Q){return function(Z){return J(Q(Z))}}function j10(J){var Q=-1,Z=Array(J.size);return J.forEach(function(q){Z[++Q]=q}),Z}var R10=Array.prototype,k10=Function.prototype,j_=Object.prototype,dL=YJ["__core-js_shared__"],Zy=k10.toString,_2=j_.hasOwnProperty,ST=function(){var J=/[^.]+$/.exec(dL&&dL.keys&&dL.keys.IE_PROTO||"");return J?"Symbol(src)_1."+J:""}(),qy=j_.toString,E10=RegExp("^"+Zy.call(_2).replace(G10,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),fT=Qy?YJ.Buffer:void 0,O_=YJ.Symbol,gT=YJ.Uint8Array,Xy=j_.propertyIsEnumerable,A10=R10.splice,Eq=O_?O_.toStringTag:void 0,hT=Object.getOwnPropertySymbols,C10=fT?fT.isBuffer:void 0,P10=M10(Object.keys,Object),rL=mX(YJ,"DataView"),wW=mX(YJ,"Map"),aL=mX(YJ,"Promise"),oL=mX(YJ,"Set"),tL=mX(YJ,"WeakMap"),bW=mX(Object,"create"),I10=Pq(rL),w10=Pq(wW),b10=Pq(aL),T10=Pq(oL),y10=Pq(tL),uT=O_?O_.prototype:void 0,iL=uT?uT.valueOf:void 0;function Aq(J){var Q=-1,Z=J==null?0:J.length;this.clear();while(++Q<Z){var q=J[Q];this.set(q[0],q[1])}}function x10(){this.__data__=bW?bW(null):{},this.size=0}function v10(J){var Q=this.has(J)&&delete this.__data__[J];return this.size-=Q?1:0,Q}function S10(J){var Q=this.__data__;if(bW){var Z=Q[J];return Z===JD?void 0:Z}return _2.call(Q,J)?Q[J]:void 0}function f10(J){var Q=this.__data__;return bW?Q[J]!==void 0:_2.call(Q,J)}function g10(J,Q){var Z=this.__data__;return this.size+=this.has(J)?0:1,Z[J]=bW&&Q===void 0?JD:Q,this}Aq.prototype.clear=x10;Aq.prototype.delete=v10;Aq.prototype.get=S10;Aq.prototype.has=f10;Aq.prototype.set=g10;function WJ(J){var Q=-1,Z=J==null?0:J.length;this.clear();while(++Q<Z){var q=J[Q];this.set(q[0],q[1])}}function h10(){this.__data__=[],this.size=0}function u10(J){var Q=this.__data__,Z=R_(Q,J);if(Z<0)return!1;var q=Q.length-1;if(Z==q)Q.pop();else A10.call(Q,Z,1);return--this.size,!0}function m10(J){var Q=this.__data__,Z=R_(Q,J);return Z<0?void 0:Q[Z][1]}function c10(J){return R_(this.__data__,J)>-1}function l10(J,Q){var Z=this.__data__,q=R_(Z,J);if(q<0)++this.size,Z.push([J,Q]);else Z[q][1]=Q;return this}WJ.prototype.clear=h10;WJ.prototype.delete=u10;WJ.prototype.get=m10;WJ.prototype.has=c10;WJ.prototype.set=l10;function Cq(J){var Q=-1,Z=J==null?0:J.length;this.clear();while(++Q<Z){var q=J[Q];this.set(q[0],q[1])}}function p10(){this.size=0,this.__data__={hash:new Aq,map:new(wW||WJ),string:new Aq}}function d10(J){var Q=k_(this,J).delete(J);return this.size-=Q?1:0,Q}function i10(J){return k_(this,J).get(J)}function n10(J){return k_(this,J).has(J)}function s10(J,Q){var Z=k_(this,J),q=Z.size;return Z.set(J,Q),this.size+=Z.size==q?0:1,this}Cq.prototype.clear=p10;Cq.prototype.delete=d10;Cq.prototype.get=i10;Cq.prototype.has=n10;Cq.prototype.set=s10;function L_(J){var Q=-1,Z=J==null?0:J.length;this.__data__=new Cq;while(++Q<Z)this.add(J[Q])}function r10(J){return this.__data__.set(J,JD),this}function a10(J){return this.__data__.has(J)}L_.prototype.add=L_.prototype.push=r10;L_.prototype.has=a10;function SQ(J){var Q=this.__data__=new WJ(J);this.size=Q.size}function o10(){this.__data__=new WJ,this.size=0}function t10(J){var Q=this.__data__,Z=Q.delete(J);return this.size=Q.size,Z}function e10(J){return this.__data__.get(J)}function J40(J){return this.__data__.has(J)}function Q40(J,Q){var Z=this.__data__;if(Z instanceof WJ){var q=Z.__data__;if(!wW||q.length<n00-1)return q.push([J,Q]),this.size=++Z.size,this;Z=this.__data__=new Cq(q)}return Z.set(J,Q),this.size=Z.size,this}SQ.prototype.clear=o10;SQ.prototype.delete=t10;SQ.prototype.get=e10;SQ.prototype.has=J40;SQ.prototype.set=Q40;function Z40(J,Q){var Z=D_(J),q=!Z&&B40(J),X=!Z&&!q&&eL(J),K=!Z&&!q&&!X&&Hy(J),Y=Z||q||X||K,W=Y?N10(J.length,String):[],z=W.length;for(var G in J)if((Q||_2.call(J,G))&&!(Y&&(G=="length"||X&&(G=="offset"||G=="parent")||K&&(G=="buffer"||G=="byteLength"||G=="byteOffset")||_40(G,z))))W.push(G);return W}function R_(J,Q){var Z=J.length;while(Z--)if(Wy(J[Z][0],Q))return Z;return-1}function q40(J,Q,Z){var q=Q(J);return D_(J)?q:U10(q,Z(J))}function yW(J){if(J==null)return J===void 0?e00:a00;return Eq&&Eq in Object(J)?$40(J):N40(J)}function mT(J){return TW(J)&&yW(J)==U_}function Ky(J,Q,Z,q,X){if(J===Q)return!0;if(J==null||Q==null||!TW(J)&&!TW(Q))return J!==J&&Q!==Q;return X40(J,Q,Z,q,Ky,X)}function X40(J,Q,Z,q,X,K){var Y=D_(J),W=D_(Q),z=Y?nL:vQ(J),G=W?nL:vQ(Q);z=z==U_?hX:z,G=G==U_?hX:G;var H=z==hX,$=G==hX,_=z==G;if(_&&eL(J)){if(!eL(Q))return!1;Y=!0,H=!1}if(_&&!H)return K||(K=new SQ),Y||Hy(J)?Yy(J,Q,Z,q,X,K):z40(J,Q,z,Z,q,X,K);if(!(Z&M_)){var F=H&&_2.call(J,"__wrapped__"),U=$&&_2.call(Q,"__wrapped__");if(F||U){var V=F?J.value():J,N=U?Q.value():Q;return K||(K=new SQ),X(V,N,Z,q,K)}}if(!_)return!1;return K||(K=new SQ),G40(J,Q,Z,q,X,K)}function K40(J){if(!$y(J)||U40(J))return!1;var Q=zy(J)?E10:$10;return Q.test(Pq(J))}function Y40(J){return TW(J)&&Gy(J.length)&&!!m4[yW(J)]}function W40(J){if(!V40(J))return P10(J);var Q=[];for(var Z in Object(J))if(_2.call(J,Z)&&Z!="constructor")Q.push(Z);return Q}function Yy(J,Q,Z,q,X,K){var Y=Z&M_,W=J.length,z=Q.length;if(W!=z&&!(Y&&z>W))return!1;var G=K.get(J);if(G&&K.get(Q))return G==Q;var H=-1,$=!0,_=Z&lT?new L_:void 0;K.set(J,Q),K.set(Q,J);while(++H<W){var F=J[H],U=Q[H];if(q)var V=Y?q(U,F,H,Q,J,K):q(F,U,H,J,Q,K);if(V!==void 0){if(V)continue;$=!1;break}if(_){if(!V10(Q,function(N,B){if(!O10(_,B)&&(F===N||X(F,N,Z,q,K)))return _.push(B)})){$=!1;break}}else if(!(F===U||X(F,U,Z,q,K))){$=!1;break}}return K.delete(J),K.delete(Q),$}function z40(J,Q,Z,q,X,K,Y){switch(Z){case B_:if(J.byteLength!=Q.byteLength||J.byteOffset!=Q.byteOffset)return!1;J=J.buffer,Q=Q.buffer;case tT:if(J.byteLength!=Q.byteLength||!K(new gT(J),new gT(Q)))return!1;return!0;case dT:case iT:case rT:return Wy(+J,+Q);case nT:return J.name==Q.name&&J.message==Q.message;case aT:case oT:return J==Q+"";case V_:var W=D10;case N_:var z=q&M_;if(W||(W=j10),J.size!=Q.size&&!z)return!1;var G=Y.get(J);if(G)return G==Q;q|=lT,Y.set(J,Q);var H=Yy(W(J),W(Q),q,X,K,Y);return Y.delete(J),H;case t00:if(iL)return iL.call(J)==iL.call(Q)}return!1}function G40(J,Q,Z,q,X,K){var Y=Z&M_,W=cT(J),z=W.length,G=cT(Q),H=G.length;if(z!=H&&!Y)return!1;var $=z;while($--){var _=W[$];if(!(Y?_ in Q:_2.call(Q,_)))return!1}var F=K.get(J);if(F&&K.get(Q))return F==Q;var U=!0;K.set(J,Q),K.set(Q,J);var V=Y;while(++$<z){_=W[$];var N=J[_],B=Q[_];if(q)var O=Y?q(B,N,_,Q,J,K):q(N,B,_,J,Q,K);if(!(O===void 0?N===B||X(N,B,Z,q,K):O)){U=!1;break}V||(V=_=="constructor")}if(U&&!V){var M=J.constructor,L=Q.constructor;if(M!=L&&(("constructor"in J)&&("constructor"in Q))&&!(typeof M=="function"&&M instanceof M&&typeof L=="function"&&L instanceof L))U=!1}return K.delete(J),K.delete(Q),U}function cT(J){return q40(J,D40,H40)}function k_(J,Q){var Z=J.__data__;return F40(Q)?Z[typeof Q=="string"?"string":"hash"]:Z.map}function mX(J,Q){var Z=L10(J,Q);return K40(Z)?Z:void 0}function $40(J){var Q=_2.call(J,Eq),Z=J[Eq];try{J[Eq]=void 0;var q=!0}catch(K){}var X=qy.call(J);if(q)if(Q)J[Eq]=Z;else delete J[Eq];return X}var H40=!hT?M40:function(J){if(J==null)return[];return J=Object(J),F10(hT(J),function(Q){return Xy.call(J,Q)})},vQ=yW;if(rL&&vQ(new rL(new ArrayBuffer(1)))!=B_||wW&&vQ(new wW)!=V_||aL&&vQ(aL.resolve())!=TT||oL&&vQ(new oL)!=N_||tL&&vQ(new tL)!=sL)vQ=function(J){var Q=yW(J),Z=Q==hX?J.constructor:void 0,q=Z?Pq(Z):"";if(q)switch(q){case I10:return B_;case w10:return V_;case b10:return TT;case T10:return N_;case y10:return sL}return Q};function _40(J,Q){return Q=Q==null?pT:Q,!!Q&&(typeof J=="number"||H10.test(J))&&(J>-1&&J%1==0&&J<Q)}function F40(J){var Q=typeof J;return Q=="string"||Q=="number"||Q=="symbol"||Q=="boolean"?J!=="__proto__":J===null}function U40(J){return!!ST&&ST in J}function V40(J){var Q=J&&J.constructor,Z=typeof Q=="function"&&Q.prototype||j_;return J===Z}function N40(J){return qy.call(J)}function Pq(J){if(J!=null){try{return Zy.call(J)}catch(Q){}try{return J+""}catch(Q){}}return""}function Wy(J,Q){return J===Q||J!==J&&Q!==Q}var B40=mT(function(){return arguments}())?mT:function(J){return TW(J)&&_2.call(J,"callee")&&!Xy.call(J,"callee")},D_=Array.isArray;function O40(J){return J!=null&&Gy(J.length)&&!zy(J)}var eL=C10||j40;function L40(J,Q){return Ky(J,Q)}function zy(J){if(!$y(J))return!1;var Q=yW(J);return Q==sT||Q==r00||Q==s00||Q==o00}function Gy(J){return typeof J=="number"&&J>-1&&J%1==0&&J<=pT}function $y(J){var Q=typeof J;return J!=null&&(Q=="object"||Q=="function")}function TW(J){return J!=null&&typeof J=="object"}var Hy=vT?B10(vT):Y40;function D40(J){return O40(J)?Z40(J):W40(J)}function M40(){return[]}function j40(){return!1}uX.exports=L40});var UD=fQ((E_,lX)=>{var R40=200,HD="__lodash_hash_undefined__",Ry=1,b_=2,ky=9007199254740991,A_="[object Arguments]",qD="[object Array]",Ey="[object Boolean]",Ay="[object Date]",Cy="[object Error]",Py="[object Function]",k40="[object GeneratorFunction]",C_="[object Map]",Iy="[object Number]",cX="[object Object]",Fy="[object Promise]",wy="[object RegExp]",P_="[object Set]",by="[object String]",E40="[object Symbol]",XD="[object WeakMap]",Ty="[object ArrayBuffer]",I_="[object DataView]",A40="[object Float32Array]",C40="[object Float64Array]",P40="[object Int8Array]",I40="[object Int16Array]",w40="[object Int32Array]",b40="[object Uint8Array]",T40="[object Uint8ClampedArray]",y40="[object Uint16Array]",x40="[object Uint32Array]",v40=/[\\^$.*+?()[\]{}|]/g,S40=/^\[object .+?Constructor\]$/,f40=/^(?:0|[1-9]\d*)$/,c4={};c4[A40]=c4[C40]=c4[P40]=c4[I40]=c4[w40]=c4[b40]=c4[T40]=c4[y40]=c4[x40]=!0;c4[A_]=c4[qD]=c4[Ty]=c4[Ey]=c4[I_]=c4[Ay]=c4[Cy]=c4[Py]=c4[C_]=c4[Iy]=c4[cX]=c4[wy]=c4[P_]=c4[by]=c4[XD]=!1;var yy=typeof global=="object"&&global&&global.Object===Object&&global,g40=typeof self=="object"&&self&&self.Object===Object&&self,uQ=yy||g40||Function("return this")(),xy=typeof E_=="object"&&E_&&!E_.nodeType&&E_,Uy=xy&&typeof lX=="object"&&lX&&!lX.nodeType&&lX,h40=Uy&&Uy.exports===xy,Vy=h40&&yy.process,Ny=function(){try{return Vy&&Vy.binding("util")}catch(J){}}(),By=Ny&&Ny.isTypedArray;function u40(J,Q){var Z=-1,q=J?J.length:0;while(++Z<q)if(Q(J[Z],Z,J))return!0;return!1}function m40(J,Q){var Z=-1,q=Array(J);while(++Z<J)q[Z]=Q(Z);return q}function c40(J){return function(Q){return J(Q)}}function l40(J,Q){return J==null?void 0:J[Q]}function KD(J){var Q=!1;if(J!=null&&typeof J.toString!="function")try{Q=!!(J+"")}catch(Z){}return Q}function p40(J){var Q=-1,Z=Array(J.size);return J.forEach(function(q,X){Z[++Q]=[X,q]}),Z}function d40(J,Q){return function(Z){return J(Q(Z))}}function i40(J){var Q=-1,Z=Array(J.size);return J.forEach(function(q){Z[++Q]=q}),Z}var n40=Array.prototype,s40=Function.prototype,T_=Object.prototype,QD=uQ["__core-js_shared__"],Oy=function(){var J=/[^.]+$/.exec(QD&&QD.keys&&QD.keys.IE_PROTO||"");return J?"Symbol(src)_1."+J:""}(),vy=s40.toString,zJ=T_.hasOwnProperty,SW=T_.toString,r40=RegExp("^"+vy.call(zJ).replace(v40,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ly=uQ.Symbol,Dy=uQ.Uint8Array,a40=T_.propertyIsEnumerable,o40=n40.splice,t40=d40(Object.keys,Object),YD=pX(uQ,"DataView"),xW=pX(uQ,"Map"),WD=pX(uQ,"Promise"),zD=pX(uQ,"Set"),GD=pX(uQ,"WeakMap"),vW=pX(Object,"create"),e40=bq(YD),J60=bq(xW),Q60=bq(WD),Z60=bq(zD),q60=bq(GD),My=Ly?Ly.prototype:void 0,ZD=My?My.valueOf:void 0;function Iq(J){var Q=-1,Z=J?J.length:0;this.clear();while(++Q<Z){var q=J[Q];this.set(q[0],q[1])}}function X60(){this.__data__=vW?vW(null):{}}function K60(J){return this.has(J)&&delete this.__data__[J]}function Y60(J){var Q=this.__data__;if(vW){var Z=Q[J];return Z===HD?void 0:Z}return zJ.call(Q,J)?Q[J]:void 0}function W60(J){var Q=this.__data__;return vW?Q[J]!==void 0:zJ.call(Q,J)}function z60(J,Q){var Z=this.__data__;return Z[J]=vW&&Q===void 0?HD:Q,this}Iq.prototype.clear=X60;Iq.prototype.delete=K60;Iq.prototype.get=Y60;Iq.prototype.has=W60;Iq.prototype.set=z60;function GJ(J){var Q=-1,Z=J?J.length:0;this.clear();while(++Q<Z){var q=J[Q];this.set(q[0],q[1])}}function G60(){this.__data__=[]}function $60(J){var Q=this.__data__,Z=y_(Q,J);if(Z<0)return!1;var q=Q.length-1;if(Z==q)Q.pop();else o40.call(Q,Z,1);return!0}function H60(J){var Q=this.__data__,Z=y_(Q,J);return Z<0?void 0:Q[Z][1]}function _60(J){return y_(this.__data__,J)>-1}function F60(J,Q){var Z=this.__data__,q=y_(Z,J);if(q<0)Z.push([J,Q]);else Z[q][1]=Q;return this}GJ.prototype.clear=G60;GJ.prototype.delete=$60;GJ.prototype.get=H60;GJ.prototype.has=_60;GJ.prototype.set=F60;function wq(J){var Q=-1,Z=J?J.length:0;this.clear();while(++Q<Z){var q=J[Q];this.set(q[0],q[1])}}function U60(){this.__data__={hash:new Iq,map:new(xW||GJ),string:new Iq}}function V60(J){return x_(this,J).delete(J)}function N60(J){return x_(this,J).get(J)}function B60(J){return x_(this,J).has(J)}function O60(J,Q){return x_(this,J).set(J,Q),this}wq.prototype.clear=U60;wq.prototype.delete=V60;wq.prototype.get=N60;wq.prototype.has=B60;wq.prototype.set=O60;function w_(J){var Q=-1,Z=J?J.length:0;this.__data__=new wq;while(++Q<Z)this.add(J[Q])}function L60(J){return this.__data__.set(J,HD),this}function D60(J){return this.__data__.has(J)}w_.prototype.add=w_.prototype.push=L60;w_.prototype.has=D60;function hQ(J){this.__data__=new GJ(J)}function M60(){this.__data__=new GJ}function j60(J){return this.__data__.delete(J)}function R60(J){return this.__data__.get(J)}function k60(J){return this.__data__.has(J)}function E60(J,Q){var Z=this.__data__;if(Z instanceof GJ){var q=Z.__data__;if(!xW||q.length<R40-1)return q.push([J,Q]),this;Z=this.__data__=new wq(q)}return Z.set(J,Q),this}hQ.prototype.clear=M60;hQ.prototype.delete=j60;hQ.prototype.get=R60;hQ.prototype.has=k60;hQ.prototype.set=E60;function A60(J,Q){var Z=$D(J)||g60(J)?m40(J.length,String):[],q=Z.length,X=!!q;for(var K in J)if((Q||zJ.call(J,K))&&!(X&&(K=="length"||x60(K,q))))Z.push(K);return Z}function y_(J,Q){var Z=J.length;while(Z--)if(gy(J[Z][0],Q))return Z;return-1}function C60(J){return SW.call(J)}function Sy(J,Q,Z,q,X){if(J===Q)return!0;if(J==null||Q==null||!_D(J)&&!FD(Q))return J!==J&&Q!==Q;return P60(J,Q,Sy,Z,q,X)}function P60(J,Q,Z,q,X,K){var Y=$D(J),W=$D(Q),z=qD,G=qD;if(!Y)z=gQ(J),z=z==A_?cX:z;if(!W)G=gQ(Q),G=G==A_?cX:G;var H=z==cX&&!KD(J),$=G==cX&&!KD(Q),_=z==G;if(_&&!H)return K||(K=new hQ),Y||m60(J)?fy(J,Q,Z,q,X,K):T60(J,Q,z,Z,q,X,K);if(!(X&b_)){var F=H&&zJ.call(J,"__wrapped__"),U=$&&zJ.call(Q,"__wrapped__");if(F||U){var V=F?J.value():J,N=U?Q.value():Q;return K||(K=new hQ),Z(V,N,q,X,K)}}if(!_)return!1;return K||(K=new hQ),y60(J,Q,Z,q,X,K)}function I60(J){if(!_D(J)||S60(J))return!1;var Q=uy(J)||KD(J)?r40:S40;return Q.test(bq(J))}function w60(J){return FD(J)&&my(J.length)&&!!c4[SW.call(J)]}function b60(J){if(!f60(J))return t40(J);var Q=[];for(var Z in Object(J))if(zJ.call(J,Z)&&Z!="constructor")Q.push(Z);return Q}function fy(J,Q,Z,q,X,K){var Y=X&b_,W=J.length,z=Q.length;if(W!=z&&!(Y&&z>W))return!1;var G=K.get(J);if(G&&K.get(Q))return G==Q;var H=-1,$=!0,_=X&Ry?new w_:void 0;K.set(J,Q),K.set(Q,J);while(++H<W){var F=J[H],U=Q[H];if(q)var V=Y?q(U,F,H,Q,J,K):q(F,U,H,J,Q,K);if(V!==void 0){if(V)continue;$=!1;break}if(_){if(!u40(Q,function(N,B){if(!_.has(B)&&(F===N||Z(F,N,q,X,K)))return _.add(B)})){$=!1;break}}else if(!(F===U||Z(F,U,q,X,K))){$=!1;break}}return K.delete(J),K.delete(Q),$}function T60(J,Q,Z,q,X,K,Y){switch(Z){case I_:if(J.byteLength!=Q.byteLength||J.byteOffset!=Q.byteOffset)return!1;J=J.buffer,Q=Q.buffer;case Ty:if(J.byteLength!=Q.byteLength||!q(new Dy(J),new Dy(Q)))return!1;return!0;case Ey:case Ay:case Iy:return gy(+J,+Q);case Cy:return J.name==Q.name&&J.message==Q.message;case wy:case by:return J==Q+"";case C_:var W=p40;case P_:var z=K&b_;if(W||(W=i40),J.size!=Q.size&&!z)return!1;var G=Y.get(J);if(G)return G==Q;K|=Ry,Y.set(J,Q);var H=fy(W(J),W(Q),q,X,K,Y);return Y.delete(J),H;case E40:if(ZD)return ZD.call(J)==ZD.call(Q)}return!1}function y60(J,Q,Z,q,X,K){var Y=X&b_,W=jy(J),z=W.length,G=jy(Q),H=G.length;if(z!=H&&!Y)return!1;var $=z;while($--){var _=W[$];if(!(Y?_ in Q:zJ.call(Q,_)))return!1}var F=K.get(J);if(F&&K.get(Q))return F==Q;var U=!0;K.set(J,Q),K.set(Q,J);var V=Y;while(++$<z){_=W[$];var N=J[_],B=Q[_];if(q)var O=Y?q(B,N,_,Q,J,K):q(N,B,_,J,Q,K);if(!(O===void 0?N===B||Z(N,B,q,X,K):O)){U=!1;break}V||(V=_=="constructor")}if(U&&!V){var M=J.constructor,L=Q.constructor;if(M!=L&&(("constructor"in J)&&("constructor"in Q))&&!(typeof M=="function"&&M instanceof M&&typeof L=="function"&&L instanceof L))U=!1}return K.delete(J),K.delete(Q),U}function x_(J,Q){var Z=J.__data__;return v60(Q)?Z[typeof Q=="string"?"string":"hash"]:Z.map}function pX(J,Q){var Z=l40(J,Q);return I60(Z)?Z:void 0}var gQ=C60;if(YD&&gQ(new YD(new ArrayBuffer(1)))!=I_||xW&&gQ(new xW)!=C_||WD&&gQ(WD.resolve())!=Fy||zD&&gQ(new zD)!=P_||GD&&gQ(new GD)!=XD)gQ=function(J){var Q=SW.call(J),Z=Q==cX?J.constructor:void 0,q=Z?bq(Z):void 0;if(q)switch(q){case e40:return I_;case J60:return C_;case Q60:return Fy;case Z60:return P_;case q60:return XD}return Q};function x60(J,Q){return Q=Q==null?ky:Q,!!Q&&(typeof J=="number"||f40.test(J))&&(J>-1&&J%1==0&&J<Q)}function v60(J){var Q=typeof J;return Q=="string"||Q=="number"||Q=="symbol"||Q=="boolean"?J!=="__proto__":J===null}function S60(J){return!!Oy&&Oy in J}function f60(J){var Q=J&&J.constructor,Z=typeof Q=="function"&&Q.prototype||T_;return J===Z}function bq(J){if(J!=null){try{return vy.call(J)}catch(Q){}try{return J+""}catch(Q){}}return""}function gy(J,Q){return J===Q||J!==J&&Q!==Q}function g60(J){return h60(J)&&zJ.call(J,"callee")&&(!a40.call(J,"callee")||SW.call(J)==A_)}var $D=Array.isArray;function hy(J){return J!=null&&my(J.length)&&!uy(J)}function h60(J){return FD(J)&&hy(J)}function u60(J,Q,Z){Z=typeof Z=="function"?Z:void 0;var q=Z?Z(J,Q):void 0;return q===void 0?Sy(J,Q,Z):!!q}function uy(J){var Q=_D(J)?SW.call(J):"";return Q==Py||Q==k40}function my(J){return typeof J=="number"&&J>-1&&J%1==0&&J<=ky}function _D(J){var Q=typeof J;return!!J&&(Q=="object"||Q=="function")}function FD(J){return!!J&&typeof J=="object"}var m60=By?c40(By):w60;function jy(J){return hy(J)?A60(J):b60(J)}lX.exports=u60});var iy=fQ((bB0,dy)=>{var py="Expected a function",cy=NaN,c60="[object Symbol]",l60=/^\s+|\s+$/g,p60=/^[-+]0x[0-9a-f]+$/i,d60=/^0b[01]+$/i,i60=/^0o[0-7]+$/i,n60=parseInt,s60=typeof global=="object"&&global&&global.Object===Object&&global,r60=typeof self=="object"&&self&&self.Object===Object&&self,a60=s60||r60||Function("return this")(),o60=Object.prototype,t60=o60.toString,e60=Math.max,J50=Math.min,VD=function(){return a60.Date.now()};function Q50(J,Q,Z){var q,X,K,Y,W,z,G=0,H=!1,$=!1,_=!0;if(typeof J!="function")throw TypeError(py);if(Q=ly(Q)||0,v_(Z))H=!!Z.leading,$="maxWait"in Z,K=$?e60(ly(Z.maxWait)||0,Q):K,_="trailing"in Z?!!Z.trailing:_;function F(k){var R=q,I=X;return q=X=void 0,G=k,Y=J.apply(I,R),Y}function U(k){return G=k,W=setTimeout(B,Q),H?F(k):Y}function V(k){var R=k-z,I=k-G,A=Q-R;return $?J50(A,K-I):A}function N(k){var R=k-z,I=k-G;return z===void 0||R>=Q||R<0||$&&I>=K}function B(){var k=VD();if(N(k))return O(k);W=setTimeout(B,V(k))}function O(k){if(W=void 0,_&&q)return F(k);return q=X=void 0,Y}function M(){if(W!==void 0)clearTimeout(W);G=0,q=z=X=W=void 0}function L(){return W===void 0?Y:O(VD())}function j(){var k=VD(),R=N(k);if(q=arguments,X=this,z=k,R){if(W===void 0)return U(z);if($)return W=setTimeout(B,Q),F(z)}if(W===void 0)W=setTimeout(B,Q);return Y}return j.cancel=M,j.flush=L,j}function Z50(J,Q,Z){var q=!0,X=!0;if(typeof J!="function")throw TypeError(py);if(v_(Z))q="leading"in Z?!!Z.leading:q,X="trailing"in Z?!!Z.trailing:X;return Q50(J,Q,{leading:q,maxWait:Q,trailing:X})}function v_(J){var Q=typeof J;return!!J&&(Q=="object"||Q=="function")}function q50(J){return!!J&&typeof J=="object"}function X50(J){return typeof J=="symbol"||q50(J)&&t60.call(J)==c60}function ly(J){if(typeof J=="number")return J;if(X50(J))return cy;if(v_(J)){var Q=typeof J.valueOf=="function"?J.valueOf():J;J=v_(Q)?Q+"":Q}if(typeof J!="string")return J===0?J:+J;J=J.replace(l60,"");var Z=d60.test(J);return Z||i60.test(J)?n60(J.slice(2),Z?2:8):p60.test(J)?cy:+J}dy.exports=Z50});var ey=fQ((TB0,ty)=>{var K50=200,OD="__lodash_hash_undefined__",Y50=1/0,W50="[object Function]",z50="[object GeneratorFunction]",G50=/[\\^$.*+?()[\]{}|]/g,$50=/^\[object .+?Constructor\]$/,H50=typeof global=="object"&&global&&global.Object===Object&&global,_50=typeof self=="object"&&self&&self.Object===Object&&self,LD=H50||_50||Function("return this")();function F50(J,Q){var Z=J?J.length:0;return!!Z&&N50(J,Q,0)>-1}function U50(J,Q,Z){var q=-1,X=J?J.length:0;while(++q<X)if(Z(Q,J[q]))return!0;return!1}function V50(J,Q,Z,q){var X=J.length,K=Z+(q?1:-1);while(q?K--:++K<X)if(Q(J[K],K,J))return K;return-1}function N50(J,Q,Z){if(Q!==Q)return V50(J,B50,Z);var q=Z-1,X=J.length;while(++q<X)if(J[q]===Q)return q;return-1}function B50(J){return J!==J}function O50(J,Q){return J.has(Q)}function L50(J,Q){return J==null?void 0:J[Q]}function D50(J){var Q=!1;if(J!=null&&typeof J.toString!="function")try{Q=!!(J+"")}catch(Z){}return Q}function sy(J){var Q=-1,Z=Array(J.size);return J.forEach(function(q){Z[++Q]=q}),Z}var M50=Array.prototype,j50=Function.prototype,ry=Object.prototype,ND=LD["__core-js_shared__"],ny=function(){var J=/[^.]+$/.exec(ND&&ND.keys&&ND.keys.IE_PROTO||"");return J?"Symbol(src)_1."+J:""}(),ay=j50.toString,DD=ry.hasOwnProperty,R50=ry.toString,k50=RegExp("^"+ay.call(DD).replace(G50,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),E50=M50.splice,A50=MD(LD,"Map"),BD=MD(LD,"Set"),fW=MD(Object,"create");function Tq(J){var Q=-1,Z=J?J.length:0;this.clear();while(++Q<Z){var q=J[Q];this.set(q[0],q[1])}}function C50(){this.__data__=fW?fW(null):{}}function P50(J){return this.has(J)&&delete this.__data__[J]}function I50(J){var Q=this.__data__;if(fW){var Z=Q[J];return Z===OD?void 0:Z}return DD.call(Q,J)?Q[J]:void 0}function w50(J){var Q=this.__data__;return fW?Q[J]!==void 0:DD.call(Q,J)}function b50(J,Q){var Z=this.__data__;return Z[J]=fW&&Q===void 0?OD:Q,this}Tq.prototype.clear=C50;Tq.prototype.delete=P50;Tq.prototype.get=I50;Tq.prototype.has=w50;Tq.prototype.set=b50;function dX(J){var Q=-1,Z=J?J.length:0;this.clear();while(++Q<Z){var q=J[Q];this.set(q[0],q[1])}}function T50(){this.__data__=[]}function y50(J){var Q=this.__data__,Z=f_(Q,J);if(Z<0)return!1;var q=Q.length-1;if(Z==q)Q.pop();else E50.call(Q,Z,1);return!0}function x50(J){var Q=this.__data__,Z=f_(Q,J);return Z<0?void 0:Q[Z][1]}function v50(J){return f_(this.__data__,J)>-1}function S50(J,Q){var Z=this.__data__,q=f_(Z,J);if(q<0)Z.push([J,Q]);else Z[q][1]=Q;return this}dX.prototype.clear=T50;dX.prototype.delete=y50;dX.prototype.get=x50;dX.prototype.has=v50;dX.prototype.set=S50;function iX(J){var Q=-1,Z=J?J.length:0;this.clear();while(++Q<Z){var q=J[Q];this.set(q[0],q[1])}}function f50(){this.__data__={hash:new Tq,map:new(A50||dX),string:new Tq}}function g50(J){return g_(this,J).delete(J)}function h50(J){return g_(this,J).get(J)}function u50(J){return g_(this,J).has(J)}function m50(J,Q){return g_(this,J).set(J,Q),this}iX.prototype.clear=f50;iX.prototype.delete=g50;iX.prototype.get=h50;iX.prototype.has=u50;iX.prototype.set=m50;function S_(J){var Q=-1,Z=J?J.length:0;this.__data__=new iX;while(++Q<Z)this.add(J[Q])}function c50(J){return this.__data__.set(J,OD),this}function l50(J){return this.__data__.has(J)}S_.prototype.add=S_.prototype.push=c50;S_.prototype.has=l50;function f_(J,Q){var Z=J.length;while(Z--)if(o50(J[Z][0],Q))return Z;return-1}function p50(J){if(!oy(J)||s50(J))return!1;var Q=t50(J)||D50(J)?k50:$50;return Q.test(r50(J))}function d50(J,Q,Z){var q=-1,X=F50,K=J.length,Y=!0,W=[],z=W;if(Z)Y=!1,X=U50;else if(K>=K50){var G=Q?null:i50(J);if(G)return sy(G);Y=!1,X=O50,z=new S_}else z=Q?[]:W;J:while(++q<K){var H=J[q],$=Q?Q(H):H;if(H=Z||H!==0?H:0,Y&&$===$){var _=z.length;while(_--)if(z[_]===$)continue J;if(Q)z.push($);W.push(H)}else if(!X(z,$,Z)){if(z!==W)z.push($);W.push(H)}}return W}var i50=!(BD&&1/sy(new BD([,-0]))[1]==Y50)?e50:function(J){return new BD(J)};function g_(J,Q){var Z=J.__data__;return n50(Q)?Z[typeof Q=="string"?"string":"hash"]:Z.map}function MD(J,Q){var Z=L50(J,Q);return p50(Z)?Z:void 0}function n50(J){var Q=typeof J;return Q=="string"||Q=="number"||Q=="symbol"||Q=="boolean"?J!=="__proto__":J===null}function s50(J){return!!ny&&ny in J}function r50(J){if(J!=null){try{return ay.call(J)}catch(Q){}try{return J+""}catch(Q){}}return""}function a50(J){return J&&J.length?d50(J):[]}function o50(J,Q){return J===Q||J!==J&&Q!==Q}function t50(J){var Q=oy(J)?R50.call(J):"";return Q==W50||Q==z50}function oy(J){var Q=typeof J;return!!J&&(Q=="object"||Q=="function")}function e50(){}ty.exports=a50});var c1=fQ((dP0,UF)=>{/*!
2
2
  Copyright (c) 2018 Jed Watson.
3
3
  Licensed under the MIT License (MIT), see
4
4
  http://jedwatson.github.io/classnames
package/dist/index.html CHANGED
@@ -21,7 +21,7 @@
21
21
  }
22
22
  </script>
23
23
 
24
- <link rel="stylesheet" crossorigin href="/chunk-sapvd7he.css"><script type="module" crossorigin src="/chunk-6wx91x8j.js"></script></head>
24
+ <link rel="stylesheet" crossorigin href="/chunk-v82nefjq.css"><script type="module" crossorigin src="/chunk-87q78504.js"></script></head>
25
25
  <body>
26
26
  <div id="root"></div>
27
27
 
package/lib/themes.ts CHANGED
@@ -105,9 +105,9 @@ const THEME_COLOR_DERIVATIONS = {
105
105
  primary: primary => primary,
106
106
  primaryForeground: primary => foregroundForPrimary(primary),
107
107
  background: () => 'color-mix(in oklch, var(--primary) 3%, oklch(1 0 0) 97%)',
108
- foreground: () => 'color-mix(var(--primary) 20%, oklch(0 0 0) 80%)',
108
+ foreground: () => 'color-mix(in oklch, var(--primary) 20%, oklch(0 0 0) 80%)',
109
109
  muted: () => 'color-mix(in oklch, var(--background) 97%, var(--foreground) 3%)',
110
- mutedForeground: () => 'color-mix(var(--background) 50%, var(--foreground) 50%)',
110
+ mutedForeground: () => 'color-mix(in oklch, var(--background) 50%, var(--foreground) 50%)',
111
111
  accent: () => 'color-mix(in oklch, var(--primary) 4%, var(--foreground) 4%)',
112
112
  accentForeground: () => 'var(--foreground)',
113
113
  border: () => 'color-mix(in oklch, var(--foreground) 7%, transparent)'
@@ -116,9 +116,9 @@ const THEME_COLOR_DERIVATIONS = {
116
116
  background: primary => primary,
117
117
  foreground: primary => foregroundForPrimary(primary),
118
118
  primary: () => 'color-mix(in oklch, var(--background) 3%, oklch(1 0 0) 97%)',
119
- primaryForeground: () => 'color-mix(var(--background) 20%, oklch(0 0 0) 80%)',
119
+ primaryForeground: () => 'color-mix(in oklch, var(--background) 20%, oklch(0 0 0) 80%)',
120
120
  muted: () => 'color-mix(in oklch, var(--background) 97%, var(--foreground) 3%)',
121
- mutedForeground: () => 'color-mix(var(--background) 50%, var(--foreground) 50%)',
121
+ mutedForeground: () => 'color-mix(in oklch, var(--background) 50%, var(--foreground) 50%)',
122
122
  accent: () => 'color-mix(in oklch, var(--primary) 4%, var(--foreground) 4%)',
123
123
  accentForeground: () => 'var(--foreground)',
124
124
  border: () => 'color-mix(in oklch, var(--foreground) 15%, transparent)'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "moi-computer",
3
- "version": "0.9.1-next.1",
3
+ "version": "0.9.1-next.3",
4
4
  "description": "Local AI workspace powered by the Claude Agent SDK, Bun, React, and Tailwind. Requires Bun.",
5
5
  "license": "Elastic-2.0",
6
6
  "type": "module",
package/server/cli.ts CHANGED
@@ -30,7 +30,8 @@ import type {
30
30
  ScratchSize,
31
31
  ScratchStyle,
32
32
  WorkspaceEntry,
33
- WorkspaceSkillStatus
33
+ WorkspaceSkillStatus,
34
+ WorkspaceType
34
35
  } from '@/lib/types'
35
36
 
36
37
  import {
@@ -43,13 +44,21 @@ import {
43
44
  import { columns, keyValue } from './cli-ui'
44
45
  import { CONTROL_HOST, CONTROL_PORT, CONTROL_URL, PORT } from './constants'
45
46
  import { type ControlProbe, controlFailureMessage, probeControlServer } from './control-client'
47
+ import {
48
+ HARNESS_TYPES,
49
+ type DetectedAgent,
50
+ agentBindingFor,
51
+ detectHarness,
52
+ harnessLabel,
53
+ isHarnessName
54
+ } from './harness/detect'
46
55
  import {
47
56
  type HermesProfile,
48
57
  discoverHermesProfiles,
49
58
  matchHermesProfile
50
59
  } from './harness/hermes/discovery'
51
60
  import { type OpenClawAgent, discoverOpenClawAgents } from './harness/openclaw/discovery'
52
- import { liftToWorkspaceRoot, registerWorkspace } from './registry'
61
+ import { liftToWorkspaceRoot, listWorkspaces, registerWorkspace } from './registry'
53
62
  import { serverCwd } from './server-cwd'
54
63
  import {
55
64
  isBehind,
@@ -207,6 +216,95 @@ async function runDevSupervisor(
207
216
 
208
217
  // ---- commands ---------------------------------------------------------------
209
218
 
219
+ // `moi init`'s harness decision: an explicit `--harness` wins, otherwise
220
+ // auto-detection (harness/detect.ts). Exits when neither settles it — silently
221
+ // defaulting to Claude Code would install skills into `.claude/skills/` for an
222
+ // agent that reads from somewhere else entirely, which fails later and quietly.
223
+ async function resolveInitHarness(
224
+ target: string,
225
+ requested: string | undefined
226
+ ): Promise<{ type: WorkspaceType; agent: DetectedAgent | null }> {
227
+ if (requested !== undefined) {
228
+ const value = requested.trim()
229
+ if (!isHarnessName(value)) {
230
+ console.error('\n' + pc.red('✗') + ' Unknown harness: ' + pc.bold(requested))
231
+ console.error(pc.dim(' Valid values: ' + HARNESS_TYPES.join(', ')) + '\n')
232
+ process.exit(1)
233
+ }
234
+ // An explicit choice still picks up the agent binding when the provider
235
+ // can confirm it. It often can't — OpenClaw needs a running gateway — so a
236
+ // miss warns rather than blocking a deliberate override.
237
+ const agent = await agentBindingFor(value, target)
238
+ if (!agent && (value === 'openclaw' || value === 'hermes')) {
239
+ const noun = value === 'hermes' ? 'profile' : 'agent'
240
+ console.log(
241
+ '\n' +
242
+ pc.yellow('⚠') +
243
+ ' No ' +
244
+ harnessLabel[value] +
245
+ ' ' +
246
+ noun +
247
+ ' found at this path — registering without one.\n' +
248
+ pc.dim(' Run ') +
249
+ pc.bold('moi ' + value + ' init') +
250
+ pc.dim(' to bind it once ' + harnessLabel[value] + ' can see the workspace.')
251
+ )
252
+ }
253
+ return { type: value, agent }
254
+ }
255
+
256
+ // A registered workspace has already answered this question, and may carry no
257
+ // on-disk signal at all (a folder created from the UI whose agent has never
258
+ // run in it), so the registry outranks detection when re-running `moi init`
259
+ // to refresh skills.
260
+ const known = (await listWorkspaces()).find(e => e.path === target)
261
+ if (known) {
262
+ const type = known.type ?? 'claude-code'
263
+ console.log(
264
+ '\n' + pc.dim(' Already registered — initializing for ') + pc.bold(harnessLabel[type])
265
+ )
266
+ return {
267
+ type,
268
+ agent: known.agentId
269
+ ? {
270
+ agentId: known.agentId,
271
+ ...(known.name ? { name: known.name } : {}),
272
+ isDefault: known.isDefault ?? false,
273
+ ...(known.lastRunAt ? { lastRunAt: known.lastRunAt } : {})
274
+ }
275
+ : null
276
+ }
277
+ }
278
+
279
+ const detected = await detectHarness(target)
280
+ if (detected) {
281
+ console.log(
282
+ '\n' +
283
+ pc.yellow('◆') +
284
+ ' Detected ' +
285
+ detected.reason +
286
+ ' — initializing for ' +
287
+ pc.bold(harnessLabel[detected.type]) +
288
+ '.'
289
+ )
290
+ return { type: detected.type, agent: detected.agent ?? null }
291
+ }
292
+
293
+ console.error('\n' + pc.red('✗') + ' No agent harness detected in ' + pc.bold(target))
294
+ console.error(
295
+ pc.dim(' Looked for a Hermes profile, an OpenClaw agent, and Codex or Claude Code history.\n')
296
+ )
297
+ console.error(' Pick one:\n')
298
+ console.error(
299
+ keyValue(
300
+ HARNESS_TYPES.map(t => [pc.bold('moi init --harness=' + t), harnessLabel[t]]),
301
+ ' '
302
+ )
303
+ )
304
+ console.error()
305
+ process.exit(1)
306
+ }
307
+
210
308
  const init = defineCommand({
211
309
  meta: {
212
310
  name: 'init',
@@ -218,6 +316,10 @@ const init = defineCommand({
218
316
  default: '.',
219
317
  description: 'Target directory (default: current)'
220
318
  },
319
+ harness: {
320
+ type: 'string',
321
+ description: 'Agent harness: ' + HARNESS_TYPES.join(', ') + ' (default: auto-detect)'
322
+ },
221
323
  web: {
222
324
  type: 'boolean',
223
325
  default: false,
@@ -259,28 +361,16 @@ const init = defineCommand({
259
361
  const projectRoot = join(import.meta.dir, '..')
260
362
  const isInteractive = process.stdout.isTTY
261
363
 
262
- // Detect an OpenClaw agent workspace before provisioning: skills must land
263
- // in `skills/` (not `.claude/skills/`) and the registry entry must carry
264
- // the agent metadata — same as `moi openclaw init <agent>`. Discovery
265
- // returns [] when the gateway is down, so this never blocks a plain init.
266
- const agent = (await discoverOpenClawAgents()).find(a => a.path === target) ?? null
267
- if (agent) {
268
- console.log(
269
- '\n' +
270
- pc.yellow('◆') +
271
- ' Detected an OpenClaw agent workspace ' +
272
- pc.dim('(' + agent.agentId + (agent.name ? ', ' + agent.name : '') + ')') +
273
- ' — initializing for OpenClaw.'
274
- )
275
- }
364
+ // Which backend this workspace is for has to be settled before
365
+ // provisioning: each harness reads skills from a different directory, and
366
+ // agent-owned ones (OpenClaw, Hermes) need their agent metadata on the
367
+ // registry entry — same as `moi <provider> init`.
368
+ const { type, agent } = await resolveInitHarness(target, args.harness)
276
369
 
277
370
  // Provision: bundled skills + the `.moi/` bootstrap (widgets dir +
278
371
  // package.json + bun install). An existing `.moi/` is left untouched.
279
372
  console.log()
280
- const { scaffold, skillsDir } = await provisionWorkspace(
281
- target,
282
- agent ? 'openclaw' : 'claude-code'
283
- )
373
+ const { scaffold, skillsDir } = await provisionWorkspace(target, type)
284
374
  if (scaffold !== 'exists') {
285
375
  if (scaffold === 'installing') {
286
376
  console.log(pc.dim(' Widget dependencies still installing in .moi/ (background)'))
@@ -292,25 +382,24 @@ const init = defineCommand({
292
382
  }
293
383
 
294
384
  // Always register the workspace in the persistent registry
295
- const entry = await registerWorkspace(
296
- target,
297
- agent
385
+ const entry = await registerWorkspace(target, {
386
+ type,
387
+ ...(agent
298
388
  ? {
299
- type: 'openclaw',
300
389
  name: agent.name,
301
390
  agentId: agent.agentId,
302
391
  isDefault: agent.isDefault,
303
392
  lastRunAt: agent.lastRunAt
304
393
  }
305
- : { type: 'claude-code' }
306
- )
394
+ : {})
395
+ })
307
396
 
308
- console.log(pc.green('✓') + ' Initialized ' + pc.bold(target))
397
+ console.log(pc.green('✓') + ' Initialized ' + pc.bold(target) + pc.dim(' (' + type + ')'))
309
398
  console.log(
310
399
  ' Skills installed to ' +
311
400
  pc.dim(skillsDir) +
312
401
  ' — ask ' +
313
- (agent ? 'your agent' : 'Claude') +
402
+ (type === 'claude-code' ? 'Claude' : 'your agent') +
314
403
  ' to build a widget to get started\n'
315
404
  )
316
405
 
@@ -68,6 +68,8 @@ Socket-protocol notes the layers rely on (all defined in `lib/types.ts`):
68
68
  server/harness/
69
69
  README.md this file
70
70
  debug.ts shared debug taps (wire + client-frame rings) for /dev/harness
71
+ detect.ts which harness owns a directory — `moi init`'s auto-detection
72
+ (Hermes profile → OpenClaw agent → Codex → Claude Code)
71
73
  <name>/
72
74
  adapter.ts pure wire → display mapping (layer 1 → 2); owns the
73
75
  hand-written wire types it consumes
@@ -0,0 +1,169 @@
1
+ // Which harness owns a directory — the auto-detection behind `moi init`.
2
+ //
3
+ // Precedence is deliberate. Hermes profiles and OpenClaw agents are STRUCTURAL
4
+ // workspaces: the provider owns the path and hands us an agent id, so a match
5
+ // there is definitive. Codex and Claude Code only leave history behind, which
6
+ // says "this CLI ran here once", not "this directory belongs to it" — so they
7
+ // come last. Nothing matching means moi genuinely cannot tell, and `moi init`
8
+ // asks for `--harness` rather than guessing: each backend reads skills from a
9
+ // different directory, so a wrong guess installs them where the agent never
10
+ // looks.
11
+ import { existsSync } from 'node:fs'
12
+ import { join, resolve } from 'node:path'
13
+
14
+ import type { WorkspaceType } from '@/lib/types'
15
+
16
+ import { discoverCodexWorkspaces } from './codex/discovery'
17
+ import { type HermesProfile, discoverHermesProfiles } from './hermes/discovery'
18
+ import { type OpenClawAgent, discoverOpenClawAgents } from './openclaw/discovery'
19
+
20
+ // Harness names accepted by `--harness`, in the order they are listed to the
21
+ // user. Detection order is separate (see detectHarness).
22
+ export const HARNESS_TYPES: readonly WorkspaceType[] = [
23
+ 'claude-code',
24
+ 'codex',
25
+ 'hermes',
26
+ 'openclaw'
27
+ ]
28
+
29
+ export const harnessLabel: Record<WorkspaceType, string> = {
30
+ 'claude-code': 'Claude Code',
31
+ codex: 'Codex',
32
+ hermes: 'Hermes',
33
+ openclaw: 'OpenClaw'
34
+ }
35
+
36
+ export function isHarnessName(value: string): value is WorkspaceType {
37
+ return (HARNESS_TYPES as readonly string[]).includes(value)
38
+ }
39
+
40
+ // The provider binding a registry entry carries for agent-owned workspaces
41
+ // (OpenClaw agents, Hermes profiles). Mirrors the fields registerWorkspace
42
+ // stores; plain directory harnesses have none.
43
+ export type DetectedAgent = {
44
+ agentId: string
45
+ name?: string
46
+ isDefault: boolean
47
+ lastRunAt?: string
48
+ }
49
+
50
+ export type HarnessDetection = {
51
+ type: WorkspaceType
52
+ agent?: DetectedAgent
53
+ // What gave it away, as a noun phrase for the CLI's "Detected …" line.
54
+ reason: string
55
+ }
56
+
57
+ // Injection seam: the real sources talk to a gateway, the filesystem and the
58
+ // agent SDK, so tests supply fakes instead of a provisioned machine.
59
+ export type DetectionSources = {
60
+ hermesProfiles: () => Promise<HermesProfile[]>
61
+ openclawAgents: () => Promise<OpenClawAgent[]>
62
+ // Directories each CLI has run in, from its own session history.
63
+ codexWorkspaces: () => Promise<string[]>
64
+ claudeCodeWorkspaces: () => Promise<string[]>
65
+ hasClaudeConfigDir: (path: string) => boolean
66
+ }
67
+
68
+ const defaultSources: DetectionSources = {
69
+ hermesProfiles: discoverHermesProfiles,
70
+ openclawAgents: discoverOpenClawAgents,
71
+ codexWorkspaces: async () => (await discoverCodexWorkspaces(new Set())).map(c => c.path),
72
+ // Lazy: the Claude Code harness pulls in the agent SDK, and this module is
73
+ // imported by the CLI, whose startup pays for every static import.
74
+ claudeCodeWorkspaces: async () => {
75
+ const { claudeCodeHarness } = await import('./claude-code')
76
+ const found = (await claudeCodeHarness.discoverWorkspaces?.(new Set())) ?? []
77
+ return found.map(c => c.path)
78
+ },
79
+ hasClaudeConfigDir: path => existsSync(join(path, '.claude'))
80
+ }
81
+
82
+ // A provider being unreachable (gateway down, SDK throwing) is a miss, not a
83
+ // failure — detection falls through to the next candidate.
84
+ async function safely<T>(fn: () => Promise<T>, fallback: T): Promise<T> {
85
+ try {
86
+ return await fn()
87
+ } catch {
88
+ return fallback
89
+ }
90
+ }
91
+
92
+ function detectionForProfile(profile: HermesProfile): HarnessDetection {
93
+ return {
94
+ type: 'hermes',
95
+ agent: {
96
+ agentId: profile.agentId,
97
+ ...(profile.name ? { name: profile.name } : {}),
98
+ isDefault: profile.isDefault
99
+ },
100
+ reason: `a Hermes profile workspace (${profile.agentId})`
101
+ }
102
+ }
103
+
104
+ function detectionForAgent(agent: OpenClawAgent): HarnessDetection {
105
+ return {
106
+ type: 'openclaw',
107
+ agent: {
108
+ agentId: agent.agentId,
109
+ ...(agent.name ? { name: agent.name } : {}),
110
+ isDefault: agent.isDefault,
111
+ ...(agent.lastRunAt ? { lastRunAt: agent.lastRunAt } : {})
112
+ },
113
+ reason: `an OpenClaw agent workspace (${agent.agentId}${agent.name ? ', ' + agent.name : ''})`
114
+ }
115
+ }
116
+
117
+ export async function detectHarness(
118
+ workspacePath: string,
119
+ sources: Partial<DetectionSources> = {}
120
+ ): Promise<HarnessDetection | null> {
121
+ const src = { ...defaultSources, ...sources }
122
+ const path = resolve(workspacePath)
123
+
124
+ const profile = (await safely(src.hermesProfiles, [])).find(p => p.path === path)
125
+ if (profile) return detectionForProfile(profile)
126
+
127
+ const agent = (await safely(src.openclawAgents, [])).find(a => a.path === path)
128
+ if (agent) return detectionForAgent(agent)
129
+
130
+ if ((await safely(src.codexWorkspaces, [])).includes(path)) {
131
+ return { type: 'codex', reason: 'Codex session history here' }
132
+ }
133
+
134
+ // Session history first, then the config directory: history means the CLI
135
+ // actually ran here, while `.claude/` can be committed by someone else. Note
136
+ // the history scan drops linked git worktrees, so a worktree is recognized
137
+ // by its `.claude/` directory or not at all.
138
+ if ((await safely(src.claudeCodeWorkspaces, [])).includes(path)) {
139
+ return { type: 'claude-code', reason: 'Claude Code session history here' }
140
+ }
141
+ if (src.hasClaudeConfigDir(path)) {
142
+ return { type: 'claude-code', reason: 'a .claude/ directory here' }
143
+ }
144
+
145
+ return null
146
+ }
147
+
148
+ // The agent/profile bound to a path for an explicitly chosen harness, so an
149
+ // overridden `moi init` still registers the provider metadata auto-detection
150
+ // would have found. Null for the directory-only harnesses, and for a provider
151
+ // that cannot confirm the path (gateway down, profile removed).
152
+ export async function agentBindingFor(
153
+ type: WorkspaceType,
154
+ workspacePath: string,
155
+ sources: Partial<DetectionSources> = {}
156
+ ): Promise<DetectedAgent | null> {
157
+ const src = { ...defaultSources, ...sources }
158
+ const path = resolve(workspacePath)
159
+
160
+ if (type === 'hermes') {
161
+ const profile = (await safely(src.hermesProfiles, [])).find(p => p.path === path)
162
+ return profile ? (detectionForProfile(profile).agent ?? null) : null
163
+ }
164
+ if (type === 'openclaw') {
165
+ const agent = (await safely(src.openclawAgents, [])).find(a => a.path === path)
166
+ return agent ? (detectionForAgent(agent).agent ?? null) : null
167
+ }
168
+ return null
169
+ }
@@ -1,4 +1,4 @@
1
- import { mkdir, rename, rm } from 'node:fs/promises'
1
+ import { mkdir, rename } from 'node:fs/promises'
2
2
  import { join } from 'path'
3
3
 
4
4
  import type { SessionConfig } from '@/lib/types'
@@ -22,15 +22,12 @@ export type SessionConfigPatch = {
22
22
  type Store = Record<string, Record<string, SessionConfig>>
23
23
 
24
24
  export const DEFAULT_SESSION_CONFIG_PATH = join(DATA_DIR, 'session-config.json')
25
- export const LEGACY_SESSION_CONFIG_PATH = join(DATA_DIR, 'thread-config.json')
26
25
 
27
26
  let storePath = DEFAULT_SESSION_CONFIG_PATH
28
- let legacyStorePath = LEGACY_SESSION_CONFIG_PATH
29
27
 
30
28
  // Test seam: point the store at a scratch file (mirrors registry.setRegistryPath).
31
- export function setSessionConfigPath(path: string, legacyPath?: string): void {
29
+ export function setSessionConfigPath(path: string): void {
32
30
  storePath = path
33
- legacyStorePath = legacyPath ?? join(path, '..', 'thread-config.json')
34
31
  }
35
32
 
36
33
  function clean(cfg: SessionConfig | undefined): SessionConfig {
@@ -62,14 +59,7 @@ async function writeStore(store: Store): Promise<void> {
62
59
  }
63
60
 
64
61
  async function readStore(): Promise<Store> {
65
- const current = await readStoreFile(storePath)
66
- if (current) return current
67
-
68
- const legacy = await readStoreFile(legacyStorePath)
69
- if (!legacy) return {}
70
- await writeStore(legacy)
71
- await rm(legacyStorePath, { force: true })
72
- return legacy
62
+ return (await readStoreFile(storePath)) ?? {}
73
63
  }
74
64
 
75
65
  // Serialize read-modify-write so concurrent save/rename calls can't clobber the