UNPKG

azion

Version:

Azion Packages for Edge Computing.

5 lines (4 loc) 924 kB
var v4=Object.create;var Jf=Object.defineProperty;var g4=Object.getOwnPropertyDescriptor;var y4=Object.getOwnPropertyNames;var x4=Object.getPrototypeOf,b4=Object.prototype.hasOwnProperty;var w4=(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 Q=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),_4=(e,r)=>{for(var t in r)Jf(e,t,{get:r[t],enumerable:!0})},D4=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of y4(r))!b4.call(e,i)&&i!==t&&Jf(e,i,{get:()=>r[i],enumerable:!(n=g4(r,i))||n.enumerable});return e};var pr=(e,r,t)=>(t=e!=null?v4(x4(e)):{},D4(r||!e||!e.__esModule?Jf(t,"default",{value:e,enumerable:!0}):t,e));var Ni=Q((Qne,Fn)=>{"use strict";function el(){return Fn.exports=el=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},Fn.exports.__esModule=!0,Fn.exports.default=Fn.exports,el.apply(null,arguments)}Fn.exports=el,Fn.exports.__esModule=!0,Fn.exports.default=Fn.exports});var Wv=Q((ml,Gv)=>{"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 l=s*s;return l*(l*(l*(l*(l*(l*(l*(l/20922789888e3-1/87178291200)+1/479001600)-1/3628800)+1/40320)-1/720)+1/24)-1/2)},i=function(s,u){var l=Math.abs(s),m=Math.abs(u);return l<3e3&&m<3e3?Math.sqrt(l*l+m*m):(l<m?(l=m,m=s/u):m=u/s,l*Math.sqrt(1+m*m))},a=function(){throw SyntaxError("Invalid Param")};function o(s,u){var l=Math.abs(s),m=Math.abs(u);return s===0?Math.log(m):u===0?Math.log(l):l<3e3&&m<3e3?Math.log(s*s+u*u)*.5:(s=s/2,u=u/2,.5*Math.log(s*s+u*u)+Math.LN2)}var f=function(s,u){var l={re:0,im:0};if(s==null)l.re=l.im=0;else if(u!==void 0)l.re=s,l.im=u;else switch(typeof s){case"object":if("im"in s&&"re"in s)l.re=s.re,l.im=s.im;else if("abs"in s&&"arg"in s){if(!Number.isFinite(s.abs)&&Number.isFinite(s.arg))return c.INFINITY;l.re=s.abs*Math.cos(s.arg),l.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;l.re=s.r*Math.cos(s.phi),l.im=s.r*Math.sin(s.phi)}else s.length===2?(l.re=s[0],l.im=s[1]):a();break;case"string":l.im=l.re=0;var m=s.match(/\d+\.?\d*e[+-]?\d+|\d+\.?\d*|\.\d+|./g),p=1,d=0;m===null&&a();for(var h=0;h<m.length;h++){var y=m[h];y===" "||y===" "||y===` `||(y==="+"?p++:y==="-"?d++:y==="i"||y==="I"?(p+d===0&&a(),m[h+1]!==" "&&!isNaN(m[h+1])?(l.im+=parseFloat((d%2?"-":"")+m[h+1]),h++):l.im+=parseFloat((d%2?"-":"")+"1"),p=d=0):((p+d===0||isNaN(y))&&a(),m[h+1]==="i"||m[h+1]==="I"?(l.im+=parseFloat((d%2?"-":"")+y),h++):l.re+=parseFloat((d%2?"-":"")+y),p=d=0))}p+d>0&&a();break;case"number":l.im=0,l.re=s;break;default:a()}return isNaN(l.re)||isNaN(l.im),l};function c(s,u){if(!(this instanceof c))return new c(s,u);var l=f(s,u);this.re=l.re,this.im=l.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 l=new c(s,u);return this.isInfinite()&&l.isInfinite()?c.NAN:this.isInfinite()||l.isInfinite()?c.INFINITY:new c(this.re+l.re,this.im+l.im)},sub:function(s,u){var l=new c(s,u);return this.isInfinite()&&l.isInfinite()?c.NAN:this.isInfinite()||l.isInfinite()?c.INFINITY:new c(this.re-l.re,this.im-l.im)},mul:function(s,u){var l=new c(s,u);return this.isInfinite()&&l.isZero()||this.isZero()&&l.isInfinite()?c.NAN:this.isInfinite()||l.isInfinite()?c.INFINITY:l.im===0&&this.im===0?new c(this.re*l.re,0):new c(this.re*l.re-this.im*l.im,this.re*l.im+this.im*l.re)},div:function(s,u){var l=new c(s,u);if(this.isZero()&&l.isZero()||this.isInfinite()&&l.isInfinite())return c.NAN;if(this.isInfinite()||l.isZero())return c.INFINITY;if(this.isZero()||l.isInfinite())return c.ZERO;s=this.re,u=this.im;var m=l.re,p=l.im,d,h;return p===0?new c(s/m,u/m):Math.abs(m)<Math.abs(p)?(h=m/p,d=m*h+p,new c((s*h+u)/d,(u*h-s)/d)):(h=p/m,d=p*h+m,new c((s+u*h)/d,(u-s*h)/d))},pow:function(s,u){var l=new c(s,u);if(s=this.re,u=this.im,l.isZero())return c.ONE;if(l.im===0){if(u===0&&s>0)return new c(Math.pow(s,l.re),0);if(s===0)switch((l.re%4+4)%4){case 0:return new c(Math.pow(u,l.re),0);case 1:return new c(0,Math.pow(u,l.re));case 2:return new c(-Math.pow(u,l.re),0);case 3:return new c(0,-Math.pow(u,l.re))}}if(s===0&&u===0&&l.re>0&&l.im>=0)return c.ZERO;var m=Math.atan2(u,s),p=o(s,u);return s=Math.exp(l.re*p-l.im*m),u=l.im*p+l.re*m,new c(s*Math.cos(u),s*Math.sin(u))},sqrt:function(){var s=this.re,u=this.im,l=this.abs(),m,p;if(s>=0){if(u===0)return new c(Math.sqrt(s),0);m=.5*Math.sqrt(2*(l+s))}else m=Math.abs(u)/Math.sqrt(2*(l-s));return s<=0?p=.5*Math.sqrt(2*(l-s)):p=Math.abs(u)/Math.sqrt(2*(l+s)),new c(m,u<0?-p:p)},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,l=Math.cos(s)+r(u);return new c(Math.sin(s)/l,t(u)/l)},cot:function(){var s=2*this.re,u=2*this.im,l=Math.cos(s)-r(u);return new c(-Math.sin(s)/l,t(u)/l)},sec:function(){var s=this.re,u=this.im,l=.5*r(2*u)+.5*Math.cos(2*s);return new c(Math.cos(s)*r(u)/l,Math.sin(s)*t(u)/l)},csc:function(){var s=this.re,u=this.im,l=.5*r(2*u)-.5*Math.cos(2*s);return new c(Math.sin(s)*r(u)/l,-Math.cos(s)*t(u)/l)},asin:function(){var s=this.re,u=this.im,l=new c(u*u-s*s+1,-2*s*u).sqrt(),m=new c(l.re-u,l.im+s).log();return new c(m.im,-m.re)},acos:function(){var s=this.re,u=this.im,l=new c(u*u-s*s+1,-2*s*u).sqrt(),m=new c(l.re-u,l.im+s).log();return new c(Math.PI/2-m.im,m.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 l=s*s+(1-u)*(1-u),m=new c((1-u*u-s*s)/l,-2*s/l).log();return new c(-.5*m.im,.5*m.re)},acot:function(){var s=this.re,u=this.im;if(u===0)return new c(Math.atan2(1,s),0);var l=s*s+u*u;return l!==0?new c(s/l,-u/l).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 l=s*s+u*u;return l!==0?new c(s/l,-u/l).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 l=s*s+u*u;return l!==0?new c(s/l,-u/l).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,l=r(s)+Math.cos(u);return new c(t(s)/l,Math.sin(u)/l)},coth:function(){var s=2*this.re,u=2*this.im,l=r(s)-Math.cos(u);return new c(t(s)/l,-Math.sin(u)/l)},csch:function(){var s=this.re,u=this.im,l=Math.cos(2*u)-r(2*s);return new c(-2*t(s)*Math.cos(u)/l,2*r(s)*Math.sin(u)/l)},sech:function(){var s=this.re,u=this.im,l=Math.cos(2*u)+r(2*s);return new c(2*r(s)*Math.cos(u)/l,-2*t(s)*Math.sin(u)/l)},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,l=s>1&&u===0,m=1-s,p=1+s,d=m*m+u*u,h=d!==0?new c((p*m-u*u)/d,(u*m+p*u)/d):new c(s!==-1?s/0:0,u!==0?u/0:0),y=h.re;return h.re=o(h.re,h.im)/2,h.im=Math.atan2(h.im,y)/2,l&&(h.im=-h.im),h},acoth:function(){var s=this.re,u=this.im;if(s===0&&u===0)return new c(0,Math.PI/2);var l=s*s+u*u;return l!==0?new c(s/l,-u/l).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 l=s*s+u*u;return l!==0?new c(s/l,-u/l).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 l=s*s+u*u;return l!==0?new c(s/l,-u/l).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,l=s*s+u*u;return new c(s/l,-u/l)},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 l=new c(s,u);return Math.abs(l.re-this.re)<=c.EPSILON&&Math.abs(l.im-this.im)<=c.EPSILON},clone:function(){return new c(this.re,this.im)},toString:function(){var s=this.re,u=this.im,l="";return this.isNaN()?"NaN":this.isInfinite()?"Infinity":(Math.abs(s)<c.EPSILON&&(s=0),Math.abs(u)<c.EPSILON&&(u=0),u===0?l+s:(s!==0?(l+=s,l+=" ",u<0?(u=-u,l+="-"):l+="+",l+=" "):u<0&&(u=-u,l+="-"),u!==1&&(l+=u),l+"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 ml=="object"?(Object.defineProperty(c,"__esModule",{value:!0}),c.default=c,c.Complex=c,Gv.exports=c):e.Complex=c})(ml)});var xm=Q((ade,zn)=>{"use strict";function ym(e){"@babel/helpers - typeof";return zn.exports=ym=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},zn.exports.__esModule=!0,zn.exports.default=zn.exports,ym(e)}zn.exports=ym,zn.exports.__esModule=!0,zn.exports.default=zn.exports});var _x=Q((ode,yo)=>{"use strict";var wx=xm().default;function v6(e,r){if(wx(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(wx(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}yo.exports=v6,yo.exports.__esModule=!0,yo.exports.default=yo.exports});var Dx=Q((sde,xo)=>{"use strict";var g6=xm().default,y6=_x();function x6(e){var r=y6(e,"string");return g6(r)=="symbol"?r:r+""}xo.exports=x6,xo.exports.__esModule=!0,xo.exports.default=xo.exports});var tt=Q((ude,bo)=>{"use strict";var b6=Dx();function w6(e,r,t){return(r=b6(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}bo.exports=w6,bo.exports.__esModule=!0,bo.exports.default=bo.exports});var Mb=Q((ige,Sb)=>{"use strict";Sb.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,f=/^0/,c=function(v){return e.insensitive&&(""+v).toLowerCase()||""+v},s=c(r).replace(i,"")||"",u=c(t).replace(i,"")||"",l=s.replace(n,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),m=u.replace(n,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),p=parseInt(s.match(o),16)||l.length!==1&&s.match(a)&&Date.parse(s),d=parseInt(u.match(o),16)||p&&u.match(a)&&Date.parse(u)||null,h,y;if(d){if(p<d)return-1;if(p>d)return 1}for(var x=0,_=Math.max(l.length,m.length);x<_;x++){if(h=!(l[x]||"").match(f)&&parseFloat(l[x])||l[x]||0,y=!(m[x]||"").match(f)&&parseFloat(m[x])||m[x]||0,isNaN(h)!==isNaN(y))return isNaN(h)?1:-1;if(typeof h!=typeof y&&(h+="",y+=""),h<y)return-1;if(h>y)return 1}return 0}});var Xw=Q((x1e,Yw)=>{"use strict";var wm=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},L7={"{":"\\{","}":"\\}","\\":"\\textbackslash{}","#":"\\#",$:"\\$","%":"\\%","&":"\\&","^":"\\textasciicircum{}",_:"\\_","~":"\\textasciitilde{}"},k7={"\u2013":"\\--","\u2014":"\\---"," ":"~"," ":"\\qquad{}","\r\n":"\\newline{}","\n":"\\newline{}"},j7=function(r,t){return wm({},r,t)};Yw.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?j7:i,o=String(e),f="",c=a(wm({},L7),n?wm({},k7):{}),s=Object.keys(c),u=function(){var m=!1;s.forEach(function(p,d){m||o.length>=p.length&&o.slice(0,p.length)===p&&(f+=c[s[d]],o=o.slice(p.length,o.length),m=!0)}),m||(f+=o.slice(0,1),o=o.slice(1,o.length))};o;)u();return f}});var OM=Q((TM,Cm)=>{"use strict";(function(e,r,t){function n(f){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(f),c.s0<0&&(c.s0+=1),c.s1-=s(f),c.s1<0&&(c.s1+=1),c.s2-=s(f),c.s2<0&&(c.s2+=1),s=null}function i(f,c){return c.c=f.c,c.s0=f.s0,c.s1=f.s1,c.s2=f.s2,c}function a(f,c){var s=new n(f),u=c&&c.state,l=s.next;return l.int32=function(){return s.next()*4294967296|0},l.double=function(){return l()+(l()*2097152|0)*11102230246251565e-32},l.quick=l,u&&(typeof u=="object"&&i(u,s),l.state=function(){return i(s,{})}),l}function o(){var f=4022871197,c=function(s){s=String(s);for(var u=0;u<s.length;u++){f+=s.charCodeAt(u);var l=.02519603282416938*f;f=l>>>0,l-=f,l*=f,f=l>>>0,l-=f,f+=l*4294967296}return(f>>>0)*23283064365386963e-26};return c}r&&r.exports?r.exports=a:t&&t.amd?t(function(){return a}):this.alea=a})(TM,typeof Cm=="object"&&Cm,typeof define=="function"&&define)});var PM=Q((FM,Tm)=>{"use strict";(function(e,r,t){function n(o){var f=this,c="";f.x=0,f.y=0,f.z=0,f.w=0,f.next=function(){var u=f.x^f.x<<11;return f.x=f.y,f.y=f.z,f.z=f.w,f.w^=f.w>>>19^u^u>>>8},o===(o|0)?f.x=o:c+=o;for(var s=0;s<c.length+64;s++)f.x^=c.charCodeAt(s)|0,f.next()}function i(o,f){return f.x=o.x,f.y=o.y,f.z=o.z,f.w=o.w,f}function a(o,f){var c=new n(o),s=f&&f.state,u=function(){return(c.next()>>>0)/4294967296};return u.double=function(){do var l=c.next()>>>11,m=(c.next()>>>0)/4294967296,p=(l+m)/(1<<21);while(p===0);return p},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})(FM,typeof Tm=="object"&&Tm,typeof define=="function"&&define)});var $M=Q((RM,Om)=>{"use strict";(function(e,r,t){function n(o){var f=this,c="";f.next=function(){var u=f.x^f.x>>>2;return f.x=f.y,f.y=f.z,f.z=f.w,f.w=f.v,(f.d=f.d+362437|0)+(f.v=f.v^f.v<<4^(u^u<<1))|0},f.x=0,f.y=0,f.z=0,f.w=0,f.v=0,o===(o|0)?f.x=o:c+=o;for(var s=0;s<c.length+64;s++)f.x^=c.charCodeAt(s)|0,s==c.length&&(f.d=f.x<<10^f.x>>>4),f.next()}function i(o,f){return f.x=o.x,f.y=o.y,f.z=o.z,f.w=o.w,f.v=o.v,f.d=o.d,f}function a(o,f){var c=new n(o),s=f&&f.state,u=function(){return(c.next()>>>0)/4294967296};return u.double=function(){do var l=c.next()>>>11,m=(c.next()>>>0)/4294967296,p=(l+m)/(1<<21);while(p===0);return p},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})(RM,typeof Om=="object"&&Om,typeof define=="function"&&define)});var BM=Q((qM,Fm)=>{"use strict";(function(e,r,t){function n(o){var f=this;f.next=function(){var s=f.x,u=f.i,l,m,p;return l=s[u],l^=l>>>7,m=l^l<<24,l=s[u+1&7],m^=l^l>>>10,l=s[u+3&7],m^=l^l>>>3,l=s[u+4&7],m^=l^l<<7,l=s[u+7&7],l=l^l<<13,m^=l^l<<9,s[u]=m,f.i=u+1&7,m};function c(s,u){var l,m,p=[];if(u===(u|0))m=p[0]=u;else for(u=""+u,l=0;l<u.length;++l)p[l&7]=p[l&7]<<15^u.charCodeAt(l)+p[l+1&7]<<13;for(;p.length<8;)p.push(0);for(l=0;l<8&&p[l]===0;++l);for(l==8?m=p[7]=-1:m=p[l],s.x=p,s.i=0,l=256;l>0;--l)s.next()}c(f,o)}function i(o,f){return f.x=o.x.slice(),f.i=o.i,f}function a(o,f){o==null&&(o=+new Date);var c=new n(o),s=f&&f.state,u=function(){return(c.next()>>>0)/4294967296};return u.double=function(){do var l=c.next()>>>11,m=(c.next()>>>0)/4294967296,p=(l+m)/(1<<21);while(p===0);return p},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})(qM,typeof Fm=="object"&&Fm,typeof define=="function"&&define)});var zM=Q((IM,Pm)=>{"use strict";(function(e,r,t){function n(o){var f=this;f.next=function(){var s=f.w,u=f.X,l=f.i,m,p;return f.w=s=s+1640531527|0,p=u[l+34&127],m=u[l=l+1&127],p^=p<<13,m^=m<<17,p^=p>>>15,m^=m>>>12,p=u[l]=p^m,f.i=l,p+(s^s>>>16)|0};function c(s,u){var l,m,p,d,h,y=[],x=128;for(u===(u|0)?(m=u,u=null):(u=u+"\0",m=0,x=Math.max(x,u.length)),p=0,d=-32;d<x;++d)u&&(m^=u.charCodeAt((d+32)%u.length)),d===0&&(h=m),m^=m<<10,m^=m>>>15,m^=m<<4,m^=m>>>13,d>=0&&(h=h+1640531527|0,l=y[d&127]^=m+h,p=l==0?p+1:0);for(p>=128&&(y[(u&&u.length||0)&127]=-1),p=127,d=4*128;d>0;--d)m=y[p+34&127],l=y[p=p+1&127],m^=m<<13,l^=l<<17,m^=m>>>15,l^=l>>>12,y[p]=m^l;s.w=h,s.X=y,s.i=p}c(f,o)}function i(o,f){return f.i=o.i,f.w=o.w,f.X=o.X.slice(),f}function a(o,f){o==null&&(o=+new Date);var c=new n(o),s=f&&f.state,u=function(){return(c.next()>>>0)/4294967296};return u.double=function(){do var l=c.next()>>>11,m=(c.next()>>>0)/4294967296,p=(l+m)/(1<<21);while(p===0);return p},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})(IM,typeof Pm=="object"&&Pm,typeof define=="function"&&define)});var kM=Q((LM,Rm)=>{"use strict";(function(e,r,t){function n(o){var f=this,c="";f.next=function(){var u=f.b,l=f.c,m=f.d,p=f.a;return u=u<<25^u>>>7^l,l=l-m|0,m=m<<24^m>>>8^p,p=p-u|0,f.b=u=u<<20^u>>>12^l,f.c=l=l-m|0,f.d=m<<16^l>>>16^p,f.a=p-u|0},f.a=0,f.b=0,f.c=-1640531527,f.d=1367130551,o===Math.floor(o)?(f.a=o/4294967296|0,f.b=o|0):c+=o;for(var s=0;s<c.length+20;s++)f.b^=c.charCodeAt(s)|0,f.next()}function i(o,f){return f.a=o.a,f.b=o.b,f.c=o.c,f.d=o.d,f}function a(o,f){var c=new n(o),s=f&&f.state,u=function(){return(c.next()>>>0)/4294967296};return u.double=function(){do var l=c.next()>>>11,m=(c.next()>>>0)/4294967296,p=(l+m)/(1<<21);while(p===0);return p},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})(LM,typeof Rm=="object"&&Rm,typeof define=="function"&&define)});var UM=Q((jM,Bc)=>{"use strict";(function(e,r,t){var n=256,i=6,a=52,o="random",f=t.pow(n,i),c=t.pow(2,a),s=c*2,u=n-1,l;function m(v,b,w){var g=[];b=b==!0?{entropy:!0}:b||{};var N=y(h(b.entropy?[v,_(r)]:v??x(),3),g),E=new p(g),D=function(){for(var A=E.g(i),M=f,T=0;A<c;)A=(A+T)*n,M*=n,T=E.g(1);for(;A>=s;)A/=2,M/=2,T>>>=1;return(A+T)/M};return D.int32=function(){return E.g(4)|0},D.quick=function(){return E.g(4)/4294967296},D.double=D,y(_(E.S),r),(b.pass||w||function(A,M,T,R){return R&&(R.S&&d(R,E),A.state=function(){return d(E,{})}),T?(t[o]=A,M):A})(D,N,"global"in b?b.global:this==t,b.state)}function p(v){var b,w=v.length,g=this,N=0,E=g.i=g.j=0,D=g.S=[];for(w||(v=[w++]);N<n;)D[N]=N++;for(N=0;N<n;N++)D[N]=D[E=u&E+v[N%w]+(b=D[N])],D[E]=b;(g.g=function(A){for(var M,T=0,R=g.i,q=g.j,$=g.S;A--;)M=$[R=u&R+1],T=T*n+$[u&($[R]=$[q=u&q+M])+($[q]=M)];return g.i=R,g.j=q,T})(n)}function d(v,b){return b.i=v.i,b.j=v.j,b.S=v.S.slice(),b}function h(v,b){var w=[],g=typeof v,N;if(b&&g=="object")for(N in v)try{w.push(h(v[N],b-1))}catch{}return w.length?w:g=="string"?v:v+"\0"}function y(v,b){for(var w=v+"",g,N=0;N<w.length;)b[u&N]=u&(g^=b[u&N]*19)+w.charCodeAt(N++);return _(b)}function x(){try{var v;return l&&(v=l.randomBytes)?v=v(n):(v=new Uint8Array(n),(e.crypto||e.msCrypto).getRandomValues(v)),_(v)}catch{var b=e.navigator,w=b&&b.plugins;return[+new Date,e,w,e.screen,_(r)]}}function _(v){return String.fromCharCode.apply(0,v)}if(y(t.random(),r),typeof Bc=="object"&&Bc.exports){Bc.exports=m;try{l=w4("crypto")}catch{}}else typeof define=="function"&&define.amd?define(function(){return m}):t["seed"+o]=m})(typeof self<"u"?self:jM,[],Math)});var HM=Q((TPe,VM)=>{"use strict";var aj=OM(),oj=PM(),sj=$M(),uj=BM(),cj=zM(),fj=kM(),$i=UM();$i.alea=aj;$i.xor128=oj;$i.xorwow=sj;$i.xorshift7=uj;$i.xor4096=cj;$i.tychei=fj;VM.exports=$i});var DT=Q((H8e,km)=>{"use strict";function Lm(){}Lm.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}};km.exports=Lm;km.exports.TinyEmitter=Lm});var Fa=Q(vr=>{"use strict";Object.defineProperty(vr,"__esModule",{value:!0});vr.regexpCode=vr.getEsmExportName=vr.getProperty=vr.safeStringify=vr.stringify=vr.strConcat=vr.addCodeArg=vr.str=vr._=vr.nil=vr._Code=vr.Name=vr.IDENTIFIER=vr._CodeOrName=void 0;var Ao=class{};vr._CodeOrName=Ao;vr.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var qi=class extends Ao{constructor(r){if(super(),!vr.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}}};vr.Name=qi;var Yt=class extends Ao{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 qi&&(t[n.str]=(t[n.str]||0)+1),t),{})}};vr._Code=Yt;vr.nil=new Yt("");function MT(e,...r){let t=[e[0]],n=0;for(;n<r.length;)Um(t,r[n]),t.push(e[++n]);return new Yt(t)}vr._=MT;var jm=new Yt("+");function CT(e,...r){let t=[So(e[0])],n=0;for(;n<r.length;)t.push(jm),Um(t,r[n]),t.push(jm,So(e[++n]));return MU(t),new Yt(t)}vr.str=CT;function Um(e,r){r instanceof Yt?e.push(...r._items):r instanceof qi?e.push(r):e.push(OU(r))}vr.addCodeArg=Um;function MU(e){let r=1;for(;r<e.length-1;){if(e[r]===jm){let t=CU(e[r-1],e[r+1]);if(t!==void 0){e.splice(r-1,3,t);continue}e[r++]="+"}r++}}function CU(e,r){if(r==='""')return e;if(e==='""')return r;if(typeof e=="string")return r instanceof qi||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 qi))return`"${e}${r.slice(1)}`}function TU(e,r){return r.emptyStr()?e:e.emptyStr()?r:CT`${e}${r}`}vr.strConcat=TU;function OU(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:So(Array.isArray(e)?e.join(","):e)}function FU(e){return new Yt(So(e))}vr.stringify=FU;function So(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}vr.safeStringify=So;function PU(e){return typeof e=="string"&&vr.IDENTIFIER.test(e)?new Yt(`.${e}`):MT`[${e}]`}vr.getProperty=PU;function RU(e){if(typeof e=="string"&&vr.IDENTIFIER.test(e))return new Yt(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}vr.getEsmExportName=RU;function $U(e){return new Yt(e.toString())}vr.regexpCode=$U});var Gm=Q(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});Ot.ValueScope=Ot.ValueScopeName=Ot.Scope=Ot.varKinds=Ot.UsedValueState=void 0;var Tt=Fa(),Vm=class extends Error{constructor(r){super(`CodeGen: "code" for ${r} not defined`),this.value=r.value}},Lc;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(Lc||(Ot.UsedValueState=Lc={}));Ot.varKinds={const:new Tt.Name("const"),let:new Tt.Name("let"),var:new Tt.Name("var")};var kc=class{constructor({prefixes:r,parent:t}={}){this._names={},this._prefixes=r,this._parent=t}toName(r){return r instanceof Tt.Name?r:this.name(r)}name(r){return new Tt.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}}};Ot.Scope=kc;var jc=class extends Tt.Name{constructor(r,t){super(t),this.prefix=r}setValue(r,{property:t,itemIndex:n}){this.value=r,this.scopePath=(0,Tt._)`.${new Tt.Name(t)}[${n}]`}};Ot.ValueScopeName=jc;var qU=(0,Tt._)`\n`,Hm=class extends kc{constructor(r){super(r),this._values={},this._scope=r.scope,this.opts={...r,_n:r.lines?qU:Tt.nil}}get(){return this._scope}name(r){return new jc(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,f=this._values[a];if(f){let u=f.get(o);if(u)return u}else f=this._values[a]=new Map;f.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,Tt._)`${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=Tt.nil;for(let o in r){let f=r[o];if(!f)continue;let c=n[o]=n[o]||new Map;f.forEach(s=>{if(c.has(s))return;c.set(s,Lc.Started);let u=t(s);if(u){let l=this.opts.es5?Ot.varKinds.var:Ot.varKinds.const;a=(0,Tt._)`${a}${l} ${s} = ${u};${this.opts._n}`}else if(u=i?.(s))a=(0,Tt._)`${a}${u}${this.opts._n}`;else throw new Vm(s);c.set(s,Lc.Completed)})}return a}};Ot.ValueScope=Hm});var Ze=Q(nr=>{"use strict";Object.defineProperty(nr,"__esModule",{value:!0});nr.or=nr.and=nr.not=nr.CodeGen=nr.operators=nr.varKinds=nr.ValueScopeName=nr.ValueScope=nr.Scope=nr.Name=nr.regexpCode=nr.stringify=nr.getProperty=nr.nil=nr.strConcat=nr.str=nr._=void 0;var fr=Fa(),fn=Gm(),fi=Fa();Object.defineProperty(nr,"_",{enumerable:!0,get:function(){return fi._}});Object.defineProperty(nr,"str",{enumerable:!0,get:function(){return fi.str}});Object.defineProperty(nr,"strConcat",{enumerable:!0,get:function(){return fi.strConcat}});Object.defineProperty(nr,"nil",{enumerable:!0,get:function(){return fi.nil}});Object.defineProperty(nr,"getProperty",{enumerable:!0,get:function(){return fi.getProperty}});Object.defineProperty(nr,"stringify",{enumerable:!0,get:function(){return fi.stringify}});Object.defineProperty(nr,"regexpCode",{enumerable:!0,get:function(){return fi.regexpCode}});Object.defineProperty(nr,"Name",{enumerable:!0,get:function(){return fi.Name}});var Gc=Gm();Object.defineProperty(nr,"Scope",{enumerable:!0,get:function(){return Gc.Scope}});Object.defineProperty(nr,"ValueScope",{enumerable:!0,get:function(){return Gc.ValueScope}});Object.defineProperty(nr,"ValueScopeName",{enumerable:!0,get:function(){return Gc.ValueScopeName}});Object.defineProperty(nr,"varKinds",{enumerable:!0,get:function(){return Gc.varKinds}});nr.operators={GT:new fr._Code(">"),GTE:new fr._Code(">="),LT:new fr._Code("<"),LTE:new fr._Code("<="),EQ:new fr._Code("==="),NEQ:new fr._Code("!=="),NOT:new fr._Code("!"),OR:new fr._Code("||"),AND:new fr._Code("&&"),ADD:new fr._Code("+")};var jn=class{optimizeNodes(){return this}optimizeNames(r,t){return this}},Wm=class extends jn{constructor(r,t,n){super(),this.varKind=r,this.name=t,this.rhs=n}render({es5:r,_n:t}){let n=r?fn.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=Ra(this.rhs,r,t)),this}get names(){return this.rhs instanceof fr._CodeOrName?this.rhs.names:{}}},Uc=class extends jn{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 fr.Name&&!r[this.lhs.str]&&!this.sideEffects))return this.rhs=Ra(this.rhs,r,t),this}get names(){let r=this.lhs instanceof fr.Name?{}:{...this.lhs.names};return Hc(r,this.rhs)}},Zm=class extends Uc{constructor(r,t,n,i){super(r,n,i),this.op=t}render({_n:r}){return`${this.lhs} ${this.op}= ${this.rhs};`+r}},Km=class extends jn{constructor(r){super(),this.label=r,this.names={}}render({_n:r}){return`${this.label}:`+r}},Ym=class extends jn{constructor(r){super(),this.label=r,this.names={}}render({_n:r}){return`break${this.label?` ${this.label}`:""};`+r}},Xm=class extends jn{constructor(r){super(),this.error=r}render({_n:r}){return`throw ${this.error};`+r}get names(){return this.error.names}},Jm=class extends jn{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=Ra(this.code,r,t),this}get names(){return this.code instanceof fr._CodeOrName?this.code.names:{}}},Mo=class extends jn{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)||(BU(r,a.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((r,t)=>zi(r,t.names),{})}},Un=class extends Mo{render(r){return"{"+r._n+super.render(r)+"}"+r._n}},Qm=class extends Mo{},Pa=class extends Un{};Pa.kind="else";var Bi=class e extends Un{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 Pa(n):n}if(t)return r===!1?t instanceof e?t:t.nodes:this.nodes.length?this:new e(TT(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=Ra(this.condition,r,t),this}get names(){let r=super.names;return Hc(r,this.condition),this.else&&zi(r,this.else.names),r}};Bi.kind="if";var Ii=class extends Un{};Ii.kind="for";var ep=class extends Ii{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=Ra(this.iteration,r,t),this}get names(){return zi(super.names,this.iteration.names)}},rp=class extends Ii{constructor(r,t,n,i){super(),this.varKind=r,this.name=t,this.from=n,this.to=i}render(r){let t=r.es5?fn.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=Hc(super.names,this.from);return Hc(r,this.to)}},Vc=class extends Ii{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=Ra(this.iterable,r,t),this}get names(){return zi(super.names,this.iterable.names)}},Co=class extends Un{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)}};Co.kind="func";var To=class extends Mo{render(r){return"return "+super.render(r)}};To.kind="return";var tp=class extends Un{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&&zi(r,this.catch.names),this.finally&&zi(r,this.finally.names),r}},Oo=class extends Un{constructor(r){super(),this.error=r}render(r){return`catch(${this.error})`+super.render(r)}};Oo.kind="catch";var Fo=class extends Un{render(r){return"finally"+super.render(r)}};Fo.kind="finally";var np=class{constructor(r,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?` `:""},this._extScope=r,this._scope=new fn.Scope({parent:r}),this._nodes=[new Qm]}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 Wm(r,a,n)),a}const(r,t,n){return this._def(fn.varKinds.const,r,t,n)}let(r,t,n){return this._def(fn.varKinds.let,r,t,n)}var(r,t,n){return this._def(fn.varKinds.var,r,t,n)}assign(r,t,n){return this._leafNode(new Uc(r,t,n))}add(r,t){return this._leafNode(new Zm(r,nr.operators.ADD,t))}code(r){return typeof r=="function"?r():r!==fr.nil&&this._leafNode(new Jm(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,fr.addCodeArg)(t,i));return t.push("}"),new fr._Code(t)}if(r,t,n){if(this._blockNode(new Bi(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 Bi(r))}else(){return this._elseNode(new Pa)}endIf(){return this._endBlockNode(Bi,Pa)}_for(r,t){return this._blockNode(r),t&&this.code(t).endFor(),this}for(r,t){return this._for(new ep(r),t)}forRange(r,t,n,i,a=this.opts.es5?fn.varKinds.var:fn.varKinds.let){let o=this._scope.toName(r);return this._for(new rp(a,o,t,n),()=>i(o))}forOf(r,t,n,i=fn.varKinds.const){let a=this._scope.toName(r);if(this.opts.es5){let o=t instanceof fr.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,fr._)`${o}.length`,f=>{this.var(a,(0,fr._)`${o}[${f}]`),n(a)})}return this._for(new Vc("of",i,a,t),()=>n(a))}forIn(r,t,n,i=this.opts.es5?fn.varKinds.var:fn.varKinds.const){if(this.opts.ownProperties)return this.forOf(r,(0,fr._)`Object.keys(${t})`,n);let a=this._scope.toName(r);return this._for(new Vc("in",i,a,t),()=>n(a))}endFor(){return this._endBlockNode(Ii)}label(r){return this._leafNode(new Km(r))}break(r){return this._leafNode(new Ym(r))}return(r){let t=new To;if(this._blockNode(t),this.code(r),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(To)}try(r,t,n){if(!t&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new tp;if(this._blockNode(i),this.code(r),t){let a=this.name("e");this._currNode=i.catch=new Oo(a),t(a)}return n&&(this._currNode=i.finally=new Fo,this.code(n)),this._endBlockNode(Oo,Fo)}throw(r){return this._leafNode(new Xm(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=fr.nil,n,i){return this._blockNode(new Co(r,t,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(Co)}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 Bi))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}};nr.CodeGen=np;function zi(e,r){for(let t in r)e[t]=(e[t]||0)+(r[t]||0);return e}function Hc(e,r){return r instanceof fr._CodeOrName?zi(e,r.names):e}function Ra(e,r,t){if(e instanceof fr.Name)return n(e);if(!i(e))return e;return new fr._Code(e._items.reduce((a,o)=>(o instanceof fr.Name&&(o=n(o)),o instanceof fr._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 fr._Code&&a._items.some(o=>o instanceof fr.Name&&r[o.str]===1&&t[o.str]!==void 0)}}function BU(e,r){for(let t in r)e[t]=(e[t]||0)-(r[t]||0)}function TT(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,fr._)`!${ip(e)}`}nr.not=TT;var IU=OT(nr.operators.AND);function zU(...e){return e.reduce(IU)}nr.and=zU;var LU=OT(nr.operators.OR);function kU(...e){return e.reduce(LU)}nr.or=kU;function OT(e){return(r,t)=>r===fr.nil?t:t===fr.nil?r:(0,fr._)`${ip(r)} ${e} ${ip(t)}`}function ip(e){return e instanceof fr.Name?e:(0,fr._)`(${e})`}});var gr=Q(sr=>{"use strict";Object.defineProperty(sr,"__esModule",{value:!0});sr.checkStrictMode=sr.getErrorPath=sr.Type=sr.useFunc=sr.setEvaluated=sr.evaluatedPropsToName=sr.mergeEvaluated=sr.eachItem=sr.unescapeJsonPointer=sr.escapeJsonPointer=sr.escapeFragment=sr.unescapeFragment=sr.schemaRefOrVal=sr.schemaHasRulesButRef=sr.schemaHasRules=sr.checkUnknownRules=sr.alwaysValidSchema=sr.toHash=void 0;var Cr=Ze(),jU=Fa();function UU(e){let r={};for(let t of e)r[t]=!0;return r}sr.toHash=UU;function VU(e,r){return typeof r=="boolean"?r:Object.keys(r).length===0?!0:(RT(e,r),!$T(r,e.self.RULES.all))}sr.alwaysValidSchema=VU;function RT(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]||IT(e,`unknown keyword: "${a}"`)}sr.checkUnknownRules=RT;function $T(e,r){if(typeof e=="boolean")return!e;for(let t in e)if(r[t])return!0;return!1}sr.schemaHasRules=$T;function HU(e,r){if(typeof e=="boolean")return!e;for(let t in e)if(t!=="$ref"&&r.all[t])return!0;return!1}sr.schemaHasRulesButRef=HU;function GU({topSchemaRef:e,schemaPath:r},t,n,i){if(!i){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,Cr._)`${t}`}return(0,Cr._)`${e}${r}${(0,Cr.getProperty)(n)}`}sr.schemaRefOrVal=GU;function WU(e){return qT(decodeURIComponent(e))}sr.unescapeFragment=WU;function ZU(e){return encodeURIComponent(op(e))}sr.escapeFragment=ZU;function op(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}sr.escapeJsonPointer=op;function qT(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}sr.unescapeJsonPointer=qT;function KU(e,r){if(Array.isArray(e))for(let t of e)r(t);else r(e)}sr.eachItem=KU;function FT({mergeNames:e,mergeToName:r,mergeValues:t,resultToName:n}){return(i,a,o,f)=>{let c=o===void 0?a:o instanceof Cr.Name?(a instanceof Cr.Name?e(i,a,o):r(i,a,o),o):a instanceof Cr.Name?(r(i,o,a),a):t(a,o);return f===Cr.Name&&!(c instanceof Cr.Name)?n(i,c):c}}sr.mergeEvaluated={props:FT({mergeNames:(e,r,t)=>e.if((0,Cr._)`${t} !== true && ${r} !== undefined`,()=>{e.if((0,Cr._)`${r} === true`,()=>e.assign(t,!0),()=>e.assign(t,(0,Cr._)`${t} || {}`).code((0,Cr._)`Object.assign(${t}, ${r})`))}),mergeToName:(e,r,t)=>e.if((0,Cr._)`${t} !== true`,()=>{r===!0?e.assign(t,!0):(e.assign(t,(0,Cr._)`${t} || {}`),sp(e,t,r))}),mergeValues:(e,r)=>e===!0?!0:{...e,...r},resultToName:BT}),items:FT({mergeNames:(e,r,t)=>e.if((0,Cr._)`${t} !== true && ${r} !== undefined`,()=>e.assign(t,(0,Cr._)`${r} === true ? true : ${t} > ${r} ? ${t} : ${r}`)),mergeToName:(e,r,t)=>e.if((0,Cr._)`${t} !== true`,()=>e.assign(t,r===!0?!0:(0,Cr._)`${t} > ${r} ? ${t} : ${r}`)),mergeValues:(e,r)=>e===!0?!0:Math.max(e,r),resultToName:(e,r)=>e.var("items",r)})};function BT(e,r){if(r===!0)return e.var("props",!0);let t=e.var("props",(0,Cr._)`{}`);return r!==void 0&&sp(e,t,r),t}sr.evaluatedPropsToName=BT;function sp(e,r,t){Object.keys(t).forEach(n=>e.assign((0,Cr._)`${r}${(0,Cr.getProperty)(n)}`,!0))}sr.setEvaluated=sp;var PT={};function YU(e,r){return e.scopeValue("func",{ref:r,code:PT[r.code]||(PT[r.code]=new jU._Code(r.code))})}sr.useFunc=YU;var ap;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(ap||(sr.Type=ap={}));function XU(e,r,t){if(e instanceof Cr.Name){let n=r===ap.Num;return t?n?(0,Cr._)`"[" + ${e} + "]"`:(0,Cr._)`"['" + ${e} + "']"`:n?(0,Cr._)`"/" + ${e}`:(0,Cr._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,Cr.getProperty)(e).toString():"/"+op(e)}sr.getErrorPath=XU;function IT(e,r,t=e.opts.strictSchema){if(t){if(r=`strict mode: ${r}`,t===!0)throw new Error(r);e.self.logger.warn(r)}}sr.checkStrictMode=IT});var An=Q(up=>{"use strict";Object.defineProperty(up,"__esModule",{value:!0});var pt=Ze(),JU={data:new pt.Name("data"),valCxt:new pt.Name("valCxt"),instancePath:new pt.Name("instancePath"),parentData:new pt.Name("parentData"),parentDataProperty:new pt.Name("parentDataProperty"),rootData:new pt.Name("rootData"),dynamicAnchors:new pt.Name("dynamicAnchors"),vErrors:new pt.Name("vErrors"),errors:new pt.Name("errors"),this:new pt.Name("this"),self:new pt.Name("self"),scope:new pt.Name("scope"),json:new pt.Name("json"),jsonPos:new pt.Name("jsonPos"),jsonLen:new pt.Name("jsonLen"),jsonPart:new pt.Name("jsonPart")};up.default=JU});var $a=Q(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.extendErrors=dt.resetErrorsCount=dt.reportExtraError=dt.reportError=dt.keyword$DataError=dt.keywordError=void 0;var mr=Ze(),Wc=gr(),xt=An();dt.keywordError={message:({keyword:e})=>(0,mr.str)`must pass "${e}" keyword validation`};dt.keyword$DataError={message:({keyword:e,schemaType:r})=>r?(0,mr.str)`"${e}" keyword must be ${r} ($data)`:(0,mr.str)`"${e}" keyword is invalid ($data)`};function QU(e,r=dt.keywordError,t,n){let{it:i}=e,{gen:a,compositeRule:o,allErrors:f}=i,c=kT(e,r,t);n??(o||f)?zT(a,c):LT(i,(0,mr._)`[${c}]`)}dt.reportError=QU;function eV(e,r=dt.keywordError,t){let{it:n}=e,{gen:i,compositeRule:a,allErrors:o}=n,f=kT(e,r,t);zT(i,f),a||o||LT(n,xt.default.vErrors)}dt.reportExtraError=eV;function rV(e,r){e.assign(xt.default.errors,r),e.if((0,mr._)`${xt.default.vErrors} !== null`,()=>e.if(r,()=>e.assign((0,mr._)`${xt.default.vErrors}.length`,r),()=>e.assign(xt.default.vErrors,null)))}dt.resetErrorsCount=rV;function tV({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,xt.default.errors,f=>{e.const(o,(0,mr._)`${xt.default.vErrors}[${f}]`),e.if((0,mr._)`${o}.instancePath === undefined`,()=>e.assign((0,mr._)`${o}.instancePath`,(0,mr.strConcat)(xt.default.instancePath,a.errorPath))),e.assign((0,mr._)`${o}.schemaPath`,(0,mr.str)`${a.errSchemaPath}/${r}`),a.opts.verbose&&(e.assign((0,mr._)`${o}.schema`,t),e.assign((0,mr._)`${o}.data`,n))})}dt.extendErrors=tV;function zT(e,r){let t=e.const("err",r);e.if((0,mr._)`${xt.default.vErrors} === null`,()=>e.assign(xt.default.vErrors,(0,mr._)`[${t}]`),(0,mr._)`${xt.default.vErrors}.push(${t})`),e.code((0,mr._)`${xt.default.errors}++`)}function LT(e,r){let{gen:t,validateName:n,schemaEnv:i}=e;i.$async?t.throw((0,mr._)`new ${e.ValidationError}(${r})`):(t.assign((0,mr._)`${n}.errors`,r),t.return(!1))}var Li={keyword:new mr.Name("keyword"),schemaPath:new mr.Name("schemaPath"),params:new mr.Name("params"),propertyName:new mr.Name("propertyName"),message:new mr.Name("message"),schema:new mr.Name("schema"),parentSchema:new mr.Name("parentSchema")};function kT(e,r,t){let{createErrors:n}=e.it;return n===!1?(0,mr._)`{}`:nV(e,r,t)}function nV(e,r,t={}){let{gen:n,it:i}=e,a=[iV(i,t),aV(e,t)];return oV(e,r,a),n.object(...a)}function iV({errorPath:e},{instancePath:r}){let t=r?(0,mr.str)`${e}${(0,Wc.getErrorPath)(r,Wc.Type.Str)}`:e;return[xt.default.instancePath,(0,mr.strConcat)(xt.default.instancePath,t)]}function aV({keyword:e,it:{errSchemaPath:r}},{schemaPath:t,parentSchema:n}){let i=n?r:(0,mr.str)`${r}/${e}`;return t&&(i=(0,mr.str)`${i}${(0,Wc.getErrorPath)(t,Wc.Type.Str)}`),[Li.schemaPath,i]}function oV(e,{params:r,message:t},n){let{keyword:i,data:a,schemaValue:o,it:f}=e,{opts:c,propertyName:s,topSchemaRef:u,schemaPath:l}=f;n.push([Li.keyword,i],[Li.params,typeof r=="function"?r(e):r||(0,mr._)`{}`]),c.messages&&n.push([Li.message,typeof t=="function"?t(e):t]),c.verbose&&n.push([Li.schema,o],[Li.parentSchema,(0,mr._)`${u}${l}`],[xt.default.data,a]),s&&n.push([Li.propertyName,s])}});var UT=Q(qa=>{"use strict";Object.defineProperty(qa,"__esModule",{value:!0});qa.boolOrEmptySchema=qa.topBoolOrEmptySchema=void 0;var sV=$a(),uV=Ze(),cV=An(),fV={message:"boolean schema is false"};function lV(e){let{gen:r,schema:t,validateName:n}=e;t===!1?jT(e,!1):typeof t=="object"&&t.$async===!0?r.return(cV.default.data):(r.assign((0,uV._)`${n}.errors`,null),r.return(!0))}qa.topBoolOrEmptySchema=lV;function mV(e,r){let{gen:t,schema:n}=e;n===!1?(t.var(r,!1),jT(e)):t.var(r,!0)}qa.boolOrEmptySchema=mV;function jT(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,sV.reportError)(i,fV,void 0,r)}});var cp=Q(Ba=>{"use strict";Object.defineProperty(Ba,"__esModule",{value:!0});Ba.getRules=Ba.isJSONType=void 0;var pV=["string","number","integer","boolean","null","object","array"],dV=new Set(pV);function hV(e){return typeof e=="string"&&dV.has(e)}Ba.isJSONType=hV;function vV(){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:{}}}Ba.getRules=vV});var fp=Q(li=>{"use strict";Object.defineProperty(li,"__esModule",{value:!0});li.shouldUseRule=li.shouldUseGroup=li.schemaHasRulesForType=void 0;function gV({schema:e,self:r},t){let n=r.RULES.types[t];return n&&n!==!0&&VT(e,n)}li.schemaHasRulesForType=gV;function VT(e,r){return r.rules.some(t=>HT(e,t))}li.shouldUseGroup=VT;function HT(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))}li.shouldUseRule=HT});var Po=Q(ht=>{"use strict";Object.defineProperty(ht,"__esModule",{value:!0});ht.reportTypeError=ht.checkDataTypes=ht.checkDataType=ht.coerceAndCheckDataType=ht.getJSONTypes=ht.getSchemaTypes=ht.DataType=void 0;var yV=cp(),xV=fp(),bV=$a(),rr=Ze(),GT=gr(),Ia;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Ia||(ht.DataType=Ia={}));function wV(e){let r=WT(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}ht.getSchemaTypes=wV;function WT(e){let r=Array.isArray(e)?e:e?[e]:[];if(r.every(yV.isJSONType))return r;throw new Error("type must be JSONType or JSONType[]: "+r.join(","))}ht.getJSONTypes=WT;function _V(e,r){let{gen:t,data:n,opts:i}=e,a=DV(r,i.coerceTypes),o=r.length>0&&!(a.length===0&&r.length===1&&(0,xV.schemaHasRulesForType)(e,r[0]));if(o){let f=mp(r,n,i.strictNumbers,Ia.Wrong);t.if(f,()=>{a.length?EV(e,r,a):pp(e)})}return o}ht.coerceAndCheckDataType=_V;var ZT=new Set(["string","number","integer","boolean","null"]);function DV(e,r){return r?e.filter(t=>ZT.has(t)||r==="array"&&t==="array"):[]}function EV(e,r,t){let{gen:n,data:i,opts:a}=e,o=n.let("dataType",(0,rr._)`typeof ${i}`),f=n.let("coerced",(0,rr._)`undefined`);a.coerceTypes==="array"&&n.if((0,rr._)`${o} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,rr._)`${i}[0]`).assign(o,(0,rr._)`typeof ${i}`).if(mp(r,i,a.strictNumbers),()=>n.assign(f,i))),n.if((0,rr._)`${f} !== undefined`);for(let s of t)(ZT.has(s)||s==="array"&&a.coerceTypes==="array")&&c(s);n.else(),pp(e),n.endIf(),n.if((0,rr._)`${f} !== undefined`,()=>{n.assign(i,f),NV(e,f)});function c(s){switch(s){case"string":n.elseIf((0,rr._)`${o} == "number" || ${o} == "boolean"`).assign(f,(0,rr._)`"" + ${i}`).elseIf((0,rr._)`${i} === null`).assign(f,(0,rr._)`""`);return;case"number":n.elseIf((0,rr._)`${o} == "boolean" || ${i} === null || (${o} == "string" && ${i} && ${i} == +${i})`).assign(f,(0,rr._)`+${i}`);return;case"integer":n.elseIf((0,rr._)`${o} === "boolean" || ${i} === null