azion
Version:
Azion Packages for Edge Computing.
3 lines • 852 kB
JavaScript
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class;var JF=Object.create;var Ic=Object.defineProperty;var QF=Object.getOwnPropertyDescriptor;var YF=Object.getOwnPropertyNames;var XF=Object.getPrototypeOf,ez=Object.prototype.hasOwnProperty;var rz=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(r,t)=>(typeof require<"u"?require:r)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var me=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),tz=(e,r)=>{for(var t in r)Ic(e,t,{get:r[t],enumerable:!0})},nz=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of YF(r))!ez.call(e,i)&&i!==t&&Ic(e,i,{get:()=>r[i],enumerable:!(n=QF(r,i))||n.enumerable});return e};var pr=(e,r,t)=>(t=e!=null?JF(XF(e)):{},nz(r||!e||!e.__esModule?Ic(t,"default",{value:e,enumerable:!0}):t,e));var Qn=me((YV,ln)=>{"use strict";function $c(){return ln.exports=$c=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},ln.exports.__esModule=!0,ln.exports.default=ln.exports,$c.apply(null,arguments)}ln.exports=$c,ln.exports.__esModule=!0,ln.exports.default=ln.exports});var Yd=me((Qc,Qd)=>{"use strict";(function(e){"use strict";var r=Math.cosh||function(s){return Math.abs(s)<1e-9?1-s:(Math.exp(s)+Math.exp(-s))*.5},t=Math.sinh||function(s){return Math.abs(s)<1e-9?s:(Math.exp(s)-Math.exp(-s))*.5},n=function(s){var u=Math.PI/4;if(-u>s||s>u)return Math.cos(s)-1;var f=s*s;return f*(f*(f*(f*(f*(f*(f*(f/20922789888e3-1/87178291200)+1/479001600)-1/3628800)+1/40320)-1/720)+1/24)-1/2)},i=function(s,u){var f=Math.abs(s),p=Math.abs(u);return f<3e3&&p<3e3?Math.sqrt(f*f+p*p):(f<p?(f=p,p=s/u):p=u/s,f*Math.sqrt(1+p*p))},a=function(){throw SyntaxError("Invalid Param")};function o(s,u){var f=Math.abs(s),p=Math.abs(u);return s===0?Math.log(p):u===0?Math.log(f):f<3e3&&p<3e3?Math.log(s*s+u*u)*.5:(s=s/2,u=u/2,.5*Math.log(s*s+u*u)+Math.LN2)}var l=function(s,u){var f={re:0,im:0};if(s==null)f.re=f.im=0;else if(u!==void 0)f.re=s,f.im=u;else switch(typeof s){case"object":if("im"in s&&"re"in s)f.re=s.re,f.im=s.im;else if("abs"in s&&"arg"in s){if(!Number.isFinite(s.abs)&&Number.isFinite(s.arg))return c.INFINITY;f.re=s.abs*Math.cos(s.arg),f.im=s.abs*Math.sin(s.arg)}else if("r"in s&&"phi"in s){if(!Number.isFinite(s.r)&&Number.isFinite(s.phi))return c.INFINITY;f.re=s.r*Math.cos(s.phi),f.im=s.r*Math.sin(s.phi)}else s.length===2?(f.re=s[0],f.im=s[1]):a();break;case"string":f.im=f.re=0;var p=s.match(/\d+\.?\d*e[+-]?\d+|\d+\.?\d*|\.\d+|./g),m=1,d=0;p===null&&a();for(var g=0;g<p.length;g++){var y=p[g];y===" "||y===" "||y===`
`||(y==="+"?m++:y==="-"?d++:y==="i"||y==="I"?(m+d===0&&a(),p[g+1]!==" "&&!isNaN(p[g+1])?(f.im+=parseFloat((d%2?"-":"")+p[g+1]),g++):f.im+=parseFloat((d%2?"-":"")+"1"),m=d=0):((m+d===0||isNaN(y))&&a(),p[g+1]==="i"||p[g+1]==="I"?(f.im+=parseFloat((d%2?"-":"")+y),g++):f.re+=parseFloat((d%2?"-":"")+y),m=d=0))}m+d>0&&a();break;case"number":f.im=0,f.re=s;break;default:a()}return isNaN(f.re)||isNaN(f.im),f};function c(s,u){if(!(this instanceof c))return new c(s,u);var f=l(s,u);this.re=f.re,this.im=f.im}c.prototype={re:0,im:0,sign:function(){var s=this.abs();return new c(this.re/s,this.im/s)},add:function(s,u){var f=new c(s,u);return this.isInfinite()&&f.isInfinite()?c.NAN:this.isInfinite()||f.isInfinite()?c.INFINITY:new c(this.re+f.re,this.im+f.im)},sub:function(s,u){var f=new c(s,u);return this.isInfinite()&&f.isInfinite()?c.NAN:this.isInfinite()||f.isInfinite()?c.INFINITY:new c(this.re-f.re,this.im-f.im)},mul:function(s,u){var f=new c(s,u);return this.isInfinite()&&f.isZero()||this.isZero()&&f.isInfinite()?c.NAN:this.isInfinite()||f.isInfinite()?c.INFINITY:f.im===0&&this.im===0?new c(this.re*f.re,0):new c(this.re*f.re-this.im*f.im,this.re*f.im+this.im*f.re)},div:function(s,u){var f=new c(s,u);if(this.isZero()&&f.isZero()||this.isInfinite()&&f.isInfinite())return c.NAN;if(this.isInfinite()||f.isZero())return c.INFINITY;if(this.isZero()||f.isInfinite())return c.ZERO;s=this.re,u=this.im;var p=f.re,m=f.im,d,g;return m===0?new c(s/p,u/p):Math.abs(p)<Math.abs(m)?(g=p/m,d=p*g+m,new c((s*g+u)/d,(u*g-s)/d)):(g=m/p,d=m*g+p,new c((s+u*g)/d,(u-s*g)/d))},pow:function(s,u){var f=new c(s,u);if(s=this.re,u=this.im,f.isZero())return c.ONE;if(f.im===0){if(u===0&&s>0)return new c(Math.pow(s,f.re),0);if(s===0)switch((f.re%4+4)%4){case 0:return new c(Math.pow(u,f.re),0);case 1:return new c(0,Math.pow(u,f.re));case 2:return new c(-Math.pow(u,f.re),0);case 3:return new c(0,-Math.pow(u,f.re))}}if(s===0&&u===0&&f.re>0&&f.im>=0)return c.ZERO;var p=Math.atan2(u,s),m=o(s,u);return s=Math.exp(f.re*m-f.im*p),u=f.im*m+f.re*p,new c(s*Math.cos(u),s*Math.sin(u))},sqrt:function(){var s=this.re,u=this.im,f=this.abs(),p,m;if(s>=0){if(u===0)return new c(Math.sqrt(s),0);p=.5*Math.sqrt(2*(f+s))}else p=Math.abs(u)/Math.sqrt(2*(f-s));return s<=0?m=.5*Math.sqrt(2*(f-s)):m=Math.abs(u)/Math.sqrt(2*(f+s)),new c(p,u<0?-m:m)},exp:function(){var s=Math.exp(this.re);return this.im,new c(s*Math.cos(this.im),s*Math.sin(this.im))},expm1:function(){var s=this.re,u=this.im;return new c(Math.expm1(s)*Math.cos(u)+n(u),Math.exp(s)*Math.sin(u))},log:function(){var s=this.re,u=this.im;return u===0&&s>0,new c(o(s,u),Math.atan2(u,s))},abs:function(){return i(this.re,this.im)},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){var s=this.re,u=this.im;return new c(Math.sin(s)*r(u),Math.cos(s)*t(u))},cos:function(){var s=this.re,u=this.im;return new c(Math.cos(s)*r(u),-Math.sin(s)*t(u))},tan:function(){var s=2*this.re,u=2*this.im,f=Math.cos(s)+r(u);return new c(Math.sin(s)/f,t(u)/f)},cot:function(){var s=2*this.re,u=2*this.im,f=Math.cos(s)-r(u);return new c(-Math.sin(s)/f,t(u)/f)},sec:function(){var s=this.re,u=this.im,f=.5*r(2*u)+.5*Math.cos(2*s);return new c(Math.cos(s)*r(u)/f,Math.sin(s)*t(u)/f)},csc:function(){var s=this.re,u=this.im,f=.5*r(2*u)-.5*Math.cos(2*s);return new c(Math.sin(s)*r(u)/f,-Math.cos(s)*t(u)/f)},asin:function(){var s=this.re,u=this.im,f=new c(u*u-s*s+1,-2*s*u).sqrt(),p=new c(f.re-u,f.im+s).log();return new c(p.im,-p.re)},acos:function(){var s=this.re,u=this.im,f=new c(u*u-s*s+1,-2*s*u).sqrt(),p=new c(f.re-u,f.im+s).log();return new c(Math.PI/2-p.im,p.re)},atan:function(){var s=this.re,u=this.im;if(s===0){if(u===1)return new c(0,1/0);if(u===-1)return new c(0,-1/0)}var f=s*s+(1-u)*(1-u),p=new c((1-u*u-s*s)/f,-2*s/f).log();return new c(-.5*p.im,.5*p.re)},acot:function(){var s=this.re,u=this.im;if(u===0)return new c(Math.atan2(1,s),0);var f=s*s+u*u;return f!==0?new c(s/f,-u/f).atan():new c(s!==0?s/0:0,u!==0?-u/0:0).atan()},asec:function(){var s=this.re,u=this.im;if(s===0&&u===0)return new c(0,1/0);var f=s*s+u*u;return f!==0?new c(s/f,-u/f).acos():new c(s!==0?s/0:0,u!==0?-u/0:0).acos()},acsc:function(){var s=this.re,u=this.im;if(s===0&&u===0)return new c(Math.PI/2,1/0);var f=s*s+u*u;return f!==0?new c(s/f,-u/f).asin():new c(s!==0?s/0:0,u!==0?-u/0:0).asin()},sinh:function(){var s=this.re,u=this.im;return new c(t(s)*Math.cos(u),r(s)*Math.sin(u))},cosh:function(){var s=this.re,u=this.im;return new c(r(s)*Math.cos(u),t(s)*Math.sin(u))},tanh:function(){var s=2*this.re,u=2*this.im,f=r(s)+Math.cos(u);return new c(t(s)/f,Math.sin(u)/f)},coth:function(){var s=2*this.re,u=2*this.im,f=r(s)-Math.cos(u);return new c(t(s)/f,-Math.sin(u)/f)},csch:function(){var s=this.re,u=this.im,f=Math.cos(2*u)-r(2*s);return new c(-2*t(s)*Math.cos(u)/f,2*r(s)*Math.sin(u)/f)},sech:function(){var s=this.re,u=this.im,f=Math.cos(2*u)+r(2*s);return new c(2*r(s)*Math.cos(u)/f,-2*t(s)*Math.sin(u)/f)},asinh:function(){var s=this.im;this.im=-this.re,this.re=s;var u=this.asin();return this.re=-this.im,this.im=s,s=u.re,u.re=-u.im,u.im=s,u},acosh:function(){var s=this.acos();if(s.im<=0){var u=s.re;s.re=-s.im,s.im=u}else{var u=s.im;s.im=-s.re,s.re=u}return s},atanh:function(){var s=this.re,u=this.im,f=s>1&&u===0,p=1-s,m=1+s,d=p*p+u*u,g=d!==0?new c((m*p-u*u)/d,(u*p+m*u)/d):new c(s!==-1?s/0:0,u!==0?u/0:0),y=g.re;return g.re=o(g.re,g.im)/2,g.im=Math.atan2(g.im,y)/2,f&&(g.im=-g.im),g},acoth:function(){var s=this.re,u=this.im;if(s===0&&u===0)return new c(0,Math.PI/2);var f=s*s+u*u;return f!==0?new c(s/f,-u/f).atanh():new c(s!==0?s/0:0,u!==0?-u/0:0).atanh()},acsch:function(){var s=this.re,u=this.im;if(u===0)return new c(s!==0?Math.log(s+Math.sqrt(s*s+1)):1/0,0);var f=s*s+u*u;return f!==0?new c(s/f,-u/f).asinh():new c(s!==0?s/0:0,u!==0?-u/0:0).asinh()},asech:function(){var s=this.re,u=this.im;if(this.isZero())return c.INFINITY;var f=s*s+u*u;return f!==0?new c(s/f,-u/f).acosh():new c(s!==0?s/0:0,u!==0?-u/0:0).acosh()},inverse:function(){if(this.isZero())return c.INFINITY;if(this.isInfinite())return c.ZERO;var s=this.re,u=this.im,f=s*s+u*u;return new c(s/f,-u/f)},conjugate:function(){return new c(this.re,-this.im)},neg:function(){return new c(-this.re,-this.im)},ceil:function(s){return s=Math.pow(10,s||0),new c(Math.ceil(this.re*s)/s,Math.ceil(this.im*s)/s)},floor:function(s){return s=Math.pow(10,s||0),new c(Math.floor(this.re*s)/s,Math.floor(this.im*s)/s)},round:function(s){return s=Math.pow(10,s||0),new c(Math.round(this.re*s)/s,Math.round(this.im*s)/s)},equals:function(s,u){var f=new c(s,u);return Math.abs(f.re-this.re)<=c.EPSILON&&Math.abs(f.im-this.im)<=c.EPSILON},clone:function(){return new c(this.re,this.im)},toString:function(){var s=this.re,u=this.im,f="";return this.isNaN()?"NaN":this.isInfinite()?"Infinity":(Math.abs(s)<c.EPSILON&&(s=0),Math.abs(u)<c.EPSILON&&(u=0),u===0?f+s:(s!==0?(f+=s,f+=" ",u<0?(u=-u,f+="-"):f+="+",f+=" "):u<0&&(u=-u,f+="-"),u!==1&&(f+=u),f+"i"))},toVector:function(){return[this.re,this.im]},valueOf:function(){return this.im===0?this.re:null},isNaN:function(){return isNaN(this.re)||isNaN(this.im)},isZero:function(){return this.im===0&&this.re===0},isFinite:function(){return isFinite(this.re)&&isFinite(this.im)},isInfinite:function(){return!(this.isNaN()||this.isFinite())}},c.ZERO=new c(0,0),c.ONE=new c(1,0),c.I=new c(0,1),c.PI=new c(Math.PI,0),c.E=new c(Math.E,0),c.INFINITY=new c(1/0,1/0),c.NAN=new c(NaN,NaN),c.EPSILON=1e-15,typeof define=="function"&&define.amd?define([],function(){return c}):typeof Qc=="object"?(Object.defineProperty(c,"__esModule",{value:!0}),c.default=c,c.Complex=c,Qd.exports=c):e.Complex=c})(Qc)});var af=me((ite,vn)=>{"use strict";function nf(e){"@babel/helpers - typeof";return vn.exports=nf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},vn.exports.__esModule=!0,vn.exports.default=vn.exports,nf(e)}vn.exports=nf,vn.exports.__esModule=!0,vn.exports.default=vn.exports});var Ny=me((ate,Pa)=>{"use strict";var Ey=af().default;function Jq(e,r){if(Ey(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(Ey(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}Pa.exports=Jq,Pa.exports.__esModule=!0,Pa.exports.default=Pa.exports});var Cy=me((ote,Fa)=>{"use strict";var Qq=af().default,Yq=Ny();function Xq(e){var r=Yq(e,"string");return Qq(r)=="symbol"?r:r+""}Fa.exports=Xq,Fa.exports.__esModule=!0,Fa.exports.default=Fa.exports});var Hr=me((ste,za)=>{"use strict";var e$=Cy();function r$(e,r,t){return(r=e$(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}za.exports=r$,za.exports.__esModule=!0,za.exports.default=za.exports});var P0=me((nae,R0)=>{"use strict";R0.exports=function e(r,t){"use strict";var n=/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,i=/(^[ ]*|[ ]*$)/g,a=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,o=/^0x[0-9a-f]+$/i,l=/^0/,c=function(h){return e.insensitive&&(""+h).toLowerCase()||""+h},s=c(r).replace(i,"")||"",u=c(t).replace(i,"")||"",f=s.replace(n,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),p=u.replace(n,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),m=parseInt(s.match(o),16)||f.length!==1&&s.match(a)&&Date.parse(s),d=parseInt(u.match(o),16)||m&&u.match(a)&&Date.parse(u)||null,g,y;if(d){if(m<d)return-1;if(m>d)return 1}for(var b=0,w=Math.max(f.length,p.length);b<w;b++){if(g=!(f[b]||"").match(l)&&parseFloat(f[b])||f[b]||0,y=!(p[b]||"").match(l)&&parseFloat(p[b])||p[b]||0,isNaN(g)!==isNaN(y))return isNaN(g)?1:-1;if(typeof g!=typeof y&&(g+="",y+=""),g<y)return-1;if(g>y)return 1}return 0}});var t1=me((yle,r1)=>{"use strict";var sf=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},x5={"{":"\\{","}":"\\}","\\":"\\textbackslash{}","#":"\\#",$:"\\$","%":"\\%","&":"\\&","^":"\\textasciicircum{}",_:"\\_","~":"\\textasciitilde{}"},A5={"\u2013":"\\--","\u2014":"\\---"," ":"~"," ":"\\qquad{}","\r\n":"\\newline{}","\n":"\\newline{}"},w5=function(r,t){return sf({},r,t)};r1.exports=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=r.preserveFormatting,n=t===void 0?!1:t,i=r.escapeMapFn,a=i===void 0?w5:i,o=String(e),l="",c=a(sf({},x5),n?sf({},A5):{}),s=Object.keys(c),u=function(){var p=!1;s.forEach(function(m,d){p||o.length>=m.length&&o.slice(0,m.length)===m&&(l+=c[s[d]],o=o.slice(m.length,o.length),p=!0)}),p||(l+=o.slice(0,1),o=o.slice(1,o.length))};o;)u();return l}});var BE=me((zE,gf)=>{"use strict";(function(e,r,t){function n(l){var c=this,s=o();c.next=function(){var u=2091639*c.s0+c.c*23283064365386963e-26;return c.s0=c.s1,c.s1=c.s2,c.s2=u-(c.c=u|0)},c.c=1,c.s0=s(" "),c.s1=s(" "),c.s2=s(" "),c.s0-=s(l),c.s0<0&&(c.s0+=1),c.s1-=s(l),c.s1<0&&(c.s1+=1),c.s2-=s(l),c.s2<0&&(c.s2+=1),s=null}function i(l,c){return c.c=l.c,c.s0=l.s0,c.s1=l.s1,c.s2=l.s2,c}function a(l,c){var s=new n(l),u=c&&c.state,f=s.next;return f.int32=function(){return s.next()*4294967296|0},f.double=function(){return f()+(f()*2097152|0)*11102230246251565e-32},f.quick=f,u&&(typeof u=="object"&&i(u,s),f.state=function(){return i(s,{})}),f}function o(){var l=4022871197,c=function(s){s=String(s);for(var u=0;u<s.length;u++){l+=s.charCodeAt(u);var f=.02519603282416938*l;l=f>>>0,f-=l,f*=l,l=f>>>0,f-=l,l+=f*4294967296}return(l>>>0)*23283064365386963e-26};return c}r&&r.exports?r.exports=a:t&&t.amd?t(function(){return a}):this.alea=a})(zE,typeof gf=="object"&&gf,typeof define=="function"&&define)});var qE=me((IE,hf)=>{"use strict";(function(e,r,t){function n(o){var l=this,c="";l.x=0,l.y=0,l.z=0,l.w=0,l.next=function(){var u=l.x^l.x<<11;return l.x=l.y,l.y=l.z,l.z=l.w,l.w^=l.w>>>19^u^u>>>8},o===(o|0)?l.x=o:c+=o;for(var s=0;s<c.length+64;s++)l.x^=c.charCodeAt(s)|0,l.next()}function i(o,l){return l.x=o.x,l.y=o.y,l.z=o.z,l.w=o.w,l}function a(o,l){var c=new n(o),s=l&&l.state,u=function(){return(c.next()>>>0)/4294967296};return u.double=function(){do var f=c.next()>>>11,p=(c.next()>>>0)/4294967296,m=(f+p)/(1<<21);while(m===0);return m},u.int32=c.next,u.quick=u,s&&(typeof s=="object"&&i(s,c),u.state=function(){return i(c,{})}),u}r&&r.exports?r.exports=a:t&&t.amd?t(function(){return a}):this.xor128=a})(IE,typeof hf=="object"&&hf,typeof define=="function"&&define)});var LE=me(($E,vf)=>{"use strict";(function(e,r,t){function n(o){var l=this,c="";l.next=function(){var u=l.x^l.x>>>2;return l.x=l.y,l.y=l.z,l.z=l.w,l.w=l.v,(l.d=l.d+362437|0)+(l.v=l.v^l.v<<4^(u^u<<1))|0},l.x=0,l.y=0,l.z=0,l.w=0,l.v=0,o===(o|0)?l.x=o:c+=o;for(var s=0;s<c.length+64;s++)l.x^=c.charCodeAt(s)|0,s==c.length&&(l.d=l.x<<10^l.x>>>4),l.next()}function i(o,l){return l.x=o.x,l.y=o.y,l.z=o.z,l.w=o.w,l.v=o.v,l.d=o.d,l}function a(o,l){var c=new n(o),s=l&&l.state,u=function(){return(c.next()>>>0)/4294967296};return u.double=function(){do var f=c.next()>>>11,p=(c.next()>>>0)/4294967296,m=(f+p)/(1<<21);while(m===0);return m},u.int32=c.next,u.quick=u,s&&(typeof s=="object"&&i(s,c),u.state=function(){return i(c,{})}),u}r&&r.exports?r.exports=a:t&&t.amd?t(function(){return a}):this.xorwow=a})($E,typeof vf=="object"&&vf,typeof define=="function"&&define)});var kE=me((jE,yf)=>{"use strict";(function(e,r,t){function n(o){var l=this;l.next=function(){var s=l.x,u=l.i,f,p,m;return f=s[u],f^=f>>>7,p=f^f<<24,f=s[u+1&7],p^=f^f>>>10,f=s[u+3&7],p^=f^f>>>3,f=s[u+4&7],p^=f^f<<7,f=s[u+7&7],f=f^f<<13,p^=f^f<<9,s[u]=p,l.i=u+1&7,p};function c(s,u){var f,p,m=[];if(u===(u|0))p=m[0]=u;else for(u=""+u,f=0;f<u.length;++f)m[f&7]=m[f&7]<<15^u.charCodeAt(f)+m[f+1&7]<<13;for(;m.length<8;)m.push(0);for(f=0;f<8&&m[f]===0;++f);for(f==8?p=m[7]=-1:p=m[f],s.x=m,s.i=0,f=256;f>0;--f)s.next()}c(l,o)}function i(o,l){return l.x=o.x.slice(),l.i=o.i,l}function a(o,l){o==null&&(o=+new Date);var c=new n(o),s=l&&l.state,u=function(){return(c.next()>>>0)/4294967296};return u.double=function(){do var f=c.next()>>>11,p=(c.next()>>>0)/4294967296,m=(f+p)/(1<<21);while(m===0);return m},u.int32=c.next,u.quick=u,s&&(s.x&&i(s,c),u.state=function(){return i(c,{})}),u}r&&r.exports?r.exports=a:t&&t.amd?t(function(){return a}):this.xorshift7=a})(jE,typeof yf=="object"&&yf,typeof define=="function"&&define)});var GE=me((UE,bf)=>{"use strict";(function(e,r,t){function n(o){var l=this;l.next=function(){var s=l.w,u=l.X,f=l.i,p,m;return l.w=s=s+1640531527|0,m=u[f+34&127],p=u[f=f+1&127],m^=m<<13,p^=p<<17,m^=m>>>15,p^=p>>>12,m=u[f]=m^p,l.i=f,m+(s^s>>>16)|0};function c(s,u){var f,p,m,d,g,y=[],b=128;for(u===(u|0)?(p=u,u=null):(u=u+"\0",p=0,b=Math.max(b,u.length)),m=0,d=-32;d<b;++d)u&&(p^=u.charCodeAt((d+32)%u.length)),d===0&&(g=p),p^=p<<10,p^=p>>>15,p^=p<<4,p^=p>>>13,d>=0&&(g=g+1640531527|0,f=y[d&127]^=p+g,m=f==0?m+1:0);for(m>=128&&(y[(u&&u.length||0)&127]=-1),m=127,d=4*128;d>0;--d)p=y[m+34&127],f=y[m=m+1&127],p^=p<<13,f^=f<<17,p^=p>>>15,f^=f>>>12,y[m]=p^f;s.w=g,s.X=y,s.i=m}c(l,o)}function i(o,l){return l.i=o.i,l.w=o.w,l.X=o.X.slice(),l}function a(o,l){o==null&&(o=+new Date);var c=new n(o),s=l&&l.state,u=function(){return(c.next()>>>0)/4294967296};return u.double=function(){do var f=c.next()>>>11,p=(c.next()>>>0)/4294967296,m=(f+p)/(1<<21);while(m===0);return m},u.int32=c.next,u.quick=u,s&&(s.X&&i(s,c),u.state=function(){return i(c,{})}),u}r&&r.exports?r.exports=a:t&&t.amd?t(function(){return a}):this.xor4096=a})(UE,typeof bf=="object"&&bf,typeof define=="function"&&define)});var HE=me((VE,xf)=>{"use strict";(function(e,r,t){function n(o){var l=this,c="";l.next=function(){var u=l.b,f=l.c,p=l.d,m=l.a;return u=u<<25^u>>>7^f,f=f-p|0,p=p<<24^p>>>8^m,m=m-u|0,l.b=u=u<<20^u>>>12^f,l.c=f=f-p|0,l.d=p<<16^f>>>16^m,l.a=m-u|0},l.a=0,l.b=0,l.c=-1640531527,l.d=1367130551,o===Math.floor(o)?(l.a=o/4294967296|0,l.b=o|0):c+=o;for(var s=0;s<c.length+20;s++)l.b^=c.charCodeAt(s)|0,l.next()}function i(o,l){return l.a=o.a,l.b=o.b,l.c=o.c,l.d=o.d,l}function a(o,l){var c=new n(o),s=l&&l.state,u=function(){return(c.next()>>>0)/4294967296};return u.double=function(){do var f=c.next()>>>11,p=(c.next()>>>0)/4294967296,m=(f+p)/(1<<21);while(m===0);return m},u.int32=c.next,u.quick=u,s&&(typeof s=="object"&&i(s,c),u.state=function(){return i(c,{})}),u}r&&r.exports?r.exports=a:t&&t.amd?t(function(){return a}):this.tychei=a})(VE,typeof xf=="object"&&xf,typeof define=="function"&&define)});var KE=me((WE,Hu)=>{"use strict";(function(e,r,t){var n=256,i=6,a=52,o="random",l=t.pow(n,i),c=t.pow(2,a),s=c*2,u=n-1,f;function p(h,x,A){var v=[];x=x==!0?{entropy:!0}:x||{};var S=y(g(x.entropy?[h,w(r)]:_nullishCoalesce(h, () => (b())),3),v),D=new m(v),_=function(){for(var E=D.g(i),C=l,T=0;E<c;)E=(E+T)*n,C*=n,T=D.g(1);for(;E>=s;)E/=2,C/=2,T>>>=1;return(E+T)/C};return _.int32=function(){return D.g(4)|0},_.quick=function(){return D.g(4)/4294967296},_.double=_,y(w(D.S),r),(x.pass||A||function(E,C,T,F){return F&&(F.S&&d(F,D),E.state=function(){return d(D,{})}),T?(t[o]=E,C):E})(_,S,"global"in x?x.global:this==t,x.state)}function m(h){var x,A=h.length,v=this,S=0,D=v.i=v.j=0,_=v.S=[];for(A||(h=[A++]);S<n;)_[S]=S++;for(S=0;S<n;S++)_[S]=_[D=u&D+h[S%A]+(x=_[S])],_[D]=x;(v.g=function(E){for(var C,T=0,F=v.i,B=v.j,z=v.S;E--;)C=z[F=u&F+1],T=T*n+z[u&(z[F]=z[B=u&B+C])+(z[B]=C)];return v.i=F,v.j=B,T})(n)}function d(h,x){return x.i=h.i,x.j=h.j,x.S=h.S.slice(),x}function g(h,x){var A=[],v=typeof h,S;if(x&&v=="object")for(S in h)try{A.push(g(h[S],x-1))}catch (e10){}return A.length?A:v=="string"?h:h+"\0"}function y(h,x){for(var A=h+"",v,S=0;S<A.length;)x[u&S]=u&(v^=x[u&S]*19)+A.charCodeAt(S++);return w(x)}function b(){try{var h;return f&&(h=f.randomBytes)?h=h(n):(h=new Uint8Array(n),(e.crypto||e.msCrypto).getRandomValues(h)),w(h)}catch (e11){var x=e.navigator,A=x&&x.plugins;return[+new Date,e,A,e.screen,w(r)]}}function w(h){return String.fromCharCode.apply(0,h)}if(y(t.random(),r),typeof Hu=="object"&&Hu.exports){Hu.exports=p;try{f=rz("crypto")}catch (e12){}}else typeof define=="function"&&define.amd?define(function(){return p}):t["seed"+o]=p})(typeof self<"u"?self:WE,[],Math)});var JE=me((Mwe,ZE)=>{"use strict";var $8=BE(),L8=qE(),j8=LE(),k8=kE(),U8=GE(),G8=HE(),si=KE();si.alea=$8;si.xor128=L8;si.xorwow=j8;si.xorshift7=k8;si.xor4096=U8;si.tychei=G8;ZE.exports=si});var CM=me((GTe,Nf)=>{"use strict";function Ef(){}Ef.prototype={on:function(e,r,t){var n=this.e||(this.e={});return(n[e]||(n[e]=[])).push({fn:r,ctx:t}),this},once:function(e,r,t){var n=this;function i(){n.off(e,i),r.apply(t,arguments)}return i._=r,this.on(e,i,t)},emit:function(e){var r=[].slice.call(arguments,1),t=((this.e||(this.e={}))[e]||[]).slice(),n=0,i=t.length;for(n;n<i;n++)t[n].fn.apply(t[n].ctx,r);return this},off:function(e,r){var t=this.e||(this.e={}),n=t[e],i=[];if(n&&r)for(var a=0,o=n.length;a<o;a++)n[a].fn!==r&&n[a].fn._!==r&&i.push(n[a]);return i.length?t[e]=i:delete t[e],this}};Nf.exports=Ef;Nf.exports.TinyEmitter=Ef});var Ji=me(lr=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});lr.regexpCode=lr.getEsmExportName=lr.getProperty=lr.safeStringify=lr.stringify=lr.strConcat=lr.addCodeArg=lr.str=lr._=lr.nil=lr._Code=lr.Name=lr.IDENTIFIER=lr._CodeOrName=void 0;var ja=class{};lr._CodeOrName=ja;lr.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var ui=class extends ja{constructor(r){if(super(),!lr.IDENTIFIER.test(r))throw new Error("CodeGen: name must be a valid identifier");this.str=r}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};lr.Name=ui;var zt=class extends ja{constructor(r){super(),this._items=typeof r=="string"?[r]:r}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let r=this._items[0];return r===""||r==='""'}get str(){var r;return(r=this._str)!==null&&r!==void 0?r:this._str=this._items.reduce((t,n)=>`${t}${n}`,"")}get names(){var r;return(r=this._names)!==null&&r!==void 0?r:this._names=this._items.reduce((t,n)=>(n instanceof ui&&(t[n.str]=(t[n.str]||0)+1),t),{})}};lr._Code=zt;lr.nil=new zt("");function PM(e,...r){let t=[e[0]],n=0;for(;n<r.length;)Mf(t,r[n]),t.push(e[++n]);return new zt(t)}lr._=PM;var Cf=new zt("+");function FM(e,...r){let t=[ka(e[0])],n=0;for(;n<r.length;)t.push(Cf),Mf(t,r[n]),t.push(Cf,ka(e[++n]));return u9(t),new zt(t)}lr.str=FM;function Mf(e,r){r instanceof zt?e.push(...r._items):r instanceof ui?e.push(r):e.push(f9(r))}lr.addCodeArg=Mf;function u9(e){let r=1;for(;r<e.length-1;){if(e[r]===Cf){let t=c9(e[r-1],e[r+1]);if(t!==void 0){e.splice(r-1,3,t);continue}e[r++]="+"}r++}}function c9(e,r){if(r==='""')return e;if(e==='""')return r;if(typeof e=="string")return r instanceof ui||e[e.length-1]!=='"'?void 0:typeof r!="string"?`${e.slice(0,-1)}${r}"`:r[0]==='"'?e.slice(0,-1)+r.slice(1):void 0;if(typeof r=="string"&&r[0]==='"'&&!(e instanceof ui))return`"${e}${r.slice(1)}`}function l9(e,r){return r.emptyStr()?e:e.emptyStr()?r:FM`${e}${r}`}lr.strConcat=l9;function f9(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:ka(Array.isArray(e)?e.join(","):e)}function p9(e){return new zt(ka(e))}lr.stringify=p9;function ka(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}lr.safeStringify=ka;function m9(e){return typeof e=="string"&&lr.IDENTIFIER.test(e)?new zt(`.${e}`):PM`[${e}]`}lr.getProperty=m9;function d9(e){if(typeof e=="string"&&lr.IDENTIFIER.test(e))return new zt(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}lr.getEsmExportName=d9;function g9(e){return new zt(e.toString())}lr.regexpCode=g9});var Rf=me(vt=>{"use strict";Object.defineProperty(vt,"__esModule",{value:!0});vt.ValueScope=vt.ValueScopeName=vt.Scope=vt.varKinds=vt.UsedValueState=void 0;var ht=Ji(),Tf=class extends Error{constructor(r){super(`CodeGen: "code" for ${r} not defined`),this.value=r.value}},Zu;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(Zu||(vt.UsedValueState=Zu={}));vt.varKinds={const:new ht.Name("const"),let:new ht.Name("let"),var:new ht.Name("var")};var Ju=class{constructor({prefixes:r,parent:t}={}){this._names={},this._prefixes=r,this._parent=t}toName(r){return r instanceof ht.Name?r:this.name(r)}name(r){return new ht.Name(this._newName(r))}_newName(r){let t=this._names[r]||this._nameGroup(r);return`${r}${t.index++}`}_nameGroup(r){var t,n;if(!((n=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||n===void 0)&&n.has(r)||this._prefixes&&!this._prefixes.has(r))throw new Error(`CodeGen: prefix "${r}" is not allowed in this scope`);return this._names[r]={prefix:r,index:0}}};vt.Scope=Ju;var Qu=class extends ht.Name{constructor(r,t){super(t),this.prefix=r}setValue(r,{property:t,itemIndex:n}){this.value=r,this.scopePath=(0,ht._)`.${new ht.Name(t)}[${n}]`}};vt.ValueScopeName=Qu;var h9=(0,ht._)`\n`,Of=class extends Ju{constructor(r){super(r),this._values={},this._scope=r.scope,this.opts={...r,_n:r.lines?h9:ht.nil}}get(){return this._scope}name(r){return new Qu(r,this._newName(r))}value(r,t){var n;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(r),{prefix:a}=i,o=(n=t.key)!==null&&n!==void 0?n:t.ref,l=this._values[a];if(l){let u=l.get(o);if(u)return u}else l=this._values[a]=new Map;l.set(o,i);let c=this._scope[a]||(this._scope[a]=[]),s=c.length;return c[s]=t.ref,i.setValue(t,{property:a,itemIndex:s}),i}getValue(r,t){let n=this._values[r];if(n)return n.get(t)}scopeRefs(r,t=this._values){return this._reduceValues(t,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,ht._)`${r}${n.scopePath}`})}scopeCode(r=this._values,t,n){return this._reduceValues(r,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},t,n)}_reduceValues(r,t,n={},i){let a=ht.nil;for(let o in r){let l=r[o];if(!l)continue;let c=n[o]=n[o]||new Map;l.forEach(s=>{if(c.has(s))return;c.set(s,Zu.Started);let u=t(s);if(u){let f=this.opts.es5?vt.varKinds.var:vt.varKinds.const;a=(0,ht._)`${a}${f} ${s} = ${u};${this.opts._n}`}else if(u=_optionalChain([i, 'optionalCall', _10 => _10(s)]))a=(0,ht._)`${a}${u}${this.opts._n}`;else throw new Tf(s);c.set(s,Zu.Completed)})}return a}};vt.ValueScope=Of});var Ve=me(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.or=Xe.and=Xe.not=Xe.CodeGen=Xe.operators=Xe.varKinds=Xe.ValueScopeName=Xe.ValueScope=Xe.Scope=Xe.Name=Xe.regexpCode=Xe.stringify=Xe.getProperty=Xe.nil=Xe.strConcat=Xe.str=Xe._=void 0;var ar=Ji(),Vt=Rf(),$n=Ji();Object.defineProperty(Xe,"_",{enumerable:!0,get:function(){return $n._}});Object.defineProperty(Xe,"str",{enumerable:!0,get:function(){return $n.str}});Object.defineProperty(Xe,"strConcat",{enumerable:!0,get:function(){return $n.strConcat}});Object.defineProperty(Xe,"nil",{enumerable:!0,get:function(){return $n.nil}});Object.defineProperty(Xe,"getProperty",{enumerable:!0,get:function(){return $n.getProperty}});Object.defineProperty(Xe,"stringify",{enumerable:!0,get:function(){return $n.stringify}});Object.defineProperty(Xe,"regexpCode",{enumerable:!0,get:function(){return $n.regexpCode}});Object.defineProperty(Xe,"Name",{enumerable:!0,get:function(){return $n.Name}});var rc=Rf();Object.defineProperty(Xe,"Scope",{enumerable:!0,get:function(){return rc.Scope}});Object.defineProperty(Xe,"ValueScope",{enumerable:!0,get:function(){return rc.ValueScope}});Object.defineProperty(Xe,"ValueScopeName",{enumerable:!0,get:function(){return rc.ValueScopeName}});Object.defineProperty(Xe,"varKinds",{enumerable:!0,get:function(){return rc.varKinds}});Xe.operators={GT:new ar._Code(">"),GTE:new ar._Code(">="),LT:new ar._Code("<"),LTE:new ar._Code("<="),EQ:new ar._Code("==="),NEQ:new ar._Code("!=="),NOT:new ar._Code("!"),OR:new ar._Code("||"),AND:new ar._Code("&&"),ADD:new ar._Code("+")};var xn=class{optimizeNodes(){return this}optimizeNames(r,t){return this}},Pf=class extends xn{constructor(r,t,n){super(),this.varKind=r,this.name=t,this.rhs=n}render({es5:r,_n:t}){let n=r?Vt.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+t}optimizeNames(r,t){if(r[this.name.str])return this.rhs&&(this.rhs=Yi(this.rhs,r,t)),this}get names(){return this.rhs instanceof ar._CodeOrName?this.rhs.names:{}}},Yu=class extends xn{constructor(r,t,n){super(),this.lhs=r,this.rhs=t,this.sideEffects=n}render({_n:r}){return`${this.lhs} = ${this.rhs};`+r}optimizeNames(r,t){if(!(this.lhs instanceof ar.Name&&!r[this.lhs.str]&&!this.sideEffects))return this.rhs=Yi(this.rhs,r,t),this}get names(){let r=this.lhs instanceof ar.Name?{}:{...this.lhs.names};return ec(r,this.rhs)}},Ff=class extends Yu{constructor(r,t,n,i){super(r,n,i),this.op=t}render({_n:r}){return`${this.lhs} ${this.op}= ${this.rhs};`+r}},zf=class extends xn{constructor(r){super(),this.label=r,this.names={}}render({_n:r}){return`${this.label}:`+r}},Bf=class extends xn{constructor(r){super(),this.label=r,this.names={}}render({_n:r}){return`break${this.label?` ${this.label}`:""};`+r}},If=class extends xn{constructor(r){super(),this.error=r}render({_n:r}){return`throw ${this.error};`+r}get names(){return this.error.names}},qf=class extends xn{constructor(r){super(),this.code=r}render({_n:r}){return`${this.code};`+r}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(r,t){return this.code=Yi(this.code,r,t),this}get names(){return this.code instanceof ar._CodeOrName?this.code.names:{}}},Ua=class extends xn{constructor(r=[]){super(),this.nodes=r}render(r){return this.nodes.reduce((t,n)=>t+n.render(r),"")}optimizeNodes(){let{nodes:r}=this,t=r.length;for(;t--;){let n=r[t].optimizeNodes();Array.isArray(n)?r.splice(t,1,...n):n?r[t]=n:r.splice(t,1)}return r.length>0?this:void 0}optimizeNames(r,t){let{nodes:n}=this,i=n.length;for(;i--;){let a=n[i];a.optimizeNames(r,t)||(v9(r,a.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((r,t)=>fi(r,t.names),{})}},An=class extends Ua{render(r){return"{"+r._n+super.render(r)+"}"+r._n}},$f=class extends Ua{},Qi=class extends An{};Qi.kind="else";var ci=class e extends An{constructor(r,t){super(t),this.condition=r}render(r){let t=`if(${this.condition})`+super.render(r);return this.else&&(t+="else "+this.else.render(r)),t}optimizeNodes(){super.optimizeNodes();let r=this.condition;if(r===!0)return this.nodes;let t=this.else;if(t){let n=t.optimizeNodes();t=this.else=Array.isArray(n)?new Qi(n):n}if(t)return r===!1?t instanceof e?t:t.nodes:this.nodes.length?this:new e(zM(r),t instanceof e?[t]:t.nodes);if(!(r===!1||!this.nodes.length))return this}optimizeNames(r,t){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(r,t),!!(super.optimizeNames(r,t)||this.else))return this.condition=Yi(this.condition,r,t),this}get names(){let r=super.names;return ec(r,this.condition),this.else&&fi(r,this.else.names),r}};ci.kind="if";var li=class extends An{};li.kind="for";var Lf=class extends li{constructor(r){super(),this.iteration=r}render(r){return`for(${this.iteration})`+super.render(r)}optimizeNames(r,t){if(super.optimizeNames(r,t))return this.iteration=Yi(this.iteration,r,t),this}get names(){return fi(super.names,this.iteration.names)}},jf=class extends li{constructor(r,t,n,i){super(),this.varKind=r,this.name=t,this.from=n,this.to=i}render(r){let t=r.es5?Vt.varKinds.var:this.varKind,{name:n,from:i,to:a}=this;return`for(${t} ${n}=${i}; ${n}<${a}; ${n}++)`+super.render(r)}get names(){let r=ec(super.names,this.from);return ec(r,this.to)}},Xu=class extends li{constructor(r,t,n,i){super(),this.loop=r,this.varKind=t,this.name=n,this.iterable=i}render(r){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(r)}optimizeNames(r,t){if(super.optimizeNames(r,t))return this.iterable=Yi(this.iterable,r,t),this}get names(){return fi(super.names,this.iterable.names)}},Ga=class extends An{constructor(r,t,n){super(),this.name=r,this.args=t,this.async=n}render(r){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(r)}};Ga.kind="func";var Va=class extends Ua{render(r){return"return "+super.render(r)}};Va.kind="return";var kf=class extends An{render(r){let t="try"+super.render(r);return this.catch&&(t+=this.catch.render(r)),this.finally&&(t+=this.finally.render(r)),t}optimizeNodes(){var r,t;return super.optimizeNodes(),(r=this.catch)===null||r===void 0||r.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(r,t){var n,i;return super.optimizeNames(r,t),(n=this.catch)===null||n===void 0||n.optimizeNames(r,t),(i=this.finally)===null||i===void 0||i.optimizeNames(r,t),this}get names(){let r=super.names;return this.catch&&fi(r,this.catch.names),this.finally&&fi(r,this.finally.names),r}},Ha=class extends An{constructor(r){super(),this.error=r}render(r){return`catch(${this.error})`+super.render(r)}};Ha.kind="catch";var Wa=class extends An{render(r){return"finally"+super.render(r)}};Wa.kind="finally";var Uf=class{constructor(r,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
`:""},this._extScope=r,this._scope=new Vt.Scope({parent:r}),this._nodes=[new $f]}toString(){return this._root.render(this.opts)}name(r){return this._scope.name(r)}scopeName(r){return this._extScope.name(r)}scopeValue(r,t){let n=this._extScope.value(r,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(r,t){return this._extScope.getValue(r,t)}scopeRefs(r){return this._extScope.scopeRefs(r,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(r,t,n,i){let a=this._scope.toName(t);return n!==void 0&&i&&(this._constants[a.str]=n),this._leafNode(new Pf(r,a,n)),a}const(r,t,n){return this._def(Vt.varKinds.const,r,t,n)}let(r,t,n){return this._def(Vt.varKinds.let,r,t,n)}var(r,t,n){return this._def(Vt.varKinds.var,r,t,n)}assign(r,t,n){return this._leafNode(new Yu(r,t,n))}add(r,t){return this._leafNode(new Ff(r,Xe.operators.ADD,t))}code(r){return typeof r=="function"?r():r!==ar.nil&&this._leafNode(new qf(r)),this}object(...r){let t=["{"];for(let[n,i]of r)t.length>1&&t.push(","),t.push(n),(n!==i||this.opts.es5)&&(t.push(":"),(0,ar.addCodeArg)(t,i));return t.push("}"),new ar._Code(t)}if(r,t,n){if(this._blockNode(new ci(r)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(r){return this._elseNode(new ci(r))}else(){return this._elseNode(new Qi)}endIf(){return this._endBlockNode(ci,Qi)}_for(r,t){return this._blockNode(r),t&&this.code(t).endFor(),this}for(r,t){return this._for(new Lf(r),t)}forRange(r,t,n,i,a=this.opts.es5?Vt.varKinds.var:Vt.varKinds.let){let o=this._scope.toName(r);return this._for(new jf(a,o,t,n),()=>i(o))}forOf(r,t,n,i=Vt.varKinds.const){let a=this._scope.toName(r);if(this.opts.es5){let o=t instanceof ar.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,ar._)`${o}.length`,l=>{this.var(a,(0,ar._)`${o}[${l}]`),n(a)})}return this._for(new Xu("of",i,a,t),()=>n(a))}forIn(r,t,n,i=this.opts.es5?Vt.varKinds.var:Vt.varKinds.const){if(this.opts.ownProperties)return this.forOf(r,(0,ar._)`Object.keys(${t})`,n);let a=this._scope.toName(r);return this._for(new Xu("in",i,a,t),()=>n(a))}endFor(){return this._endBlockNode(li)}label(r){return this._leafNode(new zf(r))}break(r){return this._leafNode(new Bf(r))}return(r){let t=new Va;if(this._blockNode(t),this.code(r),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Va)}try(r,t,n){if(!t&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new kf;if(this._blockNode(i),this.code(r),t){let a=this.name("e");this._currNode=i.catch=new Ha(a),t(a)}return n&&(this._currNode=i.finally=new Wa,this.code(n)),this._endBlockNode(Ha,Wa)}throw(r){return this._leafNode(new If(r))}block(r,t){return this._blockStarts.push(this._nodes.length),r&&this.code(r).endBlock(t),this}endBlock(r){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-t;if(n<0||r!==void 0&&n!==r)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${r} expected`);return this._nodes.length=t,this}func(r,t=ar.nil,n,i){return this._blockNode(new Ga(r,t,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(Ga)}optimize(r=1){for(;r-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(r){return this._currNode.nodes.push(r),this}_blockNode(r){this._currNode.nodes.push(r),this._nodes.push(r)}_endBlockNode(r,t){let n=this._currNode;if(n instanceof r||t&&n instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${r.kind}/${t.kind}`:r.kind}"`)}_elseNode(r){let t=this._currNode;if(!(t instanceof ci))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=r,this}get _root(){return this._nodes[0]}get _currNode(){let r=this._nodes;return r[r.length-1]}set _currNode(r){let t=this._nodes;t[t.length-1]=r}};Xe.CodeGen=Uf;function fi(e,r){for(let t in r)e[t]=(e[t]||0)+(r[t]||0);return e}function ec(e,r){return r instanceof ar._CodeOrName?fi(e,r.names):e}function Yi(e,r,t){if(e instanceof ar.Name)return n(e);if(!i(e))return e;return new ar._Code(e._items.reduce((a,o)=>(o instanceof ar.Name&&(o=n(o)),o instanceof ar._Code?a.push(...o._items):a.push(o),a),[]));function n(a){let o=t[a.str];return o===void 0||r[a.str]!==1?a:(delete r[a.str],o)}function i(a){return a instanceof ar._Code&&a._items.some(o=>o instanceof ar.Name&&r[o.str]===1&&t[o.str]!==void 0)}}function v9(e,r){for(let t in r)e[t]=(e[t]||0)-(r[t]||0)}function zM(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,ar._)`!${Gf(e)}`}Xe.not=zM;var y9=BM(Xe.operators.AND);function b9(...e){return e.reduce(y9)}Xe.and=b9;var x9=BM(Xe.operators.OR);function A9(...e){return e.reduce(x9)}Xe.or=A9;function BM(e){return(r,t)=>r===ar.nil?t:t===ar.nil?r:(0,ar._)`${Gf(r)} ${e} ${Gf(t)}`}function Gf(e){return e instanceof ar.Name?e:(0,ar._)`(${e})`}});var fr=me(tr=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.checkStrictMode=tr.getErrorPath=tr.Type=tr.useFunc=tr.setEvaluated=tr.evaluatedPropsToName=tr.mergeEvaluated=tr.eachItem=tr.unescapeJsonPointer=tr.escapeJsonPointer=tr.escapeFragment=tr.unescapeFragment=tr.schemaRefOrVal=tr.schemaHasRulesButRef=tr.schemaHasRules=tr.checkUnknownRules=tr.alwaysValidSchema=tr.toHash=void 0;var Ar=Ve(),w9=Ji();function _9(e){let r={};for(let t of e)r[t]=!0;return r}tr.toHash=_9;function D9(e,r){return typeof r=="boolean"?r:Object.keys(r).length===0?!0:($M(e,r),!LM(r,e.self.RULES.all))}tr.alwaysValidSchema=D9;function $M(e,r=e.schema){let{opts:t,self:n}=e;if(!t.strictSchema||typeof r=="boolean")return;let i=n.RULES.keywords;for(let a in r)i[a]||UM(e,`unknown keyword: "${a}"`)}tr.checkUnknownRules=$M;function LM(e,r){if(typeof e=="boolean")return!e;for(let t in e)if(r[t])return!0;return!1}tr.schemaHasRules=LM;function S9(e,r){if(typeof e=="boolean")return!e;for(let t in e)if(t!=="$ref"&&r.all[t])return!0;return!1}tr.schemaHasRulesButRef=S9;function E9({topSchemaRef:e,schemaPath:r},t,n,i){if(!i){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,Ar._)`${t}`}return(0,Ar._)`${e}${r}${(0,Ar.getProperty)(n)}`}tr.schemaRefOrVal=E9;function N9(e){return jM(decodeURIComponent(e))}tr.unescapeFragment=N9;function C9(e){return encodeURIComponent(Hf(e))}tr.escapeFragment=C9;function Hf(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}tr.escapeJsonPointer=Hf;function jM(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}tr.unescapeJsonPointer=jM;function M9(e,r){if(Array.isArray(e))for(let t of e)r(t);else r(e)}tr.eachItem=M9;function IM({mergeNames:e,mergeToName:r,mergeValues:t,resultToName:n}){return(i,a,o,l)=>{let c=o===void 0?a:o instanceof Ar.Name?(a instanceof Ar.Name?e(i,a,o):r(i,a,o),o):a instanceof Ar.Name?(r(i,o,a),a):t(a,o);return l===Ar.Name&&!(c instanceof Ar.Name)?n(i,c):c}}tr.mergeEvaluated={props:IM({mergeNames:(e,r,t)=>e.if((0,Ar._)`${t} !== true && ${r} !== undefined`,()=>{e.if((0,Ar._)`${r} === true`,()=>e.assign(t,!0),()=>e.assign(t,(0,Ar._)`${t} || {}`).code((0,Ar._)`Object.assign(${t}, ${r})`))}),mergeToName:(e,r,t)=>e.if((0,Ar._)`${t} !== true`,()=>{r===!0?e.assign(t,!0):(e.assign(t,(0,Ar._)`${t} || {}`),Wf(e,t,r))}),mergeValues:(e,r)=>e===!0?!0:{...e,...r},resultToName:kM}),items:IM({mergeNames:(e,r,t)=>e.if((0,Ar._)`${t} !== true && ${r} !== undefined`,()=>e.assign(t,(0,Ar._)`${r} === true ? true : ${t} > ${r} ? ${t} : ${r}`)),mergeToName:(e,r,t)=>e.if((0,Ar._)`${t} !== true`,()=>e.assign(t,r===!0?!0:(0,Ar._)`${t} > ${r} ? ${t} : ${r}`)),mergeValues:(e,r)=>e===!0?!0:Math.max(e,r),resultToName:(e,r)=>e.var("items",r)})};function kM(e,r){if(r===!0)return e.var("props",!0);let t=e.var("props",(0,Ar._)`{}`);return r!==void 0&&Wf(e,t,r),t}tr.evaluatedPropsToName=kM;function Wf(e,r,t){Object.keys(t).forEach(n=>e.assign((0,Ar._)`${r}${(0,Ar.getProperty)(n)}`,!0))}tr.setEvaluated=Wf;var qM={};function T9(e,r){return e.scopeValue("func",{ref:r,code:qM[r.code]||(qM[r.code]=new w9._Code(r.code))})}tr.useFunc=T9;var Vf;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Vf||(tr.Type=Vf={}));function O9(e,r,t){if(e instanceof Ar.Name){let n=r===Vf.Num;return t?n?(0,Ar._)`"[" + ${e} + "]"`:(0,Ar._)`"['" + ${e} + "']"`:n?(0,Ar._)`"/" + ${e}`:(0,Ar._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,Ar.getProperty)(e).toString():"/"+Hf(e)}tr.getErrorPath=O9;function UM(e,r,t=e.opts.strictSchema){if(t){if(r=`strict mode: ${r}`,t===!0)throw new Error(r);e.self.logger.warn(r)}}tr.checkStrictMode=UM});var an=me(Kf=>{"use strict";Object.defineProperty(Kf,"__esModule",{value:!0});var tt=Ve(),R9={data:new tt.Name("data"),valCxt:new tt.Name("valCxt"),instancePath:new tt.Name("instancePath"),parentData:new tt.Name("parentData"),parentDataProperty:new tt.Name("parentDataProperty"),rootData:new tt.Name("rootData"),dynamicAnchors:new tt.Name("dynamicAnchors"),vErrors:new tt.Name("vErrors"),errors:new tt.Name("errors"),this:new tt.Name("this"),self:new tt.Name("self"),scope:new tt.Name("scope"),json:new tt.Name("json"),jsonPos:new tt.Name("jsonPos"),jsonLen:new tt.Name("jsonLen"),jsonPart:new tt.Name("jsonPart")};Kf.default=R9});var Xi=me(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.extendErrors=nt.resetErrorsCount=nt.reportExtraError=nt.reportError=nt.keyword$DataError=nt.keywordError=void 0;var sr=Ve(),tc=fr(),st=an();nt.keywordError={message:({keyword:e})=>(0,sr.str)`must pass "${e}" keyword validation`};nt.keyword$DataError={message:({keyword:e,schemaType:r})=>r?(0,sr.str)`"${e}" keyword must be ${r} ($data)`:(0,sr.str)`"${e}" keyword is invalid ($data)`};function P9(e,r=nt.keywordError,t,n){let{it:i}=e,{gen:a,compositeRule:o,allErrors:l}=i,c=HM(e,r,t);_nullishCoalesce(n, () => ((o||l)))?GM(a,c):VM(i,(0,sr._)`[${c}]`)}nt.reportError=P9;function F9(e,r=nt.keywordError,t){let{it:n}=e,{gen:i,compositeRule:a,allErrors:o}=n,l=HM(e,r,t);GM(i,l),a||o||VM(n,st.default.vErrors)}nt.reportExtraError=F9;function z9(e,r){e.assign(st.default.errors,r),e.if((0,sr._)`${st.default.vErrors} !== null`,()=>e.if(r,()=>e.assign((0,sr._)`${st.default.vErrors}.length`,r),()=>e.assign(st.default.vErrors,null)))}nt.resetErrorsCount=z9;function B9({gen:e,keyword:r,schemaValue:t,data:n,errsCount:i,it:a}){if(i===void 0)throw new Error("ajv implementation error");let o=e.name("err");e.forRange("i",i,st.default.errors,l=>{e.const(o,(0,sr._)`${st.default.vErrors}[${l}]`),e.if((0,sr._)`${o}.instancePath === undefined`,()=>e.assign((0,sr._)`${o}.instancePath`,(0,sr.strConcat)(st.default.instancePath,a.errorPath))),e.assign((0,sr._)`${o}.schemaPath`,(0,sr.str)`${a.errSchemaPath}/${r}`),a.opts.verbose&&(e.assign((0,sr._)`${o}.schema`,t),e.assign((0,sr._)`${o}.data`,n))})}nt.extendErrors=B9;function GM(e,r){let t=e.const("err",r);e.if((0,sr._)`${st.default.vErrors} === null`,()=>e.assign(st.default.vErrors,(0,sr._)`[${t}]`),(0,sr._)`${st.default.vErrors}.push(${t})`),e.code((0,sr._)`${st.default.errors}++`)}function VM(e,r){let{gen:t,validateName:n,schemaEnv:i}=e;i.$async?t.throw((0,sr._)`new ${e.ValidationError}(${r})`):(t.assign((0,sr._)`${n}.errors`,r),t.return(!1))}var pi={keyword:new sr.Name("keyword"),schemaPath:new sr.Name("schemaPath"),params:new sr.Name("params"),propertyName:new sr.Name("propertyName"),message:new sr.Name("message"),schema:new sr.Name("schema"),parentSchema:new sr.Name("parentSchema")};function HM(e,r,t){let{createErrors:n}=e.it;return n===!1?(0,sr._)`{}`:I9(e,r,t)}function I9(e,r,t={}){let{gen:n,it:i}=e,a=[q9(i,t),$9(e,t)];return L9(e,r,a),n.object(...a)}function q9({errorPath:e},{instancePath:r}){let t=r?(0,sr.str)`${e}${(0,tc.getErrorPath)(r,tc.Type.Str)}`:e;return[st.default.instancePath,(0,sr.strConcat)(st.default.instancePath,t)]}function $9({keyword:e,it:{errSchemaPath:r}},{schemaPath:t,parentSchema:n}){let i=n?r:(0,sr.str)`${r}/${e}`;return t&&(i=(0,sr.str)`${i}${(0,tc.getErrorPath)(t,tc.Type.Str)}`),[pi.schemaPath,i]}function L9(e,{params:r,message:t},n){let{keyword:i,data:a,schemaValue:o,it:l}=e,{opts:c,propertyName:s,topSchemaRef:u,schemaPath:f}=l;n.push([pi.keyword,i],[pi.params,typeof r=="function"?r(e):r||(0,sr._)`{}`]),c.messages&&n.push([pi.message,typeof t=="function"?t(e):t]),c.verbose&&n.push([pi.schema,o],[pi.parentSchema,(0,sr._)`${u}${f}`],[st.default.data,a]),s&&n.push([pi.propertyName,s])}});var KM=me(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});ea.boolOrEmptySchema=ea.topBoolOrEmptySchema=void 0;var j9=Xi(),k9=Ve(),U9=an(),G9={message:"boolean schema is false"};function V9(e){let{gen:r,schema:t,validateName:n}=e;t===!1?WM(e,!1):typeof t=="object"&&t.$async===!0?r.return(U9.default.data):(r.assign((0,k9._)`${n}.errors`,null),r.return(!0))}ea.topBoolOrEmptySchema=V9;function H9(e,r){let{gen:t,schema:n}=e;n===!1?(t.var(r,!1),WM(e)):t.var(r,!0)}ea.boolOrEmptySchema=H9;function WM(e,r){let{gen:t,data:n}=e,i={gen:t,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,j9.reportError)(i,G9,void 0,r)}});var Zf=me(ra=>{"use strict";Object.defineProperty(ra,"__esModule",{value:!0});ra.getRules=ra.isJSONType=void 0;var W9=["string","number","integer","boolean","null","object","array"],K9=new Set(W9);function Z9(e){return typeof e=="string"&&K9.has(e)}ra.isJSONType=Z9;function J9(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}ra.getRules=J9});var Jf=me(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.shouldUseRule=Ln.shouldUseGroup=Ln.schemaHasRulesForType=void 0;function Q9({schema:e,self:r},t){let n=r.RULES.types[t];return n&&n!==!0&&ZM(e,n)}Ln.schemaHasRulesForType=Q9;function ZM(e,r){return r.rules.some(t=>JM(e,t))}Ln.shouldUseGroup=ZM;function JM(e,r){var t;return e[r.keyword]!==void 0||((t=r.definition.implements)===null||t===void 0?void 0:t.some(n=>e[n]!==void 0))}Ln.shouldUseRule=JM});var Ka=me(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.reportTypeError=it.checkDataTypes=it.checkDataType=it.coerceAndCheckDataType=it.getJSONTypes=it.getSchemaTypes=it.DataType=void 0;var Y9=Zf(),X9=Jf(),eL=Xi(),Qe=Ve(),QM=fr(),ta;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(ta||(it.DataType=ta={}));function rL(e){let r=YM(e.type);if(r.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!r.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&r.push("null")}return r}it.getSchemaTypes=rL;function YM(e){let r=Array.isArray(e)?e:e?[e]:[];if(r.every(Y9.isJSONType))return r;throw new Error("type must be JSONType or JSONType[]: "+r.join(","))}it.getJSONTypes=YM;function tL(e,r){let{gen:t,data:n,opts:i}=e,a=nL(r,i.coerceTypes),o=r.length>0&&!(a.length===0&&r.length===1&&(0,X9.schemaHasRulesForType)(e,r[0]));if(o){let l=Yf(r,n,i.strictNumbers,ta.Wrong);t.if(l,()=>{a.length?iL(e,r,a):Xf(e)})}return o}it.coerceAndCheckDataType=tL;var XM=new Set(["string","number","integer","boolean","null"]);function nL(e,r){return r?e.filter(t=>XM.has(t)||r==="array"&&t==="array"):[]}function iL(e,r,t){let{gen:n,data:i,opts:a}=e,o=n.let("dataType",(0,Qe._)`typeof ${i}`),l=n.let("coerced",(0,Qe._)`undefin