@dappworks/urpc
Advanced tools
Comparing version 0.0.12 to 0.0.13
// Generated by dts-bundle-generator v9.5.1 | ||
import { UiSchema } from '@rjsf/utils'; | ||
import { Operation, PatchResult } from 'fast-json-patch'; | ||
@@ -33,3 +34,3 @@ export declare const utils: { | ||
} | ||
export interface URPC_Variable<T extends () => any = () => any, R = any> { | ||
export interface URPC_Variable<T extends () => any = () => any, R = any, V = any> { | ||
uid: string; | ||
@@ -40,2 +41,3 @@ type?: "var"; | ||
get: T; | ||
patch?: (value: Operation[]) => PatchResult<any>; | ||
set?: R extends () => infer U ? (value: ReturnType<T>) => U : never; | ||
@@ -54,10 +56,2 @@ uiConfig?: () => FormConfigType<ReturnType<T>>; | ||
static Func<T extends Object = {}, R = any>(args: Partial<URPC_Function<T, R>>): URPC_Function<T, R>; | ||
static UI: { | ||
Table({ actions }: { | ||
actions: { | ||
title: string; | ||
event: string; | ||
}[]; | ||
}): FormConfigItem; | ||
}; | ||
constructor(args?: Partial<URPC<T>>); | ||
@@ -104,7 +98,7 @@ loadFull(): ({ | ||
method: R; | ||
input: T[R] extends URPC_Function<infer Z extends Object, any> ? Z : never; | ||
input: Partial<T[R] extends URPC_Function<infer Z extends Object, any> ? Z : never>; | ||
}): Promise<T[R] extends URPC_Function<any, infer Z_1> ? Z_1 : never>; | ||
}; | ||
var: { | ||
set<R_1 extends keyof T, V extends T[R_1] extends URPC_Variable<infer Z_2 extends () => any, any> ? Z_2 : never>(params: { | ||
set<R_1 extends keyof T, V extends T[R_1] extends URPC_Variable<infer Z_2 extends () => any, any, any> ? Z_2 : never>(params: { | ||
name: R_1; | ||
@@ -115,3 +109,3 @@ value: ReturnType<V>; | ||
name: string; | ||
value: any; | ||
ops: Operation[]; | ||
}): Promise<any>; | ||
@@ -172,4 +166,4 @@ }; | ||
name: string; | ||
value: any; | ||
}): Promise<never>; | ||
ops: Operation[]; | ||
}): Promise<any>; | ||
}; | ||
@@ -176,0 +170,0 @@ }; |
@@ -1,1 +0,1 @@ | ||
var Q$=Object.create;var{defineProperty:uU,getPrototypeOf:J$,getOwnPropertyNames:B$}=Object;var X$=Object.prototype.hasOwnProperty;var NU=(U,Z,$)=>{$=U!=null?Q$(J$(U)):{};const R=Z||!U||!U.__esModule?uU($,"default",{value:U,enumerable:!0}):$;for(let Q of B$(U))if(!X$.call(R,Q))uU(R,Q,{get:()=>U[Q],enumerable:!0});return R};var EU=(U,Z)=>()=>(Z||U((Z={exports:{}}).exports,Z),Z.exports);var BZ=EU((U1,JZ)=>{var z$=function(U,Z){return U==null?void 0:U[Z]},D$=function(U){var Z=!1;if(U!=null&&typeof U.toString!="function")try{Z=!!(U+"")}catch($){}return Z},I=function(U){var Z=-1,$=U?U.length:0;this.clear();while(++Z<$){var R=U[Z];this.set(R[0],R[1])}},A$=function(){this.__data__=y?y(null):{}},T$=function(U){return this.has(U)&&delete this.__data__[U]},f$=function(U){var Z=this.__data__;if(y){var $=Z[U];return $===tU?void 0:$}return s.call(Z,U)?Z[U]:void 0},m$=function(U){var Z=this.__data__;return y?Z[U]!==void 0:s.call(Z,U)},d$=function(U,Z){var $=this.__data__;return $[U]=y&&Z===void 0?tU:Z,this},m=function(U){var Z=-1,$=U?U.length:0;this.clear();while(++Z<$){var R=U[Z];this.set(R[0],R[1])}},p$=function(){this.__data__=[]},g$=function(U){var Z=this.__data__,$=l(Z,U);if($<0)return!1;var R=Z.length-1;if($==R)Z.pop();else x$.call(Z,$,1);return!0},j$=function(U){var Z=this.__data__,$=l(Z,U);return $<0?void 0:Z[$][1]},n$=function(U){return l(this.__data__,U)>-1},k$=function(U,Z){var $=this.__data__,R=l($,U);if(R<0)$.push([U,Z]);else $[R][1]=Z;return this},x=function(U){var Z=-1,$=U?U.length:0;this.clear();while(++Z<$){var R=U[Z];this.set(R[0],R[1])}},y$=function(){this.__data__={hash:new I,map:new(C$||m),string:new I}},h$=function(U){return o(this,U).delete(U)},b$=function(U){return o(this,U).get(U)},i$=function(U){return o(this,U).has(U)},v$=function(U,Z){return o(this,U).set(U,Z),this},c$=function(U,Z,$){var R=U[Z];if(!(s.call(U,Z)&&RZ(R,$))||$===void 0&&!(Z in U))U[Z]=$},l=function(U,Z){var $=U.length;while($--)if(RZ(U[$][0],Z))return $;return-1},u$=function(U){if(!u(U)||e$(U))return!1;var Z=RR(U)||D$(U)?I$:L$;return Z.test($R(U))},s$=function(U,Z,$,R){if(!u(U))return U;Z=t$(Z,U)?[Z]:o$(Z);var Q=-1,J=Z.length,B=J-1,X=U;while(X!=null&&++Q<J){var Y=ZR(Z[Q]),K=$;if(Q!=B){var _=X[Y];if(K=R?R(_,Y,X):void 0,K===void 0)K=u(_)?_:r$(Z[Q+1])?[]:{}}c$(X,Y,K),X=X[Y]}return U},l$=function(U){if(typeof U=="string")return U;if(MU(U))return rU?rU.call(U):"";var Z=U+"";return Z=="0"&&1/U==-aU?"-0":Z},o$=function(U){return QZ(U)?U:UR(U)},o=function(U,Z){var $=U.__data__;return a$(Z)?$[typeof Z=="string"?"string":"hash"]:$.map},$Z=function(U,Z){var $=z$(U,Z);return u$($)?$:void 0},r$=function(U,Z){return Z=Z==null?W$:Z,!!Z&&(typeof U=="number"||O$.test(U))&&(U>-1&&U%1==0&&U<Z)},t$=function(U,Z){if(QZ(U))return!1;var $=typeof U;if($=="number"||$=="symbol"||$=="boolean"||U==null||MU(U))return!0;return q$.test(U)||!G$.test(U)||Z!=null&&U in Object(Z)},a$=function(U){var Z=typeof U;return Z=="string"||Z=="number"||Z=="symbol"||Z=="boolean"?U!=="__proto__":U===null},e$=function(U){return!!sU&&sU in U},ZR=function(U){if(typeof U=="string"||MU(U))return U;var Z=U+"";return Z=="0"&&1/U==-aU?"-0":Z},$R=function(U){if(U!=null){try{return UZ.call(U)}catch(Z){}try{return U+""}catch(Z){}}return""},HU=function(U,Z){if(typeof U!="function"||Z&&typeof Z!="function")throw new TypeError(Y$);var $=function(){var R=arguments,Q=Z?Z.apply(this,R):R[0],J=$.cache;if(J.has(Q))return J.get(Q);var B=U.apply(this,R);return $.cache=J.set(Q,B),B};return $.cache=new(HU.Cache||x),$},RZ=function(U,Z){return U===Z||U!==U&&Z!==Z},RR=function(U){var Z=u(U)?ZZ.call(U):"";return Z==K$||Z==_$},u=function(U){var Z=typeof U;return!!U&&(Z=="object"||Z=="function")},QR=function(U){return!!U&&typeof U=="object"},MU=function(U){return typeof U=="symbol"||QR(U)&&ZZ.call(U)==w$},JR=function(U){return U==null?"":l$(U)},BR=function(U,Z,$){return U==null?U:s$(U,Z,$)},Y$="Expected a function",tU="__lodash_hash_undefined__",aU=Infinity,W$=9007199254740991,K$="[object Function]",_$="[object GeneratorFunction]",w$="[object Symbol]",G$=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,q$=/^\w*$/,F$=/^\./,P$=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,N$=/[\\^$.*+?()[\]{}|]/g,E$=/\\(\\)?/g,L$=/^\[object .+?Constructor\]$/,O$=/^(?:0|[1-9]\d*)$/,H$=typeof global=="object"&&global&&global.Object===Object&&global,M$=typeof self=="object"&&self&&self.Object===Object&&self,OU=H$||M$||Function("return this")(),S$=Array.prototype,V$=Function.prototype,eU=Object.prototype,LU=OU["__core-js_shared__"],sU=function(){var U=/[^.]+$/.exec(LU&&LU.keys&&LU.keys.IE_PROTO||"");return U?"Symbol(src)_1."+U:""}(),UZ=V$.toString,s=eU.hasOwnProperty,ZZ=eU.toString,I$=RegExp("^"+UZ.call(s).replace(N$,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),lU=OU.Symbol,x$=S$.splice,C$=$Z(OU,"Map"),y=$Z(Object,"create"),oU=lU?lU.prototype:void 0,rU=oU?oU.toString:void 0;I.prototype.clear=A$;I.prototype.delete=T$;I.prototype.get=f$;I.prototype.has=m$;I.prototype.set=d$;m.prototype.clear=p$;m.prototype.delete=g$;m.prototype.get=j$;m.prototype.has=n$;m.prototype.set=k$;x.prototype.clear=y$;x.prototype.delete=h$;x.prototype.get=b$;x.prototype.has=i$;x.prototype.set=v$;var UR=HU(function(U){U=JR(U);var Z=[];if(F$.test(U))Z.push("");return U.replace(P$,function($,R,Q,J){Z.push(Q?J.replace(E$,"$1"):R||$)}),Z});HU.Cache=x;var QZ=Array.isArray;JZ.exports=BR});var hZ=EU((e,p)=>{var fR=function(U,Z,$,R){var Q=-1,J=U?U.length:0;while(++Q<J){var B=U[Q];Z(R,B,$(B),U)}return R},mR=function(U,Z){var $=-1,R=U?U.length:0;while(++$<R)if(Z(U[$],$,U))return!0;return!1},dR=function(U){return function(Z){return Z==null?void 0:Z[U]}},pR=function(U,Z){var $=-1,R=Array(U);while(++$<U)R[$]=Z($);return R},gR=function(U){return function(Z){return U(Z)}},jR=function(U,Z){return U==null?void 0:U[Z]},CU=function(U){var Z=!1;if(U!=null&&typeof U.toString!="function")try{Z=!!(U+"")}catch($){}return Z},nR=function(U){var Z=-1,$=Array(U.size);return U.forEach(function(R,Q){$[++Z]=[Q,R]}),$},kR=function(U,Z){return function($){return U(Z($))}},yR=function(U){var Z=-1,$=Array(U.size);return U.forEach(function(R){$[++Z]=R}),$},C=function(U){var Z=-1,$=U?U.length:0;this.clear();while(++Z<$){var R=U[Z];this.set(R[0],R[1])}},aR=function(){this.__data__=b?b(null):{}},eR=function(U){return this.has(U)&&delete this.__data__[U]},UQ=function(U){var Z=this.__data__;if(b){var $=Z[U];return $===dU?void 0:$}return L.call(Z,U)?Z[U]:void 0},ZQ=function(U){var Z=this.__data__;return b?Z[U]!==void 0:L.call(Z,U)},$Q=function(U,Z){var $=this.__data__;return $[U]=b&&Z===void 0?dU:Z,this},O=function(U){var Z=-1,$=U?U.length:0;this.clear();while(++Z<$){var R=U[Z];this.set(R[0],R[1])}},RQ=function(){this.__data__=[]},QQ=function(U){var Z=this.__data__,$=WU(Z,U);if($<0)return!1;var R=Z.length-1;if($==R)Z.pop();else cR.call(Z,$,1);return!0},JQ=function(U){var Z=this.__data__,$=WU(Z,U);return $<0?void 0:Z[$][1]},BQ=function(U){return WU(this.__data__,U)>-1},XQ=function(U,Z){var $=this.__data__,R=WU($,U);if(R<0)$.push([U,Z]);else $[R][1]=Z;return this},H=function(U){var Z=-1,$=U?U.length:0;this.clear();while(++Z<$){var R=U[Z];this.set(R[0],R[1])}},YQ=function(){this.__data__={hash:new C,map:new(h||O),string:new C}},WQ=function(U){return KU(this,U).delete(U)},KQ=function(U){return KU(this,U).get(U)},_Q=function(U){return KU(this,U).has(U)},wQ=function(U,Z){return KU(this,U).set(U,Z),this},JU=function(U){var Z=-1,$=U?U.length:0;this.__data__=new H;while(++Z<$)this.add(U[Z])},GQ=function(U){return this.__data__.set(U,dU),this},qQ=function(U){return this.__data__.has(U)},E=function(U){this.__data__=new O(U)},FQ=function(){this.__data__=new O},PQ=function(U){return this.__data__.delete(U)},NQ=function(U){return this.__data__.get(U)},EQ=function(U){return this.__data__.has(U)},LQ=function(U,Z){var $=this.__data__;if($ instanceof O){var R=$.__data__;if(!h||R.length<KR-1)return R.push([U,Z]),this;$=this.__data__=new H(R)}return $.set(U,Z),this},OQ=function(U,Z){var $=D(U)||kZ(U)?pR(U.length,String):[],R=$.length,Q=!!R;for(var J in U)if((Z||L.call(U,J))&&!(Q&&(J=="length"||pZ(J,R))))$.push(J);return $},WU=function(U,Z){var $=U.length;while($--)if(nZ(U[$][0],Z))return $;return-1},HQ=function(U,Z,$,R){return MQ(U,function(Q,J,B){Z(R,Q,$(Q),B)}),R},DQ=function(U,Z){return U&&zQ(U,Z,BU)},fZ=function(U,Z){Z=_U(Z,U)?[Z]:mZ(Z);var $=0,R=Z.length;while(U!=null&&$<R)U=U[wU(Z[$++])];return $&&$==R?U:void 0},SQ=function(U){return j.call(U)},VQ=function(U,Z){return U!=null&&Z in Object(U)},pU=function(U,Z,$,R,Q){if(U===Z)return!0;if(U==null||Z==null||!GU(U)&&!qU(Z))return U!==U&&Z!==Z;return IQ(U,Z,pU,$,R,Q)},IQ=function(U,Z,$,R,Q,J){var B=D(U),X=D(Z),Y=IU,K=IU;if(!B)Y=z(U),Y=Y==UU?d:Y;if(!X)K=z(Z),K=K==UU?d:K;var _=Y==d&&!CU(U),q=K==d&&!CU(Z),w=Y==K;if(w&&!_)return J||(J=new E),B||rQ(U)?dZ(U,Z,$,R,Q,J):yQ(U,Z,Y,$,R,Q,J);if(!(Q&g)){var F=_&&L.call(U,"__wrapped__"),P=q&&L.call(Z,"__wrapped__");if(F||P){var M=F?U.value():U,N=P?Z.value():Z;return J||(J=new E),$(M,N,R,Q,J)}}if(!w)return!1;return J||(J=new E),hQ(U,Z,$,R,Q,J)},xQ=function(U,Z,$,R){var Q=$.length,J=Q,B=!R;if(U==null)return!J;U=Object(U);while(Q--){var X=$[Q];if(B&&X[2]?X[1]!==U[X[0]]:!(X[0]in U))return!1}while(++Q<J){X=$[Q];var Y=X[0],K=U[Y],_=X[1];if(B&&X[2]){if(K===void 0&&!(Y in U))return!1}else{var q=new E;if(R)var w=R(K,_,Y,U,Z,q);if(!(w===void 0?pU(_,K,R,XU|g,q):w))return!1}}return!0},CQ=function(U){if(!GU(U)||cQ(U))return!1;var Z=yZ(U)||CU(U)?iR:xR;return Z.test(A(U))},AQ=function(U){return qU(U)&&nU(U.length)&&!!W[j.call(U)]},TQ=function(U){if(typeof U=="function")return U;if(U==null)return U8;if(typeof U=="object")return D(U)?dQ(U[0],U[1]):mQ(U);return Z8(U)},fQ=function(U){if(!uQ(U))return uR(U);var Z=[];for(var $ in Object(U))if(L.call(U,$)&&$!="constructor")Z.push($);return Z},mQ=function(U){var Z=bQ(U);if(Z.length==1&&Z[0][2])return jZ(Z[0][0],Z[0][1]);return function($){return $===U||xQ($,U,Z)}},dQ=function(U,Z){if(_U(U)&&gZ(Z))return jZ(wU(U),Z);return function($){var R=aQ($,U);return R===void 0&&R===Z?eQ($,U):pU(Z,R,void 0,XU|g)}},pQ=function(U){return function(Z){return fZ(Z,U)}},gQ=function(U){if(typeof U=="string")return U;if(kU(U))return NZ?NZ.call(U):"";var Z=U+"";return Z=="0"&&1/U==-EZ?"-0":Z},mZ=function(U){return D(U)?U:sQ(U)},jQ=function(U,Z){return function($,R){var Q=D($)?fR:HQ,J=Z?Z():{};return Q($,U,TQ(R,2),J)}},nQ=function(U,Z){return function($,R){if($==null)return $;if(!jU($))return U($,R);var Q=$.length,J=Z?Q:-1,B=Object($);while(Z?J--:++J<Q)if(R(B[J],J,B)===!1)break;return $}},kQ=function(U){return function(Z,$,R){var Q=-1,J=Object(Z),B=R(Z),X=B.length;while(X--){var Y=B[U?X:++Q];if($(J[Y],Y,J)===!1)break}return Z}},dZ=function(U,Z,$,R,Q,J){var B=Q&g,X=U.length,Y=Z.length;if(X!=Y&&!(B&&Y>X))return!1;var K=J.get(U);if(K&&J.get(Z))return K==Z;var _=-1,q=!0,w=Q&XU?new JU:void 0;J.set(U,Z),J.set(Z,U);while(++_<X){var F=U[_],P=Z[_];if(R)var M=B?R(P,F,_,Z,U,J):R(F,P,_,U,Z,J);if(M!==void 0){if(M)continue;q=!1;break}if(w){if(!mR(Z,function(N,V){if(!w.has(V)&&(F===N||$(F,N,R,Q,J)))return w.add(V)})){q=!1;break}}else if(!(F===P||$(F,P,R,Q,J))){q=!1;break}}return J.delete(U),J.delete(Z),q},yQ=function(U,Z,$,R,Q,J,B){switch($){case RU:if(U.byteLength!=Z.byteLength||U.byteOffset!=Z.byteOffset)return!1;U=U.buffer,Z=Z.buffer;case xZ:if(U.byteLength!=Z.byteLength||!R(new PZ(U),new PZ(Z)))return!1;return!0;case OZ:case HZ:case DZ:return nZ(+U,+Z);case MZ:return U.name==Z.name&&U.message==Z.message;case SZ:case VZ:return U==Z+"";case ZU:var X=nR;case $U:var Y=J&g;if(X||(X=yR),U.size!=Z.size&&!Y)return!1;var K=B.get(U);if(K)return K==Z;J|=XU,B.set(U,Z);var _=dZ(X(U),X(Z),R,Q,J,B);return B.delete(U),_;case IZ:if(VU)return VU.call(U)==VU.call(Z)}return!1},hQ=function(U,Z,$,R,Q,J){var B=Q&g,X=BU(U),Y=X.length,K=BU(Z),_=K.length;if(Y!=_&&!B)return!1;var q=Y;while(q--){var w=X[q];if(!(B?w in Z:L.call(Z,w)))return!1}var F=J.get(U);if(F&&J.get(Z))return F==Z;var P=!0;J.set(U,Z),J.set(Z,U);var M=B;while(++q<Y){w=X[q];var N=U[w],V=Z[w];if(R)var cU=B?R(V,N,w,Z,U,J):R(N,V,w,U,Z,J);if(!(cU===void 0?N===V||$(N,V,R,Q,J):cU)){P=!1;break}M||(M=w=="constructor")}if(P&&!M){var v=U.constructor,c=Z.constructor;if(v!=c&&(("constructor"in U)&&("constructor"in Z))&&!(typeof v=="function"&&v instanceof v&&typeof c=="function"&&c instanceof c))P=!1}return J.delete(U),J.delete(Z),P},KU=function(U,Z){var $=U.__data__;return vQ(Z)?$[typeof Z=="string"?"string":"hash"]:$.map},bQ=function(U){var Z=BU(U),$=Z.length;while($--){var R=Z[$],Q=U[R];Z[$]=[R,Q,gZ(Q)]}return Z},n=function(U,Z){var $=jR(U,Z);return CQ($)?$:void 0},iQ=function(U,Z,$){Z=_U(Z,U)?[Z]:mZ(Z);var R,Q=-1,B=Z.length;while(++Q<B){var J=wU(Z[Q]);if(!(R=U!=null&&$(U,J)))break;U=U[J]}if(R)return R;var B=U?U.length:0;return!!B&&nU(B)&&pZ(J,B)&&(D(U)||kZ(U))},pZ=function(U,Z){return Z=Z==null?LZ:Z,!!Z&&(typeof U=="number"||CR.test(U))&&(U>-1&&U%1==0&&U<Z)},_U=function(U,Z){if(D(U))return!1;var $=typeof U;if($=="number"||$=="symbol"||$=="boolean"||U==null||kU(U))return!0;return zR.test(U)||!MR.test(U)||Z!=null&&U in Object(Z)},vQ=function(U){var Z=typeof U;return Z=="string"||Z=="number"||Z=="symbol"||Z=="boolean"?U!=="__proto__":U===null},cQ=function(U){return!!qZ&&qZ in U},uQ=function(U){var Z=U&&U.constructor,$=typeof Z=="function"&&Z.prototype||YU;return U===$},gZ=function(U){return U===U&&!GU(U)},jZ=function(U,Z){return function($){if($==null)return!1;return $[U]===Z&&(Z!==void 0||(U in Object($)))}},wU=function(U){if(typeof U=="string"||kU(U))return U;var Z=U+"";return Z=="0"&&1/U==-EZ?"-0":Z},A=function(U){if(U!=null){try{return TZ.call(U)}catch(Z){}try{return U+""}catch(Z){}}return""},gU=function(U,Z){if(typeof U!="function"||Z&&typeof Z!="function")throw new TypeError(_R);var $=function(){var R=arguments,Q=Z?Z.apply(this,R):R[0],J=$.cache;if(J.has(Q))return J.get(Q);var B=U.apply(this,R);return $.cache=J.set(Q,B),B};return $.cache=new(gU.Cache||H),$},nZ=function(U,Z){return U===Z||U!==U&&Z!==Z},kZ=function(U){return oQ(U)&&L.call(U,"callee")&&(!vR.call(U,"callee")||j.call(U)==UU)},jU=function(U){return U!=null&&nU(U.length)&&!yZ(U)},oQ=function(U){return qU(U)&&jU(U)},yZ=function(U){var Z=GU(U)?j.call(U):"";return Z==zZ||Z==wR},nU=function(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=LZ},GU=function(U){var Z=typeof U;return!!U&&(Z=="object"||Z=="function")},qU=function(U){return!!U&&typeof U=="object"},kU=function(U){return typeof U=="symbol"||qU(U)&&j.call(U)==IZ},tQ=function(U){return U==null?"":gQ(U)},aQ=function(U,Z,$){var R=U==null?void 0:fZ(U,Z);return R===void 0?$:R},eQ=function(U,Z){return U!=null&&iQ(U,Z,VQ)},BU=function(U){return jU(U)?OQ(U):fQ(U)},U8=function(U){return U},Z8=function(U){return _U(U)?dR(wU(U)):pQ(U)},KR=200,_R="Expected a function",dU="__lodash_hash_undefined__",XU=1,g=2,EZ=Infinity,LZ=9007199254740991,UU="[object Arguments]",IU="[object Array]",OZ="[object Boolean]",HZ="[object Date]",MZ="[object Error]",zZ="[object Function]",wR="[object GeneratorFunction]",ZU="[object Map]",DZ="[object Number]",d="[object Object]",WZ="[object Promise]",SZ="[object RegExp]",$U="[object Set]",VZ="[object String]",IZ="[object Symbol]",xU="[object WeakMap]",xZ="[object ArrayBuffer]",RU="[object DataView]",GR="[object Float32Array]",qR="[object Float64Array]",FR="[object Int8Array]",PR="[object Int16Array]",NR="[object Int32Array]",ER="[object Uint8Array]",LR="[object Uint8ClampedArray]",OR="[object Uint16Array]",HR="[object Uint32Array]",MR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,zR=/^\w*$/,DR=/^\./,SR=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,VR=/[\\^$.*+?()[\]{}|]/g,IR=/\\(\\)?/g,xR=/^\[object .+?Constructor\]$/,CR=/^(?:0|[1-9]\d*)$/,W={};W[GR]=W[qR]=W[FR]=W[PR]=W[NR]=W[ER]=W[LR]=W[OR]=W[HR]=!0;W[UU]=W[IU]=W[xZ]=W[OZ]=W[RU]=W[HZ]=W[MZ]=W[zZ]=W[ZU]=W[DZ]=W[d]=W[SZ]=W[$U]=W[VZ]=W[xU]=!1;var CZ=typeof global=="object"&&global&&global.Object===Object&&global,AR=typeof self=="object"&&self&&self.Object===Object&&self,S=CZ||AR||Function("return this")(),AZ=typeof e=="object"&&e&&!e.nodeType&&e,KZ=AZ&&typeof p=="object"&&p&&!p.nodeType&&p,TR=KZ&&KZ.exports===AZ,_Z=TR&&CZ.process,wZ=function(){try{return _Z&&_Z.binding("util")}catch(U){}}(),GZ=wZ&&wZ.isTypedArray,hR=Array.prototype,bR=Function.prototype,YU=Object.prototype,SU=S["__core-js_shared__"],qZ=function(){var U=/[^.]+$/.exec(SU&&SU.keys&&SU.keys.IE_PROTO||"");return U?"Symbol(src)_1."+U:""}(),TZ=bR.toString,L=YU.hasOwnProperty,j=YU.toString,iR=RegExp("^"+TZ.call(L).replace(VR,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),FZ=S.Symbol,PZ=S.Uint8Array,vR=YU.propertyIsEnumerable,cR=hR.splice,uR=kR(Object.keys,Object),AU=n(S,"DataView"),h=n(S,"Map"),TU=n(S,"Promise"),fU=n(S,"Set"),mU=n(S,"WeakMap"),b=n(Object,"create"),sR=A(AU),lR=A(h),oR=A(TU),rR=A(fU),tR=A(mU),QU=FZ?FZ.prototype:void 0,VU=QU?QU.valueOf:void 0,NZ=QU?QU.toString:void 0;C.prototype.clear=aR;C.prototype.delete=eR;C.prototype.get=UQ;C.prototype.has=ZQ;C.prototype.set=$Q;O.prototype.clear=RQ;O.prototype.delete=QQ;O.prototype.get=JQ;O.prototype.has=BQ;O.prototype.set=XQ;H.prototype.clear=YQ;H.prototype.delete=WQ;H.prototype.get=KQ;H.prototype.has=_Q;H.prototype.set=wQ;JU.prototype.add=JU.prototype.push=GQ;JU.prototype.has=qQ;E.prototype.clear=FQ;E.prototype.delete=PQ;E.prototype.get=NQ;E.prototype.has=EQ;E.prototype.set=LQ;var MQ=nQ(DQ),zQ=kQ(),z=SQ;if(AU&&z(new AU(new ArrayBuffer(1)))!=RU||h&&z(new h)!=ZU||TU&&z(TU.resolve())!=WZ||fU&&z(new fU)!=$U||mU&&z(new mU)!=xU)z=function(U){var Z=j.call(U),$=Z==d?U.constructor:void 0,R=$?A($):void 0;if(R)switch(R){case sR:return RU;case lR:return ZU;case oR:return WZ;case rR:return $U;case tR:return xU}return Z};var sQ=gU(function(U){U=tQ(U);var Z=[];if(DR.test(U))Z.push("");return U.replace(SR,function($,R,Q,J){Z.push(Q?J.replace(IR,"$1"):R||$)}),Z}),lQ=jQ(function(U,Z,$){U[$]=Z});gU.Cache=H;var D=Array.isArray,rQ=GZ?gR(GZ):AQ;p.exports=lQ});var $$=EU((F1,Z$)=>{var P8=function(U,Z){return U==null?void 0:U[Z]},N8=function(U){var Z=!1;if(U!=null&&typeof U.toString!="function")try{Z=!!(U+"")}catch($){}return Z},T=function(U){var Z=-1,$=U?U.length:0;this.clear();while(++Z<$){var R=U[Z];this.set(R[0],R[1])}},z8=function(){this.__data__=i?i(null):{}},D8=function(U){return this.has(U)&&delete this.__data__[U]},S8=function(U){var Z=this.__data__;if(i){var $=Z[U];return $===sZ?void 0:$}return bU.call(Z,U)?Z[U]:void 0},V8=function(U){var Z=this.__data__;return i?Z[U]!==void 0:bU.call(Z,U)},I8=function(U,Z){var $=this.__data__;return $[U]=i&&Z===void 0?sZ:Z,this},k=function(U){var Z=-1,$=U?U.length:0;this.clear();while(++Z<$){var R=U[Z];this.set(R[0],R[1])}},x8=function(){this.__data__=[]},C8=function(U){var Z=this.__data__,$=FU(Z,U);if($<0)return!1;var R=Z.length-1;if($==R)Z.pop();else H8.call(Z,$,1);return!0},A8=function(U){var Z=this.__data__,$=FU(Z,U);return $<0?void 0:Z[$][1]},T8=function(U){return FU(this.__data__,U)>-1},f8=function(U,Z){var $=this.__data__,R=FU($,U);if(R<0)$.push([U,Z]);else $[R][1]=Z;return this},f=function(U){var Z=-1,$=U?U.length:0;this.clear();while(++Z<$){var R=U[Z];this.set(R[0],R[1])}},m8=function(){this.__data__={hash:new T,map:new(M8||k),string:new T}},d8=function(U){return PU(this,U).delete(U)},p8=function(U){return PU(this,U).get(U)},g8=function(U){return PU(this,U).has(U)},j8=function(U,Z){return PU(this,U).set(U,Z),this},FU=function(U,Z){var $=U.length;while($--)if(l8(U[$][0],Z))return $;return-1},n8=function(U,Z){Z=b8(Z,U)?[Z]:h8(Z);var $=0,R=Z.length;while(U!=null&&$<R)U=U[u8(Z[$++])];return $&&$==R?U:void 0},k8=function(U){if(!U$(U)||v8(U))return!1;var Z=o8(U)||N8(U)?O8:G8;return Z.test(s8(U))},y8=function(U){if(typeof U=="string")return U;if(vU(U))return uZ?uZ.call(U):"";var Z=U+"";return Z=="0"&&1/U==-lZ?"-0":Z},h8=function(U){return eZ(U)?U:c8(U)},PU=function(U,Z){var $=U.__data__;return i8(Z)?$[typeof Z=="string"?"string":"hash"]:$.map},aZ=function(U,Z){var $=P8(U,Z);return k8($)?$:void 0},b8=function(U,Z){if(eZ(U))return!1;var $=typeof U;if($=="number"||$=="symbol"||$=="boolean"||U==null||vU(U))return!0;return Y8.test(U)||!X8.test(U)||Z!=null&&U in Object(Z)},i8=function(U){var Z=typeof U;return Z=="string"||Z=="number"||Z=="symbol"||Z=="boolean"?U!=="__proto__":U===null},v8=function(U){return!!iZ&&iZ in U},u8=function(U){if(typeof U=="string"||vU(U))return U;var Z=U+"";return Z=="0"&&1/U==-lZ?"-0":Z},s8=function(U){if(U!=null){try{return rZ.call(U)}catch(Z){}try{return U+""}catch(Z){}}return""},iU=function(U,Z){if(typeof U!="function"||Z&&typeof Z!="function")throw new TypeError(R8);var $=function(){var R=arguments,Q=Z?Z.apply(this,R):R[0],J=$.cache;if(J.has(Q))return J.get(Q);var B=U.apply(this,R);return $.cache=J.set(Q,B),B};return $.cache=new(iU.Cache||f),$},l8=function(U,Z){return U===Z||U!==U&&Z!==Z},o8=function(U){var Z=U$(U)?tZ.call(U):"";return Z==Q8||Z==J8},U$=function(U){var Z=typeof U;return!!U&&(Z=="object"||Z=="function")},r8=function(U){return!!U&&typeof U=="object"},vU=function(U){return typeof U=="symbol"||r8(U)&&tZ.call(U)==B8},t8=function(U){return U==null?"":y8(U)},a8=function(U,Z,$){var R=U==null?void 0:n8(U,Z);return R===void 0?$:R},R8="Expected a function",sZ="__lodash_hash_undefined__",lZ=Infinity,Q8="[object Function]",J8="[object GeneratorFunction]",B8="[object Symbol]",X8=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Y8=/^\w*$/,W8=/^\./,K8=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,_8=/[\\^$.*+?()[\]{}|]/g,w8=/\\(\\)?/g,G8=/^\[object .+?Constructor\]$/,q8=typeof global=="object"&&global&&global.Object===Object&&global,F8=typeof self=="object"&&self&&self.Object===Object&&self,hU=q8||F8||Function("return this")(),E8=Array.prototype,L8=Function.prototype,oZ=Object.prototype,yU=hU["__core-js_shared__"],iZ=function(){var U=/[^.]+$/.exec(yU&&yU.keys&&yU.keys.IE_PROTO||"");return U?"Symbol(src)_1."+U:""}(),rZ=L8.toString,bU=oZ.hasOwnProperty,tZ=oZ.toString,O8=RegExp("^"+rZ.call(bU).replace(_8,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vZ=hU.Symbol,H8=E8.splice,M8=aZ(hU,"Map"),i=aZ(Object,"create"),cZ=vZ?vZ.prototype:void 0,uZ=cZ?cZ.toString:void 0;T.prototype.clear=z8;T.prototype.delete=D8;T.prototype.get=S8;T.prototype.has=V8;T.prototype.set=I8;k.prototype.clear=x8;k.prototype.delete=C8;k.prototype.get=A8;k.prototype.has=T8;k.prototype.set=f8;f.prototype.clear=m8;f.prototype.delete=d8;f.prototype.get=p8;f.prototype.has=g8;f.prototype.set=j8;var c8=iU(function(U){U=t8(U);var Z=[];if(W8.test(U))Z.push("");return U.replace(K8,function($,R,Q,J){Z.push(Q?J.replace(w8,"$1"):R||$)}),Z});iU.Cache=f;var eZ=Array.isArray;Z$.exports=a8});var XZ=NU(BZ(),1),r={isNamespace:(U)=>U&&!U.type,flattenSchema(U,Z){return Object.entries(U).reduce(($,[R,Q])=>{const J=Z?`${Z}.${R}`:R;if(r.isNamespace(Q))$={...$,...r.flattenSchema(Q,J)};else Object.assign(Q,{name:J}),$[Q.uid]=Q;return $},{})},wrapSchema(U){return Object.values(U).reduce((Z,$)=>{return XZ.default(Z,$.path,$),Z},{})}};var t,XR=new Uint8Array(16);function zU(){if(!t){if(t=typeof crypto!=="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!t)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}return t(XR)}function YZ(U,Z=0){return G[U[Z+0]]+G[U[Z+1]]+G[U[Z+2]]+G[U[Z+3]]+"-"+G[U[Z+4]]+G[U[Z+5]]+"-"+G[U[Z+6]]+G[U[Z+7]]+"-"+G[U[Z+8]]+G[U[Z+9]]+"-"+G[U[Z+10]]+G[U[Z+11]]+G[U[Z+12]]+G[U[Z+13]]+G[U[Z+14]]+G[U[Z+15]]}var G=[];for(let U=0;U<256;++U)G.push((U+256).toString(16).slice(1));var YR=typeof crypto!=="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),DU={randomUUID:YR};var WR=function(U,Z,$){if(DU.randomUUID&&!Z&&!U)return DU.randomUUID();U=U||{};const R=U.random||(U.rng||zU)();if(R[6]=R[6]&15|64,R[8]=R[8]&63|128,Z){$=$||0;for(let Q=0;Q<16;++Q)Z[$+Q]=R[Q];return Z}return YZ(R)},a=WR;var bZ=NU(hZ(),1);class $8{schemas;falttenSchema;uidSchemas;static Var(U){return{...U,type:"var",uid:a()}}static Func(U){return{...U,type:"func",uid:a()}}static UI={Table({actions:U}){return{"ui:widget":"Table","ui:options":{actions:U}}}};constructor(U={}){Object.assign(this,U),this.falttenSchema=r.flattenSchema(this.schemas),this.uidSchemas=bZ.default(this.schemas,"uid")}loadFull(){return Object.entries(this.falttenSchema).map(([U,Z])=>{if(Z.type=="func"){const{uid:$,type:R,input:Q,name:J,uiConfig:B}=Z;return{uid:$,type:R,name:J,input:Q,uiConfig:B?B():null}}if(Z.type=="var"){const{uid:$,type:R,get:Q,set:J,name:B,uiConfig:X}=Z;return{uid:$,type:R,name:B,value:Q(),uiConfig:X?X():null,set:!!J}}return{type:"unknown",name:U}})}loadVars(){return Object.entries(this.falttenSchema).filter(([U,Z])=>Z.type=="var").map(([U,Z])=>{const{get:$,name:R}=Z;return{name:R,value:$()}})}}var R$=NU($$(),1),P1=(U)=>{return{schema:{async loadFull(){return fetch(`${U.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"schema.loadFull"})}).then((Z)=>Z.json())},async loadVars(){return fetch(`${U.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"schema.loadVars"})}).then((Z)=>Z.json())}},func:{async call(Z){return fetch(`${U.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"func.call",params:Z})}).then(($)=>$.json())}},var:{async set(Z){return fetch(`${U.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"var.set",params:Z})}).then(($)=>$.json())},async patch(Z){return fetch(`${U.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"var.patch",params:Z})}).then(($)=>$.json())}}}},N1=({urpc:U})=>{const Z={urpc:U,handle({name:$,params:R}){const Q=R$.default(Z,$);if(!Q)throw new Error("invalid name");return Q(R)},schema:{async loadFull(){return U.loadFull()},async loadVars(){return U.loadVars()}},func:{async call($){const R=U.uidSchemas[$.method]||U.falttenSchema[$.method];if(!R)throw new Error("invalid func name");return R.func({input:$.input})}},var:{async set($){const R=U.uidSchemas[$.name]||U.falttenSchema[$.name];if(!R)throw new Error("invalid var name");if(!R.set)throw new Error("variable can't be set");return R.set($.value)},async patch($){throw new Error("TBD")}}};return Z};export{r as utils,P1 as createSimpleHttpClient,N1 as createServerClient,$8 as URPC}; | ||
var QZ=Object.create;var{defineProperty:uU,getPrototypeOf:JZ,getOwnPropertyNames:XZ}=Object;var BZ=Object.prototype.hasOwnProperty;var NU=(U,R,Z)=>{Z=U!=null?QZ(JZ(U)):{};const $=R||!U||!U.__esModule?uU(Z,"default",{value:U,enumerable:!0}):Z;for(let Q of XZ(U))if(!BZ.call($,Q))uU($,Q,{get:()=>U[Q],enumerable:!0});return $};var EU=(U,R)=>()=>(R||U((R={exports:{}}).exports,R),R.exports);var XR=EU((U1,JR)=>{var zZ=function(U,R){return U==null?void 0:U[R]},DZ=function(U){var R=!1;if(U!=null&&typeof U.toString!="function")try{R=!!(U+"")}catch(Z){}return R},I=function(U){var R=-1,Z=U?U.length:0;this.clear();while(++R<Z){var $=U[R];this.set($[0],$[1])}},AZ=function(){this.__data__=h?h(null):{}},fZ=function(U){return this.has(U)&&delete this.__data__[U]},TZ=function(U){var R=this.__data__;if(h){var Z=R[U];return Z===tU?void 0:Z}return s.call(R,U)?R[U]:void 0},mZ=function(U){var R=this.__data__;return h?R[U]!==void 0:s.call(R,U)},dZ=function(U,R){var Z=this.__data__;return Z[U]=h&&R===void 0?tU:R,this},m=function(U){var R=-1,Z=U?U.length:0;this.clear();while(++R<Z){var $=U[R];this.set($[0],$[1])}},pZ=function(){this.__data__=[]},gZ=function(U){var R=this.__data__,Z=l(R,U);if(Z<0)return!1;var $=R.length-1;if(Z==$)R.pop();else xZ.call(R,Z,1);return!0},jZ=function(U){var R=this.__data__,Z=l(R,U);return Z<0?void 0:R[Z][1]},nZ=function(U){return l(this.__data__,U)>-1},kZ=function(U,R){var Z=this.__data__,$=l(Z,U);if($<0)Z.push([U,R]);else Z[$][1]=R;return this},x=function(U){var R=-1,Z=U?U.length:0;this.clear();while(++R<Z){var $=U[R];this.set($[0],$[1])}},hZ=function(){this.__data__={hash:new I,map:new(CZ||m),string:new I}},yZ=function(U){return o(this,U).delete(U)},bZ=function(U){return o(this,U).get(U)},iZ=function(U){return o(this,U).has(U)},vZ=function(U,R){return o(this,U).set(U,R),this},cZ=function(U,R,Z){var $=U[R];if(!(s.call(U,R)&&$R($,Z))||Z===void 0&&!(R in U))U[R]=Z},l=function(U,R){var Z=U.length;while(Z--)if($R(U[Z][0],R))return Z;return-1},uZ=function(U){if(!u(U)||eZ(U))return!1;var R=$$(U)||DZ(U)?IZ:OZ;return R.test(Z$(U))},sZ=function(U,R,Z,$){if(!u(U))return U;R=tZ(R,U)?[R]:oZ(R);var Q=-1,J=R.length,X=J-1,B=U;while(B!=null&&++Q<J){var Y=R$(R[Q]),K=Z;if(Q!=X){var _=B[Y];if(K=$?$(_,Y,B):void 0,K===void 0)K=u(_)?_:rZ(R[Q+1])?[]:{}}cZ(B,Y,K),B=B[Y]}return U},lZ=function(U){if(typeof U=="string")return U;if(MU(U))return rU?rU.call(U):"";var R=U+"";return R=="0"&&1/U==-aU?"-0":R},oZ=function(U){return QR(U)?U:U$(U)},o=function(U,R){var Z=U.__data__;return aZ(R)?Z[typeof R=="string"?"string":"hash"]:Z.map},ZR=function(U,R){var Z=zZ(U,R);return uZ(Z)?Z:void 0},rZ=function(U,R){return R=R==null?WZ:R,!!R&&(typeof U=="number"||LZ.test(U))&&(U>-1&&U%1==0&&U<R)},tZ=function(U,R){if(QR(U))return!1;var Z=typeof U;if(Z=="number"||Z=="symbol"||Z=="boolean"||U==null||MU(U))return!0;return qZ.test(U)||!GZ.test(U)||R!=null&&U in Object(R)},aZ=function(U){var R=typeof U;return R=="string"||R=="number"||R=="symbol"||R=="boolean"?U!=="__proto__":U===null},eZ=function(U){return!!sU&&sU in U},R$=function(U){if(typeof U=="string"||MU(U))return U;var R=U+"";return R=="0"&&1/U==-aU?"-0":R},Z$=function(U){if(U!=null){try{return UR.call(U)}catch(R){}try{return U+""}catch(R){}}return""},HU=function(U,R){if(typeof U!="function"||R&&typeof R!="function")throw new TypeError(YZ);var Z=function(){var $=arguments,Q=R?R.apply(this,$):$[0],J=Z.cache;if(J.has(Q))return J.get(Q);var X=U.apply(this,$);return Z.cache=J.set(Q,X),X};return Z.cache=new(HU.Cache||x),Z},$R=function(U,R){return U===R||U!==U&&R!==R},$$=function(U){var R=u(U)?RR.call(U):"";return R==KZ||R==_Z},u=function(U){var R=typeof U;return!!U&&(R=="object"||R=="function")},Q$=function(U){return!!U&&typeof U=="object"},MU=function(U){return typeof U=="symbol"||Q$(U)&&RR.call(U)==wZ},J$=function(U){return U==null?"":lZ(U)},X$=function(U,R,Z){return U==null?U:sZ(U,R,Z)},YZ="Expected a function",tU="__lodash_hash_undefined__",aU=Infinity,WZ=9007199254740991,KZ="[object Function]",_Z="[object GeneratorFunction]",wZ="[object Symbol]",GZ=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,qZ=/^\w*$/,FZ=/^\./,PZ=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,NZ=/[\\^$.*+?()[\]{}|]/g,EZ=/\\(\\)?/g,OZ=/^\[object .+?Constructor\]$/,LZ=/^(?:0|[1-9]\d*)$/,HZ=typeof global=="object"&&global&&global.Object===Object&&global,MZ=typeof self=="object"&&self&&self.Object===Object&&self,LU=HZ||MZ||Function("return this")(),SZ=Array.prototype,VZ=Function.prototype,eU=Object.prototype,OU=LU["__core-js_shared__"],sU=function(){var U=/[^.]+$/.exec(OU&&OU.keys&&OU.keys.IE_PROTO||"");return U?"Symbol(src)_1."+U:""}(),UR=VZ.toString,s=eU.hasOwnProperty,RR=eU.toString,IZ=RegExp("^"+UR.call(s).replace(NZ,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),lU=LU.Symbol,xZ=SZ.splice,CZ=ZR(LU,"Map"),h=ZR(Object,"create"),oU=lU?lU.prototype:void 0,rU=oU?oU.toString:void 0;I.prototype.clear=AZ;I.prototype.delete=fZ;I.prototype.get=TZ;I.prototype.has=mZ;I.prototype.set=dZ;m.prototype.clear=pZ;m.prototype.delete=gZ;m.prototype.get=jZ;m.prototype.has=nZ;m.prototype.set=kZ;x.prototype.clear=hZ;x.prototype.delete=yZ;x.prototype.get=bZ;x.prototype.has=iZ;x.prototype.set=vZ;var U$=HU(function(U){U=J$(U);var R=[];if(FZ.test(U))R.push("");return U.replace(PZ,function(Z,$,Q,J){R.push(Q?J.replace(EZ,"$1"):$||Z)}),R});HU.Cache=x;var QR=Array.isArray;JR.exports=X$});var yR=EU((e,p)=>{var T$=function(U,R,Z,$){var Q=-1,J=U?U.length:0;while(++Q<J){var X=U[Q];R($,X,Z(X),U)}return $},m$=function(U,R){var Z=-1,$=U?U.length:0;while(++Z<$)if(R(U[Z],Z,U))return!0;return!1},d$=function(U){return function(R){return R==null?void 0:R[U]}},p$=function(U,R){var Z=-1,$=Array(U);while(++Z<U)$[Z]=R(Z);return $},g$=function(U){return function(R){return U(R)}},j$=function(U,R){return U==null?void 0:U[R]},CU=function(U){var R=!1;if(U!=null&&typeof U.toString!="function")try{R=!!(U+"")}catch(Z){}return R},n$=function(U){var R=-1,Z=Array(U.size);return U.forEach(function($,Q){Z[++R]=[Q,$]}),Z},k$=function(U,R){return function(Z){return U(R(Z))}},h$=function(U){var R=-1,Z=Array(U.size);return U.forEach(function($){Z[++R]=$}),Z},C=function(U){var R=-1,Z=U?U.length:0;this.clear();while(++R<Z){var $=U[R];this.set($[0],$[1])}},a$=function(){this.__data__=b?b(null):{}},e$=function(U){return this.has(U)&&delete this.__data__[U]},UQ=function(U){var R=this.__data__;if(b){var Z=R[U];return Z===dU?void 0:Z}return O.call(R,U)?R[U]:void 0},RQ=function(U){var R=this.__data__;return b?R[U]!==void 0:O.call(R,U)},ZQ=function(U,R){var Z=this.__data__;return Z[U]=b&&R===void 0?dU:R,this},L=function(U){var R=-1,Z=U?U.length:0;this.clear();while(++R<Z){var $=U[R];this.set($[0],$[1])}},$Q=function(){this.__data__=[]},QQ=function(U){var R=this.__data__,Z=WU(R,U);if(Z<0)return!1;var $=R.length-1;if(Z==$)R.pop();else c$.call(R,Z,1);return!0},JQ=function(U){var R=this.__data__,Z=WU(R,U);return Z<0?void 0:R[Z][1]},XQ=function(U){return WU(this.__data__,U)>-1},BQ=function(U,R){var Z=this.__data__,$=WU(Z,U);if($<0)Z.push([U,R]);else Z[$][1]=R;return this},H=function(U){var R=-1,Z=U?U.length:0;this.clear();while(++R<Z){var $=U[R];this.set($[0],$[1])}},YQ=function(){this.__data__={hash:new C,map:new(y||L),string:new C}},WQ=function(U){return KU(this,U).delete(U)},KQ=function(U){return KU(this,U).get(U)},_Q=function(U){return KU(this,U).has(U)},wQ=function(U,R){return KU(this,U).set(U,R),this},JU=function(U){var R=-1,Z=U?U.length:0;this.__data__=new H;while(++R<Z)this.add(U[R])},GQ=function(U){return this.__data__.set(U,dU),this},qQ=function(U){return this.__data__.has(U)},E=function(U){this.__data__=new L(U)},FQ=function(){this.__data__=new L},PQ=function(U){return this.__data__.delete(U)},NQ=function(U){return this.__data__.get(U)},EQ=function(U){return this.__data__.has(U)},OQ=function(U,R){var Z=this.__data__;if(Z instanceof L){var $=Z.__data__;if(!y||$.length<K$-1)return $.push([U,R]),this;Z=this.__data__=new H($)}return Z.set(U,R),this},LQ=function(U,R){var Z=D(U)||kR(U)?p$(U.length,String):[],$=Z.length,Q=!!$;for(var J in U)if((R||O.call(U,J))&&!(Q&&(J=="length"||pR(J,$))))Z.push(J);return Z},WU=function(U,R){var Z=U.length;while(Z--)if(nR(U[Z][0],R))return Z;return-1},HQ=function(U,R,Z,$){return MQ(U,function(Q,J,X){R($,Q,Z(Q),X)}),$},DQ=function(U,R){return U&&zQ(U,R,XU)},TR=function(U,R){R=_U(R,U)?[R]:mR(R);var Z=0,$=R.length;while(U!=null&&Z<$)U=U[wU(R[Z++])];return Z&&Z==$?U:void 0},SQ=function(U){return j.call(U)},VQ=function(U,R){return U!=null&&R in Object(U)},pU=function(U,R,Z,$,Q){if(U===R)return!0;if(U==null||R==null||!GU(U)&&!qU(R))return U!==U&&R!==R;return IQ(U,R,pU,Z,$,Q)},IQ=function(U,R,Z,$,Q,J){var X=D(U),B=D(R),Y=IU,K=IU;if(!X)Y=z(U),Y=Y==UU?d:Y;if(!B)K=z(R),K=K==UU?d:K;var _=Y==d&&!CU(U),q=K==d&&!CU(R),w=Y==K;if(w&&!_)return J||(J=new E),X||rQ(U)?dR(U,R,Z,$,Q,J):hQ(U,R,Y,Z,$,Q,J);if(!(Q&g)){var F=_&&O.call(U,"__wrapped__"),P=q&&O.call(R,"__wrapped__");if(F||P){var M=F?U.value():U,N=P?R.value():R;return J||(J=new E),Z(M,N,$,Q,J)}}if(!w)return!1;return J||(J=new E),yQ(U,R,Z,$,Q,J)},xQ=function(U,R,Z,$){var Q=Z.length,J=Q,X=!$;if(U==null)return!J;U=Object(U);while(Q--){var B=Z[Q];if(X&&B[2]?B[1]!==U[B[0]]:!(B[0]in U))return!1}while(++Q<J){B=Z[Q];var Y=B[0],K=U[Y],_=B[1];if(X&&B[2]){if(K===void 0&&!(Y in U))return!1}else{var q=new E;if($)var w=$(K,_,Y,U,R,q);if(!(w===void 0?pU(_,K,$,BU|g,q):w))return!1}}return!0},CQ=function(U){if(!GU(U)||cQ(U))return!1;var R=hR(U)||CU(U)?i$:x$;return R.test(A(U))},AQ=function(U){return qU(U)&&nU(U.length)&&!!W[j.call(U)]},fQ=function(U){if(typeof U=="function")return U;if(U==null)return U8;if(typeof U=="object")return D(U)?dQ(U[0],U[1]):mQ(U);return R8(U)},TQ=function(U){if(!uQ(U))return u$(U);var R=[];for(var Z in Object(U))if(O.call(U,Z)&&Z!="constructor")R.push(Z);return R},mQ=function(U){var R=bQ(U);if(R.length==1&&R[0][2])return jR(R[0][0],R[0][1]);return function(Z){return Z===U||xQ(Z,U,R)}},dQ=function(U,R){if(_U(U)&&gR(R))return jR(wU(U),R);return function(Z){var $=aQ(Z,U);return $===void 0&&$===R?eQ(Z,U):pU(R,$,void 0,BU|g)}},pQ=function(U){return function(R){return TR(R,U)}},gQ=function(U){if(typeof U=="string")return U;if(kU(U))return NR?NR.call(U):"";var R=U+"";return R=="0"&&1/U==-ER?"-0":R},mR=function(U){return D(U)?U:sQ(U)},jQ=function(U,R){return function(Z,$){var Q=D(Z)?T$:HQ,J=R?R():{};return Q(Z,U,fQ($,2),J)}},nQ=function(U,R){return function(Z,$){if(Z==null)return Z;if(!jU(Z))return U(Z,$);var Q=Z.length,J=R?Q:-1,X=Object(Z);while(R?J--:++J<Q)if($(X[J],J,X)===!1)break;return Z}},kQ=function(U){return function(R,Z,$){var Q=-1,J=Object(R),X=$(R),B=X.length;while(B--){var Y=X[U?B:++Q];if(Z(J[Y],Y,J)===!1)break}return R}},dR=function(U,R,Z,$,Q,J){var X=Q&g,B=U.length,Y=R.length;if(B!=Y&&!(X&&Y>B))return!1;var K=J.get(U);if(K&&J.get(R))return K==R;var _=-1,q=!0,w=Q&BU?new JU:void 0;J.set(U,R),J.set(R,U);while(++_<B){var F=U[_],P=R[_];if($)var M=X?$(P,F,_,R,U,J):$(F,P,_,U,R,J);if(M!==void 0){if(M)continue;q=!1;break}if(w){if(!m$(R,function(N,V){if(!w.has(V)&&(F===N||Z(F,N,$,Q,J)))return w.add(V)})){q=!1;break}}else if(!(F===P||Z(F,P,$,Q,J))){q=!1;break}}return J.delete(U),J.delete(R),q},hQ=function(U,R,Z,$,Q,J,X){switch(Z){case $U:if(U.byteLength!=R.byteLength||U.byteOffset!=R.byteOffset)return!1;U=U.buffer,R=R.buffer;case xR:if(U.byteLength!=R.byteLength||!$(new PR(U),new PR(R)))return!1;return!0;case LR:case HR:case DR:return nR(+U,+R);case MR:return U.name==R.name&&U.message==R.message;case SR:case VR:return U==R+"";case RU:var B=n$;case ZU:var Y=J&g;if(B||(B=h$),U.size!=R.size&&!Y)return!1;var K=X.get(U);if(K)return K==R;J|=BU,X.set(U,R);var _=dR(B(U),B(R),$,Q,J,X);return X.delete(U),_;case IR:if(VU)return VU.call(U)==VU.call(R)}return!1},yQ=function(U,R,Z,$,Q,J){var X=Q&g,B=XU(U),Y=B.length,K=XU(R),_=K.length;if(Y!=_&&!X)return!1;var q=Y;while(q--){var w=B[q];if(!(X?w in R:O.call(R,w)))return!1}var F=J.get(U);if(F&&J.get(R))return F==R;var P=!0;J.set(U,R),J.set(R,U);var M=X;while(++q<Y){w=B[q];var N=U[w],V=R[w];if($)var cU=X?$(V,N,w,R,U,J):$(N,V,w,U,R,J);if(!(cU===void 0?N===V||Z(N,V,$,Q,J):cU)){P=!1;break}M||(M=w=="constructor")}if(P&&!M){var v=U.constructor,c=R.constructor;if(v!=c&&(("constructor"in U)&&("constructor"in R))&&!(typeof v=="function"&&v instanceof v&&typeof c=="function"&&c instanceof c))P=!1}return J.delete(U),J.delete(R),P},KU=function(U,R){var Z=U.__data__;return vQ(R)?Z[typeof R=="string"?"string":"hash"]:Z.map},bQ=function(U){var R=XU(U),Z=R.length;while(Z--){var $=R[Z],Q=U[$];R[Z]=[$,Q,gR(Q)]}return R},n=function(U,R){var Z=j$(U,R);return CQ(Z)?Z:void 0},iQ=function(U,R,Z){R=_U(R,U)?[R]:mR(R);var $,Q=-1,X=R.length;while(++Q<X){var J=wU(R[Q]);if(!($=U!=null&&Z(U,J)))break;U=U[J]}if($)return $;var X=U?U.length:0;return!!X&&nU(X)&&pR(J,X)&&(D(U)||kR(U))},pR=function(U,R){return R=R==null?OR:R,!!R&&(typeof U=="number"||C$.test(U))&&(U>-1&&U%1==0&&U<R)},_U=function(U,R){if(D(U))return!1;var Z=typeof U;if(Z=="number"||Z=="symbol"||Z=="boolean"||U==null||kU(U))return!0;return z$.test(U)||!M$.test(U)||R!=null&&U in Object(R)},vQ=function(U){var R=typeof U;return R=="string"||R=="number"||R=="symbol"||R=="boolean"?U!=="__proto__":U===null},cQ=function(U){return!!qR&&qR in U},uQ=function(U){var R=U&&U.constructor,Z=typeof R=="function"&&R.prototype||YU;return U===Z},gR=function(U){return U===U&&!GU(U)},jR=function(U,R){return function(Z){if(Z==null)return!1;return Z[U]===R&&(R!==void 0||(U in Object(Z)))}},wU=function(U){if(typeof U=="string"||kU(U))return U;var R=U+"";return R=="0"&&1/U==-ER?"-0":R},A=function(U){if(U!=null){try{return fR.call(U)}catch(R){}try{return U+""}catch(R){}}return""},gU=function(U,R){if(typeof U!="function"||R&&typeof R!="function")throw new TypeError(_$);var Z=function(){var $=arguments,Q=R?R.apply(this,$):$[0],J=Z.cache;if(J.has(Q))return J.get(Q);var X=U.apply(this,$);return Z.cache=J.set(Q,X),X};return Z.cache=new(gU.Cache||H),Z},nR=function(U,R){return U===R||U!==U&&R!==R},kR=function(U){return oQ(U)&&O.call(U,"callee")&&(!v$.call(U,"callee")||j.call(U)==UU)},jU=function(U){return U!=null&&nU(U.length)&&!hR(U)},oQ=function(U){return qU(U)&&jU(U)},hR=function(U){var R=GU(U)?j.call(U):"";return R==zR||R==w$},nU=function(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=OR},GU=function(U){var R=typeof U;return!!U&&(R=="object"||R=="function")},qU=function(U){return!!U&&typeof U=="object"},kU=function(U){return typeof U=="symbol"||qU(U)&&j.call(U)==IR},tQ=function(U){return U==null?"":gQ(U)},aQ=function(U,R,Z){var $=U==null?void 0:TR(U,R);return $===void 0?Z:$},eQ=function(U,R){return U!=null&&iQ(U,R,VQ)},XU=function(U){return jU(U)?LQ(U):TQ(U)},U8=function(U){return U},R8=function(U){return _U(U)?d$(wU(U)):pQ(U)},K$=200,_$="Expected a function",dU="__lodash_hash_undefined__",BU=1,g=2,ER=Infinity,OR=9007199254740991,UU="[object Arguments]",IU="[object Array]",LR="[object Boolean]",HR="[object Date]",MR="[object Error]",zR="[object Function]",w$="[object GeneratorFunction]",RU="[object Map]",DR="[object Number]",d="[object Object]",WR="[object Promise]",SR="[object RegExp]",ZU="[object Set]",VR="[object String]",IR="[object Symbol]",xU="[object WeakMap]",xR="[object ArrayBuffer]",$U="[object DataView]",G$="[object Float32Array]",q$="[object Float64Array]",F$="[object Int8Array]",P$="[object Int16Array]",N$="[object Int32Array]",E$="[object Uint8Array]",O$="[object Uint8ClampedArray]",L$="[object Uint16Array]",H$="[object Uint32Array]",M$=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,z$=/^\w*$/,D$=/^\./,S$=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,V$=/[\\^$.*+?()[\]{}|]/g,I$=/\\(\\)?/g,x$=/^\[object .+?Constructor\]$/,C$=/^(?:0|[1-9]\d*)$/,W={};W[G$]=W[q$]=W[F$]=W[P$]=W[N$]=W[E$]=W[O$]=W[L$]=W[H$]=!0;W[UU]=W[IU]=W[xR]=W[LR]=W[$U]=W[HR]=W[MR]=W[zR]=W[RU]=W[DR]=W[d]=W[SR]=W[ZU]=W[VR]=W[xU]=!1;var CR=typeof global=="object"&&global&&global.Object===Object&&global,A$=typeof self=="object"&&self&&self.Object===Object&&self,S=CR||A$||Function("return this")(),AR=typeof e=="object"&&e&&!e.nodeType&&e,KR=AR&&typeof p=="object"&&p&&!p.nodeType&&p,f$=KR&&KR.exports===AR,_R=f$&&CR.process,wR=function(){try{return _R&&_R.binding("util")}catch(U){}}(),GR=wR&&wR.isTypedArray,y$=Array.prototype,b$=Function.prototype,YU=Object.prototype,SU=S["__core-js_shared__"],qR=function(){var U=/[^.]+$/.exec(SU&&SU.keys&&SU.keys.IE_PROTO||"");return U?"Symbol(src)_1."+U:""}(),fR=b$.toString,O=YU.hasOwnProperty,j=YU.toString,i$=RegExp("^"+fR.call(O).replace(V$,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),FR=S.Symbol,PR=S.Uint8Array,v$=YU.propertyIsEnumerable,c$=y$.splice,u$=k$(Object.keys,Object),AU=n(S,"DataView"),y=n(S,"Map"),fU=n(S,"Promise"),TU=n(S,"Set"),mU=n(S,"WeakMap"),b=n(Object,"create"),s$=A(AU),l$=A(y),o$=A(fU),r$=A(TU),t$=A(mU),QU=FR?FR.prototype:void 0,VU=QU?QU.valueOf:void 0,NR=QU?QU.toString:void 0;C.prototype.clear=a$;C.prototype.delete=e$;C.prototype.get=UQ;C.prototype.has=RQ;C.prototype.set=ZQ;L.prototype.clear=$Q;L.prototype.delete=QQ;L.prototype.get=JQ;L.prototype.has=XQ;L.prototype.set=BQ;H.prototype.clear=YQ;H.prototype.delete=WQ;H.prototype.get=KQ;H.prototype.has=_Q;H.prototype.set=wQ;JU.prototype.add=JU.prototype.push=GQ;JU.prototype.has=qQ;E.prototype.clear=FQ;E.prototype.delete=PQ;E.prototype.get=NQ;E.prototype.has=EQ;E.prototype.set=OQ;var MQ=nQ(DQ),zQ=kQ(),z=SQ;if(AU&&z(new AU(new ArrayBuffer(1)))!=$U||y&&z(new y)!=RU||fU&&z(fU.resolve())!=WR||TU&&z(new TU)!=ZU||mU&&z(new mU)!=xU)z=function(U){var R=j.call(U),Z=R==d?U.constructor:void 0,$=Z?A(Z):void 0;if($)switch($){case s$:return $U;case l$:return RU;case o$:return WR;case r$:return ZU;case t$:return xU}return R};var sQ=gU(function(U){U=tQ(U);var R=[];if(D$.test(U))R.push("");return U.replace(S$,function(Z,$,Q,J){R.push(Q?J.replace(I$,"$1"):$||Z)}),R}),lQ=jQ(function(U,R,Z){U[Z]=R});gU.Cache=H;var D=Array.isArray,rQ=GR?g$(GR):AQ;p.exports=lQ});var ZZ=EU((F1,RZ)=>{var P8=function(U,R){return U==null?void 0:U[R]},N8=function(U){var R=!1;if(U!=null&&typeof U.toString!="function")try{R=!!(U+"")}catch(Z){}return R},f=function(U){var R=-1,Z=U?U.length:0;this.clear();while(++R<Z){var $=U[R];this.set($[0],$[1])}},z8=function(){this.__data__=i?i(null):{}},D8=function(U){return this.has(U)&&delete this.__data__[U]},S8=function(U){var R=this.__data__;if(i){var Z=R[U];return Z===sR?void 0:Z}return bU.call(R,U)?R[U]:void 0},V8=function(U){var R=this.__data__;return i?R[U]!==void 0:bU.call(R,U)},I8=function(U,R){var Z=this.__data__;return Z[U]=i&&R===void 0?sR:R,this},k=function(U){var R=-1,Z=U?U.length:0;this.clear();while(++R<Z){var $=U[R];this.set($[0],$[1])}},x8=function(){this.__data__=[]},C8=function(U){var R=this.__data__,Z=FU(R,U);if(Z<0)return!1;var $=R.length-1;if(Z==$)R.pop();else H8.call(R,Z,1);return!0},A8=function(U){var R=this.__data__,Z=FU(R,U);return Z<0?void 0:R[Z][1]},f8=function(U){return FU(this.__data__,U)>-1},T8=function(U,R){var Z=this.__data__,$=FU(Z,U);if($<0)Z.push([U,R]);else Z[$][1]=R;return this},T=function(U){var R=-1,Z=U?U.length:0;this.clear();while(++R<Z){var $=U[R];this.set($[0],$[1])}},m8=function(){this.__data__={hash:new f,map:new(M8||k),string:new f}},d8=function(U){return PU(this,U).delete(U)},p8=function(U){return PU(this,U).get(U)},g8=function(U){return PU(this,U).has(U)},j8=function(U,R){return PU(this,U).set(U,R),this},FU=function(U,R){var Z=U.length;while(Z--)if(l8(U[Z][0],R))return Z;return-1},n8=function(U,R){R=b8(R,U)?[R]:y8(R);var Z=0,$=R.length;while(U!=null&&Z<$)U=U[u8(R[Z++])];return Z&&Z==$?U:void 0},k8=function(U){if(!UZ(U)||v8(U))return!1;var R=o8(U)||N8(U)?L8:G8;return R.test(s8(U))},h8=function(U){if(typeof U=="string")return U;if(vU(U))return uR?uR.call(U):"";var R=U+"";return R=="0"&&1/U==-lR?"-0":R},y8=function(U){return eR(U)?U:c8(U)},PU=function(U,R){var Z=U.__data__;return i8(R)?Z[typeof R=="string"?"string":"hash"]:Z.map},aR=function(U,R){var Z=P8(U,R);return k8(Z)?Z:void 0},b8=function(U,R){if(eR(U))return!1;var Z=typeof U;if(Z=="number"||Z=="symbol"||Z=="boolean"||U==null||vU(U))return!0;return Y8.test(U)||!B8.test(U)||R!=null&&U in Object(R)},i8=function(U){var R=typeof U;return R=="string"||R=="number"||R=="symbol"||R=="boolean"?U!=="__proto__":U===null},v8=function(U){return!!iR&&iR in U},u8=function(U){if(typeof U=="string"||vU(U))return U;var R=U+"";return R=="0"&&1/U==-lR?"-0":R},s8=function(U){if(U!=null){try{return rR.call(U)}catch(R){}try{return U+""}catch(R){}}return""},iU=function(U,R){if(typeof U!="function"||R&&typeof R!="function")throw new TypeError($8);var Z=function(){var $=arguments,Q=R?R.apply(this,$):$[0],J=Z.cache;if(J.has(Q))return J.get(Q);var X=U.apply(this,$);return Z.cache=J.set(Q,X),X};return Z.cache=new(iU.Cache||T),Z},l8=function(U,R){return U===R||U!==U&&R!==R},o8=function(U){var R=UZ(U)?tR.call(U):"";return R==Q8||R==J8},UZ=function(U){var R=typeof U;return!!U&&(R=="object"||R=="function")},r8=function(U){return!!U&&typeof U=="object"},vU=function(U){return typeof U=="symbol"||r8(U)&&tR.call(U)==X8},t8=function(U){return U==null?"":h8(U)},a8=function(U,R,Z){var $=U==null?void 0:n8(U,R);return $===void 0?Z:$},$8="Expected a function",sR="__lodash_hash_undefined__",lR=Infinity,Q8="[object Function]",J8="[object GeneratorFunction]",X8="[object Symbol]",B8=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Y8=/^\w*$/,W8=/^\./,K8=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,_8=/[\\^$.*+?()[\]{}|]/g,w8=/\\(\\)?/g,G8=/^\[object .+?Constructor\]$/,q8=typeof global=="object"&&global&&global.Object===Object&&global,F8=typeof self=="object"&&self&&self.Object===Object&&self,yU=q8||F8||Function("return this")(),E8=Array.prototype,O8=Function.prototype,oR=Object.prototype,hU=yU["__core-js_shared__"],iR=function(){var U=/[^.]+$/.exec(hU&&hU.keys&&hU.keys.IE_PROTO||"");return U?"Symbol(src)_1."+U:""}(),rR=O8.toString,bU=oR.hasOwnProperty,tR=oR.toString,L8=RegExp("^"+rR.call(bU).replace(_8,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vR=yU.Symbol,H8=E8.splice,M8=aR(yU,"Map"),i=aR(Object,"create"),cR=vR?vR.prototype:void 0,uR=cR?cR.toString:void 0;f.prototype.clear=z8;f.prototype.delete=D8;f.prototype.get=S8;f.prototype.has=V8;f.prototype.set=I8;k.prototype.clear=x8;k.prototype.delete=C8;k.prototype.get=A8;k.prototype.has=f8;k.prototype.set=T8;T.prototype.clear=m8;T.prototype.delete=d8;T.prototype.get=p8;T.prototype.has=g8;T.prototype.set=j8;var c8=iU(function(U){U=t8(U);var R=[];if(W8.test(U))R.push("");return U.replace(K8,function(Z,$,Q,J){R.push(Q?J.replace(w8,"$1"):$||Z)}),R});iU.Cache=T;var eR=Array.isArray;RZ.exports=a8});var BR=NU(XR(),1),r={isNamespace:(U)=>U&&!U.type,flattenSchema(U,R){return Object.entries(U).reduce((Z,[$,Q])=>{const J=R?`${R}.${$}`:$;if(r.isNamespace(Q))Z={...Z,...r.flattenSchema(Q,J)};else Object.assign(Q,{name:J}),Z[J]=Q;return Z},{})},wrapSchema(U){return Object.values(U).reduce((R,Z)=>{return BR.default(R,Z.path,Z),R},{})}};var t,B$=new Uint8Array(16);function zU(){if(!t){if(t=typeof crypto!=="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!t)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}return t(B$)}function YR(U,R=0){return G[U[R+0]]+G[U[R+1]]+G[U[R+2]]+G[U[R+3]]+"-"+G[U[R+4]]+G[U[R+5]]+"-"+G[U[R+6]]+G[U[R+7]]+"-"+G[U[R+8]]+G[U[R+9]]+"-"+G[U[R+10]]+G[U[R+11]]+G[U[R+12]]+G[U[R+13]]+G[U[R+14]]+G[U[R+15]]}var G=[];for(let U=0;U<256;++U)G.push((U+256).toString(16).slice(1));var Y$=typeof crypto!=="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),DU={randomUUID:Y$};var W$=function(U,R,Z){if(DU.randomUUID&&!R&&!U)return DU.randomUUID();U=U||{};const $=U.random||(U.rng||zU)();if($[6]=$[6]&15|64,$[8]=$[8]&63|128,R){Z=Z||0;for(let Q=0;Q<16;++Q)R[Z+Q]=$[Q];return R}return YR($)},a=W$;var bR=NU(yR(),1);class Z8{schemas;falttenSchema;uidSchemas;static Var(U){return{...U,type:"var",uid:a()}}static Func(U){return{...U,type:"func",uid:a()}}constructor(U={}){Object.assign(this,U),this.falttenSchema=r.flattenSchema(this.schemas),this.uidSchemas=bR.default(this.schemas,"uid")}loadFull(){return Object.entries(this.falttenSchema).map(([U,R])=>{if(R.type=="func"){const{uid:Z,type:$,input:Q,name:J,uiConfig:X}=R;return{uid:Z,type:$,name:J,input:Q,uiConfig:X?X():null}}if(R.type=="var"){const{uid:Z,type:$,get:Q,set:J,name:X,uiConfig:B}=R;return{uid:Z,type:$,name:X,value:Q(),uiConfig:B?B():null,set:!!J}}return{type:"unknown",name:U}})}loadVars(){return Object.entries(this.falttenSchema).filter(([U,R])=>R.type=="var").map(([U,R])=>{const{get:Z,name:$}=R;return{name:$,value:Z()}})}}var $Z=NU(ZZ(),1),P1=(U)=>{return{schema:{async loadFull(){return fetch(`${U.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"schema.loadFull"})}).then((R)=>R.json())},async loadVars(){return fetch(`${U.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"schema.loadVars"})}).then((R)=>R.json())}},func:{async call(R){return fetch(`${U.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"func.call",params:R})}).then((Z)=>Z.json())}},var:{async set(R){return fetch(`${U.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"var.set",params:R})}).then((Z)=>Z.json())},async patch(R){return fetch(`${U.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"var.patch",params:R})}).then((Z)=>Z.json())}}}},N1=({urpc:U})=>{const R={urpc:U,handle({name:Z,params:$}){const Q=$Z.default(R,Z);if(!Q)throw new Error("invalid name");return Q($)},schema:{async loadFull(){return U.loadFull()},async loadVars(){return U.loadVars()}},func:{async call(Z){const $=U.uidSchemas[Z.method]||U.falttenSchema[Z.method];if(!$)throw new Error("invalid func name");return $.func({input:Z.input})}},var:{async set(Z){const $=U.uidSchemas[Z.name]||U.falttenSchema[Z.name];if(!$)throw new Error("invalid var name");if(!$.set)throw new Error("variable can't be set");return $.set(Z.value)},async patch(Z){const $=U.uidSchemas[Z.name]||U.falttenSchema[Z.name];if(!$)throw new Error("invalid var name");if(!$.patch)throw new Error("variable can't be set");return $.patch(Z.ops).newDocument}}};return R};export{r as utils,P1 as createSimpleHttpClient,N1 as createServerClient,Z8 as URPC}; |
{ | ||
"name": "@dappworks/urpc", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"module": "index.ts", | ||
@@ -39,2 +39,3 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"fast-json-patch": "^3.1.1", | ||
"json-schema": "^0.4.0", | ||
@@ -41,0 +42,0 @@ "lodash.get": "^4.4.2", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32500
7
264
+ Addedfast-json-patch@^3.1.1
+ Addedfast-json-patch@3.1.1(transitive)