@vuebro/runtime 1.4.5 → 1.4.7
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/.vite/manifest.json +1 -1
- package/dist/assets/index-oZL5W5_J.js +421 -0
- package/dist/assets/katex-B59jf8CD.js +261 -0
- package/dist/assets/markdown-9kbgniO_.js +198 -0
- package/dist/assets/{mermaid-DJVpeobB.js → mermaid-BQWZaxT1.js} +47 -47
- package/dist/assets/{shared-DYMeITve.js → shared-BFoVrTaH.js} +6 -6
- package/dist/index.html +5 -4
- package/package.json +18 -20
- package/dist/assets/index-25FGs_Dd.js +0 -421
- package/dist/assets/markdown-CcsMulzT.js +0 -63
- /package/dist/assets/{loader-sfc.esm-browser.prod-2.4.2.js → loader-sfc.esm-browser.prod-2.4.4.js} +0 -0
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import{c as Xn,r as Yn,g as Wt}from"./markdown-CcsMulzT.js";import{computed as nr,toRef as Nn,toRefs as Zn,reactive as On,ref as xn,watch as Tn}from"vue";var jt={exports:{}},sr;function es(){return sr||(sr=1,(function(e){(function(){var t,c=0,o=[],f;for(f=0;f<256;f++)o[f]=(f+256).toString(16).substr(1);h.BUFFER_SIZE=4096,h.bin=u,h.clearBuffer=function(){t=null,c=0},h.test=function(_){return typeof _=="string"?/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(_):!1};var n;typeof crypto<"u"?n=crypto:typeof window<"u"&&typeof window.msCrypto<"u"&&(n=window.msCrypto),typeof Xn=="function"?(n=n||Yn,e.exports=h):typeof window<"u"&&(window.uuid=h),h.randomBytes=(function(){if(n){if(n.randomBytes)return n.randomBytes;if(n.getRandomValues)return typeof Uint8Array.prototype.slice!="function"?function(_){var s=new Uint8Array(_);return n.getRandomValues(s),Array.from(s)}:function(_){var s=new Uint8Array(_);return n.getRandomValues(s),s}}return function(_){var s,S=[];for(s=0;s<_;s++)S.push(Math.floor(Math.random()*256));return S}})();function m(_){return(!t||c+_>h.BUFFER_SIZE)&&(c=0,t=h.randomBytes(h.BUFFER_SIZE)),t.slice(c,c+=_)}function u(){var _=m(16);return _[6]=_[6]&15|64,_[8]=_[8]&63|128,_}function h(){var _=u();return o[_[0]]+o[_[1]]+o[_[2]]+o[_[3]]+"-"+o[_[4]]+o[_[5]]+"-"+o[_[6]]+o[_[7]]+"-"+o[_[8]]+o[_[9]]+"-"+o[_[10]]+o[_[11]]+o[_[12]]+o[_[13]]+o[_[14]]+o[_[15]]}})()})(jt)),jt.exports}var ts=es();const zt=Wt(ts),or=!0,ir=(e,t)=>[...e].reverse().map(c=>({node:c,parent:t,siblings:e})),rs=(e,{branch:t="branch",children:c="children",id:o="id",index:f="index",next:n="next",parent:m="parent",prev:u="prev",siblings:h="siblings"}={})=>{const _={[t]:{get(){const g=[this];for(;g[0]?.[m];)g.unshift(g[0][m]);return g}},[f]:{get(){return this[h].findIndex(g=>this[o]===g[o])}},[n]:{get(){return this[h][this[f]+1]}},[u]:{get(){return this[h][this[f]-1]}}},s=function*(g){const b=ir(g.value);for(;b.length;){const{node:a,parent:d,siblings:r}=b.pop()??{};a&&(a[m]!==d&&Object.defineProperty(a,m,{configurable:or,value:d}),a[h]!==r&&Object.defineProperty(a,h,{configurable:or,value:r}),Object.keys(_).some(l=>!(l in a))&&Object.defineProperties(a,_),yield a,b.push(...ir(a[c]??[],a)))}},S=nr(()=>[...s(Nn(e))]),$=nr(()=>Object.fromEntries(S.value.map(g=>[g[o],g]))),v=(g,b)=>{const a=$.value[g];if(a){const[d]=S.value,r=a[f],l=a[n],w=r+1,i=a[m],y=a[u],E=r-1,O=a[h];switch(b){case"add":{const C=zt();return O.splice(w,0,{[o]:C}),C}case"addChild":{const C=zt();return Array.isArray(a[c])||(a[c]=[]),a[c].unshift({[o]:C}),C}case"down":r<O.length-1&&O[r]&&O[w]&&([O[r],O[w]]=[O[w],O[r]]);break;case"left":if(i?.[m])return i[h].splice(i[f]+1,0,...O.splice(r,1)),i[o];break;case"remove":{const C=l?.[o]??y?.[o]??i?.[o]??d?.[o];return O.splice(r,1),C}case"right":if(y){const C=y[c]??[],M=y[o];return y[c]=[...C,...O.splice(r,1)],M}break;case"up":r&&O[r]&&O[E]&&([O[E],O[r]]=[O[r],O[E]]);break}}};return{add:g=>v(g,"add"),addChild:g=>v(g,"addChild"),down:g=>v(g,"down"),kvNodes:$,left:g=>v(g,"left"),nodes:S,remove:g=>v(g,"remove"),right:g=>v(g,"right"),up:g=>v(g,"up")}};var ke={exports:{}},Nt={},me={},we={},Ot={},Tt={},kt={},ar;function gt(){return ar||(ar=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class c extends t{constructor(r){if(super(),!e.IDENTIFIER.test(r))throw new Error("CodeGen: name must be a valid identifier");this.str=r}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=c;class o extends t{constructor(r){super(),this._items=typeof r=="string"?[r]:r}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const r=this._items[0];return r===""||r==='""'}get str(){var r;return(r=this._str)!==null&&r!==void 0?r:this._str=this._items.reduce((l,w)=>`${l}${w}`,"")}get names(){var r;return(r=this._names)!==null&&r!==void 0?r:this._names=this._items.reduce((l,w)=>(w instanceof c&&(l[w.str]=(l[w.str]||0)+1),l),{})}}e._Code=o,e.nil=new o("");function f(d,...r){const l=[d[0]];let w=0;for(;w<r.length;)u(l,r[w]),l.push(d[++w]);return new o(l)}e._=f;const n=new o("+");function m(d,...r){const l=[v(d[0])];let w=0;for(;w<r.length;)l.push(n),u(l,r[w]),l.push(n,v(d[++w]));return h(l),new o(l)}e.str=m;function u(d,r){r instanceof o?d.push(...r._items):r instanceof c?d.push(r):d.push(S(r))}e.addCodeArg=u;function h(d){let r=1;for(;r<d.length-1;){if(d[r]===n){const l=_(d[r-1],d[r+1]);if(l!==void 0){d.splice(r-1,3,l);continue}d[r++]="+"}r++}}function _(d,r){if(r==='""')return d;if(d==='""')return r;if(typeof d=="string")return r instanceof c||d[d.length-1]!=='"'?void 0:typeof r!="string"?`${d.slice(0,-1)}${r}"`:r[0]==='"'?d.slice(0,-1)+r.slice(1):void 0;if(typeof r=="string"&&r[0]==='"'&&!(d instanceof c))return`"${d}${r.slice(1)}`}function s(d,r){return r.emptyStr()?d:d.emptyStr()?r:m`${d}${r}`}e.strConcat=s;function S(d){return typeof d=="number"||typeof d=="boolean"||d===null?d:v(Array.isArray(d)?d.join(","):d)}function $(d){return new o(v(d))}e.stringify=$;function v(d){return JSON.stringify(d).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=v;function g(d){return typeof d=="string"&&e.IDENTIFIER.test(d)?new o(`.${d}`):f`[${d}]`}e.getProperty=g;function b(d){if(typeof d=="string"&&e.IDENTIFIER.test(d))return new o(`${d}`);throw new Error(`CodeGen: invalid export name: ${d}, use explicit $id name mapping`)}e.getEsmExportName=b;function a(d){return new o(d.toString())}e.regexpCode=a})(kt)),kt}var qt={},ur;function cr(){return ur||(ur=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=gt();class c extends Error{constructor(_){super(`CodeGen: "code" for ${_} not defined`),this.value=_.value}}var o;(function(h){h[h.Started=0]="Started",h[h.Completed=1]="Completed"})(o||(e.UsedValueState=o={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class f{constructor({prefixes:_,parent:s}={}){this._names={},this._prefixes=_,this._parent=s}toName(_){return _ instanceof t.Name?_:this.name(_)}name(_){return new t.Name(this._newName(_))}_newName(_){const s=this._names[_]||this._nameGroup(_);return`${_}${s.index++}`}_nameGroup(_){var s,S;if(!((S=(s=this._parent)===null||s===void 0?void 0:s._prefixes)===null||S===void 0)&&S.has(_)||this._prefixes&&!this._prefixes.has(_))throw new Error(`CodeGen: prefix "${_}" is not allowed in this scope`);return this._names[_]={prefix:_,index:0}}}e.Scope=f;class n extends t.Name{constructor(_,s){super(s),this.prefix=_}setValue(_,{property:s,itemIndex:S}){this.value=_,this.scopePath=(0,t._)`.${new t.Name(s)}[${S}]`}}e.ValueScopeName=n;const m=(0,t._)`\n`;class u extends f{constructor(_){super(_),this._values={},this._scope=_.scope,this.opts={..._,_n:_.lines?m:t.nil}}get(){return this._scope}name(_){return new n(_,this._newName(_))}value(_,s){var S;if(s.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const $=this.toName(_),{prefix:v}=$,g=(S=s.key)!==null&&S!==void 0?S:s.ref;let b=this._values[v];if(b){const r=b.get(g);if(r)return r}else b=this._values[v]=new Map;b.set(g,$);const a=this._scope[v]||(this._scope[v]=[]),d=a.length;return a[d]=s.ref,$.setValue(s,{property:v,itemIndex:d}),$}getValue(_,s){const S=this._values[_];if(S)return S.get(s)}scopeRefs(_,s=this._values){return this._reduceValues(s,S=>{if(S.scopePath===void 0)throw new Error(`CodeGen: name "${S}" has no value`);return(0,t._)`${_}${S.scopePath}`})}scopeCode(_=this._values,s,S){return this._reduceValues(_,$=>{if($.value===void 0)throw new Error(`CodeGen: name "${$}" has no value`);return $.value.code},s,S)}_reduceValues(_,s,S={},$){let v=t.nil;for(const g in _){const b=_[g];if(!b)continue;const a=S[g]=S[g]||new Map;b.forEach(d=>{if(a.has(d))return;a.set(d,o.Started);let r=s(d);if(r){const l=this.opts.es5?e.varKinds.var:e.varKinds.const;v=(0,t._)`${v}${l} ${d} = ${r};${this.opts._n}`}else if(r=$?.(d))v=(0,t._)`${v}${r}${this.opts._n}`;else throw new c(d);a.set(d,o.Completed)})}return v}}e.ValueScope=u})(qt)),qt}var lr;function J(){return lr||(lr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=gt(),c=cr();var o=gt();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return o.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return o.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return o.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return o.Name}});var f=cr();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return f.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return f.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return f.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return f.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class n{optimizeNodes(){return this}optimizeNames(p,P){return this}}class m extends n{constructor(p,P,k){super(),this.varKind=p,this.name=P,this.rhs=k}render({es5:p,_n:P}){const k=p?c.varKinds.var:this.varKind,L=this.rhs===void 0?"":` = ${this.rhs}`;return`${k} ${this.name}${L};`+P}optimizeNames(p,P){if(p[this.name.str])return this.rhs&&(this.rhs=W(this.rhs,p,P)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class u extends n{constructor(p,P,k){super(),this.lhs=p,this.rhs=P,this.sideEffects=k}render({_n:p}){return`${this.lhs} = ${this.rhs};`+p}optimizeNames(p,P){if(!(this.lhs instanceof t.Name&&!p[this.lhs.str]&&!this.sideEffects))return this.rhs=W(this.rhs,p,P),this}get names(){const p=this.lhs instanceof t.Name?{}:{...this.lhs.names};return z(p,this.rhs)}}class h extends u{constructor(p,P,k,L){super(p,k,L),this.op=P}render({_n:p}){return`${this.lhs} ${this.op}= ${this.rhs};`+p}}class _ extends n{constructor(p){super(),this.label=p,this.names={}}render({_n:p}){return`${this.label}:`+p}}class s extends n{constructor(p){super(),this.label=p,this.names={}}render({_n:p}){return`break${this.label?` ${this.label}`:""};`+p}}class S extends n{constructor(p){super(),this.error=p}render({_n:p}){return`throw ${this.error};`+p}get names(){return this.error.names}}class $ extends n{constructor(p){super(),this.code=p}render({_n:p}){return`${this.code};`+p}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(p,P){return this.code=W(this.code,p,P),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class v extends n{constructor(p=[]){super(),this.nodes=p}render(p){return this.nodes.reduce((P,k)=>P+k.render(p),"")}optimizeNodes(){const{nodes:p}=this;let P=p.length;for(;P--;){const k=p[P].optimizeNodes();Array.isArray(k)?p.splice(P,1,...k):k?p[P]=k:p.splice(P,1)}return p.length>0?this:void 0}optimizeNames(p,P){const{nodes:k}=this;let L=k.length;for(;L--;){const U=k[L];U.optimizeNames(p,P)||(x(p,U.names),k.splice(L,1))}return k.length>0?this:void 0}get names(){return this.nodes.reduce((p,P)=>K(p,P.names),{})}}class g extends v{render(p){return"{"+p._n+super.render(p)+"}"+p._n}}class b extends v{}class a extends g{}a.kind="else";class d extends g{constructor(p,P){super(P),this.condition=p}render(p){let P=`if(${this.condition})`+super.render(p);return this.else&&(P+="else "+this.else.render(p)),P}optimizeNodes(){super.optimizeNodes();const p=this.condition;if(p===!0)return this.nodes;let P=this.else;if(P){const k=P.optimizeNodes();P=this.else=Array.isArray(k)?new a(k):k}if(P)return p===!1?P instanceof d?P:P.nodes:this.nodes.length?this:new d(he(p),P instanceof d?[P]:P.nodes);if(!(p===!1||!this.nodes.length))return this}optimizeNames(p,P){var k;if(this.else=(k=this.else)===null||k===void 0?void 0:k.optimizeNames(p,P),!!(super.optimizeNames(p,P)||this.else))return this.condition=W(this.condition,p,P),this}get names(){const p=super.names;return z(p,this.condition),this.else&&K(p,this.else.names),p}}d.kind="if";class r extends g{}r.kind="for";class l extends r{constructor(p){super(),this.iteration=p}render(p){return`for(${this.iteration})`+super.render(p)}optimizeNames(p,P){if(super.optimizeNames(p,P))return this.iteration=W(this.iteration,p,P),this}get names(){return K(super.names,this.iteration.names)}}class w extends r{constructor(p,P,k,L){super(),this.varKind=p,this.name=P,this.from=k,this.to=L}render(p){const P=p.es5?c.varKinds.var:this.varKind,{name:k,from:L,to:U}=this;return`for(${P} ${k}=${L}; ${k}<${U}; ${k}++)`+super.render(p)}get names(){const p=z(super.names,this.from);return z(p,this.to)}}class i extends r{constructor(p,P,k,L){super(),this.loop=p,this.varKind=P,this.name=k,this.iterable=L}render(p){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(p)}optimizeNames(p,P){if(super.optimizeNames(p,P))return this.iterable=W(this.iterable,p,P),this}get names(){return K(super.names,this.iterable.names)}}class y extends g{constructor(p,P,k){super(),this.name=p,this.args=P,this.async=k}render(p){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(p)}}y.kind="func";class E extends v{render(p){return"return "+super.render(p)}}E.kind="return";class O extends g{render(p){let P="try"+super.render(p);return this.catch&&(P+=this.catch.render(p)),this.finally&&(P+=this.finally.render(p)),P}optimizeNodes(){var p,P;return super.optimizeNodes(),(p=this.catch)===null||p===void 0||p.optimizeNodes(),(P=this.finally)===null||P===void 0||P.optimizeNodes(),this}optimizeNames(p,P){var k,L;return super.optimizeNames(p,P),(k=this.catch)===null||k===void 0||k.optimizeNames(p,P),(L=this.finally)===null||L===void 0||L.optimizeNames(p,P),this}get names(){const p=super.names;return this.catch&&K(p,this.catch.names),this.finally&&K(p,this.finally.names),p}}class C extends g{constructor(p){super(),this.error=p}render(p){return`catch(${this.error})`+super.render(p)}}C.kind="catch";class M extends g{render(p){return"finally"+super.render(p)}}M.kind="finally";class V{constructor(p,P={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...P,_n:P.lines?`
|
|
2
|
-
`:""},this._extScope=p,this._scope=new c.Scope({parent:p}),this._nodes=[new b]}toString(){return this._root.render(this.opts)}name(p){return this._scope.name(p)}scopeName(p){return this._extScope.name(p)}scopeValue(p,P){const k=this._extScope.value(p,P);return(this._values[k.prefix]||(this._values[k.prefix]=new Set)).add(k),k}getScopeValue(p,P){return this._extScope.getValue(p,P)}scopeRefs(p){return this._extScope.scopeRefs(p,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(p,P,k,L){const U=this._scope.toName(P);return k!==void 0&&L&&(this._constants[U.str]=k),this._leafNode(new m(p,U,k)),U}const(p,P,k){return this._def(c.varKinds.const,p,P,k)}let(p,P,k){return this._def(c.varKinds.let,p,P,k)}var(p,P,k){return this._def(c.varKinds.var,p,P,k)}assign(p,P,k){return this._leafNode(new u(p,P,k))}add(p,P){return this._leafNode(new h(p,e.operators.ADD,P))}code(p){return typeof p=="function"?p():p!==t.nil&&this._leafNode(new $(p)),this}object(...p){const P=["{"];for(const[k,L]of p)P.length>1&&P.push(","),P.push(k),(k!==L||this.opts.es5)&&(P.push(":"),(0,t.addCodeArg)(P,L));return P.push("}"),new t._Code(P)}if(p,P,k){if(this._blockNode(new d(p)),P&&k)this.code(P).else().code(k).endIf();else if(P)this.code(P).endIf();else if(k)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(p){return this._elseNode(new d(p))}else(){return this._elseNode(new a)}endIf(){return this._endBlockNode(d,a)}_for(p,P){return this._blockNode(p),P&&this.code(P).endFor(),this}for(p,P){return this._for(new l(p),P)}forRange(p,P,k,L,U=this.opts.es5?c.varKinds.var:c.varKinds.let){const X=this._scope.toName(p);return this._for(new w(U,X,P,k),()=>L(X))}forOf(p,P,k,L=c.varKinds.const){const U=this._scope.toName(p);if(this.opts.es5){const X=P instanceof t.Name?P:this.var("_arr",P);return this.forRange("_i",0,(0,t._)`${X}.length`,B=>{this.var(U,(0,t._)`${X}[${B}]`),k(U)})}return this._for(new i("of",L,U,P),()=>k(U))}forIn(p,P,k,L=this.opts.es5?c.varKinds.var:c.varKinds.const){if(this.opts.ownProperties)return this.forOf(p,(0,t._)`Object.keys(${P})`,k);const U=this._scope.toName(p);return this._for(new i("in",L,U,P),()=>k(U))}endFor(){return this._endBlockNode(r)}label(p){return this._leafNode(new _(p))}break(p){return this._leafNode(new s(p))}return(p){const P=new E;if(this._blockNode(P),this.code(p),P.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(E)}try(p,P,k){if(!P&&!k)throw new Error('CodeGen: "try" without "catch" and "finally"');const L=new O;if(this._blockNode(L),this.code(p),P){const U=this.name("e");this._currNode=L.catch=new C(U),P(U)}return k&&(this._currNode=L.finally=new M,this.code(k)),this._endBlockNode(C,M)}throw(p){return this._leafNode(new S(p))}block(p,P){return this._blockStarts.push(this._nodes.length),p&&this.code(p).endBlock(P),this}endBlock(p){const P=this._blockStarts.pop();if(P===void 0)throw new Error("CodeGen: not in self-balancing block");const k=this._nodes.length-P;if(k<0||p!==void 0&&k!==p)throw new Error(`CodeGen: wrong number of nodes: ${k} vs ${p} expected`);return this._nodes.length=P,this}func(p,P=t.nil,k,L){return this._blockNode(new y(p,P,k)),L&&this.code(L).endFunc(),this}endFunc(){return this._endBlockNode(y)}optimize(p=1){for(;p-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(p){return this._currNode.nodes.push(p),this}_blockNode(p){this._currNode.nodes.push(p),this._nodes.push(p)}_endBlockNode(p,P){const k=this._currNode;if(k instanceof p||P&&k instanceof P)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${P?`${p.kind}/${P.kind}`:p.kind}"`)}_elseNode(p){const P=this._currNode;if(!(P instanceof d))throw new Error('CodeGen: "else" without "if"');return this._currNode=P.else=p,this}get _root(){return this._nodes[0]}get _currNode(){const p=this._nodes;return p[p.length-1]}set _currNode(p){const P=this._nodes;P[P.length-1]=p}}e.CodeGen=V;function K(T,p){for(const P in p)T[P]=(T[P]||0)+(p[P]||0);return T}function z(T,p){return p instanceof t._CodeOrName?K(T,p.names):T}function W(T,p,P){if(T instanceof t.Name)return k(T);if(!L(T))return T;return new t._Code(T._items.reduce((U,X)=>(X instanceof t.Name&&(X=k(X)),X instanceof t._Code?U.push(...X._items):U.push(X),U),[]));function k(U){const X=P[U.str];return X===void 0||p[U.str]!==1?U:(delete p[U.str],X)}function L(U){return U instanceof t._Code&&U._items.some(X=>X instanceof t.Name&&p[X.str]===1&&P[X.str]!==void 0)}}function x(T,p){for(const P in p)T[P]=(T[P]||0)-(p[P]||0)}function he(T){return typeof T=="boolean"||typeof T=="number"||T===null?!T:(0,t._)`!${I(T)}`}e.not=he;const pe=j(e.operators.AND);function Z(...T){return T.reduce(pe)}e.and=Z;const _e=j(e.operators.OR);function A(...T){return T.reduce(_e)}e.or=A;function j(T){return(p,P)=>p===t.nil?P:P===t.nil?p:(0,t._)`${I(p)} ${T} ${I(P)}`}function I(T){return T instanceof t.Name?T:(0,t._)`(${T})`}})(Tt)),Tt}var H={},dr;function Q(){if(dr)return H;dr=1,Object.defineProperty(H,"__esModule",{value:!0}),H.checkStrictMode=H.getErrorPath=H.Type=H.useFunc=H.setEvaluated=H.evaluatedPropsToName=H.mergeEvaluated=H.eachItem=H.unescapeJsonPointer=H.escapeJsonPointer=H.escapeFragment=H.unescapeFragment=H.schemaRefOrVal=H.schemaHasRulesButRef=H.schemaHasRules=H.checkUnknownRules=H.alwaysValidSchema=H.toHash=void 0;const e=J(),t=gt();function c(i){const y={};for(const E of i)y[E]=!0;return y}H.toHash=c;function o(i,y){return typeof y=="boolean"?y:Object.keys(y).length===0?!0:(f(i,y),!n(y,i.self.RULES.all))}H.alwaysValidSchema=o;function f(i,y=i.schema){const{opts:E,self:O}=i;if(!E.strictSchema||typeof y=="boolean")return;const C=O.RULES.keywords;for(const M in y)C[M]||w(i,`unknown keyword: "${M}"`)}H.checkUnknownRules=f;function n(i,y){if(typeof i=="boolean")return!i;for(const E in i)if(y[E])return!0;return!1}H.schemaHasRules=n;function m(i,y){if(typeof i=="boolean")return!i;for(const E in i)if(E!=="$ref"&&y.all[E])return!0;return!1}H.schemaHasRulesButRef=m;function u({topSchemaRef:i,schemaPath:y},E,O,C){if(!C){if(typeof E=="number"||typeof E=="boolean")return E;if(typeof E=="string")return(0,e._)`${E}`}return(0,e._)`${i}${y}${(0,e.getProperty)(O)}`}H.schemaRefOrVal=u;function h(i){return S(decodeURIComponent(i))}H.unescapeFragment=h;function _(i){return encodeURIComponent(s(i))}H.escapeFragment=_;function s(i){return typeof i=="number"?`${i}`:i.replace(/~/g,"~0").replace(/\//g,"~1")}H.escapeJsonPointer=s;function S(i){return i.replace(/~1/g,"/").replace(/~0/g,"~")}H.unescapeJsonPointer=S;function $(i,y){if(Array.isArray(i))for(const E of i)y(E);else y(i)}H.eachItem=$;function v({mergeNames:i,mergeToName:y,mergeValues:E,resultToName:O}){return(C,M,V,K)=>{const z=V===void 0?M:V instanceof e.Name?(M instanceof e.Name?i(C,M,V):y(C,M,V),V):M instanceof e.Name?(y(C,V,M),M):E(M,V);return K===e.Name&&!(z instanceof e.Name)?O(C,z):z}}H.mergeEvaluated={props:v({mergeNames:(i,y,E)=>i.if((0,e._)`${E} !== true && ${y} !== undefined`,()=>{i.if((0,e._)`${y} === true`,()=>i.assign(E,!0),()=>i.assign(E,(0,e._)`${E} || {}`).code((0,e._)`Object.assign(${E}, ${y})`))}),mergeToName:(i,y,E)=>i.if((0,e._)`${E} !== true`,()=>{y===!0?i.assign(E,!0):(i.assign(E,(0,e._)`${E} || {}`),b(i,E,y))}),mergeValues:(i,y)=>i===!0?!0:{...i,...y},resultToName:g}),items:v({mergeNames:(i,y,E)=>i.if((0,e._)`${E} !== true && ${y} !== undefined`,()=>i.assign(E,(0,e._)`${y} === true ? true : ${E} > ${y} ? ${E} : ${y}`)),mergeToName:(i,y,E)=>i.if((0,e._)`${E} !== true`,()=>i.assign(E,y===!0?!0:(0,e._)`${E} > ${y} ? ${E} : ${y}`)),mergeValues:(i,y)=>i===!0?!0:Math.max(i,y),resultToName:(i,y)=>i.var("items",y)})};function g(i,y){if(y===!0)return i.var("props",!0);const E=i.var("props",(0,e._)`{}`);return y!==void 0&&b(i,E,y),E}H.evaluatedPropsToName=g;function b(i,y,E){Object.keys(E).forEach(O=>i.assign((0,e._)`${y}${(0,e.getProperty)(O)}`,!0))}H.setEvaluated=b;const a={};function d(i,y){return i.scopeValue("func",{ref:y,code:a[y.code]||(a[y.code]=new t._Code(y.code))})}H.useFunc=d;var r;(function(i){i[i.Num=0]="Num",i[i.Str=1]="Str"})(r||(H.Type=r={}));function l(i,y,E){if(i instanceof e.Name){const O=y===r.Num;return E?O?(0,e._)`"[" + ${i} + "]"`:(0,e._)`"['" + ${i} + "']"`:O?(0,e._)`"/" + ${i}`:(0,e._)`"/" + ${i}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return E?(0,e.getProperty)(i).toString():"/"+s(i)}H.getErrorPath=l;function w(i,y,E=i.opts.strictSchema){if(E){if(y=`strict mode: ${y}`,E===!0)throw new Error(y);i.self.logger.warn(y)}}return H.checkStrictMode=w,H}var qe={},fr;function $e(){if(fr)return qe;fr=1,Object.defineProperty(qe,"__esModule",{value:!0});const e=J(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return qe.default=t,qe}var hr;function $t(){return hr||(hr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=J(),c=Q(),o=$e();e.keywordError={message:({keyword:a})=>(0,t.str)`must pass "${a}" keyword validation`},e.keyword$DataError={message:({keyword:a,schemaType:d})=>d?(0,t.str)`"${a}" keyword must be ${d} ($data)`:(0,t.str)`"${a}" keyword is invalid ($data)`};function f(a,d=e.keywordError,r,l){const{it:w}=a,{gen:i,compositeRule:y,allErrors:E}=w,O=S(a,d,r);l??(y||E)?h(i,O):_(w,(0,t._)`[${O}]`)}e.reportError=f;function n(a,d=e.keywordError,r){const{it:l}=a,{gen:w,compositeRule:i,allErrors:y}=l,E=S(a,d,r);h(w,E),i||y||_(l,o.default.vErrors)}e.reportExtraError=n;function m(a,d){a.assign(o.default.errors,d),a.if((0,t._)`${o.default.vErrors} !== null`,()=>a.if(d,()=>a.assign((0,t._)`${o.default.vErrors}.length`,d),()=>a.assign(o.default.vErrors,null)))}e.resetErrorsCount=m;function u({gen:a,keyword:d,schemaValue:r,data:l,errsCount:w,it:i}){if(w===void 0)throw new Error("ajv implementation error");const y=a.name("err");a.forRange("i",w,o.default.errors,E=>{a.const(y,(0,t._)`${o.default.vErrors}[${E}]`),a.if((0,t._)`${y}.instancePath === undefined`,()=>a.assign((0,t._)`${y}.instancePath`,(0,t.strConcat)(o.default.instancePath,i.errorPath))),a.assign((0,t._)`${y}.schemaPath`,(0,t.str)`${i.errSchemaPath}/${d}`),i.opts.verbose&&(a.assign((0,t._)`${y}.schema`,r),a.assign((0,t._)`${y}.data`,l))})}e.extendErrors=u;function h(a,d){const r=a.const("err",d);a.if((0,t._)`${o.default.vErrors} === null`,()=>a.assign(o.default.vErrors,(0,t._)`[${r}]`),(0,t._)`${o.default.vErrors}.push(${r})`),a.code((0,t._)`${o.default.errors}++`)}function _(a,d){const{gen:r,validateName:l,schemaEnv:w}=a;w.$async?r.throw((0,t._)`new ${a.ValidationError}(${d})`):(r.assign((0,t._)`${l}.errors`,d),r.return(!1))}const s={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function S(a,d,r){const{createErrors:l}=a.it;return l===!1?(0,t._)`{}`:$(a,d,r)}function $(a,d,r={}){const{gen:l,it:w}=a,i=[v(w,r),g(a,r)];return b(a,d,i),l.object(...i)}function v({errorPath:a},{instancePath:d}){const r=d?(0,t.str)`${a}${(0,c.getErrorPath)(d,c.Type.Str)}`:a;return[o.default.instancePath,(0,t.strConcat)(o.default.instancePath,r)]}function g({keyword:a,it:{errSchemaPath:d}},{schemaPath:r,parentSchema:l}){let w=l?d:(0,t.str)`${d}/${a}`;return r&&(w=(0,t.str)`${w}${(0,c.getErrorPath)(r,c.Type.Str)}`),[s.schemaPath,w]}function b(a,{params:d,message:r},l){const{keyword:w,data:i,schemaValue:y,it:E}=a,{opts:O,propertyName:C,topSchemaRef:M,schemaPath:V}=E;l.push([s.keyword,w],[s.params,typeof d=="function"?d(a):d||(0,t._)`{}`]),O.messages&&l.push([s.message,typeof r=="function"?r(a):r]),O.verbose&&l.push([s.schema,y],[s.parentSchema,(0,t._)`${M}${V}`],[o.default.data,i]),C&&l.push([s.propertyName,C])}})(Ot)),Ot}var pr;function ns(){if(pr)return we;pr=1,Object.defineProperty(we,"__esModule",{value:!0}),we.boolOrEmptySchema=we.topBoolOrEmptySchema=void 0;const e=$t(),t=J(),c=$e(),o={message:"boolean schema is false"};function f(u){const{gen:h,schema:_,validateName:s}=u;_===!1?m(u,!1):typeof _=="object"&&_.$async===!0?h.return(c.default.data):(h.assign((0,t._)`${s}.errors`,null),h.return(!0))}we.topBoolOrEmptySchema=f;function n(u,h){const{gen:_,schema:s}=u;s===!1?(_.var(h,!1),m(u)):_.var(h,!0)}we.boolOrEmptySchema=n;function m(u,h){const{gen:_,data:s}=u,S={gen:_,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:u};(0,e.reportError)(S,o,void 0,h)}return we}var re={},be={},mr;function kn(){if(mr)return be;mr=1,Object.defineProperty(be,"__esModule",{value:!0}),be.getRules=be.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function c(f){return typeof f=="string"&&t.has(f)}be.isJSONType=c;function o(){const f={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...f,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},f.number,f.string,f.array,f.object],post:{rules:[]},all:{},keywords:{}}}return be.getRules=o,be}var ye={},yr;function qn(){if(yr)return ye;yr=1,Object.defineProperty(ye,"__esModule",{value:!0}),ye.shouldUseRule=ye.shouldUseGroup=ye.schemaHasRulesForType=void 0;function e({schema:o,self:f},n){const m=f.RULES.types[n];return m&&m!==!0&&t(o,m)}ye.schemaHasRulesForType=e;function t(o,f){return f.rules.some(n=>c(o,n))}ye.shouldUseGroup=t;function c(o,f){var n;return o[f.keyword]!==void 0||((n=f.definition.implements)===null||n===void 0?void 0:n.some(m=>o[m]!==void 0))}return ye.shouldUseRule=c,ye}var gr;function _t(){if(gr)return re;gr=1,Object.defineProperty(re,"__esModule",{value:!0}),re.reportTypeError=re.checkDataTypes=re.checkDataType=re.coerceAndCheckDataType=re.getJSONTypes=re.getSchemaTypes=re.DataType=void 0;const e=kn(),t=qn(),c=$t(),o=J(),f=Q();var n;(function(r){r[r.Correct=0]="Correct",r[r.Wrong=1]="Wrong"})(n||(re.DataType=n={}));function m(r){const l=u(r.type);if(l.includes("null")){if(r.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!l.length&&r.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');r.nullable===!0&&l.push("null")}return l}re.getSchemaTypes=m;function u(r){const l=Array.isArray(r)?r:r?[r]:[];if(l.every(e.isJSONType))return l;throw new Error("type must be JSONType or JSONType[]: "+l.join(","))}re.getJSONTypes=u;function h(r,l){const{gen:w,data:i,opts:y}=r,E=s(l,y.coerceTypes),O=l.length>0&&!(E.length===0&&l.length===1&&(0,t.schemaHasRulesForType)(r,l[0]));if(O){const C=g(l,i,y.strictNumbers,n.Wrong);w.if(C,()=>{E.length?S(r,l,E):a(r)})}return O}re.coerceAndCheckDataType=h;const _=new Set(["string","number","integer","boolean","null"]);function s(r,l){return l?r.filter(w=>_.has(w)||l==="array"&&w==="array"):[]}function S(r,l,w){const{gen:i,data:y,opts:E}=r,O=i.let("dataType",(0,o._)`typeof ${y}`),C=i.let("coerced",(0,o._)`undefined`);E.coerceTypes==="array"&&i.if((0,o._)`${O} == 'object' && Array.isArray(${y}) && ${y}.length == 1`,()=>i.assign(y,(0,o._)`${y}[0]`).assign(O,(0,o._)`typeof ${y}`).if(g(l,y,E.strictNumbers),()=>i.assign(C,y))),i.if((0,o._)`${C} !== undefined`);for(const V of w)(_.has(V)||V==="array"&&E.coerceTypes==="array")&&M(V);i.else(),a(r),i.endIf(),i.if((0,o._)`${C} !== undefined`,()=>{i.assign(y,C),$(r,C)});function M(V){switch(V){case"string":i.elseIf((0,o._)`${O} == "number" || ${O} == "boolean"`).assign(C,(0,o._)`"" + ${y}`).elseIf((0,o._)`${y} === null`).assign(C,(0,o._)`""`);return;case"number":i.elseIf((0,o._)`${O} == "boolean" || ${y} === null
|
|
1
|
+
import{c as Xn,r as Yn,g as Wt}from"./markdown-9kbgniO_.js";import{computed as nr,toRef as Nn,toRefs as Zn,reactive as On,ref as xn,watch as Tn}from"vue";var jt={exports:{}},sr;function es(){return sr||(sr=1,(function(e){(function(){var t,c=0,o=[],f;for(f=0;f<256;f++)o[f]=(f+256).toString(16).substr(1);p.BUFFER_SIZE=4096,p.bin=u,p.clearBuffer=function(){t=null,c=0},p.test=function(_){return typeof _=="string"?/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(_):!1};var n;typeof crypto<"u"?n=crypto:typeof window<"u"&&typeof window.msCrypto<"u"&&(n=window.msCrypto),typeof Xn=="function"?(n=n||Yn,e.exports=p):typeof window<"u"&&(window.uuid=p),p.randomBytes=(function(){if(n){if(n.randomBytes)return n.randomBytes;if(n.getRandomValues)return typeof Uint8Array.prototype.slice!="function"?function(_){var s=new Uint8Array(_);return n.getRandomValues(s),Array.from(s)}:function(_){var s=new Uint8Array(_);return n.getRandomValues(s),s}}return function(_){var s,S=[];for(s=0;s<_;s++)S.push(Math.floor(Math.random()*256));return S}})();function m(_){return(!t||c+_>p.BUFFER_SIZE)&&(c=0,t=p.randomBytes(p.BUFFER_SIZE)),t.slice(c,c+=_)}function u(){var _=m(16);return _[6]=_[6]&15|64,_[8]=_[8]&63|128,_}function p(){var _=u();return o[_[0]]+o[_[1]]+o[_[2]]+o[_[3]]+"-"+o[_[4]]+o[_[5]]+"-"+o[_[6]]+o[_[7]]+"-"+o[_[8]]+o[_[9]]+"-"+o[_[10]]+o[_[11]]+o[_[12]]+o[_[13]]+o[_[14]]+o[_[15]]}})()})(jt)),jt.exports}var ts=es();const zt=Wt(ts),or=!0,ir=(e,t)=>[...e].reverse().map(c=>({node:c,parent:t,siblings:e})),rs=(e,{branch:t="branch",children:c="children",id:o="id",index:f="index",next:n="next",parent:m="parent",prev:u="prev",siblings:p="siblings"}={})=>{const _={[t]:{get(){const g=[this];for(;g[0]?.[m];)g.unshift(g[0][m]);return g}},[f]:{get(){return this[p].findIndex(g=>this[o]===g[o])}},[n]:{get(){return this[p][this[f]+1]}},[u]:{get(){return this[p][this[f]-1]}}},s=function*(g){const b=ir(g.value);for(;b.length;){const{node:a,parent:d,siblings:r}=b.pop()??{};a&&(a[m]!==d&&Object.defineProperty(a,m,{configurable:or,value:d}),a[p]!==r&&Object.defineProperty(a,p,{configurable:or,value:r}),Object.keys(_).some(l=>!(l in a))&&Object.defineProperties(a,_),yield a,b.push(...ir(a[c]??[],a)))}},S=nr(()=>[...s(Nn(e))]),$=nr(()=>Object.fromEntries(S.value.map(g=>[g[o],g]))),v=(g,b)=>{const a=$.value[g];if(a){const[d]=S.value,r=a[f],l=a[n],w=r+1,i=a[m],y=a[u],E=r-1,O=a[p];switch(b){case"add":{const C=zt();return O.splice(w,0,{[o]:C}),C}case"addChild":{const C=zt();return Array.isArray(a[c])||(a[c]=[]),a[c].unshift({[o]:C}),C}case"down":r<O.length-1&&O[r]&&O[w]&&([O[r],O[w]]=[O[w],O[r]]);break;case"left":if(i?.[m])return i[p].splice(i[f]+1,0,...O.splice(r,1)),i[o];break;case"remove":{const C=l?.[o]??y?.[o]??i?.[o]??d?.[o];return O.splice(r,1),C}case"right":if(y){const C=y[c]??[],M=y[o];return y[c]=[...C,...O.splice(r,1)],M}break;case"up":r&&O[r]&&O[E]&&([O[E],O[r]]=[O[r],O[E]]);break}}};return{add:g=>v(g,"add"),addChild:g=>v(g,"addChild"),down:g=>v(g,"down"),kvNodes:$,left:g=>v(g,"left"),nodes:S,remove:g=>v(g,"remove"),right:g=>v(g,"right"),up:g=>v(g,"up")}};var ke={exports:{}},Nt={},me={},we={},Ot={},Tt={},kt={},ar;function gt(){return ar||(ar=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class c extends t{constructor(r){if(super(),!e.IDENTIFIER.test(r))throw new Error("CodeGen: name must be a valid identifier");this.str=r}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=c;class o extends t{constructor(r){super(),this._items=typeof r=="string"?[r]:r}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const r=this._items[0];return r===""||r==='""'}get str(){var r;return(r=this._str)!==null&&r!==void 0?r:this._str=this._items.reduce((l,w)=>`${l}${w}`,"")}get names(){var r;return(r=this._names)!==null&&r!==void 0?r:this._names=this._items.reduce((l,w)=>(w instanceof c&&(l[w.str]=(l[w.str]||0)+1),l),{})}}e._Code=o,e.nil=new o("");function f(d,...r){const l=[d[0]];let w=0;for(;w<r.length;)u(l,r[w]),l.push(d[++w]);return new o(l)}e._=f;const n=new o("+");function m(d,...r){const l=[v(d[0])];let w=0;for(;w<r.length;)l.push(n),u(l,r[w]),l.push(n,v(d[++w]));return p(l),new o(l)}e.str=m;function u(d,r){r instanceof o?d.push(...r._items):r instanceof c?d.push(r):d.push(S(r))}e.addCodeArg=u;function p(d){let r=1;for(;r<d.length-1;){if(d[r]===n){const l=_(d[r-1],d[r+1]);if(l!==void 0){d.splice(r-1,3,l);continue}d[r++]="+"}r++}}function _(d,r){if(r==='""')return d;if(d==='""')return r;if(typeof d=="string")return r instanceof c||d[d.length-1]!=='"'?void 0:typeof r!="string"?`${d.slice(0,-1)}${r}"`:r[0]==='"'?d.slice(0,-1)+r.slice(1):void 0;if(typeof r=="string"&&r[0]==='"'&&!(d instanceof c))return`"${d}${r.slice(1)}`}function s(d,r){return r.emptyStr()?d:d.emptyStr()?r:m`${d}${r}`}e.strConcat=s;function S(d){return typeof d=="number"||typeof d=="boolean"||d===null?d:v(Array.isArray(d)?d.join(","):d)}function $(d){return new o(v(d))}e.stringify=$;function v(d){return JSON.stringify(d).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=v;function g(d){return typeof d=="string"&&e.IDENTIFIER.test(d)?new o(`.${d}`):f`[${d}]`}e.getProperty=g;function b(d){if(typeof d=="string"&&e.IDENTIFIER.test(d))return new o(`${d}`);throw new Error(`CodeGen: invalid export name: ${d}, use explicit $id name mapping`)}e.getEsmExportName=b;function a(d){return new o(d.toString())}e.regexpCode=a})(kt)),kt}var qt={},ur;function cr(){return ur||(ur=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=gt();class c extends Error{constructor(_){super(`CodeGen: "code" for ${_} not defined`),this.value=_.value}}var o;(function(p){p[p.Started=0]="Started",p[p.Completed=1]="Completed"})(o||(e.UsedValueState=o={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class f{constructor({prefixes:_,parent:s}={}){this._names={},this._prefixes=_,this._parent=s}toName(_){return _ instanceof t.Name?_:this.name(_)}name(_){return new t.Name(this._newName(_))}_newName(_){const s=this._names[_]||this._nameGroup(_);return`${_}${s.index++}`}_nameGroup(_){var s,S;if(!((S=(s=this._parent)===null||s===void 0?void 0:s._prefixes)===null||S===void 0)&&S.has(_)||this._prefixes&&!this._prefixes.has(_))throw new Error(`CodeGen: prefix "${_}" is not allowed in this scope`);return this._names[_]={prefix:_,index:0}}}e.Scope=f;class n extends t.Name{constructor(_,s){super(s),this.prefix=_}setValue(_,{property:s,itemIndex:S}){this.value=_,this.scopePath=(0,t._)`.${new t.Name(s)}[${S}]`}}e.ValueScopeName=n;const m=(0,t._)`\n`;class u extends f{constructor(_){super(_),this._values={},this._scope=_.scope,this.opts={..._,_n:_.lines?m:t.nil}}get(){return this._scope}name(_){return new n(_,this._newName(_))}value(_,s){var S;if(s.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const $=this.toName(_),{prefix:v}=$,g=(S=s.key)!==null&&S!==void 0?S:s.ref;let b=this._values[v];if(b){const r=b.get(g);if(r)return r}else b=this._values[v]=new Map;b.set(g,$);const a=this._scope[v]||(this._scope[v]=[]),d=a.length;return a[d]=s.ref,$.setValue(s,{property:v,itemIndex:d}),$}getValue(_,s){const S=this._values[_];if(S)return S.get(s)}scopeRefs(_,s=this._values){return this._reduceValues(s,S=>{if(S.scopePath===void 0)throw new Error(`CodeGen: name "${S}" has no value`);return(0,t._)`${_}${S.scopePath}`})}scopeCode(_=this._values,s,S){return this._reduceValues(_,$=>{if($.value===void 0)throw new Error(`CodeGen: name "${$}" has no value`);return $.value.code},s,S)}_reduceValues(_,s,S={},$){let v=t.nil;for(const g in _){const b=_[g];if(!b)continue;const a=S[g]=S[g]||new Map;b.forEach(d=>{if(a.has(d))return;a.set(d,o.Started);let r=s(d);if(r){const l=this.opts.es5?e.varKinds.var:e.varKinds.const;v=(0,t._)`${v}${l} ${d} = ${r};${this.opts._n}`}else if(r=$?.(d))v=(0,t._)`${v}${r}${this.opts._n}`;else throw new c(d);a.set(d,o.Completed)})}return v}}e.ValueScope=u})(qt)),qt}var lr;function J(){return lr||(lr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=gt(),c=cr();var o=gt();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return o.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return o.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return o.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return o.Name}});var f=cr();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return f.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return f.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return f.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return f.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class n{optimizeNodes(){return this}optimizeNames(h,P){return this}}class m extends n{constructor(h,P,k){super(),this.varKind=h,this.name=P,this.rhs=k}render({es5:h,_n:P}){const k=h?c.varKinds.var:this.varKind,L=this.rhs===void 0?"":` = ${this.rhs}`;return`${k} ${this.name}${L};`+P}optimizeNames(h,P){if(h[this.name.str])return this.rhs&&(this.rhs=W(this.rhs,h,P)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class u extends n{constructor(h,P,k){super(),this.lhs=h,this.rhs=P,this.sideEffects=k}render({_n:h}){return`${this.lhs} = ${this.rhs};`+h}optimizeNames(h,P){if(!(this.lhs instanceof t.Name&&!h[this.lhs.str]&&!this.sideEffects))return this.rhs=W(this.rhs,h,P),this}get names(){const h=this.lhs instanceof t.Name?{}:{...this.lhs.names};return z(h,this.rhs)}}class p extends u{constructor(h,P,k,L){super(h,k,L),this.op=P}render({_n:h}){return`${this.lhs} ${this.op}= ${this.rhs};`+h}}class _ extends n{constructor(h){super(),this.label=h,this.names={}}render({_n:h}){return`${this.label}:`+h}}class s extends n{constructor(h){super(),this.label=h,this.names={}}render({_n:h}){return`break${this.label?` ${this.label}`:""};`+h}}class S extends n{constructor(h){super(),this.error=h}render({_n:h}){return`throw ${this.error};`+h}get names(){return this.error.names}}class $ extends n{constructor(h){super(),this.code=h}render({_n:h}){return`${this.code};`+h}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(h,P){return this.code=W(this.code,h,P),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class v extends n{constructor(h=[]){super(),this.nodes=h}render(h){return this.nodes.reduce((P,k)=>P+k.render(h),"")}optimizeNodes(){const{nodes:h}=this;let P=h.length;for(;P--;){const k=h[P].optimizeNodes();Array.isArray(k)?h.splice(P,1,...k):k?h[P]=k:h.splice(P,1)}return h.length>0?this:void 0}optimizeNames(h,P){const{nodes:k}=this;let L=k.length;for(;L--;){const U=k[L];U.optimizeNames(h,P)||(x(h,U.names),k.splice(L,1))}return k.length>0?this:void 0}get names(){return this.nodes.reduce((h,P)=>K(h,P.names),{})}}class g extends v{render(h){return"{"+h._n+super.render(h)+"}"+h._n}}class b extends v{}class a extends g{}a.kind="else";class d extends g{constructor(h,P){super(P),this.condition=h}render(h){let P=`if(${this.condition})`+super.render(h);return this.else&&(P+="else "+this.else.render(h)),P}optimizeNodes(){super.optimizeNodes();const h=this.condition;if(h===!0)return this.nodes;let P=this.else;if(P){const k=P.optimizeNodes();P=this.else=Array.isArray(k)?new a(k):k}if(P)return h===!1?P instanceof d?P:P.nodes:this.nodes.length?this:new d(pe(h),P instanceof d?[P]:P.nodes);if(!(h===!1||!this.nodes.length))return this}optimizeNames(h,P){var k;if(this.else=(k=this.else)===null||k===void 0?void 0:k.optimizeNames(h,P),!!(super.optimizeNames(h,P)||this.else))return this.condition=W(this.condition,h,P),this}get names(){const h=super.names;return z(h,this.condition),this.else&&K(h,this.else.names),h}}d.kind="if";class r extends g{}r.kind="for";class l extends r{constructor(h){super(),this.iteration=h}render(h){return`for(${this.iteration})`+super.render(h)}optimizeNames(h,P){if(super.optimizeNames(h,P))return this.iteration=W(this.iteration,h,P),this}get names(){return K(super.names,this.iteration.names)}}class w extends r{constructor(h,P,k,L){super(),this.varKind=h,this.name=P,this.from=k,this.to=L}render(h){const P=h.es5?c.varKinds.var:this.varKind,{name:k,from:L,to:U}=this;return`for(${P} ${k}=${L}; ${k}<${U}; ${k}++)`+super.render(h)}get names(){const h=z(super.names,this.from);return z(h,this.to)}}class i extends r{constructor(h,P,k,L){super(),this.loop=h,this.varKind=P,this.name=k,this.iterable=L}render(h){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(h)}optimizeNames(h,P){if(super.optimizeNames(h,P))return this.iterable=W(this.iterable,h,P),this}get names(){return K(super.names,this.iterable.names)}}class y extends g{constructor(h,P,k){super(),this.name=h,this.args=P,this.async=k}render(h){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(h)}}y.kind="func";class E extends v{render(h){return"return "+super.render(h)}}E.kind="return";class O extends g{render(h){let P="try"+super.render(h);return this.catch&&(P+=this.catch.render(h)),this.finally&&(P+=this.finally.render(h)),P}optimizeNodes(){var h,P;return super.optimizeNodes(),(h=this.catch)===null||h===void 0||h.optimizeNodes(),(P=this.finally)===null||P===void 0||P.optimizeNodes(),this}optimizeNames(h,P){var k,L;return super.optimizeNames(h,P),(k=this.catch)===null||k===void 0||k.optimizeNames(h,P),(L=this.finally)===null||L===void 0||L.optimizeNames(h,P),this}get names(){const h=super.names;return this.catch&&K(h,this.catch.names),this.finally&&K(h,this.finally.names),h}}class C extends g{constructor(h){super(),this.error=h}render(h){return`catch(${this.error})`+super.render(h)}}C.kind="catch";class M extends g{render(h){return"finally"+super.render(h)}}M.kind="finally";class V{constructor(h,P={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...P,_n:P.lines?`
|
|
2
|
+
`:""},this._extScope=h,this._scope=new c.Scope({parent:h}),this._nodes=[new b]}toString(){return this._root.render(this.opts)}name(h){return this._scope.name(h)}scopeName(h){return this._extScope.name(h)}scopeValue(h,P){const k=this._extScope.value(h,P);return(this._values[k.prefix]||(this._values[k.prefix]=new Set)).add(k),k}getScopeValue(h,P){return this._extScope.getValue(h,P)}scopeRefs(h){return this._extScope.scopeRefs(h,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(h,P,k,L){const U=this._scope.toName(P);return k!==void 0&&L&&(this._constants[U.str]=k),this._leafNode(new m(h,U,k)),U}const(h,P,k){return this._def(c.varKinds.const,h,P,k)}let(h,P,k){return this._def(c.varKinds.let,h,P,k)}var(h,P,k){return this._def(c.varKinds.var,h,P,k)}assign(h,P,k){return this._leafNode(new u(h,P,k))}add(h,P){return this._leafNode(new p(h,e.operators.ADD,P))}code(h){return typeof h=="function"?h():h!==t.nil&&this._leafNode(new $(h)),this}object(...h){const P=["{"];for(const[k,L]of h)P.length>1&&P.push(","),P.push(k),(k!==L||this.opts.es5)&&(P.push(":"),(0,t.addCodeArg)(P,L));return P.push("}"),new t._Code(P)}if(h,P,k){if(this._blockNode(new d(h)),P&&k)this.code(P).else().code(k).endIf();else if(P)this.code(P).endIf();else if(k)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(h){return this._elseNode(new d(h))}else(){return this._elseNode(new a)}endIf(){return this._endBlockNode(d,a)}_for(h,P){return this._blockNode(h),P&&this.code(P).endFor(),this}for(h,P){return this._for(new l(h),P)}forRange(h,P,k,L,U=this.opts.es5?c.varKinds.var:c.varKinds.let){const X=this._scope.toName(h);return this._for(new w(U,X,P,k),()=>L(X))}forOf(h,P,k,L=c.varKinds.const){const U=this._scope.toName(h);if(this.opts.es5){const X=P instanceof t.Name?P:this.var("_arr",P);return this.forRange("_i",0,(0,t._)`${X}.length`,B=>{this.var(U,(0,t._)`${X}[${B}]`),k(U)})}return this._for(new i("of",L,U,P),()=>k(U))}forIn(h,P,k,L=this.opts.es5?c.varKinds.var:c.varKinds.const){if(this.opts.ownProperties)return this.forOf(h,(0,t._)`Object.keys(${P})`,k);const U=this._scope.toName(h);return this._for(new i("in",L,U,P),()=>k(U))}endFor(){return this._endBlockNode(r)}label(h){return this._leafNode(new _(h))}break(h){return this._leafNode(new s(h))}return(h){const P=new E;if(this._blockNode(P),this.code(h),P.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(E)}try(h,P,k){if(!P&&!k)throw new Error('CodeGen: "try" without "catch" and "finally"');const L=new O;if(this._blockNode(L),this.code(h),P){const U=this.name("e");this._currNode=L.catch=new C(U),P(U)}return k&&(this._currNode=L.finally=new M,this.code(k)),this._endBlockNode(C,M)}throw(h){return this._leafNode(new S(h))}block(h,P){return this._blockStarts.push(this._nodes.length),h&&this.code(h).endBlock(P),this}endBlock(h){const P=this._blockStarts.pop();if(P===void 0)throw new Error("CodeGen: not in self-balancing block");const k=this._nodes.length-P;if(k<0||h!==void 0&&k!==h)throw new Error(`CodeGen: wrong number of nodes: ${k} vs ${h} expected`);return this._nodes.length=P,this}func(h,P=t.nil,k,L){return this._blockNode(new y(h,P,k)),L&&this.code(L).endFunc(),this}endFunc(){return this._endBlockNode(y)}optimize(h=1){for(;h-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(h){return this._currNode.nodes.push(h),this}_blockNode(h){this._currNode.nodes.push(h),this._nodes.push(h)}_endBlockNode(h,P){const k=this._currNode;if(k instanceof h||P&&k instanceof P)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${P?`${h.kind}/${P.kind}`:h.kind}"`)}_elseNode(h){const P=this._currNode;if(!(P instanceof d))throw new Error('CodeGen: "else" without "if"');return this._currNode=P.else=h,this}get _root(){return this._nodes[0]}get _currNode(){const h=this._nodes;return h[h.length-1]}set _currNode(h){const P=this._nodes;P[P.length-1]=h}}e.CodeGen=V;function K(T,h){for(const P in h)T[P]=(T[P]||0)+(h[P]||0);return T}function z(T,h){return h instanceof t._CodeOrName?K(T,h.names):T}function W(T,h,P){if(T instanceof t.Name)return k(T);if(!L(T))return T;return new t._Code(T._items.reduce((U,X)=>(X instanceof t.Name&&(X=k(X)),X instanceof t._Code?U.push(...X._items):U.push(X),U),[]));function k(U){const X=P[U.str];return X===void 0||h[U.str]!==1?U:(delete h[U.str],X)}function L(U){return U instanceof t._Code&&U._items.some(X=>X instanceof t.Name&&h[X.str]===1&&P[X.str]!==void 0)}}function x(T,h){for(const P in h)T[P]=(T[P]||0)-(h[P]||0)}function pe(T){return typeof T=="boolean"||typeof T=="number"||T===null?!T:(0,t._)`!${I(T)}`}e.not=pe;const he=j(e.operators.AND);function Z(...T){return T.reduce(he)}e.and=Z;const _e=j(e.operators.OR);function A(...T){return T.reduce(_e)}e.or=A;function j(T){return(h,P)=>h===t.nil?P:P===t.nil?h:(0,t._)`${I(h)} ${T} ${I(P)}`}function I(T){return T instanceof t.Name?T:(0,t._)`(${T})`}})(Tt)),Tt}var H={},dr;function Q(){if(dr)return H;dr=1,Object.defineProperty(H,"__esModule",{value:!0}),H.checkStrictMode=H.getErrorPath=H.Type=H.useFunc=H.setEvaluated=H.evaluatedPropsToName=H.mergeEvaluated=H.eachItem=H.unescapeJsonPointer=H.escapeJsonPointer=H.escapeFragment=H.unescapeFragment=H.schemaRefOrVal=H.schemaHasRulesButRef=H.schemaHasRules=H.checkUnknownRules=H.alwaysValidSchema=H.toHash=void 0;const e=J(),t=gt();function c(i){const y={};for(const E of i)y[E]=!0;return y}H.toHash=c;function o(i,y){return typeof y=="boolean"?y:Object.keys(y).length===0?!0:(f(i,y),!n(y,i.self.RULES.all))}H.alwaysValidSchema=o;function f(i,y=i.schema){const{opts:E,self:O}=i;if(!E.strictSchema||typeof y=="boolean")return;const C=O.RULES.keywords;for(const M in y)C[M]||w(i,`unknown keyword: "${M}"`)}H.checkUnknownRules=f;function n(i,y){if(typeof i=="boolean")return!i;for(const E in i)if(y[E])return!0;return!1}H.schemaHasRules=n;function m(i,y){if(typeof i=="boolean")return!i;for(const E in i)if(E!=="$ref"&&y.all[E])return!0;return!1}H.schemaHasRulesButRef=m;function u({topSchemaRef:i,schemaPath:y},E,O,C){if(!C){if(typeof E=="number"||typeof E=="boolean")return E;if(typeof E=="string")return(0,e._)`${E}`}return(0,e._)`${i}${y}${(0,e.getProperty)(O)}`}H.schemaRefOrVal=u;function p(i){return S(decodeURIComponent(i))}H.unescapeFragment=p;function _(i){return encodeURIComponent(s(i))}H.escapeFragment=_;function s(i){return typeof i=="number"?`${i}`:i.replace(/~/g,"~0").replace(/\//g,"~1")}H.escapeJsonPointer=s;function S(i){return i.replace(/~1/g,"/").replace(/~0/g,"~")}H.unescapeJsonPointer=S;function $(i,y){if(Array.isArray(i))for(const E of i)y(E);else y(i)}H.eachItem=$;function v({mergeNames:i,mergeToName:y,mergeValues:E,resultToName:O}){return(C,M,V,K)=>{const z=V===void 0?M:V instanceof e.Name?(M instanceof e.Name?i(C,M,V):y(C,M,V),V):M instanceof e.Name?(y(C,V,M),M):E(M,V);return K===e.Name&&!(z instanceof e.Name)?O(C,z):z}}H.mergeEvaluated={props:v({mergeNames:(i,y,E)=>i.if((0,e._)`${E} !== true && ${y} !== undefined`,()=>{i.if((0,e._)`${y} === true`,()=>i.assign(E,!0),()=>i.assign(E,(0,e._)`${E} || {}`).code((0,e._)`Object.assign(${E}, ${y})`))}),mergeToName:(i,y,E)=>i.if((0,e._)`${E} !== true`,()=>{y===!0?i.assign(E,!0):(i.assign(E,(0,e._)`${E} || {}`),b(i,E,y))}),mergeValues:(i,y)=>i===!0?!0:{...i,...y},resultToName:g}),items:v({mergeNames:(i,y,E)=>i.if((0,e._)`${E} !== true && ${y} !== undefined`,()=>i.assign(E,(0,e._)`${y} === true ? true : ${E} > ${y} ? ${E} : ${y}`)),mergeToName:(i,y,E)=>i.if((0,e._)`${E} !== true`,()=>i.assign(E,y===!0?!0:(0,e._)`${E} > ${y} ? ${E} : ${y}`)),mergeValues:(i,y)=>i===!0?!0:Math.max(i,y),resultToName:(i,y)=>i.var("items",y)})};function g(i,y){if(y===!0)return i.var("props",!0);const E=i.var("props",(0,e._)`{}`);return y!==void 0&&b(i,E,y),E}H.evaluatedPropsToName=g;function b(i,y,E){Object.keys(E).forEach(O=>i.assign((0,e._)`${y}${(0,e.getProperty)(O)}`,!0))}H.setEvaluated=b;const a={};function d(i,y){return i.scopeValue("func",{ref:y,code:a[y.code]||(a[y.code]=new t._Code(y.code))})}H.useFunc=d;var r;(function(i){i[i.Num=0]="Num",i[i.Str=1]="Str"})(r||(H.Type=r={}));function l(i,y,E){if(i instanceof e.Name){const O=y===r.Num;return E?O?(0,e._)`"[" + ${i} + "]"`:(0,e._)`"['" + ${i} + "']"`:O?(0,e._)`"/" + ${i}`:(0,e._)`"/" + ${i}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return E?(0,e.getProperty)(i).toString():"/"+s(i)}H.getErrorPath=l;function w(i,y,E=i.opts.strictSchema){if(E){if(y=`strict mode: ${y}`,E===!0)throw new Error(y);i.self.logger.warn(y)}}return H.checkStrictMode=w,H}var qe={},fr;function $e(){if(fr)return qe;fr=1,Object.defineProperty(qe,"__esModule",{value:!0});const e=J(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return qe.default=t,qe}var pr;function $t(){return pr||(pr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=J(),c=Q(),o=$e();e.keywordError={message:({keyword:a})=>(0,t.str)`must pass "${a}" keyword validation`},e.keyword$DataError={message:({keyword:a,schemaType:d})=>d?(0,t.str)`"${a}" keyword must be ${d} ($data)`:(0,t.str)`"${a}" keyword is invalid ($data)`};function f(a,d=e.keywordError,r,l){const{it:w}=a,{gen:i,compositeRule:y,allErrors:E}=w,O=S(a,d,r);l??(y||E)?p(i,O):_(w,(0,t._)`[${O}]`)}e.reportError=f;function n(a,d=e.keywordError,r){const{it:l}=a,{gen:w,compositeRule:i,allErrors:y}=l,E=S(a,d,r);p(w,E),i||y||_(l,o.default.vErrors)}e.reportExtraError=n;function m(a,d){a.assign(o.default.errors,d),a.if((0,t._)`${o.default.vErrors} !== null`,()=>a.if(d,()=>a.assign((0,t._)`${o.default.vErrors}.length`,d),()=>a.assign(o.default.vErrors,null)))}e.resetErrorsCount=m;function u({gen:a,keyword:d,schemaValue:r,data:l,errsCount:w,it:i}){if(w===void 0)throw new Error("ajv implementation error");const y=a.name("err");a.forRange("i",w,o.default.errors,E=>{a.const(y,(0,t._)`${o.default.vErrors}[${E}]`),a.if((0,t._)`${y}.instancePath === undefined`,()=>a.assign((0,t._)`${y}.instancePath`,(0,t.strConcat)(o.default.instancePath,i.errorPath))),a.assign((0,t._)`${y}.schemaPath`,(0,t.str)`${i.errSchemaPath}/${d}`),i.opts.verbose&&(a.assign((0,t._)`${y}.schema`,r),a.assign((0,t._)`${y}.data`,l))})}e.extendErrors=u;function p(a,d){const r=a.const("err",d);a.if((0,t._)`${o.default.vErrors} === null`,()=>a.assign(o.default.vErrors,(0,t._)`[${r}]`),(0,t._)`${o.default.vErrors}.push(${r})`),a.code((0,t._)`${o.default.errors}++`)}function _(a,d){const{gen:r,validateName:l,schemaEnv:w}=a;w.$async?r.throw((0,t._)`new ${a.ValidationError}(${d})`):(r.assign((0,t._)`${l}.errors`,d),r.return(!1))}const s={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function S(a,d,r){const{createErrors:l}=a.it;return l===!1?(0,t._)`{}`:$(a,d,r)}function $(a,d,r={}){const{gen:l,it:w}=a,i=[v(w,r),g(a,r)];return b(a,d,i),l.object(...i)}function v({errorPath:a},{instancePath:d}){const r=d?(0,t.str)`${a}${(0,c.getErrorPath)(d,c.Type.Str)}`:a;return[o.default.instancePath,(0,t.strConcat)(o.default.instancePath,r)]}function g({keyword:a,it:{errSchemaPath:d}},{schemaPath:r,parentSchema:l}){let w=l?d:(0,t.str)`${d}/${a}`;return r&&(w=(0,t.str)`${w}${(0,c.getErrorPath)(r,c.Type.Str)}`),[s.schemaPath,w]}function b(a,{params:d,message:r},l){const{keyword:w,data:i,schemaValue:y,it:E}=a,{opts:O,propertyName:C,topSchemaRef:M,schemaPath:V}=E;l.push([s.keyword,w],[s.params,typeof d=="function"?d(a):d||(0,t._)`{}`]),O.messages&&l.push([s.message,typeof r=="function"?r(a):r]),O.verbose&&l.push([s.schema,y],[s.parentSchema,(0,t._)`${M}${V}`],[o.default.data,i]),C&&l.push([s.propertyName,C])}})(Ot)),Ot}var hr;function ns(){if(hr)return we;hr=1,Object.defineProperty(we,"__esModule",{value:!0}),we.boolOrEmptySchema=we.topBoolOrEmptySchema=void 0;const e=$t(),t=J(),c=$e(),o={message:"boolean schema is false"};function f(u){const{gen:p,schema:_,validateName:s}=u;_===!1?m(u,!1):typeof _=="object"&&_.$async===!0?p.return(c.default.data):(p.assign((0,t._)`${s}.errors`,null),p.return(!0))}we.topBoolOrEmptySchema=f;function n(u,p){const{gen:_,schema:s}=u;s===!1?(_.var(p,!1),m(u)):_.var(p,!0)}we.boolOrEmptySchema=n;function m(u,p){const{gen:_,data:s}=u,S={gen:_,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:u};(0,e.reportError)(S,o,void 0,p)}return we}var re={},be={},mr;function kn(){if(mr)return be;mr=1,Object.defineProperty(be,"__esModule",{value:!0}),be.getRules=be.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function c(f){return typeof f=="string"&&t.has(f)}be.isJSONType=c;function o(){const f={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...f,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},f.number,f.string,f.array,f.object],post:{rules:[]},all:{},keywords:{}}}return be.getRules=o,be}var ye={},yr;function qn(){if(yr)return ye;yr=1,Object.defineProperty(ye,"__esModule",{value:!0}),ye.shouldUseRule=ye.shouldUseGroup=ye.schemaHasRulesForType=void 0;function e({schema:o,self:f},n){const m=f.RULES.types[n];return m&&m!==!0&&t(o,m)}ye.schemaHasRulesForType=e;function t(o,f){return f.rules.some(n=>c(o,n))}ye.shouldUseGroup=t;function c(o,f){var n;return o[f.keyword]!==void 0||((n=f.definition.implements)===null||n===void 0?void 0:n.some(m=>o[m]!==void 0))}return ye.shouldUseRule=c,ye}var gr;function _t(){if(gr)return re;gr=1,Object.defineProperty(re,"__esModule",{value:!0}),re.reportTypeError=re.checkDataTypes=re.checkDataType=re.coerceAndCheckDataType=re.getJSONTypes=re.getSchemaTypes=re.DataType=void 0;const e=kn(),t=qn(),c=$t(),o=J(),f=Q();var n;(function(r){r[r.Correct=0]="Correct",r[r.Wrong=1]="Wrong"})(n||(re.DataType=n={}));function m(r){const l=u(r.type);if(l.includes("null")){if(r.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!l.length&&r.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');r.nullable===!0&&l.push("null")}return l}re.getSchemaTypes=m;function u(r){const l=Array.isArray(r)?r:r?[r]:[];if(l.every(e.isJSONType))return l;throw new Error("type must be JSONType or JSONType[]: "+l.join(","))}re.getJSONTypes=u;function p(r,l){const{gen:w,data:i,opts:y}=r,E=s(l,y.coerceTypes),O=l.length>0&&!(E.length===0&&l.length===1&&(0,t.schemaHasRulesForType)(r,l[0]));if(O){const C=g(l,i,y.strictNumbers,n.Wrong);w.if(C,()=>{E.length?S(r,l,E):a(r)})}return O}re.coerceAndCheckDataType=p;const _=new Set(["string","number","integer","boolean","null"]);function s(r,l){return l?r.filter(w=>_.has(w)||l==="array"&&w==="array"):[]}function S(r,l,w){const{gen:i,data:y,opts:E}=r,O=i.let("dataType",(0,o._)`typeof ${y}`),C=i.let("coerced",(0,o._)`undefined`);E.coerceTypes==="array"&&i.if((0,o._)`${O} == 'object' && Array.isArray(${y}) && ${y}.length == 1`,()=>i.assign(y,(0,o._)`${y}[0]`).assign(O,(0,o._)`typeof ${y}`).if(g(l,y,E.strictNumbers),()=>i.assign(C,y))),i.if((0,o._)`${C} !== undefined`);for(const V of w)(_.has(V)||V==="array"&&E.coerceTypes==="array")&&M(V);i.else(),a(r),i.endIf(),i.if((0,o._)`${C} !== undefined`,()=>{i.assign(y,C),$(r,C)});function M(V){switch(V){case"string":i.elseIf((0,o._)`${O} == "number" || ${O} == "boolean"`).assign(C,(0,o._)`"" + ${y}`).elseIf((0,o._)`${y} === null`).assign(C,(0,o._)`""`);return;case"number":i.elseIf((0,o._)`${O} == "boolean" || ${y} === null
|
|
3
3
|
|| (${O} == "string" && ${y} && ${y} == +${y})`).assign(C,(0,o._)`+${y}`);return;case"integer":i.elseIf((0,o._)`${O} === "boolean" || ${y} === null
|
|
4
4
|
|| (${O} === "string" && ${y} && ${y} == +${y} && !(${y} % 1))`).assign(C,(0,o._)`+${y}`);return;case"boolean":i.elseIf((0,o._)`${y} === "false" || ${y} === 0 || ${y} === null`).assign(C,!1).elseIf((0,o._)`${y} === "true" || ${y} === 1`).assign(C,!0);return;case"null":i.elseIf((0,o._)`${y} === "" || ${y} === 0 || ${y} === false`),i.assign(C,null);return;case"array":i.elseIf((0,o._)`${O} === "string" || ${O} === "number"
|
|
5
|
-
|| ${O} === "boolean" || ${y} === null`).assign(C,(0,o._)`[${y}]`)}}}function $({gen:r,parentData:l,parentDataProperty:w},i){r.if((0,o._)`${l} !== undefined`,()=>r.assign((0,o._)`${l}[${w}]`,i))}function v(r,l,w,i=n.Correct){const y=i===n.Correct?o.operators.EQ:o.operators.NEQ;let E;switch(r){case"null":return(0,o._)`${l} ${y} null`;case"array":E=(0,o._)`Array.isArray(${l})`;break;case"object":E=(0,o._)`${l} && typeof ${l} == "object" && !Array.isArray(${l})`;break;case"integer":E=O((0,o._)`!(${l} % 1) && !isNaN(${l})`);break;case"number":E=O();break;default:return(0,o._)`typeof ${l} ${y} ${r}`}return i===n.Correct?E:(0,o.not)(E);function O(C=o.nil){return(0,o.and)((0,o._)`typeof ${l} == "number"`,C,w?(0,o._)`isFinite(${l})`:o.nil)}}re.checkDataType=v;function g(r,l,w,i){if(r.length===1)return v(r[0],l,w,i);let y;const E=(0,f.toHash)(r);if(E.array&&E.object){const O=(0,o._)`typeof ${l} != "object"`;y=E.null?O:(0,o._)`!${l} || ${O}`,delete E.null,delete E.array,delete E.object}else y=o.nil;E.number&&delete E.integer;for(const O in E)y=(0,o.and)(y,v(O,l,w,i));return y}re.checkDataTypes=g;const b={message:({schema:r})=>`must be ${r}`,params:({schema:r,schemaValue:l})=>typeof r=="string"?(0,o._)`{type: ${r}}`:(0,o._)`{type: ${l}}`};function a(r){const l=d(r);(0,c.reportError)(l,b)}re.reportTypeError=a;function d(r){const{gen:l,data:w,schema:i}=r,y=(0,f.schemaRefOrVal)(r,i,"type");return{gen:l,keyword:"type",data:w,schema:i.type,schemaCode:y,schemaValue:y,parentSchema:i,params:{},it:r}}return re}var Ne={},_r;function ss(){if(_r)return Ne;_r=1,Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.assignDefaults=void 0;const e=J(),t=Q();function c(f,n){const{properties:m,items:u}=f.schema;if(n==="object"&&m)for(const h in m)o(f,h,m[h].default);else n==="array"&&Array.isArray(u)&&u.forEach((h,_)=>o(f,_,h.default))}Ne.assignDefaults=c;function o(f,n,m){const{gen:u,compositeRule:h,data:_,opts:s}=f;if(m===void 0)return;const S=(0,e._)`${_}${(0,e.getProperty)(n)}`;if(h){(0,t.checkStrictMode)(f,`default is ignored for: ${S}`);return}let $=(0,e._)`${S} === undefined`;s.useDefaults==="empty"&&($=(0,e._)`${$} || ${S} === null || ${S} === ""`),u.if($,(0,e._)`${S} = ${(0,e.stringify)(m)}`)}return Ne}var de={},Y={},vr;function fe(){if(vr)return Y;vr=1,Object.defineProperty(Y,"__esModule",{value:!0}),Y.validateUnion=Y.validateArray=Y.usePattern=Y.callValidateCode=Y.schemaProperties=Y.allSchemaProperties=Y.noPropertyInData=Y.propertyInData=Y.isOwnProperty=Y.hasPropFunc=Y.reportMissingProp=Y.checkMissingProp=Y.checkReportMissingProp=void 0;const e=J(),t=Q(),c=$e(),o=Q();function f(r,l){const{gen:w,data:i,it:y}=r;w.if(s(w,i,l,y.opts.ownProperties),()=>{r.setParams({missingProperty:(0,e._)`${l}`},!0),r.error()})}Y.checkReportMissingProp=f;function n({gen:r,data:l,it:{opts:w}},i,y){return(0,e.or)(...i.map(E=>(0,e.and)(s(r,l,E,w.ownProperties),(0,e._)`${y} = ${E}`)))}Y.checkMissingProp=n;function m(r,l){r.setParams({missingProperty:l},!0),r.error()}Y.reportMissingProp=m;function u(r){return r.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}Y.hasPropFunc=u;function h(r,l,w){return(0,e._)`${u(r)}.call(${l}, ${w})`}Y.isOwnProperty=h;function _(r,l,w,i){const y=(0,e._)`${l}${(0,e.getProperty)(w)} !== undefined`;return i?(0,e._)`${y} && ${h(r,l,w)}`:y}Y.propertyInData=_;function s(r,l,w,i){const y=(0,e._)`${l}${(0,e.getProperty)(w)} === undefined`;return i?(0,e.or)(y,(0,e.not)(h(r,l,w))):y}Y.noPropertyInData=s;function S(r){return r?Object.keys(r).filter(l=>l!=="__proto__"):[]}Y.allSchemaProperties=S;function $(r,l){return S(l).filter(w=>!(0,t.alwaysValidSchema)(r,l[w]))}Y.schemaProperties=$;function v({schemaCode:r,data:l,it:{gen:w,topSchemaRef:i,schemaPath:y,errorPath:E},it:O},C,M,V){const K=V?(0,e._)`${r}, ${l}, ${i}${y}`:l,z=[[c.default.instancePath,(0,e.strConcat)(c.default.instancePath,E)],[c.default.parentData,O.parentData],[c.default.parentDataProperty,O.parentDataProperty],[c.default.rootData,c.default.rootData]];O.opts.dynamicRef&&z.push([c.default.dynamicAnchors,c.default.dynamicAnchors]);const W=(0,e._)`${K}, ${w.object(...z)}`;return M!==e.nil?(0,e._)`${C}.call(${M}, ${W})`:(0,e._)`${C}(${W})`}Y.callValidateCode=v;const g=(0,e._)`new RegExp`;function b({gen:r,it:{opts:l}},w){const i=l.unicodeRegExp?"u":"",{regExp:y}=l.code,E=y(w,i);return r.scopeValue("pattern",{key:E.toString(),ref:E,code:(0,e._)`${y.code==="new RegExp"?g:(0,o.useFunc)(r,y)}(${w}, ${i})`})}Y.usePattern=b;function a(r){const{gen:l,data:w,keyword:i,it:y}=r,E=l.name("valid");if(y.allErrors){const C=l.let("valid",!0);return O(()=>l.assign(C,!1)),C}return l.var(E,!0),O(()=>l.break()),E;function O(C){const M=l.const("len",(0,e._)`${w}.length`);l.forRange("i",0,M,V=>{r.subschema({keyword:i,dataProp:V,dataPropType:t.Type.Num},E),l.if((0,e.not)(E),C)})}}Y.validateArray=a;function d(r){const{gen:l,schema:w,keyword:i,it:y}=r;if(!Array.isArray(w))throw new Error("ajv implementation error");if(w.some(M=>(0,t.alwaysValidSchema)(y,M))&&!y.opts.unevaluated)return;const O=l.let("valid",!1),C=l.name("_valid");l.block(()=>w.forEach((M,V)=>{const K=r.subschema({keyword:i,schemaProp:V,compositeRule:!0},C);l.assign(O,(0,e._)`${O} || ${C}`),r.mergeValidEvaluated(K,C)||l.if((0,e.not)(O))})),r.result(O,()=>r.reset(),()=>r.error(!0))}return Y.validateUnion=d,Y}var $r;function os(){if($r)return de;$r=1,Object.defineProperty(de,"__esModule",{value:!0}),de.validateKeywordUsage=de.validSchemaType=de.funcKeywordCode=de.macroKeywordCode=void 0;const e=J(),t=$e(),c=fe(),o=$t();function f($,v){const{gen:g,keyword:b,schema:a,parentSchema:d,it:r}=$,l=v.macro.call(r.self,a,d,r),w=_(g,b,l);r.opts.validateSchema!==!1&&r.self.validateSchema(l,!0);const i=g.name("valid");$.subschema({schema:l,schemaPath:e.nil,errSchemaPath:`${r.errSchemaPath}/${b}`,topSchemaRef:w,compositeRule:!0},i),$.pass(i,()=>$.error(!0))}de.macroKeywordCode=f;function n($,v){var g;const{gen:b,keyword:a,schema:d,parentSchema:r,$data:l,it:w}=$;h(w,v);const i=!l&&v.compile?v.compile.call(w.self,d,r,w):v.validate,y=_(b,a,i),E=b.let("valid");$.block$data(E,O),$.ok((g=v.valid)!==null&&g!==void 0?g:E);function O(){if(v.errors===!1)V(),v.modifying&&m($),K(()=>$.error());else{const z=v.async?C():M();v.modifying&&m($),K(()=>u($,z))}}function C(){const z=b.let("ruleErrs",null);return b.try(()=>V((0,e._)`await `),W=>b.assign(E,!1).if((0,e._)`${W} instanceof ${w.ValidationError}`,()=>b.assign(z,(0,e._)`${W}.errors`),()=>b.throw(W))),z}function M(){const z=(0,e._)`${y}.errors`;return b.assign(z,null),V(e.nil),z}function V(z=v.async?(0,e._)`await `:e.nil){const W=w.opts.passContext?t.default.this:t.default.self,x=!("compile"in v&&!l||v.schema===!1);b.assign(E,(0,e._)`${z}${(0,c.callValidateCode)($,y,W,x)}`,v.modifying)}function K(z){var W;b.if((0,e.not)((W=v.valid)!==null&&W!==void 0?W:E),z)}}de.funcKeywordCode=n;function m($){const{gen:v,data:g,it:b}=$;v.if(b.parentData,()=>v.assign(g,(0,e._)`${b.parentData}[${b.parentDataProperty}]`))}function u($,v){const{gen:g}=$;g.if((0,e._)`Array.isArray(${v})`,()=>{g.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${v} : ${t.default.vErrors}.concat(${v})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,o.extendErrors)($)},()=>$.error())}function h({schemaEnv:$},v){if(v.async&&!$.$async)throw new Error("async keyword in sync schema")}function _($,v,g){if(g===void 0)throw new Error(`keyword "${v}" failed to compile`);return $.scopeValue("keyword",typeof g=="function"?{ref:g}:{ref:g,code:(0,e.stringify)(g)})}function s($,v,g=!1){return!v.length||v.some(b=>b==="array"?Array.isArray($):b==="object"?$&&typeof $=="object"&&!Array.isArray($):typeof $==b||g&&typeof $>"u")}de.validSchemaType=s;function S({schema:$,opts:v,self:g,errSchemaPath:b},a,d){if(Array.isArray(a.keyword)?!a.keyword.includes(d):a.keyword!==d)throw new Error("ajv implementation error");const r=a.dependencies;if(r?.some(l=>!Object.prototype.hasOwnProperty.call($,l)))throw new Error(`parent schema must have dependencies of ${d}: ${r.join(",")}`);if(a.validateSchema&&!a.validateSchema($[d])){const w=`keyword "${d}" value is invalid at path "${b}": `+g.errorsText(a.validateSchema.errors);if(v.validateSchema==="log")g.logger.error(w);else throw new Error(w)}}return de.validateKeywordUsage=S,de}var ge={},wr;function is(){if(wr)return ge;wr=1,Object.defineProperty(ge,"__esModule",{value:!0}),ge.extendSubschemaMode=ge.extendSubschemaData=ge.getSubschema=void 0;const e=J(),t=Q();function c(n,{keyword:m,schemaProp:u,schema:h,schemaPath:_,errSchemaPath:s,topSchemaRef:S}){if(m!==void 0&&h!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(m!==void 0){const $=n.schema[m];return u===void 0?{schema:$,schemaPath:(0,e._)`${n.schemaPath}${(0,e.getProperty)(m)}`,errSchemaPath:`${n.errSchemaPath}/${m}`}:{schema:$[u],schemaPath:(0,e._)`${n.schemaPath}${(0,e.getProperty)(m)}${(0,e.getProperty)(u)}`,errSchemaPath:`${n.errSchemaPath}/${m}/${(0,t.escapeFragment)(u)}`}}if(h!==void 0){if(_===void 0||s===void 0||S===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:h,schemaPath:_,topSchemaRef:S,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}ge.getSubschema=c;function o(n,m,{dataProp:u,dataPropType:h,data:_,dataTypes:s,propertyName:S}){if(_!==void 0&&u!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:$}=m;if(u!==void 0){const{errorPath:g,dataPathArr:b,opts:a}=m,d=$.let("data",(0,e._)`${m.data}${(0,e.getProperty)(u)}`,!0);v(d),n.errorPath=(0,e.str)`${g}${(0,t.getErrorPath)(u,h,a.jsPropertySyntax)}`,n.parentDataProperty=(0,e._)`${u}`,n.dataPathArr=[...b,n.parentDataProperty]}if(_!==void 0){const g=_ instanceof e.Name?_:$.let("data",_,!0);v(g),S!==void 0&&(n.propertyName=S)}s&&(n.dataTypes=s);function v(g){n.data=g,n.dataLevel=m.dataLevel+1,n.dataTypes=[],m.definedProperties=new Set,n.parentData=m.data,n.dataNames=[...m.dataNames,g]}}ge.extendSubschemaData=o;function f(n,{jtdDiscriminator:m,jtdMetadata:u,compositeRule:h,createErrors:_,allErrors:s}){h!==void 0&&(n.compositeRule=h),_!==void 0&&(n.createErrors=_),s!==void 0&&(n.allErrors=s),n.jtdDiscriminator=m,n.jtdMetadata=u}return ge.extendSubschemaMode=f,ge}var se={},It,br;function In(){return br||(br=1,It=function e(t,c){if(t===c)return!0;if(t&&c&&typeof t=="object"&&typeof c=="object"){if(t.constructor!==c.constructor)return!1;var o,f,n;if(Array.isArray(t)){if(o=t.length,o!=c.length)return!1;for(f=o;f--!==0;)if(!e(t[f],c[f]))return!1;return!0}if(t.constructor===RegExp)return t.source===c.source&&t.flags===c.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===c.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===c.toString();if(n=Object.keys(t),o=n.length,o!==Object.keys(c).length)return!1;for(f=o;f--!==0;)if(!Object.prototype.hasOwnProperty.call(c,n[f]))return!1;for(f=o;f--!==0;){var m=n[f];if(!e(t[m],c[m]))return!1}return!0}return t!==t&&c!==c}),It}var Ct={exports:{}},Er;function as(){if(Er)return Ct.exports;Er=1;var e=Ct.exports=function(o,f,n){typeof f=="function"&&(n=f,f={}),n=f.cb||n;var m=typeof n=="function"?n:n.pre||function(){},u=n.post||function(){};t(f,m,u,o,"",o)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.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 t(o,f,n,m,u,h,_,s,S,$){if(m&&typeof m=="object"&&!Array.isArray(m)){f(m,u,h,_,s,S,$);for(var v in m){var g=m[v];if(Array.isArray(g)){if(v in e.arrayKeywords)for(var b=0;b<g.length;b++)t(o,f,n,g[b],u+"/"+v+"/"+b,h,u,v,m,b)}else if(v in e.propsKeywords){if(g&&typeof g=="object")for(var a in g)t(o,f,n,g[a],u+"/"+v+"/"+c(a),h,u,v,m,a)}else(v in e.keywords||o.allKeys&&!(v in e.skipKeywords))&&t(o,f,n,g,u+"/"+v,h,u,v,m)}n(m,u,h,_,s,S,$)}}function c(o){return o.replace(/~/g,"~0").replace(/\//g,"~1")}return Ct.exports}var Sr;function wt(){if(Sr)return se;Sr=1,Object.defineProperty(se,"__esModule",{value:!0}),se.getSchemaRefs=se.resolveUrl=se.normalizeId=se._getFullPath=se.getFullPath=se.inlineRef=void 0;const e=Q(),t=In(),c=as(),o=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function f(b,a=!0){return typeof b=="boolean"?!0:a===!0?!m(b):a?u(b)<=a:!1}se.inlineRef=f;const n=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function m(b){for(const a in b){if(n.has(a))return!0;const d=b[a];if(Array.isArray(d)&&d.some(m)||typeof d=="object"&&m(d))return!0}return!1}function u(b){let a=0;for(const d in b){if(d==="$ref")return 1/0;if(a++,!o.has(d)&&(typeof b[d]=="object"&&(0,e.eachItem)(b[d],r=>a+=u(r)),a===1/0))return 1/0}return a}function h(b,a="",d){d!==!1&&(a=S(a));const r=b.parse(a);return _(b,r)}se.getFullPath=h;function _(b,a){return b.serialize(a).split("#")[0]+"#"}se._getFullPath=_;const s=/#\/?$/;function S(b){return b?b.replace(s,""):""}se.normalizeId=S;function $(b,a,d){return d=S(d),b.resolve(a,d)}se.resolveUrl=$;const v=/^[a-z_][-a-z0-9._]*$/i;function g(b,a){if(typeof b=="boolean")return{};const{schemaId:d,uriResolver:r}=this.opts,l=S(b[d]||a),w={"":l},i=h(r,l,!1),y={},E=new Set;return c(b,{allKeys:!0},(M,V,K,z)=>{if(z===void 0)return;const W=i+V;let x=w[z];typeof M[d]=="string"&&(x=he.call(this,M[d])),pe.call(this,M.$anchor),pe.call(this,M.$dynamicAnchor),w[V]=x;function he(Z){const _e=this.opts.uriResolver.resolve;if(Z=S(x?_e(x,Z):Z),E.has(Z))throw C(Z);E.add(Z);let A=this.refs[Z];return typeof A=="string"&&(A=this.refs[A]),typeof A=="object"?O(M,A.schema,Z):Z!==S(W)&&(Z[0]==="#"?(O(M,y[Z],Z),y[Z]=M):this.refs[Z]=W),Z}function pe(Z){if(typeof Z=="string"){if(!v.test(Z))throw new Error(`invalid anchor "${Z}"`);he.call(this,`#${Z}`)}}}),y;function O(M,V,K){if(V!==void 0&&!t(M,V))throw C(K)}function C(M){return new Error(`reference "${M}" resolves to more than one schema`)}}return se.getSchemaRefs=g,se}var Pr;function bt(){if(Pr)return me;Pr=1,Object.defineProperty(me,"__esModule",{value:!0}),me.getData=me.KeywordCxt=me.validateFunctionCode=void 0;const e=ns(),t=_t(),c=qn(),o=_t(),f=ss(),n=os(),m=is(),u=J(),h=$e(),_=wt(),s=Q(),S=$t();function $(R){if(i(R)&&(E(R),w(R))){a(R);return}v(R,()=>(0,e.topBoolOrEmptySchema)(R))}me.validateFunctionCode=$;function v({gen:R,validateName:N,schema:q,schemaEnv:D,opts:F},G){F.code.es5?R.func(N,(0,u._)`${h.default.data}, ${h.default.valCxt}`,D.$async,()=>{R.code((0,u._)`"use strict"; ${r(q,F)}`),b(R,F),R.code(G)}):R.func(N,(0,u._)`${h.default.data}, ${g(F)}`,D.$async,()=>R.code(r(q,F)).code(G))}function g(R){return(0,u._)`{${h.default.instancePath}="", ${h.default.parentData}, ${h.default.parentDataProperty}, ${h.default.rootData}=${h.default.data}${R.dynamicRef?(0,u._)`, ${h.default.dynamicAnchors}={}`:u.nil}}={}`}function b(R,N){R.if(h.default.valCxt,()=>{R.var(h.default.instancePath,(0,u._)`${h.default.valCxt}.${h.default.instancePath}`),R.var(h.default.parentData,(0,u._)`${h.default.valCxt}.${h.default.parentData}`),R.var(h.default.parentDataProperty,(0,u._)`${h.default.valCxt}.${h.default.parentDataProperty}`),R.var(h.default.rootData,(0,u._)`${h.default.valCxt}.${h.default.rootData}`),N.dynamicRef&&R.var(h.default.dynamicAnchors,(0,u._)`${h.default.valCxt}.${h.default.dynamicAnchors}`)},()=>{R.var(h.default.instancePath,(0,u._)`""`),R.var(h.default.parentData,(0,u._)`undefined`),R.var(h.default.parentDataProperty,(0,u._)`undefined`),R.var(h.default.rootData,h.default.data),N.dynamicRef&&R.var(h.default.dynamicAnchors,(0,u._)`{}`)})}function a(R){const{schema:N,opts:q,gen:D}=R;v(R,()=>{q.$comment&&N.$comment&&z(R),M(R),D.let(h.default.vErrors,null),D.let(h.default.errors,0),q.unevaluated&&d(R),O(R),W(R)})}function d(R){const{gen:N,validateName:q}=R;R.evaluated=N.const("evaluated",(0,u._)`${q}.evaluated`),N.if((0,u._)`${R.evaluated}.dynamicProps`,()=>N.assign((0,u._)`${R.evaluated}.props`,(0,u._)`undefined`)),N.if((0,u._)`${R.evaluated}.dynamicItems`,()=>N.assign((0,u._)`${R.evaluated}.items`,(0,u._)`undefined`))}function r(R,N){const q=typeof R=="object"&&R[N.schemaId];return q&&(N.code.source||N.code.process)?(0,u._)`/*# sourceURL=${q} */`:u.nil}function l(R,N){if(i(R)&&(E(R),w(R))){y(R,N);return}(0,e.boolOrEmptySchema)(R,N)}function w({schema:R,self:N}){if(typeof R=="boolean")return!R;for(const q in R)if(N.RULES.all[q])return!0;return!1}function i(R){return typeof R.schema!="boolean"}function y(R,N){const{schema:q,gen:D,opts:F}=R;F.$comment&&q.$comment&&z(R),V(R),K(R);const G=D.const("_errs",h.default.errors);O(R,G),D.var(N,(0,u._)`${G} === ${h.default.errors}`)}function E(R){(0,s.checkUnknownRules)(R),C(R)}function O(R,N){if(R.opts.jtd)return he(R,[],!1,N);const q=(0,t.getSchemaTypes)(R.schema),D=(0,t.coerceAndCheckDataType)(R,q);he(R,q,!D,N)}function C(R){const{schema:N,errSchemaPath:q,opts:D,self:F}=R;N.$ref&&D.ignoreKeywordsWithRef&&(0,s.schemaHasRulesButRef)(N,F.RULES)&&F.logger.warn(`$ref: keywords ignored in schema at path "${q}"`)}function M(R){const{schema:N,opts:q}=R;N.default!==void 0&&q.useDefaults&&q.strictSchema&&(0,s.checkStrictMode)(R,"default is ignored in the schema root")}function V(R){const N=R.schema[R.opts.schemaId];N&&(R.baseId=(0,_.resolveUrl)(R.opts.uriResolver,R.baseId,N))}function K(R){if(R.schema.$async&&!R.schemaEnv.$async)throw new Error("async schema in sync schema")}function z({gen:R,schemaEnv:N,schema:q,errSchemaPath:D,opts:F}){const G=q.$comment;if(F.$comment===!0)R.code((0,u._)`${h.default.self}.logger.log(${G})`);else if(typeof F.$comment=="function"){const ee=(0,u.str)`${D}/$comment`,le=R.scopeValue("root",{ref:N.root});R.code((0,u._)`${h.default.self}.opts.$comment(${G}, ${ee}, ${le}.schema)`)}}function W(R){const{gen:N,schemaEnv:q,validateName:D,ValidationError:F,opts:G}=R;q.$async?N.if((0,u._)`${h.default.errors} === 0`,()=>N.return(h.default.data),()=>N.throw((0,u._)`new ${F}(${h.default.vErrors})`)):(N.assign((0,u._)`${D}.errors`,h.default.vErrors),G.unevaluated&&x(R),N.return((0,u._)`${h.default.errors} === 0`))}function x({gen:R,evaluated:N,props:q,items:D}){q instanceof u.Name&&R.assign((0,u._)`${N}.props`,q),D instanceof u.Name&&R.assign((0,u._)`${N}.items`,D)}function he(R,N,q,D){const{gen:F,schema:G,data:ee,allErrors:le,opts:oe,self:ie}=R,{RULES:te}=ie;if(G.$ref&&(oe.ignoreKeywordsWithRef||!(0,s.schemaHasRulesButRef)(G,te))){F.block(()=>L(R,"$ref",te.all.$ref.definition));return}oe.jtd||Z(R,N),F.block(()=>{for(const ce of te.rules)Se(ce);Se(te.post)});function Se(ce){(0,c.shouldUseGroup)(G,ce)&&(ce.type?(F.if((0,o.checkDataType)(ce.type,ee,oe.strictNumbers)),pe(R,ce),N.length===1&&N[0]===ce.type&&q&&(F.else(),(0,o.reportTypeError)(R)),F.endIf()):pe(R,ce),le||F.if((0,u._)`${h.default.errors} === ${D||0}`))}}function pe(R,N){const{gen:q,schema:D,opts:{useDefaults:F}}=R;F&&(0,f.assignDefaults)(R,N.type),q.block(()=>{for(const G of N.rules)(0,c.shouldUseRule)(D,G)&&L(R,G.keyword,G.definition,N.type)})}function Z(R,N){R.schemaEnv.meta||!R.opts.strictTypes||(_e(R,N),R.opts.allowUnionTypes||A(R,N),j(R,R.dataTypes))}function _e(R,N){if(N.length){if(!R.dataTypes.length){R.dataTypes=N;return}N.forEach(q=>{T(R.dataTypes,q)||P(R,`type "${q}" not allowed by context "${R.dataTypes.join(",")}"`)}),p(R,N)}}function A(R,N){N.length>1&&!(N.length===2&&N.includes("null"))&&P(R,"use allowUnionTypes to allow union type keyword")}function j(R,N){const q=R.self.RULES.all;for(const D in q){const F=q[D];if(typeof F=="object"&&(0,c.shouldUseRule)(R.schema,F)){const{type:G}=F.definition;G.length&&!G.some(ee=>I(N,ee))&&P(R,`missing type "${G.join(",")}" for keyword "${D}"`)}}}function I(R,N){return R.includes(N)||N==="number"&&R.includes("integer")}function T(R,N){return R.includes(N)||N==="integer"&&R.includes("number")}function p(R,N){const q=[];for(const D of R.dataTypes)T(N,D)?q.push(D):N.includes("integer")&&D==="number"&&q.push("integer");R.dataTypes=q}function P(R,N){const q=R.schemaEnv.baseId+R.errSchemaPath;N+=` at "${q}" (strictTypes)`,(0,s.checkStrictMode)(R,N,R.opts.strictTypes)}class k{constructor(N,q,D){if((0,n.validateKeywordUsage)(N,q,D),this.gen=N.gen,this.allErrors=N.allErrors,this.keyword=D,this.data=N.data,this.schema=N.schema[D],this.$data=q.$data&&N.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,s.schemaRefOrVal)(N,this.schema,D,this.$data),this.schemaType=q.schemaType,this.parentSchema=N.schema,this.params={},this.it=N,this.def=q,this.$data)this.schemaCode=N.gen.const("vSchema",B(this.$data,N));else if(this.schemaCode=this.schemaValue,!(0,n.validSchemaType)(this.schema,q.schemaType,q.allowUndefined))throw new Error(`${D} value must be ${JSON.stringify(q.schemaType)}`);("code"in q?q.trackErrors:q.errors!==!1)&&(this.errsCount=N.gen.const("_errs",h.default.errors))}result(N,q,D){this.failResult((0,u.not)(N),q,D)}failResult(N,q,D){this.gen.if(N),D?D():this.error(),q?(this.gen.else(),q(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(N,q){this.failResult((0,u.not)(N),void 0,q)}fail(N){if(N===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(N),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(N){if(!this.$data)return this.fail(N);const{schemaCode:q}=this;this.fail((0,u._)`${q} !== undefined && (${(0,u.or)(this.invalid$data(),N)})`)}error(N,q,D){if(q){this.setParams(q),this._error(N,D),this.setParams({});return}this._error(N,D)}_error(N,q){(N?S.reportExtraError:S.reportError)(this,this.def.error,q)}$dataError(){(0,S.reportError)(this,this.def.$dataError||S.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,S.resetErrorsCount)(this.gen,this.errsCount)}ok(N){this.allErrors||this.gen.if(N)}setParams(N,q){q?Object.assign(this.params,N):this.params=N}block$data(N,q,D=u.nil){this.gen.block(()=>{this.check$data(N,D),q()})}check$data(N=u.nil,q=u.nil){if(!this.$data)return;const{gen:D,schemaCode:F,schemaType:G,def:ee}=this;D.if((0,u.or)((0,u._)`${F} === undefined`,q)),N!==u.nil&&D.assign(N,!0),(G.length||ee.validateSchema)&&(D.elseIf(this.invalid$data()),this.$dataError(),N!==u.nil&&D.assign(N,!1)),D.else()}invalid$data(){const{gen:N,schemaCode:q,schemaType:D,def:F,it:G}=this;return(0,u.or)(ee(),le());function ee(){if(D.length){if(!(q instanceof u.Name))throw new Error("ajv implementation error");const oe=Array.isArray(D)?D:[D];return(0,u._)`${(0,o.checkDataTypes)(oe,q,G.opts.strictNumbers,o.DataType.Wrong)}`}return u.nil}function le(){if(F.validateSchema){const oe=N.scopeValue("validate$data",{ref:F.validateSchema});return(0,u._)`!${oe}(${q})`}return u.nil}}subschema(N,q){const D=(0,m.getSubschema)(this.it,N);(0,m.extendSubschemaData)(D,this.it,N),(0,m.extendSubschemaMode)(D,N);const F={...this.it,...D,items:void 0,props:void 0};return l(F,q),F}mergeEvaluated(N,q){const{it:D,gen:F}=this;D.opts.unevaluated&&(D.props!==!0&&N.props!==void 0&&(D.props=s.mergeEvaluated.props(F,N.props,D.props,q)),D.items!==!0&&N.items!==void 0&&(D.items=s.mergeEvaluated.items(F,N.items,D.items,q)))}mergeValidEvaluated(N,q){const{it:D,gen:F}=this;if(D.opts.unevaluated&&(D.props!==!0||D.items!==!0))return F.if(q,()=>this.mergeEvaluated(N,u.Name)),!0}}me.KeywordCxt=k;function L(R,N,q,D){const F=new k(R,q,N);"code"in q?q.code(F,D):F.$data&&q.validate?(0,n.funcKeywordCode)(F,q):"macro"in q?(0,n.macroKeywordCode)(F,q):(q.compile||q.validate)&&(0,n.funcKeywordCode)(F,q)}const U=/^\/(?:[^~]|~0|~1)*$/,X=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function B(R,{dataLevel:N,dataNames:q,dataPathArr:D}){let F,G;if(R==="")return h.default.rootData;if(R[0]==="/"){if(!U.test(R))throw new Error(`Invalid JSON-pointer: ${R}`);F=R,G=h.default.rootData}else{const ie=X.exec(R);if(!ie)throw new Error(`Invalid JSON-pointer: ${R}`);const te=+ie[1];if(F=ie[2],F==="#"){if(te>=N)throw new Error(oe("property/index",te));return D[N-te]}if(te>N)throw new Error(oe("data",te));if(G=q[N-te],!F)return G}let ee=G;const le=F.split("/");for(const ie of le)ie&&(G=(0,u._)`${G}${(0,u.getProperty)((0,s.unescapeJsonPointer)(ie))}`,ee=(0,u._)`${ee} && ${G}`);return ee;function oe(ie,te){return`Cannot access ${ie} ${te} levels up, current level is ${N}`}}return me.getData=B,me}var Ie={},Rr;function Qt(){if(Rr)return Ie;Rr=1,Object.defineProperty(Ie,"__esModule",{value:!0});class e extends Error{constructor(c){super("validation failed"),this.errors=c,this.ajv=this.validation=!0}}return Ie.default=e,Ie}var Ce={},jr;function Et(){if(jr)return Ce;jr=1,Object.defineProperty(Ce,"__esModule",{value:!0});const e=wt();class t extends Error{constructor(o,f,n,m){super(m||`can't resolve reference ${n} from id ${f}`),this.missingRef=(0,e.resolveUrl)(o,f,n),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(o,this.missingRef))}}return Ce.default=t,Ce}var ae={},Nr;function Xt(){if(Nr)return ae;Nr=1,Object.defineProperty(ae,"__esModule",{value:!0}),ae.resolveSchema=ae.getCompilingSchema=ae.resolveRef=ae.compileSchema=ae.SchemaEnv=void 0;const e=J(),t=Qt(),c=$e(),o=wt(),f=Q(),n=bt();class m{constructor(d){var r;this.refs={},this.dynamicAnchors={};let l;typeof d.schema=="object"&&(l=d.schema),this.schema=d.schema,this.schemaId=d.schemaId,this.root=d.root||this,this.baseId=(r=d.baseId)!==null&&r!==void 0?r:(0,o.normalizeId)(l?.[d.schemaId||"$id"]),this.schemaPath=d.schemaPath,this.localRefs=d.localRefs,this.meta=d.meta,this.$async=l?.$async,this.refs={}}}ae.SchemaEnv=m;function u(a){const d=s.call(this,a);if(d)return d;const r=(0,o.getFullPath)(this.opts.uriResolver,a.root.baseId),{es5:l,lines:w}=this.opts.code,{ownProperties:i}=this.opts,y=new e.CodeGen(this.scope,{es5:l,lines:w,ownProperties:i});let E;a.$async&&(E=y.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const O=y.scopeName("validate");a.validateName=O;const C={gen:y,allErrors:this.opts.allErrors,data:c.default.data,parentData:c.default.parentData,parentDataProperty:c.default.parentDataProperty,dataNames:[c.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:y.scopeValue("schema",this.opts.code.source===!0?{ref:a.schema,code:(0,e.stringify)(a.schema)}:{ref:a.schema}),validateName:O,ValidationError:E,schema:a.schema,schemaEnv:a,rootId:r,baseId:a.baseId||r,schemaPath:e.nil,errSchemaPath:a.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let M;try{this._compilations.add(a),(0,n.validateFunctionCode)(C),y.optimize(this.opts.code.optimize);const V=y.toString();M=`${y.scopeRefs(c.default.scope)}return ${V}`,this.opts.code.process&&(M=this.opts.code.process(M,a));const z=new Function(`${c.default.self}`,`${c.default.scope}`,M)(this,this.scope.get());if(this.scope.value(O,{ref:z}),z.errors=null,z.schema=a.schema,z.schemaEnv=a,a.$async&&(z.$async=!0),this.opts.code.source===!0&&(z.source={validateName:O,validateCode:V,scopeValues:y._values}),this.opts.unevaluated){const{props:W,items:x}=C;z.evaluated={props:W instanceof e.Name?void 0:W,items:x instanceof e.Name?void 0:x,dynamicProps:W instanceof e.Name,dynamicItems:x instanceof e.Name},z.source&&(z.source.evaluated=(0,e.stringify)(z.evaluated))}return a.validate=z,a}catch(V){throw delete a.validate,delete a.validateName,M&&this.logger.error("Error compiling schema, function code:",M),V}finally{this._compilations.delete(a)}}ae.compileSchema=u;function h(a,d,r){var l;r=(0,o.resolveUrl)(this.opts.uriResolver,d,r);const w=a.refs[r];if(w)return w;let i=$.call(this,a,r);if(i===void 0){const y=(l=a.localRefs)===null||l===void 0?void 0:l[r],{schemaId:E}=this.opts;y&&(i=new m({schema:y,schemaId:E,root:a,baseId:d}))}if(i!==void 0)return a.refs[r]=_.call(this,i)}ae.resolveRef=h;function _(a){return(0,o.inlineRef)(a.schema,this.opts.inlineRefs)?a.schema:a.validate?a:u.call(this,a)}function s(a){for(const d of this._compilations)if(S(d,a))return d}ae.getCompilingSchema=s;function S(a,d){return a.schema===d.schema&&a.root===d.root&&a.baseId===d.baseId}function $(a,d){let r;for(;typeof(r=this.refs[d])=="string";)d=r;return r||this.schemas[d]||v.call(this,a,d)}function v(a,d){const r=this.opts.uriResolver.parse(d),l=(0,o._getFullPath)(this.opts.uriResolver,r);let w=(0,o.getFullPath)(this.opts.uriResolver,a.baseId,void 0);if(Object.keys(a.schema).length>0&&l===w)return b.call(this,r,a);const i=(0,o.normalizeId)(l),y=this.refs[i]||this.schemas[i];if(typeof y=="string"){const E=v.call(this,a,y);return typeof E?.schema!="object"?void 0:b.call(this,r,E)}if(typeof y?.schema=="object"){if(y.validate||u.call(this,y),i===(0,o.normalizeId)(d)){const{schema:E}=y,{schemaId:O}=this.opts,C=E[O];return C&&(w=(0,o.resolveUrl)(this.opts.uriResolver,w,C)),new m({schema:E,schemaId:O,root:a,baseId:w})}return b.call(this,r,y)}}ae.resolveSchema=v;const g=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function b(a,{baseId:d,schema:r,root:l}){var w;if(((w=a.fragment)===null||w===void 0?void 0:w[0])!=="/")return;for(const E of a.fragment.slice(1).split("/")){if(typeof r=="boolean")return;const O=r[(0,f.unescapeFragment)(E)];if(O===void 0)return;r=O;const C=typeof r=="object"&&r[this.opts.schemaId];!g.has(E)&&C&&(d=(0,o.resolveUrl)(this.opts.uriResolver,d,C))}let i;if(typeof r!="boolean"&&r.$ref&&!(0,f.schemaHasRulesButRef)(r,this.RULES)){const E=(0,o.resolveUrl)(this.opts.uriResolver,d,r.$ref);i=v.call(this,l,E)}const{schemaId:y}=this.opts;if(i=i||new m({schema:r,schemaId:y,root:l,baseId:d}),i.schema!==i.root.schema)return i}return ae}const us="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",cs="Meta-schema for $data reference (JSON AnySchema extension proposal)",ls="object",ds=["$data"],fs={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},hs=!1,ps={$id:us,description:cs,type:ls,required:ds,properties:fs,additionalProperties:hs};var Ae={},Oe={exports:{}},At,Or;function Cn(){if(Or)return At;Or=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=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);function c($){let v="",g=0,b=0;for(b=0;b<$.length;b++)if(g=$[b].charCodeAt(0),g!==48){if(!(g>=48&&g<=57||g>=65&&g<=70||g>=97&&g<=102))return"";v+=$[b];break}for(b+=1;b<$.length;b++){if(g=$[b].charCodeAt(0),!(g>=48&&g<=57||g>=65&&g<=70||g>=97&&g<=102))return"";v+=$[b]}return v}const o=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function f($){return $.length=0,!0}function n($,v,g){if($.length){const b=c($);if(b!=="")v.push(b);else return g.error=!0,!1;$.length=0}return!0}function m($){let v=0;const g={error:!1,address:"",zone:""},b=[],a=[];let d=!1,r=!1,l=n;for(let w=0;w<$.length;w++){const i=$[w];if(!(i==="["||i==="]"))if(i===":"){if(d===!0&&(r=!0),!l(a,b,g))break;if(++v>7){g.error=!0;break}w>0&&$[w-1]===":"&&(d=!0),b.push(":");continue}else if(i==="%"){if(!l(a,b,g))break;l=f}else{a.push(i);continue}}return a.length&&(l===f?g.zone=a.join(""):r?b.push(a.join("")):b.push(c(a))),g.address=b.join(""),g}function u($){if(h($,":")<2)return{host:$,isIPV6:!1};const v=m($);if(v.error)return{host:$,isIPV6:!1};{let g=v.address,b=v.address;return v.zone&&(g+="%"+v.zone,b+="%25"+v.zone),{host:g,isIPV6:!0,escapedHost:b}}}function h($,v){let g=0;for(let b=0;b<$.length;b++)$[b]===v&&g++;return g}function _($){let v=$;const g=[];let b=-1,a=0;for(;a=v.length;){if(a===1){if(v===".")break;if(v==="/"){g.push("/");break}else{g.push(v);break}}else if(a===2){if(v[0]==="."){if(v[1]===".")break;if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&(v[1]==="."||v[1]==="/")){g.push("/");break}}else if(a===3&&v==="/.."){g.length!==0&&g.pop(),g.push("/");break}if(v[0]==="."){if(v[1]==="."){if(v[2]==="/"){v=v.slice(3);continue}}else if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&v[1]==="."){if(v[2]==="/"){v=v.slice(2);continue}else if(v[2]==="."&&v[3]==="/"){v=v.slice(3),g.length!==0&&g.pop();continue}}if((b=v.indexOf("/",1))===-1){g.push(v);break}else g.push(v.slice(0,b)),v=v.slice(b)}return g.join("")}function s($,v){const g=v!==!0?escape:unescape;return $.scheme!==void 0&&($.scheme=g($.scheme)),$.userinfo!==void 0&&($.userinfo=g($.userinfo)),$.host!==void 0&&($.host=g($.host)),$.path!==void 0&&($.path=g($.path)),$.query!==void 0&&($.query=g($.query)),$.fragment!==void 0&&($.fragment=g($.fragment)),$}function S($){const v=[];if($.userinfo!==void 0&&(v.push($.userinfo),v.push("@")),$.host!==void 0){let g=unescape($.host);if(!t(g)){const b=u(g);b.isIPV6===!0?g=`[${b.escapedHost}]`:g=$.host}v.push(g)}return(typeof $.port=="number"||typeof $.port=="string")&&(v.push(":"),v.push(String($.port))),v.length?v.join(""):void 0}return At={nonSimpleDomain:o,recomposeAuthority:S,normalizeComponentEncoding:s,removeDotSegments:_,isIPv4:t,isUUID:e,normalizeIPv6:u,stringArrayToHexStripped:c},At}var Dt,Tr;function ms(){if(Tr)return Dt;Tr=1;const{isUUID:e}=Cn(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,c=["http","https","ws","wss","urn","urn:uuid"];function o(i){return c.indexOf(i)!==-1}function f(i){return i.secure===!0?!0:i.secure===!1?!1:i.scheme?i.scheme.length===3&&(i.scheme[0]==="w"||i.scheme[0]==="W")&&(i.scheme[1]==="s"||i.scheme[1]==="S")&&(i.scheme[2]==="s"||i.scheme[2]==="S"):!1}function n(i){return i.host||(i.error=i.error||"HTTP URIs must have a host."),i}function m(i){const y=String(i.scheme).toLowerCase()==="https";return(i.port===(y?443:80)||i.port==="")&&(i.port=void 0),i.path||(i.path="/"),i}function u(i){return i.secure=f(i),i.resourceName=(i.path||"/")+(i.query?"?"+i.query:""),i.path=void 0,i.query=void 0,i}function h(i){if((i.port===(f(i)?443:80)||i.port==="")&&(i.port=void 0),typeof i.secure=="boolean"&&(i.scheme=i.secure?"wss":"ws",i.secure=void 0),i.resourceName){const[y,E]=i.resourceName.split("?");i.path=y&&y!=="/"?y:void 0,i.query=E,i.resourceName=void 0}return i.fragment=void 0,i}function _(i,y){if(!i.path)return i.error="URN can not be parsed",i;const E=i.path.match(t);if(E){const O=y.scheme||i.scheme||"urn";i.nid=E[1].toLowerCase(),i.nss=E[2];const C=`${O}:${y.nid||i.nid}`,M=w(C);i.path=void 0,M&&(i=M.parse(i,y))}else i.error=i.error||"URN can not be parsed.";return i}function s(i,y){if(i.nid===void 0)throw new Error("URN without nid cannot be serialized");const E=y.scheme||i.scheme||"urn",O=i.nid.toLowerCase(),C=`${E}:${y.nid||O}`,M=w(C);M&&(i=M.serialize(i,y));const V=i,K=i.nss;return V.path=`${O||y.nid}:${K}`,y.skipEscape=!0,V}function S(i,y){const E=i;return E.uuid=E.nss,E.nss=void 0,!y.tolerant&&(!E.uuid||!e(E.uuid))&&(E.error=E.error||"UUID is not valid."),E}function $(i){const y=i;return y.nss=(i.uuid||"").toLowerCase(),y}const v={scheme:"http",domainHost:!0,parse:n,serialize:m},g={scheme:"https",domainHost:v.domainHost,parse:n,serialize:m},b={scheme:"ws",domainHost:!0,parse:u,serialize:h},a={scheme:"wss",domainHost:b.domainHost,parse:b.parse,serialize:b.serialize},l={http:v,https:g,ws:b,wss:a,urn:{scheme:"urn",parse:_,serialize:s,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:S,serialize:$,skipNormalize:!0}};Object.setPrototypeOf(l,null);function w(i){return i&&(l[i]||l[i.toLowerCase()])||void 0}return Dt={wsIsSecure:f,SCHEMES:l,isValidSchemeName:o,getSchemeHandler:w},Dt}var kr;function ys(){if(kr)return Oe.exports;kr=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:c,normalizeComponentEncoding:o,isIPv4:f,nonSimpleDomain:n}=Cn(),{SCHEMES:m,getSchemeHandler:u}=ms();function h(a,d){return typeof a=="string"?a=$(g(a,d),d):typeof a=="object"&&(a=g($(a,d),d)),a}function _(a,d,r){const l=r?Object.assign({scheme:"null"},r):{scheme:"null"},w=s(g(a,l),g(d,l),l,!0);return l.skipEscape=!0,$(w,l)}function s(a,d,r,l){const w={};return l||(a=g($(a,r),r),d=g($(d,r),r)),r=r||{},!r.tolerant&&d.scheme?(w.scheme=d.scheme,w.userinfo=d.userinfo,w.host=d.host,w.port=d.port,w.path=t(d.path||""),w.query=d.query):(d.userinfo!==void 0||d.host!==void 0||d.port!==void 0?(w.userinfo=d.userinfo,w.host=d.host,w.port=d.port,w.path=t(d.path||""),w.query=d.query):(d.path?(d.path[0]==="/"?w.path=t(d.path):((a.userinfo!==void 0||a.host!==void 0||a.port!==void 0)&&!a.path?w.path="/"+d.path:a.path?w.path=a.path.slice(0,a.path.lastIndexOf("/")+1)+d.path:w.path=d.path,w.path=t(w.path)),w.query=d.query):(w.path=a.path,d.query!==void 0?w.query=d.query:w.query=a.query),w.userinfo=a.userinfo,w.host=a.host,w.port=a.port),w.scheme=a.scheme),w.fragment=d.fragment,w}function S(a,d,r){return typeof a=="string"?(a=unescape(a),a=$(o(g(a,r),!0),{...r,skipEscape:!0})):typeof a=="object"&&(a=$(o(a,!0),{...r,skipEscape:!0})),typeof d=="string"?(d=unescape(d),d=$(o(g(d,r),!0),{...r,skipEscape:!0})):typeof d=="object"&&(d=$(o(d,!0),{...r,skipEscape:!0})),a.toLowerCase()===d.toLowerCase()}function $(a,d){const r={host:a.host,scheme:a.scheme,userinfo:a.userinfo,port:a.port,path:a.path,query:a.query,nid:a.nid,nss:a.nss,uuid:a.uuid,fragment:a.fragment,reference:a.reference,resourceName:a.resourceName,secure:a.secure,error:""},l=Object.assign({},d),w=[],i=u(l.scheme||r.scheme);i&&i.serialize&&i.serialize(r,l),r.path!==void 0&&(l.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),l.reference!=="suffix"&&r.scheme&&w.push(r.scheme,":");const y=c(r);if(y!==void 0&&(l.reference!=="suffix"&&w.push("//"),w.push(y),r.path&&r.path[0]!=="/"&&w.push("/")),r.path!==void 0){let E=r.path;!l.absolutePath&&(!i||!i.absolutePath)&&(E=t(E)),y===void 0&&E[0]==="/"&&E[1]==="/"&&(E="/%2F"+E.slice(2)),w.push(E)}return r.query!==void 0&&w.push("?",r.query),r.fragment!==void 0&&w.push("#",r.fragment),w.join("")}const v=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function g(a,d){const r=Object.assign({},d),l={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let w=!1;r.reference==="suffix"&&(r.scheme?a=r.scheme+":"+a:a="//"+a);const i=a.match(v);if(i){if(l.scheme=i[1],l.userinfo=i[3],l.host=i[4],l.port=parseInt(i[5],10),l.path=i[6]||"",l.query=i[7],l.fragment=i[8],isNaN(l.port)&&(l.port=i[5]),l.host)if(f(l.host)===!1){const O=e(l.host);l.host=O.host.toLowerCase(),w=O.isIPV6}else w=!0;l.scheme===void 0&&l.userinfo===void 0&&l.host===void 0&&l.port===void 0&&l.query===void 0&&!l.path?l.reference="same-document":l.scheme===void 0?l.reference="relative":l.fragment===void 0?l.reference="absolute":l.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==l.reference&&(l.error=l.error||"URI is not a "+r.reference+" reference.");const y=u(r.scheme||l.scheme);if(!r.unicodeSupport&&(!y||!y.unicodeSupport)&&l.host&&(r.domainHost||y&&y.domainHost)&&w===!1&&n(l.host))try{l.host=URL.domainToASCII(l.host.toLowerCase())}catch(E){l.error=l.error||"Host's domain name can not be converted to ASCII: "+E}(!y||y&&!y.skipNormalize)&&(a.indexOf("%")!==-1&&(l.scheme!==void 0&&(l.scheme=unescape(l.scheme)),l.host!==void 0&&(l.host=unescape(l.host))),l.path&&(l.path=escape(unescape(l.path))),l.fragment&&(l.fragment=encodeURI(decodeURIComponent(l.fragment)))),y&&y.parse&&y.parse(l,r)}else l.error=l.error||"URI can not be parsed.";return l}const b={SCHEMES:m,normalize:h,resolve:_,resolveComponent:s,equal:S,serialize:$,parse:g};return Oe.exports=b,Oe.exports.default=b,Oe.exports.fastUri=b,Oe.exports}var qr;function gs(){if(qr)return Ae;qr=1,Object.defineProperty(Ae,"__esModule",{value:!0});const e=ys();return e.code='require("ajv/dist/runtime/uri").default',Ae.default=e,Ae}var Ir;function _s(){return Ir||(Ir=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=bt();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var c=J();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});const o=Qt(),f=Et(),n=kn(),m=Xt(),u=J(),h=wt(),_=_t(),s=Q(),S=ps,$=gs(),v=(A,j)=>new RegExp(A,j);v.code="new RegExp";const g=["removeAdditional","useDefaults","coerceTypes"],b=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),a={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."},d={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},r=200;function l(A){var j,I,T,p,P,k,L,U,X,B,R,N,q,D,F,G,ee,le,oe,ie,te,Se,ce,St,Pt;const je=A.strict,Rt=(j=A.code)===null||j===void 0?void 0:j.optimize,tr=Rt===!0||Rt===void 0?1:Rt||0,rr=(T=(I=A.code)===null||I===void 0?void 0:I.regExp)!==null&&T!==void 0?T:v,Qn=(p=A.uriResolver)!==null&&p!==void 0?p:$.default;return{strictSchema:(k=(P=A.strictSchema)!==null&&P!==void 0?P:je)!==null&&k!==void 0?k:!0,strictNumbers:(U=(L=A.strictNumbers)!==null&&L!==void 0?L:je)!==null&&U!==void 0?U:!0,strictTypes:(B=(X=A.strictTypes)!==null&&X!==void 0?X:je)!==null&&B!==void 0?B:"log",strictTuples:(N=(R=A.strictTuples)!==null&&R!==void 0?R:je)!==null&&N!==void 0?N:"log",strictRequired:(D=(q=A.strictRequired)!==null&&q!==void 0?q:je)!==null&&D!==void 0?D:!1,code:A.code?{...A.code,optimize:tr,regExp:rr}:{optimize:tr,regExp:rr},loopRequired:(F=A.loopRequired)!==null&&F!==void 0?F:r,loopEnum:(G=A.loopEnum)!==null&&G!==void 0?G:r,meta:(ee=A.meta)!==null&&ee!==void 0?ee:!0,messages:(le=A.messages)!==null&&le!==void 0?le:!0,inlineRefs:(oe=A.inlineRefs)!==null&&oe!==void 0?oe:!0,schemaId:(ie=A.schemaId)!==null&&ie!==void 0?ie:"$id",addUsedSchema:(te=A.addUsedSchema)!==null&&te!==void 0?te:!0,validateSchema:(Se=A.validateSchema)!==null&&Se!==void 0?Se:!0,validateFormats:(ce=A.validateFormats)!==null&&ce!==void 0?ce:!0,unicodeRegExp:(St=A.unicodeRegExp)!==null&&St!==void 0?St:!0,int32range:(Pt=A.int32range)!==null&&Pt!==void 0?Pt:!0,uriResolver:Qn}}class w{constructor(j={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,j=this.opts={...j,...l(j)};const{es5:I,lines:T}=this.opts.code;this.scope=new u.ValueScope({scope:{},prefixes:b,es5:I,lines:T}),this.logger=K(j.logger);const p=j.validateFormats;j.validateFormats=!1,this.RULES=(0,n.getRules)(),i.call(this,a,j,"NOT SUPPORTED"),i.call(this,d,j,"DEPRECATED","warn"),this._metaOpts=M.call(this),j.formats&&O.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),j.keywords&&C.call(this,j.keywords),typeof j.meta=="object"&&this.addMetaSchema(j.meta),E.call(this),j.validateFormats=p}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:j,meta:I,schemaId:T}=this.opts;let p=S;T==="id"&&(p={...S},p.id=p.$id,delete p.$id),I&&j&&this.addMetaSchema(p,p[T],!1)}defaultMeta(){const{meta:j,schemaId:I}=this.opts;return this.opts.defaultMeta=typeof j=="object"?j[I]||j:void 0}validate(j,I){let T;if(typeof j=="string"){if(T=this.getSchema(j),!T)throw new Error(`no schema with key or ref "${j}"`)}else T=this.compile(j);const p=T(I);return"$async"in T||(this.errors=T.errors),p}compile(j,I){const T=this._addSchema(j,I);return T.validate||this._compileSchemaEnv(T)}compileAsync(j,I){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:T}=this.opts;return p.call(this,j,I);async function p(B,R){await P.call(this,B.$schema);const N=this._addSchema(B,R);return N.validate||k.call(this,N)}async function P(B){B&&!this.getSchema(B)&&await p.call(this,{$ref:B},!0)}async function k(B){try{return this._compileSchemaEnv(B)}catch(R){if(!(R instanceof f.default))throw R;return L.call(this,R),await U.call(this,R.missingSchema),k.call(this,B)}}function L({missingSchema:B,missingRef:R}){if(this.refs[B])throw new Error(`AnySchema ${B} is loaded but ${R} cannot be resolved`)}async function U(B){const R=await X.call(this,B);this.refs[B]||await P.call(this,R.$schema),this.refs[B]||this.addSchema(R,B,I)}async function X(B){const R=this._loading[B];if(R)return R;try{return await(this._loading[B]=T(B))}finally{delete this._loading[B]}}}addSchema(j,I,T,p=this.opts.validateSchema){if(Array.isArray(j)){for(const k of j)this.addSchema(k,void 0,T,p);return this}let P;if(typeof j=="object"){const{schemaId:k}=this.opts;if(P=j[k],P!==void 0&&typeof P!="string")throw new Error(`schema ${k} must be string`)}return I=(0,h.normalizeId)(I||P),this._checkUnique(I),this.schemas[I]=this._addSchema(j,T,I,p,!0),this}addMetaSchema(j,I,T=this.opts.validateSchema){return this.addSchema(j,I,!0,T),this}validateSchema(j,I){if(typeof j=="boolean")return!0;let T;if(T=j.$schema,T!==void 0&&typeof T!="string")throw new Error("$schema must be a string");if(T=T||this.opts.defaultMeta||this.defaultMeta(),!T)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const p=this.validate(T,j);if(!p&&I){const P="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(P);else throw new Error(P)}return p}getSchema(j){let I;for(;typeof(I=y.call(this,j))=="string";)j=I;if(I===void 0){const{schemaId:T}=this.opts,p=new m.SchemaEnv({schema:{},schemaId:T});if(I=m.resolveSchema.call(this,p,j),!I)return;this.refs[j]=I}return I.validate||this._compileSchemaEnv(I)}removeSchema(j){if(j instanceof RegExp)return this._removeAllSchemas(this.schemas,j),this._removeAllSchemas(this.refs,j),this;switch(typeof j){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const I=y.call(this,j);return typeof I=="object"&&this._cache.delete(I.schema),delete this.schemas[j],delete this.refs[j],this}case"object":{const I=j;this._cache.delete(I);let T=j[this.opts.schemaId];return T&&(T=(0,h.normalizeId)(T),delete this.schemas[T],delete this.refs[T]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(j){for(const I of j)this.addKeyword(I);return this}addKeyword(j,I){let T;if(typeof j=="string")T=j,typeof I=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),I.keyword=T);else if(typeof j=="object"&&I===void 0){if(I=j,T=I.keyword,Array.isArray(T)&&!T.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(W.call(this,T,I),!I)return(0,s.eachItem)(T,P=>x.call(this,P)),this;pe.call(this,I);const p={...I,type:(0,_.getJSONTypes)(I.type),schemaType:(0,_.getJSONTypes)(I.schemaType)};return(0,s.eachItem)(T,p.type.length===0?P=>x.call(this,P,p):P=>p.type.forEach(k=>x.call(this,P,p,k))),this}getKeyword(j){const I=this.RULES.all[j];return typeof I=="object"?I.definition:!!I}removeKeyword(j){const{RULES:I}=this;delete I.keywords[j],delete I.all[j];for(const T of I.rules){const p=T.rules.findIndex(P=>P.keyword===j);p>=0&&T.rules.splice(p,1)}return this}addFormat(j,I){return typeof I=="string"&&(I=new RegExp(I)),this.formats[j]=I,this}errorsText(j=this.errors,{separator:I=", ",dataVar:T="data"}={}){return!j||j.length===0?"No errors":j.map(p=>`${T}${p.instancePath} ${p.message}`).reduce((p,P)=>p+I+P)}$dataMetaSchema(j,I){const T=this.RULES.all;j=JSON.parse(JSON.stringify(j));for(const p of I){const P=p.split("/").slice(1);let k=j;for(const L of P)k=k[L];for(const L in T){const U=T[L];if(typeof U!="object")continue;const{$data:X}=U.definition,B=k[L];X&&B&&(k[L]=_e(B))}}return j}_removeAllSchemas(j,I){for(const T in j){const p=j[T];(!I||I.test(T))&&(typeof p=="string"?delete j[T]:p&&!p.meta&&(this._cache.delete(p.schema),delete j[T]))}}_addSchema(j,I,T,p=this.opts.validateSchema,P=this.opts.addUsedSchema){let k;const{schemaId:L}=this.opts;if(typeof j=="object")k=j[L];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof j!="boolean")throw new Error("schema must be object or boolean")}let U=this._cache.get(j);if(U!==void 0)return U;T=(0,h.normalizeId)(k||T);const X=h.getSchemaRefs.call(this,j,T);return U=new m.SchemaEnv({schema:j,schemaId:L,meta:I,baseId:T,localRefs:X}),this._cache.set(U.schema,U),P&&!T.startsWith("#")&&(T&&this._checkUnique(T),this.refs[T]=U),p&&this.validateSchema(j,!0),U}_checkUnique(j){if(this.schemas[j]||this.refs[j])throw new Error(`schema with key or id "${j}" already exists`)}_compileSchemaEnv(j){if(j.meta?this._compileMetaSchema(j):m.compileSchema.call(this,j),!j.validate)throw new Error("ajv implementation error");return j.validate}_compileMetaSchema(j){const I=this.opts;this.opts=this._metaOpts;try{m.compileSchema.call(this,j)}finally{this.opts=I}}}w.ValidationError=o.default,w.MissingRefError=f.default,e.default=w;function i(A,j,I,T="error"){for(const p in A){const P=p;P in j&&this.logger[T](`${I}: option ${p}. ${A[P]}`)}}function y(A){return A=(0,h.normalizeId)(A),this.schemas[A]||this.refs[A]}function E(){const A=this.opts.schemas;if(A)if(Array.isArray(A))this.addSchema(A);else for(const j in A)this.addSchema(A[j],j)}function O(){for(const A in this.opts.formats){const j=this.opts.formats[A];j&&this.addFormat(A,j)}}function C(A){if(Array.isArray(A)){this.addVocabulary(A);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const j in A){const I=A[j];I.keyword||(I.keyword=j),this.addKeyword(I)}}function M(){const A={...this.opts};for(const j of g)delete A[j];return A}const V={log(){},warn(){},error(){}};function K(A){if(A===!1)return V;if(A===void 0)return console;if(A.log&&A.warn&&A.error)return A;throw new Error("logger must implement log, warn and error methods")}const z=/^[a-z_$][a-z0-9_$:-]*$/i;function W(A,j){const{RULES:I}=this;if((0,s.eachItem)(A,T=>{if(I.keywords[T])throw new Error(`Keyword ${T} is already defined`);if(!z.test(T))throw new Error(`Keyword ${T} has invalid name`)}),!!j&&j.$data&&!("code"in j||"validate"in j))throw new Error('$data keyword must have "code" or "validate" function')}function x(A,j,I){var T;const p=j?.post;if(I&&p)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:P}=this;let k=p?P.post:P.rules.find(({type:U})=>U===I);if(k||(k={type:I,rules:[]},P.rules.push(k)),P.keywords[A]=!0,!j)return;const L={keyword:A,definition:{...j,type:(0,_.getJSONTypes)(j.type),schemaType:(0,_.getJSONTypes)(j.schemaType)}};j.before?he.call(this,k,L,j.before):k.rules.push(L),P.all[A]=L,(T=j.implements)===null||T===void 0||T.forEach(U=>this.addKeyword(U))}function he(A,j,I){const T=A.rules.findIndex(p=>p.keyword===I);T>=0?A.rules.splice(T,0,j):(A.rules.push(j),this.logger.warn(`rule ${I} is not defined`))}function pe(A){let{metaSchema:j}=A;j!==void 0&&(A.$data&&this.opts.$data&&(j=_e(j)),A.validateSchema=this.compile(j,!0))}const Z={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function _e(A){return{anyOf:[A,Z]}}})(Nt)),Nt}var De={},Me={},Ve={},Cr;function vs(){if(Cr)return Ve;Cr=1,Object.defineProperty(Ve,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Ve.default=e,Ve}var ve={},Ar;function $s(){if(Ar)return ve;Ar=1,Object.defineProperty(ve,"__esModule",{value:!0}),ve.callRef=ve.getValidate=void 0;const e=Et(),t=fe(),c=J(),o=$e(),f=Xt(),n=Q(),m={keyword:"$ref",schemaType:"string",code(_){const{gen:s,schema:S,it:$}=_,{baseId:v,schemaEnv:g,validateName:b,opts:a,self:d}=$,{root:r}=g;if((S==="#"||S==="#/")&&v===r.baseId)return w();const l=f.resolveRef.call(d,r,v,S);if(l===void 0)throw new e.default($.opts.uriResolver,v,S);if(l instanceof f.SchemaEnv)return i(l);return y(l);function w(){if(g===r)return h(_,b,g,g.$async);const E=s.scopeValue("root",{ref:r});return h(_,(0,c._)`${E}.validate`,r,r.$async)}function i(E){const O=u(_,E);h(_,O,E,E.$async)}function y(E){const O=s.scopeValue("schema",a.code.source===!0?{ref:E,code:(0,c.stringify)(E)}:{ref:E}),C=s.name("valid"),M=_.subschema({schema:E,dataTypes:[],schemaPath:c.nil,topSchemaRef:O,errSchemaPath:S},C);_.mergeEvaluated(M),_.ok(C)}}};function u(_,s){const{gen:S}=_;return s.validate?S.scopeValue("validate",{ref:s.validate}):(0,c._)`${S.scopeValue("wrapper",{ref:s})}.validate`}ve.getValidate=u;function h(_,s,S,$){const{gen:v,it:g}=_,{allErrors:b,schemaEnv:a,opts:d}=g,r=d.passContext?o.default.this:c.nil;$?l():w();function l(){if(!a.$async)throw new Error("async schema referenced by sync schema");const E=v.let("valid");v.try(()=>{v.code((0,c._)`await ${(0,t.callValidateCode)(_,s,r)}`),y(s),b||v.assign(E,!0)},O=>{v.if((0,c._)`!(${O} instanceof ${g.ValidationError})`,()=>v.throw(O)),i(O),b||v.assign(E,!1)}),_.ok(E)}function w(){_.result((0,t.callValidateCode)(_,s,r),()=>y(s),()=>i(s))}function i(E){const O=(0,c._)`${E}.errors`;v.assign(o.default.vErrors,(0,c._)`${o.default.vErrors} === null ? ${O} : ${o.default.vErrors}.concat(${O})`),v.assign(o.default.errors,(0,c._)`${o.default.vErrors}.length`)}function y(E){var O;if(!g.opts.unevaluated)return;const C=(O=S?.validate)===null||O===void 0?void 0:O.evaluated;if(g.props!==!0)if(C&&!C.dynamicProps)C.props!==void 0&&(g.props=n.mergeEvaluated.props(v,C.props,g.props));else{const M=v.var("props",(0,c._)`${E}.evaluated.props`);g.props=n.mergeEvaluated.props(v,M,g.props,c.Name)}if(g.items!==!0)if(C&&!C.dynamicItems)C.items!==void 0&&(g.items=n.mergeEvaluated.items(v,C.items,g.items));else{const M=v.var("items",(0,c._)`${E}.evaluated.items`);g.items=n.mergeEvaluated.items(v,M,g.items,c.Name)}}}return ve.callRef=h,ve.default=m,ve}var Dr;function ws(){if(Dr)return Me;Dr=1,Object.defineProperty(Me,"__esModule",{value:!0});const e=vs(),t=$s(),c=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return Me.default=c,Me}var Le={},Fe={},Mr;function bs(){if(Mr)return Fe;Mr=1,Object.defineProperty(Fe,"__esModule",{value:!0});const e=J(),t=e.operators,c={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},o={message:({keyword:n,schemaCode:m})=>(0,e.str)`must be ${c[n].okStr} ${m}`,params:({keyword:n,schemaCode:m})=>(0,e._)`{comparison: ${c[n].okStr}, limit: ${m}}`},f={keyword:Object.keys(c),type:"number",schemaType:"number",$data:!0,error:o,code(n){const{keyword:m,data:u,schemaCode:h}=n;n.fail$data((0,e._)`${u} ${c[m].fail} ${h} || isNaN(${u})`)}};return Fe.default=f,Fe}var Ue={},Vr;function Es(){if(Vr)return Ue;Vr=1,Object.defineProperty(Ue,"__esModule",{value:!0});const e=J(),c={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:o})=>(0,e.str)`must be multiple of ${o}`,params:({schemaCode:o})=>(0,e._)`{multipleOf: ${o}}`},code(o){const{gen:f,data:n,schemaCode:m,it:u}=o,h=u.opts.multipleOfPrecision,_=f.let("res"),s=h?(0,e._)`Math.abs(Math.round(${_}) - ${_}) > 1e-${h}`:(0,e._)`${_} !== parseInt(${_})`;o.fail$data((0,e._)`(${m} === 0 || (${_} = ${n}/${m}, ${s}))`)}};return Ue.default=c,Ue}var ze={},Ke={},Lr;function Ss(){if(Lr)return Ke;Lr=1,Object.defineProperty(Ke,"__esModule",{value:!0});function e(t){const c=t.length;let o=0,f=0,n;for(;f<c;)o++,n=t.charCodeAt(f++),n>=55296&&n<=56319&&f<c&&(n=t.charCodeAt(f),(n&64512)===56320&&f++);return o}return Ke.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Ke}var Fr;function Ps(){if(Fr)return ze;Fr=1,Object.defineProperty(ze,"__esModule",{value:!0});const e=J(),t=Q(),c=Ss(),f={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:m}){const u=n==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${u} than ${m} characters`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:m,data:u,schemaCode:h,it:_}=n,s=m==="maxLength"?e.operators.GT:e.operators.LT,S=_.opts.unicode===!1?(0,e._)`${u}.length`:(0,e._)`${(0,t.useFunc)(n.gen,c.default)}(${u})`;n.fail$data((0,e._)`${S} ${s} ${h}`)}};return ze.default=f,ze}var He={},Ur;function Rs(){if(Ur)return He;Ur=1,Object.defineProperty(He,"__esModule",{value:!0});const e=fe(),t=J(),o={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:f})=>(0,t.str)`must match pattern "${f}"`,params:({schemaCode:f})=>(0,t._)`{pattern: ${f}}`},code(f){const{data:n,$data:m,schema:u,schemaCode:h,it:_}=f,s=_.opts.unicodeRegExp?"u":"",S=m?(0,t._)`(new RegExp(${h}, ${s}))`:(0,e.usePattern)(f,u);f.fail$data((0,t._)`!${S}.test(${n})`)}};return He.default=o,He}var Ge={},zr;function js(){if(zr)return Ge;zr=1,Object.defineProperty(Ge,"__esModule",{value:!0});const e=J(),c={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:o,schemaCode:f}){const n=o==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${n} than ${f} properties`},params:({schemaCode:o})=>(0,e._)`{limit: ${o}}`},code(o){const{keyword:f,data:n,schemaCode:m}=o,u=f==="maxProperties"?e.operators.GT:e.operators.LT;o.fail$data((0,e._)`Object.keys(${n}).length ${u} ${m}`)}};return Ge.default=c,Ge}var Je={},Kr;function Ns(){if(Kr)return Je;Kr=1,Object.defineProperty(Je,"__esModule",{value:!0});const e=fe(),t=J(),c=Q(),f={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:n}})=>(0,t.str)`must have required property '${n}'`,params:({params:{missingProperty:n}})=>(0,t._)`{missingProperty: ${n}}`},code(n){const{gen:m,schema:u,schemaCode:h,data:_,$data:s,it:S}=n,{opts:$}=S;if(!s&&u.length===0)return;const v=u.length>=$.loopRequired;if(S.allErrors?g():b(),$.strictRequired){const r=n.parentSchema.properties,{definedProperties:l}=n.it;for(const w of u)if(r?.[w]===void 0&&!l.has(w)){const i=S.schemaEnv.baseId+S.errSchemaPath,y=`required property "${w}" is not defined at "${i}" (strictRequired)`;(0,c.checkStrictMode)(S,y,S.opts.strictRequired)}}function g(){if(v||s)n.block$data(t.nil,a);else for(const r of u)(0,e.checkReportMissingProp)(n,r)}function b(){const r=m.let("missing");if(v||s){const l=m.let("valid",!0);n.block$data(l,()=>d(r,l)),n.ok(l)}else m.if((0,e.checkMissingProp)(n,u,r)),(0,e.reportMissingProp)(n,r),m.else()}function a(){m.forOf("prop",h,r=>{n.setParams({missingProperty:r}),m.if((0,e.noPropertyInData)(m,_,r,$.ownProperties),()=>n.error())})}function d(r,l){n.setParams({missingProperty:r}),m.forOf(r,h,()=>{m.assign(l,(0,e.propertyInData)(m,_,r,$.ownProperties)),m.if((0,t.not)(l),()=>{n.error(),m.break()})},t.nil)}}};return Je.default=f,Je}var Be={},Hr;function Os(){if(Hr)return Be;Hr=1,Object.defineProperty(Be,"__esModule",{value:!0});const e=J(),c={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:o,schemaCode:f}){const n=o==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${n} than ${f} items`},params:({schemaCode:o})=>(0,e._)`{limit: ${o}}`},code(o){const{keyword:f,data:n,schemaCode:m}=o,u=f==="maxItems"?e.operators.GT:e.operators.LT;o.fail$data((0,e._)`${n}.length ${u} ${m}`)}};return Be.default=c,Be}var We={},Qe={},Gr;function Yt(){if(Gr)return Qe;Gr=1,Object.defineProperty(Qe,"__esModule",{value:!0});const e=In();return e.code='require("ajv/dist/runtime/equal").default',Qe.default=e,Qe}var Jr;function Ts(){if(Jr)return We;Jr=1,Object.defineProperty(We,"__esModule",{value:!0});const e=_t(),t=J(),c=Q(),o=Yt(),n={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:m,j:u}})=>(0,t.str)`must NOT have duplicate items (items ## ${u} and ${m} are identical)`,params:({params:{i:m,j:u}})=>(0,t._)`{i: ${m}, j: ${u}}`},code(m){const{gen:u,data:h,$data:_,schema:s,parentSchema:S,schemaCode:$,it:v}=m;if(!_&&!s)return;const g=u.let("valid"),b=S.items?(0,e.getSchemaTypes)(S.items):[];m.block$data(g,a,(0,t._)`${$} === false`),m.ok(g);function a(){const w=u.let("i",(0,t._)`${h}.length`),i=u.let("j");m.setParams({i:w,j:i}),u.assign(g,!0),u.if((0,t._)`${w} > 1`,()=>(d()?r:l)(w,i))}function d(){return b.length>0&&!b.some(w=>w==="object"||w==="array")}function r(w,i){const y=u.name("item"),E=(0,e.checkDataTypes)(b,y,v.opts.strictNumbers,e.DataType.Wrong),O=u.const("indices",(0,t._)`{}`);u.for((0,t._)`;${w}--;`,()=>{u.let(y,(0,t._)`${h}[${w}]`),u.if(E,(0,t._)`continue`),b.length>1&&u.if((0,t._)`typeof ${y} == "string"`,(0,t._)`${y} += "_"`),u.if((0,t._)`typeof ${O}[${y}] == "number"`,()=>{u.assign(i,(0,t._)`${O}[${y}]`),m.error(),u.assign(g,!1).break()}).code((0,t._)`${O}[${y}] = ${w}`)})}function l(w,i){const y=(0,c.useFunc)(u,o.default),E=u.name("outer");u.label(E).for((0,t._)`;${w}--;`,()=>u.for((0,t._)`${i} = ${w}; ${i}--;`,()=>u.if((0,t._)`${y}(${h}[${w}], ${h}[${i}])`,()=>{m.error(),u.assign(g,!1).break(E)})))}}};return We.default=n,We}var Xe={},Br;function ks(){if(Br)return Xe;Br=1,Object.defineProperty(Xe,"__esModule",{value:!0});const e=J(),t=Q(),c=Yt(),f={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:n})=>(0,e._)`{allowedValue: ${n}}`},code(n){const{gen:m,data:u,$data:h,schemaCode:_,schema:s}=n;h||s&&typeof s=="object"?n.fail$data((0,e._)`!${(0,t.useFunc)(m,c.default)}(${u}, ${_})`):n.fail((0,e._)`${s} !== ${u}`)}};return Xe.default=f,Xe}var Ye={},Wr;function qs(){if(Wr)return Ye;Wr=1,Object.defineProperty(Ye,"__esModule",{value:!0});const e=J(),t=Q(),c=Yt(),f={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:n})=>(0,e._)`{allowedValues: ${n}}`},code(n){const{gen:m,data:u,$data:h,schema:_,schemaCode:s,it:S}=n;if(!h&&_.length===0)throw new Error("enum must have non-empty array");const $=_.length>=S.opts.loopEnum;let v;const g=()=>v??(v=(0,t.useFunc)(m,c.default));let b;if($||h)b=m.let("valid"),n.block$data(b,a);else{if(!Array.isArray(_))throw new Error("ajv implementation error");const r=m.const("vSchema",s);b=(0,e.or)(..._.map((l,w)=>d(r,w)))}n.pass(b);function a(){m.assign(b,!1),m.forOf("v",s,r=>m.if((0,e._)`${g()}(${u}, ${r})`,()=>m.assign(b,!0).break()))}function d(r,l){const w=_[l];return typeof w=="object"&&w!==null?(0,e._)`${g()}(${u}, ${r}[${l}])`:(0,e._)`${u} === ${w}`}}};return Ye.default=f,Ye}var Qr;function Is(){if(Qr)return Le;Qr=1,Object.defineProperty(Le,"__esModule",{value:!0});const e=bs(),t=Es(),c=Ps(),o=Rs(),f=js(),n=Ns(),m=Os(),u=Ts(),h=ks(),_=qs(),s=[e.default,t.default,c.default,o.default,f.default,n.default,m.default,u.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},h.default,_.default];return Le.default=s,Le}var Ze={},Pe={},Xr;function An(){if(Xr)return Pe;Xr=1,Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.validateAdditionalItems=void 0;const e=J(),t=Q(),o={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:n}})=>(0,e.str)`must NOT have more than ${n} items`,params:({params:{len:n}})=>(0,e._)`{limit: ${n}}`},code(n){const{parentSchema:m,it:u}=n,{items:h}=m;if(!Array.isArray(h)){(0,t.checkStrictMode)(u,'"additionalItems" is ignored when "items" is not an array of schemas');return}f(n,h)}};function f(n,m){const{gen:u,schema:h,data:_,keyword:s,it:S}=n;S.items=!0;const $=u.const("len",(0,e._)`${_}.length`);if(h===!1)n.setParams({len:m.length}),n.pass((0,e._)`${$} <= ${m.length}`);else if(typeof h=="object"&&!(0,t.alwaysValidSchema)(S,h)){const g=u.var("valid",(0,e._)`${$} <= ${m.length}`);u.if((0,e.not)(g),()=>v(g)),n.ok(g)}function v(g){u.forRange("i",m.length,$,b=>{n.subschema({keyword:s,dataProp:b,dataPropType:t.Type.Num},g),S.allErrors||u.if((0,e.not)(g),()=>u.break())})}}return Pe.validateAdditionalItems=f,Pe.default=o,Pe}var xe={},Re={},Yr;function Dn(){if(Yr)return Re;Yr=1,Object.defineProperty(Re,"__esModule",{value:!0}),Re.validateTuple=void 0;const e=J(),t=Q(),c=fe(),o={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(n){const{schema:m,it:u}=n;if(Array.isArray(m))return f(n,"additionalItems",m);u.items=!0,!(0,t.alwaysValidSchema)(u,m)&&n.ok((0,c.validateArray)(n))}};function f(n,m,u=n.schema){const{gen:h,parentSchema:_,data:s,keyword:S,it:$}=n;b(_),$.opts.unevaluated&&u.length&&$.items!==!0&&($.items=t.mergeEvaluated.items(h,u.length,$.items));const v=h.name("valid"),g=h.const("len",(0,e._)`${s}.length`);u.forEach((a,d)=>{(0,t.alwaysValidSchema)($,a)||(h.if((0,e._)`${g} > ${d}`,()=>n.subschema({keyword:S,schemaProp:d,dataProp:d},v)),n.ok(v))});function b(a){const{opts:d,errSchemaPath:r}=$,l=u.length,w=l===a.minItems&&(l===a.maxItems||a[m]===!1);if(d.strictTuples&&!w){const i=`"${S}" is ${l}-tuple, but minItems or maxItems/${m} are not specified or different at path "${r}"`;(0,t.checkStrictMode)($,i,d.strictTuples)}}}return Re.validateTuple=f,Re.default=o,Re}var Zr;function Cs(){if(Zr)return xe;Zr=1,Object.defineProperty(xe,"__esModule",{value:!0});const e=Dn(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:c=>(0,e.validateTuple)(c,"items")};return xe.default=t,xe}var et={},xr;function As(){if(xr)return et;xr=1,Object.defineProperty(et,"__esModule",{value:!0});const e=J(),t=Q(),c=fe(),o=An(),n={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:m}})=>(0,e.str)`must NOT have more than ${m} items`,params:({params:{len:m}})=>(0,e._)`{limit: ${m}}`},code(m){const{schema:u,parentSchema:h,it:_}=m,{prefixItems:s}=h;_.items=!0,!(0,t.alwaysValidSchema)(_,u)&&(s?(0,o.validateAdditionalItems)(m,s):m.ok((0,c.validateArray)(m)))}};return et.default=n,et}var tt={},en;function Ds(){if(en)return tt;en=1,Object.defineProperty(tt,"__esModule",{value:!0});const e=J(),t=Q(),o={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:f,max:n}})=>n===void 0?(0,e.str)`must contain at least ${f} valid item(s)`:(0,e.str)`must contain at least ${f} and no more than ${n} valid item(s)`,params:({params:{min:f,max:n}})=>n===void 0?(0,e._)`{minContains: ${f}}`:(0,e._)`{minContains: ${f}, maxContains: ${n}}`},code(f){const{gen:n,schema:m,parentSchema:u,data:h,it:_}=f;let s,S;const{minContains:$,maxContains:v}=u;_.opts.next?(s=$===void 0?1:$,S=v):s=1;const g=n.const("len",(0,e._)`${h}.length`);if(f.setParams({min:s,max:S}),S===void 0&&s===0){(0,t.checkStrictMode)(_,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(S!==void 0&&s>S){(0,t.checkStrictMode)(_,'"minContains" > "maxContains" is always invalid'),f.fail();return}if((0,t.alwaysValidSchema)(_,m)){let l=(0,e._)`${g} >= ${s}`;S!==void 0&&(l=(0,e._)`${l} && ${g} <= ${S}`),f.pass(l);return}_.items=!0;const b=n.name("valid");S===void 0&&s===1?d(b,()=>n.if(b,()=>n.break())):s===0?(n.let(b,!0),S!==void 0&&n.if((0,e._)`${h}.length > 0`,a)):(n.let(b,!1),a()),f.result(b,()=>f.reset());function a(){const l=n.name("_valid"),w=n.let("count",0);d(l,()=>n.if(l,()=>r(w)))}function d(l,w){n.forRange("i",0,g,i=>{f.subschema({keyword:"contains",dataProp:i,dataPropType:t.Type.Num,compositeRule:!0},l),w()})}function r(l){n.code((0,e._)`${l}++`),S===void 0?n.if((0,e._)`${l} >= ${s}`,()=>n.assign(b,!0).break()):(n.if((0,e._)`${l} > ${S}`,()=>n.assign(b,!1).break()),s===1?n.assign(b,!0):n.if((0,e._)`${l} >= ${s}`,()=>n.assign(b,!0)))}}};return tt.default=o,tt}var Mt={},tn;function Ms(){return tn||(tn=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=J(),c=Q(),o=fe();e.error={message:({params:{property:h,depsCount:_,deps:s}})=>{const S=_===1?"property":"properties";return(0,t.str)`must have ${S} ${s} when property ${h} is present`},params:({params:{property:h,depsCount:_,deps:s,missingProperty:S}})=>(0,t._)`{property: ${h},
|
|
5
|
+
|| ${O} === "boolean" || ${y} === null`).assign(C,(0,o._)`[${y}]`)}}}function $({gen:r,parentData:l,parentDataProperty:w},i){r.if((0,o._)`${l} !== undefined`,()=>r.assign((0,o._)`${l}[${w}]`,i))}function v(r,l,w,i=n.Correct){const y=i===n.Correct?o.operators.EQ:o.operators.NEQ;let E;switch(r){case"null":return(0,o._)`${l} ${y} null`;case"array":E=(0,o._)`Array.isArray(${l})`;break;case"object":E=(0,o._)`${l} && typeof ${l} == "object" && !Array.isArray(${l})`;break;case"integer":E=O((0,o._)`!(${l} % 1) && !isNaN(${l})`);break;case"number":E=O();break;default:return(0,o._)`typeof ${l} ${y} ${r}`}return i===n.Correct?E:(0,o.not)(E);function O(C=o.nil){return(0,o.and)((0,o._)`typeof ${l} == "number"`,C,w?(0,o._)`isFinite(${l})`:o.nil)}}re.checkDataType=v;function g(r,l,w,i){if(r.length===1)return v(r[0],l,w,i);let y;const E=(0,f.toHash)(r);if(E.array&&E.object){const O=(0,o._)`typeof ${l} != "object"`;y=E.null?O:(0,o._)`!${l} || ${O}`,delete E.null,delete E.array,delete E.object}else y=o.nil;E.number&&delete E.integer;for(const O in E)y=(0,o.and)(y,v(O,l,w,i));return y}re.checkDataTypes=g;const b={message:({schema:r})=>`must be ${r}`,params:({schema:r,schemaValue:l})=>typeof r=="string"?(0,o._)`{type: ${r}}`:(0,o._)`{type: ${l}}`};function a(r){const l=d(r);(0,c.reportError)(l,b)}re.reportTypeError=a;function d(r){const{gen:l,data:w,schema:i}=r,y=(0,f.schemaRefOrVal)(r,i,"type");return{gen:l,keyword:"type",data:w,schema:i.type,schemaCode:y,schemaValue:y,parentSchema:i,params:{},it:r}}return re}var Ne={},_r;function ss(){if(_r)return Ne;_r=1,Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.assignDefaults=void 0;const e=J(),t=Q();function c(f,n){const{properties:m,items:u}=f.schema;if(n==="object"&&m)for(const p in m)o(f,p,m[p].default);else n==="array"&&Array.isArray(u)&&u.forEach((p,_)=>o(f,_,p.default))}Ne.assignDefaults=c;function o(f,n,m){const{gen:u,compositeRule:p,data:_,opts:s}=f;if(m===void 0)return;const S=(0,e._)`${_}${(0,e.getProperty)(n)}`;if(p){(0,t.checkStrictMode)(f,`default is ignored for: ${S}`);return}let $=(0,e._)`${S} === undefined`;s.useDefaults==="empty"&&($=(0,e._)`${$} || ${S} === null || ${S} === ""`),u.if($,(0,e._)`${S} = ${(0,e.stringify)(m)}`)}return Ne}var de={},Y={},vr;function fe(){if(vr)return Y;vr=1,Object.defineProperty(Y,"__esModule",{value:!0}),Y.validateUnion=Y.validateArray=Y.usePattern=Y.callValidateCode=Y.schemaProperties=Y.allSchemaProperties=Y.noPropertyInData=Y.propertyInData=Y.isOwnProperty=Y.hasPropFunc=Y.reportMissingProp=Y.checkMissingProp=Y.checkReportMissingProp=void 0;const e=J(),t=Q(),c=$e(),o=Q();function f(r,l){const{gen:w,data:i,it:y}=r;w.if(s(w,i,l,y.opts.ownProperties),()=>{r.setParams({missingProperty:(0,e._)`${l}`},!0),r.error()})}Y.checkReportMissingProp=f;function n({gen:r,data:l,it:{opts:w}},i,y){return(0,e.or)(...i.map(E=>(0,e.and)(s(r,l,E,w.ownProperties),(0,e._)`${y} = ${E}`)))}Y.checkMissingProp=n;function m(r,l){r.setParams({missingProperty:l},!0),r.error()}Y.reportMissingProp=m;function u(r){return r.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}Y.hasPropFunc=u;function p(r,l,w){return(0,e._)`${u(r)}.call(${l}, ${w})`}Y.isOwnProperty=p;function _(r,l,w,i){const y=(0,e._)`${l}${(0,e.getProperty)(w)} !== undefined`;return i?(0,e._)`${y} && ${p(r,l,w)}`:y}Y.propertyInData=_;function s(r,l,w,i){const y=(0,e._)`${l}${(0,e.getProperty)(w)} === undefined`;return i?(0,e.or)(y,(0,e.not)(p(r,l,w))):y}Y.noPropertyInData=s;function S(r){return r?Object.keys(r).filter(l=>l!=="__proto__"):[]}Y.allSchemaProperties=S;function $(r,l){return S(l).filter(w=>!(0,t.alwaysValidSchema)(r,l[w]))}Y.schemaProperties=$;function v({schemaCode:r,data:l,it:{gen:w,topSchemaRef:i,schemaPath:y,errorPath:E},it:O},C,M,V){const K=V?(0,e._)`${r}, ${l}, ${i}${y}`:l,z=[[c.default.instancePath,(0,e.strConcat)(c.default.instancePath,E)],[c.default.parentData,O.parentData],[c.default.parentDataProperty,O.parentDataProperty],[c.default.rootData,c.default.rootData]];O.opts.dynamicRef&&z.push([c.default.dynamicAnchors,c.default.dynamicAnchors]);const W=(0,e._)`${K}, ${w.object(...z)}`;return M!==e.nil?(0,e._)`${C}.call(${M}, ${W})`:(0,e._)`${C}(${W})`}Y.callValidateCode=v;const g=(0,e._)`new RegExp`;function b({gen:r,it:{opts:l}},w){const i=l.unicodeRegExp?"u":"",{regExp:y}=l.code,E=y(w,i);return r.scopeValue("pattern",{key:E.toString(),ref:E,code:(0,e._)`${y.code==="new RegExp"?g:(0,o.useFunc)(r,y)}(${w}, ${i})`})}Y.usePattern=b;function a(r){const{gen:l,data:w,keyword:i,it:y}=r,E=l.name("valid");if(y.allErrors){const C=l.let("valid",!0);return O(()=>l.assign(C,!1)),C}return l.var(E,!0),O(()=>l.break()),E;function O(C){const M=l.const("len",(0,e._)`${w}.length`);l.forRange("i",0,M,V=>{r.subschema({keyword:i,dataProp:V,dataPropType:t.Type.Num},E),l.if((0,e.not)(E),C)})}}Y.validateArray=a;function d(r){const{gen:l,schema:w,keyword:i,it:y}=r;if(!Array.isArray(w))throw new Error("ajv implementation error");if(w.some(M=>(0,t.alwaysValidSchema)(y,M))&&!y.opts.unevaluated)return;const O=l.let("valid",!1),C=l.name("_valid");l.block(()=>w.forEach((M,V)=>{const K=r.subschema({keyword:i,schemaProp:V,compositeRule:!0},C);l.assign(O,(0,e._)`${O} || ${C}`),r.mergeValidEvaluated(K,C)||l.if((0,e.not)(O))})),r.result(O,()=>r.reset(),()=>r.error(!0))}return Y.validateUnion=d,Y}var $r;function os(){if($r)return de;$r=1,Object.defineProperty(de,"__esModule",{value:!0}),de.validateKeywordUsage=de.validSchemaType=de.funcKeywordCode=de.macroKeywordCode=void 0;const e=J(),t=$e(),c=fe(),o=$t();function f($,v){const{gen:g,keyword:b,schema:a,parentSchema:d,it:r}=$,l=v.macro.call(r.self,a,d,r),w=_(g,b,l);r.opts.validateSchema!==!1&&r.self.validateSchema(l,!0);const i=g.name("valid");$.subschema({schema:l,schemaPath:e.nil,errSchemaPath:`${r.errSchemaPath}/${b}`,topSchemaRef:w,compositeRule:!0},i),$.pass(i,()=>$.error(!0))}de.macroKeywordCode=f;function n($,v){var g;const{gen:b,keyword:a,schema:d,parentSchema:r,$data:l,it:w}=$;p(w,v);const i=!l&&v.compile?v.compile.call(w.self,d,r,w):v.validate,y=_(b,a,i),E=b.let("valid");$.block$data(E,O),$.ok((g=v.valid)!==null&&g!==void 0?g:E);function O(){if(v.errors===!1)V(),v.modifying&&m($),K(()=>$.error());else{const z=v.async?C():M();v.modifying&&m($),K(()=>u($,z))}}function C(){const z=b.let("ruleErrs",null);return b.try(()=>V((0,e._)`await `),W=>b.assign(E,!1).if((0,e._)`${W} instanceof ${w.ValidationError}`,()=>b.assign(z,(0,e._)`${W}.errors`),()=>b.throw(W))),z}function M(){const z=(0,e._)`${y}.errors`;return b.assign(z,null),V(e.nil),z}function V(z=v.async?(0,e._)`await `:e.nil){const W=w.opts.passContext?t.default.this:t.default.self,x=!("compile"in v&&!l||v.schema===!1);b.assign(E,(0,e._)`${z}${(0,c.callValidateCode)($,y,W,x)}`,v.modifying)}function K(z){var W;b.if((0,e.not)((W=v.valid)!==null&&W!==void 0?W:E),z)}}de.funcKeywordCode=n;function m($){const{gen:v,data:g,it:b}=$;v.if(b.parentData,()=>v.assign(g,(0,e._)`${b.parentData}[${b.parentDataProperty}]`))}function u($,v){const{gen:g}=$;g.if((0,e._)`Array.isArray(${v})`,()=>{g.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${v} : ${t.default.vErrors}.concat(${v})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,o.extendErrors)($)},()=>$.error())}function p({schemaEnv:$},v){if(v.async&&!$.$async)throw new Error("async keyword in sync schema")}function _($,v,g){if(g===void 0)throw new Error(`keyword "${v}" failed to compile`);return $.scopeValue("keyword",typeof g=="function"?{ref:g}:{ref:g,code:(0,e.stringify)(g)})}function s($,v,g=!1){return!v.length||v.some(b=>b==="array"?Array.isArray($):b==="object"?$&&typeof $=="object"&&!Array.isArray($):typeof $==b||g&&typeof $>"u")}de.validSchemaType=s;function S({schema:$,opts:v,self:g,errSchemaPath:b},a,d){if(Array.isArray(a.keyword)?!a.keyword.includes(d):a.keyword!==d)throw new Error("ajv implementation error");const r=a.dependencies;if(r?.some(l=>!Object.prototype.hasOwnProperty.call($,l)))throw new Error(`parent schema must have dependencies of ${d}: ${r.join(",")}`);if(a.validateSchema&&!a.validateSchema($[d])){const w=`keyword "${d}" value is invalid at path "${b}": `+g.errorsText(a.validateSchema.errors);if(v.validateSchema==="log")g.logger.error(w);else throw new Error(w)}}return de.validateKeywordUsage=S,de}var ge={},wr;function is(){if(wr)return ge;wr=1,Object.defineProperty(ge,"__esModule",{value:!0}),ge.extendSubschemaMode=ge.extendSubschemaData=ge.getSubschema=void 0;const e=J(),t=Q();function c(n,{keyword:m,schemaProp:u,schema:p,schemaPath:_,errSchemaPath:s,topSchemaRef:S}){if(m!==void 0&&p!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(m!==void 0){const $=n.schema[m];return u===void 0?{schema:$,schemaPath:(0,e._)`${n.schemaPath}${(0,e.getProperty)(m)}`,errSchemaPath:`${n.errSchemaPath}/${m}`}:{schema:$[u],schemaPath:(0,e._)`${n.schemaPath}${(0,e.getProperty)(m)}${(0,e.getProperty)(u)}`,errSchemaPath:`${n.errSchemaPath}/${m}/${(0,t.escapeFragment)(u)}`}}if(p!==void 0){if(_===void 0||s===void 0||S===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:p,schemaPath:_,topSchemaRef:S,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}ge.getSubschema=c;function o(n,m,{dataProp:u,dataPropType:p,data:_,dataTypes:s,propertyName:S}){if(_!==void 0&&u!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:$}=m;if(u!==void 0){const{errorPath:g,dataPathArr:b,opts:a}=m,d=$.let("data",(0,e._)`${m.data}${(0,e.getProperty)(u)}`,!0);v(d),n.errorPath=(0,e.str)`${g}${(0,t.getErrorPath)(u,p,a.jsPropertySyntax)}`,n.parentDataProperty=(0,e._)`${u}`,n.dataPathArr=[...b,n.parentDataProperty]}if(_!==void 0){const g=_ instanceof e.Name?_:$.let("data",_,!0);v(g),S!==void 0&&(n.propertyName=S)}s&&(n.dataTypes=s);function v(g){n.data=g,n.dataLevel=m.dataLevel+1,n.dataTypes=[],m.definedProperties=new Set,n.parentData=m.data,n.dataNames=[...m.dataNames,g]}}ge.extendSubschemaData=o;function f(n,{jtdDiscriminator:m,jtdMetadata:u,compositeRule:p,createErrors:_,allErrors:s}){p!==void 0&&(n.compositeRule=p),_!==void 0&&(n.createErrors=_),s!==void 0&&(n.allErrors=s),n.jtdDiscriminator=m,n.jtdMetadata=u}return ge.extendSubschemaMode=f,ge}var se={},It,br;function In(){return br||(br=1,It=function e(t,c){if(t===c)return!0;if(t&&c&&typeof t=="object"&&typeof c=="object"){if(t.constructor!==c.constructor)return!1;var o,f,n;if(Array.isArray(t)){if(o=t.length,o!=c.length)return!1;for(f=o;f--!==0;)if(!e(t[f],c[f]))return!1;return!0}if(t.constructor===RegExp)return t.source===c.source&&t.flags===c.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===c.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===c.toString();if(n=Object.keys(t),o=n.length,o!==Object.keys(c).length)return!1;for(f=o;f--!==0;)if(!Object.prototype.hasOwnProperty.call(c,n[f]))return!1;for(f=o;f--!==0;){var m=n[f];if(!e(t[m],c[m]))return!1}return!0}return t!==t&&c!==c}),It}var Ct={exports:{}},Er;function as(){if(Er)return Ct.exports;Er=1;var e=Ct.exports=function(o,f,n){typeof f=="function"&&(n=f,f={}),n=f.cb||n;var m=typeof n=="function"?n:n.pre||function(){},u=n.post||function(){};t(f,m,u,o,"",o)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.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 t(o,f,n,m,u,p,_,s,S,$){if(m&&typeof m=="object"&&!Array.isArray(m)){f(m,u,p,_,s,S,$);for(var v in m){var g=m[v];if(Array.isArray(g)){if(v in e.arrayKeywords)for(var b=0;b<g.length;b++)t(o,f,n,g[b],u+"/"+v+"/"+b,p,u,v,m,b)}else if(v in e.propsKeywords){if(g&&typeof g=="object")for(var a in g)t(o,f,n,g[a],u+"/"+v+"/"+c(a),p,u,v,m,a)}else(v in e.keywords||o.allKeys&&!(v in e.skipKeywords))&&t(o,f,n,g,u+"/"+v,p,u,v,m)}n(m,u,p,_,s,S,$)}}function c(o){return o.replace(/~/g,"~0").replace(/\//g,"~1")}return Ct.exports}var Sr;function wt(){if(Sr)return se;Sr=1,Object.defineProperty(se,"__esModule",{value:!0}),se.getSchemaRefs=se.resolveUrl=se.normalizeId=se._getFullPath=se.getFullPath=se.inlineRef=void 0;const e=Q(),t=In(),c=as(),o=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function f(b,a=!0){return typeof b=="boolean"?!0:a===!0?!m(b):a?u(b)<=a:!1}se.inlineRef=f;const n=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function m(b){for(const a in b){if(n.has(a))return!0;const d=b[a];if(Array.isArray(d)&&d.some(m)||typeof d=="object"&&m(d))return!0}return!1}function u(b){let a=0;for(const d in b){if(d==="$ref")return 1/0;if(a++,!o.has(d)&&(typeof b[d]=="object"&&(0,e.eachItem)(b[d],r=>a+=u(r)),a===1/0))return 1/0}return a}function p(b,a="",d){d!==!1&&(a=S(a));const r=b.parse(a);return _(b,r)}se.getFullPath=p;function _(b,a){return b.serialize(a).split("#")[0]+"#"}se._getFullPath=_;const s=/#\/?$/;function S(b){return b?b.replace(s,""):""}se.normalizeId=S;function $(b,a,d){return d=S(d),b.resolve(a,d)}se.resolveUrl=$;const v=/^[a-z_][-a-z0-9._]*$/i;function g(b,a){if(typeof b=="boolean")return{};const{schemaId:d,uriResolver:r}=this.opts,l=S(b[d]||a),w={"":l},i=p(r,l,!1),y={},E=new Set;return c(b,{allKeys:!0},(M,V,K,z)=>{if(z===void 0)return;const W=i+V;let x=w[z];typeof M[d]=="string"&&(x=pe.call(this,M[d])),he.call(this,M.$anchor),he.call(this,M.$dynamicAnchor),w[V]=x;function pe(Z){const _e=this.opts.uriResolver.resolve;if(Z=S(x?_e(x,Z):Z),E.has(Z))throw C(Z);E.add(Z);let A=this.refs[Z];return typeof A=="string"&&(A=this.refs[A]),typeof A=="object"?O(M,A.schema,Z):Z!==S(W)&&(Z[0]==="#"?(O(M,y[Z],Z),y[Z]=M):this.refs[Z]=W),Z}function he(Z){if(typeof Z=="string"){if(!v.test(Z))throw new Error(`invalid anchor "${Z}"`);pe.call(this,`#${Z}`)}}}),y;function O(M,V,K){if(V!==void 0&&!t(M,V))throw C(K)}function C(M){return new Error(`reference "${M}" resolves to more than one schema`)}}return se.getSchemaRefs=g,se}var Pr;function bt(){if(Pr)return me;Pr=1,Object.defineProperty(me,"__esModule",{value:!0}),me.getData=me.KeywordCxt=me.validateFunctionCode=void 0;const e=ns(),t=_t(),c=qn(),o=_t(),f=ss(),n=os(),m=is(),u=J(),p=$e(),_=wt(),s=Q(),S=$t();function $(R){if(i(R)&&(E(R),w(R))){a(R);return}v(R,()=>(0,e.topBoolOrEmptySchema)(R))}me.validateFunctionCode=$;function v({gen:R,validateName:N,schema:q,schemaEnv:D,opts:F},G){F.code.es5?R.func(N,(0,u._)`${p.default.data}, ${p.default.valCxt}`,D.$async,()=>{R.code((0,u._)`"use strict"; ${r(q,F)}`),b(R,F),R.code(G)}):R.func(N,(0,u._)`${p.default.data}, ${g(F)}`,D.$async,()=>R.code(r(q,F)).code(G))}function g(R){return(0,u._)`{${p.default.instancePath}="", ${p.default.parentData}, ${p.default.parentDataProperty}, ${p.default.rootData}=${p.default.data}${R.dynamicRef?(0,u._)`, ${p.default.dynamicAnchors}={}`:u.nil}}={}`}function b(R,N){R.if(p.default.valCxt,()=>{R.var(p.default.instancePath,(0,u._)`${p.default.valCxt}.${p.default.instancePath}`),R.var(p.default.parentData,(0,u._)`${p.default.valCxt}.${p.default.parentData}`),R.var(p.default.parentDataProperty,(0,u._)`${p.default.valCxt}.${p.default.parentDataProperty}`),R.var(p.default.rootData,(0,u._)`${p.default.valCxt}.${p.default.rootData}`),N.dynamicRef&&R.var(p.default.dynamicAnchors,(0,u._)`${p.default.valCxt}.${p.default.dynamicAnchors}`)},()=>{R.var(p.default.instancePath,(0,u._)`""`),R.var(p.default.parentData,(0,u._)`undefined`),R.var(p.default.parentDataProperty,(0,u._)`undefined`),R.var(p.default.rootData,p.default.data),N.dynamicRef&&R.var(p.default.dynamicAnchors,(0,u._)`{}`)})}function a(R){const{schema:N,opts:q,gen:D}=R;v(R,()=>{q.$comment&&N.$comment&&z(R),M(R),D.let(p.default.vErrors,null),D.let(p.default.errors,0),q.unevaluated&&d(R),O(R),W(R)})}function d(R){const{gen:N,validateName:q}=R;R.evaluated=N.const("evaluated",(0,u._)`${q}.evaluated`),N.if((0,u._)`${R.evaluated}.dynamicProps`,()=>N.assign((0,u._)`${R.evaluated}.props`,(0,u._)`undefined`)),N.if((0,u._)`${R.evaluated}.dynamicItems`,()=>N.assign((0,u._)`${R.evaluated}.items`,(0,u._)`undefined`))}function r(R,N){const q=typeof R=="object"&&R[N.schemaId];return q&&(N.code.source||N.code.process)?(0,u._)`/*# sourceURL=${q} */`:u.nil}function l(R,N){if(i(R)&&(E(R),w(R))){y(R,N);return}(0,e.boolOrEmptySchema)(R,N)}function w({schema:R,self:N}){if(typeof R=="boolean")return!R;for(const q in R)if(N.RULES.all[q])return!0;return!1}function i(R){return typeof R.schema!="boolean"}function y(R,N){const{schema:q,gen:D,opts:F}=R;F.$comment&&q.$comment&&z(R),V(R),K(R);const G=D.const("_errs",p.default.errors);O(R,G),D.var(N,(0,u._)`${G} === ${p.default.errors}`)}function E(R){(0,s.checkUnknownRules)(R),C(R)}function O(R,N){if(R.opts.jtd)return pe(R,[],!1,N);const q=(0,t.getSchemaTypes)(R.schema),D=(0,t.coerceAndCheckDataType)(R,q);pe(R,q,!D,N)}function C(R){const{schema:N,errSchemaPath:q,opts:D,self:F}=R;N.$ref&&D.ignoreKeywordsWithRef&&(0,s.schemaHasRulesButRef)(N,F.RULES)&&F.logger.warn(`$ref: keywords ignored in schema at path "${q}"`)}function M(R){const{schema:N,opts:q}=R;N.default!==void 0&&q.useDefaults&&q.strictSchema&&(0,s.checkStrictMode)(R,"default is ignored in the schema root")}function V(R){const N=R.schema[R.opts.schemaId];N&&(R.baseId=(0,_.resolveUrl)(R.opts.uriResolver,R.baseId,N))}function K(R){if(R.schema.$async&&!R.schemaEnv.$async)throw new Error("async schema in sync schema")}function z({gen:R,schemaEnv:N,schema:q,errSchemaPath:D,opts:F}){const G=q.$comment;if(F.$comment===!0)R.code((0,u._)`${p.default.self}.logger.log(${G})`);else if(typeof F.$comment=="function"){const ee=(0,u.str)`${D}/$comment`,le=R.scopeValue("root",{ref:N.root});R.code((0,u._)`${p.default.self}.opts.$comment(${G}, ${ee}, ${le}.schema)`)}}function W(R){const{gen:N,schemaEnv:q,validateName:D,ValidationError:F,opts:G}=R;q.$async?N.if((0,u._)`${p.default.errors} === 0`,()=>N.return(p.default.data),()=>N.throw((0,u._)`new ${F}(${p.default.vErrors})`)):(N.assign((0,u._)`${D}.errors`,p.default.vErrors),G.unevaluated&&x(R),N.return((0,u._)`${p.default.errors} === 0`))}function x({gen:R,evaluated:N,props:q,items:D}){q instanceof u.Name&&R.assign((0,u._)`${N}.props`,q),D instanceof u.Name&&R.assign((0,u._)`${N}.items`,D)}function pe(R,N,q,D){const{gen:F,schema:G,data:ee,allErrors:le,opts:oe,self:ie}=R,{RULES:te}=ie;if(G.$ref&&(oe.ignoreKeywordsWithRef||!(0,s.schemaHasRulesButRef)(G,te))){F.block(()=>L(R,"$ref",te.all.$ref.definition));return}oe.jtd||Z(R,N),F.block(()=>{for(const ce of te.rules)Se(ce);Se(te.post)});function Se(ce){(0,c.shouldUseGroup)(G,ce)&&(ce.type?(F.if((0,o.checkDataType)(ce.type,ee,oe.strictNumbers)),he(R,ce),N.length===1&&N[0]===ce.type&&q&&(F.else(),(0,o.reportTypeError)(R)),F.endIf()):he(R,ce),le||F.if((0,u._)`${p.default.errors} === ${D||0}`))}}function he(R,N){const{gen:q,schema:D,opts:{useDefaults:F}}=R;F&&(0,f.assignDefaults)(R,N.type),q.block(()=>{for(const G of N.rules)(0,c.shouldUseRule)(D,G)&&L(R,G.keyword,G.definition,N.type)})}function Z(R,N){R.schemaEnv.meta||!R.opts.strictTypes||(_e(R,N),R.opts.allowUnionTypes||A(R,N),j(R,R.dataTypes))}function _e(R,N){if(N.length){if(!R.dataTypes.length){R.dataTypes=N;return}N.forEach(q=>{T(R.dataTypes,q)||P(R,`type "${q}" not allowed by context "${R.dataTypes.join(",")}"`)}),h(R,N)}}function A(R,N){N.length>1&&!(N.length===2&&N.includes("null"))&&P(R,"use allowUnionTypes to allow union type keyword")}function j(R,N){const q=R.self.RULES.all;for(const D in q){const F=q[D];if(typeof F=="object"&&(0,c.shouldUseRule)(R.schema,F)){const{type:G}=F.definition;G.length&&!G.some(ee=>I(N,ee))&&P(R,`missing type "${G.join(",")}" for keyword "${D}"`)}}}function I(R,N){return R.includes(N)||N==="number"&&R.includes("integer")}function T(R,N){return R.includes(N)||N==="integer"&&R.includes("number")}function h(R,N){const q=[];for(const D of R.dataTypes)T(N,D)?q.push(D):N.includes("integer")&&D==="number"&&q.push("integer");R.dataTypes=q}function P(R,N){const q=R.schemaEnv.baseId+R.errSchemaPath;N+=` at "${q}" (strictTypes)`,(0,s.checkStrictMode)(R,N,R.opts.strictTypes)}class k{constructor(N,q,D){if((0,n.validateKeywordUsage)(N,q,D),this.gen=N.gen,this.allErrors=N.allErrors,this.keyword=D,this.data=N.data,this.schema=N.schema[D],this.$data=q.$data&&N.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,s.schemaRefOrVal)(N,this.schema,D,this.$data),this.schemaType=q.schemaType,this.parentSchema=N.schema,this.params={},this.it=N,this.def=q,this.$data)this.schemaCode=N.gen.const("vSchema",B(this.$data,N));else if(this.schemaCode=this.schemaValue,!(0,n.validSchemaType)(this.schema,q.schemaType,q.allowUndefined))throw new Error(`${D} value must be ${JSON.stringify(q.schemaType)}`);("code"in q?q.trackErrors:q.errors!==!1)&&(this.errsCount=N.gen.const("_errs",p.default.errors))}result(N,q,D){this.failResult((0,u.not)(N),q,D)}failResult(N,q,D){this.gen.if(N),D?D():this.error(),q?(this.gen.else(),q(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(N,q){this.failResult((0,u.not)(N),void 0,q)}fail(N){if(N===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(N),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(N){if(!this.$data)return this.fail(N);const{schemaCode:q}=this;this.fail((0,u._)`${q} !== undefined && (${(0,u.or)(this.invalid$data(),N)})`)}error(N,q,D){if(q){this.setParams(q),this._error(N,D),this.setParams({});return}this._error(N,D)}_error(N,q){(N?S.reportExtraError:S.reportError)(this,this.def.error,q)}$dataError(){(0,S.reportError)(this,this.def.$dataError||S.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,S.resetErrorsCount)(this.gen,this.errsCount)}ok(N){this.allErrors||this.gen.if(N)}setParams(N,q){q?Object.assign(this.params,N):this.params=N}block$data(N,q,D=u.nil){this.gen.block(()=>{this.check$data(N,D),q()})}check$data(N=u.nil,q=u.nil){if(!this.$data)return;const{gen:D,schemaCode:F,schemaType:G,def:ee}=this;D.if((0,u.or)((0,u._)`${F} === undefined`,q)),N!==u.nil&&D.assign(N,!0),(G.length||ee.validateSchema)&&(D.elseIf(this.invalid$data()),this.$dataError(),N!==u.nil&&D.assign(N,!1)),D.else()}invalid$data(){const{gen:N,schemaCode:q,schemaType:D,def:F,it:G}=this;return(0,u.or)(ee(),le());function ee(){if(D.length){if(!(q instanceof u.Name))throw new Error("ajv implementation error");const oe=Array.isArray(D)?D:[D];return(0,u._)`${(0,o.checkDataTypes)(oe,q,G.opts.strictNumbers,o.DataType.Wrong)}`}return u.nil}function le(){if(F.validateSchema){const oe=N.scopeValue("validate$data",{ref:F.validateSchema});return(0,u._)`!${oe}(${q})`}return u.nil}}subschema(N,q){const D=(0,m.getSubschema)(this.it,N);(0,m.extendSubschemaData)(D,this.it,N),(0,m.extendSubschemaMode)(D,N);const F={...this.it,...D,items:void 0,props:void 0};return l(F,q),F}mergeEvaluated(N,q){const{it:D,gen:F}=this;D.opts.unevaluated&&(D.props!==!0&&N.props!==void 0&&(D.props=s.mergeEvaluated.props(F,N.props,D.props,q)),D.items!==!0&&N.items!==void 0&&(D.items=s.mergeEvaluated.items(F,N.items,D.items,q)))}mergeValidEvaluated(N,q){const{it:D,gen:F}=this;if(D.opts.unevaluated&&(D.props!==!0||D.items!==!0))return F.if(q,()=>this.mergeEvaluated(N,u.Name)),!0}}me.KeywordCxt=k;function L(R,N,q,D){const F=new k(R,q,N);"code"in q?q.code(F,D):F.$data&&q.validate?(0,n.funcKeywordCode)(F,q):"macro"in q?(0,n.macroKeywordCode)(F,q):(q.compile||q.validate)&&(0,n.funcKeywordCode)(F,q)}const U=/^\/(?:[^~]|~0|~1)*$/,X=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function B(R,{dataLevel:N,dataNames:q,dataPathArr:D}){let F,G;if(R==="")return p.default.rootData;if(R[0]==="/"){if(!U.test(R))throw new Error(`Invalid JSON-pointer: ${R}`);F=R,G=p.default.rootData}else{const ie=X.exec(R);if(!ie)throw new Error(`Invalid JSON-pointer: ${R}`);const te=+ie[1];if(F=ie[2],F==="#"){if(te>=N)throw new Error(oe("property/index",te));return D[N-te]}if(te>N)throw new Error(oe("data",te));if(G=q[N-te],!F)return G}let ee=G;const le=F.split("/");for(const ie of le)ie&&(G=(0,u._)`${G}${(0,u.getProperty)((0,s.unescapeJsonPointer)(ie))}`,ee=(0,u._)`${ee} && ${G}`);return ee;function oe(ie,te){return`Cannot access ${ie} ${te} levels up, current level is ${N}`}}return me.getData=B,me}var Ie={},Rr;function Qt(){if(Rr)return Ie;Rr=1,Object.defineProperty(Ie,"__esModule",{value:!0});class e extends Error{constructor(c){super("validation failed"),this.errors=c,this.ajv=this.validation=!0}}return Ie.default=e,Ie}var Ce={},jr;function Et(){if(jr)return Ce;jr=1,Object.defineProperty(Ce,"__esModule",{value:!0});const e=wt();class t extends Error{constructor(o,f,n,m){super(m||`can't resolve reference ${n} from id ${f}`),this.missingRef=(0,e.resolveUrl)(o,f,n),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(o,this.missingRef))}}return Ce.default=t,Ce}var ae={},Nr;function Xt(){if(Nr)return ae;Nr=1,Object.defineProperty(ae,"__esModule",{value:!0}),ae.resolveSchema=ae.getCompilingSchema=ae.resolveRef=ae.compileSchema=ae.SchemaEnv=void 0;const e=J(),t=Qt(),c=$e(),o=wt(),f=Q(),n=bt();class m{constructor(d){var r;this.refs={},this.dynamicAnchors={};let l;typeof d.schema=="object"&&(l=d.schema),this.schema=d.schema,this.schemaId=d.schemaId,this.root=d.root||this,this.baseId=(r=d.baseId)!==null&&r!==void 0?r:(0,o.normalizeId)(l?.[d.schemaId||"$id"]),this.schemaPath=d.schemaPath,this.localRefs=d.localRefs,this.meta=d.meta,this.$async=l?.$async,this.refs={}}}ae.SchemaEnv=m;function u(a){const d=s.call(this,a);if(d)return d;const r=(0,o.getFullPath)(this.opts.uriResolver,a.root.baseId),{es5:l,lines:w}=this.opts.code,{ownProperties:i}=this.opts,y=new e.CodeGen(this.scope,{es5:l,lines:w,ownProperties:i});let E;a.$async&&(E=y.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const O=y.scopeName("validate");a.validateName=O;const C={gen:y,allErrors:this.opts.allErrors,data:c.default.data,parentData:c.default.parentData,parentDataProperty:c.default.parentDataProperty,dataNames:[c.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:y.scopeValue("schema",this.opts.code.source===!0?{ref:a.schema,code:(0,e.stringify)(a.schema)}:{ref:a.schema}),validateName:O,ValidationError:E,schema:a.schema,schemaEnv:a,rootId:r,baseId:a.baseId||r,schemaPath:e.nil,errSchemaPath:a.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let M;try{this._compilations.add(a),(0,n.validateFunctionCode)(C),y.optimize(this.opts.code.optimize);const V=y.toString();M=`${y.scopeRefs(c.default.scope)}return ${V}`,this.opts.code.process&&(M=this.opts.code.process(M,a));const z=new Function(`${c.default.self}`,`${c.default.scope}`,M)(this,this.scope.get());if(this.scope.value(O,{ref:z}),z.errors=null,z.schema=a.schema,z.schemaEnv=a,a.$async&&(z.$async=!0),this.opts.code.source===!0&&(z.source={validateName:O,validateCode:V,scopeValues:y._values}),this.opts.unevaluated){const{props:W,items:x}=C;z.evaluated={props:W instanceof e.Name?void 0:W,items:x instanceof e.Name?void 0:x,dynamicProps:W instanceof e.Name,dynamicItems:x instanceof e.Name},z.source&&(z.source.evaluated=(0,e.stringify)(z.evaluated))}return a.validate=z,a}catch(V){throw delete a.validate,delete a.validateName,M&&this.logger.error("Error compiling schema, function code:",M),V}finally{this._compilations.delete(a)}}ae.compileSchema=u;function p(a,d,r){var l;r=(0,o.resolveUrl)(this.opts.uriResolver,d,r);const w=a.refs[r];if(w)return w;let i=$.call(this,a,r);if(i===void 0){const y=(l=a.localRefs)===null||l===void 0?void 0:l[r],{schemaId:E}=this.opts;y&&(i=new m({schema:y,schemaId:E,root:a,baseId:d}))}if(i!==void 0)return a.refs[r]=_.call(this,i)}ae.resolveRef=p;function _(a){return(0,o.inlineRef)(a.schema,this.opts.inlineRefs)?a.schema:a.validate?a:u.call(this,a)}function s(a){for(const d of this._compilations)if(S(d,a))return d}ae.getCompilingSchema=s;function S(a,d){return a.schema===d.schema&&a.root===d.root&&a.baseId===d.baseId}function $(a,d){let r;for(;typeof(r=this.refs[d])=="string";)d=r;return r||this.schemas[d]||v.call(this,a,d)}function v(a,d){const r=this.opts.uriResolver.parse(d),l=(0,o._getFullPath)(this.opts.uriResolver,r);let w=(0,o.getFullPath)(this.opts.uriResolver,a.baseId,void 0);if(Object.keys(a.schema).length>0&&l===w)return b.call(this,r,a);const i=(0,o.normalizeId)(l),y=this.refs[i]||this.schemas[i];if(typeof y=="string"){const E=v.call(this,a,y);return typeof E?.schema!="object"?void 0:b.call(this,r,E)}if(typeof y?.schema=="object"){if(y.validate||u.call(this,y),i===(0,o.normalizeId)(d)){const{schema:E}=y,{schemaId:O}=this.opts,C=E[O];return C&&(w=(0,o.resolveUrl)(this.opts.uriResolver,w,C)),new m({schema:E,schemaId:O,root:a,baseId:w})}return b.call(this,r,y)}}ae.resolveSchema=v;const g=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function b(a,{baseId:d,schema:r,root:l}){var w;if(((w=a.fragment)===null||w===void 0?void 0:w[0])!=="/")return;for(const E of a.fragment.slice(1).split("/")){if(typeof r=="boolean")return;const O=r[(0,f.unescapeFragment)(E)];if(O===void 0)return;r=O;const C=typeof r=="object"&&r[this.opts.schemaId];!g.has(E)&&C&&(d=(0,o.resolveUrl)(this.opts.uriResolver,d,C))}let i;if(typeof r!="boolean"&&r.$ref&&!(0,f.schemaHasRulesButRef)(r,this.RULES)){const E=(0,o.resolveUrl)(this.opts.uriResolver,d,r.$ref);i=v.call(this,l,E)}const{schemaId:y}=this.opts;if(i=i||new m({schema:r,schemaId:y,root:l,baseId:d}),i.schema!==i.root.schema)return i}return ae}const us="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",cs="Meta-schema for $data reference (JSON AnySchema extension proposal)",ls="object",ds=["$data"],fs={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},ps=!1,hs={$id:us,description:cs,type:ls,required:ds,properties:fs,additionalProperties:ps};var Ae={},Oe={exports:{}},At,Or;function Cn(){if(Or)return At;Or=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=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);function c($){let v="",g=0,b=0;for(b=0;b<$.length;b++)if(g=$[b].charCodeAt(0),g!==48){if(!(g>=48&&g<=57||g>=65&&g<=70||g>=97&&g<=102))return"";v+=$[b];break}for(b+=1;b<$.length;b++){if(g=$[b].charCodeAt(0),!(g>=48&&g<=57||g>=65&&g<=70||g>=97&&g<=102))return"";v+=$[b]}return v}const o=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function f($){return $.length=0,!0}function n($,v,g){if($.length){const b=c($);if(b!=="")v.push(b);else return g.error=!0,!1;$.length=0}return!0}function m($){let v=0;const g={error:!1,address:"",zone:""},b=[],a=[];let d=!1,r=!1,l=n;for(let w=0;w<$.length;w++){const i=$[w];if(!(i==="["||i==="]"))if(i===":"){if(d===!0&&(r=!0),!l(a,b,g))break;if(++v>7){g.error=!0;break}w>0&&$[w-1]===":"&&(d=!0),b.push(":");continue}else if(i==="%"){if(!l(a,b,g))break;l=f}else{a.push(i);continue}}return a.length&&(l===f?g.zone=a.join(""):r?b.push(a.join("")):b.push(c(a))),g.address=b.join(""),g}function u($){if(p($,":")<2)return{host:$,isIPV6:!1};const v=m($);if(v.error)return{host:$,isIPV6:!1};{let g=v.address,b=v.address;return v.zone&&(g+="%"+v.zone,b+="%25"+v.zone),{host:g,isIPV6:!0,escapedHost:b}}}function p($,v){let g=0;for(let b=0;b<$.length;b++)$[b]===v&&g++;return g}function _($){let v=$;const g=[];let b=-1,a=0;for(;a=v.length;){if(a===1){if(v===".")break;if(v==="/"){g.push("/");break}else{g.push(v);break}}else if(a===2){if(v[0]==="."){if(v[1]===".")break;if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&(v[1]==="."||v[1]==="/")){g.push("/");break}}else if(a===3&&v==="/.."){g.length!==0&&g.pop(),g.push("/");break}if(v[0]==="."){if(v[1]==="."){if(v[2]==="/"){v=v.slice(3);continue}}else if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&v[1]==="."){if(v[2]==="/"){v=v.slice(2);continue}else if(v[2]==="."&&v[3]==="/"){v=v.slice(3),g.length!==0&&g.pop();continue}}if((b=v.indexOf("/",1))===-1){g.push(v);break}else g.push(v.slice(0,b)),v=v.slice(b)}return g.join("")}function s($,v){const g=v!==!0?escape:unescape;return $.scheme!==void 0&&($.scheme=g($.scheme)),$.userinfo!==void 0&&($.userinfo=g($.userinfo)),$.host!==void 0&&($.host=g($.host)),$.path!==void 0&&($.path=g($.path)),$.query!==void 0&&($.query=g($.query)),$.fragment!==void 0&&($.fragment=g($.fragment)),$}function S($){const v=[];if($.userinfo!==void 0&&(v.push($.userinfo),v.push("@")),$.host!==void 0){let g=unescape($.host);if(!t(g)){const b=u(g);b.isIPV6===!0?g=`[${b.escapedHost}]`:g=$.host}v.push(g)}return(typeof $.port=="number"||typeof $.port=="string")&&(v.push(":"),v.push(String($.port))),v.length?v.join(""):void 0}return At={nonSimpleDomain:o,recomposeAuthority:S,normalizeComponentEncoding:s,removeDotSegments:_,isIPv4:t,isUUID:e,normalizeIPv6:u,stringArrayToHexStripped:c},At}var Dt,Tr;function ms(){if(Tr)return Dt;Tr=1;const{isUUID:e}=Cn(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,c=["http","https","ws","wss","urn","urn:uuid"];function o(i){return c.indexOf(i)!==-1}function f(i){return i.secure===!0?!0:i.secure===!1?!1:i.scheme?i.scheme.length===3&&(i.scheme[0]==="w"||i.scheme[0]==="W")&&(i.scheme[1]==="s"||i.scheme[1]==="S")&&(i.scheme[2]==="s"||i.scheme[2]==="S"):!1}function n(i){return i.host||(i.error=i.error||"HTTP URIs must have a host."),i}function m(i){const y=String(i.scheme).toLowerCase()==="https";return(i.port===(y?443:80)||i.port==="")&&(i.port=void 0),i.path||(i.path="/"),i}function u(i){return i.secure=f(i),i.resourceName=(i.path||"/")+(i.query?"?"+i.query:""),i.path=void 0,i.query=void 0,i}function p(i){if((i.port===(f(i)?443:80)||i.port==="")&&(i.port=void 0),typeof i.secure=="boolean"&&(i.scheme=i.secure?"wss":"ws",i.secure=void 0),i.resourceName){const[y,E]=i.resourceName.split("?");i.path=y&&y!=="/"?y:void 0,i.query=E,i.resourceName=void 0}return i.fragment=void 0,i}function _(i,y){if(!i.path)return i.error="URN can not be parsed",i;const E=i.path.match(t);if(E){const O=y.scheme||i.scheme||"urn";i.nid=E[1].toLowerCase(),i.nss=E[2];const C=`${O}:${y.nid||i.nid}`,M=w(C);i.path=void 0,M&&(i=M.parse(i,y))}else i.error=i.error||"URN can not be parsed.";return i}function s(i,y){if(i.nid===void 0)throw new Error("URN without nid cannot be serialized");const E=y.scheme||i.scheme||"urn",O=i.nid.toLowerCase(),C=`${E}:${y.nid||O}`,M=w(C);M&&(i=M.serialize(i,y));const V=i,K=i.nss;return V.path=`${O||y.nid}:${K}`,y.skipEscape=!0,V}function S(i,y){const E=i;return E.uuid=E.nss,E.nss=void 0,!y.tolerant&&(!E.uuid||!e(E.uuid))&&(E.error=E.error||"UUID is not valid."),E}function $(i){const y=i;return y.nss=(i.uuid||"").toLowerCase(),y}const v={scheme:"http",domainHost:!0,parse:n,serialize:m},g={scheme:"https",domainHost:v.domainHost,parse:n,serialize:m},b={scheme:"ws",domainHost:!0,parse:u,serialize:p},a={scheme:"wss",domainHost:b.domainHost,parse:b.parse,serialize:b.serialize},l={http:v,https:g,ws:b,wss:a,urn:{scheme:"urn",parse:_,serialize:s,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:S,serialize:$,skipNormalize:!0}};Object.setPrototypeOf(l,null);function w(i){return i&&(l[i]||l[i.toLowerCase()])||void 0}return Dt={wsIsSecure:f,SCHEMES:l,isValidSchemeName:o,getSchemeHandler:w},Dt}var kr;function ys(){if(kr)return Oe.exports;kr=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:c,normalizeComponentEncoding:o,isIPv4:f,nonSimpleDomain:n}=Cn(),{SCHEMES:m,getSchemeHandler:u}=ms();function p(a,d){return typeof a=="string"?a=$(g(a,d),d):typeof a=="object"&&(a=g($(a,d),d)),a}function _(a,d,r){const l=r?Object.assign({scheme:"null"},r):{scheme:"null"},w=s(g(a,l),g(d,l),l,!0);return l.skipEscape=!0,$(w,l)}function s(a,d,r,l){const w={};return l||(a=g($(a,r),r),d=g($(d,r),r)),r=r||{},!r.tolerant&&d.scheme?(w.scheme=d.scheme,w.userinfo=d.userinfo,w.host=d.host,w.port=d.port,w.path=t(d.path||""),w.query=d.query):(d.userinfo!==void 0||d.host!==void 0||d.port!==void 0?(w.userinfo=d.userinfo,w.host=d.host,w.port=d.port,w.path=t(d.path||""),w.query=d.query):(d.path?(d.path[0]==="/"?w.path=t(d.path):((a.userinfo!==void 0||a.host!==void 0||a.port!==void 0)&&!a.path?w.path="/"+d.path:a.path?w.path=a.path.slice(0,a.path.lastIndexOf("/")+1)+d.path:w.path=d.path,w.path=t(w.path)),w.query=d.query):(w.path=a.path,d.query!==void 0?w.query=d.query:w.query=a.query),w.userinfo=a.userinfo,w.host=a.host,w.port=a.port),w.scheme=a.scheme),w.fragment=d.fragment,w}function S(a,d,r){return typeof a=="string"?(a=unescape(a),a=$(o(g(a,r),!0),{...r,skipEscape:!0})):typeof a=="object"&&(a=$(o(a,!0),{...r,skipEscape:!0})),typeof d=="string"?(d=unescape(d),d=$(o(g(d,r),!0),{...r,skipEscape:!0})):typeof d=="object"&&(d=$(o(d,!0),{...r,skipEscape:!0})),a.toLowerCase()===d.toLowerCase()}function $(a,d){const r={host:a.host,scheme:a.scheme,userinfo:a.userinfo,port:a.port,path:a.path,query:a.query,nid:a.nid,nss:a.nss,uuid:a.uuid,fragment:a.fragment,reference:a.reference,resourceName:a.resourceName,secure:a.secure,error:""},l=Object.assign({},d),w=[],i=u(l.scheme||r.scheme);i&&i.serialize&&i.serialize(r,l),r.path!==void 0&&(l.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),l.reference!=="suffix"&&r.scheme&&w.push(r.scheme,":");const y=c(r);if(y!==void 0&&(l.reference!=="suffix"&&w.push("//"),w.push(y),r.path&&r.path[0]!=="/"&&w.push("/")),r.path!==void 0){let E=r.path;!l.absolutePath&&(!i||!i.absolutePath)&&(E=t(E)),y===void 0&&E[0]==="/"&&E[1]==="/"&&(E="/%2F"+E.slice(2)),w.push(E)}return r.query!==void 0&&w.push("?",r.query),r.fragment!==void 0&&w.push("#",r.fragment),w.join("")}const v=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function g(a,d){const r=Object.assign({},d),l={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let w=!1;r.reference==="suffix"&&(r.scheme?a=r.scheme+":"+a:a="//"+a);const i=a.match(v);if(i){if(l.scheme=i[1],l.userinfo=i[3],l.host=i[4],l.port=parseInt(i[5],10),l.path=i[6]||"",l.query=i[7],l.fragment=i[8],isNaN(l.port)&&(l.port=i[5]),l.host)if(f(l.host)===!1){const O=e(l.host);l.host=O.host.toLowerCase(),w=O.isIPV6}else w=!0;l.scheme===void 0&&l.userinfo===void 0&&l.host===void 0&&l.port===void 0&&l.query===void 0&&!l.path?l.reference="same-document":l.scheme===void 0?l.reference="relative":l.fragment===void 0?l.reference="absolute":l.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==l.reference&&(l.error=l.error||"URI is not a "+r.reference+" reference.");const y=u(r.scheme||l.scheme);if(!r.unicodeSupport&&(!y||!y.unicodeSupport)&&l.host&&(r.domainHost||y&&y.domainHost)&&w===!1&&n(l.host))try{l.host=URL.domainToASCII(l.host.toLowerCase())}catch(E){l.error=l.error||"Host's domain name can not be converted to ASCII: "+E}(!y||y&&!y.skipNormalize)&&(a.indexOf("%")!==-1&&(l.scheme!==void 0&&(l.scheme=unescape(l.scheme)),l.host!==void 0&&(l.host=unescape(l.host))),l.path&&(l.path=escape(unescape(l.path))),l.fragment&&(l.fragment=encodeURI(decodeURIComponent(l.fragment)))),y&&y.parse&&y.parse(l,r)}else l.error=l.error||"URI can not be parsed.";return l}const b={SCHEMES:m,normalize:p,resolve:_,resolveComponent:s,equal:S,serialize:$,parse:g};return Oe.exports=b,Oe.exports.default=b,Oe.exports.fastUri=b,Oe.exports}var qr;function gs(){if(qr)return Ae;qr=1,Object.defineProperty(Ae,"__esModule",{value:!0});const e=ys();return e.code='require("ajv/dist/runtime/uri").default',Ae.default=e,Ae}var Ir;function _s(){return Ir||(Ir=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=bt();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var c=J();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});const o=Qt(),f=Et(),n=kn(),m=Xt(),u=J(),p=wt(),_=_t(),s=Q(),S=hs,$=gs(),v=(A,j)=>new RegExp(A,j);v.code="new RegExp";const g=["removeAdditional","useDefaults","coerceTypes"],b=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),a={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."},d={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},r=200;function l(A){var j,I,T,h,P,k,L,U,X,B,R,N,q,D,F,G,ee,le,oe,ie,te,Se,ce,St,Pt;const je=A.strict,Rt=(j=A.code)===null||j===void 0?void 0:j.optimize,tr=Rt===!0||Rt===void 0?1:Rt||0,rr=(T=(I=A.code)===null||I===void 0?void 0:I.regExp)!==null&&T!==void 0?T:v,Qn=(h=A.uriResolver)!==null&&h!==void 0?h:$.default;return{strictSchema:(k=(P=A.strictSchema)!==null&&P!==void 0?P:je)!==null&&k!==void 0?k:!0,strictNumbers:(U=(L=A.strictNumbers)!==null&&L!==void 0?L:je)!==null&&U!==void 0?U:!0,strictTypes:(B=(X=A.strictTypes)!==null&&X!==void 0?X:je)!==null&&B!==void 0?B:"log",strictTuples:(N=(R=A.strictTuples)!==null&&R!==void 0?R:je)!==null&&N!==void 0?N:"log",strictRequired:(D=(q=A.strictRequired)!==null&&q!==void 0?q:je)!==null&&D!==void 0?D:!1,code:A.code?{...A.code,optimize:tr,regExp:rr}:{optimize:tr,regExp:rr},loopRequired:(F=A.loopRequired)!==null&&F!==void 0?F:r,loopEnum:(G=A.loopEnum)!==null&&G!==void 0?G:r,meta:(ee=A.meta)!==null&&ee!==void 0?ee:!0,messages:(le=A.messages)!==null&&le!==void 0?le:!0,inlineRefs:(oe=A.inlineRefs)!==null&&oe!==void 0?oe:!0,schemaId:(ie=A.schemaId)!==null&&ie!==void 0?ie:"$id",addUsedSchema:(te=A.addUsedSchema)!==null&&te!==void 0?te:!0,validateSchema:(Se=A.validateSchema)!==null&&Se!==void 0?Se:!0,validateFormats:(ce=A.validateFormats)!==null&&ce!==void 0?ce:!0,unicodeRegExp:(St=A.unicodeRegExp)!==null&&St!==void 0?St:!0,int32range:(Pt=A.int32range)!==null&&Pt!==void 0?Pt:!0,uriResolver:Qn}}class w{constructor(j={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,j=this.opts={...j,...l(j)};const{es5:I,lines:T}=this.opts.code;this.scope=new u.ValueScope({scope:{},prefixes:b,es5:I,lines:T}),this.logger=K(j.logger);const h=j.validateFormats;j.validateFormats=!1,this.RULES=(0,n.getRules)(),i.call(this,a,j,"NOT SUPPORTED"),i.call(this,d,j,"DEPRECATED","warn"),this._metaOpts=M.call(this),j.formats&&O.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),j.keywords&&C.call(this,j.keywords),typeof j.meta=="object"&&this.addMetaSchema(j.meta),E.call(this),j.validateFormats=h}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:j,meta:I,schemaId:T}=this.opts;let h=S;T==="id"&&(h={...S},h.id=h.$id,delete h.$id),I&&j&&this.addMetaSchema(h,h[T],!1)}defaultMeta(){const{meta:j,schemaId:I}=this.opts;return this.opts.defaultMeta=typeof j=="object"?j[I]||j:void 0}validate(j,I){let T;if(typeof j=="string"){if(T=this.getSchema(j),!T)throw new Error(`no schema with key or ref "${j}"`)}else T=this.compile(j);const h=T(I);return"$async"in T||(this.errors=T.errors),h}compile(j,I){const T=this._addSchema(j,I);return T.validate||this._compileSchemaEnv(T)}compileAsync(j,I){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:T}=this.opts;return h.call(this,j,I);async function h(B,R){await P.call(this,B.$schema);const N=this._addSchema(B,R);return N.validate||k.call(this,N)}async function P(B){B&&!this.getSchema(B)&&await h.call(this,{$ref:B},!0)}async function k(B){try{return this._compileSchemaEnv(B)}catch(R){if(!(R instanceof f.default))throw R;return L.call(this,R),await U.call(this,R.missingSchema),k.call(this,B)}}function L({missingSchema:B,missingRef:R}){if(this.refs[B])throw new Error(`AnySchema ${B} is loaded but ${R} cannot be resolved`)}async function U(B){const R=await X.call(this,B);this.refs[B]||await P.call(this,R.$schema),this.refs[B]||this.addSchema(R,B,I)}async function X(B){const R=this._loading[B];if(R)return R;try{return await(this._loading[B]=T(B))}finally{delete this._loading[B]}}}addSchema(j,I,T,h=this.opts.validateSchema){if(Array.isArray(j)){for(const k of j)this.addSchema(k,void 0,T,h);return this}let P;if(typeof j=="object"){const{schemaId:k}=this.opts;if(P=j[k],P!==void 0&&typeof P!="string")throw new Error(`schema ${k} must be string`)}return I=(0,p.normalizeId)(I||P),this._checkUnique(I),this.schemas[I]=this._addSchema(j,T,I,h,!0),this}addMetaSchema(j,I,T=this.opts.validateSchema){return this.addSchema(j,I,!0,T),this}validateSchema(j,I){if(typeof j=="boolean")return!0;let T;if(T=j.$schema,T!==void 0&&typeof T!="string")throw new Error("$schema must be a string");if(T=T||this.opts.defaultMeta||this.defaultMeta(),!T)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const h=this.validate(T,j);if(!h&&I){const P="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(P);else throw new Error(P)}return h}getSchema(j){let I;for(;typeof(I=y.call(this,j))=="string";)j=I;if(I===void 0){const{schemaId:T}=this.opts,h=new m.SchemaEnv({schema:{},schemaId:T});if(I=m.resolveSchema.call(this,h,j),!I)return;this.refs[j]=I}return I.validate||this._compileSchemaEnv(I)}removeSchema(j){if(j instanceof RegExp)return this._removeAllSchemas(this.schemas,j),this._removeAllSchemas(this.refs,j),this;switch(typeof j){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const I=y.call(this,j);return typeof I=="object"&&this._cache.delete(I.schema),delete this.schemas[j],delete this.refs[j],this}case"object":{const I=j;this._cache.delete(I);let T=j[this.opts.schemaId];return T&&(T=(0,p.normalizeId)(T),delete this.schemas[T],delete this.refs[T]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(j){for(const I of j)this.addKeyword(I);return this}addKeyword(j,I){let T;if(typeof j=="string")T=j,typeof I=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),I.keyword=T);else if(typeof j=="object"&&I===void 0){if(I=j,T=I.keyword,Array.isArray(T)&&!T.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(W.call(this,T,I),!I)return(0,s.eachItem)(T,P=>x.call(this,P)),this;he.call(this,I);const h={...I,type:(0,_.getJSONTypes)(I.type),schemaType:(0,_.getJSONTypes)(I.schemaType)};return(0,s.eachItem)(T,h.type.length===0?P=>x.call(this,P,h):P=>h.type.forEach(k=>x.call(this,P,h,k))),this}getKeyword(j){const I=this.RULES.all[j];return typeof I=="object"?I.definition:!!I}removeKeyword(j){const{RULES:I}=this;delete I.keywords[j],delete I.all[j];for(const T of I.rules){const h=T.rules.findIndex(P=>P.keyword===j);h>=0&&T.rules.splice(h,1)}return this}addFormat(j,I){return typeof I=="string"&&(I=new RegExp(I)),this.formats[j]=I,this}errorsText(j=this.errors,{separator:I=", ",dataVar:T="data"}={}){return!j||j.length===0?"No errors":j.map(h=>`${T}${h.instancePath} ${h.message}`).reduce((h,P)=>h+I+P)}$dataMetaSchema(j,I){const T=this.RULES.all;j=JSON.parse(JSON.stringify(j));for(const h of I){const P=h.split("/").slice(1);let k=j;for(const L of P)k=k[L];for(const L in T){const U=T[L];if(typeof U!="object")continue;const{$data:X}=U.definition,B=k[L];X&&B&&(k[L]=_e(B))}}return j}_removeAllSchemas(j,I){for(const T in j){const h=j[T];(!I||I.test(T))&&(typeof h=="string"?delete j[T]:h&&!h.meta&&(this._cache.delete(h.schema),delete j[T]))}}_addSchema(j,I,T,h=this.opts.validateSchema,P=this.opts.addUsedSchema){let k;const{schemaId:L}=this.opts;if(typeof j=="object")k=j[L];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof j!="boolean")throw new Error("schema must be object or boolean")}let U=this._cache.get(j);if(U!==void 0)return U;T=(0,p.normalizeId)(k||T);const X=p.getSchemaRefs.call(this,j,T);return U=new m.SchemaEnv({schema:j,schemaId:L,meta:I,baseId:T,localRefs:X}),this._cache.set(U.schema,U),P&&!T.startsWith("#")&&(T&&this._checkUnique(T),this.refs[T]=U),h&&this.validateSchema(j,!0),U}_checkUnique(j){if(this.schemas[j]||this.refs[j])throw new Error(`schema with key or id "${j}" already exists`)}_compileSchemaEnv(j){if(j.meta?this._compileMetaSchema(j):m.compileSchema.call(this,j),!j.validate)throw new Error("ajv implementation error");return j.validate}_compileMetaSchema(j){const I=this.opts;this.opts=this._metaOpts;try{m.compileSchema.call(this,j)}finally{this.opts=I}}}w.ValidationError=o.default,w.MissingRefError=f.default,e.default=w;function i(A,j,I,T="error"){for(const h in A){const P=h;P in j&&this.logger[T](`${I}: option ${h}. ${A[P]}`)}}function y(A){return A=(0,p.normalizeId)(A),this.schemas[A]||this.refs[A]}function E(){const A=this.opts.schemas;if(A)if(Array.isArray(A))this.addSchema(A);else for(const j in A)this.addSchema(A[j],j)}function O(){for(const A in this.opts.formats){const j=this.opts.formats[A];j&&this.addFormat(A,j)}}function C(A){if(Array.isArray(A)){this.addVocabulary(A);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const j in A){const I=A[j];I.keyword||(I.keyword=j),this.addKeyword(I)}}function M(){const A={...this.opts};for(const j of g)delete A[j];return A}const V={log(){},warn(){},error(){}};function K(A){if(A===!1)return V;if(A===void 0)return console;if(A.log&&A.warn&&A.error)return A;throw new Error("logger must implement log, warn and error methods")}const z=/^[a-z_$][a-z0-9_$:-]*$/i;function W(A,j){const{RULES:I}=this;if((0,s.eachItem)(A,T=>{if(I.keywords[T])throw new Error(`Keyword ${T} is already defined`);if(!z.test(T))throw new Error(`Keyword ${T} has invalid name`)}),!!j&&j.$data&&!("code"in j||"validate"in j))throw new Error('$data keyword must have "code" or "validate" function')}function x(A,j,I){var T;const h=j?.post;if(I&&h)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:P}=this;let k=h?P.post:P.rules.find(({type:U})=>U===I);if(k||(k={type:I,rules:[]},P.rules.push(k)),P.keywords[A]=!0,!j)return;const L={keyword:A,definition:{...j,type:(0,_.getJSONTypes)(j.type),schemaType:(0,_.getJSONTypes)(j.schemaType)}};j.before?pe.call(this,k,L,j.before):k.rules.push(L),P.all[A]=L,(T=j.implements)===null||T===void 0||T.forEach(U=>this.addKeyword(U))}function pe(A,j,I){const T=A.rules.findIndex(h=>h.keyword===I);T>=0?A.rules.splice(T,0,j):(A.rules.push(j),this.logger.warn(`rule ${I} is not defined`))}function he(A){let{metaSchema:j}=A;j!==void 0&&(A.$data&&this.opts.$data&&(j=_e(j)),A.validateSchema=this.compile(j,!0))}const Z={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function _e(A){return{anyOf:[A,Z]}}})(Nt)),Nt}var De={},Me={},Ve={},Cr;function vs(){if(Cr)return Ve;Cr=1,Object.defineProperty(Ve,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Ve.default=e,Ve}var ve={},Ar;function $s(){if(Ar)return ve;Ar=1,Object.defineProperty(ve,"__esModule",{value:!0}),ve.callRef=ve.getValidate=void 0;const e=Et(),t=fe(),c=J(),o=$e(),f=Xt(),n=Q(),m={keyword:"$ref",schemaType:"string",code(_){const{gen:s,schema:S,it:$}=_,{baseId:v,schemaEnv:g,validateName:b,opts:a,self:d}=$,{root:r}=g;if((S==="#"||S==="#/")&&v===r.baseId)return w();const l=f.resolveRef.call(d,r,v,S);if(l===void 0)throw new e.default($.opts.uriResolver,v,S);if(l instanceof f.SchemaEnv)return i(l);return y(l);function w(){if(g===r)return p(_,b,g,g.$async);const E=s.scopeValue("root",{ref:r});return p(_,(0,c._)`${E}.validate`,r,r.$async)}function i(E){const O=u(_,E);p(_,O,E,E.$async)}function y(E){const O=s.scopeValue("schema",a.code.source===!0?{ref:E,code:(0,c.stringify)(E)}:{ref:E}),C=s.name("valid"),M=_.subschema({schema:E,dataTypes:[],schemaPath:c.nil,topSchemaRef:O,errSchemaPath:S},C);_.mergeEvaluated(M),_.ok(C)}}};function u(_,s){const{gen:S}=_;return s.validate?S.scopeValue("validate",{ref:s.validate}):(0,c._)`${S.scopeValue("wrapper",{ref:s})}.validate`}ve.getValidate=u;function p(_,s,S,$){const{gen:v,it:g}=_,{allErrors:b,schemaEnv:a,opts:d}=g,r=d.passContext?o.default.this:c.nil;$?l():w();function l(){if(!a.$async)throw new Error("async schema referenced by sync schema");const E=v.let("valid");v.try(()=>{v.code((0,c._)`await ${(0,t.callValidateCode)(_,s,r)}`),y(s),b||v.assign(E,!0)},O=>{v.if((0,c._)`!(${O} instanceof ${g.ValidationError})`,()=>v.throw(O)),i(O),b||v.assign(E,!1)}),_.ok(E)}function w(){_.result((0,t.callValidateCode)(_,s,r),()=>y(s),()=>i(s))}function i(E){const O=(0,c._)`${E}.errors`;v.assign(o.default.vErrors,(0,c._)`${o.default.vErrors} === null ? ${O} : ${o.default.vErrors}.concat(${O})`),v.assign(o.default.errors,(0,c._)`${o.default.vErrors}.length`)}function y(E){var O;if(!g.opts.unevaluated)return;const C=(O=S?.validate)===null||O===void 0?void 0:O.evaluated;if(g.props!==!0)if(C&&!C.dynamicProps)C.props!==void 0&&(g.props=n.mergeEvaluated.props(v,C.props,g.props));else{const M=v.var("props",(0,c._)`${E}.evaluated.props`);g.props=n.mergeEvaluated.props(v,M,g.props,c.Name)}if(g.items!==!0)if(C&&!C.dynamicItems)C.items!==void 0&&(g.items=n.mergeEvaluated.items(v,C.items,g.items));else{const M=v.var("items",(0,c._)`${E}.evaluated.items`);g.items=n.mergeEvaluated.items(v,M,g.items,c.Name)}}}return ve.callRef=p,ve.default=m,ve}var Dr;function ws(){if(Dr)return Me;Dr=1,Object.defineProperty(Me,"__esModule",{value:!0});const e=vs(),t=$s(),c=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return Me.default=c,Me}var Le={},Fe={},Mr;function bs(){if(Mr)return Fe;Mr=1,Object.defineProperty(Fe,"__esModule",{value:!0});const e=J(),t=e.operators,c={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},o={message:({keyword:n,schemaCode:m})=>(0,e.str)`must be ${c[n].okStr} ${m}`,params:({keyword:n,schemaCode:m})=>(0,e._)`{comparison: ${c[n].okStr}, limit: ${m}}`},f={keyword:Object.keys(c),type:"number",schemaType:"number",$data:!0,error:o,code(n){const{keyword:m,data:u,schemaCode:p}=n;n.fail$data((0,e._)`${u} ${c[m].fail} ${p} || isNaN(${u})`)}};return Fe.default=f,Fe}var Ue={},Vr;function Es(){if(Vr)return Ue;Vr=1,Object.defineProperty(Ue,"__esModule",{value:!0});const e=J(),c={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:o})=>(0,e.str)`must be multiple of ${o}`,params:({schemaCode:o})=>(0,e._)`{multipleOf: ${o}}`},code(o){const{gen:f,data:n,schemaCode:m,it:u}=o,p=u.opts.multipleOfPrecision,_=f.let("res"),s=p?(0,e._)`Math.abs(Math.round(${_}) - ${_}) > 1e-${p}`:(0,e._)`${_} !== parseInt(${_})`;o.fail$data((0,e._)`(${m} === 0 || (${_} = ${n}/${m}, ${s}))`)}};return Ue.default=c,Ue}var ze={},Ke={},Lr;function Ss(){if(Lr)return Ke;Lr=1,Object.defineProperty(Ke,"__esModule",{value:!0});function e(t){const c=t.length;let o=0,f=0,n;for(;f<c;)o++,n=t.charCodeAt(f++),n>=55296&&n<=56319&&f<c&&(n=t.charCodeAt(f),(n&64512)===56320&&f++);return o}return Ke.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Ke}var Fr;function Ps(){if(Fr)return ze;Fr=1,Object.defineProperty(ze,"__esModule",{value:!0});const e=J(),t=Q(),c=Ss(),f={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:m}){const u=n==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${u} than ${m} characters`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:m,data:u,schemaCode:p,it:_}=n,s=m==="maxLength"?e.operators.GT:e.operators.LT,S=_.opts.unicode===!1?(0,e._)`${u}.length`:(0,e._)`${(0,t.useFunc)(n.gen,c.default)}(${u})`;n.fail$data((0,e._)`${S} ${s} ${p}`)}};return ze.default=f,ze}var He={},Ur;function Rs(){if(Ur)return He;Ur=1,Object.defineProperty(He,"__esModule",{value:!0});const e=fe(),t=J(),o={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:f})=>(0,t.str)`must match pattern "${f}"`,params:({schemaCode:f})=>(0,t._)`{pattern: ${f}}`},code(f){const{data:n,$data:m,schema:u,schemaCode:p,it:_}=f,s=_.opts.unicodeRegExp?"u":"",S=m?(0,t._)`(new RegExp(${p}, ${s}))`:(0,e.usePattern)(f,u);f.fail$data((0,t._)`!${S}.test(${n})`)}};return He.default=o,He}var Ge={},zr;function js(){if(zr)return Ge;zr=1,Object.defineProperty(Ge,"__esModule",{value:!0});const e=J(),c={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:o,schemaCode:f}){const n=o==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${n} than ${f} properties`},params:({schemaCode:o})=>(0,e._)`{limit: ${o}}`},code(o){const{keyword:f,data:n,schemaCode:m}=o,u=f==="maxProperties"?e.operators.GT:e.operators.LT;o.fail$data((0,e._)`Object.keys(${n}).length ${u} ${m}`)}};return Ge.default=c,Ge}var Je={},Kr;function Ns(){if(Kr)return Je;Kr=1,Object.defineProperty(Je,"__esModule",{value:!0});const e=fe(),t=J(),c=Q(),f={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:n}})=>(0,t.str)`must have required property '${n}'`,params:({params:{missingProperty:n}})=>(0,t._)`{missingProperty: ${n}}`},code(n){const{gen:m,schema:u,schemaCode:p,data:_,$data:s,it:S}=n,{opts:$}=S;if(!s&&u.length===0)return;const v=u.length>=$.loopRequired;if(S.allErrors?g():b(),$.strictRequired){const r=n.parentSchema.properties,{definedProperties:l}=n.it;for(const w of u)if(r?.[w]===void 0&&!l.has(w)){const i=S.schemaEnv.baseId+S.errSchemaPath,y=`required property "${w}" is not defined at "${i}" (strictRequired)`;(0,c.checkStrictMode)(S,y,S.opts.strictRequired)}}function g(){if(v||s)n.block$data(t.nil,a);else for(const r of u)(0,e.checkReportMissingProp)(n,r)}function b(){const r=m.let("missing");if(v||s){const l=m.let("valid",!0);n.block$data(l,()=>d(r,l)),n.ok(l)}else m.if((0,e.checkMissingProp)(n,u,r)),(0,e.reportMissingProp)(n,r),m.else()}function a(){m.forOf("prop",p,r=>{n.setParams({missingProperty:r}),m.if((0,e.noPropertyInData)(m,_,r,$.ownProperties),()=>n.error())})}function d(r,l){n.setParams({missingProperty:r}),m.forOf(r,p,()=>{m.assign(l,(0,e.propertyInData)(m,_,r,$.ownProperties)),m.if((0,t.not)(l),()=>{n.error(),m.break()})},t.nil)}}};return Je.default=f,Je}var Be={},Hr;function Os(){if(Hr)return Be;Hr=1,Object.defineProperty(Be,"__esModule",{value:!0});const e=J(),c={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:o,schemaCode:f}){const n=o==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${n} than ${f} items`},params:({schemaCode:o})=>(0,e._)`{limit: ${o}}`},code(o){const{keyword:f,data:n,schemaCode:m}=o,u=f==="maxItems"?e.operators.GT:e.operators.LT;o.fail$data((0,e._)`${n}.length ${u} ${m}`)}};return Be.default=c,Be}var We={},Qe={},Gr;function Yt(){if(Gr)return Qe;Gr=1,Object.defineProperty(Qe,"__esModule",{value:!0});const e=In();return e.code='require("ajv/dist/runtime/equal").default',Qe.default=e,Qe}var Jr;function Ts(){if(Jr)return We;Jr=1,Object.defineProperty(We,"__esModule",{value:!0});const e=_t(),t=J(),c=Q(),o=Yt(),n={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:m,j:u}})=>(0,t.str)`must NOT have duplicate items (items ## ${u} and ${m} are identical)`,params:({params:{i:m,j:u}})=>(0,t._)`{i: ${m}, j: ${u}}`},code(m){const{gen:u,data:p,$data:_,schema:s,parentSchema:S,schemaCode:$,it:v}=m;if(!_&&!s)return;const g=u.let("valid"),b=S.items?(0,e.getSchemaTypes)(S.items):[];m.block$data(g,a,(0,t._)`${$} === false`),m.ok(g);function a(){const w=u.let("i",(0,t._)`${p}.length`),i=u.let("j");m.setParams({i:w,j:i}),u.assign(g,!0),u.if((0,t._)`${w} > 1`,()=>(d()?r:l)(w,i))}function d(){return b.length>0&&!b.some(w=>w==="object"||w==="array")}function r(w,i){const y=u.name("item"),E=(0,e.checkDataTypes)(b,y,v.opts.strictNumbers,e.DataType.Wrong),O=u.const("indices",(0,t._)`{}`);u.for((0,t._)`;${w}--;`,()=>{u.let(y,(0,t._)`${p}[${w}]`),u.if(E,(0,t._)`continue`),b.length>1&&u.if((0,t._)`typeof ${y} == "string"`,(0,t._)`${y} += "_"`),u.if((0,t._)`typeof ${O}[${y}] == "number"`,()=>{u.assign(i,(0,t._)`${O}[${y}]`),m.error(),u.assign(g,!1).break()}).code((0,t._)`${O}[${y}] = ${w}`)})}function l(w,i){const y=(0,c.useFunc)(u,o.default),E=u.name("outer");u.label(E).for((0,t._)`;${w}--;`,()=>u.for((0,t._)`${i} = ${w}; ${i}--;`,()=>u.if((0,t._)`${y}(${p}[${w}], ${p}[${i}])`,()=>{m.error(),u.assign(g,!1).break(E)})))}}};return We.default=n,We}var Xe={},Br;function ks(){if(Br)return Xe;Br=1,Object.defineProperty(Xe,"__esModule",{value:!0});const e=J(),t=Q(),c=Yt(),f={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:n})=>(0,e._)`{allowedValue: ${n}}`},code(n){const{gen:m,data:u,$data:p,schemaCode:_,schema:s}=n;p||s&&typeof s=="object"?n.fail$data((0,e._)`!${(0,t.useFunc)(m,c.default)}(${u}, ${_})`):n.fail((0,e._)`${s} !== ${u}`)}};return Xe.default=f,Xe}var Ye={},Wr;function qs(){if(Wr)return Ye;Wr=1,Object.defineProperty(Ye,"__esModule",{value:!0});const e=J(),t=Q(),c=Yt(),f={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:n})=>(0,e._)`{allowedValues: ${n}}`},code(n){const{gen:m,data:u,$data:p,schema:_,schemaCode:s,it:S}=n;if(!p&&_.length===0)throw new Error("enum must have non-empty array");const $=_.length>=S.opts.loopEnum;let v;const g=()=>v??(v=(0,t.useFunc)(m,c.default));let b;if($||p)b=m.let("valid"),n.block$data(b,a);else{if(!Array.isArray(_))throw new Error("ajv implementation error");const r=m.const("vSchema",s);b=(0,e.or)(..._.map((l,w)=>d(r,w)))}n.pass(b);function a(){m.assign(b,!1),m.forOf("v",s,r=>m.if((0,e._)`${g()}(${u}, ${r})`,()=>m.assign(b,!0).break()))}function d(r,l){const w=_[l];return typeof w=="object"&&w!==null?(0,e._)`${g()}(${u}, ${r}[${l}])`:(0,e._)`${u} === ${w}`}}};return Ye.default=f,Ye}var Qr;function Is(){if(Qr)return Le;Qr=1,Object.defineProperty(Le,"__esModule",{value:!0});const e=bs(),t=Es(),c=Ps(),o=Rs(),f=js(),n=Ns(),m=Os(),u=Ts(),p=ks(),_=qs(),s=[e.default,t.default,c.default,o.default,f.default,n.default,m.default,u.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},p.default,_.default];return Le.default=s,Le}var Ze={},Pe={},Xr;function An(){if(Xr)return Pe;Xr=1,Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.validateAdditionalItems=void 0;const e=J(),t=Q(),o={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:n}})=>(0,e.str)`must NOT have more than ${n} items`,params:({params:{len:n}})=>(0,e._)`{limit: ${n}}`},code(n){const{parentSchema:m,it:u}=n,{items:p}=m;if(!Array.isArray(p)){(0,t.checkStrictMode)(u,'"additionalItems" is ignored when "items" is not an array of schemas');return}f(n,p)}};function f(n,m){const{gen:u,schema:p,data:_,keyword:s,it:S}=n;S.items=!0;const $=u.const("len",(0,e._)`${_}.length`);if(p===!1)n.setParams({len:m.length}),n.pass((0,e._)`${$} <= ${m.length}`);else if(typeof p=="object"&&!(0,t.alwaysValidSchema)(S,p)){const g=u.var("valid",(0,e._)`${$} <= ${m.length}`);u.if((0,e.not)(g),()=>v(g)),n.ok(g)}function v(g){u.forRange("i",m.length,$,b=>{n.subschema({keyword:s,dataProp:b,dataPropType:t.Type.Num},g),S.allErrors||u.if((0,e.not)(g),()=>u.break())})}}return Pe.validateAdditionalItems=f,Pe.default=o,Pe}var xe={},Re={},Yr;function Dn(){if(Yr)return Re;Yr=1,Object.defineProperty(Re,"__esModule",{value:!0}),Re.validateTuple=void 0;const e=J(),t=Q(),c=fe(),o={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(n){const{schema:m,it:u}=n;if(Array.isArray(m))return f(n,"additionalItems",m);u.items=!0,!(0,t.alwaysValidSchema)(u,m)&&n.ok((0,c.validateArray)(n))}};function f(n,m,u=n.schema){const{gen:p,parentSchema:_,data:s,keyword:S,it:$}=n;b(_),$.opts.unevaluated&&u.length&&$.items!==!0&&($.items=t.mergeEvaluated.items(p,u.length,$.items));const v=p.name("valid"),g=p.const("len",(0,e._)`${s}.length`);u.forEach((a,d)=>{(0,t.alwaysValidSchema)($,a)||(p.if((0,e._)`${g} > ${d}`,()=>n.subschema({keyword:S,schemaProp:d,dataProp:d},v)),n.ok(v))});function b(a){const{opts:d,errSchemaPath:r}=$,l=u.length,w=l===a.minItems&&(l===a.maxItems||a[m]===!1);if(d.strictTuples&&!w){const i=`"${S}" is ${l}-tuple, but minItems or maxItems/${m} are not specified or different at path "${r}"`;(0,t.checkStrictMode)($,i,d.strictTuples)}}}return Re.validateTuple=f,Re.default=o,Re}var Zr;function Cs(){if(Zr)return xe;Zr=1,Object.defineProperty(xe,"__esModule",{value:!0});const e=Dn(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:c=>(0,e.validateTuple)(c,"items")};return xe.default=t,xe}var et={},xr;function As(){if(xr)return et;xr=1,Object.defineProperty(et,"__esModule",{value:!0});const e=J(),t=Q(),c=fe(),o=An(),n={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:m}})=>(0,e.str)`must NOT have more than ${m} items`,params:({params:{len:m}})=>(0,e._)`{limit: ${m}}`},code(m){const{schema:u,parentSchema:p,it:_}=m,{prefixItems:s}=p;_.items=!0,!(0,t.alwaysValidSchema)(_,u)&&(s?(0,o.validateAdditionalItems)(m,s):m.ok((0,c.validateArray)(m)))}};return et.default=n,et}var tt={},en;function Ds(){if(en)return tt;en=1,Object.defineProperty(tt,"__esModule",{value:!0});const e=J(),t=Q(),o={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:f,max:n}})=>n===void 0?(0,e.str)`must contain at least ${f} valid item(s)`:(0,e.str)`must contain at least ${f} and no more than ${n} valid item(s)`,params:({params:{min:f,max:n}})=>n===void 0?(0,e._)`{minContains: ${f}}`:(0,e._)`{minContains: ${f}, maxContains: ${n}}`},code(f){const{gen:n,schema:m,parentSchema:u,data:p,it:_}=f;let s,S;const{minContains:$,maxContains:v}=u;_.opts.next?(s=$===void 0?1:$,S=v):s=1;const g=n.const("len",(0,e._)`${p}.length`);if(f.setParams({min:s,max:S}),S===void 0&&s===0){(0,t.checkStrictMode)(_,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(S!==void 0&&s>S){(0,t.checkStrictMode)(_,'"minContains" > "maxContains" is always invalid'),f.fail();return}if((0,t.alwaysValidSchema)(_,m)){let l=(0,e._)`${g} >= ${s}`;S!==void 0&&(l=(0,e._)`${l} && ${g} <= ${S}`),f.pass(l);return}_.items=!0;const b=n.name("valid");S===void 0&&s===1?d(b,()=>n.if(b,()=>n.break())):s===0?(n.let(b,!0),S!==void 0&&n.if((0,e._)`${p}.length > 0`,a)):(n.let(b,!1),a()),f.result(b,()=>f.reset());function a(){const l=n.name("_valid"),w=n.let("count",0);d(l,()=>n.if(l,()=>r(w)))}function d(l,w){n.forRange("i",0,g,i=>{f.subschema({keyword:"contains",dataProp:i,dataPropType:t.Type.Num,compositeRule:!0},l),w()})}function r(l){n.code((0,e._)`${l}++`),S===void 0?n.if((0,e._)`${l} >= ${s}`,()=>n.assign(b,!0).break()):(n.if((0,e._)`${l} > ${S}`,()=>n.assign(b,!1).break()),s===1?n.assign(b,!0):n.if((0,e._)`${l} >= ${s}`,()=>n.assign(b,!0)))}}};return tt.default=o,tt}var Mt={},tn;function Ms(){return tn||(tn=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=J(),c=Q(),o=fe();e.error={message:({params:{property:p,depsCount:_,deps:s}})=>{const S=_===1?"property":"properties";return(0,t.str)`must have ${S} ${s} when property ${p} is present`},params:({params:{property:p,depsCount:_,deps:s,missingProperty:S}})=>(0,t._)`{property: ${p},
|
|
6
6
|
missingProperty: ${S},
|
|
7
7
|
depsCount: ${_},
|
|
8
|
-
deps: ${s}}`};const f={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(h){const[_,s]=n(h);m(h,_),u(h,s)}};function n({schema:h}){const _={},s={};for(const S in h){if(S==="__proto__")continue;const $=Array.isArray(h[S])?_:s;$[S]=h[S]}return[_,s]}function m(h,_=h.schema){const{gen:s,data:S,it:$}=h;if(Object.keys(_).length===0)return;const v=s.let("missing");for(const g in _){const b=_[g];if(b.length===0)continue;const a=(0,o.propertyInData)(s,S,g,$.opts.ownProperties);h.setParams({property:g,depsCount:b.length,deps:b.join(", ")}),$.allErrors?s.if(a,()=>{for(const d of b)(0,o.checkReportMissingProp)(h,d)}):(s.if((0,t._)`${a} && (${(0,o.checkMissingProp)(h,b,v)})`),(0,o.reportMissingProp)(h,v),s.else())}}e.validatePropertyDeps=m;function u(h,_=h.schema){const{gen:s,data:S,keyword:$,it:v}=h,g=s.name("valid");for(const b in _)(0,c.alwaysValidSchema)(v,_[b])||(s.if((0,o.propertyInData)(s,S,b,v.opts.ownProperties),()=>{const a=h.subschema({keyword:$,schemaProp:b},g);h.mergeValidEvaluated(a,g)},()=>s.var(g,!0)),h.ok(g))}e.validateSchemaDeps=u,e.default=f})(Mt)),Mt}var rt={},rn;function Vs(){if(rn)return rt;rn=1,Object.defineProperty(rt,"__esModule",{value:!0});const e=J(),t=Q(),o={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:f})=>(0,e._)`{propertyName: ${f.propertyName}}`},code(f){const{gen:n,schema:m,data:u,it:h}=f;if((0,t.alwaysValidSchema)(h,m))return;const _=n.name("valid");n.forIn("key",u,s=>{f.setParams({propertyName:s}),f.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},_),n.if((0,e.not)(_),()=>{f.error(!0),h.allErrors||n.break()})}),f.ok(_)}};return rt.default=o,rt}var nt={},nn;function Mn(){if(nn)return nt;nn=1,Object.defineProperty(nt,"__esModule",{value:!0});const e=fe(),t=J(),c=$e(),o=Q(),n={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:m})=>(0,t._)`{additionalProperty: ${m.additionalProperty}}`},code(m){const{gen:u,schema:h,parentSchema:_,data:s,errsCount:S,it:$}=m;if(!S)throw new Error("ajv implementation error");const{allErrors:v,opts:g}=$;if($.props=!0,g.removeAdditional!=="all"&&(0,o.alwaysValidSchema)($,h))return;const b=(0,e.allSchemaProperties)(_.properties),a=(0,e.allSchemaProperties)(_.patternProperties);d(),m.ok((0,t._)`${S} === ${c.default.errors}`);function d(){u.forIn("key",s,y=>{!b.length&&!a.length?w(y):u.if(r(y),()=>w(y))})}function r(y){let E;if(b.length>8){const O=(0,o.schemaRefOrVal)($,_.properties,"properties");E=(0,e.isOwnProperty)(u,O,y)}else b.length?E=(0,t.or)(...b.map(O=>(0,t._)`${y} === ${O}`)):E=t.nil;return a.length&&(E=(0,t.or)(E,...a.map(O=>(0,t._)`${(0,e.usePattern)(m,O)}.test(${y})`))),(0,t.not)(E)}function l(y){u.code((0,t._)`delete ${s}[${y}]`)}function w(y){if(g.removeAdditional==="all"||g.removeAdditional&&h===!1){l(y);return}if(h===!1){m.setParams({additionalProperty:y}),m.error(),v||u.break();return}if(typeof h=="object"&&!(0,o.alwaysValidSchema)($,h)){const E=u.name("valid");g.removeAdditional==="failing"?(i(y,E,!1),u.if((0,t.not)(E),()=>{m.reset(),l(y)})):(i(y,E),v||u.if((0,t.not)(E),()=>u.break()))}}function i(y,E,O){const C={keyword:"additionalProperties",dataProp:y,dataPropType:o.Type.Str};O===!1&&Object.assign(C,{compositeRule:!0,createErrors:!1,allErrors:!1}),m.subschema(C,E)}}};return nt.default=n,nt}var st={},sn;function Ls(){if(sn)return st;sn=1,Object.defineProperty(st,"__esModule",{value:!0});const e=bt(),t=fe(),c=Q(),o=Mn(),f={keyword:"properties",type:"object",schemaType:"object",code(n){const{gen:m,schema:u,parentSchema:h,data:_,it:s}=n;s.opts.removeAdditional==="all"&&h.additionalProperties===void 0&&o.default.code(new e.KeywordCxt(s,o.default,"additionalProperties"));const S=(0,t.allSchemaProperties)(u);for(const a of S)s.definedProperties.add(a);s.opts.unevaluated&&S.length&&s.props!==!0&&(s.props=c.mergeEvaluated.props(m,(0,c.toHash)(S),s.props));const $=S.filter(a=>!(0,c.alwaysValidSchema)(s,u[a]));if($.length===0)return;const v=m.name("valid");for(const a of $)g(a)?b(a):(m.if((0,t.propertyInData)(m,_,a,s.opts.ownProperties)),b(a),s.allErrors||m.else().var(v,!0),m.endIf()),n.it.definedProperties.add(a),n.ok(v);function g(a){return s.opts.useDefaults&&!s.compositeRule&&u[a].default!==void 0}function b(a){n.subschema({keyword:"properties",schemaProp:a,dataProp:a},v)}}};return st.default=f,st}var ot={},on;function Fs(){if(on)return ot;on=1,Object.defineProperty(ot,"__esModule",{value:!0});const e=fe(),t=J(),c=Q(),o=Q(),f={keyword:"patternProperties",type:"object",schemaType:"object",code(n){const{gen:m,schema:u,data:h,parentSchema:_,it:s}=n,{opts:S}=s,$=(0,e.allSchemaProperties)(u),v=$.filter(w=>(0,c.alwaysValidSchema)(s,u[w]));if($.length===0||v.length===$.length&&(!s.opts.unevaluated||s.props===!0))return;const g=S.strictSchema&&!S.allowMatchingProperties&&_.properties,b=m.name("valid");s.props!==!0&&!(s.props instanceof t.Name)&&(s.props=(0,o.evaluatedPropsToName)(m,s.props));const{props:a}=s;d();function d(){for(const w of $)g&&r(w),s.allErrors?l(w):(m.var(b,!0),l(w),m.if(b))}function r(w){for(const i in g)new RegExp(w).test(i)&&(0,c.checkStrictMode)(s,`property ${i} matches pattern ${w} (use allowMatchingProperties)`)}function l(w){m.forIn("key",h,i=>{m.if((0,t._)`${(0,e.usePattern)(n,w)}.test(${i})`,()=>{const y=v.includes(w);y||n.subschema({keyword:"patternProperties",schemaProp:w,dataProp:i,dataPropType:o.Type.Str},b),s.opts.unevaluated&&a!==!0?m.assign((0,t._)`${a}[${i}]`,!0):!y&&!s.allErrors&&m.if((0,t.not)(b),()=>m.break())})})}}};return ot.default=f,ot}var it={},an;function Us(){if(an)return it;an=1,Object.defineProperty(it,"__esModule",{value:!0});const e=Q(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(c){const{gen:o,schema:f,it:n}=c;if((0,e.alwaysValidSchema)(n,f)){c.fail();return}const m=o.name("valid");c.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},m),c.failResult(m,()=>c.reset(),()=>c.error())},error:{message:"must NOT be valid"}};return it.default=t,it}var at={},un;function zs(){if(un)return at;un=1,Object.defineProperty(at,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:fe().validateUnion,error:{message:"must match a schema in anyOf"}};return at.default=t,at}var ut={},cn;function Ks(){if(cn)return ut;cn=1,Object.defineProperty(ut,"__esModule",{value:!0});const e=J(),t=Q(),o={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:f})=>(0,e._)`{passingSchemas: ${f.passing}}`},code(f){const{gen:n,schema:m,parentSchema:u,it:h}=f;if(!Array.isArray(m))throw new Error("ajv implementation error");if(h.opts.discriminator&&u.discriminator)return;const _=m,s=n.let("valid",!1),S=n.let("passing",null),$=n.name("_valid");f.setParams({passing:S}),n.block(v),f.result(s,()=>f.reset(),()=>f.error(!0));function v(){_.forEach((g,b)=>{let a;(0,t.alwaysValidSchema)(h,g)?n.var($,!0):a=f.subschema({keyword:"oneOf",schemaProp:b,compositeRule:!0},$),b>0&&n.if((0,e._)`${$} && ${s}`).assign(s,!1).assign(S,(0,e._)`[${S}, ${b}]`).else(),n.if($,()=>{n.assign(s,!0),n.assign(S,b),a&&f.mergeEvaluated(a,e.Name)})})}}};return ut.default=o,ut}var ct={},ln;function Hs(){if(ln)return ct;ln=1,Object.defineProperty(ct,"__esModule",{value:!0});const e=Q(),t={keyword:"allOf",schemaType:"array",code(c){const{gen:o,schema:f,it:n}=c;if(!Array.isArray(f))throw new Error("ajv implementation error");const m=o.name("valid");f.forEach((u,h)=>{if((0,e.alwaysValidSchema)(n,u))return;const _=c.subschema({keyword:"allOf",schemaProp:h},m);c.ok(m),c.mergeEvaluated(_)})}};return ct.default=t,ct}var lt={},dn;function Gs(){if(dn)return lt;dn=1,Object.defineProperty(lt,"__esModule",{value:!0});const e=J(),t=Q(),o={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:n})=>(0,e.str)`must match "${n.ifClause}" schema`,params:({params:n})=>(0,e._)`{failingKeyword: ${n.ifClause}}`},code(n){const{gen:m,parentSchema:u,it:h}=n;u.then===void 0&&u.else===void 0&&(0,t.checkStrictMode)(h,'"if" without "then" and "else" is ignored');const _=f(h,"then"),s=f(h,"else");if(!_&&!s)return;const S=m.let("valid",!0),$=m.name("_valid");if(v(),n.reset(),_&&s){const b=m.let("ifClause");n.setParams({ifClause:b}),m.if($,g("then",b),g("else",b))}else _?m.if($,g("then")):m.if((0,e.not)($),g("else"));n.pass(S,()=>n.error(!0));function v(){const b=n.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},$);n.mergeEvaluated(b)}function g(b,a){return()=>{const d=n.subschema({keyword:b},$);m.assign(S,$),n.mergeValidEvaluated(d,S),a?m.assign(a,(0,e._)`${b}`):n.setParams({ifClause:b})}}}};function f(n,m){const u=n.schema[m];return u!==void 0&&!(0,t.alwaysValidSchema)(n,u)}return lt.default=o,lt}var dt={},fn;function Js(){if(fn)return dt;fn=1,Object.defineProperty(dt,"__esModule",{value:!0});const e=Q(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:c,parentSchema:o,it:f}){o.if===void 0&&(0,e.checkStrictMode)(f,`"${c}" without "if" is ignored`)}};return dt.default=t,dt}var hn;function Bs(){if(hn)return Ze;hn=1,Object.defineProperty(Ze,"__esModule",{value:!0});const e=An(),t=Cs(),c=Dn(),o=As(),f=Ds(),n=Ms(),m=Vs(),u=Mn(),h=Ls(),_=Fs(),s=Us(),S=zs(),$=Ks(),v=Hs(),g=Gs(),b=Js();function a(d=!1){const r=[s.default,S.default,$.default,v.default,g.default,b.default,m.default,u.default,n.default,h.default,_.default];return d?r.push(t.default,o.default):r.push(e.default,c.default),r.push(f.default),r}return Ze.default=a,Ze}var ft={},ht={},pn;function Ws(){if(pn)return ht;pn=1,Object.defineProperty(ht,"__esModule",{value:!0});const e=J(),c={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:o})=>(0,e.str)`must match format "${o}"`,params:({schemaCode:o})=>(0,e._)`{format: ${o}}`},code(o,f){const{gen:n,data:m,$data:u,schema:h,schemaCode:_,it:s}=o,{opts:S,errSchemaPath:$,schemaEnv:v,self:g}=s;if(!S.validateFormats)return;u?b():a();function b(){const d=n.scopeValue("formats",{ref:g.formats,code:S.code.formats}),r=n.const("fDef",(0,e._)`${d}[${_}]`),l=n.let("fType"),w=n.let("format");n.if((0,e._)`typeof ${r} == "object" && !(${r} instanceof RegExp)`,()=>n.assign(l,(0,e._)`${r}.type || "string"`).assign(w,(0,e._)`${r}.validate`),()=>n.assign(l,(0,e._)`"string"`).assign(w,r)),o.fail$data((0,e.or)(i(),y()));function i(){return S.strictSchema===!1?e.nil:(0,e._)`${_} && !${w}`}function y(){const E=v.$async?(0,e._)`(${r}.async ? await ${w}(${m}) : ${w}(${m}))`:(0,e._)`${w}(${m})`,O=(0,e._)`(typeof ${w} == "function" ? ${E} : ${w}.test(${m}))`;return(0,e._)`${w} && ${w} !== true && ${l} === ${f} && !${O}`}}function a(){const d=g.formats[h];if(!d){i();return}if(d===!0)return;const[r,l,w]=y(d);r===f&&o.pass(E());function i(){if(S.strictSchema===!1){g.logger.warn(O());return}throw new Error(O());function O(){return`unknown format "${h}" ignored in schema at path "${$}"`}}function y(O){const C=O instanceof RegExp?(0,e.regexpCode)(O):S.code.formats?(0,e._)`${S.code.formats}${(0,e.getProperty)(h)}`:void 0,M=n.scopeValue("formats",{key:h,ref:O,code:C});return typeof O=="object"&&!(O instanceof RegExp)?[O.type||"string",O.validate,(0,e._)`${M}.validate`]:["string",O,M]}function E(){if(typeof d=="object"&&!(d instanceof RegExp)&&d.async){if(!v.$async)throw new Error("async format in sync schema");return(0,e._)`await ${w}(${m})`}return typeof l=="function"?(0,e._)`${w}(${m})`:(0,e._)`${w}.test(${m})`}}}};return ht.default=c,ht}var mn;function Qs(){if(mn)return ft;mn=1,Object.defineProperty(ft,"__esModule",{value:!0});const t=[Ws().default];return ft.default=t,ft}var Ee={},yn;function Xs(){return yn||(yn=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.contentVocabulary=Ee.metadataVocabulary=void 0,Ee.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Ee.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Ee}var gn;function Ys(){if(gn)return De;gn=1,Object.defineProperty(De,"__esModule",{value:!0});const e=ws(),t=Is(),c=Bs(),o=Qs(),f=Xs(),n=[e.default,t.default,(0,c.default)(),o.default,f.metadataVocabulary,f.contentVocabulary];return De.default=n,De}var pt={},Te={},_n;function Zs(){if(_n)return Te;_n=1,Object.defineProperty(Te,"__esModule",{value:!0}),Te.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(Te.DiscrError=e={})),Te}var vn;function xs(){if(vn)return pt;vn=1,Object.defineProperty(pt,"__esModule",{value:!0});const e=J(),t=Zs(),c=Xt(),o=Et(),f=Q(),m={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:u,tagName:h}})=>u===t.DiscrError.Tag?`tag "${h}" must be string`:`value of tag "${h}" must be in oneOf`,params:({params:{discrError:u,tag:h,tagName:_}})=>(0,e._)`{error: ${u}, tag: ${_}, tagValue: ${h}}`},code(u){const{gen:h,data:_,schema:s,parentSchema:S,it:$}=u,{oneOf:v}=S;if(!$.opts.discriminator)throw new Error("discriminator: requires discriminator option");const g=s.propertyName;if(typeof g!="string")throw new Error("discriminator: requires propertyName");if(s.mapping)throw new Error("discriminator: mapping is not supported");if(!v)throw new Error("discriminator: requires oneOf keyword");const b=h.let("valid",!1),a=h.const("tag",(0,e._)`${_}${(0,e.getProperty)(g)}`);h.if((0,e._)`typeof ${a} == "string"`,()=>d(),()=>u.error(!1,{discrError:t.DiscrError.Tag,tag:a,tagName:g})),u.ok(b);function d(){const w=l();h.if(!1);for(const i in w)h.elseIf((0,e._)`${a} === ${i}`),h.assign(b,r(w[i]));h.else(),u.error(!1,{discrError:t.DiscrError.Mapping,tag:a,tagName:g}),h.endIf()}function r(w){const i=h.name("valid"),y=u.subschema({keyword:"oneOf",schemaProp:w},i);return u.mergeEvaluated(y,e.Name),i}function l(){var w;const i={},y=O(S);let E=!0;for(let V=0;V<v.length;V++){let K=v[V];if(K?.$ref&&!(0,f.schemaHasRulesButRef)(K,$.self.RULES)){const W=K.$ref;if(K=c.resolveRef.call($.self,$.schemaEnv.root,$.baseId,W),K instanceof c.SchemaEnv&&(K=K.schema),K===void 0)throw new o.default($.opts.uriResolver,$.baseId,W)}const z=(w=K?.properties)===null||w===void 0?void 0:w[g];if(typeof z!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${g}"`);E=E&&(y||O(K)),C(z,V)}if(!E)throw new Error(`discriminator: "${g}" must be required`);return i;function O({required:V}){return Array.isArray(V)&&V.includes(g)}function C(V,K){if(V.const)M(V.const,K);else if(V.enum)for(const z of V.enum)M(z,K);else throw new Error(`discriminator: "properties/${g}" must have "const" or "enum"`)}function M(V,K){if(typeof V!="string"||V in i)throw new Error(`discriminator: "${g}" values must be unique strings`);i[V]=K}}}};return pt.default=m,pt}const eo="http://json-schema.org/draft-07/schema#",to="http://json-schema.org/draft-07/schema#",ro="Core schema meta-schema",no={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},so=["object","boolean"],oo={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},io={$schema:eo,$id:to,title:ro,definitions:no,type:so,properties:oo,default:!0};var $n;function ao(){return $n||($n=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const c=_s(),o=Ys(),f=xs(),n=io,m=["/properties"],u="http://json-schema.org/draft-07/schema";class h extends c.default{_addVocabularies(){super._addVocabularies(),o.default.forEach(g=>this.addVocabulary(g)),this.opts.discriminator&&this.addKeyword(f.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const g=this.opts.$data?this.$dataMetaSchema(n,m):n;this.addMetaSchema(g,u,!1),this.refs["http://json-schema.org/schema"]=u}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(u)?u:void 0)}}t.Ajv=h,e.exports=t=h,e.exports.Ajv=h,Object.defineProperty(t,"__esModule",{value:!0}),t.default=h;var _=bt();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return _.KeywordCxt}});var s=J();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return s._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return s.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return s.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return s.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return s.CodeGen}});var S=Qt();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return S.default}});var $=Et();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return $.default}})})(ke,ke.exports)),ke.exports}var uo=ao();const co=Wt(uo);var mt={exports:{}},wn;function lo(){return wn||(wn=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const c={},o={timestamp:()=>()=>Date.now(),datetime:()=>()=>new Date().toISOString(),date:()=>()=>new Date().toISOString().slice(0,10),time:()=>()=>new Date().toISOString().slice(11),random:()=>()=>Math.random(),randomint:s=>{var S;const $=(S=s?.max)!==null&&S!==void 0?S:2;return()=>Math.floor(Math.random()*$)},seq:s=>{var S;const $=(S=s?.name)!==null&&S!==void 0?S:"";return c[$]||(c[$]=0),()=>c[$]++}},f=Object.assign(n,{DEFAULTS:o});function n(){return{keyword:"dynamicDefaults",type:"object",schemaType:["string","object"],modifying:!0,valid:!0,compile(s,S,$){if(!$.opts.useDefaults||$.compositeRule)return()=>!0;const v={};for(const b in s)v[b]=m(s[b]);const g=$.opts.useDefaults==="empty";return b=>{for(const a in s)(b[a]===void 0||g&&(b[a]===null||b[a]===""))&&(b[a]=v[a]());return!0}},metaSchema:{type:"object",additionalProperties:{anyOf:[{type:"string"},{type:"object",additionalProperties:!1,required:["func","args"],properties:{func:{type:"string"},args:{type:"object"}}}]}}}}function m(s){return typeof s=="object"?u(s):h(s)}function u({func:s,args:S}){const $=o[s];return _(s,$),$(S)}function h(s=""){const S=o[s];return _(s,S),S()}function _(s,S){if(!S)throw new Error(`invalid "dynamicDefaults" keyword property value: ${s}`)}t.default=f,e.exports=f})(mt,mt.exports)),mt.exports}var fo=lo();const Vn=Wt(fo),ue={fatal:0,error:0,warn:1,log:2,info:3,success:3,fail:3,debug:4,trace:5,verbose:Number.POSITIVE_INFINITY},bn={silent:{level:-1},fatal:{level:ue.fatal},error:{level:ue.error},warn:{level:ue.warn},log:{level:ue.log},info:{level:ue.info},success:{level:ue.success},fail:{level:ue.fail},ready:{level:ue.info},start:{level:ue.info},box:{level:ue.info},debug:{level:ue.debug},trace:{level:ue.trace},verbose:{level:ue.verbose}};function Vt(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function Kt(e,t,c=".",o){if(!Vt(t))return Kt(e,{},c);const f=Object.assign({},t);for(const n in e){if(n==="__proto__"||n==="constructor")continue;const m=e[n];m!=null&&(Array.isArray(m)&&Array.isArray(f[n])?f[n]=[...m,...f[n]]:Vt(m)&&Vt(f[n])?f[n]=Kt(m,f[n],(c?`${c}.`:"")+n.toString()):f[n]=m)}return f}function ho(e){return(...t)=>t.reduce((c,o)=>Kt(c,o,""),{})}const po=ho();function mo(e){return Object.prototype.toString.call(e)==="[object Object]"}function yo(e){return!(!mo(e)||!e.message&&!e.args||e.stack)}let Lt=!1;const En=[];class ne{options;_lastLog;_mockFn;constructor(t={}){const c=t.types||bn;this.options=po({...t,defaults:{...t.defaults},level:Ft(t.level,c),reporters:[...t.reporters||[]]},{types:bn,throttle:1e3,throttleMin:5,formatOptions:{date:!0,colors:!1,compact:!0}});for(const o in c){const f={type:o,...this.options.defaults,...c[o]};this[o]=this._wrapLogFn(f),this[o].raw=this._wrapLogFn(f,!0)}this.options.mockFn&&this.mockTypes(),this._lastLog={}}get level(){return this.options.level}set level(t){this.options.level=Ft(t,this.options.types,this.options.level)}prompt(t,c){if(!this.options.prompt)throw new Error("prompt is not supported!");return this.options.prompt(t,c)}create(t){const c=new ne({...this.options,...t});return this._mockFn&&c.mockTypes(this._mockFn),c}withDefaults(t){return this.create({...this.options,defaults:{...this.options.defaults,...t}})}withTag(t){return this.withDefaults({tag:this.options.defaults.tag?this.options.defaults.tag+":"+t:t})}addReporter(t){return this.options.reporters.push(t),this}removeReporter(t){if(t){const c=this.options.reporters.indexOf(t);if(c!==-1)return this.options.reporters.splice(c,1)}else this.options.reporters.splice(0);return this}setReporters(t){return this.options.reporters=Array.isArray(t)?t:[t],this}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}wrapConsole(){for(const t in this.options.types)console["__"+t]||(console["__"+t]=console[t]),console[t]=this[t].raw}restoreConsole(){for(const t in this.options.types)console["__"+t]&&(console[t]=console["__"+t],delete console["__"+t])}wrapStd(){this._wrapStream(this.options.stdout,"log"),this._wrapStream(this.options.stderr,"log")}_wrapStream(t,c){t&&(t.__write||(t.__write=t.write),t.write=o=>{this[c].raw(String(o).trim())})}restoreStd(){this._restoreStream(this.options.stdout),this._restoreStream(this.options.stderr)}_restoreStream(t){t&&t.__write&&(t.write=t.__write,delete t.__write)}pauseLogs(){Lt=!0}resumeLogs(){Lt=!1;const t=En.splice(0);for(const c of t)c[0]._logFn(c[1],c[2])}mockTypes(t){const c=t||this.options.mockFn;if(this._mockFn=c,typeof c=="function")for(const o in this.options.types)this[o]=c(o,this.options.types[o])||this[o],this[o].raw=this[o]}_wrapLogFn(t,c){return(...o)=>{if(Lt){En.push([this,t,o,c]);return}return this._logFn(t,o,c)}}_logFn(t,c,o){if((t.level||0)>this.level)return!1;const f={date:new Date,args:[],...t,level:Ft(t.level,this.options.types)};!o&&c.length===1&&yo(c[0])?Object.assign(f,c[0]):f.args=[...c],f.message&&(f.args.unshift(f.message),delete f.message),f.additional&&(Array.isArray(f.additional)||(f.additional=f.additional.split(`
|
|
8
|
+
deps: ${s}}`};const f={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(p){const[_,s]=n(p);m(p,_),u(p,s)}};function n({schema:p}){const _={},s={};for(const S in p){if(S==="__proto__")continue;const $=Array.isArray(p[S])?_:s;$[S]=p[S]}return[_,s]}function m(p,_=p.schema){const{gen:s,data:S,it:$}=p;if(Object.keys(_).length===0)return;const v=s.let("missing");for(const g in _){const b=_[g];if(b.length===0)continue;const a=(0,o.propertyInData)(s,S,g,$.opts.ownProperties);p.setParams({property:g,depsCount:b.length,deps:b.join(", ")}),$.allErrors?s.if(a,()=>{for(const d of b)(0,o.checkReportMissingProp)(p,d)}):(s.if((0,t._)`${a} && (${(0,o.checkMissingProp)(p,b,v)})`),(0,o.reportMissingProp)(p,v),s.else())}}e.validatePropertyDeps=m;function u(p,_=p.schema){const{gen:s,data:S,keyword:$,it:v}=p,g=s.name("valid");for(const b in _)(0,c.alwaysValidSchema)(v,_[b])||(s.if((0,o.propertyInData)(s,S,b,v.opts.ownProperties),()=>{const a=p.subschema({keyword:$,schemaProp:b},g);p.mergeValidEvaluated(a,g)},()=>s.var(g,!0)),p.ok(g))}e.validateSchemaDeps=u,e.default=f})(Mt)),Mt}var rt={},rn;function Vs(){if(rn)return rt;rn=1,Object.defineProperty(rt,"__esModule",{value:!0});const e=J(),t=Q(),o={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:f})=>(0,e._)`{propertyName: ${f.propertyName}}`},code(f){const{gen:n,schema:m,data:u,it:p}=f;if((0,t.alwaysValidSchema)(p,m))return;const _=n.name("valid");n.forIn("key",u,s=>{f.setParams({propertyName:s}),f.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},_),n.if((0,e.not)(_),()=>{f.error(!0),p.allErrors||n.break()})}),f.ok(_)}};return rt.default=o,rt}var nt={},nn;function Mn(){if(nn)return nt;nn=1,Object.defineProperty(nt,"__esModule",{value:!0});const e=fe(),t=J(),c=$e(),o=Q(),n={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:m})=>(0,t._)`{additionalProperty: ${m.additionalProperty}}`},code(m){const{gen:u,schema:p,parentSchema:_,data:s,errsCount:S,it:$}=m;if(!S)throw new Error("ajv implementation error");const{allErrors:v,opts:g}=$;if($.props=!0,g.removeAdditional!=="all"&&(0,o.alwaysValidSchema)($,p))return;const b=(0,e.allSchemaProperties)(_.properties),a=(0,e.allSchemaProperties)(_.patternProperties);d(),m.ok((0,t._)`${S} === ${c.default.errors}`);function d(){u.forIn("key",s,y=>{!b.length&&!a.length?w(y):u.if(r(y),()=>w(y))})}function r(y){let E;if(b.length>8){const O=(0,o.schemaRefOrVal)($,_.properties,"properties");E=(0,e.isOwnProperty)(u,O,y)}else b.length?E=(0,t.or)(...b.map(O=>(0,t._)`${y} === ${O}`)):E=t.nil;return a.length&&(E=(0,t.or)(E,...a.map(O=>(0,t._)`${(0,e.usePattern)(m,O)}.test(${y})`))),(0,t.not)(E)}function l(y){u.code((0,t._)`delete ${s}[${y}]`)}function w(y){if(g.removeAdditional==="all"||g.removeAdditional&&p===!1){l(y);return}if(p===!1){m.setParams({additionalProperty:y}),m.error(),v||u.break();return}if(typeof p=="object"&&!(0,o.alwaysValidSchema)($,p)){const E=u.name("valid");g.removeAdditional==="failing"?(i(y,E,!1),u.if((0,t.not)(E),()=>{m.reset(),l(y)})):(i(y,E),v||u.if((0,t.not)(E),()=>u.break()))}}function i(y,E,O){const C={keyword:"additionalProperties",dataProp:y,dataPropType:o.Type.Str};O===!1&&Object.assign(C,{compositeRule:!0,createErrors:!1,allErrors:!1}),m.subschema(C,E)}}};return nt.default=n,nt}var st={},sn;function Ls(){if(sn)return st;sn=1,Object.defineProperty(st,"__esModule",{value:!0});const e=bt(),t=fe(),c=Q(),o=Mn(),f={keyword:"properties",type:"object",schemaType:"object",code(n){const{gen:m,schema:u,parentSchema:p,data:_,it:s}=n;s.opts.removeAdditional==="all"&&p.additionalProperties===void 0&&o.default.code(new e.KeywordCxt(s,o.default,"additionalProperties"));const S=(0,t.allSchemaProperties)(u);for(const a of S)s.definedProperties.add(a);s.opts.unevaluated&&S.length&&s.props!==!0&&(s.props=c.mergeEvaluated.props(m,(0,c.toHash)(S),s.props));const $=S.filter(a=>!(0,c.alwaysValidSchema)(s,u[a]));if($.length===0)return;const v=m.name("valid");for(const a of $)g(a)?b(a):(m.if((0,t.propertyInData)(m,_,a,s.opts.ownProperties)),b(a),s.allErrors||m.else().var(v,!0),m.endIf()),n.it.definedProperties.add(a),n.ok(v);function g(a){return s.opts.useDefaults&&!s.compositeRule&&u[a].default!==void 0}function b(a){n.subschema({keyword:"properties",schemaProp:a,dataProp:a},v)}}};return st.default=f,st}var ot={},on;function Fs(){if(on)return ot;on=1,Object.defineProperty(ot,"__esModule",{value:!0});const e=fe(),t=J(),c=Q(),o=Q(),f={keyword:"patternProperties",type:"object",schemaType:"object",code(n){const{gen:m,schema:u,data:p,parentSchema:_,it:s}=n,{opts:S}=s,$=(0,e.allSchemaProperties)(u),v=$.filter(w=>(0,c.alwaysValidSchema)(s,u[w]));if($.length===0||v.length===$.length&&(!s.opts.unevaluated||s.props===!0))return;const g=S.strictSchema&&!S.allowMatchingProperties&&_.properties,b=m.name("valid");s.props!==!0&&!(s.props instanceof t.Name)&&(s.props=(0,o.evaluatedPropsToName)(m,s.props));const{props:a}=s;d();function d(){for(const w of $)g&&r(w),s.allErrors?l(w):(m.var(b,!0),l(w),m.if(b))}function r(w){for(const i in g)new RegExp(w).test(i)&&(0,c.checkStrictMode)(s,`property ${i} matches pattern ${w} (use allowMatchingProperties)`)}function l(w){m.forIn("key",p,i=>{m.if((0,t._)`${(0,e.usePattern)(n,w)}.test(${i})`,()=>{const y=v.includes(w);y||n.subschema({keyword:"patternProperties",schemaProp:w,dataProp:i,dataPropType:o.Type.Str},b),s.opts.unevaluated&&a!==!0?m.assign((0,t._)`${a}[${i}]`,!0):!y&&!s.allErrors&&m.if((0,t.not)(b),()=>m.break())})})}}};return ot.default=f,ot}var it={},an;function Us(){if(an)return it;an=1,Object.defineProperty(it,"__esModule",{value:!0});const e=Q(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(c){const{gen:o,schema:f,it:n}=c;if((0,e.alwaysValidSchema)(n,f)){c.fail();return}const m=o.name("valid");c.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},m),c.failResult(m,()=>c.reset(),()=>c.error())},error:{message:"must NOT be valid"}};return it.default=t,it}var at={},un;function zs(){if(un)return at;un=1,Object.defineProperty(at,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:fe().validateUnion,error:{message:"must match a schema in anyOf"}};return at.default=t,at}var ut={},cn;function Ks(){if(cn)return ut;cn=1,Object.defineProperty(ut,"__esModule",{value:!0});const e=J(),t=Q(),o={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:f})=>(0,e._)`{passingSchemas: ${f.passing}}`},code(f){const{gen:n,schema:m,parentSchema:u,it:p}=f;if(!Array.isArray(m))throw new Error("ajv implementation error");if(p.opts.discriminator&&u.discriminator)return;const _=m,s=n.let("valid",!1),S=n.let("passing",null),$=n.name("_valid");f.setParams({passing:S}),n.block(v),f.result(s,()=>f.reset(),()=>f.error(!0));function v(){_.forEach((g,b)=>{let a;(0,t.alwaysValidSchema)(p,g)?n.var($,!0):a=f.subschema({keyword:"oneOf",schemaProp:b,compositeRule:!0},$),b>0&&n.if((0,e._)`${$} && ${s}`).assign(s,!1).assign(S,(0,e._)`[${S}, ${b}]`).else(),n.if($,()=>{n.assign(s,!0),n.assign(S,b),a&&f.mergeEvaluated(a,e.Name)})})}}};return ut.default=o,ut}var ct={},ln;function Hs(){if(ln)return ct;ln=1,Object.defineProperty(ct,"__esModule",{value:!0});const e=Q(),t={keyword:"allOf",schemaType:"array",code(c){const{gen:o,schema:f,it:n}=c;if(!Array.isArray(f))throw new Error("ajv implementation error");const m=o.name("valid");f.forEach((u,p)=>{if((0,e.alwaysValidSchema)(n,u))return;const _=c.subschema({keyword:"allOf",schemaProp:p},m);c.ok(m),c.mergeEvaluated(_)})}};return ct.default=t,ct}var lt={},dn;function Gs(){if(dn)return lt;dn=1,Object.defineProperty(lt,"__esModule",{value:!0});const e=J(),t=Q(),o={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:n})=>(0,e.str)`must match "${n.ifClause}" schema`,params:({params:n})=>(0,e._)`{failingKeyword: ${n.ifClause}}`},code(n){const{gen:m,parentSchema:u,it:p}=n;u.then===void 0&&u.else===void 0&&(0,t.checkStrictMode)(p,'"if" without "then" and "else" is ignored');const _=f(p,"then"),s=f(p,"else");if(!_&&!s)return;const S=m.let("valid",!0),$=m.name("_valid");if(v(),n.reset(),_&&s){const b=m.let("ifClause");n.setParams({ifClause:b}),m.if($,g("then",b),g("else",b))}else _?m.if($,g("then")):m.if((0,e.not)($),g("else"));n.pass(S,()=>n.error(!0));function v(){const b=n.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},$);n.mergeEvaluated(b)}function g(b,a){return()=>{const d=n.subschema({keyword:b},$);m.assign(S,$),n.mergeValidEvaluated(d,S),a?m.assign(a,(0,e._)`${b}`):n.setParams({ifClause:b})}}}};function f(n,m){const u=n.schema[m];return u!==void 0&&!(0,t.alwaysValidSchema)(n,u)}return lt.default=o,lt}var dt={},fn;function Js(){if(fn)return dt;fn=1,Object.defineProperty(dt,"__esModule",{value:!0});const e=Q(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:c,parentSchema:o,it:f}){o.if===void 0&&(0,e.checkStrictMode)(f,`"${c}" without "if" is ignored`)}};return dt.default=t,dt}var pn;function Bs(){if(pn)return Ze;pn=1,Object.defineProperty(Ze,"__esModule",{value:!0});const e=An(),t=Cs(),c=Dn(),o=As(),f=Ds(),n=Ms(),m=Vs(),u=Mn(),p=Ls(),_=Fs(),s=Us(),S=zs(),$=Ks(),v=Hs(),g=Gs(),b=Js();function a(d=!1){const r=[s.default,S.default,$.default,v.default,g.default,b.default,m.default,u.default,n.default,p.default,_.default];return d?r.push(t.default,o.default):r.push(e.default,c.default),r.push(f.default),r}return Ze.default=a,Ze}var ft={},pt={},hn;function Ws(){if(hn)return pt;hn=1,Object.defineProperty(pt,"__esModule",{value:!0});const e=J(),c={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:o})=>(0,e.str)`must match format "${o}"`,params:({schemaCode:o})=>(0,e._)`{format: ${o}}`},code(o,f){const{gen:n,data:m,$data:u,schema:p,schemaCode:_,it:s}=o,{opts:S,errSchemaPath:$,schemaEnv:v,self:g}=s;if(!S.validateFormats)return;u?b():a();function b(){const d=n.scopeValue("formats",{ref:g.formats,code:S.code.formats}),r=n.const("fDef",(0,e._)`${d}[${_}]`),l=n.let("fType"),w=n.let("format");n.if((0,e._)`typeof ${r} == "object" && !(${r} instanceof RegExp)`,()=>n.assign(l,(0,e._)`${r}.type || "string"`).assign(w,(0,e._)`${r}.validate`),()=>n.assign(l,(0,e._)`"string"`).assign(w,r)),o.fail$data((0,e.or)(i(),y()));function i(){return S.strictSchema===!1?e.nil:(0,e._)`${_} && !${w}`}function y(){const E=v.$async?(0,e._)`(${r}.async ? await ${w}(${m}) : ${w}(${m}))`:(0,e._)`${w}(${m})`,O=(0,e._)`(typeof ${w} == "function" ? ${E} : ${w}.test(${m}))`;return(0,e._)`${w} && ${w} !== true && ${l} === ${f} && !${O}`}}function a(){const d=g.formats[p];if(!d){i();return}if(d===!0)return;const[r,l,w]=y(d);r===f&&o.pass(E());function i(){if(S.strictSchema===!1){g.logger.warn(O());return}throw new Error(O());function O(){return`unknown format "${p}" ignored in schema at path "${$}"`}}function y(O){const C=O instanceof RegExp?(0,e.regexpCode)(O):S.code.formats?(0,e._)`${S.code.formats}${(0,e.getProperty)(p)}`:void 0,M=n.scopeValue("formats",{key:p,ref:O,code:C});return typeof O=="object"&&!(O instanceof RegExp)?[O.type||"string",O.validate,(0,e._)`${M}.validate`]:["string",O,M]}function E(){if(typeof d=="object"&&!(d instanceof RegExp)&&d.async){if(!v.$async)throw new Error("async format in sync schema");return(0,e._)`await ${w}(${m})`}return typeof l=="function"?(0,e._)`${w}(${m})`:(0,e._)`${w}.test(${m})`}}}};return pt.default=c,pt}var mn;function Qs(){if(mn)return ft;mn=1,Object.defineProperty(ft,"__esModule",{value:!0});const t=[Ws().default];return ft.default=t,ft}var Ee={},yn;function Xs(){return yn||(yn=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.contentVocabulary=Ee.metadataVocabulary=void 0,Ee.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Ee.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Ee}var gn;function Ys(){if(gn)return De;gn=1,Object.defineProperty(De,"__esModule",{value:!0});const e=ws(),t=Is(),c=Bs(),o=Qs(),f=Xs(),n=[e.default,t.default,(0,c.default)(),o.default,f.metadataVocabulary,f.contentVocabulary];return De.default=n,De}var ht={},Te={},_n;function Zs(){if(_n)return Te;_n=1,Object.defineProperty(Te,"__esModule",{value:!0}),Te.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(Te.DiscrError=e={})),Te}var vn;function xs(){if(vn)return ht;vn=1,Object.defineProperty(ht,"__esModule",{value:!0});const e=J(),t=Zs(),c=Xt(),o=Et(),f=Q(),m={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:u,tagName:p}})=>u===t.DiscrError.Tag?`tag "${p}" must be string`:`value of tag "${p}" must be in oneOf`,params:({params:{discrError:u,tag:p,tagName:_}})=>(0,e._)`{error: ${u}, tag: ${_}, tagValue: ${p}}`},code(u){const{gen:p,data:_,schema:s,parentSchema:S,it:$}=u,{oneOf:v}=S;if(!$.opts.discriminator)throw new Error("discriminator: requires discriminator option");const g=s.propertyName;if(typeof g!="string")throw new Error("discriminator: requires propertyName");if(s.mapping)throw new Error("discriminator: mapping is not supported");if(!v)throw new Error("discriminator: requires oneOf keyword");const b=p.let("valid",!1),a=p.const("tag",(0,e._)`${_}${(0,e.getProperty)(g)}`);p.if((0,e._)`typeof ${a} == "string"`,()=>d(),()=>u.error(!1,{discrError:t.DiscrError.Tag,tag:a,tagName:g})),u.ok(b);function d(){const w=l();p.if(!1);for(const i in w)p.elseIf((0,e._)`${a} === ${i}`),p.assign(b,r(w[i]));p.else(),u.error(!1,{discrError:t.DiscrError.Mapping,tag:a,tagName:g}),p.endIf()}function r(w){const i=p.name("valid"),y=u.subschema({keyword:"oneOf",schemaProp:w},i);return u.mergeEvaluated(y,e.Name),i}function l(){var w;const i={},y=O(S);let E=!0;for(let V=0;V<v.length;V++){let K=v[V];if(K?.$ref&&!(0,f.schemaHasRulesButRef)(K,$.self.RULES)){const W=K.$ref;if(K=c.resolveRef.call($.self,$.schemaEnv.root,$.baseId,W),K instanceof c.SchemaEnv&&(K=K.schema),K===void 0)throw new o.default($.opts.uriResolver,$.baseId,W)}const z=(w=K?.properties)===null||w===void 0?void 0:w[g];if(typeof z!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${g}"`);E=E&&(y||O(K)),C(z,V)}if(!E)throw new Error(`discriminator: "${g}" must be required`);return i;function O({required:V}){return Array.isArray(V)&&V.includes(g)}function C(V,K){if(V.const)M(V.const,K);else if(V.enum)for(const z of V.enum)M(z,K);else throw new Error(`discriminator: "properties/${g}" must have "const" or "enum"`)}function M(V,K){if(typeof V!="string"||V in i)throw new Error(`discriminator: "${g}" values must be unique strings`);i[V]=K}}}};return ht.default=m,ht}const eo="http://json-schema.org/draft-07/schema#",to="http://json-schema.org/draft-07/schema#",ro="Core schema meta-schema",no={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},so=["object","boolean"],oo={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},io={$schema:eo,$id:to,title:ro,definitions:no,type:so,properties:oo,default:!0};var $n;function ao(){return $n||($n=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const c=_s(),o=Ys(),f=xs(),n=io,m=["/properties"],u="http://json-schema.org/draft-07/schema";class p extends c.default{_addVocabularies(){super._addVocabularies(),o.default.forEach(g=>this.addVocabulary(g)),this.opts.discriminator&&this.addKeyword(f.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const g=this.opts.$data?this.$dataMetaSchema(n,m):n;this.addMetaSchema(g,u,!1),this.refs["http://json-schema.org/schema"]=u}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(u)?u:void 0)}}t.Ajv=p,e.exports=t=p,e.exports.Ajv=p,Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;var _=bt();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return _.KeywordCxt}});var s=J();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return s._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return s.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return s.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return s.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return s.CodeGen}});var S=Qt();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return S.default}});var $=Et();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return $.default}})})(ke,ke.exports)),ke.exports}var uo=ao();const co=Wt(uo);var mt={exports:{}},wn;function lo(){return wn||(wn=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const c={},o={timestamp:()=>()=>Date.now(),datetime:()=>()=>new Date().toISOString(),date:()=>()=>new Date().toISOString().slice(0,10),time:()=>()=>new Date().toISOString().slice(11),random:()=>()=>Math.random(),randomint:s=>{var S;const $=(S=s?.max)!==null&&S!==void 0?S:2;return()=>Math.floor(Math.random()*$)},seq:s=>{var S;const $=(S=s?.name)!==null&&S!==void 0?S:"";return c[$]||(c[$]=0),()=>c[$]++}},f=Object.assign(n,{DEFAULTS:o});function n(){return{keyword:"dynamicDefaults",type:"object",schemaType:["string","object"],modifying:!0,valid:!0,compile(s,S,$){if(!$.opts.useDefaults||$.compositeRule)return()=>!0;const v={};for(const b in s)v[b]=m(s[b]);const g=$.opts.useDefaults==="empty";return b=>{for(const a in s)(b[a]===void 0||g&&(b[a]===null||b[a]===""))&&(b[a]=v[a]());return!0}},metaSchema:{type:"object",additionalProperties:{anyOf:[{type:"string"},{type:"object",additionalProperties:!1,required:["func","args"],properties:{func:{type:"string"},args:{type:"object"}}}]}}}}function m(s){return typeof s=="object"?u(s):p(s)}function u({func:s,args:S}){const $=o[s];return _(s,$),$(S)}function p(s=""){const S=o[s];return _(s,S),S()}function _(s,S){if(!S)throw new Error(`invalid "dynamicDefaults" keyword property value: ${s}`)}t.default=f,e.exports=f})(mt,mt.exports)),mt.exports}var fo=lo();const Vn=Wt(fo),ue={fatal:0,error:0,warn:1,log:2,info:3,success:3,fail:3,debug:4,trace:5,verbose:Number.POSITIVE_INFINITY},bn={silent:{level:-1},fatal:{level:ue.fatal},error:{level:ue.error},warn:{level:ue.warn},log:{level:ue.log},info:{level:ue.info},success:{level:ue.success},fail:{level:ue.fail},ready:{level:ue.info},start:{level:ue.info},box:{level:ue.info},debug:{level:ue.debug},trace:{level:ue.trace},verbose:{level:ue.verbose}};function Vt(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function Kt(e,t,c=".",o){if(!Vt(t))return Kt(e,{},c);const f=Object.assign({},t);for(const n in e){if(n==="__proto__"||n==="constructor")continue;const m=e[n];m!=null&&(Array.isArray(m)&&Array.isArray(f[n])?f[n]=[...m,...f[n]]:Vt(m)&&Vt(f[n])?f[n]=Kt(m,f[n],(c?`${c}.`:"")+n.toString()):f[n]=m)}return f}function po(e){return(...t)=>t.reduce((c,o)=>Kt(c,o,""),{})}const ho=po();function mo(e){return Object.prototype.toString.call(e)==="[object Object]"}function yo(e){return!(!mo(e)||!e.message&&!e.args||e.stack)}let Lt=!1;const En=[];class ne{options;_lastLog;_mockFn;constructor(t={}){const c=t.types||bn;this.options=ho({...t,defaults:{...t.defaults},level:Ft(t.level,c),reporters:[...t.reporters||[]]},{types:bn,throttle:1e3,throttleMin:5,formatOptions:{date:!0,colors:!1,compact:!0}});for(const o in c){const f={type:o,...this.options.defaults,...c[o]};this[o]=this._wrapLogFn(f),this[o].raw=this._wrapLogFn(f,!0)}this.options.mockFn&&this.mockTypes(),this._lastLog={}}get level(){return this.options.level}set level(t){this.options.level=Ft(t,this.options.types,this.options.level)}prompt(t,c){if(!this.options.prompt)throw new Error("prompt is not supported!");return this.options.prompt(t,c)}create(t){const c=new ne({...this.options,...t});return this._mockFn&&c.mockTypes(this._mockFn),c}withDefaults(t){return this.create({...this.options,defaults:{...this.options.defaults,...t}})}withTag(t){return this.withDefaults({tag:this.options.defaults.tag?this.options.defaults.tag+":"+t:t})}addReporter(t){return this.options.reporters.push(t),this}removeReporter(t){if(t){const c=this.options.reporters.indexOf(t);if(c!==-1)return this.options.reporters.splice(c,1)}else this.options.reporters.splice(0);return this}setReporters(t){return this.options.reporters=Array.isArray(t)?t:[t],this}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}wrapConsole(){for(const t in this.options.types)console["__"+t]||(console["__"+t]=console[t]),console[t]=this[t].raw}restoreConsole(){for(const t in this.options.types)console["__"+t]&&(console[t]=console["__"+t],delete console["__"+t])}wrapStd(){this._wrapStream(this.options.stdout,"log"),this._wrapStream(this.options.stderr,"log")}_wrapStream(t,c){t&&(t.__write||(t.__write=t.write),t.write=o=>{this[c].raw(String(o).trim())})}restoreStd(){this._restoreStream(this.options.stdout),this._restoreStream(this.options.stderr)}_restoreStream(t){t&&t.__write&&(t.write=t.__write,delete t.__write)}pauseLogs(){Lt=!0}resumeLogs(){Lt=!1;const t=En.splice(0);for(const c of t)c[0]._logFn(c[1],c[2])}mockTypes(t){const c=t||this.options.mockFn;if(this._mockFn=c,typeof c=="function")for(const o in this.options.types)this[o]=c(o,this.options.types[o])||this[o],this[o].raw=this[o]}_wrapLogFn(t,c){return(...o)=>{if(Lt){En.push([this,t,o,c]);return}return this._logFn(t,o,c)}}_logFn(t,c,o){if((t.level||0)>this.level)return!1;const f={date:new Date,args:[],...t,level:Ft(t.level,this.options.types)};!o&&c.length===1&&yo(c[0])?Object.assign(f,c[0]):f.args=[...c],f.message&&(f.args.unshift(f.message),delete f.message),f.additional&&(Array.isArray(f.additional)||(f.additional=f.additional.split(`
|
|
9
9
|
`)),f.args.push(`
|
|
10
10
|
`+f.additional.join(`
|
|
11
|
-
`)),delete f.additional),f.type=typeof f.type=="string"?f.type.toLowerCase():"log",f.tag=typeof f.tag=="string"?f.tag:"";const n=(u=!1)=>{const
|
|
11
|
+
`)),delete f.additional),f.type=typeof f.type=="string"?f.type.toLowerCase():"log",f.tag=typeof f.tag=="string"?f.tag:"";const n=(u=!1)=>{const p=(this._lastLog.count||0)-this.options.throttleMin;if(this._lastLog.object&&p>0){const _=[...this._lastLog.object.args];p>1&&_.push(`(repeated ${p} times)`),this._log({...this._lastLog.object,args:_}),this._lastLog.count=1}u&&(this._lastLog.object=f,this._log(f))};clearTimeout(this._lastLog.timeout);const m=this._lastLog.time&&f.date?f.date.getTime()-this._lastLog.time.getTime():0;if(this._lastLog.time=f.date,m<this.options.throttle)try{const u=JSON.stringify([f.type,f.tag,f.args]),p=this._lastLog.serialized===u;if(this._lastLog.serialized=u,p&&(this._lastLog.count=(this._lastLog.count||0)+1,this._lastLog.count>this.options.throttleMin)){this._lastLog.timeout=setTimeout(n,this.options.throttle);return}}catch{}n(!0)}_log(t){for(const c of this.options.reporters)c.log(t,{options:this.options})}}function Ft(e,t={},c=3){return e===void 0?c:typeof e=="number"?e:t[e]&&t[e].level!==void 0?t[e].level:c}ne.prototype.add=ne.prototype.addReporter;ne.prototype.remove=ne.prototype.removeReporter;ne.prototype.clear=ne.prototype.removeReporter;ne.prototype.withScope=ne.prototype.withTag;ne.prototype.mock=ne.prototype.mockTypes;ne.prototype.pause=ne.prototype.pauseLogs;ne.prototype.resume=ne.prototype.resumeLogs;function go(e={}){return new ne(e)}class _o{options;defaultColor;levelColorMap;typeColorMap;constructor(t){this.options={...t},this.defaultColor="#7f8c8d",this.levelColorMap={0:"#c0392b",1:"#f39c12",3:"#00BCD4"},this.typeColorMap={success:"#2ecc71"}}_getLogFn(t){return t<1?console.__error||console.error:t===1?console.__warn||console.warn:console.__log||console.log}log(t){const c=this._getLogFn(t.level),o=t.type==="log"?"":t.type,f=t.tag||"",m=`
|
|
12
12
|
background: ${this.typeColorMap[t.type]||this.levelColorMap[t.level]||this.defaultColor};
|
|
13
13
|
border-radius: 0.5em;
|
|
14
14
|
color: white;
|
|
15
15
|
font-weight: bold;
|
|
16
16
|
padding: 2px 0.5em;
|
|
17
|
-
`,u=`%c${[f,o].filter(Boolean).join(":")}`;typeof t.args[0]=="string"?c(`${u}%c ${t.args[0]}`,m,"",...t.args.slice(1)):c(u,m,...t.args)}}function vo(e={}){return go({reporters:e.reporters||[new _o({})],prompt(c,o={}){return o.type==="confirm"?Promise.resolve(confirm(c)):Promise.resolve(prompt(c))},...e})}const $o=vo(),wo=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,bo=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,Eo=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function So(e,t){if(e==="__proto__"||e==="constructor"&&t&&typeof t=="object"&&"prototype"in t){Po(e);return}return t}function Po(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function Ro(e,t={}){if(typeof e!="string")return e;if(e[0]==='"'&&e[e.length-1]==='"'&&e.indexOf("\\")===-1)return e.slice(1,-1);const c=e.trim();if(c.length<=9)switch(c.toLowerCase()){case"true":return!0;case"false":return!1;case"undefined":return;case"null":return null;case"nan":return Number.NaN;case"infinity":return Number.POSITIVE_INFINITY;case"-infinity":return Number.NEGATIVE_INFINITY}if(!Eo.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(wo.test(e)||bo.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,So)}return JSON.parse(e)}catch(o){if(t.strict)throw o;return e}}const jo=/#/g,No=/&/g,Oo=/\//g,To=/=/g,Zt=/\+/g,ko=/%5e/gi,qo=/%60/gi,Io=/%7c/gi,Co=/%20/gi;function Ao(e){return encodeURI(""+e).replace(Io,"|")}function Ht(e){return Ao(typeof e=="string"?e:JSON.stringify(e)).replace(Zt,"%2B").replace(Co,"+").replace(jo,"%23").replace(No,"%26").replace(qo,"`").replace(ko,"^").replace(Oo,"%2F")}function Ut(e){return Ht(e).replace(To,"%3D")}function Ln(e=""){try{return decodeURIComponent(""+e)}catch{return""+e}}function Do(e){return Ln(e.replace(Zt," "))}function Mo(e){return Ln(e.replace(Zt," "))}function Vo(e=""){const t=Object.create(null);e[0]==="?"&&(e=e.slice(1));for(const c of e.split("&")){const o=c.match(/([^=]+)=?(.*)/)||[];if(o.length<2)continue;const f=Do(o[1]);if(f==="__proto__"||f==="constructor")continue;const n=Mo(o[2]||"");t[f]===void 0?t[f]=n:Array.isArray(t[f])?t[f].push(n):t[f]=[t[f],n]}return t}function Lo(e,t){return(typeof t=="number"||typeof t=="boolean")&&(t=String(t)),t?Array.isArray(t)?t.map(c=>`${Ut(e)}=${Ht(c)}`).join("&"):`${Ut(e)}=${Ht(t)}`:Ut(e)}function Fo(e){return Object.keys(e).filter(t=>e[t]!==void 0).map(t=>Lo(t,e[t])).filter(Boolean).join("&")}const Uo=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,zo=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,Ko=/^([/\\]\s*){2,}[^/\\]/,Ho=/^\.?\//;function Fn(e,t={}){return typeof t=="boolean"&&(t={acceptRelative:t}),t.strict?Uo.test(e):zo.test(e)||(t.acceptRelative?Ko.test(e):!1)}function Go(e="",t){return e.endsWith("/")}function Jo(e="",t){return(Go(e)?e.slice(0,-1):e)||"/"}function Bo(e="",t){return e.endsWith("/")?e:e+"/"}function Wo(e,t){if(Xo(t)||Fn(e))return e;const c=Jo(t);return e.startsWith(c)?e:Zo(c,e)}function Qo(e,t){const c=xo(e),o={...Vo(c.search),...t};return c.search=Fo(o),ei(c)}function Xo(e){return!e||e==="/"}function Yo(e){return e&&e!=="/"}function Zo(e,...t){let c=e||"";for(const o of t.filter(f=>Yo(f)))if(c){const f=o.replace(Ho,"");c=Bo(c)+f}else c=o;return c}const Un=Symbol.for("ufo:protocolRelative");function xo(e="",t){const c=e.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(c){const[,S,$=""]=c;return{protocol:S.toLowerCase(),pathname:$,href:S+$,auth:"",host:"",search:"",hash:""}}if(!Fn(e,{acceptRelative:!0}))return Sn(e);const[,o="",f,n=""]=e.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[];let[,m="",u=""]=n.match(/([^#/?]*)(.*)?/)||[];o==="file:"&&(u=u.replace(/\/(?=[A-Za-z]:)/,""));const{pathname:h,search:_,hash:s}=Sn(u);return{protocol:o.toLowerCase(),auth:f?f.slice(0,Math.max(0,f.length-1)):"",host:m,pathname:h,search:_,hash:s,[Un]:!o}}function Sn(e=""){const[t="",c="",o=""]=(e.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:t,search:c,hash:o}}function ei(e){const t=e.pathname||"",c=e.search?(e.search.startsWith("?")?"":"?")+e.search:"",o=e.hash||"",f=e.auth?e.auth+"@":"",n=e.host||"";return(e.protocol||e[Un]?(e.protocol||"")+"//":"")+f+n+t+c+o}class zn extends Error{constructor(t,c){super(t,c),this.name="FetchError",c?.cause&&!this.cause&&(this.cause=c.cause)}}function Kn(e){const t=e.error?.message||e.error?.toString()||"",c=e.request?.method||e.options?.method||"GET",o=e.request?.url||String(e.request)||"/",f=`[${c}] ${JSON.stringify(o)}`,n=e.response?`${e.response.status} ${e.response.statusText}`:"<no response>",m=`${f}: ${n}${t?` ${t}`:""}`,u=new zn(m,e.error?{cause:e.error}:void 0);for(const h of["request","options","response"])Object.defineProperty(u,h,{get(){return e[h]}});for(const[h,_]of[["data","_data"],["status","status"],["statusCode","status"],["statusText","statusText"],["statusMessage","statusText"]])Object.defineProperty(u,h,{get(){return e.response&&e.response[_]}});return u}const ti=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function Pn(e="GET"){return ti.has(e.toUpperCase())}function ri(e){if(e===void 0)return!1;const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t===null?!0:t!=="object"?!1:Array.isArray(e)?!0:e.buffer||e instanceof FormData||e instanceof URLSearchParams?!1:e.constructor&&e.constructor.name==="Object"||typeof e.toJSON=="function"}const ni=new Set(["image/svg","application/xml","application/xhtml","application/html"]),si=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function oi(e=""){if(!e)return"json";const t=e.split(";").shift()||"";return si.test(t)?"json":t==="text/event-stream"?"stream":ni.has(t)||t.startsWith("text/")?"text":"blob"}function ii(e,t,c,o){const f=ai(t?.headers??e?.headers,c?.headers,o);let n;return(c?.query||c?.params||t?.params||t?.query)&&(n={...c?.params,...c?.query,...t?.params,...t?.query}),{...c,...t,query:n,params:n,headers:f}}function ai(e,t,c){if(!t)return new c(e);const o=new c(t);if(e)for(const[f,n]of Symbol.iterator in e||Array.isArray(e)?e:new c(e))o.set(f,n);return o}async function yt(e,t){if(t)if(Array.isArray(t))for(const c of t)await c(e);else await t(e)}const ui=new Set([408,409,425,429,500,502,503,504]),ci=new Set([101,204,205,304]);function xt(e={}){const{fetch:t=globalThis.fetch,Headers:c=globalThis.Headers,AbortController:o=globalThis.AbortController}=e;async function f(u){const h=u.error&&u.error.name==="AbortError"&&!u.options.timeout||!1;if(u.options.retry!==!1&&!h){let s;typeof u.options.retry=="number"?s=u.options.retry:s=Pn(u.options.method)?0:1;const S=u.response&&u.response.status||500;if(s>0&&(Array.isArray(u.options.retryStatusCodes)?u.options.retryStatusCodes.includes(S):ui.has(S))){const $=typeof u.options.retryDelay=="function"?u.options.retryDelay(u):u.options.retryDelay||0;return $>0&&await new Promise(v=>setTimeout(v,$)),n(u.request,{...u.options,retry:s-1})}}const _=Kn(u);throw Error.captureStackTrace&&Error.captureStackTrace(_,n),_}const n=async function(h,_={}){const s={request:h,options:ii(h,_,e.defaults,c),response:void 0,error:void 0};if(s.options.method&&(s.options.method=s.options.method.toUpperCase()),s.options.onRequest&&(await yt(s,s.options.onRequest),s.options.headers instanceof c||(s.options.headers=new c(s.options.headers||{}))),typeof s.request=="string"&&(s.options.baseURL&&(s.request=Wo(s.request,s.options.baseURL)),s.options.query&&(s.request=Qo(s.request,s.options.query),delete s.options.query),"query"in s.options&&delete s.options.query,"params"in s.options&&delete s.options.params),s.options.body&&Pn(s.options.method))if(ri(s.options.body)){const v=s.options.headers.get("content-type");typeof s.options.body!="string"&&(s.options.body=v==="application/x-www-form-urlencoded"?new URLSearchParams(s.options.body).toString():JSON.stringify(s.options.body)),v||s.options.headers.set("content-type","application/json"),s.options.headers.has("accept")||s.options.headers.set("accept","application/json")}else("pipeTo"in s.options.body&&typeof s.options.body.pipeTo=="function"||typeof s.options.body.pipe=="function")&&("duplex"in s.options||(s.options.duplex="half"));let S;if(!s.options.signal&&s.options.timeout){const v=new o;S=setTimeout(()=>{const g=new Error("[TimeoutError]: The operation was aborted due to timeout");g.name="TimeoutError",g.code=23,v.abort(g)},s.options.timeout),s.options.signal=v.signal}try{s.response=await t(s.request,s.options)}catch(v){return s.error=v,s.options.onRequestError&&await yt(s,s.options.onRequestError),await f(s)}finally{S&&clearTimeout(S)}if((s.response.body||s.response._bodyInit)&&!ci.has(s.response.status)&&s.options.method!=="HEAD"){const v=(s.options.parseResponse?"json":s.options.responseType)||oi(s.response.headers.get("content-type")||"");switch(v){case"json":{const g=await s.response.text(),b=s.options.parseResponse||Ro;s.response._data=b(g);break}case"stream":{s.response._data=s.response.body||s.response._bodyInit;break}default:s.response._data=await s.response[v]()}}return s.options.onResponse&&await yt(s,s.options.onResponse),!s.options.ignoreResponseError&&s.response.status>=400&&s.response.status<600?(s.options.onResponseError&&await yt(s,s.options.onResponseError),await f(s)):s.response},m=async function(h,_){return(await n(h,_))._data};return m.raw=n,m.native=(...u)=>t(...u),m.create=(u={},h={})=>xt({...e,...h,defaults:{...e.defaults,...h.defaults,...u}}),m}const vt=(function(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")})(),Hn=vt.fetch?(...e)=>vt.fetch(...e):()=>Promise.reject(new Error("[ofetch] global.fetch is not supported!")),Gn=vt.Headers,Jn=vt.AbortController,er=xt({fetch:Hn,Headers:Gn,AbortController:Jn}),li=er,bi=Object.freeze(Object.defineProperty({__proto__:null,$fetch:li,AbortController:Jn,FetchError:zn,Headers:Gn,createFetch:xt,createFetchError:Kn,fetch:Hn,ofetch:er},Symbol.toStringTag,{value:"Module"})),di={$id:"credentials",additionalProperties:{properties:{accessKeyId:{default:null,nullable:!0,type:"string"},Bucket:{default:null,nullable:!0,type:"string"},endpoint:{default:null,nullable:!0,type:"string"},region:{default:null,nullable:!0,type:"string"},secretAccessKey:{default:null,nullable:!0,type:"string"}},type:"object"},type:"object"},fi={$id:"feed",additionalProperties:!1,properties:{feed_url:{type:"string"},home_page_url:{type:"string"},items:{default:[],items:{additionalProperties:!1,dynamicDefaults:{date_published:"datetime",id:"uuid"},properties:{attachments:{default:[],items:{additionalProperties:!1,properties:{mime_type:{default:"",type:"string"},url:{default:"",type:"string"}},type:"object"},type:"array"},content_html:{default:"",type:"string"},date_published:{type:"string"},id:{type:"string"},title:{default:"",type:"string"},url:{type:"string"}},type:"object"},type:"array"},title:{default:"",type:"string"},version:{default:"https://jsonfeed.org/version/1",enum:["https://jsonfeed.org/version/1","https://jsonfeed.org/version/1.1"],type:"string"}},type:"object"},hi={$id:"fonts",items:{type:"string"},type:"array"},pi={$id:"importmap",additionalProperties:!1,properties:{imports:{additionalProperties:{type:"string"},default:{},type:"object"},scopes:{additionalProperties:{additionalProperties:{type:"string"},type:"object"},type:"object"}},type:"object"},mi={$id:"log",additionalProperties:!1,properties:{messages:{default:[],items:{additionalProperties:!1,properties:{content:{default:[],items:{additionalProperties:!1,properties:{text:{default:"",type:"string"},type:{default:"text",type:"string"}},type:"object"},type:"array"},role:{default:"user",enum:["user","assistant","system"],type:"string"}},type:"object"},type:"array"},system:{default:"",type:"string"}},type:"object"},yi={$id:"nodes",items:{$ref:"page"},type:"array"},gi={$id:"page",additionalProperties:!1,dynamicDefaults:{id:"uuid"},properties:{changefreq:{default:null,enum:["always","hourly","daily","weekly","monthly","yearly","never",null],nullable:!0,type:"string"},children:{default:[],items:{type:"object"},type:"array"},class:{default:["prose","max-w-none"],description:"Классы",items:{type:"string"},type:"array"},description:{default:null,nullable:!0,type:"string"},enabled:{default:!0,type:"boolean"},flat:{default:!0,type:"boolean"},header:{type:"string"},icon:{type:"string"},id:{type:"string"},images:{default:[],items:{additionalProperties:!1,properties:{alt:{type:"string"},url:{default:"",type:"string"}},type:"object"},type:"array"},keywords:{default:[],items:{type:"string"},type:"array"},lastmod:{default:null,nullable:!0,type:"string"},loc:{default:null,nullable:!0,type:"string"},name:{default:null,nullable:!0,type:"string"},priority:{default:null,maximum:1,minimum:0,nullable:!0,type:"number"},type:{default:null,enum:["article","book","profile","website","music.song","music.album","music.playlist","music.radio_station","video.movie","video.episode","video.tv_show","video.other",null],nullable:!0,type:"string"}},type:"object"};Vn.DEFAULTS.uuid=()=>zt;const Bn=[di,yi,gi,pi,fi,hi,mi],_i=new co({code:{esm:!0},coerceTypes:!0,keywords:[Vn()],removeAdditional:!0,schemas:Bn,useDefaults:!0}),Gt=Zn(On({credentials:{},feed:{},fonts:[],importmap:{},log:{}})),Wn=!0,Rn="nodes",jn={$children:{get(){return this.children.filter(({enabled:e})=>e)}},$index:{get(){return this.$siblings.findIndex(({id:e})=>this.id===e)}},$next:{get(){return this.$siblings[this.$index+1]}},$prev:{get(){return this.$siblings[this.$index-1]}},$siblings:{get(){return this.siblings.filter(({enabled:e})=>e)}},i:{get(){return this.icon&&`i-${this.icon}`}},path:{get(){const e=this.branch.slice(1);return e.some(({name:t})=>!t)?void 0:e.map(({name:t})=>t).join("/").replace(/ /g,"_")}},title:{get(){return["",void 0].includes(this.header)?this.name??"":this.header}},to:{get(){return this.path?.replace(/^\/?/,"/").replace(/\/?$/,"/")}}},Jt=xn([]),Bt=Object.fromEntries(Bn.map(({$id:e})=>[e,_i.getSchema(e)])),Ei=async e=>{try{return await er(e)}catch(t){$o.error(t)}},vi=On({...Gt,tree:Jt,...rs(Jt)});Object.keys(Gt).forEach(e=>{Bt[e]&&Tn(Gt[e],Bt[e],{immediate:Wn})});Tn(Nn(vi,Rn),async e=>{await Bt[Rn]?.(e)?e.forEach(t=>{Object.keys(jn).some(c=>!(c in t))&&Object.defineProperties(t,jn)}):Jt.value=[{}]},{immediate:Wn});export{$o as c,Ei as f,bi as i,er as o,vi as s};
|
|
17
|
+
`,u=`%c${[f,o].filter(Boolean).join(":")}`;typeof t.args[0]=="string"?c(`${u}%c ${t.args[0]}`,m,"",...t.args.slice(1)):c(u,m,...t.args)}}function vo(e={}){return go({reporters:e.reporters||[new _o({})],prompt(c,o={}){return o.type==="confirm"?Promise.resolve(confirm(c)):Promise.resolve(prompt(c))},...e})}const $o=vo(),wo=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,bo=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,Eo=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function So(e,t){if(e==="__proto__"||e==="constructor"&&t&&typeof t=="object"&&"prototype"in t){Po(e);return}return t}function Po(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function Ro(e,t={}){if(typeof e!="string")return e;if(e[0]==='"'&&e[e.length-1]==='"'&&e.indexOf("\\")===-1)return e.slice(1,-1);const c=e.trim();if(c.length<=9)switch(c.toLowerCase()){case"true":return!0;case"false":return!1;case"undefined":return;case"null":return null;case"nan":return Number.NaN;case"infinity":return Number.POSITIVE_INFINITY;case"-infinity":return Number.NEGATIVE_INFINITY}if(!Eo.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(wo.test(e)||bo.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,So)}return JSON.parse(e)}catch(o){if(t.strict)throw o;return e}}const jo=/#/g,No=/&/g,Oo=/\//g,To=/=/g,Zt=/\+/g,ko=/%5e/gi,qo=/%60/gi,Io=/%7c/gi,Co=/%20/gi;function Ao(e){return encodeURI(""+e).replace(Io,"|")}function Ht(e){return Ao(typeof e=="string"?e:JSON.stringify(e)).replace(Zt,"%2B").replace(Co,"+").replace(jo,"%23").replace(No,"%26").replace(qo,"`").replace(ko,"^").replace(Oo,"%2F")}function Ut(e){return Ht(e).replace(To,"%3D")}function Ln(e=""){try{return decodeURIComponent(""+e)}catch{return""+e}}function Do(e){return Ln(e.replace(Zt," "))}function Mo(e){return Ln(e.replace(Zt," "))}function Vo(e=""){const t=Object.create(null);e[0]==="?"&&(e=e.slice(1));for(const c of e.split("&")){const o=c.match(/([^=]+)=?(.*)/)||[];if(o.length<2)continue;const f=Do(o[1]);if(f==="__proto__"||f==="constructor")continue;const n=Mo(o[2]||"");t[f]===void 0?t[f]=n:Array.isArray(t[f])?t[f].push(n):t[f]=[t[f],n]}return t}function Lo(e,t){return(typeof t=="number"||typeof t=="boolean")&&(t=String(t)),t?Array.isArray(t)?t.map(c=>`${Ut(e)}=${Ht(c)}`).join("&"):`${Ut(e)}=${Ht(t)}`:Ut(e)}function Fo(e){return Object.keys(e).filter(t=>e[t]!==void 0).map(t=>Lo(t,e[t])).filter(Boolean).join("&")}const Uo=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,zo=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,Ko=/^([/\\]\s*){2,}[^/\\]/,Ho=/^\.?\//;function Fn(e,t={}){return typeof t=="boolean"&&(t={acceptRelative:t}),t.strict?Uo.test(e):zo.test(e)||(t.acceptRelative?Ko.test(e):!1)}function Go(e="",t){return e.endsWith("/")}function Jo(e="",t){return(Go(e)?e.slice(0,-1):e)||"/"}function Bo(e="",t){return e.endsWith("/")?e:e+"/"}function Wo(e,t){if(Xo(t)||Fn(e))return e;const c=Jo(t);return e.startsWith(c)?e:Zo(c,e)}function Qo(e,t){const c=xo(e),o={...Vo(c.search),...t};return c.search=Fo(o),ei(c)}function Xo(e){return!e||e==="/"}function Yo(e){return e&&e!=="/"}function Zo(e,...t){let c=e||"";for(const o of t.filter(f=>Yo(f)))if(c){const f=o.replace(Ho,"");c=Bo(c)+f}else c=o;return c}const Un=Symbol.for("ufo:protocolRelative");function xo(e="",t){const c=e.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(c){const[,S,$=""]=c;return{protocol:S.toLowerCase(),pathname:$,href:S+$,auth:"",host:"",search:"",hash:""}}if(!Fn(e,{acceptRelative:!0}))return Sn(e);const[,o="",f,n=""]=e.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[];let[,m="",u=""]=n.match(/([^#/?]*)(.*)?/)||[];o==="file:"&&(u=u.replace(/\/(?=[A-Za-z]:)/,""));const{pathname:p,search:_,hash:s}=Sn(u);return{protocol:o.toLowerCase(),auth:f?f.slice(0,Math.max(0,f.length-1)):"",host:m,pathname:p,search:_,hash:s,[Un]:!o}}function Sn(e=""){const[t="",c="",o=""]=(e.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:t,search:c,hash:o}}function ei(e){const t=e.pathname||"",c=e.search?(e.search.startsWith("?")?"":"?")+e.search:"",o=e.hash||"",f=e.auth?e.auth+"@":"",n=e.host||"";return(e.protocol||e[Un]?(e.protocol||"")+"//":"")+f+n+t+c+o}class zn extends Error{constructor(t,c){super(t,c),this.name="FetchError",c?.cause&&!this.cause&&(this.cause=c.cause)}}function Kn(e){const t=e.error?.message||e.error?.toString()||"",c=e.request?.method||e.options?.method||"GET",o=e.request?.url||String(e.request)||"/",f=`[${c}] ${JSON.stringify(o)}`,n=e.response?`${e.response.status} ${e.response.statusText}`:"<no response>",m=`${f}: ${n}${t?` ${t}`:""}`,u=new zn(m,e.error?{cause:e.error}:void 0);for(const p of["request","options","response"])Object.defineProperty(u,p,{get(){return e[p]}});for(const[p,_]of[["data","_data"],["status","status"],["statusCode","status"],["statusText","statusText"],["statusMessage","statusText"]])Object.defineProperty(u,p,{get(){return e.response&&e.response[_]}});return u}const ti=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function Pn(e="GET"){return ti.has(e.toUpperCase())}function ri(e){if(e===void 0)return!1;const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t===null?!0:t!=="object"?!1:Array.isArray(e)?!0:e.buffer||e instanceof FormData||e instanceof URLSearchParams?!1:e.constructor&&e.constructor.name==="Object"||typeof e.toJSON=="function"}const ni=new Set(["image/svg","application/xml","application/xhtml","application/html"]),si=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function oi(e=""){if(!e)return"json";const t=e.split(";").shift()||"";return si.test(t)?"json":t==="text/event-stream"?"stream":ni.has(t)||t.startsWith("text/")?"text":"blob"}function ii(e,t,c,o){const f=ai(t?.headers??e?.headers,c?.headers,o);let n;return(c?.query||c?.params||t?.params||t?.query)&&(n={...c?.params,...c?.query,...t?.params,...t?.query}),{...c,...t,query:n,params:n,headers:f}}function ai(e,t,c){if(!t)return new c(e);const o=new c(t);if(e)for(const[f,n]of Symbol.iterator in e||Array.isArray(e)?e:new c(e))o.set(f,n);return o}async function yt(e,t){if(t)if(Array.isArray(t))for(const c of t)await c(e);else await t(e)}const ui=new Set([408,409,425,429,500,502,503,504]),ci=new Set([101,204,205,304]);function xt(e={}){const{fetch:t=globalThis.fetch,Headers:c=globalThis.Headers,AbortController:o=globalThis.AbortController}=e;async function f(u){const p=u.error&&u.error.name==="AbortError"&&!u.options.timeout||!1;if(u.options.retry!==!1&&!p){let s;typeof u.options.retry=="number"?s=u.options.retry:s=Pn(u.options.method)?0:1;const S=u.response&&u.response.status||500;if(s>0&&(Array.isArray(u.options.retryStatusCodes)?u.options.retryStatusCodes.includes(S):ui.has(S))){const $=typeof u.options.retryDelay=="function"?u.options.retryDelay(u):u.options.retryDelay||0;return $>0&&await new Promise(v=>setTimeout(v,$)),n(u.request,{...u.options,retry:s-1})}}const _=Kn(u);throw Error.captureStackTrace&&Error.captureStackTrace(_,n),_}const n=async function(p,_={}){const s={request:p,options:ii(p,_,e.defaults,c),response:void 0,error:void 0};if(s.options.method&&(s.options.method=s.options.method.toUpperCase()),s.options.onRequest&&(await yt(s,s.options.onRequest),s.options.headers instanceof c||(s.options.headers=new c(s.options.headers||{}))),typeof s.request=="string"&&(s.options.baseURL&&(s.request=Wo(s.request,s.options.baseURL)),s.options.query&&(s.request=Qo(s.request,s.options.query),delete s.options.query),"query"in s.options&&delete s.options.query,"params"in s.options&&delete s.options.params),s.options.body&&Pn(s.options.method))if(ri(s.options.body)){const v=s.options.headers.get("content-type");typeof s.options.body!="string"&&(s.options.body=v==="application/x-www-form-urlencoded"?new URLSearchParams(s.options.body).toString():JSON.stringify(s.options.body)),v||s.options.headers.set("content-type","application/json"),s.options.headers.has("accept")||s.options.headers.set("accept","application/json")}else("pipeTo"in s.options.body&&typeof s.options.body.pipeTo=="function"||typeof s.options.body.pipe=="function")&&("duplex"in s.options||(s.options.duplex="half"));let S;if(!s.options.signal&&s.options.timeout){const v=new o;S=setTimeout(()=>{const g=new Error("[TimeoutError]: The operation was aborted due to timeout");g.name="TimeoutError",g.code=23,v.abort(g)},s.options.timeout),s.options.signal=v.signal}try{s.response=await t(s.request,s.options)}catch(v){return s.error=v,s.options.onRequestError&&await yt(s,s.options.onRequestError),await f(s)}finally{S&&clearTimeout(S)}if((s.response.body||s.response._bodyInit)&&!ci.has(s.response.status)&&s.options.method!=="HEAD"){const v=(s.options.parseResponse?"json":s.options.responseType)||oi(s.response.headers.get("content-type")||"");switch(v){case"json":{const g=await s.response.text(),b=s.options.parseResponse||Ro;s.response._data=b(g);break}case"stream":{s.response._data=s.response.body||s.response._bodyInit;break}default:s.response._data=await s.response[v]()}}return s.options.onResponse&&await yt(s,s.options.onResponse),!s.options.ignoreResponseError&&s.response.status>=400&&s.response.status<600?(s.options.onResponseError&&await yt(s,s.options.onResponseError),await f(s)):s.response},m=async function(p,_){return(await n(p,_))._data};return m.raw=n,m.native=(...u)=>t(...u),m.create=(u={},p={})=>xt({...e,...p,defaults:{...e.defaults,...p.defaults,...u}}),m}const vt=(function(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")})(),Hn=vt.fetch?(...e)=>vt.fetch(...e):()=>Promise.reject(new Error("[ofetch] global.fetch is not supported!")),Gn=vt.Headers,Jn=vt.AbortController,er=xt({fetch:Hn,Headers:Gn,AbortController:Jn}),li=er,bi=Object.freeze(Object.defineProperty({__proto__:null,$fetch:li,AbortController:Jn,FetchError:zn,Headers:Gn,createFetch:xt,createFetchError:Kn,fetch:Hn,ofetch:er},Symbol.toStringTag,{value:"Module"})),di={$id:"credentials",additionalProperties:{properties:{accessKeyId:{default:null,nullable:!0,type:"string"},Bucket:{default:null,nullable:!0,type:"string"},endpoint:{default:null,nullable:!0,type:"string"},region:{default:null,nullable:!0,type:"string"},secretAccessKey:{default:null,nullable:!0,type:"string"}},type:"object"},type:"object"},fi={$id:"feed",additionalProperties:!1,properties:{feed_url:{type:"string"},home_page_url:{type:"string"},items:{default:[],items:{additionalProperties:!1,dynamicDefaults:{date_published:"datetime",id:"uuid"},properties:{attachments:{default:[],items:{additionalProperties:!1,properties:{mime_type:{default:"",type:"string"},url:{default:"",type:"string"}},type:"object"},type:"array"},content_html:{default:"",type:"string"},date_published:{type:"string"},id:{type:"string"},title:{default:"",type:"string"},url:{type:"string"}},type:"object"},type:"array"},title:{default:"",type:"string"},version:{default:"https://jsonfeed.org/version/1",enum:["https://jsonfeed.org/version/1","https://jsonfeed.org/version/1.1"],type:"string"}},type:"object"},pi={$id:"fonts",items:{type:"string"},type:"array"},hi={$id:"importmap",additionalProperties:!1,properties:{imports:{additionalProperties:{type:"string"},default:{},type:"object"},scopes:{additionalProperties:{additionalProperties:{type:"string"},type:"object"},type:"object"}},type:"object"},mi={$id:"log",additionalProperties:!1,properties:{messages:{default:[],items:{additionalProperties:!1,properties:{content:{default:[],items:{additionalProperties:!1,properties:{text:{default:"",type:"string"},type:{default:"text",type:"string"}},type:"object"},type:"array"},role:{default:"user",enum:["user","assistant","system"],type:"string"}},type:"object"},type:"array"},system:{default:"",type:"string"}},type:"object"},yi={$id:"nodes",items:{$ref:"page"},type:"array"},gi={$id:"page",additionalProperties:!1,dynamicDefaults:{id:"uuid"},properties:{changefreq:{default:null,enum:["always","hourly","daily","weekly","monthly","yearly","never",null],nullable:!0,type:"string"},children:{default:[],items:{type:"object"},type:"array"},class:{default:["prose","max-w-none"],items:{type:"string"},type:"array"},description:{default:null,nullable:!0,type:"string"},enabled:{default:!0,type:"boolean"},flat:{default:!0,type:"boolean"},frontmatter:{default:null,nullable:!0,properties:{head:{type:"object"}},type:"object"},header:{type:"string"},icon:{type:"string"},id:{type:"string"},images:{default:[],items:{additionalProperties:!1,properties:{alt:{type:"string"},url:{default:"",type:"string"}},type:"object"},type:"array"},keywords:{default:[],items:{type:"string"},type:"array"},lastmod:{default:null,nullable:!0,type:"string"},loc:{default:null,nullable:!0,type:"string"},name:{default:null,nullable:!0,type:"string"},priority:{default:null,maximum:1,minimum:0,nullable:!0,type:"number"},type:{default:null,enum:["article","book","profile","website","music.song","music.album","music.playlist","music.radio_station","video.movie","video.episode","video.tv_show","video.other",null],nullable:!0,type:"string"}},type:"object"};Vn.DEFAULTS.uuid=()=>zt;const Bn=[di,yi,gi,hi,fi,pi,mi],_i=new co({code:{esm:!0},coerceTypes:!0,keywords:[Vn()],removeAdditional:!0,schemas:Bn,useDefaults:!0}),Gt=Zn(On({credentials:{},feed:{},fonts:[],importmap:{},log:{}})),Wn=!0,Rn="nodes",jn={$children:{get(){return this.children.filter(({enabled:e})=>e)}},$index:{get(){return this.$siblings.findIndex(({id:e})=>this.id===e)}},$next:{get(){return this.$siblings[this.$index+1]}},$prev:{get(){return this.$siblings[this.$index-1]}},$siblings:{get(){return this.siblings.filter(({enabled:e})=>e)}},i:{get(){return this.icon&&`i-${this.icon}`}},path:{get(){const e=this.branch.slice(1);return e.some(({name:t})=>!t)?void 0:e.map(({name:t})=>t).join("/").replace(/ /g,"_")}},title:{get(){return["",void 0].includes(this.header)?this.name??"":this.header}},to:{get(){return this.path?.replace(/^\/?/,"/").replace(/\/?$/,"/")}}},Jt=xn([]),Bt=Object.fromEntries(Bn.map(({$id:e})=>[e,_i.getSchema(e)])),Ei=async e=>{try{return await er(e)}catch(t){$o.error(t)}},vi=On({...Gt,tree:Jt,...rs(Jt)});Object.keys(Gt).forEach(e=>{Bt[e]&&Tn(Gt[e],Bt[e],{immediate:Wn})});Tn(Nn(vi,Rn),async e=>{await Bt[Rn]?.(e)?e.forEach(t=>{Object.keys(jn).some(c=>!(c in t))&&Object.defineProperties(t,jn)}):Jt.value=[{}]},{immediate:Wn});export{$o as c,Ei as f,bi as i,er as o,vi as s};
|