@dxos/shell 0.5.2-main.2408cc7 โ†’ 0.5.2-main.515eb77

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.
@@ -108,7 +108,7 @@ Check the top-level render call using <`+_e+">.")}return ve}}function Aa(q,ve){{
108
108
  * @author Feross Aboukhadijeh <https://feross.org>
109
109
  * @license MIT
110
110
  *)
111
- */var GC=lr(lg());globalThis.global=globalThis,globalThis.Buffer=GC.Buffer,globalThis.process=sg;var KC=lr(rg()),oc=lr(rg());KC.default,oc.callbackify;var St=oc.inspect;oc.promisify;var zs={exports:{}};zs.exports,function(e,n){var t=200,i="__lodash_hash_undefined__",r=800,a=16,o=9007199254740991,s="[object Arguments]",f="[object Array]",d="[object AsyncFunction]",c="[object Boolean]",u="[object Date]",h="[object Error]",p="[object Function]",g="[object GeneratorFunction]",b="[object Map]",w="[object Number]",_="[object Null]",k="[object Object]",E="[object Proxy]",S="[object RegExp]",T="[object Set]",O="[object String]",C="[object Undefined]",P="[object WeakMap]",F="[object ArrayBuffer]",B="[object DataView]",L="[object Float32Array]",N="[object Float64Array]",X="[object Int8Array]",Y="[object Int16Array]",ee="[object Int32Array]",re="[object Uint8Array]",fe="[object Uint8ClampedArray]",ce="[object Uint16Array]",oe="[object Uint32Array]",ye=/[\\^$.*+?()[\]{}|]/g,se=/^\[object .+?Constructor\]$/,G=/^(?:0|[1-9]\d*)$/,J={};J[L]=J[N]=J[X]=J[Y]=J[ee]=J[re]=J[fe]=J[ce]=J[oe]=!0,J[s]=J[f]=J[F]=J[c]=J[B]=J[u]=J[h]=J[p]=J[b]=J[w]=J[k]=J[S]=J[T]=J[O]=J[P]=!1;var ie=typeof mn=="object"&&mn&&mn.Object===Object&&mn,me=typeof self=="object"&&self&&self.Object===Object&&self,H=ie||me||Function("return this")(),K=n&&!n.nodeType&&n,j=K&&!0&&e&&!e.nodeType&&e,W=j&&j.exports===K,V=W&&ie.process,I=function(){try{var $=j&&j.require&&j.require("util").types;return $||V&&V.binding&&V.binding("util")}catch{}}(),M=I&&I.isTypedArray;function Z($,U,ne){switch(ne.length){case 0:return $.call(U);case 1:return $.call(U,ne[0]);case 2:return $.call(U,ne[0],ne[1]);case 3:return $.call(U,ne[0],ne[1],ne[2])}return $.apply(U,ne)}function te($,U){for(var ne=-1,pe=Array($);++ne<$;)pe[ne]=U(ne);return pe}function he($){return function(U){return $(U)}}function ge($,U){return $==null?void 0:$[U]}function ke($,U){return function(ne){return $(U(ne))}}var xe=Array.prototype,ae=Function.prototype,Ue=Object.prototype,an=H["__core-js_shared__"],Oe=ae.toString,He=Ue.hasOwnProperty,_n=function(){var $=/[^.]+$/.exec(an&&an.keys&&an.keys.IE_PROTO||"");return $?"Symbol(src)_1."+$:""}(),Ee=Ue.toString,ze=Oe.call(Object),y=RegExp("^"+Oe.call(He).replace(ye,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),v=W?H.Buffer:void 0,m=H.Symbol,x=H.Uint8Array,A=v?v.allocUnsafe:void 0,D=ke(Object.getPrototypeOf,Object),z=Object.create,be=Ue.propertyIsEnumerable,Fe=xe.splice,Ce=m?m.toStringTag:void 0,Ie=function(){try{var $=Go(Object,"defineProperty");return $({},"",{}),$}catch{}}(),Ae=v?v.isBuffer:void 0,wi=Math.max,$a=Date.now,Pt=Go(H,"Map"),ct=Go(Object,"create"),Er=function(){function $(){}return function(U){if(!ht(U))return{};if(z)return z(U);$.prototype=U;var ne=new $;return $.prototype=void 0,ne}}();function zn($){var U=-1,ne=$==null?0:$.length;for(this.clear();++U<ne;){var pe=$[U];this.set(pe[0],pe[1])}}function Ro(){this.__data__=ct?ct(null):{},this.size=0}function Ta($){var U=this.has($)&&delete this.__data__[$];return this.size-=U?1:0,U}function Uo($){var U=this.__data__;if(ct){var ne=U[$];return ne===i?void 0:ne}return He.call(U,$)?U[$]:void 0}function Aa($){var U=this.__data__;return ct?U[$]!==void 0:He.call(U,$)}function Oa($,U){var ne=this.__data__;return this.size+=this.has($)?0:1,ne[$]=ct&&U===void 0?i:U,this}zn.prototype.clear=Ro,zn.prototype.delete=Ta,zn.prototype.get=Uo,zn.prototype.has=Aa,zn.prototype.set=Oa;function Dn($){var U=-1,ne=$==null?0:$.length;for(this.clear();++U<ne;){var pe=$[U];this.set(pe[0],pe[1])}}function zo(){this.__data__=[],this.size=0}function Pa($){var U=this.__data__,ne=jn(U,$);if(ne<0)return!1;var pe=U.length-1;return ne==pe?U.pop():Fe.call(U,ne,1),--this.size,!0}function Wo($){var U=this.__data__,ne=jn(U,$);return ne<0?void 0:U[ne][1]}function Ho($){return jn(this.__data__,$)>-1}function Vo($,U){var ne=this.__data__,pe=jn(ne,$);return pe<0?(++this.size,ne.push([$,U])):ne[pe][1]=U,this}Dn.prototype.clear=zo,Dn.prototype.delete=Pa,Dn.prototype.get=Wo,Dn.prototype.has=Ho,Dn.prototype.set=Vo;function ut($){var U=-1,ne=$==null?0:$.length;for(this.clear();++U<ne;){var pe=$[U];this.set(pe[0],pe[1])}}function q(){this.size=0,this.__data__={hash:new zn,map:new(Pt||Dn),string:new zn}}function ve($){var U=Zi(this,$).delete($);return this.size-=U?1:0,U}function _e($){return Zi(this,$).get($)}function Ne($){return Zi(this,$).has($)}function ln($,U){var ne=Zi(this,$),pe=ne.size;return ne.set($,U),this.size+=ne.size==pe?0:1,this}ut.prototype.clear=q,ut.prototype.delete=ve,ut.prototype.get=_e,ut.prototype.has=Ne,ut.prototype.set=ln;function Je($){var U=this.__data__=new Dn($);this.size=U.size}function en(){this.__data__=new Dn,this.size=0}function Xe($){var U=this.__data__,ne=U.delete($);return this.size=U.size,ne}function Bn($){return this.__data__.get($)}function Cn($){return this.__data__.has($)}function An($,U){var ne=this.__data__;if(ne instanceof Dn){var pe=ne.__data__;if(!Pt||pe.length<t-1)return pe.push([$,U]),this.size=++ne.size,this;ne=this.__data__=new ut(pe)}return ne.set($,U),this.size=ne.size,this}Je.prototype.clear=en,Je.prototype.delete=Xe,Je.prototype.get=Bn,Je.prototype.has=Cn,Je.prototype.set=An;function it($,U){var ne=Tr($),pe=!ne&&$r($),Pe=!ne&&!pe&&Na($),$e=!ne&&!pe&&!Pe&&$l($),Le=ne||pe||Pe||$e,Be=Le?te($.length,String):[],nn=Be.length;for(var Wn in $)(U||He.call($,Wn))&&!(Le&&(Wn=="length"||Pe&&(Wn=="offset"||Wn=="parent")||$e&&(Wn=="buffer"||Wn=="byteLength"||Wn=="byteOffset")||kl(Wn,nn)))&&Be.push(Wn);return Be}function vt($,U,ne){(ne!==void 0&&!Qi($[U],ne)||ne===void 0&&!(U in $))&&Sr($,U,ne)}function Ia($,U,ne){var pe=$[U];(!(He.call($,U)&&Qi(pe,ne))||ne===void 0&&!(U in $))&&Sr($,U,ne)}function jn($,U){for(var ne=$.length;ne--;)if(Qi($[ne][0],U))return ne;return-1}function Sr($,U,ne){U=="__proto__"&&Ie?Ie($,U,{configurable:!0,enumerable:!0,value:ne,writable:!0}):$[U]=ne}var Oh=zh();function _i($){return $==null?$===void 0?C:_:Ce&&Ce in Object($)?Wh($):Gh($)}function qo($){return Ar($)&&_i($)==s}function Ph($){if(!ht($)||xl($))return!1;var U=Da($)?y:se;return U.test(Ma($))}function Ih($){return Ar($)&&ri($.length)&&!!J[_i($)]}function Fh($){if(!ht($))return qh($);var U=El($),ne=[];for(var pe in $)pe=="constructor"&&(U||!He.call($,pe))||ne.push(pe);return ne}function Fa($,U,ne,pe,Pe){$!==U&&Oh(U,function($e,Le){if(Pe||(Pe=new Je),ht($e))Mh($,U,Le,ne,Fa,pe,Pe);else{var Be=pe?pe(Yo($,Le),$e,Le+"",$,U,Pe):void 0;Be===void 0&&(Be=$e),vt($,Le,Be)}},Al)}function Mh($,U,ne,pe,Pe,$e,Le){var Be=Yo($,ne),nn=Yo(U,ne),Wn=Le.get(nn);if(Wn){vt($,ne,Wn);return}var Yn=$e?$e(Be,nn,ne+"",$,U,Le):void 0,ki=Yn===void 0;if(ki){var La=Tr(nn),Zh=!La&&Na(nn),K_=!La&&!Zh&&$l(nn);Yn=nn,La||Zh||K_?Tr(Be)?Yn=Be:Sl(Be)?Yn=jh(Be):Zh?(ki=!1,Yn=Dh(nn,!0)):K_?(ki=!1,Yn=Bh(nn,!0)):Yn=[]:Cl(nn)||$r(nn)?(Yn=Be,$r(Be)?Yn=Tl(Be):(!ht(Be)||Da(Be))&&(Yn=_l(nn))):ki=!1}ki&&(Le.set(nn,Yn),Pe(Yn,nn,pe,$e,Le),Le.delete(nn)),vt($,ne,Yn)}function wl($,U){return Kh(Ko($,U,R),$+"")}var Nh=Ie?function($,U){return Ie($,"toString",{configurable:!0,enumerable:!1,value:Xh(U),writable:!0})}:R;function Dh($,U){if(U)return $.slice();var ne=$.length,pe=A?A(ne):new $.constructor(ne);return $.copy(pe),pe}function Lh($){var U=new $.constructor($.byteLength);return new x(U).set(new x($)),U}function Bh($,U){var ne=U?Lh($.buffer):$.buffer;return new $.constructor(ne,$.byteOffset,$.length)}function jh($,U){var ne=-1,pe=$.length;for(U||(U=Array(pe));++ne<pe;)U[ne]=$[ne];return U}function Rh($,U,ne,pe){var Pe=!ne;ne||(ne={});for(var $e=-1,Le=U.length;++$e<Le;){var Be=U[$e],nn=pe?pe(ne[Be],$[Be],Be,ne,$):void 0;nn===void 0&&(nn=$[Be]),Pe?Sr(ne,Be,nn):Ia(ne,Be,nn)}return ne}function Uh($){return wl(function(U,ne){var pe=-1,Pe=ne.length,$e=Pe>1?ne[Pe-1]:void 0,Le=Pe>2?ne[2]:void 0;for($e=$.length>3&&typeof $e=="function"?(Pe--,$e):void 0,Le&&Hh(ne[0],ne[1],Le)&&($e=Pe<3?void 0:$e,Pe=1),U=Object(U);++pe<Pe;){var Be=ne[pe];Be&&$(U,Be,pe,$e)}return U})}function zh($){return function(U,ne,pe){for(var Pe=-1,$e=Object(U),Le=pe(U),Be=Le.length;Be--;){var nn=Le[$?Be:++Pe];if(ne($e[nn],nn,$e)===!1)break}return U}}function Cr($,U,ne,pe,Pe,$e){return ht($)&&ht(U)&&($e.set(U,$),Fa($,U,void 0,Cr,$e),$e.delete(U)),$}function Zi($,U){var ne=$.__data__;return Vh(U)?ne[typeof U=="string"?"string":"hash"]:ne.map}function Go($,U){var ne=ge($,U);return Ph(ne)?ne:void 0}function Wh($){var U=He.call($,Ce),ne=$[Ce];try{$[Ce]=void 0;var pe=!0}catch{}var Pe=Ee.call($);return pe&&(U?$[Ce]=ne:delete $[Ce]),Pe}function _l($){return typeof $.constructor=="function"&&!El($)?Er(D($)):{}}function kl($,U){var ne=typeof $;return U=U??o,!!U&&(ne=="number"||ne!="symbol"&&G.test($))&&$>-1&&$%1==0&&$<U}function Hh($,U,ne){if(!ht(ne))return!1;var pe=typeof U;return(pe=="number"?Jo(ne)&&kl(U,ne.length):pe=="string"&&U in ne)?Qi(ne[U],$):!1}function Vh($){var U=typeof $;return U=="string"||U=="number"||U=="symbol"||U=="boolean"?$!=="__proto__":$===null}function xl($){return!!_n&&_n in $}function El($){var U=$&&$.constructor,ne=typeof U=="function"&&U.prototype||Ue;return $===ne}function qh($){var U=[];if($!=null)for(var ne in Object($))U.push(ne);return U}function Gh($){return Ee.call($)}function Ko($,U,ne){return U=wi(U===void 0?$.length-1:U,0),function(){for(var pe=arguments,Pe=-1,$e=wi(pe.length-U,0),Le=Array($e);++Pe<$e;)Le[Pe]=pe[U+Pe];Pe=-1;for(var Be=Array(U+1);++Pe<U;)Be[Pe]=pe[Pe];return Be[U]=ne(Le),Z($,this,Be)}}function Yo($,U){if(!(U==="constructor"&&typeof $[U]=="function")&&U!="__proto__")return $[U]}var Kh=Yh(Nh);function Yh($){var U=0,ne=0;return function(){var pe=$a(),Pe=a-(pe-ne);if(ne=pe,Pe>0){if(++U>=r)return arguments[0]}else U=0;return $.apply(void 0,arguments)}}function Ma($){if($!=null){try{return Oe.call($)}catch{}try{return $+""}catch{}}return""}function Qi($,U){return $===U||$!==$&&U!==U}var $r=qo(function(){return arguments}())?qo:function($){return Ar($)&&He.call($,"callee")&&!be.call($,"callee")},Tr=Array.isArray;function Jo($){return $!=null&&ri($.length)&&!Da($)}function Sl($){return Ar($)&&Jo($)}var Na=Ae||Q;function Da($){if(!ht($))return!1;var U=_i($);return U==p||U==g||U==d||U==E}function ri($){return typeof $=="number"&&$>-1&&$%1==0&&$<=o}function ht($){var U=typeof $;return $!=null&&(U=="object"||U=="function")}function Ar($){return $!=null&&typeof $=="object"}function Cl($){if(!Ar($)||_i($)!=k)return!1;var U=D($);if(U===null)return!0;var ne=He.call(U,"constructor")&&U.constructor;return typeof ne=="function"&&ne instanceof ne&&Oe.call(ne)==ze}var $l=M?he(M):Ih;function Tl($){return Rh($,Al($))}var Jh=wl(function($){return $.push(void 0,Cr),Z(Ol,void 0,$)});function Al($){return Jo($)?it($,!0):Fh($)}var Ol=Uh(function($,U,ne,pe){Fa($,U,ne,pe)});function Xh($){return function(){return $}}function R($){return $}function Q(){return!1}e.exports=Jh}(zs,zs.exports);var YC=zs.exports;const JC=er(YC);var XC=lr(lg()),dg=XC.Buffer,io=(e,n,t)=>{if(e)return;if(n!=null&&n.startsWith("BUG"))debugger;let i="invariant violation";throw n&&(i+=`: ${n}`),t!=null&&t.A&&(i+=` [${t.A[0]}]`),t!=null&&t.F&&(i+=` at ${QC(t.F)}:${t.L}`),new ZC(i)},ZC=class extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}},QC=e=>{const n=e.match(/.+\/(packages\/.+\/.+)/);if(n){const[,t]=n;return t}return e},e$=sn({"node_modules/.pnpm/events@3.3.0/node_modules/events/events.js"(e,n){var t=typeof Reflect=="object"?Reflect:null,i=t&&typeof t.apply=="function"?t.apply:function(C,P,F){return Function.prototype.apply.call(C,P,F)},r;t&&typeof t.ownKeys=="function"?r=t.ownKeys:Object.getOwnPropertySymbols?r=function(C){return Object.getOwnPropertyNames(C).concat(Object.getOwnPropertySymbols(C))}:r=function(C){return Object.getOwnPropertyNames(C)};function a(O){console&&console.warn&&console.warn(O)}var o=Number.isNaN||function(C){return C!==C};function s(){s.init.call(this)}n.exports=s,n.exports.once=E,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var f=10;function d(O){if(typeof O!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof O)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return f},set:function(O){if(typeof O!="number"||O<0||o(O))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+O+".");f=O}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(C){if(typeof C!="number"||C<0||o(C))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+C+".");return this._maxListeners=C,this};function c(O){return O._maxListeners===void 0?s.defaultMaxListeners:O._maxListeners}s.prototype.getMaxListeners=function(){return c(this)},s.prototype.emit=function(C){for(var P=[],F=1;F<arguments.length;F++)P.push(arguments[F]);var B=C==="error",L=this._events;if(L!==void 0)B=B&&L.error===void 0;else if(!B)return!1;if(B){var N;if(P.length>0&&(N=P[0]),N instanceof Error)throw N;var X=new Error("Unhandled error."+(N?" ("+N.message+")":""));throw X.context=N,X}var Y=L[C];if(Y===void 0)return!1;if(typeof Y=="function")i(Y,this,P);else for(var ee=Y.length,re=w(Y,ee),F=0;F<ee;++F)i(re[F],this,P);return!0};function u(O,C,P,F){var B,L,N;if(d(P),L=O._events,L===void 0?(L=O._events=Object.create(null),O._eventsCount=0):(L.newListener!==void 0&&(O.emit("newListener",C,P.listener?P.listener:P),L=O._events),N=L[C]),N===void 0)N=L[C]=P,++O._eventsCount;else if(typeof N=="function"?N=L[C]=F?[P,N]:[N,P]:F?N.unshift(P):N.push(P),B=c(O),B>0&&N.length>B&&!N.warned){N.warned=!0;var X=new Error("Possible EventEmitter memory leak detected. "+N.length+" "+String(C)+" listeners added. Use emitter.setMaxListeners() to increase limit");X.name="MaxListenersExceededWarning",X.emitter=O,X.type=C,X.count=N.length,a(X)}return O}s.prototype.addListener=function(C,P){return u(this,C,P,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(C,P){return u(this,C,P,!0)};function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(O,C,P){var F={fired:!1,wrapFn:void 0,target:O,type:C,listener:P},B=h.bind(F);return B.listener=P,F.wrapFn=B,B}s.prototype.once=function(C,P){return d(P),this.on(C,p(this,C,P)),this},s.prototype.prependOnceListener=function(C,P){return d(P),this.prependListener(C,p(this,C,P)),this},s.prototype.removeListener=function(C,P){var F,B,L,N,X;if(d(P),B=this._events,B===void 0)return this;if(F=B[C],F===void 0)return this;if(F===P||F.listener===P)--this._eventsCount===0?this._events=Object.create(null):(delete B[C],B.removeListener&&this.emit("removeListener",C,F.listener||P));else if(typeof F!="function"){for(L=-1,N=F.length-1;N>=0;N--)if(F[N]===P||F[N].listener===P){X=F[N].listener,L=N;break}if(L<0)return this;L===0?F.shift():_(F,L),F.length===1&&(B[C]=F[0]),B.removeListener!==void 0&&this.emit("removeListener",C,X||P)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(C){var P,F,B;if(F=this._events,F===void 0)return this;if(F.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):F[C]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete F[C]),this;if(arguments.length===0){var L=Object.keys(F),N;for(B=0;B<L.length;++B)N=L[B],N!=="removeListener"&&this.removeAllListeners(N);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(P=F[C],typeof P=="function")this.removeListener(C,P);else if(P!==void 0)for(B=P.length-1;B>=0;B--)this.removeListener(C,P[B]);return this};function g(O,C,P){var F=O._events;if(F===void 0)return[];var B=F[C];return B===void 0?[]:typeof B=="function"?P?[B.listener||B]:[B]:P?k(B):w(B,B.length)}s.prototype.listeners=function(C){return g(this,C,!0)},s.prototype.rawListeners=function(C){return g(this,C,!1)},s.listenerCount=function(O,C){return typeof O.listenerCount=="function"?O.listenerCount(C):b.call(O,C)},s.prototype.listenerCount=b;function b(O){var C=this._events;if(C!==void 0){var P=C[O];if(typeof P=="function")return 1;if(P!==void 0)return P.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]};function w(O,C){for(var P=new Array(C),F=0;F<C;++F)P[F]=O[F];return P}function _(O,C){for(;C+1<O.length;C++)O[C]=O[C+1];O.pop()}function k(O){for(var C=new Array(O.length),P=0;P<C.length;++P)C[P]=O[P].listener||O[P];return C}function E(O,C){return new Promise(function(P,F){function B(N){O.removeListener(C,L),F(N)}function L(){typeof O.removeListener=="function"&&O.removeListener("error",B),P([].slice.call(arguments))}T(O,C,L,{once:!0}),C!=="error"&&S(O,B,{once:!0})})}function S(O,C,P){typeof O.on=="function"&&T(O,"error",C,P)}function T(O,C,P,F){if(typeof O.on=="function")F.once?O.once(C,P):O.on(C,P);else if(typeof O.addEventListener=="function")O.addEventListener(C,function B(L){F.once&&O.removeEventListener(C,B),P(L)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof O)}}}),cg=lr(e$());cg.EventEmitter,cg.EventEmitter;var Ws=e=>{const n=Object.getPrototypeOf(e).constructor.name;return e.toJSON?`${n}(${St(e.toJSON())})`:String(e)},ug=e=>{throw e},hg;(function(e){e[e.DEFAULT=0]="DEFAULT",e[e.VERBOSE=1]="VERBOSE",e[e.BOLD=2]="BOLD"})(hg||(hg={}));var n$=(e,n=8)=>{const t=String(e);return t.length<=n?t:t.slice(0,n)},Hs=Symbol.for("devtoolsFormatter"),t$=()=>{typeof window<"u"&&(window.devtoolsFormatters??(window.devtoolsFormatters=[])).push({header:(e,n)=>{const t=e[Hs];if(t===void 0)return null;if(typeof t!="object"||t===null||typeof t.header!="function")throw new Error(`Invalid devtools formatter for ${e.constructor.name}`);return t.header(n)},hasBody:(e,n)=>{const t=e[Hs];return!t||!t.hasBody?!1:t.hasBody(n)},body:(e,n)=>{const t=e[Hs];return!t||!t.body?null:t.body(n)}})};t$();var i$=Symbol.for("dxos.common.equals"),r$=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(n,t)=>(typeof require<"u"?require:n)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),sc="/home/runner/work/dxos/dxos/packages/common/keys/src/public-key.ts",a$=32,vg=class rt{static from(n){if(io(n,void 0,{F:sc,L:30,S:this,A:["source",""]}),n instanceof rt)return n;if(n instanceof Buffer)return new rt(new Uint8Array(n.buffer,n.byteOffset,n.byteLength));if(n instanceof Uint8Array)return new rt(n);if(n instanceof ArrayBuffer)return new rt(new Uint8Array(n));if(typeof n=="string")return rt.fromHex(n);if(n.asUint8Array)return new rt(n.asUint8Array());throw new TypeError(`Unable to create PublicKey from ${n}`)}static safeFrom(n){if(n)try{return rt.from(n)}catch{return}}static fromHex(n){n.startsWith("0x")&&(n=n.slice(2));const t=Buffer.from(n,"hex");return new rt(new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}static random(){return rt.from(o$(a$))}static*randomSequence(){for(let n=0;n<1e4;n++)yield rt.random();throw new Error("Too many keys requested")}static isPublicKey(n){return n instanceof rt}static assertValidPublicKey(n){if(!this.isPublicKey(n))throw new TypeError("Invalid PublicKey")}static equals(n,t){return rt.from(n).equals(t)}static bufferize(n){return io(typeof n=="string","Invalid type",{F:sc,L:129,S:this,A:["typeof str === 'string'","'Invalid type'"]}),Buffer.from(n,"hex")}static stringify(n){return n instanceof rt?n=n.asBuffer():n instanceof Uint8Array&&(n=Buffer.from(n.buffer,n.byteOffset,n.byteLength)),io(n instanceof Buffer,"Invalid type",{F:sc,L:148,S:this,A:["key instanceof Buffer","'Invalid type'"]}),n.toString("hex")}static hash(n){return n.toHex()}constructor(n){if(this._value=n,!(n instanceof Uint8Array))throw new TypeError(`Expected Uint8Array, got: ${n}`)}toString(){return this.toHex()}toJSON(){return this.toHex()}toJSONL(){return this.truncate()}get length(){return this._value.length}toHex(){return this.asBuffer().toString("hex")}truncate(n=void 0){return n$(this,n)}asBuffer(){return Buffer.from(this._value.buffer,this._value.byteOffset,this._value.byteLength)}asUint8Array(){return this._value}getInsecureHash(n){return Math.abs(this._value.reduce((t,i)=>t^i|0,0))%n}[St.custom](n,t){if(!t.colors||typeof process.stdout.hasColors!="function"||!process.stdout.hasColors())return`<PublicKey ${this.truncate()}>`;const i=o=>`\x1B[${o}m`,r=["red","green","yellow","blue","magenta","cyan","redBright","greenBright","yellowBright","blueBright","magentaBright","cyanBright","whiteBright"],a=r[this.getInsecureHash(r.length)];return`PublicKey(${i(St.colors[a][0])}${this.truncate()}${i(St.colors.reset[0])})`}get[Hs](){return{header:()=>{const n=["darkred","green","orange","blue","darkmagenta","darkcyan","red","green","orange","blue","magenta","darkcyan","black"],t=n[this.getInsecureHash(n.length)];return["span",{},["span",{},"PublicKey("],["span",{style:`color: ${t};`},this.truncate()],["span",{},")"]]}}}equals(n){const t=rt.from(n);if(this._value.length!==t._value.length)return!1;let i=!0;for(let r=0;r<this._value.length;r++)i&&(i=this._value[r]===t._value[r]);return i}[i$](n){return rt.isPublicKey(n)?this.equals(n):!1}},o$=e=>{const n=globalThis.crypto??r$("@dxos/node-std/crypto").webcrypto,t=new Uint8Array(e);return n.getRandomValues(t),t},pg=10;(class{constructor(e,n){if(this._projection=e,this._values=new Map,n)for(const t of n)this.add(t)}toString(){return Ws(this)}toJSON(){return this._values.size>pg?{size:this._values.size}:Array.from(this._values.values())}[St.custom](){return Ws(this)}add(e){return this._values.set(this._projection(e),e),this}clear(){this._values.clear()}delete(e){return this._values.delete(this._projection(e))}forEach(e,n){n&&(e=e.bind(n)),this._values.forEach(t=>e(t,t,this))}has(e){return this._values.has(this._projection(e))}get size(){return this._values.size}[Symbol.iterator](){return this._values.values()}*entries(){for(const e of this._values.values())yield[e,e]}keys(){return this[Symbol.iterator]()}values(){return this[Symbol.iterator]()}get[Symbol.toStringTag](){return"ComplexSet"}}),class Y_{constructor(n,t){if(this._keyProjection=n,this._keys=new Map,this._values=new Map,t)for(const[i,r]of t)this.set(i,r)}toString(){return Ws(this)}toJSON(){return this._values.size>pg?{size:this._values.size}:Array.from(this._values.values())}[St.custom](){return Ws(this)}clear(){this._keys.clear(),this._values.clear()}delete(n){const t=this._keys.delete(this._keyProjection(n)),i=this._values.delete(this._keyProjection(n));return t||i}forEach(n,t){t&&(n=n.bind(t)),this._keys.forEach((i,r)=>n(this._values.get(r)??ug(new Error("Map corrupted.")),i,this))}get(n){return this._values.get(this._keyProjection(n))}has(n){return this._keys.has(this._keyProjection(n))}set(n,t){const i=this._keyProjection(n);return this._keys.set(i,n),this._values.set(i,t),this}get size(){return this._keys.size}*[Symbol.iterator](){for(const[n,t]of this._keys){const i=this._values.get(n)??ug(new Error("Map corrupted."));yield[t,i]}}entries(){return this[Symbol.iterator]()}keys(){return this._keys.values()}values(){return this._values.values()}mapValues(n){return new Y_(this._keyProjection,[...this.entries()].map(([t,i])=>[t,n(i,t)]))}get[Symbol.toStringTag](){return"ComplexMap"}};var mg=["๐Ÿ‘น","๐Ÿ‘ป","๐Ÿ‘ฝ","๐Ÿค–","๐ŸŽƒ","๐Ÿฆพ","๐Ÿฆฟ","๐Ÿฆท","๐Ÿ‘ฃ","๐Ÿ‘๏ธ","๐Ÿงถ","๐Ÿ‘‘","๐Ÿ’","๐Ÿฆ†","๐Ÿฆ‰","๐Ÿด","๐Ÿฆ„","๐Ÿ","๐Ÿฆ‹","๐Ÿž","๐Ÿชฒ","๐Ÿข","๐ŸฆŽ","๐Ÿฆ•","๐Ÿฆ‘","๐Ÿฆ€","๐Ÿ ","๐Ÿฌ","๐Ÿ‹","๐Ÿฆญ","๐Ÿ…","๐Ÿ†","๐Ÿฆ“","๐Ÿฆ","๐Ÿฆง","๐Ÿ˜","๐Ÿซ","๐Ÿฆ’","๐Ÿฆ˜","๐Ÿฆฌ","๐Ÿ–","๐Ÿ","๐ŸฆŒ","๐Ÿ•","๐Ÿˆ","๐Ÿ“","๐Ÿฆš","๐Ÿฆœ","๐Ÿฆข","๐Ÿฆฉ","๐Ÿฆฆ","๐Ÿ","๐Ÿฟ๏ธ","๐ŸŒต","๐ŸŒฒ","๐ŸŒณ","๐Ÿชต","๐ŸŒฑ","๐Ÿ","๐Ÿชบ","๐Ÿ„","๐Ÿš","๐Ÿชธ","๐Ÿชจ","๐ŸŒพ","๐ŸŒท","๐ŸŒป","โ˜€๏ธ","๐ŸŒ™","๐Ÿช","โญ๏ธ","โšก๏ธ","โ˜„๏ธ","๐Ÿ”ฅ","๐ŸŒˆ","โ˜๏ธ","๐Ÿ’ง","โ›ฑ๏ธ","๐ŸŒŠ","๐ŸŽ","๐Ÿ‹","๐Ÿ‰","๐Ÿ‡","๐Ÿซ","๐Ÿˆ","๐Ÿ’","๐Ÿ‘","๐Ÿฅญ","๐Ÿ","๐Ÿฅฅ","๐Ÿฅ","๐Ÿฅ‘","๐ŸŒถ๏ธ","๐ŸŒฝ","๐Ÿฅ•","๐Ÿฌ","๐Ÿฅœ","๐Ÿซ–","โ˜•๏ธ","๐Ÿต","๐ŸงŠ","๐Ÿง‚","๐Ÿ”๏ธ","โš“๏ธ","๐Ÿ›Ÿ","๐Ÿ๏ธ","๐Ÿ›ถ","๐Ÿš€","๐Ÿ›ฐ๏ธ","โ›ฒ๏ธ","๐Ÿฐ","๐Ÿšฒ","โ›บ๏ธ","๐ŸŽ™๏ธ","๐Ÿงฒ","โš™๏ธ","๐Ÿ”ฉ","๐Ÿ”ฎ","๐Ÿ”ญ","๐Ÿ”ฌ","๐Ÿงฌ","๐ŸŒก๏ธ","๐Ÿงบ","๐Ÿ›Ž๏ธ","๐Ÿ”‘","๐Ÿช‘","๐Ÿงธ","๐ŸŽˆ","๐ŸŽ€","๐ŸŽŠ","โ™ป๏ธ","๐ŸŽต"],gg=["red","amber","lime","green","emerald","teal","cyan","violet","purple","fuchsia","pink","rose"],s$=e=>ro(e.toHex()),ro=e=>bg(parseInt(e,16)),bg=e=>mg[e%mg.length],f$=e=>yg(parseInt(e,16)),yg=e=>gg[e%gg.length],fc=e=>wg(e.toHex()),wg=e=>l$(parseInt(e,16)),l$=e=>({emoji:bg(e),hue:yg(e)}),d$=["ack","alabama","alanine","alaska","alpha","angel","apart","april","arizona","arkansas","artist","asparagus","aspen","august","autumn","avocado","bacon","bakerloo","batman","beer","berlin","beryllium","black","blossom","blue","bluebird","bravo","bulldog","burger","butter","california","carbon","cardinal","carolina","carpet","cat","ceiling","charlie","chicken","coffee","cola","cold","colorado","comet","connecticut","crazy","cup","dakota","december","delaware","delta","diet","don","double","early","earth","east","echo","edward","eight","eighteen","eleven","emma","enemy","equal","failed","fanta","fifteen","fillet","finch","fish","five","fix","floor","florida","football","four","fourteen","foxtrot","freddie","friend","fruit","gee","georgia","glucose","golf","green","grey","hamper","happy","harry","hawaii","helium","high","hot","hotel","hydrogen","idaho","illinois","india","indigo","ink","iowa","island","item","jersey","jig","johnny","juliet","july","jupiter","kansas","kentucky","kilo","king","kitten","lactose","lake","lamp","lemon","leopard","lima","lion","lithium","london","louisiana","low","magazine","magnesium","maine","mango","march","mars","maryland","massachusetts","may","mexico","michigan","mike","minnesota","mirror","mississippi","missouri","mobile","mockingbird","monkey","montana","moon","mountain","muppet","music","nebraska","neptune","network","nevada","nine","nineteen","nitrogen","north","november","nuts","october","ohio","oklahoma","one","orange","oranges","oregon","oscar","oven","oxygen","papa","paris","pasta","pennsylvania","pip","pizza","pluto","potato","princess","purple","quebec","queen","quiet","red","river","robert","robin","romeo","rugby","sad","salami","saturn","september","seven","seventeen","shade","sierra","single","sink","six","sixteen","skylark","snake","social","sodium","solar","south","spaghetti","speaker","spring","stairway","steak","stream","summer","sweet","table","tango","ten","tennessee","tennis","texas","thirteen","three","timing","triple","twelve","twenty","two","uncle","undress","uniform","uranus","utah","vegan","venus","vermont","victor","video","violet","virginia","washington","west","whiskey","white","william","winner","winter","wisconsin","wolfram","wyoming","xray","yankee","yellow","zebra","zulu"],c$=class{constructor(e=d$){if(this.wordlist=e,e.length!==256)throw new Error("Wordlist must have exactly 256 items");this.wordlist=e}humanize(e,n=4,t="-"){const i=e.match(/(..?)/g);if(!i)throw new Error("");const r=i.map(o=>parseInt(o,16));return this._compress(r,n).map(o=>this.wordlist[o]).join(t)}_compress(e,n){const t=e.length;if(n>t)throw new Error("Fewer input bytes than requested output");const i=t/n>>0,r=[];for(let o=0;o<i*n;o+=i)r.push(e.slice(o,o+i));return r[r.length-1]=r[r.length-1].concat(e.slice(n*i)),r.map(o=>o.reduce((s,f)=>s^f))}},u$=new c$,h$=e=>(e instanceof dg||e instanceof Uint8Array||e instanceof ArrayBuffer?e=vg.stringify(e):e instanceof vg&&(e=e.toHex()),u$.humanize(e)),v$=e=>dg.from(e.buffer,e.byteOffset,e.byteLength),p$=7,lc=(e,n=0,t=new WeakSet)=>{if(n>p$)return null;if(typeof e=="function")return null;if(typeof e=="object"&&e!==null){if(t.has(e))return null;t.add(e);try{if(e instanceof Uint8Array)return v$(e).toString("hex");if(Array.isArray(e))return e.map(i=>lc(i,n+1,t));if(typeof e.toJSONL=="function")return e.toJSONL();if(typeof e.toJSON=="function")return e.toJSON();{const i={};for(const r of Object.keys(e))i[r]=lc(e[r],n+1,t);return i}}finally{t.delete(e)}}else return e},m$=(e,n,t)=>{let i=e.get(n);return i===void 0&&(i=typeof t=="function"?t():t,e.set(n,i)),i},g$=()=>typeof navigator<"u"&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),dc=Symbol("instanceTag"),b$=e=>n=>{n.prototype[dc]=e,Object.defineProperty(n.prototype,Symbol.hasInstance,{value:t=>(t==null?void 0:t[dc])===e}),Object.defineProperty(n,Symbol.hasInstance,{value:t=>(t==null?void 0:t[dc])===e})},cc=Symbol.for("dxos.instance-contexts"),y$=globalThis[cc]??(globalThis[cc]=new WeakMap),w$=e=>{const n=Object.getPrototypeOf(e),t=m$(y$,n,()=>({nextId:0,instanceIds:new WeakMap}));let i=t.instanceIds.get(e);return i===void 0&&(i=t.nextId++,t.instanceIds.set(e,i)),i},_$=e=>e==null?"null":`${Object.getPrototypeOf(e).constructor.name}#${w$(e)}`;Symbol.dispose??(Symbol.dispose=Symbol("Symbol.dispose")),Symbol.asyncDispose??(Symbol.asyncDispose=Symbol("Symbol.asyncDispose"));var uc=()=>{throw new Error("Not available on this platform")},k$=()=>uc(),x$=()=>uc(),E$=()=>uc(),_g=sn({"node_modules/.pnpm/path-browserify@1.0.1/node_modules/path-browserify/index.js"(e,n){function t(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}function i(o,s){for(var f="",d=0,c=-1,u=0,h,p=0;p<=o.length;++p){if(p<o.length)h=o.charCodeAt(p);else{if(h===47)break;h=47}if(h===47){if(!(c===p-1||u===1))if(c!==p-1&&u===2){if(f.length<2||d!==2||f.charCodeAt(f.length-1)!==46||f.charCodeAt(f.length-2)!==46){if(f.length>2){var g=f.lastIndexOf("/");if(g!==f.length-1){g===-1?(f="",d=0):(f=f.slice(0,g),d=f.length-1-f.lastIndexOf("/")),c=p,u=0;continue}}else if(f.length===2||f.length===1){f="",d=0,c=p,u=0;continue}}s&&(f.length>0?f+="/..":f="..",d=2)}else f.length>0?f+="/"+o.slice(c+1,p):f=o.slice(c+1,p),d=p-c-1;c=p,u=0}else h===46&&u!==-1?++u:u=-1}return f}function r(o,s){var f=s.dir||s.root,d=s.base||(s.name||"")+(s.ext||"");return f?f===s.root?f+d:f+o+d:d}var a={resolve:function(){for(var s="",f=!1,d,c=arguments.length-1;c>=-1&&!f;c--){var u;c>=0?u=arguments[c]:(d===void 0&&(d=process.cwd()),u=d),t(u),u.length!==0&&(s=u+"/"+s,f=u.charCodeAt(0)===47)}return s=i(s,!f),f?s.length>0?"/"+s:"/":s.length>0?s:"."},normalize:function(s){if(t(s),s.length===0)return".";var f=s.charCodeAt(0)===47,d=s.charCodeAt(s.length-1)===47;return s=i(s,!f),s.length===0&&!f&&(s="."),s.length>0&&d&&(s+="/"),f?"/"+s:s},isAbsolute:function(s){return t(s),s.length>0&&s.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var s,f=0;f<arguments.length;++f){var d=arguments[f];t(d),d.length>0&&(s===void 0?s=d:s+="/"+d)}return s===void 0?".":a.normalize(s)},relative:function(s,f){if(t(s),t(f),s===f||(s=a.resolve(s),f=a.resolve(f),s===f))return"";for(var d=1;d<s.length&&s.charCodeAt(d)===47;++d);for(var c=s.length,u=c-d,h=1;h<f.length&&f.charCodeAt(h)===47;++h);for(var p=f.length,g=p-h,b=u<g?u:g,w=-1,_=0;_<=b;++_){if(_===b){if(g>b){if(f.charCodeAt(h+_)===47)return f.slice(h+_+1);if(_===0)return f.slice(h+_)}else u>b&&(s.charCodeAt(d+_)===47?w=_:_===0&&(w=0));break}var k=s.charCodeAt(d+_),E=f.charCodeAt(h+_);if(k!==E)break;k===47&&(w=_)}var S="";for(_=d+w+1;_<=c;++_)(_===c||s.charCodeAt(_)===47)&&(S.length===0?S+="..":S+="/..");return S.length>0?S+f.slice(h+w):(h+=w,f.charCodeAt(h)===47&&++h,f.slice(h))},_makeLong:function(s){return s},dirname:function(s){if(t(s),s.length===0)return".";for(var f=s.charCodeAt(0),d=f===47,c=-1,u=!0,h=s.length-1;h>=1;--h)if(f=s.charCodeAt(h),f===47){if(!u){c=h;break}}else u=!1;return c===-1?d?"/":".":d&&c===1?"//":s.slice(0,c)},basename:function(s,f){if(f!==void 0&&typeof f!="string")throw new TypeError('"ext" argument must be a string');t(s);var d=0,c=-1,u=!0,h;if(f!==void 0&&f.length>0&&f.length<=s.length){if(f.length===s.length&&f===s)return"";var p=f.length-1,g=-1;for(h=s.length-1;h>=0;--h){var b=s.charCodeAt(h);if(b===47){if(!u){d=h+1;break}}else g===-1&&(u=!1,g=h+1),p>=0&&(b===f.charCodeAt(p)?--p===-1&&(c=h):(p=-1,c=g))}return d===c?c=g:c===-1&&(c=s.length),s.slice(d,c)}else{for(h=s.length-1;h>=0;--h)if(s.charCodeAt(h)===47){if(!u){d=h+1;break}}else c===-1&&(u=!1,c=h+1);return c===-1?"":s.slice(d,c)}},extname:function(s){t(s);for(var f=-1,d=0,c=-1,u=!0,h=0,p=s.length-1;p>=0;--p){var g=s.charCodeAt(p);if(g===47){if(!u){d=p+1;break}continue}c===-1&&(u=!1,c=p+1),g===46?f===-1?f=p:h!==1&&(h=1):f!==-1&&(h=-1)}return f===-1||c===-1||h===0||h===1&&f===c-1&&f===d+1?"":s.slice(f,c)},format:function(s){if(s===null||typeof s!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof s);return r("/",s)},parse:function(s){t(s);var f={root:"",dir:"",base:"",ext:"",name:""};if(s.length===0)return f;var d=s.charCodeAt(0),c=d===47,u;c?(f.root="/",u=1):u=0;for(var h=-1,p=0,g=-1,b=!0,w=s.length-1,_=0;w>=u;--w){if(d=s.charCodeAt(w),d===47){if(!b){p=w+1;break}continue}g===-1&&(b=!1,g=w+1),d===46?h===-1?h=w:_!==1&&(_=1):h!==-1&&(_=-1)}return h===-1||g===-1||_===0||_===1&&h===g-1&&h===p+1?g!==-1&&(p===0&&c?f.base=f.name=s.slice(1,g):f.base=f.name=s.slice(p,g)):(p===0&&c?(f.name=s.slice(1,h),f.base=s.slice(1,g)):(f.name=s.slice(p,h),f.base=s.slice(p,g)),f.ext=s.slice(h,g)),p>0?f.dir=s.slice(0,p-1):c&&(f.dir="/"),f},sep:"/",delimiter:":",win32:null,posix:null};a.posix=a,n.exports=a}});lr(_g());var Jt=lr(_g());Jt.basename;var S$=Jt.dirname;Jt.extname,Jt.format,Jt.isAbsolute,Jt.join,Jt.normalize,Jt.parse,Jt.relative,Jt.resolve;var Pn;(function(e){e[e.TRACE=5]="TRACE",e[e.DEBUG=10]="DEBUG",e[e.INFO=11]="INFO",e[e.WARN=12]="WARN",e[e.ERROR=13]="ERROR"})(Pn||(Pn={}));var C$={trace:5,debug:10,info:11,warn:12,error:13},ao;(function(e){e.CONSOLE="console",e.BROWSER="browser",e.DEBUG="debug"})(ao||(ao={}));var $$=Symbol("logInfoProperties"),T$=e=>{if(!e)return{};const n={},i=Object.getPrototypeOf(e)[$$]??[];for(const r of i)try{n[r]=typeof e[r]=="function"?e[r]():e[r]}catch(a){n[r]=a.message}return n},A$=(e,n,t)=>n>=e.level&&(!e.pattern||t.includes(e.pattern)),hc=(e,n)=>n===void 0?!0:n.some(t=>{var i;return A$(t,e.level,((i=e.meta)==null?void 0:i.F)??"")}),vc=e=>{let n;if(e.meta){const i=T$(e.meta.S);Object.keys(i).length>0&&(n=Object.assign(n??{},i))}const t=typeof e.context=="function"?e.context():e.context;if(t)if(t instanceof Error){const i=t.context;n=Object.assign(n??{},{error:t.stack,...i})}else typeof t=="object"&&(n=Object.assign(n??{},t));if(e.error){const i=e.error.context;n=Object.assign(n??{},{error:e.error,...i})}return n&&Object.keys(n).length>0?n:void 0},O$=0,P$=e=>(n,t,i)=>(r,a,o)=>{const s=o.value,f=a;o.value=function(...d){const c={F:"",L:0,...i??{},S:this},u=d.map(h=>St(h,!1,1,!0)).join(", ");try{const h=performance.now(),p=s.apply(this,d);if(I$(p)){const g=O$++;N$(e,f,u,g,c),p.then(b=>{D$(e,f,b,g,h,c)},b=>{L$(e,f,b,g,h,c)})}else F$(e,f,u,p,c);return p}catch(h){throw M$(e,f,u,h,c),h}},Object.defineProperty(o.value,"name",{value:f+"$log"})},I$=e=>e&&typeof e.then=="function",F$=(e,n,t,i,r)=>{e.info(`.${Kr(n)} (${t}) ${Et.gray("resolve")} ${St(i,!1,1,!0)}`,{},r)},M$=(e,n,t,i,r)=>{e.error(`.${Kr(n)} (${t}) ๐Ÿ”ฅ ${i}`,{},r)},N$=(e,n,t,i,r)=>{e.info(`.${Kr(n)} โ†ด (${t}) ${Et.gray("=>")} ${Vs(i)}`,{},r)},D$=(e,n,t,i,r,a)=>{t!==void 0?e.info(`.${Kr(n)} โ†ฒ ${kg} ${Et.gray("resolve")} ${Vs(i)} ${pc(r)} ${Et.gray("=>")} ${St(t,!1,1,!0)}`,{},a):e.info(`.${Kr(n)} โ†ฒ ${kg} ${Et.gray("resolve")} ${Vs(i)} ${pc(r)}`,{},a)},L$=(e,n,t,i,r,a)=>{e.info(`.${Kr(n)} โ†ฒ ๐Ÿ”ฅ ${Et.gray("reject")} ${Vs(i)} ${pc(r)} ${Et.gray("=>")} ${t}`,{},a)},kg=Et.green("โœ”"),pc=e=>Et.gray(`${(performance.now()-e).toFixed(0)}ms`),B$=[220,220,170],Kr=e=>Et.bold(Et.rgb(...B$)(e)),Vs=e=>Et.blue(`Promise#${e}`),j$=e=>{let n;if(typeof localStorage>"u"?globalThis.localStorage_dxlog&&(n=globalThis.localStorage_dxlog):n=localStorage.getItem("dxlog")??void 0,!!n)try{return JSON.parse(n)}catch(t){console.info("can't parse dxlog config",t);return}},xg=()=>{},R$=(e,n)=>{console.log(St(n,!1,null,!0))},Eg=e=>{const n=e.match(/.+\/(packages\/.+\/.+)/);if(n){const[,t]=n;return t}return e},mc=typeof mochaExecutor<"u"?{useTestProcessor:!0,printFileLinks:!0}:{useTestProcessor:!1,printFileLinks:!1},U$=(e,n)=>{var d,c,u,h;if(!hc(n,e.filters))return;const t=e.prefix??"https://vscode.dev/github.com/dxos/dxos/blob/main/",i=[];let r="";if(n.meta){const p=Eg(n.meta.F);r=`${`${t.replace(/\/$/,"")}/${p}`}#L${n.meta.L}`}let a=[];if((d=n.meta)!=null&&d.S){const p=(c=n.meta)==null?void 0:c.S,g=p.name||_$(p),b=(u=n.meta.S)!=null&&u.hostSessionId?"[worker] ":"";a.push(`%c${b}${g}`,"color:#C026D3;font-weight:bold")}a.push(n.message);const o=vc(n);o&&a.push(o);const s={[Pn.ERROR]:console.error,[Pn.WARN]:console.warn,[Pn.DEBUG]:console.log};(mc.printFileLinks||g$())&&(i!=null&&i.length?a=[`%c${r}
111
+ */var GC=lr(lg());globalThis.global=globalThis,globalThis.Buffer=GC.Buffer,globalThis.process=sg;var KC=lr(rg()),oc=lr(rg());KC.default,oc.callbackify;var St=oc.inspect;oc.promisify;var zs={exports:{}};zs.exports,function(e,n){var t=200,i="__lodash_hash_undefined__",r=800,a=16,o=9007199254740991,s="[object Arguments]",f="[object Array]",d="[object AsyncFunction]",c="[object Boolean]",u="[object Date]",h="[object Error]",p="[object Function]",g="[object GeneratorFunction]",b="[object Map]",w="[object Number]",_="[object Null]",k="[object Object]",E="[object Proxy]",S="[object RegExp]",T="[object Set]",O="[object String]",C="[object Undefined]",P="[object WeakMap]",F="[object ArrayBuffer]",B="[object DataView]",L="[object Float32Array]",N="[object Float64Array]",X="[object Int8Array]",Y="[object Int16Array]",ee="[object Int32Array]",re="[object Uint8Array]",fe="[object Uint8ClampedArray]",ce="[object Uint16Array]",oe="[object Uint32Array]",ye=/[\\^$.*+?()[\]{}|]/g,se=/^\[object .+?Constructor\]$/,G=/^(?:0|[1-9]\d*)$/,J={};J[L]=J[N]=J[X]=J[Y]=J[ee]=J[re]=J[fe]=J[ce]=J[oe]=!0,J[s]=J[f]=J[F]=J[c]=J[B]=J[u]=J[h]=J[p]=J[b]=J[w]=J[k]=J[S]=J[T]=J[O]=J[P]=!1;var ie=typeof mn=="object"&&mn&&mn.Object===Object&&mn,me=typeof self=="object"&&self&&self.Object===Object&&self,H=ie||me||Function("return this")(),K=n&&!n.nodeType&&n,j=K&&!0&&e&&!e.nodeType&&e,W=j&&j.exports===K,V=W&&ie.process,I=function(){try{var $=j&&j.require&&j.require("util").types;return $||V&&V.binding&&V.binding("util")}catch{}}(),M=I&&I.isTypedArray;function Z($,U,ne){switch(ne.length){case 0:return $.call(U);case 1:return $.call(U,ne[0]);case 2:return $.call(U,ne[0],ne[1]);case 3:return $.call(U,ne[0],ne[1],ne[2])}return $.apply(U,ne)}function te($,U){for(var ne=-1,pe=Array($);++ne<$;)pe[ne]=U(ne);return pe}function he($){return function(U){return $(U)}}function ge($,U){return $==null?void 0:$[U]}function ke($,U){return function(ne){return $(U(ne))}}var xe=Array.prototype,ae=Function.prototype,Ue=Object.prototype,an=H["__core-js_shared__"],Oe=ae.toString,He=Ue.hasOwnProperty,_n=function(){var $=/[^.]+$/.exec(an&&an.keys&&an.keys.IE_PROTO||"");return $?"Symbol(src)_1."+$:""}(),Ee=Ue.toString,ze=Oe.call(Object),y=RegExp("^"+Oe.call(He).replace(ye,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),v=W?H.Buffer:void 0,m=H.Symbol,x=H.Uint8Array,A=v?v.allocUnsafe:void 0,D=ke(Object.getPrototypeOf,Object),z=Object.create,be=Ue.propertyIsEnumerable,Fe=xe.splice,Ce=m?m.toStringTag:void 0,Ie=function(){try{var $=Go(Object,"defineProperty");return $({},"",{}),$}catch{}}(),Ae=v?v.isBuffer:void 0,wi=Math.max,$a=Date.now,Pt=Go(H,"Map"),ct=Go(Object,"create"),Er=function(){function $(){}return function(U){if(!ht(U))return{};if(z)return z(U);$.prototype=U;var ne=new $;return $.prototype=void 0,ne}}();function zn($){var U=-1,ne=$==null?0:$.length;for(this.clear();++U<ne;){var pe=$[U];this.set(pe[0],pe[1])}}function Ro(){this.__data__=ct?ct(null):{},this.size=0}function Ta($){var U=this.has($)&&delete this.__data__[$];return this.size-=U?1:0,U}function Uo($){var U=this.__data__;if(ct){var ne=U[$];return ne===i?void 0:ne}return He.call(U,$)?U[$]:void 0}function Aa($){var U=this.__data__;return ct?U[$]!==void 0:He.call(U,$)}function Oa($,U){var ne=this.__data__;return this.size+=this.has($)?0:1,ne[$]=ct&&U===void 0?i:U,this}zn.prototype.clear=Ro,zn.prototype.delete=Ta,zn.prototype.get=Uo,zn.prototype.has=Aa,zn.prototype.set=Oa;function Dn($){var U=-1,ne=$==null?0:$.length;for(this.clear();++U<ne;){var pe=$[U];this.set(pe[0],pe[1])}}function zo(){this.__data__=[],this.size=0}function Pa($){var U=this.__data__,ne=jn(U,$);if(ne<0)return!1;var pe=U.length-1;return ne==pe?U.pop():Fe.call(U,ne,1),--this.size,!0}function Wo($){var U=this.__data__,ne=jn(U,$);return ne<0?void 0:U[ne][1]}function Ho($){return jn(this.__data__,$)>-1}function Vo($,U){var ne=this.__data__,pe=jn(ne,$);return pe<0?(++this.size,ne.push([$,U])):ne[pe][1]=U,this}Dn.prototype.clear=zo,Dn.prototype.delete=Pa,Dn.prototype.get=Wo,Dn.prototype.has=Ho,Dn.prototype.set=Vo;function ut($){var U=-1,ne=$==null?0:$.length;for(this.clear();++U<ne;){var pe=$[U];this.set(pe[0],pe[1])}}function q(){this.size=0,this.__data__={hash:new zn,map:new(Pt||Dn),string:new zn}}function ve($){var U=Zi(this,$).delete($);return this.size-=U?1:0,U}function _e($){return Zi(this,$).get($)}function Ne($){return Zi(this,$).has($)}function ln($,U){var ne=Zi(this,$),pe=ne.size;return ne.set($,U),this.size+=ne.size==pe?0:1,this}ut.prototype.clear=q,ut.prototype.delete=ve,ut.prototype.get=_e,ut.prototype.has=Ne,ut.prototype.set=ln;function Je($){var U=this.__data__=new Dn($);this.size=U.size}function en(){this.__data__=new Dn,this.size=0}function Xe($){var U=this.__data__,ne=U.delete($);return this.size=U.size,ne}function Bn($){return this.__data__.get($)}function Cn($){return this.__data__.has($)}function An($,U){var ne=this.__data__;if(ne instanceof Dn){var pe=ne.__data__;if(!Pt||pe.length<t-1)return pe.push([$,U]),this.size=++ne.size,this;ne=this.__data__=new ut(pe)}return ne.set($,U),this.size=ne.size,this}Je.prototype.clear=en,Je.prototype.delete=Xe,Je.prototype.get=Bn,Je.prototype.has=Cn,Je.prototype.set=An;function it($,U){var ne=Tr($),pe=!ne&&$r($),Pe=!ne&&!pe&&Na($),$e=!ne&&!pe&&!Pe&&$l($),Le=ne||pe||Pe||$e,Be=Le?te($.length,String):[],nn=Be.length;for(var Wn in $)(U||He.call($,Wn))&&!(Le&&(Wn=="length"||Pe&&(Wn=="offset"||Wn=="parent")||$e&&(Wn=="buffer"||Wn=="byteLength"||Wn=="byteOffset")||kl(Wn,nn)))&&Be.push(Wn);return Be}function vt($,U,ne){(ne!==void 0&&!Qi($[U],ne)||ne===void 0&&!(U in $))&&Sr($,U,ne)}function Ia($,U,ne){var pe=$[U];(!(He.call($,U)&&Qi(pe,ne))||ne===void 0&&!(U in $))&&Sr($,U,ne)}function jn($,U){for(var ne=$.length;ne--;)if(Qi($[ne][0],U))return ne;return-1}function Sr($,U,ne){U=="__proto__"&&Ie?Ie($,U,{configurable:!0,enumerable:!0,value:ne,writable:!0}):$[U]=ne}var Oh=zh();function _i($){return $==null?$===void 0?C:_:Ce&&Ce in Object($)?Wh($):Gh($)}function qo($){return Ar($)&&_i($)==s}function Ph($){if(!ht($)||xl($))return!1;var U=Da($)?y:se;return U.test(Ma($))}function Ih($){return Ar($)&&ri($.length)&&!!J[_i($)]}function Fh($){if(!ht($))return qh($);var U=El($),ne=[];for(var pe in $)pe=="constructor"&&(U||!He.call($,pe))||ne.push(pe);return ne}function Fa($,U,ne,pe,Pe){$!==U&&Oh(U,function($e,Le){if(Pe||(Pe=new Je),ht($e))Mh($,U,Le,ne,Fa,pe,Pe);else{var Be=pe?pe(Yo($,Le),$e,Le+"",$,U,Pe):void 0;Be===void 0&&(Be=$e),vt($,Le,Be)}},Al)}function Mh($,U,ne,pe,Pe,$e,Le){var Be=Yo($,ne),nn=Yo(U,ne),Wn=Le.get(nn);if(Wn){vt($,ne,Wn);return}var Yn=$e?$e(Be,nn,ne+"",$,U,Le):void 0,ki=Yn===void 0;if(ki){var La=Tr(nn),Zh=!La&&Na(nn),K_=!La&&!Zh&&$l(nn);Yn=nn,La||Zh||K_?Tr(Be)?Yn=Be:Sl(Be)?Yn=jh(Be):Zh?(ki=!1,Yn=Dh(nn,!0)):K_?(ki=!1,Yn=Bh(nn,!0)):Yn=[]:Cl(nn)||$r(nn)?(Yn=Be,$r(Be)?Yn=Tl(Be):(!ht(Be)||Da(Be))&&(Yn=_l(nn))):ki=!1}ki&&(Le.set(nn,Yn),Pe(Yn,nn,pe,$e,Le),Le.delete(nn)),vt($,ne,Yn)}function wl($,U){return Kh(Ko($,U,R),$+"")}var Nh=Ie?function($,U){return Ie($,"toString",{configurable:!0,enumerable:!1,value:Xh(U),writable:!0})}:R;function Dh($,U){if(U)return $.slice();var ne=$.length,pe=A?A(ne):new $.constructor(ne);return $.copy(pe),pe}function Lh($){var U=new $.constructor($.byteLength);return new x(U).set(new x($)),U}function Bh($,U){var ne=U?Lh($.buffer):$.buffer;return new $.constructor(ne,$.byteOffset,$.length)}function jh($,U){var ne=-1,pe=$.length;for(U||(U=Array(pe));++ne<pe;)U[ne]=$[ne];return U}function Rh($,U,ne,pe){var Pe=!ne;ne||(ne={});for(var $e=-1,Le=U.length;++$e<Le;){var Be=U[$e],nn=pe?pe(ne[Be],$[Be],Be,ne,$):void 0;nn===void 0&&(nn=$[Be]),Pe?Sr(ne,Be,nn):Ia(ne,Be,nn)}return ne}function Uh($){return wl(function(U,ne){var pe=-1,Pe=ne.length,$e=Pe>1?ne[Pe-1]:void 0,Le=Pe>2?ne[2]:void 0;for($e=$.length>3&&typeof $e=="function"?(Pe--,$e):void 0,Le&&Hh(ne[0],ne[1],Le)&&($e=Pe<3?void 0:$e,Pe=1),U=Object(U);++pe<Pe;){var Be=ne[pe];Be&&$(U,Be,pe,$e)}return U})}function zh($){return function(U,ne,pe){for(var Pe=-1,$e=Object(U),Le=pe(U),Be=Le.length;Be--;){var nn=Le[$?Be:++Pe];if(ne($e[nn],nn,$e)===!1)break}return U}}function Cr($,U,ne,pe,Pe,$e){return ht($)&&ht(U)&&($e.set(U,$),Fa($,U,void 0,Cr,$e),$e.delete(U)),$}function Zi($,U){var ne=$.__data__;return Vh(U)?ne[typeof U=="string"?"string":"hash"]:ne.map}function Go($,U){var ne=ge($,U);return Ph(ne)?ne:void 0}function Wh($){var U=He.call($,Ce),ne=$[Ce];try{$[Ce]=void 0;var pe=!0}catch{}var Pe=Ee.call($);return pe&&(U?$[Ce]=ne:delete $[Ce]),Pe}function _l($){return typeof $.constructor=="function"&&!El($)?Er(D($)):{}}function kl($,U){var ne=typeof $;return U=U??o,!!U&&(ne=="number"||ne!="symbol"&&G.test($))&&$>-1&&$%1==0&&$<U}function Hh($,U,ne){if(!ht(ne))return!1;var pe=typeof U;return(pe=="number"?Jo(ne)&&kl(U,ne.length):pe=="string"&&U in ne)?Qi(ne[U],$):!1}function Vh($){var U=typeof $;return U=="string"||U=="number"||U=="symbol"||U=="boolean"?$!=="__proto__":$===null}function xl($){return!!_n&&_n in $}function El($){var U=$&&$.constructor,ne=typeof U=="function"&&U.prototype||Ue;return $===ne}function qh($){var U=[];if($!=null)for(var ne in Object($))U.push(ne);return U}function Gh($){return Ee.call($)}function Ko($,U,ne){return U=wi(U===void 0?$.length-1:U,0),function(){for(var pe=arguments,Pe=-1,$e=wi(pe.length-U,0),Le=Array($e);++Pe<$e;)Le[Pe]=pe[U+Pe];Pe=-1;for(var Be=Array(U+1);++Pe<U;)Be[Pe]=pe[Pe];return Be[U]=ne(Le),Z($,this,Be)}}function Yo($,U){if(!(U==="constructor"&&typeof $[U]=="function")&&U!="__proto__")return $[U]}var Kh=Yh(Nh);function Yh($){var U=0,ne=0;return function(){var pe=$a(),Pe=a-(pe-ne);if(ne=pe,Pe>0){if(++U>=r)return arguments[0]}else U=0;return $.apply(void 0,arguments)}}function Ma($){if($!=null){try{return Oe.call($)}catch{}try{return $+""}catch{}}return""}function Qi($,U){return $===U||$!==$&&U!==U}var $r=qo(function(){return arguments}())?qo:function($){return Ar($)&&He.call($,"callee")&&!be.call($,"callee")},Tr=Array.isArray;function Jo($){return $!=null&&ri($.length)&&!Da($)}function Sl($){return Ar($)&&Jo($)}var Na=Ae||Q;function Da($){if(!ht($))return!1;var U=_i($);return U==p||U==g||U==d||U==E}function ri($){return typeof $=="number"&&$>-1&&$%1==0&&$<=o}function ht($){var U=typeof $;return $!=null&&(U=="object"||U=="function")}function Ar($){return $!=null&&typeof $=="object"}function Cl($){if(!Ar($)||_i($)!=k)return!1;var U=D($);if(U===null)return!0;var ne=He.call(U,"constructor")&&U.constructor;return typeof ne=="function"&&ne instanceof ne&&Oe.call(ne)==ze}var $l=M?he(M):Ih;function Tl($){return Rh($,Al($))}var Jh=wl(function($){return $.push(void 0,Cr),Z(Ol,void 0,$)});function Al($){return Jo($)?it($,!0):Fh($)}var Ol=Uh(function($,U,ne,pe){Fa($,U,ne,pe)});function Xh($){return function(){return $}}function R($){return $}function Q(){return!1}e.exports=Jh}(zs,zs.exports);var YC=zs.exports;const JC=er(YC);var XC=lr(lg()),dg=XC.Buffer,io=(e,n,t)=>{if(e)return;if(n!=null&&n.startsWith("BUG"))debugger;let i="invariant violation";throw n&&(i+=`: ${n}`),t!=null&&t.A&&(i+=` [${t.A[0]}]`),t!=null&&t.F&&(i+=` at ${QC(t.F)}:${t.L}`),new ZC(i)},ZC=class extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}},QC=e=>{const n=e.match(/.+\/(packages\/.+\/.+)/);if(n){const[,t]=n;return t}return e},e$=sn({"node_modules/.pnpm/events@3.3.0/node_modules/events/events.js"(e,n){var t=typeof Reflect=="object"?Reflect:null,i=t&&typeof t.apply=="function"?t.apply:function(C,P,F){return Function.prototype.apply.call(C,P,F)},r;t&&typeof t.ownKeys=="function"?r=t.ownKeys:Object.getOwnPropertySymbols?r=function(C){return Object.getOwnPropertyNames(C).concat(Object.getOwnPropertySymbols(C))}:r=function(C){return Object.getOwnPropertyNames(C)};function a(O){console&&console.warn&&console.warn(O)}var o=Number.isNaN||function(C){return C!==C};function s(){s.init.call(this)}n.exports=s,n.exports.once=E,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var f=10;function d(O){if(typeof O!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof O)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return f},set:function(O){if(typeof O!="number"||O<0||o(O))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+O+".");f=O}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(C){if(typeof C!="number"||C<0||o(C))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+C+".");return this._maxListeners=C,this};function c(O){return O._maxListeners===void 0?s.defaultMaxListeners:O._maxListeners}s.prototype.getMaxListeners=function(){return c(this)},s.prototype.emit=function(C){for(var P=[],F=1;F<arguments.length;F++)P.push(arguments[F]);var B=C==="error",L=this._events;if(L!==void 0)B=B&&L.error===void 0;else if(!B)return!1;if(B){var N;if(P.length>0&&(N=P[0]),N instanceof Error)throw N;var X=new Error("Unhandled error."+(N?" ("+N.message+")":""));throw X.context=N,X}var Y=L[C];if(Y===void 0)return!1;if(typeof Y=="function")i(Y,this,P);else for(var ee=Y.length,re=w(Y,ee),F=0;F<ee;++F)i(re[F],this,P);return!0};function u(O,C,P,F){var B,L,N;if(d(P),L=O._events,L===void 0?(L=O._events=Object.create(null),O._eventsCount=0):(L.newListener!==void 0&&(O.emit("newListener",C,P.listener?P.listener:P),L=O._events),N=L[C]),N===void 0)N=L[C]=P,++O._eventsCount;else if(typeof N=="function"?N=L[C]=F?[P,N]:[N,P]:F?N.unshift(P):N.push(P),B=c(O),B>0&&N.length>B&&!N.warned){N.warned=!0;var X=new Error("Possible EventEmitter memory leak detected. "+N.length+" "+String(C)+" listeners added. Use emitter.setMaxListeners() to increase limit");X.name="MaxListenersExceededWarning",X.emitter=O,X.type=C,X.count=N.length,a(X)}return O}s.prototype.addListener=function(C,P){return u(this,C,P,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(C,P){return u(this,C,P,!0)};function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(O,C,P){var F={fired:!1,wrapFn:void 0,target:O,type:C,listener:P},B=h.bind(F);return B.listener=P,F.wrapFn=B,B}s.prototype.once=function(C,P){return d(P),this.on(C,p(this,C,P)),this},s.prototype.prependOnceListener=function(C,P){return d(P),this.prependListener(C,p(this,C,P)),this},s.prototype.removeListener=function(C,P){var F,B,L,N,X;if(d(P),B=this._events,B===void 0)return this;if(F=B[C],F===void 0)return this;if(F===P||F.listener===P)--this._eventsCount===0?this._events=Object.create(null):(delete B[C],B.removeListener&&this.emit("removeListener",C,F.listener||P));else if(typeof F!="function"){for(L=-1,N=F.length-1;N>=0;N--)if(F[N]===P||F[N].listener===P){X=F[N].listener,L=N;break}if(L<0)return this;L===0?F.shift():_(F,L),F.length===1&&(B[C]=F[0]),B.removeListener!==void 0&&this.emit("removeListener",C,X||P)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(C){var P,F,B;if(F=this._events,F===void 0)return this;if(F.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):F[C]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete F[C]),this;if(arguments.length===0){var L=Object.keys(F),N;for(B=0;B<L.length;++B)N=L[B],N!=="removeListener"&&this.removeAllListeners(N);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(P=F[C],typeof P=="function")this.removeListener(C,P);else if(P!==void 0)for(B=P.length-1;B>=0;B--)this.removeListener(C,P[B]);return this};function g(O,C,P){var F=O._events;if(F===void 0)return[];var B=F[C];return B===void 0?[]:typeof B=="function"?P?[B.listener||B]:[B]:P?k(B):w(B,B.length)}s.prototype.listeners=function(C){return g(this,C,!0)},s.prototype.rawListeners=function(C){return g(this,C,!1)},s.listenerCount=function(O,C){return typeof O.listenerCount=="function"?O.listenerCount(C):b.call(O,C)},s.prototype.listenerCount=b;function b(O){var C=this._events;if(C!==void 0){var P=C[O];if(typeof P=="function")return 1;if(P!==void 0)return P.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]};function w(O,C){for(var P=new Array(C),F=0;F<C;++F)P[F]=O[F];return P}function _(O,C){for(;C+1<O.length;C++)O[C]=O[C+1];O.pop()}function k(O){for(var C=new Array(O.length),P=0;P<C.length;++P)C[P]=O[P].listener||O[P];return C}function E(O,C){return new Promise(function(P,F){function B(N){O.removeListener(C,L),F(N)}function L(){typeof O.removeListener=="function"&&O.removeListener("error",B),P([].slice.call(arguments))}T(O,C,L,{once:!0}),C!=="error"&&S(O,B,{once:!0})})}function S(O,C,P){typeof O.on=="function"&&T(O,"error",C,P)}function T(O,C,P,F){if(typeof O.on=="function")F.once?O.once(C,P):O.on(C,P);else if(typeof O.addEventListener=="function")O.addEventListener(C,function B(L){F.once&&O.removeEventListener(C,B),P(L)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof O)}}}),cg=lr(e$());cg.EventEmitter,cg.EventEmitter;var Ws=e=>{const n=Object.getPrototypeOf(e).constructor.name;return e.toJSON?`${n}(${St(e.toJSON())})`:String(e)},ug=e=>{throw e},hg;(function(e){e[e.DEFAULT=0]="DEFAULT",e[e.VERBOSE=1]="VERBOSE",e[e.BOLD=2]="BOLD"})(hg||(hg={}));var n$=(e,n=8)=>{const t=String(e);return t.length<=n?t:t.slice(0,n)},Hs=Symbol.for("devtoolsFormatter"),t$=()=>{typeof window<"u"&&(window.devtoolsFormatters??(window.devtoolsFormatters=[])).push({header:(e,n)=>{const t=e[Hs];if(t===void 0)return null;if(typeof t!="object"||t===null||typeof t.header!="function")throw new Error(`Invalid devtools formatter for ${e.constructor.name}`);return t.header(n)},hasBody:(e,n)=>{const t=e[Hs];return!t||!t.hasBody?!1:t.hasBody(n)},body:(e,n)=>{const t=e[Hs];return!t||!t.body?null:t.body(n)}})};t$();var i$=Symbol.for("dxos.common.equals"),r$=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(n,t)=>(typeof require<"u"?require:n)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),sc="/home/runner/work/dxos/dxos/packages/common/keys/src/public-key.ts",a$=32,vg=class rt{static from(n){if(io(n,void 0,{F:sc,L:30,S:this,A:["source",""]}),n instanceof rt)return n;if(n instanceof Buffer)return new rt(new Uint8Array(n.buffer,n.byteOffset,n.byteLength));if(n instanceof Uint8Array)return new rt(n);if(n instanceof ArrayBuffer)return new rt(new Uint8Array(n));if(typeof n=="string")return rt.fromHex(n);if(n.asUint8Array)return new rt(n.asUint8Array());throw new TypeError(`Unable to create PublicKey from ${n}`)}static safeFrom(n){if(n)try{return rt.from(n)}catch{return}}static fromHex(n){n.startsWith("0x")&&(n=n.slice(2));const t=Buffer.from(n,"hex");return new rt(new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}static random(){return rt.from(o$(a$))}static*randomSequence(){for(let n=0;n<1e4;n++)yield rt.random();throw new Error("Too many keys requested")}static isPublicKey(n){return n instanceof rt}static assertValidPublicKey(n){if(!this.isPublicKey(n))throw new TypeError("Invalid PublicKey")}static equals(n,t){return rt.from(n).equals(t)}static bufferize(n){return io(typeof n=="string","Invalid type",{F:sc,L:129,S:this,A:["typeof str === 'string'","'Invalid type'"]}),Buffer.from(n,"hex")}static stringify(n){return n instanceof rt?n=n.asBuffer():n instanceof Uint8Array&&(n=Buffer.from(n.buffer,n.byteOffset,n.byteLength)),io(n instanceof Buffer,"Invalid type",{F:sc,L:148,S:this,A:["key instanceof Buffer","'Invalid type'"]}),n.toString("hex")}static hash(n){return n.toHex()}constructor(n){if(this._value=n,!(n instanceof Uint8Array))throw new TypeError(`Expected Uint8Array, got: ${n}`)}toString(){return this.toHex()}toJSON(){return this.toHex()}toJSONL(){return this.truncate()}get length(){return this._value.length}toHex(){return this.asBuffer().toString("hex")}truncate(n=void 0){return n$(this,n)}asBuffer(){return Buffer.from(this._value.buffer,this._value.byteOffset,this._value.byteLength)}asUint8Array(){return this._value}getInsecureHash(n){return Math.abs(this._value.reduce((t,i)=>t^i|0,0))%n}[St.custom](n,t){if(!t.colors||typeof process.stdout.hasColors!="function"||!process.stdout.hasColors())return`<PublicKey ${this.truncate()}>`;const i=o=>`\x1B[${o}m`,r=["red","green","yellow","blue","magenta","cyan","redBright","greenBright","yellowBright","blueBright","magentaBright","cyanBright","whiteBright"],a=r[this.getInsecureHash(r.length)];return`PublicKey(${i(St.colors[a][0])}${this.truncate()}${i(St.colors.reset[0])})`}get[Hs](){return{header:()=>{const n=["darkred","green","orange","blue","darkmagenta","darkcyan","red","green","orange","blue","magenta","darkcyan","black"],t=n[this.getInsecureHash(n.length)];return["span",{},["span",{},"PublicKey("],["span",{style:`color: ${t};`},this.truncate()],["span",{},")"]]}}}equals(n){const t=rt.from(n);if(this._value.length!==t._value.length)return!1;let i=!0;for(let r=0;r<this._value.length;r++)i&&(i=this._value[r]===t._value[r]);return i}[i$](n){return rt.isPublicKey(n)?this.equals(n):!1}},o$=e=>{const n=globalThis.crypto??r$("@dxos/node-std/crypto").webcrypto,t=new Uint8Array(e);return n.getRandomValues(t),t},pg=10;(class{constructor(e,n){if(this._projection=e,this._values=new Map,n)for(const t of n)this.add(t)}toString(){return Ws(this)}toJSON(){return this._values.size>pg?{size:this._values.size}:Array.from(this._values.values())}[St.custom](){return Ws(this)}add(e){return this._values.set(this._projection(e),e),this}clear(){this._values.clear()}delete(e){return this._values.delete(this._projection(e))}forEach(e,n){n&&(e=e.bind(n)),this._values.forEach(t=>e(t,t,this))}has(e){return this._values.has(this._projection(e))}get size(){return this._values.size}[Symbol.iterator](){return this._values.values()}*entries(){for(const e of this._values.values())yield[e,e]}keys(){return this[Symbol.iterator]()}values(){return this[Symbol.iterator]()}get[Symbol.toStringTag](){return"ComplexSet"}}),class Y_{constructor(n,t){if(this._keyProjection=n,this._keys=new Map,this._values=new Map,t)for(const[i,r]of t)this.set(i,r)}toString(){return Ws(this)}toJSON(){return this._values.size>pg?{size:this._values.size}:Array.from(this._values.values())}[St.custom](){return Ws(this)}clear(){this._keys.clear(),this._values.clear()}delete(n){const t=this._keys.delete(this._keyProjection(n)),i=this._values.delete(this._keyProjection(n));return t||i}forEach(n,t){t&&(n=n.bind(t)),this._keys.forEach((i,r)=>n(this._values.get(r)??ug(new Error("Map corrupted.")),i,this))}get(n){return this._values.get(this._keyProjection(n))}has(n){return this._keys.has(this._keyProjection(n))}set(n,t){const i=this._keyProjection(n);return this._keys.set(i,n),this._values.set(i,t),this}get size(){return this._keys.size}*[Symbol.iterator](){for(const[n,t]of this._keys){const i=this._values.get(n)??ug(new Error("Map corrupted."));yield[t,i]}}entries(){return this[Symbol.iterator]()}keys(){return this._keys.values()}values(){return this._values.values()}mapValues(n){return new Y_(this._keyProjection,[...this.entries()].map(([t,i])=>[t,n(i,t)]))}get[Symbol.toStringTag](){return"ComplexMap"}};var mg=["๐Ÿ‘น","๐Ÿ‘ป","๐Ÿ‘ฝ","๐Ÿค–","๐ŸŽƒ","๐Ÿฆพ","๐Ÿฆฟ","๐Ÿฆท","๐Ÿ‘ฃ","๐Ÿ‘๏ธ","๐Ÿงถ","๐Ÿ‘‘","๐Ÿ’","๐Ÿฆ†","๐Ÿฆ‰","๐Ÿด","๐Ÿฆ„","๐Ÿ","๐Ÿฆ‹","๐Ÿž","๐Ÿชฒ","๐Ÿข","๐ŸฆŽ","๐Ÿฆ•","๐Ÿฆ‘","๐Ÿฆ€","๐Ÿ ","๐Ÿฌ","๐Ÿ‹","๐Ÿฆญ","๐Ÿ…","๐Ÿ†","๐Ÿฆ“","๐Ÿฆ","๐Ÿฆง","๐Ÿ˜","๐Ÿซ","๐Ÿฆ’","๐Ÿฆ˜","๐Ÿฆฌ","๐Ÿ–","๐Ÿ","๐ŸฆŒ","๐Ÿ•","๐Ÿˆ","๐Ÿ“","๐Ÿฆš","๐Ÿฆœ","๐Ÿฆข","๐Ÿฆฉ","๐Ÿฆฆ","๐Ÿ","๐Ÿฟ๏ธ","๐ŸŒต","๐ŸŒฒ","๐ŸŒณ","๐Ÿชต","๐ŸŒฑ","๐Ÿ","๐Ÿชบ","๐Ÿ„","๐Ÿš","๐Ÿชธ","๐Ÿชจ","๐ŸŒพ","๐ŸŒท","๐ŸŒป","โ˜€๏ธ","๐ŸŒ™","๐Ÿช","โญ๏ธ","โšก๏ธ","โ˜„๏ธ","๐Ÿ”ฅ","๐ŸŒˆ","โ˜๏ธ","๐Ÿ’ง","โ›ฑ๏ธ","๐ŸŒŠ","๐ŸŽ","๐Ÿ‹","๐Ÿ‰","๐Ÿ‡","๐Ÿซ","๐Ÿˆ","๐Ÿ’","๐Ÿ‘","๐Ÿฅญ","๐Ÿ","๐Ÿฅฅ","๐Ÿฅ","๐Ÿฅ‘","๐ŸŒถ๏ธ","๐ŸŒฝ","๐Ÿฅ•","๐Ÿฌ","๐Ÿฅœ","๐Ÿซ–","โ˜•๏ธ","๐Ÿต","๐ŸงŠ","๐Ÿง‚","๐Ÿ”๏ธ","โš“๏ธ","๐Ÿ›Ÿ","๐Ÿ๏ธ","๐Ÿ›ถ","๐Ÿš€","๐Ÿ›ฐ๏ธ","โ›ฒ๏ธ","๐Ÿฐ","๐Ÿšฒ","โ›บ๏ธ","๐ŸŽ™๏ธ","๐Ÿงฒ","โš™๏ธ","๐Ÿ”ฉ","๐Ÿ”ฎ","๐Ÿ”ญ","๐Ÿ”ฌ","๐Ÿงฌ","๐ŸŒก๏ธ","๐Ÿงบ","๐Ÿ›Ž๏ธ","๐Ÿ”‘","๐Ÿช‘","๐Ÿงธ","๐ŸŽˆ","๐ŸŽ€","๐ŸŽŠ","โ™ป๏ธ","๐ŸŽต"],gg=["red","amber","lime","green","emerald","teal","cyan","violet","purple","fuchsia","pink","rose"],s$=e=>ro(e.toHex()),ro=e=>bg(parseInt(e,16)),bg=e=>mg[e%mg.length],f$=e=>yg(parseInt(e,16)),yg=e=>gg[e%gg.length],fc=e=>wg(e.toHex()),wg=e=>l$(parseInt(e,16)),l$=e=>({emoji:bg(e),hue:yg(e)}),d$=["ack","alabama","alanine","alaska","alpha","angel","apart","april","arizona","arkansas","artist","asparagus","aspen","august","autumn","avocado","bacon","bakerloo","batman","beer","berlin","beryllium","black","blossom","blue","bluebird","bravo","bulldog","burger","butter","california","carbon","cardinal","carolina","carpet","cat","ceiling","charlie","chicken","coffee","cola","cold","colorado","comet","connecticut","crazy","cup","dakota","december","delaware","delta","diet","don","double","early","earth","east","echo","edward","eight","eighteen","eleven","emma","enemy","equal","failed","fanta","fifteen","fillet","finch","fish","five","fix","floor","florida","football","four","fourteen","foxtrot","freddie","friend","fruit","gee","georgia","glucose","golf","green","grey","hamper","happy","harry","hawaii","helium","high","hot","hotel","hydrogen","idaho","illinois","india","indigo","ink","iowa","island","item","jersey","jig","johnny","juliet","july","jupiter","kansas","kentucky","kilo","king","kitten","lactose","lake","lamp","lemon","leopard","lima","lion","lithium","london","louisiana","low","magazine","magnesium","maine","mango","march","mars","maryland","massachusetts","may","mexico","michigan","mike","minnesota","mirror","mississippi","missouri","mobile","mockingbird","monkey","montana","moon","mountain","muppet","music","nebraska","neptune","network","nevada","nine","nineteen","nitrogen","north","november","nuts","october","ohio","oklahoma","one","orange","oranges","oregon","oscar","oven","oxygen","papa","paris","pasta","pennsylvania","pip","pizza","pluto","potato","princess","purple","quebec","queen","quiet","red","river","robert","robin","romeo","rugby","sad","salami","saturn","september","seven","seventeen","shade","sierra","single","sink","six","sixteen","skylark","snake","social","sodium","solar","south","spaghetti","speaker","spring","stairway","steak","stream","summer","sweet","table","tango","ten","tennessee","tennis","texas","thirteen","three","timing","triple","twelve","twenty","two","uncle","undress","uniform","uranus","utah","vegan","venus","vermont","victor","video","violet","virginia","washington","west","whiskey","white","william","winner","winter","wisconsin","wolfram","wyoming","xray","yankee","yellow","zebra","zulu"],c$=class{constructor(e=d$){if(this.wordlist=e,e.length!==256)throw new Error("Wordlist must have exactly 256 items");this.wordlist=e}humanize(e,n=4,t="-"){const i=e.match(/(..?)/g);if(!i)throw new Error("");const r=i.map(o=>parseInt(o,16));return this._compress(r,n).map(o=>this.wordlist[o]).join(t)}_compress(e,n){const t=e.length;if(n>t)throw new Error("Fewer input bytes than requested output");const i=t/n>>0,r=[];for(let o=0;o<i*n;o+=i)r.push(e.slice(o,o+i));return r[r.length-1]=r[r.length-1].concat(e.slice(n*i)),r.map(o=>o.reduce((s,f)=>s^f))}},u$=new c$,h$=e=>(e instanceof dg||e instanceof Uint8Array||e instanceof ArrayBuffer?e=vg.stringify(e):e instanceof vg&&(e=e.toHex()),u$.humanize(e)),v$=e=>dg.from(e.buffer,e.byteOffset,e.byteLength),p$=7,lc=(e,n=0,t=new WeakSet)=>{if(n>p$)return null;if(typeof e=="function")return null;if(typeof e=="object"&&e!==null){if(t.has(e))return null;t.add(e);try{if(e instanceof Uint8Array)return v$(e).toString("hex");if(Array.isArray(e))return e.map(i=>lc(i,n+1,t));if(typeof e.toJSONL=="function")return e.toJSONL();if(typeof e.toJSON=="function")return e.toJSON();{const i={};for(const r of Object.keys(e))i[r]=lc(e[r],n+1,t);return i}}finally{t.delete(e)}}else return e},m$=(e,n,t)=>{let i=e.get(n);return i===void 0&&(i=typeof t=="function"?t():t,e.set(n,i)),i},g$=()=>typeof navigator<"u"&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),dc=Symbol("instanceTag"),b$=e=>n=>{n.prototype[dc]=e,Object.defineProperty(n.prototype,Symbol.hasInstance,{value:t=>(t==null?void 0:t[dc])===e}),Object.defineProperty(n,Symbol.hasInstance,{value:t=>(t==null?void 0:t[dc])===e})},cc=Symbol.for("dxos.instance-contexts"),y$=globalThis[cc]??(globalThis[cc]=new WeakMap),w$=e=>{const n=Object.getPrototypeOf(e),t=m$(y$,n,()=>({nextId:0,instanceIds:new WeakMap}));let i=t.instanceIds.get(e);return i===void 0&&(i=t.nextId++,t.instanceIds.set(e,i)),i},_$=e=>e==null?"null":`${Object.getPrototypeOf(e).constructor.name}#${w$(e)}`;Symbol.dispose??(Symbol.dispose=Symbol("Symbol.dispose")),Symbol.asyncDispose??(Symbol.asyncDispose=Symbol("Symbol.asyncDispose"));var uc=()=>{throw new Error("Not available on this platform")},k$=()=>uc(),x$=()=>uc(),E$=()=>uc(),_g=sn({"node_modules/.pnpm/path-browserify@1.0.1/node_modules/path-browserify/index.js"(e,n){function t(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}function i(o,s){for(var f="",d=0,c=-1,u=0,h,p=0;p<=o.length;++p){if(p<o.length)h=o.charCodeAt(p);else{if(h===47)break;h=47}if(h===47){if(!(c===p-1||u===1))if(c!==p-1&&u===2){if(f.length<2||d!==2||f.charCodeAt(f.length-1)!==46||f.charCodeAt(f.length-2)!==46){if(f.length>2){var g=f.lastIndexOf("/");if(g!==f.length-1){g===-1?(f="",d=0):(f=f.slice(0,g),d=f.length-1-f.lastIndexOf("/")),c=p,u=0;continue}}else if(f.length===2||f.length===1){f="",d=0,c=p,u=0;continue}}s&&(f.length>0?f+="/..":f="..",d=2)}else f.length>0?f+="/"+o.slice(c+1,p):f=o.slice(c+1,p),d=p-c-1;c=p,u=0}else h===46&&u!==-1?++u:u=-1}return f}function r(o,s){var f=s.dir||s.root,d=s.base||(s.name||"")+(s.ext||"");return f?f===s.root?f+d:f+o+d:d}var a={resolve:function(){for(var s="",f=!1,d,c=arguments.length-1;c>=-1&&!f;c--){var u;c>=0?u=arguments[c]:(d===void 0&&(d=process.cwd()),u=d),t(u),u.length!==0&&(s=u+"/"+s,f=u.charCodeAt(0)===47)}return s=i(s,!f),f?s.length>0?"/"+s:"/":s.length>0?s:"."},normalize:function(s){if(t(s),s.length===0)return".";var f=s.charCodeAt(0)===47,d=s.charCodeAt(s.length-1)===47;return s=i(s,!f),s.length===0&&!f&&(s="."),s.length>0&&d&&(s+="/"),f?"/"+s:s},isAbsolute:function(s){return t(s),s.length>0&&s.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var s,f=0;f<arguments.length;++f){var d=arguments[f];t(d),d.length>0&&(s===void 0?s=d:s+="/"+d)}return s===void 0?".":a.normalize(s)},relative:function(s,f){if(t(s),t(f),s===f||(s=a.resolve(s),f=a.resolve(f),s===f))return"";for(var d=1;d<s.length&&s.charCodeAt(d)===47;++d);for(var c=s.length,u=c-d,h=1;h<f.length&&f.charCodeAt(h)===47;++h);for(var p=f.length,g=p-h,b=u<g?u:g,w=-1,_=0;_<=b;++_){if(_===b){if(g>b){if(f.charCodeAt(h+_)===47)return f.slice(h+_+1);if(_===0)return f.slice(h+_)}else u>b&&(s.charCodeAt(d+_)===47?w=_:_===0&&(w=0));break}var k=s.charCodeAt(d+_),E=f.charCodeAt(h+_);if(k!==E)break;k===47&&(w=_)}var S="";for(_=d+w+1;_<=c;++_)(_===c||s.charCodeAt(_)===47)&&(S.length===0?S+="..":S+="/..");return S.length>0?S+f.slice(h+w):(h+=w,f.charCodeAt(h)===47&&++h,f.slice(h))},_makeLong:function(s){return s},dirname:function(s){if(t(s),s.length===0)return".";for(var f=s.charCodeAt(0),d=f===47,c=-1,u=!0,h=s.length-1;h>=1;--h)if(f=s.charCodeAt(h),f===47){if(!u){c=h;break}}else u=!1;return c===-1?d?"/":".":d&&c===1?"//":s.slice(0,c)},basename:function(s,f){if(f!==void 0&&typeof f!="string")throw new TypeError('"ext" argument must be a string');t(s);var d=0,c=-1,u=!0,h;if(f!==void 0&&f.length>0&&f.length<=s.length){if(f.length===s.length&&f===s)return"";var p=f.length-1,g=-1;for(h=s.length-1;h>=0;--h){var b=s.charCodeAt(h);if(b===47){if(!u){d=h+1;break}}else g===-1&&(u=!1,g=h+1),p>=0&&(b===f.charCodeAt(p)?--p===-1&&(c=h):(p=-1,c=g))}return d===c?c=g:c===-1&&(c=s.length),s.slice(d,c)}else{for(h=s.length-1;h>=0;--h)if(s.charCodeAt(h)===47){if(!u){d=h+1;break}}else c===-1&&(u=!1,c=h+1);return c===-1?"":s.slice(d,c)}},extname:function(s){t(s);for(var f=-1,d=0,c=-1,u=!0,h=0,p=s.length-1;p>=0;--p){var g=s.charCodeAt(p);if(g===47){if(!u){d=p+1;break}continue}c===-1&&(u=!1,c=p+1),g===46?f===-1?f=p:h!==1&&(h=1):f!==-1&&(h=-1)}return f===-1||c===-1||h===0||h===1&&f===c-1&&f===d+1?"":s.slice(f,c)},format:function(s){if(s===null||typeof s!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof s);return r("/",s)},parse:function(s){t(s);var f={root:"",dir:"",base:"",ext:"",name:""};if(s.length===0)return f;var d=s.charCodeAt(0),c=d===47,u;c?(f.root="/",u=1):u=0;for(var h=-1,p=0,g=-1,b=!0,w=s.length-1,_=0;w>=u;--w){if(d=s.charCodeAt(w),d===47){if(!b){p=w+1;break}continue}g===-1&&(b=!1,g=w+1),d===46?h===-1?h=w:_!==1&&(_=1):h!==-1&&(_=-1)}return h===-1||g===-1||_===0||_===1&&h===g-1&&h===p+1?g!==-1&&(p===0&&c?f.base=f.name=s.slice(1,g):f.base=f.name=s.slice(p,g)):(p===0&&c?(f.name=s.slice(1,h),f.base=s.slice(1,g)):(f.name=s.slice(p,h),f.base=s.slice(p,g)),f.ext=s.slice(h,g)),p>0?f.dir=s.slice(0,p-1):c&&(f.dir="/"),f},sep:"/",delimiter:":",win32:null,posix:null};a.posix=a,n.exports=a}});lr(_g());var Jt=lr(_g());Jt.basename;var S$=Jt.dirname;Jt.extname,Jt.format,Jt.isAbsolute,Jt.join,Jt.normalize,Jt.parse,Jt.relative,Jt.resolve;var Pn;(function(e){e[e.TRACE=5]="TRACE",e[e.DEBUG=10]="DEBUG",e[e.INFO=11]="INFO",e[e.WARN=12]="WARN",e[e.ERROR=13]="ERROR"})(Pn||(Pn={}));var C$={trace:5,debug:10,info:11,warn:12,error:13},ao;(function(e){e.CONSOLE="console",e.BROWSER="browser",e.DEBUG="debug"})(ao||(ao={}));var $$=Symbol("logInfoProperties"),T$=e=>{if(!e)return{};const n={},i=Object.getPrototypeOf(e)[$$]??[];for(const r of i)try{n[r]=typeof e[r]=="function"?e[r]():e[r]}catch(a){n[r]=a.message}return n},A$=(e,n,t)=>n>=e.level&&(!e.pattern||t.includes(e.pattern)),hc=(e,n)=>n===void 0?!0:n.some(t=>{var i;return A$(t,e.level,((i=e.meta)==null?void 0:i.F)??"")}),vc=e=>{let n;if(e.meta){const i=T$(e.meta.S);Object.keys(i).length>0&&(n=Object.assign(n??{},i))}const t=typeof e.context=="function"?e.context():e.context;if(t)if(t instanceof Error){const i=t.context;n=Object.assign(n??{},{error:t.stack,...i})}else typeof t=="object"&&(n=Object.assign(n??{},t));if(e.error){const i=e.error.context;n=Object.assign(n??{},{error:e.error,...i})}return n&&Object.keys(n).length>0?n:void 0},O$=0,P$=e=>(n,t,i)=>(r,a,o)=>{const s=o.value,f=a;o.value=function(...d){const c={F:"",L:0,...i??{},S:this},u=d.map(h=>St(h,!1,1,!0)).join(", ");try{const h=performance.now(),p=s.apply(this,d);if(I$(p)){const g=O$++;N$(e,f,u,g,c),p.then(b=>{D$(e,f,b,g,h,c)},b=>{L$(e,f,b,g,h,c)})}else F$(e,f,u,p,c);return p}catch(h){throw M$(e,f,u,h,c),h}},Object.defineProperty(o.value,"name",{value:f+"$log"})},I$=e=>e&&typeof e.then=="function",F$=(e,n,t,i,r)=>{e.info(`.${Kr(n)} (${t}) ${Et.gray("=>")} ${St(i,!1,1,!0)}`,{},r)},M$=(e,n,t,i,r)=>{e.error(`.${Kr(n)} (${t}) ๐Ÿ”ฅ ${i}`,{},r)},N$=(e,n,t,i,r)=>{e.info(`.${Kr(n)} โ†ด (${t}) ${Et.gray("=>")} ${Vs(i)}`,{},r)},D$=(e,n,t,i,r,a)=>{t!==void 0?e.info(`.${Kr(n)} โ†ฒ ${kg} ${Et.gray("resolve")} ${Vs(i)} ${pc(r)} ${Et.gray("=>")} ${St(t,!1,1,!0)}`,{},a):e.info(`.${Kr(n)} โ†ฒ ${kg} ${Et.gray("resolve")} ${Vs(i)} ${pc(r)}`,{},a)},L$=(e,n,t,i,r,a)=>{e.info(`.${Kr(n)} โ†ฒ ๐Ÿ”ฅ ${Et.gray("reject")} ${Vs(i)} ${pc(r)} ${Et.gray("=>")} ${t}`,{},a)},kg=Et.green("โœ”"),pc=e=>Et.gray(`${(performance.now()-e).toFixed(0)}ms`),B$=[220,220,170],Kr=e=>Et.bold(Et.rgb(...B$)(e)),Vs=e=>Et.blue(`Promise#${e}`),j$=e=>{let n;if(typeof localStorage>"u"?globalThis.localStorage_dxlog&&(n=globalThis.localStorage_dxlog):n=localStorage.getItem("dxlog")??void 0,!!n)try{return JSON.parse(n)}catch(t){console.info("can't parse dxlog config",t);return}},xg=()=>{},R$=(e,n)=>{console.log(St(n,!1,null,!0))},Eg=e=>{const n=e.match(/.+\/(packages\/.+\/.+)/);if(n){const[,t]=n;return t}return e},mc=typeof mochaExecutor<"u"?{useTestProcessor:!0,printFileLinks:!0}:{useTestProcessor:!1,printFileLinks:!1},U$=(e,n)=>{var d,c,u,h;if(!hc(n,e.filters))return;const t=e.prefix??"https://vscode.dev/github.com/dxos/dxos/blob/main/",i=[];let r="";if(n.meta){const p=Eg(n.meta.F);r=`${`${t.replace(/\/$/,"")}/${p}`}#L${n.meta.L}`}let a=[];if((d=n.meta)!=null&&d.S){const p=(c=n.meta)==null?void 0:c.S,g=p.name||_$(p),b=(u=n.meta.S)!=null&&u.hostSessionId?"[worker] ":"";a.push(`%c${b}${g}`,"color:#C026D3;font-weight:bold")}a.push(n.message);const o=vc(n);o&&a.push(o);const s={[Pn.ERROR]:console.error,[Pn.WARN]:console.warn,[Pn.DEBUG]:console.log};(mc.printFileLinks||g$())&&(i!=null&&i.length?a=[`%c${r}
112
112
  %c${a.join(" ")}`,...i]:a=[r+`
113
113
  `,...a]);const f=s[n.level]??console.log;typeof((h=n.meta)==null?void 0:h.C)=="function"?n.meta.C(f,a):f(...a)},z$=(e,n)=>{var f,d,c;if(!hc(n,e.filters))return;let t="";n.meta&&(t=`${Eg(n.meta.F)}:${n.meta.L}`);let i=[];const r=(d=(f=n.meta)==null?void 0:f.S)!=null&&d.hostSessionId?"[worker] ":"";i.push(`${r}${n.message}`);const a=vc(n);a&&i.push(a);const o={[Pn.ERROR]:console.error,[Pn.WARN]:console.warn,[Pn.DEBUG]:console.log};mc.printFileLinks&&(i=[t,...i]);const s=o[n.level]??console.log;typeof((c=n.meta)==null?void 0:c.C)=="function"?n.meta.C(s,i):s(...i)},Sg=mc.useTestProcessor?z$:U$,W$=e=>{const n=e.match(/.+\/(packages\/.+\/.+)/);if(n){const[,t]=n;return t}return e},Cg=1e3,H$=({pathOrFd:e,levels:n,filters:t})=>{let i;return(r,a)=>{if(n.length>0&&!n.includes(a.level)||!hc(a,t))return;if(typeof e=="number")i=e;else{try{x$(S$(e))}catch{}i=E$()}const o={...a,timestamp:Date.now(),...a.meta?{meta:{file:W$(a.meta.F),line:a.meta.L}}:{},context:lc(vc(a))};let s=0;for(;;)try{return k$(i,JSON.stringify(o)+`
114
114
  `)}catch(f){if(f.code!=="EAGAIN")throw f;if(s===0)s=performance.now();else if(performance.now()-s>Cg)throw console.log(`could not write after ${Cg}ms of EAGAIN failures, giving up`),f}}},$g,V$=()=>($g??($g=process.env.LOG_FILE??(process.env.HOME?`${process.env.HOME}/.dxlog/${new Date().toISOString()}.log`:void 0)),$g);H$({pathOrFd:V$(),levels:[Pn.ERROR,Pn.WARN,Pn.INFO,Pn.TRACE]});var q$={[ao.CONSOLE]:xg,[ao.BROWSER]:Sg,[ao.DEBUG]:R$},G$=typeof window<"u"||typeof navigator<"u",gc=[G$?Sg:xg],Tg=e=>{if(typeof e=="number")return[{level:e}];const n=(i,r=Pn.WARN)=>C$[i.toLowerCase()]??r;return(typeof e=="string"?e.split(/,\s*/):e).map(i=>{const[r,a]=i.split(":");return a?{level:n(a),pattern:r}:{level:n(r)}})},Ag=e=>{const n="process"in globalThis?{file:process.env.LOG_CONFIG,filter:process.env.LOG_FILTER,processor:process.env.LOG_PROCESSOR}:void 0,t=JC({},j$(n==null?void 0:n.file),n,e);return{options:t,filters:Tg(t.filter??Pn.INFO),captureFilters:Tg(t.captureFilter??Pn.WARN),processors:t.processor?[q$[t.processor]]:gc,prefix:t.prefix}},K$=()=>{const e=(...t)=>n(Pn.DEBUG,...t);e._config=Ag(),Object.defineProperty(e,"runtimeConfig",{get:()=>e._config}),e.addProcessor=t=>{gc.filter(i=>i===t).length===0&&gc.push(t),e._config.processors.filter(i=>i===t).length===0&&e._config.processors.push(t)},e.config=t=>{e._config=Ag(t)},e.trace=(...t)=>n(Pn.TRACE,...t),e.debug=(...t)=>n(Pn.DEBUG,...t),e.info=(...t)=>n(Pn.INFO,...t),e.warn=(...t)=>n(Pn.WARN,...t),e.error=(...t)=>n(Pn.ERROR,...t),e.catch=(t,i,r)=>n(Pn.ERROR,t.message,i,r,t),e.break=()=>e.info("โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”"),e.stack=(t,i,r)=>n(Pn.INFO,`${t??"Stack Dump"}