@anov/cic-standard-sdk 0.0.12 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cic-sdk.cjs.js +4 -4
- package/dist/cic-sdk.es.js +1095 -1079
- package/dist/cic-sdk.umd.js +4 -4
- package/dist/sdk/generators/common.d.ts +1 -1
- package/package.json +2 -2
package/dist/cic-sdk.umd.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
(function(Ie,Re){typeof exports=="object"&&typeof module<"u"?Re(exports):typeof define=="function"&&define.amd?define(["exports"],Re):(Ie=typeof globalThis<"u"?globalThis:Ie||self,Re(Ie.CICSDK={}))})(this,(function(Ie){"use strict";function Re(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Le={exports:{}},Ft={},ve={},Ee={},Lt={},Ut={},Kt={},dr;function Ue(){return dr||(dr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends t{constructor(r){if(super(),!e.IDENTIFIER.test(r))throw new Error("CodeGen: name must be a valid identifier");this.str=r}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=n;class i extends t{constructor(r){super(),this._items=typeof r=="string"?[r]:r}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const r=this._items[0];return r===""||r==='""'}get str(){var r;return(r=this._str)!==null&&r!==void 0?r:this._str=this._items.reduce((c,g)=>`${c}${g}`,"")}get names(){var r;return(r=this._names)!==null&&r!==void 0?r:this._names=this._items.reduce((c,g)=>(g instanceof n&&(c[g.str]=(c[g.str]||0)+1),c),{})}}e._Code=i,e.nil=new i("");function y(u,...r){const c=[u[0]];let g=0;for(;g<r.length;)d(c,r[g]),c.push(u[++g]);return new i(c)}e._=y;const s=new i("+");function l(u,...r){const c=[v(u[0])];let g=0;for(;g<r.length;)c.push(s),d(c,r[g]),c.push(s,v(u[++g]));return f(c),new i(c)}e.str=l;function d(u,r){r instanceof i?u.push(...r._items):r instanceof n?u.push(r):u.push(E(r))}e.addCodeArg=d;function f(u){let r=1;for(;r<u.length-1;){if(u[r]===s){const c=w(u[r-1],u[r+1]);if(c!==void 0){u.splice(r-1,3,c);continue}u[r++]="+"}r++}}function w(u,r){if(r==='""')return u;if(u==='""')return r;if(typeof u=="string")return r instanceof n||u[u.length-1]!=='"'?void 0:typeof r!="string"?`${u.slice(0,-1)}${r}"`:r[0]==='"'?u.slice(0,-1)+r.slice(1):void 0;if(typeof r=="string"&&r[0]==='"'&&!(u instanceof n))return`"${u}${r.slice(1)}`}function $(u,r){return r.emptyStr()?u:u.emptyStr()?r:l`${u}${r}`}e.strConcat=$;function E(u){return typeof u=="number"||typeof u=="boolean"||u===null?u:v(Array.isArray(u)?u.join(","):u)}function _(u){return new i(v(u))}e.stringify=_;function v(u){return JSON.stringify(u).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=v;function b(u){return typeof u=="string"&&e.IDENTIFIER.test(u)?new i(`.${u}`):y`[${u}]`}e.getProperty=b;function h(u){if(typeof u=="string"&&e.IDENTIFIER.test(u))return new i(`${u}`);throw new Error(`CodeGen: invalid export name: ${u}, use explicit $id name mapping`)}e.getEsmExportName=h;function a(u){return new i(u.toString())}e.regexpCode=a})(Kt)),Kt}var Jt={},ur;function lr(){return ur||(ur=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=Ue();class n extends Error{constructor(w){super(`CodeGen: "code" for ${w} not defined`),this.value=w.value}}var i;(function(f){f[f.Started=0]="Started",f[f.Completed=1]="Completed"})(i||(e.UsedValueState=i={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class y{constructor({prefixes:w,parent:$}={}){this._names={},this._prefixes=w,this._parent=$}toName(w){return w instanceof t.Name?w:this.name(w)}name(w){return new t.Name(this._newName(w))}_newName(w){const $=this._names[w]||this._nameGroup(w);return`${w}${$.index++}`}_nameGroup(w){var $,E;if(!((E=($=this._parent)===null||$===void 0?void 0:$._prefixes)===null||E===void 0)&&E.has(w)||this._prefixes&&!this._prefixes.has(w))throw new Error(`CodeGen: prefix "${w}" is not allowed in this scope`);return this._names[w]={prefix:w,index:0}}}e.Scope=y;class s extends t.Name{constructor(w,$){super($),this.prefix=w}setValue(w,{property:$,itemIndex:E}){this.value=w,this.scopePath=(0,t._)`.${new t.Name($)}[${E}]`}}e.ValueScopeName=s;const l=(0,t._)`\n`;class d extends y{constructor(w){super(w),this._values={},this._scope=w.scope,this.opts={...w,_n:w.lines?l:t.nil}}get(){return this._scope}name(w){return new s(w,this._newName(w))}value(w,$){var E;if($.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const _=this.toName(w),{prefix:v}=_,b=(E=$.key)!==null&&E!==void 0?E:$.ref;let h=this._values[v];if(h){const r=h.get(b);if(r)return r}else h=this._values[v]=new Map;h.set(b,_);const a=this._scope[v]||(this._scope[v]=[]),u=a.length;return a[u]=$.ref,_.setValue($,{property:v,itemIndex:u}),_}getValue(w,$){const E=this._values[w];if(E)return E.get($)}scopeRefs(w,$=this._values){return this._reduceValues($,E=>{if(E.scopePath===void 0)throw new Error(`CodeGen: name "${E}" has no value`);return(0,t._)`${w}${E.scopePath}`})}scopeCode(w=this._values,$,E){return this._reduceValues(w,_=>{if(_.value===void 0)throw new Error(`CodeGen: name "${_}" has no value`);return _.value.code},$,E)}_reduceValues(w,$,E={},_){let v=t.nil;for(const b in w){const h=w[b];if(!h)continue;const a=E[b]=E[b]||new Map;h.forEach(u=>{if(a.has(u))return;a.set(u,i.Started);let r=$(u);if(r){const c=this.opts.es5?e.varKinds.var:e.varKinds.const;v=(0,t._)`${v}${c} ${u} = ${r};${this.opts._n}`}else if(r=_?.(u))v=(0,t._)`${v}${r}${this.opts._n}`;else throw new n(u);a.set(u,i.Completed)})}return v}}e.ValueScope=d})(Jt)),Jt}var fr;function H(){return fr||(fr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=Ue(),n=lr();var i=Ue();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return i.Name}});var y=lr();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return y.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return y.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return y.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return y.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class s{optimizeNodes(){return this}optimizeNames(p,S){return this}}class l extends s{constructor(p,S,N){super(),this.varKind=p,this.name=S,this.rhs=N}render({es5:p,_n:S}){const N=p?n.varKinds.var:this.varKind,U=this.rhs===void 0?"":` = ${this.rhs}`;return`${N} ${this.name}${U};`+S}optimizeNames(p,S){if(p[this.name.str])return this.rhs&&(this.rhs=L(this.rhs,p,S)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class d extends s{constructor(p,S,N){super(),this.lhs=p,this.rhs=S,this.sideEffects=N}render({_n:p}){return`${this.lhs} = ${this.rhs};`+p}optimizeNames(p,S){if(!(this.lhs instanceof t.Name&&!p[this.lhs.str]&&!this.sideEffects))return this.rhs=L(this.rhs,p,S),this}get names(){const p=this.lhs instanceof t.Name?{}:{...this.lhs.names};return F(p,this.rhs)}}class f extends d{constructor(p,S,N,U){super(p,N,U),this.op=S}render({_n:p}){return`${this.lhs} ${this.op}= ${this.rhs};`+p}}class w extends s{constructor(p){super(),this.label=p,this.names={}}render({_n:p}){return`${this.label}:`+p}}class $ extends s{constructor(p){super(),this.label=p,this.names={}}render({_n:p}){return`break${this.label?` ${this.label}`:""};`+p}}class E extends s{constructor(p){super(),this.error=p}render({_n:p}){return`throw ${this.error};`+p}get names(){return this.error.names}}class _ extends s{constructor(p){super(),this.code=p}render({_n:p}){return`${this.code};`+p}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(p,S){return this.code=L(this.code,p,S),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class v extends s{constructor(p=[]){super(),this.nodes=p}render(p){return this.nodes.reduce((S,N)=>S+N.render(p),"")}optimizeNodes(){const{nodes:p}=this;let S=p.length;for(;S--;){const N=p[S].optimizeNodes();Array.isArray(N)?p.splice(S,1,...N):N?p[S]=N:p.splice(S,1)}return p.length>0?this:void 0}optimizeNames(p,S){const{nodes:N}=this;let U=N.length;for(;U--;){const J=N[U];J.optimizeNames(p,S)||(Q(p,J.names),N.splice(U,1))}return N.length>0?this:void 0}get names(){return this.nodes.reduce((p,S)=>V(p,S.names),{})}}class b extends v{render(p){return"{"+p._n+super.render(p)+"}"+p._n}}class h extends v{}class a extends b{}a.kind="else";class u extends b{constructor(p,S){super(S),this.condition=p}render(p){let S=`if(${this.condition})`+super.render(p);return this.else&&(S+="else "+this.else.render(p)),S}optimizeNodes(){super.optimizeNodes();const p=this.condition;if(p===!0)return this.nodes;let S=this.else;if(S){const N=S.optimizeNodes();S=this.else=Array.isArray(N)?new a(N):N}if(S)return p===!1?S instanceof u?S:S.nodes:this.nodes.length?this:new u(oe(p),S instanceof u?[S]:S.nodes);if(!(p===!1||!this.nodes.length))return this}optimizeNames(p,S){var N;if(this.else=(N=this.else)===null||N===void 0?void 0:N.optimizeNames(p,S),!!(super.optimizeNames(p,S)||this.else))return this.condition=L(this.condition,p,S),this}get names(){const p=super.names;return F(p,this.condition),this.else&&V(p,this.else.names),p}}u.kind="if";class r extends b{}r.kind="for";class c extends r{constructor(p){super(),this.iteration=p}render(p){return`for(${this.iteration})`+super.render(p)}optimizeNames(p,S){if(super.optimizeNames(p,S))return this.iteration=L(this.iteration,p,S),this}get names(){return V(super.names,this.iteration.names)}}class g extends r{constructor(p,S,N,U){super(),this.varKind=p,this.name=S,this.from=N,this.to=U}render(p){const S=p.es5?n.varKinds.var:this.varKind,{name:N,from:U,to:J}=this;return`for(${S} ${N}=${U}; ${N}<${J}; ${N}++)`+super.render(p)}get names(){const p=F(super.names,this.from);return F(p,this.to)}}class o extends r{constructor(p,S,N,U){super(),this.loop=p,this.varKind=S,this.name=N,this.iterable=U}render(p){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(p)}optimizeNames(p,S){if(super.optimizeNames(p,S))return this.iterable=L(this.iterable,p,S),this}get names(){return V(super.names,this.iterable.names)}}class m extends b{constructor(p,S,N){super(),this.name=p,this.args=S,this.async=N}render(p){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(p)}}m.kind="func";class P extends v{render(p){return"return "+super.render(p)}}P.kind="return";class O extends b{render(p){let S="try"+super.render(p);return this.catch&&(S+=this.catch.render(p)),this.finally&&(S+=this.finally.render(p)),S}optimizeNodes(){var p,S;return super.optimizeNodes(),(p=this.catch)===null||p===void 0||p.optimizeNodes(),(S=this.finally)===null||S===void 0||S.optimizeNodes(),this}optimizeNames(p,S){var N,U;return super.optimizeNames(p,S),(N=this.catch)===null||N===void 0||N.optimizeNames(p,S),(U=this.finally)===null||U===void 0||U.optimizeNames(p,S),this}get names(){const p=super.names;return this.catch&&V(p,this.catch.names),this.finally&&V(p,this.finally.names),p}}class T extends b{constructor(p){super(),this.error=p}render(p){return`catch(${this.error})`+super.render(p)}}T.kind="catch";class z extends b{render(p){return"finally"+super.render(p)}}z.kind="finally";class C{constructor(p,S={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...S,_n:S.lines?`
|
|
2
|
-
`:""},this._extScope=p,this._scope=new n.Scope({parent:p}),this._nodes=[new h]}toString(){return this._root.render(this.opts)}name(p){return this._scope.name(p)}scopeName(p){return this._extScope.name(p)}scopeValue(p,S){const N=this._extScope.value(p,S);return(this._values[N.prefix]||(this._values[N.prefix]=new Set)).add(N),N}getScopeValue(p,S){return this._extScope.getValue(p,S)}scopeRefs(p){return this._extScope.scopeRefs(p,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(p,S,N,U){const J=this._scope.toName(S);return N!==void 0&&U&&(this._constants[J.str]=N),this._leafNode(new l(p,J,N)),J}const(p,S,N){return this._def(n.varKinds.const,p,S,N)}let(p,S,N){return this._def(n.varKinds.let,p,S,N)}var(p,S,N){return this._def(n.varKinds.var,p,S,N)}assign(p,S,N){return this._leafNode(new d(p,S,N))}add(p,S){return this._leafNode(new f(p,e.operators.ADD,S))}code(p){return typeof p=="function"?p():p!==t.nil&&this._leafNode(new _(p)),this}object(...p){const S=["{"];for(const[N,U]of p)S.length>1&&S.push(","),S.push(N),(N!==U||this.opts.es5)&&(S.push(":"),(0,t.addCodeArg)(S,U));return S.push("}"),new t._Code(S)}if(p,S,N){if(this._blockNode(new u(p)),S&&N)this.code(S).else().code(N).endIf();else if(S)this.code(S).endIf();else if(N)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(p){return this._elseNode(new u(p))}else(){return this._elseNode(new a)}endIf(){return this._endBlockNode(u,a)}_for(p,S){return this._blockNode(p),S&&this.code(S).endFor(),this}for(p,S){return this._for(new c(p),S)}forRange(p,S,N,U,J=this.opts.es5?n.varKinds.var:n.varKinds.let){const x=this._scope.toName(p);return this._for(new g(J,x,S,N),()=>U(x))}forOf(p,S,N,U=n.varKinds.const){const J=this._scope.toName(p);if(this.opts.es5){const x=S instanceof t.Name?S:this.var("_arr",S);return this.forRange("_i",0,(0,t._)`${x}.length`,B=>{this.var(J,(0,t._)`${x}[${B}]`),N(J)})}return this._for(new o("of",U,J,S),()=>N(J))}forIn(p,S,N,U=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(p,(0,t._)`Object.keys(${S})`,N);const J=this._scope.toName(p);return this._for(new o("in",U,J,S),()=>N(J))}endFor(){return this._endBlockNode(r)}label(p){return this._leafNode(new w(p))}break(p){return this._leafNode(new $(p))}return(p){const S=new P;if(this._blockNode(S),this.code(p),S.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(P)}try(p,S,N){if(!S&&!N)throw new Error('CodeGen: "try" without "catch" and "finally"');const U=new O;if(this._blockNode(U),this.code(p),S){const J=this.name("e");this._currNode=U.catch=new T(J),S(J)}return N&&(this._currNode=U.finally=new z,this.code(N)),this._endBlockNode(T,z)}throw(p){return this._leafNode(new E(p))}block(p,S){return this._blockStarts.push(this._nodes.length),p&&this.code(p).endBlock(S),this}endBlock(p){const S=this._blockStarts.pop();if(S===void 0)throw new Error("CodeGen: not in self-balancing block");const N=this._nodes.length-S;if(N<0||p!==void 0&&N!==p)throw new Error(`CodeGen: wrong number of nodes: ${N} vs ${p} expected`);return this._nodes.length=S,this}func(p,S=t.nil,N,U){return this._blockNode(new m(p,S,N)),U&&this.code(U).endFunc(),this}endFunc(){return this._endBlockNode(m)}optimize(p=1){for(;p-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(p){return this._currNode.nodes.push(p),this}_blockNode(p){this._currNode.nodes.push(p),this._nodes.push(p)}_endBlockNode(p,S){const N=this._currNode;if(N instanceof p||S&&N instanceof S)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${S?`${p.kind}/${S.kind}`:p.kind}"`)}_elseNode(p){const S=this._currNode;if(!(S instanceof u))throw new Error('CodeGen: "else" without "if"');return this._currNode=S.else=p,this}get _root(){return this._nodes[0]}get _currNode(){const p=this._nodes;return p[p.length-1]}set _currNode(p){const S=this._nodes;S[S.length-1]=p}}e.CodeGen=C;function V(R,p){for(const S in p)R[S]=(R[S]||0)+(p[S]||0);return R}function F(R,p){return p instanceof t._CodeOrName?V(R,p.names):R}function L(R,p,S){if(R instanceof t.Name)return N(R);if(!U(R))return R;return new t._Code(R._items.reduce((J,x)=>(x instanceof t.Name&&(x=N(x)),x instanceof t._Code?J.push(...x._items):J.push(x),J),[]));function N(J){const x=S[J.str];return x===void 0||p[J.str]!==1?J:(delete p[J.str],x)}function U(J){return J instanceof t._Code&&J._items.some(x=>x instanceof t.Name&&p[x.str]===1&&S[x.str]!==void 0)}}function Q(R,p){for(const S in p)R[S]=(R[S]||0)-(p[S]||0)}function oe(R){return typeof R=="boolean"||typeof R=="number"||R===null?!R:(0,t._)`!${D(R)}`}e.not=oe;const ae=j(e.operators.AND);function X(...R){return R.reduce(ae)}e.and=X;const ye=j(e.operators.OR);function M(...R){return R.reduce(ye)}e.or=M;function j(R){return(p,S)=>p===t.nil?S:S===t.nil?p:(0,t._)`${D(p)} ${R} ${D(S)}`}function D(R){return R instanceof t.Name?R:(0,t._)`(${R})`}})(Ut)),Ut}var G={},pr;function Y(){if(pr)return G;pr=1,Object.defineProperty(G,"__esModule",{value:!0}),G.checkStrictMode=G.getErrorPath=G.Type=G.useFunc=G.setEvaluated=G.evaluatedPropsToName=G.mergeEvaluated=G.eachItem=G.unescapeJsonPointer=G.escapeJsonPointer=G.escapeFragment=G.unescapeFragment=G.schemaRefOrVal=G.schemaHasRulesButRef=G.schemaHasRules=G.checkUnknownRules=G.alwaysValidSchema=G.toHash=void 0;const e=H(),t=Ue();function n(o){const m={};for(const P of o)m[P]=!0;return m}G.toHash=n;function i(o,m){return typeof m=="boolean"?m:Object.keys(m).length===0?!0:(y(o,m),!s(m,o.self.RULES.all))}G.alwaysValidSchema=i;function y(o,m=o.schema){const{opts:P,self:O}=o;if(!P.strictSchema||typeof m=="boolean")return;const T=O.RULES.keywords;for(const z in m)T[z]||g(o,`unknown keyword: "${z}"`)}G.checkUnknownRules=y;function s(o,m){if(typeof o=="boolean")return!o;for(const P in o)if(m[P])return!0;return!1}G.schemaHasRules=s;function l(o,m){if(typeof o=="boolean")return!o;for(const P in o)if(P!=="$ref"&&m.all[P])return!0;return!1}G.schemaHasRulesButRef=l;function d({topSchemaRef:o,schemaPath:m},P,O,T){if(!T){if(typeof P=="number"||typeof P=="boolean")return P;if(typeof P=="string")return(0,e._)`${P}`}return(0,e._)`${o}${m}${(0,e.getProperty)(O)}`}G.schemaRefOrVal=d;function f(o){return E(decodeURIComponent(o))}G.unescapeFragment=f;function w(o){return encodeURIComponent($(o))}G.escapeFragment=w;function $(o){return typeof o=="number"?`${o}`:o.replace(/~/g,"~0").replace(/\//g,"~1")}G.escapeJsonPointer=$;function E(o){return o.replace(/~1/g,"/").replace(/~0/g,"~")}G.unescapeJsonPointer=E;function _(o,m){if(Array.isArray(o))for(const P of o)m(P);else m(o)}G.eachItem=_;function v({mergeNames:o,mergeToName:m,mergeValues:P,resultToName:O}){return(T,z,C,V)=>{const F=C===void 0?z:C instanceof e.Name?(z instanceof e.Name?o(T,z,C):m(T,z,C),C):z instanceof e.Name?(m(T,C,z),z):P(z,C);return V===e.Name&&!(F instanceof e.Name)?O(T,F):F}}G.mergeEvaluated={props:v({mergeNames:(o,m,P)=>o.if((0,e._)`${P} !== true && ${m} !== undefined`,()=>{o.if((0,e._)`${m} === true`,()=>o.assign(P,!0),()=>o.assign(P,(0,e._)`${P} || {}`).code((0,e._)`Object.assign(${P}, ${m})`))}),mergeToName:(o,m,P)=>o.if((0,e._)`${P} !== true`,()=>{m===!0?o.assign(P,!0):(o.assign(P,(0,e._)`${P} || {}`),h(o,P,m))}),mergeValues:(o,m)=>o===!0?!0:{...o,...m},resultToName:b}),items:v({mergeNames:(o,m,P)=>o.if((0,e._)`${P} !== true && ${m} !== undefined`,()=>o.assign(P,(0,e._)`${m} === true ? true : ${P} > ${m} ? ${P} : ${m}`)),mergeToName:(o,m,P)=>o.if((0,e._)`${P} !== true`,()=>o.assign(P,m===!0?!0:(0,e._)`${P} > ${m} ? ${P} : ${m}`)),mergeValues:(o,m)=>o===!0?!0:Math.max(o,m),resultToName:(o,m)=>o.var("items",m)})};function b(o,m){if(m===!0)return o.var("props",!0);const P=o.var("props",(0,e._)`{}`);return m!==void 0&&h(o,P,m),P}G.evaluatedPropsToName=b;function h(o,m,P){Object.keys(P).forEach(O=>o.assign((0,e._)`${m}${(0,e.getProperty)(O)}`,!0))}G.setEvaluated=h;const a={};function u(o,m){return o.scopeValue("func",{ref:m,code:a[m.code]||(a[m.code]=new t._Code(m.code))})}G.useFunc=u;var r;(function(o){o[o.Num=0]="Num",o[o.Str=1]="Str"})(r||(G.Type=r={}));function c(o,m,P){if(o instanceof e.Name){const O=m===r.Num;return P?O?(0,e._)`"[" + ${o} + "]"`:(0,e._)`"['" + ${o} + "']"`:O?(0,e._)`"/" + ${o}`:(0,e._)`"/" + ${o}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return P?(0,e.getProperty)(o).toString():"/"+$(o)}G.getErrorPath=c;function g(o,m,P=o.opts.strictSchema){if(P){if(m=`strict mode: ${m}`,P===!0)throw new Error(m);o.self.logger.warn(m)}}return G.checkStrictMode=g,G}var Ke={},mr;function be(){if(mr)return Ke;mr=1,Object.defineProperty(Ke,"__esModule",{value:!0});const e=H(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return Ke.default=t,Ke}var hr;function Je(){return hr||(hr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=H(),n=Y(),i=be();e.keywordError={message:({keyword:a})=>(0,t.str)`must pass "${a}" keyword validation`},e.keyword$DataError={message:({keyword:a,schemaType:u})=>u?(0,t.str)`"${a}" keyword must be ${u} ($data)`:(0,t.str)`"${a}" keyword is invalid ($data)`};function y(a,u=e.keywordError,r,c){const{it:g}=a,{gen:o,compositeRule:m,allErrors:P}=g,O=E(a,u,r);c??(m||P)?f(o,O):w(g,(0,t._)`[${O}]`)}e.reportError=y;function s(a,u=e.keywordError,r){const{it:c}=a,{gen:g,compositeRule:o,allErrors:m}=c,P=E(a,u,r);f(g,P),o||m||w(c,i.default.vErrors)}e.reportExtraError=s;function l(a,u){a.assign(i.default.errors,u),a.if((0,t._)`${i.default.vErrors} !== null`,()=>a.if(u,()=>a.assign((0,t._)`${i.default.vErrors}.length`,u),()=>a.assign(i.default.vErrors,null)))}e.resetErrorsCount=l;function d({gen:a,keyword:u,schemaValue:r,data:c,errsCount:g,it:o}){if(g===void 0)throw new Error("ajv implementation error");const m=a.name("err");a.forRange("i",g,i.default.errors,P=>{a.const(m,(0,t._)`${i.default.vErrors}[${P}]`),a.if((0,t._)`${m}.instancePath === undefined`,()=>a.assign((0,t._)`${m}.instancePath`,(0,t.strConcat)(i.default.instancePath,o.errorPath))),a.assign((0,t._)`${m}.schemaPath`,(0,t.str)`${o.errSchemaPath}/${u}`),o.opts.verbose&&(a.assign((0,t._)`${m}.schema`,r),a.assign((0,t._)`${m}.data`,c))})}e.extendErrors=d;function f(a,u){const r=a.const("err",u);a.if((0,t._)`${i.default.vErrors} === null`,()=>a.assign(i.default.vErrors,(0,t._)`[${r}]`),(0,t._)`${i.default.vErrors}.push(${r})`),a.code((0,t._)`${i.default.errors}++`)}function w(a,u){const{gen:r,validateName:c,schemaEnv:g}=a;g.$async?r.throw((0,t._)`new ${a.ValidationError}(${u})`):(r.assign((0,t._)`${c}.errors`,u),r.return(!1))}const $={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function E(a,u,r){const{createErrors:c}=a.it;return c===!1?(0,t._)`{}`:_(a,u,r)}function _(a,u,r={}){const{gen:c,it:g}=a,o=[v(g,r),b(a,r)];return h(a,u,o),c.object(...o)}function v({errorPath:a},{instancePath:u}){const r=u?(0,t.str)`${a}${(0,n.getErrorPath)(u,n.Type.Str)}`:a;return[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,r)]}function b({keyword:a,it:{errSchemaPath:u}},{schemaPath:r,parentSchema:c}){let g=c?u:(0,t.str)`${u}/${a}`;return r&&(g=(0,t.str)`${g}${(0,n.getErrorPath)(r,n.Type.Str)}`),[$.schemaPath,g]}function h(a,{params:u,message:r},c){const{keyword:g,data:o,schemaValue:m,it:P}=a,{opts:O,propertyName:T,topSchemaRef:z,schemaPath:C}=P;c.push([$.keyword,g],[$.params,typeof u=="function"?u(a):u||(0,t._)`{}`]),O.messages&&c.push([$.message,typeof r=="function"?r(a):r]),O.verbose&&c.push([$.schema,m],[$.parentSchema,(0,t._)`${z}${C}`],[i.default.data,o]),T&&c.push([$.propertyName,T])}})(Lt)),Lt}var yr;function ls(){if(yr)return Ee;yr=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.boolOrEmptySchema=Ee.topBoolOrEmptySchema=void 0;const e=Je(),t=H(),n=be(),i={message:"boolean schema is false"};function y(d){const{gen:f,schema:w,validateName:$}=d;w===!1?l(d,!1):typeof w=="object"&&w.$async===!0?f.return(n.default.data):(f.assign((0,t._)`${$}.errors`,null),f.return(!0))}Ee.topBoolOrEmptySchema=y;function s(d,f){const{gen:w,schema:$}=d;$===!1?(w.var(f,!1),l(d)):w.var(f,!0)}Ee.boolOrEmptySchema=s;function l(d,f){const{gen:w,data:$}=d,E={gen:w,keyword:"false schema",data:$,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:d};(0,e.reportError)(E,i,void 0,f)}return Ee}var re={},ke={},gr;function vr(){if(gr)return ke;gr=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.getRules=ke.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function n(y){return typeof y=="string"&&t.has(y)}ke.isJSONType=n;function i(){const y={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...y,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},y.number,y.string,y.array,y.object],post:{rules:[]},all:{},keywords:{}}}return ke.getRules=i,ke}var _e={},_r;function $r(){if(_r)return _e;_r=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.shouldUseRule=_e.shouldUseGroup=_e.schemaHasRulesForType=void 0;function e({schema:i,self:y},s){const l=y.RULES.types[s];return l&&l!==!0&&t(i,l)}_e.schemaHasRulesForType=e;function t(i,y){return y.rules.some(s=>n(i,s))}_e.shouldUseGroup=t;function n(i,y){var s;return i[y.keyword]!==void 0||((s=y.definition.implements)===null||s===void 0?void 0:s.some(l=>i[l]!==void 0))}return _e.shouldUseRule=n,_e}var br;function He(){if(br)return re;br=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=vr(),t=$r(),n=Je(),i=H(),y=Y();var s;(function(r){r[r.Correct=0]="Correct",r[r.Wrong=1]="Wrong"})(s||(re.DataType=s={}));function l(r){const c=d(r.type);if(c.includes("null")){if(r.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!c.length&&r.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');r.nullable===!0&&c.push("null")}return c}re.getSchemaTypes=l;function d(r){const c=Array.isArray(r)?r:r?[r]:[];if(c.every(e.isJSONType))return c;throw new Error("type must be JSONType or JSONType[]: "+c.join(","))}re.getJSONTypes=d;function f(r,c){const{gen:g,data:o,opts:m}=r,P=$(c,m.coerceTypes),O=c.length>0&&!(P.length===0&&c.length===1&&(0,t.schemaHasRulesForType)(r,c[0]));if(O){const T=b(c,o,m.strictNumbers,s.Wrong);g.if(T,()=>{P.length?E(r,c,P):a(r)})}return O}re.coerceAndCheckDataType=f;const w=new Set(["string","number","integer","boolean","null"]);function $(r,c){return c?r.filter(g=>w.has(g)||c==="array"&&g==="array"):[]}function E(r,c,g){const{gen:o,data:m,opts:P}=r,O=o.let("dataType",(0,i._)`typeof ${m}`),T=o.let("coerced",(0,i._)`undefined`);P.coerceTypes==="array"&&o.if((0,i._)`${O} == 'object' && Array.isArray(${m}) && ${m}.length == 1`,()=>o.assign(m,(0,i._)`${m}[0]`).assign(O,(0,i._)`typeof ${m}`).if(b(c,m,P.strictNumbers),()=>o.assign(T,m))),o.if((0,i._)`${T} !== undefined`);for(const C of g)(w.has(C)||C==="array"&&P.coerceTypes==="array")&&z(C);o.else(),a(r),o.endIf(),o.if((0,i._)`${T} !== undefined`,()=>{o.assign(m,T),_(r,T)});function z(C){switch(C){case"string":o.elseIf((0,i._)`${O} == "number" || ${O} == "boolean"`).assign(T,(0,i._)`"" + ${m}`).elseIf((0,i._)`${m} === null`).assign(T,(0,i._)`""`);return;case"number":o.elseIf((0,i._)`${O} == "boolean" || ${m} === null
|
|
1
|
+
(function(Re,Ie){typeof exports=="object"&&typeof module<"u"?Ie(exports):typeof define=="function"&&define.amd?define(["exports"],Ie):(Re=typeof globalThis<"u"?globalThis:Re||self,Ie(Re.CICSDK={}))})(this,(function(Re){"use strict";function Ie(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Le={exports:{}},Ft={},ve={},Ee={},Lt={},Ut={},Kt={},dr;function Ue(){return dr||(dr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(n){if(super(),!e.IDENTIFIER.test(n))throw new Error("CodeGen: name must be a valid identifier");this.str=n}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class i extends t{constructor(n){super(),this._items=typeof n=="string"?[n]:n}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const n=this._items[0];return n===""||n==='""'}get str(){var n;return(n=this._str)!==null&&n!==void 0?n:this._str=this._items.reduce((c,y)=>`${c}${y}`,"")}get names(){var n;return(n=this._names)!==null&&n!==void 0?n:this._names=this._items.reduce((c,y)=>(y instanceof r&&(c[y.str]=(c[y.str]||0)+1),c),{})}}e._Code=i,e.nil=new i("");function g(u,...n){const c=[u[0]];let y=0;for(;y<n.length;)d(c,n[y]),c.push(u[++y]);return new i(c)}e._=g;const s=new i("+");function l(u,...n){const c=[v(u[0])];let y=0;for(;y<n.length;)c.push(s),d(c,n[y]),c.push(s,v(u[++y]));return f(c),new i(c)}e.str=l;function d(u,n){n instanceof i?u.push(...n._items):n instanceof r?u.push(n):u.push(E(n))}e.addCodeArg=d;function f(u){let n=1;for(;n<u.length-1;){if(u[n]===s){const c=w(u[n-1],u[n+1]);if(c!==void 0){u.splice(n-1,3,c);continue}u[n++]="+"}n++}}function w(u,n){if(n==='""')return u;if(u==='""')return n;if(typeof u=="string")return n instanceof r||u[u.length-1]!=='"'?void 0:typeof n!="string"?`${u.slice(0,-1)}${n}"`:n[0]==='"'?u.slice(0,-1)+n.slice(1):void 0;if(typeof n=="string"&&n[0]==='"'&&!(u instanceof r))return`"${u}${n.slice(1)}`}function $(u,n){return n.emptyStr()?u:u.emptyStr()?n:l`${u}${n}`}e.strConcat=$;function E(u){return typeof u=="number"||typeof u=="boolean"||u===null?u:v(Array.isArray(u)?u.join(","):u)}function _(u){return new i(v(u))}e.stringify=_;function v(u){return JSON.stringify(u).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=v;function b(u){return typeof u=="string"&&e.IDENTIFIER.test(u)?new i(`.${u}`):g`[${u}]`}e.getProperty=b;function h(u){if(typeof u=="string"&&e.IDENTIFIER.test(u))return new i(`${u}`);throw new Error(`CodeGen: invalid export name: ${u}, use explicit $id name mapping`)}e.getEsmExportName=h;function a(u){return new i(u.toString())}e.regexpCode=a})(Kt)),Kt}var Jt={},ur;function lr(){return ur||(ur=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=Ue();class r extends Error{constructor(w){super(`CodeGen: "code" for ${w} not defined`),this.value=w.value}}var i;(function(f){f[f.Started=0]="Started",f[f.Completed=1]="Completed"})(i||(e.UsedValueState=i={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class g{constructor({prefixes:w,parent:$}={}){this._names={},this._prefixes=w,this._parent=$}toName(w){return w instanceof t.Name?w:this.name(w)}name(w){return new t.Name(this._newName(w))}_newName(w){const $=this._names[w]||this._nameGroup(w);return`${w}${$.index++}`}_nameGroup(w){var $,E;if(!((E=($=this._parent)===null||$===void 0?void 0:$._prefixes)===null||E===void 0)&&E.has(w)||this._prefixes&&!this._prefixes.has(w))throw new Error(`CodeGen: prefix "${w}" is not allowed in this scope`);return this._names[w]={prefix:w,index:0}}}e.Scope=g;class s extends t.Name{constructor(w,$){super($),this.prefix=w}setValue(w,{property:$,itemIndex:E}){this.value=w,this.scopePath=(0,t._)`.${new t.Name($)}[${E}]`}}e.ValueScopeName=s;const l=(0,t._)`\n`;class d extends g{constructor(w){super(w),this._values={},this._scope=w.scope,this.opts={...w,_n:w.lines?l:t.nil}}get(){return this._scope}name(w){return new s(w,this._newName(w))}value(w,$){var E;if($.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const _=this.toName(w),{prefix:v}=_,b=(E=$.key)!==null&&E!==void 0?E:$.ref;let h=this._values[v];if(h){const n=h.get(b);if(n)return n}else h=this._values[v]=new Map;h.set(b,_);const a=this._scope[v]||(this._scope[v]=[]),u=a.length;return a[u]=$.ref,_.setValue($,{property:v,itemIndex:u}),_}getValue(w,$){const E=this._values[w];if(E)return E.get($)}scopeRefs(w,$=this._values){return this._reduceValues($,E=>{if(E.scopePath===void 0)throw new Error(`CodeGen: name "${E}" has no value`);return(0,t._)`${w}${E.scopePath}`})}scopeCode(w=this._values,$,E){return this._reduceValues(w,_=>{if(_.value===void 0)throw new Error(`CodeGen: name "${_}" has no value`);return _.value.code},$,E)}_reduceValues(w,$,E={},_){let v=t.nil;for(const b in w){const h=w[b];if(!h)continue;const a=E[b]=E[b]||new Map;h.forEach(u=>{if(a.has(u))return;a.set(u,i.Started);let n=$(u);if(n){const c=this.opts.es5?e.varKinds.var:e.varKinds.const;v=(0,t._)`${v}${c} ${u} = ${n};${this.opts._n}`}else if(n=_?.(u))v=(0,t._)`${v}${n}${this.opts._n}`;else throw new r(u);a.set(u,i.Completed)})}return v}}e.ValueScope=d})(Jt)),Jt}var fr;function H(){return fr||(fr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=Ue(),r=lr();var i=Ue();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return i.Name}});var g=lr();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return g.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return g.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return g.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return g.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class s{optimizeNodes(){return this}optimizeNames(p,S){return this}}class l extends s{constructor(p,S,N){super(),this.varKind=p,this.name=S,this.rhs=N}render({es5:p,_n:S}){const N=p?r.varKinds.var:this.varKind,U=this.rhs===void 0?"":` = ${this.rhs}`;return`${N} ${this.name}${U};`+S}optimizeNames(p,S){if(p[this.name.str])return this.rhs&&(this.rhs=L(this.rhs,p,S)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class d extends s{constructor(p,S,N){super(),this.lhs=p,this.rhs=S,this.sideEffects=N}render({_n:p}){return`${this.lhs} = ${this.rhs};`+p}optimizeNames(p,S){if(!(this.lhs instanceof t.Name&&!p[this.lhs.str]&&!this.sideEffects))return this.rhs=L(this.rhs,p,S),this}get names(){const p=this.lhs instanceof t.Name?{}:{...this.lhs.names};return F(p,this.rhs)}}class f extends d{constructor(p,S,N,U){super(p,N,U),this.op=S}render({_n:p}){return`${this.lhs} ${this.op}= ${this.rhs};`+p}}class w extends s{constructor(p){super(),this.label=p,this.names={}}render({_n:p}){return`${this.label}:`+p}}class $ extends s{constructor(p){super(),this.label=p,this.names={}}render({_n:p}){return`break${this.label?` ${this.label}`:""};`+p}}class E extends s{constructor(p){super(),this.error=p}render({_n:p}){return`throw ${this.error};`+p}get names(){return this.error.names}}class _ extends s{constructor(p){super(),this.code=p}render({_n:p}){return`${this.code};`+p}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(p,S){return this.code=L(this.code,p,S),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class v extends s{constructor(p=[]){super(),this.nodes=p}render(p){return this.nodes.reduce((S,N)=>S+N.render(p),"")}optimizeNodes(){const{nodes:p}=this;let S=p.length;for(;S--;){const N=p[S].optimizeNodes();Array.isArray(N)?p.splice(S,1,...N):N?p[S]=N:p.splice(S,1)}return p.length>0?this:void 0}optimizeNames(p,S){const{nodes:N}=this;let U=N.length;for(;U--;){const J=N[U];J.optimizeNames(p,S)||(Q(p,J.names),N.splice(U,1))}return N.length>0?this:void 0}get names(){return this.nodes.reduce((p,S)=>V(p,S.names),{})}}class b extends v{render(p){return"{"+p._n+super.render(p)+"}"+p._n}}class h extends v{}class a extends b{}a.kind="else";class u extends b{constructor(p,S){super(S),this.condition=p}render(p){let S=`if(${this.condition})`+super.render(p);return this.else&&(S+="else "+this.else.render(p)),S}optimizeNodes(){super.optimizeNodes();const p=this.condition;if(p===!0)return this.nodes;let S=this.else;if(S){const N=S.optimizeNodes();S=this.else=Array.isArray(N)?new a(N):N}if(S)return p===!1?S instanceof u?S:S.nodes:this.nodes.length?this:new u(oe(p),S instanceof u?[S]:S.nodes);if(!(p===!1||!this.nodes.length))return this}optimizeNames(p,S){var N;if(this.else=(N=this.else)===null||N===void 0?void 0:N.optimizeNames(p,S),!!(super.optimizeNames(p,S)||this.else))return this.condition=L(this.condition,p,S),this}get names(){const p=super.names;return F(p,this.condition),this.else&&V(p,this.else.names),p}}u.kind="if";class n extends b{}n.kind="for";class c extends n{constructor(p){super(),this.iteration=p}render(p){return`for(${this.iteration})`+super.render(p)}optimizeNames(p,S){if(super.optimizeNames(p,S))return this.iteration=L(this.iteration,p,S),this}get names(){return V(super.names,this.iteration.names)}}class y extends n{constructor(p,S,N,U){super(),this.varKind=p,this.name=S,this.from=N,this.to=U}render(p){const S=p.es5?r.varKinds.var:this.varKind,{name:N,from:U,to:J}=this;return`for(${S} ${N}=${U}; ${N}<${J}; ${N}++)`+super.render(p)}get names(){const p=F(super.names,this.from);return F(p,this.to)}}class o extends n{constructor(p,S,N,U){super(),this.loop=p,this.varKind=S,this.name=N,this.iterable=U}render(p){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(p)}optimizeNames(p,S){if(super.optimizeNames(p,S))return this.iterable=L(this.iterable,p,S),this}get names(){return V(super.names,this.iterable.names)}}class m extends b{constructor(p,S,N){super(),this.name=p,this.args=S,this.async=N}render(p){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(p)}}m.kind="func";class P extends v{render(p){return"return "+super.render(p)}}P.kind="return";class O extends b{render(p){let S="try"+super.render(p);return this.catch&&(S+=this.catch.render(p)),this.finally&&(S+=this.finally.render(p)),S}optimizeNodes(){var p,S;return super.optimizeNodes(),(p=this.catch)===null||p===void 0||p.optimizeNodes(),(S=this.finally)===null||S===void 0||S.optimizeNodes(),this}optimizeNames(p,S){var N,U;return super.optimizeNames(p,S),(N=this.catch)===null||N===void 0||N.optimizeNames(p,S),(U=this.finally)===null||U===void 0||U.optimizeNames(p,S),this}get names(){const p=super.names;return this.catch&&V(p,this.catch.names),this.finally&&V(p,this.finally.names),p}}class T extends b{constructor(p){super(),this.error=p}render(p){return`catch(${this.error})`+super.render(p)}}T.kind="catch";class z extends b{render(p){return"finally"+super.render(p)}}z.kind="finally";class C{constructor(p,S={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...S,_n:S.lines?`
|
|
2
|
+
`:""},this._extScope=p,this._scope=new r.Scope({parent:p}),this._nodes=[new h]}toString(){return this._root.render(this.opts)}name(p){return this._scope.name(p)}scopeName(p){return this._extScope.name(p)}scopeValue(p,S){const N=this._extScope.value(p,S);return(this._values[N.prefix]||(this._values[N.prefix]=new Set)).add(N),N}getScopeValue(p,S){return this._extScope.getValue(p,S)}scopeRefs(p){return this._extScope.scopeRefs(p,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(p,S,N,U){const J=this._scope.toName(S);return N!==void 0&&U&&(this._constants[J.str]=N),this._leafNode(new l(p,J,N)),J}const(p,S,N){return this._def(r.varKinds.const,p,S,N)}let(p,S,N){return this._def(r.varKinds.let,p,S,N)}var(p,S,N){return this._def(r.varKinds.var,p,S,N)}assign(p,S,N){return this._leafNode(new d(p,S,N))}add(p,S){return this._leafNode(new f(p,e.operators.ADD,S))}code(p){return typeof p=="function"?p():p!==t.nil&&this._leafNode(new _(p)),this}object(...p){const S=["{"];for(const[N,U]of p)S.length>1&&S.push(","),S.push(N),(N!==U||this.opts.es5)&&(S.push(":"),(0,t.addCodeArg)(S,U));return S.push("}"),new t._Code(S)}if(p,S,N){if(this._blockNode(new u(p)),S&&N)this.code(S).else().code(N).endIf();else if(S)this.code(S).endIf();else if(N)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(p){return this._elseNode(new u(p))}else(){return this._elseNode(new a)}endIf(){return this._endBlockNode(u,a)}_for(p,S){return this._blockNode(p),S&&this.code(S).endFor(),this}for(p,S){return this._for(new c(p),S)}forRange(p,S,N,U,J=this.opts.es5?r.varKinds.var:r.varKinds.let){const x=this._scope.toName(p);return this._for(new y(J,x,S,N),()=>U(x))}forOf(p,S,N,U=r.varKinds.const){const J=this._scope.toName(p);if(this.opts.es5){const x=S instanceof t.Name?S:this.var("_arr",S);return this.forRange("_i",0,(0,t._)`${x}.length`,B=>{this.var(J,(0,t._)`${x}[${B}]`),N(J)})}return this._for(new o("of",U,J,S),()=>N(J))}forIn(p,S,N,U=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(p,(0,t._)`Object.keys(${S})`,N);const J=this._scope.toName(p);return this._for(new o("in",U,J,S),()=>N(J))}endFor(){return this._endBlockNode(n)}label(p){return this._leafNode(new w(p))}break(p){return this._leafNode(new $(p))}return(p){const S=new P;if(this._blockNode(S),this.code(p),S.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(P)}try(p,S,N){if(!S&&!N)throw new Error('CodeGen: "try" without "catch" and "finally"');const U=new O;if(this._blockNode(U),this.code(p),S){const J=this.name("e");this._currNode=U.catch=new T(J),S(J)}return N&&(this._currNode=U.finally=new z,this.code(N)),this._endBlockNode(T,z)}throw(p){return this._leafNode(new E(p))}block(p,S){return this._blockStarts.push(this._nodes.length),p&&this.code(p).endBlock(S),this}endBlock(p){const S=this._blockStarts.pop();if(S===void 0)throw new Error("CodeGen: not in self-balancing block");const N=this._nodes.length-S;if(N<0||p!==void 0&&N!==p)throw new Error(`CodeGen: wrong number of nodes: ${N} vs ${p} expected`);return this._nodes.length=S,this}func(p,S=t.nil,N,U){return this._blockNode(new m(p,S,N)),U&&this.code(U).endFunc(),this}endFunc(){return this._endBlockNode(m)}optimize(p=1){for(;p-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(p){return this._currNode.nodes.push(p),this}_blockNode(p){this._currNode.nodes.push(p),this._nodes.push(p)}_endBlockNode(p,S){const N=this._currNode;if(N instanceof p||S&&N instanceof S)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${S?`${p.kind}/${S.kind}`:p.kind}"`)}_elseNode(p){const S=this._currNode;if(!(S instanceof u))throw new Error('CodeGen: "else" without "if"');return this._currNode=S.else=p,this}get _root(){return this._nodes[0]}get _currNode(){const p=this._nodes;return p[p.length-1]}set _currNode(p){const S=this._nodes;S[S.length-1]=p}}e.CodeGen=C;function V(I,p){for(const S in p)I[S]=(I[S]||0)+(p[S]||0);return I}function F(I,p){return p instanceof t._CodeOrName?V(I,p.names):I}function L(I,p,S){if(I instanceof t.Name)return N(I);if(!U(I))return I;return new t._Code(I._items.reduce((J,x)=>(x instanceof t.Name&&(x=N(x)),x instanceof t._Code?J.push(...x._items):J.push(x),J),[]));function N(J){const x=S[J.str];return x===void 0||p[J.str]!==1?J:(delete p[J.str],x)}function U(J){return J instanceof t._Code&&J._items.some(x=>x instanceof t.Name&&p[x.str]===1&&S[x.str]!==void 0)}}function Q(I,p){for(const S in p)I[S]=(I[S]||0)-(p[S]||0)}function oe(I){return typeof I=="boolean"||typeof I=="number"||I===null?!I:(0,t._)`!${D(I)}`}e.not=oe;const ae=j(e.operators.AND);function X(...I){return I.reduce(ae)}e.and=X;const ye=j(e.operators.OR);function M(...I){return I.reduce(ye)}e.or=M;function j(I){return(p,S)=>p===t.nil?S:S===t.nil?p:(0,t._)`${D(p)} ${I} ${D(S)}`}function D(I){return I instanceof t.Name?I:(0,t._)`(${I})`}})(Ut)),Ut}var G={},pr;function Y(){if(pr)return G;pr=1,Object.defineProperty(G,"__esModule",{value:!0}),G.checkStrictMode=G.getErrorPath=G.Type=G.useFunc=G.setEvaluated=G.evaluatedPropsToName=G.mergeEvaluated=G.eachItem=G.unescapeJsonPointer=G.escapeJsonPointer=G.escapeFragment=G.unescapeFragment=G.schemaRefOrVal=G.schemaHasRulesButRef=G.schemaHasRules=G.checkUnknownRules=G.alwaysValidSchema=G.toHash=void 0;const e=H(),t=Ue();function r(o){const m={};for(const P of o)m[P]=!0;return m}G.toHash=r;function i(o,m){return typeof m=="boolean"?m:Object.keys(m).length===0?!0:(g(o,m),!s(m,o.self.RULES.all))}G.alwaysValidSchema=i;function g(o,m=o.schema){const{opts:P,self:O}=o;if(!P.strictSchema||typeof m=="boolean")return;const T=O.RULES.keywords;for(const z in m)T[z]||y(o,`unknown keyword: "${z}"`)}G.checkUnknownRules=g;function s(o,m){if(typeof o=="boolean")return!o;for(const P in o)if(m[P])return!0;return!1}G.schemaHasRules=s;function l(o,m){if(typeof o=="boolean")return!o;for(const P in o)if(P!=="$ref"&&m.all[P])return!0;return!1}G.schemaHasRulesButRef=l;function d({topSchemaRef:o,schemaPath:m},P,O,T){if(!T){if(typeof P=="number"||typeof P=="boolean")return P;if(typeof P=="string")return(0,e._)`${P}`}return(0,e._)`${o}${m}${(0,e.getProperty)(O)}`}G.schemaRefOrVal=d;function f(o){return E(decodeURIComponent(o))}G.unescapeFragment=f;function w(o){return encodeURIComponent($(o))}G.escapeFragment=w;function $(o){return typeof o=="number"?`${o}`:o.replace(/~/g,"~0").replace(/\//g,"~1")}G.escapeJsonPointer=$;function E(o){return o.replace(/~1/g,"/").replace(/~0/g,"~")}G.unescapeJsonPointer=E;function _(o,m){if(Array.isArray(o))for(const P of o)m(P);else m(o)}G.eachItem=_;function v({mergeNames:o,mergeToName:m,mergeValues:P,resultToName:O}){return(T,z,C,V)=>{const F=C===void 0?z:C instanceof e.Name?(z instanceof e.Name?o(T,z,C):m(T,z,C),C):z instanceof e.Name?(m(T,C,z),z):P(z,C);return V===e.Name&&!(F instanceof e.Name)?O(T,F):F}}G.mergeEvaluated={props:v({mergeNames:(o,m,P)=>o.if((0,e._)`${P} !== true && ${m} !== undefined`,()=>{o.if((0,e._)`${m} === true`,()=>o.assign(P,!0),()=>o.assign(P,(0,e._)`${P} || {}`).code((0,e._)`Object.assign(${P}, ${m})`))}),mergeToName:(o,m,P)=>o.if((0,e._)`${P} !== true`,()=>{m===!0?o.assign(P,!0):(o.assign(P,(0,e._)`${P} || {}`),h(o,P,m))}),mergeValues:(o,m)=>o===!0?!0:{...o,...m},resultToName:b}),items:v({mergeNames:(o,m,P)=>o.if((0,e._)`${P} !== true && ${m} !== undefined`,()=>o.assign(P,(0,e._)`${m} === true ? true : ${P} > ${m} ? ${P} : ${m}`)),mergeToName:(o,m,P)=>o.if((0,e._)`${P} !== true`,()=>o.assign(P,m===!0?!0:(0,e._)`${P} > ${m} ? ${P} : ${m}`)),mergeValues:(o,m)=>o===!0?!0:Math.max(o,m),resultToName:(o,m)=>o.var("items",m)})};function b(o,m){if(m===!0)return o.var("props",!0);const P=o.var("props",(0,e._)`{}`);return m!==void 0&&h(o,P,m),P}G.evaluatedPropsToName=b;function h(o,m,P){Object.keys(P).forEach(O=>o.assign((0,e._)`${m}${(0,e.getProperty)(O)}`,!0))}G.setEvaluated=h;const a={};function u(o,m){return o.scopeValue("func",{ref:m,code:a[m.code]||(a[m.code]=new t._Code(m.code))})}G.useFunc=u;var n;(function(o){o[o.Num=0]="Num",o[o.Str=1]="Str"})(n||(G.Type=n={}));function c(o,m,P){if(o instanceof e.Name){const O=m===n.Num;return P?O?(0,e._)`"[" + ${o} + "]"`:(0,e._)`"['" + ${o} + "']"`:O?(0,e._)`"/" + ${o}`:(0,e._)`"/" + ${o}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return P?(0,e.getProperty)(o).toString():"/"+$(o)}G.getErrorPath=c;function y(o,m,P=o.opts.strictSchema){if(P){if(m=`strict mode: ${m}`,P===!0)throw new Error(m);o.self.logger.warn(m)}}return G.checkStrictMode=y,G}var Ke={},mr;function be(){if(mr)return Ke;mr=1,Object.defineProperty(Ke,"__esModule",{value:!0});const e=H(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return Ke.default=t,Ke}var hr;function Je(){return hr||(hr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=H(),r=Y(),i=be();e.keywordError={message:({keyword:a})=>(0,t.str)`must pass "${a}" keyword validation`},e.keyword$DataError={message:({keyword:a,schemaType:u})=>u?(0,t.str)`"${a}" keyword must be ${u} ($data)`:(0,t.str)`"${a}" keyword is invalid ($data)`};function g(a,u=e.keywordError,n,c){const{it:y}=a,{gen:o,compositeRule:m,allErrors:P}=y,O=E(a,u,n);c??(m||P)?f(o,O):w(y,(0,t._)`[${O}]`)}e.reportError=g;function s(a,u=e.keywordError,n){const{it:c}=a,{gen:y,compositeRule:o,allErrors:m}=c,P=E(a,u,n);f(y,P),o||m||w(c,i.default.vErrors)}e.reportExtraError=s;function l(a,u){a.assign(i.default.errors,u),a.if((0,t._)`${i.default.vErrors} !== null`,()=>a.if(u,()=>a.assign((0,t._)`${i.default.vErrors}.length`,u),()=>a.assign(i.default.vErrors,null)))}e.resetErrorsCount=l;function d({gen:a,keyword:u,schemaValue:n,data:c,errsCount:y,it:o}){if(y===void 0)throw new Error("ajv implementation error");const m=a.name("err");a.forRange("i",y,i.default.errors,P=>{a.const(m,(0,t._)`${i.default.vErrors}[${P}]`),a.if((0,t._)`${m}.instancePath === undefined`,()=>a.assign((0,t._)`${m}.instancePath`,(0,t.strConcat)(i.default.instancePath,o.errorPath))),a.assign((0,t._)`${m}.schemaPath`,(0,t.str)`${o.errSchemaPath}/${u}`),o.opts.verbose&&(a.assign((0,t._)`${m}.schema`,n),a.assign((0,t._)`${m}.data`,c))})}e.extendErrors=d;function f(a,u){const n=a.const("err",u);a.if((0,t._)`${i.default.vErrors} === null`,()=>a.assign(i.default.vErrors,(0,t._)`[${n}]`),(0,t._)`${i.default.vErrors}.push(${n})`),a.code((0,t._)`${i.default.errors}++`)}function w(a,u){const{gen:n,validateName:c,schemaEnv:y}=a;y.$async?n.throw((0,t._)`new ${a.ValidationError}(${u})`):(n.assign((0,t._)`${c}.errors`,u),n.return(!1))}const $={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function E(a,u,n){const{createErrors:c}=a.it;return c===!1?(0,t._)`{}`:_(a,u,n)}function _(a,u,n={}){const{gen:c,it:y}=a,o=[v(y,n),b(a,n)];return h(a,u,o),c.object(...o)}function v({errorPath:a},{instancePath:u}){const n=u?(0,t.str)`${a}${(0,r.getErrorPath)(u,r.Type.Str)}`:a;return[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,n)]}function b({keyword:a,it:{errSchemaPath:u}},{schemaPath:n,parentSchema:c}){let y=c?u:(0,t.str)`${u}/${a}`;return n&&(y=(0,t.str)`${y}${(0,r.getErrorPath)(n,r.Type.Str)}`),[$.schemaPath,y]}function h(a,{params:u,message:n},c){const{keyword:y,data:o,schemaValue:m,it:P}=a,{opts:O,propertyName:T,topSchemaRef:z,schemaPath:C}=P;c.push([$.keyword,y],[$.params,typeof u=="function"?u(a):u||(0,t._)`{}`]),O.messages&&c.push([$.message,typeof n=="function"?n(a):n]),O.verbose&&c.push([$.schema,m],[$.parentSchema,(0,t._)`${z}${C}`],[i.default.data,o]),T&&c.push([$.propertyName,T])}})(Lt)),Lt}var yr;function ls(){if(yr)return Ee;yr=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.boolOrEmptySchema=Ee.topBoolOrEmptySchema=void 0;const e=Je(),t=H(),r=be(),i={message:"boolean schema is false"};function g(d){const{gen:f,schema:w,validateName:$}=d;w===!1?l(d,!1):typeof w=="object"&&w.$async===!0?f.return(r.default.data):(f.assign((0,t._)`${$}.errors`,null),f.return(!0))}Ee.topBoolOrEmptySchema=g;function s(d,f){const{gen:w,schema:$}=d;$===!1?(w.var(f,!1),l(d)):w.var(f,!0)}Ee.boolOrEmptySchema=s;function l(d,f){const{gen:w,data:$}=d,E={gen:w,keyword:"false schema",data:$,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:d};(0,e.reportError)(E,i,void 0,f)}return Ee}var re={},ke={},gr;function vr(){if(gr)return ke;gr=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.getRules=ke.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function r(g){return typeof g=="string"&&t.has(g)}ke.isJSONType=r;function i(){const g={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...g,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},g.number,g.string,g.array,g.object],post:{rules:[]},all:{},keywords:{}}}return ke.getRules=i,ke}var _e={},_r;function $r(){if(_r)return _e;_r=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.shouldUseRule=_e.shouldUseGroup=_e.schemaHasRulesForType=void 0;function e({schema:i,self:g},s){const l=g.RULES.types[s];return l&&l!==!0&&t(i,l)}_e.schemaHasRulesForType=e;function t(i,g){return g.rules.some(s=>r(i,s))}_e.shouldUseGroup=t;function r(i,g){var s;return i[g.keyword]!==void 0||((s=g.definition.implements)===null||s===void 0?void 0:s.some(l=>i[l]!==void 0))}return _e.shouldUseRule=r,_e}var br;function He(){if(br)return re;br=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=vr(),t=$r(),r=Je(),i=H(),g=Y();var s;(function(n){n[n.Correct=0]="Correct",n[n.Wrong=1]="Wrong"})(s||(re.DataType=s={}));function l(n){const c=d(n.type);if(c.includes("null")){if(n.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!c.length&&n.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');n.nullable===!0&&c.push("null")}return c}re.getSchemaTypes=l;function d(n){const c=Array.isArray(n)?n:n?[n]:[];if(c.every(e.isJSONType))return c;throw new Error("type must be JSONType or JSONType[]: "+c.join(","))}re.getJSONTypes=d;function f(n,c){const{gen:y,data:o,opts:m}=n,P=$(c,m.coerceTypes),O=c.length>0&&!(P.length===0&&c.length===1&&(0,t.schemaHasRulesForType)(n,c[0]));if(O){const T=b(c,o,m.strictNumbers,s.Wrong);y.if(T,()=>{P.length?E(n,c,P):a(n)})}return O}re.coerceAndCheckDataType=f;const w=new Set(["string","number","integer","boolean","null"]);function $(n,c){return c?n.filter(y=>w.has(y)||c==="array"&&y==="array"):[]}function E(n,c,y){const{gen:o,data:m,opts:P}=n,O=o.let("dataType",(0,i._)`typeof ${m}`),T=o.let("coerced",(0,i._)`undefined`);P.coerceTypes==="array"&&o.if((0,i._)`${O} == 'object' && Array.isArray(${m}) && ${m}.length == 1`,()=>o.assign(m,(0,i._)`${m}[0]`).assign(O,(0,i._)`typeof ${m}`).if(b(c,m,P.strictNumbers),()=>o.assign(T,m))),o.if((0,i._)`${T} !== undefined`);for(const C of y)(w.has(C)||C==="array"&&P.coerceTypes==="array")&&z(C);o.else(),a(n),o.endIf(),o.if((0,i._)`${T} !== undefined`,()=>{o.assign(m,T),_(n,T)});function z(C){switch(C){case"string":o.elseIf((0,i._)`${O} == "number" || ${O} == "boolean"`).assign(T,(0,i._)`"" + ${m}`).elseIf((0,i._)`${m} === null`).assign(T,(0,i._)`""`);return;case"number":o.elseIf((0,i._)`${O} == "boolean" || ${m} === null
|
|
3
3
|
|| (${O} == "string" && ${m} && ${m} == +${m})`).assign(T,(0,i._)`+${m}`);return;case"integer":o.elseIf((0,i._)`${O} === "boolean" || ${m} === null
|
|
4
4
|
|| (${O} === "string" && ${m} && ${m} == +${m} && !(${m} % 1))`).assign(T,(0,i._)`+${m}`);return;case"boolean":o.elseIf((0,i._)`${m} === "false" || ${m} === 0 || ${m} === null`).assign(T,!1).elseIf((0,i._)`${m} === "true" || ${m} === 1`).assign(T,!0);return;case"null":o.elseIf((0,i._)`${m} === "" || ${m} === 0 || ${m} === false`),o.assign(T,null);return;case"array":o.elseIf((0,i._)`${O} === "string" || ${O} === "number"
|
|
5
|
-
|| ${O} === "boolean" || ${m} === null`).assign(T,(0,i._)`[${m}]`)}}}function _({gen:r,parentData:c,parentDataProperty:g},o){r.if((0,i._)`${c} !== undefined`,()=>r.assign((0,i._)`${c}[${g}]`,o))}function v(r,c,g,o=s.Correct){const m=o===s.Correct?i.operators.EQ:i.operators.NEQ;let P;switch(r){case"null":return(0,i._)`${c} ${m} null`;case"array":P=(0,i._)`Array.isArray(${c})`;break;case"object":P=(0,i._)`${c} && typeof ${c} == "object" && !Array.isArray(${c})`;break;case"integer":P=O((0,i._)`!(${c} % 1) && !isNaN(${c})`);break;case"number":P=O();break;default:return(0,i._)`typeof ${c} ${m} ${r}`}return o===s.Correct?P:(0,i.not)(P);function O(T=i.nil){return(0,i.and)((0,i._)`typeof ${c} == "number"`,T,g?(0,i._)`isFinite(${c})`:i.nil)}}re.checkDataType=v;function b(r,c,g,o){if(r.length===1)return v(r[0],c,g,o);let m;const P=(0,y.toHash)(r);if(P.array&&P.object){const O=(0,i._)`typeof ${c} != "object"`;m=P.null?O:(0,i._)`!${c} || ${O}`,delete P.null,delete P.array,delete P.object}else m=i.nil;P.number&&delete P.integer;for(const O in P)m=(0,i.and)(m,v(O,c,g,o));return m}re.checkDataTypes=b;const h={message:({schema:r})=>`must be ${r}`,params:({schema:r,schemaValue:c})=>typeof r=="string"?(0,i._)`{type: ${r}}`:(0,i._)`{type: ${c}}`};function a(r){const c=u(r);(0,n.reportError)(c,h)}re.reportTypeError=a;function u(r){const{gen:c,data:g,schema:o}=r,m=(0,y.schemaRefOrVal)(r,o,"type");return{gen:c,keyword:"type",data:g,schema:o.type,schemaCode:m,schemaValue:m,parentSchema:o,params:{},it:r}}return re}var De={},wr;function fs(){if(wr)return De;wr=1,Object.defineProperty(De,"__esModule",{value:!0}),De.assignDefaults=void 0;const e=H(),t=Y();function n(y,s){const{properties:l,items:d}=y.schema;if(s==="object"&&l)for(const f in l)i(y,f,l[f].default);else s==="array"&&Array.isArray(d)&&d.forEach((f,w)=>i(y,w,f.default))}De.assignDefaults=n;function i(y,s,l){const{gen:d,compositeRule:f,data:w,opts:$}=y;if(l===void 0)return;const E=(0,e._)`${w}${(0,e.getProperty)(s)}`;if(f){(0,t.checkStrictMode)(y,`default is ignored for: ${E}`);return}let _=(0,e._)`${E} === undefined`;$.useDefaults==="empty"&&(_=(0,e._)`${_} || ${E} === null || ${E} === ""`),d.if(_,(0,e._)`${E} = ${(0,e.stringify)(l)}`)}return De}var pe={},Z={},Pr;function me(){if(Pr)return Z;Pr=1,Object.defineProperty(Z,"__esModule",{value:!0}),Z.validateUnion=Z.validateArray=Z.usePattern=Z.callValidateCode=Z.schemaProperties=Z.allSchemaProperties=Z.noPropertyInData=Z.propertyInData=Z.isOwnProperty=Z.hasPropFunc=Z.reportMissingProp=Z.checkMissingProp=Z.checkReportMissingProp=void 0;const e=H(),t=Y(),n=be(),i=Y();function y(r,c){const{gen:g,data:o,it:m}=r;g.if($(g,o,c,m.opts.ownProperties),()=>{r.setParams({missingProperty:(0,e._)`${c}`},!0),r.error()})}Z.checkReportMissingProp=y;function s({gen:r,data:c,it:{opts:g}},o,m){return(0,e.or)(...o.map(P=>(0,e.and)($(r,c,P,g.ownProperties),(0,e._)`${m} = ${P}`)))}Z.checkMissingProp=s;function l(r,c){r.setParams({missingProperty:c},!0),r.error()}Z.reportMissingProp=l;function d(r){return r.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}Z.hasPropFunc=d;function f(r,c,g){return(0,e._)`${d(r)}.call(${c}, ${g})`}Z.isOwnProperty=f;function w(r,c,g,o){const m=(0,e._)`${c}${(0,e.getProperty)(g)} !== undefined`;return o?(0,e._)`${m} && ${f(r,c,g)}`:m}Z.propertyInData=w;function $(r,c,g,o){const m=(0,e._)`${c}${(0,e.getProperty)(g)} === undefined`;return o?(0,e.or)(m,(0,e.not)(f(r,c,g))):m}Z.noPropertyInData=$;function E(r){return r?Object.keys(r).filter(c=>c!=="__proto__"):[]}Z.allSchemaProperties=E;function _(r,c){return E(c).filter(g=>!(0,t.alwaysValidSchema)(r,c[g]))}Z.schemaProperties=_;function v({schemaCode:r,data:c,it:{gen:g,topSchemaRef:o,schemaPath:m,errorPath:P},it:O},T,z,C){const V=C?(0,e._)`${r}, ${c}, ${o}${m}`:c,F=[[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,P)],[n.default.parentData,O.parentData],[n.default.parentDataProperty,O.parentDataProperty],[n.default.rootData,n.default.rootData]];O.opts.dynamicRef&&F.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);const L=(0,e._)`${V}, ${g.object(...F)}`;return z!==e.nil?(0,e._)`${T}.call(${z}, ${L})`:(0,e._)`${T}(${L})`}Z.callValidateCode=v;const b=(0,e._)`new RegExp`;function h({gen:r,it:{opts:c}},g){const o=c.unicodeRegExp?"u":"",{regExp:m}=c.code,P=m(g,o);return r.scopeValue("pattern",{key:P.toString(),ref:P,code:(0,e._)`${m.code==="new RegExp"?b:(0,i.useFunc)(r,m)}(${g}, ${o})`})}Z.usePattern=h;function a(r){const{gen:c,data:g,keyword:o,it:m}=r,P=c.name("valid");if(m.allErrors){const T=c.let("valid",!0);return O(()=>c.assign(T,!1)),T}return c.var(P,!0),O(()=>c.break()),P;function O(T){const z=c.const("len",(0,e._)`${g}.length`);c.forRange("i",0,z,C=>{r.subschema({keyword:o,dataProp:C,dataPropType:t.Type.Num},P),c.if((0,e.not)(P),T)})}}Z.validateArray=a;function u(r){const{gen:c,schema:g,keyword:o,it:m}=r;if(!Array.isArray(g))throw new Error("ajv implementation error");if(g.some(z=>(0,t.alwaysValidSchema)(m,z))&&!m.opts.unevaluated)return;const O=c.let("valid",!1),T=c.name("_valid");c.block(()=>g.forEach((z,C)=>{const V=r.subschema({keyword:o,schemaProp:C,compositeRule:!0},T);c.assign(O,(0,e._)`${O} || ${T}`),r.mergeValidEvaluated(V,T)||c.if((0,e.not)(O))})),r.result(O,()=>r.reset(),()=>r.error(!0))}return Z.validateUnion=u,Z}var Sr;function ps(){if(Sr)return pe;Sr=1,Object.defineProperty(pe,"__esModule",{value:!0}),pe.validateKeywordUsage=pe.validSchemaType=pe.funcKeywordCode=pe.macroKeywordCode=void 0;const e=H(),t=be(),n=me(),i=Je();function y(_,v){const{gen:b,keyword:h,schema:a,parentSchema:u,it:r}=_,c=v.macro.call(r.self,a,u,r),g=w(b,h,c);r.opts.validateSchema!==!1&&r.self.validateSchema(c,!0);const o=b.name("valid");_.subschema({schema:c,schemaPath:e.nil,errSchemaPath:`${r.errSchemaPath}/${h}`,topSchemaRef:g,compositeRule:!0},o),_.pass(o,()=>_.error(!0))}pe.macroKeywordCode=y;function s(_,v){var b;const{gen:h,keyword:a,schema:u,parentSchema:r,$data:c,it:g}=_;f(g,v);const o=!c&&v.compile?v.compile.call(g.self,u,r,g):v.validate,m=w(h,a,o),P=h.let("valid");_.block$data(P,O),_.ok((b=v.valid)!==null&&b!==void 0?b:P);function O(){if(v.errors===!1)C(),v.modifying&&l(_),V(()=>_.error());else{const F=v.async?T():z();v.modifying&&l(_),V(()=>d(_,F))}}function T(){const F=h.let("ruleErrs",null);return h.try(()=>C((0,e._)`await `),L=>h.assign(P,!1).if((0,e._)`${L} instanceof ${g.ValidationError}`,()=>h.assign(F,(0,e._)`${L}.errors`),()=>h.throw(L))),F}function z(){const F=(0,e._)`${m}.errors`;return h.assign(F,null),C(e.nil),F}function C(F=v.async?(0,e._)`await `:e.nil){const L=g.opts.passContext?t.default.this:t.default.self,Q=!("compile"in v&&!c||v.schema===!1);h.assign(P,(0,e._)`${F}${(0,n.callValidateCode)(_,m,L,Q)}`,v.modifying)}function V(F){var L;h.if((0,e.not)((L=v.valid)!==null&&L!==void 0?L:P),F)}}pe.funcKeywordCode=s;function l(_){const{gen:v,data:b,it:h}=_;v.if(h.parentData,()=>v.assign(b,(0,e._)`${h.parentData}[${h.parentDataProperty}]`))}function d(_,v){const{gen:b}=_;b.if((0,e._)`Array.isArray(${v})`,()=>{b.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${v} : ${t.default.vErrors}.concat(${v})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,i.extendErrors)(_)},()=>_.error())}function f({schemaEnv:_},v){if(v.async&&!_.$async)throw new Error("async keyword in sync schema")}function w(_,v,b){if(b===void 0)throw new Error(`keyword "${v}" failed to compile`);return _.scopeValue("keyword",typeof b=="function"?{ref:b}:{ref:b,code:(0,e.stringify)(b)})}function $(_,v,b=!1){return!v.length||v.some(h=>h==="array"?Array.isArray(_):h==="object"?_&&typeof _=="object"&&!Array.isArray(_):typeof _==h||b&&typeof _>"u")}pe.validSchemaType=$;function E({schema:_,opts:v,self:b,errSchemaPath:h},a,u){if(Array.isArray(a.keyword)?!a.keyword.includes(u):a.keyword!==u)throw new Error("ajv implementation error");const r=a.dependencies;if(r?.some(c=>!Object.prototype.hasOwnProperty.call(_,c)))throw new Error(`parent schema must have dependencies of ${u}: ${r.join(",")}`);if(a.validateSchema&&!a.validateSchema(_[u])){const g=`keyword "${u}" value is invalid at path "${h}": `+b.errorsText(a.validateSchema.errors);if(v.validateSchema==="log")b.logger.error(g);else throw new Error(g)}}return pe.validateKeywordUsage=E,pe}var $e={},Er;function ms(){if(Er)return $e;Er=1,Object.defineProperty($e,"__esModule",{value:!0}),$e.extendSubschemaMode=$e.extendSubschemaData=$e.getSubschema=void 0;const e=H(),t=Y();function n(s,{keyword:l,schemaProp:d,schema:f,schemaPath:w,errSchemaPath:$,topSchemaRef:E}){if(l!==void 0&&f!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(l!==void 0){const _=s.schema[l];return d===void 0?{schema:_,schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(l)}`,errSchemaPath:`${s.errSchemaPath}/${l}`}:{schema:_[d],schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(l)}${(0,e.getProperty)(d)}`,errSchemaPath:`${s.errSchemaPath}/${l}/${(0,t.escapeFragment)(d)}`}}if(f!==void 0){if(w===void 0||$===void 0||E===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:f,schemaPath:w,topSchemaRef:E,errSchemaPath:$}}throw new Error('either "keyword" or "schema" must be passed')}$e.getSubschema=n;function i(s,l,{dataProp:d,dataPropType:f,data:w,dataTypes:$,propertyName:E}){if(w!==void 0&&d!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:_}=l;if(d!==void 0){const{errorPath:b,dataPathArr:h,opts:a}=l,u=_.let("data",(0,e._)`${l.data}${(0,e.getProperty)(d)}`,!0);v(u),s.errorPath=(0,e.str)`${b}${(0,t.getErrorPath)(d,f,a.jsPropertySyntax)}`,s.parentDataProperty=(0,e._)`${d}`,s.dataPathArr=[...h,s.parentDataProperty]}if(w!==void 0){const b=w instanceof e.Name?w:_.let("data",w,!0);v(b),E!==void 0&&(s.propertyName=E)}$&&(s.dataTypes=$);function v(b){s.data=b,s.dataLevel=l.dataLevel+1,s.dataTypes=[],l.definedProperties=new Set,s.parentData=l.data,s.dataNames=[...l.dataNames,b]}}$e.extendSubschemaData=i;function y(s,{jtdDiscriminator:l,jtdMetadata:d,compositeRule:f,createErrors:w,allErrors:$}){f!==void 0&&(s.compositeRule=f),w!==void 0&&(s.createErrors=w),$!==void 0&&(s.allErrors=$),s.jtdDiscriminator=l,s.jtdMetadata=d}return $e.extendSubschemaMode=y,$e}var ie={},Ht,kr;function jr(){return kr||(kr=1,Ht=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var i,y,s;if(Array.isArray(t)){if(i=t.length,i!=n.length)return!1;for(y=i;y--!==0;)if(!e(t[y],n[y]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(s=Object.keys(t),i=s.length,i!==Object.keys(n).length)return!1;for(y=i;y--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[y]))return!1;for(y=i;y--!==0;){var l=s[y];if(!e(t[l],n[l]))return!1}return!0}return t!==t&&n!==n}),Ht}var Gt={exports:{}},Ir;function hs(){if(Ir)return Gt.exports;Ir=1;var e=Gt.exports=function(i,y,s){typeof y=="function"&&(s=y,y={}),s=y.cb||s;var l=typeof s=="function"?s:s.pre||function(){},d=s.post||function(){};t(y,l,d,i,"",i)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(i,y,s,l,d,f,w,$,E,_){if(l&&typeof l=="object"&&!Array.isArray(l)){y(l,d,f,w,$,E,_);for(var v in l){var b=l[v];if(Array.isArray(b)){if(v in e.arrayKeywords)for(var h=0;h<b.length;h++)t(i,y,s,b[h],d+"/"+v+"/"+h,f,d,v,l,h)}else if(v in e.propsKeywords){if(b&&typeof b=="object")for(var a in b)t(i,y,s,b[a],d+"/"+v+"/"+n(a),f,d,v,l,a)}else(v in e.keywords||i.allKeys&&!(v in e.skipKeywords))&&t(i,y,s,b,d+"/"+v,f,d,v,l)}s(l,d,f,w,$,E,_)}}function n(i){return i.replace(/~/g,"~0").replace(/\//g,"~1")}return Gt.exports}var Rr;function Ge(){if(Rr)return ie;Rr=1,Object.defineProperty(ie,"__esModule",{value:!0}),ie.getSchemaRefs=ie.resolveUrl=ie.normalizeId=ie._getFullPath=ie.getFullPath=ie.inlineRef=void 0;const e=Y(),t=jr(),n=hs(),i=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function y(h,a=!0){return typeof h=="boolean"?!0:a===!0?!l(h):a?d(h)<=a:!1}ie.inlineRef=y;const s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function l(h){for(const a in h){if(s.has(a))return!0;const u=h[a];if(Array.isArray(u)&&u.some(l)||typeof u=="object"&&l(u))return!0}return!1}function d(h){let a=0;for(const u in h){if(u==="$ref")return 1/0;if(a++,!i.has(u)&&(typeof h[u]=="object"&&(0,e.eachItem)(h[u],r=>a+=d(r)),a===1/0))return 1/0}return a}function f(h,a="",u){u!==!1&&(a=E(a));const r=h.parse(a);return w(h,r)}ie.getFullPath=f;function w(h,a){return h.serialize(a).split("#")[0]+"#"}ie._getFullPath=w;const $=/#\/?$/;function E(h){return h?h.replace($,""):""}ie.normalizeId=E;function _(h,a,u){return u=E(u),h.resolve(a,u)}ie.resolveUrl=_;const v=/^[a-z_][-a-z0-9._]*$/i;function b(h,a){if(typeof h=="boolean")return{};const{schemaId:u,uriResolver:r}=this.opts,c=E(h[u]||a),g={"":c},o=f(r,c,!1),m={},P=new Set;return n(h,{allKeys:!0},(z,C,V,F)=>{if(F===void 0)return;const L=o+C;let Q=g[F];typeof z[u]=="string"&&(Q=oe.call(this,z[u])),ae.call(this,z.$anchor),ae.call(this,z.$dynamicAnchor),g[C]=Q;function oe(X){const ye=this.opts.uriResolver.resolve;if(X=E(Q?ye(Q,X):X),P.has(X))throw T(X);P.add(X);let M=this.refs[X];return typeof M=="string"&&(M=this.refs[M]),typeof M=="object"?O(z,M.schema,X):X!==E(L)&&(X[0]==="#"?(O(z,m[X],X),m[X]=z):this.refs[X]=L),X}function ae(X){if(typeof X=="string"){if(!v.test(X))throw new Error(`invalid anchor "${X}"`);oe.call(this,`#${X}`)}}}),m;function O(z,C,V){if(C!==void 0&&!t(z,C))throw T(V)}function T(z){return new Error(`reference "${z}" resolves to more than one schema`)}}return ie.getSchemaRefs=b,ie}var Or;function We(){if(Or)return ve;Or=1,Object.defineProperty(ve,"__esModule",{value:!0}),ve.getData=ve.KeywordCxt=ve.validateFunctionCode=void 0;const e=ls(),t=He(),n=$r(),i=He(),y=fs(),s=ps(),l=ms(),d=H(),f=be(),w=Ge(),$=Y(),E=Je();function _(k){if(o(k)&&(P(k),g(k))){a(k);return}v(k,()=>(0,e.topBoolOrEmptySchema)(k))}ve.validateFunctionCode=_;function v({gen:k,validateName:I,schema:q,schemaEnv:A,opts:K},W){K.code.es5?k.func(I,(0,d._)`${f.default.data}, ${f.default.valCxt}`,A.$async,()=>{k.code((0,d._)`"use strict"; ${r(q,K)}`),h(k,K),k.code(W)}):k.func(I,(0,d._)`${f.default.data}, ${b(K)}`,A.$async,()=>k.code(r(q,K)).code(W))}function b(k){return(0,d._)`{${f.default.instancePath}="", ${f.default.parentData}, ${f.default.parentDataProperty}, ${f.default.rootData}=${f.default.data}${k.dynamicRef?(0,d._)`, ${f.default.dynamicAnchors}={}`:d.nil}}={}`}function h(k,I){k.if(f.default.valCxt,()=>{k.var(f.default.instancePath,(0,d._)`${f.default.valCxt}.${f.default.instancePath}`),k.var(f.default.parentData,(0,d._)`${f.default.valCxt}.${f.default.parentData}`),k.var(f.default.parentDataProperty,(0,d._)`${f.default.valCxt}.${f.default.parentDataProperty}`),k.var(f.default.rootData,(0,d._)`${f.default.valCxt}.${f.default.rootData}`),I.dynamicRef&&k.var(f.default.dynamicAnchors,(0,d._)`${f.default.valCxt}.${f.default.dynamicAnchors}`)},()=>{k.var(f.default.instancePath,(0,d._)`""`),k.var(f.default.parentData,(0,d._)`undefined`),k.var(f.default.parentDataProperty,(0,d._)`undefined`),k.var(f.default.rootData,f.default.data),I.dynamicRef&&k.var(f.default.dynamicAnchors,(0,d._)`{}`)})}function a(k){const{schema:I,opts:q,gen:A}=k;v(k,()=>{q.$comment&&I.$comment&&F(k),z(k),A.let(f.default.vErrors,null),A.let(f.default.errors,0),q.unevaluated&&u(k),O(k),L(k)})}function u(k){const{gen:I,validateName:q}=k;k.evaluated=I.const("evaluated",(0,d._)`${q}.evaluated`),I.if((0,d._)`${k.evaluated}.dynamicProps`,()=>I.assign((0,d._)`${k.evaluated}.props`,(0,d._)`undefined`)),I.if((0,d._)`${k.evaluated}.dynamicItems`,()=>I.assign((0,d._)`${k.evaluated}.items`,(0,d._)`undefined`))}function r(k,I){const q=typeof k=="object"&&k[I.schemaId];return q&&(I.code.source||I.code.process)?(0,d._)`/*# sourceURL=${q} */`:d.nil}function c(k,I){if(o(k)&&(P(k),g(k))){m(k,I);return}(0,e.boolOrEmptySchema)(k,I)}function g({schema:k,self:I}){if(typeof k=="boolean")return!k;for(const q in k)if(I.RULES.all[q])return!0;return!1}function o(k){return typeof k.schema!="boolean"}function m(k,I){const{schema:q,gen:A,opts:K}=k;K.$comment&&q.$comment&&F(k),C(k),V(k);const W=A.const("_errs",f.default.errors);O(k,W),A.var(I,(0,d._)`${W} === ${f.default.errors}`)}function P(k){(0,$.checkUnknownRules)(k),T(k)}function O(k,I){if(k.opts.jtd)return oe(k,[],!1,I);const q=(0,t.getSchemaTypes)(k.schema),A=(0,t.coerceAndCheckDataType)(k,q);oe(k,q,!A,I)}function T(k){const{schema:I,errSchemaPath:q,opts:A,self:K}=k;I.$ref&&A.ignoreKeywordsWithRef&&(0,$.schemaHasRulesButRef)(I,K.RULES)&&K.logger.warn(`$ref: keywords ignored in schema at path "${q}"`)}function z(k){const{schema:I,opts:q}=k;I.default!==void 0&&q.useDefaults&&q.strictSchema&&(0,$.checkStrictMode)(k,"default is ignored in the schema root")}function C(k){const I=k.schema[k.opts.schemaId];I&&(k.baseId=(0,w.resolveUrl)(k.opts.uriResolver,k.baseId,I))}function V(k){if(k.schema.$async&&!k.schemaEnv.$async)throw new Error("async schema in sync schema")}function F({gen:k,schemaEnv:I,schema:q,errSchemaPath:A,opts:K}){const W=q.$comment;if(K.$comment===!0)k.code((0,d._)`${f.default.self}.logger.log(${W})`);else if(typeof K.$comment=="function"){const ne=(0,d.str)`${A}/$comment`,ge=k.scopeValue("root",{ref:I.root});k.code((0,d._)`${f.default.self}.opts.$comment(${W}, ${ne}, ${ge}.schema)`)}}function L(k){const{gen:I,schemaEnv:q,validateName:A,ValidationError:K,opts:W}=k;q.$async?I.if((0,d._)`${f.default.errors} === 0`,()=>I.return(f.default.data),()=>I.throw((0,d._)`new ${K}(${f.default.vErrors})`)):(I.assign((0,d._)`${A}.errors`,f.default.vErrors),W.unevaluated&&Q(k),I.return((0,d._)`${f.default.errors} === 0`))}function Q({gen:k,evaluated:I,props:q,items:A}){q instanceof d.Name&&k.assign((0,d._)`${I}.props`,q),A instanceof d.Name&&k.assign((0,d._)`${I}.items`,A)}function oe(k,I,q,A){const{gen:K,schema:W,data:ne,allErrors:ge,opts:ce,self:de}=k,{RULES:se}=de;if(W.$ref&&(ce.ignoreKeywordsWithRef||!(0,$.schemaHasRulesButRef)(W,se))){K.block(()=>U(k,"$ref",se.all.$ref.definition));return}ce.jtd||X(k,I),K.block(()=>{for(const fe of se.rules)qe(fe);qe(se.post)});function qe(fe){(0,n.shouldUseGroup)(W,fe)&&(fe.type?(K.if((0,i.checkDataType)(fe.type,ne,ce.strictNumbers)),ae(k,fe),I.length===1&&I[0]===fe.type&&q&&(K.else(),(0,i.reportTypeError)(k)),K.endIf()):ae(k,fe),ge||K.if((0,d._)`${f.default.errors} === ${A||0}`))}}function ae(k,I){const{gen:q,schema:A,opts:{useDefaults:K}}=k;K&&(0,y.assignDefaults)(k,I.type),q.block(()=>{for(const W of I.rules)(0,n.shouldUseRule)(A,W)&&U(k,W.keyword,W.definition,I.type)})}function X(k,I){k.schemaEnv.meta||!k.opts.strictTypes||(ye(k,I),k.opts.allowUnionTypes||M(k,I),j(k,k.dataTypes))}function ye(k,I){if(I.length){if(!k.dataTypes.length){k.dataTypes=I;return}I.forEach(q=>{R(k.dataTypes,q)||S(k,`type "${q}" not allowed by context "${k.dataTypes.join(",")}"`)}),p(k,I)}}function M(k,I){I.length>1&&!(I.length===2&&I.includes("null"))&&S(k,"use allowUnionTypes to allow union type keyword")}function j(k,I){const q=k.self.RULES.all;for(const A in q){const K=q[A];if(typeof K=="object"&&(0,n.shouldUseRule)(k.schema,K)){const{type:W}=K.definition;W.length&&!W.some(ne=>D(I,ne))&&S(k,`missing type "${W.join(",")}" for keyword "${A}"`)}}}function D(k,I){return k.includes(I)||I==="number"&&k.includes("integer")}function R(k,I){return k.includes(I)||I==="integer"&&k.includes("number")}function p(k,I){const q=[];for(const A of k.dataTypes)R(I,A)?q.push(A):I.includes("integer")&&A==="number"&&q.push("integer");k.dataTypes=q}function S(k,I){const q=k.schemaEnv.baseId+k.errSchemaPath;I+=` at "${q}" (strictTypes)`,(0,$.checkStrictMode)(k,I,k.opts.strictTypes)}class N{constructor(I,q,A){if((0,s.validateKeywordUsage)(I,q,A),this.gen=I.gen,this.allErrors=I.allErrors,this.keyword=A,this.data=I.data,this.schema=I.schema[A],this.$data=q.$data&&I.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,$.schemaRefOrVal)(I,this.schema,A,this.$data),this.schemaType=q.schemaType,this.parentSchema=I.schema,this.params={},this.it=I,this.def=q,this.$data)this.schemaCode=I.gen.const("vSchema",B(this.$data,I));else if(this.schemaCode=this.schemaValue,!(0,s.validSchemaType)(this.schema,q.schemaType,q.allowUndefined))throw new Error(`${A} value must be ${JSON.stringify(q.schemaType)}`);("code"in q?q.trackErrors:q.errors!==!1)&&(this.errsCount=I.gen.const("_errs",f.default.errors))}result(I,q,A){this.failResult((0,d.not)(I),q,A)}failResult(I,q,A){this.gen.if(I),A?A():this.error(),q?(this.gen.else(),q(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(I,q){this.failResult((0,d.not)(I),void 0,q)}fail(I){if(I===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(I),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(I){if(!this.$data)return this.fail(I);const{schemaCode:q}=this;this.fail((0,d._)`${q} !== undefined && (${(0,d.or)(this.invalid$data(),I)})`)}error(I,q,A){if(q){this.setParams(q),this._error(I,A),this.setParams({});return}this._error(I,A)}_error(I,q){(I?E.reportExtraError:E.reportError)(this,this.def.error,q)}$dataError(){(0,E.reportError)(this,this.def.$dataError||E.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,E.resetErrorsCount)(this.gen,this.errsCount)}ok(I){this.allErrors||this.gen.if(I)}setParams(I,q){q?Object.assign(this.params,I):this.params=I}block$data(I,q,A=d.nil){this.gen.block(()=>{this.check$data(I,A),q()})}check$data(I=d.nil,q=d.nil){if(!this.$data)return;const{gen:A,schemaCode:K,schemaType:W,def:ne}=this;A.if((0,d.or)((0,d._)`${K} === undefined`,q)),I!==d.nil&&A.assign(I,!0),(W.length||ne.validateSchema)&&(A.elseIf(this.invalid$data()),this.$dataError(),I!==d.nil&&A.assign(I,!1)),A.else()}invalid$data(){const{gen:I,schemaCode:q,schemaType:A,def:K,it:W}=this;return(0,d.or)(ne(),ge());function ne(){if(A.length){if(!(q instanceof d.Name))throw new Error("ajv implementation error");const ce=Array.isArray(A)?A:[A];return(0,d._)`${(0,i.checkDataTypes)(ce,q,W.opts.strictNumbers,i.DataType.Wrong)}`}return d.nil}function ge(){if(K.validateSchema){const ce=I.scopeValue("validate$data",{ref:K.validateSchema});return(0,d._)`!${ce}(${q})`}return d.nil}}subschema(I,q){const A=(0,l.getSubschema)(this.it,I);(0,l.extendSubschemaData)(A,this.it,I),(0,l.extendSubschemaMode)(A,I);const K={...this.it,...A,items:void 0,props:void 0};return c(K,q),K}mergeEvaluated(I,q){const{it:A,gen:K}=this;A.opts.unevaluated&&(A.props!==!0&&I.props!==void 0&&(A.props=$.mergeEvaluated.props(K,I.props,A.props,q)),A.items!==!0&&I.items!==void 0&&(A.items=$.mergeEvaluated.items(K,I.items,A.items,q)))}mergeValidEvaluated(I,q){const{it:A,gen:K}=this;if(A.opts.unevaluated&&(A.props!==!0||A.items!==!0))return K.if(q,()=>this.mergeEvaluated(I,d.Name)),!0}}ve.KeywordCxt=N;function U(k,I,q,A){const K=new N(k,q,I);"code"in q?q.code(K,A):K.$data&&q.validate?(0,s.funcKeywordCode)(K,q):"macro"in q?(0,s.macroKeywordCode)(K,q):(q.compile||q.validate)&&(0,s.funcKeywordCode)(K,q)}const J=/^\/(?:[^~]|~0|~1)*$/,x=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function B(k,{dataLevel:I,dataNames:q,dataPathArr:A}){let K,W;if(k==="")return f.default.rootData;if(k[0]==="/"){if(!J.test(k))throw new Error(`Invalid JSON-pointer: ${k}`);K=k,W=f.default.rootData}else{const de=x.exec(k);if(!de)throw new Error(`Invalid JSON-pointer: ${k}`);const se=+de[1];if(K=de[2],K==="#"){if(se>=I)throw new Error(ce("property/index",se));return A[I-se]}if(se>I)throw new Error(ce("data",se));if(W=q[I-se],!K)return W}let ne=W;const ge=K.split("/");for(const de of ge)de&&(W=(0,d._)`${W}${(0,d.getProperty)((0,$.unescapeJsonPointer)(de))}`,ne=(0,d._)`${ne} && ${W}`);return ne;function ce(de,se){return`Cannot access ${de} ${se} levels up, current level is ${I}`}}return ve.getData=B,ve}var Be={},Nr;function Wt(){if(Nr)return Be;Nr=1,Object.defineProperty(Be,"__esModule",{value:!0});class e extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}}return Be.default=e,Be}var Ye={},Cr;function xe(){if(Cr)return Ye;Cr=1,Object.defineProperty(Ye,"__esModule",{value:!0});const e=Ge();class t extends Error{constructor(i,y,s,l){super(l||`can't resolve reference ${s} from id ${y}`),this.missingRef=(0,e.resolveUrl)(i,y,s),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(i,this.missingRef))}}return Ye.default=t,Ye}var ue={},qr;function Bt(){if(qr)return ue;qr=1,Object.defineProperty(ue,"__esModule",{value:!0}),ue.resolveSchema=ue.getCompilingSchema=ue.resolveRef=ue.compileSchema=ue.SchemaEnv=void 0;const e=H(),t=Wt(),n=be(),i=Ge(),y=Y(),s=We();class l{constructor(u){var r;this.refs={},this.dynamicAnchors={};let c;typeof u.schema=="object"&&(c=u.schema),this.schema=u.schema,this.schemaId=u.schemaId,this.root=u.root||this,this.baseId=(r=u.baseId)!==null&&r!==void 0?r:(0,i.normalizeId)(c?.[u.schemaId||"$id"]),this.schemaPath=u.schemaPath,this.localRefs=u.localRefs,this.meta=u.meta,this.$async=c?.$async,this.refs={}}}ue.SchemaEnv=l;function d(a){const u=$.call(this,a);if(u)return u;const r=(0,i.getFullPath)(this.opts.uriResolver,a.root.baseId),{es5:c,lines:g}=this.opts.code,{ownProperties:o}=this.opts,m=new e.CodeGen(this.scope,{es5:c,lines:g,ownProperties:o});let P;a.$async&&(P=m.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const O=m.scopeName("validate");a.validateName=O;const T={gen:m,allErrors:this.opts.allErrors,data:n.default.data,parentData:n.default.parentData,parentDataProperty:n.default.parentDataProperty,dataNames:[n.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:m.scopeValue("schema",this.opts.code.source===!0?{ref:a.schema,code:(0,e.stringify)(a.schema)}:{ref:a.schema}),validateName:O,ValidationError:P,schema:a.schema,schemaEnv:a,rootId:r,baseId:a.baseId||r,schemaPath:e.nil,errSchemaPath:a.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let z;try{this._compilations.add(a),(0,s.validateFunctionCode)(T),m.optimize(this.opts.code.optimize);const C=m.toString();z=`${m.scopeRefs(n.default.scope)}return ${C}`,this.opts.code.process&&(z=this.opts.code.process(z,a));const F=new Function(`${n.default.self}`,`${n.default.scope}`,z)(this,this.scope.get());if(this.scope.value(O,{ref:F}),F.errors=null,F.schema=a.schema,F.schemaEnv=a,a.$async&&(F.$async=!0),this.opts.code.source===!0&&(F.source={validateName:O,validateCode:C,scopeValues:m._values}),this.opts.unevaluated){const{props:L,items:Q}=T;F.evaluated={props:L instanceof e.Name?void 0:L,items:Q instanceof e.Name?void 0:Q,dynamicProps:L instanceof e.Name,dynamicItems:Q instanceof e.Name},F.source&&(F.source.evaluated=(0,e.stringify)(F.evaluated))}return a.validate=F,a}catch(C){throw delete a.validate,delete a.validateName,z&&this.logger.error("Error compiling schema, function code:",z),C}finally{this._compilations.delete(a)}}ue.compileSchema=d;function f(a,u,r){var c;r=(0,i.resolveUrl)(this.opts.uriResolver,u,r);const g=a.refs[r];if(g)return g;let o=_.call(this,a,r);if(o===void 0){const m=(c=a.localRefs)===null||c===void 0?void 0:c[r],{schemaId:P}=this.opts;m&&(o=new l({schema:m,schemaId:P,root:a,baseId:u}))}if(o!==void 0)return a.refs[r]=w.call(this,o)}ue.resolveRef=f;function w(a){return(0,i.inlineRef)(a.schema,this.opts.inlineRefs)?a.schema:a.validate?a:d.call(this,a)}function $(a){for(const u of this._compilations)if(E(u,a))return u}ue.getCompilingSchema=$;function E(a,u){return a.schema===u.schema&&a.root===u.root&&a.baseId===u.baseId}function _(a,u){let r;for(;typeof(r=this.refs[u])=="string";)u=r;return r||this.schemas[u]||v.call(this,a,u)}function v(a,u){const r=this.opts.uriResolver.parse(u),c=(0,i._getFullPath)(this.opts.uriResolver,r);let g=(0,i.getFullPath)(this.opts.uriResolver,a.baseId,void 0);if(Object.keys(a.schema).length>0&&c===g)return h.call(this,r,a);const o=(0,i.normalizeId)(c),m=this.refs[o]||this.schemas[o];if(typeof m=="string"){const P=v.call(this,a,m);return typeof P?.schema!="object"?void 0:h.call(this,r,P)}if(typeof m?.schema=="object"){if(m.validate||d.call(this,m),o===(0,i.normalizeId)(u)){const{schema:P}=m,{schemaId:O}=this.opts,T=P[O];return T&&(g=(0,i.resolveUrl)(this.opts.uriResolver,g,T)),new l({schema:P,schemaId:O,root:a,baseId:g})}return h.call(this,r,m)}}ue.resolveSchema=v;const b=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function h(a,{baseId:u,schema:r,root:c}){var g;if(((g=a.fragment)===null||g===void 0?void 0:g[0])!=="/")return;for(const P of a.fragment.slice(1).split("/")){if(typeof r=="boolean")return;const O=r[(0,y.unescapeFragment)(P)];if(O===void 0)return;r=O;const T=typeof r=="object"&&r[this.opts.schemaId];!b.has(P)&&T&&(u=(0,i.resolveUrl)(this.opts.uriResolver,u,T))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,y.schemaHasRulesButRef)(r,this.RULES)){const P=(0,i.resolveUrl)(this.opts.uriResolver,u,r.$ref);o=v.call(this,c,P)}const{schemaId:m}=this.opts;if(o=o||new l({schema:r,schemaId:m,root:c,baseId:u}),o.schema!==o.root.schema)return o}return ue}const ys={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1};var Qe={},Te={exports:{}},Yt,Dr;function Tr(){if(Dr)return Yt;Dr=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function n(_){let v="",b=0,h=0;for(h=0;h<_.length;h++)if(b=_[h].charCodeAt(0),b!==48){if(!(b>=48&&b<=57||b>=65&&b<=70||b>=97&&b<=102))return"";v+=_[h];break}for(h+=1;h<_.length;h++){if(b=_[h].charCodeAt(0),!(b>=48&&b<=57||b>=65&&b<=70||b>=97&&b<=102))return"";v+=_[h]}return v}const i=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function y(_){return _.length=0,!0}function s(_,v,b){if(_.length){const h=n(_);if(h!=="")v.push(h);else return b.error=!0,!1;_.length=0}return!0}function l(_){let v=0;const b={error:!1,address:"",zone:""},h=[],a=[];let u=!1,r=!1,c=s;for(let g=0;g<_.length;g++){const o=_[g];if(!(o==="["||o==="]"))if(o===":"){if(u===!0&&(r=!0),!c(a,h,b))break;if(++v>7){b.error=!0;break}g>0&&_[g-1]===":"&&(u=!0),h.push(":");continue}else if(o==="%"){if(!c(a,h,b))break;c=y}else{a.push(o);continue}}return a.length&&(c===y?b.zone=a.join(""):r?h.push(a.join("")):h.push(n(a))),b.address=h.join(""),b}function d(_){if(f(_,":")<2)return{host:_,isIPV6:!1};const v=l(_);if(v.error)return{host:_,isIPV6:!1};{let b=v.address,h=v.address;return v.zone&&(b+="%"+v.zone,h+="%25"+v.zone),{host:b,isIPV6:!0,escapedHost:h}}}function f(_,v){let b=0;for(let h=0;h<_.length;h++)_[h]===v&&b++;return b}function w(_){let v=_;const b=[];let h=-1,a=0;for(;a=v.length;){if(a===1){if(v===".")break;if(v==="/"){b.push("/");break}else{b.push(v);break}}else if(a===2){if(v[0]==="."){if(v[1]===".")break;if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&(v[1]==="."||v[1]==="/")){b.push("/");break}}else if(a===3&&v==="/.."){b.length!==0&&b.pop(),b.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),b.length!==0&&b.pop();continue}}if((h=v.indexOf("/",1))===-1){b.push(v);break}else b.push(v.slice(0,h)),v=v.slice(h)}return b.join("")}function $(_,v){const b=v!==!0?escape:unescape;return _.scheme!==void 0&&(_.scheme=b(_.scheme)),_.userinfo!==void 0&&(_.userinfo=b(_.userinfo)),_.host!==void 0&&(_.host=b(_.host)),_.path!==void 0&&(_.path=b(_.path)),_.query!==void 0&&(_.query=b(_.query)),_.fragment!==void 0&&(_.fragment=b(_.fragment)),_}function E(_){const v=[];if(_.userinfo!==void 0&&(v.push(_.userinfo),v.push("@")),_.host!==void 0){let b=unescape(_.host);if(!t(b)){const h=d(b);h.isIPV6===!0?b=`[${h.escapedHost}]`:b=_.host}v.push(b)}return(typeof _.port=="number"||typeof _.port=="string")&&(v.push(":"),v.push(String(_.port))),v.length?v.join(""):void 0}return Yt={nonSimpleDomain:i,recomposeAuthority:E,normalizeComponentEncoding:$,removeDotSegments:w,isIPv4:t,isUUID:e,normalizeIPv6:d,stringArrayToHexStripped:n},Yt}var xt,Mr;function gs(){if(Mr)return xt;Mr=1;const{isUUID:e}=Tr(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,n=["http","https","ws","wss","urn","urn:uuid"];function i(o){return n.indexOf(o)!==-1}function y(o){return o.secure===!0?!0:o.secure===!1?!1:o.scheme?o.scheme.length===3&&(o.scheme[0]==="w"||o.scheme[0]==="W")&&(o.scheme[1]==="s"||o.scheme[1]==="S")&&(o.scheme[2]==="s"||o.scheme[2]==="S"):!1}function s(o){return o.host||(o.error=o.error||"HTTP URIs must have a host."),o}function l(o){const m=String(o.scheme).toLowerCase()==="https";return(o.port===(m?443:80)||o.port==="")&&(o.port=void 0),o.path||(o.path="/"),o}function d(o){return o.secure=y(o),o.resourceName=(o.path||"/")+(o.query?"?"+o.query:""),o.path=void 0,o.query=void 0,o}function f(o){if((o.port===(y(o)?443:80)||o.port==="")&&(o.port=void 0),typeof o.secure=="boolean"&&(o.scheme=o.secure?"wss":"ws",o.secure=void 0),o.resourceName){const[m,P]=o.resourceName.split("?");o.path=m&&m!=="/"?m:void 0,o.query=P,o.resourceName=void 0}return o.fragment=void 0,o}function w(o,m){if(!o.path)return o.error="URN can not be parsed",o;const P=o.path.match(t);if(P){const O=m.scheme||o.scheme||"urn";o.nid=P[1].toLowerCase(),o.nss=P[2];const T=`${O}:${m.nid||o.nid}`,z=g(T);o.path=void 0,z&&(o=z.parse(o,m))}else o.error=o.error||"URN can not be parsed.";return o}function $(o,m){if(o.nid===void 0)throw new Error("URN without nid cannot be serialized");const P=m.scheme||o.scheme||"urn",O=o.nid.toLowerCase(),T=`${P}:${m.nid||O}`,z=g(T);z&&(o=z.serialize(o,m));const C=o,V=o.nss;return C.path=`${O||m.nid}:${V}`,m.skipEscape=!0,C}function E(o,m){const P=o;return P.uuid=P.nss,P.nss=void 0,!m.tolerant&&(!P.uuid||!e(P.uuid))&&(P.error=P.error||"UUID is not valid."),P}function _(o){const m=o;return m.nss=(o.uuid||"").toLowerCase(),m}const v={scheme:"http",domainHost:!0,parse:s,serialize:l},b={scheme:"https",domainHost:v.domainHost,parse:s,serialize:l},h={scheme:"ws",domainHost:!0,parse:d,serialize:f},a={scheme:"wss",domainHost:h.domainHost,parse:h.parse,serialize:h.serialize},c={http:v,https:b,ws:h,wss:a,urn:{scheme:"urn",parse:w,serialize:$,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:E,serialize:_,skipNormalize:!0}};Object.setPrototypeOf(c,null);function g(o){return o&&(c[o]||c[o.toLowerCase()])||void 0}return xt={wsIsSecure:y,SCHEMES:c,isValidSchemeName:i,getSchemeHandler:g},xt}var Ar;function vs(){if(Ar)return Te.exports;Ar=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:n,normalizeComponentEncoding:i,isIPv4:y,nonSimpleDomain:s}=Tr(),{SCHEMES:l,getSchemeHandler:d}=gs();function f(a,u){return typeof a=="string"?a=_(b(a,u),u):typeof a=="object"&&(a=b(_(a,u),u)),a}function w(a,u,r){const c=r?Object.assign({scheme:"null"},r):{scheme:"null"},g=$(b(a,c),b(u,c),c,!0);return c.skipEscape=!0,_(g,c)}function $(a,u,r,c){const g={};return c||(a=b(_(a,r),r),u=b(_(u,r),r)),r=r||{},!r.tolerant&&u.scheme?(g.scheme=u.scheme,g.userinfo=u.userinfo,g.host=u.host,g.port=u.port,g.path=t(u.path||""),g.query=u.query):(u.userinfo!==void 0||u.host!==void 0||u.port!==void 0?(g.userinfo=u.userinfo,g.host=u.host,g.port=u.port,g.path=t(u.path||""),g.query=u.query):(u.path?(u.path[0]==="/"?g.path=t(u.path):((a.userinfo!==void 0||a.host!==void 0||a.port!==void 0)&&!a.path?g.path="/"+u.path:a.path?g.path=a.path.slice(0,a.path.lastIndexOf("/")+1)+u.path:g.path=u.path,g.path=t(g.path)),g.query=u.query):(g.path=a.path,u.query!==void 0?g.query=u.query:g.query=a.query),g.userinfo=a.userinfo,g.host=a.host,g.port=a.port),g.scheme=a.scheme),g.fragment=u.fragment,g}function E(a,u,r){return typeof a=="string"?(a=unescape(a),a=_(i(b(a,r),!0),{...r,skipEscape:!0})):typeof a=="object"&&(a=_(i(a,!0),{...r,skipEscape:!0})),typeof u=="string"?(u=unescape(u),u=_(i(b(u,r),!0),{...r,skipEscape:!0})):typeof u=="object"&&(u=_(i(u,!0),{...r,skipEscape:!0})),a.toLowerCase()===u.toLowerCase()}function _(a,u){const r={host:a.host,scheme:a.scheme,userinfo:a.userinfo,port:a.port,path:a.path,query:a.query,nid:a.nid,nss:a.nss,uuid:a.uuid,fragment:a.fragment,reference:a.reference,resourceName:a.resourceName,secure:a.secure,error:""},c=Object.assign({},u),g=[],o=d(c.scheme||r.scheme);o&&o.serialize&&o.serialize(r,c),r.path!==void 0&&(c.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),c.reference!=="suffix"&&r.scheme&&g.push(r.scheme,":");const m=n(r);if(m!==void 0&&(c.reference!=="suffix"&&g.push("//"),g.push(m),r.path&&r.path[0]!=="/"&&g.push("/")),r.path!==void 0){let P=r.path;!c.absolutePath&&(!o||!o.absolutePath)&&(P=t(P)),m===void 0&&P[0]==="/"&&P[1]==="/"&&(P="/%2F"+P.slice(2)),g.push(P)}return r.query!==void 0&&g.push("?",r.query),r.fragment!==void 0&&g.push("#",r.fragment),g.join("")}const v=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function b(a,u){const r=Object.assign({},u),c={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let g=!1;r.reference==="suffix"&&(r.scheme?a=r.scheme+":"+a:a="//"+a);const o=a.match(v);if(o){if(c.scheme=o[1],c.userinfo=o[3],c.host=o[4],c.port=parseInt(o[5],10),c.path=o[6]||"",c.query=o[7],c.fragment=o[8],isNaN(c.port)&&(c.port=o[5]),c.host)if(y(c.host)===!1){const O=e(c.host);c.host=O.host.toLowerCase(),g=O.isIPV6}else g=!0;c.scheme===void 0&&c.userinfo===void 0&&c.host===void 0&&c.port===void 0&&c.query===void 0&&!c.path?c.reference="same-document":c.scheme===void 0?c.reference="relative":c.fragment===void 0?c.reference="absolute":c.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==c.reference&&(c.error=c.error||"URI is not a "+r.reference+" reference.");const m=d(r.scheme||c.scheme);if(!r.unicodeSupport&&(!m||!m.unicodeSupport)&&c.host&&(r.domainHost||m&&m.domainHost)&&g===!1&&s(c.host))try{c.host=URL.domainToASCII(c.host.toLowerCase())}catch(P){c.error=c.error||"Host's domain name can not be converted to ASCII: "+P}(!m||m&&!m.skipNormalize)&&(a.indexOf("%")!==-1&&(c.scheme!==void 0&&(c.scheme=unescape(c.scheme)),c.host!==void 0&&(c.host=unescape(c.host))),c.path&&(c.path=escape(unescape(c.path))),c.fragment&&(c.fragment=encodeURI(decodeURIComponent(c.fragment)))),m&&m.parse&&m.parse(c,r)}else c.error=c.error||"URI can not be parsed.";return c}const h={SCHEMES:l,normalize:f,resolve:w,resolveComponent:$,equal:E,serialize:_,parse:b};return Te.exports=h,Te.exports.default=h,Te.exports.fastUri=h,Te.exports}var Vr;function _s(){if(Vr)return Qe;Vr=1,Object.defineProperty(Qe,"__esModule",{value:!0});const e=vs();return e.code='require("ajv/dist/runtime/uri").default',Qe.default=e,Qe}var zr;function $s(){return zr||(zr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=We();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=H();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});const i=Wt(),y=xe(),s=vr(),l=Bt(),d=H(),f=Ge(),w=He(),$=Y(),E=ys,_=_s(),v=(M,j)=>new RegExp(M,j);v.code="new RegExp";const b=["removeAdditional","useDefaults","coerceTypes"],h=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),a={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},u={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},r=200;function c(M){var j,D,R,p,S,N,U,J,x,B,k,I,q,A,K,W,ne,ge,ce,de,se,qe,fe,or,ar;const Fe=M.strict,cr=(j=M.code)===null||j===void 0?void 0:j.optimize,ds=cr===!0||cr===void 0?1:cr||0,us=(R=(D=M.code)===null||D===void 0?void 0:D.regExp)!==null&&R!==void 0?R:v,Ri=(p=M.uriResolver)!==null&&p!==void 0?p:_.default;return{strictSchema:(N=(S=M.strictSchema)!==null&&S!==void 0?S:Fe)!==null&&N!==void 0?N:!0,strictNumbers:(J=(U=M.strictNumbers)!==null&&U!==void 0?U:Fe)!==null&&J!==void 0?J:!0,strictTypes:(B=(x=M.strictTypes)!==null&&x!==void 0?x:Fe)!==null&&B!==void 0?B:"log",strictTuples:(I=(k=M.strictTuples)!==null&&k!==void 0?k:Fe)!==null&&I!==void 0?I:"log",strictRequired:(A=(q=M.strictRequired)!==null&&q!==void 0?q:Fe)!==null&&A!==void 0?A:!1,code:M.code?{...M.code,optimize:ds,regExp:us}:{optimize:ds,regExp:us},loopRequired:(K=M.loopRequired)!==null&&K!==void 0?K:r,loopEnum:(W=M.loopEnum)!==null&&W!==void 0?W:r,meta:(ne=M.meta)!==null&&ne!==void 0?ne:!0,messages:(ge=M.messages)!==null&&ge!==void 0?ge:!0,inlineRefs:(ce=M.inlineRefs)!==null&&ce!==void 0?ce:!0,schemaId:(de=M.schemaId)!==null&&de!==void 0?de:"$id",addUsedSchema:(se=M.addUsedSchema)!==null&&se!==void 0?se:!0,validateSchema:(qe=M.validateSchema)!==null&&qe!==void 0?qe:!0,validateFormats:(fe=M.validateFormats)!==null&&fe!==void 0?fe:!0,unicodeRegExp:(or=M.unicodeRegExp)!==null&&or!==void 0?or:!0,int32range:(ar=M.int32range)!==null&&ar!==void 0?ar:!0,uriResolver:Ri}}class g{constructor(j={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,j=this.opts={...j,...c(j)};const{es5:D,lines:R}=this.opts.code;this.scope=new d.ValueScope({scope:{},prefixes:h,es5:D,lines:R}),this.logger=V(j.logger);const p=j.validateFormats;j.validateFormats=!1,this.RULES=(0,s.getRules)(),o.call(this,a,j,"NOT SUPPORTED"),o.call(this,u,j,"DEPRECATED","warn"),this._metaOpts=z.call(this),j.formats&&O.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),j.keywords&&T.call(this,j.keywords),typeof j.meta=="object"&&this.addMetaSchema(j.meta),P.call(this),j.validateFormats=p}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:j,meta:D,schemaId:R}=this.opts;let p=E;R==="id"&&(p={...E},p.id=p.$id,delete p.$id),D&&j&&this.addMetaSchema(p,p[R],!1)}defaultMeta(){const{meta:j,schemaId:D}=this.opts;return this.opts.defaultMeta=typeof j=="object"?j[D]||j:void 0}validate(j,D){let R;if(typeof j=="string"){if(R=this.getSchema(j),!R)throw new Error(`no schema with key or ref "${j}"`)}else R=this.compile(j);const p=R(D);return"$async"in R||(this.errors=R.errors),p}compile(j,D){const R=this._addSchema(j,D);return R.validate||this._compileSchemaEnv(R)}compileAsync(j,D){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:R}=this.opts;return p.call(this,j,D);async function p(B,k){await S.call(this,B.$schema);const I=this._addSchema(B,k);return I.validate||N.call(this,I)}async function S(B){B&&!this.getSchema(B)&&await p.call(this,{$ref:B},!0)}async function N(B){try{return this._compileSchemaEnv(B)}catch(k){if(!(k instanceof y.default))throw k;return U.call(this,k),await J.call(this,k.missingSchema),N.call(this,B)}}function U({missingSchema:B,missingRef:k}){if(this.refs[B])throw new Error(`AnySchema ${B} is loaded but ${k} cannot be resolved`)}async function J(B){const k=await x.call(this,B);this.refs[B]||await S.call(this,k.$schema),this.refs[B]||this.addSchema(k,B,D)}async function x(B){const k=this._loading[B];if(k)return k;try{return await(this._loading[B]=R(B))}finally{delete this._loading[B]}}}addSchema(j,D,R,p=this.opts.validateSchema){if(Array.isArray(j)){for(const N of j)this.addSchema(N,void 0,R,p);return this}let S;if(typeof j=="object"){const{schemaId:N}=this.opts;if(S=j[N],S!==void 0&&typeof S!="string")throw new Error(`schema ${N} must be string`)}return D=(0,f.normalizeId)(D||S),this._checkUnique(D),this.schemas[D]=this._addSchema(j,R,D,p,!0),this}addMetaSchema(j,D,R=this.opts.validateSchema){return this.addSchema(j,D,!0,R),this}validateSchema(j,D){if(typeof j=="boolean")return!0;let R;if(R=j.$schema,R!==void 0&&typeof R!="string")throw new Error("$schema must be a string");if(R=R||this.opts.defaultMeta||this.defaultMeta(),!R)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const p=this.validate(R,j);if(!p&&D){const S="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(S);else throw new Error(S)}return p}getSchema(j){let D;for(;typeof(D=m.call(this,j))=="string";)j=D;if(D===void 0){const{schemaId:R}=this.opts,p=new l.SchemaEnv({schema:{},schemaId:R});if(D=l.resolveSchema.call(this,p,j),!D)return;this.refs[j]=D}return D.validate||this._compileSchemaEnv(D)}removeSchema(j){if(j instanceof RegExp)return this._removeAllSchemas(this.schemas,j),this._removeAllSchemas(this.refs,j),this;switch(typeof j){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const D=m.call(this,j);return typeof D=="object"&&this._cache.delete(D.schema),delete this.schemas[j],delete this.refs[j],this}case"object":{const D=j;this._cache.delete(D);let R=j[this.opts.schemaId];return R&&(R=(0,f.normalizeId)(R),delete this.schemas[R],delete this.refs[R]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(j){for(const D of j)this.addKeyword(D);return this}addKeyword(j,D){let R;if(typeof j=="string")R=j,typeof D=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),D.keyword=R);else if(typeof j=="object"&&D===void 0){if(D=j,R=D.keyword,Array.isArray(R)&&!R.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(L.call(this,R,D),!D)return(0,$.eachItem)(R,S=>Q.call(this,S)),this;ae.call(this,D);const p={...D,type:(0,w.getJSONTypes)(D.type),schemaType:(0,w.getJSONTypes)(D.schemaType)};return(0,$.eachItem)(R,p.type.length===0?S=>Q.call(this,S,p):S=>p.type.forEach(N=>Q.call(this,S,p,N))),this}getKeyword(j){const D=this.RULES.all[j];return typeof D=="object"?D.definition:!!D}removeKeyword(j){const{RULES:D}=this;delete D.keywords[j],delete D.all[j];for(const R of D.rules){const p=R.rules.findIndex(S=>S.keyword===j);p>=0&&R.rules.splice(p,1)}return this}addFormat(j,D){return typeof D=="string"&&(D=new RegExp(D)),this.formats[j]=D,this}errorsText(j=this.errors,{separator:D=", ",dataVar:R="data"}={}){return!j||j.length===0?"No errors":j.map(p=>`${R}${p.instancePath} ${p.message}`).reduce((p,S)=>p+D+S)}$dataMetaSchema(j,D){const R=this.RULES.all;j=JSON.parse(JSON.stringify(j));for(const p of D){const S=p.split("/").slice(1);let N=j;for(const U of S)N=N[U];for(const U in R){const J=R[U];if(typeof J!="object")continue;const{$data:x}=J.definition,B=N[U];x&&B&&(N[U]=ye(B))}}return j}_removeAllSchemas(j,D){for(const R in j){const p=j[R];(!D||D.test(R))&&(typeof p=="string"?delete j[R]:p&&!p.meta&&(this._cache.delete(p.schema),delete j[R]))}}_addSchema(j,D,R,p=this.opts.validateSchema,S=this.opts.addUsedSchema){let N;const{schemaId:U}=this.opts;if(typeof j=="object")N=j[U];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof j!="boolean")throw new Error("schema must be object or boolean")}let J=this._cache.get(j);if(J!==void 0)return J;R=(0,f.normalizeId)(N||R);const x=f.getSchemaRefs.call(this,j,R);return J=new l.SchemaEnv({schema:j,schemaId:U,meta:D,baseId:R,localRefs:x}),this._cache.set(J.schema,J),S&&!R.startsWith("#")&&(R&&this._checkUnique(R),this.refs[R]=J),p&&this.validateSchema(j,!0),J}_checkUnique(j){if(this.schemas[j]||this.refs[j])throw new Error(`schema with key or id "${j}" already exists`)}_compileSchemaEnv(j){if(j.meta?this._compileMetaSchema(j):l.compileSchema.call(this,j),!j.validate)throw new Error("ajv implementation error");return j.validate}_compileMetaSchema(j){const D=this.opts;this.opts=this._metaOpts;try{l.compileSchema.call(this,j)}finally{this.opts=D}}}g.ValidationError=i.default,g.MissingRefError=y.default,e.default=g;function o(M,j,D,R="error"){for(const p in M){const S=p;S in j&&this.logger[R](`${D}: option ${p}. ${M[S]}`)}}function m(M){return M=(0,f.normalizeId)(M),this.schemas[M]||this.refs[M]}function P(){const M=this.opts.schemas;if(M)if(Array.isArray(M))this.addSchema(M);else for(const j in M)this.addSchema(M[j],j)}function O(){for(const M in this.opts.formats){const j=this.opts.formats[M];j&&this.addFormat(M,j)}}function T(M){if(Array.isArray(M)){this.addVocabulary(M);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const j in M){const D=M[j];D.keyword||(D.keyword=j),this.addKeyword(D)}}function z(){const M={...this.opts};for(const j of b)delete M[j];return M}const C={log(){},warn(){},error(){}};function V(M){if(M===!1)return C;if(M===void 0)return console;if(M.log&&M.warn&&M.error)return M;throw new Error("logger must implement log, warn and error methods")}const F=/^[a-z_$][a-z0-9_$:-]*$/i;function L(M,j){const{RULES:D}=this;if((0,$.eachItem)(M,R=>{if(D.keywords[R])throw new Error(`Keyword ${R} is already defined`);if(!F.test(R))throw new Error(`Keyword ${R} has invalid name`)}),!!j&&j.$data&&!("code"in j||"validate"in j))throw new Error('$data keyword must have "code" or "validate" function')}function Q(M,j,D){var R;const p=j?.post;if(D&&p)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:S}=this;let N=p?S.post:S.rules.find(({type:J})=>J===D);if(N||(N={type:D,rules:[]},S.rules.push(N)),S.keywords[M]=!0,!j)return;const U={keyword:M,definition:{...j,type:(0,w.getJSONTypes)(j.type),schemaType:(0,w.getJSONTypes)(j.schemaType)}};j.before?oe.call(this,N,U,j.before):N.rules.push(U),S.all[M]=U,(R=j.implements)===null||R===void 0||R.forEach(J=>this.addKeyword(J))}function oe(M,j,D){const R=M.rules.findIndex(p=>p.keyword===D);R>=0?M.rules.splice(R,0,j):(M.rules.push(j),this.logger.warn(`rule ${D} is not defined`))}function ae(M){let{metaSchema:j}=M;j!==void 0&&(M.$data&&this.opts.$data&&(j=ye(j)),M.validateSchema=this.compile(j,!0))}const X={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ye(M){return{anyOf:[M,X]}}})(Ft)),Ft}var Ze={},Xe={},et={},Fr;function bs(){if(Fr)return et;Fr=1,Object.defineProperty(et,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return et.default=e,et}var we={},Lr;function ws(){if(Lr)return we;Lr=1,Object.defineProperty(we,"__esModule",{value:!0}),we.callRef=we.getValidate=void 0;const e=xe(),t=me(),n=H(),i=be(),y=Bt(),s=Y(),l={keyword:"$ref",schemaType:"string",code(w){const{gen:$,schema:E,it:_}=w,{baseId:v,schemaEnv:b,validateName:h,opts:a,self:u}=_,{root:r}=b;if((E==="#"||E==="#/")&&v===r.baseId)return g();const c=y.resolveRef.call(u,r,v,E);if(c===void 0)throw new e.default(_.opts.uriResolver,v,E);if(c instanceof y.SchemaEnv)return o(c);return m(c);function g(){if(b===r)return f(w,h,b,b.$async);const P=$.scopeValue("root",{ref:r});return f(w,(0,n._)`${P}.validate`,r,r.$async)}function o(P){const O=d(w,P);f(w,O,P,P.$async)}function m(P){const O=$.scopeValue("schema",a.code.source===!0?{ref:P,code:(0,n.stringify)(P)}:{ref:P}),T=$.name("valid"),z=w.subschema({schema:P,dataTypes:[],schemaPath:n.nil,topSchemaRef:O,errSchemaPath:E},T);w.mergeEvaluated(z),w.ok(T)}}};function d(w,$){const{gen:E}=w;return $.validate?E.scopeValue("validate",{ref:$.validate}):(0,n._)`${E.scopeValue("wrapper",{ref:$})}.validate`}we.getValidate=d;function f(w,$,E,_){const{gen:v,it:b}=w,{allErrors:h,schemaEnv:a,opts:u}=b,r=u.passContext?i.default.this:n.nil;_?c():g();function c(){if(!a.$async)throw new Error("async schema referenced by sync schema");const P=v.let("valid");v.try(()=>{v.code((0,n._)`await ${(0,t.callValidateCode)(w,$,r)}`),m($),h||v.assign(P,!0)},O=>{v.if((0,n._)`!(${O} instanceof ${b.ValidationError})`,()=>v.throw(O)),o(O),h||v.assign(P,!1)}),w.ok(P)}function g(){w.result((0,t.callValidateCode)(w,$,r),()=>m($),()=>o($))}function o(P){const O=(0,n._)`${P}.errors`;v.assign(i.default.vErrors,(0,n._)`${i.default.vErrors} === null ? ${O} : ${i.default.vErrors}.concat(${O})`),v.assign(i.default.errors,(0,n._)`${i.default.vErrors}.length`)}function m(P){var O;if(!b.opts.unevaluated)return;const T=(O=E?.validate)===null||O===void 0?void 0:O.evaluated;if(b.props!==!0)if(T&&!T.dynamicProps)T.props!==void 0&&(b.props=s.mergeEvaluated.props(v,T.props,b.props));else{const z=v.var("props",(0,n._)`${P}.evaluated.props`);b.props=s.mergeEvaluated.props(v,z,b.props,n.Name)}if(b.items!==!0)if(T&&!T.dynamicItems)T.items!==void 0&&(b.items=s.mergeEvaluated.items(v,T.items,b.items));else{const z=v.var("items",(0,n._)`${P}.evaluated.items`);b.items=s.mergeEvaluated.items(v,z,b.items,n.Name)}}}return we.callRef=f,we.default=l,we}var Ur;function Ps(){if(Ur)return Xe;Ur=1,Object.defineProperty(Xe,"__esModule",{value:!0});const e=bs(),t=ws(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return Xe.default=n,Xe}var tt={},rt={},Kr;function Ss(){if(Kr)return rt;Kr=1,Object.defineProperty(rt,"__esModule",{value:!0});const e=H(),t=e.operators,n={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},i={message:({keyword:s,schemaCode:l})=>(0,e.str)`must be ${n[s].okStr} ${l}`,params:({keyword:s,schemaCode:l})=>(0,e._)`{comparison: ${n[s].okStr}, limit: ${l}}`},y={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:i,code(s){const{keyword:l,data:d,schemaCode:f}=s;s.fail$data((0,e._)`${d} ${n[l].fail} ${f} || isNaN(${d})`)}};return rt.default=y,rt}var nt={},Jr;function Es(){if(Jr)return nt;Jr=1,Object.defineProperty(nt,"__esModule",{value:!0});const e=H(),n={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:i})=>(0,e.str)`must be multiple of ${i}`,params:({schemaCode:i})=>(0,e._)`{multipleOf: ${i}}`},code(i){const{gen:y,data:s,schemaCode:l,it:d}=i,f=d.opts.multipleOfPrecision,w=y.let("res"),$=f?(0,e._)`Math.abs(Math.round(${w}) - ${w}) > 1e-${f}`:(0,e._)`${w} !== parseInt(${w})`;i.fail$data((0,e._)`(${l} === 0 || (${w} = ${s}/${l}, ${$}))`)}};return nt.default=n,nt}var st={},it={},Hr;function ks(){if(Hr)return it;Hr=1,Object.defineProperty(it,"__esModule",{value:!0});function e(t){const n=t.length;let i=0,y=0,s;for(;y<n;)i++,s=t.charCodeAt(y++),s>=55296&&s<=56319&&y<n&&(s=t.charCodeAt(y),(s&64512)===56320&&y++);return i}return it.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',it}var Gr;function js(){if(Gr)return st;Gr=1,Object.defineProperty(st,"__esModule",{value:!0});const e=H(),t=Y(),n=ks(),y={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:s,schemaCode:l}){const d=s==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${d} than ${l} characters`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},code(s){const{keyword:l,data:d,schemaCode:f,it:w}=s,$=l==="maxLength"?e.operators.GT:e.operators.LT,E=w.opts.unicode===!1?(0,e._)`${d}.length`:(0,e._)`${(0,t.useFunc)(s.gen,n.default)}(${d})`;s.fail$data((0,e._)`${E} ${$} ${f}`)}};return st.default=y,st}var ot={},Wr;function Is(){if(Wr)return ot;Wr=1,Object.defineProperty(ot,"__esModule",{value:!0});const e=me(),t=H(),i={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:y})=>(0,t.str)`must match pattern "${y}"`,params:({schemaCode:y})=>(0,t._)`{pattern: ${y}}`},code(y){const{data:s,$data:l,schema:d,schemaCode:f,it:w}=y,$=w.opts.unicodeRegExp?"u":"",E=l?(0,t._)`(new RegExp(${f}, ${$}))`:(0,e.usePattern)(y,d);y.fail$data((0,t._)`!${E}.test(${s})`)}};return ot.default=i,ot}var at={},Br;function Rs(){if(Br)return at;Br=1,Object.defineProperty(at,"__esModule",{value:!0});const e=H(),n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:y}){const s=i==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${y} properties`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:y,data:s,schemaCode:l}=i,d=y==="maxProperties"?e.operators.GT:e.operators.LT;i.fail$data((0,e._)`Object.keys(${s}).length ${d} ${l}`)}};return at.default=n,at}var ct={},Yr;function Os(){if(Yr)return ct;Yr=1,Object.defineProperty(ct,"__esModule",{value:!0});const e=me(),t=H(),n=Y(),y={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:s}})=>(0,t.str)`must have required property '${s}'`,params:({params:{missingProperty:s}})=>(0,t._)`{missingProperty: ${s}}`},code(s){const{gen:l,schema:d,schemaCode:f,data:w,$data:$,it:E}=s,{opts:_}=E;if(!$&&d.length===0)return;const v=d.length>=_.loopRequired;if(E.allErrors?b():h(),_.strictRequired){const r=s.parentSchema.properties,{definedProperties:c}=s.it;for(const g of d)if(r?.[g]===void 0&&!c.has(g)){const o=E.schemaEnv.baseId+E.errSchemaPath,m=`required property "${g}" is not defined at "${o}" (strictRequired)`;(0,n.checkStrictMode)(E,m,E.opts.strictRequired)}}function b(){if(v||$)s.block$data(t.nil,a);else for(const r of d)(0,e.checkReportMissingProp)(s,r)}function h(){const r=l.let("missing");if(v||$){const c=l.let("valid",!0);s.block$data(c,()=>u(r,c)),s.ok(c)}else l.if((0,e.checkMissingProp)(s,d,r)),(0,e.reportMissingProp)(s,r),l.else()}function a(){l.forOf("prop",f,r=>{s.setParams({missingProperty:r}),l.if((0,e.noPropertyInData)(l,w,r,_.ownProperties),()=>s.error())})}function u(r,c){s.setParams({missingProperty:r}),l.forOf(r,f,()=>{l.assign(c,(0,e.propertyInData)(l,w,r,_.ownProperties)),l.if((0,t.not)(c),()=>{s.error(),l.break()})},t.nil)}}};return ct.default=y,ct}var dt={},xr;function Ns(){if(xr)return dt;xr=1,Object.defineProperty(dt,"__esModule",{value:!0});const e=H(),n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:y}){const s=i==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${y} items`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:y,data:s,schemaCode:l}=i,d=y==="maxItems"?e.operators.GT:e.operators.LT;i.fail$data((0,e._)`${s}.length ${d} ${l}`)}};return dt.default=n,dt}var ut={},lt={},Qr;function Qt(){if(Qr)return lt;Qr=1,Object.defineProperty(lt,"__esModule",{value:!0});const e=jr();return e.code='require("ajv/dist/runtime/equal").default',lt.default=e,lt}var Zr;function Cs(){if(Zr)return ut;Zr=1,Object.defineProperty(ut,"__esModule",{value:!0});const e=He(),t=H(),n=Y(),i=Qt(),s={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:l,j:d}})=>(0,t.str)`must NOT have duplicate items (items ## ${d} and ${l} are identical)`,params:({params:{i:l,j:d}})=>(0,t._)`{i: ${l}, j: ${d}}`},code(l){const{gen:d,data:f,$data:w,schema:$,parentSchema:E,schemaCode:_,it:v}=l;if(!w&&!$)return;const b=d.let("valid"),h=E.items?(0,e.getSchemaTypes)(E.items):[];l.block$data(b,a,(0,t._)`${_} === false`),l.ok(b);function a(){const g=d.let("i",(0,t._)`${f}.length`),o=d.let("j");l.setParams({i:g,j:o}),d.assign(b,!0),d.if((0,t._)`${g} > 1`,()=>(u()?r:c)(g,o))}function u(){return h.length>0&&!h.some(g=>g==="object"||g==="array")}function r(g,o){const m=d.name("item"),P=(0,e.checkDataTypes)(h,m,v.opts.strictNumbers,e.DataType.Wrong),O=d.const("indices",(0,t._)`{}`);d.for((0,t._)`;${g}--;`,()=>{d.let(m,(0,t._)`${f}[${g}]`),d.if(P,(0,t._)`continue`),h.length>1&&d.if((0,t._)`typeof ${m} == "string"`,(0,t._)`${m} += "_"`),d.if((0,t._)`typeof ${O}[${m}] == "number"`,()=>{d.assign(o,(0,t._)`${O}[${m}]`),l.error(),d.assign(b,!1).break()}).code((0,t._)`${O}[${m}] = ${g}`)})}function c(g,o){const m=(0,n.useFunc)(d,i.default),P=d.name("outer");d.label(P).for((0,t._)`;${g}--;`,()=>d.for((0,t._)`${o} = ${g}; ${o}--;`,()=>d.if((0,t._)`${m}(${f}[${g}], ${f}[${o}])`,()=>{l.error(),d.assign(b,!1).break(P)})))}}};return ut.default=s,ut}var ft={},Xr;function qs(){if(Xr)return ft;Xr=1,Object.defineProperty(ft,"__esModule",{value:!0});const e=H(),t=Y(),n=Qt(),y={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:s})=>(0,e._)`{allowedValue: ${s}}`},code(s){const{gen:l,data:d,$data:f,schemaCode:w,schema:$}=s;f||$&&typeof $=="object"?s.fail$data((0,e._)`!${(0,t.useFunc)(l,n.default)}(${d}, ${w})`):s.fail((0,e._)`${$} !== ${d}`)}};return ft.default=y,ft}var pt={},en;function Ds(){if(en)return pt;en=1,Object.defineProperty(pt,"__esModule",{value:!0});const e=H(),t=Y(),n=Qt(),y={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:s})=>(0,e._)`{allowedValues: ${s}}`},code(s){const{gen:l,data:d,$data:f,schema:w,schemaCode:$,it:E}=s;if(!f&&w.length===0)throw new Error("enum must have non-empty array");const _=w.length>=E.opts.loopEnum;let v;const b=()=>v??(v=(0,t.useFunc)(l,n.default));let h;if(_||f)h=l.let("valid"),s.block$data(h,a);else{if(!Array.isArray(w))throw new Error("ajv implementation error");const r=l.const("vSchema",$);h=(0,e.or)(...w.map((c,g)=>u(r,g)))}s.pass(h);function a(){l.assign(h,!1),l.forOf("v",$,r=>l.if((0,e._)`${b()}(${d}, ${r})`,()=>l.assign(h,!0).break()))}function u(r,c){const g=w[c];return typeof g=="object"&&g!==null?(0,e._)`${b()}(${d}, ${r}[${c}])`:(0,e._)`${d} === ${g}`}}};return pt.default=y,pt}var tn;function Ts(){if(tn)return tt;tn=1,Object.defineProperty(tt,"__esModule",{value:!0});const e=Ss(),t=Es(),n=js(),i=Is(),y=Rs(),s=Os(),l=Ns(),d=Cs(),f=qs(),w=Ds(),$=[e.default,t.default,n.default,i.default,y.default,s.default,l.default,d.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},f.default,w.default];return tt.default=$,tt}var mt={},Oe={},rn;function nn(){if(rn)return Oe;rn=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.validateAdditionalItems=void 0;const e=H(),t=Y(),i={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:s}})=>(0,e.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,e._)`{limit: ${s}}`},code(s){const{parentSchema:l,it:d}=s,{items:f}=l;if(!Array.isArray(f)){(0,t.checkStrictMode)(d,'"additionalItems" is ignored when "items" is not an array of schemas');return}y(s,f)}};function y(s,l){const{gen:d,schema:f,data:w,keyword:$,it:E}=s;E.items=!0;const _=d.const("len",(0,e._)`${w}.length`);if(f===!1)s.setParams({len:l.length}),s.pass((0,e._)`${_} <= ${l.length}`);else if(typeof f=="object"&&!(0,t.alwaysValidSchema)(E,f)){const b=d.var("valid",(0,e._)`${_} <= ${l.length}`);d.if((0,e.not)(b),()=>v(b)),s.ok(b)}function v(b){d.forRange("i",l.length,_,h=>{s.subschema({keyword:$,dataProp:h,dataPropType:t.Type.Num},b),E.allErrors||d.if((0,e.not)(b),()=>d.break())})}}return Oe.validateAdditionalItems=y,Oe.default=i,Oe}var ht={},Ne={},sn;function on(){if(sn)return Ne;sn=1,Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.validateTuple=void 0;const e=H(),t=Y(),n=me(),i={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(s){const{schema:l,it:d}=s;if(Array.isArray(l))return y(s,"additionalItems",l);d.items=!0,!(0,t.alwaysValidSchema)(d,l)&&s.ok((0,n.validateArray)(s))}};function y(s,l,d=s.schema){const{gen:f,parentSchema:w,data:$,keyword:E,it:_}=s;h(w),_.opts.unevaluated&&d.length&&_.items!==!0&&(_.items=t.mergeEvaluated.items(f,d.length,_.items));const v=f.name("valid"),b=f.const("len",(0,e._)`${$}.length`);d.forEach((a,u)=>{(0,t.alwaysValidSchema)(_,a)||(f.if((0,e._)`${b} > ${u}`,()=>s.subschema({keyword:E,schemaProp:u,dataProp:u},v)),s.ok(v))});function h(a){const{opts:u,errSchemaPath:r}=_,c=d.length,g=c===a.minItems&&(c===a.maxItems||a[l]===!1);if(u.strictTuples&&!g){const o=`"${E}" is ${c}-tuple, but minItems or maxItems/${l} are not specified or different at path "${r}"`;(0,t.checkStrictMode)(_,o,u.strictTuples)}}}return Ne.validateTuple=y,Ne.default=i,Ne}var an;function Ms(){if(an)return ht;an=1,Object.defineProperty(ht,"__esModule",{value:!0});const e=on(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,e.validateTuple)(n,"items")};return ht.default=t,ht}var yt={},cn;function As(){if(cn)return yt;cn=1,Object.defineProperty(yt,"__esModule",{value:!0});const e=H(),t=Y(),n=me(),i=nn(),s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:l}})=>(0,e.str)`must NOT have more than ${l} items`,params:({params:{len:l}})=>(0,e._)`{limit: ${l}}`},code(l){const{schema:d,parentSchema:f,it:w}=l,{prefixItems:$}=f;w.items=!0,!(0,t.alwaysValidSchema)(w,d)&&($?(0,i.validateAdditionalItems)(l,$):l.ok((0,n.validateArray)(l)))}};return yt.default=s,yt}var gt={},dn;function Vs(){if(dn)return gt;dn=1,Object.defineProperty(gt,"__esModule",{value:!0});const e=H(),t=Y(),i={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:y,max:s}})=>s===void 0?(0,e.str)`must contain at least ${y} valid item(s)`:(0,e.str)`must contain at least ${y} and no more than ${s} valid item(s)`,params:({params:{min:y,max:s}})=>s===void 0?(0,e._)`{minContains: ${y}}`:(0,e._)`{minContains: ${y}, maxContains: ${s}}`},code(y){const{gen:s,schema:l,parentSchema:d,data:f,it:w}=y;let $,E;const{minContains:_,maxContains:v}=d;w.opts.next?($=_===void 0?1:_,E=v):$=1;const b=s.const("len",(0,e._)`${f}.length`);if(y.setParams({min:$,max:E}),E===void 0&&$===0){(0,t.checkStrictMode)(w,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(E!==void 0&&$>E){(0,t.checkStrictMode)(w,'"minContains" > "maxContains" is always invalid'),y.fail();return}if((0,t.alwaysValidSchema)(w,l)){let c=(0,e._)`${b} >= ${$}`;E!==void 0&&(c=(0,e._)`${c} && ${b} <= ${E}`),y.pass(c);return}w.items=!0;const h=s.name("valid");E===void 0&&$===1?u(h,()=>s.if(h,()=>s.break())):$===0?(s.let(h,!0),E!==void 0&&s.if((0,e._)`${f}.length > 0`,a)):(s.let(h,!1),a()),y.result(h,()=>y.reset());function a(){const c=s.name("_valid"),g=s.let("count",0);u(c,()=>s.if(c,()=>r(g)))}function u(c,g){s.forRange("i",0,b,o=>{y.subschema({keyword:"contains",dataProp:o,dataPropType:t.Type.Num,compositeRule:!0},c),g()})}function r(c){s.code((0,e._)`${c}++`),E===void 0?s.if((0,e._)`${c} >= ${$}`,()=>s.assign(h,!0).break()):(s.if((0,e._)`${c} > ${E}`,()=>s.assign(h,!1).break()),$===1?s.assign(h,!0):s.if((0,e._)`${c} >= ${$}`,()=>s.assign(h,!0)))}}};return gt.default=i,gt}var Zt={},un;function zs(){return un||(un=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=H(),n=Y(),i=me();e.error={message:({params:{property:f,depsCount:w,deps:$}})=>{const E=w===1?"property":"properties";return(0,t.str)`must have ${E} ${$} when property ${f} is present`},params:({params:{property:f,depsCount:w,deps:$,missingProperty:E}})=>(0,t._)`{property: ${f},
|
|
5
|
+
|| ${O} === "boolean" || ${m} === null`).assign(T,(0,i._)`[${m}]`)}}}function _({gen:n,parentData:c,parentDataProperty:y},o){n.if((0,i._)`${c} !== undefined`,()=>n.assign((0,i._)`${c}[${y}]`,o))}function v(n,c,y,o=s.Correct){const m=o===s.Correct?i.operators.EQ:i.operators.NEQ;let P;switch(n){case"null":return(0,i._)`${c} ${m} null`;case"array":P=(0,i._)`Array.isArray(${c})`;break;case"object":P=(0,i._)`${c} && typeof ${c} == "object" && !Array.isArray(${c})`;break;case"integer":P=O((0,i._)`!(${c} % 1) && !isNaN(${c})`);break;case"number":P=O();break;default:return(0,i._)`typeof ${c} ${m} ${n}`}return o===s.Correct?P:(0,i.not)(P);function O(T=i.nil){return(0,i.and)((0,i._)`typeof ${c} == "number"`,T,y?(0,i._)`isFinite(${c})`:i.nil)}}re.checkDataType=v;function b(n,c,y,o){if(n.length===1)return v(n[0],c,y,o);let m;const P=(0,g.toHash)(n);if(P.array&&P.object){const O=(0,i._)`typeof ${c} != "object"`;m=P.null?O:(0,i._)`!${c} || ${O}`,delete P.null,delete P.array,delete P.object}else m=i.nil;P.number&&delete P.integer;for(const O in P)m=(0,i.and)(m,v(O,c,y,o));return m}re.checkDataTypes=b;const h={message:({schema:n})=>`must be ${n}`,params:({schema:n,schemaValue:c})=>typeof n=="string"?(0,i._)`{type: ${n}}`:(0,i._)`{type: ${c}}`};function a(n){const c=u(n);(0,r.reportError)(c,h)}re.reportTypeError=a;function u(n){const{gen:c,data:y,schema:o}=n,m=(0,g.schemaRefOrVal)(n,o,"type");return{gen:c,keyword:"type",data:y,schema:o.type,schemaCode:m,schemaValue:m,parentSchema:o,params:{},it:n}}return re}var De={},wr;function fs(){if(wr)return De;wr=1,Object.defineProperty(De,"__esModule",{value:!0}),De.assignDefaults=void 0;const e=H(),t=Y();function r(g,s){const{properties:l,items:d}=g.schema;if(s==="object"&&l)for(const f in l)i(g,f,l[f].default);else s==="array"&&Array.isArray(d)&&d.forEach((f,w)=>i(g,w,f.default))}De.assignDefaults=r;function i(g,s,l){const{gen:d,compositeRule:f,data:w,opts:$}=g;if(l===void 0)return;const E=(0,e._)`${w}${(0,e.getProperty)(s)}`;if(f){(0,t.checkStrictMode)(g,`default is ignored for: ${E}`);return}let _=(0,e._)`${E} === undefined`;$.useDefaults==="empty"&&(_=(0,e._)`${_} || ${E} === null || ${E} === ""`),d.if(_,(0,e._)`${E} = ${(0,e.stringify)(l)}`)}return De}var pe={},Z={},Pr;function me(){if(Pr)return Z;Pr=1,Object.defineProperty(Z,"__esModule",{value:!0}),Z.validateUnion=Z.validateArray=Z.usePattern=Z.callValidateCode=Z.schemaProperties=Z.allSchemaProperties=Z.noPropertyInData=Z.propertyInData=Z.isOwnProperty=Z.hasPropFunc=Z.reportMissingProp=Z.checkMissingProp=Z.checkReportMissingProp=void 0;const e=H(),t=Y(),r=be(),i=Y();function g(n,c){const{gen:y,data:o,it:m}=n;y.if($(y,o,c,m.opts.ownProperties),()=>{n.setParams({missingProperty:(0,e._)`${c}`},!0),n.error()})}Z.checkReportMissingProp=g;function s({gen:n,data:c,it:{opts:y}},o,m){return(0,e.or)(...o.map(P=>(0,e.and)($(n,c,P,y.ownProperties),(0,e._)`${m} = ${P}`)))}Z.checkMissingProp=s;function l(n,c){n.setParams({missingProperty:c},!0),n.error()}Z.reportMissingProp=l;function d(n){return n.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}Z.hasPropFunc=d;function f(n,c,y){return(0,e._)`${d(n)}.call(${c}, ${y})`}Z.isOwnProperty=f;function w(n,c,y,o){const m=(0,e._)`${c}${(0,e.getProperty)(y)} !== undefined`;return o?(0,e._)`${m} && ${f(n,c,y)}`:m}Z.propertyInData=w;function $(n,c,y,o){const m=(0,e._)`${c}${(0,e.getProperty)(y)} === undefined`;return o?(0,e.or)(m,(0,e.not)(f(n,c,y))):m}Z.noPropertyInData=$;function E(n){return n?Object.keys(n).filter(c=>c!=="__proto__"):[]}Z.allSchemaProperties=E;function _(n,c){return E(c).filter(y=>!(0,t.alwaysValidSchema)(n,c[y]))}Z.schemaProperties=_;function v({schemaCode:n,data:c,it:{gen:y,topSchemaRef:o,schemaPath:m,errorPath:P},it:O},T,z,C){const V=C?(0,e._)`${n}, ${c}, ${o}${m}`:c,F=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,P)],[r.default.parentData,O.parentData],[r.default.parentDataProperty,O.parentDataProperty],[r.default.rootData,r.default.rootData]];O.opts.dynamicRef&&F.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const L=(0,e._)`${V}, ${y.object(...F)}`;return z!==e.nil?(0,e._)`${T}.call(${z}, ${L})`:(0,e._)`${T}(${L})`}Z.callValidateCode=v;const b=(0,e._)`new RegExp`;function h({gen:n,it:{opts:c}},y){const o=c.unicodeRegExp?"u":"",{regExp:m}=c.code,P=m(y,o);return n.scopeValue("pattern",{key:P.toString(),ref:P,code:(0,e._)`${m.code==="new RegExp"?b:(0,i.useFunc)(n,m)}(${y}, ${o})`})}Z.usePattern=h;function a(n){const{gen:c,data:y,keyword:o,it:m}=n,P=c.name("valid");if(m.allErrors){const T=c.let("valid",!0);return O(()=>c.assign(T,!1)),T}return c.var(P,!0),O(()=>c.break()),P;function O(T){const z=c.const("len",(0,e._)`${y}.length`);c.forRange("i",0,z,C=>{n.subschema({keyword:o,dataProp:C,dataPropType:t.Type.Num},P),c.if((0,e.not)(P),T)})}}Z.validateArray=a;function u(n){const{gen:c,schema:y,keyword:o,it:m}=n;if(!Array.isArray(y))throw new Error("ajv implementation error");if(y.some(z=>(0,t.alwaysValidSchema)(m,z))&&!m.opts.unevaluated)return;const O=c.let("valid",!1),T=c.name("_valid");c.block(()=>y.forEach((z,C)=>{const V=n.subschema({keyword:o,schemaProp:C,compositeRule:!0},T);c.assign(O,(0,e._)`${O} || ${T}`),n.mergeValidEvaluated(V,T)||c.if((0,e.not)(O))})),n.result(O,()=>n.reset(),()=>n.error(!0))}return Z.validateUnion=u,Z}var Sr;function ps(){if(Sr)return pe;Sr=1,Object.defineProperty(pe,"__esModule",{value:!0}),pe.validateKeywordUsage=pe.validSchemaType=pe.funcKeywordCode=pe.macroKeywordCode=void 0;const e=H(),t=be(),r=me(),i=Je();function g(_,v){const{gen:b,keyword:h,schema:a,parentSchema:u,it:n}=_,c=v.macro.call(n.self,a,u,n),y=w(b,h,c);n.opts.validateSchema!==!1&&n.self.validateSchema(c,!0);const o=b.name("valid");_.subschema({schema:c,schemaPath:e.nil,errSchemaPath:`${n.errSchemaPath}/${h}`,topSchemaRef:y,compositeRule:!0},o),_.pass(o,()=>_.error(!0))}pe.macroKeywordCode=g;function s(_,v){var b;const{gen:h,keyword:a,schema:u,parentSchema:n,$data:c,it:y}=_;f(y,v);const o=!c&&v.compile?v.compile.call(y.self,u,n,y):v.validate,m=w(h,a,o),P=h.let("valid");_.block$data(P,O),_.ok((b=v.valid)!==null&&b!==void 0?b:P);function O(){if(v.errors===!1)C(),v.modifying&&l(_),V(()=>_.error());else{const F=v.async?T():z();v.modifying&&l(_),V(()=>d(_,F))}}function T(){const F=h.let("ruleErrs",null);return h.try(()=>C((0,e._)`await `),L=>h.assign(P,!1).if((0,e._)`${L} instanceof ${y.ValidationError}`,()=>h.assign(F,(0,e._)`${L}.errors`),()=>h.throw(L))),F}function z(){const F=(0,e._)`${m}.errors`;return h.assign(F,null),C(e.nil),F}function C(F=v.async?(0,e._)`await `:e.nil){const L=y.opts.passContext?t.default.this:t.default.self,Q=!("compile"in v&&!c||v.schema===!1);h.assign(P,(0,e._)`${F}${(0,r.callValidateCode)(_,m,L,Q)}`,v.modifying)}function V(F){var L;h.if((0,e.not)((L=v.valid)!==null&&L!==void 0?L:P),F)}}pe.funcKeywordCode=s;function l(_){const{gen:v,data:b,it:h}=_;v.if(h.parentData,()=>v.assign(b,(0,e._)`${h.parentData}[${h.parentDataProperty}]`))}function d(_,v){const{gen:b}=_;b.if((0,e._)`Array.isArray(${v})`,()=>{b.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${v} : ${t.default.vErrors}.concat(${v})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,i.extendErrors)(_)},()=>_.error())}function f({schemaEnv:_},v){if(v.async&&!_.$async)throw new Error("async keyword in sync schema")}function w(_,v,b){if(b===void 0)throw new Error(`keyword "${v}" failed to compile`);return _.scopeValue("keyword",typeof b=="function"?{ref:b}:{ref:b,code:(0,e.stringify)(b)})}function $(_,v,b=!1){return!v.length||v.some(h=>h==="array"?Array.isArray(_):h==="object"?_&&typeof _=="object"&&!Array.isArray(_):typeof _==h||b&&typeof _>"u")}pe.validSchemaType=$;function E({schema:_,opts:v,self:b,errSchemaPath:h},a,u){if(Array.isArray(a.keyword)?!a.keyword.includes(u):a.keyword!==u)throw new Error("ajv implementation error");const n=a.dependencies;if(n?.some(c=>!Object.prototype.hasOwnProperty.call(_,c)))throw new Error(`parent schema must have dependencies of ${u}: ${n.join(",")}`);if(a.validateSchema&&!a.validateSchema(_[u])){const y=`keyword "${u}" value is invalid at path "${h}": `+b.errorsText(a.validateSchema.errors);if(v.validateSchema==="log")b.logger.error(y);else throw new Error(y)}}return pe.validateKeywordUsage=E,pe}var $e={},Er;function ms(){if(Er)return $e;Er=1,Object.defineProperty($e,"__esModule",{value:!0}),$e.extendSubschemaMode=$e.extendSubschemaData=$e.getSubschema=void 0;const e=H(),t=Y();function r(s,{keyword:l,schemaProp:d,schema:f,schemaPath:w,errSchemaPath:$,topSchemaRef:E}){if(l!==void 0&&f!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(l!==void 0){const _=s.schema[l];return d===void 0?{schema:_,schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(l)}`,errSchemaPath:`${s.errSchemaPath}/${l}`}:{schema:_[d],schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(l)}${(0,e.getProperty)(d)}`,errSchemaPath:`${s.errSchemaPath}/${l}/${(0,t.escapeFragment)(d)}`}}if(f!==void 0){if(w===void 0||$===void 0||E===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:f,schemaPath:w,topSchemaRef:E,errSchemaPath:$}}throw new Error('either "keyword" or "schema" must be passed')}$e.getSubschema=r;function i(s,l,{dataProp:d,dataPropType:f,data:w,dataTypes:$,propertyName:E}){if(w!==void 0&&d!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:_}=l;if(d!==void 0){const{errorPath:b,dataPathArr:h,opts:a}=l,u=_.let("data",(0,e._)`${l.data}${(0,e.getProperty)(d)}`,!0);v(u),s.errorPath=(0,e.str)`${b}${(0,t.getErrorPath)(d,f,a.jsPropertySyntax)}`,s.parentDataProperty=(0,e._)`${d}`,s.dataPathArr=[...h,s.parentDataProperty]}if(w!==void 0){const b=w instanceof e.Name?w:_.let("data",w,!0);v(b),E!==void 0&&(s.propertyName=E)}$&&(s.dataTypes=$);function v(b){s.data=b,s.dataLevel=l.dataLevel+1,s.dataTypes=[],l.definedProperties=new Set,s.parentData=l.data,s.dataNames=[...l.dataNames,b]}}$e.extendSubschemaData=i;function g(s,{jtdDiscriminator:l,jtdMetadata:d,compositeRule:f,createErrors:w,allErrors:$}){f!==void 0&&(s.compositeRule=f),w!==void 0&&(s.createErrors=w),$!==void 0&&(s.allErrors=$),s.jtdDiscriminator=l,s.jtdMetadata=d}return $e.extendSubschemaMode=g,$e}var ie={},Ht,kr;function jr(){return kr||(kr=1,Ht=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var i,g,s;if(Array.isArray(t)){if(i=t.length,i!=r.length)return!1;for(g=i;g--!==0;)if(!e(t[g],r[g]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(s=Object.keys(t),i=s.length,i!==Object.keys(r).length)return!1;for(g=i;g--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[g]))return!1;for(g=i;g--!==0;){var l=s[g];if(!e(t[l],r[l]))return!1}return!0}return t!==t&&r!==r}),Ht}var Gt={exports:{}},Rr;function hs(){if(Rr)return Gt.exports;Rr=1;var e=Gt.exports=function(i,g,s){typeof g=="function"&&(s=g,g={}),s=g.cb||s;var l=typeof s=="function"?s:s.pre||function(){},d=s.post||function(){};t(g,l,d,i,"",i)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(i,g,s,l,d,f,w,$,E,_){if(l&&typeof l=="object"&&!Array.isArray(l)){g(l,d,f,w,$,E,_);for(var v in l){var b=l[v];if(Array.isArray(b)){if(v in e.arrayKeywords)for(var h=0;h<b.length;h++)t(i,g,s,b[h],d+"/"+v+"/"+h,f,d,v,l,h)}else if(v in e.propsKeywords){if(b&&typeof b=="object")for(var a in b)t(i,g,s,b[a],d+"/"+v+"/"+r(a),f,d,v,l,a)}else(v in e.keywords||i.allKeys&&!(v in e.skipKeywords))&&t(i,g,s,b,d+"/"+v,f,d,v,l)}s(l,d,f,w,$,E,_)}}function r(i){return i.replace(/~/g,"~0").replace(/\//g,"~1")}return Gt.exports}var Ir;function Ge(){if(Ir)return ie;Ir=1,Object.defineProperty(ie,"__esModule",{value:!0}),ie.getSchemaRefs=ie.resolveUrl=ie.normalizeId=ie._getFullPath=ie.getFullPath=ie.inlineRef=void 0;const e=Y(),t=jr(),r=hs(),i=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function g(h,a=!0){return typeof h=="boolean"?!0:a===!0?!l(h):a?d(h)<=a:!1}ie.inlineRef=g;const s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function l(h){for(const a in h){if(s.has(a))return!0;const u=h[a];if(Array.isArray(u)&&u.some(l)||typeof u=="object"&&l(u))return!0}return!1}function d(h){let a=0;for(const u in h){if(u==="$ref")return 1/0;if(a++,!i.has(u)&&(typeof h[u]=="object"&&(0,e.eachItem)(h[u],n=>a+=d(n)),a===1/0))return 1/0}return a}function f(h,a="",u){u!==!1&&(a=E(a));const n=h.parse(a);return w(h,n)}ie.getFullPath=f;function w(h,a){return h.serialize(a).split("#")[0]+"#"}ie._getFullPath=w;const $=/#\/?$/;function E(h){return h?h.replace($,""):""}ie.normalizeId=E;function _(h,a,u){return u=E(u),h.resolve(a,u)}ie.resolveUrl=_;const v=/^[a-z_][-a-z0-9._]*$/i;function b(h,a){if(typeof h=="boolean")return{};const{schemaId:u,uriResolver:n}=this.opts,c=E(h[u]||a),y={"":c},o=f(n,c,!1),m={},P=new Set;return r(h,{allKeys:!0},(z,C,V,F)=>{if(F===void 0)return;const L=o+C;let Q=y[F];typeof z[u]=="string"&&(Q=oe.call(this,z[u])),ae.call(this,z.$anchor),ae.call(this,z.$dynamicAnchor),y[C]=Q;function oe(X){const ye=this.opts.uriResolver.resolve;if(X=E(Q?ye(Q,X):X),P.has(X))throw T(X);P.add(X);let M=this.refs[X];return typeof M=="string"&&(M=this.refs[M]),typeof M=="object"?O(z,M.schema,X):X!==E(L)&&(X[0]==="#"?(O(z,m[X],X),m[X]=z):this.refs[X]=L),X}function ae(X){if(typeof X=="string"){if(!v.test(X))throw new Error(`invalid anchor "${X}"`);oe.call(this,`#${X}`)}}}),m;function O(z,C,V){if(C!==void 0&&!t(z,C))throw T(V)}function T(z){return new Error(`reference "${z}" resolves to more than one schema`)}}return ie.getSchemaRefs=b,ie}var Or;function We(){if(Or)return ve;Or=1,Object.defineProperty(ve,"__esModule",{value:!0}),ve.getData=ve.KeywordCxt=ve.validateFunctionCode=void 0;const e=ls(),t=He(),r=$r(),i=He(),g=fs(),s=ps(),l=ms(),d=H(),f=be(),w=Ge(),$=Y(),E=Je();function _(k){if(o(k)&&(P(k),y(k))){a(k);return}v(k,()=>(0,e.topBoolOrEmptySchema)(k))}ve.validateFunctionCode=_;function v({gen:k,validateName:R,schema:q,schemaEnv:A,opts:K},W){K.code.es5?k.func(R,(0,d._)`${f.default.data}, ${f.default.valCxt}`,A.$async,()=>{k.code((0,d._)`"use strict"; ${n(q,K)}`),h(k,K),k.code(W)}):k.func(R,(0,d._)`${f.default.data}, ${b(K)}`,A.$async,()=>k.code(n(q,K)).code(W))}function b(k){return(0,d._)`{${f.default.instancePath}="", ${f.default.parentData}, ${f.default.parentDataProperty}, ${f.default.rootData}=${f.default.data}${k.dynamicRef?(0,d._)`, ${f.default.dynamicAnchors}={}`:d.nil}}={}`}function h(k,R){k.if(f.default.valCxt,()=>{k.var(f.default.instancePath,(0,d._)`${f.default.valCxt}.${f.default.instancePath}`),k.var(f.default.parentData,(0,d._)`${f.default.valCxt}.${f.default.parentData}`),k.var(f.default.parentDataProperty,(0,d._)`${f.default.valCxt}.${f.default.parentDataProperty}`),k.var(f.default.rootData,(0,d._)`${f.default.valCxt}.${f.default.rootData}`),R.dynamicRef&&k.var(f.default.dynamicAnchors,(0,d._)`${f.default.valCxt}.${f.default.dynamicAnchors}`)},()=>{k.var(f.default.instancePath,(0,d._)`""`),k.var(f.default.parentData,(0,d._)`undefined`),k.var(f.default.parentDataProperty,(0,d._)`undefined`),k.var(f.default.rootData,f.default.data),R.dynamicRef&&k.var(f.default.dynamicAnchors,(0,d._)`{}`)})}function a(k){const{schema:R,opts:q,gen:A}=k;v(k,()=>{q.$comment&&R.$comment&&F(k),z(k),A.let(f.default.vErrors,null),A.let(f.default.errors,0),q.unevaluated&&u(k),O(k),L(k)})}function u(k){const{gen:R,validateName:q}=k;k.evaluated=R.const("evaluated",(0,d._)`${q}.evaluated`),R.if((0,d._)`${k.evaluated}.dynamicProps`,()=>R.assign((0,d._)`${k.evaluated}.props`,(0,d._)`undefined`)),R.if((0,d._)`${k.evaluated}.dynamicItems`,()=>R.assign((0,d._)`${k.evaluated}.items`,(0,d._)`undefined`))}function n(k,R){const q=typeof k=="object"&&k[R.schemaId];return q&&(R.code.source||R.code.process)?(0,d._)`/*# sourceURL=${q} */`:d.nil}function c(k,R){if(o(k)&&(P(k),y(k))){m(k,R);return}(0,e.boolOrEmptySchema)(k,R)}function y({schema:k,self:R}){if(typeof k=="boolean")return!k;for(const q in k)if(R.RULES.all[q])return!0;return!1}function o(k){return typeof k.schema!="boolean"}function m(k,R){const{schema:q,gen:A,opts:K}=k;K.$comment&&q.$comment&&F(k),C(k),V(k);const W=A.const("_errs",f.default.errors);O(k,W),A.var(R,(0,d._)`${W} === ${f.default.errors}`)}function P(k){(0,$.checkUnknownRules)(k),T(k)}function O(k,R){if(k.opts.jtd)return oe(k,[],!1,R);const q=(0,t.getSchemaTypes)(k.schema),A=(0,t.coerceAndCheckDataType)(k,q);oe(k,q,!A,R)}function T(k){const{schema:R,errSchemaPath:q,opts:A,self:K}=k;R.$ref&&A.ignoreKeywordsWithRef&&(0,$.schemaHasRulesButRef)(R,K.RULES)&&K.logger.warn(`$ref: keywords ignored in schema at path "${q}"`)}function z(k){const{schema:R,opts:q}=k;R.default!==void 0&&q.useDefaults&&q.strictSchema&&(0,$.checkStrictMode)(k,"default is ignored in the schema root")}function C(k){const R=k.schema[k.opts.schemaId];R&&(k.baseId=(0,w.resolveUrl)(k.opts.uriResolver,k.baseId,R))}function V(k){if(k.schema.$async&&!k.schemaEnv.$async)throw new Error("async schema in sync schema")}function F({gen:k,schemaEnv:R,schema:q,errSchemaPath:A,opts:K}){const W=q.$comment;if(K.$comment===!0)k.code((0,d._)`${f.default.self}.logger.log(${W})`);else if(typeof K.$comment=="function"){const ne=(0,d.str)`${A}/$comment`,ge=k.scopeValue("root",{ref:R.root});k.code((0,d._)`${f.default.self}.opts.$comment(${W}, ${ne}, ${ge}.schema)`)}}function L(k){const{gen:R,schemaEnv:q,validateName:A,ValidationError:K,opts:W}=k;q.$async?R.if((0,d._)`${f.default.errors} === 0`,()=>R.return(f.default.data),()=>R.throw((0,d._)`new ${K}(${f.default.vErrors})`)):(R.assign((0,d._)`${A}.errors`,f.default.vErrors),W.unevaluated&&Q(k),R.return((0,d._)`${f.default.errors} === 0`))}function Q({gen:k,evaluated:R,props:q,items:A}){q instanceof d.Name&&k.assign((0,d._)`${R}.props`,q),A instanceof d.Name&&k.assign((0,d._)`${R}.items`,A)}function oe(k,R,q,A){const{gen:K,schema:W,data:ne,allErrors:ge,opts:de,self:ue}=k,{RULES:se}=ue;if(W.$ref&&(de.ignoreKeywordsWithRef||!(0,$.schemaHasRulesButRef)(W,se))){K.block(()=>U(k,"$ref",se.all.$ref.definition));return}de.jtd||X(k,R),K.block(()=>{for(const fe of se.rules)qe(fe);qe(se.post)});function qe(fe){(0,r.shouldUseGroup)(W,fe)&&(fe.type?(K.if((0,i.checkDataType)(fe.type,ne,de.strictNumbers)),ae(k,fe),R.length===1&&R[0]===fe.type&&q&&(K.else(),(0,i.reportTypeError)(k)),K.endIf()):ae(k,fe),ge||K.if((0,d._)`${f.default.errors} === ${A||0}`))}}function ae(k,R){const{gen:q,schema:A,opts:{useDefaults:K}}=k;K&&(0,g.assignDefaults)(k,R.type),q.block(()=>{for(const W of R.rules)(0,r.shouldUseRule)(A,W)&&U(k,W.keyword,W.definition,R.type)})}function X(k,R){k.schemaEnv.meta||!k.opts.strictTypes||(ye(k,R),k.opts.allowUnionTypes||M(k,R),j(k,k.dataTypes))}function ye(k,R){if(R.length){if(!k.dataTypes.length){k.dataTypes=R;return}R.forEach(q=>{I(k.dataTypes,q)||S(k,`type "${q}" not allowed by context "${k.dataTypes.join(",")}"`)}),p(k,R)}}function M(k,R){R.length>1&&!(R.length===2&&R.includes("null"))&&S(k,"use allowUnionTypes to allow union type keyword")}function j(k,R){const q=k.self.RULES.all;for(const A in q){const K=q[A];if(typeof K=="object"&&(0,r.shouldUseRule)(k.schema,K)){const{type:W}=K.definition;W.length&&!W.some(ne=>D(R,ne))&&S(k,`missing type "${W.join(",")}" for keyword "${A}"`)}}}function D(k,R){return k.includes(R)||R==="number"&&k.includes("integer")}function I(k,R){return k.includes(R)||R==="integer"&&k.includes("number")}function p(k,R){const q=[];for(const A of k.dataTypes)I(R,A)?q.push(A):R.includes("integer")&&A==="number"&&q.push("integer");k.dataTypes=q}function S(k,R){const q=k.schemaEnv.baseId+k.errSchemaPath;R+=` at "${q}" (strictTypes)`,(0,$.checkStrictMode)(k,R,k.opts.strictTypes)}class N{constructor(R,q,A){if((0,s.validateKeywordUsage)(R,q,A),this.gen=R.gen,this.allErrors=R.allErrors,this.keyword=A,this.data=R.data,this.schema=R.schema[A],this.$data=q.$data&&R.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,$.schemaRefOrVal)(R,this.schema,A,this.$data),this.schemaType=q.schemaType,this.parentSchema=R.schema,this.params={},this.it=R,this.def=q,this.$data)this.schemaCode=R.gen.const("vSchema",B(this.$data,R));else if(this.schemaCode=this.schemaValue,!(0,s.validSchemaType)(this.schema,q.schemaType,q.allowUndefined))throw new Error(`${A} value must be ${JSON.stringify(q.schemaType)}`);("code"in q?q.trackErrors:q.errors!==!1)&&(this.errsCount=R.gen.const("_errs",f.default.errors))}result(R,q,A){this.failResult((0,d.not)(R),q,A)}failResult(R,q,A){this.gen.if(R),A?A():this.error(),q?(this.gen.else(),q(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(R,q){this.failResult((0,d.not)(R),void 0,q)}fail(R){if(R===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(R),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(R){if(!this.$data)return this.fail(R);const{schemaCode:q}=this;this.fail((0,d._)`${q} !== undefined && (${(0,d.or)(this.invalid$data(),R)})`)}error(R,q,A){if(q){this.setParams(q),this._error(R,A),this.setParams({});return}this._error(R,A)}_error(R,q){(R?E.reportExtraError:E.reportError)(this,this.def.error,q)}$dataError(){(0,E.reportError)(this,this.def.$dataError||E.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,E.resetErrorsCount)(this.gen,this.errsCount)}ok(R){this.allErrors||this.gen.if(R)}setParams(R,q){q?Object.assign(this.params,R):this.params=R}block$data(R,q,A=d.nil){this.gen.block(()=>{this.check$data(R,A),q()})}check$data(R=d.nil,q=d.nil){if(!this.$data)return;const{gen:A,schemaCode:K,schemaType:W,def:ne}=this;A.if((0,d.or)((0,d._)`${K} === undefined`,q)),R!==d.nil&&A.assign(R,!0),(W.length||ne.validateSchema)&&(A.elseIf(this.invalid$data()),this.$dataError(),R!==d.nil&&A.assign(R,!1)),A.else()}invalid$data(){const{gen:R,schemaCode:q,schemaType:A,def:K,it:W}=this;return(0,d.or)(ne(),ge());function ne(){if(A.length){if(!(q instanceof d.Name))throw new Error("ajv implementation error");const de=Array.isArray(A)?A:[A];return(0,d._)`${(0,i.checkDataTypes)(de,q,W.opts.strictNumbers,i.DataType.Wrong)}`}return d.nil}function ge(){if(K.validateSchema){const de=R.scopeValue("validate$data",{ref:K.validateSchema});return(0,d._)`!${de}(${q})`}return d.nil}}subschema(R,q){const A=(0,l.getSubschema)(this.it,R);(0,l.extendSubschemaData)(A,this.it,R),(0,l.extendSubschemaMode)(A,R);const K={...this.it,...A,items:void 0,props:void 0};return c(K,q),K}mergeEvaluated(R,q){const{it:A,gen:K}=this;A.opts.unevaluated&&(A.props!==!0&&R.props!==void 0&&(A.props=$.mergeEvaluated.props(K,R.props,A.props,q)),A.items!==!0&&R.items!==void 0&&(A.items=$.mergeEvaluated.items(K,R.items,A.items,q)))}mergeValidEvaluated(R,q){const{it:A,gen:K}=this;if(A.opts.unevaluated&&(A.props!==!0||A.items!==!0))return K.if(q,()=>this.mergeEvaluated(R,d.Name)),!0}}ve.KeywordCxt=N;function U(k,R,q,A){const K=new N(k,q,R);"code"in q?q.code(K,A):K.$data&&q.validate?(0,s.funcKeywordCode)(K,q):"macro"in q?(0,s.macroKeywordCode)(K,q):(q.compile||q.validate)&&(0,s.funcKeywordCode)(K,q)}const J=/^\/(?:[^~]|~0|~1)*$/,x=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function B(k,{dataLevel:R,dataNames:q,dataPathArr:A}){let K,W;if(k==="")return f.default.rootData;if(k[0]==="/"){if(!J.test(k))throw new Error(`Invalid JSON-pointer: ${k}`);K=k,W=f.default.rootData}else{const ue=x.exec(k);if(!ue)throw new Error(`Invalid JSON-pointer: ${k}`);const se=+ue[1];if(K=ue[2],K==="#"){if(se>=R)throw new Error(de("property/index",se));return A[R-se]}if(se>R)throw new Error(de("data",se));if(W=q[R-se],!K)return W}let ne=W;const ge=K.split("/");for(const ue of ge)ue&&(W=(0,d._)`${W}${(0,d.getProperty)((0,$.unescapeJsonPointer)(ue))}`,ne=(0,d._)`${ne} && ${W}`);return ne;function de(ue,se){return`Cannot access ${ue} ${se} levels up, current level is ${R}`}}return ve.getData=B,ve}var Be={},Nr;function Wt(){if(Nr)return Be;Nr=1,Object.defineProperty(Be,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return Be.default=e,Be}var Ye={},Cr;function xe(){if(Cr)return Ye;Cr=1,Object.defineProperty(Ye,"__esModule",{value:!0});const e=Ge();class t extends Error{constructor(i,g,s,l){super(l||`can't resolve reference ${s} from id ${g}`),this.missingRef=(0,e.resolveUrl)(i,g,s),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(i,this.missingRef))}}return Ye.default=t,Ye}var le={},qr;function Bt(){if(qr)return le;qr=1,Object.defineProperty(le,"__esModule",{value:!0}),le.resolveSchema=le.getCompilingSchema=le.resolveRef=le.compileSchema=le.SchemaEnv=void 0;const e=H(),t=Wt(),r=be(),i=Ge(),g=Y(),s=We();class l{constructor(u){var n;this.refs={},this.dynamicAnchors={};let c;typeof u.schema=="object"&&(c=u.schema),this.schema=u.schema,this.schemaId=u.schemaId,this.root=u.root||this,this.baseId=(n=u.baseId)!==null&&n!==void 0?n:(0,i.normalizeId)(c?.[u.schemaId||"$id"]),this.schemaPath=u.schemaPath,this.localRefs=u.localRefs,this.meta=u.meta,this.$async=c?.$async,this.refs={}}}le.SchemaEnv=l;function d(a){const u=$.call(this,a);if(u)return u;const n=(0,i.getFullPath)(this.opts.uriResolver,a.root.baseId),{es5:c,lines:y}=this.opts.code,{ownProperties:o}=this.opts,m=new e.CodeGen(this.scope,{es5:c,lines:y,ownProperties:o});let P;a.$async&&(P=m.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const O=m.scopeName("validate");a.validateName=O;const T={gen:m,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:m.scopeValue("schema",this.opts.code.source===!0?{ref:a.schema,code:(0,e.stringify)(a.schema)}:{ref:a.schema}),validateName:O,ValidationError:P,schema:a.schema,schemaEnv:a,rootId:n,baseId:a.baseId||n,schemaPath:e.nil,errSchemaPath:a.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let z;try{this._compilations.add(a),(0,s.validateFunctionCode)(T),m.optimize(this.opts.code.optimize);const C=m.toString();z=`${m.scopeRefs(r.default.scope)}return ${C}`,this.opts.code.process&&(z=this.opts.code.process(z,a));const F=new Function(`${r.default.self}`,`${r.default.scope}`,z)(this,this.scope.get());if(this.scope.value(O,{ref:F}),F.errors=null,F.schema=a.schema,F.schemaEnv=a,a.$async&&(F.$async=!0),this.opts.code.source===!0&&(F.source={validateName:O,validateCode:C,scopeValues:m._values}),this.opts.unevaluated){const{props:L,items:Q}=T;F.evaluated={props:L instanceof e.Name?void 0:L,items:Q instanceof e.Name?void 0:Q,dynamicProps:L instanceof e.Name,dynamicItems:Q instanceof e.Name},F.source&&(F.source.evaluated=(0,e.stringify)(F.evaluated))}return a.validate=F,a}catch(C){throw delete a.validate,delete a.validateName,z&&this.logger.error("Error compiling schema, function code:",z),C}finally{this._compilations.delete(a)}}le.compileSchema=d;function f(a,u,n){var c;n=(0,i.resolveUrl)(this.opts.uriResolver,u,n);const y=a.refs[n];if(y)return y;let o=_.call(this,a,n);if(o===void 0){const m=(c=a.localRefs)===null||c===void 0?void 0:c[n],{schemaId:P}=this.opts;m&&(o=new l({schema:m,schemaId:P,root:a,baseId:u}))}if(o!==void 0)return a.refs[n]=w.call(this,o)}le.resolveRef=f;function w(a){return(0,i.inlineRef)(a.schema,this.opts.inlineRefs)?a.schema:a.validate?a:d.call(this,a)}function $(a){for(const u of this._compilations)if(E(u,a))return u}le.getCompilingSchema=$;function E(a,u){return a.schema===u.schema&&a.root===u.root&&a.baseId===u.baseId}function _(a,u){let n;for(;typeof(n=this.refs[u])=="string";)u=n;return n||this.schemas[u]||v.call(this,a,u)}function v(a,u){const n=this.opts.uriResolver.parse(u),c=(0,i._getFullPath)(this.opts.uriResolver,n);let y=(0,i.getFullPath)(this.opts.uriResolver,a.baseId,void 0);if(Object.keys(a.schema).length>0&&c===y)return h.call(this,n,a);const o=(0,i.normalizeId)(c),m=this.refs[o]||this.schemas[o];if(typeof m=="string"){const P=v.call(this,a,m);return typeof P?.schema!="object"?void 0:h.call(this,n,P)}if(typeof m?.schema=="object"){if(m.validate||d.call(this,m),o===(0,i.normalizeId)(u)){const{schema:P}=m,{schemaId:O}=this.opts,T=P[O];return T&&(y=(0,i.resolveUrl)(this.opts.uriResolver,y,T)),new l({schema:P,schemaId:O,root:a,baseId:y})}return h.call(this,n,m)}}le.resolveSchema=v;const b=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function h(a,{baseId:u,schema:n,root:c}){var y;if(((y=a.fragment)===null||y===void 0?void 0:y[0])!=="/")return;for(const P of a.fragment.slice(1).split("/")){if(typeof n=="boolean")return;const O=n[(0,g.unescapeFragment)(P)];if(O===void 0)return;n=O;const T=typeof n=="object"&&n[this.opts.schemaId];!b.has(P)&&T&&(u=(0,i.resolveUrl)(this.opts.uriResolver,u,T))}let o;if(typeof n!="boolean"&&n.$ref&&!(0,g.schemaHasRulesButRef)(n,this.RULES)){const P=(0,i.resolveUrl)(this.opts.uriResolver,u,n.$ref);o=v.call(this,c,P)}const{schemaId:m}=this.opts;if(o=o||new l({schema:n,schemaId:m,root:c,baseId:u}),o.schema!==o.root.schema)return o}return le}const ys={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1};var Qe={},Te={exports:{}},Yt,Dr;function Tr(){if(Dr)return Yt;Dr=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function r(_){let v="",b=0,h=0;for(h=0;h<_.length;h++)if(b=_[h].charCodeAt(0),b!==48){if(!(b>=48&&b<=57||b>=65&&b<=70||b>=97&&b<=102))return"";v+=_[h];break}for(h+=1;h<_.length;h++){if(b=_[h].charCodeAt(0),!(b>=48&&b<=57||b>=65&&b<=70||b>=97&&b<=102))return"";v+=_[h]}return v}const i=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function g(_){return _.length=0,!0}function s(_,v,b){if(_.length){const h=r(_);if(h!=="")v.push(h);else return b.error=!0,!1;_.length=0}return!0}function l(_){let v=0;const b={error:!1,address:"",zone:""},h=[],a=[];let u=!1,n=!1,c=s;for(let y=0;y<_.length;y++){const o=_[y];if(!(o==="["||o==="]"))if(o===":"){if(u===!0&&(n=!0),!c(a,h,b))break;if(++v>7){b.error=!0;break}y>0&&_[y-1]===":"&&(u=!0),h.push(":");continue}else if(o==="%"){if(!c(a,h,b))break;c=g}else{a.push(o);continue}}return a.length&&(c===g?b.zone=a.join(""):n?h.push(a.join("")):h.push(r(a))),b.address=h.join(""),b}function d(_){if(f(_,":")<2)return{host:_,isIPV6:!1};const v=l(_);if(v.error)return{host:_,isIPV6:!1};{let b=v.address,h=v.address;return v.zone&&(b+="%"+v.zone,h+="%25"+v.zone),{host:b,isIPV6:!0,escapedHost:h}}}function f(_,v){let b=0;for(let h=0;h<_.length;h++)_[h]===v&&b++;return b}function w(_){let v=_;const b=[];let h=-1,a=0;for(;a=v.length;){if(a===1){if(v===".")break;if(v==="/"){b.push("/");break}else{b.push(v);break}}else if(a===2){if(v[0]==="."){if(v[1]===".")break;if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&(v[1]==="."||v[1]==="/")){b.push("/");break}}else if(a===3&&v==="/.."){b.length!==0&&b.pop(),b.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),b.length!==0&&b.pop();continue}}if((h=v.indexOf("/",1))===-1){b.push(v);break}else b.push(v.slice(0,h)),v=v.slice(h)}return b.join("")}function $(_,v){const b=v!==!0?escape:unescape;return _.scheme!==void 0&&(_.scheme=b(_.scheme)),_.userinfo!==void 0&&(_.userinfo=b(_.userinfo)),_.host!==void 0&&(_.host=b(_.host)),_.path!==void 0&&(_.path=b(_.path)),_.query!==void 0&&(_.query=b(_.query)),_.fragment!==void 0&&(_.fragment=b(_.fragment)),_}function E(_){const v=[];if(_.userinfo!==void 0&&(v.push(_.userinfo),v.push("@")),_.host!==void 0){let b=unescape(_.host);if(!t(b)){const h=d(b);h.isIPV6===!0?b=`[${h.escapedHost}]`:b=_.host}v.push(b)}return(typeof _.port=="number"||typeof _.port=="string")&&(v.push(":"),v.push(String(_.port))),v.length?v.join(""):void 0}return Yt={nonSimpleDomain:i,recomposeAuthority:E,normalizeComponentEncoding:$,removeDotSegments:w,isIPv4:t,isUUID:e,normalizeIPv6:d,stringArrayToHexStripped:r},Yt}var xt,Mr;function gs(){if(Mr)return xt;Mr=1;const{isUUID:e}=Tr(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,r=["http","https","ws","wss","urn","urn:uuid"];function i(o){return r.indexOf(o)!==-1}function g(o){return o.secure===!0?!0:o.secure===!1?!1:o.scheme?o.scheme.length===3&&(o.scheme[0]==="w"||o.scheme[0]==="W")&&(o.scheme[1]==="s"||o.scheme[1]==="S")&&(o.scheme[2]==="s"||o.scheme[2]==="S"):!1}function s(o){return o.host||(o.error=o.error||"HTTP URIs must have a host."),o}function l(o){const m=String(o.scheme).toLowerCase()==="https";return(o.port===(m?443:80)||o.port==="")&&(o.port=void 0),o.path||(o.path="/"),o}function d(o){return o.secure=g(o),o.resourceName=(o.path||"/")+(o.query?"?"+o.query:""),o.path=void 0,o.query=void 0,o}function f(o){if((o.port===(g(o)?443:80)||o.port==="")&&(o.port=void 0),typeof o.secure=="boolean"&&(o.scheme=o.secure?"wss":"ws",o.secure=void 0),o.resourceName){const[m,P]=o.resourceName.split("?");o.path=m&&m!=="/"?m:void 0,o.query=P,o.resourceName=void 0}return o.fragment=void 0,o}function w(o,m){if(!o.path)return o.error="URN can not be parsed",o;const P=o.path.match(t);if(P){const O=m.scheme||o.scheme||"urn";o.nid=P[1].toLowerCase(),o.nss=P[2];const T=`${O}:${m.nid||o.nid}`,z=y(T);o.path=void 0,z&&(o=z.parse(o,m))}else o.error=o.error||"URN can not be parsed.";return o}function $(o,m){if(o.nid===void 0)throw new Error("URN without nid cannot be serialized");const P=m.scheme||o.scheme||"urn",O=o.nid.toLowerCase(),T=`${P}:${m.nid||O}`,z=y(T);z&&(o=z.serialize(o,m));const C=o,V=o.nss;return C.path=`${O||m.nid}:${V}`,m.skipEscape=!0,C}function E(o,m){const P=o;return P.uuid=P.nss,P.nss=void 0,!m.tolerant&&(!P.uuid||!e(P.uuid))&&(P.error=P.error||"UUID is not valid."),P}function _(o){const m=o;return m.nss=(o.uuid||"").toLowerCase(),m}const v={scheme:"http",domainHost:!0,parse:s,serialize:l},b={scheme:"https",domainHost:v.domainHost,parse:s,serialize:l},h={scheme:"ws",domainHost:!0,parse:d,serialize:f},a={scheme:"wss",domainHost:h.domainHost,parse:h.parse,serialize:h.serialize},c={http:v,https:b,ws:h,wss:a,urn:{scheme:"urn",parse:w,serialize:$,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:E,serialize:_,skipNormalize:!0}};Object.setPrototypeOf(c,null);function y(o){return o&&(c[o]||c[o.toLowerCase()])||void 0}return xt={wsIsSecure:g,SCHEMES:c,isValidSchemeName:i,getSchemeHandler:y},xt}var Ar;function vs(){if(Ar)return Te.exports;Ar=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:r,normalizeComponentEncoding:i,isIPv4:g,nonSimpleDomain:s}=Tr(),{SCHEMES:l,getSchemeHandler:d}=gs();function f(a,u){return typeof a=="string"?a=_(b(a,u),u):typeof a=="object"&&(a=b(_(a,u),u)),a}function w(a,u,n){const c=n?Object.assign({scheme:"null"},n):{scheme:"null"},y=$(b(a,c),b(u,c),c,!0);return c.skipEscape=!0,_(y,c)}function $(a,u,n,c){const y={};return c||(a=b(_(a,n),n),u=b(_(u,n),n)),n=n||{},!n.tolerant&&u.scheme?(y.scheme=u.scheme,y.userinfo=u.userinfo,y.host=u.host,y.port=u.port,y.path=t(u.path||""),y.query=u.query):(u.userinfo!==void 0||u.host!==void 0||u.port!==void 0?(y.userinfo=u.userinfo,y.host=u.host,y.port=u.port,y.path=t(u.path||""),y.query=u.query):(u.path?(u.path[0]==="/"?y.path=t(u.path):((a.userinfo!==void 0||a.host!==void 0||a.port!==void 0)&&!a.path?y.path="/"+u.path:a.path?y.path=a.path.slice(0,a.path.lastIndexOf("/")+1)+u.path:y.path=u.path,y.path=t(y.path)),y.query=u.query):(y.path=a.path,u.query!==void 0?y.query=u.query:y.query=a.query),y.userinfo=a.userinfo,y.host=a.host,y.port=a.port),y.scheme=a.scheme),y.fragment=u.fragment,y}function E(a,u,n){return typeof a=="string"?(a=unescape(a),a=_(i(b(a,n),!0),{...n,skipEscape:!0})):typeof a=="object"&&(a=_(i(a,!0),{...n,skipEscape:!0})),typeof u=="string"?(u=unescape(u),u=_(i(b(u,n),!0),{...n,skipEscape:!0})):typeof u=="object"&&(u=_(i(u,!0),{...n,skipEscape:!0})),a.toLowerCase()===u.toLowerCase()}function _(a,u){const n={host:a.host,scheme:a.scheme,userinfo:a.userinfo,port:a.port,path:a.path,query:a.query,nid:a.nid,nss:a.nss,uuid:a.uuid,fragment:a.fragment,reference:a.reference,resourceName:a.resourceName,secure:a.secure,error:""},c=Object.assign({},u),y=[],o=d(c.scheme||n.scheme);o&&o.serialize&&o.serialize(n,c),n.path!==void 0&&(c.skipEscape?n.path=unescape(n.path):(n.path=escape(n.path),n.scheme!==void 0&&(n.path=n.path.split("%3A").join(":")))),c.reference!=="suffix"&&n.scheme&&y.push(n.scheme,":");const m=r(n);if(m!==void 0&&(c.reference!=="suffix"&&y.push("//"),y.push(m),n.path&&n.path[0]!=="/"&&y.push("/")),n.path!==void 0){let P=n.path;!c.absolutePath&&(!o||!o.absolutePath)&&(P=t(P)),m===void 0&&P[0]==="/"&&P[1]==="/"&&(P="/%2F"+P.slice(2)),y.push(P)}return n.query!==void 0&&y.push("?",n.query),n.fragment!==void 0&&y.push("#",n.fragment),y.join("")}const v=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function b(a,u){const n=Object.assign({},u),c={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let y=!1;n.reference==="suffix"&&(n.scheme?a=n.scheme+":"+a:a="//"+a);const o=a.match(v);if(o){if(c.scheme=o[1],c.userinfo=o[3],c.host=o[4],c.port=parseInt(o[5],10),c.path=o[6]||"",c.query=o[7],c.fragment=o[8],isNaN(c.port)&&(c.port=o[5]),c.host)if(g(c.host)===!1){const O=e(c.host);c.host=O.host.toLowerCase(),y=O.isIPV6}else y=!0;c.scheme===void 0&&c.userinfo===void 0&&c.host===void 0&&c.port===void 0&&c.query===void 0&&!c.path?c.reference="same-document":c.scheme===void 0?c.reference="relative":c.fragment===void 0?c.reference="absolute":c.reference="uri",n.reference&&n.reference!=="suffix"&&n.reference!==c.reference&&(c.error=c.error||"URI is not a "+n.reference+" reference.");const m=d(n.scheme||c.scheme);if(!n.unicodeSupport&&(!m||!m.unicodeSupport)&&c.host&&(n.domainHost||m&&m.domainHost)&&y===!1&&s(c.host))try{c.host=URL.domainToASCII(c.host.toLowerCase())}catch(P){c.error=c.error||"Host's domain name can not be converted to ASCII: "+P}(!m||m&&!m.skipNormalize)&&(a.indexOf("%")!==-1&&(c.scheme!==void 0&&(c.scheme=unescape(c.scheme)),c.host!==void 0&&(c.host=unescape(c.host))),c.path&&(c.path=escape(unescape(c.path))),c.fragment&&(c.fragment=encodeURI(decodeURIComponent(c.fragment)))),m&&m.parse&&m.parse(c,n)}else c.error=c.error||"URI can not be parsed.";return c}const h={SCHEMES:l,normalize:f,resolve:w,resolveComponent:$,equal:E,serialize:_,parse:b};return Te.exports=h,Te.exports.default=h,Te.exports.fastUri=h,Te.exports}var Vr;function _s(){if(Vr)return Qe;Vr=1,Object.defineProperty(Qe,"__esModule",{value:!0});const e=vs();return e.code='require("ajv/dist/runtime/uri").default',Qe.default=e,Qe}var zr;function $s(){return zr||(zr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=We();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=H();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const i=Wt(),g=xe(),s=vr(),l=Bt(),d=H(),f=Ge(),w=He(),$=Y(),E=ys,_=_s(),v=(M,j)=>new RegExp(M,j);v.code="new RegExp";const b=["removeAdditional","useDefaults","coerceTypes"],h=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),a={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},u={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},n=200;function c(M){var j,D,I,p,S,N,U,J,x,B,k,R,q,A,K,W,ne,ge,de,ue,se,qe,fe,or,ar;const Fe=M.strict,cr=(j=M.code)===null||j===void 0?void 0:j.optimize,ds=cr===!0||cr===void 0?1:cr||0,us=(I=(D=M.code)===null||D===void 0?void 0:D.regExp)!==null&&I!==void 0?I:v,Oi=(p=M.uriResolver)!==null&&p!==void 0?p:_.default;return{strictSchema:(N=(S=M.strictSchema)!==null&&S!==void 0?S:Fe)!==null&&N!==void 0?N:!0,strictNumbers:(J=(U=M.strictNumbers)!==null&&U!==void 0?U:Fe)!==null&&J!==void 0?J:!0,strictTypes:(B=(x=M.strictTypes)!==null&&x!==void 0?x:Fe)!==null&&B!==void 0?B:"log",strictTuples:(R=(k=M.strictTuples)!==null&&k!==void 0?k:Fe)!==null&&R!==void 0?R:"log",strictRequired:(A=(q=M.strictRequired)!==null&&q!==void 0?q:Fe)!==null&&A!==void 0?A:!1,code:M.code?{...M.code,optimize:ds,regExp:us}:{optimize:ds,regExp:us},loopRequired:(K=M.loopRequired)!==null&&K!==void 0?K:n,loopEnum:(W=M.loopEnum)!==null&&W!==void 0?W:n,meta:(ne=M.meta)!==null&&ne!==void 0?ne:!0,messages:(ge=M.messages)!==null&&ge!==void 0?ge:!0,inlineRefs:(de=M.inlineRefs)!==null&&de!==void 0?de:!0,schemaId:(ue=M.schemaId)!==null&&ue!==void 0?ue:"$id",addUsedSchema:(se=M.addUsedSchema)!==null&&se!==void 0?se:!0,validateSchema:(qe=M.validateSchema)!==null&&qe!==void 0?qe:!0,validateFormats:(fe=M.validateFormats)!==null&&fe!==void 0?fe:!0,unicodeRegExp:(or=M.unicodeRegExp)!==null&&or!==void 0?or:!0,int32range:(ar=M.int32range)!==null&&ar!==void 0?ar:!0,uriResolver:Oi}}class y{constructor(j={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,j=this.opts={...j,...c(j)};const{es5:D,lines:I}=this.opts.code;this.scope=new d.ValueScope({scope:{},prefixes:h,es5:D,lines:I}),this.logger=V(j.logger);const p=j.validateFormats;j.validateFormats=!1,this.RULES=(0,s.getRules)(),o.call(this,a,j,"NOT SUPPORTED"),o.call(this,u,j,"DEPRECATED","warn"),this._metaOpts=z.call(this),j.formats&&O.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),j.keywords&&T.call(this,j.keywords),typeof j.meta=="object"&&this.addMetaSchema(j.meta),P.call(this),j.validateFormats=p}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:j,meta:D,schemaId:I}=this.opts;let p=E;I==="id"&&(p={...E},p.id=p.$id,delete p.$id),D&&j&&this.addMetaSchema(p,p[I],!1)}defaultMeta(){const{meta:j,schemaId:D}=this.opts;return this.opts.defaultMeta=typeof j=="object"?j[D]||j:void 0}validate(j,D){let I;if(typeof j=="string"){if(I=this.getSchema(j),!I)throw new Error(`no schema with key or ref "${j}"`)}else I=this.compile(j);const p=I(D);return"$async"in I||(this.errors=I.errors),p}compile(j,D){const I=this._addSchema(j,D);return I.validate||this._compileSchemaEnv(I)}compileAsync(j,D){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:I}=this.opts;return p.call(this,j,D);async function p(B,k){await S.call(this,B.$schema);const R=this._addSchema(B,k);return R.validate||N.call(this,R)}async function S(B){B&&!this.getSchema(B)&&await p.call(this,{$ref:B},!0)}async function N(B){try{return this._compileSchemaEnv(B)}catch(k){if(!(k instanceof g.default))throw k;return U.call(this,k),await J.call(this,k.missingSchema),N.call(this,B)}}function U({missingSchema:B,missingRef:k}){if(this.refs[B])throw new Error(`AnySchema ${B} is loaded but ${k} cannot be resolved`)}async function J(B){const k=await x.call(this,B);this.refs[B]||await S.call(this,k.$schema),this.refs[B]||this.addSchema(k,B,D)}async function x(B){const k=this._loading[B];if(k)return k;try{return await(this._loading[B]=I(B))}finally{delete this._loading[B]}}}addSchema(j,D,I,p=this.opts.validateSchema){if(Array.isArray(j)){for(const N of j)this.addSchema(N,void 0,I,p);return this}let S;if(typeof j=="object"){const{schemaId:N}=this.opts;if(S=j[N],S!==void 0&&typeof S!="string")throw new Error(`schema ${N} must be string`)}return D=(0,f.normalizeId)(D||S),this._checkUnique(D),this.schemas[D]=this._addSchema(j,I,D,p,!0),this}addMetaSchema(j,D,I=this.opts.validateSchema){return this.addSchema(j,D,!0,I),this}validateSchema(j,D){if(typeof j=="boolean")return!0;let I;if(I=j.$schema,I!==void 0&&typeof I!="string")throw new Error("$schema must be a string");if(I=I||this.opts.defaultMeta||this.defaultMeta(),!I)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const p=this.validate(I,j);if(!p&&D){const S="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(S);else throw new Error(S)}return p}getSchema(j){let D;for(;typeof(D=m.call(this,j))=="string";)j=D;if(D===void 0){const{schemaId:I}=this.opts,p=new l.SchemaEnv({schema:{},schemaId:I});if(D=l.resolveSchema.call(this,p,j),!D)return;this.refs[j]=D}return D.validate||this._compileSchemaEnv(D)}removeSchema(j){if(j instanceof RegExp)return this._removeAllSchemas(this.schemas,j),this._removeAllSchemas(this.refs,j),this;switch(typeof j){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const D=m.call(this,j);return typeof D=="object"&&this._cache.delete(D.schema),delete this.schemas[j],delete this.refs[j],this}case"object":{const D=j;this._cache.delete(D);let I=j[this.opts.schemaId];return I&&(I=(0,f.normalizeId)(I),delete this.schemas[I],delete this.refs[I]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(j){for(const D of j)this.addKeyword(D);return this}addKeyword(j,D){let I;if(typeof j=="string")I=j,typeof D=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),D.keyword=I);else if(typeof j=="object"&&D===void 0){if(D=j,I=D.keyword,Array.isArray(I)&&!I.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(L.call(this,I,D),!D)return(0,$.eachItem)(I,S=>Q.call(this,S)),this;ae.call(this,D);const p={...D,type:(0,w.getJSONTypes)(D.type),schemaType:(0,w.getJSONTypes)(D.schemaType)};return(0,$.eachItem)(I,p.type.length===0?S=>Q.call(this,S,p):S=>p.type.forEach(N=>Q.call(this,S,p,N))),this}getKeyword(j){const D=this.RULES.all[j];return typeof D=="object"?D.definition:!!D}removeKeyword(j){const{RULES:D}=this;delete D.keywords[j],delete D.all[j];for(const I of D.rules){const p=I.rules.findIndex(S=>S.keyword===j);p>=0&&I.rules.splice(p,1)}return this}addFormat(j,D){return typeof D=="string"&&(D=new RegExp(D)),this.formats[j]=D,this}errorsText(j=this.errors,{separator:D=", ",dataVar:I="data"}={}){return!j||j.length===0?"No errors":j.map(p=>`${I}${p.instancePath} ${p.message}`).reduce((p,S)=>p+D+S)}$dataMetaSchema(j,D){const I=this.RULES.all;j=JSON.parse(JSON.stringify(j));for(const p of D){const S=p.split("/").slice(1);let N=j;for(const U of S)N=N[U];for(const U in I){const J=I[U];if(typeof J!="object")continue;const{$data:x}=J.definition,B=N[U];x&&B&&(N[U]=ye(B))}}return j}_removeAllSchemas(j,D){for(const I in j){const p=j[I];(!D||D.test(I))&&(typeof p=="string"?delete j[I]:p&&!p.meta&&(this._cache.delete(p.schema),delete j[I]))}}_addSchema(j,D,I,p=this.opts.validateSchema,S=this.opts.addUsedSchema){let N;const{schemaId:U}=this.opts;if(typeof j=="object")N=j[U];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof j!="boolean")throw new Error("schema must be object or boolean")}let J=this._cache.get(j);if(J!==void 0)return J;I=(0,f.normalizeId)(N||I);const x=f.getSchemaRefs.call(this,j,I);return J=new l.SchemaEnv({schema:j,schemaId:U,meta:D,baseId:I,localRefs:x}),this._cache.set(J.schema,J),S&&!I.startsWith("#")&&(I&&this._checkUnique(I),this.refs[I]=J),p&&this.validateSchema(j,!0),J}_checkUnique(j){if(this.schemas[j]||this.refs[j])throw new Error(`schema with key or id "${j}" already exists`)}_compileSchemaEnv(j){if(j.meta?this._compileMetaSchema(j):l.compileSchema.call(this,j),!j.validate)throw new Error("ajv implementation error");return j.validate}_compileMetaSchema(j){const D=this.opts;this.opts=this._metaOpts;try{l.compileSchema.call(this,j)}finally{this.opts=D}}}y.ValidationError=i.default,y.MissingRefError=g.default,e.default=y;function o(M,j,D,I="error"){for(const p in M){const S=p;S in j&&this.logger[I](`${D}: option ${p}. ${M[S]}`)}}function m(M){return M=(0,f.normalizeId)(M),this.schemas[M]||this.refs[M]}function P(){const M=this.opts.schemas;if(M)if(Array.isArray(M))this.addSchema(M);else for(const j in M)this.addSchema(M[j],j)}function O(){for(const M in this.opts.formats){const j=this.opts.formats[M];j&&this.addFormat(M,j)}}function T(M){if(Array.isArray(M)){this.addVocabulary(M);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const j in M){const D=M[j];D.keyword||(D.keyword=j),this.addKeyword(D)}}function z(){const M={...this.opts};for(const j of b)delete M[j];return M}const C={log(){},warn(){},error(){}};function V(M){if(M===!1)return C;if(M===void 0)return console;if(M.log&&M.warn&&M.error)return M;throw new Error("logger must implement log, warn and error methods")}const F=/^[a-z_$][a-z0-9_$:-]*$/i;function L(M,j){const{RULES:D}=this;if((0,$.eachItem)(M,I=>{if(D.keywords[I])throw new Error(`Keyword ${I} is already defined`);if(!F.test(I))throw new Error(`Keyword ${I} has invalid name`)}),!!j&&j.$data&&!("code"in j||"validate"in j))throw new Error('$data keyword must have "code" or "validate" function')}function Q(M,j,D){var I;const p=j?.post;if(D&&p)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:S}=this;let N=p?S.post:S.rules.find(({type:J})=>J===D);if(N||(N={type:D,rules:[]},S.rules.push(N)),S.keywords[M]=!0,!j)return;const U={keyword:M,definition:{...j,type:(0,w.getJSONTypes)(j.type),schemaType:(0,w.getJSONTypes)(j.schemaType)}};j.before?oe.call(this,N,U,j.before):N.rules.push(U),S.all[M]=U,(I=j.implements)===null||I===void 0||I.forEach(J=>this.addKeyword(J))}function oe(M,j,D){const I=M.rules.findIndex(p=>p.keyword===D);I>=0?M.rules.splice(I,0,j):(M.rules.push(j),this.logger.warn(`rule ${D} is not defined`))}function ae(M){let{metaSchema:j}=M;j!==void 0&&(M.$data&&this.opts.$data&&(j=ye(j)),M.validateSchema=this.compile(j,!0))}const X={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ye(M){return{anyOf:[M,X]}}})(Ft)),Ft}var Ze={},Xe={},et={},Fr;function bs(){if(Fr)return et;Fr=1,Object.defineProperty(et,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return et.default=e,et}var we={},Lr;function ws(){if(Lr)return we;Lr=1,Object.defineProperty(we,"__esModule",{value:!0}),we.callRef=we.getValidate=void 0;const e=xe(),t=me(),r=H(),i=be(),g=Bt(),s=Y(),l={keyword:"$ref",schemaType:"string",code(w){const{gen:$,schema:E,it:_}=w,{baseId:v,schemaEnv:b,validateName:h,opts:a,self:u}=_,{root:n}=b;if((E==="#"||E==="#/")&&v===n.baseId)return y();const c=g.resolveRef.call(u,n,v,E);if(c===void 0)throw new e.default(_.opts.uriResolver,v,E);if(c instanceof g.SchemaEnv)return o(c);return m(c);function y(){if(b===n)return f(w,h,b,b.$async);const P=$.scopeValue("root",{ref:n});return f(w,(0,r._)`${P}.validate`,n,n.$async)}function o(P){const O=d(w,P);f(w,O,P,P.$async)}function m(P){const O=$.scopeValue("schema",a.code.source===!0?{ref:P,code:(0,r.stringify)(P)}:{ref:P}),T=$.name("valid"),z=w.subschema({schema:P,dataTypes:[],schemaPath:r.nil,topSchemaRef:O,errSchemaPath:E},T);w.mergeEvaluated(z),w.ok(T)}}};function d(w,$){const{gen:E}=w;return $.validate?E.scopeValue("validate",{ref:$.validate}):(0,r._)`${E.scopeValue("wrapper",{ref:$})}.validate`}we.getValidate=d;function f(w,$,E,_){const{gen:v,it:b}=w,{allErrors:h,schemaEnv:a,opts:u}=b,n=u.passContext?i.default.this:r.nil;_?c():y();function c(){if(!a.$async)throw new Error("async schema referenced by sync schema");const P=v.let("valid");v.try(()=>{v.code((0,r._)`await ${(0,t.callValidateCode)(w,$,n)}`),m($),h||v.assign(P,!0)},O=>{v.if((0,r._)`!(${O} instanceof ${b.ValidationError})`,()=>v.throw(O)),o(O),h||v.assign(P,!1)}),w.ok(P)}function y(){w.result((0,t.callValidateCode)(w,$,n),()=>m($),()=>o($))}function o(P){const O=(0,r._)`${P}.errors`;v.assign(i.default.vErrors,(0,r._)`${i.default.vErrors} === null ? ${O} : ${i.default.vErrors}.concat(${O})`),v.assign(i.default.errors,(0,r._)`${i.default.vErrors}.length`)}function m(P){var O;if(!b.opts.unevaluated)return;const T=(O=E?.validate)===null||O===void 0?void 0:O.evaluated;if(b.props!==!0)if(T&&!T.dynamicProps)T.props!==void 0&&(b.props=s.mergeEvaluated.props(v,T.props,b.props));else{const z=v.var("props",(0,r._)`${P}.evaluated.props`);b.props=s.mergeEvaluated.props(v,z,b.props,r.Name)}if(b.items!==!0)if(T&&!T.dynamicItems)T.items!==void 0&&(b.items=s.mergeEvaluated.items(v,T.items,b.items));else{const z=v.var("items",(0,r._)`${P}.evaluated.items`);b.items=s.mergeEvaluated.items(v,z,b.items,r.Name)}}}return we.callRef=f,we.default=l,we}var Ur;function Ps(){if(Ur)return Xe;Ur=1,Object.defineProperty(Xe,"__esModule",{value:!0});const e=bs(),t=ws(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return Xe.default=r,Xe}var tt={},rt={},Kr;function Ss(){if(Kr)return rt;Kr=1,Object.defineProperty(rt,"__esModule",{value:!0});const e=H(),t=e.operators,r={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},i={message:({keyword:s,schemaCode:l})=>(0,e.str)`must be ${r[s].okStr} ${l}`,params:({keyword:s,schemaCode:l})=>(0,e._)`{comparison: ${r[s].okStr}, limit: ${l}}`},g={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:i,code(s){const{keyword:l,data:d,schemaCode:f}=s;s.fail$data((0,e._)`${d} ${r[l].fail} ${f} || isNaN(${d})`)}};return rt.default=g,rt}var nt={},Jr;function Es(){if(Jr)return nt;Jr=1,Object.defineProperty(nt,"__esModule",{value:!0});const e=H(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:i})=>(0,e.str)`must be multiple of ${i}`,params:({schemaCode:i})=>(0,e._)`{multipleOf: ${i}}`},code(i){const{gen:g,data:s,schemaCode:l,it:d}=i,f=d.opts.multipleOfPrecision,w=g.let("res"),$=f?(0,e._)`Math.abs(Math.round(${w}) - ${w}) > 1e-${f}`:(0,e._)`${w} !== parseInt(${w})`;i.fail$data((0,e._)`(${l} === 0 || (${w} = ${s}/${l}, ${$}))`)}};return nt.default=r,nt}var st={},it={},Hr;function ks(){if(Hr)return it;Hr=1,Object.defineProperty(it,"__esModule",{value:!0});function e(t){const r=t.length;let i=0,g=0,s;for(;g<r;)i++,s=t.charCodeAt(g++),s>=55296&&s<=56319&&g<r&&(s=t.charCodeAt(g),(s&64512)===56320&&g++);return i}return it.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',it}var Gr;function js(){if(Gr)return st;Gr=1,Object.defineProperty(st,"__esModule",{value:!0});const e=H(),t=Y(),r=ks(),g={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:s,schemaCode:l}){const d=s==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${d} than ${l} characters`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},code(s){const{keyword:l,data:d,schemaCode:f,it:w}=s,$=l==="maxLength"?e.operators.GT:e.operators.LT,E=w.opts.unicode===!1?(0,e._)`${d}.length`:(0,e._)`${(0,t.useFunc)(s.gen,r.default)}(${d})`;s.fail$data((0,e._)`${E} ${$} ${f}`)}};return st.default=g,st}var ot={},Wr;function Rs(){if(Wr)return ot;Wr=1,Object.defineProperty(ot,"__esModule",{value:!0});const e=me(),t=H(),i={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:g})=>(0,t.str)`must match pattern "${g}"`,params:({schemaCode:g})=>(0,t._)`{pattern: ${g}}`},code(g){const{data:s,$data:l,schema:d,schemaCode:f,it:w}=g,$=w.opts.unicodeRegExp?"u":"",E=l?(0,t._)`(new RegExp(${f}, ${$}))`:(0,e.usePattern)(g,d);g.fail$data((0,t._)`!${E}.test(${s})`)}};return ot.default=i,ot}var at={},Br;function Is(){if(Br)return at;Br=1,Object.defineProperty(at,"__esModule",{value:!0});const e=H(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:g}){const s=i==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${g} properties`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:g,data:s,schemaCode:l}=i,d=g==="maxProperties"?e.operators.GT:e.operators.LT;i.fail$data((0,e._)`Object.keys(${s}).length ${d} ${l}`)}};return at.default=r,at}var ct={},Yr;function Os(){if(Yr)return ct;Yr=1,Object.defineProperty(ct,"__esModule",{value:!0});const e=me(),t=H(),r=Y(),g={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:s}})=>(0,t.str)`must have required property '${s}'`,params:({params:{missingProperty:s}})=>(0,t._)`{missingProperty: ${s}}`},code(s){const{gen:l,schema:d,schemaCode:f,data:w,$data:$,it:E}=s,{opts:_}=E;if(!$&&d.length===0)return;const v=d.length>=_.loopRequired;if(E.allErrors?b():h(),_.strictRequired){const n=s.parentSchema.properties,{definedProperties:c}=s.it;for(const y of d)if(n?.[y]===void 0&&!c.has(y)){const o=E.schemaEnv.baseId+E.errSchemaPath,m=`required property "${y}" is not defined at "${o}" (strictRequired)`;(0,r.checkStrictMode)(E,m,E.opts.strictRequired)}}function b(){if(v||$)s.block$data(t.nil,a);else for(const n of d)(0,e.checkReportMissingProp)(s,n)}function h(){const n=l.let("missing");if(v||$){const c=l.let("valid",!0);s.block$data(c,()=>u(n,c)),s.ok(c)}else l.if((0,e.checkMissingProp)(s,d,n)),(0,e.reportMissingProp)(s,n),l.else()}function a(){l.forOf("prop",f,n=>{s.setParams({missingProperty:n}),l.if((0,e.noPropertyInData)(l,w,n,_.ownProperties),()=>s.error())})}function u(n,c){s.setParams({missingProperty:n}),l.forOf(n,f,()=>{l.assign(c,(0,e.propertyInData)(l,w,n,_.ownProperties)),l.if((0,t.not)(c),()=>{s.error(),l.break()})},t.nil)}}};return ct.default=g,ct}var dt={},xr;function Ns(){if(xr)return dt;xr=1,Object.defineProperty(dt,"__esModule",{value:!0});const e=H(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:g}){const s=i==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${g} items`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:g,data:s,schemaCode:l}=i,d=g==="maxItems"?e.operators.GT:e.operators.LT;i.fail$data((0,e._)`${s}.length ${d} ${l}`)}};return dt.default=r,dt}var ut={},lt={},Qr;function Qt(){if(Qr)return lt;Qr=1,Object.defineProperty(lt,"__esModule",{value:!0});const e=jr();return e.code='require("ajv/dist/runtime/equal").default',lt.default=e,lt}var Zr;function Cs(){if(Zr)return ut;Zr=1,Object.defineProperty(ut,"__esModule",{value:!0});const e=He(),t=H(),r=Y(),i=Qt(),s={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:l,j:d}})=>(0,t.str)`must NOT have duplicate items (items ## ${d} and ${l} are identical)`,params:({params:{i:l,j:d}})=>(0,t._)`{i: ${l}, j: ${d}}`},code(l){const{gen:d,data:f,$data:w,schema:$,parentSchema:E,schemaCode:_,it:v}=l;if(!w&&!$)return;const b=d.let("valid"),h=E.items?(0,e.getSchemaTypes)(E.items):[];l.block$data(b,a,(0,t._)`${_} === false`),l.ok(b);function a(){const y=d.let("i",(0,t._)`${f}.length`),o=d.let("j");l.setParams({i:y,j:o}),d.assign(b,!0),d.if((0,t._)`${y} > 1`,()=>(u()?n:c)(y,o))}function u(){return h.length>0&&!h.some(y=>y==="object"||y==="array")}function n(y,o){const m=d.name("item"),P=(0,e.checkDataTypes)(h,m,v.opts.strictNumbers,e.DataType.Wrong),O=d.const("indices",(0,t._)`{}`);d.for((0,t._)`;${y}--;`,()=>{d.let(m,(0,t._)`${f}[${y}]`),d.if(P,(0,t._)`continue`),h.length>1&&d.if((0,t._)`typeof ${m} == "string"`,(0,t._)`${m} += "_"`),d.if((0,t._)`typeof ${O}[${m}] == "number"`,()=>{d.assign(o,(0,t._)`${O}[${m}]`),l.error(),d.assign(b,!1).break()}).code((0,t._)`${O}[${m}] = ${y}`)})}function c(y,o){const m=(0,r.useFunc)(d,i.default),P=d.name("outer");d.label(P).for((0,t._)`;${y}--;`,()=>d.for((0,t._)`${o} = ${y}; ${o}--;`,()=>d.if((0,t._)`${m}(${f}[${y}], ${f}[${o}])`,()=>{l.error(),d.assign(b,!1).break(P)})))}}};return ut.default=s,ut}var ft={},Xr;function qs(){if(Xr)return ft;Xr=1,Object.defineProperty(ft,"__esModule",{value:!0});const e=H(),t=Y(),r=Qt(),g={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:s})=>(0,e._)`{allowedValue: ${s}}`},code(s){const{gen:l,data:d,$data:f,schemaCode:w,schema:$}=s;f||$&&typeof $=="object"?s.fail$data((0,e._)`!${(0,t.useFunc)(l,r.default)}(${d}, ${w})`):s.fail((0,e._)`${$} !== ${d}`)}};return ft.default=g,ft}var pt={},en;function Ds(){if(en)return pt;en=1,Object.defineProperty(pt,"__esModule",{value:!0});const e=H(),t=Y(),r=Qt(),g={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:s})=>(0,e._)`{allowedValues: ${s}}`},code(s){const{gen:l,data:d,$data:f,schema:w,schemaCode:$,it:E}=s;if(!f&&w.length===0)throw new Error("enum must have non-empty array");const _=w.length>=E.opts.loopEnum;let v;const b=()=>v??(v=(0,t.useFunc)(l,r.default));let h;if(_||f)h=l.let("valid"),s.block$data(h,a);else{if(!Array.isArray(w))throw new Error("ajv implementation error");const n=l.const("vSchema",$);h=(0,e.or)(...w.map((c,y)=>u(n,y)))}s.pass(h);function a(){l.assign(h,!1),l.forOf("v",$,n=>l.if((0,e._)`${b()}(${d}, ${n})`,()=>l.assign(h,!0).break()))}function u(n,c){const y=w[c];return typeof y=="object"&&y!==null?(0,e._)`${b()}(${d}, ${n}[${c}])`:(0,e._)`${d} === ${y}`}}};return pt.default=g,pt}var tn;function Ts(){if(tn)return tt;tn=1,Object.defineProperty(tt,"__esModule",{value:!0});const e=Ss(),t=Es(),r=js(),i=Rs(),g=Is(),s=Os(),l=Ns(),d=Cs(),f=qs(),w=Ds(),$=[e.default,t.default,r.default,i.default,g.default,s.default,l.default,d.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},f.default,w.default];return tt.default=$,tt}var mt={},Oe={},rn;function nn(){if(rn)return Oe;rn=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.validateAdditionalItems=void 0;const e=H(),t=Y(),i={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:s}})=>(0,e.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,e._)`{limit: ${s}}`},code(s){const{parentSchema:l,it:d}=s,{items:f}=l;if(!Array.isArray(f)){(0,t.checkStrictMode)(d,'"additionalItems" is ignored when "items" is not an array of schemas');return}g(s,f)}};function g(s,l){const{gen:d,schema:f,data:w,keyword:$,it:E}=s;E.items=!0;const _=d.const("len",(0,e._)`${w}.length`);if(f===!1)s.setParams({len:l.length}),s.pass((0,e._)`${_} <= ${l.length}`);else if(typeof f=="object"&&!(0,t.alwaysValidSchema)(E,f)){const b=d.var("valid",(0,e._)`${_} <= ${l.length}`);d.if((0,e.not)(b),()=>v(b)),s.ok(b)}function v(b){d.forRange("i",l.length,_,h=>{s.subschema({keyword:$,dataProp:h,dataPropType:t.Type.Num},b),E.allErrors||d.if((0,e.not)(b),()=>d.break())})}}return Oe.validateAdditionalItems=g,Oe.default=i,Oe}var ht={},Ne={},sn;function on(){if(sn)return Ne;sn=1,Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.validateTuple=void 0;const e=H(),t=Y(),r=me(),i={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(s){const{schema:l,it:d}=s;if(Array.isArray(l))return g(s,"additionalItems",l);d.items=!0,!(0,t.alwaysValidSchema)(d,l)&&s.ok((0,r.validateArray)(s))}};function g(s,l,d=s.schema){const{gen:f,parentSchema:w,data:$,keyword:E,it:_}=s;h(w),_.opts.unevaluated&&d.length&&_.items!==!0&&(_.items=t.mergeEvaluated.items(f,d.length,_.items));const v=f.name("valid"),b=f.const("len",(0,e._)`${$}.length`);d.forEach((a,u)=>{(0,t.alwaysValidSchema)(_,a)||(f.if((0,e._)`${b} > ${u}`,()=>s.subschema({keyword:E,schemaProp:u,dataProp:u},v)),s.ok(v))});function h(a){const{opts:u,errSchemaPath:n}=_,c=d.length,y=c===a.minItems&&(c===a.maxItems||a[l]===!1);if(u.strictTuples&&!y){const o=`"${E}" is ${c}-tuple, but minItems or maxItems/${l} are not specified or different at path "${n}"`;(0,t.checkStrictMode)(_,o,u.strictTuples)}}}return Ne.validateTuple=g,Ne.default=i,Ne}var an;function Ms(){if(an)return ht;an=1,Object.defineProperty(ht,"__esModule",{value:!0});const e=on(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,e.validateTuple)(r,"items")};return ht.default=t,ht}var yt={},cn;function As(){if(cn)return yt;cn=1,Object.defineProperty(yt,"__esModule",{value:!0});const e=H(),t=Y(),r=me(),i=nn(),s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:l}})=>(0,e.str)`must NOT have more than ${l} items`,params:({params:{len:l}})=>(0,e._)`{limit: ${l}}`},code(l){const{schema:d,parentSchema:f,it:w}=l,{prefixItems:$}=f;w.items=!0,!(0,t.alwaysValidSchema)(w,d)&&($?(0,i.validateAdditionalItems)(l,$):l.ok((0,r.validateArray)(l)))}};return yt.default=s,yt}var gt={},dn;function Vs(){if(dn)return gt;dn=1,Object.defineProperty(gt,"__esModule",{value:!0});const e=H(),t=Y(),i={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:g,max:s}})=>s===void 0?(0,e.str)`must contain at least ${g} valid item(s)`:(0,e.str)`must contain at least ${g} and no more than ${s} valid item(s)`,params:({params:{min:g,max:s}})=>s===void 0?(0,e._)`{minContains: ${g}}`:(0,e._)`{minContains: ${g}, maxContains: ${s}}`},code(g){const{gen:s,schema:l,parentSchema:d,data:f,it:w}=g;let $,E;const{minContains:_,maxContains:v}=d;w.opts.next?($=_===void 0?1:_,E=v):$=1;const b=s.const("len",(0,e._)`${f}.length`);if(g.setParams({min:$,max:E}),E===void 0&&$===0){(0,t.checkStrictMode)(w,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(E!==void 0&&$>E){(0,t.checkStrictMode)(w,'"minContains" > "maxContains" is always invalid'),g.fail();return}if((0,t.alwaysValidSchema)(w,l)){let c=(0,e._)`${b} >= ${$}`;E!==void 0&&(c=(0,e._)`${c} && ${b} <= ${E}`),g.pass(c);return}w.items=!0;const h=s.name("valid");E===void 0&&$===1?u(h,()=>s.if(h,()=>s.break())):$===0?(s.let(h,!0),E!==void 0&&s.if((0,e._)`${f}.length > 0`,a)):(s.let(h,!1),a()),g.result(h,()=>g.reset());function a(){const c=s.name("_valid"),y=s.let("count",0);u(c,()=>s.if(c,()=>n(y)))}function u(c,y){s.forRange("i",0,b,o=>{g.subschema({keyword:"contains",dataProp:o,dataPropType:t.Type.Num,compositeRule:!0},c),y()})}function n(c){s.code((0,e._)`${c}++`),E===void 0?s.if((0,e._)`${c} >= ${$}`,()=>s.assign(h,!0).break()):(s.if((0,e._)`${c} > ${E}`,()=>s.assign(h,!1).break()),$===1?s.assign(h,!0):s.if((0,e._)`${c} >= ${$}`,()=>s.assign(h,!0)))}}};return gt.default=i,gt}var Zt={},un;function zs(){return un||(un=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=H(),r=Y(),i=me();e.error={message:({params:{property:f,depsCount:w,deps:$}})=>{const E=w===1?"property":"properties";return(0,t.str)`must have ${E} ${$} when property ${f} is present`},params:({params:{property:f,depsCount:w,deps:$,missingProperty:E}})=>(0,t._)`{property: ${f},
|
|
6
6
|
missingProperty: ${E},
|
|
7
7
|
depsCount: ${w},
|
|
8
|
-
deps: ${$}}`};const y={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(f){const[w,$]=s(f);l(f,w),d(f,$)}};function s({schema:f}){const w={},$={};for(const E in f){if(E==="__proto__")continue;const _=Array.isArray(f[E])?w:$;_[E]=f[E]}return[w,$]}function l(f,w=f.schema){const{gen:$,data:E,it:_}=f;if(Object.keys(w).length===0)return;const v=$.let("missing");for(const b in w){const h=w[b];if(h.length===0)continue;const a=(0,i.propertyInData)($,E,b,_.opts.ownProperties);f.setParams({property:b,depsCount:h.length,deps:h.join(", ")}),_.allErrors?$.if(a,()=>{for(const u of h)(0,i.checkReportMissingProp)(f,u)}):($.if((0,t._)`${a} && (${(0,i.checkMissingProp)(f,h,v)})`),(0,i.reportMissingProp)(f,v),$.else())}}e.validatePropertyDeps=l;function d(f,w=f.schema){const{gen:$,data:E,keyword:_,it:v}=f,b=$.name("valid");for(const h in w)(0,n.alwaysValidSchema)(v,w[h])||($.if((0,i.propertyInData)($,E,h,v.opts.ownProperties),()=>{const a=f.subschema({keyword:_,schemaProp:h},b);f.mergeValidEvaluated(a,b)},()=>$.var(b,!0)),f.ok(b))}e.validateSchemaDeps=d,e.default=y})(Zt)),Zt}var vt={},ln;function Fs(){if(ln)return vt;ln=1,Object.defineProperty(vt,"__esModule",{value:!0});const e=H(),t=Y(),i={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:y})=>(0,e._)`{propertyName: ${y.propertyName}}`},code(y){const{gen:s,schema:l,data:d,it:f}=y;if((0,t.alwaysValidSchema)(f,l))return;const w=s.name("valid");s.forIn("key",d,$=>{y.setParams({propertyName:$}),y.subschema({keyword:"propertyNames",data:$,dataTypes:["string"],propertyName:$,compositeRule:!0},w),s.if((0,e.not)(w),()=>{y.error(!0),f.allErrors||s.break()})}),y.ok(w)}};return vt.default=i,vt}var _t={},fn;function pn(){if(fn)return _t;fn=1,Object.defineProperty(_t,"__esModule",{value:!0});const e=me(),t=H(),n=be(),i=Y(),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:l})=>(0,t._)`{additionalProperty: ${l.additionalProperty}}`},code(l){const{gen:d,schema:f,parentSchema:w,data:$,errsCount:E,it:_}=l;if(!E)throw new Error("ajv implementation error");const{allErrors:v,opts:b}=_;if(_.props=!0,b.removeAdditional!=="all"&&(0,i.alwaysValidSchema)(_,f))return;const h=(0,e.allSchemaProperties)(w.properties),a=(0,e.allSchemaProperties)(w.patternProperties);u(),l.ok((0,t._)`${E} === ${n.default.errors}`);function u(){d.forIn("key",$,m=>{!h.length&&!a.length?g(m):d.if(r(m),()=>g(m))})}function r(m){let P;if(h.length>8){const O=(0,i.schemaRefOrVal)(_,w.properties,"properties");P=(0,e.isOwnProperty)(d,O,m)}else h.length?P=(0,t.or)(...h.map(O=>(0,t._)`${m} === ${O}`)):P=t.nil;return a.length&&(P=(0,t.or)(P,...a.map(O=>(0,t._)`${(0,e.usePattern)(l,O)}.test(${m})`))),(0,t.not)(P)}function c(m){d.code((0,t._)`delete ${$}[${m}]`)}function g(m){if(b.removeAdditional==="all"||b.removeAdditional&&f===!1){c(m);return}if(f===!1){l.setParams({additionalProperty:m}),l.error(),v||d.break();return}if(typeof f=="object"&&!(0,i.alwaysValidSchema)(_,f)){const P=d.name("valid");b.removeAdditional==="failing"?(o(m,P,!1),d.if((0,t.not)(P),()=>{l.reset(),c(m)})):(o(m,P),v||d.if((0,t.not)(P),()=>d.break()))}}function o(m,P,O){const T={keyword:"additionalProperties",dataProp:m,dataPropType:i.Type.Str};O===!1&&Object.assign(T,{compositeRule:!0,createErrors:!1,allErrors:!1}),l.subschema(T,P)}}};return _t.default=s,_t}var $t={},mn;function Ls(){if(mn)return $t;mn=1,Object.defineProperty($t,"__esModule",{value:!0});const e=We(),t=me(),n=Y(),i=pn(),y={keyword:"properties",type:"object",schemaType:"object",code(s){const{gen:l,schema:d,parentSchema:f,data:w,it:$}=s;$.opts.removeAdditional==="all"&&f.additionalProperties===void 0&&i.default.code(new e.KeywordCxt($,i.default,"additionalProperties"));const E=(0,t.allSchemaProperties)(d);for(const a of E)$.definedProperties.add(a);$.opts.unevaluated&&E.length&&$.props!==!0&&($.props=n.mergeEvaluated.props(l,(0,n.toHash)(E),$.props));const _=E.filter(a=>!(0,n.alwaysValidSchema)($,d[a]));if(_.length===0)return;const v=l.name("valid");for(const a of _)b(a)?h(a):(l.if((0,t.propertyInData)(l,w,a,$.opts.ownProperties)),h(a),$.allErrors||l.else().var(v,!0),l.endIf()),s.it.definedProperties.add(a),s.ok(v);function b(a){return $.opts.useDefaults&&!$.compositeRule&&d[a].default!==void 0}function h(a){s.subschema({keyword:"properties",schemaProp:a,dataProp:a},v)}}};return $t.default=y,$t}var bt={},hn;function Us(){if(hn)return bt;hn=1,Object.defineProperty(bt,"__esModule",{value:!0});const e=me(),t=H(),n=Y(),i=Y(),y={keyword:"patternProperties",type:"object",schemaType:"object",code(s){const{gen:l,schema:d,data:f,parentSchema:w,it:$}=s,{opts:E}=$,_=(0,e.allSchemaProperties)(d),v=_.filter(g=>(0,n.alwaysValidSchema)($,d[g]));if(_.length===0||v.length===_.length&&(!$.opts.unevaluated||$.props===!0))return;const b=E.strictSchema&&!E.allowMatchingProperties&&w.properties,h=l.name("valid");$.props!==!0&&!($.props instanceof t.Name)&&($.props=(0,i.evaluatedPropsToName)(l,$.props));const{props:a}=$;u();function u(){for(const g of _)b&&r(g),$.allErrors?c(g):(l.var(h,!0),c(g),l.if(h))}function r(g){for(const o in b)new RegExp(g).test(o)&&(0,n.checkStrictMode)($,`property ${o} matches pattern ${g} (use allowMatchingProperties)`)}function c(g){l.forIn("key",f,o=>{l.if((0,t._)`${(0,e.usePattern)(s,g)}.test(${o})`,()=>{const m=v.includes(g);m||s.subschema({keyword:"patternProperties",schemaProp:g,dataProp:o,dataPropType:i.Type.Str},h),$.opts.unevaluated&&a!==!0?l.assign((0,t._)`${a}[${o}]`,!0):!m&&!$.allErrors&&l.if((0,t.not)(h),()=>l.break())})})}}};return bt.default=y,bt}var wt={},yn;function Ks(){if(yn)return wt;yn=1,Object.defineProperty(wt,"__esModule",{value:!0});const e=Y(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){const{gen:i,schema:y,it:s}=n;if((0,e.alwaysValidSchema)(s,y)){n.fail();return}const l=i.name("valid");n.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},l),n.failResult(l,()=>n.reset(),()=>n.error())},error:{message:"must NOT be valid"}};return wt.default=t,wt}var Pt={},gn;function Js(){if(gn)return Pt;gn=1,Object.defineProperty(Pt,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:me().validateUnion,error:{message:"must match a schema in anyOf"}};return Pt.default=t,Pt}var St={},vn;function Hs(){if(vn)return St;vn=1,Object.defineProperty(St,"__esModule",{value:!0});const e=H(),t=Y(),i={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:y})=>(0,e._)`{passingSchemas: ${y.passing}}`},code(y){const{gen:s,schema:l,parentSchema:d,it:f}=y;if(!Array.isArray(l))throw new Error("ajv implementation error");if(f.opts.discriminator&&d.discriminator)return;const w=l,$=s.let("valid",!1),E=s.let("passing",null),_=s.name("_valid");y.setParams({passing:E}),s.block(v),y.result($,()=>y.reset(),()=>y.error(!0));function v(){w.forEach((b,h)=>{let a;(0,t.alwaysValidSchema)(f,b)?s.var(_,!0):a=y.subschema({keyword:"oneOf",schemaProp:h,compositeRule:!0},_),h>0&&s.if((0,e._)`${_} && ${$}`).assign($,!1).assign(E,(0,e._)`[${E}, ${h}]`).else(),s.if(_,()=>{s.assign($,!0),s.assign(E,h),a&&y.mergeEvaluated(a,e.Name)})})}}};return St.default=i,St}var Et={},_n;function Gs(){if(_n)return Et;_n=1,Object.defineProperty(Et,"__esModule",{value:!0});const e=Y(),t={keyword:"allOf",schemaType:"array",code(n){const{gen:i,schema:y,it:s}=n;if(!Array.isArray(y))throw new Error("ajv implementation error");const l=i.name("valid");y.forEach((d,f)=>{if((0,e.alwaysValidSchema)(s,d))return;const w=n.subschema({keyword:"allOf",schemaProp:f},l);n.ok(l),n.mergeEvaluated(w)})}};return Et.default=t,Et}var kt={},$n;function Ws(){if($n)return kt;$n=1,Object.defineProperty(kt,"__esModule",{value:!0});const e=H(),t=Y(),i={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:s})=>(0,e.str)`must match "${s.ifClause}" schema`,params:({params:s})=>(0,e._)`{failingKeyword: ${s.ifClause}}`},code(s){const{gen:l,parentSchema:d,it:f}=s;d.then===void 0&&d.else===void 0&&(0,t.checkStrictMode)(f,'"if" without "then" and "else" is ignored');const w=y(f,"then"),$=y(f,"else");if(!w&&!$)return;const E=l.let("valid",!0),_=l.name("_valid");if(v(),s.reset(),w&&$){const h=l.let("ifClause");s.setParams({ifClause:h}),l.if(_,b("then",h),b("else",h))}else w?l.if(_,b("then")):l.if((0,e.not)(_),b("else"));s.pass(E,()=>s.error(!0));function v(){const h=s.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},_);s.mergeEvaluated(h)}function b(h,a){return()=>{const u=s.subschema({keyword:h},_);l.assign(E,_),s.mergeValidEvaluated(u,E),a?l.assign(a,(0,e._)`${h}`):s.setParams({ifClause:h})}}}};function y(s,l){const d=s.schema[l];return d!==void 0&&!(0,t.alwaysValidSchema)(s,d)}return kt.default=i,kt}var jt={},bn;function Bs(){if(bn)return jt;bn=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=Y(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:i,it:y}){i.if===void 0&&(0,e.checkStrictMode)(y,`"${n}" without "if" is ignored`)}};return jt.default=t,jt}var wn;function Ys(){if(wn)return mt;wn=1,Object.defineProperty(mt,"__esModule",{value:!0});const e=nn(),t=Ms(),n=on(),i=As(),y=Vs(),s=zs(),l=Fs(),d=pn(),f=Ls(),w=Us(),$=Ks(),E=Js(),_=Hs(),v=Gs(),b=Ws(),h=Bs();function a(u=!1){const r=[$.default,E.default,_.default,v.default,b.default,h.default,l.default,d.default,s.default,f.default,w.default];return u?r.push(t.default,i.default):r.push(e.default,n.default),r.push(y.default),r}return mt.default=a,mt}var It={},Rt={},Pn;function xs(){if(Pn)return Rt;Pn=1,Object.defineProperty(Rt,"__esModule",{value:!0});const e=H(),n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,e.str)`must match format "${i}"`,params:({schemaCode:i})=>(0,e._)`{format: ${i}}`},code(i,y){const{gen:s,data:l,$data:d,schema:f,schemaCode:w,it:$}=i,{opts:E,errSchemaPath:_,schemaEnv:v,self:b}=$;if(!E.validateFormats)return;d?h():a();function h(){const u=s.scopeValue("formats",{ref:b.formats,code:E.code.formats}),r=s.const("fDef",(0,e._)`${u}[${w}]`),c=s.let("fType"),g=s.let("format");s.if((0,e._)`typeof ${r} == "object" && !(${r} instanceof RegExp)`,()=>s.assign(c,(0,e._)`${r}.type || "string"`).assign(g,(0,e._)`${r}.validate`),()=>s.assign(c,(0,e._)`"string"`).assign(g,r)),i.fail$data((0,e.or)(o(),m()));function o(){return E.strictSchema===!1?e.nil:(0,e._)`${w} && !${g}`}function m(){const P=v.$async?(0,e._)`(${r}.async ? await ${g}(${l}) : ${g}(${l}))`:(0,e._)`${g}(${l})`,O=(0,e._)`(typeof ${g} == "function" ? ${P} : ${g}.test(${l}))`;return(0,e._)`${g} && ${g} !== true && ${c} === ${y} && !${O}`}}function a(){const u=b.formats[f];if(!u){o();return}if(u===!0)return;const[r,c,g]=m(u);r===y&&i.pass(P());function o(){if(E.strictSchema===!1){b.logger.warn(O());return}throw new Error(O());function O(){return`unknown format "${f}" ignored in schema at path "${_}"`}}function m(O){const T=O instanceof RegExp?(0,e.regexpCode)(O):E.code.formats?(0,e._)`${E.code.formats}${(0,e.getProperty)(f)}`:void 0,z=s.scopeValue("formats",{key:f,ref:O,code:T});return typeof O=="object"&&!(O instanceof RegExp)?[O.type||"string",O.validate,(0,e._)`${z}.validate`]:["string",O,z]}function P(){if(typeof u=="object"&&!(u instanceof RegExp)&&u.async){if(!v.$async)throw new Error("async format in sync schema");return(0,e._)`await ${g}(${l})`}return typeof c=="function"?(0,e._)`${g}(${l})`:(0,e._)`${g}.test(${l})`}}}};return Rt.default=n,Rt}var Sn;function Qs(){if(Sn)return It;Sn=1,Object.defineProperty(It,"__esModule",{value:!0});const t=[xs().default];return It.default=t,It}var je={},En;function Zs(){return En||(En=1,Object.defineProperty(je,"__esModule",{value:!0}),je.contentVocabulary=je.metadataVocabulary=void 0,je.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],je.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),je}var kn;function Xs(){if(kn)return Ze;kn=1,Object.defineProperty(Ze,"__esModule",{value:!0});const e=Ps(),t=Ts(),n=Ys(),i=Qs(),y=Zs(),s=[e.default,t.default,(0,n.default)(),i.default,y.metadataVocabulary,y.contentVocabulary];return Ze.default=s,Ze}var Ot={},Me={},jn;function ei(){if(jn)return Me;jn=1,Object.defineProperty(Me,"__esModule",{value:!0}),Me.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(Me.DiscrError=e={})),Me}var In;function ti(){if(In)return Ot;In=1,Object.defineProperty(Ot,"__esModule",{value:!0});const e=H(),t=ei(),n=Bt(),i=xe(),y=Y(),l={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:d,tagName:f}})=>d===t.DiscrError.Tag?`tag "${f}" must be string`:`value of tag "${f}" must be in oneOf`,params:({params:{discrError:d,tag:f,tagName:w}})=>(0,e._)`{error: ${d}, tag: ${w}, tagValue: ${f}}`},code(d){const{gen:f,data:w,schema:$,parentSchema:E,it:_}=d,{oneOf:v}=E;if(!_.opts.discriminator)throw new Error("discriminator: requires discriminator option");const b=$.propertyName;if(typeof b!="string")throw new Error("discriminator: requires propertyName");if($.mapping)throw new Error("discriminator: mapping is not supported");if(!v)throw new Error("discriminator: requires oneOf keyword");const h=f.let("valid",!1),a=f.const("tag",(0,e._)`${w}${(0,e.getProperty)(b)}`);f.if((0,e._)`typeof ${a} == "string"`,()=>u(),()=>d.error(!1,{discrError:t.DiscrError.Tag,tag:a,tagName:b})),d.ok(h);function u(){const g=c();f.if(!1);for(const o in g)f.elseIf((0,e._)`${a} === ${o}`),f.assign(h,r(g[o]));f.else(),d.error(!1,{discrError:t.DiscrError.Mapping,tag:a,tagName:b}),f.endIf()}function r(g){const o=f.name("valid"),m=d.subschema({keyword:"oneOf",schemaProp:g},o);return d.mergeEvaluated(m,e.Name),o}function c(){var g;const o={},m=O(E);let P=!0;for(let C=0;C<v.length;C++){let V=v[C];if(V?.$ref&&!(0,y.schemaHasRulesButRef)(V,_.self.RULES)){const L=V.$ref;if(V=n.resolveRef.call(_.self,_.schemaEnv.root,_.baseId,L),V instanceof n.SchemaEnv&&(V=V.schema),V===void 0)throw new i.default(_.opts.uriResolver,_.baseId,L)}const F=(g=V?.properties)===null||g===void 0?void 0:g[b];if(typeof F!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${b}"`);P=P&&(m||O(V)),T(F,C)}if(!P)throw new Error(`discriminator: "${b}" must be required`);return o;function O({required:C}){return Array.isArray(C)&&C.includes(b)}function T(C,V){if(C.const)z(C.const,V);else if(C.enum)for(const F of C.enum)z(F,V);else throw new Error(`discriminator: "properties/${b}" must have "const" or "enum"`)}function z(C,V){if(typeof C!="string"||C in o)throw new Error(`discriminator: "${b}" values must be unique strings`);o[C]=V}}}};return Ot.default=l,Ot}const ri={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};var Rn;function On(){return Rn||(Rn=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const n=$s(),i=Xs(),y=ti(),s=ri,l=["/properties"],d="http://json-schema.org/draft-07/schema";class f extends n.default{_addVocabularies(){super._addVocabularies(),i.default.forEach(b=>this.addVocabulary(b)),this.opts.discriminator&&this.addKeyword(y.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const b=this.opts.$data?this.$dataMetaSchema(s,l):s;this.addMetaSchema(b,d,!1),this.refs["http://json-schema.org/schema"]=d}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(d)?d:void 0)}}t.Ajv=f,e.exports=t=f,e.exports.Ajv=f,Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var w=We();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return w.KeywordCxt}});var $=H();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return $._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return $.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return $.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return $.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return $.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return $.CodeGen}});var E=Wt();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return E.default}});var _=xe();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return _.default}})})(Le,Le.exports)),Le.exports}var ni=On();const si=Re(ni);var Nt={exports:{}},Xt={},Nn;function ii(){return Nn||(Nn=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(C,V){return{validate:C,compare:V}}e.fullFormats={date:t(s,l),time:t(f(!0),w),"date-time":t(_(!0),v),"iso-time":t(f(),$),"iso-date-time":t(_(),b),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:u,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:z,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:c,int32:{type:"number",validate:m},int64:{type:"number",validate:P},float:{type:"number",validate:O},double:{type:"number",validate:O},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,l),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,w),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,v),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,$),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,b),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function n(C){return C%4===0&&(C%100!==0||C%400===0)}const i=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,y=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(C){const V=i.exec(C);if(!V)return!1;const F=+V[1],L=+V[2],Q=+V[3];return L>=1&&L<=12&&Q>=1&&Q<=(L===2&&n(F)?29:y[L])}function l(C,V){if(C&&V)return C>V?1:C<V?-1:0}const d=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function f(C){return function(F){const L=d.exec(F);if(!L)return!1;const Q=+L[1],oe=+L[2],ae=+L[3],X=L[4],ye=L[5]==="-"?-1:1,M=+(L[6]||0),j=+(L[7]||0);if(M>23||j>59||C&&!X)return!1;if(Q<=23&&oe<=59&&ae<60)return!0;const D=oe-j*ye,R=Q-M*ye-(D<0?1:0);return(R===23||R===-1)&&(D===59||D===-1)&&ae<61}}function w(C,V){if(!(C&&V))return;const F=new Date("2020-01-01T"+C).valueOf(),L=new Date("2020-01-01T"+V).valueOf();if(F&&L)return F-L}function $(C,V){if(!(C&&V))return;const F=d.exec(C),L=d.exec(V);if(F&&L)return C=F[1]+F[2]+F[3],V=L[1]+L[2]+L[3],C>V?1:C<V?-1:0}const E=/t|\s/i;function _(C){const V=f(C);return function(L){const Q=L.split(E);return Q.length===2&&s(Q[0])&&V(Q[1])}}function v(C,V){if(!(C&&V))return;const F=new Date(C).valueOf(),L=new Date(V).valueOf();if(F&&L)return F-L}function b(C,V){if(!(C&&V))return;const[F,L]=C.split(E),[Q,oe]=V.split(E),ae=l(F,Q);if(ae!==void 0)return ae||w(L,oe)}const h=/\/|:/,a=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function u(C){return h.test(C)&&a.test(C)}const r=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function c(C){return r.lastIndex=0,r.test(C)}const g=-2147483648,o=2**31-1;function m(C){return Number.isInteger(C)&&C<=o&&C>=g}function P(C){return Number.isInteger(C)}function O(){return!0}const T=/[^\\]\\Z/;function z(C){if(T.test(C))return!1;try{return new RegExp(C),!0}catch{return!1}}})(Xt)),Xt}var er={},Cn;function oi(){return Cn||(Cn=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=On(),n=H(),i=n.operators,y={formatMaximum:{okStr:"<=",ok:i.LTE,fail:i.GT},formatMinimum:{okStr:">=",ok:i.GTE,fail:i.LT},formatExclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},formatExclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},s={message:({keyword:d,schemaCode:f})=>(0,n.str)`should be ${y[d].okStr} ${f}`,params:({keyword:d,schemaCode:f})=>(0,n._)`{comparison: ${y[d].okStr}, limit: ${f}}`};e.formatLimitDefinition={keyword:Object.keys(y),type:"string",schemaType:"string",$data:!0,error:s,code(d){const{gen:f,data:w,schemaCode:$,keyword:E,it:_}=d,{opts:v,self:b}=_;if(!v.validateFormats)return;const h=new t.KeywordCxt(_,b.RULES.all.format.definition,"format");h.$data?a():u();function a(){const c=f.scopeValue("formats",{ref:b.formats,code:v.code.formats}),g=f.const("fmt",(0,n._)`${c}[${h.schemaCode}]`);d.fail$data((0,n.or)((0,n._)`typeof ${g} != "object"`,(0,n._)`${g} instanceof RegExp`,(0,n._)`typeof ${g}.compare != "function"`,r(g)))}function u(){const c=h.schema,g=b.formats[c];if(!g||g===!0)return;if(typeof g!="object"||g instanceof RegExp||typeof g.compare!="function")throw new Error(`"${E}": format "${c}" does not define "compare" function`);const o=f.scopeValue("formats",{key:c,ref:g,code:v.code.formats?(0,n._)`${v.code.formats}${(0,n.getProperty)(c)}`:void 0});d.fail$data(r(o))}function r(c){return(0,n._)`${c}.compare(${w}, ${$}) ${y[E].fail} 0`}},dependencies:["format"]};const l=d=>(d.addKeyword(e.formatLimitDefinition),d);e.default=l})(er)),er}var qn;function ai(){return qn||(qn=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=ii(),i=oi(),y=H(),s=new y.Name("fullFormats"),l=new y.Name("fastFormats"),d=(w,$={keywords:!0})=>{if(Array.isArray($))return f(w,$,n.fullFormats,s),w;const[E,_]=$.mode==="fast"?[n.fastFormats,l]:[n.fullFormats,s],v=$.formats||n.formatNames;return f(w,v,E,_),$.keywords&&(0,i.default)(w),w};d.get=(w,$="full")=>{const _=($==="fast"?n.fastFormats:n.fullFormats)[w];if(!_)throw new Error(`Unknown format "${w}"`);return _};function f(w,$,E,_){var v,b;(v=(b=w.opts.code).formats)!==null&&v!==void 0||(b.formats=(0,y._)`require("ajv-formats/dist/formats").${_}`);for(const h of $)w.addFormat(h,E[h])}e.exports=t=d,Object.defineProperty(t,"__esModule",{value:!0}),t.default=d})(Nt,Nt.exports)),Nt.exports}var ci=ai();const di=Re(ci),Ae={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CICConfig",definitions:JSON.parse('{"CICConfig":{"type":"object","properties":{"version":{"type":"string"},"meta":{"$ref":"#/definitions/Meta"},"pages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"path":{"type":"string"},"layout":{"$ref":"#/definitions/Layout"},"components":{"type":"array","items":{"$ref":"#/definitions/ComponentInstance"}},"dataSources":{"type":"array","items":{"$ref":"#/definitions/DataSourceItem"}},"extensions":{"type":"object"}},"required":["id","name","path"],"additionalProperties":false,"description":"CIC 页面定义 说明:定义了 CIC 中页面的结构,包含页面 ID、名称、路径、布局、组件等。"}},"registry":{"$ref":"#/definitions/Registry"},"variables":{"$ref":"#/definitions/Variables"},"deps":{"type":"array","items":{"$ref":"#/definitions/Dependency"}},"extensions":{"type":"object"}},"required":["version","meta","pages"],"additionalProperties":false,"description":"CIC 配置定义 说明:定义了 CIC 项目的全局配置,包含版本、元数据、页面、组件、变量、依赖等。"},"Meta":{"type":"object","properties":{"projectId":{"type":"string","description":"项目唯一标识符"},"projectName":{"type":"string","description":"项目名称"},"description":{"type":"string","description":"项目描述"},"layout":{"$ref":"#/definitions/Layout","description":"布局配置"},"language":{"type":"string","description":"语言代码 (e.g. zh-CN, en-US)"},"createTime":{"type":"string","description":"创建时间 (ISO 8601)","format":"date-time"},"updateTime":{"type":"string","description":"更新时间 (ISO 8601)","format":"date-time"},"author":{"type":"string","description":"作者"},"extensions":{"type":"object","description":"扩展字段"}},"additionalProperties":false,"description":"项目元信息 包含项目的基本信息、布局配置、语言、创建时间、更新时间、作者和扩展信息。"},"Layout":{"type":"object","properties":{"type":{"type":"string","enum":["free","grid"],"description":"布局类型: free(自由布局) 或 grid(网格布局)"},"config":{"type":"object","properties":{"width":{"type":"number","description":"设计稿宽度","minimum":1,"default":1920},"height":{"type":"number","description":"设计稿高度","minimum":1,"default":1080},"scaleMode":{"type":"string","enum":["aspectFit","fill"],"description":"缩放模式","default":"aspectFit"}},"required":["width","height","scaleMode"],"additionalProperties":false}},"required":["type","config"],"additionalProperties":false,"description":"布局配置"},"ComponentInstance":{"anyOf":[{"$ref":"#/definitions/ViewComponentInstance"},{"$ref":"#/definitions/ContainerComponentInstance"},{"$ref":"#/definitions/LogicComponentInstanceRef"}],"description":"组件实例(view/container/logic 类型)"},"ViewComponentInstance":{"type":"object","properties":{"id":{"type":"string"},"props":{"type":"object"},"style":{"type":"object","additionalProperties":{"$ref":"#/definitions/StyleValue"}},"events":{"$ref":"#/definitions/CICEventMap"},"data":{"$ref":"#/definitions/Data"},"deps":{"type":"array","items":{"type":"string"}},"extensions":{"type":"object"},"role":{"type":"string","const":"view"},"component":{"$ref":"#/definitions/ComponentRef"}},"required":["component","id","role"],"additionalProperties":false},"StyleValue":{"anyOf":[{"type":"string"},{"type":"number"},{"$ref":"#/definitions/Expr"}],"description":"样式值可以是静态或表达式"},"Expr":{"type":"string","description":"通用表达式(用于条件、模板等)"},"CICEventMap":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/definitions/CICEventWithMeta"}},"description":"某组件的所有事件 说明:定义了 CIC 项目中组件的所有事件,包含事件类型、动作、参数、调度顺序、延迟时间和条件。 (key: 事件名, value: 处理逻辑数组)"},"CICEventWithMeta":{"anyOf":[{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"vars"},"action":{"$ref":"#/definitions/VarsAction"},"params":{"$ref":"#/definitions/VarsParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"navigate"},"action":{"type":"string","const":"internal"},"params":{"$ref":"#/definitions/NavigateInternalParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"navigate"},"action":{"type":"string","const":"external"},"params":{"$ref":"#/definitions/NavigateExternalParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"comp"},"action":{"$ref":"#/definitions/CompAction"},"params":{"$ref":"#/definitions/CompParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"toggle"},"action":{"type":"string","const":"visibility"},"params":{"$ref":"#/definitions/ToggleParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"camera"},"action":{"type":"string","const":"focus"},"params":{"$ref":"#/definitions/CameraFocusParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"material"},"action":{"type":"string","const":"change"},"params":{"$ref":"#/definitions/MaterialChangeParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"custom"},"action":{"type":"string","const":"local"},"params":{"$ref":"#/definitions/CustomLocalParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"custom"},"action":{"type":"string","const":"remote"},"params":{"$ref":"#/definitions/CustomRemoteParams"}},"required":["action","order","params","type"]}],"description":"带调度信息"},"EventCondition":{"anyOf":[{"$ref":"#/definitions/KeyCondition"},{"type":"array","items":{"$ref":"#/definitions/KeyCondition"}},{"$ref":"#/definitions/ExpressionCondition"}],"description":"多条件(AND) + 表达式"},"KeyCondition":{"type":"object","properties":{"key":{"type":"string"},"op":{"$ref":"#/definitions/ConditionOperator"},"value":{}},"required":["key"],"additionalProperties":false},"ConditionOperator":{"type":"string","enum":["eq","neq","gt","gte","lt","lte","in","not-in","exists","not-exists"]},"ExpressionCondition":{"type":"object","properties":{"expression":{"type":"string"}},"required":["expression"],"additionalProperties":false,"description":"表达式条件:支持如 \\"ctx.id === 5 && ctx.level > 1\\""},"VarsAction":{"type":"string","enum":["add","update","delete"],"description":"变量事件动作"},"VarsParams":{"type":"object","properties":{"key":{"type":"string"},"value":{},"exclude":{"type":"array","items":{"type":"string"}}},"required":["key","value"],"additionalProperties":false},"NavigateInternalParams":{"type":"object","properties":{"name":{"type":"string"},"params":{"type":"object"}},"required":["name"],"additionalProperties":false},"NavigateExternalParams":{"type":"object","properties":{"url":{"type":"string"},"openNewTab":{"type":"boolean"}},"required":["url"],"additionalProperties":false},"CompAction":{"type":"string","enum":["add","update","delete"],"description":"组件事件动作"},"CompParams":{"type":"object","properties":{"comps":{"type":"array","items":{"type":"string"}},"props":{"type":"object"}},"required":["comps"],"additionalProperties":false},"ToggleParams":{"type":"object","properties":{"show":{"type":"array","items":{"type":"string"}},"hide":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"CameraFocusParams":{"type":"object","properties":{"target":{"type":["string","number"]},"duration":{"type":"number"}},"required":["target"],"additionalProperties":false},"MaterialChangeParams":{"type":"object","properties":{"target":{"type":"string"},"materials":{"type":"string"}},"required":["target","materials"],"additionalProperties":false},"CustomLocalParams":{"type":"object","properties":{"code":{"type":"string"},"depends":{"type":"array","items":{"type":"string"}}},"required":["code"],"additionalProperties":false},"CustomRemoteParams":{"type":"object","properties":{"url":{"type":"string"},"depends":{"type":"array","items":{"type":"string"}}},"required":["url"],"additionalProperties":false},"Data":{"type":"object","properties":{"id":{"type":"string","description":"数据ID"},"mapping":{"$ref":"#/definitions/IMapping","description":"字段映射配置"},"converse":{"$ref":"#/definitions/IConverse","description":"转换规则配置"}},"required":["id"],"additionalProperties":false,"description":"数据配置"},"IMapping":{"type":"object","properties":{"use":{"type":"boolean"},"mapFields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"源字段名"},"mapField":{"type":"string","description":"目标字段名"},"value":{"description":"映射值或公式"},"type":{"type":"string","enum":["copy","const","formula"],"description":"映射类型:默认(普通映射)、copy(复制) const(常量)、formula(公式)"},"description":{"type":"string","description":"描述"}},"required":["field","mapField"],"additionalProperties":false}}},"required":["use","mapFields"],"additionalProperties":false,"description":"字段映射配置"},"IConverse":{"type":"object","properties":{"use":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"转换代码"},"depeedVars":{"type":"array","items":{"type":"string"},"description":"依赖变量列表(用于响应式重执行)"}},"required":["code"],"additionalProperties":false}}},"required":["use","data"],"additionalProperties":false,"description":"转换规则配置"},"ComponentRef":{"anyOf":[{"type":"string"},{"type":"object","properties":{"type":{"type":"string","const":"id"},"value":{"type":"string"}},"required":["type","value"],"additionalProperties":false}],"description":"component 引用:字符串或 object 描述"},"ContainerComponentInstance":{"type":"object","properties":{"id":{"type":"string"},"props":{"type":"object"},"style":{"type":"object","additionalProperties":{"$ref":"#/definitions/StyleValue"}},"events":{"$ref":"#/definitions/CICEventMap"},"data":{"$ref":"#/definitions/Data"},"deps":{"type":"array","items":{"type":"string"}},"extensions":{"type":"object"},"role":{"type":"string","const":"container"},"children":{"type":"array","items":{"$ref":"#/definitions/ComponentInstance"}}},"required":["children","id","role"],"additionalProperties":false},"LogicComponentInstanceRef":{"type":"object","properties":{"id":{"type":"string"},"props":{"type":"object"},"style":{"type":"object","additionalProperties":{"$ref":"#/definitions/StyleValue"}},"events":{"$ref":"#/definitions/CICEventMap"},"data":{"$ref":"#/definitions/Data"},"deps":{"type":"array","items":{"type":"string"}},"extensions":{"type":"object"},"role":{"type":"string","const":"logic"},"component":{"$ref":"#/definitions/LogicRef"}},"required":["component","id","role"],"additionalProperties":false},"LogicRef":{"anyOf":[{"type":"string"},{"type":"object","properties":{"type":{"type":"string","enum":["url","code"]},"value":{"type":"string"}},"required":["type","value"],"additionalProperties":false}]},"DataSourceItem":{"anyOf":[{"$ref":"#/definitions/DataSourceRest"},{"$ref":"#/definitions/DataSourceWebSocket"},{"$ref":"#/definitions/DataSourceStatic"},{"$ref":"#/definitions/DataSourceFunction"}],"description":"数据源项(rest/websocket/static/function 类型)"},"DataSourceRest":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"rest"},"order":{"type":"number"},"pollInterval":{"$ref":"#/definitions/Milliseconds"},"transform":{"anyOf":[{"type":"string"},{"$comment":"(res: any) => any","type":"object","properties":{"namedArgs":{"type":"object","properties":{"res":{}},"required":["res"],"additionalProperties":false}}}]},"url":{"type":"string"},"method":{"type":"string","enum":["GET","POST","PUT","DELETE"]},"headers":{"type":"object","additionalProperties":{"type":"string"}},"params":{"type":"object"},"body":{},"timeout":{"$ref":"#/definitions/Milliseconds"}},"required":["id","method","type","url"],"additionalProperties":false},"Milliseconds":{"type":"number"},"DataSourceWebSocket":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"websocket"},"order":{"type":"number"},"pollInterval":{"$ref":"#/definitions/Milliseconds"},"transform":{"anyOf":[{"type":"string"},{"$comment":"(res: any) => any","type":"object","properties":{"namedArgs":{"type":"object","properties":{"res":{}},"required":["res"],"additionalProperties":false}}}]},"url":{"type":"string"},"protocols":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"subscribeMessage":{},"heartbeat":{"type":"object","properties":{"interval":{"$ref":"#/definitions/Milliseconds"},"message":{}},"required":["interval","message"],"additionalProperties":false}},"required":["id","type","url"],"additionalProperties":false},"DataSourceStatic":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"static"},"order":{"type":"number"},"pollInterval":{"$ref":"#/definitions/Milliseconds"},"transform":{"anyOf":[{"type":"string"},{"$comment":"(res: any) => any","type":"object","properties":{"namedArgs":{"type":"object","properties":{"res":{}},"required":["res"],"additionalProperties":false}}}]},"value":{}},"required":["id","type","value"],"additionalProperties":false},"DataSourceFunction":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"function"},"order":{"type":"number"},"pollInterval":{"$ref":"#/definitions/Milliseconds"},"transform":{"anyOf":[{"type":"string"},{"$comment":"(res: any) => any","type":"object","properties":{"namedArgs":{"type":"object","properties":{"res":{}},"required":["res"],"additionalProperties":false}}}]},"code":{"type":"string"},"timeout":{"$ref":"#/definitions/Milliseconds"}},"required":["code","id","type"],"additionalProperties":false},"Registry":{"type":"object","properties":{"components":{"type":"array","items":{"$ref":"#/definitions/RegistryComponents"}},"plugins":{"type":"object","description":"插件后期可扩展"}},"additionalProperties":false,"description":"注册表"},"RegistryComponents":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"version":{"type":"string"},"author":{"type":"string"},"defaultProps":{"type":"object"},"data":{},"deps":{"type":"array","items":{"type":"string"}}},"required":["id"],"additionalProperties":false,"description":"注册中心组件项 说明:定义了 CIC 项目中组件注册中心的组件项,包含组件 ID、类型和配置。"},"Variables":{"type":"object","properties":{"global":{"$ref":"#/definitions/VariablesMap","description":"全局变量,对所有页面和组件均生效。"},"page":{"type":"object","additionalProperties":{"$ref":"#/definitions/VariablesMap"},"description":"页面级变量,键为页面 ID,值为该页面的变量映射。"},"component":{"type":"object","additionalProperties":{"$ref":"#/definitions/VariablesMap"},"description":"组件级变量,键为组件 ID,值为该组件的变量映射。"}},"additionalProperties":false,"description":"变量集合,按作用域组织:global/page/component。"},"VariablesMap":{"type":"object","additionalProperties":{"$ref":"#/definitions/Variable"},"description":"变量映射,键为变量名,值为变量定义。"},"Variable":{"anyOf":[{"$ref":"#/definitions/StringVariable"},{"$ref":"#/definitions/NumberVariable"},{"$ref":"#/definitions/BooleanVariable"},{"$ref":"#/definitions/ArrayVariable"},{"$ref":"#/definitions/FunctionVariable"},{"$ref":"#/definitions/ObjectVariable"}],"description":"变量联合类型,涵盖五类变量定义。"},"StringVariable":{"type":"object","properties":{"description":{"type":"string"},"extensions":{"type":"object","additionalProperties":{}},"type":{"type":"string","const":"string"},"value":{"type":"string"},"default":{"type":"string"}},"required":["type","value","default"],"additionalProperties":false,"description":"字符串变量,包含当前值与默认值,可选描述。"},"NumberVariable":{"type":"object","properties":{"description":{"type":"string"},"extensions":{"type":"object","additionalProperties":{}},"type":{"type":"string","const":"number"},"value":{"type":"number"},"default":{"type":"number"}},"required":["type","value","default"],"additionalProperties":false,"description":"数字变量,包含当前值与默认值,可选描述。"},"BooleanVariable":{"type":"object","properties":{"description":{"type":"string"},"extensions":{"type":"object","additionalProperties":{}},"type":{"type":"string","const":"boolean"},"value":{"type":"boolean"},"default":{"type":"boolean"}},"required":["type","value","default"],"additionalProperties":false,"description":"布尔变量,包含当前值与默认值,可选描述。"},"ArrayVariable":{"type":"object","properties":{"description":{"type":"string"},"extensions":{"type":"object","additionalProperties":{}},"type":{"type":"string","const":"array"},"value":{"type":"array","items":{}},"default":{"type":"array","items":{}}},"required":["type","value","default"],"additionalProperties":false,"description":"数组变量,元素类型不做限制,包含当前值与默认值,可选描述。"},"FunctionVariable":{"type":"object","properties":{"description":{"type":"string"},"extensions":{"type":"object","additionalProperties":{}},"type":{"type":"string","const":"function"},"value":{"type":"string"},"default":{"type":"string"},"args":{"type":"array","items":{"type":"string"}}},"required":["type","value","default"],"additionalProperties":false,"description":"函数变量,以字符串保存函数实现;支持 `args` 指定入参名列表。"},"ObjectVariable":{"type":"object","properties":{"description":{"type":"string"},"extensions":{"type":"object","additionalProperties":{}},"type":{"type":"string","const":"object"},"value":{"type":"object","additionalProperties":{"$ref":"#/definitions/Variable"}},"default":{"type":"object","additionalProperties":{"$ref":"#/definitions/Variable"}}},"required":["type","value","default"],"additionalProperties":false,"description":"对象变量,键到变量的映射;支持递归嵌套。"},"Dependency":{"anyOf":[{"$ref":"#/definitions/JSDependency"},{"$ref":"#/definitions/CSSDependency"},{"$ref":"#/definitions/FontDependency"},{"$ref":"#/definitions/ImageDependency"},{"$ref":"#/definitions/JSONDependency"},{"$ref":"#/definitions/WasmDependency"},{"$ref":"#/definitions/OtherDependency"}],"description":"依赖项"},"JSDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,可以是绝对地址或相对地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"anyOf":[{"type":"boolean"},{"type":"string","const":"module"},{"type":"string","const":"style"}],"description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"type":{"type":"string","const":"js"},"format":{"$ref":"#/definitions/JSFormat"},"crossOrigin":{"type":"string","enum":["anonymous","use-credentials"]},"module":{"type":"boolean"}},"required":["format","id","type"],"additionalProperties":false,"description":"JS 资源"},"JSFormat":{"type":"string","enum":["esm","umd","iife","cjs"],"description":"JS 格式"},"CSSDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,可以是绝对地址或相对地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"anyOf":[{"type":"boolean"},{"type":"string","const":"module"},{"type":"string","const":"style"}],"description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"type":{"type":"string","const":"css"},"media":{"type":"string"}},"required":["id","type"],"additionalProperties":false,"description":"CSS"},"FontDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,可以是绝对地址或相对地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"anyOf":[{"type":"boolean"},{"type":"string","const":"module"},{"type":"string","const":"style"}],"description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"type":{"type":"string","const":"font"},"family":{"type":"string"},"weight":{"type":["number","string"]},"style":{"type":"string","enum":["normal","italic"]}},"required":["id","type"],"additionalProperties":false,"description":"字体"},"ImageDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,可以是绝对地址或相对地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"anyOf":[{"type":"boolean"},{"type":"string","const":"module"},{"type":"string","const":"style"}],"description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"type":{"type":"string","const":"image"},"mime":{"type":"string"}},"required":["id","type"],"additionalProperties":false,"description":"图片"},"JSONDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,可以是绝对地址或相对地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"anyOf":[{"type":"boolean"},{"type":"string","const":"module"},{"type":"string","const":"style"}],"description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"type":{"type":"string","const":"json"}},"required":["id","type"],"additionalProperties":false,"description":"JSON"},"WasmDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,可以是绝对地址或相对地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"anyOf":[{"type":"boolean"},{"type":"string","const":"module"},{"type":"string","const":"style"}],"description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"type":{"type":"string","const":"wasm"},"init":{"type":"string","enum":["async","sync"]}},"required":["id","type"],"additionalProperties":false,"description":"WASM"},"OtherDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,可以是绝对地址或相对地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"anyOf":[{"type":"boolean"},{"type":"string","const":"module"},{"type":"string","const":"style"}],"description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"type":{"type":"string","const":"other"},"kind":{"type":"string"}},"required":["id","type"],"additionalProperties":false,"description":"其他"}}')},le={REQUIRED:"required",TYPE:"type",ENUM:"enum",CONST:"const",ADDITIONAL:"additionalProperties",ANY_OF:"anyOf"},Pe={TYPE:"/type",VALUE:"/value",DEFAULT:"/default",ARGS:"/args"},Ce={missing:e=>`缺少必填字段:${e}`,type:e=>`类型必须为:${e}`,enum:e=>`取值必须为枚举之一:${e.join(", ")}`,constOne:e=>`取值必须为:${JSON.stringify(e)}`,additionalProp:e=>`不允许额外字段:${e}`},Ve=e=>typeof e=="number"&&Number.isFinite(e)&&e>0,tr=()=>{const e=globalThis;if(e?.crypto?.randomUUID)return e.crypto.randomUUID();if(e?.crypto?.getRandomValues){const t=new Uint8Array(16);e.crypto.getRandomValues(t),t[6]=t[6]&15|64,t[8]=t[8]&63|128;const n=Array.from(t,i=>i.toString(16).padStart(2,"0"));return`${n.slice(0,4).join("")}-${n.slice(4,6).join("")}-${n.slice(6,8).join("")}-${n.slice(8,10).join("")}-${n.slice(10).join("")}`}return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=Math.random()*16|0;return(t==="x"?n:n&3|8).toString(16)})},ee=e=>{if(!Array.isArray(e))return[];const t=h=>{const a=h.instancePath||h.path||"",u=h.keyword,r=h.params||{};let c=h.message||"";switch(u){case le.REQUIRED:r.missingProperty&&(c=Ce.missing(r.missingProperty));break;case le.TYPE:h.schema&&(c=Ce.type(h.schema));break;case le.ENUM:Array.isArray(r.allowedValues)&&(c=Ce.enum(r.allowedValues));break;case le.CONST:c=r.allowedValue!==void 0?Ce.constOne(r.allowedValue):"必须等于常量";break;case le.ADDITIONAL:r.additionalProperty&&(c=Ce.additionalProp(r.additionalProperty));break}return{path:a,message:c,keyword:u,params:r}},n=e.map(t),i=[],y=new Map,s=new Set;for(const h of n)if(h.keyword===le.CONST&&h.path.endsWith(Pe.TYPE)){const a=h.path,u=y.get(a)||{path:h.path,values:[]},r=h.params?.allowedValue;r!==void 0&&!u.values.includes(r)&&u.values.push(r),y.set(a,u)}else i.push(h);for(const[,h]of y)if(h.values.length<=1)h.values.length===1&&i.push({path:h.path,keyword:le.CONST,params:{allowedValue:h.values[0]},message:Ce.constOne(h.values[0])});else{const a=h.path.replace(new RegExp(`${Pe.TYPE}$`),"");s.add(a)}const l=i,d=new Set,f=[];for(const h of l){const a=`${h.keyword}|${h.path}|${JSON.stringify(h.params??{})}`;d.has(a)||(d.add(a),f.push(h))}const w=new Map,$=h=>{if(!h)return"";const a=h.match(new RegExp(`^(.*?)(?:${Pe.TYPE}|${Pe.VALUE}|${Pe.DEFAULT}|${Pe.ARGS})(?:$|\\/)`));return a?a[1]:h};for(const h of f){const a=$(h.path),u=w.get(a)||[];u.push(h),w.set(a,u)}const E=[];for(const[h,a]of w.entries()){if(!s.has(h)){E.push(...a);continue}for(const r of a){const c=r.keyword===le.TYPE&&(r.path===`${h}${Pe.VALUE}`||r.path===`${h}${Pe.DEFAULT}`),g=r.keyword===le.ADDITIONAL&&r.path===h&&r.params?.additionalProperty==="args";c||g||E.push(r)}}const v=E.some(h=>h.keyword!==le.ANY_OF)?E.filter(h=>h.keyword!==le.ANY_OF):E,b=h=>{if(h.keyword===le.REQUIRED){const a=h.params?.missingProperty;return a==="type"||a==="role"?0:a==="id"?1:2}return 3};return v.sort((h,a)=>b(h)-b(a))},he=(e,t)=>{if(!t||typeof t!="object")return e;const n=e??{};for(const i of Object.keys(t))(!(i in n)||n[i]===void 0)&&(n[i]=t[i]);return n},Se=(e,t)=>t?.length?t.map(n=>({...n,path:`${e}${n.path?`.${n.path}`:""}`})):[],rr=e=>{try{return{ok:!0,value:JSON.parse(e)}}catch(t){return{ok:!1,errors:[{path:"",keyword:"type",message:`JSON 解析失败:${t?.message??String(t)}`}]}}},ui=e=>e.map(t=>({path:"",keyword:"required",params:{missingProperty:t},message:`缺少必填字段:${t}`})),Dn=({input:e,normalize:t,base:n,branches:i,key:y,missingKeys:s,onSuccess:l})=>{const d=t?t(e):e,f=d;if(f&&typeof f=="object"&&typeof f[y]=="string"){const w=i[f[y]];if(w)return w(f)?l(f):{ok:!1,errors:ee(w.errors)}}return n(d)?l(d):!f||typeof f[y]!="string"?{ok:!1,errors:ui(s)}:{ok:!1,errors:ee(n.errors)}},nr=(e,t,n,i)=>Dn({input:e,base:t,branches:n,key:i,missingKeys:[i,"id"],onSuccess:()=>({ok:!0})}),sr=(e,t,n,i,y,s,l=[s,"id"])=>Dn({input:e,normalize:d=>n(d,t),base:i,branches:y,key:s,missingKeys:l,onSuccess:d=>({ok:!0,value:d})});let Ct=null;const Tn=()=>(Ct||(Ct=new si({allErrors:!0,strict:!1}),di(Ct)),Ct),Mn=new Map,li=JSON.stringify(Ae),fi={CICPage:["#/definitions/CICPage","#/$defs/CICPage","#/properties/pages/items","#/definitions/CICConfig/properties/pages/items"],Meta:["#/definitions/Meta","#/$defs/Meta","#/properties/meta"],Layout:["#/definitions/Layout","#/$defs/Layout","#/properties/meta/properties/layout"],ComponentInstance:["#/definitions/ComponentInstance","#/$defs/ComponentInstance"],ViewComponentInstance:["#/definitions/ViewComponentInstance","#/$defs/ViewComponentInstance"],ContainerComponentInstance:["#/definitions/ContainerComponentInstance","#/$defs/ContainerComponentInstance"],LogicComponentInstanceRef:["#/definitions/LogicComponentInstanceRef","#/$defs/LogicComponentInstanceRef"],DataSourceItem:["#/definitions/DataSourceItem","#/$defs/DataSourceItem"],DataSourceRest:["#/definitions/DataSourceRest","#/$defs/DataSourceRest"],DataSourceWebSocket:["#/definitions/DataSourceWebSocket","#/$defs/DataSourceWebSocket"],DataSourceStatic:["#/definitions/DataSourceStatic","#/$defs/DataSourceStatic"],DataSourceFunction:["#/definitions/DataSourceFunction","#/$defs/DataSourceFunction"],RegistryComponents:["#/definitions/RegistryComponents","#/$defs/RegistryComponents"],Variables:["#/definitions/Variables","#/$defs/Variables","#/properties/variables"],Dependency:["#/definitions/Dependency","#/$defs/Dependency"],JSDependency:["#/definitions/JSDependency","#/$defs/JSDependency"],CSSDependency:["#/definitions/CSSDependency","#/$defs/CSSDependency"],FontDependency:["#/definitions/FontDependency","#/$defs/FontDependency"],ImageDependency:["#/definitions/ImageDependency","#/$defs/ImageDependency"],JSONDependency:["#/definitions/JSONDependency","#/$defs/JSONDependency"],WasmDependency:["#/definitions/WasmDependency","#/$defs/WasmDependency"],OtherDependency:["#/definitions/OtherDependency","#/$defs/OtherDependency"],LayoutConfig:["#/definitions/Layout","#/properties/meta/properties/layout"]},pi=(e,t)=>e.compile({$ref:t,definitions:Ae.definitions,properties:Ae.properties}),te=e=>{const t=Tn(),n=`type:${e}::${li}`,i=Mn.get(n);if(i)return i;const y=fi[e]||[`#/definitions/${e}`,`#/$defs/${e}`];for(const s of y)try{const l=pi(t,s);return Mn.set(n,l),l}catch{}throw new Error(`VALIDATOR_REF_NOT_FOUND:${e}`)},An=te("DataSourceItem"),Vn=te("DataSourceRest"),zn=te("DataSourceWebSocket"),Fn=te("DataSourceStatic"),Ln=te("DataSourceFunction"),mi=(e,t)=>{const n={...e};return t?.generateId&&!n.id&&(n.id=tr()),n.type&&(n.type==="rest"?(t?.strict||("pollInterval"in n&&Ve(n.pollInterval)&&(n.pollInterval=Math.round(n.pollInterval)),"timeout"in n&&Ve(n.timeout)&&(n.timeout=Math.round(n.timeout))),he(n,t?.defaults)):n.type==="websocket"?(n.heartbeat&&typeof n.heartbeat=="object"&&(t?.strict||"interval"in n.heartbeat&&Ve(n.heartbeat.interval)&&(n.heartbeat.interval=Math.round(n.heartbeat.interval))),t?.strict||"pollInterval"in n&&Ve(n.pollInterval)&&(n.pollInterval=Math.round(n.pollInterval)),he(n,t?.defaults)):n.type==="static"?t?.strict||he(n,t?.defaults):n.type==="function"&&(t?.strict||"timeout"in n&&Ve(n.timeout)&&(n.timeout=Math.round(n.timeout)),t?.strict||he(n,t?.defaults))),n},hi=e=>nr(e,An,{rest:Vn,websocket:zn,static:Fn,function:Ln},"type"),Un=(e,t)=>sr(e,t,mi,An,{rest:Vn,websocket:zn,static:Fn,function:Ln},"type",["type","id"]),Kn=te("ComponentInstance"),Jn=te("ViewComponentInstance"),Hn=te("ContainerComponentInstance"),Gn=te("LogicComponentInstanceRef"),yi=(e,t)=>{const n={...e};return t?.generateId&&!n.id&&(n.id=tr()),t?.strict||(n.role==="view"?delete n.children:n.role==="container"?delete n.component:n.role==="logic"&&delete n.children),he(n,t?.defaults),n},gi=e=>nr(e,Kn,{view:Jn,container:Hn,logic:Gn},"role"),Wn=(e,t)=>sr(e,t,yi,Kn,{view:Jn,container:Hn,logic:Gn},"role",["role","id"]),qt=te("CICPage"),vi=(e,t)=>{const n={...e};return t?.generateId&&!n.id&&(n.id=tr()),t?.strict||he(n,t?.defaults),n},_i=e=>qt(e)?{ok:!0}:{ok:!1,errors:ee(qt.errors||[])},Bn=(e,t)=>{const n=vi(e,t);return qt(n)?{ok:!0,value:n}:{ok:!1,errors:ee(qt.errors||[])}},Dt=te("Meta"),Tt=te("Layout"),$i=e=>Dt(e)?{ok:!0}:{ok:!1,errors:ee(Dt.errors||[])},bi=e=>Tt(e)?{ok:!0}:{ok:!1,errors:ee(Tt.errors||[])},Yn=(e,t)=>{const n=t?.strict?e:he(e,t?.defaults);return Dt(n)?{ok:!0,value:n}:{ok:!1,errors:ee(Dt.errors||[])}},xn=(e,t)=>{const n=t?.strict?e:he(e,t?.defaults);return Tt(n)?{ok:!0,value:n}:{ok:!1,errors:ee(Tt.errors||[])}},Mt=te("Variables"),wi=e=>Mt(e)?{ok:!0}:{ok:!1,errors:ee(Mt.errors||[])},Qn=(e,t)=>{const n=t?.strict?e:he(e,t?.defaults);return Mt(n)?{ok:!0,value:n}:{ok:!1,errors:ee(Mt.errors||[])}},Zn=te("Dependency"),Xn=te("JSDependency"),es=te("CSSDependency"),ts=te("FontDependency"),rs=te("ImageDependency"),ns=te("JSONDependency"),ss=te("WasmDependency"),is=te("OtherDependency"),Pi=e=>nr(e,Zn,{js:Xn,css:es,font:ts,image:rs,json:ns,wasm:ss,other:is},"type"),os=(e,t)=>sr(e,t,(i,y)=>y?.strict?i:he(i,y?.defaults),Zn,{js:Xn,css:es,font:ts,image:rs,json:ns,wasm:ss,other:is},"type",["type","id"]),At=te("RegistryComponents"),Si=e=>At(e)?{ok:!0}:{ok:!1,errors:ee(At.errors||[])},as=(e,t)=>{const n=t?.strict?e:he(e,t?.defaults);return At(n)?{ok:!0,value:n}:{ok:!1,errors:ee(At.errors||[])}};let Vt,cs;const Ei=()=>{const e=Tn(),t=JSON.stringify(Ae);(!Vt||cs!==t)&&(Vt=e.compile(Ae),cs=t)},zt=e=>{try{return Ei(),Vt(e)?{ok:!0}:{ok:!1,errors:ee(Vt.errors||[])}}catch(t){const n=[{path:"",message:t?.message||String(t),keyword:"anyOf",params:{}}];return{ok:!1,errors:ee(n)}}},ki=(e,t)=>{if(e&&typeof e=="object")return ze(e,t);const n=(e||"").trim();if(!(n.startsWith("{")||n.startsWith("[")))return{ok:!1,errors:ee([{path:"",message:"非 JSON 字符串输入,请使用 importCICAsync(pathOrUrl) 进行路径/URL 导入",keyword:"type",params:{}}])};const y=rr(n);return y.ok?ze(y.value,t):{ok:!1,errors:y.errors}},ji=async(e,t)=>{if(e&&typeof e=="object")return ze(e,t);const n=(e||"").trim();if(n.startsWith("{")||n.startsWith("[")){const s=rr(n);return s.ok?ze(s.value,t):{ok:!1,errors:s.errors}}if(!(typeof globalThis.fetch=="function"))return{ok:!1,errors:ee([{path:"",message:"当前环境不支持路径/URL 导入(缺少 fetch),请传入 JSON 字符串或对象",keyword:"type",params:{}}])};if(/^file:\/\//i.test(n))return{ok:!1,errors:ee([{path:"",message:"不支持 file:// 方案,请使用 http(s) 或相对/绝对路径(同源)",keyword:"type",params:{}}])};try{const s=await globalThis.fetch(n);if(!s||!s.ok){const f=[{path:"",message:`网络或资源错误:${s?.status} ${s?.statusText||""}`.trim(),keyword:"type",params:{}}];return{ok:!1,errors:ee(f)}}const l=await s.text(),d=rr(l);return d.ok?ze(d.value,t):{ok:!1,errors:d.errors}}catch(s){const l=[{path:"",message:`请求失败:${s?.message||s}`,keyword:"type",params:{}}];return{ok:!1,errors:ee(l)}}},Ii=e=>{const t=zt(e);if(!t.ok)return{ok:!1,errors:t.errors};const n={version:e.version,meta:e.meta,pages:e.pages,registry:e.registry,variables:e.variables,deps:e.deps,extensions:e.extensions};return{ok:!0,value:JSON.stringify(n,null,2)}},ze=(e,t)=>{const n=typeof e=="object"?{...e}:e,i=[];if(!n||typeof n!="object")return i.push({path:"",message:"配置必须为对象",keyword:"type",params:{schema:"object"}}),{ok:!1,errors:ee(i)};if(n.version||i.push({path:"/version",message:"缺少必填字段:version",keyword:"required",params:{missingProperty:"version"}}),n.meta||i.push({path:"/meta",message:"缺少必填字段:meta",keyword:"required",params:{missingProperty:"meta"}}),n.pages||i.push({path:"/pages",message:"缺少必填字段:pages",keyword:"required",params:{missingProperty:"pages"}}),i.length)return{ok:!1,errors:ee(i)};const y=Yn(n.meta,t?.meta);if(y.ok||i.push(...Se("/meta",y.errors)),n.meta?.layout){const l=xn(n.meta.layout,t?.layout);l.ok?n.meta.layout=l.value:i.push(...Se("/meta/layout",l.errors))}if(y.ok&&(n.meta=y.value),n.variables){const l=Qn(n.variables,t?.variables);l.ok?n.variables=l.value:i.push(...Se("/variables",l.errors))}if(n.registry?.components){const l=[];for(let d=0;d<n.registry.components.length;d++){const f=as(n.registry.components[d],t?.registry);f.ok?l.push(f.value):i.push(...Se(`/registry/components[${d}]`,f.errors))}n.registry.components=l}if(n.deps){const l=[];for(let d=0;d<n.deps.length;d++){const f=os(n.deps[d],t?.dependency);f.ok?l.push(f.value):i.push(...Se(`/deps[${d}]`,f.errors))}n.deps=l}if(Array.isArray(n.pages)){const l=[];for(let d=0;d<n.pages.length;d++){const f=n.pages[d],w=Bn(f,t?.page);if(!w.ok){i.push(...Se(`/pages[${d}]`,w.errors));continue}const $=w.value;if(Array.isArray(f.components)){const E=[];for(let _=0;_<f.components.length;_++){const v=Wn(f.components[_],t?.component);v.ok?E.push(v.value):i.push(...Se(`/pages[${d}]/components[${_}]`,v.errors))}$.components=E}if(Array.isArray(f.dataSources)){const E=[];for(let _=0;_<f.dataSources.length;_++){const v=Un(f.dataSources[_],t?.dataSource);v.ok?E.push(v.value):i.push(...Se(`/pages[${d}]/dataSources[${_}]`,v.errors))}$.dataSources=E}l.push($)}n.pages=l}if(i.length)return{ok:!1,errors:ee(i)};const s=zt(n);return s.ok?{ok:!0,value:n}:{ok:!1,errors:s.errors}};class ir{config;constructor(t){const n=zt(t);if(!n.ok)throw new Error(`Invalid CIC Configuration: ${JSON.stringify(n.errors)}`);this.config=t}getConfig(){return this.config}findComponent(t){let n;return this.walkComponents(i=>i.id===t?(n=i,!1):!0),n}findPageByComponent(t){let n;return this.walkComponents((i,y)=>i.id===t?(n=y,!1):!0),n}getVariable(t,n){const i=this.config.variables;if(i){if(t.componentId&&i.component&&i.component[t.componentId]){const y=i.component[t.componentId][n];if(y)return y.value??y.default}if(t.pageId&&i.page&&i.page[t.pageId]){const y=i.page[t.pageId][n];if(y)return y.value??y.default}if(i.global&&i.global[n]){const y=i.global[n];return y.value??y.default}}}getVariableByRef(t){const n=t.match(/^(global|page|component)(?::([^\.]+))?\.(.+)$/);if(!n)return;const[,i,y,s]=n;if(i==="global")return this.getVariable({},s);if(i==="page")return this.getVariable({pageId:y},s);if(i==="component")return this.getVariable({componentId:y},s)}walkComponents(t){if(this.config.pages)for(const n of this.config.pages){const i=[];for(const s of n.components||[])i.push({node:s});let y=!1;for(;i.length>0&&!y;){const{node:s,parent:l}=i.pop();if(t(s,n,l)===!1){y=!0;break}if(s.children&&s.children.length>0)for(let f=s.children.length-1;f>=0;f--)i.push({node:s.children[f],parent:s})}if(y)break}}static getValueByPath(t,n,i){if(t==null||!n)return i;const y=[];n.replace(/\[(\d+)\]/g,".$1").split(".").forEach(l=>{l.trim()&&y.push(l.trim())});let s=t;for(const l of y){if(s==null)return i;s=s[l]}return s===void 0?i:s}static traverseTree(t,n,i){const y=Array.isArray(t)?t:[t];for(const s of y)n(s,i)!==!1&&s.children&&s.children.length>0&&ir.traverseTree(s.children,n,s)}static createDataSource=Un;static validateDataSource=hi;static createComponent=Wn;static validateComponent=gi;static createPage=Bn;static validatePage=_i;static createMeta=Yn;static createLayout=xn;static validateMeta=$i;static validateLayout=bi;static createVariables=Qn;static validateVariables=wi;static createDependency=os;static validateDependency=Pi;static createRegistryComponent=as;static validateRegistryComponent=Si;static importCIC=ki;static exportCIC=Ii;static validateCIC=zt;static importCICAsync=ji}Ie.CICSDK=ir,Object.defineProperty(Ie,Symbol.toStringTag,{value:"Module"})}));
|
|
8
|
+
deps: ${$}}`};const g={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(f){const[w,$]=s(f);l(f,w),d(f,$)}};function s({schema:f}){const w={},$={};for(const E in f){if(E==="__proto__")continue;const _=Array.isArray(f[E])?w:$;_[E]=f[E]}return[w,$]}function l(f,w=f.schema){const{gen:$,data:E,it:_}=f;if(Object.keys(w).length===0)return;const v=$.let("missing");for(const b in w){const h=w[b];if(h.length===0)continue;const a=(0,i.propertyInData)($,E,b,_.opts.ownProperties);f.setParams({property:b,depsCount:h.length,deps:h.join(", ")}),_.allErrors?$.if(a,()=>{for(const u of h)(0,i.checkReportMissingProp)(f,u)}):($.if((0,t._)`${a} && (${(0,i.checkMissingProp)(f,h,v)})`),(0,i.reportMissingProp)(f,v),$.else())}}e.validatePropertyDeps=l;function d(f,w=f.schema){const{gen:$,data:E,keyword:_,it:v}=f,b=$.name("valid");for(const h in w)(0,r.alwaysValidSchema)(v,w[h])||($.if((0,i.propertyInData)($,E,h,v.opts.ownProperties),()=>{const a=f.subschema({keyword:_,schemaProp:h},b);f.mergeValidEvaluated(a,b)},()=>$.var(b,!0)),f.ok(b))}e.validateSchemaDeps=d,e.default=g})(Zt)),Zt}var vt={},ln;function Fs(){if(ln)return vt;ln=1,Object.defineProperty(vt,"__esModule",{value:!0});const e=H(),t=Y(),i={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:g})=>(0,e._)`{propertyName: ${g.propertyName}}`},code(g){const{gen:s,schema:l,data:d,it:f}=g;if((0,t.alwaysValidSchema)(f,l))return;const w=s.name("valid");s.forIn("key",d,$=>{g.setParams({propertyName:$}),g.subschema({keyword:"propertyNames",data:$,dataTypes:["string"],propertyName:$,compositeRule:!0},w),s.if((0,e.not)(w),()=>{g.error(!0),f.allErrors||s.break()})}),g.ok(w)}};return vt.default=i,vt}var _t={},fn;function pn(){if(fn)return _t;fn=1,Object.defineProperty(_t,"__esModule",{value:!0});const e=me(),t=H(),r=be(),i=Y(),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:l})=>(0,t._)`{additionalProperty: ${l.additionalProperty}}`},code(l){const{gen:d,schema:f,parentSchema:w,data:$,errsCount:E,it:_}=l;if(!E)throw new Error("ajv implementation error");const{allErrors:v,opts:b}=_;if(_.props=!0,b.removeAdditional!=="all"&&(0,i.alwaysValidSchema)(_,f))return;const h=(0,e.allSchemaProperties)(w.properties),a=(0,e.allSchemaProperties)(w.patternProperties);u(),l.ok((0,t._)`${E} === ${r.default.errors}`);function u(){d.forIn("key",$,m=>{!h.length&&!a.length?y(m):d.if(n(m),()=>y(m))})}function n(m){let P;if(h.length>8){const O=(0,i.schemaRefOrVal)(_,w.properties,"properties");P=(0,e.isOwnProperty)(d,O,m)}else h.length?P=(0,t.or)(...h.map(O=>(0,t._)`${m} === ${O}`)):P=t.nil;return a.length&&(P=(0,t.or)(P,...a.map(O=>(0,t._)`${(0,e.usePattern)(l,O)}.test(${m})`))),(0,t.not)(P)}function c(m){d.code((0,t._)`delete ${$}[${m}]`)}function y(m){if(b.removeAdditional==="all"||b.removeAdditional&&f===!1){c(m);return}if(f===!1){l.setParams({additionalProperty:m}),l.error(),v||d.break();return}if(typeof f=="object"&&!(0,i.alwaysValidSchema)(_,f)){const P=d.name("valid");b.removeAdditional==="failing"?(o(m,P,!1),d.if((0,t.not)(P),()=>{l.reset(),c(m)})):(o(m,P),v||d.if((0,t.not)(P),()=>d.break()))}}function o(m,P,O){const T={keyword:"additionalProperties",dataProp:m,dataPropType:i.Type.Str};O===!1&&Object.assign(T,{compositeRule:!0,createErrors:!1,allErrors:!1}),l.subschema(T,P)}}};return _t.default=s,_t}var $t={},mn;function Ls(){if(mn)return $t;mn=1,Object.defineProperty($t,"__esModule",{value:!0});const e=We(),t=me(),r=Y(),i=pn(),g={keyword:"properties",type:"object",schemaType:"object",code(s){const{gen:l,schema:d,parentSchema:f,data:w,it:$}=s;$.opts.removeAdditional==="all"&&f.additionalProperties===void 0&&i.default.code(new e.KeywordCxt($,i.default,"additionalProperties"));const E=(0,t.allSchemaProperties)(d);for(const a of E)$.definedProperties.add(a);$.opts.unevaluated&&E.length&&$.props!==!0&&($.props=r.mergeEvaluated.props(l,(0,r.toHash)(E),$.props));const _=E.filter(a=>!(0,r.alwaysValidSchema)($,d[a]));if(_.length===0)return;const v=l.name("valid");for(const a of _)b(a)?h(a):(l.if((0,t.propertyInData)(l,w,a,$.opts.ownProperties)),h(a),$.allErrors||l.else().var(v,!0),l.endIf()),s.it.definedProperties.add(a),s.ok(v);function b(a){return $.opts.useDefaults&&!$.compositeRule&&d[a].default!==void 0}function h(a){s.subschema({keyword:"properties",schemaProp:a,dataProp:a},v)}}};return $t.default=g,$t}var bt={},hn;function Us(){if(hn)return bt;hn=1,Object.defineProperty(bt,"__esModule",{value:!0});const e=me(),t=H(),r=Y(),i=Y(),g={keyword:"patternProperties",type:"object",schemaType:"object",code(s){const{gen:l,schema:d,data:f,parentSchema:w,it:$}=s,{opts:E}=$,_=(0,e.allSchemaProperties)(d),v=_.filter(y=>(0,r.alwaysValidSchema)($,d[y]));if(_.length===0||v.length===_.length&&(!$.opts.unevaluated||$.props===!0))return;const b=E.strictSchema&&!E.allowMatchingProperties&&w.properties,h=l.name("valid");$.props!==!0&&!($.props instanceof t.Name)&&($.props=(0,i.evaluatedPropsToName)(l,$.props));const{props:a}=$;u();function u(){for(const y of _)b&&n(y),$.allErrors?c(y):(l.var(h,!0),c(y),l.if(h))}function n(y){for(const o in b)new RegExp(y).test(o)&&(0,r.checkStrictMode)($,`property ${o} matches pattern ${y} (use allowMatchingProperties)`)}function c(y){l.forIn("key",f,o=>{l.if((0,t._)`${(0,e.usePattern)(s,y)}.test(${o})`,()=>{const m=v.includes(y);m||s.subschema({keyword:"patternProperties",schemaProp:y,dataProp:o,dataPropType:i.Type.Str},h),$.opts.unevaluated&&a!==!0?l.assign((0,t._)`${a}[${o}]`,!0):!m&&!$.allErrors&&l.if((0,t.not)(h),()=>l.break())})})}}};return bt.default=g,bt}var wt={},yn;function Ks(){if(yn)return wt;yn=1,Object.defineProperty(wt,"__esModule",{value:!0});const e=Y(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:i,schema:g,it:s}=r;if((0,e.alwaysValidSchema)(s,g)){r.fail();return}const l=i.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},l),r.failResult(l,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return wt.default=t,wt}var Pt={},gn;function Js(){if(gn)return Pt;gn=1,Object.defineProperty(Pt,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:me().validateUnion,error:{message:"must match a schema in anyOf"}};return Pt.default=t,Pt}var St={},vn;function Hs(){if(vn)return St;vn=1,Object.defineProperty(St,"__esModule",{value:!0});const e=H(),t=Y(),i={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:g})=>(0,e._)`{passingSchemas: ${g.passing}}`},code(g){const{gen:s,schema:l,parentSchema:d,it:f}=g;if(!Array.isArray(l))throw new Error("ajv implementation error");if(f.opts.discriminator&&d.discriminator)return;const w=l,$=s.let("valid",!1),E=s.let("passing",null),_=s.name("_valid");g.setParams({passing:E}),s.block(v),g.result($,()=>g.reset(),()=>g.error(!0));function v(){w.forEach((b,h)=>{let a;(0,t.alwaysValidSchema)(f,b)?s.var(_,!0):a=g.subschema({keyword:"oneOf",schemaProp:h,compositeRule:!0},_),h>0&&s.if((0,e._)`${_} && ${$}`).assign($,!1).assign(E,(0,e._)`[${E}, ${h}]`).else(),s.if(_,()=>{s.assign($,!0),s.assign(E,h),a&&g.mergeEvaluated(a,e.Name)})})}}};return St.default=i,St}var Et={},_n;function Gs(){if(_n)return Et;_n=1,Object.defineProperty(Et,"__esModule",{value:!0});const e=Y(),t={keyword:"allOf",schemaType:"array",code(r){const{gen:i,schema:g,it:s}=r;if(!Array.isArray(g))throw new Error("ajv implementation error");const l=i.name("valid");g.forEach((d,f)=>{if((0,e.alwaysValidSchema)(s,d))return;const w=r.subschema({keyword:"allOf",schemaProp:f},l);r.ok(l),r.mergeEvaluated(w)})}};return Et.default=t,Et}var kt={},$n;function Ws(){if($n)return kt;$n=1,Object.defineProperty(kt,"__esModule",{value:!0});const e=H(),t=Y(),i={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:s})=>(0,e.str)`must match "${s.ifClause}" schema`,params:({params:s})=>(0,e._)`{failingKeyword: ${s.ifClause}}`},code(s){const{gen:l,parentSchema:d,it:f}=s;d.then===void 0&&d.else===void 0&&(0,t.checkStrictMode)(f,'"if" without "then" and "else" is ignored');const w=g(f,"then"),$=g(f,"else");if(!w&&!$)return;const E=l.let("valid",!0),_=l.name("_valid");if(v(),s.reset(),w&&$){const h=l.let("ifClause");s.setParams({ifClause:h}),l.if(_,b("then",h),b("else",h))}else w?l.if(_,b("then")):l.if((0,e.not)(_),b("else"));s.pass(E,()=>s.error(!0));function v(){const h=s.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},_);s.mergeEvaluated(h)}function b(h,a){return()=>{const u=s.subschema({keyword:h},_);l.assign(E,_),s.mergeValidEvaluated(u,E),a?l.assign(a,(0,e._)`${h}`):s.setParams({ifClause:h})}}}};function g(s,l){const d=s.schema[l];return d!==void 0&&!(0,t.alwaysValidSchema)(s,d)}return kt.default=i,kt}var jt={},bn;function Bs(){if(bn)return jt;bn=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=Y(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:i,it:g}){i.if===void 0&&(0,e.checkStrictMode)(g,`"${r}" without "if" is ignored`)}};return jt.default=t,jt}var wn;function Ys(){if(wn)return mt;wn=1,Object.defineProperty(mt,"__esModule",{value:!0});const e=nn(),t=Ms(),r=on(),i=As(),g=Vs(),s=zs(),l=Fs(),d=pn(),f=Ls(),w=Us(),$=Ks(),E=Js(),_=Hs(),v=Gs(),b=Ws(),h=Bs();function a(u=!1){const n=[$.default,E.default,_.default,v.default,b.default,h.default,l.default,d.default,s.default,f.default,w.default];return u?n.push(t.default,i.default):n.push(e.default,r.default),n.push(g.default),n}return mt.default=a,mt}var Rt={},It={},Pn;function xs(){if(Pn)return It;Pn=1,Object.defineProperty(It,"__esModule",{value:!0});const e=H(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,e.str)`must match format "${i}"`,params:({schemaCode:i})=>(0,e._)`{format: ${i}}`},code(i,g){const{gen:s,data:l,$data:d,schema:f,schemaCode:w,it:$}=i,{opts:E,errSchemaPath:_,schemaEnv:v,self:b}=$;if(!E.validateFormats)return;d?h():a();function h(){const u=s.scopeValue("formats",{ref:b.formats,code:E.code.formats}),n=s.const("fDef",(0,e._)`${u}[${w}]`),c=s.let("fType"),y=s.let("format");s.if((0,e._)`typeof ${n} == "object" && !(${n} instanceof RegExp)`,()=>s.assign(c,(0,e._)`${n}.type || "string"`).assign(y,(0,e._)`${n}.validate`),()=>s.assign(c,(0,e._)`"string"`).assign(y,n)),i.fail$data((0,e.or)(o(),m()));function o(){return E.strictSchema===!1?e.nil:(0,e._)`${w} && !${y}`}function m(){const P=v.$async?(0,e._)`(${n}.async ? await ${y}(${l}) : ${y}(${l}))`:(0,e._)`${y}(${l})`,O=(0,e._)`(typeof ${y} == "function" ? ${P} : ${y}.test(${l}))`;return(0,e._)`${y} && ${y} !== true && ${c} === ${g} && !${O}`}}function a(){const u=b.formats[f];if(!u){o();return}if(u===!0)return;const[n,c,y]=m(u);n===g&&i.pass(P());function o(){if(E.strictSchema===!1){b.logger.warn(O());return}throw new Error(O());function O(){return`unknown format "${f}" ignored in schema at path "${_}"`}}function m(O){const T=O instanceof RegExp?(0,e.regexpCode)(O):E.code.formats?(0,e._)`${E.code.formats}${(0,e.getProperty)(f)}`:void 0,z=s.scopeValue("formats",{key:f,ref:O,code:T});return typeof O=="object"&&!(O instanceof RegExp)?[O.type||"string",O.validate,(0,e._)`${z}.validate`]:["string",O,z]}function P(){if(typeof u=="object"&&!(u instanceof RegExp)&&u.async){if(!v.$async)throw new Error("async format in sync schema");return(0,e._)`await ${y}(${l})`}return typeof c=="function"?(0,e._)`${y}(${l})`:(0,e._)`${y}.test(${l})`}}}};return It.default=r,It}var Sn;function Qs(){if(Sn)return Rt;Sn=1,Object.defineProperty(Rt,"__esModule",{value:!0});const t=[xs().default];return Rt.default=t,Rt}var je={},En;function Zs(){return En||(En=1,Object.defineProperty(je,"__esModule",{value:!0}),je.contentVocabulary=je.metadataVocabulary=void 0,je.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],je.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),je}var kn;function Xs(){if(kn)return Ze;kn=1,Object.defineProperty(Ze,"__esModule",{value:!0});const e=Ps(),t=Ts(),r=Ys(),i=Qs(),g=Zs(),s=[e.default,t.default,(0,r.default)(),i.default,g.metadataVocabulary,g.contentVocabulary];return Ze.default=s,Ze}var Ot={},Me={},jn;function ei(){if(jn)return Me;jn=1,Object.defineProperty(Me,"__esModule",{value:!0}),Me.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(Me.DiscrError=e={})),Me}var Rn;function ti(){if(Rn)return Ot;Rn=1,Object.defineProperty(Ot,"__esModule",{value:!0});const e=H(),t=ei(),r=Bt(),i=xe(),g=Y(),l={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:d,tagName:f}})=>d===t.DiscrError.Tag?`tag "${f}" must be string`:`value of tag "${f}" must be in oneOf`,params:({params:{discrError:d,tag:f,tagName:w}})=>(0,e._)`{error: ${d}, tag: ${w}, tagValue: ${f}}`},code(d){const{gen:f,data:w,schema:$,parentSchema:E,it:_}=d,{oneOf:v}=E;if(!_.opts.discriminator)throw new Error("discriminator: requires discriminator option");const b=$.propertyName;if(typeof b!="string")throw new Error("discriminator: requires propertyName");if($.mapping)throw new Error("discriminator: mapping is not supported");if(!v)throw new Error("discriminator: requires oneOf keyword");const h=f.let("valid",!1),a=f.const("tag",(0,e._)`${w}${(0,e.getProperty)(b)}`);f.if((0,e._)`typeof ${a} == "string"`,()=>u(),()=>d.error(!1,{discrError:t.DiscrError.Tag,tag:a,tagName:b})),d.ok(h);function u(){const y=c();f.if(!1);for(const o in y)f.elseIf((0,e._)`${a} === ${o}`),f.assign(h,n(y[o]));f.else(),d.error(!1,{discrError:t.DiscrError.Mapping,tag:a,tagName:b}),f.endIf()}function n(y){const o=f.name("valid"),m=d.subschema({keyword:"oneOf",schemaProp:y},o);return d.mergeEvaluated(m,e.Name),o}function c(){var y;const o={},m=O(E);let P=!0;for(let C=0;C<v.length;C++){let V=v[C];if(V?.$ref&&!(0,g.schemaHasRulesButRef)(V,_.self.RULES)){const L=V.$ref;if(V=r.resolveRef.call(_.self,_.schemaEnv.root,_.baseId,L),V instanceof r.SchemaEnv&&(V=V.schema),V===void 0)throw new i.default(_.opts.uriResolver,_.baseId,L)}const F=(y=V?.properties)===null||y===void 0?void 0:y[b];if(typeof F!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${b}"`);P=P&&(m||O(V)),T(F,C)}if(!P)throw new Error(`discriminator: "${b}" must be required`);return o;function O({required:C}){return Array.isArray(C)&&C.includes(b)}function T(C,V){if(C.const)z(C.const,V);else if(C.enum)for(const F of C.enum)z(F,V);else throw new Error(`discriminator: "properties/${b}" must have "const" or "enum"`)}function z(C,V){if(typeof C!="string"||C in o)throw new Error(`discriminator: "${b}" values must be unique strings`);o[C]=V}}}};return Ot.default=l,Ot}const ri={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};var In;function On(){return In||(In=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const r=$s(),i=Xs(),g=ti(),s=ri,l=["/properties"],d="http://json-schema.org/draft-07/schema";class f extends r.default{_addVocabularies(){super._addVocabularies(),i.default.forEach(b=>this.addVocabulary(b)),this.opts.discriminator&&this.addKeyword(g.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const b=this.opts.$data?this.$dataMetaSchema(s,l):s;this.addMetaSchema(b,d,!1),this.refs["http://json-schema.org/schema"]=d}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(d)?d:void 0)}}t.Ajv=f,e.exports=t=f,e.exports.Ajv=f,Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var w=We();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return w.KeywordCxt}});var $=H();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return $._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return $.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return $.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return $.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return $.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return $.CodeGen}});var E=Wt();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return E.default}});var _=xe();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return _.default}})})(Le,Le.exports)),Le.exports}var ni=On();const si=Ie(ni);var Nt={exports:{}},Xt={},Nn;function ii(){return Nn||(Nn=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(C,V){return{validate:C,compare:V}}e.fullFormats={date:t(s,l),time:t(f(!0),w),"date-time":t(_(!0),v),"iso-time":t(f(),$),"iso-date-time":t(_(),b),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:u,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:z,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:c,int32:{type:"number",validate:m},int64:{type:"number",validate:P},float:{type:"number",validate:O},double:{type:"number",validate:O},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,l),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,w),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,v),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,$),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,b),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function r(C){return C%4===0&&(C%100!==0||C%400===0)}const i=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,g=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(C){const V=i.exec(C);if(!V)return!1;const F=+V[1],L=+V[2],Q=+V[3];return L>=1&&L<=12&&Q>=1&&Q<=(L===2&&r(F)?29:g[L])}function l(C,V){if(C&&V)return C>V?1:C<V?-1:0}const d=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function f(C){return function(F){const L=d.exec(F);if(!L)return!1;const Q=+L[1],oe=+L[2],ae=+L[3],X=L[4],ye=L[5]==="-"?-1:1,M=+(L[6]||0),j=+(L[7]||0);if(M>23||j>59||C&&!X)return!1;if(Q<=23&&oe<=59&&ae<60)return!0;const D=oe-j*ye,I=Q-M*ye-(D<0?1:0);return(I===23||I===-1)&&(D===59||D===-1)&&ae<61}}function w(C,V){if(!(C&&V))return;const F=new Date("2020-01-01T"+C).valueOf(),L=new Date("2020-01-01T"+V).valueOf();if(F&&L)return F-L}function $(C,V){if(!(C&&V))return;const F=d.exec(C),L=d.exec(V);if(F&&L)return C=F[1]+F[2]+F[3],V=L[1]+L[2]+L[3],C>V?1:C<V?-1:0}const E=/t|\s/i;function _(C){const V=f(C);return function(L){const Q=L.split(E);return Q.length===2&&s(Q[0])&&V(Q[1])}}function v(C,V){if(!(C&&V))return;const F=new Date(C).valueOf(),L=new Date(V).valueOf();if(F&&L)return F-L}function b(C,V){if(!(C&&V))return;const[F,L]=C.split(E),[Q,oe]=V.split(E),ae=l(F,Q);if(ae!==void 0)return ae||w(L,oe)}const h=/\/|:/,a=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function u(C){return h.test(C)&&a.test(C)}const n=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function c(C){return n.lastIndex=0,n.test(C)}const y=-2147483648,o=2**31-1;function m(C){return Number.isInteger(C)&&C<=o&&C>=y}function P(C){return Number.isInteger(C)}function O(){return!0}const T=/[^\\]\\Z/;function z(C){if(T.test(C))return!1;try{return new RegExp(C),!0}catch{return!1}}})(Xt)),Xt}var er={},Cn;function oi(){return Cn||(Cn=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=On(),r=H(),i=r.operators,g={formatMaximum:{okStr:"<=",ok:i.LTE,fail:i.GT},formatMinimum:{okStr:">=",ok:i.GTE,fail:i.LT},formatExclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},formatExclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},s={message:({keyword:d,schemaCode:f})=>(0,r.str)`should be ${g[d].okStr} ${f}`,params:({keyword:d,schemaCode:f})=>(0,r._)`{comparison: ${g[d].okStr}, limit: ${f}}`};e.formatLimitDefinition={keyword:Object.keys(g),type:"string",schemaType:"string",$data:!0,error:s,code(d){const{gen:f,data:w,schemaCode:$,keyword:E,it:_}=d,{opts:v,self:b}=_;if(!v.validateFormats)return;const h=new t.KeywordCxt(_,b.RULES.all.format.definition,"format");h.$data?a():u();function a(){const c=f.scopeValue("formats",{ref:b.formats,code:v.code.formats}),y=f.const("fmt",(0,r._)`${c}[${h.schemaCode}]`);d.fail$data((0,r.or)((0,r._)`typeof ${y} != "object"`,(0,r._)`${y} instanceof RegExp`,(0,r._)`typeof ${y}.compare != "function"`,n(y)))}function u(){const c=h.schema,y=b.formats[c];if(!y||y===!0)return;if(typeof y!="object"||y instanceof RegExp||typeof y.compare!="function")throw new Error(`"${E}": format "${c}" does not define "compare" function`);const o=f.scopeValue("formats",{key:c,ref:y,code:v.code.formats?(0,r._)`${v.code.formats}${(0,r.getProperty)(c)}`:void 0});d.fail$data(n(o))}function n(c){return(0,r._)`${c}.compare(${w}, ${$}) ${g[E].fail} 0`}},dependencies:["format"]};const l=d=>(d.addKeyword(e.formatLimitDefinition),d);e.default=l})(er)),er}var qn;function ai(){return qn||(qn=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=ii(),i=oi(),g=H(),s=new g.Name("fullFormats"),l=new g.Name("fastFormats"),d=(w,$={keywords:!0})=>{if(Array.isArray($))return f(w,$,r.fullFormats,s),w;const[E,_]=$.mode==="fast"?[r.fastFormats,l]:[r.fullFormats,s],v=$.formats||r.formatNames;return f(w,v,E,_),$.keywords&&(0,i.default)(w),w};d.get=(w,$="full")=>{const _=($==="fast"?r.fastFormats:r.fullFormats)[w];if(!_)throw new Error(`Unknown format "${w}"`);return _};function f(w,$,E,_){var v,b;(v=(b=w.opts.code).formats)!==null&&v!==void 0||(b.formats=(0,g._)`require("ajv-formats/dist/formats").${_}`);for(const h of $)w.addFormat(h,E[h])}e.exports=t=d,Object.defineProperty(t,"__esModule",{value:!0}),t.default=d})(Nt,Nt.exports)),Nt.exports}var ci=ai();const di=Ie(ci),Ae={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CICConfig",definitions:JSON.parse('{"CICConfig":{"type":"object","properties":{"version":{"type":"string"},"meta":{"$ref":"#/definitions/Meta"},"pages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"path":{"type":"string"},"layout":{"$ref":"#/definitions/Layout"},"components":{"type":"array","items":{"$ref":"#/definitions/ComponentInstance"}},"dataSources":{"type":"array","items":{"$ref":"#/definitions/DataSourceItem"}},"extensions":{"type":"object"}},"required":["id","name","path"],"additionalProperties":false,"description":"CIC 页面定义 说明:定义了 CIC 中页面的结构,包含页面 ID、名称、路径、布局、组件等。"}},"registry":{"$ref":"#/definitions/Registry"},"variables":{"$ref":"#/definitions/Variables"},"deps":{"type":"array","items":{"$ref":"#/definitions/Dependency"}},"extensions":{"type":"object"}},"required":["version","meta","pages"],"additionalProperties":false,"description":"CIC 配置定义 说明:定义了 CIC 项目的全局配置,包含版本、元数据、页面、组件、变量、依赖等。"},"Meta":{"type":"object","properties":{"projectId":{"type":"string","description":"项目唯一标识符"},"projectName":{"type":"string","description":"项目名称"},"description":{"type":"string","description":"项目描述"},"layout":{"$ref":"#/definitions/Layout","description":"布局配置"},"language":{"type":"string","description":"语言代码 (e.g. zh-CN, en-US)"},"createTime":{"type":"string","description":"创建时间 (ISO 8601)","format":"date-time"},"updateTime":{"type":"string","description":"更新时间 (ISO 8601)","format":"date-time"},"author":{"type":"string","description":"作者"},"extensions":{"type":"object","description":"扩展字段"}},"additionalProperties":false,"description":"项目元信息 包含项目的基本信息、布局配置、语言、创建时间、更新时间、作者和扩展信息。"},"Layout":{"type":"object","properties":{"type":{"type":"string","enum":["free","grid"],"description":"布局类型: free(自由布局) 或 grid(网格布局)"},"config":{"type":"object","properties":{"width":{"type":"number","description":"设计稿宽度","minimum":1,"default":1920},"height":{"type":"number","description":"设计稿高度","minimum":1,"default":1080},"scaleMode":{"type":"string","enum":["aspectFit","fill"],"description":"缩放模式","default":"aspectFit"}},"required":["width","height","scaleMode"],"additionalProperties":false}},"required":["type","config"],"additionalProperties":false,"description":"布局配置"},"ComponentInstance":{"anyOf":[{"$ref":"#/definitions/ViewComponentInstance"},{"$ref":"#/definitions/ContainerComponentInstance"},{"$ref":"#/definitions/LogicComponentInstanceRef"}],"description":"组件实例(view/container/logic 类型)"},"ViewComponentInstance":{"type":"object","properties":{"id":{"type":"string"},"props":{"type":"object"},"style":{"type":"object","additionalProperties":{"$ref":"#/definitions/StyleValue"}},"events":{"$ref":"#/definitions/CICEventMap"},"data":{"$ref":"#/definitions/Data"},"deps":{"type":"array","items":{"type":"string"}},"extensions":{"type":"object"},"role":{"type":"string","const":"view"},"component":{"$ref":"#/definitions/ComponentRef"}},"required":["component","id","role"],"additionalProperties":false},"StyleValue":{"anyOf":[{"type":"string"},{"type":"number"},{"$ref":"#/definitions/Expr"}],"description":"样式值可以是静态或表达式"},"Expr":{"type":"string","description":"通用表达式(用于条件、模板等)"},"CICEventMap":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/definitions/CICEventWithMeta"}},"description":"某组件的所有事件 说明:定义了 CIC 项目中组件的所有事件,包含事件类型、动作、参数、调度顺序、延迟时间和条件。 (key: 事件名, value: 处理逻辑数组)"},"CICEventWithMeta":{"anyOf":[{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"vars"},"action":{"$ref":"#/definitions/VarsAction"},"params":{"$ref":"#/definitions/VarsParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"navigate"},"action":{"type":"string","const":"internal"},"params":{"$ref":"#/definitions/NavigateInternalParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"navigate"},"action":{"type":"string","const":"external"},"params":{"$ref":"#/definitions/NavigateExternalParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"comp"},"action":{"$ref":"#/definitions/CompAction"},"params":{"$ref":"#/definitions/CompParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"toggle"},"action":{"type":"string","const":"visibility"},"params":{"$ref":"#/definitions/ToggleParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"camera"},"action":{"type":"string","const":"focus"},"params":{"$ref":"#/definitions/CameraFocusParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"material"},"action":{"type":"string","const":"change"},"params":{"$ref":"#/definitions/MaterialChangeParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"custom"},"action":{"type":"string","const":"local"},"params":{"$ref":"#/definitions/CustomLocalParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"custom"},"action":{"type":"string","const":"remote"},"params":{"$ref":"#/definitions/CustomRemoteParams"}},"required":["action","order","params","type"]}],"description":"带调度信息"},"EventCondition":{"anyOf":[{"$ref":"#/definitions/KeyCondition"},{"type":"array","items":{"$ref":"#/definitions/KeyCondition"}},{"$ref":"#/definitions/ExpressionCondition"}],"description":"多条件(AND) + 表达式"},"KeyCondition":{"type":"object","properties":{"key":{"type":"string"},"op":{"$ref":"#/definitions/ConditionOperator"},"value":{}},"required":["key"],"additionalProperties":false},"ConditionOperator":{"type":"string","enum":["eq","neq","gt","gte","lt","lte","in","not-in","exists","not-exists"]},"ExpressionCondition":{"type":"object","properties":{"expression":{"type":"string"}},"required":["expression"],"additionalProperties":false,"description":"表达式条件:支持如 \\"ctx.id === 5 && ctx.level > 1\\""},"VarsAction":{"type":"string","enum":["add","update","delete"],"description":"变量事件动作"},"VarsParams":{"type":"object","properties":{"key":{"type":"string"},"value":{},"exclude":{"type":"array","items":{"type":"string"}}},"required":["key","value"],"additionalProperties":false},"NavigateInternalParams":{"type":"object","properties":{"name":{"type":"string"},"params":{"type":"object"}},"required":["name"],"additionalProperties":false},"NavigateExternalParams":{"type":"object","properties":{"url":{"type":"string"},"openNewTab":{"type":"boolean"}},"required":["url"],"additionalProperties":false},"CompAction":{"type":"string","enum":["add","update","delete"],"description":"组件事件动作"},"CompParams":{"type":"object","properties":{"comps":{"type":"array","items":{"type":"string"}},"props":{"type":"object"}},"required":["comps"],"additionalProperties":false},"ToggleParams":{"type":"object","properties":{"show":{"type":"array","items":{"type":"string"}},"hide":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"CameraFocusParams":{"type":"object","properties":{"target":{"type":["string","number"]},"duration":{"type":"number"}},"required":["target"],"additionalProperties":false},"MaterialChangeParams":{"type":"object","properties":{"target":{"type":"string"},"materials":{"type":"string"}},"required":["target","materials"],"additionalProperties":false},"CustomLocalParams":{"type":"object","properties":{"code":{"type":"string"},"depends":{"type":"array","items":{"type":"string"}}},"required":["code"],"additionalProperties":false},"CustomRemoteParams":{"type":"object","properties":{"url":{"type":"string"},"depends":{"type":"array","items":{"type":"string"}}},"required":["url"],"additionalProperties":false},"Data":{"type":"object","properties":{"id":{"type":"string","description":"数据ID"},"mapping":{"$ref":"#/definitions/IMapping","description":"字段映射配置"},"converse":{"$ref":"#/definitions/IConverse","description":"转换规则配置"}},"required":["id"],"additionalProperties":false,"description":"数据配置"},"IMapping":{"type":"object","properties":{"use":{"type":"boolean"},"mapFields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"源字段名"},"mapField":{"type":"string","description":"目标字段名"},"value":{"description":"映射值或公式"},"type":{"type":"string","enum":["copy","const","formula"],"description":"映射类型:默认(普通映射)、copy(复制) const(常量)、formula(公式)"},"description":{"type":"string","description":"描述"}},"required":["field","mapField"],"additionalProperties":false}}},"required":["use","mapFields"],"additionalProperties":false,"description":"字段映射配置"},"IConverse":{"type":"object","properties":{"use":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"转换代码"},"depeedVars":{"type":"array","items":{"type":"string"},"description":"依赖变量列表(用于响应式重执行)"}},"required":["code"],"additionalProperties":false}}},"required":["use","data"],"additionalProperties":false,"description":"转换规则配置"},"ComponentRef":{"anyOf":[{"type":"string"},{"type":"object","properties":{"type":{"type":"string","const":"id"},"value":{"type":"string"}},"required":["type","value"],"additionalProperties":false}],"description":"component 引用:字符串或 object 描述"},"ContainerComponentInstance":{"type":"object","properties":{"id":{"type":"string"},"props":{"type":"object"},"style":{"type":"object","additionalProperties":{"$ref":"#/definitions/StyleValue"}},"events":{"$ref":"#/definitions/CICEventMap"},"data":{"$ref":"#/definitions/Data"},"deps":{"type":"array","items":{"type":"string"}},"extensions":{"type":"object"},"role":{"type":"string","const":"container"},"children":{"type":"array","items":{"$ref":"#/definitions/ComponentInstance"}}},"required":["children","id","role"],"additionalProperties":false},"LogicComponentInstanceRef":{"type":"object","properties":{"id":{"type":"string"},"props":{"type":"object"},"style":{"type":"object","additionalProperties":{"$ref":"#/definitions/StyleValue"}},"events":{"$ref":"#/definitions/CICEventMap"},"data":{"$ref":"#/definitions/Data"},"deps":{"type":"array","items":{"type":"string"}},"extensions":{"type":"object"},"role":{"type":"string","const":"logic"},"component":{"$ref":"#/definitions/LogicRef"}},"required":["component","id","role"],"additionalProperties":false},"LogicRef":{"anyOf":[{"type":"string"},{"type":"object","properties":{"type":{"type":"string","enum":["url","code"]},"value":{"type":"string"}},"required":["type","value"],"additionalProperties":false}]},"DataSourceItem":{"anyOf":[{"$ref":"#/definitions/DataSourceRest"},{"$ref":"#/definitions/DataSourceWebSocket"},{"$ref":"#/definitions/DataSourceStatic"},{"$ref":"#/definitions/DataSourceFunction"}],"description":"数据源项(rest/websocket/static/function 类型)"},"DataSourceRest":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"rest"},"order":{"type":"number"},"pollInterval":{"$ref":"#/definitions/Milliseconds"},"transform":{"anyOf":[{"type":"string"},{"$comment":"(res: any) => any","type":"object","properties":{"namedArgs":{"type":"object","properties":{"res":{}},"required":["res"],"additionalProperties":false}}}]},"url":{"type":"string"},"method":{"type":"string","enum":["GET","POST","PUT","DELETE"]},"headers":{"type":"object","additionalProperties":{"type":"string"}},"params":{"type":"object"},"body":{},"timeout":{"$ref":"#/definitions/Milliseconds"}},"required":["id","method","type","url"],"additionalProperties":false},"Milliseconds":{"type":"number"},"DataSourceWebSocket":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"websocket"},"order":{"type":"number"},"pollInterval":{"$ref":"#/definitions/Milliseconds"},"transform":{"anyOf":[{"type":"string"},{"$comment":"(res: any) => any","type":"object","properties":{"namedArgs":{"type":"object","properties":{"res":{}},"required":["res"],"additionalProperties":false}}}]},"url":{"type":"string"},"protocols":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"subscribeMessage":{},"heartbeat":{"type":"object","properties":{"interval":{"$ref":"#/definitions/Milliseconds"},"message":{}},"required":["interval","message"],"additionalProperties":false}},"required":["id","type","url"],"additionalProperties":false},"DataSourceStatic":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"static"},"order":{"type":"number"},"pollInterval":{"$ref":"#/definitions/Milliseconds"},"transform":{"anyOf":[{"type":"string"},{"$comment":"(res: any) => any","type":"object","properties":{"namedArgs":{"type":"object","properties":{"res":{}},"required":["res"],"additionalProperties":false}}}]},"value":{}},"required":["id","type","value"],"additionalProperties":false},"DataSourceFunction":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"function"},"order":{"type":"number"},"pollInterval":{"$ref":"#/definitions/Milliseconds"},"transform":{"anyOf":[{"type":"string"},{"$comment":"(res: any) => any","type":"object","properties":{"namedArgs":{"type":"object","properties":{"res":{}},"required":["res"],"additionalProperties":false}}}]},"code":{"type":"string"},"timeout":{"$ref":"#/definitions/Milliseconds"}},"required":["code","id","type"],"additionalProperties":false},"Registry":{"type":"object","properties":{"components":{"type":"array","items":{"$ref":"#/definitions/RegistryComponents"}},"plugins":{"type":"object","description":"插件后期可扩展"}},"additionalProperties":false,"description":"注册表"},"RegistryComponents":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"version":{"type":"string"},"author":{"type":"string"},"defaultProps":{"type":"object"},"data":{},"deps":{"type":"array","items":{"type":"string"}}},"required":["id"],"additionalProperties":false,"description":"注册中心组件项 说明:定义了 CIC 项目中组件注册中心的组件项,包含组件 ID、类型和配置。"},"Variables":{"type":"object","properties":{"global":{"$ref":"#/definitions/VariablesMap","description":"全局变量,对所有页面和组件均生效。"},"page":{"type":"object","additionalProperties":{"$ref":"#/definitions/VariablesMap"},"description":"页面级变量,键为页面 ID,值为该页面的变量映射。"},"component":{"type":"object","additionalProperties":{"$ref":"#/definitions/VariablesMap"},"description":"组件级变量,键为组件 ID,值为该组件的变量映射。"}},"additionalProperties":false,"description":"变量集合,按作用域组织:global/page/component。"},"VariablesMap":{"type":"object","additionalProperties":{"$ref":"#/definitions/Variable"},"description":"变量映射,键为变量名,值为变量定义。"},"Variable":{"anyOf":[{"$ref":"#/definitions/StringVariable"},{"$ref":"#/definitions/NumberVariable"},{"$ref":"#/definitions/BooleanVariable"},{"$ref":"#/definitions/ArrayVariable"},{"$ref":"#/definitions/FunctionVariable"},{"$ref":"#/definitions/ObjectVariable"}],"description":"变量联合类型,涵盖五类变量定义。"},"StringVariable":{"type":"object","properties":{"description":{"type":"string"},"extensions":{"type":"object","additionalProperties":{}},"type":{"type":"string","const":"string"},"value":{"type":"string"},"default":{"type":"string"}},"required":["type","value","default"],"additionalProperties":false,"description":"字符串变量,包含当前值与默认值,可选描述。"},"NumberVariable":{"type":"object","properties":{"description":{"type":"string"},"extensions":{"type":"object","additionalProperties":{}},"type":{"type":"string","const":"number"},"value":{"type":"number"},"default":{"type":"number"}},"required":["type","value","default"],"additionalProperties":false,"description":"数字变量,包含当前值与默认值,可选描述。"},"BooleanVariable":{"type":"object","properties":{"description":{"type":"string"},"extensions":{"type":"object","additionalProperties":{}},"type":{"type":"string","const":"boolean"},"value":{"type":"boolean"},"default":{"type":"boolean"}},"required":["type","value","default"],"additionalProperties":false,"description":"布尔变量,包含当前值与默认值,可选描述。"},"ArrayVariable":{"type":"object","properties":{"description":{"type":"string"},"extensions":{"type":"object","additionalProperties":{}},"type":{"type":"string","const":"array"},"value":{"type":"array","items":{}},"default":{"type":"array","items":{}}},"required":["type","value","default"],"additionalProperties":false,"description":"数组变量,元素类型不做限制,包含当前值与默认值,可选描述。"},"FunctionVariable":{"type":"object","properties":{"description":{"type":"string"},"extensions":{"type":"object","additionalProperties":{}},"type":{"type":"string","const":"function"},"value":{"type":"string"},"default":{"type":"string"},"args":{"type":"array","items":{"type":"string"}}},"required":["type","value","default"],"additionalProperties":false,"description":"函数变量,以字符串保存函数实现;支持 `args` 指定入参名列表。"},"ObjectVariable":{"type":"object","properties":{"description":{"type":"string"},"extensions":{"type":"object","additionalProperties":{}},"type":{"type":"string","const":"object"},"value":{"type":"object","additionalProperties":{"$ref":"#/definitions/Variable"}},"default":{"type":"object","additionalProperties":{"$ref":"#/definitions/Variable"}}},"required":["type","value","default"],"additionalProperties":false,"description":"对象变量,键到变量的映射;支持递归嵌套。"},"Dependency":{"anyOf":[{"$ref":"#/definitions/JSDependency"},{"$ref":"#/definitions/CSSDependency"},{"$ref":"#/definitions/FontDependency"},{"$ref":"#/definitions/ImageDependency"},{"$ref":"#/definitions/JSONDependency"},{"$ref":"#/definitions/WasmDependency"},{"$ref":"#/definitions/OtherDependency"}],"description":"依赖项"},"JSDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,可以是绝对地址或相对地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"anyOf":[{"type":"boolean"},{"type":"string","const":"module"},{"type":"string","const":"style"}],"description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"type":{"type":"string","const":"js"},"format":{"$ref":"#/definitions/JSFormat"},"crossOrigin":{"type":"string","enum":["anonymous","use-credentials"]},"module":{"type":"boolean"}},"required":["format","id","type"],"additionalProperties":false,"description":"JS 资源"},"JSFormat":{"type":"string","enum":["esm","umd","iife","cjs"],"description":"JS 格式"},"CSSDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,可以是绝对地址或相对地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"anyOf":[{"type":"boolean"},{"type":"string","const":"module"},{"type":"string","const":"style"}],"description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"type":{"type":"string","const":"css"},"media":{"type":"string"}},"required":["id","type"],"additionalProperties":false,"description":"CSS"},"FontDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,可以是绝对地址或相对地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"anyOf":[{"type":"boolean"},{"type":"string","const":"module"},{"type":"string","const":"style"}],"description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"type":{"type":"string","const":"font"},"family":{"type":"string"},"weight":{"type":["number","string"]},"style":{"type":"string","enum":["normal","italic"]}},"required":["id","type"],"additionalProperties":false,"description":"字体"},"ImageDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,可以是绝对地址或相对地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"anyOf":[{"type":"boolean"},{"type":"string","const":"module"},{"type":"string","const":"style"}],"description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"type":{"type":"string","const":"image"},"mime":{"type":"string"}},"required":["id","type"],"additionalProperties":false,"description":"图片"},"JSONDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,可以是绝对地址或相对地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"anyOf":[{"type":"boolean"},{"type":"string","const":"module"},{"type":"string","const":"style"}],"description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"type":{"type":"string","const":"json"}},"required":["id","type"],"additionalProperties":false,"description":"JSON"},"WasmDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,可以是绝对地址或相对地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"anyOf":[{"type":"boolean"},{"type":"string","const":"module"},{"type":"string","const":"style"}],"description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"type":{"type":"string","const":"wasm"},"init":{"type":"string","enum":["async","sync"]}},"required":["id","type"],"additionalProperties":false,"description":"WASM"},"OtherDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,可以是绝对地址或相对地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"anyOf":[{"type":"boolean"},{"type":"string","const":"module"},{"type":"string","const":"style"}],"description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"type":{"type":"string","const":"other"},"kind":{"type":"string"}},"required":["id","type"],"additionalProperties":false,"description":"其他"}}')},ce={REQUIRED:"required",TYPE:"type",ENUM:"enum",CONST:"const",ADDITIONAL:"additionalProperties",ANY_OF:"anyOf"},Pe={TYPE:"/type",VALUE:"/value",DEFAULT:"/default",ARGS:"/args"},Ce={missing:e=>`缺少必填字段:${e}`,type:e=>`类型必须为:${e}`,enum:e=>`取值必须为枚举之一:${e.join(", ")}`,constOne:e=>`取值必须为:${JSON.stringify(e)}`,additionalProp:e=>`不允许额外字段:${e}`},ui=[{rootPattern:/(\/|^)components\/\d+/,discriminator:"role",keepRequired:["role","id"]},{rootPattern:/(\/|^)global\/[^\/]+$/,discriminator:"type",keepRequired:["type"]},{rootPattern:/(\/|^)page\/[^\/]+\/[^\/]+$/,discriminator:"type",keepRequired:["type"]},{rootPattern:/(\/|^)component\/[^\/]+\/[^\/]+$/,discriminator:"type",keepRequired:["type"]},{rootPattern:/(\/|^)dataSources\/\d+/,discriminator:"type",keepRequired:["type","id"]}],Ve=e=>typeof e=="number"&&Number.isFinite(e)&&e>0,tr=()=>{const e=globalThis;if(e?.crypto?.randomUUID)return e.crypto.randomUUID();if(e?.crypto?.getRandomValues){const t=new Uint8Array(16);e.crypto.getRandomValues(t),t[6]=t[6]&15|64,t[8]=t[8]&63|128;const r=Array.from(t,i=>i.toString(16).padStart(2,"0"));return`${r.slice(0,4).join("")}-${r.slice(4,6).join("")}-${r.slice(6,8).join("")}-${r.slice(8,10).join("")}-${r.slice(10).join("")}`}return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=Math.random()*16|0;return(t==="x"?r:r&3|8).toString(16)})},ee=e=>{if(!Array.isArray(e))return[];const t=h=>{const a=h.instancePath||h.path||"",u=h.keyword,n=h.params||{};let c=h.message||"";switch(u){case ce.REQUIRED:n.missingProperty&&(c=Ce.missing(n.missingProperty));break;case ce.TYPE:h.schema&&(c=Ce.type(h.schema));break;case ce.ENUM:Array.isArray(n.allowedValues)&&(c=Ce.enum(n.allowedValues));break;case ce.CONST:c=n.allowedValue!==void 0?Ce.constOne(n.allowedValue):"必须等于常量";break;case ce.ADDITIONAL:n.additionalProperty&&(c=Ce.additionalProp(n.additionalProperty));break}return{path:a,message:c,keyword:u,params:n}},r=e.map(t),i=[],g=new Map,s=new Set;for(const h of r)if(h.keyword===ce.CONST&&h.path.endsWith(Pe.TYPE)){const a=h.path,u=g.get(a)||{path:h.path,values:[]},n=h.params?.allowedValue;n!==void 0&&!u.values.includes(n)&&u.values.push(n),g.set(a,u)}else i.push(h);for(const[,h]of g)if(h.values.length<=1)h.values.length===1&&i.push({path:h.path,keyword:ce.CONST,params:{allowedValue:h.values[0]},message:Ce.constOne(h.values[0])});else{const a=h.path.replace(new RegExp(`${Pe.TYPE}$`),"");s.add(a)}const l=i,d=new Set,f=[];for(const h of l){const a=`${h.keyword}|${h.path}|${JSON.stringify(h.params??{})}`;d.has(a)||(d.add(a),f.push(h))}const w=new Map,$=h=>{if(!h)return"";const a=h.match(new RegExp(`^(.*?)(?:${Pe.TYPE}|${Pe.VALUE}|${Pe.DEFAULT}|${Pe.ARGS})(?:$|\\/)`));return a?a[1]:h};for(const h of f){const a=$(h.path),u=w.get(a)||[];u.push(h),w.set(a,u)}const E=[];for(const[h,a]of w.entries()){const u=ui.find(c=>c.rootPattern.test(h));if(u&&a.some(y=>y.keyword===ce.REQUIRED&&y.params?.missingProperty===u.discriminator)){for(const y of a)y.keyword===ce.REQUIRED&&u.keepRequired.includes(y.params?.missingProperty)&&E.push(y);continue}if(!s.has(h)){E.push(...a);continue}for(const c of a){const y=c.keyword===ce.TYPE&&(c.path===`${h}${Pe.VALUE}`||c.path===`${h}${Pe.DEFAULT}`),o=c.keyword===ce.ADDITIONAL&&c.path===h;y||o||E.push(c)}}const v=E.some(h=>h.keyword!==ce.ANY_OF)?E.filter(h=>h.keyword!==ce.ANY_OF):E,b=h=>{if(h.keyword===ce.REQUIRED){const a=h.params?.missingProperty;return a==="type"||a==="role"?0:a==="id"?1:2}return 3};return v.sort((h,a)=>b(h)-b(a))},he=(e,t)=>{if(!t||typeof t!="object")return e;const r=e??{};for(const i of Object.keys(t))(!(i in r)||r[i]===void 0)&&(r[i]=t[i]);return r},Se=(e,t)=>t?.length?t.map(r=>({...r,path:`${e}${r.path?`.${r.path}`:""}`})):[],rr=e=>{try{return{ok:!0,value:JSON.parse(e)}}catch(t){return{ok:!1,errors:[{path:"",keyword:"type",message:`JSON 解析失败:${t?.message??String(t)}`}]}}},li=e=>e.map(t=>({path:"",keyword:"required",params:{missingProperty:t},message:`缺少必填字段:${t}`})),Dn=({input:e,normalize:t,base:r,branches:i,key:g,missingKeys:s,onSuccess:l})=>{const d=t?t(e):e,f=d;if(f&&typeof f=="object"&&typeof f[g]=="string"){const w=i[f[g]];if(w)return w(f)?l(f):{ok:!1,errors:ee(w.errors)}}return r(d)?l(d):!f||typeof f[g]!="string"?{ok:!1,errors:li(s)}:{ok:!1,errors:ee(r.errors)}},nr=(e,t,r,i)=>Dn({input:e,base:t,branches:r,key:i,missingKeys:[i,"id"],onSuccess:()=>({ok:!0,value:null})}),sr=(e,t,r,i,g,s,l=[s,"id"])=>Dn({input:e,normalize:d=>r(d,t),base:i,branches:g,key:s,missingKeys:l,onSuccess:d=>({ok:!0,value:d})});let Ct=null;const Tn=()=>(Ct||(Ct=new si({allErrors:!0,strict:!1}),di(Ct)),Ct),Mn=new Map,fi=JSON.stringify(Ae),pi={CICPage:["#/definitions/CICPage","#/$defs/CICPage","#/properties/pages/items","#/definitions/CICConfig/properties/pages/items"],Meta:["#/definitions/Meta","#/$defs/Meta","#/properties/meta"],Layout:["#/definitions/Layout","#/$defs/Layout","#/properties/meta/properties/layout"],ComponentInstance:["#/definitions/ComponentInstance","#/$defs/ComponentInstance"],ViewComponentInstance:["#/definitions/ViewComponentInstance","#/$defs/ViewComponentInstance"],ContainerComponentInstance:["#/definitions/ContainerComponentInstance","#/$defs/ContainerComponentInstance"],LogicComponentInstanceRef:["#/definitions/LogicComponentInstanceRef","#/$defs/LogicComponentInstanceRef"],DataSourceItem:["#/definitions/DataSourceItem","#/$defs/DataSourceItem"],DataSourceRest:["#/definitions/DataSourceRest","#/$defs/DataSourceRest"],DataSourceWebSocket:["#/definitions/DataSourceWebSocket","#/$defs/DataSourceWebSocket"],DataSourceStatic:["#/definitions/DataSourceStatic","#/$defs/DataSourceStatic"],DataSourceFunction:["#/definitions/DataSourceFunction","#/$defs/DataSourceFunction"],RegistryComponents:["#/definitions/RegistryComponents","#/$defs/RegistryComponents"],Variables:["#/definitions/Variables","#/$defs/Variables","#/properties/variables"],Dependency:["#/definitions/Dependency","#/$defs/Dependency"],JSDependency:["#/definitions/JSDependency","#/$defs/JSDependency"],CSSDependency:["#/definitions/CSSDependency","#/$defs/CSSDependency"],FontDependency:["#/definitions/FontDependency","#/$defs/FontDependency"],ImageDependency:["#/definitions/ImageDependency","#/$defs/ImageDependency"],JSONDependency:["#/definitions/JSONDependency","#/$defs/JSONDependency"],WasmDependency:["#/definitions/WasmDependency","#/$defs/WasmDependency"],OtherDependency:["#/definitions/OtherDependency","#/$defs/OtherDependency"],LayoutConfig:["#/definitions/Layout","#/properties/meta/properties/layout"]},mi=(e,t)=>e.compile({$ref:t,definitions:Ae.definitions,properties:Ae.properties}),te=e=>{const t=Tn(),r=`type:${e}::${fi}`,i=Mn.get(r);if(i)return i;const g=pi[e]||[`#/definitions/${e}`,`#/$defs/${e}`];for(const s of g)try{const l=mi(t,s);return Mn.set(r,l),l}catch{}throw new Error(`VALIDATOR_REF_NOT_FOUND:${e}`)},An=te("DataSourceItem"),Vn=te("DataSourceRest"),zn=te("DataSourceWebSocket"),Fn=te("DataSourceStatic"),Ln=te("DataSourceFunction"),hi=(e,t)=>{const r={...e};return t?.generateId&&!r.id&&(r.id=tr()),r.type&&(r.type==="rest"?(t?.strict||("pollInterval"in r&&Ve(r.pollInterval)&&(r.pollInterval=Math.round(r.pollInterval)),"timeout"in r&&Ve(r.timeout)&&(r.timeout=Math.round(r.timeout))),he(r,t?.defaults)):r.type==="websocket"?(r.heartbeat&&typeof r.heartbeat=="object"&&(t?.strict||"interval"in r.heartbeat&&Ve(r.heartbeat.interval)&&(r.heartbeat.interval=Math.round(r.heartbeat.interval))),t?.strict||"pollInterval"in r&&Ve(r.pollInterval)&&(r.pollInterval=Math.round(r.pollInterval)),he(r,t?.defaults)):r.type==="static"?t?.strict||he(r,t?.defaults):r.type==="function"&&(t?.strict||"timeout"in r&&Ve(r.timeout)&&(r.timeout=Math.round(r.timeout)),t?.strict||he(r,t?.defaults))),r},yi=e=>nr(e,An,{rest:Vn,websocket:zn,static:Fn,function:Ln},"type"),Un=(e,t)=>sr(e,t,hi,An,{rest:Vn,websocket:zn,static:Fn,function:Ln},"type",["type","id"]),Kn=te("ComponentInstance"),Jn=te("ViewComponentInstance"),Hn=te("ContainerComponentInstance"),Gn=te("LogicComponentInstanceRef"),gi=(e,t)=>{const r={...e};return t?.generateId&&!r.id&&(r.id=tr()),t?.strict||(r.role==="view"?delete r.children:r.role==="container"?delete r.component:r.role==="logic"&&delete r.children),he(r,t?.defaults),r},vi=e=>nr(e,Kn,{view:Jn,container:Hn,logic:Gn},"role"),Wn=(e,t)=>sr(e,t,gi,Kn,{view:Jn,container:Hn,logic:Gn},"role",["role","id"]),qt=te("CICPage"),_i=(e,t)=>{const r={...e};return t?.generateId&&!r.id&&(r.id=tr()),t?.strict||he(r,t?.defaults),r},$i=e=>qt(e)?{ok:!0,value:null}:{ok:!1,errors:ee(qt.errors||[])},Bn=(e,t)=>{const r=_i(e,t);return qt(r)?{ok:!0,value:r}:{ok:!1,errors:ee(qt.errors||[])}},Dt=te("Meta"),Tt=te("Layout"),bi=e=>Dt(e)?{ok:!0,value:null}:{ok:!1,errors:ee(Dt.errors||[])},wi=e=>Tt(e)?{ok:!0,value:null}:{ok:!1,errors:ee(Tt.errors||[])},Yn=(e,t)=>{const r=t?.strict?e:he(e,t?.defaults);return Dt(r)?{ok:!0,value:r}:{ok:!1,errors:ee(Dt.errors||[])}},xn=(e,t)=>{const r=t?.strict?e:he(e,t?.defaults);return Tt(r)?{ok:!0,value:r}:{ok:!1,errors:ee(Tt.errors||[])}},Mt=te("Variables"),Pi=e=>Mt(e)?{ok:!0,value:null}:{ok:!1,errors:ee(Mt.errors||[])},Qn=(e,t)=>{const r=t?.strict?e:he(e,t?.defaults);return Mt(r)?{ok:!0,value:r}:{ok:!1,errors:ee(Mt.errors||[])}},Zn=te("Dependency"),Xn=te("JSDependency"),es=te("CSSDependency"),ts=te("FontDependency"),rs=te("ImageDependency"),ns=te("JSONDependency"),ss=te("WasmDependency"),is=te("OtherDependency"),Si=e=>nr(e,Zn,{js:Xn,css:es,font:ts,image:rs,json:ns,wasm:ss,other:is},"type"),os=(e,t)=>sr(e,t,(i,g)=>g?.strict?i:he(i,g?.defaults),Zn,{js:Xn,css:es,font:ts,image:rs,json:ns,wasm:ss,other:is},"type",["type","id"]),At=te("RegistryComponents"),Ei=e=>At(e)?{ok:!0,value:null}:{ok:!1,errors:ee(At.errors||[])},as=(e,t)=>{const r=t?.strict?e:he(e,t?.defaults);return At(r)?{ok:!0,value:r}:{ok:!1,errors:ee(At.errors||[])}};let Vt,cs;const ki=()=>{const e=Tn(),t=JSON.stringify(Ae);(!Vt||cs!==t)&&(Vt=e.compile(Ae),cs=t)},zt=e=>{try{return ki(),Vt(e)?{ok:!0,value:null}:{ok:!1,errors:ee(Vt.errors||[])}}catch(t){const r=[{path:"",message:t?.message||String(t),keyword:"anyOf",params:{}}];return{ok:!1,errors:ee(r)}}},ji=(e,t)=>{if(e&&typeof e=="object")return ze(e,t);const r=(e||"").trim();if(!(r.startsWith("{")||r.startsWith("[")))return{ok:!1,errors:ee([{path:"",message:"非 JSON 字符串输入,请使用 importCICAsync(pathOrUrl) 进行路径/URL 导入",keyword:"type",params:{}}])};const g=rr(r);return g.ok?ze(g.value,t):{ok:!1,errors:g.errors}},Ri=async(e,t)=>{if(e&&typeof e=="object")return ze(e,t);const r=(e||"").trim();if(r.startsWith("{")||r.startsWith("[")){const s=rr(r);return s.ok?ze(s.value,t):{ok:!1,errors:s.errors}}if(!(typeof globalThis.fetch=="function"))return{ok:!1,errors:ee([{path:"",message:"当前环境不支持路径/URL 导入(缺少 fetch),请传入 JSON 字符串或对象",keyword:"type",params:{}}])};if(/^file:\/\//i.test(r))return{ok:!1,errors:ee([{path:"",message:"不支持 file:// 方案,请使用 http(s) 或相对/绝对路径(同源)",keyword:"type",params:{}}])};try{const s=await globalThis.fetch(r);if(!s||!s.ok){const f=[{path:"",message:`网络或资源错误:${s?.status} ${s?.statusText||""}`.trim(),keyword:"type",params:{}}];return{ok:!1,errors:ee(f)}}const l=await s.text(),d=rr(l);return d.ok?ze(d.value,t):{ok:!1,errors:d.errors}}catch(s){const l=[{path:"",message:`请求失败:${s?.message||s}`,keyword:"type",params:{}}];return{ok:!1,errors:ee(l)}}},Ii=e=>{const t=zt(e);if(!t.ok)return{ok:!1,errors:t.errors};const r={version:e.version,meta:e.meta,pages:e.pages,registry:e.registry,variables:e.variables,deps:e.deps,extensions:e.extensions};return{ok:!0,value:JSON.stringify(r,null,2)}},ze=(e,t)=>{const r=typeof e=="object"?{...e}:e,i=[];if(!r||typeof r!="object")return i.push({path:"",message:"配置必须为对象",keyword:"type",params:{schema:"object"}}),{ok:!1,errors:ee(i)};if(r.version||i.push({path:"/version",message:"缺少必填字段:version",keyword:"required",params:{missingProperty:"version"}}),r.meta||i.push({path:"/meta",message:"缺少必填字段:meta",keyword:"required",params:{missingProperty:"meta"}}),r.pages||i.push({path:"/pages",message:"缺少必填字段:pages",keyword:"required",params:{missingProperty:"pages"}}),i.length)return{ok:!1,errors:ee(i)};const g=Yn(r.meta,t?.meta);if(g.ok||i.push(...Se("/meta",g.errors)),r.meta?.layout){const l=xn(r.meta.layout,t?.layout);l.ok?r.meta.layout=l.value:i.push(...Se("/meta/layout",l.errors))}if(g.ok&&(r.meta=g.value),r.variables){const l=Qn(r.variables,t?.variables);l.ok?r.variables=l.value:i.push(...Se("/variables",l.errors))}if(r.registry?.components){const l=[];for(let d=0;d<r.registry.components.length;d++){const f=as(r.registry.components[d],t?.registry);f.ok?l.push(f.value):i.push(...Se(`/registry/components[${d}]`,f.errors))}r.registry.components=l}if(r.deps){const l=[];for(let d=0;d<r.deps.length;d++){const f=os(r.deps[d],t?.dependency);f.ok?l.push(f.value):i.push(...Se(`/deps[${d}]`,f.errors))}r.deps=l}if(Array.isArray(r.pages)){const l=[];for(let d=0;d<r.pages.length;d++){const f=r.pages[d],w=Bn(f,t?.page);if(!w.ok){i.push(...Se(`/pages[${d}]`,w.errors));continue}const $=w.value;if(Array.isArray(f.components)){const E=[];for(let _=0;_<f.components.length;_++){const v=Wn(f.components[_],t?.component);v.ok?E.push(v.value):i.push(...Se(`/pages[${d}]/components[${_}]`,v.errors))}$.components=E}if(Array.isArray(f.dataSources)){const E=[];for(let _=0;_<f.dataSources.length;_++){const v=Un(f.dataSources[_],t?.dataSource);v.ok?E.push(v.value):i.push(...Se(`/pages[${d}]/dataSources[${_}]`,v.errors))}$.dataSources=E}l.push($)}r.pages=l}if(i.length)return{ok:!1,errors:ee(i)};const s=zt(r);return s.ok?{ok:!0,value:r}:{ok:!1,errors:s.errors}};class ir{config;constructor(t){const r=zt(t);if(!r.ok)throw new Error(`Invalid CIC Configuration: ${JSON.stringify(r.errors)}`);this.config=t}getConfig(){return this.config}findComponent(t){let r;return this.walkComponents(i=>i.id===t?(r=i,!1):!0),r}findPageByComponent(t){let r;return this.walkComponents((i,g)=>i.id===t?(r=g,!1):!0),r}getVariable(t,r){const i=this.config.variables;if(i){if(t.componentId&&i.component&&i.component[t.componentId]){const g=i.component[t.componentId][r];if(g)return g.value??g.default}if(t.pageId&&i.page&&i.page[t.pageId]){const g=i.page[t.pageId][r];if(g)return g.value??g.default}if(i.global&&i.global[r]){const g=i.global[r];return g.value??g.default}}}getVariableByRef(t){const r=t.match(/^(global|page|component)(?::([^\.]+))?\.(.+)$/);if(!r)return;const[,i,g,s]=r;if(i==="global")return this.getVariable({},s);if(i==="page")return this.getVariable({pageId:g},s);if(i==="component")return this.getVariable({componentId:g},s)}walkComponents(t){if(this.config.pages)for(const r of this.config.pages){const i=[];for(const s of r.components||[])i.push({node:s});let g=!1;for(;i.length>0&&!g;){const{node:s,parent:l}=i.pop();if(t(s,r,l)===!1){g=!0;break}if(s.children&&s.children.length>0)for(let f=s.children.length-1;f>=0;f--)i.push({node:s.children[f],parent:s})}if(g)break}}static getValueByPath(t,r,i){if(t==null||!r)return i;const g=[];r.replace(/\[(\d+)\]/g,".$1").split(".").forEach(l=>{l.trim()&&g.push(l.trim())});let s=t;for(const l of g){if(s==null)return i;s=s[l]}return s===void 0?i:s}static traverseTree(t,r,i){const g=Array.isArray(t)?t:[t];for(const s of g)r(s,i)!==!1&&s.children&&s.children.length>0&&ir.traverseTree(s.children,r,s)}static createDataSource=Un;static validateDataSource=yi;static createComponent=Wn;static validateComponent=vi;static createPage=Bn;static validatePage=$i;static createMeta=Yn;static createLayout=xn;static validateMeta=bi;static validateLayout=wi;static createVariables=Qn;static validateVariables=Pi;static createDependency=os;static validateDependency=Si;static createRegistryComponent=as;static validateRegistryComponent=Ei;static importCIC=ji;static exportCIC=Ii;static validateCIC=zt;static importCICAsync=Ri}Re.CICSDK=ir,Object.defineProperty(Re,Symbol.toStringTag,{value:"Module"})}));
|