@fern-api/php-dynamic-snippets 0.0.6 → 0.0.8
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 +18 -11
- package/cjs/DynamicSnippetsGenerator.cjs.map +1 -1
- package/cjs/DynamicSnippetsGenerator.d.cts +1 -1
- package/cjs/{DynamicSnippetsGeneratorContext-7JXlOyjB.d.cts → DynamicSnippetsGeneratorContext-CwkDTYOI.d.cts} +3 -3
- package/cjs/EndpointSnippetGenerator.cjs +20 -13
- package/cjs/EndpointSnippetGenerator.cjs.map +1 -1
- package/cjs/EndpointSnippetGenerator.d.cts +6 -1
- package/cjs/context/DynamicSnippetsGeneratorContext.cjs +17 -10
- package/cjs/context/DynamicSnippetsGeneratorContext.cjs.map +1 -1
- package/cjs/context/DynamicSnippetsGeneratorContext.d.cts +1 -1
- package/cjs/context/DynamicTypeLiteralMapper.cjs +17 -10
- package/cjs/context/DynamicTypeLiteralMapper.cjs.map +1 -1
- package/cjs/context/DynamicTypeLiteralMapper.d.cts +1 -1
- package/cjs/context/FilePropertyMapper.cjs +17 -10
- package/cjs/context/FilePropertyMapper.cjs.map +1 -1
- package/cjs/context/FilePropertyMapper.d.cts +1 -1
- package/cjs/index.cjs +20 -25
- package/cjs/index.cjs.map +1 -1
- package/cjs/index.d.cts +1 -1
- package/esm/DynamicSnippetsGenerator.d.ts +1 -1
- package/esm/DynamicSnippetsGenerator.js +1 -1
- package/esm/{DynamicSnippetsGeneratorContext-7JXlOyjB.d.ts → DynamicSnippetsGeneratorContext-CwkDTYOI.d.ts} +3 -3
- package/esm/EndpointSnippetGenerator.d.ts +6 -1
- package/esm/EndpointSnippetGenerator.js +1 -1
- package/esm/chunk-3LG5WCZI.js +2 -0
- package/esm/chunk-3LG5WCZI.js.map +1 -0
- package/esm/{chunk-KU3OGJUU.js → chunk-3QAUV5WT.js} +2 -2
- package/esm/chunk-6HHK4TUF.js +4 -0
- package/esm/chunk-6HHK4TUF.js.map +1 -0
- package/esm/{chunk-625QSFAH.js → chunk-EECVWAVT.js} +2 -2
- package/esm/{chunk-625QSFAH.js.map → chunk-EECVWAVT.js.map} +1 -1
- package/esm/chunk-PYHFKEW4.js +47 -0
- package/esm/chunk-PYHFKEW4.js.map +1 -0
- package/esm/chunk-SGTIIPPK.js +2 -0
- package/esm/chunk-XX3MRTVI.js +2 -0
- package/esm/chunk-XX3MRTVI.js.map +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 +1 -1
- package/esm/index.js +1 -13
- package/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/esm/chunk-7MI6WLZG.js +0 -2
- package/esm/chunk-7MI6WLZG.js.map +0 -1
- package/esm/chunk-BYNT7UJT.js +0 -2
- package/esm/chunk-BYNT7UJT.js.map +0 -1
- package/esm/chunk-J4Y3S6QS.js +0 -40
- package/esm/chunk-J4Y3S6QS.js.map +0 -1
- package/esm/chunk-YKXTGZL6.js +0 -4
- package/esm/chunk-YKXTGZL6.js.map +0 -1
- package/esm/chunk-ZYT6M32A.js +0 -2
- /package/esm/{chunk-KU3OGJUU.js.map → chunk-3QAUV5WT.js.map} +0 -0
- /package/esm/{chunk-ZYT6M32A.js.map → chunk-SGTIIPPK.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '@fern-api/browser-compatible-base-generator';
|
|
2
2
|
import '@fern-api/dynamic-ir-sdk';
|
|
3
3
|
import '@fern-api/php-codegen';
|
|
4
|
-
export { D as DynamicSnippetsGeneratorContext } from '../DynamicSnippetsGeneratorContext-
|
|
4
|
+
export { D as DynamicSnippetsGeneratorContext } from '../DynamicSnippetsGeneratorContext-CwkDTYOI.cjs';
|
|
@@ -1,21 +1,28 @@
|
|
|
1
|
-
"use strict";var We=Object.defineProperty,Wn=Object.defineProperties,Yn=Object.getOwnPropertyDescriptor,Gn=Object.getOwnPropertyDescriptors,zn=Object.getOwnPropertyNames,Pt=Object.getOwnPropertySymbols;var Ut=Object.prototype.hasOwnProperty,qn=Object.prototype.propertyIsEnumerable;var xt=(r,t,e)=>t in r?We(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Pe=(r,t)=>{for(var e in t||(t={}))Ut.call(t,e)&&xt(r,e,t[e]);if(Pt)for(var e of Pt(t))qn.call(t,e)&&xt(r,e,t[e]);return r},Ue=(r,t)=>Wn(r,Gn(t));var yt=(r,t)=>()=>(r&&(t=r(r=0)),t);var Bt=(r,t)=>{for(var e in t)We(r,e,{get:t[e],enumerable:!0})},Vn=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of zn(t))!Ut.call(r,i)&&i!==e&&We(r,i,{get:()=>t[i],enumerable:!(n=Yn(t,i))||n.enumerable});return r};var Hn=r=>Vn(We({},"__esModule",{value:!0}),r);var c=(r,t,e)=>xt(r,typeof t!="symbol"?t+"":t,e);function Mt(){throw new Error("setTimeout has not been defined")}function Dt(){throw new Error("clearTimeout has not been defined")}function Ft(r){if(ee===setTimeout)return setTimeout(r,0);if((ee===Mt||!ee)&&setTimeout)return ee=setTimeout,setTimeout(r,0);try{return ee(r,0)}catch(t){try{return ee.call(null,r,0)}catch(e){return ee.call(this,r,0)}}}function Kn(r){if(te===clearTimeout)return clearTimeout(r);if((te===Dt||!te)&&clearTimeout)return te=clearTimeout,clearTimeout(r);try{return te(r)}catch(t){try{return te.call(null,r)}catch(e){return te.call(this,r)}}}function Jn(){!Ie||!ce||(Ie=!1,ce.length?j=ce.concat(j):Ye=-1,j.length&&jt())}function jt(){if(!Ie){var r=Ft(Jn);Ie=!0;for(var t=j.length;t;){for(ce=j,j=[];++Ye<t;)ce&&ce[Ye].run();Ye=-1,t=j.length}ce=null,Ie=!1,Kn(r)}}function Qn(r){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];j.push(new $t(r,t)),j.length===1&&!Ie&&Ft(jt)}function $t(r,t){this.fun=r,this.array=t}function me(){}function di(r){throw new Error("process.binding is not supported")}function hi(){return"/"}function xi(r){throw new Error("process.chdir is not supported")}function yi(){return 0}function gi(r){var t=wi.call(Ee)*.001,e=Math.floor(t),n=Math.floor(t%1*1e9);return r&&(e=e-r[0],n=n-r[1],n<0&&(e--,n+=1e9)),[e,n]}function vi(){var r=new Date,t=r-Ti;return t/1e3}var ee,te,j,Ie,ce,Ye,Xn,Zn,ei,ti,ri,ni,ii,oi,ai,si,fi,pi,ui,li,ci,mi,Ee,wi,Ti,u,kt,a=yt(()=>{"use strict";ee=Mt,te=Dt;typeof globalThis.setTimeout=="function"&&(ee=setTimeout);typeof globalThis.clearTimeout=="function"&&(te=clearTimeout);j=[],Ie=!1,Ye=-1;$t.prototype.run=function(){this.fun.apply(null,this.array)};Xn="browser",Zn="browser",ei=!0,ti={},ri=[],ni="",ii={},oi={},ai={};si=me,fi=me,pi=me,ui=me,li=me,ci=me,mi=me;Ee=globalThis.performance||{},wi=Ee.now||Ee.mozNow||Ee.msNow||Ee.oNow||Ee.webkitNow||function(){return new Date().getTime()};Ti=new Date;u={nextTick:Qn,title:Xn,browser:ei,env:ti,argv:ri,version:ni,versions:ii,on:si,addListener:fi,once:pi,off:ui,removeListener:li,removeAllListeners:ci,emit:mi,binding:di,cwd:hi,chdir:xi,umask:yi,hrtime:gi,platform:Zn,release:oi,config:ai,uptime:vi},kt={};Object.keys(kt).forEach(r=>{let t=r.split("."),e=u;for(let n=0;n<t.length;n++){let i=t[n];n===t.length-1?e[i]=kt[r]:e=e[i]||(e[i]={})}})});function zt(){gt=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,e=r.length;t<e;++t)k[t]=r[t],R[r.charCodeAt(t)]=t;R[45]=62,R[95]=63}function bi(r){gt||zt();var t,e,n,i,o,p,l=r.length;if(l%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=r[l-2]==="="?2:r[l-1]==="="?1:0,p=new Ai(l*3/4-o),n=o>0?l-4:l;var m=0;for(t=0,e=0;t<n;t+=4,e+=3)i=R[r.charCodeAt(t)]<<18|R[r.charCodeAt(t+1)]<<12|R[r.charCodeAt(t+2)]<<6|R[r.charCodeAt(t+3)],p[m++]=i>>16&255,p[m++]=i>>8&255,p[m++]=i&255;return o===2?(i=R[r.charCodeAt(t)]<<2|R[r.charCodeAt(t+1)]>>4,p[m++]=i&255):o===1&&(i=R[r.charCodeAt(t)]<<10|R[r.charCodeAt(t+1)]<<4|R[r.charCodeAt(t+2)]>>2,p[m++]=i>>8&255,p[m++]=i&255),p}function _i(r){return k[r>>18&63]+k[r>>12&63]+k[r>>6&63]+k[r&63]}function Ei(r,t,e){for(var n,i=[],o=t;o<e;o+=3)n=(r[o]<<16)+(r[o+1]<<8)+r[o+2],i.push(_i(n));return i.join("")}function Wt(r){gt||zt();for(var t,e=r.length,n=e%3,i="",o=[],p=16383,l=0,m=e-n;l<m;l+=p)o.push(Ei(r,l,l+p>m?m:l+p));return n===1?(t=r[e-1],i+=k[t>>2],i+=k[t<<4&63],i+="=="):n===2&&(t=(r[e-2]<<8)+r[e-1],i+=k[t>>10],i+=k[t>>4&63],i+=k[t<<2&63],i+="="),o.push(i),o.join("")}function Ge(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function $(r,t){if(Ge()<t)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(t),r.__proto__=f.prototype):(r===null&&(r=new f(t)),r.length=t),r}function f(r,t,e){if(!f.TYPED_ARRAY_SUPPORT&&!(this instanceof f))return new f(r,t,e);if(typeof r=="number"){if(typeof t=="string")throw new Error("If encoding is specified then the first argument must be a string");return Tt(this,r)}return qt(this,r,t,e)}function qt(r,t,e,n){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&t instanceof ArrayBuffer?Ni(r,t,e,n):typeof t=="string"?Li(r,t,e):Si(r,t)}function Vt(r){if(typeof r!="number")throw new TypeError('"size" argument must be a number');if(r<0)throw new RangeError('"size" argument must not be negative')}function Ii(r,t,e,n){return Vt(t),t<=0?$(r,t):e!==void 0?typeof n=="string"?$(r,t).fill(e,n):$(r,t).fill(e):$(r,t)}function Tt(r,t){if(Vt(t),r=$(r,t<0?0:vt(t)|0),!f.TYPED_ARRAY_SUPPORT)for(var e=0;e<t;++e)r[e]=0;return r}function Li(r,t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!f.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=Ht(t,e)|0;r=$(r,n);var i=r.write(t,e);return i!==n&&(r=r.slice(0,i)),r}function wt(r,t){var e=t.length<0?0:vt(t.length)|0;r=$(r,e);for(var n=0;n<e;n+=1)r[n]=t[n]&255;return r}function Ni(r,t,e,n){if(t.byteLength,e<0||t.byteLength<e)throw new RangeError("'offset' is out of bounds");if(t.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return e===void 0&&n===void 0?t=new Uint8Array(t):n===void 0?t=new Uint8Array(t,e):t=new Uint8Array(t,e,n),f.TYPED_ARRAY_SUPPORT?(r=t,r.__proto__=f.prototype):r=wt(r,t),r}function Si(r,t){if(M(t)){var e=vt(t.length)|0;return r=$(r,e),r.length===0||t.copy(r,0,0,e),r}if(t){if(typeof ArrayBuffer!="undefined"&&t.buffer instanceof ArrayBuffer||"length"in t)return typeof t.length!="number"||Hi(t.length)?$(r,0):wt(r,t);if(t.type==="Buffer"&&Array.isArray(t.data))return wt(r,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function vt(r){if(r>=Ge())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ge().toString(16)+" bytes");return r|0}function M(r){return!!(r!=null&&r._isBuffer)}function Ht(r,t){if(M(r))return r.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(r)||r instanceof ArrayBuffer))return r.byteLength;typeof r!="string"&&(r=""+r);var e=r.length;if(e===0)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return ze(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return tr(r).length;default:if(n)return ze(r).length;t=(""+t).toLowerCase(),n=!0}}function Ci(r,t,e){var n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,t>>>=0,e<=t))return"";for(r||(r="utf8");;)switch(r){case"hex":return ji(this,t,e);case"utf8":case"utf-8":return Qt(this,t,e);case"ascii":return Di(this,t,e);case"latin1":case"binary":return Fi(this,t,e);case"base64":return ki(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $i(this,t,e);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}function de(r,t,e){var n=r[t];r[t]=r[e],r[e]=n}function Kt(r,t,e,n,i){if(r.length===0)return-1;if(typeof e=="string"?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:r.length-1),e<0&&(e=r.length+e),e>=r.length){if(i)return-1;e=r.length-1}else if(e<0)if(i)e=0;else return-1;if(typeof t=="string"&&(t=f.from(t,n)),M(t))return t.length===0?-1:Yt(r,t,e,n,i);if(typeof t=="number")return t=t&255,f.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,t,e):Uint8Array.prototype.lastIndexOf.call(r,t,e):Yt(r,[t],e,n,i);throw new TypeError("val must be string, number or Buffer")}function Yt(r,t,e,n,i){var o=1,p=r.length,l=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||t.length<2)return-1;o=2,p/=2,l/=2,e/=2}function m(v,A){return o===1?v[A]:v.readUInt16BE(A*o)}var d;if(i){var h=-1;for(d=e;d<p;d++)if(m(r,d)===m(t,h===-1?0:d-h)){if(h===-1&&(h=d),d-h+1===l)return h*o}else h!==-1&&(d-=d-h),h=-1}else for(e+l>p&&(e=p-l),d=e;d>=0;d--){for(var x=!0,g=0;g<l;g++)if(m(r,d+g)!==m(t,g)){x=!1;break}if(x)return d}return-1}function Ri(r,t,e,n){e=Number(e)||0;var i=r.length-e;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 p=0;p<n;++p){var l=parseInt(t.substr(p*2,2),16);if(isNaN(l))return p;r[e+p]=l}return p}function Oi(r,t,e,n){return He(ze(t,r.length-e),r,e,n)}function Jt(r,t,e,n){return He(qi(t),r,e,n)}function Pi(r,t,e,n){return Jt(r,t,e,n)}function Ui(r,t,e,n){return He(tr(t),r,e,n)}function Bi(r,t,e,n){return He(Vi(t,r.length-e),r,e,n)}function ki(r,t,e){return t===0&&e===r.length?Wt(r):Wt(r.slice(t,e))}function Qt(r,t,e){e=Math.min(r.length,e);for(var n=[],i=t;i<e;){var o=r[i],p=null,l=o>239?4:o>223?3:o>191?2:1;if(i+l<=e){var m,d,h,x;switch(l){case 1:o<128&&(p=o);break;case 2:m=r[i+1],(m&192)===128&&(x=(o&31)<<6|m&63,x>127&&(p=x));break;case 3:m=r[i+1],d=r[i+2],(m&192)===128&&(d&192)===128&&(x=(o&15)<<12|(m&63)<<6|d&63,x>2047&&(x<55296||x>57343)&&(p=x));break;case 4:m=r[i+1],d=r[i+2],h=r[i+3],(m&192)===128&&(d&192)===128&&(h&192)===128&&(x=(o&15)<<18|(m&63)<<12|(d&63)<<6|h&63,x>65535&&x<1114112&&(p=x))}}p===null?(p=65533,l=1):p>65535&&(p-=65536,n.push(p>>>10&1023|55296),p=56320|p&1023),n.push(p),i+=l}return Mi(n)}function Mi(r){var t=r.length;if(t<=Gt)return String.fromCharCode.apply(String,r);for(var e="",n=0;n<t;)e+=String.fromCharCode.apply(String,r.slice(n,n+=Gt));return e}function Di(r,t,e){var n="";e=Math.min(r.length,e);for(var i=t;i<e;++i)n+=String.fromCharCode(r[i]&127);return n}function Fi(r,t,e){var n="";e=Math.min(r.length,e);for(var i=t;i<e;++i)n+=String.fromCharCode(r[i]);return n}function ji(r,t,e){var n=r.length;(!t||t<0)&&(t=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=t;o<e;++o)i+=zi(r[o]);return i}function $i(r,t,e){for(var n=r.slice(t,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}function b(r,t,e){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+t>e)throw new RangeError("Trying to access beyond buffer length")}function L(r,t,e,n,i,o){if(!M(r))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(e+n>r.length)throw new RangeError("Index out of range")}function qe(r,t,e,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(r.length-e,2);i<o;++i)r[e+i]=(t&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}function Ve(r,t,e,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(r.length-e,4);i<o;++i)r[e+i]=t>>>(n?i:3-i)*8&255}function Xt(r,t,e,n,i,o){if(e+n>r.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function Zt(r,t,e,n,i){return i||Xt(r,t,e,4,34028234663852886e22,-34028234663852886e22),nr(r,t,e,n,23,4),e+4}function er(r,t,e,n,i){return i||Xt(r,t,e,8,17976931348623157e292,-17976931348623157e292),nr(r,t,e,n,52,8),e+8}function Yi(r){if(r=Gi(r).replace(Wi,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function Gi(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function zi(r){return r<16?"0"+r.toString(16):r.toString(16)}function ze(r,t){t=t||1/0;for(var e,n=r.length,i=null,o=[],p=0;p<n;++p){if(e=r.charCodeAt(p),e>55295&&e<57344){if(!i){if(e>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(p+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(t-=3)>-1&&o.push(239,191,189),i=e;continue}e=(i-55296<<10|e-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((t-=1)<0)break;o.push(e)}else if(e<2048){if((t-=2)<0)break;o.push(e>>6|192,e&63|128)}else if(e<65536){if((t-=3)<0)break;o.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((t-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return o}function qi(r){for(var t=[],e=0;e<r.length;++e)t.push(r.charCodeAt(e)&255);return t}function Vi(r,t){for(var e,n,i,o=[],p=0;p<r.length&&!((t-=2)<0);++p)e=r.charCodeAt(p),n=e>>8,i=e%256,o.push(i),o.push(n);return o}function tr(r){return bi(Yi(r))}function He(r,t,e,n){for(var i=0;i<n&&!(i+e>=t.length||i>=r.length);++i)t[i+e]=r[i];return i}function Hi(r){return r!==r}function Ki(r){return r!=null&&(!!r._isBuffer||rr(r)||Ji(r))}function rr(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function Ji(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&rr(r.slice(0,0))}function Ke(r,t,e,n,i){var o,p,l=i*8-n-1,m=(1<<l)-1,d=m>>1,h=-7,x=e?i-1:0,g=e?-1:1,v=r[t+x];for(x+=g,o=v&(1<<-h)-1,v>>=-h,h+=l;h>0;o=o*256+r[t+x],x+=g,h-=8);for(p=o&(1<<-h)-1,o>>=-h,h+=n;h>0;p=p*256+r[t+x],x+=g,h-=8);if(o===0)o=1-d;else{if(o===m)return p?NaN:(v?-1:1)*(1/0);p=p+Math.pow(2,n),o=o-d}return(v?-1:1)*p*Math.pow(2,o-n)}function nr(r,t,e,n,i,o){var p,l,m,d=o*8-i-1,h=(1<<d)-1,x=h>>1,g=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=n?0:o-1,A=n?1:-1,N=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,p=h):(p=Math.floor(Math.log(t)/Math.LN2),t*(m=Math.pow(2,-p))<1&&(p--,m*=2),p+x>=1?t+=g/m:t+=g*Math.pow(2,1-x),t*m>=2&&(p++,m/=2),p+x>=h?(l=0,p=h):p+x>=1?(l=(t*m-1)*Math.pow(2,i),p=p+x):(l=t*Math.pow(2,x-1)*Math.pow(2,i),p=0));i>=8;r[e+v]=l&255,v+=A,l/=256,i-=8);for(p=p<<i|l,d+=i;d>0;r[e+v]=p&255,v+=A,p/=256,d-=8);r[e+v-A]|=N*128}var k,R,Ai,gt,Gt,Wi,ir=yt(()=>{"use strict";a();s();k=[],R=[],Ai=typeof Uint8Array!="undefined"?Uint8Array:Array,gt=!1;f.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;f.poolSize=8192;f._augment=function(r){return r.__proto__=f.prototype,r};f.from=function(r,t,e){return qt(null,r,t,e)};f.kMaxLength=Ge();f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&f[Symbol.species]);f.alloc=function(r,t,e){return Ii(null,r,t,e)};f.allocUnsafe=function(r){return Tt(null,r)};f.allocUnsafeSlow=function(r){return Tt(null,r)};f.isBuffer=Ki;f.compare=function(t,e){if(!M(t)||!M(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,i=e.length,o=0,p=Math.min(n,i);o<p;++o)if(t[o]!==e[o]){n=t[o],i=e[o];break}return n<i?-1:i<n?1:0};f.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}};f.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return f.alloc(0);var n;if(e===void 0)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var i=f.allocUnsafe(e),o=0;for(n=0;n<t.length;++n){var p=t[n];if(!M(p))throw new TypeError('"list" argument must be an Array of Buffers');p.copy(i,o),o+=p.length}return i};f.byteLength=Ht;f.prototype._isBuffer=!0;f.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 e=0;e<t;e+=2)de(this,e,e+1);return this};f.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 e=0;e<t;e+=4)de(this,e,e+3),de(this,e+1,e+2);return this};f.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 e=0;e<t;e+=8)de(this,e,e+7),de(this,e+1,e+6),de(this,e+2,e+5),de(this,e+3,e+4);return this};f.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?Qt(this,0,t):Ci.apply(this,arguments)};f.prototype.equals=function(t){if(!M(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:f.compare(this,t)===0};f.prototype.compare=function(t,e,n,i,o){if(!M(t))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),e<0||n>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&e>=n)return 0;if(i>=o)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,i>>>=0,o>>>=0,this===t)return 0;for(var p=o-i,l=n-e,m=Math.min(p,l),d=this.slice(i,o),h=t.slice(e,n),x=0;x<m;++x)if(d[x]!==h[x]){p=d[x],l=h[x];break}return p<l?-1:l<p?1:0};f.prototype.includes=function(t,e,n){return this.indexOf(t,e,n)!==-1};f.prototype.indexOf=function(t,e,n){return Kt(this,t,e,n,!0)};f.prototype.lastIndexOf=function(t,e,n){return Kt(this,t,e,n,!1)};f.prototype.write=function(t,e,n,i){if(e===void 0)i="utf8",n=this.length,e=0;else if(n===void 0&&typeof e=="string")i=e,n=this.length,e=0;else if(isFinite(e))e=e|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-e;if((n===void 0||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var p=!1;;)switch(i){case"hex":return Ri(this,t,e,n);case"utf8":case"utf-8":return Oi(this,t,e,n);case"ascii":return Jt(this,t,e,n);case"latin1":case"binary":return Pi(this,t,e,n);case"base64":return Ui(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Bi(this,t,e,n);default:if(p)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),p=!0}};f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};Gt=4096;f.prototype.slice=function(t,e){var n=this.length;t=~~t,e=e===void 0?n:~~e,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),e<t&&(e=t);var i;if(f.TYPED_ARRAY_SUPPORT)i=this.subarray(t,e),i.__proto__=f.prototype;else{var o=e-t;i=new f(o,void 0);for(var p=0;p<o;++p)i[p]=this[p+t]}return i};f.prototype.readUIntLE=function(t,e,n){t=t|0,e=e|0,n||b(t,e,this.length);for(var i=this[t],o=1,p=0;++p<e&&(o*=256);)i+=this[t+p]*o;return i};f.prototype.readUIntBE=function(t,e,n){t=t|0,e=e|0,n||b(t,e,this.length);for(var i=this[t+--e],o=1;e>0&&(o*=256);)i+=this[t+--e]*o;return i};f.prototype.readUInt8=function(t,e){return e||b(t,1,this.length),this[t]};f.prototype.readUInt16LE=function(t,e){return e||b(t,2,this.length),this[t]|this[t+1]<<8};f.prototype.readUInt16BE=function(t,e){return e||b(t,2,this.length),this[t]<<8|this[t+1]};f.prototype.readUInt32LE=function(t,e){return e||b(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};f.prototype.readUInt32BE=function(t,e){return e||b(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};f.prototype.readIntLE=function(t,e,n){t=t|0,e=e|0,n||b(t,e,this.length);for(var i=this[t],o=1,p=0;++p<e&&(o*=256);)i+=this[t+p]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i};f.prototype.readIntBE=function(t,e,n){t=t|0,e=e|0,n||b(t,e,this.length);for(var i=e,o=1,p=this[t+--i];i>0&&(o*=256);)p+=this[t+--i]*o;return o*=128,p>=o&&(p-=Math.pow(2,8*e)),p};f.prototype.readInt8=function(t,e){return e||b(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};f.prototype.readInt16LE=function(t,e){e||b(t,2,this.length);var n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};f.prototype.readInt16BE=function(t,e){e||b(t,2,this.length);var n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};f.prototype.readInt32LE=function(t,e){return e||b(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};f.prototype.readInt32BE=function(t,e){return e||b(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};f.prototype.readFloatLE=function(t,e){return e||b(t,4,this.length),Ke(this,t,!0,23,4)};f.prototype.readFloatBE=function(t,e){return e||b(t,4,this.length),Ke(this,t,!1,23,4)};f.prototype.readDoubleLE=function(t,e){return e||b(t,8,this.length),Ke(this,t,!0,52,8)};f.prototype.readDoubleBE=function(t,e){return e||b(t,8,this.length),Ke(this,t,!1,52,8)};f.prototype.writeUIntLE=function(t,e,n,i){if(t=+t,e=e|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;L(this,t,e,n,o,0)}var p=1,l=0;for(this[e]=t&255;++l<n&&(p*=256);)this[e+l]=t/p&255;return e+n};f.prototype.writeUIntBE=function(t,e,n,i){if(t=+t,e=e|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;L(this,t,e,n,o,0)}var p=n-1,l=1;for(this[e+p]=t&255;--p>=0&&(l*=256);)this[e+p]=t/l&255;return e+n};f.prototype.writeUInt8=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,1,255,0),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=t&255,e+1};f.prototype.writeUInt16LE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):qe(this,t,e,!0),e+2};f.prototype.writeUInt16BE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):qe(this,t,e,!1),e+2};f.prototype.writeUInt32LE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t&255):Ve(this,t,e,!0),e+4};f.prototype.writeUInt32BE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):Ve(this,t,e,!1),e+4};f.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*n-1);L(this,t,e,n,o-1,-o)}var p=0,l=1,m=0;for(this[e]=t&255;++p<n&&(l*=256);)t<0&&m===0&&this[e+p-1]!==0&&(m=1),this[e+p]=(t/l>>0)-m&255;return e+n};f.prototype.writeIntBE=function(t,e,n,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*n-1);L(this,t,e,n,o-1,-o)}var p=n-1,l=1,m=0;for(this[e+p]=t&255;--p>=0&&(l*=256);)t<0&&m===0&&this[e+p+1]!==0&&(m=1),this[e+p]=(t/l>>0)-m&255;return e+n};f.prototype.writeInt8=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,1,127,-128),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=t&255,e+1};f.prototype.writeInt16LE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):qe(this,t,e,!0),e+2};f.prototype.writeInt16BE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):qe(this,t,e,!1),e+2};f.prototype.writeInt32LE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):Ve(this,t,e,!0),e+4};f.prototype.writeInt32BE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):Ve(this,t,e,!1),e+4};f.prototype.writeFloatLE=function(t,e,n){return Zt(this,t,e,!0,n)};f.prototype.writeFloatBE=function(t,e,n){return Zt(this,t,e,!1,n)};f.prototype.writeDoubleLE=function(t,e,n){return er(this,t,e,!0,n)};f.prototype.writeDoubleBE=function(t,e,n){return er(this,t,e,!1,n)};f.prototype.copy=function(t,e,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<n&&(i=n),i===n||t.length===0||this.length===0)return 0;if(e<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-e<i-n&&(i=t.length-e+n);var o=i-n,p;if(this===t&&n<e&&e<i)for(p=o-1;p>=0;--p)t[p+e]=this[p+n];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(p=0;p<o;++p)t[p+e]=this[p+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o};f.prototype.fill=function(t,e,n,i){if(typeof t=="string"){if(typeof e=="string"?(i=e,e=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"&&!f.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof t=="number"&&(t=t&255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;e=e>>>0,n=n===void 0?this.length:n>>>0,t||(t=0);var p;if(typeof t=="number")for(p=e;p<n;++p)this[p]=t;else{var l=M(t)?t:ze(new f(t,i).toString()),m=l.length;for(p=0;p<n-e;++p)this[p+e]=l[p%m]}return this};Wi=/[^+\/0-9A-Za-z-_]/g});var s=yt(()=>{"use strict";ir()});var ep={};Bt(ep,{DynamicTypeLiteralMapper:()=>Rt});module.exports=Hn(ep);a();s();a();s();a();s();function S(r){throw new Error("Unexpected value: "+JSON.stringify(r))}a();s();a();s();a();s();a();s();a();s();var Qi=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,Je=Qi;var Xi=typeof self=="object"&&self&&self.Object===Object&&self,Zi=Je||Xi||Function("return this")(),_=Zi;var eo=_.Symbol,W=eo;a();s();var or=Object.prototype,to=or.hasOwnProperty,ro=or.toString,Be=W?W.toStringTag:void 0;function no(r){var t=to.call(r,Be),e=r[Be];try{r[Be]=void 0;var n=!0}catch(o){}var i=ro.call(r);return n&&(t?r[Be]=e:delete r[Be]),i}var ar=no;a();s();var io=Object.prototype,oo=io.toString;function ao(r){return oo.call(r)}var sr=ao;var so="[object Null]",fo="[object Undefined]",fr=W?W.toStringTag:void 0;function po(r){return r==null?r===void 0?fo:so:fr&&fr in Object(r)?ar(r):sr(r)}var Y=po;a();s();function uo(r){return r!=null&&typeof r=="object"}var G=uo;a();s();var lo=Array.isArray,he=lo;a();s();function co(r){var t=typeof r;return r!=null&&(t=="object"||t=="function")}var Qe=co;a();s();a();s();a();s();a();s();var mo="[object AsyncFunction]",ho="[object Function]",xo="[object GeneratorFunction]",yo="[object Proxy]";function wo(r){if(!Qe(r))return!1;var t=Y(r);return t==ho||t==xo||t==mo||t==yo}var Xe=wo;a();s();a();s();var go=_["__core-js_shared__"],Ze=go;var pr=(function(){var r=/[^.]+$/.exec(Ze&&Ze.keys&&Ze.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function To(r){return!!pr&&pr in r}var ur=To;a();s();var vo=Function.prototype,Ao=vo.toString;function bo(r){if(r!=null){try{return Ao.call(r)}catch(t){}try{return r+""}catch(t){}}return""}var z=bo;var _o=/[\\^$.*+?()[\]{}|]/g,Eo=/^\[object .+?Constructor\]$/,Io=Function.prototype,Lo=Object.prototype,No=Io.toString,So=Lo.hasOwnProperty,Co=RegExp("^"+No.call(So).replace(_o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ro(r){if(!Qe(r)||ur(r))return!1;var t=Xe(r)?Co:Eo;return t.test(z(r))}var lr=Ro;a();s();function Oo(r,t){return r==null?void 0:r[t]}var cr=Oo;function Po(r,t){var e=cr(r,t);return lr(e)?e:void 0}var O=Po;var Uo=O(_,"WeakMap"),et=Uo;a();s();function Bo(){}var mr=Bo;a();s();a();s();a();s();function ko(r,t,e,n){for(var i=r.length,o=e+(n?1:-1);n?o--:++o<i;)if(t(r[o],o,r))return o;return-1}var dr=ko;a();s();function Mo(r){return r!==r}var hr=Mo;a();s();function Do(r,t,e){for(var n=e-1,i=r.length;++n<i;)if(r[n]===t)return n;return-1}var xr=Do;function Fo(r,t,e){return t===t?xr(r,t,e):dr(r,hr,e)}var yr=Fo;function jo(r,t){var e=r==null?0:r.length;return!!e&&yr(r,t,0)>-1}var wr=jo;a();s();var $o=9007199254740991,Wo=/^(?:0|[1-9]\d*)$/;function Yo(r,t){var e=typeof r;return t=t==null?$o:t,!!t&&(e=="number"||e!="symbol"&&Wo.test(r))&&r>-1&&r%1==0&&r<t}var gr=Yo;a();s();function Go(r,t){return r===t||r!==r&&t!==t}var tt=Go;a();s();a();s();var zo=9007199254740991;function qo(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=zo}var rt=qo;function Vo(r){return r!=null&&rt(r.length)&&!Xe(r)}var Tr=Vo;a();s();var Ho=Object.prototype;function Ko(r){var t=r&&r.constructor,e=typeof t=="function"&&t.prototype||Ho;return r===e}var vr=Ko;a();s();a();s();a();s();function Jo(r,t){for(var e=-1,n=Array(r);++e<r;)n[e]=t(e);return n}var Ar=Jo;a();s();a();s();var Qo="[object Arguments]";function Xo(r){return G(r)&&Y(r)==Qo}var At=Xo;var br=Object.prototype,Zo=br.hasOwnProperty,ea=br.propertyIsEnumerable,ta=At((function(){return arguments})())?At:function(r){return G(r)&&Zo.call(r,"callee")&&!ea.call(r,"callee")},_r=ta;a();s();a();s();function ra(){return!1}var Er=ra;var Nr=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ir=Nr&&typeof module=="object"&&module&&!module.nodeType&&module,na=Ir&&Ir.exports===Nr,Lr=na?_.Buffer:void 0,ia=Lr?Lr.isBuffer:void 0,oa=ia||Er,ke=oa;a();s();a();s();var aa="[object Arguments]",sa="[object Array]",fa="[object Boolean]",pa="[object Date]",ua="[object Error]",la="[object Function]",ca="[object Map]",ma="[object Number]",da="[object Object]",ha="[object RegExp]",xa="[object Set]",ya="[object String]",wa="[object WeakMap]",ga="[object ArrayBuffer]",Ta="[object DataView]",va="[object Float32Array]",Aa="[object Float64Array]",ba="[object Int8Array]",_a="[object Int16Array]",Ea="[object Int32Array]",Ia="[object Uint8Array]",La="[object Uint8ClampedArray]",Na="[object Uint16Array]",Sa="[object Uint32Array]",T={};T[va]=T[Aa]=T[ba]=T[_a]=T[Ea]=T[Ia]=T[La]=T[Na]=T[Sa]=!0;T[aa]=T[sa]=T[ga]=T[fa]=T[Ta]=T[pa]=T[ua]=T[la]=T[ca]=T[ma]=T[da]=T[ha]=T[xa]=T[ya]=T[wa]=!1;function Ca(r){return G(r)&&rt(r.length)&&!!T[Y(r)]}var Sr=Ca;a();s();function Ra(r){return function(t){return r(t)}}var Cr=Ra;a();s();var Rr=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Me=Rr&&typeof module=="object"&&module&&!module.nodeType&&module,Oa=Me&&Me.exports===Rr,bt=Oa&&Je.process,Pa=(function(){try{var r=Me&&Me.require&&Me.require("util").types;return r||bt&&bt.binding&&bt.binding("util")}catch(t){}})(),_t=Pa;var Or=_t&&_t.isTypedArray,Ua=Or?Cr(Or):Sr,nt=Ua;var Ba=Object.prototype,ka=Ba.hasOwnProperty;function Ma(r,t){var e=he(r),n=!e&&_r(r),i=!e&&!n&&ke(r),o=!e&&!n&&!i&&nt(r),p=e||n||i||o,l=p?Ar(r.length,String):[],m=l.length;for(var d in r)(t||ka.call(r,d))&&!(p&&(d=="length"||i&&(d=="offset"||d=="parent")||o&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||gr(d,m)))&&l.push(d);return l}var Pr=Ma;a();s();a();s();a();s();function Da(r,t){return function(e){return r(t(e))}}var Ur=Da;var Fa=Ur(Object.keys,Object),Br=Fa;var ja=Object.prototype,$a=ja.hasOwnProperty;function Wa(r){if(!vr(r))return Br(r);var t=[];for(var e in Object(r))$a.call(r,e)&&e!="constructor"&&t.push(e);return t}var kr=Wa;function Ya(r){return Tr(r)?Pr(r):kr(r)}var Mr=Ya;a();s();a();s();a();s();a();s();a();s();var Ga=O(Object,"create"),q=Ga;function za(){this.__data__=q?q(null):{},this.size=0}var Dr=za;a();s();function qa(r){var t=this.has(r)&&delete this.__data__[r];return this.size-=t?1:0,t}var Fr=qa;a();s();var Va="__lodash_hash_undefined__",Ha=Object.prototype,Ka=Ha.hasOwnProperty;function Ja(r){var t=this.__data__;if(q){var e=t[r];return e===Va?void 0:e}return Ka.call(t,r)?t[r]:void 0}var jr=Ja;a();s();var Qa=Object.prototype,Xa=Qa.hasOwnProperty;function Za(r){var t=this.__data__;return q?t[r]!==void 0:Xa.call(t,r)}var $r=Za;a();s();var es="__lodash_hash_undefined__";function ts(r,t){var e=this.__data__;return this.size+=this.has(r)?0:1,e[r]=q&&t===void 0?es:t,this}var Wr=ts;function Le(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var n=r[t];this.set(n[0],n[1])}}Le.prototype.clear=Dr;Le.prototype.delete=Fr;Le.prototype.get=jr;Le.prototype.has=$r;Le.prototype.set=Wr;var Et=Le;a();s();a();s();function rs(){this.__data__=[],this.size=0}var Yr=rs;a();s();a();s();function ns(r,t){for(var e=r.length;e--;)if(tt(r[e][0],t))return e;return-1}var re=ns;var is=Array.prototype,os=is.splice;function as(r){var t=this.__data__,e=re(t,r);if(e<0)return!1;var n=t.length-1;return e==n?t.pop():os.call(t,e,1),--this.size,!0}var Gr=as;a();s();function ss(r){var t=this.__data__,e=re(t,r);return e<0?void 0:t[e][1]}var zr=ss;a();s();function fs(r){return re(this.__data__,r)>-1}var qr=fs;a();s();function ps(r,t){var e=this.__data__,n=re(e,r);return n<0?(++this.size,e.push([r,t])):e[n][1]=t,this}var Vr=ps;function Ne(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var n=r[t];this.set(n[0],n[1])}}Ne.prototype.clear=Yr;Ne.prototype.delete=Gr;Ne.prototype.get=zr;Ne.prototype.has=qr;Ne.prototype.set=Vr;var ne=Ne;a();s();var us=O(_,"Map"),ie=us;function ls(){this.size=0,this.__data__={hash:new Et,map:new(ie||ne),string:new Et}}var Hr=ls;a();s();a();s();a();s();function cs(r){var t=typeof r;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?r!=="__proto__":r===null}var Kr=cs;function ms(r,t){var e=r.__data__;return Kr(t)?e[typeof t=="string"?"string":"hash"]:e.map}var oe=ms;function ds(r){var t=oe(this,r).delete(r);return this.size-=t?1:0,t}var Jr=ds;a();s();function hs(r){return oe(this,r).get(r)}var Qr=hs;a();s();function xs(r){return oe(this,r).has(r)}var Xr=xs;a();s();function ys(r,t){var e=oe(this,r),n=e.size;return e.set(r,t),this.size+=e.size==n?0:1,this}var Zr=ys;function Se(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var n=r[t];this.set(n[0],n[1])}}Se.prototype.clear=Hr;Se.prototype.delete=Jr;Se.prototype.get=Qr;Se.prototype.has=Xr;Se.prototype.set=Zr;var it=Se;a();s();function ws(r,t){for(var e=-1,n=t.length,i=r.length;++e<n;)r[i+e]=t[e];return r}var en=ws;a();s();a();s();function gs(){this.__data__=new ne,this.size=0}var tn=gs;a();s();function Ts(r){var t=this.__data__,e=t.delete(r);return this.size=t.size,e}var rn=Ts;a();s();function vs(r){return this.__data__.get(r)}var nn=vs;a();s();function As(r){return this.__data__.has(r)}var on=As;a();s();var bs=200;function _s(r,t){var e=this.__data__;if(e instanceof ne){var n=e.__data__;if(!ie||n.length<bs-1)return n.push([r,t]),this.size=++e.size,this;e=this.__data__=new it(n)}return e.set(r,t),this.size=e.size,this}var an=_s;function Ce(r){var t=this.__data__=new ne(r);this.size=t.size}Ce.prototype.clear=tn;Ce.prototype.delete=rn;Ce.prototype.get=nn;Ce.prototype.has=on;Ce.prototype.set=an;var ot=Ce;a();s();a();s();function Es(r,t){for(var e=-1,n=r==null?0:r.length,i=0,o=[];++e<n;){var p=r[e];t(p,e,r)&&(o[i++]=p)}return o}var sn=Es;a();s();function Is(){return[]}var fn=Is;var Ls=Object.prototype,Ns=Ls.propertyIsEnumerable,pn=Object.getOwnPropertySymbols,Ss=pn?function(r){return r==null?[]:(r=Object(r),sn(pn(r),function(t){return Ns.call(r,t)}))}:fn,un=Ss;a();s();a();s();function Cs(r,t,e){var n=t(r);return he(r)?n:en(n,e(r))}var ln=Cs;function Rs(r){return ln(r,Mr,un)}var It=Rs;a();s();a();s();var Os=O(_,"DataView"),at=Os;a();s();var Ps=O(_,"Promise"),st=Ps;a();s();var Us=O(_,"Set"),ae=Us;var cn="[object Map]",Bs="[object Object]",mn="[object Promise]",dn="[object Set]",hn="[object WeakMap]",xn="[object DataView]",ks=z(at),Ms=z(ie),Ds=z(st),Fs=z(ae),js=z(et),xe=Y;(at&&xe(new at(new ArrayBuffer(1)))!=xn||ie&&xe(new ie)!=cn||st&&xe(st.resolve())!=mn||ae&&xe(new ae)!=dn||et&&xe(new et)!=hn)&&(xe=function(r){var t=Y(r),e=t==Bs?r.constructor:void 0,n=e?z(e):"";if(n)switch(n){case ks:return xn;case Ms:return cn;case Ds:return mn;case Fs:return dn;case js:return hn}return t});var Lt=xe;a();s();var $s=_.Uint8Array,Nt=$s;a();s();a();s();a();s();a();s();a();s();var Ws="__lodash_hash_undefined__";function Ys(r){return this.__data__.set(r,Ws),this}var yn=Ys;a();s();function Gs(r){return this.__data__.has(r)}var wn=Gs;function ft(r){var t=-1,e=r==null?0:r.length;for(this.__data__=new it;++t<e;)this.add(r[t])}ft.prototype.add=ft.prototype.push=yn;ft.prototype.has=wn;var pt=ft;a();s();function zs(r,t){for(var e=-1,n=r==null?0:r.length;++e<n;)if(t(r[e],e,r))return!0;return!1}var gn=zs;a();s();function qs(r,t){return r.has(t)}var ut=qs;var Vs=1,Hs=2;function Ks(r,t,e,n,i,o){var p=e&Vs,l=r.length,m=t.length;if(l!=m&&!(p&&m>l))return!1;var d=o.get(r),h=o.get(t);if(d&&h)return d==t&&h==r;var x=-1,g=!0,v=e&Hs?new pt:void 0;for(o.set(r,t),o.set(t,r);++x<l;){var A=r[x],N=t[x];if(n)var Z=p?n(N,A,x,t,r,o):n(A,N,x,r,t,o);if(Z!==void 0){if(Z)continue;g=!1;break}if(v){if(!gn(t,function(ue,le){if(!ut(v,le)&&(A===ue||i(A,ue,e,n,o)))return v.push(le)})){g=!1;break}}else if(!(A===N||i(A,N,e,n,o))){g=!1;break}}return o.delete(r),o.delete(t),g}var lt=Ks;a();s();a();s();function Js(r){var t=-1,e=Array(r.size);return r.forEach(function(n,i){e[++t]=[i,n]}),e}var Tn=Js;a();s();function Qs(r){var t=-1,e=Array(r.size);return r.forEach(function(n){e[++t]=n}),e}var Re=Qs;var Xs=1,Zs=2,ef="[object Boolean]",tf="[object Date]",rf="[object Error]",nf="[object Map]",of="[object Number]",af="[object RegExp]",sf="[object Set]",ff="[object String]",pf="[object Symbol]",uf="[object ArrayBuffer]",lf="[object DataView]",vn=W?W.prototype:void 0,St=vn?vn.valueOf:void 0;function cf(r,t,e,n,i,o,p){switch(e){case lf:if(r.byteLength!=t.byteLength||r.byteOffset!=t.byteOffset)return!1;r=r.buffer,t=t.buffer;case uf:return!(r.byteLength!=t.byteLength||!o(new Nt(r),new Nt(t)));case ef:case tf:case of:return tt(+r,+t);case rf:return r.name==t.name&&r.message==t.message;case af:case ff:return r==t+"";case nf:var l=Tn;case sf:var m=n&Xs;if(l||(l=Re),r.size!=t.size&&!m)return!1;var d=p.get(r);if(d)return d==t;n|=Zs,p.set(r,t);var h=lt(l(r),l(t),n,i,o,p);return p.delete(r),h;case pf:if(St)return St.call(r)==St.call(t)}return!1}var An=cf;a();s();var mf=1,df=Object.prototype,hf=df.hasOwnProperty;function xf(r,t,e,n,i,o){var p=e&mf,l=It(r),m=l.length,d=It(t),h=d.length;if(m!=h&&!p)return!1;for(var x=m;x--;){var g=l[x];if(!(p?g in t:hf.call(t,g)))return!1}var v=o.get(r),A=o.get(t);if(v&&A)return v==t&&A==r;var N=!0;o.set(r,t),o.set(t,r);for(var Z=p;++x<m;){g=l[x];var ue=r[g],le=t[g];if(n)var Ot=p?n(le,ue,g,t,r,o):n(ue,le,g,r,t,o);if(!(Ot===void 0?ue===le||i(ue,le,e,n,o):Ot)){N=!1;break}Z||(Z=g=="constructor")}if(N&&!Z){var je=r.constructor,$e=t.constructor;je!=$e&&"constructor"in r&&"constructor"in t&&!(typeof je=="function"&&je instanceof je&&typeof $e=="function"&&$e instanceof $e)&&(N=!1)}return o.delete(r),o.delete(t),N}var bn=xf;var yf=1,_n="[object Arguments]",En="[object Array]",ct="[object Object]",wf=Object.prototype,In=wf.hasOwnProperty;function gf(r,t,e,n,i,o){var p=he(r),l=he(t),m=p?En:Lt(r),d=l?En:Lt(t);m=m==_n?ct:m,d=d==_n?ct:d;var h=m==ct,x=d==ct,g=m==d;if(g&&ke(r)){if(!ke(t))return!1;p=!0,h=!1}if(g&&!h)return o||(o=new ot),p||nt(r)?lt(r,t,e,n,i,o):An(r,t,m,e,n,i,o);if(!(e&yf)){var v=h&&In.call(r,"__wrapped__"),A=x&&In.call(t,"__wrapped__");if(v||A){var N=v?r.value():r,Z=A?t.value():t;return o||(o=new ot),i(N,Z,e,n,o)}}return g?(o||(o=new ot),bn(r,t,e,n,i,o)):!1}var Ln=gf;function Nn(r,t,e,n,i){return r===t?!0:r==null||t==null||!G(r)&&!G(t)?r!==r&&t!==t:Ln(r,t,e,n,Nn,i)}var Sn=Nn;a();s();function Tf(r,t,e){for(var n=-1,i=r==null?0:r.length;++n<i;)if(e(t,r[n]))return!0;return!1}var Cn=Tf;a();s();function vf(r,t){return Sn(r,t)}var mt=vf;a();s();a();s();var Af=1/0,bf=ae&&1/Re(new ae([,-0]))[1]==Af?function(r){return new ae(r)}:mr,Rn=bf;var _f=200;function Ef(r,t,e){var n=-1,i=wr,o=r.length,p=!0,l=[],m=l;if(e)p=!1,i=Cn;else if(o>=_f){var d=t?null:Rn(r);if(d)return Re(d);p=!1,i=ut,m=new pt}else m=t?[]:l;e:for(;++n<o;){var h=r[n],x=t?t(h):h;if(h=e||h!==0?h:0,p&&x===x){for(var g=m.length;g--;)if(m[g]===x)continue e;t&&m.push(x),l.push(h)}else i(m,x,e)||(m!==l&&m.push(x),l.push(h))}return l}var On=Ef;a();s();function If(r,t){return t=typeof t=="function"?t:void 0,r&&r.length?On(r,void 0,t):[]}var dt=If;a();s();a();s();var V=class{};a();s();a();s();var P=class extends V{constructor(e){super();c(this,"value");this.value=e}write(e){typeof this.value=="string"?e.write(this.value):typeof this.value=="function"?this.value(e):this.value.write(e)}};var Lf=4,De=class{constructor(){c(this,"buffer","");c(this,"indentLevel",0);c(this,"hasWrittenAnything",!1);c(this,"lastCharacterIsSemicolon",!1);c(this,"lastCharacterIsNewline",!1)}write(t){let e=t.length>0&&t.endsWith(`
|
|
2
|
-
`),
|
|
1
|
+
"use strict";var ze=Object.defineProperty,ei=Object.defineProperties,ti=Object.getOwnPropertyDescriptor,ri=Object.getOwnPropertyDescriptors,ni=Object.getOwnPropertyNames,$t=Object.getOwnPropertySymbols;var Wt=Object.prototype.hasOwnProperty,ii=Object.prototype.propertyIsEnumerable;var vt=(r,t,e)=>t in r?ze(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Be=(r,t)=>{for(var e in t||(t={}))Wt.call(t,e)&&vt(r,e,t[e]);if($t)for(var e of $t(t))ii.call(t,e)&&vt(r,e,t[e]);return r},Ue=(r,t)=>ei(r,ri(t));var At=(r,t)=>()=>(r&&(t=r(r=0)),t);var Gt=(r,t)=>{for(var e in t)ze(r,e,{get:t[e],enumerable:!0})},oi=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ni(t))!Wt.call(r,i)&&i!==e&&ze(r,i,{get:()=>t[i],enumerable:!(n=ti(t,i))||n.enumerable});return r};var ai=r=>oi(ze({},"__esModule",{value:!0}),r);var c=(r,t,e)=>vt(r,typeof t!="symbol"?t+"":t,e);function zt(){throw new Error("setTimeout has not been defined")}function Vt(){throw new Error("clearTimeout has not been defined")}function qt(r){if(re===setTimeout)return setTimeout(r,0);if((re===zt||!re)&&setTimeout)return re=setTimeout,setTimeout(r,0);try{return re(r,0)}catch(t){try{return re.call(null,r,0)}catch(e){return re.call(this,r,0)}}}function si(r){if(ne===clearTimeout)return clearTimeout(r);if((ne===Vt||!ne)&&clearTimeout)return ne=clearTimeout,clearTimeout(r);try{return ne(r)}catch(t){try{return ne.call(null,r)}catch(e){return ne.call(this,r)}}}function fi(){!Ie||!he||(Ie=!1,he.length?W=he.concat(W):Ve=-1,W.length&&Ht())}function Ht(){if(!Ie){var r=qt(fi);Ie=!0;for(var t=W.length;t;){for(he=W,W=[];++Ve<t;)he&&he[Ve].run();Ve=-1,t=W.length}he=null,Ie=!1,si(r)}}function pi(r){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];W.push(new Kt(r,t)),W.length===1&&!Ie&&qt(Ht)}function Kt(r,t){this.fun=r,this.array=t}function de(){}function Si(r){throw new Error("process.binding is not supported")}function Li(){return"/"}function Ii(r){throw new Error("process.chdir is not supported")}function Ni(){return 0}function Ri(r){var t=Ci.call(Le)*.001,e=Math.floor(t),n=Math.floor(t%1*1e9);return r&&(e=e-r[0],n=n-r[1],n<0&&(e--,n+=1e9)),[e,n]}function Oi(){var r=new Date,t=r-ki;return t/1e3}var re,ne,W,Ie,he,Ve,li,ui,ci,mi,hi,di,xi,yi,gi,wi,Ti,vi,Ai,bi,Ei,_i,Le,Ci,ki,l,Yt,a=At(()=>{"use strict";re=zt,ne=Vt;typeof globalThis.setTimeout=="function"&&(re=setTimeout);typeof globalThis.clearTimeout=="function"&&(ne=clearTimeout);W=[],Ie=!1,Ve=-1;Kt.prototype.run=function(){this.fun.apply(null,this.array)};li="browser",ui="browser",ci=!0,mi={},hi=[],di="",xi={},yi={},gi={};wi=de,Ti=de,vi=de,Ai=de,bi=de,Ei=de,_i=de;Le=globalThis.performance||{},Ci=Le.now||Le.mozNow||Le.msNow||Le.oNow||Le.webkitNow||function(){return new Date().getTime()};ki=new Date;l={nextTick:pi,title:li,browser:ci,env:mi,argv:hi,version:di,versions:xi,on:wi,addListener:Ti,once:vi,off:Ai,removeListener:bi,removeAllListeners:Ei,emit:_i,binding:Si,cwd:Li,chdir:Ii,umask:Ni,hrtime:Ri,platform:ui,release:yi,config:gi,uptime:Oi},Yt={};Object.keys(Yt).forEach(r=>{let t=r.split("."),e=l;for(let n=0;n<t.length;n++){let i=t[n];n===t.length-1?e[i]=Yt[r]:e=e[i]||(e[i]={})}})});function Zt(){Et=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,e=r.length;t<e;++t)M[t]=r[t],R[r.charCodeAt(t)]=t;R[45]=62,R[95]=63}function Bi(r){Et||Zt();var t,e,n,i,o,p,u=r.length;if(u%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=r[u-2]==="="?2:r[u-1]==="="?1:0,p=new Pi(u*3/4-o),n=o>0?u-4:u;var m=0;for(t=0,e=0;t<n;t+=4,e+=3)i=R[r.charCodeAt(t)]<<18|R[r.charCodeAt(t+1)]<<12|R[r.charCodeAt(t+2)]<<6|R[r.charCodeAt(t+3)],p[m++]=i>>16&255,p[m++]=i>>8&255,p[m++]=i&255;return o===2?(i=R[r.charCodeAt(t)]<<2|R[r.charCodeAt(t+1)]>>4,p[m++]=i&255):o===1&&(i=R[r.charCodeAt(t)]<<10|R[r.charCodeAt(t+1)]<<4|R[r.charCodeAt(t+2)]>>2,p[m++]=i>>8&255,p[m++]=i&255),p}function Ui(r){return M[r>>18&63]+M[r>>12&63]+M[r>>6&63]+M[r&63]}function Mi(r,t,e){for(var n,i=[],o=t;o<e;o+=3)n=(r[o]<<16)+(r[o+1]<<8)+r[o+2],i.push(Ui(n));return i.join("")}function Jt(r){Et||Zt();for(var t,e=r.length,n=e%3,i="",o=[],p=16383,u=0,m=e-n;u<m;u+=p)o.push(Mi(r,u,u+p>m?m:u+p));return n===1?(t=r[e-1],i+=M[t>>2],i+=M[t<<4&63],i+="=="):n===2&&(t=(r[e-2]<<8)+r[e-1],i+=M[t>>10],i+=M[t>>4&63],i+=M[t<<2&63],i+="="),o.push(i),o.join("")}function qe(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function G(r,t){if(qe()<t)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(t),r.__proto__=f.prototype):(r===null&&(r=new f(t)),r.length=t),r}function f(r,t,e){if(!f.TYPED_ARRAY_SUPPORT&&!(this instanceof f))return new f(r,t,e);if(typeof r=="number"){if(typeof t=="string")throw new Error("If encoding is specified then the first argument must be a string");return _t(this,r)}return er(this,r,t,e)}function er(r,t,e,n){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&t instanceof ArrayBuffer?ji(r,t,e,n):typeof t=="string"?Fi(r,t,e):$i(r,t)}function tr(r){if(typeof r!="number")throw new TypeError('"size" argument must be a number');if(r<0)throw new RangeError('"size" argument must not be negative')}function Di(r,t,e,n){return tr(t),t<=0?G(r,t):e!==void 0?typeof n=="string"?G(r,t).fill(e,n):G(r,t).fill(e):G(r,t)}function _t(r,t){if(tr(t),r=G(r,t<0?0:St(t)|0),!f.TYPED_ARRAY_SUPPORT)for(var e=0;e<t;++e)r[e]=0;return r}function Fi(r,t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!f.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=rr(t,e)|0;r=G(r,n);var i=r.write(t,e);return i!==n&&(r=r.slice(0,i)),r}function bt(r,t){var e=t.length<0?0:St(t.length)|0;r=G(r,e);for(var n=0;n<e;n+=1)r[n]=t[n]&255;return r}function ji(r,t,e,n){if(t.byteLength,e<0||t.byteLength<e)throw new RangeError("'offset' is out of bounds");if(t.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return e===void 0&&n===void 0?t=new Uint8Array(t):n===void 0?t=new Uint8Array(t,e):t=new Uint8Array(t,e,n),f.TYPED_ARRAY_SUPPORT?(r=t,r.__proto__=f.prototype):r=bt(r,t),r}function $i(r,t){if(D(t)){var e=St(t.length)|0;return r=G(r,e),r.length===0||t.copy(r,0,0,e),r}if(t){if(typeof ArrayBuffer!="undefined"&&t.buffer instanceof ArrayBuffer||"length"in t)return typeof t.length!="number"||ao(t.length)?G(r,0):bt(r,t);if(t.type==="Buffer"&&Array.isArray(t.data))return bt(r,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function St(r){if(r>=qe())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+qe().toString(16)+" bytes");return r|0}function D(r){return!!(r!=null&&r._isBuffer)}function rr(r,t){if(D(r))return r.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(r)||r instanceof ArrayBuffer))return r.byteLength;typeof r!="string"&&(r=""+r);var e=r.length;if(e===0)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return He(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return pr(r).length;default:if(n)return He(r).length;t=(""+t).toLowerCase(),n=!0}}function Wi(r,t,e){var n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,t>>>=0,e<=t))return"";for(r||(r="utf8");;)switch(r){case"hex":return Xi(this,t,e);case"utf8":case"utf-8":return or(this,t,e);case"ascii":return Ji(this,t,e);case"latin1":case"binary":return Qi(this,t,e);case"base64":return Hi(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Zi(this,t,e);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}function xe(r,t,e){var n=r[t];r[t]=r[e],r[e]=n}function nr(r,t,e,n,i){if(r.length===0)return-1;if(typeof e=="string"?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:r.length-1),e<0&&(e=r.length+e),e>=r.length){if(i)return-1;e=r.length-1}else if(e<0)if(i)e=0;else return-1;if(typeof t=="string"&&(t=f.from(t,n)),D(t))return t.length===0?-1:Qt(r,t,e,n,i);if(typeof t=="number")return t=t&255,f.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,t,e):Uint8Array.prototype.lastIndexOf.call(r,t,e):Qt(r,[t],e,n,i);throw new TypeError("val must be string, number or Buffer")}function Qt(r,t,e,n,i){var o=1,p=r.length,u=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||t.length<2)return-1;o=2,p/=2,u/=2,e/=2}function m(T,A){return o===1?T[A]:T.readUInt16BE(A*o)}var h;if(i){var d=-1;for(h=e;h<p;h++)if(m(r,h)===m(t,d===-1?0:h-d)){if(d===-1&&(d=h),h-d+1===u)return d*o}else d!==-1&&(h-=h-d),d=-1}else for(e+u>p&&(e=p-u),h=e;h>=0;h--){for(var x=!0,y=0;y<u;y++)if(m(r,h+y)!==m(t,y)){x=!1;break}if(x)return h}return-1}function Gi(r,t,e,n){e=Number(e)||0;var i=r.length-e;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 p=0;p<n;++p){var u=parseInt(t.substr(p*2,2),16);if(isNaN(u))return p;r[e+p]=u}return p}function Yi(r,t,e,n){return Qe(He(t,r.length-e),r,e,n)}function ir(r,t,e,n){return Qe(io(t),r,e,n)}function zi(r,t,e,n){return ir(r,t,e,n)}function Vi(r,t,e,n){return Qe(pr(t),r,e,n)}function qi(r,t,e,n){return Qe(oo(t,r.length-e),r,e,n)}function Hi(r,t,e){return t===0&&e===r.length?Jt(r):Jt(r.slice(t,e))}function or(r,t,e){e=Math.min(r.length,e);for(var n=[],i=t;i<e;){var o=r[i],p=null,u=o>239?4:o>223?3:o>191?2:1;if(i+u<=e){var m,h,d,x;switch(u){case 1:o<128&&(p=o);break;case 2:m=r[i+1],(m&192)===128&&(x=(o&31)<<6|m&63,x>127&&(p=x));break;case 3:m=r[i+1],h=r[i+2],(m&192)===128&&(h&192)===128&&(x=(o&15)<<12|(m&63)<<6|h&63,x>2047&&(x<55296||x>57343)&&(p=x));break;case 4:m=r[i+1],h=r[i+2],d=r[i+3],(m&192)===128&&(h&192)===128&&(d&192)===128&&(x=(o&15)<<18|(m&63)<<12|(h&63)<<6|d&63,x>65535&&x<1114112&&(p=x))}}p===null?(p=65533,u=1):p>65535&&(p-=65536,n.push(p>>>10&1023|55296),p=56320|p&1023),n.push(p),i+=u}return Ki(n)}function Ki(r){var t=r.length;if(t<=Xt)return String.fromCharCode.apply(String,r);for(var e="",n=0;n<t;)e+=String.fromCharCode.apply(String,r.slice(n,n+=Xt));return e}function Ji(r,t,e){var n="";e=Math.min(r.length,e);for(var i=t;i<e;++i)n+=String.fromCharCode(r[i]&127);return n}function Qi(r,t,e){var n="";e=Math.min(r.length,e);for(var i=t;i<e;++i)n+=String.fromCharCode(r[i]);return n}function Xi(r,t,e){var n=r.length;(!t||t<0)&&(t=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=t;o<e;++o)i+=no(r[o]);return i}function Zi(r,t,e){for(var n=r.slice(t,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}function b(r,t,e){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+t>e)throw new RangeError("Trying to access beyond buffer length")}function I(r,t,e,n,i,o){if(!D(r))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(e+n>r.length)throw new RangeError("Index out of range")}function Ke(r,t,e,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(r.length-e,2);i<o;++i)r[e+i]=(t&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}function Je(r,t,e,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(r.length-e,4);i<o;++i)r[e+i]=t>>>(n?i:3-i)*8&255}function ar(r,t,e,n,i,o){if(e+n>r.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function sr(r,t,e,n,i){return i||ar(r,t,e,4,34028234663852886e22,-34028234663852886e22),ur(r,t,e,n,23,4),e+4}function fr(r,t,e,n,i){return i||ar(r,t,e,8,17976931348623157e292,-17976931348623157e292),ur(r,t,e,n,52,8),e+8}function to(r){if(r=ro(r).replace(eo,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function ro(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function no(r){return r<16?"0"+r.toString(16):r.toString(16)}function He(r,t){t=t||1/0;for(var e,n=r.length,i=null,o=[],p=0;p<n;++p){if(e=r.charCodeAt(p),e>55295&&e<57344){if(!i){if(e>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(p+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(t-=3)>-1&&o.push(239,191,189),i=e;continue}e=(i-55296<<10|e-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((t-=1)<0)break;o.push(e)}else if(e<2048){if((t-=2)<0)break;o.push(e>>6|192,e&63|128)}else if(e<65536){if((t-=3)<0)break;o.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((t-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return o}function io(r){for(var t=[],e=0;e<r.length;++e)t.push(r.charCodeAt(e)&255);return t}function oo(r,t){for(var e,n,i,o=[],p=0;p<r.length&&!((t-=2)<0);++p)e=r.charCodeAt(p),n=e>>8,i=e%256,o.push(i),o.push(n);return o}function pr(r){return Bi(to(r))}function Qe(r,t,e,n){for(var i=0;i<n&&!(i+e>=t.length||i>=r.length);++i)t[i+e]=r[i];return i}function ao(r){return r!==r}function so(r){return r!=null&&(!!r._isBuffer||lr(r)||fo(r))}function lr(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function fo(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&lr(r.slice(0,0))}function Xe(r,t,e,n,i){var o,p,u=i*8-n-1,m=(1<<u)-1,h=m>>1,d=-7,x=e?i-1:0,y=e?-1:1,T=r[t+x];for(x+=y,o=T&(1<<-d)-1,T>>=-d,d+=u;d>0;o=o*256+r[t+x],x+=y,d-=8);for(p=o&(1<<-d)-1,o>>=-d,d+=n;d>0;p=p*256+r[t+x],x+=y,d-=8);if(o===0)o=1-h;else{if(o===m)return p?NaN:(T?-1:1)*(1/0);p=p+Math.pow(2,n),o=o-h}return(T?-1:1)*p*Math.pow(2,o-n)}function ur(r,t,e,n,i,o){var p,u,m,h=o*8-i-1,d=(1<<h)-1,x=d>>1,y=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,T=n?0:o-1,A=n?1:-1,S=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,p=d):(p=Math.floor(Math.log(t)/Math.LN2),t*(m=Math.pow(2,-p))<1&&(p--,m*=2),p+x>=1?t+=y/m:t+=y*Math.pow(2,1-x),t*m>=2&&(p++,m/=2),p+x>=d?(u=0,p=d):p+x>=1?(u=(t*m-1)*Math.pow(2,i),p=p+x):(u=t*Math.pow(2,x-1)*Math.pow(2,i),p=0));i>=8;r[e+T]=u&255,T+=A,u/=256,i-=8);for(p=p<<i|u,h+=i;h>0;r[e+T]=p&255,T+=A,p/=256,h-=8);r[e+T-A]|=S*128}var M,R,Pi,Et,Xt,eo,cr=At(()=>{"use strict";a();s();M=[],R=[],Pi=typeof Uint8Array!="undefined"?Uint8Array:Array,Et=!1;f.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;f.poolSize=8192;f._augment=function(r){return r.__proto__=f.prototype,r};f.from=function(r,t,e){return er(null,r,t,e)};f.kMaxLength=qe();f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&f[Symbol.species]);f.alloc=function(r,t,e){return Di(null,r,t,e)};f.allocUnsafe=function(r){return _t(null,r)};f.allocUnsafeSlow=function(r){return _t(null,r)};f.isBuffer=so;f.compare=function(t,e){if(!D(t)||!D(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,i=e.length,o=0,p=Math.min(n,i);o<p;++o)if(t[o]!==e[o]){n=t[o],i=e[o];break}return n<i?-1:i<n?1:0};f.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}};f.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return f.alloc(0);var n;if(e===void 0)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var i=f.allocUnsafe(e),o=0;for(n=0;n<t.length;++n){var p=t[n];if(!D(p))throw new TypeError('"list" argument must be an Array of Buffers');p.copy(i,o),o+=p.length}return i};f.byteLength=rr;f.prototype._isBuffer=!0;f.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 e=0;e<t;e+=2)xe(this,e,e+1);return this};f.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 e=0;e<t;e+=4)xe(this,e,e+3),xe(this,e+1,e+2);return this};f.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 e=0;e<t;e+=8)xe(this,e,e+7),xe(this,e+1,e+6),xe(this,e+2,e+5),xe(this,e+3,e+4);return this};f.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?or(this,0,t):Wi.apply(this,arguments)};f.prototype.equals=function(t){if(!D(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:f.compare(this,t)===0};f.prototype.compare=function(t,e,n,i,o){if(!D(t))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),e<0||n>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&e>=n)return 0;if(i>=o)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,i>>>=0,o>>>=0,this===t)return 0;for(var p=o-i,u=n-e,m=Math.min(p,u),h=this.slice(i,o),d=t.slice(e,n),x=0;x<m;++x)if(h[x]!==d[x]){p=h[x],u=d[x];break}return p<u?-1:u<p?1:0};f.prototype.includes=function(t,e,n){return this.indexOf(t,e,n)!==-1};f.prototype.indexOf=function(t,e,n){return nr(this,t,e,n,!0)};f.prototype.lastIndexOf=function(t,e,n){return nr(this,t,e,n,!1)};f.prototype.write=function(t,e,n,i){if(e===void 0)i="utf8",n=this.length,e=0;else if(n===void 0&&typeof e=="string")i=e,n=this.length,e=0;else if(isFinite(e))e=e|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-e;if((n===void 0||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var p=!1;;)switch(i){case"hex":return Gi(this,t,e,n);case"utf8":case"utf-8":return Yi(this,t,e,n);case"ascii":return ir(this,t,e,n);case"latin1":case"binary":return zi(this,t,e,n);case"base64":return Vi(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return qi(this,t,e,n);default:if(p)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),p=!0}};f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};Xt=4096;f.prototype.slice=function(t,e){var n=this.length;t=~~t,e=e===void 0?n:~~e,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),e<t&&(e=t);var i;if(f.TYPED_ARRAY_SUPPORT)i=this.subarray(t,e),i.__proto__=f.prototype;else{var o=e-t;i=new f(o,void 0);for(var p=0;p<o;++p)i[p]=this[p+t]}return i};f.prototype.readUIntLE=function(t,e,n){t=t|0,e=e|0,n||b(t,e,this.length);for(var i=this[t],o=1,p=0;++p<e&&(o*=256);)i+=this[t+p]*o;return i};f.prototype.readUIntBE=function(t,e,n){t=t|0,e=e|0,n||b(t,e,this.length);for(var i=this[t+--e],o=1;e>0&&(o*=256);)i+=this[t+--e]*o;return i};f.prototype.readUInt8=function(t,e){return e||b(t,1,this.length),this[t]};f.prototype.readUInt16LE=function(t,e){return e||b(t,2,this.length),this[t]|this[t+1]<<8};f.prototype.readUInt16BE=function(t,e){return e||b(t,2,this.length),this[t]<<8|this[t+1]};f.prototype.readUInt32LE=function(t,e){return e||b(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};f.prototype.readUInt32BE=function(t,e){return e||b(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};f.prototype.readIntLE=function(t,e,n){t=t|0,e=e|0,n||b(t,e,this.length);for(var i=this[t],o=1,p=0;++p<e&&(o*=256);)i+=this[t+p]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i};f.prototype.readIntBE=function(t,e,n){t=t|0,e=e|0,n||b(t,e,this.length);for(var i=e,o=1,p=this[t+--i];i>0&&(o*=256);)p+=this[t+--i]*o;return o*=128,p>=o&&(p-=Math.pow(2,8*e)),p};f.prototype.readInt8=function(t,e){return e||b(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};f.prototype.readInt16LE=function(t,e){e||b(t,2,this.length);var n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};f.prototype.readInt16BE=function(t,e){e||b(t,2,this.length);var n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};f.prototype.readInt32LE=function(t,e){return e||b(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};f.prototype.readInt32BE=function(t,e){return e||b(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};f.prototype.readFloatLE=function(t,e){return e||b(t,4,this.length),Xe(this,t,!0,23,4)};f.prototype.readFloatBE=function(t,e){return e||b(t,4,this.length),Xe(this,t,!1,23,4)};f.prototype.readDoubleLE=function(t,e){return e||b(t,8,this.length),Xe(this,t,!0,52,8)};f.prototype.readDoubleBE=function(t,e){return e||b(t,8,this.length),Xe(this,t,!1,52,8)};f.prototype.writeUIntLE=function(t,e,n,i){if(t=+t,e=e|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;I(this,t,e,n,o,0)}var p=1,u=0;for(this[e]=t&255;++u<n&&(p*=256);)this[e+u]=t/p&255;return e+n};f.prototype.writeUIntBE=function(t,e,n,i){if(t=+t,e=e|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;I(this,t,e,n,o,0)}var p=n-1,u=1;for(this[e+p]=t&255;--p>=0&&(u*=256);)this[e+p]=t/u&255;return e+n};f.prototype.writeUInt8=function(t,e,n){return t=+t,e=e|0,n||I(this,t,e,1,255,0),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=t&255,e+1};f.prototype.writeUInt16LE=function(t,e,n){return t=+t,e=e|0,n||I(this,t,e,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):Ke(this,t,e,!0),e+2};f.prototype.writeUInt16BE=function(t,e,n){return t=+t,e=e|0,n||I(this,t,e,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):Ke(this,t,e,!1),e+2};f.prototype.writeUInt32LE=function(t,e,n){return t=+t,e=e|0,n||I(this,t,e,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t&255):Je(this,t,e,!0),e+4};f.prototype.writeUInt32BE=function(t,e,n){return t=+t,e=e|0,n||I(this,t,e,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):Je(this,t,e,!1),e+4};f.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*n-1);I(this,t,e,n,o-1,-o)}var p=0,u=1,m=0;for(this[e]=t&255;++p<n&&(u*=256);)t<0&&m===0&&this[e+p-1]!==0&&(m=1),this[e+p]=(t/u>>0)-m&255;return e+n};f.prototype.writeIntBE=function(t,e,n,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*n-1);I(this,t,e,n,o-1,-o)}var p=n-1,u=1,m=0;for(this[e+p]=t&255;--p>=0&&(u*=256);)t<0&&m===0&&this[e+p+1]!==0&&(m=1),this[e+p]=(t/u>>0)-m&255;return e+n};f.prototype.writeInt8=function(t,e,n){return t=+t,e=e|0,n||I(this,t,e,1,127,-128),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=t&255,e+1};f.prototype.writeInt16LE=function(t,e,n){return t=+t,e=e|0,n||I(this,t,e,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):Ke(this,t,e,!0),e+2};f.prototype.writeInt16BE=function(t,e,n){return t=+t,e=e|0,n||I(this,t,e,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):Ke(this,t,e,!1),e+2};f.prototype.writeInt32LE=function(t,e,n){return t=+t,e=e|0,n||I(this,t,e,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):Je(this,t,e,!0),e+4};f.prototype.writeInt32BE=function(t,e,n){return t=+t,e=e|0,n||I(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):Je(this,t,e,!1),e+4};f.prototype.writeFloatLE=function(t,e,n){return sr(this,t,e,!0,n)};f.prototype.writeFloatBE=function(t,e,n){return sr(this,t,e,!1,n)};f.prototype.writeDoubleLE=function(t,e,n){return fr(this,t,e,!0,n)};f.prototype.writeDoubleBE=function(t,e,n){return fr(this,t,e,!1,n)};f.prototype.copy=function(t,e,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<n&&(i=n),i===n||t.length===0||this.length===0)return 0;if(e<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-e<i-n&&(i=t.length-e+n);var o=i-n,p;if(this===t&&n<e&&e<i)for(p=o-1;p>=0;--p)t[p+e]=this[p+n];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(p=0;p<o;++p)t[p+e]=this[p+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o};f.prototype.fill=function(t,e,n,i){if(typeof t=="string"){if(typeof e=="string"?(i=e,e=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"&&!f.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof t=="number"&&(t=t&255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;e=e>>>0,n=n===void 0?this.length:n>>>0,t||(t=0);var p;if(typeof t=="number")for(p=e;p<n;++p)this[p]=t;else{var u=D(t)?t:He(new f(t,i).toString()),m=u.length;for(p=0;p<n-e;++p)this[p+e]=u[p%m]}return this};eo=/[^+\/0-9A-Za-z-_]/g});var s=At(()=>{"use strict";cr()});var hp={};Gt(hp,{DynamicTypeLiteralMapper:()=>Ft});module.exports=ai(hp);a();s();a();s();a();s();function N(r){throw new Error("Unexpected value: "+JSON.stringify(r))}a();s();a();s();a();s();a();s();a();s();var po=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,Ze=po;var lo=typeof self=="object"&&self&&self.Object===Object&&self,uo=Ze||lo||Function("return this")(),E=uo;var co=E.Symbol,Y=co;a();s();var mr=Object.prototype,mo=mr.hasOwnProperty,ho=mr.toString,Me=Y?Y.toStringTag:void 0;function xo(r){var t=mo.call(r,Me),e=r[Me];try{r[Me]=void 0;var n=!0}catch(o){}var i=ho.call(r);return n&&(t?r[Me]=e:delete r[Me]),i}var hr=xo;a();s();var yo=Object.prototype,go=yo.toString;function wo(r){return go.call(r)}var dr=wo;var To="[object Null]",vo="[object Undefined]",xr=Y?Y.toStringTag:void 0;function Ao(r){return r==null?r===void 0?vo:To:xr&&xr in Object(r)?hr(r):dr(r)}var z=Ao;a();s();function bo(r){return r!=null&&typeof r=="object"}var V=bo;a();s();var Eo=Array.isArray,ye=Eo;a();s();function _o(r){var t=typeof r;return r!=null&&(t=="object"||t=="function")}var et=_o;a();s();a();s();a();s();a();s();var So="[object AsyncFunction]",Lo="[object Function]",Io="[object GeneratorFunction]",No="[object Proxy]";function Co(r){if(!et(r))return!1;var t=z(r);return t==Lo||t==Io||t==So||t==No}var tt=Co;a();s();a();s();var Ro=E["__core-js_shared__"],rt=Ro;var yr=(function(){var r=/[^.]+$/.exec(rt&&rt.keys&&rt.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function ko(r){return!!yr&&yr in r}var gr=ko;a();s();var Oo=Function.prototype,Po=Oo.toString;function Bo(r){if(r!=null){try{return Po.call(r)}catch(t){}try{return r+""}catch(t){}}return""}var q=Bo;var Uo=/[\\^$.*+?()[\]{}|]/g,Mo=/^\[object .+?Constructor\]$/,Do=Function.prototype,Fo=Object.prototype,jo=Do.toString,$o=Fo.hasOwnProperty,Wo=RegExp("^"+jo.call($o).replace(Uo,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Go(r){if(!et(r)||gr(r))return!1;var t=tt(r)?Wo:Mo;return t.test(q(r))}var wr=Go;a();s();function Yo(r,t){return r==null?void 0:r[t]}var Tr=Yo;function zo(r,t){var e=Tr(r,t);return wr(e)?e:void 0}var k=zo;var Vo=k(E,"WeakMap"),nt=Vo;a();s();function qo(){}var vr=qo;a();s();a();s();a();s();function Ho(r,t,e,n){for(var i=r.length,o=e+(n?1:-1);n?o--:++o<i;)if(t(r[o],o,r))return o;return-1}var Ar=Ho;a();s();function Ko(r){return r!==r}var br=Ko;a();s();function Jo(r,t,e){for(var n=e-1,i=r.length;++n<i;)if(r[n]===t)return n;return-1}var Er=Jo;function Qo(r,t,e){return t===t?Er(r,t,e):Ar(r,br,e)}var _r=Qo;function Xo(r,t){var e=r==null?0:r.length;return!!e&&_r(r,t,0)>-1}var Sr=Xo;a();s();var Zo=9007199254740991,ea=/^(?:0|[1-9]\d*)$/;function ta(r,t){var e=typeof r;return t=t==null?Zo:t,!!t&&(e=="number"||e!="symbol"&&ea.test(r))&&r>-1&&r%1==0&&r<t}var Lr=ta;a();s();function ra(r,t){return r===t||r!==r&&t!==t}var it=ra;a();s();a();s();var na=9007199254740991;function ia(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=na}var ot=ia;function oa(r){return r!=null&&ot(r.length)&&!tt(r)}var Ir=oa;a();s();var aa=Object.prototype;function sa(r){var t=r&&r.constructor,e=typeof t=="function"&&t.prototype||aa;return r===e}var Nr=sa;a();s();a();s();a();s();function fa(r,t){for(var e=-1,n=Array(r);++e<r;)n[e]=t(e);return n}var Cr=fa;a();s();a();s();var pa="[object Arguments]";function la(r){return V(r)&&z(r)==pa}var Lt=la;var Rr=Object.prototype,ua=Rr.hasOwnProperty,ca=Rr.propertyIsEnumerable,ma=Lt((function(){return arguments})())?Lt:function(r){return V(r)&&ua.call(r,"callee")&&!ca.call(r,"callee")},kr=ma;a();s();a();s();function ha(){return!1}var Or=ha;var Ur=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Pr=Ur&&typeof module=="object"&&module&&!module.nodeType&&module,da=Pr&&Pr.exports===Ur,Br=da?E.Buffer:void 0,xa=Br?Br.isBuffer:void 0,ya=xa||Or,De=ya;a();s();a();s();var ga="[object Arguments]",wa="[object Array]",Ta="[object Boolean]",va="[object Date]",Aa="[object Error]",ba="[object Function]",Ea="[object Map]",_a="[object Number]",Sa="[object Object]",La="[object RegExp]",Ia="[object Set]",Na="[object String]",Ca="[object WeakMap]",Ra="[object ArrayBuffer]",ka="[object DataView]",Oa="[object Float32Array]",Pa="[object Float64Array]",Ba="[object Int8Array]",Ua="[object Int16Array]",Ma="[object Int32Array]",Da="[object Uint8Array]",Fa="[object Uint8ClampedArray]",ja="[object Uint16Array]",$a="[object Uint32Array]",v={};v[Oa]=v[Pa]=v[Ba]=v[Ua]=v[Ma]=v[Da]=v[Fa]=v[ja]=v[$a]=!0;v[ga]=v[wa]=v[Ra]=v[Ta]=v[ka]=v[va]=v[Aa]=v[ba]=v[Ea]=v[_a]=v[Sa]=v[La]=v[Ia]=v[Na]=v[Ca]=!1;function Wa(r){return V(r)&&ot(r.length)&&!!v[z(r)]}var Mr=Wa;a();s();function Ga(r){return function(t){return r(t)}}var Dr=Ga;a();s();var Fr=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Fe=Fr&&typeof module=="object"&&module&&!module.nodeType&&module,Ya=Fe&&Fe.exports===Fr,It=Ya&&Ze.process,za=(function(){try{var r=Fe&&Fe.require&&Fe.require("util").types;return r||It&&It.binding&&It.binding("util")}catch(t){}})(),Nt=za;var jr=Nt&&Nt.isTypedArray,Va=jr?Dr(jr):Mr,at=Va;var qa=Object.prototype,Ha=qa.hasOwnProperty;function Ka(r,t){var e=ye(r),n=!e&&kr(r),i=!e&&!n&&De(r),o=!e&&!n&&!i&&at(r),p=e||n||i||o,u=p?Cr(r.length,String):[],m=u.length;for(var h in r)(t||Ha.call(r,h))&&!(p&&(h=="length"||i&&(h=="offset"||h=="parent")||o&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||Lr(h,m)))&&u.push(h);return u}var $r=Ka;a();s();a();s();a();s();function Ja(r,t){return function(e){return r(t(e))}}var Wr=Ja;var Qa=Wr(Object.keys,Object),Gr=Qa;var Xa=Object.prototype,Za=Xa.hasOwnProperty;function es(r){if(!Nr(r))return Gr(r);var t=[];for(var e in Object(r))Za.call(r,e)&&e!="constructor"&&t.push(e);return t}var Yr=es;function ts(r){return Ir(r)?$r(r):Yr(r)}var zr=ts;a();s();a();s();a();s();a();s();a();s();var rs=k(Object,"create"),H=rs;function ns(){this.__data__=H?H(null):{},this.size=0}var Vr=ns;a();s();function is(r){var t=this.has(r)&&delete this.__data__[r];return this.size-=t?1:0,t}var qr=is;a();s();var os="__lodash_hash_undefined__",as=Object.prototype,ss=as.hasOwnProperty;function fs(r){var t=this.__data__;if(H){var e=t[r];return e===os?void 0:e}return ss.call(t,r)?t[r]:void 0}var Hr=fs;a();s();var ps=Object.prototype,ls=ps.hasOwnProperty;function us(r){var t=this.__data__;return H?t[r]!==void 0:ls.call(t,r)}var Kr=us;a();s();var cs="__lodash_hash_undefined__";function ms(r,t){var e=this.__data__;return this.size+=this.has(r)?0:1,e[r]=H&&t===void 0?cs:t,this}var Jr=ms;function Ne(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var n=r[t];this.set(n[0],n[1])}}Ne.prototype.clear=Vr;Ne.prototype.delete=qr;Ne.prototype.get=Hr;Ne.prototype.has=Kr;Ne.prototype.set=Jr;var Ct=Ne;a();s();a();s();function hs(){this.__data__=[],this.size=0}var Qr=hs;a();s();a();s();function ds(r,t){for(var e=r.length;e--;)if(it(r[e][0],t))return e;return-1}var ie=ds;var xs=Array.prototype,ys=xs.splice;function gs(r){var t=this.__data__,e=ie(t,r);if(e<0)return!1;var n=t.length-1;return e==n?t.pop():ys.call(t,e,1),--this.size,!0}var Xr=gs;a();s();function ws(r){var t=this.__data__,e=ie(t,r);return e<0?void 0:t[e][1]}var Zr=ws;a();s();function Ts(r){return ie(this.__data__,r)>-1}var en=Ts;a();s();function vs(r,t){var e=this.__data__,n=ie(e,r);return n<0?(++this.size,e.push([r,t])):e[n][1]=t,this}var tn=vs;function Ce(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var n=r[t];this.set(n[0],n[1])}}Ce.prototype.clear=Qr;Ce.prototype.delete=Xr;Ce.prototype.get=Zr;Ce.prototype.has=en;Ce.prototype.set=tn;var oe=Ce;a();s();var As=k(E,"Map"),ae=As;function bs(){this.size=0,this.__data__={hash:new Ct,map:new(ae||oe),string:new Ct}}var rn=bs;a();s();a();s();a();s();function Es(r){var t=typeof r;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?r!=="__proto__":r===null}var nn=Es;function _s(r,t){var e=r.__data__;return nn(t)?e[typeof t=="string"?"string":"hash"]:e.map}var se=_s;function Ss(r){var t=se(this,r).delete(r);return this.size-=t?1:0,t}var on=Ss;a();s();function Ls(r){return se(this,r).get(r)}var an=Ls;a();s();function Is(r){return se(this,r).has(r)}var sn=Is;a();s();function Ns(r,t){var e=se(this,r),n=e.size;return e.set(r,t),this.size+=e.size==n?0:1,this}var fn=Ns;function Re(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var n=r[t];this.set(n[0],n[1])}}Re.prototype.clear=rn;Re.prototype.delete=on;Re.prototype.get=an;Re.prototype.has=sn;Re.prototype.set=fn;var st=Re;a();s();function Cs(r,t){for(var e=-1,n=t.length,i=r.length;++e<n;)r[i+e]=t[e];return r}var pn=Cs;a();s();a();s();function Rs(){this.__data__=new oe,this.size=0}var ln=Rs;a();s();function ks(r){var t=this.__data__,e=t.delete(r);return this.size=t.size,e}var un=ks;a();s();function Os(r){return this.__data__.get(r)}var cn=Os;a();s();function Ps(r){return this.__data__.has(r)}var mn=Ps;a();s();var Bs=200;function Us(r,t){var e=this.__data__;if(e instanceof oe){var n=e.__data__;if(!ae||n.length<Bs-1)return n.push([r,t]),this.size=++e.size,this;e=this.__data__=new st(n)}return e.set(r,t),this.size=e.size,this}var hn=Us;function ke(r){var t=this.__data__=new oe(r);this.size=t.size}ke.prototype.clear=ln;ke.prototype.delete=un;ke.prototype.get=cn;ke.prototype.has=mn;ke.prototype.set=hn;var ft=ke;a();s();a();s();function Ms(r,t){for(var e=-1,n=r==null?0:r.length,i=0,o=[];++e<n;){var p=r[e];t(p,e,r)&&(o[i++]=p)}return o}var dn=Ms;a();s();function Ds(){return[]}var xn=Ds;var Fs=Object.prototype,js=Fs.propertyIsEnumerable,yn=Object.getOwnPropertySymbols,$s=yn?function(r){return r==null?[]:(r=Object(r),dn(yn(r),function(t){return js.call(r,t)}))}:xn,gn=$s;a();s();a();s();function Ws(r,t,e){var n=t(r);return ye(r)?n:pn(n,e(r))}var wn=Ws;function Gs(r){return wn(r,zr,gn)}var Rt=Gs;a();s();a();s();var Ys=k(E,"DataView"),pt=Ys;a();s();var zs=k(E,"Promise"),lt=zs;a();s();var Vs=k(E,"Set"),fe=Vs;var Tn="[object Map]",qs="[object Object]",vn="[object Promise]",An="[object Set]",bn="[object WeakMap]",En="[object DataView]",Hs=q(pt),Ks=q(ae),Js=q(lt),Qs=q(fe),Xs=q(nt),ge=z;(pt&&ge(new pt(new ArrayBuffer(1)))!=En||ae&&ge(new ae)!=Tn||lt&&ge(lt.resolve())!=vn||fe&&ge(new fe)!=An||nt&&ge(new nt)!=bn)&&(ge=function(r){var t=z(r),e=t==qs?r.constructor:void 0,n=e?q(e):"";if(n)switch(n){case Hs:return En;case Ks:return Tn;case Js:return vn;case Qs:return An;case Xs:return bn}return t});var kt=ge;a();s();var Zs=E.Uint8Array,Ot=Zs;a();s();a();s();a();s();a();s();a();s();var ef="__lodash_hash_undefined__";function tf(r){return this.__data__.set(r,ef),this}var _n=tf;a();s();function rf(r){return this.__data__.has(r)}var Sn=rf;function ut(r){var t=-1,e=r==null?0:r.length;for(this.__data__=new st;++t<e;)this.add(r[t])}ut.prototype.add=ut.prototype.push=_n;ut.prototype.has=Sn;var ct=ut;a();s();function nf(r,t){for(var e=-1,n=r==null?0:r.length;++e<n;)if(t(r[e],e,r))return!0;return!1}var Ln=nf;a();s();function of(r,t){return r.has(t)}var mt=of;var af=1,sf=2;function ff(r,t,e,n,i,o){var p=e&af,u=r.length,m=t.length;if(u!=m&&!(p&&m>u))return!1;var h=o.get(r),d=o.get(t);if(h&&d)return h==t&&d==r;var x=-1,y=!0,T=e&sf?new ct:void 0;for(o.set(r,t),o.set(t,r);++x<u;){var A=r[x],S=t[x];if(n)var U=p?n(S,A,x,t,r,o):n(A,S,x,r,t,o);if(U!==void 0){if(U)continue;y=!1;break}if(T){if(!Ln(t,function(ce,me){if(!mt(T,me)&&(A===ce||i(A,ce,e,n,o)))return T.push(me)})){y=!1;break}}else if(!(A===S||i(A,S,e,n,o))){y=!1;break}}return o.delete(r),o.delete(t),y}var ht=ff;a();s();a();s();function pf(r){var t=-1,e=Array(r.size);return r.forEach(function(n,i){e[++t]=[i,n]}),e}var In=pf;a();s();function lf(r){var t=-1,e=Array(r.size);return r.forEach(function(n){e[++t]=n}),e}var Oe=lf;var uf=1,cf=2,mf="[object Boolean]",hf="[object Date]",df="[object Error]",xf="[object Map]",yf="[object Number]",gf="[object RegExp]",wf="[object Set]",Tf="[object String]",vf="[object Symbol]",Af="[object ArrayBuffer]",bf="[object DataView]",Nn=Y?Y.prototype:void 0,Pt=Nn?Nn.valueOf:void 0;function Ef(r,t,e,n,i,o,p){switch(e){case bf:if(r.byteLength!=t.byteLength||r.byteOffset!=t.byteOffset)return!1;r=r.buffer,t=t.buffer;case Af:return!(r.byteLength!=t.byteLength||!o(new Ot(r),new Ot(t)));case mf:case hf:case yf:return it(+r,+t);case df:return r.name==t.name&&r.message==t.message;case gf:case Tf:return r==t+"";case xf:var u=In;case wf:var m=n&uf;if(u||(u=Oe),r.size!=t.size&&!m)return!1;var h=p.get(r);if(h)return h==t;n|=cf,p.set(r,t);var d=ht(u(r),u(t),n,i,o,p);return p.delete(r),d;case vf:if(Pt)return Pt.call(r)==Pt.call(t)}return!1}var Cn=Ef;a();s();var _f=1,Sf=Object.prototype,Lf=Sf.hasOwnProperty;function If(r,t,e,n,i,o){var p=e&_f,u=Rt(r),m=u.length,h=Rt(t),d=h.length;if(m!=d&&!p)return!1;for(var x=m;x--;){var y=u[x];if(!(p?y in t:Lf.call(t,y)))return!1}var T=o.get(r),A=o.get(t);if(T&&A)return T==t&&A==r;var S=!0;o.set(r,t),o.set(t,r);for(var U=p;++x<m;){y=u[x];var ce=r[y],me=t[y];if(n)var jt=p?n(me,ce,y,t,r,o):n(ce,me,y,r,t,o);if(!(jt===void 0?ce===me||i(ce,me,e,n,o):jt)){S=!1;break}U||(U=y=="constructor")}if(S&&!U){var Ge=r.constructor,Ye=t.constructor;Ge!=Ye&&"constructor"in r&&"constructor"in t&&!(typeof Ge=="function"&&Ge instanceof Ge&&typeof Ye=="function"&&Ye instanceof Ye)&&(S=!1)}return o.delete(r),o.delete(t),S}var Rn=If;var Nf=1,kn="[object Arguments]",On="[object Array]",dt="[object Object]",Cf=Object.prototype,Pn=Cf.hasOwnProperty;function Rf(r,t,e,n,i,o){var p=ye(r),u=ye(t),m=p?On:kt(r),h=u?On:kt(t);m=m==kn?dt:m,h=h==kn?dt:h;var d=m==dt,x=h==dt,y=m==h;if(y&&De(r)){if(!De(t))return!1;p=!0,d=!1}if(y&&!d)return o||(o=new ft),p||at(r)?ht(r,t,e,n,i,o):Cn(r,t,m,e,n,i,o);if(!(e&Nf)){var T=d&&Pn.call(r,"__wrapped__"),A=x&&Pn.call(t,"__wrapped__");if(T||A){var S=T?r.value():r,U=A?t.value():t;return o||(o=new ft),i(S,U,e,n,o)}}return y?(o||(o=new ft),Rn(r,t,e,n,i,o)):!1}var Bn=Rf;function Un(r,t,e,n,i){return r===t?!0:r==null||t==null||!V(r)&&!V(t)?r!==r&&t!==t:Bn(r,t,e,n,Un,i)}var Mn=Un;a();s();function kf(r,t,e){for(var n=-1,i=r==null?0:r.length;++n<i;)if(e(t,r[n]))return!0;return!1}var Dn=kf;a();s();function Of(r,t){return Mn(r,t)}var xt=Of;a();s();a();s();var Pf=1/0,Bf=fe&&1/Oe(new fe([,-0]))[1]==Pf?function(r){return new fe(r)}:vr,Fn=Bf;var Uf=200;function Mf(r,t,e){var n=-1,i=Sr,o=r.length,p=!0,u=[],m=u;if(e)p=!1,i=Dn;else if(o>=Uf){var h=t?null:Fn(r);if(h)return Oe(h);p=!1,i=mt,m=new ct}else m=t?[]:u;e:for(;++n<o;){var d=r[n],x=t?t(d):d;if(d=e||d!==0?d:0,p&&x===x){for(var y=m.length;y--;)if(m[y]===x)continue e;t&&m.push(x),u.push(d)}else i(m,x,e)||(m!==u&&m.push(x),u.push(d))}return u}var jn=Mf;a();s();function Df(r,t){return t=typeof t=="function"?t:void 0,r&&r.length?jn(r,void 0,t):[]}var yt=Df;a();s();a();s();a();s();var $n,Wn,je=(Wn=($n=l.env.FERN_STACK_TRACK)==null?void 0:$n.toLowerCase())!=null?Wn:"",F=je!==""&&je!=="0"&&je!=="false",Bt=["single","multiline","box"].includes(je)?je:"single";F&&(Error.stackTraceLimit=50);var Ff=new Set(["SdkGeneratorCLI","runCli","LoggerImpl","Array.forEach"]),jf=new Set(["stacktrace"]);function wt({maxFrames:r=50,skip:t=0,filterPaths:e=[],filterFunctions:n=[],stopOn:i=[],filterNode:o=!0,filterJs:p=!0,formatFilename:u=m=>m}={}){var h;if(!F)return[];n=[...n,...Ff],e=[...e,...jf],i=[...i,"runInteractiveTask"];let m=!1;return((h=new Error().stack)!=null?h:"").split(`
|
|
2
|
+
`).map(d=>{let x=d.match(/at\s+(.*)\s+\((.*):(\d+):(\d+)\)/);if(x&&x.length===5){let[,y,T,A,S]=x;if(!y||!T||!A||!S)return;if(m||i.some(U=>y==null?void 0:y.includes(U))){m=!0;return}switch(y){case"Object.<anonymous>":y="";break;case"Object.object":case"Object.alias":case"Object.union":case"Object.enum":case"Object.undiscriminatedUnion":y=`${y.substring(y.indexOf(".")+1)}()=> { ... }`;break}return{fn:y,path:u(T),position:`${A}:${S}`}}}).filter(d=>{var x,y;return d&&!n.some(T=>d.fn.includes(T))&&!(o&&((x=d.path)!=null&&x.startsWith("node:")))&&!(p&&((y=d.path)!=null&&y.endsWith(".js")))&&!e.some(T=>d.path.includes(T))}).slice(t,t+r)}var gt=class{constructor({maxFrames:t=50,skip:e=0,filterPaths:n=[],filterFunctions:i=[],stopOn:o=[],filterNode:p=!0,filterJs:u=!0,multiline:m=!1,formatFilename:h=d=>d}={}){c(this,"maxFrames");c(this,"skip");c(this,"filterPaths");c(this,"filterFunctions");c(this,"stopOn");c(this,"filterNode");c(this,"filterJs");c(this,"multiline");c(this,"formatFilename");c(this,"tracking",new WeakMap);this.maxFrames=t,this.skip=e,this.filterPaths=n,this.filterFunctions=i,this.stopOn=o,this.filterNode=p,this.filterJs=u,this.multiline=m,this.formatFilename=h}tag(t){let e=this.tracking.get(t)||new Set;wt({maxFrames:this.maxFrames,skip:this.skip,filterPaths:this.filterPaths,filterFunctions:this.filterFunctions,stopOn:this.stopOn,filterNode:this.filterNode,filterJs:this.filterJs,formatFilename:this.formatFilename}).forEach(n=>e.add(n)),this.tracking.set(t,e)}trace(t){if(!F)return"";let e=this.tracking.get(t);return e?[...e].map(n=>`${this.multiline?`
|
|
3
|
+
`:""}${n.fn} - ${n.path}:${n.position}`).join(""):""}frames(t){let e=this.tracking.get(t);return e?[...e]:[]}free(t){this.tracking.delete(t)}clear(){this.tracking=new WeakMap}},K;function Gn({maxFrames:r=50,skip:t=0,filterPaths:e=[],filterFunctions:n=[],stopOn:i=[],filterNode:o=!0,filterJs:p=!0,multiline:u=!1,formatFilename:m=h=>h}={}){F&&(K!=null||(K=new gt({maxFrames:r,skip:t,filterPaths:e,filterFunctions:n,stopOn:i,filterNode:o,filterJs:p,multiline:u,formatFilename:m})))}function Yn(r){K==null||K.tag(r)}function Ut(r){var t;return(t=K==null?void 0:K.frames(r))!=null?t:[]}var J=class{constructor(){Yn(this)}};a();s();a();s();a();s();var O=class extends J{constructor(e){super();c(this,"value");this.value=e}write(e){typeof this.value=="string"?e.write(this.value):typeof this.value=="function"?this.value(e):this.value.write(e)}};var $f=4;Gn({skip:0,maxFrames:15,filterFunctions:["Abstract"]});var $e=class{constructor(){c(this,"lineBuffer",[]);c(this,"indentLevel",0);c(this,"hasWrittenAnything",!1);c(this,"lastCharacterIsSemicolon",!1);c(this,"lastCharacterIsNewline",!1);c(this,"nodeStackFrames",[])}get buffer(){return F&&this.nodeStackFrames.length>0&&this.writeInternal(`
|
|
4
|
+
`),this.lineBuffer.join(`
|
|
5
|
+
`)+(this.lastCharacterIsNewline?`
|
|
6
|
+
`:"")}write(...t){for(let e of t)if(e!=null)if(typeof e=="string"){let n=e.length>0&&e.endsWith(`
|
|
7
|
+
`),i=n?e.substring(0,e.length-1):e,o=this.getIndentString(),p=i.replaceAll(`
|
|
3
8
|
`,`
|
|
4
|
-
${
|
|
5
|
-
`),this.writeInternal(
|
|
9
|
+
${o}`);this.isAtStartOfLine()&&(p=o+p),n&&(p+=`
|
|
10
|
+
`),this.writeInternal(p)}else this.writeNode(e)}writeStatement(...t){this.write(...t),this.write(";"),this.writeNewLineIfLastLineNot()}writeNoIndent(t){let e=this.indentLevel;this.indentLevel=0,this.write(t),this.indentLevel=e}writeNode(t){F&&this.nodeStackFrames.push(...Ut(t)),t.write(this),F&&Bt!=="single"&&this.writeInternal(`
|
|
11
|
+
`)}writeNodeOrString(t){if(typeof t=="string"){this.write(t);return}this.writeNode(t)}writeNodeStatement(t){this.writeNode(t),this.write(";"),this.writeNewLineIfLastLineNot()}writeTextStatement(t){new O(t).write(this),t.endsWith(";")||this.write(";"),this.writeNewLineIfLastLineNot()}controlFlow(t,e){new O(t).write(this),this.write(" (",e,")"),this.pushScope()}controlFlowWithoutStatement(t){new O(t).write(this),this.pushScope()}endControlFlow(){this.popScope()}contiguousControlFlow(t,e){this.dedent(),this.write("} "),new O(t).write(this),this.write(" (",e,")"),this.pushScope()}alternativeControlFlow(t){this.dedent(),this.write("} "),new O(t).write(this),this.pushScope()}pushScope(){this.writeLine("{"),this.indent()}popScope(t=!0){this.dedent(),this.writeNewLineIfLastLineNot(),t?this.writeLine("}"):this.write("}")}writeLine(...t){this.write(...t.length===0?[""]:t),this.writeNewLineIfLastLineNot()}newLine(){this.writeInternal(`
|
|
6
12
|
`)}writeSemicolonIfLastCharacterIsNot(){this.lastCharacterIsSemicolon||this.writeInternal(";")}writeNewLineIfLastLineNot(){this.lastCharacterIsNewline||this.writeInternal(`
|
|
7
|
-
`)}indent(){this.indentLevel++}dedent(){this.indentLevel--}delimit({nodes:t,delimiter:e,writeFunction:n}){if(t.length>0){let i=t[0];i!=null&&n(i);for(let o=1;o<t.length;o++){this.write(e);let p=t[o];p!=null&&n(p)}}}toString(){return this.buffer}writeInternal(t){
|
|
8
|
-
`),this.lastCharacterIsSemicolon=t.endsWith(";")
|
|
13
|
+
`)}indent(){this.indentLevel++}dedent(){this.indentLevel--}delimit({nodes:t,delimiter:e,writeFunction:n}){if(t.length>0){let i=t[0];i!=null&&n(i);for(let o=1;o<t.length;o++){this.write(e);let p=t[o];p!=null&&n(p)}}}toString(){return this.buffer}writeInternal(t){if(t.length===0)return;let e=!this.lastCharacterIsNewline;this.hasWrittenAnything=!0,this.lastCharacterIsNewline=t.endsWith(`
|
|
14
|
+
`),this.lastCharacterIsSemicolon=t.endsWith(";");let n=t.split(`
|
|
15
|
+
`),i=F&&!this.shouldSkipTracking(n)&&this.lastCharacterIsNewline;e&&(this.lastLine=`${this.lastLine}${n.shift()||""}`),this.lastCharacterIsNewline&&n.pop(),this.lineBuffer.push(...n),i&&this.appendTrackingComment()}set lastLine(t){this.lineBuffer.length>0?this.lineBuffer[this.lineBuffer.length-1]=t:this.lineBuffer.push(t)}get lastLine(){return this.lineBuffer[this.lineBuffer.length-1]||""}shouldSkipTracking(t){return!1}formatStack(t,e=""){return t.map(n=>`${e?`(${e}) `:""} ${n.fn} - ${n.path} : ${n.position}`)}filterStack(t){return t.filter(e=>!e.fn.startsWith(`${this.constructor.name}.`))}appendTrackingComment(){let t=[...this.formatStack(this.filterStack(wt({maxFrames:15,skip:3}))),...this.formatStack(this.filterStack(this.nodeStackFrames),"node")];switch(this.nodeStackFrames.length=0,Bt){case"single":return this.singleLineTrackingComment(t);case"multiline":return this.multiLineTrackingComment(t);case"box":return this.boxTrackingComment(t)}}singleLineTrackingComment(t){this.lastLine=`${this.lastLine} // ${t.join(" ")}`}multiLineTrackingComment(t){this.lineBuffer.push(...t.map(e=>` // ${e}`))}boxTrackingComment(t){this.lineBuffer.push("/*",...t.map(e=>` ${e}`),"*/")}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*this.getTabSize())}getTabSize(){return $f}};a();s();function Mt(r){return(r==null?void 0:r.name)!=null&&(r==null?void 0:r.assignment)!=null}a();s();var We=class extends J{constructor({condition:e,true_:n,false_:i}){super();c(this,"condition");c(this,"true_");c(this,"false_");this.condition=e,this.true_=n,this.false_=i}write(e){e.writeNode(this.condition),e.write(" ? "),e.writeNode(this.true_),e.write(" : "),e.writeNode(this.false_)}};a();s();a();s();var Q={Critical:"CRITICAL",Warning:"WARNING"};a();s();a();s();var zn="self",Vn="static";var g={};Gt(g,{Access:()=>pe,Array:()=>we,AstNode:()=>w,Attribute:()=>Te,Class:()=>X,ClassInstantiation:()=>$,ClassReference:()=>_,CodeBlock:()=>L,DataClass:()=>ve,Enum:()=>Ae,Field:()=>be,Map:()=>Ee,Method:()=>te,MethodInvocation:()=>ee,Parameter:()=>Z,Trait:()=>_e,Type:()=>B,TypeLiteral:()=>P,Writer:()=>j,array:()=>Kf,assignVariable:()=>pp,attribute:()=>Jf,classReference:()=>Zf,class_:()=>Qf,codeblock:()=>Se,dataClass:()=>ep,enum_:()=>tp,escapePhpString:()=>Dt,field:()=>rp,instantiateClass:()=>Zn,invokeMethod:()=>np,map:()=>op,mergeArrays:()=>cp,method:()=>ap,parameter:()=>sp,string:()=>up,ternary:()=>fp,this_:()=>mp,throwException:()=>ip,trait:()=>Xf,variable:()=>lp});a();s();a();s();a();s();var pe={Public:"public",PublicReadonly:"public readonly",Protected:"protected",Private:"private"};a();s();a();s();a();s();function qn(r){return{namespace:r.substring(0,r.lastIndexOf("\\")),name:r.substring(r.lastIndexOf("\\")+1)}}var j=class extends $e{constructor({namespace:e,rootNamespace:n,customConfig:i}){super();c(this,"namespace");c(this,"rootNamespace");c(this,"customConfig");c(this,"references",{});this.namespace=e,this.rootNamespace=n,this.customConfig=i}addReference(e){var p,u;if(e.namespace==null)return;if(Object.keys(this.references).filter(m=>{let h=qn(m);return h.namespace!==e.namespace&&h.name===e.name}).length>0){e.requireFullyQualified();return}let i=e.namespace===""?e.name:`${e.namespace}\\${e.name}`;((u=(p=this.references)[i])!=null?u:p[i]=[]).push(e)}toString(e=!1){if(e)return this.buffer;let n=`namespace ${this.namespace};`,i=this.stringifyImports();return i.length>0?`${n}
|
|
9
16
|
|
|
10
17
|
${i}
|
|
11
18
|
|
|
12
19
|
${this.buffer}`:n+`
|
|
13
20
|
|
|
14
|
-
`+this.buffer}stringifyImports(){let e=Object.keys(this.references);return e.length===0?"":e.filter(n=>
|
|
15
|
-
`)}};var w=class extends
|
|
21
|
+
`+this.buffer}stringifyImports(){let e=Object.keys(this.references);return e.length===0?"":e.filter(n=>qn(n).namespace!==this.namespace).map(n=>`use ${n};`).join(`
|
|
22
|
+
`)}};var w=class extends J{toString(t){if(t==null)throw new Error("Internal error; AstNode.toString method called incorrectly.");let{namespace:e,rootNamespace:n,customConfig:i,skipImports:o=!1}=t,p=new j({namespace:e,rootNamespace:n,customConfig:i});return this.write(p),p.toString(o)}async toStringAsync({namespace:t,rootNamespace:e,customConfig:n}){let i=new j({namespace:t,rootNamespace:e,customConfig:n});return this.write(i),i.toString()}};var we=class extends w{constructor({entries:e}){super();c(this,"entries");this.entries=e!=null?e:[]}write(e){e.write("["),this.entries.forEach((n,i)=>{i>0&&e.write(", "),n.write(e)}),e.write("]")}};a();s();var Te=class extends w{constructor(e){var n;super();c(this,"reference");c(this,"arguments");this.reference=e.reference,this.arguments=(n=e.arguments)!=null?n:[]}write(e){e.addReference(this.reference),e.write(`${this.reference.name}`),this.arguments.length>0&&(e.write("("),this.arguments.forEach((n,i)=>{i>0&&e.write(","),typeof n=="string"?e.write(n):n.write(e)}),e.write(")"))}};a();s();a();s();var _=class extends w{constructor({name:e,namespace:n,generics:i}){super();c(this,"name");c(this,"namespace");c(this,"generics");c(this,"fullyQualified");this.name=e,this.namespace=n,this.generics=i,this.fullyQualified=!1}requireFullyQualified(){this.fullyQualified=!0}write(e){e.addReference(this);let n=this.fullyQualified?`\\${this.namespace}\\${this.name}`:this.name;e.write(`${n}`)}};a();s();a();s();function le(r){return r.startsWith("$")?r:`$${r}`}var C=class extends w{constructor({docs:e}={}){super();c(this,"docs");c(this,"tags",[]);this.docs=e}addTag(e){this.tags.push(Ue(Be({},e),{name:e.name!=null?le(e.name):void 0}))}write(e){e.writeLine("/**"),this.docs!=null&&(this.docs.split(`
|
|
16
23
|
`).forEach(n=>{e.writeLine(` * ${n}`)}),this.tags.length>0&&e.writeLine(" *"));for(let n of this.tags)this.writeTag({writer:e,tag:n});e.writeLine(" */")}writeTag({writer:e,tag:n}){let i=n.docs!=null?n.docs.split(`
|
|
17
|
-
`):void 0;i!=null&&i.length>1&&(i.forEach(o=>{e.writeLine(` * ${o}`)}),e.writeLine(" *")),e.write(` * @${n.tagType} `),n.type.write(e,{comment:!0}),n.name!=null&&e.write(` ${n.name}`),i!=null&&i.length===1&&e.write(` ${i[0]}`),e.newLine()}};a();s();function
|
|
18
|
-
`)){this.writeStringWithHeredoc({writer:e,value:this.internalType.value});break}if(this.internalType.value.includes("'")){e.write(`"${this.internalType.value.replaceAll('"','\\"')}"`);break}e.write(`'${this.internalType.value}'`);break}case"unknown":{this.writeUnknown({writer:e,value:this.internalType.value});break}case"null":{e.write("null");break}case"nop":break;default:S(this.internalType)}}isClass(){return this.internalType.type==="class"}asClassOrThrow(){if(this.isClass())return this.internalType;throw new Error("Internal error; ts.TypeLiteral is not a class")}writeStringWithHeredoc({writer:e,value:n}){e.writeLine("<<<EOT"),e.writeNoIndent(n),e.newLine(),e.writeNoIndent("EOT")}writeClass({writer:e,class_:n}){e.writeNode(new F({classReference:n.reference,arguments_:[r.map({entries:n.fields.map(i=>({key:r.string(i.name),value:i.value}))})]}))}writeList({writer:e,list:n}){let i=Uf({values:n.values});if(i.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let o of i)o.write(e),e.writeLine(",");e.dedent(),e.write("]")}writeMap({writer:e,map:n}){let i=Pf({entries:n.entries});if(i.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let o of i)o.key.write(e),e.write(" => "),o.value.write(e),e.writeLine(",");e.dedent(),e.write("]")}static list({values:e}){return new this({type:"list",values:e})}static boolean(e){return new this({type:"boolean",value:e})}static class_({reference:e,fields:n}){return new this({type:"class",reference:e,fields:n})}static file(e){return new this({type:"file",value:e})}static float(e){return new this({type:"float",value:e})}static datetime(e){return new this({type:"datetime",value:e})}static number(e){return new this({type:"number",value:e})}static map({entries:e}){return new this({type:"map",entries:e})}static reference(e){return new this({type:"reference",value:e})}static string(e){return new this({type:"string",value:e})}static unknown(e){return new this({type:"unknown",value:e})}static null(){return new this({type:"null"})}static nop(){return new this({type:"nop"})}static isNop(e){return e.internalType.type==="nop"}writeUnknown({writer:e,value:n}){switch(typeof n){case"boolean":e.write(n.toString());return;case"string":e.write(n.includes('"')?`\`${n}\``:`"${n}"`);return;case"number":e.write(n.toString());return;case"object":if(n==null){e.write("null");return}if(Array.isArray(n)){this.writeUnknownArray({writer:e,value:n});return}this.writeUnknownMap({writer:e,value:n});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof n}`)}}writeUnknownArray({writer:e,value:n}){if(n.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let i of n)e.writeNode(r.unknown(i)),e.writeLine(",");e.dedent(),e.write("]")}writeUnknownMap({writer:e,value:n}){let i=Object.entries(n);if(i.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let[o,p]of i)e.write(`'${o}' => `),e.writeNode(r.unknown(p)),e.writeLine(",");e.dedent(),e.write("]")}};function Rf({writer:r,value:t}){return new F({classReference:new E({name:"DateTime",namespace:""}),arguments_:[new I(`'${t}'`)]})}function Of({writer:r,value:t}){return new Q({on:new E({name:"File",namespace:`${r.rootNamespace}\\Utils`}),method:"createFromString",arguments_:[new I(`"${t}"`)]})}function Pf({entries:r}){return r.filter(t=>!U.isNop(t.key)&&!U.isNop(t.value))}function Uf({values:r}){return r.filter(t=>!U.isNop(t))}var B=class r extends w{constructor(e){super();c(this,"internalType");this.internalType=e}write(e,{comment:n}={}){switch(this.internalType.type){case"int":e.write("int");break;case"string":e.write("string");break;case"bool":e.write("bool");break;case"float":e.write("float");break;case"date":e.addReference(Dn),e.write("DateTime");break;case"dateTime":e.addReference(Dn),e.write("DateTime");break;case"mixed":e.write("mixed");break;case"object":e.write("object");break;case"array":if(!n){e.write("array");break}e.write("array<"),this.internalType.value.write(e,{comment:n}),e.write(">");break;case"map":{if(!n){e.write("array");break}e.write("array<"),this.internalType.keyType.write(e,{comment:n}),e.write(", "),this.internalType.valueType.write(e,{comment:n}),e.write(">");break}case"null":{e.write("null");break}case"typeDict":{if(!n){e.write("array");break}if(this.internalType.multiline){e.writeLine("array{");let i=this.internalType.entries.filter(l=>!l.valueType.isOptional()),o=this.internalType.entries.filter(l=>l.valueType.isOptional()),p=[...i,...o];for(let l of p)e.write(" * "),this.writeTypeDictEntry({writer:e,entry:l,comment:n}),e.writeLine(",");e.write(" * }");break}e.write("array{"),this.internalType.entries.forEach((i,o)=>{o>0&&e.write(", "),this.writeTypeDictEntry({writer:e,entry:i,comment:n})}),e.write("}");break}case"union":{this.writeUnion({writer:e,unionTypes:this.internalType.types,comment:n});break}case"optional":{let i=this.internalType.value.internalType,o=i.type==="mixed",p=i.type==="union";!p&&!o&&e.write("?"),this.internalType.value.write(e,{comment:n}),p&&!this.unionHasOptional(i.types)&&(e.write("|"),e.writeNode(r.null()));break}case"reference":if(n){e.writeNode(this.internalType.value);let i=this.internalType.value.generics;i&&i.length>0&&(e.write("<"),i.forEach((o,p)=>{p>0&&e.write(", "),o.write(e,{comment:n})}),e.write(">"))}else e.writeNode(this.internalType.value);break;case"enumString":n?(e.write("value-of<"),e.writeNode(this.internalType.value),e.write(">")):e.write("string");break;case"literal":if(n)e.writeNode(this.internalType.value);else switch(this.internalType.value.internalType.type){case"string":e.write("string");break;case"boolean":e.write("bool");break;default:S(this.internalType.value.internalType)}break;default:S(this.internalType)}}toOptionalIfNotAlready(){return this.internalType.type==="optional"?this:r.optional(this)}underlyingTypeIfOptional(){if(this.internalType.type==="optional")return this.internalType.value}underlyingType(){var e;return(e=this.underlyingTypeIfOptional())!=null?e:this}isOptional(){return this.internalType.type==="optional"}getClassReference(){switch(this.internalType.type){case"date":case"dateTime":return new E({name:"DateTime",namespace:""});case"enumString":case"reference":return this.internalType.value;case"int":case"string":case"bool":case"float":case"object":case"map":case"array":case"null":case"mixed":case"optional":case"typeDict":case"union":case"literal":throw new Error("Cannot get class reference for "+this.internalType.type);default:S(this.internalType)}}static int(){return new this({type:"int"})}static string(){return new this({type:"string"})}static bool(){return new this({type:"bool"})}static float(){return new this({type:"float"})}static date(){return new this({type:"date"})}static dateTime(){return new this({type:"dateTime"})}static mixed(){return new this({type:"mixed"})}static object(){return new this({type:"object"})}static array(e){return new this({type:"array",value:e})}static map(e,n){return new this({type:"map",keyType:e,valueType:n})}static typeDict(e,{multiline:n}={}){return new this({type:"typeDict",entries:e,multiline:n})}static union(e){let n=this.flattenUnionTypes(e),i=dt(n,mt);return new this({type:"union",types:i})}static flattenUnionTypes(e){let n=[];for(let i of e)i.internalType.type==="union"?n.push(...this.flattenUnionTypes(i.internalType.types)):n.push(i);return n}static optional(e){return this.isAlreadyOptional(e)?e:new this({type:"optional",value:e})}static null(){return new this({type:"null"})}static reference(e){return new this({type:"reference",value:e})}static enumString(e){return new this({type:"enumString",value:e})}static literalString(e){return new this({type:"literal",value:U.string(e)})}static literalBoolean(e){return new this({type:"literal",value:U.boolean(e)})}static isAlreadyOptional(e){return e.internalType.type==="optional"}writeUnion({writer:e,unionTypes:n,comment:i}){let o=this.getUniqueTypes({types:n,comment:i,writer:e}),p=this.unwrapOptionalTypes(o),l=p.filter(m=>m.underlyingType().internalType.type==="mixed").length>0;if(l&&!i){e.write("mixed");return}if(p.length>0&&i){e.writeLine("("),p.forEach((m,d)=>{d>0?e.write(" * |"):e.write(" * "),l&&(m=m.underlyingType()),m.write(e,{comment:i}),e.writeLine(),d++}),e.write(" * )");return}p.forEach((m,d)=>{d>0&&e.write("|"),l&&(m=m.underlyingType()),m.write(e,{comment:i}),d++})}writeTypeDictEntry({writer:e,entry:n,comment:i}){e.write(n.key),n.optional&&e.write("?"),e.write(": "),n.valueType.write(e,{comment:i})}getUniqueTypes({writer:e,types:n,comment:i}){let o=dt(n,mt),p=new Set;return o.filter(l=>{let m=l.toString({namespace:e.namespace,rootNamespace:e.rootNamespace,customConfig:e.customConfig,comment:i});return p.has(m)?!1:(p.add(m),!0)})}unwrapOptionalTypes(e){let n=!1,i=e.map(o=>o.internalType.type==="optional"?(n=!0,o.internalType.value):o);return n&&i.push(r.null()),i}unionHasOptional(e){return e.filter(n=>n.internalType.type==="optional").length>0}toString({namespace:e,rootNamespace:n,customConfig:i,comment:o}){let p=new D({namespace:e,rootNamespace:n,customConfig:i});return this.write(p,{comment:o!=null?o:!1}),p.toString()}},Dn=new E({namespace:"",name:"DateTime"});a();s();function Fn(r){return r.startsWith("$")?r.slice(1):r}var jn="values",ge=class extends w{constructor({name:e,namespace:n,abstract:i,docs:o,parentClassReference:p,traits:l,constructorAccess:m}){super();c(this,"name");c(this,"namespace");c(this,"constructorAccess");c(this,"class_");this.name=e,this.namespace=n,this.constructorAccess=m!=null?m:"public",this.class_=new K({name:e,namespace:n,abstract:i,docs:o,parentClassReference:p,traits:l})}addField(e){this.class_.addField(e)}addMethod(e){this.class_.addMethod(e)}addTrait(e){this.class_.addTrait(e)}write(e){let n=pe(this.class_.fields).map(i=>Ue(Pe({},i),{name:Fn(i.name)}));n.length>0&&this.class_.addConstructor({access:this.constructorAccess,parameters:this.getConstructorParameters({orderedFields:n}),body:y.codeblock(i=>{for(let o of n)i.write(`$this->${o.name} = $${jn}['${o.name}']`),o.type.isOptional()&&i.write(" ?? null"),i.write(";")})}),this.class_.write(e)}allFieldsAreOptional(){return this.class_.fields.every(e=>e.type.isOptional())}getConstructorParameters({orderedFields:e}){return[new J({name:jn,type:B.typeDict(e.map(n=>({key:n.name,valueType:n.type,optional:n.type.isOptional()})),{multiline:!0}),initializer:this.allFieldsAreOptional()?new I("[]"):void 0})]}};a();s();a();s();var X=class extends w{constructor({name:e,access:n,parameters:i,throws:o,return_:p,body:l,docs:m,classReference:d,static_:h}){super();c(this,"name");c(this,"access");c(this,"parameters");c(this,"throws");c(this,"return_");c(this,"body");c(this,"docs");c(this,"classReference");c(this,"static_");this.name=e,this.access=n,this.parameters=i,this.throws=o!=null?o:[],this.return_=p,this.body=l,this.docs=m,this.classReference=d,this.static_=h!=null?h:!1}write(e){var p;this.writeComment(e),e.write(`${this.access}${this.static_?" static":""} function ${this.name}(`);let n=this.parameters.filter(l=>!l.type.isOptional()),i=this.parameters.filter(l=>l.type.isOptional());[...n,...i].forEach((l,m)=>{m>0&&e.write(", "),l.write(e)}),e.write("): "),this.return_!=null?e.writeNodeOrString(this.return_):e.write("void"),e.writeLine(" {"),e.indent(),(p=this.body)==null||p.write(e),e.dedent(),e.writeLine("}")}writeComment(e){let n=new C({docs:this.docs});for(let i of this.parameters)n.addTag({tagType:"param",type:i.type,name:i.name,docs:i.docs});this.return_!=null&&this.return_!==Pn&&this.return_!==Un&&n.addTag({tagType:"return",type:this.return_});for(let i of this.throws)n.addTag({tagType:"throws",type:B.reference(i)});e.writeNode(n)}};var Te=class extends w{constructor({name:e,namespace:n,backing:i,docs:o,serializable:p}){super();c(this,"name");c(this,"namespace");c(this,"backing");c(this,"docs");c(this,"members",[]);c(this,"serializable");this.name=e,this.namespace=n,this.backing=i,this.docs=o,this.serializable=p!=null?p:!1}addMember(e){this.members.push(e)}write(e){this.writeComment(e),e.write("enum "),e.writeLine(`${this.name}`),this.backing!=null&&e.write(` : ${this.backing}`),this.serializable&&(e.addReference(new E({name:"JsonSerializable",namespace:""})),e.writeLine(" implements JsonSerializable")),e.writeLine(" {"),e.indent();for(let n of this.members)e.write(`case ${n.name}`),n.value!=null&&(typeof n.value=="string"?e.write(` = "${n.value}"`):e.write(` = ${n.value}`)),e.writeTextStatement("");this.serializable&&(e.newLine(),e.writeNode(new X({name:"jsonSerialize",return_:B.string(),access:"public",parameters:[],body:new I("return $this->value;")}))),e.writeNewLineIfLastLineNot(),e.dedent(),e.writeLine("}")}writeComment(e){if(this.docs==null)return;new C({docs:this.docs}).write(e)}};a();s();var ve=class extends w{constructor({name:e,type:n,access:i,readonly_:o,initializer:p,docs:l,inlineDocs:m,attributes:d,inherited:h}){super();c(this,"name");c(this,"type");c(this,"access");c(this,"readonly_");c(this,"initializer");c(this,"docs");c(this,"inlineDocs");c(this,"attributes");c(this,"inherited");this.name=fe(e),this.type=n,this.access=i,this.readonly_=o!=null?o:!1,this.initializer=p,this.docs=l,this.inlineDocs=m,this.attributes=d!=null?d:[],this.inherited=h!=null?h:!1}write(e){this.writeComment(e),this.writeAttributesIfPresent(e),e.write(`${this.access} `),this.readonly_&&e.write("readonly "),this.type.write(e),e.write(` ${this.name}`),this.initializer!=null&&(e.write(" = "),this.initializer.write(e)),e.write(";"),this.inlineDocs!=null&&e.write(` // ${this.inlineDocs}`),e.newLine()}writeComment(e){let n=new C;n.addTag({tagType:"var",type:this.type,name:this.name,docs:this.docs}),n.write(e)}writeAttributesIfPresent(e){this.attributes.length>0&&(e.write("#["),this.attributes.forEach((n,i)=>{i>0&&e.write(", "),n.write(e)}),e.writeLine("]"))}};a();s();var Ae=class extends w{constructor({entries:e,multiline:n}){super();c(this,"entries");c(this,"multiline");this.entries=e!=null?e:[],this.multiline=n!=null?n:!1}write(e){if(this.multiline){this.writeMultiline(e);return}this.writeCompact(e)}writeMultiline(e){e.writeLine("["),e.indent();for(let{key:n,value:i}of this.entries)n.write(e),e.write(" => "),i.write(e),e.writeLine(",");e.dedent(),e.write("]")}writeCompact(e){e.write("[");for(let[n,{key:i,value:o}]of this.entries.entries())n>0&&e.write(", "),i.write(e),e.write(" => "),o.write(e);e.write("]")}};a();s();var be=class extends w{constructor({name:e,namespace:n,docs:i,traits:o}){super();c(this,"name");c(this,"namespace");c(this,"docs");c(this,"traits");c(this,"fields",[]);c(this,"methods",[]);this.name=e,this.namespace=n,this.docs=i,this.traits=o!=null?o:[]}addField(e){this.fields.push(e)}addMethod(e){this.methods.push(e)}write(e){this.writeComment(e),e.write(`trait ${this.name} `),e.newLine(),e.writeLine("{"),e.indent(),this.traits.length>0&&(e.write("use "),this.traits.forEach((n,i)=>{i>0&&e.write(","),e.writeNode(n)}),e.writeTextStatement(""),e.newLine()),this.writeFields({writer:e,fields:pe(this.fields)}),this.fields.length>0&&this.methods.length>0&&e.newLine(),this.writeMethods({writer:e,methods:pe(this.methods)}),e.dedent(),e.writeLine("}")}writeComment(e){let n=new C({docs:this.docs});for(let i of this.fields)n.addTag({tagType:"property",type:i.type,name:i.name});n.write(e)}writeFields({writer:e,fields:n}){n.forEach((i,o)=>{o>0&&e.newLine(),i.write(e),e.writeNewLineIfLastLineNot()})}writeMethods({writer:e,methods:n}){n.forEach((i,o)=>{o>0&&e.newLine(),i.write(e),e.writeNewLineIfLastLineNot()})}};a();s();var ht=class extends w{constructor(e){super();c(this,"arrays");this.arrays=e}write(e){e.write("array_merge"),Oe({writer:e,arguments_:this.arrays.map(n=>_e(i=>{if(typeof n=="string"||n instanceof w){i.writeNodeOrString(n);return}i.writeNodeOrString(n.ref),n.fallback&&(i.write(" ?? "),i.writeNodeOrString(n.fallback))}))})}};function Bf(r){return new ye(r)}function kf(r){return new we(r)}function Mf(r){return new K(r)}function Df(r){return new be(r)}function Ff(r){return new E(r)}function _e(r){return new I(r)}function jf(r){return new ge(r)}function $f(r){return new Te(r)}function Wf(r){return new ve(r)}function $n(r){return new F(r)}function Yf(r){return new Q(r)}function Gf(r){return _e(t=>{t.write("throw "),t.writeNode($n(r))})}function zf(r){return new Ae(r)}function qf(r){return new X(r)}function Vf(r){return new J(r)}function Hf(r){return new Fe(r)}function Kf(r,t){return _e(e=>{e.writeNodeOrString(r),e.write(" = "),e.writeNodeOrString(t)})}function Jf(r){return _e(fe(r))}function Qf(r){return _e(`"${r}"`)}function Xf(...r){return new ht(r)}function Zf(){return new I(r=>{r.write("$this")})}var Rt=class{constructor({context:t}){c(this,"context");this.context=t}convert(t){if(t.value===null)return this.context.isNullable(t.typeReference)?y.TypeLiteral.null():(this.context.errors.add({severity:H.Critical,message:"Expected non-null value, but got null"}),y.TypeLiteral.nop());if(t.value===void 0)return y.TypeLiteral.nop();switch(t.typeReference.type){case"list":case"set":return this.convertList({list:t.typeReference.value,value:t.value});case"literal":return this.convertLiteral({literalType:t.typeReference.value,value:t.value});case"map":return this.convertMap({map:t.typeReference,value:t.value});case"named":{let e=this.context.resolveNamedType({typeId:t.typeReference.value});return e==null?y.TypeLiteral.nop():this.convertNamed({named:e,value:t.value,as:t.as})}case"optional":return this.convert({typeReference:t.typeReference.value,value:t.value,as:t.as});case"nullable":return this.convert({typeReference:t.typeReference.value,value:t.value,as:t.as});case"primitive":return this.convertPrimitive({primitive:t.typeReference.value,value:t.value,as:t.as});case"unknown":return this.convertUnknown({value:t.value});default:S(t.typeReference)}}convertLiteral({literalType:t,value:e}){switch(t.type){case"boolean":{let n=this.context.getValueAsBoolean({value:e});return n==null?y.TypeLiteral.nop():y.TypeLiteral.boolean(n)}case"string":{let n=this.context.getValueAsString({value:e});return n==null?y.TypeLiteral.nop():y.TypeLiteral.string(n)}default:S(t)}}convertList({list:t,value:e}){return Array.isArray(e)?y.TypeLiteral.list({values:e.map((n,i)=>{this.context.errors.scope({index:i});try{return this.convert({typeReference:t,value:n})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:H.Critical,message:`Expected array but got: ${typeof e}`}),y.TypeLiteral.nop())}convertMap({map:t,value:e}){return typeof e!="object"||e==null?(this.context.errors.add({severity:H.Critical,message:`Expected object but got: ${e==null?"null":typeof e}`}),y.TypeLiteral.nop()):y.TypeLiteral.map({entries:Object.entries(e).map(([n,i])=>{this.context.errors.scope(n);try{return{key:this.convert({typeReference:t.key,value:n,as:"key"}),value:this.convert({typeReference:t.value,value:i})}}finally{this.context.errors.unscope()}})})}convertNamed({named:t,value:e,as:n}){switch(t.type){case"alias":return this.convert({typeReference:t.typeReference,value:e,as:n});case"discriminatedUnion":return this.convertDiscriminatedUnion({discriminatedUnion:t,value:e});case"enum":return this.convertEnum({enum_:t,value:e});case"object":return this.convertObject({object_:t,value:e});case"undiscriminatedUnion":return this.convertUndiscriminatedUnion({undiscriminatedUnion:t,value:e});default:S(t)}}convertDiscriminatedUnion({discriminatedUnion:t,value:e}){let n=this.context.resolveDiscriminatedUnionTypeInstance({discriminatedUnion:t,value:e});if(n==null)return y.TypeLiteral.nop();let i=n.singleDiscriminatedUnionType,o=this.convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:n,unionVariant:i});return o==null?y.TypeLiteral.nop():y.TypeLiteral.reference(y.codeblock(p=>{p.writeNode(y.invokeMethod({on:y.classReference({name:this.context.getClassName(t.declaration.name),namespace:this.context.getTypesNamespace(t.declaration.fernFilepath)}),method:this.context.getMethodName(i.discriminantValue.name),arguments_:this.convertDiscriminatedUnionVariantArgs({discriminatedUnionTypeInstance:n,unionVariant:i,unionProperties:o}),static_:!0}))}))}convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:t,unionVariant:e}){switch(e.type){case"samePropertiesAsObject":{let n=this.context.resolveNamedType({typeId:e.typeId});if(n==null)return;let i=this.convertNamed({named:n,value:t.value});if(!i.isClass()){this.context.errors.add({severity:H.Critical,message:"Internal error; expected union value to be an object"});return}return i.asClassOrThrow().fields}case"singleProperty":try{this.context.errors.scope(e.discriminantValue.wireValue);let n=this.context.getRecord(t.value);return n==null?[{name:this.context.getPropertyName(e.discriminantValue.name),value:this.convert({typeReference:e.typeReference,value:t.value})}]:[{name:this.context.getPropertyName(e.discriminantValue.name),value:this.convert({typeReference:e.typeReference,value:n[e.discriminantValue.wireValue]})}]}finally{this.context.errors.unscope()}case"noProperties":return[];default:S(e)}}convertDiscriminatedUnionVariantArgs({discriminatedUnionTypeInstance:t,unionVariant:e,unionProperties:n}){let i=this.getBaseFields({discriminatedUnionTypeInstance:t,singleDiscriminatedUnionType:e});if(e.type==="singleProperty"&&this.context.getRecord(t.value)==null&&n.length===1)return[...i,this.convert({typeReference:e.typeReference,value:t.value})];if(e.type==="samePropertiesAsObject"){let o=this.context.resolveNamedType({typeId:e.typeId});return o==null?[]:[...i,y.TypeLiteral.class_({reference:y.classReference({name:this.context.getClassName(o.declaration.name),namespace:this.context.getTypesNamespace(o.declaration.fernFilepath)}),fields:n})]}return i}getBaseFields({discriminatedUnionTypeInstance:t,singleDiscriminatedUnionType:e}){var i,o;return this.context.associateByWireValue({parameters:(i=e.properties)!=null?i:[],values:(o=this.context.getRecord(t.value))!=null?o:{},ignoreMissingParameters:!0}).map(p=>{this.context.errors.scope(p.name.wireValue);try{return this.convert(p)}finally{this.context.errors.unscope()}})}convertObject({object_:t,value:e}){var i;let n=this.context.associateByWireValue({parameters:t.properties,values:(i=this.context.getRecord(e))!=null?i:{}});return y.TypeLiteral.class_({reference:y.classReference({name:this.context.getClassName(t.declaration.name),namespace:this.context.getTypesNamespace(t.declaration.fernFilepath)}),fields:n.map(o=>{this.context.errors.scope(o.name.wireValue);try{return{name:this.context.getPropertyName(o.name.name),value:this.convert(o)}}finally{this.context.errors.unscope()}})})}convertEnum({enum_:t,value:e}){let n=this.getEnumValueName({enum_:t,value:e});return n==null?y.TypeLiteral.nop():y.TypeLiteral.reference(y.codeblock(i=>{i.writeNode(y.classReference({name:this.context.getClassName(t.declaration.name),namespace:this.context.getTypesNamespace(t.declaration.fernFilepath)})),i.write("::"),i.write(n),i.write("->value")}))}getEnumValueName({enum_:t,value:e}){if(typeof e!="string"){this.context.errors.add({severity:H.Critical,message:`Expected enum value string, got: ${typeof e}`});return}let n=t.values.find(i=>i.wireValue===e);if(n==null){this.context.errors.add({severity:H.Critical,message:`An enum value named "${e}" does not exist in this context`});return}return this.context.getClassName(n.name)}convertUndiscriminatedUnion({undiscriminatedUnion:t,value:e}){let n=this.findMatchingUndiscriminatedUnionType({undiscriminatedUnion:t,value:e});return n==null?y.TypeLiteral.nop():n}findMatchingUndiscriminatedUnionType({undiscriminatedUnion:t,value:e}){for(let n of t.types)try{return this.convert({typeReference:n,value:e})}catch(i){continue}this.context.errors.add({severity:H.Critical,message:`None of the types in the undiscriminated union matched the given "${typeof e}" value`})}convertUnknown({value:t}){return y.TypeLiteral.unknown(t)}convertPrimitive({primitive:t,value:e,as:n}){switch(t){case"INTEGER":case"LONG":case"UINT":case"UINT_64":{let i=this.getValueAsNumber({value:e,as:n});return i==null?y.TypeLiteral.nop():y.TypeLiteral.number(i)}case"FLOAT":case"DOUBLE":{let i=this.getValueAsNumber({value:e});return i==null?y.TypeLiteral.nop():y.TypeLiteral.float(i)}case"BOOLEAN":{let i=this.getValueAsBoolean({value:e,as:n});return i==null?y.TypeLiteral.nop():y.TypeLiteral.boolean(i)}case"DATE":case"DATE_TIME":{let i=this.context.getValueAsString({value:e});return i==null?y.TypeLiteral.nop():y.TypeLiteral.datetime(i)}case"BASE_64":case"UUID":case"BIG_INTEGER":case"STRING":{let i=this.context.getValueAsString({value:e});return i==null?y.TypeLiteral.nop():y.TypeLiteral.string(i)}default:S(t)}}getValueAsNumber({value:t,as:e}){let n=e==="key"&&typeof t=="string"?Number(t):t;return this.context.getValueAsNumber({value:n})}getValueAsBoolean({value:t,as:e}){let n=e==="key"?typeof t=="string"?t==="true":t==="false"?!1:t:t;return this.context.getValueAsBoolean({value:n})}};0&&(module.exports={DynamicTypeLiteralMapper});
|
|
24
|
+
`):void 0;i!=null&&i.length>1&&(i.forEach(o=>{e.writeLine(` * ${o}`)}),e.writeLine(" *")),e.write(` * @${n.tagType} `),n.type.write(e,{comment:!0}),n.name!=null&&e.write(` ${n.name}`),i!=null&&i.length===1&&e.write(` ${i[0]}`),e.newLine()}};a();s();function ue(r){return Wf(r,[pe.Public,pe.PublicReadonly,pe.Protected,pe.Private])}function Wf(r,t){return t.reduce((e,n)=>[...e,...r.filter(i=>i.access===n)],[])}var X=class extends w{constructor({name:e,namespace:n,abstract:i,docs:o,parentClassReference:p,traits:u}){super();c(this,"name");c(this,"namespace");c(this,"abstract");c(this,"docs");c(this,"parentClassReference");c(this,"traits");c(this,"fields",[]);c(this,"methods",[]);c(this,"constructor_");this.name=e,this.namespace=n,this.abstract=i!=null?i:!1,this.docs=o,this.parentClassReference=p,this.traits=u!=null?u:[]}addConstructor(e){this.constructor_=e}addField(e){this.fields.push(e)}addMethod(e){this.methods.push(e)}addMethods(e){this.methods.push(...e)}addTrait(e){this.traits.push(e)}write(e){e.addReference(new _({name:this.name,namespace:this.namespace})),this.abstract&&e.write("abstract "),this.writeComment(e),e.write(`class ${this.name} `),this.parentClassReference!=null&&(e.write("extends "),this.parentClassReference.write(e)),e.newLine(),e.writeLine("{"),e.indent(),this.traits.length>0&&(e.write("use "),this.traits.forEach((n,i)=>{i>0&&e.write(","),e.writeNode(n)}),e.writeTextStatement(""),e.newLine()),this.writeFields({writer:e,fields:ue(this.fields)}),(this.constructor!=null||this.methods.length>0)&&e.newLine(),this.constructor_!=null&&(this.writeConstructor({writer:e,constructor:this.constructor_}),this.methods.length>0&&e.newLine()),this.writeMethods({writer:e,methods:ue(this.methods)}),e.dedent(),e.writeLine("}")}writeComment(e){if(this.docs==null)return;new C({docs:this.docs}).write(e)}writeConstructor({writer:e,constructor:n}){var i;this.writeConstructorComment({writer:e,constructor:n}),n.access!=null&&e.write(`${n.access} `),e.write("function __construct("),e.indent(),n.parameters.forEach((o,p)=>{p===0&&e.newLine(),o.write(e),e.writeLine(",")}),e.dedent(),e.writeLine(")"),e.writeLine("{"),e.indent(),(i=n.body)==null||i.write(e),e.writeNewLineIfLastLineNot(),e.dedent(),e.writeLine("}")}writeConstructorComment({writer:e,constructor:n}){if(n.parameters.length===0)return;let i=new C;for(let o of n.parameters)i.addTag(o.getCommentTag());i.write(e)}writeFields({writer:e,fields:n}){n.filter(i=>!i.inherited).forEach((i,o)=>{o>0&&e.newLine(),i.write(e),e.writeNewLineIfLastLineNot()})}writeMethods({writer:e,methods:n}){n.forEach((i,o)=>{o>0&&e.newLine(),i.write(e),e.writeNewLineIfLastLineNot()})}};a();s();a();s();function Pe({writer:r,arguments_:t,multiline:e}){if(t.length===0){r.write("()");return}if(e){Gf({writer:r,arguments_:t});return}Yf({writer:r,arguments_:t})}function Gf({writer:r,arguments_:t}){r.writeLine("("),r.indent();for(let e of t)Kn({writer:r,argument:e,writeCompact:!1}),r.writeLine(",");r.dedent(),r.write(")")}function Yf({writer:r,arguments_:t}){r.write("("),t.forEach((e,n)=>{n>0&&r.write(", "),Kn({writer:r,argument:e,writeCompact:!0})}),r.write(")")}function Kn({writer:r,argument:t,writeCompact:e}){Mt(t)?(t.docs&&(e?r.write(`/* ${t.docs} */ `):r.writeLine(`/* ${t.docs} */`)),r.write(`${t.name}: `),r.writeNodeOrString(t.assignment)):t.write(r)}var $=class extends w{constructor({classReference:e,arguments_:n,multiline:i}){super();c(this,"classReference");c(this,"arguments_");c(this,"multiline");this.classReference=e,this.arguments_=n,this.multiline=i!=null?i:!1}write(e){e.write("new "),e.writeNode(this.classReference),Pe({writer:e,arguments_:this.arguments_,multiline:this.multiline})}};a();s();var L=class extends w{constructor(e){super();c(this,"arg");this.arg=e}write(e){return new O(this.arg).write(e)}};a();s();a();s();var Z=class extends w{constructor({name:e,type:n,docs:i,initializer:o,access:p,readonly_:u}){super();c(this,"name");c(this,"type");c(this,"docs");c(this,"initializer");c(this,"access");c(this,"readonly_");this.name=le(e),this.type=n,this.docs=i,this.initializer=o,this.access=p,this.readonly_=u!=null?u:!1}getCommentTag(){return{tagType:"param",type:this.type,name:this.name,docs:this.docs}}write(e){this.access!=null&&e.write(`${this.access} `),this.readonly_&&e.write("readonly "),this.type.write(e),e.write(` ${this.name}`),this.initializer!=null?(e.write(" = "),this.initializer.write(e)):this.type.isOptional()&&e.write(" = null")}};a();s();a();s();a();s();a();s();var ee=class extends w{constructor({method:e,arguments_:n,static_:i,multiline:o,on:p}){super();c(this,"method");c(this,"arguments_");c(this,"multiline");c(this,"static_");c(this,"on");this.method=e,this.arguments_=n,this.static_=i!=null?i:!1,this.multiline=o!=null?o:!1,this.on=p}write(e){this.on!=null&&(this.on.write(e),e.write(this.getMethodAccessor())),e.write(this.method),Pe({writer:e,arguments_:this.arguments_,multiline:this.multiline})}getMethodAccessor(){return this.static_?"::":"->"}};var P=class r extends w{constructor(e){super();c(this,"internalType");this.internalType=e}write(e){switch(this.internalType.type){case"list":{this.writeList({writer:e,list:this.internalType});break}case"boolean":{e.write(this.internalType.value.toString());break}case"class":{this.writeClass({writer:e,class_:this.internalType});break}case"file":{e.writeNode(Vf({writer:e,value:this.internalType.value}));break}case"float":{e.write(this.internalType.value.toString());break}case"number":{e.write(this.internalType.value.toString());break}case"map":{this.writeMap({writer:e,map:this.internalType});break}case"reference":{e.writeNode(this.internalType.value);break}case"datetime":{e.writeNode(zf({writer:e,value:this.internalType.value}));break}case"string":{if(this.internalType.value.includes(`
|
|
25
|
+
`)){this.writeStringWithHeredoc({writer:e,value:this.internalType.value});break}if(this.internalType.value.includes("'")){e.write(`"${this.internalType.value.replaceAll('"','\\"')}"`);break}e.write(`'${this.internalType.value}'`);break}case"unknown":{this.writeUnknown({writer:e,value:this.internalType.value});break}case"null":{e.write("null");break}case"nop":break;default:N(this.internalType)}}isClass(){return this.internalType.type==="class"}asClassOrThrow(){if(this.isClass())return this.internalType;throw new Error("Internal error; ts.TypeLiteral is not a class")}writeStringWithHeredoc({writer:e,value:n}){e.writeLine("<<<EOT"),e.writeNoIndent(n),e.newLine(),e.writeNoIndent("EOT")}writeClass({writer:e,class_:n}){e.writeNode(new $({classReference:n.reference,arguments_:[r.map({entries:n.fields.map(i=>({key:r.string(i.name),value:i.value}))})]}))}writeList({writer:e,list:n}){let i=Hf({values:n.values});if(i.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let o of i)o.write(e),e.writeLine(",");e.dedent(),e.write("]")}writeMap({writer:e,map:n}){let i=qf({entries:n.entries});if(i.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let o of i)o.key.write(e),e.write(" => "),o.value.write(e),e.writeLine(",");e.dedent(),e.write("]")}static list({values:e}){return new this({type:"list",values:e})}static boolean(e){return new this({type:"boolean",value:e})}static class_({reference:e,fields:n}){return new this({type:"class",reference:e,fields:n})}static file(e){return new this({type:"file",value:e})}static float(e){return new this({type:"float",value:e})}static datetime(e){return new this({type:"datetime",value:e})}static number(e){return new this({type:"number",value:e})}static map({entries:e}){return new this({type:"map",entries:e})}static reference(e){return new this({type:"reference",value:e})}static string(e){return new this({type:"string",value:e})}static unknown(e){return new this({type:"unknown",value:e})}static null(){return new this({type:"null"})}static nop(){return new this({type:"nop"})}static isNop(e){return e.internalType.type==="nop"}writeUnknown({writer:e,value:n}){switch(typeof n){case"boolean":e.write(n.toString());return;case"string":e.write(n.includes('"')?`\`${n}\``:`"${n}"`);return;case"number":e.write(n.toString());return;case"object":if(n==null){e.write("null");return}if(Array.isArray(n)){this.writeUnknownArray({writer:e,value:n});return}this.writeUnknownMap({writer:e,value:n});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof n}`)}}writeUnknownArray({writer:e,value:n}){if(n.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let i of n)e.writeNode(r.unknown(i)),e.writeLine(",");e.dedent(),e.write("]")}writeUnknownMap({writer:e,value:n}){let i=Object.entries(n);if(i.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let[o,p]of i)e.write(`'${o}' => `),e.writeNode(r.unknown(p)),e.writeLine(",");e.dedent(),e.write("]")}};function zf({writer:r,value:t}){return new $({classReference:new _({name:"DateTime",namespace:""}),arguments_:[new L(`'${t}'`)]})}function Vf({writer:r,value:t}){return new ee({on:new _({name:"File",namespace:`${r.rootNamespace}\\Utils`}),method:"createFromString",arguments_:[new L(`"${t}"`)]})}function qf({entries:r}){return r.filter(t=>!P.isNop(t.key)&&!P.isNop(t.value))}function Hf({values:r}){return r.filter(t=>!P.isNop(t))}var B=class r extends w{constructor(e){super();c(this,"internalType");this.internalType=e}write(e,{comment:n}={}){switch(this.internalType.type){case"int":e.write("int");break;case"string":e.write("string");break;case"bool":e.write("bool");break;case"float":e.write("float");break;case"date":e.addReference(Jn),e.write("DateTime");break;case"dateTime":e.addReference(Jn),e.write("DateTime");break;case"mixed":e.write("mixed");break;case"object":e.write("object");break;case"array":if(!n){e.write("array");break}e.write("array<"),this.internalType.value.write(e,{comment:n}),e.write(">");break;case"map":{if(!n){e.write("array");break}e.write("array<"),this.internalType.keyType.write(e,{comment:n}),e.write(", "),this.internalType.valueType.write(e,{comment:n}),e.write(">");break}case"null":{e.write("null");break}case"typeDict":{if(!n){e.write("array");break}if(this.internalType.multiline){e.writeLine("array{");let i=this.internalType.entries.filter(u=>!u.valueType.isOptional()),o=this.internalType.entries.filter(u=>u.valueType.isOptional()),p=[...i,...o];for(let u of p)e.write(" * "),this.writeTypeDictEntry({writer:e,entry:u,comment:n}),e.writeLine(",");e.write(" * }");break}e.write("array{"),this.internalType.entries.forEach((i,o)=>{o>0&&e.write(", "),this.writeTypeDictEntry({writer:e,entry:i,comment:n})}),e.write("}");break}case"union":{this.writeUnion({writer:e,unionTypes:this.internalType.types,comment:n});break}case"optional":{let i=this.internalType.value.internalType,o=i.type==="mixed",p=i.type==="union";!p&&!o&&e.write("?"),this.internalType.value.write(e,{comment:n}),p&&!this.unionHasOptional(i.types)&&(e.write("|"),e.writeNode(r.null()));break}case"reference":if(n){e.writeNode(this.internalType.value);let i=this.internalType.value.generics;i&&i.length>0&&(e.write("<"),i.forEach((o,p)=>{p>0&&e.write(", "),o.write(e,{comment:n})}),e.write(">"))}else e.writeNode(this.internalType.value);break;case"enumString":n?(e.write("value-of<"),e.writeNode(this.internalType.value),e.write(">")):e.write("string");break;case"literal":if(n)e.writeNode(this.internalType.value);else switch(this.internalType.value.internalType.type){case"string":e.write("string");break;case"boolean":e.write("bool");break;default:N(this.internalType.value.internalType)}break;default:N(this.internalType)}}toOptionalIfNotAlready(){return this.internalType.type==="optional"?this:r.optional(this)}underlyingTypeIfOptional(){if(this.internalType.type==="optional")return this.internalType.value}underlyingType(){var e;return(e=this.underlyingTypeIfOptional())!=null?e:this}isOptional(){return this.internalType.type==="optional"}getClassReference(){switch(this.internalType.type){case"date":case"dateTime":return new _({name:"DateTime",namespace:""});case"enumString":case"reference":return this.internalType.value;case"int":case"string":case"bool":case"float":case"object":case"map":case"array":case"null":case"mixed":case"optional":case"typeDict":case"union":case"literal":throw new Error("Cannot get class reference for "+this.internalType.type);default:N(this.internalType)}}static int(){return new this({type:"int"})}static string(){return new this({type:"string"})}static bool(){return new this({type:"bool"})}static float(){return new this({type:"float"})}static date(){return new this({type:"date"})}static dateTime(){return new this({type:"dateTime"})}static mixed(){return new this({type:"mixed"})}static object(){return new this({type:"object"})}static array(e){return new this({type:"array",value:e})}static map(e,n){return new this({type:"map",keyType:e,valueType:n})}static typeDict(e,{multiline:n}={}){return new this({type:"typeDict",entries:e,multiline:n})}static union(e){let n=this.flattenUnionTypes(e),i=yt(n,xt);return new this({type:"union",types:i})}static flattenUnionTypes(e){let n=[];for(let i of e)i.internalType.type==="union"?n.push(...this.flattenUnionTypes(i.internalType.types)):n.push(i);return n}static optional(e){return this.isAlreadyOptional(e)?e:new this({type:"optional",value:e})}static null(){return new this({type:"null"})}static reference(e){return new this({type:"reference",value:e})}static enumString(e){return new this({type:"enumString",value:e})}static literalString(e){return new this({type:"literal",value:P.string(e)})}static literalBoolean(e){return new this({type:"literal",value:P.boolean(e)})}static isAlreadyOptional(e){return e.internalType.type==="optional"}writeUnion({writer:e,unionTypes:n,comment:i}){let o=this.getUniqueTypes({types:n,comment:i,writer:e}),p=this.unwrapOptionalTypes(o),u=p.filter(m=>m.underlyingType().internalType.type==="mixed").length>0;if(u&&!i){e.write("mixed");return}if(p.length>0&&i){e.writeLine("("),p.forEach((m,h)=>{h>0?e.write(" * |"):e.write(" * "),u&&(m=m.underlyingType()),m.write(e,{comment:i}),e.writeLine(),h++}),e.write(" * )");return}p.forEach((m,h)=>{h>0&&e.write("|"),u&&(m=m.underlyingType()),m.write(e,{comment:i}),h++})}writeTypeDictEntry({writer:e,entry:n,comment:i}){e.write(n.key),n.optional&&e.write("?"),e.write(": "),n.valueType.write(e,{comment:i})}getUniqueTypes({writer:e,types:n,comment:i}){let o=yt(n,xt),p=new Set;return o.filter(u=>{let m=u.toString({namespace:e.namespace,rootNamespace:e.rootNamespace,customConfig:e.customConfig,comment:i});return p.has(m)?!1:(p.add(m),!0)})}unwrapOptionalTypes(e){let n=!1,i=e.map(o=>o.internalType.type==="optional"?(n=!0,o.internalType.value):o);return n&&i.push(r.null()),i}unionHasOptional(e){return e.filter(n=>n.internalType.type==="optional").length>0}toString({namespace:e,rootNamespace:n,customConfig:i,comment:o}){let p=new j({namespace:e,rootNamespace:n,customConfig:i});return this.write(p,{comment:o!=null?o:!1}),p.toString()}},Jn=new _({namespace:"",name:"DateTime"});a();s();function Qn(r){return r.startsWith("$")?r.slice(1):r}var Xn="values",ve=class extends w{constructor({name:e,namespace:n,abstract:i,docs:o,parentClassReference:p,traits:u,constructorAccess:m}){super();c(this,"name");c(this,"namespace");c(this,"constructorAccess");c(this,"class_");this.name=e,this.namespace=n,this.constructorAccess=m!=null?m:"public",this.class_=new X({name:e,namespace:n,abstract:i,docs:o,parentClassReference:p,traits:u})}addField(e){this.class_.addField(e)}addMethod(e){this.class_.addMethod(e)}addTrait(e){this.class_.addTrait(e)}write(e){let n=ue(this.class_.fields).map(i=>Ue(Be({},i),{name:Qn(i.name)}));n.length>0&&this.class_.addConstructor({access:this.constructorAccess,parameters:this.getConstructorParameters({orderedFields:n}),body:g.codeblock(i=>{for(let o of n)i.write(`$this->${o.name} = $${Xn}['${o.name}']`),o.type.isOptional()&&i.write(" ?? null"),i.write(";")})}),this.class_.write(e)}allFieldsAreOptional(){return this.class_.fields.every(e=>e.type.isOptional())}getConstructorParameters({orderedFields:e}){return[new Z({name:Xn,type:B.typeDict(e.map(n=>({key:n.name,valueType:n.type,optional:n.type.isOptional()})),{multiline:!0}),initializer:this.allFieldsAreOptional()?new L("[]"):void 0})]}};a();s();a();s();var te=class extends w{constructor({name:e,access:n,parameters:i,throws:o,return_:p,body:u,docs:m,classReference:h,static_:d}){super();c(this,"name");c(this,"access");c(this,"parameters");c(this,"throws");c(this,"return_");c(this,"body");c(this,"docs");c(this,"classReference");c(this,"static_");this.name=e,this.access=n,this.parameters=i,this.throws=o!=null?o:[],this.return_=p,this.body=u,this.docs=m,this.classReference=h,this.static_=d!=null?d:!1}write(e){var p;this.writeComment(e),e.write(`${this.access}${this.static_?" static":""} function ${this.name}(`);let n=this.parameters.filter(u=>!u.type.isOptional()),i=this.parameters.filter(u=>u.type.isOptional());[...n,...i].forEach((u,m)=>{m>0&&e.write(", "),u.write(e)}),e.write("): "),this.return_!=null?e.writeNodeOrString(this.return_):e.write("void"),e.writeLine(" {"),e.indent(),(p=this.body)==null||p.write(e),e.dedent(),e.writeLine("}")}writeComment(e){let n=new C({docs:this.docs});for(let i of this.parameters)n.addTag({tagType:"param",type:i.type,name:i.name,docs:i.docs});this.return_!=null&&this.return_!==zn&&this.return_!==Vn&&n.addTag({tagType:"return",type:this.return_});for(let i of this.throws)n.addTag({tagType:"throws",type:B.reference(i)});e.writeNode(n)}};var Ae=class extends w{constructor({name:e,namespace:n,backing:i,docs:o,serializable:p}){super();c(this,"name");c(this,"namespace");c(this,"backing");c(this,"docs");c(this,"members",[]);c(this,"serializable");this.name=e,this.namespace=n,this.backing=i,this.docs=o,this.serializable=p!=null?p:!1}addMember(e){this.members.push(e)}write(e){this.writeComment(e),e.write("enum "),e.writeLine(`${this.name}`),this.backing!=null&&e.write(` : ${this.backing}`),this.serializable&&(e.addReference(new _({name:"JsonSerializable",namespace:""})),e.writeLine(" implements JsonSerializable")),e.writeLine(" {"),e.indent();for(let n of this.members){if(e.write(`case ${n.name}`),n.value!=null)if(typeof n.value=="string"){let i=Dt(n.value);e.write(` = "${i}"`)}else e.write(` = ${n.value}`);e.writeTextStatement("")}this.serializable&&(e.newLine(),e.writeNode(new te({name:"jsonSerialize",return_:B.string(),access:"public",parameters:[],body:new L("return $this->value;")}))),e.writeNewLineIfLastLineNot(),e.dedent(),e.writeLine("}")}writeComment(e){if(this.docs==null)return;new C({docs:this.docs}).write(e)}};a();s();var be=class extends w{constructor({name:e,type:n,access:i,readonly_:o,initializer:p,docs:u,inlineDocs:m,attributes:h,inherited:d}){super();c(this,"name");c(this,"type");c(this,"access");c(this,"readonly_");c(this,"initializer");c(this,"docs");c(this,"inlineDocs");c(this,"attributes");c(this,"inherited");this.name=le(e),this.type=n,this.access=i,this.readonly_=o!=null?o:!1,this.initializer=p,this.docs=u,this.inlineDocs=m,this.attributes=h!=null?h:[],this.inherited=d!=null?d:!1}write(e){this.writeComment(e),this.writeAttributesIfPresent(e),e.write(`${this.access} `),this.readonly_&&e.write("readonly "),this.type.write(e),e.write(` ${this.name}`),this.initializer!=null&&(e.write(" = "),this.initializer.write(e)),e.write(";"),this.inlineDocs!=null&&e.write(` // ${this.inlineDocs}`),e.newLine()}writeComment(e){let n=new C;n.addTag({tagType:"var",type:this.type,name:this.name,docs:this.docs}),n.write(e)}writeAttributesIfPresent(e){this.attributes.length>0&&(e.write("#["),this.attributes.forEach((n,i)=>{i>0&&e.write(", "),n.write(e)}),e.writeLine("]"))}};a();s();var Ee=class extends w{constructor({entries:e,multiline:n}){super();c(this,"entries");c(this,"multiline");this.entries=e!=null?e:[],this.multiline=n!=null?n:!1}write(e){if(this.multiline){this.writeMultiline(e);return}this.writeCompact(e)}writeMultiline(e){e.writeLine("["),e.indent();for(let{key:n,value:i}of this.entries)n.write(e),e.write(" => "),i.write(e),e.writeLine(",");e.dedent(),e.write("]")}writeCompact(e){e.write("[");for(let[n,{key:i,value:o}]of this.entries.entries())n>0&&e.write(", "),i.write(e),e.write(" => "),o.write(e);e.write("]")}};a();s();var _e=class extends w{constructor({name:e,namespace:n,docs:i,traits:o}){super();c(this,"name");c(this,"namespace");c(this,"docs");c(this,"traits");c(this,"fields",[]);c(this,"methods",[]);this.name=e,this.namespace=n,this.docs=i,this.traits=o!=null?o:[]}addField(e){this.fields.push(e)}addMethod(e){this.methods.push(e)}write(e){this.writeComment(e),e.write(`trait ${this.name} `),e.newLine(),e.writeLine("{"),e.indent(),this.traits.length>0&&(e.write("use "),this.traits.forEach((n,i)=>{i>0&&e.write(","),e.writeNode(n)}),e.writeTextStatement(""),e.newLine()),this.writeFields({writer:e,fields:ue(this.fields)}),this.fields.length>0&&this.methods.length>0&&e.newLine(),this.writeMethods({writer:e,methods:ue(this.methods)}),e.dedent(),e.writeLine("}")}writeComment(e){let n=new C({docs:this.docs});for(let i of this.fields)n.addTag({tagType:"property",type:i.type,name:i.name});n.write(e)}writeFields({writer:e,fields:n}){n.forEach((i,o)=>{o>0&&e.newLine(),i.write(e),e.writeNewLineIfLastLineNot()})}writeMethods({writer:e,methods:n}){n.forEach((i,o)=>{o>0&&e.newLine(),i.write(e),e.writeNewLineIfLastLineNot()})}};a();s();var Tt=class extends w{constructor(e){super();c(this,"arrays");this.arrays=e}write(e){e.write("array_merge"),Pe({writer:e,arguments_:this.arrays.map(n=>Se(i=>{if(typeof n=="string"||n instanceof w){i.writeNodeOrString(n);return}i.writeNodeOrString(n.ref),n.fallback&&(i.write(" ?? "),i.writeNodeOrString(n.fallback))}))})}};function Kf(r){return new we(r)}function Jf(r){return new Te(r)}function Qf(r){return new X(r)}function Xf(r){return new _e(r)}function Zf(r){return new _(r)}function Se(r){return new L(r)}function ep(r){return new ve(r)}function tp(r){return new Ae(r)}function rp(r){return new be(r)}function Zn(r){return new $(r)}function np(r){return new ee(r)}function ip(r){return Se(t=>{t.write("throw "),t.writeNode(Zn(r))})}function op(r){return new Ee(r)}function ap(r){return new te(r)}function sp(r){return new Z(r)}function fp(r){return new We(r)}function pp(r,t){return Se(e=>{e.writeNodeOrString(r),e.write(" = "),e.writeNodeOrString(t)})}function lp(r){return Se(le(r))}function up(r){return Se(`"${r}"`)}function cp(...r){return new Tt(r)}function Dt(r){return r.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\$/g,"\\$")}function mp(){return new L(r=>{r.write("$this")})}var Ft=class{constructor({context:t}){c(this,"context");this.context=t}convert(t){if(t.value===null)return this.context.isNullable(t.typeReference)?g.TypeLiteral.null():(this.context.errors.add({severity:Q.Critical,message:"Expected non-null value, but got null"}),g.TypeLiteral.nop());if(t.value===void 0)return g.TypeLiteral.nop();switch(t.typeReference.type){case"list":case"set":return this.convertList({list:t.typeReference.value,value:t.value});case"literal":return this.convertLiteral({literalType:t.typeReference.value,value:t.value});case"map":return this.convertMap({map:t.typeReference,value:t.value});case"named":{let e=this.context.resolveNamedType({typeId:t.typeReference.value});return e==null?g.TypeLiteral.nop():this.convertNamed({named:e,value:t.value,as:t.as})}case"optional":return this.convert({typeReference:t.typeReference.value,value:t.value,as:t.as});case"nullable":return this.convert({typeReference:t.typeReference.value,value:t.value,as:t.as});case"primitive":return this.convertPrimitive({primitive:t.typeReference.value,value:t.value,as:t.as});case"unknown":return this.convertUnknown({value:t.value});default:N(t.typeReference)}}convertLiteral({literalType:t,value:e}){switch(t.type){case"boolean":{let n=this.context.getValueAsBoolean({value:e});return n==null?g.TypeLiteral.nop():g.TypeLiteral.boolean(n)}case"string":{let n=this.context.getValueAsString({value:e});return n==null?g.TypeLiteral.nop():g.TypeLiteral.string(n)}default:N(t)}}convertList({list:t,value:e}){return Array.isArray(e)?g.TypeLiteral.list({values:e.map((n,i)=>{this.context.errors.scope({index:i});try{return this.convert({typeReference:t,value:n})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:Q.Critical,message:`Expected array but got: ${typeof e}`}),g.TypeLiteral.nop())}convertMap({map:t,value:e}){return typeof e!="object"||e==null?(this.context.errors.add({severity:Q.Critical,message:`Expected object but got: ${e==null?"null":typeof e}`}),g.TypeLiteral.nop()):g.TypeLiteral.map({entries:Object.entries(e).map(([n,i])=>{this.context.errors.scope(n);try{return{key:this.convert({typeReference:t.key,value:n,as:"key"}),value:this.convert({typeReference:t.value,value:i})}}finally{this.context.errors.unscope()}})})}convertNamed({named:t,value:e,as:n}){switch(t.type){case"alias":return this.convert({typeReference:t.typeReference,value:e,as:n});case"discriminatedUnion":return this.convertDiscriminatedUnion({discriminatedUnion:t,value:e});case"enum":return this.convertEnum({enum_:t,value:e});case"object":return this.convertObject({object_:t,value:e});case"undiscriminatedUnion":return this.convertUndiscriminatedUnion({undiscriminatedUnion:t,value:e});default:N(t)}}convertDiscriminatedUnion({discriminatedUnion:t,value:e}){let n=this.context.resolveDiscriminatedUnionTypeInstance({discriminatedUnion:t,value:e});if(n==null)return g.TypeLiteral.nop();let i=n.singleDiscriminatedUnionType,o=this.convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:n,unionVariant:i});return o==null?g.TypeLiteral.nop():g.TypeLiteral.reference(g.codeblock(p=>{p.writeNode(g.invokeMethod({on:g.classReference({name:this.context.getClassName(t.declaration.name),namespace:this.context.getTypesNamespace(t.declaration.fernFilepath)}),method:this.context.getMethodName(i.discriminantValue.name),arguments_:this.convertDiscriminatedUnionVariantArgs({discriminatedUnionTypeInstance:n,unionVariant:i,unionProperties:o}),static_:!0}))}))}convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:t,unionVariant:e}){switch(e.type){case"samePropertiesAsObject":{let n=this.context.resolveNamedType({typeId:e.typeId});if(n==null)return;let i=this.convertNamed({named:n,value:t.value});if(!i.isClass()){this.context.errors.add({severity:Q.Critical,message:"Internal error; expected union value to be an object"});return}return i.asClassOrThrow().fields}case"singleProperty":try{this.context.errors.scope(e.discriminantValue.wireValue);let n=this.context.getRecord(t.value);return n==null?[{name:this.context.getPropertyName(e.discriminantValue.name),value:this.convert({typeReference:e.typeReference,value:t.value})}]:[{name:this.context.getPropertyName(e.discriminantValue.name),value:this.convert({typeReference:e.typeReference,value:n[e.discriminantValue.wireValue]})}]}finally{this.context.errors.unscope()}case"noProperties":return[];default:N(e)}}convertDiscriminatedUnionVariantArgs({discriminatedUnionTypeInstance:t,unionVariant:e,unionProperties:n}){let i=this.getBaseFields({discriminatedUnionTypeInstance:t,singleDiscriminatedUnionType:e});if(e.type==="singleProperty"&&this.context.getRecord(t.value)==null&&n.length===1)return[...i,this.convert({typeReference:e.typeReference,value:t.value})];if(e.type==="samePropertiesAsObject"){let o=this.context.resolveNamedType({typeId:e.typeId});return o==null?[]:[...i,g.TypeLiteral.class_({reference:g.classReference({name:this.context.getClassName(o.declaration.name),namespace:this.context.getTypesNamespace(o.declaration.fernFilepath)}),fields:n})]}return i}getBaseFields({discriminatedUnionTypeInstance:t,singleDiscriminatedUnionType:e}){var i,o;return this.context.associateByWireValue({parameters:(i=e.properties)!=null?i:[],values:(o=this.context.getRecord(t.value))!=null?o:{},ignoreMissingParameters:!0}).map(p=>{this.context.errors.scope(p.name.wireValue);try{return this.convert(p)}finally{this.context.errors.unscope()}})}convertObject({object_:t,value:e}){var i;let n=this.context.associateByWireValue({parameters:t.properties,values:(i=this.context.getRecord(e))!=null?i:{}});return g.TypeLiteral.class_({reference:g.classReference({name:this.context.getClassName(t.declaration.name),namespace:this.context.getTypesNamespace(t.declaration.fernFilepath)}),fields:n.map(o=>{this.context.errors.scope(o.name.wireValue);try{return{name:this.context.getPropertyName(o.name.name),value:this.convert(o)}}finally{this.context.errors.unscope()}})})}convertEnum({enum_:t,value:e}){let n=this.getEnumValueName({enum_:t,value:e});return n==null?g.TypeLiteral.nop():g.TypeLiteral.reference(g.codeblock(i=>{i.writeNode(g.classReference({name:this.context.getClassName(t.declaration.name),namespace:this.context.getTypesNamespace(t.declaration.fernFilepath)})),i.write("::"),i.write(n),i.write("->value")}))}getEnumValueName({enum_:t,value:e}){if(typeof e!="string"){this.context.errors.add({severity:Q.Critical,message:`Expected enum value string, got: ${typeof e}`});return}let n=t.values.find(i=>i.wireValue===e);if(n==null){this.context.errors.add({severity:Q.Critical,message:`An enum value named "${e}" does not exist in this context`});return}return this.context.getClassName(n.name)}convertUndiscriminatedUnion({undiscriminatedUnion:t,value:e}){let n=this.findMatchingUndiscriminatedUnionType({undiscriminatedUnion:t,value:e});return n==null?g.TypeLiteral.nop():n}findMatchingUndiscriminatedUnionType({undiscriminatedUnion:t,value:e}){for(let n of t.types)try{return this.convert({typeReference:n,value:e})}catch(i){continue}this.context.errors.add({severity:Q.Critical,message:`None of the types in the undiscriminated union matched the given "${typeof e}" value`})}convertUnknown({value:t}){return g.TypeLiteral.unknown(t)}convertPrimitive({primitive:t,value:e,as:n}){switch(t){case"INTEGER":case"LONG":case"UINT":case"UINT_64":{let i=this.getValueAsNumber({value:e,as:n});return i==null?g.TypeLiteral.nop():g.TypeLiteral.number(i)}case"FLOAT":case"DOUBLE":{let i=this.getValueAsNumber({value:e});return i==null?g.TypeLiteral.nop():g.TypeLiteral.float(i)}case"BOOLEAN":{let i=this.getValueAsBoolean({value:e,as:n});return i==null?g.TypeLiteral.nop():g.TypeLiteral.boolean(i)}case"DATE":case"DATE_TIME":{let i=this.context.getValueAsString({value:e});return i==null?g.TypeLiteral.nop():g.TypeLiteral.datetime(i)}case"BASE_64":case"UUID":case"BIG_INTEGER":case"STRING":{let i=this.context.getValueAsString({value:e});return i==null?g.TypeLiteral.nop():g.TypeLiteral.string(i)}default:N(t)}}getValueAsNumber({value:t,as:e}){let n=e==="key"&&typeof t=="string"?Number(t):t;return this.context.getValueAsNumber({value:n})}getValueAsBoolean({value:t,as:e}){let n=e==="key"?typeof t=="string"?t==="true":t==="false"?!1:t:t;return this.context.getValueAsBoolean({value:n})}};0&&(module.exports={DynamicTypeLiteralMapper});
|
|
19
26
|
/*! Bundled license information:
|
|
20
27
|
|
|
21
28
|
@esbuild-plugins/node-globals-polyfill/Buffer.js:
|