Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dappworks/urpc

Package Overview
Dependencies
Maintainers
0
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dappworks/urpc - npm Package Compare versions

Comparing version 0.0.59 to 0.0.60

2

dist/index.js

@@ -1,1 +0,1 @@

var BQ=Object.create;var{defineProperty:oZ,getPrototypeOf:YQ,getOwnPropertyNames:WQ}=Object;var KQ=Object.prototype.hasOwnProperty;var s=(Z,$,Q)=>{Q=Z!=null?BQ(YQ(Z)):{};const J=$||!Z||!Z.__esModule?oZ(Q,"default",{value:Z,enumerable:!0}):Q;for(let U of WQ(Z))if(!KQ.call(J,U))oZ(J,U,{get:()=>Z[U],enumerable:!0});return J};var PZ=(Z,$)=>()=>($||Z(($={exports:{}}).exports,$),$.exports);var DZ=PZ(($J,W$)=>{var SQ=function(Z,$){return Z==null?void 0:Z[$]},VQ=function(Z){var $=!1;if(Z!=null&&typeof Z.toString!="function")try{$=!!(Z+"")}catch(Q){}return $},I=function(Z){var $=-1,Q=Z?Z.length:0;this.clear();while(++$<Q){var J=Z[$];this.set(J[0],J[1])}},fQ=function(){this.__data__=h?h(null):{}},mQ=function(Z){return this.has(Z)&&delete this.__data__[Z]},dQ=function(Z){var $=this.__data__;if(h){var Q=$[Z];return Q===Z$?void 0:Q}return r.call($,Z)?$[Z]:void 0},jQ=function(Z){var $=this.__data__;return h?$[Z]!==void 0:r.call($,Z)},pQ=function(Z,$){var Q=this.__data__;return Q[Z]=h&&$===void 0?Z$:$,this},m=function(Z){var $=-1,Q=Z?Z.length:0;this.clear();while(++$<Q){var J=Z[$];this.set(J[0],J[1])}},gQ=function(){this.__data__=[]},nQ=function(Z){var $=this.__data__,Q=t($,Z);if(Q<0)return!1;var J=$.length-1;if(Q==J)$.pop();else CQ.call($,Q,1);return!0},kQ=function(Z){var $=this.__data__,Q=t($,Z);return Q<0?void 0:$[Q][1]},hQ=function(Z){return t(this.__data__,Z)>-1},bQ=function(Z,$){var Q=this.__data__,J=t(Q,Z);if(J<0)Q.push([Z,$]);else Q[J][1]=$;return this},A=function(Z){var $=-1,Q=Z?Z.length:0;this.clear();while(++$<Q){var J=Z[$];this.set(J[0],J[1])}},yQ=function(){this.__data__={hash:new I,map:new(TQ||m),string:new I}},vQ=function(Z){return a(this,Z).delete(Z)},iQ=function(Z){return a(this,Z).get(Z)},cQ=function(Z){return a(this,Z).has(Z)},uQ=function(Z,$){return a(this,Z).set(Z,$),this},lQ=function(Z,$,Q){var J=Z[$];if(!(r.call(Z,$)&&B$(J,Q))||Q===void 0&&!($ in Z))Z[$]=Q},t=function(Z,$){var Q=Z.length;while(Q--)if(B$(Z[Q][0],$))return Q;return-1},sQ=function(Z){if(!o(Z)||$8(Z))return!1;var $=X8(Z)||VQ(Z)?xQ:HQ;return $.test(U8(Z))},oQ=function(Z,$,Q,J){if(!o(Z))return Z;$=eQ($,Z)?[$]:tQ($);var U=-1,X=$.length,B=X-1,Y=Z;while(Y!=null&&++U<X){var W=J8($[U]),K=Q;if(U!=B){var w=Y[W];if(K=J?J(w,W,Y):void 0,K===void 0)K=o(w)?w:aQ($[U+1])?[]:{}}lQ(Y,W,K),Y=Y[W]}return Z},rQ=function(Z){if(typeof Z=="string")return Z;if(zZ(Z))return eZ?eZ.call(Z):"";var $=Z+"";return $=="0"&&1/Z==-$$?"-0":$},tQ=function(Z){return Y$(Z)?Z:Q8(Z)},a=function(Z,$){var Q=Z.__data__;return Z8($)?Q[typeof $=="string"?"string":"hash"]:Q.map},X$=function(Z,$){var Q=SQ(Z,$);return sQ(Q)?Q:void 0},aQ=function(Z,$){return $=$==null?wQ:$,!!$&&(typeof Z=="number"||MQ.test(Z))&&(Z>-1&&Z%1==0&&Z<$)},eQ=function(Z,$){if(Y$(Z))return!1;var Q=typeof Z;if(Q=="number"||Q=="symbol"||Q=="boolean"||Z==null||zZ(Z))return!0;return FQ.test(Z)||!NQ.test(Z)||$!=null&&Z in Object($)},Z8=function(Z){var $=typeof Z;return $=="string"||$=="number"||$=="symbol"||$=="boolean"?Z!=="__proto__":Z===null},$8=function(Z){return!!rZ&&rZ in Z},J8=function(Z){if(typeof Z=="string"||zZ(Z))return Z;var $=Z+"";return $=="0"&&1/Z==-$$?"-0":$},U8=function(Z){if(Z!=null){try{return J$.call(Z)}catch($){}try{return Z+""}catch($){}}return""},MZ=function(Z,$){if(typeof Z!="function"||$&&typeof $!="function")throw new TypeError(RQ);var Q=function(){var J=arguments,U=$?$.apply(this,J):J[0],X=Q.cache;if(X.has(U))return X.get(U);var B=Z.apply(this,J);return Q.cache=X.set(U,B),B};return Q.cache=new(MZ.Cache||A),Q},B$=function(Z,$){return Z===$||Z!==Z&&$!==$},X8=function(Z){var $=o(Z)?U$.call(Z):"";return $==GQ||$==qQ},o=function(Z){var $=typeof Z;return!!Z&&($=="object"||$=="function")},B8=function(Z){return!!Z&&typeof Z=="object"},zZ=function(Z){return typeof Z=="symbol"||B8(Z)&&U$.call(Z)==_Q},Y8=function(Z){return Z==null?"":rQ(Z)},W8=function(Z,$,Q){return Z==null?Z:oQ(Z,$,Q)},RQ="Expected a function",Z$="__lodash_hash_undefined__",$$=1/0,wQ=9007199254740991,GQ="[object Function]",qQ="[object GeneratorFunction]",_Q="[object Symbol]",NQ=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,FQ=/^\w*$/,EQ=/^\./,LQ=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,PQ=/[\\^$.*+?()[\]{}|]/g,OQ=/\\(\\)?/g,HQ=/^\[object .+?Constructor\]$/,MQ=/^(?:0|[1-9]\d*)$/,zQ=typeof global=="object"&&global&&global.Object===Object&&global,DQ=typeof self=="object"&&self&&self.Object===Object&&self,HZ=zQ||DQ||Function("return this")(),IQ=Array.prototype,AQ=Function.prototype,Q$=Object.prototype,OZ=HZ["__core-js_shared__"],rZ=function(){var Z=/[^.]+$/.exec(OZ&&OZ.keys&&OZ.keys.IE_PROTO||"");return Z?"Symbol(src)_1."+Z:""}(),J$=AQ.toString,r=Q$.hasOwnProperty,U$=Q$.toString,xQ=RegExp("^"+J$.call(r).replace(PQ,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),tZ=HZ.Symbol,CQ=IQ.splice,TQ=X$(HZ,"Map"),h=X$(Object,"create"),aZ=tZ?tZ.prototype:void 0,eZ=aZ?aZ.toString:void 0;I.prototype.clear=fQ;I.prototype.delete=mQ;I.prototype.get=dQ;I.prototype.has=jQ;I.prototype.set=pQ;m.prototype.clear=gQ;m.prototype.delete=nQ;m.prototype.get=kQ;m.prototype.has=hQ;m.prototype.set=bQ;A.prototype.clear=yQ;A.prototype.delete=vQ;A.prototype.get=iQ;A.prototype.has=cQ;A.prototype.set=uQ;var Q8=MZ(function(Z){Z=Y8(Z);var $=[];if(EQ.test(Z))$.push("");return Z.replace(LQ,function(Q,J,U,X){$.push(U?X.replace(OQ,"$1"):J||Q)}),$});MZ.Cache=A;var Y$=Array.isArray;W$.exports=W8});var v$=PZ(($Z,j)=>{var d8=function(Z,$,Q,J){var U=-1,X=Z?Z.length:0;while(++U<X){var B=Z[U];$(J,B,Q(B),Z)}return J},j8=function(Z,$){var Q=-1,J=Z?Z.length:0;while(++Q<J)if($(Z[Q],Q,Z))return!0;return!1},p8=function(Z){return function($){return $==null?void 0:$[Z]}},g8=function(Z,$){var Q=-1,J=Array(Z);while(++Q<Z)J[Q]=$(Q);return J},n8=function(Z){return function($){return Z($)}},k8=function(Z,$){return Z==null?void 0:Z[$]},TZ=function(Z){var $=!1;if(Z!=null&&typeof Z.toString!="function")try{$=!!(Z+"")}catch(Q){}return $},h8=function(Z){var $=-1,Q=Array(Z.size);return Z.forEach(function(J,U){Q[++$]=[U,J]}),Q},b8=function(Z,$){return function(Q){return Z($(Q))}},y8=function(Z){var $=-1,Q=Array(Z.size);return Z.forEach(function(J){Q[++$]=J}),Q},x=function(Z){var $=-1,Q=Z?Z.length:0;this.clear();while(++$<Q){var J=Z[$];this.set(J[0],J[1])}},Z1=function(){this.__data__=v?v(null):{}},$1=function(Z){return this.has(Z)&&delete this.__data__[Z]},Q1=function(Z){var $=this.__data__;if(v){var Q=$[Z];return Q===pZ?void 0:Q}return P.call($,Z)?$[Z]:void 0},J1=function(Z){var $=this.__data__;return v?$[Z]!==void 0:P.call($,Z)},U1=function(Z,$){var Q=this.__data__;return Q[Z]=v&&$===void 0?pZ:$,this},O=function(Z){var $=-1,Q=Z?Z.length:0;this.clear();while(++$<Q){var J=Z[$];this.set(J[0],J[1])}},X1=function(){this.__data__=[]},B1=function(Z){var $=this.__data__,Q=wZ($,Z);if(Q<0)return!1;var J=$.length-1;if(Q==J)$.pop();else l8.call($,Q,1);return!0},Y1=function(Z){var $=this.__data__,Q=wZ($,Z);return Q<0?void 0:$[Q][1]},W1=function(Z){return wZ(this.__data__,Z)>-1},K1=function(Z,$){var Q=this.__data__,J=wZ(Q,Z);if(J<0)Q.push([Z,$]);else Q[J][1]=$;return this},H=function(Z){var $=-1,Q=Z?Z.length:0;this.clear();while(++$<Q){var J=Z[$];this.set(J[0],J[1])}},R1=function(){this.__data__={hash:new x,map:new(y||O),string:new x}},w1=function(Z){return GZ(this,Z).delete(Z)},G1=function(Z){return GZ(this,Z).get(Z)},q1=function(Z){return GZ(this,Z).has(Z)},_1=function(Z,$){return GZ(this,Z).set(Z,$),this},YZ=function(Z){var $=-1,Q=Z?Z.length:0;this.__data__=new H;while(++$<Q)this.add(Z[$])},N1=function(Z){return this.__data__.set(Z,pZ),this},F1=function(Z){return this.__data__.has(Z)},L=function(Z){this.__data__=new O(Z)},E1=function(){this.__data__=new O},L1=function(Z){return this.__data__.delete(Z)},P1=function(Z){return this.__data__.get(Z)},O1=function(Z){return this.__data__.has(Z)},H1=function(Z,$){var Q=this.__data__;if(Q instanceof O){var J=Q.__data__;if(!y||J.length<G8-1)return J.push([Z,$]),this;Q=this.__data__=new H(J)}return Q.set(Z,$),this},M1=function(Z,$){var Q=D(Z)||b$(Z)?g8(Z.length,String):[],J=Q.length,U=!!J;for(var X in Z)if(($||P.call(Z,X))&&!(U&&(X=="length"||g$(X,J))))Q.push(X);return Q},wZ=function(Z,$){var Q=Z.length;while(Q--)if(h$(Z[Q][0],$))return Q;return-1},z1=function(Z,$,Q,J){return D1(Z,function(U,X,B){$(J,U,Q(U),B)}),J},V1=function(Z,$){return Z&&S1(Z,$,WZ)},d$=function(Z,$){$=qZ($,Z)?[$]:j$($);var Q=0,J=$.length;while(Z!=null&&Q<J)Z=Z[_Z($[Q++])];return Q&&Q==J?Z:void 0},I1=function(Z){return g.call(Z)},A1=function(Z,$){return Z!=null&&$ in Object(Z)},gZ=function(Z,$,Q,J,U){if(Z===$)return!0;if(Z==null||$==null||!NZ(Z)&&!FZ($))return Z!==Z&&$!==$;return x1(Z,$,gZ,Q,J,U)},x1=function(Z,$,Q,J,U,X){var B=D(Z),Y=D($),W=xZ,K=xZ;if(!B)W=z(Z),W=W==QZ?d:W;if(!Y)K=z($),K=K==QZ?d:K;var w=W==d&&!TZ(Z),q=K==d&&!TZ($),G=W==K;if(G&&!w)return X||(X=new L),B||a1(Z)?p$(Z,$,Q,J,U,X):y1(Z,$,W,Q,J,U,X);if(!(U&p)){var N=w&&P.call(Z,"__wrapped__"),F=q&&P.call($,"__wrapped__");if(N||F){var M=N?Z.value():Z,E=F?$.value():$;return X||(X=new L),Q(M,E,J,U,X)}}if(!G)return!1;return X||(X=new L),v1(Z,$,Q,J,U,X)},C1=function(Z,$,Q,J){var U=Q.length,X=U,B=!J;if(Z==null)return!X;Z=Object(Z);while(U--){var Y=Q[U];if(B&&Y[2]?Y[1]!==Z[Y[0]]:!(Y[0]in Z))return!1}while(++U<X){Y=Q[U];var W=Y[0],K=Z[W],w=Y[1];if(B&&Y[2]){if(K===void 0&&!(W in Z))return!1}else{var q=new L;if(J)var G=J(K,w,W,Z,$,q);if(!(G===void 0?gZ(w,K,J,KZ|p,q):G))return!1}}return!0},T1=function(Z){if(!NZ(Z)||l1(Z))return!1;var $=y$(Z)||TZ(Z)?c8:C8;return $.test(C(Z))},f1=function(Z){return FZ(Z)&&hZ(Z.length)&&!!R[g.call(Z)]},m1=function(Z){if(typeof Z=="function")return Z;if(Z==null)return Q6;if(typeof Z=="object")return D(Z)?p1(Z[0],Z[1]):j1(Z);return J6(Z)},d1=function(Z){if(!s1(Z))return s8(Z);var $=[];for(var Q in Object(Z))if(P.call(Z,Q)&&Q!="constructor")$.push(Q);return $},j1=function(Z){var $=i1(Z);if($.length==1&&$[0][2])return k$($[0][0],$[0][1]);return function(Q){return Q===Z||C1(Q,Z,$)}},p1=function(Z,$){if(qZ(Z)&&n$($))return k$(_Z(Z),$);return function(Q){var J=Z6(Q,Z);return J===void 0&&J===$?$6(Q,Z):gZ($,J,void 0,KZ|p)}},g1=function(Z){return function($){return d$($,Z)}},n1=function(Z){if(typeof Z=="string")return Z;if(bZ(Z))return P$?P$.call(Z):"";var $=Z+"";return $=="0"&&1/Z==-O$?"-0":$},j$=function(Z){return D(Z)?Z:o1(Z)},k1=function(Z,$){return function(Q,J){var U=D(Q)?d8:z1,X=$?$():{};return U(Q,Z,m1(J,2),X)}},h1=function(Z,$){return function(Q,J){if(Q==null)return Q;if(!kZ(Q))return Z(Q,J);var U=Q.length,X=$?U:-1,B=Object(Q);while($?X--:++X<U)if(J(B[X],X,B)===!1)break;return Q}},b1=function(Z){return function($,Q,J){var U=-1,X=Object($),B=J($),Y=B.length;while(Y--){var W=B[Z?Y:++U];if(Q(X[W],W,X)===!1)break}return $}},p$=function(Z,$,Q,J,U,X){var B=U&p,Y=Z.length,W=$.length;if(Y!=W&&!(B&&W>Y))return!1;var K=X.get(Z);if(K&&X.get($))return K==$;var w=-1,q=!0,G=U&KZ?new YZ:void 0;X.set(Z,$),X.set($,Z);while(++w<Y){var N=Z[w],F=$[w];if(J)var M=B?J(F,N,w,$,Z,X):J(N,F,w,Z,$,X);if(M!==void 0){if(M)continue;q=!1;break}if(G){if(!j8($,function(E,V){if(!G.has(V)&&(N===E||Q(N,E,J,U,X)))return G.add(V)})){q=!1;break}}else if(!(N===F||Q(N,F,J,U,X))){q=!1;break}}return X.delete(Z),X.delete($),q},y1=function(Z,$,Q,J,U,X,B){switch(Q){case XZ:if(Z.byteLength!=$.byteLength||Z.byteOffset!=$.byteOffset)return!1;Z=Z.buffer,$=$.buffer;case C$:if(Z.byteLength!=$.byteLength||!J(new L$(Z),new L$($)))return!1;return!0;case M$:case z$:case V$:return h$(+Z,+$);case D$:return Z.name==$.name&&Z.message==$.message;case I$:case A$:return Z==$+"";case JZ:var Y=h8;case UZ:var W=X&p;if(Y||(Y=y8),Z.size!=$.size&&!W)return!1;var K=B.get(Z);if(K)return K==$;X|=KZ,B.set(Z,$);var w=p$(Y(Z),Y($),J,U,X,B);return B.delete(Z),w;case x$:if(AZ)return AZ.call(Z)==AZ.call($)}return!1},v1=function(Z,$,Q,J,U,X){var B=U&p,Y=WZ(Z),W=Y.length,K=WZ($),w=K.length;if(W!=w&&!B)return!1;var q=W;while(q--){var G=Y[q];if(!(B?G in $:P.call($,G)))return!1}var N=X.get(Z);if(N&&X.get($))return N==$;var F=!0;X.set(Z,$),X.set($,Z);var M=B;while(++q<W){G=Y[q];var E=Z[G],V=$[G];if(J)var sZ=B?J(V,E,G,$,Z,X):J(E,V,G,Z,$,X);if(!(sZ===void 0?E===V||Q(E,V,J,U,X):sZ)){F=!1;break}M||(M=G=="constructor")}if(F&&!M){var u=Z.constructor,l=$.constructor;if(u!=l&&(("constructor"in Z)&&("constructor"in $))&&!(typeof u=="function"&&u instanceof u&&typeof l=="function"&&l instanceof l))F=!1}return X.delete(Z),X.delete($),F},GZ=function(Z,$){var Q=Z.__data__;return u1($)?Q[typeof $=="string"?"string":"hash"]:Q.map},i1=function(Z){var $=WZ(Z),Q=$.length;while(Q--){var J=$[Q],U=Z[J];$[Q]=[J,U,n$(U)]}return $},n=function(Z,$){var Q=k8(Z,$);return T1(Q)?Q:void 0},c1=function(Z,$,Q){$=qZ($,Z)?[$]:j$($);var J,U=-1,B=$.length;while(++U<B){var X=_Z($[U]);if(!(J=Z!=null&&Q(Z,X)))break;Z=Z[X]}if(J)return J;var B=Z?Z.length:0;return!!B&&hZ(B)&&g$(X,B)&&(D(Z)||b$(Z))},g$=function(Z,$){return $=$==null?H$:$,!!$&&(typeof Z=="number"||T8.test(Z))&&(Z>-1&&Z%1==0&&Z<$)},qZ=function(Z,$){if(D(Z))return!1;var Q=typeof Z;if(Q=="number"||Q=="symbol"||Q=="boolean"||Z==null||bZ(Z))return!0;return S8.test(Z)||!D8.test(Z)||$!=null&&Z in Object($)},u1=function(Z){var $=typeof Z;return $=="string"||$=="number"||$=="symbol"||$=="boolean"?Z!=="__proto__":Z===null},l1=function(Z){return!!F$&&F$ in Z},s1=function(Z){var $=Z&&Z.constructor,Q=typeof $=="function"&&$.prototype||RZ;return Z===Q},n$=function(Z){return Z===Z&&!NZ(Z)},k$=function(Z,$){return function(Q){if(Q==null)return!1;return Q[Z]===$&&($!==void 0||(Z in Object(Q)))}},_Z=function(Z){if(typeof Z=="string"||bZ(Z))return Z;var $=Z+"";return $=="0"&&1/Z==-O$?"-0":$},C=function(Z){if(Z!=null){try{return m$.call(Z)}catch($){}try{return Z+""}catch($){}}return""},nZ=function(Z,$){if(typeof Z!="function"||$&&typeof $!="function")throw new TypeError(q8);var Q=function(){var J=arguments,U=$?$.apply(this,J):J[0],X=Q.cache;if(X.has(U))return X.get(U);var B=Z.apply(this,J);return Q.cache=X.set(U,B),B};return Q.cache=new(nZ.Cache||H),Q},h$=function(Z,$){return Z===$||Z!==Z&&$!==$},b$=function(Z){return t1(Z)&&P.call(Z,"callee")&&(!u8.call(Z,"callee")||g.call(Z)==QZ)},kZ=function(Z){return Z!=null&&hZ(Z.length)&&!y$(Z)},t1=function(Z){return FZ(Z)&&kZ(Z)},y$=function(Z){var $=NZ(Z)?g.call(Z):"";return $==S$||$==_8},hZ=function(Z){return typeof Z=="number"&&Z>-1&&Z%1==0&&Z<=H$},NZ=function(Z){var $=typeof Z;return!!Z&&($=="object"||$=="function")},FZ=function(Z){return!!Z&&typeof Z=="object"},bZ=function(Z){return typeof Z=="symbol"||FZ(Z)&&g.call(Z)==x$},e1=function(Z){return Z==null?"":n1(Z)},Z6=function(Z,$,Q){var J=Z==null?void 0:d$(Z,$);return J===void 0?Q:J},$6=function(Z,$){return Z!=null&&c1(Z,$,A1)},WZ=function(Z){return kZ(Z)?M1(Z):d1(Z)},Q6=function(Z){return Z},J6=function(Z){return qZ(Z)?p8(_Z(Z)):g1(Z)},G8=200,q8="Expected a function",pZ="__lodash_hash_undefined__",KZ=1,p=2,O$=1/0,H$=9007199254740991,QZ="[object Arguments]",xZ="[object Array]",M$="[object Boolean]",z$="[object Date]",D$="[object Error]",S$="[object Function]",_8="[object GeneratorFunction]",JZ="[object Map]",V$="[object Number]",d="[object Object]",w$="[object Promise]",I$="[object RegExp]",UZ="[object Set]",A$="[object String]",x$="[object Symbol]",CZ="[object WeakMap]",C$="[object ArrayBuffer]",XZ="[object DataView]",N8="[object Float32Array]",F8="[object Float64Array]",E8="[object Int8Array]",L8="[object Int16Array]",P8="[object Int32Array]",O8="[object Uint8Array]",H8="[object Uint8ClampedArray]",M8="[object Uint16Array]",z8="[object Uint32Array]",D8=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,S8=/^\w*$/,V8=/^\./,I8=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,A8=/[\\^$.*+?()[\]{}|]/g,x8=/\\(\\)?/g,C8=/^\[object .+?Constructor\]$/,T8=/^(?:0|[1-9]\d*)$/,R={};R[N8]=R[F8]=R[E8]=R[L8]=R[P8]=R[O8]=R[H8]=R[M8]=R[z8]=!0;R[QZ]=R[xZ]=R[C$]=R[M$]=R[XZ]=R[z$]=R[D$]=R[S$]=R[JZ]=R[V$]=R[d]=R[I$]=R[UZ]=R[A$]=R[CZ]=!1;var T$=typeof global=="object"&&global&&global.Object===Object&&global,f8=typeof self=="object"&&self&&self.Object===Object&&self,S=T$||f8||Function("return this")(),f$=typeof $Z=="object"&&$Z&&!$Z.nodeType&&$Z,G$=f$&&typeof j=="object"&&j&&!j.nodeType&&j,m8=G$&&G$.exports===f$,q$=m8&&T$.process,_$=function(){try{return q$&&q$.binding("util")}catch(Z){}}(),N$=_$&&_$.isTypedArray,v8=Array.prototype,i8=Function.prototype,RZ=Object.prototype,IZ=S["__core-js_shared__"],F$=function(){var Z=/[^.]+$/.exec(IZ&&IZ.keys&&IZ.keys.IE_PROTO||"");return Z?"Symbol(src)_1."+Z:""}(),m$=i8.toString,P=RZ.hasOwnProperty,g=RZ.toString,c8=RegExp("^"+m$.call(P).replace(A8,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),E$=S.Symbol,L$=S.Uint8Array,u8=RZ.propertyIsEnumerable,l8=v8.splice,s8=b8(Object.keys,Object),fZ=n(S,"DataView"),y=n(S,"Map"),mZ=n(S,"Promise"),dZ=n(S,"Set"),jZ=n(S,"WeakMap"),v=n(Object,"create"),o8=C(fZ),r8=C(y),t8=C(mZ),a8=C(dZ),e8=C(jZ),BZ=E$?E$.prototype:void 0,AZ=BZ?BZ.valueOf:void 0,P$=BZ?BZ.toString:void 0;x.prototype.clear=Z1;x.prototype.delete=$1;x.prototype.get=Q1;x.prototype.has=J1;x.prototype.set=U1;O.prototype.clear=X1;O.prototype.delete=B1;O.prototype.get=Y1;O.prototype.has=W1;O.prototype.set=K1;H.prototype.clear=R1;H.prototype.delete=w1;H.prototype.get=G1;H.prototype.has=q1;H.prototype.set=_1;YZ.prototype.add=YZ.prototype.push=N1;YZ.prototype.has=F1;L.prototype.clear=E1;L.prototype.delete=L1;L.prototype.get=P1;L.prototype.has=O1;L.prototype.set=H1;var D1=h1(V1),S1=b1(),z=I1;if(fZ&&z(new fZ(new ArrayBuffer(1)))!=XZ||y&&z(new y)!=JZ||mZ&&z(mZ.resolve())!=w$||dZ&&z(new dZ)!=UZ||jZ&&z(new jZ)!=CZ)z=function(Z){var $=g.call(Z),Q=$==d?Z.constructor:void 0,J=Q?C(Q):void 0;if(J)switch(J){case o8:return XZ;case r8:return JZ;case t8:return w$;case a8:return UZ;case e8:return CZ}return $};var o1=nZ(function(Z){Z=e1(Z);var $=[];if(V8.test(Z))$.push("");return Z.replace(I8,function(Q,J,U,X){$.push(U?X.replace(x8,"$1"):J||Q)}),$}),r1=k1(function(Z,$,Q){Z[Q]=$});nZ.Cache=H;var D=Array.isArray,a1=N$?n8(N$):f1;j.exports=r1});var UQ=PZ((FJ,JQ)=>{var E6=function(Z,$){return Z==null?void 0:Z[$]},L6=function(Z){var $=!1;if(Z!=null&&typeof Z.toString!="function")try{$=!!(Z+"")}catch(Q){}return $},T=function(Z){var $=-1,Q=Z?Z.length:0;this.clear();while(++$<Q){var J=Z[$];this.set(J[0],J[1])}},D6=function(){this.__data__=c?c(null):{}},S6=function(Z){return this.has(Z)&&delete this.__data__[Z]},V6=function(Z){var $=this.__data__;if(c){var Q=$[Z];return Q===o$?void 0:Q}return cZ.call($,Z)?$[Z]:void 0},I6=function(Z){var $=this.__data__;return c?$[Z]!==void 0:cZ.call($,Z)},A6=function(Z,$){var Q=this.__data__;return Q[Z]=c&&$===void 0?o$:$,this},k=function(Z){var $=-1,Q=Z?Z.length:0;this.clear();while(++$<Q){var J=Z[$];this.set(J[0],J[1])}},x6=function(){this.__data__=[]},C6=function(Z){var $=this.__data__,Q=EZ($,Z);if(Q<0)return!1;var J=$.length-1;if(Q==J)$.pop();else M6.call($,Q,1);return!0},T6=function(Z){var $=this.__data__,Q=EZ($,Z);return Q<0?void 0:$[Q][1]},f6=function(Z){return EZ(this.__data__,Z)>-1},m6=function(Z,$){var Q=this.__data__,J=EZ(Q,Z);if(J<0)Q.push([Z,$]);else Q[J][1]=$;return this},f=function(Z){var $=-1,Q=Z?Z.length:0;this.clear();while(++$<Q){var J=Z[$];this.set(J[0],J[1])}},d6=function(){this.__data__={hash:new T,map:new(z6||k),string:new T}},j6=function(Z){return LZ(this,Z).delete(Z)},p6=function(Z){return LZ(this,Z).get(Z)},g6=function(Z){return LZ(this,Z).has(Z)},n6=function(Z,$){return LZ(this,Z).set(Z,$),this},EZ=function(Z,$){var Q=Z.length;while(Q--)if(o6(Z[Q][0],$))return Q;return-1},k6=function(Z,$){$=v6($,Z)?[$]:y6($);var Q=0,J=$.length;while(Z!=null&&Q<J)Z=Z[l6($[Q++])];return Q&&Q==J?Z:void 0},h6=function(Z){if(!QQ(Z)||c6(Z))return!1;var $=r6(Z)||L6(Z)?H6:_6;return $.test(s6(Z))},b6=function(Z){if(typeof Z=="string")return Z;if(lZ(Z))return s$?s$.call(Z):"";var $=Z+"";return $=="0"&&1/Z==-r$?"-0":$},y6=function(Z){return $Q(Z)?Z:u6(Z)},LZ=function(Z,$){var Q=Z.__data__;return i6($)?Q[typeof $=="string"?"string":"hash"]:Q.map},ZQ=function(Z,$){var Q=E6(Z,$);return h6(Q)?Q:void 0},v6=function(Z,$){if($Q(Z))return!1;var Q=typeof Z;if(Q=="number"||Q=="symbol"||Q=="boolean"||Z==null||lZ(Z))return!0;return K6.test(Z)||!W6.test(Z)||$!=null&&Z in Object($)},i6=function(Z){var $=typeof Z;return $=="string"||$=="number"||$=="symbol"||$=="boolean"?Z!=="__proto__":Z===null},c6=function(Z){return!!c$&&c$ in Z},l6=function(Z){if(typeof Z=="string"||lZ(Z))return Z;var $=Z+"";return $=="0"&&1/Z==-r$?"-0":$},s6=function(Z){if(Z!=null){try{return a$.call(Z)}catch($){}try{return Z+""}catch($){}}return""},uZ=function(Z,$){if(typeof Z!="function"||$&&typeof $!="function")throw new TypeError(U6);var Q=function(){var J=arguments,U=$?$.apply(this,J):J[0],X=Q.cache;if(X.has(U))return X.get(U);var B=Z.apply(this,J);return Q.cache=X.set(U,B),B};return Q.cache=new(uZ.Cache||f),Q},o6=function(Z,$){return Z===$||Z!==Z&&$!==$},r6=function(Z){var $=QQ(Z)?e$.call(Z):"";return $==X6||$==B6},QQ=function(Z){var $=typeof Z;return!!Z&&($=="object"||$=="function")},t6=function(Z){return!!Z&&typeof Z=="object"},lZ=function(Z){return typeof Z=="symbol"||t6(Z)&&e$.call(Z)==Y6},a6=function(Z){return Z==null?"":b6(Z)},e6=function(Z,$,Q){var J=Z==null?void 0:k6(Z,$);return J===void 0?Q:J},U6="Expected a function",o$="__lodash_hash_undefined__",r$=1/0,X6="[object Function]",B6="[object GeneratorFunction]",Y6="[object Symbol]",W6=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,K6=/^\w*$/,R6=/^\./,w6=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,G6=/[\\^$.*+?()[\]{}|]/g,q6=/\\(\\)?/g,_6=/^\[object .+?Constructor\]$/,N6=typeof global=="object"&&global&&global.Object===Object&&global,F6=typeof self=="object"&&self&&self.Object===Object&&self,iZ=N6||F6||Function("return this")(),P6=Array.prototype,O6=Function.prototype,t$=Object.prototype,vZ=iZ["__core-js_shared__"],c$=function(){var Z=/[^.]+$/.exec(vZ&&vZ.keys&&vZ.keys.IE_PROTO||"");return Z?"Symbol(src)_1."+Z:""}(),a$=O6.toString,cZ=t$.hasOwnProperty,e$=t$.toString,H6=RegExp("^"+a$.call(cZ).replace(G6,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),u$=iZ.Symbol,M6=P6.splice,z6=ZQ(iZ,"Map"),c=ZQ(Object,"create"),l$=u$?u$.prototype:void 0,s$=l$?l$.toString:void 0;T.prototype.clear=D6;T.prototype.delete=S6;T.prototype.get=V6;T.prototype.has=I6;T.prototype.set=A6;k.prototype.clear=x6;k.prototype.delete=C6;k.prototype.get=T6;k.prototype.has=f6;k.prototype.set=m6;f.prototype.clear=d6;f.prototype.delete=j6;f.prototype.get=p6;f.prototype.has=g6;f.prototype.set=n6;var u6=uZ(function(Z){Z=a6(Z);var $=[];if(R6.test(Z))$.push("");return Z.replace(w6,function(Q,J,U,X){$.push(U?X.replace(q6,"$1"):J||Q)}),$});uZ.Cache=f;var $Q=Array.isArray;JQ.exports=e6});var K$=s(DZ(),1),e={isNamespace:(Z)=>Z&&!Z.type,flattenSchema(Z,$){return Object.entries(Z).reduce((Q,[J,U])=>{const X=$?`${$}.${J}`:J;if(e.isNamespace(U))Q={...Q,...e.flattenSchema(U,X)};else Object.assign(U,{name:X}),Q[X]=U;return Q},{})},wrapSchema(Z){return Object.values(Z).reduce(($,Q)=>{return K$.default($,Q.path,Q),$},{})}};var ZZ,K8=new Uint8Array(16);function SZ(){if(!ZZ){if(ZZ=typeof crypto!=="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ZZ)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}return ZZ(K8)}function R$(Z,$=0){return _[Z[$+0]]+_[Z[$+1]]+_[Z[$+2]]+_[Z[$+3]]+"-"+_[Z[$+4]]+_[Z[$+5]]+"-"+_[Z[$+6]]+_[Z[$+7]]+"-"+_[Z[$+8]]+_[Z[$+9]]+"-"+_[Z[$+10]]+_[Z[$+11]]+_[Z[$+12]]+_[Z[$+13]]+_[Z[$+14]]+_[Z[$+15]]}var _=[];for(let Z=0;Z<256;++Z)_.push((Z+256).toString(16).slice(1));var R8=typeof crypto!=="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),VZ={randomUUID:R8};var w8=function(Z,$,Q){if(VZ.randomUUID&&!$&&!Z)return VZ.randomUUID();Z=Z||{};const J=Z.random||(Z.rng||SZ)();if(J[6]=J[6]&15|64,J[8]=J[8]&63|128,$){Q=Q||0;for(let U=0;U<16;++U)$[Q+U]=J[U];return $}return R$(J)},b=w8;var i$=s(v$(),1),yZ=s(DZ(),1);class i{schemas;falttenSchema;uidSchemas;static type(Z){return Z}static middleware(Z){return Z}static Namespace(Z){return Z}static Var(Z){if(!Z.get)throw new Error("invalid Var params");const $=Z.get;return Z.get=async()=>{const Q=await $();return Z.value=Q,Q},{...Z,type:"var",uid:b()}}static Func(Z){return{...Z,type:"func",uid:b()}}static Action(Z){return{...Z,type:"action",uid:b()}}constructor(Z={}){Object.assign(this,Z),this.falttenSchema=e.flattenSchema(this.schemas),this.uidSchemas=i$.default(Object.values(this.falttenSchema),"uid")}static utils={async formatVar(Z,$){const{uid:Q,type:J,get:U,name:X}=Z,B=await U(),Y=Z.schema?Z.schema({val:B,v:Z,ctx:$}):{},W={uid:Q,type:J,name:X,value:B,set:!!Z.set,_schema:Y};return Z._schema=W._schema,await i.utils.formatSchema(W),W.schema=W._schema,W._schema=void 0,W},async formatFunc(Z,$){const{uid:Q,type:J,name:U,func:X}=Z,B=typeof Z.uiConfig=="function"?await Z.uiConfig():Z.uiConfig||{},Y={uid:Q,type:J,name:U,uiConfig:B,func:X,input:{}},W=(typeof Z.input=="function"?await Z.input($):Z.input)||{};return await Promise.all(Object.entries(W).map(async([K,w])=>{const q=typeof w=="function"?await w():w;if(!Y.uiConfig[K])Y.uiConfig[K]={};if(q.uiConfig)Object.assign(Y.uiConfig[K],q.uiConfig);if(q.enums)yZ.default(Y,`uiConfig[${K}].selectOptions`,q.enums.map((G)=>({label:G.label??G,value:G.value??G})));Y.input[K]=q.default||q})),Y},async formatSchema(Z,$){if(Z._schema){let Q=Array.isArray(Z.value)&&typeof Z.value[0]=="object"?Z.value[0]:Z.value;if(Z.value)Object.entries(Q).map(([J,U])=>{if(Z._schema[J])return;Z._schema[J]={type:typeof U,default:U}});await Promise.all(Object.entries(Z._schema).map(async([J,U])=>{if(!U)return;const X=typeof U=="function"?U():U;Z._schema[J]=X;const B=X;if(B.enums)yZ.default(Z._schema[J],"uiConfig.selectOptions",B.enums.map((Y)=>({label:Y.label??Y,value:Y.value??Y})));if(X.uiConfig&&typeof X.uiConfig=="function")X.uiConfig=X.uiConfig();if(X.input)Z._schema[J]=await i.utils.formatFunc(X,Z)}))}}};async loadFull(Z){return Promise.all(Object.entries(this.falttenSchema).filter(([$,Q])=>{if(Z?.namespace&&!$.startsWith(Z.namespace))return;if(Q.use)return Q.use.filter((J)=>!!J.filter).every((J)=>J.filter(Z?.ctx)==!0);return!0}).map(async([$,Q])=>{if(Q.type=="func")return i.utils.formatFunc(Q);if(Q.type=="var")return i.utils.formatVar(Q,Z?.ctx);return{type:"unknown",name:$}}))}async loadVars(Z){return Promise.all(Object.entries(this.falttenSchema).filter(([$,Q])=>{if(Z?.namespace&&!$.startsWith(Z.namespace))return;if(Q.type=="var")return Q.type=="var"}).map(async([$,Q])=>{const{get:J,name:U}=Q,X=await J();return{name:U,value:X}}))}}var XQ=s(UQ(),1),EJ=(Z)=>{return{schema:{async loadFull($){return fetch(`${Z.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"schema.loadFull",params:$})}).then((Q)=>Q.json())},async loadVars($){return fetch(`${Z.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"schema.loadVars",params:$})}).then((Q)=>Q.json())}},func:{async call($){return fetch(`${Z.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"func.call",params:$})}).then((Q)=>Q.json())}},var:{async set($){return fetch(`${Z.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"var.set",params:$})}).then((Q)=>Q.json())},async action($){return fetch(`${Z.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"var.action",params:$})}).then((Q)=>Q.json())},async call($){return fetch(`${Z.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"var.call",params:$})}).then((Q)=>Q.json())}}}},LJ=({urpc:Z})=>{const $={urpc:Z,handle({name:Q,params:J={}},U){const X=XQ.default($,Q);if(!X)throw new Error("invalid name");return J.ctx=U,X(J,U)},schema:{async loadFull(Q){return Z.loadFull(Q)},async loadVars(Q){return Z.loadVars(Q)}},func:{async call(Q){const J=Z.uidSchemas[Q.method]||Z.falttenSchema[Q.method];if(!J)throw new Error("invalid func name");return J.func(Q)}},var:{async set(Q){const J=Z.uidSchemas[Q.name]||Z.falttenSchema[Q.name];if(!J)throw new Error("invalid var name");if(!J.set)throw new Error("variable can't be set");return J.set(Q.value)},async action(Q){const J=Z.uidSchemas[Q.name]||Z.falttenSchema[Q.name];if(!J)throw new Error("invalid var name");const U=J._schema[Q.action];if(!U)throw new Error("invalid action name");return U.func({...Q,val:Q.value})},async call(Q){const J=Z.uidSchemas[Q.name]||Z.falttenSchema[Q.name];if(!J)throw new Error("invalid var name");const U=J._schema[Q.method];if(!U)throw new Error("invalid func name");return Q.value=J.value,U.func({...Q,val:J.value})}}};return $};export{e as utils,EJ as createSimpleHttpClient,LJ as createServerClient,i as URPC};
var BQ=Object.create;var{defineProperty:oZ,getPrototypeOf:YQ,getOwnPropertyNames:WQ}=Object;var KQ=Object.prototype.hasOwnProperty;var s=(Z,$,Q)=>{Q=Z!=null?BQ(YQ(Z)):{};const J=$||!Z||!Z.__esModule?oZ(Q,"default",{value:Z,enumerable:!0}):Q;for(let U of WQ(Z))if(!KQ.call(J,U))oZ(J,U,{get:()=>Z[U],enumerable:!0});return J};var PZ=(Z,$)=>()=>($||Z(($={exports:{}}).exports,$),$.exports);var DZ=PZ(($J,W$)=>{var SQ=function(Z,$){return Z==null?void 0:Z[$]},VQ=function(Z){var $=!1;if(Z!=null&&typeof Z.toString!="function")try{$=!!(Z+"")}catch(Q){}return $},I=function(Z){var $=-1,Q=Z?Z.length:0;this.clear();while(++$<Q){var J=Z[$];this.set(J[0],J[1])}},fQ=function(){this.__data__=h?h(null):{}},mQ=function(Z){return this.has(Z)&&delete this.__data__[Z]},dQ=function(Z){var $=this.__data__;if(h){var Q=$[Z];return Q===Z$?void 0:Q}return r.call($,Z)?$[Z]:void 0},jQ=function(Z){var $=this.__data__;return h?$[Z]!==void 0:r.call($,Z)},pQ=function(Z,$){var Q=this.__data__;return Q[Z]=h&&$===void 0?Z$:$,this},m=function(Z){var $=-1,Q=Z?Z.length:0;this.clear();while(++$<Q){var J=Z[$];this.set(J[0],J[1])}},gQ=function(){this.__data__=[]},kQ=function(Z){var $=this.__data__,Q=t($,Z);if(Q<0)return!1;var J=$.length-1;if(Q==J)$.pop();else CQ.call($,Q,1);return!0},nQ=function(Z){var $=this.__data__,Q=t($,Z);return Q<0?void 0:$[Q][1]},hQ=function(Z){return t(this.__data__,Z)>-1},bQ=function(Z,$){var Q=this.__data__,J=t(Q,Z);if(J<0)Q.push([Z,$]);else Q[J][1]=$;return this},A=function(Z){var $=-1,Q=Z?Z.length:0;this.clear();while(++$<Q){var J=Z[$];this.set(J[0],J[1])}},yQ=function(){this.__data__={hash:new I,map:new(TQ||m),string:new I}},vQ=function(Z){return a(this,Z).delete(Z)},iQ=function(Z){return a(this,Z).get(Z)},cQ=function(Z){return a(this,Z).has(Z)},uQ=function(Z,$){return a(this,Z).set(Z,$),this},lQ=function(Z,$,Q){var J=Z[$];if(!(r.call(Z,$)&&B$(J,Q))||Q===void 0&&!($ in Z))Z[$]=Q},t=function(Z,$){var Q=Z.length;while(Q--)if(B$(Z[Q][0],$))return Q;return-1},sQ=function(Z){if(!o(Z)||$8(Z))return!1;var $=X8(Z)||VQ(Z)?xQ:HQ;return $.test(U8(Z))},oQ=function(Z,$,Q,J){if(!o(Z))return Z;$=eQ($,Z)?[$]:tQ($);var U=-1,X=$.length,B=X-1,Y=Z;while(Y!=null&&++U<X){var W=J8($[U]),K=Q;if(U!=B){var w=Y[W];if(K=J?J(w,W,Y):void 0,K===void 0)K=o(w)?w:aQ($[U+1])?[]:{}}lQ(Y,W,K),Y=Y[W]}return Z},rQ=function(Z){if(typeof Z=="string")return Z;if(zZ(Z))return eZ?eZ.call(Z):"";var $=Z+"";return $=="0"&&1/Z==-$$?"-0":$},tQ=function(Z){return Y$(Z)?Z:Q8(Z)},a=function(Z,$){var Q=Z.__data__;return Z8($)?Q[typeof $=="string"?"string":"hash"]:Q.map},X$=function(Z,$){var Q=SQ(Z,$);return sQ(Q)?Q:void 0},aQ=function(Z,$){return $=$==null?wQ:$,!!$&&(typeof Z=="number"||MQ.test(Z))&&(Z>-1&&Z%1==0&&Z<$)},eQ=function(Z,$){if(Y$(Z))return!1;var Q=typeof Z;if(Q=="number"||Q=="symbol"||Q=="boolean"||Z==null||zZ(Z))return!0;return FQ.test(Z)||!NQ.test(Z)||$!=null&&Z in Object($)},Z8=function(Z){var $=typeof Z;return $=="string"||$=="number"||$=="symbol"||$=="boolean"?Z!=="__proto__":Z===null},$8=function(Z){return!!rZ&&rZ in Z},J8=function(Z){if(typeof Z=="string"||zZ(Z))return Z;var $=Z+"";return $=="0"&&1/Z==-$$?"-0":$},U8=function(Z){if(Z!=null){try{return J$.call(Z)}catch($){}try{return Z+""}catch($){}}return""},MZ=function(Z,$){if(typeof Z!="function"||$&&typeof $!="function")throw new TypeError(RQ);var Q=function(){var J=arguments,U=$?$.apply(this,J):J[0],X=Q.cache;if(X.has(U))return X.get(U);var B=Z.apply(this,J);return Q.cache=X.set(U,B),B};return Q.cache=new(MZ.Cache||A),Q},B$=function(Z,$){return Z===$||Z!==Z&&$!==$},X8=function(Z){var $=o(Z)?U$.call(Z):"";return $==GQ||$==qQ},o=function(Z){var $=typeof Z;return!!Z&&($=="object"||$=="function")},B8=function(Z){return!!Z&&typeof Z=="object"},zZ=function(Z){return typeof Z=="symbol"||B8(Z)&&U$.call(Z)==_Q},Y8=function(Z){return Z==null?"":rQ(Z)},W8=function(Z,$,Q){return Z==null?Z:oQ(Z,$,Q)},RQ="Expected a function",Z$="__lodash_hash_undefined__",$$=1/0,wQ=9007199254740991,GQ="[object Function]",qQ="[object GeneratorFunction]",_Q="[object Symbol]",NQ=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,FQ=/^\w*$/,EQ=/^\./,LQ=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,PQ=/[\\^$.*+?()[\]{}|]/g,OQ=/\\(\\)?/g,HQ=/^\[object .+?Constructor\]$/,MQ=/^(?:0|[1-9]\d*)$/,zQ=typeof global=="object"&&global&&global.Object===Object&&global,DQ=typeof self=="object"&&self&&self.Object===Object&&self,HZ=zQ||DQ||Function("return this")(),IQ=Array.prototype,AQ=Function.prototype,Q$=Object.prototype,OZ=HZ["__core-js_shared__"],rZ=function(){var Z=/[^.]+$/.exec(OZ&&OZ.keys&&OZ.keys.IE_PROTO||"");return Z?"Symbol(src)_1."+Z:""}(),J$=AQ.toString,r=Q$.hasOwnProperty,U$=Q$.toString,xQ=RegExp("^"+J$.call(r).replace(PQ,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),tZ=HZ.Symbol,CQ=IQ.splice,TQ=X$(HZ,"Map"),h=X$(Object,"create"),aZ=tZ?tZ.prototype:void 0,eZ=aZ?aZ.toString:void 0;I.prototype.clear=fQ;I.prototype.delete=mQ;I.prototype.get=dQ;I.prototype.has=jQ;I.prototype.set=pQ;m.prototype.clear=gQ;m.prototype.delete=kQ;m.prototype.get=nQ;m.prototype.has=hQ;m.prototype.set=bQ;A.prototype.clear=yQ;A.prototype.delete=vQ;A.prototype.get=iQ;A.prototype.has=cQ;A.prototype.set=uQ;var Q8=MZ(function(Z){Z=Y8(Z);var $=[];if(EQ.test(Z))$.push("");return Z.replace(LQ,function(Q,J,U,X){$.push(U?X.replace(OQ,"$1"):J||Q)}),$});MZ.Cache=A;var Y$=Array.isArray;W$.exports=W8});var v$=PZ(($Z,j)=>{var d8=function(Z,$,Q,J){var U=-1,X=Z?Z.length:0;while(++U<X){var B=Z[U];$(J,B,Q(B),Z)}return J},j8=function(Z,$){var Q=-1,J=Z?Z.length:0;while(++Q<J)if($(Z[Q],Q,Z))return!0;return!1},p8=function(Z){return function($){return $==null?void 0:$[Z]}},g8=function(Z,$){var Q=-1,J=Array(Z);while(++Q<Z)J[Q]=$(Q);return J},k8=function(Z){return function($){return Z($)}},n8=function(Z,$){return Z==null?void 0:Z[$]},TZ=function(Z){var $=!1;if(Z!=null&&typeof Z.toString!="function")try{$=!!(Z+"")}catch(Q){}return $},h8=function(Z){var $=-1,Q=Array(Z.size);return Z.forEach(function(J,U){Q[++$]=[U,J]}),Q},b8=function(Z,$){return function(Q){return Z($(Q))}},y8=function(Z){var $=-1,Q=Array(Z.size);return Z.forEach(function(J){Q[++$]=J}),Q},x=function(Z){var $=-1,Q=Z?Z.length:0;this.clear();while(++$<Q){var J=Z[$];this.set(J[0],J[1])}},Z1=function(){this.__data__=v?v(null):{}},$1=function(Z){return this.has(Z)&&delete this.__data__[Z]},Q1=function(Z){var $=this.__data__;if(v){var Q=$[Z];return Q===pZ?void 0:Q}return P.call($,Z)?$[Z]:void 0},J1=function(Z){var $=this.__data__;return v?$[Z]!==void 0:P.call($,Z)},U1=function(Z,$){var Q=this.__data__;return Q[Z]=v&&$===void 0?pZ:$,this},O=function(Z){var $=-1,Q=Z?Z.length:0;this.clear();while(++$<Q){var J=Z[$];this.set(J[0],J[1])}},X1=function(){this.__data__=[]},B1=function(Z){var $=this.__data__,Q=wZ($,Z);if(Q<0)return!1;var J=$.length-1;if(Q==J)$.pop();else l8.call($,Q,1);return!0},Y1=function(Z){var $=this.__data__,Q=wZ($,Z);return Q<0?void 0:$[Q][1]},W1=function(Z){return wZ(this.__data__,Z)>-1},K1=function(Z,$){var Q=this.__data__,J=wZ(Q,Z);if(J<0)Q.push([Z,$]);else Q[J][1]=$;return this},H=function(Z){var $=-1,Q=Z?Z.length:0;this.clear();while(++$<Q){var J=Z[$];this.set(J[0],J[1])}},R1=function(){this.__data__={hash:new x,map:new(y||O),string:new x}},w1=function(Z){return GZ(this,Z).delete(Z)},G1=function(Z){return GZ(this,Z).get(Z)},q1=function(Z){return GZ(this,Z).has(Z)},_1=function(Z,$){return GZ(this,Z).set(Z,$),this},YZ=function(Z){var $=-1,Q=Z?Z.length:0;this.__data__=new H;while(++$<Q)this.add(Z[$])},N1=function(Z){return this.__data__.set(Z,pZ),this},F1=function(Z){return this.__data__.has(Z)},L=function(Z){this.__data__=new O(Z)},E1=function(){this.__data__=new O},L1=function(Z){return this.__data__.delete(Z)},P1=function(Z){return this.__data__.get(Z)},O1=function(Z){return this.__data__.has(Z)},H1=function(Z,$){var Q=this.__data__;if(Q instanceof O){var J=Q.__data__;if(!y||J.length<G8-1)return J.push([Z,$]),this;Q=this.__data__=new H(J)}return Q.set(Z,$),this},M1=function(Z,$){var Q=D(Z)||b$(Z)?g8(Z.length,String):[],J=Q.length,U=!!J;for(var X in Z)if(($||P.call(Z,X))&&!(U&&(X=="length"||g$(X,J))))Q.push(X);return Q},wZ=function(Z,$){var Q=Z.length;while(Q--)if(h$(Z[Q][0],$))return Q;return-1},z1=function(Z,$,Q,J){return D1(Z,function(U,X,B){$(J,U,Q(U),B)}),J},V1=function(Z,$){return Z&&S1(Z,$,WZ)},d$=function(Z,$){$=qZ($,Z)?[$]:j$($);var Q=0,J=$.length;while(Z!=null&&Q<J)Z=Z[_Z($[Q++])];return Q&&Q==J?Z:void 0},I1=function(Z){return g.call(Z)},A1=function(Z,$){return Z!=null&&$ in Object(Z)},gZ=function(Z,$,Q,J,U){if(Z===$)return!0;if(Z==null||$==null||!NZ(Z)&&!FZ($))return Z!==Z&&$!==$;return x1(Z,$,gZ,Q,J,U)},x1=function(Z,$,Q,J,U,X){var B=D(Z),Y=D($),W=xZ,K=xZ;if(!B)W=z(Z),W=W==QZ?d:W;if(!Y)K=z($),K=K==QZ?d:K;var w=W==d&&!TZ(Z),q=K==d&&!TZ($),G=W==K;if(G&&!w)return X||(X=new L),B||a1(Z)?p$(Z,$,Q,J,U,X):y1(Z,$,W,Q,J,U,X);if(!(U&p)){var N=w&&P.call(Z,"__wrapped__"),F=q&&P.call($,"__wrapped__");if(N||F){var M=N?Z.value():Z,E=F?$.value():$;return X||(X=new L),Q(M,E,J,U,X)}}if(!G)return!1;return X||(X=new L),v1(Z,$,Q,J,U,X)},C1=function(Z,$,Q,J){var U=Q.length,X=U,B=!J;if(Z==null)return!X;Z=Object(Z);while(U--){var Y=Q[U];if(B&&Y[2]?Y[1]!==Z[Y[0]]:!(Y[0]in Z))return!1}while(++U<X){Y=Q[U];var W=Y[0],K=Z[W],w=Y[1];if(B&&Y[2]){if(K===void 0&&!(W in Z))return!1}else{var q=new L;if(J)var G=J(K,w,W,Z,$,q);if(!(G===void 0?gZ(w,K,J,KZ|p,q):G))return!1}}return!0},T1=function(Z){if(!NZ(Z)||l1(Z))return!1;var $=y$(Z)||TZ(Z)?c8:C8;return $.test(C(Z))},f1=function(Z){return FZ(Z)&&hZ(Z.length)&&!!R[g.call(Z)]},m1=function(Z){if(typeof Z=="function")return Z;if(Z==null)return Q6;if(typeof Z=="object")return D(Z)?p1(Z[0],Z[1]):j1(Z);return J6(Z)},d1=function(Z){if(!s1(Z))return s8(Z);var $=[];for(var Q in Object(Z))if(P.call(Z,Q)&&Q!="constructor")$.push(Q);return $},j1=function(Z){var $=i1(Z);if($.length==1&&$[0][2])return n$($[0][0],$[0][1]);return function(Q){return Q===Z||C1(Q,Z,$)}},p1=function(Z,$){if(qZ(Z)&&k$($))return n$(_Z(Z),$);return function(Q){var J=Z6(Q,Z);return J===void 0&&J===$?$6(Q,Z):gZ($,J,void 0,KZ|p)}},g1=function(Z){return function($){return d$($,Z)}},k1=function(Z){if(typeof Z=="string")return Z;if(bZ(Z))return P$?P$.call(Z):"";var $=Z+"";return $=="0"&&1/Z==-O$?"-0":$},j$=function(Z){return D(Z)?Z:o1(Z)},n1=function(Z,$){return function(Q,J){var U=D(Q)?d8:z1,X=$?$():{};return U(Q,Z,m1(J,2),X)}},h1=function(Z,$){return function(Q,J){if(Q==null)return Q;if(!nZ(Q))return Z(Q,J);var U=Q.length,X=$?U:-1,B=Object(Q);while($?X--:++X<U)if(J(B[X],X,B)===!1)break;return Q}},b1=function(Z){return function($,Q,J){var U=-1,X=Object($),B=J($),Y=B.length;while(Y--){var W=B[Z?Y:++U];if(Q(X[W],W,X)===!1)break}return $}},p$=function(Z,$,Q,J,U,X){var B=U&p,Y=Z.length,W=$.length;if(Y!=W&&!(B&&W>Y))return!1;var K=X.get(Z);if(K&&X.get($))return K==$;var w=-1,q=!0,G=U&KZ?new YZ:void 0;X.set(Z,$),X.set($,Z);while(++w<Y){var N=Z[w],F=$[w];if(J)var M=B?J(F,N,w,$,Z,X):J(N,F,w,Z,$,X);if(M!==void 0){if(M)continue;q=!1;break}if(G){if(!j8($,function(E,V){if(!G.has(V)&&(N===E||Q(N,E,J,U,X)))return G.add(V)})){q=!1;break}}else if(!(N===F||Q(N,F,J,U,X))){q=!1;break}}return X.delete(Z),X.delete($),q},y1=function(Z,$,Q,J,U,X,B){switch(Q){case XZ:if(Z.byteLength!=$.byteLength||Z.byteOffset!=$.byteOffset)return!1;Z=Z.buffer,$=$.buffer;case C$:if(Z.byteLength!=$.byteLength||!J(new L$(Z),new L$($)))return!1;return!0;case M$:case z$:case V$:return h$(+Z,+$);case D$:return Z.name==$.name&&Z.message==$.message;case I$:case A$:return Z==$+"";case JZ:var Y=h8;case UZ:var W=X&p;if(Y||(Y=y8),Z.size!=$.size&&!W)return!1;var K=B.get(Z);if(K)return K==$;X|=KZ,B.set(Z,$);var w=p$(Y(Z),Y($),J,U,X,B);return B.delete(Z),w;case x$:if(AZ)return AZ.call(Z)==AZ.call($)}return!1},v1=function(Z,$,Q,J,U,X){var B=U&p,Y=WZ(Z),W=Y.length,K=WZ($),w=K.length;if(W!=w&&!B)return!1;var q=W;while(q--){var G=Y[q];if(!(B?G in $:P.call($,G)))return!1}var N=X.get(Z);if(N&&X.get($))return N==$;var F=!0;X.set(Z,$),X.set($,Z);var M=B;while(++q<W){G=Y[q];var E=Z[G],V=$[G];if(J)var sZ=B?J(V,E,G,$,Z,X):J(E,V,G,Z,$,X);if(!(sZ===void 0?E===V||Q(E,V,J,U,X):sZ)){F=!1;break}M||(M=G=="constructor")}if(F&&!M){var u=Z.constructor,l=$.constructor;if(u!=l&&(("constructor"in Z)&&("constructor"in $))&&!(typeof u=="function"&&u instanceof u&&typeof l=="function"&&l instanceof l))F=!1}return X.delete(Z),X.delete($),F},GZ=function(Z,$){var Q=Z.__data__;return u1($)?Q[typeof $=="string"?"string":"hash"]:Q.map},i1=function(Z){var $=WZ(Z),Q=$.length;while(Q--){var J=$[Q],U=Z[J];$[Q]=[J,U,k$(U)]}return $},k=function(Z,$){var Q=n8(Z,$);return T1(Q)?Q:void 0},c1=function(Z,$,Q){$=qZ($,Z)?[$]:j$($);var J,U=-1,B=$.length;while(++U<B){var X=_Z($[U]);if(!(J=Z!=null&&Q(Z,X)))break;Z=Z[X]}if(J)return J;var B=Z?Z.length:0;return!!B&&hZ(B)&&g$(X,B)&&(D(Z)||b$(Z))},g$=function(Z,$){return $=$==null?H$:$,!!$&&(typeof Z=="number"||T8.test(Z))&&(Z>-1&&Z%1==0&&Z<$)},qZ=function(Z,$){if(D(Z))return!1;var Q=typeof Z;if(Q=="number"||Q=="symbol"||Q=="boolean"||Z==null||bZ(Z))return!0;return S8.test(Z)||!D8.test(Z)||$!=null&&Z in Object($)},u1=function(Z){var $=typeof Z;return $=="string"||$=="number"||$=="symbol"||$=="boolean"?Z!=="__proto__":Z===null},l1=function(Z){return!!F$&&F$ in Z},s1=function(Z){var $=Z&&Z.constructor,Q=typeof $=="function"&&$.prototype||RZ;return Z===Q},k$=function(Z){return Z===Z&&!NZ(Z)},n$=function(Z,$){return function(Q){if(Q==null)return!1;return Q[Z]===$&&($!==void 0||(Z in Object(Q)))}},_Z=function(Z){if(typeof Z=="string"||bZ(Z))return Z;var $=Z+"";return $=="0"&&1/Z==-O$?"-0":$},C=function(Z){if(Z!=null){try{return m$.call(Z)}catch($){}try{return Z+""}catch($){}}return""},kZ=function(Z,$){if(typeof Z!="function"||$&&typeof $!="function")throw new TypeError(q8);var Q=function(){var J=arguments,U=$?$.apply(this,J):J[0],X=Q.cache;if(X.has(U))return X.get(U);var B=Z.apply(this,J);return Q.cache=X.set(U,B),B};return Q.cache=new(kZ.Cache||H),Q},h$=function(Z,$){return Z===$||Z!==Z&&$!==$},b$=function(Z){return t1(Z)&&P.call(Z,"callee")&&(!u8.call(Z,"callee")||g.call(Z)==QZ)},nZ=function(Z){return Z!=null&&hZ(Z.length)&&!y$(Z)},t1=function(Z){return FZ(Z)&&nZ(Z)},y$=function(Z){var $=NZ(Z)?g.call(Z):"";return $==S$||$==_8},hZ=function(Z){return typeof Z=="number"&&Z>-1&&Z%1==0&&Z<=H$},NZ=function(Z){var $=typeof Z;return!!Z&&($=="object"||$=="function")},FZ=function(Z){return!!Z&&typeof Z=="object"},bZ=function(Z){return typeof Z=="symbol"||FZ(Z)&&g.call(Z)==x$},e1=function(Z){return Z==null?"":k1(Z)},Z6=function(Z,$,Q){var J=Z==null?void 0:d$(Z,$);return J===void 0?Q:J},$6=function(Z,$){return Z!=null&&c1(Z,$,A1)},WZ=function(Z){return nZ(Z)?M1(Z):d1(Z)},Q6=function(Z){return Z},J6=function(Z){return qZ(Z)?p8(_Z(Z)):g1(Z)},G8=200,q8="Expected a function",pZ="__lodash_hash_undefined__",KZ=1,p=2,O$=1/0,H$=9007199254740991,QZ="[object Arguments]",xZ="[object Array]",M$="[object Boolean]",z$="[object Date]",D$="[object Error]",S$="[object Function]",_8="[object GeneratorFunction]",JZ="[object Map]",V$="[object Number]",d="[object Object]",w$="[object Promise]",I$="[object RegExp]",UZ="[object Set]",A$="[object String]",x$="[object Symbol]",CZ="[object WeakMap]",C$="[object ArrayBuffer]",XZ="[object DataView]",N8="[object Float32Array]",F8="[object Float64Array]",E8="[object Int8Array]",L8="[object Int16Array]",P8="[object Int32Array]",O8="[object Uint8Array]",H8="[object Uint8ClampedArray]",M8="[object Uint16Array]",z8="[object Uint32Array]",D8=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,S8=/^\w*$/,V8=/^\./,I8=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,A8=/[\\^$.*+?()[\]{}|]/g,x8=/\\(\\)?/g,C8=/^\[object .+?Constructor\]$/,T8=/^(?:0|[1-9]\d*)$/,R={};R[N8]=R[F8]=R[E8]=R[L8]=R[P8]=R[O8]=R[H8]=R[M8]=R[z8]=!0;R[QZ]=R[xZ]=R[C$]=R[M$]=R[XZ]=R[z$]=R[D$]=R[S$]=R[JZ]=R[V$]=R[d]=R[I$]=R[UZ]=R[A$]=R[CZ]=!1;var T$=typeof global=="object"&&global&&global.Object===Object&&global,f8=typeof self=="object"&&self&&self.Object===Object&&self,S=T$||f8||Function("return this")(),f$=typeof $Z=="object"&&$Z&&!$Z.nodeType&&$Z,G$=f$&&typeof j=="object"&&j&&!j.nodeType&&j,m8=G$&&G$.exports===f$,q$=m8&&T$.process,_$=function(){try{return q$&&q$.binding("util")}catch(Z){}}(),N$=_$&&_$.isTypedArray,v8=Array.prototype,i8=Function.prototype,RZ=Object.prototype,IZ=S["__core-js_shared__"],F$=function(){var Z=/[^.]+$/.exec(IZ&&IZ.keys&&IZ.keys.IE_PROTO||"");return Z?"Symbol(src)_1."+Z:""}(),m$=i8.toString,P=RZ.hasOwnProperty,g=RZ.toString,c8=RegExp("^"+m$.call(P).replace(A8,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),E$=S.Symbol,L$=S.Uint8Array,u8=RZ.propertyIsEnumerable,l8=v8.splice,s8=b8(Object.keys,Object),fZ=k(S,"DataView"),y=k(S,"Map"),mZ=k(S,"Promise"),dZ=k(S,"Set"),jZ=k(S,"WeakMap"),v=k(Object,"create"),o8=C(fZ),r8=C(y),t8=C(mZ),a8=C(dZ),e8=C(jZ),BZ=E$?E$.prototype:void 0,AZ=BZ?BZ.valueOf:void 0,P$=BZ?BZ.toString:void 0;x.prototype.clear=Z1;x.prototype.delete=$1;x.prototype.get=Q1;x.prototype.has=J1;x.prototype.set=U1;O.prototype.clear=X1;O.prototype.delete=B1;O.prototype.get=Y1;O.prototype.has=W1;O.prototype.set=K1;H.prototype.clear=R1;H.prototype.delete=w1;H.prototype.get=G1;H.prototype.has=q1;H.prototype.set=_1;YZ.prototype.add=YZ.prototype.push=N1;YZ.prototype.has=F1;L.prototype.clear=E1;L.prototype.delete=L1;L.prototype.get=P1;L.prototype.has=O1;L.prototype.set=H1;var D1=h1(V1),S1=b1(),z=I1;if(fZ&&z(new fZ(new ArrayBuffer(1)))!=XZ||y&&z(new y)!=JZ||mZ&&z(mZ.resolve())!=w$||dZ&&z(new dZ)!=UZ||jZ&&z(new jZ)!=CZ)z=function(Z){var $=g.call(Z),Q=$==d?Z.constructor:void 0,J=Q?C(Q):void 0;if(J)switch(J){case o8:return XZ;case r8:return JZ;case t8:return w$;case a8:return UZ;case e8:return CZ}return $};var o1=kZ(function(Z){Z=e1(Z);var $=[];if(V8.test(Z))$.push("");return Z.replace(I8,function(Q,J,U,X){$.push(U?X.replace(x8,"$1"):J||Q)}),$}),r1=n1(function(Z,$,Q){Z[Q]=$});kZ.Cache=H;var D=Array.isArray,a1=N$?k8(N$):f1;j.exports=r1});var UQ=PZ((FJ,JQ)=>{var E6=function(Z,$){return Z==null?void 0:Z[$]},L6=function(Z){var $=!1;if(Z!=null&&typeof Z.toString!="function")try{$=!!(Z+"")}catch(Q){}return $},T=function(Z){var $=-1,Q=Z?Z.length:0;this.clear();while(++$<Q){var J=Z[$];this.set(J[0],J[1])}},D6=function(){this.__data__=c?c(null):{}},S6=function(Z){return this.has(Z)&&delete this.__data__[Z]},V6=function(Z){var $=this.__data__;if(c){var Q=$[Z];return Q===o$?void 0:Q}return cZ.call($,Z)?$[Z]:void 0},I6=function(Z){var $=this.__data__;return c?$[Z]!==void 0:cZ.call($,Z)},A6=function(Z,$){var Q=this.__data__;return Q[Z]=c&&$===void 0?o$:$,this},n=function(Z){var $=-1,Q=Z?Z.length:0;this.clear();while(++$<Q){var J=Z[$];this.set(J[0],J[1])}},x6=function(){this.__data__=[]},C6=function(Z){var $=this.__data__,Q=EZ($,Z);if(Q<0)return!1;var J=$.length-1;if(Q==J)$.pop();else M6.call($,Q,1);return!0},T6=function(Z){var $=this.__data__,Q=EZ($,Z);return Q<0?void 0:$[Q][1]},f6=function(Z){return EZ(this.__data__,Z)>-1},m6=function(Z,$){var Q=this.__data__,J=EZ(Q,Z);if(J<0)Q.push([Z,$]);else Q[J][1]=$;return this},f=function(Z){var $=-1,Q=Z?Z.length:0;this.clear();while(++$<Q){var J=Z[$];this.set(J[0],J[1])}},d6=function(){this.__data__={hash:new T,map:new(z6||n),string:new T}},j6=function(Z){return LZ(this,Z).delete(Z)},p6=function(Z){return LZ(this,Z).get(Z)},g6=function(Z){return LZ(this,Z).has(Z)},k6=function(Z,$){return LZ(this,Z).set(Z,$),this},EZ=function(Z,$){var Q=Z.length;while(Q--)if(o6(Z[Q][0],$))return Q;return-1},n6=function(Z,$){$=v6($,Z)?[$]:y6($);var Q=0,J=$.length;while(Z!=null&&Q<J)Z=Z[l6($[Q++])];return Q&&Q==J?Z:void 0},h6=function(Z){if(!QQ(Z)||c6(Z))return!1;var $=r6(Z)||L6(Z)?H6:_6;return $.test(s6(Z))},b6=function(Z){if(typeof Z=="string")return Z;if(lZ(Z))return s$?s$.call(Z):"";var $=Z+"";return $=="0"&&1/Z==-r$?"-0":$},y6=function(Z){return $Q(Z)?Z:u6(Z)},LZ=function(Z,$){var Q=Z.__data__;return i6($)?Q[typeof $=="string"?"string":"hash"]:Q.map},ZQ=function(Z,$){var Q=E6(Z,$);return h6(Q)?Q:void 0},v6=function(Z,$){if($Q(Z))return!1;var Q=typeof Z;if(Q=="number"||Q=="symbol"||Q=="boolean"||Z==null||lZ(Z))return!0;return K6.test(Z)||!W6.test(Z)||$!=null&&Z in Object($)},i6=function(Z){var $=typeof Z;return $=="string"||$=="number"||$=="symbol"||$=="boolean"?Z!=="__proto__":Z===null},c6=function(Z){return!!c$&&c$ in Z},l6=function(Z){if(typeof Z=="string"||lZ(Z))return Z;var $=Z+"";return $=="0"&&1/Z==-r$?"-0":$},s6=function(Z){if(Z!=null){try{return a$.call(Z)}catch($){}try{return Z+""}catch($){}}return""},uZ=function(Z,$){if(typeof Z!="function"||$&&typeof $!="function")throw new TypeError(U6);var Q=function(){var J=arguments,U=$?$.apply(this,J):J[0],X=Q.cache;if(X.has(U))return X.get(U);var B=Z.apply(this,J);return Q.cache=X.set(U,B),B};return Q.cache=new(uZ.Cache||f),Q},o6=function(Z,$){return Z===$||Z!==Z&&$!==$},r6=function(Z){var $=QQ(Z)?e$.call(Z):"";return $==X6||$==B6},QQ=function(Z){var $=typeof Z;return!!Z&&($=="object"||$=="function")},t6=function(Z){return!!Z&&typeof Z=="object"},lZ=function(Z){return typeof Z=="symbol"||t6(Z)&&e$.call(Z)==Y6},a6=function(Z){return Z==null?"":b6(Z)},e6=function(Z,$,Q){var J=Z==null?void 0:n6(Z,$);return J===void 0?Q:J},U6="Expected a function",o$="__lodash_hash_undefined__",r$=1/0,X6="[object Function]",B6="[object GeneratorFunction]",Y6="[object Symbol]",W6=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,K6=/^\w*$/,R6=/^\./,w6=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,G6=/[\\^$.*+?()[\]{}|]/g,q6=/\\(\\)?/g,_6=/^\[object .+?Constructor\]$/,N6=typeof global=="object"&&global&&global.Object===Object&&global,F6=typeof self=="object"&&self&&self.Object===Object&&self,iZ=N6||F6||Function("return this")(),P6=Array.prototype,O6=Function.prototype,t$=Object.prototype,vZ=iZ["__core-js_shared__"],c$=function(){var Z=/[^.]+$/.exec(vZ&&vZ.keys&&vZ.keys.IE_PROTO||"");return Z?"Symbol(src)_1."+Z:""}(),a$=O6.toString,cZ=t$.hasOwnProperty,e$=t$.toString,H6=RegExp("^"+a$.call(cZ).replace(G6,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),u$=iZ.Symbol,M6=P6.splice,z6=ZQ(iZ,"Map"),c=ZQ(Object,"create"),l$=u$?u$.prototype:void 0,s$=l$?l$.toString:void 0;T.prototype.clear=D6;T.prototype.delete=S6;T.prototype.get=V6;T.prototype.has=I6;T.prototype.set=A6;n.prototype.clear=x6;n.prototype.delete=C6;n.prototype.get=T6;n.prototype.has=f6;n.prototype.set=m6;f.prototype.clear=d6;f.prototype.delete=j6;f.prototype.get=p6;f.prototype.has=g6;f.prototype.set=k6;var u6=uZ(function(Z){Z=a6(Z);var $=[];if(R6.test(Z))$.push("");return Z.replace(w6,function(Q,J,U,X){$.push(U?X.replace(q6,"$1"):J||Q)}),$});uZ.Cache=f;var $Q=Array.isArray;JQ.exports=e6});var K$=s(DZ(),1),e={isNamespace:(Z)=>Z&&!Z.type,flattenSchema(Z,$){return Object.entries(Z).reduce((Q,[J,U])=>{const X=$?`${$}.${J}`:J;if(e.isNamespace(U))Q={...Q,...e.flattenSchema(U,X)};else Object.assign(U,{name:X}),Q[X]=U;return Q},{})},wrapSchema(Z){return Object.values(Z).reduce(($,Q)=>{return K$.default($,Q.path,Q),$},{})}};var ZZ,K8=new Uint8Array(16);function SZ(){if(!ZZ){if(ZZ=typeof crypto!=="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ZZ)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}return ZZ(K8)}function R$(Z,$=0){return _[Z[$+0]]+_[Z[$+1]]+_[Z[$+2]]+_[Z[$+3]]+"-"+_[Z[$+4]]+_[Z[$+5]]+"-"+_[Z[$+6]]+_[Z[$+7]]+"-"+_[Z[$+8]]+_[Z[$+9]]+"-"+_[Z[$+10]]+_[Z[$+11]]+_[Z[$+12]]+_[Z[$+13]]+_[Z[$+14]]+_[Z[$+15]]}var _=[];for(let Z=0;Z<256;++Z)_.push((Z+256).toString(16).slice(1));var R8=typeof crypto!=="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),VZ={randomUUID:R8};var w8=function(Z,$,Q){if(VZ.randomUUID&&!$&&!Z)return VZ.randomUUID();Z=Z||{};const J=Z.random||(Z.rng||SZ)();if(J[6]=J[6]&15|64,J[8]=J[8]&63|128,$){Q=Q||0;for(let U=0;U<16;++U)$[Q+U]=J[U];return $}return R$(J)},b=w8;var i$=s(v$(),1),yZ=s(DZ(),1);class i{schemas;falttenSchema;uidSchemas;static type(Z){return Z}static middleware(Z){return Z}static Namespace(Z){return Z}static Var(Z){if(!Z.get)throw new Error("invalid Var params");const $=Z.get;return Z.get=async()=>{const Q=await $();return Z.value=Q,Q},{...Z,type:"var",uid:b()}}static Func(Z){return{...Z,type:"func",uid:b()}}static Action(Z){return{...Z,type:"action",uid:b()}}constructor(Z={}){Object.assign(this,Z),this.falttenSchema=e.flattenSchema(this.schemas),this.uidSchemas=i$.default(Object.values(this.falttenSchema),"uid")}static utils={async formatVar(Z,$){const{uid:Q,type:J,get:U,name:X}=Z,B=await U(),Y=Z.schema?Z.schema({val:B,v:Z,ctx:$}):{},W={uid:Q,type:J,name:X,value:B,set:!!Z.set,_schema:Y};return Z._schema=W._schema,await i.utils.formatSchema(W,$),W.schema=W._schema,W._schema=void 0,W},async formatFunc(Z,$){const{uid:Q,type:J,name:U,func:X}=Z,B=typeof Z.uiConfig=="function"?await Z.uiConfig():Z.uiConfig||{},Y={uid:Q,type:J,name:U,uiConfig:B,func:X,input:{}},W=(typeof Z.input=="function"?await Z.input($):Z.input)||{};return await Promise.all(Object.entries(W).map(async([K,w])=>{const q=typeof w=="function"?await w():w;if(!Y.uiConfig[K])Y.uiConfig[K]={};if(q.uiConfig)Object.assign(Y.uiConfig[K],q.uiConfig);if(q.enums)yZ.default(Y,`uiConfig[${K}].selectOptions`,q.enums.map((G)=>({label:G.label??G,value:G.value??G})));Y.input[K]=q.default||q})),Y},async formatSchema(Z,$){if(Z._schema){let Q=Array.isArray(Z.value)&&typeof Z.value[0]=="object"?Z.value[0]:Z.value;if(Z.value)Object.entries(Q).map(([J,U])=>{if(Z._schema[J])return;Z._schema[J]={type:typeof U,default:U}});Z._schema=(await Promise.all(Object.entries(Z._schema).filter(([J,U])=>{if(U.use)return U.use.filter((X)=>!!X.filter).every((X)=>X.filter($)==!0);return!0}).map(async([J,U])=>{if(!U)return;let X=typeof U=="function"?U():U,B=X;if(B.enums)yZ.default(Z._schema[J],"uiConfig.selectOptions",B.enums.map((Y)=>({label:Y.label??Y,value:Y.value??Y})));if(X.uiConfig&&typeof X.uiConfig=="function")X.uiConfig=X.uiConfig();if(X.input)X=await i.utils.formatFunc(X,Z);return[J,X]}))).reduce((J,U)=>{return J[U[0]]=U[1],J},{})}}};async loadFull(Z){return Promise.all(Object.entries(this.falttenSchema).filter(([$,Q])=>{if(Z?.namespace&&!$.startsWith(Z.namespace))return;if(Q.use)return Q.use.filter((J)=>!!J.filter).every((J)=>J.filter(Z?.ctx)==!0);return!0}).map(async([$,Q])=>{if(Q.type=="func")return i.utils.formatFunc(Q);if(Q.type=="var")return i.utils.formatVar(Q,Z?.ctx);return{type:"unknown",name:$}}))}async loadVars(Z){return Promise.all(Object.entries(this.falttenSchema).filter(([$,Q])=>{if(Z?.namespace&&!$.startsWith(Z.namespace))return;if(Q.type=="var")return Q.type=="var"}).map(async([$,Q])=>{const{get:J,name:U}=Q,X=await J();return{name:U,value:X}}))}}var XQ=s(UQ(),1),EJ=(Z)=>{return{schema:{async loadFull($){return fetch(`${Z.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"schema.loadFull",params:$})}).then((Q)=>Q.json())},async loadVars($){return fetch(`${Z.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"schema.loadVars",params:$})}).then((Q)=>Q.json())}},func:{async call($){return fetch(`${Z.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"func.call",params:$})}).then((Q)=>Q.json())}},var:{async set($){return fetch(`${Z.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"var.set",params:$})}).then((Q)=>Q.json())},async action($){return fetch(`${Z.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"var.action",params:$})}).then((Q)=>Q.json())},async call($){return fetch(`${Z.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"var.call",params:$})}).then((Q)=>Q.json())}}}},LJ=({urpc:Z})=>{const $={urpc:Z,handle({name:Q,params:J={}},U){const X=XQ.default($,Q);if(!X)throw new Error("invalid name");return J.ctx=U,X(J,U)},schema:{async loadFull(Q){return Z.loadFull(Q)},async loadVars(Q){return Z.loadVars(Q)}},func:{async call(Q){const J=Z.uidSchemas[Q.method]||Z.falttenSchema[Q.method];if(!J)throw new Error("invalid func name");return J.func(Q)}},var:{async set(Q){const J=Z.uidSchemas[Q.name]||Z.falttenSchema[Q.name];if(!J)throw new Error("invalid var name");if(!J.set)throw new Error("variable can't be set");return J.set(Q.value)},async action(Q){const J=Z.uidSchemas[Q.name]||Z.falttenSchema[Q.name];if(!J)throw new Error("invalid var name");const U=J._schema[Q.action];if(!U)throw new Error("invalid action name");return U.func({...Q,val:Q.value})},async call(Q){const J=Z.uidSchemas[Q.name]||Z.falttenSchema[Q.name];if(!J)throw new Error("invalid var name");const U=J._schema[Q.method];if(!U)throw new Error("invalid func name");return Q.value=J.value,U.func({...Q,val:J.value})}}};return $};export{e as utils,EJ as createSimpleHttpClient,LJ as createServerClient,i as URPC};
{
"name": "@dappworks/urpc",
"version": "0.0.59",
"version": "0.0.60",
"module": "index.ts",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc