@vuebro/runtime 1.1.83 → 1.2.1

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.
@@ -1,8 +0,0 @@
1
- import{computed as Lt,isReactive as $n,reactive as ke,watch as vt}from"vue";function cn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const Ht=!0,Gt=(e,r)=>[...e].reverse().map(E=>({node:E,parent:r,siblings:e})),Jt=()=>{const e=URL.createObjectURL(new Blob),r=e.split("/").pop()??crypto.randomUUID();return URL.revokeObjectURL(e),r},wn=(e,{branch:r="branch",children:E="children",id:d="id",index:b="index",next:i="next",parent:h="parent",prev:l="prev",siblings:m="siblings"}={})=>{const $={[r]:{get(){const f=[this];for(;f[0]?.[h];)f.unshift(f[0][h]);return f}},[b]:{get(){return this[m].findIndex(f=>this[d]===f[d])}},[i]:{get(){return this[m][this[b]+1]}},[l]:{get(){return this[m][this[b]-1]}}},p=function*(f){const _=Gt(f);for(;_.length;){const{node:s,parent:o,siblings:t}=_.pop()??{};s&&(s[h]!==o&&Object.defineProperty(s,h,{configurable:Ht,value:o}),s[m]!==t&&Object.defineProperty(s,m,{configurable:Ht,value:t}),Object.keys($).some(a=>!(a in s))&&Object.defineProperties(s,$),yield s,_.push(...Gt(s[E]??[],s)))}},S=Lt(()=>[...p($n(e)?e:ke(e))]),g=Lt(()=>Object.fromEntries(S.value.map(f=>[f[d],f]))),v=(f,_)=>{const s=g.value[f];if(s){const[o]=S.value,t=s[b],a=s[i],y=t+1,n=s[h],c=s[l],w=t-1,O=s[m];switch(_){case"add":{const C=Jt();return O.splice(y,0,{[d]:C}),C}case"addChild":{const C=Jt();return Array.isArray(s[E])||(s[E]=[]),s[E].unshift({[d]:C}),C}case"down":t<O.length-1&&O[t]&&O[y]&&([O[t],O[y]]=[O[y],O[t]]);break;case"left":if(n?.[h])return n[m].splice(n[b]+1,0,...O.splice(t,1)),n[d];break;case"remove":{const C=a?.[d]??c?.[d]??n?.[d]??o?.[d];return O.splice(t,1),C}case"right":if(c){const C=c[E]??[],M=c[d];return c[E]=[...C,...O.splice(t,1)],M}break;case"up":t&&O[t]&&O[w]&&([O[w],O[t]]=[O[t],O[w]]);break}}};return{add:f=>v(f,"add"),addChild:f=>v(f,"addChild"),down:f=>v(f,"down"),left:f=>v(f,"left"),nodes:S,nodesMap:g,remove:f=>v(f,"remove"),right:f=>v(f,"right"),up:f=>v(f,"up")}};var qe={exports:{}},Rt={},he={},_e={},Nt={},Ot={},kt={},Wt;function yt(){return Wt||(Wt=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 r{}e._CodeOrName=r,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class E extends r{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=E;class d extends r{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((a,y)=>`${a}${y}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((a,y)=>(y instanceof E&&(a[y.str]=(a[y.str]||0)+1),a),{})}}e._Code=d,e.nil=new d("");function b(o,...t){const a=[o[0]];let y=0;for(;y<t.length;)l(a,t[y]),a.push(o[++y]);return new d(a)}e._=b;const i=new d("+");function h(o,...t){const a=[v(o[0])];let y=0;for(;y<t.length;)a.push(i),l(a,t[y]),a.push(i,v(o[++y]));return m(a),new d(a)}e.str=h;function l(o,t){t instanceof d?o.push(...t._items):t instanceof E?o.push(t):o.push(S(t))}e.addCodeArg=l;function m(o){let t=1;for(;t<o.length-1;){if(o[t]===i){const a=$(o[t-1],o[t+1]);if(a!==void 0){o.splice(t-1,3,a);continue}o[t++]="+"}t++}}function $(o,t){if(t==='""')return o;if(o==='""')return t;if(typeof o=="string")return t instanceof E||o[o.length-1]!=='"'?void 0:typeof t!="string"?`${o.slice(0,-1)}${t}"`:t[0]==='"'?o.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(o instanceof E))return`"${o}${t.slice(1)}`}function p(o,t){return t.emptyStr()?o:o.emptyStr()?t:h`${o}${t}`}e.strConcat=p;function S(o){return typeof o=="number"||typeof o=="boolean"||o===null?o:v(Array.isArray(o)?o.join(","):o)}function g(o){return new d(v(o))}e.stringify=g;function v(o){return JSON.stringify(o).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=v;function f(o){return typeof o=="string"&&e.IDENTIFIER.test(o)?new d(`.${o}`):b`[${o}]`}e.getProperty=f;function _(o){if(typeof o=="string"&&e.IDENTIFIER.test(o))return new d(`${o}`);throw new Error(`CodeGen: invalid export name: ${o}, use explicit $id name mapping`)}e.getEsmExportName=_;function s(o){return new d(o.toString())}e.regexpCode=s})(kt)),kt}var qt={},Bt;function Qt(){return Bt||(Bt=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const r=yt();class E extends Error{constructor($){super(`CodeGen: "code" for ${$} not defined`),this.value=$.value}}var d;(function(m){m[m.Started=0]="Started",m[m.Completed=1]="Completed"})(d||(e.UsedValueState=d={})),e.varKinds={const:new r.Name("const"),let:new r.Name("let"),var:new r.Name("var")};class b{constructor({prefixes:$,parent:p}={}){this._names={},this._prefixes=$,this._parent=p}toName($){return $ instanceof r.Name?$:this.name($)}name($){return new r.Name(this._newName($))}_newName($){const p=this._names[$]||this._nameGroup($);return`${$}${p.index++}`}_nameGroup($){var p,S;if(!((S=(p=this._parent)===null||p===void 0?void 0:p._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=b;class i extends r.Name{constructor($,p){super(p),this.prefix=$}setValue($,{property:p,itemIndex:S}){this.value=$,this.scopePath=(0,r._)`.${new r.Name(p)}[${S}]`}}e.ValueScopeName=i;const h=(0,r._)`\n`;class l extends b{constructor($){super($),this._values={},this._scope=$.scope,this.opts={...$,_n:$.lines?h:r.nil}}get(){return this._scope}name($){return new i($,this._newName($))}value($,p){var S;if(p.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const g=this.toName($),{prefix:v}=g,f=(S=p.key)!==null&&S!==void 0?S:p.ref;let _=this._values[v];if(_){const t=_.get(f);if(t)return t}else _=this._values[v]=new Map;_.set(f,g);const s=this._scope[v]||(this._scope[v]=[]),o=s.length;return s[o]=p.ref,g.setValue(p,{property:v,itemIndex:o}),g}getValue($,p){const S=this._values[$];if(S)return S.get(p)}scopeRefs($,p=this._values){return this._reduceValues(p,S=>{if(S.scopePath===void 0)throw new Error(`CodeGen: name "${S}" has no value`);return(0,r._)`${$}${S.scopePath}`})}scopeCode($=this._values,p,S){return this._reduceValues($,g=>{if(g.value===void 0)throw new Error(`CodeGen: name "${g}" has no value`);return g.value.code},p,S)}_reduceValues($,p,S={},g){let v=r.nil;for(const f in $){const _=$[f];if(!_)continue;const s=S[f]=S[f]||new Map;_.forEach(o=>{if(s.has(o))return;s.set(o,d.Started);let t=p(o);if(t){const a=this.opts.es5?e.varKinds.var:e.varKinds.const;v=(0,r._)`${v}${a} ${o} = ${t};${this.opts._n}`}else if(t=g?.(o))v=(0,r._)`${v}${t}${this.opts._n}`;else throw new E(o);s.set(o,d.Completed)})}return v}}e.ValueScope=l})(qt)),qt}var Xt;function J(){return Xt||(Xt=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 r=yt(),E=Qt();var d=yt();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return d.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return d.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return d.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return d.Name}});var b=Qt();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return b.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return b.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return b.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return b.varKinds}}),e.operators={GT:new r._Code(">"),GTE:new r._Code(">="),LT:new r._Code("<"),LTE:new r._Code("<="),EQ:new r._Code("==="),NEQ:new r._Code("!=="),NOT:new r._Code("!"),OR:new r._Code("||"),AND:new r._Code("&&"),ADD:new r._Code("+")};class i{optimizeNodes(){return this}optimizeNames(u,P){return this}}class h extends i{constructor(u,P,q){super(),this.varKind=u,this.name=P,this.rhs=q}render({es5:u,_n:P}){const q=u?E.varKinds.var:this.varKind,U=this.rhs===void 0?"":` = ${this.rhs}`;return`${q} ${this.name}${U};`+P}optimizeNames(u,P){if(u[this.name.str])return this.rhs&&(this.rhs=B(this.rhs,u,P)),this}get names(){return this.rhs instanceof r._CodeOrName?this.rhs.names:{}}}class l extends i{constructor(u,P,q){super(),this.lhs=u,this.rhs=P,this.sideEffects=q}render({_n:u}){return`${this.lhs} = ${this.rhs};`+u}optimizeNames(u,P){if(!(this.lhs instanceof r.Name&&!u[this.lhs.str]&&!this.sideEffects))return this.rhs=B(this.rhs,u,P),this}get names(){const u=this.lhs instanceof r.Name?{}:{...this.lhs.names};return K(u,this.rhs)}}class m extends l{constructor(u,P,q,U){super(u,q,U),this.op=P}render({_n:u}){return`${this.lhs} ${this.op}= ${this.rhs};`+u}}class $ extends i{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`${this.label}:`+u}}class p extends i{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`break${this.label?` ${this.label}`:""};`+u}}class S extends i{constructor(u){super(),this.error=u}render({_n:u}){return`throw ${this.error};`+u}get names(){return this.error.names}}class g extends i{constructor(u){super(),this.code=u}render({_n:u}){return`${this.code};`+u}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(u,P){return this.code=B(this.code,u,P),this}get names(){return this.code instanceof r._CodeOrName?this.code.names:{}}}class v extends i{constructor(u=[]){super(),this.nodes=u}render(u){return this.nodes.reduce((P,q)=>P+q.render(u),"")}optimizeNodes(){const{nodes:u}=this;let P=u.length;for(;P--;){const q=u[P].optimizeNodes();Array.isArray(q)?u.splice(P,1,...q):q?u[P]=q:u.splice(P,1)}return u.length>0?this:void 0}optimizeNames(u,P){const{nodes:q}=this;let U=q.length;for(;U--;){const F=q[U];F.optimizeNames(u,P)||(x(u,F.names),q.splice(U,1))}return q.length>0?this:void 0}get names(){return this.nodes.reduce((u,P)=>L(u,P.names),{})}}class f extends v{render(u){return"{"+u._n+super.render(u)+"}"+u._n}}class _ extends v{}class s extends f{}s.kind="else";class o extends f{constructor(u,P){super(P),this.condition=u}render(u){let P=`if(${this.condition})`+super.render(u);return this.else&&(P+="else "+this.else.render(u)),P}optimizeNodes(){super.optimizeNodes();const u=this.condition;if(u===!0)return this.nodes;let P=this.else;if(P){const q=P.optimizeNodes();P=this.else=Array.isArray(q)?new s(q):q}if(P)return u===!1?P instanceof o?P:P.nodes:this.nodes.length?this:new o(de(u),P instanceof o?[P]:P.nodes);if(!(u===!1||!this.nodes.length))return this}optimizeNames(u,P){var q;if(this.else=(q=this.else)===null||q===void 0?void 0:q.optimizeNames(u,P),!!(super.optimizeNames(u,P)||this.else))return this.condition=B(this.condition,u,P),this}get names(){const u=super.names;return K(u,this.condition),this.else&&L(u,this.else.names),u}}o.kind="if";class t extends f{}t.kind="for";class a extends t{constructor(u){super(),this.iteration=u}render(u){return`for(${this.iteration})`+super.render(u)}optimizeNames(u,P){if(super.optimizeNames(u,P))return this.iteration=B(this.iteration,u,P),this}get names(){return L(super.names,this.iteration.names)}}class y extends t{constructor(u,P,q,U){super(),this.varKind=u,this.name=P,this.from=q,this.to=U}render(u){const P=u.es5?E.varKinds.var:this.varKind,{name:q,from:U,to:F}=this;return`for(${P} ${q}=${U}; ${q}<${F}; ${q}++)`+super.render(u)}get names(){const u=K(super.names,this.from);return K(u,this.to)}}class n extends t{constructor(u,P,q,U){super(),this.loop=u,this.varKind=P,this.name=q,this.iterable=U}render(u){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(u)}optimizeNames(u,P){if(super.optimizeNames(u,P))return this.iterable=B(this.iterable,u,P),this}get names(){return L(super.names,this.iterable.names)}}class c extends f{constructor(u,P,q){super(),this.name=u,this.args=P,this.async=q}render(u){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(u)}}c.kind="func";class w extends v{render(u){return"return "+super.render(u)}}w.kind="return";class O extends f{render(u){let P="try"+super.render(u);return this.catch&&(P+=this.catch.render(u)),this.finally&&(P+=this.finally.render(u)),P}optimizeNodes(){var u,P;return super.optimizeNodes(),(u=this.catch)===null||u===void 0||u.optimizeNodes(),(P=this.finally)===null||P===void 0||P.optimizeNodes(),this}optimizeNames(u,P){var q,U;return super.optimizeNames(u,P),(q=this.catch)===null||q===void 0||q.optimizeNames(u,P),(U=this.finally)===null||U===void 0||U.optimizeNames(u,P),this}get names(){const u=super.names;return this.catch&&L(u,this.catch.names),this.finally&&L(u,this.finally.names),u}}class C extends f{constructor(u){super(),this.error=u}render(u){return`catch(${this.error})`+super.render(u)}}C.kind="catch";class M extends f{render(u){return"finally"+super.render(u)}}M.kind="finally";class V{constructor(u,P={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...P,_n:P.lines?`
2
- `:""},this._extScope=u,this._scope=new E.Scope({parent:u}),this._nodes=[new _]}toString(){return this._root.render(this.opts)}name(u){return this._scope.name(u)}scopeName(u){return this._extScope.name(u)}scopeValue(u,P){const q=this._extScope.value(u,P);return(this._values[q.prefix]||(this._values[q.prefix]=new Set)).add(q),q}getScopeValue(u,P){return this._extScope.getValue(u,P)}scopeRefs(u){return this._extScope.scopeRefs(u,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(u,P,q,U){const F=this._scope.toName(P);return q!==void 0&&U&&(this._constants[F.str]=q),this._leafNode(new h(u,F,q)),F}const(u,P,q){return this._def(E.varKinds.const,u,P,q)}let(u,P,q){return this._def(E.varKinds.let,u,P,q)}var(u,P,q){return this._def(E.varKinds.var,u,P,q)}assign(u,P,q){return this._leafNode(new l(u,P,q))}add(u,P){return this._leafNode(new m(u,e.operators.ADD,P))}code(u){return typeof u=="function"?u():u!==r.nil&&this._leafNode(new g(u)),this}object(...u){const P=["{"];for(const[q,U]of u)P.length>1&&P.push(","),P.push(q),(q!==U||this.opts.es5)&&(P.push(":"),(0,r.addCodeArg)(P,U));return P.push("}"),new r._Code(P)}if(u,P,q){if(this._blockNode(new o(u)),P&&q)this.code(P).else().code(q).endIf();else if(P)this.code(P).endIf();else if(q)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(u){return this._elseNode(new o(u))}else(){return this._elseNode(new s)}endIf(){return this._endBlockNode(o,s)}_for(u,P){return this._blockNode(u),P&&this.code(P).endFor(),this}for(u,P){return this._for(new a(u),P)}forRange(u,P,q,U,F=this.opts.es5?E.varKinds.var:E.varKinds.let){const X=this._scope.toName(u);return this._for(new y(F,X,P,q),()=>U(X))}forOf(u,P,q,U=E.varKinds.const){const F=this._scope.toName(u);if(this.opts.es5){const X=P instanceof r.Name?P:this.var("_arr",P);return this.forRange("_i",0,(0,r._)`${X}.length`,W=>{this.var(F,(0,r._)`${X}[${W}]`),q(F)})}return this._for(new n("of",U,F,P),()=>q(F))}forIn(u,P,q,U=this.opts.es5?E.varKinds.var:E.varKinds.const){if(this.opts.ownProperties)return this.forOf(u,(0,r._)`Object.keys(${P})`,q);const F=this._scope.toName(u);return this._for(new n("in",U,F,P),()=>q(F))}endFor(){return this._endBlockNode(t)}label(u){return this._leafNode(new $(u))}break(u){return this._leafNode(new p(u))}return(u){const P=new w;if(this._blockNode(P),this.code(u),P.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(w)}try(u,P,q){if(!P&&!q)throw new Error('CodeGen: "try" without "catch" and "finally"');const U=new O;if(this._blockNode(U),this.code(u),P){const F=this.name("e");this._currNode=U.catch=new C(F),P(F)}return q&&(this._currNode=U.finally=new M,this.code(q)),this._endBlockNode(C,M)}throw(u){return this._leafNode(new S(u))}block(u,P){return this._blockStarts.push(this._nodes.length),u&&this.code(u).endBlock(P),this}endBlock(u){const P=this._blockStarts.pop();if(P===void 0)throw new Error("CodeGen: not in self-balancing block");const q=this._nodes.length-P;if(q<0||u!==void 0&&q!==u)throw new Error(`CodeGen: wrong number of nodes: ${q} vs ${u} expected`);return this._nodes.length=P,this}func(u,P=r.nil,q,U){return this._blockNode(new c(u,P,q)),U&&this.code(U).endFunc(),this}endFunc(){return this._endBlockNode(c)}optimize(u=1){for(;u-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(u){return this._currNode.nodes.push(u),this}_blockNode(u){this._currNode.nodes.push(u),this._nodes.push(u)}_endBlockNode(u,P){const q=this._currNode;if(q instanceof u||P&&q instanceof P)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${P?`${u.kind}/${P.kind}`:u.kind}"`)}_elseNode(u){const P=this._currNode;if(!(P instanceof o))throw new Error('CodeGen: "else" without "if"');return this._currNode=P.else=u,this}get _root(){return this._nodes[0]}get _currNode(){const u=this._nodes;return u[u.length-1]}set _currNode(u){const P=this._nodes;P[P.length-1]=u}}e.CodeGen=V;function L(k,u){for(const P in u)k[P]=(k[P]||0)+(u[P]||0);return k}function K(k,u){return u instanceof r._CodeOrName?L(k,u.names):k}function B(k,u,P){if(k instanceof r.Name)return q(k);if(!U(k))return k;return new r._Code(k._items.reduce((F,X)=>(X instanceof r.Name&&(X=q(X)),X instanceof r._Code?F.push(...X._items):F.push(X),F),[]));function q(F){const X=P[F.str];return X===void 0||u[F.str]!==1?F:(delete u[F.str],X)}function U(F){return F instanceof r._Code&&F._items.some(X=>X instanceof r.Name&&u[X.str]===1&&P[X.str]!==void 0)}}function x(k,u){for(const P in u)k[P]=(k[P]||0)-(u[P]||0)}function de(k){return typeof k=="boolean"||typeof k=="number"||k===null?!k:(0,r._)`!${I(k)}`}e.not=de;const fe=R(e.operators.AND);function Z(...k){return k.reduce(fe)}e.and=Z;const ye=R(e.operators.OR);function D(...k){return k.reduce(ye)}e.or=D;function R(k){return(u,P)=>u===r.nil?P:P===r.nil?u:(0,r._)`${I(u)} ${k} ${I(P)}`}function I(k){return k instanceof r.Name?k:(0,r._)`(${k})`}})(Ot)),Ot}var H={},Yt;function Q(){if(Yt)return H;Yt=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(),r=yt();function E(n){const c={};for(const w of n)c[w]=!0;return c}H.toHash=E;function d(n,c){return typeof c=="boolean"?c:Object.keys(c).length===0?!0:(b(n,c),!i(c,n.self.RULES.all))}H.alwaysValidSchema=d;function b(n,c=n.schema){const{opts:w,self:O}=n;if(!w.strictSchema||typeof c=="boolean")return;const C=O.RULES.keywords;for(const M in c)C[M]||y(n,`unknown keyword: "${M}"`)}H.checkUnknownRules=b;function i(n,c){if(typeof n=="boolean")return!n;for(const w in n)if(c[w])return!0;return!1}H.schemaHasRules=i;function h(n,c){if(typeof n=="boolean")return!n;for(const w in n)if(w!=="$ref"&&c.all[w])return!0;return!1}H.schemaHasRulesButRef=h;function l({topSchemaRef:n,schemaPath:c},w,O,C){if(!C){if(typeof w=="number"||typeof w=="boolean")return w;if(typeof w=="string")return(0,e._)`${w}`}return(0,e._)`${n}${c}${(0,e.getProperty)(O)}`}H.schemaRefOrVal=l;function m(n){return S(decodeURIComponent(n))}H.unescapeFragment=m;function $(n){return encodeURIComponent(p(n))}H.escapeFragment=$;function p(n){return typeof n=="number"?`${n}`:n.replace(/~/g,"~0").replace(/\//g,"~1")}H.escapeJsonPointer=p;function S(n){return n.replace(/~1/g,"/").replace(/~0/g,"~")}H.unescapeJsonPointer=S;function g(n,c){if(Array.isArray(n))for(const w of n)c(w);else c(n)}H.eachItem=g;function v({mergeNames:n,mergeToName:c,mergeValues:w,resultToName:O}){return(C,M,V,L)=>{const K=V===void 0?M:V instanceof e.Name?(M instanceof e.Name?n(C,M,V):c(C,M,V),V):M instanceof e.Name?(c(C,V,M),M):w(M,V);return L===e.Name&&!(K instanceof e.Name)?O(C,K):K}}H.mergeEvaluated={props:v({mergeNames:(n,c,w)=>n.if((0,e._)`${w} !== true && ${c} !== undefined`,()=>{n.if((0,e._)`${c} === true`,()=>n.assign(w,!0),()=>n.assign(w,(0,e._)`${w} || {}`).code((0,e._)`Object.assign(${w}, ${c})`))}),mergeToName:(n,c,w)=>n.if((0,e._)`${w} !== true`,()=>{c===!0?n.assign(w,!0):(n.assign(w,(0,e._)`${w} || {}`),_(n,w,c))}),mergeValues:(n,c)=>n===!0?!0:{...n,...c},resultToName:f}),items:v({mergeNames:(n,c,w)=>n.if((0,e._)`${w} !== true && ${c} !== undefined`,()=>n.assign(w,(0,e._)`${c} === true ? true : ${w} > ${c} ? ${w} : ${c}`)),mergeToName:(n,c,w)=>n.if((0,e._)`${w} !== true`,()=>n.assign(w,c===!0?!0:(0,e._)`${w} > ${c} ? ${w} : ${c}`)),mergeValues:(n,c)=>n===!0?!0:Math.max(n,c),resultToName:(n,c)=>n.var("items",c)})};function f(n,c){if(c===!0)return n.var("props",!0);const w=n.var("props",(0,e._)`{}`);return c!==void 0&&_(n,w,c),w}H.evaluatedPropsToName=f;function _(n,c,w){Object.keys(w).forEach(O=>n.assign((0,e._)`${c}${(0,e.getProperty)(O)}`,!0))}H.setEvaluated=_;const s={};function o(n,c){return n.scopeValue("func",{ref:c,code:s[c.code]||(s[c.code]=new r._Code(c.code))})}H.useFunc=o;var t;(function(n){n[n.Num=0]="Num",n[n.Str=1]="Str"})(t||(H.Type=t={}));function a(n,c,w){if(n instanceof e.Name){const O=c===t.Num;return w?O?(0,e._)`"[" + ${n} + "]"`:(0,e._)`"['" + ${n} + "']"`:O?(0,e._)`"/" + ${n}`:(0,e._)`"/" + ${n}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return w?(0,e.getProperty)(n).toString():"/"+p(n)}H.getErrorPath=a;function y(n,c,w=n.opts.strictSchema){if(w){if(c=`strict mode: ${c}`,w===!0)throw new Error(c);n.self.logger.warn(c)}}return H.checkStrictMode=y,H}var Te={},Zt;function ve(){if(Zt)return Te;Zt=1,Object.defineProperty(Te,"__esModule",{value:!0});const e=J(),r={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 Te.default=r,Te}var xt;function _t(){return xt||(xt=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 r=J(),E=Q(),d=ve();e.keywordError={message:({keyword:s})=>(0,r.str)`must pass "${s}" keyword validation`},e.keyword$DataError={message:({keyword:s,schemaType:o})=>o?(0,r.str)`"${s}" keyword must be ${o} ($data)`:(0,r.str)`"${s}" keyword is invalid ($data)`};function b(s,o=e.keywordError,t,a){const{it:y}=s,{gen:n,compositeRule:c,allErrors:w}=y,O=S(s,o,t);a??(c||w)?m(n,O):$(y,(0,r._)`[${O}]`)}e.reportError=b;function i(s,o=e.keywordError,t){const{it:a}=s,{gen:y,compositeRule:n,allErrors:c}=a,w=S(s,o,t);m(y,w),n||c||$(a,d.default.vErrors)}e.reportExtraError=i;function h(s,o){s.assign(d.default.errors,o),s.if((0,r._)`${d.default.vErrors} !== null`,()=>s.if(o,()=>s.assign((0,r._)`${d.default.vErrors}.length`,o),()=>s.assign(d.default.vErrors,null)))}e.resetErrorsCount=h;function l({gen:s,keyword:o,schemaValue:t,data:a,errsCount:y,it:n}){if(y===void 0)throw new Error("ajv implementation error");const c=s.name("err");s.forRange("i",y,d.default.errors,w=>{s.const(c,(0,r._)`${d.default.vErrors}[${w}]`),s.if((0,r._)`${c}.instancePath === undefined`,()=>s.assign((0,r._)`${c}.instancePath`,(0,r.strConcat)(d.default.instancePath,n.errorPath))),s.assign((0,r._)`${c}.schemaPath`,(0,r.str)`${n.errSchemaPath}/${o}`),n.opts.verbose&&(s.assign((0,r._)`${c}.schema`,t),s.assign((0,r._)`${c}.data`,a))})}e.extendErrors=l;function m(s,o){const t=s.const("err",o);s.if((0,r._)`${d.default.vErrors} === null`,()=>s.assign(d.default.vErrors,(0,r._)`[${t}]`),(0,r._)`${d.default.vErrors}.push(${t})`),s.code((0,r._)`${d.default.errors}++`)}function $(s,o){const{gen:t,validateName:a,schemaEnv:y}=s;y.$async?t.throw((0,r._)`new ${s.ValidationError}(${o})`):(t.assign((0,r._)`${a}.errors`,o),t.return(!1))}const p={keyword:new r.Name("keyword"),schemaPath:new r.Name("schemaPath"),params:new r.Name("params"),propertyName:new r.Name("propertyName"),message:new r.Name("message"),schema:new r.Name("schema"),parentSchema:new r.Name("parentSchema")};function S(s,o,t){const{createErrors:a}=s.it;return a===!1?(0,r._)`{}`:g(s,o,t)}function g(s,o,t={}){const{gen:a,it:y}=s,n=[v(y,t),f(s,t)];return _(s,o,n),a.object(...n)}function v({errorPath:s},{instancePath:o}){const t=o?(0,r.str)`${s}${(0,E.getErrorPath)(o,E.Type.Str)}`:s;return[d.default.instancePath,(0,r.strConcat)(d.default.instancePath,t)]}function f({keyword:s,it:{errSchemaPath:o}},{schemaPath:t,parentSchema:a}){let y=a?o:(0,r.str)`${o}/${s}`;return t&&(y=(0,r.str)`${y}${(0,E.getErrorPath)(t,E.Type.Str)}`),[p.schemaPath,y]}function _(s,{params:o,message:t},a){const{keyword:y,data:n,schemaValue:c,it:w}=s,{opts:O,propertyName:C,topSchemaRef:M,schemaPath:V}=w;a.push([p.keyword,y],[p.params,typeof o=="function"?o(s):o||(0,r._)`{}`]),O.messages&&a.push([p.message,typeof t=="function"?t(s):t]),O.verbose&&a.push([p.schema,c],[p.parentSchema,(0,r._)`${M}${V}`],[d.default.data,n]),C&&a.push([p.propertyName,C])}})(Nt)),Nt}var er;function bn(){if(er)return _e;er=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.boolOrEmptySchema=_e.topBoolOrEmptySchema=void 0;const e=_t(),r=J(),E=ve(),d={message:"boolean schema is false"};function b(l){const{gen:m,schema:$,validateName:p}=l;$===!1?h(l,!1):typeof $=="object"&&$.$async===!0?m.return(E.default.data):(m.assign((0,r._)`${p}.errors`,null),m.return(!0))}_e.topBoolOrEmptySchema=b;function i(l,m){const{gen:$,schema:p}=l;p===!1?($.var(m,!1),h(l)):$.var(m,!0)}_e.boolOrEmptySchema=i;function h(l,m){const{gen:$,data:p}=l,S={gen:$,keyword:"false schema",data:p,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:l};(0,e.reportError)(S,d,void 0,m)}return _e}var re={},$e={},tr;function ln(){if(tr)return $e;tr=1,Object.defineProperty($e,"__esModule",{value:!0}),$e.getRules=$e.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],r=new Set(e);function E(b){return typeof b=="string"&&r.has(b)}$e.isJSONType=E;function d(){const b={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...b,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},b.number,b.string,b.array,b.object],post:{rules:[]},all:{},keywords:{}}}return $e.getRules=d,$e}var pe={},rr;function dn(){if(rr)return pe;rr=1,Object.defineProperty(pe,"__esModule",{value:!0}),pe.shouldUseRule=pe.shouldUseGroup=pe.schemaHasRulesForType=void 0;function e({schema:d,self:b},i){const h=b.RULES.types[i];return h&&h!==!0&&r(d,h)}pe.schemaHasRulesForType=e;function r(d,b){return b.rules.some(i=>E(d,i))}pe.shouldUseGroup=r;function E(d,b){var i;return d[b.keyword]!==void 0||((i=b.definition.implements)===null||i===void 0?void 0:i.some(h=>d[h]!==void 0))}return pe.shouldUseRule=E,pe}var nr;function gt(){if(nr)return re;nr=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=ln(),r=dn(),E=_t(),d=J(),b=Q();var i;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(i||(re.DataType=i={}));function h(t){const a=l(t.type);if(a.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!a.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&a.push("null")}return a}re.getSchemaTypes=h;function l(t){const a=Array.isArray(t)?t:t?[t]:[];if(a.every(e.isJSONType))return a;throw new Error("type must be JSONType or JSONType[]: "+a.join(","))}re.getJSONTypes=l;function m(t,a){const{gen:y,data:n,opts:c}=t,w=p(a,c.coerceTypes),O=a.length>0&&!(w.length===0&&a.length===1&&(0,r.schemaHasRulesForType)(t,a[0]));if(O){const C=f(a,n,c.strictNumbers,i.Wrong);y.if(C,()=>{w.length?S(t,a,w):s(t)})}return O}re.coerceAndCheckDataType=m;const $=new Set(["string","number","integer","boolean","null"]);function p(t,a){return a?t.filter(y=>$.has(y)||a==="array"&&y==="array"):[]}function S(t,a,y){const{gen:n,data:c,opts:w}=t,O=n.let("dataType",(0,d._)`typeof ${c}`),C=n.let("coerced",(0,d._)`undefined`);w.coerceTypes==="array"&&n.if((0,d._)`${O} == 'object' && Array.isArray(${c}) && ${c}.length == 1`,()=>n.assign(c,(0,d._)`${c}[0]`).assign(O,(0,d._)`typeof ${c}`).if(f(a,c,w.strictNumbers),()=>n.assign(C,c))),n.if((0,d._)`${C} !== undefined`);for(const V of y)($.has(V)||V==="array"&&w.coerceTypes==="array")&&M(V);n.else(),s(t),n.endIf(),n.if((0,d._)`${C} !== undefined`,()=>{n.assign(c,C),g(t,C)});function M(V){switch(V){case"string":n.elseIf((0,d._)`${O} == "number" || ${O} == "boolean"`).assign(C,(0,d._)`"" + ${c}`).elseIf((0,d._)`${c} === null`).assign(C,(0,d._)`""`);return;case"number":n.elseIf((0,d._)`${O} == "boolean" || ${c} === null
3
- || (${O} == "string" && ${c} && ${c} == +${c})`).assign(C,(0,d._)`+${c}`);return;case"integer":n.elseIf((0,d._)`${O} === "boolean" || ${c} === null
4
- || (${O} === "string" && ${c} && ${c} == +${c} && !(${c} % 1))`).assign(C,(0,d._)`+${c}`);return;case"boolean":n.elseIf((0,d._)`${c} === "false" || ${c} === 0 || ${c} === null`).assign(C,!1).elseIf((0,d._)`${c} === "true" || ${c} === 1`).assign(C,!0);return;case"null":n.elseIf((0,d._)`${c} === "" || ${c} === 0 || ${c} === false`),n.assign(C,null);return;case"array":n.elseIf((0,d._)`${O} === "string" || ${O} === "number"
5
- || ${O} === "boolean" || ${c} === null`).assign(C,(0,d._)`[${c}]`)}}}function g({gen:t,parentData:a,parentDataProperty:y},n){t.if((0,d._)`${a} !== undefined`,()=>t.assign((0,d._)`${a}[${y}]`,n))}function v(t,a,y,n=i.Correct){const c=n===i.Correct?d.operators.EQ:d.operators.NEQ;let w;switch(t){case"null":return(0,d._)`${a} ${c} null`;case"array":w=(0,d._)`Array.isArray(${a})`;break;case"object":w=(0,d._)`${a} && typeof ${a} == "object" && !Array.isArray(${a})`;break;case"integer":w=O((0,d._)`!(${a} % 1) && !isNaN(${a})`);break;case"number":w=O();break;default:return(0,d._)`typeof ${a} ${c} ${t}`}return n===i.Correct?w:(0,d.not)(w);function O(C=d.nil){return(0,d.and)((0,d._)`typeof ${a} == "number"`,C,y?(0,d._)`isFinite(${a})`:d.nil)}}re.checkDataType=v;function f(t,a,y,n){if(t.length===1)return v(t[0],a,y,n);let c;const w=(0,b.toHash)(t);if(w.array&&w.object){const O=(0,d._)`typeof ${a} != "object"`;c=w.null?O:(0,d._)`!${a} || ${O}`,delete w.null,delete w.array,delete w.object}else c=d.nil;w.number&&delete w.integer;for(const O in w)c=(0,d.and)(c,v(O,a,y,n));return c}re.checkDataTypes=f;const _={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:a})=>typeof t=="string"?(0,d._)`{type: ${t}}`:(0,d._)`{type: ${a}}`};function s(t){const a=o(t);(0,E.reportError)(a,_)}re.reportTypeError=s;function o(t){const{gen:a,data:y,schema:n}=t,c=(0,b.schemaRefOrVal)(t,n,"type");return{gen:a,keyword:"type",data:y,schema:n.type,schemaCode:c,schemaValue:c,parentSchema:n,params:{},it:t}}return re}var Re={},sr;function En(){if(sr)return Re;sr=1,Object.defineProperty(Re,"__esModule",{value:!0}),Re.assignDefaults=void 0;const e=J(),r=Q();function E(b,i){const{properties:h,items:l}=b.schema;if(i==="object"&&h)for(const m in h)d(b,m,h[m].default);else i==="array"&&Array.isArray(l)&&l.forEach((m,$)=>d(b,$,m.default))}Re.assignDefaults=E;function d(b,i,h){const{gen:l,compositeRule:m,data:$,opts:p}=b;if(h===void 0)return;const S=(0,e._)`${$}${(0,e.getProperty)(i)}`;if(m){(0,r.checkStrictMode)(b,`default is ignored for: ${S}`);return}let g=(0,e._)`${S} === undefined`;p.useDefaults==="empty"&&(g=(0,e._)`${g} || ${S} === null || ${S} === ""`),l.if(g,(0,e._)`${S} = ${(0,e.stringify)(h)}`)}return Re}var ce={},Y={},ar;function le(){if(ar)return Y;ar=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(),r=Q(),E=ve(),d=Q();function b(t,a){const{gen:y,data:n,it:c}=t;y.if(p(y,n,a,c.opts.ownProperties),()=>{t.setParams({missingProperty:(0,e._)`${a}`},!0),t.error()})}Y.checkReportMissingProp=b;function i({gen:t,data:a,it:{opts:y}},n,c){return(0,e.or)(...n.map(w=>(0,e.and)(p(t,a,w,y.ownProperties),(0,e._)`${c} = ${w}`)))}Y.checkMissingProp=i;function h(t,a){t.setParams({missingProperty:a},!0),t.error()}Y.reportMissingProp=h;function l(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}Y.hasPropFunc=l;function m(t,a,y){return(0,e._)`${l(t)}.call(${a}, ${y})`}Y.isOwnProperty=m;function $(t,a,y,n){const c=(0,e._)`${a}${(0,e.getProperty)(y)} !== undefined`;return n?(0,e._)`${c} && ${m(t,a,y)}`:c}Y.propertyInData=$;function p(t,a,y,n){const c=(0,e._)`${a}${(0,e.getProperty)(y)} === undefined`;return n?(0,e.or)(c,(0,e.not)(m(t,a,y))):c}Y.noPropertyInData=p;function S(t){return t?Object.keys(t).filter(a=>a!=="__proto__"):[]}Y.allSchemaProperties=S;function g(t,a){return S(a).filter(y=>!(0,r.alwaysValidSchema)(t,a[y]))}Y.schemaProperties=g;function v({schemaCode:t,data:a,it:{gen:y,topSchemaRef:n,schemaPath:c,errorPath:w},it:O},C,M,V){const L=V?(0,e._)`${t}, ${a}, ${n}${c}`:a,K=[[E.default.instancePath,(0,e.strConcat)(E.default.instancePath,w)],[E.default.parentData,O.parentData],[E.default.parentDataProperty,O.parentDataProperty],[E.default.rootData,E.default.rootData]];O.opts.dynamicRef&&K.push([E.default.dynamicAnchors,E.default.dynamicAnchors]);const B=(0,e._)`${L}, ${y.object(...K)}`;return M!==e.nil?(0,e._)`${C}.call(${M}, ${B})`:(0,e._)`${C}(${B})`}Y.callValidateCode=v;const f=(0,e._)`new RegExp`;function _({gen:t,it:{opts:a}},y){const n=a.unicodeRegExp?"u":"",{regExp:c}=a.code,w=c(y,n);return t.scopeValue("pattern",{key:w.toString(),ref:w,code:(0,e._)`${c.code==="new RegExp"?f:(0,d.useFunc)(t,c)}(${y}, ${n})`})}Y.usePattern=_;function s(t){const{gen:a,data:y,keyword:n,it:c}=t,w=a.name("valid");if(c.allErrors){const C=a.let("valid",!0);return O(()=>a.assign(C,!1)),C}return a.var(w,!0),O(()=>a.break()),w;function O(C){const M=a.const("len",(0,e._)`${y}.length`);a.forRange("i",0,M,V=>{t.subschema({keyword:n,dataProp:V,dataPropType:r.Type.Num},w),a.if((0,e.not)(w),C)})}}Y.validateArray=s;function o(t){const{gen:a,schema:y,keyword:n,it:c}=t;if(!Array.isArray(y))throw new Error("ajv implementation error");if(y.some(M=>(0,r.alwaysValidSchema)(c,M))&&!c.opts.unevaluated)return;const O=a.let("valid",!1),C=a.name("_valid");a.block(()=>y.forEach((M,V)=>{const L=t.subschema({keyword:n,schemaProp:V,compositeRule:!0},C);a.assign(O,(0,e._)`${O} || ${C}`),t.mergeValidEvaluated(L,C)||a.if((0,e.not)(O))})),t.result(O,()=>t.reset(),()=>t.error(!0))}return Y.validateUnion=o,Y}var ir;function Pn(){if(ir)return ce;ir=1,Object.defineProperty(ce,"__esModule",{value:!0}),ce.validateKeywordUsage=ce.validSchemaType=ce.funcKeywordCode=ce.macroKeywordCode=void 0;const e=J(),r=ve(),E=le(),d=_t();function b(g,v){const{gen:f,keyword:_,schema:s,parentSchema:o,it:t}=g,a=v.macro.call(t.self,s,o,t),y=$(f,_,a);t.opts.validateSchema!==!1&&t.self.validateSchema(a,!0);const n=f.name("valid");g.subschema({schema:a,schemaPath:e.nil,errSchemaPath:`${t.errSchemaPath}/${_}`,topSchemaRef:y,compositeRule:!0},n),g.pass(n,()=>g.error(!0))}ce.macroKeywordCode=b;function i(g,v){var f;const{gen:_,keyword:s,schema:o,parentSchema:t,$data:a,it:y}=g;m(y,v);const n=!a&&v.compile?v.compile.call(y.self,o,t,y):v.validate,c=$(_,s,n),w=_.let("valid");g.block$data(w,O),g.ok((f=v.valid)!==null&&f!==void 0?f:w);function O(){if(v.errors===!1)V(),v.modifying&&h(g),L(()=>g.error());else{const K=v.async?C():M();v.modifying&&h(g),L(()=>l(g,K))}}function C(){const K=_.let("ruleErrs",null);return _.try(()=>V((0,e._)`await `),B=>_.assign(w,!1).if((0,e._)`${B} instanceof ${y.ValidationError}`,()=>_.assign(K,(0,e._)`${B}.errors`),()=>_.throw(B))),K}function M(){const K=(0,e._)`${c}.errors`;return _.assign(K,null),V(e.nil),K}function V(K=v.async?(0,e._)`await `:e.nil){const B=y.opts.passContext?r.default.this:r.default.self,x=!("compile"in v&&!a||v.schema===!1);_.assign(w,(0,e._)`${K}${(0,E.callValidateCode)(g,c,B,x)}`,v.modifying)}function L(K){var B;_.if((0,e.not)((B=v.valid)!==null&&B!==void 0?B:w),K)}}ce.funcKeywordCode=i;function h(g){const{gen:v,data:f,it:_}=g;v.if(_.parentData,()=>v.assign(f,(0,e._)`${_.parentData}[${_.parentDataProperty}]`))}function l(g,v){const{gen:f}=g;f.if((0,e._)`Array.isArray(${v})`,()=>{f.assign(r.default.vErrors,(0,e._)`${r.default.vErrors} === null ? ${v} : ${r.default.vErrors}.concat(${v})`).assign(r.default.errors,(0,e._)`${r.default.vErrors}.length`),(0,d.extendErrors)(g)},()=>g.error())}function m({schemaEnv:g},v){if(v.async&&!g.$async)throw new Error("async keyword in sync schema")}function $(g,v,f){if(f===void 0)throw new Error(`keyword "${v}" failed to compile`);return g.scopeValue("keyword",typeof f=="function"?{ref:f}:{ref:f,code:(0,e.stringify)(f)})}function p(g,v,f=!1){return!v.length||v.some(_=>_==="array"?Array.isArray(g):_==="object"?g&&typeof g=="object"&&!Array.isArray(g):typeof g==_||f&&typeof g>"u")}ce.validSchemaType=p;function S({schema:g,opts:v,self:f,errSchemaPath:_},s,o){if(Array.isArray(s.keyword)?!s.keyword.includes(o):s.keyword!==o)throw new Error("ajv implementation error");const t=s.dependencies;if(t?.some(a=>!Object.prototype.hasOwnProperty.call(g,a)))throw new Error(`parent schema must have dependencies of ${o}: ${t.join(",")}`);if(s.validateSchema&&!s.validateSchema(g[o])){const y=`keyword "${o}" value is invalid at path "${_}": `+f.errorsText(s.validateSchema.errors);if(v.validateSchema==="log")f.logger.error(y);else throw new Error(y)}}return ce.validateKeywordUsage=S,ce}var me={},or;function Sn(){if(or)return me;or=1,Object.defineProperty(me,"__esModule",{value:!0}),me.extendSubschemaMode=me.extendSubschemaData=me.getSubschema=void 0;const e=J(),r=Q();function E(i,{keyword:h,schemaProp:l,schema:m,schemaPath:$,errSchemaPath:p,topSchemaRef:S}){if(h!==void 0&&m!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(h!==void 0){const g=i.schema[h];return l===void 0?{schema:g,schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(h)}`,errSchemaPath:`${i.errSchemaPath}/${h}`}:{schema:g[l],schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(h)}${(0,e.getProperty)(l)}`,errSchemaPath:`${i.errSchemaPath}/${h}/${(0,r.escapeFragment)(l)}`}}if(m!==void 0){if($===void 0||p===void 0||S===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:m,schemaPath:$,topSchemaRef:S,errSchemaPath:p}}throw new Error('either "keyword" or "schema" must be passed')}me.getSubschema=E;function d(i,h,{dataProp:l,dataPropType:m,data:$,dataTypes:p,propertyName:S}){if($!==void 0&&l!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:g}=h;if(l!==void 0){const{errorPath:f,dataPathArr:_,opts:s}=h,o=g.let("data",(0,e._)`${h.data}${(0,e.getProperty)(l)}`,!0);v(o),i.errorPath=(0,e.str)`${f}${(0,r.getErrorPath)(l,m,s.jsPropertySyntax)}`,i.parentDataProperty=(0,e._)`${l}`,i.dataPathArr=[..._,i.parentDataProperty]}if($!==void 0){const f=$ instanceof e.Name?$:g.let("data",$,!0);v(f),S!==void 0&&(i.propertyName=S)}p&&(i.dataTypes=p);function v(f){i.data=f,i.dataLevel=h.dataLevel+1,i.dataTypes=[],h.definedProperties=new Set,i.parentData=h.data,i.dataNames=[...h.dataNames,f]}}me.extendSubschemaData=d;function b(i,{jtdDiscriminator:h,jtdMetadata:l,compositeRule:m,createErrors:$,allErrors:p}){m!==void 0&&(i.compositeRule=m),$!==void 0&&(i.createErrors=$),p!==void 0&&(i.allErrors=p),i.jtdDiscriminator=h,i.jtdMetadata=l}return me.extendSubschemaMode=b,me}var ne={},Tt,ur;function fn(){return ur||(ur=1,Tt=function e(r,E){if(r===E)return!0;if(r&&E&&typeof r=="object"&&typeof E=="object"){if(r.constructor!==E.constructor)return!1;var d,b,i;if(Array.isArray(r)){if(d=r.length,d!=E.length)return!1;for(b=d;b--!==0;)if(!e(r[b],E[b]))return!1;return!0}if(r.constructor===RegExp)return r.source===E.source&&r.flags===E.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===E.valueOf();if(r.toString!==Object.prototype.toString)return r.toString()===E.toString();if(i=Object.keys(r),d=i.length,d!==Object.keys(E).length)return!1;for(b=d;b--!==0;)if(!Object.prototype.hasOwnProperty.call(E,i[b]))return!1;for(b=d;b--!==0;){var h=i[b];if(!e(r[h],E[h]))return!1}return!0}return r!==r&&E!==E}),Tt}var It={exports:{}},cr;function jn(){if(cr)return It.exports;cr=1;var e=It.exports=function(d,b,i){typeof b=="function"&&(i=b,b={}),i=b.cb||i;var h=typeof i=="function"?i:i.pre||function(){},l=i.post||function(){};r(b,h,l,d,"",d)};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 r(d,b,i,h,l,m,$,p,S,g){if(h&&typeof h=="object"&&!Array.isArray(h)){b(h,l,m,$,p,S,g);for(var v in h){var f=h[v];if(Array.isArray(f)){if(v in e.arrayKeywords)for(var _=0;_<f.length;_++)r(d,b,i,f[_],l+"/"+v+"/"+_,m,l,v,h,_)}else if(v in e.propsKeywords){if(f&&typeof f=="object")for(var s in f)r(d,b,i,f[s],l+"/"+v+"/"+E(s),m,l,v,h,s)}else(v in e.keywords||d.allKeys&&!(v in e.skipKeywords))&&r(d,b,i,f,l+"/"+v,m,l,v,h)}i(h,l,m,$,p,S,g)}}function E(d){return d.replace(/~/g,"~0").replace(/\//g,"~1")}return It.exports}var lr;function $t(){if(lr)return ne;lr=1,Object.defineProperty(ne,"__esModule",{value:!0}),ne.getSchemaRefs=ne.resolveUrl=ne.normalizeId=ne._getFullPath=ne.getFullPath=ne.inlineRef=void 0;const e=Q(),r=fn(),E=jn(),d=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function b(_,s=!0){return typeof _=="boolean"?!0:s===!0?!h(_):s?l(_)<=s:!1}ne.inlineRef=b;const i=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function h(_){for(const s in _){if(i.has(s))return!0;const o=_[s];if(Array.isArray(o)&&o.some(h)||typeof o=="object"&&h(o))return!0}return!1}function l(_){let s=0;for(const o in _){if(o==="$ref")return 1/0;if(s++,!d.has(o)&&(typeof _[o]=="object"&&(0,e.eachItem)(_[o],t=>s+=l(t)),s===1/0))return 1/0}return s}function m(_,s="",o){o!==!1&&(s=S(s));const t=_.parse(s);return $(_,t)}ne.getFullPath=m;function $(_,s){return _.serialize(s).split("#")[0]+"#"}ne._getFullPath=$;const p=/#\/?$/;function S(_){return _?_.replace(p,""):""}ne.normalizeId=S;function g(_,s,o){return o=S(o),_.resolve(s,o)}ne.resolveUrl=g;const v=/^[a-z_][-a-z0-9._]*$/i;function f(_,s){if(typeof _=="boolean")return{};const{schemaId:o,uriResolver:t}=this.opts,a=S(_[o]||s),y={"":a},n=m(t,a,!1),c={},w=new Set;return E(_,{allKeys:!0},(M,V,L,K)=>{if(K===void 0)return;const B=n+V;let x=y[K];typeof M[o]=="string"&&(x=de.call(this,M[o])),fe.call(this,M.$anchor),fe.call(this,M.$dynamicAnchor),y[V]=x;function de(Z){const ye=this.opts.uriResolver.resolve;if(Z=S(x?ye(x,Z):Z),w.has(Z))throw C(Z);w.add(Z);let D=this.refs[Z];return typeof D=="string"&&(D=this.refs[D]),typeof D=="object"?O(M,D.schema,Z):Z!==S(B)&&(Z[0]==="#"?(O(M,c[Z],Z),c[Z]=M):this.refs[Z]=B),Z}function fe(Z){if(typeof Z=="string"){if(!v.test(Z))throw new Error(`invalid anchor "${Z}"`);de.call(this,`#${Z}`)}}}),c;function O(M,V,L){if(V!==void 0&&!r(M,V))throw C(L)}function C(M){return new Error(`reference "${M}" resolves to more than one schema`)}}return ne.getSchemaRefs=f,ne}var dr;function wt(){if(dr)return he;dr=1,Object.defineProperty(he,"__esModule",{value:!0}),he.getData=he.KeywordCxt=he.validateFunctionCode=void 0;const e=bn(),r=gt(),E=dn(),d=gt(),b=En(),i=Pn(),h=Sn(),l=J(),m=ve(),$=$t(),p=Q(),S=_t();function g(j){if(n(j)&&(w(j),y(j))){s(j);return}v(j,()=>(0,e.topBoolOrEmptySchema)(j))}he.validateFunctionCode=g;function v({gen:j,validateName:N,schema:T,schemaEnv:A,opts:z},G){z.code.es5?j.func(N,(0,l._)`${m.default.data}, ${m.default.valCxt}`,A.$async,()=>{j.code((0,l._)`"use strict"; ${t(T,z)}`),_(j,z),j.code(G)}):j.func(N,(0,l._)`${m.default.data}, ${f(z)}`,A.$async,()=>j.code(t(T,z)).code(G))}function f(j){return(0,l._)`{${m.default.instancePath}="", ${m.default.parentData}, ${m.default.parentDataProperty}, ${m.default.rootData}=${m.default.data}${j.dynamicRef?(0,l._)`, ${m.default.dynamicAnchors}={}`:l.nil}}={}`}function _(j,N){j.if(m.default.valCxt,()=>{j.var(m.default.instancePath,(0,l._)`${m.default.valCxt}.${m.default.instancePath}`),j.var(m.default.parentData,(0,l._)`${m.default.valCxt}.${m.default.parentData}`),j.var(m.default.parentDataProperty,(0,l._)`${m.default.valCxt}.${m.default.parentDataProperty}`),j.var(m.default.rootData,(0,l._)`${m.default.valCxt}.${m.default.rootData}`),N.dynamicRef&&j.var(m.default.dynamicAnchors,(0,l._)`${m.default.valCxt}.${m.default.dynamicAnchors}`)},()=>{j.var(m.default.instancePath,(0,l._)`""`),j.var(m.default.parentData,(0,l._)`undefined`),j.var(m.default.parentDataProperty,(0,l._)`undefined`),j.var(m.default.rootData,m.default.data),N.dynamicRef&&j.var(m.default.dynamicAnchors,(0,l._)`{}`)})}function s(j){const{schema:N,opts:T,gen:A}=j;v(j,()=>{T.$comment&&N.$comment&&K(j),M(j),A.let(m.default.vErrors,null),A.let(m.default.errors,0),T.unevaluated&&o(j),O(j),B(j)})}function o(j){const{gen:N,validateName:T}=j;j.evaluated=N.const("evaluated",(0,l._)`${T}.evaluated`),N.if((0,l._)`${j.evaluated}.dynamicProps`,()=>N.assign((0,l._)`${j.evaluated}.props`,(0,l._)`undefined`)),N.if((0,l._)`${j.evaluated}.dynamicItems`,()=>N.assign((0,l._)`${j.evaluated}.items`,(0,l._)`undefined`))}function t(j,N){const T=typeof j=="object"&&j[N.schemaId];return T&&(N.code.source||N.code.process)?(0,l._)`/*# sourceURL=${T} */`:l.nil}function a(j,N){if(n(j)&&(w(j),y(j))){c(j,N);return}(0,e.boolOrEmptySchema)(j,N)}function y({schema:j,self:N}){if(typeof j=="boolean")return!j;for(const T in j)if(N.RULES.all[T])return!0;return!1}function n(j){return typeof j.schema!="boolean"}function c(j,N){const{schema:T,gen:A,opts:z}=j;z.$comment&&T.$comment&&K(j),V(j),L(j);const G=A.const("_errs",m.default.errors);O(j,G),A.var(N,(0,l._)`${G} === ${m.default.errors}`)}function w(j){(0,p.checkUnknownRules)(j),C(j)}function O(j,N){if(j.opts.jtd)return de(j,[],!1,N);const T=(0,r.getSchemaTypes)(j.schema),A=(0,r.coerceAndCheckDataType)(j,T);de(j,T,!A,N)}function C(j){const{schema:N,errSchemaPath:T,opts:A,self:z}=j;N.$ref&&A.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(N,z.RULES)&&z.logger.warn(`$ref: keywords ignored in schema at path "${T}"`)}function M(j){const{schema:N,opts:T}=j;N.default!==void 0&&T.useDefaults&&T.strictSchema&&(0,p.checkStrictMode)(j,"default is ignored in the schema root")}function V(j){const N=j.schema[j.opts.schemaId];N&&(j.baseId=(0,$.resolveUrl)(j.opts.uriResolver,j.baseId,N))}function L(j){if(j.schema.$async&&!j.schemaEnv.$async)throw new Error("async schema in sync schema")}function K({gen:j,schemaEnv:N,schema:T,errSchemaPath:A,opts:z}){const G=T.$comment;if(z.$comment===!0)j.code((0,l._)`${m.default.self}.logger.log(${G})`);else if(typeof z.$comment=="function"){const ee=(0,l.str)`${A}/$comment`,ue=j.scopeValue("root",{ref:N.root});j.code((0,l._)`${m.default.self}.opts.$comment(${G}, ${ee}, ${ue}.schema)`)}}function B(j){const{gen:N,schemaEnv:T,validateName:A,ValidationError:z,opts:G}=j;T.$async?N.if((0,l._)`${m.default.errors} === 0`,()=>N.return(m.default.data),()=>N.throw((0,l._)`new ${z}(${m.default.vErrors})`)):(N.assign((0,l._)`${A}.errors`,m.default.vErrors),G.unevaluated&&x(j),N.return((0,l._)`${m.default.errors} === 0`))}function x({gen:j,evaluated:N,props:T,items:A}){T instanceof l.Name&&j.assign((0,l._)`${N}.props`,T),A instanceof l.Name&&j.assign((0,l._)`${N}.items`,A)}function de(j,N,T,A){const{gen:z,schema:G,data:ee,allErrors:ue,opts:se,self:ae}=j,{RULES:te}=ae;if(G.$ref&&(se.ignoreKeywordsWithRef||!(0,p.schemaHasRulesButRef)(G,te))){z.block(()=>U(j,"$ref",te.all.$ref.definition));return}se.jtd||Z(j,N),z.block(()=>{for(const oe of te.rules)be(oe);be(te.post)});function be(oe){(0,E.shouldUseGroup)(G,oe)&&(oe.type?(z.if((0,d.checkDataType)(oe.type,ee,se.strictNumbers)),fe(j,oe),N.length===1&&N[0]===oe.type&&T&&(z.else(),(0,d.reportTypeError)(j)),z.endIf()):fe(j,oe),ue||z.if((0,l._)`${m.default.errors} === ${A||0}`))}}function fe(j,N){const{gen:T,schema:A,opts:{useDefaults:z}}=j;z&&(0,b.assignDefaults)(j,N.type),T.block(()=>{for(const G of N.rules)(0,E.shouldUseRule)(A,G)&&U(j,G.keyword,G.definition,N.type)})}function Z(j,N){j.schemaEnv.meta||!j.opts.strictTypes||(ye(j,N),j.opts.allowUnionTypes||D(j,N),R(j,j.dataTypes))}function ye(j,N){if(N.length){if(!j.dataTypes.length){j.dataTypes=N;return}N.forEach(T=>{k(j.dataTypes,T)||P(j,`type "${T}" not allowed by context "${j.dataTypes.join(",")}"`)}),u(j,N)}}function D(j,N){N.length>1&&!(N.length===2&&N.includes("null"))&&P(j,"use allowUnionTypes to allow union type keyword")}function R(j,N){const T=j.self.RULES.all;for(const A in T){const z=T[A];if(typeof z=="object"&&(0,E.shouldUseRule)(j.schema,z)){const{type:G}=z.definition;G.length&&!G.some(ee=>I(N,ee))&&P(j,`missing type "${G.join(",")}" for keyword "${A}"`)}}}function I(j,N){return j.includes(N)||N==="number"&&j.includes("integer")}function k(j,N){return j.includes(N)||N==="integer"&&j.includes("number")}function u(j,N){const T=[];for(const A of j.dataTypes)k(N,A)?T.push(A):N.includes("integer")&&A==="number"&&T.push("integer");j.dataTypes=T}function P(j,N){const T=j.schemaEnv.baseId+j.errSchemaPath;N+=` at "${T}" (strictTypes)`,(0,p.checkStrictMode)(j,N,j.opts.strictTypes)}class q{constructor(N,T,A){if((0,i.validateKeywordUsage)(N,T,A),this.gen=N.gen,this.allErrors=N.allErrors,this.keyword=A,this.data=N.data,this.schema=N.schema[A],this.$data=T.$data&&N.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,p.schemaRefOrVal)(N,this.schema,A,this.$data),this.schemaType=T.schemaType,this.parentSchema=N.schema,this.params={},this.it=N,this.def=T,this.$data)this.schemaCode=N.gen.const("vSchema",W(this.$data,N));else if(this.schemaCode=this.schemaValue,!(0,i.validSchemaType)(this.schema,T.schemaType,T.allowUndefined))throw new Error(`${A} value must be ${JSON.stringify(T.schemaType)}`);("code"in T?T.trackErrors:T.errors!==!1)&&(this.errsCount=N.gen.const("_errs",m.default.errors))}result(N,T,A){this.failResult((0,l.not)(N),T,A)}failResult(N,T,A){this.gen.if(N),A?A():this.error(),T?(this.gen.else(),T(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(N,T){this.failResult((0,l.not)(N),void 0,T)}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:T}=this;this.fail((0,l._)`${T} !== undefined && (${(0,l.or)(this.invalid$data(),N)})`)}error(N,T,A){if(T){this.setParams(T),this._error(N,A),this.setParams({});return}this._error(N,A)}_error(N,T){(N?S.reportExtraError:S.reportError)(this,this.def.error,T)}$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,T){T?Object.assign(this.params,N):this.params=N}block$data(N,T,A=l.nil){this.gen.block(()=>{this.check$data(N,A),T()})}check$data(N=l.nil,T=l.nil){if(!this.$data)return;const{gen:A,schemaCode:z,schemaType:G,def:ee}=this;A.if((0,l.or)((0,l._)`${z} === undefined`,T)),N!==l.nil&&A.assign(N,!0),(G.length||ee.validateSchema)&&(A.elseIf(this.invalid$data()),this.$dataError(),N!==l.nil&&A.assign(N,!1)),A.else()}invalid$data(){const{gen:N,schemaCode:T,schemaType:A,def:z,it:G}=this;return(0,l.or)(ee(),ue());function ee(){if(A.length){if(!(T instanceof l.Name))throw new Error("ajv implementation error");const se=Array.isArray(A)?A:[A];return(0,l._)`${(0,d.checkDataTypes)(se,T,G.opts.strictNumbers,d.DataType.Wrong)}`}return l.nil}function ue(){if(z.validateSchema){const se=N.scopeValue("validate$data",{ref:z.validateSchema});return(0,l._)`!${se}(${T})`}return l.nil}}subschema(N,T){const A=(0,h.getSubschema)(this.it,N);(0,h.extendSubschemaData)(A,this.it,N),(0,h.extendSubschemaMode)(A,N);const z={...this.it,...A,items:void 0,props:void 0};return a(z,T),z}mergeEvaluated(N,T){const{it:A,gen:z}=this;A.opts.unevaluated&&(A.props!==!0&&N.props!==void 0&&(A.props=p.mergeEvaluated.props(z,N.props,A.props,T)),A.items!==!0&&N.items!==void 0&&(A.items=p.mergeEvaluated.items(z,N.items,A.items,T)))}mergeValidEvaluated(N,T){const{it:A,gen:z}=this;if(A.opts.unevaluated&&(A.props!==!0||A.items!==!0))return z.if(T,()=>this.mergeEvaluated(N,l.Name)),!0}}he.KeywordCxt=q;function U(j,N,T,A){const z=new q(j,T,N);"code"in T?T.code(z,A):z.$data&&T.validate?(0,i.funcKeywordCode)(z,T):"macro"in T?(0,i.macroKeywordCode)(z,T):(T.compile||T.validate)&&(0,i.funcKeywordCode)(z,T)}const F=/^\/(?:[^~]|~0|~1)*$/,X=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function W(j,{dataLevel:N,dataNames:T,dataPathArr:A}){let z,G;if(j==="")return m.default.rootData;if(j[0]==="/"){if(!F.test(j))throw new Error(`Invalid JSON-pointer: ${j}`);z=j,G=m.default.rootData}else{const ae=X.exec(j);if(!ae)throw new Error(`Invalid JSON-pointer: ${j}`);const te=+ae[1];if(z=ae[2],z==="#"){if(te>=N)throw new Error(se("property/index",te));return A[N-te]}if(te>N)throw new Error(se("data",te));if(G=T[N-te],!z)return G}let ee=G;const ue=z.split("/");for(const ae of ue)ae&&(G=(0,l._)`${G}${(0,l.getProperty)((0,p.unescapeJsonPointer)(ae))}`,ee=(0,l._)`${ee} && ${G}`);return ee;function se(ae,te){return`Cannot access ${ae} ${te} levels up, current level is ${N}`}}return he.getData=W,he}var Ie={},fr;function Vt(){if(fr)return Ie;fr=1,Object.defineProperty(Ie,"__esModule",{value:!0});class e extends Error{constructor(E){super("validation failed"),this.errors=E,this.ajv=this.validation=!0}}return Ie.default=e,Ie}var Ce={},hr;function bt(){if(hr)return Ce;hr=1,Object.defineProperty(Ce,"__esModule",{value:!0});const e=$t();class r extends Error{constructor(d,b,i,h){super(h||`can't resolve reference ${i} from id ${b}`),this.missingRef=(0,e.resolveUrl)(d,b,i),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(d,this.missingRef))}}return Ce.default=r,Ce}var ie={},pr;function Ut(){if(pr)return ie;pr=1,Object.defineProperty(ie,"__esModule",{value:!0}),ie.resolveSchema=ie.getCompilingSchema=ie.resolveRef=ie.compileSchema=ie.SchemaEnv=void 0;const e=J(),r=Vt(),E=ve(),d=$t(),b=Q(),i=wt();class h{constructor(o){var t;this.refs={},this.dynamicAnchors={};let a;typeof o.schema=="object"&&(a=o.schema),this.schema=o.schema,this.schemaId=o.schemaId,this.root=o.root||this,this.baseId=(t=o.baseId)!==null&&t!==void 0?t:(0,d.normalizeId)(a?.[o.schemaId||"$id"]),this.schemaPath=o.schemaPath,this.localRefs=o.localRefs,this.meta=o.meta,this.$async=a?.$async,this.refs={}}}ie.SchemaEnv=h;function l(s){const o=p.call(this,s);if(o)return o;const t=(0,d.getFullPath)(this.opts.uriResolver,s.root.baseId),{es5:a,lines:y}=this.opts.code,{ownProperties:n}=this.opts,c=new e.CodeGen(this.scope,{es5:a,lines:y,ownProperties:n});let w;s.$async&&(w=c.scopeValue("Error",{ref:r.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const O=c.scopeName("validate");s.validateName=O;const C={gen:c,allErrors:this.opts.allErrors,data:E.default.data,parentData:E.default.parentData,parentDataProperty:E.default.parentDataProperty,dataNames:[E.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:c.scopeValue("schema",this.opts.code.source===!0?{ref:s.schema,code:(0,e.stringify)(s.schema)}:{ref:s.schema}),validateName:O,ValidationError:w,schema:s.schema,schemaEnv:s,rootId:t,baseId:s.baseId||t,schemaPath:e.nil,errSchemaPath:s.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let M;try{this._compilations.add(s),(0,i.validateFunctionCode)(C),c.optimize(this.opts.code.optimize);const V=c.toString();M=`${c.scopeRefs(E.default.scope)}return ${V}`,this.opts.code.process&&(M=this.opts.code.process(M,s));const K=new Function(`${E.default.self}`,`${E.default.scope}`,M)(this,this.scope.get());if(this.scope.value(O,{ref:K}),K.errors=null,K.schema=s.schema,K.schemaEnv=s,s.$async&&(K.$async=!0),this.opts.code.source===!0&&(K.source={validateName:O,validateCode:V,scopeValues:c._values}),this.opts.unevaluated){const{props:B,items:x}=C;K.evaluated={props:B instanceof e.Name?void 0:B,items:x instanceof e.Name?void 0:x,dynamicProps:B instanceof e.Name,dynamicItems:x instanceof e.Name},K.source&&(K.source.evaluated=(0,e.stringify)(K.evaluated))}return s.validate=K,s}catch(V){throw delete s.validate,delete s.validateName,M&&this.logger.error("Error compiling schema, function code:",M),V}finally{this._compilations.delete(s)}}ie.compileSchema=l;function m(s,o,t){var a;t=(0,d.resolveUrl)(this.opts.uriResolver,o,t);const y=s.refs[t];if(y)return y;let n=g.call(this,s,t);if(n===void 0){const c=(a=s.localRefs)===null||a===void 0?void 0:a[t],{schemaId:w}=this.opts;c&&(n=new h({schema:c,schemaId:w,root:s,baseId:o}))}if(n!==void 0)return s.refs[t]=$.call(this,n)}ie.resolveRef=m;function $(s){return(0,d.inlineRef)(s.schema,this.opts.inlineRefs)?s.schema:s.validate?s:l.call(this,s)}function p(s){for(const o of this._compilations)if(S(o,s))return o}ie.getCompilingSchema=p;function S(s,o){return s.schema===o.schema&&s.root===o.root&&s.baseId===o.baseId}function g(s,o){let t;for(;typeof(t=this.refs[o])=="string";)o=t;return t||this.schemas[o]||v.call(this,s,o)}function v(s,o){const t=this.opts.uriResolver.parse(o),a=(0,d._getFullPath)(this.opts.uriResolver,t);let y=(0,d.getFullPath)(this.opts.uriResolver,s.baseId,void 0);if(Object.keys(s.schema).length>0&&a===y)return _.call(this,t,s);const n=(0,d.normalizeId)(a),c=this.refs[n]||this.schemas[n];if(typeof c=="string"){const w=v.call(this,s,c);return typeof w?.schema!="object"?void 0:_.call(this,t,w)}if(typeof c?.schema=="object"){if(c.validate||l.call(this,c),n===(0,d.normalizeId)(o)){const{schema:w}=c,{schemaId:O}=this.opts,C=w[O];return C&&(y=(0,d.resolveUrl)(this.opts.uriResolver,y,C)),new h({schema:w,schemaId:O,root:s,baseId:y})}return _.call(this,t,c)}}ie.resolveSchema=v;const f=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function _(s,{baseId:o,schema:t,root:a}){var y;if(((y=s.fragment)===null||y===void 0?void 0:y[0])!=="/")return;for(const w of s.fragment.slice(1).split("/")){if(typeof t=="boolean")return;const O=t[(0,b.unescapeFragment)(w)];if(O===void 0)return;t=O;const C=typeof t=="object"&&t[this.opts.schemaId];!f.has(w)&&C&&(o=(0,d.resolveUrl)(this.opts.uriResolver,o,C))}let n;if(typeof t!="boolean"&&t.$ref&&!(0,b.schemaHasRulesButRef)(t,this.RULES)){const w=(0,d.resolveUrl)(this.opts.uriResolver,o,t.$ref);n=v.call(this,a,w)}const{schemaId:c}=this.opts;if(n=n||new h({schema:t,schemaId:c,root:a,baseId:o}),n.schema!==n.root.schema)return n}return ie}const Rn="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Nn="Meta-schema for $data reference (JSON AnySchema extension proposal)",On="object",kn=["$data"],qn={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Tn=!1,In={$id:Rn,description:Nn,type:On,required:kn,properties:qn,additionalProperties:Tn};var De={},Ne={exports:{}},Ct,mr;function hn(){if(mr)return Ct;mr=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),r=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 E(g){let v="",f=0,_=0;for(_=0;_<g.length;_++)if(f=g[_].charCodeAt(0),f!==48){if(!(f>=48&&f<=57||f>=65&&f<=70||f>=97&&f<=102))return"";v+=g[_];break}for(_+=1;_<g.length;_++){if(f=g[_].charCodeAt(0),!(f>=48&&f<=57||f>=65&&f<=70||f>=97&&f<=102))return"";v+=g[_]}return v}const d=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function b(g){return g.length=0,!0}function i(g,v,f){if(g.length){const _=E(g);if(_!=="")v.push(_);else return f.error=!0,!1;g.length=0}return!0}function h(g){let v=0;const f={error:!1,address:"",zone:""},_=[],s=[];let o=!1,t=!1,a=i;for(let y=0;y<g.length;y++){const n=g[y];if(!(n==="["||n==="]"))if(n===":"){if(o===!0&&(t=!0),!a(s,_,f))break;if(++v>7){f.error=!0;break}y>0&&g[y-1]===":"&&(o=!0),_.push(":");continue}else if(n==="%"){if(!a(s,_,f))break;a=b}else{s.push(n);continue}}return s.length&&(a===b?f.zone=s.join(""):t?_.push(s.join("")):_.push(E(s))),f.address=_.join(""),f}function l(g){if(m(g,":")<2)return{host:g,isIPV6:!1};const v=h(g);if(v.error)return{host:g,isIPV6:!1};{let f=v.address,_=v.address;return v.zone&&(f+="%"+v.zone,_+="%25"+v.zone),{host:f,isIPV6:!0,escapedHost:_}}}function m(g,v){let f=0;for(let _=0;_<g.length;_++)g[_]===v&&f++;return f}function $(g){let v=g;const f=[];let _=-1,s=0;for(;s=v.length;){if(s===1){if(v===".")break;if(v==="/"){f.push("/");break}else{f.push(v);break}}else if(s===2){if(v[0]==="."){if(v[1]===".")break;if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&(v[1]==="."||v[1]==="/")){f.push("/");break}}else if(s===3&&v==="/.."){f.length!==0&&f.pop(),f.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),f.length!==0&&f.pop();continue}}if((_=v.indexOf("/",1))===-1){f.push(v);break}else f.push(v.slice(0,_)),v=v.slice(_)}return f.join("")}function p(g,v){const f=v!==!0?escape:unescape;return g.scheme!==void 0&&(g.scheme=f(g.scheme)),g.userinfo!==void 0&&(g.userinfo=f(g.userinfo)),g.host!==void 0&&(g.host=f(g.host)),g.path!==void 0&&(g.path=f(g.path)),g.query!==void 0&&(g.query=f(g.query)),g.fragment!==void 0&&(g.fragment=f(g.fragment)),g}function S(g){const v=[];if(g.userinfo!==void 0&&(v.push(g.userinfo),v.push("@")),g.host!==void 0){let f=unescape(g.host);if(!r(f)){const _=l(f);_.isIPV6===!0?f=`[${_.escapedHost}]`:f=g.host}v.push(f)}return(typeof g.port=="number"||typeof g.port=="string")&&(v.push(":"),v.push(String(g.port))),v.length?v.join(""):void 0}return Ct={nonSimpleDomain:d,recomposeAuthority:S,normalizeComponentEncoding:p,removeDotSegments:$,isIPv4:r,isUUID:e,normalizeIPv6:l,stringArrayToHexStripped:E},Ct}var Dt,yr;function Cn(){if(yr)return Dt;yr=1;const{isUUID:e}=hn(),r=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,E=["http","https","ws","wss","urn","urn:uuid"];function d(n){return E.indexOf(n)!==-1}function b(n){return n.secure===!0?!0:n.secure===!1?!1:n.scheme?n.scheme.length===3&&(n.scheme[0]==="w"||n.scheme[0]==="W")&&(n.scheme[1]==="s"||n.scheme[1]==="S")&&(n.scheme[2]==="s"||n.scheme[2]==="S"):!1}function i(n){return n.host||(n.error=n.error||"HTTP URIs must have a host."),n}function h(n){const c=String(n.scheme).toLowerCase()==="https";return(n.port===(c?443:80)||n.port==="")&&(n.port=void 0),n.path||(n.path="/"),n}function l(n){return n.secure=b(n),n.resourceName=(n.path||"/")+(n.query?"?"+n.query:""),n.path=void 0,n.query=void 0,n}function m(n){if((n.port===(b(n)?443:80)||n.port==="")&&(n.port=void 0),typeof n.secure=="boolean"&&(n.scheme=n.secure?"wss":"ws",n.secure=void 0),n.resourceName){const[c,w]=n.resourceName.split("?");n.path=c&&c!=="/"?c:void 0,n.query=w,n.resourceName=void 0}return n.fragment=void 0,n}function $(n,c){if(!n.path)return n.error="URN can not be parsed",n;const w=n.path.match(r);if(w){const O=c.scheme||n.scheme||"urn";n.nid=w[1].toLowerCase(),n.nss=w[2];const C=`${O}:${c.nid||n.nid}`,M=y(C);n.path=void 0,M&&(n=M.parse(n,c))}else n.error=n.error||"URN can not be parsed.";return n}function p(n,c){if(n.nid===void 0)throw new Error("URN without nid cannot be serialized");const w=c.scheme||n.scheme||"urn",O=n.nid.toLowerCase(),C=`${w}:${c.nid||O}`,M=y(C);M&&(n=M.serialize(n,c));const V=n,L=n.nss;return V.path=`${O||c.nid}:${L}`,c.skipEscape=!0,V}function S(n,c){const w=n;return w.uuid=w.nss,w.nss=void 0,!c.tolerant&&(!w.uuid||!e(w.uuid))&&(w.error=w.error||"UUID is not valid."),w}function g(n){const c=n;return c.nss=(n.uuid||"").toLowerCase(),c}const v={scheme:"http",domainHost:!0,parse:i,serialize:h},f={scheme:"https",domainHost:v.domainHost,parse:i,serialize:h},_={scheme:"ws",domainHost:!0,parse:l,serialize:m},s={scheme:"wss",domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},a={http:v,https:f,ws:_,wss:s,urn:{scheme:"urn",parse:$,serialize:p,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:S,serialize:g,skipNormalize:!0}};Object.setPrototypeOf(a,null);function y(n){return n&&(a[n]||a[n.toLowerCase()])||void 0}return Dt={wsIsSecure:b,SCHEMES:a,isValidSchemeName:d,getSchemeHandler:y},Dt}var gr;function Dn(){if(gr)return Ne.exports;gr=1;const{normalizeIPv6:e,removeDotSegments:r,recomposeAuthority:E,normalizeComponentEncoding:d,isIPv4:b,nonSimpleDomain:i}=hn(),{SCHEMES:h,getSchemeHandler:l}=Cn();function m(s,o){return typeof s=="string"?s=g(f(s,o),o):typeof s=="object"&&(s=f(g(s,o),o)),s}function $(s,o,t){const a=t?Object.assign({scheme:"null"},t):{scheme:"null"},y=p(f(s,a),f(o,a),a,!0);return a.skipEscape=!0,g(y,a)}function p(s,o,t,a){const y={};return a||(s=f(g(s,t),t),o=f(g(o,t),t)),t=t||{},!t.tolerant&&o.scheme?(y.scheme=o.scheme,y.userinfo=o.userinfo,y.host=o.host,y.port=o.port,y.path=r(o.path||""),y.query=o.query):(o.userinfo!==void 0||o.host!==void 0||o.port!==void 0?(y.userinfo=o.userinfo,y.host=o.host,y.port=o.port,y.path=r(o.path||""),y.query=o.query):(o.path?(o.path[0]==="/"?y.path=r(o.path):((s.userinfo!==void 0||s.host!==void 0||s.port!==void 0)&&!s.path?y.path="/"+o.path:s.path?y.path=s.path.slice(0,s.path.lastIndexOf("/")+1)+o.path:y.path=o.path,y.path=r(y.path)),y.query=o.query):(y.path=s.path,o.query!==void 0?y.query=o.query:y.query=s.query),y.userinfo=s.userinfo,y.host=s.host,y.port=s.port),y.scheme=s.scheme),y.fragment=o.fragment,y}function S(s,o,t){return typeof s=="string"?(s=unescape(s),s=g(d(f(s,t),!0),{...t,skipEscape:!0})):typeof s=="object"&&(s=g(d(s,!0),{...t,skipEscape:!0})),typeof o=="string"?(o=unescape(o),o=g(d(f(o,t),!0),{...t,skipEscape:!0})):typeof o=="object"&&(o=g(d(o,!0),{...t,skipEscape:!0})),s.toLowerCase()===o.toLowerCase()}function g(s,o){const t={host:s.host,scheme:s.scheme,userinfo:s.userinfo,port:s.port,path:s.path,query:s.query,nid:s.nid,nss:s.nss,uuid:s.uuid,fragment:s.fragment,reference:s.reference,resourceName:s.resourceName,secure:s.secure,error:""},a=Object.assign({},o),y=[],n=l(a.scheme||t.scheme);n&&n.serialize&&n.serialize(t,a),t.path!==void 0&&(a.skipEscape?t.path=unescape(t.path):(t.path=escape(t.path),t.scheme!==void 0&&(t.path=t.path.split("%3A").join(":")))),a.reference!=="suffix"&&t.scheme&&y.push(t.scheme,":");const c=E(t);if(c!==void 0&&(a.reference!=="suffix"&&y.push("//"),y.push(c),t.path&&t.path[0]!=="/"&&y.push("/")),t.path!==void 0){let w=t.path;!a.absolutePath&&(!n||!n.absolutePath)&&(w=r(w)),c===void 0&&w[0]==="/"&&w[1]==="/"&&(w="/%2F"+w.slice(2)),y.push(w)}return t.query!==void 0&&y.push("?",t.query),t.fragment!==void 0&&y.push("#",t.fragment),y.join("")}const v=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function f(s,o){const t=Object.assign({},o),a={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let y=!1;t.reference==="suffix"&&(t.scheme?s=t.scheme+":"+s:s="//"+s);const n=s.match(v);if(n){if(a.scheme=n[1],a.userinfo=n[3],a.host=n[4],a.port=parseInt(n[5],10),a.path=n[6]||"",a.query=n[7],a.fragment=n[8],isNaN(a.port)&&(a.port=n[5]),a.host)if(b(a.host)===!1){const O=e(a.host);a.host=O.host.toLowerCase(),y=O.isIPV6}else y=!0;a.scheme===void 0&&a.userinfo===void 0&&a.host===void 0&&a.port===void 0&&a.query===void 0&&!a.path?a.reference="same-document":a.scheme===void 0?a.reference="relative":a.fragment===void 0?a.reference="absolute":a.reference="uri",t.reference&&t.reference!=="suffix"&&t.reference!==a.reference&&(a.error=a.error||"URI is not a "+t.reference+" reference.");const c=l(t.scheme||a.scheme);if(!t.unicodeSupport&&(!c||!c.unicodeSupport)&&a.host&&(t.domainHost||c&&c.domainHost)&&y===!1&&i(a.host))try{a.host=URL.domainToASCII(a.host.toLowerCase())}catch(w){a.error=a.error||"Host's domain name can not be converted to ASCII: "+w}(!c||c&&!c.skipNormalize)&&(s.indexOf("%")!==-1&&(a.scheme!==void 0&&(a.scheme=unescape(a.scheme)),a.host!==void 0&&(a.host=unescape(a.host))),a.path&&(a.path=escape(unescape(a.path))),a.fragment&&(a.fragment=encodeURI(decodeURIComponent(a.fragment)))),c&&c.parse&&c.parse(a,t)}else a.error=a.error||"URI can not be parsed.";return a}const _={SCHEMES:h,normalize:m,resolve:$,resolveComponent:p,equal:S,serialize:g,parse:f};return Ne.exports=_,Ne.exports.default=_,Ne.exports.fastUri=_,Ne.exports}var vr;function An(){if(vr)return De;vr=1,Object.defineProperty(De,"__esModule",{value:!0});const e=Dn();return e.code='require("ajv/dist/runtime/uri").default',De.default=e,De}var _r;function Mn(){return _r||(_r=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 r=wt();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return r.KeywordCxt}});var E=J();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return E._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return E.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return E.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return E.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return E.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return E.CodeGen}});const d=Vt(),b=bt(),i=ln(),h=Ut(),l=J(),m=$t(),$=gt(),p=Q(),S=In,g=An(),v=(D,R)=>new RegExp(D,R);v.code="new RegExp";const f=["removeAdditional","useDefaults","coerceTypes"],_=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),s={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."},o={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},t=200;function a(D){var R,I,k,u,P,q,U,F,X,W,j,N,T,A,z,G,ee,ue,se,ae,te,be,oe,Pt,St;const je=D.strict,jt=(R=D.code)===null||R===void 0?void 0:R.optimize,Ft=jt===!0||jt===void 0?1:jt||0,Kt=(k=(I=D.code)===null||I===void 0?void 0:I.regExp)!==null&&k!==void 0?k:v,_n=(u=D.uriResolver)!==null&&u!==void 0?u:g.default;return{strictSchema:(q=(P=D.strictSchema)!==null&&P!==void 0?P:je)!==null&&q!==void 0?q:!0,strictNumbers:(F=(U=D.strictNumbers)!==null&&U!==void 0?U:je)!==null&&F!==void 0?F:!0,strictTypes:(W=(X=D.strictTypes)!==null&&X!==void 0?X:je)!==null&&W!==void 0?W:"log",strictTuples:(N=(j=D.strictTuples)!==null&&j!==void 0?j:je)!==null&&N!==void 0?N:"log",strictRequired:(A=(T=D.strictRequired)!==null&&T!==void 0?T:je)!==null&&A!==void 0?A:!1,code:D.code?{...D.code,optimize:Ft,regExp:Kt}:{optimize:Ft,regExp:Kt},loopRequired:(z=D.loopRequired)!==null&&z!==void 0?z:t,loopEnum:(G=D.loopEnum)!==null&&G!==void 0?G:t,meta:(ee=D.meta)!==null&&ee!==void 0?ee:!0,messages:(ue=D.messages)!==null&&ue!==void 0?ue:!0,inlineRefs:(se=D.inlineRefs)!==null&&se!==void 0?se:!0,schemaId:(ae=D.schemaId)!==null&&ae!==void 0?ae:"$id",addUsedSchema:(te=D.addUsedSchema)!==null&&te!==void 0?te:!0,validateSchema:(be=D.validateSchema)!==null&&be!==void 0?be:!0,validateFormats:(oe=D.validateFormats)!==null&&oe!==void 0?oe:!0,unicodeRegExp:(Pt=D.unicodeRegExp)!==null&&Pt!==void 0?Pt:!0,int32range:(St=D.int32range)!==null&&St!==void 0?St:!0,uriResolver:_n}}class y{constructor(R={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,R=this.opts={...R,...a(R)};const{es5:I,lines:k}=this.opts.code;this.scope=new l.ValueScope({scope:{},prefixes:_,es5:I,lines:k}),this.logger=L(R.logger);const u=R.validateFormats;R.validateFormats=!1,this.RULES=(0,i.getRules)(),n.call(this,s,R,"NOT SUPPORTED"),n.call(this,o,R,"DEPRECATED","warn"),this._metaOpts=M.call(this),R.formats&&O.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),R.keywords&&C.call(this,R.keywords),typeof R.meta=="object"&&this.addMetaSchema(R.meta),w.call(this),R.validateFormats=u}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:R,meta:I,schemaId:k}=this.opts;let u=S;k==="id"&&(u={...S},u.id=u.$id,delete u.$id),I&&R&&this.addMetaSchema(u,u[k],!1)}defaultMeta(){const{meta:R,schemaId:I}=this.opts;return this.opts.defaultMeta=typeof R=="object"?R[I]||R:void 0}validate(R,I){let k;if(typeof R=="string"){if(k=this.getSchema(R),!k)throw new Error(`no schema with key or ref "${R}"`)}else k=this.compile(R);const u=k(I);return"$async"in k||(this.errors=k.errors),u}compile(R,I){const k=this._addSchema(R,I);return k.validate||this._compileSchemaEnv(k)}compileAsync(R,I){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:k}=this.opts;return u.call(this,R,I);async function u(W,j){await P.call(this,W.$schema);const N=this._addSchema(W,j);return N.validate||q.call(this,N)}async function P(W){W&&!this.getSchema(W)&&await u.call(this,{$ref:W},!0)}async function q(W){try{return this._compileSchemaEnv(W)}catch(j){if(!(j instanceof b.default))throw j;return U.call(this,j),await F.call(this,j.missingSchema),q.call(this,W)}}function U({missingSchema:W,missingRef:j}){if(this.refs[W])throw new Error(`AnySchema ${W} is loaded but ${j} cannot be resolved`)}async function F(W){const j=await X.call(this,W);this.refs[W]||await P.call(this,j.$schema),this.refs[W]||this.addSchema(j,W,I)}async function X(W){const j=this._loading[W];if(j)return j;try{return await(this._loading[W]=k(W))}finally{delete this._loading[W]}}}addSchema(R,I,k,u=this.opts.validateSchema){if(Array.isArray(R)){for(const q of R)this.addSchema(q,void 0,k,u);return this}let P;if(typeof R=="object"){const{schemaId:q}=this.opts;if(P=R[q],P!==void 0&&typeof P!="string")throw new Error(`schema ${q} must be string`)}return I=(0,m.normalizeId)(I||P),this._checkUnique(I),this.schemas[I]=this._addSchema(R,k,I,u,!0),this}addMetaSchema(R,I,k=this.opts.validateSchema){return this.addSchema(R,I,!0,k),this}validateSchema(R,I){if(typeof R=="boolean")return!0;let k;if(k=R.$schema,k!==void 0&&typeof k!="string")throw new Error("$schema must be a string");if(k=k||this.opts.defaultMeta||this.defaultMeta(),!k)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const u=this.validate(k,R);if(!u&&I){const P="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(P);else throw new Error(P)}return u}getSchema(R){let I;for(;typeof(I=c.call(this,R))=="string";)R=I;if(I===void 0){const{schemaId:k}=this.opts,u=new h.SchemaEnv({schema:{},schemaId:k});if(I=h.resolveSchema.call(this,u,R),!I)return;this.refs[R]=I}return I.validate||this._compileSchemaEnv(I)}removeSchema(R){if(R instanceof RegExp)return this._removeAllSchemas(this.schemas,R),this._removeAllSchemas(this.refs,R),this;switch(typeof R){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const I=c.call(this,R);return typeof I=="object"&&this._cache.delete(I.schema),delete this.schemas[R],delete this.refs[R],this}case"object":{const I=R;this._cache.delete(I);let k=R[this.opts.schemaId];return k&&(k=(0,m.normalizeId)(k),delete this.schemas[k],delete this.refs[k]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(R){for(const I of R)this.addKeyword(I);return this}addKeyword(R,I){let k;if(typeof R=="string")k=R,typeof I=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),I.keyword=k);else if(typeof R=="object"&&I===void 0){if(I=R,k=I.keyword,Array.isArray(k)&&!k.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(B.call(this,k,I),!I)return(0,p.eachItem)(k,P=>x.call(this,P)),this;fe.call(this,I);const u={...I,type:(0,$.getJSONTypes)(I.type),schemaType:(0,$.getJSONTypes)(I.schemaType)};return(0,p.eachItem)(k,u.type.length===0?P=>x.call(this,P,u):P=>u.type.forEach(q=>x.call(this,P,u,q))),this}getKeyword(R){const I=this.RULES.all[R];return typeof I=="object"?I.definition:!!I}removeKeyword(R){const{RULES:I}=this;delete I.keywords[R],delete I.all[R];for(const k of I.rules){const u=k.rules.findIndex(P=>P.keyword===R);u>=0&&k.rules.splice(u,1)}return this}addFormat(R,I){return typeof I=="string"&&(I=new RegExp(I)),this.formats[R]=I,this}errorsText(R=this.errors,{separator:I=", ",dataVar:k="data"}={}){return!R||R.length===0?"No errors":R.map(u=>`${k}${u.instancePath} ${u.message}`).reduce((u,P)=>u+I+P)}$dataMetaSchema(R,I){const k=this.RULES.all;R=JSON.parse(JSON.stringify(R));for(const u of I){const P=u.split("/").slice(1);let q=R;for(const U of P)q=q[U];for(const U in k){const F=k[U];if(typeof F!="object")continue;const{$data:X}=F.definition,W=q[U];X&&W&&(q[U]=ye(W))}}return R}_removeAllSchemas(R,I){for(const k in R){const u=R[k];(!I||I.test(k))&&(typeof u=="string"?delete R[k]:u&&!u.meta&&(this._cache.delete(u.schema),delete R[k]))}}_addSchema(R,I,k,u=this.opts.validateSchema,P=this.opts.addUsedSchema){let q;const{schemaId:U}=this.opts;if(typeof R=="object")q=R[U];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof R!="boolean")throw new Error("schema must be object or boolean")}let F=this._cache.get(R);if(F!==void 0)return F;k=(0,m.normalizeId)(q||k);const X=m.getSchemaRefs.call(this,R,k);return F=new h.SchemaEnv({schema:R,schemaId:U,meta:I,baseId:k,localRefs:X}),this._cache.set(F.schema,F),P&&!k.startsWith("#")&&(k&&this._checkUnique(k),this.refs[k]=F),u&&this.validateSchema(R,!0),F}_checkUnique(R){if(this.schemas[R]||this.refs[R])throw new Error(`schema with key or id "${R}" already exists`)}_compileSchemaEnv(R){if(R.meta?this._compileMetaSchema(R):h.compileSchema.call(this,R),!R.validate)throw new Error("ajv implementation error");return R.validate}_compileMetaSchema(R){const I=this.opts;this.opts=this._metaOpts;try{h.compileSchema.call(this,R)}finally{this.opts=I}}}y.ValidationError=d.default,y.MissingRefError=b.default,e.default=y;function n(D,R,I,k="error"){for(const u in D){const P=u;P in R&&this.logger[k](`${I}: option ${u}. ${D[P]}`)}}function c(D){return D=(0,m.normalizeId)(D),this.schemas[D]||this.refs[D]}function w(){const D=this.opts.schemas;if(D)if(Array.isArray(D))this.addSchema(D);else for(const R in D)this.addSchema(D[R],R)}function O(){for(const D in this.opts.formats){const R=this.opts.formats[D];R&&this.addFormat(D,R)}}function C(D){if(Array.isArray(D)){this.addVocabulary(D);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const R in D){const I=D[R];I.keyword||(I.keyword=R),this.addKeyword(I)}}function M(){const D={...this.opts};for(const R of f)delete D[R];return D}const V={log(){},warn(){},error(){}};function L(D){if(D===!1)return V;if(D===void 0)return console;if(D.log&&D.warn&&D.error)return D;throw new Error("logger must implement log, warn and error methods")}const K=/^[a-z_$][a-z0-9_$:-]*$/i;function B(D,R){const{RULES:I}=this;if((0,p.eachItem)(D,k=>{if(I.keywords[k])throw new Error(`Keyword ${k} is already defined`);if(!K.test(k))throw new Error(`Keyword ${k} has invalid name`)}),!!R&&R.$data&&!("code"in R||"validate"in R))throw new Error('$data keyword must have "code" or "validate" function')}function x(D,R,I){var k;const u=R?.post;if(I&&u)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:P}=this;let q=u?P.post:P.rules.find(({type:F})=>F===I);if(q||(q={type:I,rules:[]},P.rules.push(q)),P.keywords[D]=!0,!R)return;const U={keyword:D,definition:{...R,type:(0,$.getJSONTypes)(R.type),schemaType:(0,$.getJSONTypes)(R.schemaType)}};R.before?de.call(this,q,U,R.before):q.rules.push(U),P.all[D]=U,(k=R.implements)===null||k===void 0||k.forEach(F=>this.addKeyword(F))}function de(D,R,I){const k=D.rules.findIndex(u=>u.keyword===I);k>=0?D.rules.splice(k,0,R):(D.rules.push(R),this.logger.warn(`rule ${I} is not defined`))}function fe(D){let{metaSchema:R}=D;R!==void 0&&(D.$data&&this.opts.$data&&(R=ye(R)),D.validateSchema=this.compile(R,!0))}const Z={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ye(D){return{anyOf:[D,Z]}}})(Rt)),Rt}var Ae={},Me={},Ve={},$r;function Vn(){if($r)return Ve;$r=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 ge={},wr;function Un(){if(wr)return ge;wr=1,Object.defineProperty(ge,"__esModule",{value:!0}),ge.callRef=ge.getValidate=void 0;const e=bt(),r=le(),E=J(),d=ve(),b=Ut(),i=Q(),h={keyword:"$ref",schemaType:"string",code($){const{gen:p,schema:S,it:g}=$,{baseId:v,schemaEnv:f,validateName:_,opts:s,self:o}=g,{root:t}=f;if((S==="#"||S==="#/")&&v===t.baseId)return y();const a=b.resolveRef.call(o,t,v,S);if(a===void 0)throw new e.default(g.opts.uriResolver,v,S);if(a instanceof b.SchemaEnv)return n(a);return c(a);function y(){if(f===t)return m($,_,f,f.$async);const w=p.scopeValue("root",{ref:t});return m($,(0,E._)`${w}.validate`,t,t.$async)}function n(w){const O=l($,w);m($,O,w,w.$async)}function c(w){const O=p.scopeValue("schema",s.code.source===!0?{ref:w,code:(0,E.stringify)(w)}:{ref:w}),C=p.name("valid"),M=$.subschema({schema:w,dataTypes:[],schemaPath:E.nil,topSchemaRef:O,errSchemaPath:S},C);$.mergeEvaluated(M),$.ok(C)}}};function l($,p){const{gen:S}=$;return p.validate?S.scopeValue("validate",{ref:p.validate}):(0,E._)`${S.scopeValue("wrapper",{ref:p})}.validate`}ge.getValidate=l;function m($,p,S,g){const{gen:v,it:f}=$,{allErrors:_,schemaEnv:s,opts:o}=f,t=o.passContext?d.default.this:E.nil;g?a():y();function a(){if(!s.$async)throw new Error("async schema referenced by sync schema");const w=v.let("valid");v.try(()=>{v.code((0,E._)`await ${(0,r.callValidateCode)($,p,t)}`),c(p),_||v.assign(w,!0)},O=>{v.if((0,E._)`!(${O} instanceof ${f.ValidationError})`,()=>v.throw(O)),n(O),_||v.assign(w,!1)}),$.ok(w)}function y(){$.result((0,r.callValidateCode)($,p,t),()=>c(p),()=>n(p))}function n(w){const O=(0,E._)`${w}.errors`;v.assign(d.default.vErrors,(0,E._)`${d.default.vErrors} === null ? ${O} : ${d.default.vErrors}.concat(${O})`),v.assign(d.default.errors,(0,E._)`${d.default.vErrors}.length`)}function c(w){var O;if(!f.opts.unevaluated)return;const C=(O=S?.validate)===null||O===void 0?void 0:O.evaluated;if(f.props!==!0)if(C&&!C.dynamicProps)C.props!==void 0&&(f.props=i.mergeEvaluated.props(v,C.props,f.props));else{const M=v.var("props",(0,E._)`${w}.evaluated.props`);f.props=i.mergeEvaluated.props(v,M,f.props,E.Name)}if(f.items!==!0)if(C&&!C.dynamicItems)C.items!==void 0&&(f.items=i.mergeEvaluated.items(v,C.items,f.items));else{const M=v.var("items",(0,E._)`${w}.evaluated.items`);f.items=i.mergeEvaluated.items(v,M,f.items,E.Name)}}}return ge.callRef=m,ge.default=h,ge}var br;function zn(){if(br)return Me;br=1,Object.defineProperty(Me,"__esModule",{value:!0});const e=Vn(),r=Un(),E=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,r.default];return Me.default=E,Me}var Ue={},ze={},Er;function Fn(){if(Er)return ze;Er=1,Object.defineProperty(ze,"__esModule",{value:!0});const e=J(),r=e.operators,E={maximum:{okStr:"<=",ok:r.LTE,fail:r.GT},minimum:{okStr:">=",ok:r.GTE,fail:r.LT},exclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},exclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},d={message:({keyword:i,schemaCode:h})=>(0,e.str)`must be ${E[i].okStr} ${h}`,params:({keyword:i,schemaCode:h})=>(0,e._)`{comparison: ${E[i].okStr}, limit: ${h}}`},b={keyword:Object.keys(E),type:"number",schemaType:"number",$data:!0,error:d,code(i){const{keyword:h,data:l,schemaCode:m}=i;i.fail$data((0,e._)`${l} ${E[h].fail} ${m} || isNaN(${l})`)}};return ze.default=b,ze}var Fe={},Pr;function Kn(){if(Pr)return Fe;Pr=1,Object.defineProperty(Fe,"__esModule",{value:!0});const e=J(),E={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:d})=>(0,e.str)`must be multiple of ${d}`,params:({schemaCode:d})=>(0,e._)`{multipleOf: ${d}}`},code(d){const{gen:b,data:i,schemaCode:h,it:l}=d,m=l.opts.multipleOfPrecision,$=b.let("res"),p=m?(0,e._)`Math.abs(Math.round(${$}) - ${$}) > 1e-${m}`:(0,e._)`${$} !== parseInt(${$})`;d.fail$data((0,e._)`(${h} === 0 || (${$} = ${i}/${h}, ${p}))`)}};return Fe.default=E,Fe}var Ke={},Le={},Sr;function Ln(){if(Sr)return Le;Sr=1,Object.defineProperty(Le,"__esModule",{value:!0});function e(r){const E=r.length;let d=0,b=0,i;for(;b<E;)d++,i=r.charCodeAt(b++),i>=55296&&i<=56319&&b<E&&(i=r.charCodeAt(b),(i&64512)===56320&&b++);return d}return Le.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Le}var jr;function Hn(){if(jr)return Ke;jr=1,Object.defineProperty(Ke,"__esModule",{value:!0});const e=J(),r=Q(),E=Ln(),b={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:h}){const l=i==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${l} than ${h} characters`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:h,data:l,schemaCode:m,it:$}=i,p=h==="maxLength"?e.operators.GT:e.operators.LT,S=$.opts.unicode===!1?(0,e._)`${l}.length`:(0,e._)`${(0,r.useFunc)(i.gen,E.default)}(${l})`;i.fail$data((0,e._)`${S} ${p} ${m}`)}};return Ke.default=b,Ke}var He={},Rr;function Gn(){if(Rr)return He;Rr=1,Object.defineProperty(He,"__esModule",{value:!0});const e=le(),r=J(),d={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:b})=>(0,r.str)`must match pattern "${b}"`,params:({schemaCode:b})=>(0,r._)`{pattern: ${b}}`},code(b){const{data:i,$data:h,schema:l,schemaCode:m,it:$}=b,p=$.opts.unicodeRegExp?"u":"",S=h?(0,r._)`(new RegExp(${m}, ${p}))`:(0,e.usePattern)(b,l);b.fail$data((0,r._)`!${S}.test(${i})`)}};return He.default=d,He}var Ge={},Nr;function Jn(){if(Nr)return Ge;Nr=1,Object.defineProperty(Ge,"__esModule",{value:!0});const e=J(),E={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:d,schemaCode:b}){const i=d==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${b} properties`},params:({schemaCode:d})=>(0,e._)`{limit: ${d}}`},code(d){const{keyword:b,data:i,schemaCode:h}=d,l=b==="maxProperties"?e.operators.GT:e.operators.LT;d.fail$data((0,e._)`Object.keys(${i}).length ${l} ${h}`)}};return Ge.default=E,Ge}var Je={},Or;function Wn(){if(Or)return Je;Or=1,Object.defineProperty(Je,"__esModule",{value:!0});const e=le(),r=J(),E=Q(),b={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:i}})=>(0,r.str)`must have required property '${i}'`,params:({params:{missingProperty:i}})=>(0,r._)`{missingProperty: ${i}}`},code(i){const{gen:h,schema:l,schemaCode:m,data:$,$data:p,it:S}=i,{opts:g}=S;if(!p&&l.length===0)return;const v=l.length>=g.loopRequired;if(S.allErrors?f():_(),g.strictRequired){const t=i.parentSchema.properties,{definedProperties:a}=i.it;for(const y of l)if(t?.[y]===void 0&&!a.has(y)){const n=S.schemaEnv.baseId+S.errSchemaPath,c=`required property "${y}" is not defined at "${n}" (strictRequired)`;(0,E.checkStrictMode)(S,c,S.opts.strictRequired)}}function f(){if(v||p)i.block$data(r.nil,s);else for(const t of l)(0,e.checkReportMissingProp)(i,t)}function _(){const t=h.let("missing");if(v||p){const a=h.let("valid",!0);i.block$data(a,()=>o(t,a)),i.ok(a)}else h.if((0,e.checkMissingProp)(i,l,t)),(0,e.reportMissingProp)(i,t),h.else()}function s(){h.forOf("prop",m,t=>{i.setParams({missingProperty:t}),h.if((0,e.noPropertyInData)(h,$,t,g.ownProperties),()=>i.error())})}function o(t,a){i.setParams({missingProperty:t}),h.forOf(t,m,()=>{h.assign(a,(0,e.propertyInData)(h,$,t,g.ownProperties)),h.if((0,r.not)(a),()=>{i.error(),h.break()})},r.nil)}}};return Je.default=b,Je}var We={},kr;function Bn(){if(kr)return We;kr=1,Object.defineProperty(We,"__esModule",{value:!0});const e=J(),E={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:d,schemaCode:b}){const i=d==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${b} items`},params:({schemaCode:d})=>(0,e._)`{limit: ${d}}`},code(d){const{keyword:b,data:i,schemaCode:h}=d,l=b==="maxItems"?e.operators.GT:e.operators.LT;d.fail$data((0,e._)`${i}.length ${l} ${h}`)}};return We.default=E,We}var Be={},Qe={},qr;function zt(){if(qr)return Qe;qr=1,Object.defineProperty(Qe,"__esModule",{value:!0});const e=fn();return e.code='require("ajv/dist/runtime/equal").default',Qe.default=e,Qe}var Tr;function Qn(){if(Tr)return Be;Tr=1,Object.defineProperty(Be,"__esModule",{value:!0});const e=gt(),r=J(),E=Q(),d=zt(),i={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:h,j:l}})=>(0,r.str)`must NOT have duplicate items (items ## ${l} and ${h} are identical)`,params:({params:{i:h,j:l}})=>(0,r._)`{i: ${h}, j: ${l}}`},code(h){const{gen:l,data:m,$data:$,schema:p,parentSchema:S,schemaCode:g,it:v}=h;if(!$&&!p)return;const f=l.let("valid"),_=S.items?(0,e.getSchemaTypes)(S.items):[];h.block$data(f,s,(0,r._)`${g} === false`),h.ok(f);function s(){const y=l.let("i",(0,r._)`${m}.length`),n=l.let("j");h.setParams({i:y,j:n}),l.assign(f,!0),l.if((0,r._)`${y} > 1`,()=>(o()?t:a)(y,n))}function o(){return _.length>0&&!_.some(y=>y==="object"||y==="array")}function t(y,n){const c=l.name("item"),w=(0,e.checkDataTypes)(_,c,v.opts.strictNumbers,e.DataType.Wrong),O=l.const("indices",(0,r._)`{}`);l.for((0,r._)`;${y}--;`,()=>{l.let(c,(0,r._)`${m}[${y}]`),l.if(w,(0,r._)`continue`),_.length>1&&l.if((0,r._)`typeof ${c} == "string"`,(0,r._)`${c} += "_"`),l.if((0,r._)`typeof ${O}[${c}] == "number"`,()=>{l.assign(n,(0,r._)`${O}[${c}]`),h.error(),l.assign(f,!1).break()}).code((0,r._)`${O}[${c}] = ${y}`)})}function a(y,n){const c=(0,E.useFunc)(l,d.default),w=l.name("outer");l.label(w).for((0,r._)`;${y}--;`,()=>l.for((0,r._)`${n} = ${y}; ${n}--;`,()=>l.if((0,r._)`${c}(${m}[${y}], ${m}[${n}])`,()=>{h.error(),l.assign(f,!1).break(w)})))}}};return Be.default=i,Be}var Xe={},Ir;function Xn(){if(Ir)return Xe;Ir=1,Object.defineProperty(Xe,"__esModule",{value:!0});const e=J(),r=Q(),E=zt(),b={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:i})=>(0,e._)`{allowedValue: ${i}}`},code(i){const{gen:h,data:l,$data:m,schemaCode:$,schema:p}=i;m||p&&typeof p=="object"?i.fail$data((0,e._)`!${(0,r.useFunc)(h,E.default)}(${l}, ${$})`):i.fail((0,e._)`${p} !== ${l}`)}};return Xe.default=b,Xe}var Ye={},Cr;function Yn(){if(Cr)return Ye;Cr=1,Object.defineProperty(Ye,"__esModule",{value:!0});const e=J(),r=Q(),E=zt(),b={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:i})=>(0,e._)`{allowedValues: ${i}}`},code(i){const{gen:h,data:l,$data:m,schema:$,schemaCode:p,it:S}=i;if(!m&&$.length===0)throw new Error("enum must have non-empty array");const g=$.length>=S.opts.loopEnum;let v;const f=()=>v??(v=(0,r.useFunc)(h,E.default));let _;if(g||m)_=h.let("valid"),i.block$data(_,s);else{if(!Array.isArray($))throw new Error("ajv implementation error");const t=h.const("vSchema",p);_=(0,e.or)(...$.map((a,y)=>o(t,y)))}i.pass(_);function s(){h.assign(_,!1),h.forOf("v",p,t=>h.if((0,e._)`${f()}(${l}, ${t})`,()=>h.assign(_,!0).break()))}function o(t,a){const y=$[a];return typeof y=="object"&&y!==null?(0,e._)`${f()}(${l}, ${t}[${a}])`:(0,e._)`${l} === ${y}`}}};return Ye.default=b,Ye}var Dr;function Zn(){if(Dr)return Ue;Dr=1,Object.defineProperty(Ue,"__esModule",{value:!0});const e=Fn(),r=Kn(),E=Hn(),d=Gn(),b=Jn(),i=Wn(),h=Bn(),l=Qn(),m=Xn(),$=Yn(),p=[e.default,r.default,E.default,d.default,b.default,i.default,h.default,l.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},m.default,$.default];return Ue.default=p,Ue}var Ze={},Ee={},Ar;function pn(){if(Ar)return Ee;Ar=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.validateAdditionalItems=void 0;const e=J(),r=Q(),d={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:i}})=>(0,e.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,e._)`{limit: ${i}}`},code(i){const{parentSchema:h,it:l}=i,{items:m}=h;if(!Array.isArray(m)){(0,r.checkStrictMode)(l,'"additionalItems" is ignored when "items" is not an array of schemas');return}b(i,m)}};function b(i,h){const{gen:l,schema:m,data:$,keyword:p,it:S}=i;S.items=!0;const g=l.const("len",(0,e._)`${$}.length`);if(m===!1)i.setParams({len:h.length}),i.pass((0,e._)`${g} <= ${h.length}`);else if(typeof m=="object"&&!(0,r.alwaysValidSchema)(S,m)){const f=l.var("valid",(0,e._)`${g} <= ${h.length}`);l.if((0,e.not)(f),()=>v(f)),i.ok(f)}function v(f){l.forRange("i",h.length,g,_=>{i.subschema({keyword:p,dataProp:_,dataPropType:r.Type.Num},f),S.allErrors||l.if((0,e.not)(f),()=>l.break())})}}return Ee.validateAdditionalItems=b,Ee.default=d,Ee}var xe={},Pe={},Mr;function mn(){if(Mr)return Pe;Mr=1,Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.validateTuple=void 0;const e=J(),r=Q(),E=le(),d={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(i){const{schema:h,it:l}=i;if(Array.isArray(h))return b(i,"additionalItems",h);l.items=!0,!(0,r.alwaysValidSchema)(l,h)&&i.ok((0,E.validateArray)(i))}};function b(i,h,l=i.schema){const{gen:m,parentSchema:$,data:p,keyword:S,it:g}=i;_($),g.opts.unevaluated&&l.length&&g.items!==!0&&(g.items=r.mergeEvaluated.items(m,l.length,g.items));const v=m.name("valid"),f=m.const("len",(0,e._)`${p}.length`);l.forEach((s,o)=>{(0,r.alwaysValidSchema)(g,s)||(m.if((0,e._)`${f} > ${o}`,()=>i.subschema({keyword:S,schemaProp:o,dataProp:o},v)),i.ok(v))});function _(s){const{opts:o,errSchemaPath:t}=g,a=l.length,y=a===s.minItems&&(a===s.maxItems||s[h]===!1);if(o.strictTuples&&!y){const n=`"${S}" is ${a}-tuple, but minItems or maxItems/${h} are not specified or different at path "${t}"`;(0,r.checkStrictMode)(g,n,o.strictTuples)}}}return Pe.validateTuple=b,Pe.default=d,Pe}var Vr;function xn(){if(Vr)return xe;Vr=1,Object.defineProperty(xe,"__esModule",{value:!0});const e=mn(),r={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:E=>(0,e.validateTuple)(E,"items")};return xe.default=r,xe}var et={},Ur;function es(){if(Ur)return et;Ur=1,Object.defineProperty(et,"__esModule",{value:!0});const e=J(),r=Q(),E=le(),d=pn(),i={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:h}})=>(0,e.str)`must NOT have more than ${h} items`,params:({params:{len:h}})=>(0,e._)`{limit: ${h}}`},code(h){const{schema:l,parentSchema:m,it:$}=h,{prefixItems:p}=m;$.items=!0,!(0,r.alwaysValidSchema)($,l)&&(p?(0,d.validateAdditionalItems)(h,p):h.ok((0,E.validateArray)(h)))}};return et.default=i,et}var tt={},zr;function ts(){if(zr)return tt;zr=1,Object.defineProperty(tt,"__esModule",{value:!0});const e=J(),r=Q(),d={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:b,max:i}})=>i===void 0?(0,e.str)`must contain at least ${b} valid item(s)`:(0,e.str)`must contain at least ${b} and no more than ${i} valid item(s)`,params:({params:{min:b,max:i}})=>i===void 0?(0,e._)`{minContains: ${b}}`:(0,e._)`{minContains: ${b}, maxContains: ${i}}`},code(b){const{gen:i,schema:h,parentSchema:l,data:m,it:$}=b;let p,S;const{minContains:g,maxContains:v}=l;$.opts.next?(p=g===void 0?1:g,S=v):p=1;const f=i.const("len",(0,e._)`${m}.length`);if(b.setParams({min:p,max:S}),S===void 0&&p===0){(0,r.checkStrictMode)($,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(S!==void 0&&p>S){(0,r.checkStrictMode)($,'"minContains" > "maxContains" is always invalid'),b.fail();return}if((0,r.alwaysValidSchema)($,h)){let a=(0,e._)`${f} >= ${p}`;S!==void 0&&(a=(0,e._)`${a} && ${f} <= ${S}`),b.pass(a);return}$.items=!0;const _=i.name("valid");S===void 0&&p===1?o(_,()=>i.if(_,()=>i.break())):p===0?(i.let(_,!0),S!==void 0&&i.if((0,e._)`${m}.length > 0`,s)):(i.let(_,!1),s()),b.result(_,()=>b.reset());function s(){const a=i.name("_valid"),y=i.let("count",0);o(a,()=>i.if(a,()=>t(y)))}function o(a,y){i.forRange("i",0,f,n=>{b.subschema({keyword:"contains",dataProp:n,dataPropType:r.Type.Num,compositeRule:!0},a),y()})}function t(a){i.code((0,e._)`${a}++`),S===void 0?i.if((0,e._)`${a} >= ${p}`,()=>i.assign(_,!0).break()):(i.if((0,e._)`${a} > ${S}`,()=>i.assign(_,!1).break()),p===1?i.assign(_,!0):i.if((0,e._)`${a} >= ${p}`,()=>i.assign(_,!0)))}}};return tt.default=d,tt}var At={},Fr;function rs(){return Fr||(Fr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const r=J(),E=Q(),d=le();e.error={message:({params:{property:m,depsCount:$,deps:p}})=>{const S=$===1?"property":"properties";return(0,r.str)`must have ${S} ${p} when property ${m} is present`},params:({params:{property:m,depsCount:$,deps:p,missingProperty:S}})=>(0,r._)`{property: ${m},
6
- missingProperty: ${S},
7
- depsCount: ${$},
8
- deps: ${p}}`};const b={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(m){const[$,p]=i(m);h(m,$),l(m,p)}};function i({schema:m}){const $={},p={};for(const S in m){if(S==="__proto__")continue;const g=Array.isArray(m[S])?$:p;g[S]=m[S]}return[$,p]}function h(m,$=m.schema){const{gen:p,data:S,it:g}=m;if(Object.keys($).length===0)return;const v=p.let("missing");for(const f in $){const _=$[f];if(_.length===0)continue;const s=(0,d.propertyInData)(p,S,f,g.opts.ownProperties);m.setParams({property:f,depsCount:_.length,deps:_.join(", ")}),g.allErrors?p.if(s,()=>{for(const o of _)(0,d.checkReportMissingProp)(m,o)}):(p.if((0,r._)`${s} && (${(0,d.checkMissingProp)(m,_,v)})`),(0,d.reportMissingProp)(m,v),p.else())}}e.validatePropertyDeps=h;function l(m,$=m.schema){const{gen:p,data:S,keyword:g,it:v}=m,f=p.name("valid");for(const _ in $)(0,E.alwaysValidSchema)(v,$[_])||(p.if((0,d.propertyInData)(p,S,_,v.opts.ownProperties),()=>{const s=m.subschema({keyword:g,schemaProp:_},f);m.mergeValidEvaluated(s,f)},()=>p.var(f,!0)),m.ok(f))}e.validateSchemaDeps=l,e.default=b})(At)),At}var rt={},Kr;function ns(){if(Kr)return rt;Kr=1,Object.defineProperty(rt,"__esModule",{value:!0});const e=J(),r=Q(),d={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:b})=>(0,e._)`{propertyName: ${b.propertyName}}`},code(b){const{gen:i,schema:h,data:l,it:m}=b;if((0,r.alwaysValidSchema)(m,h))return;const $=i.name("valid");i.forIn("key",l,p=>{b.setParams({propertyName:p}),b.subschema({keyword:"propertyNames",data:p,dataTypes:["string"],propertyName:p,compositeRule:!0},$),i.if((0,e.not)($),()=>{b.error(!0),m.allErrors||i.break()})}),b.ok($)}};return rt.default=d,rt}var nt={},Lr;function yn(){if(Lr)return nt;Lr=1,Object.defineProperty(nt,"__esModule",{value:!0});const e=le(),r=J(),E=ve(),d=Q(),i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:h})=>(0,r._)`{additionalProperty: ${h.additionalProperty}}`},code(h){const{gen:l,schema:m,parentSchema:$,data:p,errsCount:S,it:g}=h;if(!S)throw new Error("ajv implementation error");const{allErrors:v,opts:f}=g;if(g.props=!0,f.removeAdditional!=="all"&&(0,d.alwaysValidSchema)(g,m))return;const _=(0,e.allSchemaProperties)($.properties),s=(0,e.allSchemaProperties)($.patternProperties);o(),h.ok((0,r._)`${S} === ${E.default.errors}`);function o(){l.forIn("key",p,c=>{!_.length&&!s.length?y(c):l.if(t(c),()=>y(c))})}function t(c){let w;if(_.length>8){const O=(0,d.schemaRefOrVal)(g,$.properties,"properties");w=(0,e.isOwnProperty)(l,O,c)}else _.length?w=(0,r.or)(..._.map(O=>(0,r._)`${c} === ${O}`)):w=r.nil;return s.length&&(w=(0,r.or)(w,...s.map(O=>(0,r._)`${(0,e.usePattern)(h,O)}.test(${c})`))),(0,r.not)(w)}function a(c){l.code((0,r._)`delete ${p}[${c}]`)}function y(c){if(f.removeAdditional==="all"||f.removeAdditional&&m===!1){a(c);return}if(m===!1){h.setParams({additionalProperty:c}),h.error(),v||l.break();return}if(typeof m=="object"&&!(0,d.alwaysValidSchema)(g,m)){const w=l.name("valid");f.removeAdditional==="failing"?(n(c,w,!1),l.if((0,r.not)(w),()=>{h.reset(),a(c)})):(n(c,w),v||l.if((0,r.not)(w),()=>l.break()))}}function n(c,w,O){const C={keyword:"additionalProperties",dataProp:c,dataPropType:d.Type.Str};O===!1&&Object.assign(C,{compositeRule:!0,createErrors:!1,allErrors:!1}),h.subschema(C,w)}}};return nt.default=i,nt}var st={},Hr;function ss(){if(Hr)return st;Hr=1,Object.defineProperty(st,"__esModule",{value:!0});const e=wt(),r=le(),E=Q(),d=yn(),b={keyword:"properties",type:"object",schemaType:"object",code(i){const{gen:h,schema:l,parentSchema:m,data:$,it:p}=i;p.opts.removeAdditional==="all"&&m.additionalProperties===void 0&&d.default.code(new e.KeywordCxt(p,d.default,"additionalProperties"));const S=(0,r.allSchemaProperties)(l);for(const s of S)p.definedProperties.add(s);p.opts.unevaluated&&S.length&&p.props!==!0&&(p.props=E.mergeEvaluated.props(h,(0,E.toHash)(S),p.props));const g=S.filter(s=>!(0,E.alwaysValidSchema)(p,l[s]));if(g.length===0)return;const v=h.name("valid");for(const s of g)f(s)?_(s):(h.if((0,r.propertyInData)(h,$,s,p.opts.ownProperties)),_(s),p.allErrors||h.else().var(v,!0),h.endIf()),i.it.definedProperties.add(s),i.ok(v);function f(s){return p.opts.useDefaults&&!p.compositeRule&&l[s].default!==void 0}function _(s){i.subschema({keyword:"properties",schemaProp:s,dataProp:s},v)}}};return st.default=b,st}var at={},Gr;function as(){if(Gr)return at;Gr=1,Object.defineProperty(at,"__esModule",{value:!0});const e=le(),r=J(),E=Q(),d=Q(),b={keyword:"patternProperties",type:"object",schemaType:"object",code(i){const{gen:h,schema:l,data:m,parentSchema:$,it:p}=i,{opts:S}=p,g=(0,e.allSchemaProperties)(l),v=g.filter(y=>(0,E.alwaysValidSchema)(p,l[y]));if(g.length===0||v.length===g.length&&(!p.opts.unevaluated||p.props===!0))return;const f=S.strictSchema&&!S.allowMatchingProperties&&$.properties,_=h.name("valid");p.props!==!0&&!(p.props instanceof r.Name)&&(p.props=(0,d.evaluatedPropsToName)(h,p.props));const{props:s}=p;o();function o(){for(const y of g)f&&t(y),p.allErrors?a(y):(h.var(_,!0),a(y),h.if(_))}function t(y){for(const n in f)new RegExp(y).test(n)&&(0,E.checkStrictMode)(p,`property ${n} matches pattern ${y} (use allowMatchingProperties)`)}function a(y){h.forIn("key",m,n=>{h.if((0,r._)`${(0,e.usePattern)(i,y)}.test(${n})`,()=>{const c=v.includes(y);c||i.subschema({keyword:"patternProperties",schemaProp:y,dataProp:n,dataPropType:d.Type.Str},_),p.opts.unevaluated&&s!==!0?h.assign((0,r._)`${s}[${n}]`,!0):!c&&!p.allErrors&&h.if((0,r.not)(_),()=>h.break())})})}}};return at.default=b,at}var it={},Jr;function is(){if(Jr)return it;Jr=1,Object.defineProperty(it,"__esModule",{value:!0});const e=Q(),r={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(E){const{gen:d,schema:b,it:i}=E;if((0,e.alwaysValidSchema)(i,b)){E.fail();return}const h=d.name("valid");E.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},h),E.failResult(h,()=>E.reset(),()=>E.error())},error:{message:"must NOT be valid"}};return it.default=r,it}var ot={},Wr;function os(){if(Wr)return ot;Wr=1,Object.defineProperty(ot,"__esModule",{value:!0});const r={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:le().validateUnion,error:{message:"must match a schema in anyOf"}};return ot.default=r,ot}var ut={},Br;function us(){if(Br)return ut;Br=1,Object.defineProperty(ut,"__esModule",{value:!0});const e=J(),r=Q(),d={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:b})=>(0,e._)`{passingSchemas: ${b.passing}}`},code(b){const{gen:i,schema:h,parentSchema:l,it:m}=b;if(!Array.isArray(h))throw new Error("ajv implementation error");if(m.opts.discriminator&&l.discriminator)return;const $=h,p=i.let("valid",!1),S=i.let("passing",null),g=i.name("_valid");b.setParams({passing:S}),i.block(v),b.result(p,()=>b.reset(),()=>b.error(!0));function v(){$.forEach((f,_)=>{let s;(0,r.alwaysValidSchema)(m,f)?i.var(g,!0):s=b.subschema({keyword:"oneOf",schemaProp:_,compositeRule:!0},g),_>0&&i.if((0,e._)`${g} && ${p}`).assign(p,!1).assign(S,(0,e._)`[${S}, ${_}]`).else(),i.if(g,()=>{i.assign(p,!0),i.assign(S,_),s&&b.mergeEvaluated(s,e.Name)})})}}};return ut.default=d,ut}var ct={},Qr;function cs(){if(Qr)return ct;Qr=1,Object.defineProperty(ct,"__esModule",{value:!0});const e=Q(),r={keyword:"allOf",schemaType:"array",code(E){const{gen:d,schema:b,it:i}=E;if(!Array.isArray(b))throw new Error("ajv implementation error");const h=d.name("valid");b.forEach((l,m)=>{if((0,e.alwaysValidSchema)(i,l))return;const $=E.subschema({keyword:"allOf",schemaProp:m},h);E.ok(h),E.mergeEvaluated($)})}};return ct.default=r,ct}var lt={},Xr;function ls(){if(Xr)return lt;Xr=1,Object.defineProperty(lt,"__esModule",{value:!0});const e=J(),r=Q(),d={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:i})=>(0,e.str)`must match "${i.ifClause}" schema`,params:({params:i})=>(0,e._)`{failingKeyword: ${i.ifClause}}`},code(i){const{gen:h,parentSchema:l,it:m}=i;l.then===void 0&&l.else===void 0&&(0,r.checkStrictMode)(m,'"if" without "then" and "else" is ignored');const $=b(m,"then"),p=b(m,"else");if(!$&&!p)return;const S=h.let("valid",!0),g=h.name("_valid");if(v(),i.reset(),$&&p){const _=h.let("ifClause");i.setParams({ifClause:_}),h.if(g,f("then",_),f("else",_))}else $?h.if(g,f("then")):h.if((0,e.not)(g),f("else"));i.pass(S,()=>i.error(!0));function v(){const _=i.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},g);i.mergeEvaluated(_)}function f(_,s){return()=>{const o=i.subschema({keyword:_},g);h.assign(S,g),i.mergeValidEvaluated(o,S),s?h.assign(s,(0,e._)`${_}`):i.setParams({ifClause:_})}}}};function b(i,h){const l=i.schema[h];return l!==void 0&&!(0,r.alwaysValidSchema)(i,l)}return lt.default=d,lt}var dt={},Yr;function ds(){if(Yr)return dt;Yr=1,Object.defineProperty(dt,"__esModule",{value:!0});const e=Q(),r={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:E,parentSchema:d,it:b}){d.if===void 0&&(0,e.checkStrictMode)(b,`"${E}" without "if" is ignored`)}};return dt.default=r,dt}var Zr;function fs(){if(Zr)return Ze;Zr=1,Object.defineProperty(Ze,"__esModule",{value:!0});const e=pn(),r=xn(),E=mn(),d=es(),b=ts(),i=rs(),h=ns(),l=yn(),m=ss(),$=as(),p=is(),S=os(),g=us(),v=cs(),f=ls(),_=ds();function s(o=!1){const t=[p.default,S.default,g.default,v.default,f.default,_.default,h.default,l.default,i.default,m.default,$.default];return o?t.push(r.default,d.default):t.push(e.default,E.default),t.push(b.default),t}return Ze.default=s,Ze}var ft={},ht={},xr;function hs(){if(xr)return ht;xr=1,Object.defineProperty(ht,"__esModule",{value:!0});const e=J(),E={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:d})=>(0,e.str)`must match format "${d}"`,params:({schemaCode:d})=>(0,e._)`{format: ${d}}`},code(d,b){const{gen:i,data:h,$data:l,schema:m,schemaCode:$,it:p}=d,{opts:S,errSchemaPath:g,schemaEnv:v,self:f}=p;if(!S.validateFormats)return;l?_():s();function _(){const o=i.scopeValue("formats",{ref:f.formats,code:S.code.formats}),t=i.const("fDef",(0,e._)`${o}[${$}]`),a=i.let("fType"),y=i.let("format");i.if((0,e._)`typeof ${t} == "object" && !(${t} instanceof RegExp)`,()=>i.assign(a,(0,e._)`${t}.type || "string"`).assign(y,(0,e._)`${t}.validate`),()=>i.assign(a,(0,e._)`"string"`).assign(y,t)),d.fail$data((0,e.or)(n(),c()));function n(){return S.strictSchema===!1?e.nil:(0,e._)`${$} && !${y}`}function c(){const w=v.$async?(0,e._)`(${t}.async ? await ${y}(${h}) : ${y}(${h}))`:(0,e._)`${y}(${h})`,O=(0,e._)`(typeof ${y} == "function" ? ${w} : ${y}.test(${h}))`;return(0,e._)`${y} && ${y} !== true && ${a} === ${b} && !${O}`}}function s(){const o=f.formats[m];if(!o){n();return}if(o===!0)return;const[t,a,y]=c(o);t===b&&d.pass(w());function n(){if(S.strictSchema===!1){f.logger.warn(O());return}throw new Error(O());function O(){return`unknown format "${m}" ignored in schema at path "${g}"`}}function c(O){const C=O instanceof RegExp?(0,e.regexpCode)(O):S.code.formats?(0,e._)`${S.code.formats}${(0,e.getProperty)(m)}`:void 0,M=i.scopeValue("formats",{key:m,ref:O,code:C});return typeof O=="object"&&!(O instanceof RegExp)?[O.type||"string",O.validate,(0,e._)`${M}.validate`]:["string",O,M]}function w(){if(typeof o=="object"&&!(o instanceof RegExp)&&o.async){if(!v.$async)throw new Error("async format in sync schema");return(0,e._)`await ${y}(${h})`}return typeof a=="function"?(0,e._)`${y}(${h})`:(0,e._)`${y}.test(${h})`}}}};return ht.default=E,ht}var en;function ps(){if(en)return ft;en=1,Object.defineProperty(ft,"__esModule",{value:!0});const r=[hs().default];return ft.default=r,ft}var we={},tn;function ms(){return tn||(tn=1,Object.defineProperty(we,"__esModule",{value:!0}),we.contentVocabulary=we.metadataVocabulary=void 0,we.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],we.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),we}var rn;function ys(){if(rn)return Ae;rn=1,Object.defineProperty(Ae,"__esModule",{value:!0});const e=zn(),r=Zn(),E=fs(),d=ps(),b=ms(),i=[e.default,r.default,(0,E.default)(),d.default,b.metadataVocabulary,b.contentVocabulary];return Ae.default=i,Ae}var pt={},Oe={},nn;function gs(){if(nn)return Oe;nn=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.DiscrError=void 0;var e;return(function(r){r.Tag="tag",r.Mapping="mapping"})(e||(Oe.DiscrError=e={})),Oe}var sn;function vs(){if(sn)return pt;sn=1,Object.defineProperty(pt,"__esModule",{value:!0});const e=J(),r=gs(),E=Ut(),d=bt(),b=Q(),h={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:l,tagName:m}})=>l===r.DiscrError.Tag?`tag "${m}" must be string`:`value of tag "${m}" must be in oneOf`,params:({params:{discrError:l,tag:m,tagName:$}})=>(0,e._)`{error: ${l}, tag: ${$}, tagValue: ${m}}`},code(l){const{gen:m,data:$,schema:p,parentSchema:S,it:g}=l,{oneOf:v}=S;if(!g.opts.discriminator)throw new Error("discriminator: requires discriminator option");const f=p.propertyName;if(typeof f!="string")throw new Error("discriminator: requires propertyName");if(p.mapping)throw new Error("discriminator: mapping is not supported");if(!v)throw new Error("discriminator: requires oneOf keyword");const _=m.let("valid",!1),s=m.const("tag",(0,e._)`${$}${(0,e.getProperty)(f)}`);m.if((0,e._)`typeof ${s} == "string"`,()=>o(),()=>l.error(!1,{discrError:r.DiscrError.Tag,tag:s,tagName:f})),l.ok(_);function o(){const y=a();m.if(!1);for(const n in y)m.elseIf((0,e._)`${s} === ${n}`),m.assign(_,t(y[n]));m.else(),l.error(!1,{discrError:r.DiscrError.Mapping,tag:s,tagName:f}),m.endIf()}function t(y){const n=m.name("valid"),c=l.subschema({keyword:"oneOf",schemaProp:y},n);return l.mergeEvaluated(c,e.Name),n}function a(){var y;const n={},c=O(S);let w=!0;for(let V=0;V<v.length;V++){let L=v[V];if(L?.$ref&&!(0,b.schemaHasRulesButRef)(L,g.self.RULES)){const B=L.$ref;if(L=E.resolveRef.call(g.self,g.schemaEnv.root,g.baseId,B),L instanceof E.SchemaEnv&&(L=L.schema),L===void 0)throw new d.default(g.opts.uriResolver,g.baseId,B)}const K=(y=L?.properties)===null||y===void 0?void 0:y[f];if(typeof K!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${f}"`);w=w&&(c||O(L)),C(K,V)}if(!w)throw new Error(`discriminator: "${f}" must be required`);return n;function O({required:V}){return Array.isArray(V)&&V.includes(f)}function C(V,L){if(V.const)M(V.const,L);else if(V.enum)for(const K of V.enum)M(K,L);else throw new Error(`discriminator: "properties/${f}" must have "const" or "enum"`)}function M(V,L){if(typeof V!="string"||V in n)throw new Error(`discriminator: "${f}" values must be unique strings`);n[V]=L}}}};return pt.default=h,pt}const _s="http://json-schema.org/draft-07/schema#",$s="http://json-schema.org/draft-07/schema#",ws="Core schema meta-schema",bs={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:[]}},Es=["object","boolean"],Ps={$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:"#"}},Ss={$schema:_s,$id:$s,title:ws,definitions:bs,type:Es,properties:Ps,default:!0};var an;function js(){return an||(an=1,(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.MissingRefError=r.ValidationError=r.CodeGen=r.Name=r.nil=r.stringify=r.str=r._=r.KeywordCxt=r.Ajv=void 0;const E=Mn(),d=ys(),b=vs(),i=Ss,h=["/properties"],l="http://json-schema.org/draft-07/schema";class m extends E.default{_addVocabularies(){super._addVocabularies(),d.default.forEach(f=>this.addVocabulary(f)),this.opts.discriminator&&this.addKeyword(b.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const f=this.opts.$data?this.$dataMetaSchema(i,h):i;this.addMetaSchema(f,l,!1),this.refs["http://json-schema.org/schema"]=l}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(l)?l:void 0)}}r.Ajv=m,e.exports=r=m,e.exports.Ajv=m,Object.defineProperty(r,"__esModule",{value:!0}),r.default=m;var $=wt();Object.defineProperty(r,"KeywordCxt",{enumerable:!0,get:function(){return $.KeywordCxt}});var p=J();Object.defineProperty(r,"_",{enumerable:!0,get:function(){return p._}}),Object.defineProperty(r,"str",{enumerable:!0,get:function(){return p.str}}),Object.defineProperty(r,"stringify",{enumerable:!0,get:function(){return p.stringify}}),Object.defineProperty(r,"nil",{enumerable:!0,get:function(){return p.nil}}),Object.defineProperty(r,"Name",{enumerable:!0,get:function(){return p.Name}}),Object.defineProperty(r,"CodeGen",{enumerable:!0,get:function(){return p.CodeGen}});var S=Vt();Object.defineProperty(r,"ValidationError",{enumerable:!0,get:function(){return S.default}});var g=bt();Object.defineProperty(r,"MissingRefError",{enumerable:!0,get:function(){return g.default}})})(qe,qe.exports)),qe.exports}var Rs=js();const Ns=cn(Rs);var mt={exports:{}},on;function Os(){return on||(on=1,(function(e,r){Object.defineProperty(r,"__esModule",{value:!0});const E={},d={timestamp:()=>()=>Date.now(),datetime:()=>()=>new Date().toISOString(),date:()=>()=>new Date().toISOString().slice(0,10),time:()=>()=>new Date().toISOString().slice(11),random:()=>()=>Math.random(),randomint:p=>{var S;const g=(S=p?.max)!==null&&S!==void 0?S:2;return()=>Math.floor(Math.random()*g)},seq:p=>{var S;const g=(S=p?.name)!==null&&S!==void 0?S:"";return E[g]||(E[g]=0),()=>E[g]++}},b=Object.assign(i,{DEFAULTS:d});function i(){return{keyword:"dynamicDefaults",type:"object",schemaType:["string","object"],modifying:!0,valid:!0,compile(p,S,g){if(!g.opts.useDefaults||g.compositeRule)return()=>!0;const v={};for(const _ in p)v[_]=h(p[_]);const f=g.opts.useDefaults==="empty";return _=>{for(const s in p)(_[s]===void 0||f&&(_[s]===null||_[s]===""))&&(_[s]=v[s]());return!0}},metaSchema:{type:"object",additionalProperties:{anyOf:[{type:"string"},{type:"object",additionalProperties:!1,required:["func","args"],properties:{func:{type:"string"},args:{type:"object"}}}]}}}}function h(p){return typeof p=="object"?l(p):m(p)}function l({func:p,args:S}){const g=d[p];return $(p,g),g(S)}function m(p=""){const S=d[p];return $(p,S),S()}function $(p,S){if(!S)throw new Error(`invalid "dynamicDefaults" keyword property value: ${p}`)}r.default=b,e.exports=b})(mt,mt.exports)),mt.exports}var ks=Os();const gn=cn(ks),qs={$id:"urn:jsonschema: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"},Ts={$id:"urn:jsonschema:data",items:{$ref:"urn:jsonschema:page"},type:"array"},Is={$id:"urn:jsonschema: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"},Cs={$id:"urn:jsonschema:fonts",items:{type:"string"},type:"array"},Ds={$id:"urn:jsonschema:importmap",additionalProperties:!1,properties:{imports:{additionalProperties:{type:"string"},default:{},type:"object"},scopes:{additionalProperties:{additionalProperties:{type:"string"},type:"object"},type:"object"}},type:"object"},As={$id:"urn:jsonschema: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"},Ms={$id:"urn:jsonschema: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"},Et=!0,Gs=e=>Object.fromEntries(e.map(r=>[r.toLowerCase().replace(/ /g,"_"),r])),Vs=()=>{const e=URL.createObjectURL(new Blob),r=e.split("/").pop()??crypto.randomUUID();return URL.revokeObjectURL(e),r};gn.DEFAULTS.uuid=()=>Vs;const vn=[qs,Ts,Ms,Ds,Is,Cs,As],Us=new Ns({code:{esm:!0},coerceTypes:!0,keywords:[gn()],removeAdditional:!0,schemas:vn,useDefaults:!0}),Se=Object.fromEntries(vn.map(({$id:e})=>[e.split(":").pop(),Us.getSchema(e)]));Se.credentials;Se.log;const un={$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:r})=>!r)?void 0:e.map(({name:r})=>r).join("/").replace(/ /g,"_")}},title:{get(){return["",void 0].includes(this.header)?this.name??"":this.header}},to:{get(){return this.path?.replace(/^\/?/,"/").replace(/\/?$/,"/")}}},zs=ke({}),Fs=ke([]),Ks=ke({}),Mt=ke([]),{nodes:Ls,nodesMap:Js}=wn(Mt);vt(zs,async e=>{await Se.feed?.(e)},{immediate:Et});vt(Fs,async e=>{await Se.fonts?.(e)},{immediate:Et});vt(Ks,async e=>{await Se.importmap?.(e)},{immediate:Et});vt(Ls,async e=>{await Se.data?.(e)?e.forEach(r=>{Object.keys(un).some(E=>!(E in r))&&Object.defineProperties(r,un)}):(Mt.length=0,Mt.push({}))},{immediate:Et});export{Js as a,Gs as b,Fs as f,cn as g,Mt as n,Ls as p,Vs as u};