@graffiti-garden/wrapper-synchronize 0.2.4 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/{ajv-L3T2Y2ZC.js → ajv-UZKI6BMI.js} +2 -2
- package/dist/browser/chunk-YB7WCAZH.js +7 -0
- package/dist/browser/{chunk-ZOOM6B5R.js.map → chunk-YB7WCAZH.js.map} +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +4 -4
- package/dist/cjs/index.js +81 -131
- package/dist/cjs/index.js.map +2 -2
- package/dist/esm/index.js +82 -132
- package/dist/esm/index.js.map +2 -2
- package/dist/index.d.ts +31 -45
- package/dist/index.d.ts.map +1 -1
- package/package.json +7 -8
- package/src/index.spec.ts +110 -277
- package/src/index.ts +109 -161
- package/dist/browser/chunk-ZOOM6B5R.js +0 -7
- package/dist/browser/fast-json-patch-5UD2BOZL.js +0 -19
- package/dist/browser/fast-json-patch-5UD2BOZL.js.map +0 -7
- /package/dist/browser/{ajv-L3T2Y2ZC.js.map → ajv-UZKI6BMI.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as w,c as d,d as f,e as h}from"./chunk-ZOOM6B5R.js";var et=w(A=>{"use strict";d();h();f();Object.defineProperty(A,"__esModule",{value:!0});A.regexpCode=A.getEsmExportName=A.getProperty=A.safeStringify=A.stringify=A.strConcat=A.addCodeArg=A.str=A._=A.nil=A._Code=A.Name=A.IDENTIFIER=A._CodeOrName=void 0;var Ye=class{};A._CodeOrName=Ye;A.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var ke=class extends Ye{constructor(e){if(super(),!A.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};A.Name=ke;var te=class extends Ye{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,s)=>`${r}${s}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,s)=>(s instanceof ke&&(r[s.str]=(r[s.str]||0)+1),r),{})}};A._Code=te;A.nil=new te("");function Bs(t,...e){let r=[t[0]],s=0;for(;s<e.length;)dr(r,e[s]),r.push(t[++s]);return new te(r)}A._=Bs;var lr=new te("+");function Xs(t,...e){let r=[Ze(t[0])],s=0;for(;s<e.length;)r.push(lr),dr(r,e[s]),r.push(lr,Ze(t[++s]));return Pa(r),new te(r)}A.str=Xs;function dr(t,e){e instanceof te?t.push(...e._items):e instanceof ke?t.push(e):t.push(qa(e))}A.addCodeArg=dr;function Pa(t){let e=1;for(;e<t.length-1;){if(t[e]===lr){let r=Na(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function Na(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof ke||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof ke))return`"${t}${e.slice(1)}`}function ka(t,e){return e.emptyStr()?t:t.emptyStr()?e:Xs`${t}${e}`}A.strConcat=ka;function qa(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:Ze(Array.isArray(t)?t.join(","):t)}function ja(t){return new te(Ze(t))}A.stringify=ja;function Ze(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}A.safeStringify=Ze;function Oa(t){return typeof t=="string"&&A.IDENTIFIER.test(t)?new te(`.${t}`):Bs`[${t}]`}A.getProperty=Oa;function Ia(t){if(typeof t=="string"&&A.IDENTIFIER.test(t))return new te(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}A.getEsmExportName=Ia;function Ra(t){return new te(t.toString())}A.regexpCode=Ra});var pr=w(Y=>{"use strict";d();h();f();Object.defineProperty(Y,"__esModule",{value:!0});Y.ValueScope=Y.ValueScopeName=Y.Scope=Y.varKinds=Y.UsedValueState=void 0;var X=et(),fr=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},Nt;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(Nt||(Y.UsedValueState=Nt={}));Y.varKinds={const:new X.Name("const"),let:new X.Name("let"),var:new X.Name("var")};var kt=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof X.Name?e:this.name(e)}name(e){return new X.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,s;if(!((s=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||s===void 0)&&s.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};Y.Scope=kt;var qt=class extends X.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:s}){this.value=e,this.scopePath=(0,X._)`.${new X.Name(r)}[${s}]`}};Y.ValueScopeName=qt;var Ta=(0,X._)`\n`,hr=class extends kt{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?Ta:X.nil}}get(){return this._scope}name(e){return new qt(e,this._newName(e))}value(e,r){var s;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let n=this.toName(e),{prefix:o}=n,a=(s=r.key)!==null&&s!==void 0?s:r.ref,i=this._values[o];if(i){let c=i.get(a);if(c)return c}else i=this._values[o]=new Map;i.set(a,n);let u=this._scope[o]||(this._scope[o]=[]),l=u.length;return u[l]=r.ref,n.setValue(r,{property:o,itemIndex:l}),n}getValue(e,r){let s=this._values[e];if(s)return s.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,s=>{if(s.scopePath===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return(0,X._)`${e}${s.scopePath}`})}scopeCode(e=this._values,r,s){return this._reduceValues(e,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},r,s)}_reduceValues(e,r,s={},n){let o=X.nil;for(let a in e){let i=e[a];if(!i)continue;let u=s[a]=s[a]||new Map;i.forEach(l=>{if(u.has(l))return;u.set(l,Nt.Started);let c=r(l);if(c){let p=this.opts.es5?Y.varKinds.var:Y.varKinds.const;o=(0,X._)`${o}${p} ${l} = ${c};${this.opts._n}`}else if(c=n?.(l))o=(0,X._)`${o}${c}${this.opts._n}`;else throw new fr(l);u.set(l,Nt.Completed)})}return o}};Y.ValueScope=hr});var O=w(j=>{"use strict";d();h();f();Object.defineProperty(j,"__esModule",{value:!0});j.or=j.and=j.not=j.CodeGen=j.operators=j.varKinds=j.ValueScopeName=j.ValueScope=j.Scope=j.Name=j.regexpCode=j.stringify=j.getProperty=j.nil=j.strConcat=j.str=j._=void 0;var T=et(),oe=pr(),ve=et();Object.defineProperty(j,"_",{enumerable:!0,get:function(){return ve._}});Object.defineProperty(j,"str",{enumerable:!0,get:function(){return ve.str}});Object.defineProperty(j,"strConcat",{enumerable:!0,get:function(){return ve.strConcat}});Object.defineProperty(j,"nil",{enumerable:!0,get:function(){return ve.nil}});Object.defineProperty(j,"getProperty",{enumerable:!0,get:function(){return ve.getProperty}});Object.defineProperty(j,"stringify",{enumerable:!0,get:function(){return ve.stringify}});Object.defineProperty(j,"regexpCode",{enumerable:!0,get:function(){return ve.regexpCode}});Object.defineProperty(j,"Name",{enumerable:!0,get:function(){return ve.Name}});var Rt=pr();Object.defineProperty(j,"Scope",{enumerable:!0,get:function(){return Rt.Scope}});Object.defineProperty(j,"ValueScope",{enumerable:!0,get:function(){return Rt.ValueScope}});Object.defineProperty(j,"ValueScopeName",{enumerable:!0,get:function(){return Rt.ValueScopeName}});Object.defineProperty(j,"varKinds",{enumerable:!0,get:function(){return Rt.varKinds}});j.operators={GT:new T._Code(">"),GTE:new T._Code(">="),LT:new T._Code("<"),LTE:new T._Code("<="),EQ:new T._Code("==="),NEQ:new T._Code("!=="),NOT:new T._Code("!"),OR:new T._Code("||"),AND:new T._Code("&&"),ADD:new T._Code("+")};var me=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},mr=class extends me{constructor(e,r,s){super(),this.varKind=e,this.name=r,this.rhs=s}render({es5:e,_n:r}){let s=e?oe.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${n};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=Ve(this.rhs,e,r)),this}get names(){return this.rhs instanceof T._CodeOrName?this.rhs.names:{}}},jt=class extends me{constructor(e,r,s){super(),this.lhs=e,this.rhs=r,this.sideEffects=s}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof T.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=Ve(this.rhs,e,r),this}get names(){let e=this.lhs instanceof T.Name?{}:{...this.lhs.names};return It(e,this.rhs)}},yr=class extends jt{constructor(e,r,s,n){super(e,s,n),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},_r=class extends me{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},gr=class extends me{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},$r=class extends me{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},vr=class extends me{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=Ve(this.code,e,r),this}get names(){return this.code instanceof T._CodeOrName?this.code.names:{}}},tt=class extends me{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,s)=>r+s.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let s=e[r].optimizeNodes();Array.isArray(s)?e.splice(r,1,...s):s?e[r]=s:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:s}=this,n=s.length;for(;n--;){let o=s[n];o.optimizeNames(e,r)||(Ca(e,o.names),s.splice(n,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>Oe(e,r.names),{})}},ye=class extends tt{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},wr=class extends tt{},De=class extends ye{};De.kind="else";var qe=class t extends ye{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let s=r.optimizeNodes();r=this.else=Array.isArray(s)?new De(s):s}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(Ys(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var s;if(this.else=(s=this.else)===null||s===void 0?void 0:s.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=Ve(this.condition,e,r),this}get names(){let e=super.names;return It(e,this.condition),this.else&&Oe(e,this.else.names),e}};qe.kind="if";var je=class extends ye{};je.kind="for";var br=class extends je{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=Ve(this.iteration,e,r),this}get names(){return Oe(super.names,this.iteration.names)}},Er=class extends je{constructor(e,r,s,n){super(),this.varKind=e,this.name=r,this.from=s,this.to=n}render(e){let r=e.es5?oe.varKinds.var:this.varKind,{name:s,from:n,to:o}=this;return`for(${r} ${s}=${n}; ${s}<${o}; ${s}++)`+super.render(e)}get names(){let e=It(super.names,this.from);return It(e,this.to)}},Ot=class extends je{constructor(e,r,s,n){super(),this.loop=e,this.varKind=r,this.name=s,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=Ve(this.iterable,e,r),this}get names(){return Oe(super.names,this.iterable.names)}},rt=class extends ye{constructor(e,r,s){super(),this.name=e,this.args=r,this.async=s}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};rt.kind="func";var st=class extends tt{render(e){return"return "+super.render(e)}};st.kind="return";var Sr=class extends ye{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var s,n;return super.optimizeNames(e,r),(s=this.catch)===null||s===void 0||s.optimizeNames(e,r),(n=this.finally)===null||n===void 0||n.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&Oe(e,this.catch.names),this.finally&&Oe(e,this.finally.names),e}},nt=class extends ye{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};nt.kind="catch";var ot=class extends ye{render(e){return"finally"+super.render(e)}};ot.kind="finally";var Pr=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
1
|
+
import{a as w,b as d,c as f,d as h}from"./chunk-YB7WCAZH.js";var et=w(A=>{"use strict";d();h();f();Object.defineProperty(A,"__esModule",{value:!0});A.regexpCode=A.getEsmExportName=A.getProperty=A.safeStringify=A.stringify=A.strConcat=A.addCodeArg=A.str=A._=A.nil=A._Code=A.Name=A.IDENTIFIER=A._CodeOrName=void 0;var Ye=class{};A._CodeOrName=Ye;A.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var ke=class extends Ye{constructor(e){if(super(),!A.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};A.Name=ke;var te=class extends Ye{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,s)=>`${r}${s}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,s)=>(s instanceof ke&&(r[s.str]=(r[s.str]||0)+1),r),{})}};A._Code=te;A.nil=new te("");function Bs(t,...e){let r=[t[0]],s=0;for(;s<e.length;)dr(r,e[s]),r.push(t[++s]);return new te(r)}A._=Bs;var lr=new te("+");function Xs(t,...e){let r=[Ze(t[0])],s=0;for(;s<e.length;)r.push(lr),dr(r,e[s]),r.push(lr,Ze(t[++s]));return Pa(r),new te(r)}A.str=Xs;function dr(t,e){e instanceof te?t.push(...e._items):e instanceof ke?t.push(e):t.push(qa(e))}A.addCodeArg=dr;function Pa(t){let e=1;for(;e<t.length-1;){if(t[e]===lr){let r=Na(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function Na(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof ke||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof ke))return`"${t}${e.slice(1)}`}function ka(t,e){return e.emptyStr()?t:t.emptyStr()?e:Xs`${t}${e}`}A.strConcat=ka;function qa(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:Ze(Array.isArray(t)?t.join(","):t)}function ja(t){return new te(Ze(t))}A.stringify=ja;function Ze(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}A.safeStringify=Ze;function Oa(t){return typeof t=="string"&&A.IDENTIFIER.test(t)?new te(`.${t}`):Bs`[${t}]`}A.getProperty=Oa;function Ia(t){if(typeof t=="string"&&A.IDENTIFIER.test(t))return new te(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}A.getEsmExportName=Ia;function Ra(t){return new te(t.toString())}A.regexpCode=Ra});var pr=w(Y=>{"use strict";d();h();f();Object.defineProperty(Y,"__esModule",{value:!0});Y.ValueScope=Y.ValueScopeName=Y.Scope=Y.varKinds=Y.UsedValueState=void 0;var X=et(),fr=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},Nt;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(Nt||(Y.UsedValueState=Nt={}));Y.varKinds={const:new X.Name("const"),let:new X.Name("let"),var:new X.Name("var")};var kt=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof X.Name?e:this.name(e)}name(e){return new X.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,s;if(!((s=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||s===void 0)&&s.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};Y.Scope=kt;var qt=class extends X.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:s}){this.value=e,this.scopePath=(0,X._)`.${new X.Name(r)}[${s}]`}};Y.ValueScopeName=qt;var Ta=(0,X._)`\n`,hr=class extends kt{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?Ta:X.nil}}get(){return this._scope}name(e){return new qt(e,this._newName(e))}value(e,r){var s;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let n=this.toName(e),{prefix:o}=n,a=(s=r.key)!==null&&s!==void 0?s:r.ref,i=this._values[o];if(i){let c=i.get(a);if(c)return c}else i=this._values[o]=new Map;i.set(a,n);let u=this._scope[o]||(this._scope[o]=[]),l=u.length;return u[l]=r.ref,n.setValue(r,{property:o,itemIndex:l}),n}getValue(e,r){let s=this._values[e];if(s)return s.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,s=>{if(s.scopePath===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return(0,X._)`${e}${s.scopePath}`})}scopeCode(e=this._values,r,s){return this._reduceValues(e,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},r,s)}_reduceValues(e,r,s={},n){let o=X.nil;for(let a in e){let i=e[a];if(!i)continue;let u=s[a]=s[a]||new Map;i.forEach(l=>{if(u.has(l))return;u.set(l,Nt.Started);let c=r(l);if(c){let p=this.opts.es5?Y.varKinds.var:Y.varKinds.const;o=(0,X._)`${o}${p} ${l} = ${c};${this.opts._n}`}else if(c=n?.(l))o=(0,X._)`${o}${c}${this.opts._n}`;else throw new fr(l);u.set(l,Nt.Completed)})}return o}};Y.ValueScope=hr});var O=w(j=>{"use strict";d();h();f();Object.defineProperty(j,"__esModule",{value:!0});j.or=j.and=j.not=j.CodeGen=j.operators=j.varKinds=j.ValueScopeName=j.ValueScope=j.Scope=j.Name=j.regexpCode=j.stringify=j.getProperty=j.nil=j.strConcat=j.str=j._=void 0;var T=et(),oe=pr(),ve=et();Object.defineProperty(j,"_",{enumerable:!0,get:function(){return ve._}});Object.defineProperty(j,"str",{enumerable:!0,get:function(){return ve.str}});Object.defineProperty(j,"strConcat",{enumerable:!0,get:function(){return ve.strConcat}});Object.defineProperty(j,"nil",{enumerable:!0,get:function(){return ve.nil}});Object.defineProperty(j,"getProperty",{enumerable:!0,get:function(){return ve.getProperty}});Object.defineProperty(j,"stringify",{enumerable:!0,get:function(){return ve.stringify}});Object.defineProperty(j,"regexpCode",{enumerable:!0,get:function(){return ve.regexpCode}});Object.defineProperty(j,"Name",{enumerable:!0,get:function(){return ve.Name}});var Rt=pr();Object.defineProperty(j,"Scope",{enumerable:!0,get:function(){return Rt.Scope}});Object.defineProperty(j,"ValueScope",{enumerable:!0,get:function(){return Rt.ValueScope}});Object.defineProperty(j,"ValueScopeName",{enumerable:!0,get:function(){return Rt.ValueScopeName}});Object.defineProperty(j,"varKinds",{enumerable:!0,get:function(){return Rt.varKinds}});j.operators={GT:new T._Code(">"),GTE:new T._Code(">="),LT:new T._Code("<"),LTE:new T._Code("<="),EQ:new T._Code("==="),NEQ:new T._Code("!=="),NOT:new T._Code("!"),OR:new T._Code("||"),AND:new T._Code("&&"),ADD:new T._Code("+")};var me=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},mr=class extends me{constructor(e,r,s){super(),this.varKind=e,this.name=r,this.rhs=s}render({es5:e,_n:r}){let s=e?oe.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${n};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=Ve(this.rhs,e,r)),this}get names(){return this.rhs instanceof T._CodeOrName?this.rhs.names:{}}},jt=class extends me{constructor(e,r,s){super(),this.lhs=e,this.rhs=r,this.sideEffects=s}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof T.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=Ve(this.rhs,e,r),this}get names(){let e=this.lhs instanceof T.Name?{}:{...this.lhs.names};return It(e,this.rhs)}},yr=class extends jt{constructor(e,r,s,n){super(e,s,n),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},_r=class extends me{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},gr=class extends me{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},$r=class extends me{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},vr=class extends me{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=Ve(this.code,e,r),this}get names(){return this.code instanceof T._CodeOrName?this.code.names:{}}},tt=class extends me{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,s)=>r+s.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let s=e[r].optimizeNodes();Array.isArray(s)?e.splice(r,1,...s):s?e[r]=s:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:s}=this,n=s.length;for(;n--;){let o=s[n];o.optimizeNames(e,r)||(Ca(e,o.names),s.splice(n,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>Oe(e,r.names),{})}},ye=class extends tt{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},wr=class extends tt{},De=class extends ye{};De.kind="else";var qe=class t extends ye{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let s=r.optimizeNodes();r=this.else=Array.isArray(s)?new De(s):s}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(Ys(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var s;if(this.else=(s=this.else)===null||s===void 0?void 0:s.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=Ve(this.condition,e,r),this}get names(){let e=super.names;return It(e,this.condition),this.else&&Oe(e,this.else.names),e}};qe.kind="if";var je=class extends ye{};je.kind="for";var br=class extends je{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=Ve(this.iteration,e,r),this}get names(){return Oe(super.names,this.iteration.names)}},Er=class extends je{constructor(e,r,s,n){super(),this.varKind=e,this.name=r,this.from=s,this.to=n}render(e){let r=e.es5?oe.varKinds.var:this.varKind,{name:s,from:n,to:o}=this;return`for(${r} ${s}=${n}; ${s}<${o}; ${s}++)`+super.render(e)}get names(){let e=It(super.names,this.from);return It(e,this.to)}},Ot=class extends je{constructor(e,r,s,n){super(),this.loop=e,this.varKind=r,this.name=s,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=Ve(this.iterable,e,r),this}get names(){return Oe(super.names,this.iterable.names)}},rt=class extends ye{constructor(e,r,s){super(),this.name=e,this.args=r,this.async=s}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};rt.kind="func";var st=class extends tt{render(e){return"return "+super.render(e)}};st.kind="return";var Sr=class extends ye{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var s,n;return super.optimizeNames(e,r),(s=this.catch)===null||s===void 0||s.optimizeNames(e,r),(n=this.finally)===null||n===void 0||n.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&Oe(e,this.catch.names),this.finally&&Oe(e,this.finally.names),e}},nt=class extends ye{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};nt.kind="catch";var ot=class extends ye{render(e){return"finally"+super.render(e)}};ot.kind="finally";var Pr=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
2
2
|
`:""},this._extScope=e,this._scope=new oe.Scope({parent:e}),this._nodes=[new wr]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,r){let s=this._extScope.value(e,r);return(this._values[s.prefix]||(this._values[s.prefix]=new Set)).add(s),s}getScopeValue(e,r){return this._extScope.getValue(e,r)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,r,s,n){let o=this._scope.toName(r);return s!==void 0&&n&&(this._constants[o.str]=s),this._leafNode(new mr(e,o,s)),o}const(e,r,s){return this._def(oe.varKinds.const,e,r,s)}let(e,r,s){return this._def(oe.varKinds.let,e,r,s)}var(e,r,s){return this._def(oe.varKinds.var,e,r,s)}assign(e,r,s){return this._leafNode(new jt(e,r,s))}add(e,r){return this._leafNode(new yr(e,j.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==T.nil&&this._leafNode(new vr(e)),this}object(...e){let r=["{"];for(let[s,n]of e)r.length>1&&r.push(","),r.push(s),(s!==n||this.opts.es5)&&(r.push(":"),(0,T.addCodeArg)(r,n));return r.push("}"),new T._Code(r)}if(e,r,s){if(this._blockNode(new qe(e)),r&&s)this.code(r).else().code(s).endIf();else if(r)this.code(r).endIf();else if(s)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new qe(e))}else(){return this._elseNode(new De)}endIf(){return this._endBlockNode(qe,De)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new br(e),r)}forRange(e,r,s,n,o=this.opts.es5?oe.varKinds.var:oe.varKinds.let){let a=this._scope.toName(e);return this._for(new Er(o,a,r,s),()=>n(a))}forOf(e,r,s,n=oe.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let a=r instanceof T.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,T._)`${a}.length`,i=>{this.var(o,(0,T._)`${a}[${i}]`),s(o)})}return this._for(new Ot("of",n,o,r),()=>s(o))}forIn(e,r,s,n=this.opts.es5?oe.varKinds.var:oe.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,T._)`Object.keys(${r})`,s);let o=this._scope.toName(e);return this._for(new Ot("in",n,o,r),()=>s(o))}endFor(){return this._endBlockNode(je)}label(e){return this._leafNode(new _r(e))}break(e){return this._leafNode(new gr(e))}return(e){let r=new st;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(st)}try(e,r,s){if(!r&&!s)throw new Error('CodeGen: "try" without "catch" and "finally"');let n=new Sr;if(this._blockNode(n),this.code(e),r){let o=this.name("e");this._currNode=n.catch=new nt(o),r(o)}return s&&(this._currNode=n.finally=new ot,this.code(s)),this._endBlockNode(nt,ot)}throw(e){return this._leafNode(new $r(e))}block(e,r){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(r),this}endBlock(e){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let s=this._nodes.length-r;if(s<0||e!==void 0&&s!==e)throw new Error(`CodeGen: wrong number of nodes: ${s} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=T.nil,s,n){return this._blockNode(new rt(e,r,s)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(rt)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,r){let s=this._currNode;if(s instanceof e||r&&s instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${e.kind}/${r.kind}`:e.kind}"`)}_elseNode(e){let r=this._currNode;if(!(r instanceof qe))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let r=this._nodes;r[r.length-1]=e}};j.CodeGen=Pr;function Oe(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function It(t,e){return e instanceof T._CodeOrName?Oe(t,e.names):t}function Ve(t,e,r){if(t instanceof T.Name)return s(t);if(!n(t))return t;return new T._Code(t._items.reduce((o,a)=>(a instanceof T.Name&&(a=s(a)),a instanceof T._Code?o.push(...a._items):o.push(a),o),[]));function s(o){let a=r[o.str];return a===void 0||e[o.str]!==1?o:(delete e[o.str],a)}function n(o){return o instanceof T._Code&&o._items.some(a=>a instanceof T.Name&&e[a.str]===1&&r[a.str]!==void 0)}}function Ca(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function Ys(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,T._)`!${Nr(t)}`}j.not=Ys;var Ma=Zs(j.operators.AND);function Aa(...t){return t.reduce(Ma)}j.and=Aa;var Da=Zs(j.operators.OR);function Va(...t){return t.reduce(Da)}j.or=Va;function Zs(t){return(e,r)=>e===T.nil?r:r===T.nil?e:(0,T._)`${Nr(e)} ${t} ${Nr(r)}`}function Nr(t){return t instanceof T.Name?t:(0,T._)`(${t})`}});var D=w(I=>{"use strict";d();h();f();Object.defineProperty(I,"__esModule",{value:!0});I.checkStrictMode=I.getErrorPath=I.Type=I.useFunc=I.setEvaluated=I.evaluatedPropsToName=I.mergeEvaluated=I.eachItem=I.unescapeJsonPointer=I.escapeJsonPointer=I.escapeFragment=I.unescapeFragment=I.schemaRefOrVal=I.schemaHasRulesButRef=I.schemaHasRules=I.checkUnknownRules=I.alwaysValidSchema=I.toHash=void 0;var z=O(),za=et();function Ua(t){let e={};for(let r of t)e[r]=!0;return e}I.toHash=Ua;function Ka(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(rn(t,e),!sn(e,t.self.RULES.all))}I.alwaysValidSchema=Ka;function rn(t,e=t.schema){let{opts:r,self:s}=t;if(!r.strictSchema||typeof e=="boolean")return;let n=s.RULES.keywords;for(let o in e)n[o]||an(t,`unknown keyword: "${o}"`)}I.checkUnknownRules=rn;function sn(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}I.schemaHasRules=sn;function Fa(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}I.schemaHasRulesButRef=Fa;function La({topSchemaRef:t,schemaPath:e},r,s,n){if(!n){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,z._)`${r}`}return(0,z._)`${t}${e}${(0,z.getProperty)(s)}`}I.schemaRefOrVal=La;function xa(t){return nn(decodeURIComponent(t))}I.unescapeFragment=xa;function Ha(t){return encodeURIComponent(qr(t))}I.escapeFragment=Ha;function qr(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}I.escapeJsonPointer=qr;function nn(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}I.unescapeJsonPointer=nn;function Ga(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}I.eachItem=Ga;function en({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:s}){return(n,o,a,i)=>{let u=a===void 0?o:a instanceof z.Name?(o instanceof z.Name?t(n,o,a):e(n,o,a),a):o instanceof z.Name?(e(n,a,o),o):r(o,a);return i===z.Name&&!(u instanceof z.Name)?s(n,u):u}}I.mergeEvaluated={props:en({mergeNames:(t,e,r)=>t.if((0,z._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,z._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,z._)`${r} || {}`).code((0,z._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,z._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,z._)`${r} || {}`),jr(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:on}),items:en({mergeNames:(t,e,r)=>t.if((0,z._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,z._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,z._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,z._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function on(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,z._)`{}`);return e!==void 0&&jr(t,r,e),r}I.evaluatedPropsToName=on;function jr(t,e,r){Object.keys(r).forEach(s=>t.assign((0,z._)`${e}${(0,z.getProperty)(s)}`,!0))}I.setEvaluated=jr;var tn={};function Ja(t,e){return t.scopeValue("func",{ref:e,code:tn[e.code]||(tn[e.code]=new za._Code(e.code))})}I.useFunc=Ja;var kr;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(kr||(I.Type=kr={}));function Wa(t,e,r){if(t instanceof z.Name){let s=e===kr.Num;return r?s?(0,z._)`"[" + ${t} + "]"`:(0,z._)`"['" + ${t} + "']"`:s?(0,z._)`"/" + ${t}`:(0,z._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,z.getProperty)(t).toString():"/"+qr(t)}I.getErrorPath=Wa;function an(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}I.checkStrictMode=an});var _e=w(Or=>{"use strict";d();h();f();Object.defineProperty(Or,"__esModule",{value:!0});var G=O(),Qa={data:new G.Name("data"),valCxt:new G.Name("valCxt"),instancePath:new G.Name("instancePath"),parentData:new G.Name("parentData"),parentDataProperty:new G.Name("parentDataProperty"),rootData:new G.Name("rootData"),dynamicAnchors:new G.Name("dynamicAnchors"),vErrors:new G.Name("vErrors"),errors:new G.Name("errors"),this:new G.Name("this"),self:new G.Name("self"),scope:new G.Name("scope"),json:new G.Name("json"),jsonPos:new G.Name("jsonPos"),jsonLen:new G.Name("jsonLen"),jsonPart:new G.Name("jsonPart")};Or.default=Qa});var at=w(J=>{"use strict";d();h();f();Object.defineProperty(J,"__esModule",{value:!0});J.extendErrors=J.resetErrorsCount=J.reportExtraError=J.reportError=J.keyword$DataError=J.keywordError=void 0;var M=O(),Tt=D(),Q=_e();J.keywordError={message:({keyword:t})=>(0,M.str)`must pass "${t}" keyword validation`};J.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,M.str)`"${t}" keyword must be ${e} ($data)`:(0,M.str)`"${t}" keyword is invalid ($data)`};function Ba(t,e=J.keywordError,r,s){let{it:n}=t,{gen:o,compositeRule:a,allErrors:i}=n,u=ln(t,e,r);s??(a||i)?un(o,u):cn(n,(0,M._)`[${u}]`)}J.reportError=Ba;function Xa(t,e=J.keywordError,r){let{it:s}=t,{gen:n,compositeRule:o,allErrors:a}=s,i=ln(t,e,r);un(n,i),o||a||cn(s,Q.default.vErrors)}J.reportExtraError=Xa;function Ya(t,e){t.assign(Q.default.errors,e),t.if((0,M._)`${Q.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,M._)`${Q.default.vErrors}.length`,e),()=>t.assign(Q.default.vErrors,null)))}J.resetErrorsCount=Ya;function Za({gen:t,keyword:e,schemaValue:r,data:s,errsCount:n,it:o}){if(n===void 0)throw new Error("ajv implementation error");let a=t.name("err");t.forRange("i",n,Q.default.errors,i=>{t.const(a,(0,M._)`${Q.default.vErrors}[${i}]`),t.if((0,M._)`${a}.instancePath === undefined`,()=>t.assign((0,M._)`${a}.instancePath`,(0,M.strConcat)(Q.default.instancePath,o.errorPath))),t.assign((0,M._)`${a}.schemaPath`,(0,M.str)`${o.errSchemaPath}/${e}`),o.opts.verbose&&(t.assign((0,M._)`${a}.schema`,r),t.assign((0,M._)`${a}.data`,s))})}J.extendErrors=Za;function un(t,e){let r=t.const("err",e);t.if((0,M._)`${Q.default.vErrors} === null`,()=>t.assign(Q.default.vErrors,(0,M._)`[${r}]`),(0,M._)`${Q.default.vErrors}.push(${r})`),t.code((0,M._)`${Q.default.errors}++`)}function cn(t,e){let{gen:r,validateName:s,schemaEnv:n}=t;n.$async?r.throw((0,M._)`new ${t.ValidationError}(${e})`):(r.assign((0,M._)`${s}.errors`,e),r.return(!1))}var Ie={keyword:new M.Name("keyword"),schemaPath:new M.Name("schemaPath"),params:new M.Name("params"),propertyName:new M.Name("propertyName"),message:new M.Name("message"),schema:new M.Name("schema"),parentSchema:new M.Name("parentSchema")};function ln(t,e,r){let{createErrors:s}=t.it;return s===!1?(0,M._)`{}`:ei(t,e,r)}function ei(t,e,r={}){let{gen:s,it:n}=t,o=[ti(n,r),ri(t,r)];return si(t,e,o),s.object(...o)}function ti({errorPath:t},{instancePath:e}){let r=e?(0,M.str)`${t}${(0,Tt.getErrorPath)(e,Tt.Type.Str)}`:t;return[Q.default.instancePath,(0,M.strConcat)(Q.default.instancePath,r)]}function ri({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:s}){let n=s?e:(0,M.str)`${e}/${t}`;return r&&(n=(0,M.str)`${n}${(0,Tt.getErrorPath)(r,Tt.Type.Str)}`),[Ie.schemaPath,n]}function si(t,{params:e,message:r},s){let{keyword:n,data:o,schemaValue:a,it:i}=t,{opts:u,propertyName:l,topSchemaRef:c,schemaPath:p}=i;s.push([Ie.keyword,n],[Ie.params,typeof e=="function"?e(t):e||(0,M._)`{}`]),u.messages&&s.push([Ie.message,typeof r=="function"?r(t):r]),u.verbose&&s.push([Ie.schema,a],[Ie.parentSchema,(0,M._)`${c}${p}`],[Q.default.data,o]),l&&s.push([Ie.propertyName,l])}});var fn=w(ze=>{"use strict";d();h();f();Object.defineProperty(ze,"__esModule",{value:!0});ze.boolOrEmptySchema=ze.topBoolOrEmptySchema=void 0;var ni=at(),oi=O(),ai=_e(),ii={message:"boolean schema is false"};function ui(t){let{gen:e,schema:r,validateName:s}=t;r===!1?dn(t,!1):typeof r=="object"&&r.$async===!0?e.return(ai.default.data):(e.assign((0,oi._)`${s}.errors`,null),e.return(!0))}ze.topBoolOrEmptySchema=ui;function ci(t,e){let{gen:r,schema:s}=t;s===!1?(r.var(e,!1),dn(t)):r.var(e,!0)}ze.boolOrEmptySchema=ci;function dn(t,e){let{gen:r,data:s}=t,n={gen:r,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,ni.reportError)(n,ii,void 0,e)}});var Ir=w(Ue=>{"use strict";d();h();f();Object.defineProperty(Ue,"__esModule",{value:!0});Ue.getRules=Ue.isJSONType=void 0;var li=["string","number","integer","boolean","null","object","array"],di=new Set(li);function fi(t){return typeof t=="string"&&di.has(t)}Ue.isJSONType=fi;function hi(){let t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}Ue.getRules=hi});var Rr=w(we=>{"use strict";d();h();f();Object.defineProperty(we,"__esModule",{value:!0});we.shouldUseRule=we.shouldUseGroup=we.schemaHasRulesForType=void 0;function pi({schema:t,self:e},r){let s=e.RULES.types[r];return s&&s!==!0&&hn(t,s)}we.schemaHasRulesForType=pi;function hn(t,e){return e.rules.some(r=>pn(t,r))}we.shouldUseGroup=hn;function pn(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(s=>t[s]!==void 0))}we.shouldUseRule=pn});var it=w(W=>{"use strict";d();h();f();Object.defineProperty(W,"__esModule",{value:!0});W.reportTypeError=W.checkDataTypes=W.checkDataType=W.coerceAndCheckDataType=W.getJSONTypes=W.getSchemaTypes=W.DataType=void 0;var mi=Ir(),yi=Rr(),_i=at(),q=O(),mn=D(),Ke;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(Ke||(W.DataType=Ke={}));function gi(t){let e=yn(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}W.getSchemaTypes=gi;function yn(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(mi.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}W.getJSONTypes=yn;function $i(t,e){let{gen:r,data:s,opts:n}=t,o=vi(e,n.coerceTypes),a=e.length>0&&!(o.length===0&&e.length===1&&(0,yi.schemaHasRulesForType)(t,e[0]));if(a){let i=Cr(e,s,n.strictNumbers,Ke.Wrong);r.if(i,()=>{o.length?wi(t,e,o):Mr(t)})}return a}W.coerceAndCheckDataType=$i;var _n=new Set(["string","number","integer","boolean","null"]);function vi(t,e){return e?t.filter(r=>_n.has(r)||e==="array"&&r==="array"):[]}function wi(t,e,r){let{gen:s,data:n,opts:o}=t,a=s.let("dataType",(0,q._)`typeof ${n}`),i=s.let("coerced",(0,q._)`undefined`);o.coerceTypes==="array"&&s.if((0,q._)`${a} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>s.assign(n,(0,q._)`${n}[0]`).assign(a,(0,q._)`typeof ${n}`).if(Cr(e,n,o.strictNumbers),()=>s.assign(i,n))),s.if((0,q._)`${i} !== undefined`);for(let l of r)(_n.has(l)||l==="array"&&o.coerceTypes==="array")&&u(l);s.else(),Mr(t),s.endIf(),s.if((0,q._)`${i} !== undefined`,()=>{s.assign(n,i),bi(t,i)});function u(l){switch(l){case"string":s.elseIf((0,q._)`${a} == "number" || ${a} == "boolean"`).assign(i,(0,q._)`"" + ${n}`).elseIf((0,q._)`${n} === null`).assign(i,(0,q._)`""`);return;case"number":s.elseIf((0,q._)`${a} == "boolean" || ${n} === null
|
|
3
3
|
|| (${a} == "string" && ${n} && ${n} == +${n})`).assign(i,(0,q._)`+${n}`);return;case"integer":s.elseIf((0,q._)`${a} === "boolean" || ${n} === null
|
|
4
4
|
|| (${a} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(i,(0,q._)`+${n}`);return;case"boolean":s.elseIf((0,q._)`${n} === "false" || ${n} === 0 || ${n} === null`).assign(i,!1).elseIf((0,q._)`${n} === "true" || ${n} === 1`).assign(i,!0);return;case"null":s.elseIf((0,q._)`${n} === "" || ${n} === 0 || ${n} === false`),s.assign(i,null);return;case"array":s.elseIf((0,q._)`${a} === "string" || ${a} === "number"
|
|
@@ -6,4 +6,4 @@ import{a as w,c as d,d as f,e as h}from"./chunk-ZOOM6B5R.js";var et=w(A=>{"use s
|
|
|
6
6
|
missingProperty: ${s},
|
|
7
7
|
depsCount: ${e},
|
|
8
8
|
deps: ${r}}`};var Fl={keyword:"dependencies",type:"object",schemaType:"object",error:he.error,code(t){let[e,r]=Ll(t);Go(t,e),Jo(t,r)}};function Ll({schema:t}){let e={},r={};for(let s in t){if(s==="__proto__")continue;let n=Array.isArray(t[s])?e:r;n[s]=t[s]}return[e,r]}function Go(t,e=t.schema){let{gen:r,data:s,it:n}=t;if(Object.keys(e).length===0)return;let o=r.let("missing");for(let a in e){let i=e[a];if(i.length===0)continue;let u=(0,Pt.propertyInData)(r,s,a,n.opts.ownProperties);t.setParams({property:a,depsCount:i.length,deps:i.join(", ")}),n.allErrors?r.if(u,()=>{for(let l of i)(0,Pt.checkReportMissingProp)(t,l)}):(r.if((0,qs._)`${u} && (${(0,Pt.checkMissingProp)(t,i,o)})`),(0,Pt.reportMissingProp)(t,o),r.else())}}he.validatePropertyDeps=Go;function Jo(t,e=t.schema){let{gen:r,data:s,keyword:n,it:o}=t,a=r.name("valid");for(let i in e)(0,Kl.alwaysValidSchema)(o,e[i])||(r.if((0,Pt.propertyInData)(r,s,i,o.opts.ownProperties),()=>{let u=t.subschema({keyword:n,schemaProp:i},a);t.mergeValidEvaluated(u,a)},()=>r.var(a,!0)),t.ok(a))}he.validateSchemaDeps=Jo;he.default=Fl});var Bo=w(js=>{"use strict";d();h();f();Object.defineProperty(js,"__esModule",{value:!0});var Qo=O(),xl=D(),Hl={message:"property name must be valid",params:({params:t})=>(0,Qo._)`{propertyName: ${t.propertyName}}`},Gl={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Hl,code(t){let{gen:e,schema:r,data:s,it:n}=t;if((0,xl.alwaysValidSchema)(n,r))return;let o=e.name("valid");e.forIn("key",s,a=>{t.setParams({propertyName:a}),t.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},o),e.if((0,Qo.not)(o),()=>{t.error(!0),n.allErrors||e.break()})}),t.ok(o)}};js.default=Gl});var Is=w(Os=>{"use strict";d();h();f();Object.defineProperty(Os,"__esModule",{value:!0});var er=re(),ue=O(),Jl=_e(),tr=D(),Wl={message:"must NOT have additional properties",params:({params:t})=>(0,ue._)`{additionalProperty: ${t.additionalProperty}}`},Ql={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Wl,code(t){let{gen:e,schema:r,parentSchema:s,data:n,errsCount:o,it:a}=t;if(!o)throw new Error("ajv implementation error");let{allErrors:i,opts:u}=a;if(a.props=!0,u.removeAdditional!=="all"&&(0,tr.alwaysValidSchema)(a,r))return;let l=(0,er.allSchemaProperties)(s.properties),c=(0,er.allSchemaProperties)(s.patternProperties);p(),t.ok((0,ue._)`${o} === ${Jl.default.errors}`);function p(){e.forIn("key",n,_=>{!l.length&&!c.length?y(_):e.if($(_),()=>y(_))})}function $(_){let v;if(l.length>8){let C=(0,tr.schemaRefOrVal)(a,s.properties,"properties");v=(0,er.isOwnProperty)(e,C,_)}else l.length?v=(0,ue.or)(...l.map(C=>(0,ue._)`${_} === ${C}`)):v=ue.nil;return c.length&&(v=(0,ue.or)(v,...c.map(C=>(0,ue._)`${(0,er.usePattern)(t,C)}.test(${_})`))),(0,ue.not)(v)}function g(_){e.code((0,ue._)`delete ${n}[${_}]`)}function y(_){if(u.removeAdditional==="all"||u.removeAdditional&&r===!1){g(_);return}if(r===!1){t.setParams({additionalProperty:_}),t.error(),i||e.break();return}if(typeof r=="object"&&!(0,tr.alwaysValidSchema)(a,r)){let v=e.name("valid");u.removeAdditional==="failing"?(m(_,v,!1),e.if((0,ue.not)(v),()=>{t.reset(),g(_)})):(m(_,v),i||e.if((0,ue.not)(v),()=>e.break()))}}function m(_,v,C){let R={keyword:"additionalProperties",dataProp:_,dataPropType:tr.Type.Str};C===!1&&Object.assign(R,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(R,v)}}};Os.default=Ql});var Zo=w(Ts=>{"use strict";d();h();f();Object.defineProperty(Ts,"__esModule",{value:!0});var Bl=dt(),Xo=re(),Rs=D(),Yo=Is(),Xl={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:s,data:n,it:o}=t;o.opts.removeAdditional==="all"&&s.additionalProperties===void 0&&Yo.default.code(new Bl.KeywordCxt(o,Yo.default,"additionalProperties"));let a=(0,Xo.allSchemaProperties)(r);for(let p of a)o.definedProperties.add(p);o.opts.unevaluated&&a.length&&o.props!==!0&&(o.props=Rs.mergeEvaluated.props(e,(0,Rs.toHash)(a),o.props));let i=a.filter(p=>!(0,Rs.alwaysValidSchema)(o,r[p]));if(i.length===0)return;let u=e.name("valid");for(let p of i)l(p)?c(p):(e.if((0,Xo.propertyInData)(e,n,p,o.opts.ownProperties)),c(p),o.allErrors||e.else().var(u,!0),e.endIf()),t.it.definedProperties.add(p),t.ok(u);function l(p){return o.opts.useDefaults&&!o.compositeRule&&r[p].default!==void 0}function c(p){t.subschema({keyword:"properties",schemaProp:p,dataProp:p},u)}}};Ts.default=Xl});var sa=w(Cs=>{"use strict";d();h();f();Object.defineProperty(Cs,"__esModule",{value:!0});var ea=re(),rr=O(),ta=D(),ra=D(),Yl={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:s,parentSchema:n,it:o}=t,{opts:a}=o,i=(0,ea.allSchemaProperties)(r),u=i.filter(m=>(0,ta.alwaysValidSchema)(o,r[m]));if(i.length===0||u.length===i.length&&(!o.opts.unevaluated||o.props===!0))return;let l=a.strictSchema&&!a.allowMatchingProperties&&n.properties,c=e.name("valid");o.props!==!0&&!(o.props instanceof rr.Name)&&(o.props=(0,ra.evaluatedPropsToName)(e,o.props));let{props:p}=o;$();function $(){for(let m of i)l&&g(m),o.allErrors?y(m):(e.var(c,!0),y(m),e.if(c))}function g(m){for(let _ in l)new RegExp(m).test(_)&&(0,ta.checkStrictMode)(o,`property ${_} matches pattern ${m} (use allowMatchingProperties)`)}function y(m){e.forIn("key",s,_=>{e.if((0,rr._)`${(0,ea.usePattern)(t,m)}.test(${_})`,()=>{let v=u.includes(m);v||t.subschema({keyword:"patternProperties",schemaProp:m,dataProp:_,dataPropType:ra.Type.Str},c),o.opts.unevaluated&&p!==!0?e.assign((0,rr._)`${p}[${_}]`,!0):!v&&!o.allErrors&&e.if((0,rr.not)(c),()=>e.break())})})}}};Cs.default=Yl});var na=w(Ms=>{"use strict";d();h();f();Object.defineProperty(Ms,"__esModule",{value:!0});var Zl=D(),ed={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:s}=t;if((0,Zl.alwaysValidSchema)(s,r)){t.fail();return}let n=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),t.failResult(n,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};Ms.default=ed});var oa=w(As=>{"use strict";d();h();f();Object.defineProperty(As,"__esModule",{value:!0});var td=re(),rd={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:td.validateUnion,error:{message:"must match a schema in anyOf"}};As.default=rd});var aa=w(Ds=>{"use strict";d();h();f();Object.defineProperty(Ds,"__esModule",{value:!0});var sr=O(),sd=D(),nd={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,sr._)`{passingSchemas: ${t.passing}}`},od={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:nd,code(t){let{gen:e,schema:r,parentSchema:s,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(n.opts.discriminator&&s.discriminator)return;let o=r,a=e.let("valid",!1),i=e.let("passing",null),u=e.name("_valid");t.setParams({passing:i}),e.block(l),t.result(a,()=>t.reset(),()=>t.error(!0));function l(){o.forEach((c,p)=>{let $;(0,sd.alwaysValidSchema)(n,c)?e.var(u,!0):$=t.subschema({keyword:"oneOf",schemaProp:p,compositeRule:!0},u),p>0&&e.if((0,sr._)`${u} && ${a}`).assign(a,!1).assign(i,(0,sr._)`[${i}, ${p}]`).else(),e.if(u,()=>{e.assign(a,!0),e.assign(i,p),$&&t.mergeEvaluated($,sr.Name)})})}}};Ds.default=od});var ia=w(Vs=>{"use strict";d();h();f();Object.defineProperty(Vs,"__esModule",{value:!0});var ad=D(),id={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:r,it:s}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");let n=e.name("valid");r.forEach((o,a)=>{if((0,ad.alwaysValidSchema)(s,o))return;let i=t.subschema({keyword:"allOf",schemaProp:a},n);t.ok(n),t.mergeEvaluated(i)})}};Vs.default=id});var la=w(zs=>{"use strict";d();h();f();Object.defineProperty(zs,"__esModule",{value:!0});var nr=O(),ca=D(),ud={message:({params:t})=>(0,nr.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,nr._)`{failingKeyword: ${t.ifClause}}`},cd={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:ud,code(t){let{gen:e,parentSchema:r,it:s}=t;r.then===void 0&&r.else===void 0&&(0,ca.checkStrictMode)(s,'"if" without "then" and "else" is ignored');let n=ua(s,"then"),o=ua(s,"else");if(!n&&!o)return;let a=e.let("valid",!0),i=e.name("_valid");if(u(),t.reset(),n&&o){let c=e.let("ifClause");t.setParams({ifClause:c}),e.if(i,l("then",c),l("else",c))}else n?e.if(i,l("then")):e.if((0,nr.not)(i),l("else"));t.pass(a,()=>t.error(!0));function u(){let c=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},i);t.mergeEvaluated(c)}function l(c,p){return()=>{let $=t.subschema({keyword:c},i);e.assign(a,i),t.mergeValidEvaluated($,a),p?e.assign(p,(0,nr._)`${c}`):t.setParams({ifClause:c})}}}};function ua(t,e){let r=t.schema[e];return r!==void 0&&!(0,ca.alwaysValidSchema)(t,r)}zs.default=cd});var da=w(Us=>{"use strict";d();h();f();Object.defineProperty(Us,"__esModule",{value:!0});var ld=D(),dd={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,ld.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};Us.default=dd});var fa=w(Ks=>{"use strict";d();h();f();Object.defineProperty(Ks,"__esModule",{value:!0});var fd=Es(),hd=Fo(),pd=Ss(),md=xo(),yd=Ho(),_d=Wo(),gd=Bo(),$d=Is(),vd=Zo(),wd=sa(),bd=na(),Ed=oa(),Sd=aa(),Pd=ia(),Nd=la(),kd=da();function qd(t=!1){let e=[bd.default,Ed.default,Sd.default,Pd.default,Nd.default,kd.default,gd.default,$d.default,_d.default,vd.default,wd.default];return t?e.push(hd.default,md.default):e.push(fd.default,pd.default),e.push(yd.default),e}Ks.default=qd});var ha=w(Fs=>{"use strict";d();h();f();Object.defineProperty(Fs,"__esModule",{value:!0});var L=O(),jd={message:({schemaCode:t})=>(0,L.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,L._)`{format: ${t}}`},Od={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:jd,code(t,e){let{gen:r,data:s,$data:n,schema:o,schemaCode:a,it:i}=t,{opts:u,errSchemaPath:l,schemaEnv:c,self:p}=i;if(!u.validateFormats)return;n?$():g();function $(){let y=r.scopeValue("formats",{ref:p.formats,code:u.code.formats}),m=r.const("fDef",(0,L._)`${y}[${a}]`),_=r.let("fType"),v=r.let("format");r.if((0,L._)`typeof ${m} == "object" && !(${m} instanceof RegExp)`,()=>r.assign(_,(0,L._)`${m}.type || "string"`).assign(v,(0,L._)`${m}.validate`),()=>r.assign(_,(0,L._)`"string"`).assign(v,m)),t.fail$data((0,L.or)(C(),R()));function C(){return u.strictSchema===!1?L.nil:(0,L._)`${a} && !${v}`}function R(){let U=c.$async?(0,L._)`(${m}.async ? await ${v}(${s}) : ${v}(${s}))`:(0,L._)`${v}(${s})`,k=(0,L._)`(typeof ${v} == "function" ? ${U} : ${v}.test(${s}))`;return(0,L._)`${v} && ${v} !== true && ${_} === ${e} && !${k}`}}function g(){let y=p.formats[o];if(!y){C();return}if(y===!0)return;let[m,_,v]=R(y);m===e&&t.pass(U());function C(){if(u.strictSchema===!1){p.logger.warn(k());return}throw new Error(k());function k(){return`unknown format "${o}" ignored in schema at path "${l}"`}}function R(k){let ce=k instanceof RegExp?(0,L.regexpCode)(k):u.code.formats?(0,L._)`${u.code.formats}${(0,L.getProperty)(o)}`:void 0,pe=r.scopeValue("formats",{key:o,ref:k,code:ce});return typeof k=="object"&&!(k instanceof RegExp)?[k.type||"string",k.validate,(0,L._)`${pe}.validate`]:["string",k,pe]}function U(){if(typeof y=="object"&&!(y instanceof RegExp)&&y.async){if(!c.$async)throw new Error("async format in sync schema");return(0,L._)`await ${v}(${s})`}return typeof _=="function"?(0,L._)`${v}(${s})`:(0,L._)`${v}.test(${s})`}}}};Fs.default=Od});var pa=w(Ls=>{"use strict";d();h();f();Object.defineProperty(Ls,"__esModule",{value:!0});var Id=ha(),Rd=[Id.default];Ls.default=Rd});var ma=w(Je=>{"use strict";d();h();f();Object.defineProperty(Je,"__esModule",{value:!0});Je.contentVocabulary=Je.metadataVocabulary=void 0;Je.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Je.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var _a=w(xs=>{"use strict";d();h();f();Object.defineProperty(xs,"__esModule",{value:!0});var Td=So(),Cd=Vo(),Md=fa(),Ad=pa(),ya=ma(),Dd=[Td.default,Cd.default,(0,Md.default)(),Ad.default,ya.metadataVocabulary,ya.contentVocabulary];xs.default=Dd});var $a=w(or=>{"use strict";d();h();f();Object.defineProperty(or,"__esModule",{value:!0});or.DiscrError=void 0;var ga;(function(t){t.Tag="tag",t.Mapping="mapping"})(ga||(or.DiscrError=ga={}))});var wa=w(Gs=>{"use strict";d();h();f();Object.defineProperty(Gs,"__esModule",{value:!0});var We=O(),Hs=$a(),va=Ut(),Vd=ft(),zd=D(),Ud={message:({params:{discrError:t,tagName:e}})=>t===Hs.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,We._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},Kd={keyword:"discriminator",type:"object",schemaType:"object",error:Ud,code(t){let{gen:e,data:r,schema:s,parentSchema:n,it:o}=t,{oneOf:a}=n;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let i=s.propertyName;if(typeof i!="string")throw new Error("discriminator: requires propertyName");if(s.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");let u=e.let("valid",!1),l=e.const("tag",(0,We._)`${r}${(0,We.getProperty)(i)}`);e.if((0,We._)`typeof ${l} == "string"`,()=>c(),()=>t.error(!1,{discrError:Hs.DiscrError.Tag,tag:l,tagName:i})),t.ok(u);function c(){let g=$();e.if(!1);for(let y in g)e.elseIf((0,We._)`${l} === ${y}`),e.assign(u,p(g[y]));e.else(),t.error(!1,{discrError:Hs.DiscrError.Mapping,tag:l,tagName:i}),e.endIf()}function p(g){let y=e.name("valid"),m=t.subschema({keyword:"oneOf",schemaProp:g},y);return t.mergeEvaluated(m,We.Name),y}function $(){var g;let y={},m=v(n),_=!0;for(let U=0;U<a.length;U++){let k=a[U];if(k?.$ref&&!(0,zd.schemaHasRulesButRef)(k,o.self.RULES)){let pe=k.$ref;if(k=va.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,pe),k instanceof va.SchemaEnv&&(k=k.schema),k===void 0)throw new Vd.default(o.opts.uriResolver,o.baseId,pe)}let ce=(g=k?.properties)===null||g===void 0?void 0:g[i];if(typeof ce!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${i}"`);_=_&&(m||v(k)),C(ce,U)}if(!_)throw new Error(`discriminator: "${i}" must be required`);return y;function v({required:U}){return Array.isArray(U)&&U.includes(i)}function C(U,k){if(U.const)R(U.const,k);else if(U.enum)for(let ce of U.enum)R(ce,k);else throw new Error(`discriminator: "properties/${i}" must have "const" or "enum"`)}function R(U,k){if(typeof U!="string"||U in y)throw new Error(`discriminator: "${i}" values must be unique strings`);y[U]=k}}}};Gs.default=Kd});var ba=w((Ly,Fd)=>{Fd.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var Bd=w((F,Js)=>{d();h();f();Object.defineProperty(F,"__esModule",{value:!0});F.MissingRefError=F.ValidationError=F.CodeGen=F.Name=F.nil=F.stringify=F.str=F._=F.KeywordCxt=F.Ajv=void 0;var Ld=go(),xd=_a(),Hd=wa(),Ea=ba(),Gd=["/properties"],ar="http://json-schema.org/draft-07/schema",Qe=class extends Ld.default{_addVocabularies(){super._addVocabularies(),xd.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(Hd.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(Ea,Gd):Ea;this.addMetaSchema(e,ar,!1),this.refs["http://json-schema.org/schema"]=ar}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(ar)?ar:void 0)}};F.Ajv=Qe;Js.exports=F=Qe;Js.exports.Ajv=Qe;Object.defineProperty(F,"__esModule",{value:!0});F.default=Qe;var Jd=dt();Object.defineProperty(F,"KeywordCxt",{enumerable:!0,get:function(){return Jd.KeywordCxt}});var Be=O();Object.defineProperty(F,"_",{enumerable:!0,get:function(){return Be._}});Object.defineProperty(F,"str",{enumerable:!0,get:function(){return Be.str}});Object.defineProperty(F,"stringify",{enumerable:!0,get:function(){return Be.stringify}});Object.defineProperty(F,"nil",{enumerable:!0,get:function(){return Be.nil}});Object.defineProperty(F,"Name",{enumerable:!0,get:function(){return Be.Name}});Object.defineProperty(F,"CodeGen",{enumerable:!0,get:function(){return Be.CodeGen}});var Wd=Vt();Object.defineProperty(F,"ValidationError",{enumerable:!0,get:function(){return Wd.default}});var Qd=ft();Object.defineProperty(F,"MissingRefError",{enumerable:!0,get:function(){return Qd.default}})});export default Bd();
|
|
9
|
-
//# sourceMappingURL=ajv-
|
|
9
|
+
//# sourceMappingURL=ajv-UZKI6BMI.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
var H=(p,a)=>()=>(p&&(a=p(p=0)),a);var jr=(p,a)=>()=>(a||p((a={exports:{}}).exports,a),a.exports);var F=H(()=>{});function Gr(){if(yr)return V;yr=!0,V.byteLength=T,V.toByteArray=P,V.fromByteArray=N;for(var p=[],a=[],S=typeof Uint8Array<"u"?Uint8Array:Array,E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",w=0,y=E.length;w<y;++w)p[w]=E[w],a[E.charCodeAt(w)]=w;a[45]=62,a[95]=63;function o(h){var l=h.length;if(l%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var d=h.indexOf("=");d===-1&&(d=l);var U=d===l?0:4-d%4;return[d,U]}function T(h){var l=o(h),d=l[0],U=l[1];return(d+U)*3/4-U}function b(h,l,d){return(l+d)*3/4-d}function P(h){var l,d=o(h),U=d[0],L=d[1],A=new S(b(h,U,L)),C=0,M=L>0?U-4:U,R;for(R=0;R<M;R+=4)l=a[h.charCodeAt(R)]<<18|a[h.charCodeAt(R+1)]<<12|a[h.charCodeAt(R+2)]<<6|a[h.charCodeAt(R+3)],A[C++]=l>>16&255,A[C++]=l>>8&255,A[C++]=l&255;return L===2&&(l=a[h.charCodeAt(R)]<<2|a[h.charCodeAt(R+1)]>>4,A[C++]=l&255),L===1&&(l=a[h.charCodeAt(R)]<<10|a[h.charCodeAt(R+1)]<<4|a[h.charCodeAt(R+2)]>>2,A[C++]=l>>8&255,A[C++]=l&255),A}function I(h){return p[h>>18&63]+p[h>>12&63]+p[h>>6&63]+p[h&63]}function x(h,l,d){for(var U,L=[],A=l;A<d;A+=3)U=(h[A]<<16&16711680)+(h[A+1]<<8&65280)+(h[A+2]&255),L.push(I(U));return L.join("")}function N(h){for(var l,d=h.length,U=d%3,L=[],A=16383,C=0,M=d-U;C<M;C+=A)L.push(x(h,C,C+A>M?M:C+A));return U===1?(l=h[d-1],L.push(p[l>>2]+p[l<<4&63]+"==")):U===2&&(l=(h[d-2]<<8)+h[d-1],L.push(p[l>>10]+p[l>>4&63]+p[l<<2&63]+"=")),L.join("")}return V}function Wr(){if(dr)return z;dr=!0;return z.read=function(p,a,S,E,w){var y,o,T=w*8-E-1,b=(1<<T)-1,P=b>>1,I=-7,x=S?w-1:0,N=S?-1:1,h=p[a+x];for(x+=N,y=h&(1<<-I)-1,h>>=-I,I+=T;I>0;y=y*256+p[a+x],x+=N,I-=8);for(o=y&(1<<-I)-1,y>>=-I,I+=E;I>0;o=o*256+p[a+x],x+=N,I-=8);if(y===0)y=1-P;else{if(y===b)return o?NaN:(h?-1:1)*(1/0);o=o+Math.pow(2,E),y=y-P}return(h?-1:1)*o*Math.pow(2,y-E)},z.write=function(p,a,S,E,w,y){var o,T,b,P=y*8-w-1,I=(1<<P)-1,x=I>>1,N=w===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=E?0:y-1,l=E?1:-1,d=a<0||a===0&&1/a<0?1:0;for(a=Math.abs(a),isNaN(a)||a===1/0?(T=isNaN(a)?1:0,o=I):(o=Math.floor(Math.log(a)/Math.LN2),a*(b=Math.pow(2,-o))<1&&(o--,b*=2),o+x>=1?a+=N/b:a+=N*Math.pow(2,1-x),a*b>=2&&(o++,b/=2),o+x>=I?(T=0,o=I):o+x>=1?(T=(a*b-1)*Math.pow(2,w),o=o+x):(T=a*Math.pow(2,x-1)*Math.pow(2,w),o=0));w>=8;p[S+h]=T&255,h+=l,T/=256,w-=8);for(o=o<<w|T,P+=w;P>0;p[S+h]=o&255,h+=l,o/=256,P-=8);p[S+h-l]|=d*128},z}function mr(){if(gr)return D;gr=!0;let p=Gr(),a=Wr(),S=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;D.Buffer=o,D.SlowBuffer=L,D.INSPECT_MAX_BYTES=50;let E=2147483647;D.kMaxLength=E,o.TYPED_ARRAY_SUPPORT=w(),!o.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function w(){try{let e=new Uint8Array(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,Uint8Array.prototype),Object.setPrototypeOf(e,r),e.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function y(e){if(e>E)throw new RangeError('The value "'+e+'" is invalid for option "size"');let r=new Uint8Array(e);return Object.setPrototypeOf(r,o.prototype),r}function o(e,r,t){if(typeof e=="number"){if(typeof r=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return I(e)}return T(e,r,t)}o.poolSize=8192;function T(e,r,t){if(typeof e=="string")return x(e,r);if(ArrayBuffer.isView(e))return h(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(v(e,ArrayBuffer)||e&&v(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(v(e,SharedArrayBuffer)||e&&v(e.buffer,SharedArrayBuffer)))return l(e,r,t);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return o.from(n,r,t);let i=d(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return o.from(e[Symbol.toPrimitive]("string"),r,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}o.from=function(e,r,t){return T(e,r,t)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function b(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function P(e,r,t){return b(e),e<=0?y(e):r!==void 0?typeof t=="string"?y(e).fill(r,t):y(e).fill(r):y(e)}o.alloc=function(e,r,t){return P(e,r,t)};function I(e){return b(e),y(e<0?0:U(e)|0)}o.allocUnsafe=function(e){return I(e)},o.allocUnsafeSlow=function(e){return I(e)};function x(e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!o.isEncoding(r))throw new TypeError("Unknown encoding: "+r);let t=A(e,r)|0,n=y(t),i=n.write(e,r);return i!==t&&(n=n.slice(0,i)),n}function N(e){let r=e.length<0?0:U(e.length)|0,t=y(r);for(let n=0;n<r;n+=1)t[n]=e[n]&255;return t}function h(e){if(v(e,Uint8Array)){let r=new Uint8Array(e);return l(r.buffer,r.byteOffset,r.byteLength)}return N(e)}function l(e,r,t){if(r<0||e.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<r+(t||0))throw new RangeError('"length" is outside of buffer bounds');let n;return r===void 0&&t===void 0?n=new Uint8Array(e):t===void 0?n=new Uint8Array(e,r):n=new Uint8Array(e,r,t),Object.setPrototypeOf(n,o.prototype),n}function d(e){if(o.isBuffer(e)){let r=U(e.length)|0,t=y(r);return t.length===0||e.copy(t,0,0,r),t}if(e.length!==void 0)return typeof e.length!="number"||Z(e.length)?y(0):N(e);if(e.type==="Buffer"&&Array.isArray(e.data))return N(e.data)}function U(e){if(e>=E)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+E.toString(16)+" bytes");return e|0}function L(e){return+e!=e&&(e=0),o.alloc(+e)}o.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==o.prototype},o.compare=function(r,t){if(v(r,Uint8Array)&&(r=o.from(r,r.offset,r.byteLength)),v(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(r)||!o.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===t)return 0;let n=r.length,i=t.length;for(let u=0,c=Math.min(n,i);u<c;++u)if(r[u]!==t[u]){n=r[u],i=t[u];break}return n<i?-1:i<n?1:0},o.isEncoding=function(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(r,t){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return o.alloc(0);let n;if(t===void 0)for(t=0,n=0;n<r.length;++n)t+=r[n].length;let i=o.allocUnsafe(t),u=0;for(n=0;n<r.length;++n){let c=r[n];if(v(c,Uint8Array))u+c.length>i.length?(o.isBuffer(c)||(c=o.from(c)),c.copy(i,u)):Uint8Array.prototype.set.call(i,c,u);else if(o.isBuffer(c))c.copy(i,u);else throw new TypeError('"list" argument must be an Array of Buffers');u+=c.length}return i};function A(e,r){if(o.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||v(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let t=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&t===0)return 0;let i=!1;for(;;)switch(r){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return K(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return wr(e).length;default:if(i)return n?-1:K(e).length;r=(""+r).toLowerCase(),i=!0}}o.byteLength=A;function C(e,r,t){let n=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,r>>>=0,t<=r))return"";for(e||(e="utf8");;)switch(e){case"hex":return Mr(this,r,t);case"utf8":case"utf-8":return or(this,r,t);case"ascii":return Cr(this,r,t);case"latin1":case"binary":return kr(this,r,t);case"base64":return br(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Nr(this,r,t);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}o.prototype._isBuffer=!0;function M(e,r,t){let n=e[r];e[r]=e[t],e[t]=n}o.prototype.swap16=function(){let r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<r;t+=2)M(this,t,t+1);return this},o.prototype.swap32=function(){let r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<r;t+=4)M(this,t,t+3),M(this,t+1,t+2);return this},o.prototype.swap64=function(){let r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<r;t+=8)M(this,t,t+7),M(this,t+1,t+6),M(this,t+2,t+5),M(this,t+3,t+4);return this},o.prototype.toString=function(){let r=this.length;return r===0?"":arguments.length===0?or(this,0,r):C.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(r){if(!o.isBuffer(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:o.compare(this,r)===0},o.prototype.inspect=function(){let r="",t=D.INSPECT_MAX_BYTES;return r=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(r+=" ... "),"<Buffer "+r+">"},S&&(o.prototype[S]=o.prototype.inspect),o.prototype.compare=function(r,t,n,i,u){if(v(r,Uint8Array)&&(r=o.from(r,r.offset,r.byteLength)),!o.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(t===void 0&&(t=0),n===void 0&&(n=r?r.length:0),i===void 0&&(i=0),u===void 0&&(u=this.length),t<0||n>r.length||i<0||u>this.length)throw new RangeError("out of range index");if(i>=u&&t>=n)return 0;if(i>=u)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,i>>>=0,u>>>=0,this===r)return 0;let c=u-i,s=n-t,B=Math.min(c,s),g=this.slice(i,u),m=r.slice(t,n);for(let f=0;f<B;++f)if(g[f]!==m[f]){c=g[f],s=m[f];break}return c<s?-1:s<c?1:0};function R(e,r,t,n,i){if(e.length===0)return-1;if(typeof t=="string"?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,Z(t)&&(t=i?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(i)return-1;t=e.length-1}else if(t<0)if(i)t=0;else return-1;if(typeof r=="string"&&(r=o.from(r,n)),o.isBuffer(r))return r.length===0?-1:ir(e,r,t,n,i);if(typeof r=="number")return r=r&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,r,t):Uint8Array.prototype.lastIndexOf.call(e,r,t):ir(e,[r],t,n,i);throw new TypeError("val must be string, number or Buffer")}function ir(e,r,t,n,i){let u=1,c=e.length,s=r.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||r.length<2)return-1;u=2,c/=2,s/=2,t/=2}function B(m,f){return u===1?m[f]:m.readUInt16BE(f*u)}let g;if(i){let m=-1;for(g=t;g<c;g++)if(B(e,g)===B(r,m===-1?0:g-m)){if(m===-1&&(m=g),g-m+1===s)return m*u}else m!==-1&&(g-=g-m),m=-1}else for(t+s>c&&(t=c-s),g=t;g>=0;g--){let m=!0;for(let f=0;f<s;f++)if(B(e,g+f)!==B(r,f)){m=!1;break}if(m)return g}return-1}o.prototype.includes=function(r,t,n){return this.indexOf(r,t,n)!==-1},o.prototype.indexOf=function(r,t,n){return R(this,r,t,n,!0)},o.prototype.lastIndexOf=function(r,t,n){return R(this,r,t,n,!1)};function _r(e,r,t,n){t=Number(t)||0;let i=e.length-t;n?(n=Number(n),n>i&&(n=i)):n=i;let u=r.length;n>u/2&&(n=u/2);let c;for(c=0;c<n;++c){let s=parseInt(r.substr(c*2,2),16);if(Z(s))return c;e[t+c]=s}return c}function xr(e,r,t,n){return J(K(r,e.length-t),e,t,n)}function Tr(e,r,t,n){return J(Fr(r),e,t,n)}function Rr(e,r,t,n){return J(wr(r),e,t,n)}function Sr(e,r,t,n){return J(Dr(r,e.length-t),e,t,n)}o.prototype.write=function(r,t,n,i){if(t===void 0)i="utf8",n=this.length,t=0;else if(n===void 0&&typeof t=="string")i=t,n=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let u=this.length-t;if((n===void 0||n>u)&&(n=u),r.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let c=!1;for(;;)switch(i){case"hex":return _r(this,r,t,n);case"utf8":case"utf-8":return xr(this,r,t,n);case"ascii":case"latin1":case"binary":return Tr(this,r,t,n);case"base64":return Rr(this,r,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Sr(this,r,t,n);default:if(c)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),c=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function br(e,r,t){return r===0&&t===e.length?p.fromByteArray(e):p.fromByteArray(e.slice(r,t))}function or(e,r,t){t=Math.min(e.length,t);let n=[],i=r;for(;i<t;){let u=e[i],c=null,s=u>239?4:u>223?3:u>191?2:1;if(i+s<=t){let B,g,m,f;switch(s){case 1:u<128&&(c=u);break;case 2:B=e[i+1],(B&192)===128&&(f=(u&31)<<6|B&63,f>127&&(c=f));break;case 3:B=e[i+1],g=e[i+2],(B&192)===128&&(g&192)===128&&(f=(u&15)<<12|(B&63)<<6|g&63,f>2047&&(f<55296||f>57343)&&(c=f));break;case 4:B=e[i+1],g=e[i+2],m=e[i+3],(B&192)===128&&(g&192)===128&&(m&192)===128&&(f=(u&15)<<18|(B&63)<<12|(g&63)<<6|m&63,f>65535&&f<1114112&&(c=f))}}c===null?(c=65533,s=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|c&1023),n.push(c),i+=s}return Lr(n)}let ur=4096;function Lr(e){let r=e.length;if(r<=ur)return String.fromCharCode.apply(String,e);let t="",n=0;for(;n<r;)t+=String.fromCharCode.apply(String,e.slice(n,n+=ur));return t}function Cr(e,r,t){let n="";t=Math.min(e.length,t);for(let i=r;i<t;++i)n+=String.fromCharCode(e[i]&127);return n}function kr(e,r,t){let n="";t=Math.min(e.length,t);for(let i=r;i<t;++i)n+=String.fromCharCode(e[i]);return n}function Mr(e,r,t){let n=e.length;(!r||r<0)&&(r=0),(!t||t<0||t>n)&&(t=n);let i="";for(let u=r;u<t;++u)i+=Or[e[u]];return i}function Nr(e,r,t){let n=e.slice(r,t),i="";for(let u=0;u<n.length-1;u+=2)i+=String.fromCharCode(n[u]+n[u+1]*256);return i}o.prototype.slice=function(r,t){let n=this.length;r=~~r,t=t===void 0?n:~~t,r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<r&&(t=r);let i=this.subarray(r,t);return Object.setPrototypeOf(i,o.prototype),i};function _(e,r,t){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+r>t)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(r,t,n){r=r>>>0,t=t>>>0,n||_(r,t,this.length);let i=this[r],u=1,c=0;for(;++c<t&&(u*=256);)i+=this[r+c]*u;return i},o.prototype.readUintBE=o.prototype.readUIntBE=function(r,t,n){r=r>>>0,t=t>>>0,n||_(r,t,this.length);let i=this[r+--t],u=1;for(;t>0&&(u*=256);)i+=this[r+--t]*u;return i},o.prototype.readUint8=o.prototype.readUInt8=function(r,t){return r=r>>>0,t||_(r,1,this.length),this[r]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(r,t){return r=r>>>0,t||_(r,2,this.length),this[r]|this[r+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(r,t){return r=r>>>0,t||_(r,2,this.length),this[r]<<8|this[r+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(r,t){return r=r>>>0,t||_(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(r,t){return r=r>>>0,t||_(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])},o.prototype.readBigUInt64LE=$(function(r){r=r>>>0,j(r,"offset");let t=this[r],n=this[r+7];(t===void 0||n===void 0)&&X(r,this.length-8);let i=t+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24,u=this[++r]+this[++r]*2**8+this[++r]*2**16+n*2**24;return BigInt(i)+(BigInt(u)<<BigInt(32))}),o.prototype.readBigUInt64BE=$(function(r){r=r>>>0,j(r,"offset");let t=this[r],n=this[r+7];(t===void 0||n===void 0)&&X(r,this.length-8);let i=t*2**24+this[++r]*2**16+this[++r]*2**8+this[++r],u=this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+n;return(BigInt(i)<<BigInt(32))+BigInt(u)}),o.prototype.readIntLE=function(r,t,n){r=r>>>0,t=t>>>0,n||_(r,t,this.length);let i=this[r],u=1,c=0;for(;++c<t&&(u*=256);)i+=this[r+c]*u;return u*=128,i>=u&&(i-=Math.pow(2,8*t)),i},o.prototype.readIntBE=function(r,t,n){r=r>>>0,t=t>>>0,n||_(r,t,this.length);let i=t,u=1,c=this[r+--i];for(;i>0&&(u*=256);)c+=this[r+--i]*u;return u*=128,c>=u&&(c-=Math.pow(2,8*t)),c},o.prototype.readInt8=function(r,t){return r=r>>>0,t||_(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]},o.prototype.readInt16LE=function(r,t){r=r>>>0,t||_(r,2,this.length);let n=this[r]|this[r+1]<<8;return n&32768?n|4294901760:n},o.prototype.readInt16BE=function(r,t){r=r>>>0,t||_(r,2,this.length);let n=this[r+1]|this[r]<<8;return n&32768?n|4294901760:n},o.prototype.readInt32LE=function(r,t){return r=r>>>0,t||_(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24},o.prototype.readInt32BE=function(r,t){return r=r>>>0,t||_(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]},o.prototype.readBigInt64LE=$(function(r){r=r>>>0,j(r,"offset");let t=this[r],n=this[r+7];(t===void 0||n===void 0)&&X(r,this.length-8);let i=this[r+4]+this[r+5]*2**8+this[r+6]*2**16+(n<<24);return(BigInt(i)<<BigInt(32))+BigInt(t+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24)}),o.prototype.readBigInt64BE=$(function(r){r=r>>>0,j(r,"offset");let t=this[r],n=this[r+7];(t===void 0||n===void 0)&&X(r,this.length-8);let i=(t<<24)+this[++r]*2**16+this[++r]*2**8+this[++r];return(BigInt(i)<<BigInt(32))+BigInt(this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+n)}),o.prototype.readFloatLE=function(r,t){return r=r>>>0,t||_(r,4,this.length),a.read(this,r,!0,23,4)},o.prototype.readFloatBE=function(r,t){return r=r>>>0,t||_(r,4,this.length),a.read(this,r,!1,23,4)},o.prototype.readDoubleLE=function(r,t){return r=r>>>0,t||_(r,8,this.length),a.read(this,r,!0,52,8)},o.prototype.readDoubleBE=function(r,t){return r=r>>>0,t||_(r,8,this.length),a.read(this,r,!1,52,8)};function k(e,r,t,n,i,u){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<u)throw new RangeError('"value" argument is out of bounds');if(t+n>e.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(r,t,n,i){if(r=+r,t=t>>>0,n=n>>>0,!i){let s=Math.pow(2,8*n)-1;k(this,r,t,n,s,0)}let u=1,c=0;for(this[t]=r&255;++c<n&&(u*=256);)this[t+c]=r/u&255;return t+n},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(r,t,n,i){if(r=+r,t=t>>>0,n=n>>>0,!i){let s=Math.pow(2,8*n)-1;k(this,r,t,n,s,0)}let u=n-1,c=1;for(this[t+u]=r&255;--u>=0&&(c*=256);)this[t+u]=r/c&255;return t+n},o.prototype.writeUint8=o.prototype.writeUInt8=function(r,t,n){return r=+r,t=t>>>0,n||k(this,r,t,1,255,0),this[t]=r&255,t+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(r,t,n){return r=+r,t=t>>>0,n||k(this,r,t,2,65535,0),this[t]=r&255,this[t+1]=r>>>8,t+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(r,t,n){return r=+r,t=t>>>0,n||k(this,r,t,2,65535,0),this[t]=r>>>8,this[t+1]=r&255,t+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(r,t,n){return r=+r,t=t>>>0,n||k(this,r,t,4,4294967295,0),this[t+3]=r>>>24,this[t+2]=r>>>16,this[t+1]=r>>>8,this[t]=r&255,t+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(r,t,n){return r=+r,t=t>>>0,n||k(this,r,t,4,4294967295,0),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};function cr(e,r,t,n,i){fr(r,n,i,e,t,7);let u=Number(r&BigInt(4294967295));e[t++]=u,u=u>>8,e[t++]=u,u=u>>8,e[t++]=u,u=u>>8,e[t++]=u;let c=Number(r>>BigInt(32)&BigInt(4294967295));return e[t++]=c,c=c>>8,e[t++]=c,c=c>>8,e[t++]=c,c=c>>8,e[t++]=c,t}function ar(e,r,t,n,i){fr(r,n,i,e,t,7);let u=Number(r&BigInt(4294967295));e[t+7]=u,u=u>>8,e[t+6]=u,u=u>>8,e[t+5]=u,u=u>>8,e[t+4]=u;let c=Number(r>>BigInt(32)&BigInt(4294967295));return e[t+3]=c,c=c>>8,e[t+2]=c,c=c>>8,e[t+1]=c,c=c>>8,e[t]=c,t+8}o.prototype.writeBigUInt64LE=$(function(r,t=0){return cr(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=$(function(r,t=0){return ar(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(r,t,n,i){if(r=+r,t=t>>>0,!i){let B=Math.pow(2,8*n-1);k(this,r,t,n,B-1,-B)}let u=0,c=1,s=0;for(this[t]=r&255;++u<n&&(c*=256);)r<0&&s===0&&this[t+u-1]!==0&&(s=1),this[t+u]=(r/c>>0)-s&255;return t+n},o.prototype.writeIntBE=function(r,t,n,i){if(r=+r,t=t>>>0,!i){let B=Math.pow(2,8*n-1);k(this,r,t,n,B-1,-B)}let u=n-1,c=1,s=0;for(this[t+u]=r&255;--u>=0&&(c*=256);)r<0&&s===0&&this[t+u+1]!==0&&(s=1),this[t+u]=(r/c>>0)-s&255;return t+n},o.prototype.writeInt8=function(r,t,n){return r=+r,t=t>>>0,n||k(this,r,t,1,127,-128),r<0&&(r=255+r+1),this[t]=r&255,t+1},o.prototype.writeInt16LE=function(r,t,n){return r=+r,t=t>>>0,n||k(this,r,t,2,32767,-32768),this[t]=r&255,this[t+1]=r>>>8,t+2},o.prototype.writeInt16BE=function(r,t,n){return r=+r,t=t>>>0,n||k(this,r,t,2,32767,-32768),this[t]=r>>>8,this[t+1]=r&255,t+2},o.prototype.writeInt32LE=function(r,t,n){return r=+r,t=t>>>0,n||k(this,r,t,4,2147483647,-2147483648),this[t]=r&255,this[t+1]=r>>>8,this[t+2]=r>>>16,this[t+3]=r>>>24,t+4},o.prototype.writeInt32BE=function(r,t,n){return r=+r,t=t>>>0,n||k(this,r,t,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4},o.prototype.writeBigInt64LE=$(function(r,t=0){return cr(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=$(function(r,t=0){return ar(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function hr(e,r,t,n,i,u){if(t+n>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function sr(e,r,t,n,i){return r=+r,t=t>>>0,i||hr(e,r,t,4),a.write(e,r,t,n,23,4),t+4}o.prototype.writeFloatLE=function(r,t,n){return sr(this,r,t,!0,n)},o.prototype.writeFloatBE=function(r,t,n){return sr(this,r,t,!1,n)};function pr(e,r,t,n,i){return r=+r,t=t>>>0,i||hr(e,r,t,8),a.write(e,r,t,n,52,8),t+8}o.prototype.writeDoubleLE=function(r,t,n){return pr(this,r,t,!0,n)},o.prototype.writeDoubleBE=function(r,t,n){return pr(this,r,t,!1,n)},o.prototype.copy=function(r,t,n,i){if(!o.isBuffer(r))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),t>=r.length&&(t=r.length),t||(t=0),i>0&&i<n&&(i=n),i===n||r.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),r.length-t<i-n&&(i=r.length-t+n);let u=i-n;return this===r&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(t,n,i):Uint8Array.prototype.set.call(r,this.subarray(n,i),t),u},o.prototype.fill=function(r,t,n,i){if(typeof r=="string"){if(typeof t=="string"?(i=t,t=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!o.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(r.length===1){let c=r.charCodeAt(0);(i==="utf8"&&c<128||i==="latin1")&&(r=c)}}else typeof r=="number"?r=r&255:typeof r=="boolean"&&(r=Number(r));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t=t>>>0,n=n===void 0?this.length:n>>>0,r||(r=0);let u;if(typeof r=="number")for(u=t;u<n;++u)this[u]=r;else{let c=o.isBuffer(r)?r:o.from(r,i),s=c.length;if(s===0)throw new TypeError('The value "'+r+'" is invalid for argument "value"');for(u=0;u<n-t;++u)this[u+t]=c[u%s]}return this};let q={};function Q(e,r,t){q[e]=class extends t{constructor(){super(),Object.defineProperty(this,"message",{value:r.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(i){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:i,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}Q("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Q("ERR_INVALID_ARG_TYPE",function(e,r){return`The "${e}" argument must be of type number. Received type ${typeof r}`},TypeError),Q("ERR_OUT_OF_RANGE",function(e,r,t){let n=`The value of "${e}" is out of range.`,i=t;return Number.isInteger(t)&&Math.abs(t)>2**32?i=lr(String(t)):typeof t=="bigint"&&(i=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(i=lr(i)),i+="n"),n+=` It must be ${r}. Received ${i}`,n},RangeError);function lr(e){let r="",t=e.length,n=e[0]==="-"?1:0;for(;t>=n+4;t-=3)r=`_${e.slice(t-3,t)}${r}`;return`${e.slice(0,t)}${r}`}function Pr(e,r,t){j(r,"offset"),(e[r]===void 0||e[r+t]===void 0)&&X(r,e.length-(t+1))}function fr(e,r,t,n,i,u){if(e>t||e<r){let c=typeof r=="bigint"?"n":"",s;throw r===0||r===BigInt(0)?s=`>= 0${c} and < 2${c} ** ${(u+1)*8}${c}`:s=`>= -(2${c} ** ${(u+1)*8-1}${c}) and < 2 ** ${(u+1)*8-1}${c}`,new q.ERR_OUT_OF_RANGE("value",s,e)}Pr(n,i,u)}function j(e,r){if(typeof e!="number")throw new q.ERR_INVALID_ARG_TYPE(r,"number",e)}function X(e,r,t){throw Math.floor(e)!==e?(j(e,t),new q.ERR_OUT_OF_RANGE("offset","an integer",e)):r<0?new q.ERR_BUFFER_OUT_OF_BOUNDS:new q.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${r}`,e)}let vr=/[^+/0-9A-Za-z-_]/g;function $r(e){if(e=e.split("=")[0],e=e.trim().replace(vr,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function K(e,r){r=r||1/0;let t,n=e.length,i=null,u=[];for(let c=0;c<n;++c){if(t=e.charCodeAt(c),t>55295&&t<57344){if(!i){if(t>56319){(r-=3)>-1&&u.push(239,191,189);continue}else if(c+1===n){(r-=3)>-1&&u.push(239,191,189);continue}i=t;continue}if(t<56320){(r-=3)>-1&&u.push(239,191,189),i=t;continue}t=(i-55296<<10|t-56320)+65536}else i&&(r-=3)>-1&&u.push(239,191,189);if(i=null,t<128){if((r-=1)<0)break;u.push(t)}else if(t<2048){if((r-=2)<0)break;u.push(t>>6|192,t&63|128)}else if(t<65536){if((r-=3)<0)break;u.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((r-=4)<0)break;u.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return u}function Fr(e){let r=[];for(let t=0;t<e.length;++t)r.push(e.charCodeAt(t)&255);return r}function Dr(e,r){let t,n,i,u=[];for(let c=0;c<e.length&&!((r-=2)<0);++c)t=e.charCodeAt(c),n=t>>8,i=t%256,u.push(i),u.push(n);return u}function wr(e){return p.toByteArray($r(e))}function J(e,r,t,n){let i;for(i=0;i<n&&!(i+t>=r.length||i>=e.length);++i)r[i+t]=e[i];return i}function v(e,r){return e instanceof r||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===r.name}function Z(e){return e!==e}let Or=(function(){let e="0123456789abcdef",r=new Array(256);for(let t=0;t<16;++t){let n=t*16;for(let i=0;i<16;++i)r[n+i]=e[t]+e[i]}return r})();function $(e){return typeof BigInt>"u"?Yr:e}function Yr(){throw new Error("BigInt not supported")}return D}var V,yr,z,dr,D,gr,Er=H(()=>{F();Y();O();V={},yr=!1;z={},dr=!1;D={},gr=!1});var G,tr,rt,tt,Ir=H(()=>{F();Y();O();Er();G=mr();G.Buffer;G.SlowBuffer;G.INSPECT_MAX_BYTES;G.kMaxLength;tr=G.Buffer,rt=G.INSPECT_MAX_BYTES,tt=G.kMaxLength});var Y=H(()=>{Ir()});function qr(p,a){this.fun=p,this.array=a}function Ar(p){var a=Math.floor((Date.now()-W.now())*.001),S=W.now()*.001,E=Math.floor(S)+a,w=Math.floor(S%1*1e9);return p&&(E=E-p[0],w=w-p[1],w<0&&(E--,w+=nr)),[E,w]}var at,W,er,nr,Ur=H(()=>{F();Y();O();qr.prototype.run=function(){this.fun.apply(null,this.array)};at={PATH:"/usr/bin",LANG:typeof navigator<"u"?navigator.language+".UTF-8":void 0,PWD:"/",HOME:"/home",TMP:"/tmp"},W={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0};W.now===void 0&&(er=Date.now(),W.timing&&W.timing.navigationStart&&(er=W.timing.navigationStart),W.now=()=>Date.now()-er);nr=1e9;Ar.bigint=function(p){var a=Ar(p);return typeof BigInt>"u"?a[0]*nr+a[1]:BigInt(a[0]*nr)+BigInt(a[1])}});var O=H(()=>{Ur()});export{jr as a,F as b,O as c,Y as d};
|
|
2
|
+
/*! Bundled license information:
|
|
3
|
+
|
|
4
|
+
@jspm/core/nodelibs/browser/chunk-DtuTasat.js:
|
|
5
|
+
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
6
|
+
*/
|
|
7
|
+
//# sourceMappingURL=chunk-YB7WCAZH.js.map
|