@faulpeltz/dertunnel 0.7.12 → 0.7.14
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/dertunnel-client.js +74 -74
- package/index.js +6 -6
- package/package.json +1 -1
package/dertunnel-client.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";var cv=Object.create;var lc=Object.defineProperty;var hv=Object.getOwnPropertyDescriptor;var dv=Object.getOwnPropertyNames;var fv=Object.getPrototypeOf,pv=Object.prototype.hasOwnProperty;var d=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var mv=(r,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of dv(e))!pv.call(r,i)&&i!==t&&lc(r,i,{get:()=>e[i],enumerable:!(s=hv(e,i))||s.enumerable});return r};var Y=(r,e,t)=>(t=r!=null?cv(fv(r)):{},mv(e||!r||!r.__esModule?lc(t,"default",{value:r,enumerable:!0}):t,r));var Br=d(D=>{"use strict";Object.defineProperty(D,"__esModule",{value:!0});D.regexpCode=D.getEsmExportName=D.getProperty=D.safeStringify=D.stringify=D.strConcat=D.addCodeArg=D.str=D._=D.nil=D._Code=D.Name=D.IDENTIFIER=D._CodeOrName=void 0;var Gr=class{};D._CodeOrName=Gr;D.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Ft=class extends Gr{constructor(e){if(super(),!D.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};D.Name=Ft;var Pe=class extends Gr{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((t,s)=>`${t}${s}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,s)=>(s instanceof Ft&&(t[s.str]=(t[s.str]||0)+1),t),{})}};D._Code=Pe;D.nil=new Pe("");function Ic(r,...e){let t=[r[0]],s=0;for(;s<e.length;)Vn(t,e[s]),t.push(r[++s]);return new Pe(t)}D._=Ic;var Ln=new Pe("+");function Ac(r,...e){let t=[zr(r[0])],s=0;for(;s<e.length;)t.push(Ln),Vn(t,e[s]),t.push(Ln,zr(r[++s]));return Tv(t),new Pe(t)}D.str=Ac;function Vn(r,e){e instanceof Pe?r.push(...e._items):e instanceof Ft?r.push(e):r.push(Av(e))}D.addCodeArg=Vn;function Tv(r){let e=1;for(;e<r.length-1;){if(r[e]===Ln){let t=Pv(r[e-1],r[e+1]);if(t!==void 0){r.splice(e-1,3,t);continue}r[e++]="+"}e++}}function Pv(r,e){if(e==='""')return r;if(r==='""')return e;if(typeof r=="string")return e instanceof Ft||r[r.length-1]!=='"'?void 0:typeof e!="string"?`${r.slice(0,-1)}${e}"`:e[0]==='"'?r.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(r instanceof Ft))return`"${r}${e.slice(1)}`}function Iv(r,e){return e.emptyStr()?r:r.emptyStr()?e:Ac`${r}${e}`}D.strConcat=Iv;function Av(r){return typeof r=="number"||typeof r=="boolean"||r===null?r:zr(Array.isArray(r)?r.join(","):r)}function Cv(r){return new Pe(zr(r))}D.stringify=Cv;function zr(r){return JSON.stringify(r).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}D.safeStringify=zr;function Rv(r){return typeof r=="string"&&D.IDENTIFIER.test(r)?new Pe(`.${r}`):Ic`[${r}]`}D.getProperty=Rv;function Nv(r){if(typeof r=="string"&&D.IDENTIFIER.test(r))return new Pe(`${r}`);throw new Error(`CodeGen: invalid export name: ${r}, use explicit $id name mapping`)}D.getEsmExportName=Nv;function qv(r){return new Pe(r.toString())}D.regexpCode=qv});var Hn=d(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.ValueScope=we.ValueScopeName=we.Scope=we.varKinds=we.UsedValueState=void 0;var be=Br(),Fn=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},Qs;(function(r){r[r.Started=0]="Started",r[r.Completed=1]="Completed"})(Qs||(we.UsedValueState=Qs={}));we.varKinds={const:new be.Name("const"),let:new be.Name("let"),var:new be.Name("var")};var ei=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof be.Name?e:this.name(e)}name(e){return new be.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,s;if(!((s=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||s===void 0)&&s.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};we.Scope=ei;var ti=class extends be.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:s}){this.value=e,this.scopePath=(0,be._)`.${new be.Name(t)}[${s}]`}};we.ValueScopeName=ti;var kv=(0,be._)`\n`,Un=class extends ei{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?kv:be.nil}}get(){return this._scope}name(e){return new ti(e,this._newName(e))}value(e,t){var s;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(e),{prefix:n}=i,o=(s=t.key)!==null&&s!==void 0?s:t.ref,a=this._values[n];if(a){let c=a.get(o);if(c)return c}else a=this._values[n]=new Map;a.set(o,i);let u=this._scope[n]||(this._scope[n]=[]),l=u.length;return u[l]=t.ref,i.setValue(t,{property:n,itemIndex:l}),i}getValue(e,t){let s=this._values[e];if(s)return s.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,s=>{if(s.scopePath===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return(0,be._)`${e}${s.scopePath}`})}scopeCode(e=this._values,t,s){return this._reduceValues(e,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},t,s)}_reduceValues(e,t,s={},i){let n=be.nil;for(let o in e){let a=e[o];if(!a)continue;let u=s[o]=s[o]||new Map;a.forEach(l=>{if(u.has(l))return;u.set(l,Qs.Started);let c=t(l);if(c){let h=this.opts.es5?we.varKinds.var:we.varKinds.const;n=(0,be._)`${n}${h} ${l} = ${c};${this.opts._n}`}else if(c=i?.(l))n=(0,be._)`${n}${c}${this.opts._n}`;else throw new Fn(l);u.set(l,Qs.Completed)})}return n}};we.ValueScope=Un});var T=d(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});A.or=A.and=A.not=A.CodeGen=A.operators=A.varKinds=A.ValueScopeName=A.ValueScope=A.Scope=A.Name=A.regexpCode=A.stringify=A.getProperty=A.nil=A.strConcat=A.str=A._=void 0;var q=Br(),Ve=Hn(),Ot=Br();Object.defineProperty(A,"_",{enumerable:!0,get:function(){return Ot._}});Object.defineProperty(A,"str",{enumerable:!0,get:function(){return Ot.str}});Object.defineProperty(A,"strConcat",{enumerable:!0,get:function(){return Ot.strConcat}});Object.defineProperty(A,"nil",{enumerable:!0,get:function(){return Ot.nil}});Object.defineProperty(A,"getProperty",{enumerable:!0,get:function(){return Ot.getProperty}});Object.defineProperty(A,"stringify",{enumerable:!0,get:function(){return Ot.stringify}});Object.defineProperty(A,"regexpCode",{enumerable:!0,get:function(){return Ot.regexpCode}});Object.defineProperty(A,"Name",{enumerable:!0,get:function(){return Ot.Name}});var ni=Hn();Object.defineProperty(A,"Scope",{enumerable:!0,get:function(){return ni.Scope}});Object.defineProperty(A,"ValueScope",{enumerable:!0,get:function(){return ni.ValueScope}});Object.defineProperty(A,"ValueScopeName",{enumerable:!0,get:function(){return ni.ValueScopeName}});Object.defineProperty(A,"varKinds",{enumerable:!0,get:function(){return ni.varKinds}});A.operators={GT:new q._Code(">"),GTE:new q._Code(">="),LT:new q._Code("<"),LTE:new q._Code("<="),EQ:new q._Code("==="),NEQ:new q._Code("!=="),NOT:new q._Code("!"),OR:new q._Code("||"),AND:new q._Code("&&"),ADD:new q._Code("+")};var ct=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},Gn=class extends ct{constructor(e,t,s){super(),this.varKind=e,this.name=t,this.rhs=s}render({es5:e,_n:t}){let s=e?Ve.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${i};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=nr(this.rhs,e,t)),this}get names(){return this.rhs instanceof q._CodeOrName?this.rhs.names:{}}},ri=class extends ct{constructor(e,t,s){super(),this.lhs=e,this.rhs=t,this.sideEffects=s}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof q.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=nr(this.rhs,e,t),this}get names(){let e=this.lhs instanceof q.Name?{}:{...this.lhs.names};return ii(e,this.rhs)}},zn=class extends ri{constructor(e,t,s,i){super(e,s,i),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},Bn=class extends ct{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},Kn=class extends ct{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},Wn=class extends ct{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},Yn=class extends ct{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=nr(this.code,e,t),this}get names(){return this.code instanceof q._CodeOrName?this.code.names:{}}},Kr=class extends ct{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,s)=>t+s.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let s=e[t].optimizeNodes();Array.isArray(s)?e.splice(t,1,...s):s?e[t]=s:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:s}=this,i=s.length;for(;i--;){let n=s[i];n.optimizeNames(e,t)||(jv(e,n.names),s.splice(i,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>Gt(e,t.names),{})}},ht=class extends Kr{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},Xn=class extends Kr{},ir=class extends ht{};ir.kind="else";var Ut=class r extends ht{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let s=t.optimizeNodes();t=this.else=Array.isArray(s)?new ir(s):s}if(t)return e===!1?t instanceof r?t:t.nodes:this.nodes.length?this:new r(Cc(e),t instanceof r?[t]:t.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,t){var s;if(this.else=(s=this.else)===null||s===void 0?void 0:s.optimizeNames(e,t),!!(super.optimizeNames(e,t)||this.else))return this.condition=nr(this.condition,e,t),this}get names(){let e=super.names;return ii(e,this.condition),this.else&&Gt(e,this.else.names),e}};Ut.kind="if";var Ht=class extends ht{};Ht.kind="for";var Jn=class extends Ht{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=nr(this.iteration,e,t),this}get names(){return Gt(super.names,this.iteration.names)}},Zn=class extends Ht{constructor(e,t,s,i){super(),this.varKind=e,this.name=t,this.from=s,this.to=i}render(e){let t=e.es5?Ve.varKinds.var:this.varKind,{name:s,from:i,to:n}=this;return`for(${t} ${s}=${i}; ${s}<${n}; ${s}++)`+super.render(e)}get names(){let e=ii(super.names,this.from);return ii(e,this.to)}},si=class extends Ht{constructor(e,t,s,i){super(),this.loop=e,this.varKind=t,this.name=s,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=nr(this.iterable,e,t),this}get names(){return Gt(super.names,this.iterable.names)}},Wr=class extends ht{constructor(e,t,s){super(),this.name=e,this.args=t,this.async=s}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Wr.kind="func";var Yr=class extends Kr{render(e){return"return "+super.render(e)}};Yr.kind="return";var Qn=class extends ht{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(e,t){var s,i;return super.optimizeNames(e,t),(s=this.catch)===null||s===void 0||s.optimizeNames(e,t),(i=this.finally)===null||i===void 0||i.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&Gt(e,this.catch.names),this.finally&&Gt(e,this.finally.names),e}},Xr=class extends ht{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};Xr.kind="catch";var Jr=class extends ht{render(e){return"finally"+super.render(e)}};Jr.kind="finally";var eo=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
|
|
3
|
-
`:""},this._extScope=e,this._scope=new Ve.Scope({parent:e}),this._nodes=[new Xn]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let s=this._extScope.value(e,t);return(this._values[s.prefix]||(this._values[s.prefix]=new Set)).add(s),s}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,s,i){let n=this._scope.toName(t);return s!==void 0&&i&&(this._constants[n.str]=s),this._leafNode(new Gn(e,n,s)),n}const(e,t,s){return this._def(Ve.varKinds.const,e,t,s)}let(e,t,s){return this._def(Ve.varKinds.let,e,t,s)}var(e,t,s){return this._def(Ve.varKinds.var,e,t,s)}assign(e,t,s){return this._leafNode(new ri(e,t,s))}add(e,t){return this._leafNode(new zn(e,A.operators.ADD,t))}code(e){return typeof e=="function"?e():e!==q.nil&&this._leafNode(new Yn(e)),this}object(...e){let t=["{"];for(let[s,i]of e)t.length>1&&t.push(","),t.push(s),(s!==i||this.opts.es5)&&(t.push(":"),(0,q.addCodeArg)(t,i));return t.push("}"),new q._Code(t)}if(e,t,s){if(this._blockNode(new Ut(e)),t&&s)this.code(t).else().code(s).endIf();else if(t)this.code(t).endIf();else if(s)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Ut(e))}else(){return this._elseNode(new ir)}endIf(){return this._endBlockNode(Ut,ir)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new Jn(e),t)}forRange(e,t,s,i,n=this.opts.es5?Ve.varKinds.var:Ve.varKinds.let){let o=this._scope.toName(e);return this._for(new Zn(n,o,t,s),()=>i(o))}forOf(e,t,s,i=Ve.varKinds.const){let n=this._scope.toName(e);if(this.opts.es5){let o=t instanceof q.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,q._)`${o}.length`,a=>{this.var(n,(0,q._)`${o}[${a}]`),s(n)})}return this._for(new si("of",i,n,t),()=>s(n))}forIn(e,t,s,i=this.opts.es5?Ve.varKinds.var:Ve.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,q._)`Object.keys(${t})`,s);let n=this._scope.toName(e);return this._for(new si("in",i,n,t),()=>s(n))}endFor(){return this._endBlockNode(Ht)}label(e){return this._leafNode(new Bn(e))}break(e){return this._leafNode(new Kn(e))}return(e){let t=new Yr;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Yr)}try(e,t,s){if(!t&&!s)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new Qn;if(this._blockNode(i),this.code(e),t){let n=this.name("e");this._currNode=i.catch=new Xr(n),t(n)}return s&&(this._currNode=i.finally=new Jr,this.code(s)),this._endBlockNode(Xr,Jr)}throw(e){return this._leafNode(new Wn(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let s=this._nodes.length-t;if(s<0||e!==void 0&&s!==e)throw new Error(`CodeGen: wrong number of nodes: ${s} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=q.nil,s,i){return this._blockNode(new Wr(e,t,s)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(Wr)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let s=this._currNode;if(s instanceof e||t&&s instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof Ut))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};A.CodeGen=eo;function Gt(r,e){for(let t in e)r[t]=(r[t]||0)+(e[t]||0);return r}function ii(r,e){return e instanceof q._CodeOrName?Gt(r,e.names):r}function nr(r,e,t){if(r instanceof q.Name)return s(r);if(!i(r))return r;return new q._Code(r._items.reduce((n,o)=>(o instanceof q.Name&&(o=s(o)),o instanceof q._Code?n.push(...o._items):n.push(o),n),[]));function s(n){let o=t[n.str];return o===void 0||e[n.str]!==1?n:(delete e[n.str],o)}function i(n){return n instanceof q._Code&&n._items.some(o=>o instanceof q.Name&&e[o.str]===1&&t[o.str]!==void 0)}}function jv(r,e){for(let t in e)r[t]=(r[t]||0)-(e[t]||0)}function Cc(r){return typeof r=="boolean"||typeof r=="number"||r===null?!r:(0,q._)`!${to(r)}`}A.not=Cc;var Dv=Rc(A.operators.AND);function Mv(...r){return r.reduce(Dv)}A.and=Mv;var Lv=Rc(A.operators.OR);function Vv(...r){return r.reduce(Lv)}A.or=Vv;function Rc(r){return(e,t)=>e===q.nil?t:t===q.nil?e:(0,q._)`${to(e)} ${r} ${to(t)}`}function to(r){return r instanceof q.Name?r:(0,q._)`(${r})`}});var R=d(C=>{"use strict";Object.defineProperty(C,"__esModule",{value:!0});C.checkStrictMode=C.getErrorPath=C.Type=C.useFunc=C.setEvaluated=C.evaluatedPropsToName=C.mergeEvaluated=C.eachItem=C.unescapeJsonPointer=C.escapeJsonPointer=C.escapeFragment=C.unescapeFragment=C.schemaRefOrVal=C.schemaHasRulesButRef=C.schemaHasRules=C.checkUnknownRules=C.alwaysValidSchema=C.toHash=void 0;var F=T(),Fv=Br();function Uv(r){let e={};for(let t of r)e[t]=!0;return e}C.toHash=Uv;function Hv(r,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(kc(r,e),!jc(e,r.self.RULES.all))}C.alwaysValidSchema=Hv;function kc(r,e=r.schema){let{opts:t,self:s}=r;if(!t.strictSchema||typeof e=="boolean")return;let i=s.RULES.keywords;for(let n in e)i[n]||Lc(r,`unknown keyword: "${n}"`)}C.checkUnknownRules=kc;function jc(r,e){if(typeof r=="boolean")return!r;for(let t in r)if(e[t])return!0;return!1}C.schemaHasRules=jc;function Gv(r,e){if(typeof r=="boolean")return!r;for(let t in r)if(t!=="$ref"&&e.all[t])return!0;return!1}C.schemaHasRulesButRef=Gv;function zv({topSchemaRef:r,schemaPath:e},t,s,i){if(!i){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,F._)`${t}`}return(0,F._)`${r}${e}${(0,F.getProperty)(s)}`}C.schemaRefOrVal=zv;function Bv(r){return Dc(decodeURIComponent(r))}C.unescapeFragment=Bv;function Kv(r){return encodeURIComponent(so(r))}C.escapeFragment=Kv;function so(r){return typeof r=="number"?`${r}`:r.replace(/~/g,"~0").replace(/\//g,"~1")}C.escapeJsonPointer=so;function Dc(r){return r.replace(/~1/g,"/").replace(/~0/g,"~")}C.unescapeJsonPointer=Dc;function Wv(r,e){if(Array.isArray(r))for(let t of r)e(t);else e(r)}C.eachItem=Wv;function Nc({mergeNames:r,mergeToName:e,mergeValues:t,resultToName:s}){return(i,n,o,a)=>{let u=o===void 0?n:o instanceof F.Name?(n instanceof F.Name?r(i,n,o):e(i,n,o),o):n instanceof F.Name?(e(i,o,n),n):t(n,o);return a===F.Name&&!(u instanceof F.Name)?s(i,u):u}}C.mergeEvaluated={props:Nc({mergeNames:(r,e,t)=>r.if((0,F._)`${t} !== true && ${e} !== undefined`,()=>{r.if((0,F._)`${e} === true`,()=>r.assign(t,!0),()=>r.assign(t,(0,F._)`${t} || {}`).code((0,F._)`Object.assign(${t}, ${e})`))}),mergeToName:(r,e,t)=>r.if((0,F._)`${t} !== true`,()=>{e===!0?r.assign(t,!0):(r.assign(t,(0,F._)`${t} || {}`),io(r,t,e))}),mergeValues:(r,e)=>r===!0?!0:{...r,...e},resultToName:Mc}),items:Nc({mergeNames:(r,e,t)=>r.if((0,F._)`${t} !== true && ${e} !== undefined`,()=>r.assign(t,(0,F._)`${e} === true ? true : ${t} > ${e} ? ${t} : ${e}`)),mergeToName:(r,e,t)=>r.if((0,F._)`${t} !== true`,()=>r.assign(t,e===!0?!0:(0,F._)`${t} > ${e} ? ${t} : ${e}`)),mergeValues:(r,e)=>r===!0?!0:Math.max(r,e),resultToName:(r,e)=>r.var("items",e)})};function Mc(r,e){if(e===!0)return r.var("props",!0);let t=r.var("props",(0,F._)`{}`);return e!==void 0&&io(r,t,e),t}C.evaluatedPropsToName=Mc;function io(r,e,t){Object.keys(t).forEach(s=>r.assign((0,F._)`${e}${(0,F.getProperty)(s)}`,!0))}C.setEvaluated=io;var qc={};function Yv(r,e){return r.scopeValue("func",{ref:e,code:qc[e.code]||(qc[e.code]=new Fv._Code(e.code))})}C.useFunc=Yv;var ro;(function(r){r[r.Num=0]="Num",r[r.Str=1]="Str"})(ro||(C.Type=ro={}));function Xv(r,e,t){if(r instanceof F.Name){let s=e===ro.Num;return t?s?(0,F._)`"[" + ${r} + "]"`:(0,F._)`"['" + ${r} + "']"`:s?(0,F._)`"/" + ${r}`:(0,F._)`"/" + ${r}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,F.getProperty)(r).toString():"/"+so(r)}C.getErrorPath=Xv;function Lc(r,e,t=r.opts.strictSchema){if(t){if(e=`strict mode: ${e}`,t===!0)throw new Error(e);r.self.logger.warn(e)}}C.checkStrictMode=Lc});var Ie=d(no=>{"use strict";Object.defineProperty(no,"__esModule",{value:!0});var ce=T(),Jv={data:new ce.Name("data"),valCxt:new ce.Name("valCxt"),instancePath:new ce.Name("instancePath"),parentData:new ce.Name("parentData"),parentDataProperty:new ce.Name("parentDataProperty"),rootData:new ce.Name("rootData"),dynamicAnchors:new ce.Name("dynamicAnchors"),vErrors:new ce.Name("vErrors"),errors:new ce.Name("errors"),this:new ce.Name("this"),self:new ce.Name("self"),scope:new ce.Name("scope"),json:new ce.Name("json"),jsonPos:new ce.Name("jsonPos"),jsonLen:new ce.Name("jsonLen"),jsonPart:new ce.Name("jsonPart")};no.default=Jv});var Zr=d(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.extendErrors=he.resetErrorsCount=he.reportExtraError=he.reportError=he.keyword$DataError=he.keywordError=void 0;var j=T(),oi=R(),me=Ie();he.keywordError={message:({keyword:r})=>(0,j.str)`must pass "${r}" keyword validation`};he.keyword$DataError={message:({keyword:r,schemaType:e})=>e?(0,j.str)`"${r}" keyword must be ${e} ($data)`:(0,j.str)`"${r}" keyword is invalid ($data)`};function Zv(r,e=he.keywordError,t,s){let{it:i}=r,{gen:n,compositeRule:o,allErrors:a}=i,u=Uc(r,e,t);s??(o||a)?Vc(n,u):Fc(i,(0,j._)`[${u}]`)}he.reportError=Zv;function Qv(r,e=he.keywordError,t){let{it:s}=r,{gen:i,compositeRule:n,allErrors:o}=s,a=Uc(r,e,t);Vc(i,a),n||o||Fc(s,me.default.vErrors)}he.reportExtraError=Qv;function eb(r,e){r.assign(me.default.errors,e),r.if((0,j._)`${me.default.vErrors} !== null`,()=>r.if(e,()=>r.assign((0,j._)`${me.default.vErrors}.length`,e),()=>r.assign(me.default.vErrors,null)))}he.resetErrorsCount=eb;function tb({gen:r,keyword:e,schemaValue:t,data:s,errsCount:i,it:n}){if(i===void 0)throw new Error("ajv implementation error");let o=r.name("err");r.forRange("i",i,me.default.errors,a=>{r.const(o,(0,j._)`${me.default.vErrors}[${a}]`),r.if((0,j._)`${o}.instancePath === undefined`,()=>r.assign((0,j._)`${o}.instancePath`,(0,j.strConcat)(me.default.instancePath,n.errorPath))),r.assign((0,j._)`${o}.schemaPath`,(0,j.str)`${n.errSchemaPath}/${e}`),n.opts.verbose&&(r.assign((0,j._)`${o}.schema`,t),r.assign((0,j._)`${o}.data`,s))})}he.extendErrors=tb;function Vc(r,e){let t=r.const("err",e);r.if((0,j._)`${me.default.vErrors} === null`,()=>r.assign(me.default.vErrors,(0,j._)`[${t}]`),(0,j._)`${me.default.vErrors}.push(${t})`),r.code((0,j._)`${me.default.errors}++`)}function Fc(r,e){let{gen:t,validateName:s,schemaEnv:i}=r;i.$async?t.throw((0,j._)`new ${r.ValidationError}(${e})`):(t.assign((0,j._)`${s}.errors`,e),t.return(!1))}var zt={keyword:new j.Name("keyword"),schemaPath:new j.Name("schemaPath"),params:new j.Name("params"),propertyName:new j.Name("propertyName"),message:new j.Name("message"),schema:new j.Name("schema"),parentSchema:new j.Name("parentSchema")};function Uc(r,e,t){let{createErrors:s}=r.it;return s===!1?(0,j._)`{}`:rb(r,e,t)}function rb(r,e,t={}){let{gen:s,it:i}=r,n=[sb(i,t),ib(r,t)];return nb(r,e,n),s.object(...n)}function sb({errorPath:r},{instancePath:e}){let t=e?(0,j.str)`${r}${(0,oi.getErrorPath)(e,oi.Type.Str)}`:r;return[me.default.instancePath,(0,j.strConcat)(me.default.instancePath,t)]}function ib({keyword:r,it:{errSchemaPath:e}},{schemaPath:t,parentSchema:s}){let i=s?e:(0,j.str)`${e}/${r}`;return t&&(i=(0,j.str)`${i}${(0,oi.getErrorPath)(t,oi.Type.Str)}`),[zt.schemaPath,i]}function nb(r,{params:e,message:t},s){let{keyword:i,data:n,schemaValue:o,it:a}=r,{opts:u,propertyName:l,topSchemaRef:c,schemaPath:h}=a;s.push([zt.keyword,i],[zt.params,typeof e=="function"?e(r):e||(0,j._)`{}`]),u.messages&&s.push([zt.message,typeof t=="function"?t(r):t]),u.verbose&&s.push([zt.schema,o],[zt.parentSchema,(0,j._)`${c}${h}`],[me.default.data,n]),l&&s.push([zt.propertyName,l])}});var Gc=d(or=>{"use strict";Object.defineProperty(or,"__esModule",{value:!0});or.boolOrEmptySchema=or.topBoolOrEmptySchema=void 0;var ob=Zr(),ab=T(),ub=Ie(),lb={message:"boolean schema is false"};function cb(r){let{gen:e,schema:t,validateName:s}=r;t===!1?Hc(r,!1):typeof t=="object"&&t.$async===!0?e.return(ub.default.data):(e.assign((0,ab._)`${s}.errors`,null),e.return(!0))}or.topBoolOrEmptySchema=cb;function hb(r,e){let{gen:t,schema:s}=r;s===!1?(t.var(e,!1),Hc(r)):t.var(e,!0)}or.boolOrEmptySchema=hb;function Hc(r,e){let{gen:t,data:s}=r,i={gen:t,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:r};(0,ob.reportError)(i,lb,void 0,e)}});var oo=d(ar=>{"use strict";Object.defineProperty(ar,"__esModule",{value:!0});ar.getRules=ar.isJSONType=void 0;var db=["string","number","integer","boolean","null","object","array"],fb=new Set(db);function pb(r){return typeof r=="string"&&fb.has(r)}ar.isJSONType=pb;function mb(){let r={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...r,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},r.number,r.string,r.array,r.object],post:{rules:[]},all:{},keywords:{}}}ar.getRules=mb});var ao=d(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.shouldUseRule=xt.shouldUseGroup=xt.schemaHasRulesForType=void 0;function gb({schema:r,self:e},t){let s=e.RULES.types[t];return s&&s!==!0&&zc(r,s)}xt.schemaHasRulesForType=gb;function zc(r,e){return e.rules.some(t=>Bc(r,t))}xt.shouldUseGroup=zc;function Bc(r,e){var t;return r[e.keyword]!==void 0||((t=e.definition.implements)===null||t===void 0?void 0:t.some(s=>r[s]!==void 0))}xt.shouldUseRule=Bc});var Qr=d(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.reportTypeError=de.checkDataTypes=de.checkDataType=de.coerceAndCheckDataType=de.getJSONTypes=de.getSchemaTypes=de.DataType=void 0;var yb=oo(),_b=ao(),vb=Zr(),I=T(),Kc=R(),ur;(function(r){r[r.Correct=0]="Correct",r[r.Wrong=1]="Wrong"})(ur||(de.DataType=ur={}));function bb(r){let e=Wc(r.type);if(e.includes("null")){if(r.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&r.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');r.nullable===!0&&e.push("null")}return e}de.getSchemaTypes=bb;function Wc(r){let e=Array.isArray(r)?r:r?[r]:[];if(e.every(yb.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}de.getJSONTypes=Wc;function wb(r,e){let{gen:t,data:s,opts:i}=r,n=$b(e,i.coerceTypes),o=e.length>0&&!(n.length===0&&e.length===1&&(0,_b.schemaHasRulesForType)(r,e[0]));if(o){let a=lo(e,s,i.strictNumbers,ur.Wrong);t.if(a,()=>{n.length?Eb(r,e,n):co(r)})}return o}de.coerceAndCheckDataType=wb;var Yc=new Set(["string","number","integer","boolean","null"]);function $b(r,e){return e?r.filter(t=>Yc.has(t)||e==="array"&&t==="array"):[]}function Eb(r,e,t){let{gen:s,data:i,opts:n}=r,o=s.let("dataType",(0,I._)`typeof ${i}`),a=s.let("coerced",(0,I._)`undefined`);n.coerceTypes==="array"&&s.if((0,I._)`${o} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>s.assign(i,(0,I._)`${i}[0]`).assign(o,(0,I._)`typeof ${i}`).if(lo(e,i,n.strictNumbers),()=>s.assign(a,i))),s.if((0,I._)`${a} !== undefined`);for(let l of t)(Yc.has(l)||l==="array"&&n.coerceTypes==="array")&&u(l);s.else(),co(r),s.endIf(),s.if((0,I._)`${a} !== undefined`,()=>{s.assign(i,a),Sb(r,a)});function u(l){switch(l){case"string":s.elseIf((0,I._)`${o} == "number" || ${o} == "boolean"`).assign(a,(0,I._)`"" + ${i}`).elseIf((0,I._)`${i} === null`).assign(a,(0,I._)`""`);return;case"number":s.elseIf((0,I._)`${o} == "boolean" || ${i} === null
|
|
4
|
-
|| (${o} == "string" && ${i} && ${i} == +${i})`).assign(a,(0,
|
|
5
|
-
|| (${o} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(a,(0,
|
|
6
|
-
|| ${o} === "boolean" || ${i} === null`).assign(a,(0,I._)`[${i}]`)}}}function Sb({gen:r,parentData:e,parentDataProperty:t},s){r.if((0,I._)`${e} !== undefined`,()=>r.assign((0,I._)`${e}[${t}]`,s))}function uo(r,e,t,s=ur.Correct){let i=s===ur.Correct?I.operators.EQ:I.operators.NEQ,n;switch(r){case"null":return(0,I._)`${e} ${i} null`;case"array":n=(0,I._)`Array.isArray(${e})`;break;case"object":n=(0,I._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":n=o((0,I._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":n=o();break;default:return(0,I._)`typeof ${e} ${i} ${r}`}return s===ur.Correct?n:(0,I.not)(n);function o(a=I.nil){return(0,I.and)((0,I._)`typeof ${e} == "number"`,a,t?(0,I._)`isFinite(${e})`:I.nil)}}de.checkDataType=uo;function lo(r,e,t,s){if(r.length===1)return uo(r[0],e,t,s);let i,n=(0,Kc.toHash)(r);if(n.array&&n.object){let o=(0,I._)`typeof ${e} != "object"`;i=n.null?o:(0,I._)`!${e} || ${o}`,delete n.null,delete n.array,delete n.object}else i=I.nil;n.number&&delete n.integer;for(let o in n)i=(0,I.and)(i,uo(o,e,t,s));return i}de.checkDataTypes=lo;var Ob={message:({schema:r})=>`must be ${r}`,params:({schema:r,schemaValue:e})=>typeof r=="string"?(0,I._)`{type: ${r}}`:(0,I._)`{type: ${e}}`};function co(r){let e=xb(r);(0,vb.reportError)(e,Ob)}de.reportTypeError=co;function xb(r){let{gen:e,data:t,schema:s}=r,i=(0,Kc.schemaRefOrVal)(r,s,"type");return{gen:e,keyword:"type",data:t,schema:s.type,schemaCode:i,schemaValue:i,parentSchema:s,params:{},it:r}}});var Jc=d(ai=>{"use strict";Object.defineProperty(ai,"__esModule",{value:!0});ai.assignDefaults=void 0;var lr=T(),Tb=R();function Pb(r,e){let{properties:t,items:s}=r.schema;if(e==="object"&&t)for(let i in t)Xc(r,i,t[i].default);else e==="array"&&Array.isArray(s)&&s.forEach((i,n)=>Xc(r,n,i.default))}ai.assignDefaults=Pb;function Xc(r,e,t){let{gen:s,compositeRule:i,data:n,opts:o}=r;if(t===void 0)return;let a=(0,lr._)`${n}${(0,lr.getProperty)(e)}`;if(i){(0,Tb.checkStrictMode)(r,`default is ignored for: ${a}`);return}let u=(0,lr._)`${a} === undefined`;o.useDefaults==="empty"&&(u=(0,lr._)`${u} || ${a} === null || ${a} === ""`),s.if(u,(0,lr._)`${a} = ${(0,lr.stringify)(t)}`)}});var Ae=d(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.validateUnion=V.validateArray=V.usePattern=V.callValidateCode=V.schemaProperties=V.allSchemaProperties=V.noPropertyInData=V.propertyInData=V.isOwnProperty=V.hasPropFunc=V.reportMissingProp=V.checkMissingProp=V.checkReportMissingProp=void 0;var z=T(),ho=R(),Tt=Ie(),Ib=R();function Ab(r,e){let{gen:t,data:s,it:i}=r;t.if(po(t,s,e,i.opts.ownProperties),()=>{r.setParams({missingProperty:(0,z._)`${e}`},!0),r.error()})}V.checkReportMissingProp=Ab;function Cb({gen:r,data:e,it:{opts:t}},s,i){return(0,z.or)(...s.map(n=>(0,z.and)(po(r,e,n,t.ownProperties),(0,z._)`${i} = ${n}`)))}V.checkMissingProp=Cb;function Rb(r,e){r.setParams({missingProperty:e},!0),r.error()}V.reportMissingProp=Rb;function Zc(r){return r.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,z._)`Object.prototype.hasOwnProperty`})}V.hasPropFunc=Zc;function fo(r,e,t){return(0,z._)`${Zc(r)}.call(${e}, ${t})`}V.isOwnProperty=fo;function Nb(r,e,t,s){let i=(0,z._)`${e}${(0,z.getProperty)(t)} !== undefined`;return s?(0,z._)`${i} && ${fo(r,e,t)}`:i}V.propertyInData=Nb;function po(r,e,t,s){let i=(0,z._)`${e}${(0,z.getProperty)(t)} === undefined`;return s?(0,z.or)(i,(0,z.not)(fo(r,e,t))):i}V.noPropertyInData=po;function Qc(r){return r?Object.keys(r).filter(e=>e!=="__proto__"):[]}V.allSchemaProperties=Qc;function qb(r,e){return Qc(e).filter(t=>!(0,ho.alwaysValidSchema)(r,e[t]))}V.schemaProperties=qb;function kb({schemaCode:r,data:e,it:{gen:t,topSchemaRef:s,schemaPath:i,errorPath:n},it:o},a,u,l){let c=l?(0,z._)`${r}, ${e}, ${s}${i}`:e,h=[[Tt.default.instancePath,(0,z.strConcat)(Tt.default.instancePath,n)],[Tt.default.parentData,o.parentData],[Tt.default.parentDataProperty,o.parentDataProperty],[Tt.default.rootData,Tt.default.rootData]];o.opts.dynamicRef&&h.push([Tt.default.dynamicAnchors,Tt.default.dynamicAnchors]);let f=(0,z._)`${c}, ${t.object(...h)}`;return u!==z.nil?(0,z._)`${a}.call(${u}, ${f})`:(0,z._)`${a}(${f})`}V.callValidateCode=kb;var jb=(0,z._)`new RegExp`;function Db({gen:r,it:{opts:e}},t){let s=e.unicodeRegExp?"u":"",{regExp:i}=e.code,n=i(t,s);return r.scopeValue("pattern",{key:n.toString(),ref:n,code:(0,z._)`${i.code==="new RegExp"?jb:(0,Ib.useFunc)(r,i)}(${t}, ${s})`})}V.usePattern=Db;function Mb(r){let{gen:e,data:t,keyword:s,it:i}=r,n=e.name("valid");if(i.allErrors){let a=e.let("valid",!0);return o(()=>e.assign(a,!1)),a}return e.var(n,!0),o(()=>e.break()),n;function o(a){let u=e.const("len",(0,z._)`${t}.length`);e.forRange("i",0,u,l=>{r.subschema({keyword:s,dataProp:l,dataPropType:ho.Type.Num},n),e.if((0,z.not)(n),a)})}}V.validateArray=Mb;function Lb(r){let{gen:e,schema:t,keyword:s,it:i}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");if(t.some(u=>(0,ho.alwaysValidSchema)(i,u))&&!i.opts.unevaluated)return;let o=e.let("valid",!1),a=e.name("_valid");e.block(()=>t.forEach((u,l)=>{let c=r.subschema({keyword:s,schemaProp:l,compositeRule:!0},a);e.assign(o,(0,z._)`${o} || ${a}`),r.mergeValidEvaluated(c,a)||e.if((0,z.not)(o))})),r.result(o,()=>r.reset(),()=>r.error(!0))}V.validateUnion=Lb});var rh=d(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.validateKeywordUsage=Je.validSchemaType=Je.funcKeywordCode=Je.macroKeywordCode=void 0;var ge=T(),Bt=Ie(),Vb=Ae(),Fb=Zr();function Ub(r,e){let{gen:t,keyword:s,schema:i,parentSchema:n,it:o}=r,a=e.macro.call(o.self,i,n,o),u=th(t,s,a);o.opts.validateSchema!==!1&&o.self.validateSchema(a,!0);let l=t.name("valid");r.subschema({schema:a,schemaPath:ge.nil,errSchemaPath:`${o.errSchemaPath}/${s}`,topSchemaRef:u,compositeRule:!0},l),r.pass(l,()=>r.error(!0))}Je.macroKeywordCode=Ub;function Hb(r,e){var t;let{gen:s,keyword:i,schema:n,parentSchema:o,$data:a,it:u}=r;zb(u,e);let l=!a&&e.compile?e.compile.call(u.self,n,o,u):e.validate,c=th(s,i,l),h=s.let("valid");r.block$data(h,f),r.ok((t=e.valid)!==null&&t!==void 0?t:h);function f(){if(e.errors===!1)g(),e.modifying&&eh(r),y(()=>r.error());else{let _=e.async?p():m();e.modifying&&eh(r),y(()=>Gb(r,_))}}function p(){let _=s.let("ruleErrs",null);return s.try(()=>g((0,ge._)`await `),S=>s.assign(h,!1).if((0,ge._)`${S} instanceof ${u.ValidationError}`,()=>s.assign(_,(0,ge._)`${S}.errors`),()=>s.throw(S))),_}function m(){let _=(0,ge._)`${c}.errors`;return s.assign(_,null),g(ge.nil),_}function g(_=e.async?(0,ge._)`await `:ge.nil){let S=u.opts.passContext?Bt.default.this:Bt.default.self,O=!("compile"in e&&!a||e.schema===!1);s.assign(h,(0,ge._)`${_}${(0,Vb.callValidateCode)(r,c,S,O)}`,e.modifying)}function y(_){var S;s.if((0,ge.not)((S=e.valid)!==null&&S!==void 0?S:h),_)}}Je.funcKeywordCode=Hb;function eh(r){let{gen:e,data:t,it:s}=r;e.if(s.parentData,()=>e.assign(t,(0,ge._)`${s.parentData}[${s.parentDataProperty}]`))}function Gb(r,e){let{gen:t}=r;t.if((0,ge._)`Array.isArray(${e})`,()=>{t.assign(Bt.default.vErrors,(0,ge._)`${Bt.default.vErrors} === null ? ${e} : ${Bt.default.vErrors}.concat(${e})`).assign(Bt.default.errors,(0,ge._)`${Bt.default.vErrors}.length`),(0,Fb.extendErrors)(r)},()=>r.error())}function zb({schemaEnv:r},e){if(e.async&&!r.$async)throw new Error("async keyword in sync schema")}function th(r,e,t){if(t===void 0)throw new Error(`keyword "${e}" failed to compile`);return r.scopeValue("keyword",typeof t=="function"?{ref:t}:{ref:t,code:(0,ge.stringify)(t)})}function Bb(r,e,t=!1){return!e.length||e.some(s=>s==="array"?Array.isArray(r):s==="object"?r&&typeof r=="object"&&!Array.isArray(r):typeof r==s||t&&typeof r>"u")}Je.validSchemaType=Bb;function Kb({schema:r,opts:e,self:t,errSchemaPath:s},i,n){if(Array.isArray(i.keyword)?!i.keyword.includes(n):i.keyword!==n)throw new Error("ajv implementation error");let o=i.dependencies;if(o?.some(a=>!Object.prototype.hasOwnProperty.call(r,a)))throw new Error(`parent schema must have dependencies of ${n}: ${o.join(",")}`);if(i.validateSchema&&!i.validateSchema(r[n])){let u=`keyword "${n}" value is invalid at path "${s}": `+t.errorsText(i.validateSchema.errors);if(e.validateSchema==="log")t.logger.error(u);else throw new Error(u)}}Je.validateKeywordUsage=Kb});var ih=d(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.extendSubschemaMode=Pt.extendSubschemaData=Pt.getSubschema=void 0;var Ze=T(),sh=R();function Wb(r,{keyword:e,schemaProp:t,schema:s,schemaPath:i,errSchemaPath:n,topSchemaRef:o}){if(e!==void 0&&s!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let a=r.schema[e];return t===void 0?{schema:a,schemaPath:(0,Ze._)`${r.schemaPath}${(0,Ze.getProperty)(e)}`,errSchemaPath:`${r.errSchemaPath}/${e}`}:{schema:a[t],schemaPath:(0,Ze._)`${r.schemaPath}${(0,Ze.getProperty)(e)}${(0,Ze.getProperty)(t)}`,errSchemaPath:`${r.errSchemaPath}/${e}/${(0,sh.escapeFragment)(t)}`}}if(s!==void 0){if(i===void 0||n===void 0||o===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:s,schemaPath:i,topSchemaRef:o,errSchemaPath:n}}throw new Error('either "keyword" or "schema" must be passed')}Pt.getSubschema=Wb;function Yb(r,e,{dataProp:t,dataPropType:s,data:i,dataTypes:n,propertyName:o}){if(i!==void 0&&t!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=e;if(t!==void 0){let{errorPath:l,dataPathArr:c,opts:h}=e,f=a.let("data",(0,Ze._)`${e.data}${(0,Ze.getProperty)(t)}`,!0);u(f),r.errorPath=(0,Ze.str)`${l}${(0,sh.getErrorPath)(t,s,h.jsPropertySyntax)}`,r.parentDataProperty=(0,Ze._)`${t}`,r.dataPathArr=[...c,r.parentDataProperty]}if(i!==void 0){let l=i instanceof Ze.Name?i:a.let("data",i,!0);u(l),o!==void 0&&(r.propertyName=o)}n&&(r.dataTypes=n);function u(l){r.data=l,r.dataLevel=e.dataLevel+1,r.dataTypes=[],e.definedProperties=new Set,r.parentData=e.data,r.dataNames=[...e.dataNames,l]}}Pt.extendSubschemaData=Yb;function Xb(r,{jtdDiscriminator:e,jtdMetadata:t,compositeRule:s,createErrors:i,allErrors:n}){s!==void 0&&(r.compositeRule=s),i!==void 0&&(r.createErrors=i),n!==void 0&&(r.allErrors=n),r.jtdDiscriminator=e,r.jtdMetadata=t}Pt.extendSubschemaMode=Xb});var mo=d((UN,nh)=>{"use strict";nh.exports=function r(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var s,i,n;if(Array.isArray(e)){if(s=e.length,s!=t.length)return!1;for(i=s;i--!==0;)if(!r(e[i],t[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(n=Object.keys(e),s=n.length,s!==Object.keys(t).length)return!1;for(i=s;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,n[i]))return!1;for(i=s;i--!==0;){var o=n[i];if(!r(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}});var ah=d((HN,oh)=>{"use strict";var It=oh.exports=function(r,e,t){typeof e=="function"&&(t=e,e={}),t=e.cb||t;var s=typeof t=="function"?t:t.pre||function(){},i=t.post||function(){};ui(e,s,i,r,"",r)};It.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};It.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};It.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};It.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 ui(r,e,t,s,i,n,o,a,u,l){if(s&&typeof s=="object"&&!Array.isArray(s)){e(s,i,n,o,a,u,l);for(var c in s){var h=s[c];if(Array.isArray(h)){if(c in It.arrayKeywords)for(var f=0;f<h.length;f++)ui(r,e,t,h[f],i+"/"+c+"/"+f,n,i,c,s,f)}else if(c in It.propsKeywords){if(h&&typeof h=="object")for(var p in h)ui(r,e,t,h[p],i+"/"+c+"/"+Jb(p),n,i,c,s,p)}else(c in It.keywords||r.allKeys&&!(c in It.skipKeywords))&&ui(r,e,t,h,i+"/"+c,n,i,c,s)}t(s,i,n,o,a,u,l)}}function Jb(r){return r.replace(/~/g,"~0").replace(/\//g,"~1")}});var es=d($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.getSchemaRefs=$e.resolveUrl=$e.normalizeId=$e._getFullPath=$e.getFullPath=$e.inlineRef=void 0;var Zb=R(),Qb=mo(),ew=ah(),tw=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function rw(r,e=!0){return typeof r=="boolean"?!0:e===!0?!go(r):e?uh(r)<=e:!1}$e.inlineRef=rw;var sw=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function go(r){for(let e in r){if(sw.has(e))return!0;let t=r[e];if(Array.isArray(t)&&t.some(go)||typeof t=="object"&&go(t))return!0}return!1}function uh(r){let e=0;for(let t in r){if(t==="$ref")return 1/0;if(e++,!tw.has(t)&&(typeof r[t]=="object"&&(0,Zb.eachItem)(r[t],s=>e+=uh(s)),e===1/0))return 1/0}return e}function lh(r,e="",t){t!==!1&&(e=cr(e));let s=r.parse(e);return ch(r,s)}$e.getFullPath=lh;function ch(r,e){return r.serialize(e).split("#")[0]+"#"}$e._getFullPath=ch;var iw=/#\/?$/;function cr(r){return r?r.replace(iw,""):""}$e.normalizeId=cr;function nw(r,e,t){return t=cr(t),r.resolve(e,t)}$e.resolveUrl=nw;var ow=/^[a-z_][-a-z0-9._]*$/i;function aw(r,e){if(typeof r=="boolean")return{};let{schemaId:t,uriResolver:s}=this.opts,i=cr(r[t]||e),n={"":i},o=lh(s,i,!1),a={},u=new Set;return ew(r,{allKeys:!0},(h,f,p,m)=>{if(m===void 0)return;let g=o+f,y=n[m];typeof h[t]=="string"&&(y=_.call(this,h[t])),S.call(this,h.$anchor),S.call(this,h.$dynamicAnchor),n[f]=y;function _(O){let E=this.opts.uriResolver.resolve;if(O=cr(y?E(y,O):O),u.has(O))throw c(O);u.add(O);let $=this.refs[O];return typeof $=="string"&&($=this.refs[$]),typeof $=="object"?l(h,$.schema,O):O!==cr(g)&&(O[0]==="#"?(l(h,a[O],O),a[O]=h):this.refs[O]=g),O}function S(O){if(typeof O=="string"){if(!ow.test(O))throw new Error(`invalid anchor "${O}"`);_.call(this,`#${O}`)}}}),a;function l(h,f,p){if(f!==void 0&&!Qb(h,f))throw c(p)}function c(h){return new Error(`reference "${h}" resolves to more than one schema`)}}$e.getSchemaRefs=aw});var hr=d(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.getData=At.KeywordCxt=At.validateFunctionCode=void 0;var mh=Gc(),hh=Qr(),_o=ao(),li=Qr(),uw=Jc(),rs=rh(),yo=ih(),w=T(),x=Ie(),lw=es(),dt=R(),ts=Zr();function cw(r){if(_h(r)&&(vh(r),yh(r))){fw(r);return}gh(r,()=>(0,mh.topBoolOrEmptySchema)(r))}At.validateFunctionCode=cw;function gh({gen:r,validateName:e,schema:t,schemaEnv:s,opts:i},n){i.code.es5?r.func(e,(0,w._)`${x.default.data}, ${x.default.valCxt}`,s.$async,()=>{r.code((0,w._)`"use strict"; ${dh(t,i)}`),dw(r,i),r.code(n)}):r.func(e,(0,w._)`${x.default.data}, ${hw(i)}`,s.$async,()=>r.code(dh(t,i)).code(n))}function hw(r){return(0,w._)`{${x.default.instancePath}="", ${x.default.parentData}, ${x.default.parentDataProperty}, ${x.default.rootData}=${x.default.data}${r.dynamicRef?(0,w._)`, ${x.default.dynamicAnchors}={}`:w.nil}}={}`}function dw(r,e){r.if(x.default.valCxt,()=>{r.var(x.default.instancePath,(0,w._)`${x.default.valCxt}.${x.default.instancePath}`),r.var(x.default.parentData,(0,w._)`${x.default.valCxt}.${x.default.parentData}`),r.var(x.default.parentDataProperty,(0,w._)`${x.default.valCxt}.${x.default.parentDataProperty}`),r.var(x.default.rootData,(0,w._)`${x.default.valCxt}.${x.default.rootData}`),e.dynamicRef&&r.var(x.default.dynamicAnchors,(0,w._)`${x.default.valCxt}.${x.default.dynamicAnchors}`)},()=>{r.var(x.default.instancePath,(0,w._)`""`),r.var(x.default.parentData,(0,w._)`undefined`),r.var(x.default.parentDataProperty,(0,w._)`undefined`),r.var(x.default.rootData,x.default.data),e.dynamicRef&&r.var(x.default.dynamicAnchors,(0,w._)`{}`)})}function fw(r){let{schema:e,opts:t,gen:s}=r;gh(r,()=>{t.$comment&&e.$comment&&wh(r),_w(r),s.let(x.default.vErrors,null),s.let(x.default.errors,0),t.unevaluated&&pw(r),bh(r),ww(r)})}function pw(r){let{gen:e,validateName:t}=r;r.evaluated=e.const("evaluated",(0,w._)`${t}.evaluated`),e.if((0,w._)`${r.evaluated}.dynamicProps`,()=>e.assign((0,w._)`${r.evaluated}.props`,(0,w._)`undefined`)),e.if((0,w._)`${r.evaluated}.dynamicItems`,()=>e.assign((0,w._)`${r.evaluated}.items`,(0,w._)`undefined`))}function dh(r,e){let t=typeof r=="object"&&r[e.schemaId];return t&&(e.code.source||e.code.process)?(0,w._)`/*# sourceURL=${t} */`:w.nil}function mw(r,e){if(_h(r)&&(vh(r),yh(r))){gw(r,e);return}(0,mh.boolOrEmptySchema)(r,e)}function yh({schema:r,self:e}){if(typeof r=="boolean")return!r;for(let t in r)if(e.RULES.all[t])return!0;return!1}function _h(r){return typeof r.schema!="boolean"}function gw(r,e){let{schema:t,gen:s,opts:i}=r;i.$comment&&t.$comment&&wh(r),vw(r),bw(r);let n=s.const("_errs",x.default.errors);bh(r,n),s.var(e,(0,w._)`${n} === ${x.default.errors}`)}function vh(r){(0,dt.checkUnknownRules)(r),yw(r)}function bh(r,e){if(r.opts.jtd)return fh(r,[],!1,e);let t=(0,hh.getSchemaTypes)(r.schema),s=(0,hh.coerceAndCheckDataType)(r,t);fh(r,t,!s,e)}function yw(r){let{schema:e,errSchemaPath:t,opts:s,self:i}=r;e.$ref&&s.ignoreKeywordsWithRef&&(0,dt.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${t}"`)}function _w(r){let{schema:e,opts:t}=r;e.default!==void 0&&t.useDefaults&&t.strictSchema&&(0,dt.checkStrictMode)(r,"default is ignored in the schema root")}function vw(r){let e=r.schema[r.opts.schemaId];e&&(r.baseId=(0,lw.resolveUrl)(r.opts.uriResolver,r.baseId,e))}function bw(r){if(r.schema.$async&&!r.schemaEnv.$async)throw new Error("async schema in sync schema")}function wh({gen:r,schemaEnv:e,schema:t,errSchemaPath:s,opts:i}){let n=t.$comment;if(i.$comment===!0)r.code((0,w._)`${x.default.self}.logger.log(${n})`);else if(typeof i.$comment=="function"){let o=(0,w.str)`${s}/$comment`,a=r.scopeValue("root",{ref:e.root});r.code((0,w._)`${x.default.self}.opts.$comment(${n}, ${o}, ${a}.schema)`)}}function ww(r){let{gen:e,schemaEnv:t,validateName:s,ValidationError:i,opts:n}=r;t.$async?e.if((0,w._)`${x.default.errors} === 0`,()=>e.return(x.default.data),()=>e.throw((0,w._)`new ${i}(${x.default.vErrors})`)):(e.assign((0,w._)`${s}.errors`,x.default.vErrors),n.unevaluated&&$w(r),e.return((0,w._)`${x.default.errors} === 0`))}function $w({gen:r,evaluated:e,props:t,items:s}){t instanceof w.Name&&r.assign((0,w._)`${e}.props`,t),s instanceof w.Name&&r.assign((0,w._)`${e}.items`,s)}function fh(r,e,t,s){let{gen:i,schema:n,data:o,allErrors:a,opts:u,self:l}=r,{RULES:c}=l;if(n.$ref&&(u.ignoreKeywordsWithRef||!(0,dt.schemaHasRulesButRef)(n,c))){i.block(()=>Eh(r,"$ref",c.all.$ref.definition));return}u.jtd||Ew(r,e),i.block(()=>{for(let f of c.rules)h(f);h(c.post)});function h(f){(0,_o.shouldUseGroup)(n,f)&&(f.type?(i.if((0,li.checkDataType)(f.type,o,u.strictNumbers)),ph(r,f),e.length===1&&e[0]===f.type&&t&&(i.else(),(0,li.reportTypeError)(r)),i.endIf()):ph(r,f),a||i.if((0,w._)`${x.default.errors} === ${s||0}`))}}function ph(r,e){let{gen:t,schema:s,opts:{useDefaults:i}}=r;i&&(0,uw.assignDefaults)(r,e.type),t.block(()=>{for(let n of e.rules)(0,_o.shouldUseRule)(s,n)&&Eh(r,n.keyword,n.definition,e.type)})}function Ew(r,e){r.schemaEnv.meta||!r.opts.strictTypes||(Sw(r,e),r.opts.allowUnionTypes||Ow(r,e),xw(r,r.dataTypes))}function Sw(r,e){if(e.length){if(!r.dataTypes.length){r.dataTypes=e;return}e.forEach(t=>{$h(r.dataTypes,t)||vo(r,`type "${t}" not allowed by context "${r.dataTypes.join(",")}"`)}),Pw(r,e)}}function Ow(r,e){e.length>1&&!(e.length===2&&e.includes("null"))&&vo(r,"use allowUnionTypes to allow union type keyword")}function xw(r,e){let t=r.self.RULES.all;for(let s in t){let i=t[s];if(typeof i=="object"&&(0,_o.shouldUseRule)(r.schema,i)){let{type:n}=i.definition;n.length&&!n.some(o=>Tw(e,o))&&vo(r,`missing type "${n.join(",")}" for keyword "${s}"`)}}}function Tw(r,e){return r.includes(e)||e==="number"&&r.includes("integer")}function $h(r,e){return r.includes(e)||e==="integer"&&r.includes("number")}function Pw(r,e){let t=[];for(let s of r.dataTypes)$h(e,s)?t.push(s):e.includes("integer")&&s==="number"&&t.push("integer");r.dataTypes=t}function vo(r,e){let t=r.schemaEnv.baseId+r.errSchemaPath;e+=` at "${t}" (strictTypes)`,(0,dt.checkStrictMode)(r,e,r.opts.strictTypes)}var ci=class{constructor(e,t,s){if((0,rs.validateKeywordUsage)(e,t,s),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=s,this.data=e.data,this.schema=e.schema[s],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,dt.schemaRefOrVal)(e,this.schema,s,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",Sh(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,rs.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${s} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:t.errors!==!1)&&(this.errsCount=e.gen.const("_errs",x.default.errors))}result(e,t,s){this.failResult((0,w.not)(e),t,s)}failResult(e,t,s){this.gen.if(e),s?s():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,w.not)(e),void 0,t)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,w._)`${t} !== undefined && (${(0,w.or)(this.invalid$data(),e)})`)}error(e,t,s){if(t){this.setParams(t),this._error(e,s),this.setParams({});return}this._error(e,s)}_error(e,t){(e?ts.reportExtraError:ts.reportError)(this,this.def.error,t)}$dataError(){(0,ts.reportError)(this,this.def.$dataError||ts.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,ts.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,s=w.nil){this.gen.block(()=>{this.check$data(e,s),t()})}check$data(e=w.nil,t=w.nil){if(!this.$data)return;let{gen:s,schemaCode:i,schemaType:n,def:o}=this;s.if((0,w.or)((0,w._)`${i} === undefined`,t)),e!==w.nil&&s.assign(e,!0),(n.length||o.validateSchema)&&(s.elseIf(this.invalid$data()),this.$dataError(),e!==w.nil&&s.assign(e,!1)),s.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:s,def:i,it:n}=this;return(0,w.or)(o(),a());function o(){if(s.length){if(!(t instanceof w.Name))throw new Error("ajv implementation error");let u=Array.isArray(s)?s:[s];return(0,w._)`${(0,li.checkDataTypes)(u,t,n.opts.strictNumbers,li.DataType.Wrong)}`}return w.nil}function a(){if(i.validateSchema){let u=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,w._)`!${u}(${t})`}return w.nil}}subschema(e,t){let s=(0,yo.getSubschema)(this.it,e);(0,yo.extendSubschemaData)(s,this.it,e),(0,yo.extendSubschemaMode)(s,e);let i={...this.it,...s,items:void 0,props:void 0};return mw(i,t),i}mergeEvaluated(e,t){let{it:s,gen:i}=this;s.opts.unevaluated&&(s.props!==!0&&e.props!==void 0&&(s.props=dt.mergeEvaluated.props(i,e.props,s.props,t)),s.items!==!0&&e.items!==void 0&&(s.items=dt.mergeEvaluated.items(i,e.items,s.items,t)))}mergeValidEvaluated(e,t){let{it:s,gen:i}=this;if(s.opts.unevaluated&&(s.props!==!0||s.items!==!0))return i.if(t,()=>this.mergeEvaluated(e,w.Name)),!0}};At.KeywordCxt=ci;function Eh(r,e,t,s){let i=new ci(r,t,e);"code"in t?t.code(i,s):i.$data&&t.validate?(0,rs.funcKeywordCode)(i,t):"macro"in t?(0,rs.macroKeywordCode)(i,t):(t.compile||t.validate)&&(0,rs.funcKeywordCode)(i,t)}var Iw=/^\/(?:[^~]|~0|~1)*$/,Aw=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Sh(r,{dataLevel:e,dataNames:t,dataPathArr:s}){let i,n;if(r==="")return x.default.rootData;if(r[0]==="/"){if(!Iw.test(r))throw new Error(`Invalid JSON-pointer: ${r}`);i=r,n=x.default.rootData}else{let l=Aw.exec(r);if(!l)throw new Error(`Invalid JSON-pointer: ${r}`);let c=+l[1];if(i=l[2],i==="#"){if(c>=e)throw new Error(u("property/index",c));return s[e-c]}if(c>e)throw new Error(u("data",c));if(n=t[e-c],!i)return n}let o=n,a=i.split("/");for(let l of a)l&&(n=(0,w._)`${n}${(0,w.getProperty)((0,dt.unescapeJsonPointer)(l))}`,o=(0,w._)`${o} && ${n}`);return o;function u(l,c){return`Cannot access ${l} ${c} levels up, current level is ${e}`}}At.getData=Sh});var ss=d(wo=>{"use strict";Object.defineProperty(wo,"__esModule",{value:!0});var bo=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};wo.default=bo});var dr=d(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});var $o=es(),Eo=class extends Error{constructor(e,t,s,i){super(i||`can't resolve reference ${s} from id ${t}`),this.missingRef=(0,$o.resolveUrl)(e,t,s),this.missingSchema=(0,$o.normalizeId)((0,$o.getFullPath)(e,this.missingRef))}};So.default=Eo});var is=d(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.resolveSchema=Ce.getCompilingSchema=Ce.resolveRef=Ce.compileSchema=Ce.SchemaEnv=void 0;var Fe=T(),Cw=ss(),Kt=Ie(),Ue=es(),Oh=R(),Rw=hr(),fr=class{constructor(e){var t;this.refs={},this.dynamicAnchors={};let s;typeof e.schema=="object"&&(s=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(t=e.baseId)!==null&&t!==void 0?t:(0,Ue.normalizeId)(s?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=s?.$async,this.refs={}}};Ce.SchemaEnv=fr;function xo(r){let e=xh.call(this,r);if(e)return e;let t=(0,Ue.getFullPath)(this.opts.uriResolver,r.root.baseId),{es5:s,lines:i}=this.opts.code,{ownProperties:n}=this.opts,o=new Fe.CodeGen(this.scope,{es5:s,lines:i,ownProperties:n}),a;r.$async&&(a=o.scopeValue("Error",{ref:Cw.default,code:(0,Fe._)`require("ajv/dist/runtime/validation_error").default`}));let u=o.scopeName("validate");r.validateName=u;let l={gen:o,allErrors:this.opts.allErrors,data:Kt.default.data,parentData:Kt.default.parentData,parentDataProperty:Kt.default.parentDataProperty,dataNames:[Kt.default.data],dataPathArr:[Fe.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",this.opts.code.source===!0?{ref:r.schema,code:(0,Fe.stringify)(r.schema)}:{ref:r.schema}),validateName:u,ValidationError:a,schema:r.schema,schemaEnv:r,rootId:t,baseId:r.baseId||t,schemaPath:Fe.nil,errSchemaPath:r.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Fe._)`""`,opts:this.opts,self:this},c;try{this._compilations.add(r),(0,Rw.validateFunctionCode)(l),o.optimize(this.opts.code.optimize);let h=o.toString();c=`${o.scopeRefs(Kt.default.scope)}return ${h}`,this.opts.code.process&&(c=this.opts.code.process(c,r));let p=new Function(`${Kt.default.self}`,`${Kt.default.scope}`,c)(this,this.scope.get());if(this.scope.value(u,{ref:p}),p.errors=null,p.schema=r.schema,p.schemaEnv=r,r.$async&&(p.$async=!0),this.opts.code.source===!0&&(p.source={validateName:u,validateCode:h,scopeValues:o._values}),this.opts.unevaluated){let{props:m,items:g}=l;p.evaluated={props:m instanceof Fe.Name?void 0:m,items:g instanceof Fe.Name?void 0:g,dynamicProps:m instanceof Fe.Name,dynamicItems:g instanceof Fe.Name},p.source&&(p.source.evaluated=(0,Fe.stringify)(p.evaluated))}return r.validate=p,r}catch(h){throw delete r.validate,delete r.validateName,c&&this.logger.error("Error compiling schema, function code:",c),h}finally{this._compilations.delete(r)}}Ce.compileSchema=xo;function Nw(r,e,t){var s;t=(0,Ue.resolveUrl)(this.opts.uriResolver,e,t);let i=r.refs[t];if(i)return i;let n=jw.call(this,r,t);if(n===void 0){let o=(s=r.localRefs)===null||s===void 0?void 0:s[t],{schemaId:a}=this.opts;o&&(n=new fr({schema:o,schemaId:a,root:r,baseId:e}))}if(n!==void 0)return r.refs[t]=qw.call(this,n)}Ce.resolveRef=Nw;function qw(r){return(0,Ue.inlineRef)(r.schema,this.opts.inlineRefs)?r.schema:r.validate?r:xo.call(this,r)}function xh(r){for(let e of this._compilations)if(kw(e,r))return e}Ce.getCompilingSchema=xh;function kw(r,e){return r.schema===e.schema&&r.root===e.root&&r.baseId===e.baseId}function jw(r,e){let t;for(;typeof(t=this.refs[e])=="string";)e=t;return t||this.schemas[e]||hi.call(this,r,e)}function hi(r,e){let t=this.opts.uriResolver.parse(e),s=(0,Ue._getFullPath)(this.opts.uriResolver,t),i=(0,Ue.getFullPath)(this.opts.uriResolver,r.baseId,void 0);if(Object.keys(r.schema).length>0&&s===i)return Oo.call(this,t,r);let n=(0,Ue.normalizeId)(s),o=this.refs[n]||this.schemas[n];if(typeof o=="string"){let a=hi.call(this,r,o);return typeof a?.schema!="object"?void 0:Oo.call(this,t,a)}if(typeof o?.schema=="object"){if(o.validate||xo.call(this,o),n===(0,Ue.normalizeId)(e)){let{schema:a}=o,{schemaId:u}=this.opts,l=a[u];return l&&(i=(0,Ue.resolveUrl)(this.opts.uriResolver,i,l)),new fr({schema:a,schemaId:u,root:r,baseId:i})}return Oo.call(this,t,o)}}Ce.resolveSchema=hi;var Dw=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Oo(r,{baseId:e,schema:t,root:s}){var i;if(((i=r.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let a of r.fragment.slice(1).split("/")){if(typeof t=="boolean")return;let u=t[(0,Oh.unescapeFragment)(a)];if(u===void 0)return;t=u;let l=typeof t=="object"&&t[this.opts.schemaId];!Dw.has(a)&&l&&(e=(0,Ue.resolveUrl)(this.opts.uriResolver,e,l))}let n;if(typeof t!="boolean"&&t.$ref&&!(0,Oh.schemaHasRulesButRef)(t,this.RULES)){let a=(0,Ue.resolveUrl)(this.opts.uriResolver,e,t.$ref);n=hi.call(this,s,a)}let{schemaId:o}=this.opts;if(n=n||new fr({schema:t,schemaId:o,root:s,baseId:e}),n.schema!==n.root.schema)return n}});var Th=d((YN,Mw)=>{Mw.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var Po=d((XN,Ch)=>{"use strict";var Lw=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Ih=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 To(r){let e="",t=0,s=0;for(s=0;s<r.length;s++)if(t=r[s].charCodeAt(0),t!==48){if(!(t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102))return"";e+=r[s];break}for(s+=1;s<r.length;s++){if(t=r[s].charCodeAt(0),!(t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102))return"";e+=r[s]}return e}var Vw=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function Ph(r){return r.length=0,!0}function Fw(r,e,t){if(r.length){let s=To(r);if(s!=="")e.push(s);else return t.error=!0,!1;r.length=0}return!0}function Uw(r){let e=0,t={error:!1,address:"",zone:""},s=[],i=[],n=!1,o=!1,a=Fw;for(let u=0;u<r.length;u++){let l=r[u];if(!(l==="["||l==="]"))if(l===":"){if(n===!0&&(o=!0),!a(i,s,t))break;if(++e>7){t.error=!0;break}u>0&&r[u-1]===":"&&(n=!0),s.push(":");continue}else if(l==="%"){if(!a(i,s,t))break;a=Ph}else{i.push(l);continue}}return i.length&&(a===Ph?t.zone=i.join(""):o?s.push(i.join("")):s.push(To(i))),t.address=s.join(""),t}function Ah(r){if(Hw(r,":")<2)return{host:r,isIPV6:!1};let e=Uw(r);if(e.error)return{host:r,isIPV6:!1};{let t=e.address,s=e.address;return e.zone&&(t+="%"+e.zone,s+="%25"+e.zone),{host:t,isIPV6:!0,escapedHost:s}}}function Hw(r,e){let t=0;for(let s=0;s<r.length;s++)r[s]===e&&t++;return t}function Gw(r){let e=r,t=[],s=-1,i=0;for(;i=e.length;){if(i===1){if(e===".")break;if(e==="/"){t.push("/");break}else{t.push(e);break}}else if(i===2){if(e[0]==="."){if(e[1]===".")break;if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&(e[1]==="."||e[1]==="/")){t.push("/");break}}else if(i===3&&e==="/.."){t.length!==0&&t.pop(),t.push("/");break}if(e[0]==="."){if(e[1]==="."){if(e[2]==="/"){e=e.slice(3);continue}}else if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&e[1]==="."){if(e[2]==="/"){e=e.slice(2);continue}else if(e[2]==="."&&e[3]==="/"){e=e.slice(3),t.length!==0&&t.pop();continue}}if((s=e.indexOf("/",1))===-1){t.push(e);break}else t.push(e.slice(0,s)),e=e.slice(s)}return t.join("")}function zw(r,e){let t=e!==!0?escape:unescape;return r.scheme!==void 0&&(r.scheme=t(r.scheme)),r.userinfo!==void 0&&(r.userinfo=t(r.userinfo)),r.host!==void 0&&(r.host=t(r.host)),r.path!==void 0&&(r.path=t(r.path)),r.query!==void 0&&(r.query=t(r.query)),r.fragment!==void 0&&(r.fragment=t(r.fragment)),r}function Bw(r){let e=[];if(r.userinfo!==void 0&&(e.push(r.userinfo),e.push("@")),r.host!==void 0){let t=unescape(r.host);if(!Ih(t)){let s=Ah(t);s.isIPV6===!0?t=`[${s.escapedHost}]`:t=r.host}e.push(t)}return(typeof r.port=="number"||typeof r.port=="string")&&(e.push(":"),e.push(String(r.port))),e.length?e.join(""):void 0}Ch.exports={nonSimpleDomain:Vw,recomposeAuthority:Bw,normalizeComponentEncoding:zw,removeDotSegments:Gw,isIPv4:Ih,isUUID:Lw,normalizeIPv6:Ah,stringArrayToHexStripped:To}});var jh=d((JN,kh)=>{"use strict";var{isUUID:Kw}=Po(),Ww=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,Yw=["http","https","ws","wss","urn","urn:uuid"];function Xw(r){return Yw.indexOf(r)!==-1}function Io(r){return r.secure===!0?!0:r.secure===!1?!1:r.scheme?r.scheme.length===3&&(r.scheme[0]==="w"||r.scheme[0]==="W")&&(r.scheme[1]==="s"||r.scheme[1]==="S")&&(r.scheme[2]==="s"||r.scheme[2]==="S"):!1}function Rh(r){return r.host||(r.error=r.error||"HTTP URIs must have a host."),r}function Nh(r){let e=String(r.scheme).toLowerCase()==="https";return(r.port===(e?443:80)||r.port==="")&&(r.port=void 0),r.path||(r.path="/"),r}function Jw(r){return r.secure=Io(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r}function Zw(r){if((r.port===(Io(r)?443:80)||r.port==="")&&(r.port=void 0),typeof r.secure=="boolean"&&(r.scheme=r.secure?"wss":"ws",r.secure=void 0),r.resourceName){let[e,t]=r.resourceName.split("?");r.path=e&&e!=="/"?e:void 0,r.query=t,r.resourceName=void 0}return r.fragment=void 0,r}function Qw(r,e){if(!r.path)return r.error="URN can not be parsed",r;let t=r.path.match(Ww);if(t){let s=e.scheme||r.scheme||"urn";r.nid=t[1].toLowerCase(),r.nss=t[2];let i=`${s}:${e.nid||r.nid}`,n=Ao(i);r.path=void 0,n&&(r=n.parse(r,e))}else r.error=r.error||"URN can not be parsed.";return r}function e$(r,e){if(r.nid===void 0)throw new Error("URN without nid cannot be serialized");let t=e.scheme||r.scheme||"urn",s=r.nid.toLowerCase(),i=`${t}:${e.nid||s}`,n=Ao(i);n&&(r=n.serialize(r,e));let o=r,a=r.nss;return o.path=`${s||e.nid}:${a}`,e.skipEscape=!0,o}function t$(r,e){let t=r;return t.uuid=t.nss,t.nss=void 0,!e.tolerant&&(!t.uuid||!Kw(t.uuid))&&(t.error=t.error||"UUID is not valid."),t}function r$(r){let e=r;return e.nss=(r.uuid||"").toLowerCase(),e}var qh={scheme:"http",domainHost:!0,parse:Rh,serialize:Nh},s$={scheme:"https",domainHost:qh.domainHost,parse:Rh,serialize:Nh},di={scheme:"ws",domainHost:!0,parse:Jw,serialize:Zw},i$={scheme:"wss",domainHost:di.domainHost,parse:di.parse,serialize:di.serialize},n$={scheme:"urn",parse:Qw,serialize:e$,skipNormalize:!0},o$={scheme:"urn:uuid",parse:t$,serialize:r$,skipNormalize:!0},fi={http:qh,https:s$,ws:di,wss:i$,urn:n$,"urn:uuid":o$};Object.setPrototypeOf(fi,null);function Ao(r){return r&&(fi[r]||fi[r.toLowerCase()])||void 0}kh.exports={wsIsSecure:Io,SCHEMES:fi,isValidSchemeName:Xw,getSchemeHandler:Ao}});var Lh=d((ZN,mi)=>{"use strict";var{normalizeIPv6:a$,removeDotSegments:ns,recomposeAuthority:u$,normalizeComponentEncoding:pi,isIPv4:l$,nonSimpleDomain:c$}=Po(),{SCHEMES:h$,getSchemeHandler:Dh}=jh();function d$(r,e){return typeof r=="string"?r=Qe(ft(r,e),e):typeof r=="object"&&(r=ft(Qe(r,e),e)),r}function f$(r,e,t){let s=t?Object.assign({scheme:"null"},t):{scheme:"null"},i=Mh(ft(r,s),ft(e,s),s,!0);return s.skipEscape=!0,Qe(i,s)}function Mh(r,e,t,s){let i={};return s||(r=ft(Qe(r,t),t),e=ft(Qe(e,t),t)),t=t||{},!t.tolerant&&e.scheme?(i.scheme=e.scheme,i.userinfo=e.userinfo,i.host=e.host,i.port=e.port,i.path=ns(e.path||""),i.query=e.query):(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0?(i.userinfo=e.userinfo,i.host=e.host,i.port=e.port,i.path=ns(e.path||""),i.query=e.query):(e.path?(e.path[0]==="/"?i.path=ns(e.path):((r.userinfo!==void 0||r.host!==void 0||r.port!==void 0)&&!r.path?i.path="/"+e.path:r.path?i.path=r.path.slice(0,r.path.lastIndexOf("/")+1)+e.path:i.path=e.path,i.path=ns(i.path)),i.query=e.query):(i.path=r.path,e.query!==void 0?i.query=e.query:i.query=r.query),i.userinfo=r.userinfo,i.host=r.host,i.port=r.port),i.scheme=r.scheme),i.fragment=e.fragment,i}function p$(r,e,t){return typeof r=="string"?(r=unescape(r),r=Qe(pi(ft(r,t),!0),{...t,skipEscape:!0})):typeof r=="object"&&(r=Qe(pi(r,!0),{...t,skipEscape:!0})),typeof e=="string"?(e=unescape(e),e=Qe(pi(ft(e,t),!0),{...t,skipEscape:!0})):typeof e=="object"&&(e=Qe(pi(e,!0),{...t,skipEscape:!0})),r.toLowerCase()===e.toLowerCase()}function Qe(r,e){let t={host:r.host,scheme:r.scheme,userinfo:r.userinfo,port:r.port,path:r.path,query:r.query,nid:r.nid,nss:r.nss,uuid:r.uuid,fragment:r.fragment,reference:r.reference,resourceName:r.resourceName,secure:r.secure,error:""},s=Object.assign({},e),i=[],n=Dh(s.scheme||t.scheme);n&&n.serialize&&n.serialize(t,s),t.path!==void 0&&(s.skipEscape?t.path=unescape(t.path):(t.path=escape(t.path),t.scheme!==void 0&&(t.path=t.path.split("%3A").join(":")))),s.reference!=="suffix"&&t.scheme&&i.push(t.scheme,":");let o=u$(t);if(o!==void 0&&(s.reference!=="suffix"&&i.push("//"),i.push(o),t.path&&t.path[0]!=="/"&&i.push("/")),t.path!==void 0){let a=t.path;!s.absolutePath&&(!n||!n.absolutePath)&&(a=ns(a)),o===void 0&&a[0]==="/"&&a[1]==="/"&&(a="/%2F"+a.slice(2)),i.push(a)}return t.query!==void 0&&i.push("?",t.query),t.fragment!==void 0&&i.push("#",t.fragment),i.join("")}var m$=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function ft(r,e){let t=Object.assign({},e),s={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=!1;t.reference==="suffix"&&(t.scheme?r=t.scheme+":"+r:r="//"+r);let n=r.match(m$);if(n){if(s.scheme=n[1],s.userinfo=n[3],s.host=n[4],s.port=parseInt(n[5],10),s.path=n[6]||"",s.query=n[7],s.fragment=n[8],isNaN(s.port)&&(s.port=n[5]),s.host)if(l$(s.host)===!1){let u=a$(s.host);s.host=u.host.toLowerCase(),i=u.isIPV6}else i=!0;s.scheme===void 0&&s.userinfo===void 0&&s.host===void 0&&s.port===void 0&&s.query===void 0&&!s.path?s.reference="same-document":s.scheme===void 0?s.reference="relative":s.fragment===void 0?s.reference="absolute":s.reference="uri",t.reference&&t.reference!=="suffix"&&t.reference!==s.reference&&(s.error=s.error||"URI is not a "+t.reference+" reference.");let o=Dh(t.scheme||s.scheme);if(!t.unicodeSupport&&(!o||!o.unicodeSupport)&&s.host&&(t.domainHost||o&&o.domainHost)&&i===!1&&c$(s.host))try{s.host=URL.domainToASCII(s.host.toLowerCase())}catch(a){s.error=s.error||"Host's domain name can not be converted to ASCII: "+a}(!o||o&&!o.skipNormalize)&&(r.indexOf("%")!==-1&&(s.scheme!==void 0&&(s.scheme=unescape(s.scheme)),s.host!==void 0&&(s.host=unescape(s.host))),s.path&&(s.path=escape(unescape(s.path))),s.fragment&&(s.fragment=encodeURI(decodeURIComponent(s.fragment)))),o&&o.parse&&o.parse(s,t)}else s.error=s.error||"URI can not be parsed.";return s}var Co={SCHEMES:h$,normalize:d$,resolve:f$,resolveComponent:Mh,equal:p$,serialize:Qe,parse:ft};mi.exports=Co;mi.exports.default=Co;mi.exports.fastUri=Co});var Fh=d(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});var Vh=Lh();Vh.code='require("ajv/dist/runtime/uri").default';Ro.default=Vh});var ko=d(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.CodeGen=oe.Name=oe.nil=oe.stringify=oe.str=oe._=oe.KeywordCxt=void 0;var g$=hr();Object.defineProperty(oe,"KeywordCxt",{enumerable:!0,get:function(){return g$.KeywordCxt}});var pr=T();Object.defineProperty(oe,"_",{enumerable:!0,get:function(){return pr._}});Object.defineProperty(oe,"str",{enumerable:!0,get:function(){return pr.str}});Object.defineProperty(oe,"stringify",{enumerable:!0,get:function(){return pr.stringify}});Object.defineProperty(oe,"nil",{enumerable:!0,get:function(){return pr.nil}});Object.defineProperty(oe,"Name",{enumerable:!0,get:function(){return pr.Name}});Object.defineProperty(oe,"CodeGen",{enumerable:!0,get:function(){return pr.CodeGen}});var y$=ss(),Bh=dr(),_$=oo(),os=is(),v$=T(),as=es(),gi=Qr(),qo=R(),Uh=Th(),b$=Fh(),Kh=(r,e)=>new RegExp(r,e);Kh.code="new RegExp";var w$=["removeAdditional","useDefaults","coerceTypes"],$$=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),E$={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."},S$={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Hh=200;function O$(r){var e,t,s,i,n,o,a,u,l,c,h,f,p,m,g,y,_,S,O,E,$,le,U,De,xe;let G=r.strict,N=(e=r.code)===null||e===void 0?void 0:e.optimize,Ws=N===!0||N===void 0?1:N||0,Vr=(s=(t=r.code)===null||t===void 0?void 0:t.regExp)!==null&&s!==void 0?s:Kh,Me=(i=r.uriResolver)!==null&&i!==void 0?i:b$.default;return{strictSchema:(o=(n=r.strictSchema)!==null&&n!==void 0?n:G)!==null&&o!==void 0?o:!0,strictNumbers:(u=(a=r.strictNumbers)!==null&&a!==void 0?a:G)!==null&&u!==void 0?u:!0,strictTypes:(c=(l=r.strictTypes)!==null&&l!==void 0?l:G)!==null&&c!==void 0?c:"log",strictTuples:(f=(h=r.strictTuples)!==null&&h!==void 0?h:G)!==null&&f!==void 0?f:"log",strictRequired:(m=(p=r.strictRequired)!==null&&p!==void 0?p:G)!==null&&m!==void 0?m:!1,code:r.code?{...r.code,optimize:Ws,regExp:Vr}:{optimize:Ws,regExp:Vr},loopRequired:(g=r.loopRequired)!==null&&g!==void 0?g:Hh,loopEnum:(y=r.loopEnum)!==null&&y!==void 0?y:Hh,meta:(_=r.meta)!==null&&_!==void 0?_:!0,messages:(S=r.messages)!==null&&S!==void 0?S:!0,inlineRefs:(O=r.inlineRefs)!==null&&O!==void 0?O:!0,schemaId:(E=r.schemaId)!==null&&E!==void 0?E:"$id",addUsedSchema:($=r.addUsedSchema)!==null&&$!==void 0?$:!0,validateSchema:(le=r.validateSchema)!==null&&le!==void 0?le:!0,validateFormats:(U=r.validateFormats)!==null&&U!==void 0?U:!0,unicodeRegExp:(De=r.unicodeRegExp)!==null&&De!==void 0?De:!0,int32range:(xe=r.int32range)!==null&&xe!==void 0?xe:!0,uriResolver:Me}}var us=class{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...O$(e)};let{es5:t,lines:s}=this.opts.code;this.scope=new v$.ValueScope({scope:{},prefixes:$$,es5:t,lines:s}),this.logger=C$(e.logger);let i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,_$.getRules)(),Gh.call(this,E$,e,"NOT SUPPORTED"),Gh.call(this,S$,e,"DEPRECATED","warn"),this._metaOpts=I$.call(this),e.formats&&T$.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&P$.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),x$.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:s}=this.opts,i=Uh;s==="id"&&(i={...Uh},i.id=i.$id,delete i.$id),t&&e&&this.addMetaSchema(i,i[s],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[t]||e:void 0}validate(e,t){let s;if(typeof e=="string"){if(s=this.getSchema(e),!s)throw new Error(`no schema with key or ref "${e}"`)}else s=this.compile(e);let i=s(t);return"$async"in s||(this.errors=s.errors),i}compile(e,t){let s=this._addSchema(e,t);return s.validate||this._compileSchemaEnv(s)}compileAsync(e,t){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:s}=this.opts;return i.call(this,e,t);async function i(c,h){await n.call(this,c.$schema);let f=this._addSchema(c,h);return f.validate||o.call(this,f)}async function n(c){c&&!this.getSchema(c)&&await i.call(this,{$ref:c},!0)}async function o(c){try{return this._compileSchemaEnv(c)}catch(h){if(!(h instanceof Bh.default))throw h;return a.call(this,h),await u.call(this,h.missingSchema),o.call(this,c)}}function a({missingSchema:c,missingRef:h}){if(this.refs[c])throw new Error(`AnySchema ${c} is loaded but ${h} cannot be resolved`)}async function u(c){let h=await l.call(this,c);this.refs[c]||await n.call(this,h.$schema),this.refs[c]||this.addSchema(h,c,t)}async function l(c){let h=this._loading[c];if(h)return h;try{return await(this._loading[c]=s(c))}finally{delete this._loading[c]}}}addSchema(e,t,s,i=this.opts.validateSchema){if(Array.isArray(e)){for(let o of e)this.addSchema(o,void 0,s,i);return this}let n;if(typeof e=="object"){let{schemaId:o}=this.opts;if(n=e[o],n!==void 0&&typeof n!="string")throw new Error(`schema ${o} must be string`)}return t=(0,as.normalizeId)(t||n),this._checkUnique(t),this.schemas[t]=this._addSchema(e,s,t,i,!0),this}addMetaSchema(e,t,s=this.opts.validateSchema){return this.addSchema(e,t,!0,s),this}validateSchema(e,t){if(typeof e=="boolean")return!0;let s;if(s=e.$schema,s!==void 0&&typeof s!="string")throw new Error("$schema must be a string");if(s=s||this.opts.defaultMeta||this.defaultMeta(),!s)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(s,e);if(!i&&t){let n="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(n);else throw new Error(n)}return i}getSchema(e){let t;for(;typeof(t=zh.call(this,e))=="string";)e=t;if(t===void 0){let{schemaId:s}=this.opts,i=new os.SchemaEnv({schema:{},schemaId:s});if(t=os.resolveSchema.call(this,i,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=zh.call(this,e);return typeof t=="object"&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let t=e;this._cache.delete(t);let s=e[this.opts.schemaId];return s&&(s=(0,as.normalizeId)(s),delete this.schemas[s],delete this.refs[s]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let s;if(typeof e=="string")s=e,typeof t=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=s);else if(typeof e=="object"&&t===void 0){if(t=e,s=t.keyword,Array.isArray(s)&&!s.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(N$.call(this,s,t),!t)return(0,qo.eachItem)(s,n=>No.call(this,n)),this;k$.call(this,t);let i={...t,type:(0,gi.getJSONTypes)(t.type),schemaType:(0,gi.getJSONTypes)(t.schemaType)};return(0,qo.eachItem)(s,i.type.length===0?n=>No.call(this,n,i):n=>i.type.forEach(o=>No.call(this,n,i,o))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t=="object"?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let s of t.rules){let i=s.rules.findIndex(n=>n.keyword===e);i>=0&&s.rules.splice(i,1)}return this}addFormat(e,t){return typeof t=="string"&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:s="data"}={}){return!e||e.length===0?"No errors":e.map(i=>`${s}${i.instancePath} ${i.message}`).reduce((i,n)=>i+t+n)}$dataMetaSchema(e,t){let s=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let i of t){let n=i.split("/").slice(1),o=e;for(let a of n)o=o[a];for(let a in s){let u=s[a];if(typeof u!="object")continue;let{$data:l}=u.definition,c=o[a];l&&c&&(o[a]=Wh(c))}}return e}_removeAllSchemas(e,t){for(let s in e){let i=e[s];(!t||t.test(s))&&(typeof i=="string"?delete e[s]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[s]))}}_addSchema(e,t,s,i=this.opts.validateSchema,n=this.opts.addUsedSchema){let o,{schemaId:a}=this.opts;if(typeof e=="object")o=e[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let u=this._cache.get(e);if(u!==void 0)return u;s=(0,as.normalizeId)(o||s);let l=as.getSchemaRefs.call(this,e,s);return u=new os.SchemaEnv({schema:e,schemaId:a,meta:t,baseId:s,localRefs:l}),this._cache.set(u.schema,u),n&&!s.startsWith("#")&&(s&&this._checkUnique(s),this.refs[s]=u),i&&this.validateSchema(e,!0),u}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):os.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{os.compileSchema.call(this,e)}finally{this.opts=t}}};us.ValidationError=y$.default;us.MissingRefError=Bh.default;oe.default=us;function Gh(r,e,t,s="error"){for(let i in r){let n=i;n in e&&this.logger[s](`${t}: option ${i}. ${r[n]}`)}}function zh(r){return r=(0,as.normalizeId)(r),this.schemas[r]||this.refs[r]}function x$(){let r=this.opts.schemas;if(r)if(Array.isArray(r))this.addSchema(r);else for(let e in r)this.addSchema(r[e],e)}function T$(){for(let r in this.opts.formats){let e=this.opts.formats[r];e&&this.addFormat(r,e)}}function P$(r){if(Array.isArray(r)){this.addVocabulary(r);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in r){let t=r[e];t.keyword||(t.keyword=e),this.addKeyword(t)}}function I$(){let r={...this.opts};for(let e of w$)delete r[e];return r}var A$={log(){},warn(){},error(){}};function C$(r){if(r===!1)return A$;if(r===void 0)return console;if(r.log&&r.warn&&r.error)return r;throw new Error("logger must implement log, warn and error methods")}var R$=/^[a-z_$][a-z0-9_$:-]*$/i;function N$(r,e){let{RULES:t}=this;if((0,qo.eachItem)(r,s=>{if(t.keywords[s])throw new Error(`Keyword ${s} is already defined`);if(!R$.test(s))throw new Error(`Keyword ${s} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function No(r,e,t){var s;let i=e?.post;if(t&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:n}=this,o=i?n.post:n.rules.find(({type:u})=>u===t);if(o||(o={type:t,rules:[]},n.rules.push(o)),n.keywords[r]=!0,!e)return;let a={keyword:r,definition:{...e,type:(0,gi.getJSONTypes)(e.type),schemaType:(0,gi.getJSONTypes)(e.schemaType)}};e.before?q$.call(this,o,a,e.before):o.rules.push(a),n.all[r]=a,(s=e.implements)===null||s===void 0||s.forEach(u=>this.addKeyword(u))}function q$(r,e,t){let s=r.rules.findIndex(i=>i.keyword===t);s>=0?r.rules.splice(s,0,e):(r.rules.push(e),this.logger.warn(`rule ${t} is not defined`))}function k$(r){let{metaSchema:e}=r;e!==void 0&&(r.$data&&this.opts.$data&&(e=Wh(e)),r.validateSchema=this.compile(e,!0))}var j$={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Wh(r){return{anyOf:[r,j$]}}});var Yh=d(jo=>{"use strict";Object.defineProperty(jo,"__esModule",{value:!0});var D$={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};jo.default=D$});var vi=d(Wt=>{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.callRef=Wt.getValidate=void 0;var M$=dr(),Xh=Ae(),Ee=T(),mr=Ie(),Jh=is(),yi=R(),L$={keyword:"$ref",schemaType:"string",code(r){let{gen:e,schema:t,it:s}=r,{baseId:i,schemaEnv:n,validateName:o,opts:a,self:u}=s,{root:l}=n;if((t==="#"||t==="#/")&&i===l.baseId)return h();let c=Jh.resolveRef.call(u,l,i,t);if(c===void 0)throw new M$.default(s.opts.uriResolver,i,t);if(c instanceof Jh.SchemaEnv)return f(c);return p(c);function h(){if(n===l)return _i(r,o,n,n.$async);let m=e.scopeValue("root",{ref:l});return _i(r,(0,Ee._)`${m}.validate`,l,l.$async)}function f(m){let g=Zh(r,m);_i(r,g,m,m.$async)}function p(m){let g=e.scopeValue("schema",a.code.source===!0?{ref:m,code:(0,Ee.stringify)(m)}:{ref:m}),y=e.name("valid"),_=r.subschema({schema:m,dataTypes:[],schemaPath:Ee.nil,topSchemaRef:g,errSchemaPath:t},y);r.mergeEvaluated(_),r.ok(y)}}};function Zh(r,e){let{gen:t}=r;return e.validate?t.scopeValue("validate",{ref:e.validate}):(0,Ee._)`${t.scopeValue("wrapper",{ref:e})}.validate`}Wt.getValidate=Zh;function _i(r,e,t,s){let{gen:i,it:n}=r,{allErrors:o,schemaEnv:a,opts:u}=n,l=u.passContext?mr.default.this:Ee.nil;s?c():h();function c(){if(!a.$async)throw new Error("async schema referenced by sync schema");let m=i.let("valid");i.try(()=>{i.code((0,Ee._)`await ${(0,Xh.callValidateCode)(r,e,l)}`),p(e),o||i.assign(m,!0)},g=>{i.if((0,Ee._)`!(${g} instanceof ${n.ValidationError})`,()=>i.throw(g)),f(g),o||i.assign(m,!1)}),r.ok(m)}function h(){r.result((0,Xh.callValidateCode)(r,e,l),()=>p(e),()=>f(e))}function f(m){let g=(0,Ee._)`${m}.errors`;i.assign(mr.default.vErrors,(0,Ee._)`${mr.default.vErrors} === null ? ${g} : ${mr.default.vErrors}.concat(${g})`),i.assign(mr.default.errors,(0,Ee._)`${mr.default.vErrors}.length`)}function p(m){var g;if(!n.opts.unevaluated)return;let y=(g=t?.validate)===null||g===void 0?void 0:g.evaluated;if(n.props!==!0)if(y&&!y.dynamicProps)y.props!==void 0&&(n.props=yi.mergeEvaluated.props(i,y.props,n.props));else{let _=i.var("props",(0,Ee._)`${m}.evaluated.props`);n.props=yi.mergeEvaluated.props(i,_,n.props,Ee.Name)}if(n.items!==!0)if(y&&!y.dynamicItems)y.items!==void 0&&(n.items=yi.mergeEvaluated.items(i,y.items,n.items));else{let _=i.var("items",(0,Ee._)`${m}.evaluated.items`);n.items=yi.mergeEvaluated.items(i,_,n.items,Ee.Name)}}}Wt.callRef=_i;Wt.default=L$});var Mo=d(Do=>{"use strict";Object.defineProperty(Do,"__esModule",{value:!0});var V$=Yh(),F$=vi(),U$=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",V$.default,F$.default];Do.default=U$});var Qh=d(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});var bi=T(),Ct=bi.operators,wi={maximum:{okStr:"<=",ok:Ct.LTE,fail:Ct.GT},minimum:{okStr:">=",ok:Ct.GTE,fail:Ct.LT},exclusiveMaximum:{okStr:"<",ok:Ct.LT,fail:Ct.GTE},exclusiveMinimum:{okStr:">",ok:Ct.GT,fail:Ct.LTE}},H$={message:({keyword:r,schemaCode:e})=>(0,bi.str)`must be ${wi[r].okStr} ${e}`,params:({keyword:r,schemaCode:e})=>(0,bi._)`{comparison: ${wi[r].okStr}, limit: ${e}}`},G$={keyword:Object.keys(wi),type:"number",schemaType:"number",$data:!0,error:H$,code(r){let{keyword:e,data:t,schemaCode:s}=r;r.fail$data((0,bi._)`${t} ${wi[e].fail} ${s} || isNaN(${t})`)}};Lo.default=G$});var ed=d(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});var ls=T(),z$={message:({schemaCode:r})=>(0,ls.str)`must be multiple of ${r}`,params:({schemaCode:r})=>(0,ls._)`{multipleOf: ${r}}`},B$={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:z$,code(r){let{gen:e,data:t,schemaCode:s,it:i}=r,n=i.opts.multipleOfPrecision,o=e.let("res"),a=n?(0,ls._)`Math.abs(Math.round(${o}) - ${o}) > 1e-${n}`:(0,ls._)`${o} !== parseInt(${o})`;r.fail$data((0,ls._)`(${s} === 0 || (${o} = ${t}/${s}, ${a}))`)}};Vo.default=B$});var rd=d(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:!0});function td(r){let e=r.length,t=0,s=0,i;for(;s<e;)t++,i=r.charCodeAt(s++),i>=55296&&i<=56319&&s<e&&(i=r.charCodeAt(s),(i&64512)===56320&&s++);return t}Fo.default=td;td.code='require("ajv/dist/runtime/ucs2length").default'});var sd=d(Uo=>{"use strict";Object.defineProperty(Uo,"__esModule",{value:!0});var Yt=T(),K$=R(),W$=rd(),Y$={message({keyword:r,schemaCode:e}){let t=r==="maxLength"?"more":"fewer";return(0,Yt.str)`must NOT have ${t} than ${e} characters`},params:({schemaCode:r})=>(0,Yt._)`{limit: ${r}}`},X$={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Y$,code(r){let{keyword:e,data:t,schemaCode:s,it:i}=r,n=e==="maxLength"?Yt.operators.GT:Yt.operators.LT,o=i.opts.unicode===!1?(0,Yt._)`${t}.length`:(0,Yt._)`${(0,K$.useFunc)(r.gen,W$.default)}(${t})`;r.fail$data((0,Yt._)`${o} ${n} ${s}`)}};Uo.default=X$});var id=d(Ho=>{"use strict";Object.defineProperty(Ho,"__esModule",{value:!0});var J$=Ae(),Z$=R(),gr=T(),Q$={message:({schemaCode:r})=>(0,gr.str)`must match pattern "${r}"`,params:({schemaCode:r})=>(0,gr._)`{pattern: ${r}}`},eE={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:Q$,code(r){let{gen:e,data:t,$data:s,schema:i,schemaCode:n,it:o}=r,a=o.opts.unicodeRegExp?"u":"";if(s){let{regExp:u}=o.opts.code,l=u.code==="new RegExp"?(0,gr._)`new RegExp`:(0,Z$.useFunc)(e,u),c=e.let("valid");e.try(()=>e.assign(c,(0,gr._)`${l}(${n}, ${a}).test(${t})`),()=>e.assign(c,!1)),r.fail$data((0,gr._)`!${c}`)}else{let u=(0,J$.usePattern)(r,i);r.fail$data((0,gr._)`!${u}.test(${t})`)}}};Ho.default=eE});var nd=d(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});var cs=T(),tE={message({keyword:r,schemaCode:e}){let t=r==="maxProperties"?"more":"fewer";return(0,cs.str)`must NOT have ${t} than ${e} properties`},params:({schemaCode:r})=>(0,cs._)`{limit: ${r}}`},rE={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:tE,code(r){let{keyword:e,data:t,schemaCode:s}=r,i=e==="maxProperties"?cs.operators.GT:cs.operators.LT;r.fail$data((0,cs._)`Object.keys(${t}).length ${i} ${s}`)}};Go.default=rE});var od=d(zo=>{"use strict";Object.defineProperty(zo,"__esModule",{value:!0});var hs=Ae(),ds=T(),sE=R(),iE={message:({params:{missingProperty:r}})=>(0,ds.str)`must have required property '${r}'`,params:({params:{missingProperty:r}})=>(0,ds._)`{missingProperty: ${r}}`},nE={keyword:"required",type:"object",schemaType:"array",$data:!0,error:iE,code(r){let{gen:e,schema:t,schemaCode:s,data:i,$data:n,it:o}=r,{opts:a}=o;if(!n&&t.length===0)return;let u=t.length>=a.loopRequired;if(o.allErrors?l():c(),a.strictRequired){let p=r.parentSchema.properties,{definedProperties:m}=r.it;for(let g of t)if(p?.[g]===void 0&&!m.has(g)){let y=o.schemaEnv.baseId+o.errSchemaPath,_=`required property "${g}" is not defined at "${y}" (strictRequired)`;(0,sE.checkStrictMode)(o,_,o.opts.strictRequired)}}function l(){if(u||n)r.block$data(ds.nil,h);else for(let p of t)(0,hs.checkReportMissingProp)(r,p)}function c(){let p=e.let("missing");if(u||n){let m=e.let("valid",!0);r.block$data(m,()=>f(p,m)),r.ok(m)}else e.if((0,hs.checkMissingProp)(r,t,p)),(0,hs.reportMissingProp)(r,p),e.else()}function h(){e.forOf("prop",s,p=>{r.setParams({missingProperty:p}),e.if((0,hs.noPropertyInData)(e,i,p,a.ownProperties),()=>r.error())})}function f(p,m){r.setParams({missingProperty:p}),e.forOf(p,s,()=>{e.assign(m,(0,hs.propertyInData)(e,i,p,a.ownProperties)),e.if((0,ds.not)(m),()=>{r.error(),e.break()})},ds.nil)}}};zo.default=nE});var ad=d(Bo=>{"use strict";Object.defineProperty(Bo,"__esModule",{value:!0});var fs=T(),oE={message({keyword:r,schemaCode:e}){let t=r==="maxItems"?"more":"fewer";return(0,fs.str)`must NOT have ${t} than ${e} items`},params:({schemaCode:r})=>(0,fs._)`{limit: ${r}}`},aE={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:oE,code(r){let{keyword:e,data:t,schemaCode:s}=r,i=e==="maxItems"?fs.operators.GT:fs.operators.LT;r.fail$data((0,fs._)`${t}.length ${i} ${s}`)}};Bo.default=aE});var $i=d(Ko=>{"use strict";Object.defineProperty(Ko,"__esModule",{value:!0});var ud=mo();ud.code='require("ajv/dist/runtime/equal").default';Ko.default=ud});var ld=d(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});var Wo=Qr(),ae=T(),uE=R(),lE=$i(),cE={message:({params:{i:r,j:e}})=>(0,ae.str)`must NOT have duplicate items (items ## ${e} and ${r} are identical)`,params:({params:{i:r,j:e}})=>(0,ae._)`{i: ${r}, j: ${e}}`},hE={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:cE,code(r){let{gen:e,data:t,$data:s,schema:i,parentSchema:n,schemaCode:o,it:a}=r;if(!s&&!i)return;let u=e.let("valid"),l=n.items?(0,Wo.getSchemaTypes)(n.items):[];r.block$data(u,c,(0,ae._)`${o} === false`),r.ok(u);function c(){let m=e.let("i",(0,ae._)`${t}.length`),g=e.let("j");r.setParams({i:m,j:g}),e.assign(u,!0),e.if((0,ae._)`${m} > 1`,()=>(h()?f:p)(m,g))}function h(){return l.length>0&&!l.some(m=>m==="object"||m==="array")}function f(m,g){let y=e.name("item"),_=(0,Wo.checkDataTypes)(l,y,a.opts.strictNumbers,Wo.DataType.Wrong),S=e.const("indices",(0,ae._)`{}`);e.for((0,ae._)`;${m}--;`,()=>{e.let(y,(0,ae._)`${t}[${m}]`),e.if(_,(0,ae._)`continue`),l.length>1&&e.if((0,ae._)`typeof ${y} == "string"`,(0,ae._)`${y} += "_"`),e.if((0,ae._)`typeof ${S}[${y}] == "number"`,()=>{e.assign(g,(0,ae._)`${S}[${y}]`),r.error(),e.assign(u,!1).break()}).code((0,ae._)`${S}[${y}] = ${m}`)})}function p(m,g){let y=(0,uE.useFunc)(e,lE.default),_=e.name("outer");e.label(_).for((0,ae._)`;${m}--;`,()=>e.for((0,ae._)`${g} = ${m}; ${g}--;`,()=>e.if((0,ae._)`${y}(${t}[${m}], ${t}[${g}])`,()=>{r.error(),e.assign(u,!1).break(_)})))}}};Yo.default=hE});var cd=d(Jo=>{"use strict";Object.defineProperty(Jo,"__esModule",{value:!0});var Xo=T(),dE=R(),fE=$i(),pE={message:"must be equal to constant",params:({schemaCode:r})=>(0,Xo._)`{allowedValue: ${r}}`},mE={keyword:"const",$data:!0,error:pE,code(r){let{gen:e,data:t,$data:s,schemaCode:i,schema:n}=r;s||n&&typeof n=="object"?r.fail$data((0,Xo._)`!${(0,dE.useFunc)(e,fE.default)}(${t}, ${i})`):r.fail((0,Xo._)`${n} !== ${t}`)}};Jo.default=mE});var hd=d(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});var ps=T(),gE=R(),yE=$i(),_E={message:"must be equal to one of the allowed values",params:({schemaCode:r})=>(0,ps._)`{allowedValues: ${r}}`},vE={keyword:"enum",schemaType:"array",$data:!0,error:_E,code(r){let{gen:e,data:t,$data:s,schema:i,schemaCode:n,it:o}=r;if(!s&&i.length===0)throw new Error("enum must have non-empty array");let a=i.length>=o.opts.loopEnum,u,l=()=>u??(u=(0,gE.useFunc)(e,yE.default)),c;if(a||s)c=e.let("valid"),r.block$data(c,h);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let p=e.const("vSchema",n);c=(0,ps.or)(...i.map((m,g)=>f(p,g)))}r.pass(c);function h(){e.assign(c,!1),e.forOf("v",n,p=>e.if((0,ps._)`${l()}(${t}, ${p})`,()=>e.assign(c,!0).break()))}function f(p,m){let g=i[m];return typeof g=="object"&&g!==null?(0,ps._)`${l()}(${t}, ${p}[${m}])`:(0,ps._)`${t} === ${g}`}}};Zo.default=vE});var ea=d(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});var bE=Qh(),wE=ed(),$E=sd(),EE=id(),SE=nd(),OE=od(),xE=ad(),TE=ld(),PE=cd(),IE=hd(),AE=[bE.default,wE.default,$E.default,EE.default,SE.default,OE.default,xE.default,TE.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},PE.default,IE.default];Qo.default=AE});var ra=d(ms=>{"use strict";Object.defineProperty(ms,"__esModule",{value:!0});ms.validateAdditionalItems=void 0;var Xt=T(),ta=R(),CE={message:({params:{len:r}})=>(0,Xt.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,Xt._)`{limit: ${r}}`},RE={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:CE,code(r){let{parentSchema:e,it:t}=r,{items:s}=e;if(!Array.isArray(s)){(0,ta.checkStrictMode)(t,'"additionalItems" is ignored when "items" is not an array of schemas');return}dd(r,s)}};function dd(r,e){let{gen:t,schema:s,data:i,keyword:n,it:o}=r;o.items=!0;let a=t.const("len",(0,Xt._)`${i}.length`);if(s===!1)r.setParams({len:e.length}),r.pass((0,Xt._)`${a} <= ${e.length}`);else if(typeof s=="object"&&!(0,ta.alwaysValidSchema)(o,s)){let l=t.var("valid",(0,Xt._)`${a} <= ${e.length}`);t.if((0,Xt.not)(l),()=>u(l)),r.ok(l)}function u(l){t.forRange("i",e.length,a,c=>{r.subschema({keyword:n,dataProp:c,dataPropType:ta.Type.Num},l),o.allErrors||t.if((0,Xt.not)(l),()=>t.break())})}}ms.validateAdditionalItems=dd;ms.default=RE});var sa=d(gs=>{"use strict";Object.defineProperty(gs,"__esModule",{value:!0});gs.validateTuple=void 0;var fd=T(),Ei=R(),NE=Ae(),qE={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(r){let{schema:e,it:t}=r;if(Array.isArray(e))return pd(r,"additionalItems",e);t.items=!0,!(0,Ei.alwaysValidSchema)(t,e)&&r.ok((0,NE.validateArray)(r))}};function pd(r,e,t=r.schema){let{gen:s,parentSchema:i,data:n,keyword:o,it:a}=r;c(i),a.opts.unevaluated&&t.length&&a.items!==!0&&(a.items=Ei.mergeEvaluated.items(s,t.length,a.items));let u=s.name("valid"),l=s.const("len",(0,fd._)`${n}.length`);t.forEach((h,f)=>{(0,Ei.alwaysValidSchema)(a,h)||(s.if((0,fd._)`${l} > ${f}`,()=>r.subschema({keyword:o,schemaProp:f,dataProp:f},u)),r.ok(u))});function c(h){let{opts:f,errSchemaPath:p}=a,m=t.length,g=m===h.minItems&&(m===h.maxItems||h[e]===!1);if(f.strictTuples&&!g){let y=`"${o}" is ${m}-tuple, but minItems or maxItems/${e} are not specified or different at path "${p}"`;(0,Ei.checkStrictMode)(a,y,f.strictTuples)}}}gs.validateTuple=pd;gs.default=qE});var md=d(ia=>{"use strict";Object.defineProperty(ia,"__esModule",{value:!0});var kE=sa(),jE={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,kE.validateTuple)(r,"items")};ia.default=jE});var yd=d(na=>{"use strict";Object.defineProperty(na,"__esModule",{value:!0});var gd=T(),DE=R(),ME=Ae(),LE=ra(),VE={message:({params:{len:r}})=>(0,gd.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,gd._)`{limit: ${r}}`},FE={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:VE,code(r){let{schema:e,parentSchema:t,it:s}=r,{prefixItems:i}=t;s.items=!0,!(0,DE.alwaysValidSchema)(s,e)&&(i?(0,LE.validateAdditionalItems)(r,i):r.ok((0,ME.validateArray)(r)))}};na.default=FE});var _d=d(oa=>{"use strict";Object.defineProperty(oa,"__esModule",{value:!0});var Re=T(),Si=R(),UE={message:({params:{min:r,max:e}})=>e===void 0?(0,Re.str)`must contain at least ${r} valid item(s)`:(0,Re.str)`must contain at least ${r} and no more than ${e} valid item(s)`,params:({params:{min:r,max:e}})=>e===void 0?(0,Re._)`{minContains: ${r}}`:(0,Re._)`{minContains: ${r}, maxContains: ${e}}`},HE={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:UE,code(r){let{gen:e,schema:t,parentSchema:s,data:i,it:n}=r,o,a,{minContains:u,maxContains:l}=s;n.opts.next?(o=u===void 0?1:u,a=l):o=1;let c=e.const("len",(0,Re._)`${i}.length`);if(r.setParams({min:o,max:a}),a===void 0&&o===0){(0,Si.checkStrictMode)(n,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&o>a){(0,Si.checkStrictMode)(n,'"minContains" > "maxContains" is always invalid'),r.fail();return}if((0,Si.alwaysValidSchema)(n,t)){let g=(0,Re._)`${c} >= ${o}`;a!==void 0&&(g=(0,Re._)`${g} && ${c} <= ${a}`),r.pass(g);return}n.items=!0;let h=e.name("valid");a===void 0&&o===1?p(h,()=>e.if(h,()=>e.break())):o===0?(e.let(h,!0),a!==void 0&&e.if((0,Re._)`${i}.length > 0`,f)):(e.let(h,!1),f()),r.result(h,()=>r.reset());function f(){let g=e.name("_valid"),y=e.let("count",0);p(g,()=>e.if(g,()=>m(y)))}function p(g,y){e.forRange("i",0,c,_=>{r.subschema({keyword:"contains",dataProp:_,dataPropType:Si.Type.Num,compositeRule:!0},g),y()})}function m(g){e.code((0,Re._)`${g}++`),a===void 0?e.if((0,Re._)`${g} >= ${o}`,()=>e.assign(h,!0).break()):(e.if((0,Re._)`${g} > ${a}`,()=>e.assign(h,!1).break()),o===1?e.assign(h,!0):e.if((0,Re._)`${g} >= ${o}`,()=>e.assign(h,!0)))}}};oa.default=HE});var Oi=d(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.validateSchemaDeps=et.validatePropertyDeps=et.error=void 0;var aa=T(),GE=R(),ys=Ae();et.error={message:({params:{property:r,depsCount:e,deps:t}})=>{let s=e===1?"property":"properties";return(0,aa.str)`must have ${s} ${t} when property ${r} is present`},params:({params:{property:r,depsCount:e,deps:t,missingProperty:s}})=>(0,aa._)`{property: ${r},
|
|
2
|
+
"use strict";var wv=Object.create;var fl=Object.defineProperty;var $v=Object.getOwnPropertyDescriptor;var Ev=Object.getOwnPropertyNames;var Sv=Object.getPrototypeOf,Ov=Object.prototype.hasOwnProperty;var d=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var xv=(r,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ev(e))!Ov.call(r,i)&&i!==t&&fl(r,i,{get:()=>e[i],enumerable:!(s=$v(e,i))||s.enumerable});return r};var Y=(r,e,t)=>(t=r!=null?wv(Sv(r)):{},xv(e||!r||!r.__esModule?fl(t,"default",{value:r,enumerable:!0}):t,r));var Yr=d(D=>{"use strict";Object.defineProperty(D,"__esModule",{value:!0});D.regexpCode=D.getEsmExportName=D.getProperty=D.safeStringify=D.stringify=D.strConcat=D.addCodeArg=D.str=D._=D.nil=D._Code=D.Name=D.IDENTIFIER=D._CodeOrName=void 0;var Kr=class{};D._CodeOrName=Kr;D.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Ut=class extends Kr{constructor(e){if(super(),!D.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};D.Name=Ut;var Pe=class extends Kr{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((t,s)=>`${t}${s}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,s)=>(s instanceof Ut&&(t[s.str]=(t[s.str]||0)+1),t),{})}};D._Code=Pe;D.nil=new Pe("");function Nl(r,...e){let t=[r[0]],s=0;for(;s<e.length;)Hn(t,e[s]),t.push(r[++s]);return new Pe(t)}D._=Nl;var Un=new Pe("+");function ql(r,...e){let t=[Wr(r[0])],s=0;for(;s<e.length;)t.push(Un),Hn(t,e[s]),t.push(Un,Wr(r[++s]));return Lv(t),new Pe(t)}D.str=ql;function Hn(r,e){e instanceof Pe?r.push(...e._items):e instanceof Ut?r.push(e):r.push(Uv(e))}D.addCodeArg=Hn;function Lv(r){let e=1;for(;e<r.length-1;){if(r[e]===Un){let t=Vv(r[e-1],r[e+1]);if(t!==void 0){r.splice(e-1,3,t);continue}r[e++]="+"}e++}}function Vv(r,e){if(e==='""')return r;if(r==='""')return e;if(typeof r=="string")return e instanceof Ut||r[r.length-1]!=='"'?void 0:typeof e!="string"?`${r.slice(0,-1)}${e}"`:e[0]==='"'?r.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(r instanceof Ut))return`"${r}${e.slice(1)}`}function Fv(r,e){return e.emptyStr()?r:r.emptyStr()?e:ql`${r}${e}`}D.strConcat=Fv;function Uv(r){return typeof r=="number"||typeof r=="boolean"||r===null?r:Wr(Array.isArray(r)?r.join(","):r)}function Hv(r){return new Pe(Wr(r))}D.stringify=Hv;function Wr(r){return JSON.stringify(r).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}D.safeStringify=Wr;function Gv(r){return typeof r=="string"&&D.IDENTIFIER.test(r)?new Pe(`.${r}`):Nl`[${r}]`}D.getProperty=Gv;function zv(r){if(typeof r=="string"&&D.IDENTIFIER.test(r))return new Pe(`${r}`);throw new Error(`CodeGen: invalid export name: ${r}, use explicit $id name mapping`)}D.getEsmExportName=zv;function Bv(r){return new Pe(r.toString())}D.regexpCode=Bv});var Bn=d(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.ValueScope=we.ValueScopeName=we.Scope=we.varKinds=we.UsedValueState=void 0;var be=Yr(),Gn=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},si;(function(r){r[r.Started=0]="Started",r[r.Completed=1]="Completed"})(si||(we.UsedValueState=si={}));we.varKinds={const:new be.Name("const"),let:new be.Name("let"),var:new be.Name("var")};var ii=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof be.Name?e:this.name(e)}name(e){return new be.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,s;if(!((s=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||s===void 0)&&s.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};we.Scope=ii;var ni=class extends be.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:s}){this.value=e,this.scopePath=(0,be._)`.${new be.Name(t)}[${s}]`}};we.ValueScopeName=ni;var Kv=(0,be._)`\n`,zn=class extends ii{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?Kv:be.nil}}get(){return this._scope}name(e){return new ni(e,this._newName(e))}value(e,t){var s;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(e),{prefix:n}=i,o=(s=t.key)!==null&&s!==void 0?s:t.ref,a=this._values[n];if(a){let l=a.get(o);if(l)return l}else a=this._values[n]=new Map;a.set(o,i);let u=this._scope[n]||(this._scope[n]=[]),c=u.length;return u[c]=t.ref,i.setValue(t,{property:n,itemIndex:c}),i}getValue(e,t){let s=this._values[e];if(s)return s.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,s=>{if(s.scopePath===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return(0,be._)`${e}${s.scopePath}`})}scopeCode(e=this._values,t,s){return this._reduceValues(e,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},t,s)}_reduceValues(e,t,s={},i){let n=be.nil;for(let o in e){let a=e[o];if(!a)continue;let u=s[o]=s[o]||new Map;a.forEach(c=>{if(u.has(c))return;u.set(c,si.Started);let l=t(c);if(l){let h=this.opts.es5?we.varKinds.var:we.varKinds.const;n=(0,be._)`${n}${h} ${c} = ${l};${this.opts._n}`}else if(l=i?.(c))n=(0,be._)`${n}${l}${this.opts._n}`;else throw new Gn(c);u.set(c,si.Completed)})}return n}};we.ValueScope=zn});var T=d(I=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0});I.or=I.and=I.not=I.CodeGen=I.operators=I.varKinds=I.ValueScopeName=I.ValueScope=I.Scope=I.Name=I.regexpCode=I.stringify=I.getProperty=I.nil=I.strConcat=I.str=I._=void 0;var q=Yr(),Ve=Bn(),Ot=Yr();Object.defineProperty(I,"_",{enumerable:!0,get:function(){return Ot._}});Object.defineProperty(I,"str",{enumerable:!0,get:function(){return Ot.str}});Object.defineProperty(I,"strConcat",{enumerable:!0,get:function(){return Ot.strConcat}});Object.defineProperty(I,"nil",{enumerable:!0,get:function(){return Ot.nil}});Object.defineProperty(I,"getProperty",{enumerable:!0,get:function(){return Ot.getProperty}});Object.defineProperty(I,"stringify",{enumerable:!0,get:function(){return Ot.stringify}});Object.defineProperty(I,"regexpCode",{enumerable:!0,get:function(){return Ot.regexpCode}});Object.defineProperty(I,"Name",{enumerable:!0,get:function(){return Ot.Name}});var ci=Bn();Object.defineProperty(I,"Scope",{enumerable:!0,get:function(){return ci.Scope}});Object.defineProperty(I,"ValueScope",{enumerable:!0,get:function(){return ci.ValueScope}});Object.defineProperty(I,"ValueScopeName",{enumerable:!0,get:function(){return ci.ValueScopeName}});Object.defineProperty(I,"varKinds",{enumerable:!0,get:function(){return ci.varKinds}});I.operators={GT:new q._Code(">"),GTE:new q._Code(">="),LT:new q._Code("<"),LTE:new q._Code("<="),EQ:new q._Code("==="),NEQ:new q._Code("!=="),NOT:new q._Code("!"),OR:new q._Code("||"),AND:new q._Code("&&"),ADD:new q._Code("+")};var lt=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},Kn=class extends lt{constructor(e,t,s){super(),this.varKind=e,this.name=t,this.rhs=s}render({es5:e,_n:t}){let s=e?Ve.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${i};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=or(this.rhs,e,t)),this}get names(){return this.rhs instanceof q._CodeOrName?this.rhs.names:{}}},oi=class extends lt{constructor(e,t,s){super(),this.lhs=e,this.rhs=t,this.sideEffects=s}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof q.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=or(this.rhs,e,t),this}get names(){let e=this.lhs instanceof q.Name?{}:{...this.lhs.names};return ui(e,this.rhs)}},Wn=class extends oi{constructor(e,t,s,i){super(e,s,i),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},Yn=class extends lt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},Xn=class extends lt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},Jn=class extends lt{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},Zn=class extends lt{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=or(this.code,e,t),this}get names(){return this.code instanceof q._CodeOrName?this.code.names:{}}},Xr=class extends lt{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,s)=>t+s.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let s=e[t].optimizeNodes();Array.isArray(s)?e.splice(t,1,...s):s?e[t]=s:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:s}=this,i=s.length;for(;i--;){let n=s[i];n.optimizeNames(e,t)||(Wv(e,n.names),s.splice(i,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>zt(e,t.names),{})}},ht=class extends Xr{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},Qn=class extends Xr{},nr=class extends ht{};nr.kind="else";var Ht=class r extends ht{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let s=t.optimizeNodes();t=this.else=Array.isArray(s)?new nr(s):s}if(t)return e===!1?t instanceof r?t:t.nodes:this.nodes.length?this:new r(jl(e),t instanceof r?[t]:t.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,t){var s;if(this.else=(s=this.else)===null||s===void 0?void 0:s.optimizeNames(e,t),!!(super.optimizeNames(e,t)||this.else))return this.condition=or(this.condition,e,t),this}get names(){let e=super.names;return ui(e,this.condition),this.else&&zt(e,this.else.names),e}};Ht.kind="if";var Gt=class extends ht{};Gt.kind="for";var eo=class extends Gt{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=or(this.iteration,e,t),this}get names(){return zt(super.names,this.iteration.names)}},to=class extends Gt{constructor(e,t,s,i){super(),this.varKind=e,this.name=t,this.from=s,this.to=i}render(e){let t=e.es5?Ve.varKinds.var:this.varKind,{name:s,from:i,to:n}=this;return`for(${t} ${s}=${i}; ${s}<${n}; ${s}++)`+super.render(e)}get names(){let e=ui(super.names,this.from);return ui(e,this.to)}},ai=class extends Gt{constructor(e,t,s,i){super(),this.loop=e,this.varKind=t,this.name=s,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=or(this.iterable,e,t),this}get names(){return zt(super.names,this.iterable.names)}},Jr=class extends ht{constructor(e,t,s){super(),this.name=e,this.args=t,this.async=s}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Jr.kind="func";var Zr=class extends Xr{render(e){return"return "+super.render(e)}};Zr.kind="return";var ro=class extends ht{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(e,t){var s,i;return super.optimizeNames(e,t),(s=this.catch)===null||s===void 0||s.optimizeNames(e,t),(i=this.finally)===null||i===void 0||i.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&zt(e,this.catch.names),this.finally&&zt(e,this.finally.names),e}},Qr=class extends ht{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};Qr.kind="catch";var es=class extends ht{render(e){return"finally"+super.render(e)}};es.kind="finally";var so=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
|
|
3
|
+
`:""},this._extScope=e,this._scope=new Ve.Scope({parent:e}),this._nodes=[new Qn]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let s=this._extScope.value(e,t);return(this._values[s.prefix]||(this._values[s.prefix]=new Set)).add(s),s}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,s,i){let n=this._scope.toName(t);return s!==void 0&&i&&(this._constants[n.str]=s),this._leafNode(new Kn(e,n,s)),n}const(e,t,s){return this._def(Ve.varKinds.const,e,t,s)}let(e,t,s){return this._def(Ve.varKinds.let,e,t,s)}var(e,t,s){return this._def(Ve.varKinds.var,e,t,s)}assign(e,t,s){return this._leafNode(new oi(e,t,s))}add(e,t){return this._leafNode(new Wn(e,I.operators.ADD,t))}code(e){return typeof e=="function"?e():e!==q.nil&&this._leafNode(new Zn(e)),this}object(...e){let t=["{"];for(let[s,i]of e)t.length>1&&t.push(","),t.push(s),(s!==i||this.opts.es5)&&(t.push(":"),(0,q.addCodeArg)(t,i));return t.push("}"),new q._Code(t)}if(e,t,s){if(this._blockNode(new Ht(e)),t&&s)this.code(t).else().code(s).endIf();else if(t)this.code(t).endIf();else if(s)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Ht(e))}else(){return this._elseNode(new nr)}endIf(){return this._endBlockNode(Ht,nr)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new eo(e),t)}forRange(e,t,s,i,n=this.opts.es5?Ve.varKinds.var:Ve.varKinds.let){let o=this._scope.toName(e);return this._for(new to(n,o,t,s),()=>i(o))}forOf(e,t,s,i=Ve.varKinds.const){let n=this._scope.toName(e);if(this.opts.es5){let o=t instanceof q.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,q._)`${o}.length`,a=>{this.var(n,(0,q._)`${o}[${a}]`),s(n)})}return this._for(new ai("of",i,n,t),()=>s(n))}forIn(e,t,s,i=this.opts.es5?Ve.varKinds.var:Ve.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,q._)`Object.keys(${t})`,s);let n=this._scope.toName(e);return this._for(new ai("in",i,n,t),()=>s(n))}endFor(){return this._endBlockNode(Gt)}label(e){return this._leafNode(new Yn(e))}break(e){return this._leafNode(new Xn(e))}return(e){let t=new Zr;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Zr)}try(e,t,s){if(!t&&!s)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new ro;if(this._blockNode(i),this.code(e),t){let n=this.name("e");this._currNode=i.catch=new Qr(n),t(n)}return s&&(this._currNode=i.finally=new es,this.code(s)),this._endBlockNode(Qr,es)}throw(e){return this._leafNode(new Jn(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let s=this._nodes.length-t;if(s<0||e!==void 0&&s!==e)throw new Error(`CodeGen: wrong number of nodes: ${s} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=q.nil,s,i){return this._blockNode(new Jr(e,t,s)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(Jr)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let s=this._currNode;if(s instanceof e||t&&s instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof Ht))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};I.CodeGen=so;function zt(r,e){for(let t in e)r[t]=(r[t]||0)+(e[t]||0);return r}function ui(r,e){return e instanceof q._CodeOrName?zt(r,e.names):r}function or(r,e,t){if(r instanceof q.Name)return s(r);if(!i(r))return r;return new q._Code(r._items.reduce((n,o)=>(o instanceof q.Name&&(o=s(o)),o instanceof q._Code?n.push(...o._items):n.push(o),n),[]));function s(n){let o=t[n.str];return o===void 0||e[n.str]!==1?n:(delete e[n.str],o)}function i(n){return n instanceof q._Code&&n._items.some(o=>o instanceof q.Name&&e[o.str]===1&&t[o.str]!==void 0)}}function Wv(r,e){for(let t in e)r[t]=(r[t]||0)-(e[t]||0)}function jl(r){return typeof r=="boolean"||typeof r=="number"||r===null?!r:(0,q._)`!${io(r)}`}I.not=jl;var Yv=kl(I.operators.AND);function Xv(...r){return r.reduce(Yv)}I.and=Xv;var Jv=kl(I.operators.OR);function Zv(...r){return r.reduce(Jv)}I.or=Zv;function kl(r){return(e,t)=>e===q.nil?t:t===q.nil?e:(0,q._)`${io(e)} ${r} ${io(t)}`}function io(r){return r instanceof q.Name?r:(0,q._)`(${r})`}});var R=d(C=>{"use strict";Object.defineProperty(C,"__esModule",{value:!0});C.checkStrictMode=C.getErrorPath=C.Type=C.useFunc=C.setEvaluated=C.evaluatedPropsToName=C.mergeEvaluated=C.eachItem=C.unescapeJsonPointer=C.escapeJsonPointer=C.escapeFragment=C.unescapeFragment=C.schemaRefOrVal=C.schemaHasRulesButRef=C.schemaHasRules=C.checkUnknownRules=C.alwaysValidSchema=C.toHash=void 0;var F=T(),Qv=Yr();function eb(r){let e={};for(let t of r)e[t]=!0;return e}C.toHash=eb;function tb(r,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(Ll(r,e),!Vl(e,r.self.RULES.all))}C.alwaysValidSchema=tb;function Ll(r,e=r.schema){let{opts:t,self:s}=r;if(!t.strictSchema||typeof e=="boolean")return;let i=s.RULES.keywords;for(let n in e)i[n]||Hl(r,`unknown keyword: "${n}"`)}C.checkUnknownRules=Ll;function Vl(r,e){if(typeof r=="boolean")return!r;for(let t in r)if(e[t])return!0;return!1}C.schemaHasRules=Vl;function rb(r,e){if(typeof r=="boolean")return!r;for(let t in r)if(t!=="$ref"&&e.all[t])return!0;return!1}C.schemaHasRulesButRef=rb;function sb({topSchemaRef:r,schemaPath:e},t,s,i){if(!i){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,F._)`${t}`}return(0,F._)`${r}${e}${(0,F.getProperty)(s)}`}C.schemaRefOrVal=sb;function ib(r){return Fl(decodeURIComponent(r))}C.unescapeFragment=ib;function nb(r){return encodeURIComponent(oo(r))}C.escapeFragment=nb;function oo(r){return typeof r=="number"?`${r}`:r.replace(/~/g,"~0").replace(/\//g,"~1")}C.escapeJsonPointer=oo;function Fl(r){return r.replace(/~1/g,"/").replace(/~0/g,"~")}C.unescapeJsonPointer=Fl;function ob(r,e){if(Array.isArray(r))for(let t of r)e(t);else e(r)}C.eachItem=ob;function Dl({mergeNames:r,mergeToName:e,mergeValues:t,resultToName:s}){return(i,n,o,a)=>{let u=o===void 0?n:o instanceof F.Name?(n instanceof F.Name?r(i,n,o):e(i,n,o),o):n instanceof F.Name?(e(i,o,n),n):t(n,o);return a===F.Name&&!(u instanceof F.Name)?s(i,u):u}}C.mergeEvaluated={props:Dl({mergeNames:(r,e,t)=>r.if((0,F._)`${t} !== true && ${e} !== undefined`,()=>{r.if((0,F._)`${e} === true`,()=>r.assign(t,!0),()=>r.assign(t,(0,F._)`${t} || {}`).code((0,F._)`Object.assign(${t}, ${e})`))}),mergeToName:(r,e,t)=>r.if((0,F._)`${t} !== true`,()=>{e===!0?r.assign(t,!0):(r.assign(t,(0,F._)`${t} || {}`),ao(r,t,e))}),mergeValues:(r,e)=>r===!0?!0:{...r,...e},resultToName:Ul}),items:Dl({mergeNames:(r,e,t)=>r.if((0,F._)`${t} !== true && ${e} !== undefined`,()=>r.assign(t,(0,F._)`${e} === true ? true : ${t} > ${e} ? ${t} : ${e}`)),mergeToName:(r,e,t)=>r.if((0,F._)`${t} !== true`,()=>r.assign(t,e===!0?!0:(0,F._)`${t} > ${e} ? ${t} : ${e}`)),mergeValues:(r,e)=>r===!0?!0:Math.max(r,e),resultToName:(r,e)=>r.var("items",e)})};function Ul(r,e){if(e===!0)return r.var("props",!0);let t=r.var("props",(0,F._)`{}`);return e!==void 0&&ao(r,t,e),t}C.evaluatedPropsToName=Ul;function ao(r,e,t){Object.keys(t).forEach(s=>r.assign((0,F._)`${e}${(0,F.getProperty)(s)}`,!0))}C.setEvaluated=ao;var Ml={};function ab(r,e){return r.scopeValue("func",{ref:e,code:Ml[e.code]||(Ml[e.code]=new Qv._Code(e.code))})}C.useFunc=ab;var no;(function(r){r[r.Num=0]="Num",r[r.Str=1]="Str"})(no||(C.Type=no={}));function ub(r,e,t){if(r instanceof F.Name){let s=e===no.Num;return t?s?(0,F._)`"[" + ${r} + "]"`:(0,F._)`"['" + ${r} + "']"`:s?(0,F._)`"/" + ${r}`:(0,F._)`"/" + ${r}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,F.getProperty)(r).toString():"/"+oo(r)}C.getErrorPath=ub;function Hl(r,e,t=r.opts.strictSchema){if(t){if(e=`strict mode: ${e}`,t===!0)throw new Error(e);r.self.logger.warn(e)}}C.checkStrictMode=Hl});var Ae=d(uo=>{"use strict";Object.defineProperty(uo,"__esModule",{value:!0});var de=T(),cb={data:new de.Name("data"),valCxt:new de.Name("valCxt"),instancePath:new de.Name("instancePath"),parentData:new de.Name("parentData"),parentDataProperty:new de.Name("parentDataProperty"),rootData:new de.Name("rootData"),dynamicAnchors:new de.Name("dynamicAnchors"),vErrors:new de.Name("vErrors"),errors:new de.Name("errors"),this:new de.Name("this"),self:new de.Name("self"),scope:new de.Name("scope"),json:new de.Name("json"),jsonPos:new de.Name("jsonPos"),jsonLen:new de.Name("jsonLen"),jsonPart:new de.Name("jsonPart")};uo.default=cb});var ts=d(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.extendErrors=fe.resetErrorsCount=fe.reportExtraError=fe.reportError=fe.keyword$DataError=fe.keywordError=void 0;var k=T(),li=R(),me=Ae();fe.keywordError={message:({keyword:r})=>(0,k.str)`must pass "${r}" keyword validation`};fe.keyword$DataError={message:({keyword:r,schemaType:e})=>e?(0,k.str)`"${r}" keyword must be ${e} ($data)`:(0,k.str)`"${r}" keyword is invalid ($data)`};function lb(r,e=fe.keywordError,t,s){let{it:i}=r,{gen:n,compositeRule:o,allErrors:a}=i,u=Bl(r,e,t);s??(o||a)?Gl(n,u):zl(i,(0,k._)`[${u}]`)}fe.reportError=lb;function hb(r,e=fe.keywordError,t){let{it:s}=r,{gen:i,compositeRule:n,allErrors:o}=s,a=Bl(r,e,t);Gl(i,a),n||o||zl(s,me.default.vErrors)}fe.reportExtraError=hb;function db(r,e){r.assign(me.default.errors,e),r.if((0,k._)`${me.default.vErrors} !== null`,()=>r.if(e,()=>r.assign((0,k._)`${me.default.vErrors}.length`,e),()=>r.assign(me.default.vErrors,null)))}fe.resetErrorsCount=db;function fb({gen:r,keyword:e,schemaValue:t,data:s,errsCount:i,it:n}){if(i===void 0)throw new Error("ajv implementation error");let o=r.name("err");r.forRange("i",i,me.default.errors,a=>{r.const(o,(0,k._)`${me.default.vErrors}[${a}]`),r.if((0,k._)`${o}.instancePath === undefined`,()=>r.assign((0,k._)`${o}.instancePath`,(0,k.strConcat)(me.default.instancePath,n.errorPath))),r.assign((0,k._)`${o}.schemaPath`,(0,k.str)`${n.errSchemaPath}/${e}`),n.opts.verbose&&(r.assign((0,k._)`${o}.schema`,t),r.assign((0,k._)`${o}.data`,s))})}fe.extendErrors=fb;function Gl(r,e){let t=r.const("err",e);r.if((0,k._)`${me.default.vErrors} === null`,()=>r.assign(me.default.vErrors,(0,k._)`[${t}]`),(0,k._)`${me.default.vErrors}.push(${t})`),r.code((0,k._)`${me.default.errors}++`)}function zl(r,e){let{gen:t,validateName:s,schemaEnv:i}=r;i.$async?t.throw((0,k._)`new ${r.ValidationError}(${e})`):(t.assign((0,k._)`${s}.errors`,e),t.return(!1))}var Bt={keyword:new k.Name("keyword"),schemaPath:new k.Name("schemaPath"),params:new k.Name("params"),propertyName:new k.Name("propertyName"),message:new k.Name("message"),schema:new k.Name("schema"),parentSchema:new k.Name("parentSchema")};function Bl(r,e,t){let{createErrors:s}=r.it;return s===!1?(0,k._)`{}`:pb(r,e,t)}function pb(r,e,t={}){let{gen:s,it:i}=r,n=[mb(i,t),gb(r,t)];return yb(r,e,n),s.object(...n)}function mb({errorPath:r},{instancePath:e}){let t=e?(0,k.str)`${r}${(0,li.getErrorPath)(e,li.Type.Str)}`:r;return[me.default.instancePath,(0,k.strConcat)(me.default.instancePath,t)]}function gb({keyword:r,it:{errSchemaPath:e}},{schemaPath:t,parentSchema:s}){let i=s?e:(0,k.str)`${e}/${r}`;return t&&(i=(0,k.str)`${i}${(0,li.getErrorPath)(t,li.Type.Str)}`),[Bt.schemaPath,i]}function yb(r,{params:e,message:t},s){let{keyword:i,data:n,schemaValue:o,it:a}=r,{opts:u,propertyName:c,topSchemaRef:l,schemaPath:h}=a;s.push([Bt.keyword,i],[Bt.params,typeof e=="function"?e(r):e||(0,k._)`{}`]),u.messages&&s.push([Bt.message,typeof t=="function"?t(r):t]),u.verbose&&s.push([Bt.schema,o],[Bt.parentSchema,(0,k._)`${l}${h}`],[me.default.data,n]),c&&s.push([Bt.propertyName,c])}});var Wl=d(ar=>{"use strict";Object.defineProperty(ar,"__esModule",{value:!0});ar.boolOrEmptySchema=ar.topBoolOrEmptySchema=void 0;var _b=ts(),vb=T(),bb=Ae(),wb={message:"boolean schema is false"};function $b(r){let{gen:e,schema:t,validateName:s}=r;t===!1?Kl(r,!1):typeof t=="object"&&t.$async===!0?e.return(bb.default.data):(e.assign((0,vb._)`${s}.errors`,null),e.return(!0))}ar.topBoolOrEmptySchema=$b;function Eb(r,e){let{gen:t,schema:s}=r;s===!1?(t.var(e,!1),Kl(r)):t.var(e,!0)}ar.boolOrEmptySchema=Eb;function Kl(r,e){let{gen:t,data:s}=r,i={gen:t,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:r};(0,_b.reportError)(i,wb,void 0,e)}});var co=d(ur=>{"use strict";Object.defineProperty(ur,"__esModule",{value:!0});ur.getRules=ur.isJSONType=void 0;var Sb=["string","number","integer","boolean","null","object","array"],Ob=new Set(Sb);function xb(r){return typeof r=="string"&&Ob.has(r)}ur.isJSONType=xb;function Tb(){let r={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...r,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},r.number,r.string,r.array,r.object],post:{rules:[]},all:{},keywords:{}}}ur.getRules=Tb});var lo=d(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.shouldUseRule=xt.shouldUseGroup=xt.schemaHasRulesForType=void 0;function Pb({schema:r,self:e},t){let s=e.RULES.types[t];return s&&s!==!0&&Yl(r,s)}xt.schemaHasRulesForType=Pb;function Yl(r,e){return e.rules.some(t=>Xl(r,t))}xt.shouldUseGroup=Yl;function Xl(r,e){var t;return r[e.keyword]!==void 0||((t=e.definition.implements)===null||t===void 0?void 0:t.some(s=>r[s]!==void 0))}xt.shouldUseRule=Xl});var rs=d(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.reportTypeError=pe.checkDataTypes=pe.checkDataType=pe.coerceAndCheckDataType=pe.getJSONTypes=pe.getSchemaTypes=pe.DataType=void 0;var Ab=co(),Ib=lo(),Cb=ts(),A=T(),Jl=R(),cr;(function(r){r[r.Correct=0]="Correct",r[r.Wrong=1]="Wrong"})(cr||(pe.DataType=cr={}));function Rb(r){let e=Zl(r.type);if(e.includes("null")){if(r.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&r.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');r.nullable===!0&&e.push("null")}return e}pe.getSchemaTypes=Rb;function Zl(r){let e=Array.isArray(r)?r:r?[r]:[];if(e.every(Ab.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}pe.getJSONTypes=Zl;function Nb(r,e){let{gen:t,data:s,opts:i}=r,n=qb(e,i.coerceTypes),o=e.length>0&&!(n.length===0&&e.length===1&&(0,Ib.schemaHasRulesForType)(r,e[0]));if(o){let a=fo(e,s,i.strictNumbers,cr.Wrong);t.if(a,()=>{n.length?jb(r,e,n):po(r)})}return o}pe.coerceAndCheckDataType=Nb;var Ql=new Set(["string","number","integer","boolean","null"]);function qb(r,e){return e?r.filter(t=>Ql.has(t)||e==="array"&&t==="array"):[]}function jb(r,e,t){let{gen:s,data:i,opts:n}=r,o=s.let("dataType",(0,A._)`typeof ${i}`),a=s.let("coerced",(0,A._)`undefined`);n.coerceTypes==="array"&&s.if((0,A._)`${o} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>s.assign(i,(0,A._)`${i}[0]`).assign(o,(0,A._)`typeof ${i}`).if(fo(e,i,n.strictNumbers),()=>s.assign(a,i))),s.if((0,A._)`${a} !== undefined`);for(let c of t)(Ql.has(c)||c==="array"&&n.coerceTypes==="array")&&u(c);s.else(),po(r),s.endIf(),s.if((0,A._)`${a} !== undefined`,()=>{s.assign(i,a),kb(r,a)});function u(c){switch(c){case"string":s.elseIf((0,A._)`${o} == "number" || ${o} == "boolean"`).assign(a,(0,A._)`"" + ${i}`).elseIf((0,A._)`${i} === null`).assign(a,(0,A._)`""`);return;case"number":s.elseIf((0,A._)`${o} == "boolean" || ${i} === null
|
|
4
|
+
|| (${o} == "string" && ${i} && ${i} == +${i})`).assign(a,(0,A._)`+${i}`);return;case"integer":s.elseIf((0,A._)`${o} === "boolean" || ${i} === null
|
|
5
|
+
|| (${o} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(a,(0,A._)`+${i}`);return;case"boolean":s.elseIf((0,A._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(a,!1).elseIf((0,A._)`${i} === "true" || ${i} === 1`).assign(a,!0);return;case"null":s.elseIf((0,A._)`${i} === "" || ${i} === 0 || ${i} === false`),s.assign(a,null);return;case"array":s.elseIf((0,A._)`${o} === "string" || ${o} === "number"
|
|
6
|
+
|| ${o} === "boolean" || ${i} === null`).assign(a,(0,A._)`[${i}]`)}}}function kb({gen:r,parentData:e,parentDataProperty:t},s){r.if((0,A._)`${e} !== undefined`,()=>r.assign((0,A._)`${e}[${t}]`,s))}function ho(r,e,t,s=cr.Correct){let i=s===cr.Correct?A.operators.EQ:A.operators.NEQ,n;switch(r){case"null":return(0,A._)`${e} ${i} null`;case"array":n=(0,A._)`Array.isArray(${e})`;break;case"object":n=(0,A._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":n=o((0,A._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":n=o();break;default:return(0,A._)`typeof ${e} ${i} ${r}`}return s===cr.Correct?n:(0,A.not)(n);function o(a=A.nil){return(0,A.and)((0,A._)`typeof ${e} == "number"`,a,t?(0,A._)`isFinite(${e})`:A.nil)}}pe.checkDataType=ho;function fo(r,e,t,s){if(r.length===1)return ho(r[0],e,t,s);let i,n=(0,Jl.toHash)(r);if(n.array&&n.object){let o=(0,A._)`typeof ${e} != "object"`;i=n.null?o:(0,A._)`!${e} || ${o}`,delete n.null,delete n.array,delete n.object}else i=A.nil;n.number&&delete n.integer;for(let o in n)i=(0,A.and)(i,ho(o,e,t,s));return i}pe.checkDataTypes=fo;var Db={message:({schema:r})=>`must be ${r}`,params:({schema:r,schemaValue:e})=>typeof r=="string"?(0,A._)`{type: ${r}}`:(0,A._)`{type: ${e}}`};function po(r){let e=Mb(r);(0,Cb.reportError)(e,Db)}pe.reportTypeError=po;function Mb(r){let{gen:e,data:t,schema:s}=r,i=(0,Jl.schemaRefOrVal)(r,s,"type");return{gen:e,keyword:"type",data:t,schema:s.type,schemaCode:i,schemaValue:i,parentSchema:s,params:{},it:r}}});var th=d(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});hi.assignDefaults=void 0;var lr=T(),Lb=R();function Vb(r,e){let{properties:t,items:s}=r.schema;if(e==="object"&&t)for(let i in t)eh(r,i,t[i].default);else e==="array"&&Array.isArray(s)&&s.forEach((i,n)=>eh(r,n,i.default))}hi.assignDefaults=Vb;function eh(r,e,t){let{gen:s,compositeRule:i,data:n,opts:o}=r;if(t===void 0)return;let a=(0,lr._)`${n}${(0,lr.getProperty)(e)}`;if(i){(0,Lb.checkStrictMode)(r,`default is ignored for: ${a}`);return}let u=(0,lr._)`${a} === undefined`;o.useDefaults==="empty"&&(u=(0,lr._)`${u} || ${a} === null || ${a} === ""`),s.if(u,(0,lr._)`${a} = ${(0,lr.stringify)(t)}`)}});var Ie=d(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.validateUnion=V.validateArray=V.usePattern=V.callValidateCode=V.schemaProperties=V.allSchemaProperties=V.noPropertyInData=V.propertyInData=V.isOwnProperty=V.hasPropFunc=V.reportMissingProp=V.checkMissingProp=V.checkReportMissingProp=void 0;var z=T(),mo=R(),Tt=Ae(),Fb=R();function Ub(r,e){let{gen:t,data:s,it:i}=r;t.if(yo(t,s,e,i.opts.ownProperties),()=>{r.setParams({missingProperty:(0,z._)`${e}`},!0),r.error()})}V.checkReportMissingProp=Ub;function Hb({gen:r,data:e,it:{opts:t}},s,i){return(0,z.or)(...s.map(n=>(0,z.and)(yo(r,e,n,t.ownProperties),(0,z._)`${i} = ${n}`)))}V.checkMissingProp=Hb;function Gb(r,e){r.setParams({missingProperty:e},!0),r.error()}V.reportMissingProp=Gb;function rh(r){return r.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,z._)`Object.prototype.hasOwnProperty`})}V.hasPropFunc=rh;function go(r,e,t){return(0,z._)`${rh(r)}.call(${e}, ${t})`}V.isOwnProperty=go;function zb(r,e,t,s){let i=(0,z._)`${e}${(0,z.getProperty)(t)} !== undefined`;return s?(0,z._)`${i} && ${go(r,e,t)}`:i}V.propertyInData=zb;function yo(r,e,t,s){let i=(0,z._)`${e}${(0,z.getProperty)(t)} === undefined`;return s?(0,z.or)(i,(0,z.not)(go(r,e,t))):i}V.noPropertyInData=yo;function sh(r){return r?Object.keys(r).filter(e=>e!=="__proto__"):[]}V.allSchemaProperties=sh;function Bb(r,e){return sh(e).filter(t=>!(0,mo.alwaysValidSchema)(r,e[t]))}V.schemaProperties=Bb;function Kb({schemaCode:r,data:e,it:{gen:t,topSchemaRef:s,schemaPath:i,errorPath:n},it:o},a,u,c){let l=c?(0,z._)`${r}, ${e}, ${s}${i}`:e,h=[[Tt.default.instancePath,(0,z.strConcat)(Tt.default.instancePath,n)],[Tt.default.parentData,o.parentData],[Tt.default.parentDataProperty,o.parentDataProperty],[Tt.default.rootData,Tt.default.rootData]];o.opts.dynamicRef&&h.push([Tt.default.dynamicAnchors,Tt.default.dynamicAnchors]);let f=(0,z._)`${l}, ${t.object(...h)}`;return u!==z.nil?(0,z._)`${a}.call(${u}, ${f})`:(0,z._)`${a}(${f})`}V.callValidateCode=Kb;var Wb=(0,z._)`new RegExp`;function Yb({gen:r,it:{opts:e}},t){let s=e.unicodeRegExp?"u":"",{regExp:i}=e.code,n=i(t,s);return r.scopeValue("pattern",{key:n.toString(),ref:n,code:(0,z._)`${i.code==="new RegExp"?Wb:(0,Fb.useFunc)(r,i)}(${t}, ${s})`})}V.usePattern=Yb;function Xb(r){let{gen:e,data:t,keyword:s,it:i}=r,n=e.name("valid");if(i.allErrors){let a=e.let("valid",!0);return o(()=>e.assign(a,!1)),a}return e.var(n,!0),o(()=>e.break()),n;function o(a){let u=e.const("len",(0,z._)`${t}.length`);e.forRange("i",0,u,c=>{r.subschema({keyword:s,dataProp:c,dataPropType:mo.Type.Num},n),e.if((0,z.not)(n),a)})}}V.validateArray=Xb;function Jb(r){let{gen:e,schema:t,keyword:s,it:i}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");if(t.some(u=>(0,mo.alwaysValidSchema)(i,u))&&!i.opts.unevaluated)return;let o=e.let("valid",!1),a=e.name("_valid");e.block(()=>t.forEach((u,c)=>{let l=r.subschema({keyword:s,schemaProp:c,compositeRule:!0},a);e.assign(o,(0,z._)`${o} || ${a}`),r.mergeValidEvaluated(l,a)||e.if((0,z.not)(o))})),r.result(o,()=>r.reset(),()=>r.error(!0))}V.validateUnion=Jb});var oh=d(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.validateKeywordUsage=Je.validSchemaType=Je.funcKeywordCode=Je.macroKeywordCode=void 0;var ge=T(),Kt=Ae(),Zb=Ie(),Qb=ts();function ew(r,e){let{gen:t,keyword:s,schema:i,parentSchema:n,it:o}=r,a=e.macro.call(o.self,i,n,o),u=nh(t,s,a);o.opts.validateSchema!==!1&&o.self.validateSchema(a,!0);let c=t.name("valid");r.subschema({schema:a,schemaPath:ge.nil,errSchemaPath:`${o.errSchemaPath}/${s}`,topSchemaRef:u,compositeRule:!0},c),r.pass(c,()=>r.error(!0))}Je.macroKeywordCode=ew;function tw(r,e){var t;let{gen:s,keyword:i,schema:n,parentSchema:o,$data:a,it:u}=r;sw(u,e);let c=!a&&e.compile?e.compile.call(u.self,n,o,u):e.validate,l=nh(s,i,c),h=s.let("valid");r.block$data(h,f),r.ok((t=e.valid)!==null&&t!==void 0?t:h);function f(){if(e.errors===!1)g(),e.modifying&&ih(r),y(()=>r.error());else{let _=e.async?p():m();e.modifying&&ih(r),y(()=>rw(r,_))}}function p(){let _=s.let("ruleErrs",null);return s.try(()=>g((0,ge._)`await `),S=>s.assign(h,!1).if((0,ge._)`${S} instanceof ${u.ValidationError}`,()=>s.assign(_,(0,ge._)`${S}.errors`),()=>s.throw(S))),_}function m(){let _=(0,ge._)`${l}.errors`;return s.assign(_,null),g(ge.nil),_}function g(_=e.async?(0,ge._)`await `:ge.nil){let S=u.opts.passContext?Kt.default.this:Kt.default.self,O=!("compile"in e&&!a||e.schema===!1);s.assign(h,(0,ge._)`${_}${(0,Zb.callValidateCode)(r,l,S,O)}`,e.modifying)}function y(_){var S;s.if((0,ge.not)((S=e.valid)!==null&&S!==void 0?S:h),_)}}Je.funcKeywordCode=tw;function ih(r){let{gen:e,data:t,it:s}=r;e.if(s.parentData,()=>e.assign(t,(0,ge._)`${s.parentData}[${s.parentDataProperty}]`))}function rw(r,e){let{gen:t}=r;t.if((0,ge._)`Array.isArray(${e})`,()=>{t.assign(Kt.default.vErrors,(0,ge._)`${Kt.default.vErrors} === null ? ${e} : ${Kt.default.vErrors}.concat(${e})`).assign(Kt.default.errors,(0,ge._)`${Kt.default.vErrors}.length`),(0,Qb.extendErrors)(r)},()=>r.error())}function sw({schemaEnv:r},e){if(e.async&&!r.$async)throw new Error("async keyword in sync schema")}function nh(r,e,t){if(t===void 0)throw new Error(`keyword "${e}" failed to compile`);return r.scopeValue("keyword",typeof t=="function"?{ref:t}:{ref:t,code:(0,ge.stringify)(t)})}function iw(r,e,t=!1){return!e.length||e.some(s=>s==="array"?Array.isArray(r):s==="object"?r&&typeof r=="object"&&!Array.isArray(r):typeof r==s||t&&typeof r>"u")}Je.validSchemaType=iw;function nw({schema:r,opts:e,self:t,errSchemaPath:s},i,n){if(Array.isArray(i.keyword)?!i.keyword.includes(n):i.keyword!==n)throw new Error("ajv implementation error");let o=i.dependencies;if(o?.some(a=>!Object.prototype.hasOwnProperty.call(r,a)))throw new Error(`parent schema must have dependencies of ${n}: ${o.join(",")}`);if(i.validateSchema&&!i.validateSchema(r[n])){let u=`keyword "${n}" value is invalid at path "${s}": `+t.errorsText(i.validateSchema.errors);if(e.validateSchema==="log")t.logger.error(u);else throw new Error(u)}}Je.validateKeywordUsage=nw});var uh=d(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.extendSubschemaMode=Pt.extendSubschemaData=Pt.getSubschema=void 0;var Ze=T(),ah=R();function ow(r,{keyword:e,schemaProp:t,schema:s,schemaPath:i,errSchemaPath:n,topSchemaRef:o}){if(e!==void 0&&s!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let a=r.schema[e];return t===void 0?{schema:a,schemaPath:(0,Ze._)`${r.schemaPath}${(0,Ze.getProperty)(e)}`,errSchemaPath:`${r.errSchemaPath}/${e}`}:{schema:a[t],schemaPath:(0,Ze._)`${r.schemaPath}${(0,Ze.getProperty)(e)}${(0,Ze.getProperty)(t)}`,errSchemaPath:`${r.errSchemaPath}/${e}/${(0,ah.escapeFragment)(t)}`}}if(s!==void 0){if(i===void 0||n===void 0||o===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:s,schemaPath:i,topSchemaRef:o,errSchemaPath:n}}throw new Error('either "keyword" or "schema" must be passed')}Pt.getSubschema=ow;function aw(r,e,{dataProp:t,dataPropType:s,data:i,dataTypes:n,propertyName:o}){if(i!==void 0&&t!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=e;if(t!==void 0){let{errorPath:c,dataPathArr:l,opts:h}=e,f=a.let("data",(0,Ze._)`${e.data}${(0,Ze.getProperty)(t)}`,!0);u(f),r.errorPath=(0,Ze.str)`${c}${(0,ah.getErrorPath)(t,s,h.jsPropertySyntax)}`,r.parentDataProperty=(0,Ze._)`${t}`,r.dataPathArr=[...l,r.parentDataProperty]}if(i!==void 0){let c=i instanceof Ze.Name?i:a.let("data",i,!0);u(c),o!==void 0&&(r.propertyName=o)}n&&(r.dataTypes=n);function u(c){r.data=c,r.dataLevel=e.dataLevel+1,r.dataTypes=[],e.definedProperties=new Set,r.parentData=e.data,r.dataNames=[...e.dataNames,c]}}Pt.extendSubschemaData=aw;function uw(r,{jtdDiscriminator:e,jtdMetadata:t,compositeRule:s,createErrors:i,allErrors:n}){s!==void 0&&(r.compositeRule=s),i!==void 0&&(r.createErrors=i),n!==void 0&&(r.allErrors=n),r.jtdDiscriminator=e,r.jtdMetadata=t}Pt.extendSubschemaMode=uw});var _o=d((bq,ch)=>{"use strict";ch.exports=function r(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var s,i,n;if(Array.isArray(e)){if(s=e.length,s!=t.length)return!1;for(i=s;i--!==0;)if(!r(e[i],t[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(n=Object.keys(e),s=n.length,s!==Object.keys(t).length)return!1;for(i=s;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,n[i]))return!1;for(i=s;i--!==0;){var o=n[i];if(!r(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}});var hh=d((wq,lh)=>{"use strict";var At=lh.exports=function(r,e,t){typeof e=="function"&&(t=e,e={}),t=e.cb||t;var s=typeof t=="function"?t:t.pre||function(){},i=t.post||function(){};di(e,s,i,r,"",r)};At.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};At.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};At.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};At.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 di(r,e,t,s,i,n,o,a,u,c){if(s&&typeof s=="object"&&!Array.isArray(s)){e(s,i,n,o,a,u,c);for(var l in s){var h=s[l];if(Array.isArray(h)){if(l in At.arrayKeywords)for(var f=0;f<h.length;f++)di(r,e,t,h[f],i+"/"+l+"/"+f,n,i,l,s,f)}else if(l in At.propsKeywords){if(h&&typeof h=="object")for(var p in h)di(r,e,t,h[p],i+"/"+l+"/"+cw(p),n,i,l,s,p)}else(l in At.keywords||r.allKeys&&!(l in At.skipKeywords))&&di(r,e,t,h,i+"/"+l,n,i,l,s)}t(s,i,n,o,a,u,c)}}function cw(r){return r.replace(/~/g,"~0").replace(/\//g,"~1")}});var ss=d($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.getSchemaRefs=$e.resolveUrl=$e.normalizeId=$e._getFullPath=$e.getFullPath=$e.inlineRef=void 0;var lw=R(),hw=_o(),dw=hh(),fw=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function pw(r,e=!0){return typeof r=="boolean"?!0:e===!0?!vo(r):e?dh(r)<=e:!1}$e.inlineRef=pw;var mw=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function vo(r){for(let e in r){if(mw.has(e))return!0;let t=r[e];if(Array.isArray(t)&&t.some(vo)||typeof t=="object"&&vo(t))return!0}return!1}function dh(r){let e=0;for(let t in r){if(t==="$ref")return 1/0;if(e++,!fw.has(t)&&(typeof r[t]=="object"&&(0,lw.eachItem)(r[t],s=>e+=dh(s)),e===1/0))return 1/0}return e}function fh(r,e="",t){t!==!1&&(e=hr(e));let s=r.parse(e);return ph(r,s)}$e.getFullPath=fh;function ph(r,e){return r.serialize(e).split("#")[0]+"#"}$e._getFullPath=ph;var gw=/#\/?$/;function hr(r){return r?r.replace(gw,""):""}$e.normalizeId=hr;function yw(r,e,t){return t=hr(t),r.resolve(e,t)}$e.resolveUrl=yw;var _w=/^[a-z_][-a-z0-9._]*$/i;function vw(r,e){if(typeof r=="boolean")return{};let{schemaId:t,uriResolver:s}=this.opts,i=hr(r[t]||e),n={"":i},o=fh(s,i,!1),a={},u=new Set;return dw(r,{allKeys:!0},(h,f,p,m)=>{if(m===void 0)return;let g=o+f,y=n[m];typeof h[t]=="string"&&(y=_.call(this,h[t])),S.call(this,h.$anchor),S.call(this,h.$dynamicAnchor),n[f]=y;function _(O){let E=this.opts.uriResolver.resolve;if(O=hr(y?E(y,O):O),u.has(O))throw l(O);u.add(O);let $=this.refs[O];return typeof $=="string"&&($=this.refs[$]),typeof $=="object"?c(h,$.schema,O):O!==hr(g)&&(O[0]==="#"?(c(h,a[O],O),a[O]=h):this.refs[O]=g),O}function S(O){if(typeof O=="string"){if(!_w.test(O))throw new Error(`invalid anchor "${O}"`);_.call(this,`#${O}`)}}}),a;function c(h,f,p){if(f!==void 0&&!hw(h,f))throw l(p)}function l(h){return new Error(`reference "${h}" resolves to more than one schema`)}}$e.getSchemaRefs=vw});var dr=d(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.getData=It.KeywordCxt=It.validateFunctionCode=void 0;var vh=Wl(),mh=rs(),wo=lo(),fi=rs(),bw=th(),ns=oh(),bo=uh(),w=T(),x=Ae(),ww=ss(),dt=R(),is=ts();function $w(r){if($h(r)&&(Eh(r),wh(r))){Ow(r);return}bh(r,()=>(0,vh.topBoolOrEmptySchema)(r))}It.validateFunctionCode=$w;function bh({gen:r,validateName:e,schema:t,schemaEnv:s,opts:i},n){i.code.es5?r.func(e,(0,w._)`${x.default.data}, ${x.default.valCxt}`,s.$async,()=>{r.code((0,w._)`"use strict"; ${gh(t,i)}`),Sw(r,i),r.code(n)}):r.func(e,(0,w._)`${x.default.data}, ${Ew(i)}`,s.$async,()=>r.code(gh(t,i)).code(n))}function Ew(r){return(0,w._)`{${x.default.instancePath}="", ${x.default.parentData}, ${x.default.parentDataProperty}, ${x.default.rootData}=${x.default.data}${r.dynamicRef?(0,w._)`, ${x.default.dynamicAnchors}={}`:w.nil}}={}`}function Sw(r,e){r.if(x.default.valCxt,()=>{r.var(x.default.instancePath,(0,w._)`${x.default.valCxt}.${x.default.instancePath}`),r.var(x.default.parentData,(0,w._)`${x.default.valCxt}.${x.default.parentData}`),r.var(x.default.parentDataProperty,(0,w._)`${x.default.valCxt}.${x.default.parentDataProperty}`),r.var(x.default.rootData,(0,w._)`${x.default.valCxt}.${x.default.rootData}`),e.dynamicRef&&r.var(x.default.dynamicAnchors,(0,w._)`${x.default.valCxt}.${x.default.dynamicAnchors}`)},()=>{r.var(x.default.instancePath,(0,w._)`""`),r.var(x.default.parentData,(0,w._)`undefined`),r.var(x.default.parentDataProperty,(0,w._)`undefined`),r.var(x.default.rootData,x.default.data),e.dynamicRef&&r.var(x.default.dynamicAnchors,(0,w._)`{}`)})}function Ow(r){let{schema:e,opts:t,gen:s}=r;bh(r,()=>{t.$comment&&e.$comment&&Oh(r),Iw(r),s.let(x.default.vErrors,null),s.let(x.default.errors,0),t.unevaluated&&xw(r),Sh(r),Nw(r)})}function xw(r){let{gen:e,validateName:t}=r;r.evaluated=e.const("evaluated",(0,w._)`${t}.evaluated`),e.if((0,w._)`${r.evaluated}.dynamicProps`,()=>e.assign((0,w._)`${r.evaluated}.props`,(0,w._)`undefined`)),e.if((0,w._)`${r.evaluated}.dynamicItems`,()=>e.assign((0,w._)`${r.evaluated}.items`,(0,w._)`undefined`))}function gh(r,e){let t=typeof r=="object"&&r[e.schemaId];return t&&(e.code.source||e.code.process)?(0,w._)`/*# sourceURL=${t} */`:w.nil}function Tw(r,e){if($h(r)&&(Eh(r),wh(r))){Pw(r,e);return}(0,vh.boolOrEmptySchema)(r,e)}function wh({schema:r,self:e}){if(typeof r=="boolean")return!r;for(let t in r)if(e.RULES.all[t])return!0;return!1}function $h(r){return typeof r.schema!="boolean"}function Pw(r,e){let{schema:t,gen:s,opts:i}=r;i.$comment&&t.$comment&&Oh(r),Cw(r),Rw(r);let n=s.const("_errs",x.default.errors);Sh(r,n),s.var(e,(0,w._)`${n} === ${x.default.errors}`)}function Eh(r){(0,dt.checkUnknownRules)(r),Aw(r)}function Sh(r,e){if(r.opts.jtd)return yh(r,[],!1,e);let t=(0,mh.getSchemaTypes)(r.schema),s=(0,mh.coerceAndCheckDataType)(r,t);yh(r,t,!s,e)}function Aw(r){let{schema:e,errSchemaPath:t,opts:s,self:i}=r;e.$ref&&s.ignoreKeywordsWithRef&&(0,dt.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${t}"`)}function Iw(r){let{schema:e,opts:t}=r;e.default!==void 0&&t.useDefaults&&t.strictSchema&&(0,dt.checkStrictMode)(r,"default is ignored in the schema root")}function Cw(r){let e=r.schema[r.opts.schemaId];e&&(r.baseId=(0,ww.resolveUrl)(r.opts.uriResolver,r.baseId,e))}function Rw(r){if(r.schema.$async&&!r.schemaEnv.$async)throw new Error("async schema in sync schema")}function Oh({gen:r,schemaEnv:e,schema:t,errSchemaPath:s,opts:i}){let n=t.$comment;if(i.$comment===!0)r.code((0,w._)`${x.default.self}.logger.log(${n})`);else if(typeof i.$comment=="function"){let o=(0,w.str)`${s}/$comment`,a=r.scopeValue("root",{ref:e.root});r.code((0,w._)`${x.default.self}.opts.$comment(${n}, ${o}, ${a}.schema)`)}}function Nw(r){let{gen:e,schemaEnv:t,validateName:s,ValidationError:i,opts:n}=r;t.$async?e.if((0,w._)`${x.default.errors} === 0`,()=>e.return(x.default.data),()=>e.throw((0,w._)`new ${i}(${x.default.vErrors})`)):(e.assign((0,w._)`${s}.errors`,x.default.vErrors),n.unevaluated&&qw(r),e.return((0,w._)`${x.default.errors} === 0`))}function qw({gen:r,evaluated:e,props:t,items:s}){t instanceof w.Name&&r.assign((0,w._)`${e}.props`,t),s instanceof w.Name&&r.assign((0,w._)`${e}.items`,s)}function yh(r,e,t,s){let{gen:i,schema:n,data:o,allErrors:a,opts:u,self:c}=r,{RULES:l}=c;if(n.$ref&&(u.ignoreKeywordsWithRef||!(0,dt.schemaHasRulesButRef)(n,l))){i.block(()=>Th(r,"$ref",l.all.$ref.definition));return}u.jtd||jw(r,e),i.block(()=>{for(let f of l.rules)h(f);h(l.post)});function h(f){(0,wo.shouldUseGroup)(n,f)&&(f.type?(i.if((0,fi.checkDataType)(f.type,o,u.strictNumbers)),_h(r,f),e.length===1&&e[0]===f.type&&t&&(i.else(),(0,fi.reportTypeError)(r)),i.endIf()):_h(r,f),a||i.if((0,w._)`${x.default.errors} === ${s||0}`))}}function _h(r,e){let{gen:t,schema:s,opts:{useDefaults:i}}=r;i&&(0,bw.assignDefaults)(r,e.type),t.block(()=>{for(let n of e.rules)(0,wo.shouldUseRule)(s,n)&&Th(r,n.keyword,n.definition,e.type)})}function jw(r,e){r.schemaEnv.meta||!r.opts.strictTypes||(kw(r,e),r.opts.allowUnionTypes||Dw(r,e),Mw(r,r.dataTypes))}function kw(r,e){if(e.length){if(!r.dataTypes.length){r.dataTypes=e;return}e.forEach(t=>{xh(r.dataTypes,t)||$o(r,`type "${t}" not allowed by context "${r.dataTypes.join(",")}"`)}),Vw(r,e)}}function Dw(r,e){e.length>1&&!(e.length===2&&e.includes("null"))&&$o(r,"use allowUnionTypes to allow union type keyword")}function Mw(r,e){let t=r.self.RULES.all;for(let s in t){let i=t[s];if(typeof i=="object"&&(0,wo.shouldUseRule)(r.schema,i)){let{type:n}=i.definition;n.length&&!n.some(o=>Lw(e,o))&&$o(r,`missing type "${n.join(",")}" for keyword "${s}"`)}}}function Lw(r,e){return r.includes(e)||e==="number"&&r.includes("integer")}function xh(r,e){return r.includes(e)||e==="integer"&&r.includes("number")}function Vw(r,e){let t=[];for(let s of r.dataTypes)xh(e,s)?t.push(s):e.includes("integer")&&s==="number"&&t.push("integer");r.dataTypes=t}function $o(r,e){let t=r.schemaEnv.baseId+r.errSchemaPath;e+=` at "${t}" (strictTypes)`,(0,dt.checkStrictMode)(r,e,r.opts.strictTypes)}var pi=class{constructor(e,t,s){if((0,ns.validateKeywordUsage)(e,t,s),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=s,this.data=e.data,this.schema=e.schema[s],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,dt.schemaRefOrVal)(e,this.schema,s,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",Ph(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,ns.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${s} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:t.errors!==!1)&&(this.errsCount=e.gen.const("_errs",x.default.errors))}result(e,t,s){this.failResult((0,w.not)(e),t,s)}failResult(e,t,s){this.gen.if(e),s?s():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,w.not)(e),void 0,t)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,w._)`${t} !== undefined && (${(0,w.or)(this.invalid$data(),e)})`)}error(e,t,s){if(t){this.setParams(t),this._error(e,s),this.setParams({});return}this._error(e,s)}_error(e,t){(e?is.reportExtraError:is.reportError)(this,this.def.error,t)}$dataError(){(0,is.reportError)(this,this.def.$dataError||is.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,is.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,s=w.nil){this.gen.block(()=>{this.check$data(e,s),t()})}check$data(e=w.nil,t=w.nil){if(!this.$data)return;let{gen:s,schemaCode:i,schemaType:n,def:o}=this;s.if((0,w.or)((0,w._)`${i} === undefined`,t)),e!==w.nil&&s.assign(e,!0),(n.length||o.validateSchema)&&(s.elseIf(this.invalid$data()),this.$dataError(),e!==w.nil&&s.assign(e,!1)),s.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:s,def:i,it:n}=this;return(0,w.or)(o(),a());function o(){if(s.length){if(!(t instanceof w.Name))throw new Error("ajv implementation error");let u=Array.isArray(s)?s:[s];return(0,w._)`${(0,fi.checkDataTypes)(u,t,n.opts.strictNumbers,fi.DataType.Wrong)}`}return w.nil}function a(){if(i.validateSchema){let u=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,w._)`!${u}(${t})`}return w.nil}}subschema(e,t){let s=(0,bo.getSubschema)(this.it,e);(0,bo.extendSubschemaData)(s,this.it,e),(0,bo.extendSubschemaMode)(s,e);let i={...this.it,...s,items:void 0,props:void 0};return Tw(i,t),i}mergeEvaluated(e,t){let{it:s,gen:i}=this;s.opts.unevaluated&&(s.props!==!0&&e.props!==void 0&&(s.props=dt.mergeEvaluated.props(i,e.props,s.props,t)),s.items!==!0&&e.items!==void 0&&(s.items=dt.mergeEvaluated.items(i,e.items,s.items,t)))}mergeValidEvaluated(e,t){let{it:s,gen:i}=this;if(s.opts.unevaluated&&(s.props!==!0||s.items!==!0))return i.if(t,()=>this.mergeEvaluated(e,w.Name)),!0}};It.KeywordCxt=pi;function Th(r,e,t,s){let i=new pi(r,t,e);"code"in t?t.code(i,s):i.$data&&t.validate?(0,ns.funcKeywordCode)(i,t):"macro"in t?(0,ns.macroKeywordCode)(i,t):(t.compile||t.validate)&&(0,ns.funcKeywordCode)(i,t)}var Fw=/^\/(?:[^~]|~0|~1)*$/,Uw=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Ph(r,{dataLevel:e,dataNames:t,dataPathArr:s}){let i,n;if(r==="")return x.default.rootData;if(r[0]==="/"){if(!Fw.test(r))throw new Error(`Invalid JSON-pointer: ${r}`);i=r,n=x.default.rootData}else{let c=Uw.exec(r);if(!c)throw new Error(`Invalid JSON-pointer: ${r}`);let l=+c[1];if(i=c[2],i==="#"){if(l>=e)throw new Error(u("property/index",l));return s[e-l]}if(l>e)throw new Error(u("data",l));if(n=t[e-l],!i)return n}let o=n,a=i.split("/");for(let c of a)c&&(n=(0,w._)`${n}${(0,w.getProperty)((0,dt.unescapeJsonPointer)(c))}`,o=(0,w._)`${o} && ${n}`);return o;function u(c,l){return`Cannot access ${c} ${l} levels up, current level is ${e}`}}It.getData=Ph});var os=d(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});var Eo=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};So.default=Eo});var fr=d(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});var Oo=ss(),xo=class extends Error{constructor(e,t,s,i){super(i||`can't resolve reference ${s} from id ${t}`),this.missingRef=(0,Oo.resolveUrl)(e,t,s),this.missingSchema=(0,Oo.normalizeId)((0,Oo.getFullPath)(e,this.missingRef))}};To.default=xo});var as=d(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.resolveSchema=Ce.getCompilingSchema=Ce.resolveRef=Ce.compileSchema=Ce.SchemaEnv=void 0;var Fe=T(),Hw=os(),Wt=Ae(),Ue=ss(),Ah=R(),Gw=dr(),pr=class{constructor(e){var t;this.refs={},this.dynamicAnchors={};let s;typeof e.schema=="object"&&(s=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(t=e.baseId)!==null&&t!==void 0?t:(0,Ue.normalizeId)(s?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=s?.$async,this.refs={}}};Ce.SchemaEnv=pr;function Ao(r){let e=Ih.call(this,r);if(e)return e;let t=(0,Ue.getFullPath)(this.opts.uriResolver,r.root.baseId),{es5:s,lines:i}=this.opts.code,{ownProperties:n}=this.opts,o=new Fe.CodeGen(this.scope,{es5:s,lines:i,ownProperties:n}),a;r.$async&&(a=o.scopeValue("Error",{ref:Hw.default,code:(0,Fe._)`require("ajv/dist/runtime/validation_error").default`}));let u=o.scopeName("validate");r.validateName=u;let c={gen:o,allErrors:this.opts.allErrors,data:Wt.default.data,parentData:Wt.default.parentData,parentDataProperty:Wt.default.parentDataProperty,dataNames:[Wt.default.data],dataPathArr:[Fe.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",this.opts.code.source===!0?{ref:r.schema,code:(0,Fe.stringify)(r.schema)}:{ref:r.schema}),validateName:u,ValidationError:a,schema:r.schema,schemaEnv:r,rootId:t,baseId:r.baseId||t,schemaPath:Fe.nil,errSchemaPath:r.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Fe._)`""`,opts:this.opts,self:this},l;try{this._compilations.add(r),(0,Gw.validateFunctionCode)(c),o.optimize(this.opts.code.optimize);let h=o.toString();l=`${o.scopeRefs(Wt.default.scope)}return ${h}`,this.opts.code.process&&(l=this.opts.code.process(l,r));let p=new Function(`${Wt.default.self}`,`${Wt.default.scope}`,l)(this,this.scope.get());if(this.scope.value(u,{ref:p}),p.errors=null,p.schema=r.schema,p.schemaEnv=r,r.$async&&(p.$async=!0),this.opts.code.source===!0&&(p.source={validateName:u,validateCode:h,scopeValues:o._values}),this.opts.unevaluated){let{props:m,items:g}=c;p.evaluated={props:m instanceof Fe.Name?void 0:m,items:g instanceof Fe.Name?void 0:g,dynamicProps:m instanceof Fe.Name,dynamicItems:g instanceof Fe.Name},p.source&&(p.source.evaluated=(0,Fe.stringify)(p.evaluated))}return r.validate=p,r}catch(h){throw delete r.validate,delete r.validateName,l&&this.logger.error("Error compiling schema, function code:",l),h}finally{this._compilations.delete(r)}}Ce.compileSchema=Ao;function zw(r,e,t){var s;t=(0,Ue.resolveUrl)(this.opts.uriResolver,e,t);let i=r.refs[t];if(i)return i;let n=Ww.call(this,r,t);if(n===void 0){let o=(s=r.localRefs)===null||s===void 0?void 0:s[t],{schemaId:a}=this.opts;o&&(n=new pr({schema:o,schemaId:a,root:r,baseId:e}))}if(n!==void 0)return r.refs[t]=Bw.call(this,n)}Ce.resolveRef=zw;function Bw(r){return(0,Ue.inlineRef)(r.schema,this.opts.inlineRefs)?r.schema:r.validate?r:Ao.call(this,r)}function Ih(r){for(let e of this._compilations)if(Kw(e,r))return e}Ce.getCompilingSchema=Ih;function Kw(r,e){return r.schema===e.schema&&r.root===e.root&&r.baseId===e.baseId}function Ww(r,e){let t;for(;typeof(t=this.refs[e])=="string";)e=t;return t||this.schemas[e]||mi.call(this,r,e)}function mi(r,e){let t=this.opts.uriResolver.parse(e),s=(0,Ue._getFullPath)(this.opts.uriResolver,t),i=(0,Ue.getFullPath)(this.opts.uriResolver,r.baseId,void 0);if(Object.keys(r.schema).length>0&&s===i)return Po.call(this,t,r);let n=(0,Ue.normalizeId)(s),o=this.refs[n]||this.schemas[n];if(typeof o=="string"){let a=mi.call(this,r,o);return typeof a?.schema!="object"?void 0:Po.call(this,t,a)}if(typeof o?.schema=="object"){if(o.validate||Ao.call(this,o),n===(0,Ue.normalizeId)(e)){let{schema:a}=o,{schemaId:u}=this.opts,c=a[u];return c&&(i=(0,Ue.resolveUrl)(this.opts.uriResolver,i,c)),new pr({schema:a,schemaId:u,root:r,baseId:i})}return Po.call(this,t,o)}}Ce.resolveSchema=mi;var Yw=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Po(r,{baseId:e,schema:t,root:s}){var i;if(((i=r.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let a of r.fragment.slice(1).split("/")){if(typeof t=="boolean")return;let u=t[(0,Ah.unescapeFragment)(a)];if(u===void 0)return;t=u;let c=typeof t=="object"&&t[this.opts.schemaId];!Yw.has(a)&&c&&(e=(0,Ue.resolveUrl)(this.opts.uriResolver,e,c))}let n;if(typeof t!="boolean"&&t.$ref&&!(0,Ah.schemaHasRulesButRef)(t,this.RULES)){let a=(0,Ue.resolveUrl)(this.opts.uriResolver,e,t.$ref);n=mi.call(this,s,a)}let{schemaId:o}=this.opts;if(n=n||new pr({schema:t,schemaId:o,root:s,baseId:e}),n.schema!==n.root.schema)return n}});var Ch=d((Tq,Xw)=>{Xw.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var Ro=d((Pq,Dh)=>{"use strict";var Jw=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Nh=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),Io=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),qh=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),Zw=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function Co(r){let e="",t=0,s=0;for(s=0;s<r.length;s++)if(t=r[s].charCodeAt(0),t!==48){if(!(t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102))return"";e+=r[s];break}for(s+=1;s<r.length;s++){if(t=r[s].charCodeAt(0),!(t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102))return"";e+=r[s]}return e}var Qw=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function Rh(r){return r.length=0,!0}function e$(r,e,t){if(r.length){let s=Co(r);if(s!=="")e.push(s);else return t.error=!0,!1;r.length=0}return!0}function t$(r){let e=0,t={error:!1,address:"",zone:""},s=[],i=[],n=!1,o=!1,a=e$;for(let u=0;u<r.length;u++){let c=r[u];if(!(c==="["||c==="]"))if(c===":"){if(n===!0&&(o=!0),!a(i,s,t))break;if(++e>7){t.error=!0;break}u>0&&r[u-1]===":"&&(n=!0),s.push(":");continue}else if(c==="%"){if(!a(i,s,t))break;a=Rh}else{i.push(c);continue}}return i.length&&(a===Rh?t.zone=i.join(""):o?s.push(i.join("")):s.push(Co(i))),t.address=s.join(""),t}function jh(r){if(r$(r,":")<2)return{host:r,isIPV6:!1};let e=t$(r);if(e.error)return{host:r,isIPV6:!1};{let t=e.address,s=e.address;return e.zone&&(t+="%"+e.zone,s+="%25"+e.zone),{host:t,isIPV6:!0,escapedHost:s}}}function r$(r,e){let t=0;for(let s=0;s<r.length;s++)r[s]===e&&t++;return t}function s$(r){let e=r,t=[],s=-1,i=0;for(;i=e.length;){if(i===1){if(e===".")break;if(e==="/"){t.push("/");break}else{t.push(e);break}}else if(i===2){if(e[0]==="."){if(e[1]===".")break;if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&(e[1]==="."||e[1]==="/")){t.push("/");break}}else if(i===3&&e==="/.."){t.length!==0&&t.pop(),t.push("/");break}if(e[0]==="."){if(e[1]==="."){if(e[2]==="/"){e=e.slice(3);continue}}else if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&e[1]==="."){if(e[2]==="/"){e=e.slice(2);continue}else if(e[2]==="."&&e[3]==="/"){e=e.slice(3),t.length!==0&&t.pop();continue}}if((s=e.indexOf("/",1))===-1){t.push(e);break}else t.push(e.slice(0,s)),e=e.slice(s)}return t.join("")}var i$={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},n$=/[@/?#:]/g,o$=/[@/?#]/g;function kh(r,e){let t=e?o$:n$;return t.lastIndex=0,r.replace(t,s=>i$[s])}function a$(r,e=!1){if(r.indexOf("%")===-1)return r;let t="";for(let s=0;s<r.length;s++){if(r[s]==="%"&&s+2<r.length){let i=r.slice(s+1,s+3);if(Io(i)){let n=i.toUpperCase(),o=String.fromCharCode(parseInt(n,16));e&&qh(o)?t+=o:t+="%"+n,s+=2;continue}}t+=r[s]}return t}function u$(r){let e="";for(let t=0;t<r.length;t++){if(r[t]==="%"&&t+2<r.length){let s=r.slice(t+1,t+3);if(Io(s)){let i=s.toUpperCase(),n=String.fromCharCode(parseInt(i,16));n!=="."&&qh(n)?e+=n:e+="%"+i,t+=2;continue}}Zw(r[t])?e+=r[t]:e+=escape(r[t])}return e}function c$(r){let e="";for(let t=0;t<r.length;t++){if(r[t]==="%"&&t+2<r.length){let s=r.slice(t+1,t+3);if(Io(s)){e+="%"+s.toUpperCase(),t+=2;continue}}e+=escape(r[t])}return e}function l$(r){let e=[];if(r.userinfo!==void 0&&(e.push(r.userinfo),e.push("@")),r.host!==void 0){let t=unescape(r.host);if(!Nh(t)){let s=jh(t);s.isIPV6===!0?t=`[${s.escapedHost}]`:t=kh(t,!1)}e.push(t)}return(typeof r.port=="number"||typeof r.port=="string")&&(e.push(":"),e.push(String(r.port))),e.length?e.join(""):void 0}Dh.exports={nonSimpleDomain:Qw,recomposeAuthority:l$,reescapeHostDelimiters:kh,normalizePercentEncoding:a$,normalizePathEncoding:u$,escapePreservingEscapes:c$,removeDotSegments:s$,isIPv4:Nh,isUUID:Jw,normalizeIPv6:jh,stringArrayToHexStripped:Co}});var Uh=d((Aq,Fh)=>{"use strict";var{isUUID:h$}=Ro(),d$=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,f$=["http","https","ws","wss","urn","urn:uuid"];function p$(r){return f$.indexOf(r)!==-1}function No(r){return r.secure===!0?!0:r.secure===!1?!1:r.scheme?r.scheme.length===3&&(r.scheme[0]==="w"||r.scheme[0]==="W")&&(r.scheme[1]==="s"||r.scheme[1]==="S")&&(r.scheme[2]==="s"||r.scheme[2]==="S"):!1}function Mh(r){return r.host||(r.error=r.error||"HTTP URIs must have a host."),r}function Lh(r){let e=String(r.scheme).toLowerCase()==="https";return(r.port===(e?443:80)||r.port==="")&&(r.port=void 0),r.path||(r.path="/"),r}function m$(r){return r.secure=No(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r}function g$(r){if((r.port===(No(r)?443:80)||r.port==="")&&(r.port=void 0),typeof r.secure=="boolean"&&(r.scheme=r.secure?"wss":"ws",r.secure=void 0),r.resourceName){let[e,t]=r.resourceName.split("?");r.path=e&&e!=="/"?e:void 0,r.query=t,r.resourceName=void 0}return r.fragment=void 0,r}function y$(r,e){if(!r.path)return r.error="URN can not be parsed",r;let t=r.path.match(d$);if(t){let s=e.scheme||r.scheme||"urn";r.nid=t[1].toLowerCase(),r.nss=t[2];let i=`${s}:${e.nid||r.nid}`,n=qo(i);r.path=void 0,n&&(r=n.parse(r,e))}else r.error=r.error||"URN can not be parsed.";return r}function _$(r,e){if(r.nid===void 0)throw new Error("URN without nid cannot be serialized");let t=e.scheme||r.scheme||"urn",s=r.nid.toLowerCase(),i=`${t}:${e.nid||s}`,n=qo(i);n&&(r=n.serialize(r,e));let o=r,a=r.nss;return o.path=`${s||e.nid}:${a}`,e.skipEscape=!0,o}function v$(r,e){let t=r;return t.uuid=t.nss,t.nss=void 0,!e.tolerant&&(!t.uuid||!h$(t.uuid))&&(t.error=t.error||"UUID is not valid."),t}function b$(r){let e=r;return e.nss=(r.uuid||"").toLowerCase(),e}var Vh={scheme:"http",domainHost:!0,parse:Mh,serialize:Lh},w$={scheme:"https",domainHost:Vh.domainHost,parse:Mh,serialize:Lh},gi={scheme:"ws",domainHost:!0,parse:m$,serialize:g$},$$={scheme:"wss",domainHost:gi.domainHost,parse:gi.parse,serialize:gi.serialize},E$={scheme:"urn",parse:y$,serialize:_$,skipNormalize:!0},S$={scheme:"urn:uuid",parse:v$,serialize:b$,skipNormalize:!0},yi={http:Vh,https:w$,ws:gi,wss:$$,urn:E$,"urn:uuid":S$};Object.setPrototypeOf(yi,null);function qo(r){return r&&(yi[r]||yi[r.toLowerCase()])||void 0}Fh.exports={wsIsSecure:No,SCHEMES:yi,isValidSchemeName:p$,getSchemeHandler:qo}});var Wh=d((Iq,_i)=>{"use strict";var{normalizeIPv6:O$,removeDotSegments:us,recomposeAuthority:x$,normalizePercentEncoding:T$,normalizePathEncoding:P$,escapePreservingEscapes:A$,reescapeHostDelimiters:I$,isIPv4:C$,nonSimpleDomain:R$}=Ro(),{SCHEMES:N$,getSchemeHandler:Gh}=Uh();function q$(r,e){return typeof r=="string"?r=L$(r,e):typeof r=="object"&&(r=mr(Yt(r,e),e)),r}function j$(r,e,t){let s=t?Object.assign({scheme:"null"},t):{scheme:"null"},i=zh(mr(r,s),mr(e,s),s,!0);return s.skipEscape=!0,Yt(i,s)}function zh(r,e,t,s){let i={};return s||(r=mr(Yt(r,t),t),e=mr(Yt(e,t),t)),t=t||{},!t.tolerant&&e.scheme?(i.scheme=e.scheme,i.userinfo=e.userinfo,i.host=e.host,i.port=e.port,i.path=us(e.path||""),i.query=e.query):(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0?(i.userinfo=e.userinfo,i.host=e.host,i.port=e.port,i.path=us(e.path||""),i.query=e.query):(e.path?(e.path[0]==="/"?i.path=us(e.path):((r.userinfo!==void 0||r.host!==void 0||r.port!==void 0)&&!r.path?i.path="/"+e.path:r.path?i.path=r.path.slice(0,r.path.lastIndexOf("/")+1)+e.path:i.path=e.path,i.path=us(i.path)),i.query=e.query):(i.path=r.path,e.query!==void 0?i.query=e.query:i.query=r.query),i.userinfo=r.userinfo,i.host=r.host,i.port=r.port),i.scheme=r.scheme),i.fragment=e.fragment,i}function k$(r,e,t){let s=Hh(r,t),i=Hh(e,t);return s!==void 0&&i!==void 0&&s.toLowerCase()===i.toLowerCase()}function Yt(r,e){let t={host:r.host,scheme:r.scheme,userinfo:r.userinfo,port:r.port,path:r.path,query:r.query,nid:r.nid,nss:r.nss,uuid:r.uuid,fragment:r.fragment,reference:r.reference,resourceName:r.resourceName,secure:r.secure,error:""},s=Object.assign({},e),i=[],n=Gh(s.scheme||t.scheme);n&&n.serialize&&n.serialize(t,s),t.path!==void 0&&(s.skipEscape?t.path=T$(t.path):(t.path=A$(t.path),t.scheme!==void 0&&(t.path=t.path.split("%3A").join(":")))),s.reference!=="suffix"&&t.scheme&&i.push(t.scheme,":");let o=x$(t);if(o!==void 0&&(s.reference!=="suffix"&&i.push("//"),i.push(o),t.path&&t.path[0]!=="/"&&i.push("/")),t.path!==void 0){let a=t.path;!s.absolutePath&&(!n||!n.absolutePath)&&(a=us(a)),o===void 0&&a[0]==="/"&&a[1]==="/"&&(a="/%2F"+a.slice(2)),i.push(a)}return t.query!==void 0&&i.push("?",t.query),t.fragment!==void 0&&i.push("#",t.fragment),i.join("")}var D$=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function M$(r,e){if(e[2]!==void 0&&r.path&&r.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof r.port=="number"&&(r.port<0||r.port>65535))return"URI port is malformed."}function Bh(r,e){let t=Object.assign({},e),s={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=!1,n=!1;t.reference==="suffix"&&(t.scheme?r=t.scheme+":"+r:r="//"+r);let o=r.match(D$);if(o){s.scheme=o[1],s.userinfo=o[3],s.host=o[4],s.port=parseInt(o[5],10),s.path=o[6]||"",s.query=o[7],s.fragment=o[8],isNaN(s.port)&&(s.port=o[5]);let a=M$(s,o);if(a!==void 0&&(s.error=s.error||a,i=!0),s.host)if(C$(s.host)===!1){let l=O$(s.host);s.host=l.host.toLowerCase(),n=l.isIPV6}else n=!0;s.scheme===void 0&&s.userinfo===void 0&&s.host===void 0&&s.port===void 0&&s.query===void 0&&!s.path?s.reference="same-document":s.scheme===void 0?s.reference="relative":s.fragment===void 0?s.reference="absolute":s.reference="uri",t.reference&&t.reference!=="suffix"&&t.reference!==s.reference&&(s.error=s.error||"URI is not a "+t.reference+" reference.");let u=Gh(t.scheme||s.scheme);if(!t.unicodeSupport&&(!u||!u.unicodeSupport)&&s.host&&(t.domainHost||u&&u.domainHost)&&n===!1&&R$(s.host))try{s.host=URL.domainToASCII(s.host.toLowerCase())}catch(c){s.error=s.error||"Host's domain name can not be converted to ASCII: "+c}if((!u||u&&!u.skipNormalize)&&(r.indexOf("%")!==-1&&(s.scheme!==void 0&&(s.scheme=unescape(s.scheme)),s.host!==void 0&&(s.host=I$(unescape(s.host),n))),s.path&&(s.path=P$(s.path)),s.fragment))try{s.fragment=encodeURI(decodeURIComponent(s.fragment))}catch{s.error=s.error||"URI malformed"}u&&u.parse&&u.parse(s,t)}else s.error=s.error||"URI can not be parsed.";return{parsed:s,malformedAuthorityOrPort:i}}function mr(r,e){return Bh(r,e).parsed}function L$(r,e){return Kh(r,e).normalized}function Kh(r,e){let{parsed:t,malformedAuthorityOrPort:s}=Bh(r,e);return{normalized:s?r:Yt(t,e),malformedAuthorityOrPort:s}}function Hh(r,e){if(typeof r=="string"){let{normalized:t,malformedAuthorityOrPort:s}=Kh(r,e);return s?void 0:t}if(typeof r=="object")return Yt(r,e)}var jo={SCHEMES:N$,normalize:q$,resolve:j$,resolveComponent:zh,equal:k$,serialize:Yt,parse:mr};_i.exports=jo;_i.exports.default=jo;_i.exports.fastUri=jo});var Xh=d(ko=>{"use strict";Object.defineProperty(ko,"__esModule",{value:!0});var Yh=Wh();Yh.code='require("ajv/dist/runtime/uri").default';ko.default=Yh});var Lo=d(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.CodeGen=oe.Name=oe.nil=oe.stringify=oe.str=oe._=oe.KeywordCxt=void 0;var V$=dr();Object.defineProperty(oe,"KeywordCxt",{enumerable:!0,get:function(){return V$.KeywordCxt}});var gr=T();Object.defineProperty(oe,"_",{enumerable:!0,get:function(){return gr._}});Object.defineProperty(oe,"str",{enumerable:!0,get:function(){return gr.str}});Object.defineProperty(oe,"stringify",{enumerable:!0,get:function(){return gr.stringify}});Object.defineProperty(oe,"nil",{enumerable:!0,get:function(){return gr.nil}});Object.defineProperty(oe,"Name",{enumerable:!0,get:function(){return gr.Name}});Object.defineProperty(oe,"CodeGen",{enumerable:!0,get:function(){return gr.CodeGen}});var F$=os(),td=fr(),U$=co(),cs=as(),H$=T(),ls=ss(),vi=rs(),Mo=R(),Jh=Ch(),G$=Xh(),rd=(r,e)=>new RegExp(r,e);rd.code="new RegExp";var z$=["removeAdditional","useDefaults","coerceTypes"],B$=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),K$={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."},W$={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Zh=200;function Y$(r){var e,t,s,i,n,o,a,u,c,l,h,f,p,m,g,y,_,S,O,E,$,he,U,De,xe;let G=r.strict,N=(e=r.code)===null||e===void 0?void 0:e.optimize,Js=N===!0||N===void 0?1:N||0,Ur=(s=(t=r.code)===null||t===void 0?void 0:t.regExp)!==null&&s!==void 0?s:rd,Me=(i=r.uriResolver)!==null&&i!==void 0?i:G$.default;return{strictSchema:(o=(n=r.strictSchema)!==null&&n!==void 0?n:G)!==null&&o!==void 0?o:!0,strictNumbers:(u=(a=r.strictNumbers)!==null&&a!==void 0?a:G)!==null&&u!==void 0?u:!0,strictTypes:(l=(c=r.strictTypes)!==null&&c!==void 0?c:G)!==null&&l!==void 0?l:"log",strictTuples:(f=(h=r.strictTuples)!==null&&h!==void 0?h:G)!==null&&f!==void 0?f:"log",strictRequired:(m=(p=r.strictRequired)!==null&&p!==void 0?p:G)!==null&&m!==void 0?m:!1,code:r.code?{...r.code,optimize:Js,regExp:Ur}:{optimize:Js,regExp:Ur},loopRequired:(g=r.loopRequired)!==null&&g!==void 0?g:Zh,loopEnum:(y=r.loopEnum)!==null&&y!==void 0?y:Zh,meta:(_=r.meta)!==null&&_!==void 0?_:!0,messages:(S=r.messages)!==null&&S!==void 0?S:!0,inlineRefs:(O=r.inlineRefs)!==null&&O!==void 0?O:!0,schemaId:(E=r.schemaId)!==null&&E!==void 0?E:"$id",addUsedSchema:($=r.addUsedSchema)!==null&&$!==void 0?$:!0,validateSchema:(he=r.validateSchema)!==null&&he!==void 0?he:!0,validateFormats:(U=r.validateFormats)!==null&&U!==void 0?U:!0,unicodeRegExp:(De=r.unicodeRegExp)!==null&&De!==void 0?De:!0,int32range:(xe=r.int32range)!==null&&xe!==void 0?xe:!0,uriResolver:Me}}var hs=class{constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...Y$(e)};let{es5:t,lines:s}=this.opts.code;this.scope=new H$.ValueScope({scope:{},prefixes:B$,es5:t,lines:s}),this.logger=tE(e.logger);let i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,U$.getRules)(),Qh.call(this,K$,e,"NOT SUPPORTED"),Qh.call(this,W$,e,"DEPRECATED","warn"),this._metaOpts=Q$.call(this),e.formats&&J$.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&Z$.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),X$.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:s}=this.opts,i=Jh;s==="id"&&(i={...Jh},i.id=i.$id,delete i.$id),t&&e&&this.addMetaSchema(i,i[s],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[t]||e:void 0}validate(e,t){let s;if(typeof e=="string"){if(s=this.getSchema(e),!s)throw new Error(`no schema with key or ref "${e}"`)}else s=this.compile(e);let i=s(t);return"$async"in s||(this.errors=s.errors),i}compile(e,t){let s=this._addSchema(e,t);return s.validate||this._compileSchemaEnv(s)}compileAsync(e,t){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:s}=this.opts;return i.call(this,e,t);async function i(l,h){await n.call(this,l.$schema);let f=this._addSchema(l,h);return f.validate||o.call(this,f)}async function n(l){l&&!this.getSchema(l)&&await i.call(this,{$ref:l},!0)}async function o(l){try{return this._compileSchemaEnv(l)}catch(h){if(!(h instanceof td.default))throw h;return a.call(this,h),await u.call(this,h.missingSchema),o.call(this,l)}}function a({missingSchema:l,missingRef:h}){if(this.refs[l])throw new Error(`AnySchema ${l} is loaded but ${h} cannot be resolved`)}async function u(l){let h=await c.call(this,l);this.refs[l]||await n.call(this,h.$schema),this.refs[l]||this.addSchema(h,l,t)}async function c(l){let h=this._loading[l];if(h)return h;try{return await(this._loading[l]=s(l))}finally{delete this._loading[l]}}}addSchema(e,t,s,i=this.opts.validateSchema){if(Array.isArray(e)){for(let o of e)this.addSchema(o,void 0,s,i);return this}let n;if(typeof e=="object"){let{schemaId:o}=this.opts;if(n=e[o],n!==void 0&&typeof n!="string")throw new Error(`schema ${o} must be string`)}return t=(0,ls.normalizeId)(t||n),this._checkUnique(t),this.schemas[t]=this._addSchema(e,s,t,i,!0),this}addMetaSchema(e,t,s=this.opts.validateSchema){return this.addSchema(e,t,!0,s),this}validateSchema(e,t){if(typeof e=="boolean")return!0;let s;if(s=e.$schema,s!==void 0&&typeof s!="string")throw new Error("$schema must be a string");if(s=s||this.opts.defaultMeta||this.defaultMeta(),!s)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(s,e);if(!i&&t){let n="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(n);else throw new Error(n)}return i}getSchema(e){let t;for(;typeof(t=ed.call(this,e))=="string";)e=t;if(t===void 0){let{schemaId:s}=this.opts,i=new cs.SchemaEnv({schema:{},schemaId:s});if(t=cs.resolveSchema.call(this,i,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=ed.call(this,e);return typeof t=="object"&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let t=e;this._cache.delete(t);let s=e[this.opts.schemaId];return s&&(s=(0,ls.normalizeId)(s),delete this.schemas[s],delete this.refs[s]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let s;if(typeof e=="string")s=e,typeof t=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=s);else if(typeof e=="object"&&t===void 0){if(t=e,s=t.keyword,Array.isArray(s)&&!s.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(sE.call(this,s,t),!t)return(0,Mo.eachItem)(s,n=>Do.call(this,n)),this;nE.call(this,t);let i={...t,type:(0,vi.getJSONTypes)(t.type),schemaType:(0,vi.getJSONTypes)(t.schemaType)};return(0,Mo.eachItem)(s,i.type.length===0?n=>Do.call(this,n,i):n=>i.type.forEach(o=>Do.call(this,n,i,o))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t=="object"?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let s of t.rules){let i=s.rules.findIndex(n=>n.keyword===e);i>=0&&s.rules.splice(i,1)}return this}addFormat(e,t){return typeof t=="string"&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:s="data"}={}){return!e||e.length===0?"No errors":e.map(i=>`${s}${i.instancePath} ${i.message}`).reduce((i,n)=>i+t+n)}$dataMetaSchema(e,t){let s=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let i of t){let n=i.split("/").slice(1),o=e;for(let a of n)o=o[a];for(let a in s){let u=s[a];if(typeof u!="object")continue;let{$data:c}=u.definition,l=o[a];c&&l&&(o[a]=sd(l))}}return e}_removeAllSchemas(e,t){for(let s in e){let i=e[s];(!t||t.test(s))&&(typeof i=="string"?delete e[s]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[s]))}}_addSchema(e,t,s,i=this.opts.validateSchema,n=this.opts.addUsedSchema){let o,{schemaId:a}=this.opts;if(typeof e=="object")o=e[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let u=this._cache.get(e);if(u!==void 0)return u;s=(0,ls.normalizeId)(o||s);let c=ls.getSchemaRefs.call(this,e,s);return u=new cs.SchemaEnv({schema:e,schemaId:a,meta:t,baseId:s,localRefs:c}),this._cache.set(u.schema,u),n&&!s.startsWith("#")&&(s&&this._checkUnique(s),this.refs[s]=u),i&&this.validateSchema(e,!0),u}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):cs.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{cs.compileSchema.call(this,e)}finally{this.opts=t}}};hs.ValidationError=F$.default;hs.MissingRefError=td.default;oe.default=hs;function Qh(r,e,t,s="error"){for(let i in r){let n=i;n in e&&this.logger[s](`${t}: option ${i}. ${r[n]}`)}}function ed(r){return r=(0,ls.normalizeId)(r),this.schemas[r]||this.refs[r]}function X$(){let r=this.opts.schemas;if(r)if(Array.isArray(r))this.addSchema(r);else for(let e in r)this.addSchema(r[e],e)}function J$(){for(let r in this.opts.formats){let e=this.opts.formats[r];e&&this.addFormat(r,e)}}function Z$(r){if(Array.isArray(r)){this.addVocabulary(r);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in r){let t=r[e];t.keyword||(t.keyword=e),this.addKeyword(t)}}function Q$(){let r={...this.opts};for(let e of z$)delete r[e];return r}var eE={log(){},warn(){},error(){}};function tE(r){if(r===!1)return eE;if(r===void 0)return console;if(r.log&&r.warn&&r.error)return r;throw new Error("logger must implement log, warn and error methods")}var rE=/^[a-z_$][a-z0-9_$:-]*$/i;function sE(r,e){let{RULES:t}=this;if((0,Mo.eachItem)(r,s=>{if(t.keywords[s])throw new Error(`Keyword ${s} is already defined`);if(!rE.test(s))throw new Error(`Keyword ${s} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function Do(r,e,t){var s;let i=e?.post;if(t&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:n}=this,o=i?n.post:n.rules.find(({type:u})=>u===t);if(o||(o={type:t,rules:[]},n.rules.push(o)),n.keywords[r]=!0,!e)return;let a={keyword:r,definition:{...e,type:(0,vi.getJSONTypes)(e.type),schemaType:(0,vi.getJSONTypes)(e.schemaType)}};e.before?iE.call(this,o,a,e.before):o.rules.push(a),n.all[r]=a,(s=e.implements)===null||s===void 0||s.forEach(u=>this.addKeyword(u))}function iE(r,e,t){let s=r.rules.findIndex(i=>i.keyword===t);s>=0?r.rules.splice(s,0,e):(r.rules.push(e),this.logger.warn(`rule ${t} is not defined`))}function nE(r){let{metaSchema:e}=r;e!==void 0&&(r.$data&&this.opts.$data&&(e=sd(e)),r.validateSchema=this.compile(e,!0))}var oE={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function sd(r){return{anyOf:[r,oE]}}});var id=d(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});var aE={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Vo.default=aE});var $i=d(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.callRef=Xt.getValidate=void 0;var uE=fr(),nd=Ie(),Ee=T(),yr=Ae(),od=as(),bi=R(),cE={keyword:"$ref",schemaType:"string",code(r){let{gen:e,schema:t,it:s}=r,{baseId:i,schemaEnv:n,validateName:o,opts:a,self:u}=s,{root:c}=n;if((t==="#"||t==="#/")&&i===c.baseId)return h();let l=od.resolveRef.call(u,c,i,t);if(l===void 0)throw new uE.default(s.opts.uriResolver,i,t);if(l instanceof od.SchemaEnv)return f(l);return p(l);function h(){if(n===c)return wi(r,o,n,n.$async);let m=e.scopeValue("root",{ref:c});return wi(r,(0,Ee._)`${m}.validate`,c,c.$async)}function f(m){let g=ad(r,m);wi(r,g,m,m.$async)}function p(m){let g=e.scopeValue("schema",a.code.source===!0?{ref:m,code:(0,Ee.stringify)(m)}:{ref:m}),y=e.name("valid"),_=r.subschema({schema:m,dataTypes:[],schemaPath:Ee.nil,topSchemaRef:g,errSchemaPath:t},y);r.mergeEvaluated(_),r.ok(y)}}};function ad(r,e){let{gen:t}=r;return e.validate?t.scopeValue("validate",{ref:e.validate}):(0,Ee._)`${t.scopeValue("wrapper",{ref:e})}.validate`}Xt.getValidate=ad;function wi(r,e,t,s){let{gen:i,it:n}=r,{allErrors:o,schemaEnv:a,opts:u}=n,c=u.passContext?yr.default.this:Ee.nil;s?l():h();function l(){if(!a.$async)throw new Error("async schema referenced by sync schema");let m=i.let("valid");i.try(()=>{i.code((0,Ee._)`await ${(0,nd.callValidateCode)(r,e,c)}`),p(e),o||i.assign(m,!0)},g=>{i.if((0,Ee._)`!(${g} instanceof ${n.ValidationError})`,()=>i.throw(g)),f(g),o||i.assign(m,!1)}),r.ok(m)}function h(){r.result((0,nd.callValidateCode)(r,e,c),()=>p(e),()=>f(e))}function f(m){let g=(0,Ee._)`${m}.errors`;i.assign(yr.default.vErrors,(0,Ee._)`${yr.default.vErrors} === null ? ${g} : ${yr.default.vErrors}.concat(${g})`),i.assign(yr.default.errors,(0,Ee._)`${yr.default.vErrors}.length`)}function p(m){var g;if(!n.opts.unevaluated)return;let y=(g=t?.validate)===null||g===void 0?void 0:g.evaluated;if(n.props!==!0)if(y&&!y.dynamicProps)y.props!==void 0&&(n.props=bi.mergeEvaluated.props(i,y.props,n.props));else{let _=i.var("props",(0,Ee._)`${m}.evaluated.props`);n.props=bi.mergeEvaluated.props(i,_,n.props,Ee.Name)}if(n.items!==!0)if(y&&!y.dynamicItems)y.items!==void 0&&(n.items=bi.mergeEvaluated.items(i,y.items,n.items));else{let _=i.var("items",(0,Ee._)`${m}.evaluated.items`);n.items=bi.mergeEvaluated.items(i,_,n.items,Ee.Name)}}}Xt.callRef=wi;Xt.default=cE});var Uo=d(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:!0});var lE=id(),hE=$i(),dE=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",lE.default,hE.default];Fo.default=dE});var ud=d(Ho=>{"use strict";Object.defineProperty(Ho,"__esModule",{value:!0});var Ei=T(),Ct=Ei.operators,Si={maximum:{okStr:"<=",ok:Ct.LTE,fail:Ct.GT},minimum:{okStr:">=",ok:Ct.GTE,fail:Ct.LT},exclusiveMaximum:{okStr:"<",ok:Ct.LT,fail:Ct.GTE},exclusiveMinimum:{okStr:">",ok:Ct.GT,fail:Ct.LTE}},fE={message:({keyword:r,schemaCode:e})=>(0,Ei.str)`must be ${Si[r].okStr} ${e}`,params:({keyword:r,schemaCode:e})=>(0,Ei._)`{comparison: ${Si[r].okStr}, limit: ${e}}`},pE={keyword:Object.keys(Si),type:"number",schemaType:"number",$data:!0,error:fE,code(r){let{keyword:e,data:t,schemaCode:s}=r;r.fail$data((0,Ei._)`${t} ${Si[e].fail} ${s} || isNaN(${t})`)}};Ho.default=pE});var cd=d(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});var ds=T(),mE={message:({schemaCode:r})=>(0,ds.str)`must be multiple of ${r}`,params:({schemaCode:r})=>(0,ds._)`{multipleOf: ${r}}`},gE={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:mE,code(r){let{gen:e,data:t,schemaCode:s,it:i}=r,n=i.opts.multipleOfPrecision,o=e.let("res"),a=n?(0,ds._)`Math.abs(Math.round(${o}) - ${o}) > 1e-${n}`:(0,ds._)`${o} !== parseInt(${o})`;r.fail$data((0,ds._)`(${s} === 0 || (${o} = ${t}/${s}, ${a}))`)}};Go.default=gE});var hd=d(zo=>{"use strict";Object.defineProperty(zo,"__esModule",{value:!0});function ld(r){let e=r.length,t=0,s=0,i;for(;s<e;)t++,i=r.charCodeAt(s++),i>=55296&&i<=56319&&s<e&&(i=r.charCodeAt(s),(i&64512)===56320&&s++);return t}zo.default=ld;ld.code='require("ajv/dist/runtime/ucs2length").default'});var dd=d(Bo=>{"use strict";Object.defineProperty(Bo,"__esModule",{value:!0});var Jt=T(),yE=R(),_E=hd(),vE={message({keyword:r,schemaCode:e}){let t=r==="maxLength"?"more":"fewer";return(0,Jt.str)`must NOT have ${t} than ${e} characters`},params:({schemaCode:r})=>(0,Jt._)`{limit: ${r}}`},bE={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:vE,code(r){let{keyword:e,data:t,schemaCode:s,it:i}=r,n=e==="maxLength"?Jt.operators.GT:Jt.operators.LT,o=i.opts.unicode===!1?(0,Jt._)`${t}.length`:(0,Jt._)`${(0,yE.useFunc)(r.gen,_E.default)}(${t})`;r.fail$data((0,Jt._)`${o} ${n} ${s}`)}};Bo.default=bE});var fd=d(Ko=>{"use strict";Object.defineProperty(Ko,"__esModule",{value:!0});var wE=Ie(),$E=R(),_r=T(),EE={message:({schemaCode:r})=>(0,_r.str)`must match pattern "${r}"`,params:({schemaCode:r})=>(0,_r._)`{pattern: ${r}}`},SE={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:EE,code(r){let{gen:e,data:t,$data:s,schema:i,schemaCode:n,it:o}=r,a=o.opts.unicodeRegExp?"u":"";if(s){let{regExp:u}=o.opts.code,c=u.code==="new RegExp"?(0,_r._)`new RegExp`:(0,$E.useFunc)(e,u),l=e.let("valid");e.try(()=>e.assign(l,(0,_r._)`${c}(${n}, ${a}).test(${t})`),()=>e.assign(l,!1)),r.fail$data((0,_r._)`!${l}`)}else{let u=(0,wE.usePattern)(r,i);r.fail$data((0,_r._)`!${u}.test(${t})`)}}};Ko.default=SE});var pd=d(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});var fs=T(),OE={message({keyword:r,schemaCode:e}){let t=r==="maxProperties"?"more":"fewer";return(0,fs.str)`must NOT have ${t} than ${e} properties`},params:({schemaCode:r})=>(0,fs._)`{limit: ${r}}`},xE={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:OE,code(r){let{keyword:e,data:t,schemaCode:s}=r,i=e==="maxProperties"?fs.operators.GT:fs.operators.LT;r.fail$data((0,fs._)`Object.keys(${t}).length ${i} ${s}`)}};Wo.default=xE});var md=d(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});var ps=Ie(),ms=T(),TE=R(),PE={message:({params:{missingProperty:r}})=>(0,ms.str)`must have required property '${r}'`,params:({params:{missingProperty:r}})=>(0,ms._)`{missingProperty: ${r}}`},AE={keyword:"required",type:"object",schemaType:"array",$data:!0,error:PE,code(r){let{gen:e,schema:t,schemaCode:s,data:i,$data:n,it:o}=r,{opts:a}=o;if(!n&&t.length===0)return;let u=t.length>=a.loopRequired;if(o.allErrors?c():l(),a.strictRequired){let p=r.parentSchema.properties,{definedProperties:m}=r.it;for(let g of t)if(p?.[g]===void 0&&!m.has(g)){let y=o.schemaEnv.baseId+o.errSchemaPath,_=`required property "${g}" is not defined at "${y}" (strictRequired)`;(0,TE.checkStrictMode)(o,_,o.opts.strictRequired)}}function c(){if(u||n)r.block$data(ms.nil,h);else for(let p of t)(0,ps.checkReportMissingProp)(r,p)}function l(){let p=e.let("missing");if(u||n){let m=e.let("valid",!0);r.block$data(m,()=>f(p,m)),r.ok(m)}else e.if((0,ps.checkMissingProp)(r,t,p)),(0,ps.reportMissingProp)(r,p),e.else()}function h(){e.forOf("prop",s,p=>{r.setParams({missingProperty:p}),e.if((0,ps.noPropertyInData)(e,i,p,a.ownProperties),()=>r.error())})}function f(p,m){r.setParams({missingProperty:p}),e.forOf(p,s,()=>{e.assign(m,(0,ps.propertyInData)(e,i,p,a.ownProperties)),e.if((0,ms.not)(m),()=>{r.error(),e.break()})},ms.nil)}}};Yo.default=AE});var gd=d(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});var gs=T(),IE={message({keyword:r,schemaCode:e}){let t=r==="maxItems"?"more":"fewer";return(0,gs.str)`must NOT have ${t} than ${e} items`},params:({schemaCode:r})=>(0,gs._)`{limit: ${r}}`},CE={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:IE,code(r){let{keyword:e,data:t,schemaCode:s}=r,i=e==="maxItems"?gs.operators.GT:gs.operators.LT;r.fail$data((0,gs._)`${t}.length ${i} ${s}`)}};Xo.default=CE});var Oi=d(Jo=>{"use strict";Object.defineProperty(Jo,"__esModule",{value:!0});var yd=_o();yd.code='require("ajv/dist/runtime/equal").default';Jo.default=yd});var _d=d(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});var Zo=rs(),ae=T(),RE=R(),NE=Oi(),qE={message:({params:{i:r,j:e}})=>(0,ae.str)`must NOT have duplicate items (items ## ${e} and ${r} are identical)`,params:({params:{i:r,j:e}})=>(0,ae._)`{i: ${r}, j: ${e}}`},jE={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:qE,code(r){let{gen:e,data:t,$data:s,schema:i,parentSchema:n,schemaCode:o,it:a}=r;if(!s&&!i)return;let u=e.let("valid"),c=n.items?(0,Zo.getSchemaTypes)(n.items):[];r.block$data(u,l,(0,ae._)`${o} === false`),r.ok(u);function l(){let m=e.let("i",(0,ae._)`${t}.length`),g=e.let("j");r.setParams({i:m,j:g}),e.assign(u,!0),e.if((0,ae._)`${m} > 1`,()=>(h()?f:p)(m,g))}function h(){return c.length>0&&!c.some(m=>m==="object"||m==="array")}function f(m,g){let y=e.name("item"),_=(0,Zo.checkDataTypes)(c,y,a.opts.strictNumbers,Zo.DataType.Wrong),S=e.const("indices",(0,ae._)`{}`);e.for((0,ae._)`;${m}--;`,()=>{e.let(y,(0,ae._)`${t}[${m}]`),e.if(_,(0,ae._)`continue`),c.length>1&&e.if((0,ae._)`typeof ${y} == "string"`,(0,ae._)`${y} += "_"`),e.if((0,ae._)`typeof ${S}[${y}] == "number"`,()=>{e.assign(g,(0,ae._)`${S}[${y}]`),r.error(),e.assign(u,!1).break()}).code((0,ae._)`${S}[${y}] = ${m}`)})}function p(m,g){let y=(0,RE.useFunc)(e,NE.default),_=e.name("outer");e.label(_).for((0,ae._)`;${m}--;`,()=>e.for((0,ae._)`${g} = ${m}; ${g}--;`,()=>e.if((0,ae._)`${y}(${t}[${m}], ${t}[${g}])`,()=>{r.error(),e.assign(u,!1).break(_)})))}}};Qo.default=jE});var vd=d(ta=>{"use strict";Object.defineProperty(ta,"__esModule",{value:!0});var ea=T(),kE=R(),DE=Oi(),ME={message:"must be equal to constant",params:({schemaCode:r})=>(0,ea._)`{allowedValue: ${r}}`},LE={keyword:"const",$data:!0,error:ME,code(r){let{gen:e,data:t,$data:s,schemaCode:i,schema:n}=r;s||n&&typeof n=="object"?r.fail$data((0,ea._)`!${(0,kE.useFunc)(e,DE.default)}(${t}, ${i})`):r.fail((0,ea._)`${n} !== ${t}`)}};ta.default=LE});var bd=d(ra=>{"use strict";Object.defineProperty(ra,"__esModule",{value:!0});var ys=T(),VE=R(),FE=Oi(),UE={message:"must be equal to one of the allowed values",params:({schemaCode:r})=>(0,ys._)`{allowedValues: ${r}}`},HE={keyword:"enum",schemaType:"array",$data:!0,error:UE,code(r){let{gen:e,data:t,$data:s,schema:i,schemaCode:n,it:o}=r;if(!s&&i.length===0)throw new Error("enum must have non-empty array");let a=i.length>=o.opts.loopEnum,u,c=()=>u??(u=(0,VE.useFunc)(e,FE.default)),l;if(a||s)l=e.let("valid"),r.block$data(l,h);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let p=e.const("vSchema",n);l=(0,ys.or)(...i.map((m,g)=>f(p,g)))}r.pass(l);function h(){e.assign(l,!1),e.forOf("v",n,p=>e.if((0,ys._)`${c()}(${t}, ${p})`,()=>e.assign(l,!0).break()))}function f(p,m){let g=i[m];return typeof g=="object"&&g!==null?(0,ys._)`${c()}(${t}, ${p}[${m}])`:(0,ys._)`${t} === ${g}`}}};ra.default=HE});var ia=d(sa=>{"use strict";Object.defineProperty(sa,"__esModule",{value:!0});var GE=ud(),zE=cd(),BE=dd(),KE=fd(),WE=pd(),YE=md(),XE=gd(),JE=_d(),ZE=vd(),QE=bd(),eS=[GE.default,zE.default,BE.default,KE.default,WE.default,YE.default,XE.default,JE.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},ZE.default,QE.default];sa.default=eS});var oa=d(_s=>{"use strict";Object.defineProperty(_s,"__esModule",{value:!0});_s.validateAdditionalItems=void 0;var Zt=T(),na=R(),tS={message:({params:{len:r}})=>(0,Zt.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,Zt._)`{limit: ${r}}`},rS={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:tS,code(r){let{parentSchema:e,it:t}=r,{items:s}=e;if(!Array.isArray(s)){(0,na.checkStrictMode)(t,'"additionalItems" is ignored when "items" is not an array of schemas');return}wd(r,s)}};function wd(r,e){let{gen:t,schema:s,data:i,keyword:n,it:o}=r;o.items=!0;let a=t.const("len",(0,Zt._)`${i}.length`);if(s===!1)r.setParams({len:e.length}),r.pass((0,Zt._)`${a} <= ${e.length}`);else if(typeof s=="object"&&!(0,na.alwaysValidSchema)(o,s)){let c=t.var("valid",(0,Zt._)`${a} <= ${e.length}`);t.if((0,Zt.not)(c),()=>u(c)),r.ok(c)}function u(c){t.forRange("i",e.length,a,l=>{r.subschema({keyword:n,dataProp:l,dataPropType:na.Type.Num},c),o.allErrors||t.if((0,Zt.not)(c),()=>t.break())})}}_s.validateAdditionalItems=wd;_s.default=rS});var aa=d(vs=>{"use strict";Object.defineProperty(vs,"__esModule",{value:!0});vs.validateTuple=void 0;var $d=T(),xi=R(),sS=Ie(),iS={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(r){let{schema:e,it:t}=r;if(Array.isArray(e))return Ed(r,"additionalItems",e);t.items=!0,!(0,xi.alwaysValidSchema)(t,e)&&r.ok((0,sS.validateArray)(r))}};function Ed(r,e,t=r.schema){let{gen:s,parentSchema:i,data:n,keyword:o,it:a}=r;l(i),a.opts.unevaluated&&t.length&&a.items!==!0&&(a.items=xi.mergeEvaluated.items(s,t.length,a.items));let u=s.name("valid"),c=s.const("len",(0,$d._)`${n}.length`);t.forEach((h,f)=>{(0,xi.alwaysValidSchema)(a,h)||(s.if((0,$d._)`${c} > ${f}`,()=>r.subschema({keyword:o,schemaProp:f,dataProp:f},u)),r.ok(u))});function l(h){let{opts:f,errSchemaPath:p}=a,m=t.length,g=m===h.minItems&&(m===h.maxItems||h[e]===!1);if(f.strictTuples&&!g){let y=`"${o}" is ${m}-tuple, but minItems or maxItems/${e} are not specified or different at path "${p}"`;(0,xi.checkStrictMode)(a,y,f.strictTuples)}}}vs.validateTuple=Ed;vs.default=iS});var Sd=d(ua=>{"use strict";Object.defineProperty(ua,"__esModule",{value:!0});var nS=aa(),oS={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,nS.validateTuple)(r,"items")};ua.default=oS});var xd=d(ca=>{"use strict";Object.defineProperty(ca,"__esModule",{value:!0});var Od=T(),aS=R(),uS=Ie(),cS=oa(),lS={message:({params:{len:r}})=>(0,Od.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,Od._)`{limit: ${r}}`},hS={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:lS,code(r){let{schema:e,parentSchema:t,it:s}=r,{prefixItems:i}=t;s.items=!0,!(0,aS.alwaysValidSchema)(s,e)&&(i?(0,cS.validateAdditionalItems)(r,i):r.ok((0,uS.validateArray)(r)))}};ca.default=hS});var Td=d(la=>{"use strict";Object.defineProperty(la,"__esModule",{value:!0});var Re=T(),Ti=R(),dS={message:({params:{min:r,max:e}})=>e===void 0?(0,Re.str)`must contain at least ${r} valid item(s)`:(0,Re.str)`must contain at least ${r} and no more than ${e} valid item(s)`,params:({params:{min:r,max:e}})=>e===void 0?(0,Re._)`{minContains: ${r}}`:(0,Re._)`{minContains: ${r}, maxContains: ${e}}`},fS={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:dS,code(r){let{gen:e,schema:t,parentSchema:s,data:i,it:n}=r,o,a,{minContains:u,maxContains:c}=s;n.opts.next?(o=u===void 0?1:u,a=c):o=1;let l=e.const("len",(0,Re._)`${i}.length`);if(r.setParams({min:o,max:a}),a===void 0&&o===0){(0,Ti.checkStrictMode)(n,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&o>a){(0,Ti.checkStrictMode)(n,'"minContains" > "maxContains" is always invalid'),r.fail();return}if((0,Ti.alwaysValidSchema)(n,t)){let g=(0,Re._)`${l} >= ${o}`;a!==void 0&&(g=(0,Re._)`${g} && ${l} <= ${a}`),r.pass(g);return}n.items=!0;let h=e.name("valid");a===void 0&&o===1?p(h,()=>e.if(h,()=>e.break())):o===0?(e.let(h,!0),a!==void 0&&e.if((0,Re._)`${i}.length > 0`,f)):(e.let(h,!1),f()),r.result(h,()=>r.reset());function f(){let g=e.name("_valid"),y=e.let("count",0);p(g,()=>e.if(g,()=>m(y)))}function p(g,y){e.forRange("i",0,l,_=>{r.subschema({keyword:"contains",dataProp:_,dataPropType:Ti.Type.Num,compositeRule:!0},g),y()})}function m(g){e.code((0,Re._)`${g}++`),a===void 0?e.if((0,Re._)`${g} >= ${o}`,()=>e.assign(h,!0).break()):(e.if((0,Re._)`${g} > ${a}`,()=>e.assign(h,!1).break()),o===1?e.assign(h,!0):e.if((0,Re._)`${g} >= ${o}`,()=>e.assign(h,!0)))}}};la.default=fS});var Pi=d(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.validateSchemaDeps=Qe.validatePropertyDeps=Qe.error=void 0;var ha=T(),pS=R(),bs=Ie();Qe.error={message:({params:{property:r,depsCount:e,deps:t}})=>{let s=e===1?"property":"properties";return(0,ha.str)`must have ${s} ${t} when property ${r} is present`},params:({params:{property:r,depsCount:e,deps:t,missingProperty:s}})=>(0,ha._)`{property: ${r},
|
|
7
7
|
missingProperty: ${s},
|
|
8
8
|
depsCount: ${e},
|
|
9
|
-
deps: ${t}}`};var zE={keyword:"dependencies",type:"object",schemaType:"object",error:et.error,code(r){let[e,t]=BE(r);vd(r,e),bd(r,t)}};function BE({schema:r}){let e={},t={};for(let s in r){if(s==="__proto__")continue;let i=Array.isArray(r[s])?e:t;i[s]=r[s]}return[e,t]}function vd(r,e=r.schema){let{gen:t,data:s,it:i}=r;if(Object.keys(e).length===0)return;let n=t.let("missing");for(let o in e){let a=e[o];if(a.length===0)continue;let u=(0,ys.propertyInData)(t,s,o,i.opts.ownProperties);r.setParams({property:o,depsCount:a.length,deps:a.join(", ")}),i.allErrors?t.if(u,()=>{for(let l of a)(0,ys.checkReportMissingProp)(r,l)}):(t.if((0,aa._)`${u} && (${(0,ys.checkMissingProp)(r,a,n)})`),(0,ys.reportMissingProp)(r,n),t.else())}}et.validatePropertyDeps=vd;function bd(r,e=r.schema){let{gen:t,data:s,keyword:i,it:n}=r,o=t.name("valid");for(let a in e)(0,GE.alwaysValidSchema)(n,e[a])||(t.if((0,ys.propertyInData)(t,s,a,n.opts.ownProperties),()=>{let u=r.subschema({keyword:i,schemaProp:a},o);r.mergeValidEvaluated(u,o)},()=>t.var(o,!0)),r.ok(o))}et.validateSchemaDeps=bd;et.default=zE});var $d=d(ua=>{"use strict";Object.defineProperty(ua,"__esModule",{value:!0});var wd=T(),KE=R(),WE={message:"property name must be valid",params:({params:r})=>(0,wd._)`{propertyName: ${r.propertyName}}`},YE={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:WE,code(r){let{gen:e,schema:t,data:s,it:i}=r;if((0,KE.alwaysValidSchema)(i,t))return;let n=e.name("valid");e.forIn("key",s,o=>{r.setParams({propertyName:o}),r.subschema({keyword:"propertyNames",data:o,dataTypes:["string"],propertyName:o,compositeRule:!0},n),e.if((0,wd.not)(n),()=>{r.error(!0),i.allErrors||e.break()})}),r.ok(n)}};ua.default=YE});var ca=d(la=>{"use strict";Object.defineProperty(la,"__esModule",{value:!0});var xi=Ae(),He=T(),XE=Ie(),Ti=R(),JE={message:"must NOT have additional properties",params:({params:r})=>(0,He._)`{additionalProperty: ${r.additionalProperty}}`},ZE={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:JE,code(r){let{gen:e,schema:t,parentSchema:s,data:i,errsCount:n,it:o}=r;if(!n)throw new Error("ajv implementation error");let{allErrors:a,opts:u}=o;if(o.props=!0,u.removeAdditional!=="all"&&(0,Ti.alwaysValidSchema)(o,t))return;let l=(0,xi.allSchemaProperties)(s.properties),c=(0,xi.allSchemaProperties)(s.patternProperties);h(),r.ok((0,He._)`${n} === ${XE.default.errors}`);function h(){e.forIn("key",i,y=>{!l.length&&!c.length?m(y):e.if(f(y),()=>m(y))})}function f(y){let _;if(l.length>8){let S=(0,Ti.schemaRefOrVal)(o,s.properties,"properties");_=(0,xi.isOwnProperty)(e,S,y)}else l.length?_=(0,He.or)(...l.map(S=>(0,He._)`${y} === ${S}`)):_=He.nil;return c.length&&(_=(0,He.or)(_,...c.map(S=>(0,He._)`${(0,xi.usePattern)(r,S)}.test(${y})`))),(0,He.not)(_)}function p(y){e.code((0,He._)`delete ${i}[${y}]`)}function m(y){if(u.removeAdditional==="all"||u.removeAdditional&&t===!1){p(y);return}if(t===!1){r.setParams({additionalProperty:y}),r.error(),a||e.break();return}if(typeof t=="object"&&!(0,Ti.alwaysValidSchema)(o,t)){let _=e.name("valid");u.removeAdditional==="failing"?(g(y,_,!1),e.if((0,He.not)(_),()=>{r.reset(),p(y)})):(g(y,_),a||e.if((0,He.not)(_),()=>e.break()))}}function g(y,_,S){let O={keyword:"additionalProperties",dataProp:y,dataPropType:Ti.Type.Str};S===!1&&Object.assign(O,{compositeRule:!0,createErrors:!1,allErrors:!1}),r.subschema(O,_)}}};la.default=ZE});var Od=d(da=>{"use strict";Object.defineProperty(da,"__esModule",{value:!0});var QE=hr(),Ed=Ae(),ha=R(),Sd=ca(),eS={keyword:"properties",type:"object",schemaType:"object",code(r){let{gen:e,schema:t,parentSchema:s,data:i,it:n}=r;n.opts.removeAdditional==="all"&&s.additionalProperties===void 0&&Sd.default.code(new QE.KeywordCxt(n,Sd.default,"additionalProperties"));let o=(0,Ed.allSchemaProperties)(t);for(let h of o)n.definedProperties.add(h);n.opts.unevaluated&&o.length&&n.props!==!0&&(n.props=ha.mergeEvaluated.props(e,(0,ha.toHash)(o),n.props));let a=o.filter(h=>!(0,ha.alwaysValidSchema)(n,t[h]));if(a.length===0)return;let u=e.name("valid");for(let h of a)l(h)?c(h):(e.if((0,Ed.propertyInData)(e,i,h,n.opts.ownProperties)),c(h),n.allErrors||e.else().var(u,!0),e.endIf()),r.it.definedProperties.add(h),r.ok(u);function l(h){return n.opts.useDefaults&&!n.compositeRule&&t[h].default!==void 0}function c(h){r.subschema({keyword:"properties",schemaProp:h,dataProp:h},u)}}};da.default=eS});var Id=d(fa=>{"use strict";Object.defineProperty(fa,"__esModule",{value:!0});var xd=Ae(),Pi=T(),Td=R(),Pd=R(),tS={keyword:"patternProperties",type:"object",schemaType:"object",code(r){let{gen:e,schema:t,data:s,parentSchema:i,it:n}=r,{opts:o}=n,a=(0,xd.allSchemaProperties)(t),u=a.filter(g=>(0,Td.alwaysValidSchema)(n,t[g]));if(a.length===0||u.length===a.length&&(!n.opts.unevaluated||n.props===!0))return;let l=o.strictSchema&&!o.allowMatchingProperties&&i.properties,c=e.name("valid");n.props!==!0&&!(n.props instanceof Pi.Name)&&(n.props=(0,Pd.evaluatedPropsToName)(e,n.props));let{props:h}=n;f();function f(){for(let g of a)l&&p(g),n.allErrors?m(g):(e.var(c,!0),m(g),e.if(c))}function p(g){for(let y in l)new RegExp(g).test(y)&&(0,Td.checkStrictMode)(n,`property ${y} matches pattern ${g} (use allowMatchingProperties)`)}function m(g){e.forIn("key",s,y=>{e.if((0,Pi._)`${(0,xd.usePattern)(r,g)}.test(${y})`,()=>{let _=u.includes(g);_||r.subschema({keyword:"patternProperties",schemaProp:g,dataProp:y,dataPropType:Pd.Type.Str},c),n.opts.unevaluated&&h!==!0?e.assign((0,Pi._)`${h}[${y}]`,!0):!_&&!n.allErrors&&e.if((0,Pi.not)(c),()=>e.break())})})}}};fa.default=tS});var Ad=d(pa=>{"use strict";Object.defineProperty(pa,"__esModule",{value:!0});var rS=R(),sS={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){let{gen:e,schema:t,it:s}=r;if((0,rS.alwaysValidSchema)(s,t)){r.fail();return}let i=e.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),r.failResult(i,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};pa.default=sS});var Cd=d(ma=>{"use strict";Object.defineProperty(ma,"__esModule",{value:!0});var iS=Ae(),nS={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:iS.validateUnion,error:{message:"must match a schema in anyOf"}};ma.default=nS});var Rd=d(ga=>{"use strict";Object.defineProperty(ga,"__esModule",{value:!0});var Ii=T(),oS=R(),aS={message:"must match exactly one schema in oneOf",params:({params:r})=>(0,Ii._)`{passingSchemas: ${r.passing}}`},uS={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:aS,code(r){let{gen:e,schema:t,parentSchema:s,it:i}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");if(i.opts.discriminator&&s.discriminator)return;let n=t,o=e.let("valid",!1),a=e.let("passing",null),u=e.name("_valid");r.setParams({passing:a}),e.block(l),r.result(o,()=>r.reset(),()=>r.error(!0));function l(){n.forEach((c,h)=>{let f;(0,oS.alwaysValidSchema)(i,c)?e.var(u,!0):f=r.subschema({keyword:"oneOf",schemaProp:h,compositeRule:!0},u),h>0&&e.if((0,Ii._)`${u} && ${o}`).assign(o,!1).assign(a,(0,Ii._)`[${a}, ${h}]`).else(),e.if(u,()=>{e.assign(o,!0),e.assign(a,h),f&&r.mergeEvaluated(f,Ii.Name)})})}}};ga.default=uS});var Nd=d(ya=>{"use strict";Object.defineProperty(ya,"__esModule",{value:!0});var lS=R(),cS={keyword:"allOf",schemaType:"array",code(r){let{gen:e,schema:t,it:s}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");let i=e.name("valid");t.forEach((n,o)=>{if((0,lS.alwaysValidSchema)(s,n))return;let a=r.subschema({keyword:"allOf",schemaProp:o},i);r.ok(i),r.mergeEvaluated(a)})}};ya.default=cS});var jd=d(_a=>{"use strict";Object.defineProperty(_a,"__esModule",{value:!0});var Ai=T(),kd=R(),hS={message:({params:r})=>(0,Ai.str)`must match "${r.ifClause}" schema`,params:({params:r})=>(0,Ai._)`{failingKeyword: ${r.ifClause}}`},dS={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:hS,code(r){let{gen:e,parentSchema:t,it:s}=r;t.then===void 0&&t.else===void 0&&(0,kd.checkStrictMode)(s,'"if" without "then" and "else" is ignored');let i=qd(s,"then"),n=qd(s,"else");if(!i&&!n)return;let o=e.let("valid",!0),a=e.name("_valid");if(u(),r.reset(),i&&n){let c=e.let("ifClause");r.setParams({ifClause:c}),e.if(a,l("then",c),l("else",c))}else i?e.if(a,l("then")):e.if((0,Ai.not)(a),l("else"));r.pass(o,()=>r.error(!0));function u(){let c=r.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);r.mergeEvaluated(c)}function l(c,h){return()=>{let f=r.subschema({keyword:c},a);e.assign(o,a),r.mergeValidEvaluated(f,o),h?e.assign(h,(0,Ai._)`${c}`):r.setParams({ifClause:c})}}}};function qd(r,e){let t=r.schema[e];return t!==void 0&&!(0,kd.alwaysValidSchema)(r,t)}_a.default=dS});var Dd=d(va=>{"use strict";Object.defineProperty(va,"__esModule",{value:!0});var fS=R(),pS={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:e,it:t}){e.if===void 0&&(0,fS.checkStrictMode)(t,`"${r}" without "if" is ignored`)}};va.default=pS});var wa=d(ba=>{"use strict";Object.defineProperty(ba,"__esModule",{value:!0});var mS=ra(),gS=md(),yS=sa(),_S=yd(),vS=_d(),bS=Oi(),wS=$d(),$S=ca(),ES=Od(),SS=Id(),OS=Ad(),xS=Cd(),TS=Rd(),PS=Nd(),IS=jd(),AS=Dd();function CS(r=!1){let e=[OS.default,xS.default,TS.default,PS.default,IS.default,AS.default,wS.default,$S.default,bS.default,ES.default,SS.default];return r?e.push(gS.default,_S.default):e.push(mS.default,yS.default),e.push(vS.default),e}ba.default=CS});var Ea=d(_s=>{"use strict";Object.defineProperty(_s,"__esModule",{value:!0});_s.dynamicAnchor=void 0;var $a=T(),RS=Ie(),Md=is(),NS=vi(),qS={keyword:"$dynamicAnchor",schemaType:"string",code:r=>Ld(r,r.schema)};function Ld(r,e){let{gen:t,it:s}=r;s.schemaEnv.root.dynamicAnchors[e]=!0;let i=(0,$a._)`${RS.default.dynamicAnchors}${(0,$a.getProperty)(e)}`,n=s.errSchemaPath==="#"?s.validateName:kS(r);t.if((0,$a._)`!${i}`,()=>t.assign(i,n))}_s.dynamicAnchor=Ld;function kS(r){let{schemaEnv:e,schema:t,self:s}=r.it,{root:i,baseId:n,localRefs:o,meta:a}=e.root,{schemaId:u}=s.opts,l=new Md.SchemaEnv({schema:t,schemaId:u,root:i,baseId:n,localRefs:o,meta:a});return Md.compileSchema.call(s,l),(0,NS.getValidate)(r,l)}_s.default=qS});var Sa=d(vs=>{"use strict";Object.defineProperty(vs,"__esModule",{value:!0});vs.dynamicRef=void 0;var Vd=T(),jS=Ie(),Fd=vi(),DS={keyword:"$dynamicRef",schemaType:"string",code:r=>Ud(r,r.schema)};function Ud(r,e){let{gen:t,keyword:s,it:i}=r;if(e[0]!=="#")throw new Error(`"${s}" only supports hash fragment reference`);let n=e.slice(1);if(i.allErrors)o();else{let u=t.let("valid",!1);o(u),r.ok(u)}function o(u){if(i.schemaEnv.root.dynamicAnchors[n]){let l=t.let("_v",(0,Vd._)`${jS.default.dynamicAnchors}${(0,Vd.getProperty)(n)}`);t.if(l,a(l,u),a(i.validateName,u))}else a(i.validateName,u)()}function a(u,l){return l?()=>t.block(()=>{(0,Fd.callRef)(r,u),t.let(l,!0)}):()=>(0,Fd.callRef)(r,u)}}vs.dynamicRef=Ud;vs.default=DS});var Hd=d(Oa=>{"use strict";Object.defineProperty(Oa,"__esModule",{value:!0});var MS=Ea(),LS=R(),VS={keyword:"$recursiveAnchor",schemaType:"boolean",code(r){r.schema?(0,MS.dynamicAnchor)(r,""):(0,LS.checkStrictMode)(r.it,"$recursiveAnchor: false is ignored")}};Oa.default=VS});var Gd=d(xa=>{"use strict";Object.defineProperty(xa,"__esModule",{value:!0});var FS=Sa(),US={keyword:"$recursiveRef",schemaType:"string",code:r=>(0,FS.dynamicRef)(r,r.schema)};xa.default=US});var zd=d(Ta=>{"use strict";Object.defineProperty(Ta,"__esModule",{value:!0});var HS=Ea(),GS=Sa(),zS=Hd(),BS=Gd(),KS=[HS.default,GS.default,zS.default,BS.default];Ta.default=KS});var Kd=d(Pa=>{"use strict";Object.defineProperty(Pa,"__esModule",{value:!0});var Bd=Oi(),WS={keyword:"dependentRequired",type:"object",schemaType:"object",error:Bd.error,code:r=>(0,Bd.validatePropertyDeps)(r)};Pa.default=WS});var Wd=d(Ia=>{"use strict";Object.defineProperty(Ia,"__esModule",{value:!0});var YS=Oi(),XS={keyword:"dependentSchemas",type:"object",schemaType:"object",code:r=>(0,YS.validateSchemaDeps)(r)};Ia.default=XS});var Yd=d(Aa=>{"use strict";Object.defineProperty(Aa,"__esModule",{value:!0});var JS=R(),ZS={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:r,parentSchema:e,it:t}){e.contains===void 0&&(0,JS.checkStrictMode)(t,`"${r}" without "contains" is ignored`)}};Aa.default=ZS});var Xd=d(Ca=>{"use strict";Object.defineProperty(Ca,"__esModule",{value:!0});var QS=Kd(),eO=Wd(),tO=Yd(),rO=[QS.default,eO.default,tO.default];Ca.default=rO});var Zd=d(Ra=>{"use strict";Object.defineProperty(Ra,"__esModule",{value:!0});var Rt=T(),Jd=R(),sO=Ie(),iO={message:"must NOT have unevaluated properties",params:({params:r})=>(0,Rt._)`{unevaluatedProperty: ${r.unevaluatedProperty}}`},nO={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:iO,code(r){let{gen:e,schema:t,data:s,errsCount:i,it:n}=r;if(!i)throw new Error("ajv implementation error");let{allErrors:o,props:a}=n;a instanceof Rt.Name?e.if((0,Rt._)`${a} !== true`,()=>e.forIn("key",s,h=>e.if(l(a,h),()=>u(h)))):a!==!0&&e.forIn("key",s,h=>a===void 0?u(h):e.if(c(a,h),()=>u(h))),n.props=!0,r.ok((0,Rt._)`${i} === ${sO.default.errors}`);function u(h){if(t===!1){r.setParams({unevaluatedProperty:h}),r.error(),o||e.break();return}if(!(0,Jd.alwaysValidSchema)(n,t)){let f=e.name("valid");r.subschema({keyword:"unevaluatedProperties",dataProp:h,dataPropType:Jd.Type.Str},f),o||e.if((0,Rt.not)(f),()=>e.break())}}function l(h,f){return(0,Rt._)`!${h} || !${h}[${f}]`}function c(h,f){let p=[];for(let m in h)h[m]===!0&&p.push((0,Rt._)`${f} !== ${m}`);return(0,Rt.and)(...p)}}};Ra.default=nO});var ef=d(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});var Jt=T(),Qd=R(),oO={message:({params:{len:r}})=>(0,Jt.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,Jt._)`{limit: ${r}}`},aO={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:oO,code(r){let{gen:e,schema:t,data:s,it:i}=r,n=i.items||0;if(n===!0)return;let o=e.const("len",(0,Jt._)`${s}.length`);if(t===!1)r.setParams({len:n}),r.fail((0,Jt._)`${o} > ${n}`);else if(typeof t=="object"&&!(0,Qd.alwaysValidSchema)(i,t)){let u=e.var("valid",(0,Jt._)`${o} <= ${n}`);e.if((0,Jt.not)(u),()=>a(u,n)),r.ok(u)}i.items=!0;function a(u,l){e.forRange("i",l,o,c=>{r.subschema({keyword:"unevaluatedItems",dataProp:c,dataPropType:Qd.Type.Num},u),i.allErrors||e.if((0,Jt.not)(u),()=>e.break())})}}};Na.default=aO});var tf=d(qa=>{"use strict";Object.defineProperty(qa,"__esModule",{value:!0});var uO=Zd(),lO=ef(),cO=[uO.default,lO.default];qa.default=cO});var rf=d(ka=>{"use strict";Object.defineProperty(ka,"__esModule",{value:!0});var re=T(),hO={message:({schemaCode:r})=>(0,re.str)`must match format "${r}"`,params:({schemaCode:r})=>(0,re._)`{format: ${r}}`},dO={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:hO,code(r,e){let{gen:t,data:s,$data:i,schema:n,schemaCode:o,it:a}=r,{opts:u,errSchemaPath:l,schemaEnv:c,self:h}=a;if(!u.validateFormats)return;i?f():p();function f(){let m=t.scopeValue("formats",{ref:h.formats,code:u.code.formats}),g=t.const("fDef",(0,re._)`${m}[${o}]`),y=t.let("fType"),_=t.let("format");t.if((0,re._)`typeof ${g} == "object" && !(${g} instanceof RegExp)`,()=>t.assign(y,(0,re._)`${g}.type || "string"`).assign(_,(0,re._)`${g}.validate`),()=>t.assign(y,(0,re._)`"string"`).assign(_,g)),r.fail$data((0,re.or)(S(),O()));function S(){return u.strictSchema===!1?re.nil:(0,re._)`${o} && !${_}`}function O(){let E=c.$async?(0,re._)`(${g}.async ? await ${_}(${s}) : ${_}(${s}))`:(0,re._)`${_}(${s})`,$=(0,re._)`(typeof ${_} == "function" ? ${E} : ${_}.test(${s}))`;return(0,re._)`${_} && ${_} !== true && ${y} === ${e} && !${$}`}}function p(){let m=h.formats[n];if(!m){S();return}if(m===!0)return;let[g,y,_]=O(m);g===e&&r.pass(E());function S(){if(u.strictSchema===!1){h.logger.warn($());return}throw new Error($());function $(){return`unknown format "${n}" ignored in schema at path "${l}"`}}function O($){let le=$ instanceof RegExp?(0,re.regexpCode)($):u.code.formats?(0,re._)`${u.code.formats}${(0,re.getProperty)(n)}`:void 0,U=t.scopeValue("formats",{key:n,ref:$,code:le});return typeof $=="object"&&!($ instanceof RegExp)?[$.type||"string",$.validate,(0,re._)`${U}.validate`]:["string",$,U]}function E(){if(typeof m=="object"&&!(m instanceof RegExp)&&m.async){if(!c.$async)throw new Error("async format in sync schema");return(0,re._)`await ${_}(${s})`}return typeof y=="function"?(0,re._)`${_}(${s})`:(0,re._)`${_}.test(${s})`}}}};ka.default=dO});var Da=d(ja=>{"use strict";Object.defineProperty(ja,"__esModule",{value:!0});var fO=rf(),pO=[fO.default];ja.default=pO});var Ma=d(yr=>{"use strict";Object.defineProperty(yr,"__esModule",{value:!0});yr.contentVocabulary=yr.metadataVocabulary=void 0;yr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];yr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var nf=d(La=>{"use strict";Object.defineProperty(La,"__esModule",{value:!0});var mO=Mo(),gO=ea(),yO=wa(),_O=zd(),vO=Xd(),bO=tf(),wO=Da(),sf=Ma(),$O=[_O.default,mO.default,gO.default,(0,yO.default)(!0),wO.default,sf.metadataVocabulary,sf.contentVocabulary,vO.default,bO.default];La.default=$O});var af=d(Ci=>{"use strict";Object.defineProperty(Ci,"__esModule",{value:!0});Ci.DiscrError=void 0;var of;(function(r){r.Tag="tag",r.Mapping="mapping"})(of||(Ci.DiscrError=of={}))});var Ua=d(Fa=>{"use strict";Object.defineProperty(Fa,"__esModule",{value:!0});var _r=T(),Va=af(),uf=is(),EO=dr(),SO=R(),OO={message:({params:{discrError:r,tagName:e}})=>r===Va.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:r,tag:e,tagName:t}})=>(0,_r._)`{error: ${r}, tag: ${t}, tagValue: ${e}}`},xO={keyword:"discriminator",type:"object",schemaType:"object",error:OO,code(r){let{gen:e,data:t,schema:s,parentSchema:i,it:n}=r,{oneOf:o}=i;if(!n.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=s.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(s.mapping)throw new Error("discriminator: mapping is not supported");if(!o)throw new Error("discriminator: requires oneOf keyword");let u=e.let("valid",!1),l=e.const("tag",(0,_r._)`${t}${(0,_r.getProperty)(a)}`);e.if((0,_r._)`typeof ${l} == "string"`,()=>c(),()=>r.error(!1,{discrError:Va.DiscrError.Tag,tag:l,tagName:a})),r.ok(u);function c(){let p=f();e.if(!1);for(let m in p)e.elseIf((0,_r._)`${l} === ${m}`),e.assign(u,h(p[m]));e.else(),r.error(!1,{discrError:Va.DiscrError.Mapping,tag:l,tagName:a}),e.endIf()}function h(p){let m=e.name("valid"),g=r.subschema({keyword:"oneOf",schemaProp:p},m);return r.mergeEvaluated(g,_r.Name),m}function f(){var p;let m={},g=_(i),y=!0;for(let E=0;E<o.length;E++){let $=o[E];if($?.$ref&&!(0,SO.schemaHasRulesButRef)($,n.self.RULES)){let U=$.$ref;if($=uf.resolveRef.call(n.self,n.schemaEnv.root,n.baseId,U),$ instanceof uf.SchemaEnv&&($=$.schema),$===void 0)throw new EO.default(n.opts.uriResolver,n.baseId,U)}let le=(p=$?.properties)===null||p===void 0?void 0:p[a];if(typeof le!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);y=y&&(g||_($)),S(le,E)}if(!y)throw new Error(`discriminator: "${a}" must be required`);return m;function _({required:E}){return Array.isArray(E)&&E.includes(a)}function S(E,$){if(E.const)O(E.const,$);else if(E.enum)for(let le of E.enum)O(le,$);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function O(E,$){if(typeof E!="string"||E in m)throw new Error(`discriminator: "${a}" values must be unique strings`);m[E]=$}}}};Fa.default=xO});var lf=d((Zq,TO)=>{TO.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}}});var cf=d((Qq,PO)=>{PO.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}}});var hf=d((ek,IO)=>{IO.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}}});var df=d((tk,AO)=>{AO.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}}});var ff=d((rk,CO)=>{CO.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}}});var pf=d((sk,RO)=>{RO.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}}});var mf=d((ik,NO)=>{NO.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}});var gf=d((nk,qO)=>{qO.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}});var yf=d(Ha=>{"use strict";Object.defineProperty(Ha,"__esModule",{value:!0});var kO=lf(),jO=cf(),DO=hf(),MO=df(),LO=ff(),VO=pf(),FO=mf(),UO=gf(),HO=["/properties"];function GO(r){return[kO,jO,DO,MO,LO,e(this,VO),FO,e(this,UO)].forEach(t=>this.addMetaSchema(t,void 0,!1)),this;function e(t,s){return r?t.$dataMetaSchema(s,HO):s}}Ha.default=GO});var _f=d((B,za)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});B.MissingRefError=B.ValidationError=B.CodeGen=B.Name=B.nil=B.stringify=B.str=B._=B.KeywordCxt=B.Ajv2020=void 0;var zO=ko(),BO=nf(),KO=Ua(),WO=yf(),Ga="https://json-schema.org/draft/2020-12/schema",vr=class extends zO.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),BO.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(KO.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:t}=this.opts;t&&(WO.default.call(this,e),this.refs["http://json-schema.org/schema"]=Ga)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Ga)?Ga:void 0)}};B.Ajv2020=vr;za.exports=B=vr;za.exports.Ajv2020=vr;Object.defineProperty(B,"__esModule",{value:!0});B.default=vr;var YO=hr();Object.defineProperty(B,"KeywordCxt",{enumerable:!0,get:function(){return YO.KeywordCxt}});var br=T();Object.defineProperty(B,"_",{enumerable:!0,get:function(){return br._}});Object.defineProperty(B,"str",{enumerable:!0,get:function(){return br.str}});Object.defineProperty(B,"stringify",{enumerable:!0,get:function(){return br.stringify}});Object.defineProperty(B,"nil",{enumerable:!0,get:function(){return br.nil}});Object.defineProperty(B,"Name",{enumerable:!0,get:function(){return br.Name}});Object.defineProperty(B,"CodeGen",{enumerable:!0,get:function(){return br.CodeGen}});var XO=ss();Object.defineProperty(B,"ValidationError",{enumerable:!0,get:function(){return XO.default}});var JO=dr();Object.defineProperty(B,"MissingRefError",{enumerable:!0,get:function(){return JO.default}})});var xf=d(rt=>{"use strict";Object.defineProperty(rt,"__esModule",{value:!0});rt.formatNames=rt.fastFormats=rt.fullFormats=void 0;function tt(r,e){return{validate:r,compare:e}}rt.fullFormats={date:tt($f,Ya),time:tt(Ka(!0),Xa),"date-time":tt(vf(!0),Sf),"iso-time":tt(Ka(),Ef),"iso-date-time":tt(vf(),Of),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:s1,"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:c1,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:i1,int32:{type:"number",validate:a1},int64:{type:"number",validate:u1},float:{type:"number",validate:wf},double:{type:"number",validate:wf},password:!0,binary:!0};rt.fastFormats={...rt.fullFormats,date:tt(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Ya),time:tt(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Xa),"date-time":tt(/^\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,Sf),"iso-time":tt(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Ef),"iso-date-time":tt(/^\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,Of),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};rt.formatNames=Object.keys(rt.fullFormats);function ZO(r){return r%4===0&&(r%100!==0||r%400===0)}var QO=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,e1=[0,31,28,31,30,31,30,31,31,30,31,30,31];function $f(r){let e=QO.exec(r);if(!e)return!1;let t=+e[1],s=+e[2],i=+e[3];return s>=1&&s<=12&&i>=1&&i<=(s===2&&ZO(t)?29:e1[s])}function Ya(r,e){if(r&&e)return r>e?1:r<e?-1:0}var Ba=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Ka(r){return function(t){let s=Ba.exec(t);if(!s)return!1;let i=+s[1],n=+s[2],o=+s[3],a=s[4],u=s[5]==="-"?-1:1,l=+(s[6]||0),c=+(s[7]||0);if(l>23||c>59||r&&!a)return!1;if(i<=23&&n<=59&&o<60)return!0;let h=n-c*u,f=i-l*u-(h<0?1:0);return(f===23||f===-1)&&(h===59||h===-1)&&o<61}}function Xa(r,e){if(!(r&&e))return;let t=new Date("2020-01-01T"+r).valueOf(),s=new Date("2020-01-01T"+e).valueOf();if(t&&s)return t-s}function Ef(r,e){if(!(r&&e))return;let t=Ba.exec(r),s=Ba.exec(e);if(t&&s)return r=t[1]+t[2]+t[3],e=s[1]+s[2]+s[3],r>e?1:r<e?-1:0}var Wa=/t|\s/i;function vf(r){let e=Ka(r);return function(s){let i=s.split(Wa);return i.length===2&&$f(i[0])&&e(i[1])}}function Sf(r,e){if(!(r&&e))return;let t=new Date(r).valueOf(),s=new Date(e).valueOf();if(t&&s)return t-s}function Of(r,e){if(!(r&&e))return;let[t,s]=r.split(Wa),[i,n]=e.split(Wa),o=Ya(t,i);if(o!==void 0)return o||Xa(s,n)}var t1=/\/|:/,r1=/^(?:[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 s1(r){return t1.test(r)&&r1.test(r)}var bf=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function i1(r){return bf.lastIndex=0,bf.test(r)}var n1=-(2**31),o1=2**31-1;function a1(r){return Number.isInteger(r)&&r<=o1&&r>=n1}function u1(r){return Number.isInteger(r)}function wf(){return!0}var l1=/[^\\]\\Z/;function c1(r){if(l1.test(r))return!1;try{return new RegExp(r),!0}catch{return!1}}});var Pf=d(Ja=>{"use strict";Object.defineProperty(Ja,"__esModule",{value:!0});var h1=Mo(),d1=ea(),f1=wa(),p1=Da(),Tf=Ma(),m1=[h1.default,d1.default,(0,f1.default)(),p1.default,Tf.metadataVocabulary,Tf.contentVocabulary];Ja.default=m1});var If=d((lk,g1)=>{g1.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var Cf=d((K,Za)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0});K.MissingRefError=K.ValidationError=K.CodeGen=K.Name=K.nil=K.stringify=K.str=K._=K.KeywordCxt=K.Ajv=void 0;var y1=ko(),_1=Pf(),v1=Ua(),Af=If(),b1=["/properties"],Ri="http://json-schema.org/draft-07/schema",wr=class extends y1.default{_addVocabularies(){super._addVocabularies(),_1.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(v1.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(Af,b1):Af;this.addMetaSchema(e,Ri,!1),this.refs["http://json-schema.org/schema"]=Ri}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Ri)?Ri:void 0)}};K.Ajv=wr;Za.exports=K=wr;Za.exports.Ajv=wr;Object.defineProperty(K,"__esModule",{value:!0});K.default=wr;var w1=hr();Object.defineProperty(K,"KeywordCxt",{enumerable:!0,get:function(){return w1.KeywordCxt}});var $r=T();Object.defineProperty(K,"_",{enumerable:!0,get:function(){return $r._}});Object.defineProperty(K,"str",{enumerable:!0,get:function(){return $r.str}});Object.defineProperty(K,"stringify",{enumerable:!0,get:function(){return $r.stringify}});Object.defineProperty(K,"nil",{enumerable:!0,get:function(){return $r.nil}});Object.defineProperty(K,"Name",{enumerable:!0,get:function(){return $r.Name}});Object.defineProperty(K,"CodeGen",{enumerable:!0,get:function(){return $r.CodeGen}});var $1=ss();Object.defineProperty(K,"ValidationError",{enumerable:!0,get:function(){return $1.default}});var E1=dr();Object.defineProperty(K,"MissingRefError",{enumerable:!0,get:function(){return E1.default}})});var Rf=d(Er=>{"use strict";Object.defineProperty(Er,"__esModule",{value:!0});Er.formatLimitDefinition=void 0;var S1=Cf(),Ge=T(),Nt=Ge.operators,Ni={formatMaximum:{okStr:"<=",ok:Nt.LTE,fail:Nt.GT},formatMinimum:{okStr:">=",ok:Nt.GTE,fail:Nt.LT},formatExclusiveMaximum:{okStr:"<",ok:Nt.LT,fail:Nt.GTE},formatExclusiveMinimum:{okStr:">",ok:Nt.GT,fail:Nt.LTE}},O1={message:({keyword:r,schemaCode:e})=>(0,Ge.str)`should be ${Ni[r].okStr} ${e}`,params:({keyword:r,schemaCode:e})=>(0,Ge._)`{comparison: ${Ni[r].okStr}, limit: ${e}}`};Er.formatLimitDefinition={keyword:Object.keys(Ni),type:"string",schemaType:"string",$data:!0,error:O1,code(r){let{gen:e,data:t,schemaCode:s,keyword:i,it:n}=r,{opts:o,self:a}=n;if(!o.validateFormats)return;let u=new S1.KeywordCxt(n,a.RULES.all.format.definition,"format");u.$data?l():c();function l(){let f=e.scopeValue("formats",{ref:a.formats,code:o.code.formats}),p=e.const("fmt",(0,Ge._)`${f}[${u.schemaCode}]`);r.fail$data((0,Ge.or)((0,Ge._)`typeof ${p} != "object"`,(0,Ge._)`${p} instanceof RegExp`,(0,Ge._)`typeof ${p}.compare != "function"`,h(p)))}function c(){let f=u.schema,p=a.formats[f];if(!p||p===!0)return;if(typeof p!="object"||p instanceof RegExp||typeof p.compare!="function")throw new Error(`"${i}": format "${f}" does not define "compare" function`);let m=e.scopeValue("formats",{key:f,ref:p,code:o.code.formats?(0,Ge._)`${o.code.formats}${(0,Ge.getProperty)(f)}`:void 0});r.fail$data(h(m))}function h(f){return(0,Ge._)`${f}.compare(${t}, ${s}) ${Ni[i].fail} 0`}},dependencies:["format"]};var x1=r=>(r.addKeyword(Er.formatLimitDefinition),r);Er.default=x1});var jf=d((bs,kf)=>{"use strict";Object.defineProperty(bs,"__esModule",{value:!0});var Sr=xf(),T1=Rf(),Qa=T(),Nf=new Qa.Name("fullFormats"),P1=new Qa.Name("fastFormats"),eu=(r,e={keywords:!0})=>{if(Array.isArray(e))return qf(r,e,Sr.fullFormats,Nf),r;let[t,s]=e.mode==="fast"?[Sr.fastFormats,P1]:[Sr.fullFormats,Nf],i=e.formats||Sr.formatNames;return qf(r,i,t,s),e.keywords&&(0,T1.default)(r),r};eu.get=(r,e="full")=>{let s=(e==="fast"?Sr.fastFormats:Sr.fullFormats)[r];if(!s)throw new Error(`Unknown format "${r}"`);return s};function qf(r,e,t,s){var i,n;(i=(n=r.opts.code).formats)!==null&&i!==void 0||(n.formats=(0,Qa._)`require("ajv-formats/dist/formats").${s}`);for(let o of e)r.addFormat(o,t[o])}kf.exports=bs=eu;Object.defineProperty(bs,"__esModule",{value:!0});bs.default=eu});var ws=d((pk,Df)=>{"use strict";var D1="2.0.0",M1=Number.MAX_SAFE_INTEGER||9007199254740991,L1=16,V1=250,F1=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Df.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:L1,MAX_SAFE_BUILD_LENGTH:V1,MAX_SAFE_INTEGER:M1,RELEASE_TYPES:F1,SEMVER_SPEC_VERSION:D1,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var $s=d((mk,Mf)=>{"use strict";var U1=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};Mf.exports=U1});var Or=d((st,Lf)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:su,MAX_SAFE_BUILD_LENGTH:H1,MAX_LENGTH:G1}=ws(),z1=$s();st=Lf.exports={};var B1=st.re=[],K1=st.safeRe=[],v=st.src=[],W1=st.safeSrc=[],b=st.t={},Y1=0,iu="[a-zA-Z0-9-]",X1=[["\\s",1],["\\d",G1],[iu,H1]],J1=r=>{for(let[e,t]of X1)r=r.split(`${e}*`).join(`${e}{0,${t}}`).split(`${e}+`).join(`${e}{1,${t}}`);return r},P=(r,e,t)=>{let s=J1(e),i=Y1++;z1(r,i,e),b[r]=i,v[i]=e,W1[i]=s,B1[i]=new RegExp(e,t?"g":void 0),K1[i]=new RegExp(s,t?"g":void 0)};P("NUMERICIDENTIFIER","0|[1-9]\\d*");P("NUMERICIDENTIFIERLOOSE","\\d+");P("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${iu}*`);P("MAINVERSION",`(${v[b.NUMERICIDENTIFIER]})\\.(${v[b.NUMERICIDENTIFIER]})\\.(${v[b.NUMERICIDENTIFIER]})`);P("MAINVERSIONLOOSE",`(${v[b.NUMERICIDENTIFIERLOOSE]})\\.(${v[b.NUMERICIDENTIFIERLOOSE]})\\.(${v[b.NUMERICIDENTIFIERLOOSE]})`);P("PRERELEASEIDENTIFIER",`(?:${v[b.NONNUMERICIDENTIFIER]}|${v[b.NUMERICIDENTIFIER]})`);P("PRERELEASEIDENTIFIERLOOSE",`(?:${v[b.NONNUMERICIDENTIFIER]}|${v[b.NUMERICIDENTIFIERLOOSE]})`);P("PRERELEASE",`(?:-(${v[b.PRERELEASEIDENTIFIER]}(?:\\.${v[b.PRERELEASEIDENTIFIER]})*))`);P("PRERELEASELOOSE",`(?:-?(${v[b.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${v[b.PRERELEASEIDENTIFIERLOOSE]})*))`);P("BUILDIDENTIFIER",`${iu}+`);P("BUILD",`(?:\\+(${v[b.BUILDIDENTIFIER]}(?:\\.${v[b.BUILDIDENTIFIER]})*))`);P("FULLPLAIN",`v?${v[b.MAINVERSION]}${v[b.PRERELEASE]}?${v[b.BUILD]}?`);P("FULL",`^${v[b.FULLPLAIN]}$`);P("LOOSEPLAIN",`[v=\\s]*${v[b.MAINVERSIONLOOSE]}${v[b.PRERELEASELOOSE]}?${v[b.BUILD]}?`);P("LOOSE",`^${v[b.LOOSEPLAIN]}$`);P("GTLT","((?:<|>)?=?)");P("XRANGEIDENTIFIERLOOSE",`${v[b.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);P("XRANGEIDENTIFIER",`${v[b.NUMERICIDENTIFIER]}|x|X|\\*`);P("XRANGEPLAIN",`[v=\\s]*(${v[b.XRANGEIDENTIFIER]})(?:\\.(${v[b.XRANGEIDENTIFIER]})(?:\\.(${v[b.XRANGEIDENTIFIER]})(?:${v[b.PRERELEASE]})?${v[b.BUILD]}?)?)?`);P("XRANGEPLAINLOOSE",`[v=\\s]*(${v[b.XRANGEIDENTIFIERLOOSE]})(?:\\.(${v[b.XRANGEIDENTIFIERLOOSE]})(?:\\.(${v[b.XRANGEIDENTIFIERLOOSE]})(?:${v[b.PRERELEASELOOSE]})?${v[b.BUILD]}?)?)?`);P("XRANGE",`^${v[b.GTLT]}\\s*${v[b.XRANGEPLAIN]}$`);P("XRANGELOOSE",`^${v[b.GTLT]}\\s*${v[b.XRANGEPLAINLOOSE]}$`);P("COERCEPLAIN",`(^|[^\\d])(\\d{1,${su}})(?:\\.(\\d{1,${su}}))?(?:\\.(\\d{1,${su}}))?`);P("COERCE",`${v[b.COERCEPLAIN]}(?:$|[^\\d])`);P("COERCEFULL",v[b.COERCEPLAIN]+`(?:${v[b.PRERELEASE]})?(?:${v[b.BUILD]})?(?:$|[^\\d])`);P("COERCERTL",v[b.COERCE],!0);P("COERCERTLFULL",v[b.COERCEFULL],!0);P("LONETILDE","(?:~>?)");P("TILDETRIM",`(\\s*)${v[b.LONETILDE]}\\s+`,!0);st.tildeTrimReplace="$1~";P("TILDE",`^${v[b.LONETILDE]}${v[b.XRANGEPLAIN]}$`);P("TILDELOOSE",`^${v[b.LONETILDE]}${v[b.XRANGEPLAINLOOSE]}$`);P("LONECARET","(?:\\^)");P("CARETTRIM",`(\\s*)${v[b.LONECARET]}\\s+`,!0);st.caretTrimReplace="$1^";P("CARET",`^${v[b.LONECARET]}${v[b.XRANGEPLAIN]}$`);P("CARETLOOSE",`^${v[b.LONECARET]}${v[b.XRANGEPLAINLOOSE]}$`);P("COMPARATORLOOSE",`^${v[b.GTLT]}\\s*(${v[b.LOOSEPLAIN]})$|^$`);P("COMPARATOR",`^${v[b.GTLT]}\\s*(${v[b.FULLPLAIN]})$|^$`);P("COMPARATORTRIM",`(\\s*)${v[b.GTLT]}\\s*(${v[b.LOOSEPLAIN]}|${v[b.XRANGEPLAIN]})`,!0);st.comparatorTrimReplace="$1$2$3";P("HYPHENRANGE",`^\\s*(${v[b.XRANGEPLAIN]})\\s+-\\s+(${v[b.XRANGEPLAIN]})\\s*$`);P("HYPHENRANGELOOSE",`^\\s*(${v[b.XRANGEPLAINLOOSE]})\\s+-\\s+(${v[b.XRANGEPLAINLOOSE]})\\s*$`);P("STAR","(<|>)?=?\\s*\\*");P("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");P("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var qi=d((gk,Vf)=>{"use strict";var Z1=Object.freeze({loose:!0}),Q1=Object.freeze({}),ex=r=>r?typeof r!="object"?Z1:r:Q1;Vf.exports=ex});var nu=d((yk,Hf)=>{"use strict";var Ff=/^[0-9]+$/,Uf=(r,e)=>{if(typeof r=="number"&&typeof e=="number")return r===e?0:r<e?-1:1;let t=Ff.test(r),s=Ff.test(e);return t&&s&&(r=+r,e=+e),r===e?0:t&&!s?-1:s&&!t?1:r<e?-1:1},tx=(r,e)=>Uf(e,r);Hf.exports={compareIdentifiers:Uf,rcompareIdentifiers:tx}});var fe=d((_k,zf)=>{"use strict";var ki=$s(),{MAX_LENGTH:Gf,MAX_SAFE_INTEGER:ji}=ws(),{safeRe:Di,t:Mi}=Or(),rx=qi(),{compareIdentifiers:ou}=nu(),au=class r{constructor(e,t){if(t=rx(t),e instanceof r){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Gf)throw new TypeError(`version is longer than ${Gf} characters`);ki("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let s=e.trim().match(t.loose?Di[Mi.LOOSE]:Di[Mi.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>ji||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ji||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ji||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let n=+i;if(n>=0&&n<ji)return n}return i}):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(ki("SemVer.compare",this.version,this.options,e),!(e instanceof r)){if(typeof e=="string"&&e===this.version)return 0;e=new r(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof r||(e=new r(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(e){if(e instanceof r||(e=new r(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let s=this.prerelease[t],i=e.prerelease[t];if(ki("prerelease compare",t,s,i),s===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(s===void 0)return-1;if(s===i)continue;return ou(s,i)}while(++t)}compareBuild(e){e instanceof r||(e=new r(e,this.options));let t=0;do{let s=this.build[t],i=e.build[t];if(ki("build compare",t,s,i),s===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(s===void 0)return-1;if(s===i)continue;return ou(s,i)}while(++t)}inc(e,t,s){if(e.startsWith("pre")){if(!t&&s===!1)throw new Error("invalid increment argument: identifier is empty");if(t){let i=`-${t}`.match(this.options.loose?Di[Mi.PRERELEASELOOSE]:Di[Mi.PRERELEASE]);if(!i||i[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,s);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,s);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,s),this.inc("pre",t,s);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t,s),this.inc("pre",t,s);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let i=Number(s)?1:0;if(this.prerelease.length===0)this.prerelease=[i];else{let n=this.prerelease.length;for(;--n>=0;)typeof this.prerelease[n]=="number"&&(this.prerelease[n]++,n=-2);if(n===-1){if(t===this.prerelease.join(".")&&s===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(t){let n=[t,i];s===!1&&(n=[t]),ou(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};zf.exports=au});var Zt=d((vk,Kf)=>{"use strict";var Bf=fe(),sx=(r,e,t=!1)=>{if(r instanceof Bf)return r;try{return new Bf(r,e)}catch(s){if(!t)return null;throw s}};Kf.exports=sx});var Yf=d((bk,Wf)=>{"use strict";var ix=Zt(),nx=(r,e)=>{let t=ix(r,e);return t?t.version:null};Wf.exports=nx});var Jf=d((wk,Xf)=>{"use strict";var ox=Zt(),ax=(r,e)=>{let t=ox(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};Xf.exports=ax});var ep=d(($k,Qf)=>{"use strict";var Zf=fe(),ux=(r,e,t,s,i)=>{typeof t=="string"&&(i=s,s=t,t=void 0);try{return new Zf(r instanceof Zf?r.version:r,t).inc(e,s,i).version}catch{return null}};Qf.exports=ux});var sp=d((Ek,rp)=>{"use strict";var tp=Zt(),lx=(r,e)=>{let t=tp(r,null,!0),s=tp(e,null,!0),i=t.compare(s);if(i===0)return null;let n=i>0,o=n?t:s,a=n?s:t,u=!!o.prerelease.length;if(!!a.prerelease.length&&!u){if(!a.patch&&!a.minor)return"major";if(a.compareMain(o)===0)return a.minor&&!a.patch?"minor":"patch"}let c=u?"pre":"";return t.major!==s.major?c+"major":t.minor!==s.minor?c+"minor":t.patch!==s.patch?c+"patch":"prerelease"};rp.exports=lx});var np=d((Sk,ip)=>{"use strict";var cx=fe(),hx=(r,e)=>new cx(r,e).major;ip.exports=hx});var ap=d((Ok,op)=>{"use strict";var dx=fe(),fx=(r,e)=>new dx(r,e).minor;op.exports=fx});var lp=d((xk,up)=>{"use strict";var px=fe(),mx=(r,e)=>new px(r,e).patch;up.exports=mx});var hp=d((Tk,cp)=>{"use strict";var gx=Zt(),yx=(r,e)=>{let t=gx(r,e);return t&&t.prerelease.length?t.prerelease:null};cp.exports=yx});var Ne=d((Pk,fp)=>{"use strict";var dp=fe(),_x=(r,e,t)=>new dp(r,t).compare(new dp(e,t));fp.exports=_x});var mp=d((Ik,pp)=>{"use strict";var vx=Ne(),bx=(r,e,t)=>vx(e,r,t);pp.exports=bx});var yp=d((Ak,gp)=>{"use strict";var wx=Ne(),$x=(r,e)=>wx(r,e,!0);gp.exports=$x});var Li=d((Ck,vp)=>{"use strict";var _p=fe(),Ex=(r,e,t)=>{let s=new _p(r,t),i=new _p(e,t);return s.compare(i)||s.compareBuild(i)};vp.exports=Ex});var wp=d((Rk,bp)=>{"use strict";var Sx=Li(),Ox=(r,e)=>r.sort((t,s)=>Sx(t,s,e));bp.exports=Ox});var Ep=d((Nk,$p)=>{"use strict";var xx=Li(),Tx=(r,e)=>r.sort((t,s)=>xx(s,t,e));$p.exports=Tx});var Es=d((qk,Sp)=>{"use strict";var Px=Ne(),Ix=(r,e,t)=>Px(r,e,t)>0;Sp.exports=Ix});var Vi=d((kk,Op)=>{"use strict";var Ax=Ne(),Cx=(r,e,t)=>Ax(r,e,t)<0;Op.exports=Cx});var uu=d((jk,xp)=>{"use strict";var Rx=Ne(),Nx=(r,e,t)=>Rx(r,e,t)===0;xp.exports=Nx});var lu=d((Dk,Tp)=>{"use strict";var qx=Ne(),kx=(r,e,t)=>qx(r,e,t)!==0;Tp.exports=kx});var Fi=d((Mk,Pp)=>{"use strict";var jx=Ne(),Dx=(r,e,t)=>jx(r,e,t)>=0;Pp.exports=Dx});var Ui=d((Lk,Ip)=>{"use strict";var Mx=Ne(),Lx=(r,e,t)=>Mx(r,e,t)<=0;Ip.exports=Lx});var cu=d((Vk,Ap)=>{"use strict";var Vx=uu(),Fx=lu(),Ux=Es(),Hx=Fi(),Gx=Vi(),zx=Ui(),Bx=(r,e,t,s)=>{switch(e){case"===":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r===t;case"!==":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r!==t;case"":case"=":case"==":return Vx(r,t,s);case"!=":return Fx(r,t,s);case">":return Ux(r,t,s);case">=":return Hx(r,t,s);case"<":return Gx(r,t,s);case"<=":return zx(r,t,s);default:throw new TypeError(`Invalid operator: ${e}`)}};Ap.exports=Bx});var Rp=d((Fk,Cp)=>{"use strict";var Kx=fe(),Wx=Zt(),{safeRe:Hi,t:Gi}=Or(),Yx=(r,e)=>{if(r instanceof Kx)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;e=e||{};let t=null;if(!e.rtl)t=r.match(e.includePrerelease?Hi[Gi.COERCEFULL]:Hi[Gi.COERCE]);else{let u=e.includePrerelease?Hi[Gi.COERCERTLFULL]:Hi[Gi.COERCERTL],l;for(;(l=u.exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||l.index+l[0].length!==t.index+t[0].length)&&(t=l),u.lastIndex=l.index+l[1].length+l[2].length;u.lastIndex=-1}if(t===null)return null;let s=t[2],i=t[3]||"0",n=t[4]||"0",o=e.includePrerelease&&t[5]?`-${t[5]}`:"",a=e.includePrerelease&&t[6]?`+${t[6]}`:"";return Wx(`${s}.${i}.${n}${o}${a}`,e)};Cp.exports=Yx});var qp=d((Uk,Np)=>{"use strict";var hu=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let i=this.map.keys().next().value;this.delete(i)}this.map.set(e,t)}return this}};Np.exports=hu});var qe=d((Hk,Mp)=>{"use strict";var Xx=/\s+/g,du=class r{constructor(e,t){if(t=Zx(t),e instanceof r)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new r(e.raw,t);if(e instanceof fu)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(Xx," "),this.set=this.raw.split("||").map(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter(i=>!jp(i[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&nT(i[0])){this.set=[i];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let t=this.set[e];for(let s=0;s<t.length;s++)s>0&&(this.formatted+=" "),this.formatted+=t[s].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let s=((this.options.includePrerelease&&sT)|(this.options.loose&&iT))+":"+e,i=kp.get(s);if(i)return i;let n=this.options.loose,o=n?ye[pe.HYPHENRANGELOOSE]:ye[pe.HYPHENRANGE];e=e.replace(o,mT(this.options.includePrerelease)),W("hyphen replace",e),e=e.replace(ye[pe.COMPARATORTRIM],eT),W("comparator trim",e),e=e.replace(ye[pe.TILDETRIM],tT),W("tilde trim",e),e=e.replace(ye[pe.CARETTRIM],rT),W("caret trim",e);let a=e.split(" ").map(h=>oT(h,this.options)).join(" ").split(/\s+/).map(h=>pT(h,this.options));n&&(a=a.filter(h=>(W("loose invalid filter",h,this.options),!!h.match(ye[pe.COMPARATORLOOSE])))),W("range list",a);let u=new Map,l=a.map(h=>new fu(h,this.options));for(let h of l){if(jp(h))return[h];u.set(h.value,h)}u.size>1&&u.has("")&&u.delete("");let c=[...u.values()];return kp.set(s,c),c}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Range is required");return this.set.some(s=>Dp(s,t)&&e.set.some(i=>Dp(i,t)&&s.every(n=>i.every(o=>n.intersects(o,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Qx(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(gT(this.set[t],e,this.options))return!0;return!1}};Mp.exports=du;var Jx=qp(),kp=new Jx,Zx=qi(),fu=Ss(),W=$s(),Qx=fe(),{safeRe:ye,t:pe,comparatorTrimReplace:eT,tildeTrimReplace:tT,caretTrimReplace:rT}=Or(),{FLAG_INCLUDE_PRERELEASE:sT,FLAG_LOOSE:iT}=ws(),jp=r=>r.value==="<0.0.0-0",nT=r=>r.value==="",Dp=(r,e)=>{let t=!0,s=r.slice(),i=s.pop();for(;t&&s.length;)t=s.every(n=>i.intersects(n,e)),i=s.pop();return t},oT=(r,e)=>(r=r.replace(ye[pe.BUILD],""),W("comp",r,e),r=lT(r,e),W("caret",r),r=aT(r,e),W("tildes",r),r=hT(r,e),W("xrange",r),r=fT(r,e),W("stars",r),r),_e=r=>!r||r.toLowerCase()==="x"||r==="*",aT=(r,e)=>r.trim().split(/\s+/).map(t=>uT(t,e)).join(" "),uT=(r,e)=>{let t=e.loose?ye[pe.TILDELOOSE]:ye[pe.TILDE];return r.replace(t,(s,i,n,o,a)=>{W("tilde",r,s,i,n,o,a);let u;return _e(i)?u="":_e(n)?u=`>=${i}.0.0 <${+i+1}.0.0-0`:_e(o)?u=`>=${i}.${n}.0 <${i}.${+n+1}.0-0`:a?(W("replaceTilde pr",a),u=`>=${i}.${n}.${o}-${a} <${i}.${+n+1}.0-0`):u=`>=${i}.${n}.${o} <${i}.${+n+1}.0-0`,W("tilde return",u),u})},lT=(r,e)=>r.trim().split(/\s+/).map(t=>cT(t,e)).join(" "),cT=(r,e)=>{W("caret",r,e);let t=e.loose?ye[pe.CARETLOOSE]:ye[pe.CARET],s=e.includePrerelease?"-0":"";return r.replace(t,(i,n,o,a,u)=>{W("caret",r,i,n,o,a,u);let l;return _e(n)?l="":_e(o)?l=`>=${n}.0.0${s} <${+n+1}.0.0-0`:_e(a)?n==="0"?l=`>=${n}.${o}.0${s} <${n}.${+o+1}.0-0`:l=`>=${n}.${o}.0${s} <${+n+1}.0.0-0`:u?(W("replaceCaret pr",u),n==="0"?o==="0"?l=`>=${n}.${o}.${a}-${u} <${n}.${o}.${+a+1}-0`:l=`>=${n}.${o}.${a}-${u} <${n}.${+o+1}.0-0`:l=`>=${n}.${o}.${a}-${u} <${+n+1}.0.0-0`):(W("no pr"),n==="0"?o==="0"?l=`>=${n}.${o}.${a}${s} <${n}.${o}.${+a+1}-0`:l=`>=${n}.${o}.${a}${s} <${n}.${+o+1}.0-0`:l=`>=${n}.${o}.${a} <${+n+1}.0.0-0`),W("caret return",l),l})},hT=(r,e)=>(W("replaceXRanges",r,e),r.split(/\s+/).map(t=>dT(t,e)).join(" ")),dT=(r,e)=>{r=r.trim();let t=e.loose?ye[pe.XRANGELOOSE]:ye[pe.XRANGE];return r.replace(t,(s,i,n,o,a,u)=>{W("xRange",r,s,i,n,o,a,u);let l=_e(n),c=l||_e(o),h=c||_e(a),f=h;return i==="="&&f&&(i=""),u=e.includePrerelease?"-0":"",l?i===">"||i==="<"?s="<0.0.0-0":s="*":i&&f?(c&&(o=0),a=0,i===">"?(i=">=",c?(n=+n+1,o=0,a=0):(o=+o+1,a=0)):i==="<="&&(i="<",c?n=+n+1:o=+o+1),i==="<"&&(u="-0"),s=`${i+n}.${o}.${a}${u}`):c?s=`>=${n}.0.0${u} <${+n+1}.0.0-0`:h&&(s=`>=${n}.${o}.0${u} <${n}.${+o+1}.0-0`),W("xRange return",s),s})},fT=(r,e)=>(W("replaceStars",r,e),r.trim().replace(ye[pe.STAR],"")),pT=(r,e)=>(W("replaceGTE0",r,e),r.trim().replace(ye[e.includePrerelease?pe.GTE0PRE:pe.GTE0],"")),mT=r=>(e,t,s,i,n,o,a,u,l,c,h,f)=>(_e(s)?t="":_e(i)?t=`>=${s}.0.0${r?"-0":""}`:_e(n)?t=`>=${s}.${i}.0${r?"-0":""}`:o?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,_e(l)?u="":_e(c)?u=`<${+l+1}.0.0-0`:_e(h)?u=`<${l}.${+c+1}.0-0`:f?u=`<=${l}.${c}.${h}-${f}`:r?u=`<${l}.${c}.${+h+1}-0`:u=`<=${u}`,`${t} ${u}`.trim()),gT=(r,e,t)=>{for(let s=0;s<r.length;s++)if(!r[s].test(e))return!1;if(e.prerelease.length&&!t.includePrerelease){for(let s=0;s<r.length;s++)if(W(r[s].semver),r[s].semver!==fu.ANY&&r[s].semver.prerelease.length>0){let i=r[s].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var Ss=d((Gk,Gp)=>{"use strict";var Os=Symbol("SemVer ANY"),gu=class r{static get ANY(){return Os}constructor(e,t){if(t=Lp(t),e instanceof r){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),mu("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===Os?this.value="":this.value=this.operator+this.semver.version,mu("comp",this)}parse(e){let t=this.options.loose?Vp[Fp.COMPARATORLOOSE]:Vp[Fp.COMPARATOR],s=e.match(t);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=s[1]!==void 0?s[1]:"",this.operator==="="&&(this.operator=""),s[2]?this.semver=new Up(s[2],this.options.loose):this.semver=Os}toString(){return this.value}test(e){if(mu("Comparator.test",e,this.options.loose),this.semver===Os||e===Os)return!0;if(typeof e=="string")try{e=new Up(e,this.options)}catch{return!1}return pu(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Hp(e.value,t).test(this.value):e.operator===""?e.value===""?!0:new Hp(this.value,t).test(e.semver):(t=Lp(t),t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||pu(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||pu(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Gp.exports=gu;var Lp=qi(),{safeRe:Vp,t:Fp}=Or(),pu=cu(),mu=$s(),Up=fe(),Hp=qe()});var xs=d((zk,zp)=>{"use strict";var yT=qe(),_T=(r,e,t)=>{try{e=new yT(e,t)}catch{return!1}return e.test(r)};zp.exports=_T});var Kp=d((Bk,Bp)=>{"use strict";var vT=qe(),bT=(r,e)=>new vT(r,e).set.map(t=>t.map(s=>s.value).join(" ").trim().split(" "));Bp.exports=bT});var Yp=d((Kk,Wp)=>{"use strict";var wT=fe(),$T=qe(),ET=(r,e,t)=>{let s=null,i=null,n=null;try{n=new $T(e,t)}catch{return null}return r.forEach(o=>{n.test(o)&&(!s||i.compare(o)===-1)&&(s=o,i=new wT(s,t))}),s};Wp.exports=ET});var Jp=d((Wk,Xp)=>{"use strict";var ST=fe(),OT=qe(),xT=(r,e,t)=>{let s=null,i=null,n=null;try{n=new OT(e,t)}catch{return null}return r.forEach(o=>{n.test(o)&&(!s||i.compare(o)===1)&&(s=o,i=new ST(s,t))}),s};Xp.exports=xT});var em=d((Yk,Qp)=>{"use strict";var yu=fe(),TT=qe(),Zp=Es(),PT=(r,e)=>{r=new TT(r,e);let t=new yu("0.0.0");if(r.test(t)||(t=new yu("0.0.0-0"),r.test(t)))return t;t=null;for(let s=0;s<r.set.length;++s){let i=r.set[s],n=null;i.forEach(o=>{let a=new yu(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!n||Zp(a,n))&&(n=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),n&&(!t||Zp(t,n))&&(t=n)}return t&&r.test(t)?t:null};Qp.exports=PT});var rm=d((Xk,tm)=>{"use strict";var IT=qe(),AT=(r,e)=>{try{return new IT(r,e).range||"*"}catch{return null}};tm.exports=AT});var zi=d((Jk,om)=>{"use strict";var CT=fe(),nm=Ss(),{ANY:RT}=nm,NT=qe(),qT=xs(),sm=Es(),im=Vi(),kT=Ui(),jT=Fi(),DT=(r,e,t,s)=>{r=new CT(r,s),e=new NT(e,s);let i,n,o,a,u;switch(t){case">":i=sm,n=kT,o=im,a=">",u=">=";break;case"<":i=im,n=jT,o=sm,a="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(qT(r,e,s))return!1;for(let l=0;l<e.set.length;++l){let c=e.set[l],h=null,f=null;if(c.forEach(p=>{p.semver===RT&&(p=new nm(">=0.0.0")),h=h||p,f=f||p,i(p.semver,h.semver,s)?h=p:o(p.semver,f.semver,s)&&(f=p)}),h.operator===a||h.operator===u||(!f.operator||f.operator===a)&&n(r,f.semver))return!1;if(f.operator===u&&o(r,f.semver))return!1}return!0};om.exports=DT});var um=d((Zk,am)=>{"use strict";var MT=zi(),LT=(r,e,t)=>MT(r,e,">",t);am.exports=LT});var cm=d((Qk,lm)=>{"use strict";var VT=zi(),FT=(r,e,t)=>VT(r,e,"<",t);lm.exports=FT});var fm=d((ej,dm)=>{"use strict";var hm=qe(),UT=(r,e,t)=>(r=new hm(r,t),e=new hm(e,t),r.intersects(e,t));dm.exports=UT});var mm=d((tj,pm)=>{"use strict";var HT=xs(),GT=Ne();pm.exports=(r,e,t)=>{let s=[],i=null,n=null,o=r.sort((c,h)=>GT(c,h,t));for(let c of o)HT(c,e,t)?(n=c,i||(i=c)):(n&&s.push([i,n]),n=null,i=null);i&&s.push([i,null]);let a=[];for(let[c,h]of s)c===h?a.push(c):!h&&c===o[0]?a.push("*"):h?c===o[0]?a.push(`<=${h}`):a.push(`${c} - ${h}`):a.push(`>=${c}`);let u=a.join(" || "),l=typeof e.raw=="string"?e.raw:String(e);return u.length<l.length?u:e}});var wm=d((rj,bm)=>{"use strict";var gm=qe(),vu=Ss(),{ANY:_u}=vu,Ts=xs(),bu=Ne(),zT=(r,e,t={})=>{if(r===e)return!0;r=new gm(r,t),e=new gm(e,t);let s=!1;e:for(let i of r.set){for(let n of e.set){let o=KT(i,n,t);if(s=s||o!==null,o)continue e}if(s)return!1}return!0},BT=[new vu(">=0.0.0-0")],ym=[new vu(">=0.0.0")],KT=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===_u){if(e.length===1&&e[0].semver===_u)return!0;t.includePrerelease?r=BT:r=ym}if(e.length===1&&e[0].semver===_u){if(t.includePrerelease)return!0;e=ym}let s=new Set,i,n;for(let p of r)p.operator===">"||p.operator===">="?i=_m(i,p,t):p.operator==="<"||p.operator==="<="?n=vm(n,p,t):s.add(p.semver);if(s.size>1)return null;let o;if(i&&n){if(o=bu(i.semver,n.semver,t),o>0)return null;if(o===0&&(i.operator!==">="||n.operator!=="<="))return null}for(let p of s){if(i&&!Ts(p,String(i),t)||n&&!Ts(p,String(n),t))return null;for(let m of e)if(!Ts(p,String(m),t))return!1;return!0}let a,u,l,c,h=n&&!t.includePrerelease&&n.semver.prerelease.length?n.semver:!1,f=i&&!t.includePrerelease&&i.semver.prerelease.length?i.semver:!1;h&&h.prerelease.length===1&&n.operator==="<"&&h.prerelease[0]===0&&(h=!1);for(let p of e){if(c=c||p.operator===">"||p.operator===">=",l=l||p.operator==="<"||p.operator==="<=",i){if(f&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===f.major&&p.semver.minor===f.minor&&p.semver.patch===f.patch&&(f=!1),p.operator===">"||p.operator===">="){if(a=_m(i,p,t),a===p&&a!==i)return!1}else if(i.operator===">="&&!Ts(i.semver,String(p),t))return!1}if(n){if(h&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===h.major&&p.semver.minor===h.minor&&p.semver.patch===h.patch&&(h=!1),p.operator==="<"||p.operator==="<="){if(u=vm(n,p,t),u===p&&u!==n)return!1}else if(n.operator==="<="&&!Ts(n.semver,String(p),t))return!1}if(!p.operator&&(n||i)&&o!==0)return!1}return!(i&&l&&!n&&o!==0||n&&c&&!i&&o!==0||f||h)},_m=(r,e,t)=>{if(!r)return e;let s=bu(r.semver,e.semver,t);return s>0?r:s<0||e.operator===">"&&r.operator===">="?e:r},vm=(r,e,t)=>{if(!r)return e;let s=bu(r.semver,e.semver,t);return s<0?r:s>0||e.operator==="<"&&r.operator==="<="?e:r};bm.exports=zT});var Om=d((sj,Sm)=>{"use strict";var wu=Or(),$m=ws(),WT=fe(),Em=nu(),YT=Zt(),XT=Yf(),JT=Jf(),ZT=ep(),QT=sp(),eP=np(),tP=ap(),rP=lp(),sP=hp(),iP=Ne(),nP=mp(),oP=yp(),aP=Li(),uP=wp(),lP=Ep(),cP=Es(),hP=Vi(),dP=uu(),fP=lu(),pP=Fi(),mP=Ui(),gP=cu(),yP=Rp(),_P=Ss(),vP=qe(),bP=xs(),wP=Kp(),$P=Yp(),EP=Jp(),SP=em(),OP=rm(),xP=zi(),TP=um(),PP=cm(),IP=fm(),AP=mm(),CP=wm();Sm.exports={parse:YT,valid:XT,clean:JT,inc:ZT,diff:QT,major:eP,minor:tP,patch:rP,prerelease:sP,compare:iP,rcompare:nP,compareLoose:oP,compareBuild:aP,sort:uP,rsort:lP,gt:cP,lt:hP,eq:dP,neq:fP,gte:pP,lte:mP,cmp:gP,coerce:yP,Comparator:_P,Range:vP,satisfies:bP,toComparators:wP,maxSatisfying:$P,minSatisfying:EP,minVersion:SP,validRange:OP,outside:xP,gtr:TP,ltr:PP,intersects:IP,simplifyRange:AP,subset:CP,SemVer:WT,re:wu.re,src:wu.src,tokens:wu.t,SEMVER_SPEC_VERSION:$m.SEMVER_SPEC_VERSION,RELEASE_TYPES:$m.RELEASE_TYPES,compareIdentifiers:Em.compareIdentifiers,rcompareIdentifiers:Em.rcompareIdentifiers}});var ee=d((dj,km)=>{"use strict";var{FORCE_COLOR:GP,NODE_DISABLE_COLORS:zP,TERM:BP}=process.env,L={enabled:!zP&&BP!=="dumb"&&GP!=="0",reset:H(0,0),bold:H(1,22),dim:H(2,22),italic:H(3,23),underline:H(4,24),inverse:H(7,27),hidden:H(8,28),strikethrough:H(9,29),black:H(30,39),red:H(31,39),green:H(32,39),yellow:H(33,39),blue:H(34,39),magenta:H(35,39),cyan:H(36,39),white:H(37,39),gray:H(90,39),grey:H(90,39),bgBlack:H(40,49),bgRed:H(41,49),bgGreen:H(42,49),bgYellow:H(43,49),bgBlue:H(44,49),bgMagenta:H(45,49),bgCyan:H(46,49),bgWhite:H(47,49)};function qm(r,e){let t=0,s,i="",n="";for(;t<r.length;t++)s=r[t],i+=s.open,n+=s.close,e.includes(s.close)&&(e=e.replace(s.rgx,s.close+s.open));return i+e+n}function KP(r,e){let t={has:r,keys:e};return t.reset=L.reset.bind(t),t.bold=L.bold.bind(t),t.dim=L.dim.bind(t),t.italic=L.italic.bind(t),t.underline=L.underline.bind(t),t.inverse=L.inverse.bind(t),t.hidden=L.hidden.bind(t),t.strikethrough=L.strikethrough.bind(t),t.black=L.black.bind(t),t.red=L.red.bind(t),t.green=L.green.bind(t),t.yellow=L.yellow.bind(t),t.blue=L.blue.bind(t),t.magenta=L.magenta.bind(t),t.cyan=L.cyan.bind(t),t.white=L.white.bind(t),t.gray=L.gray.bind(t),t.grey=L.grey.bind(t),t.bgBlack=L.bgBlack.bind(t),t.bgRed=L.bgRed.bind(t),t.bgGreen=L.bgGreen.bind(t),t.bgYellow=L.bgYellow.bind(t),t.bgBlue=L.bgBlue.bind(t),t.bgMagenta=L.bgMagenta.bind(t),t.bgCyan=L.bgCyan.bind(t),t.bgWhite=L.bgWhite.bind(t),t}function H(r,e){let t={open:`\x1B[${r}m`,close:`\x1B[${e}m`,rgx:new RegExp(`\\x1b\\[${e}m`,"g")};return function(s){return this!==void 0&&this.has!==void 0?(this.has.includes(r)||(this.has.push(r),this.keys.push(t)),s===void 0?this:L.enabled?qm(this.keys,s+""):s+""):s===void 0?KP([r],[t]):L.enabled?qm([t],s+""):s+""}}km.exports=L});var Dm=d((fj,jm)=>{"use strict";jm.exports=(r,e)=>{if(!(r.meta&&r.name!=="escape")){if(r.ctrl){if(r.name==="a")return"first";if(r.name==="c"||r.name==="d")return"abort";if(r.name==="e")return"last";if(r.name==="g")return"reset"}if(e){if(r.name==="j")return"down";if(r.name==="k")return"up"}return r.name==="return"||r.name==="enter"?"submit":r.name==="backspace"?"delete":r.name==="delete"?"deleteForward":r.name==="abort"?"abort":r.name==="escape"?"exit":r.name==="tab"?"next":r.name==="pagedown"?"nextPage":r.name==="pageup"?"prevPage":r.name==="home"?"home":r.name==="end"?"end":r.name==="up"?"up":r.name==="down"?"down":r.name==="right"?"right":r.name==="left"?"left":!1}}});var Wi=d((pj,Mm)=>{"use strict";Mm.exports=r=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),t=new RegExp(e,"g");return typeof r=="string"?r.replace(t,""):r}});var te=d((mj,Lm)=>{"use strict";var Tu={to(r,e){return e?`\x1B[${e+1};${r+1}H`:`\x1B[${r+1}G`},move(r,e){let t="";return r<0?t+=`\x1B[${-r}D`:r>0&&(t+=`\x1B[${r}C`),e<0?t+=`\x1B[${-e}A`:e>0&&(t+=`\x1B[${e}B`),t},up:(r=1)=>`\x1B[${r}A`,down:(r=1)=>`\x1B[${r}B`,forward:(r=1)=>`\x1B[${r}C`,backward:(r=1)=>`\x1B[${r}D`,nextLine:(r=1)=>"\x1B[E".repeat(r),prevLine:(r=1)=>"\x1B[F".repeat(r),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},WP={up:(r=1)=>"\x1B[S".repeat(r),down:(r=1)=>"\x1B[T".repeat(r)},YP={screen:"\x1B[2J",up:(r=1)=>"\x1B[1J".repeat(r),down:(r=1)=>"\x1B[J".repeat(r),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(r){let e="";for(let t=0;t<r;t++)e+=this.line+(t<r-1?Tu.up():"");return r&&(e+=Tu.left),e}};Lm.exports={cursor:Tu,scroll:WP,erase:YP,beep:"\x07"}});var Gm=d((gj,Hm)=>{"use strict";function XP(r,e){var t=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=JP(r))||e&&r&&typeof r.length=="number"){t&&(r=t);var s=0,i=function(){};return{s:i,n:function(){return s>=r.length?{done:!0}:{done:!1,value:r[s++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
10
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var n=!0,o=!1,a;return{s:function(){t=t.call(r)},n:function(){var
|
|
9
|
+
deps: ${t}}`};var mS={keyword:"dependencies",type:"object",schemaType:"object",error:Qe.error,code(r){let[e,t]=gS(r);Pd(r,e),Ad(r,t)}};function gS({schema:r}){let e={},t={};for(let s in r){if(s==="__proto__")continue;let i=Array.isArray(r[s])?e:t;i[s]=r[s]}return[e,t]}function Pd(r,e=r.schema){let{gen:t,data:s,it:i}=r;if(Object.keys(e).length===0)return;let n=t.let("missing");for(let o in e){let a=e[o];if(a.length===0)continue;let u=(0,bs.propertyInData)(t,s,o,i.opts.ownProperties);r.setParams({property:o,depsCount:a.length,deps:a.join(", ")}),i.allErrors?t.if(u,()=>{for(let c of a)(0,bs.checkReportMissingProp)(r,c)}):(t.if((0,ha._)`${u} && (${(0,bs.checkMissingProp)(r,a,n)})`),(0,bs.reportMissingProp)(r,n),t.else())}}Qe.validatePropertyDeps=Pd;function Ad(r,e=r.schema){let{gen:t,data:s,keyword:i,it:n}=r,o=t.name("valid");for(let a in e)(0,pS.alwaysValidSchema)(n,e[a])||(t.if((0,bs.propertyInData)(t,s,a,n.opts.ownProperties),()=>{let u=r.subschema({keyword:i,schemaProp:a},o);r.mergeValidEvaluated(u,o)},()=>t.var(o,!0)),r.ok(o))}Qe.validateSchemaDeps=Ad;Qe.default=mS});var Cd=d(da=>{"use strict";Object.defineProperty(da,"__esModule",{value:!0});var Id=T(),yS=R(),_S={message:"property name must be valid",params:({params:r})=>(0,Id._)`{propertyName: ${r.propertyName}}`},vS={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:_S,code(r){let{gen:e,schema:t,data:s,it:i}=r;if((0,yS.alwaysValidSchema)(i,t))return;let n=e.name("valid");e.forIn("key",s,o=>{r.setParams({propertyName:o}),r.subschema({keyword:"propertyNames",data:o,dataTypes:["string"],propertyName:o,compositeRule:!0},n),e.if((0,Id.not)(n),()=>{r.error(!0),i.allErrors||e.break()})}),r.ok(n)}};da.default=vS});var pa=d(fa=>{"use strict";Object.defineProperty(fa,"__esModule",{value:!0});var Ai=Ie(),He=T(),bS=Ae(),Ii=R(),wS={message:"must NOT have additional properties",params:({params:r})=>(0,He._)`{additionalProperty: ${r.additionalProperty}}`},$S={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:wS,code(r){let{gen:e,schema:t,parentSchema:s,data:i,errsCount:n,it:o}=r;if(!n)throw new Error("ajv implementation error");let{allErrors:a,opts:u}=o;if(o.props=!0,u.removeAdditional!=="all"&&(0,Ii.alwaysValidSchema)(o,t))return;let c=(0,Ai.allSchemaProperties)(s.properties),l=(0,Ai.allSchemaProperties)(s.patternProperties);h(),r.ok((0,He._)`${n} === ${bS.default.errors}`);function h(){e.forIn("key",i,y=>{!c.length&&!l.length?m(y):e.if(f(y),()=>m(y))})}function f(y){let _;if(c.length>8){let S=(0,Ii.schemaRefOrVal)(o,s.properties,"properties");_=(0,Ai.isOwnProperty)(e,S,y)}else c.length?_=(0,He.or)(...c.map(S=>(0,He._)`${y} === ${S}`)):_=He.nil;return l.length&&(_=(0,He.or)(_,...l.map(S=>(0,He._)`${(0,Ai.usePattern)(r,S)}.test(${y})`))),(0,He.not)(_)}function p(y){e.code((0,He._)`delete ${i}[${y}]`)}function m(y){if(u.removeAdditional==="all"||u.removeAdditional&&t===!1){p(y);return}if(t===!1){r.setParams({additionalProperty:y}),r.error(),a||e.break();return}if(typeof t=="object"&&!(0,Ii.alwaysValidSchema)(o,t)){let _=e.name("valid");u.removeAdditional==="failing"?(g(y,_,!1),e.if((0,He.not)(_),()=>{r.reset(),p(y)})):(g(y,_),a||e.if((0,He.not)(_),()=>e.break()))}}function g(y,_,S){let O={keyword:"additionalProperties",dataProp:y,dataPropType:Ii.Type.Str};S===!1&&Object.assign(O,{compositeRule:!0,createErrors:!1,allErrors:!1}),r.subschema(O,_)}}};fa.default=$S});var qd=d(ga=>{"use strict";Object.defineProperty(ga,"__esModule",{value:!0});var ES=dr(),Rd=Ie(),ma=R(),Nd=pa(),SS={keyword:"properties",type:"object",schemaType:"object",code(r){let{gen:e,schema:t,parentSchema:s,data:i,it:n}=r;n.opts.removeAdditional==="all"&&s.additionalProperties===void 0&&Nd.default.code(new ES.KeywordCxt(n,Nd.default,"additionalProperties"));let o=(0,Rd.allSchemaProperties)(t);for(let h of o)n.definedProperties.add(h);n.opts.unevaluated&&o.length&&n.props!==!0&&(n.props=ma.mergeEvaluated.props(e,(0,ma.toHash)(o),n.props));let a=o.filter(h=>!(0,ma.alwaysValidSchema)(n,t[h]));if(a.length===0)return;let u=e.name("valid");for(let h of a)c(h)?l(h):(e.if((0,Rd.propertyInData)(e,i,h,n.opts.ownProperties)),l(h),n.allErrors||e.else().var(u,!0),e.endIf()),r.it.definedProperties.add(h),r.ok(u);function c(h){return n.opts.useDefaults&&!n.compositeRule&&t[h].default!==void 0}function l(h){r.subschema({keyword:"properties",schemaProp:h,dataProp:h},u)}}};ga.default=SS});var Md=d(ya=>{"use strict";Object.defineProperty(ya,"__esModule",{value:!0});var jd=Ie(),Ci=T(),kd=R(),Dd=R(),OS={keyword:"patternProperties",type:"object",schemaType:"object",code(r){let{gen:e,schema:t,data:s,parentSchema:i,it:n}=r,{opts:o}=n,a=(0,jd.allSchemaProperties)(t),u=a.filter(g=>(0,kd.alwaysValidSchema)(n,t[g]));if(a.length===0||u.length===a.length&&(!n.opts.unevaluated||n.props===!0))return;let c=o.strictSchema&&!o.allowMatchingProperties&&i.properties,l=e.name("valid");n.props!==!0&&!(n.props instanceof Ci.Name)&&(n.props=(0,Dd.evaluatedPropsToName)(e,n.props));let{props:h}=n;f();function f(){for(let g of a)c&&p(g),n.allErrors?m(g):(e.var(l,!0),m(g),e.if(l))}function p(g){for(let y in c)new RegExp(g).test(y)&&(0,kd.checkStrictMode)(n,`property ${y} matches pattern ${g} (use allowMatchingProperties)`)}function m(g){e.forIn("key",s,y=>{e.if((0,Ci._)`${(0,jd.usePattern)(r,g)}.test(${y})`,()=>{let _=u.includes(g);_||r.subschema({keyword:"patternProperties",schemaProp:g,dataProp:y,dataPropType:Dd.Type.Str},l),n.opts.unevaluated&&h!==!0?e.assign((0,Ci._)`${h}[${y}]`,!0):!_&&!n.allErrors&&e.if((0,Ci.not)(l),()=>e.break())})})}}};ya.default=OS});var Ld=d(_a=>{"use strict";Object.defineProperty(_a,"__esModule",{value:!0});var xS=R(),TS={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){let{gen:e,schema:t,it:s}=r;if((0,xS.alwaysValidSchema)(s,t)){r.fail();return}let i=e.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),r.failResult(i,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};_a.default=TS});var Vd=d(va=>{"use strict";Object.defineProperty(va,"__esModule",{value:!0});var PS=Ie(),AS={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:PS.validateUnion,error:{message:"must match a schema in anyOf"}};va.default=AS});var Fd=d(ba=>{"use strict";Object.defineProperty(ba,"__esModule",{value:!0});var Ri=T(),IS=R(),CS={message:"must match exactly one schema in oneOf",params:({params:r})=>(0,Ri._)`{passingSchemas: ${r.passing}}`},RS={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:CS,code(r){let{gen:e,schema:t,parentSchema:s,it:i}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");if(i.opts.discriminator&&s.discriminator)return;let n=t,o=e.let("valid",!1),a=e.let("passing",null),u=e.name("_valid");r.setParams({passing:a}),e.block(c),r.result(o,()=>r.reset(),()=>r.error(!0));function c(){n.forEach((l,h)=>{let f;(0,IS.alwaysValidSchema)(i,l)?e.var(u,!0):f=r.subschema({keyword:"oneOf",schemaProp:h,compositeRule:!0},u),h>0&&e.if((0,Ri._)`${u} && ${o}`).assign(o,!1).assign(a,(0,Ri._)`[${a}, ${h}]`).else(),e.if(u,()=>{e.assign(o,!0),e.assign(a,h),f&&r.mergeEvaluated(f,Ri.Name)})})}}};ba.default=RS});var Ud=d(wa=>{"use strict";Object.defineProperty(wa,"__esModule",{value:!0});var NS=R(),qS={keyword:"allOf",schemaType:"array",code(r){let{gen:e,schema:t,it:s}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");let i=e.name("valid");t.forEach((n,o)=>{if((0,NS.alwaysValidSchema)(s,n))return;let a=r.subschema({keyword:"allOf",schemaProp:o},i);r.ok(i),r.mergeEvaluated(a)})}};wa.default=qS});var zd=d($a=>{"use strict";Object.defineProperty($a,"__esModule",{value:!0});var Ni=T(),Gd=R(),jS={message:({params:r})=>(0,Ni.str)`must match "${r.ifClause}" schema`,params:({params:r})=>(0,Ni._)`{failingKeyword: ${r.ifClause}}`},kS={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:jS,code(r){let{gen:e,parentSchema:t,it:s}=r;t.then===void 0&&t.else===void 0&&(0,Gd.checkStrictMode)(s,'"if" without "then" and "else" is ignored');let i=Hd(s,"then"),n=Hd(s,"else");if(!i&&!n)return;let o=e.let("valid",!0),a=e.name("_valid");if(u(),r.reset(),i&&n){let l=e.let("ifClause");r.setParams({ifClause:l}),e.if(a,c("then",l),c("else",l))}else i?e.if(a,c("then")):e.if((0,Ni.not)(a),c("else"));r.pass(o,()=>r.error(!0));function u(){let l=r.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);r.mergeEvaluated(l)}function c(l,h){return()=>{let f=r.subschema({keyword:l},a);e.assign(o,a),r.mergeValidEvaluated(f,o),h?e.assign(h,(0,Ni._)`${l}`):r.setParams({ifClause:l})}}}};function Hd(r,e){let t=r.schema[e];return t!==void 0&&!(0,Gd.alwaysValidSchema)(r,t)}$a.default=kS});var Bd=d(Ea=>{"use strict";Object.defineProperty(Ea,"__esModule",{value:!0});var DS=R(),MS={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:e,it:t}){e.if===void 0&&(0,DS.checkStrictMode)(t,`"${r}" without "if" is ignored`)}};Ea.default=MS});var Oa=d(Sa=>{"use strict";Object.defineProperty(Sa,"__esModule",{value:!0});var LS=oa(),VS=Sd(),FS=aa(),US=xd(),HS=Td(),GS=Pi(),zS=Cd(),BS=pa(),KS=qd(),WS=Md(),YS=Ld(),XS=Vd(),JS=Fd(),ZS=Ud(),QS=zd(),eO=Bd();function tO(r=!1){let e=[YS.default,XS.default,JS.default,ZS.default,QS.default,eO.default,zS.default,BS.default,GS.default,KS.default,WS.default];return r?e.push(VS.default,US.default):e.push(LS.default,FS.default),e.push(HS.default),e}Sa.default=tO});var Ta=d(ws=>{"use strict";Object.defineProperty(ws,"__esModule",{value:!0});ws.dynamicAnchor=void 0;var xa=T(),rO=Ae(),Kd=as(),sO=$i(),iO={keyword:"$dynamicAnchor",schemaType:"string",code:r=>Wd(r,r.schema)};function Wd(r,e){let{gen:t,it:s}=r;s.schemaEnv.root.dynamicAnchors[e]=!0;let i=(0,xa._)`${rO.default.dynamicAnchors}${(0,xa.getProperty)(e)}`,n=s.errSchemaPath==="#"?s.validateName:nO(r);t.if((0,xa._)`!${i}`,()=>t.assign(i,n))}ws.dynamicAnchor=Wd;function nO(r){let{schemaEnv:e,schema:t,self:s}=r.it,{root:i,baseId:n,localRefs:o,meta:a}=e.root,{schemaId:u}=s.opts,c=new Kd.SchemaEnv({schema:t,schemaId:u,root:i,baseId:n,localRefs:o,meta:a});return Kd.compileSchema.call(s,c),(0,sO.getValidate)(r,c)}ws.default=iO});var Pa=d($s=>{"use strict";Object.defineProperty($s,"__esModule",{value:!0});$s.dynamicRef=void 0;var Yd=T(),oO=Ae(),Xd=$i(),aO={keyword:"$dynamicRef",schemaType:"string",code:r=>Jd(r,r.schema)};function Jd(r,e){let{gen:t,keyword:s,it:i}=r;if(e[0]!=="#")throw new Error(`"${s}" only supports hash fragment reference`);let n=e.slice(1);if(i.allErrors)o();else{let u=t.let("valid",!1);o(u),r.ok(u)}function o(u){if(i.schemaEnv.root.dynamicAnchors[n]){let c=t.let("_v",(0,Yd._)`${oO.default.dynamicAnchors}${(0,Yd.getProperty)(n)}`);t.if(c,a(c,u),a(i.validateName,u))}else a(i.validateName,u)()}function a(u,c){return c?()=>t.block(()=>{(0,Xd.callRef)(r,u),t.let(c,!0)}):()=>(0,Xd.callRef)(r,u)}}$s.dynamicRef=Jd;$s.default=aO});var Zd=d(Aa=>{"use strict";Object.defineProperty(Aa,"__esModule",{value:!0});var uO=Ta(),cO=R(),lO={keyword:"$recursiveAnchor",schemaType:"boolean",code(r){r.schema?(0,uO.dynamicAnchor)(r,""):(0,cO.checkStrictMode)(r.it,"$recursiveAnchor: false is ignored")}};Aa.default=lO});var Qd=d(Ia=>{"use strict";Object.defineProperty(Ia,"__esModule",{value:!0});var hO=Pa(),dO={keyword:"$recursiveRef",schemaType:"string",code:r=>(0,hO.dynamicRef)(r,r.schema)};Ia.default=dO});var ef=d(Ca=>{"use strict";Object.defineProperty(Ca,"__esModule",{value:!0});var fO=Ta(),pO=Pa(),mO=Zd(),gO=Qd(),yO=[fO.default,pO.default,mO.default,gO.default];Ca.default=yO});var rf=d(Ra=>{"use strict";Object.defineProperty(Ra,"__esModule",{value:!0});var tf=Pi(),_O={keyword:"dependentRequired",type:"object",schemaType:"object",error:tf.error,code:r=>(0,tf.validatePropertyDeps)(r)};Ra.default=_O});var sf=d(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});var vO=Pi(),bO={keyword:"dependentSchemas",type:"object",schemaType:"object",code:r=>(0,vO.validateSchemaDeps)(r)};Na.default=bO});var nf=d(qa=>{"use strict";Object.defineProperty(qa,"__esModule",{value:!0});var wO=R(),$O={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:r,parentSchema:e,it:t}){e.contains===void 0&&(0,wO.checkStrictMode)(t,`"${r}" without "contains" is ignored`)}};qa.default=$O});var of=d(ja=>{"use strict";Object.defineProperty(ja,"__esModule",{value:!0});var EO=rf(),SO=sf(),OO=nf(),xO=[EO.default,SO.default,OO.default];ja.default=xO});var uf=d(ka=>{"use strict";Object.defineProperty(ka,"__esModule",{value:!0});var Rt=T(),af=R(),TO=Ae(),PO={message:"must NOT have unevaluated properties",params:({params:r})=>(0,Rt._)`{unevaluatedProperty: ${r.unevaluatedProperty}}`},AO={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:PO,code(r){let{gen:e,schema:t,data:s,errsCount:i,it:n}=r;if(!i)throw new Error("ajv implementation error");let{allErrors:o,props:a}=n;a instanceof Rt.Name?e.if((0,Rt._)`${a} !== true`,()=>e.forIn("key",s,h=>e.if(c(a,h),()=>u(h)))):a!==!0&&e.forIn("key",s,h=>a===void 0?u(h):e.if(l(a,h),()=>u(h))),n.props=!0,r.ok((0,Rt._)`${i} === ${TO.default.errors}`);function u(h){if(t===!1){r.setParams({unevaluatedProperty:h}),r.error(),o||e.break();return}if(!(0,af.alwaysValidSchema)(n,t)){let f=e.name("valid");r.subschema({keyword:"unevaluatedProperties",dataProp:h,dataPropType:af.Type.Str},f),o||e.if((0,Rt.not)(f),()=>e.break())}}function c(h,f){return(0,Rt._)`!${h} || !${h}[${f}]`}function l(h,f){let p=[];for(let m in h)h[m]===!0&&p.push((0,Rt._)`${f} !== ${m}`);return(0,Rt.and)(...p)}}};ka.default=AO});var lf=d(Da=>{"use strict";Object.defineProperty(Da,"__esModule",{value:!0});var Qt=T(),cf=R(),IO={message:({params:{len:r}})=>(0,Qt.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,Qt._)`{limit: ${r}}`},CO={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:IO,code(r){let{gen:e,schema:t,data:s,it:i}=r,n=i.items||0;if(n===!0)return;let o=e.const("len",(0,Qt._)`${s}.length`);if(t===!1)r.setParams({len:n}),r.fail((0,Qt._)`${o} > ${n}`);else if(typeof t=="object"&&!(0,cf.alwaysValidSchema)(i,t)){let u=e.var("valid",(0,Qt._)`${o} <= ${n}`);e.if((0,Qt.not)(u),()=>a(u,n)),r.ok(u)}i.items=!0;function a(u,c){e.forRange("i",c,o,l=>{r.subschema({keyword:"unevaluatedItems",dataProp:l,dataPropType:cf.Type.Num},u),i.allErrors||e.if((0,Qt.not)(u),()=>e.break())})}}};Da.default=CO});var hf=d(Ma=>{"use strict";Object.defineProperty(Ma,"__esModule",{value:!0});var RO=uf(),NO=lf(),qO=[RO.default,NO.default];Ma.default=qO});var df=d(La=>{"use strict";Object.defineProperty(La,"__esModule",{value:!0});var re=T(),jO={message:({schemaCode:r})=>(0,re.str)`must match format "${r}"`,params:({schemaCode:r})=>(0,re._)`{format: ${r}}`},kO={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:jO,code(r,e){let{gen:t,data:s,$data:i,schema:n,schemaCode:o,it:a}=r,{opts:u,errSchemaPath:c,schemaEnv:l,self:h}=a;if(!u.validateFormats)return;i?f():p();function f(){let m=t.scopeValue("formats",{ref:h.formats,code:u.code.formats}),g=t.const("fDef",(0,re._)`${m}[${o}]`),y=t.let("fType"),_=t.let("format");t.if((0,re._)`typeof ${g} == "object" && !(${g} instanceof RegExp)`,()=>t.assign(y,(0,re._)`${g}.type || "string"`).assign(_,(0,re._)`${g}.validate`),()=>t.assign(y,(0,re._)`"string"`).assign(_,g)),r.fail$data((0,re.or)(S(),O()));function S(){return u.strictSchema===!1?re.nil:(0,re._)`${o} && !${_}`}function O(){let E=l.$async?(0,re._)`(${g}.async ? await ${_}(${s}) : ${_}(${s}))`:(0,re._)`${_}(${s})`,$=(0,re._)`(typeof ${_} == "function" ? ${E} : ${_}.test(${s}))`;return(0,re._)`${_} && ${_} !== true && ${y} === ${e} && !${$}`}}function p(){let m=h.formats[n];if(!m){S();return}if(m===!0)return;let[g,y,_]=O(m);g===e&&r.pass(E());function S(){if(u.strictSchema===!1){h.logger.warn($());return}throw new Error($());function $(){return`unknown format "${n}" ignored in schema at path "${c}"`}}function O($){let he=$ instanceof RegExp?(0,re.regexpCode)($):u.code.formats?(0,re._)`${u.code.formats}${(0,re.getProperty)(n)}`:void 0,U=t.scopeValue("formats",{key:n,ref:$,code:he});return typeof $=="object"&&!($ instanceof RegExp)?[$.type||"string",$.validate,(0,re._)`${U}.validate`]:["string",$,U]}function E(){if(typeof m=="object"&&!(m instanceof RegExp)&&m.async){if(!l.$async)throw new Error("async format in sync schema");return(0,re._)`await ${_}(${s})`}return typeof y=="function"?(0,re._)`${_}(${s})`:(0,re._)`${_}.test(${s})`}}}};La.default=kO});var Fa=d(Va=>{"use strict";Object.defineProperty(Va,"__esModule",{value:!0});var DO=df(),MO=[DO.default];Va.default=MO});var Ua=d(vr=>{"use strict";Object.defineProperty(vr,"__esModule",{value:!0});vr.contentVocabulary=vr.metadataVocabulary=void 0;vr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];vr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var pf=d(Ha=>{"use strict";Object.defineProperty(Ha,"__esModule",{value:!0});var LO=Uo(),VO=ia(),FO=Oa(),UO=ef(),HO=of(),GO=hf(),zO=Fa(),ff=Ua(),BO=[UO.default,LO.default,VO.default,(0,FO.default)(!0),zO.default,ff.metadataVocabulary,ff.contentVocabulary,HO.default,GO.default];Ha.default=BO});var gf=d(qi=>{"use strict";Object.defineProperty(qi,"__esModule",{value:!0});qi.DiscrError=void 0;var mf;(function(r){r.Tag="tag",r.Mapping="mapping"})(mf||(qi.DiscrError=mf={}))});var Ba=d(za=>{"use strict";Object.defineProperty(za,"__esModule",{value:!0});var br=T(),Ga=gf(),yf=as(),KO=fr(),WO=R(),YO={message:({params:{discrError:r,tagName:e}})=>r===Ga.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:r,tag:e,tagName:t}})=>(0,br._)`{error: ${r}, tag: ${t}, tagValue: ${e}}`},XO={keyword:"discriminator",type:"object",schemaType:"object",error:YO,code(r){let{gen:e,data:t,schema:s,parentSchema:i,it:n}=r,{oneOf:o}=i;if(!n.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=s.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(s.mapping)throw new Error("discriminator: mapping is not supported");if(!o)throw new Error("discriminator: requires oneOf keyword");let u=e.let("valid",!1),c=e.const("tag",(0,br._)`${t}${(0,br.getProperty)(a)}`);e.if((0,br._)`typeof ${c} == "string"`,()=>l(),()=>r.error(!1,{discrError:Ga.DiscrError.Tag,tag:c,tagName:a})),r.ok(u);function l(){let p=f();e.if(!1);for(let m in p)e.elseIf((0,br._)`${c} === ${m}`),e.assign(u,h(p[m]));e.else(),r.error(!1,{discrError:Ga.DiscrError.Mapping,tag:c,tagName:a}),e.endIf()}function h(p){let m=e.name("valid"),g=r.subschema({keyword:"oneOf",schemaProp:p},m);return r.mergeEvaluated(g,br.Name),m}function f(){var p;let m={},g=_(i),y=!0;for(let E=0;E<o.length;E++){let $=o[E];if($?.$ref&&!(0,WO.schemaHasRulesButRef)($,n.self.RULES)){let U=$.$ref;if($=yf.resolveRef.call(n.self,n.schemaEnv.root,n.baseId,U),$ instanceof yf.SchemaEnv&&($=$.schema),$===void 0)throw new KO.default(n.opts.uriResolver,n.baseId,U)}let he=(p=$?.properties)===null||p===void 0?void 0:p[a];if(typeof he!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);y=y&&(g||_($)),S(he,E)}if(!y)throw new Error(`discriminator: "${a}" must be required`);return m;function _({required:E}){return Array.isArray(E)&&E.includes(a)}function S(E,$){if(E.const)O(E.const,$);else if(E.enum)for(let he of E.enum)O(he,$);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function O(E,$){if(typeof E!="string"||E in m)throw new Error(`discriminator: "${a}" values must be unique strings`);m[E]=$}}}};za.default=XO});var _f=d((Ij,JO)=>{JO.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}}});var vf=d((Cj,ZO)=>{ZO.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}}});var bf=d((Rj,QO)=>{QO.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}}});var wf=d((Nj,e1)=>{e1.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}}});var $f=d((qj,t1)=>{t1.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}}});var Ef=d((jj,r1)=>{r1.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}}});var Sf=d((kj,s1)=>{s1.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}});var Of=d((Dj,i1)=>{i1.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}});var xf=d(Ka=>{"use strict";Object.defineProperty(Ka,"__esModule",{value:!0});var n1=_f(),o1=vf(),a1=bf(),u1=wf(),c1=$f(),l1=Ef(),h1=Sf(),d1=Of(),f1=["/properties"];function p1(r){return[n1,o1,a1,u1,c1,e(this,l1),h1,e(this,d1)].forEach(t=>this.addMetaSchema(t,void 0,!1)),this;function e(t,s){return r?t.$dataMetaSchema(s,f1):s}}Ka.default=p1});var Tf=d((B,Ya)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});B.MissingRefError=B.ValidationError=B.CodeGen=B.Name=B.nil=B.stringify=B.str=B._=B.KeywordCxt=B.Ajv2020=void 0;var m1=Lo(),g1=pf(),y1=Ba(),_1=xf(),Wa="https://json-schema.org/draft/2020-12/schema",wr=class extends m1.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),g1.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(y1.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:t}=this.opts;t&&(_1.default.call(this,e),this.refs["http://json-schema.org/schema"]=Wa)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Wa)?Wa:void 0)}};B.Ajv2020=wr;Ya.exports=B=wr;Ya.exports.Ajv2020=wr;Object.defineProperty(B,"__esModule",{value:!0});B.default=wr;var v1=dr();Object.defineProperty(B,"KeywordCxt",{enumerable:!0,get:function(){return v1.KeywordCxt}});var $r=T();Object.defineProperty(B,"_",{enumerable:!0,get:function(){return $r._}});Object.defineProperty(B,"str",{enumerable:!0,get:function(){return $r.str}});Object.defineProperty(B,"stringify",{enumerable:!0,get:function(){return $r.stringify}});Object.defineProperty(B,"nil",{enumerable:!0,get:function(){return $r.nil}});Object.defineProperty(B,"Name",{enumerable:!0,get:function(){return $r.Name}});Object.defineProperty(B,"CodeGen",{enumerable:!0,get:function(){return $r.CodeGen}});var b1=os();Object.defineProperty(B,"ValidationError",{enumerable:!0,get:function(){return b1.default}});var w1=fr();Object.defineProperty(B,"MissingRefError",{enumerable:!0,get:function(){return w1.default}})});var jf=d(tt=>{"use strict";Object.defineProperty(tt,"__esModule",{value:!0});tt.formatNames=tt.fastFormats=tt.fullFormats=void 0;function et(r,e){return{validate:r,compare:e}}tt.fullFormats={date:et(Cf,Qa),time:et(Ja(!0),eu),"date-time":et(Pf(!0),Nf),"iso-time":et(Ja(),Rf),"iso-date-time":et(Pf(),qf),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:T1,"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:q1,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:P1,int32:{type:"number",validate:C1},int64:{type:"number",validate:R1},float:{type:"number",validate:If},double:{type:"number",validate:If},password:!0,binary:!0};tt.fastFormats={...tt.fullFormats,date:et(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Qa),time:et(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,eu),"date-time":et(/^\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,Nf),"iso-time":et(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Rf),"iso-date-time":et(/^\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,qf),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};tt.formatNames=Object.keys(tt.fullFormats);function $1(r){return r%4===0&&(r%100!==0||r%400===0)}var E1=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,S1=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Cf(r){let e=E1.exec(r);if(!e)return!1;let t=+e[1],s=+e[2],i=+e[3];return s>=1&&s<=12&&i>=1&&i<=(s===2&&$1(t)?29:S1[s])}function Qa(r,e){if(r&&e)return r>e?1:r<e?-1:0}var Xa=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Ja(r){return function(t){let s=Xa.exec(t);if(!s)return!1;let i=+s[1],n=+s[2],o=+s[3],a=s[4],u=s[5]==="-"?-1:1,c=+(s[6]||0),l=+(s[7]||0);if(c>23||l>59||r&&!a)return!1;if(i<=23&&n<=59&&o<60)return!0;let h=n-l*u,f=i-c*u-(h<0?1:0);return(f===23||f===-1)&&(h===59||h===-1)&&o<61}}function eu(r,e){if(!(r&&e))return;let t=new Date("2020-01-01T"+r).valueOf(),s=new Date("2020-01-01T"+e).valueOf();if(t&&s)return t-s}function Rf(r,e){if(!(r&&e))return;let t=Xa.exec(r),s=Xa.exec(e);if(t&&s)return r=t[1]+t[2]+t[3],e=s[1]+s[2]+s[3],r>e?1:r<e?-1:0}var Za=/t|\s/i;function Pf(r){let e=Ja(r);return function(s){let i=s.split(Za);return i.length===2&&Cf(i[0])&&e(i[1])}}function Nf(r,e){if(!(r&&e))return;let t=new Date(r).valueOf(),s=new Date(e).valueOf();if(t&&s)return t-s}function qf(r,e){if(!(r&&e))return;let[t,s]=r.split(Za),[i,n]=e.split(Za),o=Qa(t,i);if(o!==void 0)return o||eu(s,n)}var O1=/\/|:/,x1=/^(?:[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 T1(r){return O1.test(r)&&x1.test(r)}var Af=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function P1(r){return Af.lastIndex=0,Af.test(r)}var A1=-(2**31),I1=2**31-1;function C1(r){return Number.isInteger(r)&&r<=I1&&r>=A1}function R1(r){return Number.isInteger(r)}function If(){return!0}var N1=/[^\\]\\Z/;function q1(r){if(N1.test(r))return!1;try{return new RegExp(r),!0}catch{return!1}}});var Df=d(tu=>{"use strict";Object.defineProperty(tu,"__esModule",{value:!0});var j1=Uo(),k1=ia(),D1=Oa(),M1=Fa(),kf=Ua(),L1=[j1.default,k1.default,(0,D1.default)(),M1.default,kf.metadataVocabulary,kf.contentVocabulary];tu.default=L1});var Mf=d((Fj,V1)=>{V1.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var Vf=d((K,ru)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0});K.MissingRefError=K.ValidationError=K.CodeGen=K.Name=K.nil=K.stringify=K.str=K._=K.KeywordCxt=K.Ajv=void 0;var F1=Lo(),U1=Df(),H1=Ba(),Lf=Mf(),G1=["/properties"],ji="http://json-schema.org/draft-07/schema",Er=class extends F1.default{_addVocabularies(){super._addVocabularies(),U1.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(H1.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(Lf,G1):Lf;this.addMetaSchema(e,ji,!1),this.refs["http://json-schema.org/schema"]=ji}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(ji)?ji:void 0)}};K.Ajv=Er;ru.exports=K=Er;ru.exports.Ajv=Er;Object.defineProperty(K,"__esModule",{value:!0});K.default=Er;var z1=dr();Object.defineProperty(K,"KeywordCxt",{enumerable:!0,get:function(){return z1.KeywordCxt}});var Sr=T();Object.defineProperty(K,"_",{enumerable:!0,get:function(){return Sr._}});Object.defineProperty(K,"str",{enumerable:!0,get:function(){return Sr.str}});Object.defineProperty(K,"stringify",{enumerable:!0,get:function(){return Sr.stringify}});Object.defineProperty(K,"nil",{enumerable:!0,get:function(){return Sr.nil}});Object.defineProperty(K,"Name",{enumerable:!0,get:function(){return Sr.Name}});Object.defineProperty(K,"CodeGen",{enumerable:!0,get:function(){return Sr.CodeGen}});var B1=os();Object.defineProperty(K,"ValidationError",{enumerable:!0,get:function(){return B1.default}});var K1=fr();Object.defineProperty(K,"MissingRefError",{enumerable:!0,get:function(){return K1.default}})});var Ff=d(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.formatLimitDefinition=void 0;var W1=Vf(),Ge=T(),Nt=Ge.operators,ki={formatMaximum:{okStr:"<=",ok:Nt.LTE,fail:Nt.GT},formatMinimum:{okStr:">=",ok:Nt.GTE,fail:Nt.LT},formatExclusiveMaximum:{okStr:"<",ok:Nt.LT,fail:Nt.GTE},formatExclusiveMinimum:{okStr:">",ok:Nt.GT,fail:Nt.LTE}},Y1={message:({keyword:r,schemaCode:e})=>(0,Ge.str)`should be ${ki[r].okStr} ${e}`,params:({keyword:r,schemaCode:e})=>(0,Ge._)`{comparison: ${ki[r].okStr}, limit: ${e}}`};Or.formatLimitDefinition={keyword:Object.keys(ki),type:"string",schemaType:"string",$data:!0,error:Y1,code(r){let{gen:e,data:t,schemaCode:s,keyword:i,it:n}=r,{opts:o,self:a}=n;if(!o.validateFormats)return;let u=new W1.KeywordCxt(n,a.RULES.all.format.definition,"format");u.$data?c():l();function c(){let f=e.scopeValue("formats",{ref:a.formats,code:o.code.formats}),p=e.const("fmt",(0,Ge._)`${f}[${u.schemaCode}]`);r.fail$data((0,Ge.or)((0,Ge._)`typeof ${p} != "object"`,(0,Ge._)`${p} instanceof RegExp`,(0,Ge._)`typeof ${p}.compare != "function"`,h(p)))}function l(){let f=u.schema,p=a.formats[f];if(!p||p===!0)return;if(typeof p!="object"||p instanceof RegExp||typeof p.compare!="function")throw new Error(`"${i}": format "${f}" does not define "compare" function`);let m=e.scopeValue("formats",{key:f,ref:p,code:o.code.formats?(0,Ge._)`${o.code.formats}${(0,Ge.getProperty)(f)}`:void 0});r.fail$data(h(m))}function h(f){return(0,Ge._)`${f}.compare(${t}, ${s}) ${ki[i].fail} 0`}},dependencies:["format"]};var X1=r=>(r.addKeyword(Or.formatLimitDefinition),r);Or.default=X1});var zf=d((Es,Gf)=>{"use strict";Object.defineProperty(Es,"__esModule",{value:!0});var xr=jf(),J1=Ff(),su=T(),Uf=new su.Name("fullFormats"),Z1=new su.Name("fastFormats"),iu=(r,e={keywords:!0})=>{if(Array.isArray(e))return Hf(r,e,xr.fullFormats,Uf),r;let[t,s]=e.mode==="fast"?[xr.fastFormats,Z1]:[xr.fullFormats,Uf],i=e.formats||xr.formatNames;return Hf(r,i,t,s),e.keywords&&(0,J1.default)(r),r};iu.get=(r,e="full")=>{let s=(e==="fast"?xr.fastFormats:xr.fullFormats)[r];if(!s)throw new Error(`Unknown format "${r}"`);return s};function Hf(r,e,t,s){var i,n;(i=(n=r.opts.code).formats)!==null&&i!==void 0||(n.formats=(0,su._)`require("ajv-formats/dist/formats").${s}`);for(let o of e)r.addFormat(o,t[o])}Gf.exports=Es=iu;Object.defineProperty(Es,"__esModule",{value:!0});Es.default=iu});var Tr=d((Bj,Bf)=>{"use strict";var ax="2.0.0",ux=Number.MAX_SAFE_INTEGER||9007199254740991,cx=16,lx=250,hx=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Bf.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:cx,MAX_SAFE_BUILD_LENGTH:lx,MAX_SAFE_INTEGER:ux,RELEASE_TYPES:hx,SEMVER_SPEC_VERSION:ax,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Ss=d((Kj,Kf)=>{"use strict";var dx=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};Kf.exports=dx});var Pr=d((rt,Wf)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:au,MAX_SAFE_BUILD_LENGTH:fx,MAX_LENGTH:px}=Tr(),mx=Ss();rt=Wf.exports={};var gx=rt.re=[],yx=rt.safeRe=[],v=rt.src=[],_x=rt.safeSrc=[],b=rt.t={},vx=0,uu="[a-zA-Z0-9-]",bx=[["\\s",1],["\\d",px],[uu,fx]],wx=r=>{for(let[e,t]of bx)r=r.split(`${e}*`).join(`${e}{0,${t}}`).split(`${e}+`).join(`${e}{1,${t}}`);return r},P=(r,e,t)=>{let s=wx(e),i=vx++;mx(r,i,e),b[r]=i,v[i]=e,_x[i]=s,gx[i]=new RegExp(e,t?"g":void 0),yx[i]=new RegExp(s,t?"g":void 0)};P("NUMERICIDENTIFIER","0|[1-9]\\d*");P("NUMERICIDENTIFIERLOOSE","\\d+");P("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${uu}*`);P("MAINVERSION",`(${v[b.NUMERICIDENTIFIER]})\\.(${v[b.NUMERICIDENTIFIER]})\\.(${v[b.NUMERICIDENTIFIER]})`);P("MAINVERSIONLOOSE",`(${v[b.NUMERICIDENTIFIERLOOSE]})\\.(${v[b.NUMERICIDENTIFIERLOOSE]})\\.(${v[b.NUMERICIDENTIFIERLOOSE]})`);P("PRERELEASEIDENTIFIER",`(?:${v[b.NONNUMERICIDENTIFIER]}|${v[b.NUMERICIDENTIFIER]})`);P("PRERELEASEIDENTIFIERLOOSE",`(?:${v[b.NONNUMERICIDENTIFIER]}|${v[b.NUMERICIDENTIFIERLOOSE]})`);P("PRERELEASE",`(?:-(${v[b.PRERELEASEIDENTIFIER]}(?:\\.${v[b.PRERELEASEIDENTIFIER]})*))`);P("PRERELEASELOOSE",`(?:-?(${v[b.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${v[b.PRERELEASEIDENTIFIERLOOSE]})*))`);P("BUILDIDENTIFIER",`${uu}+`);P("BUILD",`(?:\\+(${v[b.BUILDIDENTIFIER]}(?:\\.${v[b.BUILDIDENTIFIER]})*))`);P("FULLPLAIN",`v?${v[b.MAINVERSION]}${v[b.PRERELEASE]}?${v[b.BUILD]}?`);P("FULL",`^${v[b.FULLPLAIN]}$`);P("LOOSEPLAIN",`[v=\\s]*${v[b.MAINVERSIONLOOSE]}${v[b.PRERELEASELOOSE]}?${v[b.BUILD]}?`);P("LOOSE",`^${v[b.LOOSEPLAIN]}$`);P("GTLT","((?:<|>)?=?)");P("XRANGEIDENTIFIERLOOSE",`${v[b.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);P("XRANGEIDENTIFIER",`${v[b.NUMERICIDENTIFIER]}|x|X|\\*`);P("XRANGEPLAIN",`[v=\\s]*(${v[b.XRANGEIDENTIFIER]})(?:\\.(${v[b.XRANGEIDENTIFIER]})(?:\\.(${v[b.XRANGEIDENTIFIER]})(?:${v[b.PRERELEASE]})?${v[b.BUILD]}?)?)?`);P("XRANGEPLAINLOOSE",`[v=\\s]*(${v[b.XRANGEIDENTIFIERLOOSE]})(?:\\.(${v[b.XRANGEIDENTIFIERLOOSE]})(?:\\.(${v[b.XRANGEIDENTIFIERLOOSE]})(?:${v[b.PRERELEASELOOSE]})?${v[b.BUILD]}?)?)?`);P("XRANGE",`^${v[b.GTLT]}\\s*${v[b.XRANGEPLAIN]}$`);P("XRANGELOOSE",`^${v[b.GTLT]}\\s*${v[b.XRANGEPLAINLOOSE]}$`);P("COERCEPLAIN",`(^|[^\\d])(\\d{1,${au}})(?:\\.(\\d{1,${au}}))?(?:\\.(\\d{1,${au}}))?`);P("COERCE",`${v[b.COERCEPLAIN]}(?:$|[^\\d])`);P("COERCEFULL",v[b.COERCEPLAIN]+`(?:${v[b.PRERELEASE]})?(?:${v[b.BUILD]})?(?:$|[^\\d])`);P("COERCERTL",v[b.COERCE],!0);P("COERCERTLFULL",v[b.COERCEFULL],!0);P("LONETILDE","(?:~>?)");P("TILDETRIM",`(\\s*)${v[b.LONETILDE]}\\s+`,!0);rt.tildeTrimReplace="$1~";P("TILDE",`^${v[b.LONETILDE]}${v[b.XRANGEPLAIN]}$`);P("TILDELOOSE",`^${v[b.LONETILDE]}${v[b.XRANGEPLAINLOOSE]}$`);P("LONECARET","(?:\\^)");P("CARETTRIM",`(\\s*)${v[b.LONECARET]}\\s+`,!0);rt.caretTrimReplace="$1^";P("CARET",`^${v[b.LONECARET]}${v[b.XRANGEPLAIN]}$`);P("CARETLOOSE",`^${v[b.LONECARET]}${v[b.XRANGEPLAINLOOSE]}$`);P("COMPARATORLOOSE",`^${v[b.GTLT]}\\s*(${v[b.LOOSEPLAIN]})$|^$`);P("COMPARATOR",`^${v[b.GTLT]}\\s*(${v[b.FULLPLAIN]})$|^$`);P("COMPARATORTRIM",`(\\s*)${v[b.GTLT]}\\s*(${v[b.LOOSEPLAIN]}|${v[b.XRANGEPLAIN]})`,!0);rt.comparatorTrimReplace="$1$2$3";P("HYPHENRANGE",`^\\s*(${v[b.XRANGEPLAIN]})\\s+-\\s+(${v[b.XRANGEPLAIN]})\\s*$`);P("HYPHENRANGELOOSE",`^\\s*(${v[b.XRANGEPLAINLOOSE]})\\s+-\\s+(${v[b.XRANGEPLAINLOOSE]})\\s*$`);P("STAR","(<|>)?=?\\s*\\*");P("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");P("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Di=d((Wj,Yf)=>{"use strict";var $x=Object.freeze({loose:!0}),Ex=Object.freeze({}),Sx=r=>r?typeof r!="object"?$x:r:Ex;Yf.exports=Sx});var cu=d((Yj,Zf)=>{"use strict";var Xf=/^[0-9]+$/,Jf=(r,e)=>{if(typeof r=="number"&&typeof e=="number")return r===e?0:r<e?-1:1;let t=Xf.test(r),s=Xf.test(e);return t&&s&&(r=+r,e=+e),r===e?0:t&&!s?-1:s&&!t?1:r<e?-1:1},Ox=(r,e)=>Jf(e,r);Zf.exports={compareIdentifiers:Jf,rcompareIdentifiers:Ox}});var ue=d((Xj,ep)=>{"use strict";var Mi=Ss(),{MAX_LENGTH:Qf,MAX_SAFE_INTEGER:Li}=Tr(),{safeRe:Vi,t:Fi}=Pr(),xx=Di(),{compareIdentifiers:lu}=cu(),hu=class r{constructor(e,t){if(t=xx(t),e instanceof r){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Qf)throw new TypeError(`version is longer than ${Qf} characters`);Mi("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let s=e.trim().match(t.loose?Vi[Fi.LOOSE]:Vi[Fi.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>Li||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Li||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Li||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let n=+i;if(n>=0&&n<Li)return n}return i}):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(Mi("SemVer.compare",this.version,this.options,e),!(e instanceof r)){if(typeof e=="string"&&e===this.version)return 0;e=new r(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof r||(e=new r(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(e){if(e instanceof r||(e=new r(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let s=this.prerelease[t],i=e.prerelease[t];if(Mi("prerelease compare",t,s,i),s===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(s===void 0)return-1;if(s===i)continue;return lu(s,i)}while(++t)}compareBuild(e){e instanceof r||(e=new r(e,this.options));let t=0;do{let s=this.build[t],i=e.build[t];if(Mi("build compare",t,s,i),s===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(s===void 0)return-1;if(s===i)continue;return lu(s,i)}while(++t)}inc(e,t,s){if(e.startsWith("pre")){if(!t&&s===!1)throw new Error("invalid increment argument: identifier is empty");if(t){let i=`-${t}`.match(this.options.loose?Vi[Fi.PRERELEASELOOSE]:Vi[Fi.PRERELEASE]);if(!i||i[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,s);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,s);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,s),this.inc("pre",t,s);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t,s),this.inc("pre",t,s);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let i=Number(s)?1:0;if(this.prerelease.length===0)this.prerelease=[i];else{let n=this.prerelease.length;for(;--n>=0;)typeof this.prerelease[n]=="number"&&(this.prerelease[n]++,n=-2);if(n===-1){if(t===this.prerelease.join(".")&&s===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(t){let n=[t,i];s===!1&&(n=[t]),lu(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};ep.exports=hu});var qt=d((Jj,rp)=>{"use strict";var tp=ue(),Tx=(r,e,t=!1)=>{if(r instanceof tp)return r;try{return new tp(r,e)}catch(s){if(!t)return null;throw s}};rp.exports=Tx});var ip=d((Zj,sp)=>{"use strict";var Px=qt(),Ax=(r,e)=>{let t=Px(r,e);return t?t.version:null};sp.exports=Ax});var op=d((Qj,np)=>{"use strict";var Ix=qt(),Cx=(r,e)=>{let t=Ix(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};np.exports=Cx});var cp=d((ek,up)=>{"use strict";var ap=ue(),Rx=(r,e,t,s,i)=>{typeof t=="string"&&(i=s,s=t,t=void 0);try{return new ap(r instanceof ap?r.version:r,t).inc(e,s,i).version}catch{return null}};up.exports=Rx});var dp=d((tk,hp)=>{"use strict";var lp=qt(),Nx=(r,e)=>{let t=lp(r,null,!0),s=lp(e,null,!0),i=t.compare(s);if(i===0)return null;let n=i>0,o=n?t:s,a=n?s:t,u=!!o.prerelease.length;if(!!a.prerelease.length&&!u){if(!a.patch&&!a.minor)return"major";if(a.compareMain(o)===0)return a.minor&&!a.patch?"minor":"patch"}let l=u?"pre":"";return t.major!==s.major?l+"major":t.minor!==s.minor?l+"minor":t.patch!==s.patch?l+"patch":"prerelease"};hp.exports=Nx});var pp=d((rk,fp)=>{"use strict";var qx=ue(),jx=(r,e)=>new qx(r,e).major;fp.exports=jx});var gp=d((sk,mp)=>{"use strict";var kx=ue(),Dx=(r,e)=>new kx(r,e).minor;mp.exports=Dx});var _p=d((ik,yp)=>{"use strict";var Mx=ue(),Lx=(r,e)=>new Mx(r,e).patch;yp.exports=Lx});var bp=d((nk,vp)=>{"use strict";var Vx=qt(),Fx=(r,e)=>{let t=Vx(r,e);return t&&t.prerelease.length?t.prerelease:null};vp.exports=Fx});var Ne=d((ok,$p)=>{"use strict";var wp=ue(),Ux=(r,e,t)=>new wp(r,t).compare(new wp(e,t));$p.exports=Ux});var Sp=d((ak,Ep)=>{"use strict";var Hx=Ne(),Gx=(r,e,t)=>Hx(e,r,t);Ep.exports=Gx});var xp=d((uk,Op)=>{"use strict";var zx=Ne(),Bx=(r,e)=>zx(r,e,!0);Op.exports=Bx});var Ui=d((ck,Pp)=>{"use strict";var Tp=ue(),Kx=(r,e,t)=>{let s=new Tp(r,t),i=new Tp(e,t);return s.compare(i)||s.compareBuild(i)};Pp.exports=Kx});var Ip=d((lk,Ap)=>{"use strict";var Wx=Ui(),Yx=(r,e)=>r.sort((t,s)=>Wx(t,s,e));Ap.exports=Yx});var Rp=d((hk,Cp)=>{"use strict";var Xx=Ui(),Jx=(r,e)=>r.sort((t,s)=>Xx(s,t,e));Cp.exports=Jx});var Os=d((dk,Np)=>{"use strict";var Zx=Ne(),Qx=(r,e,t)=>Zx(r,e,t)>0;Np.exports=Qx});var Hi=d((fk,qp)=>{"use strict";var eT=Ne(),tT=(r,e,t)=>eT(r,e,t)<0;qp.exports=tT});var du=d((pk,jp)=>{"use strict";var rT=Ne(),sT=(r,e,t)=>rT(r,e,t)===0;jp.exports=sT});var fu=d((mk,kp)=>{"use strict";var iT=Ne(),nT=(r,e,t)=>iT(r,e,t)!==0;kp.exports=nT});var Gi=d((gk,Dp)=>{"use strict";var oT=Ne(),aT=(r,e,t)=>oT(r,e,t)>=0;Dp.exports=aT});var zi=d((yk,Mp)=>{"use strict";var uT=Ne(),cT=(r,e,t)=>uT(r,e,t)<=0;Mp.exports=cT});var pu=d((_k,Lp)=>{"use strict";var lT=du(),hT=fu(),dT=Os(),fT=Gi(),pT=Hi(),mT=zi(),gT=(r,e,t,s)=>{switch(e){case"===":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r===t;case"!==":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r!==t;case"":case"=":case"==":return lT(r,t,s);case"!=":return hT(r,t,s);case">":return dT(r,t,s);case">=":return fT(r,t,s);case"<":return pT(r,t,s);case"<=":return mT(r,t,s);default:throw new TypeError(`Invalid operator: ${e}`)}};Lp.exports=gT});var Fp=d((vk,Vp)=>{"use strict";var yT=ue(),_T=qt(),{safeRe:Bi,t:Ki}=Pr(),vT=(r,e)=>{if(r instanceof yT)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;e=e||{};let t=null;if(!e.rtl)t=r.match(e.includePrerelease?Bi[Ki.COERCEFULL]:Bi[Ki.COERCE]);else{let u=e.includePrerelease?Bi[Ki.COERCERTLFULL]:Bi[Ki.COERCERTL],c;for(;(c=u.exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||c.index+c[0].length!==t.index+t[0].length)&&(t=c),u.lastIndex=c.index+c[1].length+c[2].length;u.lastIndex=-1}if(t===null)return null;let s=t[2],i=t[3]||"0",n=t[4]||"0",o=e.includePrerelease&&t[5]?`-${t[5]}`:"",a=e.includePrerelease&&t[6]?`+${t[6]}`:"";return _T(`${s}.${i}.${n}${o}${a}`,e)};Vp.exports=vT});var Hp=d((bk,Up)=>{"use strict";var bT=qt(),wT=Tr(),$T=ue(),ET=(r,e,t)=>{if(!wT.RELEASE_TYPES.includes(e))return null;let s=ST(r,t);return s&&OT(s,e)},ST=(r,e)=>{let t=r instanceof $T?r.version:r;return bT(t,e)},OT=(r,e)=>{if(xT(e))return r.version;switch(r.prerelease=[],e){case"major":r.minor=0,r.patch=0;break;case"minor":r.patch=0;break}return r.format()},xT=r=>r.startsWith("pre");Up.exports=ET});var zp=d((wk,Gp)=>{"use strict";var mu=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let i=this.map.keys().next().value;this.delete(i)}this.map.set(e,t)}return this}};Gp.exports=mu});var qe=d(($k,Yp)=>{"use strict";var TT=/\s+/g,gu=class r{constructor(e,t){if(t=AT(t),e instanceof r)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new r(e.raw,t);if(e instanceof yu)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(TT," "),this.set=this.raw.split("||").map(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter(i=>!Kp(i[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&MT(i[0])){this.set=[i];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let t=this.set[e];for(let s=0;s<t.length;s++)s>0&&(this.formatted+=" "),this.formatted+=t[s].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){e=e.replace(DT,"");let s=((this.options.includePrerelease&&jT)|(this.options.loose&&kT))+":"+e,i=Bp.get(s);if(i)return i;let n=this.options.loose,o=n?ye[ce.HYPHENRANGELOOSE]:ye[ce.HYPHENRANGE];e=e.replace(o,WT(this.options.includePrerelease)),W("hyphen replace",e),e=e.replace(ye[ce.COMPARATORTRIM],RT),W("comparator trim",e),e=e.replace(ye[ce.TILDETRIM],NT),W("tilde trim",e),e=e.replace(ye[ce.CARETTRIM],qT),W("caret trim",e);let a=e.split(" ").map(h=>LT(h,this.options)).join(" ").split(/\s+/).map(h=>KT(h,this.options));n&&(a=a.filter(h=>(W("loose invalid filter",h,this.options),!!h.match(ye[ce.COMPARATORLOOSE])))),W("range list",a);let u=new Map,c=a.map(h=>new yu(h,this.options));for(let h of c){if(Kp(h))return[h];u.set(h.value,h)}u.size>1&&u.has("")&&u.delete("");let l=[...u.values()];return Bp.set(s,l),l}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Range is required");return this.set.some(s=>Wp(s,t)&&e.set.some(i=>Wp(i,t)&&s.every(n=>i.every(o=>n.intersects(o,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new IT(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(YT(this.set[t],e,this.options))return!0;return!1}};Yp.exports=gu;var PT=zp(),Bp=new PT,AT=Di(),yu=xs(),W=Ss(),IT=ue(),{safeRe:ye,src:CT,t:ce,comparatorTrimReplace:RT,tildeTrimReplace:NT,caretTrimReplace:qT}=Pr(),{FLAG_INCLUDE_PRERELEASE:jT,FLAG_LOOSE:kT}=Tr(),DT=new RegExp(CT[ce.BUILD],"g"),Kp=r=>r.value==="<0.0.0-0",MT=r=>r.value==="",Wp=(r,e)=>{let t=!0,s=r.slice(),i=s.pop();for(;t&&s.length;)t=s.every(n=>i.intersects(n,e)),i=s.pop();return t},LT=(r,e)=>(r=r.replace(ye[ce.BUILD],""),W("comp",r,e),r=UT(r,e),W("caret",r),r=VT(r,e),W("tildes",r),r=GT(r,e),W("xrange",r),r=BT(r,e),W("stars",r),r),_e=r=>!r||r.toLowerCase()==="x"||r==="*",VT=(r,e)=>r.trim().split(/\s+/).map(t=>FT(t,e)).join(" "),FT=(r,e)=>{let t=e.loose?ye[ce.TILDELOOSE]:ye[ce.TILDE];return r.replace(t,(s,i,n,o,a)=>{W("tilde",r,s,i,n,o,a);let u;return _e(i)?u="":_e(n)?u=`>=${i}.0.0 <${+i+1}.0.0-0`:_e(o)?u=`>=${i}.${n}.0 <${i}.${+n+1}.0-0`:a?(W("replaceTilde pr",a),u=`>=${i}.${n}.${o}-${a} <${i}.${+n+1}.0-0`):u=`>=${i}.${n}.${o} <${i}.${+n+1}.0-0`,W("tilde return",u),u})},UT=(r,e)=>r.trim().split(/\s+/).map(t=>HT(t,e)).join(" "),HT=(r,e)=>{W("caret",r,e);let t=e.loose?ye[ce.CARETLOOSE]:ye[ce.CARET],s=e.includePrerelease?"-0":"";return r.replace(t,(i,n,o,a,u)=>{W("caret",r,i,n,o,a,u);let c;return _e(n)?c="":_e(o)?c=`>=${n}.0.0${s} <${+n+1}.0.0-0`:_e(a)?n==="0"?c=`>=${n}.${o}.0${s} <${n}.${+o+1}.0-0`:c=`>=${n}.${o}.0${s} <${+n+1}.0.0-0`:u?(W("replaceCaret pr",u),n==="0"?o==="0"?c=`>=${n}.${o}.${a}-${u} <${n}.${o}.${+a+1}-0`:c=`>=${n}.${o}.${a}-${u} <${n}.${+o+1}.0-0`:c=`>=${n}.${o}.${a}-${u} <${+n+1}.0.0-0`):(W("no pr"),n==="0"?o==="0"?c=`>=${n}.${o}.${a}${s} <${n}.${o}.${+a+1}-0`:c=`>=${n}.${o}.${a}${s} <${n}.${+o+1}.0-0`:c=`>=${n}.${o}.${a} <${+n+1}.0.0-0`),W("caret return",c),c})},GT=(r,e)=>(W("replaceXRanges",r,e),r.split(/\s+/).map(t=>zT(t,e)).join(" ")),zT=(r,e)=>{r=r.trim();let t=e.loose?ye[ce.XRANGELOOSE]:ye[ce.XRANGE];return r.replace(t,(s,i,n,o,a,u)=>{W("xRange",r,s,i,n,o,a,u);let c=_e(n),l=c||_e(o),h=l||_e(a),f=h;return i==="="&&f&&(i=""),u=e.includePrerelease?"-0":"",c?i===">"||i==="<"?s="<0.0.0-0":s="*":i&&f?(l&&(o=0),a=0,i===">"?(i=">=",l?(n=+n+1,o=0,a=0):(o=+o+1,a=0)):i==="<="&&(i="<",l?n=+n+1:o=+o+1),i==="<"&&(u="-0"),s=`${i+n}.${o}.${a}${u}`):l?s=`>=${n}.0.0${u} <${+n+1}.0.0-0`:h&&(s=`>=${n}.${o}.0${u} <${n}.${+o+1}.0-0`),W("xRange return",s),s})},BT=(r,e)=>(W("replaceStars",r,e),r.trim().replace(ye[ce.STAR],"")),KT=(r,e)=>(W("replaceGTE0",r,e),r.trim().replace(ye[e.includePrerelease?ce.GTE0PRE:ce.GTE0],"")),WT=r=>(e,t,s,i,n,o,a,u,c,l,h,f)=>(_e(s)?t="":_e(i)?t=`>=${s}.0.0${r?"-0":""}`:_e(n)?t=`>=${s}.${i}.0${r?"-0":""}`:o?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,_e(c)?u="":_e(l)?u=`<${+c+1}.0.0-0`:_e(h)?u=`<${c}.${+l+1}.0-0`:f?u=`<=${c}.${l}.${h}-${f}`:r?u=`<${c}.${l}.${+h+1}-0`:u=`<=${u}`,`${t} ${u}`.trim()),YT=(r,e,t)=>{for(let s=0;s<r.length;s++)if(!r[s].test(e))return!1;if(e.prerelease.length&&!t.includePrerelease){for(let s=0;s<r.length;s++)if(W(r[s].semver),r[s].semver!==yu.ANY&&r[s].semver.prerelease.length>0){let i=r[s].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var xs=d((Ek,tm)=>{"use strict";var Ts=Symbol("SemVer ANY"),bu=class r{static get ANY(){return Ts}constructor(e,t){if(t=Xp(t),e instanceof r){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),vu("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===Ts?this.value="":this.value=this.operator+this.semver.version,vu("comp",this)}parse(e){let t=this.options.loose?Jp[Zp.COMPARATORLOOSE]:Jp[Zp.COMPARATOR],s=e.match(t);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=s[1]!==void 0?s[1]:"",this.operator==="="&&(this.operator=""),s[2]?this.semver=new Qp(s[2],this.options.loose):this.semver=Ts}toString(){return this.value}test(e){if(vu("Comparator.test",e,this.options.loose),this.semver===Ts||e===Ts)return!0;if(typeof e=="string")try{e=new Qp(e,this.options)}catch{return!1}return _u(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new em(e.value,t).test(this.value):e.operator===""?e.value===""?!0:new em(this.value,t).test(e.semver):(t=Xp(t),t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||_u(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||_u(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};tm.exports=bu;var Xp=Di(),{safeRe:Jp,t:Zp}=Pr(),_u=pu(),vu=Ss(),Qp=ue(),em=qe()});var Ps=d((Sk,rm)=>{"use strict";var XT=qe(),JT=(r,e,t)=>{try{e=new XT(e,t)}catch{return!1}return e.test(r)};rm.exports=JT});var im=d((Ok,sm)=>{"use strict";var ZT=qe(),QT=(r,e)=>new ZT(r,e).set.map(t=>t.map(s=>s.value).join(" ").trim().split(" "));sm.exports=QT});var om=d((xk,nm)=>{"use strict";var eP=ue(),tP=qe(),rP=(r,e,t)=>{let s=null,i=null,n=null;try{n=new tP(e,t)}catch{return null}return r.forEach(o=>{n.test(o)&&(!s||i.compare(o)===-1)&&(s=o,i=new eP(s,t))}),s};nm.exports=rP});var um=d((Tk,am)=>{"use strict";var sP=ue(),iP=qe(),nP=(r,e,t)=>{let s=null,i=null,n=null;try{n=new iP(e,t)}catch{return null}return r.forEach(o=>{n.test(o)&&(!s||i.compare(o)===1)&&(s=o,i=new sP(s,t))}),s};am.exports=nP});var hm=d((Pk,lm)=>{"use strict";var wu=ue(),oP=qe(),cm=Os(),aP=(r,e)=>{r=new oP(r,e);let t=new wu("0.0.0");if(r.test(t)||(t=new wu("0.0.0-0"),r.test(t)))return t;t=null;for(let s=0;s<r.set.length;++s){let i=r.set[s],n=null;i.forEach(o=>{let a=new wu(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!n||cm(a,n))&&(n=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),n&&(!t||cm(t,n))&&(t=n)}return t&&r.test(t)?t:null};lm.exports=aP});var fm=d((Ak,dm)=>{"use strict";var uP=qe(),cP=(r,e)=>{try{return new uP(r,e).range||"*"}catch{return null}};dm.exports=cP});var Wi=d((Ik,ym)=>{"use strict";var lP=ue(),gm=xs(),{ANY:hP}=gm,dP=qe(),fP=Ps(),pm=Os(),mm=Hi(),pP=zi(),mP=Gi(),gP=(r,e,t,s)=>{r=new lP(r,s),e=new dP(e,s);let i,n,o,a,u;switch(t){case">":i=pm,n=pP,o=mm,a=">",u=">=";break;case"<":i=mm,n=mP,o=pm,a="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(fP(r,e,s))return!1;for(let c=0;c<e.set.length;++c){let l=e.set[c],h=null,f=null;if(l.forEach(p=>{p.semver===hP&&(p=new gm(">=0.0.0")),h=h||p,f=f||p,i(p.semver,h.semver,s)?h=p:o(p.semver,f.semver,s)&&(f=p)}),h.operator===a||h.operator===u||(!f.operator||f.operator===a)&&n(r,f.semver))return!1;if(f.operator===u&&o(r,f.semver))return!1}return!0};ym.exports=gP});var vm=d((Ck,_m)=>{"use strict";var yP=Wi(),_P=(r,e,t)=>yP(r,e,">",t);_m.exports=_P});var wm=d((Rk,bm)=>{"use strict";var vP=Wi(),bP=(r,e,t)=>vP(r,e,"<",t);bm.exports=bP});var Sm=d((Nk,Em)=>{"use strict";var $m=qe(),wP=(r,e,t)=>(r=new $m(r,t),e=new $m(e,t),r.intersects(e,t));Em.exports=wP});var xm=d((qk,Om)=>{"use strict";var $P=Ps(),EP=Ne();Om.exports=(r,e,t)=>{let s=[],i=null,n=null,o=r.sort((l,h)=>EP(l,h,t));for(let l of o)$P(l,e,t)?(n=l,i||(i=l)):(n&&s.push([i,n]),n=null,i=null);i&&s.push([i,null]);let a=[];for(let[l,h]of s)l===h?a.push(l):!h&&l===o[0]?a.push("*"):h?l===o[0]?a.push(`<=${h}`):a.push(`${l} - ${h}`):a.push(`>=${l}`);let u=a.join(" || "),c=typeof e.raw=="string"?e.raw:String(e);return u.length<c.length?u:e}});var Rm=d((jk,Cm)=>{"use strict";var Tm=qe(),Su=xs(),{ANY:$u}=Su,Eu=Ps(),Ou=Ne(),SP=(r,e,t={})=>{if(r===e)return!0;r=new Tm(r,t),e=new Tm(e,t);let s=!1;e:for(let i of r.set){for(let n of e.set){let o=xP(i,n,t);if(s=s||o!==null,o)continue e}if(s)return!1}return!0},OP=[new Su(">=0.0.0-0")],Pm=[new Su(">=0.0.0")],xP=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===$u){if(e.length===1&&e[0].semver===$u)return!0;t.includePrerelease?r=OP:r=Pm}if(e.length===1&&e[0].semver===$u){if(t.includePrerelease)return!0;e=Pm}let s=new Set,i,n;for(let p of r)p.operator===">"||p.operator===">="?i=Am(i,p,t):p.operator==="<"||p.operator==="<="?n=Im(n,p,t):s.add(p.semver);if(s.size>1)return null;let o;if(i&&n){if(o=Ou(i.semver,n.semver,t),o>0)return null;if(o===0&&(i.operator!==">="||n.operator!=="<="))return null}for(let p of s){if(i&&!Eu(p,String(i),t)||n&&!Eu(p,String(n),t))return null;for(let m of e)if(!Eu(p,String(m),t))return!1;return!0}let a,u,c,l,h=n&&!t.includePrerelease&&n.semver.prerelease.length?n.semver:!1,f=i&&!t.includePrerelease&&i.semver.prerelease.length?i.semver:!1;h&&h.prerelease.length===1&&n.operator==="<"&&h.prerelease[0]===0&&(h=!1);for(let p of e){if(l=l||p.operator===">"||p.operator===">=",c=c||p.operator==="<"||p.operator==="<=",i){if(f&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===f.major&&p.semver.minor===f.minor&&p.semver.patch===f.patch&&(f=!1),p.operator===">"||p.operator===">="){if(a=Am(i,p,t),a===p&&a!==i)return!1}else if(i.operator===">="&&!p.test(i.semver))return!1}if(n){if(h&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===h.major&&p.semver.minor===h.minor&&p.semver.patch===h.patch&&(h=!1),p.operator==="<"||p.operator==="<="){if(u=Im(n,p,t),u===p&&u!==n)return!1}else if(n.operator==="<="&&!p.test(n.semver))return!1}if(!p.operator&&(n||i)&&o!==0)return!1}return!(i&&c&&!n&&o!==0||n&&l&&!i&&o!==0||f||h)},Am=(r,e,t)=>{if(!r)return e;let s=Ou(r.semver,e.semver,t);return s>0?r:s<0||e.operator===">"&&r.operator===">="?e:r},Im=(r,e,t)=>{if(!r)return e;let s=Ou(r.semver,e.semver,t);return s<0?r:s>0||e.operator==="<"&&r.operator==="<="?e:r};Cm.exports=SP});var km=d((kk,jm)=>{"use strict";var xu=Pr(),Nm=Tr(),TP=ue(),qm=cu(),PP=qt(),AP=ip(),IP=op(),CP=cp(),RP=dp(),NP=pp(),qP=gp(),jP=_p(),kP=bp(),DP=Ne(),MP=Sp(),LP=xp(),VP=Ui(),FP=Ip(),UP=Rp(),HP=Os(),GP=Hi(),zP=du(),BP=fu(),KP=Gi(),WP=zi(),YP=pu(),XP=Fp(),JP=Hp(),ZP=xs(),QP=qe(),eA=Ps(),tA=im(),rA=om(),sA=um(),iA=hm(),nA=fm(),oA=Wi(),aA=vm(),uA=wm(),cA=Sm(),lA=xm(),hA=Rm();jm.exports={parse:PP,valid:AP,clean:IP,inc:CP,diff:RP,major:NP,minor:qP,patch:jP,prerelease:kP,compare:DP,rcompare:MP,compareLoose:LP,compareBuild:VP,sort:FP,rsort:UP,gt:HP,lt:GP,eq:zP,neq:BP,gte:KP,lte:WP,cmp:YP,coerce:XP,truncate:JP,Comparator:ZP,Range:QP,satisfies:eA,toComparators:tA,maxSatisfying:rA,minSatisfying:sA,minVersion:iA,validRange:nA,outside:oA,gtr:aA,ltr:uA,intersects:cA,simplifyRange:lA,subset:hA,SemVer:TP,re:xu.re,src:xu.src,tokens:xu.t,SEMVER_SPEC_VERSION:Nm.SEMVER_SPEC_VERSION,RELEASE_TYPES:Nm.RELEASE_TYPES,compareIdentifiers:qm.compareIdentifiers,rcompareIdentifiers:qm.rcompareIdentifiers}});var ee=d((zk,Bm)=>{"use strict";var{FORCE_COLOR:$A,NODE_DISABLE_COLORS:EA,TERM:SA}=process.env,L={enabled:!EA&&SA!=="dumb"&&$A!=="0",reset:H(0,0),bold:H(1,22),dim:H(2,22),italic:H(3,23),underline:H(4,24),inverse:H(7,27),hidden:H(8,28),strikethrough:H(9,29),black:H(30,39),red:H(31,39),green:H(32,39),yellow:H(33,39),blue:H(34,39),magenta:H(35,39),cyan:H(36,39),white:H(37,39),gray:H(90,39),grey:H(90,39),bgBlack:H(40,49),bgRed:H(41,49),bgGreen:H(42,49),bgYellow:H(43,49),bgBlue:H(44,49),bgMagenta:H(45,49),bgCyan:H(46,49),bgWhite:H(47,49)};function zm(r,e){let t=0,s,i="",n="";for(;t<r.length;t++)s=r[t],i+=s.open,n+=s.close,e.includes(s.close)&&(e=e.replace(s.rgx,s.close+s.open));return i+e+n}function OA(r,e){let t={has:r,keys:e};return t.reset=L.reset.bind(t),t.bold=L.bold.bind(t),t.dim=L.dim.bind(t),t.italic=L.italic.bind(t),t.underline=L.underline.bind(t),t.inverse=L.inverse.bind(t),t.hidden=L.hidden.bind(t),t.strikethrough=L.strikethrough.bind(t),t.black=L.black.bind(t),t.red=L.red.bind(t),t.green=L.green.bind(t),t.yellow=L.yellow.bind(t),t.blue=L.blue.bind(t),t.magenta=L.magenta.bind(t),t.cyan=L.cyan.bind(t),t.white=L.white.bind(t),t.gray=L.gray.bind(t),t.grey=L.grey.bind(t),t.bgBlack=L.bgBlack.bind(t),t.bgRed=L.bgRed.bind(t),t.bgGreen=L.bgGreen.bind(t),t.bgYellow=L.bgYellow.bind(t),t.bgBlue=L.bgBlue.bind(t),t.bgMagenta=L.bgMagenta.bind(t),t.bgCyan=L.bgCyan.bind(t),t.bgWhite=L.bgWhite.bind(t),t}function H(r,e){let t={open:`\x1B[${r}m`,close:`\x1B[${e}m`,rgx:new RegExp(`\\x1b\\[${e}m`,"g")};return function(s){return this!==void 0&&this.has!==void 0?(this.has.includes(r)||(this.has.push(r),this.keys.push(t)),s===void 0?this:L.enabled?zm(this.keys,s+""):s+""):s===void 0?OA([r],[t]):L.enabled?zm([t],s+""):s+""}}Bm.exports=L});var Wm=d((Bk,Km)=>{"use strict";Km.exports=(r,e)=>{if(!(r.meta&&r.name!=="escape")){if(r.ctrl){if(r.name==="a")return"first";if(r.name==="c"||r.name==="d")return"abort";if(r.name==="e")return"last";if(r.name==="g")return"reset"}if(e){if(r.name==="j")return"down";if(r.name==="k")return"up"}return r.name==="return"||r.name==="enter"?"submit":r.name==="backspace"?"delete":r.name==="delete"?"deleteForward":r.name==="abort"?"abort":r.name==="escape"?"exit":r.name==="tab"?"next":r.name==="pagedown"?"nextPage":r.name==="pageup"?"prevPage":r.name==="home"?"home":r.name==="end"?"end":r.name==="up"?"up":r.name==="down"?"down":r.name==="right"?"right":r.name==="left"?"left":!1}}});var Zi=d((Kk,Ym)=>{"use strict";Ym.exports=r=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),t=new RegExp(e,"g");return typeof r=="string"?r.replace(t,""):r}});var te=d((Wk,Xm)=>{"use strict";var Cu={to(r,e){return e?`\x1B[${e+1};${r+1}H`:`\x1B[${r+1}G`},move(r,e){let t="";return r<0?t+=`\x1B[${-r}D`:r>0&&(t+=`\x1B[${r}C`),e<0?t+=`\x1B[${-e}A`:e>0&&(t+=`\x1B[${e}B`),t},up:(r=1)=>`\x1B[${r}A`,down:(r=1)=>`\x1B[${r}B`,forward:(r=1)=>`\x1B[${r}C`,backward:(r=1)=>`\x1B[${r}D`,nextLine:(r=1)=>"\x1B[E".repeat(r),prevLine:(r=1)=>"\x1B[F".repeat(r),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},xA={up:(r=1)=>"\x1B[S".repeat(r),down:(r=1)=>"\x1B[T".repeat(r)},TA={screen:"\x1B[2J",up:(r=1)=>"\x1B[1J".repeat(r),down:(r=1)=>"\x1B[J".repeat(r),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(r){let e="";for(let t=0;t<r;t++)e+=this.line+(t<r-1?Cu.up():"");return r&&(e+=Cu.left),e}};Xm.exports={cursor:Cu,scroll:xA,erase:TA,beep:"\x07"}});var tg=d((Yk,eg)=>{"use strict";function PA(r,e){var t=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=AA(r))||e&&r&&typeof r.length=="number"){t&&(r=t);var s=0,i=function(){};return{s:i,n:function(){return s>=r.length?{done:!0}:{done:!1,value:r[s++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
10
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var n=!0,o=!1,a;return{s:function(){t=t.call(r)},n:function(){var c=t.next();return n=c.done,c},e:function(c){o=!0,a=c},f:function(){try{!n&&t.return!=null&&t.return()}finally{if(o)throw a}}}}function AA(r,e){if(r){if(typeof r=="string")return Jm(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Array.from(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Jm(r,e)}}function Jm(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,s=new Array(e);t<e;t++)s[t]=r[t];return s}var IA=Zi(),Qm=te(),Zm=Qm.erase,CA=Qm.cursor,RA=r=>[...IA(r)].length;eg.exports=function(r,e){if(!e)return Zm.line+CA.to(0);let t=0,s=r.split(/\r?\n/);var i=PA(s),n;try{for(i.s();!(n=i.n()).done;){let o=n.value;t+=1+Math.floor(Math.max(RA(o)-1,0)/e)}}catch(o){i.e(o)}finally{i.f()}return Zm.lines(t)}});var Ru=d((Xk,rg)=>{"use strict";var Rs={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},NA={arrowUp:Rs.arrowUp,arrowDown:Rs.arrowDown,arrowLeft:Rs.arrowLeft,arrowRight:Rs.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},qA=process.platform==="win32"?NA:Rs;rg.exports=qA});var ig=d((Jk,sg)=>{"use strict";var Ir=ee(),tr=Ru(),Nu=Object.freeze({password:{scale:1,render:r=>"*".repeat(r.length)},emoji:{scale:2,render:r=>"\u{1F603}".repeat(r.length)},invisible:{scale:0,render:r=>""},default:{scale:1,render:r=>`${r}`}}),jA=r=>Nu[r]||Nu.default,Ns=Object.freeze({aborted:Ir.red(tr.cross),done:Ir.green(tr.tick),exited:Ir.yellow(tr.cross),default:Ir.cyan("?")}),kA=(r,e,t)=>e?Ns.aborted:t?Ns.exited:r?Ns.done:Ns.default,DA=r=>Ir.gray(r?tr.ellipsis:tr.pointerSmall),MA=(r,e)=>Ir.gray(r?e?tr.pointerSmall:"+":tr.line);sg.exports={styles:Nu,render:jA,symbols:Ns,symbol:kA,delimiter:DA,item:MA}});var og=d((Zk,ng)=>{"use strict";var LA=Zi();ng.exports=function(r,e){let t=String(LA(r)||"").split(/\r?\n/);return e?t.map(s=>Math.ceil(s.length/e)).reduce((s,i)=>s+i):t.length}});var ug=d((Qk,ag)=>{"use strict";ag.exports=(r,e={})=>{let t=Number.isSafeInteger(parseInt(e.margin))?new Array(parseInt(e.margin)).fill(" ").join(""):e.margin||"",s=e.width;return(r||"").split(/\r?\n/g).map(i=>i.split(/\s+/g).reduce((n,o)=>(o.length+t.length>=s||n[n.length-1].length+o.length+1<s?n[n.length-1]+=` ${o}`:n.push(`${t}${o}`),n),[t]).join(`
|
|
11
11
|
`)).join(`
|
|
12
|
-
`)}});var
|
|
13
|
-
`),this.close()}validate(){var e=this;return
|
|
14
|
-
`),e.close()})()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(e){this.placeholder||(this.cursor=this.cursor+e,this.cursorOffset+=e)}_(e,t){let s=this.value.slice(0,this.cursor),i=this.value.slice(this.cursor);this.value=`${s}${e}${i}`,this.red=!1,this.cursor=this.placeholder?0:s.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let e=this.value.slice(0,this.cursor-1),t=this.value.slice(this.cursor);this.value=`${e}${t}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let e=this.value.slice(0,this.cursor),t=this.value.slice(this.cursor+1);this.value=`${e}${t}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(
|
|
12
|
+
`)}});var lg=d((eD,cg)=>{"use strict";cg.exports=(r,e,t)=>{t=t||e;let s=Math.min(e-t,r-Math.floor(t/2));s<0&&(s=0);let i=Math.min(s+t,e);return{startIndex:s,endIndex:i}}});var ze=d((tD,hg)=>{"use strict";hg.exports={action:Wm(),clear:tg(),style:ig(),strip:Zi(),figures:Ru(),lines:og(),wrap:ug(),entriesToDisplay:lg()}});var pt=d((rD,pg)=>{"use strict";var dg=require("readline"),VA=ze(),FA=VA.action,UA=require("events"),fg=te(),HA=fg.beep,GA=fg.cursor,zA=ee(),qu=class extends UA{constructor(e={}){super(),this.firstRender=!0,this.in=e.stdin||process.stdin,this.out=e.stdout||process.stdout,this.onRender=(e.onRender||(()=>{})).bind(this);let t=dg.createInterface({input:this.in,escapeCodeTimeout:50});dg.emitKeypressEvents(this.in,t),this.in.isTTY&&this.in.setRawMode(!0);let s=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,i=(n,o)=>{let a=FA(o,s);a===!1?this._&&this._(n,o):typeof this[a]=="function"?this[a](o):this.bell()};this.close=()=>{this.out.write(GA.show),this.in.removeListener("keypress",i),this.in.isTTY&&this.in.setRawMode(!1),t.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",i)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(HA)}render(){this.onRender(zA),this.firstRender&&(this.firstRender=!1)}};pg.exports=qu});var vg=d((sD,_g)=>{"use strict";function mg(r,e,t,s,i,n,o){try{var a=r[n](o),u=a.value}catch(c){t(c);return}a.done?e(u):Promise.resolve(u).then(s,i)}function gg(r){return function(){var e=this,t=arguments;return new Promise(function(s,i){var n=r.apply(e,t);function o(u){mg(n,s,i,o,a,"next",u)}function a(u){mg(n,s,i,o,a,"throw",u)}o(void 0)})}}var Qi=ee(),BA=pt(),yg=te(),KA=yg.erase,qs=yg.cursor,en=ze(),ju=en.style,ku=en.clear,WA=en.lines,YA=en.figures,Du=class extends BA{constructor(e={}){super(e),this.transform=ju.render(e.style),this.scale=this.transform.scale,this.msg=e.message,this.initial=e.initial||"",this.validator=e.validate||(()=>!0),this.value="",this.errorMsg=e.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=ku("",this.out.columns),this.render()}set value(e){!e&&this.initial?(this.placeholder=!0,this.rendered=Qi.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(e)),this._value=e,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write(`
|
|
13
|
+
`),this.close()}validate(){var e=this;return gg(function*(){let t=yield e.validator(e.value);typeof t=="string"&&(e.errorMsg=t,t=!1),e.error=!t})()}submit(){var e=this;return gg(function*(){if(e.value=e.value||e.initial,e.cursorOffset=0,e.cursor=e.rendered.length,yield e.validate(),e.error){e.red=!0,e.fire(),e.render();return}e.done=!0,e.aborted=!1,e.fire(),e.render(),e.out.write(`
|
|
14
|
+
`),e.close()})()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(e){this.placeholder||(this.cursor=this.cursor+e,this.cursorOffset+=e)}_(e,t){let s=this.value.slice(0,this.cursor),i=this.value.slice(this.cursor);this.value=`${s}${e}${i}`,this.red=!1,this.cursor=this.placeholder?0:s.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let e=this.value.slice(0,this.cursor-1),t=this.value.slice(this.cursor);this.value=`${e}${t}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let e=this.value.slice(0,this.cursor),t=this.value.slice(this.cursor+1);this.value=`${e}${t}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(qs.down(WA(this.outputError,this.out.columns)-1)+ku(this.outputError,this.out.columns)),this.out.write(ku(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[ju.symbol(this.done,this.aborted),Qi.bold(this.msg),ju.delimiter(this.done),this.red?Qi.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
|
|
15
15
|
`).reduce((e,t,s)=>e+`
|
|
16
|
-
${s?" ":
|
|
16
|
+
${s?" ":YA.pointerSmall} ${Qi.red().italic(t)}`,"")),this.out.write(KA.line+qs.to(0)+this.outputText+qs.save+this.outputError+qs.restore+qs.move(this.cursorOffset,0)))}};_g.exports=Du});var Eg=d((iD,$g)=>{"use strict";var mt=ee(),XA=pt(),js=ze(),bg=js.style,wg=js.clear,tn=js.figures,JA=js.wrap,ZA=js.entriesToDisplay,QA=te(),eI=QA.cursor,Mu=class extends XA{constructor(e={}){super(e),this.msg=e.message,this.hint=e.hint||"- Use arrow-keys. Return to submit.",this.warn=e.warn||"- This option is disabled",this.cursor=e.initial||0,this.choices=e.choices.map((t,s)=>(typeof t=="string"&&(t={title:t,value:s}),{title:t&&(t.title||t.value||t),value:t&&(t.value===void 0?s:t.value),description:t&&t.description,selected:t&&t.selected,disabled:t&&t.disabled})),this.optionsPerPage=e.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=wg("",this.out.columns),this.render()}moveCursor(e){this.cursor=e,this.value=this.choices[e].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
|
|
17
17
|
`),this.close()}submit(){this.selection.disabled?this.bell():(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
18
|
-
`),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(e,t){if(e===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(
|
|
19
|
-
`;for(let i=t;i<s;i++){let n,o,a="",u=this.choices[i];i===t&&t>0?o=
|
|
20
|
-
`+
|
|
21
|
-
`}}this.out.write(this.outputText)}}
|
|
18
|
+
`),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(e,t){if(e===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(eI.hide):this.out.write(wg(this.outputText,this.out.columns)),super.render();let e=ZA(this.cursor,this.choices.length,this.optionsPerPage),t=e.startIndex,s=e.endIndex;if(this.outputText=[bg.symbol(this.done,this.aborted),mt.bold(this.msg),bg.delimiter(!1),this.done?this.selection.title:this.selection.disabled?mt.yellow(this.warn):mt.gray(this.hint)].join(" "),!this.done){this.outputText+=`
|
|
19
|
+
`;for(let i=t;i<s;i++){let n,o,a="",u=this.choices[i];i===t&&t>0?o=tn.arrowUp:i===s-1&&s<this.choices.length?o=tn.arrowDown:o=" ",u.disabled?(n=this.cursor===i?mt.gray().underline(u.title):mt.strikethrough().gray(u.title),o=(this.cursor===i?mt.bold().gray(tn.pointer)+" ":" ")+o):(n=this.cursor===i?mt.cyan().underline(u.title):u.title,o=(this.cursor===i?mt.cyan(tn.pointer)+" ":" ")+o,u.description&&this.cursor===i&&(a=` - ${u.description}`,(o.length+n.length+a.length>=this.out.columns||u.description.split(/\r?\n/).length>1)&&(a=`
|
|
20
|
+
`+JA(u.description,{margin:3,width:this.out.columns})))),this.outputText+=`${o} ${n}${mt.gray(a)}
|
|
21
|
+
`}}this.out.write(this.outputText)}};$g.exports=Mu});var Ag=d((nD,Pg)=>{"use strict";var rn=ee(),tI=pt(),xg=ze(),Sg=xg.style,rI=xg.clear,Tg=te(),Og=Tg.cursor,sI=Tg.erase,Lu=class extends tI{constructor(e={}){super(e),this.msg=e.message,this.value=!!e.initial,this.active=e.active||"on",this.inactive=e.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
|
|
22
22
|
`),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
23
|
-
`),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(e,t){if(e===" ")this.value=!this.value;else if(e==="1")this.value=!0;else if(e==="0")this.value=!1;else return this.bell();this.render()}render(){this.closed||(this.firstRender?this.out.write(
|
|
24
|
-
`),this.close()}validate(){var e=this;return
|
|
25
|
-
`),e.close()})()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let e=this.parts[this.cursor].prev();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}right(){let e=this.parts[this.cursor].next();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}next(){let e=this.parts[this.cursor].next();this.moveCursor(e?this.parts.indexOf(e):this.parts.findIndex(t=>t instanceof
|
|
23
|
+
`),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(e,t){if(e===" ")this.value=!this.value;else if(e==="1")this.value=!0;else if(e==="0")this.value=!1;else return this.bell();this.render()}render(){this.closed||(this.firstRender?this.out.write(Og.hide):this.out.write(rI(this.outputText,this.out.columns)),super.render(),this.outputText=[Sg.symbol(this.done,this.aborted),rn.bold(this.msg),Sg.delimiter(this.done),this.value?this.inactive:rn.cyan().underline(this.inactive),rn.gray("/"),this.value?rn.cyan().underline(this.active):this.active].join(" "),this.out.write(sI.line+Og.to(0)+this.outputText))}};Pg.exports=Lu});var it=d((oD,Ig)=>{"use strict";var Vu=class r{constructor({token:e,date:t,parts:s,locales:i}){this.token=e,this.date=t||new Date,this.parts=s||[this],this.locales=i||{}}up(){}down(){}next(){let e=this.parts.indexOf(this);return this.parts.find((t,s)=>s>e&&t instanceof r)}setTo(e){}prev(){let e=[].concat(this.parts).reverse(),t=e.indexOf(this);return e.find((s,i)=>i>t&&s instanceof r)}toString(){return String(this.date)}};Ig.exports=Vu});var Rg=d((aD,Cg)=>{"use strict";var iI=it(),Fu=class extends iI{constructor(e={}){super(e)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let e=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?e.toUpperCase():e}};Cg.exports=Fu});var qg=d((uD,Ng)=>{"use strict";var nI=it(),oI=r=>(r=r%10,r===1?"st":r===2?"nd":r===3?"rd":"th"),Uu=class extends nI{constructor(e={}){super(e)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(e){this.date.setDate(parseInt(e.substr(-2)))}toString(){let e=this.date.getDate(),t=this.date.getDay();return this.token==="DD"?String(e).padStart(2,"0"):this.token==="Do"?e+oI(e):this.token==="d"?t+1:this.token==="ddd"?this.locales.weekdaysShort[t]:this.token==="dddd"?this.locales.weekdays[t]:e}};Ng.exports=Uu});var kg=d((cD,jg)=>{"use strict";var aI=it(),Hu=class extends aI{constructor(e={}){super(e)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(e){this.date.setHours(parseInt(e.substr(-2)))}toString(){let e=this.date.getHours();return/h/.test(this.token)&&(e=e%12||12),this.token.length>1?String(e).padStart(2,"0"):e}};jg.exports=Hu});var Mg=d((lD,Dg)=>{"use strict";var uI=it(),Gu=class extends uI{constructor(e={}){super(e)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(e){this.date.setMilliseconds(parseInt(e.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}};Dg.exports=Gu});var Vg=d((hD,Lg)=>{"use strict";var cI=it(),zu=class extends cI{constructor(e={}){super(e)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(e){this.date.setMinutes(parseInt(e.substr(-2)))}toString(){let e=this.date.getMinutes();return this.token.length>1?String(e).padStart(2,"0"):e}};Lg.exports=zu});var Ug=d((dD,Fg)=>{"use strict";var lI=it(),Bu=class extends lI{constructor(e={}){super(e)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(e){e=parseInt(e.substr(-2))-1,this.date.setMonth(e<0?0:e)}toString(){let e=this.date.getMonth(),t=this.token.length;return t===2?String(e+1).padStart(2,"0"):t===3?this.locales.monthsShort[e]:t===4?this.locales.months[e]:String(e+1)}};Fg.exports=Bu});var Gg=d((fD,Hg)=>{"use strict";var hI=it(),Ku=class extends hI{constructor(e={}){super(e)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(e){this.date.setSeconds(parseInt(e.substr(-2)))}toString(){let e=this.date.getSeconds();return this.token.length>1?String(e).padStart(2,"0"):e}};Hg.exports=Ku});var Bg=d((pD,zg)=>{"use strict";var dI=it(),Wu=class extends dI{constructor(e={}){super(e)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(e){this.date.setFullYear(e.substr(-4))}toString(){let e=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?e.substr(-2):e}};zg.exports=Wu});var Wg=d((mD,Kg)=>{"use strict";Kg.exports={DatePart:it(),Meridiem:Rg(),Day:qg(),Hours:kg(),Milliseconds:Mg(),Minutes:Vg(),Month:Ug(),Seconds:Gg(),Year:Bg()}});var iy=d((gD,sy)=>{"use strict";function Yg(r,e,t,s,i,n,o){try{var a=r[n](o),u=a.value}catch(c){t(c);return}a.done?e(u):Promise.resolve(u).then(s,i)}function Xg(r){return function(){var e=this,t=arguments;return new Promise(function(s,i){var n=r.apply(e,t);function o(u){Yg(n,s,i,o,a,"next",u)}function a(u){Yg(n,s,i,o,a,"throw",u)}o(void 0)})}}var Yu=ee(),fI=pt(),Ju=ze(),Jg=Ju.style,Zg=Ju.clear,pI=Ju.figures,ry=te(),mI=ry.erase,Qg=ry.cursor,gt=Wg(),ey=gt.DatePart,gI=gt.Meridiem,yI=gt.Day,_I=gt.Hours,vI=gt.Milliseconds,bI=gt.Minutes,wI=gt.Month,$I=gt.Seconds,EI=gt.Year,SI=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,ty={1:({token:r})=>r.replace(/\\(.)/g,"$1"),2:r=>new yI(r),3:r=>new wI(r),4:r=>new EI(r),5:r=>new gI(r),6:r=>new _I(r),7:r=>new bI(r),8:r=>new $I(r),9:r=>new vI(r)},OI={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")},Xu=class extends fI{constructor(e={}){super(e),this.msg=e.message,this.cursor=0,this.typed="",this.locales=Object.assign(OI,e.locales),this._date=e.initial||new Date,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.mask=e.mask||"YYYY-MM-DD HH:mm:ss",this.clear=Zg("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(e){e&&this._date.setTime(e.getTime())}set mask(e){let t;for(this.parts=[];t=SI.exec(e);){let i=t.shift(),n=t.findIndex(o=>o!=null);this.parts.push(n in ty?ty[n]({token:t[n]||i,date:this.date,parts:this.parts,locales:this.locales}):t[n]||i)}let s=this.parts.reduce((i,n)=>(typeof n=="string"&&typeof i[i.length-1]=="string"?i[i.length-1]+=n:i.push(n),i),[]);this.parts.splice(0),this.parts.push(...s),this.reset()}moveCursor(e){this.typed="",this.cursor=e,this.fire()}reset(){this.moveCursor(this.parts.findIndex(e=>e instanceof ey)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
|
|
24
|
+
`),this.close()}validate(){var e=this;return Xg(function*(){let t=yield e.validator(e.value);typeof t=="string"&&(e.errorMsg=t,t=!1),e.error=!t})()}submit(){var e=this;return Xg(function*(){if(yield e.validate(),e.error){e.color="red",e.fire(),e.render();return}e.done=!0,e.aborted=!1,e.fire(),e.render(),e.out.write(`
|
|
25
|
+
`),e.close()})()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let e=this.parts[this.cursor].prev();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}right(){let e=this.parts[this.cursor].next();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}next(){let e=this.parts[this.cursor].next();this.moveCursor(e?this.parts.indexOf(e):this.parts.findIndex(t=>t instanceof ey)),this.render()}_(e){/\d/.test(e)&&(this.typed+=e,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(Qg.hide):this.out.write(Zg(this.outputText,this.out.columns)),super.render(),this.outputText=[Jg.symbol(this.done,this.aborted),Yu.bold(this.msg),Jg.delimiter(!1),this.parts.reduce((e,t,s)=>e.concat(s===this.cursor&&!this.done?Yu.cyan().underline(t.toString()):t),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
|
|
26
26
|
`).reduce((e,t,s)=>e+`
|
|
27
|
-
${s?" ":
|
|
28
|
-
`),this.close()}validate(){var e=this;return
|
|
29
|
-
`),e.close()})()}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let e=this.value.toString();if(e.length===0)return this.bell();this.value=this.parse(e=e.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(e,t){if(!this.valid(e))return this.bell();let s=Date.now();if(s-this.lastHit>1e3&&(this.typed=""),this.typed+=e,this.lastHit=s,this.color="cyan",e===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(
|
|
27
|
+
${s?" ":pI.pointerSmall} ${Yu.red().italic(t)}`,"")),this.out.write(mI.line+Qg.to(0)+this.outputText))}};sy.exports=Xu});var hy=d((yD,ly)=>{"use strict";function ny(r,e,t,s,i,n,o){try{var a=r[n](o),u=a.value}catch(c){t(c);return}a.done?e(u):Promise.resolve(u).then(s,i)}function oy(r){return function(){var e=this,t=arguments;return new Promise(function(s,i){var n=r.apply(e,t);function o(u){ny(n,s,i,o,a,"next",u)}function a(u){ny(n,s,i,o,a,"throw",u)}o(void 0)})}}var sn=ee(),xI=pt(),cy=te(),nn=cy.cursor,TI=cy.erase,on=ze(),Zu=on.style,PI=on.figures,ay=on.clear,AI=on.lines,II=/[0-9]/,Qu=r=>r!==void 0,uy=(r,e)=>{let t=Math.pow(10,e);return Math.round(r*t)/t},ec=class extends xI{constructor(e={}){super(e),this.transform=Zu.render(e.style),this.msg=e.message,this.initial=Qu(e.initial)?e.initial:"",this.float=!!e.float,this.round=e.round||2,this.inc=e.increment||1,this.min=Qu(e.min)?e.min:-1/0,this.max=Qu(e.max)?e.max:1/0,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(e){!e&&e!==0?(this.placeholder=!0,this.rendered=sn.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=!1,this.rendered=this.transform.render(`${uy(e,this.round)}`),this._value=uy(e,this.round)),this.fire()}get value(){return this._value}parse(e){return this.float?parseFloat(e):parseInt(e)}valid(e){return e==="-"||e==="."&&this.float||II.test(e)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let e=this.value;this.value=e!==""?e:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
|
|
28
|
+
`),this.close()}validate(){var e=this;return oy(function*(){let t=yield e.validator(e.value);typeof t=="string"&&(e.errorMsg=t,t=!1),e.error=!t})()}submit(){var e=this;return oy(function*(){if(yield e.validate(),e.error){e.color="red",e.fire(),e.render();return}let t=e.value;e.value=t!==""?t:e.initial,e.done=!0,e.aborted=!1,e.error=!1,e.fire(),e.render(),e.out.write(`
|
|
29
|
+
`),e.close()})()}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let e=this.value.toString();if(e.length===0)return this.bell();this.value=this.parse(e=e.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(e,t){if(!this.valid(e))return this.bell();let s=Date.now();if(s-this.lastHit>1e3&&(this.typed=""),this.typed+=e,this.lastHit=s,this.color="cyan",e===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(nn.down(AI(this.outputError,this.out.columns)-1)+ay(this.outputError,this.out.columns)),this.out.write(ay(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[Zu.symbol(this.done,this.aborted),sn.bold(this.msg),Zu.delimiter(this.done),!this.done||!this.done&&!this.placeholder?sn[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
|
|
30
30
|
`).reduce((e,t,s)=>e+`
|
|
31
|
-
${s?" ":
|
|
31
|
+
${s?" ":PI.pointerSmall} ${sn.red().italic(t)}`,"")),this.out.write(TI.line+nn.to(0)+this.outputText+nn.save+this.outputError+nn.restore))}};ly.exports=ec});var rc=d((_D,py)=>{"use strict";var nt=ee(),CI=te(),RI=CI.cursor,NI=pt(),ks=ze(),dy=ks.clear,kt=ks.figures,fy=ks.style,qI=ks.wrap,jI=ks.entriesToDisplay,tc=class extends NI{constructor(e={}){super(e),this.msg=e.message,this.cursor=e.cursor||0,this.scrollIndex=e.cursor||0,this.hint=e.hint||"",this.warn=e.warn||"- This option is disabled -",this.minSelected=e.min,this.showMinError=!1,this.maxChoices=e.max,this.instructions=e.instructions,this.optionsPerPage=e.optionsPerPage||10,this.value=e.choices.map((t,s)=>(typeof t=="string"&&(t={title:t,value:s}),{title:t&&(t.title||t.value||t),description:t&&t.description,value:t&&(t.value===void 0?s:t.value),selected:t&&t.selected,disabled:t&&t.disabled})),this.clear=dy("",this.out.columns),e.overrideRender||this.render()}reset(){this.value.map(e=>!e.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter(e=>e.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
|
|
32
32
|
`),this.close()}submit(){let e=this.value.filter(t=>t.selected);this.minSelected&&e.length<this.minSelected?(this.showMinError=!0,this.render()):(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
33
33
|
`),this.close())}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.render()}up(){this.cursor===0?this.cursor=this.value.length-1:this.cursor--,this.render()}down(){this.cursor===this.value.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){let e=this.value[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter(t=>t.selected).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();let e=!this.value[this.cursor].selected;this.value.filter(t=>!t.disabled).forEach(t=>t.selected=e),this.render()}_(e,t){if(e===" ")this.handleSpaceToggle();else if(e==="a")this.toggleAll();else return this.bell()}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
|
|
34
34
|
Instructions:
|
|
@@ -36,102 +36,102 @@ Instructions:
|
|
|
36
36
|
${kt.arrowLeft}/${kt.arrowRight}/[space]: Toggle selection
|
|
37
37
|
`+(this.maxChoices===void 0?` a: Toggle all
|
|
38
38
|
`:"")+" enter/return: Complete answer":""}renderOption(e,t,s,i){let n=(t.selected?nt.green(kt.radioOn):kt.radioOff)+" "+i+" ",o,a;return t.disabled?o=e===s?nt.gray().underline(t.title):nt.strikethrough().gray(t.title):(o=e===s?nt.cyan().underline(t.title):t.title,e===s&&t.description&&(a=` - ${t.description}`,(n.length+o.length+a.length>=this.out.columns||t.description.split(/\r?\n/).length>1)&&(a=`
|
|
39
|
-
`+
|
|
39
|
+
`+qI(t.description,{margin:n.length,width:this.out.columns})))),n+o+nt.gray(a||"")}paginateOptions(e){if(e.length===0)return nt.red("No matches for this query.");let t=jI(this.cursor,e.length,this.optionsPerPage),s=t.startIndex,i=t.endIndex,n,o=[];for(let a=s;a<i;a++)a===s&&s>0?n=kt.arrowUp:a===i-1&&i<e.length?n=kt.arrowDown:n=" ",o.push(this.renderOption(this.cursor,e[a],a,n));return`
|
|
40
40
|
`+o.join(`
|
|
41
|
-
`)}renderOptions(e){return this.done?"":this.paginateOptions(e)}renderDoneOrInstructions(){if(this.done)return this.value.filter(t=>t.selected).map(t=>t.title).join(", ");let e=[nt.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&e.push(nt.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(
|
|
41
|
+
`)}renderOptions(e){return this.done?"":this.paginateOptions(e)}renderDoneOrInstructions(){if(this.done)return this.value.filter(t=>t.selected).map(t=>t.title).join(", ");let e=[nt.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&e.push(nt.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(RI.hide),super.render();let e=[fy.symbol(this.done,this.aborted),nt.bold(this.msg),fy.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=nt.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.value),this.out.write(this.clear+e),this.clear=dy(e,this.out.columns)}};py.exports=tc});var wy=d((vD,by)=>{"use strict";function my(r,e,t,s,i,n,o){try{var a=r[n](o),u=a.value}catch(c){t(c);return}a.done?e(u):Promise.resolve(u).then(s,i)}function kI(r){return function(){var e=this,t=arguments;return new Promise(function(s,i){var n=r.apply(e,t);function o(u){my(n,s,i,o,a,"next",u)}function a(u){my(n,s,i,o,a,"throw",u)}o(void 0)})}}var Ds=ee(),DI=pt(),vy=te(),MI=vy.erase,gy=vy.cursor,Ms=ze(),sc=Ms.style,yy=Ms.clear,ic=Ms.figures,LI=Ms.wrap,VI=Ms.entriesToDisplay,_y=(r,e)=>r[e]&&(r[e].value||r[e].title||r[e]),FI=(r,e)=>r[e]&&(r[e].title||r[e].value||r[e]),UI=(r,e)=>{let t=r.findIndex(s=>s.value===e||s.title===e);return t>-1?t:void 0},nc=class extends DI{constructor(e={}){super(e),this.msg=e.message,this.suggest=e.suggest,this.choices=e.choices,this.initial=typeof e.initial=="number"?e.initial:UI(e.choices,e.initial),this.select=this.initial||e.cursor||0,this.i18n={noMatches:e.noMatches||"no matches found"},this.fallback=e.fallback||this.initial,this.clearFirst=e.clearFirst||!1,this.suggestions=[],this.input="",this.limit=e.limit||10,this.cursor=0,this.transform=sc.render(e.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=yy("",this.out.columns),this.complete(this.render),this.render()}set fallback(e){this._fb=Number.isSafeInteger(parseInt(e))?parseInt(e):e}get fallback(){let e;return typeof this._fb=="number"?e=this.choices[this._fb]:typeof this._fb=="string"&&(e={title:this._fb}),e||this._fb||{title:this.i18n.noMatches}}moveSelect(e){this.select=e,this.suggestions.length>0?this.value=_y(this.suggestions,e):this.value=this.fallback.value,this.fire()}complete(e){var t=this;return kI(function*(){let s=t.completing=t.suggest(t.input,t.choices),i=yield s;if(t.completing!==s)return;t.suggestions=i.map((o,a,u)=>({title:FI(u,a),value:_y(u,a),description:o.description})),t.completing=!1;let n=Math.max(i.length-1,0);t.moveSelect(Math.min(n,t.select)),e&&e()})()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
42
42
|
`),this.close())}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write(`
|
|
43
43
|
`),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write(`
|
|
44
|
-
`),this.close()}_(e,t){let s=this.input.slice(0,this.cursor),i=this.input.slice(this.cursor);this.input=`${s}${e}${i}`,this.cursor=s.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let e=this.input.slice(0,this.cursor-1),t=this.input.slice(this.cursor);this.input=`${e}${t}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let e=this.input.slice(0,this.cursor),t=this.input.slice(this.cursor+1);this.input=`${e}${t}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(e,t,s,i){let n,o=s?
|
|
45
|
-
`+
|
|
44
|
+
`),this.close()}_(e,t){let s=this.input.slice(0,this.cursor),i=this.input.slice(this.cursor);this.input=`${s}${e}${i}`,this.cursor=s.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let e=this.input.slice(0,this.cursor-1),t=this.input.slice(this.cursor);this.input=`${e}${t}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let e=this.input.slice(0,this.cursor),t=this.input.slice(this.cursor+1);this.input=`${e}${t}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(e,t,s,i){let n,o=s?ic.arrowUp:i?ic.arrowDown:" ",a=t?Ds.cyan().underline(e.title):e.title;return o=(t?Ds.cyan(ic.pointer)+" ":" ")+o,e.description&&(n=` - ${e.description}`,(o.length+a.length+n.length>=this.out.columns||e.description.split(/\r?\n/).length>1)&&(n=`
|
|
45
|
+
`+LI(e.description,{margin:3,width:this.out.columns}))),o+" "+a+Ds.gray(n||"")}render(){if(this.closed)return;this.firstRender?this.out.write(gy.hide):this.out.write(yy(this.outputText,this.out.columns)),super.render();let e=VI(this.select,this.choices.length,this.limit),t=e.startIndex,s=e.endIndex;if(this.outputText=[sc.symbol(this.done,this.aborted,this.exited),Ds.bold(this.msg),sc.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){let i=this.suggestions.slice(t,s).map((n,o)=>this.renderOption(n,this.select===o+t,o===0&&t>0,o+t===s-1&&s<this.choices.length)).join(`
|
|
46
46
|
`);this.outputText+=`
|
|
47
|
-
`+(i||
|
|
47
|
+
`+(i||Ds.gray(this.fallback.title))}this.out.write(MI.line+gy.to(0)+this.outputText)}};by.exports=nc});var Oy=d((bD,Sy)=>{"use strict";var yt=ee(),HI=te(),GI=HI.cursor,zI=rc(),ac=ze(),$y=ac.clear,Ey=ac.style,Cr=ac.figures,oc=class extends zI{constructor(e={}){e.overrideRender=!0,super(e),this.inputValue="",this.clear=$y("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render()}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions())}updateFilteredOptions(){let e=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(s=>this.inputValue?!!(typeof s.title=="string"&&s.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof s.value=="string"&&s.value.toLowerCase().includes(this.inputValue.toLowerCase())):!0);let t=this.filteredOptions.findIndex(s=>s===e);this.cursor=t<0?0:t,this.render()}handleSpaceToggle(){let e=this.filteredOptions[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter(t=>t.selected).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}handleInputChange(e){this.inputValue=this.inputValue+e,this.updateFilteredOptions()}_(e,t){e===" "?this.handleSpaceToggle():this.handleInputChange(e)}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
|
|
48
48
|
Instructions:
|
|
49
|
-
${
|
|
50
|
-
${
|
|
49
|
+
${Cr.arrowUp}/${Cr.arrowDown}: Highlight option
|
|
50
|
+
${Cr.arrowLeft}/${Cr.arrowRight}/[space]: Toggle selection
|
|
51
51
|
[a,b,c]/delete: Filter choices
|
|
52
52
|
enter/return: Complete answer
|
|
53
53
|
`:""}renderCurrentInput(){return`
|
|
54
54
|
Filtered results for: ${this.inputValue?this.inputValue:yt.gray("Enter something to filter")}
|
|
55
|
-
`}renderOption(e,t,s){let i;return t.disabled?i=e===s?yt.gray().underline(t.title):yt.strikethrough().gray(t.title):i=e===s?yt.cyan().underline(t.title):t.title,(t.selected?yt.green(
|
|
55
|
+
`}renderOption(e,t,s){let i;return t.disabled?i=e===s?yt.gray().underline(t.title):yt.strikethrough().gray(t.title):i=e===s?yt.cyan().underline(t.title):t.title,(t.selected?yt.green(Cr.radioOn):Cr.radioOff)+" "+i}renderDoneOrInstructions(){if(this.done)return this.value.filter(t=>t.selected).map(t=>t.title).join(", ");let e=[yt.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&e.push(yt.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(GI.hide),super.render();let e=[Ey.symbol(this.done,this.aborted),yt.bold(this.msg),Ey.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=yt.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+e),this.clear=$y(e,this.out.columns)}};Sy.exports=oc});var Ry=d((wD,Cy)=>{"use strict";var xy=ee(),BI=pt(),Ay=ze(),Ty=Ay.style,KI=Ay.clear,Iy=te(),WI=Iy.erase,Py=Iy.cursor,uc=class extends BI{constructor(e={}){super(e),this.msg=e.message,this.value=e.initial,this.initialValue=!!e.initial,this.yesMsg=e.yes||"yes",this.yesOption=e.yesOption||"(Y/n)",this.noMsg=e.no||"no",this.noOption=e.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
|
|
56
56
|
`),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
57
|
-
`),this.close()}_(e,t){return e.toLowerCase()==="y"?(this.value=!0,this.submit()):e.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(
|
|
58
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var n=!0,o=!1,a;return{s:function(){t=t.call(r)},n:function(){var
|
|
57
|
+
`),this.close()}_(e,t){return e.toLowerCase()==="y"?(this.value=!0,this.submit()):e.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(Py.hide):this.out.write(KI(this.outputText,this.out.columns)),super.render(),this.outputText=[Ty.symbol(this.done,this.aborted),xy.bold(this.msg),Ty.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:xy.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(WI.line+Py.to(0)+this.outputText))}};Cy.exports=uc});var qy=d(($D,Ny)=>{"use strict";Ny.exports={TextPrompt:vg(),SelectPrompt:Eg(),TogglePrompt:Ag(),DatePrompt:iy(),NumberPrompt:hy(),MultiselectPrompt:rc(),AutocompletePrompt:wy(),AutocompleteMultiselectPrompt:Oy(),ConfirmPrompt:Ry()}});var ky=d(jy=>{"use strict";var Se=jy,YI=qy(),an=r=>r;function ot(r,e,t={}){return new Promise((s,i)=>{let n=new YI[r](e),o=t.onAbort||an,a=t.onSubmit||an,u=t.onExit||an;n.on("state",e.onState||an),n.on("submit",c=>s(a(c))),n.on("exit",c=>s(u(c))),n.on("abort",c=>i(o(c)))})}Se.text=r=>ot("TextPrompt",r);Se.password=r=>(r.style="password",Se.text(r));Se.invisible=r=>(r.style="invisible",Se.text(r));Se.number=r=>ot("NumberPrompt",r);Se.date=r=>ot("DatePrompt",r);Se.confirm=r=>ot("ConfirmPrompt",r);Se.list=r=>{let e=r.separator||",";return ot("TextPrompt",r,{onSubmit:t=>t.split(e).map(s=>s.trim())})};Se.toggle=r=>ot("TogglePrompt",r);Se.select=r=>ot("SelectPrompt",r);Se.multiselect=r=>{r.choices=[].concat(r.choices||[]);let e=t=>t.filter(s=>s.selected).map(s=>s.value);return ot("MultiselectPrompt",r,{onAbort:e,onSubmit:e})};Se.autocompleteMultiselect=r=>{r.choices=[].concat(r.choices||[]);let e=t=>t.filter(s=>s.selected).map(s=>s.value);return ot("AutocompleteMultiselectPrompt",r,{onAbort:e,onSubmit:e})};var XI=(r,e)=>Promise.resolve(e.filter(t=>t.title.slice(0,r.length).toLowerCase()===r.toLowerCase()));Se.autocomplete=r=>(r.suggest=r.suggest||XI,r.choices=[].concat(r.choices||[]),ot("AutocompletePrompt",r))});var Gy=d((SD,Hy)=>{"use strict";function Dy(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);e&&(s=s.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,s)}return t}function My(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Dy(Object(t),!0).forEach(function(s){JI(r,s,t[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Dy(Object(t)).forEach(function(s){Object.defineProperty(r,s,Object.getOwnPropertyDescriptor(t,s))})}return r}function JI(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function ZI(r,e){var t=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=QI(r))||e&&r&&typeof r.length=="number"){t&&(r=t);var s=0,i=function(){};return{s:i,n:function(){return s>=r.length?{done:!0}:{done:!1,value:r[s++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
58
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var n=!0,o=!1,a;return{s:function(){t=t.call(r)},n:function(){var c=t.next();return n=c.done,c},e:function(c){o=!0,a=c},f:function(){try{!n&&t.return!=null&&t.return()}finally{if(o)throw a}}}}function QI(r,e){if(r){if(typeof r=="string")return Ly(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Array.from(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ly(r,e)}}function Ly(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,s=new Array(e);t<e;t++)s[t]=r[t];return s}function Vy(r,e,t,s,i,n,o){try{var a=r[n](o),u=a.value}catch(c){t(c);return}a.done?e(u):Promise.resolve(u).then(s,i)}function Fy(r){return function(){var e=this,t=arguments;return new Promise(function(s,i){var n=r.apply(e,t);function o(u){Vy(n,s,i,o,a,"next",u)}function a(u){Vy(n,s,i,o,a,"throw",u)}o(void 0)})}}var cc=ky(),eC=["suggest","format","onState","validate","onRender","type"],Uy=()=>{};function Dt(){return lc.apply(this,arguments)}function lc(){return lc=Fy(function*(r=[],{onSubmit:e=Uy,onCancel:t=Uy}={}){let s={},i=Dt._override||{};r=[].concat(r);let n,o,a,u,c,l,h=(function(){var y=Fy(function*(_,S,O=!1){if(!(!O&&_.validate&&_.validate(S)!==!0))return _.format?yield _.format(S,s):S});return function(S,O){return y.apply(this,arguments)}})();var f=ZI(r),p;try{for(f.s();!(p=f.n()).done;){o=p.value;var m=o;if(u=m.name,c=m.type,typeof c=="function"&&(c=yield c(n,My({},s),o),o.type=c),!!c){for(let y in o){if(eC.includes(y))continue;let _=o[y];o[y]=typeof _=="function"?yield _(n,My({},s),l):_}if(l=o,typeof o.message!="string")throw new Error("prompt message is required");var g=o;if(u=g.name,c=g.type,cc[c]===void 0)throw new Error(`prompt type (${c}) is not defined`);if(i[o.name]!==void 0&&(n=yield h(o,i[o.name]),n!==void 0)){s[u]=n;continue}try{n=Dt._injected?tC(Dt._injected,o.initial):yield cc[c](o),s[u]=n=yield h(o,n,!0),a=yield e(o,n,s)}catch{a=!(yield t(o,s))}if(a)return s}}}catch(y){f.e(y)}finally{f.f()}return s}),lc.apply(this,arguments)}function tC(r,e){let t=r.shift();if(t instanceof Error)throw t;return t===void 0?e:t}function rC(r){Dt._injected=(Dt._injected||[]).concat(r)}function sC(r){Dt._override=Object.assign({},r)}Hy.exports=Object.assign(Dt,{prompt:Dt,prompts:cc,inject:rC,override:sC})});var By=d((OD,zy)=>{"use strict";zy.exports=(r,e)=>{if(!(r.meta&&r.name!=="escape")){if(r.ctrl){if(r.name==="a")return"first";if(r.name==="c"||r.name==="d")return"abort";if(r.name==="e")return"last";if(r.name==="g")return"reset"}if(e){if(r.name==="j")return"down";if(r.name==="k")return"up"}return r.name==="return"||r.name==="enter"?"submit":r.name==="backspace"?"delete":r.name==="delete"?"deleteForward":r.name==="abort"?"abort":r.name==="escape"?"exit":r.name==="tab"?"next":r.name==="pagedown"?"nextPage":r.name==="pageup"?"prevPage":r.name==="home"?"home":r.name==="end"?"end":r.name==="up"?"up":r.name==="down"?"down":r.name==="right"?"right":r.name==="left"?"left":!1}}});var un=d((xD,Ky)=>{"use strict";Ky.exports=r=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),t=new RegExp(e,"g");return typeof r=="string"?r.replace(t,""):r}});var Xy=d((TD,Yy)=>{"use strict";var iC=un(),{erase:Wy,cursor:nC}=te(),oC=r=>[...iC(r)].length;Yy.exports=function(r,e){if(!e)return Wy.line+nC.to(0);let t=0,s=r.split(/\r?\n/);for(let i of s)t+=1+Math.floor(Math.max(oC(i)-1,0)/e);return Wy.lines(t)}});var hc=d((PD,Jy)=>{"use strict";var Ls={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},aC={arrowUp:Ls.arrowUp,arrowDown:Ls.arrowDown,arrowLeft:Ls.arrowLeft,arrowRight:Ls.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},uC=process.platform==="win32"?aC:Ls;Jy.exports=uC});var Qy=d((AD,Zy)=>{"use strict";var Rr=ee(),rr=hc(),dc=Object.freeze({password:{scale:1,render:r=>"*".repeat(r.length)},emoji:{scale:2,render:r=>"\u{1F603}".repeat(r.length)},invisible:{scale:0,render:r=>""},default:{scale:1,render:r=>`${r}`}}),cC=r=>dc[r]||dc.default,Vs=Object.freeze({aborted:Rr.red(rr.cross),done:Rr.green(rr.tick),exited:Rr.yellow(rr.cross),default:Rr.cyan("?")}),lC=(r,e,t)=>e?Vs.aborted:t?Vs.exited:r?Vs.done:Vs.default,hC=r=>Rr.gray(r?rr.ellipsis:rr.pointerSmall),dC=(r,e)=>Rr.gray(r?e?rr.pointerSmall:"+":rr.line);Zy.exports={styles:dc,render:cC,symbols:Vs,symbol:lC,delimiter:hC,item:dC}});var t0=d((ID,e0)=>{"use strict";var fC=un();e0.exports=function(r,e){let t=String(fC(r)||"").split(/\r?\n/);return e?t.map(s=>Math.ceil(s.length/e)).reduce((s,i)=>s+i):t.length}});var s0=d((CD,r0)=>{"use strict";r0.exports=(r,e={})=>{let t=Number.isSafeInteger(parseInt(e.margin))?new Array(parseInt(e.margin)).fill(" ").join(""):e.margin||"",s=e.width;return(r||"").split(/\r?\n/g).map(i=>i.split(/\s+/g).reduce((n,o)=>(o.length+t.length>=s||n[n.length-1].length+o.length+1<s?n[n.length-1]+=` ${o}`:n.push(`${t}${o}`),n),[t]).join(`
|
|
59
59
|
`)).join(`
|
|
60
|
-
`)}});var
|
|
60
|
+
`)}});var n0=d((RD,i0)=>{"use strict";i0.exports=(r,e,t)=>{t=t||e;let s=Math.min(e-t,r-Math.floor(t/2));s<0&&(s=0);let i=Math.min(s+t,e);return{startIndex:s,endIndex:i}}});var Be=d((ND,o0)=>{"use strict";o0.exports={action:By(),clear:Xy(),style:Qy(),strip:un(),figures:hc(),lines:t0(),wrap:s0(),entriesToDisplay:n0()}});var _t=d((qD,u0)=>{"use strict";var a0=require("readline"),{action:pC}=Be(),mC=require("events"),{beep:gC,cursor:yC}=te(),_C=ee(),fc=class extends mC{constructor(e={}){super(),this.firstRender=!0,this.in=e.stdin||process.stdin,this.out=e.stdout||process.stdout,this.onRender=(e.onRender||(()=>{})).bind(this);let t=a0.createInterface({input:this.in,escapeCodeTimeout:50});a0.emitKeypressEvents(this.in,t),this.in.isTTY&&this.in.setRawMode(!0);let s=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,i=(n,o)=>{let a=pC(o,s);a===!1?this._&&this._(n,o):typeof this[a]=="function"?this[a](o):this.bell()};this.close=()=>{this.out.write(yC.show),this.in.removeListener("keypress",i),this.in.isTTY&&this.in.setRawMode(!1),t.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",i)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(gC)}render(){this.onRender(_C),this.firstRender&&(this.firstRender=!1)}};u0.exports=fc});var l0=d((jD,c0)=>{var cn=ee(),vC=_t(),{erase:bC,cursor:Fs}=te(),{style:pc,clear:mc,lines:wC,figures:$C}=Be(),gc=class extends vC{constructor(e={}){super(e),this.transform=pc.render(e.style),this.scale=this.transform.scale,this.msg=e.message,this.initial=e.initial||"",this.validator=e.validate||(()=>!0),this.value="",this.errorMsg=e.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=mc("",this.out.columns),this.render()}set value(e){!e&&this.initial?(this.placeholder=!0,this.rendered=cn.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(e)),this._value=e,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write(`
|
|
61
61
|
`),this.close()}async validate(){let e=await this.validator(this.value);typeof e=="string"&&(this.errorMsg=e,e=!1),this.error=!e}async submit(){if(this.value=this.value||this.initial,this.cursorOffset=0,this.cursor=this.rendered.length,await this.validate(),this.error){this.red=!0,this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
62
|
-
`),this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(e){this.placeholder||(this.cursor=this.cursor+e,this.cursorOffset+=e)}_(e,t){let s=this.value.slice(0,this.cursor),i=this.value.slice(this.cursor);this.value=`${s}${e}${i}`,this.red=!1,this.cursor=this.placeholder?0:s.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let e=this.value.slice(0,this.cursor-1),t=this.value.slice(this.cursor);this.value=`${e}${t}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let e=this.value.slice(0,this.cursor),t=this.value.slice(this.cursor+1);this.value=`${e}${t}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(
|
|
62
|
+
`),this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(e){this.placeholder||(this.cursor=this.cursor+e,this.cursorOffset+=e)}_(e,t){let s=this.value.slice(0,this.cursor),i=this.value.slice(this.cursor);this.value=`${s}${e}${i}`,this.red=!1,this.cursor=this.placeholder?0:s.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let e=this.value.slice(0,this.cursor-1),t=this.value.slice(this.cursor);this.value=`${e}${t}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let e=this.value.slice(0,this.cursor),t=this.value.slice(this.cursor+1);this.value=`${e}${t}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(Fs.down(wC(this.outputError,this.out.columns)-1)+mc(this.outputError,this.out.columns)),this.out.write(mc(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[pc.symbol(this.done,this.aborted),cn.bold(this.msg),pc.delimiter(this.done),this.red?cn.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
|
|
63
63
|
`).reduce((e,t,s)=>e+`
|
|
64
|
-
${s?" "
|
|
64
|
+
${s?" ":$C.pointerSmall} ${cn.red().italic(t)}`,"")),this.out.write(bC.line+Fs.to(0)+this.outputText+Fs.save+this.outputError+Fs.restore+Fs.move(this.cursorOffset,0)))}};c0.exports=gc});var p0=d((kD,f0)=>{"use strict";var vt=ee(),EC=_t(),{style:h0,clear:d0,figures:ln,wrap:SC,entriesToDisplay:OC}=Be(),{cursor:xC}=te(),yc=class extends EC{constructor(e={}){super(e),this.msg=e.message,this.hint=e.hint||"- Use arrow-keys. Return to submit.",this.warn=e.warn||"- This option is disabled",this.cursor=e.initial||0,this.choices=e.choices.map((t,s)=>(typeof t=="string"&&(t={title:t,value:s}),{title:t&&(t.title||t.value||t),value:t&&(t.value===void 0?s:t.value),description:t&&t.description,selected:t&&t.selected,disabled:t&&t.disabled})),this.optionsPerPage=e.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=d0("",this.out.columns),this.render()}moveCursor(e){this.cursor=e,this.value=this.choices[e].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
|
|
65
65
|
`),this.close()}submit(){this.selection.disabled?this.bell():(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
66
|
-
`),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(e,t){if(e===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(
|
|
67
|
-
`;for(let s=e;s<t;s++){let i,n,o="",a=this.choices[s];s===e&&e>0?n=
|
|
68
|
-
`+
|
|
69
|
-
`}}this.out.write(this.outputText)}};
|
|
66
|
+
`),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(e,t){if(e===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(xC.hide):this.out.write(d0(this.outputText,this.out.columns)),super.render();let{startIndex:e,endIndex:t}=OC(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[h0.symbol(this.done,this.aborted),vt.bold(this.msg),h0.delimiter(!1),this.done?this.selection.title:this.selection.disabled?vt.yellow(this.warn):vt.gray(this.hint)].join(" "),!this.done){this.outputText+=`
|
|
67
|
+
`;for(let s=e;s<t;s++){let i,n,o="",a=this.choices[s];s===e&&e>0?n=ln.arrowUp:s===t-1&&t<this.choices.length?n=ln.arrowDown:n=" ",a.disabled?(i=this.cursor===s?vt.gray().underline(a.title):vt.strikethrough().gray(a.title),n=(this.cursor===s?vt.bold().gray(ln.pointer)+" ":" ")+n):(i=this.cursor===s?vt.cyan().underline(a.title):a.title,n=(this.cursor===s?vt.cyan(ln.pointer)+" ":" ")+n,a.description&&this.cursor===s&&(o=` - ${a.description}`,(n.length+i.length+o.length>=this.out.columns||a.description.split(/\r?\n/).length>1)&&(o=`
|
|
68
|
+
`+SC(a.description,{margin:3,width:this.out.columns})))),this.outputText+=`${n} ${i}${vt.gray(o)}
|
|
69
|
+
`}}this.out.write(this.outputText)}};f0.exports=yc});var _0=d((DD,y0)=>{var hn=ee(),TC=_t(),{style:m0,clear:PC}=Be(),{cursor:g0,erase:AC}=te(),_c=class extends TC{constructor(e={}){super(e),this.msg=e.message,this.value=!!e.initial,this.active=e.active||"on",this.inactive=e.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
|
|
70
70
|
`),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
71
|
-
`),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(e,t){if(e===" ")this.value=!this.value;else if(e==="1")this.value=!0;else if(e==="0")this.value=!1;else return this.bell();this.render()}render(){this.closed||(this.firstRender?this.out.write(
|
|
71
|
+
`),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(e,t){if(e===" ")this.value=!this.value;else if(e==="1")this.value=!0;else if(e==="0")this.value=!1;else return this.bell();this.render()}render(){this.closed||(this.firstRender?this.out.write(g0.hide):this.out.write(PC(this.outputText,this.out.columns)),super.render(),this.outputText=[m0.symbol(this.done,this.aborted),hn.bold(this.msg),m0.delimiter(this.done),this.value?this.inactive:hn.cyan().underline(this.inactive),hn.gray("/"),this.value?hn.cyan().underline(this.active):this.active].join(" "),this.out.write(AC.line+g0.to(0)+this.outputText))}};y0.exports=_c});var at=d((MD,v0)=>{"use strict";var vc=class r{constructor({token:e,date:t,parts:s,locales:i}){this.token=e,this.date=t||new Date,this.parts=s||[this],this.locales=i||{}}up(){}down(){}next(){let e=this.parts.indexOf(this);return this.parts.find((t,s)=>s>e&&t instanceof r)}setTo(e){}prev(){let e=[].concat(this.parts).reverse(),t=e.indexOf(this);return e.find((s,i)=>i>t&&s instanceof r)}toString(){return String(this.date)}};v0.exports=vc});var w0=d((LD,b0)=>{"use strict";var IC=at(),bc=class extends IC{constructor(e={}){super(e)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let e=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?e.toUpperCase():e}};b0.exports=bc});var E0=d((VD,$0)=>{"use strict";var CC=at(),RC=r=>(r=r%10,r===1?"st":r===2?"nd":r===3?"rd":"th"),wc=class extends CC{constructor(e={}){super(e)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(e){this.date.setDate(parseInt(e.substr(-2)))}toString(){let e=this.date.getDate(),t=this.date.getDay();return this.token==="DD"?String(e).padStart(2,"0"):this.token==="Do"?e+RC(e):this.token==="d"?t+1:this.token==="ddd"?this.locales.weekdaysShort[t]:this.token==="dddd"?this.locales.weekdays[t]:e}};$0.exports=wc});var O0=d((FD,S0)=>{"use strict";var NC=at(),$c=class extends NC{constructor(e={}){super(e)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(e){this.date.setHours(parseInt(e.substr(-2)))}toString(){let e=this.date.getHours();return/h/.test(this.token)&&(e=e%12||12),this.token.length>1?String(e).padStart(2,"0"):e}};S0.exports=$c});var T0=d((UD,x0)=>{"use strict";var qC=at(),Ec=class extends qC{constructor(e={}){super(e)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(e){this.date.setMilliseconds(parseInt(e.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}};x0.exports=Ec});var A0=d((HD,P0)=>{"use strict";var jC=at(),Sc=class extends jC{constructor(e={}){super(e)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(e){this.date.setMinutes(parseInt(e.substr(-2)))}toString(){let e=this.date.getMinutes();return this.token.length>1?String(e).padStart(2,"0"):e}};P0.exports=Sc});var C0=d((GD,I0)=>{"use strict";var kC=at(),Oc=class extends kC{constructor(e={}){super(e)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(e){e=parseInt(e.substr(-2))-1,this.date.setMonth(e<0?0:e)}toString(){let e=this.date.getMonth(),t=this.token.length;return t===2?String(e+1).padStart(2,"0"):t===3?this.locales.monthsShort[e]:t===4?this.locales.months[e]:String(e+1)}};I0.exports=Oc});var N0=d((zD,R0)=>{"use strict";var DC=at(),xc=class extends DC{constructor(e={}){super(e)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(e){this.date.setSeconds(parseInt(e.substr(-2)))}toString(){let e=this.date.getSeconds();return this.token.length>1?String(e).padStart(2,"0"):e}};R0.exports=xc});var j0=d((BD,q0)=>{"use strict";var MC=at(),Tc=class extends MC{constructor(e={}){super(e)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(e){this.date.setFullYear(e.substr(-4))}toString(){let e=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?e.substr(-2):e}};q0.exports=Tc});var D0=d((KD,k0)=>{"use strict";k0.exports={DatePart:at(),Meridiem:w0(),Day:E0(),Hours:O0(),Milliseconds:T0(),Minutes:A0(),Month:C0(),Seconds:N0(),Year:j0()}});var G0=d((WD,H0)=>{"use strict";var Pc=ee(),LC=_t(),{style:M0,clear:L0,figures:VC}=Be(),{erase:FC,cursor:V0}=te(),{DatePart:F0,Meridiem:UC,Day:HC,Hours:GC,Milliseconds:zC,Minutes:BC,Month:KC,Seconds:WC,Year:YC}=D0(),XC=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,U0={1:({token:r})=>r.replace(/\\(.)/g,"$1"),2:r=>new HC(r),3:r=>new KC(r),4:r=>new YC(r),5:r=>new UC(r),6:r=>new GC(r),7:r=>new BC(r),8:r=>new WC(r),9:r=>new zC(r)},JC={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")},Ac=class extends LC{constructor(e={}){super(e),this.msg=e.message,this.cursor=0,this.typed="",this.locales=Object.assign(JC,e.locales),this._date=e.initial||new Date,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.mask=e.mask||"YYYY-MM-DD HH:mm:ss",this.clear=L0("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(e){e&&this._date.setTime(e.getTime())}set mask(e){let t;for(this.parts=[];t=XC.exec(e);){let i=t.shift(),n=t.findIndex(o=>o!=null);this.parts.push(n in U0?U0[n]({token:t[n]||i,date:this.date,parts:this.parts,locales:this.locales}):t[n]||i)}let s=this.parts.reduce((i,n)=>(typeof n=="string"&&typeof i[i.length-1]=="string"?i[i.length-1]+=n:i.push(n),i),[]);this.parts.splice(0),this.parts.push(...s),this.reset()}moveCursor(e){this.typed="",this.cursor=e,this.fire()}reset(){this.moveCursor(this.parts.findIndex(e=>e instanceof F0)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
|
|
72
72
|
`),this.close()}async validate(){let e=await this.validator(this.value);typeof e=="string"&&(this.errorMsg=e,e=!1),this.error=!e}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
73
|
-
`),this.close()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let e=this.parts[this.cursor].prev();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}right(){let e=this.parts[this.cursor].next();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}next(){let e=this.parts[this.cursor].next();this.moveCursor(e?this.parts.indexOf(e):this.parts.findIndex(t=>t instanceof
|
|
73
|
+
`),this.close()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let e=this.parts[this.cursor].prev();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}right(){let e=this.parts[this.cursor].next();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}next(){let e=this.parts[this.cursor].next();this.moveCursor(e?this.parts.indexOf(e):this.parts.findIndex(t=>t instanceof F0)),this.render()}_(e){/\d/.test(e)&&(this.typed+=e,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(V0.hide):this.out.write(L0(this.outputText,this.out.columns)),super.render(),this.outputText=[M0.symbol(this.done,this.aborted),Pc.bold(this.msg),M0.delimiter(!1),this.parts.reduce((e,t,s)=>e.concat(s===this.cursor&&!this.done?Pc.cyan().underline(t.toString()):t),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
|
|
74
74
|
`).reduce((e,t,s)=>e+`
|
|
75
|
-
${s?" ":
|
|
75
|
+
${s?" ":VC.pointerSmall} ${Pc.red().italic(t)}`,"")),this.out.write(FC.line+V0.to(0)+this.outputText))}};H0.exports=Ac});var W0=d((YD,K0)=>{var dn=ee(),ZC=_t(),{cursor:fn,erase:QC}=te(),{style:Ic,figures:eR,clear:z0,lines:tR}=Be(),rR=/[0-9]/,Cc=r=>r!==void 0,B0=(r,e)=>{let t=Math.pow(10,e);return Math.round(r*t)/t},Rc=class extends ZC{constructor(e={}){super(e),this.transform=Ic.render(e.style),this.msg=e.message,this.initial=Cc(e.initial)?e.initial:"",this.float=!!e.float,this.round=e.round||2,this.inc=e.increment||1,this.min=Cc(e.min)?e.min:-1/0,this.max=Cc(e.max)?e.max:1/0,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(e){!e&&e!==0?(this.placeholder=!0,this.rendered=dn.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=!1,this.rendered=this.transform.render(`${B0(e,this.round)}`),this._value=B0(e,this.round)),this.fire()}get value(){return this._value}parse(e){return this.float?parseFloat(e):parseInt(e)}valid(e){return e==="-"||e==="."&&this.float||rR.test(e)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let e=this.value;this.value=e!==""?e:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
|
|
76
76
|
`),this.close()}async validate(){let e=await this.validator(this.value);typeof e=="string"&&(this.errorMsg=e,e=!1),this.error=!e}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}let e=this.value;this.value=e!==""?e:this.initial,this.done=!0,this.aborted=!1,this.error=!1,this.fire(),this.render(),this.out.write(`
|
|
77
|
-
`),this.close()}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let e=this.value.toString();if(e.length===0)return this.bell();this.value=this.parse(e=e.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(e,t){if(!this.valid(e))return this.bell();let s=Date.now();if(s-this.lastHit>1e3&&(this.typed=""),this.typed+=e,this.lastHit=s,this.color="cyan",e===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(
|
|
77
|
+
`),this.close()}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let e=this.value.toString();if(e.length===0)return this.bell();this.value=this.parse(e=e.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(e,t){if(!this.valid(e))return this.bell();let s=Date.now();if(s-this.lastHit>1e3&&(this.typed=""),this.typed+=e,this.lastHit=s,this.color="cyan",e===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(fn.down(tR(this.outputError,this.out.columns)-1)+z0(this.outputError,this.out.columns)),this.out.write(z0(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[Ic.symbol(this.done,this.aborted),dn.bold(this.msg),Ic.delimiter(this.done),!this.done||!this.done&&!this.placeholder?dn[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
|
|
78
78
|
`).reduce((e,t,s)=>e+`
|
|
79
|
-
${s?" "
|
|
79
|
+
${s?" ":eR.pointerSmall} ${dn.red().italic(t)}`,"")),this.out.write(QC.line+fn.to(0)+this.outputText+fn.save+this.outputError+fn.restore))}};K0.exports=Rc});var qc=d((XD,J0)=>{"use strict";var ut=ee(),{cursor:sR}=te(),iR=_t(),{clear:Y0,figures:Mt,style:X0,wrap:nR,entriesToDisplay:oR}=Be(),Nc=class extends iR{constructor(e={}){super(e),this.msg=e.message,this.cursor=e.cursor||0,this.scrollIndex=e.cursor||0,this.hint=e.hint||"",this.warn=e.warn||"- This option is disabled -",this.minSelected=e.min,this.showMinError=!1,this.maxChoices=e.max,this.instructions=e.instructions,this.optionsPerPage=e.optionsPerPage||10,this.value=e.choices.map((t,s)=>(typeof t=="string"&&(t={title:t,value:s}),{title:t&&(t.title||t.value||t),description:t&&t.description,value:t&&(t.value===void 0?s:t.value),selected:t&&t.selected,disabled:t&&t.disabled})),this.clear=Y0("",this.out.columns),e.overrideRender||this.render()}reset(){this.value.map(e=>!e.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter(e=>e.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
|
|
80
80
|
`),this.close()}submit(){let e=this.value.filter(t=>t.selected);this.minSelected&&e.length<this.minSelected?(this.showMinError=!0,this.render()):(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
81
81
|
`),this.close())}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.render()}up(){this.cursor===0?this.cursor=this.value.length-1:this.cursor--,this.render()}down(){this.cursor===this.value.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){let e=this.value[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter(t=>t.selected).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();let e=!this.value[this.cursor].selected;this.value.filter(t=>!t.disabled).forEach(t=>t.selected=e),this.render()}_(e,t){if(e===" ")this.handleSpaceToggle();else if(e==="a")this.toggleAll();else return this.bell()}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
|
|
82
82
|
Instructions:
|
|
83
|
-
${
|
|
84
|
-
${
|
|
83
|
+
${Mt.arrowUp}/${Mt.arrowDown}: Highlight option
|
|
84
|
+
${Mt.arrowLeft}/${Mt.arrowRight}/[space]: Toggle selection
|
|
85
85
|
`+(this.maxChoices===void 0?` a: Toggle all
|
|
86
|
-
`:"")+" enter/return: Complete answer":""}renderOption(e,t,s,i){let n=(t.selected?ut.green(
|
|
87
|
-
`+
|
|
86
|
+
`:"")+" enter/return: Complete answer":""}renderOption(e,t,s,i){let n=(t.selected?ut.green(Mt.radioOn):Mt.radioOff)+" "+i+" ",o,a;return t.disabled?o=e===s?ut.gray().underline(t.title):ut.strikethrough().gray(t.title):(o=e===s?ut.cyan().underline(t.title):t.title,e===s&&t.description&&(a=` - ${t.description}`,(n.length+o.length+a.length>=this.out.columns||t.description.split(/\r?\n/).length>1)&&(a=`
|
|
87
|
+
`+nR(t.description,{margin:n.length,width:this.out.columns})))),n+o+ut.gray(a||"")}paginateOptions(e){if(e.length===0)return ut.red("No matches for this query.");let{startIndex:t,endIndex:s}=oR(this.cursor,e.length,this.optionsPerPage),i,n=[];for(let o=t;o<s;o++)o===t&&t>0?i=Mt.arrowUp:o===s-1&&s<e.length?i=Mt.arrowDown:i=" ",n.push(this.renderOption(this.cursor,e[o],o,i));return`
|
|
88
88
|
`+n.join(`
|
|
89
|
-
`)}renderOptions(e){return this.done?"":this.paginateOptions(e)}renderDoneOrInstructions(){if(this.done)return this.value.filter(t=>t.selected).map(t=>t.title).join(", ");let e=[ut.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&e.push(ut.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(
|
|
89
|
+
`)}renderOptions(e){return this.done?"":this.paginateOptions(e)}renderDoneOrInstructions(){if(this.done)return this.value.filter(t=>t.selected).map(t=>t.title).join(", ");let e=[ut.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&e.push(ut.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(sR.hide),super.render();let e=[X0.symbol(this.done,this.aborted),ut.bold(this.msg),X0.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=ut.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.value),this.out.write(this.clear+e),this.clear=Y0(e,this.out.columns)}};J0.exports=Nc});var r_=d((JD,t_)=>{"use strict";var Us=ee(),aR=_t(),{erase:uR,cursor:Z0}=te(),{style:jc,clear:Q0,figures:kc,wrap:cR,entriesToDisplay:lR}=Be(),e_=(r,e)=>r[e]&&(r[e].value||r[e].title||r[e]),hR=(r,e)=>r[e]&&(r[e].title||r[e].value||r[e]),dR=(r,e)=>{let t=r.findIndex(s=>s.value===e||s.title===e);return t>-1?t:void 0},Dc=class extends aR{constructor(e={}){super(e),this.msg=e.message,this.suggest=e.suggest,this.choices=e.choices,this.initial=typeof e.initial=="number"?e.initial:dR(e.choices,e.initial),this.select=this.initial||e.cursor||0,this.i18n={noMatches:e.noMatches||"no matches found"},this.fallback=e.fallback||this.initial,this.clearFirst=e.clearFirst||!1,this.suggestions=[],this.input="",this.limit=e.limit||10,this.cursor=0,this.transform=jc.render(e.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=Q0("",this.out.columns),this.complete(this.render),this.render()}set fallback(e){this._fb=Number.isSafeInteger(parseInt(e))?parseInt(e):e}get fallback(){let e;return typeof this._fb=="number"?e=this.choices[this._fb]:typeof this._fb=="string"&&(e={title:this._fb}),e||this._fb||{title:this.i18n.noMatches}}moveSelect(e){this.select=e,this.suggestions.length>0?this.value=e_(this.suggestions,e):this.value=this.fallback.value,this.fire()}async complete(e){let t=this.completing=this.suggest(this.input,this.choices),s=await t;if(this.completing!==t)return;this.suggestions=s.map((n,o,a)=>({title:hR(a,o),value:e_(a,o),description:n.description})),this.completing=!1;let i=Math.max(s.length-1,0);this.moveSelect(Math.min(i,this.select)),e&&e()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
90
90
|
`),this.close())}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write(`
|
|
91
91
|
`),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write(`
|
|
92
|
-
`),this.close()}_(e,t){let s=this.input.slice(0,this.cursor),i=this.input.slice(this.cursor);this.input=`${s}${e}${i}`,this.cursor=s.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let e=this.input.slice(0,this.cursor-1),t=this.input.slice(this.cursor);this.input=`${e}${t}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let e=this.input.slice(0,this.cursor),t=this.input.slice(this.cursor+1);this.input=`${e}${t}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(e,t,s,i){let n,o=s?
|
|
93
|
-
`+
|
|
92
|
+
`),this.close()}_(e,t){let s=this.input.slice(0,this.cursor),i=this.input.slice(this.cursor);this.input=`${s}${e}${i}`,this.cursor=s.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let e=this.input.slice(0,this.cursor-1),t=this.input.slice(this.cursor);this.input=`${e}${t}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let e=this.input.slice(0,this.cursor),t=this.input.slice(this.cursor+1);this.input=`${e}${t}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(e,t,s,i){let n,o=s?kc.arrowUp:i?kc.arrowDown:" ",a=t?Us.cyan().underline(e.title):e.title;return o=(t?Us.cyan(kc.pointer)+" ":" ")+o,e.description&&(n=` - ${e.description}`,(o.length+a.length+n.length>=this.out.columns||e.description.split(/\r?\n/).length>1)&&(n=`
|
|
93
|
+
`+cR(e.description,{margin:3,width:this.out.columns}))),o+" "+a+Us.gray(n||"")}render(){if(this.closed)return;this.firstRender?this.out.write(Z0.hide):this.out.write(Q0(this.outputText,this.out.columns)),super.render();let{startIndex:e,endIndex:t}=lR(this.select,this.choices.length,this.limit);if(this.outputText=[jc.symbol(this.done,this.aborted,this.exited),Us.bold(this.msg),jc.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){let s=this.suggestions.slice(e,t).map((i,n)=>this.renderOption(i,this.select===n+e,n===0&&e>0,n+e===t-1&&t<this.choices.length)).join(`
|
|
94
94
|
`);this.outputText+=`
|
|
95
|
-
`+(s||
|
|
95
|
+
`+(s||Us.gray(this.fallback.title))}this.out.write(uR.line+Z0.to(0)+this.outputText)}};t_.exports=Dc});var o_=d((ZD,n_)=>{"use strict";var bt=ee(),{cursor:fR}=te(),pR=qc(),{clear:s_,style:i_,figures:Nr}=Be(),Mc=class extends pR{constructor(e={}){e.overrideRender=!0,super(e),this.inputValue="",this.clear=s_("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render()}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions())}updateFilteredOptions(){let e=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(s=>this.inputValue?!!(typeof s.title=="string"&&s.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof s.value=="string"&&s.value.toLowerCase().includes(this.inputValue.toLowerCase())):!0);let t=this.filteredOptions.findIndex(s=>s===e);this.cursor=t<0?0:t,this.render()}handleSpaceToggle(){let e=this.filteredOptions[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter(t=>t.selected).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}handleInputChange(e){this.inputValue=this.inputValue+e,this.updateFilteredOptions()}_(e,t){e===" "?this.handleSpaceToggle():this.handleInputChange(e)}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
|
|
96
96
|
Instructions:
|
|
97
|
-
${
|
|
98
|
-
${
|
|
97
|
+
${Nr.arrowUp}/${Nr.arrowDown}: Highlight option
|
|
98
|
+
${Nr.arrowLeft}/${Nr.arrowRight}/[space]: Toggle selection
|
|
99
99
|
[a,b,c]/delete: Filter choices
|
|
100
100
|
enter/return: Complete answer
|
|
101
101
|
`:""}renderCurrentInput(){return`
|
|
102
102
|
Filtered results for: ${this.inputValue?this.inputValue:bt.gray("Enter something to filter")}
|
|
103
|
-
`}renderOption(e,t,s){let i;return t.disabled?i=e===s?bt.gray().underline(t.title):bt.strikethrough().gray(t.title):i=e===s?bt.cyan().underline(t.title):t.title,(t.selected?bt.green(
|
|
103
|
+
`}renderOption(e,t,s){let i;return t.disabled?i=e===s?bt.gray().underline(t.title):bt.strikethrough().gray(t.title):i=e===s?bt.cyan().underline(t.title):t.title,(t.selected?bt.green(Nr.radioOn):Nr.radioOff)+" "+i}renderDoneOrInstructions(){if(this.done)return this.value.filter(t=>t.selected).map(t=>t.title).join(", ");let e=[bt.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&e.push(bt.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(fR.hide),super.render();let e=[i_.symbol(this.done,this.aborted),bt.bold(this.msg),i_.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=bt.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+e),this.clear=s_(e,this.out.columns)}};n_.exports=Mc});var h_=d((QD,l_)=>{var a_=ee(),mR=_t(),{style:u_,clear:gR}=Be(),{erase:yR,cursor:c_}=te(),Lc=class extends mR{constructor(e={}){super(e),this.msg=e.message,this.value=e.initial,this.initialValue=!!e.initial,this.yesMsg=e.yes||"yes",this.yesOption=e.yesOption||"(Y/n)",this.noMsg=e.no||"no",this.noOption=e.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
|
|
104
104
|
`),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
105
|
-
`),this.close()}_(e,t){return e.toLowerCase()==="y"?(this.value=!0,this.submit()):e.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(
|
|
106
|
-
`)}displayWidth(e){return
|
|
105
|
+
`),this.close()}_(e,t){return e.toLowerCase()==="y"?(this.value=!0,this.submit()):e.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(c_.hide):this.out.write(gR(this.outputText,this.out.columns)),super.render(),this.outputText=[u_.symbol(this.done,this.aborted),a_.bold(this.msg),u_.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:a_.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(yR.line+c_.to(0)+this.outputText))}};l_.exports=Lc});var f_=d((e2,d_)=>{"use strict";d_.exports={TextPrompt:l0(),SelectPrompt:p0(),TogglePrompt:_0(),DatePrompt:G0(),NumberPrompt:W0(),MultiselectPrompt:qc(),AutocompletePrompt:r_(),AutocompleteMultiselectPrompt:o_(),ConfirmPrompt:h_()}});var m_=d(p_=>{"use strict";var Oe=p_,_R=f_(),pn=r=>r;function ct(r,e,t={}){return new Promise((s,i)=>{let n=new _R[r](e),o=t.onAbort||pn,a=t.onSubmit||pn,u=t.onExit||pn;n.on("state",e.onState||pn),n.on("submit",c=>s(a(c))),n.on("exit",c=>s(u(c))),n.on("abort",c=>i(o(c)))})}Oe.text=r=>ct("TextPrompt",r);Oe.password=r=>(r.style="password",Oe.text(r));Oe.invisible=r=>(r.style="invisible",Oe.text(r));Oe.number=r=>ct("NumberPrompt",r);Oe.date=r=>ct("DatePrompt",r);Oe.confirm=r=>ct("ConfirmPrompt",r);Oe.list=r=>{let e=r.separator||",";return ct("TextPrompt",r,{onSubmit:t=>t.split(e).map(s=>s.trim())})};Oe.toggle=r=>ct("TogglePrompt",r);Oe.select=r=>ct("SelectPrompt",r);Oe.multiselect=r=>{r.choices=[].concat(r.choices||[]);let e=t=>t.filter(s=>s.selected).map(s=>s.value);return ct("MultiselectPrompt",r,{onAbort:e,onSubmit:e})};Oe.autocompleteMultiselect=r=>{r.choices=[].concat(r.choices||[]);let e=t=>t.filter(s=>s.selected).map(s=>s.value);return ct("AutocompleteMultiselectPrompt",r,{onAbort:e,onSubmit:e})};var vR=(r,e)=>Promise.resolve(e.filter(t=>t.title.slice(0,r.length).toLowerCase()===r.toLowerCase()));Oe.autocomplete=r=>(r.suggest=r.suggest||vR,r.choices=[].concat(r.choices||[]),ct("AutocompletePrompt",r))});var __=d((r2,y_)=>{"use strict";var Vc=m_(),bR=["suggest","format","onState","validate","onRender","type"],g_=()=>{};async function Lt(r=[],{onSubmit:e=g_,onCancel:t=g_}={}){let s={},i=Lt._override||{};r=[].concat(r);let n,o,a,u,c,l,h=async(f,p,m=!1)=>{if(!(!m&&f.validate&&f.validate(p)!==!0))return f.format?await f.format(p,s):p};for(o of r)if({name:u,type:c}=o,typeof c=="function"&&(c=await c(n,{...s},o),o.type=c),!!c){for(let f in o){if(bR.includes(f))continue;let p=o[f];o[f]=typeof p=="function"?await p(n,{...s},l):p}if(l=o,typeof o.message!="string")throw new Error("prompt message is required");if({name:u,type:c}=o,Vc[c]===void 0)throw new Error(`prompt type (${c}) is not defined`);if(i[o.name]!==void 0&&(n=await h(o,i[o.name]),n!==void 0)){s[u]=n;continue}try{n=Lt._injected?wR(Lt._injected,o.initial):await Vc[c](o),s[u]=n=await h(o,n,!0),a=await e(o,n,s)}catch{a=!await t(o,s)}if(a)return s}return s}function wR(r,e){let t=r.shift();if(t instanceof Error)throw t;return t===void 0?e:t}function $R(r){Lt._injected=(Lt._injected||[]).concat(r)}function ER(r){Lt._override=Object.assign({},r)}y_.exports=Object.assign(Lt,{prompt:Lt,prompts:Vc,inject:$R,override:ER})});var b_=d((s2,v_)=>{function SR(r){r=(Array.isArray(r)?r:r.split(".")).map(Number);let e=0,t=process.versions.node.split(".").map(Number);for(;e<r.length;e++){if(t[e]>r[e])return!1;if(r[e]>t[e])return!0}return!1}v_.exports=SR("8.6.0")?Gy():__()});var zs=d(Bc=>{var _n=class extends Error{constructor(e,t,s){super(s),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},zc=class extends _n{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};Bc.CommanderError=_n;Bc.InvalidArgumentError=zc});var vn=d(Wc=>{var{InvalidArgumentError:LR}=zs(),Kc=class{constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.endsWith("...")&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:(t.push(e),t)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,s)=>{if(!this.argChoices.includes(t))throw new LR(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(t,s):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function VR(r){let e=r.name()+(r.variadic===!0?"...":"");return r.required?"<"+e+">":"["+e+"]"}Wc.Argument=Kc;Wc.humanReadableArgName=VR});var Jc=d(Xc=>{var{humanReadableArgName:FR}=vn(),Yc=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){let t=e.commands.filter(i=>!i._hidden),s=e._getHelpCommand();return s&&!s._hidden&&t.push(s),this.sortSubcommands&&t.sort((i,n)=>i.name().localeCompare(n.name())),t}compareOptions(e,t){let s=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return s(e).localeCompare(s(t))}visibleOptions(e){let t=e.options.filter(i=>!i.hidden),s=e._getHelpOption();if(s&&!s.hidden){let i=s.short&&e._findOption(s.short),n=s.long&&e._findOption(s.long);!i&&!n?t.push(s):s.long&&!n?t.push(e.createOption(s.long,s.description)):s.short&&!i&&t.push(e.createOption(s.short,s.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let s=e.parent;s;s=s.parent){let i=s.options.filter(n=>!n.hidden);t.push(...i)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||""}),e.registeredArguments.find(t=>t.description)?e.registeredArguments:[]}subcommandTerm(e){let t=e.registeredArguments.map(s=>FR(s)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((s,i)=>Math.max(s,this.displayWidth(t.styleSubcommandTerm(t.subcommandTerm(i)))),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((s,i)=>Math.max(s,this.displayWidth(t.styleOptionTerm(t.optionTerm(i)))),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((s,i)=>Math.max(s,this.displayWidth(t.styleOptionTerm(t.optionTerm(i)))),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((s,i)=>Math.max(s,this.displayWidth(t.styleArgumentTerm(t.argumentTerm(i)))),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let s="";for(let i=e.parent;i;i=i.parent)s=i.name()+" "+s;return s+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(s=>JSON.stringify(s)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0){let s=`(${t.join(", ")})`;return e.description?`${e.description} ${s}`:s}return e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(s=>JSON.stringify(s)).join(", ")}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let s=`(${t.join(", ")})`;return e.description?`${e.description} ${s}`:s}return e.description}formatItemList(e,t,s){return t.length===0?[]:[s.styleTitle(e),...t,""]}groupItems(e,t,s){let i=new Map;return e.forEach(n=>{let o=s(n);i.has(o)||i.set(o,[])}),t.forEach(n=>{let o=s(n);i.has(o)||i.set(o,[]),i.get(o).push(n)}),i}formatHelp(e,t){let s=t.padWidth(e,t),i=t.helpWidth??80;function n(h,f){return t.formatItem(h,s,f,t)}let o=[`${t.styleTitle("Usage:")} ${t.styleUsage(t.commandUsage(e))}`,""],a=t.commandDescription(e);a.length>0&&(o=o.concat([t.boxWrap(t.styleCommandDescription(a),i),""]));let u=t.visibleArguments(e).map(h=>n(t.styleArgumentTerm(t.argumentTerm(h)),t.styleArgumentDescription(t.argumentDescription(h))));if(o=o.concat(this.formatItemList("Arguments:",u,t)),this.groupItems(e.options,t.visibleOptions(e),h=>h.helpGroupHeading??"Options:").forEach((h,f)=>{let p=h.map(m=>n(t.styleOptionTerm(t.optionTerm(m)),t.styleOptionDescription(t.optionDescription(m))));o=o.concat(this.formatItemList(f,p,t))}),t.showGlobalOptions){let h=t.visibleGlobalOptions(e).map(f=>n(t.styleOptionTerm(t.optionTerm(f)),t.styleOptionDescription(t.optionDescription(f))));o=o.concat(this.formatItemList("Global Options:",h,t))}return this.groupItems(e.commands,t.visibleCommands(e),h=>h.helpGroup()||"Commands:").forEach((h,f)=>{let p=h.map(m=>n(t.styleSubcommandTerm(t.subcommandTerm(m)),t.styleSubcommandDescription(t.subcommandDescription(m))));o=o.concat(this.formatItemList(f,p,t))}),o.join(`
|
|
106
|
+
`)}displayWidth(e){return R_(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(t=>t==="[options]"?this.styleOptionText(t):t==="[command]"?this.styleSubcommandText(t):t[0]==="["||t[0]==="<"?this.styleArgumentText(t):this.styleCommandText(t)).join(" ")}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(" ").map(t=>t==="[options]"?this.styleOptionText(t):t[0]==="["||t[0]==="<"?this.styleArgumentText(t):this.styleSubcommandText(t)).join(" ")}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,t,s,i){let o=" ".repeat(2);if(!s)return o+e;let a=e.padEnd(t+e.length-i.displayWidth(e)),u=2,l=(this.helpWidth??80)-t-u-2,h;return l<this.minWidthToWrap||i.preformatted(s)?h=s:h=i.boxWrap(s,l).replace(/\n/g,`
|
|
107
107
|
`+" ".repeat(t+u)),o+a+" ".repeat(u)+h.replace(/\n/g,`
|
|
108
|
-
${o}`)}boxWrap(e,t){if(t<this.minWidthToWrap)return e;let s=e.split(/\r\n|\n/),i=/[\s]*[^\s]+/g,n=[];return s.forEach(o=>{let a=o.match(i);if(a===null){n.push("");return}let u=[a.shift()],
|
|
109
|
-
`)}};function
|
|
108
|
+
${o}`)}boxWrap(e,t){if(t<this.minWidthToWrap)return e;let s=e.split(/\r\n|\n/),i=/[\s]*[^\s]+/g,n=[];return s.forEach(o=>{let a=o.match(i);if(a===null){n.push("");return}let u=[a.shift()],c=this.displayWidth(u[0]);a.forEach(l=>{let h=this.displayWidth(l);if(c+h<=t){u.push(l),c+=h;return}n.push(u.join(""));let f=l.trimStart();u=[f],c=this.displayWidth(f)}),n.push(u.join(""))}),n.join(`
|
|
109
|
+
`)}};function R_(r){let e=/\x1b\[\d*(;\d*)*m/g;return r.replace(e,"")}Xc.Help=Yc;Xc.stripColor=R_});var tl=d(el=>{var{InvalidArgumentError:UR}=zs(),Zc=class{constructor(e,t){this.flags=e,this.description=t||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let s=HR(e);this.short=s.shortFlag,this.long=s.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return typeof e=="string"&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_collectValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:(t.push(e),t)}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,s)=>{if(!this.argChoices.includes(t))throw new UR(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(t,s):t},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?N_(this.name().replace(/^no-/,"")):N_(this.name())}helpGroup(e){return this.helpGroupHeading=e,this}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},Qc=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(t=>{t.negate?this.negativeOptions.set(t.attributeName(),t):this.positiveOptions.set(t.attributeName(),t)}),this.negativeOptions.forEach((t,s)=>{this.positiveOptions.has(s)&&this.dualOptions.add(s)})}valueFromOption(e,t){let s=t.attributeName();if(!this.dualOptions.has(s))return!0;let i=this.negativeOptions.get(s).presetArg,n=i!==void 0?i:!1;return t.negate===(n===e)}};function N_(r){return r.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function HR(r){let e,t,s=/^-[^-]$/,i=/^--[^-]/,n=r.split(/[ |,]+/).concat("guard");if(s.test(n[0])&&(e=n.shift()),i.test(n[0])&&(t=n.shift()),!e&&s.test(n[0])&&(e=n.shift()),!e&&i.test(n[0])&&(e=t,t=n.shift()),n[0].startsWith("-")){let o=n[0],a=`option creation failed due to '${o}' in option flags '${r}'`;throw/^-[^-][^-]/.test(o)?new Error(`${a}
|
|
110
110
|
- a short flag is a single dash and a single character
|
|
111
111
|
- either use a single dash and a single character (for a short flag)
|
|
112
112
|
- or use a double dash for a long option (and can have two, like '--ws, --workspace')`):s.test(o)?new Error(`${a}
|
|
113
113
|
- too many short flags`):i.test(o)?new Error(`${a}
|
|
114
114
|
- too many long flags`):new Error(`${a}
|
|
115
|
-
- unrecognised flag format`)}if(e===void 0&&t===void 0)throw new Error(`option creation failed due to no flags found in '${r}'.`);return{shortFlag:e,longFlag:t}}
|
|
115
|
+
- unrecognised flag format`)}if(e===void 0&&t===void 0)throw new Error(`option creation failed due to no flags found in '${r}'.`);return{shortFlag:e,longFlag:t}}el.Option=Zc;el.DualOptions=Qc});var j_=d(q_=>{function GR(r,e){if(Math.abs(r.length-e.length)>3)return Math.max(r.length,e.length);let t=[];for(let s=0;s<=r.length;s++)t[s]=[s];for(let s=0;s<=e.length;s++)t[0][s]=s;for(let s=1;s<=e.length;s++)for(let i=1;i<=r.length;i++){let n=1;r[i-1]===e[s-1]?n=0:n=1,t[i][s]=Math.min(t[i-1][s]+1,t[i][s-1]+1,t[i-1][s-1]+n),i>1&&s>1&&r[i-1]===e[s-2]&&r[i-2]===e[s-1]&&(t[i][s]=Math.min(t[i][s],t[i-2][s-2]+1))}return t[r.length][e.length]}function zR(r,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let t=r.startsWith("--");t&&(r=r.slice(2),e=e.map(o=>o.slice(2)));let s=[],i=3,n=.4;return e.forEach(o=>{if(o.length<=1)return;let a=GR(r,o),u=Math.max(r.length,o.length);(u-a)/u>n&&(a<i?(i=a,s=[o]):a===i&&s.push(o))}),s.sort((o,a)=>o.localeCompare(a)),t&&(s=s.map(o=>`--${o}`)),s.length>1?`
|
|
116
116
|
(Did you mean one of ${s.join(", ")}?)`:s.length===1?`
|
|
117
|
-
(Did you mean ${s[0]}?)`:""}
|
|
118
|
-
- specify the name in Command constructor or using .name()`);return t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new
|
|
119
|
-
Expecting one of '${s.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync")throw t},this}_exit(e,t,s){this._exitCallback&&this._exitCallback(new
|
|
120
|
-
- already used by option '${t.flags}'`)}this._initOptionGroup(e),this.options.push(e)}_registerCommand(e){let t=i=>[i.name()].concat(i.aliases()),s=t(e).find(i=>this._findCommand(i));if(s){let i=t(this._findCommand(s)).join("|"),n=t(e).join("|");throw new Error(`cannot add command '${n}' as already have command '${i}'`)}this._initCommandGroup(e),this.commands.push(e)}addOption(e){this._registerOption(e);let t=e.name(),s=e.attributeName();if(e.negate){let n=e.long.replace(/^--no-/,"--");this._findOption(n)||this.setOptionValueWithSource(s,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(s,e.defaultValue,"default");let i=(n,o,a)=>{n==null&&e.presetArg!==void 0&&(n=e.presetArg);let u=this.getOptionValue(s);n!==null&&e.parseArg?n=this._callParseArg(e,n,u,o):n!==null&&e.variadic&&(n=e._collectValue(n,u)),n==null&&(e.negate?n=!1:e.isBoolean()||e.optional?n=!0:n=""),this.setOptionValueWithSource(s,n,a)};return this.on("option:"+t,n=>{let o=`error: option '${e.flags}' argument '${n}' is invalid.`;i(n,o,"cli")}),e.envVar&&this.on("optionEnv:"+t,n=>{let o=`error: option '${e.flags}' value '${n}' from env '${e.envVar}' is invalid.`;i(n,o,"env")}),this}_optionEx(e,t,s,i,n){if(typeof t=="object"&&t instanceof
|
|
121
|
-
- either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(e,t,s){if(
|
|
117
|
+
(Did you mean ${s[0]}?)`:""}q_.suggestSimilar=zR});var L_=d(ol=>{var BR=require("node:events").EventEmitter,rl=require("node:child_process"),wt=require("node:path"),bn=require("node:fs"),M=require("node:process"),{Argument:KR,humanReadableArgName:WR}=vn(),{CommanderError:sl}=zs(),{Help:YR,stripColor:XR}=Jc(),{Option:k_,DualOptions:JR}=tl(),{suggestSimilar:D_}=j_(),il=class r extends BR{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:t=>M.stdout.write(t),writeErr:t=>M.stderr.write(t),outputError:(t,s)=>s(t),getOutHelpWidth:()=>M.stdout.isTTY?M.stdout.columns:void 0,getErrHelpWidth:()=>M.stderr.isTTY?M.stderr.columns:void 0,getOutHasColors:()=>nl()??(M.stdout.isTTY&&M.stdout.hasColors?.()),getErrHasColors:()=>nl()??(M.stderr.isTTY&&M.stderr.hasColors?.()),stripColor:t=>XR(t)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,s){let i=t,n=s;typeof i=="object"&&i!==null&&(n=i,i=null),n=n||{};let[,o,a]=e.match(/([^ ]+) *(.*)/),u=this.createCommand(o);return i&&(u.description(i),u._executableHandler=!0),n.isDefault&&(this._defaultCommandName=u._name),u._hidden=!!(n.noHelp||n.hidden),u._executableFile=n.executableFile||null,a&&u.arguments(a),this._registerCommand(u),u.parent=this,u.copyInheritedSettings(this),i?this:u}createCommand(e){return new r(e)}createHelp(){return Object.assign(new YR,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...e},this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
|
|
118
|
+
- specify the name in Command constructor or using .name()`);return t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new KR(e,t)}argument(e,t,s,i){let n=this.createArgument(e,t);return typeof s=="function"?n.default(i).argParser(s):n.default(s),this.addArgument(n),this}arguments(e){return e.trim().split(/ +/).forEach(t=>{this.argument(t)}),this}addArgument(e){let t=this.registeredArguments.slice(-1)[0];if(t?.variadic)throw new Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,t){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,e&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let s=e??"help [command]",[,i,n]=s.match(/([^ ]+) *(.*)/),o=t??"display help for command",a=this.createCommand(i);return a.helpOption(!1),n&&a.arguments(n),o&&a.description(o),this._addImplicitHelpCommand=!0,this._helpCommand=a,(e||t)&&this._initCommandGroup(a),this}addHelpCommand(e,t){return typeof e!="object"?(this.helpCommand(e,t),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this._initCommandGroup(e),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,t){let s=["preSubcommand","preAction","postAction"];if(!s.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
|
|
119
|
+
Expecting one of '${s.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync")throw t},this}_exit(e,t,s){this._exitCallback&&this._exitCallback(new sl(e,t,s)),M.exit(e)}action(e){let t=s=>{let i=this.registeredArguments.length,n=s.slice(0,i);return this._storeOptionsAsProperties?n[i]=this:n[i]=this.opts(),n.push(this),e.apply(this,n)};return this._actionHandler=t,this}createOption(e,t){return new k_(e,t)}_callParseArg(e,t,s,i){try{return e.parseArg(t,s)}catch(n){if(n.code==="commander.invalidArgument"){let o=`${i} ${n.message}`;this.error(o,{exitCode:n.exitCode,code:n.code})}throw n}}_registerOption(e){let t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){let s=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${s}'
|
|
120
|
+
- already used by option '${t.flags}'`)}this._initOptionGroup(e),this.options.push(e)}_registerCommand(e){let t=i=>[i.name()].concat(i.aliases()),s=t(e).find(i=>this._findCommand(i));if(s){let i=t(this._findCommand(s)).join("|"),n=t(e).join("|");throw new Error(`cannot add command '${n}' as already have command '${i}'`)}this._initCommandGroup(e),this.commands.push(e)}addOption(e){this._registerOption(e);let t=e.name(),s=e.attributeName();if(e.negate){let n=e.long.replace(/^--no-/,"--");this._findOption(n)||this.setOptionValueWithSource(s,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(s,e.defaultValue,"default");let i=(n,o,a)=>{n==null&&e.presetArg!==void 0&&(n=e.presetArg);let u=this.getOptionValue(s);n!==null&&e.parseArg?n=this._callParseArg(e,n,u,o):n!==null&&e.variadic&&(n=e._collectValue(n,u)),n==null&&(e.negate?n=!1:e.isBoolean()||e.optional?n=!0:n=""),this.setOptionValueWithSource(s,n,a)};return this.on("option:"+t,n=>{let o=`error: option '${e.flags}' argument '${n}' is invalid.`;i(n,o,"cli")}),e.envVar&&this.on("optionEnv:"+t,n=>{let o=`error: option '${e.flags}' value '${n}' from env '${e.envVar}' is invalid.`;i(n,o,"env")}),this}_optionEx(e,t,s,i,n){if(typeof t=="object"&&t instanceof k_)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let o=this.createOption(t,s);if(o.makeOptionMandatory(!!e.mandatory),typeof i=="function")o.default(n).argParser(i);else if(i instanceof RegExp){let a=i;i=(u,c)=>{let l=a.exec(u);return l?l[0]:c},o.default(n).argParser(i)}else o.default(i);return this.addOption(o)}option(e,t,s,i){return this._optionEx({},e,t,s,i)}requiredOption(e,t,s,i){return this._optionEx({mandatory:!0},e,t,s,i)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,s){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=s,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(s=>{s.getOptionValueSource(e)!==void 0&&(t=s.getOptionValueSource(e))}),t}_prepareUserArgs(e,t){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(t=t||{},e===void 0&&t.from===void 0){M.versions?.electron&&(t.from="electron");let i=M.execArgv??[];(i.includes("-e")||i.includes("--eval")||i.includes("-p")||i.includes("--print"))&&(t.from="eval")}e===void 0&&(e=M.argv),this.rawArgs=e.slice();let s;switch(t.from){case void 0:case"node":this._scriptPath=e[1],s=e.slice(2);break;case"electron":M.defaultApp?(this._scriptPath=e[1],s=e.slice(2)):s=e.slice(1);break;case"user":s=e.slice(0);break;case"eval":s=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",s}parse(e,t){this._prepareForParse();let s=this._prepareUserArgs(e,t);return this._parseCommand([],s),this}async parseAsync(e,t){this._prepareForParse();let s=this._prepareUserArgs(e,t);return await this._parseCommand([],s),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
|
|
121
|
+
- either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(e,t,s){if(bn.existsSync(e))return;let i=t?`searched for local subcommand relative to directory '${t}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",n=`'${e}' does not exist
|
|
122
122
|
- if '${s}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
123
123
|
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
124
|
-
- ${i}`;throw new Error(n)}_executeSubCommand(e,t){t=t.slice();let s=!1,i=[".js",".ts",".tsx",".mjs",".cjs"];function n(
|
|
124
|
+
- ${i}`;throw new Error(n)}_executeSubCommand(e,t){t=t.slice();let s=!1,i=[".js",".ts",".tsx",".mjs",".cjs"];function n(l,h){let f=wt.resolve(l,h);if(bn.existsSync(f))return f;if(i.includes(wt.extname(h)))return;let p=i.find(m=>bn.existsSync(`${f}${m}`));if(p)return`${f}${p}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||"";if(this._scriptPath){let l;try{l=bn.realpathSync(this._scriptPath)}catch{l=this._scriptPath}a=wt.resolve(wt.dirname(l),a)}if(a){let l=n(a,o);if(!l&&!e._executableFile&&this._scriptPath){let h=wt.basename(this._scriptPath,wt.extname(this._scriptPath));h!==this._name&&(l=n(a,`${h}-${e._name}`))}o=l||o}s=i.includes(wt.extname(o));let u;M.platform!=="win32"?s?(t.unshift(o),t=M_(M.execArgv).concat(t),u=rl.spawn(M.argv[0],t,{stdio:"inherit"})):u=rl.spawn(o,t,{stdio:"inherit"}):(this._checkForMissingExecutable(o,a,e._name),t.unshift(o),t=M_(M.execArgv).concat(t),u=rl.spawn(M.execPath,t,{stdio:"inherit"})),u.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(h=>{M.on(h,()=>{u.killed===!1&&u.exitCode===null&&u.kill(h)})});let c=this._exitCallback;u.on("close",l=>{l=l??1,c?c(new sl(l,"commander.executeSubCommandAsync","(close)")):M.exit(l)}),u.on("error",l=>{if(l.code==="ENOENT")this._checkForMissingExecutable(o,a,e._name);else if(l.code==="EACCES")throw new Error(`'${o}' not executable`);if(!c)M.exit(1);else{let h=new sl(1,"commander.executeSubCommandAsync","(error)");h.nestedError=l,c(h)}}),this.runningCommand=u}_dispatchSubcommand(e,t,s){let i=this._findCommand(e);i||this.help({error:!0}),i._prepareForParse();let n;return n=this._chainOrCallSubCommandHook(n,i,"preSubcommand"),n=this._chainOrCall(n,()=>{if(i._executableHandler)this._executeSubCommand(i,t.concat(s));else return i._parseCommand(t,s)}),n}_dispatchHelpCommand(e){e||this.help();let t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,t)=>{e.required&&this.args[t]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(s,i,n)=>{let o=i;if(i!==null&&s.parseArg){let a=`error: command-argument value '${i}' is invalid for argument '${s.name()}'.`;o=this._callParseArg(s,i,n,a)}return o};this._checkNumberOfArguments();let t=[];this.registeredArguments.forEach((s,i)=>{let n=s.defaultValue;s.variadic?i<this.args.length?(n=this.args.slice(i),s.parseArg&&(n=n.reduce((o,a)=>e(s,a,o),s.defaultValue))):n===void 0&&(n=[]):i<this.args.length&&(n=this.args[i],s.parseArg&&(n=e(s,n,s.defaultValue))),t[i]=n}),this.processedArgs=t}_chainOrCall(e,t){return e?.then&&typeof e.then=="function"?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let s=e,i=[];return this._getCommandAndAncestors().reverse().filter(n=>n._lifeCycleHooks[t]!==void 0).forEach(n=>{n._lifeCycleHooks[t].forEach(o=>{i.push({hookedCommand:n,callback:o})})}),t==="postAction"&&i.reverse(),i.forEach(n=>{s=this._chainOrCall(s,()=>n.callback(n.hookedCommand,this))}),s}_chainOrCallSubCommandHook(e,t,s){let i=e;return this._lifeCycleHooks[s]!==void 0&&this._lifeCycleHooks[s].forEach(n=>{i=this._chainOrCall(i,()=>n(this,t))}),i}_parseCommand(e,t){let s=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(s.operands),t=s.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(s.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=()=>{s.unknown.length>0&&this.unknownOption(s.unknown[0])},n=`command:${this.name()}`;if(this._actionHandler){i(),this._processArguments();let o;return o=this._chainOrCallHooks(o,"preAction"),o=this._chainOrCall(o,()=>this._actionHandler(this.processedArgs)),this.parent&&(o=this._chainOrCall(o,()=>{this.parent.emit(n,e,t)})),o=this._chainOrCallHooks(o,"postAction"),o}if(this.parent?.listenerCount(n))i(),this._processArguments(),this.parent.emit(n,e,t);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,t);this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length?this.unknownCommand():(i(),this._processArguments())}else this.commands.length?(i(),this.help({error:!0})):(i(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(t=>{t.mandatory&&e.getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(s=>{let i=s.attributeName();return this.getOptionValue(i)===void 0?!1:this.getOptionValueSource(i)!=="default"});e.filter(s=>s.conflictsWith.length>0).forEach(s=>{let i=e.find(n=>s.conflictsWith.includes(n.attributeName()));i&&this._conflictingOption(s,i)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let t=[],s=[],i=t;function n(l){return l.length>1&&l[0]==="-"}let o=l=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(l)?!this._getCommandAndAncestors().some(h=>h.options.map(f=>f.short).some(f=>/^-\d$/.test(f))):!1,a=null,u=null,c=0;for(;c<e.length||u;){let l=u??e[c++];if(u=null,l==="--"){i===s&&i.push(l),i.push(...e.slice(c));break}if(a&&(!n(l)||o(l))){this.emit(`option:${a.name()}`,l);continue}if(a=null,n(l)){let h=this._findOption(l);if(h){if(h.required){let f=e[c++];f===void 0&&this.optionMissingArgument(h),this.emit(`option:${h.name()}`,f)}else if(h.optional){let f=null;c<e.length&&(!n(e[c])||o(e[c]))&&(f=e[c++]),this.emit(`option:${h.name()}`,f)}else this.emit(`option:${h.name()}`);a=h.variadic?h:null;continue}}if(l.length>2&&l[0]==="-"&&l[1]!=="-"){let h=this._findOption(`-${l[1]}`);if(h){h.required||h.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${h.name()}`,l.slice(2)):(this.emit(`option:${h.name()}`),u=`-${l.slice(2)}`);continue}}if(/^--[^=]+=/.test(l)){let h=l.indexOf("="),f=this._findOption(l.slice(0,h));if(f&&(f.required||f.optional)){this.emit(`option:${f.name()}`,l.slice(h+1));continue}}if(i===t&&n(l)&&!(this.commands.length===0&&o(l))&&(i=s),(this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&s.length===0){if(this._findCommand(l)){t.push(l),s.push(...e.slice(c));break}else if(this._getHelpCommand()&&l===this._getHelpCommand().name()){t.push(l,...e.slice(c));break}else if(this._defaultCommandName){s.push(l,...e.slice(c));break}}if(this._passThroughOptions){i.push(l,...e.slice(c));break}i.push(l)}return{operands:t,unknown:s}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let s=0;s<t;s++){let i=this.options[s].attributeName();e[i]=i===this._versionOptionName?this._version:this[i]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this._outputConfiguration.outputError(`${e}
|
|
125
125
|
`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
|
|
126
126
|
`):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
|
|
127
|
-
`),this.outputHelp({error:!0}));let s=t||{},i=s.exitCode||1,n=s.code||"commander.error";this._exit(i,n,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in M.env){let t=e.attributeName();(this.getOptionValue(t)===void 0||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,M.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new
|
|
128
|
-
`),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");let s=this.parent?._findCommand(e);if(s){let i=[s.name()].concat(s.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${i}'`)}return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(t=>this.alias(t)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let t=this.registeredArguments.map(s=>
|
|
127
|
+
`),this.outputHelp({error:!0}));let s=t||{},i=s.exitCode||1,n=s.code||"commander.error";this._exit(i,n,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in M.env){let t=e.attributeName();(this.getOptionValue(t)===void 0||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,M.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new JR(this.options),t=s=>this.getOptionValue(s)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(s));this.options.filter(s=>s.implied!==void 0&&t(s.attributeName())&&e.valueFromOption(this.getOptionValue(s.attributeName()),s)).forEach(s=>{Object.keys(s.implied).filter(i=>!t(i)).forEach(i=>{this.setOptionValueWithSource(i,s.implied[i],"implied")})})}missingArgument(e){let t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){let t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){let s=o=>{let a=o.attributeName(),u=this.getOptionValue(a),c=this.options.find(h=>h.negate&&a===h.attributeName()),l=this.options.find(h=>!h.negate&&a===h.attributeName());return c&&(c.presetArg===void 0&&u===!1||c.presetArg!==void 0&&u===c.presetArg)?c:l||o},i=o=>{let a=s(o),u=a.attributeName();return this.getOptionValueSource(u)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},n=`error: ${i(e)} cannot be used with ${i(t)}`;this.error(n,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let i=[],n=this;do{let o=n.createHelp().visibleOptions(n).filter(a=>a.long).map(a=>a.long);i=i.concat(o),n=n.parent}while(n&&!n._enablePositionalOptions);t=D_(e,i)}let s=`error: unknown option '${e}'${t}`;this.error(s,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,s=t===1?"":"s",n=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${s} but got ${e.length}.`;this.error(n,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],t="";if(this._showSuggestionAfterError){let i=[];this.createHelp().visibleCommands(this).forEach(n=>{i.push(n.name()),n.alias()&&i.push(n.alias())}),t=D_(e,i)}let s=`error: unknown command '${e}'${t}`;this.error(s,{code:"commander.unknownCommand"})}version(e,t,s){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",s=s||"output the version number";let i=this.createOption(t,s);return this._versionOptionName=i.attributeName(),this._registerOption(i),this.on("option:"+i.name(),()=>{this._outputConfiguration.writeOut(`${e}
|
|
128
|
+
`),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");let s=this.parent?._findCommand(e);if(s){let i=[s.name()].concat(s.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${i}'`)}return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(t=>this.alias(t)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let t=this.registeredArguments.map(s=>WR(s));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?t:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}helpGroup(e){return e===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=e,this)}commandsGroup(e){return e===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=e,this)}optionsGroup(e){return e===void 0?this._defaultOptionGroup??"":(this._defaultOptionGroup=e,this)}_initOptionGroup(e){this._defaultOptionGroup&&!e.helpGroupHeading&&e.helpGroup(this._defaultOptionGroup)}_initCommandGroup(e){this._defaultCommandGroup&&!e.helpGroup()&&e.helpGroup(this._defaultCommandGroup)}nameFromFilename(e){return this._name=wt.basename(e,wt.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp(),s=this._getOutputContext(e);t.prepareContext({error:s.error,helpWidth:s.helpWidth,outputHasColors:s.hasColors});let i=t.formatHelp(this,t);return s.hasColors?i:this._outputConfiguration.stripColor(i)}_getOutputContext(e){e=e||{};let t=!!e.error,s,i,n;return t?(s=a=>this._outputConfiguration.writeErr(a),i=this._outputConfiguration.getErrHasColors(),n=this._outputConfiguration.getErrHelpWidth()):(s=a=>this._outputConfiguration.writeOut(a),i=this._outputConfiguration.getOutHasColors(),n=this._outputConfiguration.getOutHelpWidth()),{error:t,write:a=>(i||(a=this._outputConfiguration.stripColor(a)),s(a)),hasColors:i,helpWidth:n}}outputHelp(e){let t;typeof e=="function"&&(t=e,e=void 0);let s=this._getOutputContext(e),i={error:s.error,write:s.write,command:this};this._getCommandAndAncestors().reverse().forEach(o=>o.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let n=this.helpInformation({error:s.error});if(t&&(n=t(n),typeof n!="string"&&!Buffer.isBuffer(n)))throw new Error("outputHelp callback must return a string or a Buffer");s.write(n),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",i),this._getCommandAndAncestors().forEach(o=>o.emit("afterAllHelp",i))}helpOption(e,t){return typeof e=="boolean"?(e?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(e??"-h, --help",t??"display help for command"),(e||t)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this._initOptionGroup(e),this}help(e){this.outputHelp(e);let t=Number(M.exitCode??0);t===0&&e&&typeof e!="function"&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){let s=["beforeAll","before","after","afterAll"];if(!s.includes(e))throw new Error(`Unexpected value for position to addHelpText.
|
|
129
129
|
Expecting one of '${s.join("', '")}'`);let i=`${e}Help`;return this.on(i,n=>{let o;typeof t=="function"?o=t({error:n.error,command:n.command}):o=t,o&&n.write(`${o}
|
|
130
|
-
`)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(i=>t.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function T_(r){return r.map(e=>{if(!e.startsWith("--inspect"))return e;let t,s="127.0.0.1",i="9229",n;return(n=e.match(/^(--inspect(-brk)?)$/))!==null?t=n[1]:(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=n[1],/^\d+$/.test(n[3])?i=n[3]:s=n[3]):(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=n[1],s=n[3],i=n[4]),t&&i!=="0"?`${t}=${s}:${parseInt(i)+1}`:e})}function tc(){if(M.env.NO_COLOR||M.env.FORCE_COLOR==="0"||M.env.FORCE_COLOR==="false")return!1;if(M.env.FORCE_COLOR||M.env.CLICOLOR_FORCE!==void 0)return!0}rc.Command=ec;rc.useColor=tc});var R_=d(je=>{var{Argument:I_}=mn(),{Command:sc}=P_(),{CommanderError:bR,InvalidArgumentError:A_}=Us(),{Help:wR}=Kl(),{Option:C_}=Jl();je.program=new sc;je.createCommand=r=>new sc(r);je.createOption=(r,e)=>new C_(r,e);je.createArgument=(r,e)=>new I_(r,e);je.Command=sc;je.Option=C_;je.Argument=I_;je.Help=wR;je.CommanderError=bR;je.InvalidArgumentError=A_;je.InvalidOptionArgumentError=A_});var Am=require("node:util"),Ou=Y(require("node:process"),1),qt=Y(require("node:fs"),1),xu=Y(require("node:path"),1),Tr=Y(require("node:crypto"),1),Cm=Y(require("node:assert"),1);var Lt=r=>{let e=typeof r;return r!==null&&(e==="object"||e==="function")};var Sn=new Set(["__proto__","prototype","constructor"]),gv=new Set("0123456789");function Ys(r){let e=[],t="",s="start",i=!1;for(let n of r)switch(n){case"\\":{if(s==="index")throw new Error("Invalid character in an index");if(s==="indexEnd")throw new Error("Invalid character after an index");i&&(t+=n),s="property",i=!i;break}case".":{if(s==="index")throw new Error("Invalid character in an index");if(s==="indexEnd"){s="property";break}if(i){i=!1,t+=n;break}if(Sn.has(t))return[];e.push(t),t="",s="property";break}case"[":{if(s==="index")throw new Error("Invalid character in an index");if(s==="indexEnd"){s="index";break}if(i){i=!1,t+=n;break}if(s==="property"){if(Sn.has(t))return[];e.push(t),t=""}s="index";break}case"]":{if(s==="index"){e.push(Number.parseInt(t,10)),t="",s="indexEnd";break}if(s==="indexEnd")throw new Error("Invalid character after an index")}default:{if(s==="index"&&!gv.has(n))throw new Error("Invalid character in an index");if(s==="indexEnd")throw new Error("Invalid character after an index");s==="start"&&(s="property"),i&&(i=!1,t+="\\"),t+=n}}switch(i&&(t+="\\"),s){case"property":{if(Sn.has(t))return[];e.push(t);break}case"index":throw new Error("Index was not closed");case"start":{e.push("");break}}return e}function On(r,e){if(typeof e!="number"&&Array.isArray(r)){let t=Number.parseInt(e,10);return Number.isInteger(t)&&r[t]===r[e]}return!1}function cc(r,e){if(On(r,e))throw new Error("Cannot use string index")}function hc(r,e,t){if(!Lt(r)||typeof e!="string")return t===void 0?r:t;let s=Ys(e);if(s.length===0)return t;for(let i=0;i<s.length;i++){let n=s[i];if(On(r,n)?r=i===s.length-1?void 0:null:r=r[n],r==null){if(i!==s.length-1)return t;break}}return r===void 0?t:r}function xn(r,e,t){if(!Lt(r)||typeof e!="string")return r;let s=r,i=Ys(e);for(let n=0;n<i.length;n++){let o=i[n];cc(r,o),n===i.length-1?r[o]=t:Lt(r[o])||(r[o]=typeof i[n+1]=="number"?[]:{}),r=r[o]}return s}function dc(r,e){if(!Lt(r)||typeof e!="string")return!1;let t=Ys(e);for(let s=0;s<t.length;s++){let i=t[s];if(cc(r,i),s===t.length-1)return delete r[i],!0;if(r=r[i],!Lt(r))return!1}}function fc(r,e){if(!Lt(r)||typeof e!="string")return!1;let t=Ys(e);if(t.length===0)return!1;for(let s of t){if(!Lt(r)||!(s in r)||On(r,s))return!1;r=r[s]}return!0}var X=Y(require("node:path"),1),Tn=Y(require("node:os"),1),Xs=Y(require("node:process"),1),Et=Tn.default.homedir(),Pn=Tn.default.tmpdir(),{env:sr}=Xs.default,yv=r=>{let e=X.default.join(Et,"Library");return{data:X.default.join(e,"Application Support",r),config:X.default.join(e,"Preferences",r),cache:X.default.join(e,"Caches",r),log:X.default.join(e,"Logs",r),temp:X.default.join(Pn,r)}},_v=r=>{let e=sr.APPDATA||X.default.join(Et,"AppData","Roaming"),t=sr.LOCALAPPDATA||X.default.join(Et,"AppData","Local");return{data:X.default.join(t,r,"Data"),config:X.default.join(e,r,"Config"),cache:X.default.join(t,r,"Cache"),log:X.default.join(t,r,"Log"),temp:X.default.join(Pn,r)}},vv=r=>{let e=X.default.basename(Et);return{data:X.default.join(sr.XDG_DATA_HOME||X.default.join(Et,".local","share"),r),config:X.default.join(sr.XDG_CONFIG_HOME||X.default.join(Et,".config"),r),cache:X.default.join(sr.XDG_CACHE_HOME||X.default.join(Et,".cache"),r),log:X.default.join(sr.XDG_STATE_HOME||X.default.join(Et,".local","state"),r),temp:X.default.join(Pn,e,r)}};function In(r,{suffix:e="nodejs"}={}){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);return e&&(r+=`-${e}`),Xs.default.platform==="darwin"?yv(r):Xs.default.platform==="win32"?_v(r):vv(r)}var Pc=Y(require("node:path"),1);var k=Y(require("node:fs"),1),ne=require("node:util");var bv=(r,e)=>{let{onError:t}=e;return function(...i){return r.apply(void 0,i).catch(t)}},We=bv;var wv=(r,e)=>{let{onError:t}=e;return function(...i){try{return r.apply(void 0,i)}catch(n){return t(n)}}},Le=wv;var Ev=(r,e)=>{let{isRetriable:t}=e;return function(i){let{timeout:n}=i,o=i.interval??250,a=Date.now()+n;return function u(...l){return r.apply(void 0,l).catch(c=>{if(!t(c)||Date.now()>=a)throw c;let h=Math.round(o*Math.random());return h>0?new Promise(p=>setTimeout(p,h)).then(()=>u.apply(void 0,l)):u.apply(void 0,l)})}}},Ye=Ev;var Sv=(r,e)=>{let{isRetriable:t}=e;return function(i){let{timeout:n}=i,o=Date.now()+n;return function(...u){for(;;)try{return r.apply(void 0,u)}catch(l){if(!t(l)||Date.now()>=o)throw l;continue}}}},Xe=Sv;var Cn=Y(require("node:process"),1);var Fr={isChangeErrorOk:r=>{if(!Fr.isNodeError(r))return!1;let{code:e}=r;return e==="ENOSYS"||!pc&&(e==="EINVAL"||e==="EPERM")},isNodeError:r=>r instanceof Error,isRetriableError:r=>{if(!Fr.isNodeError(r))return!1;let{code:e}=r;return e==="EMFILE"||e==="ENFILE"||e==="EAGAIN"||e==="EBUSY"||e==="EACCESS"||e==="EACCES"||e==="EACCS"||e==="EPERM"},onChangeError:r=>{if(!Fr.isNodeError(r))throw r;if(!Fr.isChangeErrorOk(r))throw r}},An=Fr;var Ur={onError:An.onChangeError},ve={onError:()=>{}},pc=Cn.default.getuid?!Cn.default.getuid():!1,ie={isRetriable:An.isRetriableError};var Ov={attempt:{chmod:We((0,ne.promisify)(k.default.chmod),Ur),chown:We((0,ne.promisify)(k.default.chown),Ur),close:We((0,ne.promisify)(k.default.close),ve),fsync:We((0,ne.promisify)(k.default.fsync),ve),mkdir:We((0,ne.promisify)(k.default.mkdir),ve),realpath:We((0,ne.promisify)(k.default.realpath),ve),stat:We((0,ne.promisify)(k.default.stat),ve),unlink:We((0,ne.promisify)(k.default.unlink),ve),chmodSync:Le(k.default.chmodSync,Ur),chownSync:Le(k.default.chownSync,Ur),closeSync:Le(k.default.closeSync,ve),existsSync:Le(k.default.existsSync,ve),fsyncSync:Le(k.default.fsync,ve),mkdirSync:Le(k.default.mkdirSync,ve),realpathSync:Le(k.default.realpathSync,ve),statSync:Le(k.default.statSync,ve),unlinkSync:Le(k.default.unlinkSync,ve)},retry:{close:Ye((0,ne.promisify)(k.default.close),ie),fsync:Ye((0,ne.promisify)(k.default.fsync),ie),open:Ye((0,ne.promisify)(k.default.open),ie),readFile:Ye((0,ne.promisify)(k.default.readFile),ie),rename:Ye((0,ne.promisify)(k.default.rename),ie),stat:Ye((0,ne.promisify)(k.default.stat),ie),write:Ye((0,ne.promisify)(k.default.write),ie),writeFile:Ye((0,ne.promisify)(k.default.writeFile),ie),closeSync:Xe(k.default.closeSync,ie),fsyncSync:Xe(k.default.fsyncSync,ie),openSync:Xe(k.default.openSync,ie),readFileSync:Xe(k.default.readFileSync,ie),renameSync:Xe(k.default.renameSync,ie),statSync:Xe(k.default.statSync,ie),writeSync:Xe(k.default.writeSync,ie),writeFileSync:Xe(k.default.writeFileSync,ie)}},se=Ov;var St=Y(require("node:process"),1),mc="utf8",Rn=438,gc=511;var yc={},_c=St.default.geteuid?St.default.geteuid():-1,vc=St.default.getegid?St.default.getegid():-1;var bc=1e3,wc=!!St.default.getuid,tN=St.default.getuid?!St.default.getuid():!1,Nn=128;var $c=r=>r instanceof Error&&"code"in r;var qn=r=>typeof r=="string",Js=r=>r===void 0;var Tc=Y(require("node:path"),1);var Vt=Y(require("node:process"),1);var kn=Y(require("node:process"),1),Ec=kn.default.platform==="linux",Zs=kn.default.platform==="win32";var jn=["SIGHUP","SIGINT","SIGTERM"];Zs||jn.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");Ec&&jn.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var Sc=jn;var Dn=class{constructor(){this.callbacks=new Set,this.exited=!1,this.exit=e=>{if(!this.exited){this.exited=!0;for(let t of this.callbacks)t();e&&(Zs&&e!=="SIGINT"&&e!=="SIGTERM"&&e!=="SIGKILL"?Vt.default.kill(Vt.default.pid,"SIGTERM"):Vt.default.kill(Vt.default.pid,e))}},this.hook=()=>{Vt.default.once("exit",()=>this.exit());for(let e of Sc)try{Vt.default.once(e,()=>this.exit(e))}catch{}},this.register=e=>(this.callbacks.add(e),()=>{this.callbacks.delete(e)}),this.hook()}},Oc=new Dn;var xv=Oc.register,xc=xv;var Te={store:{},create:r=>{let e=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6),i=`.tmp-${Date.now().toString().slice(-10)}${e}`;return`${r}${i}`},get:(r,e,t=!0)=>{let s=Te.truncate(e(r));return s in Te.store?Te.get(r,e,t):(Te.store[s]=t,[s,()=>delete Te.store[s]])},purge:r=>{Te.store[r]&&(delete Te.store[r],se.attempt.unlink(r))},purgeSync:r=>{Te.store[r]&&(delete Te.store[r],se.attempt.unlinkSync(r))},purgeSyncAll:()=>{for(let r in Te.store)Te.purgeSync(r)},truncate:r=>{let e=Tc.default.basename(r);if(e.length<=Nn)return r;let t=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(e);if(!t)return r;let s=e.length-Nn;return`${r.slice(0,-e.length)}${t[1]}${t[2].slice(0,-s)}${t[3]}`}};xc(Te.purgeSyncAll);var Hr=Te;function Mn(r,e,t=yc){if(qn(t))return Mn(r,e,{encoding:t});let i={timeout:t.timeout??bc},n=null,o=null,a=null;try{let u=se.attempt.realpathSync(r),l=!!u;r=u||r,[o,n]=Hr.get(r,t.tmpCreate||Hr.create,t.tmpPurge!==!1);let c=wc&&Js(t.chown),h=Js(t.mode);if(l&&(c||h)){let f=se.attempt.statSync(r);f&&(t={...t},c&&(t.chown={uid:f.uid,gid:f.gid}),h&&(t.mode=f.mode))}if(!l){let f=Pc.default.dirname(r);se.attempt.mkdirSync(f,{mode:gc,recursive:!0})}a=se.retry.openSync(i)(o,"w",t.mode||Rn),t.tmpCreated&&t.tmpCreated(o),qn(e)?se.retry.writeSync(i)(a,e,0,t.encoding||mc):Js(e)||se.retry.writeSync(i)(a,e,0,e.length,0),t.fsync!==!1&&(t.fsyncWait!==!1?se.retry.fsyncSync(i)(a):se.attempt.fsync(a)),se.retry.closeSync(i)(a),a=null,t.chown&&(t.chown.uid!==_c||t.chown.gid!==vc)&&se.attempt.chownSync(o,t.chown.uid,t.chown.gid),t.mode&&t.mode!==Rn&&se.attempt.chmodSync(o,t.mode);try{se.retry.renameSync(i)(o,r)}catch(f){if(!$c(f)||f.code!=="ENAMETOOLONG")throw f;se.retry.renameSync(i)(o,Hr.truncate(r))}n(),o=null}finally{a&&se.attempt.closeSync(a),o&&Hr.purge(o)}}var Rm=Y(_f(),1),Nm=Y(jf(),1);var I1=(r,e,t,s)=>{if(t==="length"||t==="prototype"||t==="arguments"||t==="caller")return;let i=Object.getOwnPropertyDescriptor(r,t),n=Object.getOwnPropertyDescriptor(e,t);!A1(i,n)&&s||Object.defineProperty(r,t,n)},A1=function(r,e){return r===void 0||r.configurable||r.writable===e.writable&&r.enumerable===e.enumerable&&r.configurable===e.configurable&&(r.writable||r.value===e.value)},C1=(r,e)=>{let t=Object.getPrototypeOf(e);t!==Object.getPrototypeOf(r)&&Object.setPrototypeOf(r,t)},R1=(r,e)=>`/* Wrapped ${r}*/
|
|
131
|
-
${e}`,N1=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),q1=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),k1=(r,e,t)=>{let s=t===""?"":`with ${t.trim()}() `,i=R1.bind(null,s,e.toString());Object.defineProperty(i,"name",q1);let{writable:n,enumerable:o,configurable:a}=N1;Object.defineProperty(r,"toString",{value:i,writable:n,enumerable:o,configurable:a})};function tu(r,e,{ignoreNonConfigurable:t=!1}={}){let{name:s}=r;for(let i of Reflect.ownKeys(e))I1(r,e,i,t);return C1(r,e),k1(r,e,s),r}var j1=(r,e={})=>{if(typeof r!="function")throw new TypeError(`Expected the first argument to be a function, got \`${typeof r}\``);let{wait:t=0,maxWait:s=Number.POSITIVE_INFINITY,before:i=!1,after:n=!0}=e;if(t<0||s<0)throw new RangeError("`wait` and `maxWait` must not be negative.");if(!i&&!n)throw new Error("Both `before` and `after` are false, function wouldn't be called.");let o,a,u,l=function(...c){let h=this,f=()=>{o=void 0,a&&(clearTimeout(a),a=void 0),n&&(u=r.apply(h,c))},p=()=>{a=void 0,o&&(clearTimeout(o),o=void 0),n&&(u=r.apply(h,c))},m=i&&!o;return clearTimeout(o),o=setTimeout(f,t),s>0&&s!==Number.POSITIVE_INFINITY&&!a&&(a=setTimeout(p,s)),m&&(u=r.apply(h,c)),u};return tu(l,r),l.cancel=()=>{o&&(clearTimeout(o),o=void 0),a&&(clearTimeout(a),a=void 0)},l},ru=j1;var Qt=Y(Om(),1);var RP=Object.prototype.toString,NP="[object Uint8Array]",qP="[object ArrayBuffer]";function Tm(r,e,t){return r?r.constructor===e?!0:RP.call(r)===t:!1}function Pm(r){return Tm(r,Uint8Array,NP)}function kP(r){return Tm(r,ArrayBuffer,qP)}function jP(r){return Pm(r)||kP(r)}function DP(r){if(!Pm(r))throw new TypeError(`Expected \`Uint8Array\`, got \`${typeof r}\``)}function MP(r){if(!jP(r))throw new TypeError(`Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof r}\``)}function $u(r,e){if(r.length===0)return new Uint8Array(0);e??=r.reduce((i,n)=>i+n.length,0);let t=new Uint8Array(e),s=0;for(let i of r)DP(i),t.set(i,s),s+=i.length;return t}var xm={utf8:new globalThis.TextDecoder("utf8")};function Eu(r,e="utf8"){return MP(r),xm[e]??=new globalThis.TextDecoder(e),xm[e].decode(r)}function LP(r){if(typeof r!="string")throw new TypeError(`Expected \`string\`, got \`${typeof r}\``)}var VP=new globalThis.TextEncoder;function Bi(r){return LP(r),VP.encode(r)}var ij=Array.from({length:256},(r,e)=>e.toString(16).padStart(2,"0"));var FP=Nm.default.default,Im="aes-256-cbc",xr=()=>Object.create(null),UP=r=>r!=null,HP=(r,e)=>{let t=new Set(["undefined","symbol","function"]),s=typeof e;if(t.has(s))throw new TypeError(`Setting a value of type \`${s}\` for key \`${r}\` is not allowed as it's not supported by JSON`)},Ki="__internal__",Su=`${Ki}.migrations.version`,Ps=class{path;events;#s;#t;#e;#r={};constructor(e={}){let t={configName:"config",fileExtension:"json",projectSuffix:"nodejs",clearInvalidConfig:!1,accessPropertiesByDotNotation:!0,configFileMode:438,...e};if(!t.cwd){if(!t.projectName)throw new Error("Please specify the `projectName` option.");t.cwd=In(t.projectName,{suffix:t.projectSuffix}).config}if(this.#e=t,t.schema??t.ajvOptions??t.rootSchema){if(t.schema&&typeof t.schema!="object")throw new TypeError("The `schema` option must be an object.");let o=new Rm.Ajv2020({allErrors:!0,useDefaults:!0,...t.ajvOptions});FP(o);let a={...t.rootSchema,type:"object",properties:t.schema};this.#s=o.compile(a);for(let[u,l]of Object.entries(t.schema??{}))l?.default&&(this.#r[u]=l.default)}t.defaults&&(this.#r={...this.#r,...t.defaults}),t.serialize&&(this._serialize=t.serialize),t.deserialize&&(this._deserialize=t.deserialize),this.events=new EventTarget,this.#t=t.encryptionKey;let s=t.fileExtension?`.${t.fileExtension}`:"";this.path=xu.default.resolve(t.cwd,`${t.configName??"config"}${s}`);let i=this.store,n=Object.assign(xr(),t.defaults,i);if(t.migrations){if(!t.projectVersion)throw new Error("Please specify the `projectVersion` option.");this._migrate(t.migrations,t.projectVersion,t.beforeEachMigration)}this._validate(n);try{Cm.default.deepEqual(i,n)}catch{this.store=n}t.watch&&this._watch()}get(e,t){if(this.#e.accessPropertiesByDotNotation)return this._get(e,t);let{store:s}=this;return e in s?s[e]:t}set(e,t){if(typeof e!="string"&&typeof e!="object")throw new TypeError(`Expected \`key\` to be of type \`string\` or \`object\`, got ${typeof e}`);if(typeof e!="object"&&t===void 0)throw new TypeError("Use `delete()` to clear values");if(this._containsReservedKey(e))throw new TypeError(`Please don't use the ${Ki} key, as it's used to manage this module internal operations.`);let{store:s}=this,i=(n,o)=>{HP(n,o),this.#e.accessPropertiesByDotNotation?xn(s,n,o):s[n]=o};if(typeof e=="object"){let n=e;for(let[o,a]of Object.entries(n))i(o,a)}else i(e,t);this.store=s}has(e){return this.#e.accessPropertiesByDotNotation?fc(this.store,e):e in this.store}reset(...e){for(let t of e)UP(this.#r[t])&&this.set(t,this.#r[t])}delete(e){let{store:t}=this;this.#e.accessPropertiesByDotNotation?dc(t,e):delete t[e],this.store=t}clear(){this.store=xr();for(let e of Object.keys(this.#r))this.reset(e)}onDidChange(e,t){if(typeof e!="string")throw new TypeError(`Expected \`key\` to be of type \`string\`, got ${typeof e}`);if(typeof t!="function")throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof t}`);return this._handleChange(()=>this.get(e),t)}onDidAnyChange(e){if(typeof e!="function")throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof e}`);return this._handleChange(()=>this.store,e)}get size(){return Object.keys(this.store).length}get store(){try{let e=qt.default.readFileSync(this.path,this.#t?null:"utf8"),t=this._encryptData(e),s=this._deserialize(t);return this._validate(s),Object.assign(xr(),s)}catch(e){if(e?.code==="ENOENT")return this._ensureDirectory(),xr();if(this.#e.clearInvalidConfig&&e.name==="SyntaxError")return xr();throw e}}set store(e){this._ensureDirectory(),this._validate(e),this._write(e),this.events.dispatchEvent(new Event("change"))}*[Symbol.iterator](){for(let[e,t]of Object.entries(this.store))yield[e,t]}_encryptData(e){if(!this.#t)return typeof e=="string"?e:Eu(e);try{let t=e.slice(0,16),s=Tr.default.pbkdf2Sync(this.#t,t.toString(),1e4,32,"sha512"),i=Tr.default.createDecipheriv(Im,s,t),n=e.slice(17),o=typeof n=="string"?Bi(n):n;return Eu($u([i.update(o),i.final()]))}catch{}return e.toString()}_handleChange(e,t){let s=e(),i=()=>{let n=s,o=e();(0,Am.isDeepStrictEqual)(o,n)||(s=o,t.call(this,o,n))};return this.events.addEventListener("change",i),()=>{this.events.removeEventListener("change",i)}}_deserialize=e=>JSON.parse(e);_serialize=e=>JSON.stringify(e,void 0," ");_validate(e){if(!this.#s||this.#s(e)||!this.#s.errors)return;let s=this.#s.errors.map(({instancePath:i,message:n=""})=>`\`${i.slice(1)}\` ${n}`);throw new Error("Config schema violation: "+s.join("; "))}_ensureDirectory(){qt.default.mkdirSync(xu.default.dirname(this.path),{recursive:!0})}_write(e){let t=this._serialize(e);if(this.#t){let s=Tr.default.randomBytes(16),i=Tr.default.pbkdf2Sync(this.#t,s.toString(),1e4,32,"sha512"),n=Tr.default.createCipheriv(Im,i,s);t=$u([s,Bi(":"),n.update(Bi(t)),n.final()])}if(Ou.default.env.SNAP)qt.default.writeFileSync(this.path,t,{mode:this.#e.configFileMode});else try{Mn(this.path,t,{mode:this.#e.configFileMode})}catch(s){if(s?.code==="EXDEV"){qt.default.writeFileSync(this.path,t,{mode:this.#e.configFileMode});return}throw s}}_watch(){this._ensureDirectory(),qt.default.existsSync(this.path)||this._write(xr()),Ou.default.platform==="win32"?qt.default.watch(this.path,{persistent:!1},ru(()=>{this.events.dispatchEvent(new Event("change"))},{wait:100})):qt.default.watchFile(this.path,{persistent:!1},ru(()=>{this.events.dispatchEvent(new Event("change"))},{wait:5e3}))}_migrate(e,t,s){let i=this._get(Su,"0.0.0"),n=Object.keys(e).filter(a=>this._shouldPerformMigration(a,i,t)),o={...this.store};for(let a of n)try{s&&s(this,{fromVersion:i,toVersion:a,finalVersion:t,versions:n});let u=e[a];u?.(this),this._set(Su,a),i=a,o={...this.store}}catch(u){throw this.store=o,new Error(`Something went wrong during the migration! Changes applied to the store until this failed migration will be restored. ${u}`)}(this._isVersionInRangeFormat(i)||!Qt.default.eq(i,t))&&this._set(Su,t)}_containsReservedKey(e){return typeof e=="object"&&Object.keys(e)[0]===Ki?!0:typeof e!="string"?!1:this.#e.accessPropertiesByDotNotation?!!e.startsWith(`${Ki}.`):!1}_isVersionInRangeFormat(e){return Qt.default.clean(e)===null}_shouldPerformMigration(e,t,s){return this._isVersionInRangeFormat(e)?t!=="0.0.0"&&Qt.default.satisfies(t,e)?!1:Qt.default.satisfies(s,e):!(Qt.default.lte(e,t)||Qt.default.gt(e,s))}_get(e,t){return hc(this.store,e,t)}_set(e,t){let{store:s}=this;xn(s,e,t),this.store=s}};var En=Y(l_());var c_=(r=0)=>e=>`\x1B[${e+r}m`,h_=(r=0)=>e=>`\x1B[${38+r};5;${e}m`,d_=(r=0)=>(e,t,s)=>`\x1B[${38+r};2;${e};${t};${s}m`,J={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},OD=Object.keys(J.modifier),KC=Object.keys(J.color),WC=Object.keys(J.bgColor),xD=[...KC,...WC];function YC(){let r=new Map;for(let[e,t]of Object.entries(J)){for(let[s,i]of Object.entries(t))J[s]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},t[s]=J[s],r.set(i[0],i[1]);Object.defineProperty(J,e,{value:t,enumerable:!1})}return Object.defineProperty(J,"codes",{value:r,enumerable:!1}),J.color.close="\x1B[39m",J.bgColor.close="\x1B[49m",J.color.ansi=c_(),J.color.ansi256=h_(),J.color.ansi16m=d_(),J.bgColor.ansi=c_(10),J.bgColor.ansi256=h_(10),J.bgColor.ansi16m=d_(10),Object.defineProperties(J,{rgbToAnsi256:{value(e,t,s){return e===t&&t===s?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(s/255*5)},enumerable:!1},hexToRgb:{value(e){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[s]=t;s.length===3&&(s=[...s].map(n=>n+n).join(""));let i=Number.parseInt(s,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:e=>J.rgbToAnsi256(...J.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,s,i;if(e>=232)t=((e-232)*10+8)/255,s=t,i=t;else{e-=16;let a=e%36;t=Math.floor(e/36)/5,s=Math.floor(a/6)/5,i=a%6/5}let n=Math.max(t,s,i)*2;if(n===0)return 30;let o=30+(Math.round(i)<<2|Math.round(s)<<1|Math.round(t));return n===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(e,t,s)=>J.ansi256ToAnsi(J.rgbToAnsi256(e,t,s)),enumerable:!1},hexToAnsi:{value:e=>J.ansi256ToAnsi(J.hexToAnsi256(e)),enumerable:!1}}),J}var XC=YC(),Ke=XC;var dn=Y(require("node:process"),1),p_=Y(require("node:os"),1),Dl=Y(require("node:tty"),1);function ke(r,e=globalThis.Deno?globalThis.Deno.args:dn.default.argv){let t=r.startsWith("-")?"":r.length===1?"-":"--",s=e.indexOf(t+r),i=e.indexOf("--");return s!==-1&&(i===-1||s<i)}var{env:Z}=dn.default,hn;ke("no-color")||ke("no-colors")||ke("color=false")||ke("color=never")?hn=0:(ke("color")||ke("colors")||ke("color=true")||ke("color=always"))&&(hn=1);function JC(){if("FORCE_COLOR"in Z)return Z.FORCE_COLOR==="true"?1:Z.FORCE_COLOR==="false"?0:Z.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(Z.FORCE_COLOR,10),3)}function ZC(r){return r===0?!1:{level:r,hasBasic:!0,has256:r>=2,has16m:r>=3}}function QC(r,{streamIsTTY:e,sniffFlags:t=!0}={}){let s=JC();s!==void 0&&(hn=s);let i=t?hn:s;if(i===0)return 0;if(t){if(ke("color=16m")||ke("color=full")||ke("color=truecolor"))return 3;if(ke("color=256"))return 2}if("TF_BUILD"in Z&&"AGENT_NAME"in Z)return 1;if(r&&!e&&i===void 0)return 0;let n=i||0;if(Z.TERM==="dumb")return n;if(dn.default.platform==="win32"){let o=p_.default.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in Z)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(o=>o in Z)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in Z)||Z.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Z)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Z.TEAMCITY_VERSION)?1:0;if(Z.COLORTERM==="truecolor"||Z.TERM==="xterm-kitty"||Z.TERM==="xterm-ghostty"||Z.TERM==="wezterm")return 3;if("TERM_PROGRAM"in Z){let o=Number.parseInt((Z.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Z.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Z.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Z.TERM)||"COLORTERM"in Z?1:n}function f_(r,e={}){let t=QC(r,{streamIsTTY:r&&r.isTTY,...e});return ZC(t)}var eR={stdout:f_({isTTY:Dl.default.isatty(1)}),stderr:f_({isTTY:Dl.default.isatty(2)})},m_=eR;function g_(r,e,t){let s=r.indexOf(e);if(s===-1)return r;let i=e.length,n=0,o="";do o+=r.slice(n,s)+e+t,n=s+i,s=r.indexOf(e,n);while(s!==-1);return o+=r.slice(n),o}function y_(r,e,t,s){let i=0,n="";do{let o=r[s-1]==="\r";n+=r.slice(i,o?s-1:s)+e+(o?`\r
|
|
130
|
+
`)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(i=>t.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function M_(r){return r.map(e=>{if(!e.startsWith("--inspect"))return e;let t,s="127.0.0.1",i="9229",n;return(n=e.match(/^(--inspect(-brk)?)$/))!==null?t=n[1]:(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=n[1],/^\d+$/.test(n[3])?i=n[3]:s=n[3]):(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=n[1],s=n[3],i=n[4]),t&&i!=="0"?`${t}=${s}:${parseInt(i)+1}`:e})}function nl(){if(M.env.NO_COLOR||M.env.FORCE_COLOR==="0"||M.env.FORCE_COLOR==="false")return!1;if(M.env.FORCE_COLOR||M.env.CLICOLOR_FORCE!==void 0)return!0}ol.Command=il;ol.useColor=nl});var H_=d(ke=>{var{Argument:V_}=vn(),{Command:al}=L_(),{CommanderError:ZR,InvalidArgumentError:F_}=zs(),{Help:QR}=Jc(),{Option:U_}=tl();ke.program=new al;ke.createCommand=r=>new al(r);ke.createOption=(r,e)=>new U_(r,e);ke.createArgument=(r,e)=>new V_(r,e);ke.Command=al;ke.Option=U_;ke.Argument=V_;ke.Help=QR;ke.CommanderError=ZR;ke.InvalidArgumentError=F_;ke.InvalidOptionArgumentError=F_});var Au=require("node:util"),Ji=Y(require("node:process"),1),st=Y(require("node:fs"),1),Is=Y(require("node:path"),1),Ar=Y(require("node:crypto"),1),Iu=Y(require("node:assert"),1);var Vt=r=>{let e=typeof r;return r!==null&&(e==="object"||e==="function")};var pl=new Set(["__proto__","prototype","constructor"]),ml=1e6,Tv=r=>r>="0"&&r<="9";function gl(r){if(r==="0")return!0;if(/^[1-9]\d*$/.test(r)){let e=Number.parseInt(r,10);return e<=Number.MAX_SAFE_INTEGER&&e<=ml}return!1}function Pn(r,e){return pl.has(r)?!1:(r&&gl(r)?e.push(Number.parseInt(r,10)):e.push(r),!0)}function Pv(r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);let e=[],t="",s="start",i=!1,n=0;for(let o of r){if(n++,i){t+=o,i=!1;continue}if(o==="\\"){if(s==="index")throw new Error(`Invalid character '${o}' in an index at position ${n}`);if(s==="indexEnd")throw new Error(`Invalid character '${o}' after an index at position ${n}`);i=!0,s=s==="start"?"property":s;continue}switch(o){case".":{if(s==="index")throw new Error(`Invalid character '${o}' in an index at position ${n}`);if(s==="indexEnd"){s="property";break}if(!Pn(t,e))return[];t="",s="property";break}case"[":{if(s==="index")throw new Error(`Invalid character '${o}' in an index at position ${n}`);if(s==="indexEnd"){s="index";break}if(s==="property"||s==="start"){if((t||s==="property")&&!Pn(t,e))return[];t=""}s="index";break}case"]":{if(s==="index"){if(t==="")t=(e.pop()||"")+"[]",s="property";else{let a=Number.parseInt(t,10);!Number.isNaN(a)&&Number.isFinite(a)&&a>=0&&a<=Number.MAX_SAFE_INTEGER&&a<=ml&&t===String(a)?e.push(a):e.push(t),t="",s="indexEnd"}break}if(s==="indexEnd")throw new Error(`Invalid character '${o}' after an index at position ${n}`);t+=o;break}default:{if(s==="index"&&!Tv(o))throw new Error(`Invalid character '${o}' in an index at position ${n}`);if(s==="indexEnd")throw new Error(`Invalid character '${o}' after an index at position ${n}`);s==="start"&&(s="property"),t+=o}}}switch(i&&(t+="\\"),s){case"property":{if(!Pn(t,e))return[];break}case"index":throw new Error("Index was not closed");case"start":{e.push("");break}}return e}function Zs(r){if(typeof r=="string")return Pv(r);if(Array.isArray(r)){let e=[];for(let[t,s]of r.entries()){if(typeof s!="string"&&typeof s!="number")throw new TypeError(`Expected a string or number for path segment at index ${t}, got ${typeof s}`);if(typeof s=="number"&&!Number.isFinite(s))throw new TypeError(`Path segment at index ${t} must be a finite number, got ${s}`);if(pl.has(s))return[];typeof s=="string"&&gl(s)?e.push(Number.parseInt(s,10)):e.push(s)}return e}return[]}function An(r,e,t){if(!Vt(r)||typeof e!="string"&&!Array.isArray(e))return t===void 0?r:t;let s=Zs(e);if(s.length===0)return t;for(let i=0;i<s.length;i++){let n=s[i];if(r=r[n],r==null){if(i!==s.length-1)return t;break}}return r===void 0?t:r}function Hr(r,e,t){if(!Vt(r)||typeof e!="string"&&!Array.isArray(e))return r;let s=r,i=Zs(e);if(i.length===0)return r;for(let n=0;n<i.length;n++){let o=i[n];if(n===i.length-1)r[o]=t;else if(!Vt(r[o])){let u=typeof i[n+1]=="number";r[o]=u?[]:{}}r=r[o]}return s}function yl(r,e){if(!Vt(r)||typeof e!="string"&&!Array.isArray(e))return!1;let t=Zs(e);if(t.length===0)return!1;for(let s=0;s<t.length;s++){let i=t[s];if(s===t.length-1)return Object.hasOwn(r,i)?(delete r[i],!0):!1;if(r=r[i],!Vt(r))return!1}}function Qs(r,e){if(!Vt(r)||typeof e!="string"&&!Array.isArray(e))return!1;let t=Zs(e);if(t.length===0)return!1;for(let s of t){if(!Vt(r)||!(s in r))return!1;r=r[s]}return!0}var X=Y(require("node:path"),1),In=Y(require("node:os"),1),ei=Y(require("node:process"),1),Et=In.default.homedir(),Cn=In.default.tmpdir(),{env:ir}=ei.default,Av=r=>{let e=X.default.join(Et,"Library");return{data:X.default.join(e,"Application Support",r),config:X.default.join(e,"Preferences",r),cache:X.default.join(e,"Caches",r),log:X.default.join(e,"Logs",r),temp:X.default.join(Cn,r)}},Iv=r=>{let e=ir.APPDATA||X.default.join(Et,"AppData","Roaming"),t=ir.LOCALAPPDATA||X.default.join(Et,"AppData","Local");return{data:X.default.join(t,r,"Data"),config:X.default.join(e,r,"Config"),cache:X.default.join(t,r,"Cache"),log:X.default.join(t,r,"Log"),temp:X.default.join(Cn,r)}},Cv=r=>{let e=X.default.basename(Et);return{data:X.default.join(ir.XDG_DATA_HOME||X.default.join(Et,".local","share"),r),config:X.default.join(ir.XDG_CONFIG_HOME||X.default.join(Et,".config"),r),cache:X.default.join(ir.XDG_CACHE_HOME||X.default.join(Et,".cache"),r),log:X.default.join(ir.XDG_STATE_HOME||X.default.join(Et,".local","state"),r),temp:X.default.join(Cn,e,r)}};function Rn(r,{suffix:e="nodejs"}={}){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);return e&&(r+=`-${e}`),ei.default.platform==="darwin"?Av(r):ei.default.platform==="win32"?Iv(r):Cv(r)}var Rl=Y(require("node:path"),1);var j=Y(require("node:fs"),1),ne=require("node:util");var Rv=(r,e)=>{let{onError:t}=e;return function(...i){return r.apply(void 0,i).catch(t)}},We=Rv;var Nv=(r,e)=>{let{onError:t}=e;return function(...i){try{return r.apply(void 0,i)}catch(n){return t(n)}}},Le=Nv;var jv=(r,e)=>{let{isRetriable:t}=e;return function(i){let{timeout:n}=i,o=i.interval??250,a=Date.now()+n;return function u(...c){return r.apply(void 0,c).catch(l=>{if(!t(l)||Date.now()>=a)throw l;let h=Math.round(o*Math.random());return h>0?new Promise(p=>setTimeout(p,h)).then(()=>u.apply(void 0,c)):u.apply(void 0,c)})}}},Ye=jv;var kv=(r,e)=>{let{isRetriable:t}=e;return function(i){let{timeout:n}=i,o=Date.now()+n;return function(...u){for(;;)try{return r.apply(void 0,u)}catch(c){if(!t(c)||Date.now()>=o)throw c;continue}}}},Xe=kv;var qn=Y(require("node:process"),1);var Gr={isChangeErrorOk:r=>{if(!Gr.isNodeError(r))return!1;let{code:e}=r;return e==="ENOSYS"||!_l&&(e==="EINVAL"||e==="EPERM")},isNodeError:r=>r instanceof Error,isRetriableError:r=>{if(!Gr.isNodeError(r))return!1;let{code:e}=r;return e==="EMFILE"||e==="ENFILE"||e==="EAGAIN"||e==="EBUSY"||e==="EACCESS"||e==="EACCES"||e==="EACCS"||e==="EPERM"},onChangeError:r=>{if(!Gr.isNodeError(r))throw r;if(!Gr.isChangeErrorOk(r))throw r}},Nn=Gr;var zr={onError:Nn.onChangeError},ve={onError:()=>{}},_l=qn.default.getuid?!qn.default.getuid():!1,ie={isRetriable:Nn.isRetriableError};var Dv={attempt:{chmod:We((0,ne.promisify)(j.default.chmod),zr),chown:We((0,ne.promisify)(j.default.chown),zr),close:We((0,ne.promisify)(j.default.close),ve),fsync:We((0,ne.promisify)(j.default.fsync),ve),mkdir:We((0,ne.promisify)(j.default.mkdir),ve),realpath:We((0,ne.promisify)(j.default.realpath),ve),stat:We((0,ne.promisify)(j.default.stat),ve),unlink:We((0,ne.promisify)(j.default.unlink),ve),chmodSync:Le(j.default.chmodSync,zr),chownSync:Le(j.default.chownSync,zr),closeSync:Le(j.default.closeSync,ve),existsSync:Le(j.default.existsSync,ve),fsyncSync:Le(j.default.fsync,ve),mkdirSync:Le(j.default.mkdirSync,ve),realpathSync:Le(j.default.realpathSync,ve),statSync:Le(j.default.statSync,ve),unlinkSync:Le(j.default.unlinkSync,ve)},retry:{close:Ye((0,ne.promisify)(j.default.close),ie),fsync:Ye((0,ne.promisify)(j.default.fsync),ie),open:Ye((0,ne.promisify)(j.default.open),ie),readFile:Ye((0,ne.promisify)(j.default.readFile),ie),rename:Ye((0,ne.promisify)(j.default.rename),ie),stat:Ye((0,ne.promisify)(j.default.stat),ie),write:Ye((0,ne.promisify)(j.default.write),ie),writeFile:Ye((0,ne.promisify)(j.default.writeFile),ie),closeSync:Xe(j.default.closeSync,ie),fsyncSync:Xe(j.default.fsyncSync,ie),openSync:Xe(j.default.openSync,ie),readFileSync:Xe(j.default.readFileSync,ie),renameSync:Xe(j.default.renameSync,ie),statSync:Xe(j.default.statSync,ie),writeSync:Xe(j.default.writeSync,ie),writeFileSync:Xe(j.default.writeFileSync,ie)}},se=Dv;var St=Y(require("node:process"),1),vl="utf8",jn=438,bl=511;var wl={},$l=St.default.geteuid?St.default.geteuid():-1,El=St.default.getegid?St.default.getegid():-1;var Sl=1e3,Ol=!!St.default.getuid,NN=St.default.getuid?!St.default.getuid():!1,kn=128;var xl=r=>r instanceof Error&&"code"in r;var Dn=r=>typeof r=="string",ti=r=>r===void 0;var Cl=Y(require("node:path"),1);var Ft=Y(require("node:process"),1);var Mn=Y(require("node:process"),1),Tl=Mn.default.platform==="linux",ri=Mn.default.platform==="win32";var Ln=["SIGHUP","SIGINT","SIGTERM"];ri||Ln.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");Tl&&Ln.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var Pl=Ln;var Vn=class{constructor(){this.callbacks=new Set,this.exited=!1,this.exit=e=>{if(!this.exited){this.exited=!0;for(let t of this.callbacks)t();e&&(ri&&e!=="SIGINT"&&e!=="SIGTERM"&&e!=="SIGKILL"?Ft.default.kill(Ft.default.pid,"SIGTERM"):Ft.default.kill(Ft.default.pid,e))}},this.hook=()=>{Ft.default.once("exit",()=>this.exit());for(let e of Pl)try{Ft.default.once(e,()=>this.exit(e))}catch{}},this.register=e=>(this.callbacks.add(e),()=>{this.callbacks.delete(e)}),this.hook()}},Al=new Vn;var Mv=Al.register,Il=Mv;var Te={store:{},create:r=>{let e=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6),i=`.tmp-${Date.now().toString().slice(-10)}${e}`;return`${r}${i}`},get:(r,e,t=!0)=>{let s=Te.truncate(e(r));return s in Te.store?Te.get(r,e,t):(Te.store[s]=t,[s,()=>delete Te.store[s]])},purge:r=>{Te.store[r]&&(delete Te.store[r],se.attempt.unlink(r))},purgeSync:r=>{Te.store[r]&&(delete Te.store[r],se.attempt.unlinkSync(r))},purgeSyncAll:()=>{for(let r in Te.store)Te.purgeSync(r)},truncate:r=>{let e=Cl.default.basename(r);if(e.length<=kn)return r;let t=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(e);if(!t)return r;let s=e.length-kn;return`${r.slice(0,-e.length)}${t[1]}${t[2].slice(0,-s)}${t[3]}`}};Il(Te.purgeSyncAll);var Br=Te;function Fn(r,e,t=wl){if(Dn(t))return Fn(r,e,{encoding:t});let i={timeout:t.timeout??Sl},n=null,o=null,a=null;try{let u=se.attempt.realpathSync(r),c=!!u;r=u||r,[o,n]=Br.get(r,t.tmpCreate||Br.create,t.tmpPurge!==!1);let l=Ol&&ti(t.chown),h=ti(t.mode);if(c&&(l||h)){let f=se.attempt.statSync(r);f&&(t={...t},l&&(t.chown={uid:f.uid,gid:f.gid}),h&&(t.mode=f.mode))}if(!c){let f=Rl.default.dirname(r);se.attempt.mkdirSync(f,{mode:bl,recursive:!0})}a=se.retry.openSync(i)(o,"w",t.mode||jn),t.tmpCreated&&t.tmpCreated(o),Dn(e)?se.retry.writeSync(i)(a,e,0,t.encoding||vl):ti(e)||se.retry.writeSync(i)(a,e,0,e.length,0),t.fsync!==!1&&(t.fsyncWait!==!1?se.retry.fsyncSync(i)(a):se.attempt.fsync(a)),se.retry.closeSync(i)(a),a=null,t.chown&&(t.chown.uid!==$l||t.chown.gid!==El)&&se.attempt.chownSync(o,t.chown.uid,t.chown.gid),t.mode&&t.mode!==jn&&se.attempt.chmodSync(o,t.mode);try{se.retry.renameSync(i)(o,r)}catch(f){if(!xl(f)||f.code!=="ENAMETOOLONG")throw f;se.retry.renameSync(i)(o,Br.truncate(r))}n(),o=null}finally{a&&se.attempt.closeSync(a),o&&Br.purge(o)}}var Um=Y(Tf(),1),Hm=Y(zf(),1);var Q1=(r,e,t,s)=>{if(t==="length"||t==="prototype"||t==="arguments"||t==="caller")return;let i=Object.getOwnPropertyDescriptor(r,t),n=Object.getOwnPropertyDescriptor(e,t);!ex(i,n)&&s||Object.defineProperty(r,t,n)},ex=function(r,e){return r===void 0||r.configurable||r.writable===e.writable&&r.enumerable===e.enumerable&&r.configurable===e.configurable&&(r.writable||r.value===e.value)},tx=(r,e)=>{let t=Object.getPrototypeOf(e);t!==Object.getPrototypeOf(r)&&Object.setPrototypeOf(r,t)},rx=(r,e)=>`/* Wrapped ${r}*/
|
|
131
|
+
${e}`,sx=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),ix=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),nx=(r,e,t)=>{let s=t===""?"":`with ${t.trim()}() `,i=rx.bind(null,s,e.toString());Object.defineProperty(i,"name",ix);let{writable:n,enumerable:o,configurable:a}=sx;Object.defineProperty(r,"toString",{value:i,writable:n,enumerable:o,configurable:a})};function nu(r,e,{ignoreNonConfigurable:t=!1}={}){let{name:s}=r;for(let i of Reflect.ownKeys(e))Q1(r,e,i,t);return tx(r,e),nx(r,e,s),r}var ox=(r,e={})=>{if(typeof r!="function")throw new TypeError(`Expected the first argument to be a function, got \`${typeof r}\``);let{wait:t=0,maxWait:s=Number.POSITIVE_INFINITY,before:i=!1,after:n=!0}=e;if(t<0||s<0)throw new RangeError("`wait` and `maxWait` must not be negative.");if(!i&&!n)throw new Error("Both `before` and `after` are false, function wouldn't be called.");let o,a,u,c=function(...l){let h=this,f=()=>{o=void 0,a&&(clearTimeout(a),a=void 0),n&&(u=r.apply(h,l))},p=()=>{a=void 0,o&&(clearTimeout(o),o=void 0),n&&(u=r.apply(h,l))},m=i&&!o;return clearTimeout(o),o=setTimeout(f,t),s>0&&s!==Number.POSITIVE_INFINITY&&!a&&(a=setTimeout(p,s)),m&&(u=r.apply(h,l)),u};return nu(c,r),c.cancel=()=>{o&&(clearTimeout(o),o=void 0),a&&(clearTimeout(a),a=void 0)},c},ou=ox;var er=Y(km(),1);var dA=Object.prototype.toString,fA="[object Uint8Array]",pA="[object ArrayBuffer]";function Mm(r,e,t){return r?r.constructor===e?!0:dA.call(r)===t:!1}function Lm(r){return Mm(r,Uint8Array,fA)}function mA(r){return Mm(r,ArrayBuffer,pA)}function gA(r){return Lm(r)||mA(r)}function yA(r){if(!Lm(r))throw new TypeError(`Expected \`Uint8Array\`, got \`${typeof r}\``)}function _A(r){if(!gA(r))throw new TypeError(`Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof r}\``)}function Yi(r,e){if(r.length===0)return new Uint8Array(0);e??=r.reduce((i,n)=>i+n.length,0);let t=new Uint8Array(e),s=0;for(let i of r)yA(i),t.set(i,s),s+=i.length;return t}var Dm={utf8:new globalThis.TextDecoder("utf8")};function As(r,e="utf8"){return _A(r),Dm[e]??=new globalThis.TextDecoder(e),Dm[e].decode(r)}function vA(r){if(typeof r!="string")throw new TypeError(`Expected \`string\`, got \`${typeof r}\``)}var bA=new globalThis.TextEncoder;function Xi(r){return vA(r),bA.encode(r)}var Dk=Array.from({length:256},(r,e)=>e.toString(16).padStart(2,"0"));var Vm="aes-256-cbc",Gm=new Set(["aes-256-cbc","aes-256-gcm","aes-256-ctr"]),wA=r=>typeof r=="string"&&Gm.has(r),ft=()=>Object.create(null),Fm=r=>r!==void 0,Tu=(r,e)=>{let t=new Set(["undefined","symbol","function"]),s=typeof e;if(t.has(s))throw new TypeError(`Setting a value of type \`${s}\` for key \`${r}\` is not allowed as it's not supported by JSON`)},jt="__internal__",Pu=`${jt}.migrations.version`,Cs=class{path;events;#s;#i;#n;#e;#t={};#o=!1;#a;#u;#r;constructor(e={}){let t=this.#c(e);this.#e=t,this.#l(t),this.#d(t),this.#f(t),this.events=new EventTarget,this.#i=t.encryptionKey,this.#n=t.encryptionAlgorithm??Vm,this.path=this.#p(t),this.#m(t),t.watch&&this._watch()}get(e,t){if(this.#e.accessPropertiesByDotNotation)return this._get(e,t);let{store:s}=this;return e in s?s[e]:t}set(e,t){if(typeof e!="string"&&typeof e!="object")throw new TypeError(`Expected \`key\` to be of type \`string\` or \`object\`, got ${typeof e}`);if(typeof e!="object"&&t===void 0)throw new TypeError("Use `delete()` to clear values");if(this._containsReservedKey(e))throw new TypeError(`Please don't use the ${jt} key, as it's used to manage this module internal operations.`);let{store:s}=this,i=(n,o)=>{if(Tu(n,o),this.#e.accessPropertiesByDotNotation)Hr(s,n,o);else{if(n==="__proto__"||n==="constructor"||n==="prototype")return;s[n]=o}};if(typeof e=="object"){let n=e;for(let[o,a]of Object.entries(n))i(o,a)}else i(e,t);this.store=s}has(e){return this.#e.accessPropertiesByDotNotation?Qs(this.store,e):e in this.store}appendToArray(e,t){Tu(e,t);let s=this.#e.accessPropertiesByDotNotation?this._get(e,[]):e in this.store?this.store[e]:[];if(!Array.isArray(s))throw new TypeError(`The key \`${e}\` is already set to a non-array value`);this.set(e,[...s,t])}reset(...e){for(let t of e)Fm(this.#t[t])&&this.set(t,this.#t[t])}delete(e){let{store:t}=this;this.#e.accessPropertiesByDotNotation?yl(t,e):delete t[e],this.store=t}clear(){let e=ft();for(let t of Object.keys(this.#t))Fm(this.#t[t])&&(Tu(t,this.#t[t]),this.#e.accessPropertiesByDotNotation?Hr(e,t,this.#t[t]):e[t]=this.#t[t]);this.store=e}onDidChange(e,t){if(typeof e!="string")throw new TypeError(`Expected \`key\` to be of type \`string\`, got ${typeof e}`);if(typeof t!="function")throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof t}`);return this._handleValueChange(()=>this.get(e),t)}onDidAnyChange(e){if(typeof e!="function")throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof e}`);return this._handleStoreChange(e)}get size(){return Object.keys(this.store).filter(t=>!this._isReservedKeyPath(t)).length}get store(){try{let e=st.default.readFileSync(this.path,this.#i?null:"utf8"),t=this._decryptData(e);return(i=>{let n=this._deserialize(i);return this.#o||this._validate(n),Object.assign(ft(),n)})(t)}catch(e){if(e?.code==="ENOENT")return this._ensureDirectory(),ft();if(this.#e.clearInvalidConfig){let t=e;if(t.name==="SyntaxError"||t.message?.startsWith("Config schema violation:")||t.message==="Failed to decrypt config data.")return ft()}throw e}}set store(e){if(this._ensureDirectory(),!Qs(e,jt))try{let t=st.default.readFileSync(this.path,this.#i?null:"utf8"),s=this._decryptData(t),i=this._deserialize(s);Qs(i,jt)&&Hr(e,jt,An(i,jt))}catch{}this.#o||this._validate(e),this._write(e),this.events.dispatchEvent(new Event("change"))}*[Symbol.iterator](){for(let[e,t]of Object.entries(this.store))this._isReservedKeyPath(e)||(yield[e,t])}_closeWatcher(){this.#a&&(this.#a.close(),this.#a=void 0),this.#u&&(st.default.unwatchFile(this.path),this.#u=!1),this.#r=void 0}_decryptData(e){let t=this.#i;if(!t)return typeof e=="string"?e:As(e);let s=this.#n,i=s==="aes-256-gcm"?16:0,n=":".codePointAt(0),o=typeof e=="string"?e.codePointAt(16):e[16];if(!(n!==void 0&&o===n)){if(s==="aes-256-cbc")return typeof e=="string"?e:As(e);throw new Error("Failed to decrypt config data.")}let u=p=>{if(i===0)return{ciphertext:p};let m=p.length-i;if(m<0)throw new Error("Invalid authentication tag length.");return{ciphertext:p.slice(0,m),authenticationTag:p.slice(m)}},c=e.slice(0,16),l=e.slice(17),h=typeof l=="string"?Xi(l):l,f=p=>{let{ciphertext:m,authenticationTag:g}=u(h),y=Ar.default.pbkdf2Sync(t,p,1e4,32,"sha512"),_=Ar.default.createDecipheriv(s,y,c);return g&&_.setAuthTag(g),As(Yi([_.update(m),_.final()]))};try{return f(c)}catch{try{return f(c.toString())}catch{}}if(s==="aes-256-cbc")return typeof e=="string"?e:As(e);throw new Error("Failed to decrypt config data.")}_handleStoreChange(e){let t=this.store,s=()=>{let i=t,n=this.store;(0,Au.isDeepStrictEqual)(n,i)||(t=n,e.call(this,n,i))};return this.events.addEventListener("change",s),()=>{this.events.removeEventListener("change",s)}}_handleValueChange(e,t){let s=e(),i=()=>{let n=s,o=e();(0,Au.isDeepStrictEqual)(o,n)||(s=o,t.call(this,o,n))};return this.events.addEventListener("change",i),()=>{this.events.removeEventListener("change",i)}}_deserialize=e=>JSON.parse(e);_serialize=e=>JSON.stringify(e,void 0," ");_validate(e){if(!this.#s||this.#s(e)||!this.#s.errors)return;let s=this.#s.errors.map(({instancePath:i,message:n=""})=>`\`${i.slice(1)}\` ${n}`);throw new Error("Config schema violation: "+s.join("; "))}_ensureDirectory(){st.default.mkdirSync(Is.default.dirname(this.path),{recursive:!0})}_write(e){let t=this._serialize(e),s=this.#i;if(s){let i=Ar.default.randomBytes(16),n=Ar.default.pbkdf2Sync(s,i,1e4,32,"sha512"),o=Ar.default.createCipheriv(this.#n,n,i),a=Yi([o.update(Xi(t)),o.final()]),u=[i,Xi(":"),a];this.#n==="aes-256-gcm"&&u.push(o.getAuthTag()),t=Yi(u)}if(Ji.default.env.SNAP)st.default.writeFileSync(this.path,t,{mode:this.#e.configFileMode});else try{Fn(this.path,t,{mode:this.#e.configFileMode})}catch(i){if(i?.code==="EXDEV"){st.default.writeFileSync(this.path,t,{mode:this.#e.configFileMode});return}throw i}}_watch(){if(this._ensureDirectory(),st.default.existsSync(this.path)||this._write(ft()),Ji.default.platform==="win32"||Ji.default.platform==="darwin"){this.#r??=ou(()=>{this.events.dispatchEvent(new Event("change"))},{wait:100});let e=Is.default.dirname(this.path),t=Is.default.basename(this.path);this.#a=st.default.watch(e,{persistent:!1,encoding:"utf8"},(s,i)=>{i&&i!==t||typeof this.#r=="function"&&this.#r()})}else this.#r??=ou(()=>{this.events.dispatchEvent(new Event("change"))},{wait:1e3}),st.default.watchFile(this.path,{persistent:!1},(e,t)=>{typeof this.#r=="function"&&this.#r()}),this.#u=!0}_migrate(e,t,s){let i=this._get(Pu,"0.0.0"),n=Object.keys(e).filter(a=>this._shouldPerformMigration(a,i,t)),o=structuredClone(this.store);for(let a of n)try{s&&s(this,{fromVersion:i,toVersion:a,finalVersion:t,versions:n});let u=e[a];u?.(this),this._set(Pu,a),i=a,o=structuredClone(this.store)}catch(u){this.store=o;let c=u instanceof Error?u.message:String(u);throw new Error(`Something went wrong during the migration! Changes applied to the store until this failed migration will be restored. ${c}`)}(this._isVersionInRangeFormat(i)||!er.default.eq(i,t))&&this._set(Pu,t)}_containsReservedKey(e){return typeof e=="string"?this._isReservedKeyPath(e):!e||typeof e!="object"?!1:this._objectContainsReservedKey(e)}_objectContainsReservedKey(e){if(!e||typeof e!="object")return!1;for(let[t,s]of Object.entries(e))if(this._isReservedKeyPath(t)||this._objectContainsReservedKey(s))return!0;return!1}_isReservedKeyPath(e){return e===jt||e.startsWith(`${jt}.`)}_isVersionInRangeFormat(e){return er.default.clean(e)===null}_shouldPerformMigration(e,t,s){return this._isVersionInRangeFormat(e)?t!=="0.0.0"&&er.default.satisfies(t,e)?!1:er.default.satisfies(s,e):!(er.default.lte(e,t)||er.default.gt(e,s))}_get(e,t){return An(this.store,e,t)}_set(e,t){let{store:s}=this;Hr(s,e,t),this.store=s}#c(e){let t={configName:"config",fileExtension:"json",projectSuffix:"nodejs",clearInvalidConfig:!1,accessPropertiesByDotNotation:!0,configFileMode:438,...e};if(t.encryptionAlgorithm??=Vm,!wA(t.encryptionAlgorithm))throw new TypeError(`The \`encryptionAlgorithm\` option must be one of: ${[...Gm].join(", ")}`);if(!t.cwd){if(!t.projectName)throw new Error("Please specify the `projectName` option.");t.cwd=Rn(t.projectName,{suffix:t.projectSuffix}).config}return typeof t.fileExtension=="string"&&(t.fileExtension=t.fileExtension.replace(/^\.+/,"")),t}#l(e){if(!(e.schema??e.ajvOptions??e.rootSchema))return;if(e.schema&&typeof e.schema!="object")throw new TypeError("The `schema` option must be an object.");let t=Hm.default.default,s=new Um.Ajv2020({allErrors:!0,useDefaults:!0,...e.ajvOptions});t(s);let i={...e.rootSchema,type:"object",properties:e.schema};this.#s=s.compile(i),this.#h(e.schema)}#h(e){let t=Object.entries(e??{});for(let[s,i]of t){if(!i||typeof i!="object"||!Object.hasOwn(i,"default"))continue;let{default:n}=i;n!==void 0&&(this.#t[s]=n)}}#d(e){e.defaults&&Object.assign(this.#t,e.defaults)}#f(e){e.serialize&&(this._serialize=e.serialize),e.deserialize&&(this._deserialize=e.deserialize)}#p(e){let t=typeof e.fileExtension=="string"?e.fileExtension:void 0,s=t?`.${t}`:"";return Is.default.resolve(e.cwd,`${e.configName??"config"}${s}`)}#m(e){if(e.migrations){this.#g(e),this._validate(this.store);return}let t=this.store,s=Object.assign(ft(),e.defaults??{},t);this._validate(s);try{Iu.default.deepEqual(t,s)}catch{this.store=s}}#g(e){let{migrations:t,projectVersion:s}=e;if(t){if(!s)throw new Error("Please specify the `projectVersion` option.");this.#o=!0;try{let i=this.store,n=Object.assign(ft(),e.defaults??{},i);try{Iu.default.deepEqual(i,n)}catch{this._write(n)}this._migrate(t,s,e.beforeEachMigration)}finally{this.#o=!1}}}};var Tn=Y(b_());var w_=(r=0)=>e=>`\x1B[${e+r}m`,$_=(r=0)=>e=>`\x1B[${38+r};5;${e}m`,E_=(r=0)=>(e,t,s)=>`\x1B[${38+r};2;${e};${t};${s}m`,J={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},i2=Object.keys(J.modifier),OR=Object.keys(J.color),xR=Object.keys(J.bgColor),n2=[...OR,...xR];function TR(){let r=new Map;for(let[e,t]of Object.entries(J)){for(let[s,i]of Object.entries(t))J[s]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},t[s]=J[s],r.set(i[0],i[1]);Object.defineProperty(J,e,{value:t,enumerable:!1})}return Object.defineProperty(J,"codes",{value:r,enumerable:!1}),J.color.close="\x1B[39m",J.bgColor.close="\x1B[49m",J.color.ansi=w_(),J.color.ansi256=$_(),J.color.ansi16m=E_(),J.bgColor.ansi=w_(10),J.bgColor.ansi256=$_(10),J.bgColor.ansi16m=E_(10),Object.defineProperties(J,{rgbToAnsi256:{value(e,t,s){return e===t&&t===s?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(s/255*5)},enumerable:!1},hexToRgb:{value(e){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[s]=t;s.length===3&&(s=[...s].map(n=>n+n).join(""));let i=Number.parseInt(s,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:e=>J.rgbToAnsi256(...J.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,s,i;if(e>=232)t=((e-232)*10+8)/255,s=t,i=t;else{e-=16;let a=e%36;t=Math.floor(e/36)/5,s=Math.floor(a/6)/5,i=a%6/5}let n=Math.max(t,s,i)*2;if(n===0)return 30;let o=30+(Math.round(i)<<2|Math.round(s)<<1|Math.round(t));return n===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(e,t,s)=>J.ansi256ToAnsi(J.rgbToAnsi256(e,t,s)),enumerable:!1},hexToAnsi:{value:e=>J.ansi256ToAnsi(J.hexToAnsi256(e)),enumerable:!1}}),J}var PR=TR(),Ke=PR;var gn=Y(require("node:process"),1),O_=Y(require("node:os"),1),Fc=Y(require("node:tty"),1);function je(r,e=globalThis.Deno?globalThis.Deno.args:gn.default.argv){let t=r.startsWith("-")?"":r.length===1?"-":"--",s=e.indexOf(t+r),i=e.indexOf("--");return s!==-1&&(i===-1||s<i)}var{env:Z}=gn.default,mn;je("no-color")||je("no-colors")||je("color=false")||je("color=never")?mn=0:(je("color")||je("colors")||je("color=true")||je("color=always"))&&(mn=1);function AR(){if("FORCE_COLOR"in Z)return Z.FORCE_COLOR==="true"?1:Z.FORCE_COLOR==="false"?0:Z.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(Z.FORCE_COLOR,10),3)}function IR(r){return r===0?!1:{level:r,hasBasic:!0,has256:r>=2,has16m:r>=3}}function CR(r,{streamIsTTY:e,sniffFlags:t=!0}={}){let s=AR();s!==void 0&&(mn=s);let i=t?mn:s;if(i===0)return 0;if(t){if(je("color=16m")||je("color=full")||je("color=truecolor"))return 3;if(je("color=256"))return 2}if("TF_BUILD"in Z&&"AGENT_NAME"in Z)return 1;if(r&&!e&&i===void 0)return 0;let n=i||0;if(Z.TERM==="dumb")return n;if(gn.default.platform==="win32"){let o=O_.default.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in Z)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(o=>o in Z)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in Z)||Z.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Z)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Z.TEAMCITY_VERSION)?1:0;if(Z.COLORTERM==="truecolor"||Z.TERM==="xterm-kitty"||Z.TERM==="xterm-ghostty"||Z.TERM==="wezterm")return 3;if("TERM_PROGRAM"in Z){let o=Number.parseInt((Z.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Z.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Z.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Z.TERM)||"COLORTERM"in Z?1:n}function S_(r,e={}){let t=CR(r,{streamIsTTY:r&&r.isTTY,...e});return IR(t)}var RR={stdout:S_({isTTY:Fc.default.isatty(1)}),stderr:S_({isTTY:Fc.default.isatty(2)})},x_=RR;function T_(r,e,t){let s=r.indexOf(e);if(s===-1)return r;let i=e.length,n=0,o="";do o+=r.slice(n,s)+e+t,n=s+i,s=r.indexOf(e,n);while(s!==-1);return o+=r.slice(n),o}function P_(r,e,t,s){let i=0,n="";do{let o=r[s-1]==="\r";n+=r.slice(i,o?s-1:s)+e+(o?`\r
|
|
132
132
|
`:`
|
|
133
133
|
`)+t,i=s+1,s=r.indexOf(`
|
|
134
|
-
`,i)}while(s!==-1);return n+=r.slice(i),n}var{stdout:
|
|
135
|
-
`);return n!==-1&&(e=
|
|
136
|
-
`);for(let s of t){let i=s.indexOf(":");if(i<0)continue;let n=s.substring(0,i).toLowerCase().trim(),o=s.substring(i+1).trim();n.length>0&&o.length>0&&e.push({name:n,value:o})}return e}function
|
|
137
|
-
`)})}function
|
|
134
|
+
`,i)}while(s!==-1);return n+=r.slice(i),n}var{stdout:A_,stderr:I_}=x_,Uc=Symbol("GENERATOR"),qr=Symbol("STYLER"),Hs=Symbol("IS_EMPTY"),C_=["ansi","ansi","ansi256","ansi16m"],jr=Object.create(null),NR=(r,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let t=A_?A_.level:0;r.level=e.level===void 0?t:e.level};var qR=r=>{let e=(...t)=>t.join(" ");return NR(e,r),Object.setPrototypeOf(e,Gs.prototype),e};function Gs(r){return qR(r)}Object.setPrototypeOf(Gs.prototype,Function.prototype);for(let[r,e]of Object.entries(Ke))jr[r]={get(){let t=yn(this,Gc(e.open,e.close,this[qr]),this[Hs]);return Object.defineProperty(this,r,{value:t}),t}};jr.visible={get(){let r=yn(this,this[qr],!0);return Object.defineProperty(this,"visible",{value:r}),r}};var Hc=(r,e,t,...s)=>r==="rgb"?e==="ansi16m"?Ke[t].ansi16m(...s):e==="ansi256"?Ke[t].ansi256(Ke.rgbToAnsi256(...s)):Ke[t].ansi(Ke.rgbToAnsi(...s)):r==="hex"?Hc("rgb",e,t,...Ke.hexToRgb(...s)):Ke[t][r](...s),jR=["rgb","hex","ansi256"];for(let r of jR){jr[r]={get(){let{level:t}=this;return function(...s){let i=Gc(Hc(r,C_[t],"color",...s),Ke.color.close,this[qr]);return yn(this,i,this[Hs])}}};let e="bg"+r[0].toUpperCase()+r.slice(1);jr[e]={get(){let{level:t}=this;return function(...s){let i=Gc(Hc(r,C_[t],"bgColor",...s),Ke.bgColor.close,this[qr]);return yn(this,i,this[Hs])}}}}var kR=Object.defineProperties(()=>{},{...jr,level:{enumerable:!0,get(){return this[Uc].level},set(r){this[Uc].level=r}}}),Gc=(r,e,t)=>{let s,i;return t===void 0?(s=r,i=e):(s=t.openAll+r,i=e+t.closeAll),{open:r,close:e,openAll:s,closeAll:i,parent:t}},yn=(r,e,t)=>{let s=(...i)=>DR(s,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(s,kR),s[Uc]=r,s[qr]=e,s[Hs]=t,s},DR=(r,e)=>{if(r.level<=0||!e)return r[Hs]?"":e;let t=r[qr];if(t===void 0)return e;let{openAll:s,closeAll:i}=t;if(e.includes("\x1B"))for(;t!==void 0;)e=T_(e,t.close,t.open),t=t.parent;let n=e.indexOf(`
|
|
135
|
+
`);return n!==-1&&(e=P_(e,i,s,n)),s+e+i};Object.defineProperties(Gs.prototype,jr);var MR=Gs(),d2=Gs({level:I_?I_.level:0});var le=MR;var G_=Y(H_(),1),{program:z_,createCommand:w2,createArgument:$2,createOption:E2,CommanderError:S2,InvalidArgumentError:O2,InvalidOptionArgumentError:x2,Command:T2,Argument:P2,Option:A2,Help:I2}=G_.default;var B_=/^[a-z0-9][a-z0-9-]*[a-z0-9]$/i;function K_(){let r,e,t=new Promise((s,i)=>{r=s,e=i});return t.resolve=r,t.reject=e,t}var kr=class{constructor(e,t){this.interval=e;this.func=t}interval;func;lastUpdated=0;updateTimer;update(e,t){let s=new Date().valueOf();t||s-this.lastUpdated>this.interval?(clearTimeout(this.updateTimer),this.func(e),this.lastUpdated=s):this.updateTimer=setTimeout(()=>{this.func(e),this.updateTimer=void 0},this.interval-s+this.lastUpdated).unref()}};function $t(r){return r.toLocaleString("en-US",{useGrouping:!0})}function wn(r){if(r.length<=24)return{service:"",user:"",token:r};let e=Buffer.from(eN(r),"base64").toString("utf8").split("#");return{service:e[0]??"",user:e[1]??"",token:e[2]??""}}function eN(r){let e="",t=r.length;for(let s=0;s<2;s++,t--)for(let i=t-1;i>=0;i-=2)e+=r[i];return e}var gv=require("net"),yv=Y(require("tls"));var $n=(l=>(l[l.HELLO_REQ=1]="HELLO_REQ",l[l.HELLO_RESP=2]="HELLO_RESP",l[l.END=3]="END",l[l.SERVER_OPEN=4]="SERVER_OPEN",l[l.SERVER_CLOSE=5]="SERVER_CLOSE",l[l.CLIENT_CLOSE=6]="CLIENT_CLOSE",l[l.PING=7]="PING",l[l.PONG=8]="PONG",l[l.SERVER_DATA=65]="SERVER_DATA",l[l.CLIENT_DATA=66]="CLIENT_DATA",l))($n||{});function W_(r){return{name:Object.keys($n).find(e=>$n[e]===r)??"UNKNOWN",isBinary:!!(r&64)}}var Y_=1;var tN="service";var ul=tN+".",X_=5e3;var rN=1*1024*1024,Bs=12,J_=70,Z_=80,Q_=0,ev=1,tv=2,rv=4,sv=8,iv=!!process.env.DERTUNNEL_DEBUG,En=class{constructor(e){this.onMessage=e}onMessage;buffer=void 0;async receive(e){let t=this.buffer?Buffer.concat([this.buffer,e]):e,s=0;for(;s<t.length;){if(t.length<s+Bs)return this.buffer=t.subarray(s),!0;if(t[s+Q_]!=J_||t[s+ev]!=Z_)return this.reset(),!1;let i=t.readUint16LE(s+tv),n=t.readUint32LE(s+rv),o=t.readUint32LE(s+sv),u=o+Bs+s;if(o>rN)return this.reset(),!1;if(t.length>=u)try{let c=t.subarray(s+Bs,u);iv&&nv(i,n,c,!1),await this.onMessage(i,n,c)}catch{return this.reset(),!1}else break;s=u}return this.buffer=t.length>s?t.subarray(s):void 0,!0}reset(){this.buffer=void 0}};function Dr(r,e,t,s){let i=Buffer.isBuffer(s)?s:s?Buffer.from(JSON.stringify(s)):void 0,n=Buffer.allocUnsafe(Bs+(i?i.length:0));n.writeUint8(J_,Q_),n.writeUint8(Z_,ev),n.writeUint16LE(e,tv),n.writeUint32LE(t,rv),n.writeUint32LE(i?i.length:0,sv),i?.copy(n,Bs,0);let o=r.write(n);return iv&&nv(e,t,i,!0),o}function Ks(r){return JSON.parse(r.toString("utf8"))}function nv(r,e,t,s){let{name:i,isBinary:n}=W_(r);console.debug(`[msg-${s?"out":"in"} ${i} ${e>0?e:""}] ${t?n?`- ${t.length} payload bytes`:t.toString("utf8"):"- empty"}`)}var cl=require("node:crypto");var sN=128,sr,Mr;function iN(r){if(r<0||r>1024)throw new RangeError("Wrong ID size");!sr||sr.length<r?(sr=Buffer.allocUnsafe(r*sN),cl.webcrypto.getRandomValues(sr),Mr=0):Mr+r>sr.length&&(cl.webcrypto.getRandomValues(sr),Mr=0),Mr+=r}function nN(r){return iN(r|=0),sr.subarray(Mr-r,Mr)}function oN(r,e,t){let s=256-256%r.length;if(s===256){let n=r.length-1;return(o=e)=>{if(!o)return"";let a="";for(;;){let u=t(o),c=o;for(;c--;)if(a+=r[u[c]&n],a.length>=o)return a}}}let i=Math.ceil(1.6*256*e/s);return(n=e)=>{if(!n)return"";let o="";for(;;){let a=t(i),u=i;for(;u--;)if(a[u]<s&&(o+=r[a[u]%r.length],o.length>=n))return o}}}function ll(r,e=21){return oN(r,e,nN)}var Sn=ll("0123456789abcdef",8),F2=ll("0123456789abcdefghijklmnopqrstuvwxyz",24);var hv=4096,Lr=13,Vr=10,ov=new Uint8Array([72,84,84,80,47,49,46,49,Lr,Vr]),aN=new Uint8Array([72,84,84,80,47,49,46,49,32]),hl=0,On=1,xn=2,dl=3,av=4,dv=5,Ws=class{constructor(e){this.onParsed=e}onParsed;state=hl;id="";contentData;headers=[];expectedBodyLen=0;isRequest=!1;method="";path="";status=0;statusText="";startAt=0;onData(e){let s=0,i=0;for(;s<e.length&&s!==-1&&i++<100;)if(this.state===hl||this.state===On||this.state===xn){this.contentData=void 0;let n=s;if((s=e.indexOf(ov,n))>=0)for(let o=0;o<1;o++){let a=s+ov.length;for(;s>0&&e[s-1]!==Vr&&e[s-1]!==Lr;)s--;let u=e.subarray(s,a).toString("ascii").split(" ");if(u.length!==3){s=a;break}let c=cv(e,a);if(c){s=a+c.length,this.headers=lv(c);let{nextState:l,len:h}=uv(this.headers,!0);this.state=l,this.expectedBodyLen=h}else break;this.isRequest=!0,this.id=Sn(12),this.method=u[0].toUpperCase(),this.path=decodeURI(u[1]),this.onParsed?.({id:this.id,type:"http-request-header",headers:this.headers,method:this.method,path:this.path,status:0,statusText:"",startAt:this.startAt=new Date().valueOf()})}else if((s=e.indexOf(aN,n))>=0){let o=s,a=e.length;for(;s<a&&!(e[s+1]===Lr&&e[s+2]===Vr);)s++;for(let u=0;u<1;u++){let c=e.subarray(o,s+1).toString("ascii").split(" ");if(c.length<3)break;let l=cv(e,o);if(l){s=o+l.length,this.headers=lv(l);let{nextState:f,len:p}=uv(this.headers,!1);this.state=f,this.expectedBodyLen=p}else break;let h=Number.parseInt(c[1]);if(!Number.isFinite(h)||h<100||h>999)break;this.isRequest=!1,this.status=h,this.statusText=c.slice(2).join(" "),this.onParsed?.({id:this.id,type:"http-response-header",headers:this.headers,status:this.status,statusText:this.statusText,method:this.method,path:this.path,endAt:new Date().valueOf()})}}}else if(this.state===dl){let{ok:n,p:o,size:a}=uN(e,s);s=o,a>0?(this.expectedBodyLen=a,this.state=n?av:hl):n&&(this.isRequest?this.onParsed?.({id:this.id,type:"http-request-body",headers:this.headers,method:this.method,path:this.path,status:this.status,statusText:this.statusText,content:this.contentData,startAt:this.startAt,endAt:new Date().valueOf()}):this.onParsed?.({id:this.id,type:"http-response-body",headers:this.headers,method:this.method,path:this.path,status:this.status,statusText:this.statusText,content:this.contentData,startAt:this.startAt,endAt:new Date().valueOf()}),s+=2,this.state=this.isRequest?xn:On)}else if(this.state===av){let n=Math.min(e.length-s,this.expectedBodyLen),o=e.slice(s,s+this.expectedBodyLen);this.contentData=this.contentData?Buffer.concat([this.contentData,o]):Buffer.from(o),this.expectedBodyLen-=n,s+=n,this.expectedBodyLen===0&&(s+=2,this.state=dl)}else if(this.state===dv){let n=Math.min(e.length-s,this.expectedBodyLen),o=e.slice(s,s+this.expectedBodyLen);this.contentData=this.contentData?Buffer.concat([this.contentData,o]):Buffer.from(o),this.expectedBodyLen-=n,s+=n,this.expectedBodyLen===0&&(this.isRequest?this.onParsed?.({id:this.id,type:"http-request-body",headers:this.headers,method:this.method,path:this.path,status:this.status,statusText:this.statusText,content:this.contentData,startAt:this.startAt,endAt:new Date().valueOf()}):this.onParsed?.({id:this.id,type:"http-response-body",headers:this.headers,method:this.method,path:this.path,status:this.status,statusText:this.statusText,content:this.contentData,startAt:this.startAt,endAt:new Date().valueOf()}),this.state=this.isRequest?xn:On)}if(i>=100)throw new Error("Internal parser error: "+this.state)}};function uv(r,e){let t=Number.parseInt(r.find(s=>s.name==="content-length")?.value??"0");return r.find(s=>s.name==="transfer-encoding")?.value.includes("chunked")?{nextState:dl,isChunked:!0,len:0}:t>0?{nextState:dv,isChunked:!1,len:t}:{nextState:e?xn:On,isChunked:!1,len:0}}function cv(r,e){let t=e,s=Math.min(r.length-3,e+hv);for(;t<s&&!(r[t]===Lr&&r[t+1]===Vr&&r[t+2]===Lr&&r[t+3]===Vr);)t++;return t<s?r.slice(e,t+4):void 0}function lv(r){let e=[],t=r.toString("ascii").split(`\r
|
|
136
|
+
`);for(let s of t){let i=s.indexOf(":");if(i<0)continue;let n=s.substring(0,i).toLowerCase().trim(),o=s.substring(i+1).trim();n.length>0&&o.length>0&&e.push({name:n,value:o})}return e}function uN(r,e){let t=0,s=e,i=!1,n=cN(r,e);return n!==void 0&&(t=Number.parseInt(n,16))>=0&&Number.isFinite(t)&&(s=e+n.length+2,i=!0),{ok:i,p:s,size:t}}function cN(r,e){let t=e,s=Math.min(r.length-1,e+hv);for(;t<s&&!(r[t]===Lr&&r[t+1]===Vr);)t++;return t<s?r.slice(e,t).toString("ascii"):void 0}var fv="0.7.14";var Q={headerLines:[`/__\\ DERTUNNEL v${fv} /__\\`,""],logLines:[],inspectedRequests:[],statusLines:[]};function Ys(){let r=process.stdout,[e,t]=r.getWindowSize();if(Q.inspectedRequests.length>t-15){let n=Q.inspectedRequests.findIndex(o=>o.type==="http-response-body"||o.type==="http-response-header");Q.inspectedRequests.splice(n>=0?n:0,1)}let s=Q.inspectedRequests.map(n=>{let o;n.status===0?o="...":n.status<400?o=le.blue(n.status):n.status<500?o=le.yellow(n.status):o=le.redBright(n.status);let a=new Date(n.startAt).toISOString(),u=n.endAt?`${n.endAt-n.startAt}ms`:"",c=a.slice(0,10)+" "+a.slice(11,19),l=n.headers.find(m=>m.name==="content-type")?.value??"(none)",h=l.split(";")[0],f=n.path.slice(0,Math.min(e-45-(l?l.length:2),n.path.length)),p=le.white(n.content?" "+$t(n.content.length)+"b ":"");return`${le.cyan(`${c} -`)} ${o} ${le.green(n.method)} ${le.white(f)} ${n.content?le.gray(h):""} ${p} ${le.cyanBright(u)}`});for(;Q.headerLines.length+Q.statusLines.length+s.length+Q.logLines.length+2>t&&Q.logLines.length>2;)Q.logLines.splice(0,1);let i=[...Q.headerLines,"",...Q.statusLines,...s,"",...Q.logLines];r.cursorTo(0,0),r.clearScreenDown(),i.forEach(n=>{r.write(n??""),r.write(`
|
|
137
|
+
`)})}function Fr(r,e){process.stdout.isTTY?(e!==void 0?Q.headerLines[e]=r:Q.headerLines.push(r),Ys()):console.log(r)}function Xs(r){process.stdout.isTTY?(Q.logLines.push(r),Q.logLines.length>20&&Q.logLines.splice(0,1),Ys()):console.log(r)}var lN=new kr(200,()=>Ys());function pv(r,e,t){if(r==="http-request-header"){let s=Q.inspectedRequests.find(i=>i.cid===e);s&&(s.cid=""),Q.inspectedRequests.push({cid:e,...t})}else{let s=Q.inspectedRequests.findIndex(i=>i.cid===e);if(s>=0){let i=Q.inspectedRequests[s];Q.inspectedRequests[s]={id:i.id,cid:i.cid,type:t.type,headers:t.headers,method:t.method||i.method,path:t.path||i.path,status:t.status||i.status,statusText:t.statusText||i.statusText,content:t.content??i.content,startAt:t.startAt||i.startAt,endAt:t.endAt}}}lN.update(void 0)}function mv(r){return["STATS | SENT chunks bytes | RECV chunks bytes | CONN active total errors |",` |${$t(r.chunksSent).padStart(14)}${$t(r.bytesSent).padStart(14)} |${$t(r.chunksReceived).padStart(14)}${$t(r.bytesReceived).padStart(14)} |${$t(r.currentConnections).padStart(14)}${$t(r.totalConnections).padStart(8)}${$t(r.connectionErrors).padStart(9)} |`,""]}async function _v(r){let e=!1,t=!1,s,i=300,n=1.4,o=1e4,a={reconnectTime:i};if(!r.endpoint&&!r.endpointPrefix)throw new Error("Must either define 'endpoint' or 'endpointPrefix'");if(!r.clientToken||!r.localPort&&!r.localUrl)throw new Error("Missing required options");let u=wn(r.clientToken);r.serviceHost??=u.service;let c=u.user,l=u.token,h,f;if(r.localPort)h=r.localServer??"127.0.0.1",f=r.localPort;else{let y=new URL(r.localUrl||"http://localhost");if(y.protocol!=="http:")throw new Error("Local endpoints only support http protocol");h=y.hostname,f=Number.parseInt(y.port??"80")}let p=K_(),m=r.serviceHost;m.startsWith(ul)||(m=ul+m);let g=()=>{let y=new kr(200,()=>S("data")),_={bytesReceived:0,bytesSent:0,chunksReceived:0,chunksSent:0,currentConnections:0,totalConnections:0,connectionErrors:0};function S(U,De){try{r.onEndpoint?.(U,_,De??"")}catch{}}s?.destroy(),r.ignoreCertErrors&&(process.env.NODE_TLS_REJECT_UNAUTHORIZED="0"),s=yv.default.connect({timeout:1e4,host:m,port:r.servicePort||443,servername:m,...r.ignoreCertErrors?{checkServerIdentity:()=>{}}:{}},()=>{s&&(s.setKeepAlive(!0,X_),Dr(s,1,0,{version:Y_,user:c,token:l,endpoint:r.endpoint,endpointPrefix:r.endpointPrefix}))}),s.setMaxListeners(0);let O=new Map,E,$,he=new En(async(U,De,xe)=>{if(!e&&U===2){let G=Ks(xe);if(!G.success){s?.destroy();let N="Server connection error: "+(G.error??"Unknown error");p.reject(new Error(N)),r.onError?.(N);return}r.onConnected?.(G.endpoint||""),y.update(void 0,!0),p.resolve(),e=!0,a.reconnectTime=i,E=setInterval(()=>{if(!s){E&&clearInterval(E),$&&clearTimeout($);return}try{Dr(s,7,0)}catch{E&&clearInterval(E)}$=setTimeout(()=>{r.onError?.("Server pong timeout"),s?.destroy()},7e3).unref()},15e3).unref()}if(U===3){s?.destroy();let G=Ks(xe);G.error&&r.onError?.(G.error);return}if(e){if(U===7)Dr(s,8,0);else if(U===8)$&&clearTimeout($);else if(U===65){let G=O.get(De);if(G){if(_.bytesSent+=xe.length,_.chunksSent++,G.bytesSent+=xe.length,G.parserOut)try{G.parserOut.onData(xe)}catch(N){S("error",N?.message)}G.write(xe),y.update(void 0,!1)}}else if(U===4){let G=Ks(xe),N=(0,gv.createConnection)({host:h,port:f,allowHalfOpen:!1});N.channelId=G.channelId,N.wasConnected=!1;let Js=Sn(),Ur=Me=>{try{r.onProtocolData?.(Me.type,Js,Me)}catch{}};r.protocols?.inspect&&(N.parserIn=new Ws(Ur),N.parserOut=new Ws(Ur)),N.bytesReceived=N.bytesSent=0,O.set(G.channelId,N),N.on("connect",()=>{N.wasConnected=!0,_.currentConnections++,_.totalConnections++,S("connect"),y.update(void 0,!0)}),N.on("close",()=>{N.wasConnected&&(_.currentConnections=Math.max(0,_.currentConnections-1)),O.delete(G.channelId),Dr(s,6,0,{channelId:N.channelId}),S("disconnect"),y.update(void 0,!0)}),N.on("data",Me=>{if(N.bytesReceived+=Me.length,_.bytesReceived+=Me.length,_.chunksReceived++,N.parserIn)try{N.parserIn.onData(Me)}catch(bv){S("error",bv?.message)}!Dr(s,66,N.channelId,Me)&&!N.isPaused()&&(N.pause(),s.once("drain",()=>{N.resume()})),y.update(void 0,!1)}),N.on("error",Me=>{_.connectionErrors++,S("error",Me?.message),y.update(void 0,!0)})}else if(U===5){let G=Ks(xe),N=O.get(G.channelId);N&&(O.delete(G.channelId),N.end(()=>N.destroy()))}}});s.on("error",U=>{e=!1,!t&&(p.reject(U),r.onError?.("Server connection error: "+U.message))}),s.on("close",()=>{e=!1,E&&clearInterval(E),$&&clearTimeout($),O.forEach(U=>U.destroy()),!t&&(setTimeout(g,a.reconnectTime),a.reconnectTime=Math.min(o,a.reconnectTime*n))}),s.on("data",U=>{t||!s||(s.pause(),he.receive(U).then(De=>{De||s?.destroy(),s?.resume()}).catch(De=>Xs(`Unexpected parser error: ${De.message}`)))})};return g(),r.waitForInitialConnection!==!1&&await p,()=>{t=!0,s?.destroy()}}(async function(){let e=new Cs({projectName:"dertunnel",defaults:{configured:!1,serviceUrl:"",user:"",token:""}}),t=e.get("configured"),s=z_.name("dertunnel").option("-s, --service <url>","Service URL or host name").option("-u, --user <username>","The username for authenticating to the service").option("--reset","Removes stored user configuration").option("--ignore-cert-errors","Ignore all certificate errors (UNSAFE)").option("--no-inspect","Do not inspect traffic - HTTP logging will be unavailable").argument("[public-endpoint-name]","Public name for the tunnel endpoint").argument("[local-endpoint]","Local port name or URL").parse(process.argv),i=s.opts();i.reset&&(e.clear(),console.log("Stored configuration was purged"),process.exit());let n=i.service||(t?e.get("serviceUrl"):void 0),o=i.user||(t?e.get("user"):void 0),a=process.env.DERTUNNEL_TOKEN||(t?e.get("token"):void 0);if(!a){if(a=(await(0,Tn.default)({name:"value",type:"password",message:"Connection token"})).value,!a)throw new Error("Must specify a connection token");e.set("token",a)}e.set("configured",!0);let{service:u,user:c}=wn(a);c=o||c;let[l,h]=s.args;if(!l&&(l=(await(0,Tn.default)({name:"value",type:"text",message:"Public endpoint name",validate:E=>B_.test(E)})).value,!l))throw new Error("Must specify a public endpoint name");if(!h&&(h=(await(0,Tn.default)({name:"value",type:"text",message:"Local endpoint URL or port"})).value,!h))throw new Error("Must specify a local endpoint");let f,p,m,g=Number.parseInt(h);if(Number.isNaN(g)){let E=new URL(h);if(E.protocol!=="http:")throw new Error("Ony http protocol is supported for local endpoints");m=E.toString()}else f="127.0.0.1",p=g;Fr(`Service: ${le.cyanBright(n||u)}`,3),Fr(`User: ${le.cyanBright(c)}`,4),Fr(`Local: ${le.cyanBright(m??`${f} ${p}`)}`,5);let y=!!i.inspect,_,S;if(n){let E=new URL(n);_=E.hostname,S=Number.parseInt(E.port||"443")}let O=await _v({clientToken:a,localServer:f,localPort:p,localUrl:m,serviceHost:_,servicePort:S,endpoint:l,endpointPrefix:void 0,ignoreCertErrors:!!i.ignoreCertErrors,waitForInitialConnection:!0,protocols:{inspect:y},onConnected:E=>{Fr(`Connected - public endpoint: ${le.green(E)}`,6)},onError:E=>{Fr(le.redBright(E),6)},onEndpoint(E,$,he){Q.statusLines=mv($),E==="error"&&Xs(le.redBright(he)),Ys()},onProtocolData(E,$,he){pv(E,$,he)}});["SIGINT","SIGTERM","SIGQUIT"].forEach(E=>{process.on(E,()=>{Xs("Shutting down"),O(),process.exit(0)})})})().catch(r=>{console.error(r)});
|