diesel-core 1.7.3 → 1.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ctx.js +42 -42
- package/dist/handleRequest.js +22 -22
- package/dist/main.js +42 -42
- package/package.json +1 -1
package/dist/ctx.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var M8=Object.create;var{getPrototypeOf:T8,defineProperty:
|
|
1
|
+
var M8=Object.create;var{getPrototypeOf:T8,defineProperty:W1,getOwnPropertyNames:lf,getOwnPropertyDescriptor:A8}=Object,pf=Object.prototype.hasOwnProperty;var q8=(f,$,Z)=>{Z=f!=null?M8(T8(f)):{};let z=$||!f||!f.__esModule?W1(Z,"default",{value:f,enumerable:!0}):Z;for(let J of lf(f))if(!pf.call(z,J))W1(z,J,{get:()=>f[J],enumerable:!0});return z},nf=new WeakMap,Y1=(f)=>{var $=nf.get(f),Z;if($)return $;if($=W1({},"__esModule",{value:!0}),f&&typeof f==="object"||typeof f==="function")lf(f).map((z)=>!pf.call($,z)&&W1($,z,{get:()=>f[z],enumerable:!(Z=A8(f,z))||Z.enumerable}));return nf.set(f,$),$},X0=(f,$)=>()=>($||f(($={exports:{}}).exports,$),$.exports);var of=(f,$)=>{for(var Z in $)W1(f,Z,{get:$[Z],enumerable:!0,configurable:!0,set:(z)=>$[Z]=()=>z})};var sf=(f,$)=>()=>(f&&($=f(f=0)),$);var Q$={};of(Q$,{types:()=>_8,promisify:()=>$$,log:()=>tf,isUndefined:()=>l0,isSymbol:()=>x8,isString:()=>C1,isRegExp:()=>M1,isPrimitive:()=>g8,isObject:()=>p0,isNumber:()=>af,isNullOrUndefined:()=>v8,isNull:()=>j1,isFunction:()=>A1,isError:()=>T1,isDate:()=>e1,isBuffer:()=>k8,isBoolean:()=>$f,isArray:()=>rf,inspect:()=>u0,inherits:()=>ef,format:()=>ff,deprecate:()=>C8,default:()=>y8,debuglog:()=>R8,callbackifyOnRejected:()=>Jf,callbackify:()=>Z$,_extend:()=>zf,TextEncoder:()=>z$,TextDecoder:()=>J$});function ff(f,...$){if(!C1(f)){var Z=[f];for(var z=0;z<$.length;z++)Z.push(u0($[z]));return Z.join(" ")}var z=0,J=$.length,Q=String(f).replace(j8,function(W){if(W==="%%")return"%";if(z>=J)return W;switch(W){case"%s":return String($[z++]);case"%d":return Number($[z++]);case"%j":try{return JSON.stringify($[z++])}catch(Y){return"[Circular]"}default:return W}});for(var X=$[z];z<J;X=$[++z])if(j1(X)||!p0(X))Q+=" "+X;else Q+=" "+u0(X);return Q}function C8(f,$){if(typeof process>"u"||process?.noDeprecation===!0)return f;var Z=!1;function z(...J){if(!Z){if(process.throwDeprecation)throw Error($);else if(process.traceDeprecation)console.trace($);else console.error($);Z=!0}return f.apply(this,...J)}return z}function N8(f,$){var Z=u0.styles[$];if(Z)return"\x1B["+u0.colors[Z][0]+"m"+f+"\x1B["+u0.colors[Z][1]+"m";else return f}function I8(f,$){return f}function S8(f){var $={};return f.forEach(function(Z,z){$[Z]=!0}),$}function q1(f,$,Z){if(f.customInspect&&$&&A1($.inspect)&&$.inspect!==u0&&!($.constructor&&$.constructor.prototype===$)){var z=$.inspect(Z,f);if(!C1(z))z=q1(f,z,Z);return z}var J=P8(f,$);if(J)return J;var Q=Object.keys($),X=S8(Q);if(f.showHidden)Q=Object.getOwnPropertyNames($);if(T1($)&&(Q.indexOf("message")>=0||Q.indexOf("description")>=0))return r1($);if(Q.length===0){if(A1($)){var W=$.name?": "+$.name:"";return f.stylize("[Function"+W+"]","special")}if(M1($))return f.stylize(RegExp.prototype.toString.call($),"regexp");if(e1($))return f.stylize(Date.prototype.toString.call($),"date");if(T1($))return r1($)}var Y="",V=!1,w=["{","}"];if(rf($))V=!0,w=["[","]"];if(A1($)){var D=$.name?": "+$.name:"";Y=" [Function"+D+"]"}if(M1($))Y=" "+RegExp.prototype.toString.call($);if(e1($))Y=" "+Date.prototype.toUTCString.call($);if(T1($))Y=" "+r1($);if(Q.length===0&&(!V||$.length==0))return w[0]+Y+w[1];if(Z<0)if(M1($))return f.stylize(RegExp.prototype.toString.call($),"regexp");else return f.stylize("[Object]","special");f.seen.push($);var O;if(V)O=E8(f,$,Z,X,Q);else O=Q.map(function(q){return t1(f,$,Z,X,q,V)});return f.seen.pop(),b8(O,Y,w)}function P8(f,$){if(l0($))return f.stylize("undefined","undefined");if(C1($)){var Z="'"+JSON.stringify($).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return f.stylize(Z,"string")}if(af($))return f.stylize(""+$,"number");if($f($))return f.stylize(""+$,"boolean");if(j1($))return f.stylize("null","null")}function r1(f){return"["+Error.prototype.toString.call(f)+"]"}function E8(f,$,Z,z,J){var Q=[];for(var X=0,W=$.length;X<W;++X)if(f$($,String(X)))Q.push(t1(f,$,Z,z,String(X),!0));else Q.push("");return J.forEach(function(Y){if(!Y.match(/^\d+$/))Q.push(t1(f,$,Z,z,Y,!0))}),Q}function t1(f,$,Z,z,J,Q){var X,W,Y;if(Y=Object.getOwnPropertyDescriptor($,J)||{value:$[J]},Y.get)if(Y.set)W=f.stylize("[Getter/Setter]","special");else W=f.stylize("[Getter]","special");else if(Y.set)W=f.stylize("[Setter]","special");if(!f$(z,J))X="["+J+"]";if(!W)if(f.seen.indexOf(Y.value)<0){if(j1(Z))W=q1(f,Y.value,null);else W=q1(f,Y.value,Z-1);if(W.indexOf(`
|
|
2
2
|
`)>-1)if(Q)W=W.split(`
|
|
3
3
|
`).map(function(V){return" "+V}).join(`
|
|
4
4
|
`).slice(2);else W=`
|
|
@@ -7,54 +7,54 @@ var M8=Object.create;var{getPrototypeOf:T8,defineProperty:X1,getOwnPropertyNames
|
|
|
7
7
|
`)}else W=f.stylize("[Circular]","special");if(l0(X)){if(Q&&J.match(/^\d+$/))return W;if(X=JSON.stringify(""+J),X.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/))X=X.slice(1,-1),X=f.stylize(X,"name");else X=X.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),X=f.stylize(X,"string")}return X+": "+W}function b8(f,$,Z){var z=0,J=f.reduce(function(Q,X){if(z++,X.indexOf(`
|
|
8
8
|
`)>=0)z++;return Q+X.replace(/\u001b\[\d\d?m/g,"").length+1},0);if(J>60)return Z[0]+($===""?"":$+`
|
|
9
9
|
`)+" "+f.join(`,
|
|
10
|
-
`)+" "+Z[1];return Z[0]+$+" "+f.join(", ")+" "+Z[1]}function rf(f){return Array.isArray(f)}function $f(f){return typeof f==="boolean"}function q1(f){return f===null}function v8(f){return f==null}function af(f){return typeof f==="number"}function j1(f){return typeof f==="string"}function x8(f){return typeof f==="symbol"}function l0(f){return f===void 0}function L1(f){return n0(f)&&Zf(f)==="[object RegExp]"}function n0(f){return typeof f==="object"&&f!==null}function e1(f){return n0(f)&&Zf(f)==="[object Date]"}function M1(f){return n0(f)&&(Zf(f)==="[object Error]"||f instanceof Error)}function T1(f){return typeof f==="function"}function g8(f){return f===null||typeof f==="boolean"||typeof f==="number"||typeof f==="string"||typeof f==="symbol"||typeof f>"u"}function k8(f){return f instanceof Buffer}function Zf(f){return Object.prototype.toString.call(f)}function a1(f){return f<10?"0"+f.toString(10):f.toString(10)}function c8(){var f=new Date,$=[a1(f.getHours()),a1(f.getMinutes()),a1(f.getSeconds())].join(":");return[f.getDate(),u8[f.getMonth()],$].join(" ")}function tf(...f){console.log("%s - %s",c8(),ff.apply(null,f))}function ef(f,$){if($)f.super_=$,f.prototype=Object.create($.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}})}function zf(f,$){if(!$||!n0($))return f;var Z=Object.keys($),z=Z.length;while(z--)f[Z[z]]=$[Z[z]];return f}function f$(f,$){return Object.prototype.hasOwnProperty.call(f,$)}function Jf(f,$){if(!f){var Z=Error("Promise was rejected with a falsy value");Z.reason=f,f=Z}return $(f)}function Z$(f){if(typeof f!=="function")throw TypeError('The "original" argument must be of type Function');function $(...Z){var z=Z.pop();if(typeof z!=="function")throw TypeError("The last argument must be of type Function");var J=this,Q=function(...X){return z.apply(J,...X)};f.apply(this,Z).then(function(X){process.nextTick(Q.bind(null,null,X))},function(X){process.nextTick(Jf.bind(null,X,Q))})}return Object.setPrototypeOf($,Object.getPrototypeOf(f)),Object.defineProperties($,Object.getOwnPropertyDescriptors(f)),$}var j8,R8,u0,_8=()=>{},u8,$$,z$,J$,y8;var X$=sf(()=>{j8=/%[sdj%]/g;R8=((f={},$={},Z)=>((Z=typeof process<"u"&&!1)&&(Z=Z.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase()),$=new RegExp("^"+Z+"$","i"),(z)=>{if(z=z.toUpperCase(),!f[z])if($.test(z))f[z]=function(...J){console.error("%s: %s",z,pid,ff.apply(null,...J))};else f[z]=function(){};return f[z]}))(),u0=((f)=>(f.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},f.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},f.custom=Symbol.for("nodejs.util.inspect.custom"),f))(function(f,$,...Z){var z={seen:[],stylize:I8};if(Z.length>=1)z.depth=Z[0];if(Z.length>=2)z.colors=Z[1];if($f($))z.showHidden=$;else if($)zf(z,$);if(l0(z.showHidden))z.showHidden=!1;if(l0(z.depth))z.depth=2;if(l0(z.colors))z.colors=!1;if(z.colors)z.stylize=N8;return A1(z,f,z.depth)});u8=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];$$=((f)=>(f.custom=Symbol.for("nodejs.util.promisify.custom"),f))(function(f){if(typeof f!=="function")throw TypeError('The "original" argument must be of type Function');if(kCustomPromisifiedSymbol&&f[kCustomPromisifiedSymbol]){var $=f[kCustomPromisifiedSymbol];if(typeof $!=="function")throw TypeError('The "nodejs.util.promisify.custom" argument must be of type Function');return Object.defineProperty($,kCustomPromisifiedSymbol,{value:$,enumerable:!1,writable:!1,configurable:!0}),$}function $(...Z){var z,J,Q=new Promise(function(X,W){z=X,J=W});Z.push(function(X,W){if(X)J(X);else z(W)});try{f.apply(this,Z)}catch(X){J(X)}return Q}if(Object.setPrototypeOf($,Object.getPrototypeOf(f)),kCustomPromisifiedSymbol)Object.defineProperty($,kCustomPromisifiedSymbol,{value:$,enumerable:!1,writable:!1,configurable:!0});return Object.defineProperties($,Object.getOwnPropertyDescriptors(f))});({TextEncoder:z$,TextDecoder:J$}=globalThis),y8={TextEncoder:z$,TextDecoder:J$,promisify:$$,log:tf,inherits:ef,_extend:zf,callbackifyOnRejected:Jf,callbackify:Z$}});var V1={};of(V1,{throws:()=>$z,strictEqual:()=>fz,strict:()=>e9,rejects:()=>t9,ok:()=>a9,notStrictEqual:()=>r9,notEqual:()=>s9,notDeepStrictEqual:()=>o9,notDeepEqual:()=>p9,match:()=>n9,ifError:()=>l9,fail:()=>i9,equal:()=>d9,doesNotThrow:()=>m9,doesNotReject:()=>h9,doesNotMatch:()=>y9,default:()=>Zz,deepStrictEqual:()=>c9,deepEqual:()=>u9,CallTracker:()=>k9,AssertionError:()=>g9});var h8,m8,W$,d8,i8,l8=(f,$,Z)=>{Z=f!=null?h8(m8(f)):{};let z=$||!f||!f.__esModule?W$(Z,"default",{value:f,enumerable:!0}):Z;for(let J of d8(f))if(!i8.call(z,J))W$(z,J,{get:()=>f[J],enumerable:!0});return z},x=(f,$)=>()=>($||f(($={exports:{}}).exports,$),$.exports),Xf,C1,Wf,n8,p8,o8,s8,Y$,F1,r8,a8,t8,e8,f9,$9,Z9,z9,J9,Q9,p0,R1,X9,F$,U$,W9,U1,Yf,Ff,Y9,V$,Uf,F9,Vf,w$,wf,o0,U9,V9,w9,B9,H9,G9,O9,D9,K9,B$,H$,L9,M9,N1,G$,T9,A9,q9,j9,C9,Y1,O$,R9,D$,N9,K$,I9,S9,L$,Bf,P9,I1,E9,b9,M$,T$,_9,v9,x9,Qf,A$,g9,k9,u9,c9,y9,h9,m9,d9,i9,l9,n9,p9,o9,s9,r9,a9,t9,e9,fz,$z,Zz;var w1=sf(()=>{h8=Object.create,{getPrototypeOf:m8,defineProperty:W$,getOwnPropertyNames:d8}=Object,i8=Object.prototype.hasOwnProperty,Xf=x((f,$)=>{$.exports=function(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function")return!1;if(typeof Symbol.iterator==="symbol")return!0;var Z={},z=Symbol("test"),J=Object(z);if(typeof z==="string")return!1;if(Object.prototype.toString.call(z)!=="[object Symbol]")return!1;if(Object.prototype.toString.call(J)!=="[object Symbol]")return!1;var Q=42;Z[z]=Q;for(var X in Z)return!1;if(typeof Object.keys==="function"&&Object.keys(Z).length!==0)return!1;if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(Z).length!==0)return!1;var W=Object.getOwnPropertySymbols(Z);if(W.length!==1||W[0]!==z)return!1;if(!Object.prototype.propertyIsEnumerable.call(Z,z))return!1;if(typeof Object.getOwnPropertyDescriptor==="function"){var Y=Object.getOwnPropertyDescriptor(Z,z);if(Y.value!==Q||Y.enumerable!==!0)return!1}return!0}}),C1=x((f,$)=>{var Z=Xf();$.exports=function(){return Z()&&!!Symbol.toStringTag}}),Wf=x((f,$)=>{$.exports=Object}),n8=x((f,$)=>{$.exports=Error}),p8=x((f,$)=>{$.exports=EvalError}),o8=x((f,$)=>{$.exports=RangeError}),s8=x((f,$)=>{$.exports=ReferenceError}),Y$=x((f,$)=>{$.exports=SyntaxError}),F1=x((f,$)=>{$.exports=TypeError}),r8=x((f,$)=>{$.exports=URIError}),a8=x((f,$)=>{$.exports=Math.abs}),t8=x((f,$)=>{$.exports=Math.floor}),e8=x((f,$)=>{$.exports=Math.max}),f9=x((f,$)=>{$.exports=Math.min}),$9=x((f,$)=>{$.exports=Math.pow}),Z9=x((f,$)=>{$.exports=Math.round}),z9=x((f,$)=>{$.exports=Number.isNaN||function(Z){return Z!==Z}}),J9=x((f,$)=>{var Z=z9();$.exports=function(z){if(Z(z)||z===0)return z;return z<0?-1:1}}),Q9=x((f,$)=>{$.exports=Object.getOwnPropertyDescriptor}),p0=x((f,$)=>{var Z=Q9();if(Z)try{Z([],"length")}catch(z){Z=null}$.exports=Z}),R1=x((f,$)=>{var Z=Object.defineProperty||!1;if(Z)try{Z({},"a",{value:1})}catch(z){Z=!1}$.exports=Z}),X9=x((f,$)=>{var Z=typeof Symbol<"u"&&Symbol,z=Xf();$.exports=function(){if(typeof Z!=="function")return!1;if(typeof Symbol!=="function")return!1;if(typeof Z("foo")!=="symbol")return!1;if(typeof Symbol("bar")!=="symbol")return!1;return z()}}),F$=x((f,$)=>{$.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}),U$=x((f,$)=>{var Z=Wf();$.exports=Z.getPrototypeOf||null}),W9=x((f,$)=>{var Z="Function.prototype.bind called on incompatible ",z=Object.prototype.toString,J=Math.max,Q="[object Function]",X=function(V,B){var D=[];for(var O=0;O<V.length;O+=1)D[O]=V[O];for(var q=0;q<B.length;q+=1)D[q+V.length]=B[q];return D},W=function(V,B){var D=[];for(var O=B||0,q=0;O<V.length;O+=1,q+=1)D[q]=V[O];return D},Y=function(V,B){var D="";for(var O=0;O<V.length;O+=1)if(D+=V[O],O+1<V.length)D+=B;return D};$.exports=function(V){var B=this;if(typeof B!=="function"||z.apply(B)!==Q)throw TypeError(Z+B);var D=W(arguments,1),O,q=function(){if(this instanceof O){var u=B.apply(this,X(D,arguments));if(Object(u)===u)return u;return this}return B.apply(V,X(D,arguments))},R=J(0,B.length-D.length),b=[];for(var v=0;v<R;v++)b[v]="$"+v;if(O=Function("binder","return function ("+Y(b,",")+"){ return binder.apply(this,arguments); }")(q),B.prototype){var _=function(){};_.prototype=B.prototype,O.prototype=new _,_.prototype=null}return O}}),U1=x((f,$)=>{var Z=W9();$.exports=Function.prototype.bind||Z}),Yf=x((f,$)=>{$.exports=Function.prototype.call}),Ff=x((f,$)=>{$.exports=Function.prototype.apply}),Y9=x((f,$)=>{$.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply}),V$=x((f,$)=>{var Z=U1(),z=Ff(),J=Yf(),Q=Y9();$.exports=Q||Z.call(J,z)}),Uf=x((f,$)=>{var Z=U1(),z=F1(),J=Yf(),Q=V$();$.exports=function(X){if(X.length<1||typeof X[0]!=="function")throw new z("a function is required");return Q(Z,J,X)}}),F9=x((f,$)=>{var Z=Uf(),z=p0(),J;try{J=[].__proto__===Array.prototype}catch(Y){if(!Y||typeof Y!=="object"||!("code"in Y)||Y.code!=="ERR_PROTO_ACCESS")throw Y}var Q=!!J&&z&&z(Object.prototype,"__proto__"),X=Object,W=X.getPrototypeOf;$.exports=Q&&typeof Q.get==="function"?Z([Q.get]):typeof W==="function"?function(Y){return W(Y==null?Y:X(Y))}:!1}),Vf=x((f,$)=>{var Z=F$(),z=U$(),J=F9();$.exports=Z?function(Q){return Z(Q)}:z?function(Q){if(!Q||typeof Q!=="object"&&typeof Q!=="function")throw TypeError("getProto: not an object");return z(Q)}:J?function(Q){return J(Q)}:null}),w$=x((f,$)=>{var Z=Function.prototype.call,z=Object.prototype.hasOwnProperty,J=U1();$.exports=J.call(Z,z)}),wf=x((f,$)=>{var Z,z=Wf(),J=n8(),Q=p8(),X=o8(),W=s8(),Y=Y$(),V=F1(),B=r8(),D=a8(),O=t8(),q=e8(),R=f9(),b=$9(),v=Z9(),_=J9(),u=Function,k=function(H){try{return u('"use strict"; return ('+H+").constructor;")()}catch(T){}},S=p0(),r=R1(),e=function(){throw new V},C=S?function(){try{return arguments.callee,e}catch(H){try{return S(arguments,"callee").get}catch(T){return e}}}():e,A=X9()(),N=Vf(),m=U$(),s=F$(),i=Ff(),$0=Yf(),l={},V0=typeof Uint8Array>"u"||!N?Z:N(Uint8Array),F0={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Z:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Z:ArrayBuffer,"%ArrayIteratorPrototype%":A&&N?N([][Symbol.iterator]()):Z,"%AsyncFromSyncIteratorPrototype%":Z,"%AsyncFunction%":l,"%AsyncGenerator%":l,"%AsyncGeneratorFunction%":l,"%AsyncIteratorPrototype%":l,"%Atomics%":typeof Atomics>"u"?Z:Atomics,"%BigInt%":typeof BigInt>"u"?Z:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Z:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Z:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Z:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":J,"%eval%":eval,"%EvalError%":Q,"%Float16Array%":typeof Float16Array>"u"?Z:Float16Array,"%Float32Array%":typeof Float32Array>"u"?Z:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Z:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Z:FinalizationRegistry,"%Function%":u,"%GeneratorFunction%":l,"%Int8Array%":typeof Int8Array>"u"?Z:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Z:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Z:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":A&&N?N(N([][Symbol.iterator]())):Z,"%JSON%":typeof JSON==="object"?JSON:Z,"%Map%":typeof Map>"u"?Z:Map,"%MapIteratorPrototype%":typeof Map>"u"||!A||!N?Z:N(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":z,"%Object.getOwnPropertyDescriptor%":S,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Z:Promise,"%Proxy%":typeof Proxy>"u"?Z:Proxy,"%RangeError%":X,"%ReferenceError%":W,"%Reflect%":typeof Reflect>"u"?Z:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Z:Set,"%SetIteratorPrototype%":typeof Set>"u"||!A||!N?Z:N(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Z:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":A&&N?N(""[Symbol.iterator]()):Z,"%Symbol%":A?Symbol:Z,"%SyntaxError%":Y,"%ThrowTypeError%":C,"%TypedArray%":V0,"%TypeError%":V,"%Uint8Array%":typeof Uint8Array>"u"?Z:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Z:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Z:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Z:Uint32Array,"%URIError%":B,"%WeakMap%":typeof WeakMap>"u"?Z:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Z:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Z:WeakSet,"%Function.prototype.call%":$0,"%Function.prototype.apply%":i,"%Object.defineProperty%":r,"%Object.getPrototypeOf%":m,"%Math.abs%":D,"%Math.floor%":O,"%Math.max%":q,"%Math.min%":R,"%Math.pow%":b,"%Math.round%":v,"%Math.sign%":_,"%Reflect.getPrototypeOf%":s};if(N)try{null.error}catch(H){O0=N(N(H)),F0["%Error.prototype%"]=O0}var O0,W0=function H(T){var P;if(T==="%AsyncFunction%")P=k("async function () {}");else if(T==="%GeneratorFunction%")P=k("function* () {}");else if(T==="%AsyncGeneratorFunction%")P=k("async function* () {}");else if(T==="%AsyncGenerator%"){var E=H("%AsyncGeneratorFunction%");if(E)P=E.prototype}else if(T==="%AsyncIteratorPrototype%"){var o=H("%AsyncGenerator%");if(o&&N)P=N(o.prototype)}return F0[T]=P,P},C0={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},w0=U1(),F=w$(),U=w0.call($0,Array.prototype.concat),L=w0.call(i,Array.prototype.splice),I=w0.call($0,String.prototype.replace),y=w0.call($0,String.prototype.slice),h=w0.call($0,RegExp.prototype.exec),d=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,c=/\\(\\)?/g,K=function(H){var T=y(H,0,1),P=y(H,-1);if(T==="%"&&P!=="%")throw new Y("invalid intrinsic syntax, expected closing `%`");else if(P==="%"&&T!=="%")throw new Y("invalid intrinsic syntax, expected opening `%`");var E=[];return I(H,d,function(o,t,Z0,D0){E[E.length]=Z0?I(D0,c,"$1"):t||o}),E},w=function(H,T){var P=H,E;if(F(C0,P))E=C0[P],P="%"+E[0]+"%";if(F(F0,P)){var o=F0[P];if(o===l)o=W0(P);if(typeof o>"u"&&!T)throw new V("intrinsic "+H+" exists, but is not available. Please file an issue!");return{alias:E,name:P,value:o}}throw new Y("intrinsic "+H+" does not exist!")};$.exports=function(H,T){if(typeof H!=="string"||H.length===0)throw new V("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof T!=="boolean")throw new V('"allowMissing" argument must be a boolean');if(h(/^%?[^%]*%?$/,H)===null)throw new Y("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var P=K(H),E=P.length>0?P[0]:"",o=w("%"+E+"%",T),t=o.name,Z0=o.value,D0=!1,j=o.alias;if(j)E=j[0],L(P,U([0,1],j));for(var G0=1,P0=!0;G0<P.length;G0+=1){var A0=P[G0],K0=y(A0,0,1),R0=y(A0,-1);if((K0==='"'||K0==="'"||K0==="`"||(R0==='"'||R0==="'"||R0==="`"))&&K0!==R0)throw new Y("property names with quotes must have matching quotes");if(A0==="constructor"||!P0)D0=!0;if(E+="."+A0,t="%"+E+"%",F(F0,t))Z0=F0[t];else if(Z0!=null){if(!(A0 in Z0)){if(!T)throw new V("base intrinsic for "+H+" exists, but the property is not available.");return}if(S&&G0+1>=P.length){var j0=S(Z0,A0);if(P0=!!j0,P0&&"get"in j0&&!("originalValue"in j0.get))Z0=j0.get;else Z0=Z0[A0]}else P0=F(Z0,A0),Z0=Z0[A0];if(P0&&!D0)F0[t]=Z0}}return Z0}}),o0=x((f,$)=>{var Z=wf(),z=Uf(),J=z([Z("%String.prototype.indexOf%")]);$.exports=function(Q,X){var W=Z(Q,!!X);if(typeof W==="function"&&J(Q,".prototype.")>-1)return z([W]);return W}}),U9=x((f,$)=>{var Z=C1()(),z=o0(),J=z("Object.prototype.toString"),Q=function(Y){if(Z&&Y&&typeof Y==="object"&&Symbol.toStringTag in Y)return!1;return J(Y)==="[object Arguments]"},X=function(Y){if(Q(Y))return!0;return Y!==null&&typeof Y==="object"&&"length"in Y&&typeof Y.length==="number"&&Y.length>=0&&J(Y)!=="[object Array]"&&"callee"in Y&&J(Y.callee)==="[object Function]"},W=function(){return Q(arguments)}();Q.isLegacyArguments=X,$.exports=W?Q:X}),V9=x((f,$)=>{var Z=o0(),z=C1()(),J=w$(),Q=p0(),X;if(z){if(W=Z("RegExp.prototype.exec"),Y={},V=function(){throw Y},B={toString:V,valueOf:V},typeof Symbol.toPrimitive==="symbol")B[Symbol.toPrimitive]=V;X=function(q){if(!q||typeof q!=="object")return!1;var R=Q(q,"lastIndex"),b=R&&J(R,"value");if(!b)return!1;try{W(q,B)}catch(v){return v===Y}}}else D=Z("Object.prototype.toString"),O="[object RegExp]",X=function(q){if(!q||typeof q!=="object"&&typeof q!=="function")return!1;return D(q)===O};var W,Y,V,B,D,O;$.exports=X}),w9=x((f,$)=>{var Z=o0(),z=V9(),J=Z("RegExp.prototype.exec"),Q=F1();$.exports=function(X){if(!z(X))throw new Q("`regex` must be a RegExp");return function(W){return J(X,W)!==null}}}),B9=x((f,$)=>{var Z=function*(){}.constructor;$.exports=()=>Z}),H9=x((f,$)=>{var Z=o0(),z=w9(),J=z(/^\s*(?:function)?\*/),Q=C1()(),X=Vf(),W=Z("Object.prototype.toString"),Y=Z("Function.prototype.toString"),V=B9();$.exports=function(B){if(typeof B!=="function")return!1;if(J(Y(B)))return!0;if(!Q){var D=W(B);return D==="[object GeneratorFunction]"}if(!X)return!1;var O=V();return O&&X(B)===O.prototype}}),G9=x((f,$)=>{var Z=Function.prototype.toString,z=typeof Reflect==="object"&&Reflect!==null&&Reflect.apply,J,Q;if(typeof z==="function"&&typeof Object.defineProperty==="function")try{J=Object.defineProperty({},"length",{get:function(){throw Q}}),Q={},z(function(){throw 42},null,J)}catch(S){if(S!==Q)z=null}else z=null;var X=/^\s*class\b/,W=function(S){try{var r=Z.call(S);return X.test(r)}catch(e){return!1}},Y=function(S){try{if(W(S))return!1;return Z.call(S),!0}catch(r){return!1}},V=Object.prototype.toString,B="[object Object]",D="[object Function]",O="[object GeneratorFunction]",q="[object HTMLAllCollection]",R="[object HTML document.all class]",b="[object HTMLCollection]",v=typeof Symbol==="function"&&!!Symbol.toStringTag,_=!(0 in[,]),u=function(){return!1};if(typeof document==="object"){if(k=document.all,V.call(k)===V.call(document.all))u=function(S){if((_||!S)&&(typeof S>"u"||typeof S==="object"))try{var r=V.call(S);return(r===q||r===R||r===b||r===B)&&S("")==null}catch(e){}return!1}}var k;$.exports=z?function(S){if(u(S))return!0;if(!S)return!1;if(typeof S!=="function"&&typeof S!=="object")return!1;try{z(S,null,J)}catch(r){if(r!==Q)return!1}return!W(S)&&Y(S)}:function(S){if(u(S))return!0;if(!S)return!1;if(typeof S!=="function"&&typeof S!=="object")return!1;if(v)return Y(S);if(W(S))return!1;var r=V.call(S);if(r!==D&&r!==O&&!/^\[object HTML/.test(r))return!1;return Y(S)}}),O9=x((f,$)=>{var Z=G9(),z=Object.prototype.toString,J=Object.prototype.hasOwnProperty,Q=function(V,B,D){for(var O=0,q=V.length;O<q;O++)if(J.call(V,O))if(D==null)B(V[O],O,V);else B.call(D,V[O],O,V)},X=function(V,B,D){for(var O=0,q=V.length;O<q;O++)if(D==null)B(V.charAt(O),O,V);else B.call(D,V.charAt(O),O,V)},W=function(V,B,D){for(var O in V)if(J.call(V,O))if(D==null)B(V[O],O,V);else B.call(D,V[O],O,V)};function Y(V){return z.call(V)==="[object Array]"}$.exports=function(V,B,D){if(!Z(B))throw TypeError("iterator must be a function");var O;if(arguments.length>=3)O=D;if(Y(V))Q(V,B,O);else if(typeof V==="string")X(V,B,O);else W(V,B,O)}}),D9=x((f,$)=>{$.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]}),K9=x((f,$)=>{var Z=D9(),z=typeof globalThis>"u"?globalThis:globalThis;$.exports=function(){var J=[];for(var Q=0;Q<Z.length;Q++)if(typeof z[Z[Q]]==="function")J[J.length]=Z[Q];return J}}),B$=x((f,$)=>{var Z=R1(),z=Y$(),J=F1(),Q=p0();$.exports=function(X,W,Y){if(!X||typeof X!=="object"&&typeof X!=="function")throw new J("`obj` must be an object or a function`");if(typeof W!=="string"&&typeof W!=="symbol")throw new J("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!=="boolean"&&arguments[3]!==null)throw new J("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!=="boolean"&&arguments[4]!==null)throw new J("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!=="boolean"&&arguments[5]!==null)throw new J("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!=="boolean")throw new J("`loose`, if provided, must be a boolean");var V=arguments.length>3?arguments[3]:null,B=arguments.length>4?arguments[4]:null,D=arguments.length>5?arguments[5]:null,O=arguments.length>6?arguments[6]:!1,q=!!Q&&Q(X,W);if(Z)Z(X,W,{configurable:D===null&&q?q.configurable:!D,enumerable:V===null&&q?q.enumerable:!V,value:Y,writable:B===null&&q?q.writable:!B});else if(O||!V&&!B&&!D)X[W]=Y;else throw new z("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}),H$=x((f,$)=>{var Z=R1(),z=function(){return!!Z};z.hasArrayLengthDefineBug=function(){if(!Z)return null;try{return Z([],"length",{value:1}).length!==1}catch(J){return!0}},$.exports=z}),L9=x((f,$)=>{var Z=wf(),z=B$(),J=H$()(),Q=p0(),X=F1(),W=Z("%Math.floor%");$.exports=function(Y,V){if(typeof Y!=="function")throw new X("`fn` is not a function");if(typeof V!=="number"||V<0||V>4294967295||W(V)!==V)throw new X("`length` must be a positive 32-bit integer");var B=arguments.length>2&&!!arguments[2],D=!0,O=!0;if("length"in Y&&Q){var q=Q(Y,"length");if(q&&!q.configurable)D=!1;if(q&&!q.writable)O=!1}if(D||O||!B)if(J)z(Y,"length",V,!0,!0);else z(Y,"length",V);return Y}}),M9=x((f,$)=>{var Z=U1(),z=Ff(),J=V$();$.exports=function(){return J(Z,z,arguments)}}),N1=x((f,$)=>{var Z=L9(),z=R1(),J=Uf(),Q=M9();if($.exports=function(X){var W=J(arguments),Y=X.length-(arguments.length-1);return Z(W,1+(Y>0?Y:0),!0)},z)z($.exports,"apply",{value:Q});else $.exports.apply=Q}),G$=x((f,$)=>{var Z=O9(),z=K9(),J=N1(),Q=o0(),X=p0(),W=Vf(),Y=Q("Object.prototype.toString"),V=C1()(),B=typeof globalThis>"u"?globalThis:globalThis,D=z(),O=Q("String.prototype.slice"),q=Q("Array.prototype.indexOf",!0)||function(_,u){for(var k=0;k<_.length;k+=1)if(_[k]===u)return k;return-1},R={__proto__:null};if(V&&X&&W)Z(D,function(_){var u=new B[_];if(Symbol.toStringTag in u&&W){var k=W(u),S=X(k,Symbol.toStringTag);if(!S&&k){var r=W(k);S=X(r,Symbol.toStringTag)}R["$"+_]=J(S.get)}});else Z(D,function(_){var u=new B[_],k=u.slice||u.set;if(k)R["$"+_]=J(k)});var b=function(_){var u=!1;return Z(R,function(k,S){if(!u)try{if("$"+k(_)===S)u=O(S,1)}catch(r){}}),u},v=function(_){var u=!1;return Z(R,function(k,S){if(!u)try{k(_),u=O(S,1)}catch(r){}}),u};$.exports=function(_){if(!_||typeof _!=="object")return!1;if(!V){var u=O(Y(_),8,-1);if(q(D,u)>-1)return u;if(u!=="Object")return!1;return v(_)}if(!X)return null;return b(_)}}),T9=x((f,$)=>{var Z=G$();$.exports=function(z){return!!Z(z)}}),A9=x((f)=>{var $=U9(),Z=H9(),z=G$(),J=T9();function Q(j){return j.call.bind(j)}var X=typeof BigInt<"u",W=typeof Symbol<"u",Y=Q(Object.prototype.toString),V=Q(Number.prototype.valueOf),B=Q(String.prototype.valueOf),D=Q(Boolean.prototype.valueOf);if(X)O=Q(BigInt.prototype.valueOf);var O;if(W)q=Q(Symbol.prototype.valueOf);var q;function R(j,G0){if(typeof j!=="object")return!1;try{return G0(j),!0}catch(P0){return!1}}f.isArgumentsObject=$,f.isGeneratorFunction=Z,f.isTypedArray=J;function b(j){return typeof Promise<"u"&&j instanceof Promise||j!==null&&typeof j==="object"&&typeof j.then==="function"&&typeof j.catch==="function"}f.isPromise=b;function v(j){if(typeof ArrayBuffer<"u"&&ArrayBuffer.isView)return ArrayBuffer.isView(j);return J(j)||L(j)}f.isArrayBufferView=v;function _(j){return z(j)==="Uint8Array"}f.isUint8Array=_;function u(j){return z(j)==="Uint8ClampedArray"}f.isUint8ClampedArray=u;function k(j){return z(j)==="Uint16Array"}f.isUint16Array=k;function S(j){return z(j)==="Uint32Array"}f.isUint32Array=S;function r(j){return z(j)==="Int8Array"}f.isInt8Array=r;function e(j){return z(j)==="Int16Array"}f.isInt16Array=e;function C(j){return z(j)==="Int32Array"}f.isInt32Array=C;function A(j){return z(j)==="Float32Array"}f.isFloat32Array=A;function N(j){return z(j)==="Float64Array"}f.isFloat64Array=N;function m(j){return z(j)==="BigInt64Array"}f.isBigInt64Array=m;function s(j){return z(j)==="BigUint64Array"}f.isBigUint64Array=s;function i(j){return Y(j)==="[object Map]"}i.working=typeof Map<"u"&&i(new Map);function $0(j){if(typeof Map>"u")return!1;return i.working?i(j):j instanceof Map}f.isMap=$0;function l(j){return Y(j)==="[object Set]"}l.working=typeof Set<"u"&&l(new Set);function V0(j){if(typeof Set>"u")return!1;return l.working?l(j):j instanceof Set}f.isSet=V0;function F0(j){return Y(j)==="[object WeakMap]"}F0.working=typeof WeakMap<"u"&&F0(new WeakMap);function O0(j){if(typeof WeakMap>"u")return!1;return F0.working?F0(j):j instanceof WeakMap}f.isWeakMap=O0;function W0(j){return Y(j)==="[object WeakSet]"}W0.working=typeof WeakSet<"u"&&W0(new WeakSet);function C0(j){return W0(j)}f.isWeakSet=C0;function w0(j){return Y(j)==="[object ArrayBuffer]"}w0.working=typeof ArrayBuffer<"u"&&w0(new ArrayBuffer);function F(j){if(typeof ArrayBuffer>"u")return!1;return w0.working?w0(j):j instanceof ArrayBuffer}f.isArrayBuffer=F;function U(j){return Y(j)==="[object DataView]"}U.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&U(new DataView(new ArrayBuffer(1),0,1));function L(j){if(typeof DataView>"u")return!1;return U.working?U(j):j instanceof DataView}f.isDataView=L;var I=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function y(j){return Y(j)==="[object SharedArrayBuffer]"}function h(j){if(typeof I>"u")return!1;if(typeof y.working>"u")y.working=y(new I);return y.working?y(j):j instanceof I}f.isSharedArrayBuffer=h;function d(j){return Y(j)==="[object AsyncFunction]"}f.isAsyncFunction=d;function c(j){return Y(j)==="[object Map Iterator]"}f.isMapIterator=c;function K(j){return Y(j)==="[object Set Iterator]"}f.isSetIterator=K;function w(j){return Y(j)==="[object Generator]"}f.isGeneratorObject=w;function H(j){return Y(j)==="[object WebAssembly.Module]"}f.isWebAssemblyCompiledModule=H;function T(j){return R(j,V)}f.isNumberObject=T;function P(j){return R(j,B)}f.isStringObject=P;function E(j){return R(j,D)}f.isBooleanObject=E;function o(j){return X&&R(j,O)}f.isBigIntObject=o;function t(j){return W&&R(j,q)}f.isSymbolObject=t;function Z0(j){return T(j)||P(j)||E(j)||o(j)||t(j)}f.isBoxedPrimitive=Z0;function D0(j){return typeof Uint8Array<"u"&&(F(j)||h(j))}f.isAnyArrayBuffer=D0,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(j){Object.defineProperty(f,j,{enumerable:!1,value:function(){throw Error(j+" is not supported in userland")}})})}),q9=x((f,$)=>{$.exports=function(Z){return Z instanceof Buffer}}),j9=x((f,$)=>{if(typeof Object.create==="function")$.exports=function(Z,z){if(z)Z.super_=z,Z.prototype=Object.create(z.prototype,{constructor:{value:Z,enumerable:!1,writable:!0,configurable:!0}})};else $.exports=function(Z,z){if(z){Z.super_=z;var J=function(){};J.prototype=z.prototype,Z.prototype=new J,Z.prototype.constructor=Z}}}),C9=x((f,$)=>{try{if(Z=(X$(),W1(Q$)),typeof Z.inherits!=="function")throw"";$.exports=Z.inherits}catch(z){$.exports=j9()}var Z}),Y1=x((f)=>{var $=Object.getOwnPropertyDescriptors||function(F){var U=Object.keys(F),L={};for(var I=0;I<U.length;I++)L[U[I]]=Object.getOwnPropertyDescriptor(F,U[I]);return L},Z=/%[sdj%]/g;f.format=function(F){if(!S(F)){var U=[];for(var L=0;L<arguments.length;L++)U.push(Q(arguments[L]));return U.join(" ")}var L=1,I=arguments,y=I.length,h=String(F).replace(Z,function(c){if(c==="%%")return"%";if(L>=y)return c;switch(c){case"%s":return String(I[L++]);case"%d":return Number(I[L++]);case"%j":try{return JSON.stringify(I[L++])}catch(K){return"[Circular]"}default:return c}});for(var d=I[L];L<y;d=I[++L])if(_(d)||!A(d))h+=" "+d;else h+=" "+Q(d);return h},f.deprecate=function(F,U){if(typeof process<"u"&&process.noDeprecation===!0)return F;if(typeof process>"u")return function(){return f.deprecate(F,U).apply(this,arguments)};var L=!1;function I(){if(!L){if(process.throwDeprecation)throw Error(U);else if(process.traceDeprecation)console.trace(U);else console.error(U);L=!0}return F.apply(this,arguments)}return I};var z={},J=/^$/;f.debuglog=function(F){if(F=F.toUpperCase(),!z[F])if(J.test(F)){var U=process.pid;z[F]=function(){var L=f.format.apply(f,arguments);console.error("%s %d: %s",F,U,L)}}else z[F]=function(){};return z[F]};function Q(F,U){var L={seen:[],stylize:W};if(arguments.length>=3)L.depth=arguments[2];if(arguments.length>=4)L.colors=arguments[3];if(v(U))L.showHidden=U;else if(U)f._extend(L,U);if(e(L.showHidden))L.showHidden=!1;if(e(L.depth))L.depth=2;if(e(L.colors))L.colors=!1;if(e(L.customInspect))L.customInspect=!0;if(L.colors)L.stylize=X;return V(L,F,L.depth)}f.inspect=Q,Q.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},Q.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function X(F,U){var L=Q.styles[U];if(L)return"\x1B["+Q.colors[L][0]+"m"+F+"\x1B["+Q.colors[L][1]+"m";else return F}function W(F,U){return F}function Y(F){var U={};return F.forEach(function(L,I){U[L]=!0}),U}function V(F,U,L){if(F.customInspect&&U&&s(U.inspect)&&U.inspect!==f.inspect&&!(U.constructor&&U.constructor.prototype===U)){var I=U.inspect(L,F);if(!S(I))I=V(F,I,L);return I}var y=B(F,U);if(y)return y;var h=Object.keys(U),d=Y(h);if(F.showHidden)h=Object.getOwnPropertyNames(U);if(m(U)&&(h.indexOf("message")>=0||h.indexOf("description")>=0))return D(U);if(h.length===0){if(s(U)){var c=U.name?": "+U.name:"";return F.stylize("[Function"+c+"]","special")}if(C(U))return F.stylize(RegExp.prototype.toString.call(U),"regexp");if(N(U))return F.stylize(Date.prototype.toString.call(U),"date");if(m(U))return D(U)}var K="",w=!1,H=["{","}"];if(b(U))w=!0,H=["[","]"];if(s(U)){var T=U.name?": "+U.name:"";K=" [Function"+T+"]"}if(C(U))K=" "+RegExp.prototype.toString.call(U);if(N(U))K=" "+Date.prototype.toUTCString.call(U);if(m(U))K=" "+D(U);if(h.length===0&&(!w||U.length==0))return H[0]+K+H[1];if(L<0)if(C(U))return F.stylize(RegExp.prototype.toString.call(U),"regexp");else return F.stylize("[Object]","special");F.seen.push(U);var P;if(w)P=O(F,U,L,d,h);else P=h.map(function(E){return q(F,U,L,d,E,w)});return F.seen.pop(),R(P,K,H)}function B(F,U){if(e(U))return F.stylize("undefined","undefined");if(S(U)){var L="'"+JSON.stringify(U).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return F.stylize(L,"string")}if(k(U))return F.stylize(""+U,"number");if(v(U))return F.stylize(""+U,"boolean");if(_(U))return F.stylize("null","null")}function D(F){return"["+Error.prototype.toString.call(F)+"]"}function O(F,U,L,I,y){var h=[];for(var d=0,c=U.length;d<c;++d)if(O0(U,String(d)))h.push(q(F,U,L,I,String(d),!0));else h.push("");return y.forEach(function(K){if(!K.match(/^\d+$/))h.push(q(F,U,L,I,K,!0))}),h}function q(F,U,L,I,y,h){var d,c,K;if(K=Object.getOwnPropertyDescriptor(U,y)||{value:U[y]},K.get)if(K.set)c=F.stylize("[Getter/Setter]","special");else c=F.stylize("[Getter]","special");else if(K.set)c=F.stylize("[Setter]","special");if(!O0(I,y))d="["+y+"]";if(!c)if(F.seen.indexOf(K.value)<0){if(_(L))c=V(F,K.value,null);else c=V(F,K.value,L-1);if(c.indexOf(`
|
|
10
|
+
`)+" "+Z[1];return Z[0]+$+" "+f.join(", ")+" "+Z[1]}function rf(f){return Array.isArray(f)}function $f(f){return typeof f==="boolean"}function j1(f){return f===null}function v8(f){return f==null}function af(f){return typeof f==="number"}function C1(f){return typeof f==="string"}function x8(f){return typeof f==="symbol"}function l0(f){return f===void 0}function M1(f){return p0(f)&&Zf(f)==="[object RegExp]"}function p0(f){return typeof f==="object"&&f!==null}function e1(f){return p0(f)&&Zf(f)==="[object Date]"}function T1(f){return p0(f)&&(Zf(f)==="[object Error]"||f instanceof Error)}function A1(f){return typeof f==="function"}function g8(f){return f===null||typeof f==="boolean"||typeof f==="number"||typeof f==="string"||typeof f==="symbol"||typeof f>"u"}function k8(f){return f instanceof Buffer}function Zf(f){return Object.prototype.toString.call(f)}function a1(f){return f<10?"0"+f.toString(10):f.toString(10)}function c8(){var f=new Date,$=[a1(f.getHours()),a1(f.getMinutes()),a1(f.getSeconds())].join(":");return[f.getDate(),u8[f.getMonth()],$].join(" ")}function tf(...f){console.log("%s - %s",c8(),ff.apply(null,f))}function ef(f,$){if($)f.super_=$,f.prototype=Object.create($.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}})}function zf(f,$){if(!$||!p0($))return f;var Z=Object.keys($),z=Z.length;while(z--)f[Z[z]]=$[Z[z]];return f}function f$(f,$){return Object.prototype.hasOwnProperty.call(f,$)}function Jf(f,$){if(!f){var Z=Error("Promise was rejected with a falsy value");Z.reason=f,f=Z}return $(f)}function Z$(f){if(typeof f!=="function")throw TypeError('The "original" argument must be of type Function');function $(...Z){var z=Z.pop();if(typeof z!=="function")throw TypeError("The last argument must be of type Function");var J=this,Q=function(...X){return z.apply(J,...X)};f.apply(this,Z).then(function(X){process.nextTick(Q.bind(null,null,X))},function(X){process.nextTick(Jf.bind(null,X,Q))})}return Object.setPrototypeOf($,Object.getPrototypeOf(f)),Object.defineProperties($,Object.getOwnPropertyDescriptors(f)),$}var j8,R8,u0,_8=()=>{},u8,$$,z$,J$,y8;var X$=sf(()=>{j8=/%[sdj%]/g;R8=((f={},$={},Z)=>((Z=typeof process<"u"&&!1)&&(Z=Z.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase()),$=new RegExp("^"+Z+"$","i"),(z)=>{if(z=z.toUpperCase(),!f[z])if($.test(z))f[z]=function(...J){console.error("%s: %s",z,pid,ff.apply(null,...J))};else f[z]=function(){};return f[z]}))(),u0=((f)=>(f.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},f.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},f.custom=Symbol.for("nodejs.util.inspect.custom"),f))(function(f,$,...Z){var z={seen:[],stylize:I8};if(Z.length>=1)z.depth=Z[0];if(Z.length>=2)z.colors=Z[1];if($f($))z.showHidden=$;else if($)zf(z,$);if(l0(z.showHidden))z.showHidden=!1;if(l0(z.depth))z.depth=2;if(l0(z.colors))z.colors=!1;if(z.colors)z.stylize=N8;return q1(z,f,z.depth)});u8=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];$$=((f)=>(f.custom=Symbol.for("nodejs.util.promisify.custom"),f))(function(f){if(typeof f!=="function")throw TypeError('The "original" argument must be of type Function');if(kCustomPromisifiedSymbol&&f[kCustomPromisifiedSymbol]){var $=f[kCustomPromisifiedSymbol];if(typeof $!=="function")throw TypeError('The "nodejs.util.promisify.custom" argument must be of type Function');return Object.defineProperty($,kCustomPromisifiedSymbol,{value:$,enumerable:!1,writable:!1,configurable:!0}),$}function $(...Z){var z,J,Q=new Promise(function(X,W){z=X,J=W});Z.push(function(X,W){if(X)J(X);else z(W)});try{f.apply(this,Z)}catch(X){J(X)}return Q}if(Object.setPrototypeOf($,Object.getPrototypeOf(f)),kCustomPromisifiedSymbol)Object.defineProperty($,kCustomPromisifiedSymbol,{value:$,enumerable:!1,writable:!1,configurable:!0});return Object.defineProperties($,Object.getOwnPropertyDescriptors(f))});({TextEncoder:z$,TextDecoder:J$}=globalThis),y8={TextEncoder:z$,TextDecoder:J$,promisify:$$,log:tf,inherits:ef,_extend:zf,callbackifyOnRejected:Jf,callbackify:Z$}});var w1={};of(w1,{throws:()=>$z,strictEqual:()=>fz,strict:()=>e9,rejects:()=>t9,ok:()=>a9,notStrictEqual:()=>r9,notEqual:()=>s9,notDeepStrictEqual:()=>o9,notDeepEqual:()=>p9,match:()=>l9,ifError:()=>n9,fail:()=>i9,equal:()=>d9,doesNotThrow:()=>m9,doesNotReject:()=>h9,doesNotMatch:()=>y9,default:()=>Zz,deepStrictEqual:()=>c9,deepEqual:()=>u9,CallTracker:()=>k9,AssertionError:()=>g9});var h8,m8,W$,d8,i8,n8=(f,$,Z)=>{Z=f!=null?h8(m8(f)):{};let z=$||!f||!f.__esModule?W$(Z,"default",{value:f,enumerable:!0}):Z;for(let J of d8(f))if(!i8.call(z,J))W$(z,J,{get:()=>f[J],enumerable:!0});return z},x=(f,$)=>()=>($||f(($={exports:{}}).exports,$),$.exports),Xf,R1,Wf,l8,p8,o8,s8,Y$,U1,r8,a8,t8,e8,f9,$9,Z9,z9,J9,Q9,o0,N1,X9,F$,U$,W9,V1,Yf,Ff,Y9,V$,Uf,F9,Vf,w$,wf,s0,U9,V9,w9,B9,H9,G9,O9,D9,K9,B$,H$,L9,M9,I1,G$,T9,A9,q9,j9,C9,F1,O$,R9,D$,N9,K$,I9,S9,L$,Bf,P9,S1,E9,b9,M$,T$,_9,v9,x9,Qf,A$,g9,k9,u9,c9,y9,h9,m9,d9,i9,n9,l9,p9,o9,s9,r9,a9,t9,e9,fz,$z,Zz;var B1=sf(()=>{h8=Object.create,{getPrototypeOf:m8,defineProperty:W$,getOwnPropertyNames:d8}=Object,i8=Object.prototype.hasOwnProperty,Xf=x((f,$)=>{$.exports=function(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function")return!1;if(typeof Symbol.iterator==="symbol")return!0;var Z={},z=Symbol("test"),J=Object(z);if(typeof z==="string")return!1;if(Object.prototype.toString.call(z)!=="[object Symbol]")return!1;if(Object.prototype.toString.call(J)!=="[object Symbol]")return!1;var Q=42;Z[z]=Q;for(var X in Z)return!1;if(typeof Object.keys==="function"&&Object.keys(Z).length!==0)return!1;if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(Z).length!==0)return!1;var W=Object.getOwnPropertySymbols(Z);if(W.length!==1||W[0]!==z)return!1;if(!Object.prototype.propertyIsEnumerable.call(Z,z))return!1;if(typeof Object.getOwnPropertyDescriptor==="function"){var Y=Object.getOwnPropertyDescriptor(Z,z);if(Y.value!==Q||Y.enumerable!==!0)return!1}return!0}}),R1=x((f,$)=>{var Z=Xf();$.exports=function(){return Z()&&!!Symbol.toStringTag}}),Wf=x((f,$)=>{$.exports=Object}),l8=x((f,$)=>{$.exports=Error}),p8=x((f,$)=>{$.exports=EvalError}),o8=x((f,$)=>{$.exports=RangeError}),s8=x((f,$)=>{$.exports=ReferenceError}),Y$=x((f,$)=>{$.exports=SyntaxError}),U1=x((f,$)=>{$.exports=TypeError}),r8=x((f,$)=>{$.exports=URIError}),a8=x((f,$)=>{$.exports=Math.abs}),t8=x((f,$)=>{$.exports=Math.floor}),e8=x((f,$)=>{$.exports=Math.max}),f9=x((f,$)=>{$.exports=Math.min}),$9=x((f,$)=>{$.exports=Math.pow}),Z9=x((f,$)=>{$.exports=Math.round}),z9=x((f,$)=>{$.exports=Number.isNaN||function(Z){return Z!==Z}}),J9=x((f,$)=>{var Z=z9();$.exports=function(z){if(Z(z)||z===0)return z;return z<0?-1:1}}),Q9=x((f,$)=>{$.exports=Object.getOwnPropertyDescriptor}),o0=x((f,$)=>{var Z=Q9();if(Z)try{Z([],"length")}catch(z){Z=null}$.exports=Z}),N1=x((f,$)=>{var Z=Object.defineProperty||!1;if(Z)try{Z({},"a",{value:1})}catch(z){Z=!1}$.exports=Z}),X9=x((f,$)=>{var Z=typeof Symbol<"u"&&Symbol,z=Xf();$.exports=function(){if(typeof Z!=="function")return!1;if(typeof Symbol!=="function")return!1;if(typeof Z("foo")!=="symbol")return!1;if(typeof Symbol("bar")!=="symbol")return!1;return z()}}),F$=x((f,$)=>{$.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}),U$=x((f,$)=>{var Z=Wf();$.exports=Z.getPrototypeOf||null}),W9=x((f,$)=>{var Z="Function.prototype.bind called on incompatible ",z=Object.prototype.toString,J=Math.max,Q="[object Function]",X=function(V,w){var D=[];for(var O=0;O<V.length;O+=1)D[O]=V[O];for(var q=0;q<w.length;q+=1)D[q+V.length]=w[q];return D},W=function(V,w){var D=[];for(var O=w||0,q=0;O<V.length;O+=1,q+=1)D[q]=V[O];return D},Y=function(V,w){var D="";for(var O=0;O<V.length;O+=1)if(D+=V[O],O+1<V.length)D+=w;return D};$.exports=function(V){var w=this;if(typeof w!=="function"||z.apply(w)!==Q)throw TypeError(Z+w);var D=W(arguments,1),O,q=function(){if(this instanceof O){var u=w.apply(this,X(D,arguments));if(Object(u)===u)return u;return this}return w.apply(V,X(D,arguments))},R=J(0,w.length-D.length),b=[];for(var v=0;v<R;v++)b[v]="$"+v;if(O=Function("binder","return function ("+Y(b,",")+"){ return binder.apply(this,arguments); }")(q),w.prototype){var _=function(){};_.prototype=w.prototype,O.prototype=new _,_.prototype=null}return O}}),V1=x((f,$)=>{var Z=W9();$.exports=Function.prototype.bind||Z}),Yf=x((f,$)=>{$.exports=Function.prototype.call}),Ff=x((f,$)=>{$.exports=Function.prototype.apply}),Y9=x((f,$)=>{$.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply}),V$=x((f,$)=>{var Z=V1(),z=Ff(),J=Yf(),Q=Y9();$.exports=Q||Z.call(J,z)}),Uf=x((f,$)=>{var Z=V1(),z=U1(),J=Yf(),Q=V$();$.exports=function(X){if(X.length<1||typeof X[0]!=="function")throw new z("a function is required");return Q(Z,J,X)}}),F9=x((f,$)=>{var Z=Uf(),z=o0(),J;try{J=[].__proto__===Array.prototype}catch(Y){if(!Y||typeof Y!=="object"||!("code"in Y)||Y.code!=="ERR_PROTO_ACCESS")throw Y}var Q=!!J&&z&&z(Object.prototype,"__proto__"),X=Object,W=X.getPrototypeOf;$.exports=Q&&typeof Q.get==="function"?Z([Q.get]):typeof W==="function"?function(Y){return W(Y==null?Y:X(Y))}:!1}),Vf=x((f,$)=>{var Z=F$(),z=U$(),J=F9();$.exports=Z?function(Q){return Z(Q)}:z?function(Q){if(!Q||typeof Q!=="object"&&typeof Q!=="function")throw TypeError("getProto: not an object");return z(Q)}:J?function(Q){return J(Q)}:null}),w$=x((f,$)=>{var Z=Function.prototype.call,z=Object.prototype.hasOwnProperty,J=V1();$.exports=J.call(Z,z)}),wf=x((f,$)=>{var Z,z=Wf(),J=l8(),Q=p8(),X=o8(),W=s8(),Y=Y$(),V=U1(),w=r8(),D=a8(),O=t8(),q=e8(),R=f9(),b=$9(),v=Z9(),_=J9(),u=Function,k=function(H){try{return u('"use strict"; return ('+H+").constructor;")()}catch(T){}},S=o0(),r=N1(),e=function(){throw new V},C=S?function(){try{return arguments.callee,e}catch(H){try{return S(arguments,"callee").get}catch(T){return e}}}():e,A=X9()(),N=Vf(),m=U$(),s=F$(),i=Ff(),$0=Yf(),n={},V0=typeof Uint8Array>"u"||!N?Z:N(Uint8Array),F0={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Z:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Z:ArrayBuffer,"%ArrayIteratorPrototype%":A&&N?N([][Symbol.iterator]()):Z,"%AsyncFromSyncIteratorPrototype%":Z,"%AsyncFunction%":n,"%AsyncGenerator%":n,"%AsyncGeneratorFunction%":n,"%AsyncIteratorPrototype%":n,"%Atomics%":typeof Atomics>"u"?Z:Atomics,"%BigInt%":typeof BigInt>"u"?Z:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Z:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Z:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Z:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":J,"%eval%":eval,"%EvalError%":Q,"%Float16Array%":typeof Float16Array>"u"?Z:Float16Array,"%Float32Array%":typeof Float32Array>"u"?Z:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Z:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Z:FinalizationRegistry,"%Function%":u,"%GeneratorFunction%":n,"%Int8Array%":typeof Int8Array>"u"?Z:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Z:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Z:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":A&&N?N(N([][Symbol.iterator]())):Z,"%JSON%":typeof JSON==="object"?JSON:Z,"%Map%":typeof Map>"u"?Z:Map,"%MapIteratorPrototype%":typeof Map>"u"||!A||!N?Z:N(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":z,"%Object.getOwnPropertyDescriptor%":S,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Z:Promise,"%Proxy%":typeof Proxy>"u"?Z:Proxy,"%RangeError%":X,"%ReferenceError%":W,"%Reflect%":typeof Reflect>"u"?Z:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Z:Set,"%SetIteratorPrototype%":typeof Set>"u"||!A||!N?Z:N(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Z:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":A&&N?N(""[Symbol.iterator]()):Z,"%Symbol%":A?Symbol:Z,"%SyntaxError%":Y,"%ThrowTypeError%":C,"%TypedArray%":V0,"%TypeError%":V,"%Uint8Array%":typeof Uint8Array>"u"?Z:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Z:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Z:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Z:Uint32Array,"%URIError%":w,"%WeakMap%":typeof WeakMap>"u"?Z:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Z:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Z:WeakSet,"%Function.prototype.call%":$0,"%Function.prototype.apply%":i,"%Object.defineProperty%":r,"%Object.getPrototypeOf%":m,"%Math.abs%":D,"%Math.floor%":O,"%Math.max%":q,"%Math.min%":R,"%Math.pow%":b,"%Math.round%":v,"%Math.sign%":_,"%Reflect.getPrototypeOf%":s};if(N)try{null.error}catch(H){O0=N(N(H)),F0["%Error.prototype%"]=O0}var O0,W0=function H(T){var P;if(T==="%AsyncFunction%")P=k("async function () {}");else if(T==="%GeneratorFunction%")P=k("function* () {}");else if(T==="%AsyncGeneratorFunction%")P=k("async function* () {}");else if(T==="%AsyncGenerator%"){var E=H("%AsyncGeneratorFunction%");if(E)P=E.prototype}else if(T==="%AsyncIteratorPrototype%"){var o=H("%AsyncGenerator%");if(o&&N)P=N(o.prototype)}return F0[T]=P,P},C0={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},w0=V1(),F=w$(),U=w0.call($0,Array.prototype.concat),L=w0.call(i,Array.prototype.splice),I=w0.call($0,String.prototype.replace),y=w0.call($0,String.prototype.slice),h=w0.call($0,RegExp.prototype.exec),d=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,c=/\\(\\)?/g,K=function(H){var T=y(H,0,1),P=y(H,-1);if(T==="%"&&P!=="%")throw new Y("invalid intrinsic syntax, expected closing `%`");else if(P==="%"&&T!=="%")throw new Y("invalid intrinsic syntax, expected opening `%`");var E=[];return I(H,d,function(o,t,Z0,D0){E[E.length]=Z0?I(D0,c,"$1"):t||o}),E},B=function(H,T){var P=H,E;if(F(C0,P))E=C0[P],P="%"+E[0]+"%";if(F(F0,P)){var o=F0[P];if(o===n)o=W0(P);if(typeof o>"u"&&!T)throw new V("intrinsic "+H+" exists, but is not available. Please file an issue!");return{alias:E,name:P,value:o}}throw new Y("intrinsic "+H+" does not exist!")};$.exports=function(H,T){if(typeof H!=="string"||H.length===0)throw new V("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof T!=="boolean")throw new V('"allowMissing" argument must be a boolean');if(h(/^%?[^%]*%?$/,H)===null)throw new Y("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var P=K(H),E=P.length>0?P[0]:"",o=B("%"+E+"%",T),t=o.name,Z0=o.value,D0=!1,j=o.alias;if(j)E=j[0],L(P,U([0,1],j));for(var G0=1,P0=!0;G0<P.length;G0+=1){var A0=P[G0],K0=y(A0,0,1),R0=y(A0,-1);if((K0==='"'||K0==="'"||K0==="`"||(R0==='"'||R0==="'"||R0==="`"))&&K0!==R0)throw new Y("property names with quotes must have matching quotes");if(A0==="constructor"||!P0)D0=!0;if(E+="."+A0,t="%"+E+"%",F(F0,t))Z0=F0[t];else if(Z0!=null){if(!(A0 in Z0)){if(!T)throw new V("base intrinsic for "+H+" exists, but the property is not available.");return}if(S&&G0+1>=P.length){var j0=S(Z0,A0);if(P0=!!j0,P0&&"get"in j0&&!("originalValue"in j0.get))Z0=j0.get;else Z0=Z0[A0]}else P0=F(Z0,A0),Z0=Z0[A0];if(P0&&!D0)F0[t]=Z0}}return Z0}}),s0=x((f,$)=>{var Z=wf(),z=Uf(),J=z([Z("%String.prototype.indexOf%")]);$.exports=function(Q,X){var W=Z(Q,!!X);if(typeof W==="function"&&J(Q,".prototype.")>-1)return z([W]);return W}}),U9=x((f,$)=>{var Z=R1()(),z=s0(),J=z("Object.prototype.toString"),Q=function(Y){if(Z&&Y&&typeof Y==="object"&&Symbol.toStringTag in Y)return!1;return J(Y)==="[object Arguments]"},X=function(Y){if(Q(Y))return!0;return Y!==null&&typeof Y==="object"&&"length"in Y&&typeof Y.length==="number"&&Y.length>=0&&J(Y)!=="[object Array]"&&"callee"in Y&&J(Y.callee)==="[object Function]"},W=function(){return Q(arguments)}();Q.isLegacyArguments=X,$.exports=W?Q:X}),V9=x((f,$)=>{var Z=s0(),z=R1()(),J=w$(),Q=o0(),X;if(z){if(W=Z("RegExp.prototype.exec"),Y={},V=function(){throw Y},w={toString:V,valueOf:V},typeof Symbol.toPrimitive==="symbol")w[Symbol.toPrimitive]=V;X=function(q){if(!q||typeof q!=="object")return!1;var R=Q(q,"lastIndex"),b=R&&J(R,"value");if(!b)return!1;try{W(q,w)}catch(v){return v===Y}}}else D=Z("Object.prototype.toString"),O="[object RegExp]",X=function(q){if(!q||typeof q!=="object"&&typeof q!=="function")return!1;return D(q)===O};var W,Y,V,w,D,O;$.exports=X}),w9=x((f,$)=>{var Z=s0(),z=V9(),J=Z("RegExp.prototype.exec"),Q=U1();$.exports=function(X){if(!z(X))throw new Q("`regex` must be a RegExp");return function(W){return J(X,W)!==null}}}),B9=x((f,$)=>{var Z=function*(){}.constructor;$.exports=()=>Z}),H9=x((f,$)=>{var Z=s0(),z=w9(),J=z(/^\s*(?:function)?\*/),Q=R1()(),X=Vf(),W=Z("Object.prototype.toString"),Y=Z("Function.prototype.toString"),V=B9();$.exports=function(w){if(typeof w!=="function")return!1;if(J(Y(w)))return!0;if(!Q){var D=W(w);return D==="[object GeneratorFunction]"}if(!X)return!1;var O=V();return O&&X(w)===O.prototype}}),G9=x((f,$)=>{var Z=Function.prototype.toString,z=typeof Reflect==="object"&&Reflect!==null&&Reflect.apply,J,Q;if(typeof z==="function"&&typeof Object.defineProperty==="function")try{J=Object.defineProperty({},"length",{get:function(){throw Q}}),Q={},z(function(){throw 42},null,J)}catch(S){if(S!==Q)z=null}else z=null;var X=/^\s*class\b/,W=function(S){try{var r=Z.call(S);return X.test(r)}catch(e){return!1}},Y=function(S){try{if(W(S))return!1;return Z.call(S),!0}catch(r){return!1}},V=Object.prototype.toString,w="[object Object]",D="[object Function]",O="[object GeneratorFunction]",q="[object HTMLAllCollection]",R="[object HTML document.all class]",b="[object HTMLCollection]",v=typeof Symbol==="function"&&!!Symbol.toStringTag,_=!(0 in[,]),u=function(){return!1};if(typeof document==="object"){if(k=document.all,V.call(k)===V.call(document.all))u=function(S){if((_||!S)&&(typeof S>"u"||typeof S==="object"))try{var r=V.call(S);return(r===q||r===R||r===b||r===w)&&S("")==null}catch(e){}return!1}}var k;$.exports=z?function(S){if(u(S))return!0;if(!S)return!1;if(typeof S!=="function"&&typeof S!=="object")return!1;try{z(S,null,J)}catch(r){if(r!==Q)return!1}return!W(S)&&Y(S)}:function(S){if(u(S))return!0;if(!S)return!1;if(typeof S!=="function"&&typeof S!=="object")return!1;if(v)return Y(S);if(W(S))return!1;var r=V.call(S);if(r!==D&&r!==O&&!/^\[object HTML/.test(r))return!1;return Y(S)}}),O9=x((f,$)=>{var Z=G9(),z=Object.prototype.toString,J=Object.prototype.hasOwnProperty,Q=function(V,w,D){for(var O=0,q=V.length;O<q;O++)if(J.call(V,O))if(D==null)w(V[O],O,V);else w.call(D,V[O],O,V)},X=function(V,w,D){for(var O=0,q=V.length;O<q;O++)if(D==null)w(V.charAt(O),O,V);else w.call(D,V.charAt(O),O,V)},W=function(V,w,D){for(var O in V)if(J.call(V,O))if(D==null)w(V[O],O,V);else w.call(D,V[O],O,V)};function Y(V){return z.call(V)==="[object Array]"}$.exports=function(V,w,D){if(!Z(w))throw TypeError("iterator must be a function");var O;if(arguments.length>=3)O=D;if(Y(V))Q(V,w,O);else if(typeof V==="string")X(V,w,O);else W(V,w,O)}}),D9=x((f,$)=>{$.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]}),K9=x((f,$)=>{var Z=D9(),z=typeof globalThis>"u"?globalThis:globalThis;$.exports=function(){var J=[];for(var Q=0;Q<Z.length;Q++)if(typeof z[Z[Q]]==="function")J[J.length]=Z[Q];return J}}),B$=x((f,$)=>{var Z=N1(),z=Y$(),J=U1(),Q=o0();$.exports=function(X,W,Y){if(!X||typeof X!=="object"&&typeof X!=="function")throw new J("`obj` must be an object or a function`");if(typeof W!=="string"&&typeof W!=="symbol")throw new J("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!=="boolean"&&arguments[3]!==null)throw new J("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!=="boolean"&&arguments[4]!==null)throw new J("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!=="boolean"&&arguments[5]!==null)throw new J("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!=="boolean")throw new J("`loose`, if provided, must be a boolean");var V=arguments.length>3?arguments[3]:null,w=arguments.length>4?arguments[4]:null,D=arguments.length>5?arguments[5]:null,O=arguments.length>6?arguments[6]:!1,q=!!Q&&Q(X,W);if(Z)Z(X,W,{configurable:D===null&&q?q.configurable:!D,enumerable:V===null&&q?q.enumerable:!V,value:Y,writable:w===null&&q?q.writable:!w});else if(O||!V&&!w&&!D)X[W]=Y;else throw new z("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}),H$=x((f,$)=>{var Z=N1(),z=function(){return!!Z};z.hasArrayLengthDefineBug=function(){if(!Z)return null;try{return Z([],"length",{value:1}).length!==1}catch(J){return!0}},$.exports=z}),L9=x((f,$)=>{var Z=wf(),z=B$(),J=H$()(),Q=o0(),X=U1(),W=Z("%Math.floor%");$.exports=function(Y,V){if(typeof Y!=="function")throw new X("`fn` is not a function");if(typeof V!=="number"||V<0||V>4294967295||W(V)!==V)throw new X("`length` must be a positive 32-bit integer");var w=arguments.length>2&&!!arguments[2],D=!0,O=!0;if("length"in Y&&Q){var q=Q(Y,"length");if(q&&!q.configurable)D=!1;if(q&&!q.writable)O=!1}if(D||O||!w)if(J)z(Y,"length",V,!0,!0);else z(Y,"length",V);return Y}}),M9=x((f,$)=>{var Z=V1(),z=Ff(),J=V$();$.exports=function(){return J(Z,z,arguments)}}),I1=x((f,$)=>{var Z=L9(),z=N1(),J=Uf(),Q=M9();if($.exports=function(X){var W=J(arguments),Y=X.length-(arguments.length-1);return Z(W,1+(Y>0?Y:0),!0)},z)z($.exports,"apply",{value:Q});else $.exports.apply=Q}),G$=x((f,$)=>{var Z=O9(),z=K9(),J=I1(),Q=s0(),X=o0(),W=Vf(),Y=Q("Object.prototype.toString"),V=R1()(),w=typeof globalThis>"u"?globalThis:globalThis,D=z(),O=Q("String.prototype.slice"),q=Q("Array.prototype.indexOf",!0)||function(_,u){for(var k=0;k<_.length;k+=1)if(_[k]===u)return k;return-1},R={__proto__:null};if(V&&X&&W)Z(D,function(_){var u=new w[_];if(Symbol.toStringTag in u&&W){var k=W(u),S=X(k,Symbol.toStringTag);if(!S&&k){var r=W(k);S=X(r,Symbol.toStringTag)}R["$"+_]=J(S.get)}});else Z(D,function(_){var u=new w[_],k=u.slice||u.set;if(k)R["$"+_]=J(k)});var b=function(_){var u=!1;return Z(R,function(k,S){if(!u)try{if("$"+k(_)===S)u=O(S,1)}catch(r){}}),u},v=function(_){var u=!1;return Z(R,function(k,S){if(!u)try{k(_),u=O(S,1)}catch(r){}}),u};$.exports=function(_){if(!_||typeof _!=="object")return!1;if(!V){var u=O(Y(_),8,-1);if(q(D,u)>-1)return u;if(u!=="Object")return!1;return v(_)}if(!X)return null;return b(_)}}),T9=x((f,$)=>{var Z=G$();$.exports=function(z){return!!Z(z)}}),A9=x((f)=>{var $=U9(),Z=H9(),z=G$(),J=T9();function Q(j){return j.call.bind(j)}var X=typeof BigInt<"u",W=typeof Symbol<"u",Y=Q(Object.prototype.toString),V=Q(Number.prototype.valueOf),w=Q(String.prototype.valueOf),D=Q(Boolean.prototype.valueOf);if(X)O=Q(BigInt.prototype.valueOf);var O;if(W)q=Q(Symbol.prototype.valueOf);var q;function R(j,G0){if(typeof j!=="object")return!1;try{return G0(j),!0}catch(P0){return!1}}f.isArgumentsObject=$,f.isGeneratorFunction=Z,f.isTypedArray=J;function b(j){return typeof Promise<"u"&&j instanceof Promise||j!==null&&typeof j==="object"&&typeof j.then==="function"&&typeof j.catch==="function"}f.isPromise=b;function v(j){if(typeof ArrayBuffer<"u"&&ArrayBuffer.isView)return ArrayBuffer.isView(j);return J(j)||L(j)}f.isArrayBufferView=v;function _(j){return z(j)==="Uint8Array"}f.isUint8Array=_;function u(j){return z(j)==="Uint8ClampedArray"}f.isUint8ClampedArray=u;function k(j){return z(j)==="Uint16Array"}f.isUint16Array=k;function S(j){return z(j)==="Uint32Array"}f.isUint32Array=S;function r(j){return z(j)==="Int8Array"}f.isInt8Array=r;function e(j){return z(j)==="Int16Array"}f.isInt16Array=e;function C(j){return z(j)==="Int32Array"}f.isInt32Array=C;function A(j){return z(j)==="Float32Array"}f.isFloat32Array=A;function N(j){return z(j)==="Float64Array"}f.isFloat64Array=N;function m(j){return z(j)==="BigInt64Array"}f.isBigInt64Array=m;function s(j){return z(j)==="BigUint64Array"}f.isBigUint64Array=s;function i(j){return Y(j)==="[object Map]"}i.working=typeof Map<"u"&&i(new Map);function $0(j){if(typeof Map>"u")return!1;return i.working?i(j):j instanceof Map}f.isMap=$0;function n(j){return Y(j)==="[object Set]"}n.working=typeof Set<"u"&&n(new Set);function V0(j){if(typeof Set>"u")return!1;return n.working?n(j):j instanceof Set}f.isSet=V0;function F0(j){return Y(j)==="[object WeakMap]"}F0.working=typeof WeakMap<"u"&&F0(new WeakMap);function O0(j){if(typeof WeakMap>"u")return!1;return F0.working?F0(j):j instanceof WeakMap}f.isWeakMap=O0;function W0(j){return Y(j)==="[object WeakSet]"}W0.working=typeof WeakSet<"u"&&W0(new WeakSet);function C0(j){return W0(j)}f.isWeakSet=C0;function w0(j){return Y(j)==="[object ArrayBuffer]"}w0.working=typeof ArrayBuffer<"u"&&w0(new ArrayBuffer);function F(j){if(typeof ArrayBuffer>"u")return!1;return w0.working?w0(j):j instanceof ArrayBuffer}f.isArrayBuffer=F;function U(j){return Y(j)==="[object DataView]"}U.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&U(new DataView(new ArrayBuffer(1),0,1));function L(j){if(typeof DataView>"u")return!1;return U.working?U(j):j instanceof DataView}f.isDataView=L;var I=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function y(j){return Y(j)==="[object SharedArrayBuffer]"}function h(j){if(typeof I>"u")return!1;if(typeof y.working>"u")y.working=y(new I);return y.working?y(j):j instanceof I}f.isSharedArrayBuffer=h;function d(j){return Y(j)==="[object AsyncFunction]"}f.isAsyncFunction=d;function c(j){return Y(j)==="[object Map Iterator]"}f.isMapIterator=c;function K(j){return Y(j)==="[object Set Iterator]"}f.isSetIterator=K;function B(j){return Y(j)==="[object Generator]"}f.isGeneratorObject=B;function H(j){return Y(j)==="[object WebAssembly.Module]"}f.isWebAssemblyCompiledModule=H;function T(j){return R(j,V)}f.isNumberObject=T;function P(j){return R(j,w)}f.isStringObject=P;function E(j){return R(j,D)}f.isBooleanObject=E;function o(j){return X&&R(j,O)}f.isBigIntObject=o;function t(j){return W&&R(j,q)}f.isSymbolObject=t;function Z0(j){return T(j)||P(j)||E(j)||o(j)||t(j)}f.isBoxedPrimitive=Z0;function D0(j){return typeof Uint8Array<"u"&&(F(j)||h(j))}f.isAnyArrayBuffer=D0,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(j){Object.defineProperty(f,j,{enumerable:!1,value:function(){throw Error(j+" is not supported in userland")}})})}),q9=x((f,$)=>{$.exports=function(Z){return Z instanceof Buffer}}),j9=x((f,$)=>{if(typeof Object.create==="function")$.exports=function(Z,z){if(z)Z.super_=z,Z.prototype=Object.create(z.prototype,{constructor:{value:Z,enumerable:!1,writable:!0,configurable:!0}})};else $.exports=function(Z,z){if(z){Z.super_=z;var J=function(){};J.prototype=z.prototype,Z.prototype=new J,Z.prototype.constructor=Z}}}),C9=x((f,$)=>{try{if(Z=(X$(),Y1(Q$)),typeof Z.inherits!=="function")throw"";$.exports=Z.inherits}catch(z){$.exports=j9()}var Z}),F1=x((f)=>{var $=Object.getOwnPropertyDescriptors||function(F){var U=Object.keys(F),L={};for(var I=0;I<U.length;I++)L[U[I]]=Object.getOwnPropertyDescriptor(F,U[I]);return L},Z=/%[sdj%]/g;f.format=function(F){if(!S(F)){var U=[];for(var L=0;L<arguments.length;L++)U.push(Q(arguments[L]));return U.join(" ")}var L=1,I=arguments,y=I.length,h=String(F).replace(Z,function(c){if(c==="%%")return"%";if(L>=y)return c;switch(c){case"%s":return String(I[L++]);case"%d":return Number(I[L++]);case"%j":try{return JSON.stringify(I[L++])}catch(K){return"[Circular]"}default:return c}});for(var d=I[L];L<y;d=I[++L])if(_(d)||!A(d))h+=" "+d;else h+=" "+Q(d);return h},f.deprecate=function(F,U){if(typeof process<"u"&&process.noDeprecation===!0)return F;if(typeof process>"u")return function(){return f.deprecate(F,U).apply(this,arguments)};var L=!1;function I(){if(!L){if(process.throwDeprecation)throw Error(U);else if(process.traceDeprecation)console.trace(U);else console.error(U);L=!0}return F.apply(this,arguments)}return I};var z={},J=/^$/;f.debuglog=function(F){if(F=F.toUpperCase(),!z[F])if(J.test(F)){var U=process.pid;z[F]=function(){var L=f.format.apply(f,arguments);console.error("%s %d: %s",F,U,L)}}else z[F]=function(){};return z[F]};function Q(F,U){var L={seen:[],stylize:W};if(arguments.length>=3)L.depth=arguments[2];if(arguments.length>=4)L.colors=arguments[3];if(v(U))L.showHidden=U;else if(U)f._extend(L,U);if(e(L.showHidden))L.showHidden=!1;if(e(L.depth))L.depth=2;if(e(L.colors))L.colors=!1;if(e(L.customInspect))L.customInspect=!0;if(L.colors)L.stylize=X;return V(L,F,L.depth)}f.inspect=Q,Q.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},Q.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function X(F,U){var L=Q.styles[U];if(L)return"\x1B["+Q.colors[L][0]+"m"+F+"\x1B["+Q.colors[L][1]+"m";else return F}function W(F,U){return F}function Y(F){var U={};return F.forEach(function(L,I){U[L]=!0}),U}function V(F,U,L){if(F.customInspect&&U&&s(U.inspect)&&U.inspect!==f.inspect&&!(U.constructor&&U.constructor.prototype===U)){var I=U.inspect(L,F);if(!S(I))I=V(F,I,L);return I}var y=w(F,U);if(y)return y;var h=Object.keys(U),d=Y(h);if(F.showHidden)h=Object.getOwnPropertyNames(U);if(m(U)&&(h.indexOf("message")>=0||h.indexOf("description")>=0))return D(U);if(h.length===0){if(s(U)){var c=U.name?": "+U.name:"";return F.stylize("[Function"+c+"]","special")}if(C(U))return F.stylize(RegExp.prototype.toString.call(U),"regexp");if(N(U))return F.stylize(Date.prototype.toString.call(U),"date");if(m(U))return D(U)}var K="",B=!1,H=["{","}"];if(b(U))B=!0,H=["[","]"];if(s(U)){var T=U.name?": "+U.name:"";K=" [Function"+T+"]"}if(C(U))K=" "+RegExp.prototype.toString.call(U);if(N(U))K=" "+Date.prototype.toUTCString.call(U);if(m(U))K=" "+D(U);if(h.length===0&&(!B||U.length==0))return H[0]+K+H[1];if(L<0)if(C(U))return F.stylize(RegExp.prototype.toString.call(U),"regexp");else return F.stylize("[Object]","special");F.seen.push(U);var P;if(B)P=O(F,U,L,d,h);else P=h.map(function(E){return q(F,U,L,d,E,B)});return F.seen.pop(),R(P,K,H)}function w(F,U){if(e(U))return F.stylize("undefined","undefined");if(S(U)){var L="'"+JSON.stringify(U).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return F.stylize(L,"string")}if(k(U))return F.stylize(""+U,"number");if(v(U))return F.stylize(""+U,"boolean");if(_(U))return F.stylize("null","null")}function D(F){return"["+Error.prototype.toString.call(F)+"]"}function O(F,U,L,I,y){var h=[];for(var d=0,c=U.length;d<c;++d)if(O0(U,String(d)))h.push(q(F,U,L,I,String(d),!0));else h.push("");return y.forEach(function(K){if(!K.match(/^\d+$/))h.push(q(F,U,L,I,K,!0))}),h}function q(F,U,L,I,y,h){var d,c,K;if(K=Object.getOwnPropertyDescriptor(U,y)||{value:U[y]},K.get)if(K.set)c=F.stylize("[Getter/Setter]","special");else c=F.stylize("[Getter]","special");else if(K.set)c=F.stylize("[Setter]","special");if(!O0(I,y))d="["+y+"]";if(!c)if(F.seen.indexOf(K.value)<0){if(_(L))c=V(F,K.value,null);else c=V(F,K.value,L-1);if(c.indexOf(`
|
|
11
11
|
`)>-1)if(h)c=c.split(`
|
|
12
|
-
`).map(function(
|
|
12
|
+
`).map(function(B){return" "+B}).join(`
|
|
13
13
|
`).slice(2);else c=`
|
|
14
14
|
`+c.split(`
|
|
15
|
-
`).map(function(
|
|
15
|
+
`).map(function(B){return" "+B}).join(`
|
|
16
16
|
`)}else c=F.stylize("[Circular]","special");if(e(d)){if(h&&y.match(/^\d+$/))return c;if(d=JSON.stringify(""+y),d.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/))d=d.slice(1,-1),d=F.stylize(d,"name");else d=d.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),d=F.stylize(d,"string")}return d+": "+c}function R(F,U,L){var I=0,y=F.reduce(function(h,d){if(I++,d.indexOf(`
|
|
17
17
|
`)>=0)I++;return h+d.replace(/\u001b\[\d\d?m/g,"").length+1},0);if(y>60)return L[0]+(U===""?"":U+`
|
|
18
18
|
`)+" "+F.join(`,
|
|
19
|
-
`)+" "+L[1];return L[0]+U+" "+F.join(", ")+" "+L[1]}f.types=A9();function b(F){return Array.isArray(F)}f.isArray=b;function v(F){return typeof F==="boolean"}f.isBoolean=v;function _(F){return F===null}f.isNull=_;function u(F){return F==null}f.isNullOrUndefined=u;function k(F){return typeof F==="number"}f.isNumber=k;function S(F){return typeof F==="string"}f.isString=S;function r(F){return typeof F==="symbol"}f.isSymbol=r;function e(F){return F===void 0}f.isUndefined=e;function C(F){return A(F)&&$0(F)==="[object RegExp]"}f.isRegExp=C,f.types.isRegExp=C;function A(F){return typeof F==="object"&&F!==null}f.isObject=A;function N(F){return A(F)&&$0(F)==="[object Date]"}f.isDate=N,f.types.isDate=N;function m(F){return A(F)&&($0(F)==="[object Error]"||F instanceof Error)}f.isError=m,f.types.isNativeError=m;function s(F){return typeof F==="function"}f.isFunction=s;function i(F){return F===null||typeof F==="boolean"||typeof F==="number"||typeof F==="string"||typeof F==="symbol"||typeof F>"u"}f.isPrimitive=i,f.isBuffer=q9();function $0(F){return Object.prototype.toString.call(F)}function l(F){return F<10?"0"+F.toString(10):F.toString(10)}var V0=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function F0(){var F=new Date,U=[l(F.getHours()),l(F.getMinutes()),l(F.getSeconds())].join(":");return[F.getDate(),V0[F.getMonth()],U].join(" ")}f.log=function(){console.log("%s - %s",F0(),f.format.apply(f,arguments))},f.inherits=C9(),f._extend=function(F,U){if(!U||!A(U))return F;var L=Object.keys(U),I=L.length;while(I--)F[L[I]]=U[L[I]];return F};function O0(F,U){return Object.prototype.hasOwnProperty.call(F,U)}var W0=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;f.promisify=function(F){if(typeof F!=="function")throw TypeError('The "original" argument must be of type Function');if(W0&&F[W0]){var U=F[W0];if(typeof U!=="function")throw TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(U,W0,{value:U,enumerable:!1,writable:!1,configurable:!0}),U}function U(){var L,I,y=new Promise(function(c,K){L=c,I=K}),h=[];for(var d=0;d<arguments.length;d++)h.push(arguments[d]);h.push(function(c,K){if(c)I(c);else L(K)});try{F.apply(this,h)}catch(c){I(c)}return y}if(Object.setPrototypeOf(U,Object.getPrototypeOf(F)),W0)Object.defineProperty(U,W0,{value:U,enumerable:!1,writable:!1,configurable:!0});return Object.defineProperties(U,$(F))},f.promisify.custom=W0;function C0(F,U){if(!F){var L=Error("Promise was rejected with a falsy value");L.reason=F,F=L}return U(F)}function w0(F){if(typeof F!=="function")throw TypeError('The "original" argument must be of type Function');function U(){var L=[];for(var I=0;I<arguments.length;I++)L.push(arguments[I]);var y=L.pop();if(typeof y!=="function")throw TypeError("The last argument must be of type Function");var h=this,d=function(){return y.apply(h,arguments)};F.apply(this,L).then(function(c){process.nextTick(d.bind(null,null,c))},function(c){process.nextTick(C0.bind(null,c,d))})}return Object.setPrototypeOf(U,Object.getPrototypeOf(F)),Object.defineProperties(U,$(F)),U}f.callbackify=w0}),O$=x((f,$)=>{function Z(C){return Z=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},Z(C)}function z(C,A){for(var N=0;N<A.length;N++){var m=A[N];if(m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m)m.writable=!0;Object.defineProperty(C,Q(m.key),m)}}function J(C,A,N){if(A)z(C.prototype,A);if(N)z(C,N);return Object.defineProperty(C,"prototype",{writable:!1}),C}function Q(C){var A=X(C,"string");return Z(A)==="symbol"?A:String(A)}function X(C,A){if(Z(C)!=="object"||C===null)return C;var N=C[Symbol.toPrimitive];if(N!==void 0){var m=N.call(C,A||"default");if(Z(m)!=="object")return m;throw TypeError("@@toPrimitive must return a primitive value.")}return(A==="string"?String:Number)(C)}function W(C,A){if(!(C instanceof A))throw TypeError("Cannot call a class as a function")}function Y(C,A){if(typeof A!=="function"&&A!==null)throw TypeError("Super expression must either be null or a function");if(C.prototype=Object.create(A&&A.prototype,{constructor:{value:C,writable:!0,configurable:!0}}),Object.defineProperty(C,"prototype",{writable:!1}),A)V(C,A)}function V(C,A){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(N,m){return N.__proto__=m,N},V(C,A)}function B(C){var A=q();return function(){var N=R(C),m;if(A){var s=R(this).constructor;m=Reflect.construct(N,arguments,s)}else m=N.apply(this,arguments);return D(this,m)}}function D(C,A){if(A&&(Z(A)==="object"||typeof A==="function"))return A;else if(A!==void 0)throw TypeError("Derived constructors may only return object or undefined");return O(C)}function O(C){if(C===void 0)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return C}function q(){if(typeof Reflect>"u"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy==="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(C){return!1}}function R(C){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(A){return A.__proto__||Object.getPrototypeOf(A)},R(C)}var b={},v,_;function u(C,A,N){if(!N)N=Error;function m(i,$0,l){if(typeof A==="string")return A;else return A(i,$0,l)}var s=function(i){Y(l,i);var $0=B(l);function l(V0,F0,O0){var W0;return W(this,l),W0=$0.call(this,m(V0,F0,O0)),W0.code=C,W0}return J(l)}(N);b[C]=s}function k(C,A){if(Array.isArray(C)){var N=C.length;if(C=C.map(function(m){return String(m)}),N>2)return"one of ".concat(A," ").concat(C.slice(0,N-1).join(", "),", or ")+C[N-1];else if(N===2)return"one of ".concat(A," ").concat(C[0]," or ").concat(C[1]);else return"of ".concat(A," ").concat(C[0])}else return"of ".concat(A," ").concat(String(C))}function S(C,A,N){return C.substr(!N||N<0?0:+N,A.length)===A}function r(C,A,N){if(N===void 0||N>C.length)N=C.length;return C.substring(N-A.length,N)===A}function e(C,A,N){if(typeof N!=="number")N=0;if(N+A.length>C.length)return!1;else return C.indexOf(A,N)!==-1}u("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),u("ERR_INVALID_ARG_TYPE",function(C,A,N){if(v===void 0)v=Qf();v(typeof C==="string","'name' must be a string");var m;if(typeof A==="string"&&S(A,"not "))m="must not be",A=A.replace(/^not /,"");else m="must be";var s;if(r(C," argument"))s="The ".concat(C," ").concat(m," ").concat(k(A,"type"));else{var i=e(C,".")?"property":"argument";s='The "'.concat(C,'" ').concat(i," ").concat(m," ").concat(k(A,"type"))}return s+=". Received type ".concat(Z(N)),s},TypeError),u("ERR_INVALID_ARG_VALUE",function(C,A){var N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";if(_===void 0)_=Y1();var m=_.inspect(A);if(m.length>128)m="".concat(m.slice(0,128),"...");return"The argument '".concat(C,"' ").concat(N,". Received ").concat(m)},TypeError,RangeError),u("ERR_INVALID_RETURN_VALUE",function(C,A,N){var m;if(N&&N.constructor&&N.constructor.name)m="instance of ".concat(N.constructor.name);else m="type ".concat(Z(N));return"Expected ".concat(C,' to be returned from the "').concat(A,'"')+" function but got ".concat(m,".")},TypeError),u("ERR_MISSING_ARGS",function(){for(var C=arguments.length,A=Array(C),N=0;N<C;N++)A[N]=arguments[N];if(v===void 0)v=Qf();v(A.length>0,"At least one arg needs to be specified");var m="The ",s=A.length;switch(A=A.map(function(i){return'"'.concat(i,'"')}),s){case 1:m+="".concat(A[0]," argument");break;case 2:m+="".concat(A[0]," and ").concat(A[1]," arguments");break;default:m+=A.slice(0,s-1).join(", "),m+=", and ".concat(A[s-1]," arguments");break}return"".concat(m," must be specified")},TypeError),f.codes=b}),R9=x((f,$)=>{function Z(F,U){var L=Object.keys(F);if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols(F);U&&(I=I.filter(function(y){return Object.getOwnPropertyDescriptor(F,y).enumerable})),L.push.apply(L,I)}return L}function z(F){for(var U=1;U<arguments.length;U++){var L=arguments[U]!=null?arguments[U]:{};U%2?Z(Object(L),!0).forEach(function(I){J(F,I,L[I])}):Object.getOwnPropertyDescriptors?Object.defineProperties(F,Object.getOwnPropertyDescriptors(L)):Z(Object(L)).forEach(function(I){Object.defineProperty(F,I,Object.getOwnPropertyDescriptor(L,I))})}return F}function J(F,U,L){if(U=Y(U),U in F)Object.defineProperty(F,U,{value:L,enumerable:!0,configurable:!0,writable:!0});else F[U]=L;return F}function Q(F,U){if(!(F instanceof U))throw TypeError("Cannot call a class as a function")}function X(F,U){for(var L=0;L<U.length;L++){var I=U[L];if(I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I)I.writable=!0;Object.defineProperty(F,Y(I.key),I)}}function W(F,U,L){if(U)X(F.prototype,U);if(L)X(F,L);return Object.defineProperty(F,"prototype",{writable:!1}),F}function Y(F){var U=V(F,"string");return S(U)==="symbol"?U:String(U)}function V(F,U){if(S(F)!=="object"||F===null)return F;var L=F[Symbol.toPrimitive];if(L!==void 0){var I=L.call(F,U||"default");if(S(I)!=="object")return I;throw TypeError("@@toPrimitive must return a primitive value.")}return(U==="string"?String:Number)(F)}function B(F,U){if(typeof U!=="function"&&U!==null)throw TypeError("Super expression must either be null or a function");if(F.prototype=Object.create(U&&U.prototype,{constructor:{value:F,writable:!0,configurable:!0}}),Object.defineProperty(F,"prototype",{writable:!1}),U)u(F,U)}function D(F){var U=v();return function(){var L=k(F),I;if(U){var y=k(this).constructor;I=Reflect.construct(L,arguments,y)}else I=L.apply(this,arguments);return O(this,I)}}function O(F,U){if(U&&(S(U)==="object"||typeof U==="function"))return U;else if(U!==void 0)throw TypeError("Derived constructors may only return object or undefined");return q(F)}function q(F){if(F===void 0)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return F}function R(F){var U=typeof Map==="function"?new Map:void 0;return R=function(L){if(L===null||!_(L))return L;if(typeof L!=="function")throw TypeError("Super expression must either be null or a function");if(typeof U<"u"){if(U.has(L))return U.get(L);U.set(L,I)}function I(){return b(L,arguments,k(this).constructor)}return I.prototype=Object.create(L.prototype,{constructor:{value:I,enumerable:!1,writable:!0,configurable:!0}}),u(I,L)},R(F)}function b(F,U,L){if(v())b=Reflect.construct.bind();else b=function(I,y,h){var d=[null];d.push.apply(d,y);var c=Function.bind.apply(I,d),K=new c;if(h)u(K,h.prototype);return K};return b.apply(null,arguments)}function v(){if(typeof Reflect>"u"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy==="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(F){return!1}}function _(F){return Function.toString.call(F).indexOf("[native code]")!==-1}function u(F,U){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,I){return L.__proto__=I,L},u(F,U)}function k(F){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(U){return U.__proto__||Object.getPrototypeOf(U)},k(F)}function S(F){return S=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(U){return typeof U}:function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},S(F)}var r=Y1(),e=r.inspect,C=O$(),A=C.codes.ERR_INVALID_ARG_TYPE;function N(F,U,L){if(L===void 0||L>F.length)L=F.length;return F.substring(L-U.length,L)===U}function m(F,U){if(U=Math.floor(U),F.length==0||U==0)return"";var L=F.length*U;U=Math.floor(Math.log(U)/Math.log(2));while(U)F+=F,U--;return F+=F.substring(0,L-F.length),F}var s="",i="",$0="",l="",V0={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},F0=10;function O0(F){var U=Object.keys(F),L=Object.create(Object.getPrototypeOf(F));return U.forEach(function(I){L[I]=F[I]}),Object.defineProperty(L,"message",{value:F.message}),L}function W0(F){return e(F,{compact:!1,customInspect:!1,depth:1000,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function C0(F,U,L){var I="",y="",h=0,d="",c=!1,K=W0(F),w=K.split(`
|
|
19
|
+
`)+" "+L[1];return L[0]+U+" "+F.join(", ")+" "+L[1]}f.types=A9();function b(F){return Array.isArray(F)}f.isArray=b;function v(F){return typeof F==="boolean"}f.isBoolean=v;function _(F){return F===null}f.isNull=_;function u(F){return F==null}f.isNullOrUndefined=u;function k(F){return typeof F==="number"}f.isNumber=k;function S(F){return typeof F==="string"}f.isString=S;function r(F){return typeof F==="symbol"}f.isSymbol=r;function e(F){return F===void 0}f.isUndefined=e;function C(F){return A(F)&&$0(F)==="[object RegExp]"}f.isRegExp=C,f.types.isRegExp=C;function A(F){return typeof F==="object"&&F!==null}f.isObject=A;function N(F){return A(F)&&$0(F)==="[object Date]"}f.isDate=N,f.types.isDate=N;function m(F){return A(F)&&($0(F)==="[object Error]"||F instanceof Error)}f.isError=m,f.types.isNativeError=m;function s(F){return typeof F==="function"}f.isFunction=s;function i(F){return F===null||typeof F==="boolean"||typeof F==="number"||typeof F==="string"||typeof F==="symbol"||typeof F>"u"}f.isPrimitive=i,f.isBuffer=q9();function $0(F){return Object.prototype.toString.call(F)}function n(F){return F<10?"0"+F.toString(10):F.toString(10)}var V0=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function F0(){var F=new Date,U=[n(F.getHours()),n(F.getMinutes()),n(F.getSeconds())].join(":");return[F.getDate(),V0[F.getMonth()],U].join(" ")}f.log=function(){console.log("%s - %s",F0(),f.format.apply(f,arguments))},f.inherits=C9(),f._extend=function(F,U){if(!U||!A(U))return F;var L=Object.keys(U),I=L.length;while(I--)F[L[I]]=U[L[I]];return F};function O0(F,U){return Object.prototype.hasOwnProperty.call(F,U)}var W0=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;f.promisify=function(F){if(typeof F!=="function")throw TypeError('The "original" argument must be of type Function');if(W0&&F[W0]){var U=F[W0];if(typeof U!=="function")throw TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(U,W0,{value:U,enumerable:!1,writable:!1,configurable:!0}),U}function U(){var L,I,y=new Promise(function(c,K){L=c,I=K}),h=[];for(var d=0;d<arguments.length;d++)h.push(arguments[d]);h.push(function(c,K){if(c)I(c);else L(K)});try{F.apply(this,h)}catch(c){I(c)}return y}if(Object.setPrototypeOf(U,Object.getPrototypeOf(F)),W0)Object.defineProperty(U,W0,{value:U,enumerable:!1,writable:!1,configurable:!0});return Object.defineProperties(U,$(F))},f.promisify.custom=W0;function C0(F,U){if(!F){var L=Error("Promise was rejected with a falsy value");L.reason=F,F=L}return U(F)}function w0(F){if(typeof F!=="function")throw TypeError('The "original" argument must be of type Function');function U(){var L=[];for(var I=0;I<arguments.length;I++)L.push(arguments[I]);var y=L.pop();if(typeof y!=="function")throw TypeError("The last argument must be of type Function");var h=this,d=function(){return y.apply(h,arguments)};F.apply(this,L).then(function(c){process.nextTick(d.bind(null,null,c))},function(c){process.nextTick(C0.bind(null,c,d))})}return Object.setPrototypeOf(U,Object.getPrototypeOf(F)),Object.defineProperties(U,$(F)),U}f.callbackify=w0}),O$=x((f,$)=>{function Z(C){return Z=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},Z(C)}function z(C,A){for(var N=0;N<A.length;N++){var m=A[N];if(m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m)m.writable=!0;Object.defineProperty(C,Q(m.key),m)}}function J(C,A,N){if(A)z(C.prototype,A);if(N)z(C,N);return Object.defineProperty(C,"prototype",{writable:!1}),C}function Q(C){var A=X(C,"string");return Z(A)==="symbol"?A:String(A)}function X(C,A){if(Z(C)!=="object"||C===null)return C;var N=C[Symbol.toPrimitive];if(N!==void 0){var m=N.call(C,A||"default");if(Z(m)!=="object")return m;throw TypeError("@@toPrimitive must return a primitive value.")}return(A==="string"?String:Number)(C)}function W(C,A){if(!(C instanceof A))throw TypeError("Cannot call a class as a function")}function Y(C,A){if(typeof A!=="function"&&A!==null)throw TypeError("Super expression must either be null or a function");if(C.prototype=Object.create(A&&A.prototype,{constructor:{value:C,writable:!0,configurable:!0}}),Object.defineProperty(C,"prototype",{writable:!1}),A)V(C,A)}function V(C,A){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(N,m){return N.__proto__=m,N},V(C,A)}function w(C){var A=q();return function(){var N=R(C),m;if(A){var s=R(this).constructor;m=Reflect.construct(N,arguments,s)}else m=N.apply(this,arguments);return D(this,m)}}function D(C,A){if(A&&(Z(A)==="object"||typeof A==="function"))return A;else if(A!==void 0)throw TypeError("Derived constructors may only return object or undefined");return O(C)}function O(C){if(C===void 0)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return C}function q(){if(typeof Reflect>"u"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy==="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(C){return!1}}function R(C){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(A){return A.__proto__||Object.getPrototypeOf(A)},R(C)}var b={},v,_;function u(C,A,N){if(!N)N=Error;function m(i,$0,n){if(typeof A==="string")return A;else return A(i,$0,n)}var s=function(i){Y(n,i);var $0=w(n);function n(V0,F0,O0){var W0;return W(this,n),W0=$0.call(this,m(V0,F0,O0)),W0.code=C,W0}return J(n)}(N);b[C]=s}function k(C,A){if(Array.isArray(C)){var N=C.length;if(C=C.map(function(m){return String(m)}),N>2)return"one of ".concat(A," ").concat(C.slice(0,N-1).join(", "),", or ")+C[N-1];else if(N===2)return"one of ".concat(A," ").concat(C[0]," or ").concat(C[1]);else return"of ".concat(A," ").concat(C[0])}else return"of ".concat(A," ").concat(String(C))}function S(C,A,N){return C.substr(!N||N<0?0:+N,A.length)===A}function r(C,A,N){if(N===void 0||N>C.length)N=C.length;return C.substring(N-A.length,N)===A}function e(C,A,N){if(typeof N!=="number")N=0;if(N+A.length>C.length)return!1;else return C.indexOf(A,N)!==-1}u("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),u("ERR_INVALID_ARG_TYPE",function(C,A,N){if(v===void 0)v=Qf();v(typeof C==="string","'name' must be a string");var m;if(typeof A==="string"&&S(A,"not "))m="must not be",A=A.replace(/^not /,"");else m="must be";var s;if(r(C," argument"))s="The ".concat(C," ").concat(m," ").concat(k(A,"type"));else{var i=e(C,".")?"property":"argument";s='The "'.concat(C,'" ').concat(i," ").concat(m," ").concat(k(A,"type"))}return s+=". Received type ".concat(Z(N)),s},TypeError),u("ERR_INVALID_ARG_VALUE",function(C,A){var N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";if(_===void 0)_=F1();var m=_.inspect(A);if(m.length>128)m="".concat(m.slice(0,128),"...");return"The argument '".concat(C,"' ").concat(N,". Received ").concat(m)},TypeError,RangeError),u("ERR_INVALID_RETURN_VALUE",function(C,A,N){var m;if(N&&N.constructor&&N.constructor.name)m="instance of ".concat(N.constructor.name);else m="type ".concat(Z(N));return"Expected ".concat(C,' to be returned from the "').concat(A,'"')+" function but got ".concat(m,".")},TypeError),u("ERR_MISSING_ARGS",function(){for(var C=arguments.length,A=Array(C),N=0;N<C;N++)A[N]=arguments[N];if(v===void 0)v=Qf();v(A.length>0,"At least one arg needs to be specified");var m="The ",s=A.length;switch(A=A.map(function(i){return'"'.concat(i,'"')}),s){case 1:m+="".concat(A[0]," argument");break;case 2:m+="".concat(A[0]," and ").concat(A[1]," arguments");break;default:m+=A.slice(0,s-1).join(", "),m+=", and ".concat(A[s-1]," arguments");break}return"".concat(m," must be specified")},TypeError),f.codes=b}),R9=x((f,$)=>{function Z(F,U){var L=Object.keys(F);if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols(F);U&&(I=I.filter(function(y){return Object.getOwnPropertyDescriptor(F,y).enumerable})),L.push.apply(L,I)}return L}function z(F){for(var U=1;U<arguments.length;U++){var L=arguments[U]!=null?arguments[U]:{};U%2?Z(Object(L),!0).forEach(function(I){J(F,I,L[I])}):Object.getOwnPropertyDescriptors?Object.defineProperties(F,Object.getOwnPropertyDescriptors(L)):Z(Object(L)).forEach(function(I){Object.defineProperty(F,I,Object.getOwnPropertyDescriptor(L,I))})}return F}function J(F,U,L){if(U=Y(U),U in F)Object.defineProperty(F,U,{value:L,enumerable:!0,configurable:!0,writable:!0});else F[U]=L;return F}function Q(F,U){if(!(F instanceof U))throw TypeError("Cannot call a class as a function")}function X(F,U){for(var L=0;L<U.length;L++){var I=U[L];if(I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I)I.writable=!0;Object.defineProperty(F,Y(I.key),I)}}function W(F,U,L){if(U)X(F.prototype,U);if(L)X(F,L);return Object.defineProperty(F,"prototype",{writable:!1}),F}function Y(F){var U=V(F,"string");return S(U)==="symbol"?U:String(U)}function V(F,U){if(S(F)!=="object"||F===null)return F;var L=F[Symbol.toPrimitive];if(L!==void 0){var I=L.call(F,U||"default");if(S(I)!=="object")return I;throw TypeError("@@toPrimitive must return a primitive value.")}return(U==="string"?String:Number)(F)}function w(F,U){if(typeof U!=="function"&&U!==null)throw TypeError("Super expression must either be null or a function");if(F.prototype=Object.create(U&&U.prototype,{constructor:{value:F,writable:!0,configurable:!0}}),Object.defineProperty(F,"prototype",{writable:!1}),U)u(F,U)}function D(F){var U=v();return function(){var L=k(F),I;if(U){var y=k(this).constructor;I=Reflect.construct(L,arguments,y)}else I=L.apply(this,arguments);return O(this,I)}}function O(F,U){if(U&&(S(U)==="object"||typeof U==="function"))return U;else if(U!==void 0)throw TypeError("Derived constructors may only return object or undefined");return q(F)}function q(F){if(F===void 0)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return F}function R(F){var U=typeof Map==="function"?new Map:void 0;return R=function(L){if(L===null||!_(L))return L;if(typeof L!=="function")throw TypeError("Super expression must either be null or a function");if(typeof U<"u"){if(U.has(L))return U.get(L);U.set(L,I)}function I(){return b(L,arguments,k(this).constructor)}return I.prototype=Object.create(L.prototype,{constructor:{value:I,enumerable:!1,writable:!0,configurable:!0}}),u(I,L)},R(F)}function b(F,U,L){if(v())b=Reflect.construct.bind();else b=function(I,y,h){var d=[null];d.push.apply(d,y);var c=Function.bind.apply(I,d),K=new c;if(h)u(K,h.prototype);return K};return b.apply(null,arguments)}function v(){if(typeof Reflect>"u"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy==="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(F){return!1}}function _(F){return Function.toString.call(F).indexOf("[native code]")!==-1}function u(F,U){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,I){return L.__proto__=I,L},u(F,U)}function k(F){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(U){return U.__proto__||Object.getPrototypeOf(U)},k(F)}function S(F){return S=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(U){return typeof U}:function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},S(F)}var r=F1(),e=r.inspect,C=O$(),A=C.codes.ERR_INVALID_ARG_TYPE;function N(F,U,L){if(L===void 0||L>F.length)L=F.length;return F.substring(L-U.length,L)===U}function m(F,U){if(U=Math.floor(U),F.length==0||U==0)return"";var L=F.length*U;U=Math.floor(Math.log(U)/Math.log(2));while(U)F+=F,U--;return F+=F.substring(0,L-F.length),F}var s="",i="",$0="",n="",V0={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},F0=10;function O0(F){var U=Object.keys(F),L=Object.create(Object.getPrototypeOf(F));return U.forEach(function(I){L[I]=F[I]}),Object.defineProperty(L,"message",{value:F.message}),L}function W0(F){return e(F,{compact:!1,customInspect:!1,depth:1000,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function C0(F,U,L){var I="",y="",h=0,d="",c=!1,K=W0(F),B=K.split(`
|
|
20
20
|
`),H=W0(U).split(`
|
|
21
|
-
`),T=0,P="";if(L==="strictEqual"&&S(F)==="object"&&S(U)==="object"&&F!==null&&U!==null)L="strictEqualObject";if(
|
|
21
|
+
`),T=0,P="";if(L==="strictEqual"&&S(F)==="object"&&S(U)==="object"&&F!==null&&U!==null)L="strictEqualObject";if(B.length===1&&H.length===1&&B[0]!==H[0]){var E=B[0].length+H[0].length;if(E<=F0){if((S(F)!=="object"||F===null)&&(S(U)!=="object"||U===null)&&(F!==0||U!==0))return"".concat(V0[L],`
|
|
22
22
|
|
|
23
|
-
`)+"".concat(
|
|
24
|
-
`)}else if(L!=="strictEqualObject"){var o=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(E<o){while(
|
|
25
|
-
`.concat(m(" ",T),"^"),T=0}}}var t=
|
|
26
|
-
`.concat(t).concat(d);else I=t;if(
|
|
27
|
-
`);if(j.length>30){j[26]="".concat(s,"...").concat(
|
|
23
|
+
`)+"".concat(B[0]," !== ").concat(H[0],`
|
|
24
|
+
`)}else if(L!=="strictEqualObject"){var o=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(E<o){while(B[0][T]===H[0][T])T++;if(T>2)P=`
|
|
25
|
+
`.concat(m(" ",T),"^"),T=0}}}var t=B[B.length-1],Z0=H[H.length-1];while(t===Z0){if(T++<2)d=`
|
|
26
|
+
`.concat(t).concat(d);else I=t;if(B.pop(),H.pop(),B.length===0||H.length===0)break;t=B[B.length-1],Z0=H[H.length-1]}var D0=Math.max(B.length,H.length);if(D0===0){var j=K.split(`
|
|
27
|
+
`);if(j.length>30){j[26]="".concat(s,"...").concat(n);while(j.length>27)j.pop()}return"".concat(V0.notIdentical,`
|
|
28
28
|
|
|
29
29
|
`).concat(j.join(`
|
|
30
30
|
`),`
|
|
31
31
|
`)}if(T>3)d=`
|
|
32
|
-
`.concat(s,"...").concat(
|
|
32
|
+
`.concat(s,"...").concat(n).concat(d),c=!0;if(I!=="")d=`
|
|
33
33
|
`.concat(I).concat(d),I="";var G0=0,P0=V0[L]+`
|
|
34
|
-
`.concat(i,"+ actual").concat(
|
|
35
|
-
`.concat(s,"...").concat(
|
|
34
|
+
`.concat(i,"+ actual").concat(n," ").concat($0,"- expected").concat(n),A0=" ".concat(s,"...").concat(n," Lines skipped");for(T=0;T<D0;T++){var K0=T-h;if(B.length<T+1){if(K0>1&&T>2){if(K0>4)y+=`
|
|
35
|
+
`.concat(s,"...").concat(n),c=!0;else if(K0>3)y+=`
|
|
36
36
|
`.concat(H[T-2]),G0++;y+=`
|
|
37
37
|
`.concat(H[T-1]),G0++}h=T,I+=`
|
|
38
|
-
`.concat($0,"-").concat(
|
|
39
|
-
`.concat(s,"...").concat(
|
|
40
|
-
`.concat(
|
|
41
|
-
`.concat(
|
|
42
|
-
`.concat(i,"+").concat(
|
|
43
|
-
`.concat(s,"...").concat(
|
|
44
|
-
`.concat(
|
|
45
|
-
`.concat(
|
|
46
|
-
`.concat(i,"+").concat(
|
|
47
|
-
`.concat($0,"-").concat(
|
|
38
|
+
`.concat($0,"-").concat(n," ").concat(H[T]),G0++}else if(H.length<T+1){if(K0>1&&T>2){if(K0>4)y+=`
|
|
39
|
+
`.concat(s,"...").concat(n),c=!0;else if(K0>3)y+=`
|
|
40
|
+
`.concat(B[T-2]),G0++;y+=`
|
|
41
|
+
`.concat(B[T-1]),G0++}h=T,y+=`
|
|
42
|
+
`.concat(i,"+").concat(n," ").concat(B[T]),G0++}else{var R0=H[T],j0=B[T],z1=j0!==R0&&(!N(j0,",")||j0.slice(0,-1)!==R0);if(z1&&N(R0,",")&&R0.slice(0,-1)===j0)z1=!1,j0+=",";if(z1){if(K0>1&&T>2){if(K0>4)y+=`
|
|
43
|
+
`.concat(s,"...").concat(n),c=!0;else if(K0>3)y+=`
|
|
44
|
+
`.concat(B[T-2]),G0++;y+=`
|
|
45
|
+
`.concat(B[T-1]),G0++}h=T,y+=`
|
|
46
|
+
`.concat(i,"+").concat(n," ").concat(j0),I+=`
|
|
47
|
+
`.concat($0,"-").concat(n," ").concat(R0),G0+=2}else if(y+=I,I="",K0===1||T===0)y+=`
|
|
48
48
|
`.concat(j0),G0++}if(G0>20&&T<D0-2)return"".concat(P0).concat(A0,`
|
|
49
49
|
`).concat(y,`
|
|
50
|
-
`).concat(s,"...").concat(
|
|
51
|
-
`)+"".concat(s,"...").concat(
|
|
52
|
-
`).concat(y).concat(I).concat(d).concat(P)}var w0=function(F,U){
|
|
53
|
-
`);if(c==="notStrictEqual"&&S(
|
|
50
|
+
`).concat(s,"...").concat(n).concat(I,`
|
|
51
|
+
`)+"".concat(s,"...").concat(n)}return"".concat(P0).concat(c?A0:"",`
|
|
52
|
+
`).concat(y).concat(I).concat(d).concat(P)}var w0=function(F,U){w(I,F);var L=D(I);function I(y){var h;if(Q(this,I),S(y)!=="object"||y===null)throw new A("options","Object",y);var{message:d,operator:c,stackStartFn:K,actual:B,expected:H}=y,T=Error.stackTraceLimit;if(Error.stackTraceLimit=0,d!=null)h=L.call(this,String(d));else{if(process.stderr&&process.stderr.isTTY)if(process.stderr&&process.stderr.getColorDepth&&process.stderr.getColorDepth()!==1)s="\x1B[34m",i="\x1B[32m",n="\x1B[39m",$0="\x1B[31m";else s="",i="",n="",$0="";if(S(B)==="object"&&B!==null&&S(H)==="object"&&H!==null&&"stack"in B&&B instanceof Error&&"stack"in H&&H instanceof Error)B=O0(B),H=O0(H);if(c==="deepStrictEqual"||c==="strictEqual")h=L.call(this,C0(B,H,c));else if(c==="notDeepStrictEqual"||c==="notStrictEqual"){var P=V0[c],E=W0(B).split(`
|
|
53
|
+
`);if(c==="notStrictEqual"&&S(B)==="object"&&B!==null)P=V0.notStrictEqualObject;if(E.length>30){E[26]="".concat(s,"...").concat(n);while(E.length>27)E.pop()}if(E.length===1)h=L.call(this,"".concat(P," ").concat(E[0]));else h=L.call(this,"".concat(P,`
|
|
54
54
|
|
|
55
55
|
`).concat(E.join(`
|
|
56
56
|
`),`
|
|
57
|
-
`))}else{var o=W0(
|
|
57
|
+
`))}else{var o=W0(B),t="",Z0=V0[c];if(c==="notDeepEqual"||c==="notEqual"){if(o="".concat(V0[c],`
|
|
58
58
|
|
|
59
59
|
`).concat(o),o.length>1024)o="".concat(o.slice(0,1021),"...")}else{if(t="".concat(W0(H)),o.length>512)o="".concat(o.slice(0,509),"...");if(t.length>512)t="".concat(t.slice(0,509),"...");if(c==="deepEqual"||c==="equal")o="".concat(Z0,`
|
|
60
60
|
|
|
@@ -62,27 +62,27 @@ var M8=Object.create;var{getPrototypeOf:T8,defineProperty:X1,getOwnPropertyNames
|
|
|
62
62
|
|
|
63
63
|
should equal
|
|
64
64
|
|
|
65
|
-
`);else t=" ".concat(c," ").concat(t)}h=L.call(this,"".concat(o).concat(t))}}if(Error.stackTraceLimit=T,h.generatedMessage=!d,Object.defineProperty(q(h),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),h.code="ERR_ASSERTION",h.actual=
|
|
66
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function J(G,M){if(!G)return;if(typeof G==="string")return Q(G,M);var g=Object.prototype.toString.call(G).slice(8,-1);if(g==="Object"&&G.constructor)g=G.constructor.name;if(g==="Map"||g==="Set")return Array.from(G);if(g==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return Q(G,M)}function Q(G,M){if(M==null||M>G.length)M=G.length;for(var g=0,
|
|
65
|
+
`);else t=" ".concat(c," ").concat(t)}h=L.call(this,"".concat(o).concat(t))}}if(Error.stackTraceLimit=T,h.generatedMessage=!d,Object.defineProperty(q(h),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),h.code="ERR_ASSERTION",h.actual=B,h.expected=H,h.operator=c,Error.captureStackTrace)Error.captureStackTrace(q(h),K);return h.stack,h.name="AssertionError",O(h)}return W(I,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:U,value:function(y,h){return e(this,z(z({},h),{},{customInspect:!1,depth:0}))}}]),I}(R(Error),e.custom);$.exports=w0}),D$=x((f,$)=>{var Z=Object.prototype.toString;$.exports=function(z){var J=Z.call(z),Q=J==="[object Arguments]";if(!Q)Q=J!=="[object Array]"&&z!==null&&typeof z==="object"&&typeof z.length==="number"&&z.length>=0&&Z.call(z.callee)==="[object Function]";return Q}}),N9=x((f,$)=>{var Z;if(!Object.keys)z=Object.prototype.hasOwnProperty,J=Object.prototype.toString,Q=D$(),X=Object.prototype.propertyIsEnumerable,W=!X.call({toString:null},"toString"),Y=X.call(function(){},"prototype"),V=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],w=function(R){var b=R.constructor;return b&&b.prototype===R},D={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},O=function(){if(typeof window>"u")return!1;for(var R in window)try{if(!D["$"+R]&&z.call(window,R)&&window[R]!==null&&typeof window[R]==="object")try{w(window[R])}catch(b){return!0}}catch(b){return!0}return!1}(),q=function(R){if(typeof window>"u"||!O)return w(R);try{return w(R)}catch(b){return!1}},Z=function(R){var b=R!==null&&typeof R==="object",v=J.call(R)==="[object Function]",_=Q(R),u=b&&J.call(R)==="[object String]",k=[];if(!b&&!v&&!_)throw TypeError("Object.keys called on a non-object");var S=Y&&v;if(u&&R.length>0&&!z.call(R,0))for(var r=0;r<R.length;++r)k.push(String(r));if(_&&R.length>0)for(var e=0;e<R.length;++e)k.push(String(e));else for(var C in R)if(!(S&&C==="prototype")&&z.call(R,C))k.push(String(C));if(W){var A=q(R);for(var N=0;N<V.length;++N)if(!(A&&V[N]==="constructor")&&z.call(R,V[N]))k.push(V[N])}return k};var z,J,Q,X,W,Y,V,w,D,O,q;$.exports=Z}),K$=x((f,$)=>{var Z=Array.prototype.slice,z=D$(),J=Object.keys,Q=J?function(W){return J(W)}:N9(),X=Object.keys;Q.shim=function(){if(Object.keys){var W=function(){var Y=Object.keys(arguments);return Y&&Y.length===arguments.length}(1,2);if(!W)Object.keys=function(Y){if(z(Y))return X(Z.call(Y));return X(Y)}}else Object.keys=Q;return Object.keys||Q},$.exports=Q}),I9=x((f,$)=>{var Z=K$(),z=Xf()(),J=s0(),Q=Wf(),X=J("Array.prototype.push"),W=J("Object.prototype.propertyIsEnumerable"),Y=z?Q.getOwnPropertySymbols:null;$.exports=function(V,w){if(V==null)throw TypeError("target must be an object");var D=Q(V);if(arguments.length===1)return D;for(var O=1;O<arguments.length;++O){var q=Q(arguments[O]),R=Z(q),b=z&&(Q.getOwnPropertySymbols||Y);if(b){var v=b(q);for(var _=0;_<v.length;++_){var u=v[_];if(W(q,u))X(R,u)}}for(var k=0;k<R.length;++k){var S=R[k];if(W(q,S)){var r=q[S];D[S]=r}}}return D}}),S9=x((f,$)=>{var Z=I9(),z=function(){if(!Object.assign)return!1;var Q="abcdefghijklmnopqrst",X=Q.split(""),W={};for(var Y=0;Y<X.length;++Y)W[X[Y]]=X[Y];var V=Object.assign({},W),w="";for(var D in V)w+=D;return Q!==w},J=function(){if(!Object.assign||!Object.preventExtensions)return!1;var Q=Object.preventExtensions({1:2});try{Object.assign(Q,"xy")}catch(X){return Q[1]==="y"}return!1};$.exports=function(){if(!Object.assign)return Z;if(z())return Z;if(J())return Z;return Object.assign}}),L$=x((f,$)=>{var Z=function(z){return z!==z};$.exports=function(z,J){if(z===0&&J===0)return 1/z===1/J;if(z===J)return!0;if(Z(z)&&Z(J))return!0;return!1}}),Bf=x((f,$)=>{var Z=L$();$.exports=function(){return typeof Object.is==="function"?Object.is:Z}}),P9=x((f,$)=>{var Z=wf(),z=I1(),J=z(Z("String.prototype.indexOf"));$.exports=function(Q,X){var W=Z(Q,!!X);if(typeof W==="function"&&J(Q,".prototype.")>-1)return z(W);return W}}),S1=x((f,$)=>{var Z=K$(),z=typeof Symbol==="function"&&typeof Symbol("foo")==="symbol",J=Object.prototype.toString,Q=Array.prototype.concat,X=B$(),W=function(D){return typeof D==="function"&&J.call(D)==="[object Function]"},Y=H$()(),V=function(D,O,q,R){if(O in D){if(R===!0){if(D[O]===q)return}else if(!W(R)||!R())return}if(Y)X(D,O,q,!0);else X(D,O,q)},w=function(D,O){var q=arguments.length>2?arguments[2]:{},R=Z(O);if(z)R=Q.call(R,Object.getOwnPropertySymbols(O));for(var b=0;b<R.length;b+=1)V(D,R[b],O[R[b]],q[R[b]])};w.supportsDescriptors=!!Y,$.exports=w}),E9=x((f,$)=>{var Z=Bf(),z=S1();$.exports=function(){var J=Z();return z(Object,{is:J},{is:function(){return Object.is!==J}}),J}}),b9=x((f,$)=>{var Z=S1(),z=I1(),J=L$(),Q=Bf(),X=E9(),W=z(Q(),Object);Z(W,{getPolyfill:Q,implementation:J,shim:X}),$.exports=W}),M$=x((f,$)=>{$.exports=function(Z){return Z!==Z}}),T$=x((f,$)=>{var Z=M$();$.exports=function(){if(Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a"))return Number.isNaN;return Z}}),_9=x((f,$)=>{var Z=S1(),z=T$();$.exports=function(){var J=z();return Z(Number,{isNaN:J},{isNaN:function(){return Number.isNaN!==J}}),J}}),v9=x((f,$)=>{var Z=I1(),z=S1(),J=M$(),Q=T$(),X=_9(),W=Z(Q(),Number);z(W,{getPolyfill:Q,implementation:J,shim:X}),$.exports=W}),x9=x((f,$)=>{function Z(G,M){return W(G)||X(G,M)||J(G,M)||z()}function z(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
66
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function J(G,M){if(!G)return;if(typeof G==="string")return Q(G,M);var g=Object.prototype.toString.call(G).slice(8,-1);if(g==="Object"&&G.constructor)g=G.constructor.name;if(g==="Map"||g==="Set")return Array.from(G);if(g==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return Q(G,M)}function Q(G,M){if(M==null||M>G.length)M=G.length;for(var g=0,l=Array(M);g<M;g++)l[g]=G[g];return l}function X(G,M){var g=G==null?null:typeof Symbol<"u"&&G[Symbol.iterator]||G["@@iterator"];if(g!=null){var l,p,f0,a,z0=[],J0=!0,L0=!1;try{if(f0=(g=g.call(G)).next,M===0){if(Object(g)!==g)return;J0=!1}else for(;!(J0=(l=f0.call(g)).done)&&(z0.push(l.value),z0.length!==M);J0=!0);}catch(q0){L0=!0,p=q0}finally{try{if(!J0&&g.return!=null&&(a=g.return(),Object(a)!==a))return}finally{if(L0)throw p}}return z0}}function W(G){if(Array.isArray(G))return G}function Y(G){return Y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(M){return typeof M}:function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M},Y(G)}var V=/a/g.flags!==void 0,w=function(G){var M=[];return G.forEach(function(g){return M.push(g)}),M},D=function(G){var M=[];return G.forEach(function(g,l){return M.push([l,g])}),M},O=Object.is?Object.is:b9(),q=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},R=Number.isNaN?Number.isNaN:v9();function b(G){return G.call.bind(G)}var v=b(Object.prototype.hasOwnProperty),_=b(Object.prototype.propertyIsEnumerable),u=b(Object.prototype.toString),k=F1().types,S=k.isAnyArrayBuffer,r=k.isArrayBufferView,e=k.isDate,C=k.isMap,A=k.isRegExp,N=k.isSet,m=k.isNativeError,s=k.isBoxedPrimitive,i=k.isNumberObject,$0=k.isStringObject,n=k.isBooleanObject,V0=k.isBigIntObject,F0=k.isSymbolObject,O0=k.isFloat32Array,W0=k.isFloat64Array;function C0(G){if(G.length===0||G.length>10)return!0;for(var M=0;M<G.length;M++){var g=G.charCodeAt(M);if(g<48||g>57)return!0}return G.length===10&&G>=Math.pow(2,32)}function w0(G){return Object.keys(G).filter(C0).concat(q(G).filter(Object.prototype.propertyIsEnumerable.bind(G)))}/*!
|
|
67
67
|
* The buffer module from node.js, for the browser.
|
|
68
68
|
*
|
|
69
69
|
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
70
70
|
* @license MIT
|
|
71
|
-
*/function F(G,M){if(G===M)return 0;var g=G.length,n=M.length;for(var p=0,f0=Math.min(g,n);p<f0;++p)if(G[p]!==M[p]){g=G[p],n=M[p];break}if(g<n)return-1;if(n<g)return 1;return 0}var U=void 0,L=!0,I=!1,y=0,h=1,d=2,c=3;function K(G,M){return V?G.source===M.source&&G.flags===M.flags:RegExp.prototype.toString.call(G)===RegExp.prototype.toString.call(M)}function w(G,M){if(G.byteLength!==M.byteLength)return!1;for(var g=0;g<G.byteLength;g++)if(G[g]!==M[g])return!1;return!0}function H(G,M){if(G.byteLength!==M.byteLength)return!1;return F(new Uint8Array(G.buffer,G.byteOffset,G.byteLength),new Uint8Array(M.buffer,M.byteOffset,M.byteLength))===0}function T(G,M){return G.byteLength===M.byteLength&&F(new Uint8Array(G),new Uint8Array(M))===0}function P(G,M){if(i(G))return i(M)&&O(Number.prototype.valueOf.call(G),Number.prototype.valueOf.call(M));if($0(G))return $0(M)&&String.prototype.valueOf.call(G)===String.prototype.valueOf.call(M);if(l(G))return l(M)&&Boolean.prototype.valueOf.call(G)===Boolean.prototype.valueOf.call(M);if(V0(G))return V0(M)&&BigInt.prototype.valueOf.call(G)===BigInt.prototype.valueOf.call(M);return F0(M)&&Symbol.prototype.valueOf.call(G)===Symbol.prototype.valueOf.call(M)}function E(G,M,g,n){if(G===M){if(G!==0)return!0;return g?O(G,M):!0}if(g){if(Y(G)!=="object")return typeof G==="number"&&R(G)&&R(M);if(Y(M)!=="object"||G===null||M===null)return!1;if(Object.getPrototypeOf(G)!==Object.getPrototypeOf(M))return!1}else{if(G===null||Y(G)!=="object"){if(M===null||Y(M)!=="object")return G==M;return!1}if(M===null||Y(M)!=="object")return!1}var p=u(G),f0=u(M);if(p!==f0)return!1;if(Array.isArray(G)){if(G.length!==M.length)return!1;var a=w0(G,U),z0=w0(M,U);if(a.length!==z0.length)return!1;return t(G,M,g,n,h,a)}if(p==="[object Object]"){if(!C(G)&&C(M)||!N(G)&&N(M))return!1}if(e(G)){if(!e(M)||Date.prototype.getTime.call(G)!==Date.prototype.getTime.call(M))return!1}else if(A(G)){if(!A(M)||!K(G,M))return!1}else if(m(G)||G instanceof Error){if(G.message!==M.message||G.name!==M.name)return!1}else if(r(G)){if(!g&&(O0(G)||W0(G))){if(!w(G,M))return!1}else if(!H(G,M))return!1;var J0=w0(G,U),L0=w0(M,U);if(J0.length!==L0.length)return!1;return t(G,M,g,n,y,J0)}else if(N(G)){if(!N(M)||G.size!==M.size)return!1;return t(G,M,g,n,d)}else if(C(G)){if(!C(M)||G.size!==M.size)return!1;return t(G,M,g,n,c)}else if(S(G)){if(!T(G,M))return!1}else if(s(G)&&!P(G,M))return!1;return t(G,M,g,n,y)}function o(G,M){return M.filter(function(g){return _(G,g)})}function t(G,M,g,n,p,f0){if(arguments.length===5){f0=Object.keys(G);var a=Object.keys(M);if(f0.length!==a.length)return!1}var z0=0;for(;z0<f0.length;z0++)if(!v(M,f0[z0]))return!1;if(g&&arguments.length===5){var J0=q(G);if(J0.length!==0){var L0=0;for(z0=0;z0<J0.length;z0++){var q0=J0[z0];if(_(G,q0)){if(!_(M,q0))return!1;f0.push(q0),L0++}else if(_(M,q0))return!1}var z1=q(M);if(J0.length!==z1.length&&o(M,z1).length!==L0)return!1}else{var i0=q(M);if(i0.length!==0&&o(M,i0).length!==0)return!1}}if(f0.length===0&&(p===y||p===h&&G.length===0||G.size===0))return!0;if(n===void 0)n={val1:new Map,val2:new Map,position:0};else{var J1=n.val1.get(G);if(J1!==void 0){var _0=n.val2.get(M);if(_0!==void 0)return J1===_0}n.position++}n.val1.set(G,n.position),n.val2.set(M,n.position);var Q1=R0(G,M,g,f0,n,p);return n.val1.delete(G),n.val2.delete(M),Q1}function Z0(G,M,g,n){var p=B(G);for(var f0=0;f0<p.length;f0++){var a=p[f0];if(E(M,a,g,n))return G.delete(a),!0}return!1}function D0(G){switch(Y(G)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":G=+G;case"number":if(R(G))return!1}return!0}function j(G,M,g){var n=D0(g);if(n!=null)return n;return M.has(n)&&!G.has(n)}function G0(G,M,g,n,p){var f0=D0(g);if(f0!=null)return f0;var a=M.get(f0);if(a===void 0&&!M.has(f0)||!E(n,a,!1,p))return!1;return!G.has(f0)&&E(n,a,!1,p)}function P0(G,M,g,n){var p=null,f0=B(G);for(var a=0;a<f0.length;a++){var z0=f0[a];if(Y(z0)==="object"&&z0!==null){if(p===null)p=new Set;p.add(z0)}else if(!M.has(z0)){if(g)return!1;if(!j(G,M,z0))return!1;if(p===null)p=new Set;p.add(z0)}}if(p!==null){var J0=B(M);for(var L0=0;L0<J0.length;L0++){var q0=J0[L0];if(Y(q0)==="object"&&q0!==null){if(!Z0(p,q0,g,n))return!1}else if(!g&&!G.has(q0)&&!Z0(p,q0,g,n))return!1}return p.size===0}return!0}function A0(G,M,g,n,p,f0){var a=B(G);for(var z0=0;z0<a.length;z0++){var J0=a[z0];if(E(g,J0,p,f0)&&E(n,M.get(J0),p,f0))return G.delete(J0),!0}return!1}function K0(G,M,g,n){var p=null,f0=D(G);for(var a=0;a<f0.length;a++){var z0=Z(f0[a],2),J0=z0[0],L0=z0[1];if(Y(J0)==="object"&&J0!==null){if(p===null)p=new Set;p.add(J0)}else{var q0=M.get(J0);if(q0===void 0&&!M.has(J0)||!E(L0,q0,g,n)){if(g)return!1;if(!G0(G,M,J0,L0,n))return!1;if(p===null)p=new Set;p.add(J0)}}}if(p!==null){var z1=D(M);for(var i0=0;i0<z1.length;i0++){var J1=Z(z1[i0],2),_0=J1[0],Q1=J1[1];if(Y(_0)==="object"&&_0!==null){if(!A0(p,G,_0,Q1,g,n))return!1}else if(!g&&(!G.has(_0)||!E(G.get(_0),Q1,!1,n))&&!A0(p,G,_0,Q1,!1,n))return!1}return p.size===0}return!0}function R0(G,M,g,n,p,f0){var a=0;if(f0===d){if(!P0(G,M,g,p))return!1}else if(f0===c){if(!K0(G,M,g,p))return!1}else if(f0===h)for(;a<G.length;a++)if(v(G,a)){if(!v(M,a)||!E(G[a],M[a],g,p))return!1}else if(v(M,a))return!1;else{var z0=Object.keys(G);for(;a<z0.length;a++){var J0=z0[a];if(!v(M,J0)||!E(G[J0],M[J0],g,p))return!1}if(z0.length!==Object.keys(M).length)return!1;return!0}for(a=0;a<n.length;a++){var L0=n[a];if(!E(G[L0],M[L0],g,p))return!1}return!0}function j0(G,M){return E(G,M,I)}function Z1(G,M){return E(G,M,L)}$.exports={isDeepEqual:j0,isDeepStrictEqual:Z1}}),Qf=x((f,$)=>{function Z(K){return Z=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(w){return typeof w}:function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w},Z(K)}function z(K,w){for(var H=0;H<w.length;H++){var T=w[H];if(T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T)T.writable=!0;Object.defineProperty(K,Q(T.key),T)}}function J(K,w,H){if(w)z(K.prototype,w);if(H)z(K,H);return Object.defineProperty(K,"prototype",{writable:!1}),K}function Q(K){var w=X(K,"string");return Z(w)==="symbol"?w:String(w)}function X(K,w){if(Z(K)!=="object"||K===null)return K;var H=K[Symbol.toPrimitive];if(H!==void 0){var T=H.call(K,w||"default");if(Z(T)!=="object")return T;throw TypeError("@@toPrimitive must return a primitive value.")}return(w==="string"?String:Number)(K)}function W(K,w){if(!(K instanceof w))throw TypeError("Cannot call a class as a function")}var Y=O$(),V=Y.codes,B=V.ERR_AMBIGUOUS_ARGUMENT,D=V.ERR_INVALID_ARG_TYPE,O=V.ERR_INVALID_ARG_VALUE,q=V.ERR_INVALID_RETURN_VALUE,R=V.ERR_MISSING_ARGS,b=R9(),v=Y1(),_=v.inspect,u=Y1().types,k=u.isPromise,S=u.isRegExp,r=S9()(),e=Bf()(),C=P9()("RegExp.prototype.test"),A,N;function m(){var K=x9();A=K.isDeepEqual,N=K.isDeepStrictEqual}var s=!1,i=$.exports=O0,$0={};function l(K){if(K.message instanceof Error)throw K.message;throw new b(K)}function V0(K,w,H,T,P){var E=arguments.length,o;if(E===0)o="Failed";else if(E===1)H=K,K=void 0;else{if(s===!1){s=!0;var t=process.emitWarning?process.emitWarning:console.warn.bind(console);t("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}if(E===2)T="!="}if(H instanceof Error)throw H;var Z0={actual:K,expected:w,operator:T===void 0?"fail":T,stackStartFn:P||V0};if(H!==void 0)Z0.message=H;var D0=new b(Z0);if(o)D0.message=o,D0.generatedMessage=!0;throw D0}i.fail=V0,i.AssertionError=b;function F0(K,w,H,T){if(!H){var P=!1;if(w===0)P=!0,T="No value argument passed to `assert.ok()`";else if(T instanceof Error)throw T;var E=new b({actual:H,expected:!0,message:T,operator:"==",stackStartFn:K});throw E.generatedMessage=P,E}}function O0(){for(var K=arguments.length,w=Array(K),H=0;H<K;H++)w[H]=arguments[H];F0.apply(void 0,[O0,w.length].concat(w))}i.ok=O0,i.equal=function K(w,H,T){if(arguments.length<2)throw new R("actual","expected");if(w!=H)l({actual:w,expected:H,message:T,operator:"==",stackStartFn:K})},i.notEqual=function K(w,H,T){if(arguments.length<2)throw new R("actual","expected");if(w==H)l({actual:w,expected:H,message:T,operator:"!=",stackStartFn:K})},i.deepEqual=function K(w,H,T){if(arguments.length<2)throw new R("actual","expected");if(A===void 0)m();if(!A(w,H))l({actual:w,expected:H,message:T,operator:"deepEqual",stackStartFn:K})},i.notDeepEqual=function K(w,H,T){if(arguments.length<2)throw new R("actual","expected");if(A===void 0)m();if(A(w,H))l({actual:w,expected:H,message:T,operator:"notDeepEqual",stackStartFn:K})},i.deepStrictEqual=function K(w,H,T){if(arguments.length<2)throw new R("actual","expected");if(A===void 0)m();if(!N(w,H))l({actual:w,expected:H,message:T,operator:"deepStrictEqual",stackStartFn:K})},i.notDeepStrictEqual=W0;function W0(K,w,H){if(arguments.length<2)throw new R("actual","expected");if(A===void 0)m();if(N(K,w))l({actual:K,expected:w,message:H,operator:"notDeepStrictEqual",stackStartFn:W0})}i.strictEqual=function K(w,H,T){if(arguments.length<2)throw new R("actual","expected");if(!e(w,H))l({actual:w,expected:H,message:T,operator:"strictEqual",stackStartFn:K})},i.notStrictEqual=function K(w,H,T){if(arguments.length<2)throw new R("actual","expected");if(e(w,H))l({actual:w,expected:H,message:T,operator:"notStrictEqual",stackStartFn:K})};var C0=J(function K(w,H,T){var P=this;W(this,K),H.forEach(function(E){if(E in w)if(T!==void 0&&typeof T[E]==="string"&&S(w[E])&&C(w[E],T[E]))P[E]=T[E];else P[E]=w[E]})});function w0(K,w,H,T,P,E){if(!(H in K)||!N(K[H],w[H])){if(!T){var o=new C0(K,P),t=new C0(w,P,K),Z0=new b({actual:o,expected:t,operator:"deepStrictEqual",stackStartFn:E});throw Z0.actual=K,Z0.expected=w,Z0.operator=E.name,Z0}l({actual:K,expected:w,message:T,operator:E.name,stackStartFn:E})}}function F(K,w,H,T){if(typeof w!=="function"){if(S(w))return C(w,K);if(arguments.length===2)throw new D("expected",["Function","RegExp"],w);if(Z(K)!=="object"||K===null){var P=new b({actual:K,expected:w,message:H,operator:"deepStrictEqual",stackStartFn:T});throw P.operator=T.name,P}var E=Object.keys(w);if(w instanceof Error)E.push("name","message");else if(E.length===0)throw new O("error",w,"may not be an empty object");if(A===void 0)m();return E.forEach(function(o){if(typeof K[o]==="string"&&S(w[o])&&C(w[o],K[o]))return;w0(K,w,o,H,E,T)}),!0}if(w.prototype!==void 0&&K instanceof w)return!0;if(Error.isPrototypeOf(w))return!1;return w.call({},K)===!0}function U(K){if(typeof K!=="function")throw new D("fn","Function",K);try{K()}catch(w){return w}return $0}function L(K){return k(K)||K!==null&&Z(K)==="object"&&typeof K.then==="function"&&typeof K.catch==="function"}function I(K){return Promise.resolve().then(function(){var w;if(typeof K==="function"){if(w=K(),!L(w))throw new q("instance of Promise","promiseFn",w)}else if(L(K))w=K;else throw new D("promiseFn",["Function","Promise"],K);return Promise.resolve().then(function(){return w}).then(function(){return $0}).catch(function(H){return H})})}function y(K,w,H,T){if(typeof H==="string"){if(arguments.length===4)throw new D("error",["Object","Error","Function","RegExp"],H);if(Z(w)==="object"&&w!==null){if(w.message===H)throw new B("error/message",'The error message "'.concat(w.message,'" is identical to the message.'))}else if(w===H)throw new B("error/message",'The error "'.concat(w,'" is identical to the message.'));T=H,H=void 0}else if(H!=null&&Z(H)!=="object"&&typeof H!=="function")throw new D("error",["Object","Error","Function","RegExp"],H);if(w===$0){var P="";if(H&&H.name)P+=" (".concat(H.name,")");P+=T?": ".concat(T):".";var E=K.name==="rejects"?"rejection":"exception";l({actual:void 0,expected:H,operator:K.name,message:"Missing expected ".concat(E).concat(P),stackStartFn:K})}if(H&&!F(w,H,T,K))throw w}function h(K,w,H,T){if(w===$0)return;if(typeof H==="string")T=H,H=void 0;if(!H||F(w,H)){var P=T?": ".concat(T):".",E=K.name==="doesNotReject"?"rejection":"exception";l({actual:w,expected:H,operator:K.name,message:"Got unwanted ".concat(E).concat(P,`
|
|
72
|
-
`)+'Actual message: "'.concat(
|
|
71
|
+
*/function F(G,M){if(G===M)return 0;var g=G.length,l=M.length;for(var p=0,f0=Math.min(g,l);p<f0;++p)if(G[p]!==M[p]){g=G[p],l=M[p];break}if(g<l)return-1;if(l<g)return 1;return 0}var U=void 0,L=!0,I=!1,y=0,h=1,d=2,c=3;function K(G,M){return V?G.source===M.source&&G.flags===M.flags:RegExp.prototype.toString.call(G)===RegExp.prototype.toString.call(M)}function B(G,M){if(G.byteLength!==M.byteLength)return!1;for(var g=0;g<G.byteLength;g++)if(G[g]!==M[g])return!1;return!0}function H(G,M){if(G.byteLength!==M.byteLength)return!1;return F(new Uint8Array(G.buffer,G.byteOffset,G.byteLength),new Uint8Array(M.buffer,M.byteOffset,M.byteLength))===0}function T(G,M){return G.byteLength===M.byteLength&&F(new Uint8Array(G),new Uint8Array(M))===0}function P(G,M){if(i(G))return i(M)&&O(Number.prototype.valueOf.call(G),Number.prototype.valueOf.call(M));if($0(G))return $0(M)&&String.prototype.valueOf.call(G)===String.prototype.valueOf.call(M);if(n(G))return n(M)&&Boolean.prototype.valueOf.call(G)===Boolean.prototype.valueOf.call(M);if(V0(G))return V0(M)&&BigInt.prototype.valueOf.call(G)===BigInt.prototype.valueOf.call(M);return F0(M)&&Symbol.prototype.valueOf.call(G)===Symbol.prototype.valueOf.call(M)}function E(G,M,g,l){if(G===M){if(G!==0)return!0;return g?O(G,M):!0}if(g){if(Y(G)!=="object")return typeof G==="number"&&R(G)&&R(M);if(Y(M)!=="object"||G===null||M===null)return!1;if(Object.getPrototypeOf(G)!==Object.getPrototypeOf(M))return!1}else{if(G===null||Y(G)!=="object"){if(M===null||Y(M)!=="object")return G==M;return!1}if(M===null||Y(M)!=="object")return!1}var p=u(G),f0=u(M);if(p!==f0)return!1;if(Array.isArray(G)){if(G.length!==M.length)return!1;var a=w0(G,U),z0=w0(M,U);if(a.length!==z0.length)return!1;return t(G,M,g,l,h,a)}if(p==="[object Object]"){if(!C(G)&&C(M)||!N(G)&&N(M))return!1}if(e(G)){if(!e(M)||Date.prototype.getTime.call(G)!==Date.prototype.getTime.call(M))return!1}else if(A(G)){if(!A(M)||!K(G,M))return!1}else if(m(G)||G instanceof Error){if(G.message!==M.message||G.name!==M.name)return!1}else if(r(G)){if(!g&&(O0(G)||W0(G))){if(!B(G,M))return!1}else if(!H(G,M))return!1;var J0=w0(G,U),L0=w0(M,U);if(J0.length!==L0.length)return!1;return t(G,M,g,l,y,J0)}else if(N(G)){if(!N(M)||G.size!==M.size)return!1;return t(G,M,g,l,d)}else if(C(G)){if(!C(M)||G.size!==M.size)return!1;return t(G,M,g,l,c)}else if(S(G)){if(!T(G,M))return!1}else if(s(G)&&!P(G,M))return!1;return t(G,M,g,l,y)}function o(G,M){return M.filter(function(g){return _(G,g)})}function t(G,M,g,l,p,f0){if(arguments.length===5){f0=Object.keys(G);var a=Object.keys(M);if(f0.length!==a.length)return!1}var z0=0;for(;z0<f0.length;z0++)if(!v(M,f0[z0]))return!1;if(g&&arguments.length===5){var J0=q(G);if(J0.length!==0){var L0=0;for(z0=0;z0<J0.length;z0++){var q0=J0[z0];if(_(G,q0)){if(!_(M,q0))return!1;f0.push(q0),L0++}else if(_(M,q0))return!1}var J1=q(M);if(J0.length!==J1.length&&o(M,J1).length!==L0)return!1}else{var n0=q(M);if(n0.length!==0&&o(M,n0).length!==0)return!1}}if(f0.length===0&&(p===y||p===h&&G.length===0||G.size===0))return!0;if(l===void 0)l={val1:new Map,val2:new Map,position:0};else{var Q1=l.val1.get(G);if(Q1!==void 0){var _0=l.val2.get(M);if(_0!==void 0)return Q1===_0}l.position++}l.val1.set(G,l.position),l.val2.set(M,l.position);var X1=R0(G,M,g,f0,l,p);return l.val1.delete(G),l.val2.delete(M),X1}function Z0(G,M,g,l){var p=w(G);for(var f0=0;f0<p.length;f0++){var a=p[f0];if(E(M,a,g,l))return G.delete(a),!0}return!1}function D0(G){switch(Y(G)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":G=+G;case"number":if(R(G))return!1}return!0}function j(G,M,g){var l=D0(g);if(l!=null)return l;return M.has(l)&&!G.has(l)}function G0(G,M,g,l,p){var f0=D0(g);if(f0!=null)return f0;var a=M.get(f0);if(a===void 0&&!M.has(f0)||!E(l,a,!1,p))return!1;return!G.has(f0)&&E(l,a,!1,p)}function P0(G,M,g,l){var p=null,f0=w(G);for(var a=0;a<f0.length;a++){var z0=f0[a];if(Y(z0)==="object"&&z0!==null){if(p===null)p=new Set;p.add(z0)}else if(!M.has(z0)){if(g)return!1;if(!j(G,M,z0))return!1;if(p===null)p=new Set;p.add(z0)}}if(p!==null){var J0=w(M);for(var L0=0;L0<J0.length;L0++){var q0=J0[L0];if(Y(q0)==="object"&&q0!==null){if(!Z0(p,q0,g,l))return!1}else if(!g&&!G.has(q0)&&!Z0(p,q0,g,l))return!1}return p.size===0}return!0}function A0(G,M,g,l,p,f0){var a=w(G);for(var z0=0;z0<a.length;z0++){var J0=a[z0];if(E(g,J0,p,f0)&&E(l,M.get(J0),p,f0))return G.delete(J0),!0}return!1}function K0(G,M,g,l){var p=null,f0=D(G);for(var a=0;a<f0.length;a++){var z0=Z(f0[a],2),J0=z0[0],L0=z0[1];if(Y(J0)==="object"&&J0!==null){if(p===null)p=new Set;p.add(J0)}else{var q0=M.get(J0);if(q0===void 0&&!M.has(J0)||!E(L0,q0,g,l)){if(g)return!1;if(!G0(G,M,J0,L0,l))return!1;if(p===null)p=new Set;p.add(J0)}}}if(p!==null){var J1=D(M);for(var n0=0;n0<J1.length;n0++){var Q1=Z(J1[n0],2),_0=Q1[0],X1=Q1[1];if(Y(_0)==="object"&&_0!==null){if(!A0(p,G,_0,X1,g,l))return!1}else if(!g&&(!G.has(_0)||!E(G.get(_0),X1,!1,l))&&!A0(p,G,_0,X1,!1,l))return!1}return p.size===0}return!0}function R0(G,M,g,l,p,f0){var a=0;if(f0===d){if(!P0(G,M,g,p))return!1}else if(f0===c){if(!K0(G,M,g,p))return!1}else if(f0===h)for(;a<G.length;a++)if(v(G,a)){if(!v(M,a)||!E(G[a],M[a],g,p))return!1}else if(v(M,a))return!1;else{var z0=Object.keys(G);for(;a<z0.length;a++){var J0=z0[a];if(!v(M,J0)||!E(G[J0],M[J0],g,p))return!1}if(z0.length!==Object.keys(M).length)return!1;return!0}for(a=0;a<l.length;a++){var L0=l[a];if(!E(G[L0],M[L0],g,p))return!1}return!0}function j0(G,M){return E(G,M,I)}function z1(G,M){return E(G,M,L)}$.exports={isDeepEqual:j0,isDeepStrictEqual:z1}}),Qf=x((f,$)=>{function Z(K){return Z=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(B){return typeof B}:function(B){return B&&typeof Symbol=="function"&&B.constructor===Symbol&&B!==Symbol.prototype?"symbol":typeof B},Z(K)}function z(K,B){for(var H=0;H<B.length;H++){var T=B[H];if(T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T)T.writable=!0;Object.defineProperty(K,Q(T.key),T)}}function J(K,B,H){if(B)z(K.prototype,B);if(H)z(K,H);return Object.defineProperty(K,"prototype",{writable:!1}),K}function Q(K){var B=X(K,"string");return Z(B)==="symbol"?B:String(B)}function X(K,B){if(Z(K)!=="object"||K===null)return K;var H=K[Symbol.toPrimitive];if(H!==void 0){var T=H.call(K,B||"default");if(Z(T)!=="object")return T;throw TypeError("@@toPrimitive must return a primitive value.")}return(B==="string"?String:Number)(K)}function W(K,B){if(!(K instanceof B))throw TypeError("Cannot call a class as a function")}var Y=O$(),V=Y.codes,w=V.ERR_AMBIGUOUS_ARGUMENT,D=V.ERR_INVALID_ARG_TYPE,O=V.ERR_INVALID_ARG_VALUE,q=V.ERR_INVALID_RETURN_VALUE,R=V.ERR_MISSING_ARGS,b=R9(),v=F1(),_=v.inspect,u=F1().types,k=u.isPromise,S=u.isRegExp,r=S9()(),e=Bf()(),C=P9()("RegExp.prototype.test"),A,N;function m(){var K=x9();A=K.isDeepEqual,N=K.isDeepStrictEqual}var s=!1,i=$.exports=O0,$0={};function n(K){if(K.message instanceof Error)throw K.message;throw new b(K)}function V0(K,B,H,T,P){var E=arguments.length,o;if(E===0)o="Failed";else if(E===1)H=K,K=void 0;else{if(s===!1){s=!0;var t=process.emitWarning?process.emitWarning:console.warn.bind(console);t("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}if(E===2)T="!="}if(H instanceof Error)throw H;var Z0={actual:K,expected:B,operator:T===void 0?"fail":T,stackStartFn:P||V0};if(H!==void 0)Z0.message=H;var D0=new b(Z0);if(o)D0.message=o,D0.generatedMessage=!0;throw D0}i.fail=V0,i.AssertionError=b;function F0(K,B,H,T){if(!H){var P=!1;if(B===0)P=!0,T="No value argument passed to `assert.ok()`";else if(T instanceof Error)throw T;var E=new b({actual:H,expected:!0,message:T,operator:"==",stackStartFn:K});throw E.generatedMessage=P,E}}function O0(){for(var K=arguments.length,B=Array(K),H=0;H<K;H++)B[H]=arguments[H];F0.apply(void 0,[O0,B.length].concat(B))}i.ok=O0,i.equal=function K(B,H,T){if(arguments.length<2)throw new R("actual","expected");if(B!=H)n({actual:B,expected:H,message:T,operator:"==",stackStartFn:K})},i.notEqual=function K(B,H,T){if(arguments.length<2)throw new R("actual","expected");if(B==H)n({actual:B,expected:H,message:T,operator:"!=",stackStartFn:K})},i.deepEqual=function K(B,H,T){if(arguments.length<2)throw new R("actual","expected");if(A===void 0)m();if(!A(B,H))n({actual:B,expected:H,message:T,operator:"deepEqual",stackStartFn:K})},i.notDeepEqual=function K(B,H,T){if(arguments.length<2)throw new R("actual","expected");if(A===void 0)m();if(A(B,H))n({actual:B,expected:H,message:T,operator:"notDeepEqual",stackStartFn:K})},i.deepStrictEqual=function K(B,H,T){if(arguments.length<2)throw new R("actual","expected");if(A===void 0)m();if(!N(B,H))n({actual:B,expected:H,message:T,operator:"deepStrictEqual",stackStartFn:K})},i.notDeepStrictEqual=W0;function W0(K,B,H){if(arguments.length<2)throw new R("actual","expected");if(A===void 0)m();if(N(K,B))n({actual:K,expected:B,message:H,operator:"notDeepStrictEqual",stackStartFn:W0})}i.strictEqual=function K(B,H,T){if(arguments.length<2)throw new R("actual","expected");if(!e(B,H))n({actual:B,expected:H,message:T,operator:"strictEqual",stackStartFn:K})},i.notStrictEqual=function K(B,H,T){if(arguments.length<2)throw new R("actual","expected");if(e(B,H))n({actual:B,expected:H,message:T,operator:"notStrictEqual",stackStartFn:K})};var C0=J(function K(B,H,T){var P=this;W(this,K),H.forEach(function(E){if(E in B)if(T!==void 0&&typeof T[E]==="string"&&S(B[E])&&C(B[E],T[E]))P[E]=T[E];else P[E]=B[E]})});function w0(K,B,H,T,P,E){if(!(H in K)||!N(K[H],B[H])){if(!T){var o=new C0(K,P),t=new C0(B,P,K),Z0=new b({actual:o,expected:t,operator:"deepStrictEqual",stackStartFn:E});throw Z0.actual=K,Z0.expected=B,Z0.operator=E.name,Z0}n({actual:K,expected:B,message:T,operator:E.name,stackStartFn:E})}}function F(K,B,H,T){if(typeof B!=="function"){if(S(B))return C(B,K);if(arguments.length===2)throw new D("expected",["Function","RegExp"],B);if(Z(K)!=="object"||K===null){var P=new b({actual:K,expected:B,message:H,operator:"deepStrictEqual",stackStartFn:T});throw P.operator=T.name,P}var E=Object.keys(B);if(B instanceof Error)E.push("name","message");else if(E.length===0)throw new O("error",B,"may not be an empty object");if(A===void 0)m();return E.forEach(function(o){if(typeof K[o]==="string"&&S(B[o])&&C(B[o],K[o]))return;w0(K,B,o,H,E,T)}),!0}if(B.prototype!==void 0&&K instanceof B)return!0;if(Error.isPrototypeOf(B))return!1;return B.call({},K)===!0}function U(K){if(typeof K!=="function")throw new D("fn","Function",K);try{K()}catch(B){return B}return $0}function L(K){return k(K)||K!==null&&Z(K)==="object"&&typeof K.then==="function"&&typeof K.catch==="function"}function I(K){return Promise.resolve().then(function(){var B;if(typeof K==="function"){if(B=K(),!L(B))throw new q("instance of Promise","promiseFn",B)}else if(L(K))B=K;else throw new D("promiseFn",["Function","Promise"],K);return Promise.resolve().then(function(){return B}).then(function(){return $0}).catch(function(H){return H})})}function y(K,B,H,T){if(typeof H==="string"){if(arguments.length===4)throw new D("error",["Object","Error","Function","RegExp"],H);if(Z(B)==="object"&&B!==null){if(B.message===H)throw new w("error/message",'The error message "'.concat(B.message,'" is identical to the message.'))}else if(B===H)throw new w("error/message",'The error "'.concat(B,'" is identical to the message.'));T=H,H=void 0}else if(H!=null&&Z(H)!=="object"&&typeof H!=="function")throw new D("error",["Object","Error","Function","RegExp"],H);if(B===$0){var P="";if(H&&H.name)P+=" (".concat(H.name,")");P+=T?": ".concat(T):".";var E=K.name==="rejects"?"rejection":"exception";n({actual:void 0,expected:H,operator:K.name,message:"Missing expected ".concat(E).concat(P),stackStartFn:K})}if(H&&!F(B,H,T,K))throw B}function h(K,B,H,T){if(B===$0)return;if(typeof H==="string")T=H,H=void 0;if(!H||F(B,H)){var P=T?": ".concat(T):".",E=K.name==="doesNotReject"?"rejection":"exception";n({actual:B,expected:H,operator:K.name,message:"Got unwanted ".concat(E).concat(P,`
|
|
72
|
+
`)+'Actual message: "'.concat(B&&B.message,'"'),stackStartFn:K})}throw B}i.throws=function K(B){for(var H=arguments.length,T=Array(H>1?H-1:0),P=1;P<H;P++)T[P-1]=arguments[P];y.apply(void 0,[K,U(B)].concat(T))},i.rejects=function K(B){for(var H=arguments.length,T=Array(H>1?H-1:0),P=1;P<H;P++)T[P-1]=arguments[P];return I(B).then(function(E){return y.apply(void 0,[K,E].concat(T))})},i.doesNotThrow=function K(B){for(var H=arguments.length,T=Array(H>1?H-1:0),P=1;P<H;P++)T[P-1]=arguments[P];h.apply(void 0,[K,U(B)].concat(T))},i.doesNotReject=function K(B){for(var H=arguments.length,T=Array(H>1?H-1:0),P=1;P<H;P++)T[P-1]=arguments[P];return I(B).then(function(E){return h.apply(void 0,[K,E].concat(T))})},i.ifError=function K(B){if(B!==null&&B!==void 0){var H="ifError got unwanted exception: ";if(Z(B)==="object"&&typeof B.message==="string")if(B.message.length===0&&B.constructor)H+=B.constructor.name;else H+=B.message;else H+=_(B);var T=new b({actual:B,expected:null,operator:"ifError",message:H,stackStartFn:K}),P=B.stack;if(typeof P==="string"){var E=P.split(`
|
|
73
73
|
`);E.shift();var o=T.stack.split(`
|
|
74
74
|
`);for(var t=0;t<E.length;t++){var Z0=o.indexOf(E[t]);if(Z0!==-1){o=o.slice(0,Z0);break}}T.stack="".concat(o.join(`
|
|
75
75
|
`),`
|
|
76
76
|
`).concat(E.join(`
|
|
77
|
-
`))}throw T}};function d(K,
|
|
77
|
+
`))}throw T}};function d(K,B,H,T,P){if(!S(B))throw new D("regexp","RegExp",B);var E=P==="match";if(typeof K!=="string"||C(B,K)!==E){if(H instanceof Error)throw H;var o=!H;H=H||(typeof K!=="string"?'The "string" argument must be of type string. Received type '+"".concat(Z(K)," (").concat(_(K),")"):(E?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(_(B),`. Input:
|
|
78
78
|
|
|
79
79
|
`).concat(_(K),`
|
|
80
|
-
`));var t=new b({actual:K,expected:w,message:H,operator:P,stackStartFn:T});throw t.generatedMessage=o,t}}i.match=function K(w,H,T){d(w,H,T,K,"match")},i.doesNotMatch=function K(w,H,T){d(w,H,T,K,"doesNotMatch")};function c(){for(var K=arguments.length,w=Array(K),H=0;H<K;H++)w[H]=arguments[H];F0.apply(void 0,[c,w.length].concat(w))}i.strict=r(c,i,{equal:i.strictEqual,deepEqual:i.deepStrictEqual,notEqual:i.notStrictEqual,notDeepEqual:i.notDeepStrictEqual}),i.strict.strict=i.strict}),A$=l8(Qf(),1),{AssertionError:g9,CallTracker:k9,deepEqual:u9,deepStrictEqual:c9,doesNotMatch:y9,doesNotReject:h9,doesNotThrow:m9,equal:d9,fail:i9,ifError:l9,match:n9,notDeepEqual:p9,notDeepStrictEqual:o9,notEqual:s9,notStrictEqual:r9,ok:a9,rejects:t9,strict:e9,strictEqual:fz,throws:$z}=A$,Zz=A$});var R$=X0((gJ,C$)=>{var q$=12,zz=0,Hf=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,7,7,7,7,7,7,7,7,7,7,7,7,8,7,7,10,9,9,9,11,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,24,36,48,60,72,84,96,0,12,12,12,0,0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0,0,24,24,24,0,0,0,0,0,0,0,0,0,24,24,0,0,0,0,0,0,0,0,0,0,48,48,48,0,0,0,0,0,0,0,0,0,0,48,48,0,0,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,0,0,0,127,63,63,63,0,31,15,15,15,7,7,7];function Jz(f){var $=f.indexOf("%");if($===-1)return f;var Z=f.length,z="",J=0,Q=0,X=$,W=q$;while($>-1&&$<Z){var Y=j$(f[$+1],4),V=j$(f[$+2],0),B=Y|V,D=Hf[B];if(W=Hf[256+W+D],Q=Q<<6|B&Hf[364+D],W===q$)z+=f.slice(J,X),z+=Q<=65535?String.fromCharCode(Q):String.fromCharCode(55232+(Q>>10),56320+(Q&1023)),Q=0,J=$+3,$=X=f.indexOf("%",J);else if(W===zz)return null;else{if($+=3,$<Z&&f.charCodeAt($)===37)continue;return null}}return z+f.slice(J)}var Qz={"0":0,"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};function j$(f,$){var Z=Qz[f];return Z===void 0?255:Z<<$}C$.exports=Jz});var E$=X0((kJ,P$)=>{var N$=R$(),I$=/\+/g,S$=function(){};S$.prototype=Object.create(null);function Xz(f){let $=new S$;if(typeof f!=="string")return $;let Z=f.length,z="",J="",Q=-1,X=-1,W=!1,Y=!1,V=!1,B=!1,D=!1,O=0;for(let q=0;q<Z+1;q++)if(O=q!==Z?f.charCodeAt(q):38,O===38){if(D=X>Q,!D)X=q;if(z=f.slice(Q+1,X),D||z.length>0){if(V)z=z.replace(I$," ");if(W)z=N$(z)||z;if(D){if(J=f.slice(X+1,q),B)J=J.replace(I$," ");if(Y)J=N$(J)||J}let R=$[z];if(R===void 0)$[z]=J;else if(R.pop)R.push(J);else $[z]=[R,J]}J="",Q=q,X=q,W=!1,Y=!1,V=!1,B=!1}else if(O===61)if(X<=Q)X=q;else Y=!0;else if(O===43)if(X>Q)B=!0;else V=!0;else if(O===37)if(X>Q)Y=!0;else W=!0;return $}P$.exports=Xz});var _$=X0((uJ,b$)=>{var E0=Array.from({length:256},(f,$)=>"%"+(($<16?"0":"")+$.toString(16)).toUpperCase()),Wz=new Int8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,1,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,0]);function Yz(f){let $=f.length;if($===0)return"";let Z="",z=0,J=0;f:for(;J<$;J++){let Q=f.charCodeAt(J);while(Q<128){if(Wz[Q]!==1){if(z<J)Z+=f.slice(z,J);z=J+1,Z+=E0[Q]}if(++J===$)break f;Q=f.charCodeAt(J)}if(z<J)Z+=f.slice(z,J);if(Q<2048){z=J+1,Z+=E0[192|Q>>6]+E0[128|Q&63];continue}if(Q<55296||Q>=57344){z=J+1,Z+=E0[224|Q>>12]+E0[128|Q>>6&63]+E0[128|Q&63];continue}if(++J,J>=$)throw Error("URI malformed");let X=f.charCodeAt(J)&1023;z=J+1,Q=65536+((Q&1023)<<10|X),Z+=E0[240|Q>>18]+E0[128|Q>>12&63]+E0[128|Q>>6&63]+E0[128|Q&63]}if(z===0)return f;if(z<$)return Z+f.slice(z);return Z}b$.exports={encodeString:Yz}});var g$=X0((cJ,x$)=>{var{encodeString:Gf}=_$();function v$(f){let $=typeof f;if($==="string")return Gf(f);else if($==="bigint")return f.toString();else if($==="boolean")return f?"true":"false";else if($==="number"&&Number.isFinite(f))return f<1000000000000000000000?""+f:Gf(""+f);return""}function Fz(f){let $="";if(f===null||typeof f!=="object")return $;let Z="&",z=Object.keys(f),J=z.length,Q=0;for(let X=0;X<J;X++){let W=z[X],Y=f[W],V=Gf(W)+"=";if(X)$+=Z;if(Array.isArray(Y)){Q=Y.length;for(let B=0;B<Q;B++){if(B)$+=Z;$+=V,$+=v$(Y[B])}}else $+=V,$+=v$(Y)}return $}x$.exports=Fz});var y$=X0((yJ,B1)=>{var k$=E$(),u$=g$(),c$={parse:k$,stringify:u$};B1.exports=c$;B1.exports.default=c$;B1.exports.parse=k$;B1.exports.stringify=u$});var m$=X0((h$)=>{Object.defineProperty(h$,"__esModule",{value:!0})});var i$=X0((d$)=>{Object.defineProperty(d$,"__esModule",{value:!0});d$.types=void 0;var Uz;(function(f){f[f.ROOT=0]="ROOT",f[f.GROUP=1]="GROUP",f[f.POSITION=2]="POSITION",f[f.SET=3]="SET",f[f.RANGE=4]="RANGE",f[f.REPETITION=5]="REPETITION",f[f.REFERENCE=6]="REFERENCE",f[f.CHAR=7]="CHAR"})(Uz=d$.types||(d$.types={}))});var n$=X0((l$)=>{Object.defineProperty(l$,"__esModule",{value:!0})});var x0=X0((v0)=>{var Vz=v0&&v0.__createBinding||(Object.create?function(f,$,Z,z){if(z===void 0)z=Z;Object.defineProperty(f,z,{enumerable:!0,get:function(){return $[Z]}})}:function(f,$,Z,z){if(z===void 0)z=Z;f[z]=$[Z]}),Df=v0&&v0.__exportStar||function(f,$){for(var Z in f)if(Z!=="default"&&!Object.prototype.hasOwnProperty.call($,Z))Vz($,f,Z)};Object.defineProperty(v0,"__esModule",{value:!0});Df(m$(),v0);Df(i$(),v0);Df(n$(),v0)});var S1=X0((r$)=>{Object.defineProperty(r$,"__esModule",{value:!0});r$.anyChar=r$.notWhitespace=r$.whitespace=r$.notInts=r$.ints=r$.notWords=r$.words=void 0;var Q0=x0(),p$=()=>[{type:Q0.types.RANGE,from:48,to:57}],o$=()=>[{type:Q0.types.CHAR,value:95},{type:Q0.types.RANGE,from:97,to:122},{type:Q0.types.RANGE,from:65,to:90},{type:Q0.types.RANGE,from:48,to:57}],s$=()=>[{type:Q0.types.CHAR,value:9},{type:Q0.types.CHAR,value:10},{type:Q0.types.CHAR,value:11},{type:Q0.types.CHAR,value:12},{type:Q0.types.CHAR,value:13},{type:Q0.types.CHAR,value:32},{type:Q0.types.CHAR,value:160},{type:Q0.types.CHAR,value:5760},{type:Q0.types.RANGE,from:8192,to:8202},{type:Q0.types.CHAR,value:8232},{type:Q0.types.CHAR,value:8233},{type:Q0.types.CHAR,value:8239},{type:Q0.types.CHAR,value:8287},{type:Q0.types.CHAR,value:12288},{type:Q0.types.CHAR,value:65279}],wz=()=>[{type:Q0.types.CHAR,value:10},{type:Q0.types.CHAR,value:13},{type:Q0.types.CHAR,value:8232},{type:Q0.types.CHAR,value:8233}];r$.words=()=>({type:Q0.types.SET,set:o$(),not:!1});r$.notWords=()=>({type:Q0.types.SET,set:o$(),not:!0});r$.ints=()=>({type:Q0.types.SET,set:p$(),not:!1});r$.notInts=()=>({type:Q0.types.SET,set:p$(),not:!0});r$.whitespace=()=>({type:Q0.types.SET,set:s$(),not:!1});r$.notWhitespace=()=>({type:Q0.types.SET,set:s$(),not:!0});r$.anyChar=()=>({type:Q0.types.SET,set:wz(),not:!0})});var e$=X0((N0)=>{var Lz=N0&&N0.__createBinding||(Object.create?function(f,$,Z,z){if(z===void 0)z=Z;Object.defineProperty(f,z,{enumerable:!0,get:function(){return $[Z]}})}:function(f,$,Z,z){if(z===void 0)z=Z;f[z]=$[Z]}),Mz=N0&&N0.__setModuleDefault||(Object.create?function(f,$){Object.defineProperty(f,"default",{enumerable:!0,value:$})}:function(f,$){f.default=$}),Tz=N0&&N0.__importStar||function(f){if(f&&f.__esModule)return f;var $={};if(f!=null){for(var Z in f)if(Z!=="default"&&Object.prototype.hasOwnProperty.call(f,Z))Lz($,f,Z)}return Mz($,f),$};Object.defineProperty(N0,"__esModule",{value:!0});N0.tokenizeClass=N0.strToChars=void 0;var t$=x0(),s0=Tz(S1()),Az="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?";N0.strToChars=(f)=>{let $=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;return f.replace($,(Z,z,J,Q,X,W,Y)=>{if(J)return Z;let V=z?8:Q?parseInt(Q,16):X?parseInt(X,16):W?Az.indexOf(W):{0:0,t:9,n:10,v:11,f:12,r:13}[Y],B=String.fromCharCode(V);return/[[\]{}^$.|?*+()]/.test(B)?`\\${B}`:B})};N0.tokenizeClass=(f,$)=>{var Z,z,J,Q,X,W,Y;let V=[],B,D,O=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(((?:\\)])|(((?:\\)?([^\]])))))|(\])|(?:\\)?([^])/g;while((B=O.exec(f))!==null){let q=(Y=(W=(X=(Q=(J=(z=(Z=B[1]&&s0.words())!==null&&Z!==void 0?Z:B[2]&&s0.ints())!==null&&z!==void 0?z:B[3]&&s0.whitespace())!==null&&J!==void 0?J:B[4]&&s0.notWords())!==null&&Q!==void 0?Q:B[5]&&s0.notInts())!==null&&X!==void 0?X:B[6]&&s0.notWhitespace())!==null&&W!==void 0?W:B[7]&&{type:t$.types.RANGE,from:(B[8]||B[9]).charCodeAt(0),to:(D=B[10]).charCodeAt(D.length-1)})!==null&&Y!==void 0?Y:(D=B[16])&&{type:t$.types.CHAR,value:D.charCodeAt(0)};if(q)V.push(q);else return[V,O.lastIndex]}throw SyntaxError(`Invalid regular expression: /${$}/: Unterminated character class`)}});var Kf=X0((b0)=>{var qz=b0&&b0.__createBinding||(Object.create?function(f,$,Z,z){if(z===void 0)z=Z;Object.defineProperty(f,z,{enumerable:!0,get:function(){return $[Z]}})}:function(f,$,Z,z){if(z===void 0)z=Z;f[z]=$[Z]}),jz=b0&&b0.__setModuleDefault||(Object.create?function(f,$){Object.defineProperty(f,"default",{enumerable:!0,value:$})}:function(f,$){f.default=$}),ZZ=b0&&b0.__importStar||function(f){if(f&&f.__esModule)return f;var $={};if(f!=null){for(var Z in f)if(Z!=="default"&&Object.prototype.hasOwnProperty.call(f,Z))qz($,f,Z)}return jz($,f),$};Object.defineProperty(b0,"__esModule",{value:!0});b0.tokenizer=void 0;var fZ=ZZ(e$()),M0=x0(),c0=ZZ(S1()),Cz=/^[a-zA-Z_$]$/i,Rz=/^[a-zA-Z0-9_$]$/i,$Z=/\d/;b0.tokenizer=(f)=>{let $=0,Z,z={type:M0.types.ROOT,stack:[]},J=z,Q=z.stack,X=[],W=[],Y=0,V=(D)=>{throw SyntaxError(`Invalid regular expression: /${f}/: Nothing to repeat at column ${D-1}`)},B=fZ.strToChars(f);while($<B.length)switch(Z=B[$++]){case"\\":if($===B.length)throw SyntaxError(`Invalid regular expression: /${f}/: \\ at end of pattern`);switch(Z=B[$++]){case"b":Q.push({type:M0.types.POSITION,value:"b"});break;case"B":Q.push({type:M0.types.POSITION,value:"B"});break;case"w":Q.push(c0.words());break;case"W":Q.push(c0.notWords());break;case"d":Q.push(c0.ints());break;case"D":Q.push(c0.notInts());break;case"s":Q.push(c0.whitespace());break;case"S":Q.push(c0.notWhitespace());break;default:if($Z.test(Z)){let D=Z;while($<B.length&&$Z.test(B[$]))D+=B[$++];let O=parseInt(D,10),q={type:M0.types.REFERENCE,value:O};Q.push(q),W.push({reference:q,stack:Q,index:Q.length-1})}else Q.push({type:M0.types.CHAR,value:Z.charCodeAt(0)})}break;case"^":Q.push({type:M0.types.POSITION,value:"^"});break;case"$":Q.push({type:M0.types.POSITION,value:"$"});break;case"[":{let D;if(B[$]==="^")D=!0,$++;else D=!1;let O=fZ.tokenizeClass(B.slice($),f);$+=O[1],Q.push({type:M0.types.SET,set:O[0],not:D});break}case".":Q.push(c0.anyChar());break;case"(":{let D={type:M0.types.GROUP,stack:[],remember:!0};if(B[$]==="?")if(Z=B[$+1],$+=2,Z==="=")D.followedBy=!0,D.remember=!1;else if(Z==="!")D.notFollowedBy=!0,D.remember=!1;else if(Z==="<"){let O="";if(Cz.test(B[$]))O+=B[$],$++;else throw SyntaxError(`Invalid regular expression: /${f}/: Invalid capture group name, character '${B[$]}' after '<' at column ${$+1}`);while($<B.length&&Rz.test(B[$]))O+=B[$],$++;if(!O)throw SyntaxError(`Invalid regular expression: /${f}/: Invalid capture group name, character '${B[$]}' after '<' at column ${$+1}`);if(B[$]!==">")throw SyntaxError(`Invalid regular expression: /${f}/: Unclosed capture group name, expected '>', found '${B[$]}' at column ${$+1}`);D.name=O,$++}else if(Z===":")D.remember=!1;else throw SyntaxError(`Invalid regular expression: /${f}/: Invalid group, character '${Z}' after '?' at column ${$-1}`);else Y+=1;Q.push(D),X.push(J),J=D,Q=D.stack;break}case")":if(X.length===0)throw SyntaxError(`Invalid regular expression: /${f}/: Unmatched ) at column ${$-1}`);J=X.pop(),Q=J.options?J.options[J.options.length-1]:J.stack;break;case"|":{if(!J.options)J.options=[J.stack],delete J.stack;let D=[];J.options.push(D),Q=D;break}case"{":{let D=/^(\d+)(,(\d+)?)?\}/.exec(B.slice($)),O,q;if(D!==null){if(Q.length===0)V($);O=parseInt(D[1],10),q=D[2]?D[3]?parseInt(D[3],10):1/0:O,$+=D[0].length,Q.push({type:M0.types.REPETITION,min:O,max:q,value:Q.pop()})}else Q.push({type:M0.types.CHAR,value:123});break}case"?":if(Q.length===0)V($);Q.push({type:M0.types.REPETITION,min:0,max:1,value:Q.pop()});break;case"+":if(Q.length===0)V($);Q.push({type:M0.types.REPETITION,min:1,max:1/0,value:Q.pop()});break;case"*":if(Q.length===0)V($);Q.push({type:M0.types.REPETITION,min:0,max:1/0,value:Q.pop()});break;default:Q.push({type:M0.types.CHAR,value:Z.charCodeAt(0)})}if(X.length!==0)throw SyntaxError(`Invalid regular expression: /${f}/: Unterminated group`);return Nz(W,Y),z};function Nz(f,$){for(let Z of f.reverse())if($<Z.reference.value){Z.reference.type=M0.types.CHAR;let z=Z.reference.value.toString();if(Z.reference.value=parseInt(z,8),!/^[0-7]+$/.test(z)){let J=0;while(z[J]!=="8"&&z[J]!=="9")J+=1;if(J===0)Z.reference.value=z.charCodeAt(0),J+=1;else Z.reference.value=parseInt(z.slice(0,J),8);if(z.length>J){let Q=Z.stack.splice(Z.index+1);for(let X of z.slice(J))Z.stack.push({type:M0.types.CHAR,value:X.charCodeAt(0)});Z.stack.push(...Q)}}}}});var JZ=X0((T0)=>{var Iz=T0&&T0.__createBinding||(Object.create?function(f,$,Z,z){if(z===void 0)z=Z;Object.defineProperty(f,z,{enumerable:!0,get:function(){return $[Z]}})}:function(f,$,Z,z){if(z===void 0)z=Z;f[z]=$[Z]}),Sz=T0&&T0.__setModuleDefault||(Object.create?function(f,$){Object.defineProperty(f,"default",{enumerable:!0,value:$})}:function(f,$){f.default=$}),Pz=T0&&T0.__importStar||function(f){if(f&&f.__esModule)return f;var $={};if(f!=null){for(var Z in f)if(Z!=="default"&&Object.prototype.hasOwnProperty.call(f,Z))Iz($,f,Z)}return Sz($,f),$};Object.defineProperty(T0,"__esModule",{value:!0});T0.NOTANYCHAR=T0.WHITESPACE=T0.WORDS=T0.INTS=void 0;var P1=Pz(S1()),zZ=x0();function E1(f){let $={},Z=0;for(let z of f){if(z.type===zZ.types.CHAR)$[z.value]=!0;if(z.type===zZ.types.RANGE)$[`${z.from}-${z.to}`]=!0;Z+=1}return{lookup:()=>Object.assign({},$),len:Z}}T0.INTS=E1(P1.ints().set);T0.WORDS=E1(P1.words().set);T0.WHITESPACE=E1(P1.whitespace().set);T0.NOTANYCHAR=E1(P1.anyChar().set)});var XZ=X0((I0)=>{var Ez=I0&&I0.__createBinding||(Object.create?function(f,$,Z,z){if(z===void 0)z=Z;Object.defineProperty(f,z,{enumerable:!0,get:function(){return $[Z]}})}:function(f,$,Z,z){if(z===void 0)z=Z;f[z]=$[Z]}),bz=I0&&I0.__setModuleDefault||(Object.create?function(f,$){Object.defineProperty(f,"default",{enumerable:!0,value:$})}:function(f,$){f.default=$}),_z=I0&&I0.__importStar||function(f){if(f&&f.__esModule)return f;var $={};if(f!=null){for(var Z in f)if(Z!=="default"&&Object.prototype.hasOwnProperty.call(f,Z))Ez($,f,Z)}return bz($,f),$};Object.defineProperty(I0,"__esModule",{value:!0});I0.writeSetTokens=I0.setChar=void 0;var x1=x0(),b1=_z(JZ());function v1(f){return f===94?"\\^":f===92?"\\\\":f===93?"\\]":f===45?"\\-":String.fromCharCode(f)}I0.setChar=v1;function _1(f,{lookup:$,len:Z}){if(Z!==f.length)return!1;let z=$();for(let J of f){if(J.type===x1.types.SET)return!1;let Q=J.type===x1.types.CHAR?J.value:`${J.from}-${J.to}`;if(z[Q])z[Q]=!1;else return!1}return!0}function QZ(f,$=!1){if(_1(f.set,b1.INTS))return f.not?"\\D":"\\d";if(_1(f.set,b1.WORDS))return f.not?"\\W":"\\w";if(f.not&&_1(f.set,b1.NOTANYCHAR))return".";if(_1(f.set,b1.WHITESPACE))return f.not?"\\S":"\\s";let Z="";for(let J=0;J<f.set.length;J++){let Q=f.set[J];Z+=vz(Q)}let z=`${f.not?"^":""}${Z}`;return $?z:`[${z}]`}I0.writeSetTokens=QZ;function vz(f){if(f.type===x1.types.CHAR)return v1(f.value);else if(f.type===x1.types.RANGE)return`${v1(f.from)}-${v1(f.to)}`;return QZ(f,!0)}});var Mf=X0((FZ)=>{Object.defineProperty(FZ,"__esModule",{value:!0});FZ.reconstruct=void 0;var g0=x0(),Lf=XZ(),WZ=(f)=>f.map(FZ.reconstruct).join(""),YZ=(f)=>{if("options"in f)return f.options.map(WZ).join("|");else if("stack"in f)return WZ(f.stack);else throw Error("options or stack must be Root or Group token")};FZ.reconstruct=(f)=>{switch(f.type){case g0.types.ROOT:return YZ(f);case g0.types.CHAR:{let $=String.fromCharCode(f.value);return(/[[\\{}$^.|?*+()]/.test($)?"\\":"")+$}case g0.types.POSITION:if(f.value==="^"||f.value==="$")return f.value;else return`\\${f.value}`;case g0.types.REFERENCE:return`\\${f.value}`;case g0.types.SET:return Lf.writeSetTokens(f);case g0.types.GROUP:return`(${f.name?`?<${f.name}>`:f.remember?"":f.followedBy?"?=":f.notFollowedBy?"?!":"?:"}${YZ(f)})`;case g0.types.REPETITION:{let{min:$,max:Z}=f,z;if($===0&&Z===1)z="?";else if($===1&&Z===1/0)z="+";else if($===0&&Z===1/0)z="*";else if(Z===1/0)z=`{${$},}`;else if($===Z)z=`{${$}}`;else z=`{${$},${Z}}`;return`${FZ.reconstruct(f.value)}${z}`}case g0.types.RANGE:return`${Lf.setChar(f.from)}-${Lf.setChar(f.to)}`;default:throw Error(`Invalid token type ${f}`)}}});var wZ=X0((S0,k1)=>{var xz=S0&&S0.__createBinding||(Object.create?function(f,$,Z,z){if(z===void 0)z=Z;Object.defineProperty(f,z,{enumerable:!0,get:function(){return $[Z]}})}:function(f,$,Z,z){if(z===void 0)z=Z;f[z]=$[Z]}),Tf=S0&&S0.__exportStar||function(f,$){for(var Z in f)if(Z!=="default"&&!Object.prototype.hasOwnProperty.call($,Z))xz($,f,Z)};Object.defineProperty(S0,"__esModule",{value:!0});S0.types=void 0;var UZ=x0();Object.defineProperty(S0,"types",{enumerable:!0,get:function(){return UZ.types}});Tf(Kf(),S0);Tf(Mf(),S0);var VZ=Kf(),gz=Mf();Tf(x0(),S0);S0.default=VZ.tokenizer;k1.exports=VZ.tokenizer;k1.exports.types=UZ.types;k1.exports.reconstruct=gz.reconstruct});var HZ=X0((aJ,u1)=>{var BZ=wZ(),kz=BZ.types;function Af(f,$){if(!$)$={};let Z=$.limit===void 0?25:$.limit;if(uz(f))f=f.source;else if(typeof f!=="string")f=String(f);try{f=BZ(f)}catch{return!1}let z=0;return function J(Q,X){let W,Y,V;if(Q.type===kz.REPETITION){if(X++,z++,X>1)return!1;if(z>Z)return!1}if(Q.options){for(W=0,V=Q.options.length;W<V;W++)if(Y=J({stack:Q.options[W]},X),!Y)return!1}let B=Q.stack||Q.value?.stack;if(!B)return!0;for(W=0;W<B.length;W++)if(Y=J(B[W],X),!Y)return!1;return!0}(f,0)}function uz(f){return{}.toString.call(f)==="[object RegExp]"}u1.exports=Af;u1.exports.default=Af;u1.exports.safeRegex=Af});var qf=X0((tJ,GZ)=>{GZ.exports=function f($,Z){if($===Z)return!0;if($&&Z&&typeof $=="object"&&typeof Z=="object"){if($.constructor!==Z.constructor)return!1;var z,J,Q;if(Array.isArray($)){if(z=$.length,z!=Z.length)return!1;for(J=z;J--!==0;)if(!f($[J],Z[J]))return!1;return!0}if($.constructor===RegExp)return $.source===Z.source&&$.flags===Z.flags;if($.valueOf!==Object.prototype.valueOf)return $.valueOf()===Z.valueOf();if($.toString!==Object.prototype.toString)return $.toString()===Z.toString();if(Q=Object.keys($),z=Q.length,z!==Object.keys(Z).length)return!1;for(J=z;J--!==0;)if(!Object.prototype.hasOwnProperty.call(Z,Q[J]))return!1;for(J=z;J--!==0;){var X=Q[J];if(!f($[X],Z[X]))return!1}return!0}return $!==$&&Z!==Z}});var c1=X0((eJ,OZ)=>{OZ.exports={name:"__fmw_internal_strategy_merged_tree_http_method__",storage:function(){let f=new Map;return{get:($)=>{return f.get($)||null},set:($,Z)=>{f.set($,Z)}}},deriveConstraint:(f)=>f.method,mustMatchWhenDerived:!0}});var qZ=X0((f4,AZ)=>{var DZ=qf(),KZ=c1(),LZ=Symbol("treeData");function MZ(f,$=""){let Z="",z=Object.keys(f);for(let J=0;J<z.length;J++){let Q=z[J],X=f[Q],W=J===z.length-1,Y=W?"└── ":"├── ",V=W?" ":"│ ",D=(X[LZ]||"").replaceAll(`
|
|
80
|
+
`));var t=new b({actual:K,expected:B,message:H,operator:P,stackStartFn:T});throw t.generatedMessage=o,t}}i.match=function K(B,H,T){d(B,H,T,K,"match")},i.doesNotMatch=function K(B,H,T){d(B,H,T,K,"doesNotMatch")};function c(){for(var K=arguments.length,B=Array(K),H=0;H<K;H++)B[H]=arguments[H];F0.apply(void 0,[c,B.length].concat(B))}i.strict=r(c,i,{equal:i.strictEqual,deepEqual:i.deepStrictEqual,notEqual:i.notStrictEqual,notDeepEqual:i.notDeepStrictEqual}),i.strict.strict=i.strict}),A$=n8(Qf(),1),{AssertionError:g9,CallTracker:k9,deepEqual:u9,deepStrictEqual:c9,doesNotMatch:y9,doesNotReject:h9,doesNotThrow:m9,equal:d9,fail:i9,ifError:n9,match:l9,notDeepEqual:p9,notDeepStrictEqual:o9,notEqual:s9,notStrictEqual:r9,ok:a9,rejects:t9,strict:e9,strictEqual:fz,throws:$z}=A$,Zz=A$});var R$=X0((gJ,C$)=>{var q$=12,zz=0,Hf=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,7,7,7,7,7,7,7,7,7,7,7,7,8,7,7,10,9,9,9,11,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,24,36,48,60,72,84,96,0,12,12,12,0,0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0,0,24,24,24,0,0,0,0,0,0,0,0,0,24,24,0,0,0,0,0,0,0,0,0,0,48,48,48,0,0,0,0,0,0,0,0,0,0,48,48,0,0,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,0,0,0,127,63,63,63,0,31,15,15,15,7,7,7];function Jz(f){var $=f.indexOf("%");if($===-1)return f;var Z=f.length,z="",J=0,Q=0,X=$,W=q$;while($>-1&&$<Z){var Y=j$(f[$+1],4),V=j$(f[$+2],0),w=Y|V,D=Hf[w];if(W=Hf[256+W+D],Q=Q<<6|w&Hf[364+D],W===q$)z+=f.slice(J,X),z+=Q<=65535?String.fromCharCode(Q):String.fromCharCode(55232+(Q>>10),56320+(Q&1023)),Q=0,J=$+3,$=X=f.indexOf("%",J);else if(W===zz)return null;else{if($+=3,$<Z&&f.charCodeAt($)===37)continue;return null}}return z+f.slice(J)}var Qz={"0":0,"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};function j$(f,$){var Z=Qz[f];return Z===void 0?255:Z<<$}C$.exports=Jz});var E$=X0((kJ,P$)=>{var N$=R$(),I$=/\+/g,S$=function(){};S$.prototype=Object.create(null);function Xz(f){let $=new S$;if(typeof f!=="string")return $;let Z=f.length,z="",J="",Q=-1,X=-1,W=!1,Y=!1,V=!1,w=!1,D=!1,O=0;for(let q=0;q<Z+1;q++)if(O=q!==Z?f.charCodeAt(q):38,O===38){if(D=X>Q,!D)X=q;if(z=f.slice(Q+1,X),D||z.length>0){if(V)z=z.replace(I$," ");if(W)z=N$(z)||z;if(D){if(J=f.slice(X+1,q),w)J=J.replace(I$," ");if(Y)J=N$(J)||J}let R=$[z];if(R===void 0)$[z]=J;else if(R.pop)R.push(J);else $[z]=[R,J]}J="",Q=q,X=q,W=!1,Y=!1,V=!1,w=!1}else if(O===61)if(X<=Q)X=q;else Y=!0;else if(O===43)if(X>Q)w=!0;else V=!0;else if(O===37)if(X>Q)Y=!0;else W=!0;return $}P$.exports=Xz});var _$=X0((uJ,b$)=>{var E0=Array.from({length:256},(f,$)=>"%"+(($<16?"0":"")+$.toString(16)).toUpperCase()),Wz=new Int8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,1,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,0]);function Yz(f){let $=f.length;if($===0)return"";let Z="",z=0,J=0;f:for(;J<$;J++){let Q=f.charCodeAt(J);while(Q<128){if(Wz[Q]!==1){if(z<J)Z+=f.slice(z,J);z=J+1,Z+=E0[Q]}if(++J===$)break f;Q=f.charCodeAt(J)}if(z<J)Z+=f.slice(z,J);if(Q<2048){z=J+1,Z+=E0[192|Q>>6]+E0[128|Q&63];continue}if(Q<55296||Q>=57344){z=J+1,Z+=E0[224|Q>>12]+E0[128|Q>>6&63]+E0[128|Q&63];continue}if(++J,J>=$)throw Error("URI malformed");let X=f.charCodeAt(J)&1023;z=J+1,Q=65536+((Q&1023)<<10|X),Z+=E0[240|Q>>18]+E0[128|Q>>12&63]+E0[128|Q>>6&63]+E0[128|Q&63]}if(z===0)return f;if(z<$)return Z+f.slice(z);return Z}b$.exports={encodeString:Yz}});var g$=X0((cJ,x$)=>{var{encodeString:Gf}=_$();function v$(f){let $=typeof f;if($==="string")return Gf(f);else if($==="bigint")return f.toString();else if($==="boolean")return f?"true":"false";else if($==="number"&&Number.isFinite(f))return f<1000000000000000000000?""+f:Gf(""+f);return""}function Fz(f){let $="";if(f===null||typeof f!=="object")return $;let Z="&",z=Object.keys(f),J=z.length,Q=0;for(let X=0;X<J;X++){let W=z[X],Y=f[W],V=Gf(W)+"=";if(X)$+=Z;if(Array.isArray(Y)){Q=Y.length;for(let w=0;w<Q;w++){if(w)$+=Z;$+=V,$+=v$(Y[w])}}else $+=V,$+=v$(Y)}return $}x$.exports=Fz});var y$=X0((yJ,H1)=>{var k$=E$(),u$=g$(),c$={parse:k$,stringify:u$};H1.exports=c$;H1.exports.default=c$;H1.exports.parse=k$;H1.exports.stringify=u$});var m$=X0((h$)=>{Object.defineProperty(h$,"__esModule",{value:!0})});var i$=X0((d$)=>{Object.defineProperty(d$,"__esModule",{value:!0});d$.types=void 0;var Uz;(function(f){f[f.ROOT=0]="ROOT",f[f.GROUP=1]="GROUP",f[f.POSITION=2]="POSITION",f[f.SET=3]="SET",f[f.RANGE=4]="RANGE",f[f.REPETITION=5]="REPETITION",f[f.REFERENCE=6]="REFERENCE",f[f.CHAR=7]="CHAR"})(Uz=d$.types||(d$.types={}))});var l$=X0((n$)=>{Object.defineProperty(n$,"__esModule",{value:!0})});var x0=X0((v0)=>{var Vz=v0&&v0.__createBinding||(Object.create?function(f,$,Z,z){if(z===void 0)z=Z;Object.defineProperty(f,z,{enumerable:!0,get:function(){return $[Z]}})}:function(f,$,Z,z){if(z===void 0)z=Z;f[z]=$[Z]}),Df=v0&&v0.__exportStar||function(f,$){for(var Z in f)if(Z!=="default"&&!Object.prototype.hasOwnProperty.call($,Z))Vz($,f,Z)};Object.defineProperty(v0,"__esModule",{value:!0});Df(m$(),v0);Df(i$(),v0);Df(l$(),v0)});var P1=X0((r$)=>{Object.defineProperty(r$,"__esModule",{value:!0});r$.anyChar=r$.notWhitespace=r$.whitespace=r$.notInts=r$.ints=r$.notWords=r$.words=void 0;var Q0=x0(),p$=()=>[{type:Q0.types.RANGE,from:48,to:57}],o$=()=>[{type:Q0.types.CHAR,value:95},{type:Q0.types.RANGE,from:97,to:122},{type:Q0.types.RANGE,from:65,to:90},{type:Q0.types.RANGE,from:48,to:57}],s$=()=>[{type:Q0.types.CHAR,value:9},{type:Q0.types.CHAR,value:10},{type:Q0.types.CHAR,value:11},{type:Q0.types.CHAR,value:12},{type:Q0.types.CHAR,value:13},{type:Q0.types.CHAR,value:32},{type:Q0.types.CHAR,value:160},{type:Q0.types.CHAR,value:5760},{type:Q0.types.RANGE,from:8192,to:8202},{type:Q0.types.CHAR,value:8232},{type:Q0.types.CHAR,value:8233},{type:Q0.types.CHAR,value:8239},{type:Q0.types.CHAR,value:8287},{type:Q0.types.CHAR,value:12288},{type:Q0.types.CHAR,value:65279}],wz=()=>[{type:Q0.types.CHAR,value:10},{type:Q0.types.CHAR,value:13},{type:Q0.types.CHAR,value:8232},{type:Q0.types.CHAR,value:8233}];r$.words=()=>({type:Q0.types.SET,set:o$(),not:!1});r$.notWords=()=>({type:Q0.types.SET,set:o$(),not:!0});r$.ints=()=>({type:Q0.types.SET,set:p$(),not:!1});r$.notInts=()=>({type:Q0.types.SET,set:p$(),not:!0});r$.whitespace=()=>({type:Q0.types.SET,set:s$(),not:!1});r$.notWhitespace=()=>({type:Q0.types.SET,set:s$(),not:!0});r$.anyChar=()=>({type:Q0.types.SET,set:wz(),not:!0})});var e$=X0((N0)=>{var Lz=N0&&N0.__createBinding||(Object.create?function(f,$,Z,z){if(z===void 0)z=Z;Object.defineProperty(f,z,{enumerable:!0,get:function(){return $[Z]}})}:function(f,$,Z,z){if(z===void 0)z=Z;f[z]=$[Z]}),Mz=N0&&N0.__setModuleDefault||(Object.create?function(f,$){Object.defineProperty(f,"default",{enumerable:!0,value:$})}:function(f,$){f.default=$}),Tz=N0&&N0.__importStar||function(f){if(f&&f.__esModule)return f;var $={};if(f!=null){for(var Z in f)if(Z!=="default"&&Object.prototype.hasOwnProperty.call(f,Z))Lz($,f,Z)}return Mz($,f),$};Object.defineProperty(N0,"__esModule",{value:!0});N0.tokenizeClass=N0.strToChars=void 0;var t$=x0(),r0=Tz(P1()),Az="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?";N0.strToChars=(f)=>{let $=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;return f.replace($,(Z,z,J,Q,X,W,Y)=>{if(J)return Z;let V=z?8:Q?parseInt(Q,16):X?parseInt(X,16):W?Az.indexOf(W):{0:0,t:9,n:10,v:11,f:12,r:13}[Y],w=String.fromCharCode(V);return/[[\]{}^$.|?*+()]/.test(w)?`\\${w}`:w})};N0.tokenizeClass=(f,$)=>{var Z,z,J,Q,X,W,Y;let V=[],w,D,O=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(((?:\\)])|(((?:\\)?([^\]])))))|(\])|(?:\\)?([^])/g;while((w=O.exec(f))!==null){let q=(Y=(W=(X=(Q=(J=(z=(Z=w[1]&&r0.words())!==null&&Z!==void 0?Z:w[2]&&r0.ints())!==null&&z!==void 0?z:w[3]&&r0.whitespace())!==null&&J!==void 0?J:w[4]&&r0.notWords())!==null&&Q!==void 0?Q:w[5]&&r0.notInts())!==null&&X!==void 0?X:w[6]&&r0.notWhitespace())!==null&&W!==void 0?W:w[7]&&{type:t$.types.RANGE,from:(w[8]||w[9]).charCodeAt(0),to:(D=w[10]).charCodeAt(D.length-1)})!==null&&Y!==void 0?Y:(D=w[16])&&{type:t$.types.CHAR,value:D.charCodeAt(0)};if(q)V.push(q);else return[V,O.lastIndex]}throw SyntaxError(`Invalid regular expression: /${$}/: Unterminated character class`)}});var Kf=X0((b0)=>{var qz=b0&&b0.__createBinding||(Object.create?function(f,$,Z,z){if(z===void 0)z=Z;Object.defineProperty(f,z,{enumerable:!0,get:function(){return $[Z]}})}:function(f,$,Z,z){if(z===void 0)z=Z;f[z]=$[Z]}),jz=b0&&b0.__setModuleDefault||(Object.create?function(f,$){Object.defineProperty(f,"default",{enumerable:!0,value:$})}:function(f,$){f.default=$}),ZZ=b0&&b0.__importStar||function(f){if(f&&f.__esModule)return f;var $={};if(f!=null){for(var Z in f)if(Z!=="default"&&Object.prototype.hasOwnProperty.call(f,Z))qz($,f,Z)}return jz($,f),$};Object.defineProperty(b0,"__esModule",{value:!0});b0.tokenizer=void 0;var fZ=ZZ(e$()),M0=x0(),c0=ZZ(P1()),Cz=/^[a-zA-Z_$]$/i,Rz=/^[a-zA-Z0-9_$]$/i,$Z=/\d/;b0.tokenizer=(f)=>{let $=0,Z,z={type:M0.types.ROOT,stack:[]},J=z,Q=z.stack,X=[],W=[],Y=0,V=(D)=>{throw SyntaxError(`Invalid regular expression: /${f}/: Nothing to repeat at column ${D-1}`)},w=fZ.strToChars(f);while($<w.length)switch(Z=w[$++]){case"\\":if($===w.length)throw SyntaxError(`Invalid regular expression: /${f}/: \\ at end of pattern`);switch(Z=w[$++]){case"b":Q.push({type:M0.types.POSITION,value:"b"});break;case"B":Q.push({type:M0.types.POSITION,value:"B"});break;case"w":Q.push(c0.words());break;case"W":Q.push(c0.notWords());break;case"d":Q.push(c0.ints());break;case"D":Q.push(c0.notInts());break;case"s":Q.push(c0.whitespace());break;case"S":Q.push(c0.notWhitespace());break;default:if($Z.test(Z)){let D=Z;while($<w.length&&$Z.test(w[$]))D+=w[$++];let O=parseInt(D,10),q={type:M0.types.REFERENCE,value:O};Q.push(q),W.push({reference:q,stack:Q,index:Q.length-1})}else Q.push({type:M0.types.CHAR,value:Z.charCodeAt(0)})}break;case"^":Q.push({type:M0.types.POSITION,value:"^"});break;case"$":Q.push({type:M0.types.POSITION,value:"$"});break;case"[":{let D;if(w[$]==="^")D=!0,$++;else D=!1;let O=fZ.tokenizeClass(w.slice($),f);$+=O[1],Q.push({type:M0.types.SET,set:O[0],not:D});break}case".":Q.push(c0.anyChar());break;case"(":{let D={type:M0.types.GROUP,stack:[],remember:!0};if(w[$]==="?")if(Z=w[$+1],$+=2,Z==="=")D.followedBy=!0,D.remember=!1;else if(Z==="!")D.notFollowedBy=!0,D.remember=!1;else if(Z==="<"){let O="";if(Cz.test(w[$]))O+=w[$],$++;else throw SyntaxError(`Invalid regular expression: /${f}/: Invalid capture group name, character '${w[$]}' after '<' at column ${$+1}`);while($<w.length&&Rz.test(w[$]))O+=w[$],$++;if(!O)throw SyntaxError(`Invalid regular expression: /${f}/: Invalid capture group name, character '${w[$]}' after '<' at column ${$+1}`);if(w[$]!==">")throw SyntaxError(`Invalid regular expression: /${f}/: Unclosed capture group name, expected '>', found '${w[$]}' at column ${$+1}`);D.name=O,$++}else if(Z===":")D.remember=!1;else throw SyntaxError(`Invalid regular expression: /${f}/: Invalid group, character '${Z}' after '?' at column ${$-1}`);else Y+=1;Q.push(D),X.push(J),J=D,Q=D.stack;break}case")":if(X.length===0)throw SyntaxError(`Invalid regular expression: /${f}/: Unmatched ) at column ${$-1}`);J=X.pop(),Q=J.options?J.options[J.options.length-1]:J.stack;break;case"|":{if(!J.options)J.options=[J.stack],delete J.stack;let D=[];J.options.push(D),Q=D;break}case"{":{let D=/^(\d+)(,(\d+)?)?\}/.exec(w.slice($)),O,q;if(D!==null){if(Q.length===0)V($);O=parseInt(D[1],10),q=D[2]?D[3]?parseInt(D[3],10):1/0:O,$+=D[0].length,Q.push({type:M0.types.REPETITION,min:O,max:q,value:Q.pop()})}else Q.push({type:M0.types.CHAR,value:123});break}case"?":if(Q.length===0)V($);Q.push({type:M0.types.REPETITION,min:0,max:1,value:Q.pop()});break;case"+":if(Q.length===0)V($);Q.push({type:M0.types.REPETITION,min:1,max:1/0,value:Q.pop()});break;case"*":if(Q.length===0)V($);Q.push({type:M0.types.REPETITION,min:0,max:1/0,value:Q.pop()});break;default:Q.push({type:M0.types.CHAR,value:Z.charCodeAt(0)})}if(X.length!==0)throw SyntaxError(`Invalid regular expression: /${f}/: Unterminated group`);return Nz(W,Y),z};function Nz(f,$){for(let Z of f.reverse())if($<Z.reference.value){Z.reference.type=M0.types.CHAR;let z=Z.reference.value.toString();if(Z.reference.value=parseInt(z,8),!/^[0-7]+$/.test(z)){let J=0;while(z[J]!=="8"&&z[J]!=="9")J+=1;if(J===0)Z.reference.value=z.charCodeAt(0),J+=1;else Z.reference.value=parseInt(z.slice(0,J),8);if(z.length>J){let Q=Z.stack.splice(Z.index+1);for(let X of z.slice(J))Z.stack.push({type:M0.types.CHAR,value:X.charCodeAt(0)});Z.stack.push(...Q)}}}}});var JZ=X0((T0)=>{var Iz=T0&&T0.__createBinding||(Object.create?function(f,$,Z,z){if(z===void 0)z=Z;Object.defineProperty(f,z,{enumerable:!0,get:function(){return $[Z]}})}:function(f,$,Z,z){if(z===void 0)z=Z;f[z]=$[Z]}),Sz=T0&&T0.__setModuleDefault||(Object.create?function(f,$){Object.defineProperty(f,"default",{enumerable:!0,value:$})}:function(f,$){f.default=$}),Pz=T0&&T0.__importStar||function(f){if(f&&f.__esModule)return f;var $={};if(f!=null){for(var Z in f)if(Z!=="default"&&Object.prototype.hasOwnProperty.call(f,Z))Iz($,f,Z)}return Sz($,f),$};Object.defineProperty(T0,"__esModule",{value:!0});T0.NOTANYCHAR=T0.WHITESPACE=T0.WORDS=T0.INTS=void 0;var E1=Pz(P1()),zZ=x0();function b1(f){let $={},Z=0;for(let z of f){if(z.type===zZ.types.CHAR)$[z.value]=!0;if(z.type===zZ.types.RANGE)$[`${z.from}-${z.to}`]=!0;Z+=1}return{lookup:()=>Object.assign({},$),len:Z}}T0.INTS=b1(E1.ints().set);T0.WORDS=b1(E1.words().set);T0.WHITESPACE=b1(E1.whitespace().set);T0.NOTANYCHAR=b1(E1.anyChar().set)});var XZ=X0((I0)=>{var Ez=I0&&I0.__createBinding||(Object.create?function(f,$,Z,z){if(z===void 0)z=Z;Object.defineProperty(f,z,{enumerable:!0,get:function(){return $[Z]}})}:function(f,$,Z,z){if(z===void 0)z=Z;f[z]=$[Z]}),bz=I0&&I0.__setModuleDefault||(Object.create?function(f,$){Object.defineProperty(f,"default",{enumerable:!0,value:$})}:function(f,$){f.default=$}),_z=I0&&I0.__importStar||function(f){if(f&&f.__esModule)return f;var $={};if(f!=null){for(var Z in f)if(Z!=="default"&&Object.prototype.hasOwnProperty.call(f,Z))Ez($,f,Z)}return bz($,f),$};Object.defineProperty(I0,"__esModule",{value:!0});I0.writeSetTokens=I0.setChar=void 0;var g1=x0(),_1=_z(JZ());function x1(f){return f===94?"\\^":f===92?"\\\\":f===93?"\\]":f===45?"\\-":String.fromCharCode(f)}I0.setChar=x1;function v1(f,{lookup:$,len:Z}){if(Z!==f.length)return!1;let z=$();for(let J of f){if(J.type===g1.types.SET)return!1;let Q=J.type===g1.types.CHAR?J.value:`${J.from}-${J.to}`;if(z[Q])z[Q]=!1;else return!1}return!0}function QZ(f,$=!1){if(v1(f.set,_1.INTS))return f.not?"\\D":"\\d";if(v1(f.set,_1.WORDS))return f.not?"\\W":"\\w";if(f.not&&v1(f.set,_1.NOTANYCHAR))return".";if(v1(f.set,_1.WHITESPACE))return f.not?"\\S":"\\s";let Z="";for(let J=0;J<f.set.length;J++){let Q=f.set[J];Z+=vz(Q)}let z=`${f.not?"^":""}${Z}`;return $?z:`[${z}]`}I0.writeSetTokens=QZ;function vz(f){if(f.type===g1.types.CHAR)return x1(f.value);else if(f.type===g1.types.RANGE)return`${x1(f.from)}-${x1(f.to)}`;return QZ(f,!0)}});var Mf=X0((FZ)=>{Object.defineProperty(FZ,"__esModule",{value:!0});FZ.reconstruct=void 0;var g0=x0(),Lf=XZ(),WZ=(f)=>f.map(FZ.reconstruct).join(""),YZ=(f)=>{if("options"in f)return f.options.map(WZ).join("|");else if("stack"in f)return WZ(f.stack);else throw Error("options or stack must be Root or Group token")};FZ.reconstruct=(f)=>{switch(f.type){case g0.types.ROOT:return YZ(f);case g0.types.CHAR:{let $=String.fromCharCode(f.value);return(/[[\\{}$^.|?*+()]/.test($)?"\\":"")+$}case g0.types.POSITION:if(f.value==="^"||f.value==="$")return f.value;else return`\\${f.value}`;case g0.types.REFERENCE:return`\\${f.value}`;case g0.types.SET:return Lf.writeSetTokens(f);case g0.types.GROUP:return`(${f.name?`?<${f.name}>`:f.remember?"":f.followedBy?"?=":f.notFollowedBy?"?!":"?:"}${YZ(f)})`;case g0.types.REPETITION:{let{min:$,max:Z}=f,z;if($===0&&Z===1)z="?";else if($===1&&Z===1/0)z="+";else if($===0&&Z===1/0)z="*";else if(Z===1/0)z=`{${$},}`;else if($===Z)z=`{${$}}`;else z=`{${$},${Z}}`;return`${FZ.reconstruct(f.value)}${z}`}case g0.types.RANGE:return`${Lf.setChar(f.from)}-${Lf.setChar(f.to)}`;default:throw Error(`Invalid token type ${f}`)}}});var wZ=X0((S0,u1)=>{var xz=S0&&S0.__createBinding||(Object.create?function(f,$,Z,z){if(z===void 0)z=Z;Object.defineProperty(f,z,{enumerable:!0,get:function(){return $[Z]}})}:function(f,$,Z,z){if(z===void 0)z=Z;f[z]=$[Z]}),Tf=S0&&S0.__exportStar||function(f,$){for(var Z in f)if(Z!=="default"&&!Object.prototype.hasOwnProperty.call($,Z))xz($,f,Z)};Object.defineProperty(S0,"__esModule",{value:!0});S0.types=void 0;var UZ=x0();Object.defineProperty(S0,"types",{enumerable:!0,get:function(){return UZ.types}});Tf(Kf(),S0);Tf(Mf(),S0);var VZ=Kf(),gz=Mf();Tf(x0(),S0);S0.default=VZ.tokenizer;u1.exports=VZ.tokenizer;u1.exports.types=UZ.types;u1.exports.reconstruct=gz.reconstruct});var HZ=X0((aJ,c1)=>{var BZ=wZ(),kz=BZ.types;function Af(f,$){if(!$)$={};let Z=$.limit===void 0?25:$.limit;if(uz(f))f=f.source;else if(typeof f!=="string")f=String(f);try{f=BZ(f)}catch{return!1}let z=0;return function J(Q,X){let W,Y,V;if(Q.type===kz.REPETITION){if(X++,z++,X>1)return!1;if(z>Z)return!1}if(Q.options){for(W=0,V=Q.options.length;W<V;W++)if(Y=J({stack:Q.options[W]},X),!Y)return!1}let w=Q.stack||Q.value?.stack;if(!w)return!0;for(W=0;W<w.length;W++)if(Y=J(w[W],X),!Y)return!1;return!0}(f,0)}function uz(f){return{}.toString.call(f)==="[object RegExp]"}c1.exports=Af;c1.exports.default=Af;c1.exports.safeRegex=Af});var qf=X0((tJ,GZ)=>{GZ.exports=function f($,Z){if($===Z)return!0;if($&&Z&&typeof $=="object"&&typeof Z=="object"){if($.constructor!==Z.constructor)return!1;var z,J,Q;if(Array.isArray($)){if(z=$.length,z!=Z.length)return!1;for(J=z;J--!==0;)if(!f($[J],Z[J]))return!1;return!0}if($.constructor===RegExp)return $.source===Z.source&&$.flags===Z.flags;if($.valueOf!==Object.prototype.valueOf)return $.valueOf()===Z.valueOf();if($.toString!==Object.prototype.toString)return $.toString()===Z.toString();if(Q=Object.keys($),z=Q.length,z!==Object.keys(Z).length)return!1;for(J=z;J--!==0;)if(!Object.prototype.hasOwnProperty.call(Z,Q[J]))return!1;for(J=z;J--!==0;){var X=Q[J];if(!f($[X],Z[X]))return!1}return!0}return $!==$&&Z!==Z}});var y1=X0((eJ,OZ)=>{OZ.exports={name:"__fmw_internal_strategy_merged_tree_http_method__",storage:function(){let f=new Map;return{get:($)=>{return f.get($)||null},set:($,Z)=>{f.set($,Z)}}},deriveConstraint:(f)=>f.method,mustMatchWhenDerived:!0}});var qZ=X0((f4,AZ)=>{var DZ=qf(),KZ=y1(),LZ=Symbol("treeData");function MZ(f,$=""){let Z="",z=Object.keys(f);for(let J=0;J<z.length;J++){let Q=z[J],X=f[Q],W=J===z.length-1,Y=W?"└── ":"├── ",V=W?" ":"│ ",D=(X[LZ]||"").replaceAll(`
|
|
81
81
|
`,`
|
|
82
82
|
`+$+V);Z+=$+Y+Q+D+`
|
|
83
83
|
`,Z+=MZ(X,$+V)}return Z}function cz(f){let $=f.name||"";return $=$.replace("bound","").trim(),$=($||"anonymous")+"()",$}function TZ(f){if(Array.isArray(f))return f.map(($)=>TZ($));if(typeof f==="symbol")return f.toString();if(typeof f==="function")return cz(f);return f}function yz(f,$){if(!$.includeMeta)return{};let Z=$.buildPrettyMeta(f),z={},J=$.includeMeta;if(!Array.isArray(J))J=Reflect.ownKeys(Z);for(let Q of J){if(!Object.prototype.hasOwnProperty.call(Z,Q))continue;let X=Q.toString(),W=Z[Q];if(W!==void 0&&W!==null){let Y=JSON.stringify(TZ(W));z[X]=Y}}return z}function hz(f){let $="";for(let[Z,z]of Object.entries(f))$+=`
|
|
84
|
-
• (${Z}) ${z}`;return $}function mz(f){let $={...f.opts.constraints},Z=$[KZ.name];return delete $[KZ.name],{...f,method:Z,opts:{constraints:$}}}function dz(f){let $=` (${f.method})`,Z=f.opts.constraints||{};if(Object.keys(Z).length!==0)$+=" "+JSON.stringify(Z);return $+=hz(f.metaData),$}function iz(f){return f.reduce(($,Z)=>{for(let z of $)if(DZ(Z.opts.constraints,z.opts.constraints)&&DZ(Z.metaData,z.metaData))return z.method+=", "+Z.method,$;return $.push(Z),$},[])}function
|
|
85
|
-
${$}`)}function
|
|
84
|
+
• (${Z}) ${z}`;return $}function mz(f){let $={...f.opts.constraints},Z=$[KZ.name];return delete $[KZ.name],{...f,method:Z,opts:{constraints:$}}}function dz(f){let $=` (${f.method})`,Z=f.opts.constraints||{};if(Object.keys(Z).length!==0)$+=" "+JSON.stringify(Z);return $+=hz(f.metaData),$}function iz(f){return f.reduce(($,Z)=>{for(let z of $)if(DZ(Z.opts.constraints,z.opts.constraints)&&DZ(Z.metaData,z.metaData))return z.method+=", "+Z.method,$;return $.push(Z),$},[])}function nz(f,$,Z){let z=f.routes;if(Z.method===void 0)z=z.map(mz);if(z=z.map((J)=>{return J.metaData=yz(J,Z),J}),Z.method===void 0)z=iz(z);return z.map(dz).join(`
|
|
85
|
+
${$}`)}function h1(f,$,Z,z){if(f.isLeafNode||z.commonPrefix!==!1){if(Z=Z||"(empty root node)",$=$[Z]={},f.isLeafNode)$[LZ]=nz(f,Z,z);Z=""}if(f.staticChildren)for(let J of Object.values(f.staticChildren))h1(J,$,Z+J.prefix,z);if(f.parametricChildren)for(let J of Object.values(f.parametricChildren)){let Q=Array.from(J.nodePaths).join("|");h1(J,$,Z+Q,z)}if(f.wildcardChild)h1(f.wildcardChild,$,"*",z)}function lz(f,$){let Z={};return h1(f,Z,f.prefix,$),MZ(Z)}AZ.exports={prettyPrintTree:lz}});var RZ=X0(($4,CZ)=>{var jZ=function(){};jZ.prototype=Object.create(null);CZ.exports={NullObject:jZ}});var SZ=X0((Z4,IZ)=>{var{NullObject:pz}=RZ(),oz=y1();class NZ{constructor(){this.unconstrainedHandler=null,this.constraints=[],this.handlers=[],this.constrainedHandlerStores=null}getMatchingHandler(f){if(f===void 0)return this.unconstrainedHandler;return this._getHandlerMatchingConstraints(f)}addHandler(f,$){let Z=$.params,z=$.opts.constraints||{},J={params:Z,constraints:z,handler:$.handler,store:$.store||null,_createParamsObject:this._compileCreateParamsObject(Z)},Q=Object.keys(z);if(Q.length===0)this.unconstrainedHandler=J;for(let W of Q)if(!this.constraints.includes(W))if(W==="version")this.constraints.unshift(W);else this.constraints.push(W);let X=Q.includes(oz.name);if(!X&&this.handlers.length>=31)throw Error("find-my-way supports a maximum of 31 route handlers per node when there are constraints, limit reached");if(this.handlers.push(J),this.handlers.sort((W,Y)=>Object.keys(W.constraints).length-Object.keys(Y.constraints).length),!X)this._compileGetHandlerMatchingConstraints(f,z)}_compileCreateParamsObject(f){let $=[];$.push("const fn = function _createParamsObject (paramsArray) {"),$.push("const params = new NullObject()");for(let Z=0;Z<f.length;Z++)$.push(`params['${f[Z]}'] = paramsArray[${Z}]`);return $.push("return params"),$.push("}"),$.push("return fn"),Function("NullObject",$.join(`
|
|
86
86
|
`))(pz)}_getHandlerMatchingConstraints(){return null}_buildConstraintStore(f,$){for(let Z=0;Z<this.handlers.length;Z++){let J=this.handlers[Z].constraints[$];if(J!==void 0){let Q=f.get(J)||0;Q|=1<<Z,f.set(J,Q)}}}_constrainedIndexBitmask(f){let $=0;for(let Z=0;Z<this.handlers.length;Z++)if(this.handlers[Z].constraints[f]!==void 0)$|=1<<Z;return~$}_compileGetHandlerMatchingConstraints(f){this.constrainedHandlerStores={};for(let Z of this.constraints){let z=f.newStoreForConstraint(Z);this.constrainedHandlerStores[Z]=z,this._buildConstraintStore(z,Z)}let $=[];$.push(`
|
|
87
87
|
let candidates = ${(1<<this.handlers.length)-1}
|
|
88
88
|
let mask, matches
|
|
@@ -98,10 +98,10 @@ ${$}`)}function y1(f,$,Z,z){if(f.isLeafNode||z.commonPrefix!==!1){if(Z=Z||"(empt
|
|
|
98
98
|
}
|
|
99
99
|
if (candidates === 0) return null;
|
|
100
100
|
`)}for(let Z in f.strategies)if(f.strategies[Z].mustMatchWhenDerived&&!this.constraints.includes(Z))$.push(`if (derivedConstraints.${Z} !== undefined) return null`);$.push("return this.handlers[Math.floor(Math.log2(candidates))]"),this._getHandlerMatchingConstraints=Function("derivedConstraints",$.join(`
|
|
101
|
-
`))}}IZ.exports=NZ});var EZ=X0((z4,PZ)=>{var sz=SZ(),
|
|
102
|
-
`)).bind(this)}}kZ.exports=gZ});var yZ=X0((W4,cZ)=>{var $J=["ACL","BIND","CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LINK","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCALENDAR","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","QUERY","REBIND","REPORT","SEARCH","SOURCE","SUBSCRIBE","TRACE","UNBIND","UNLINK","UNLOCK","UNSUBSCRIBE"];cZ.exports=$J});var dZ=X0((Y4,mZ)=>{function hZ(f,$){if(f===50){if($===53)return"%";if($===51)return"#";if($===52)return"$";if($===54)return"&";if($===66)return"+";if($===98)return"+";if($===67)return",";if($===99)return",";if($===70)return"/";if($===102)return"/";return null}if(f===51){if($===65)return":";if($===97)return":";if($===66)return";";if($===98)return";";if($===68)return"=";if($===100)return"=";if($===70)return"?";if($===102)return"?";return null}if(f===52&&$===48)return"@";return null}function ZJ(f,$){let Z=!1,z=!1,J="";for(let X=1;X<f.length;X++){let W=f.charCodeAt(X);if(W===37){let Y=f.charCodeAt(X+1),V=f.charCodeAt(X+2);if(hZ(Y,V)===null)Z=!0;else{if(z=!0,Y===50&&V===53)Z=!0,f=f.slice(0,X+1)+"25"+f.slice(X+1),X+=2;X+=2}}else if(W===63||W===35||W===59&&$){J=f.slice(X+1),f=f.slice(0,X);break}}return{path:Z?decodeURI(f):f,querystring:J,shouldDecodeParam:z}}function zJ(f){let $=f.indexOf("%");if($===-1)return f;let Z="",z=$;for(let J=$;J<f.length;J++)if(f.charCodeAt(J)===37){let Q=f.charCodeAt(J+1),X=f.charCodeAt(J+2),W=hZ(Q,X);Z+=f.slice(z,J)+W,z=J+3}return f.slice(0,$)+Z+f.slice(z)}mZ.exports={safeDecodeURI:ZJ,safeDecodeURIComponent:zJ}});var f8=X0((F4,eZ)=>{var B0=(w1(),W1(V1)),JJ=y$(),a0=HZ(),Pf=qf(),{prettyPrintTree:QJ}=qZ(),{StaticNode:iZ,NODE_TYPES:lZ}=EZ(),XJ=uZ(),r0=yZ(),Sf=c1(),{safeDecodeURI:WJ,safeDecodeURIComponent:nZ}=dZ(),pZ=/^https?:\/\/.*?\//,y0=/(\/:[^/()]*?)\?(\/?)/,oZ=/[.*+?^${}()|[\]\\]/g,sZ=/\/\/+/g;if(!a0(pZ))throw Error("the FULL_PATH_REGEXP is not safe, update this module");if(!a0(y0))throw Error("the OPTIONAL_PARAM_REGEXP is not safe, update this module");if(!a0(oZ))throw Error("the ESCAPE_REGEXP is not safe, update this module");if(!a0(sZ))throw Error("the REMOVE_DUPLICATE_SLASHES_REGEXP is not safe, update this module");function U0(f){if(!(this instanceof U0))return new U0(f);if(f=f||{},this._opts=f,f.defaultRoute)B0(typeof f.defaultRoute==="function","The default route must be a function"),this.defaultRoute=f.defaultRoute;else this.defaultRoute=null;if(f.onBadUrl)B0(typeof f.onBadUrl==="function","The bad url handler must be a function"),this.onBadUrl=f.onBadUrl;else this.onBadUrl=null;if(f.buildPrettyMeta)B0(typeof f.buildPrettyMeta==="function","buildPrettyMeta must be a function"),this.buildPrettyMeta=f.buildPrettyMeta;else this.buildPrettyMeta=YJ;if(f.querystringParser)B0(typeof f.querystringParser==="function","querystringParser must be a function"),this.querystringParser=f.querystringParser;else this.querystringParser=($)=>$.length===0?{}:JJ.parse($);this.caseSensitive=f.caseSensitive===void 0?!0:f.caseSensitive,this.ignoreTrailingSlash=f.ignoreTrailingSlash||!1,this.ignoreDuplicateSlashes=f.ignoreDuplicateSlashes||!1,this.maxParamLength=f.maxParamLength||100,this.allowUnsafeRegex=f.allowUnsafeRegex||!1,this.constrainer=new XJ(f.constraints),this.useSemicolonDelimiter=f.useSemicolonDelimiter||!1,this.routes=[],this.trees={}}U0.prototype.on=function($,Z,z,J,Q){if(typeof z==="function"){if(J!==void 0)Q=J;J=z,z={}}B0(typeof Z==="string","Path should be a string"),B0(Z.length>0,"The path could not be empty"),B0(Z[0]==="/"||Z[0]==="*","The first character of a path should be `/` or `*`"),B0(typeof J==="function","Handler should be a function");let X=Z.match(y0);if(X){B0(Z.length===X.index+X[0].length,"Optional Parameter needs to be the last parameter of the path");let V=Z.replace(y0,"$1$2"),B=Z.replace(y0,"$2")||"/";this.on($,V,z,J,Q),this.on($,B,z,J,Q);return}let W=Z;if(this.ignoreDuplicateSlashes)Z=Ef(Z);if(this.ignoreTrailingSlash)Z=bf(Z);let Y=Array.isArray($)?$:[$];for(let V of Y)B0(typeof V==="string","Method should be a string"),B0(r0.includes(V),`Method '${V}' is not an http method.`),this._on(V,Z,z,J,Q,W)};U0.prototype._on=function($,Z,z,J,Q){let X={};if(z.constraints!==void 0){if(B0(typeof z.constraints==="object"&&z.constraints!==null,"Constraints should be an object"),Object.keys(z.constraints).length!==0)X=z.constraints}if(this.constrainer.validateConstraints(X),this.constrainer.noteUsage(X),this.trees[$]===void 0)this.trees[$]=new iZ("/");let W=Z;if(W==="*"&&this.trees[$].prefix.length!==0){let O=this.trees[$];this.trees[$]=new iZ(""),this.trees[$].staticChildren["/"]=O}let Y=this.trees[$],V=Y.prefix.length,B=[];for(let O=0;O<=W.length;O++){if(W.charCodeAt(O)===58&&W.charCodeAt(O+1)===58){O++;continue}let q=W.charCodeAt(O)===58&&W.charCodeAt(O+1)!==58,R=W.charCodeAt(O)===42;if(q||R||O===W.length&&O!==V){let b=W.slice(V,O);if(!this.caseSensitive)b=b.toLowerCase();b=b.replaceAll("::",":"),b=b.replaceAll("%","%25"),Y=Y.createStaticChild(b)}if(q){let b=!1,v=!0,_="",u=[],k=O+1;for(let S=k;;S++){let r=W.charCodeAt(S),e=r===40,C=r===45||r===46,A=r===47||S===W.length;if(e||C||A){let N=W.slice(k,S);if(B.push(N),b=b||e||C,e){let i=tZ(W,S),$0=W.slice(S,i+1);if(!this.allowUnsafeRegex)B0(a0(new RegExp($0)),`The regex '${$0}' is not safe!`);u.push(aZ($0)),S=i+1,v=!0}else u.push(v?"(.*?)":`(${_}|(?:(?!${_}).)*)`),v=!1;let m=S;for(;S<W.length;S++){let i=W.charCodeAt(S);if(i===47)break;if(i===58)if(W.charCodeAt(S+1)===58)S++;else break}let s=W.slice(m,S);if(s)s=s.replaceAll("::",":"),s=s.replaceAll("%","%25"),u.push(_=rZ(s));if(k=S+1,A||W.charCodeAt(S)===47||S===W.length){let i=b?"()"+s:s,$0=W.slice(O,S);W=W.slice(0,O+1)+i+W.slice(S),O+=i.length;let l=b?new RegExp("^"+u.join("")+"$"):null;Y=Y.createParametricChild(l,s||null,$0),V=O+1;break}}}}else if(R){if(B.push("*"),Y=Y.createWildcardChild(),V=O+1,O!==W.length-1)throw Error("Wildcard must be the last character in the route")}}if(!this.caseSensitive)W=W.toLowerCase();if(W==="*")W="/*";for(let O of this.routes){let q=O.opts.constraints||{};if(O.method===$&&O.pattern===W&&Pf(q,X))throw Error(`Method '${$}' already declared for route '${W}' with constraints '${JSON.stringify(X)}'`)}let D={method:$,path:Z,pattern:W,params:B,opts:z,handler:J,store:Q};this.routes.push(D),Y.addRoute(D,this.constrainer)};U0.prototype.hasRoute=function($,Z,z){return this.findRoute($,Z,z)!==null};U0.prototype.findRoute=function($,Z,z={}){if(this.trees[$]===void 0)return null;let J=Z,Q=this.trees[$],X=Q.prefix.length,W=[];for(let Y=0;Y<=J.length;Y++){if(J.charCodeAt(Y)===58&&J.charCodeAt(Y+1)===58){Y++;continue}let V=J.charCodeAt(Y)===58&&J.charCodeAt(Y+1)!==58,B=J.charCodeAt(Y)===42;if(V||B||Y===J.length&&Y!==X){let D=J.slice(X,Y);if(!this.caseSensitive)D=D.toLowerCase();if(D=D.replaceAll("::",":"),D=D.replaceAll("%","%25"),Q=Q.getStaticChild(D),Q===null)return null}if(V){let D=!1,O=!0,q="",R=[],b=Y+1;for(let v=b;;v++){let _=J.charCodeAt(v),u=_===40,k=_===45||_===46,S=_===47||v===J.length;if(u||k||S){let r=J.slice(b,v);if(W.push(r),D=D||u||k,u){let A=tZ(J,v),N=J.slice(v,A+1);if(!this.allowUnsafeRegex)B0(a0(new RegExp(N)),`The regex '${N}' is not safe!`);R.push(aZ(N)),v=A+1,O=!1}else R.push(O?"(.*?)":`(${q}|(?:(?!${q}).)*)`),O=!1;let e=v;for(;v<J.length;v++){let A=J.charCodeAt(v);if(A===47)break;if(A===58)if(J.charCodeAt(v+1)===58)v++;else break}let C=J.slice(e,v);if(C)C=C.replaceAll("::",":"),C=C.replaceAll("%","%25"),R.push(q=rZ(C));if(b=v+1,S||J.charCodeAt(v)===47||v===J.length){let A=D?"()"+C:C,N=J.slice(Y,v);J=J.slice(0,Y+1)+A+J.slice(v),Y+=A.length;let m=D?new RegExp("^"+R.join("")+"$"):null;if(Q=Q.getParametricChild(m,C||null,N),Q===null)return null;X=Y+1;break}}}}else if(B){if(W.push("*"),Q=Q.getWildcardChild(),X=Y+1,Y!==J.length-1)throw Error("Wildcard must be the last character in the route")}}if(!this.caseSensitive)J=J.toLowerCase();for(let Y of this.routes){let V=Y.opts.constraints||{};if(Y.method===$&&Y.pattern===J&&Pf(V,z))return{handler:Y.handler,store:Y.store,params:Y.params}}return null};U0.prototype.hasConstraintStrategy=function(f){return this.constrainer.hasConstraintStrategy(f)};U0.prototype.addConstraintStrategy=function(f){this.constrainer.addConstraintStrategy(f),this._rebuild(this.routes)};U0.prototype.reset=function(){this.trees={},this.routes=[]};U0.prototype.off=function($,Z,z){B0(typeof Z==="string","Path should be a string"),B0(Z.length>0,"The path could not be empty"),B0(Z[0]==="/"||Z[0]==="*","The first character of a path should be `/` or `*`"),B0(typeof z>"u"||typeof z==="object"&&!Array.isArray(z)&&z!==null,"Constraints should be an object or undefined.");let J=Z.match(y0);if(J){B0(Z.length===J.index+J[0].length,"Optional Parameter needs to be the last parameter of the path");let X=Z.replace(y0,"$1$2"),W=Z.replace(y0,"$2");this.off($,X,z),this.off($,W,z);return}if(this.ignoreDuplicateSlashes)Z=Ef(Z);if(this.ignoreTrailingSlash)Z=bf(Z);let Q=Array.isArray($)?$:[$];for(let X of Q)this._off(X,Z,z)};U0.prototype._off=function($,Z,z){B0(typeof $==="string","Method should be a string"),B0(r0.includes($),`Method '${$}' is not an http method.`);function J(Y){return $!==Y.method||Z!==Y.path}function Q(Y){return J(Y)||!Pf(z,Y.opts.constraints||{})}let X=z?Q:J,W=this.routes.filter(X);this._rebuild(W)};U0.prototype.lookup=function($,Z,z,J){if(typeof z==="function")J=z,z=void 0;if(J===void 0){let Q=this.constrainer.deriveConstraints($,z),X=this.find($.method,$.url,Q);return this.callHandler(X,$,Z,z)}this.constrainer.deriveConstraints($,z,(Q,X)=>{if(Q!==null){J(Q);return}try{let W=this.find($.method,$.url,X),Y=this.callHandler(W,$,Z,z);J(null,Y)}catch(W){J(W)}})};U0.prototype.callHandler=function($,Z,z,J){if($===null)return this._defaultRoute(Z,z,J);return J===void 0?$.handler(Z,z,$.params,$.store,$.searchParams):$.handler.call(J,Z,z,$.params,$.store,$.searchParams)};U0.prototype.find=function($,Z,z){let J=this.trees[$];if(J===void 0)return null;if(Z.charCodeAt(0)!==47)Z=Z.replace(pZ,"/");if(this.ignoreDuplicateSlashes)Z=Ef(Z);let Q,X,W;try{Q=WJ(Z,this.useSemicolonDelimiter),Z=Q.path,X=Q.querystring,W=Q.shouldDecodeParam}catch(R){return this._onBadUrl(Z)}if(this.ignoreTrailingSlash)Z=bf(Z);let Y=Z;if(this.caseSensitive===!1)Z=Z.toLowerCase();let V=this.maxParamLength,B=J.prefix.length,D=[],O=Z.length,q=[];while(!0){if(B===O&&J.isLeafNode){let _=J.handlerStorage.getMatchingHandler(z);if(_!==null)return{handler:_.handler,store:_.store,params:_._createParamsObject(D),searchParams:this.querystringParser(X)}}let R=J.getNextNode(Z,B,q,D.length);if(R===null){if(q.length===0)return null;let _=q.pop();B=_.brotherPathIndex,D.splice(_.paramsCount),R=_.brotherNode}if(J=R,J.kind===lZ.STATIC){B+=J.prefix.length;continue}if(J.kind===lZ.WILDCARD){let _=Y.slice(B);if(W)_=nZ(_);D.push(_),B=O;continue}let b=Y.indexOf("/",B);if(b===-1)b=O;let v=Y.slice(B,b);if(W)v=nZ(v);if(J.isRegex){let _=J.regex.exec(v);if(_===null)continue;for(let u=1;u<_.length;u++){let k=_[u];if(k.length>V)return null;D.push(k)}}else{if(v.length>V)return null;D.push(v)}B=b}};U0.prototype._rebuild=function(f){this.reset();for(let $ of f){let{method:Z,path:z,opts:J,handler:Q,store:X}=$;this._on(Z,z,J,Q,X)}};U0.prototype._defaultRoute=function(f,$,Z){if(this.defaultRoute!==null)return Z===void 0?this.defaultRoute(f,$):this.defaultRoute.call(Z,f,$);else $.statusCode=404,$.end()};U0.prototype._onBadUrl=function(f){if(this.onBadUrl===null)return null;let $=this.onBadUrl;return{handler:(Z,z,J)=>$(f,Z,z),params:{},store:null}};U0.prototype.prettyPrint=function(f={}){let $=f.method;f.buildPrettyMeta=this.buildPrettyMeta.bind(this);let Z=null;if($===void 0){let{version:z,host:J,...Q}=this.constrainer.strategies;Q[Sf.name]=Sf;let X=new U0({...this._opts,constraints:Q}),W=this.routes.map((Y)=>{let V={...Y.opts.constraints,[Sf.name]:Y.method};return{...Y,method:"MERGED",opts:{constraints:V}}});X._rebuild(W),Z=X.trees.MERGED}else Z=this.trees[$];if(Z==null)return"(empty tree)";return QJ(Z,f)};for(let f in r0){if(!r0.hasOwnProperty(f))continue;let $=r0[f],Z=$.toLowerCase();U0.prototype[Z]=function(z,J,Q){return this.on($,z,J,Q)}}U0.prototype.all=function(f,$,Z){this.on(r0,f,$,Z)};eZ.exports=U0;function rZ(f){return f.replace(oZ,"\\$&")}function Ef(f){return f.indexOf("//")!==-1?f.replace(sZ,"/"):f}function bf(f){if(f.length>1&&f.charCodeAt(f.length-1)===47)return f.slice(0,-1);return f}function aZ(f){if(f.charCodeAt(1)===94)f=f.slice(0,1)+f.slice(2);if(f.charCodeAt(f.length-2)===36)f=f.slice(0,f.length-2)+f.slice(f.length-1);return f}function tZ(f,$){let Z=1;while($<f.length){if($++,f.charCodeAt($)===92){$++;continue}if(f.charCodeAt($)===41)Z--;else if(f.charCodeAt($)===40)Z++;if(!Z)return $}throw TypeError('Invalid regexp expression in "'+f+'"')}function YJ(f){if(!f)return{};if(!f.store)return{};return Object.assign({},f.store)}});class D1{children;isEndOfWord;handler;isDynamic;pattern;path;methodMap;segmentCount;params;middlewares;constructor(){this.children={},this.isEndOfWord=!1,this.handler=null,this.isDynamic=!1,this.pattern="",this.path="",this.methodMap=new Map,this.segmentCount=0,this.params=[],this.middlewares=[]}}class s1{root;cachedSegments;globalMiddlewares;constructor(){this.root=new D1,this.cachedSegments=new Map,this.globalMiddlewares=[]}pushMidl(f,...$){let Z=this.root,z=f.split("/").filter(Boolean);if(f==="/"){Z.handler=$[0],this.globalMiddlewares.push(...$);return}for(let J of z){let Q=J;if(J.startsWith(":"))Q=":";else if(J.startsWith("*"))Z.middlewares.push(...$);if(!Z.children[Q])Z.children[Q]=new D1;Z=Z.children[Q]}Z.middlewares.push(...$),Z.handler=$[0]}insert(f,$){let Z=this.root,z=f.split("/").filter(Boolean);if(this.cachedSegments.set(f,z),f==="/"){Z.isEndOfWord=!0,Z.handler=$.handler,Z.path=f,Z.methodMap.set($.method,$.handler),Z.segmentCount=0,Z.params=[];return}for(let J of z){let Q=J,X=!1;if(J.startsWith(":"))X=!0,Q=":";if(J==="*")Q="*";if(!Z.children[Q])Z.children[Q]=new D1;Z=Z.children[Q],Z.isDynamic=X,Z.pattern=J}Z.params=z.filter((J)=>J.startsWith(":")).map((J)=>J.slice(1)),Z.isEndOfWord=!0,Z.path=f,Z.segmentCount=z.length,Z.methodMap.set($.method,$.handler),Z.handler=$.handler}search(f,$){let Z=this.root,z=this.cachedSegments.get(f)||f.split("/").filter(Boolean),J=[...this.globalMiddlewares];for(let X of z){let W=X;if(Z.children[W])Z=Z.children[W];else if(Z.children[":"])Z=Z.children[":"];else if(Z.children["*"]){Z=Z.children["*"];break}else return{handler:J};if(Z.middlewares.length>0)J.push(...Z.middlewares)}if(!Z.isEndOfWord||Z.segmentCount!==z.length)return{handler:J};let Q=Z.methodMap.get($);if(Q)J.push(Q);return{params:Z.params,handler:J}}}class K1{trie=new s1;cache=new Map;add(f,$,Z){this.trie.insert($,{method:f,handler:Z})}addMiddleware(f,...$){this.trie.pushMidl(f,...$)}find(f,$){return this.trie.search($,f)}}var $8=q8(f8(),1);class t0{router=$8.default({});add(f,$,Z){this.router.on(f,$,Z)}addMiddleware(f,...$){}find(f,$){let Z=this.router.find(f,$);if(Z)return{handler:[Z.handler],params:Z.params};return null}}class d1{children;isEndOfWord;handlers;paramName;middlewares;constructor(){this.children={},this.handlers=new Map,this.isEndOfWord=!1,this.paramName=[],this.middlewares=[]}}class Z8{root;globalMiddlewares;constructor(){this.root=new d1,this.globalMiddlewares=[]}pushMiddleware(f,$){if(!Array.isArray($))$=[$];if(f==="/"){this.globalMiddlewares.push(...$);return}let Z=this.root,z=f.split("/").filter(Boolean);for(let J of z){let Q=J;if(J.startsWith(":"))Q=":";else if(J.startsWith("*"))Z.middlewares.push(...$);if(!Z.children[Q])Z.children[Q]=new d1;Z=Z.children[Q]}Z.middlewares.push(...$)}insert(f,$,Z){let z=this.root,J=$.split("/").filter(Boolean);if($==="/"){z.isEndOfWord=!0,z.handlers.set(f,Z),z.paramName=[];return}for(let Q of J){let X=Q;if(Q.startsWith(":"))X=":";if(!z.children[X])z.children[X]=new d1;z=z.children[X]}z.paramName=J.filter((Q)=>Q.startsWith(":")).map((Q)=>Q.slice(1)),z.handlers.set(f,Z),z.isEndOfWord=!0}search(f,$){let Z=this.root,z=$.split("/").filter(Boolean),J=[...this.globalMiddlewares];for(let X of z){if(Z.children[X])Z=Z.children[X];else if(Z.children[":"])Z=Z.children[":"];else if(Z.children["*"]){Z=Z.children["*"];break}else return{handler:J};if(Z.middlewares.length>0)J.push(...Z.middlewares)}let Q=Z.handlers.get(f);if(Q)J.push(Q);return{params:Z.paramName,handler:J}}}class _f{trie;cache=new Map;constructor(){this.trie=new Z8}add(f,$,Z){this.trie.insert(f,$,Z)}addMiddleware(f,$){this.trie.pushMiddleware(f,$)}find(f,$){return this.trie.search(f,$)}}class vf{static create(f){switch(f){case"t2":return new _f;case"trie":return new K1;case"fastify":return new t0;case"fs":return new t0;case"find-my-way":return new t0;case"findmyway":return new t0;default:return new K1}}}var z8=["GET","POST","PUT","PATCH","DELETE","ANY","HEAD","OPTIONS","PROPFIND"];function i1(f){switch(f.split(".").pop()?.toLowerCase()){case"js":return"application/javascript";case"css":return"text/css";case"html":return"text/html";case"json":return"application/json";case"png":return"image/png";case"jpg":case"jpeg":return"image/jpeg";case"svg":return"image/svg+xml";case"gif":return"image/gif";case"woff":return"font/woff";case"woff2":return"font/woff2";default:return"application/octet-stream"}}var H0={reset:"\x1B[0m",info:"\x1B[36m",warn:"\x1B[33m",error:"\x1B[31m",method:{GET:"\x1B[32m",POST:"\x1B[34m",PUT:"\x1B[35m",DELETE:"\x1B[31m",PATCH:"\x1B[36m"}},xf=(f,$,Z)=>{let z=H0[f]||H0.reset,J=Z?.method?H0.method[Z.method]||H0.reset:H0.reset,Q=Z?.status?Z.status>=500?H0.error:Z.status>=400?H0.warn:H0.info:H0.reset;console.log(`
|
|
101
|
+
`))}}IZ.exports=NZ});var EZ=X0((z4,PZ)=>{var sz=SZ(),m1={STATIC:0,PARAMETRIC:1,WILDCARD:2};class jf{constructor(){this.isLeafNode=!1,this.routes=null,this.handlerStorage=null}addRoute(f,$){if(this.routes===null)this.routes=[];if(this.handlerStorage===null)this.handlerStorage=new sz;this.isLeafNode=!0,this.routes.push(f),this.handlerStorage.addHandler($,f)}}class Cf extends jf{constructor(){super();this.staticChildren={}}findStaticMatchingChild(f,$){let Z=this.staticChildren[f.charAt($)];if(Z===void 0||!Z.matchPrefix(f,$))return null;return Z}getStaticChild(f,$=0){if(f.length===$)return this;let Z=this.findStaticMatchingChild(f,$);if(Z)return Z.getStaticChild(f,$+Z.prefix.length);return null}createStaticChild(f){if(f.length===0)return this;let $=this.staticChildren[f.charAt(0)];if($){let z=1;for(;z<$.prefix.length;z++)if(f.charCodeAt(z)!==$.prefix.charCodeAt(z)){$=$.split(this,z);break}return $.createStaticChild(f.slice(z))}let Z=f.charAt(0);return this.staticChildren[Z]=new d1(f),this.staticChildren[Z]}}class d1 extends Cf{constructor(f){super();this.prefix=f,this.wildcardChild=null,this.parametricChildren=[],this.kind=m1.STATIC,this._compilePrefixMatch()}getParametricChild(f){let $=f&&f.source,Z=this.parametricChildren.find((z)=>{return(z.regex&&z.regex.source)===$});if(Z)return Z;return null}createParametricChild(f,$,Z){let z=this.getParametricChild(f);if(z)return z.nodePaths.add(Z),z;return z=new Rf(f,$,Z),this.parametricChildren.push(z),this.parametricChildren.sort((J,Q)=>{if(!J.isRegex)return 1;if(!Q.isRegex)return-1;if(J.staticSuffix===null)return 1;if(Q.staticSuffix===null)return-1;if(Q.staticSuffix.endsWith(J.staticSuffix))return 1;if(J.staticSuffix.endsWith(Q.staticSuffix))return-1;return 0}),z}getWildcardChild(){return this.wildcardChild}createWildcardChild(){return this.wildcardChild=this.getWildcardChild()||new Nf,this.wildcardChild}split(f,$){let Z=this.prefix.slice(0,$),z=this.prefix.slice($);this.prefix=z,this._compilePrefixMatch();let J=new d1(Z);return J.staticChildren[z.charAt(0)]=this,f.staticChildren[Z.charAt(0)]=J,J}getNextNode(f,$,Z,z){let J=this.findStaticMatchingChild(f,$),Q=0;if(J===null){if(this.parametricChildren.length===0)return this.wildcardChild;J=this.parametricChildren[0],Q=1}if(this.wildcardChild!==null)Z.push({paramsCount:z,brotherPathIndex:$,brotherNode:this.wildcardChild});for(let X=this.parametricChildren.length-1;X>=Q;X--)Z.push({paramsCount:z,brotherPathIndex:$,brotherNode:this.parametricChildren[X]});return J}_compilePrefixMatch(){if(this.prefix.length===1){this.matchPrefix=()=>!0;return}let f=[];for(let $=1;$<this.prefix.length;$++){let Z=this.prefix.charCodeAt($);f.push(`path.charCodeAt(i + ${$}) === ${Z}`)}this.matchPrefix=Function("path","i",`return ${f.join(" && ")}`)}}class Rf extends Cf{constructor(f,$,Z){super();this.isRegex=!!f,this.regex=f||null,this.staticSuffix=$||null,this.kind=m1.PARAMETRIC,this.nodePaths=new Set([Z])}getNextNode(f,$){return this.findStaticMatchingChild(f,$)}}class Nf extends jf{constructor(){super();this.kind=m1.WILDCARD}getNextNode(){return null}}PZ.exports={StaticNode:d1,ParametricNode:Rf,WildcardNode:Nf,NODE_TYPES:m1}});var _Z=X0((J4,bZ)=>{var rz=(B1(),Y1(w1));function G1(){if(!(this instanceof G1))return new G1;this.store=new Map,this.maxMajor=0,this.maxMinors={},this.maxPatches={}}G1.prototype.set=function(f,$){if(typeof f!=="string")throw TypeError("Version should be a string");let[Z,z,J]=f.split(".",3);if(isNaN(Z))throw TypeError("Major version must be a numeric value");if(Z=Number(Z),z=Number(z)||0,J=Number(J)||0,Z>=this.maxMajor)this.maxMajor=Z,this.store.set("x",$),this.store.set("*",$),this.store.set("x.x",$),this.store.set("x.x.x",$);if(z>=(this.maxMinors[Z]||0))this.maxMinors[Z]=z,this.store.set(`${Z}.x`,$),this.store.set(`${Z}.x.x`,$);if(J>=(this.maxPatches[`${Z}.${z}`]||0))this.maxPatches[`${Z}.${z}`]=J,this.store.set(`${Z}.${z}.x`,$);return this.store.set(`${Z}.${z}.${J}`,$),this};G1.prototype.get=function(f){return this.store.get(f)};bZ.exports={name:"version",mustMatchWhenDerived:!0,storage:G1,validate(f){rz(typeof f==="string","Version should be a string")}}});var xZ=X0((Q4,vZ)=>{var az=(B1(),Y1(w1));function tz(){let f=new Map,$=[];return{get:(Z)=>{let z=f.get(Z);if(z)return z;for(let J of $)if(J.host.test(Z))return J.value},set:(Z,z)=>{if(Z instanceof RegExp)$.push({host:Z,value:z});else f.set(Z,z)}}}vZ.exports={name:"host",mustMatchWhenDerived:!1,storage:tz,validate(f){az(typeof f==="string"||Object.prototype.toString.call(f)==="[object RegExp]","Host should be a string or a RegExp")}}});var uZ=X0((X4,kZ)=>{var ez=_Z(),fJ=xZ(),If=(B1(),Y1(w1));class gZ{constructor(f){if(this.strategies={version:ez,host:fJ},this.strategiesInUse=new Set,this.asyncStrategiesInUse=new Set,f)for(let $ of Object.values(f))this.addConstraintStrategy($)}isStrategyUsed(f){return this.strategiesInUse.has(f)||this.asyncStrategiesInUse.has(f)}hasConstraintStrategy(f){let $=this.strategies[f];if($!==void 0)return $.isCustom||this.isStrategyUsed(f);return!1}addConstraintStrategy(f){if(If(typeof f.name==="string"&&f.name!=="","strategy.name is required."),If(f.storage&&typeof f.storage==="function","strategy.storage function is required."),If(f.deriveConstraint&&typeof f.deriveConstraint==="function","strategy.deriveConstraint function is required."),this.strategies[f.name]&&this.strategies[f.name].isCustom)throw Error(`There already exists a custom constraint with the name ${f.name}.`);if(this.isStrategyUsed(f.name))throw Error(`There already exists a route with ${f.name} constraint.`);if(f.isCustom=!0,f.isAsync=f.deriveConstraint.length===3,this.strategies[f.name]=f,f.mustMatchWhenDerived)this.noteUsage({[f.name]:f})}deriveConstraints(f,$,Z){let z=this.deriveSyncConstraints(f,$);if(Z===void 0)return z;this.deriveAsyncConstraints(z,f,$,Z)}deriveSyncConstraints(f,$){return}noteUsage(f){if(f){let $=this.strategiesInUse.size;for(let Z in f)if(this.strategies[Z].isAsync)this.asyncStrategiesInUse.add(Z);else this.strategiesInUse.add(Z);if($!==this.strategiesInUse.size)this._buildDeriveConstraints()}}newStoreForConstraint(f){if(!this.strategies[f])throw Error(`No strategy registered for constraint key ${f}`);return this.strategies[f].storage()}validateConstraints(f){for(let $ in f){let Z=f[$];if(typeof Z>"u")throw Error("Can't pass an undefined constraint value, must pass null or no key at all");let z=this.strategies[$];if(!z)throw Error(`No strategy registered for constraint key ${$}`);if(z.validate)z.validate(Z)}}deriveAsyncConstraints(f,$,Z,z){let J=this.asyncStrategiesInUse.size;if(J===0){z(null,f);return}f=f||{};for(let Q of this.asyncStrategiesInUse)this.strategies[Q].deriveConstraint($,Z,(W,Y)=>{if(W!==null){z(W);return}if(f[Q]=Y,--J===0)z(null,f)})}_buildDeriveConstraints(){if(this.strategiesInUse.size===0)return;let f=["return {"];for(let $ of this.strategiesInUse){let Z=this.strategies[$];if(!Z.isCustom)if($==="version")f.push(" version: req.headers['accept-version'],");else f.push(" host: req.headers.host || req.headers[':authority'],");else f.push(` ${Z.name}: this.strategies.${$}.deriveConstraint(req, ctx),`)}f.push("}"),this.deriveSyncConstraints=Function("req","ctx",f.join(`
|
|
102
|
+
`)).bind(this)}}kZ.exports=gZ});var yZ=X0((W4,cZ)=>{var $J=["ACL","BIND","CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LINK","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCALENDAR","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","QUERY","REBIND","REPORT","SEARCH","SOURCE","SUBSCRIBE","TRACE","UNBIND","UNLINK","UNLOCK","UNSUBSCRIBE"];cZ.exports=$J});var dZ=X0((Y4,mZ)=>{function hZ(f,$){if(f===50){if($===53)return"%";if($===51)return"#";if($===52)return"$";if($===54)return"&";if($===66)return"+";if($===98)return"+";if($===67)return",";if($===99)return",";if($===70)return"/";if($===102)return"/";return null}if(f===51){if($===65)return":";if($===97)return":";if($===66)return";";if($===98)return";";if($===68)return"=";if($===100)return"=";if($===70)return"?";if($===102)return"?";return null}if(f===52&&$===48)return"@";return null}function ZJ(f,$){let Z=!1,z=!1,J="";for(let X=1;X<f.length;X++){let W=f.charCodeAt(X);if(W===37){let Y=f.charCodeAt(X+1),V=f.charCodeAt(X+2);if(hZ(Y,V)===null)Z=!0;else{if(z=!0,Y===50&&V===53)Z=!0,f=f.slice(0,X+1)+"25"+f.slice(X+1),X+=2;X+=2}}else if(W===63||W===35||W===59&&$){J=f.slice(X+1),f=f.slice(0,X);break}}return{path:Z?decodeURI(f):f,querystring:J,shouldDecodeParam:z}}function zJ(f){let $=f.indexOf("%");if($===-1)return f;let Z="",z=$;for(let J=$;J<f.length;J++)if(f.charCodeAt(J)===37){let Q=f.charCodeAt(J+1),X=f.charCodeAt(J+2),W=hZ(Q,X);Z+=f.slice(z,J)+W,z=J+3}return f.slice(0,$)+Z+f.slice(z)}mZ.exports={safeDecodeURI:ZJ,safeDecodeURIComponent:zJ}});var f8=X0((F4,eZ)=>{var B0=(B1(),Y1(w1)),JJ=y$(),t0=HZ(),Pf=qf(),{prettyPrintTree:QJ}=qZ(),{StaticNode:iZ,NODE_TYPES:nZ}=EZ(),XJ=uZ(),a0=yZ(),Sf=y1(),{safeDecodeURI:WJ,safeDecodeURIComponent:lZ}=dZ(),pZ=/^https?:\/\/.*?\//,y0=/(\/:[^/()]*?)\?(\/?)/,oZ=/[.*+?^${}()|[\]\\]/g,sZ=/\/\/+/g;if(!t0(pZ))throw Error("the FULL_PATH_REGEXP is not safe, update this module");if(!t0(y0))throw Error("the OPTIONAL_PARAM_REGEXP is not safe, update this module");if(!t0(oZ))throw Error("the ESCAPE_REGEXP is not safe, update this module");if(!t0(sZ))throw Error("the REMOVE_DUPLICATE_SLASHES_REGEXP is not safe, update this module");function U0(f){if(!(this instanceof U0))return new U0(f);if(f=f||{},this._opts=f,f.defaultRoute)B0(typeof f.defaultRoute==="function","The default route must be a function"),this.defaultRoute=f.defaultRoute;else this.defaultRoute=null;if(f.onBadUrl)B0(typeof f.onBadUrl==="function","The bad url handler must be a function"),this.onBadUrl=f.onBadUrl;else this.onBadUrl=null;if(f.buildPrettyMeta)B0(typeof f.buildPrettyMeta==="function","buildPrettyMeta must be a function"),this.buildPrettyMeta=f.buildPrettyMeta;else this.buildPrettyMeta=YJ;if(f.querystringParser)B0(typeof f.querystringParser==="function","querystringParser must be a function"),this.querystringParser=f.querystringParser;else this.querystringParser=($)=>$.length===0?{}:JJ.parse($);this.caseSensitive=f.caseSensitive===void 0?!0:f.caseSensitive,this.ignoreTrailingSlash=f.ignoreTrailingSlash||!1,this.ignoreDuplicateSlashes=f.ignoreDuplicateSlashes||!1,this.maxParamLength=f.maxParamLength||100,this.allowUnsafeRegex=f.allowUnsafeRegex||!1,this.constrainer=new XJ(f.constraints),this.useSemicolonDelimiter=f.useSemicolonDelimiter||!1,this.routes=[],this.trees={}}U0.prototype.on=function($,Z,z,J,Q){if(typeof z==="function"){if(J!==void 0)Q=J;J=z,z={}}B0(typeof Z==="string","Path should be a string"),B0(Z.length>0,"The path could not be empty"),B0(Z[0]==="/"||Z[0]==="*","The first character of a path should be `/` or `*`"),B0(typeof J==="function","Handler should be a function");let X=Z.match(y0);if(X){B0(Z.length===X.index+X[0].length,"Optional Parameter needs to be the last parameter of the path");let V=Z.replace(y0,"$1$2"),w=Z.replace(y0,"$2")||"/";this.on($,V,z,J,Q),this.on($,w,z,J,Q);return}let W=Z;if(this.ignoreDuplicateSlashes)Z=Ef(Z);if(this.ignoreTrailingSlash)Z=bf(Z);let Y=Array.isArray($)?$:[$];for(let V of Y)B0(typeof V==="string","Method should be a string"),B0(a0.includes(V),`Method '${V}' is not an http method.`),this._on(V,Z,z,J,Q,W)};U0.prototype._on=function($,Z,z,J,Q){let X={};if(z.constraints!==void 0){if(B0(typeof z.constraints==="object"&&z.constraints!==null,"Constraints should be an object"),Object.keys(z.constraints).length!==0)X=z.constraints}if(this.constrainer.validateConstraints(X),this.constrainer.noteUsage(X),this.trees[$]===void 0)this.trees[$]=new iZ("/");let W=Z;if(W==="*"&&this.trees[$].prefix.length!==0){let O=this.trees[$];this.trees[$]=new iZ(""),this.trees[$].staticChildren["/"]=O}let Y=this.trees[$],V=Y.prefix.length,w=[];for(let O=0;O<=W.length;O++){if(W.charCodeAt(O)===58&&W.charCodeAt(O+1)===58){O++;continue}let q=W.charCodeAt(O)===58&&W.charCodeAt(O+1)!==58,R=W.charCodeAt(O)===42;if(q||R||O===W.length&&O!==V){let b=W.slice(V,O);if(!this.caseSensitive)b=b.toLowerCase();b=b.replaceAll("::",":"),b=b.replaceAll("%","%25"),Y=Y.createStaticChild(b)}if(q){let b=!1,v=!0,_="",u=[],k=O+1;for(let S=k;;S++){let r=W.charCodeAt(S),e=r===40,C=r===45||r===46,A=r===47||S===W.length;if(e||C||A){let N=W.slice(k,S);if(w.push(N),b=b||e||C,e){let i=tZ(W,S),$0=W.slice(S,i+1);if(!this.allowUnsafeRegex)B0(t0(new RegExp($0)),`The regex '${$0}' is not safe!`);u.push(aZ($0)),S=i+1,v=!0}else u.push(v?"(.*?)":`(${_}|(?:(?!${_}).)*)`),v=!1;let m=S;for(;S<W.length;S++){let i=W.charCodeAt(S);if(i===47)break;if(i===58)if(W.charCodeAt(S+1)===58)S++;else break}let s=W.slice(m,S);if(s)s=s.replaceAll("::",":"),s=s.replaceAll("%","%25"),u.push(_=rZ(s));if(k=S+1,A||W.charCodeAt(S)===47||S===W.length){let i=b?"()"+s:s,$0=W.slice(O,S);W=W.slice(0,O+1)+i+W.slice(S),O+=i.length;let n=b?new RegExp("^"+u.join("")+"$"):null;Y=Y.createParametricChild(n,s||null,$0),V=O+1;break}}}}else if(R){if(w.push("*"),Y=Y.createWildcardChild(),V=O+1,O!==W.length-1)throw Error("Wildcard must be the last character in the route")}}if(!this.caseSensitive)W=W.toLowerCase();if(W==="*")W="/*";for(let O of this.routes){let q=O.opts.constraints||{};if(O.method===$&&O.pattern===W&&Pf(q,X))throw Error(`Method '${$}' already declared for route '${W}' with constraints '${JSON.stringify(X)}'`)}let D={method:$,path:Z,pattern:W,params:w,opts:z,handler:J,store:Q};this.routes.push(D),Y.addRoute(D,this.constrainer)};U0.prototype.hasRoute=function($,Z,z){return this.findRoute($,Z,z)!==null};U0.prototype.findRoute=function($,Z,z={}){if(this.trees[$]===void 0)return null;let J=Z,Q=this.trees[$],X=Q.prefix.length,W=[];for(let Y=0;Y<=J.length;Y++){if(J.charCodeAt(Y)===58&&J.charCodeAt(Y+1)===58){Y++;continue}let V=J.charCodeAt(Y)===58&&J.charCodeAt(Y+1)!==58,w=J.charCodeAt(Y)===42;if(V||w||Y===J.length&&Y!==X){let D=J.slice(X,Y);if(!this.caseSensitive)D=D.toLowerCase();if(D=D.replaceAll("::",":"),D=D.replaceAll("%","%25"),Q=Q.getStaticChild(D),Q===null)return null}if(V){let D=!1,O=!0,q="",R=[],b=Y+1;for(let v=b;;v++){let _=J.charCodeAt(v),u=_===40,k=_===45||_===46,S=_===47||v===J.length;if(u||k||S){let r=J.slice(b,v);if(W.push(r),D=D||u||k,u){let A=tZ(J,v),N=J.slice(v,A+1);if(!this.allowUnsafeRegex)B0(t0(new RegExp(N)),`The regex '${N}' is not safe!`);R.push(aZ(N)),v=A+1,O=!1}else R.push(O?"(.*?)":`(${q}|(?:(?!${q}).)*)`),O=!1;let e=v;for(;v<J.length;v++){let A=J.charCodeAt(v);if(A===47)break;if(A===58)if(J.charCodeAt(v+1)===58)v++;else break}let C=J.slice(e,v);if(C)C=C.replaceAll("::",":"),C=C.replaceAll("%","%25"),R.push(q=rZ(C));if(b=v+1,S||J.charCodeAt(v)===47||v===J.length){let A=D?"()"+C:C,N=J.slice(Y,v);J=J.slice(0,Y+1)+A+J.slice(v),Y+=A.length;let m=D?new RegExp("^"+R.join("")+"$"):null;if(Q=Q.getParametricChild(m,C||null,N),Q===null)return null;X=Y+1;break}}}}else if(w){if(W.push("*"),Q=Q.getWildcardChild(),X=Y+1,Y!==J.length-1)throw Error("Wildcard must be the last character in the route")}}if(!this.caseSensitive)J=J.toLowerCase();for(let Y of this.routes){let V=Y.opts.constraints||{};if(Y.method===$&&Y.pattern===J&&Pf(V,z))return{handler:Y.handler,store:Y.store,params:Y.params}}return null};U0.prototype.hasConstraintStrategy=function(f){return this.constrainer.hasConstraintStrategy(f)};U0.prototype.addConstraintStrategy=function(f){this.constrainer.addConstraintStrategy(f),this._rebuild(this.routes)};U0.prototype.reset=function(){this.trees={},this.routes=[]};U0.prototype.off=function($,Z,z){B0(typeof Z==="string","Path should be a string"),B0(Z.length>0,"The path could not be empty"),B0(Z[0]==="/"||Z[0]==="*","The first character of a path should be `/` or `*`"),B0(typeof z>"u"||typeof z==="object"&&!Array.isArray(z)&&z!==null,"Constraints should be an object or undefined.");let J=Z.match(y0);if(J){B0(Z.length===J.index+J[0].length,"Optional Parameter needs to be the last parameter of the path");let X=Z.replace(y0,"$1$2"),W=Z.replace(y0,"$2");this.off($,X,z),this.off($,W,z);return}if(this.ignoreDuplicateSlashes)Z=Ef(Z);if(this.ignoreTrailingSlash)Z=bf(Z);let Q=Array.isArray($)?$:[$];for(let X of Q)this._off(X,Z,z)};U0.prototype._off=function($,Z,z){B0(typeof $==="string","Method should be a string"),B0(a0.includes($),`Method '${$}' is not an http method.`);function J(Y){return $!==Y.method||Z!==Y.path}function Q(Y){return J(Y)||!Pf(z,Y.opts.constraints||{})}let X=z?Q:J,W=this.routes.filter(X);this._rebuild(W)};U0.prototype.lookup=function($,Z,z,J){if(typeof z==="function")J=z,z=void 0;if(J===void 0){let Q=this.constrainer.deriveConstraints($,z),X=this.find($.method,$.url,Q);return this.callHandler(X,$,Z,z)}this.constrainer.deriveConstraints($,z,(Q,X)=>{if(Q!==null){J(Q);return}try{let W=this.find($.method,$.url,X),Y=this.callHandler(W,$,Z,z);J(null,Y)}catch(W){J(W)}})};U0.prototype.callHandler=function($,Z,z,J){if($===null)return this._defaultRoute(Z,z,J);return J===void 0?$.handler(Z,z,$.params,$.store,$.searchParams):$.handler.call(J,Z,z,$.params,$.store,$.searchParams)};U0.prototype.find=function($,Z,z){let J=this.trees[$];if(J===void 0)return null;if(Z.charCodeAt(0)!==47)Z=Z.replace(pZ,"/");if(this.ignoreDuplicateSlashes)Z=Ef(Z);let Q,X,W;try{Q=WJ(Z,this.useSemicolonDelimiter),Z=Q.path,X=Q.querystring,W=Q.shouldDecodeParam}catch(R){return this._onBadUrl(Z)}if(this.ignoreTrailingSlash)Z=bf(Z);let Y=Z;if(this.caseSensitive===!1)Z=Z.toLowerCase();let V=this.maxParamLength,w=J.prefix.length,D=[],O=Z.length,q=[];while(!0){if(w===O&&J.isLeafNode){let _=J.handlerStorage.getMatchingHandler(z);if(_!==null)return{handler:_.handler,store:_.store,params:_._createParamsObject(D),searchParams:this.querystringParser(X)}}let R=J.getNextNode(Z,w,q,D.length);if(R===null){if(q.length===0)return null;let _=q.pop();w=_.brotherPathIndex,D.splice(_.paramsCount),R=_.brotherNode}if(J=R,J.kind===nZ.STATIC){w+=J.prefix.length;continue}if(J.kind===nZ.WILDCARD){let _=Y.slice(w);if(W)_=lZ(_);D.push(_),w=O;continue}let b=Y.indexOf("/",w);if(b===-1)b=O;let v=Y.slice(w,b);if(W)v=lZ(v);if(J.isRegex){let _=J.regex.exec(v);if(_===null)continue;for(let u=1;u<_.length;u++){let k=_[u];if(k.length>V)return null;D.push(k)}}else{if(v.length>V)return null;D.push(v)}w=b}};U0.prototype._rebuild=function(f){this.reset();for(let $ of f){let{method:Z,path:z,opts:J,handler:Q,store:X}=$;this._on(Z,z,J,Q,X)}};U0.prototype._defaultRoute=function(f,$,Z){if(this.defaultRoute!==null)return Z===void 0?this.defaultRoute(f,$):this.defaultRoute.call(Z,f,$);else $.statusCode=404,$.end()};U0.prototype._onBadUrl=function(f){if(this.onBadUrl===null)return null;let $=this.onBadUrl;return{handler:(Z,z,J)=>$(f,Z,z),params:{},store:null}};U0.prototype.prettyPrint=function(f={}){let $=f.method;f.buildPrettyMeta=this.buildPrettyMeta.bind(this);let Z=null;if($===void 0){let{version:z,host:J,...Q}=this.constrainer.strategies;Q[Sf.name]=Sf;let X=new U0({...this._opts,constraints:Q}),W=this.routes.map((Y)=>{let V={...Y.opts.constraints,[Sf.name]:Y.method};return{...Y,method:"MERGED",opts:{constraints:V}}});X._rebuild(W),Z=X.trees.MERGED}else Z=this.trees[$];if(Z==null)return"(empty tree)";return QJ(Z,f)};for(let f in a0){if(!a0.hasOwnProperty(f))continue;let $=a0[f],Z=$.toLowerCase();U0.prototype[Z]=function(z,J,Q){return this.on($,z,J,Q)}}U0.prototype.all=function(f,$,Z){this.on(a0,f,$,Z)};eZ.exports=U0;function rZ(f){return f.replace(oZ,"\\$&")}function Ef(f){return f.indexOf("//")!==-1?f.replace(sZ,"/"):f}function bf(f){if(f.length>1&&f.charCodeAt(f.length-1)===47)return f.slice(0,-1);return f}function aZ(f){if(f.charCodeAt(1)===94)f=f.slice(0,1)+f.slice(2);if(f.charCodeAt(f.length-2)===36)f=f.slice(0,f.length-2)+f.slice(f.length-1);return f}function tZ(f,$){let Z=1;while($<f.length){if($++,f.charCodeAt($)===92){$++;continue}if(f.charCodeAt($)===41)Z--;else if(f.charCodeAt($)===40)Z++;if(!Z)return $}throw TypeError('Invalid regexp expression in "'+f+'"')}function YJ(f){if(!f)return{};if(!f.store)return{};return Object.assign({},f.store)}});class K1{children;isEndOfWord;handler;isDynamic;pattern;path;methodMap;segmentCount;params;middlewares;constructor(){this.children={},this.isEndOfWord=!1,this.handler=null,this.isDynamic=!1,this.pattern="",this.path="",this.methodMap=new Map,this.segmentCount=0,this.params=[],this.middlewares=[]}}class s1{root;cachedSegments;globalMiddlewares;constructor(){this.root=new K1,this.cachedSegments=new Map,this.globalMiddlewares=[]}pushMidl(f,...$){let Z=this.root,z=f.split("/").filter(Boolean);if(f==="/"){Z.handler=$[0],this.globalMiddlewares.push(...$);return}for(let J of z){let Q=J;if(J.startsWith(":"))Q=":";else if(J.startsWith("*"))Z.middlewares.push(...$);if(!Z.children[Q])Z.children[Q]=new K1;Z=Z.children[Q]}Z.middlewares.push(...$),Z.handler=$[0]}insert(f,$){let Z=this.root,z=f.split("/").filter(Boolean);if(this.cachedSegments.set(f,z),f==="/"){Z.isEndOfWord=!0,Z.handler=$.handler,Z.path=f,Z.methodMap.set($.method,$.handler),Z.segmentCount=0,Z.params=[];return}for(let J of z){let Q=J,X=!1;if(J.startsWith(":"))X=!0,Q=":";if(J==="*")Q="*";if(!Z.children[Q])Z.children[Q]=new K1;Z=Z.children[Q],Z.isDynamic=X,Z.pattern=J}Z.params=z.filter((J)=>J.startsWith(":")).map((J)=>J.slice(1)),Z.isEndOfWord=!0,Z.path=f,Z.segmentCount=z.length,Z.methodMap.set($.method,$.handler),Z.handler=$.handler}search(f,$){let Z=this.root,z=this.cachedSegments.get(f)||f.split("/").filter(Boolean),J=[...this.globalMiddlewares];for(let X of z){let W=X;if(Z.children[W])Z=Z.children[W];else if(Z.children[":"])Z=Z.children[":"];else if(Z.children["*"]){Z=Z.children["*"];break}else return{handler:J};if(Z.middlewares.length>0)J.push(...Z.middlewares)}if(!Z.isEndOfWord||Z.segmentCount!==z.length)return{handler:J};let Q=Z.methodMap.get($);if(Q)J.push(Q);return{params:Z.params,handler:J}}}class L1{trie=new s1;cache=new Map;add(f,$,Z){this.trie.insert($,{method:f,handler:Z})}addMiddleware(f,...$){this.trie.pushMidl(f,...$)}find(f,$){return this.trie.search($,f)}}var $8=q8(f8(),1);class e0{router=$8.default({});add(f,$,Z){this.router.on(f,$,Z)}addMiddleware(f,...$){}find(f,$){let Z=this.router.find(f,$);if(Z)return{handler:[Z.handler],params:Z.params};return null}}class i1{children;isEndOfWord;handlers;paramName;middlewares;constructor(){this.children={},this.handlers=new Map,this.isEndOfWord=!1,this.paramName=[],this.middlewares=[]}}class Z8{root;globalMiddlewares;constructor(){this.root=new i1,this.globalMiddlewares=[]}pushMiddleware(f,$){if(!Array.isArray($))$=[$];if(f==="/"){this.globalMiddlewares.push(...$);return}let Z=this.root,z=f.split("/").filter(Boolean);for(let J of z){let Q=J;if(J.startsWith(":"))Q=":";else if(J.startsWith("*"))Z.middlewares.push(...$);if(!Z.children[Q])Z.children[Q]=new i1;Z=Z.children[Q]}Z.middlewares.push(...$)}insert(f,$,Z){let z=this.root,J=$.split("/").filter(Boolean);if($==="/"){z.isEndOfWord=!0,z.handlers.set(f,Z),z.paramName=[];return}for(let Q of J){let X=Q;if(Q.startsWith(":"))X=":";if(!z.children[X])z.children[X]=new i1;z=z.children[X]}z.paramName=J.filter((Q)=>Q.startsWith(":")).map((Q)=>Q.slice(1)),z.handlers.set(f,Z),z.isEndOfWord=!0}search(f,$){let Z=this.root,z=$.split("/").filter(Boolean),J=[...this.globalMiddlewares];for(let X of z){if(Z.children[X])Z=Z.children[X];else if(Z.children[":"])Z=Z.children[":"];else if(Z.children["*"]){Z=Z.children["*"];break}else return{handler:J};if(Z.middlewares.length>0)J.push(...Z.middlewares)}let Q=Z.handlers.get(f);if(Q)J.push(Q);return{params:Z.paramName,handler:J}}}class _f{trie;cache=new Map;constructor(){this.trie=new Z8}add(f,$,Z){this.trie.insert(f,$,Z)}addMiddleware(f,$){this.trie.pushMiddleware(f,$)}find(f,$){return this.trie.search(f,$)}}class vf{static create(f){switch(f){case"t2":return new _f;case"trie":return new L1;case"fastify":return new e0;case"fs":return new e0;case"find-my-way":return new e0;case"findmyway":return new e0;default:return new L1}}}var z8=["GET","POST","PUT","PATCH","DELETE","ANY","HEAD","OPTIONS","PROPFIND"];function n1(f){switch(f.split(".").pop()?.toLowerCase()){case"js":return"application/javascript";case"css":return"text/css";case"html":return"text/html";case"json":return"application/json";case"png":return"image/png";case"jpg":case"jpeg":return"image/jpeg";case"svg":return"image/svg+xml";case"gif":return"image/gif";case"woff":return"font/woff";case"woff2":return"font/woff2";default:return"application/octet-stream"}}var H0={reset:"\x1B[0m",info:"\x1B[36m",warn:"\x1B[33m",error:"\x1B[31m",method:{GET:"\x1B[32m",POST:"\x1B[34m",PUT:"\x1B[35m",DELETE:"\x1B[31m",PATCH:"\x1B[36m"}},xf=(f,$,Z)=>{let z=H0[f]||H0.reset,J=Z?.method?H0.method[Z.method]||H0.reset:H0.reset,Q=Z?.status?Z.status>=500?H0.error:Z.status>=400?H0.warn:H0.info:H0.reset;console.log(`
|
|
103
103
|
${z}[${f.toUpperCase()}]${H0.reset} ${$} - ${J}${Z?.method||""}${H0.reset}`);let X={timestamp:new Date().toISOString(),...Z,status:Z?.status?`${Q}${Z.status}${H0.reset}`:void 0,method:Z?.method?`${J>z}${Z.method}${H0.reset}`:void 0};console.log(JSON.stringify(X,null,2)+`
|
|
104
|
-
`)},J8=(f)=>{let{app:$,logger:Z,logLevel:z="info",onRequest:J,onSend:Q,onError:X}=f||{};$?.addHooks("onRequest",(W)=>{W.req.startTime=Date.now(),Z?.()??xf(z,"Incoming Request",{method:W.req.method,url:W.path,headers:{"user-agent":W.req.headers.get("user-agent"),"content-type":W.req.headers.get("content-type")}}),J?.(W)}),$?.addHooks("onSend",async(W,Y)=>{let V=`${Date.now()-W.req.startTime}ms`;Z?.()??xf(z,"Response Sent",{method:W.req.method,url:W.url.toString(),status:Y.status,duration:V,reqId:W.get?.("requestId"),headers:{"content-type":Y.headers.get("content-type")}});let
|
|
104
|
+
`)},J8=(f)=>{let{app:$,logger:Z,logLevel:z="info",onRequest:J,onSend:Q,onError:X}=f||{};$?.addHooks("onRequest",(W)=>{W.req.startTime=Date.now(),Z?.()??xf(z,"Incoming Request",{method:W.req.method,url:W.path,headers:{"user-agent":W.req.headers.get("user-agent"),"content-type":W.req.headers.get("content-type")}}),J?.(W)}),$?.addHooks("onSend",async(W,Y)=>{let V=`${Date.now()-W.req.startTime}ms`;Z?.()??xf(z,"Response Sent",{method:W.req.method,url:W.url.toString(),status:Y.status,duration:V,reqId:W.get?.("requestId"),headers:{"content-type":Y.headers.get("content-type")}});let w=await Q?.(W);if(w instanceof Response)return w}),$?.addHooks("onError",async(W,Y,V)=>{Z?.()??xf("error","Unhandled Error",{method:V.method,url:Y,status:500,error:W.message});let w=await X?.(W,Y,V);if(w instanceof Response)return w})},gf=(f,$,Z,z=0,J,Q)=>{let X=H0.method[$]||H0.reset,W=z>=500?H0.error:z>=400?H0.warn:H0.info,Y=Q?`[${Q}] `:"",V=f==="<--"?`${f} ${X}${$}${H0.reset} ${Z} ${Y}`:`${f} ${X}${$}${H0.reset} ${Z} ${W}${z}${H0.reset} ${J??""} ${Y}`;console.log(V)},FJ=(f)=>{let $=Date.now()-f;return $<1000?`${$}ms`:`${Math.round($/1000)}s`},Q8=(f)=>{let{app:$,log:Z,onRequest:z,onSend:J,onError:Q}=f;$.addHooks("onRequest",(X)=>{let{req:W,path:Y}=X;W.startTime=Date.now(),Z?.()??gf("<--",W.method,Y),z?.(W,Y)}),$.addHooks("onSend",async(X,W)=>{let{method:Y,url:V}=X.req,w=new URL(V).pathname,D=X.get?.("requestId");Z?.()??gf("-->",Y,w,W?.status,FJ(X.req.startTime),D);let O=await J?.(X);return O instanceof Response?O:W}),$.addHooks("onError",async(X,W,Y)=>{let V=Y.path;Z?.()??gf(X.message,Y.method,V,500);let w=await Q?.(X,V,Y);if(w instanceof Response)return w})};function X8(f,$){if(!f)throw Error("JWT library is not defined, please provide jwt to authenticateJwt Function");return(Z)=>{try{let z=Z.cookies?.accessToken??Z.req?.headers?.get("Authorization");if(!z)return Z.json({message:"Unauthorized",error:"No token provided"},401);if(z.startsWith("Bearer "))z=z.slice(7);let J=f?.verify(z,$);if(!J)return Z.json({message:"Unauthorized",error:"Token could not be decoded"},401);Z.set("user",J)}catch(z){let J="Invalid token";if(z.name==="TokenExpiredError")J="Token expired";else if(z.name==="JsonWebTokenError")J="Malformed or tampered token";return Z.json({message:"Unauthorized",error:J},401)}}}function W8(f,$,Z){if(!f)throw Error("JWT library is not defined, please provide jwt to authenticateJwtDB Function");if(!$)throw Error("User model is not defined, please provide UserModel to authenticateJwtDB Function");return async(z)=>{try{let J=z.cookies?.accessToken??z.req?.headers?.get("Authorization");if(!J)return z.json({message:"Unauthorized",error:"No token provided"},401);if(J.startsWith("Bearer "))J=J.slice(7);let Q=f?.verify(J,Z);if(!Q)return z.json({message:"Unauthorized",error:"Token could not be decoded"},401);let X=await $.findById(Q._id).select("-password -refreshToken");if(!X)return z.json({message:"Unauthorized: User not found"},404);z.set("user",X);return}catch(J){let Q="Invalid token";if(J.name==="TokenExpiredError")Q="Token expired";else if(J.name==="JsonWebTokenError")Q="Malformed or tampered token";return z.json({message:"Unauthorized",error:Q},401)}}}var h0=(f)=>f!==null&&typeof f==="object"&&typeof f.then==="function",kf=(f)=>f!==null&&typeof f==="object"&&typeof f.status==="number"&&typeof f.headers==="object";async function m0(f,$,Z){if(!$?.length)return;for(let z=0;z<$.length;z++){let J=$[z](...Z),Q=J instanceof Promise?await J:J;if(Q&&f!=="onRequest")return Q}}async function Y8(f,$,Z){for(let z of f){let J=await z($,Z);if(J)return J}}async function F8(f,$,Z){let z=await UJ(f,$,Z),J=h0(z)?await z:z;if(J)return J}async function UJ(f,$,Z){if($.endsWith("/"))$=$.slice(0,-1);if(!f.filters.has($))if(f.filterFunction.length)for(let z of f.filterFunction){let J=await z(Z);if(J)return J}else return Response.json({error:"Protected route, authentication required"},{status:401})}async function l1(f,$,Z){if(f.staticPath){let W=!0;if(f.staticRequestPath)W=Z.startsWith(f.staticRequestPath);if(W){let Y=await VJ(f,Z,$);if(Y)return Y}}let Q=(f.router.find($.req.method,"*")?.handler).slice(-1);if(Q.length>0){let W=await Q[0]($);if(kf(W))return W}let X=await Promise.resolve(f.routeNotFoundFunc($));return kf(X)?X:uf(404,`404 Route not found for ${Z}`)}function uf(f,$){return new Response(JSON.stringify({error:$}),{status:f,headers:{"Content-Type":"application/json"}})}async function VJ(f,$,Z){if(!f.staticPath)return null;let z=`${f.staticPath}${$}`;if(await Bun.file(z).exists()){let Q=n1(z);return Z.file(z,Q,200)}return null}var cf=(f)=>f.constructor.name==="AsyncFunction",U8=(f,$,Z,...z)=>{if($.length>5)f.push(`
|
|
105
105
|
for (let i = 0; i < diesel.hooks.${Z}.length; i++) {
|
|
106
106
|
const result = diesel.hooks.${Z}[i](${z});
|
|
107
107
|
const finalResult = result instanceof Promise ? await result : result;
|
|
@@ -170,7 +170,7 @@ ${z}[${f.toUpperCase()}]${H0.reset} ${$} - ${J}${Z?.method||""}${H0.reset}`);let
|
|
|
170
170
|
${$.join(`
|
|
171
171
|
`)}
|
|
172
172
|
}
|
|
173
|
-
`;return Function("runFilter","handleRouteNotFound","generateErrorResponse","Context","isPromise",J)(F8,
|
|
173
|
+
`;return Function("runFilter","handleRouteNotFound","generateErrorResponse","Context","isPromise",J)(F8,l1,uf,O1,h0)},V8=(f,$,Z,...z)=>{let J=[],Q;if(typeof z[0]==="string"||typeof z[0]==="object")Q=z[0];let X=z,W=f?.hasMiddleware?f.globalMiddlewares:[],Y=f?.hasMiddleware?f.middlewares.get(Z)||[]:[],V=[...W,...Y],w=f?.hasOnReqHook?f.hooks.onRequest:[],D=f.filters.has(Z),O=f.filterFunction;if(w&&w?.length>0)J.push(`
|
|
174
174
|
const onRequestResult = await runHooks(
|
|
175
175
|
"onRequest",
|
|
176
176
|
onRequestHooks,
|
|
@@ -217,4 +217,4 @@ ${z}[${f.toUpperCase()}]${H0.reset} ${$} - ${J}${Z?.method||""}${H0.reset}`);let
|
|
|
217
217
|
${J.join(`
|
|
218
218
|
`)}
|
|
219
219
|
}
|
|
220
|
-
`;return Function("executeBunMiddlewares","handlers","runHooks","filterFunctions","onRequestHooks","allMiddlewares",q)(Y8,X,h0,O,B,V)};var BJ=(f,$)=>{try{return $(f)}catch{return f.replace(/(?:%[0-9A-Fa-f]{2})+/g,(Z)=>{try{return $(Z)}catch{return Z}})}},HJ=(f)=>BJ(f,decodeURI),p1=(f)=>{let $=f.indexOf("/",f.indexOf(":")+4),Z=$;for(;Z<f.length;Z++){let z=f.charCodeAt(Z);if(z===37){let J=f.indexOf("?",Z),Q=f.slice($,J===-1?void 0:J);return HJ(Q.includes("%25")?Q.replace(/%25/g,"%2525"):Q)}else if(z===63)break}return f.slice($,Z)};var mf=Symbol.for,m0=Symbol("kCapture"),G8=mf("events.errorMonitor"),GJ=Symbol("events.maxEventTargetListeners"),OJ=Symbol("events.maxEventTargetListenersWarned"),w8=mf("nodejs.rejection"),DJ=mf("nodejs.rejection"),B8=Array.prototype.slice,d0=10,k0=function(f){if(this._events===void 0||this._events===this.__proto__._events)this._events={__proto__:null},this._eventsCount=0;if(this._maxListeners??=void 0,this[m0]=f?.captureRejections?Boolean(f?.captureRejections):Y0[m0])this.emit=TJ},Y0=k0.prototype={};Y0._events=void 0;Y0._eventsCount=0;Y0._maxListeners=void 0;Y0.setMaxListeners=function(f){return df(f,"setMaxListeners",0),this._maxListeners=f,this};Y0.constructor=k0;Y0.getMaxListeners=function(){return this?._maxListeners??d0};function O8(f,$){var{_events:Z}=f;if($[0]??=Error("Unhandled error."),!Z)throw $[0];var z=Z[G8];if(z)for(var J of B8.call(z))J.apply(f,$);var Q=Z.error;if(!Q)throw $[0];for(var J of B8.call(Q))J.apply(f,$);return!0}function KJ(f,$,Z,z){$.then(void 0,function(J){queueMicrotask(()=>LJ(f,J,Z,z))})}function LJ(f,$,Z,z){if(typeof f[w8]==="function")f[w8]($,Z,...z);else try{f[m0]=!1,f.emit("error",$)}finally{f[m0]=!0}}var MJ=function(f,...$){if(f==="error")return O8(this,$);var{_events:Z}=this;if(Z===void 0)return!1;var z=Z[f];if(z===void 0)return!1;let J=z.length>1?z.slice():z;for(let Q=0,{length:X}=J;Q<X;Q++){let W=J[Q];switch($.length){case 0:W.call(this);break;case 1:W.call(this,$[0]);break;case 2:W.call(this,$[0],$[1]);break;case 3:W.call(this,$[0],$[1],$[2]);break;default:W.apply(this,$);break}}return!0},TJ=function(f,...$){if(f==="error")return O8(this,$);var{_events:Z}=this;if(Z===void 0)return!1;var z=Z[f];if(z===void 0)return!1;let J=z.length>1?z.slice():z;for(let Q=0,{length:X}=J;Q<X;Q++){let W=J[Q],Y;switch($.length){case 0:Y=W.call(this);break;case 1:Y=W.call(this,$[0]);break;case 2:Y=W.call(this,$[0],$[1]);break;case 3:Y=W.call(this,$[0],$[1],$[2]);break;default:Y=W.apply(this,$);break}if(Y!==void 0&&typeof Y?.then==="function"&&Y.then===Promise.prototype.then)KJ(this,Y,f,$)}return!0};Y0.emit=MJ;Y0.addListener=function(f,$){O1($);var Z=this._events;if(!Z)Z=this._events={__proto__:null},this._eventsCount=0;else if(Z.newListener)this.emit("newListener",f,$.listener??$);var z=Z[f];if(!z)Z[f]=[$],this._eventsCount++;else{z.push($);var J=this._maxListeners??d0;if(J>0&&z.length>J&&!z.warned)D8(this,f,z)}return this};Y0.on=Y0.addListener;Y0.prependListener=function(f,$){O1($);var Z=this._events;if(!Z)Z=this._events={__proto__:null},this._eventsCount=0;else if(Z.newListener)this.emit("newListener",f,$.listener??$);var z=Z[f];if(!z)Z[f]=[$],this._eventsCount++;else{z.unshift($);var J=this._maxListeners??d0;if(J>0&&z.length>J&&!z.warned)D8(this,f,z)}return this};function D8(f,$,Z){Z.warned=!0;let z=Error(`Possible EventEmitter memory leak detected. ${Z.length} ${String($)} listeners added to [${f.constructor.name}]. Use emitter.setMaxListeners() to increase limit`);z.name="MaxListenersExceededWarning",z.emitter=f,z.type=$,z.count=Z.length,console.warn(z)}function K8(f,$,...Z){this.removeListener(f,$),$.apply(this,Z)}Y0.once=function(f,$){O1($);let Z=K8.bind(this,f,$);return Z.listener=$,this.addListener(f,Z),this};Y0.prependOnceListener=function(f,$){O1($);let Z=K8.bind(this,f,$);return Z.listener=$,this.prependListener(f,Z),this};Y0.removeListener=function(f,$){O1($);var{_events:Z}=this;if(!Z)return this;var z=Z[f];if(!z)return this;var J=z.length;let Q=-1;for(let X=J-1;X>=0;X--)if(z[X]===$||z[X].listener===$){Q=X;break}if(Q<0)return this;if(Q===0)z.shift();else z.splice(Q,1);if(z.length===0)delete Z[f],this._eventsCount--;return this};Y0.off=Y0.removeListener;Y0.removeAllListeners=function(f){var{_events:$}=this;if(f&&$){if($[f])delete $[f],this._eventsCount--}else this._events={__proto__:null};return this};Y0.listeners=function(f){var{_events:$}=this;if(!$)return[];var Z=$[f];if(!Z)return[];return Z.map((z)=>z.listener??z)};Y0.rawListeners=function(f){var{_events:$}=this;if(!$)return[];var Z=$[f];if(!Z)return[];return Z.slice()};Y0.listenerCount=function(f){var{_events:$}=this;if(!$)return 0;return $[f]?.length??0};Y0.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};Y0[m0]=!1;function AJ(f,$,Z){var z=Z?.signal;if(L8(z,"options.signal"),z?.aborted)throw new hf(void 0,{cause:z?.reason});let{resolve:J,reject:Q,promise:X}=$newPromiseCapability(Promise),W=(B)=>{if(f.removeListener($,Y),z!=null)o1(z,"abort",V);Q(B)},Y=(...B)=>{if(typeof f.removeListener==="function")f.removeListener("error",W);if(z!=null)o1(z,"abort",V);J(B)};if(H8(f,$,Y,{once:!0}),$!=="error"&&typeof f.once==="function")f.once("error",W);function V(){o1(f,$,Y),o1(f,"error",W),Q(new hf(void 0,{cause:z?.reason}))}if(z!=null)H8(z,"abort",V,{once:!0});return X}function qJ(f,$){return f.listeners($)}function jJ(f,...$){df(f,"setMaxListeners",0);var Z;if($&&(Z=$.length))for(let z=0;z<Z;z++)$[z].setMaxListeners(f);else d0=f}function CJ(f,$){return f.listenerCount($)}function o1(f,$,Z,z){if(typeof f.removeListener==="function")f.removeListener($,Z);else f.removeEventListener($,Z,z)}function H8(f,$,Z,z){if(typeof f.on==="function")if(z.once)f.once($,Z);else f.on($,Z);else f.addEventListener($,Z,z)}class hf extends Error{constructor(f="The operation was aborted",$=void 0){if($!==void 0&&typeof $!=="object")throw e0("options","Object",$);super(f,$);this.code="ABORT_ERR",this.name="AbortError"}}function e0(f,$,Z){let z=TypeError(`The "${f}" argument must be of type ${$}. Received ${Z}`);return z.code="ERR_INVALID_ARG_TYPE",z}function RJ(f,$,Z){let z=RangeError(`The "${f}" argument is out of range. It must be ${$}. Received ${Z}`);return z.code="ERR_OUT_OF_RANGE",z}function L8(f,$){if(f!==void 0&&(f===null||typeof f!=="object"||!("aborted"in f)))throw e0($,"AbortSignal",f)}function df(f,$,Z,z){if(typeof f!=="number")throw e0($,"number",f);if(Z!=null&&f<Z||z!=null&&f>z||(Z!=null||z!=null)&&Number.isNaN(f))throw RJ($,`${Z!=null?`>= ${Z}`:""}${Z!=null&&z!=null?" && ":""}${z!=null?`<= ${z}`:""}`,f)}function O1(f){if(typeof f!=="function")throw TypeError("The listener must be a function")}function NJ(f,$){if(typeof f!=="boolean")throw e0($,"boolean",f)}function IJ(f){return f?._maxListeners??d0}function SJ(f,$){if(f===void 0)throw e0("signal","AbortSignal",f);if(L8(f,"signal"),typeof $!=="function")throw e0("listener","function",$);let Z;if(f.aborted)queueMicrotask(()=>$());else f.addEventListener("abort",$,{__proto__:null,once:!0}),Z=()=>{f.removeEventListener("abort",$)};return{__proto__:null,[Symbol.dispose](){Z?.()}}}Object.defineProperties(k0,{captureRejections:{get(){return Y0[m0]},set(f){NJ(f,"EventEmitter.captureRejections"),Y0[m0]=f},enumerable:!0},defaultMaxListeners:{enumerable:!0,get:()=>{return d0},set:(f)=>{df(f,"defaultMaxListeners",0),d0=f}},kMaxEventTargetListeners:{value:GJ,enumerable:!1,configurable:!1,writable:!1},kMaxEventTargetListenersWarned:{value:OJ,enumerable:!1,configurable:!1,writable:!1}});Object.assign(k0,{once:AJ,getEventListeners:qJ,getMaxListeners:IJ,setMaxListeners:jJ,EventEmitter:k0,usingDomains:!1,captureRejectionSymbol:DJ,errorMonitor:G8,addAbortListener:SJ,init:k0,listenerCount:CJ});var $1=Object.freeze({});class f1{static instance;routes;tempRoutes;tempMiddlewares=new Map;router;hasOnReqHook;hasPreHandlerHook;hasPostHandlerHook;hasOnSendHook;hasOnError;hooks;corsConfig;FilterRoutes;filters;filterFunction;hasFilterEnabled;serverInstance;staticFiles;user_jwt_secret;baseApiUrl;enableFileRouter;idleTimeOut;routeNotFoundFunc;prefixApiUrl;compileConfig;#f=!1;emitter;errorFormat;platform="bun";staticPath;staticRequestPath=void 0;get;post;put;patch;delete;any;head;options;propfind;constructor(f={}){z8.forEach((q)=>{this[q.toLocaleLowerCase()]=(R,...b)=>{return this.addRoute(q,R,b),this}});let{router:$="t2",routerInstance:Z,errorFormat:z="json",platform:J="bun",enableFileRouting:Q=!1,prefixApiUrl:X="",baseApiUrl:W="",jwtSecret:Y,idleTimeOut:V=10,pipelineArchitecture:B=!1,logger:D,onError:O}=f;if(Z)this.router=Z;else this.router=vf.create($);if(this.errorFormat=z,this.platform=J,!f1.instance)f1.instance=this;if(B)this.#f=!0;if(this.errorFormat=z,this.emitter=new k0,this.prefixApiUrl=X??"",this.fetch=this.fetch.bind(this),this.routes={},this.idleTimeOut=V??10,this.enableFileRouter=Q??!1,this.baseApiUrl=W||"",this.user_jwt_secret=Y||process.env.DIESEL_JWT_SECRET||"default_diesel_secret_for_jwt",this.tempRoutes=new Map,this.corsConfig=null,this.hasOnReqHook=!1,this.hasPreHandlerHook=!1,this.hasPostHandlerHook=!1,this.hasOnSendHook=!1,this.hasOnError=!1,this.hooks={onRequest:[],preHandler:[],postHandler:[],onSend:[],onError:[],onClose:[]},O)this.addHooks("onError",(q,R)=>{console.log("Got an exception:",q),console.log("Request Path:",R)});if(D)this.useLogger({app:this});this.FilterRoutes=[],this.filters=new Set,this.filterFunction=[],this.hasFilterEnabled=!1,this.serverInstance=null,this.staticPath=null,this.staticFiles={},this.routeNotFoundFunc=()=>{},this.compileConfig=null}static router(f){if(!this.instance)this.instance=new f1;return new Proxy(this.instance,{get($,Z,z){return(J,Q)=>{let X=Q,W="";if(typeof J==="string")W=J;else if(typeof J==="function")X=J;else if(typeof J!=="string")W="";let Y=f+W;return $[Z](Y,X)}}})}setupFilter(){return this.hasFilterEnabled=!0,{publicRoutes:(...f)=>{return this.FilterRoutes=f,this.setupFilter()},permitAll:()=>{for(let f of this?.FilterRoutes){if(f.endsWith("/"))f=f.slice(0,-1);this.filters.add(f)}return this.setupFilter()},authenticate:(f)=>{if(f?.length){let $=async(Z,z)=>{let J=Z.path;for(let Q of this.filters)if(J.startsWith(Q))return;for(let Q of f){let X=await Q(Z,z);if(X)return X}};this.router.addMiddleware("/",[$])}},authenticateJwt:(f)=>{let $=async(Z)=>{let z=Z.path;for(let Q of this.filters)if(z.startsWith(Q))return;let J=X8(f,this.user_jwt_secret)(Z);if(J)return J};this.router.addMiddleware("/",$)},authenticateJwtDB:(f,$)=>{let Z=async(z)=>{let J=z.path;for(let X of this.filters)if(J.startsWith(X))return;let Q=W8(f,$,this.user_jwt_secret)(z);if(Q)return Q};this.router.addMiddleware("/",Z)}}}redirect(f,$,Z){return this.any(f,(z)=>{let J=z.params,Q=$;if(J)for(let W in J)Q=Q.replace(`:${W}`,J[W]);let X=z.url.search;if(X)Q+=X;return z.redirect(Q,Z)}),this}static(f,$){return this.staticPath=f,this.staticRequestPath=$,this}staticHtml(f){return this.staticFiles={...this.staticFiles,...f},this}addHooks(f,$){if(typeof f!=="string")throw Error("hookName must be a string");if(typeof $!=="function")throw Error("callback must be a instance of function");switch(f){case"onRequest":this.hooks.onRequest?.push($),this.hasOnReqHook=!0;break;case"preHandler":this.hooks.preHandler?.push($),this.hasPreHandlerHook=!0;break;case"postHandler":this.hooks.postHandler?.push($),this.hasPostHandlerHook=!0;break;case"onSend":this.hooks.onSend?.push($),this.hasOnSendHook=!0;break;case"onError":this.hooks.onError?.push($),this.hasOnError=!0;break;case"onClose":this.hooks.onClose?.push($);break;default:throw Error(`Unknown hook type: ${f}`)}return this}useLogger(f){return Q8(f),this}useAdvancedLogger(f){return J8(f),this}BunRoute(f,$,...Z){if(!$||typeof $!=="string")throw Error("give a path in string format");let z=V8(this,f.toUpperCase(),$,...Z);return this.routes[$]=z,this}listen(f,...$){let Z="0.0.0.0",z=void 0,J={};for(let X of $)if(typeof X==="string")Z=X;else if(typeof X==="function")z=X;else if(typeof X==="object"&&X!==null)J=X;let Q={port:f,hostname:Z,idleTimeOut:this.idleTimeOut,fetch:this.fetch(),static:this.staticFiles};if(this.routes&&Object.keys(this.routes).length>0)Q.routes=this.routes;if(J.cert&&J.key)Q.certFile=J.cert,Q.keyFile=J.key;return this.serverInstance=Bun?.serve(Q),z&&z(),this.serverInstance}close(f){if(this.serverInstance)this.serverInstance.stop(!0),this.serverInstance=null,f?f():console.log("Server has been stopped");else console.warn("Server is not running.")}cfFetch(){return this.tempRoutes=null,this.tempMiddlewares=null,(f,$,Z)=>{return this.#$(f,void 0,$,Z)}}fetch(){if(this.tempRoutes=null,this.tempMiddlewares=null,this.platform==="cf"||this.platform==="cloudflare"){if(this.#f){let f=yf(this);return($,Z,z)=>{return f($,this,void 0,Z,z).catch(async(J)=>{return this.handleError(J,p1($.url),$)})}}return(f,$,Z)=>{return this.#$(f,void 0,$,Z)}}if(this.#f){let f=yf(this);return($,Z)=>{return f($,this,Z,void 0,void 0).catch(async(z)=>{return this.handleError(z,p1($.url),$)})}}return this.#$.bind(this)}async#$(f,$,Z,z){let J=p1(f.url),Q=this.router.find(f.method,J),X=new G1(f,$||null,J,Q?.params||$1,Z||null,z||null);try{if(this.hasOnReqHook)await h0("onRequest",this.hooks.onRequest,[X]);if(this.hasPreHandlerHook){let V=await h0("preHandler",this.hooks.preHandler,[X]);if(V)return V}let W,Y=Q?.handler;if(Y.length===1)W=await Y[0](X);else for(let V=0;V<Y.length;V++)if(W=await Y[V](X),W)break;if(this.hasOnSendHook){let V=await h0("onSend",this.hooks.onSend,[X,W]);if(V)return V}if(W)return W;return await n1(this,X,J)}catch(W){return this.handleError(W,J,f)}}async handleError(f,$,Z){let J=this.errorFormat,Q=await h0("onError",this.hooks.onError,[f,$,Z]);if(Q)return Q;if(f&&typeof f==="object"&&f.name==="HTTPException"){let Y=f;if(console.error(`HTTPException on path: ${$}`,{status:Y.status,message:Y.message,cause:Y.cause,res:Y.res,stack:Y.stack}),Y.res)return Y.res;return J==="json"?Response.json({error:Y.message},{status:Y.status}):new Response(Y.message,{status:Y.status})}let X=f instanceof Error?f.message:"Internal Server Error",W=f instanceof Error?f.stack:void 0;if(console.error(`Error on path: ${$}`,{message:X,stack:W}),J==="json"){let Y={error:X,...!1,path:$};return Response.json(Y,{status:500,headers:{"Content-Type":"application/json"}})}else{let Y=`Error: ${X}`;return new Response(Y,{headers:{"Content-Type":"text/plain"},status:500})}}mount(f,$){let Z=f.endsWith("/*")?f.slice(0,-1):f,z=Z==="/"?0:Z.length;this.use(f,(J)=>{let Q=new URL(J.req.url);Q.pathname=Q.pathname.slice(z)||"/";let X=new Request(Q.toString(),J.req);return $(X,J.env,J.executionContext)})}route(f,$){f=f&&f.length>0?f:$?.prefixApiUrl;let Z=$?.tempRoutes??new Map;for(let[z,J]of Z.entries()){let Q=z.replace(/::\w+$/,""),X=`${f}${Q}`,W=J.handlers.slice(0,-1);this.router.addMiddleware(X,W);let Y=J.handlers[J.handlers.length-1],V=J.method;try{this.router.add(V,X,Y)}catch(B){console.error(`Error inserting ${X}:`,B)}}for(let[z,J]of $?.tempMiddlewares?.entries()){let Q=z==="/"?f||"/":`${f}${z}`;this.router.addMiddleware(Q,J)}return $=null,this}register(f){let $=new f1,Z=()=>{};return this}addMiddlewareInRouter(f,$){this.router.addMiddleware(f,$)}addRoute(f,$,Z){if(typeof $!=="string")throw Error(`Error in ${Z[Z.length-1]}: Path must be a string. Received: ${typeof $}`);if(typeof f!=="string")throw Error(`Error in addRoute: Method must be a string. Received: ${typeof f}`);this.tempRoutes?.set($+"::"+f,{method:f,handlers:Z});let z=Z.slice(0,-1),J=Z[Z.length-1];if(z.length>0)this.addMiddlewareInRouter($,z);try{if(f==="ANY"){let Q=["GET","POST","PUT","DELETE","PATCH","OPTIONS","HEAD","PROPFIND"];for(let X of Q)try{this.router.add(X,$,J)}catch(W){}}else this.router.add(f,$,J)}catch(Q){console.error(`Error inserting ${$}:`,Q)}}use(f,...$){if(typeof f==="string"){let Z=f==="/"?"/":f;if(!this.tempMiddlewares?.has(Z))this.tempMiddlewares?.set(Z,[]);this.tempMiddlewares?.get(Z).push(...$),this.router.addMiddleware(Z,$)}else if(typeof f==="function"){let Z=[f,...$];if(!this.tempMiddlewares?.has("/"))this.tempMiddlewares?.set("/",[]);this.tempMiddlewares?.get("/").push(...$),this.router.addMiddleware("/",Z)}return this}routeNotFound(f){return this.routeNotFoundFunc=f,this}onMethod(f,$,...Z){let z=Array.isArray(f)?f:[f];for(let J of z){let Q=J.toLowerCase();if(Q in this)this[Q]($,...Z);else this.addRoute(J.toUpperCase(),$,Z)}return this}on(f,$){return this.emitter.on(f,$),this}emit(f,...$){return this.emitter.emit(f,...$),this}}var PJ={string:"text/plain; charset=utf-8",object:"application/json; charset=utf-8",Uint8Array:"application/octet-stream",ArrayBuffer:"application/octet-stream"};class G1{req;server;path;paramNames;env;executionContext;headers=new Headers;parsedQuery=null;parsedParams=null;parsedCookies=null;parsedBody=null;contextData={};urlObject=null;constructor(f,$,Z,z,J,Q){this.req=f,this.server=$,this.path=Z,this.executionContext=Q,this.env=J,this.paramNames=z}setHeader(f,$){return this.headers.set(f,$),this}removeHeader(f){return this.headers.delete(f),this}set(f,$){return this.contextData[f]=$,this}get(f){return this.contextData[f]}get ip(){if(this.server)return this.server.requestIP(this.req)?.address??null;return this.req.headers.get("CF-Connecting-IP")||null}get url(){if(!this.urlObject)this.urlObject=new URL(this.req.url);return this.urlObject}get query(){if(!this.parsedQuery)this.parsedQuery=this.url.search?Object.fromEntries(this.url.searchParams):$1;return this.parsedQuery}get params(){if(!Array.isArray(this.paramNames))return this.paramNames;if(!this.parsedParams)try{this.parsedParams=bJ(this.paramNames,this.path)}catch(f){let $=f instanceof Error?f.message:String(f);throw Error(`Failed to extract route parameters: ${$}`)}return this.parsedParams??$1}get body(){if(this.req.method==="GET")return console.error(`you are trying to access body in GET method ${this.path}`),Promise.resolve($1);if(!this.parsedBody)this.parsedBody=(async()=>{try{let f=await _J(this.req);if(f.error)throw Error(f.error);return Object.keys(f).length===0?null:f}catch(f){throw Error("Invalid request body format")}})();return this.parsedBody}text(f,$=200,Z){if(Z)for(let[z,J]of Object.entries(Z))this.headers.set(z,J);if(!this.headers.has("Content-Type"))this.headers.set("Content-Type","text/plain; charset=utf-8");return new Response(f,{status:$,headers:this.headers})}send(f,$=200,Z){if(Z)for(let[Q,X]of Object.entries(Z))this.headers.set(Q,X);let z;if(f instanceof Uint8Array)z="Uint8Array";else if(f instanceof ArrayBuffer)z="ArrayBuffer";else z=typeof f;if(!this.headers.has("Content-Type"))this.headers.set("Content-Type",PJ[z]??"text/plain; charset=utf-8");let J=z==="object"&&f!==null?JSON.stringify(f):f;return new Response(J,{status:$,headers:this.headers})}json(f,$=200,Z){if(Z)for(let[z,J]of Object.entries(Z))this.headers.set(z,J);if(!this.headers.has("Content-Type"))this.headers.set("Content-Type","application/json; charset=utf-8");return new Response(JSON.stringify(f),{status:$,headers:this.headers})}file(f,$,Z=200,z){if(z)for(let[Q,X]of Object.entries(z))this.headers.set(Q,X);if(!this.headers.has("Content-Type"))this.headers.set("Content-Type",$??i1(f));let J=Bun.file(f);return new Response(J,{status:Z,headers:this.headers})}async ejs(f,$={},Z=200){console.log("this method is diabled now for some time")}redirect(f,$=302){return this.headers.set("Location",f),new Response(null,{status:$,headers:this.headers})}setCookie(f,$,Z={}){let z=`${encodeURIComponent(f)}=${encodeURIComponent($)}`;if(Z.maxAge)z+=`; Max-Age=${Z.maxAge}`;if(Z.expires)z+=`; Expires=${Z.expires.toUTCString()}`;if(Z.path)z+=`; Path=${Z.path}`;if(Z.domain)z+=`; Domain=${Z.domain}`;if(Z.secure)z+="; Secure";if(Z.httpOnly)z+="; HttpOnly";if(Z.sameSite)z+=`; SameSite=${Z.sameSite}`;return this.headers.append("Set-Cookie",z),this}get cookies(){if(!this.parsedCookies){let f=this.req.headers.get("cookie");this.parsedCookies=f?EJ(f):$1}return this.parsedCookies}stream(f){let $=new Headers(this.headers),Z=new ReadableStream({async start(z){await f(z),z.close()}});return new Response(Z,{headers:$})}yieldStream(f){return new Response}}function EJ(f){return Object.fromEntries(f.split(";").map(($)=>{let[Z,...z]=$.trim().split("=");return[Z,decodeURIComponent(z.join("="))]}))}function bJ(f,$){let Z={},[z]=$.split("?"),J=z.split("/").filter((X)=>X!==""),Q=J.length-f.length;for(let X=0;X<f.length;X++)Z[f[X]]=J[Q+X];return Z}function n4(f,$){let Z={},z=f.split("/"),[J]=$.split("?"),Q=J.split("/");if(z.length!==Q.length)return null;for(let X=0;X<z.length;X++){let W=z[X];if(W.charCodeAt(0)===58)Z[W.slice(1)]=Q[X]}return Z}async function _J(f){let $=f.headers.get("Content-Type")||"";if(!$)return{};if(f.headers.get("Content-Length")==="0"||!f.body)return{};if($.startsWith("application/json"))return await f.json();if($.startsWith("application/x-www-form-urlencoded")){let z=await f.text();return Object.fromEntries(new URLSearchParams(z))}if($.startsWith("multipart/form-data")){let z=await f.formData(),J={};for(let[Q,X]of z.entries())J[Q]=X;return J}return{error:"Unknown request body type"}}export{bJ as extractParam,n4 as extractDynamicParams,G1 as Context};
|
|
220
|
+
`;return Function("executeBunMiddlewares","handlers","runHooks","filterFunctions","onRequestHooks","allMiddlewares",q)(Y8,X,m0,O,w,V)};var BJ=(f,$)=>{try{return $(f)}catch{return f.replace(/(?:%[0-9A-Fa-f]{2})+/g,(Z)=>{try{return $(Z)}catch{return Z}})}},HJ=(f)=>BJ(f,decodeURI),p1=(f)=>{let $=f.indexOf("/",f.indexOf(":")+4),Z=$;for(;Z<f.length;Z++){let z=f.charCodeAt(Z);if(z===37){let J=f.indexOf("?",Z),Q=f.slice($,J===-1?void 0:J);return HJ(Q.includes("%25")?Q.replace(/%25/g,"%2525"):Q)}else if(z===63)break}return f.slice($,Z)};var mf=Symbol.for,d0=Symbol("kCapture"),G8=mf("events.errorMonitor"),GJ=Symbol("events.maxEventTargetListeners"),OJ=Symbol("events.maxEventTargetListenersWarned"),w8=mf("nodejs.rejection"),DJ=mf("nodejs.rejection"),B8=Array.prototype.slice,i0=10,k0=function(f){if(this._events===void 0||this._events===this.__proto__._events)this._events={__proto__:null},this._eventsCount=0;if(this._maxListeners??=void 0,this[d0]=f?.captureRejections?Boolean(f?.captureRejections):Y0[d0])this.emit=TJ},Y0=k0.prototype={};Y0._events=void 0;Y0._eventsCount=0;Y0._maxListeners=void 0;Y0.setMaxListeners=function(f){return df(f,"setMaxListeners",0),this._maxListeners=f,this};Y0.constructor=k0;Y0.getMaxListeners=function(){return this?._maxListeners??i0};function O8(f,$){var{_events:Z}=f;if($[0]??=Error("Unhandled error."),!Z)throw $[0];var z=Z[G8];if(z)for(var J of B8.call(z))J.apply(f,$);var Q=Z.error;if(!Q)throw $[0];for(var J of B8.call(Q))J.apply(f,$);return!0}function KJ(f,$,Z,z){$.then(void 0,function(J){queueMicrotask(()=>LJ(f,J,Z,z))})}function LJ(f,$,Z,z){if(typeof f[w8]==="function")f[w8]($,Z,...z);else try{f[d0]=!1,f.emit("error",$)}finally{f[d0]=!0}}var MJ=function(f,...$){if(f==="error")return O8(this,$);var{_events:Z}=this;if(Z===void 0)return!1;var z=Z[f];if(z===void 0)return!1;let J=z.length>1?z.slice():z;for(let Q=0,{length:X}=J;Q<X;Q++){let W=J[Q];switch($.length){case 0:W.call(this);break;case 1:W.call(this,$[0]);break;case 2:W.call(this,$[0],$[1]);break;case 3:W.call(this,$[0],$[1],$[2]);break;default:W.apply(this,$);break}}return!0},TJ=function(f,...$){if(f==="error")return O8(this,$);var{_events:Z}=this;if(Z===void 0)return!1;var z=Z[f];if(z===void 0)return!1;let J=z.length>1?z.slice():z;for(let Q=0,{length:X}=J;Q<X;Q++){let W=J[Q],Y;switch($.length){case 0:Y=W.call(this);break;case 1:Y=W.call(this,$[0]);break;case 2:Y=W.call(this,$[0],$[1]);break;case 3:Y=W.call(this,$[0],$[1],$[2]);break;default:Y=W.apply(this,$);break}if(Y!==void 0&&typeof Y?.then==="function"&&Y.then===Promise.prototype.then)KJ(this,Y,f,$)}return!0};Y0.emit=MJ;Y0.addListener=function(f,$){D1($);var Z=this._events;if(!Z)Z=this._events={__proto__:null},this._eventsCount=0;else if(Z.newListener)this.emit("newListener",f,$.listener??$);var z=Z[f];if(!z)Z[f]=[$],this._eventsCount++;else{z.push($);var J=this._maxListeners??i0;if(J>0&&z.length>J&&!z.warned)D8(this,f,z)}return this};Y0.on=Y0.addListener;Y0.prependListener=function(f,$){D1($);var Z=this._events;if(!Z)Z=this._events={__proto__:null},this._eventsCount=0;else if(Z.newListener)this.emit("newListener",f,$.listener??$);var z=Z[f];if(!z)Z[f]=[$],this._eventsCount++;else{z.unshift($);var J=this._maxListeners??i0;if(J>0&&z.length>J&&!z.warned)D8(this,f,z)}return this};function D8(f,$,Z){Z.warned=!0;let z=Error(`Possible EventEmitter memory leak detected. ${Z.length} ${String($)} listeners added to [${f.constructor.name}]. Use emitter.setMaxListeners() to increase limit`);z.name="MaxListenersExceededWarning",z.emitter=f,z.type=$,z.count=Z.length,console.warn(z)}function K8(f,$,...Z){this.removeListener(f,$),$.apply(this,Z)}Y0.once=function(f,$){D1($);let Z=K8.bind(this,f,$);return Z.listener=$,this.addListener(f,Z),this};Y0.prependOnceListener=function(f,$){D1($);let Z=K8.bind(this,f,$);return Z.listener=$,this.prependListener(f,Z),this};Y0.removeListener=function(f,$){D1($);var{_events:Z}=this;if(!Z)return this;var z=Z[f];if(!z)return this;var J=z.length;let Q=-1;for(let X=J-1;X>=0;X--)if(z[X]===$||z[X].listener===$){Q=X;break}if(Q<0)return this;if(Q===0)z.shift();else z.splice(Q,1);if(z.length===0)delete Z[f],this._eventsCount--;return this};Y0.off=Y0.removeListener;Y0.removeAllListeners=function(f){var{_events:$}=this;if(f&&$){if($[f])delete $[f],this._eventsCount--}else this._events={__proto__:null};return this};Y0.listeners=function(f){var{_events:$}=this;if(!$)return[];var Z=$[f];if(!Z)return[];return Z.map((z)=>z.listener??z)};Y0.rawListeners=function(f){var{_events:$}=this;if(!$)return[];var Z=$[f];if(!Z)return[];return Z.slice()};Y0.listenerCount=function(f){var{_events:$}=this;if(!$)return 0;return $[f]?.length??0};Y0.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};Y0[d0]=!1;function AJ(f,$,Z){var z=Z?.signal;if(L8(z,"options.signal"),z?.aborted)throw new hf(void 0,{cause:z?.reason});let{resolve:J,reject:Q,promise:X}=$newPromiseCapability(Promise),W=(w)=>{if(f.removeListener($,Y),z!=null)o1(z,"abort",V);Q(w)},Y=(...w)=>{if(typeof f.removeListener==="function")f.removeListener("error",W);if(z!=null)o1(z,"abort",V);J(w)};if(H8(f,$,Y,{once:!0}),$!=="error"&&typeof f.once==="function")f.once("error",W);function V(){o1(f,$,Y),o1(f,"error",W),Q(new hf(void 0,{cause:z?.reason}))}if(z!=null)H8(z,"abort",V,{once:!0});return X}function qJ(f,$){return f.listeners($)}function jJ(f,...$){df(f,"setMaxListeners",0);var Z;if($&&(Z=$.length))for(let z=0;z<Z;z++)$[z].setMaxListeners(f);else i0=f}function CJ(f,$){return f.listenerCount($)}function o1(f,$,Z,z){if(typeof f.removeListener==="function")f.removeListener($,Z);else f.removeEventListener($,Z,z)}function H8(f,$,Z,z){if(typeof f.on==="function")if(z.once)f.once($,Z);else f.on($,Z);else f.addEventListener($,Z,z)}class hf extends Error{constructor(f="The operation was aborted",$=void 0){if($!==void 0&&typeof $!=="object")throw f1("options","Object",$);super(f,$);this.code="ABORT_ERR",this.name="AbortError"}}function f1(f,$,Z){let z=TypeError(`The "${f}" argument must be of type ${$}. Received ${Z}`);return z.code="ERR_INVALID_ARG_TYPE",z}function RJ(f,$,Z){let z=RangeError(`The "${f}" argument is out of range. It must be ${$}. Received ${Z}`);return z.code="ERR_OUT_OF_RANGE",z}function L8(f,$){if(f!==void 0&&(f===null||typeof f!=="object"||!("aborted"in f)))throw f1($,"AbortSignal",f)}function df(f,$,Z,z){if(typeof f!=="number")throw f1($,"number",f);if(Z!=null&&f<Z||z!=null&&f>z||(Z!=null||z!=null)&&Number.isNaN(f))throw RJ($,`${Z!=null?`>= ${Z}`:""}${Z!=null&&z!=null?" && ":""}${z!=null?`<= ${z}`:""}`,f)}function D1(f){if(typeof f!=="function")throw TypeError("The listener must be a function")}function NJ(f,$){if(typeof f!=="boolean")throw f1($,"boolean",f)}function IJ(f){return f?._maxListeners??i0}function SJ(f,$){if(f===void 0)throw f1("signal","AbortSignal",f);if(L8(f,"signal"),typeof $!=="function")throw f1("listener","function",$);let Z;if(f.aborted)queueMicrotask(()=>$());else f.addEventListener("abort",$,{__proto__:null,once:!0}),Z=()=>{f.removeEventListener("abort",$)};return{__proto__:null,[Symbol.dispose](){Z?.()}}}Object.defineProperties(k0,{captureRejections:{get(){return Y0[d0]},set(f){NJ(f,"EventEmitter.captureRejections"),Y0[d0]=f},enumerable:!0},defaultMaxListeners:{enumerable:!0,get:()=>{return i0},set:(f)=>{df(f,"defaultMaxListeners",0),i0=f}},kMaxEventTargetListeners:{value:GJ,enumerable:!1,configurable:!1,writable:!1},kMaxEventTargetListenersWarned:{value:OJ,enumerable:!1,configurable:!1,writable:!1}});Object.assign(k0,{once:AJ,getEventListeners:qJ,getMaxListeners:IJ,setMaxListeners:jJ,EventEmitter:k0,usingDomains:!1,captureRejectionSymbol:DJ,errorMonitor:G8,addAbortListener:SJ,init:k0,listenerCount:CJ});var Z1=Object.freeze({});class $1{static instance;routes;tempRoutes;tempMiddlewares=new Map;router;hasOnReqHook;hasPreHandlerHook;hasPostHandlerHook;hasOnSendHook;hasOnError;hooks;corsConfig;FilterRoutes;filters;filterFunction;hasFilterEnabled;serverInstance;staticFiles;user_jwt_secret;baseApiUrl;enableFileRouter;idleTimeOut;routeNotFoundFunc;prefixApiUrl;compileConfig;#f=!1;emitter;errorFormat;platform="bun";staticPath;staticRequestPath=void 0;get;post;put;patch;delete;any;head;options;propfind;constructor(f={}){z8.forEach((q)=>{this[q.toLocaleLowerCase()]=(R,...b)=>{return this.addRoute(q,R,b),this}});let{router:$="t2",routerInstance:Z,errorFormat:z="json",platform:J="bun",enableFileRouting:Q=!1,prefixApiUrl:X="",baseApiUrl:W="",jwtSecret:Y,idleTimeOut:V=10,pipelineArchitecture:w=!1,logger:D,onError:O}=f;if(Z)this.router=Z;else this.router=vf.create($);if(this.errorFormat=z,this.platform=J,!$1.instance)$1.instance=this;if(w)this.#f=!0;if(this.errorFormat=z,this.emitter=new k0,this.prefixApiUrl=X??"",this.fetch=this.fetch.bind(this),this.routes={},this.idleTimeOut=V??10,this.enableFileRouter=Q??!1,this.baseApiUrl=W||"",this.user_jwt_secret=Y||process.env.DIESEL_JWT_SECRET||"default_diesel_secret_for_jwt",this.tempRoutes=new Map,this.corsConfig=null,this.hasOnReqHook=!1,this.hasPreHandlerHook=!1,this.hasPostHandlerHook=!1,this.hasOnSendHook=!1,this.hasOnError=!1,this.hooks={onRequest:[],preHandler:[],postHandler:[],onSend:[],onError:[],onClose:[]},O)this.addHooks("onError",(q,R)=>{console.log("Got an exception:",q),console.log("Request Path:",R)});if(D)this.useLogger({app:this});this.FilterRoutes=[],this.filters=new Set,this.filterFunction=[],this.hasFilterEnabled=!1,this.serverInstance=null,this.staticPath=null,this.staticFiles={},this.routeNotFoundFunc=()=>{},this.compileConfig=null}static router(f){if(!this.instance)this.instance=new $1;return new Proxy(this.instance,{get($,Z,z){return(J,Q)=>{let X=Q,W="";if(typeof J==="string")W=J;else if(typeof J==="function")X=J;else if(typeof J!=="string")W="";let Y=f+W;return $[Z](Y,X)}}})}setupFilter(){return this.hasFilterEnabled=!0,{publicRoutes:(...f)=>{return this.FilterRoutes=f,this.setupFilter()},permitAll:()=>{for(let f of this?.FilterRoutes){if(f.endsWith("/"))f=f.slice(0,-1);this.filters.add(f)}return this.setupFilter()},authenticate:(f)=>{if(f?.length){let $=async(Z,z)=>{let J=Z.path;for(let Q of this.filters)if(J.startsWith(Q))return;for(let Q of f){let X=await Q(Z,z);if(X)return X}};this.router.addMiddleware("/",[$])}},authenticateJwt:(f)=>{let $=async(Z)=>{let z=Z.path;for(let Q of this.filters)if(z.startsWith(Q))return;let J=X8(f,this.user_jwt_secret)(Z);if(J)return J};this.router.addMiddleware("/",$)},authenticateJwtDB:(f,$)=>{let Z=async(z)=>{let J=z.path;for(let X of this.filters)if(J.startsWith(X))return;let Q=W8(f,$,this.user_jwt_secret)(z);if(Q)return Q};this.router.addMiddleware("/",Z)}}}redirect(f,$,Z){return this.any(f,(z)=>{let J=z.params,Q=$;if(J)for(let W in J)Q=Q.replace(`:${W}`,J[W]);let X=z.url.search;if(X)Q+=X;return z.redirect(Q,Z)}),this}static(f,$){return this.staticPath=f,this.staticRequestPath=$,this}staticHtml(f){return this.staticFiles={...this.staticFiles,...f},this}addHooks(f,$){if(typeof f!=="string")throw Error("hookName must be a string");if(typeof $!=="function")throw Error("callback must be a instance of function");switch(f){case"onRequest":this.hooks.onRequest?.push($),this.hasOnReqHook=!0;break;case"preHandler":this.hooks.preHandler?.push($),this.hasPreHandlerHook=!0;break;case"postHandler":this.hooks.postHandler?.push($),this.hasPostHandlerHook=!0;break;case"onSend":this.hooks.onSend?.push($),this.hasOnSendHook=!0;break;case"onError":this.hooks.onError?.push($),this.hasOnError=!0;break;case"onClose":this.hooks.onClose?.push($);break;default:throw Error(`Unknown hook type: ${f}`)}return this}useLogger(f){return Q8(f),this}useAdvancedLogger(f){return J8(f),this}BunRoute(f,$,...Z){if(!$||typeof $!=="string")throw Error("give a path in string format");let z=V8(this,f.toUpperCase(),$,...Z);return this.routes[$]=z,this}listen(f,...$){let Z="0.0.0.0",z=void 0,J={};for(let X of $)if(typeof X==="string")Z=X;else if(typeof X==="function")z=X;else if(typeof X==="object"&&X!==null)J=X;let Q={port:f,hostname:Z,idleTimeOut:this.idleTimeOut,fetch:this.fetch(),static:this.staticFiles};if(this.routes&&Object.keys(this.routes).length>0)Q.routes=this.routes;if(J.cert&&J.key)Q.certFile=J.cert,Q.keyFile=J.key;return this.serverInstance=Bun?.serve(Q),z&&z(),this.serverInstance}close(f){if(this.serverInstance)this.serverInstance.stop(!0),this.serverInstance=null,f?f():console.log("Server has been stopped");else console.warn("Server is not running.")}cfFetch(){return this.tempRoutes=null,this.tempMiddlewares=null,(f,$,Z)=>{return this.#$(f,void 0,$,Z)}}fetch(){if(this.tempRoutes=null,this.tempMiddlewares=null,this.platform==="cf"||this.platform==="cloudflare"){if(this.#f){let f=yf(this);return($,Z,z)=>{return f($,this,void 0,Z,z).catch(async(J)=>{return this.handleError(J,p1($.url),$)})}}return(f,$,Z)=>{return this.#$(f,void 0,$,Z)}}if(this.#f){let f=yf(this);return($,Z)=>{return f($,this,Z,void 0,void 0).catch(async(z)=>{return this.handleError(z,p1($.url),$)})}}return this.#$.bind(this)}async#$(f,$,Z,z){let J=p1(f.url),Q=this.router.find(f.method,J),X=new O1(f,$||null,J,Q?.params||Z1,Z||null,z||null);try{if(this.hasOnReqHook)await m0("onRequest",this.hooks.onRequest,[X]);if(this.hasPreHandlerHook){let V=await m0("preHandler",this.hooks.preHandler,[X]);if(V)return V}let W,Y=Q?.handler;if(Y.length===1){let V=Y[0](X);W=h0(V)?await V:V}else for(let V=0;V<Y.length;V++){let w=Y[V](X);if(W=h0(w)?await w:w,W)break}if(this.hasOnSendHook){let V=await m0("onSend",this.hooks.onSend,[X,W]);if(V)return V}if(W)return W;return await l1(this,X,J)}catch(W){return this.handleError(W,J,f)}}async handleError(f,$,Z){let J=this.errorFormat,Q=await m0("onError",this.hooks.onError,[f,$,Z]);if(Q)return Q;if(f&&typeof f==="object"&&f.name==="HTTPException"){let Y=f;if(console.error(`HTTPException on path: ${$}`,{status:Y.status,message:Y.message,cause:Y.cause,res:Y.res,stack:Y.stack}),Y.res)return Y.res;return J==="json"?Response.json({error:Y.message},{status:Y.status}):new Response(Y.message,{status:Y.status})}let X=f instanceof Error?f.message:"Internal Server Error",W=f instanceof Error?f.stack:void 0;if(console.error(`Error on path: ${$}`,{message:X,stack:W}),J==="json"){let Y={error:X,...!1,path:$};return Response.json(Y,{status:500,headers:{"Content-Type":"application/json"}})}else{let Y=`Error: ${X}`;return new Response(Y,{headers:{"Content-Type":"text/plain"},status:500})}}mount(f,$){let Z=f.endsWith("/*")?f.slice(0,-1):f,z=Z==="/"?0:Z.length;this.use(f,(J)=>{let Q=new URL(J.req.url);Q.pathname=Q.pathname.slice(z)||"/";let X=new Request(Q.toString(),J.req);return $(X,J.env,J.executionContext)})}route(f,$){f=f&&f.length>0?f:$?.prefixApiUrl;let Z=$?.tempRoutes??new Map;for(let[z,J]of Z.entries()){let Q=z.replace(/::\w+$/,""),X=`${f}${Q}`,W=J.handlers.slice(0,-1);this.router.addMiddleware(X,W);let Y=J.handlers[J.handlers.length-1],V=J.method;try{this.router.add(V,X,Y)}catch(w){console.error(`Error inserting ${X}:`,w)}}for(let[z,J]of $?.tempMiddlewares?.entries()){let Q=z==="/"?f||"/":`${f}${z}`;this.router.addMiddleware(Q,J)}return $=null,this}register(f){let $=new $1,Z=()=>{};return this}addMiddlewareInRouter(f,$){this.router.addMiddleware(f,$)}addRoute(f,$,Z){if(typeof $!=="string")throw Error(`Error in ${Z[Z.length-1]}: Path must be a string. Received: ${typeof $}`);if(typeof f!=="string")throw Error(`Error in addRoute: Method must be a string. Received: ${typeof f}`);this.tempRoutes?.set($+"::"+f,{method:f,handlers:Z});let z=Z.slice(0,-1),J=Z[Z.length-1];if(z.length>0)this.addMiddlewareInRouter($,z);try{if(f==="ANY"){let Q=["GET","POST","PUT","DELETE","PATCH","OPTIONS","HEAD","PROPFIND"];for(let X of Q)try{this.router.add(X,$,J)}catch(W){}}else this.router.add(f,$,J)}catch(Q){console.error(`Error inserting ${$}:`,Q)}}use(f,...$){if(typeof f==="string"){let Z=f==="/"?"/":f;if(!this.tempMiddlewares?.has(Z))this.tempMiddlewares?.set(Z,[]);this.tempMiddlewares?.get(Z).push(...$),this.router.addMiddleware(Z,$)}else if(typeof f==="function"){let Z=[f,...$];if(!this.tempMiddlewares?.has("/"))this.tempMiddlewares?.set("/",[]);this.tempMiddlewares?.get("/").push(...$),this.router.addMiddleware("/",Z)}return this}routeNotFound(f){return this.routeNotFoundFunc=f,this}onMethod(f,$,...Z){let z=Array.isArray(f)?f:[f];for(let J of z){let Q=J.toLowerCase();if(Q in this)this[Q]($,...Z);else this.addRoute(J.toUpperCase(),$,Z)}return this}on(f,$){return this.emitter.on(f,$),this}emit(f,...$){return this.emitter.emit(f,...$),this}}var PJ={string:"text/plain; charset=utf-8",object:"application/json; charset=utf-8",Uint8Array:"application/octet-stream",ArrayBuffer:"application/octet-stream"};class O1{req;server;path;paramNames;env;executionContext;headers=new Headers;parsedQuery=null;parsedParams=null;parsedCookies=null;parsedBody=null;contextData={};urlObject=null;constructor(f,$,Z,z,J,Q){this.req=f,this.server=$,this.path=Z,this.executionContext=Q,this.env=J,this.paramNames=z}setHeader(f,$){return this.headers.set(f,$),this}removeHeader(f){return this.headers.delete(f),this}set(f,$){return this.contextData[f]=$,this}get(f){return this.contextData[f]}get ip(){if(this.server)return this.server.requestIP(this.req)?.address??null;return this.req.headers.get("CF-Connecting-IP")||null}get url(){if(!this.urlObject)this.urlObject=new URL(this.req.url);return this.urlObject}get query(){if(!this.parsedQuery)this.parsedQuery=this.url.search?Object.fromEntries(this.url.searchParams):Z1;return this.parsedQuery}get params(){if(!Array.isArray(this.paramNames))return this.paramNames;if(!this.parsedParams)try{this.parsedParams=bJ(this.paramNames,this.path)}catch(f){let $=f instanceof Error?f.message:String(f);throw Error(`Failed to extract route parameters: ${$}`)}return this.parsedParams??Z1}get body(){if(this.req.method==="GET")return console.error(`you are trying to access body in GET method ${this.path}`),Promise.resolve(Z1);if(!this.parsedBody)this.parsedBody=(async()=>{try{let f=await _J(this.req);if(f.error)throw Error(f.error);return Object.keys(f).length===0?null:f}catch(f){throw Error("Invalid request body format")}})();return this.parsedBody}text(f,$=200,Z){if(Z)for(let[z,J]of Object.entries(Z))this.headers.set(z,J);if(!this.headers.has("Content-Type"))this.headers.set("Content-Type","text/plain; charset=utf-8");return new Response(f,{status:$,headers:this.headers})}send(f,$=200,Z){if(Z)for(let[Q,X]of Object.entries(Z))this.headers.set(Q,X);let z;if(f instanceof Uint8Array)z="Uint8Array";else if(f instanceof ArrayBuffer)z="ArrayBuffer";else z=typeof f;if(!this.headers.has("Content-Type"))this.headers.set("Content-Type",PJ[z]??"text/plain; charset=utf-8");let J=z==="object"&&f!==null?JSON.stringify(f):f;return new Response(J,{status:$,headers:this.headers})}json(f,$=200,Z){if(Z)for(let[z,J]of Object.entries(Z))this.headers.set(z,J);if(!this.headers.has("Content-Type"))this.headers.set("Content-Type","application/json; charset=utf-8");return new Response(JSON.stringify(f),{status:$,headers:this.headers})}file(f,$,Z=200,z){if(z)for(let[Q,X]of Object.entries(z))this.headers.set(Q,X);if(!this.headers.has("Content-Type"))this.headers.set("Content-Type",$??n1(f));let J=Bun.file(f);return new Response(J,{status:Z,headers:this.headers})}async ejs(f,$={},Z=200){console.log("this method is diabled now for some time")}redirect(f,$=302){return this.headers.set("Location",f),new Response(null,{status:$,headers:this.headers})}setCookie(f,$,Z={}){let z=`${encodeURIComponent(f)}=${encodeURIComponent($)}`;if(Z.maxAge)z+=`; Max-Age=${Z.maxAge}`;if(Z.expires)z+=`; Expires=${Z.expires.toUTCString()}`;if(Z.path)z+=`; Path=${Z.path}`;if(Z.domain)z+=`; Domain=${Z.domain}`;if(Z.secure)z+="; Secure";if(Z.httpOnly)z+="; HttpOnly";if(Z.sameSite)z+=`; SameSite=${Z.sameSite}`;return this.headers.append("Set-Cookie",z),this}get cookies(){if(!this.parsedCookies){let f=this.req.headers.get("cookie");this.parsedCookies=f?EJ(f):Z1}return this.parsedCookies}stream(f){let $=new Headers(this.headers),Z=new ReadableStream({async start(z){await f(z),z.close()}});return new Response(Z,{headers:$})}yieldStream(f){return new Response}}function EJ(f){return Object.fromEntries(f.split(";").map(($)=>{let[Z,...z]=$.trim().split("=");return[Z,decodeURIComponent(z.join("="))]}))}function bJ(f,$){let Z={},[z]=$.split("?"),J=z.split("/").filter((X)=>X!==""),Q=J.length-f.length;for(let X=0;X<f.length;X++)Z[f[X]]=J[Q+X];return Z}function p4(f,$){let Z={},z=f.split("/"),[J]=$.split("?"),Q=J.split("/");if(z.length!==Q.length)return null;for(let X=0;X<z.length;X++){let W=z[X];if(W.charCodeAt(0)===58)Z[W.slice(1)]=Q[X]}return Z}async function _J(f){let $=f.headers.get("Content-Type")||"";if(!$)return{};if(f.headers.get("Content-Length")==="0"||!f.body)return{};if($.startsWith("application/json"))return await f.json();if($.startsWith("application/x-www-form-urlencoded")){let z=await f.text();return Object.fromEntries(new URLSearchParams(z))}if($.startsWith("multipart/form-data")){let z=await f.formData(),J={};for(let[Q,X]of z.entries())J[Q]=X;return J}return{error:"Unknown request body type"}}export{bJ as extractParam,p4 as extractDynamicParams,O1 as Context};
|