@jxsuite/studio 5.7.0 → 6.1.0
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/chunks/{2020-cs2sb9t1.js → 2020-nkxms0ay.js} +3 -3
- package/dist/chunks/adapter-m948ab5f.js +4 -0
- package/dist/chunks/{cf-account-picker-882a7ecm.js → cf-account-picker-n8hr38v7.js} +3 -3
- package/dist/chunks/cf-settings-356xdtne.js +4 -0
- package/dist/chunks/components-yk3t844e.js +4 -0
- package/dist/chunks/content-source-bawmyc09.js +4 -0
- package/dist/chunks/{convert-to-repeater-grfep2w8.js → convert-to-repeater-7wns8kf1.js} +3 -3
- package/dist/chunks/editor-6sc8nacq.js +4 -0
- package/dist/chunks/entry-commands-8ay9fh81.js +4 -0
- package/dist/chunks/{extension-sections-dp8endhx.js → extension-sections-na7rj3nr.js} +3 -3
- package/dist/chunks/file-ops-gye0qw56.js +4 -0
- package/dist/chunks/files-dmc2xvcq.js +4 -0
- package/dist/chunks/format-host-t76b53f8.js +4 -0
- package/dist/chunks/fs-events-cg4tpz06.js +4 -0
- package/dist/chunks/git-panel-yef7bshy.js +4 -0
- package/dist/chunks/{grid-view-5amhg604.js → grid-view-7tt4bxw1.js} +6 -6
- package/dist/chunks/iframe-host-tmz30gfp.js +4 -0
- package/dist/chunks/{index-9ydfe04y.js → index-gybvv7a6.js} +3 -3
- package/dist/chunks/index-nag78a9h.js +4 -0
- package/dist/chunks/{javascript-d9pqgc2p.js → javascript-rnvdp3k4.js} +2 -2
- package/dist/chunks/{jsonMode-800yvbem.js → jsonMode-zhwsprqk.js} +5 -5
- package/dist/chunks/jx-validate-3gbp5nkn.js +4 -0
- package/dist/chunks/layers-fvz99859.js +4 -0
- package/dist/chunks/layers-panel-gchmbf9p.js +4 -0
- package/dist/chunks/lit-html-9agdspkt.js +4 -0
- package/dist/chunks/media-picker-rhjvyy00.js +4 -0
- package/dist/chunks/menu-2e4y9j7b.js +4 -0
- package/dist/chunks/{monaco-binding-62dtmgbf.js → monaco-binding-2jnhjjvr.js} +3 -3
- package/dist/chunks/monaco-buffer-rp21359g.js +4 -0
- package/dist/chunks/{monaco-setup-tj13ndtm.js → monaco-setup-vhh7gayr.js} +3 -3
- package/dist/chunks/notify-h3www560.js +4 -0
- package/dist/chunks/platform-hz34wcd7.js +4 -0
- package/dist/chunks/publish-panel-exsmjzyj.js +4 -0
- package/dist/chunks/quick-search-pgaqeh0m.js +4 -0
- package/dist/chunks/references-2cgdxnb8.js +4 -0
- package/dist/chunks/right-panel-jf856w5w.js +4 -0
- package/dist/chunks/section-registry-jnf8r5gy.js +4 -0
- package/dist/chunks/studio-0f55h9ye.js +5 -0
- package/dist/chunks/{studio-hjbg8d5y.js → studio-0sqdhnew.js} +7 -7
- package/dist/chunks/{studio-1wvfxkyy.js → studio-0x3jyb8r.js} +4 -4
- package/dist/chunks/{studio-yr04mv2j.js → studio-19x1c75w.js} +4 -4
- package/dist/chunks/{studio-evwgp1ym.js → studio-2sqcndak.js} +4 -4
- package/dist/chunks/{studio-cvbkkfqb.js → studio-3aey7dd3.js} +4 -4
- package/dist/chunks/{studio-888knnkc.js → studio-3bpdkq2s.js} +4 -4
- package/dist/chunks/{studio-ceb34dxj.js → studio-47y6fbpf.js} +4 -4
- package/dist/chunks/{studio-c6w3tq7t.js → studio-4m3826v2.js} +4 -4
- package/dist/chunks/studio-4nx2dj1g.js +4 -0
- package/dist/chunks/{studio-p7c1agz0.js → studio-4xv5s47r.js} +5 -5
- package/dist/chunks/{studio-sxc0zvpt.js → studio-5g0ag7c0.js} +3 -3
- package/dist/chunks/{studio-semd1s8s.js → studio-5g4t8v6w.js} +4 -4
- package/dist/chunks/studio-5py436sf.js +5 -0
- package/dist/chunks/{studio-aje966s9.js → studio-77kt594t.js} +4 -4
- package/dist/chunks/{studio-56z7evx4.js → studio-8f87n763.js} +6 -6
- package/dist/chunks/studio-8mb00b84.js +5 -0
- package/dist/chunks/studio-8p51gq2h.js +6 -0
- package/dist/chunks/studio-954ds834.js +5 -0
- package/dist/chunks/{studio-xta2vxp6.js → studio-9ft45c83.js} +6 -6
- package/dist/chunks/studio-a2138x5k.js +7 -0
- package/dist/chunks/studio-a9yzstqj.js +5 -0
- package/dist/chunks/{studio-gp02nqnw.js → studio-acdksxx6.js} +4 -4
- package/dist/chunks/{studio-edbtvcd1.js → studio-anyrgzvb.js} +4 -4
- package/dist/chunks/{studio-dkn3x3hz.js → studio-ar8jcf2y.js} +4 -4
- package/dist/chunks/{studio-xry7tk3z.js → studio-bmn4mn9j.js} +5 -5
- package/dist/chunks/{studio-03wwfvyt.js → studio-cpxkgjrj.js} +4 -4
- package/dist/chunks/{studio-spf2skgc.js → studio-e7xxa0sj.js} +4 -4
- package/dist/chunks/{studio-01qza1n3.js → studio-ecaz25vk.js} +4 -4
- package/dist/chunks/{studio-5e9zsamh.js → studio-fzdywr6p.js} +6 -6
- package/dist/chunks/{studio-65fhspdd.js → studio-g5fmf0c1.js} +4 -4
- package/dist/chunks/studio-g7nse7zb.js +5 -0
- package/dist/chunks/studio-geq1ea6k.js +14 -0
- package/dist/chunks/{studio-n78gjfy8.js → studio-ghkb32r8.js} +4 -4
- package/dist/chunks/{studio-222rqyyc.js → studio-ghrhy2y7.js} +4 -4
- package/dist/chunks/{studio-a7xqhc3n.js → studio-grawhey1.js} +4 -4
- package/dist/chunks/{studio-eh0rac07.js → studio-h0xgswew.js} +4 -4
- package/dist/chunks/{studio-wma2c6g8.js → studio-h9c4p2tx.js} +4 -4
- package/dist/chunks/studio-jyzj5cxs.js +5 -0
- package/dist/chunks/{studio-x92tgnee.js → studio-mgx8yhnz.js} +31 -31
- package/dist/chunks/{studio-0scebvb9.js → studio-mpb04y1d.js} +5 -5
- package/dist/chunks/{studio-xy3tv3az.js → studio-n17mty64.js} +4 -4
- package/dist/chunks/{studio-gfn1kpxj.js → studio-nwh2eqsk.js} +5 -5
- package/dist/chunks/{studio-nt06yybj.js → studio-pxg4ap1e.js} +3 -3
- package/dist/chunks/{studio-zpnk016a.js → studio-q1h883bt.js} +5 -5
- package/dist/chunks/{studio-c6zdm25z.js → studio-q4tv82h7.js} +6 -6
- package/dist/chunks/{studio-st75kn99.js → studio-qbj760tx.js} +5 -5
- package/dist/chunks/{studio-y7jehjrp.js → studio-qpqa7vk3.js} +4 -4
- package/dist/chunks/{studio-j6gnhvaa.js → studio-qqz8e5gk.js} +4 -4
- package/dist/chunks/{studio-skzanb0k.js → studio-qvasen3f.js} +4 -4
- package/dist/chunks/studio-rggdb3hm.js +5 -0
- package/dist/chunks/{studio-4xppwncr.js → studio-sghy936h.js} +3 -3
- package/dist/chunks/{studio-9mqfamps.js → studio-skprc6ef.js} +4 -4
- package/dist/chunks/{studio-1x8x26k3.js → studio-tt2nactf.js} +4 -4
- package/dist/chunks/{studio-54g077x3.js → studio-txjjzrsm.js} +5 -5
- package/dist/chunks/{studio-f195h2hq.js → studio-tyasmc39.js} +4 -4
- package/dist/chunks/{studio-0bbxhhce.js → studio-v2bvmbjj.js} +4 -4
- package/dist/chunks/{studio-pwqfmt4p.js → studio-vk9ezads.js} +4 -4
- package/dist/chunks/{studio-fqq890ap.js → studio-vzacdfsc.js} +3 -3
- package/dist/chunks/{studio-zd4kayn2.js → studio-w4c0xmrw.js} +4 -4
- package/dist/chunks/{studio-tw7rre6s.js → studio-wfjqhhbk.js} +4 -4
- package/dist/chunks/{studio-tp642n5g.js → studio-wgh5kxpj.js} +4 -4
- package/dist/chunks/studio-xasj0796.js +5 -0
- package/dist/chunks/{studio-tzegmy4w.js → studio-y78s8r2n.js} +4 -4
- package/dist/chunks/{studio-7pgy3xaf.js → studio-z8w183sh.js} +4 -4
- package/dist/chunks/{studio-01kbbqg3.js → studio-zscd9ty4.js} +124 -124
- package/dist/chunks/{studio-mwxgyn9h.js → studio-zxp13sss.js} +6 -6
- package/dist/chunks/{studio-r3kaka4d.js → studio-zygnmm01.js} +4 -4
- package/dist/chunks/{tsMode-k9s9fcag.js → tsMode-gr0m4dzr.js} +5 -5
- package/dist/chunks/workspace-m15qtcqp.js +4 -0
- package/dist/chunks/{ws-client-0ja08haa.js → ws-client-nf61frr1.js} +3 -3
- package/dist/iframe-entry.js +3 -3
- package/dist/manifest.json +62 -62
- package/dist/studio.js +83 -83
- package/package.json +11 -11
- package/src/new-project/add-repo-modal.ts +459 -59
- package/src/platforms/cloud.ts +95 -18
- package/src/publish/pages-service.ts +7 -0
- package/src/publish/publish-panel.ts +16 -2
- package/src/surfaces/add-repo.json +721 -224
- package/src/surfaces/add-repo.ts +196 -31
- package/src/types.ts +42 -3
- package/src/ui/schema-form.ts +6 -2
- package/src/utils/project-dir.ts +24 -0
- package/dist/chunks/adapter-y5gdq19c.js +0 -4
- package/dist/chunks/cf-settings-20dznc3j.js +0 -4
- package/dist/chunks/components-q037dya7.js +0 -4
- package/dist/chunks/content-source-37x3vsap.js +0 -4
- package/dist/chunks/editor-j5sq149q.js +0 -4
- package/dist/chunks/entry-commands-c5h3nqck.js +0 -4
- package/dist/chunks/file-ops-937cvqk6.js +0 -4
- package/dist/chunks/files-tznwe1p1.js +0 -4
- package/dist/chunks/format-host-e2pjvd25.js +0 -4
- package/dist/chunks/fs-events-fv64ak3s.js +0 -4
- package/dist/chunks/git-panel-gb713ttc.js +0 -4
- package/dist/chunks/iframe-host-t819mcg5.js +0 -4
- package/dist/chunks/index-m0x5ztax.js +0 -4
- package/dist/chunks/jx-validate-zc9zp77s.js +0 -4
- package/dist/chunks/layers-4bsr82wz.js +0 -4
- package/dist/chunks/layers-panel-b6shnaax.js +0 -4
- package/dist/chunks/lit-html-cfn61dn7.js +0 -4
- package/dist/chunks/media-picker-ej0kdh1j.js +0 -4
- package/dist/chunks/menu-rtxf9chb.js +0 -4
- package/dist/chunks/monaco-buffer-nn4dtx27.js +0 -4
- package/dist/chunks/notify-ahs57a2z.js +0 -4
- package/dist/chunks/platform-v9xyfkbx.js +0 -4
- package/dist/chunks/publish-panel-bq36xcmj.js +0 -4
- package/dist/chunks/quick-search-zm00h9dh.js +0 -4
- package/dist/chunks/references-99ws0b0m.js +0 -4
- package/dist/chunks/right-panel-pq2f71q3.js +0 -4
- package/dist/chunks/section-registry-b2yzp9sw.js +0 -4
- package/dist/chunks/studio-0k9mvpgj.js +0 -14
- package/dist/chunks/studio-1a99w39s.js +0 -5
- package/dist/chunks/studio-693nhyky.js +0 -5
- package/dist/chunks/studio-aqmph6k4.js +0 -5
- package/dist/chunks/studio-c9d3pxf7.js +0 -5
- package/dist/chunks/studio-cxt150pj.js +0 -7
- package/dist/chunks/studio-e6re3rk1.js +0 -5
- package/dist/chunks/studio-frb0qbf7.js +0 -6
- package/dist/chunks/studio-gh97gngt.js +0 -5
- package/dist/chunks/studio-nbxqcgvf.js +0 -5
- package/dist/chunks/studio-t1eedsyx.js +0 -4
- package/dist/chunks/studio-vavmwshr.js +0 -5
- package/dist/chunks/studio-xk0z6msk.js +0 -5
- package/dist/chunks/workspace-b69mgm0e.js +0 -4
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{ae}from"./studio-0bbxhhce.js";var xe=ae(function(Rr){Object.defineProperty(Rr,"__esModule",{value:!0});Rr.regexpCode=Rr.getEsmExportName=Rr.getProperty=Rr.safeStringify=Rr.stringify=Rr.strConcat=Rr.addCodeArg=Rr.str=Rr._=Rr.nil=Rr._Code=Rr.Name=Rr.IDENTIFIER=Rr._CodeOrName=void 0;class Le{}Rr._CodeOrName=Le;Rr.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class pe extends Le{constructor(e){super();if(!Rr.IDENTIFIER.test(e))throw Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}Rr.Name=pe;class U extends Le{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((t,r)=>`${t}${r}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,r)=>{if(r instanceof pe)t[r.str]=(t[r.str]||0)+1;return t},{})}}Rr._Code=U;Rr.nil=new U("");function Or(e,...t){let r=[e[0]],n=0;while(n<t.length)Nt(r,t[n]),r.push(e[++n]);return new U(r)}Rr._=Or;var Ot=new U("+");function Nr(e,...t){let r=[Pe(e[0])],n=0;while(n<t.length)r.push(Ot),Nt(r,t[n]),r.push(Ot,Pe(e[++n]));return Li(r),new U(r)}Rr.str=Nr;function Nt(e,t){if(t instanceof U)e.push(...t._items);else if(t instanceof pe)e.push(t);else e.push(Bi(t))}Rr.addCodeArg=Nt;function Li(e){let t=1;while(t<e.length-1){if(e[t]===Ot){let r=Gi(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function Gi(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string"){if(t instanceof pe||e[e.length-1]!=='"')return;if(typeof t!="string")return`${e.slice(0,-1)}${t}"`;if(t[0]==='"')return e.slice(0,-1)+t.slice(1);return}if(typeof t=="string"&&t[0]==='"'&&!(e instanceof pe))return`"${e}${t.slice(1)}`;return}function Ji(e,t){return t.emptyStr()?e:e.emptyStr()?t:Nr`${e}${t}`}Rr.strConcat=Ji;function Bi(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Pe(Array.isArray(e)?e.join(","):e)}function Wi(e){return new U(Pe(e))}Rr.stringify=Wi;function Pe(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Rr.safeStringify=Pe;function Qi(e){return typeof e=="string"&&Rr.IDENTIFIER.test(e)?new U(`.${e}`):Or`[${e}]`}Rr.getProperty=Qi;function Zi(e){if(typeof e=="string"&&Rr.IDENTIFIER.test(e))return new U(`${e}`);throw Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}Rr.getEsmExportName=Zi;function Xi(e){return new U(e.toString())}Rr.regexpCode=Xi});var jt=ae(function(jr){Object.defineProperty(jr,"__esModule",{value:!0});jr.ValueScope=jr.ValueScopeName=jr.Scope=jr.varKinds=jr.UsedValueState=void 0;var D=xe();class Ir extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`);this.value=e.value}}var Je;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(Je||(jr.UsedValueState=Je={}));jr.varKinds={const:new D.Name("const"),let:new D.Name("let"),var:new D.Name("var")};class It{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof D.Name?e:this.name(e)}name(e){return new D.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,r;if(((r=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||r===void 0?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}jr.Scope=It;class Tt extends D.Name{constructor(e,t){super(t);this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=D._`.${new D.Name(t)}[${r}]`}}jr.ValueScopeName=Tt;var la=D._`\n`;class Tr extends It{constructor(e){super(e);this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?la:D.nil}}get(){return this._scope}name(e){return new Tt(e,this._newName(e))}value(e,t){var r;if(t.ref===void 0)throw Error("CodeGen: ref must be passed in value");let n=this.toName(e),{prefix:s}=n,o=(r=t.key)!==null&&r!==void 0?r:t.ref,i=this._values[s];if(i){let d=i.get(o);if(d)return d}else i=this._values[s]=new Map;i.set(o,n);let a=this._scope[s]||(this._scope[s]=[]),c=a.length;return a[c]=t.ref,n.setValue(t,{property:s,itemIndex:c}),n}getValue(e,t){let r=this._values[e];if(!r)return;return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(r)=>{if(r.scopePath===void 0)throw Error(`CodeGen: name "${r}" has no value`);return D._`${e}${r.scopePath}`})}scopeCode(e=this._values,t,r){return this._reduceValues(e,(n)=>{if(n.value===void 0)throw Error(`CodeGen: name "${n}" has no value`);return n.value.code},t,r)}_reduceValues(e,t,r={},n){let s=D.nil;for(let o in e){let i=e[o];if(!i)continue;let a=r[o]=r[o]||new Map;i.forEach((c)=>{if(a.has(c))return;a.set(c,Je.Started);let d=t(c);if(d){let u=this.opts.es5?jr.varKinds.var:jr.varKinds.const;s=D._`${s}${u} ${c} = ${d};${this.opts._n}`}else if(d=n===null||n===void 0?void 0:n(c))s=D._`${s}${d}${this.opts._n}`;else throw new Ir(c);a.set(c,Je.Completed)})}return s}}jr.ValueScope=Tr});var Rt=ae(function(A){Object.defineProperty(A,"__esModule",{value:!0});A.or=A.and=A.not=A.CodeGen=A.operators=A.varKinds=A.ValueScopeName=A.ValueScope=A.Scope=A.Name=A.regexpCode=A.stringify=A.getProperty=A.nil=A.strConcat=A.str=A._=void 0;var P=xe(),K=jt(),Y=xe();Object.defineProperty(A,"_",{enumerable:!0,get:function(){return Y._}});Object.defineProperty(A,"str",{enumerable:!0,get:function(){return Y.str}});Object.defineProperty(A,"strConcat",{enumerable:!0,get:function(){return Y.strConcat}});Object.defineProperty(A,"nil",{enumerable:!0,get:function(){return Y.nil}});Object.defineProperty(A,"getProperty",{enumerable:!0,get:function(){return Y.getProperty}});Object.defineProperty(A,"stringify",{enumerable:!0,get:function(){return Y.stringify}});Object.defineProperty(A,"regexpCode",{enumerable:!0,get:function(){return Y.regexpCode}});Object.defineProperty(A,"Name",{enumerable:!0,get:function(){return Y.Name}});var Ye=jt();Object.defineProperty(A,"Scope",{enumerable:!0,get:function(){return Ye.Scope}});Object.defineProperty(A,"ValueScope",{enumerable:!0,get:function(){return Ye.ValueScope}});Object.defineProperty(A,"ValueScopeName",{enumerable:!0,get:function(){return Ye.ValueScopeName}});Object.defineProperty(A,"varKinds",{enumerable:!0,get:function(){return Ye.varKinds}});A.operators={GT:new P._Code(">"),GTE:new P._Code(">="),LT:new P._Code("<"),LTE:new P._Code("<="),EQ:new P._Code("==="),NEQ:new P._Code("!=="),NOT:new P._Code("!"),OR:new P._Code("||"),AND:new P._Code("&&"),ADD:new P._Code("+")};class ee{optimizeNodes(){return this}optimizeNames(e,t){return this}}class Dr extends ee{constructor(e,t,r){super();this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){let r=e?K.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${r} ${this.name}${n};`+t}optimizeNames(e,t){if(!e[this.name.str])return;if(this.rhs)this.rhs=_e(this.rhs,e,t);return this}get names(){return this.rhs instanceof P._CodeOrName?this.rhs.names:{}}}class At extends ee{constructor(e,t,r){super();this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(this.lhs instanceof P.Name&&!e[this.lhs.str]&&!this.sideEffects)return;return this.rhs=_e(this.rhs,e,t),this}get names(){let e=this.lhs instanceof P.Name?{}:{...this.lhs.names};return Xe(e,this.rhs)}}class Ar extends At{constructor(e,t,r,n){super(e,r,n);this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class Mr extends ee{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class Fr extends ee{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class Vr extends ee{constructor(e){super();this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class zr extends ee{constructor(e){super();this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=_e(this.code,e,t),this}get names(){return this.code instanceof P._CodeOrName?this.code.names:{}}}class et extends ee{constructor(e=[]){super();this.nodes=e}render(e){return this.nodes.reduce((t,r)=>t+r.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;while(t--){let r=e[t].optimizeNodes();if(Array.isArray(r))e.splice(t,1,...r);else if(r)e[t]=r;else e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:r}=this,n=r.length;while(n--){let s=r[n];if(s.optimizeNames(e,t))continue;ma(e,s.names),r.splice(n,1)}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>oe(e,t.names),{})}}class te extends et{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class Ur extends et{}class ke extends te{}ke.kind="else";class Q extends te{constructor(e,t){super(t);this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);if(this.else)t+="else "+this.else.render(e);return t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let r=t.optimizeNodes();t=this.else=Array.isArray(r)?new ke(r):r}if(t){if(e===!1)return t instanceof Q?t:t.nodes;if(this.nodes.length)return this;return new Q(Jr(e),t instanceof Q?[t]:t.nodes)}if(e===!1||!this.nodes.length)return;return this}optimizeNames(e,t){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(e,t),!(super.optimizeNames(e,t)||this.else))return;return this.condition=_e(this.condition,e,t),this}get names(){let e=super.names;if(Xe(e,this.condition),this.else)oe(e,this.else.names);return e}}Q.kind="if";class me extends te{}me.kind="for";class Kr extends me{constructor(e){super();this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iteration=_e(this.iteration,e,t),this}get names(){return oe(super.names,this.iteration.names)}}class Hr extends me{constructor(e,t,r,n){super();this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){let t=e.es5?K.varKinds.var:this.varKind,{name:r,from:n,to:s}=this;return`for(${t} ${r}=${n}; ${r}<${s}; ${r}++)`+super.render(e)}get names(){let e=Xe(super.names,this.from);return Xe(e,this.to)}}class Ct extends me{constructor(e,t,r,n){super();this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iterable=_e(this.iterable,e,t),this}get names(){return oe(super.names,this.iterable.names)}}class Be extends te{constructor(e,t,r){super();this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}Be.kind="func";class We extends et{render(e){return"return "+super.render(e)}}We.kind="return";class Lr extends te{render(e){let t="try"+super.render(e);if(this.catch)t+=this.catch.render(e);if(this.finally)t+=this.finally.render(e);return t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),(r=this.catch)===null||r===void 0||r.optimizeNames(e,t),(n=this.finally)===null||n===void 0||n.optimizeNames(e,t),this}get names(){let e=super.names;if(this.catch)oe(e,this.catch.names);if(this.finally)oe(e,this.finally.names);return e}}class Qe extends te{constructor(e){super();this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}Qe.kind="catch";class Ze extends te{render(e){return"finally"+super.render(e)}}Ze.kind="finally";class Gr{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
|
|
2
|
-
`:""},this._extScope=e,this._scope=new K.Scope({parent:e}),this._nodes=[new Ur]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,n){let s=this._scope.toName(t);if(r!==void 0&&n)this._constants[s.str]=r;return this._leafNode(new Dr(e,s,r)),s}const(e,t,r){return this._def(K.varKinds.const,e,t,r)}let(e,t,r){return this._def(K.varKinds.let,e,t,r)}var(e,t,r){return this._def(K.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new At(e,t,r))}add(e,t){return this._leafNode(new Ar(e,A.operators.ADD,t))}code(e){if(typeof e=="function")e();else if(e!==P.nil)this._leafNode(new zr(e));return this}object(...e){let t=["{"];for(let[r,n]of e){if(t.length>1)t.push(",");if(t.push(r),r!==n||this.opts.es5)t.push(":"),P.addCodeArg(t,n)}return t.push("}"),new P._Code(t)}if(e,t,r){if(this._blockNode(new Q(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Q(e))}else(){return this._elseNode(new ke)}endIf(){return this._endBlockNode(Q,ke)}_for(e,t){if(this._blockNode(e),t)this.code(t).endFor();return this}for(e,t){return this._for(new Kr(e),t)}forRange(e,t,r,n,s=this.opts.es5?K.varKinds.var:K.varKinds.let){let o=this._scope.toName(e);return this._for(new Hr(s,o,t,r),()=>n(o))}forOf(e,t,r,n=K.varKinds.const){let s=this._scope.toName(e);if(this.opts.es5){let o=t instanceof P.Name?t:this.var("_arr",t);return this.forRange("_i",0,P._`${o}.length`,(i)=>{this.var(s,P._`${o}[${i}]`),r(s)})}return this._for(new Ct("of",n,s,t),()=>r(s))}forIn(e,t,r,n=this.opts.es5?K.varKinds.var:K.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,P._`Object.keys(${t})`,r);let s=this._scope.toName(e);return this._for(new Ct("in",n,s,t),()=>r(s))}endFor(){return this._endBlockNode(me)}label(e){return this._leafNode(new Mr(e))}break(e){return this._leafNode(new Fr(e))}return(e){let t=new We;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(We)}try(e,t,r){if(!t&&!r)throw Error('CodeGen: "try" without "catch" and "finally"');let n=new Lr;if(this._blockNode(n),this.code(e),t){let s=this.name("e");this._currNode=n.catch=new Qe(s),t(s)}if(r)this._currNode=n.finally=new Ze,this.code(r);return this._endBlockNode(Qe,Ze)}throw(e){return this._leafNode(new Vr(e))}block(e,t){if(this._blockStarts.push(this._nodes.length),e)this.code(e).endBlock(t);return this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw Error("CodeGen: not in self-balancing block");let r=this._nodes.length-t;if(r<0||e!==void 0&&r!==e)throw Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=P.nil,r,n){if(this._blockNode(new Be(e,t,r)),n)this.code(n).endFunc();return this}endFunc(){return this._endBlockNode(Be)}optimize(e=1){while(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,t){let r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof Q))throw Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}}A.CodeGen=Gr;function oe(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function Xe(e,t){return t instanceof P._CodeOrName?oe(e,t.names):e}function _e(e,t,r){if(e instanceof P.Name)return n(e);if(!s(e))return e;return new P._Code(e._items.reduce((o,i)=>{if(i instanceof P.Name)i=n(i);if(i instanceof P._Code)o.push(...i._items);else o.push(i);return o},[]));function n(o){let i=r[o.str];if(i===void 0||t[o.str]!==1)return o;return delete t[o.str],i}function s(o){return o instanceof P._Code&&o._items.some((i)=>i instanceof P.Name&&t[i.str]===1&&r[i.str]!==void 0)}}function ma(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function Jr(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:P._`!${Dt(e)}`}A.not=Jr;var _a=Br(A.operators.AND);function ga(...e){return e.reduce(_a)}A.and=ga;var ya=Br(A.operators.OR);function $a(...e){return e.reduce(ya)}A.or=$a;function Br(e){return(t,r)=>t===P.nil?r:r===P.nil?t:P._`${Dt(t)} ${e} ${Dt(r)}`}function Dt(e){return e instanceof P.Name?e:P._`(${e})`}});var nn=ae(function(sn){Object.defineProperty(sn,"__esModule",{value:!0});sn.checkStrictMode=sn.getErrorPath=sn.Type=sn.useFunc=sn.setEvaluated=sn.evaluatedPropsToName=sn.mergeEvaluated=sn.eachItem=sn.unescapeJsonPointer=sn.escapeJsonPointer=sn.escapeFragment=sn.unescapeFragment=sn.schemaRefOrVal=sn.schemaHasRulesButRef=sn.schemaHasRules=sn.checkUnknownRules=sn.alwaysValidSchema=sn.toHash=void 0;var O=Rt(),ba=xe();function Sa(e){let t={};for(let r of e)t[r]=!0;return t}sn.toHash=Sa;function Pa(e,t){if(typeof t=="boolean")return t;if(Object.keys(t).length===0)return!0;return Xr(e,t),!Yr(t,e.self.RULES.all)}sn.alwaysValidSchema=Pa;function Xr(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema)return;if(typeof t==="boolean")return;let s=n.RULES.keywords;for(let o in t)if(!s[o])rn(e,`unknown keyword: "${o}"`)}sn.checkUnknownRules=Xr;function Yr(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}sn.schemaHasRules=Yr;function xa(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}sn.schemaHasRulesButRef=xa;function ka({topSchemaRef:e,schemaPath:t},r,n,s){if(!s){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return O._`${r}`}return O._`${e}${t}${O.getProperty(n)}`}sn.schemaRefOrVal=ka;function Oa(e){return en(decodeURIComponent(e))}sn.unescapeFragment=Oa;function Na(e){return encodeURIComponent(Ft(e))}sn.escapeFragment=Na;function Ft(e){if(typeof e=="number")return`${e}`;return e.replace(/~/g,"~0").replace(/\//g,"~1")}sn.escapeJsonPointer=Ft;function en(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}sn.unescapeJsonPointer=en;function Ra(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}sn.eachItem=Ra;function Qr({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(s,o,i,a)=>{let c=i===void 0?o:i instanceof O.Name?(o instanceof O.Name?e(s,o,i):t(s,o,i),i):o instanceof O.Name?(t(s,i,o),o):r(o,i);return a===O.Name&&!(c instanceof O.Name)?n(s,c):c}}sn.mergeEvaluated={props:Qr({mergeNames:(e,t,r)=>e.if(O._`${r} !== true && ${t} !== undefined`,()=>{e.if(O._`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,O._`${r} || {}`).code(O._`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if(O._`${r} !== true`,()=>{if(t===!0)e.assign(r,!0);else e.assign(r,O._`${r} || {}`),Vt(e,r,t)}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:tn}),items:Qr({mergeNames:(e,t,r)=>e.if(O._`${r} !== true && ${t} !== undefined`,()=>e.assign(r,O._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if(O._`${r} !== true`,()=>e.assign(r,t===!0?!0:O._`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function tn(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",O._`{}`);if(t!==void 0)Vt(e,r,t);return r}sn.evaluatedPropsToName=tn;function Vt(e,t,r){Object.keys(r).forEach((n)=>e.assign(O._`${t}${O.getProperty(n)}`,!0))}sn.setEvaluated=Vt;var Zr={};function qa(e,t){return e.scopeValue("func",{ref:t,code:Zr[t.code]||(Zr[t.code]=new ba._Code(t.code))})}sn.useFunc=qa;var Mt;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Mt||(sn.Type=Mt={}));function Ia(e,t,r){if(e instanceof O.Name){let n=t===Mt.Num;return r?n?O._`"[" + ${e} + "]"`:O._`"['" + ${e} + "']"`:n?O._`"/" + ${e}`:O._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?O.getProperty(e).toString():"/"+Ft(e)}sn.getErrorPath=Ia;function rn(e,t,r=e.opts.strictSchema){if(!r)return;if(t=`strict mode: ${t}`,r===!0)throw Error(t);e.self.logger.warn(t)}sn.checkStrictMode=rn});var kl=ae(function(an){Object.defineProperty(an,"__esModule",{value:!0});var I=Rt(),Qa={data:new I.Name("data"),valCxt:new I.Name("valCxt"),instancePath:new I.Name("instancePath"),parentData:new I.Name("parentData"),parentDataProperty:new I.Name("parentDataProperty"),rootData:new I.Name("rootData"),dynamicAnchors:new I.Name("dynamicAnchors"),vErrors:new I.Name("vErrors"),errors:new I.Name("errors"),this:new I.Name("this"),self:new I.Name("self"),scope:new I.Name("scope"),json:new I.Name("json"),jsonPos:new I.Name("jsonPos"),jsonLen:new I.Name("jsonLen"),jsonPart:new I.Name("jsonPart")};an.default=Qa});var Oe=ae(function(ln){Object.defineProperty(ln,"__esModule",{value:!0});ln.extendErrors=ln.resetErrorsCount=ln.reportExtraError=ln.reportError=ln.keyword$DataError=ln.keywordError=void 0;var x=Rt(),rt=nn(),j=kl();ln.keywordError={message:({keyword:e})=>x.str`must pass "${e}" keyword validation`};ln.keyword$DataError={message:({keyword:e,schemaType:t})=>t?x.str`"${e}" keyword must be ${t} ($data)`:x.str`"${e}" keyword is invalid ($data)`};function Xa(e,t=ln.keywordError,r,n){let{it:s}=e,{gen:o,compositeRule:i,allErrors:a}=s,c=un(e,t,r);if(n!==null&&n!==void 0?n:i||a)cn(o,c);else dn(s,x._`[${c}]`)}ln.reportError=Xa;function Ya(e,t=ln.keywordError,r){let{it:n}=e,{gen:s,compositeRule:o,allErrors:i}=n,a=un(e,t,r);if(cn(s,a),!(o||i))dn(n,j.default.vErrors)}ln.reportExtraError=Ya;function ec(e,t){e.assign(j.default.errors,t),e.if(x._`${j.default.vErrors} !== null`,()=>e.if(t,()=>e.assign(x._`${j.default.vErrors}.length`,t),()=>e.assign(j.default.vErrors,null)))}ln.resetErrorsCount=ec;function tc({gen:e,keyword:t,schemaValue:r,data:n,errsCount:s,it:o}){if(s===void 0)throw Error("ajv implementation error");let i=e.name("err");e.forRange("i",s,j.default.errors,(a)=>{if(e.const(i,x._`${j.default.vErrors}[${a}]`),e.if(x._`${i}.instancePath === undefined`,()=>e.assign(x._`${i}.instancePath`,x.strConcat(j.default.instancePath,o.errorPath))),e.assign(x._`${i}.schemaPath`,x.str`${o.errSchemaPath}/${t}`),o.opts.verbose)e.assign(x._`${i}.schema`,r),e.assign(x._`${i}.data`,n)})}ln.extendErrors=tc;function cn(e,t){let r=e.const("err",t);e.if(x._`${j.default.vErrors} === null`,()=>e.assign(j.default.vErrors,x._`[${r}]`),x._`${j.default.vErrors}.push(${r})`),e.code(x._`${j.default.errors}++`)}function dn(e,t){let{gen:r,validateName:n,schemaEnv:s}=e;if(s.$async)r.throw(x._`new ${e.ValidationError}(${t})`);else r.assign(x._`${n}.errors`,t),r.return(!1)}var ie={keyword:new x.Name("keyword"),schemaPath:new x.Name("schemaPath"),params:new x.Name("params"),propertyName:new x.Name("propertyName"),message:new x.Name("message"),schema:new x.Name("schema"),parentSchema:new x.Name("parentSchema")};function un(e,t,r){let{createErrors:n}=e.it;if(n===!1)return x._`{}`;return rc(e,t,r)}function rc(e,t,r={}){let{gen:n,it:s}=e,o=[nc(s,r),sc(e,r)];return oc(e,t,o),n.object(...o)}function nc({errorPath:e},{instancePath:t}){let r=t?x.str`${e}${rt.getErrorPath(t,rt.Type.Str)}`:e;return[j.default.instancePath,x.strConcat(j.default.instancePath,r)]}function sc({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let s=n?t:x.str`${t}/${e}`;if(r)s=x.str`${s}${rt.getErrorPath(r,rt.Type.Str)}`;return[ie.schemaPath,s]}function oc(e,{params:t,message:r},n){let{keyword:s,data:o,schemaValue:i,it:a}=e,{opts:c,propertyName:d,topSchemaRef:u,schemaPath:l}=a;if(n.push([ie.keyword,s],[ie.params,typeof t=="function"?t(e):t||x._`{}`]),c.messages)n.push([ie.message,typeof r=="function"?r(e):r]);if(c.verbose)n.push([ie.schema,i],[ie.parentSchema,x._`${u}${l}`],[j.default.data,o]);if(d)n.push([ie.propertyName,d])}});var _n=ae(function(pn){Object.defineProperty(pn,"__esModule",{value:!0});pn.boolOrEmptySchema=pn.topBoolOrEmptySchema=void 0;var uc=Oe(),lc=Rt(),fc=kl(),hc={message:"boolean schema is false"};function pc(e){let{gen:t,schema:r,validateName:n}=e;if(r===!1)hn(e,!1);else if(typeof r=="object"&&r.$async===!0)t.return(fc.default.data);else t.assign(lc._`${n}.errors`,null),t.return(!0)}pn.topBoolOrEmptySchema=pc;function mc(e,t){let{gen:r,schema:n}=e;if(n===!1)r.var(t,!1),hn(e);else r.var(t,!0)}pn.boolOrEmptySchema=mc;function hn(e,t){let{gen:r,data:n}=e;uc.reportError({gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e},hc,void 0,t)}});var Ut=ae(function(gn){Object.defineProperty(gn,"__esModule",{value:!0});gn.getRules=gn.isJSONType=void 0;var gc=["string","number","integer","boolean","null","object","array"],yc=new Set(gc);function $c(e){return typeof e=="string"&&yc.has(e)}gn.isJSONType=$c;function vc(){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:{}}}gn.getRules=vc});var Kt=ae(function(wn){Object.defineProperty(wn,"__esModule",{value:!0});wn.shouldUseRule=wn.shouldUseGroup=wn.schemaHasRulesForType=void 0;function Ec({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&$n(e,n)}wn.schemaHasRulesForType=Ec;function $n(e,t){return t.rules.some((r)=>vn(e,r))}wn.shouldUseGroup=$n;function vn(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some((n)=>e[n]!==void 0))}wn.shouldUseRule=vn});var Ne=ae(function(xn){Object.defineProperty(xn,"__esModule",{value:!0});xn.reportTypeError=xn.checkDataTypes=xn.checkDataType=xn.coerceAndCheckDataType=xn.getJSONTypes=xn.getSchemaTypes=xn.DataType=void 0;var Pc=Ut(),xc=Kt(),kc=Oe(),b=Rt(),bn=nn(),ge;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(ge||(xn.DataType=ge={}));function Oc(e){let t=Sn(e.type);if(t.includes("null")){if(e.nullable===!1)throw Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw Error('"nullable" cannot be used without "type"');if(e.nullable===!0)t.push("null")}return t}xn.getSchemaTypes=Oc;function Sn(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(Pc.isJSONType))return t;throw Error("type must be JSONType or JSONType[]: "+t.join(","))}xn.getJSONTypes=Sn;function Nc(e,t){let{gen:r,data:n,opts:s}=e,o=Rc(t,s.coerceTypes),i=t.length>0&&!(o.length===0&&t.length===1&&xc.schemaHasRulesForType(e,t[0]));if(i){let a=Lt(t,n,s.strictNumbers,ge.Wrong);r.if(a,()=>{if(o.length)qc(e,t,o);else Gt(e)})}return i}xn.coerceAndCheckDataType=Nc;var Pn=new Set(["string","number","integer","boolean","null"]);function Rc(e,t){return t?e.filter((r)=>Pn.has(r)||t==="array"&&r==="array"):[]}function qc(e,t,r){let{gen:n,data:s,opts:o}=e,i=n.let("dataType",b._`typeof ${s}`),a=n.let("coerced",b._`undefined`);if(o.coerceTypes==="array")n.if(b._`${i} == 'object' && Array.isArray(${s}) && ${s}.length == 1`,()=>n.assign(s,b._`${s}[0]`).assign(i,b._`typeof ${s}`).if(Lt(t,s,o.strictNumbers),()=>n.assign(a,s)));n.if(b._`${a} !== undefined`);for(let d of r)if(Pn.has(d)||d==="array"&&o.coerceTypes==="array")c(d);n.else(),Gt(e),n.endIf(),n.if(b._`${a} !== undefined`,()=>{n.assign(s,a),Ic(e,a)});function c(d){switch(d){case"string":n.elseIf(b._`${i} == "number" || ${i} == "boolean"`).assign(a,b._`"" + ${s}`).elseIf(b._`${s} === null`).assign(a,b._`""`);return;case"number":n.elseIf(b._`${i} == "boolean" || ${s} === null
|
|
1
|
+
import{ae}from"./studio-v2bvmbjj.js";var xe=ae(function(Rr){Object.defineProperty(Rr,"__esModule",{value:!0});Rr.regexpCode=Rr.getEsmExportName=Rr.getProperty=Rr.safeStringify=Rr.stringify=Rr.strConcat=Rr.addCodeArg=Rr.str=Rr._=Rr.nil=Rr._Code=Rr.Name=Rr.IDENTIFIER=Rr._CodeOrName=void 0;class Le{}Rr._CodeOrName=Le;Rr.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class pe extends Le{constructor(e){super();if(!Rr.IDENTIFIER.test(e))throw Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}Rr.Name=pe;class U extends Le{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((t,r)=>`${t}${r}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,r)=>{if(r instanceof pe)t[r.str]=(t[r.str]||0)+1;return t},{})}}Rr._Code=U;Rr.nil=new U("");function Or(e,...t){let r=[e[0]],n=0;while(n<t.length)Nt(r,t[n]),r.push(e[++n]);return new U(r)}Rr._=Or;var Ot=new U("+");function Nr(e,...t){let r=[Pe(e[0])],n=0;while(n<t.length)r.push(Ot),Nt(r,t[n]),r.push(Ot,Pe(e[++n]));return Li(r),new U(r)}Rr.str=Nr;function Nt(e,t){if(t instanceof U)e.push(...t._items);else if(t instanceof pe)e.push(t);else e.push(Bi(t))}Rr.addCodeArg=Nt;function Li(e){let t=1;while(t<e.length-1){if(e[t]===Ot){let r=Gi(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function Gi(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string"){if(t instanceof pe||e[e.length-1]!=='"')return;if(typeof t!="string")return`${e.slice(0,-1)}${t}"`;if(t[0]==='"')return e.slice(0,-1)+t.slice(1);return}if(typeof t=="string"&&t[0]==='"'&&!(e instanceof pe))return`"${e}${t.slice(1)}`;return}function Ji(e,t){return t.emptyStr()?e:e.emptyStr()?t:Nr`${e}${t}`}Rr.strConcat=Ji;function Bi(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Pe(Array.isArray(e)?e.join(","):e)}function Wi(e){return new U(Pe(e))}Rr.stringify=Wi;function Pe(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Rr.safeStringify=Pe;function Qi(e){return typeof e=="string"&&Rr.IDENTIFIER.test(e)?new U(`.${e}`):Or`[${e}]`}Rr.getProperty=Qi;function Zi(e){if(typeof e=="string"&&Rr.IDENTIFIER.test(e))return new U(`${e}`);throw Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}Rr.getEsmExportName=Zi;function Xi(e){return new U(e.toString())}Rr.regexpCode=Xi});var jt=ae(function(jr){Object.defineProperty(jr,"__esModule",{value:!0});jr.ValueScope=jr.ValueScopeName=jr.Scope=jr.varKinds=jr.UsedValueState=void 0;var D=xe();class Ir extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`);this.value=e.value}}var Je;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(Je||(jr.UsedValueState=Je={}));jr.varKinds={const:new D.Name("const"),let:new D.Name("let"),var:new D.Name("var")};class It{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof D.Name?e:this.name(e)}name(e){return new D.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,r;if(((r=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||r===void 0?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}jr.Scope=It;class Tt extends D.Name{constructor(e,t){super(t);this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=D._`.${new D.Name(t)}[${r}]`}}jr.ValueScopeName=Tt;var la=D._`\n`;class Tr extends It{constructor(e){super(e);this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?la:D.nil}}get(){return this._scope}name(e){return new Tt(e,this._newName(e))}value(e,t){var r;if(t.ref===void 0)throw Error("CodeGen: ref must be passed in value");let n=this.toName(e),{prefix:s}=n,o=(r=t.key)!==null&&r!==void 0?r:t.ref,i=this._values[s];if(i){let d=i.get(o);if(d)return d}else i=this._values[s]=new Map;i.set(o,n);let a=this._scope[s]||(this._scope[s]=[]),c=a.length;return a[c]=t.ref,n.setValue(t,{property:s,itemIndex:c}),n}getValue(e,t){let r=this._values[e];if(!r)return;return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(r)=>{if(r.scopePath===void 0)throw Error(`CodeGen: name "${r}" has no value`);return D._`${e}${r.scopePath}`})}scopeCode(e=this._values,t,r){return this._reduceValues(e,(n)=>{if(n.value===void 0)throw Error(`CodeGen: name "${n}" has no value`);return n.value.code},t,r)}_reduceValues(e,t,r={},n){let s=D.nil;for(let o in e){let i=e[o];if(!i)continue;let a=r[o]=r[o]||new Map;i.forEach((c)=>{if(a.has(c))return;a.set(c,Je.Started);let d=t(c);if(d){let u=this.opts.es5?jr.varKinds.var:jr.varKinds.const;s=D._`${s}${u} ${c} = ${d};${this.opts._n}`}else if(d=n===null||n===void 0?void 0:n(c))s=D._`${s}${d}${this.opts._n}`;else throw new Ir(c);a.set(c,Je.Completed)})}return s}}jr.ValueScope=Tr});var Rt=ae(function(A){Object.defineProperty(A,"__esModule",{value:!0});A.or=A.and=A.not=A.CodeGen=A.operators=A.varKinds=A.ValueScopeName=A.ValueScope=A.Scope=A.Name=A.regexpCode=A.stringify=A.getProperty=A.nil=A.strConcat=A.str=A._=void 0;var P=xe(),K=jt(),Y=xe();Object.defineProperty(A,"_",{enumerable:!0,get:function(){return Y._}});Object.defineProperty(A,"str",{enumerable:!0,get:function(){return Y.str}});Object.defineProperty(A,"strConcat",{enumerable:!0,get:function(){return Y.strConcat}});Object.defineProperty(A,"nil",{enumerable:!0,get:function(){return Y.nil}});Object.defineProperty(A,"getProperty",{enumerable:!0,get:function(){return Y.getProperty}});Object.defineProperty(A,"stringify",{enumerable:!0,get:function(){return Y.stringify}});Object.defineProperty(A,"regexpCode",{enumerable:!0,get:function(){return Y.regexpCode}});Object.defineProperty(A,"Name",{enumerable:!0,get:function(){return Y.Name}});var Ye=jt();Object.defineProperty(A,"Scope",{enumerable:!0,get:function(){return Ye.Scope}});Object.defineProperty(A,"ValueScope",{enumerable:!0,get:function(){return Ye.ValueScope}});Object.defineProperty(A,"ValueScopeName",{enumerable:!0,get:function(){return Ye.ValueScopeName}});Object.defineProperty(A,"varKinds",{enumerable:!0,get:function(){return Ye.varKinds}});A.operators={GT:new P._Code(">"),GTE:new P._Code(">="),LT:new P._Code("<"),LTE:new P._Code("<="),EQ:new P._Code("==="),NEQ:new P._Code("!=="),NOT:new P._Code("!"),OR:new P._Code("||"),AND:new P._Code("&&"),ADD:new P._Code("+")};class ee{optimizeNodes(){return this}optimizeNames(e,t){return this}}class Dr extends ee{constructor(e,t,r){super();this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){let r=e?K.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${r} ${this.name}${n};`+t}optimizeNames(e,t){if(!e[this.name.str])return;if(this.rhs)this.rhs=_e(this.rhs,e,t);return this}get names(){return this.rhs instanceof P._CodeOrName?this.rhs.names:{}}}class At extends ee{constructor(e,t,r){super();this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(this.lhs instanceof P.Name&&!e[this.lhs.str]&&!this.sideEffects)return;return this.rhs=_e(this.rhs,e,t),this}get names(){let e=this.lhs instanceof P.Name?{}:{...this.lhs.names};return Xe(e,this.rhs)}}class Ar extends At{constructor(e,t,r,n){super(e,r,n);this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class Mr extends ee{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class Fr extends ee{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class Vr extends ee{constructor(e){super();this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class zr extends ee{constructor(e){super();this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=_e(this.code,e,t),this}get names(){return this.code instanceof P._CodeOrName?this.code.names:{}}}class et extends ee{constructor(e=[]){super();this.nodes=e}render(e){return this.nodes.reduce((t,r)=>t+r.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;while(t--){let r=e[t].optimizeNodes();if(Array.isArray(r))e.splice(t,1,...r);else if(r)e[t]=r;else e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:r}=this,n=r.length;while(n--){let s=r[n];if(s.optimizeNames(e,t))continue;ma(e,s.names),r.splice(n,1)}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>oe(e,t.names),{})}}class te extends et{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class Ur extends et{}class ke extends te{}ke.kind="else";class Q extends te{constructor(e,t){super(t);this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);if(this.else)t+="else "+this.else.render(e);return t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let r=t.optimizeNodes();t=this.else=Array.isArray(r)?new ke(r):r}if(t){if(e===!1)return t instanceof Q?t:t.nodes;if(this.nodes.length)return this;return new Q(Jr(e),t instanceof Q?[t]:t.nodes)}if(e===!1||!this.nodes.length)return;return this}optimizeNames(e,t){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(e,t),!(super.optimizeNames(e,t)||this.else))return;return this.condition=_e(this.condition,e,t),this}get names(){let e=super.names;if(Xe(e,this.condition),this.else)oe(e,this.else.names);return e}}Q.kind="if";class me extends te{}me.kind="for";class Kr extends me{constructor(e){super();this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iteration=_e(this.iteration,e,t),this}get names(){return oe(super.names,this.iteration.names)}}class Hr extends me{constructor(e,t,r,n){super();this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){let t=e.es5?K.varKinds.var:this.varKind,{name:r,from:n,to:s}=this;return`for(${t} ${r}=${n}; ${r}<${s}; ${r}++)`+super.render(e)}get names(){let e=Xe(super.names,this.from);return Xe(e,this.to)}}class Ct extends me{constructor(e,t,r,n){super();this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iterable=_e(this.iterable,e,t),this}get names(){return oe(super.names,this.iterable.names)}}class Be extends te{constructor(e,t,r){super();this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}Be.kind="func";class We extends et{render(e){return"return "+super.render(e)}}We.kind="return";class Lr extends te{render(e){let t="try"+super.render(e);if(this.catch)t+=this.catch.render(e);if(this.finally)t+=this.finally.render(e);return t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),(r=this.catch)===null||r===void 0||r.optimizeNames(e,t),(n=this.finally)===null||n===void 0||n.optimizeNames(e,t),this}get names(){let e=super.names;if(this.catch)oe(e,this.catch.names);if(this.finally)oe(e,this.finally.names);return e}}class Qe extends te{constructor(e){super();this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}Qe.kind="catch";class Ze extends te{render(e){return"finally"+super.render(e)}}Ze.kind="finally";class Gr{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
|
|
2
|
+
`:""},this._extScope=e,this._scope=new K.Scope({parent:e}),this._nodes=[new Ur]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,n){let s=this._scope.toName(t);if(r!==void 0&&n)this._constants[s.str]=r;return this._leafNode(new Dr(e,s,r)),s}const(e,t,r){return this._def(K.varKinds.const,e,t,r)}let(e,t,r){return this._def(K.varKinds.let,e,t,r)}var(e,t,r){return this._def(K.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new At(e,t,r))}add(e,t){return this._leafNode(new Ar(e,A.operators.ADD,t))}code(e){if(typeof e=="function")e();else if(e!==P.nil)this._leafNode(new zr(e));return this}object(...e){let t=["{"];for(let[r,n]of e){if(t.length>1)t.push(",");if(t.push(r),r!==n||this.opts.es5)t.push(":"),P.addCodeArg(t,n)}return t.push("}"),new P._Code(t)}if(e,t,r){if(this._blockNode(new Q(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Q(e))}else(){return this._elseNode(new ke)}endIf(){return this._endBlockNode(Q,ke)}_for(e,t){if(this._blockNode(e),t)this.code(t).endFor();return this}for(e,t){return this._for(new Kr(e),t)}forRange(e,t,r,n,s=this.opts.es5?K.varKinds.var:K.varKinds.let){let o=this._scope.toName(e);return this._for(new Hr(s,o,t,r),()=>n(o))}forOf(e,t,r,n=K.varKinds.const){let s=this._scope.toName(e);if(this.opts.es5){let o=t instanceof P.Name?t:this.var("_arr",t);return this.forRange("_i",0,P._`${o}.length`,(i)=>{this.var(s,P._`${o}[${i}]`),r(s)})}return this._for(new Ct("of",n,s,t),()=>r(s))}forIn(e,t,r,n=this.opts.es5?K.varKinds.var:K.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,P._`Object.keys(${t})`,r);let s=this._scope.toName(e);return this._for(new Ct("in",n,s,t),()=>r(s))}endFor(){return this._endBlockNode(me)}label(e){return this._leafNode(new Mr(e))}break(e){return this._leafNode(new Fr(e))}return(e){let t=new We;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(We)}try(e,t,r){if(!t&&!r)throw Error('CodeGen: "try" without "catch" and "finally"');let n=new Lr;if(this._blockNode(n),this.code(e),t){let s=this.name("e");this._currNode=n.catch=new Qe(s),t(s)}if(r)this._currNode=n.finally=new Ze,this.code(r);return this._endBlockNode(Qe,Ze)}throw(e){return this._leafNode(new Vr(e))}block(e,t){if(this._blockStarts.push(this._nodes.length),e)this.code(e).endBlock(t);return this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw Error("CodeGen: not in self-balancing block");let r=this._nodes.length-t;if(r<0||e!==void 0&&r!==e)throw Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=P.nil,r,n){if(this._blockNode(new Be(e,t,r)),n)this.code(n).endFunc();return this}endFunc(){return this._endBlockNode(Be)}optimize(e=1){while(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,t){let r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof Q))throw Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}}A.CodeGen=Gr;function oe(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function Xe(e,t){return t instanceof P._CodeOrName?oe(e,t.names):e}function _e(e,t,r){if(e instanceof P.Name)return n(e);if(!s(e))return e;return new P._Code(e._items.reduce((o,i)=>{if(i instanceof P.Name)i=n(i);if(i instanceof P._Code)o.push(...i._items);else o.push(i);return o},[]));function n(o){let i=r[o.str];if(i===void 0||t[o.str]!==1)return o;return delete t[o.str],i}function s(o){return o instanceof P._Code&&o._items.some((i)=>i instanceof P.Name&&t[i.str]===1&&r[i.str]!==void 0)}}function ma(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function Jr(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:P._`!${Dt(e)}`}A.not=Jr;var _a=Br(A.operators.AND);function ga(...e){return e.reduce(_a)}A.and=ga;var ya=Br(A.operators.OR);function $a(...e){return e.reduce(ya)}A.or=$a;function Br(e){return(t,r)=>t===P.nil?r:r===P.nil?t:P._`${Dt(t)} ${e} ${Dt(r)}`}function Dt(e){return e instanceof P.Name?e:P._`(${e})`}});var nn=ae(function(sn){Object.defineProperty(sn,"__esModule",{value:!0});sn.checkStrictMode=sn.getErrorPath=sn.Type=sn.useFunc=sn.setEvaluated=sn.evaluatedPropsToName=sn.mergeEvaluated=sn.eachItem=sn.unescapeJsonPointer=sn.escapeJsonPointer=sn.escapeFragment=sn.unescapeFragment=sn.schemaRefOrVal=sn.schemaHasRulesButRef=sn.schemaHasRules=sn.checkUnknownRules=sn.alwaysValidSchema=sn.toHash=void 0;var O=Rt(),ba=xe();function Sa(e){let t={};for(let r of e)t[r]=!0;return t}sn.toHash=Sa;function Pa(e,t){if(typeof t=="boolean")return t;if(Object.keys(t).length===0)return!0;return Xr(e,t),!Yr(t,e.self.RULES.all)}sn.alwaysValidSchema=Pa;function Xr(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema)return;if(typeof t==="boolean")return;let s=n.RULES.keywords;for(let o in t)if(!s[o])rn(e,`unknown keyword: "${o}"`)}sn.checkUnknownRules=Xr;function Yr(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}sn.schemaHasRules=Yr;function xa(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}sn.schemaHasRulesButRef=xa;function ka({topSchemaRef:e,schemaPath:t},r,n,s){if(!s){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return O._`${r}`}return O._`${e}${t}${O.getProperty(n)}`}sn.schemaRefOrVal=ka;function Oa(e){return en(decodeURIComponent(e))}sn.unescapeFragment=Oa;function Na(e){return encodeURIComponent(Ft(e))}sn.escapeFragment=Na;function Ft(e){if(typeof e=="number")return`${e}`;return e.replace(/~/g,"~0").replace(/\//g,"~1")}sn.escapeJsonPointer=Ft;function en(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}sn.unescapeJsonPointer=en;function Ra(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}sn.eachItem=Ra;function Qr({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(s,o,i,a)=>{let c=i===void 0?o:i instanceof O.Name?(o instanceof O.Name?e(s,o,i):t(s,o,i),i):o instanceof O.Name?(t(s,i,o),o):r(o,i);return a===O.Name&&!(c instanceof O.Name)?n(s,c):c}}sn.mergeEvaluated={props:Qr({mergeNames:(e,t,r)=>e.if(O._`${r} !== true && ${t} !== undefined`,()=>{e.if(O._`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,O._`${r} || {}`).code(O._`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if(O._`${r} !== true`,()=>{if(t===!0)e.assign(r,!0);else e.assign(r,O._`${r} || {}`),Vt(e,r,t)}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:tn}),items:Qr({mergeNames:(e,t,r)=>e.if(O._`${r} !== true && ${t} !== undefined`,()=>e.assign(r,O._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if(O._`${r} !== true`,()=>e.assign(r,t===!0?!0:O._`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function tn(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",O._`{}`);if(t!==void 0)Vt(e,r,t);return r}sn.evaluatedPropsToName=tn;function Vt(e,t,r){Object.keys(r).forEach((n)=>e.assign(O._`${t}${O.getProperty(n)}`,!0))}sn.setEvaluated=Vt;var Zr={};function qa(e,t){return e.scopeValue("func",{ref:t,code:Zr[t.code]||(Zr[t.code]=new ba._Code(t.code))})}sn.useFunc=qa;var Mt;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Mt||(sn.Type=Mt={}));function Ia(e,t,r){if(e instanceof O.Name){let n=t===Mt.Num;return r?n?O._`"[" + ${e} + "]"`:O._`"['" + ${e} + "']"`:n?O._`"/" + ${e}`:O._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?O.getProperty(e).toString():"/"+Ft(e)}sn.getErrorPath=Ia;function rn(e,t,r=e.opts.strictSchema){if(!r)return;if(t=`strict mode: ${t}`,r===!0)throw Error(t);e.self.logger.warn(t)}sn.checkStrictMode=rn});var Sl=ae(function(an){Object.defineProperty(an,"__esModule",{value:!0});var I=Rt(),Qa={data:new I.Name("data"),valCxt:new I.Name("valCxt"),instancePath:new I.Name("instancePath"),parentData:new I.Name("parentData"),parentDataProperty:new I.Name("parentDataProperty"),rootData:new I.Name("rootData"),dynamicAnchors:new I.Name("dynamicAnchors"),vErrors:new I.Name("vErrors"),errors:new I.Name("errors"),this:new I.Name("this"),self:new I.Name("self"),scope:new I.Name("scope"),json:new I.Name("json"),jsonPos:new I.Name("jsonPos"),jsonLen:new I.Name("jsonLen"),jsonPart:new I.Name("jsonPart")};an.default=Qa});var Oe=ae(function(ln){Object.defineProperty(ln,"__esModule",{value:!0});ln.extendErrors=ln.resetErrorsCount=ln.reportExtraError=ln.reportError=ln.keyword$DataError=ln.keywordError=void 0;var x=Rt(),rt=nn(),j=Sl();ln.keywordError={message:({keyword:e})=>x.str`must pass "${e}" keyword validation`};ln.keyword$DataError={message:({keyword:e,schemaType:t})=>t?x.str`"${e}" keyword must be ${t} ($data)`:x.str`"${e}" keyword is invalid ($data)`};function Xa(e,t=ln.keywordError,r,n){let{it:s}=e,{gen:o,compositeRule:i,allErrors:a}=s,c=un(e,t,r);if(n!==null&&n!==void 0?n:i||a)cn(o,c);else dn(s,x._`[${c}]`)}ln.reportError=Xa;function Ya(e,t=ln.keywordError,r){let{it:n}=e,{gen:s,compositeRule:o,allErrors:i}=n,a=un(e,t,r);if(cn(s,a),!(o||i))dn(n,j.default.vErrors)}ln.reportExtraError=Ya;function ec(e,t){e.assign(j.default.errors,t),e.if(x._`${j.default.vErrors} !== null`,()=>e.if(t,()=>e.assign(x._`${j.default.vErrors}.length`,t),()=>e.assign(j.default.vErrors,null)))}ln.resetErrorsCount=ec;function tc({gen:e,keyword:t,schemaValue:r,data:n,errsCount:s,it:o}){if(s===void 0)throw Error("ajv implementation error");let i=e.name("err");e.forRange("i",s,j.default.errors,(a)=>{if(e.const(i,x._`${j.default.vErrors}[${a}]`),e.if(x._`${i}.instancePath === undefined`,()=>e.assign(x._`${i}.instancePath`,x.strConcat(j.default.instancePath,o.errorPath))),e.assign(x._`${i}.schemaPath`,x.str`${o.errSchemaPath}/${t}`),o.opts.verbose)e.assign(x._`${i}.schema`,r),e.assign(x._`${i}.data`,n)})}ln.extendErrors=tc;function cn(e,t){let r=e.const("err",t);e.if(x._`${j.default.vErrors} === null`,()=>e.assign(j.default.vErrors,x._`[${r}]`),x._`${j.default.vErrors}.push(${r})`),e.code(x._`${j.default.errors}++`)}function dn(e,t){let{gen:r,validateName:n,schemaEnv:s}=e;if(s.$async)r.throw(x._`new ${e.ValidationError}(${t})`);else r.assign(x._`${n}.errors`,t),r.return(!1)}var ie={keyword:new x.Name("keyword"),schemaPath:new x.Name("schemaPath"),params:new x.Name("params"),propertyName:new x.Name("propertyName"),message:new x.Name("message"),schema:new x.Name("schema"),parentSchema:new x.Name("parentSchema")};function un(e,t,r){let{createErrors:n}=e.it;if(n===!1)return x._`{}`;return rc(e,t,r)}function rc(e,t,r={}){let{gen:n,it:s}=e,o=[nc(s,r),sc(e,r)];return oc(e,t,o),n.object(...o)}function nc({errorPath:e},{instancePath:t}){let r=t?x.str`${e}${rt.getErrorPath(t,rt.Type.Str)}`:e;return[j.default.instancePath,x.strConcat(j.default.instancePath,r)]}function sc({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let s=n?t:x.str`${t}/${e}`;if(r)s=x.str`${s}${rt.getErrorPath(r,rt.Type.Str)}`;return[ie.schemaPath,s]}function oc(e,{params:t,message:r},n){let{keyword:s,data:o,schemaValue:i,it:a}=e,{opts:c,propertyName:d,topSchemaRef:u,schemaPath:l}=a;if(n.push([ie.keyword,s],[ie.params,typeof t=="function"?t(e):t||x._`{}`]),c.messages)n.push([ie.message,typeof r=="function"?r(e):r]);if(c.verbose)n.push([ie.schema,i],[ie.parentSchema,x._`${u}${l}`],[j.default.data,o]);if(d)n.push([ie.propertyName,d])}});var _n=ae(function(pn){Object.defineProperty(pn,"__esModule",{value:!0});pn.boolOrEmptySchema=pn.topBoolOrEmptySchema=void 0;var uc=Oe(),lc=Rt(),fc=Sl(),hc={message:"boolean schema is false"};function pc(e){let{gen:t,schema:r,validateName:n}=e;if(r===!1)hn(e,!1);else if(typeof r=="object"&&r.$async===!0)t.return(fc.default.data);else t.assign(lc._`${n}.errors`,null),t.return(!0)}pn.topBoolOrEmptySchema=pc;function mc(e,t){let{gen:r,schema:n}=e;if(n===!1)r.var(t,!1),hn(e);else r.var(t,!0)}pn.boolOrEmptySchema=mc;function hn(e,t){let{gen:r,data:n}=e;uc.reportError({gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e},hc,void 0,t)}});var Ut=ae(function(gn){Object.defineProperty(gn,"__esModule",{value:!0});gn.getRules=gn.isJSONType=void 0;var gc=["string","number","integer","boolean","null","object","array"],yc=new Set(gc);function $c(e){return typeof e=="string"&&yc.has(e)}gn.isJSONType=$c;function vc(){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:{}}}gn.getRules=vc});var Kt=ae(function(wn){Object.defineProperty(wn,"__esModule",{value:!0});wn.shouldUseRule=wn.shouldUseGroup=wn.schemaHasRulesForType=void 0;function Ec({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&$n(e,n)}wn.schemaHasRulesForType=Ec;function $n(e,t){return t.rules.some((r)=>vn(e,r))}wn.shouldUseGroup=$n;function vn(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some((n)=>e[n]!==void 0))}wn.shouldUseRule=vn});var Ne=ae(function(xn){Object.defineProperty(xn,"__esModule",{value:!0});xn.reportTypeError=xn.checkDataTypes=xn.checkDataType=xn.coerceAndCheckDataType=xn.getJSONTypes=xn.getSchemaTypes=xn.DataType=void 0;var Pc=Ut(),xc=Kt(),kc=Oe(),b=Rt(),bn=nn(),ge;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(ge||(xn.DataType=ge={}));function Oc(e){let t=Sn(e.type);if(t.includes("null")){if(e.nullable===!1)throw Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw Error('"nullable" cannot be used without "type"');if(e.nullable===!0)t.push("null")}return t}xn.getSchemaTypes=Oc;function Sn(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(Pc.isJSONType))return t;throw Error("type must be JSONType or JSONType[]: "+t.join(","))}xn.getJSONTypes=Sn;function Nc(e,t){let{gen:r,data:n,opts:s}=e,o=Rc(t,s.coerceTypes),i=t.length>0&&!(o.length===0&&t.length===1&&xc.schemaHasRulesForType(e,t[0]));if(i){let a=Lt(t,n,s.strictNumbers,ge.Wrong);r.if(a,()=>{if(o.length)qc(e,t,o);else Gt(e)})}return i}xn.coerceAndCheckDataType=Nc;var Pn=new Set(["string","number","integer","boolean","null"]);function Rc(e,t){return t?e.filter((r)=>Pn.has(r)||t==="array"&&r==="array"):[]}function qc(e,t,r){let{gen:n,data:s,opts:o}=e,i=n.let("dataType",b._`typeof ${s}`),a=n.let("coerced",b._`undefined`);if(o.coerceTypes==="array")n.if(b._`${i} == 'object' && Array.isArray(${s}) && ${s}.length == 1`,()=>n.assign(s,b._`${s}[0]`).assign(i,b._`typeof ${s}`).if(Lt(t,s,o.strictNumbers),()=>n.assign(a,s)));n.if(b._`${a} !== undefined`);for(let d of r)if(Pn.has(d)||d==="array"&&o.coerceTypes==="array")c(d);n.else(),Gt(e),n.endIf(),n.if(b._`${a} !== undefined`,()=>{n.assign(s,a),Ic(e,a)});function c(d){switch(d){case"string":n.elseIf(b._`${i} == "number" || ${i} == "boolean"`).assign(a,b._`"" + ${s}`).elseIf(b._`${s} === null`).assign(a,b._`""`);return;case"number":n.elseIf(b._`${i} == "boolean" || ${s} === null
|
|
3
3
|
|| (${i} == "string" && ${s} && ${s} == +${s})`).assign(a,b._`+${s}`);return;case"integer":n.elseIf(b._`${i} === "boolean" || ${s} === null
|
|
4
4
|
|| (${i} === "string" && ${s} && ${s} == +${s} && !(${s} % 1))`).assign(a,b._`+${s}`);return;case"boolean":n.elseIf(b._`${s} === "false" || ${s} === 0 || ${s} === null`).assign(a,!1).elseIf(b._`${s} === "true" || ${s} === 1`).assign(a,!0);return;case"null":n.elseIf(b._`${s} === "" || ${s} === 0 || ${s} === false`),n.assign(a,null);return;case"array":n.elseIf(b._`${i} === "string" || ${i} === "number"
|
|
5
|
-
|| ${i} === "boolean" || ${s} === null`).assign(a,b._`[${s}]`)}}}function Ic({gen:e,parentData:t,parentDataProperty:r},n){e.if(b._`${t} !== undefined`,()=>e.assign(b._`${t}[${r}]`,n))}function Ht(e,t,r,n=ge.Correct){let s=n===ge.Correct?b.operators.EQ:b.operators.NEQ,o;switch(e){case"null":return b._`${t} ${s} null`;case"array":o=b._`Array.isArray(${t})`;break;case"object":o=b._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=i(b._`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=i();break;default:return b._`typeof ${t} ${s} ${e}`}return n===ge.Correct?o:b.not(o);function i(a=b.nil){return b.and(b._`typeof ${t} == "number"`,a,r?b._`isFinite(${t})`:b.nil)}}xn.checkDataType=Ht;function Lt(e,t,r,n){if(e.length===1)return Ht(e[0],t,r,n);let s,o=bn.toHash(e);if(o.array&&o.object){let i=b._`typeof ${t} != "object"`;s=o.null?i:b._`!${t} || ${i}`,delete o.null,delete o.array,delete o.object}else s=b.nil;if(o.number)delete o.integer;for(let i in o)s=b.and(s,Ht(i,t,r,n));return s}xn.checkDataTypes=Lt;var Tc={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?b._`{type: ${e}}`:b._`{type: ${t}}`};function Gt(e){let t=jc(e);kc.reportError(t,Tc)}xn.reportTypeError=Gt;function jc(e){let{gen:t,data:r,schema:n}=e,s=bn.schemaRefOrVal(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:s,schemaValue:s,parentSchema:n,params:{},it:e}}});var qn=ae(function(Nn){Object.defineProperty(Nn,"__esModule",{value:!0});Nn.assignDefaults=void 0;var ye=Rt(),zc=nn();function Uc(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let s in r)On(e,s,r[s].default);else if(t==="array"&&Array.isArray(n))n.forEach((s,o)=>On(e,o,s.default))}Nn.assignDefaults=Uc;function On(e,t,r){let{gen:n,compositeRule:s,data:o,opts:i}=e;if(r===void 0)return;let a=ye._`${o}${ye.getProperty(t)}`;if(s){zc.checkStrictMode(e,`default is ignored for: ${a}`);return}let c=ye._`${a} === undefined`;if(i.useDefaults==="empty")c=ye._`${c} || ${a} === null || ${a} === ""`;n.if(c,ye._`${a} = ${ye.stringify(r)}`)}});var V=ae(function(jn){Object.defineProperty(jn,"__esModule",{value:!0});jn.validateUnion=jn.validateArray=jn.usePattern=jn.callValidateCode=jn.schemaProperties=jn.allSchemaProperties=jn.noPropertyInData=jn.propertyInData=jn.isOwnProperty=jn.hasPropFunc=jn.reportMissingProp=jn.checkMissingProp=jn.checkReportMissingProp=void 0;var N=Rt(),Jt=nn(),re=kl(),Kc=nn();function Hc(e,t){let{gen:r,data:n,it:s}=e;r.if(Wt(r,n,t,s.opts.ownProperties),()=>{e.setParams({missingProperty:N._`${t}`},!0),e.error()})}jn.checkReportMissingProp=Hc;function Lc({gen:e,data:t,it:{opts:r}},n,s){return N.or(...n.map((o)=>N.and(Wt(e,t,o,r.ownProperties),N._`${s} = ${o}`)))}jn.checkMissingProp=Lc;function Gc(e,t){e.setParams({missingProperty:t},!0),e.error()}jn.reportMissingProp=Gc;function In(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:N._`Object.prototype.hasOwnProperty`})}jn.hasPropFunc=In;function Bt(e,t,r){return N._`${In(e)}.call(${t}, ${r})`}jn.isOwnProperty=Bt;function Jc(e,t,r,n){let s=N._`${t}${N.getProperty(r)} !== undefined`;return n?N._`${s} && ${Bt(e,t,r)}`:s}jn.propertyInData=Jc;function Wt(e,t,r,n){let s=N._`${t}${N.getProperty(r)} === undefined`;return n?N.or(s,N.not(Bt(e,t,r))):s}jn.noPropertyInData=Wt;function Tn(e){return e?Object.keys(e).filter((t)=>t!=="__proto__"):[]}jn.allSchemaProperties=Tn;function Bc(e,t){return Tn(t).filter((r)=>!Jt.alwaysValidSchema(e,t[r]))}jn.schemaProperties=Bc;function Wc({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:s,errorPath:o},it:i},a,c,d){let u=d?N._`${e}, ${t}, ${n}${s}`:t,l=[[re.default.instancePath,N.strConcat(re.default.instancePath,o)],[re.default.parentData,i.parentData],[re.default.parentDataProperty,i.parentDataProperty],[re.default.rootData,re.default.rootData]];if(i.opts.dynamicRef)l.push([re.default.dynamicAnchors,re.default.dynamicAnchors]);let _=N._`${u}, ${r.object(...l)}`;return c!==N.nil?N._`${a}.call(${c}, ${_})`:N._`${a}(${_})`}jn.callValidateCode=Wc;var Qc=N._`new RegExp`;function Zc({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:s}=t.code,o=s(r,n);return e.scopeValue("pattern",{key:o.toString(),ref:o,code:N._`${s.code==="new RegExp"?Qc:Kc.useFunc(e,s)}(${r}, ${n})`})}jn.usePattern=Zc;function Xc(e){let{gen:t,data:r,keyword:n,it:s}=e,o=t.name("valid");if(s.allErrors){let a=t.let("valid",!0);return i(()=>t.assign(a,!1)),a}return t.var(o,!0),i(()=>t.break()),o;function i(a){let c=t.const("len",N._`${r}.length`);t.forRange("i",0,c,(d)=>{e.subschema({keyword:n,dataProp:d,dataPropType:Jt.Type.Num},o),t.if(N.not(o),a)})}}jn.validateArray=Xc;function Yc(e){let{gen:t,schema:r,keyword:n,it:s}=e;if(!Array.isArray(r))throw Error("ajv implementation error");if(r.some((c)=>Jt.alwaysValidSchema(s,c))&&!s.opts.unevaluated)return;let i=t.let("valid",!1),a=t.name("_valid");t.block(()=>r.forEach((c,d)=>{let u=e.subschema({keyword:n,schemaProp:d,compositeRule:!0},a);if(t.assign(i,N._`${i} || ${a}`),!e.mergeValidEvaluated(u,a))t.if(N.not(i))})),e.result(i,()=>e.reset(),()=>e.error(!0))}jn.validateUnion=Yc});var Vn=ae(function(Mn){Object.defineProperty(Mn,"__esModule",{value:!0});Mn.validateKeywordUsage=Mn.validSchemaType=Mn.funcKeywordCode=Mn.macroKeywordCode=void 0;var C=Rt(),ce=kl(),fd=V(),hd=Oe();function pd(e,t){let{gen:r,keyword:n,schema:s,parentSchema:o,it:i}=e,a=t.macro.call(i.self,s,o,i),c=An(r,n,a);if(i.opts.validateSchema!==!1)i.self.validateSchema(a,!0);let d=r.name("valid");e.subschema({schema:a,schemaPath:C.nil,errSchemaPath:`${i.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},d),e.pass(d,()=>e.error(!0))}Mn.macroKeywordCode=pd;function md(e,t){var r;let{gen:n,keyword:s,schema:o,parentSchema:i,$data:a,it:c}=e;gd(c,t);let d=!a&&t.compile?t.compile.call(c.self,o,i,c):t.validate,u=An(n,s,d),l=n.let("valid");e.block$data(l,_),e.ok((r=t.valid)!==null&&r!==void 0?r:l);function _(){if(t.errors===!1){if(f(),t.modifying)Dn(e);m(()=>e.error())}else{let g=t.async?p():h();if(t.modifying)Dn(e);m(()=>_d(e,g))}}function p(){let g=n.let("ruleErrs",null);return n.try(()=>f(C._`await `),(v)=>n.assign(l,!1).if(C._`${v} instanceof ${c.ValidationError}`,()=>n.assign(g,C._`${v}.errors`),()=>n.throw(v))),g}function h(){let g=C._`${u}.errors`;return n.assign(g,null),f(C.nil),g}function f(g=t.async?C._`await `:C.nil){let v=c.opts.passContext?ce.default.this:ce.default.self,S=!(("compile"in t)&&!a||t.schema===!1);n.assign(l,C._`${g}${fd.callValidateCode(e,u,v,S)}`,t.modifying)}function m(g){var v;n.if(C.not((v=t.valid)!==null&&v!==void 0?v:l),g)}}Mn.funcKeywordCode=md;function Dn(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,C._`${n.parentData}[${n.parentDataProperty}]`))}function _d(e,t){let{gen:r}=e;r.if(C._`Array.isArray(${t})`,()=>{r.assign(ce.default.vErrors,C._`${ce.default.vErrors} === null ? ${t} : ${ce.default.vErrors}.concat(${t})`).assign(ce.default.errors,C._`${ce.default.vErrors}.length`),hd.extendErrors(e)},()=>e.error())}function gd({schemaEnv:e},t){if(t.async&&!e.$async)throw Error("async keyword in sync schema")}function An(e,t,r){if(r===void 0)throw Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:C.stringify(r)})}function yd(e,t,r=!1){return!t.length||t.some((n)=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}Mn.validSchemaType=yd;function $d({schema:e,opts:t,self:r,errSchemaPath:n},s,o){if(Array.isArray(s.keyword)?!s.keyword.includes(o):s.keyword!==o)throw Error("ajv implementation error");let i=s.dependencies;if(i===null||i===void 0?void 0:i.some((a)=>!Object.prototype.hasOwnProperty.call(e,a)))throw Error(`parent schema must have dependencies of ${o}: ${i.join(",")}`);if(s.validateSchema){if(!s.validateSchema(e[o])){let c=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(s.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw Error(c)}}}Mn.validateKeywordUsage=$d});var Hn=ae(function(Un){Object.defineProperty(Un,"__esModule",{value:!0});Un.extendSubschemaMode=Un.extendSubschemaData=Un.getSubschema=void 0;var B=Rt(),zn=nn();function bd(e,{keyword:t,schemaProp:r,schema:n,schemaPath:s,errSchemaPath:o,topSchemaRef:i}){if(t!==void 0&&n!==void 0)throw Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let a=e.schema[t];return r===void 0?{schema:a,schemaPath:B._`${e.schemaPath}${B.getProperty(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:B._`${e.schemaPath}${B.getProperty(t)}${B.getProperty(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${zn.escapeFragment(r)}`}}if(n!==void 0){if(s===void 0||o===void 0||i===void 0)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:s,topSchemaRef:i,errSchemaPath:o}}throw Error('either "keyword" or "schema" must be passed')}Un.getSubschema=bd;function Sd(e,t,{dataProp:r,dataPropType:n,data:s,dataTypes:o,propertyName:i}){if(s!==void 0&&r!==void 0)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=t;if(r!==void 0){let{errorPath:d,dataPathArr:u,opts:l}=t,_=a.let("data",B._`${t.data}${B.getProperty(r)}`,!0);c(_),e.errorPath=B.str`${d}${zn.getErrorPath(r,n,l.jsPropertySyntax)}`,e.parentDataProperty=B._`${r}`,e.dataPathArr=[...u,e.parentDataProperty]}if(s!==void 0){let d=s instanceof B.Name?s:a.let("data",s,!0);if(c(d),i!==void 0)e.propertyName=i}if(o)e.dataTypes=o;function c(d){e.data=d,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,d]}}Un.extendSubschemaData=Sd;function Pd(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:s,allErrors:o}){if(n!==void 0)e.compositeRule=n;if(s!==void 0)e.createErrors=s;if(o!==void 0)e.allErrors=o;e.jtdDiscriminator=t,e.jtdMetadata=r}Un.extendSubschemaMode=Pd});var Qt=ae(function(hm,Ln){Ln.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,s,o;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),n=o.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[s]))return!1;for(s=n;s--!==0;){var i=o[s];if(!e(t[i],r[i]))return!1}return!0}return t!==t&&r!==r}});var Jn=ae(function(pm,Gn){var ne=Gn.exports=function(e,t,r){if(typeof t=="function")r=t,t={};r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},s=r.post||function(){};nt(t,n,s,e,"",e)};ne.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};ne.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};ne.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};ne.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function nt(e,t,r,n,s,o,i,a,c,d){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,s,o,i,a,c,d);for(var u in n){var l=n[u];if(Array.isArray(l)){if(u in ne.arrayKeywords)for(var _=0;_<l.length;_++)nt(e,t,r,l[_],s+"/"+u+"/"+_,o,s,u,n,_)}else if(u in ne.propsKeywords){if(l&&typeof l=="object")for(var p in l)nt(e,t,r,l[p],s+"/"+u+"/"+Od(p),o,s,u,n,p)}else if(u in ne.keywords||e.allKeys&&!(u in ne.skipKeywords))nt(e,t,r,l,s+"/"+u,o,s,u,n)}r(n,s,o,i,a,c,d)}}function Od(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var Re=ae(function(Zn){Object.defineProperty(Zn,"__esModule",{value:!0});Zn.getSchemaRefs=Zn.resolveUrl=Zn.normalizeId=Zn._getFullPath=Zn.getFullPath=Zn.inlineRef=void 0;var Nd=nn(),Rd=Qt(),qd=Jn(),Id=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Td(e,t=!0){if(typeof e=="boolean")return!0;if(t===!0)return!Zt(e);if(!t)return!1;return Bn(e)<=t}Zn.inlineRef=Td;var jd=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Zt(e){for(let t in e){if(jd.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(Zt))return!0;if(typeof r=="object"&&Zt(r))return!0}return!1}function Bn(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,Id.has(r))continue;if(typeof e[r]=="object")Nd.eachItem(e[r],(n)=>t+=Bn(n));if(t===1/0)return 1/0}return t}function Wn(e,t="",r){if(r!==!1)t=$e(t);let n=e.parse(t);return Qn(e,n)}Zn.getFullPath=Wn;function Qn(e,t){return e.serialize(t).split("#")[0]+"#"}Zn._getFullPath=Qn;var Cd=/#\/?$/;function $e(e){return e?e.replace(Cd,""):""}Zn.normalizeId=$e;function Dd(e,t,r){return r=$e(r),e.resolve(t,r)}Zn.resolveUrl=Dd;var Ad=/^[a-z_][-a-z0-9._]*$/i;function Md(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,s=$e(e[r]||t),o={"":s},i=Wn(n,s,!1),a={},c=new Set;return qd(e,{allKeys:!0},(l,_,p,h)=>{if(h===void 0)return;let f=i+_,m=o[h];if(typeof l[r]=="string")m=g.call(this,l[r]);v.call(this,l.$anchor),v.call(this,l.$dynamicAnchor),o[_]=m;function g(S){let k=this.opts.uriResolver.resolve;if(S=$e(m?k(m,S):S),c.has(S))throw u(S);c.add(S);let E=this.refs[S];if(typeof E=="string")E=this.refs[E];if(typeof E=="object")d(l,E.schema,S);else if(S!==$e(f))if(S[0]==="#")d(l,a[S],S),a[S]=l;else this.refs[S]=f;return S}function v(S){if(typeof S=="string"){if(!Ad.test(S))throw Error(`invalid anchor "${S}"`);g.call(this,`#${S}`)}}}),a;function d(l,_,p){if(_!==void 0&&!Rd(l,_))throw u(p)}function u(l){return Error(`reference "${l}" resolves to more than one schema`)}}Zn.getSchemaRefs=Md});var wf=ae(function(hs){Object.defineProperty(hs,"__esModule",{value:!0});hs.getData=hs.KeywordCxt=hs.validateFunctionCode=void 0;var rs=_n(),ns=Ne(),Xt=Kt(),st=Ne(),Hd=qn(),qe=Vn(),Yt=Hn(),y=Rt(),w=kl(),Ld=Re(),Z=nn(),Ie=Oe();function Gd(e){if(is(e)){if(as(e),os(e)){Wd(e);return}}ss(e,()=>rs.topBoolOrEmptySchema(e))}hs.validateFunctionCode=Gd;function ss({gen:e,validateName:t,schema:r,schemaEnv:n,opts:s},o){if(s.code.es5)e.func(t,y._`${w.default.data}, ${w.default.valCxt}`,n.$async,()=>{e.code(y._`"use strict"; ${Yn(r,s)}`),Bd(e,s),e.code(o)});else e.func(t,y._`${w.default.data}, ${Jd(s)}`,n.$async,()=>e.code(Yn(r,s)).code(o))}function Jd(e){return y._`{${w.default.instancePath}="", ${w.default.parentData}, ${w.default.parentDataProperty}, ${w.default.rootData}=${w.default.data}${e.dynamicRef?y._`, ${w.default.dynamicAnchors}={}`:y.nil}}={}`}function Bd(e,t){e.if(w.default.valCxt,()=>{if(e.var(w.default.instancePath,y._`${w.default.valCxt}.${w.default.instancePath}`),e.var(w.default.parentData,y._`${w.default.valCxt}.${w.default.parentData}`),e.var(w.default.parentDataProperty,y._`${w.default.valCxt}.${w.default.parentDataProperty}`),e.var(w.default.rootData,y._`${w.default.valCxt}.${w.default.rootData}`),t.dynamicRef)e.var(w.default.dynamicAnchors,y._`${w.default.valCxt}.${w.default.dynamicAnchors}`)},()=>{if(e.var(w.default.instancePath,y._`""`),e.var(w.default.parentData,y._`undefined`),e.var(w.default.parentDataProperty,y._`undefined`),e.var(w.default.rootData,w.default.data),t.dynamicRef)e.var(w.default.dynamicAnchors,y._`{}`)})}function Wd(e){let{schema:t,opts:r,gen:n}=e;ss(e,()=>{if(r.$comment&&t.$comment)ds(e);if(eu(e),n.let(w.default.vErrors,null),n.let(w.default.errors,0),r.unevaluated)Qd(e);cs(e),nu(e)});return}function Qd(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",y._`${r}.evaluated`),t.if(y._`${e.evaluated}.dynamicProps`,()=>t.assign(y._`${e.evaluated}.props`,y._`undefined`)),t.if(y._`${e.evaluated}.dynamicItems`,()=>t.assign(y._`${e.evaluated}.items`,y._`undefined`))}function Yn(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?y._`/*# sourceURL=${r} */`:y.nil}function Zd(e,t){if(is(e)){if(as(e),os(e)){Xd(e,t);return}}rs.boolOrEmptySchema(e,t)}function os({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function is(e){return typeof e.schema!="boolean"}function Xd(e,t){let{schema:r,gen:n,opts:s}=e;if(s.$comment&&r.$comment)ds(e);tu(e),ru(e);let o=n.const("_errs",w.default.errors);cs(e,o),n.var(t,y._`${o} === ${w.default.errors}`)}function as(e){Z.checkUnknownRules(e),Yd(e)}function cs(e,t){if(e.opts.jtd)return es(e,[],!1,t);let r=ns.getSchemaTypes(e.schema),n=ns.coerceAndCheckDataType(e,r);es(e,r,!n,t)}function Yd(e){let{schema:t,errSchemaPath:r,opts:n,self:s}=e;if(t.$ref&&n.ignoreKeywordsWithRef&&Z.schemaHasRulesButRef(t,s.RULES))s.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function eu(e){let{schema:t,opts:r}=e;if(t.default!==void 0&&r.useDefaults&&r.strictSchema)Z.checkStrictMode(e,"default is ignored in the schema root")}function tu(e){let t=e.schema[e.opts.schemaId];if(t)e.baseId=Ld.resolveUrl(e.opts.uriResolver,e.baseId,t)}function ru(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error("async schema in sync schema")}function ds({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:s}){let o=r.$comment;if(s.$comment===!0)e.code(y._`${w.default.self}.logger.log(${o})`);else if(typeof s.$comment=="function"){let i=y.str`${n}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code(y._`${w.default.self}.opts.$comment(${o}, ${i}, ${a}.schema)`)}}function nu(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:s,opts:o}=e;if(r.$async)t.if(y._`${w.default.errors} === 0`,()=>t.return(w.default.data),()=>t.throw(y._`new ${s}(${w.default.vErrors})`));else{if(t.assign(y._`${n}.errors`,w.default.vErrors),o.unevaluated)su(e);t.return(y._`${w.default.errors} === 0`)}}function su({gen:e,evaluated:t,props:r,items:n}){if(r instanceof y.Name)e.assign(y._`${t}.props`,r);if(n instanceof y.Name)e.assign(y._`${t}.items`,n)}function es(e,t,r,n){let{gen:s,schema:o,data:i,allErrors:a,opts:c,self:d}=e,{RULES:u}=d;if(o.$ref&&(c.ignoreKeywordsWithRef||!Z.schemaHasRulesButRef(o,u))){s.block(()=>ls(e,"$ref",u.all.$ref.definition));return}if(!c.jtd)ou(e,t);s.block(()=>{for(let _ of u.rules)l(_);l(u.post)});function l(_){if(!Xt.shouldUseGroup(o,_))return;if(_.type){if(s.if(st.checkDataType(_.type,i,c.strictNumbers)),ts(e,_),t.length===1&&t[0]===_.type&&r)s.else(),st.reportTypeError(e);s.endIf()}else ts(e,_);if(!a)s.if(y._`${w.default.errors} === ${n||0}`)}}function ts(e,t){let{gen:r,schema:n,opts:{useDefaults:s}}=e;if(s)Hd.assignDefaults(e,t.type);r.block(()=>{for(let o of t.rules)if(Xt.shouldUseRule(n,o))ls(e,o.keyword,o.definition,t.type)})}function ou(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;if(iu(e,t),!e.opts.allowUnionTypes)au(e,t);cu(e,e.dataTypes)}function iu(e,t){if(!t.length)return;if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach((r)=>{if(!us(e.dataTypes,r))er(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),uu(e,t)}function au(e,t){if(t.length>1&&!(t.length===2&&t.includes("null")))er(e,"use allowUnionTypes to allow union type keyword")}function cu(e,t){let r=e.self.RULES.all;for(let n in r){let s=r[n];if(typeof s=="object"&&Xt.shouldUseRule(e.schema,s)){let{type:o}=s.definition;if(o.length&&!o.some((i)=>du(t,i)))er(e,`missing type "${o.join(",")}" for keyword "${n}"`)}}}function du(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function us(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function uu(e,t){let r=[];for(let n of e.dataTypes)if(us(t,n))r.push(n);else if(t.includes("integer")&&n==="number")r.push("integer");e.dataTypes=r}function er(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,Z.checkStrictMode(e,t,e.opts.strictTypes)}class tr{constructor(e,t,r){if(qe.validateKeywordUsage(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=Z.schemaRefOrVal(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",fs(this.$data,e));else if(this.schemaCode=this.schemaValue,!qe.validSchemaType(this.schema,t.schemaType,t.allowUndefined))throw Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);if("code"in t?t.trackErrors:t.errors!==!1)this.errsCount=e.gen.const("_errs",w.default.errors)}result(e,t,r){this.failResult(y.not(e),t,r)}failResult(e,t,r){if(this.gen.if(e),r)r();else this.error();if(t){if(this.gen.else(),t(),this.allErrors)this.gen.endIf()}else if(this.allErrors)this.gen.endIf();else this.gen.else()}pass(e,t){this.failResult(y.not(e),void 0,t)}fail(e){if(e===void 0){if(this.error(),!this.allErrors)this.gen.if(!1);return}if(this.gen.if(e),this.error(),this.allErrors)this.gen.endIf();else this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail(y._`${t} !== undefined && (${y.or(this.invalid$data(),e)})`)}error(e,t,r){if(t){this.setParams(t),this._error(e,r),this.setParams({});return}this._error(e,r)}_error(e,t){(e?Ie.reportExtraError:Ie.reportError)(this,this.def.error,t)}$dataError(){Ie.reportError(this,this.def.$dataError||Ie.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error('add "trackErrors" to keyword definition');Ie.resetErrorsCount(this.gen,this.errsCount)}ok(e){if(!this.allErrors)this.gen.if(e)}setParams(e,t){if(t)Object.assign(this.params,e);else this.params=e}block$data(e,t,r=y.nil){this.gen.block(()=>{this.check$data(e,r),t()})}check$data(e=y.nil,t=y.nil){if(!this.$data)return;let{gen:r,schemaCode:n,schemaType:s,def:o}=this;if(r.if(y.or(y._`${n} === undefined`,t)),e!==y.nil)r.assign(e,!0);if(s.length||o.validateSchema){if(r.elseIf(this.invalid$data()),this.$dataError(),e!==y.nil)r.assign(e,!1)}r.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:r,def:n,it:s}=this;return y.or(o(),i());function o(){if(r.length){if(!(t instanceof y.Name))throw Error("ajv implementation error");let a=Array.isArray(r)?r:[r];return y._`${st.checkDataTypes(a,t,s.opts.strictNumbers,st.DataType.Wrong)}`}return y.nil}function i(){if(n.validateSchema){let a=e.scopeValue("validate$data",{ref:n.validateSchema});return y._`!${a}(${t})`}return y.nil}}subschema(e,t){let r=Yt.getSubschema(this.it,e);Yt.extendSubschemaData(r,this.it,e),Yt.extendSubschemaMode(r,e);let n={...this.it,...r,items:void 0,props:void 0};return Zd(n,t),n}mergeEvaluated(e,t){let{it:r,gen:n}=this;if(!r.opts.unevaluated)return;if(r.props!==!0&&e.props!==void 0)r.props=Z.mergeEvaluated.props(n,e.props,r.props,t);if(r.items!==!0&&e.items!==void 0)r.items=Z.mergeEvaluated.items(n,e.items,r.items,t)}mergeValidEvaluated(e,t){let{it:r,gen:n}=this;if(r.opts.unevaluated&&(r.props!==!0||r.items!==!0))return n.if(t,()=>this.mergeEvaluated(e,y.Name)),!0}}hs.KeywordCxt=tr;function ls(e,t,r,n){let s=new tr(e,r,t);if("code"in r)r.code(s,n);else if(s.$data&&r.validate)qe.funcKeywordCode(s,r);else if("macro"in r)qe.macroKeywordCode(s,r);else if(r.compile||r.validate)qe.funcKeywordCode(s,r)}var lu=/^\/(?:[^~]|~0|~1)*$/,fu=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function fs(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let s,o;if(e==="")return w.default.rootData;if(e[0]==="/"){if(!lu.test(e))throw Error(`Invalid JSON-pointer: ${e}`);s=e,o=w.default.rootData}else{let d=fu.exec(e);if(!d)throw Error(`Invalid JSON-pointer: ${e}`);let u=+d[1];if(s=d[2],s==="#"){if(u>=t)throw Error(c("property/index",u));return n[t-u]}if(u>t)throw Error(c("data",u));if(o=r[t-u],!s)return o}let i=o,a=s.split("/");for(let d of a)if(d)o=y._`${o}${y.getProperty(Z.unescapeJsonPointer(d))}`,i=y._`${i} && ${o}`;return i;function c(d,u){return`Cannot access ${d} ${u} levels up, current level is ${t}`}}hs.getData=fs});var Og=ae(function(_s){Object.defineProperty(_s,"__esModule",{value:!0});class ms extends Error{constructor(e){super("validation failed");this.errors=e,this.ajv=this.validation=!0}}_s.default=ms});var xf=ae(function(ys){Object.defineProperty(ys,"__esModule",{value:!0});var rr=Re();class gs extends Error{constructor(e,t,r,n){super(n||`can't resolve reference ${r} from id ${t}`);this.missingRef=rr.resolveUrl(e,t,r),this.missingSchema=rr.normalizeId(rr.getFullPath(e,this.missingRef))}}ys.default=gs});var Hy=ae(function(ws){Object.defineProperty(ws,"__esModule",{value:!0});ws.resolveSchema=ws.getCompilingSchema=ws.resolveRef=ws.compileSchema=ws.SchemaEnv=void 0;var H=Rt(),gu=Og(),de=kl(),L=Re(),$s=nn(),yu=wf();class Te{constructor(e){var t;this.refs={},this.dynamicAnchors={};let r;if(typeof e.schema=="object")r=e.schema;this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(t=e.baseId)!==null&&t!==void 0?t:L.normalizeId(r===null||r===void 0?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=r===null||r===void 0?void 0:r.$async,this.refs={}}}ws.SchemaEnv=Te;function sr(e){let t=vs.call(this,e);if(t)return t;let r=L.getFullPath(this.opts.uriResolver,e.root.baseId),{es5:n,lines:s}=this.opts.code,{ownProperties:o}=this.opts,i=new H.CodeGen(this.scope,{es5:n,lines:s,ownProperties:o}),a;if(e.$async)a=i.scopeValue("Error",{ref:gu.default,code:H._`require("ajv/dist/runtime/validation_error").default`});let c=i.scopeName("validate");e.validateName=c;let d={gen:i,allErrors:this.opts.allErrors,data:de.default.data,parentData:de.default.parentData,parentDataProperty:de.default.parentDataProperty,dataNames:[de.default.data],dataPathArr:[H.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:H.stringify(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:H.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:H._`""`,opts:this.opts,self:this},u;try{this._compilations.add(e),yu.validateFunctionCode(d),i.optimize(this.opts.code.optimize);let l=i.toString();if(u=`${i.scopeRefs(de.default.scope)}return ${l}`,this.opts.code.process)u=this.opts.code.process(u,e);let p=Function(`${de.default.self}`,`${de.default.scope}`,u)(this,this.scope.get());if(this.scope.value(c,{ref:p}),p.errors=null,p.schema=e.schema,p.schemaEnv=e,e.$async)p.$async=!0;if(this.opts.code.source===!0)p.source={validateName:c,validateCode:l,scopeValues:i._values};if(this.opts.unevaluated){let{props:h,items:f}=d;if(p.evaluated={props:h instanceof H.Name?void 0:h,items:f instanceof H.Name?void 0:f,dynamicProps:h instanceof H.Name,dynamicItems:f instanceof H.Name},p.source)p.source.evaluated=H.stringify(p.evaluated)}return e.validate=p,e}catch(l){if(delete e.validate,delete e.validateName,u)this.logger.error("Error compiling schema, function code:",u);throw l}finally{this._compilations.delete(e)}}ws.compileSchema=sr;function $u(e,t,r){var n;r=L.resolveUrl(this.opts.uriResolver,t,r);let s=e.refs[r];if(s)return s;let o=Eu.call(this,e,r);if(o===void 0){let i=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;if(i)o=new Te({schema:i,schemaId:a,root:e,baseId:t})}if(o===void 0)return;return e.refs[r]=vu.call(this,o)}ws.resolveRef=$u;function vu(e){if(L.inlineRef(e.schema,this.opts.inlineRefs))return e.schema;return e.validate?e:sr.call(this,e)}function vs(e){for(let t of this._compilations)if(wu(t,e))return t}ws.getCompilingSchema=vs;function wu(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function Eu(e,t){let r;while(typeof(r=this.refs[t])=="string")t=r;return r||this.schemas[t]||ot.call(this,e,t)}function ot(e,t){let r=this.opts.uriResolver.parse(t),n=L._getFullPath(this.opts.uriResolver,r),s=L.getFullPath(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===s)return nr.call(this,r,e);let o=L.normalizeId(n),i=this.refs[o]||this.schemas[o];if(typeof i=="string"){let a=ot.call(this,e,i);if(typeof(a===null||a===void 0?void 0:a.schema)!=="object")return;return nr.call(this,r,a)}if(typeof(i===null||i===void 0?void 0:i.schema)!=="object")return;if(!i.validate)sr.call(this,i);if(o===L.normalizeId(t)){let{schema:a}=i,{schemaId:c}=this.opts,d=a[c];if(d)s=L.resolveUrl(this.opts.uriResolver,s,d);return new Te({schema:a,schemaId:c,root:e,baseId:s})}return nr.call(this,r,i)}ws.resolveSchema=ot;var bu=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function nr(e,{baseId:t,schema:r,root:n}){var s;if(((s=e.fragment)===null||s===void 0?void 0:s[0])!=="/")return;for(let a of e.fragment.slice(1).split("/")){if(typeof r==="boolean")return;let c=r[$s.unescapeFragment(a)];if(c===void 0)return;r=c;let d=typeof r==="object"&&r[this.opts.schemaId];if(!bu.has(a)&&d)t=L.resolveUrl(this.opts.uriResolver,t,d)}let o;if(typeof r!="boolean"&&r.$ref&&!$s.schemaHasRulesButRef(r,this.RULES)){let a=L.resolveUrl(this.opts.uriResolver,t,r.$ref);o=ot.call(this,n,a)}let{schemaId:i}=this.opts;if(o=o||new Te({schema:r,schemaId:i,root:n,baseId:t}),o.schema!==o.root.schema)return o;return}});var bs=ae(function(vm,Ou){Ou.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var ur=ae(function(wm,Rs){var Nu=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),ir=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),ue=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),ar=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),Ps=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),cr=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),Ru=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u),M=Array(256);for(let t=0;t<256;t++)M[t]="%"+"0123456789ABCDEF"[t>>4]+"0123456789ABCDEF"[t&15];function T(e){if(e<2048)return M[192|e>>6]+M[128|e&63];if(e<65536)return M[224|e>>12]+M[128|e>>6&63]+M[128|e&63];return M[240|e>>18]+M[128|e>>12&63]+M[128|e>>6&63]+M[128|e&63]}function qu(e){let t="",r=0,n=0;for(n=0;n<e.length;n++){if(r=e[n].charCodeAt(0),r===48)continue;if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n];break}for(n+=1;n<e.length;n++){if(r=e[n].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n]}return t}var Iu=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),Tu=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),ju=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),Cu=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function Du(e){if(e.length===0)return!1;for(let t=0;t<e.length;t++){if(ju(e[t]))continue;if(e[t]==="%"&&t+2<e.length&&ue(e.slice(t+1,t+3))){t+=2;continue}return!1}return!0}function Ss(e){let t=-1,r=0,n=-1,s=0;for(let a=0;a<e.length;a++)if(e[a]==="0"){if(n===-1)n=a;if(s++,s>r)r=s,t=n}else n=-1,s=0;if(r<2)return e.join(":");let o=e.slice(0,t).join(":"),i=e.slice(t+r).join(":");return o+"::"+i}function Au(e){let t=e.indexOf("::");if(t!==-1&&e.indexOf("::",t+1)!==-1)return;let r=t===-1?e.split(":"):e.slice(0,t).split(":"),n=t===-1?[]:e.slice(t+2).split(":");if(t!==-1){if(r.length===1&&r[0]==="")r.length=0;if(n.length===1&&n[0]==="")n.length=0}let s=r.concat(n),o=0;for(let a=0;a<s.length;a++){let c=s[a];if(c==="")return;if(c.indexOf(".")!==-1){if(a!==s.length-1||t!==-1&&n.length===0||!ir(c))return;o+=2;continue}if(!Iu(c))return;s[a]=parseInt(c,16).toString(16),o++}if(t===-1){if(o!==8)return;return Ss(s)}if(o>=8)return;let i=s.slice(0,r.length);for(let a=o;a<8;a++)i.push("0");for(let a=r.length;a<s.length;a++)i.push(s[a]);return Ss(i)}function or(e){let t=e[0]==="["&&e[e.length-1]==="]";if((e[0]==="["||e[e.length-1]==="]")&&!t)return{host:e,isIPV6:!1,error:!0};let n=t?e.slice(1,-1):e;if(t&&Tu(n))return n=n.toLowerCase(),{host:`[${n}]`,escapedHost:n,isIPV6:!1,isIPVFuture:!0};if(Mu(n,":")<2)return{host:e,isIPV6:!1,error:t};let s="",o=n.indexOf("%");if(o!==-1){let a=n.slice(o,o+3).toLowerCase()==="%25"?3:1;if(s=n.slice(o+a),!Du(s))return{host:e,isIPV6:!1,error:!0};n=n.slice(0,o)}let i=Au(n);if(i===void 0)return{host:e,isIPV6:!1,error:!0};return{host:i+(s?"%"+s:""),escapedHost:i+(s?"%25"+s:""),isIPV6:!0}}function Mu(e,t){let r=0;for(let n=0;n<e.length;n++)if(e[n]===t)r++;return r}function Fu(e){let t=e,r=[],n=-1,s=0;while(s=t.length){if(s===1)if(t===".")break;else if(t==="/"){r.push("/");break}else{r.push(t);break}else if(s===2){if(t[0]==="."){if(t[1]===".")break;else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"){if(t[1]==="."||t[1]==="/"){r.push("/");break}}}else if(s===3){if(t==="/.."){if(r.length!==0)r.pop();r.push("/");break}}if(t[0]==="."){if(t[1]==="."){if(t[2]==="/"){t=t.slice(3);continue}}else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"){if(t[1]==="."){if(t[2]==="/"){t=t.slice(2);continue}else if(t[2]==="."){if(t[3]==="/"){if(t=t.slice(3),r.length!==0)r.pop();continue}}}}if((n=t.indexOf("/",1))===-1){r.push(t);break}else r.push(t.slice(0,n)),t=t.slice(n)}return r.join("")}var Vu={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},zu=/[@/?#:]/g,Uu=/[@/?#]/g;function xs(e,t){let r=t?Uu:zu;return r.lastIndex=0,e.replace(r,(n)=>Vu[n])}function ks(e,t=!1){if(e.indexOf("%")===-1)return e;let r="";for(let n=0;n<e.length;n++){if(e[n]==="%"&&n+2<e.length){let s=e.slice(n+1,n+3);if(ue(s)){let o=s.toUpperCase(),i=String.fromCharCode(parseInt(o,16));if(t&&ar(i))r+=i;else r+="%"+o;n+=2;continue}}r+=e[n]}return r}function Ku(e){let t="";for(let r=0;r<e.length;r++){let n=e[r];if(n==="%"&&r+2<e.length){let s=e.slice(r+1,r+3);if(ue(s)){let o=s.toUpperCase(),i=String.fromCharCode(parseInt(o,16));if(i!=="."&&ar(i))t+=i;else t+="%"+o;r+=2;continue}}if(Ps(n))t+=n;else{let s=e.charCodeAt(r);if(s<128)t+=Ns(s)?n:M[s];else if(s<55296||s>57343)t+=T(s);else if(s<=56319&&r+1<e.length){let o=e.charCodeAt(r+1);if(o>=56320&&o<=57343)t+=T(65536+(s-55296<<10)+(o-56320)),r++;else t+=T(65533)}else t+=T(65533)}}return t}function Hu(e,t=!1){let r="",n=t&&e[0]!=="/";for(let s=0;s<e.length;s++){let o=e[s];if(o==="%"&&s+2<e.length){let i=e.slice(s+1,s+3);if(ue(i)){r+="%"+i.toUpperCase(),s+=2;continue}}if(o==="/")n=!1;if(Ps(o)&&(o!==":"||!n))r+=o;else{let i=e.charCodeAt(s);if(i<128)r+=M[i];else if(i<55296||i>57343)r+=T(i);else if(i<=56319&&s+1<e.length){let a=e.charCodeAt(s+1);if(a>=56320&&a<=57343)r+=T(65536+(i-55296<<10)+(a-56320)),s++;else r+=T(65533)}else r+=T(65533)}}return r}function dr(e,t){let r="";for(let n=0;n<e.length;n++){let s=e[n];if(s==="%"&&n+2<e.length){let o=e.slice(n+1,n+3);if(ue(o)){r+="%"+o.toUpperCase(),n+=2;continue}}if(t(s))r+=s;else{let o=e.charCodeAt(n);if(o<128)r+=M[o];else if(o<55296||o>57343)r+=T(o);else if(o<=56319&&n+1<e.length){let i=e.charCodeAt(n+1);if(i>=56320&&i<=57343)r+=T(65536+(o-55296<<10)+(i-56320)),n++;else r+=T(65533)}else r+=T(65533)}}return r}function Os(e){return dr(e,Ru)}function Lu(e){return dr(e,cr)}function Gu(e){return dr(e,cr)}function Ns(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===42||e===43||e===45||e===46||e===47||e===64||e===95}function Ju(e){let t="";for(let r=0;r<e.length;r++){let n=e[r];if(n==="%"&&r+2<e.length){let s=e.slice(r+1,r+3);if(ue(s)){let o=s.toUpperCase(),i=String.fromCharCode(parseInt(o,16));if(ar(i))t+=i;else t+="%"+o;r+=2;continue}}if(cr(n))t+=n;else{let s=e.charCodeAt(r);if(s<128)t+=Ns(s)?n:M[s];else if(s<55296||s>57343)t+=T(s);else if(s<=56319&&r+1<e.length){let o=e.charCodeAt(r+1);if(o>=56320&&o<=57343)t+=T(65536+(s-55296<<10)+(o-56320)),r++;else t+=T(65533)}else t+=T(65533)}}return t}function Bu(e){let t="";for(let r=0;r<e.length;r++){if(e[r]==="%"&&r+2<e.length){let n=e.slice(r+1,r+3);if(ue(n)){t+="%"+n.toUpperCase(),r+=2;continue}}t+=escape(e[r])}return t}function Wu(e){let t=[];if(e.userinfo!==void 0)t.push(Os(e.userinfo)),t.push("@");if(e.host!==void 0){let r=e.host;if(!ir(r)){let n=or(r);if(n.isIPV6!==!0&&n.isIPVFuture!==!0)r=ks(r,!0),n=or(r);if(n.isIPV6===!0||n.isIPVFuture===!0)r=`[${n.escapedHost}]`;else r=xs(r,!1)}t.push(r)}if(typeof e.port==="number"||typeof e.port==="string")t.push(":"),t.push(String(e.port));return t.length?t.join(""):void 0}Rs.exports={nonSimpleDomain:Cu,recomposeAuthority:Wu,reescapeHostDelimiters:xs,normalizePercentEncoding:ks,normalizePathEncoding:Ku,serializePathEncoding:Hu,normalizeQueryFragmentEncoding:Ju,encodeUserinfo:Os,encodeQuery:Lu,encodeFragment:Gu,escapePreservingEscapes:Bu,removeDotSegments:Fu,isIPv4:ir,isUUID:Nu,normalizeIPv6:or,stringArrayToHexStripped:qu}});var Cs=ae(function(Em,js){var{isUUID:Qu}=ur(),Zu=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu,Xu=["http","https","ws","wss","urn","urn:uuid"];function Yu(e){return Xu.indexOf(e)!==-1}function lr(e){if(e.secure===!0)return!0;else if(e.secure===!1)return!1;else if(e.scheme)return e.scheme.length===3&&(e.scheme[0]==="w"||e.scheme[0]==="W")&&(e.scheme[1]==="s"||e.scheme[1]==="S")&&(e.scheme[2]==="s"||e.scheme[2]==="S");else return!1}function qs(e){if(!e.host)e.error=e.error||"HTTP URIs must have a host.";return e}function Is(e){let t=String(e.scheme).toLowerCase()==="https";if(e.port===(t?443:80)||e.port==="")e.port=void 0;if(!e.path)e.path="/";return e}function el(e){return e.secure=lr(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function tl(e){if(e.port===(lr(e)?443:80)||e.port==="")e.port=void 0;if(typeof e.secure==="boolean")e.scheme=e.secure?"wss":"ws",e.secure=void 0;if(e.resourceName){let t=e.resourceName.indexOf("?"),r=t===-1?e.resourceName:e.resourceName.slice(0,t);e.path=r&&r!=="/"?r:void 0,e.query=t===-1?void 0:e.resourceName.slice(t+1),e.resourceName=void 0}return e.fragment=void 0,e}function rl(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(Zu);if(r&&r[0]===e.path){let n=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let s=`${n}:${t.nid||e.nid}`,o=fr(s);if(e.path=void 0,o)e=o.parse(e,t)}else e.error=e.error||"URN can not be parsed.";return e}function nl(e,t){if(e.nid===void 0)throw Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),s=`${r}:${t.nid||n}`,o=fr(s);if(o)e=o.serialize(e,t);let i=e,a=e.nss;return i.path=`${n||t.nid}:${a}`,t.skipEscape=!0,i}function sl(e,t){let r=e;if(r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!Qu(r.uuid)))r.error=r.error||"UUID is not valid.";return r}function ol(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var Ts={scheme:"http",domainHost:!0,parse:qs,serialize:Is},il={scheme:"https",domainHost:Ts.domainHost,parse:qs,serialize:Is},it={scheme:"ws",domainHost:!0,parse:el,serialize:tl},al={scheme:"wss",domainHost:it.domainHost,parse:it.parse,serialize:it.serialize},cl={scheme:"urn",parse:rl,serialize:nl,skipNormalize:!0},dl={scheme:"urn:uuid",parse:sl,serialize:ol,skipNormalize:!0},at={http:Ts,https:il,ws:it,wss:al,urn:cl,"urn:uuid":dl};Object.setPrototypeOf(at,null);function fr(e){return e&&(at[e]||at[e.toLowerCase()])||void 0}js.exports={wsIsSecure:lr,SCHEMES:at,isValidSchemeName:Yu,getSchemeHandler:fr}});var Bs=ae(function(bm,ut){var{normalizeIPv6:Vs,removeDotSegments:Ce,recomposeAuthority:ul,normalizePercentEncoding:zs,normalizePathEncoding:ll,serializePathEncoding:Ds,normalizeQueryFragmentEncoding:As,encodeQuery:fl,encodeFragment:hl,reescapeHostDelimiters:pl,isIPv4:Us,nonSimpleDomain:ml}=ur(),{SCHEMES:Ks,getSchemeHandler:hr}=Cs(),Hs=/^[A-Za-z][A-Za-z0-9+.-]*$/u;function Ms(e){let t=unescape(String(e));if(!Hs.test(t))throw TypeError("URI scheme is malformed.");return t}function _l(e,t){if(typeof e==="string")e=Sl(e,t);else if(typeof e==="object")e=dt(le(e,t),t);return e}function gl(e,t,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},{parsed:s,malformedAuthorityOrPort:o,malformedPercentEncoding:i,malformedSchemeSpecific:a,malformedHost:c,malformedScheme:d}=ct(e,n),{parsed:u,malformedAuthorityOrPort:l,malformedPercentEncoding:_,malformedSchemeSpecific:p,malformedHost:h,malformedScheme:f}=ct(t,n);if(o||l||i||_||a||p||c||h||d||f)throw Error(s.error||u.error||"URI is malformed.");let m=Ls(s,u,n,!0),g=hr(r&&r.scheme||m.scheme),v=m.host,S=v!==void 0&&v!==""&&(Us(v)||Vs(v).isIPV6);Gs(m,r||{},g,S);let k=v&&v.indexOf("%")!==-1&&!/\P{ASCII}/u.test(v);if(m.error&&!k)throw Error(m.error);return n.skipEscape=!0,le(m,n)}function Ls(e,t,r,n){let s={};if(!n)e=dt(le(e,r),r),t=dt(le(t,r),r);if(r=r||{},!r.tolerant&&t.scheme)s.scheme=t.scheme,s.userinfo=t.userinfo,s.host=t.host,s.port=t.port,s.path=Ce(t.path||""),s.query=t.query;else{if(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)s.userinfo=t.userinfo,s.host=t.host,s.port=t.port,s.path=Ce(t.path||""),s.query=t.query;else{if(!t.path)if(s.path=e.path,t.query!==void 0)s.query=t.query;else s.query=e.query;else{if(t.path[0]==="/")s.path=Ce(t.path);else{if((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path)s.path="/"+t.path;else if(!e.path)s.path=t.path;else s.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path;s.path=Ce(s.path)}s.query=t.query}s.userinfo=e.userinfo,s.host=e.host,s.port=e.port}s.scheme=e.scheme}return s.fragment=t.fragment,s}function yl(e,t,r){let n=Fs(e,r),s=Fs(t,r);return n!==void 0&&s!==void 0&&n===s}function le(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},n=Object.assign({},t),s=[];if(r.scheme)r.scheme=Ms(r.scheme);let o=hr(n.scheme||r.scheme);if(o&&o.serialize)o.serialize(r,n);let i=r.userinfo!==void 0||r.host!==void 0||r.port!==void 0,a=!n.skipEscape&&r.scheme===void 0&&!i;if(r.path!==void 0)if(!n.skipEscape)r.path=Ds(r.path,a);else r.path=zs(r.path);if(n.reference!=="suffix"&&r.scheme)r.scheme=Ms(r.scheme),s.push(r.scheme,":");let c=ul(r);if(c!==void 0){if(n.reference!=="suffix")s.push("//");if(s.push(c),r.path&&r.path[0]!=="/")s.push("/")}if(r.path!==void 0){let d=r.path;if(!n.absolutePath&&(!o||!o.absolutePath))d=Ce(d);if(a)d=Ds(d,!0);if(c===void 0&&d[0]==="/"&&d[1]==="/")d="/%2F"+d.slice(2);s.push(d)}if(r.query!==void 0)s.push("?",fl(r.query));if(r.fragment!==void 0)s.push("#",hl(r.fragment));return s.join("")}var $l=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,vl=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,wl=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function El(e,t){if(t[2]!==void 0&&e.path&&e.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof e.port==="number"&&(e.port<0||e.port>65535))return"URI port is malformed.";return}function je(e){if(e===void 0)return!1;let t=e.indexOf("%");while(t!==-1){if(t+2>=e.length||!/^[\da-f]{2}$/iu.test(e.slice(t+1,t+3)))return!0;t=e.indexOf("%",t+3)}return!1}function bl(e){let t=e[4];return je(e[3])||t!==void 0&&!(t[0]==="["&&t[t.length-1]==="]")&&je(t)||je(e[6])||je(e[7])||je(e[8])}function Gs(e,t,r,n){if(!t.unicodeSupport&&(!r||!r.unicodeSupport)&&e.host&&e.host[0]!=="["&&(t.domainHost||r&&r.domainHost)&&n===!1&&ml(e.host))try{e.host=new URL("http://"+e.host).hostname}catch(s){return e.error=e.error||"Host's domain name can not be converted to ASCII: "+s,!0}return!1}function ct(e,t){let r=Object.assign({},t),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},s=!1,o=!1,i=!1,a=!1,c=!1,d=!1,u=!1;if(r.reference==="suffix")if(r.scheme)e=r.scheme+":"+e;else e="//"+e;let l=e.match(vl);if(l!==null&&l[1].indexOf("\\")!==-1)n.error="URI authority must not contain a literal backslash.",s=!0;let _=e.match(wl);if(_!==null){let h=_[1],f=h.replace(/[\t\n\r]/g,"");if(f.length>=2){if(f.slice(0,2)!=="//")n.error=n.error||"URI authority must not contain a literal backslash.",s=!0;else if(h.length!==f.length)n.error=n.error||"URI authority introducer must not contain whitespace.",s=!0}}let p=e.match($l);if(p){if(n.scheme=p[1],n.userinfo=p[3],n.host=p[4],n.port=parseInt(p[5],10),n.path=p[6]||"",n.query=p[7],n.fragment=p[8],n.scheme!==void 0){let m=unescape(n.scheme);if(Hs.test(m))n.scheme=m.toLowerCase();else n.error=n.error||"URI scheme is malformed.",d=!0}if(o=bl(p),o)n.error=n.error||"URI contains malformed percent-encoding.";if(isNaN(n.port))n.port=p[5];let h=El(n,p);if(h!==void 0)n.error=n.error||h,s=!0;if(n.host)if(Us(n.host)===!1){let g=n.host[0]==="["&&n.host[n.host.length-1]==="]",v=Vs(n.host);if(u=v.isIPV6||v.isIPVFuture===!0,c=g&&v.error===!0,n.host=u?v.host:v.host.toLowerCase(),c)n.error=n.error||"URI host is malformed.",s=!0}else u=!0;if(n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path)n.reference="same-document";else if(n.scheme===void 0)n.reference="relative";else if(n.fragment===void 0)n.reference="absolute";else n.reference="uri";if(r.reference&&r.reference!=="suffix"&&r.reference!==n.reference)n.error=n.error||"URI is not a "+r.reference+" reference.";let f=hr(r.scheme||n.scheme);if(a=Gs(n,r,f,u),!f||f&&!f.skipNormalize){if(e.indexOf("%")!==-1){if(n.host!==void 0&&!c){let m=u?n.host:zs(n.host,!0);n.host=pl(m,u)}}if(n.path)n.path=ll(n.path);if(n.query)n.query=As(n.query);if(n.fragment)n.fragment=As(n.fragment)}if(f&&f.parse){if(f.parse(n,r),f===Ks.urn&&n.nid===void 0)i=!0}}else n.error=n.error||"URI can not be parsed.";return{parsed:n,malformedAuthorityOrPort:s,malformedPercentEncoding:o,malformedSchemeSpecific:i,malformedHost:a,malformedScheme:d}}function dt(e,t){return ct(e,t).parsed}function Sl(e,t){return Js(e,t).normalized}function Js(e,t){let{parsed:r,malformedAuthorityOrPort:n,malformedPercentEncoding:s,malformedSchemeSpecific:o,malformedHost:i,malformedScheme:a}=ct(e,t);return{normalized:n||s||o||i||a?e:le(r,t),malformedAuthorityOrPort:n,malformedPercentEncoding:s,malformedSchemeSpecific:o,malformedHost:i,malformedScheme:a}}function Fs(e,t){if(typeof e!=="string"&&typeof e!=="object")return;let r;try{r=typeof e==="string"?e:le(e,t)}catch{return}let{normalized:n,malformedAuthorityOrPort:s,malformedPercentEncoding:o,malformedSchemeSpecific:i,malformedHost:a,malformedScheme:c}=Js(r,t);return s||o||i||a||c?void 0:n}var pr={SCHEMES:Ks,normalize:_l,resolve:gl,resolveComponent:Ls,equal:yl,serialize:le,parse:dt};ut.exports=pr;ut.exports.default=pr;ut.exports.fastUri=pr});var Zs=ae(function(Qs){Object.defineProperty(Qs,"__esModule",{value:!0});var Ws=Bs();Ws.code='require("ajv/dist/runtime/uri").default';Qs.default=Ws});var s_=ae(function(X){Object.defineProperty(X,"__esModule",{value:!0});X.CodeGen=X.Name=X.nil=X.stringify=X.str=X._=X.KeywordCxt=void 0;var xl=wf();Object.defineProperty(X,"KeywordCxt",{enumerable:!0,get:function(){return xl.KeywordCxt}});var ve=Rt();Object.defineProperty(X,"_",{enumerable:!0,get:function(){return ve._}});Object.defineProperty(X,"str",{enumerable:!0,get:function(){return ve.str}});Object.defineProperty(X,"stringify",{enumerable:!0,get:function(){return ve.stringify}});Object.defineProperty(X,"nil",{enumerable:!0,get:function(){return ve.nil}});Object.defineProperty(X,"Name",{enumerable:!0,get:function(){return ve.Name}});Object.defineProperty(X,"CodeGen",{enumerable:!0,get:function(){return ve.CodeGen}});var Ol=Og(),ro=xf(),Nl=Ut(),Ae=Hy(),Rl=Rt(),De=Re(),lt=Ne(),_r=nn(),Xs=bs(),ql=Zs(),no=(e,t)=>new RegExp(e,t);no.code="new RegExp";var Il=["removeAdditional","useDefaults","coerceTypes"],Tl=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),jl={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},Cl={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Ys=200;function Dl(e){var t,r,n,s,o,i,a,c,d,u,l,_,p,h,f,m,g,v,S,k,E,J,W,Pt,xt;let Se=e.strict,kt=(t=e.code)===null||t===void 0?void 0:t.optimize,xr=kt===!0||kt===void 0?1:kt||0,kr=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:no,Hi=(s=e.uriResolver)!==null&&s!==void 0?s:ql.default;return{strictSchema:(i=(o=e.strictSchema)!==null&&o!==void 0?o:Se)!==null&&i!==void 0?i:!0,strictNumbers:(c=(a=e.strictNumbers)!==null&&a!==void 0?a:Se)!==null&&c!==void 0?c:!0,strictTypes:(u=(d=e.strictTypes)!==null&&d!==void 0?d:Se)!==null&&u!==void 0?u:"log",strictTuples:(_=(l=e.strictTuples)!==null&&l!==void 0?l:Se)!==null&&_!==void 0?_:"log",strictRequired:(h=(p=e.strictRequired)!==null&&p!==void 0?p:Se)!==null&&h!==void 0?h:!1,code:e.code?{...e.code,optimize:xr,regExp:kr}:{optimize:xr,regExp:kr},loopRequired:(f=e.loopRequired)!==null&&f!==void 0?f:Ys,loopEnum:(m=e.loopEnum)!==null&&m!==void 0?m:Ys,meta:(g=e.meta)!==null&&g!==void 0?g:!0,messages:(v=e.messages)!==null&&v!==void 0?v:!0,inlineRefs:(S=e.inlineRefs)!==null&&S!==void 0?S:!0,schemaId:(k=e.schemaId)!==null&&k!==void 0?k:"$id",addUsedSchema:(E=e.addUsedSchema)!==null&&E!==void 0?E:!0,validateSchema:(J=e.validateSchema)!==null&&J!==void 0?J:!0,validateFormats:(W=e.validateFormats)!==null&&W!==void 0?W:!0,unicodeRegExp:(Pt=e.unicodeRegExp)!==null&&Pt!==void 0?Pt:!0,int32range:(xt=e.int32range)!==null&&xt!==void 0?xt:!0,uriResolver:Hi}}class ft{constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...Dl(e)};let{es5:t,lines:r}=this.opts.code;this.scope=new Rl.ValueScope({scope:{},prefixes:Tl,es5:t,lines:r}),this.logger=Ul(e.logger);let n=e.validateFormats;if(e.validateFormats=!1,this.RULES=Nl.getRules(),eo.call(this,jl,e,"NOT SUPPORTED"),eo.call(this,Cl,e,"DEPRECATED","warn"),this._metaOpts=Vl.call(this),e.formats)Ml.call(this);if(this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords)Fl.call(this,e.keywords);if(typeof e.meta=="object")this.addMetaSchema(e.meta);Al.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:r}=this.opts,n=Xs;if(r==="id")n={...Xs},n.id=n.$id,delete n.$id;if(t&&e)this.addMetaSchema(n,n[r],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[t]||e:void 0}validate(e,t){let r;if(typeof e=="string"){if(r=this.getSchema(e),!r)throw Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);let n=r(t);if(!("$async"in r))this.errors=r.errors;return n}compile(e,t){let r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if(typeof this.opts.loadSchema!="function")throw Error("options.loadSchema should be a function");let{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(d,u){await s.call(this,d.$schema);let l=this._addSchema(d,u);return l.validate||o.call(this,l)}async function s(d){if(d&&!this.getSchema(d))await n.call(this,{$ref:d},!0)}async function o(d){try{return this._compileSchemaEnv(d)}catch(u){if(!(u instanceof ro.default))throw u;return i.call(this,u),await a.call(this,u.missingSchema),o.call(this,d)}}function i({missingSchema:d,missingRef:u}){if(this.refs[d])throw Error(`AnySchema ${d} is loaded but ${u} cannot be resolved`)}async function a(d){let u=await c.call(this,d);if(!this.refs[d])await s.call(this,u.$schema);if(!this.refs[d])this.addSchema(u,d,t)}async function c(d){let u=this._loading[d];if(u)return u;try{return await(this._loading[d]=r(d))}finally{delete this._loading[d]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(let o of e)this.addSchema(o,void 0,r,n);return this}let s;if(typeof e==="object"){let{schemaId:o}=this.opts;if(s=e[o],s!==void 0&&typeof s!="string")throw Error(`schema ${o} must be string`)}return t=De.normalizeId(t||s),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if(typeof e=="boolean")return!0;let r;if(r=e.$schema,r!==void 0&&typeof r!="string")throw Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let n=this.validate(r,e);if(!n&&t){let s="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(s);else throw Error(s)}return n}getSchema(e){let t;while(typeof(t=to.call(this,e))=="string")e=t;if(t===void 0){let{schemaId:r}=this.opts,n=new Ae.SchemaEnv({schema:{},schemaId:r});if(t=Ae.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=to.call(this,e);if(typeof t=="object")this._cache.delete(t.schema);return delete this.schemas[e],delete this.refs[e],this}case"object":{let t=e;this._cache.delete(t);let r=e[this.opts.schemaId];if(r)r=De.normalizeId(r),delete this.schemas[r],delete this.refs[r];return this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if(typeof e=="string"){if(r=e,typeof t=="object")this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r}else if(typeof e=="object"&&t===void 0){if(t=e,r=t.keyword,Array.isArray(r)&&!r.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(Hl.call(this,r,t),!t)return _r.eachItem(r,(s)=>mr.call(this,s)),this;Gl.call(this,t);let n={...t,type:lt.getJSONTypes(t.type),schemaType:lt.getJSONTypes(t.schemaType)};return _r.eachItem(r,n.type.length===0?(s)=>mr.call(this,s,n):(s)=>n.type.forEach((o)=>mr.call(this,s,n,o))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t=="object"?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let r of t.rules){let n=r.rules.findIndex((s)=>s.keyword===e);if(n>=0)r.rules.splice(n,1)}return this}addFormat(e,t){if(typeof t=="string")t=new RegExp(t);return this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){if(!e||e.length===0)return"No errors";return e.map((n)=>`${r}${n.instancePath} ${n.message}`).reduce((n,s)=>n+t+s)}$dataMetaSchema(e,t){let r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let n of t){let s=n.split("/").slice(1),o=e;for(let i of s)o=o[i];for(let i in r){let a=r[i];if(typeof a!="object")continue;let{$data:c}=a.definition,d=o[i];if(c&&d)o[i]=so(d)}}return e}_removeAllSchemas(e,t){for(let r in e){let n=e[r];if(!t||t.test(r)){if(typeof n=="string")delete e[r];else if(n&&!n.meta)this._cache.delete(n.schema),delete e[r]}}}_addSchema(e,t,r,n=this.opts.validateSchema,s=this.opts.addUsedSchema){let o,{schemaId:i}=this.opts;if(typeof e=="object")o=e[i];else if(this.opts.jtd)throw Error("schema must be object");else if(typeof e!="boolean")throw Error("schema must be object or boolean");let a=this._cache.get(e);if(a!==void 0)return a;r=De.normalizeId(o||r);let c=De.getSchemaRefs.call(this,e,r);if(a=new Ae.SchemaEnv({schema:e,schemaId:i,meta:t,baseId:r,localRefs:c}),this._cache.set(a.schema,a),s&&!r.startsWith("#")){if(r)this._checkUnique(r);this.refs[r]=a}if(n)this.validateSchema(e,!0);return a}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta)this._compileMetaSchema(e);else Ae.compileSchema.call(this,e);if(!e.validate)throw Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{Ae.compileSchema.call(this,e)}finally{this.opts=t}}}ft.ValidationError=Ol.default;ft.MissingRefError=ro.default;X.default=ft;function eo(e,t,r,n="error"){for(let s in e){let o=s;if(o in t)this.logger[n](`${r}: option ${s}. ${e[o]}`)}}function to(e){return e=De.normalizeId(e),this.schemas[e]||this.refs[e]}function Al(){let e=this.opts.schemas;if(!e)return;if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function Ml(){for(let e in this.opts.formats){let t=this.opts.formats[e];if(t)this.addFormat(e,t)}}function Fl(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];if(!r.keyword)r.keyword=t;this.addKeyword(r)}}function Vl(){let e={...this.opts};for(let t of Il)delete e[t];return e}var zl={log(){},warn(){},error(){}};function Ul(e){if(e===!1)return zl;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw Error("logger must implement log, warn and error methods")}var Kl=/^[a-z_$][a-z0-9_$:-]*$/i;function Hl(e,t){let{RULES:r}=this;if(_r.eachItem(e,(n)=>{if(r.keywords[n])throw Error(`Keyword ${n} is already defined`);if(!Kl.test(n))throw Error(`Keyword ${n} has invalid name`)}),!t)return;if(t.$data&&!(("code"in t)||("validate"in t)))throw Error('$data keyword must have "code" or "validate" function')}function mr(e,t,r){var n;let s=t===null||t===void 0?void 0:t.post;if(r&&s)throw Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,i=s?o.post:o.rules.find(({type:c})=>c===r);if(!i)i={type:r,rules:[]},o.rules.push(i);if(o.keywords[e]=!0,!t)return;let a={keyword:e,definition:{...t,type:lt.getJSONTypes(t.type),schemaType:lt.getJSONTypes(t.schemaType)}};if(t.before)Ll.call(this,i,a,t.before);else i.rules.push(a);o.all[e]=a,(n=t.implements)===null||n===void 0||n.forEach((c)=>this.addKeyword(c))}function Ll(e,t,r){let n=e.rules.findIndex((s)=>s.keyword===r);if(n>=0)e.rules.splice(n,0,t);else e.rules.push(t),this.logger.warn(`rule ${r} is not defined`)}function Gl(e){let{metaSchema:t}=e;if(t===void 0)return;if(e.$data&&this.opts.$data)t=so(t);e.validateSchema=this.compile(t,!0)}var Jl={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function so(e){return{anyOf:[e,Jl]}}});var co=ae(function(io){Object.defineProperty(io,"__esModule",{value:!0});io.DiscrError=void 0;var oo;(function(e){e.Tag="tag",e.Mapping="mapping"})(oo||(io.DiscrError=oo={}))});var f_=ae(function(lo){Object.defineProperty(lo,"__esModule",{value:!0});var we=Rt(),gr=co(),uo=Hy(),Ql=xf(),Zl=nn(),Xl={message:({params:{discrError:e,tagName:t}})=>e===gr.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>we._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},Yl={keyword:"discriminator",type:"object",schemaType:"object",error:Xl,code(e){let{gen:t,data:r,schema:n,parentSchema:s,it:o}=e,{oneOf:i}=s;if(!o.opts.discriminator)throw Error("discriminator: requires discriminator option");let a=n.propertyName;if(typeof a!="string")throw Error("discriminator: requires propertyName");if(n.mapping)throw Error("discriminator: mapping is not supported");if(!i)throw Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),d=t.const("tag",we._`${r}${we.getProperty(a)}`);t.if(we._`typeof ${d} == "string"`,()=>u(),()=>e.error(!1,{discrError:gr.DiscrError.Tag,tag:d,tagName:a})),e.ok(c);function u(){let p=_();t.if(!1);for(let h in p)t.elseIf(we._`${d} === ${h}`),t.assign(c,l(p[h]));t.else(),e.error(!1,{discrError:gr.DiscrError.Mapping,tag:d,tagName:a}),t.endIf()}function l(p){let h=t.name("valid"),f=e.subschema({keyword:"oneOf",schemaProp:p},h);return e.mergeEvaluated(f,we.Name),h}function _(){var p;let h={},f=g(s),m=!0;for(let k=0;k<i.length;k++){let E=i[k];if((E===null||E===void 0?void 0:E.$ref)&&!Zl.schemaHasRulesButRef(E,o.self.RULES)){let W=E.$ref;if(E=uo.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,W),E instanceof uo.SchemaEnv)E=E.schema;if(E===void 0)throw new Ql.default(o.opts.uriResolver,o.baseId,W)}let J=(p=E===null||E===void 0?void 0:E.properties)===null||p===void 0?void 0:p[a];if(typeof J!="object")throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);m=m&&(f||g(E)),v(J,k)}if(!m)throw Error(`discriminator: "${a}" must be required`);return h;function g({required:k}){return Array.isArray(k)&&k.includes(a)}function v(k,E){if(k.const)S(k.const,E);else if(k.enum)for(let J of k.enum)S(J,E);else throw Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function S(k,E){if(typeof k!="string"||k in h)throw Error(`discriminator: "${a}" values must be unique strings`);h[k]=E}}}};lo.default=Yl});var ho=ae(function(fo){Object.defineProperty(fo,"__esModule",{value:!0});var tf={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};fo.default=tf});var a_=ae(function(go){Object.defineProperty(go,"__esModule",{value:!0});go.callRef=go.getValidate=void 0;var nf=xf(),po=V(),F=Rt(),Ee=kl(),mo=Hy(),ht=nn(),sf={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:s,schemaEnv:o,validateName:i,opts:a,self:c}=n,{root:d}=o;if((r==="#"||r==="#/")&&s===d.baseId)return l();let u=mo.resolveRef.call(c,d,s,r);if(u===void 0)throw new nf.default(n.opts.uriResolver,s,r);if(u instanceof mo.SchemaEnv)return _(u);return p(u);function l(){if(o===d)return pt(e,i,o,o.$async);let h=t.scopeValue("root",{ref:d});return pt(e,F._`${h}.validate`,d,d.$async)}function _(h){let f=_o(e,h);pt(e,f,h,h.$async)}function p(h){let f=t.scopeValue("schema",a.code.source===!0?{ref:h,code:F.stringify(h)}:{ref:h}),m=t.name("valid"),g=e.subschema({schema:h,dataTypes:[],schemaPath:F.nil,topSchemaRef:f,errSchemaPath:r},m);e.mergeEvaluated(g),e.ok(m)}}};function _o(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):F._`${r.scopeValue("wrapper",{ref:t})}.validate`}go.getValidate=_o;function pt(e,t,r,n){let{gen:s,it:o}=e,{allErrors:i,schemaEnv:a,opts:c}=o,d=c.passContext?Ee.default.this:F.nil;if(n)u();else l();function u(){if(!a.$async)throw Error("async schema referenced by sync schema");let h=s.let("valid");s.try(()=>{if(s.code(F._`await ${po.callValidateCode(e,t,d)}`),p(t),!i)s.assign(h,!0)},(f)=>{if(s.if(F._`!(${f} instanceof ${o.ValidationError})`,()=>s.throw(f)),_(f),!i)s.assign(h,!1)}),e.ok(h)}function l(){e.result(po.callValidateCode(e,t,d),()=>p(t),()=>_(t))}function _(h){let f=F._`${h}.errors`;s.assign(Ee.default.vErrors,F._`${Ee.default.vErrors} === null ? ${f} : ${Ee.default.vErrors}.concat(${f})`),s.assign(Ee.default.errors,F._`${Ee.default.vErrors}.length`)}function p(h){var f;if(!o.opts.unevaluated)return;let m=(f=r===null||r===void 0?void 0:r.validate)===null||f===void 0?void 0:f.evaluated;if(o.props!==!0)if(m&&!m.dynamicProps){if(m.props!==void 0)o.props=ht.mergeEvaluated.props(s,m.props,o.props)}else{let g=s.var("props",F._`${h}.evaluated.props`);o.props=ht.mergeEvaluated.props(s,g,o.props,F.Name)}if(o.items!==!0)if(m&&!m.dynamicItems){if(m.items!==void 0)o.items=ht.mergeEvaluated.items(s,m.items,o.items)}else{let g=s.var("items",F._`${h}.evaluated.items`);o.items=ht.mergeEvaluated.items(s,g,o.items,F.Name)}}}go.callRef=pt;go.default=sf});var l_=ae(function($o){Object.defineProperty($o,"__esModule",{value:!0});var cf=ho(),df=a_(),uf=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",cf.default,df.default];$o.default=uf});var wo=ae(function(vo){Object.defineProperty(vo,"__esModule",{value:!0});var _t=Rt(),se=_t.operators,mt={maximum:{okStr:"<=",ok:se.LTE,fail:se.GT},minimum:{okStr:">=",ok:se.GTE,fail:se.LT},exclusiveMaximum:{okStr:"<",ok:se.LT,fail:se.GTE},exclusiveMinimum:{okStr:">",ok:se.GT,fail:se.LTE}},ff={message:({keyword:e,schemaCode:t})=>_t.str`must be ${mt[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>_t._`{comparison: ${mt[e].okStr}, limit: ${t}}`},hf={keyword:Object.keys(mt),type:"number",schemaType:"number",$data:!0,error:ff,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data(_t._`${r} ${mt[t].fail} ${n} || isNaN(${r})`)}};vo.default=hf});var bo=ae(function(Eo){Object.defineProperty(Eo,"__esModule",{value:!0});var Me=Rt(),mf={message:({schemaCode:e})=>Me.str`must be multiple of ${e}`,params:({schemaCode:e})=>Me._`{multipleOf: ${e}}`},_f={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:mf,code(e){let{gen:t,data:r,schemaCode:n,it:s}=e,o=s.opts.multipleOfPrecision,i=t.let("res"),a=o?Me._`Math.abs(Math.round(${i}) - ${i}) > 1e-${o}`:Me._`${i} !== parseInt(${i})`;e.fail$data(Me._`(${n} === 0 || (${i} = ${r}/${n}, ${a}))`)}};Eo.default=_f});var xo=ae(function(Po){Object.defineProperty(Po,"__esModule",{value:!0});function So(e){let t=e.length,r=0,n=0,s;while(n<t)if(r++,s=e.charCodeAt(n++),s>=55296&&s<=56319&&n<t){if(s=e.charCodeAt(n),(s&64512)===56320)n++}return r}Po.default=So;So.code='require("ajv/dist/runtime/ucs2length").default'});var Oo=ae(function(ko){Object.defineProperty(ko,"__esModule",{value:!0});var fe=Rt(),$f=nn(),vf=xo(),Ef={message({keyword:e,schemaCode:t}){return fe.str`must NOT have ${e==="maxLength"?"more":"fewer"} than ${t} characters`},params:({schemaCode:e})=>fe._`{limit: ${e}}`},bf={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Ef,code(e){let{keyword:t,data:r,schemaCode:n,it:s}=e,o=t==="maxLength"?fe.operators.GT:fe.operators.LT,i=s.opts.unicode===!1?fe._`${r}.length`:fe._`${$f.useFunc(e.gen,vf.default)}(${r})`;e.fail$data(fe._`${i} ${o} ${n}`)}};ko.default=bf});var Ro=ae(function(No){Object.defineProperty(No,"__esModule",{value:!0});var Pf=V(),kf=nn(),be=Rt(),Of={message:({schemaCode:e})=>be.str`must match pattern "${e}"`,params:({schemaCode:e})=>be._`{pattern: ${e}}`},Nf={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:Of,code(e){let{gen:t,data:r,$data:n,schema:s,schemaCode:o,it:i}=e,a=i.opts.unicodeRegExp?"u":"";if(n){let{regExp:c}=i.opts.code,d=c.code==="new RegExp"?be._`new RegExp`:kf.useFunc(t,c),u=t.let("valid");t.try(()=>t.assign(u,be._`${d}(${o}, ${a}).test(${r})`),()=>t.assign(u,!1)),e.fail$data(be._`!${u}`)}else{let c=Pf.usePattern(e,s);e.fail$data(be._`!${c}.test(${r})`)}}};No.default=Nf});var Io=ae(function(qo){Object.defineProperty(qo,"__esModule",{value:!0});var Fe=Rt(),qf={message({keyword:e,schemaCode:t}){return Fe.str`must NOT have ${e==="maxProperties"?"more":"fewer"} than ${t} properties`},params:({schemaCode:e})=>Fe._`{limit: ${e}}`},If={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:qf,code(e){let{keyword:t,data:r,schemaCode:n}=e,s=t==="maxProperties"?Fe.operators.GT:Fe.operators.LT;e.fail$data(Fe._`Object.keys(${r}).length ${s} ${n}`)}};qo.default=If});var jo=ae(function(To){Object.defineProperty(To,"__esModule",{value:!0});var ze=V(),Ve=Rt(),jf=nn(),Cf={message:({params:{missingProperty:e}})=>Ve.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>Ve._`{missingProperty: ${e}}`},Df={keyword:"required",type:"object",schemaType:"array",$data:!0,error:Cf,code(e){let{gen:t,schema:r,schemaCode:n,data:s,$data:o,it:i}=e,{opts:a}=i;if(!o&&r.length===0)return;let c=r.length>=a.loopRequired;if(i.allErrors)d();else u();if(a.strictRequired){let p=e.parentSchema.properties,{definedProperties:h}=e.it;for(let f of r)if((p===null||p===void 0?void 0:p[f])===void 0&&!h.has(f)){let m=i.schemaEnv.baseId+i.errSchemaPath,g=`required property "${f}" is not defined at "${m}" (strictRequired)`;jf.checkStrictMode(i,g,i.opts.strictRequired)}}function d(){if(c||o)e.block$data(Ve.nil,l);else for(let p of r)ze.checkReportMissingProp(e,p)}function u(){let p=t.let("missing");if(c||o){let h=t.let("valid",!0);e.block$data(h,()=>_(p,h)),e.ok(h)}else t.if(ze.checkMissingProp(e,r,p)),ze.reportMissingProp(e,p),t.else()}function l(){t.forOf("prop",n,(p)=>{e.setParams({missingProperty:p}),t.if(ze.noPropertyInData(t,s,p,a.ownProperties),()=>e.error())})}function _(p,h){e.setParams({missingProperty:p}),t.forOf(p,n,()=>{t.assign(h,ze.propertyInData(t,s,p,a.ownProperties)),t.if(Ve.not(h),()=>{e.error(),t.break()})},Ve.nil)}}};To.default=Df});var Do=ae(function(Co){Object.defineProperty(Co,"__esModule",{value:!0});var Ue=Rt(),Mf={message({keyword:e,schemaCode:t}){return Ue.str`must NOT have ${e==="maxItems"?"more":"fewer"} than ${t} items`},params:({schemaCode:e})=>Ue._`{limit: ${e}}`},Ff={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Mf,code(e){let{keyword:t,data:r,schemaCode:n}=e,s=t==="maxItems"?Ue.operators.GT:Ue.operators.LT;e.fail$data(Ue._`${r}.length ${s} ${n}`)}};Co.default=Ff});var gt=ae(function(Mo){Object.defineProperty(Mo,"__esModule",{value:!0});var Ao=Qt();Ao.code='require("ajv/dist/runtime/equal").default';Mo.default=Ao});var Vo=ae(function(Fo){Object.defineProperty(Fo,"__esModule",{value:!0});var yr=Ne(),q=Rt(),Uf=nn(),Kf=gt(),Hf={message:({params:{i:e,j:t}})=>q.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>q._`{i: ${e}, j: ${t}}`},Lf={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Hf,code(e){let{gen:t,data:r,$data:n,schema:s,parentSchema:o,schemaCode:i,it:a}=e;if(!n&&!s)return;let c=t.let("valid"),d=o.items?yr.getSchemaTypes(o.items):[];e.block$data(c,u,q._`${i} === false`),e.ok(c);function u(){let h=t.let("i",q._`${r}.length`),f=t.let("j");e.setParams({i:h,j:f}),t.assign(c,!0),t.if(q._`${h} > 1`,()=>(l()?_:p)(h,f))}function l(){return d.length>0&&!d.some((h)=>h==="object"||h==="array")}function _(h,f){let m=t.name("item"),g=yr.checkDataTypes(d,m,a.opts.strictNumbers,yr.DataType.Wrong),v=t.const("indices",q._`{}`);t.for(q._`;${h}--;`,()=>{if(t.let(m,q._`${r}[${h}]`),t.if(g,q._`continue`),d.length>1)t.if(q._`typeof ${m} == "string"`,q._`${m} += "_"`);t.if(q._`typeof ${v}[${m}] == "number"`,()=>{t.assign(f,q._`${v}[${m}]`),e.error(),t.assign(c,!1).break()}).code(q._`${v}[${m}] = ${h}`)})}function p(h,f){let m=Uf.useFunc(t,Kf.default),g=t.name("outer");t.label(g).for(q._`;${h}--;`,()=>t.for(q._`${f} = ${h}; ${f}--;`,()=>t.if(q._`${m}(${r}[${h}], ${r}[${f}])`,()=>{e.error(),t.assign(c,!1).break(g)})))}}};Fo.default=Lf});var Uo=ae(function(zo){Object.defineProperty(zo,"__esModule",{value:!0});var $r=Rt(),Jf=nn(),Bf=gt(),Wf={message:"must be equal to constant",params:({schemaCode:e})=>$r._`{allowedValue: ${e}}`},Qf={keyword:"const",$data:!0,error:Wf,code(e){let{gen:t,data:r,$data:n,schemaCode:s,schema:o}=e;if(n||o&&typeof o=="object")e.fail$data($r._`!${Jf.useFunc(t,Bf.default)}(${r}, ${s})`);else e.fail($r._`${o} !== ${r}`)}};zo.default=Qf});var Ho=ae(function(Ko){Object.defineProperty(Ko,"__esModule",{value:!0});var Ke=Rt(),Xf=nn(),Yf=gt(),eh={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>Ke._`{allowedValues: ${e}}`},th={keyword:"enum",schemaType:"array",$data:!0,error:eh,code(e){let{gen:t,data:r,$data:n,schema:s,schemaCode:o,it:i}=e;if(!n&&s.length===0)throw Error("enum must have non-empty array");let a=s.length>=i.opts.loopEnum,c,d=()=>c!==null&&c!==void 0?c:c=Xf.useFunc(t,Yf.default),u;if(a||n)u=t.let("valid"),e.block$data(u,l);else{if(!Array.isArray(s))throw Error("ajv implementation error");let p=t.const("vSchema",o);u=Ke.or(...s.map((h,f)=>_(p,f)))}e.pass(u);function l(){t.assign(u,!1),t.forOf("v",o,(p)=>t.if(Ke._`${d()}(${r}, ${p})`,()=>t.assign(u,!0).break()))}function _(p,h){let f=s[h];return typeof f==="object"&&f!==null?Ke._`${d()}(${r}, ${p}[${h}])`:Ke._`${r} === ${f}`}}};Ko.default=th});var c_=ae(function(Lo){Object.defineProperty(Lo,"__esModule",{value:!0});var nh=wo(),sh=bo(),oh=Oo(),ih=Ro(),ah=Io(),ch=jo(),dh=Do(),uh=Vo(),lh=Uo(),fh=Ho(),hh=[nh.default,sh.default,oh.default,ih.default,ah.default,ch.default,dh.default,uh.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},lh.default,fh.default];Lo.default=hh});var wr=ae(function(Jo){Object.defineProperty(Jo,"__esModule",{value:!0});Jo.validateAdditionalItems=void 0;var he=Rt(),vr=nn(),mh={message:({params:{len:e}})=>he.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>he._`{limit: ${e}}`},_h={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:mh,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){vr.checkStrictMode(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Go(e,n)}};function Go(e,t){let{gen:r,schema:n,data:s,keyword:o,it:i}=e;i.items=!0;let a=r.const("len",he._`${s}.length`);if(n===!1)e.setParams({len:t.length}),e.pass(he._`${a} <= ${t.length}`);else if(typeof n=="object"&&!vr.alwaysValidSchema(i,n)){let d=r.var("valid",he._`${a} <= ${t.length}`);r.if(he.not(d),()=>c(d)),e.ok(d)}function c(d){r.forRange("i",t.length,a,(u)=>{if(e.subschema({keyword:o,dataProp:u,dataPropType:vr.Type.Num},d),!i.allErrors)r.if(he.not(d),()=>r.break())})}}Jo.validateAdditionalItems=Go;Jo.default=_h});var Er=ae(function(Zo){Object.defineProperty(Zo,"__esModule",{value:!0});Zo.validateTuple=void 0;var Wo=Rt(),yt=nn(),yh=V(),$h={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return Qo(e,"additionalItems",t);if(r.items=!0,yt.alwaysValidSchema(r,t))return;e.ok(yh.validateArray(e))}};function Qo(e,t,r=e.schema){let{gen:n,parentSchema:s,data:o,keyword:i,it:a}=e;if(u(s),a.opts.unevaluated&&r.length&&a.items!==!0)a.items=yt.mergeEvaluated.items(n,r.length,a.items);let c=n.name("valid"),d=n.const("len",Wo._`${o}.length`);r.forEach((l,_)=>{if(yt.alwaysValidSchema(a,l))return;n.if(Wo._`${d} > ${_}`,()=>e.subschema({keyword:i,schemaProp:_,dataProp:_},c)),e.ok(c)});function u(l){let{opts:_,errSchemaPath:p}=a,h=r.length,f=h===l.minItems&&(h===l.maxItems||l[t]===!1);if(_.strictTuples&&!f){let m=`"${i}" is ${h}-tuple, but minItems or maxItems/${t} are not specified or different at path "${p}"`;yt.checkStrictMode(a,m,_.strictTuples)}}}Zo.validateTuple=Qo;Zo.default=$h});var ei=ae(function(Yo){Object.defineProperty(Yo,"__esModule",{value:!0});var wh=Er(),Eh={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:(e)=>wh.validateTuple(e,"items")};Yo.default=Eh});var ni=ae(function(ri){Object.defineProperty(ri,"__esModule",{value:!0});var ti=Rt(),Sh=nn(),Ph=V(),xh=wr(),kh={message:({params:{len:e}})=>ti.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>ti._`{limit: ${e}}`},Oh={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:kh,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:s}=r;if(n.items=!0,Sh.alwaysValidSchema(n,t))return;if(s)xh.validateAdditionalItems(e,s);else e.ok(Ph.validateArray(e))}};ri.default=Oh});var oi=ae(function(si){Object.defineProperty(si,"__esModule",{value:!0});var z=Rt(),$t=nn(),Rh={message:({params:{min:e,max:t}})=>t===void 0?z.str`must contain at least ${e} valid item(s)`:z.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?z._`{minContains: ${e}}`:z._`{minContains: ${e}, maxContains: ${t}}`},qh={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Rh,code(e){let{gen:t,schema:r,parentSchema:n,data:s,it:o}=e,i,a,{minContains:c,maxContains:d}=n;if(o.opts.next)i=c===void 0?1:c,a=d;else i=1;let u=t.const("len",z._`${s}.length`);if(e.setParams({min:i,max:a}),a===void 0&&i===0){$t.checkStrictMode(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&i>a){$t.checkStrictMode(o,'"minContains" > "maxContains" is always invalid'),e.fail();return}if($t.alwaysValidSchema(o,r)){let f=z._`${u} >= ${i}`;if(a!==void 0)f=z._`${f} && ${u} <= ${a}`;e.pass(f);return}o.items=!0;let l=t.name("valid");if(a===void 0&&i===1)p(l,()=>t.if(l,()=>t.break()));else if(i===0){if(t.let(l,!0),a!==void 0)t.if(z._`${s}.length > 0`,_)}else t.let(l,!1),_();e.result(l,()=>e.reset());function _(){let f=t.name("_valid"),m=t.let("count",0);p(f,()=>t.if(f,()=>h(m)))}function p(f,m){t.forRange("i",0,u,(g)=>{e.subschema({keyword:"contains",dataProp:g,dataPropType:$t.Type.Num,compositeRule:!0},f),m()})}function h(f){if(t.code(z._`${f}++`),a===void 0)t.if(z._`${f} >= ${i}`,()=>t.assign(l,!0).break());else if(t.if(z._`${f} > ${a}`,()=>t.assign(l,!1).break()),i===1)t.assign(l,!0);else t.if(z._`${f} >= ${i}`,()=>t.assign(l,!0))}}};si.default=qh});var d_=ae(function(ci){Object.defineProperty(ci,"__esModule",{value:!0});ci.validateSchemaDeps=ci.validatePropertyDeps=ci.error=void 0;var br=Rt(),Th=nn(),He=V();ci.error={message:({params:{property:e,depsCount:t,deps:r}})=>br.str`must have ${t===1?"property":"properties"} ${r} when property ${e} is present`,params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>br._`{property: ${e},
|
|
5
|
+
|| ${i} === "boolean" || ${s} === null`).assign(a,b._`[${s}]`)}}}function Ic({gen:e,parentData:t,parentDataProperty:r},n){e.if(b._`${t} !== undefined`,()=>e.assign(b._`${t}[${r}]`,n))}function Ht(e,t,r,n=ge.Correct){let s=n===ge.Correct?b.operators.EQ:b.operators.NEQ,o;switch(e){case"null":return b._`${t} ${s} null`;case"array":o=b._`Array.isArray(${t})`;break;case"object":o=b._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=i(b._`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=i();break;default:return b._`typeof ${t} ${s} ${e}`}return n===ge.Correct?o:b.not(o);function i(a=b.nil){return b.and(b._`typeof ${t} == "number"`,a,r?b._`isFinite(${t})`:b.nil)}}xn.checkDataType=Ht;function Lt(e,t,r,n){if(e.length===1)return Ht(e[0],t,r,n);let s,o=bn.toHash(e);if(o.array&&o.object){let i=b._`typeof ${t} != "object"`;s=o.null?i:b._`!${t} || ${i}`,delete o.null,delete o.array,delete o.object}else s=b.nil;if(o.number)delete o.integer;for(let i in o)s=b.and(s,Ht(i,t,r,n));return s}xn.checkDataTypes=Lt;var Tc={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?b._`{type: ${e}}`:b._`{type: ${t}}`};function Gt(e){let t=jc(e);kc.reportError(t,Tc)}xn.reportTypeError=Gt;function jc(e){let{gen:t,data:r,schema:n}=e,s=bn.schemaRefOrVal(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:s,schemaValue:s,parentSchema:n,params:{},it:e}}});var qn=ae(function(Nn){Object.defineProperty(Nn,"__esModule",{value:!0});Nn.assignDefaults=void 0;var ye=Rt(),zc=nn();function Uc(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let s in r)On(e,s,r[s].default);else if(t==="array"&&Array.isArray(n))n.forEach((s,o)=>On(e,o,s.default))}Nn.assignDefaults=Uc;function On(e,t,r){let{gen:n,compositeRule:s,data:o,opts:i}=e;if(r===void 0)return;let a=ye._`${o}${ye.getProperty(t)}`;if(s){zc.checkStrictMode(e,`default is ignored for: ${a}`);return}let c=ye._`${a} === undefined`;if(i.useDefaults==="empty")c=ye._`${c} || ${a} === null || ${a} === ""`;n.if(c,ye._`${a} = ${ye.stringify(r)}`)}});var V=ae(function(jn){Object.defineProperty(jn,"__esModule",{value:!0});jn.validateUnion=jn.validateArray=jn.usePattern=jn.callValidateCode=jn.schemaProperties=jn.allSchemaProperties=jn.noPropertyInData=jn.propertyInData=jn.isOwnProperty=jn.hasPropFunc=jn.reportMissingProp=jn.checkMissingProp=jn.checkReportMissingProp=void 0;var N=Rt(),Jt=nn(),re=Sl(),Kc=nn();function Hc(e,t){let{gen:r,data:n,it:s}=e;r.if(Wt(r,n,t,s.opts.ownProperties),()=>{e.setParams({missingProperty:N._`${t}`},!0),e.error()})}jn.checkReportMissingProp=Hc;function Lc({gen:e,data:t,it:{opts:r}},n,s){return N.or(...n.map((o)=>N.and(Wt(e,t,o,r.ownProperties),N._`${s} = ${o}`)))}jn.checkMissingProp=Lc;function Gc(e,t){e.setParams({missingProperty:t},!0),e.error()}jn.reportMissingProp=Gc;function In(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:N._`Object.prototype.hasOwnProperty`})}jn.hasPropFunc=In;function Bt(e,t,r){return N._`${In(e)}.call(${t}, ${r})`}jn.isOwnProperty=Bt;function Jc(e,t,r,n){let s=N._`${t}${N.getProperty(r)} !== undefined`;return n?N._`${s} && ${Bt(e,t,r)}`:s}jn.propertyInData=Jc;function Wt(e,t,r,n){let s=N._`${t}${N.getProperty(r)} === undefined`;return n?N.or(s,N.not(Bt(e,t,r))):s}jn.noPropertyInData=Wt;function Tn(e){return e?Object.keys(e).filter((t)=>t!=="__proto__"):[]}jn.allSchemaProperties=Tn;function Bc(e,t){return Tn(t).filter((r)=>!Jt.alwaysValidSchema(e,t[r]))}jn.schemaProperties=Bc;function Wc({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:s,errorPath:o},it:i},a,c,d){let u=d?N._`${e}, ${t}, ${n}${s}`:t,l=[[re.default.instancePath,N.strConcat(re.default.instancePath,o)],[re.default.parentData,i.parentData],[re.default.parentDataProperty,i.parentDataProperty],[re.default.rootData,re.default.rootData]];if(i.opts.dynamicRef)l.push([re.default.dynamicAnchors,re.default.dynamicAnchors]);let _=N._`${u}, ${r.object(...l)}`;return c!==N.nil?N._`${a}.call(${c}, ${_})`:N._`${a}(${_})`}jn.callValidateCode=Wc;var Qc=N._`new RegExp`;function Zc({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:s}=t.code,o=s(r,n);return e.scopeValue("pattern",{key:o.toString(),ref:o,code:N._`${s.code==="new RegExp"?Qc:Kc.useFunc(e,s)}(${r}, ${n})`})}jn.usePattern=Zc;function Xc(e){let{gen:t,data:r,keyword:n,it:s}=e,o=t.name("valid");if(s.allErrors){let a=t.let("valid",!0);return i(()=>t.assign(a,!1)),a}return t.var(o,!0),i(()=>t.break()),o;function i(a){let c=t.const("len",N._`${r}.length`);t.forRange("i",0,c,(d)=>{e.subschema({keyword:n,dataProp:d,dataPropType:Jt.Type.Num},o),t.if(N.not(o),a)})}}jn.validateArray=Xc;function Yc(e){let{gen:t,schema:r,keyword:n,it:s}=e;if(!Array.isArray(r))throw Error("ajv implementation error");if(r.some((c)=>Jt.alwaysValidSchema(s,c))&&!s.opts.unevaluated)return;let i=t.let("valid",!1),a=t.name("_valid");t.block(()=>r.forEach((c,d)=>{let u=e.subschema({keyword:n,schemaProp:d,compositeRule:!0},a);if(t.assign(i,N._`${i} || ${a}`),!e.mergeValidEvaluated(u,a))t.if(N.not(i))})),e.result(i,()=>e.reset(),()=>e.error(!0))}jn.validateUnion=Yc});var Vn=ae(function(Mn){Object.defineProperty(Mn,"__esModule",{value:!0});Mn.validateKeywordUsage=Mn.validSchemaType=Mn.funcKeywordCode=Mn.macroKeywordCode=void 0;var C=Rt(),ce=Sl(),fd=V(),hd=Oe();function pd(e,t){let{gen:r,keyword:n,schema:s,parentSchema:o,it:i}=e,a=t.macro.call(i.self,s,o,i),c=An(r,n,a);if(i.opts.validateSchema!==!1)i.self.validateSchema(a,!0);let d=r.name("valid");e.subschema({schema:a,schemaPath:C.nil,errSchemaPath:`${i.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},d),e.pass(d,()=>e.error(!0))}Mn.macroKeywordCode=pd;function md(e,t){var r;let{gen:n,keyword:s,schema:o,parentSchema:i,$data:a,it:c}=e;gd(c,t);let d=!a&&t.compile?t.compile.call(c.self,o,i,c):t.validate,u=An(n,s,d),l=n.let("valid");e.block$data(l,_),e.ok((r=t.valid)!==null&&r!==void 0?r:l);function _(){if(t.errors===!1){if(f(),t.modifying)Dn(e);m(()=>e.error())}else{let g=t.async?p():h();if(t.modifying)Dn(e);m(()=>_d(e,g))}}function p(){let g=n.let("ruleErrs",null);return n.try(()=>f(C._`await `),(v)=>n.assign(l,!1).if(C._`${v} instanceof ${c.ValidationError}`,()=>n.assign(g,C._`${v}.errors`),()=>n.throw(v))),g}function h(){let g=C._`${u}.errors`;return n.assign(g,null),f(C.nil),g}function f(g=t.async?C._`await `:C.nil){let v=c.opts.passContext?ce.default.this:ce.default.self,S=!(("compile"in t)&&!a||t.schema===!1);n.assign(l,C._`${g}${fd.callValidateCode(e,u,v,S)}`,t.modifying)}function m(g){var v;n.if(C.not((v=t.valid)!==null&&v!==void 0?v:l),g)}}Mn.funcKeywordCode=md;function Dn(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,C._`${n.parentData}[${n.parentDataProperty}]`))}function _d(e,t){let{gen:r}=e;r.if(C._`Array.isArray(${t})`,()=>{r.assign(ce.default.vErrors,C._`${ce.default.vErrors} === null ? ${t} : ${ce.default.vErrors}.concat(${t})`).assign(ce.default.errors,C._`${ce.default.vErrors}.length`),hd.extendErrors(e)},()=>e.error())}function gd({schemaEnv:e},t){if(t.async&&!e.$async)throw Error("async keyword in sync schema")}function An(e,t,r){if(r===void 0)throw Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:C.stringify(r)})}function yd(e,t,r=!1){return!t.length||t.some((n)=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}Mn.validSchemaType=yd;function $d({schema:e,opts:t,self:r,errSchemaPath:n},s,o){if(Array.isArray(s.keyword)?!s.keyword.includes(o):s.keyword!==o)throw Error("ajv implementation error");let i=s.dependencies;if(i===null||i===void 0?void 0:i.some((a)=>!Object.prototype.hasOwnProperty.call(e,a)))throw Error(`parent schema must have dependencies of ${o}: ${i.join(",")}`);if(s.validateSchema){if(!s.validateSchema(e[o])){let c=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(s.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw Error(c)}}}Mn.validateKeywordUsage=$d});var Hn=ae(function(Un){Object.defineProperty(Un,"__esModule",{value:!0});Un.extendSubschemaMode=Un.extendSubschemaData=Un.getSubschema=void 0;var B=Rt(),zn=nn();function bd(e,{keyword:t,schemaProp:r,schema:n,schemaPath:s,errSchemaPath:o,topSchemaRef:i}){if(t!==void 0&&n!==void 0)throw Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let a=e.schema[t];return r===void 0?{schema:a,schemaPath:B._`${e.schemaPath}${B.getProperty(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:B._`${e.schemaPath}${B.getProperty(t)}${B.getProperty(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${zn.escapeFragment(r)}`}}if(n!==void 0){if(s===void 0||o===void 0||i===void 0)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:s,topSchemaRef:i,errSchemaPath:o}}throw Error('either "keyword" or "schema" must be passed')}Un.getSubschema=bd;function Sd(e,t,{dataProp:r,dataPropType:n,data:s,dataTypes:o,propertyName:i}){if(s!==void 0&&r!==void 0)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=t;if(r!==void 0){let{errorPath:d,dataPathArr:u,opts:l}=t,_=a.let("data",B._`${t.data}${B.getProperty(r)}`,!0);c(_),e.errorPath=B.str`${d}${zn.getErrorPath(r,n,l.jsPropertySyntax)}`,e.parentDataProperty=B._`${r}`,e.dataPathArr=[...u,e.parentDataProperty]}if(s!==void 0){let d=s instanceof B.Name?s:a.let("data",s,!0);if(c(d),i!==void 0)e.propertyName=i}if(o)e.dataTypes=o;function c(d){e.data=d,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,d]}}Un.extendSubschemaData=Sd;function Pd(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:s,allErrors:o}){if(n!==void 0)e.compositeRule=n;if(s!==void 0)e.createErrors=s;if(o!==void 0)e.allErrors=o;e.jtdDiscriminator=t,e.jtdMetadata=r}Un.extendSubschemaMode=Pd});var Qt=ae(function(hm,Ln){Ln.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,s,o;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),n=o.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[s]))return!1;for(s=n;s--!==0;){var i=o[s];if(!e(t[i],r[i]))return!1}return!0}return t!==t&&r!==r}});var Jn=ae(function(pm,Gn){var ne=Gn.exports=function(e,t,r){if(typeof t=="function")r=t,t={};r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},s=r.post||function(){};nt(t,n,s,e,"",e)};ne.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};ne.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};ne.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};ne.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function nt(e,t,r,n,s,o,i,a,c,d){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,s,o,i,a,c,d);for(var u in n){var l=n[u];if(Array.isArray(l)){if(u in ne.arrayKeywords)for(var _=0;_<l.length;_++)nt(e,t,r,l[_],s+"/"+u+"/"+_,o,s,u,n,_)}else if(u in ne.propsKeywords){if(l&&typeof l=="object")for(var p in l)nt(e,t,r,l[p],s+"/"+u+"/"+Od(p),o,s,u,n,p)}else if(u in ne.keywords||e.allKeys&&!(u in ne.skipKeywords))nt(e,t,r,l,s+"/"+u,o,s,u,n)}r(n,s,o,i,a,c,d)}}function Od(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var Re=ae(function(Zn){Object.defineProperty(Zn,"__esModule",{value:!0});Zn.getSchemaRefs=Zn.resolveUrl=Zn.normalizeId=Zn._getFullPath=Zn.getFullPath=Zn.inlineRef=void 0;var Nd=nn(),Rd=Qt(),qd=Jn(),Id=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Td(e,t=!0){if(typeof e=="boolean")return!0;if(t===!0)return!Zt(e);if(!t)return!1;return Bn(e)<=t}Zn.inlineRef=Td;var jd=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Zt(e){for(let t in e){if(jd.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(Zt))return!0;if(typeof r=="object"&&Zt(r))return!0}return!1}function Bn(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,Id.has(r))continue;if(typeof e[r]=="object")Nd.eachItem(e[r],(n)=>t+=Bn(n));if(t===1/0)return 1/0}return t}function Wn(e,t="",r){if(r!==!1)t=$e(t);let n=e.parse(t);return Qn(e,n)}Zn.getFullPath=Wn;function Qn(e,t){return e.serialize(t).split("#")[0]+"#"}Zn._getFullPath=Qn;var Cd=/#\/?$/;function $e(e){return e?e.replace(Cd,""):""}Zn.normalizeId=$e;function Dd(e,t,r){return r=$e(r),e.resolve(t,r)}Zn.resolveUrl=Dd;var Ad=/^[a-z_][-a-z0-9._]*$/i;function Md(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,s=$e(e[r]||t),o={"":s},i=Wn(n,s,!1),a={},c=new Set;return qd(e,{allKeys:!0},(l,_,p,h)=>{if(h===void 0)return;let f=i+_,m=o[h];if(typeof l[r]=="string")m=g.call(this,l[r]);v.call(this,l.$anchor),v.call(this,l.$dynamicAnchor),o[_]=m;function g(S){let k=this.opts.uriResolver.resolve;if(S=$e(m?k(m,S):S),c.has(S))throw u(S);c.add(S);let E=this.refs[S];if(typeof E=="string")E=this.refs[E];if(typeof E=="object")d(l,E.schema,S);else if(S!==$e(f))if(S[0]==="#")d(l,a[S],S),a[S]=l;else this.refs[S]=f;return S}function v(S){if(typeof S=="string"){if(!Ad.test(S))throw Error(`invalid anchor "${S}"`);g.call(this,`#${S}`)}}}),a;function d(l,_,p){if(_!==void 0&&!Rd(l,_))throw u(p)}function u(l){return Error(`reference "${l}" resolves to more than one schema`)}}Zn.getSchemaRefs=Md});var xf=ae(function(hs){Object.defineProperty(hs,"__esModule",{value:!0});hs.getData=hs.KeywordCxt=hs.validateFunctionCode=void 0;var rs=_n(),ns=Ne(),Xt=Kt(),st=Ne(),Hd=qn(),qe=Vn(),Yt=Hn(),y=Rt(),w=Sl(),Ld=Re(),Z=nn(),Ie=Oe();function Gd(e){if(is(e)){if(as(e),os(e)){Wd(e);return}}ss(e,()=>rs.topBoolOrEmptySchema(e))}hs.validateFunctionCode=Gd;function ss({gen:e,validateName:t,schema:r,schemaEnv:n,opts:s},o){if(s.code.es5)e.func(t,y._`${w.default.data}, ${w.default.valCxt}`,n.$async,()=>{e.code(y._`"use strict"; ${Yn(r,s)}`),Bd(e,s),e.code(o)});else e.func(t,y._`${w.default.data}, ${Jd(s)}`,n.$async,()=>e.code(Yn(r,s)).code(o))}function Jd(e){return y._`{${w.default.instancePath}="", ${w.default.parentData}, ${w.default.parentDataProperty}, ${w.default.rootData}=${w.default.data}${e.dynamicRef?y._`, ${w.default.dynamicAnchors}={}`:y.nil}}={}`}function Bd(e,t){e.if(w.default.valCxt,()=>{if(e.var(w.default.instancePath,y._`${w.default.valCxt}.${w.default.instancePath}`),e.var(w.default.parentData,y._`${w.default.valCxt}.${w.default.parentData}`),e.var(w.default.parentDataProperty,y._`${w.default.valCxt}.${w.default.parentDataProperty}`),e.var(w.default.rootData,y._`${w.default.valCxt}.${w.default.rootData}`),t.dynamicRef)e.var(w.default.dynamicAnchors,y._`${w.default.valCxt}.${w.default.dynamicAnchors}`)},()=>{if(e.var(w.default.instancePath,y._`""`),e.var(w.default.parentData,y._`undefined`),e.var(w.default.parentDataProperty,y._`undefined`),e.var(w.default.rootData,w.default.data),t.dynamicRef)e.var(w.default.dynamicAnchors,y._`{}`)})}function Wd(e){let{schema:t,opts:r,gen:n}=e;ss(e,()=>{if(r.$comment&&t.$comment)ds(e);if(eu(e),n.let(w.default.vErrors,null),n.let(w.default.errors,0),r.unevaluated)Qd(e);cs(e),nu(e)});return}function Qd(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",y._`${r}.evaluated`),t.if(y._`${e.evaluated}.dynamicProps`,()=>t.assign(y._`${e.evaluated}.props`,y._`undefined`)),t.if(y._`${e.evaluated}.dynamicItems`,()=>t.assign(y._`${e.evaluated}.items`,y._`undefined`))}function Yn(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?y._`/*# sourceURL=${r} */`:y.nil}function Zd(e,t){if(is(e)){if(as(e),os(e)){Xd(e,t);return}}rs.boolOrEmptySchema(e,t)}function os({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function is(e){return typeof e.schema!="boolean"}function Xd(e,t){let{schema:r,gen:n,opts:s}=e;if(s.$comment&&r.$comment)ds(e);tu(e),ru(e);let o=n.const("_errs",w.default.errors);cs(e,o),n.var(t,y._`${o} === ${w.default.errors}`)}function as(e){Z.checkUnknownRules(e),Yd(e)}function cs(e,t){if(e.opts.jtd)return es(e,[],!1,t);let r=ns.getSchemaTypes(e.schema),n=ns.coerceAndCheckDataType(e,r);es(e,r,!n,t)}function Yd(e){let{schema:t,errSchemaPath:r,opts:n,self:s}=e;if(t.$ref&&n.ignoreKeywordsWithRef&&Z.schemaHasRulesButRef(t,s.RULES))s.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function eu(e){let{schema:t,opts:r}=e;if(t.default!==void 0&&r.useDefaults&&r.strictSchema)Z.checkStrictMode(e,"default is ignored in the schema root")}function tu(e){let t=e.schema[e.opts.schemaId];if(t)e.baseId=Ld.resolveUrl(e.opts.uriResolver,e.baseId,t)}function ru(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error("async schema in sync schema")}function ds({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:s}){let o=r.$comment;if(s.$comment===!0)e.code(y._`${w.default.self}.logger.log(${o})`);else if(typeof s.$comment=="function"){let i=y.str`${n}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code(y._`${w.default.self}.opts.$comment(${o}, ${i}, ${a}.schema)`)}}function nu(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:s,opts:o}=e;if(r.$async)t.if(y._`${w.default.errors} === 0`,()=>t.return(w.default.data),()=>t.throw(y._`new ${s}(${w.default.vErrors})`));else{if(t.assign(y._`${n}.errors`,w.default.vErrors),o.unevaluated)su(e);t.return(y._`${w.default.errors} === 0`)}}function su({gen:e,evaluated:t,props:r,items:n}){if(r instanceof y.Name)e.assign(y._`${t}.props`,r);if(n instanceof y.Name)e.assign(y._`${t}.items`,n)}function es(e,t,r,n){let{gen:s,schema:o,data:i,allErrors:a,opts:c,self:d}=e,{RULES:u}=d;if(o.$ref&&(c.ignoreKeywordsWithRef||!Z.schemaHasRulesButRef(o,u))){s.block(()=>ls(e,"$ref",u.all.$ref.definition));return}if(!c.jtd)ou(e,t);s.block(()=>{for(let _ of u.rules)l(_);l(u.post)});function l(_){if(!Xt.shouldUseGroup(o,_))return;if(_.type){if(s.if(st.checkDataType(_.type,i,c.strictNumbers)),ts(e,_),t.length===1&&t[0]===_.type&&r)s.else(),st.reportTypeError(e);s.endIf()}else ts(e,_);if(!a)s.if(y._`${w.default.errors} === ${n||0}`)}}function ts(e,t){let{gen:r,schema:n,opts:{useDefaults:s}}=e;if(s)Hd.assignDefaults(e,t.type);r.block(()=>{for(let o of t.rules)if(Xt.shouldUseRule(n,o))ls(e,o.keyword,o.definition,t.type)})}function ou(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;if(iu(e,t),!e.opts.allowUnionTypes)au(e,t);cu(e,e.dataTypes)}function iu(e,t){if(!t.length)return;if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach((r)=>{if(!us(e.dataTypes,r))er(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),uu(e,t)}function au(e,t){if(t.length>1&&!(t.length===2&&t.includes("null")))er(e,"use allowUnionTypes to allow union type keyword")}function cu(e,t){let r=e.self.RULES.all;for(let n in r){let s=r[n];if(typeof s=="object"&&Xt.shouldUseRule(e.schema,s)){let{type:o}=s.definition;if(o.length&&!o.some((i)=>du(t,i)))er(e,`missing type "${o.join(",")}" for keyword "${n}"`)}}}function du(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function us(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function uu(e,t){let r=[];for(let n of e.dataTypes)if(us(t,n))r.push(n);else if(t.includes("integer")&&n==="number")r.push("integer");e.dataTypes=r}function er(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,Z.checkStrictMode(e,t,e.opts.strictTypes)}class tr{constructor(e,t,r){if(qe.validateKeywordUsage(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=Z.schemaRefOrVal(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",fs(this.$data,e));else if(this.schemaCode=this.schemaValue,!qe.validSchemaType(this.schema,t.schemaType,t.allowUndefined))throw Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);if("code"in t?t.trackErrors:t.errors!==!1)this.errsCount=e.gen.const("_errs",w.default.errors)}result(e,t,r){this.failResult(y.not(e),t,r)}failResult(e,t,r){if(this.gen.if(e),r)r();else this.error();if(t){if(this.gen.else(),t(),this.allErrors)this.gen.endIf()}else if(this.allErrors)this.gen.endIf();else this.gen.else()}pass(e,t){this.failResult(y.not(e),void 0,t)}fail(e){if(e===void 0){if(this.error(),!this.allErrors)this.gen.if(!1);return}if(this.gen.if(e),this.error(),this.allErrors)this.gen.endIf();else this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail(y._`${t} !== undefined && (${y.or(this.invalid$data(),e)})`)}error(e,t,r){if(t){this.setParams(t),this._error(e,r),this.setParams({});return}this._error(e,r)}_error(e,t){(e?Ie.reportExtraError:Ie.reportError)(this,this.def.error,t)}$dataError(){Ie.reportError(this,this.def.$dataError||Ie.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error('add "trackErrors" to keyword definition');Ie.resetErrorsCount(this.gen,this.errsCount)}ok(e){if(!this.allErrors)this.gen.if(e)}setParams(e,t){if(t)Object.assign(this.params,e);else this.params=e}block$data(e,t,r=y.nil){this.gen.block(()=>{this.check$data(e,r),t()})}check$data(e=y.nil,t=y.nil){if(!this.$data)return;let{gen:r,schemaCode:n,schemaType:s,def:o}=this;if(r.if(y.or(y._`${n} === undefined`,t)),e!==y.nil)r.assign(e,!0);if(s.length||o.validateSchema){if(r.elseIf(this.invalid$data()),this.$dataError(),e!==y.nil)r.assign(e,!1)}r.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:r,def:n,it:s}=this;return y.or(o(),i());function o(){if(r.length){if(!(t instanceof y.Name))throw Error("ajv implementation error");let a=Array.isArray(r)?r:[r];return y._`${st.checkDataTypes(a,t,s.opts.strictNumbers,st.DataType.Wrong)}`}return y.nil}function i(){if(n.validateSchema){let a=e.scopeValue("validate$data",{ref:n.validateSchema});return y._`!${a}(${t})`}return y.nil}}subschema(e,t){let r=Yt.getSubschema(this.it,e);Yt.extendSubschemaData(r,this.it,e),Yt.extendSubschemaMode(r,e);let n={...this.it,...r,items:void 0,props:void 0};return Zd(n,t),n}mergeEvaluated(e,t){let{it:r,gen:n}=this;if(!r.opts.unevaluated)return;if(r.props!==!0&&e.props!==void 0)r.props=Z.mergeEvaluated.props(n,e.props,r.props,t);if(r.items!==!0&&e.items!==void 0)r.items=Z.mergeEvaluated.items(n,e.items,r.items,t)}mergeValidEvaluated(e,t){let{it:r,gen:n}=this;if(r.opts.unevaluated&&(r.props!==!0||r.items!==!0))return n.if(t,()=>this.mergeEvaluated(e,y.Name)),!0}}hs.KeywordCxt=tr;function ls(e,t,r,n){let s=new tr(e,r,t);if("code"in r)r.code(s,n);else if(s.$data&&r.validate)qe.funcKeywordCode(s,r);else if("macro"in r)qe.macroKeywordCode(s,r);else if(r.compile||r.validate)qe.funcKeywordCode(s,r)}var lu=/^\/(?:[^~]|~0|~1)*$/,fu=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function fs(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let s,o;if(e==="")return w.default.rootData;if(e[0]==="/"){if(!lu.test(e))throw Error(`Invalid JSON-pointer: ${e}`);s=e,o=w.default.rootData}else{let d=fu.exec(e);if(!d)throw Error(`Invalid JSON-pointer: ${e}`);let u=+d[1];if(s=d[2],s==="#"){if(u>=t)throw Error(c("property/index",u));return n[t-u]}if(u>t)throw Error(c("data",u));if(o=r[t-u],!s)return o}let i=o,a=s.split("/");for(let d of a)if(d)o=y._`${o}${y.getProperty(Z.unescapeJsonPointer(d))}`,i=y._`${i} && ${o}`;return i;function c(d,u){return`Cannot access ${d} ${u} levels up, current level is ${t}`}}hs.getData=fs});var Mg=ae(function(_s){Object.defineProperty(_s,"__esModule",{value:!0});class ms extends Error{constructor(e){super("validation failed");this.errors=e,this.ajv=this.validation=!0}}_s.default=ms});var _f=ae(function(ys){Object.defineProperty(ys,"__esModule",{value:!0});var rr=Re();class gs extends Error{constructor(e,t,r,n){super(n||`can't resolve reference ${r} from id ${t}`);this.missingRef=rr.resolveUrl(e,t,r),this.missingSchema=rr.normalizeId(rr.getFullPath(e,this.missingRef))}}ys.default=gs});var By=ae(function(ws){Object.defineProperty(ws,"__esModule",{value:!0});ws.resolveSchema=ws.getCompilingSchema=ws.resolveRef=ws.compileSchema=ws.SchemaEnv=void 0;var H=Rt(),gu=Mg(),de=Sl(),L=Re(),$s=nn(),yu=xf();class Te{constructor(e){var t;this.refs={},this.dynamicAnchors={};let r;if(typeof e.schema=="object")r=e.schema;this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(t=e.baseId)!==null&&t!==void 0?t:L.normalizeId(r===null||r===void 0?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=r===null||r===void 0?void 0:r.$async,this.refs={}}}ws.SchemaEnv=Te;function sr(e){let t=vs.call(this,e);if(t)return t;let r=L.getFullPath(this.opts.uriResolver,e.root.baseId),{es5:n,lines:s}=this.opts.code,{ownProperties:o}=this.opts,i=new H.CodeGen(this.scope,{es5:n,lines:s,ownProperties:o}),a;if(e.$async)a=i.scopeValue("Error",{ref:gu.default,code:H._`require("ajv/dist/runtime/validation_error").default`});let c=i.scopeName("validate");e.validateName=c;let d={gen:i,allErrors:this.opts.allErrors,data:de.default.data,parentData:de.default.parentData,parentDataProperty:de.default.parentDataProperty,dataNames:[de.default.data],dataPathArr:[H.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:H.stringify(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:H.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:H._`""`,opts:this.opts,self:this},u;try{this._compilations.add(e),yu.validateFunctionCode(d),i.optimize(this.opts.code.optimize);let l=i.toString();if(u=`${i.scopeRefs(de.default.scope)}return ${l}`,this.opts.code.process)u=this.opts.code.process(u,e);let p=Function(`${de.default.self}`,`${de.default.scope}`,u)(this,this.scope.get());if(this.scope.value(c,{ref:p}),p.errors=null,p.schema=e.schema,p.schemaEnv=e,e.$async)p.$async=!0;if(this.opts.code.source===!0)p.source={validateName:c,validateCode:l,scopeValues:i._values};if(this.opts.unevaluated){let{props:h,items:f}=d;if(p.evaluated={props:h instanceof H.Name?void 0:h,items:f instanceof H.Name?void 0:f,dynamicProps:h instanceof H.Name,dynamicItems:f instanceof H.Name},p.source)p.source.evaluated=H.stringify(p.evaluated)}return e.validate=p,e}catch(l){if(delete e.validate,delete e.validateName,u)this.logger.error("Error compiling schema, function code:",u);throw l}finally{this._compilations.delete(e)}}ws.compileSchema=sr;function $u(e,t,r){var n;r=L.resolveUrl(this.opts.uriResolver,t,r);let s=e.refs[r];if(s)return s;let o=Eu.call(this,e,r);if(o===void 0){let i=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;if(i)o=new Te({schema:i,schemaId:a,root:e,baseId:t})}if(o===void 0)return;return e.refs[r]=vu.call(this,o)}ws.resolveRef=$u;function vu(e){if(L.inlineRef(e.schema,this.opts.inlineRefs))return e.schema;return e.validate?e:sr.call(this,e)}function vs(e){for(let t of this._compilations)if(wu(t,e))return t}ws.getCompilingSchema=vs;function wu(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function Eu(e,t){let r;while(typeof(r=this.refs[t])=="string")t=r;return r||this.schemas[t]||ot.call(this,e,t)}function ot(e,t){let r=this.opts.uriResolver.parse(t),n=L._getFullPath(this.opts.uriResolver,r),s=L.getFullPath(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===s)return nr.call(this,r,e);let o=L.normalizeId(n),i=this.refs[o]||this.schemas[o];if(typeof i=="string"){let a=ot.call(this,e,i);if(typeof(a===null||a===void 0?void 0:a.schema)!=="object")return;return nr.call(this,r,a)}if(typeof(i===null||i===void 0?void 0:i.schema)!=="object")return;if(!i.validate)sr.call(this,i);if(o===L.normalizeId(t)){let{schema:a}=i,{schemaId:c}=this.opts,d=a[c];if(d)s=L.resolveUrl(this.opts.uriResolver,s,d);return new Te({schema:a,schemaId:c,root:e,baseId:s})}return nr.call(this,r,i)}ws.resolveSchema=ot;var bu=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function nr(e,{baseId:t,schema:r,root:n}){var s;if(((s=e.fragment)===null||s===void 0?void 0:s[0])!=="/")return;for(let a of e.fragment.slice(1).split("/")){if(typeof r==="boolean")return;let c=r[$s.unescapeFragment(a)];if(c===void 0)return;r=c;let d=typeof r==="object"&&r[this.opts.schemaId];if(!bu.has(a)&&d)t=L.resolveUrl(this.opts.uriResolver,t,d)}let o;if(typeof r!="boolean"&&r.$ref&&!$s.schemaHasRulesButRef(r,this.RULES)){let a=L.resolveUrl(this.opts.uriResolver,t,r.$ref);o=ot.call(this,n,a)}let{schemaId:i}=this.opts;if(o=o||new Te({schema:r,schemaId:i,root:n,baseId:t}),o.schema!==o.root.schema)return o;return}});var bs=ae(function(vm,Ou){Ou.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var ur=ae(function(wm,Rs){var Nu=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),ir=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),ue=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),ar=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),Ps=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),cr=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),Ru=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u),M=Array(256);for(let t=0;t<256;t++)M[t]="%"+"0123456789ABCDEF"[t>>4]+"0123456789ABCDEF"[t&15];function T(e){if(e<2048)return M[192|e>>6]+M[128|e&63];if(e<65536)return M[224|e>>12]+M[128|e>>6&63]+M[128|e&63];return M[240|e>>18]+M[128|e>>12&63]+M[128|e>>6&63]+M[128|e&63]}function qu(e){let t="",r=0,n=0;for(n=0;n<e.length;n++){if(r=e[n].charCodeAt(0),r===48)continue;if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n];break}for(n+=1;n<e.length;n++){if(r=e[n].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n]}return t}var Iu=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),Tu=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),ju=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),Cu=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function Du(e){if(e.length===0)return!1;for(let t=0;t<e.length;t++){if(ju(e[t]))continue;if(e[t]==="%"&&t+2<e.length&&ue(e.slice(t+1,t+3))){t+=2;continue}return!1}return!0}function Ss(e){let t=-1,r=0,n=-1,s=0;for(let a=0;a<e.length;a++)if(e[a]==="0"){if(n===-1)n=a;if(s++,s>r)r=s,t=n}else n=-1,s=0;if(r<2)return e.join(":");let o=e.slice(0,t).join(":"),i=e.slice(t+r).join(":");return o+"::"+i}function Au(e){let t=e.indexOf("::");if(t!==-1&&e.indexOf("::",t+1)!==-1)return;let r=t===-1?e.split(":"):e.slice(0,t).split(":"),n=t===-1?[]:e.slice(t+2).split(":");if(t!==-1){if(r.length===1&&r[0]==="")r.length=0;if(n.length===1&&n[0]==="")n.length=0}let s=r.concat(n),o=0;for(let a=0;a<s.length;a++){let c=s[a];if(c==="")return;if(c.indexOf(".")!==-1){if(a!==s.length-1||t!==-1&&n.length===0||!ir(c))return;o+=2;continue}if(!Iu(c))return;s[a]=parseInt(c,16).toString(16),o++}if(t===-1){if(o!==8)return;return Ss(s)}if(o>=8)return;let i=s.slice(0,r.length);for(let a=o;a<8;a++)i.push("0");for(let a=r.length;a<s.length;a++)i.push(s[a]);return Ss(i)}function or(e){let t=e[0]==="["&&e[e.length-1]==="]";if((e[0]==="["||e[e.length-1]==="]")&&!t)return{host:e,isIPV6:!1,error:!0};let n=t?e.slice(1,-1):e;if(t&&Tu(n))return n=n.toLowerCase(),{host:`[${n}]`,escapedHost:n,isIPV6:!1,isIPVFuture:!0};if(Mu(n,":")<2)return{host:e,isIPV6:!1,error:t};let s="",o=n.indexOf("%");if(o!==-1){let a=n.slice(o,o+3).toLowerCase()==="%25"?3:1;if(s=n.slice(o+a),!Du(s))return{host:e,isIPV6:!1,error:!0};n=n.slice(0,o)}let i=Au(n);if(i===void 0)return{host:e,isIPV6:!1,error:!0};return{host:i+(s?"%"+s:""),escapedHost:i+(s?"%25"+s:""),isIPV6:!0}}function Mu(e,t){let r=0;for(let n=0;n<e.length;n++)if(e[n]===t)r++;return r}function Fu(e){let t=e,r=[],n=-1,s=0;while(s=t.length){if(s===1)if(t===".")break;else if(t==="/"){r.push("/");break}else{r.push(t);break}else if(s===2){if(t[0]==="."){if(t[1]===".")break;else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"){if(t[1]==="."||t[1]==="/"){r.push("/");break}}}else if(s===3){if(t==="/.."){if(r.length!==0)r.pop();r.push("/");break}}if(t[0]==="."){if(t[1]==="."){if(t[2]==="/"){t=t.slice(3);continue}}else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"){if(t[1]==="."){if(t[2]==="/"){t=t.slice(2);continue}else if(t[2]==="."){if(t[3]==="/"){if(t=t.slice(3),r.length!==0)r.pop();continue}}}}if((n=t.indexOf("/",1))===-1){r.push(t);break}else r.push(t.slice(0,n)),t=t.slice(n)}return r.join("")}var Vu={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},zu=/[@/?#:]/g,Uu=/[@/?#]/g;function xs(e,t){let r=t?Uu:zu;return r.lastIndex=0,e.replace(r,(n)=>Vu[n])}function ks(e,t=!1){if(e.indexOf("%")===-1)return e;let r="";for(let n=0;n<e.length;n++){if(e[n]==="%"&&n+2<e.length){let s=e.slice(n+1,n+3);if(ue(s)){let o=s.toUpperCase(),i=String.fromCharCode(parseInt(o,16));if(t&&ar(i))r+=i;else r+="%"+o;n+=2;continue}}r+=e[n]}return r}function Ku(e){let t="";for(let r=0;r<e.length;r++){let n=e[r];if(n==="%"&&r+2<e.length){let s=e.slice(r+1,r+3);if(ue(s)){let o=s.toUpperCase(),i=String.fromCharCode(parseInt(o,16));if(i!=="."&&ar(i))t+=i;else t+="%"+o;r+=2;continue}}if(Ps(n))t+=n;else{let s=e.charCodeAt(r);if(s<128)t+=Ns(s)?n:M[s];else if(s<55296||s>57343)t+=T(s);else if(s<=56319&&r+1<e.length){let o=e.charCodeAt(r+1);if(o>=56320&&o<=57343)t+=T(65536+(s-55296<<10)+(o-56320)),r++;else t+=T(65533)}else t+=T(65533)}}return t}function Hu(e,t=!1){let r="",n=t&&e[0]!=="/";for(let s=0;s<e.length;s++){let o=e[s];if(o==="%"&&s+2<e.length){let i=e.slice(s+1,s+3);if(ue(i)){r+="%"+i.toUpperCase(),s+=2;continue}}if(o==="/")n=!1;if(Ps(o)&&(o!==":"||!n))r+=o;else{let i=e.charCodeAt(s);if(i<128)r+=M[i];else if(i<55296||i>57343)r+=T(i);else if(i<=56319&&s+1<e.length){let a=e.charCodeAt(s+1);if(a>=56320&&a<=57343)r+=T(65536+(i-55296<<10)+(a-56320)),s++;else r+=T(65533)}else r+=T(65533)}}return r}function dr(e,t){let r="";for(let n=0;n<e.length;n++){let s=e[n];if(s==="%"&&n+2<e.length){let o=e.slice(n+1,n+3);if(ue(o)){r+="%"+o.toUpperCase(),n+=2;continue}}if(t(s))r+=s;else{let o=e.charCodeAt(n);if(o<128)r+=M[o];else if(o<55296||o>57343)r+=T(o);else if(o<=56319&&n+1<e.length){let i=e.charCodeAt(n+1);if(i>=56320&&i<=57343)r+=T(65536+(o-55296<<10)+(i-56320)),n++;else r+=T(65533)}else r+=T(65533)}}return r}function Os(e){return dr(e,Ru)}function Lu(e){return dr(e,cr)}function Gu(e){return dr(e,cr)}function Ns(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===42||e===43||e===45||e===46||e===47||e===64||e===95}function Ju(e){let t="";for(let r=0;r<e.length;r++){let n=e[r];if(n==="%"&&r+2<e.length){let s=e.slice(r+1,r+3);if(ue(s)){let o=s.toUpperCase(),i=String.fromCharCode(parseInt(o,16));if(ar(i))t+=i;else t+="%"+o;r+=2;continue}}if(cr(n))t+=n;else{let s=e.charCodeAt(r);if(s<128)t+=Ns(s)?n:M[s];else if(s<55296||s>57343)t+=T(s);else if(s<=56319&&r+1<e.length){let o=e.charCodeAt(r+1);if(o>=56320&&o<=57343)t+=T(65536+(s-55296<<10)+(o-56320)),r++;else t+=T(65533)}else t+=T(65533)}}return t}function Bu(e){let t="";for(let r=0;r<e.length;r++){if(e[r]==="%"&&r+2<e.length){let n=e.slice(r+1,r+3);if(ue(n)){t+="%"+n.toUpperCase(),r+=2;continue}}t+=escape(e[r])}return t}function Wu(e){let t=[];if(e.userinfo!==void 0)t.push(Os(e.userinfo)),t.push("@");if(e.host!==void 0){let r=e.host;if(!ir(r)){let n=or(r);if(n.isIPV6!==!0&&n.isIPVFuture!==!0)r=ks(r,!0),n=or(r);if(n.isIPV6===!0||n.isIPVFuture===!0)r=`[${n.escapedHost}]`;else r=xs(r,!1)}t.push(r)}if(typeof e.port==="number"||typeof e.port==="string")t.push(":"),t.push(String(e.port));return t.length?t.join(""):void 0}Rs.exports={nonSimpleDomain:Cu,recomposeAuthority:Wu,reescapeHostDelimiters:xs,normalizePercentEncoding:ks,normalizePathEncoding:Ku,serializePathEncoding:Hu,normalizeQueryFragmentEncoding:Ju,encodeUserinfo:Os,encodeQuery:Lu,encodeFragment:Gu,escapePreservingEscapes:Bu,removeDotSegments:Fu,isIPv4:ir,isUUID:Nu,normalizeIPv6:or,stringArrayToHexStripped:qu}});var Cs=ae(function(Em,js){var{isUUID:Qu}=ur(),Zu=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu,Xu=["http","https","ws","wss","urn","urn:uuid"];function Yu(e){return Xu.indexOf(e)!==-1}function lr(e){if(e.secure===!0)return!0;else if(e.secure===!1)return!1;else if(e.scheme)return e.scheme.length===3&&(e.scheme[0]==="w"||e.scheme[0]==="W")&&(e.scheme[1]==="s"||e.scheme[1]==="S")&&(e.scheme[2]==="s"||e.scheme[2]==="S");else return!1}function qs(e){if(!e.host)e.error=e.error||"HTTP URIs must have a host.";return e}function Is(e){let t=String(e.scheme).toLowerCase()==="https";if(e.port===(t?443:80)||e.port==="")e.port=void 0;if(!e.path)e.path="/";return e}function el(e){return e.secure=lr(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function tl(e){if(e.port===(lr(e)?443:80)||e.port==="")e.port=void 0;if(typeof e.secure==="boolean")e.scheme=e.secure?"wss":"ws",e.secure=void 0;if(e.resourceName){let t=e.resourceName.indexOf("?"),r=t===-1?e.resourceName:e.resourceName.slice(0,t);e.path=r&&r!=="/"?r:void 0,e.query=t===-1?void 0:e.resourceName.slice(t+1),e.resourceName=void 0}return e.fragment=void 0,e}function rl(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(Zu);if(r&&r[0]===e.path){let n=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let s=`${n}:${t.nid||e.nid}`,o=fr(s);if(e.path=void 0,o)e=o.parse(e,t)}else e.error=e.error||"URN can not be parsed.";return e}function nl(e,t){if(e.nid===void 0)throw Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),s=`${r}:${t.nid||n}`,o=fr(s);if(o)e=o.serialize(e,t);let i=e,a=e.nss;return i.path=`${n||t.nid}:${a}`,t.skipEscape=!0,i}function sl(e,t){let r=e;if(r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!Qu(r.uuid)))r.error=r.error||"UUID is not valid.";return r}function ol(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var Ts={scheme:"http",domainHost:!0,parse:qs,serialize:Is},il={scheme:"https",domainHost:Ts.domainHost,parse:qs,serialize:Is},it={scheme:"ws",domainHost:!0,parse:el,serialize:tl},al={scheme:"wss",domainHost:it.domainHost,parse:it.parse,serialize:it.serialize},cl={scheme:"urn",parse:rl,serialize:nl,skipNormalize:!0},dl={scheme:"urn:uuid",parse:sl,serialize:ol,skipNormalize:!0},at={http:Ts,https:il,ws:it,wss:al,urn:cl,"urn:uuid":dl};Object.setPrototypeOf(at,null);function fr(e){return e&&(at[e]||at[e.toLowerCase()])||void 0}js.exports={wsIsSecure:lr,SCHEMES:at,isValidSchemeName:Yu,getSchemeHandler:fr}});var Bs=ae(function(bm,ut){var{normalizeIPv6:Vs,removeDotSegments:Ce,recomposeAuthority:ul,normalizePercentEncoding:zs,normalizePathEncoding:ll,serializePathEncoding:Ds,normalizeQueryFragmentEncoding:As,encodeQuery:fl,encodeFragment:hl,reescapeHostDelimiters:pl,isIPv4:Us,nonSimpleDomain:ml}=ur(),{SCHEMES:Ks,getSchemeHandler:hr}=Cs(),Hs=/^[A-Za-z][A-Za-z0-9+.-]*$/u;function Ms(e){let t=unescape(String(e));if(!Hs.test(t))throw TypeError("URI scheme is malformed.");return t}function _l(e,t){if(typeof e==="string")e=Pl(e,t);else if(typeof e==="object")e=dt(le(e,t),t);return e}function gl(e,t,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},{parsed:s,malformedAuthorityOrPort:o,malformedPercentEncoding:i,malformedSchemeSpecific:a,malformedHost:c,malformedScheme:d}=ct(e,n),{parsed:u,malformedAuthorityOrPort:l,malformedPercentEncoding:_,malformedSchemeSpecific:p,malformedHost:h,malformedScheme:f}=ct(t,n);if(o||l||i||_||a||p||c||h||d||f)throw Error(s.error||u.error||"URI is malformed.");let m=Ls(s,u,n,!0),g=hr(r&&r.scheme||m.scheme),v=m.host,S=v!==void 0&&v!==""&&(Us(v)||Vs(v).isIPV6);Gs(m,r||{},g,S);let k=v&&v.indexOf("%")!==-1&&!/\P{ASCII}/u.test(v);if(m.error&&!k)throw Error(m.error);return n.skipEscape=!0,le(m,n)}function Ls(e,t,r,n){let s={};if(!n)e=dt(le(e,r),r),t=dt(le(t,r),r);if(r=r||{},!r.tolerant&&t.scheme)s.scheme=t.scheme,s.userinfo=t.userinfo,s.host=t.host,s.port=t.port,s.path=Ce(t.path||""),s.query=t.query;else{if(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)s.userinfo=t.userinfo,s.host=t.host,s.port=t.port,s.path=Ce(t.path||""),s.query=t.query;else{if(!t.path)if(s.path=e.path,t.query!==void 0)s.query=t.query;else s.query=e.query;else{if(t.path[0]==="/")s.path=Ce(t.path);else{if((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path)s.path="/"+t.path;else if(!e.path)s.path=t.path;else s.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path;s.path=Ce(s.path)}s.query=t.query}s.userinfo=e.userinfo,s.host=e.host,s.port=e.port}s.scheme=e.scheme}return s.fragment=t.fragment,s}function yl(e,t,r){let n=Fs(e,r),s=Fs(t,r);return n!==void 0&&s!==void 0&&n===s}function le(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},n=Object.assign({},t),s=[];if(r.scheme)r.scheme=Ms(r.scheme);let o=hr(n.scheme||r.scheme);if(o&&o.serialize)o.serialize(r,n);let i=r.userinfo!==void 0||r.host!==void 0||r.port!==void 0,a=!n.skipEscape&&r.scheme===void 0&&!i;if(r.path!==void 0)if(!n.skipEscape)r.path=Ds(r.path,a);else r.path=zs(r.path);if(n.reference!=="suffix"&&r.scheme)r.scheme=Ms(r.scheme),s.push(r.scheme,":");let c=ul(r);if(c!==void 0){if(n.reference!=="suffix")s.push("//");if(s.push(c),r.path&&r.path[0]!=="/")s.push("/")}if(r.path!==void 0){let d=r.path;if(!n.absolutePath&&(!o||!o.absolutePath))d=Ce(d);if(a)d=Ds(d,!0);if(c===void 0&&d[0]==="/"&&d[1]==="/")d="/%2F"+d.slice(2);s.push(d)}if(r.query!==void 0)s.push("?",fl(r.query));if(r.fragment!==void 0)s.push("#",hl(r.fragment));return s.join("")}var $l=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,vl=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,wl=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function El(e,t){if(t[2]!==void 0&&e.path&&e.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof e.port==="number"&&(e.port<0||e.port>65535))return"URI port is malformed.";return}function je(e){if(e===void 0)return!1;let t=e.indexOf("%");while(t!==-1){if(t+2>=e.length||!/^[\da-f]{2}$/iu.test(e.slice(t+1,t+3)))return!0;t=e.indexOf("%",t+3)}return!1}function bl(e){let t=e[4];return je(e[3])||t!==void 0&&!(t[0]==="["&&t[t.length-1]==="]")&&je(t)||je(e[6])||je(e[7])||je(e[8])}function Gs(e,t,r,n){if(!t.unicodeSupport&&(!r||!r.unicodeSupport)&&e.host&&e.host[0]!=="["&&(t.domainHost||r&&r.domainHost)&&n===!1&&ml(e.host))try{e.host=new URL("http://"+e.host).hostname}catch(s){return e.error=e.error||"Host's domain name can not be converted to ASCII: "+s,!0}return!1}function ct(e,t){let r=Object.assign({},t),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},s=!1,o=!1,i=!1,a=!1,c=!1,d=!1,u=!1;if(r.reference==="suffix")if(r.scheme)e=r.scheme+":"+e;else e="//"+e;let l=e.match(vl);if(l!==null&&l[1].indexOf("\\")!==-1)n.error="URI authority must not contain a literal backslash.",s=!0;let _=e.match(wl);if(_!==null){let h=_[1],f=h.replace(/[\t\n\r]/g,"");if(f.length>=2){if(f.slice(0,2)!=="//")n.error=n.error||"URI authority must not contain a literal backslash.",s=!0;else if(h.length!==f.length)n.error=n.error||"URI authority introducer must not contain whitespace.",s=!0}}let p=e.match($l);if(p){if(n.scheme=p[1],n.userinfo=p[3],n.host=p[4],n.port=parseInt(p[5],10),n.path=p[6]||"",n.query=p[7],n.fragment=p[8],n.scheme!==void 0){let m=unescape(n.scheme);if(Hs.test(m))n.scheme=m.toLowerCase();else n.error=n.error||"URI scheme is malformed.",d=!0}if(o=bl(p),o)n.error=n.error||"URI contains malformed percent-encoding.";if(isNaN(n.port))n.port=p[5];let h=El(n,p);if(h!==void 0)n.error=n.error||h,s=!0;if(n.host)if(Us(n.host)===!1){let g=n.host[0]==="["&&n.host[n.host.length-1]==="]",v=Vs(n.host);if(u=v.isIPV6||v.isIPVFuture===!0,c=g&&v.error===!0,n.host=u?v.host:v.host.toLowerCase(),c)n.error=n.error||"URI host is malformed.",s=!0}else u=!0;if(n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path)n.reference="same-document";else if(n.scheme===void 0)n.reference="relative";else if(n.fragment===void 0)n.reference="absolute";else n.reference="uri";if(r.reference&&r.reference!=="suffix"&&r.reference!==n.reference)n.error=n.error||"URI is not a "+r.reference+" reference.";let f=hr(r.scheme||n.scheme);if(a=Gs(n,r,f,u),!f||f&&!f.skipNormalize){if(e.indexOf("%")!==-1){if(n.host!==void 0&&!c){let m=u?n.host:zs(n.host,!0);n.host=pl(m,u)}}if(n.path)n.path=ll(n.path);if(n.query)n.query=As(n.query);if(n.fragment)n.fragment=As(n.fragment)}if(f&&f.parse){if(f.parse(n,r),f===Ks.urn&&n.nid===void 0)i=!0}}else n.error=n.error||"URI can not be parsed.";return{parsed:n,malformedAuthorityOrPort:s,malformedPercentEncoding:o,malformedSchemeSpecific:i,malformedHost:a,malformedScheme:d}}function dt(e,t){return ct(e,t).parsed}function Pl(e,t){return Js(e,t).normalized}function Js(e,t){let{parsed:r,malformedAuthorityOrPort:n,malformedPercentEncoding:s,malformedSchemeSpecific:o,malformedHost:i,malformedScheme:a}=ct(e,t);return{normalized:n||s||o||i||a?e:le(r,t),malformedAuthorityOrPort:n,malformedPercentEncoding:s,malformedSchemeSpecific:o,malformedHost:i,malformedScheme:a}}function Fs(e,t){if(typeof e!=="string"&&typeof e!=="object")return;let r;try{r=typeof e==="string"?e:le(e,t)}catch{return}let{normalized:n,malformedAuthorityOrPort:s,malformedPercentEncoding:o,malformedSchemeSpecific:i,malformedHost:a,malformedScheme:c}=Js(r,t);return s||o||i||a||c?void 0:n}var pr={SCHEMES:Ks,normalize:_l,resolve:gl,resolveComponent:Ls,equal:yl,serialize:le,parse:dt};ut.exports=pr;ut.exports.default=pr;ut.exports.fastUri=pr});var Zs=ae(function(Qs){Object.defineProperty(Qs,"__esModule",{value:!0});var Ws=Bs();Ws.code='require("ajv/dist/runtime/uri").default';Qs.default=Ws});var l_=ae(function(X){Object.defineProperty(X,"__esModule",{value:!0});X.CodeGen=X.Name=X.nil=X.stringify=X.str=X._=X.KeywordCxt=void 0;var kl=xf();Object.defineProperty(X,"KeywordCxt",{enumerable:!0,get:function(){return kl.KeywordCxt}});var ve=Rt();Object.defineProperty(X,"_",{enumerable:!0,get:function(){return ve._}});Object.defineProperty(X,"str",{enumerable:!0,get:function(){return ve.str}});Object.defineProperty(X,"stringify",{enumerable:!0,get:function(){return ve.stringify}});Object.defineProperty(X,"nil",{enumerable:!0,get:function(){return ve.nil}});Object.defineProperty(X,"Name",{enumerable:!0,get:function(){return ve.Name}});Object.defineProperty(X,"CodeGen",{enumerable:!0,get:function(){return ve.CodeGen}});var Ol=Mg(),ro=_f(),Nl=Ut(),Ae=By(),Rl=Rt(),De=Re(),lt=Ne(),_r=nn(),Xs=bs(),ql=Zs(),no=(e,t)=>new RegExp(e,t);no.code="new RegExp";var Il=["removeAdditional","useDefaults","coerceTypes"],Tl=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),jl={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},Cl={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Ys=200;function Dl(e){var t,r,n,s,o,i,a,c,d,u,l,_,p,h,f,m,g,v,S,k,E,J,W,Pt,xt;let Se=e.strict,kt=(t=e.code)===null||t===void 0?void 0:t.optimize,xr=kt===!0||kt===void 0?1:kt||0,kr=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:no,Hi=(s=e.uriResolver)!==null&&s!==void 0?s:ql.default;return{strictSchema:(i=(o=e.strictSchema)!==null&&o!==void 0?o:Se)!==null&&i!==void 0?i:!0,strictNumbers:(c=(a=e.strictNumbers)!==null&&a!==void 0?a:Se)!==null&&c!==void 0?c:!0,strictTypes:(u=(d=e.strictTypes)!==null&&d!==void 0?d:Se)!==null&&u!==void 0?u:"log",strictTuples:(_=(l=e.strictTuples)!==null&&l!==void 0?l:Se)!==null&&_!==void 0?_:"log",strictRequired:(h=(p=e.strictRequired)!==null&&p!==void 0?p:Se)!==null&&h!==void 0?h:!1,code:e.code?{...e.code,optimize:xr,regExp:kr}:{optimize:xr,regExp:kr},loopRequired:(f=e.loopRequired)!==null&&f!==void 0?f:Ys,loopEnum:(m=e.loopEnum)!==null&&m!==void 0?m:Ys,meta:(g=e.meta)!==null&&g!==void 0?g:!0,messages:(v=e.messages)!==null&&v!==void 0?v:!0,inlineRefs:(S=e.inlineRefs)!==null&&S!==void 0?S:!0,schemaId:(k=e.schemaId)!==null&&k!==void 0?k:"$id",addUsedSchema:(E=e.addUsedSchema)!==null&&E!==void 0?E:!0,validateSchema:(J=e.validateSchema)!==null&&J!==void 0?J:!0,validateFormats:(W=e.validateFormats)!==null&&W!==void 0?W:!0,unicodeRegExp:(Pt=e.unicodeRegExp)!==null&&Pt!==void 0?Pt:!0,int32range:(xt=e.int32range)!==null&&xt!==void 0?xt:!0,uriResolver:Hi}}class ft{constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...Dl(e)};let{es5:t,lines:r}=this.opts.code;this.scope=new Rl.ValueScope({scope:{},prefixes:Tl,es5:t,lines:r}),this.logger=Ul(e.logger);let n=e.validateFormats;if(e.validateFormats=!1,this.RULES=Nl.getRules(),eo.call(this,jl,e,"NOT SUPPORTED"),eo.call(this,Cl,e,"DEPRECATED","warn"),this._metaOpts=Vl.call(this),e.formats)Ml.call(this);if(this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords)Fl.call(this,e.keywords);if(typeof e.meta=="object")this.addMetaSchema(e.meta);Al.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:r}=this.opts,n=Xs;if(r==="id")n={...Xs},n.id=n.$id,delete n.$id;if(t&&e)this.addMetaSchema(n,n[r],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[t]||e:void 0}validate(e,t){let r;if(typeof e=="string"){if(r=this.getSchema(e),!r)throw Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);let n=r(t);if(!("$async"in r))this.errors=r.errors;return n}compile(e,t){let r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if(typeof this.opts.loadSchema!="function")throw Error("options.loadSchema should be a function");let{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(d,u){await s.call(this,d.$schema);let l=this._addSchema(d,u);return l.validate||o.call(this,l)}async function s(d){if(d&&!this.getSchema(d))await n.call(this,{$ref:d},!0)}async function o(d){try{return this._compileSchemaEnv(d)}catch(u){if(!(u instanceof ro.default))throw u;return i.call(this,u),await a.call(this,u.missingSchema),o.call(this,d)}}function i({missingSchema:d,missingRef:u}){if(this.refs[d])throw Error(`AnySchema ${d} is loaded but ${u} cannot be resolved`)}async function a(d){let u=await c.call(this,d);if(!this.refs[d])await s.call(this,u.$schema);if(!this.refs[d])this.addSchema(u,d,t)}async function c(d){let u=this._loading[d];if(u)return u;try{return await(this._loading[d]=r(d))}finally{delete this._loading[d]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(let o of e)this.addSchema(o,void 0,r,n);return this}let s;if(typeof e==="object"){let{schemaId:o}=this.opts;if(s=e[o],s!==void 0&&typeof s!="string")throw Error(`schema ${o} must be string`)}return t=De.normalizeId(t||s),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if(typeof e=="boolean")return!0;let r;if(r=e.$schema,r!==void 0&&typeof r!="string")throw Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let n=this.validate(r,e);if(!n&&t){let s="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(s);else throw Error(s)}return n}getSchema(e){let t;while(typeof(t=to.call(this,e))=="string")e=t;if(t===void 0){let{schemaId:r}=this.opts,n=new Ae.SchemaEnv({schema:{},schemaId:r});if(t=Ae.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=to.call(this,e);if(typeof t=="object")this._cache.delete(t.schema);return delete this.schemas[e],delete this.refs[e],this}case"object":{let t=e;this._cache.delete(t);let r=e[this.opts.schemaId];if(r)r=De.normalizeId(r),delete this.schemas[r],delete this.refs[r];return this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if(typeof e=="string"){if(r=e,typeof t=="object")this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r}else if(typeof e=="object"&&t===void 0){if(t=e,r=t.keyword,Array.isArray(r)&&!r.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(Hl.call(this,r,t),!t)return _r.eachItem(r,(s)=>mr.call(this,s)),this;Gl.call(this,t);let n={...t,type:lt.getJSONTypes(t.type),schemaType:lt.getJSONTypes(t.schemaType)};return _r.eachItem(r,n.type.length===0?(s)=>mr.call(this,s,n):(s)=>n.type.forEach((o)=>mr.call(this,s,n,o))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t=="object"?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let r of t.rules){let n=r.rules.findIndex((s)=>s.keyword===e);if(n>=0)r.rules.splice(n,1)}return this}addFormat(e,t){if(typeof t=="string")t=new RegExp(t);return this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){if(!e||e.length===0)return"No errors";return e.map((n)=>`${r}${n.instancePath} ${n.message}`).reduce((n,s)=>n+t+s)}$dataMetaSchema(e,t){let r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let n of t){let s=n.split("/").slice(1),o=e;for(let i of s)o=o[i];for(let i in r){let a=r[i];if(typeof a!="object")continue;let{$data:c}=a.definition,d=o[i];if(c&&d)o[i]=so(d)}}return e}_removeAllSchemas(e,t){for(let r in e){let n=e[r];if(!t||t.test(r)){if(typeof n=="string")delete e[r];else if(n&&!n.meta)this._cache.delete(n.schema),delete e[r]}}}_addSchema(e,t,r,n=this.opts.validateSchema,s=this.opts.addUsedSchema){let o,{schemaId:i}=this.opts;if(typeof e=="object")o=e[i];else if(this.opts.jtd)throw Error("schema must be object");else if(typeof e!="boolean")throw Error("schema must be object or boolean");let a=this._cache.get(e);if(a!==void 0)return a;r=De.normalizeId(o||r);let c=De.getSchemaRefs.call(this,e,r);if(a=new Ae.SchemaEnv({schema:e,schemaId:i,meta:t,baseId:r,localRefs:c}),this._cache.set(a.schema,a),s&&!r.startsWith("#")){if(r)this._checkUnique(r);this.refs[r]=a}if(n)this.validateSchema(e,!0);return a}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta)this._compileMetaSchema(e);else Ae.compileSchema.call(this,e);if(!e.validate)throw Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{Ae.compileSchema.call(this,e)}finally{this.opts=t}}}ft.ValidationError=Ol.default;ft.MissingRefError=ro.default;X.default=ft;function eo(e,t,r,n="error"){for(let s in e){let o=s;if(o in t)this.logger[n](`${r}: option ${s}. ${e[o]}`)}}function to(e){return e=De.normalizeId(e),this.schemas[e]||this.refs[e]}function Al(){let e=this.opts.schemas;if(!e)return;if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function Ml(){for(let e in this.opts.formats){let t=this.opts.formats[e];if(t)this.addFormat(e,t)}}function Fl(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];if(!r.keyword)r.keyword=t;this.addKeyword(r)}}function Vl(){let e={...this.opts};for(let t of Il)delete e[t];return e}var zl={log(){},warn(){},error(){}};function Ul(e){if(e===!1)return zl;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw Error("logger must implement log, warn and error methods")}var Kl=/^[a-z_$][a-z0-9_$:-]*$/i;function Hl(e,t){let{RULES:r}=this;if(_r.eachItem(e,(n)=>{if(r.keywords[n])throw Error(`Keyword ${n} is already defined`);if(!Kl.test(n))throw Error(`Keyword ${n} has invalid name`)}),!t)return;if(t.$data&&!(("code"in t)||("validate"in t)))throw Error('$data keyword must have "code" or "validate" function')}function mr(e,t,r){var n;let s=t===null||t===void 0?void 0:t.post;if(r&&s)throw Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,i=s?o.post:o.rules.find(({type:c})=>c===r);if(!i)i={type:r,rules:[]},o.rules.push(i);if(o.keywords[e]=!0,!t)return;let a={keyword:e,definition:{...t,type:lt.getJSONTypes(t.type),schemaType:lt.getJSONTypes(t.schemaType)}};if(t.before)Ll.call(this,i,a,t.before);else i.rules.push(a);o.all[e]=a,(n=t.implements)===null||n===void 0||n.forEach((c)=>this.addKeyword(c))}function Ll(e,t,r){let n=e.rules.findIndex((s)=>s.keyword===r);if(n>=0)e.rules.splice(n,0,t);else e.rules.push(t),this.logger.warn(`rule ${r} is not defined`)}function Gl(e){let{metaSchema:t}=e;if(t===void 0)return;if(e.$data&&this.opts.$data)t=so(t);e.validateSchema=this.compile(t,!0)}var Jl={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function so(e){return{anyOf:[e,Jl]}}});var co=ae(function(io){Object.defineProperty(io,"__esModule",{value:!0});io.DiscrError=void 0;var oo;(function(e){e.Tag="tag",e.Mapping="mapping"})(oo||(io.DiscrError=oo={}))});var g_=ae(function(lo){Object.defineProperty(lo,"__esModule",{value:!0});var we=Rt(),gr=co(),uo=By(),Ql=_f(),Zl=nn(),Xl={message:({params:{discrError:e,tagName:t}})=>e===gr.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>we._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},Yl={keyword:"discriminator",type:"object",schemaType:"object",error:Xl,code(e){let{gen:t,data:r,schema:n,parentSchema:s,it:o}=e,{oneOf:i}=s;if(!o.opts.discriminator)throw Error("discriminator: requires discriminator option");let a=n.propertyName;if(typeof a!="string")throw Error("discriminator: requires propertyName");if(n.mapping)throw Error("discriminator: mapping is not supported");if(!i)throw Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),d=t.const("tag",we._`${r}${we.getProperty(a)}`);t.if(we._`typeof ${d} == "string"`,()=>u(),()=>e.error(!1,{discrError:gr.DiscrError.Tag,tag:d,tagName:a})),e.ok(c);function u(){let p=_();t.if(!1);for(let h in p)t.elseIf(we._`${d} === ${h}`),t.assign(c,l(p[h]));t.else(),e.error(!1,{discrError:gr.DiscrError.Mapping,tag:d,tagName:a}),t.endIf()}function l(p){let h=t.name("valid"),f=e.subschema({keyword:"oneOf",schemaProp:p},h);return e.mergeEvaluated(f,we.Name),h}function _(){var p;let h={},f=g(s),m=!0;for(let k=0;k<i.length;k++){let E=i[k];if((E===null||E===void 0?void 0:E.$ref)&&!Zl.schemaHasRulesButRef(E,o.self.RULES)){let W=E.$ref;if(E=uo.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,W),E instanceof uo.SchemaEnv)E=E.schema;if(E===void 0)throw new Ql.default(o.opts.uriResolver,o.baseId,W)}let J=(p=E===null||E===void 0?void 0:E.properties)===null||p===void 0?void 0:p[a];if(typeof J!="object")throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);m=m&&(f||g(E)),v(J,k)}if(!m)throw Error(`discriminator: "${a}" must be required`);return h;function g({required:k}){return Array.isArray(k)&&k.includes(a)}function v(k,E){if(k.const)S(k.const,E);else if(k.enum)for(let J of k.enum)S(J,E);else throw Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function S(k,E){if(typeof k!="string"||k in h)throw Error(`discriminator: "${a}" values must be unique strings`);h[k]=E}}}};lo.default=Yl});var ho=ae(function(fo){Object.defineProperty(fo,"__esModule",{value:!0});var tf={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};fo.default=tf});var c_=ae(function(go){Object.defineProperty(go,"__esModule",{value:!0});go.callRef=go.getValidate=void 0;var nf=_f(),po=V(),F=Rt(),Ee=Sl(),mo=By(),ht=nn(),sf={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:s,schemaEnv:o,validateName:i,opts:a,self:c}=n,{root:d}=o;if((r==="#"||r==="#/")&&s===d.baseId)return l();let u=mo.resolveRef.call(c,d,s,r);if(u===void 0)throw new nf.default(n.opts.uriResolver,s,r);if(u instanceof mo.SchemaEnv)return _(u);return p(u);function l(){if(o===d)return pt(e,i,o,o.$async);let h=t.scopeValue("root",{ref:d});return pt(e,F._`${h}.validate`,d,d.$async)}function _(h){let f=_o(e,h);pt(e,f,h,h.$async)}function p(h){let f=t.scopeValue("schema",a.code.source===!0?{ref:h,code:F.stringify(h)}:{ref:h}),m=t.name("valid"),g=e.subschema({schema:h,dataTypes:[],schemaPath:F.nil,topSchemaRef:f,errSchemaPath:r},m);e.mergeEvaluated(g),e.ok(m)}}};function _o(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):F._`${r.scopeValue("wrapper",{ref:t})}.validate`}go.getValidate=_o;function pt(e,t,r,n){let{gen:s,it:o}=e,{allErrors:i,schemaEnv:a,opts:c}=o,d=c.passContext?Ee.default.this:F.nil;if(n)u();else l();function u(){if(!a.$async)throw Error("async schema referenced by sync schema");let h=s.let("valid");s.try(()=>{if(s.code(F._`await ${po.callValidateCode(e,t,d)}`),p(t),!i)s.assign(h,!0)},(f)=>{if(s.if(F._`!(${f} instanceof ${o.ValidationError})`,()=>s.throw(f)),_(f),!i)s.assign(h,!1)}),e.ok(h)}function l(){e.result(po.callValidateCode(e,t,d),()=>p(t),()=>_(t))}function _(h){let f=F._`${h}.errors`;s.assign(Ee.default.vErrors,F._`${Ee.default.vErrors} === null ? ${f} : ${Ee.default.vErrors}.concat(${f})`),s.assign(Ee.default.errors,F._`${Ee.default.vErrors}.length`)}function p(h){var f;if(!o.opts.unevaluated)return;let m=(f=r===null||r===void 0?void 0:r.validate)===null||f===void 0?void 0:f.evaluated;if(o.props!==!0)if(m&&!m.dynamicProps){if(m.props!==void 0)o.props=ht.mergeEvaluated.props(s,m.props,o.props)}else{let g=s.var("props",F._`${h}.evaluated.props`);o.props=ht.mergeEvaluated.props(s,g,o.props,F.Name)}if(o.items!==!0)if(m&&!m.dynamicItems){if(m.items!==void 0)o.items=ht.mergeEvaluated.items(s,m.items,o.items)}else{let g=s.var("items",F._`${h}.evaluated.items`);o.items=ht.mergeEvaluated.items(s,g,o.items,F.Name)}}}go.callRef=pt;go.default=sf});var d_=ae(function($o){Object.defineProperty($o,"__esModule",{value:!0});var cf=ho(),df=c_(),uf=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",cf.default,df.default];$o.default=uf});var wo=ae(function(vo){Object.defineProperty(vo,"__esModule",{value:!0});var _t=Rt(),se=_t.operators,mt={maximum:{okStr:"<=",ok:se.LTE,fail:se.GT},minimum:{okStr:">=",ok:se.GTE,fail:se.LT},exclusiveMaximum:{okStr:"<",ok:se.LT,fail:se.GTE},exclusiveMinimum:{okStr:">",ok:se.GT,fail:se.LTE}},ff={message:({keyword:e,schemaCode:t})=>_t.str`must be ${mt[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>_t._`{comparison: ${mt[e].okStr}, limit: ${t}}`},hf={keyword:Object.keys(mt),type:"number",schemaType:"number",$data:!0,error:ff,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data(_t._`${r} ${mt[t].fail} ${n} || isNaN(${r})`)}};vo.default=hf});var bo=ae(function(Eo){Object.defineProperty(Eo,"__esModule",{value:!0});var Me=Rt(),mf={message:({schemaCode:e})=>Me.str`must be multiple of ${e}`,params:({schemaCode:e})=>Me._`{multipleOf: ${e}}`},gf={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:mf,code(e){let{gen:t,data:r,schemaCode:n,it:s}=e,o=s.opts.multipleOfPrecision,i=t.let("res"),a=o?Me._`Math.abs(Math.round(${i}) - ${i}) > 1e-${o}`:Me._`${i} !== parseInt(${i})`;e.fail$data(Me._`(${n} === 0 || (${i} = ${r}/${n}, ${a}))`)}};Eo.default=gf});var xo=ae(function(Po){Object.defineProperty(Po,"__esModule",{value:!0});function So(e){let t=e.length,r=0,n=0,s;while(n<t)if(r++,s=e.charCodeAt(n++),s>=55296&&s<=56319&&n<t){if(s=e.charCodeAt(n),(s&64512)===56320)n++}return r}Po.default=So;So.code='require("ajv/dist/runtime/ucs2length").default'});var Oo=ae(function(ko){Object.defineProperty(ko,"__esModule",{value:!0});var fe=Rt(),vf=nn(),wf=xo(),Ef={message({keyword:e,schemaCode:t}){return fe.str`must NOT have ${e==="maxLength"?"more":"fewer"} than ${t} characters`},params:({schemaCode:e})=>fe._`{limit: ${e}}`},bf={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Ef,code(e){let{keyword:t,data:r,schemaCode:n,it:s}=e,o=t==="maxLength"?fe.operators.GT:fe.operators.LT,i=s.opts.unicode===!1?fe._`${r}.length`:fe._`${vf.useFunc(e.gen,wf.default)}(${r})`;e.fail$data(fe._`${i} ${o} ${n}`)}};ko.default=bf});var Ro=ae(function(No){Object.defineProperty(No,"__esModule",{value:!0});var Pf=V(),kf=nn(),be=Rt(),Of={message:({schemaCode:e})=>be.str`must match pattern "${e}"`,params:({schemaCode:e})=>be._`{pattern: ${e}}`},Nf={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:Of,code(e){let{gen:t,data:r,$data:n,schema:s,schemaCode:o,it:i}=e,a=i.opts.unicodeRegExp?"u":"";if(n){let{regExp:c}=i.opts.code,d=c.code==="new RegExp"?be._`new RegExp`:kf.useFunc(t,c),u=t.let("valid");t.try(()=>t.assign(u,be._`${d}(${o}, ${a}).test(${r})`),()=>t.assign(u,!1)),e.fail$data(be._`!${u}`)}else{let c=Pf.usePattern(e,s);e.fail$data(be._`!${c}.test(${r})`)}}};No.default=Nf});var Io=ae(function(qo){Object.defineProperty(qo,"__esModule",{value:!0});var Fe=Rt(),qf={message({keyword:e,schemaCode:t}){return Fe.str`must NOT have ${e==="maxProperties"?"more":"fewer"} than ${t} properties`},params:({schemaCode:e})=>Fe._`{limit: ${e}}`},If={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:qf,code(e){let{keyword:t,data:r,schemaCode:n}=e,s=t==="maxProperties"?Fe.operators.GT:Fe.operators.LT;e.fail$data(Fe._`Object.keys(${r}).length ${s} ${n}`)}};qo.default=If});var jo=ae(function(To){Object.defineProperty(To,"__esModule",{value:!0});var ze=V(),Ve=Rt(),jf=nn(),Cf={message:({params:{missingProperty:e}})=>Ve.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>Ve._`{missingProperty: ${e}}`},Df={keyword:"required",type:"object",schemaType:"array",$data:!0,error:Cf,code(e){let{gen:t,schema:r,schemaCode:n,data:s,$data:o,it:i}=e,{opts:a}=i;if(!o&&r.length===0)return;let c=r.length>=a.loopRequired;if(i.allErrors)d();else u();if(a.strictRequired){let p=e.parentSchema.properties,{definedProperties:h}=e.it;for(let f of r)if((p===null||p===void 0?void 0:p[f])===void 0&&!h.has(f)){let m=i.schemaEnv.baseId+i.errSchemaPath,g=`required property "${f}" is not defined at "${m}" (strictRequired)`;jf.checkStrictMode(i,g,i.opts.strictRequired)}}function d(){if(c||o)e.block$data(Ve.nil,l);else for(let p of r)ze.checkReportMissingProp(e,p)}function u(){let p=t.let("missing");if(c||o){let h=t.let("valid",!0);e.block$data(h,()=>_(p,h)),e.ok(h)}else t.if(ze.checkMissingProp(e,r,p)),ze.reportMissingProp(e,p),t.else()}function l(){t.forOf("prop",n,(p)=>{e.setParams({missingProperty:p}),t.if(ze.noPropertyInData(t,s,p,a.ownProperties),()=>e.error())})}function _(p,h){e.setParams({missingProperty:p}),t.forOf(p,n,()=>{t.assign(h,ze.propertyInData(t,s,p,a.ownProperties)),t.if(Ve.not(h),()=>{e.error(),t.break()})},Ve.nil)}}};To.default=Df});var Do=ae(function(Co){Object.defineProperty(Co,"__esModule",{value:!0});var Ue=Rt(),Mf={message({keyword:e,schemaCode:t}){return Ue.str`must NOT have ${e==="maxItems"?"more":"fewer"} than ${t} items`},params:({schemaCode:e})=>Ue._`{limit: ${e}}`},Ff={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Mf,code(e){let{keyword:t,data:r,schemaCode:n}=e,s=t==="maxItems"?Ue.operators.GT:Ue.operators.LT;e.fail$data(Ue._`${r}.length ${s} ${n}`)}};Co.default=Ff});var gt=ae(function(Mo){Object.defineProperty(Mo,"__esModule",{value:!0});var Ao=Qt();Ao.code='require("ajv/dist/runtime/equal").default';Mo.default=Ao});var Vo=ae(function(Fo){Object.defineProperty(Fo,"__esModule",{value:!0});var yr=Ne(),q=Rt(),Uf=nn(),Kf=gt(),Hf={message:({params:{i:e,j:t}})=>q.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>q._`{i: ${e}, j: ${t}}`},Lf={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Hf,code(e){let{gen:t,data:r,$data:n,schema:s,parentSchema:o,schemaCode:i,it:a}=e;if(!n&&!s)return;let c=t.let("valid"),d=o.items?yr.getSchemaTypes(o.items):[];e.block$data(c,u,q._`${i} === false`),e.ok(c);function u(){let h=t.let("i",q._`${r}.length`),f=t.let("j");e.setParams({i:h,j:f}),t.assign(c,!0),t.if(q._`${h} > 1`,()=>(l()?_:p)(h,f))}function l(){return d.length>0&&!d.some((h)=>h==="object"||h==="array")}function _(h,f){let m=t.name("item"),g=yr.checkDataTypes(d,m,a.opts.strictNumbers,yr.DataType.Wrong),v=t.const("indices",q._`{}`);t.for(q._`;${h}--;`,()=>{if(t.let(m,q._`${r}[${h}]`),t.if(g,q._`continue`),d.length>1)t.if(q._`typeof ${m} == "string"`,q._`${m} += "_"`);t.if(q._`typeof ${v}[${m}] == "number"`,()=>{t.assign(f,q._`${v}[${m}]`),e.error(),t.assign(c,!1).break()}).code(q._`${v}[${m}] = ${h}`)})}function p(h,f){let m=Uf.useFunc(t,Kf.default),g=t.name("outer");t.label(g).for(q._`;${h}--;`,()=>t.for(q._`${f} = ${h}; ${f}--;`,()=>t.if(q._`${m}(${r}[${h}], ${r}[${f}])`,()=>{e.error(),t.assign(c,!1).break(g)})))}}};Fo.default=Lf});var Uo=ae(function(zo){Object.defineProperty(zo,"__esModule",{value:!0});var $r=Rt(),Jf=nn(),Bf=gt(),Wf={message:"must be equal to constant",params:({schemaCode:e})=>$r._`{allowedValue: ${e}}`},Qf={keyword:"const",$data:!0,error:Wf,code(e){let{gen:t,data:r,$data:n,schemaCode:s,schema:o}=e;if(n||o&&typeof o=="object")e.fail$data($r._`!${Jf.useFunc(t,Bf.default)}(${r}, ${s})`);else e.fail($r._`${o} !== ${r}`)}};zo.default=Qf});var Ho=ae(function(Ko){Object.defineProperty(Ko,"__esModule",{value:!0});var Ke=Rt(),Xf=nn(),Yf=gt(),eh={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>Ke._`{allowedValues: ${e}}`},th={keyword:"enum",schemaType:"array",$data:!0,error:eh,code(e){let{gen:t,data:r,$data:n,schema:s,schemaCode:o,it:i}=e;if(!n&&s.length===0)throw Error("enum must have non-empty array");let a=s.length>=i.opts.loopEnum,c,d=()=>c!==null&&c!==void 0?c:c=Xf.useFunc(t,Yf.default),u;if(a||n)u=t.let("valid"),e.block$data(u,l);else{if(!Array.isArray(s))throw Error("ajv implementation error");let p=t.const("vSchema",o);u=Ke.or(...s.map((h,f)=>_(p,f)))}e.pass(u);function l(){t.assign(u,!1),t.forOf("v",o,(p)=>t.if(Ke._`${d()}(${r}, ${p})`,()=>t.assign(u,!0).break()))}function _(p,h){let f=s[h];return typeof f==="object"&&f!==null?Ke._`${d()}(${r}, ${p}[${h}])`:Ke._`${r} === ${f}`}}};Ko.default=th});var u_=ae(function(Lo){Object.defineProperty(Lo,"__esModule",{value:!0});var nh=wo(),sh=bo(),oh=Oo(),ih=Ro(),ah=Io(),ch=jo(),dh=Do(),uh=Vo(),lh=Uo(),fh=Ho(),hh=[nh.default,sh.default,oh.default,ih.default,ah.default,ch.default,dh.default,uh.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},lh.default,fh.default];Lo.default=hh});var wr=ae(function(Jo){Object.defineProperty(Jo,"__esModule",{value:!0});Jo.validateAdditionalItems=void 0;var he=Rt(),vr=nn(),mh={message:({params:{len:e}})=>he.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>he._`{limit: ${e}}`},_h={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:mh,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){vr.checkStrictMode(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Go(e,n)}};function Go(e,t){let{gen:r,schema:n,data:s,keyword:o,it:i}=e;i.items=!0;let a=r.const("len",he._`${s}.length`);if(n===!1)e.setParams({len:t.length}),e.pass(he._`${a} <= ${t.length}`);else if(typeof n=="object"&&!vr.alwaysValidSchema(i,n)){let d=r.var("valid",he._`${a} <= ${t.length}`);r.if(he.not(d),()=>c(d)),e.ok(d)}function c(d){r.forRange("i",t.length,a,(u)=>{if(e.subschema({keyword:o,dataProp:u,dataPropType:vr.Type.Num},d),!i.allErrors)r.if(he.not(d),()=>r.break())})}}Jo.validateAdditionalItems=Go;Jo.default=_h});var Er=ae(function(Zo){Object.defineProperty(Zo,"__esModule",{value:!0});Zo.validateTuple=void 0;var Wo=Rt(),yt=nn(),yh=V(),$h={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return Qo(e,"additionalItems",t);if(r.items=!0,yt.alwaysValidSchema(r,t))return;e.ok(yh.validateArray(e))}};function Qo(e,t,r=e.schema){let{gen:n,parentSchema:s,data:o,keyword:i,it:a}=e;if(u(s),a.opts.unevaluated&&r.length&&a.items!==!0)a.items=yt.mergeEvaluated.items(n,r.length,a.items);let c=n.name("valid"),d=n.const("len",Wo._`${o}.length`);r.forEach((l,_)=>{if(yt.alwaysValidSchema(a,l))return;n.if(Wo._`${d} > ${_}`,()=>e.subschema({keyword:i,schemaProp:_,dataProp:_},c)),e.ok(c)});function u(l){let{opts:_,errSchemaPath:p}=a,h=r.length,f=h===l.minItems&&(h===l.maxItems||l[t]===!1);if(_.strictTuples&&!f){let m=`"${i}" is ${h}-tuple, but minItems or maxItems/${t} are not specified or different at path "${p}"`;yt.checkStrictMode(a,m,_.strictTuples)}}}Zo.validateTuple=Qo;Zo.default=$h});var ei=ae(function(Yo){Object.defineProperty(Yo,"__esModule",{value:!0});var wh=Er(),Eh={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:(e)=>wh.validateTuple(e,"items")};Yo.default=Eh});var ni=ae(function(ri){Object.defineProperty(ri,"__esModule",{value:!0});var ti=Rt(),Sh=nn(),Ph=V(),xh=wr(),kh={message:({params:{len:e}})=>ti.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>ti._`{limit: ${e}}`},Oh={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:kh,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:s}=r;if(n.items=!0,Sh.alwaysValidSchema(n,t))return;if(s)xh.validateAdditionalItems(e,s);else e.ok(Ph.validateArray(e))}};ri.default=Oh});var oi=ae(function(si){Object.defineProperty(si,"__esModule",{value:!0});var z=Rt(),$t=nn(),Rh={message:({params:{min:e,max:t}})=>t===void 0?z.str`must contain at least ${e} valid item(s)`:z.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?z._`{minContains: ${e}}`:z._`{minContains: ${e}, maxContains: ${t}}`},qh={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Rh,code(e){let{gen:t,schema:r,parentSchema:n,data:s,it:o}=e,i,a,{minContains:c,maxContains:d}=n;if(o.opts.next)i=c===void 0?1:c,a=d;else i=1;let u=t.const("len",z._`${s}.length`);if(e.setParams({min:i,max:a}),a===void 0&&i===0){$t.checkStrictMode(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&i>a){$t.checkStrictMode(o,'"minContains" > "maxContains" is always invalid'),e.fail();return}if($t.alwaysValidSchema(o,r)){let f=z._`${u} >= ${i}`;if(a!==void 0)f=z._`${f} && ${u} <= ${a}`;e.pass(f);return}o.items=!0;let l=t.name("valid");if(a===void 0&&i===1)p(l,()=>t.if(l,()=>t.break()));else if(i===0){if(t.let(l,!0),a!==void 0)t.if(z._`${s}.length > 0`,_)}else t.let(l,!1),_();e.result(l,()=>e.reset());function _(){let f=t.name("_valid"),m=t.let("count",0);p(f,()=>t.if(f,()=>h(m)))}function p(f,m){t.forRange("i",0,u,(g)=>{e.subschema({keyword:"contains",dataProp:g,dataPropType:$t.Type.Num,compositeRule:!0},f),m()})}function h(f){if(t.code(z._`${f}++`),a===void 0)t.if(z._`${f} >= ${i}`,()=>t.assign(l,!0).break());else if(t.if(z._`${f} > ${a}`,()=>t.assign(l,!1).break()),i===1)t.assign(l,!0);else t.if(z._`${f} >= ${i}`,()=>t.assign(l,!0))}}};si.default=qh});var h_=ae(function(ci){Object.defineProperty(ci,"__esModule",{value:!0});ci.validateSchemaDeps=ci.validatePropertyDeps=ci.error=void 0;var br=Rt(),Th=nn(),He=V();ci.error={message:({params:{property:e,depsCount:t,deps:r}})=>br.str`must have ${t===1?"property":"properties"} ${r} when property ${e} is present`,params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>br._`{property: ${e},
|
|
6
6
|
missingProperty: ${n},
|
|
7
7
|
depsCount: ${t},
|
|
8
|
-
deps: ${r}}`};var jh={keyword:"dependencies",type:"object",schemaType:"object",error:ci.error,code(e){let[t,r]=Ch(e);ii(e,t),ai(e,r)}};function Ch({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let s=Array.isArray(e[n])?t:r;s[n]=e[n]}return[t,r]}function ii(e,t=e.schema){let{gen:r,data:n,it:s}=e;if(Object.keys(t).length===0)return;let o=r.let("missing");for(let i in t){let a=t[i];if(a.length===0)continue;let c=He.propertyInData(r,n,i,s.opts.ownProperties);if(e.setParams({property:i,depsCount:a.length,deps:a.join(", ")}),s.allErrors)r.if(c,()=>{for(let d of a)He.checkReportMissingProp(e,d)});else r.if(br._`${c} && (${He.checkMissingProp(e,a,o)})`),He.reportMissingProp(e,o),r.else()}}ci.validatePropertyDeps=ii;function ai(e,t=e.schema){let{gen:r,data:n,keyword:s,it:o}=e,i=r.name("valid");for(let a in t){if(Th.alwaysValidSchema(o,t[a]))continue;r.if(He.propertyInData(r,n,a,o.opts.ownProperties),()=>{let c=e.subschema({keyword:s,schemaProp:a},i);e.mergeValidEvaluated(c,i)},()=>r.var(i,!0)),e.ok(i)}}ci.validateSchemaDeps=ai;ci.default=jh});var hi=ae(function(fi){Object.defineProperty(fi,"__esModule",{value:!0});var li=Rt(),Mh=nn(),Fh={message:"property name must be valid",params:({params:e})=>li._`{propertyName: ${e.propertyName}}`},Vh={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Fh,code(e){let{gen:t,schema:r,data:n,it:s}=e;if(Mh.alwaysValidSchema(s,r))return;let o=t.name("valid");t.forIn("key",n,(i)=>{e.setParams({propertyName:i}),e.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},o),t.if(li.not(o),()=>{if(e.error(!0),!s.allErrors)t.break()})}),e.ok(o)}};fi.default=Vh});var Sr=ae(function(pi){Object.defineProperty(pi,"__esModule",{value:!0});var vt=V(),G=Rt(),Uh=kl(),wt=nn(),Kh={message:"must NOT have additional properties",params:({params:e})=>G._`{additionalProperty: ${e.additionalProperty}}`},Hh={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Kh,code(e){let{gen:t,schema:r,parentSchema:n,data:s,errsCount:o,it:i}=e;if(!o)throw Error("ajv implementation error");let{allErrors:a,opts:c}=i;if(i.props=!0,c.removeAdditional!=="all"&&wt.alwaysValidSchema(i,r))return;let d=vt.allSchemaProperties(n.properties),u=vt.allSchemaProperties(n.patternProperties);l(),e.ok(G._`${o} === ${Uh.default.errors}`);function l(){t.forIn("key",s,(m)=>{if(!d.length&&!u.length)h(m);else t.if(_(m),()=>h(m))})}function _(m){let g;if(d.length>8){let v=wt.schemaRefOrVal(i,n.properties,"properties");g=vt.isOwnProperty(t,v,m)}else if(d.length)g=G.or(...d.map((v)=>G._`${m} === ${v}`));else g=G.nil;if(u.length)g=G.or(g,...u.map((v)=>G._`${vt.usePattern(e,v)}.test(${m})`));return G.not(g)}function p(m){t.code(G._`delete ${s}[${m}]`)}function h(m){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){p(m);return}if(r===!1){if(e.setParams({additionalProperty:m}),e.error(),!a)t.break();return}if(typeof r=="object"&&!wt.alwaysValidSchema(i,r)){let g=t.name("valid");if(c.removeAdditional==="failing")f(m,g,!1),t.if(G.not(g),()=>{e.reset(),p(m)});else if(f(m,g),!a)t.if(G.not(g),()=>t.break())}}function f(m,g,v){let S={keyword:"additionalProperties",dataProp:m,dataPropType:wt.Type.Str};if(v===!1)Object.assign(S,{compositeRule:!0,createErrors:!1,allErrors:!1});e.subschema(S,g)}}};pi.default=Hh});var yi=ae(function(gi){Object.defineProperty(gi,"__esModule",{value:!0});var Gh=wf(),_i=V(),Pr=nn(),mi=Sr(),Jh={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:s,it:o}=e;if(o.opts.removeAdditional==="all"&&n.additionalProperties===void 0)mi.default.code(new Gh.KeywordCxt(o,mi.default,"additionalProperties"));let i=_i.allSchemaProperties(r);for(let l of i)o.definedProperties.add(l);if(o.opts.unevaluated&&i.length&&o.props!==!0)o.props=Pr.mergeEvaluated.props(t,Pr.toHash(i),o.props);let a=i.filter((l)=>!Pr.alwaysValidSchema(o,r[l]));if(a.length===0)return;let c=t.name("valid");for(let l of a){if(d(l))u(l);else{if(t.if(_i.propertyInData(t,s,l,o.opts.ownProperties)),u(l),!o.allErrors)t.else().var(c,!0);t.endIf()}e.it.definedProperties.add(l),e.ok(c)}function d(l){return o.opts.useDefaults&&!o.compositeRule&&r[l].default!==void 0}function u(l){e.subschema({keyword:"properties",schemaProp:l,dataProp:l},c)}}};gi.default=Jh});var bi=ae(function(Ei){Object.defineProperty(Ei,"__esModule",{value:!0});var $i=V(),Et=Rt(),vi=nn(),wi=nn(),Wh={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:s,it:o}=e,{opts:i}=o,a=$i.allSchemaProperties(r),c=a.filter((f)=>vi.alwaysValidSchema(o,r[f]));if(a.length===0||c.length===a.length&&(!o.opts.unevaluated||o.props===!0))return;let d=i.strictSchema&&!i.allowMatchingProperties&&s.properties,u=t.name("valid");if(o.props!==!0&&!(o.props instanceof Et.Name))o.props=wi.evaluatedPropsToName(t,o.props);let{props:l}=o;_();function _(){for(let f of a){if(d)p(f);if(o.allErrors)h(f);else t.var(u,!0),h(f),t.if(u)}}function p(f){for(let m in d)if(new RegExp(f).test(m))vi.checkStrictMode(o,`property ${m} matches pattern ${f} (use allowMatchingProperties)`)}function h(f){t.forIn("key",n,(m)=>{t.if(Et._`${$i.usePattern(e,f)}.test(${m})`,()=>{let g=c.includes(f);if(!g)e.subschema({keyword:"patternProperties",schemaProp:f,dataProp:m,dataPropType:wi.Type.Str},u);if(o.opts.unevaluated&&l!==!0)t.assign(Et._`${l}[${m}]`,!0);else if(!g&&!o.allErrors)t.if(Et.not(u),()=>t.break())})})}}};Ei.default=Wh});var Pi=ae(function(Si){Object.defineProperty(Si,"__esModule",{value:!0});var Zh=nn(),Xh={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if(Zh.alwaysValidSchema(n,r)){e.fail();return}let s=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),e.failResult(s,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};Si.default=Xh});var ki=ae(function(xi){Object.defineProperty(xi,"__esModule",{value:!0});var ep=V(),tp={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:ep.validateUnion,error:{message:"must match a schema in anyOf"}};xi.default=tp});var Ni=ae(function(Oi){Object.defineProperty(Oi,"__esModule",{value:!0});var bt=Rt(),np=nn(),sp={message:"must match exactly one schema in oneOf",params:({params:e})=>bt._`{passingSchemas: ${e.passing}}`},op={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:sp,code(e){let{gen:t,schema:r,parentSchema:n,it:s}=e;if(!Array.isArray(r))throw Error("ajv implementation error");if(s.opts.discriminator&&n.discriminator)return;let o=r,i=t.let("valid",!1),a=t.let("passing",null),c=t.name("_valid");e.setParams({passing:a}),t.block(d),e.result(i,()=>e.reset(),()=>e.error(!0));function d(){o.forEach((u,l)=>{let _;if(np.alwaysValidSchema(s,u))t.var(c,!0);else _=e.subschema({keyword:"oneOf",schemaProp:l,compositeRule:!0},c);if(l>0)t.if(bt._`${c} && ${i}`).assign(i,!1).assign(a,bt._`[${a}, ${l}]`).else();t.if(c,()=>{if(t.assign(i,!0),t.assign(a,l),_)e.mergeEvaluated(_,bt.Name)})})}}};Oi.default=op});var qi=ae(function(Ri){Object.defineProperty(Ri,"__esModule",{value:!0});var ap=nn(),cp={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw Error("ajv implementation error");let s=t.name("valid");r.forEach((o,i)=>{if(ap.alwaysValidSchema(n,o))return;let a=e.subschema({keyword:"allOf",schemaProp:i},s);e.ok(s),e.mergeEvaluated(a)})}};Ri.default=cp});var Ci=ae(function(ji){Object.defineProperty(ji,"__esModule",{value:!0});var St=Rt(),Ti=nn(),up={message:({params:e})=>St.str`must match "${e.ifClause}" schema`,params:({params:e})=>St._`{failingKeyword: ${e.ifClause}}`},lp={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:up,code(e){let{gen:t,parentSchema:r,it:n}=e;if(r.then===void 0&&r.else===void 0)Ti.checkStrictMode(n,'"if" without "then" and "else" is ignored');let s=Ii(n,"then"),o=Ii(n,"else");if(!s&&!o)return;let i=t.let("valid",!0),a=t.name("_valid");if(c(),e.reset(),s&&o){let u=t.let("ifClause");e.setParams({ifClause:u}),t.if(a,d("then",u),d("else",u))}else if(s)t.if(a,d("then"));else t.if(St.not(a),d("else"));e.pass(i,()=>e.error(!0));function c(){let u=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(u)}function d(u,l){return()=>{let _=e.subschema({keyword:u},a);if(t.assign(i,a),e.mergeValidEvaluated(_,i),l)t.assign(l,St._`${u}`);else e.setParams({ifClause:u})}}}};function Ii(e,t){let r=e.schema[t];return r!==void 0&&!Ti.alwaysValidSchema(e,r)}ji.default=lp});var Ai=ae(function(Di){Object.defineProperty(Di,"__esModule",{value:!0});var hp=nn(),pp={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){if(t.if===void 0)hp.checkStrictMode(r,`"${e}" without "if" is ignored`)}};Di.default=pp});var u_=ae(function(Mi){Object.defineProperty(Mi,"__esModule",{value:!0});var _p=wr(),gp=ei(),yp=Er(),$p=ni(),vp=oi(),wp=d_(),Ep=hi(),bp=Sr(),Sp=yi(),Pp=bi(),xp=Pi(),kp=ki(),Op=Ni(),Np=qi(),Rp=Ci(),qp=Ai();function Ip(e=!1){let t=[xp.default,kp.default,Op.default,Np.default,Rp.default,qp.default,Ep.default,bp.default,wp.default,Sp.default,Pp.default];if(e)t.push(gp.default,$p.default);else t.push(_p.default,yp.default);return t.push(vp.default),t}Mi.default=Ip});var Vi=ae(function(Fi){Object.defineProperty(Fi,"__esModule",{value:!0});var R=Rt(),jp={message:({schemaCode:e})=>R.str`must match format "${e}"`,params:({schemaCode:e})=>R._`{format: ${e}}`},Cp={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:jp,code(e,t){let{gen:r,data:n,$data:s,schema:o,schemaCode:i,it:a}=e,{opts:c,errSchemaPath:d,schemaEnv:u,self:l}=a;if(!c.validateFormats)return;if(s)_();else p();function _(){let h=r.scopeValue("formats",{ref:l.formats,code:c.code.formats}),f=r.const("fDef",R._`${h}[${i}]`),m=r.let("fType"),g=r.let("format");r.if(R._`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>r.assign(m,R._`${f}.type || "string"`).assign(g,R._`${f}.validate`),()=>r.assign(m,R._`"string"`).assign(g,f)),e.fail$data(R.or(v(),S()));function v(){if(c.strictSchema===!1)return R.nil;return R._`${i} && !${g}`}function S(){let k=u.$async?R._`(${f}.async ? await ${g}(${n}) : ${g}(${n}))`:R._`${g}(${n})`,E=R._`(typeof ${g} == "function" ? ${k} : ${g}.test(${n}))`;return R._`${g} && ${g} !== true && ${m} === ${t} && !${E}`}}function p(){let h=l.formats[o];if(!h){v();return}if(h===!0)return;let[f,m,g]=S(h);if(f===t)e.pass(k());function v(){if(c.strictSchema===!1){l.logger.warn(E());return}throw Error(E());function E(){return`unknown format "${o}" ignored in schema at path "${d}"`}}function S(E){let J=E instanceof RegExp?R.regexpCode(E):c.code.formats?R._`${c.code.formats}${R.getProperty(o)}`:void 0,W=r.scopeValue("formats",{key:o,ref:E,code:J});if(typeof E=="object"&&!(E instanceof RegExp))return[E.type||"string",E.validate,R._`${W}.validate`];return["string",E,W]}function k(){if(typeof h=="object"&&!(h instanceof RegExp)&&h.async){if(!u.$async)throw Error("async format in sync schema");return R._`await ${g}(${n})`}return typeof m=="function"?R._`${g}(${n})`:R._`${g}.test(${n})`}}}};Fi.default=Cp});var h_=ae(function(zi){Object.defineProperty(zi,"__esModule",{value:!0});var Ap=Vi(),Mp=[Ap.default];zi.default=Mp});var p_=ae(function(Ui){Object.defineProperty(Ui,"__esModule",{value:!0});Ui.contentVocabulary=Ui.metadataVocabulary=void 0;Ui.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Ui.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});
|
|
9
|
-
export{Rt,nn,
|
|
8
|
+
deps: ${r}}`};var jh={keyword:"dependencies",type:"object",schemaType:"object",error:ci.error,code(e){let[t,r]=Ch(e);ii(e,t),ai(e,r)}};function Ch({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let s=Array.isArray(e[n])?t:r;s[n]=e[n]}return[t,r]}function ii(e,t=e.schema){let{gen:r,data:n,it:s}=e;if(Object.keys(t).length===0)return;let o=r.let("missing");for(let i in t){let a=t[i];if(a.length===0)continue;let c=He.propertyInData(r,n,i,s.opts.ownProperties);if(e.setParams({property:i,depsCount:a.length,deps:a.join(", ")}),s.allErrors)r.if(c,()=>{for(let d of a)He.checkReportMissingProp(e,d)});else r.if(br._`${c} && (${He.checkMissingProp(e,a,o)})`),He.reportMissingProp(e,o),r.else()}}ci.validatePropertyDeps=ii;function ai(e,t=e.schema){let{gen:r,data:n,keyword:s,it:o}=e,i=r.name("valid");for(let a in t){if(Th.alwaysValidSchema(o,t[a]))continue;r.if(He.propertyInData(r,n,a,o.opts.ownProperties),()=>{let c=e.subschema({keyword:s,schemaProp:a},i);e.mergeValidEvaluated(c,i)},()=>r.var(i,!0)),e.ok(i)}}ci.validateSchemaDeps=ai;ci.default=jh});var hi=ae(function(fi){Object.defineProperty(fi,"__esModule",{value:!0});var li=Rt(),Mh=nn(),Fh={message:"property name must be valid",params:({params:e})=>li._`{propertyName: ${e.propertyName}}`},Vh={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Fh,code(e){let{gen:t,schema:r,data:n,it:s}=e;if(Mh.alwaysValidSchema(s,r))return;let o=t.name("valid");t.forIn("key",n,(i)=>{e.setParams({propertyName:i}),e.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},o),t.if(li.not(o),()=>{if(e.error(!0),!s.allErrors)t.break()})}),e.ok(o)}};fi.default=Vh});var Sr=ae(function(pi){Object.defineProperty(pi,"__esModule",{value:!0});var vt=V(),G=Rt(),Uh=Sl(),wt=nn(),Kh={message:"must NOT have additional properties",params:({params:e})=>G._`{additionalProperty: ${e.additionalProperty}}`},Hh={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Kh,code(e){let{gen:t,schema:r,parentSchema:n,data:s,errsCount:o,it:i}=e;if(!o)throw Error("ajv implementation error");let{allErrors:a,opts:c}=i;if(i.props=!0,c.removeAdditional!=="all"&&wt.alwaysValidSchema(i,r))return;let d=vt.allSchemaProperties(n.properties),u=vt.allSchemaProperties(n.patternProperties);l(),e.ok(G._`${o} === ${Uh.default.errors}`);function l(){t.forIn("key",s,(m)=>{if(!d.length&&!u.length)h(m);else t.if(_(m),()=>h(m))})}function _(m){let g;if(d.length>8){let v=wt.schemaRefOrVal(i,n.properties,"properties");g=vt.isOwnProperty(t,v,m)}else if(d.length)g=G.or(...d.map((v)=>G._`${m} === ${v}`));else g=G.nil;if(u.length)g=G.or(g,...u.map((v)=>G._`${vt.usePattern(e,v)}.test(${m})`));return G.not(g)}function p(m){t.code(G._`delete ${s}[${m}]`)}function h(m){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){p(m);return}if(r===!1){if(e.setParams({additionalProperty:m}),e.error(),!a)t.break();return}if(typeof r=="object"&&!wt.alwaysValidSchema(i,r)){let g=t.name("valid");if(c.removeAdditional==="failing")f(m,g,!1),t.if(G.not(g),()=>{e.reset(),p(m)});else if(f(m,g),!a)t.if(G.not(g),()=>t.break())}}function f(m,g,v){let S={keyword:"additionalProperties",dataProp:m,dataPropType:wt.Type.Str};if(v===!1)Object.assign(S,{compositeRule:!0,createErrors:!1,allErrors:!1});e.subschema(S,g)}}};pi.default=Hh});var yi=ae(function(gi){Object.defineProperty(gi,"__esModule",{value:!0});var Gh=xf(),_i=V(),Pr=nn(),mi=Sr(),Jh={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:s,it:o}=e;if(o.opts.removeAdditional==="all"&&n.additionalProperties===void 0)mi.default.code(new Gh.KeywordCxt(o,mi.default,"additionalProperties"));let i=_i.allSchemaProperties(r);for(let l of i)o.definedProperties.add(l);if(o.opts.unevaluated&&i.length&&o.props!==!0)o.props=Pr.mergeEvaluated.props(t,Pr.toHash(i),o.props);let a=i.filter((l)=>!Pr.alwaysValidSchema(o,r[l]));if(a.length===0)return;let c=t.name("valid");for(let l of a){if(d(l))u(l);else{if(t.if(_i.propertyInData(t,s,l,o.opts.ownProperties)),u(l),!o.allErrors)t.else().var(c,!0);t.endIf()}e.it.definedProperties.add(l),e.ok(c)}function d(l){return o.opts.useDefaults&&!o.compositeRule&&r[l].default!==void 0}function u(l){e.subschema({keyword:"properties",schemaProp:l,dataProp:l},c)}}};gi.default=Jh});var bi=ae(function(Ei){Object.defineProperty(Ei,"__esModule",{value:!0});var $i=V(),Et=Rt(),vi=nn(),wi=nn(),Wh={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:s,it:o}=e,{opts:i}=o,a=$i.allSchemaProperties(r),c=a.filter((f)=>vi.alwaysValidSchema(o,r[f]));if(a.length===0||c.length===a.length&&(!o.opts.unevaluated||o.props===!0))return;let d=i.strictSchema&&!i.allowMatchingProperties&&s.properties,u=t.name("valid");if(o.props!==!0&&!(o.props instanceof Et.Name))o.props=wi.evaluatedPropsToName(t,o.props);let{props:l}=o;_();function _(){for(let f of a){if(d)p(f);if(o.allErrors)h(f);else t.var(u,!0),h(f),t.if(u)}}function p(f){for(let m in d)if(new RegExp(f).test(m))vi.checkStrictMode(o,`property ${m} matches pattern ${f} (use allowMatchingProperties)`)}function h(f){t.forIn("key",n,(m)=>{t.if(Et._`${$i.usePattern(e,f)}.test(${m})`,()=>{let g=c.includes(f);if(!g)e.subschema({keyword:"patternProperties",schemaProp:f,dataProp:m,dataPropType:wi.Type.Str},u);if(o.opts.unevaluated&&l!==!0)t.assign(Et._`${l}[${m}]`,!0);else if(!g&&!o.allErrors)t.if(Et.not(u),()=>t.break())})})}}};Ei.default=Wh});var Pi=ae(function(Si){Object.defineProperty(Si,"__esModule",{value:!0});var Zh=nn(),Xh={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if(Zh.alwaysValidSchema(n,r)){e.fail();return}let s=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),e.failResult(s,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};Si.default=Xh});var ki=ae(function(xi){Object.defineProperty(xi,"__esModule",{value:!0});var ep=V(),tp={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:ep.validateUnion,error:{message:"must match a schema in anyOf"}};xi.default=tp});var Ni=ae(function(Oi){Object.defineProperty(Oi,"__esModule",{value:!0});var bt=Rt(),np=nn(),sp={message:"must match exactly one schema in oneOf",params:({params:e})=>bt._`{passingSchemas: ${e.passing}}`},op={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:sp,code(e){let{gen:t,schema:r,parentSchema:n,it:s}=e;if(!Array.isArray(r))throw Error("ajv implementation error");if(s.opts.discriminator&&n.discriminator)return;let o=r,i=t.let("valid",!1),a=t.let("passing",null),c=t.name("_valid");e.setParams({passing:a}),t.block(d),e.result(i,()=>e.reset(),()=>e.error(!0));function d(){o.forEach((u,l)=>{let _;if(np.alwaysValidSchema(s,u))t.var(c,!0);else _=e.subschema({keyword:"oneOf",schemaProp:l,compositeRule:!0},c);if(l>0)t.if(bt._`${c} && ${i}`).assign(i,!1).assign(a,bt._`[${a}, ${l}]`).else();t.if(c,()=>{if(t.assign(i,!0),t.assign(a,l),_)e.mergeEvaluated(_,bt.Name)})})}}};Oi.default=op});var qi=ae(function(Ri){Object.defineProperty(Ri,"__esModule",{value:!0});var ap=nn(),cp={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw Error("ajv implementation error");let s=t.name("valid");r.forEach((o,i)=>{if(ap.alwaysValidSchema(n,o))return;let a=e.subschema({keyword:"allOf",schemaProp:i},s);e.ok(s),e.mergeEvaluated(a)})}};Ri.default=cp});var Ci=ae(function(ji){Object.defineProperty(ji,"__esModule",{value:!0});var St=Rt(),Ti=nn(),up={message:({params:e})=>St.str`must match "${e.ifClause}" schema`,params:({params:e})=>St._`{failingKeyword: ${e.ifClause}}`},lp={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:up,code(e){let{gen:t,parentSchema:r,it:n}=e;if(r.then===void 0&&r.else===void 0)Ti.checkStrictMode(n,'"if" without "then" and "else" is ignored');let s=Ii(n,"then"),o=Ii(n,"else");if(!s&&!o)return;let i=t.let("valid",!0),a=t.name("_valid");if(c(),e.reset(),s&&o){let u=t.let("ifClause");e.setParams({ifClause:u}),t.if(a,d("then",u),d("else",u))}else if(s)t.if(a,d("then"));else t.if(St.not(a),d("else"));e.pass(i,()=>e.error(!0));function c(){let u=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(u)}function d(u,l){return()=>{let _=e.subschema({keyword:u},a);if(t.assign(i,a),e.mergeValidEvaluated(_,i),l)t.assign(l,St._`${u}`);else e.setParams({ifClause:u})}}}};function Ii(e,t){let r=e.schema[t];return r!==void 0&&!Ti.alwaysValidSchema(e,r)}ji.default=lp});var Ai=ae(function(Di){Object.defineProperty(Di,"__esModule",{value:!0});var hp=nn(),pp={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){if(t.if===void 0)hp.checkStrictMode(r,`"${e}" without "if" is ignored`)}};Di.default=pp});var p_=ae(function(Mi){Object.defineProperty(Mi,"__esModule",{value:!0});var _p=wr(),gp=ei(),yp=Er(),$p=ni(),vp=oi(),wp=h_(),Ep=hi(),bp=Sr(),Sp=yi(),Pp=bi(),xp=Pi(),kp=ki(),Op=Ni(),Np=qi(),Rp=Ci(),qp=Ai();function Ip(e=!1){let t=[xp.default,kp.default,Op.default,Np.default,Rp.default,qp.default,Ep.default,bp.default,wp.default,Sp.default,Pp.default];if(e)t.push(gp.default,$p.default);else t.push(_p.default,yp.default);return t.push(vp.default),t}Mi.default=Ip});var Vi=ae(function(Fi){Object.defineProperty(Fi,"__esModule",{value:!0});var R=Rt(),jp={message:({schemaCode:e})=>R.str`must match format "${e}"`,params:({schemaCode:e})=>R._`{format: ${e}}`},Cp={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:jp,code(e,t){let{gen:r,data:n,$data:s,schema:o,schemaCode:i,it:a}=e,{opts:c,errSchemaPath:d,schemaEnv:u,self:l}=a;if(!c.validateFormats)return;if(s)_();else p();function _(){let h=r.scopeValue("formats",{ref:l.formats,code:c.code.formats}),f=r.const("fDef",R._`${h}[${i}]`),m=r.let("fType"),g=r.let("format");r.if(R._`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>r.assign(m,R._`${f}.type || "string"`).assign(g,R._`${f}.validate`),()=>r.assign(m,R._`"string"`).assign(g,f)),e.fail$data(R.or(v(),S()));function v(){if(c.strictSchema===!1)return R.nil;return R._`${i} && !${g}`}function S(){let k=u.$async?R._`(${f}.async ? await ${g}(${n}) : ${g}(${n}))`:R._`${g}(${n})`,E=R._`(typeof ${g} == "function" ? ${k} : ${g}.test(${n}))`;return R._`${g} && ${g} !== true && ${m} === ${t} && !${E}`}}function p(){let h=l.formats[o];if(!h){v();return}if(h===!0)return;let[f,m,g]=S(h);if(f===t)e.pass(k());function v(){if(c.strictSchema===!1){l.logger.warn(E());return}throw Error(E());function E(){return`unknown format "${o}" ignored in schema at path "${d}"`}}function S(E){let J=E instanceof RegExp?R.regexpCode(E):c.code.formats?R._`${c.code.formats}${R.getProperty(o)}`:void 0,W=r.scopeValue("formats",{key:o,ref:E,code:J});if(typeof E=="object"&&!(E instanceof RegExp))return[E.type||"string",E.validate,R._`${W}.validate`];return["string",E,W]}function k(){if(typeof h=="object"&&!(h instanceof RegExp)&&h.async){if(!u.$async)throw Error("async format in sync schema");return R._`await ${g}(${n})`}return typeof m=="function"?R._`${g}(${n})`:R._`${g}.test(${n})`}}}};Fi.default=Cp});var f_=ae(function(zi){Object.defineProperty(zi,"__esModule",{value:!0});var Ap=Vi(),Mp=[Ap.default];zi.default=Mp});var m_=ae(function(Ui){Object.defineProperty(Ui,"__esModule",{value:!0});Ui.contentVocabulary=Ui.metadataVocabulary=void 0;Ui.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Ui.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});
|
|
9
|
+
export{Rt,nn,Sl,xf,Mg,_f,By,l_,c_,d_,u_,h_,p_,f_,m_,g_};
|
|
10
10
|
|
|
11
|
-
//# debugId=
|
|
12
|
-
//# sourceMappingURL=studio-
|
|
11
|
+
//# debugId=9120A5AB94D6D08164756E2164756E21
|
|
12
|
+
//# sourceMappingURL=studio-0sqdhnew.js.map
|