@fern-api/typescript-dynamic-snippets 0.0.7 → 0.0.9
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/cjs/DynamicSnippetsGenerator.cjs +6 -6
- package/cjs/DynamicSnippetsGenerator.d.cts +4 -2
- package/cjs/{DynamicSnippetsGeneratorContext-DFkk3dho.d.cts → DynamicSnippetsGeneratorContext-CmDa2k9n.d.cts} +1 -1
- package/cjs/EndpointSnippetGenerator.cjs +6 -6
- package/cjs/EndpointSnippetGenerator.d.cts +2 -1
- package/cjs/context/DynamicSnippetsGeneratorContext.cjs +11 -11
- package/cjs/context/DynamicSnippetsGeneratorContext.d.cts +1 -1
- package/cjs/context/DynamicTypeLiteralMapper.cjs +6 -6
- package/cjs/context/DynamicTypeLiteralMapper.d.cts +1 -1
- package/cjs/context/FilePropertyMapper.cjs +15 -15
- package/cjs/context/FilePropertyMapper.d.cts +1 -1
- package/cjs/index.cjs +18 -18
- package/cjs/index.d.cts +2 -1
- package/esm/DynamicSnippetsGenerator.d.ts +4 -2
- package/esm/DynamicSnippetsGenerator.js +1 -1
- package/esm/{DynamicSnippetsGeneratorContext-DFkk3dho.d.ts → DynamicSnippetsGeneratorContext-CmDa2k9n.d.ts} +1 -1
- package/esm/EndpointSnippetGenerator.d.ts +2 -1
- package/esm/EndpointSnippetGenerator.js +1 -1
- package/esm/chunk-D7ZDXIQ6.js +1 -0
- package/esm/chunk-JGNWFXNM.js +1 -0
- package/esm/chunk-PXWPOKCJ.js +1 -0
- package/esm/chunk-RL2XA35J.js +27 -0
- package/esm/{chunk-25TNFA5L.js → chunk-T2HPPEKP.js} +1 -1
- package/esm/{chunk-LX5O4JB7.js → chunk-XC2QAVJY.js} +1 -1
- package/esm/chunk-XXAPM4QI.js +1 -0
- package/esm/context/DynamicSnippetsGeneratorContext.d.ts +1 -1
- package/esm/context/DynamicSnippetsGeneratorContext.js +1 -1
- package/esm/context/DynamicTypeLiteralMapper.d.ts +1 -1
- package/esm/context/DynamicTypeLiteralMapper.js +1 -1
- package/esm/context/FilePropertyMapper.d.ts +1 -1
- package/esm/context/FilePropertyMapper.js +1 -1
- package/esm/index.d.ts +2 -1
- package/esm/index.js +10 -10
- package/package.json +1 -1
- package/esm/chunk-736FTN3M.js +0 -1
- package/esm/chunk-CQ55KPJT.js +0 -1
- package/esm/chunk-SQLJANKO.js +0 -1
- package/esm/chunk-V6G7NZKW.js +0 -1
- package/esm/chunk-YD6EIACZ.js +0 -27
package/esm/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{a as Hi}from"./chunk-CQ55KPJT.js";import"./chunk-V6G7NZKW.js";import"./chunk-25TNFA5L.js";import"./chunk-SQLJANKO.js";import"./chunk-736FTN3M.js";import"./chunk-LX5O4JB7.js";import{e as ne,f as y,g as ki,h as zi,i as ji,k as o,l as s,m as i}from"./chunk-YD6EIACZ.js";var ht=y((Jl,vt)=>{"use strict";o();i();var Ji="Function.prototype.bind called on incompatible ",Ki=Object.prototype.toString,Qi=Math.max,Yi="[object Function]",gt=function(r,t){for(var n=[],u=0;u<r.length;u+=1)n[u]=r[u];for(var a=0;a<t.length;a+=1)n[a+r.length]=t[a];return n},Xi=function(r,t){for(var n=[],u=t||0,a=0;u<r.length;u+=1,a+=1)n[a]=r[u];return n},Zi=function(e,r){for(var t="",n=0;n<e.length;n+=1)t+=e[n],n+1<e.length&&(t+=r);return t};vt.exports=function(r){var t=this;if(typeof t!="function"||Ki.apply(t)!==Yi)throw new TypeError(Ji+t);for(var n=Xi(arguments,1),u,a=function(){if(this instanceof u){var v=t.apply(this,gt(n,arguments));return Object(v)===v?v:this}return t.apply(r,gt(n,arguments))},f=Qi(0,t.length-n.length),c=[],l=0;l<f;l++)c[l]="$"+l;if(u=Function("binder","return function ("+Zi(c,",")+"){ return binder.apply(this,arguments); }")(a),t.prototype){var m=function(){};m.prototype=t.prototype,u.prototype=new m,m.prototype=null}return u}});var Or=y((Yl,dt)=>{"use strict";o();i();var Vi=ht();dt.exports=Function.prototype.bind||Vi});var St=y((Vl,mt)=>{"use strict";o();i();mt.exports=Error});var wt=y((ts,bt)=>{"use strict";o();i();bt.exports=EvalError});var Ot=y((is,At)=>{"use strict";o();i();At.exports=RangeError});var xt=y((fs,qt)=>{"use strict";o();i();qt.exports=ReferenceError});var oe=y((ps,$t)=>{"use strict";o();i();$t.exports=SyntaxError});var w=y((gs,Et)=>{"use strict";o();i();Et.exports=TypeError});var It=y((ds,Pt)=>{"use strict";o();i();Pt.exports=URIError});var ie=y((bs,Tt)=>{"use strict";o();i();Tt.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var u=42;r[t]=u;for(t in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var a=Object.getOwnPropertySymbols(r);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(r,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var f=Object.getOwnPropertyDescriptor(r,t);if(f.value!==u||f.enumerable!==!0)return!1}return!0}});var ae=y((Os,Rt)=>{"use strict";o();i();var Ft=typeof Symbol!="undefined"&&Symbol,ra=ie();Rt.exports=function(){return typeof Ft!="function"||typeof Symbol!="function"||typeof Ft("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:ra()}});var Dt=y(($s,Nt)=>{"use strict";o();i();var ue={__proto__:null,foo:{}},ea=Object;Nt.exports=function(){return{__proto__:ue}.foo===ue.foo&&!(ue instanceof ea)}});var Bt=y((Is,_t)=>{"use strict";o();i();var ta=Function.prototype.call,na=Object.prototype.hasOwnProperty,oa=Or();_t.exports=oa.call(ta,na)});var E=y((Rs,Lt)=>{"use strict";o();i();var d,ia=St(),aa=wt(),ua=Ot(),fa=xt(),Z=oe(),X=w(),la=It(),Wt=Function,fe=function(e){try{return Wt('"use strict"; return ('+e+").constructor;")()}catch(r){}},G=Object.getOwnPropertyDescriptor;if(G)try{G({},"")}catch(e){G=null}var le=function(){throw new X},sa=G?function(){try{return arguments.callee,le}catch(e){try{return G(arguments,"callee").get}catch(r){return le}}}():le,Q=ae()(),pa=Dt()(),b=Object.getPrototypeOf||(pa?function(e){return e.__proto__}:null),Y={},ca=typeof Uint8Array=="undefined"||!b?d:b(Uint8Array),k={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?d:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?d:ArrayBuffer,"%ArrayIteratorPrototype%":Q&&b?b([][Symbol.iterator]()):d,"%AsyncFromSyncIteratorPrototype%":d,"%AsyncFunction%":Y,"%AsyncGenerator%":Y,"%AsyncGeneratorFunction%":Y,"%AsyncIteratorPrototype%":Y,"%Atomics%":typeof Atomics=="undefined"?d:Atomics,"%BigInt%":typeof BigInt=="undefined"?d:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?d:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?d:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?d:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":ia,"%eval%":eval,"%EvalError%":aa,"%Float32Array%":typeof Float32Array=="undefined"?d:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?d:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?d:FinalizationRegistry,"%Function%":Wt,"%GeneratorFunction%":Y,"%Int8Array%":typeof Int8Array=="undefined"?d:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?d:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?d:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Q&&b?b(b([][Symbol.iterator]())):d,"%JSON%":typeof JSON=="object"?JSON:d,"%Map%":typeof Map=="undefined"?d:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Q||!b?d:b(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?d:Promise,"%Proxy%":typeof Proxy=="undefined"?d:Proxy,"%RangeError%":ua,"%ReferenceError%":fa,"%Reflect%":typeof Reflect=="undefined"?d:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?d:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Q||!b?d:b(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?d:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Q&&b?b(""[Symbol.iterator]()):d,"%Symbol%":Q?Symbol:d,"%SyntaxError%":Z,"%ThrowTypeError%":sa,"%TypedArray%":ca,"%TypeError%":X,"%Uint8Array%":typeof Uint8Array=="undefined"?d:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?d:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?d:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?d:Uint32Array,"%URIError%":la,"%WeakMap%":typeof WeakMap=="undefined"?d:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?d:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?d:WeakSet};if(b)try{null.error}catch(e){Mt=b(b(e)),k["%Error.prototype%"]=Mt}var Mt,ya=function e(r){var t;if(r==="%AsyncFunction%")t=fe("async function () {}");else if(r==="%GeneratorFunction%")t=fe("function* () {}");else if(r==="%AsyncGeneratorFunction%")t=fe("async function* () {}");else if(r==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(r==="%AsyncIteratorPrototype%"){var u=e("%AsyncGenerator%");u&&b&&(t=b(u.prototype))}return k[r]=t,t},Ct={__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"]},ar=Or(),qr=Bt(),ga=ar.call(Function.call,Array.prototype.concat),va=ar.call(Function.apply,Array.prototype.splice),Ut=ar.call(Function.call,String.prototype.replace),xr=ar.call(Function.call,String.prototype.slice),ha=ar.call(Function.call,RegExp.prototype.exec),da=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ma=/\\(\\)?/g,Sa=function(r){var t=xr(r,0,1),n=xr(r,-1);if(t==="%"&&n!=="%")throw new Z("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new Z("invalid intrinsic syntax, expected opening `%`");var u=[];return Ut(r,da,function(a,f,c,l){u[u.length]=c?Ut(l,ma,"$1"):f||a}),u},ba=function(r,t){var n=r,u;if(qr(Ct,n)&&(u=Ct[n],n="%"+u[0]+"%"),qr(k,n)){var a=k[n];if(a===Y&&(a=ya(n)),typeof a=="undefined"&&!t)throw new X("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:u,name:n,value:a}}throw new Z("intrinsic "+r+" does not exist!")};Lt.exports=function(r,t){if(typeof r!="string"||r.length===0)throw new X("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new X('"allowMissing" argument must be a boolean');if(ha(/^%?[^%]*%?$/,r)===null)throw new Z("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Sa(r),u=n.length>0?n[0]:"",a=ba("%"+u+"%",t),f=a.name,c=a.value,l=!1,m=a.alias;m&&(u=m[0],va(n,ga([0,1],m)));for(var v=1,h=!0;v<n.length;v+=1){var g=n[v],A=xr(g,0,1),x=xr(g,-1);if((A==='"'||A==="'"||A==="`"||x==='"'||x==="'"||x==="`")&&A!==x)throw new Z("property names with quotes must have matching quotes");if((g==="constructor"||!h)&&(l=!0),u+="."+g,f="%"+u+"%",qr(k,f))c=k[f];else if(c!=null){if(!(g in c)){if(!t)throw new X("base intrinsic for "+r+" exists, but the property is not available.");return}if(G&&v+1>=n.length){var S=G(c,g);h=!!S,h&&"get"in S&&!("originalValue"in S.get)?c=S.get:c=c[g]}else h=qr(c,g),c=c[g];h&&!l&&(k[f]=c)}}return c}});var Er=y((_s,Gt)=>{"use strict";o();i();var wa=E(),$r=wa("%Object.defineProperty%",!0)||!1;if($r)try{$r({},"a",{value:1})}catch(e){$r=!1}Gt.exports=$r});var se=y((Cs,kt)=>{"use strict";o();i();var Aa=E(),Pr=Aa("%Object.getOwnPropertyDescriptor%",!0);if(Pr)try{Pr([],"length")}catch(e){Pr=null}kt.exports=Pr});var pe=y((Ls,Ht)=>{"use strict";o();i();var zt=Er(),Oa=oe(),V=w(),jt=se();Ht.exports=function(r,t,n){if(!r||typeof r!="object"&&typeof r!="function")throw new V("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new V("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new V("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new V("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new V("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new V("`loose`, if provided, must be a boolean");var u=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,f=arguments.length>5?arguments[5]:null,c=arguments.length>6?arguments[6]:!1,l=!!jt&&jt(r,t);if(zt)zt(r,t,{configurable:f===null&&l?l.configurable:!f,enumerable:u===null&&l?l.enumerable:!u,value:n,writable:a===null&&l?l.writable:!a});else if(c||!u&&!a&&!f)r[t]=n;else throw new Oa("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var ye=y((zs,Kt)=>{"use strict";o();i();var ce=Er(),Jt=function(){return!!ce};Jt.hasArrayLengthDefineBug=function(){if(!ce)return null;try{return ce([],"length",{value:1}).length!==1}catch(r){return!0}};Kt.exports=Jt});var Vt=y((Js,Zt)=>{"use strict";o();i();var qa=E(),Qt=pe(),xa=ye()(),Yt=se(),Xt=w(),$a=qa("%Math.floor%");Zt.exports=function(r,t){if(typeof r!="function")throw new Xt("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||$a(t)!==t)throw new Xt("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],u=!0,a=!0;if("length"in r&&Yt){var f=Yt(r,"length");f&&!f.configurable&&(u=!1),f&&!f.writable&&(a=!1)}return(u||a||!n)&&(xa?Qt(r,"length",t,!0,!0):Qt(r,"length",t)),r}});var Fr=y((Ys,Ir)=>{"use strict";o();i();var ge=Or(),Tr=E(),Ea=Vt(),Pa=w(),tn=Tr("%Function.prototype.apply%"),nn=Tr("%Function.prototype.call%"),on=Tr("%Reflect.apply%",!0)||ge.call(nn,tn),rn=Er(),Ia=Tr("%Math.max%");Ir.exports=function(r){if(typeof r!="function")throw new Pa("a function is required");var t=on(ge,nn,arguments);return Ea(t,1+Ia(0,r.length-(arguments.length-1)),!0)};var en=function(){return on(ge,tn,arguments)};rn?rn(Ir.exports,"apply",{value:en}):Ir.exports.apply=en});var ve=y((Vs,un)=>{"use strict";o();i();var an=Object.prototype.toString;un.exports=function(r){var t=an.call(r),n=t==="[object Arguments]";return n||(n=t!=="[object Array]"&&r!==null&&typeof r=="object"&&typeof r.length=="number"&&r.length>=0&&an.call(r.callee)==="[object Function]"),n}});var hn=y((tp,vn)=>{"use strict";o();i();var gn;Object.keys||(ur=Object.prototype.hasOwnProperty,he=Object.prototype.toString,fn=ve(),de=Object.prototype.propertyIsEnumerable,ln=!de.call({toString:null},"toString"),sn=de.call(function(){},"prototype"),fr=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Rr=function(e){var r=e.constructor;return r&&r.prototype===e},pn={$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},cn=function(){if(typeof window=="undefined")return!1;for(var e in window)try{if(!pn["$"+e]&&ur.call(window,e)&&window[e]!==null&&typeof window[e]=="object")try{Rr(window[e])}catch(r){return!0}}catch(r){return!0}return!1}(),yn=function(e){if(typeof window=="undefined"||!cn)return Rr(e);try{return Rr(e)}catch(r){return!1}},gn=function(r){var t=r!==null&&typeof r=="object",n=he.call(r)==="[object Function]",u=fn(r),a=t&&he.call(r)==="[object String]",f=[];if(!t&&!n&&!u)throw new TypeError("Object.keys called on a non-object");var c=sn&&n;if(a&&r.length>0&&!ur.call(r,0))for(var l=0;l<r.length;++l)f.push(String(l));if(u&&r.length>0)for(var m=0;m<r.length;++m)f.push(String(m));else for(var v in r)!(c&&v==="prototype")&&ur.call(r,v)&&f.push(String(v));if(ln)for(var h=yn(r),g=0;g<fr.length;++g)!(h&&fr[g]==="constructor")&&ur.call(r,fr[g])&&f.push(fr[g]);return f});var ur,he,fn,de,ln,sn,fr,Rr,pn,cn,yn;vn.exports=gn});var bn=y((ip,Sn)=>{"use strict";o();i();var Ta=Array.prototype.slice,Fa=ve(),dn=Object.keys,Nr=dn?function(r){return dn(r)}:hn(),mn=Object.keys;Nr.shim=function(){if(Object.keys){var r=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);r||(Object.keys=function(n){return Fa(n)?mn(Ta.call(n)):mn(n)})}else Object.keys=Nr;return Object.keys||Nr};Sn.exports=Nr});var lr=y((fp,qn)=>{"use strict";o();i();var Ra=bn(),Na=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",Da=Object.prototype.toString,_a=Array.prototype.concat,wn=pe(),Ba=function(e){return typeof e=="function"&&Da.call(e)==="[object Function]"},An=ye()(),Ma=function(e,r,t,n){if(r in e){if(n===!0){if(e[r]===t)return}else if(!Ba(n)||!n())return}An?wn(e,r,t,!0):wn(e,r,t)},On=function(e,r){var t=arguments.length>2?arguments[2]:{},n=Ra(r);Na&&(n=_a.call(n,Object.getOwnPropertySymbols(r)));for(var u=0;u<n.length;u+=1)Ma(e,n[u],r[n[u]],t[n[u]])};On.supportsDescriptors=!!An;qn.exports=On});var P=y((pp,En)=>{"use strict";o();i();var xn=E(),$n=Fr(),Ca=$n(xn("String.prototype.indexOf"));En.exports=function(r,t){var n=xn(r,!!t);return typeof n=="function"&&Ca(r,".prototype.")>-1?$n(n):n}});var Tn=y((gp,In)=>{"use strict";o();i();var Ua=E(),Pn=Ua("%Array%"),Wa=!Pn.isArray&&P()("Object.prototype.toString");In.exports=Pn.isArray||function(r){return Wa(r)==="[object Array]"}});var me=y((dp,Fn)=>{"use strict";o();i();Fn.exports=Tn()});var Nn=y((bp,Rn)=>{"use strict";o();i();var La=E(),Ga=P(),ka=w(),za=me(),ja=La("%Reflect.apply%",!0)||Ga("Function.prototype.apply");Rn.exports=function(r,t){var n=arguments.length>2?arguments[2]:[];if(!za(n))throw new ka("Assertion failed: optional `argumentsList`, if provided, must be a List");return ja(r,t,n)}});function Dn(){throw new Error("setTimeout has not been defined")}function _n(){throw new Error("clearTimeout has not been defined")}function Bn(e){if(M===setTimeout)return setTimeout(e,0);if((M===Dn||!M)&&setTimeout)return M=setTimeout,setTimeout(e,0);try{return M(e,0)}catch(r){try{return M.call(null,e,0)}catch(t){return M.call(this,e,0)}}}function Ha(e){if(C===clearTimeout)return clearTimeout(e);if((C===_n||!C)&&clearTimeout)return C=clearTimeout,clearTimeout(e);try{return C(e)}catch(r){try{return C.call(null,e)}catch(t){return C.call(this,e)}}}function Ja(){!er||!z||(er=!1,z.length?N=z.concat(N):Dr=-1,N.length&&Mn())}function Mn(){if(!er){var e=Bn(Ja);er=!0;for(var r=N.length;r;){for(z=N,N=[];++Dr<r;)z&&z[Dr].run();Dr=-1,r=N.length}z=null,er=!1,Ha(e)}}function Ka(e){var r=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)r[t-1]=arguments[t];N.push(new Cn(e,r)),N.length===1&&!er&&Bn(Mn)}function Cn(e,r){this.fun=e,this.array=r}function j(){}function pu(e){throw new Error("process.binding is not supported")}function cu(){return"/"}function yu(e){throw new Error("process.chdir is not supported")}function gu(){return 0}function hu(e){var r=vu.call(rr)*.001,t=Math.floor(r),n=Math.floor(r%1*1e9);return e&&(t=t-e[0],n=n-e[1],n<0&&(t--,n+=1e9)),[t,n]}function mu(){var e=new Date,r=e-du;return r/1e3}var M,C,N,er,z,Dr,Qa,Ya,Xa,Za,Va,ru,eu,tu,nu,ou,iu,au,uu,fu,lu,su,rr,vu,du,Su,sr,Un=ne(()=>{"use strict";o();i();M=Dn,C=_n;typeof globalThis.setTimeout=="function"&&(M=setTimeout);typeof globalThis.clearTimeout=="function"&&(C=clearTimeout);N=[],er=!1,Dr=-1;Cn.prototype.run=function(){this.fun.apply(null,this.array)};Qa="browser",Ya="browser",Xa=!0,Za={},Va=[],ru="",eu={},tu={},nu={};ou=j,iu=j,au=j,uu=j,fu=j,lu=j,su=j;rr=globalThis.performance||{},vu=rr.now||rr.mozNow||rr.msNow||rr.oNow||rr.webkitNow||function(){return new Date().getTime()};du=new Date;Su={nextTick:Ka,title:Qa,browser:Xa,env:Za,argv:Va,version:ru,versions:eu,on:ou,addListener:iu,once:au,off:uu,removeListener:fu,removeAllListeners:lu,emit:su,binding:pu,cwd:cu,chdir:yu,umask:gu,hrtime:hu,platform:Ya,release:tu,config:nu,uptime:mu},sr=Su});var Se,be,Wn=ne(()=>{"use strict";o();i();typeof Object.create=="function"?Se=function(r,t){r.super_=t,r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}})}:Se=function(r,t){r.super_=t;var n=function(){};n.prototype=t.prototype,r.prototype=new n,r.prototype.constructor=r};be=Se});var Kn={};ki(Kn,{_extend:()=>Ie,debuglog:()=>Ln,default:()=>Iu,deprecate:()=>xe,format:()=>Cr,inherits:()=>be,inspect:()=>T,isArray:()=>$e,isBoolean:()=>Ur,isBuffer:()=>jn,isDate:()=>Mr,isError:()=>cr,isFunction:()=>yr,isNull:()=>gr,isNullOrUndefined:()=>Gn,isNumber:()=>Ee,isObject:()=>H,isPrimitive:()=>zn,isRegExp:()=>pr,isString:()=>vr,isSymbol:()=>kn,isUndefined:()=>I,log:()=>Hn});function Cr(e){if(!vr(e)){for(var r=[],t=0;t<arguments.length;t++)r.push(T(arguments[t]));return r.join(" ")}for(var t=1,n=arguments,u=n.length,a=String(e).replace(bu,function(c){if(c==="%%")return"%";if(t>=u)return c;switch(c){case"%s":return String(n[t++]);case"%d":return Number(n[t++]);case"%j":try{return JSON.stringify(n[t++])}catch(l){return"[Circular]"}default:return c}}),f=n[t];t<u;f=n[++t])gr(f)||!H(f)?a+=" "+f:a+=" "+T(f);return a}function xe(e,r){if(I(globalThis.process))return function(){return xe(e,r).apply(this,arguments)};if(sr.noDeprecation===!0)return e;var t=!1;function n(){if(!t){if(sr.throwDeprecation)throw new Error(r);sr.traceDeprecation?console.trace(r):console.error(r),t=!0}return e.apply(this,arguments)}return n}function Ln(e){if(I(we)&&(we=sr.env.NODE_DEBUG||""),e=e.toUpperCase(),!_r[e])if(new RegExp("\\b"+e+"\\b","i").test(we)){var r=0;_r[e]=function(){var t=Cr.apply(null,arguments);console.error("%s %d: %s",e,r,t)}}else _r[e]=function(){};return _r[e]}function T(e,r){var t={seen:[],stylize:Au};return arguments.length>=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),Ur(r)?t.showHidden=r:r&&Ie(t,r),I(t.showHidden)&&(t.showHidden=!1),I(t.depth)&&(t.depth=2),I(t.colors)&&(t.colors=!1),I(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=wu),Br(t,e,t.depth)}function wu(e,r){var t=T.styles[r];return t?"\x1B["+T.colors[t][0]+"m"+e+"\x1B["+T.colors[t][1]+"m":e}function Au(e,r){return e}function Ou(e){var r={};return e.forEach(function(t,n){r[t]=!0}),r}function Br(e,r,t){if(e.customInspect&&r&&yr(r.inspect)&&r.inspect!==T&&!(r.constructor&&r.constructor.prototype===r)){var n=r.inspect(t,e);return vr(n)||(n=Br(e,n,t)),n}var u=qu(e,r);if(u)return u;var a=Object.keys(r),f=Ou(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(r)),cr(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return Ae(r);if(a.length===0){if(yr(r)){var c=r.name?": "+r.name:"";return e.stylize("[Function"+c+"]","special")}if(pr(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(Mr(r))return e.stylize(Date.prototype.toString.call(r),"date");if(cr(r))return Ae(r)}var l="",m=!1,v=["{","}"];if($e(r)&&(m=!0,v=["[","]"]),yr(r)){var h=r.name?": "+r.name:"";l=" [Function"+h+"]"}if(pr(r)&&(l=" "+RegExp.prototype.toString.call(r)),Mr(r)&&(l=" "+Date.prototype.toUTCString.call(r)),cr(r)&&(l=" "+Ae(r)),a.length===0&&(!m||r.length==0))return v[0]+l+v[1];if(t<0)return pr(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special");e.seen.push(r);var g;return m?g=xu(e,r,t,f,a):g=a.map(function(A){return qe(e,r,t,f,A,m)}),e.seen.pop(),$u(g,l,v)}function qu(e,r){if(I(r))return e.stylize("undefined","undefined");if(vr(r)){var t="'"+JSON.stringify(r).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(t,"string")}if(Ee(r))return e.stylize(""+r,"number");if(Ur(r))return e.stylize(""+r,"boolean");if(gr(r))return e.stylize("null","null")}function Ae(e){return"["+Error.prototype.toString.call(e)+"]"}function xu(e,r,t,n,u){for(var a=[],f=0,c=r.length;f<c;++f)Jn(r,String(f))?a.push(qe(e,r,t,n,String(f),!0)):a.push("");return u.forEach(function(l){l.match(/^\d+$/)||a.push(qe(e,r,t,n,l,!0))}),a}function qe(e,r,t,n,u,a){var f,c,l;if(l=Object.getOwnPropertyDescriptor(r,u)||{value:r[u]},l.get?l.set?c=e.stylize("[Getter/Setter]","special"):c=e.stylize("[Getter]","special"):l.set&&(c=e.stylize("[Setter]","special")),Jn(n,u)||(f="["+u+"]"),c||(e.seen.indexOf(l.value)<0?(gr(t)?c=Br(e,l.value,null):c=Br(e,l.value,t-1),c.indexOf(`
|
|
2
|
-
`)>-1&&(
|
|
3
|
-
`).map(function(
|
|
1
|
+
import{a as yu}from"./chunk-PXWPOKCJ.js";import"./chunk-XXAPM4QI.js";import"./chunk-T2HPPEKP.js";import"./chunk-D7ZDXIQ6.js";import"./chunk-JGNWFXNM.js";import"./chunk-XC2QAVJY.js";import{e as be,f as l,g as su,h as lu,i as cu,k as o,l as p,m as i}from"./chunk-RL2XA35J.js";var Lt=l((Ql,kt)=>{"use strict";o();i();var vu="Function.prototype.bind called on incompatible ",gu=Object.prototype.toString,du=Math.max,hu="[object Function]",Wt=function(r,t){for(var n=[],a=0;a<r.length;a+=1)n[a]=r[a];for(var u=0;u<t.length;u+=1)n[u+r.length]=t[u];return n},mu=function(r,t){for(var n=[],a=t||0,u=0;a<r.length;a+=1,u+=1)n[u]=r[a];return n},bu=function(e,r){for(var t="",n=0;n<e.length;n+=1)t+=e[n],n+1<e.length&&(t+=r);return t};kt.exports=function(r){var t=this;if(typeof t!="function"||gu.apply(t)!==hu)throw new TypeError(vu+t);for(var n=mu(arguments,1),a,u=function(){if(this instanceof a){var g=t.apply(this,Wt(n,arguments));return Object(g)===g?g:this}return t.apply(r,Wt(n,arguments))},f=du(0,t.length-n.length),c=[],y=0;y<f;y++)c[y]="$"+y;if(a=Function("binder","return function ("+bu(c,",")+"){ return binder.apply(this,arguments); }")(u),t.prototype){var h=function(){};h.prototype=t.prototype,a.prototype=new h,h.prototype=null}return a}});var L=l((rc,zt)=>{"use strict";o();i();var Su=Lt();zt.exports=Function.prototype.bind||Su});var Se=l((nc,Jt)=>{"use strict";o();i();Jt.exports=Error});var Ae=l((ac,Ht)=>{"use strict";o();i();Ht.exports=EvalError});var we=l((pc,Kt)=>{"use strict";o();i();Kt.exports=RangeError});var Pe=l((cc,Vt)=>{"use strict";o();i();Vt.exports=ReferenceError});var Ur=l((gc,Yt)=>{"use strict";o();i();Yt.exports=SyntaxError});var w=l((mc,Qt)=>{"use strict";o();i();Qt.exports=TypeError});var Oe=l((Ac,Xt)=>{"use strict";o();i();Xt.exports=URIError});var rn=l((Oc,Zt)=>{"use strict";o();i();Zt.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var a=42;r[t]=a;for(t in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var u=Object.getOwnPropertySymbols(r);if(u.length!==1||u[0]!==t||!Object.prototype.propertyIsEnumerable.call(r,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var f=Object.getOwnPropertyDescriptor(r,t);if(f.value!==a||f.enumerable!==!0)return!1}return!0}});var Ee=l((xc,tn)=>{"use strict";o();i();var en=typeof Symbol!="undefined"&&Symbol,Au=rn();tn.exports=function(){return typeof en!="function"||typeof Symbol!="function"||typeof en("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Au()}});var on=l((Fc,nn)=>{"use strict";o();i();var qe={__proto__:null,foo:{}},wu=Object;nn.exports=function(){return{__proto__:qe}.foo===qe.foo&&!(qe instanceof wu)}});var xe=l((Nc,an)=>{"use strict";o();i();var Pu=Function.prototype.call,Ou=Object.prototype.hasOwnProperty,Eu=L();an.exports=Eu.call(Pu,Ou)});var F=l((Dc,ln)=>{"use strict";o();i();var m,qu=Se(),xu=Ae(),$u=we(),Iu=Pe(),tr=Ur(),er=w(),Fu=Oe(),sn=Function,$e=function(e){try{return sn('"use strict"; return ('+e+").constructor;")()}catch(r){}},z=Object.getOwnPropertyDescriptor;if(z)try{z({},"")}catch(e){z=null}var Ie=function(){throw new er},Tu=z?function(){try{return arguments.callee,Ie}catch(e){try{return z(arguments,"callee").get}catch(r){return Ie}}}():Ie,Z=Ee()(),Ru=on()(),O=Object.getPrototypeOf||(Ru?function(e){return e.__proto__}:null),rr={},Nu=typeof Uint8Array=="undefined"||!O?m:O(Uint8Array),J={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?m:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?m:ArrayBuffer,"%ArrayIteratorPrototype%":Z&&O?O([][Symbol.iterator]()):m,"%AsyncFromSyncIteratorPrototype%":m,"%AsyncFunction%":rr,"%AsyncGenerator%":rr,"%AsyncGeneratorFunction%":rr,"%AsyncIteratorPrototype%":rr,"%Atomics%":typeof Atomics=="undefined"?m:Atomics,"%BigInt%":typeof BigInt=="undefined"?m:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?m:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?m:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?m:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":qu,"%eval%":eval,"%EvalError%":xu,"%Float32Array%":typeof Float32Array=="undefined"?m:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?m:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?m:FinalizationRegistry,"%Function%":sn,"%GeneratorFunction%":rr,"%Int8Array%":typeof Int8Array=="undefined"?m:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?m:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?m:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Z&&O?O(O([][Symbol.iterator]())):m,"%JSON%":typeof JSON=="object"?JSON:m,"%Map%":typeof Map=="undefined"?m:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Z||!O?m:O(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?m:Promise,"%Proxy%":typeof Proxy=="undefined"?m:Proxy,"%RangeError%":$u,"%ReferenceError%":Iu,"%Reflect%":typeof Reflect=="undefined"?m:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?m:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Z||!O?m:O(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?m:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Z&&O?O(""[Symbol.iterator]()):m,"%Symbol%":Z?Symbol:m,"%SyntaxError%":tr,"%ThrowTypeError%":Tu,"%TypedArray%":Nu,"%TypeError%":er,"%Uint8Array%":typeof Uint8Array=="undefined"?m:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?m:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?m:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?m:Uint32Array,"%URIError%":Fu,"%WeakMap%":typeof WeakMap=="undefined"?m:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?m:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?m:WeakSet};if(O)try{null.error}catch(e){un=O(O(e)),J["%Error.prototype%"]=un}var un,_u=function e(r){var t;if(r==="%AsyncFunction%")t=$e("async function () {}");else if(r==="%GeneratorFunction%")t=$e("function* () {}");else if(r==="%AsyncGeneratorFunction%")t=$e("async function* () {}");else if(r==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(r==="%AsyncIteratorPrototype%"){var a=e("%AsyncGenerator%");a&&O&&(t=O(a.prototype))}return J[r]=t,t},fn={__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"]},vr=L(),Dr=xe(),Uu=vr.call(Function.call,Array.prototype.concat),Du=vr.call(Function.apply,Array.prototype.splice),pn=vr.call(Function.call,String.prototype.replace),Br=vr.call(Function.call,String.prototype.slice),Bu=vr.call(Function.call,RegExp.prototype.exec),Mu=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Cu=/\\(\\)?/g,ju=function(r){var t=Br(r,0,1),n=Br(r,-1);if(t==="%"&&n!=="%")throw new tr("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new tr("invalid intrinsic syntax, expected opening `%`");var a=[];return pn(r,Mu,function(u,f,c,y){a[a.length]=c?pn(y,Cu,"$1"):f||u}),a},Gu=function(r,t){var n=r,a;if(Dr(fn,n)&&(a=fn[n],n="%"+a[0]+"%"),Dr(J,n)){var u=J[n];if(u===rr&&(u=_u(n)),typeof u=="undefined"&&!t)throw new er("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:a,name:n,value:u}}throw new tr("intrinsic "+r+" does not exist!")};ln.exports=function(r,t){if(typeof r!="string"||r.length===0)throw new er("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new er('"allowMissing" argument must be a boolean');if(Bu(/^%?[^%]*%?$/,r)===null)throw new tr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=ju(r),a=n.length>0?n[0]:"",u=Gu("%"+a+"%",t),f=u.name,c=u.value,y=!1,h=u.alias;h&&(a=h[0],Du(n,Uu([0,1],h)));for(var g=1,d=!0;g<n.length;g+=1){var v=n[g],A=Br(v,0,1),P=Br(v,-1);if((A==='"'||A==="'"||A==="`"||P==='"'||P==="'"||P==="`")&&A!==P)throw new tr("property names with quotes must have matching quotes");if((v==="constructor"||!d)&&(y=!0),a+="."+v,f="%"+a+"%",Dr(J,f))c=J[f];else if(c!=null){if(!(v in c)){if(!t)throw new er("base intrinsic for "+r+" exists, but the property is not available.");return}if(z&&g+1>=n.length){var S=z(c,v);d=!!S,d&&"get"in S&&!("originalValue"in S.get)?c=S.get:c=c[v]}else d=Dr(c,v),c=c[v];d&&!y&&(J[f]=c)}}return c}});var Fe=l((Cc,cn)=>{"use strict";o();i();cn.exports=Object});var vn=l((Wc,yn)=>{"use strict";o();i();yn.exports=Math.abs});var dn=l((zc,gn)=>{"use strict";o();i();gn.exports=Math.floor});var mn=l((Kc,hn)=>{"use strict";o();i();hn.exports=Math.max});var Sn=l((Qc,bn)=>{"use strict";o();i();bn.exports=Math.min});var wn=l((ry,An)=>{"use strict";o();i();An.exports=Math.pow});var On=l((ny,Pn)=>{"use strict";o();i();Pn.exports=Math.round});var qn=l((ay,En)=>{"use strict";o();i();En.exports=Number.isNaN||function(r){return r!==r}});var $n=l((py,xn)=>{"use strict";o();i();var Wu=qn();xn.exports=function(r){return Wu(r)||r===0?r:r<0?-1:1}});var Fn=l((cy,In)=>{"use strict";o();i();In.exports=Object.getOwnPropertyDescriptor});var gr=l((gy,Tn)=>{"use strict";o();i();var Mr=Fn();if(Mr)try{Mr([],"length")}catch(e){Mr=null}Tn.exports=Mr});var jr=l((my,Rn)=>{"use strict";o();i();var Cr=Object.defineProperty||!1;if(Cr)try{Cr({},"a",{value:1})}catch(e){Cr=!1}Rn.exports=Cr});var Te=l((Ay,Nn)=>{"use strict";o();i();Nn.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var a=42;r[t]=a;for(var u in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var f=Object.getOwnPropertySymbols(r);if(f.length!==1||f[0]!==t||!Object.prototype.propertyIsEnumerable.call(r,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var c=Object.getOwnPropertyDescriptor(r,t);if(c.value!==a||c.enumerable!==!0)return!1}return!0}});var Dn=l((Oy,Un)=>{"use strict";o();i();var _n=typeof Symbol!="undefined"&&Symbol,ku=Te();Un.exports=function(){return typeof _n!="function"||typeof Symbol!="function"||typeof _n("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:ku()}});var Re=l((xy,Bn)=>{"use strict";o();i();Bn.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var Ne=l((Fy,Mn)=>{"use strict";o();i();var Lu=Fe();Mn.exports=Lu.getPrototypeOf||null});var Gr=l((Ny,Cn)=>{"use strict";o();i();Cn.exports=Function.prototype.call});var _e=l((Dy,jn)=>{"use strict";o();i();jn.exports=Function.prototype.apply});var Wn=l((Cy,Gn)=>{"use strict";o();i();Gn.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var Ln=l((Wy,kn)=>{"use strict";o();i();var zu=L(),Ju=_e(),Hu=Gr(),Ku=Wn();kn.exports=Ku||zu.call(Hu,Ju)});var Jn=l((zy,zn)=>{"use strict";o();i();var Vu=L(),Yu=w(),Qu=Gr(),Xu=Ln();zn.exports=function(r){if(r.length<1||typeof r[0]!="function")throw new Yu("a function is required");return Xu(Vu,Qu,r)}});var Xn=l((Ky,Qn)=>{"use strict";o();i();var Zu=Jn(),Hn=gr(),Vn;try{Vn=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var Ue=!!Vn&&Hn&&Hn(Object.prototype,"__proto__"),Yn=Object,Kn=Yn.getPrototypeOf;Qn.exports=Ue&&typeof Ue.get=="function"?Zu([Ue.get]):typeof Kn=="function"?function(r){return Kn(r==null?r:Yn(r))}:!1});var no=l((Qy,to)=>{"use strict";o();i();var Zn=Re(),ro=Ne(),eo=Xn();to.exports=Zn?function(r){return Zn(r)}:ro?function(r){if(!r||typeof r!="object"&&typeof r!="function")throw new TypeError("getProto: not an object");return ro(r)}:eo?function(r){return eo(r)}:null});var Me=l((rv,po)=>{"use strict";o();i();var b,rf=Fe(),ef=Se(),tf=Ae(),nf=we(),of=Pe(),ar=Ur(),ir=w(),af=Oe(),uf=vn(),ff=dn(),pf=mn(),sf=Sn(),lf=wn(),cf=On(),yf=$n(),uo=Function,De=function(e){try{return uo('"use strict"; return ('+e+").constructor;")()}catch(r){}},dr=gr(),vf=jr(),Be=function(){throw new ir},gf=dr?function(){try{return arguments.callee,Be}catch(e){try{return dr(arguments,"callee").get}catch(r){return Be}}}():Be,nr=Dn()(),E=no(),df=Ne(),hf=Re(),fo=_e(),hr=Gr(),or={},mf=typeof Uint8Array=="undefined"||!E?b:E(Uint8Array),H={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?b:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?b:ArrayBuffer,"%ArrayIteratorPrototype%":nr&&E?E([][Symbol.iterator]()):b,"%AsyncFromSyncIteratorPrototype%":b,"%AsyncFunction%":or,"%AsyncGenerator%":or,"%AsyncGeneratorFunction%":or,"%AsyncIteratorPrototype%":or,"%Atomics%":typeof Atomics=="undefined"?b:Atomics,"%BigInt%":typeof BigInt=="undefined"?b:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?b:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?b:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?b:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":ef,"%eval%":eval,"%EvalError%":tf,"%Float32Array%":typeof Float32Array=="undefined"?b:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?b:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?b:FinalizationRegistry,"%Function%":uo,"%GeneratorFunction%":or,"%Int8Array%":typeof Int8Array=="undefined"?b:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?b:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?b:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":nr&&E?E(E([][Symbol.iterator]())):b,"%JSON%":typeof JSON=="object"?JSON:b,"%Map%":typeof Map=="undefined"?b:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!nr||!E?b:E(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":rf,"%Object.getOwnPropertyDescriptor%":dr,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?b:Promise,"%Proxy%":typeof Proxy=="undefined"?b:Proxy,"%RangeError%":nf,"%ReferenceError%":of,"%Reflect%":typeof Reflect=="undefined"?b:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?b:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!nr||!E?b:E(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?b:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":nr&&E?E(""[Symbol.iterator]()):b,"%Symbol%":nr?Symbol:b,"%SyntaxError%":ar,"%ThrowTypeError%":gf,"%TypedArray%":mf,"%TypeError%":ir,"%Uint8Array%":typeof Uint8Array=="undefined"?b:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?b:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?b:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?b:Uint32Array,"%URIError%":af,"%WeakMap%":typeof WeakMap=="undefined"?b:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?b:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?b:WeakSet,"%Function.prototype.call%":hr,"%Function.prototype.apply%":fo,"%Object.defineProperty%":vf,"%Object.getPrototypeOf%":df,"%Math.abs%":uf,"%Math.floor%":ff,"%Math.max%":pf,"%Math.min%":sf,"%Math.pow%":lf,"%Math.round%":cf,"%Math.sign%":yf,"%Reflect.getPrototypeOf%":hf};if(E)try{null.error}catch(e){oo=E(E(e)),H["%Error.prototype%"]=oo}var oo,bf=function e(r){var t;if(r==="%AsyncFunction%")t=De("async function () {}");else if(r==="%GeneratorFunction%")t=De("function* () {}");else if(r==="%AsyncGeneratorFunction%")t=De("async function* () {}");else if(r==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(r==="%AsyncIteratorPrototype%"){var a=e("%AsyncGenerator%");a&&E&&(t=E(a.prototype))}return H[r]=t,t},io={__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"]},mr=L(),Wr=xe(),Sf=mr.call(hr,Array.prototype.concat),Af=mr.call(fo,Array.prototype.splice),ao=mr.call(hr,String.prototype.replace),kr=mr.call(hr,String.prototype.slice),wf=mr.call(hr,RegExp.prototype.exec),Pf=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Of=/\\(\\)?/g,Ef=function(r){var t=kr(r,0,1),n=kr(r,-1);if(t==="%"&&n!=="%")throw new ar("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new ar("invalid intrinsic syntax, expected opening `%`");var a=[];return ao(r,Pf,function(u,f,c,y){a[a.length]=c?ao(y,Of,"$1"):f||u}),a},qf=function(r,t){var n=r,a;if(Wr(io,n)&&(a=io[n],n="%"+a[0]+"%"),Wr(H,n)){var u=H[n];if(u===or&&(u=bf(n)),typeof u=="undefined"&&!t)throw new ir("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:a,name:n,value:u}}throw new ar("intrinsic "+r+" does not exist!")};po.exports=function(r,t){if(typeof r!="string"||r.length===0)throw new ir("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new ir('"allowMissing" argument must be a boolean');if(wf(/^%?[^%]*%?$/,r)===null)throw new ar("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Ef(r),a=n.length>0?n[0]:"",u=qf("%"+a+"%",t),f=u.name,c=u.value,y=!1,h=u.alias;h&&(a=h[0],Af(n,Sf([0,1],h)));for(var g=1,d=!0;g<n.length;g+=1){var v=n[g],A=kr(v,0,1),P=kr(v,-1);if((A==='"'||A==="'"||A==="`"||P==='"'||P==="'"||P==="`")&&A!==P)throw new ar("property names with quotes must have matching quotes");if((v==="constructor"||!d)&&(y=!0),a+="."+v,f="%"+a+"%",Wr(H,f))c=H[f];else if(c!=null){if(!(v in c)){if(!t)throw new ir("base intrinsic for "+r+" exists, but the property is not available.");return}if(dr&&g+1>=n.length){var S=dr(c,v);d=!!S,d&&"get"in S&&!("originalValue"in S.get)?c=S.get:c=c[v]}else d=Wr(c,v),c=c[v];d&&!y&&(H[f]=c)}}return c}});var Ce=l((nv,co)=>{"use strict";o();i();var so=jr(),xf=Ur(),ur=w(),lo=gr();co.exports=function(r,t,n){if(!r||typeof r!="object"&&typeof r!="function")throw new ur("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new ur("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new ur("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new ur("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new ur("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new ur("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,f=arguments.length>5?arguments[5]:null,c=arguments.length>6?arguments[6]:!1,y=!!lo&&lo(r,t);if(so)so(r,t,{configurable:f===null&&y?y.configurable:!f,enumerable:a===null&&y?y.enumerable:!a,value:n,writable:u===null&&y?y.writable:!u});else if(c||!a&&!u&&!f)r[t]=n;else throw new xf("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var Ge=l((av,vo)=>{"use strict";o();i();var je=jr(),yo=function(){return!!je};yo.hasArrayLengthDefineBug=function(){if(!je)return null;try{return je([],"length",{value:1}).length!==1}catch(r){return!0}};vo.exports=yo});var So=l((pv,bo)=>{"use strict";o();i();var $f=Me(),go=Ce(),If=Ge()(),ho=gr(),mo=w(),Ff=$f("%Math.floor%");bo.exports=function(r,t){if(typeof r!="function")throw new mo("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||Ff(t)!==t)throw new mo("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],a=!0,u=!0;if("length"in r&&ho){var f=ho(r,"length");f&&!f.configurable&&(a=!1),f&&!f.writable&&(u=!1)}return(a||u||!n)&&(If?go(r,"length",t,!0,!0):go(r,"length",t)),r}});var wo=l((cv,Ao)=>{"use strict";o();i();var Tf=Me(),Lr=Tf("%Object.defineProperty%",!0)||!1;if(Lr)try{Lr({},"a",{value:1})}catch(e){Lr=!1}Ao.exports=Lr});var Hr=l((gv,zr)=>{"use strict";o();i();var We=L(),Jr=F(),Rf=So(),Nf=w(),Eo=Jr("%Function.prototype.apply%"),qo=Jr("%Function.prototype.call%"),xo=Jr("%Reflect.apply%",!0)||We.call(qo,Eo),Po=wo(),_f=Jr("%Math.max%");zr.exports=function(r){if(typeof r!="function")throw new Nf("a function is required");var t=xo(We,qo,arguments);return Rf(t,1+_f(0,r.length-(arguments.length-1)),!0)};var Oo=function(){return xo(We,Eo,arguments)};Po?Po(zr.exports,"apply",{value:Oo}):zr.exports.apply=Oo});var ke=l((mv,Io)=>{"use strict";o();i();var $o=Object.prototype.toString;Io.exports=function(r){var t=$o.call(r),n=t==="[object Arguments]";return n||(n=t!=="[object Array]"&&r!==null&&typeof r=="object"&&typeof r.length=="number"&&r.length>=0&&$o.call(r.callee)==="[object Function]"),n}});var Mo=l((Av,Bo)=>{"use strict";o();i();var Do;Object.keys||(br=Object.prototype.hasOwnProperty,Le=Object.prototype.toString,Fo=ke(),ze=Object.prototype.propertyIsEnumerable,To=!ze.call({toString:null},"toString"),Ro=ze.call(function(){},"prototype"),Sr=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Kr=function(e){var r=e.constructor;return r&&r.prototype===e},No={$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=="undefined")return!1;for(var e in window)try{if(!No["$"+e]&&br.call(window,e)&&window[e]!==null&&typeof window[e]=="object")try{Kr(window[e])}catch(r){return!0}}catch(r){return!0}return!1}(),Uo=function(e){if(typeof window=="undefined"||!_o)return Kr(e);try{return Kr(e)}catch(r){return!1}},Do=function(r){var t=r!==null&&typeof r=="object",n=Le.call(r)==="[object Function]",a=Fo(r),u=t&&Le.call(r)==="[object String]",f=[];if(!t&&!n&&!a)throw new TypeError("Object.keys called on a non-object");var c=Ro&&n;if(u&&r.length>0&&!br.call(r,0))for(var y=0;y<r.length;++y)f.push(String(y));if(a&&r.length>0)for(var h=0;h<r.length;++h)f.push(String(h));else for(var g in r)!(c&&g==="prototype")&&br.call(r,g)&&f.push(String(g));if(To)for(var d=Uo(r),v=0;v<Sr.length;++v)!(d&&Sr[v]==="constructor")&&br.call(r,Sr[v])&&f.push(Sr[v]);return f});var br,Le,Fo,ze,To,Ro,Sr,Kr,No,_o,Uo;Bo.exports=Do});var Wo=l((Ov,Go)=>{"use strict";o();i();var Uf=Array.prototype.slice,Df=ke(),Co=Object.keys,Vr=Co?function(r){return Co(r)}:Mo(),jo=Object.keys;Vr.shim=function(){if(Object.keys){var r=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);r||(Object.keys=function(n){return Df(n)?jo(Uf.call(n)):jo(n)})}else Object.keys=Vr;return Object.keys||Vr};Go.exports=Vr});var Ar=l((xv,Jo)=>{"use strict";o();i();var Bf=Wo(),Mf=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",Cf=Object.prototype.toString,jf=Array.prototype.concat,ko=Ce(),Gf=function(e){return typeof e=="function"&&Cf.call(e)==="[object Function]"},Lo=Ge()(),Wf=function(e,r,t,n){if(r in e){if(n===!0){if(e[r]===t)return}else if(!Gf(n)||!n())return}Lo?ko(e,r,t,!0):ko(e,r,t)},zo=function(e,r){var t=arguments.length>2?arguments[2]:{},n=Bf(r);Mf&&(n=jf.call(n,Object.getOwnPropertySymbols(r)));for(var a=0;a<n.length;a+=1)Wf(e,n[a],r[n[a]],t[n[a]])};zo.supportsDescriptors=!!Lo;Jo.exports=zo});var I=l((Fv,Vo)=>{"use strict";o();i();var Ho=F(),Ko=Hr(),kf=Ko(Ho("String.prototype.indexOf"));Vo.exports=function(r,t){var n=Ho(r,!!t);return typeof n=="function"&&kf(r,".prototype.")>-1?Ko(n):n}});var Xo=l((Nv,Qo)=>{"use strict";o();i();var Lf=F(),Yo=Lf("%Array%"),zf=!Yo.isArray&&I()("Object.prototype.toString");Qo.exports=Yo.isArray||function(r){return zf(r)==="[object Array]"}});var Je=l((Dv,Zo)=>{"use strict";o();i();Zo.exports=Xo()});var ei=l((Cv,ri)=>{"use strict";o();i();var Jf=F(),Hf=I(),Kf=w(),Vf=Je(),Yf=Jf("%Reflect.apply%",!0)||Hf("Function.prototype.apply");ri.exports=function(r,t){var n=arguments.length>2?arguments[2]:[];if(!Vf(n))throw new Kf("Assertion failed: optional `argumentsList`, if provided, must be a List");return Yf(r,t,n)}});function ti(){throw new Error("setTimeout has not been defined")}function ni(){throw new Error("clearTimeout has not been defined")}function oi(e){if(C===setTimeout)return setTimeout(e,0);if((C===ti||!C)&&setTimeout)return C=setTimeout,setTimeout(e,0);try{return C(e,0)}catch(r){try{return C.call(null,e,0)}catch(t){return C.call(this,e,0)}}}function Qf(e){if(j===clearTimeout)return clearTimeout(e);if((j===ni||!j)&&clearTimeout)return j=clearTimeout,clearTimeout(e);try{return j(e)}catch(r){try{return j.call(null,e)}catch(t){return j.call(this,e)}}}function Xf(){!pr||!K||(pr=!1,K.length?U=K.concat(U):Yr=-1,U.length&&ii())}function ii(){if(!pr){var e=oi(Xf);pr=!0;for(var r=U.length;r;){for(K=U,U=[];++Yr<r;)K&&K[Yr].run();Yr=-1,r=U.length}K=null,pr=!1,Qf(e)}}function Zf(e){var r=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)r[t-1]=arguments[t];U.push(new ai(e,r)),U.length===1&&!pr&&oi(ii)}function ai(e,r){this.fun=e,this.array=r}function V(){}function dp(e){throw new Error("process.binding is not supported")}function hp(){return"/"}function mp(e){throw new Error("process.chdir is not supported")}function bp(){return 0}function Ap(e){var r=Sp.call(fr)*.001,t=Math.floor(r),n=Math.floor(r%1*1e9);return e&&(t=t-e[0],n=n-e[1],n<0&&(t--,n+=1e9)),[t,n]}function Pp(){var e=new Date,r=e-wp;return r/1e3}var C,j,U,pr,K,Yr,rp,ep,tp,np,op,ip,ap,up,fp,pp,sp,lp,cp,yp,vp,gp,fr,Sp,wp,Op,wr,ui=be(()=>{"use strict";o();i();C=ti,j=ni;typeof globalThis.setTimeout=="function"&&(C=setTimeout);typeof globalThis.clearTimeout=="function"&&(j=clearTimeout);U=[],pr=!1,Yr=-1;ai.prototype.run=function(){this.fun.apply(null,this.array)};rp="browser",ep="browser",tp=!0,np={},op=[],ip="",ap={},up={},fp={};pp=V,sp=V,lp=V,cp=V,yp=V,vp=V,gp=V;fr=globalThis.performance||{},Sp=fr.now||fr.mozNow||fr.msNow||fr.oNow||fr.webkitNow||function(){return new Date().getTime()};wp=new Date;Op={nextTick:Zf,title:rp,browser:tp,env:np,argv:op,version:ip,versions:ap,on:pp,addListener:sp,once:lp,off:cp,removeListener:yp,removeAllListeners:vp,emit:gp,binding:dp,cwd:hp,chdir:mp,umask:bp,hrtime:Ap,platform:ep,release:up,config:fp,uptime:Pp},wr=Op});var He,Ke,fi=be(()=>{"use strict";o();i();typeof Object.create=="function"?He=function(r,t){r.super_=t,r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}})}:He=function(r,t){r.super_=t;var n=function(){};n.prototype=t.prototype,r.prototype=new n,r.prototype.constructor=r};Ke=He});var di={};su(di,{_extend:()=>nt,debuglog:()=>pi,default:()=>_p,deprecate:()=>Ze,format:()=>re,inherits:()=>Ke,inspect:()=>R,isArray:()=>rt,isBoolean:()=>ee,isBuffer:()=>yi,isDate:()=>Zr,isError:()=>Or,isFunction:()=>Er,isNull:()=>qr,isNullOrUndefined:()=>si,isNumber:()=>et,isObject:()=>Y,isPrimitive:()=>ci,isRegExp:()=>Pr,isString:()=>xr,isSymbol:()=>li,isUndefined:()=>T,log:()=>vi});function re(e){if(!xr(e)){for(var r=[],t=0;t<arguments.length;t++)r.push(R(arguments[t]));return r.join(" ")}for(var t=1,n=arguments,a=n.length,u=String(e).replace(Ep,function(c){if(c==="%%")return"%";if(t>=a)return c;switch(c){case"%s":return String(n[t++]);case"%d":return Number(n[t++]);case"%j":try{return JSON.stringify(n[t++])}catch(y){return"[Circular]"}default:return c}}),f=n[t];t<a;f=n[++t])qr(f)||!Y(f)?u+=" "+f:u+=" "+R(f);return u}function Ze(e,r){if(T(globalThis.process))return function(){return Ze(e,r).apply(this,arguments)};if(wr.noDeprecation===!0)return e;var t=!1;function n(){if(!t){if(wr.throwDeprecation)throw new Error(r);wr.traceDeprecation?console.trace(r):console.error(r),t=!0}return e.apply(this,arguments)}return n}function pi(e){if(T(Ve)&&(Ve=wr.env.NODE_DEBUG||""),e=e.toUpperCase(),!Qr[e])if(new RegExp("\\b"+e+"\\b","i").test(Ve)){var r=0;Qr[e]=function(){var t=re.apply(null,arguments);console.error("%s %d: %s",e,r,t)}}else Qr[e]=function(){};return Qr[e]}function R(e,r){var t={seen:[],stylize:xp};return arguments.length>=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),ee(r)?t.showHidden=r:r&&nt(t,r),T(t.showHidden)&&(t.showHidden=!1),T(t.depth)&&(t.depth=2),T(t.colors)&&(t.colors=!1),T(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=qp),Xr(t,e,t.depth)}function qp(e,r){var t=R.styles[r];return t?"\x1B["+R.colors[t][0]+"m"+e+"\x1B["+R.colors[t][1]+"m":e}function xp(e,r){return e}function $p(e){var r={};return e.forEach(function(t,n){r[t]=!0}),r}function Xr(e,r,t){if(e.customInspect&&r&&Er(r.inspect)&&r.inspect!==R&&!(r.constructor&&r.constructor.prototype===r)){var n=r.inspect(t,e);return xr(n)||(n=Xr(e,n,t)),n}var a=Ip(e,r);if(a)return a;var u=Object.keys(r),f=$p(u);if(e.showHidden&&(u=Object.getOwnPropertyNames(r)),Or(r)&&(u.indexOf("message")>=0||u.indexOf("description")>=0))return Ye(r);if(u.length===0){if(Er(r)){var c=r.name?": "+r.name:"";return e.stylize("[Function"+c+"]","special")}if(Pr(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(Zr(r))return e.stylize(Date.prototype.toString.call(r),"date");if(Or(r))return Ye(r)}var y="",h=!1,g=["{","}"];if(rt(r)&&(h=!0,g=["[","]"]),Er(r)){var d=r.name?": "+r.name:"";y=" [Function"+d+"]"}if(Pr(r)&&(y=" "+RegExp.prototype.toString.call(r)),Zr(r)&&(y=" "+Date.prototype.toUTCString.call(r)),Or(r)&&(y=" "+Ye(r)),u.length===0&&(!h||r.length==0))return g[0]+y+g[1];if(t<0)return Pr(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special");e.seen.push(r);var v;return h?v=Fp(e,r,t,f,u):v=u.map(function(A){return Xe(e,r,t,f,A,h)}),e.seen.pop(),Tp(v,y,g)}function Ip(e,r){if(T(r))return e.stylize("undefined","undefined");if(xr(r)){var t="'"+JSON.stringify(r).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(t,"string")}if(et(r))return e.stylize(""+r,"number");if(ee(r))return e.stylize(""+r,"boolean");if(qr(r))return e.stylize("null","null")}function Ye(e){return"["+Error.prototype.toString.call(e)+"]"}function Fp(e,r,t,n,a){for(var u=[],f=0,c=r.length;f<c;++f)gi(r,String(f))?u.push(Xe(e,r,t,n,String(f),!0)):u.push("");return a.forEach(function(y){y.match(/^\d+$/)||u.push(Xe(e,r,t,n,y,!0))}),u}function Xe(e,r,t,n,a,u){var f,c,y;if(y=Object.getOwnPropertyDescriptor(r,a)||{value:r[a]},y.get?y.set?c=e.stylize("[Getter/Setter]","special"):c=e.stylize("[Getter]","special"):y.set&&(c=e.stylize("[Setter]","special")),gi(n,a)||(f="["+a+"]"),c||(e.seen.indexOf(y.value)<0?(qr(t)?c=Xr(e,y.value,null):c=Xr(e,y.value,t-1),c.indexOf(`
|
|
2
|
+
`)>-1&&(u?c=c.split(`
|
|
3
|
+
`).map(function(h){return" "+h}).join(`
|
|
4
4
|
`).substr(2):c=`
|
|
5
5
|
`+c.split(`
|
|
6
|
-
`).map(function(
|
|
7
|
-
`))):c=e.stylize("[Circular]","special")),
|
|
8
|
-
`)>=0&&n++,
|
|
6
|
+
`).map(function(h){return" "+h}).join(`
|
|
7
|
+
`))):c=e.stylize("[Circular]","special")),T(f)){if(u&&a.match(/^\d+$/))return c;f=JSON.stringify(""+a),f.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(f=f.substr(1,f.length-2),f=e.stylize(f,"name")):(f=f.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),f=e.stylize(f,"string"))}return f+": "+c}function Tp(e,r,t){var n=0,a=e.reduce(function(u,f){return n++,f.indexOf(`
|
|
8
|
+
`)>=0&&n++,u+f.replace(/\u001b\[\d\d?m/g,"").length+1},0);return a>60?t[0]+(r===""?"":r+`
|
|
9
9
|
`)+" "+e.join(`,
|
|
10
|
-
`)+" "+t[1]:t[0]+r+" "+e.join(", ")+" "+t[1]}function $e(e){return Array.isArray(e)}function Ur(e){return typeof e=="boolean"}function gr(e){return e===null}function Gn(e){return e==null}function Ee(e){return typeof e=="number"}function vr(e){return typeof e=="string"}function kn(e){return typeof e=="symbol"}function I(e){return e===void 0}function pr(e){return H(e)&&Pe(e)==="[object RegExp]"}function H(e){return typeof e=="object"&&e!==null}function Mr(e){return H(e)&&Pe(e)==="[object Date]"}function cr(e){return H(e)&&(Pe(e)==="[object Error]"||e instanceof Error)}function yr(e){return typeof e=="function"}function zn(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}function jn(e){return s.isBuffer(e)}function Pe(e){return Object.prototype.toString.call(e)}function Oe(e){return e<10?"0"+e.toString(10):e.toString(10)}function Pu(){var e=new Date,r=[Oe(e.getHours()),Oe(e.getMinutes()),Oe(e.getSeconds())].join(":");return[e.getDate(),Eu[e.getMonth()],r].join(" ")}function Hn(){console.log("%s - %s",Pu(),Cr.apply(null,arguments))}function Ie(e,r){if(!r||!H(r))return e;for(var t=Object.keys(r),n=t.length;n--;)e[t[n]]=r[t[n]];return e}function Jn(e,r){return Object.prototype.hasOwnProperty.call(e,r)}var bu,_r,we,Eu,Iu,Qn=ne(()=>{"use strict";o();i();Un();Wn();bu=/%[sdj%]/g;_r={};T.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]};T.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};Eu=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];Iu={inherits:be,_extend:Ie,log:Hn,isBuffer:jn,isPrimitive:zn,isFunction:yr,isError:cr,isDate:Mr,isObject:H,isRegExp:pr,isUndefined:I,isSymbol:kn,isString:vr,isNumber:Ee,isNullOrUndefined:Gn,isNull:gr,isBoolean:Ur,isArray:$e,inspect:T,deprecate:xe,format:Cr,debuglog:Ln}});var Yn=y((Np,Wr)=>{"use strict";o();i();var J=(Qn(),ji(Kn));if(J&&J.default){Wr.exports=J.default;for(let e in J)Wr.exports[e]=J[e]}else J&&(Wr.exports=J)});var Zn=y((Bp,Xn)=>{"use strict";o();i();Xn.exports=Yn().inspect});var Sr=y((Up,So)=>{"use strict";o();i();var Ue=typeof Map=="function"&&Map.prototype,Te=Object.getOwnPropertyDescriptor&&Ue?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Gr=Ue&&Te&&typeof Te.get=="function"?Te.get:null,Vn=Ue&&Map.prototype.forEach,We=typeof Set=="function"&&Set.prototype,Fe=Object.getOwnPropertyDescriptor&&We?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,kr=We&&Fe&&typeof Fe.get=="function"?Fe.get:null,ro=We&&Set.prototype.forEach,Tu=typeof WeakMap=="function"&&WeakMap.prototype,dr=Tu?WeakMap.prototype.has:null,Fu=typeof WeakSet=="function"&&WeakSet.prototype,mr=Fu?WeakSet.prototype.has:null,Ru=typeof WeakRef=="function"&&WeakRef.prototype,eo=Ru?WeakRef.prototype.deref:null,Nu=Boolean.prototype.valueOf,Du=Object.prototype.toString,_u=Function.prototype.toString,Bu=String.prototype.match,Le=String.prototype.slice,U=String.prototype.replace,Mu=String.prototype.toUpperCase,to=String.prototype.toLowerCase,po=RegExp.prototype.test,no=Array.prototype.concat,F=Array.prototype.join,Cu=Array.prototype.slice,oo=Math.floor,De=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Re=Object.getOwnPropertySymbols,_e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,tr=typeof Symbol=="function"&&typeof Symbol.iterator=="object",O=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===tr||!0)?Symbol.toStringTag:null,co=Object.prototype.propertyIsEnumerable,io=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function ao(e,r){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||po.call(/e/,r))return r;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-oo(-e):oo(e);if(n!==e){var u=String(n),a=Le.call(r,u.length+1);return U.call(u,t,"$&_")+"."+U.call(U.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return U.call(r,t,"$&_")}var Be=Zn(),uo=Be.custom,fo=vo(uo)?uo:null,yo={__proto__:null,double:'"',single:"'"},Uu={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};So.exports=function e(r,t,n,u){var a=t||{};if(D(a,"quoteStyle")&&!D(yo,a.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(D(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var f=D(a,"customInspect")?a.customInspect:!0;if(typeof f!="boolean"&&f!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(D(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(D(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var c=a.numericSeparator;if(typeof r=="undefined")return"undefined";if(r===null)return"null";if(typeof r=="boolean")return r?"true":"false";if(typeof r=="string")return mo(r,a);if(typeof r=="number"){if(r===0)return 1/0/r>0?"0":"-0";var l=String(r);return c?ao(r,l):l}if(typeof r=="bigint"){var m=String(r)+"n";return c?ao(r,m):m}var v=typeof a.depth=="undefined"?5:a.depth;if(typeof n=="undefined"&&(n=0),n>=v&&v>0&&typeof r=="object")return Me(r)?"[Array]":"[Object]";var h=nf(a,n);if(typeof u=="undefined")u=[];else if(ho(u,r)>=0)return"[Circular]";function g(K,Ar,Gi){if(Ar&&(u=Cu.call(u),u.push(Ar)),Gi){var yt={depth:a.depth};return D(a,"quoteStyle")&&(yt.quoteStyle=a.quoteStyle),e(K,yt,n+1,u)}return e(K,a,n+1,u)}if(typeof r=="function"&&!lo(r)){var A=Ku(r),x=Lr(r,g);return"[Function"+(A?": "+A:" (anonymous)")+"]"+(x.length>0?" { "+F.call(x,", ")+" }":"")}if(vo(r)){var S=tr?U.call(String(r),/^(Symbol\(.*\))_[^)]*$/,"$1"):_e.call(r);return typeof r=="object"&&!tr?hr(S):S}if(rf(r)){for(var q="<"+to.call(String(r.nodeName)),$=r.attributes||[],R=0;R<$.length;R++)q+=" "+$[R].name+"="+go(Wu($[R].value),"double",a);return q+=">",r.childNodes&&r.childNodes.length&&(q+="..."),q+="</"+to.call(String(r.nodeName))+">",q}if(Me(r)){if(r.length===0)return"[]";var L=Lr(r,g);return h&&!tf(L)?"["+Ce(L,h)+"]":"[ "+F.call(L,", ")+" ]"}if(Gu(r)){var ir=Lr(r,g);return!("cause"in Error.prototype)&&"cause"in r&&!co.call(r,"cause")?"{ ["+String(r)+"] "+F.call(no.call("[cause]: "+g(r.cause),ir),", ")+" }":ir.length===0?"["+String(r)+"]":"{ ["+String(r)+"] "+F.call(ir,", ")+" }"}if(typeof r=="object"&&f){if(fo&&typeof r[fo]=="function"&&Be)return Be(r,{depth:v-n});if(f!=="symbol"&&typeof r.inspect=="function")return r.inspect()}if(Qu(r)){var wr=[];return Vn&&Vn.call(r,function(K,Ar){wr.push(g(Ar,r,!0)+" => "+g(K,r))}),so("Map",Gr.call(r),wr,h)}if(Zu(r)){var st=[];return ro&&ro.call(r,function(K){st.push(g(K,r))}),so("Set",kr.call(r),st,h)}if(Yu(r))return Ne("WeakMap");if(Vu(r))return Ne("WeakSet");if(Xu(r))return Ne("WeakRef");if(zu(r))return hr(g(Number(r)));if(Hu(r))return hr(g(De.call(r)));if(ju(r))return hr(Nu.call(r));if(ku(r))return hr(g(String(r)));if(typeof window!="undefined"&&r===window)return"{ [object Window] }";if(typeof globalThis!="undefined"&&r===globalThis||typeof globalThis!="undefined"&&r===globalThis)return"{ [object globalThis] }";if(!Lu(r)&&!lo(r)){var re=Lr(r,g),pt=io?io(r)===Object.prototype:r instanceof Object||r.constructor===Object,ee=r instanceof Object?"":"null prototype",ct=!pt&&O&&Object(r)===r&&O in r?Le.call(W(r),8,-1):ee?"Object":"",Li=pt||typeof r.constructor!="function"?"":r.constructor.name?r.constructor.name+" ":"",te=Li+(ct||ee?"["+F.call(no.call([],ct||[],ee||[]),": ")+"] ":"");return re.length===0?te+"{}":h?te+"{"+Ce(re,h)+"}":te+"{ "+F.call(re,", ")+" }"}return String(r)};function go(e,r,t){var n=t.quoteStyle||r,u=yo[n];return u+e+u}function Wu(e){return U.call(String(e),/"/g,""")}function Me(e){return W(e)==="[object Array]"&&(!O||!(typeof e=="object"&&O in e))}function Lu(e){return W(e)==="[object Date]"&&(!O||!(typeof e=="object"&&O in e))}function lo(e){return W(e)==="[object RegExp]"&&(!O||!(typeof e=="object"&&O in e))}function Gu(e){return W(e)==="[object Error]"&&(!O||!(typeof e=="object"&&O in e))}function ku(e){return W(e)==="[object String]"&&(!O||!(typeof e=="object"&&O in e))}function zu(e){return W(e)==="[object Number]"&&(!O||!(typeof e=="object"&&O in e))}function ju(e){return W(e)==="[object Boolean]"&&(!O||!(typeof e=="object"&&O in e))}function vo(e){if(tr)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!_e)return!1;try{return _e.call(e),!0}catch(r){}return!1}function Hu(e){if(!e||typeof e!="object"||!De)return!1;try{return De.call(e),!0}catch(r){}return!1}var Ju=Object.prototype.hasOwnProperty||function(e){return e in this};function D(e,r){return Ju.call(e,r)}function W(e){return Du.call(e)}function Ku(e){if(e.name)return e.name;var r=Bu.call(_u.call(e),/^function\s*([\w$]+)/);return r?r[1]:null}function ho(e,r){if(e.indexOf)return e.indexOf(r);for(var t=0,n=e.length;t<n;t++)if(e[t]===r)return t;return-1}function Qu(e){if(!Gr||!e||typeof e!="object")return!1;try{Gr.call(e);try{kr.call(e)}catch(r){return!0}return e instanceof Map}catch(r){}return!1}function Yu(e){if(!dr||!e||typeof e!="object")return!1;try{dr.call(e,dr);try{mr.call(e,mr)}catch(r){return!0}return e instanceof WeakMap}catch(r){}return!1}function Xu(e){if(!eo||!e||typeof e!="object")return!1;try{return eo.call(e),!0}catch(r){}return!1}function Zu(e){if(!kr||!e||typeof e!="object")return!1;try{kr.call(e);try{Gr.call(e)}catch(r){return!0}return e instanceof Set}catch(r){}return!1}function Vu(e){if(!mr||!e||typeof e!="object")return!1;try{mr.call(e,mr);try{dr.call(e,dr)}catch(r){return!0}return e instanceof WeakSet}catch(r){}return!1}function rf(e){return!e||typeof e!="object"?!1:typeof HTMLElement!="undefined"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function mo(e,r){if(e.length>r.maxStringLength){var t=e.length-r.maxStringLength,n="... "+t+" more character"+(t>1?"s":"");return mo(Le.call(e,0,r.maxStringLength),r)+n}var u=Uu[r.quoteStyle||"single"];u.lastIndex=0;var a=U.call(U.call(e,u,"\\$1"),/[\x00-\x1f]/g,ef);return go(a,"single",r)}function ef(e){var r=e.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[r];return t?"\\"+t:"\\x"+(r<16?"0":"")+Mu.call(r.toString(16))}function hr(e){return"Object("+e+")"}function Ne(e){return e+" { ? }"}function so(e,r,t,n){var u=n?Ce(t,n):F.call(t,", ");return e+" ("+r+") {"+u+"}"}function tf(e){for(var r=0;r<e.length;r++)if(ho(e[r],`
|
|
11
|
-
`)>=0)return!1;return!0}function
|
|
12
|
-
`+r.prev+r.base;return t+
|
|
13
|
-
`+r.prev}function Lr(e,r){var t=Me(e),n=[];if(t){n.length=e.length;for(var u=0;u<e.length;u++)n[u]=D(e,u)?r(e[u],e):""}var a=typeof Re=="function"?Re(e):[],f;if(tr){f={};for(var c=0;c<a.length;c++)f["$"+a[c]]=a[c]}for(var l in e)D(e,l)&&(t&&String(Number(l))===l&&l<e.length||tr&&f["$"+l]instanceof Symbol||(po.call(/[^\w$]/,l)?n.push(r(l,e)+": "+r(e[l],e)):n.push(l+": "+r(e[l],e))));if(typeof Re=="function")for(var m=0;m<a.length;m++)co.call(e,a[m])&&n.push("["+r(a[m])+"]: "+r(e[a[m]],e));return n}});var zr=y((Gp,bo)=>{"use strict";o();i();bo.exports=function(r){return typeof r=="string"||typeof r=="symbol"}});var Ao=y((jp,wo)=>{"use strict";o();i();var of=w(),af=Sr(),uf=zr();wo.exports=function(r,t){if(!uf(t))throw new of("Assertion failed: IsPropertyKey(P) is not true, got "+af(t));return r[t]}});var $o=y((Kp,xo)=>{"use strict";o();i();var qo=Function.prototype.toString,nr=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,ke,jr;if(typeof nr=="function"&&typeof Object.defineProperty=="function")try{ke=Object.defineProperty({},"length",{get:function(){throw jr}}),jr={},nr(function(){throw 42},null,ke)}catch(e){e!==jr&&(nr=null)}else nr=null;var ff=/^\s*class\b/,ze=function(r){try{var t=qo.call(r);return ff.test(t)}catch(n){return!1}},Ge=function(r){try{return ze(r)?!1:(qo.call(r),!0)}catch(t){return!1}},Hr=Object.prototype.toString,lf="[object Object]",sf="[object Function]",pf="[object GeneratorFunction]",cf="[object HTMLAllCollection]",yf="[object HTML document.all class]",gf="[object HTMLCollection]",vf=typeof Symbol=="function"&&!!Symbol.toStringTag,hf=!(0 in[,]),je=function(){return!1};typeof document=="object"&&(Oo=document.all,Hr.call(Oo)===Hr.call(document.all)&&(je=function(r){if((hf||!r)&&(typeof r=="undefined"||typeof r=="object"))try{var t=Hr.call(r);return(t===cf||t===yf||t===gf||t===lf)&&r("")==null}catch(n){}return!1}));var Oo;xo.exports=nr?function(r){if(je(r))return!0;if(!r||typeof r!="function"&&typeof r!="object")return!1;try{nr(r,null,ke)}catch(t){if(t!==jr)return!1}return!ze(r)&&Ge(r)}:function(r){if(je(r))return!0;if(!r||typeof r!="function"&&typeof r!="object")return!1;if(vf)return Ge(r);if(ze(r))return!1;var t=Hr.call(r);return t!==sf&&t!==pf&&!/^\[object HTML/.test(t)?!1:Ge(r)}});var He=y((Xp,Eo)=>{"use strict";o();i();Eo.exports=$o()});var Fo=y((rc,To)=>{"use strict";o();i();var Po=w(),df=Ao(),mf=He(),Sf=zr(),Io=Sr();To.exports=function(r,t){if(!Sf(t))throw new Po("Assertion failed: IsPropertyKey(P) is not true");var n=df(r,t);if(n!=null){if(!mf(n))throw new Po(Io(t)+" is not a function: "+Io(n));return n}}});var No=y((nc,Ro)=>{"use strict";o();i();var bf=ie();Ro.exports=function(){return bf()&&!!Symbol.toStringTag}});var Ye=y((ac,Mo)=>{"use strict";o();i();var Je=P(),Do=No()(),_o,Bo,Ke,Qe;Do&&(_o=Je("Object.prototype.hasOwnProperty"),Bo=Je("RegExp.prototype.exec"),Ke={},Jr=function(){throw Ke},Qe={toString:Jr,valueOf:Jr},typeof Symbol.toPrimitive=="symbol"&&(Qe[Symbol.toPrimitive]=Jr));var Jr,wf=Je("Object.prototype.toString"),Af=Object.getOwnPropertyDescriptor,Of="[object RegExp]";Mo.exports=Do?function(r){if(!r||typeof r!="object")return!1;var t=Af(r,"lastIndex"),n=t&&_o(t,"value");if(!n)return!1;try{Bo(r,Qe)}catch(u){return u===Ke}}:function(r){return!r||typeof r!="object"&&typeof r!="function"?!1:wf(r)===Of}});var Xe=y((lc,Co)=>{"use strict";o();i();var qf=P(),xf=Ye(),$f=qf("RegExp.prototype.exec"),Ef=w();Co.exports=function(r){if(!xf(r))throw new Ef("`regex` must be a RegExp");return function(n){return $f(r,n)!==null}}});var Wo=y((cc,Uo)=>{"use strict";o();i();Uo.exports=function(r,t){for(var n=0;n<r.length;n+=1)if(!t(r[n],n,r))return!1;return!0}});var Go=y((vc,Lo)=>{"use strict";o();i();Lo.exports=function(r){if(r===null)return"Null";if(typeof r=="undefined")return"Undefined";if(typeof r=="function"||typeof r=="object")return"Object";if(typeof r=="number")return"Number";if(typeof r=="boolean")return"Boolean";if(typeof r=="string")return"String"}});var Ze=y((mc,ko)=>{"use strict";o();i();var Pf=Go();ko.exports=function(r){return typeof r=="symbol"?"Symbol":typeof r=="bigint"?"BigInt":Pf(r)}});var Ho=y((wc,jo)=>{"use strict";o();i();var zo=w(),If=Sr(),Tf=zr(),Ff=Ze();jo.exports=function(r,t){if(Ff(r)!=="Object")throw new zo("Assertion failed: Type(O) is not Object");if(!Tf(t))throw new zo("Assertion failed: IsPropertyKey(P) is not true, got "+If(t));return r[t]}});var Ko=y((qc,Jo)=>{"use strict";o();i();var Rf=E();Jo.exports=Rf("%Math.min%")});var Ve=y((Ec,Qo)=>{"use strict";o();i();Qo.exports=Number.isNaN||function(r){return r!==r}});var Xo=y((Tc,Yo)=>{"use strict";o();i();var Nf=Ve();Yo.exports=function(e){return(typeof e=="number"||typeof e=="bigint")&&!Nf(e)&&e!==1/0&&e!==-1/0}});var Kr=y((Nc,Vo)=>{"use strict";o();i();var Zo=E(),Df=Zo("%Math.abs%"),_f=Zo("%Math.floor%"),Bf=Ve(),Mf=Xo();Vo.exports=function(r){if(typeof r!="number"||Bf(r)||!Mf(r))return!1;var t=Df(r);return _f(t)===t}});var et=y((Bc,ri)=>{"use strict";o();i();var Cf=P(),rt=w(),Uf=Kr(),Wf=Cf("String.prototype.slice");ri.exports=function(r,t,n){if(typeof r!="string")throw new rt("Assertion failed: `string` must be a String");if(typeof t!="string")throw new rt("Assertion failed: `searchValue` must be a String");if(!Uf(n)||n<0)throw new rt("Assertion failed: `fromIndex` must be a non-negative integer");var u=r.length;if(t===""&&n<=u)return n;for(var a=t.length,f=n;f<=u-a;f+=1){var c=Wf(r,f,f+a);if(c===t)return f}return-1}});var Qr=y((Uc,ei)=>{"use strict";o();i();var Lf=w();ei.exports=function(r){if(r==null)throw new Lf(arguments.length>0&&arguments[1]||"Cannot call method on "+r);return r}});var Yr=y((Gc,ti)=>{"use strict";o();i();var Gf=E(),kf=Gf("%String%"),zf=w();ti.exports=function(r){if(typeof r=="symbol")throw new zf("Cannot convert a Symbol value to a string");return kf(r)}});var tt=y((jc,ii)=>{"use strict";o();i();var jf=Qr(),Hf=Yr(),Jf=P(),ni=Jf("String.prototype.replace"),oi=/^\s$/.test("\u180E"),Kf=oi?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,Qf=oi?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;ii.exports=function(){var r=Hf(jf(this));return ni(ni(r,Kf,""),Qf,"")}});var nt=y((Kc,ui)=>{"use strict";o();i();var Yf=tt(),ai="\u200B",or="\u180E";ui.exports=function(){return String.prototype.trim&&ai.trim()===ai&&or.trim()===or&&("_"+or).trim()==="_"+or&&(or+"_").trim()===or+"_"?String.prototype.trim:Yf}});var li=y((Xc,fi)=>{"use strict";o();i();var Xf=lr(),Zf=nt();fi.exports=function(){var r=Zf();return Xf(String.prototype,{trim:r},{trim:function(){return String.prototype.trim!==r}}),r}});var yi=y((ry,ci)=>{"use strict";o();i();var Vf=Fr(),rl=lr(),el=Qr(),tl=tt(),si=nt(),nl=li(),ol=Vf(si()),pi=function(r){return el(r),ol(r)};rl(pi,{getPolyfill:si,implementation:tl,shim:nl});ci.exports=pi});var di=y((ny,hi)=>{"use strict";o();i();var it=E(),ot=it("%Number%"),il=it("%RegExp%"),al=w(),gi=it("%parseInt%"),ul=P(),Xr=Xe(),vi=ul("String.prototype.slice"),fl=Xr(/^0b[01]+$/i),ll=Xr(/^0o[0-7]+$/i),sl=Xr(/^[-+]0x[0-9a-f]+$/i),pl=["\x85","\u200B","\uFFFE"].join(""),cl=new il("["+pl+"]","g"),yl=Xr(cl),gl=yi();hi.exports=function e(r){if(typeof r!="string")throw new al("Assertion failed: `argument` is not a String");if(fl(r))return ot(gi(vi(r,2),2));if(ll(r))return ot(gi(vi(r,2),8));if(yl(r)||sl(r))return NaN;var t=gl(r);return t!==r?e(t):ot(r)}});var bi=y((ay,Si)=>{"use strict";o();i();var vl=w(),mi=Kr(),hl=P(),dl=hl("String.prototype.slice");Si.exports=function(r,t,n){if(typeof r!="string"||!mi(t)||arguments.length>2&&!mi(n))throw new vl("`S` must be a String, and `inclusiveStart` and `exclusiveEnd` must be integers");return dl(r,t,arguments.length>2?n:r.length)}});var Ai=y((ly,wi)=>{"use strict";o();i();wi.exports=function(r){return typeof r=="string"||typeof r=="undefined"}});var qi=y((cy,Oi)=>{"use strict";o();i();var ml=P()("String.prototype.slice");Oi.exports=function(r,t){return r===t?!0:r.length>t.length?!1:ml(t,0,r.length)===r}});var Ii=y((vy,Pi)=>{"use strict";o();i();var _=w(),Ei=Xe(),Sl=Wo(),at=Sr(),bl=Ho(),wl=me(),Al=Ko(),Ol=et(),xi=di(),B=bi(),ql=Yr(),$i=Ze(),xl=Kr(),$l=Ai(),br=qi(),El=Ei(/^\$[0-9]/),Pl=Ei(/^\$[0-9][0-9]/);Pi.exports=function(r,t,n,u,a,f){if(typeof r!="string")throw new _("Assertion failed: `matched` must be a String");if(typeof t!="string")throw new _("Assertion failed: `str` must be a String");if(!xl(n)||n<0)throw new _("Assertion failed: `position` must be a nonnegative integer, got "+at(n));if(!wl(u)||!Sl(u,$l))throw new _("Assertion failed: `captures` must be a possibly-empty List of Strings or `undefined`, got "+at(u));if(typeof a!="undefined"&&$i(a)!=="Object")throw new _("Assertion failed: `namedCaptures` must be `undefined` or an Object");if(typeof f!="string")throw new _("Assertion failed: `replacementTemplate` must be a String");var c=t.length;if(n>c)throw new _("Assertion failed: position > stringLength, got "+at(n));for(var l=f,m="";l!=="";){var v,h,g;if(br("$$",l))v="$$",h="$";else if(br("$`",l))v="$`",h=B(t,0,n);else if(br("$&",l))v="$&",h=r;else if(br("$'",l)){v="$'";var A=r.length,x=n+A;h=B(t,Al(x,c))}else if(El(l)){var S=Pl(l)?2:1,q=B(l,1,1+S),$=xi(q);if($<0||$>99)throw new _("Assertion failed: `index` must be >= 0 and <= 99");var R=u.length;$>R&&S===2&&(S=1,q=B(q,0,1),$=xi(q)),v=B(l,0,1+S),1<=$&&$<=R?(g=u[$-1],typeof g=="undefined"?h="":h=g):h=v}else if(br("$<",l)){var L=Ol(l,">",0);if(L===-1||typeof a=="undefined")v="$<",h=v;else{v=B(l,0,L+1);var ir=B(l,2,L);if($i(a)!=="Object")throw new _("Assertion failed: Type(namedCaptures) is not Object");g=bl(a,ir),typeof g=="undefined"?h="":h=ql(g)}}else v=B(l,0,1),h=v;var wr=v.length;l=B(l,wr),m+=h}return m}});var ft=y((my,Ni)=>{"use strict";o();i();var Ti=Nn(),Il=Fo(),Tl=Ii(),Fl=He(),Rl=Qr(),Zr=Yr(),Fi=et(),Nl=E(),Vr=P(),Dl=ae()(),_l=Ye(),Bl=Nl("%Math.max%"),Ri=w(),Ml=Vr("Array.prototype.push"),ut=Vr("String.prototype.slice"),Cl=Vr("String.prototype.indexOf"),Ul=Vr("String.prototype.replace");Ni.exports=function(r,t){var n=Rl(this),u=_l(r);if(u&&Cl(ut(r,r.source.length+2),"g")===-1)throw new Ri("use .replace for a non-global regex. NOTE: this may be allowed in the future.");if(Dl&&Symbol.replace){if(r!=null){var a=Il(r,Symbol.replace);if(typeof a!="undefined")return Ti(a,r,[n,t])}}else if(u)return Ul(n,r,t);var f=Zr(n),c=Zr(r),l=Fl(t);l||(t=Zr(t));for(var m=c.length,v=Bl(1,m),h=[],g=Fi(f,c,0);g!==-1;)Ml(h,g),g=Fi(f,c,g+v);for(var A=0,x="",S=0;S<h.length;S+=1){var q;if(l)q=Zr(Ti(t,void 0,[c,h[S],f]));else{if(typeof t!="string")throw new Ri("Assertion failed: `replaceValue` should be a string at this point");var $=[];q=Tl(c,f,h[S],$,void 0,t)}var R=ut(f,A,h[S]);x+=R+q,A=h[S]+m}return A<f.length&&(x+=ut(f,A)),x}});var lt=y((wy,Di)=>{"use strict";o();i();var Wl=ft();Di.exports=function(){return String.prototype.replaceAll||Wl}});var Bi=y((qy,_i)=>{"use strict";o();i();var Ll=lr(),Gl=lt();_i.exports=function(){var r=Gl();return Ll(String.prototype,{replaceAll:r},{replaceAll:function(){return String.prototype.replaceAll!==r}}),r}});var Wi=y((Ey,Ui)=>{"use strict";o();i();var kl=Fr(),zl=lr(),Mi=ft(),jl=lt(),Hl=Bi(),Ci=kl(Mi);zl(Ci,{getPolyfill:jl,implementation:Mi,shim:Hl});Ui.exports=Ci});o();i();var Ty=zi(Wi(),1);export{Hi as DynamicSnippetsGenerator};
|
|
10
|
+
`)+" "+t[1]:t[0]+r+" "+e.join(", ")+" "+t[1]}function rt(e){return Array.isArray(e)}function ee(e){return typeof e=="boolean"}function qr(e){return e===null}function si(e){return e==null}function et(e){return typeof e=="number"}function xr(e){return typeof e=="string"}function li(e){return typeof e=="symbol"}function T(e){return e===void 0}function Pr(e){return Y(e)&&tt(e)==="[object RegExp]"}function Y(e){return typeof e=="object"&&e!==null}function Zr(e){return Y(e)&&tt(e)==="[object Date]"}function Or(e){return Y(e)&&(tt(e)==="[object Error]"||e instanceof Error)}function Er(e){return typeof e=="function"}function ci(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}function yi(e){return p.isBuffer(e)}function tt(e){return Object.prototype.toString.call(e)}function Qe(e){return e<10?"0"+e.toString(10):e.toString(10)}function Np(){var e=new Date,r=[Qe(e.getHours()),Qe(e.getMinutes()),Qe(e.getSeconds())].join(":");return[e.getDate(),Rp[e.getMonth()],r].join(" ")}function vi(){console.log("%s - %s",Np(),re.apply(null,arguments))}function nt(e,r){if(!r||!Y(r))return e;for(var t=Object.keys(r),n=t.length;n--;)e[t[n]]=r[t[n]];return e}function gi(e,r){return Object.prototype.hasOwnProperty.call(e,r)}var Ep,Qr,Ve,Rp,_p,hi=be(()=>{"use strict";o();i();ui();fi();Ep=/%[sdj%]/g;Qr={};R.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]};R.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};Rp=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];_p={inherits:Ke,_extend:nt,log:vi,isBuffer:yi,isPrimitive:ci,isFunction:Er,isError:Or,isDate:Zr,isObject:Y,isRegExp:Pr,isUndefined:T,isSymbol:li,isString:xr,isNumber:et,isNullOrUndefined:si,isNull:qr,isBoolean:ee,isArray:rt,inspect:R,deprecate:Ze,format:re,debuglog:pi}});var mi=l((Xv,te)=>{"use strict";o();i();var Q=(hi(),cu(di));if(Q&&Q.default){te.exports=Q.default;for(let e in Q)te.exports[e]=Q[e]}else Q&&(te.exports=Q)});var Si=l((eg,bi)=>{"use strict";o();i();bi.exports=mi().inspect});var Tr=l((og,ji)=>{"use strict";o();i();var yt=typeof Map=="function"&&Map.prototype,ot=Object.getOwnPropertyDescriptor&&yt?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,oe=yt&&ot&&typeof ot.get=="function"?ot.get:null,Ai=yt&&Map.prototype.forEach,vt=typeof Set=="function"&&Set.prototype,it=Object.getOwnPropertyDescriptor&&vt?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,ie=vt&&it&&typeof it.get=="function"?it.get:null,wi=vt&&Set.prototype.forEach,Up=typeof WeakMap=="function"&&WeakMap.prototype,Ir=Up?WeakMap.prototype.has:null,Dp=typeof WeakSet=="function"&&WeakSet.prototype,Fr=Dp?WeakSet.prototype.has:null,Bp=typeof WeakRef=="function"&&WeakRef.prototype,Pi=Bp?WeakRef.prototype.deref:null,Mp=Boolean.prototype.valueOf,Cp=Object.prototype.toString,jp=Function.prototype.toString,Gp=String.prototype.match,gt=String.prototype.slice,G=String.prototype.replace,Wp=String.prototype.toUpperCase,Oi=String.prototype.toLowerCase,Ni=RegExp.prototype.test,Ei=Array.prototype.concat,N=Array.prototype.join,kp=Array.prototype.slice,qi=Math.floor,ft=typeof BigInt=="function"?BigInt.prototype.valueOf:null,at=Object.getOwnPropertySymbols,pt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,sr=typeof Symbol=="function"&&typeof Symbol.iterator=="object",q=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===sr||!0)?Symbol.toStringTag:null,_i=Object.prototype.propertyIsEnumerable,xi=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function $i(e,r){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Ni.call(/e/,r))return r;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-qi(-e):qi(e);if(n!==e){var a=String(n),u=gt.call(r,a.length+1);return G.call(a,t,"$&_")+"."+G.call(G.call(u,/([0-9]{3})/g,"$&_"),/_$/,"")}}return G.call(r,t,"$&_")}var st=Si(),Ii=st.custom,Fi=Bi(Ii)?Ii:null,Ui={__proto__:null,double:'"',single:"'"},Lp={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};ji.exports=function e(r,t,n,a){var u=t||{};if(D(u,"quoteStyle")&&!D(Ui,u.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(D(u,"maxStringLength")&&(typeof u.maxStringLength=="number"?u.maxStringLength<0&&u.maxStringLength!==1/0:u.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var f=D(u,"customInspect")?u.customInspect:!0;if(typeof f!="boolean"&&f!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(D(u,"indent")&&u.indent!==null&&u.indent!==" "&&!(parseInt(u.indent,10)===u.indent&&u.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(D(u,"numericSeparator")&&typeof u.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var c=u.numericSeparator;if(typeof r=="undefined")return"undefined";if(r===null)return"null";if(typeof r=="boolean")return r?"true":"false";if(typeof r=="string")return Ci(r,u);if(typeof r=="number"){if(r===0)return 1/0/r>0?"0":"-0";var y=String(r);return c?$i(r,y):y}if(typeof r=="bigint"){var h=String(r)+"n";return c?$i(r,h):h}var g=typeof u.depth=="undefined"?5:u.depth;if(typeof n=="undefined"&&(n=0),n>=g&&g>0&&typeof r=="object")return lt(r)?"[Array]":"[Object]";var d=fs(u,n);if(typeof a=="undefined")a=[];else if(Mi(a,r)>=0)return"[Circular]";function v(X,_r,pu){if(_r&&(a=kp.call(a),a.push(_r)),pu){var Gt={depth:u.depth};return D(u,"quoteStyle")&&(Gt.quoteStyle=u.quoteStyle),e(X,Gt,n+1,a)}return e(X,u,n+1,a)}if(typeof r=="function"&&!Ti(r)){var A=Zp(r),P=ne(r,v);return"[Function"+(A?": "+A:" (anonymous)")+"]"+(P.length>0?" { "+N.call(P,", ")+" }":"")}if(Bi(r)){var S=sr?G.call(String(r),/^(Symbol\(.*\))_[^)]*$/,"$1"):pt.call(r);return typeof r=="object"&&!sr?$r(S):S}if(is(r)){for(var x="<"+Oi.call(String(r.nodeName)),$=r.attributes||[],_=0;_<$.length;_++)x+=" "+$[_].name+"="+Di(zp($[_].value),"double",u);return x+=">",r.childNodes&&r.childNodes.length&&(x+="..."),x+="</"+Oi.call(String(r.nodeName))+">",x}if(lt(r)){if(r.length===0)return"[]";var k=ne(r,v);return d&&!us(k)?"["+ct(k,d)+"]":"[ "+N.call(k,", ")+" ]"}if(Hp(r)){var yr=ne(r,v);return!("cause"in Error.prototype)&&"cause"in r&&!_i.call(r,"cause")?"{ ["+String(r)+"] "+N.call(Ei.call("[cause]: "+v(r.cause),yr),", ")+" }":yr.length===0?"["+String(r)+"]":"{ ["+String(r)+"] "+N.call(yr,", ")+" }"}if(typeof r=="object"&&f){if(Fi&&typeof r[Fi]=="function"&&st)return st(r,{depth:g-n});if(f!=="symbol"&&typeof r.inspect=="function")return r.inspect()}if(rs(r)){var Nr=[];return Ai&&Ai.call(r,function(X,_r){Nr.push(v(_r,r,!0)+" => "+v(X,r))}),Ri("Map",oe.call(r),Nr,d)}if(ns(r)){var Mt=[];return wi&&wi.call(r,function(X){Mt.push(v(X,r))}),Ri("Set",ie.call(r),Mt,d)}if(es(r))return ut("WeakMap");if(os(r))return ut("WeakSet");if(ts(r))return ut("WeakRef");if(Vp(r))return $r(v(Number(r)));if(Qp(r))return $r(v(ft.call(r)));if(Yp(r))return $r(Mp.call(r));if(Kp(r))return $r(v(String(r)));if(typeof window!="undefined"&&r===window)return"{ [object Window] }";if(typeof globalThis!="undefined"&&r===globalThis||typeof globalThis!="undefined"&&r===globalThis)return"{ [object globalThis] }";if(!Jp(r)&&!Ti(r)){var de=ne(r,v),Ct=xi?xi(r)===Object.prototype:r instanceof Object||r.constructor===Object,he=r instanceof Object?"":"null prototype",jt=!Ct&&q&&Object(r)===r&&q in r?gt.call(W(r),8,-1):he?"Object":"",fu=Ct||typeof r.constructor!="function"?"":r.constructor.name?r.constructor.name+" ":"",me=fu+(jt||he?"["+N.call(Ei.call([],jt||[],he||[]),": ")+"] ":"");return de.length===0?me+"{}":d?me+"{"+ct(de,d)+"}":me+"{ "+N.call(de,", ")+" }"}return String(r)};function Di(e,r,t){var n=t.quoteStyle||r,a=Ui[n];return a+e+a}function zp(e){return G.call(String(e),/"/g,""")}function lt(e){return W(e)==="[object Array]"&&(!q||!(typeof e=="object"&&q in e))}function Jp(e){return W(e)==="[object Date]"&&(!q||!(typeof e=="object"&&q in e))}function Ti(e){return W(e)==="[object RegExp]"&&(!q||!(typeof e=="object"&&q in e))}function Hp(e){return W(e)==="[object Error]"&&(!q||!(typeof e=="object"&&q in e))}function Kp(e){return W(e)==="[object String]"&&(!q||!(typeof e=="object"&&q in e))}function Vp(e){return W(e)==="[object Number]"&&(!q||!(typeof e=="object"&&q in e))}function Yp(e){return W(e)==="[object Boolean]"&&(!q||!(typeof e=="object"&&q in e))}function Bi(e){if(sr)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!pt)return!1;try{return pt.call(e),!0}catch(r){}return!1}function Qp(e){if(!e||typeof e!="object"||!ft)return!1;try{return ft.call(e),!0}catch(r){}return!1}var Xp=Object.prototype.hasOwnProperty||function(e){return e in this};function D(e,r){return Xp.call(e,r)}function W(e){return Cp.call(e)}function Zp(e){if(e.name)return e.name;var r=Gp.call(jp.call(e),/^function\s*([\w$]+)/);return r?r[1]:null}function Mi(e,r){if(e.indexOf)return e.indexOf(r);for(var t=0,n=e.length;t<n;t++)if(e[t]===r)return t;return-1}function rs(e){if(!oe||!e||typeof e!="object")return!1;try{oe.call(e);try{ie.call(e)}catch(r){return!0}return e instanceof Map}catch(r){}return!1}function es(e){if(!Ir||!e||typeof e!="object")return!1;try{Ir.call(e,Ir);try{Fr.call(e,Fr)}catch(r){return!0}return e instanceof WeakMap}catch(r){}return!1}function ts(e){if(!Pi||!e||typeof e!="object")return!1;try{return Pi.call(e),!0}catch(r){}return!1}function ns(e){if(!ie||!e||typeof e!="object")return!1;try{ie.call(e);try{oe.call(e)}catch(r){return!0}return e instanceof Set}catch(r){}return!1}function os(e){if(!Fr||!e||typeof e!="object")return!1;try{Fr.call(e,Fr);try{Ir.call(e,Ir)}catch(r){return!0}return e instanceof WeakSet}catch(r){}return!1}function is(e){return!e||typeof e!="object"?!1:typeof HTMLElement!="undefined"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Ci(e,r){if(e.length>r.maxStringLength){var t=e.length-r.maxStringLength,n="... "+t+" more character"+(t>1?"s":"");return Ci(gt.call(e,0,r.maxStringLength),r)+n}var a=Lp[r.quoteStyle||"single"];a.lastIndex=0;var u=G.call(G.call(e,a,"\\$1"),/[\x00-\x1f]/g,as);return Di(u,"single",r)}function as(e){var r=e.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[r];return t?"\\"+t:"\\x"+(r<16?"0":"")+Wp.call(r.toString(16))}function $r(e){return"Object("+e+")"}function ut(e){return e+" { ? }"}function Ri(e,r,t,n){var a=n?ct(t,n):N.call(t,", ");return e+" ("+r+") {"+a+"}"}function us(e){for(var r=0;r<e.length;r++)if(Mi(e[r],`
|
|
11
|
+
`)>=0)return!1;return!0}function fs(e,r){var t;if(e.indent===" ")t=" ";else if(typeof e.indent=="number"&&e.indent>0)t=N.call(Array(e.indent+1)," ");else return null;return{base:t,prev:N.call(Array(r+1),t)}}function ct(e,r){if(e.length===0)return"";var t=`
|
|
12
|
+
`+r.prev+r.base;return t+N.call(e,","+t)+`
|
|
13
|
+
`+r.prev}function ne(e,r){var t=lt(e),n=[];if(t){n.length=e.length;for(var a=0;a<e.length;a++)n[a]=D(e,a)?r(e[a],e):""}var u=typeof at=="function"?at(e):[],f;if(sr){f={};for(var c=0;c<u.length;c++)f["$"+u[c]]=u[c]}for(var y in e)D(e,y)&&(t&&String(Number(y))===y&&y<e.length||sr&&f["$"+y]instanceof Symbol||(Ni.call(/[^\w$]/,y)?n.push(r(y,e)+": "+r(e[y],e)):n.push(y+": "+r(e[y],e))));if(typeof at=="function")for(var h=0;h<u.length;h++)_i.call(e,u[h])&&n.push("["+r(u[h])+"]: "+r(e[u[h]],e));return n}});var ae=l((ug,Gi)=>{"use strict";o();i();Gi.exports=function(r){return typeof r=="string"||typeof r=="symbol"}});var ki=l((sg,Wi)=>{"use strict";o();i();var ps=w(),ss=Tr(),ls=ae();Wi.exports=function(r,t){if(!ls(t))throw new ps("Assertion failed: IsPropertyKey(P) is not true, got "+ss(t));return r[t]}});var Hi=l((yg,Ji)=>{"use strict";o();i();var zi=Function.prototype.toString,lr=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,ht,ue;if(typeof lr=="function"&&typeof Object.defineProperty=="function")try{ht=Object.defineProperty({},"length",{get:function(){throw ue}}),ue={},lr(function(){throw 42},null,ht)}catch(e){e!==ue&&(lr=null)}else lr=null;var cs=/^\s*class\b/,mt=function(r){try{var t=zi.call(r);return cs.test(t)}catch(n){return!1}},dt=function(r){try{return mt(r)?!1:(zi.call(r),!0)}catch(t){return!1}},fe=Object.prototype.toString,ys="[object Object]",vs="[object Function]",gs="[object GeneratorFunction]",ds="[object HTMLAllCollection]",hs="[object HTML document.all class]",ms="[object HTMLCollection]",bs=typeof Symbol=="function"&&!!Symbol.toStringTag,Ss=!(0 in[,]),bt=function(){return!1};typeof document=="object"&&(Li=document.all,fe.call(Li)===fe.call(document.all)&&(bt=function(r){if((Ss||!r)&&(typeof r=="undefined"||typeof r=="object"))try{var t=fe.call(r);return(t===ds||t===hs||t===ms||t===ys)&&r("")==null}catch(n){}return!1}));var Li;Ji.exports=lr?function(r){if(bt(r))return!0;if(!r||typeof r!="function"&&typeof r!="object")return!1;try{lr(r,null,ht)}catch(t){if(t!==ue)return!1}return!mt(r)&&dt(r)}:function(r){if(bt(r))return!0;if(!r||typeof r!="function"&&typeof r!="object")return!1;if(bs)return dt(r);if(mt(r))return!1;var t=fe.call(r);return t!==vs&&t!==gs&&!/^\[object HTML/.test(t)?!1:dt(r)}});var St=l((dg,Ki)=>{"use strict";o();i();Ki.exports=Hi()});var Xi=l((bg,Qi)=>{"use strict";o();i();var Vi=w(),As=ki(),ws=St(),Ps=ae(),Yi=Tr();Qi.exports=function(r,t){if(!Ps(t))throw new Vi("Assertion failed: IsPropertyKey(P) is not true");var n=As(r,t);if(n!=null){if(!ws(n))throw new Vi(Yi(t)+" is not a function: "+Yi(n));return n}}});var ra=l((wg,Zi)=>{"use strict";o();i();var Os=Te();Zi.exports=function(){return Os()&&!!Symbol.toStringTag}});var Ot=l((Eg,oa)=>{"use strict";o();i();var At=I(),ea=ra()(),ta,na,wt,Pt;ea&&(ta=At("Object.prototype.hasOwnProperty"),na=At("RegExp.prototype.exec"),wt={},pe=function(){throw wt},Pt={toString:pe,valueOf:pe},typeof Symbol.toPrimitive=="symbol"&&(Pt[Symbol.toPrimitive]=pe));var pe,Es=At("Object.prototype.toString"),qs=Object.getOwnPropertyDescriptor,xs="[object RegExp]";oa.exports=ea?function(r){if(!r||typeof r!="object")return!1;var t=qs(r,"lastIndex"),n=t&&ta(t,"value");if(!n)return!1;try{na(r,Pt)}catch(a){return a===wt}}:function(r){return!r||typeof r!="object"&&typeof r!="function"?!1:Es(r)===xs}});var Et=l(($g,ia)=>{"use strict";o();i();var $s=I(),Is=Ot(),Fs=$s("RegExp.prototype.exec"),Ts=w();ia.exports=function(r){if(!Is(r))throw new Ts("`regex` must be a RegExp");return function(n){return Fs(r,n)!==null}}});var ua=l((Tg,aa)=>{"use strict";o();i();aa.exports=function(r,t){for(var n=0;n<r.length;n+=1)if(!t(r[n],n,r))return!1;return!0}});var pa=l((_g,fa)=>{"use strict";o();i();fa.exports=function(r){if(r===null)return"Null";if(typeof r=="undefined")return"Undefined";if(typeof r=="function"||typeof r=="object")return"Object";if(typeof r=="number")return"Number";if(typeof r=="boolean")return"Boolean";if(typeof r=="string")return"String"}});var qt=l((Bg,sa)=>{"use strict";o();i();var Rs=pa();sa.exports=function(r){return typeof r=="symbol"?"Symbol":typeof r=="bigint"?"BigInt":Rs(r)}});var ya=l((jg,ca)=>{"use strict";o();i();var la=w(),Ns=Tr(),_s=ae(),Us=qt();ca.exports=function(r,t){if(Us(r)!=="Object")throw new la("Assertion failed: Type(O) is not Object");if(!_s(t))throw new la("Assertion failed: IsPropertyKey(P) is not true, got "+Ns(t));return r[t]}});var ga=l((kg,va)=>{"use strict";o();i();var Ds=F();va.exports=Ds("%Math.min%")});var xt=l((Jg,da)=>{"use strict";o();i();da.exports=Number.isNaN||function(r){return r!==r}});var ma=l((Vg,ha)=>{"use strict";o();i();var Bs=xt();ha.exports=function(e){return(typeof e=="number"||typeof e=="bigint")&&!Bs(e)&&e!==1/0&&e!==-1/0}});var se=l((Xg,Sa)=>{"use strict";o();i();var ba=F(),Ms=ba("%Math.abs%"),Cs=ba("%Math.floor%"),js=xt(),Gs=ma();Sa.exports=function(r){if(typeof r!="number"||js(r)||!Gs(r))return!1;var t=Ms(r);return Cs(t)===t}});var It=l((ed,Aa)=>{"use strict";o();i();var Ws=I(),$t=w(),ks=se(),Ls=Ws("String.prototype.slice");Aa.exports=function(r,t,n){if(typeof r!="string")throw new $t("Assertion failed: `string` must be a String");if(typeof t!="string")throw new $t("Assertion failed: `searchValue` must be a String");if(!ks(n)||n<0)throw new $t("Assertion failed: `fromIndex` must be a non-negative integer");var a=r.length;if(t===""&&n<=a)return n;for(var u=t.length,f=n;f<=a-u;f+=1){var c=Ls(r,f,f+u);if(c===t)return f}return-1}});var le=l((od,wa)=>{"use strict";o();i();var zs=w();wa.exports=function(r){if(r==null)throw new zs(arguments.length>0&&arguments[1]||"Cannot call method on "+r);return r}});var ce=l((ud,Pa)=>{"use strict";o();i();var Js=F(),Hs=Js("%String%"),Ks=w();Pa.exports=function(r){if(typeof r=="symbol")throw new Ks("Cannot convert a Symbol value to a string");return Hs(r)}});var Ft=l((sd,qa)=>{"use strict";o();i();var Vs=le(),Ys=ce(),Qs=I(),Oa=Qs("String.prototype.replace"),Ea=/^\s$/.test("\u180E"),Xs=Ea?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,Zs=Ea?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;qa.exports=function(){var r=Ys(Vs(this));return Oa(Oa(r,Xs,""),Zs,"")}});var Tt=l((yd,$a)=>{"use strict";o();i();var rl=Ft(),xa="\u200B",cr="\u180E";$a.exports=function(){return String.prototype.trim&&xa.trim()===xa&&cr.trim()===cr&&("_"+cr).trim()==="_"+cr&&(cr+"_").trim()===cr+"_"?String.prototype.trim:rl}});var Fa=l((dd,Ia)=>{"use strict";o();i();var el=Ar(),tl=Tt();Ia.exports=function(){var r=tl();return el(String.prototype,{trim:r},{trim:function(){return String.prototype.trim!==r}}),r}});var _a=l((bd,Na)=>{"use strict";o();i();var nl=Hr(),ol=Ar(),il=le(),al=Ft(),Ta=Tt(),ul=Fa(),fl=nl(Ta()),Ra=function(r){return il(r),fl(r)};ol(Ra,{getPolyfill:Ta,implementation:al,shim:ul});Na.exports=Ra});var Ma=l((wd,Ba)=>{"use strict";o();i();var Nt=F(),Rt=Nt("%Number%"),pl=Nt("%RegExp%"),sl=w(),Ua=Nt("%parseInt%"),ll=I(),ye=Et(),Da=ll("String.prototype.slice"),cl=ye(/^0b[01]+$/i),yl=ye(/^0o[0-7]+$/i),vl=ye(/^[-+]0x[0-9a-f]+$/i),gl=["\x85","\u200B","\uFFFE"].join(""),dl=new pl("["+gl+"]","g"),hl=ye(dl),ml=_a();Ba.exports=function e(r){if(typeof r!="string")throw new sl("Assertion failed: `argument` is not a String");if(cl(r))return Rt(Ua(Da(r,2),2));if(yl(r))return Rt(Ua(Da(r,2),8));if(hl(r)||vl(r))return NaN;var t=ml(r);return t!==r?e(t):Rt(r)}});var Ga=l((Ed,ja)=>{"use strict";o();i();var bl=w(),Ca=se(),Sl=I(),Al=Sl("String.prototype.slice");ja.exports=function(r,t,n){if(typeof r!="string"||!Ca(t)||arguments.length>2&&!Ca(n))throw new bl("`S` must be a String, and `inclusiveStart` and `exclusiveEnd` must be integers");return Al(r,t,arguments.length>2?n:r.length)}});var ka=l(($d,Wa)=>{"use strict";o();i();Wa.exports=function(r){return typeof r=="string"||typeof r=="undefined"}});var za=l((Td,La)=>{"use strict";o();i();var wl=I()("String.prototype.slice");La.exports=function(r,t){return r===t?!0:r.length>t.length?!1:wl(t,0,r.length)===r}});var Ya=l((_d,Va)=>{"use strict";o();i();var B=w(),Ka=Et(),Pl=ua(),_t=Tr(),Ol=ya(),El=Je(),ql=ga(),xl=It(),Ja=Ma(),M=Ga(),$l=ce(),Ha=qt(),Il=se(),Fl=ka(),Rr=za(),Tl=Ka(/^\$[0-9]/),Rl=Ka(/^\$[0-9][0-9]/);Va.exports=function(r,t,n,a,u,f){if(typeof r!="string")throw new B("Assertion failed: `matched` must be a String");if(typeof t!="string")throw new B("Assertion failed: `str` must be a String");if(!Il(n)||n<0)throw new B("Assertion failed: `position` must be a nonnegative integer, got "+_t(n));if(!El(a)||!Pl(a,Fl))throw new B("Assertion failed: `captures` must be a possibly-empty List of Strings or `undefined`, got "+_t(a));if(typeof u!="undefined"&&Ha(u)!=="Object")throw new B("Assertion failed: `namedCaptures` must be `undefined` or an Object");if(typeof f!="string")throw new B("Assertion failed: `replacementTemplate` must be a String");var c=t.length;if(n>c)throw new B("Assertion failed: position > stringLength, got "+_t(n));for(var y=f,h="";y!=="";){var g,d,v;if(Rr("$$",y))g="$$",d="$";else if(Rr("$`",y))g="$`",d=M(t,0,n);else if(Rr("$&",y))g="$&",d=r;else if(Rr("$'",y)){g="$'";var A=r.length,P=n+A;d=M(t,ql(P,c))}else if(Tl(y)){var S=Rl(y)?2:1,x=M(y,1,1+S),$=Ja(x);if($<0||$>99)throw new B("Assertion failed: `index` must be >= 0 and <= 99");var _=a.length;$>_&&S===2&&(S=1,x=M(x,0,1),$=Ja(x)),g=M(y,0,1+S),1<=$&&$<=_?(v=a[$-1],typeof v=="undefined"?d="":d=v):d=g}else if(Rr("$<",y)){var k=xl(y,">",0);if(k===-1||typeof u=="undefined")g="$<",d=g;else{g=M(y,0,k+1);var yr=M(y,2,k);if(Ha(u)!=="Object")throw new B("Assertion failed: Type(namedCaptures) is not Object");v=Ol(u,yr),typeof v=="undefined"?d="":d=$l(v)}}else g=M(y,0,1),d=g;var Nr=g.length;y=M(y,Nr),h+=d}return h}});var Dt=l((Bd,ru)=>{"use strict";o();i();var Qa=ei(),Nl=Xi(),_l=Ya(),Ul=St(),Dl=le(),ve=ce(),Xa=It(),Bl=F(),ge=I(),Ml=Ee()(),Cl=Ot(),jl=Bl("%Math.max%"),Za=w(),Gl=ge("Array.prototype.push"),Ut=ge("String.prototype.slice"),Wl=ge("String.prototype.indexOf"),kl=ge("String.prototype.replace");ru.exports=function(r,t){var n=Dl(this),a=Cl(r);if(a&&Wl(Ut(r,r.source.length+2),"g")===-1)throw new Za("use .replace for a non-global regex. NOTE: this may be allowed in the future.");if(Ml&&Symbol.replace){if(r!=null){var u=Nl(r,Symbol.replace);if(typeof u!="undefined")return Qa(u,r,[n,t])}}else if(a)return kl(n,r,t);var f=ve(n),c=ve(r),y=Ul(t);y||(t=ve(t));for(var h=c.length,g=jl(1,h),d=[],v=Xa(f,c,0);v!==-1;)Gl(d,v),v=Xa(f,c,v+g);for(var A=0,P="",S=0;S<d.length;S+=1){var x;if(y)x=ve(Qa(t,void 0,[c,d[S],f]));else{if(typeof t!="string")throw new Za("Assertion failed: `replaceValue` should be a string at this point");var $=[];x=_l(c,f,d[S],$,void 0,t)}var _=Ut(f,A,d[S]);P+=_+x,A=d[S]+h}return A<f.length&&(P+=Ut(f,A)),P}});var Bt=l((jd,eu)=>{"use strict";o();i();var Ll=Dt();eu.exports=function(){return String.prototype.replaceAll||Ll}});var nu=l((kd,tu)=>{"use strict";o();i();var zl=Ar(),Jl=Bt();tu.exports=function(){var r=Jl();return zl(String.prototype,{replaceAll:r},{replaceAll:function(){return String.prototype.replaceAll!==r}}),r}});var uu=l((Jd,au)=>{"use strict";o();i();var Hl=Hr(),Kl=Ar(),ou=Dt(),Vl=Bt(),Yl=nu(),iu=Hl(ou);Kl(iu,{getPolyfill:Vl,implementation:ou,shim:Yl});au.exports=iu});o();i();var Vd=lu(uu(),1);export{yu as DynamicSnippetsGenerator};
|
package/package.json
CHANGED
package/esm/chunk-736FTN3M.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as P,b as T,c as b,d as A,j as o,k as a,m as p,n as f,o as g}from"./chunk-YD6EIACZ.js";a();p();var E=class{constructor(e){o(this,"context");this.context=e}};a();p();var n={Critical:"CRITICAL",Warning:"WARNING"},y=class h{constructor(){o(this,"errors");o(this,"path");this.errors=[],this.path=[]}add(e){this.errors.push(T(P({},e),{path:[...this.path]}))}scope(e){this.path.push(e)}unscope(){this.path.pop()}getBySeverity(e){return this.errors.filter(r=>r.severity===e)}empty(){return this.errors.length===0}size(){return this.errors.length}clone(){let e=new h;return e.errors=[...this.errors],e.path=[...this.path],e}reset(){this.errors=[],this.path=[]}toDynamicSnippetErrors(){return this.errors.map(e=>({severity:e.severity,path:e.path!=null?this.pathToStringArray(e.path):void 0,message:e.message}))}pathToStringArray(e){let r=[];for(let t of e){if(typeof t=="string"){r.push(t);continue}r[r.length-1]+=`[${t.index}]`}return r}};a();p();a();p();a();p();var v=class{constructor(){o(this,"REFERENCE_REGEX",/^(GET|POST|PUT|DELETE|PATCH)\s(\/[a-zA-Z0-9\/{}_-]*)$/)}validate(e){return this.REFERENCE_REGEX.test(e)?{type:"valid"}:{type:"invalid"}}tryParse(e){if(this.validate(e).type==="invalid")return;let t=e.match(this.REFERENCE_REGEX);if(!(t==null||t[1]==null||t[2]==null))return{method:t[1],path:t[2]}}};var R=class{constructor({ir:e,config:r}){o(this,"config");o(this,"errors");o(this,"_ir");o(this,"httpEndpointReferenceParser");this._ir=e,this.config=r,this.errors=new y,this.httpEndpointReferenceParser=new v}associateQueryParametersByWireValue({parameters:e,values:r}){let t=[];for(let[i,s]of Object.entries(r)){this.errors.scope(i);try{let l=e.find(m=>m.name.wireValue===i);if(l==null)throw this.newParameterNotRecognizedError(i);let c=this.isListTypeReference(l.typeReference)&&!Array.isArray(s)?[s]:s;t.push({name:l.name,typeReference:l.typeReference,value:c})}finally{this.errors.unscope()}}return t}associateByWireValue({parameters:e,values:r,ignoreMissingParameters:t}){let i=[];for(let[s,l]of Object.entries(r)){this.errors.scope(s);try{let c=e.find(m=>m.name.wireValue===s);if(c==null){if(t)continue;this.errors.add({severity:n.Critical,message:this.newParameterNotRecognizedError(s).message});continue}i.push({name:c.name,typeReference:c.typeReference,value:l})}finally{this.errors.unscope()}}return i}getSingleFileValue({property:e,record:r}){let t=r[e.wireValue];if(t!=null){if(typeof t!="string"){this.errors.add({severity:n.Critical,message:`Expected file value to be a string, got ${typeof t}`});return}return t}}getFileArrayValues({property:e,record:r}){let t=r[e.wireValue];if(t==null)return;if(!Array.isArray(t)){this.errors.add({severity:n.Critical,message:`Expected file array value to be an array of strings, got ${typeof t}`});return}let i=[];for(let s of t){if(typeof s!="string"){this.errors.add({severity:n.Critical,message:`Expected file array value to be an array of strings, got ${typeof s}`});return}i.push(s)}return i}getRecord(e){if(typeof e!="object"||Array.isArray(e)){this.errors.add({severity:n.Critical,message:`Expected object with key, value pairs but got: ${Array.isArray(e)?"array":typeof e}`});return}return e==null?{}:e}resolveNamedType({typeId:e}){let r=this._ir.types[e];if(r==null){this.errors.add({severity:n.Critical,message:`Type identified by "${e}" could not be found`});return}return r}resolveDiscriminatedUnionTypeInstance({discriminatedUnion:e,value:r}){let t=this.getRecord(r);if(t==null)return;let i=e.discriminant.wireValue,s=t[i];if(s==null){this.errors.add({severity:n.Critical,message:this.newParameterNotRecognizedError(i).message});return}if(typeof s!="string"){this.errors.add({severity:n.Critical,message:`Expected discriminant value to be a string but got: ${typeof s}`});return}let l=e.types[s];if(l==null){this.errors.add({severity:n.Critical,message:`No type found for discriminant value "${s}"`});return}let x=t,{[i]:c}=x,m=A(x,[b(i)]);return{singleDiscriminatedUnionType:l,discriminantValue:l.discriminantValue,value:m}}resolveEndpointOrThrow(e){let r=this.httpEndpointReferenceParser.tryParse(e);if(r==null)throw new Error(`Failed to parse endpoint reference "${e}"`);return this.resolveEndpointLocationOrThrow(r)}resolveEndpointLocationOrThrow(e){let r=[];for(let t of Object.values(this._ir.endpoints))this.parsedEndpointMatches({endpoint:t,parsedEndpoint:e})&&r.push(t);if(r.length===0)throw new Error(`Failed to find endpoint identified by "${e.method} ${e.path}"`);return r}needsRequestParameter({request:e,inlinePathParameters:r,inlineFileProperties:t}){var i;return this.includePathParametersInWrappedRequest({request:e,inlinePathParameters:r})||e.queryParameters!=null&&e.queryParameters.length>0||e.headers!=null&&e.headers.length>0?!0:e.body!=null?this.includeRequestBodyInWrappedRequest({body:e.body,inlineFileProperties:t}):!((i=e.metadata)!=null&&i.onlyPathParameters)}includePathParametersInWrappedRequest({request:e,inlinePathParameters:r}){var t,i;return r&&((i=(t=e.metadata)==null?void 0:t.includePathParameters)!=null?i:!1)}isFileUploadRequestBody(e){switch(e.type){case"fileUpload":return!0;case"properties":case"referenced":return!1;default:f(e)}}resolveEnvironmentName(e){if(this._ir.environments==null)return;let r=this._ir.environments.environments;switch(r.type){case"singleBaseUrl":{let t=r.environments.find(i=>i.id===e);return t==null?void 0:t.name}case"multipleBaseUrls":{let t=r.environments.find(i=>i.id===e);return t==null?void 0:t.name}default:f(r)}}isSingleEnvironmentID(e){return typeof e=="string"}isMultiEnvironmentValues(e){return typeof e=="object"}validateMultiEnvironmentUrlValues(e){if(this._ir.environments==null)return this.errors.add({severity:n.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;let r=this._ir.environments.environments;switch(r.type){case"singleBaseUrl":return this.errors.add({severity:n.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;case"multipleBaseUrls":{let t=r.environments[0];if(t==null)return this.errors.add({severity:n.Critical,message:"Multiple environments are not supported; use the baseUrl option instead"}),!1;let i=new Set(g(t.urls));for(let s of g(e))i.has(s)&&i.delete(s);return i.size>0?(this.errors.add({severity:n.Critical,message:`The provided environments are invalid; got: [${Object.keys(e).join(", ")}], expected: [${g(t.urls).join(", ")}]`}),!1):!0}}}getValueAsNumber({value:e}){if(typeof e!="number"){this.errors.add({severity:n.Critical,message:this.newTypeMismatchError({expected:"number",value:e}).message});return}return e}getValueAsBoolean({value:e}){if(typeof e!="boolean"){this.errors.add({severity:n.Critical,message:this.newTypeMismatchError({expected:"boolean",value:e}).message});return}return e}getValueAsString({value:e}){if(typeof e!="string"){this.errors.add({severity:n.Critical,message:this.newTypeMismatchError({expected:"string",value:e}).message});return}return e}isOptional(e){switch(e.type){case"nullable":return this.isOptional(e.value);case"optional":return!0;case"named":{let r=this.resolveNamedType({typeId:e.value});return r==null?!1:r.type==="alias"?this.isNullable(r.typeReference):!1}}return!1}isNullable(e){switch(e.type){case"nullable":return!0;case"optional":return this.isNullable(e.value);case"named":{let r=this.resolveNamedType({typeId:e.value});return r==null?!1:r.type==="alias"?this.isNullable(r.typeReference):!1}}return!1}newAuthMismatchError({auth:e,values:r}){return new Error(`Expected auth type ${e.type}, got ${r.type}`)}newParameterNotRecognizedError(e){return new Error(`"${e}" is not a recognized parameter for this endpoint`)}newTypeMismatchError({expected:e,value:r}){return new Error(`Expected ${e}, got ${typeof r}`)}includeRequestBodyInWrappedRequest({body:e,inlineFileProperties:r}){switch(e.type){case"properties":case"referenced":return!0;case"fileUpload":return this.includeFileUploadBodyInWrappedRequest({fileUpload:e,inlineFileProperties:r});default:f(e)}}includeFileUploadBodyInWrappedRequest({fileUpload:e,inlineFileProperties:r}){return this.fileUploadHasBodyProperties({fileUpload:e})||r&&this.fileUploadHasFileProperties({fileUpload:e})}fileUploadHasBodyProperties({fileUpload:e}){return e.properties.some(r=>{switch(r.type){case"file":case"fileArray":return!1;case"bodyProperty":return!0;default:f(r)}})}fileUploadHasFileProperties({fileUpload:e}){return e.properties.some(r=>{switch(r.type){case"file":case"fileArray":return!0;case"bodyProperty":return!1;default:f(r)}})}isListTypeReference(e){return e.type==="optional"?this.isListTypeReference(e.value):e.type==="list"||e.type==="set"}parsedEndpointMatches({endpoint:e,parsedEndpoint:r}){return e.location.method===r.method&&e.location.path===r.path}};a();p();var w=class{constructor(){o(this,"reporter");o(this,"snippet");o(this,"err");this.snippet=void 0,this.reporter=void 0,this.err=void 0}update({context:e,snippet:r}){(this.reporter==null||this.reporter.size()>e.errors.size())&&(this.reporter=e.errors.clone(),this.snippet=r)}getResponseOrThrow({endpoint:e}){var r;if(this.snippet!=null&&this.reporter!=null)return{snippet:this.snippet,errors:this.reporter.toDynamicSnippetErrors()};throw(r=this.err)!=null?r:new Error(`Failed to generate snippet for endpoint "${e.method} ${e.path}"`)}};a();p();var S={PathParameters:"pathParameters",QueryParameters:"queryParameters",Headers:"headers",RequestBody:"requestBody"};a();p();export{E as a,n as b,R as c,w as d,S as e};
|
package/esm/chunk-CQ55KPJT.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as c}from"./chunk-V6G7NZKW.js";import{a as h}from"./chunk-25TNFA5L.js";import{a as m,d as s}from"./chunk-736FTN3M.js";import{k as d,m as a}from"./chunk-YD6EIACZ.js";d();a();var f=class extends m{constructor({ir:n,config:r}){super(new h({ir:n,config:r}))}async generate(n){let r=this.context.resolveEndpointLocationOrThrow(n.endpoint);if(r.length===0)throw new Error(`No endpoints found that match "${n.endpoint.method} ${n.endpoint.path}"`);let e=new s;for(let i of r){let o=this.context.clone(),p=new c({context:o});try{let t=await p.generateSnippet({endpoint:i,request:n});if(o.errors.empty())return{snippet:t,errors:void 0};e.update({context:o,snippet:t})}catch(t){e.err==null&&(e.err=t)}}return e.getResponseOrThrow({endpoint:n.endpoint})}generateSync(n){let r=this.context.resolveEndpointLocationOrThrow(n.endpoint);if(r.length===0)throw new Error(`No endpoints found that match "${n.endpoint.method} ${n.endpoint.path}"`);let e=new s;for(let i of r){let o=this.context.clone(),p=new c({context:o});try{let t=p.generateSnippetSync({endpoint:i,request:n});if(o.errors.empty())return{snippet:t,errors:void 0};e.update({context:o,snippet:t})}catch(t){e.err==null&&(e.err=t)}}return e.getResponseOrThrow({endpoint:n.endpoint})}};export{f as a};
|
package/esm/chunk-SQLJANKO.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as o}from"./chunk-736FTN3M.js";import{j as u,k as p,m as y,n as c,p as r}from"./chunk-YD6EIACZ.js";p();y();var v="value",d=class{constructor({context:e}){u(this,"context");this.context=e}convert(e){if(e.value===null)return this.context.isNullable(e.typeReference)?r.TypeLiteral.null():(this.context.errors.add({severity:o.Critical,message:"Expected non-null value, but got null"}),r.TypeLiteral.nop());if(e.value===void 0)return r.TypeLiteral.nop();switch(e.typeReference.type){case"list":return this.convertList({list:e.typeReference.value,value:e.value});case"literal":return this.convertLiteral({literalType:e.typeReference.value,value:e.value});case"map":return this.convertMap({map:e.typeReference,value:e.value});case"named":{let t=this.context.resolveNamedType({typeId:e.typeReference.value});return t==null?r.TypeLiteral.nop():this.convertNamed({named:t,value:e.value,as:e.as})}case"optional":return this.convert({typeReference:e.typeReference.value,value:e.value,as:e.as});case"nullable":return this.convert({typeReference:e.typeReference.value,value:e.value,as:e.as});case"primitive":return this.convertPrimitive({primitive:e.typeReference.value,value:e.value,as:e.as});case"set":return this.convertSet({set:e.typeReference.value,value:e.value});case"unknown":return this.convertUnknown({value:e.value});default:c(e.typeReference)}}convertLiteral({literalType:e,value:t}){switch(e.type){case"boolean":{let n=this.context.getValueAsBoolean({value:t});return n==null?r.TypeLiteral.nop():r.TypeLiteral.boolean(n)}case"string":{let n=this.context.getValueAsString({value:t});return n==null?r.TypeLiteral.nop():r.TypeLiteral.string(n)}default:c(e)}}convertList({list:e,value:t}){return Array.isArray(t)?r.TypeLiteral.array({values:t.map((n,i)=>{this.context.errors.scope({index:i});try{return this.convert({typeReference:e,value:n})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:o.Critical,message:`Expected array but got: ${typeof t}`}),r.TypeLiteral.nop())}convertSet({set:e,value:t}){return Array.isArray(t)?r.TypeLiteral.set({values:t.map((n,i)=>{this.context.errors.scope({index:i});try{return this.convert({typeReference:e,value:n})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:o.Critical,message:`Expected array but got: ${typeof t}`}),r.TypeLiteral.nop())}convertMap({map:e,value:t}){return typeof t!="object"||t==null?(this.context.errors.add({severity:o.Critical,message:`Expected object but got: ${t==null?"null":typeof t}`}),r.TypeLiteral.nop()):r.TypeLiteral.record({entries:Object.entries(t).map(([n,i])=>{this.context.errors.scope(n);try{return{key:this.convert({typeReference:e.key,value:n,as:"key"}),value:this.convert({typeReference:e.value,value:i})}}finally{this.context.errors.unscope()}})})}convertNamed({named:e,value:t,as:n}){var i;switch(e.type){case"alias":return(i=this.context.customConfig)!=null&&i.useBrandedStringAliases?r.TypeLiteral.reference(r.codeblock(a=>{a.writeNode(r.reference({name:this.context.namespaceExport,importFrom:this.context.getModuleImport(),memberName:this.context.getFullyQualifiedReference({declaration:e.declaration})})),a.write("("),a.writeNode(this.convert({typeReference:e.typeReference,value:t,as:n})),a.write(")")})):this.convert({typeReference:e.typeReference,value:t,as:n});case"discriminatedUnion":return this.convertDiscriminatedUnion({discriminatedUnion:e,value:t});case"enum":return this.convertEnum({enum_:e,value:t});case"object":return this.convertObject({object_:e,value:t});case"undiscriminatedUnion":return this.convertUndicriminatedUnion({undicriminatedUnion:e,value:t});default:c(e)}}convertDiscriminatedUnion({discriminatedUnion:e,value:t}){var l;let n=this.context.resolveDiscriminatedUnionTypeInstance({discriminatedUnion:e,value:t});if(n==null)return r.TypeLiteral.nop();let i=n.singleDiscriminatedUnionType,a=this.convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:n,unionVariant:i});if(a==null)return r.TypeLiteral.nop();if((l=this.context.customConfig)!=null&&l.includeUtilsOnUnionMembers)return r.TypeLiteral.reference(r.codeblock(m=>{m.writeNode(r.invokeMethod({on:r.reference({name:this.context.namespaceExport,importFrom:this.context.getModuleImport(),memberName:this.context.getFullyQualifiedReference({declaration:e.declaration})}),method:this.context.getMethodName(i.discriminantValue.name),arguments_:this.convertDiscriminatedUnionUtilsArgs({discriminatedUnionTypeInstance:n,unionVariant:i,unionProperties:a})}))}));let s={name:this.context.getPropertyName(e.discriminant.name),value:r.TypeLiteral.string(i.discriminantValue.wireValue)};return r.TypeLiteral.object({fields:[s,...a]})}convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:e,unionVariant:t}){let n=this.getBaseFields({discriminatedUnionTypeInstance:e,singleDiscriminatedUnionType:t});switch(t.type){case"samePropertiesAsObject":{let i=this.context.resolveNamedType({typeId:t.typeId});if(i==null)return;let a=this.convertNamed({named:i,value:e.value});if(!a.isObject()){this.context.errors.add({severity:o.Critical,message:"Internal error; expected union value to be an object"});return}let s=a.asObjectOrThrow();return[...n,...s.fields]}case"singleProperty":try{this.context.errors.scope(t.discriminantValue.wireValue);let i=this.context.getRecord(e.value);return i==null?[...n,{name:v,value:this.convert({typeReference:t.typeReference,value:e.value})}]:[...n,{name:this.context.getPropertyName(t.discriminantValue.name),value:this.convert({typeReference:t.typeReference,value:i[t.discriminantValue.wireValue]})}]}finally{this.context.errors.unscope()}case"noProperties":return n;default:c(t)}}convertDiscriminatedUnionUtilsArgs({discriminatedUnionTypeInstance:e,unionVariant:t,unionProperties:n}){return t.type==="singleProperty"&&this.context.getRecord(e.value)==null&&n.length===1?[this.convert({typeReference:t.typeReference,value:e.value})]:n.length>0?[r.TypeLiteral.object({fields:n})]:[]}getBaseFields({discriminatedUnionTypeInstance:e,singleDiscriminatedUnionType:t}){var i,a;return this.context.associateByWireValue({parameters:(i=t.properties)!=null?i:[],values:(a=this.context.getRecord(e.value))!=null?a:{},ignoreMissingParameters:!0}).map(s=>{this.context.errors.scope(s.name.wireValue);try{return{name:this.context.getPropertyName(s.name.name),value:this.convert(s)}}finally{this.context.errors.unscope()}})}convertObject({object_:e,value:t}){var i;let n=this.context.associateByWireValue({parameters:e.properties,values:(i=this.context.getRecord(t))!=null?i:{}});return r.TypeLiteral.object({fields:n.map(a=>{this.context.errors.scope(a.name.wireValue);try{return{name:this.context.getPropertyName(a.name.name),value:this.convert(a)}}finally{this.context.errors.unscope()}})})}convertEnum({enum_:e,value:t}){let n=this.getEnumValue({enum_:e,value:t});return n==null?r.TypeLiteral.nop():r.TypeLiteral.string(n)}getEnumValue({enum_:e,value:t}){if(typeof t!="string"){this.context.errors.add({severity:o.Critical,message:`Expected enum value string, got: ${typeof t}`});return}if(e.values.find(i=>i.wireValue===t)==null){this.context.errors.add({severity:o.Critical,message:`An enum value named "${t}" does not exist in this context`});return}return t}convertUndicriminatedUnion({undicriminatedUnion:e,value:t}){let n=this.findMatchingUndiscriminatedUnionType({undicriminatedUnion:e,value:t});return n==null?r.TypeLiteral.nop():n}findMatchingUndiscriminatedUnionType({undicriminatedUnion:e,value:t}){for(let n of e.types)try{return this.convert({typeReference:n,value:t})}catch(i){continue}this.context.errors.add({severity:o.Critical,message:`None of the types in the undicriminated union matched the given "${typeof t}" value`})}convertUnknown({value:e}){return r.TypeLiteral.unknown(e)}convertPrimitive({primitive:e,value:t,as:n}){var i,a;switch(e){case"INTEGER":case"UINT":{let s=this.getValueAsNumber({value:t,as:n});return s==null?r.TypeLiteral.nop():r.TypeLiteral.number(s)}case"LONG":case"UINT_64":{let s=this.getValueAsNumber({value:t,as:n});return s==null?r.TypeLiteral.nop():(i=this.context.customConfig)!=null&&i.useBigInt?r.TypeLiteral.bigint(BigInt(s)):r.TypeLiteral.number(s)}case"FLOAT":case"DOUBLE":{let s=this.getValueAsNumber({value:t});return s==null?r.TypeLiteral.nop():r.TypeLiteral.number(s)}case"BOOLEAN":{let s=this.getValueAsBoolean({value:t,as:n});return s==null?r.TypeLiteral.nop():r.TypeLiteral.boolean(s)}case"BASE_64":case"DATE":case"UUID":case"STRING":{let s=this.context.getValueAsString({value:t});return s==null?r.TypeLiteral.nop():r.TypeLiteral.string(s)}case"DATE_TIME":{let s=this.context.getValueAsString({value:t});return s==null?r.TypeLiteral.nop():r.TypeLiteral.datetime(s)}case"BIG_INTEGER":{let s=this.context.getValueAsString({value:t});return s==null?r.TypeLiteral.nop():(a=this.context.customConfig)!=null&&a.useBigInt?r.TypeLiteral.bigint(BigInt(s)):r.TypeLiteral.string(s)}default:c(e)}}getValueAsNumber({value:e,as:t}){let n=t==="key"&&typeof e=="string"?Number(e):e;return this.context.getValueAsNumber({value:n})}getValueAsBoolean({value:e,as:t}){let n=t==="key"?typeof e=="string"?e==="true":e==="false"?!1:e:e;return this.context.getValueAsBoolean({value:n})}};export{d as a};
|
package/esm/chunk-V6G7NZKW.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as c,e as o}from"./chunk-736FTN3M.js";import{j as F,k as v,m as P,n as u,p as n}from"./chunk-YD6EIACZ.js";v();P();var x="client",I="main",b={type:"primitive",value:"STRING"},R=class{constructor({context:e}){F(this,"context");this.context=e}async generateSnippet({endpoint:e,request:t}){return await this.buildCodeBlock({endpoint:e,snippet:t}).toStringAsync({customConfig:this.context.customConfig})}generateSnippetSync({endpoint:e,request:t}){return this.buildCodeBlock({endpoint:e,snippet:t}).toString({customConfig:this.context.customConfig})}buildCodeBlock({endpoint:e,snippet:t}){return n.codeblock(r=>{r.writeNode(n.function_({name:I,async:!0,parameters:[],body:n.codeblock(i=>{i.writeNodeStatement(this.constructClient({endpoint:e,snippet:t})),i.writeNodeStatement(this.callMethod({endpoint:e,snippet:t}))})})),r.writeNodeStatement(n.invokeFunction({function_:n.reference({name:I}),arguments_:[]}))})}constructClient({endpoint:e,snippet:t}){return n.variable({name:x,const:!0,initializer:n.instantiateClass({class_:n.reference({name:this.context.getRootClientName(),importFrom:this.context.getModuleImport()}),arguments_:[this.getConstructorArgs({endpoint:e,snippet:t})]})})}getConstructorArgs({endpoint:e,snippet:t}){let r=[],i=this.getConstructorEnvironmentArgs({baseUrl:t.baseURL,environment:t.environment});return i.length>0&&r.push(...i),e.auth!=null&&(t.auth!=null?r.push(...this.getConstructorAuthArgs({auth:e.auth,values:t.auth})):this.context.errors.add({severity:c.Warning,message:`Auth with ${e.auth.type} configuration is required for this endpoint`})),this.context.errors.scope(o.Headers),this.context.ir.headers!=null&&t.headers!=null&&r.push(...this.getConstructorHeaderArgs({headers:this.context.ir.headers,values:t.headers})),this.context.errors.unscope(),r.length===0?n.TypeLiteral.nop():n.TypeLiteral.object({fields:r})}getConstructorEnvironmentArgs({baseUrl:e,environment:t}){let r=this.getEnvironmentValue({baseUrl:e,environment:t});return r==null?[]:[{name:"environment",value:r}]}getEnvironmentValue({baseUrl:e,environment:t}){if(e!=null&&t!=null){this.context.errors.add({severity:c.Critical,message:"Cannot specify both baseUrl and environment options"});return}if(e!=null)return n.TypeLiteral.string(e);if(t!=null){if(this.context.isSingleEnvironmentID(t)){let r=this.context.getEnvironmentTypeReferenceFromID(t);if(r==null){this.context.errors.add({severity:c.Warning,message:`Environment ${JSON.stringify(t)} was not found`});return}return n.TypeLiteral.reference(r)}if(this.context.isMultiEnvironmentValues(t))return this.context.validateMultiEnvironmentUrlValues(t)?n.TypeLiteral.object({fields:Object.entries(t).map(([r,i])=>({name:r,value:this.context.dynamicTypeLiteralMapper.convert({typeReference:b,value:i})}))}):void 0}}getConstructorAuthArgs({auth:e,values:t}){switch(e.type){case"basic":return t.type!=="basic"?(this.context.errors.add({severity:c.Critical,message:this.context.newAuthMismatchError({auth:e,values:t}).message}),[]):this.getConstructorBasicAuthArg({auth:e,values:t});case"bearer":return t.type!=="bearer"?(this.context.errors.add({severity:c.Critical,message:this.context.newAuthMismatchError({auth:e,values:t}).message}),[]):this.getConstructorBearerAuthArgs({auth:e,values:t});case"header":return t.type!=="header"?(this.context.errors.add({severity:c.Critical,message:this.context.newAuthMismatchError({auth:e,values:t}).message}),[]):this.getConstructorHeaderAuthArgs({auth:e,values:t});default:u(e)}}getConstructorBasicAuthArg({auth:e,values:t}){return[{name:this.context.getPropertyName(e.username),value:n.TypeLiteral.string(t.username)},{name:this.context.getPropertyName(e.password),value:n.TypeLiteral.string(t.password)}]}getConstructorBearerAuthArgs({auth:e,values:t}){return[{name:this.context.getPropertyName(e.token),value:n.TypeLiteral.string(t.token)}]}getConstructorHeaderAuthArgs({auth:e,values:t}){return[{name:this.context.getPropertyName(e.header.name.name),value:this.context.dynamicTypeLiteralMapper.convert({typeReference:e.header.typeReference,value:t.value})}]}getConstructorHeaderArgs({headers:e,values:t}){let r=[];for(let i of e){let s=this.getConstructorHeaderArg({header:i,value:t.value});s!=null&&r.push(s)}return r}getConstructorHeaderArg({header:e,value:t}){let r=this.context.dynamicTypeLiteralMapper.convert({typeReference:e.typeReference,value:t});if(!n.TypeLiteral.isNop(r))return{name:this.context.getPropertyName(e.name.name),value:r}}callMethod({endpoint:e,snippet:t}){return n.invokeMethod({on:n.reference({name:x}),method:this.getMethod({endpoint:e}),async:!0,arguments_:this.getMethodArgs({endpoint:e,snippet:t})})}getMethodArgs({endpoint:e,snippet:t}){switch(e.request.type){case"inlined":return this.getMethodArgsForInlinedRequest({request:e.request,snippet:t});case"body":return this.getMethodArgsForBodyRequest({request:e.request,snippet:t});default:u(e.request)}}getMethodArgsForBodyRequest({request:e,snippet:t}){let r=[];if(this.context.errors.scope(o.PathParameters),e.pathParameters!=null){let i=this.getPathParameters({namedParameters:e.pathParameters,snippet:t});r.push(...i.map(s=>s.value))}return this.context.errors.unscope(),this.context.errors.scope(o.RequestBody),e.body!=null&&r.push(this.getBodyRequestArg({body:e.body,value:t.requestBody})),this.context.errors.unscope(),r}getBodyRequestArg({body:e,value:t}){switch(e.type){case"bytes":return this.getBytesBodyRequestArg({value:t});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:e.value,value:t});default:u(e)}}getBytesBodyRequestArg({value:e}){return typeof e!="string"?(this.context.errors.add({severity:c.Critical,message:`Expected bytes value to be a string, got ${typeof e}`}),n.TypeLiteral.nop()):n.TypeLiteral.blob(e)}getMethodArgsForInlinedRequest({request:e,snippet:t}){var m,h,p,l;let r=[],{inlinePathParameters:i,inlineFileProperties:s}={inlinePathParameters:(h=(m=this.context.customConfig)==null?void 0:m.inlinePathParameters)!=null?h:!1,inlineFileProperties:(l=(p=this.context.customConfig)==null?void 0:p.inlineFileProperties)!=null?l:!1};this.context.errors.scope(o.PathParameters);let a=[];e.pathParameters!=null&&a.push(...this.getPathParameters({namedParameters:e.pathParameters,snippet:t})),this.context.errors.unscope(),this.context.errors.scope(o.RequestBody);let g=this.getFilePropertyInfo({request:e,snippet:t});return this.context.errors.unscope(),this.context.includePathParametersInWrappedRequest({request:e,inlinePathParameters:i})||r.push(...a.map(d=>d.value)),s||r.push(...g.fileFields.map(d=>d.value)),this.context.needsRequestParameter({request:e,inlinePathParameters:i,inlineFileProperties:s})&&r.push(this.getInlinedRequestArg({request:e,snippet:t,pathParameterFields:this.context.includePathParametersInWrappedRequest({request:e,inlinePathParameters:i})?a:[],filePropertyInfo:g})),r}getFilePropertyInfo({request:e,snippet:t}){return e.body==null||!this.context.isFileUploadRequestBody(e.body)?{fileFields:[],bodyPropertyFields:[]}:this.context.filePropertyMapper.getFilePropertyInfo({body:e.body,value:t.requestBody})}getInlinedRequestArg({request:e,snippet:t,pathParameterFields:r,filePropertyInfo:i}){var p,l,d,f;this.context.errors.scope(o.QueryParameters);let a=this.context.associateQueryParametersByWireValue({parameters:(p=e.queryParameters)!=null?p:[],values:(l=t.queryParameters)!=null?l:{}}).map(y=>({name:this.context.getPropertyName(y.name.name),value:this.context.dynamicTypeLiteralMapper.convert(y)}));this.context.errors.unscope(),this.context.errors.scope(o.Headers);let m=this.context.associateByWireValue({parameters:(d=e.headers)!=null?d:[],values:(f=t.headers)!=null?f:{}}).map(y=>({name:this.context.getPropertyName(y.name.name),value:this.context.dynamicTypeLiteralMapper.convert(y)}));this.context.errors.unscope(),this.context.errors.scope(o.RequestBody);let h=e.body!=null?this.getInlinedRequestBodyObjectFields({body:e.body,value:t.requestBody,filePropertyInfo:i}):[];return this.context.errors.unscope(),n.TypeLiteral.object({fields:[...r,...a,...m,...h]})}getInlinedRequestBodyObjectFields({body:e,value:t,filePropertyInfo:r}){switch(e.type){case"properties":return this.getInlinedRequestBodyPropertyObjectFields({parameters:e.value,value:t});case"referenced":return[this.getReferencedRequestBodyPropertyObjectField({body:e,value:t})];case"fileUpload":return this.getFileUploadRequestBodyObjectFields({filePropertyInfo:r});default:u(e)}}getFileUploadRequestBodyObjectFields({filePropertyInfo:e}){var t;return(t=this.context.customConfig)!=null&&t.inlineFileProperties?[...e.fileFields,...e.bodyPropertyFields]:e.bodyPropertyFields}getReferencedRequestBodyPropertyObjectField({body:e,value:t}){return{name:this.context.getPropertyName(e.bodyKey),value:this.getReferencedRequestBodyPropertyTypeLiteral({body:e.bodyType,value:t})}}getReferencedRequestBodyPropertyTypeLiteral({body:e,value:t}){switch(e.type){case"bytes":return this.getBytesBodyRequestArg({value:t});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:e.value,value:t});default:u(e)}}getInlinedRequestBodyPropertyObjectFields({parameters:e,value:t}){var s;let r=[],i=this.context.associateByWireValue({parameters:e,values:(s=this.context.getRecord(t))!=null?s:{}});for(let a of i)r.push({name:this.context.getPropertyName(a.name.name),value:this.context.dynamicTypeLiteralMapper.convert(a)});return r}getPathParameters({namedParameters:e,snippet:t}){var s;let r=[],i=this.context.associateByWireValue({parameters:e,values:(s=t.pathParameters)!=null?s:{}});for(let a of i)r.push({name:this.context.getPropertyName(a.name.name),value:this.context.dynamicTypeLiteralMapper.convert(a)});return r}getMethod({endpoint:e}){return e.declaration.fernFilepath.allParts.length>0?`${e.declaration.fernFilepath.allParts.map(t=>this.context.getMethodName(t)).join(".")}.${this.context.getMethodName(e.declaration.name)}`:this.context.getMethodName(e.declaration.name)}};export{R as a};
|
package/esm/chunk-YD6EIACZ.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
var jr=Object.create;var Q=Object.defineProperty,Vr=Object.defineProperties,Jr=Object.getOwnPropertyDescriptor,zr=Object.getOwnPropertyDescriptors,Hr=Object.getOwnPropertyNames,rr=Object.getOwnPropertySymbols,Gr=Object.getPrototypeOf,lr=Object.prototype.hasOwnProperty,xr=Object.prototype.propertyIsEnumerable;var fr=(e,t,r)=>t in e?Q(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ce=(e,t)=>{for(var r in t||(t={}))lr.call(t,r)&&fr(e,r,t[r]);if(rr)for(var r of rr(t))xr.call(t,r)&&fr(e,r,t[r]);return e},pe=(e,t)=>Vr(e,zr(t));var me=e=>typeof e=="symbol"?e:e+"",we=(e,t)=>{var r={};for(var n in e)lr.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&rr)for(var n of rr(e))t.indexOf(n)<0&&xr.call(e,n)&&(r[n]=e[n]);return r};var hr=(e,t)=>()=>(e&&(t=e(e=0)),t);var de=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Qr=(e,t)=>{for(var r in t)Q(e,r,{get:t[r],enumerable:!0})},yr=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Hr(t))!lr.call(e,i)&&i!==r&&Q(e,i,{get:()=>t[i],enumerable:!(n=Jr(t,i))||n.enumerable});return e};var xe=(e,t,r)=>(r=e!=null?jr(Gr(e)):{},yr(t||!e||!e.__esModule?Q(r,"default",{value:e,enumerable:!0}):r,e)),ye=e=>yr(Q({},"__esModule",{value:!0}),e);var c=(e,t,r)=>fr(e,typeof t!="symbol"?t+"":t,r);function Ar(){throw new Error("setTimeout has not been defined")}function Tr(){throw new Error("clearTimeout has not been defined")}function Er(e){if(R===setTimeout)return setTimeout(e,0);if((R===Ar||!R)&&setTimeout)return R=setTimeout,setTimeout(e,0);try{return R(e,0)}catch(t){try{return R.call(null,e,0)}catch(r){return R.call(this,e,0)}}}function Xr(e){if(S===clearTimeout)return clearTimeout(e);if((S===Tr||!S)&&clearTimeout)return S=clearTimeout,clearTimeout(e);try{return S(e)}catch(t){try{return S.call(null,e)}catch(r){return S.call(this,e)}}}function Zr(){!O||!U||(O=!1,U.length?N=U.concat(N):tr=-1,N.length&&vr())}function vr(){if(!O){var e=Er(Zr);O=!0;for(var t=N.length;t;){for(U=N,N=[];++tr<t;)U&&U[tr].run();tr=-1,t=N.length}U=null,O=!1,Xr(e)}}function qr(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];N.push(new Ir(e,t)),N.length===1&&!O&&Er(vr)}function Ir(e,t){this.fun=e,this.array=t}function L(){}function wt(e){throw new Error("process.binding is not supported")}function dt(){return"/"}function xt(e){throw new Error("process.chdir is not supported")}function yt(){return 0}function At(e){var t=gt.call($)*.001,r=Math.floor(t),n=Math.floor(t%1*1e9);return e&&(r=r-e[0],n=n-e[1],n<0&&(r--,n+=1e9)),[r,n]}function Et(){var e=new Date,t=e-Tt;return t/1e3}var R,S,N,O,U,tr,Kr,rt,tt,et,nt,it,ot,st,at,ut,ft,lt,ht,ct,pt,mt,$,gt,Tt,d,gr,l=hr(()=>{"use strict";R=Ar,S=Tr;typeof globalThis.setTimeout=="function"&&(R=setTimeout);typeof globalThis.clearTimeout=="function"&&(S=clearTimeout);N=[],O=!1,tr=-1;Ir.prototype.run=function(){this.fun.apply(null,this.array)};Kr="browser",rt="browser",tt=!0,et={},nt=[],it="",ot={},st={},at={};ut=L,ft=L,lt=L,ht=L,ct=L,pt=L,mt=L;$=globalThis.performance||{},gt=$.now||$.mozNow||$.msNow||$.oNow||$.webkitNow||function(){return new Date().getTime()};Tt=new Date;d={nextTick:qr,title:Kr,browser:tt,env:et,argv:nt,version:it,versions:ot,on:ut,addListener:ft,once:lt,off:ht,removeListener:ct,removeAllListeners:pt,emit:mt,binding:wt,cwd:dt,chdir:xt,umask:yt,hrtime:At,platform:rt,release:st,config:at,uptime:Et},gr={};Object.keys(gr).forEach(e=>{let t=e.split("."),r=d;for(let n=0;n<t.length;n++){let i=t[n];n===t.length-1?r[i]=gr[e]:r=r[i]||(r[i]={})}})});function Rr(){pr=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,r=e.length;t<r;++t)v[t]=e[t],E[e.charCodeAt(t)]=t;E[45]=62,E[95]=63}function It(e){pr||Rr();var t,r,n,i,o,s,u=e.length;if(u%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=e[u-2]==="="?2:e[u-1]==="="?1:0,s=new vt(u*3/4-o),n=o>0?u-4:u;var f=0;for(t=0,r=0;t<n;t+=4,r+=3)i=E[e.charCodeAt(t)]<<18|E[e.charCodeAt(t+1)]<<12|E[e.charCodeAt(t+2)]<<6|E[e.charCodeAt(t+3)],s[f++]=i>>16&255,s[f++]=i>>8&255,s[f++]=i&255;return o===2?(i=E[e.charCodeAt(t)]<<2|E[e.charCodeAt(t+1)]>>4,s[f++]=i&255):o===1&&(i=E[e.charCodeAt(t)]<<10|E[e.charCodeAt(t+1)]<<4|E[e.charCodeAt(t+2)]>>2,s[f++]=i>>8&255,s[f++]=i&255),s}function Nt(e){return v[e>>18&63]+v[e>>12&63]+v[e>>6&63]+v[e&63]}function bt(e,t,r){for(var n,i=[],o=t;o<r;o+=3)n=(e[o]<<16)+(e[o+1]<<8)+e[o+2],i.push(Nt(n));return i.join("")}function Nr(e){pr||Rr();for(var t,r=e.length,n=r%3,i="",o=[],s=16383,u=0,f=r-n;u<f;u+=s)o.push(bt(e,u,u+s>f?f:u+s));return n===1?(t=e[r-1],i+=v[t>>2],i+=v[t<<4&63],i+="=="):n===2&&(t=(e[r-2]<<8)+e[r-1],i+=v[t>>10],i+=v[t>>4&63],i+=v[t<<2&63],i+="="),o.push(i),o.join("")}function er(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function b(e,t){if(er()<t)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=a.prototype):(e===null&&(e=new a(t)),e.length=t),e}function a(e,t,r){if(!a.TYPED_ARRAY_SUPPORT&&!(this instanceof a))return new a(e,t,r);if(typeof e=="number"){if(typeof t=="string")throw new Error("If encoding is specified then the first argument must be a string");return mr(this,e)}return Sr(this,e,t,r)}function Sr(e,t,r,n){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&t instanceof ArrayBuffer?St(e,t,r,n):typeof t=="string"?Rt(e,t,r):_t(e,t)}function _r(e){if(typeof e!="number")throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function kt(e,t,r,n){return _r(t),t<=0?b(e,t):r!==void 0?typeof n=="string"?b(e,t).fill(r,n):b(e,t).fill(r):b(e,t)}function mr(e,t){if(_r(t),e=b(e,t<0?0:wr(t)|0),!a.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function Rt(e,t,r){if((typeof r!="string"||r==="")&&(r="utf8"),!a.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=Br(t,r)|0;e=b(e,n);var i=e.write(t,r);return i!==n&&(e=e.slice(0,i)),e}function cr(e,t){var r=t.length<0?0:wr(t.length)|0;e=b(e,r);for(var n=0;n<r;n+=1)e[n]=t[n]&255;return e}function St(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return r===void 0&&n===void 0?t=new Uint8Array(t):n===void 0?t=new Uint8Array(t,r):t=new Uint8Array(t,r,n),a.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=a.prototype):e=cr(e,t),e}function _t(e,t){if(I(t)){var r=wr(t.length)|0;return e=b(e,r),e.length===0||t.copy(e,0,0,r),e}if(t){if(typeof ArrayBuffer!="undefined"&&t.buffer instanceof ArrayBuffer||"length"in t)return typeof t.length!="number"||Qt(t.length)?b(e,0):cr(e,t);if(t.type==="Buffer"&&Array.isArray(t.data))return cr(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function wr(e){if(e>=er())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+er().toString(16)+" bytes");return e|0}function I(e){return!!(e!=null&&e._isBuffer)}function Br(e,t){if(I(e))return e.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;typeof e!="string"&&(e=""+e);var r=e.length;if(r===0)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return nr(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Mr(e).length;default:if(n)return nr(e).length;t=(""+t).toLowerCase(),n=!0}}function Bt(e,t,r){var n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return Ot(this,t,r);case"utf8":case"utf-8":return Fr(this,t,r);case"ascii":return Dt(this,t,r);case"latin1":case"binary":return $t(this,t,r);case"base64":return Yt(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Wt(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function F(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function Ur(e,t,r,n,i){if(e.length===0)return-1;if(typeof r=="string"?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=a.from(t,n)),I(t))return t.length===0?-1:br(e,t,r,n,i);if(typeof t=="number")return t=t&255,a.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):br(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function br(e,t,r,n,i){var o=1,s=e.length,u=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,s/=2,u/=2,r/=2}function f(T,D){return o===1?T[D]:T.readUInt16BE(D*o)}var m;if(i){var w=-1;for(m=r;m<s;m++)if(f(e,m)===f(t,w===-1?0:m-w)){if(w===-1&&(w=m),m-w+1===u)return w*o}else w!==-1&&(m-=m-w),w=-1}else for(r+u>s&&(r=s-u),m=r;m>=0;m--){for(var p=!0,y=0;y<u;y++)if(f(e,m+y)!==f(t,y)){p=!1;break}if(p)return m}return-1}function Ut(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s<n;++s){var u=parseInt(t.substr(s*2,2),16);if(isNaN(u))return s;e[r+s]=u}return s}function Lt(e,t,r,n){return sr(nr(t,e.length-r),e,r,n)}function Lr(e,t,r,n){return sr(Ht(t),e,r,n)}function Ft(e,t,r,n){return Lr(e,t,r,n)}function Pt(e,t,r,n){return sr(Mr(t),e,r,n)}function Ct(e,t,r,n){return sr(Gt(t,e.length-r),e,r,n)}function Yt(e,t,r){return t===0&&r===e.length?Nr(e):Nr(e.slice(t,r))}function Fr(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o=e[i],s=null,u=o>239?4:o>223?3:o>191?2:1;if(i+u<=r){var f,m,w,p;switch(u){case 1:o<128&&(s=o);break;case 2:f=e[i+1],(f&192)===128&&(p=(o&31)<<6|f&63,p>127&&(s=p));break;case 3:f=e[i+1],m=e[i+2],(f&192)===128&&(m&192)===128&&(p=(o&15)<<12|(f&63)<<6|m&63,p>2047&&(p<55296||p>57343)&&(s=p));break;case 4:f=e[i+1],m=e[i+2],w=e[i+3],(f&192)===128&&(m&192)===128&&(w&192)===128&&(p=(o&15)<<18|(f&63)<<12|(m&63)<<6|w&63,p>65535&&p<1114112&&(s=p))}}s===null?(s=65533,u=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=u}return Mt(n)}function Mt(e){var t=e.length;if(t<=kr)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=kr));return r}function Dt(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]&127);return n}function $t(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function Ot(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=zt(e[o]);return i}function Wt(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}function g(e,t,r){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function A(e,t,r,n,i,o){if(!I(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function ir(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i<o;++i)e[r+i]=(t&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}function or(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i<o;++i)e[r+i]=t>>>(n?i:3-i)*8&255}function Pr(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Cr(e,t,r,n,i){return i||Pr(e,t,r,4,34028234663852886e22,-34028234663852886e22),$r(e,t,r,n,23,4),r+4}function Yr(e,t,r,n,i){return i||Pr(e,t,r,8,17976931348623157e292,-17976931348623157e292),$r(e,t,r,n,52,8),r+8}function Vt(e){if(e=Jt(e).replace(jt,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function Jt(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function zt(e){return e<16?"0"+e.toString(16):e.toString(16)}function nr(e,t){t=t||1/0;for(var r,n=e.length,i=null,o=[],s=0;s<n;++s){if(r=e.charCodeAt(s),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function Ht(e){for(var t=[],r=0;r<e.length;++r)t.push(e.charCodeAt(r)&255);return t}function Gt(e,t){for(var r,n,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function Mr(e){return It(Vt(e))}function sr(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function Qt(e){return e!==e}function Xt(e){return e!=null&&(!!e._isBuffer||Dr(e)||Zt(e))}function Dr(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function Zt(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&Dr(e.slice(0,0))}function ar(e,t,r,n,i){var o,s,u=i*8-n-1,f=(1<<u)-1,m=f>>1,w=-7,p=r?i-1:0,y=r?-1:1,T=e[t+p];for(p+=y,o=T&(1<<-w)-1,T>>=-w,w+=u;w>0;o=o*256+e[t+p],p+=y,w-=8);for(s=o&(1<<-w)-1,o>>=-w,w+=n;w>0;s=s*256+e[t+p],p+=y,w-=8);if(o===0)o=1-m;else{if(o===f)return s?NaN:(T?-1:1)*(1/0);s=s+Math.pow(2,n),o=o-m}return(T?-1:1)*s*Math.pow(2,o-n)}function $r(e,t,r,n,i,o){var s,u,f,m=o*8-i-1,w=(1<<m)-1,p=w>>1,y=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,T=n?0:o-1,D=n?1:-1,Wr=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,s=w):(s=Math.floor(Math.log(t)/Math.LN2),t*(f=Math.pow(2,-s))<1&&(s--,f*=2),s+p>=1?t+=y/f:t+=y*Math.pow(2,1-p),t*f>=2&&(s++,f/=2),s+p>=w?(u=0,s=w):s+p>=1?(u=(t*f-1)*Math.pow(2,i),s=s+p):(u=t*Math.pow(2,p-1)*Math.pow(2,i),s=0));i>=8;e[r+T]=u&255,T+=D,u/=256,i-=8);for(s=s<<i|u,m+=i;m>0;e[r+T]=s&255,T+=D,s/=256,m-=8);e[r+T-D]|=Wr*128}var v,E,vt,pr,kr,jt,Or=hr(()=>{"use strict";l();h();v=[],E=[],vt=typeof Uint8Array!="undefined"?Uint8Array:Array,pr=!1;a.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;a.poolSize=8192;a._augment=function(e){return e.__proto__=a.prototype,e};a.from=function(e,t,r){return Sr(null,e,t,r)};a.kMaxLength=er();a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&a[Symbol.species]);a.alloc=function(e,t,r){return kt(null,e,t,r)};a.allocUnsafe=function(e){return mr(null,e)};a.allocUnsafeSlow=function(e){return mr(null,e)};a.isBuffer=Xt;a.compare=function(t,r){if(!I(t)||!I(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var n=t.length,i=r.length,o=0,s=Math.min(n,i);o<s;++o)if(t[o]!==r[o]){n=t[o],i=r[o];break}return n<i?-1:i<n?1:0};a.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};a.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return a.alloc(0);var n;if(r===void 0)for(r=0,n=0;n<t.length;++n)r+=t[n].length;var i=a.allocUnsafe(r),o=0;for(n=0;n<t.length;++n){var s=t[n];if(!I(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,o),o+=s.length}return i};a.byteLength=Br;a.prototype._isBuffer=!0;a.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<t;r+=2)F(this,r,r+1);return this};a.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<t;r+=4)F(this,r,r+3),F(this,r+1,r+2);return this};a.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<t;r+=8)F(this,r,r+7),F(this,r+1,r+6),F(this,r+2,r+5),F(this,r+3,r+4);return this};a.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?Fr(this,0,t):Bt.apply(this,arguments)};a.prototype.equals=function(t){if(!I(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:a.compare(this,t)===0};a.prototype.compare=function(t,r,n,i,o){if(!I(t))throw new TypeError("Argument must be a Buffer");if(r===void 0&&(r=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),r<0||n>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&r>=n)return 0;if(i>=o)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,o>>>=0,this===t)return 0;for(var s=o-i,u=n-r,f=Math.min(s,u),m=this.slice(i,o),w=t.slice(r,n),p=0;p<f;++p)if(m[p]!==w[p]){s=m[p],u=w[p];break}return s<u?-1:u<s?1:0};a.prototype.includes=function(t,r,n){return this.indexOf(t,r,n)!==-1};a.prototype.indexOf=function(t,r,n){return Ur(this,t,r,n,!0)};a.prototype.lastIndexOf=function(t,r,n){return Ur(this,t,r,n,!1)};a.prototype.write=function(t,r,n,i){if(r===void 0)i="utf8",n=this.length,r=0;else if(n===void 0&&typeof r=="string")i=r,n=this.length,r=0;else if(isFinite(r))r=r|0,isFinite(n)?(n=n|0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-r;if((n===void 0||n>o)&&(n=o),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var s=!1;;)switch(i){case"hex":return Ut(this,t,r,n);case"utf8":case"utf-8":return Lt(this,t,r,n);case"ascii":return Lr(this,t,r,n);case"latin1":case"binary":return Ft(this,t,r,n);case"base64":return Pt(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ct(this,t,r,n);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}};a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};kr=4096;a.prototype.slice=function(t,r){var n=this.length;t=~~t,r=r===void 0?n:~~r,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<t&&(r=t);var i;if(a.TYPED_ARRAY_SUPPORT)i=this.subarray(t,r),i.__proto__=a.prototype;else{var o=r-t;i=new a(o,void 0);for(var s=0;s<o;++s)i[s]=this[s+t]}return i};a.prototype.readUIntLE=function(t,r,n){t=t|0,r=r|0,n||g(t,r,this.length);for(var i=this[t],o=1,s=0;++s<r&&(o*=256);)i+=this[t+s]*o;return i};a.prototype.readUIntBE=function(t,r,n){t=t|0,r=r|0,n||g(t,r,this.length);for(var i=this[t+--r],o=1;r>0&&(o*=256);)i+=this[t+--r]*o;return i};a.prototype.readUInt8=function(t,r){return r||g(t,1,this.length),this[t]};a.prototype.readUInt16LE=function(t,r){return r||g(t,2,this.length),this[t]|this[t+1]<<8};a.prototype.readUInt16BE=function(t,r){return r||g(t,2,this.length),this[t]<<8|this[t+1]};a.prototype.readUInt32LE=function(t,r){return r||g(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};a.prototype.readUInt32BE=function(t,r){return r||g(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};a.prototype.readIntLE=function(t,r,n){t=t|0,r=r|0,n||g(t,r,this.length);for(var i=this[t],o=1,s=0;++s<r&&(o*=256);)i+=this[t+s]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*r)),i};a.prototype.readIntBE=function(t,r,n){t=t|0,r=r|0,n||g(t,r,this.length);for(var i=r,o=1,s=this[t+--i];i>0&&(o*=256);)s+=this[t+--i]*o;return o*=128,s>=o&&(s-=Math.pow(2,8*r)),s};a.prototype.readInt8=function(t,r){return r||g(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};a.prototype.readInt16LE=function(t,r){r||g(t,2,this.length);var n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};a.prototype.readInt16BE=function(t,r){r||g(t,2,this.length);var n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};a.prototype.readInt32LE=function(t,r){return r||g(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};a.prototype.readInt32BE=function(t,r){return r||g(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};a.prototype.readFloatLE=function(t,r){return r||g(t,4,this.length),ar(this,t,!0,23,4)};a.prototype.readFloatBE=function(t,r){return r||g(t,4,this.length),ar(this,t,!1,23,4)};a.prototype.readDoubleLE=function(t,r){return r||g(t,8,this.length),ar(this,t,!0,52,8)};a.prototype.readDoubleBE=function(t,r){return r||g(t,8,this.length),ar(this,t,!1,52,8)};a.prototype.writeUIntLE=function(t,r,n,i){if(t=+t,r=r|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;A(this,t,r,n,o,0)}var s=1,u=0;for(this[r]=t&255;++u<n&&(s*=256);)this[r+u]=t/s&255;return r+n};a.prototype.writeUIntBE=function(t,r,n,i){if(t=+t,r=r|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;A(this,t,r,n,o,0)}var s=n-1,u=1;for(this[r+s]=t&255;--s>=0&&(u*=256);)this[r+s]=t/u&255;return r+n};a.prototype.writeUInt8=function(t,r,n){return t=+t,r=r|0,n||A(this,t,r,1,255,0),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=t&255,r+1};a.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r|0,n||A(this,t,r,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[r]=t&255,this[r+1]=t>>>8):ir(this,t,r,!0),r+2};a.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r|0,n||A(this,t,r,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=t&255):ir(this,t,r,!1),r+2};a.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r|0,n||A(this,t,r,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255):or(this,t,r,!0),r+4};a.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r|0,n||A(this,t,r,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255):or(this,t,r,!1),r+4};a.prototype.writeIntLE=function(t,r,n,i){if(t=+t,r=r|0,!i){var o=Math.pow(2,8*n-1);A(this,t,r,n,o-1,-o)}var s=0,u=1,f=0;for(this[r]=t&255;++s<n&&(u*=256);)t<0&&f===0&&this[r+s-1]!==0&&(f=1),this[r+s]=(t/u>>0)-f&255;return r+n};a.prototype.writeIntBE=function(t,r,n,i){if(t=+t,r=r|0,!i){var o=Math.pow(2,8*n-1);A(this,t,r,n,o-1,-o)}var s=n-1,u=1,f=0;for(this[r+s]=t&255;--s>=0&&(u*=256);)t<0&&f===0&&this[r+s+1]!==0&&(f=1),this[r+s]=(t/u>>0)-f&255;return r+n};a.prototype.writeInt8=function(t,r,n){return t=+t,r=r|0,n||A(this,t,r,1,127,-128),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=t&255,r+1};a.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r|0,n||A(this,t,r,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[r]=t&255,this[r+1]=t>>>8):ir(this,t,r,!0),r+2};a.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r|0,n||A(this,t,r,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=t&255):ir(this,t,r,!1),r+2};a.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r|0,n||A(this,t,r,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):or(this,t,r,!0),r+4};a.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r|0,n||A(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),a.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255):or(this,t,r,!1),r+4};a.prototype.writeFloatLE=function(t,r,n){return Cr(this,t,r,!0,n)};a.prototype.writeFloatBE=function(t,r,n){return Cr(this,t,r,!1,n)};a.prototype.writeDoubleLE=function(t,r,n){return Yr(this,t,r,!0,n)};a.prototype.writeDoubleBE=function(t,r,n){return Yr(this,t,r,!1,n)};a.prototype.copy=function(t,r,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&i<n&&(i=n),i===n||t.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-r<i-n&&(i=t.length-r+n);var o=i-n,s;if(this===t&&n<r&&r<i)for(s=o-1;s>=0;--s)t[s+r]=this[s+n];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(s=0;s<o;++s)t[s+r]=this[s+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),r);return o};a.prototype.fill=function(t,r,n,i){if(typeof t=="string"){if(typeof r=="string"?(i=r,r=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),t.length===1){var o=t.charCodeAt(0);o<256&&(t=o)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!a.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof t=="number"&&(t=t&255);if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r=r>>>0,n=n===void 0?this.length:n>>>0,t||(t=0);var s;if(typeof t=="number")for(s=r;s<n;++s)this[s]=t;else{var u=I(t)?t:nr(new a(t,i).toString()),f=u.length;for(s=0;s<n-r;++s)this[s+r]=u[s%f]}return this};jt=/[^+\/0-9A-Za-z-_]/g});var h=hr(()=>{"use strict";Or()});l();h();function X(e){throw new Error("Unexpected value: "+JSON.stringify(e))}l();h();l();h();function qt(e){return Object.keys(e)}var dr={};Qr(dr,{AstNode:()=>x,ClassInstantiation:()=>G,CodeBlock:()=>W,Comment:()=>B,Function:()=>J,FunctionInvocation:()=>z,MethodInvocation:()=>H,Parameter:()=>V,Reference:()=>M,Type:()=>Y,TypeLiteral:()=>k,Types:()=>Y,Variable:()=>j,Writer:()=>C,codeblock:()=>ie,function_:()=>oe,instantiateClass:()=>se,invokeFunction:()=>ae,invokeMethod:()=>ue,parameter:()=>fe,reference:()=>le,variable:()=>he});l();h();l();h();l();h();l();h();l();h();l();h();var P=class{};l();h();l();h();var _=class extends P{constructor(r){super();c(this,"value");this.value=r}write(r){typeof this.value=="string"?r.write(this.value):this.value(r)}};var Kt=4,Z=class{constructor(){c(this,"buffer","");c(this,"indentLevel",0);c(this,"hasWrittenAnything",!1);c(this,"lastCharacterIsNewline",!1)}write(t){let r=t.length>0&&t.endsWith(`
|
|
2
|
-
`),n=r?t.substring(0,t.length-1):t,i=this.getIndentString(),o=n.replaceAll(`
|
|
3
|
-
`,`
|
|
4
|
-
${i}`);this.isAtStartOfLine()&&(o=i+o),r&&(o+=`
|
|
5
|
-
`),this.writeInternal(o)}writeNoIndent(t){let r=this.indentLevel;this.indentLevel=0,this.write(t),this.indentLevel=r}writeNode(t){t.write(this)}writeNodeStatement(t){t.write(this),this.write(";"),this.writeNewLineIfLastLineNot()}writeTextStatement(t){new _(t).write(this),this.write(";"),this.writeNewLineIfLastLineNot()}controlFlow(t,r){new _(t).write(this),this.write(" ("),this.writeNode(r),this.write(") {"),this.writeNewLineIfLastLineNot(),this.indent()}endControlFlow(){this.dedent(),this.writeLine("}")}openBlock(t,r="{",n,i="}"){let o=t.filter(s=>s!==void 0).join(" ");o?this.write(`${o} ${r!=null?r:""}`):this.write(r!=null?r:"");try{this.indent(),n(),this.dedent()}finally{this.write(i!=null?i:"")}}writeLine(t=""){this.write(t),this.writeNewLineIfLastLineNot()}newLine(){this.writeInternal(`
|
|
6
|
-
`)}writeNewLineIfLastLineNot(){this.lastCharacterIsNewline||this.writeInternal(`
|
|
7
|
-
`)}indent(){this.indentLevel++}dedent(){this.indentLevel--}delimit({nodes:t,delimiter:r,writeFunction:n}){if(t.length>0){let i=t[0];i!=null&&n(i);for(let o=1;o<t.length;o++){this.write(r);let s=t[o];s!=null&&n(s)}}}toString(){return this.buffer}writeInternal(t){return t.length>0&&(this.hasWrittenAnything=!0,this.lastCharacterIsNewline=t.endsWith(`
|
|
8
|
-
`)),this.buffer+=t}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*Kt)}};l();h();var ur=class{},q=class extends ur{async format(t){return t}formatSync(t){return t}};l();h();l();h();var C=class extends Z{constructor({customConfig:r,formatter:n}){super();c(this,"customConfig");c(this,"formatter");c(this,"imports",{});c(this,"defaultImports",{});c(this,"starImportAliases",{});c(this,"starImportAliasesInverse",{});this.customConfig=r,this.formatter=n!=null?n:new q}addImport(r){var n,i,o;if(r.importFrom!=null){switch(r.importFrom.type){case"default":{this.validateDefault(r);break}case"named":{this.validateNamed(r);break}case"star":{this.validateStar(r);break}}let s=(o=(n=this.imports)[i=r.importFrom.moduleName])!=null?o:n[i]=[];s.map(f=>f.name).includes(r.name)||s.push(r)}}validateDefault(r){var i,o,s,u;if(((i=r.importFrom)==null?void 0:i.type)!=="default")return;let n=(u=(o=this.defaultImports)[s=r.importFrom.moduleName])!=null?u:o[s]=r;if(n.name!==r.name)throw new Error(`Cannot have multiple default imports for module ${r.importFrom.moduleName}: got ${r.name} but already had ${n.name}`)}validateNamed(r){var s,u,f,m,w;if(((s=r.importFrom)==null?void 0:s.type)!=="named")return;let i=((u=this.imports[r.importFrom.moduleName])!=null?u:[]).filter(p=>{var y;return((y=p.importFrom)==null?void 0:y.type)==="star"});if(i.length>0)throw new Error(`Cannot add named import ${r.name} because non-named imports ${i.map(p=>p.name)} already exist`);let o=[];for(let p of Object.values(this.imports))for(let y of p)((f=y.importFrom)==null?void 0:f.type)==="named"&&y.importFrom.moduleName!==r.importFrom.moduleName&&y.name===r.name&&o.push(y);if(o.length>0)throw new Error(`Cannot add named import from module ${r.importFrom.moduleName} because it is already imported from ${(w=(m=o[0])==null?void 0:m.importFrom)==null?void 0:w.moduleName}`)}validateStar(r){var o,s,u,f,m,w,p;if(((o=r.importFrom)==null?void 0:o.type)!=="star")return;let n=(f=(s=this.starImportAliases)[u=r.importFrom.moduleName])!=null?f:s[u]=r.importFrom.starImportAlias;if(n!==r.importFrom.starImportAlias)throw new Error(`Cannot have more than one alias for non-named imports from a module: got ${r.importFrom.starImportAlias} but already have ${n}.`);if(((p=(m=this.starImportAliasesInverse)[w=r.importFrom.starImportAlias])!=null?p:m[w]=r.importFrom.moduleName)!==r.importFrom.moduleName)throw new Error(`Attempted to use alias ${r.importFrom.starImportAlias} for more than one module in the same file`)}};var K=class extends C{constructor({customConfig:t,formatter:r}){super({customConfig:t,formatter:r})}async toStringAsync(){let t=this.getContent();if(this.formatter!=null)try{return this.formatter.format(t)}catch(r){throw new Error(`Failed to format TypeScript file: ${r}
|
|
9
|
-
${t}`)}return t}toString(){let t=this.getContent();if(this.formatter!=null)try{return this.formatter.formatSync(t)}catch(r){throw new Error(`Failed to format TypeScript file: ${r}
|
|
10
|
-
${t}`)}return t}getContent(){let t=this.stringifyImports();return t.length>0?t+`
|
|
11
|
-
`+this.buffer:this.buffer}stringifyImports(){let t="";for(let[r,n]of Object.entries(this.imports)){let i=this.defaultImports[r],o="",s=n.filter(f=>{var m;return((m=f.importFrom)==null?void 0:m.type)==="named"}),u=this.starImportAliases[r];if(s.length>0||i!=null||u!=null){if(t+="import",i!=null&&(t+=` ${i.name}`),s.length>0){for(let m of s.slice(0,-1))o+=`${m.name}, `;let f=s[s.length-1];f!=null&&(o+=`${f.name}`),i!=null&&(t+=","),t+=` { ${o} }`}u!=null&&((i!=null||s.length>0)&&(t+=", "),t+=` * as ${u}`),t+=` from "${r}";
|
|
12
|
-
`}}return t}};var x=class extends P{async toStringAsync({customConfig:t,formatter:r}){let n=new K({customConfig:t,formatter:r});return this.write(n),await n.toStringAsync()}toString({customConfig:t,formatter:r}){let n=new K({customConfig:t,formatter:r});return this.write(n),n.toString()}};l();h();var W=class extends x{constructor(r){super();c(this,"args");this.args=r}write(r){return new _(this.args).write(r)}};l();h();var Y=class extends x{constructor(r){super();c(this,"internalType");this.internalType=r}write(r){switch(this.internalType.type){case"string":r.write("string");break;case"number":r.write("number");break;case"bigint":r.write("bigint");break;case"boolean":r.write("boolean");break;case"array":this.internalType.valueType.write(r),r.write("[]");break;case"map":r.write("Record<"),this.internalType.keyType.write(r),r.write(", "),this.internalType.valueType.write(r),r.write(">");break;case"object":r.write("{"),r.indent();for(let[n,i]of Object.entries(this.internalType.fields))r.write(`${n}: `),i.write(r),r.writeLine(",");r.dedent(),r.write("}");break;case"enum":r.write("enum");break;case"any":r.write("any");break;case"promise":r.write("Promise<"),this.internalType.value.write(r),r.write(">");break;case"unknown":r.write("unknown");break;case"void":r.write("void");break;case"undefined":r.write("undefined");break;case"null":r.write("null");break;case"never":r.write("never");break;case"nop":break;default:X(this.internalType)}}static string(){return new this({type:"string"})}static number(){return new this({type:"number"})}static bigint(){return new this({type:"bigint"})}static boolean(){return new this({type:"boolean"})}static array(r){return new this({type:"array",valueType:r})}static object(r){return new this({type:"object",fields:r})}static enum(r){return new this({type:"enum",values:r})}static any(){return new this({type:"any"})}static promise(r){return r.internalType.type==="promise"?r:new this({type:"promise",value:r})}static unknown(){return new this({type:"unknown"})}static void(){return new this({type:"void"})}static undefined(){return new this({type:"undefined"})}static null(){return new this({type:"null"})}static never(){return new this({type:"never"})}static nop(){return new this({type:"nop"})}};l();h();var k=class e extends x{constructor(r){super();c(this,"internalType");this.internalType=r}write(r){var o,s;let n=!!((o=r.customConfig)!=null&&o.noSerdeLayer),i=!!((s=r.customConfig)!=null&&s.useBigInt);switch(this.internalType.type){case"array":{this.writeIterable({writer:r,iterable:this.internalType});break}case"blob":{if(n){r.writeNode(e.string(this.internalType.value));return}r.write("new Blob(["),r.writeNode(e.string(this.internalType.value)),r.write("])");break}case"boolean":{r.write(this.internalType.value.toString());break}case"bigint":{if(i){r.write(`BigInt(${this.internalType.value.toString()})`);return}r.write(`"${this.internalType.value.toString()}"`);return}case"datetime":{if(n){r.writeNode(e.string(this.internalType.value));return}r.write("new Date("),r.writeNode(e.string(this.internalType.value)),r.write(")");break}case"number":{r.write(this.internalType.value.toString());break}case"object":{this.writeObject({writer:r,object:this.internalType});break}case"record":{this.writeRecord({writer:r,record:this.internalType});break}case"reference":{r.writeNode(this.internalType.value);break}case"set":{if(n||this.isSetOfObjects()){r.writeNode(e.array({values:this.internalType.values}));return}r.write("new Set("),this.writeIterable({writer:r,iterable:this.internalType}),r.write(")");break}case"string":{this.internalType.value.includes(`
|
|
13
|
-
`)?this.writeStringWithBackticks({writer:r,value:this.internalType.value}):r.write(`"${this.internalType.value.replaceAll('"','\\"')}"`);break}case"tuple":{this.writeIterable({writer:r,iterable:this.internalType});break}case"unknown":{this.writeUnknown({writer:r,value:this.internalType.value});break}case"null":{r.write("null");break}case"nop":break;default:X(this.internalType)}}isObject(){return this.internalType.type==="object"}asObjectOrThrow(){if(this.isObject())return this.internalType;throw new Error("Internal error; ts.TypeLiteral is not an object")}isSet(){return this.internalType.type==="set"}asSetOrThrow(){if(this.isSet())return this.internalType;throw new Error("Internal error; ts.TypeLiteral is not a set")}isSetOfObjects(){return this.isSet()&&this.asSetOrThrow().values.every(r=>r.isObject())}writeStringWithBackticks({writer:r,value:n}){r.write("`");let i=n.split(`
|
|
14
|
-
`),o=i[0]+`
|
|
15
|
-
`,s=i.slice(1).join(`
|
|
16
|
-
`);r.write(o.replaceAll("`","\\`")),r.writeNoIndent(s.replaceAll("`","\\`")),r.write("`")}writeIterable({writer:r,iterable:n}){let i=ee({values:n.values});if(i.length===0){r.write("[]");return}r.writeLine("["),r.indent();for(let o of i)o.write(r),r.writeLine(",");r.dedent(),r.write("]")}writeRecord({writer:r,record:n}){let i=te({entries:n.entries});if(i.length===0){r.write("{}");return}r.writeLine("{"),r.indent();for(let o of i)o.key.write(r),r.write(": "),o.value.write(r),r.writeLine(",");r.dedent(),r.write("}")}writeObject({writer:r,object:n}){let i=re({fields:n.fields});if(i.length===0){r.write("{}");return}r.writeLine("{"),r.indent();for(let o of i)r.write(`${o.name}: `),o.value.write(r),r.writeLine(",");r.dedent(),r.write("}")}static array({values:r}){return new this({type:"array",values:r})}static bigint(r){return new this({type:"bigint",value:r})}static blob(r){return new this({type:"blob",value:r})}static boolean(r){return new this({type:"boolean",value:r})}static datetime(r){return new this({type:"datetime",value:r})}static number(r){return new this({type:"number",value:r})}static object({fields:r}){return new this({type:"object",fields:r})}static record({entries:r}){return new this({type:"record",entries:r})}static reference(r){return new this({type:"reference",value:r})}static set({values:r}){return new this({type:"set",values:r})}static string(r){return new this({type:"string",value:r})}static tuple({values:r}){return new this({type:"tuple",values:r})}static unknown(r){return new this({type:"unknown",value:r})}static null(){return new this({type:"null"})}static nop(){return new this({type:"nop"})}static isNop(r){return r.internalType.type==="nop"}writeUnknown({writer:r,value:n}){switch(typeof n){case"boolean":r.write(n.toString());return;case"string":r.write(n.includes('"')?`\`${n}\``:`"${n}"`);return;case"number":r.write(n.toString());return;case"object":if(n==null){r.write("null");return}if(Array.isArray(n)){this.writeUnknownArray({writer:r,value:n});return}this.writeUnknownObject({writer:r,value:n});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof n}`)}}writeUnknownArray({writer:r,value:n}){if(n.length===0){r.write("[]");return}r.writeLine("["),r.indent();for(let i of n)r.writeNode(e.unknown(i)),r.writeLine(",");r.dedent(),r.write("]")}writeUnknownObject({writer:r,value:n}){let i=Object.entries(n);if(i.length===0){r.write("{}");return}r.writeLine("{"),r.indent();for(let[o,s]of i)r.write(`${o}: `),r.writeNode(e.unknown(s)),r.writeLine(",");r.dedent(),r.write("}")}};function re({fields:e}){return e.filter(t=>!k.isNop(t.value))}function te({entries:e}){return e.filter(t=>!k.isNop(t.key)&&!k.isNop(t.value))}function ee({values:e}){return e.filter(t=>!k.isNop(t))}l();h();var M=class extends x{constructor({name:r,importFrom:n,memberName:i}){super();c(this,"name");c(this,"importFrom");c(this,"memberName");this.name=r,this.importFrom=n,this.memberName=i}write(r){var o;this.importFrom!=null&&r.addImport(this);let n=((o=this.importFrom)==null?void 0:o.type)==="star"?`${this.importFrom.starImportAlias}.`:"",i=this.memberName!=null?`.${this.memberName}`:"";r.write(`${n}${this.name}${i}`)}};l();h();var j=class extends x{constructor(r){super();c(this,"args");this.args=r}write(r){this.args.export&&r.write("export "),this.args.const?r.write("const "):r.write("let "),r.write(`${this.args.name} = `),r.writeNode(this.args.initializer)}};l();h();l();h();var B=class extends x{constructor({docs:r}={docs:void 0}){super();c(this,"docs");this.docs=r}write(r){this.docs!=null&&(r.writeLine("/**"),this.docs.split(`
|
|
17
|
-
`).forEach(n=>{r.writeLine(` * ${n}`)}),r.writeLine("*/"))}};var V=class extends x{constructor({name:r,type:n,docs:i}){super();c(this,"name");c(this,"type");c(this,"docs");this.name=r,this.type=n,this.docs=i}write(r){this.docs!=null&&r.writeNode(new B({docs:this.docs})),r.write(`${this.name}: `),this.type.write(r)}};l();h();var J=class extends x{constructor({name:r,parameters:n,async:i,body:o,return_:s,docs:u}){super();c(this,"name");c(this,"parameters");c(this,"async");c(this,"body");c(this,"return_");c(this,"docs");this.name=r,this.parameters=n,this.async=i!=null?i:!1,this.body=o,this.return_=s,this.docs=u}write(r){var n;r.writeNode(new B({docs:this.docs})),this.async&&r.write("async "),r.write("function "),r.write(`${this.name}`),this.writeParameters(r),this.return_!=null&&(r.write(": "),r.writeNode(this.async?Y.promise(this.return_):this.return_)),r.writeLine(" {"),r.indent(),(n=this.body)==null||n.write(r),r.dedent(),r.writeNewLineIfLastLineNot(),r.writeLine("}")}writeParameters(r){if(this.parameters.length===0){r.write("()");return}r.indent(),r.writeLine("(");for(let n of this.parameters)r.writeNode(n),r.writeLine(",");r.dedent(),r.write(")")}};l();h();var z=class extends x{constructor({function_:r,arguments_:n}){super();c(this,"function_");c(this,"arguments_");this.function_=r,this.arguments_=n}write(r){r.writeNode(this.function_),r.write("("),r.delimit({nodes:this.arguments_,delimiter:", ",writeFunction:n=>n.write(r)}),r.write(")")}};l();h();var H=class extends x{constructor({on:r,method:n,arguments_:i,async:o}){super();c(this,"on");c(this,"method");c(this,"arguments_");c(this,"async");this.on=r,this.method=n,this.arguments_=i,this.async=o}write(r){this.async&&r.write("await "),this.on.write(r),r.write("."),r.write(this.method),r.write("("),r.delimit({nodes:this.arguments_,delimiter:", ",writeFunction:n=>n.write(r)}),r.write(")")}};l();h();var G=class extends x{constructor({class_:r,arguments_:n}){super();c(this,"class_");c(this,"arguments_");this.class_=r,this.arguments_=n}write(r){r.write("new "),r.writeNode(this.class_),r.write("("),r.delimit({nodes:this.arguments_,delimiter:", ",writeFunction:n=>n.write(r)}),r.write(")")}};function ie(e){return new W(e)}function oe(e){return new J(e)}function se(e){return new G(e)}function ae(e){return new z(e)}function ue(e){return new H(e)}function fe(e){return new V(e)}function le(e){return new M(e)}function he(e){return new j(e)}l();h();export{ce as a,pe as b,me as c,we as d,hr as e,de as f,Qr as g,xe as h,ye as i,c as j,l as k,a as l,h as m,X as n,qt as o,dr as p};
|
|
18
|
-
/*! Bundled license information:
|
|
19
|
-
|
|
20
|
-
@esbuild-plugins/node-globals-polyfill/Buffer.js:
|
|
21
|
-
(*!
|
|
22
|
-
* The buffer module from node.js, for the browser.
|
|
23
|
-
*
|
|
24
|
-
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
25
|
-
* @license MIT
|
|
26
|
-
*)
|
|
27
|
-
*/
|